@seele00/seele-work 0.1.162 → 0.1.164

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/libexec/seele-server +0 -0
  2. package/libexec/seele-worker +0 -0
  3. package/libexec/seele-workspace-observe +0 -0
  4. package/package.json +1 -1
  5. package/release-manifest.json +130 -130
  6. package/web/dist/assets/{abnfDiagram-VRR7QNED-DVl5AHM1.js → abnfDiagram-VRR7QNED-aj-ZFpTR.js} +1 -1
  7. package/web/dist/assets/{arc-BWe14Cfl.js → arc-weeTk_y1.js} +1 -1
  8. package/web/dist/assets/{architectureDiagram-ZJ3FMSHR-CMv2qZhe.js → architectureDiagram-ZJ3FMSHR-CoTxKdiy.js} +1 -1
  9. package/web/dist/assets/{blockDiagram-677ZJIJ3-Cen8So9u.js → blockDiagram-677ZJIJ3-Cs4ppcMg.js} +1 -1
  10. package/web/dist/assets/{c4Diagram-LMCZKHZV-D6AKHijD.js → c4Diagram-LMCZKHZV-DIaP07Te.js} +1 -1
  11. package/web/dist/assets/channel-DktSfBx8.js +1 -0
  12. package/web/dist/assets/{chunk-2Q5K7J3B-DsVxFFLt.js → chunk-2Q5K7J3B-JGjE8q-B.js} +1 -1
  13. package/web/dist/assets/{chunk-32BRIVSS-co5ef9W1.js → chunk-32BRIVSS-Blb8CfXb.js} +1 -1
  14. package/web/dist/assets/{chunk-5VM5RSS4-D6zEbmw8.js → chunk-5VM5RSS4-BIRBSPxe.js} +1 -1
  15. package/web/dist/assets/{chunk-EX3LRPZG-D81T3E4j.js → chunk-EX3LRPZG-DUiSf1lp.js} +1 -1
  16. package/web/dist/assets/{chunk-JWPE2WC7-DV64iWZX.js → chunk-JWPE2WC7-q3SUzV0s.js} +1 -1
  17. package/web/dist/assets/{chunk-MOJQB5TN-V9yHo5yo.js → chunk-MOJQB5TN-CuBoAe4B.js} +1 -1
  18. package/web/dist/assets/{chunk-RYQCIY6F-XSkKmUQp.js → chunk-RYQCIY6F-DatCYgJC.js} +1 -1
  19. package/web/dist/assets/{chunk-V7JOEXUC-Bo8ngDf2.js → chunk-V7JOEXUC-D8h0-bZt.js} +1 -1
  20. package/web/dist/assets/{chunk-VR4S4FIN-CGL3oZN_.js → chunk-VR4S4FIN-BoiBAyiz.js} +1 -1
  21. package/web/dist/assets/{chunk-XXDRQBXY-Qm6-03HC.js → chunk-XXDRQBXY-DVhtz_Lz.js} +1 -1
  22. package/web/dist/assets/classDiagram-OUVF2IWQ-CIwA9zPa.js +1 -0
  23. package/web/dist/assets/classDiagram-v2-EOCWNBFH-CIwA9zPa.js +1 -0
  24. package/web/dist/assets/{core-BoyqaSPx.js → core-xmoOijKw.js} +1 -1
  25. package/web/dist/assets/{cose-bilkent-JH36ORCC-BZmlBkvr.js → cose-bilkent-JH36ORCC-BoGtc8sq.js} +1 -1
  26. package/web/dist/assets/{cynefin-VYW2F7L2-CT3wViC9.js → cynefin-VYW2F7L2-Cpl3jRMp.js} +1 -1
  27. package/web/dist/assets/{cynefinDiagram-TSTJHNR4-DiyGFLcq.js → cynefinDiagram-TSTJHNR4-CUH580A9.js} +1 -1
  28. package/web/dist/assets/{dagre-VKFMJZFB-DUzM8jsS.js → dagre-VKFMJZFB-BcDsoamn.js} +1 -1
  29. package/web/dist/assets/{diagram-FQU43EPY-y92Un0Lu.js → diagram-FQU43EPY-l7JtHNUx.js} +1 -1
  30. package/web/dist/assets/{diagram-G47NLZAW-CA7i54QH.js → diagram-G47NLZAW-BwRoLANd.js} +1 -1
  31. package/web/dist/assets/{diagram-NH7WQ7WH-D8uKax8e.js → diagram-NH7WQ7WH-BZgRWJnn.js} +1 -1
  32. package/web/dist/assets/{diagram-OA4YK3LP-C3pqnQ3x.js → diagram-OA4YK3LP-CRKbGJ6d.js} +1 -1
  33. package/web/dist/assets/{diagram-WEI45ONY-DP5lmTAm.js → diagram-WEI45ONY-CmYWHone.js} +1 -1
  34. package/web/dist/assets/{ebnfDiagram-CCIWWBDH-5JchvR-B.js → ebnfDiagram-CCIWWBDH-D6DTaXvA.js} +1 -1
  35. package/web/dist/assets/{elk.bundled-u20jT_nU.js → elk.bundled-DfKzugqM.js} +1 -1
  36. package/web/dist/assets/{erDiagram-Q63AITRT-BbUTrCTU.js → erDiagram-Q63AITRT-C75HDSIm.js} +1 -1
  37. package/web/dist/assets/{flowDiagram-23GEKE2U-DK7G0iV_.js → flowDiagram-23GEKE2U-C5HqQ_OP.js} +1 -1
  38. package/web/dist/assets/{ganttDiagram-NO4QXBWP-B70YQiep.js → ganttDiagram-NO4QXBWP-VfRPLXy5.js} +1 -1
  39. package/web/dist/assets/{gitGraphDiagram-IHSO6WYX-DkaJqwct.js → gitGraphDiagram-IHSO6WYX-CAWoVfgO.js} +1 -1
  40. package/web/dist/assets/index-5L_8wVQ6.css +1 -0
  41. package/web/dist/assets/index-QTons21e.js +403 -0
  42. package/web/dist/assets/{infoDiagram-FWYZ7A6U-KhP5UPfR.js → infoDiagram-FWYZ7A6U-CthhCR2-.js} +1 -1
  43. package/web/dist/assets/{ishikawaDiagram-FXEZZL3T-4NBBxb_A.js → ishikawaDiagram-FXEZZL3T-DdX8QPM4.js} +1 -1
  44. package/web/dist/assets/{journeyDiagram-5HDEW3XC-KNVH0Bir.js → journeyDiagram-5HDEW3XC-DdgfufJy.js} +1 -1
  45. package/web/dist/assets/{kanban-definition-HUTT4EX6-ZnYWwfXr.js → kanban-definition-HUTT4EX6-B2RGOYX8.js} +1 -1
  46. package/web/dist/assets/{linear-D-380L4X.js → linear-DQbdyxUr.js} +1 -1
  47. package/web/dist/assets/{mermaid.core-ChGHXuOh.js → mermaid.core-ZfuwOVlQ.js} +5 -5
  48. package/web/dist/assets/{mindmap-definition-LN4V7U3C-OmWSr0FY.js → mindmap-definition-LN4V7U3C-st5f-C3u.js} +1 -1
  49. package/web/dist/assets/{pegDiagram-2B236MQR-ChKI1gbz.js → pegDiagram-2B236MQR-DyA8AuRC.js} +1 -1
  50. package/web/dist/assets/{pieDiagram-ENE6RG2P-C9mRxCyE.js → pieDiagram-ENE6RG2P-DvB7oSE6.js} +1 -1
  51. package/web/dist/assets/{quadrantDiagram-ABIIQ3AL-C4D5b6bC.js → quadrantDiagram-ABIIQ3AL-MUSDX_FV.js} +1 -1
  52. package/web/dist/assets/{railroadDiagram-RFXS5EU6-V_rc9mek.js → railroadDiagram-RFXS5EU6-D1g9RKwH.js} +1 -1
  53. package/web/dist/assets/{requirementDiagram-TGXJPOKE-C2EoHXW6.js → requirementDiagram-TGXJPOKE-C7qr1fvd.js} +1 -1
  54. package/web/dist/assets/{sankeyDiagram-HTMAVEWB-CFzbTbAc.js → sankeyDiagram-HTMAVEWB-DXJKc7GT.js} +1 -1
  55. package/web/dist/assets/{sequenceDiagram-DBY2YBRQ-BqBKjvIG.js → sequenceDiagram-DBY2YBRQ-C-l5ktY_.js} +1 -1
  56. package/web/dist/assets/{sizeCapture-X5ZJPWSS-DuQVmVeJ.js → sizeCapture-X5ZJPWSS-BdV2tpaV.js} +1 -1
  57. package/web/dist/assets/{stateDiagram-2N3HPSRC-Cq8JO6MO.js → stateDiagram-2N3HPSRC-B7mEqr_L.js} +1 -1
  58. package/web/dist/assets/stateDiagram-v2-6OUMAXLB-T9r1umI1.js +1 -0
  59. package/web/dist/assets/{swimlanes-5IMT3BWC-ERIsRdFu.js → swimlanes-5IMT3BWC-DVVVj6XR.js} +2 -2
  60. package/web/dist/assets/swimlanesDiagram-G3AALYLV-UUUas-H-.js +8 -0
  61. package/web/dist/assets/{timeline-definition-FHXFAJF6-DSO5YcJk.js → timeline-definition-FHXFAJF6-PkmcrRlJ.js} +1 -1
  62. package/web/dist/assets/{vennDiagram-L72KCM5P-VmHccPcA.js → vennDiagram-L72KCM5P-83sSwlEp.js} +1 -1
  63. package/web/dist/assets/{wardleyDiagram-EHGQE667-DLnZEXjI.js → wardleyDiagram-EHGQE667-D7iYFZTJ.js} +1 -1
  64. package/web/dist/assets/{xychartDiagram-FW5EYKEG-CKhgqFti.js → xychartDiagram-FW5EYKEG-DWP0zxpn.js} +1 -1
  65. package/web/dist/index.html +2 -2
  66. package/web/dist/assets/channel-EyyS5Ixi.js +0 -1
  67. package/web/dist/assets/classDiagram-OUVF2IWQ-CYLGlcD1.js +0 -1
  68. package/web/dist/assets/classDiagram-v2-EOCWNBFH-CYLGlcD1.js +0 -1
  69. package/web/dist/assets/index-Bzhk1W1W.css +0 -1
  70. package/web/dist/assets/index-DFAtZU0U.js +0 -403
  71. package/web/dist/assets/stateDiagram-v2-6OUMAXLB-CWuZU8o2.js +0 -1
  72. package/web/dist/assets/swimlanesDiagram-G3AALYLV-BUjbdCUN.js +0 -8
@@ -1,403 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./html-pp8916En.js","./javascript-wDzz0qaB.js","./css-CLj8gQPS.js","./xml-sdJ4AIDG.js","./java-CylS5w8V.js"])))=>i.map(i=>d[i]);
2
- var w7=Object.defineProperty;var k7=(e,t,n)=>t in e?w7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var kd=(e,t,n)=>k7(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))a(l);new MutationObserver(l=>{for(const u of l)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function n(l){const u={};return l.integrity&&(u.integrity=l.integrity),l.referrerPolicy&&(u.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?u.credentials="include":l.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function a(l){if(l.ep)return;l.ep=!0;const u=n(l);fetch(l.href,u)}})();const S7="modulepreload",j7=function(e,t){return new URL(e,t).href},$y={},an=function(t,n,a){let l=Promise.resolve();if(n&&n.length>0){let c=function(g){return Promise.all(g.map(y=>Promise.resolve(y).then(k=>({status:"fulfilled",value:k}),k=>({status:"rejected",reason:k}))))};const f=document.getElementsByTagName("link"),h=document.querySelector("meta[property=csp-nonce]"),m=(h==null?void 0:h.nonce)||(h==null?void 0:h.getAttribute("nonce"));l=c(n.map(g=>{if(g=j7(g,a),g in $y)return;$y[g]=!0;const y=g.endsWith(".css"),k=y?'[rel="stylesheet"]':"";if(!!a)for(let D=f.length-1;D>=0;D--){const R=f[D];if(R.href===g&&(!y||R.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${g}"]${k}`))return;const C=document.createElement("link");if(C.rel=y?"stylesheet":S7,y||(C.as="script"),C.crossOrigin="",C.href=g,m&&C.setAttribute("nonce",m),document.head.appendChild(C),y)return new Promise((D,R)=>{C.addEventListener("load",D),C.addEventListener("error",()=>R(new Error(`Unable to preload CSS for ${g}`)))})}))}function u(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return l.then(c=>{for(const f of c||[])f.status==="rejected"&&u(f.reason);return t().catch(u)})};var sR=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gm={exports:{}},Cc={};/**
3
- * @license React
4
- * react-jsx-runtime.production.js
5
- *
6
- * Copyright (c) Meta Platforms, Inc. and affiliates.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */var Fy;function C7(){if(Fy)return Cc;Fy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,l,u){var c=null;if(u!==void 0&&(c=""+u),l.key!==void 0&&(c=""+l.key),"key"in l){u={};for(var f in l)f!=="key"&&(u[f]=l[f])}else u=l;return l=u.ref,{$$typeof:e,type:a,key:c,ref:l!==void 0?l:null,props:u}}return Cc.Fragment=t,Cc.jsx=n,Cc.jsxs=n,Cc}var Py;function T7(){return Py||(Py=1,gm.exports=C7()),gm.exports}var o=T7(),ym={exports:{}},mt={};/**
11
- * @license React
12
- * react.production.js
13
- *
14
- * Copyright (c) Meta Platforms, Inc. and affiliates.
15
- *
16
- * This source code is licensed under the MIT license found in the
17
- * LICENSE file in the root directory of this source tree.
18
- */var Gy;function A7(){if(Gy)return mt;Gy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),k=Symbol.iterator;function x(B){return B===null||typeof B!="object"?null:(B=k&&B[k]||B["@@iterator"],typeof B=="function"?B:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D=Object.assign,R={};function O(B,ee,z){this.props=B,this.context=ee,this.refs=R,this.updater=z||C}O.prototype.isReactComponent={},O.prototype.setState=function(B,ee){if(typeof B!="object"&&typeof B!="function"&&B!=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,B,ee,"setState")},O.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function M(){}M.prototype=O.prototype;function q(B,ee,z){this.props=B,this.context=ee,this.refs=R,this.updater=z||C}var L=q.prototype=new M;L.constructor=q,D(L,O.prototype),L.isPureReactComponent=!0;var K=Array.isArray;function P(){}var H={H:null,A:null,T:null,S:null},X=Object.prototype.hasOwnProperty;function J(B,ee,z){var te=z.ref;return{$$typeof:e,type:B,key:ee,ref:te!==void 0?te:null,props:z}}function F(B,ee){return J(B.type,ee,B.props)}function he(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function me(B){var ee={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(z){return ee[z]})}var Ae=/\/+/g;function je(B,ee){return typeof B=="object"&&B!==null&&B.key!=null?me(""+B.key):ee.toString(36)}function pe(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(P,P):(B.status="pending",B.then(function(ee){B.status==="pending"&&(B.status="fulfilled",B.value=ee)},function(ee){B.status==="pending"&&(B.status="rejected",B.reason=ee)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function Z(B,ee,z,te,Te){var Re=typeof B;(Re==="undefined"||Re==="boolean")&&(B=null);var He=!1;if(B===null)He=!0;else switch(Re){case"bigint":case"string":case"number":He=!0;break;case"object":switch(B.$$typeof){case e:case t:He=!0;break;case g:return He=B._init,Z(He(B._payload),ee,z,te,Te)}}if(He)return Te=Te(B),He=te===""?"."+je(B,0):te,K(Te)?(z="",He!=null&&(z=He.replace(Ae,"$&/")+"/"),Z(Te,ee,z,"",function(ie){return ie})):Te!=null&&(he(Te)&&(Te=F(Te,z+(Te.key==null||B&&B.key===Te.key?"":(""+Te.key).replace(Ae,"$&/")+"/")+He)),ee.push(Te)),1;He=0;var rt=te===""?".":te+":";if(K(B))for(var de=0;de<B.length;de++)te=B[de],Re=rt+je(te,de),He+=Z(te,ee,z,Re,Te);else if(de=x(B),typeof de=="function")for(B=de.call(B),de=0;!(te=B.next()).done;)te=te.value,Re=rt+je(te,de++),He+=Z(te,ee,z,Re,Te);else if(Re==="object"){if(typeof B.then=="function")return Z(pe(B),ee,z,te,Te);throw ee=String(B),Error("Objects are not valid as a React child (found: "+(ee==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":ee)+"). If you meant to render a collection of children, use an array instead.")}return He}function ge(B,ee,z){if(B==null)return B;var te=[],Te=0;return Z(B,te,"","",function(Re){return ee.call(z,Re,Te++)}),te}function ye(B){if(B._status===-1){var ee=B._result;ee=ee(),ee.then(function(z){(B._status===0||B._status===-1)&&(B._status=1,B._result=z)},function(z){(B._status===0||B._status===-1)&&(B._status=2,B._result=z)}),B._status===-1&&(B._status=0,B._result=ee)}if(B._status===1)return B._result.default;throw B._result}var oe=typeof reportError=="function"?reportError:function(B){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var ee=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof B=="object"&&B!==null&&typeof B.message=="string"?String(B.message):String(B),error:B});if(!window.dispatchEvent(ee))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",B);return}console.error(B)},U={map:ge,forEach:function(B,ee,z){ge(B,function(){ee.apply(this,arguments)},z)},count:function(B){var ee=0;return ge(B,function(){ee++}),ee},toArray:function(B){return ge(B,function(ee){return ee})||[]},only:function(B){if(!he(B))throw Error("React.Children.only expected to receive a single React element child.");return B}};return mt.Activity=y,mt.Children=U,mt.Component=O,mt.Fragment=n,mt.Profiler=l,mt.PureComponent=q,mt.StrictMode=a,mt.Suspense=h,mt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,mt.__COMPILER_RUNTIME={__proto__:null,c:function(B){return H.H.useMemoCache(B)}},mt.cache=function(B){return function(){return B.apply(null,arguments)}},mt.cacheSignal=function(){return null},mt.cloneElement=function(B,ee,z){if(B==null)throw Error("The argument must be a React element, but you passed "+B+".");var te=D({},B.props),Te=B.key;if(ee!=null)for(Re in ee.key!==void 0&&(Te=""+ee.key),ee)!X.call(ee,Re)||Re==="key"||Re==="__self"||Re==="__source"||Re==="ref"&&ee.ref===void 0||(te[Re]=ee[Re]);var Re=arguments.length-2;if(Re===1)te.children=z;else if(1<Re){for(var He=Array(Re),rt=0;rt<Re;rt++)He[rt]=arguments[rt+2];te.children=He}return J(B.type,Te,te)},mt.createContext=function(B){return B={$$typeof:c,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null},B.Provider=B,B.Consumer={$$typeof:u,_context:B},B},mt.createElement=function(B,ee,z){var te,Te={},Re=null;if(ee!=null)for(te in ee.key!==void 0&&(Re=""+ee.key),ee)X.call(ee,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(Te[te]=ee[te]);var He=arguments.length-2;if(He===1)Te.children=z;else if(1<He){for(var rt=Array(He),de=0;de<He;de++)rt[de]=arguments[de+2];Te.children=rt}if(B&&B.defaultProps)for(te in He=B.defaultProps,He)Te[te]===void 0&&(Te[te]=He[te]);return J(B,Re,Te)},mt.createRef=function(){return{current:null}},mt.forwardRef=function(B){return{$$typeof:f,render:B}},mt.isValidElement=he,mt.lazy=function(B){return{$$typeof:g,_payload:{_status:-1,_result:B},_init:ye}},mt.memo=function(B,ee){return{$$typeof:m,type:B,compare:ee===void 0?null:ee}},mt.startTransition=function(B){var ee=H.T,z={};H.T=z;try{var te=B(),Te=H.S;Te!==null&&Te(z,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(P,oe)}catch(Re){oe(Re)}finally{ee!==null&&z.types!==null&&(ee.types=z.types),H.T=ee}},mt.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()},mt.use=function(B){return H.H.use(B)},mt.useActionState=function(B,ee,z){return H.H.useActionState(B,ee,z)},mt.useCallback=function(B,ee){return H.H.useCallback(B,ee)},mt.useContext=function(B){return H.H.useContext(B)},mt.useDebugValue=function(){},mt.useDeferredValue=function(B,ee){return H.H.useDeferredValue(B,ee)},mt.useEffect=function(B,ee){return H.H.useEffect(B,ee)},mt.useEffectEvent=function(B){return H.H.useEffectEvent(B)},mt.useId=function(){return H.H.useId()},mt.useImperativeHandle=function(B,ee,z){return H.H.useImperativeHandle(B,ee,z)},mt.useInsertionEffect=function(B,ee){return H.H.useInsertionEffect(B,ee)},mt.useLayoutEffect=function(B,ee){return H.H.useLayoutEffect(B,ee)},mt.useMemo=function(B,ee){return H.H.useMemo(B,ee)},mt.useOptimistic=function(B,ee){return H.H.useOptimistic(B,ee)},mt.useReducer=function(B,ee,z){return H.H.useReducer(B,ee,z)},mt.useRef=function(B){return H.H.useRef(B)},mt.useState=function(B){return H.H.useState(B)},mt.useSyncExternalStore=function(B,ee,z){return H.H.useSyncExternalStore(B,ee,z)},mt.useTransition=function(){return H.H.useTransition()},mt.version="19.2.7",mt}var Vy;function u1(){return Vy||(Vy=1,ym.exports=A7()),ym.exports}var A=u1();function E7(e,t){return{textareaDisabled:!1,sendDisabled:t||!e.trim()}}function N7(e,t){return e.hasConversation?e.messageSubmitting?"blocked":e.hasActiveTurn||e.hasConfirmedCurrentTurn?t?"queue-turn":"steer-turn":"start-turn":"create-workspace"}function M7(e){return e.key!=="Enter"||!e.metaKey&&!e.ctrlKey||e.isComposing?null:{forceNewTurn:e.shiftKey}}function Yy(e,t){return e.conversationId===t.conversationId&&e.version===t.version}const D7=3,z7=10;function Uv({value:e,onChange:t,onShortcut:n,disabled:a=!1,sendDisabled:l,allowNewTurn:u=!1,textareaRef:c,label:f="Message",sendLabel:h="Send message",placeholder:m="Cmd/Ctrl + Enter"}){const g=A.useRef(null),y=c??g;return A.useLayoutEffect(()=>R7(y.current),[e,a,y]),o.jsxs("div",{className:"composer-panel",children:[o.jsx("textarea",{"aria-label":f,disabled:a,value:e,ref:y,onChange:k=>t(k.target.value),placeholder:m,onKeyDown:k=>{const x=M7({key:k.key,metaKey:k.metaKey,ctrlKey:k.ctrlKey,shiftKey:k.shiftKey,isComposing:k.nativeEvent.isComposing});x&&(k.preventDefault(),!a&&!l&&(!x.forceNewTurn||u)&&n(x.forceNewTurn))}}),o.jsxs("button",{"aria-label":h,className:"composer-send",disabled:l,type:"submit",children:[o.jsx(O7,{}),o.jsxs("span",{className:"composer-send-tooltip",role:"tooltip",children:[o.jsxs("span",{children:[o.jsx("kbd",{children:"⌘ / Ctrl + Enter"})," ",u?"Send or add to running turn":"发送引导"]}),u&&o.jsxs("span",{children:[o.jsx("kbd",{children:"⇧ + ⌘ / Ctrl + Enter"})," New turn or queue"]})]})]})]})}function R7(e){if(!e)return;const t=window.getComputedStyle(e),n=parseFloat(t.lineHeight)||24,a=parseFloat(t.paddingTop)||0,l=parseFloat(t.paddingBottom)||0,u=n*D7+a+l,c=n*z7+a+l;e.style.height="auto";const f=Math.min(Math.max(e.scrollHeight,u),c);e.style.height=`${f}px`,e.style.overflowY=e.scrollHeight>c?"auto":"hidden"}function O7(){return o.jsx("svg",{"aria-hidden":"true",fill:"none",height:"16",viewBox:"0 0 24 24",width:"16",children:o.jsx("path",{d:"M12 19V5m-5 5 5-5 5 5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2.1"})})}var vm={exports:{}},Tc={},xm={exports:{}},bm={};/**
19
- * @license React
20
- * scheduler.production.js
21
- *
22
- * Copyright (c) Meta Platforms, Inc. and affiliates.
23
- *
24
- * This source code is licensed under the MIT license found in the
25
- * LICENSE file in the root directory of this source tree.
26
- */var Wy;function I7(){return Wy||(Wy=1,(function(e){function t(Z,ge){var ye=Z.length;Z.push(ge);e:for(;0<ye;){var oe=ye-1>>>1,U=Z[oe];if(0<l(U,ge))Z[oe]=ge,Z[ye]=U,ye=oe;else break e}}function n(Z){return Z.length===0?null:Z[0]}function a(Z){if(Z.length===0)return null;var ge=Z[0],ye=Z.pop();if(ye!==ge){Z[0]=ye;e:for(var oe=0,U=Z.length,B=U>>>1;oe<B;){var ee=2*(oe+1)-1,z=Z[ee],te=ee+1,Te=Z[te];if(0>l(z,ye))te<U&&0>l(Te,z)?(Z[oe]=Te,Z[te]=ye,oe=te):(Z[oe]=z,Z[ee]=ye,oe=ee);else if(te<U&&0>l(Te,ye))Z[oe]=Te,Z[te]=ye,oe=te;else break e}}return ge}function l(Z,ge){var ye=Z.sortIndex-ge.sortIndex;return ye!==0?ye:Z.id-ge.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var h=[],m=[],g=1,y=null,k=3,x=!1,C=!1,D=!1,R=!1,O=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,q=typeof setImmediate<"u"?setImmediate:null;function L(Z){for(var ge=n(m);ge!==null;){if(ge.callback===null)a(m);else if(ge.startTime<=Z)a(m),ge.sortIndex=ge.expirationTime,t(h,ge);else break;ge=n(m)}}function K(Z){if(D=!1,L(Z),!C)if(n(h)!==null)C=!0,P||(P=!0,me());else{var ge=n(m);ge!==null&&pe(K,ge.startTime-Z)}}var P=!1,H=-1,X=5,J=-1;function F(){return R?!0:!(e.unstable_now()-J<X)}function he(){if(R=!1,P){var Z=e.unstable_now();J=Z;var ge=!0;try{e:{C=!1,D&&(D=!1,M(H),H=-1),x=!0;var ye=k;try{t:{for(L(Z),y=n(h);y!==null&&!(y.expirationTime>Z&&F());){var oe=y.callback;if(typeof oe=="function"){y.callback=null,k=y.priorityLevel;var U=oe(y.expirationTime<=Z);if(Z=e.unstable_now(),typeof U=="function"){y.callback=U,L(Z),ge=!0;break t}y===n(h)&&a(h),L(Z)}else a(h);y=n(h)}if(y!==null)ge=!0;else{var B=n(m);B!==null&&pe(K,B.startTime-Z),ge=!1}}break e}finally{y=null,k=ye,x=!1}ge=void 0}}finally{ge?me():P=!1}}}var me;if(typeof q=="function")me=function(){q(he)};else if(typeof MessageChannel<"u"){var Ae=new MessageChannel,je=Ae.port2;Ae.port1.onmessage=he,me=function(){je.postMessage(null)}}else me=function(){O(he,0)};function pe(Z,ge){H=O(function(){Z(e.unstable_now())},ge)}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(Z){Z.callback=null},e.unstable_forceFrameRate=function(Z){0>Z||125<Z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):X=0<Z?Math.floor(1e3/Z):5},e.unstable_getCurrentPriorityLevel=function(){return k},e.unstable_next=function(Z){switch(k){case 1:case 2:case 3:var ge=3;break;default:ge=k}var ye=k;k=ge;try{return Z()}finally{k=ye}},e.unstable_requestPaint=function(){R=!0},e.unstable_runWithPriority=function(Z,ge){switch(Z){case 1:case 2:case 3:case 4:case 5:break;default:Z=3}var ye=k;k=Z;try{return ge()}finally{k=ye}},e.unstable_scheduleCallback=function(Z,ge,ye){var oe=e.unstable_now();switch(typeof ye=="object"&&ye!==null?(ye=ye.delay,ye=typeof ye=="number"&&0<ye?oe+ye:oe):ye=oe,Z){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=ye+U,Z={id:g++,callback:ge,priorityLevel:Z,startTime:ye,expirationTime:U,sortIndex:-1},ye>oe?(Z.sortIndex=ye,t(m,Z),n(h)===null&&Z===n(m)&&(D?(M(H),H=-1):D=!0,pe(K,ye-oe))):(Z.sortIndex=U,t(h,Z),C||x||(C=!0,P||(P=!0,me()))),Z},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(Z){var ge=k;return function(){var ye=k;k=ge;try{return Z.apply(this,arguments)}finally{k=ye}}}})(bm)),bm}var Ky;function _7(){return Ky||(Ky=1,xm.exports=I7()),xm.exports}var wm={exports:{}},Wn={};/**
27
- * @license React
28
- * react-dom.production.js
29
- *
30
- * Copyright (c) Meta Platforms, Inc. and affiliates.
31
- *
32
- * This source code is licensed under the MIT license found in the
33
- * LICENSE file in the root directory of this source tree.
34
- */var Xy;function L7(){if(Xy)return Wn;Xy=1;var e=u1();function t(h){var m="https://react.dev/errors/"+h;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)m+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+h+"; visit "+m+" 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},l=Symbol.for("react.portal");function u(h,m,g){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:y==null?null:""+y,children:h,containerInfo:m,implementation:g}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,m){if(h==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Wn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Wn.createPortal=function(h,m){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(t(299));return u(h,m,null,g)},Wn.flushSync=function(h){var m=c.T,g=a.p;try{if(c.T=null,a.p=2,h)return h()}finally{c.T=m,a.p=g,a.d.f()}},Wn.preconnect=function(h,m){typeof h=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,a.d.C(h,m))},Wn.prefetchDNS=function(h){typeof h=="string"&&a.d.D(h)},Wn.preinit=function(h,m){if(typeof h=="string"&&m&&typeof m.as=="string"){var g=m.as,y=f(g,m.crossOrigin),k=typeof m.integrity=="string"?m.integrity:void 0,x=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;g==="style"?a.d.S(h,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:y,integrity:k,fetchPriority:x}):g==="script"&&a.d.X(h,{crossOrigin:y,integrity:k,fetchPriority:x,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Wn.preinitModule=function(h,m){if(typeof h=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var g=f(m.as,m.crossOrigin);a.d.M(h,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&a.d.M(h)},Wn.preload=function(h,m){if(typeof h=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var g=m.as,y=f(g,m.crossOrigin);a.d.L(h,g,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Wn.preloadModule=function(h,m){if(typeof h=="string")if(m){var g=f(m.as,m.crossOrigin);a.d.m(h,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else a.d.m(h)},Wn.requestFormReset=function(h){a.d.r(h)},Wn.unstable_batchedUpdates=function(h,m){return h(m)},Wn.useFormState=function(h,m,g){return c.H.useFormState(h,m,g)},Wn.useFormStatus=function(){return c.H.useHostTransitionStatus()},Wn.version="19.2.7",Wn}var Zy;function Hv(){if(Zy)return wm.exports;Zy=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(),wm.exports=L7(),wm.exports}/**
35
- * @license React
36
- * react-dom-client.production.js
37
- *
38
- * Copyright (c) Meta Platforms, Inc. and affiliates.
39
- *
40
- * This source code is licensed under the MIT license found in the
41
- * LICENSE file in the root directory of this source tree.
42
- */var Qy;function B7(){if(Qy)return Tc;Qy=1;var e=_7(),t=u1(),n=Hv();function a(r){var i="https://react.dev/errors/"+r;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)i+="&args[]="+encodeURIComponent(arguments[s])}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 l(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function u(r){var i=r,s=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,(i.flags&4098)!==0&&(s=i.return),r=i.return;while(r)}return i.tag===3?s:null}function c(r){if(r.tag===13){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function f(r){if(r.tag===31){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function h(r){if(u(r)!==r)throw Error(a(188))}function m(r){var i=r.alternate;if(!i){if(i=u(r),i===null)throw Error(a(188));return i!==r?null:r}for(var s=r,d=i;;){var p=s.return;if(p===null)break;var v=p.alternate;if(v===null){if(d=p.return,d!==null){s=d;continue}break}if(p.child===v.child){for(v=p.child;v;){if(v===s)return h(p),r;if(v===d)return h(p),i;v=v.sibling}throw Error(a(188))}if(s.return!==d.return)s=p,d=v;else{for(var j=!1,I=p.child;I;){if(I===s){j=!0,s=p,d=v;break}if(I===d){j=!0,d=p,s=v;break}I=I.sibling}if(!j){for(I=v.child;I;){if(I===s){j=!0,s=v,d=p;break}if(I===d){j=!0,d=v,s=p;break}I=I.sibling}if(!j)throw Error(a(189))}}if(s.alternate!==d)throw Error(a(190))}if(s.tag!==3)throw Error(a(188));return s.stateNode.current===s?r:i}function g(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r;for(r=r.child;r!==null;){if(i=g(r),i!==null)return i;r=r.sibling}return null}var y=Object.assign,k=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),q=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),F=Symbol.for("react.memo_cache_sentinel"),he=Symbol.iterator;function me(r){return r===null||typeof r!="object"?null:(r=he&&r[he]||r["@@iterator"],typeof r=="function"?r:null)}var Ae=Symbol.for("react.client.reference");function je(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===Ae?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case D:return"Fragment";case O:return"Profiler";case R:return"StrictMode";case K:return"Suspense";case P:return"SuspenseList";case J:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case C:return"Portal";case q:return r.displayName||"Context";case M:return(r._context.displayName||"Context")+".Consumer";case L:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case H:return i=r.displayName||null,i!==null?i:je(r.type)||"Memo";case X:i=r._payload,r=r._init;try{return je(r(i))}catch{}}return null}var pe=Array.isArray,Z=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ge=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ye={pending:!1,data:null,method:null,action:null},oe=[],U=-1;function B(r){return{current:r}}function ee(r){0>U||(r.current=oe[U],oe[U]=null,U--)}function z(r,i){U++,oe[U]=r.current,r.current=i}var te=B(null),Te=B(null),Re=B(null),He=B(null);function rt(r,i){switch(z(Re,i),z(Te,r),z(te,null),i.nodeType){case 9:case 11:r=(r=i.documentElement)&&(r=r.namespaceURI)?dy(r):0;break;default:if(r=i.tagName,i=i.namespaceURI)i=dy(i),r=fy(i,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}ee(te),z(te,r)}function de(){ee(te),ee(Te),ee(Re)}function ie(r){r.memoizedState!==null&&z(He,r);var i=te.current,s=fy(i,r.type);i!==s&&(z(Te,r),z(te,s))}function Ee(r){Te.current===r&&(ee(te),ee(Te)),He.current===r&&(ee(He),wc._currentValue=ye)}var Oe,Pe;function Xe(r){if(Oe===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);Oe=i&&i[1]||"",Pe=-1<s.stack.indexOf(`
43
- at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
44
- `+Oe+r+Pe}var Mt=!1;function qn(r,i){if(!r||Mt)return"";Mt=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:function(){try{if(i){var ke=function(){throw Error()};if(Object.defineProperty(ke.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ke,[])}catch(fe){var ce=fe}Reflect.construct(r,[],ke)}else{try{ke.call()}catch(fe){ce=fe}r.call(ke.prototype)}}else{try{throw Error()}catch(fe){ce=fe}(ke=r())&&typeof ke.catch=="function"&&ke.catch(function(){})}}catch(fe){if(fe&&ce&&typeof fe.stack=="string")return[fe.stack,ce.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=d.DetermineComponentFrameRoot(),j=v[0],I=v[1];if(j&&I){var W=j.split(`
45
- `),se=I.split(`
46
- `);for(p=d=0;d<W.length&&!W[d].includes("DetermineComponentFrameRoot");)d++;for(;p<se.length&&!se[p].includes("DetermineComponentFrameRoot");)p++;if(d===W.length||p===se.length)for(d=W.length-1,p=se.length-1;1<=d&&0<=p&&W[d]!==se[p];)p--;for(;1<=d&&0<=p;d--,p--)if(W[d]!==se[p]){if(d!==1||p!==1)do if(d--,p--,0>p||W[d]!==se[p]){var xe=`
47
- `+W[d].replace(" at new "," at ");return r.displayName&&xe.includes("<anonymous>")&&(xe=xe.replace("<anonymous>",r.displayName)),xe}while(1<=d&&0<=p);break}}}finally{Mt=!1,Error.prepareStackTrace=s}return(s=r?r.displayName||r.name:"")?Xe(s):""}function ra(r,i){switch(r.tag){case 26:case 27:case 5:return Xe(r.type);case 16:return Xe("Lazy");case 13:return r.child!==i&&i!==null?Xe("Suspense Fallback"):Xe("Suspense");case 19:return Xe("SuspenseList");case 0:case 15:return qn(r.type,!1);case 11:return qn(r.type.render,!1);case 1:return qn(r.type,!0);case 31:return Xe("Activity");default:return""}}function Jn(r){try{var i="",s=null;do i+=ra(r,s),s=r,r=r.return;while(r);return i}catch(d){return`
48
- Error generating stack: `+d.message+`
49
- `+d.stack}}var er=Object.prototype.hasOwnProperty,Kt=e.unstable_scheduleCallback,Ln=e.unstable_cancelCallback,Vn=e.unstable_shouldYield,Un=e.unstable_requestPaint,Xt=e.unstable_now,pr=e.unstable_getCurrentPriorityLevel,ve=e.unstable_ImmediatePriority,Le=e.unstable_UserBlockingPriority,re=e.unstable_NormalPriority,be=e.unstable_LowPriority,qe=e.unstable_IdlePriority,Ge=e.log,lt=e.unstable_setDisableYieldValue,Ct=null,gt=null;function nt(r){if(typeof Ge=="function"&&lt(r),gt&&typeof gt.setStrictMode=="function")try{gt.setStrictMode(Ct,r)}catch{}}var xt=Math.clz32?Math.clz32:tl,Ut=Math.log,Zt=Math.LN2;function tl(r){return r>>>=0,r===0?32:31-(Ut(r)/Zt|0)|0}var aa=256,fi=262144,Ia=4194304;function Ir(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 wa(r,i,s){var d=r.pendingLanes;if(d===0)return 0;var p=0,v=r.suspendedLanes,j=r.pingedLanes;r=r.warmLanes;var I=d&134217727;return I!==0?(d=I&~v,d!==0?p=Ir(d):(j&=I,j!==0?p=Ir(j):s||(s=I&~r,s!==0&&(p=Ir(s))))):(I=d&~v,I!==0?p=Ir(I):j!==0?p=Ir(j):s||(s=d&~r,s!==0&&(p=Ir(s)))),p===0?0:i!==0&&i!==p&&(i&v)===0&&(v=p&-p,s=i&-i,v>=s||v===32&&(s&4194048)!==0)?i:p}function Jt(r,i){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&i)===0}function nl(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 en(){var r=Ia;return Ia<<=1,(Ia&62914560)===0&&(Ia=4194304),r}function hi(r){for(var i=[],s=0;31>s;s++)i.push(r);return i}function rl(r,i){r.pendingLanes|=i,i!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function as(r,i,s,d,p,v){var j=r.pendingLanes;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=s,r.entangledLanes&=s,r.errorRecoveryDisabledLanes&=s,r.shellSuspendCounter=0;var I=r.entanglements,W=r.expirationTimes,se=r.hiddenUpdates;for(s=j&~s;0<s;){var xe=31-xt(s),ke=1<<xe;I[xe]=0,W[xe]=-1;var ce=se[xe];if(ce!==null)for(se[xe]=null,xe=0;xe<ce.length;xe++){var fe=ce[xe];fe!==null&&(fe.lane&=-536870913)}s&=~ke}d!==0&&vu(r,d,0),v!==0&&p===0&&r.tag!==0&&(r.suspendedLanes|=v&~(j&~i))}function vu(r,i,s){r.pendingLanes|=i,r.suspendedLanes&=~i;var d=31-xt(i);r.entangledLanes|=i,r.entanglements[d]=r.entanglements[d]|1073741824|s&261930}function al(r,i){var s=r.entangledLanes|=i;for(r=r.entanglements;s;){var d=31-xt(s),p=1<<d;p&i|r[d]&i&&(r[d]|=i),s&=~p}}function u0(r,i){var s=i&-i;return s=(s&42)!==0?1:to(s),(s&(r.suspendedLanes|i))!==0?0:s}function to(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 xu(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function bu(){var r=ge.p;return r!==0?r:(r=window.event,r===void 0?32:Iy(r.type))}function c0(r,i){var s=ge.p;try{return ge.p=r,i()}finally{ge.p=s}}var ka=Math.random().toString(36).slice(2),Nn="__reactFiber$"+ka,xn="__reactProps$"+ka,_r="__reactContainer$"+ka,_a="__reactEvents$"+ka,il="__reactListeners$"+ka,ll="__reactHandles$"+ka,no="__reactResources$"+ka,La="__reactMarker$"+ka;function wu(r){delete r[Nn],delete r[xn],delete r[_a],delete r[il],delete r[ll]}function ia(r){var i=r[Nn];if(i)return i;for(var s=r.parentNode;s;){if(i=s[_r]||s[Nn]){if(s=i.alternate,i.child!==null||s!==null&&s.child!==null)for(r=xy(r);r!==null;){if(s=r[Nn])return s;r=xy(r)}return i}r=s,s=r.parentNode}return null}function Ba(r){if(r=r[Nn]||r[_r]){var i=r.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return r}return null}function mi(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r.stateNode;throw Error(a(33))}function Sa(r){var i=r[no];return i||(i=r[no]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function tn(r){r[La]=!0}var d0=new Set,ku={};function Hn(r,i){qa(r,i),qa(r+"Capture",i)}function qa(r,i){for(ku[r]=i,r=0;r<i.length;r++)d0.add(i[r])}var Mn=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]*$"),Su={},f0={};function h0(r){return er.call(f0,r)?!0:er.call(Su,r)?!1:Mn.test(r)?f0[r]=!0:(Su[r]=!0,!1)}function sl(r,i,s){if(h0(i))if(s===null)r.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":r.removeAttribute(i);return;case"boolean":var d=i.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){r.removeAttribute(i);return}}r.setAttribute(i,""+s)}}function is(r,i,s){if(s===null)r.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(i);return}r.setAttribute(i,""+s)}}function tr(r,i,s,d){if(d===null)r.removeAttribute(s);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(s);return}r.setAttributeNS(i,s,""+d)}}function gr(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function ro(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function Ua(r,i,s){var d=Object.getOwnPropertyDescriptor(r.constructor.prototype,i);if(!r.hasOwnProperty(i)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var p=d.get,v=d.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return p.call(this)},set:function(j){s=""+j,v.call(this,j)}}),Object.defineProperty(r,i,{enumerable:d.enumerable}),{getValue:function(){return s},setValue:function(j){s=""+j},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function ja(r){if(!r._valueTracker){var i=ro(r)?"checked":"value";r._valueTracker=Ua(r,i,""+r[i])}}function m0(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var s=i.getValue(),d="";return r&&(d=ro(r)?r.checked?"true":"false":r.value),r=d,r!==s?(i.setValue(r),!0):!1}function Ha(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 ls=/[\n"\\]/g;function nr(r){return r.replace(ls,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Lr(r,i,s,d,p,v,j,I){r.name="",j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?r.type=j:r.removeAttribute("type"),i!=null?j==="number"?(i===0&&r.value===""||r.value!=i)&&(r.value=""+gr(i)):r.value!==""+gr(i)&&(r.value=""+gr(i)):j!=="submit"&&j!=="reset"||r.removeAttribute("value"),i!=null?la(r,j,gr(i)):s!=null?la(r,j,gr(s)):d!=null&&r.removeAttribute("value"),p==null&&v!=null&&(r.defaultChecked=!!v),p!=null&&(r.checked=p&&typeof p!="function"&&typeof p!="symbol"),I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"?r.name=""+gr(I):r.removeAttribute("name")}function Br(r,i,s,d,p,v,j,I){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(r.type=v),i!=null||s!=null){if(!(v!=="submit"&&v!=="reset"||i!=null)){ja(r);return}s=s!=null?""+gr(s):"",i=i!=null?""+gr(i):s,I||i===r.value||(r.value=i),r.defaultValue=i}d=d??p,d=typeof d!="function"&&typeof d!="symbol"&&!!d,r.checked=I?r.checked:!!d,r.defaultChecked=!!d,j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"&&(r.name=j),ja(r)}function la(r,i,s){i==="number"&&Ha(r.ownerDocument)===r||r.defaultValue===""+s||(r.defaultValue=""+s)}function pi(r,i,s,d){if(r=r.options,i){i={};for(var p=0;p<s.length;p++)i["$"+s[p]]=!0;for(s=0;s<r.length;s++)p=i.hasOwnProperty("$"+r[s].value),r[s].selected!==p&&(r[s].selected=p),p&&d&&(r[s].defaultSelected=!0)}else{for(s=""+gr(s),i=null,p=0;p<r.length;p++){if(r[p].value===s){r[p].selected=!0,d&&(r[p].defaultSelected=!0);return}i!==null||r[p].disabled||(i=r[p])}i!==null&&(i.selected=!0)}}function ol(r,i,s){if(i!=null&&(i=""+gr(i),i!==r.value&&(r.value=i),s==null)){r.defaultValue!==i&&(r.defaultValue=i);return}r.defaultValue=s!=null?""+gr(s):""}function ju(r,i,s,d){if(i==null){if(d!=null){if(s!=null)throw Error(a(92));if(pe(d)){if(1<d.length)throw Error(a(93));d=d[0]}s=d}s==null&&(s=""),i=s}s=gr(i),r.defaultValue=s,d=r.textContent,d===s&&d!==""&&d!==null&&(r.value=d),ja(r)}function Ca(r,i){if(i){var s=r.firstChild;if(s&&s===r.lastChild&&s.nodeType===3){s.nodeValue=i;return}}r.textContent=i}var Uf=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 ul(r,i,s){var d=i.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?d?r.setProperty(i,""):i==="float"?r.cssFloat="":r[i]="":d?r.setProperty(i,s):typeof s!="number"||s===0||Uf.has(i)?i==="float"?r.cssFloat=s:r[i]=(""+s).trim():r[i]=s+"px"}function gi(r,i,s){if(i!=null&&typeof i!="object")throw Error(a(62));if(r=r.style,s!=null){for(var d in s)!s.hasOwnProperty(d)||i!=null&&i.hasOwnProperty(d)||(d.indexOf("--")===0?r.setProperty(d,""):d==="float"?r.cssFloat="":r[d]="");for(var p in i)d=i[p],i.hasOwnProperty(p)&&s[p]!==d&&ul(r,p,d)}else for(var v in i)i.hasOwnProperty(v)&&ul(r,v,i[v])}function ss(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 ao=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"]]),p0=/^[\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 $a(r){return p0.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function bn(){}var qr=null;function os(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var sa=null,oa=null;function io(r){var i=Ba(r);if(i&&(r=i.stateNode)){var s=r[xn]||null;e:switch(r=i.stateNode,i.type){case"input":if(Lr(r,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),i=s.name,s.type==="radio"&&i!=null){for(s=r;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+nr(""+i)+'"][type="radio"]'),i=0;i<s.length;i++){var d=s[i];if(d!==r&&d.form===r.form){var p=d[xn]||null;if(!p)throw Error(a(90));Lr(d,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(i=0;i<s.length;i++)d=s[i],d.form===r.form&&m0(d)}break e;case"textarea":ol(r,s.value,s.defaultValue);break e;case"select":i=s.value,i!=null&&pi(r,!!s.multiple,i,!1)}}}var nn=!1;function cl(r,i,s){if(nn)return r(i,s);nn=!0;try{var d=r(i);return d}finally{if(nn=!1,(sa!==null||oa!==null)&&(ed(),sa&&(i=sa,r=oa,oa=sa=null,io(i),r)))for(i=0;i<r.length;i++)io(r[i])}}function us(r,i){var s=r.stateNode;if(s===null)return null;var d=s[xn]||null;if(d===null)return null;s=d[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(r=r.type,d=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!d;break e;default:r=!1}if(r)return null;if(s&&typeof s!="function")throw Error(a(231,i,typeof s));return s}var Ur=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cs=!1;if(Ur)try{var ds={};Object.defineProperty(ds,"passive",{get:function(){cs=!0}}),window.addEventListener("test",ds,ds),window.removeEventListener("test",ds,ds)}catch{cs=!1}var rr=null,Cu=null,lo=null;function g0(){if(lo)return lo;var r,i=Cu,s=i.length,d,p="value"in rr?rr.value:rr.textContent,v=p.length;for(r=0;r<s&&i[r]===p[r];r++);var j=s-r;for(d=1;d<=j&&i[s-d]===p[v-d];d++);return lo=p.slice(r,1<d?1-d:void 0)}function fs(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 Fa(){return!0}function Tu(){return!1}function $n(r){function i(s,d,p,v,j){this._reactName=s,this._targetInst=p,this.type=d,this.nativeEvent=v,this.target=j,this.currentTarget=null;for(var I in r)r.hasOwnProperty(I)&&(s=r[I],this[I]=s?s(v):v[I]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?Fa:Tu,this.isPropagationStopped=Tu,this}return y(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Fa)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Fa)},persist:function(){},isPersistent:Fa}),i}var yr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ta=$n(yr),dl=y({},yr,{view:0,detail:0}),yi=$n(dl),Au,vi,xi,bi=y({},dl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ga,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!==xi&&(xi&&r.type==="mousemove"?(Au=r.screenX-xi.screenX,vi=r.screenY-xi.screenY):vi=Au=0,xi=r),Au)},movementY:function(r){return"movementY"in r?r.movementY:vi}}),so=$n(bi),Eu=y({},bi,{dataTransfer:0}),Aa=$n(Eu),Pa=y({},dl,{relatedTarget:0}),oo=$n(Pa),hs=y({},yr,{animationName:0,elapsedTime:0,pseudoElement:0}),ms=$n(hs),uo=y({},yr,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),co=$n(uo),ps=y({},yr,{data:0}),wi=$n(ps),fl={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cn={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"},ar={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vr(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=ar[r])?!!i[r]:!1}function Ga(){return vr}var gs=y({},dl,{key:function(r){if(r.key){var i=fl[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=fs(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?cn[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ga,charCode:function(r){return r.type==="keypress"?fs(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?fs(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),fo=$n(gs),ho=y({},bi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ys=$n(ho),mo=y({},dl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ga}),Nu=$n(mo),Mu=y({},yr,{propertyName:0,elapsedTime:0,pseudoElement:0}),po=$n(Mu),Be=y({},bi,{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}),y0=$n(Be),ua=y({},yr,{newState:0,oldState:0}),pn=$n(ua),Du=[9,13,27,32],Ea=Ur&&"CompositionEvent"in window,Va=null;Ur&&"documentMode"in document&&(Va=document.documentMode);var Tt=Ur&&"TextEvent"in window&&!Va,ki=Ur&&(!Ea||Va&&8<Va&&11>=Va),vs=" ",hl=!1;function ml(r,i){switch(r){case"keyup":return Du.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function go(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var xr=!1;function Hf(r,i){switch(r){case"compositionend":return go(i);case"keypress":return i.which!==32?null:(hl=!0,vs);case"textInput":return r=i.data,r===vs&&hl?null:r;default:return null}}function $f(r,i){if(xr)return r==="compositionend"||!Ea&&ml(r,i)?(r=g0(),lo=Cu=rr=null,xr=!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 ki&&i.locale!=="ko"?null:i.data;default:return null}}var xs={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 zu(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!xs[r.type]:i==="textarea"}function yo(r,i,s,d){sa?oa?oa.push(d):oa=[d]:sa=d,i=sd(i,"onChange"),0<i.length&&(s=new Ta("onChange","change",null,s,d),r.push({event:s,listeners:i}))}var Si=null,Ya=null;function Ff(r){iy(r,0)}function bs(r){var i=mi(r);if(m0(i))return r}function vo(r,i){if(r==="change")return i}var ws=!1;if(Ur){var Ru;if(Ur){var ji="oninput"in document;if(!ji){var v0=document.createElement("div");v0.setAttribute("oninput","return;"),ji=typeof v0.oninput=="function"}Ru=ji}else Ru=!1;ws=Ru&&(!document.documentMode||9<document.documentMode)}function xo(){Si&&(Si.detachEvent("onpropertychange",ks),Ya=Si=null)}function ks(r){if(r.propertyName==="value"&&bs(Ya)){var i=[];yo(i,Ya,r,os(r)),cl(Ff,i)}}function Pf(r,i,s){r==="focusin"?(xo(),Si=i,Ya=s,Si.attachEvent("onpropertychange",ks)):r==="focusout"&&xo()}function Ou(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return bs(Ya)}function Wa(r,i){if(r==="click")return bs(i)}function Ss(r,i){if(r==="input"||r==="change")return bs(i)}function Ze(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var Dn=typeof Object.is=="function"?Object.is:Ze;function ca(r,i){if(Dn(r,i))return!0;if(typeof r!="object"||r===null||typeof i!="object"||i===null)return!1;var s=Object.keys(r),d=Object.keys(i);if(s.length!==d.length)return!1;for(d=0;d<s.length;d++){var p=s[d];if(!er.call(i,p)||!Dn(r[p],i[p]))return!1}return!0}function Iu(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function bo(r,i){var s=Iu(r);r=0;for(var d;s;){if(s.nodeType===3){if(d=r+s.textContent.length,r<=i&&d>=i)return{node:s,offset:i-r};r=d}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Iu(s)}}function wo(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?wo(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function x0(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var i=Ha(r.document);i instanceof r.HTMLIFrameElement;){try{var s=typeof i.contentWindow.location.href=="string"}catch{s=!1}if(s)r=i.contentWindow;else break;i=Ha(r.document)}return i}function Fn(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 Gf=Ur&&"documentMode"in document&&11>=document.documentMode,pl=null,ko=null,js=null,So=!1;function jo(r,i,s){var d=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;So||pl==null||pl!==Ha(d)||(d=pl,"selectionStart"in d&&Fn(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),js&&ca(js,d)||(js=d,d=sd(ko,"onSelect"),0<d.length&&(i=new Ta("onSelect","select",null,i,s),r.push({event:i,listeners:d}),i.target=pl)))}function Ci(r,i){var s={};return s[r.toLowerCase()]=i.toLowerCase(),s["Webkit"+r]="webkit"+i,s["Moz"+r]="moz"+i,s}var gl={animationend:Ci("Animation","AnimationEnd"),animationiteration:Ci("Animation","AnimationIteration"),animationstart:Ci("Animation","AnimationStart"),transitionrun:Ci("Transition","TransitionRun"),transitionstart:Ci("Transition","TransitionStart"),transitioncancel:Ci("Transition","TransitionCancel"),transitionend:Ci("Transition","TransitionEnd")},yl={},Co={};Ur&&(Co=document.createElement("div").style,"AnimationEvent"in window||(delete gl.animationend.animation,delete gl.animationiteration.animation,delete gl.animationstart.animation),"TransitionEvent"in window||delete gl.transitionend.transition);function Na(r){if(yl[r])return yl[r];if(!gl[r])return r;var i=gl[r],s;for(s in i)if(i.hasOwnProperty(s)&&s in Co)return yl[r]=i[s];return r}var b0=Na("animationend"),To=Na("animationiteration"),w0=Na("animationstart"),Vf=Na("transitionrun"),_u=Na("transitionstart"),k0=Na("transitioncancel"),Lu=Na("transitionend"),S0=new Map,Ao="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(" ");Ao.push("scrollEnd");function Hr(r,i){S0.set(r,i),Hn(i,[r])}var Eo=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)},br=[],vl=0,Bu=0;function No(){for(var r=vl,i=Bu=vl=0;i<r;){var s=br[i];br[i++]=null;var d=br[i];br[i++]=null;var p=br[i];br[i++]=null;var v=br[i];if(br[i++]=null,d!==null&&p!==null){var j=d.pending;j===null?p.next=p:(p.next=j.next,j.next=p),d.pending=p}v!==0&&j0(s,p,v)}}function Mo(r,i,s,d){br[vl++]=r,br[vl++]=i,br[vl++]=s,br[vl++]=d,Bu|=d,r.lanes|=d,r=r.alternate,r!==null&&(r.lanes|=d)}function qu(r,i,s,d){return Mo(r,i,s,d),Do(r)}function Ti(r,i){return Mo(r,null,null,i),Do(r)}function j0(r,i,s){r.lanes|=s;var d=r.alternate;d!==null&&(d.lanes|=s);for(var p=!1,v=r.return;v!==null;)v.childLanes|=s,d=v.alternate,d!==null&&(d.childLanes|=s),v.tag===22&&(r=v.stateNode,r===null||r._visibility&1||(p=!0)),r=v,v=v.return;return r.tag===3?(v=r.stateNode,p&&i!==null&&(p=31-xt(s),r=v.hiddenUpdates,d=r[p],d===null?r[p]=[i]:d.push(i),i.lane=s|536870912),v):null}function Do(r){if(50<mc)throw mc=0,Uh=null,Error(a(185));for(var i=r.return;i!==null;)r=i,i=r.return;return r.tag===3?r.stateNode:null}var xl={};function Yf(r,i,s,d){this.tag=r,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ir(r,i,s,d){return new Yf(r,i,s,d)}function Uu(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Ma(r,i){var s=r.alternate;return s===null?(s=ir(r.tag,i,r.key,r.mode),s.elementType=r.elementType,s.type=r.type,s.stateNode=r.stateNode,s.alternate=r,r.alternate=s):(s.pendingProps=i,s.type=r.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=r.flags&65011712,s.childLanes=r.childLanes,s.lanes=r.lanes,s.child=r.child,s.memoizedProps=r.memoizedProps,s.memoizedState=r.memoizedState,s.updateQueue=r.updateQueue,i=r.dependencies,s.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},s.sibling=r.sibling,s.index=r.index,s.ref=r.ref,s.refCleanup=r.refCleanup,s}function C0(r,i){r.flags&=65011714;var s=r.alternate;return s===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=s.childLanes,r.lanes=s.lanes,r.child=s.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=s.memoizedProps,r.memoizedState=s.memoizedState,r.updateQueue=s.updateQueue,r.type=s.type,i=s.dependencies,r.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),r}function zo(r,i,s,d,p,v){var j=0;if(d=r,typeof r=="function")Uu(r)&&(j=1);else if(typeof r=="string")j=u7(r,s,te.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case J:return r=ir(31,s,i,p),r.elementType=J,r.lanes=v,r;case D:return Ka(s.children,p,v,i);case R:j=8,p|=24;break;case O:return r=ir(12,s,i,p|2),r.elementType=O,r.lanes=v,r;case K:return r=ir(13,s,i,p),r.elementType=K,r.lanes=v,r;case P:return r=ir(19,s,i,p),r.elementType=P,r.lanes=v,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case q:j=10;break e;case M:j=9;break e;case L:j=11;break e;case H:j=14;break e;case X:j=16,d=null;break e}j=29,s=Error(a(130,r===null?"null":typeof r,"")),d=null}return i=ir(j,s,i,p),i.elementType=r,i.type=d,i.lanes=v,i}function Ka(r,i,s,d){return r=ir(7,r,d,i),r.lanes=s,r}function wr(r,i,s){return r=ir(6,r,null,i),r.lanes=s,r}function Hu(r){var i=ir(18,null,null,0);return i.stateNode=r,i}function $u(r,i,s){return i=ir(4,r.children!==null?r.children:[],r.key,i),i.lanes=s,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}var T0=new WeakMap;function kr(r,i){if(typeof r=="object"&&r!==null){var s=T0.get(r);return s!==void 0?s:(i={value:r,source:i,stack:Jn(i)},T0.set(r,i),i)}return{value:r,source:i,stack:Jn(i)}}var Ai=[],bl=0,wl=null,Cs=0,lr=[],sr=0,Xa=null,da=1,fa="";function Yn(r,i){Ai[bl++]=Cs,Ai[bl++]=wl,wl=r,Cs=i}function Ts(r,i,s){lr[sr++]=da,lr[sr++]=fa,lr[sr++]=Xa,Xa=r;var d=da;r=fa;var p=32-xt(d)-1;d&=~(1<<p),s+=1;var v=32-xt(i)+p;if(30<v){var j=p-p%5;v=(d&(1<<j)-1).toString(32),d>>=j,p-=j,da=1<<32-xt(i)+p|s<<p|d,fa=v+r}else da=1<<v|s<<p|d,fa=r}function Fu(r){r.return!==null&&(Yn(r,1),Ts(r,1,0))}function Ro(r){for(;r===wl;)wl=Ai[--bl],Ai[bl]=null,Cs=Ai[--bl],Ai[bl]=null;for(;r===Xa;)Xa=lr[--sr],lr[sr]=null,fa=lr[--sr],lr[sr]=null,da=lr[--sr],lr[sr]=null}function Pu(r,i){lr[sr++]=da,lr[sr++]=fa,lr[sr++]=Xa,da=i.id,fa=i.overflow,Xa=r}var zn=null,Ht=null,wt=!1,Za=null,Sr=!1,Gu=Error(a(519));function Qa(r){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw As(kr(i,r)),Gu}function A0(r){var i=r.stateNode,s=r.type,d=r.memoizedProps;switch(i[Nn]=r,i[xn]=d,s){case"dialog":St("cancel",i),St("close",i);break;case"iframe":case"object":case"embed":St("load",i);break;case"video":case"audio":for(s=0;s<gc.length;s++)St(gc[s],i);break;case"source":St("error",i);break;case"img":case"image":case"link":St("error",i),St("load",i);break;case"details":St("toggle",i);break;case"input":St("invalid",i),Br(i,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"select":St("invalid",i);break;case"textarea":St("invalid",i),ju(i,d.value,d.defaultValue,d.children)}s=d.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||i.textContent===""+s||d.suppressHydrationWarning===!0||uy(i.textContent,s)?(d.popover!=null&&(St("beforetoggle",i),St("toggle",i)),d.onScroll!=null&&St("scroll",i),d.onScrollEnd!=null&&St("scrollend",i),d.onClick!=null&&(i.onclick=bn),i=!0):i=!1,i||Qa(r,!0)}function E0(r){for(zn=r.return;zn;)switch(zn.tag){case 5:case 31:case 13:Sr=!1;return;case 27:case 3:Sr=!0;return;default:zn=zn.return}}function kl(r){if(r!==zn)return!1;if(!wt)return E0(r),wt=!0,!1;var i=r.tag,s;if((s=i!==3&&i!==27)&&((s=i===5)&&(s=r.type,s=!(s!=="form"&&s!=="button")||tm(r.type,r.memoizedProps)),s=!s),s&&Ht&&Qa(r),E0(r),i===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));Ht=vy(r)}else if(i===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));Ht=vy(r)}else i===27?(i=Ht,Ll(r.type)?(r=lm,lm=null,Ht=r):Ht=i):Ht=zn?pa(r.stateNode.nextSibling):null;return!0}function Ei(){Ht=zn=null,wt=!1}function Vu(){var r=Za;return r!==null&&(Nr===null?Nr=r:Nr.push.apply(Nr,r),Za=null),r}function As(r){Za===null?Za=[r]:Za.push(r)}var Yu=B(null),Ni=null,jr=null;function Ja(r,i,s){z(Yu,i._currentValue),i._currentValue=s}function $r(r){r._currentValue=Yu.current,ee(Yu)}function Wu(r,i,s){for(;r!==null;){var d=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,d!==null&&(d.childLanes|=i)):d!==null&&(d.childLanes&i)!==i&&(d.childLanes|=i),r===s)break;r=r.return}}function Ku(r,i,s,d){var p=r.child;for(p!==null&&(p.return=r);p!==null;){var v=p.dependencies;if(v!==null){var j=p.child;v=v.firstContext;e:for(;v!==null;){var I=v;v=p;for(var W=0;W<i.length;W++)if(I.context===i[W]){v.lanes|=s,I=v.alternate,I!==null&&(I.lanes|=s),Wu(v.return,s,r),d||(j=null);break e}v=I.next}}else if(p.tag===18){if(j=p.return,j===null)throw Error(a(341));j.lanes|=s,v=j.alternate,v!==null&&(v.lanes|=s),Wu(j,s,r),j=null}else j=p.child;if(j!==null)j.return=p;else for(j=p;j!==null;){if(j===r){j=null;break}if(p=j.sibling,p!==null){p.return=j.return,j=p;break}j=j.return}p=j}}function ha(r,i,s,d){r=null;for(var p=i,v=!1;p!==null;){if(!v){if((p.flags&524288)!==0)v=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var j=p.alternate;if(j===null)throw Error(a(387));if(j=j.memoizedProps,j!==null){var I=p.type;Dn(p.pendingProps.value,j.value)||(r!==null?r.push(I):r=[I])}}else if(p===He.current){if(j=p.alternate,j===null)throw Error(a(387));j.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(r!==null?r.push(wc):r=[wc])}p=p.return}r!==null&&Ku(i,r,s,d),i.flags|=262144}function Oo(r){for(r=r.firstContext;r!==null;){if(!Dn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function or(r){Ni=r,jr=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function gn(r){return Xu(Ni,r)}function Es(r,i){return Ni===null&&or(r),Xu(r,i)}function Xu(r,i){var s=i._currentValue;if(i={context:i,memoizedValue:s,next:null},jr===null){if(r===null)throw Error(a(308));jr=i,r.dependencies={lanes:0,firstContext:i},r.flags|=524288}else jr=jr.next=i;return s}var Zu=typeof AbortController<"u"?AbortController:function(){var r=[],i=this.signal={aborted:!1,addEventListener:function(s,d){r.push(d)}};this.abort=function(){i.aborted=!0,r.forEach(function(s){return s()})}},Qu=e.unstable_scheduleCallback,Wf=e.unstable_NormalPriority,dn={$$typeof:q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ju(){return{controller:new Zu,data:new Map,refCount:0}}function Da(r){r.refCount--,r.refCount===0&&Qu(Wf,function(){r.controller.abort()})}var Ns=null,Io=0,Sl=0,Fr=null;function jl(r,i){if(Ns===null){var s=Ns=[];Io=0,Sl=Vh(),Fr={status:"pending",value:void 0,then:function(d){s.push(d)}}}return Io++,i.then(Mi,Mi),i}function Mi(){if(--Io===0&&Ns!==null){Fr!==null&&(Fr.status="fulfilled");var r=Ns;Ns=null,Sl=0,Fr=null;for(var i=0;i<r.length;i++)(0,r[i])()}}function Kf(r,i){var s=[],d={status:"pending",value:null,reason:null,then:function(p){s.push(p)}};return r.then(function(){d.status="fulfilled",d.value=i;for(var p=0;p<s.length;p++)(0,s[p])(i)},function(p){for(d.status="rejected",d.reason=p,p=0;p<s.length;p++)(0,s[p])(void 0)}),d}var N0=Z.S;Z.S=function(r,i){R4=Xt(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&jl(r,i),N0!==null&&N0(r,i)};var ei=B(null);function Rt(){var r=ei.current;return r!==null?r:Gt.pooledCache}function Pr(r,i){i===null?z(ei,ei.current):z(ei,i.pool)}function M0(){var r=Rt();return r===null?null:{parent:dn._currentValue,pool:r}}var Rn=Error(a(460)),ec=Error(a(474)),Cr=Error(a(542)),Ms={then:function(){}};function D0(r){return r=r.status,r==="fulfilled"||r==="rejected"}function _o(r,i,s){switch(s=r[s],s===void 0?r.push(i):s!==i&&(i.then(bn,bn),i=s),i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,tc(r),r;default:if(typeof i.status=="string")i.then(bn,bn);else{if(r=Gt,r!==null&&100<r.shellSuspendCounter)throw Error(a(482));r=i,r.status="pending",r.then(function(d){if(i.status==="pending"){var p=i;p.status="fulfilled",p.value=d}},function(d){if(i.status==="pending"){var p=i;p.status="rejected",p.reason=d}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,tc(r),r}throw zi=i,Rn}}function Di(r){try{var i=r._init;return i(r._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(zi=s,Rn):s}}var zi=null;function z0(){if(zi===null)throw Error(a(459));var r=zi;return zi=null,r}function tc(r){if(r===Rn||r===Cr)throw Error(a(483))}var Ri=null,Cl=0;function Ds(r){var i=Cl;return Cl+=1,Ri===null&&(Ri=[]),_o(Ri,r,i)}function Tl(r,i){i=i.props.ref,r.ref=i!==void 0?i:null}function b(r,i){throw i.$$typeof===k?Error(a(525)):(r=Object.prototype.toString.call(i),Error(a(31,r==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":r)))}function T(r){function i(ae,Q){if(r){var le=ae.deletions;le===null?(ae.deletions=[Q],ae.flags|=16):le.push(Q)}}function s(ae,Q){if(!r)return null;for(;Q!==null;)i(ae,Q),Q=Q.sibling;return null}function d(ae){for(var Q=new Map;ae!==null;)ae.key!==null?Q.set(ae.key,ae):Q.set(ae.index,ae),ae=ae.sibling;return Q}function p(ae,Q){return ae=Ma(ae,Q),ae.index=0,ae.sibling=null,ae}function v(ae,Q,le){return ae.index=le,r?(le=ae.alternate,le!==null?(le=le.index,le<Q?(ae.flags|=67108866,Q):le):(ae.flags|=67108866,Q)):(ae.flags|=1048576,Q)}function j(ae){return r&&ae.alternate===null&&(ae.flags|=67108866),ae}function I(ae,Q,le,we){return Q===null||Q.tag!==6?(Q=wr(le,ae.mode,we),Q.return=ae,Q):(Q=p(Q,le),Q.return=ae,Q)}function W(ae,Q,le,we){var at=le.type;return at===D?xe(ae,Q,le.props.children,we,le.key):Q!==null&&(Q.elementType===at||typeof at=="object"&&at!==null&&at.$$typeof===X&&Di(at)===Q.type)?(Q=p(Q,le.props),Tl(Q,le),Q.return=ae,Q):(Q=zo(le.type,le.key,le.props,null,ae.mode,we),Tl(Q,le),Q.return=ae,Q)}function se(ae,Q,le,we){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==le.containerInfo||Q.stateNode.implementation!==le.implementation?(Q=$u(le,ae.mode,we),Q.return=ae,Q):(Q=p(Q,le.children||[]),Q.return=ae,Q)}function xe(ae,Q,le,we,at){return Q===null||Q.tag!==7?(Q=Ka(le,ae.mode,we,at),Q.return=ae,Q):(Q=p(Q,le),Q.return=ae,Q)}function ke(ae,Q,le){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Q=wr(""+Q,ae.mode,le),Q.return=ae,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case x:return le=zo(Q.type,Q.key,Q.props,null,ae.mode,le),Tl(le,Q),le.return=ae,le;case C:return Q=$u(Q,ae.mode,le),Q.return=ae,Q;case X:return Q=Di(Q),ke(ae,Q,le)}if(pe(Q)||me(Q))return Q=Ka(Q,ae.mode,le,null),Q.return=ae,Q;if(typeof Q.then=="function")return ke(ae,Ds(Q),le);if(Q.$$typeof===q)return ke(ae,Es(ae,Q),le);b(ae,Q)}return null}function ce(ae,Q,le,we){var at=Q!==null?Q.key:null;if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return at!==null?null:I(ae,Q,""+le,we);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case x:return le.key===at?W(ae,Q,le,we):null;case C:return le.key===at?se(ae,Q,le,we):null;case X:return le=Di(le),ce(ae,Q,le,we)}if(pe(le)||me(le))return at!==null?null:xe(ae,Q,le,we,null);if(typeof le.then=="function")return ce(ae,Q,Ds(le),we);if(le.$$typeof===q)return ce(ae,Q,Es(ae,le),we);b(ae,le)}return null}function fe(ae,Q,le,we,at){if(typeof we=="string"&&we!==""||typeof we=="number"||typeof we=="bigint")return ae=ae.get(le)||null,I(Q,ae,""+we,at);if(typeof we=="object"&&we!==null){switch(we.$$typeof){case x:return ae=ae.get(we.key===null?le:we.key)||null,W(Q,ae,we,at);case C:return ae=ae.get(we.key===null?le:we.key)||null,se(Q,ae,we,at);case X:return we=Di(we),fe(ae,Q,le,we,at)}if(pe(we)||me(we))return ae=ae.get(le)||null,xe(Q,ae,we,at,null);if(typeof we.then=="function")return fe(ae,Q,le,Ds(we),at);if(we.$$typeof===q)return fe(ae,Q,le,Es(Q,we),at);b(Q,we)}return null}function Ke(ae,Q,le,we){for(var at=null,Dt=null,Qe=Q,yt=Q=0,Et=null;Qe!==null&&yt<le.length;yt++){Qe.index>yt?(Et=Qe,Qe=null):Et=Qe.sibling;var zt=ce(ae,Qe,le[yt],we);if(zt===null){Qe===null&&(Qe=Et);break}r&&Qe&&zt.alternate===null&&i(ae,Qe),Q=v(zt,Q,yt),Dt===null?at=zt:Dt.sibling=zt,Dt=zt,Qe=Et}if(yt===le.length)return s(ae,Qe),wt&&Yn(ae,yt),at;if(Qe===null){for(;yt<le.length;yt++)Qe=ke(ae,le[yt],we),Qe!==null&&(Q=v(Qe,Q,yt),Dt===null?at=Qe:Dt.sibling=Qe,Dt=Qe);return wt&&Yn(ae,yt),at}for(Qe=d(Qe);yt<le.length;yt++)Et=fe(Qe,ae,yt,le[yt],we),Et!==null&&(r&&Et.alternate!==null&&Qe.delete(Et.key===null?yt:Et.key),Q=v(Et,Q,yt),Dt===null?at=Et:Dt.sibling=Et,Dt=Et);return r&&Qe.forEach(function($l){return i(ae,$l)}),wt&&Yn(ae,yt),at}function ot(ae,Q,le,we){if(le==null)throw Error(a(151));for(var at=null,Dt=null,Qe=Q,yt=Q=0,Et=null,zt=le.next();Qe!==null&&!zt.done;yt++,zt=le.next()){Qe.index>yt?(Et=Qe,Qe=null):Et=Qe.sibling;var $l=ce(ae,Qe,zt.value,we);if($l===null){Qe===null&&(Qe=Et);break}r&&Qe&&$l.alternate===null&&i(ae,Qe),Q=v($l,Q,yt),Dt===null?at=$l:Dt.sibling=$l,Dt=$l,Qe=Et}if(zt.done)return s(ae,Qe),wt&&Yn(ae,yt),at;if(Qe===null){for(;!zt.done;yt++,zt=le.next())zt=ke(ae,zt.value,we),zt!==null&&(Q=v(zt,Q,yt),Dt===null?at=zt:Dt.sibling=zt,Dt=zt);return wt&&Yn(ae,yt),at}for(Qe=d(Qe);!zt.done;yt++,zt=le.next())zt=fe(Qe,ae,yt,zt.value,we),zt!==null&&(r&&zt.alternate!==null&&Qe.delete(zt.key===null?yt:zt.key),Q=v(zt,Q,yt),Dt===null?at=zt:Dt.sibling=zt,Dt=zt);return r&&Qe.forEach(function(b7){return i(ae,b7)}),wt&&Yn(ae,yt),at}function Pt(ae,Q,le,we){if(typeof le=="object"&&le!==null&&le.type===D&&le.key===null&&(le=le.props.children),typeof le=="object"&&le!==null){switch(le.$$typeof){case x:e:{for(var at=le.key;Q!==null;){if(Q.key===at){if(at=le.type,at===D){if(Q.tag===7){s(ae,Q.sibling),we=p(Q,le.props.children),we.return=ae,ae=we;break e}}else if(Q.elementType===at||typeof at=="object"&&at!==null&&at.$$typeof===X&&Di(at)===Q.type){s(ae,Q.sibling),we=p(Q,le.props),Tl(we,le),we.return=ae,ae=we;break e}s(ae,Q);break}else i(ae,Q);Q=Q.sibling}le.type===D?(we=Ka(le.props.children,ae.mode,we,le.key),we.return=ae,ae=we):(we=zo(le.type,le.key,le.props,null,ae.mode,we),Tl(we,le),we.return=ae,ae=we)}return j(ae);case C:e:{for(at=le.key;Q!==null;){if(Q.key===at)if(Q.tag===4&&Q.stateNode.containerInfo===le.containerInfo&&Q.stateNode.implementation===le.implementation){s(ae,Q.sibling),we=p(Q,le.children||[]),we.return=ae,ae=we;break e}else{s(ae,Q);break}else i(ae,Q);Q=Q.sibling}we=$u(le,ae.mode,we),we.return=ae,ae=we}return j(ae);case X:return le=Di(le),Pt(ae,Q,le,we)}if(pe(le))return Ke(ae,Q,le,we);if(me(le)){if(at=me(le),typeof at!="function")throw Error(a(150));return le=at.call(le),ot(ae,Q,le,we)}if(typeof le.then=="function")return Pt(ae,Q,Ds(le),we);if(le.$$typeof===q)return Pt(ae,Q,Es(ae,le),we);b(ae,le)}return typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint"?(le=""+le,Q!==null&&Q.tag===6?(s(ae,Q.sibling),we=p(Q,le),we.return=ae,ae=we):(s(ae,Q),we=wr(le,ae.mode,we),we.return=ae,ae=we),j(ae)):s(ae,Q)}return function(ae,Q,le,we){try{Cl=0;var at=Pt(ae,Q,le,we);return Ri=null,at}catch(Qe){if(Qe===Rn||Qe===Cr)throw Qe;var Dt=ir(29,Qe,null,ae.mode);return Dt.lanes=we,Dt.return=ae,Dt}finally{}}}var N=T(!0),$=T(!1),Y=!1;function ue(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Se(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 $e(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function De(r,i,s){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,(Ot&2)!==0){var p=d.pending;return p===null?i.next=i:(i.next=p.next,p.next=i),d.pending=i,i=Do(r),j0(r,null,s),i}return Mo(r,d,i,s),Do(r)}function st(r,i,s){if(i=i.updateQueue,i!==null&&(i=i.shared,(s&4194048)!==0)){var d=i.lanes;d&=r.pendingLanes,s|=d,i.lanes=s,al(r,s)}}function tt(r,i){var s=r.updateQueue,d=r.alternate;if(d!==null&&(d=d.updateQueue,s===d)){var p=null,v=null;if(s=s.firstBaseUpdate,s!==null){do{var j={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};v===null?p=v=j:v=v.next=j,s=s.next}while(s!==null);v===null?p=v=i:v=v.next=i}else p=v=i;s={baseState:d.baseState,firstBaseUpdate:p,lastBaseUpdate:v,shared:d.shared,callbacks:d.callbacks},r.updateQueue=s;return}r=s.lastBaseUpdate,r===null?s.firstBaseUpdate=i:r.next=i,s.lastBaseUpdate=i}var Lt=!1;function wn(){if(Lt){var r=Fr;if(r!==null)throw r}}function Al(r,i,s,d){Lt=!1;var p=r.updateQueue;Y=!1;var v=p.firstBaseUpdate,j=p.lastBaseUpdate,I=p.shared.pending;if(I!==null){p.shared.pending=null;var W=I,se=W.next;W.next=null,j===null?v=se:j.next=se,j=W;var xe=r.alternate;xe!==null&&(xe=xe.updateQueue,I=xe.lastBaseUpdate,I!==j&&(I===null?xe.firstBaseUpdate=se:I.next=se,xe.lastBaseUpdate=W))}if(v!==null){var ke=p.baseState;j=0,xe=se=W=null,I=v;do{var ce=I.lane&-536870913,fe=ce!==I.lane;if(fe?(At&ce)===ce:(d&ce)===ce){ce!==0&&ce===Sl&&(Lt=!0),xe!==null&&(xe=xe.next={lane:0,tag:I.tag,payload:I.payload,callback:null,next:null});e:{var Ke=r,ot=I;ce=i;var Pt=s;switch(ot.tag){case 1:if(Ke=ot.payload,typeof Ke=="function"){ke=Ke.call(Pt,ke,ce);break e}ke=Ke;break e;case 3:Ke.flags=Ke.flags&-65537|128;case 0:if(Ke=ot.payload,ce=typeof Ke=="function"?Ke.call(Pt,ke,ce):Ke,ce==null)break e;ke=y({},ke,ce);break e;case 2:Y=!0}}ce=I.callback,ce!==null&&(r.flags|=64,fe&&(r.flags|=8192),fe=p.callbacks,fe===null?p.callbacks=[ce]:fe.push(ce))}else fe={lane:ce,tag:I.tag,payload:I.payload,callback:I.callback,next:null},xe===null?(se=xe=fe,W=ke):xe=xe.next=fe,j|=ce;if(I=I.next,I===null){if(I=p.shared.pending,I===null)break;fe=I,I=fe.next,fe.next=null,p.lastBaseUpdate=fe,p.shared.pending=null}}while(!0);xe===null&&(W=ke),p.baseState=W,p.firstBaseUpdate=se,p.lastBaseUpdate=xe,v===null&&(p.shared.lanes=0),zl|=j,r.lanes=j,r.memoizedState=ke}}function ag(r,i){if(typeof r!="function")throw Error(a(191,r));r.call(i)}function ig(r,i){var s=r.callbacks;if(s!==null)for(r.callbacks=null,r=0;r<s.length;r++)ag(s[r],i)}var Lo=B(null),R0=B(0);function lg(r,i){r=$i,z(R0,r),z(Lo,i),$i=r|i.baseLanes}function Xf(){z(R0,$i),z(Lo,Lo.current)}function Zf(){$i=R0.current,ee(Lo),ee(R0)}var Gr=B(null),ma=null;function El(r){var i=r.alternate;z(yn,yn.current&1),z(Gr,r),ma===null&&(i===null||Lo.current!==null||i.memoizedState!==null)&&(ma=r)}function Qf(r){z(yn,yn.current),z(Gr,r),ma===null&&(ma=r)}function sg(r){r.tag===22?(z(yn,yn.current),z(Gr,r),ma===null&&(ma=r)):Nl()}function Nl(){z(yn,yn.current),z(Gr,Gr.current)}function Vr(r){ee(Gr),ma===r&&(ma=null),ee(yn)}var yn=B(0);function O0(r){for(var i=r;i!==null;){if(i.tag===13){var s=i.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||am(s)||im(s)))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 Oi=0,pt=null,$t=null,kn=null,I0=!1,Bo=!1,zs=!1,_0=0,nc=0,qo=null,cb=0;function fn(){throw Error(a(321))}function Jf(r,i){if(i===null)return!1;for(var s=0;s<i.length&&s<r.length;s++)if(!Dn(r[s],i[s]))return!1;return!0}function eh(r,i,s,d,p,v){return Oi=v,pt=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,Z.H=r===null||r.memoizedState===null?Pg:ph,zs=!1,v=s(d,p),zs=!1,Bo&&(v=ug(i,s,d,p)),og(r),v}function og(r){Z.H=ic;var i=$t!==null&&$t.next!==null;if(Oi=0,kn=$t=pt=null,I0=!1,nc=0,qo=null,i)throw Error(a(300));r===null||Sn||(r=r.dependencies,r!==null&&Oo(r)&&(Sn=!0))}function ug(r,i,s,d){pt=r;var p=0;do{if(Bo&&(qo=null),nc=0,Bo=!1,25<=p)throw Error(a(301));if(p+=1,kn=$t=null,r.updateQueue!=null){var v=r.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}Z.H=Gg,v=i(s,d)}while(Bo);return v}function db(){var r=Z.H,i=r.useState()[0];return i=typeof i.then=="function"?rc(i):i,r=r.useState()[0],($t!==null?$t.memoizedState:null)!==r&&(pt.flags|=1024),i}function th(){var r=_0!==0;return _0=0,r}function nh(r,i,s){i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~s}function rh(r){if(I0){for(r=r.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}I0=!1}Oi=0,kn=$t=pt=null,Bo=!1,nc=_0=0,qo=null}function ur(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return kn===null?pt.memoizedState=kn=r:kn=kn.next=r,kn}function vn(){if($t===null){var r=pt.alternate;r=r!==null?r.memoizedState:null}else r=$t.next;var i=kn===null?pt.memoizedState:kn.next;if(i!==null)kn=i,$t=r;else{if(r===null)throw pt.alternate===null?Error(a(467)):Error(a(310));$t=r,r={memoizedState:$t.memoizedState,baseState:$t.baseState,baseQueue:$t.baseQueue,queue:$t.queue,next:null},kn===null?pt.memoizedState=kn=r:kn=kn.next=r}return kn}function L0(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function rc(r){var i=nc;return nc+=1,qo===null&&(qo=[]),r=_o(qo,r,i),i=pt,(kn===null?i.memoizedState:kn.next)===null&&(i=i.alternate,Z.H=i===null||i.memoizedState===null?Pg:ph),r}function B0(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return rc(r);if(r.$$typeof===q)return gn(r)}throw Error(a(438,String(r)))}function ah(r){var i=null,s=pt.updateQueue;if(s!==null&&(i=s.memoCache),i==null){var d=pt.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(i={data:d.data.map(function(p){return p.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),s===null&&(s=L0(),pt.updateQueue=s),s.memoCache=i,s=i.data[i.index],s===void 0)for(s=i.data[i.index]=Array(r),d=0;d<r;d++)s[d]=F;return i.index++,s}function Ii(r,i){return typeof i=="function"?i(r):i}function q0(r){var i=vn();return ih(i,$t,r)}function ih(r,i,s){var d=r.queue;if(d===null)throw Error(a(311));d.lastRenderedReducer=s;var p=r.baseQueue,v=d.pending;if(v!==null){if(p!==null){var j=p.next;p.next=v.next,v.next=j}i.baseQueue=p=v,d.pending=null}if(v=r.baseState,p===null)r.memoizedState=v;else{i=p.next;var I=j=null,W=null,se=i,xe=!1;do{var ke=se.lane&-536870913;if(ke!==se.lane?(At&ke)===ke:(Oi&ke)===ke){var ce=se.revertLane;if(ce===0)W!==null&&(W=W.next={lane:0,revertLane:0,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null}),ke===Sl&&(xe=!0);else if((Oi&ce)===ce){se=se.next,ce===Sl&&(xe=!0);continue}else ke={lane:0,revertLane:se.revertLane,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},W===null?(I=W=ke,j=v):W=W.next=ke,pt.lanes|=ce,zl|=ce;ke=se.action,zs&&s(v,ke),v=se.hasEagerState?se.eagerState:s(v,ke)}else ce={lane:ke,revertLane:se.revertLane,gesture:se.gesture,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},W===null?(I=W=ce,j=v):W=W.next=ce,pt.lanes|=ke,zl|=ke;se=se.next}while(se!==null&&se!==i);if(W===null?j=v:W.next=I,!Dn(v,r.memoizedState)&&(Sn=!0,xe&&(s=Fr,s!==null)))throw s;r.memoizedState=v,r.baseState=j,r.baseQueue=W,d.lastRenderedState=v}return p===null&&(d.lanes=0),[r.memoizedState,d.dispatch]}function lh(r){var i=vn(),s=i.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=r;var d=s.dispatch,p=s.pending,v=i.memoizedState;if(p!==null){s.pending=null;var j=p=p.next;do v=r(v,j.action),j=j.next;while(j!==p);Dn(v,i.memoizedState)||(Sn=!0),i.memoizedState=v,i.baseQueue===null&&(i.baseState=v),s.lastRenderedState=v}return[v,d]}function cg(r,i,s){var d=pt,p=vn(),v=wt;if(v){if(s===void 0)throw Error(a(407));s=s()}else s=i();var j=!Dn(($t||p).memoizedState,s);if(j&&(p.memoizedState=s,Sn=!0),p=p.queue,uh(hg.bind(null,d,p,r),[r]),p.getSnapshot!==i||j||kn!==null&&kn.memoizedState.tag&1){if(d.flags|=2048,Uo(9,{destroy:void 0},fg.bind(null,d,p,s,i),null),Gt===null)throw Error(a(349));v||(Oi&127)!==0||dg(d,i,s)}return s}function dg(r,i,s){r.flags|=16384,r={getSnapshot:i,value:s},i=pt.updateQueue,i===null?(i=L0(),pt.updateQueue=i,i.stores=[r]):(s=i.stores,s===null?i.stores=[r]:s.push(r))}function fg(r,i,s,d){i.value=s,i.getSnapshot=d,mg(i)&&pg(r)}function hg(r,i,s){return s(function(){mg(i)&&pg(r)})}function mg(r){var i=r.getSnapshot;r=r.value;try{var s=i();return!Dn(r,s)}catch{return!0}}function pg(r){var i=Ti(r,2);i!==null&&Mr(i,r,2)}function sh(r){var i=ur();if(typeof r=="function"){var s=r;if(r=s(),zs){nt(!0);try{s()}finally{nt(!1)}}}return i.memoizedState=i.baseState=r,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ii,lastRenderedState:r},i}function gg(r,i,s,d){return r.baseState=s,ih(r,$t,typeof d=="function"?d:Ii)}function fb(r,i,s,d,p){if($0(r))throw Error(a(485));if(r=i.action,r!==null){var v={payload:p,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(j){v.listeners.push(j)}};Z.T!==null?s(!0):v.isTransition=!1,d(v),s=i.pending,s===null?(v.next=i.pending=v,yg(i,v)):(v.next=s.next,i.pending=s.next=v)}}function yg(r,i){var s=i.action,d=i.payload,p=r.state;if(i.isTransition){var v=Z.T,j={};Z.T=j;try{var I=s(p,d),W=Z.S;W!==null&&W(j,I),vg(r,i,I)}catch(se){oh(r,i,se)}finally{v!==null&&j.types!==null&&(v.types=j.types),Z.T=v}}else try{v=s(p,d),vg(r,i,v)}catch(se){oh(r,i,se)}}function vg(r,i,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(d){xg(r,i,d)},function(d){return oh(r,i,d)}):xg(r,i,s)}function xg(r,i,s){i.status="fulfilled",i.value=s,bg(i),r.state=s,i=r.pending,i!==null&&(s=i.next,s===i?r.pending=null:(s=s.next,i.next=s,yg(r,s)))}function oh(r,i,s){var d=r.pending;if(r.pending=null,d!==null){d=d.next;do i.status="rejected",i.reason=s,bg(i),i=i.next;while(i!==d)}r.action=null}function bg(r){r=r.listeners;for(var i=0;i<r.length;i++)(0,r[i])()}function wg(r,i){return i}function kg(r,i){if(wt){var s=Gt.formState;if(s!==null){e:{var d=pt;if(wt){if(Ht){t:{for(var p=Ht,v=Sr;p.nodeType!==8;){if(!v){p=null;break t}if(p=pa(p.nextSibling),p===null){p=null;break t}}v=p.data,p=v==="F!"||v==="F"?p:null}if(p){Ht=pa(p.nextSibling),d=p.data==="F!";break e}}Qa(d)}d=!1}d&&(i=s[0])}}return s=ur(),s.memoizedState=s.baseState=i,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wg,lastRenderedState:i},s.queue=d,s=Hg.bind(null,pt,d),d.dispatch=s,d=sh(!1),v=mh.bind(null,pt,!1,d.queue),d=ur(),p={state:i,dispatch:null,action:r,pending:null},d.queue=p,s=fb.bind(null,pt,p,v,s),p.dispatch=s,d.memoizedState=r,[i,s,!1]}function Sg(r){var i=vn();return jg(i,$t,r)}function jg(r,i,s){if(i=ih(r,i,wg)[0],r=q0(Ii)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var d=rc(i)}catch(j){throw j===Rn?Cr:j}else d=i;i=vn();var p=i.queue,v=p.dispatch;return s!==i.memoizedState&&(pt.flags|=2048,Uo(9,{destroy:void 0},hb.bind(null,p,s),null)),[d,v,r]}function hb(r,i){r.action=i}function Cg(r){var i=vn(),s=$t;if(s!==null)return jg(i,s,r);vn(),i=i.memoizedState,s=vn();var d=s.queue.dispatch;return s.memoizedState=r,[i,d,!1]}function Uo(r,i,s,d){return r={tag:r,create:s,deps:d,inst:i,next:null},i=pt.updateQueue,i===null&&(i=L0(),pt.updateQueue=i),s=i.lastEffect,s===null?i.lastEffect=r.next=r:(d=s.next,s.next=r,r.next=d,i.lastEffect=r),r}function Tg(){return vn().memoizedState}function U0(r,i,s,d){var p=ur();pt.flags|=r,p.memoizedState=Uo(1|i,{destroy:void 0},s,d===void 0?null:d)}function H0(r,i,s,d){var p=vn();d=d===void 0?null:d;var v=p.memoizedState.inst;$t!==null&&d!==null&&Jf(d,$t.memoizedState.deps)?p.memoizedState=Uo(i,v,s,d):(pt.flags|=r,p.memoizedState=Uo(1|i,v,s,d))}function Ag(r,i){U0(8390656,8,r,i)}function uh(r,i){H0(2048,8,r,i)}function mb(r){pt.flags|=4;var i=pt.updateQueue;if(i===null)i=L0(),pt.updateQueue=i,i.events=[r];else{var s=i.events;s===null?i.events=[r]:s.push(r)}}function Eg(r){var i=vn().memoizedState;return mb({ref:i,nextImpl:r}),function(){if((Ot&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function Ng(r,i){return H0(4,2,r,i)}function Mg(r,i){return H0(4,4,r,i)}function Dg(r,i){if(typeof i=="function"){r=r();var s=i(r);return function(){typeof s=="function"?s():i(null)}}if(i!=null)return r=r(),i.current=r,function(){i.current=null}}function zg(r,i,s){s=s!=null?s.concat([r]):null,H0(4,4,Dg.bind(null,i,r),s)}function ch(){}function Rg(r,i){var s=vn();i=i===void 0?null:i;var d=s.memoizedState;return i!==null&&Jf(i,d[1])?d[0]:(s.memoizedState=[r,i],r)}function Og(r,i){var s=vn();i=i===void 0?null:i;var d=s.memoizedState;if(i!==null&&Jf(i,d[1]))return d[0];if(d=r(),zs){nt(!0);try{r()}finally{nt(!1)}}return s.memoizedState=[d,i],d}function dh(r,i,s){return s===void 0||(Oi&1073741824)!==0&&(At&261930)===0?r.memoizedState=i:(r.memoizedState=s,r=I4(),pt.lanes|=r,zl|=r,s)}function Ig(r,i,s,d){return Dn(s,i)?s:Lo.current!==null?(r=dh(r,s,d),Dn(r,i)||(Sn=!0),r):(Oi&42)===0||(Oi&1073741824)!==0&&(At&261930)===0?(Sn=!0,r.memoizedState=s):(r=I4(),pt.lanes|=r,zl|=r,i)}function _g(r,i,s,d,p){var v=ge.p;ge.p=v!==0&&8>v?v:8;var j=Z.T,I={};Z.T=I,mh(r,!1,i,s);try{var W=p(),se=Z.S;if(se!==null&&se(I,W),W!==null&&typeof W=="object"&&typeof W.then=="function"){var xe=Kf(W,d);ac(r,i,xe,Kr(r))}else ac(r,i,d,Kr(r))}catch(ke){ac(r,i,{then:function(){},status:"rejected",reason:ke},Kr())}finally{ge.p=v,j!==null&&I.types!==null&&(j.types=I.types),Z.T=j}}function pb(){}function fh(r,i,s,d){if(r.tag!==5)throw Error(a(476));var p=Lg(r).queue;_g(r,p,i,ye,s===null?pb:function(){return Bg(r),s(d)})}function Lg(r){var i=r.memoizedState;if(i!==null)return i;i={memoizedState:ye,baseState:ye,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ii,lastRenderedState:ye},next:null};var s={};return i.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ii,lastRenderedState:s},next:null},r.memoizedState=i,r=r.alternate,r!==null&&(r.memoizedState=i),i}function Bg(r){var i=Lg(r);i.next===null&&(i=r.alternate.memoizedState),ac(r,i.next.queue,{},Kr())}function hh(){return gn(wc)}function qg(){return vn().memoizedState}function Ug(){return vn().memoizedState}function gb(r){for(var i=r.return;i!==null;){switch(i.tag){case 24:case 3:var s=Kr();r=$e(s);var d=De(i,r,s);d!==null&&(Mr(d,i,s),st(d,i,s)),i={cache:Ju()},r.payload=i;return}i=i.return}}function yb(r,i,s){var d=Kr();s={lane:d,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},$0(r)?$g(i,s):(s=qu(r,i,s,d),s!==null&&(Mr(s,r,d),Fg(s,i,d)))}function Hg(r,i,s){var d=Kr();ac(r,i,s,d)}function ac(r,i,s,d){var p={lane:d,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if($0(r))$g(i,p);else{var v=r.alternate;if(r.lanes===0&&(v===null||v.lanes===0)&&(v=i.lastRenderedReducer,v!==null))try{var j=i.lastRenderedState,I=v(j,s);if(p.hasEagerState=!0,p.eagerState=I,Dn(I,j))return Mo(r,i,p,0),Gt===null&&No(),!1}catch{}finally{}if(s=qu(r,i,p,d),s!==null)return Mr(s,r,d),Fg(s,i,d),!0}return!1}function mh(r,i,s,d){if(d={lane:2,revertLane:Vh(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},$0(r)){if(i)throw Error(a(479))}else i=qu(r,s,d,2),i!==null&&Mr(i,r,2)}function $0(r){var i=r.alternate;return r===pt||i!==null&&i===pt}function $g(r,i){Bo=I0=!0;var s=r.pending;s===null?i.next=i:(i.next=s.next,s.next=i),r.pending=i}function Fg(r,i,s){if((s&4194048)!==0){var d=i.lanes;d&=r.pendingLanes,s|=d,i.lanes=s,al(r,s)}}var ic={readContext:gn,use:B0,useCallback:fn,useContext:fn,useEffect:fn,useImperativeHandle:fn,useLayoutEffect:fn,useInsertionEffect:fn,useMemo:fn,useReducer:fn,useRef:fn,useState:fn,useDebugValue:fn,useDeferredValue:fn,useTransition:fn,useSyncExternalStore:fn,useId:fn,useHostTransitionStatus:fn,useFormState:fn,useActionState:fn,useOptimistic:fn,useMemoCache:fn,useCacheRefresh:fn};ic.useEffectEvent=fn;var Pg={readContext:gn,use:B0,useCallback:function(r,i){return ur().memoizedState=[r,i===void 0?null:i],r},useContext:gn,useEffect:Ag,useImperativeHandle:function(r,i,s){s=s!=null?s.concat([r]):null,U0(4194308,4,Dg.bind(null,i,r),s)},useLayoutEffect:function(r,i){return U0(4194308,4,r,i)},useInsertionEffect:function(r,i){U0(4,2,r,i)},useMemo:function(r,i){var s=ur();i=i===void 0?null:i;var d=r();if(zs){nt(!0);try{r()}finally{nt(!1)}}return s.memoizedState=[d,i],d},useReducer:function(r,i,s){var d=ur();if(s!==void 0){var p=s(i);if(zs){nt(!0);try{s(i)}finally{nt(!1)}}}else p=i;return d.memoizedState=d.baseState=p,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:p},d.queue=r,r=r.dispatch=yb.bind(null,pt,r),[d.memoizedState,r]},useRef:function(r){var i=ur();return r={current:r},i.memoizedState=r},useState:function(r){r=sh(r);var i=r.queue,s=Hg.bind(null,pt,i);return i.dispatch=s,[r.memoizedState,s]},useDebugValue:ch,useDeferredValue:function(r,i){var s=ur();return dh(s,r,i)},useTransition:function(){var r=sh(!1);return r=_g.bind(null,pt,r.queue,!0,!1),ur().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,i,s){var d=pt,p=ur();if(wt){if(s===void 0)throw Error(a(407));s=s()}else{if(s=i(),Gt===null)throw Error(a(349));(At&127)!==0||dg(d,i,s)}p.memoizedState=s;var v={value:s,getSnapshot:i};return p.queue=v,Ag(hg.bind(null,d,v,r),[r]),d.flags|=2048,Uo(9,{destroy:void 0},fg.bind(null,d,v,s,i),null),s},useId:function(){var r=ur(),i=Gt.identifierPrefix;if(wt){var s=fa,d=da;s=(d&~(1<<32-xt(d)-1)).toString(32)+s,i="_"+i+"R_"+s,s=_0++,0<s&&(i+="H"+s.toString(32)),i+="_"}else s=cb++,i="_"+i+"r_"+s.toString(32)+"_";return r.memoizedState=i},useHostTransitionStatus:hh,useFormState:kg,useActionState:kg,useOptimistic:function(r){var i=ur();i.memoizedState=i.baseState=r;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=s,i=mh.bind(null,pt,!0,s),s.dispatch=i,[r,i]},useMemoCache:ah,useCacheRefresh:function(){return ur().memoizedState=gb.bind(null,pt)},useEffectEvent:function(r){var i=ur(),s={impl:r};return i.memoizedState=s,function(){if((Ot&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}},ph={readContext:gn,use:B0,useCallback:Rg,useContext:gn,useEffect:uh,useImperativeHandle:zg,useInsertionEffect:Ng,useLayoutEffect:Mg,useMemo:Og,useReducer:q0,useRef:Tg,useState:function(){return q0(Ii)},useDebugValue:ch,useDeferredValue:function(r,i){var s=vn();return Ig(s,$t.memoizedState,r,i)},useTransition:function(){var r=q0(Ii)[0],i=vn().memoizedState;return[typeof r=="boolean"?r:rc(r),i]},useSyncExternalStore:cg,useId:qg,useHostTransitionStatus:hh,useFormState:Sg,useActionState:Sg,useOptimistic:function(r,i){var s=vn();return gg(s,$t,r,i)},useMemoCache:ah,useCacheRefresh:Ug};ph.useEffectEvent=Eg;var Gg={readContext:gn,use:B0,useCallback:Rg,useContext:gn,useEffect:uh,useImperativeHandle:zg,useInsertionEffect:Ng,useLayoutEffect:Mg,useMemo:Og,useReducer:lh,useRef:Tg,useState:function(){return lh(Ii)},useDebugValue:ch,useDeferredValue:function(r,i){var s=vn();return $t===null?dh(s,r,i):Ig(s,$t.memoizedState,r,i)},useTransition:function(){var r=lh(Ii)[0],i=vn().memoizedState;return[typeof r=="boolean"?r:rc(r),i]},useSyncExternalStore:cg,useId:qg,useHostTransitionStatus:hh,useFormState:Cg,useActionState:Cg,useOptimistic:function(r,i){var s=vn();return $t!==null?gg(s,$t,r,i):(s.baseState=r,[r,s.queue.dispatch])},useMemoCache:ah,useCacheRefresh:Ug};Gg.useEffectEvent=Eg;function gh(r,i,s,d){i=r.memoizedState,s=s(d,i),s=s==null?i:y({},i,s),r.memoizedState=s,r.lanes===0&&(r.updateQueue.baseState=s)}var yh={enqueueSetState:function(r,i,s){r=r._reactInternals;var d=Kr(),p=$e(d);p.payload=i,s!=null&&(p.callback=s),i=De(r,p,d),i!==null&&(Mr(i,r,d),st(i,r,d))},enqueueReplaceState:function(r,i,s){r=r._reactInternals;var d=Kr(),p=$e(d);p.tag=1,p.payload=i,s!=null&&(p.callback=s),i=De(r,p,d),i!==null&&(Mr(i,r,d),st(i,r,d))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var s=Kr(),d=$e(s);d.tag=2,i!=null&&(d.callback=i),i=De(r,d,s),i!==null&&(Mr(i,r,s),st(i,r,s))}};function Vg(r,i,s,d,p,v,j){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(d,v,j):i.prototype&&i.prototype.isPureReactComponent?!ca(s,d)||!ca(p,v):!0}function Yg(r,i,s,d){r=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(s,d),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(s,d),i.state!==r&&yh.enqueueReplaceState(i,i.state,null)}function Rs(r,i){var s=i;if("ref"in i){s={};for(var d in i)d!=="ref"&&(s[d]=i[d])}if(r=r.defaultProps){s===i&&(s=y({},s));for(var p in r)s[p]===void 0&&(s[p]=r[p])}return s}function Wg(r){Eo(r)}function Kg(r){console.error(r)}function Xg(r){Eo(r)}function F0(r,i){try{var s=r.onUncaughtError;s(i.value,{componentStack:i.stack})}catch(d){setTimeout(function(){throw d})}}function Zg(r,i,s){try{var d=r.onCaughtError;d(s.value,{componentStack:s.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function vh(r,i,s){return s=$e(s),s.tag=3,s.payload={element:null},s.callback=function(){F0(r,i)},s}function Qg(r){return r=$e(r),r.tag=3,r}function Jg(r,i,s,d){var p=s.type.getDerivedStateFromError;if(typeof p=="function"){var v=d.value;r.payload=function(){return p(v)},r.callback=function(){Zg(i,s,d)}}var j=s.stateNode;j!==null&&typeof j.componentDidCatch=="function"&&(r.callback=function(){Zg(i,s,d),typeof p!="function"&&(Rl===null?Rl=new Set([this]):Rl.add(this));var I=d.stack;this.componentDidCatch(d.value,{componentStack:I!==null?I:""})})}function vb(r,i,s,d,p){if(s.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(i=s.alternate,i!==null&&ha(i,s,p,!0),s=Gr.current,s!==null){switch(s.tag){case 31:case 13:return ma===null?td():s.alternate===null&&hn===0&&(hn=3),s.flags&=-257,s.flags|=65536,s.lanes=p,d===Ms?s.flags|=16384:(i=s.updateQueue,i===null?s.updateQueue=new Set([d]):i.add(d),Fh(r,d,p)),!1;case 22:return s.flags|=65536,d===Ms?s.flags|=16384:(i=s.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([d])},s.updateQueue=i):(s=i.retryQueue,s===null?i.retryQueue=new Set([d]):s.add(d)),Fh(r,d,p)),!1}throw Error(a(435,s.tag))}return Fh(r,d,p),td(),!1}if(wt)return i=Gr.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=p,d!==Gu&&(r=Error(a(422),{cause:d}),As(kr(r,s)))):(d!==Gu&&(i=Error(a(423),{cause:d}),As(kr(i,s))),r=r.current.alternate,r.flags|=65536,p&=-p,r.lanes|=p,d=kr(d,s),p=vh(r.stateNode,d,p),tt(r,p),hn!==4&&(hn=2)),!1;var v=Error(a(520),{cause:d});if(v=kr(v,s),hc===null?hc=[v]:hc.push(v),hn!==4&&(hn=2),i===null)return!0;d=kr(d,s),s=i;do{switch(s.tag){case 3:return s.flags|=65536,r=p&-p,s.lanes|=r,r=vh(s.stateNode,d,r),tt(s,r),!1;case 1:if(i=s.type,v=s.stateNode,(s.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Rl===null||!Rl.has(v))))return s.flags|=65536,p&=-p,s.lanes|=p,p=Qg(p),Jg(p,r,s,d),tt(s,p),!1}s=s.return}while(s!==null);return!1}var xh=Error(a(461)),Sn=!1;function Pn(r,i,s,d){i.child=r===null?$(i,null,s,d):N(i,r.child,s,d)}function e4(r,i,s,d,p){s=s.render;var v=i.ref;if("ref"in d){var j={};for(var I in d)I!=="ref"&&(j[I]=d[I])}else j=d;return or(i),d=eh(r,i,s,j,v,p),I=th(),r!==null&&!Sn?(nh(r,i,p),_i(r,i,p)):(wt&&I&&Fu(i),i.flags|=1,Pn(r,i,d,p),i.child)}function t4(r,i,s,d,p){if(r===null){var v=s.type;return typeof v=="function"&&!Uu(v)&&v.defaultProps===void 0&&s.compare===null?(i.tag=15,i.type=v,n4(r,i,v,d,p)):(r=zo(s.type,null,d,i,i.mode,p),r.ref=i.ref,r.return=i,i.child=r)}if(v=r.child,!Ah(r,p)){var j=v.memoizedProps;if(s=s.compare,s=s!==null?s:ca,s(j,d)&&r.ref===i.ref)return _i(r,i,p)}return i.flags|=1,r=Ma(v,d),r.ref=i.ref,r.return=i,i.child=r}function n4(r,i,s,d,p){if(r!==null){var v=r.memoizedProps;if(ca(v,d)&&r.ref===i.ref)if(Sn=!1,i.pendingProps=d=v,Ah(r,p))(r.flags&131072)!==0&&(Sn=!0);else return i.lanes=r.lanes,_i(r,i,p)}return bh(r,i,s,d,p)}function r4(r,i,s,d){var p=d.children,v=r!==null?r.memoizedState:null;if(r===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((i.flags&128)!==0){if(v=v!==null?v.baseLanes|s:s,r!==null){for(d=i.child=r.child,p=0;d!==null;)p=p|d.lanes|d.childLanes,d=d.sibling;d=p&~v}else d=0,i.child=null;return a4(r,i,v,s,d)}if((s&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},r!==null&&Pr(i,v!==null?v.cachePool:null),v!==null?lg(i,v):Xf(),sg(i);else return d=i.lanes=536870912,a4(r,i,v!==null?v.baseLanes|s:s,s,d)}else v!==null?(Pr(i,v.cachePool),lg(i,v),Nl(),i.memoizedState=null):(r!==null&&Pr(i,null),Xf(),Nl());return Pn(r,i,p,s),i.child}function lc(r,i){return r!==null&&r.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function a4(r,i,s,d,p){var v=Rt();return v=v===null?null:{parent:dn._currentValue,pool:v},i.memoizedState={baseLanes:s,cachePool:v},r!==null&&Pr(i,null),Xf(),sg(i),r!==null&&ha(r,i,d,!0),i.childLanes=p,null}function P0(r,i){return i=V0({mode:i.mode,children:i.children},r.mode),i.ref=r.ref,r.child=i,i.return=r,i}function i4(r,i,s){return N(i,r.child,null,s),r=P0(i,i.pendingProps),r.flags|=2,Vr(i),i.memoizedState=null,r}function xb(r,i,s){var d=i.pendingProps,p=(i.flags&128)!==0;if(i.flags&=-129,r===null){if(wt){if(d.mode==="hidden")return r=P0(i,d),i.lanes=536870912,lc(null,r);if(Qf(i),(r=Ht)?(r=yy(r,Sr),r=r!==null&&r.data==="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:Xa!==null?{id:da,overflow:fa}:null,retryLane:536870912,hydrationErrors:null},s=Hu(r),s.return=i,i.child=s,zn=i,Ht=null)):r=null,r===null)throw Qa(i);return i.lanes=536870912,null}return P0(i,d)}var v=r.memoizedState;if(v!==null){var j=v.dehydrated;if(Qf(i),p)if(i.flags&256)i.flags&=-257,i=i4(r,i,s);else if(i.memoizedState!==null)i.child=r.child,i.flags|=128,i=null;else throw Error(a(558));else if(Sn||ha(r,i,s,!1),p=(s&r.childLanes)!==0,Sn||p){if(d=Gt,d!==null&&(j=u0(d,s),j!==0&&j!==v.retryLane))throw v.retryLane=j,Ti(r,j),Mr(d,r,j),xh;td(),i=i4(r,i,s)}else r=v.treeContext,Ht=pa(j.nextSibling),zn=i,wt=!0,Za=null,Sr=!1,r!==null&&Pu(i,r),i=P0(i,d),i.flags|=4096;return i}return r=Ma(r.child,{mode:d.mode,children:d.children}),r.ref=i.ref,i.child=r,r.return=i,r}function G0(r,i){var s=i.ref;if(s===null)r!==null&&r.ref!==null&&(i.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(a(284));(r===null||r.ref!==s)&&(i.flags|=4194816)}}function bh(r,i,s,d,p){return or(i),s=eh(r,i,s,d,void 0,p),d=th(),r!==null&&!Sn?(nh(r,i,p),_i(r,i,p)):(wt&&d&&Fu(i),i.flags|=1,Pn(r,i,s,p),i.child)}function l4(r,i,s,d,p,v){return or(i),i.updateQueue=null,s=ug(i,d,s,p),og(r),d=th(),r!==null&&!Sn?(nh(r,i,v),_i(r,i,v)):(wt&&d&&Fu(i),i.flags|=1,Pn(r,i,s,v),i.child)}function s4(r,i,s,d,p){if(or(i),i.stateNode===null){var v=xl,j=s.contextType;typeof j=="object"&&j!==null&&(v=gn(j)),v=new s(d,v),i.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=yh,i.stateNode=v,v._reactInternals=i,v=i.stateNode,v.props=d,v.state=i.memoizedState,v.refs={},ue(i),j=s.contextType,v.context=typeof j=="object"&&j!==null?gn(j):xl,v.state=i.memoizedState,j=s.getDerivedStateFromProps,typeof j=="function"&&(gh(i,s,j,d),v.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(j=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),j!==v.state&&yh.enqueueReplaceState(v,v.state,null),Al(i,d,v,p),wn(),v.state=i.memoizedState),typeof v.componentDidMount=="function"&&(i.flags|=4194308),d=!0}else if(r===null){v=i.stateNode;var I=i.memoizedProps,W=Rs(s,I);v.props=W;var se=v.context,xe=s.contextType;j=xl,typeof xe=="object"&&xe!==null&&(j=gn(xe));var ke=s.getDerivedStateFromProps;xe=typeof ke=="function"||typeof v.getSnapshotBeforeUpdate=="function",I=i.pendingProps!==I,xe||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(I||se!==j)&&Yg(i,v,d,j),Y=!1;var ce=i.memoizedState;v.state=ce,Al(i,d,v,p),wn(),se=i.memoizedState,I||ce!==se||Y?(typeof ke=="function"&&(gh(i,s,ke,d),se=i.memoizedState),(W=Y||Vg(i,s,W,d,ce,se,j))?(xe||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(i.flags|=4194308)):(typeof v.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=d,i.memoizedState=se),v.props=d,v.state=se,v.context=j,d=W):(typeof v.componentDidMount=="function"&&(i.flags|=4194308),d=!1)}else{v=i.stateNode,Se(r,i),j=i.memoizedProps,xe=Rs(s,j),v.props=xe,ke=i.pendingProps,ce=v.context,se=s.contextType,W=xl,typeof se=="object"&&se!==null&&(W=gn(se)),I=s.getDerivedStateFromProps,(se=typeof I=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(j!==ke||ce!==W)&&Yg(i,v,d,W),Y=!1,ce=i.memoizedState,v.state=ce,Al(i,d,v,p),wn();var fe=i.memoizedState;j!==ke||ce!==fe||Y||r!==null&&r.dependencies!==null&&Oo(r.dependencies)?(typeof I=="function"&&(gh(i,s,I,d),fe=i.memoizedState),(xe=Y||Vg(i,s,xe,d,ce,fe,W)||r!==null&&r.dependencies!==null&&Oo(r.dependencies))?(se||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(d,fe,W),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(d,fe,W)),typeof v.componentDidUpdate=="function"&&(i.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof v.componentDidUpdate!="function"||j===r.memoizedProps&&ce===r.memoizedState||(i.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||j===r.memoizedProps&&ce===r.memoizedState||(i.flags|=1024),i.memoizedProps=d,i.memoizedState=fe),v.props=d,v.state=fe,v.context=W,d=xe):(typeof v.componentDidUpdate!="function"||j===r.memoizedProps&&ce===r.memoizedState||(i.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||j===r.memoizedProps&&ce===r.memoizedState||(i.flags|=1024),d=!1)}return v=d,G0(r,i),d=(i.flags&128)!==0,v||d?(v=i.stateNode,s=d&&typeof s.getDerivedStateFromError!="function"?null:v.render(),i.flags|=1,r!==null&&d?(i.child=N(i,r.child,null,p),i.child=N(i,null,s,p)):Pn(r,i,s,p),i.memoizedState=v.state,r=i.child):r=_i(r,i,p),r}function o4(r,i,s,d){return Ei(),i.flags|=256,Pn(r,i,s,d),i.child}var wh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function kh(r){return{baseLanes:r,cachePool:M0()}}function Sh(r,i,s){return r=r!==null?r.childLanes&~s:0,i&&(r|=Wr),r}function u4(r,i,s){var d=i.pendingProps,p=!1,v=(i.flags&128)!==0,j;if((j=v)||(j=r!==null&&r.memoizedState===null?!1:(yn.current&2)!==0),j&&(p=!0,i.flags&=-129),j=(i.flags&32)!==0,i.flags&=-33,r===null){if(wt){if(p?El(i):Nl(),(r=Ht)?(r=yy(r,Sr),r=r!==null&&r.data!=="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:Xa!==null?{id:da,overflow:fa}:null,retryLane:536870912,hydrationErrors:null},s=Hu(r),s.return=i,i.child=s,zn=i,Ht=null)):r=null,r===null)throw Qa(i);return im(r)?i.lanes=32:i.lanes=536870912,null}var I=d.children;return d=d.fallback,p?(Nl(),p=i.mode,I=V0({mode:"hidden",children:I},p),d=Ka(d,p,s,null),I.return=i,d.return=i,I.sibling=d,i.child=I,d=i.child,d.memoizedState=kh(s),d.childLanes=Sh(r,j,s),i.memoizedState=wh,lc(null,d)):(El(i),jh(i,I))}var W=r.memoizedState;if(W!==null&&(I=W.dehydrated,I!==null)){if(v)i.flags&256?(El(i),i.flags&=-257,i=Ch(r,i,s)):i.memoizedState!==null?(Nl(),i.child=r.child,i.flags|=128,i=null):(Nl(),I=d.fallback,p=i.mode,d=V0({mode:"visible",children:d.children},p),I=Ka(I,p,s,null),I.flags|=2,d.return=i,I.return=i,d.sibling=I,i.child=d,N(i,r.child,null,s),d=i.child,d.memoizedState=kh(s),d.childLanes=Sh(r,j,s),i.memoizedState=wh,i=lc(null,d));else if(El(i),im(I)){if(j=I.nextSibling&&I.nextSibling.dataset,j)var se=j.dgst;j=se,d=Error(a(419)),d.stack="",d.digest=j,As({value:d,source:null,stack:null}),i=Ch(r,i,s)}else if(Sn||ha(r,i,s,!1),j=(s&r.childLanes)!==0,Sn||j){if(j=Gt,j!==null&&(d=u0(j,s),d!==0&&d!==W.retryLane))throw W.retryLane=d,Ti(r,d),Mr(j,r,d),xh;am(I)||td(),i=Ch(r,i,s)}else am(I)?(i.flags|=192,i.child=r.child,i=null):(r=W.treeContext,Ht=pa(I.nextSibling),zn=i,wt=!0,Za=null,Sr=!1,r!==null&&Pu(i,r),i=jh(i,d.children),i.flags|=4096);return i}return p?(Nl(),I=d.fallback,p=i.mode,W=r.child,se=W.sibling,d=Ma(W,{mode:"hidden",children:d.children}),d.subtreeFlags=W.subtreeFlags&65011712,se!==null?I=Ma(se,I):(I=Ka(I,p,s,null),I.flags|=2),I.return=i,d.return=i,d.sibling=I,i.child=d,lc(null,d),d=i.child,I=r.child.memoizedState,I===null?I=kh(s):(p=I.cachePool,p!==null?(W=dn._currentValue,p=p.parent!==W?{parent:W,pool:W}:p):p=M0(),I={baseLanes:I.baseLanes|s,cachePool:p}),d.memoizedState=I,d.childLanes=Sh(r,j,s),i.memoizedState=wh,lc(r.child,d)):(El(i),s=r.child,r=s.sibling,s=Ma(s,{mode:"visible",children:d.children}),s.return=i,s.sibling=null,r!==null&&(j=i.deletions,j===null?(i.deletions=[r],i.flags|=16):j.push(r)),i.child=s,i.memoizedState=null,s)}function jh(r,i){return i=V0({mode:"visible",children:i},r.mode),i.return=r,r.child=i}function V0(r,i){return r=ir(22,r,null,i),r.lanes=0,r}function Ch(r,i,s){return N(i,r.child,null,s),r=jh(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function c4(r,i,s){r.lanes|=i;var d=r.alternate;d!==null&&(d.lanes|=i),Wu(r.return,i,s)}function Th(r,i,s,d,p,v){var j=r.memoizedState;j===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:d,tail:s,tailMode:p,treeForkCount:v}:(j.isBackwards=i,j.rendering=null,j.renderingStartTime=0,j.last=d,j.tail=s,j.tailMode=p,j.treeForkCount=v)}function d4(r,i,s){var d=i.pendingProps,p=d.revealOrder,v=d.tail;d=d.children;var j=yn.current,I=(j&2)!==0;if(I?(j=j&1|2,i.flags|=128):j&=1,z(yn,j),Pn(r,i,d,s),d=wt?Cs:0,!I&&r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&c4(r,s,i);else if(r.tag===19)c4(r,s,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(p){case"forwards":for(s=i.child,p=null;s!==null;)r=s.alternate,r!==null&&O0(r)===null&&(p=s),s=s.sibling;s=p,s===null?(p=i.child,i.child=null):(p=s.sibling,s.sibling=null),Th(i,!1,p,s,v,d);break;case"backwards":case"unstable_legacy-backwards":for(s=null,p=i.child,i.child=null;p!==null;){if(r=p.alternate,r!==null&&O0(r)===null){i.child=p;break}r=p.sibling,p.sibling=s,s=p,p=r}Th(i,!0,s,null,v,d);break;case"together":Th(i,!1,null,null,void 0,d);break;default:i.memoizedState=null}return i.child}function _i(r,i,s){if(r!==null&&(i.dependencies=r.dependencies),zl|=i.lanes,(s&i.childLanes)===0)if(r!==null){if(ha(r,i,s,!1),(s&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,s=Ma(r,r.pendingProps),i.child=s,s.return=i;r.sibling!==null;)r=r.sibling,s=s.sibling=Ma(r,r.pendingProps),s.return=i;s.sibling=null}return i.child}function Ah(r,i){return(r.lanes&i)!==0?!0:(r=r.dependencies,!!(r!==null&&Oo(r)))}function bb(r,i,s){switch(i.tag){case 3:rt(i,i.stateNode.containerInfo),Ja(i,dn,r.memoizedState.cache),Ei();break;case 27:case 5:ie(i);break;case 4:rt(i,i.stateNode.containerInfo);break;case 10:Ja(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Qf(i),null;break;case 13:var d=i.memoizedState;if(d!==null)return d.dehydrated!==null?(El(i),i.flags|=128,null):(s&i.child.childLanes)!==0?u4(r,i,s):(El(i),r=_i(r,i,s),r!==null?r.sibling:null);El(i);break;case 19:var p=(r.flags&128)!==0;if(d=(s&i.childLanes)!==0,d||(ha(r,i,s,!1),d=(s&i.childLanes)!==0),p){if(d)return d4(r,i,s);i.flags|=128}if(p=i.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),z(yn,yn.current),d)break;return null;case 22:return i.lanes=0,r4(r,i,s,i.pendingProps);case 24:Ja(i,dn,r.memoizedState.cache)}return _i(r,i,s)}function f4(r,i,s){if(r!==null)if(r.memoizedProps!==i.pendingProps)Sn=!0;else{if(!Ah(r,s)&&(i.flags&128)===0)return Sn=!1,bb(r,i,s);Sn=(r.flags&131072)!==0}else Sn=!1,wt&&(i.flags&1048576)!==0&&Ts(i,Cs,i.index);switch(i.lanes=0,i.tag){case 16:e:{var d=i.pendingProps;if(r=Di(i.elementType),i.type=r,typeof r=="function")Uu(r)?(d=Rs(r,d),i.tag=1,i=s4(null,i,r,d,s)):(i.tag=0,i=bh(null,i,r,d,s));else{if(r!=null){var p=r.$$typeof;if(p===L){i.tag=11,i=e4(null,i,r,d,s);break e}else if(p===H){i.tag=14,i=t4(null,i,r,d,s);break e}}throw i=je(r)||r,Error(a(306,i,""))}}return i;case 0:return bh(r,i,i.type,i.pendingProps,s);case 1:return d=i.type,p=Rs(d,i.pendingProps),s4(r,i,d,p,s);case 3:e:{if(rt(i,i.stateNode.containerInfo),r===null)throw Error(a(387));d=i.pendingProps;var v=i.memoizedState;p=v.element,Se(r,i),Al(i,d,null,s);var j=i.memoizedState;if(d=j.cache,Ja(i,dn,d),d!==v.cache&&Ku(i,[dn],s,!0),wn(),d=j.element,v.isDehydrated)if(v={element:d,isDehydrated:!1,cache:j.cache},i.updateQueue.baseState=v,i.memoizedState=v,i.flags&256){i=o4(r,i,d,s);break e}else if(d!==p){p=kr(Error(a(424)),i),As(p),i=o4(r,i,d,s);break e}else{switch(r=i.stateNode.containerInfo,r.nodeType){case 9:r=r.body;break;default:r=r.nodeName==="HTML"?r.ownerDocument.body:r}for(Ht=pa(r.firstChild),zn=i,wt=!0,Za=null,Sr=!0,s=$(i,null,d,s),i.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(Ei(),d===p){i=_i(r,i,s);break e}Pn(r,i,d,s)}i=i.child}return i;case 26:return G0(r,i),r===null?(s=Sy(i.type,null,i.pendingProps,null))?i.memoizedState=s:wt||(s=i.type,r=i.pendingProps,d=od(Re.current).createElement(s),d[Nn]=i,d[xn]=r,Gn(d,s,r),tn(d),i.stateNode=d):i.memoizedState=Sy(i.type,r.memoizedProps,i.pendingProps,r.memoizedState),null;case 27:return ie(i),r===null&&wt&&(d=i.stateNode=by(i.type,i.pendingProps,Re.current),zn=i,Sr=!0,p=Ht,Ll(i.type)?(lm=p,Ht=pa(d.firstChild)):Ht=p),Pn(r,i,i.pendingProps.children,s),G0(r,i),r===null&&(i.flags|=4194304),i.child;case 5:return r===null&&wt&&((p=d=Ht)&&(d=Xb(d,i.type,i.pendingProps,Sr),d!==null?(i.stateNode=d,zn=i,Ht=pa(d.firstChild),Sr=!1,p=!0):p=!1),p||Qa(i)),ie(i),p=i.type,v=i.pendingProps,j=r!==null?r.memoizedProps:null,d=v.children,tm(p,v)?d=null:j!==null&&tm(p,j)&&(i.flags|=32),i.memoizedState!==null&&(p=eh(r,i,db,null,null,s),wc._currentValue=p),G0(r,i),Pn(r,i,d,s),i.child;case 6:return r===null&&wt&&((r=s=Ht)&&(s=Zb(s,i.pendingProps,Sr),s!==null?(i.stateNode=s,zn=i,Ht=null,r=!0):r=!1),r||Qa(i)),null;case 13:return u4(r,i,s);case 4:return rt(i,i.stateNode.containerInfo),d=i.pendingProps,r===null?i.child=N(i,null,d,s):Pn(r,i,d,s),i.child;case 11:return e4(r,i,i.type,i.pendingProps,s);case 7:return Pn(r,i,i.pendingProps,s),i.child;case 8:return Pn(r,i,i.pendingProps.children,s),i.child;case 12:return Pn(r,i,i.pendingProps.children,s),i.child;case 10:return d=i.pendingProps,Ja(i,i.type,d.value),Pn(r,i,d.children,s),i.child;case 9:return p=i.type._context,d=i.pendingProps.children,or(i),p=gn(p),d=d(p),i.flags|=1,Pn(r,i,d,s),i.child;case 14:return t4(r,i,i.type,i.pendingProps,s);case 15:return n4(r,i,i.type,i.pendingProps,s);case 19:return d4(r,i,s);case 31:return xb(r,i,s);case 22:return r4(r,i,s,i.pendingProps);case 24:return or(i),d=gn(dn),r===null?(p=Rt(),p===null&&(p=Gt,v=Ju(),p.pooledCache=v,v.refCount++,v!==null&&(p.pooledCacheLanes|=s),p=v),i.memoizedState={parent:d,cache:p},ue(i),Ja(i,dn,p)):((r.lanes&s)!==0&&(Se(r,i),Al(i,null,null,s),wn()),p=r.memoizedState,v=i.memoizedState,p.parent!==d?(p={parent:d,cache:d},i.memoizedState=p,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=p),Ja(i,dn,d)):(d=v.cache,Ja(i,dn,d),d!==p.cache&&Ku(i,[dn],s,!0))),Pn(r,i,i.pendingProps.children,s),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function Li(r){r.flags|=4}function Eh(r,i,s,d,p){if((i=(r.mode&32)!==0)&&(i=!1),i){if(r.flags|=16777216,(p&335544128)===p)if(r.stateNode.complete)r.flags|=8192;else if(q4())r.flags|=8192;else throw zi=Ms,ec}else r.flags&=-16777217}function h4(r,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!Ey(i))if(q4())r.flags|=8192;else throw zi=Ms,ec}function Y0(r,i){i!==null&&(r.flags|=4),r.flags&16384&&(i=r.tag!==22?en():536870912,r.lanes|=i,Po|=i)}function sc(r,i){if(!wt)switch(r.tailMode){case"hidden":i=r.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?r.tail=null:s.sibling=null;break;case"collapsed":s=r.tail;for(var d=null;s!==null;)s.alternate!==null&&(d=s),s=s.sibling;d===null?i||r.tail===null?r.tail=null:r.tail.sibling=null:d.sibling=null}}function Qt(r){var i=r.alternate!==null&&r.alternate.child===r.child,s=0,d=0;if(i)for(var p=r.child;p!==null;)s|=p.lanes|p.childLanes,d|=p.subtreeFlags&65011712,d|=p.flags&65011712,p.return=r,p=p.sibling;else for(p=r.child;p!==null;)s|=p.lanes|p.childLanes,d|=p.subtreeFlags,d|=p.flags,p.return=r,p=p.sibling;return r.subtreeFlags|=d,r.childLanes=s,i}function wb(r,i,s){var d=i.pendingProps;switch(Ro(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qt(i),null;case 1:return Qt(i),null;case 3:return s=i.stateNode,d=null,r!==null&&(d=r.memoizedState.cache),i.memoizedState.cache!==d&&(i.flags|=2048),$r(dn),de(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(r===null||r.child===null)&&(kl(i)?Li(i):r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Vu())),Qt(i),null;case 26:var p=i.type,v=i.memoizedState;return r===null?(Li(i),v!==null?(Qt(i),h4(i,v)):(Qt(i),Eh(i,p,null,d,s))):v?v!==r.memoizedState?(Li(i),Qt(i),h4(i,v)):(Qt(i),i.flags&=-16777217):(r=r.memoizedProps,r!==d&&Li(i),Qt(i),Eh(i,p,r,d,s)),null;case 27:if(Ee(i),s=Re.current,p=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==d&&Li(i);else{if(!d){if(i.stateNode===null)throw Error(a(166));return Qt(i),null}r=te.current,kl(i)?A0(i):(r=by(p,d,s),i.stateNode=r,Li(i))}return Qt(i),null;case 5:if(Ee(i),p=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==d&&Li(i);else{if(!d){if(i.stateNode===null)throw Error(a(166));return Qt(i),null}if(v=te.current,kl(i))A0(i);else{var j=od(Re.current);switch(v){case 1:v=j.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:v=j.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":v=j.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":v=j.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":v=j.createElement("div"),v.innerHTML="<script><\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof d.is=="string"?j.createElement("select",{is:d.is}):j.createElement("select"),d.multiple?v.multiple=!0:d.size&&(v.size=d.size);break;default:v=typeof d.is=="string"?j.createElement(p,{is:d.is}):j.createElement(p)}}v[Nn]=i,v[xn]=d;e:for(j=i.child;j!==null;){if(j.tag===5||j.tag===6)v.appendChild(j.stateNode);else if(j.tag!==4&&j.tag!==27&&j.child!==null){j.child.return=j,j=j.child;continue}if(j===i)break e;for(;j.sibling===null;){if(j.return===null||j.return===i)break e;j=j.return}j.sibling.return=j.return,j=j.sibling}i.stateNode=v;e:switch(Gn(v,p,d),p){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&Li(i)}}return Qt(i),Eh(i,i.type,r===null?null:r.memoizedProps,i.pendingProps,s),null;case 6:if(r&&i.stateNode!=null)r.memoizedProps!==d&&Li(i);else{if(typeof d!="string"&&i.stateNode===null)throw Error(a(166));if(r=Re.current,kl(i)){if(r=i.stateNode,s=i.memoizedProps,d=null,p=zn,p!==null)switch(p.tag){case 27:case 5:d=p.memoizedProps}r[Nn]=i,r=!!(r.nodeValue===s||d!==null&&d.suppressHydrationWarning===!0||uy(r.nodeValue,s)),r||Qa(i,!0)}else r=od(r).createTextNode(d),r[Nn]=i,i.stateNode=r}return Qt(i),null;case 31:if(s=i.memoizedState,r===null||r.memoizedState!==null){if(d=kl(i),s!==null){if(r===null){if(!d)throw Error(a(318));if(r=i.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(557));r[Nn]=i}else Ei(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Qt(i),r=!1}else s=Vu(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=s),r=!0;if(!r)return i.flags&256?(Vr(i),i):(Vr(i),null);if((i.flags&128)!==0)throw Error(a(558))}return Qt(i),null;case 13:if(d=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(p=kl(i),d!==null&&d.dehydrated!==null){if(r===null){if(!p)throw Error(a(318));if(p=i.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(a(317));p[Nn]=i}else Ei(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Qt(i),p=!1}else p=Vu(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=p),p=!0;if(!p)return i.flags&256?(Vr(i),i):(Vr(i),null)}return Vr(i),(i.flags&128)!==0?(i.lanes=s,i):(s=d!==null,r=r!==null&&r.memoizedState!==null,s&&(d=i.child,p=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(p=d.alternate.memoizedState.cachePool.pool),v=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(v=d.memoizedState.cachePool.pool),v!==p&&(d.flags|=2048)),s!==r&&s&&(i.child.flags|=8192),Y0(i,i.updateQueue),Qt(i),null);case 4:return de(),r===null&&Xh(i.stateNode.containerInfo),Qt(i),null;case 10:return $r(i.type),Qt(i),null;case 19:if(ee(yn),d=i.memoizedState,d===null)return Qt(i),null;if(p=(i.flags&128)!==0,v=d.rendering,v===null)if(p)sc(d,!1);else{if(hn!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(v=O0(r),v!==null){for(i.flags|=128,sc(d,!1),r=v.updateQueue,i.updateQueue=r,Y0(i,r),i.subtreeFlags=0,r=s,s=i.child;s!==null;)C0(s,r),s=s.sibling;return z(yn,yn.current&1|2),wt&&Yn(i,d.treeForkCount),i.child}r=r.sibling}d.tail!==null&&Xt()>Q0&&(i.flags|=128,p=!0,sc(d,!1),i.lanes=4194304)}else{if(!p)if(r=O0(v),r!==null){if(i.flags|=128,p=!0,r=r.updateQueue,i.updateQueue=r,Y0(i,r),sc(d,!0),d.tail===null&&d.tailMode==="hidden"&&!v.alternate&&!wt)return Qt(i),null}else 2*Xt()-d.renderingStartTime>Q0&&s!==536870912&&(i.flags|=128,p=!0,sc(d,!1),i.lanes=4194304);d.isBackwards?(v.sibling=i.child,i.child=v):(r=d.last,r!==null?r.sibling=v:i.child=v,d.last=v)}return d.tail!==null?(r=d.tail,d.rendering=r,d.tail=r.sibling,d.renderingStartTime=Xt(),r.sibling=null,s=yn.current,z(yn,p?s&1|2:s&1),wt&&Yn(i,d.treeForkCount),r):(Qt(i),null);case 22:case 23:return Vr(i),Zf(),d=i.memoizedState!==null,r!==null?r.memoizedState!==null!==d&&(i.flags|=8192):d&&(i.flags|=8192),d?(s&536870912)!==0&&(i.flags&128)===0&&(Qt(i),i.subtreeFlags&6&&(i.flags|=8192)):Qt(i),s=i.updateQueue,s!==null&&Y0(i,s.retryQueue),s=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),d=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),d!==s&&(i.flags|=2048),r!==null&&ee(ei),null;case 24:return s=null,r!==null&&(s=r.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),$r(dn),Qt(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function kb(r,i){switch(Ro(i),i.tag){case 1:return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return $r(dn),de(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 26:case 27:case 5:return Ee(i),null;case 31:if(i.memoizedState!==null){if(Vr(i),i.alternate===null)throw Error(a(340));Ei()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 13:if(Vr(i),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(a(340));Ei()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return ee(yn),null;case 4:return de(),null;case 10:return $r(i.type),null;case 22:case 23:return Vr(i),Zf(),r!==null&&ee(ei),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 24:return $r(dn),null;case 25:return null;default:return null}}function m4(r,i){switch(Ro(i),i.tag){case 3:$r(dn),de();break;case 26:case 27:case 5:Ee(i);break;case 4:de();break;case 31:i.memoizedState!==null&&Vr(i);break;case 13:Vr(i);break;case 19:ee(yn);break;case 10:$r(i.type);break;case 22:case 23:Vr(i),Zf(),r!==null&&ee(ei);break;case 24:$r(dn)}}function oc(r,i){try{var s=i.updateQueue,d=s!==null?s.lastEffect:null;if(d!==null){var p=d.next;s=p;do{if((s.tag&r)===r){d=void 0;var v=s.create,j=s.inst;d=v(),j.destroy=d}s=s.next}while(s!==p)}}catch(I){qt(i,i.return,I)}}function Ml(r,i,s){try{var d=i.updateQueue,p=d!==null?d.lastEffect:null;if(p!==null){var v=p.next;d=v;do{if((d.tag&r)===r){var j=d.inst,I=j.destroy;if(I!==void 0){j.destroy=void 0,p=i;var W=s,se=I;try{se()}catch(xe){qt(p,W,xe)}}}d=d.next}while(d!==v)}}catch(xe){qt(i,i.return,xe)}}function p4(r){var i=r.updateQueue;if(i!==null){var s=r.stateNode;try{ig(i,s)}catch(d){qt(r,r.return,d)}}}function g4(r,i,s){s.props=Rs(r.type,r.memoizedProps),s.state=r.memoizedState;try{s.componentWillUnmount()}catch(d){qt(r,i,d)}}function uc(r,i){try{var s=r.ref;if(s!==null){switch(r.tag){case 26:case 27:case 5:var d=r.stateNode;break;case 30:d=r.stateNode;break;default:d=r.stateNode}typeof s=="function"?r.refCleanup=s(d):s.current=d}}catch(p){qt(r,i,p)}}function ti(r,i){var s=r.ref,d=r.refCleanup;if(s!==null)if(typeof d=="function")try{d()}catch(p){qt(r,i,p)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(p){qt(r,i,p)}else s.current=null}function y4(r){var i=r.type,s=r.memoizedProps,d=r.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":s.autoFocus&&d.focus();break e;case"img":s.src?d.src=s.src:s.srcSet&&(d.srcset=s.srcSet)}}catch(p){qt(r,r.return,p)}}function Nh(r,i,s){try{var d=r.stateNode;Pb(d,r.type,s,i),d[xn]=i}catch(p){qt(r,r.return,p)}}function v4(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&Ll(r.type)||r.tag===4}function Mh(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||v4(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&&Ll(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 Dh(r,i,s){var d=r.tag;if(d===5||d===6)r=r.stateNode,i?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(r,i):(i=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,i.appendChild(r),s=s._reactRootContainer,s!=null||i.onclick!==null||(i.onclick=bn));else if(d!==4&&(d===27&&Ll(r.type)&&(s=r.stateNode,i=null),r=r.child,r!==null))for(Dh(r,i,s),r=r.sibling;r!==null;)Dh(r,i,s),r=r.sibling}function W0(r,i,s){var d=r.tag;if(d===5||d===6)r=r.stateNode,i?s.insertBefore(r,i):s.appendChild(r);else if(d!==4&&(d===27&&Ll(r.type)&&(s=r.stateNode),r=r.child,r!==null))for(W0(r,i,s),r=r.sibling;r!==null;)W0(r,i,s),r=r.sibling}function x4(r){var i=r.stateNode,s=r.memoizedProps;try{for(var d=r.type,p=i.attributes;p.length;)i.removeAttributeNode(p[0]);Gn(i,d,s),i[Nn]=r,i[xn]=s}catch(v){qt(r,r.return,v)}}var Bi=!1,jn=!1,zh=!1,b4=typeof WeakSet=="function"?WeakSet:Set,Bn=null;function Sb(r,i){if(r=r.containerInfo,Jh=pd,r=x0(r),Fn(r)){if("selectionStart"in r)var s={start:r.selectionStart,end:r.selectionEnd};else e:{s=(s=r.ownerDocument)&&s.defaultView||window;var d=s.getSelection&&s.getSelection();if(d&&d.rangeCount!==0){s=d.anchorNode;var p=d.anchorOffset,v=d.focusNode;d=d.focusOffset;try{s.nodeType,v.nodeType}catch{s=null;break e}var j=0,I=-1,W=-1,se=0,xe=0,ke=r,ce=null;t:for(;;){for(var fe;ke!==s||p!==0&&ke.nodeType!==3||(I=j+p),ke!==v||d!==0&&ke.nodeType!==3||(W=j+d),ke.nodeType===3&&(j+=ke.nodeValue.length),(fe=ke.firstChild)!==null;)ce=ke,ke=fe;for(;;){if(ke===r)break t;if(ce===s&&++se===p&&(I=j),ce===v&&++xe===d&&(W=j),(fe=ke.nextSibling)!==null)break;ke=ce,ce=ke.parentNode}ke=fe}s=I===-1||W===-1?null:{start:I,end:W}}else s=null}s=s||{start:0,end:0}}else s=null;for(em={focusedElem:r,selectionRange:s},pd=!1,Bn=i;Bn!==null;)if(i=Bn,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,Bn=r;else for(;Bn!==null;){switch(i=Bn,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(s=0;s<r.length;s++)p=r[s],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&v!==null){r=void 0,s=i,p=v.memoizedProps,v=v.memoizedState,d=s.stateNode;try{var Ke=Rs(s.type,p);r=d.getSnapshotBeforeUpdate(Ke,v),d.__reactInternalSnapshotBeforeUpdate=r}catch(ot){qt(s,s.return,ot)}}break;case 3:if((r&1024)!==0){if(r=i.stateNode.containerInfo,s=r.nodeType,s===9)rm(r);else if(s===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":rm(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,Bn=r;break}Bn=i.return}}function w4(r,i,s){var d=s.flags;switch(s.tag){case 0:case 11:case 15:Ui(r,s),d&4&&oc(5,s);break;case 1:if(Ui(r,s),d&4)if(r=s.stateNode,i===null)try{r.componentDidMount()}catch(j){qt(s,s.return,j)}else{var p=Rs(s.type,i.memoizedProps);i=i.memoizedState;try{r.componentDidUpdate(p,i,r.__reactInternalSnapshotBeforeUpdate)}catch(j){qt(s,s.return,j)}}d&64&&p4(s),d&512&&uc(s,s.return);break;case 3:if(Ui(r,s),d&64&&(r=s.updateQueue,r!==null)){if(i=null,s.child!==null)switch(s.child.tag){case 27:case 5:i=s.child.stateNode;break;case 1:i=s.child.stateNode}try{ig(r,i)}catch(j){qt(s,s.return,j)}}break;case 27:i===null&&d&4&&x4(s);case 26:case 5:Ui(r,s),i===null&&d&4&&y4(s),d&512&&uc(s,s.return);break;case 12:Ui(r,s);break;case 31:Ui(r,s),d&4&&j4(r,s);break;case 13:Ui(r,s),d&4&&C4(r,s),d&64&&(r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(s=zb.bind(null,s),Qb(r,s))));break;case 22:if(d=s.memoizedState!==null||Bi,!d){i=i!==null&&i.memoizedState!==null||jn,p=Bi;var v=jn;Bi=d,(jn=i)&&!v?Hi(r,s,(s.subtreeFlags&8772)!==0):Ui(r,s),Bi=p,jn=v}break;case 30:break;default:Ui(r,s)}}function k4(r){var i=r.alternate;i!==null&&(r.alternate=null,k4(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&wu(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 rn=null,Tr=!1;function qi(r,i,s){for(s=s.child;s!==null;)S4(r,i,s),s=s.sibling}function S4(r,i,s){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(Ct,s)}catch{}switch(s.tag){case 26:jn||ti(s,i),qi(r,i,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:jn||ti(s,i);var d=rn,p=Tr;Ll(s.type)&&(rn=s.stateNode,Tr=!1),qi(r,i,s),vc(s.stateNode),rn=d,Tr=p;break;case 5:jn||ti(s,i);case 6:if(d=rn,p=Tr,rn=null,qi(r,i,s),rn=d,Tr=p,rn!==null)if(Tr)try{(rn.nodeType===9?rn.body:rn.nodeName==="HTML"?rn.ownerDocument.body:rn).removeChild(s.stateNode)}catch(v){qt(s,i,v)}else try{rn.removeChild(s.stateNode)}catch(v){qt(s,i,v)}break;case 18:rn!==null&&(Tr?(r=rn,py(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,s.stateNode),Qo(r)):py(rn,s.stateNode));break;case 4:d=rn,p=Tr,rn=s.stateNode.containerInfo,Tr=!0,qi(r,i,s),rn=d,Tr=p;break;case 0:case 11:case 14:case 15:Ml(2,s,i),jn||Ml(4,s,i),qi(r,i,s);break;case 1:jn||(ti(s,i),d=s.stateNode,typeof d.componentWillUnmount=="function"&&g4(s,i,d)),qi(r,i,s);break;case 21:qi(r,i,s);break;case 22:jn=(d=jn)||s.memoizedState!==null,qi(r,i,s),jn=d;break;default:qi(r,i,s)}}function j4(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{Qo(r)}catch(s){qt(i,i.return,s)}}}function C4(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{Qo(r)}catch(s){qt(i,i.return,s)}}function jb(r){switch(r.tag){case 31:case 13:case 19:var i=r.stateNode;return i===null&&(i=r.stateNode=new b4),i;case 22:return r=r.stateNode,i=r._retryCache,i===null&&(i=r._retryCache=new b4),i;default:throw Error(a(435,r.tag))}}function K0(r,i){var s=jb(r);i.forEach(function(d){if(!s.has(d)){s.add(d);var p=Rb.bind(null,r,d);d.then(p,p)}})}function Ar(r,i){var s=i.deletions;if(s!==null)for(var d=0;d<s.length;d++){var p=s[d],v=r,j=i,I=j;e:for(;I!==null;){switch(I.tag){case 27:if(Ll(I.type)){rn=I.stateNode,Tr=!1;break e}break;case 5:rn=I.stateNode,Tr=!1;break e;case 3:case 4:rn=I.stateNode.containerInfo,Tr=!0;break e}I=I.return}if(rn===null)throw Error(a(160));S4(v,j,p),rn=null,Tr=!1,v=p.alternate,v!==null&&(v.return=null),p.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)T4(i,r),i=i.sibling}var za=null;function T4(r,i){var s=r.alternate,d=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:Ar(i,r),Er(r),d&4&&(Ml(3,r,r.return),oc(3,r),Ml(5,r,r.return));break;case 1:Ar(i,r),Er(r),d&512&&(jn||s===null||ti(s,s.return)),d&64&&Bi&&(r=r.updateQueue,r!==null&&(d=r.callbacks,d!==null&&(s=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=s===null?d:s.concat(d))));break;case 26:var p=za;if(Ar(i,r),Er(r),d&512&&(jn||s===null||ti(s,s.return)),d&4){var v=s!==null?s.memoizedState:null;if(d=r.memoizedState,s===null)if(d===null)if(r.stateNode===null){e:{d=r.type,s=r.memoizedProps,p=p.ownerDocument||p;t:switch(d){case"title":v=p.getElementsByTagName("title")[0],(!v||v[La]||v[Nn]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=p.createElement(d),p.head.insertBefore(v,p.querySelector("head > title"))),Gn(v,d,s),v[Nn]=r,tn(v),d=v;break e;case"link":var j=Ty("link","href",p).get(d+(s.href||""));if(j){for(var I=0;I<j.length;I++)if(v=j[I],v.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&v.getAttribute("rel")===(s.rel==null?null:s.rel)&&v.getAttribute("title")===(s.title==null?null:s.title)&&v.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){j.splice(I,1);break t}}v=p.createElement(d),Gn(v,d,s),p.head.appendChild(v);break;case"meta":if(j=Ty("meta","content",p).get(d+(s.content||""))){for(I=0;I<j.length;I++)if(v=j[I],v.getAttribute("content")===(s.content==null?null:""+s.content)&&v.getAttribute("name")===(s.name==null?null:s.name)&&v.getAttribute("property")===(s.property==null?null:s.property)&&v.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&v.getAttribute("charset")===(s.charSet==null?null:s.charSet)){j.splice(I,1);break t}}v=p.createElement(d),Gn(v,d,s),p.head.appendChild(v);break;default:throw Error(a(468,d))}v[Nn]=r,tn(v),d=v}r.stateNode=d}else Ay(p,r.type,r.stateNode);else r.stateNode=Cy(p,d,r.memoizedProps);else v!==d?(v===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):v.count--,d===null?Ay(p,r.type,r.stateNode):Cy(p,d,r.memoizedProps)):d===null&&r.stateNode!==null&&Nh(r,r.memoizedProps,s.memoizedProps)}break;case 27:Ar(i,r),Er(r),d&512&&(jn||s===null||ti(s,s.return)),s!==null&&d&4&&Nh(r,r.memoizedProps,s.memoizedProps);break;case 5:if(Ar(i,r),Er(r),d&512&&(jn||s===null||ti(s,s.return)),r.flags&32){p=r.stateNode;try{Ca(p,"")}catch(Ke){qt(r,r.return,Ke)}}d&4&&r.stateNode!=null&&(p=r.memoizedProps,Nh(r,p,s!==null?s.memoizedProps:p)),d&1024&&(zh=!0);break;case 6:if(Ar(i,r),Er(r),d&4){if(r.stateNode===null)throw Error(a(162));d=r.memoizedProps,s=r.stateNode;try{s.nodeValue=d}catch(Ke){qt(r,r.return,Ke)}}break;case 3:if(dd=null,p=za,za=ud(i.containerInfo),Ar(i,r),za=p,Er(r),d&4&&s!==null&&s.memoizedState.isDehydrated)try{Qo(i.containerInfo)}catch(Ke){qt(r,r.return,Ke)}zh&&(zh=!1,A4(r));break;case 4:d=za,za=ud(r.stateNode.containerInfo),Ar(i,r),Er(r),za=d;break;case 12:Ar(i,r),Er(r);break;case 31:Ar(i,r),Er(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,K0(r,d)));break;case 13:Ar(i,r),Er(r),r.child.flags&8192&&r.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Z0=Xt()),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,K0(r,d)));break;case 22:p=r.memoizedState!==null;var W=s!==null&&s.memoizedState!==null,se=Bi,xe=jn;if(Bi=se||p,jn=xe||W,Ar(i,r),jn=xe,Bi=se,Er(r),d&8192)e:for(i=r.stateNode,i._visibility=p?i._visibility&-2:i._visibility|1,p&&(s===null||W||Bi||jn||Os(r)),s=null,i=r;;){if(i.tag===5||i.tag===26){if(s===null){W=s=i;try{if(v=W.stateNode,p)j=v.style,typeof j.setProperty=="function"?j.setProperty("display","none","important"):j.display="none";else{I=W.stateNode;var ke=W.memoizedProps.style,ce=ke!=null&&ke.hasOwnProperty("display")?ke.display:null;I.style.display=ce==null||typeof ce=="boolean"?"":(""+ce).trim()}}catch(Ke){qt(W,W.return,Ke)}}}else if(i.tag===6){if(s===null){W=i;try{W.stateNode.nodeValue=p?"":W.memoizedProps}catch(Ke){qt(W,W.return,Ke)}}}else if(i.tag===18){if(s===null){W=i;try{var fe=W.stateNode;p?gy(fe,!0):gy(W.stateNode,!1)}catch(Ke){qt(W,W.return,Ke)}}}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;s===i&&(s=null),i=i.return}s===i&&(s=null),i.sibling.return=i.return,i=i.sibling}d&4&&(d=r.updateQueue,d!==null&&(s=d.retryQueue,s!==null&&(d.retryQueue=null,K0(r,s))));break;case 19:Ar(i,r),Er(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,K0(r,d)));break;case 30:break;case 21:break;default:Ar(i,r),Er(r)}}function Er(r){var i=r.flags;if(i&2){try{for(var s,d=r.return;d!==null;){if(v4(d)){s=d;break}d=d.return}if(s==null)throw Error(a(160));switch(s.tag){case 27:var p=s.stateNode,v=Mh(r);W0(r,v,p);break;case 5:var j=s.stateNode;s.flags&32&&(Ca(j,""),s.flags&=-33);var I=Mh(r);W0(r,I,j);break;case 3:case 4:var W=s.stateNode.containerInfo,se=Mh(r);Dh(r,se,W);break;default:throw Error(a(161))}}catch(xe){qt(r,r.return,xe)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function A4(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var i=r;A4(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),r=r.sibling}}function Ui(r,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)w4(r,i.alternate,i),i=i.sibling}function Os(r){for(r=r.child;r!==null;){var i=r;switch(i.tag){case 0:case 11:case 14:case 15:Ml(4,i,i.return),Os(i);break;case 1:ti(i,i.return);var s=i.stateNode;typeof s.componentWillUnmount=="function"&&g4(i,i.return,s),Os(i);break;case 27:vc(i.stateNode);case 26:case 5:ti(i,i.return),Os(i);break;case 22:i.memoizedState===null&&Os(i);break;case 30:Os(i);break;default:Os(i)}r=r.sibling}}function Hi(r,i,s){for(s=s&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var d=i.alternate,p=r,v=i,j=v.flags;switch(v.tag){case 0:case 11:case 15:Hi(p,v,s),oc(4,v);break;case 1:if(Hi(p,v,s),d=v,p=d.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(se){qt(d,d.return,se)}if(d=v,p=d.updateQueue,p!==null){var I=d.stateNode;try{var W=p.shared.hiddenCallbacks;if(W!==null)for(p.shared.hiddenCallbacks=null,p=0;p<W.length;p++)ag(W[p],I)}catch(se){qt(d,d.return,se)}}s&&j&64&&p4(v),uc(v,v.return);break;case 27:x4(v);case 26:case 5:Hi(p,v,s),s&&d===null&&j&4&&y4(v),uc(v,v.return);break;case 12:Hi(p,v,s);break;case 31:Hi(p,v,s),s&&j&4&&j4(p,v);break;case 13:Hi(p,v,s),s&&j&4&&C4(p,v);break;case 22:v.memoizedState===null&&Hi(p,v,s),uc(v,v.return);break;case 30:break;default:Hi(p,v,s)}i=i.sibling}}function Rh(r,i){var s=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),r=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(r=i.memoizedState.cachePool.pool),r!==s&&(r!=null&&r.refCount++,s!=null&&Da(s))}function Oh(r,i){r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&Da(r))}function Ra(r,i,s,d){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)E4(r,i,s,d),i=i.sibling}function E4(r,i,s,d){var p=i.flags;switch(i.tag){case 0:case 11:case 15:Ra(r,i,s,d),p&2048&&oc(9,i);break;case 1:Ra(r,i,s,d);break;case 3:Ra(r,i,s,d),p&2048&&(r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&Da(r)));break;case 12:if(p&2048){Ra(r,i,s,d),r=i.stateNode;try{var v=i.memoizedProps,j=v.id,I=v.onPostCommit;typeof I=="function"&&I(j,i.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(W){qt(i,i.return,W)}}else Ra(r,i,s,d);break;case 31:Ra(r,i,s,d);break;case 13:Ra(r,i,s,d);break;case 23:break;case 22:v=i.stateNode,j=i.alternate,i.memoizedState!==null?v._visibility&2?Ra(r,i,s,d):cc(r,i):v._visibility&2?Ra(r,i,s,d):(v._visibility|=2,Ho(r,i,s,d,(i.subtreeFlags&10256)!==0||!1)),p&2048&&Rh(j,i);break;case 24:Ra(r,i,s,d),p&2048&&Oh(i.alternate,i);break;default:Ra(r,i,s,d)}}function Ho(r,i,s,d,p){for(p=p&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var v=r,j=i,I=s,W=d,se=j.flags;switch(j.tag){case 0:case 11:case 15:Ho(v,j,I,W,p),oc(8,j);break;case 23:break;case 22:var xe=j.stateNode;j.memoizedState!==null?xe._visibility&2?Ho(v,j,I,W,p):cc(v,j):(xe._visibility|=2,Ho(v,j,I,W,p)),p&&se&2048&&Rh(j.alternate,j);break;case 24:Ho(v,j,I,W,p),p&&se&2048&&Oh(j.alternate,j);break;default:Ho(v,j,I,W,p)}i=i.sibling}}function cc(r,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var s=r,d=i,p=d.flags;switch(d.tag){case 22:cc(s,d),p&2048&&Rh(d.alternate,d);break;case 24:cc(s,d),p&2048&&Oh(d.alternate,d);break;default:cc(s,d)}i=i.sibling}}var dc=8192;function $o(r,i,s){if(r.subtreeFlags&dc)for(r=r.child;r!==null;)N4(r,i,s),r=r.sibling}function N4(r,i,s){switch(r.tag){case 26:$o(r,i,s),r.flags&dc&&r.memoizedState!==null&&c7(s,za,r.memoizedState,r.memoizedProps);break;case 5:$o(r,i,s);break;case 3:case 4:var d=za;za=ud(r.stateNode.containerInfo),$o(r,i,s),za=d;break;case 22:r.memoizedState===null&&(d=r.alternate,d!==null&&d.memoizedState!==null?(d=dc,dc=16777216,$o(r,i,s),dc=d):$o(r,i,s));break;default:$o(r,i,s)}}function M4(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 fc(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var d=i[s];Bn=d,z4(d,r)}M4(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)D4(r),r=r.sibling}function D4(r){switch(r.tag){case 0:case 11:case 15:fc(r),r.flags&2048&&Ml(9,r,r.return);break;case 3:fc(r);break;case 12:fc(r);break;case 22:var i=r.stateNode;r.memoizedState!==null&&i._visibility&2&&(r.return===null||r.return.tag!==13)?(i._visibility&=-3,X0(r)):fc(r);break;default:fc(r)}}function X0(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var d=i[s];Bn=d,z4(d,r)}M4(r)}for(r=r.child;r!==null;){switch(i=r,i.tag){case 0:case 11:case 15:Ml(8,i,i.return),X0(i);break;case 22:s=i.stateNode,s._visibility&2&&(s._visibility&=-3,X0(i));break;default:X0(i)}r=r.sibling}}function z4(r,i){for(;Bn!==null;){var s=Bn;switch(s.tag){case 0:case 11:case 15:Ml(8,s,i);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var d=s.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:Da(s.memoizedState.cache)}if(d=s.child,d!==null)d.return=s,Bn=d;else e:for(s=r;Bn!==null;){d=Bn;var p=d.sibling,v=d.return;if(k4(d),d===s){Bn=null;break e}if(p!==null){p.return=v,Bn=p;break e}Bn=v}}}var Cb={getCacheForType:function(r){var i=gn(dn),s=i.data.get(r);return s===void 0&&(s=r(),i.data.set(r,s)),s},cacheSignal:function(){return gn(dn).controller.signal}},Tb=typeof WeakMap=="function"?WeakMap:Map,Ot=0,Gt=null,kt=null,At=0,Bt=0,Yr=null,Dl=!1,Fo=!1,Ih=!1,$i=0,hn=0,zl=0,Is=0,_h=0,Wr=0,Po=0,hc=null,Nr=null,Lh=!1,Z0=0,R4=0,Q0=1/0,J0=null,Rl=null,On=0,Ol=null,Go=null,Fi=0,Bh=0,qh=null,O4=null,mc=0,Uh=null;function Kr(){return(Ot&2)!==0&&At!==0?At&-At:Z.T!==null?Vh():bu()}function I4(){if(Wr===0)if((At&536870912)===0||wt){var r=fi;fi<<=1,(fi&3932160)===0&&(fi=262144),Wr=r}else Wr=536870912;return r=Gr.current,r!==null&&(r.flags|=32),Wr}function Mr(r,i,s){(r===Gt&&(Bt===2||Bt===9)||r.cancelPendingCommit!==null)&&(Vo(r,0),Il(r,At,Wr,!1)),rl(r,s),((Ot&2)===0||r!==Gt)&&(r===Gt&&((Ot&2)===0&&(Is|=s),hn===4&&Il(r,At,Wr,!1)),ni(r))}function _4(r,i,s){if((Ot&6)!==0)throw Error(a(327));var d=!s&&(i&127)===0&&(i&r.expiredLanes)===0||Jt(r,i),p=d?Nb(r,i):$h(r,i,!0),v=d;do{if(p===0){Fo&&!d&&Il(r,i,0,!1);break}else{if(s=r.current.alternate,v&&!Ab(s)){p=$h(r,i,!1),v=!1;continue}if(p===2){if(v=i,r.errorRecoveryDisabledLanes&v)var j=0;else j=r.pendingLanes&-536870913,j=j!==0?j:j&536870912?536870912:0;if(j!==0){i=j;e:{var I=r;p=hc;var W=I.current.memoizedState.isDehydrated;if(W&&(Vo(I,j).flags|=256),j=$h(I,j,!1),j!==2){if(Ih&&!W){I.errorRecoveryDisabledLanes|=v,Is|=v,p=4;break e}v=Nr,Nr=p,v!==null&&(Nr===null?Nr=v:Nr.push.apply(Nr,v))}p=j}if(v=!1,p!==2)continue}}if(p===1){Vo(r,0),Il(r,i,0,!0);break}e:{switch(d=r,v=p,v){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:Il(d,i,Wr,!Dl);break e;case 2:Nr=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(p=Z0+300-Xt(),10<p)){if(Il(d,i,Wr,!Dl),wa(d,0,!0)!==0)break e;Fi=i,d.timeoutHandle=hy(L4.bind(null,d,s,Nr,J0,Lh,i,Wr,Is,Po,Dl,v,"Throttled",-0,0),p);break e}L4(d,s,Nr,J0,Lh,i,Wr,Is,Po,Dl,v,null,-0,0)}}break}while(!0);ni(r)}function L4(r,i,s,d,p,v,j,I,W,se,xe,ke,ce,fe){if(r.timeoutHandle=-1,ke=i.subtreeFlags,ke&8192||(ke&16785408)===16785408){ke={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:bn},N4(i,v,ke);var Ke=(v&62914560)===v?Z0-Xt():(v&4194048)===v?R4-Xt():0;if(Ke=d7(ke,Ke),Ke!==null){Fi=v,r.cancelPendingCommit=Ke(G4.bind(null,r,i,v,s,d,p,j,I,W,xe,ke,null,ce,fe)),Il(r,v,j,!se);return}}G4(r,i,v,s,d,p,j,I,W)}function Ab(r){for(var i=r;;){var s=i.tag;if((s===0||s===11||s===15)&&i.flags&16384&&(s=i.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var d=0;d<s.length;d++){var p=s[d],v=p.getSnapshot;p=p.value;try{if(!Dn(v(),p))return!1}catch{return!1}}if(s=i.child,i.subtreeFlags&16384&&s!==null)s.return=i,i=s;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 Il(r,i,s,d){i&=~_h,i&=~Is,r.suspendedLanes|=i,r.pingedLanes&=~i,d&&(r.warmLanes|=i),d=r.expirationTimes;for(var p=i;0<p;){var v=31-xt(p),j=1<<v;d[v]=-1,p&=~j}s!==0&&vu(r,s,i)}function ed(){return(Ot&6)===0?(pc(0),!1):!0}function Hh(){if(kt!==null){if(Bt===0)var r=kt.return;else r=kt,jr=Ni=null,rh(r),Ri=null,Cl=0,r=kt;for(;r!==null;)m4(r.alternate,r),r=r.return;kt=null}}function Vo(r,i){var s=r.timeoutHandle;s!==-1&&(r.timeoutHandle=-1,Yb(s)),s=r.cancelPendingCommit,s!==null&&(r.cancelPendingCommit=null,s()),Fi=0,Hh(),Gt=r,kt=s=Ma(r.current,null),At=i,Bt=0,Yr=null,Dl=!1,Fo=Jt(r,i),Ih=!1,Po=Wr=_h=Is=zl=hn=0,Nr=hc=null,Lh=!1,(i&8)!==0&&(i|=i&32);var d=r.entangledLanes;if(d!==0)for(r=r.entanglements,d&=i;0<d;){var p=31-xt(d),v=1<<p;i|=r[p],d&=~v}return $i=i,No(),s}function B4(r,i){pt=null,Z.H=ic,i===Rn||i===Cr?(i=z0(),Bt=3):i===ec?(i=z0(),Bt=4):Bt=i===xh?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Yr=i,kt===null&&(hn=1,F0(r,kr(i,r.current)))}function q4(){var r=Gr.current;return r===null?!0:(At&4194048)===At?ma===null:(At&62914560)===At||(At&536870912)!==0?r===ma:!1}function U4(){var r=Z.H;return Z.H=ic,r===null?ic:r}function H4(){var r=Z.A;return Z.A=Cb,r}function td(){hn=4,Dl||(At&4194048)!==At&&Gr.current!==null||(Fo=!0),(zl&134217727)===0&&(Is&134217727)===0||Gt===null||Il(Gt,At,Wr,!1)}function $h(r,i,s){var d=Ot;Ot|=2;var p=U4(),v=H4();(Gt!==r||At!==i)&&(J0=null,Vo(r,i)),i=!1;var j=hn;e:do try{if(Bt!==0&&kt!==null){var I=kt,W=Yr;switch(Bt){case 8:Hh(),j=6;break e;case 3:case 2:case 9:case 6:Gr.current===null&&(i=!0);var se=Bt;if(Bt=0,Yr=null,Yo(r,I,W,se),s&&Fo){j=0;break e}break;default:se=Bt,Bt=0,Yr=null,Yo(r,I,W,se)}}Eb(),j=hn;break}catch(xe){B4(r,xe)}while(!0);return i&&r.shellSuspendCounter++,jr=Ni=null,Ot=d,Z.H=p,Z.A=v,kt===null&&(Gt=null,At=0,No()),j}function Eb(){for(;kt!==null;)$4(kt)}function Nb(r,i){var s=Ot;Ot|=2;var d=U4(),p=H4();Gt!==r||At!==i?(J0=null,Q0=Xt()+500,Vo(r,i)):Fo=Jt(r,i);e:do try{if(Bt!==0&&kt!==null){i=kt;var v=Yr;t:switch(Bt){case 1:Bt=0,Yr=null,Yo(r,i,v,1);break;case 2:case 9:if(D0(v)){Bt=0,Yr=null,F4(i);break}i=function(){Bt!==2&&Bt!==9||Gt!==r||(Bt=7),ni(r)},v.then(i,i);break e;case 3:Bt=7;break e;case 4:Bt=5;break e;case 7:D0(v)?(Bt=0,Yr=null,F4(i)):(Bt=0,Yr=null,Yo(r,i,v,7));break;case 5:var j=null;switch(kt.tag){case 26:j=kt.memoizedState;case 5:case 27:var I=kt;if(j?Ey(j):I.stateNode.complete){Bt=0,Yr=null;var W=I.sibling;if(W!==null)kt=W;else{var se=I.return;se!==null?(kt=se,nd(se)):kt=null}break t}}Bt=0,Yr=null,Yo(r,i,v,5);break;case 6:Bt=0,Yr=null,Yo(r,i,v,6);break;case 8:Hh(),hn=6;break e;default:throw Error(a(462))}}Mb();break}catch(xe){B4(r,xe)}while(!0);return jr=Ni=null,Z.H=d,Z.A=p,Ot=s,kt!==null?0:(Gt=null,At=0,No(),hn)}function Mb(){for(;kt!==null&&!Vn();)$4(kt)}function $4(r){var i=f4(r.alternate,r,$i);r.memoizedProps=r.pendingProps,i===null?nd(r):kt=i}function F4(r){var i=r,s=i.alternate;switch(i.tag){case 15:case 0:i=l4(s,i,i.pendingProps,i.type,void 0,At);break;case 11:i=l4(s,i,i.pendingProps,i.type.render,i.ref,At);break;case 5:rh(i);default:m4(s,i),i=kt=C0(i,$i),i=f4(s,i,$i)}r.memoizedProps=r.pendingProps,i===null?nd(r):kt=i}function Yo(r,i,s,d){jr=Ni=null,rh(i),Ri=null,Cl=0;var p=i.return;try{if(vb(r,p,i,s,At)){hn=1,F0(r,kr(s,r.current)),kt=null;return}}catch(v){if(p!==null)throw kt=p,v;hn=1,F0(r,kr(s,r.current)),kt=null;return}i.flags&32768?(wt||d===1?r=!0:Fo||(At&536870912)!==0?r=!1:(Dl=r=!0,(d===2||d===9||d===3||d===6)&&(d=Gr.current,d!==null&&d.tag===13&&(d.flags|=16384))),P4(i,r)):nd(i)}function nd(r){var i=r;do{if((i.flags&32768)!==0){P4(i,Dl);return}r=i.return;var s=wb(i.alternate,i,$i);if(s!==null){kt=s;return}if(i=i.sibling,i!==null){kt=i;return}kt=i=r}while(i!==null);hn===0&&(hn=5)}function P4(r,i){do{var s=kb(r.alternate,r);if(s!==null){s.flags&=32767,kt=s;return}if(s=r.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!i&&(r=r.sibling,r!==null)){kt=r;return}kt=r=s}while(r!==null);hn=6,kt=null}function G4(r,i,s,d,p,v,j,I,W){r.cancelPendingCommit=null;do rd();while(On!==0);if((Ot&6)!==0)throw Error(a(327));if(i!==null){if(i===r.current)throw Error(a(177));if(v=i.lanes|i.childLanes,v|=Bu,as(r,s,v,j,I,W),r===Gt&&(kt=Gt=null,At=0),Go=i,Ol=r,Fi=s,Bh=v,qh=p,O4=d,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,Ob(re,function(){return X4(),null})):(r.callbackNode=null,r.callbackPriority=0),d=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||d){d=Z.T,Z.T=null,p=ge.p,ge.p=2,j=Ot,Ot|=4;try{Sb(r,i,s)}finally{Ot=j,ge.p=p,Z.T=d}}On=1,V4(),Y4(),W4()}}function V4(){if(On===1){On=0;var r=Ol,i=Go,s=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||s){s=Z.T,Z.T=null;var d=ge.p;ge.p=2;var p=Ot;Ot|=4;try{T4(i,r);var v=em,j=x0(r.containerInfo),I=v.focusedElem,W=v.selectionRange;if(j!==I&&I&&I.ownerDocument&&wo(I.ownerDocument.documentElement,I)){if(W!==null&&Fn(I)){var se=W.start,xe=W.end;if(xe===void 0&&(xe=se),"selectionStart"in I)I.selectionStart=se,I.selectionEnd=Math.min(xe,I.value.length);else{var ke=I.ownerDocument||document,ce=ke&&ke.defaultView||window;if(ce.getSelection){var fe=ce.getSelection(),Ke=I.textContent.length,ot=Math.min(W.start,Ke),Pt=W.end===void 0?ot:Math.min(W.end,Ke);!fe.extend&&ot>Pt&&(j=Pt,Pt=ot,ot=j);var ae=bo(I,ot),Q=bo(I,Pt);if(ae&&Q&&(fe.rangeCount!==1||fe.anchorNode!==ae.node||fe.anchorOffset!==ae.offset||fe.focusNode!==Q.node||fe.focusOffset!==Q.offset)){var le=ke.createRange();le.setStart(ae.node,ae.offset),fe.removeAllRanges(),ot>Pt?(fe.addRange(le),fe.extend(Q.node,Q.offset)):(le.setEnd(Q.node,Q.offset),fe.addRange(le))}}}}for(ke=[],fe=I;fe=fe.parentNode;)fe.nodeType===1&&ke.push({element:fe,left:fe.scrollLeft,top:fe.scrollTop});for(typeof I.focus=="function"&&I.focus(),I=0;I<ke.length;I++){var we=ke[I];we.element.scrollLeft=we.left,we.element.scrollTop=we.top}}pd=!!Jh,em=Jh=null}finally{Ot=p,ge.p=d,Z.T=s}}r.current=i,On=2}}function Y4(){if(On===2){On=0;var r=Ol,i=Go,s=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||s){s=Z.T,Z.T=null;var d=ge.p;ge.p=2;var p=Ot;Ot|=4;try{w4(r,i.alternate,i)}finally{Ot=p,ge.p=d,Z.T=s}}On=3}}function W4(){if(On===4||On===3){On=0,Un();var r=Ol,i=Go,s=Fi,d=O4;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?On=5:(On=0,Go=Ol=null,K4(r,r.pendingLanes));var p=r.pendingLanes;if(p===0&&(Rl=null),xu(s),i=i.stateNode,gt&&typeof gt.onCommitFiberRoot=="function")try{gt.onCommitFiberRoot(Ct,i,void 0,(i.current.flags&128)===128)}catch{}if(d!==null){i=Z.T,p=ge.p,ge.p=2,Z.T=null;try{for(var v=r.onRecoverableError,j=0;j<d.length;j++){var I=d[j];v(I.value,{componentStack:I.stack})}}finally{Z.T=i,ge.p=p}}(Fi&3)!==0&&rd(),ni(r),p=r.pendingLanes,(s&261930)!==0&&(p&42)!==0?r===Uh?mc++:(mc=0,Uh=r):mc=0,pc(0)}}function K4(r,i){(r.pooledCacheLanes&=i)===0&&(i=r.pooledCache,i!=null&&(r.pooledCache=null,Da(i)))}function rd(){return V4(),Y4(),W4(),X4()}function X4(){if(On!==5)return!1;var r=Ol,i=Bh;Bh=0;var s=xu(Fi),d=Z.T,p=ge.p;try{ge.p=32>s?32:s,Z.T=null,s=qh,qh=null;var v=Ol,j=Fi;if(On=0,Go=Ol=null,Fi=0,(Ot&6)!==0)throw Error(a(331));var I=Ot;if(Ot|=4,D4(v.current),E4(v,v.current,j,s),Ot=I,pc(0,!1),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(Ct,v)}catch{}return!0}finally{ge.p=p,Z.T=d,K4(r,i)}}function Z4(r,i,s){i=kr(s,i),i=vh(r.stateNode,i,2),r=De(r,i,2),r!==null&&(rl(r,2),ni(r))}function qt(r,i,s){if(r.tag===3)Z4(r,r,s);else for(;i!==null;){if(i.tag===3){Z4(i,r,s);break}else if(i.tag===1){var d=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Rl===null||!Rl.has(d))){r=kr(s,r),s=Qg(2),d=De(i,s,2),d!==null&&(Jg(s,d,i,r),rl(d,2),ni(d));break}}i=i.return}}function Fh(r,i,s){var d=r.pingCache;if(d===null){d=r.pingCache=new Tb;var p=new Set;d.set(i,p)}else p=d.get(i),p===void 0&&(p=new Set,d.set(i,p));p.has(s)||(Ih=!0,p.add(s),r=Db.bind(null,r,i,s),i.then(r,r))}function Db(r,i,s){var d=r.pingCache;d!==null&&d.delete(i),r.pingedLanes|=r.suspendedLanes&s,r.warmLanes&=~s,Gt===r&&(At&s)===s&&(hn===4||hn===3&&(At&62914560)===At&&300>Xt()-Z0?(Ot&2)===0&&Vo(r,0):_h|=s,Po===At&&(Po=0)),ni(r)}function Q4(r,i){i===0&&(i=en()),r=Ti(r,i),r!==null&&(rl(r,i),ni(r))}function zb(r){var i=r.memoizedState,s=0;i!==null&&(s=i.retryLane),Q4(r,s)}function Rb(r,i){var s=0;switch(r.tag){case 31:case 13:var d=r.stateNode,p=r.memoizedState;p!==null&&(s=p.retryLane);break;case 19:d=r.stateNode;break;case 22:d=r.stateNode._retryCache;break;default:throw Error(a(314))}d!==null&&d.delete(i),Q4(r,s)}function Ob(r,i){return Kt(r,i)}var ad=null,Wo=null,Ph=!1,id=!1,Gh=!1,_l=0;function ni(r){r!==Wo&&r.next===null&&(Wo===null?ad=Wo=r:Wo=Wo.next=r),id=!0,Ph||(Ph=!0,_b())}function pc(r,i){if(!Gh&&id){Gh=!0;do for(var s=!1,d=ad;d!==null;){if(r!==0){var p=d.pendingLanes;if(p===0)var v=0;else{var j=d.suspendedLanes,I=d.pingedLanes;v=(1<<31-xt(42|r)+1)-1,v&=p&~(j&~I),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(s=!0,ny(d,v))}else v=At,v=wa(d,d===Gt?v:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(v&3)===0||Jt(d,v)||(s=!0,ny(d,v));d=d.next}while(s);Gh=!1}}function Ib(){J4()}function J4(){id=Ph=!1;var r=0;_l!==0&&Vb()&&(r=_l);for(var i=Xt(),s=null,d=ad;d!==null;){var p=d.next,v=ey(d,i);v===0?(d.next=null,s===null?ad=p:s.next=p,p===null&&(Wo=s)):(s=d,(r!==0||(v&3)!==0)&&(id=!0)),d=p}On!==0&&On!==5||pc(r),_l!==0&&(_l=0)}function ey(r,i){for(var s=r.suspendedLanes,d=r.pingedLanes,p=r.expirationTimes,v=r.pendingLanes&-62914561;0<v;){var j=31-xt(v),I=1<<j,W=p[j];W===-1?((I&s)===0||(I&d)!==0)&&(p[j]=nl(I,i)):W<=i&&(r.expiredLanes|=I),v&=~I}if(i=Gt,s=At,s=wa(r,r===i?s:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d=r.callbackNode,s===0||r===i&&(Bt===2||Bt===9)||r.cancelPendingCommit!==null)return d!==null&&d!==null&&Ln(d),r.callbackNode=null,r.callbackPriority=0;if((s&3)===0||Jt(r,s)){if(i=s&-s,i===r.callbackPriority)return i;switch(d!==null&&Ln(d),xu(s)){case 2:case 8:s=Le;break;case 32:s=re;break;case 268435456:s=qe;break;default:s=re}return d=ty.bind(null,r),s=Kt(s,d),r.callbackPriority=i,r.callbackNode=s,i}return d!==null&&d!==null&&Ln(d),r.callbackPriority=2,r.callbackNode=null,2}function ty(r,i){if(On!==0&&On!==5)return r.callbackNode=null,r.callbackPriority=0,null;var s=r.callbackNode;if(rd()&&r.callbackNode!==s)return null;var d=At;return d=wa(r,r===Gt?d:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d===0?null:(_4(r,d,i),ey(r,Xt()),r.callbackNode!=null&&r.callbackNode===s?ty.bind(null,r):null)}function ny(r,i){if(rd())return null;_4(r,i,!0)}function _b(){Wb(function(){(Ot&6)!==0?Kt(ve,Ib):J4()})}function Vh(){if(_l===0){var r=Sl;r===0&&(r=aa,aa<<=1,(aa&261888)===0&&(aa=256)),_l=r}return _l}function ry(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:$a(""+r)}function ay(r,i){var s=i.ownerDocument.createElement("input");return s.name=i.name,s.value=i.value,r.id&&s.setAttribute("form",r.id),i.parentNode.insertBefore(s,i),r=new FormData(r),s.parentNode.removeChild(s),r}function Lb(r,i,s,d,p){if(i==="submit"&&s&&s.stateNode===p){var v=ry((p[xn]||null).action),j=d.submitter;j&&(i=(i=j[xn]||null)?ry(i.formAction):j.getAttribute("formAction"),i!==null&&(v=i,j=null));var I=new Ta("action","action",null,d,p);r.push({event:I,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(_l!==0){var W=j?ay(p,j):new FormData(p);fh(s,{pending:!0,data:W,method:p.method,action:v},null,W)}}else typeof v=="function"&&(I.preventDefault(),W=j?ay(p,j):new FormData(p),fh(s,{pending:!0,data:W,method:p.method,action:v},v,W))},currentTarget:p}]})}}for(var Yh=0;Yh<Ao.length;Yh++){var Wh=Ao[Yh],Bb=Wh.toLowerCase(),qb=Wh[0].toUpperCase()+Wh.slice(1);Hr(Bb,"on"+qb)}Hr(b0,"onAnimationEnd"),Hr(To,"onAnimationIteration"),Hr(w0,"onAnimationStart"),Hr("dblclick","onDoubleClick"),Hr("focusin","onFocus"),Hr("focusout","onBlur"),Hr(Vf,"onTransitionRun"),Hr(_u,"onTransitionStart"),Hr(k0,"onTransitionCancel"),Hr(Lu,"onTransitionEnd"),qa("onMouseEnter",["mouseout","mouseover"]),qa("onMouseLeave",["mouseout","mouseover"]),qa("onPointerEnter",["pointerout","pointerover"]),qa("onPointerLeave",["pointerout","pointerover"]),Hn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Hn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Hn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Hn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Hn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Hn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var gc="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(" "),Ub=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(gc));function iy(r,i){i=(i&4)!==0;for(var s=0;s<r.length;s++){var d=r[s],p=d.event;d=d.listeners;e:{var v=void 0;if(i)for(var j=d.length-1;0<=j;j--){var I=d[j],W=I.instance,se=I.currentTarget;if(I=I.listener,W!==v&&p.isPropagationStopped())break e;v=I,p.currentTarget=se;try{v(p)}catch(xe){Eo(xe)}p.currentTarget=null,v=W}else for(j=0;j<d.length;j++){if(I=d[j],W=I.instance,se=I.currentTarget,I=I.listener,W!==v&&p.isPropagationStopped())break e;v=I,p.currentTarget=se;try{v(p)}catch(xe){Eo(xe)}p.currentTarget=null,v=W}}}}function St(r,i){var s=i[_a];s===void 0&&(s=i[_a]=new Set);var d=r+"__bubble";s.has(d)||(ly(i,r,2,!1),s.add(d))}function Kh(r,i,s){var d=0;i&&(d|=4),ly(s,r,d,i)}var ld="_reactListening"+Math.random().toString(36).slice(2);function Xh(r){if(!r[ld]){r[ld]=!0,d0.forEach(function(s){s!=="selectionchange"&&(Ub.has(s)||Kh(s,!1,r),Kh(s,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[ld]||(i[ld]=!0,Kh("selectionchange",!1,i))}}function ly(r,i,s,d){switch(Iy(i)){case 2:var p=m7;break;case 8:p=p7;break;default:p=dm}s=p.bind(null,i,s,r),p=void 0,!cs||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(p=!0),d?p!==void 0?r.addEventListener(i,s,{capture:!0,passive:p}):r.addEventListener(i,s,!0):p!==void 0?r.addEventListener(i,s,{passive:p}):r.addEventListener(i,s,!1)}function Zh(r,i,s,d,p){var v=d;if((i&1)===0&&(i&2)===0&&d!==null)e:for(;;){if(d===null)return;var j=d.tag;if(j===3||j===4){var I=d.stateNode.containerInfo;if(I===p)break;if(j===4)for(j=d.return;j!==null;){var W=j.tag;if((W===3||W===4)&&j.stateNode.containerInfo===p)return;j=j.return}for(;I!==null;){if(j=ia(I),j===null)return;if(W=j.tag,W===5||W===6||W===26||W===27){d=v=j;continue e}I=I.parentNode}}d=d.return}cl(function(){var se=v,xe=os(s),ke=[];e:{var ce=S0.get(r);if(ce!==void 0){var fe=Ta,Ke=r;switch(r){case"keypress":if(fs(s)===0)break e;case"keydown":case"keyup":fe=fo;break;case"focusin":Ke="focus",fe=oo;break;case"focusout":Ke="blur",fe=oo;break;case"beforeblur":case"afterblur":fe=oo;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=so;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=Aa;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=Nu;break;case b0:case To:case w0:fe=ms;break;case Lu:fe=po;break;case"scroll":case"scrollend":fe=yi;break;case"wheel":fe=y0;break;case"copy":case"cut":case"paste":fe=co;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=ys;break;case"toggle":case"beforetoggle":fe=pn}var ot=(i&4)!==0,Pt=!ot&&(r==="scroll"||r==="scrollend"),ae=ot?ce!==null?ce+"Capture":null:ce;ot=[];for(var Q=se,le;Q!==null;){var we=Q;if(le=we.stateNode,we=we.tag,we!==5&&we!==26&&we!==27||le===null||ae===null||(we=us(Q,ae),we!=null&&ot.push(yc(Q,we,le))),Pt)break;Q=Q.return}0<ot.length&&(ce=new fe(ce,Ke,null,s,xe),ke.push({event:ce,listeners:ot}))}}if((i&7)===0){e:{if(ce=r==="mouseover"||r==="pointerover",fe=r==="mouseout"||r==="pointerout",ce&&s!==qr&&(Ke=s.relatedTarget||s.fromElement)&&(ia(Ke)||Ke[_r]))break e;if((fe||ce)&&(ce=xe.window===xe?xe:(ce=xe.ownerDocument)?ce.defaultView||ce.parentWindow:window,fe?(Ke=s.relatedTarget||s.toElement,fe=se,Ke=Ke?ia(Ke):null,Ke!==null&&(Pt=u(Ke),ot=Ke.tag,Ke!==Pt||ot!==5&&ot!==27&&ot!==6)&&(Ke=null)):(fe=null,Ke=se),fe!==Ke)){if(ot=so,we="onMouseLeave",ae="onMouseEnter",Q="mouse",(r==="pointerout"||r==="pointerover")&&(ot=ys,we="onPointerLeave",ae="onPointerEnter",Q="pointer"),Pt=fe==null?ce:mi(fe),le=Ke==null?ce:mi(Ke),ce=new ot(we,Q+"leave",fe,s,xe),ce.target=Pt,ce.relatedTarget=le,we=null,ia(xe)===se&&(ot=new ot(ae,Q+"enter",Ke,s,xe),ot.target=le,ot.relatedTarget=Pt,we=ot),Pt=we,fe&&Ke)t:{for(ot=Hb,ae=fe,Q=Ke,le=0,we=ae;we;we=ot(we))le++;we=0;for(var at=Q;at;at=ot(at))we++;for(;0<le-we;)ae=ot(ae),le--;for(;0<we-le;)Q=ot(Q),we--;for(;le--;){if(ae===Q||Q!==null&&ae===Q.alternate){ot=ae;break t}ae=ot(ae),Q=ot(Q)}ot=null}else ot=null;fe!==null&&sy(ke,ce,fe,ot,!1),Ke!==null&&Pt!==null&&sy(ke,Pt,Ke,ot,!0)}}e:{if(ce=se?mi(se):window,fe=ce.nodeName&&ce.nodeName.toLowerCase(),fe==="select"||fe==="input"&&ce.type==="file")var Dt=vo;else if(zu(ce))if(ws)Dt=Ss;else{Dt=Ou;var Qe=Pf}else fe=ce.nodeName,!fe||fe.toLowerCase()!=="input"||ce.type!=="checkbox"&&ce.type!=="radio"?se&&ss(se.elementType)&&(Dt=vo):Dt=Wa;if(Dt&&(Dt=Dt(r,se))){yo(ke,Dt,s,xe);break e}Qe&&Qe(r,ce,se),r==="focusout"&&se&&ce.type==="number"&&se.memoizedProps.value!=null&&la(ce,"number",ce.value)}switch(Qe=se?mi(se):window,r){case"focusin":(zu(Qe)||Qe.contentEditable==="true")&&(pl=Qe,ko=se,js=null);break;case"focusout":js=ko=pl=null;break;case"mousedown":So=!0;break;case"contextmenu":case"mouseup":case"dragend":So=!1,jo(ke,s,xe);break;case"selectionchange":if(Gf)break;case"keydown":case"keyup":jo(ke,s,xe)}var yt;if(Ea)e:{switch(r){case"compositionstart":var Et="onCompositionStart";break e;case"compositionend":Et="onCompositionEnd";break e;case"compositionupdate":Et="onCompositionUpdate";break e}Et=void 0}else xr?ml(r,s)&&(Et="onCompositionEnd"):r==="keydown"&&s.keyCode===229&&(Et="onCompositionStart");Et&&(ki&&s.locale!=="ko"&&(xr||Et!=="onCompositionStart"?Et==="onCompositionEnd"&&xr&&(yt=g0()):(rr=xe,Cu="value"in rr?rr.value:rr.textContent,xr=!0)),Qe=sd(se,Et),0<Qe.length&&(Et=new wi(Et,r,null,s,xe),ke.push({event:Et,listeners:Qe}),yt?Et.data=yt:(yt=go(s),yt!==null&&(Et.data=yt)))),(yt=Tt?Hf(r,s):$f(r,s))&&(Et=sd(se,"onBeforeInput"),0<Et.length&&(Qe=new wi("onBeforeInput","beforeinput",null,s,xe),ke.push({event:Qe,listeners:Et}),Qe.data=yt)),Lb(ke,r,se,s,xe)}iy(ke,i)})}function yc(r,i,s){return{instance:r,listener:i,currentTarget:s}}function sd(r,i){for(var s=i+"Capture",d=[];r!==null;){var p=r,v=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||v===null||(p=us(r,s),p!=null&&d.unshift(yc(r,p,v)),p=us(r,i),p!=null&&d.push(yc(r,p,v))),r.tag===3)return d;r=r.return}return[]}function Hb(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function sy(r,i,s,d,p){for(var v=i._reactName,j=[];s!==null&&s!==d;){var I=s,W=I.alternate,se=I.stateNode;if(I=I.tag,W!==null&&W===d)break;I!==5&&I!==26&&I!==27||se===null||(W=se,p?(se=us(s,v),se!=null&&j.unshift(yc(s,se,W))):p||(se=us(s,v),se!=null&&j.push(yc(s,se,W)))),s=s.return}j.length!==0&&r.push({event:i,listeners:j})}var $b=/\r\n?/g,Fb=/\u0000|\uFFFD/g;function oy(r){return(typeof r=="string"?r:""+r).replace($b,`
50
- `).replace(Fb,"")}function uy(r,i){return i=oy(i),oy(r)===i}function Ft(r,i,s,d,p,v){switch(s){case"children":typeof d=="string"?i==="body"||i==="textarea"&&d===""||Ca(r,d):(typeof d=="number"||typeof d=="bigint")&&i!=="body"&&Ca(r,""+d);break;case"className":is(r,"class",d);break;case"tabIndex":is(r,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":is(r,s,d);break;case"style":gi(r,d,v);break;case"data":if(i!=="object"){is(r,"data",d);break}case"src":case"href":if(d===""&&(i!=="a"||s!=="href")){r.removeAttribute(s);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(s);break}d=$a(""+d),r.setAttribute(s,d);break;case"action":case"formAction":if(typeof d=="function"){r.setAttribute(s,"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"&&(s==="formAction"?(i!=="input"&&Ft(r,i,"name",p.name,p,null),Ft(r,i,"formEncType",p.formEncType,p,null),Ft(r,i,"formMethod",p.formMethod,p,null),Ft(r,i,"formTarget",p.formTarget,p,null)):(Ft(r,i,"encType",p.encType,p,null),Ft(r,i,"method",p.method,p,null),Ft(r,i,"target",p.target,p,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(s);break}d=$a(""+d),r.setAttribute(s,d);break;case"onClick":d!=null&&(r.onclick=bn);break;case"onScroll":d!=null&&St("scroll",r);break;case"onScrollEnd":d!=null&&St("scrollend",r);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(a(61));if(s=d.__html,s!=null){if(p.children!=null)throw Error(a(60));r.innerHTML=s}}break;case"multiple":r.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":r.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){r.removeAttribute("xlink:href");break}s=$a(""+d),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(s,""+d):r.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":d&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(s,""):r.removeAttribute(s);break;case"capture":case"download":d===!0?r.setAttribute(s,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(s,d):r.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?r.setAttribute(s,d):r.removeAttribute(s);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?r.removeAttribute(s):r.setAttribute(s,d);break;case"popover":St("beforetoggle",r),St("toggle",r),sl(r,"popover",d);break;case"xlinkActuate":tr(r,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":tr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":tr(r,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":tr(r,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":tr(r,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":tr(r,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":tr(r,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":tr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":tr(r,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":sl(r,"is",d);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=ao.get(s)||s,sl(r,s,d))}}function Qh(r,i,s,d,p,v){switch(s){case"style":gi(r,d,v);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(a(61));if(s=d.__html,s!=null){if(p.children!=null)throw Error(a(60));r.innerHTML=s}}break;case"children":typeof d=="string"?Ca(r,d):(typeof d=="number"||typeof d=="bigint")&&Ca(r,""+d);break;case"onScroll":d!=null&&St("scroll",r);break;case"onScrollEnd":d!=null&&St("scrollend",r);break;case"onClick":d!=null&&(r.onclick=bn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ku.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(p=s.endsWith("Capture"),i=s.slice(2,p?s.length-7:void 0),v=r[xn]||null,v=v!=null?v[s]:null,typeof v=="function"&&r.removeEventListener(i,v,p),typeof d=="function")){typeof v!="function"&&v!==null&&(s in r?r[s]=null:r.hasAttribute(s)&&r.removeAttribute(s)),r.addEventListener(i,d,p);break e}s in r?r[s]=d:d===!0?r.setAttribute(s,""):sl(r,s,d)}}}function Gn(r,i,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":St("error",r),St("load",r);var d=!1,p=!1,v;for(v in s)if(s.hasOwnProperty(v)){var j=s[v];if(j!=null)switch(v){case"src":d=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Ft(r,i,v,j,s,null)}}p&&Ft(r,i,"srcSet",s.srcSet,s,null),d&&Ft(r,i,"src",s.src,s,null);return;case"input":St("invalid",r);var I=v=j=p=null,W=null,se=null;for(d in s)if(s.hasOwnProperty(d)){var xe=s[d];if(xe!=null)switch(d){case"name":p=xe;break;case"type":j=xe;break;case"checked":W=xe;break;case"defaultChecked":se=xe;break;case"value":v=xe;break;case"defaultValue":I=xe;break;case"children":case"dangerouslySetInnerHTML":if(xe!=null)throw Error(a(137,i));break;default:Ft(r,i,d,xe,s,null)}}Br(r,v,I,W,se,j,p,!1);return;case"select":St("invalid",r),d=j=v=null;for(p in s)if(s.hasOwnProperty(p)&&(I=s[p],I!=null))switch(p){case"value":v=I;break;case"defaultValue":j=I;break;case"multiple":d=I;default:Ft(r,i,p,I,s,null)}i=v,s=j,r.multiple=!!d,i!=null?pi(r,!!d,i,!1):s!=null&&pi(r,!!d,s,!0);return;case"textarea":St("invalid",r),v=p=d=null;for(j in s)if(s.hasOwnProperty(j)&&(I=s[j],I!=null))switch(j){case"value":d=I;break;case"defaultValue":p=I;break;case"children":v=I;break;case"dangerouslySetInnerHTML":if(I!=null)throw Error(a(91));break;default:Ft(r,i,j,I,s,null)}ju(r,d,p,v);return;case"option":for(W in s)if(s.hasOwnProperty(W)&&(d=s[W],d!=null))switch(W){case"selected":r.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:Ft(r,i,W,d,s,null)}return;case"dialog":St("beforetoggle",r),St("toggle",r),St("cancel",r),St("close",r);break;case"iframe":case"object":St("load",r);break;case"video":case"audio":for(d=0;d<gc.length;d++)St(gc[d],r);break;case"image":St("error",r),St("load",r);break;case"details":St("toggle",r);break;case"embed":case"source":case"link":St("error",r),St("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(se in s)if(s.hasOwnProperty(se)&&(d=s[se],d!=null))switch(se){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Ft(r,i,se,d,s,null)}return;default:if(ss(i)){for(xe in s)s.hasOwnProperty(xe)&&(d=s[xe],d!==void 0&&Qh(r,i,xe,d,s,void 0));return}}for(I in s)s.hasOwnProperty(I)&&(d=s[I],d!=null&&Ft(r,i,I,d,s,null))}function Pb(r,i,s,d){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,v=null,j=null,I=null,W=null,se=null,xe=null;for(fe in s){var ke=s[fe];if(s.hasOwnProperty(fe)&&ke!=null)switch(fe){case"checked":break;case"value":break;case"defaultValue":W=ke;default:d.hasOwnProperty(fe)||Ft(r,i,fe,null,d,ke)}}for(var ce in d){var fe=d[ce];if(ke=s[ce],d.hasOwnProperty(ce)&&(fe!=null||ke!=null))switch(ce){case"type":v=fe;break;case"name":p=fe;break;case"checked":se=fe;break;case"defaultChecked":xe=fe;break;case"value":j=fe;break;case"defaultValue":I=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(a(137,i));break;default:fe!==ke&&Ft(r,i,ce,fe,d,ke)}}Lr(r,j,I,W,se,xe,v,p);return;case"select":fe=j=I=ce=null;for(v in s)if(W=s[v],s.hasOwnProperty(v)&&W!=null)switch(v){case"value":break;case"multiple":fe=W;default:d.hasOwnProperty(v)||Ft(r,i,v,null,d,W)}for(p in d)if(v=d[p],W=s[p],d.hasOwnProperty(p)&&(v!=null||W!=null))switch(p){case"value":ce=v;break;case"defaultValue":I=v;break;case"multiple":j=v;default:v!==W&&Ft(r,i,p,v,d,W)}i=I,s=j,d=fe,ce!=null?pi(r,!!s,ce,!1):!!d!=!!s&&(i!=null?pi(r,!!s,i,!0):pi(r,!!s,s?[]:"",!1));return;case"textarea":fe=ce=null;for(I in s)if(p=s[I],s.hasOwnProperty(I)&&p!=null&&!d.hasOwnProperty(I))switch(I){case"value":break;case"children":break;default:Ft(r,i,I,null,d,p)}for(j in d)if(p=d[j],v=s[j],d.hasOwnProperty(j)&&(p!=null||v!=null))switch(j){case"value":ce=p;break;case"defaultValue":fe=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(a(91));break;default:p!==v&&Ft(r,i,j,p,d,v)}ol(r,ce,fe);return;case"option":for(var Ke in s)if(ce=s[Ke],s.hasOwnProperty(Ke)&&ce!=null&&!d.hasOwnProperty(Ke))switch(Ke){case"selected":r.selected=!1;break;default:Ft(r,i,Ke,null,d,ce)}for(W in d)if(ce=d[W],fe=s[W],d.hasOwnProperty(W)&&ce!==fe&&(ce!=null||fe!=null))switch(W){case"selected":r.selected=ce&&typeof ce!="function"&&typeof ce!="symbol";break;default:Ft(r,i,W,ce,d,fe)}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 ot in s)ce=s[ot],s.hasOwnProperty(ot)&&ce!=null&&!d.hasOwnProperty(ot)&&Ft(r,i,ot,null,d,ce);for(se in d)if(ce=d[se],fe=s[se],d.hasOwnProperty(se)&&ce!==fe&&(ce!=null||fe!=null))switch(se){case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(a(137,i));break;default:Ft(r,i,se,ce,d,fe)}return;default:if(ss(i)){for(var Pt in s)ce=s[Pt],s.hasOwnProperty(Pt)&&ce!==void 0&&!d.hasOwnProperty(Pt)&&Qh(r,i,Pt,void 0,d,ce);for(xe in d)ce=d[xe],fe=s[xe],!d.hasOwnProperty(xe)||ce===fe||ce===void 0&&fe===void 0||Qh(r,i,xe,ce,d,fe);return}}for(var ae in s)ce=s[ae],s.hasOwnProperty(ae)&&ce!=null&&!d.hasOwnProperty(ae)&&Ft(r,i,ae,null,d,ce);for(ke in d)ce=d[ke],fe=s[ke],!d.hasOwnProperty(ke)||ce===fe||ce==null&&fe==null||Ft(r,i,ke,ce,d,fe)}function cy(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Gb(){if(typeof performance.getEntriesByType=="function"){for(var r=0,i=0,s=performance.getEntriesByType("resource"),d=0;d<s.length;d++){var p=s[d],v=p.transferSize,j=p.initiatorType,I=p.duration;if(v&&I&&cy(j)){for(j=0,I=p.responseEnd,d+=1;d<s.length;d++){var W=s[d],se=W.startTime;if(se>I)break;var xe=W.transferSize,ke=W.initiatorType;xe&&cy(ke)&&(W=W.responseEnd,j+=xe*(W<I?1:(I-se)/(W-se)))}if(--d,i+=8*(v+j)/(p.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 Jh=null,em=null;function od(r){return r.nodeType===9?r:r.ownerDocument}function dy(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 fy(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 tm(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 nm=null;function Vb(){var r=window.event;return r&&r.type==="popstate"?r===nm?!1:(nm=r,!0):(nm=null,!1)}var hy=typeof setTimeout=="function"?setTimeout:void 0,Yb=typeof clearTimeout=="function"?clearTimeout:void 0,my=typeof Promise=="function"?Promise:void 0,Wb=typeof queueMicrotask=="function"?queueMicrotask:typeof my<"u"?function(r){return my.resolve(null).then(r).catch(Kb)}:hy;function Kb(r){setTimeout(function(){throw r})}function Ll(r){return r==="head"}function py(r,i){var s=i,d=0;do{var p=s.nextSibling;if(r.removeChild(s),p&&p.nodeType===8)if(s=p.data,s==="/$"||s==="/&"){if(d===0){r.removeChild(p),Qo(i);return}d--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")d++;else if(s==="html")vc(r.ownerDocument.documentElement);else if(s==="head"){s=r.ownerDocument.head,vc(s);for(var v=s.firstChild;v;){var j=v.nextSibling,I=v.nodeName;v[La]||I==="SCRIPT"||I==="STYLE"||I==="LINK"&&v.rel.toLowerCase()==="stylesheet"||s.removeChild(v),v=j}}else s==="body"&&vc(r.ownerDocument.body);s=p}while(s);Qo(i)}function gy(r,i){var s=r;r=0;do{var d=s.nextSibling;if(s.nodeType===1?i?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(i?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),d&&d.nodeType===8)if(s=d.data,s==="/$"){if(r===0)break;r--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||r++;s=d}while(s)}function rm(r){var i=r.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var s=i;switch(i=i.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":rm(s),wu(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}r.removeChild(s)}}function Xb(r,i,s,d){for(;r.nodeType===1;){var p=s;if(r.nodeName.toLowerCase()!==i.toLowerCase()){if(!d&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(d){if(!r[La])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!==p.rel||r.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||r.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||r.getAttribute("title")!==(p.title==null?null:p.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(v=r.getAttribute("src"),(v!==(p.src==null?null:p.src)||r.getAttribute("type")!==(p.type==null?null:p.type)||r.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&v&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(i==="input"&&r.type==="hidden"){var v=p.name==null?null:""+p.name;if(p.type==="hidden"&&r.getAttribute("name")===v)return r}else return r;if(r=pa(r.nextSibling),r===null)break}return null}function Zb(r,i,s){if(i==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=pa(r.nextSibling),r===null))return null;return r}function yy(r,i){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!i||(r=pa(r.nextSibling),r===null))return null;return r}function am(r){return r.data==="$?"||r.data==="$~"}function im(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function Qb(r,i){var s=r.ownerDocument;if(r.data==="$~")r._reactRetry=i;else if(r.data!=="$?"||s.readyState!=="loading")i();else{var d=function(){i(),s.removeEventListener("DOMContentLoaded",d)};s.addEventListener("DOMContentLoaded",d),r._reactRetry=d}}function pa(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 lm=null;function vy(r){r=r.nextSibling;for(var i=0;r;){if(r.nodeType===8){var s=r.data;if(s==="/$"||s==="/&"){if(i===0)return pa(r.nextSibling);i--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||i++}r=r.nextSibling}return null}function xy(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var s=r.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(i===0)return r;i--}else s!=="/$"&&s!=="/&"||i++}r=r.previousSibling}return null}function by(r,i,s){switch(i=od(s),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 vc(r){for(var i=r.attributes;i.length;)r.removeAttributeNode(i[0]);wu(r)}var ga=new Map,wy=new Set;function ud(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Pi=ge.d;ge.d={f:Jb,r:e7,D:t7,C:n7,L:r7,m:a7,X:l7,S:i7,M:s7};function Jb(){var r=Pi.f(),i=ed();return r||i}function e7(r){var i=Ba(r);i!==null&&i.tag===5&&i.type==="form"?Bg(i):Pi.r(r)}var Ko=typeof document>"u"?null:document;function ky(r,i,s){var d=Ko;if(d&&typeof i=="string"&&i){var p=nr(i);p='link[rel="'+r+'"][href="'+p+'"]',typeof s=="string"&&(p+='[crossorigin="'+s+'"]'),wy.has(p)||(wy.add(p),r={rel:r,crossOrigin:s,href:i},d.querySelector(p)===null&&(i=d.createElement("link"),Gn(i,"link",r),tn(i),d.head.appendChild(i)))}}function t7(r){Pi.D(r),ky("dns-prefetch",r,null)}function n7(r,i){Pi.C(r,i),ky("preconnect",r,i)}function r7(r,i,s){Pi.L(r,i,s);var d=Ko;if(d&&r&&i){var p='link[rel="preload"][as="'+nr(i)+'"]';i==="image"&&s&&s.imageSrcSet?(p+='[imagesrcset="'+nr(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(p+='[imagesizes="'+nr(s.imageSizes)+'"]')):p+='[href="'+nr(r)+'"]';var v=p;switch(i){case"style":v=Xo(r);break;case"script":v=Zo(r)}ga.has(v)||(r=y({rel:"preload",href:i==="image"&&s&&s.imageSrcSet?void 0:r,as:i},s),ga.set(v,r),d.querySelector(p)!==null||i==="style"&&d.querySelector(xc(v))||i==="script"&&d.querySelector(bc(v))||(i=d.createElement("link"),Gn(i,"link",r),tn(i),d.head.appendChild(i)))}}function a7(r,i){Pi.m(r,i);var s=Ko;if(s&&r){var d=i&&typeof i.as=="string"?i.as:"script",p='link[rel="modulepreload"][as="'+nr(d)+'"][href="'+nr(r)+'"]',v=p;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=Zo(r)}if(!ga.has(v)&&(r=y({rel:"modulepreload",href:r},i),ga.set(v,r),s.querySelector(p)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(bc(v)))return}d=s.createElement("link"),Gn(d,"link",r),tn(d),s.head.appendChild(d)}}}function i7(r,i,s){Pi.S(r,i,s);var d=Ko;if(d&&r){var p=Sa(d).hoistableStyles,v=Xo(r);i=i||"default";var j=p.get(v);if(!j){var I={loading:0,preload:null};if(j=d.querySelector(xc(v)))I.loading=5;else{r=y({rel:"stylesheet",href:r,"data-precedence":i},s),(s=ga.get(v))&&sm(r,s);var W=j=d.createElement("link");tn(W),Gn(W,"link",r),W._p=new Promise(function(se,xe){W.onload=se,W.onerror=xe}),W.addEventListener("load",function(){I.loading|=1}),W.addEventListener("error",function(){I.loading|=2}),I.loading|=4,cd(j,i,d)}j={type:"stylesheet",instance:j,count:1,state:I},p.set(v,j)}}}function l7(r,i){Pi.X(r,i);var s=Ko;if(s&&r){var d=Sa(s).hoistableScripts,p=Zo(r),v=d.get(p);v||(v=s.querySelector(bc(p)),v||(r=y({src:r,async:!0},i),(i=ga.get(p))&&om(r,i),v=s.createElement("script"),tn(v),Gn(v,"link",r),s.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},d.set(p,v))}}function s7(r,i){Pi.M(r,i);var s=Ko;if(s&&r){var d=Sa(s).hoistableScripts,p=Zo(r),v=d.get(p);v||(v=s.querySelector(bc(p)),v||(r=y({src:r,async:!0,type:"module"},i),(i=ga.get(p))&&om(r,i),v=s.createElement("script"),tn(v),Gn(v,"link",r),s.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},d.set(p,v))}}function Sy(r,i,s,d){var p=(p=Re.current)?ud(p):null;if(!p)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(i=Xo(s.href),s=Sa(p).hoistableStyles,d=s.get(i),d||(d={type:"style",instance:null,count:0,state:null},s.set(i,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){r=Xo(s.href);var v=Sa(p).hoistableStyles,j=v.get(r);if(j||(p=p.ownerDocument||p,j={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(r,j),(v=p.querySelector(xc(r)))&&!v._p&&(j.instance=v,j.state.loading=5),ga.has(r)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},ga.set(r,s),v||o7(p,r,s,j.state))),i&&d===null)throw Error(a(528,""));return j}if(i&&d!==null)throw Error(a(529,""));return null;case"script":return i=s.async,s=s.src,typeof s=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Zo(s),s=Sa(p).hoistableScripts,d=s.get(i),d||(d={type:"script",instance:null,count:0,state:null},s.set(i,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function Xo(r){return'href="'+nr(r)+'"'}function xc(r){return'link[rel="stylesheet"]['+r+"]"}function jy(r){return y({},r,{"data-precedence":r.precedence,precedence:null})}function o7(r,i,s,d){r.querySelector('link[rel="preload"][as="style"]['+i+"]")?d.loading=1:(i=r.createElement("link"),d.preload=i,i.addEventListener("load",function(){return d.loading|=1}),i.addEventListener("error",function(){return d.loading|=2}),Gn(i,"link",s),tn(i),r.head.appendChild(i))}function Zo(r){return'[src="'+nr(r)+'"]'}function bc(r){return"script[async]"+r}function Cy(r,i,s){if(i.count++,i.instance===null)switch(i.type){case"style":var d=r.querySelector('style[data-href~="'+nr(s.href)+'"]');if(d)return i.instance=d,tn(d),d;var p=y({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return d=(r.ownerDocument||r).createElement("style"),tn(d),Gn(d,"style",p),cd(d,s.precedence,r),i.instance=d;case"stylesheet":p=Xo(s.href);var v=r.querySelector(xc(p));if(v)return i.state.loading|=4,i.instance=v,tn(v),v;d=jy(s),(p=ga.get(p))&&sm(d,p),v=(r.ownerDocument||r).createElement("link"),tn(v);var j=v;return j._p=new Promise(function(I,W){j.onload=I,j.onerror=W}),Gn(v,"link",d),i.state.loading|=4,cd(v,s.precedence,r),i.instance=v;case"script":return v=Zo(s.src),(p=r.querySelector(bc(v)))?(i.instance=p,tn(p),p):(d=s,(p=ga.get(v))&&(d=y({},s),om(d,p)),r=r.ownerDocument||r,p=r.createElement("script"),tn(p),Gn(p,"link",d),r.head.appendChild(p),i.instance=p);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(d=i.instance,i.state.loading|=4,cd(d,s.precedence,r));return i.instance}function cd(r,i,s){for(var d=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=d.length?d[d.length-1]:null,v=p,j=0;j<d.length;j++){var I=d[j];if(I.dataset.precedence===i)v=I;else if(v!==p)break}v?v.parentNode.insertBefore(r,v.nextSibling):(i=s.nodeType===9?s.head:s,i.insertBefore(r,i.firstChild))}function sm(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.title==null&&(r.title=i.title)}function om(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.integrity==null&&(r.integrity=i.integrity)}var dd=null;function Ty(r,i,s){if(dd===null){var d=new Map,p=dd=new Map;p.set(s,d)}else p=dd,d=p.get(s),d||(d=new Map,p.set(s,d));if(d.has(r))return d;for(d.set(r,null),s=s.getElementsByTagName(r),p=0;p<s.length;p++){var v=s[p];if(!(v[La]||v[Nn]||r==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var j=v.getAttribute(i)||"";j=r+j;var I=d.get(j);I?I.push(v):d.set(j,[v])}}return d}function Ay(r,i,s){r=r.ownerDocument||r,r.head.insertBefore(s,i==="title"?r.querySelector("head > title"):null)}function u7(r,i,s){if(s===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;switch(i.rel){case"stylesheet":return r=i.disabled,typeof i.precedence=="string"&&r==null;default:return!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 Ey(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function c7(r,i,s,d){if(s.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var p=Xo(d.href),v=i.querySelector(xc(p));if(v){i=v._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(r.count++,r=fd.bind(r),i.then(r,r)),s.state.loading|=4,s.instance=v,tn(v);return}v=i.ownerDocument||i,d=jy(d),(p=ga.get(p))&&sm(d,p),v=v.createElement("link"),tn(v);var j=v;j._p=new Promise(function(I,W){j.onload=I,j.onerror=W}),Gn(v,"link",d),s.instance=v}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(r.count++,s=fd.bind(r),i.addEventListener("load",s),i.addEventListener("error",s))}}var um=0;function d7(r,i){return r.stylesheets&&r.count===0&&md(r,r.stylesheets),0<r.count||0<r.imgCount?function(s){var d=setTimeout(function(){if(r.stylesheets&&md(r,r.stylesheets),r.unsuspend){var v=r.unsuspend;r.unsuspend=null,v()}},6e4+i);0<r.imgBytes&&um===0&&(um=62500*Gb());var p=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&md(r,r.stylesheets),r.unsuspend)){var v=r.unsuspend;r.unsuspend=null,v()}},(r.imgBytes>um?50:800)+i);return r.unsuspend=s,function(){r.unsuspend=null,clearTimeout(d),clearTimeout(p)}}:null}function fd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)md(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var hd=null;function md(r,i){r.stylesheets=null,r.unsuspend!==null&&(r.count++,hd=new Map,i.forEach(f7,r),hd=null,fd.call(r))}function f7(r,i){if(!(i.state.loading&4)){var s=hd.get(r);if(s)var d=s.get(null);else{s=new Map,hd.set(r,s);for(var p=r.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<p.length;v++){var j=p[v];(j.nodeName==="LINK"||j.getAttribute("media")!=="not all")&&(s.set(j.dataset.precedence,j),d=j)}d&&s.set(null,d)}p=i.instance,j=p.getAttribute("data-precedence"),v=s.get(j)||d,v===d&&s.set(null,p),s.set(j,p),this.count++,d=fd.bind(this),p.addEventListener("load",d),p.addEventListener("error",d),v?v.parentNode.insertBefore(p,v.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(p,r.firstChild)),i.state.loading|=4}}var wc={$$typeof:q,Provider:null,Consumer:null,_currentValue:ye,_currentValue2:ye,_threadCount:0};function h7(r,i,s,d,p,v,j,I,W){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=hi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hi(0),this.hiddenUpdates=hi(null),this.identifierPrefix=d,this.onUncaughtError=p,this.onCaughtError=v,this.onRecoverableError=j,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=W,this.incompleteTransitions=new Map}function Ny(r,i,s,d,p,v,j,I,W,se,xe,ke){return r=new h7(r,i,s,j,W,se,xe,ke,I),i=1,v===!0&&(i|=24),v=ir(3,null,null,i),r.current=v,v.stateNode=r,i=Ju(),i.refCount++,r.pooledCache=i,i.refCount++,v.memoizedState={element:d,isDehydrated:s,cache:i},ue(v),r}function My(r){return r?(r=xl,r):xl}function Dy(r,i,s,d,p,v){p=My(p),d.context===null?d.context=p:d.pendingContext=p,d=$e(i),d.payload={element:s},v=v===void 0?null:v,v!==null&&(d.callback=v),s=De(r,d,i),s!==null&&(Mr(s,r,i),st(s,r,i))}function zy(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var s=r.retryLane;r.retryLane=s!==0&&s<i?s:i}}function cm(r,i){zy(r,i),(r=r.alternate)&&zy(r,i)}function Ry(r){if(r.tag===13||r.tag===31){var i=Ti(r,67108864);i!==null&&Mr(i,r,67108864),cm(r,67108864)}}function Oy(r){if(r.tag===13||r.tag===31){var i=Kr();i=to(i);var s=Ti(r,i);s!==null&&Mr(s,r,i),cm(r,i)}}var pd=!0;function m7(r,i,s,d){var p=Z.T;Z.T=null;var v=ge.p;try{ge.p=2,dm(r,i,s,d)}finally{ge.p=v,Z.T=p}}function p7(r,i,s,d){var p=Z.T;Z.T=null;var v=ge.p;try{ge.p=8,dm(r,i,s,d)}finally{ge.p=v,Z.T=p}}function dm(r,i,s,d){if(pd){var p=fm(d);if(p===null)Zh(r,i,d,gd,s),_y(r,d);else if(y7(p,r,i,s,d))d.stopPropagation();else if(_y(r,d),i&4&&-1<g7.indexOf(r)){for(;p!==null;){var v=Ba(p);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var j=Ir(v.pendingLanes);if(j!==0){var I=v;for(I.pendingLanes|=2,I.entangledLanes|=2;j;){var W=1<<31-xt(j);I.entanglements[1]|=W,j&=~W}ni(v),(Ot&6)===0&&(Q0=Xt()+500,pc(0))}}break;case 31:case 13:I=Ti(v,2),I!==null&&Mr(I,v,2),ed(),cm(v,2)}if(v=fm(d),v===null&&Zh(r,i,d,gd,s),v===p)break;p=v}p!==null&&d.stopPropagation()}else Zh(r,i,d,null,s)}}function fm(r){return r=os(r),hm(r)}var gd=null;function hm(r){if(gd=null,r=ia(r),r!==null){var i=u(r);if(i===null)r=null;else{var s=i.tag;if(s===13){if(r=c(i),r!==null)return r;r=null}else if(s===31){if(r=f(i),r!==null)return r;r=null}else if(s===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null)}}return gd=r,null}function Iy(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(pr()){case ve:return 2;case Le:return 8;case re:case be:return 32;case qe:return 268435456;default:return 32}default:return 32}}var mm=!1,Bl=null,ql=null,Ul=null,kc=new Map,Sc=new Map,Hl=[],g7="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 _y(r,i){switch(r){case"focusin":case"focusout":Bl=null;break;case"dragenter":case"dragleave":ql=null;break;case"mouseover":case"mouseout":Ul=null;break;case"pointerover":case"pointerout":kc.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Sc.delete(i.pointerId)}}function jc(r,i,s,d,p,v){return r===null||r.nativeEvent!==v?(r={blockedOn:i,domEventName:s,eventSystemFlags:d,nativeEvent:v,targetContainers:[p]},i!==null&&(i=Ba(i),i!==null&&Ry(i)),r):(r.eventSystemFlags|=d,i=r.targetContainers,p!==null&&i.indexOf(p)===-1&&i.push(p),r)}function y7(r,i,s,d,p){switch(i){case"focusin":return Bl=jc(Bl,r,i,s,d,p),!0;case"dragenter":return ql=jc(ql,r,i,s,d,p),!0;case"mouseover":return Ul=jc(Ul,r,i,s,d,p),!0;case"pointerover":var v=p.pointerId;return kc.set(v,jc(kc.get(v)||null,r,i,s,d,p)),!0;case"gotpointercapture":return v=p.pointerId,Sc.set(v,jc(Sc.get(v)||null,r,i,s,d,p)),!0}return!1}function Ly(r){var i=ia(r.target);if(i!==null){var s=u(i);if(s!==null){if(i=s.tag,i===13){if(i=c(s),i!==null){r.blockedOn=i,c0(r.priority,function(){Oy(s)});return}}else if(i===31){if(i=f(s),i!==null){r.blockedOn=i,c0(r.priority,function(){Oy(s)});return}}else if(i===3&&s.stateNode.current.memoizedState.isDehydrated){r.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}r.blockedOn=null}function yd(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var s=fm(r.nativeEvent);if(s===null){s=r.nativeEvent;var d=new s.constructor(s.type,s);qr=d,s.target.dispatchEvent(d),qr=null}else return i=Ba(s),i!==null&&Ry(i),r.blockedOn=s,!1;i.shift()}return!0}function By(r,i,s){yd(r)&&s.delete(i)}function v7(){mm=!1,Bl!==null&&yd(Bl)&&(Bl=null),ql!==null&&yd(ql)&&(ql=null),Ul!==null&&yd(Ul)&&(Ul=null),kc.forEach(By),Sc.forEach(By)}function vd(r,i){r.blockedOn===i&&(r.blockedOn=null,mm||(mm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,v7)))}var xd=null;function qy(r){xd!==r&&(xd=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){xd===r&&(xd=null);for(var i=0;i<r.length;i+=3){var s=r[i],d=r[i+1],p=r[i+2];if(typeof d!="function"){if(hm(d||s)===null)continue;break}var v=Ba(s);v!==null&&(r.splice(i,3),i-=3,fh(v,{pending:!0,data:p,method:s.method,action:d},d,p))}}))}function Qo(r){function i(W){return vd(W,r)}Bl!==null&&vd(Bl,r),ql!==null&&vd(ql,r),Ul!==null&&vd(Ul,r),kc.forEach(i),Sc.forEach(i);for(var s=0;s<Hl.length;s++){var d=Hl[s];d.blockedOn===r&&(d.blockedOn=null)}for(;0<Hl.length&&(s=Hl[0],s.blockedOn===null);)Ly(s),s.blockedOn===null&&Hl.shift();if(s=(r.ownerDocument||r).$$reactFormReplay,s!=null)for(d=0;d<s.length;d+=3){var p=s[d],v=s[d+1],j=p[xn]||null;if(typeof v=="function")j||qy(s);else if(j){var I=null;if(v&&v.hasAttribute("formAction")){if(p=v,j=v[xn]||null)I=j.formAction;else if(hm(p)!==null)continue}else I=j.action;typeof I=="function"?s[d+1]=I:(s.splice(d,3),d-=3),qy(s)}}}function Uy(){function r(v){v.canIntercept&&v.info==="react-transition"&&v.intercept({handler:function(){return new Promise(function(j){return p=j})},focusReset:"manual",scroll:"manual"})}function i(){p!==null&&(p(),p=null),d||setTimeout(s,20)}function s(){if(!d&&!navigation.transition){var v=navigation.currentEntry;v&&v.url!=null&&navigation.navigate(v.url,{state:v.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var d=!1,p=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(s,100),function(){d=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),p!==null&&(p(),p=null)}}}function pm(r){this._internalRoot=r}bd.prototype.render=pm.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(a(409));var s=i.current,d=Kr();Dy(s,d,r,i,null,null)},bd.prototype.unmount=pm.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;Dy(r.current,2,null,r,null,null),ed(),i[_r]=null}};function bd(r){this._internalRoot=r}bd.prototype.unstable_scheduleHydration=function(r){if(r){var i=bu();r={blockedOn:null,target:r,priority:i};for(var s=0;s<Hl.length&&i!==0&&i<Hl[s].priority;s++);Hl.splice(s,0,r),s===0&&Ly(r)}};var Hy=t.version;if(Hy!=="19.2.7")throw Error(a(527,Hy,"19.2.7"));ge.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=m(i),r=r!==null?g(r):null,r=r===null?null:r.stateNode,r};var x7={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:Z,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wd.isDisabled&&wd.supportsFiber)try{Ct=wd.inject(x7),gt=wd}catch{}}return Tc.createRoot=function(r,i){if(!l(r))throw Error(a(299));var s=!1,d="",p=Wg,v=Kg,j=Xg;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(p=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(j=i.onRecoverableError)),i=Ny(r,1,!1,null,null,s,d,null,p,v,j,Uy),r[_r]=i.current,Xh(r),new pm(i)},Tc.hydrateRoot=function(r,i,s){if(!l(r))throw Error(a(299));var d=!1,p="",v=Wg,j=Kg,I=Xg,W=null;return s!=null&&(s.unstable_strictMode===!0&&(d=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onUncaughtError!==void 0&&(v=s.onUncaughtError),s.onCaughtError!==void 0&&(j=s.onCaughtError),s.onRecoverableError!==void 0&&(I=s.onRecoverableError),s.formState!==void 0&&(W=s.formState)),i=Ny(r,1,!0,i,s??null,d,p,W,v,j,I,Uy),i.context=My(null),s=i.current,d=Kr(),d=to(d),p=$e(d),p.callback=null,De(s,p,d),s=d,i.current.lanes=s,rl(i,s),ni(i),r[_r]=i.current,Xh(r),new bd(i)},Tc.version="19.2.7",Tc}var Jy;function q7(){if(Jy)return vm.exports;Jy=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(),vm.exports=B7(),vm.exports}var U7=q7(),H7=Hv();function e2(e){const t=[],n=String(e||"");let a=n.indexOf(","),l=0,u=!1;for(;!u;){a===-1&&(a=n.length,u=!0);const c=n.slice(l,a).trim();(c||!u)&&t.push(c),l=a+1,a=n.indexOf(",",l)}return t}function $7(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const F7=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,P7=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,G7={};function t2(e,t){return(G7.jsx?P7:F7).test(e)}const V7=/[ \t\n\f\r]/g;function Y7(e){return typeof e=="object"?e.type==="text"?n2(e.value):!1:n2(e)}function n2(e){return e.replace(V7,"")===""}class r0{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}}r0.prototype.normal={};r0.prototype.property={};r0.prototype.space=void 0;function $v(e,t){const n={},a={};for(const l of e)Object.assign(n,l.property),Object.assign(a,l.normal);return new r0(n,a,t)}function Kc(e){return e.toLowerCase()}class Or{constructor(t,n){this.attribute=n,this.property=t}}Or.prototype.attribute="";Or.prototype.booleanish=!1;Or.prototype.boolean=!1;Or.prototype.commaOrSpaceSeparated=!1;Or.prototype.commaSeparated=!1;Or.prototype.defined=!1;Or.prototype.mustUseProperty=!1;Or.prototype.number=!1;Or.prototype.overloadedBoolean=!1;Or.prototype.property="";Or.prototype.spaceSeparated=!1;Or.prototype.space=void 0;let W7=0;const ft=Zs(),Cn=Zs(),vp=Zs(),Ie=Zs(),Vt=Zs(),Ys=Zs(),Xr=Zs();function Zs(){return 2**++W7}const xp=Object.freeze(Object.defineProperty({__proto__:null,boolean:ft,booleanish:Cn,commaOrSpaceSeparated:Xr,commaSeparated:Ys,number:Ie,overloadedBoolean:vp,spaceSeparated:Vt},Symbol.toStringTag,{value:"Module"})),km=Object.keys(xp);class c1 extends Or{constructor(t,n,a,l){let u=-1;if(super(t,n),r2(this,"space",l),typeof a=="number")for(;++u<km.length;){const c=km[u];r2(this,km[u],(a&xp[c])===xp[c])}}}c1.prototype.defined=!0;function r2(e,t,n){n&&(e[t]=n)}function fu(e){const t={},n={};for(const[a,l]of Object.entries(e.properties)){const u=new c1(a,e.transform(e.attributes||{},a),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(u.mustUseProperty=!0),t[a]=u,n[Kc(a)]=a,n[Kc(u.attribute)]=a}return new r0(t,n,e.space)}const Fv=fu({properties:{ariaActiveDescendant:null,ariaAtomic:Cn,ariaAutoComplete:null,ariaBusy:Cn,ariaChecked:Cn,ariaColCount:Ie,ariaColIndex:Ie,ariaColSpan:Ie,ariaControls:Vt,ariaCurrent:null,ariaDescribedBy:Vt,ariaDetails:null,ariaDisabled:Cn,ariaDropEffect:Vt,ariaErrorMessage:null,ariaExpanded:Cn,ariaFlowTo:Vt,ariaGrabbed:Cn,ariaHasPopup:null,ariaHidden:Cn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Vt,ariaLevel:Ie,ariaLive:null,ariaModal:Cn,ariaMultiLine:Cn,ariaMultiSelectable:Cn,ariaOrientation:null,ariaOwns:Vt,ariaPlaceholder:null,ariaPosInSet:Ie,ariaPressed:Cn,ariaReadOnly:Cn,ariaRelevant:null,ariaRequired:Cn,ariaRoleDescription:Vt,ariaRowCount:Ie,ariaRowIndex:Ie,ariaRowSpan:Ie,ariaSelected:Cn,ariaSetSize:Ie,ariaSort:null,ariaValueMax:Ie,ariaValueMin:Ie,ariaValueNow:Ie,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Pv(e,t){return t in e?e[t]:t}function Gv(e,t){return Pv(e,t.toLowerCase())}const K7=fu({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ys,acceptCharset:Vt,accessKey:Vt,action:null,allow:null,allowFullScreen:ft,allowPaymentRequest:ft,allowUserMedia:ft,alpha:ft,alt:null,as:null,async:ft,autoCapitalize:null,autoComplete:Vt,autoFocus:ft,autoPlay:ft,blocking:Vt,capture:null,charSet:null,checked:ft,cite:null,className:Vt,closedBy:null,colorSpace:null,cols:Ie,colSpan:Ie,command:null,commandFor:null,content:null,contentEditable:Cn,controls:ft,controlsList:Vt,coords:Ie|Ys,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ft,defer:ft,dir:null,dirName:null,disabled:ft,download:vp,draggable:Cn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ft,formTarget:null,headers:Vt,height:Ie,hidden:vp,high:Ie,href:null,hrefLang:null,htmlFor:Vt,httpEquiv:Vt,id:null,imageSizes:null,imageSrcSet:null,inert:ft,inputMode:null,integrity:null,is:null,isMap:ft,itemId:null,itemProp:Vt,itemRef:Vt,itemScope:ft,itemType:Vt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ft,low:Ie,manifest:null,max:null,maxLength:Ie,media:null,method:null,min:null,minLength:Ie,multiple:ft,muted:ft,name:null,nonce:null,noModule:ft,noValidate:ft,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:ft,optimum:Ie,pattern:null,ping:Vt,placeholder:null,playsInline:ft,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ft,referrerPolicy:null,rel:Vt,required:ft,reversed:ft,rows:Ie,rowSpan:Ie,sandbox:Vt,scope:null,scoped:ft,seamless:ft,selected:ft,shadowRootClonable:ft,shadowRootCustomElementRegistry:ft,shadowRootDelegatesFocus:ft,shadowRootMode:null,shadowRootSerializable:ft,shape:null,size:Ie,sizes:null,slot:null,span:Ie,spellCheck:Cn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ie,step:null,style:null,tabIndex:Ie,target:null,title:null,translate:null,type:null,typeMustMatch:ft,useMap:null,value:Cn,width:Ie,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Vt,axis:null,background:null,bgColor:null,border:Ie,borderColor:null,bottomMargin:Ie,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ft,declare:ft,event:null,face:null,frame:null,frameBorder:null,hSpace:Ie,leftMargin:Ie,link:null,longDesc:null,lowSrc:null,marginHeight:Ie,marginWidth:Ie,noResize:ft,noHref:ft,noShade:ft,noWrap:ft,object:null,profile:null,prompt:null,rev:null,rightMargin:Ie,rules:null,scheme:null,scrolling:Cn,standby:null,summary:null,text:null,topMargin:Ie,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ie,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ft,disablePictureInPicture:ft,disableRemotePlayback:ft,exportParts:Ys,part:Vt,prefix:null,property:null,results:Ie,security:null,unselectable:null},space:"html",transform:Gv}),X7=fu({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:Xr,accentHeight:Ie,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ie,amplitude:Ie,arabicForm:null,ascent:Ie,attributeName:null,attributeType:null,azimuth:Ie,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ie,by:null,calcMode:null,capHeight:Ie,className:Vt,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:Ie,diffuseConstant:Ie,direction:null,display:null,dur:null,divisor:Ie,dominantBaseline:null,download:ft,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ie,enableBackground:null,end:null,event:null,exponent:Ie,externalResourcesRequired:null,fill:null,fillOpacity:Ie,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:Ys,g2:Ys,glyphName:Ys,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ie,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ie,horizOriginX:Ie,horizOriginY:Ie,id:null,ideographic:Ie,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ie,k:Ie,k1:Ie,k2:Ie,k3:Ie,k4:Ie,kernelMatrix:Xr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ie,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:Ie,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:Ie,overlineThickness:Ie,paintOrder:null,panose1:null,path:null,pathLength:Ie,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Vt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ie,pointsAtY:Ie,pointsAtZ:Ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Xr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Xr,rev:Xr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Xr,requiredFeatures:Xr,requiredFonts:Xr,requiredFormats:Xr,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:Ie,specularExponent:Ie,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ie,strikethroughThickness:Ie,string:null,stroke:null,strokeDashArray:Xr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ie,strokeOpacity:Ie,strokeWidth:null,style:null,surfaceScale:Ie,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Xr,tabIndex:Ie,tableValues:null,target:null,targetX:Ie,targetY:Ie,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Xr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ie,underlineThickness:Ie,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ie,values:null,vAlphabetic:Ie,vMathematical:Ie,vectorEffect:null,vHanging:Ie,vIdeographic:Ie,version:null,vertAdvY:Ie,vertOriginX:Ie,vertOriginY:Ie,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ie,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Pv}),Vv=fu({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()}}),Yv=fu({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Gv}),Wv=fu({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Z7={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"},Q7=/[A-Z]/g,a2=/-[a-z]/g,J7=/^data[-\w.:]+$/i;function Kv(e,t){const n=Kc(t);let a=t,l=Or;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&J7.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(a2,t8);a="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!a2.test(u)){let c=u.replace(Q7,e8);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}l=c1}return new l(a,t)}function e8(e){return"-"+e.toLowerCase()}function t8(e){return e.charAt(1).toUpperCase()}const Xv=$v([Fv,K7,Vv,Yv,Wv],"html"),vf=$v([Fv,X7,Vv,Yv,Wv],"svg");function i2(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function n8(e){return e.join(" ").trim()}var Jo={},Sm,l2;function r8(){if(l2)return Sm;l2=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,h=`
51
- `,m="/",g="*",y="",k="comment",x="declaration";function C(R,O){if(typeof R!="string")throw new TypeError("First argument must be a string");if(!R)return[];O=O||{};var M=1,q=1;function L(je){var pe=je.match(t);pe&&(M+=pe.length);var Z=je.lastIndexOf(h);q=~Z?je.length-Z:q+je.length}function K(){var je={line:M,column:q};return function(pe){return pe.position=new P(je),J(),pe}}function P(je){this.start=je,this.end={line:M,column:q},this.source=O.source}P.prototype.content=R;function H(je){var pe=new Error(O.source+":"+M+":"+q+": "+je);if(pe.reason=je,pe.filename=O.source,pe.line=M,pe.column=q,pe.source=R,!O.silent)throw pe}function X(je){var pe=je.exec(R);if(pe){var Z=pe[0];return L(Z),R=R.slice(Z.length),pe}}function J(){X(n)}function F(je){var pe;for(je=je||[];pe=he();)pe!==!1&&je.push(pe);return je}function he(){var je=K();if(!(m!=R.charAt(0)||g!=R.charAt(1))){for(var pe=2;y!=R.charAt(pe)&&(g!=R.charAt(pe)||m!=R.charAt(pe+1));)++pe;if(pe+=2,y===R.charAt(pe-1))return H("End of comment missing");var Z=R.slice(2,pe-2);return q+=2,L(Z),R=R.slice(pe),q+=2,je({type:k,comment:Z})}}function me(){var je=K(),pe=X(a);if(pe){if(he(),!X(l))return H("property missing ':'");var Z=X(u),ge=je({type:x,property:D(pe[0].replace(e,y)),value:Z?D(Z[0].replace(e,y)):y});return X(c),ge}}function Ae(){var je=[];F(je);for(var pe;pe=me();)pe!==!1&&(je.push(pe),F(je));return je}return J(),Ae()}function D(R){return R?R.replace(f,y):y}return Sm=C,Sm}var s2;function a8(){if(s2)return Jo;s2=1;var e=Jo&&Jo.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.default=n;const t=e(r8());function n(a,l){let u=null;if(!a||typeof a!="string")return u;const c=(0,t.default)(a),f=typeof l=="function";return c.forEach(h=>{if(h.type!=="declaration")return;const{property:m,value:g}=h;f?l(m,g,h):g&&(u=u||{},u[m]=g)}),u}return Jo}var Ac={},o2;function i8(){if(o2)return Ac;o2=1,Object.defineProperty(Ac,"__esModule",{value:!0}),Ac.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,u=function(m){return!m||n.test(m)||e.test(m)},c=function(m,g){return g.toUpperCase()},f=function(m,g){return"".concat(g,"-")},h=function(m,g){return g===void 0&&(g={}),u(m)?m:(m=m.toLowerCase(),g.reactCompat?m=m.replace(l,f):m=m.replace(a,f),m.replace(t,c))};return Ac.camelCase=h,Ac}var Ec,u2;function l8(){if(u2)return Ec;u2=1;var e=Ec&&Ec.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},t=e(a8()),n=i8();function a(l,u){var c={};return!l||typeof l!="string"||(0,t.default)(l,function(f,h){f&&h&&(c[(0,n.camelCase)(f,u)]=h)}),c}return a.default=a,Ec=a,Ec}var s8=l8();const o8=qv(s8),Zv=Qv("end"),d1=Qv("start");function Qv(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 u8(e){const t=d1(e),n=Zv(e);if(t&&n)return{start:t,end:n}}function Uc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?c2(e.position):"start"in e||"end"in e?c2(e):"line"in e||"column"in e?bp(e):""}function bp(e){return d2(e&&e.line)+":"+d2(e&&e.column)}function c2(e){return bp(e&&e.start)+"-"+bp(e&&e.end)}function d2(e){return e&&typeof e=="number"?e:1}class Qn extends Error{constructor(t,n,a){super(),typeof n=="string"&&(a=n,n=void 0);let l="",u={},c=!1;if(n&&("line"in n&&"column"in n?u={place:n}:"start"in n&&"end"in n?u={place:n}:"type"in n?u={ancestors:[n],place:n.position}:u={...n}),typeof t=="string"?l=t:!u.cause&&t&&(c=!0,l=t.message,u.cause=t),!u.ruleId&&!u.source&&typeof a=="string"){const h=a.indexOf(":");h===-1?u.ruleId=a:(u.source=a.slice(0,h),u.ruleId=a.slice(h+1))}if(!u.place&&u.ancestors&&u.ancestors){const h=u.ancestors[u.ancestors.length-1];h&&(u.place=h.position)}const f=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=l,this.line=f?f.line:void 0,this.name=Uc(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=c&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Qn.prototype.file="";Qn.prototype.name="";Qn.prototype.reason="";Qn.prototype.message="";Qn.prototype.stack="";Qn.prototype.column=void 0;Qn.prototype.line=void 0;Qn.prototype.ancestors=void 0;Qn.prototype.cause=void 0;Qn.prototype.fatal=void 0;Qn.prototype.place=void 0;Qn.prototype.ruleId=void 0;Qn.prototype.source=void 0;const f1={}.hasOwnProperty,c8=new Map,d8=/[A-Z]/g,f8=new Set(["table","tbody","thead","tfoot","tr"]),h8=new Set(["td","th"]),Jv="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function m8(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=k8(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=w8(n,t.jsx,t.jsxs)}const l={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"?vf:Xv,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},u=e5(l,e,void 0);return u&&typeof u!="string"?u:l.create(e,l.Fragment,{children:u||void 0},void 0)}function e5(e,t,n){if(t.type==="element")return p8(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return g8(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return v8(e,t,n);if(t.type==="mdxjsEsm")return y8(e,t);if(t.type==="root")return x8(e,t,n);if(t.type==="text")return b8(e,t)}function p8(e,t,n){const a=e.schema;let l=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(l=vf,e.schema=l),e.ancestors.push(t);const u=n5(e,t.tagName,!1),c=S8(e,t);let f=m1(e,t);return f8.has(t.tagName)&&(f=f.filter(function(h){return typeof h=="string"?!Y7(h):!0})),t5(e,c,u,t),h1(c,f),e.ancestors.pop(),e.schema=a,e.create(t,u,c,n)}function g8(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)}Xc(e,t.position)}function y8(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Xc(e,t.position)}function v8(e,t,n){const a=e.schema;let l=a;t.name==="svg"&&a.space==="html"&&(l=vf,e.schema=l),e.ancestors.push(t);const u=t.name===null?e.Fragment:n5(e,t.name,!0),c=j8(e,t),f=m1(e,t);return t5(e,c,u,t),h1(c,f),e.ancestors.pop(),e.schema=a,e.create(t,u,c,n)}function x8(e,t,n){const a={};return h1(a,m1(e,t)),e.create(t,e.Fragment,a,n)}function b8(e,t){return t.value}function t5(e,t,n,a){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=a)}function h1(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function w8(e,t,n){return a;function a(l,u,c,f){const m=Array.isArray(c.children)?n:t;return f?m(u,c,f):m(u,c)}}function k8(e,t){return n;function n(a,l,u,c){const f=Array.isArray(u.children),h=d1(a);return t(l,u,c,f,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function S8(e,t){const n={};let a,l;for(l in t.properties)if(l!=="children"&&f1.call(t.properties,l)){const u=C8(e,l,t.properties[l]);if(u){const[c,f]=u;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&h8.has(t.tagName)?a=f:n[c]=f}}if(a){const u=n.style||(n.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return n}function j8(e,t){const n={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const u=a.data.estree.body[0];u.type;const c=u.expression;c.type;const f=c.properties[0];f.type,Object.assign(n,e.evaluater.evaluateExpression(f.argument))}else Xc(e,t.position);else{const l=a.name;let u;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const f=a.value.data.estree.body[0];f.type,u=e.evaluater.evaluateExpression(f.expression)}else Xc(e,t.position);else u=a.value===null?!0:a.value;n[l]=u}return n}function m1(e,t){const n=[];let a=-1;const l=e.passKeys?new Map:c8;for(;++a<t.children.length;){const u=t.children[a];let c;if(e.passKeys){const h=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(h){const m=l.get(h)||0;c=h+"-"+m,l.set(h,m+1)}}const f=e5(e,u,c);f!==void 0&&n.push(f)}return n}function C8(e,t,n){const a=Kv(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?$7(n):n8(n)),a.property==="style"){let l=typeof n=="object"?n:T8(e,String(n));return e.stylePropertyNameCase==="css"&&(l=A8(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&a.space?Z7[a.property]||a.property:a.attribute,n]}}function T8(e,t){try{return o8(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const a=n,l=new Qn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=Jv+"#cannot-parse-style-attribute",l}}function n5(e,t,n){let a;if(!n)a={type:"Literal",value:t};else if(t.includes(".")){const l=t.split(".");let u=-1,c;for(;++u<l.length;){const f=t2(l[u])?{type:"Identifier",name:l[u]}:{type:"Literal",value:l[u]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(u&&f.type==="Literal"),optional:!1}:f}a=c}else a=t2(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const l=a.value;return f1.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(a);Xc(e)}function Xc(e,t){const n=new Qn("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=Jv+"#cannot-handle-mdx-estrees-without-createevaluater",n}function A8(e){const t={};let n;for(n in e)f1.call(e,n)&&(t[E8(n)]=e[n]);return t}function E8(e){let t=e.replace(d8,N8);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function N8(e){return"-"+e.toLowerCase()}const jm={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"]},M8={};function p1(e,t){const n=M8,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,l=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return r5(e,a,l)}function r5(e,t,n){if(D8(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 f2(e.children,t,n)}return Array.isArray(e)?f2(e,t,n):""}function f2(e,t,n){const a=[];let l=-1;for(;++l<e.length;)a[l]=r5(e[l],t,n);return a.join("")}function D8(e){return!!(e&&typeof e=="object")}const h2=document.createElement("i");function g1(e){const t="&"+e+";";h2.innerHTML=t;const n=h2.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Zr(e,t,n,a){const l=e.length;let u=0,c;if(t<0?t=-t>l?0:l+t:t=t>l?l: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);u<a.length;)c=a.slice(u,u+1e4),c.unshift(t,0),e.splice(...c),u+=1e4,t+=1e4}function ya(e,t){return e.length>0?(Zr(e,e.length,0,t),e):t}const m2={}.hasOwnProperty;function a5(e){const t={};let n=-1;for(;++n<e.length;)z8(t,e[n]);return t}function z8(e,t){let n;for(n in t){const l=(m2.call(e,n)?e[n]:void 0)||(e[n]={}),u=t[n];let c;if(u)for(c in u){m2.call(l,c)||(l[c]=[]);const f=u[c];R8(l[c],Array.isArray(f)?f:f?[f]:[])}}}function R8(e,t){let n=-1;const a=[];for(;++n<t.length;)(t[n].add==="after"?e:a).push(t[n]);Zr(e,0,0,a)}function i5(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 Oa(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const fr=ns(/[A-Za-z]/),Xn=ns(/[\dA-Za-z]/),O8=ns(/[#-'*+\--9=?A-Z^-~]/);function rf(e){return e!==null&&(e<32||e===127)}const wp=ns(/\d/),I8=ns(/[\dA-Fa-f]/),_8=ns(/[!-/:-@[-`{-~]/);function et(e){return e!==null&&e<-2}function Yt(e){return e!==null&&(e<0||e===32)}function jt(e){return e===-2||e===-1||e===32}const xf=ns(new RegExp("\\p{P}|\\p{S}","u")),Ws=ns(/\s/);function ns(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function hu(e){const t=[];let n=-1,a=0,l=0;for(;++n<e.length;){const u=e.charCodeAt(n);let c="";if(u===37&&Xn(e.charCodeAt(n+1))&&Xn(e.charCodeAt(n+2)))l=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(c=String.fromCharCode(u));else if(u>55295&&u<57344){const f=e.charCodeAt(n+1);u<56320&&f>56319&&f<57344?(c=String.fromCharCode(u,f),l=1):c="�"}else c=String.fromCharCode(u);c&&(t.push(e.slice(a,n),encodeURIComponent(c)),a=n+l+1,c=""),l&&(n+=l,l=0)}return t.join("")+e.slice(a)}function bt(e,t,n,a){const l=a?a-1:Number.POSITIVE_INFINITY;let u=0;return c;function c(h){return jt(h)?(e.enter(n),f(h)):t(h)}function f(h){return jt(h)&&u++<l?(e.consume(h),f):(e.exit(n),t(h))}}const L8={tokenize:B8};function B8(e){const t=e.attempt(this.parser.constructs.contentInitial,a,l);let n;return t;function a(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),bt(e,t,"linePrefix")}function l(f){return e.enter("paragraph"),u(f)}function u(f){const h=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=h),n=h,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return et(f)?(e.consume(f),e.exit("chunkText"),u):(e.consume(f),c)}}const q8={tokenize:U8},p2={tokenize:H8};function U8(e){const t=this,n=[];let a=0,l,u,c;return f;function f(q){if(a<n.length){const L=n[a];return t.containerState=L[1],e.attempt(L[0].continuation,h,m)(q)}return m(q)}function h(q){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,l&&M();const L=t.events.length;let K=L,P;for(;K--;)if(t.events[K][0]==="exit"&&t.events[K][1].type==="chunkFlow"){P=t.events[K][1].end;break}O(a);let H=L;for(;H<t.events.length;)t.events[H][1].end={...P},H++;return Zr(t.events,K+1,0,t.events.slice(L)),t.events.length=H,m(q)}return f(q)}function m(q){if(a===n.length){if(!l)return k(q);if(l.currentConstruct&&l.currentConstruct.concrete)return C(q);t.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(p2,g,y)(q)}function g(q){return l&&M(),O(a),k(q)}function y(q){return t.parser.lazy[t.now().line]=a!==n.length,c=t.now().offset,C(q)}function k(q){return t.containerState={},e.attempt(p2,x,C)(q)}function x(q){return a++,n.push([t.currentConstruct,t.containerState]),k(q)}function C(q){if(q===null){l&&M(),O(0),e.consume(q);return}return l=l||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:u}),D(q)}function D(q){if(q===null){R(e.exit("chunkFlow"),!0),O(0),e.consume(q);return}return et(q)?(e.consume(q),R(e.exit("chunkFlow")),a=0,t.interrupt=void 0,f):(e.consume(q),D)}function R(q,L){const K=t.sliceStream(q);if(L&&K.push(null),q.previous=u,u&&(u.next=q),u=q,l.defineSkip(q.start),l.write(K),t.parser.lazy[q.start.line]){let P=l.events.length;for(;P--;)if(l.events[P][1].start.offset<c&&(!l.events[P][1].end||l.events[P][1].end.offset>c))return;const H=t.events.length;let X=H,J,F;for(;X--;)if(t.events[X][0]==="exit"&&t.events[X][1].type==="chunkFlow"){if(J){F=t.events[X][1].end;break}J=!0}for(O(a),P=H;P<t.events.length;)t.events[P][1].end={...F},P++;Zr(t.events,X+1,0,t.events.slice(H)),t.events.length=P}}function O(q){let L=n.length;for(;L-- >q;){const K=n[L];t.containerState=K[1],K[0].exit.call(t,e)}n.length=q}function M(){l.write([null]),u=void 0,l=void 0,t.containerState._closeFlow=void 0}}function H8(e,t,n){return bt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function su(e){if(e===null||Yt(e)||Ws(e))return 1;if(xf(e))return 2}function bf(e,t,n){const a=[];let l=-1;for(;++l<e.length;){const u=e[l].resolveAll;u&&!a.includes(u)&&(t=u(t,n),a.push(u))}return t}const kp={name:"attention",resolveAll:$8,tokenize:F8};function $8(e,t){let n=-1,a,l,u,c,f,h,m,g;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;h=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 y={...e[a][1].end},k={...e[n][1].start};g2(y,-h),g2(k,h),c={type:h>1?"strongSequence":"emphasisSequence",start:y,end:{...e[a][1].end}},f={type:h>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:k},u={type:h>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[n][1].start}},l={type:h>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[a][1].end={...c.start},e[n][1].start={...f.end},m=[],e[a][1].end.offset-e[a][1].start.offset&&(m=ya(m,[["enter",e[a][1],t],["exit",e[a][1],t]])),m=ya(m,[["enter",l,t],["enter",c,t],["exit",c,t],["enter",u,t]]),m=ya(m,bf(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),m=ya(m,[["exit",u,t],["enter",f,t],["exit",f,t],["exit",l,t]]),e[n][1].end.offset-e[n][1].start.offset?(g=2,m=ya(m,[["enter",e[n][1],t],["exit",e[n][1],t]])):g=0,Zr(e,a-1,n-a+3,m),n=a+m.length-g-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function F8(e,t){const n=this.parser.constructs.attentionMarkers.null,a=this.previous,l=su(a);let u;return c;function c(h){return u=h,e.enter("attentionSequence"),f(h)}function f(h){if(h===u)return e.consume(h),f;const m=e.exit("attentionSequence"),g=su(h),y=!g||g===2&&l||n.includes(h),k=!l||l===2&&g||n.includes(a);return m._open=!!(u===42?y:y&&(l||!k)),m._close=!!(u===42?k:k&&(g||!y)),t(h)}}function g2(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const P8={name:"autolink",tokenize:G8};function G8(e,t,n){let a=0;return l;function l(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(x){return fr(x)?(e.consume(x),c):x===64?n(x):m(x)}function c(x){return x===43||x===45||x===46||Xn(x)?(a=1,f(x)):m(x)}function f(x){return x===58?(e.consume(x),a=0,h):(x===43||x===45||x===46||Xn(x))&&a++<32?(e.consume(x),f):(a=0,m(x))}function h(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):x===null||x===32||x===60||rf(x)?n(x):(e.consume(x),h)}function m(x){return x===64?(e.consume(x),g):O8(x)?(e.consume(x),m):n(x)}function g(x){return Xn(x)?y(x):n(x)}function y(x){return x===46?(e.consume(x),a=0,g):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):k(x)}function k(x){if((x===45||Xn(x))&&a++<63){const C=x===45?k:y;return e.consume(x),C}return n(x)}}const a0={partial:!0,tokenize:V8};function V8(e,t,n){return a;function a(u){return jt(u)?bt(e,l,"linePrefix")(u):l(u)}function l(u){return u===null||et(u)?t(u):n(u)}}const l5={continuation:{tokenize:W8},exit:K8,name:"blockQuote",tokenize:Y8};function Y8(e,t,n){const a=this;return l;function l(c){if(c===62){const f=a.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),u}return n(c)}function u(c){return jt(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function W8(e,t,n){const a=this;return l;function l(c){return jt(c)?bt(e,u,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):u(c)}function u(c){return e.attempt(l5,t,n)(c)}}function K8(e){e.exit("blockQuote")}const s5={name:"characterEscape",tokenize:X8};function X8(e,t,n){return a;function a(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),l}function l(u){return _8(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(u)}}const o5={name:"characterReference",tokenize:Z8};function Z8(e,t,n){const a=this;let l=0,u,c;return f;function f(y){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),h}function h(y){return y===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(y),e.exit("characterReferenceMarkerNumeric"),m):(e.enter("characterReferenceValue"),u=31,c=Xn,g(y))}function m(y){return y===88||y===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(y),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,c=I8,g):(e.enter("characterReferenceValue"),u=7,c=wp,g(y))}function g(y){if(y===59&&l){const k=e.exit("characterReferenceValue");return c===Xn&&!g1(a.sliceSerialize(k))?n(y):(e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(y)&&l++<u?(e.consume(y),g):n(y)}}const y2={partial:!0,tokenize:J8},v2={concrete:!0,name:"codeFenced",tokenize:Q8};function Q8(e,t,n){const a=this,l={partial:!0,tokenize:K};let u=0,c=0,f;return h;function h(P){return m(P)}function m(P){const H=a.events[a.events.length-1];return u=H&&H[1].type==="linePrefix"?H[2].sliceSerialize(H[1],!0).length:0,f=P,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(P)}function g(P){return P===f?(c++,e.consume(P),g):c<3?n(P):(e.exit("codeFencedFenceSequence"),jt(P)?bt(e,y,"whitespace")(P):y(P))}function y(P){return P===null||et(P)?(e.exit("codeFencedFence"),a.interrupt?t(P):e.check(y2,D,L)(P)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),k(P))}function k(P){return P===null||et(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),y(P)):jt(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),bt(e,x,"whitespace")(P)):P===96&&P===f?n(P):(e.consume(P),k)}function x(P){return P===null||et(P)?y(P):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),C(P))}function C(P){return P===null||et(P)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),y(P)):P===96&&P===f?n(P):(e.consume(P),C)}function D(P){return e.attempt(l,L,R)(P)}function R(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),O}function O(P){return u>0&&jt(P)?bt(e,M,"linePrefix",u+1)(P):M(P)}function M(P){return P===null||et(P)?e.check(y2,D,L)(P):(e.enter("codeFlowValue"),q(P))}function q(P){return P===null||et(P)?(e.exit("codeFlowValue"),M(P)):(e.consume(P),q)}function L(P){return e.exit("codeFenced"),t(P)}function K(P,H,X){let J=0;return F;function F(pe){return P.enter("lineEnding"),P.consume(pe),P.exit("lineEnding"),he}function he(pe){return P.enter("codeFencedFence"),jt(pe)?bt(P,me,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(pe):me(pe)}function me(pe){return pe===f?(P.enter("codeFencedFenceSequence"),Ae(pe)):X(pe)}function Ae(pe){return pe===f?(J++,P.consume(pe),Ae):J>=c?(P.exit("codeFencedFenceSequence"),jt(pe)?bt(P,je,"whitespace")(pe):je(pe)):X(pe)}function je(pe){return pe===null||et(pe)?(P.exit("codeFencedFence"),H(pe)):X(pe)}}}function J8(e,t,n){const a=this;return l;function l(c){return c===null?n(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u)}function u(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}const Cm={name:"codeIndented",tokenize:tw},ew={partial:!0,tokenize:nw};function tw(e,t,n){const a=this;return l;function l(m){return e.enter("codeIndented"),bt(e,u,"linePrefix",5)(m)}function u(m){const g=a.events[a.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?c(m):n(m)}function c(m){return m===null?h(m):et(m)?e.attempt(ew,c,h)(m):(e.enter("codeFlowValue"),f(m))}function f(m){return m===null||et(m)?(e.exit("codeFlowValue"),c(m)):(e.consume(m),f)}function h(m){return e.exit("codeIndented"),t(m)}}function nw(e,t,n){const a=this;return l;function l(c){return a.parser.lazy[a.now().line]?n(c):et(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):bt(e,u,"linePrefix",5)(c)}function u(c){const f=a.events[a.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):et(c)?l(c):n(c)}}const rw={name:"codeText",previous:iw,resolve:aw,tokenize:lw};function aw(e){let t=e.length-4,n=3,a,l;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;)l===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(l=a):(a===t||e[a][1].type==="lineEnding")&&(e[l][1].type="codeTextData",a!==l+2&&(e[l][1].end=e[a-1][1].end,e.splice(l+2,a-l-2),t-=a-l-2,a=l+2),l=void 0);return e}function iw(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function lw(e,t,n){let a=0,l,u;return c;function c(y){return e.enter("codeText"),e.enter("codeTextSequence"),f(y)}function f(y){return y===96?(e.consume(y),a++,f):(e.exit("codeTextSequence"),h(y))}function h(y){return y===null?n(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),h):y===96?(u=e.enter("codeTextSequence"),l=0,g(y)):et(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),h):(e.enter("codeTextData"),m(y))}function m(y){return y===null||y===32||y===96||et(y)?(e.exit("codeTextData"),h(y)):(e.consume(y),m)}function g(y){return y===96?(e.consume(y),l++,g):l===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(y)):(u.type="codeTextData",m(y))}}class sw{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 l=n||0;this.setCursor(Math.trunc(t));const u=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return a&&Nc(this.left,a),u.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),Nc(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Nc(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);Nc(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Nc(this.left,n.reverse())}}}function Nc(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 u5(e){const t={};let n=-1,a,l,u,c,f,h,m;const g=new sw(e);for(;++n<g.length;){for(;n in t;)n=t[n];if(a=g.get(n),n&&a[1].type==="chunkFlow"&&g.get(n-1)[1].type==="listItemPrefix"&&(h=a[1]._tokenizer.events,u=0,u<h.length&&h[u][1].type==="lineEndingBlank"&&(u+=2),u<h.length&&h[u][1].type==="content"))for(;++u<h.length&&h[u][1].type!=="content";)h[u][1].type==="chunkText"&&(h[u][1]._isInFirstContentOfListItem=!0,u++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,ow(g,n)),n=t[n],m=!0);else if(a[1]._container){for(u=n,l=void 0;u--;)if(c=g.get(u),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(l&&(g.get(l)[1].type="lineEndingBlank"),c[1].type="lineEnding",l=u);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;l&&(a[1].end={...g.get(l)[1].start},f=g.slice(l,n),f.unshift(a),g.splice(l,n-l+1,f))}}return Zr(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!m}function ow(e,t){const n=e.get(t)[1],a=e.get(t)[2];let l=t-1;const u=[];let c=n._tokenizer;c||(c=a.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,h=[],m={};let g,y,k=-1,x=n,C=0,D=0;const R=[D];for(;x;){for(;e.get(++l)[1]!==x;);u.push(l),x._tokenizer||(g=a.sliceStream(x),x.next||g.push(null),y&&c.defineSkip(x.start),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=x,x=x.next}for(x=n;++k<f.length;)f[k][0]==="exit"&&f[k-1][0]==="enter"&&f[k][1].type===f[k-1][1].type&&f[k][1].start.line!==f[k][1].end.line&&(D=k+1,R.push(D),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(c.events=[],x?(x._tokenizer=void 0,x.previous=void 0):R.pop(),k=R.length;k--;){const O=f.slice(R[k],R[k+1]),M=u.pop();h.push([M,M+O.length-1]),e.splice(M,2,O)}for(h.reverse(),k=-1;++k<h.length;)m[C+h[k][0]]=C+h[k][1],C+=h[k][1]-h[k][0]-1;return m}const uw={resolve:dw,tokenize:fw},cw={partial:!0,tokenize:hw};function dw(e){return u5(e),e}function fw(e,t){let n;return a;function a(f){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),l(f)}function l(f){return f===null?u(f):et(f)?e.check(cw,c,u)(f):(e.consume(f),l)}function u(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function c(f){return e.consume(f),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,l}}function hw(e,t,n){const a=this;return l;function l(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),bt(e,u,"linePrefix")}function u(c){if(c===null||et(c))return n(c);const f=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):e.interrupt(a.parser.constructs.flow,n,t)(c)}}function c5(e,t,n,a,l,u,c,f,h){const m=h||Number.POSITIVE_INFINITY;let g=0;return y;function y(O){return O===60?(e.enter(a),e.enter(l),e.enter(u),e.consume(O),e.exit(u),k):O===null||O===32||O===41||rf(O)?n(O):(e.enter(a),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),D(O))}function k(O){return O===62?(e.enter(u),e.consume(O),e.exit(u),e.exit(l),e.exit(a),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),x(O))}function x(O){return O===62?(e.exit("chunkString"),e.exit(f),k(O)):O===null||O===60||et(O)?n(O):(e.consume(O),O===92?C:x)}function C(O){return O===60||O===62||O===92?(e.consume(O),x):x(O)}function D(O){return!g&&(O===null||O===41||Yt(O))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(a),t(O)):g<m&&O===40?(e.consume(O),g++,D):O===41?(e.consume(O),g--,D):O===null||O===32||O===40||rf(O)?n(O):(e.consume(O),O===92?R:D)}function R(O){return O===40||O===41||O===92?(e.consume(O),D):D(O)}}function d5(e,t,n,a,l,u){const c=this;let f=0,h;return m;function m(x){return e.enter(a),e.enter(l),e.consume(x),e.exit(l),e.enter(u),g}function g(x){return f>999||x===null||x===91||x===93&&!h||x===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?n(x):x===93?(e.exit(u),e.enter(l),e.consume(x),e.exit(l),e.exit(a),t):et(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),y(x))}function y(x){return x===null||x===91||x===93||et(x)||f++>999?(e.exit("chunkString"),g(x)):(e.consume(x),h||(h=!jt(x)),x===92?k:y)}function k(x){return x===91||x===92||x===93?(e.consume(x),f++,y):y(x)}}function f5(e,t,n,a,l,u){let c;return f;function f(k){return k===34||k===39||k===40?(e.enter(a),e.enter(l),e.consume(k),e.exit(l),c=k===40?41:k,h):n(k)}function h(k){return k===c?(e.enter(l),e.consume(k),e.exit(l),e.exit(a),t):(e.enter(u),m(k))}function m(k){return k===c?(e.exit(u),h(c)):k===null?n(k):et(k)?(e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),bt(e,m,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(k))}function g(k){return k===c||k===null||et(k)?(e.exit("chunkString"),m(k)):(e.consume(k),k===92?y:g)}function y(k){return k===c||k===92?(e.consume(k),g):g(k)}}function Hc(e,t){let n;return a;function a(l){return et(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n=!0,a):jt(l)?bt(e,a,n?"linePrefix":"lineSuffix")(l):t(l)}}const mw={name:"definition",tokenize:gw},pw={partial:!0,tokenize:yw};function gw(e,t,n){const a=this;let l;return u;function u(x){return e.enter("definition"),c(x)}function c(x){return d5.call(a,e,f,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function f(x){return l=Oa(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),h):n(x)}function h(x){return Yt(x)?Hc(e,m)(x):m(x)}function m(x){return c5(e,g,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function g(x){return e.attempt(pw,y,y)(x)}function y(x){return jt(x)?bt(e,k,"whitespace")(x):k(x)}function k(x){return x===null||et(x)?(e.exit("definition"),a.parser.defined.push(l),t(x)):n(x)}}function yw(e,t,n){return a;function a(f){return Yt(f)?Hc(e,l)(f):n(f)}function l(f){return f5(e,u,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function u(f){return jt(f)?bt(e,c,"whitespace")(f):c(f)}function c(f){return f===null||et(f)?t(f):n(f)}}const vw={name:"hardBreakEscape",tokenize:xw};function xw(e,t,n){return a;function a(u){return e.enter("hardBreakEscape"),e.consume(u),l}function l(u){return et(u)?(e.exit("hardBreakEscape"),t(u)):n(u)}}const bw={name:"headingAtx",resolve:ww,tokenize:kw};function ww(e,t){let n=e.length-2,a=3,l,u;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&&(l={type:"atxHeadingText",start:e[a][1].start,end:e[n][1].end},u={type:"chunkText",start:e[a][1].start,end:e[n][1].end,contentType:"text"},Zr(e,a,n-a+1,[["enter",l,t],["enter",u,t],["exit",u,t],["exit",l,t]])),e}function kw(e,t,n){let a=0;return l;function l(g){return e.enter("atxHeading"),u(g)}function u(g){return e.enter("atxHeadingSequence"),c(g)}function c(g){return g===35&&a++<6?(e.consume(g),c):g===null||Yt(g)?(e.exit("atxHeadingSequence"),f(g)):n(g)}function f(g){return g===35?(e.enter("atxHeadingSequence"),h(g)):g===null||et(g)?(e.exit("atxHeading"),t(g)):jt(g)?bt(e,f,"whitespace")(g):(e.enter("atxHeadingText"),m(g))}function h(g){return g===35?(e.consume(g),h):(e.exit("atxHeadingSequence"),f(g))}function m(g){return g===null||g===35||Yt(g)?(e.exit("atxHeadingText"),f(g)):(e.consume(g),m)}}const Sw=["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"],x2=["pre","script","style","textarea"],jw={concrete:!0,name:"htmlFlow",resolveTo:Aw,tokenize:Ew},Cw={partial:!0,tokenize:Mw},Tw={partial:!0,tokenize:Nw};function Aw(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 Ew(e,t,n){const a=this;let l,u,c,f,h;return m;function m(z){return g(z)}function g(z){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(z),y}function y(z){return z===33?(e.consume(z),k):z===47?(e.consume(z),u=!0,D):z===63?(e.consume(z),l=3,a.interrupt?t:U):fr(z)?(e.consume(z),c=String.fromCharCode(z),R):n(z)}function k(z){return z===45?(e.consume(z),l=2,x):z===91?(e.consume(z),l=5,f=0,C):fr(z)?(e.consume(z),l=4,a.interrupt?t:U):n(z)}function x(z){return z===45?(e.consume(z),a.interrupt?t:U):n(z)}function C(z){const te="CDATA[";return z===te.charCodeAt(f++)?(e.consume(z),f===te.length?a.interrupt?t:me:C):n(z)}function D(z){return fr(z)?(e.consume(z),c=String.fromCharCode(z),R):n(z)}function R(z){if(z===null||z===47||z===62||Yt(z)){const te=z===47,Te=c.toLowerCase();return!te&&!u&&x2.includes(Te)?(l=1,a.interrupt?t(z):me(z)):Sw.includes(c.toLowerCase())?(l=6,te?(e.consume(z),O):a.interrupt?t(z):me(z)):(l=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(z):u?M(z):q(z))}return z===45||Xn(z)?(e.consume(z),c+=String.fromCharCode(z),R):n(z)}function O(z){return z===62?(e.consume(z),a.interrupt?t:me):n(z)}function M(z){return jt(z)?(e.consume(z),M):F(z)}function q(z){return z===47?(e.consume(z),F):z===58||z===95||fr(z)?(e.consume(z),L):jt(z)?(e.consume(z),q):F(z)}function L(z){return z===45||z===46||z===58||z===95||Xn(z)?(e.consume(z),L):K(z)}function K(z){return z===61?(e.consume(z),P):jt(z)?(e.consume(z),K):q(z)}function P(z){return z===null||z===60||z===61||z===62||z===96?n(z):z===34||z===39?(e.consume(z),h=z,H):jt(z)?(e.consume(z),P):X(z)}function H(z){return z===h?(e.consume(z),h=null,J):z===null||et(z)?n(z):(e.consume(z),H)}function X(z){return z===null||z===34||z===39||z===47||z===60||z===61||z===62||z===96||Yt(z)?K(z):(e.consume(z),X)}function J(z){return z===47||z===62||jt(z)?q(z):n(z)}function F(z){return z===62?(e.consume(z),he):n(z)}function he(z){return z===null||et(z)?me(z):jt(z)?(e.consume(z),he):n(z)}function me(z){return z===45&&l===2?(e.consume(z),Z):z===60&&l===1?(e.consume(z),ge):z===62&&l===4?(e.consume(z),B):z===63&&l===3?(e.consume(z),U):z===93&&l===5?(e.consume(z),oe):et(z)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check(Cw,ee,Ae)(z)):z===null||et(z)?(e.exit("htmlFlowData"),Ae(z)):(e.consume(z),me)}function Ae(z){return e.check(Tw,je,ee)(z)}function je(z){return e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),pe}function pe(z){return z===null||et(z)?Ae(z):(e.enter("htmlFlowData"),me(z))}function Z(z){return z===45?(e.consume(z),U):me(z)}function ge(z){return z===47?(e.consume(z),c="",ye):me(z)}function ye(z){if(z===62){const te=c.toLowerCase();return x2.includes(te)?(e.consume(z),B):me(z)}return fr(z)&&c.length<8?(e.consume(z),c+=String.fromCharCode(z),ye):me(z)}function oe(z){return z===93?(e.consume(z),U):me(z)}function U(z){return z===62?(e.consume(z),B):z===45&&l===2?(e.consume(z),U):me(z)}function B(z){return z===null||et(z)?(e.exit("htmlFlowData"),ee(z)):(e.consume(z),B)}function ee(z){return e.exit("htmlFlow"),t(z)}}function Nw(e,t,n){const a=this;return l;function l(c){return et(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):n(c)}function u(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}function Mw(e,t,n){return a;function a(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(a0,t,n)}}const Dw={name:"htmlText",tokenize:zw};function zw(e,t,n){const a=this;let l,u,c;return f;function f(U){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(U),h}function h(U){return U===33?(e.consume(U),m):U===47?(e.consume(U),K):U===63?(e.consume(U),q):fr(U)?(e.consume(U),X):n(U)}function m(U){return U===45?(e.consume(U),g):U===91?(e.consume(U),u=0,C):fr(U)?(e.consume(U),M):n(U)}function g(U){return U===45?(e.consume(U),x):n(U)}function y(U){return U===null?n(U):U===45?(e.consume(U),k):et(U)?(c=y,ge(U)):(e.consume(U),y)}function k(U){return U===45?(e.consume(U),x):y(U)}function x(U){return U===62?Z(U):U===45?k(U):y(U)}function C(U){const B="CDATA[";return U===B.charCodeAt(u++)?(e.consume(U),u===B.length?D:C):n(U)}function D(U){return U===null?n(U):U===93?(e.consume(U),R):et(U)?(c=D,ge(U)):(e.consume(U),D)}function R(U){return U===93?(e.consume(U),O):D(U)}function O(U){return U===62?Z(U):U===93?(e.consume(U),O):D(U)}function M(U){return U===null||U===62?Z(U):et(U)?(c=M,ge(U)):(e.consume(U),M)}function q(U){return U===null?n(U):U===63?(e.consume(U),L):et(U)?(c=q,ge(U)):(e.consume(U),q)}function L(U){return U===62?Z(U):q(U)}function K(U){return fr(U)?(e.consume(U),P):n(U)}function P(U){return U===45||Xn(U)?(e.consume(U),P):H(U)}function H(U){return et(U)?(c=H,ge(U)):jt(U)?(e.consume(U),H):Z(U)}function X(U){return U===45||Xn(U)?(e.consume(U),X):U===47||U===62||Yt(U)?J(U):n(U)}function J(U){return U===47?(e.consume(U),Z):U===58||U===95||fr(U)?(e.consume(U),F):et(U)?(c=J,ge(U)):jt(U)?(e.consume(U),J):Z(U)}function F(U){return U===45||U===46||U===58||U===95||Xn(U)?(e.consume(U),F):he(U)}function he(U){return U===61?(e.consume(U),me):et(U)?(c=he,ge(U)):jt(U)?(e.consume(U),he):J(U)}function me(U){return U===null||U===60||U===61||U===62||U===96?n(U):U===34||U===39?(e.consume(U),l=U,Ae):et(U)?(c=me,ge(U)):jt(U)?(e.consume(U),me):(e.consume(U),je)}function Ae(U){return U===l?(e.consume(U),l=void 0,pe):U===null?n(U):et(U)?(c=Ae,ge(U)):(e.consume(U),Ae)}function je(U){return U===null||U===34||U===39||U===60||U===61||U===96?n(U):U===47||U===62||Yt(U)?J(U):(e.consume(U),je)}function pe(U){return U===47||U===62||Yt(U)?J(U):n(U)}function Z(U){return U===62?(e.consume(U),e.exit("htmlTextData"),e.exit("htmlText"),t):n(U)}function ge(U){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),ye}function ye(U){return jt(U)?bt(e,oe,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):oe(U)}function oe(U){return e.enter("htmlTextData"),c(U)}}const y1={name:"labelEnd",resolveAll:_w,resolveTo:Lw,tokenize:Bw},Rw={tokenize:qw},Ow={tokenize:Uw},Iw={tokenize:Hw};function _w(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 l=a.type==="labelImage"?4:2;a.type="data",t+=l}}return e.length!==n.length&&Zr(e,0,e.length,n),e}function Lw(e,t){let n=e.length,a=0,l,u,c,f;for(;n--;)if(l=e[n][1],u){if(l.type==="link"||l.type==="labelLink"&&l._inactive)break;e[n][0]==="enter"&&l.type==="labelLink"&&(l._inactive=!0)}else if(c){if(e[n][0]==="enter"&&(l.type==="labelImage"||l.type==="labelLink")&&!l._balanced&&(u=n,l.type!=="labelLink")){a=2;break}}else l.type==="labelEnd"&&(c=n);const h={type:e[u][1].type==="labelLink"?"link":"image",start:{...e[u][1].start},end:{...e[e.length-1][1].end}},m={type:"label",start:{...e[u][1].start},end:{...e[c][1].end}},g={type:"labelText",start:{...e[u+a+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",h,t],["enter",m,t]],f=ya(f,e.slice(u+1,u+a+3)),f=ya(f,[["enter",g,t]]),f=ya(f,bf(t.parser.constructs.insideSpan.null,e.slice(u+a+4,c-3),t)),f=ya(f,[["exit",g,t],e[c-2],e[c-1],["exit",m,t]]),f=ya(f,e.slice(c+1)),f=ya(f,[["exit",h,t]]),Zr(e,u,e.length,f),e}function Bw(e,t,n){const a=this;let l=a.events.length,u,c;for(;l--;)if((a.events[l][1].type==="labelImage"||a.events[l][1].type==="labelLink")&&!a.events[l][1]._balanced){u=a.events[l][1];break}return f;function f(k){return u?u._inactive?y(k):(c=a.parser.defined.includes(Oa(a.sliceSerialize({start:u.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(k),e.exit("labelMarker"),e.exit("labelEnd"),h):n(k)}function h(k){return k===40?e.attempt(Rw,g,c?g:y)(k):k===91?e.attempt(Ow,g,c?m:y)(k):c?g(k):y(k)}function m(k){return e.attempt(Iw,g,y)(k)}function g(k){return t(k)}function y(k){return u._balanced=!0,n(k)}}function qw(e,t,n){return a;function a(y){return e.enter("resource"),e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),l}function l(y){return Yt(y)?Hc(e,u)(y):u(y)}function u(y){return y===41?g(y):c5(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return Yt(y)?Hc(e,h)(y):g(y)}function f(y){return n(y)}function h(y){return y===34||y===39||y===40?f5(e,m,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):g(y)}function m(y){return Yt(y)?Hc(e,g)(y):g(y)}function g(y){return y===41?(e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),e.exit("resource"),t):n(y)}}function Uw(e,t,n){const a=this;return l;function l(f){return d5.call(a,e,u,c,"reference","referenceMarker","referenceString")(f)}function u(f){return a.parser.defined.includes(Oa(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(f):n(f)}function c(f){return n(f)}}function Hw(e,t,n){return a;function a(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),l}function l(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),t):n(u)}}const $w={name:"labelStartImage",resolveAll:y1.resolveAll,tokenize:Fw};function Fw(e,t,n){const a=this;return l;function l(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),u}function u(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):n(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(f):t(f)}}const Pw={name:"labelStartLink",resolveAll:y1.resolveAll,tokenize:Gw};function Gw(e,t,n){const a=this;return l;function l(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),u}function u(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(c):t(c)}}const Tm={name:"lineEnding",tokenize:Vw};function Vw(e,t){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),bt(e,t,"linePrefix")}}const Pd={name:"thematicBreak",tokenize:Yw};function Yw(e,t,n){let a=0,l;return u;function u(m){return e.enter("thematicBreak"),c(m)}function c(m){return l=m,f(m)}function f(m){return m===l?(e.enter("thematicBreakSequence"),h(m)):a>=3&&(m===null||et(m))?(e.exit("thematicBreak"),t(m)):n(m)}function h(m){return m===l?(e.consume(m),a++,h):(e.exit("thematicBreakSequence"),jt(m)?bt(e,f,"whitespace")(m):f(m))}}const Dr={continuation:{tokenize:Zw},exit:Jw,name:"list",tokenize:Xw},Ww={partial:!0,tokenize:e9},Kw={partial:!0,tokenize:Qw};function Xw(e,t,n){const a=this,l=a.events[a.events.length-1];let u=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,c=0;return f;function f(x){const C=a.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(C==="listUnordered"?!a.containerState.marker||x===a.containerState.marker:wp(x)){if(a.containerState.type||(a.containerState.type=C,e.enter(C,{_container:!0})),C==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(Pd,n,m)(x):m(x);if(!a.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(x)}return n(x)}function h(x){return wp(x)&&++c<10?(e.consume(x),h):(!a.interrupt||c<2)&&(a.containerState.marker?x===a.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),m(x)):n(x)}function m(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||x,e.check(a0,a.interrupt?n:g,e.attempt(Ww,k,y))}function g(x){return a.containerState.initialBlankLine=!0,u++,k(x)}function y(x){return jt(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),k):n(x)}function k(x){return a.containerState.size=u+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(x)}}function Zw(e,t,n){const a=this;return a.containerState._closeFlow=void 0,e.check(a0,l,u);function l(f){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,bt(e,t,"listItemIndent",a.containerState.size+1)(f)}function u(f){return a.containerState.furtherBlankLines||!jt(f)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(f)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(Kw,t,c)(f))}function c(f){return a.containerState._closeFlow=!0,a.interrupt=void 0,bt(e,e.attempt(Dr,t,n),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function Qw(e,t,n){const a=this;return bt(e,l,"listItemIndent",a.containerState.size+1);function l(u){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(u):n(u)}}function Jw(e){e.exit(this.containerState.type)}function e9(e,t,n){const a=this;return bt(e,l,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(u){const c=a.events[a.events.length-1];return!jt(u)&&c&&c[1].type==="listItemPrefixWhitespace"?t(u):n(u)}}const b2={name:"setextUnderline",resolveTo:t9,tokenize:n9};function t9(e,t){let n=e.length,a,l,u;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){a=n;break}e[n][1].type==="paragraph"&&(l=n)}else e[n][1].type==="content"&&e.splice(n,1),!u&&e[n][1].type==="definition"&&(u=n);const c={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",u?(e.splice(l,0,["enter",c,t]),e.splice(u+1,0,["exit",e[a][1],t]),e[a][1].end={...e[u][1].end}):e[a][1]=c,e.push(["exit",c,t]),e}function n9(e,t,n){const a=this;let l;return u;function u(m){let g=a.events.length,y;for(;g--;)if(a.events[g][1].type!=="lineEnding"&&a.events[g][1].type!=="linePrefix"&&a.events[g][1].type!=="content"){y=a.events[g][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||y)?(e.enter("setextHeadingLine"),l=m,c(m)):n(m)}function c(m){return e.enter("setextHeadingLineSequence"),f(m)}function f(m){return m===l?(e.consume(m),f):(e.exit("setextHeadingLineSequence"),jt(m)?bt(e,h,"lineSuffix")(m):h(m))}function h(m){return m===null||et(m)?(e.exit("setextHeadingLine"),t(m)):n(m)}}const r9={tokenize:a9};function a9(e){const t=this,n=e.attempt(a0,a,e.attempt(this.parser.constructs.flowInitial,l,bt(e,e.attempt(this.parser.constructs.flow,l,e.attempt(uw,l)),"linePrefix")));return n;function a(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function l(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const i9={resolveAll:m5()},l9=h5("string"),s9=h5("text");function h5(e){return{resolveAll:m5(e==="text"?o9:void 0),tokenize:t};function t(n){const a=this,l=this.parser.constructs[e],u=n.attempt(l,c,f);return c;function c(g){return m(g)?u(g):f(g)}function f(g){if(g===null){n.consume(g);return}return n.enter("data"),n.consume(g),h}function h(g){return m(g)?(n.exit("data"),u(g)):(n.consume(g),h)}function m(g){if(g===null)return!0;const y=l[g];let k=-1;if(y)for(;++k<y.length;){const x=y[k];if(!x.previous||x.previous.call(a,a.previous))return!0}return!1}}}function m5(e){return t;function t(n,a){let l=-1,u;for(;++l<=n.length;)u===void 0?n[l]&&n[l][1].type==="data"&&(u=l,l++):(!n[l]||n[l][1].type!=="data")&&(l!==u+2&&(n[u][1].end=n[l-1][1].end,n.splice(u+2,l-u-2),l=u+2),u=void 0);return e?e(n,a):n}}function o9(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],l=t.sliceStream(a);let u=l.length,c=-1,f=0,h;for(;u--;){const m=l[u];if(typeof m=="string"){for(c=m.length;m.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(m===-2)h=!0,f++;else if(m!==-1){u++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(f=0),f){const m={type:n===e.length||h||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?c:a.start._bufferIndex+c,_index:a.start._index+u,line:a.end.line,column:a.end.column-f,offset:a.end.offset-f},end:{...a.end}};a.end={...m.start},a.start.offset===a.end.offset?Object.assign(a,m):(e.splice(n,0,["enter",m,t],["exit",m,t]),n+=2)}n++}return e}const u9={42:Dr,43:Dr,45:Dr,48:Dr,49:Dr,50:Dr,51:Dr,52:Dr,53:Dr,54:Dr,55:Dr,56:Dr,57:Dr,62:l5},c9={91:mw},d9={[-2]:Cm,[-1]:Cm,32:Cm},f9={35:bw,42:Pd,45:[b2,Pd],60:jw,61:b2,95:Pd,96:v2,126:v2},h9={38:o5,92:s5},m9={[-5]:Tm,[-4]:Tm,[-3]:Tm,33:$w,38:o5,42:kp,60:[P8,Dw],91:Pw,92:[vw,s5],93:y1,95:kp,96:rw},p9={null:[kp,i9]},g9={null:[42,95]},y9={null:[]},v9=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:g9,contentInitial:c9,disable:y9,document:u9,flow:f9,flowInitial:d9,insideSpan:p9,string:h9,text:m9},Symbol.toStringTag,{value:"Module"}));function x9(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 l={},u=[];let c=[],f=[];const h={attempt:H(K),check:H(P),consume:M,enter:q,exit:L,interrupt:H(P,{interrupt:!0})},m={code:null,containerState:{},defineSkip:D,events:[],now:C,parser:e,previous:null,sliceSerialize:k,sliceStream:x,write:y};let g=t.tokenize.call(m,h);return t.resolveAll&&u.push(t),m;function y(he){return c=ya(c,he),R(),c[c.length-1]!==null?[]:(X(t,0),m.events=bf(u,m.events,m),m.events)}function k(he,me){return w9(x(he),me)}function x(he){return b9(c,he)}function C(){const{_bufferIndex:he,_index:me,line:Ae,column:je,offset:pe}=a;return{_bufferIndex:he,_index:me,line:Ae,column:je,offset:pe}}function D(he){l[he.line]=he.column,F()}function R(){let he;for(;a._index<c.length;){const me=c[a._index];if(typeof me=="string")for(he=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===he&&a._bufferIndex<me.length;)O(me.charCodeAt(a._bufferIndex));else O(me)}}function O(he){g=g(he)}function M(he){et(he)?(a.line++,a.column=1,a.offset+=he===-3?2:1,F()):he!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),m.previous=he}function q(he,me){const Ae=me||{};return Ae.type=he,Ae.start=C(),m.events.push(["enter",Ae,m]),f.push(Ae),Ae}function L(he){const me=f.pop();return me.end=C(),m.events.push(["exit",me,m]),me}function K(he,me){X(he,me.from)}function P(he,me){me.restore()}function H(he,me){return Ae;function Ae(je,pe,Z){let ge,ye,oe,U;return Array.isArray(je)?ee(je):"tokenize"in je?ee([je]):B(je);function B(Re){return He;function He(rt){const de=rt!==null&&Re[rt],ie=rt!==null&&Re.null,Ee=[...Array.isArray(de)?de:de?[de]:[],...Array.isArray(ie)?ie:ie?[ie]:[]];return ee(Ee)(rt)}}function ee(Re){return ge=Re,ye=0,Re.length===0?Z:z(Re[ye])}function z(Re){return He;function He(rt){return U=J(),oe=Re,Re.partial||(m.currentConstruct=Re),Re.name&&m.parser.constructs.disable.null.includes(Re.name)?Te():Re.tokenize.call(me?Object.assign(Object.create(m),me):m,h,te,Te)(rt)}}function te(Re){return he(oe,U),pe}function Te(Re){return U.restore(),++ye<ge.length?z(ge[ye]):Z}}}function X(he,me){he.resolveAll&&!u.includes(he)&&u.push(he),he.resolve&&Zr(m.events,me,m.events.length-me,he.resolve(m.events.slice(me),m)),he.resolveTo&&(m.events=he.resolveTo(m.events,m))}function J(){const he=C(),me=m.previous,Ae=m.currentConstruct,je=m.events.length,pe=Array.from(f);return{from:je,restore:Z};function Z(){a=he,m.previous=me,m.currentConstruct=Ae,m.events.length=je,f=pe,F()}}function F(){a.line in l&&a.column<2&&(a.column=l[a.line],a.offset+=l[a.line]-1)}}function b9(e,t){const n=t.start._index,a=t.start._bufferIndex,l=t.end._index,u=t.end._bufferIndex;let c;if(n===l)c=[e[n].slice(a,u)];else{if(c=e.slice(n,l),a>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(a):c.shift()}u>0&&c.push(e[l].slice(0,u))}return c}function w9(e,t){let n=-1;const a=[];let l;for(;++n<e.length;){const u=e[n];let c;if(typeof u=="string")c=u;else switch(u){case-5:{c="\r";break}case-4:{c=`
52
- `;break}case-3:{c=`\r
53
- `;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&l)continue;c=" ";break}default:c=String.fromCharCode(u)}l=u===-2,a.push(c)}return a.join("")}function k9(e){const a={constructs:a5([v9,...(e||{}).extensions||[]]),content:l(L8),defined:[],document:l(q8),flow:l(r9),lazy:{},string:l(l9),text:l(s9)};return a;function l(u){return c;function c(f){return x9(a,u,f)}}}function S9(e){for(;!u5(e););return e}const w2=/[\0\t\n\r]/g;function j9(){let e=1,t="",n=!0,a;return l;function l(u,c,f){const h=[];let m,g,y,k,x;for(u=t+(typeof u=="string"?u.toString():new TextDecoder(c||void 0).decode(u)),y=0,t="",n&&(u.charCodeAt(0)===65279&&y++,n=void 0);y<u.length;){if(w2.lastIndex=y,m=w2.exec(u),k=m&&m.index!==void 0?m.index:u.length,x=u.charCodeAt(k),!m){t=u.slice(y);break}if(x===10&&y===k&&a)h.push(-3),a=void 0;else switch(a&&(h.push(-5),a=void 0),y<k&&(h.push(u.slice(y,k)),e+=k-y),x){case 0:{h.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,h.push(-2);e++<g;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:a=!0,e=1}y=k+1}return f&&(a&&h.push(-5),t&&h.push(t),h.push(null)),h}}const C9=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function T9(e){return e.replace(C9,A9)}function A9(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const l=n.charCodeAt(1),u=l===120||l===88;return i5(n.slice(u?2:1),u?16:10)}return g1(n)||e}const p5={}.hasOwnProperty;function E9(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),N9(n)(S9(k9(n).document().write(j9()(e,t,!0))))}function N9(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(er),autolinkProtocol:J,autolinkEmail:J,atxHeading:u(Mt),blockQuote:u(ie),characterEscape:J,characterReference:J,codeFenced:u(Ee),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:u(Ee,c),codeText:u(Oe,c),codeTextData:J,data:J,codeFlowValue:J,definition:u(Pe),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:u(Xe),hardBreakEscape:u(qn),hardBreakTrailing:u(qn),htmlFlow:u(ra,c),htmlFlowData:J,htmlText:u(ra,c),htmlTextData:J,image:u(Jn),label:c,link:u(er),listItem:u(Ln),listItemValue:k,listOrdered:u(Kt,y),listUnordered:u(Kt),paragraph:u(Vn),reference:z,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:u(Mt),strong:u(Un),thematicBreak:u(pr)},exit:{atxHeading:h(),atxHeadingSequence:K,autolink:h(),autolinkEmail:de,autolinkProtocol:rt,blockQuote:h(),characterEscapeValue:F,characterReferenceMarkerHexadecimal:Te,characterReferenceMarkerNumeric:Te,characterReferenceValue:Re,characterReference:He,codeFenced:h(R),codeFencedFence:D,codeFencedFenceInfo:x,codeFencedFenceMeta:C,codeFlowValue:F,codeIndented:h(O),codeText:h(pe),codeTextData:F,data:F,definition:h(),definitionDestinationString:L,definitionLabelString:M,definitionTitleString:q,emphasis:h(),hardBreakEscape:h(me),hardBreakTrailing:h(me),htmlFlow:h(Ae),htmlFlowData:F,htmlText:h(je),htmlTextData:F,image:h(ge),label:oe,labelText:ye,lineEnding:he,link:h(Z),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:te,resourceDestinationString:U,resourceTitleString:B,resource:ee,setextHeading:h(X),setextHeadingLineSequence:H,setextHeadingText:P,strong:h(),thematicBreak:h()}};g5(t,(e||{}).mdastExtensions||[]);const n={};return a;function a(ve){let Le={type:"root",children:[]};const re={stack:[Le],tokenStack:[],config:t,enter:f,exit:m,buffer:c,resume:g,data:n},be=[];let qe=-1;for(;++qe<ve.length;)if(ve[qe][1].type==="listOrdered"||ve[qe][1].type==="listUnordered")if(ve[qe][0]==="enter")be.push(qe);else{const Ge=be.pop();qe=l(ve,Ge,qe)}for(qe=-1;++qe<ve.length;){const Ge=t[ve[qe][0]];p5.call(Ge,ve[qe][1].type)&&Ge[ve[qe][1].type].call(Object.assign({sliceSerialize:ve[qe][2].sliceSerialize},re),ve[qe][1])}if(re.tokenStack.length>0){const Ge=re.tokenStack[re.tokenStack.length-1];(Ge[1]||k2).call(re,void 0,Ge[0])}for(Le.position={start:Fl(ve.length>0?ve[0][1].start:{line:1,column:1,offset:0}),end:Fl(ve.length>0?ve[ve.length-2][1].end:{line:1,column:1,offset:0})},qe=-1;++qe<t.transforms.length;)Le=t.transforms[qe](Le)||Le;return Le}function l(ve,Le,re){let be=Le-1,qe=-1,Ge=!1,lt,Ct,gt,nt;for(;++be<=re;){const xt=ve[be];switch(xt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{xt[0]==="enter"?qe++:qe--,nt=void 0;break}case"lineEndingBlank":{xt[0]==="enter"&&(lt&&!nt&&!qe&&!gt&&(gt=be),nt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:nt=void 0}if(!qe&&xt[0]==="enter"&&xt[1].type==="listItemPrefix"||qe===-1&&xt[0]==="exit"&&(xt[1].type==="listUnordered"||xt[1].type==="listOrdered")){if(lt){let Ut=be;for(Ct=void 0;Ut--;){const Zt=ve[Ut];if(Zt[1].type==="lineEnding"||Zt[1].type==="lineEndingBlank"){if(Zt[0]==="exit")continue;Ct&&(ve[Ct][1].type="lineEndingBlank",Ge=!0),Zt[1].type="lineEnding",Ct=Ut}else if(!(Zt[1].type==="linePrefix"||Zt[1].type==="blockQuotePrefix"||Zt[1].type==="blockQuotePrefixWhitespace"||Zt[1].type==="blockQuoteMarker"||Zt[1].type==="listItemIndent"))break}gt&&(!Ct||gt<Ct)&&(lt._spread=!0),lt.end=Object.assign({},Ct?ve[Ct][1].start:xt[1].end),ve.splice(Ct||be,0,["exit",lt,xt[2]]),be++,re++}if(xt[1].type==="listItemPrefix"){const Ut={type:"listItem",_spread:!1,start:Object.assign({},xt[1].start),end:void 0};lt=Ut,ve.splice(be,0,["enter",Ut,xt[2]]),be++,re++,gt=void 0,nt=!0}}}return ve[Le][1]._spread=Ge,re}function u(ve,Le){return re;function re(be){f.call(this,ve(be),be),Le&&Le.call(this,be)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(ve,Le,re){this.stack[this.stack.length-1].children.push(ve),this.stack.push(ve),this.tokenStack.push([Le,re||void 0]),ve.position={start:Fl(Le.start),end:void 0}}function h(ve){return Le;function Le(re){ve&&ve.call(this,re),m.call(this,re)}}function m(ve,Le){const re=this.stack.pop(),be=this.tokenStack.pop();if(be)be[0].type!==ve.type&&(Le?Le.call(this,ve,be[0]):(be[1]||k2).call(this,ve,be[0]));else throw new Error("Cannot close `"+ve.type+"` ("+Uc({start:ve.start,end:ve.end})+"): it’s not open");re.position.end=Fl(ve.end)}function g(){return p1(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function k(ve){if(this.data.expectingFirstListItemValue){const Le=this.stack[this.stack.length-2];Le.start=Number.parseInt(this.sliceSerialize(ve),10),this.data.expectingFirstListItemValue=void 0}}function x(){const ve=this.resume(),Le=this.stack[this.stack.length-1];Le.lang=ve}function C(){const ve=this.resume(),Le=this.stack[this.stack.length-1];Le.meta=ve}function D(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function R(){const ve=this.resume(),Le=this.stack[this.stack.length-1];Le.value=ve.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function O(){const ve=this.resume(),Le=this.stack[this.stack.length-1];Le.value=ve.replace(/(\r?\n|\r)$/g,"")}function M(ve){const Le=this.resume(),re=this.stack[this.stack.length-1];re.label=Le,re.identifier=Oa(this.sliceSerialize(ve)).toLowerCase()}function q(){const ve=this.resume(),Le=this.stack[this.stack.length-1];Le.title=ve}function L(){const ve=this.resume(),Le=this.stack[this.stack.length-1];Le.url=ve}function K(ve){const Le=this.stack[this.stack.length-1];if(!Le.depth){const re=this.sliceSerialize(ve).length;Le.depth=re}}function P(){this.data.setextHeadingSlurpLineEnding=!0}function H(ve){const Le=this.stack[this.stack.length-1];Le.depth=this.sliceSerialize(ve).codePointAt(0)===61?1:2}function X(){this.data.setextHeadingSlurpLineEnding=void 0}function J(ve){const re=this.stack[this.stack.length-1].children;let be=re[re.length-1];(!be||be.type!=="text")&&(be=Xt(),be.position={start:Fl(ve.start),end:void 0},re.push(be)),this.stack.push(be)}function F(ve){const Le=this.stack.pop();Le.value+=this.sliceSerialize(ve),Le.position.end=Fl(ve.end)}function he(ve){const Le=this.stack[this.stack.length-1];if(this.data.atHardBreak){const re=Le.children[Le.children.length-1];re.position.end=Fl(ve.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Le.type)&&(J.call(this,ve),F.call(this,ve))}function me(){this.data.atHardBreak=!0}function Ae(){const ve=this.resume(),Le=this.stack[this.stack.length-1];Le.value=ve}function je(){const ve=this.resume(),Le=this.stack[this.stack.length-1];Le.value=ve}function pe(){const ve=this.resume(),Le=this.stack[this.stack.length-1];Le.value=ve}function Z(){const ve=this.stack[this.stack.length-1];if(this.data.inReference){const Le=this.data.referenceType||"shortcut";ve.type+="Reference",ve.referenceType=Le,delete ve.url,delete ve.title}else delete ve.identifier,delete ve.label;this.data.referenceType=void 0}function ge(){const ve=this.stack[this.stack.length-1];if(this.data.inReference){const Le=this.data.referenceType||"shortcut";ve.type+="Reference",ve.referenceType=Le,delete ve.url,delete ve.title}else delete ve.identifier,delete ve.label;this.data.referenceType=void 0}function ye(ve){const Le=this.sliceSerialize(ve),re=this.stack[this.stack.length-2];re.label=T9(Le),re.identifier=Oa(Le).toLowerCase()}function oe(){const ve=this.stack[this.stack.length-1],Le=this.resume(),re=this.stack[this.stack.length-1];if(this.data.inReference=!0,re.type==="link"){const be=ve.children;re.children=be}else re.alt=Le}function U(){const ve=this.resume(),Le=this.stack[this.stack.length-1];Le.url=ve}function B(){const ve=this.resume(),Le=this.stack[this.stack.length-1];Le.title=ve}function ee(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function te(ve){const Le=this.resume(),re=this.stack[this.stack.length-1];re.label=Le,re.identifier=Oa(this.sliceSerialize(ve)).toLowerCase(),this.data.referenceType="full"}function Te(ve){this.data.characterReferenceType=ve.type}function Re(ve){const Le=this.sliceSerialize(ve),re=this.data.characterReferenceType;let be;re?(be=i5(Le,re==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):be=g1(Le);const qe=this.stack[this.stack.length-1];qe.value+=be}function He(ve){const Le=this.stack.pop();Le.position.end=Fl(ve.end)}function rt(ve){F.call(this,ve);const Le=this.stack[this.stack.length-1];Le.url=this.sliceSerialize(ve)}function de(ve){F.call(this,ve);const Le=this.stack[this.stack.length-1];Le.url="mailto:"+this.sliceSerialize(ve)}function ie(){return{type:"blockquote",children:[]}}function Ee(){return{type:"code",lang:null,meta:null,value:""}}function Oe(){return{type:"inlineCode",value:""}}function Pe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Xe(){return{type:"emphasis",children:[]}}function Mt(){return{type:"heading",depth:0,children:[]}}function qn(){return{type:"break"}}function ra(){return{type:"html",value:""}}function Jn(){return{type:"image",title:null,url:"",alt:null}}function er(){return{type:"link",title:null,url:"",children:[]}}function Kt(ve){return{type:"list",ordered:ve.type==="listOrdered",start:null,spread:ve._spread,children:[]}}function Ln(ve){return{type:"listItem",spread:ve._spread,checked:null,children:[]}}function Vn(){return{type:"paragraph",children:[]}}function Un(){return{type:"strong",children:[]}}function Xt(){return{type:"text",value:""}}function pr(){return{type:"thematicBreak"}}}function Fl(e){return{line:e.line,column:e.column,offset:e.offset}}function g5(e,t){let n=-1;for(;++n<t.length;){const a=t[n];Array.isArray(a)?g5(e,a):M9(e,a)}}function M9(e,t){let n;for(n in t)if(p5.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 k2(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Uc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Uc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Uc({start:t.start,end:t.end})+") is still open")}function D9(e){const t=this;t.parser=n;function n(a){return E9(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function z9(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 R9(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
54
- `}]}function O9(e,t){const n=t.value?t.value+`
55
- `:"",a={},l=t.lang?t.lang.split(/\s+/):[];l.length>0&&(a.className=["language-"+l[0]]);let u={type:"element",tagName:"code",properties:a,children:[{type:"text",value:n}]};return t.meta&&(u.data={meta:t.meta}),e.patch(t,u),u=e.applyData(t,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(t,u),u}function I9(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function _9(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function L9(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),l=hu(a.toLowerCase()),u=e.footnoteOrder.indexOf(a);let c,f=e.footnoteCounts.get(a);f===void 0?(f=0,e.footnoteOrder.push(a),c=e.footnoteOrder.length):c=u+1,f+=1,e.footnoteCounts.set(a,f);const h={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+l,id:n+"fnref-"+l+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,h);const m={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(t,m),e.applyData(t,m)}function B9(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 q9(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function y5(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 l=e.all(t),u=l[0];u&&u.type==="text"?u.value="["+u.value:l.unshift({type:"text",value:"["});const c=l[l.length-1];return c&&c.type==="text"?c.value+=a:l.push({type:"text",value:a}),l}function U9(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return y5(e,t);const l={src:hu(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(l.title=a.title);const u={type:"element",tagName:"img",properties:l,children:[]};return e.patch(t,u),e.applyData(t,u)}function H9(e,t){const n={src:hu(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 $9(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 F9(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return y5(e,t);const l={href:hu(a.url||"")};a.title!==null&&a.title!==void 0&&(l.title=a.title);const u={type:"element",tagName:"a",properties:l,children:e.all(t)};return e.patch(t,u),e.applyData(t,u)}function P9(e,t){const n={href:hu(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 G9(e,t,n){const a=e.all(t),l=n?V9(n):v5(t),u={},c=[];if(typeof t.checked=="boolean"){const g=a[0];let y;g&&g.type==="element"&&g.tagName==="p"?y=g:(y={type:"element",tagName:"p",properties:{},children:[]},a.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let f=-1;for(;++f<a.length;){const g=a[f];(l||f!==0||g.type!=="element"||g.tagName!=="p")&&c.push({type:"text",value:`
56
- `}),g.type==="element"&&g.tagName==="p"&&!l?c.push(...g.children):c.push(g)}const h=a[a.length-1];h&&(l||h.type!=="element"||h.tagName!=="p")&&c.push({type:"text",value:`
57
- `});const m={type:"element",tagName:"li",properties:u,children:c};return e.patch(t,m),e.applyData(t,m)}function V9(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=v5(n[a])}return t}function v5(e){const t=e.spread;return t??e.children.length>1}function Y9(e,t){const n={},a=e.all(t);let l=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++l<a.length;){const c=a[l];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 u={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(a,!0)};return e.patch(t,u),e.applyData(t,u)}function W9(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function K9(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function X9(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Z9(e,t){const n=e.all(t),a=n.shift(),l=[];if(a){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],c),l.push(c)}if(n.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},f=d1(t.children[1]),h=Zv(t.children[t.children.length-1]);f&&h&&(c.position={start:f,end:h}),l.push(c)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(t,u),e.applyData(t,u)}function Q9(e,t,n){const a=n?n.children:void 0,u=(a?a.indexOf(t):1)===0?"th":"td",c=n&&n.type==="table"?n.align:void 0,f=c?c.length:t.children.length;let h=-1;const m=[];for(;++h<f;){const y=t.children[h],k={},x=c?c[h]:void 0;x&&(k.align=x);let C={type:"element",tagName:u,properties:k,children:[]};y&&(C.children=e.all(y),e.patch(y,C),C=e.applyData(y,C)),m.push(C)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(m,!0)};return e.patch(t,g),e.applyData(t,g)}function J9(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const S2=9,j2=32;function ek(e){const t=String(e),n=/\r?\n|\r/g;let a=n.exec(t),l=0;const u=[];for(;a;)u.push(C2(t.slice(l,a.index),l>0,!0),a[0]),l=a.index+a[0].length,a=n.exec(t);return u.push(C2(t.slice(l),l>0,!1)),u.join("")}function C2(e,t,n){let a=0,l=e.length;if(t){let u=e.codePointAt(a);for(;u===S2||u===j2;)a++,u=e.codePointAt(a)}if(n){let u=e.codePointAt(l-1);for(;u===S2||u===j2;)l--,u=e.codePointAt(l-1)}return l>a?e.slice(a,l):""}function tk(e,t){const n={type:"text",value:ek(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function nk(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const rk={blockquote:z9,break:R9,code:O9,delete:I9,emphasis:_9,footnoteReference:L9,heading:B9,html:q9,imageReference:U9,image:H9,inlineCode:$9,linkReference:F9,link:P9,listItem:G9,list:Y9,paragraph:W9,root:K9,strong:X9,table:Z9,tableCell:J9,tableRow:Q9,text:tk,thematicBreak:nk,toml:Sd,yaml:Sd,definition:Sd,footnoteDefinition:Sd};function Sd(){}const x5=-1,wf=0,$c=1,af=2,v1=3,x1=4,b1=5,w1=6,b5=7,w5=8,ak=typeof self=="object"?self:globalThis,T2=(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 ak[e](t)},ik=(e,t)=>{const n=(l,u)=>(e.set(u,l),l),a=l=>{if(e.has(l))return e.get(l);const[u,c]=t[l];switch(u){case wf:case x5:return n(c,l);case $c:{const f=n([],l);for(const h of c)f.push(a(h));return f}case af:{const f=n({},l);for(const[h,m]of c)f[a(h)]=a(m);return f}case v1:return n(new Date(c),l);case x1:{const{source:f,flags:h}=c;return n(new RegExp(f,h),l)}case b1:{const f=n(new Map,l);for(const[h,m]of c)f.set(a(h),a(m));return f}case w1:{const f=n(new Set,l);for(const h of c)f.add(a(h));return f}case b5:{const{name:f,message:h}=c;return n(T2(f,h),l)}case w5:return n(BigInt(c),l);case"BigInt":return n(Object(BigInt(c)),l);case"ArrayBuffer":return n(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return n(new DataView(f),c)}}return n(T2(u,c),l)};return a},A2=e=>ik(new Map,e)(0),Us="",{toString:lk}={},{keys:sk}=Object,Mc=e=>{const t=typeof e;if(t!=="object"||!e)return[wf,t];const n=lk.call(e).slice(8,-1);switch(n){case"Array":return[$c,Us];case"Object":return[af,Us];case"Date":return[v1,Us];case"RegExp":return[x1,Us];case"Map":return[b1,Us];case"Set":return[w1,Us];case"DataView":return[$c,n]}return n.includes("Array")?[$c,n]:n.includes("Error")?[b5,n]:[af,n]},jd=([e,t])=>e===wf&&(t==="function"||t==="symbol"),ok=(e,t,n,a)=>{const l=(c,f)=>{const h=a.push(c)-1;return n.set(f,h),h},u=c=>{if(n.has(c))return n.get(c);let[f,h]=Mc(c);switch(f){case wf:{let g=c;switch(h){case"bigint":f=w5,g=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);g=null;break;case"undefined":return l([x5],c)}return l([f,g],c)}case $c:{if(h){let k=c;return h==="DataView"?k=new Uint8Array(c.buffer):h==="ArrayBuffer"&&(k=new Uint8Array(c)),l([h,[...k]],c)}const g=[],y=l([f,g],c);for(const k of c)g.push(u(k));return y}case af:{if(h)switch(h){case"BigInt":return l([h,c.toString()],c);case"Boolean":case"Number":case"String":return l([h,c.valueOf()],c)}if(t&&"toJSON"in c)return u(c.toJSON());const g=[],y=l([f,g],c);for(const k of sk(c))(e||!jd(Mc(c[k])))&&g.push([u(k),u(c[k])]);return y}case v1:return l([f,isNaN(c.getTime())?Us:c.toISOString()],c);case x1:{const{source:g,flags:y}=c;return l([f,{source:g,flags:y}],c)}case b1:{const g=[],y=l([f,g],c);for(const[k,x]of c)(e||!(jd(Mc(k))||jd(Mc(x))))&&g.push([u(k),u(x)]);return y}case w1:{const g=[],y=l([f,g],c);for(const k of c)(e||!jd(Mc(k)))&&g.push(u(k));return y}}const{message:m}=c;return l([f,{name:h,message:m}],c)};return u},E2=(e,{json:t,lossy:n}={})=>{const a=[];return ok(!(t||n),!!t,new Map,a)(e),a},lf=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?A2(E2(e,t)):structuredClone(e):(e,t)=>A2(E2(e,t));function uk(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 ck(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function dk(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||uk,a=e.options.footnoteBackLabel||ck,l=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let h=-1;for(;++h<e.footnoteOrder.length;){const m=e.footnoteById.get(e.footnoteOrder[h]);if(!m)continue;const g=e.all(m),y=String(m.identifier).toUpperCase(),k=hu(y.toLowerCase());let x=0;const C=[],D=e.footnoteCounts.get(y);for(;D!==void 0&&++x<=D;){C.length>0&&C.push({type:"text",value:" "});let M=typeof n=="string"?n:n(h,x);typeof M=="string"&&(M={type:"text",value:M}),C.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+k+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(h,x),className:["data-footnote-backref"]},children:Array.isArray(M)?M:[M]})}const R=g[g.length-1];if(R&&R.type==="element"&&R.tagName==="p"){const M=R.children[R.children.length-1];M&&M.type==="text"?M.value+=" ":R.children.push({type:"text",value:" "}),R.children.push(...C)}else g.push(...C);const O={type:"element",tagName:"li",properties:{id:t+"fn-"+k},children:e.wrap(g,!0)};e.patch(m,O),f.push(O)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...lf(c),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
58
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
59
- `}]}}const i0=(function(e){if(e==null)return pk;if(typeof e=="function")return kf(e);if(typeof e=="object")return Array.isArray(e)?fk(e):hk(e);if(typeof e=="string")return mk(e);throw new Error("Expected function, string, or object as test")});function fk(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=i0(e[n]);return kf(a);function a(...l){let u=-1;for(;++u<t.length;)if(t[u].apply(this,l))return!0;return!1}}function hk(e){const t=e;return kf(n);function n(a){const l=a;let u;for(u in e)if(l[u]!==t[u])return!1;return!0}}function mk(e){return kf(t);function t(n){return n&&n.type===e}}function kf(e){return t;function t(n,a,l){return!!(gk(n)&&e.call(this,n,typeof a=="number"?a:void 0,l||void 0))}}function pk(){return!0}function gk(e){return e!==null&&typeof e=="object"&&"type"in e}const k5=[],yk=!0,Sp=!1,S5="skip";function k1(e,t,n,a){let l;typeof t=="function"&&typeof n!="function"?(a=n,n=t):l=t;const u=i0(l),c=a?-1:1;f(e,void 0,[])();function f(h,m,g){const y=h&&typeof h=="object"?h:{};if(typeof y.type=="string"){const x=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(k,"name",{value:"node ("+(h.type+(x?"<"+x+">":""))+")"})}return k;function k(){let x=k5,C,D,R;if((!t||u(h,m,g[g.length-1]||void 0))&&(x=vk(n(h,g)),x[0]===Sp))return x;if("children"in h&&h.children){const O=h;if(O.children&&x[0]!==S5)for(D=(a?O.children.length:-1)+c,R=g.concat(O);D>-1&&D<O.children.length;){const M=O.children[D];if(C=f(M,D,R)(),C[0]===Sp)return C;D=typeof C[1]=="number"?C[1]:D+c}}return x}}}function vk(e){return Array.isArray(e)?e:typeof e=="number"?[yk,e]:e==null?k5:[e]}function S1(e,t,n,a){let l,u,c;typeof t=="function"&&typeof n!="function"?(u=void 0,c=t,l=n):(u=t,c=n,l=a),k1(e,u,f,l);function f(h,m){const g=m[m.length-1],y=g?g.children.indexOf(h):void 0;return c(h,y,g)}}const jp={}.hasOwnProperty,xk={};function bk(e,t){const n=t||xk,a=new Map,l=new Map,u=new Map,c={...rk,...n.handlers},f={all:m,applyData:kk,definitionById:a,footnoteById:l,footnoteCounts:u,footnoteOrder:[],handlers:c,one:h,options:n,patch:wk,wrap:jk};return S1(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const y=g.type==="definition"?a:l,k=String(g.identifier).toUpperCase();y.has(k)||y.set(k,g)}}),f;function h(g,y){const k=g.type,x=f.handlers[k];if(jp.call(f.handlers,k)&&x)return x(f,g,y);if(f.options.passThrough&&f.options.passThrough.includes(k)){if("children"in g){const{children:D,...R}=g,O=lf(R);return O.children=f.all(g),O}return lf(g)}return(f.options.unknownHandler||Sk)(f,g,y)}function m(g){const y=[];if("children"in g){const k=g.children;let x=-1;for(;++x<k.length;){const C=f.one(k[x],g);if(C){if(x&&k[x-1].type==="break"&&(!Array.isArray(C)&&C.type==="text"&&(C.value=N2(C.value)),!Array.isArray(C)&&C.type==="element")){const D=C.children[0];D&&D.type==="text"&&(D.value=N2(D.value))}Array.isArray(C)?y.push(...C):y.push(C)}}}return y}}function wk(e,t){e.position&&(t.position=u8(e))}function kk(e,t){let n=t;if(e&&e.data){const a=e.data.hName,l=e.data.hChildren,u=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"&&u&&Object.assign(n.properties,lf(u)),"children"in n&&n.children&&l!==null&&l!==void 0&&(n.children=l)}return n}function Sk(e,t){const n=t.data||{},a="value"in t&&!(jp.call(n,"hProperties")||jp.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 jk(e,t){const n=[];let a=-1;for(t&&n.push({type:"text",value:`
60
- `});++a<e.length;)a&&n.push({type:"text",value:`
61
- `}),n.push(e[a]);return t&&e.length>0&&n.push({type:"text",value:`
62
- `}),n}function N2(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function M2(e,t){const n=bk(e,t),a=n.one(e,void 0),l=dk(n),u=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return l&&u.children.push({type:"text",value:`
63
- `},l),u}function Ck(e,t){return e&&"run"in e?async function(n,a){const l=M2(n,{file:a,...t});await e.run(l,a)}:function(n,a){return M2(n,{file:a,...e||t})}}function D2(e){if(e)throw e}var Am,z2;function Tk(){if(z2)return Am;z2=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,l=function(m){return typeof Array.isArray=="function"?Array.isArray(m):t.call(m)==="[object Array]"},u=function(m){if(!m||t.call(m)!=="[object Object]")return!1;var g=e.call(m,"constructor"),y=m.constructor&&m.constructor.prototype&&e.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!g&&!y)return!1;var k;for(k in m);return typeof k>"u"||e.call(m,k)},c=function(m,g){n&&g.name==="__proto__"?n(m,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):m[g.name]=g.newValue},f=function(m,g){if(g==="__proto__")if(e.call(m,g)){if(a)return a(m,g).value}else return;return m[g]};return Am=function h(){var m,g,y,k,x,C,D=arguments[0],R=1,O=arguments.length,M=!1;for(typeof D=="boolean"&&(M=D,D=arguments[1]||{},R=2),(D==null||typeof D!="object"&&typeof D!="function")&&(D={});R<O;++R)if(m=arguments[R],m!=null)for(g in m)y=f(D,g),k=f(m,g),D!==k&&(M&&k&&(u(k)||(x=l(k)))?(x?(x=!1,C=y&&l(y)?y:[]):C=y&&u(y)?y:{},c(D,{name:g,newValue:h(M,C,k)})):typeof k<"u"&&c(D,{name:g,newValue:k}));return D},Am}var Ak=Tk();const Em=qv(Ak);function Cp(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 Ek(){const e=[],t={run:n,use:a};return t;function n(...l){let u=-1;const c=l.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...l);function f(h,...m){const g=e[++u];let y=-1;if(h){c(h);return}for(;++y<l.length;)(m[y]===null||m[y]===void 0)&&(m[y]=l[y]);l=m,g?Nk(g,f)(...m):c(null,...m)}}function a(l){if(typeof l!="function")throw new TypeError("Expected `middelware` to be a function, not "+l);return e.push(l),t}}function Nk(e,t){let n;return a;function a(...c){const f=e.length>c.length;let h;f&&c.push(l);try{h=e.apply(this,c)}catch(m){const g=m;if(f&&n)throw g;return l(g)}f||(h&&h.then&&typeof h.then=="function"?h.then(u,l):h instanceof Error?l(h):u(h))}function l(c,...f){n||(n=!0,t(c,...f))}function u(c){l(null,c)}}const ri={basename:Mk,dirname:Dk,extname:zk,join:Rk,sep:"/"};function Mk(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');l0(e);let n=0,a=-1,l=e.length,u;if(t===void 0||t.length===0||t.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(u){n=l+1;break}}else a<0&&(u=!0,a=l+1);return a<0?"":e.slice(n,a)}if(t===e)return"";let c=-1,f=t.length-1;for(;l--;)if(e.codePointAt(l)===47){if(u){n=l+1;break}}else c<0&&(u=!0,c=l+1),f>-1&&(e.codePointAt(l)===t.codePointAt(f--)?f<0&&(a=l):(f=-1,a=c));return n===a?a=c:a<0&&(a=e.length),e.slice(n,a)}function Dk(e){if(l0(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 zk(e){l0(e);let t=e.length,n=-1,a=0,l=-1,u=0,c;for(;t--;){const f=e.codePointAt(t);if(f===47){if(c){a=t+1;break}continue}n<0&&(c=!0,n=t+1),f===46?l<0?l=t:u!==1&&(u=1):l>-1&&(u=-1)}return l<0||n<0||u===0||u===1&&l===n-1&&l===a+1?"":e.slice(l,n)}function Rk(...e){let t=-1,n;for(;++t<e.length;)l0(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Ok(n)}function Ok(e){l0(e);const t=e.codePointAt(0)===47;let n=Ik(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Ik(e,t){let n="",a=0,l=-1,u=0,c=-1,f,h;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(l===c-1||u===1))if(l!==c-1&&u===2){if(n.length<2||a!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(h=n.lastIndexOf("/"),h!==n.length-1){h<0?(n="",a=0):(n=n.slice(0,h),a=n.length-1-n.lastIndexOf("/")),l=c,u=0;continue}}else if(n.length>0){n="",a=0,l=c,u=0;continue}}t&&(n=n.length>0?n+"/..":"..",a=2)}else n.length>0?n+="/"+e.slice(l+1,c):n=e.slice(l+1,c),a=c-l-1;l=c,u=0}else f===46&&u>-1?u++:u=-1}return n}function l0(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const _k={cwd:Lk};function Lk(){return"/"}function Tp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Bk(e){if(typeof e=="string")e=new URL(e);else if(!Tp(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 qk(e)}function qk(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 l=new TypeError("File URL path must not include encoded / characters");throw l.code="ERR_INVALID_FILE_URL_PATH",l}}return decodeURIComponent(t)}const Nm=["history","path","basename","stem","extname","dirname"];class j5{constructor(t){let n;t?Tp(t)?n={path:t}:typeof t=="string"||Uk(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":_k.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Nm.length;){const u=Nm[a];u in n&&n[u]!==void 0&&n[u]!==null&&(this[u]=u==="history"?[...n[u]]:n[u])}let l;for(l in n)Nm.includes(l)||(this[l]=n[l])}get basename(){return typeof this.path=="string"?ri.basename(this.path):void 0}set basename(t){Dm(t,"basename"),Mm(t,"basename"),this.path=ri.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ri.dirname(this.path):void 0}set dirname(t){R2(this.basename,"dirname"),this.path=ri.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ri.extname(this.path):void 0}set extname(t){if(Mm(t,"extname"),R2(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=ri.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Tp(t)&&(t=Bk(t)),Dm(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ri.basename(this.path,this.extname):void 0}set stem(t){Dm(t,"stem"),Mm(t,"stem"),this.path=ri.join(this.dirname||"",t+(this.extname||""))}fail(t,n,a){const l=this.message(t,n,a);throw l.fatal=!0,l}info(t,n,a){const l=this.message(t,n,a);return l.fatal=void 0,l}message(t,n,a){const l=new Qn(t,n,a);return this.path&&(l.name=this.path+":"+l.name,l.file=this.path),l.fatal=!1,this.messages.push(l),l}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Mm(e,t){if(e&&e.includes(ri.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ri.sep+"`")}function Dm(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function R2(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Uk(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Hk=(function(e){const a=this.constructor.prototype,l=a[e],u=function(){return l.apply(u,arguments)};return Object.setPrototypeOf(u,a),u}),$k={}.hasOwnProperty;class j1 extends Hk{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=Ek()}copy(){const t=new j1;let n=-1;for(;++n<this.attachers.length;){const a=this.attachers[n];t.use(...a)}return t.data(Em(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Om("data",this.frozen),this.namespace[t]=n,this):$k.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Om("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 l=n.call(t,...a);typeof l=="function"&&this.transformers.use(l)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Cd(t),a=this.parser||this.Parser;return zm("parse",a),a(String(n),n)}process(t,n){const a=this;return this.freeze(),zm("process",this.parser||this.Parser),Rm("process",this.compiler||this.Compiler),n?l(void 0,n):new Promise(l);function l(u,c){const f=Cd(t),h=a.parse(f);a.run(h,f,function(g,y,k){if(g||!y||!k)return m(g);const x=y,C=a.stringify(x,k);Gk(C)?k.value=C:k.result=C,m(g,k)});function m(g,y){g||!y?c(g):u?u(y):n(void 0,y)}}}processSync(t){let n=!1,a;return this.freeze(),zm("processSync",this.parser||this.Parser),Rm("processSync",this.compiler||this.Compiler),this.process(t,l),I2("processSync","process",n),a;function l(u,c){n=!0,D2(u),a=c}}run(t,n,a){O2(t),this.freeze();const l=this.transformers;return!a&&typeof n=="function"&&(a=n,n=void 0),a?u(void 0,a):new Promise(u);function u(c,f){const h=Cd(n);l.run(t,h,m);function m(g,y,k){const x=y||t;g?f(g):c?c(x):a(void 0,x,k)}}}runSync(t,n){let a=!1,l;return this.run(t,n,u),I2("runSync","run",a),l;function u(c,f){D2(c),l=f,a=!0}}stringify(t,n){this.freeze();const a=Cd(n),l=this.compiler||this.Compiler;return Rm("stringify",l),O2(t),l(t,a)}use(t,...n){const a=this.attachers,l=this.namespace;if(Om("use",this.frozen),t!=null)if(typeof t=="function")h(t,n);else if(typeof t=="object")Array.isArray(t)?f(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function u(m){if(typeof m=="function")h(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[g,...y]=m;h(g,y)}else c(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function c(m){if(!("plugins"in m)&&!("settings"in m))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(m.plugins),m.settings&&(l.settings=Em(!0,l.settings,m.settings))}function f(m){let g=-1;if(m!=null)if(Array.isArray(m))for(;++g<m.length;){const y=m[g];u(y)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function h(m,g){let y=-1,k=-1;for(;++y<a.length;)if(a[y][0]===m){k=y;break}if(k===-1)a.push([m,...g]);else if(g.length>0){let[x,...C]=g;const D=a[k][1];Cp(D)&&Cp(x)&&(x=Em(!0,D,x)),a[k]=[m,x,...C]}}}}const Fk=new j1().freeze();function zm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Rm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Om(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 O2(e){if(!Cp(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function I2(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Cd(e){return Pk(e)?e:new j5(e)}function Pk(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Gk(e){return typeof e=="string"||Vk(e)}function Vk(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Yk="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",_2=[],L2={allowDangerousHtml:!0},Wk=/^(https?|ircs?|mailto|xmpp)$/i,Kk=[{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 Xk(e){const t=Zk(e),n=Qk(e);return Jk(t.runSync(t.parse(n),n),e)}function Zk(e){const t=e.rehypePlugins||_2,n=e.remarkPlugins||_2,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...L2}:L2;return Fk().use(D9).use(n).use(Ck,a).use(t)}function Qk(e){const t=e.children||"",n=new j5;return typeof t=="string"&&(n.value=t),n}function Jk(e,t){const n=t.allowedElements,a=t.allowElement,l=t.components,u=t.disallowedElements,c=t.skipHtml,f=t.unwrapDisallowed,h=t.urlTransform||C5;for(const g of Kk)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+Yk+g.id,void 0);return S1(e,m),m8(e,{Fragment:o.Fragment,components:l,ignoreInvalidStyle:!0,jsx:o.jsx,jsxs:o.jsxs,passKeys:!0,passNode:!0});function m(g,y,k){if(g.type==="raw"&&k&&typeof y=="number")return c?k.children.splice(y,1):k.children[y]={type:"text",value:g.value},y;if(g.type==="element"){let x;for(x in jm)if(Object.hasOwn(jm,x)&&Object.hasOwn(g.properties,x)){const C=g.properties[x],D=jm[x];(D===null||D.includes(g.tagName))&&(g.properties[x]=h(String(C||""),x,g))}}if(g.type==="element"){let x=n?!n.includes(g.tagName):u?u.includes(g.tagName):!1;if(!x&&a&&typeof y=="number"&&(x=!a(g,y,k)),x&&k&&typeof y=="number")return f&&g.children?k.children.splice(y,1,...g.children):k.children.splice(y,1),y}}}function C5(e){const t=e.indexOf(":"),n=e.indexOf("?"),a=e.indexOf("#"),l=e.indexOf("/");return t===-1||l!==-1&&t>l||n!==-1&&t>n||a!==-1&&t>a||Wk.test(e.slice(0,t))?e:""}function B2(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let a=0,l=n.indexOf(t);for(;l!==-1;)a++,l=n.indexOf(t,l+t.length);return a}function eS(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function tS(e,t,n){const l=i0((n||{}).ignore||[]),u=nS(t);let c=-1;for(;++c<u.length;)k1(e,"text",f);function f(m,g){let y=-1,k;for(;++y<g.length;){const x=g[y],C=k?k.children:void 0;if(l(x,C?C.indexOf(x):void 0,k))return;k=x}if(k)return h(m,g)}function h(m,g){const y=g[g.length-1],k=u[c][0],x=u[c][1];let C=0;const R=y.children.indexOf(m);let O=!1,M=[];k.lastIndex=0;let q=k.exec(m.value);for(;q;){const L=q.index,K={index:q.index,input:q.input,stack:[...g,m]};let P=x(...q,K);if(typeof P=="string"&&(P=P.length>0?{type:"text",value:P}:void 0),P===!1?k.lastIndex=L+1:(C!==L&&M.push({type:"text",value:m.value.slice(C,L)}),Array.isArray(P)?M.push(...P):P&&M.push(P),C=L+q[0].length,O=!0),!k.global)break;q=k.exec(m.value)}return O?(C<m.value.length&&M.push({type:"text",value:m.value.slice(C)}),y.children.splice(R,1,...M)):M=[m],R+M.length}}function nS(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 l=n[a];t.push([rS(l[0]),aS(l[1])])}return t}function rS(e){return typeof e=="string"?new RegExp(eS(e),"g"):e}function aS(e){return typeof e=="function"?e:function(){return e}}const Im="phrasing",_m=["autolink","link","image","label"];function iS(){return{transforms:[fS],enter:{literalAutolink:sS,literalAutolinkEmail:Lm,literalAutolinkHttp:Lm,literalAutolinkWww:Lm},exit:{literalAutolink:dS,literalAutolinkEmail:cS,literalAutolinkHttp:oS,literalAutolinkWww:uS}}}function lS(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Im,notInConstruct:_m},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Im,notInConstruct:_m},{character:":",before:"[ps]",after:"\\/",inConstruct:Im,notInConstruct:_m}]}}function sS(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Lm(e){this.config.enter.autolinkProtocol.call(this,e)}function oS(e){this.config.exit.autolinkProtocol.call(this,e)}function uS(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 cS(e){this.config.exit.autolinkEmail.call(this,e)}function dS(e){this.exit(e)}function fS(e){tS(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,hS],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),mS]],{ignore:["link","linkReference"]})}function hS(e,t,n,a,l){let u="";if(!T5(l)||(/^w/i.test(t)&&(n=t+n,t="",u="http://"),!pS(n)))return!1;const c=gS(n+a);if(!c[0])return!1;const f={type:"link",title:null,url:u+t+c[0],children:[{type:"text",value:t+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function mS(e,t,n,a){return!T5(a,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function pS(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 gS(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 l=B2(e,"(");let u=B2(e,")");for(;a!==-1&&l>u;)e+=n.slice(0,a+1),n=n.slice(a+1),a=n.indexOf(")"),u++;return[e,n]}function T5(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ws(n)||xf(n))&&(!t||n!==47)}A5.peek=CS;function yS(){this.buffer()}function vS(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function xS(){this.buffer()}function bS(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function wS(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Oa(this.sliceSerialize(e)).toLowerCase(),n.label=t}function kS(e){this.exit(e)}function SS(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Oa(this.sliceSerialize(e)).toLowerCase(),n.label=t}function jS(e){this.exit(e)}function CS(){return"["}function A5(e,t,n,a){const l=n.createTracker(a);let u=l.move("[^");const c=n.enter("footnoteReference"),f=n.enter("reference");return u+=l.move(n.safe(n.associationId(e),{after:"]",before:u})),f(),c(),u+=l.move("]"),u}function TS(){return{enter:{gfmFootnoteCallString:yS,gfmFootnoteCall:vS,gfmFootnoteDefinitionLabelString:xS,gfmFootnoteDefinition:bS},exit:{gfmFootnoteCallString:wS,gfmFootnoteCall:kS,gfmFootnoteDefinitionLabelString:SS,gfmFootnoteDefinition:jS}}}function AS(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:A5},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(a,l,u,c){const f=u.createTracker(c);let h=f.move("[^");const m=u.enter("footnoteDefinition"),g=u.enter("label");return h+=f.move(u.safe(u.associationId(a),{before:h,after:"]"})),g(),h+=f.move("]:"),a.children&&a.children.length>0&&(f.shift(4),h+=f.move((t?`
64
- `:" ")+u.indentLines(u.containerFlow(a,f.current()),t?E5:ES))),m(),h}}function ES(e,t,n){return t===0?e:E5(e,t,n)}function E5(e,t,n){return(n?"":" ")+e}const NS=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];N5.peek=OS;function MS(){return{canContainEols:["delete"],enter:{strikethrough:zS},exit:{strikethrough:RS}}}function DS(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:NS}],handlers:{delete:N5}}}function zS(e){this.enter({type:"delete",children:[]},e)}function RS(e){this.exit(e)}function N5(e,t,n,a){const l=n.createTracker(a),u=n.enter("strikethrough");let c=l.move("~~");return c+=n.containerPhrasing(e,{...l.current(),before:c,after:"~"}),c+=l.move("~~"),u(),c}function OS(){return"~"}function IS(e){return e.length}function _S(e,t){const n=t||{},a=(n.align||[]).concat(),l=n.stringLength||IS,u=[],c=[],f=[],h=[];let m=0,g=-1;for(;++g<e.length;){const D=[],R=[];let O=-1;for(e[g].length>m&&(m=e[g].length);++O<e[g].length;){const M=LS(e[g][O]);if(n.alignDelimiters!==!1){const q=l(M);R[O]=q,(h[O]===void 0||q>h[O])&&(h[O]=q)}D.push(M)}c[g]=D,f[g]=R}let y=-1;if(typeof a=="object"&&"length"in a)for(;++y<m;)u[y]=q2(a[y]);else{const D=q2(a);for(;++y<m;)u[y]=D}y=-1;const k=[],x=[];for(;++y<m;){const D=u[y];let R="",O="";D===99?(R=":",O=":"):D===108?R=":":D===114&&(O=":");let M=n.alignDelimiters===!1?1:Math.max(1,h[y]-R.length-O.length);const q=R+"-".repeat(M)+O;n.alignDelimiters!==!1&&(M=R.length+M+O.length,M>h[y]&&(h[y]=M),x[y]=M),k[y]=q}c.splice(1,0,k),f.splice(1,0,x),g=-1;const C=[];for(;++g<c.length;){const D=c[g],R=f[g];y=-1;const O=[];for(;++y<m;){const M=D[y]||"";let q="",L="";if(n.alignDelimiters!==!1){const K=h[y]-(R[y]||0),P=u[y];P===114?q=" ".repeat(K):P===99?K%2?(q=" ".repeat(K/2+.5),L=" ".repeat(K/2-.5)):(q=" ".repeat(K/2),L=q):L=" ".repeat(K)}n.delimiterStart!==!1&&!y&&O.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&M==="")&&(n.delimiterStart!==!1||y)&&O.push(" "),n.alignDelimiters!==!1&&O.push(q),O.push(M),n.alignDelimiters!==!1&&O.push(L),n.padding!==!1&&O.push(" "),(n.delimiterEnd!==!1||y!==m-1)&&O.push("|")}C.push(n.delimiterEnd===!1?O.join("").replace(/ +$/,""):O.join(""))}return C.join(`
65
- `)}function LS(e){return e==null?"":String(e)}function q2(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 BS(e,t,n,a){const l=n.enter("blockquote"),u=n.createTracker(a);u.move("> "),u.shift(2);const c=n.indentLines(n.containerFlow(e,u.current()),qS);return l(),c}function qS(e,t,n){return">"+(n?"":" ")+e}function US(e,t){return U2(e,t.inConstruct,!0)&&!U2(e,t.notInConstruct,!1)}function U2(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 H2(e,t,n,a){let l=-1;for(;++l<n.unsafe.length;)if(n.unsafe[l].character===`
66
- `&&US(n.stack,n.unsafe[l]))return/[ \t]/.test(a.before)?"":" ";return`\\
67
- `}function M5(e,t){const n=String(e);let a=n.indexOf(t),l=a,u=0,c=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;a!==-1;)a===l?++u>c&&(c=u):u=1,l=a+t.length,a=n.indexOf(t,l);return c}function HS(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 $S(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 FS(e,t,n,a){const l=$S(n),u=e.value||"",c=l==="`"?"GraveAccent":"Tilde";if(HS(e,n)){const y=n.enter("codeIndented"),k=n.indentLines(u,PS);return y(),k}const f=n.createTracker(a),h=l.repeat(Math.max(M5(u,l)+1,3)),m=n.enter("codeFenced");let g=f.move(h);if(e.lang){const y=n.enter(`codeFencedLang${c}`);g+=f.move(n.safe(e.lang,{before:g,after:" ",encode:["`"],...f.current()})),y()}if(e.lang&&e.meta){const y=n.enter(`codeFencedMeta${c}`);g+=f.move(" "),g+=f.move(n.safe(e.meta,{before:g,after:`
68
- `,encode:["`"],...f.current()})),y()}return g+=f.move(`
69
- `),u&&(g+=f.move(u+`
70
- `)),g+=f.move(h),m(),g}function PS(e,t,n){return(n?"":" ")+e}function C1(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 GS(e,t,n,a){const l=C1(n),u=l==='"'?"Quote":"Apostrophe",c=n.enter("definition");let f=n.enter("label");const h=n.createTracker(a);let m=h.move("[");return m+=h.move(n.safe(n.associationId(e),{before:m,after:"]",...h.current()})),m+=h.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),m+=h.move("<"),m+=h.move(n.safe(e.url,{before:m,after:">",...h.current()})),m+=h.move(">")):(f=n.enter("destinationRaw"),m+=h.move(n.safe(e.url,{before:m,after:e.title?" ":`
71
- `,...h.current()}))),f(),e.title&&(f=n.enter(`title${u}`),m+=h.move(" "+l),m+=h.move(n.safe(e.title,{before:m,after:l,...h.current()})),m+=h.move(l),f()),c(),m}function VS(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 Zc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function sf(e,t,n){const a=su(e),l=su(t);return a===void 0?l===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:a===1?l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}D5.peek=YS;function D5(e,t,n,a){const l=VS(n),u=n.enter("emphasis"),c=n.createTracker(a),f=c.move(l);let h=c.move(n.containerPhrasing(e,{after:l,before:f,...c.current()}));const m=h.charCodeAt(0),g=sf(a.before.charCodeAt(a.before.length-1),m,l);g.inside&&(h=Zc(m)+h.slice(1));const y=h.charCodeAt(h.length-1),k=sf(a.after.charCodeAt(0),y,l);k.inside&&(h=h.slice(0,-1)+Zc(y));const x=c.move(l);return u(),n.attentionEncodeSurroundingInfo={after:k.outside,before:g.outside},f+h+x}function YS(e,t,n){return n.options.emphasis||"*"}function WS(e,t){let n=!1;return S1(e,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return n=!0,Sp}),!!((!e.depth||e.depth<3)&&p1(e)&&(t.options.setext||n))}function KS(e,t,n,a){const l=Math.max(Math.min(6,e.depth||1),1),u=n.createTracker(a);if(WS(e,n)){const g=n.enter("headingSetext"),y=n.enter("phrasing"),k=n.containerPhrasing(e,{...u.current(),before:`
72
- `,after:`
73
- `});return y(),g(),k+`
74
- `+(l===1?"=":"-").repeat(k.length-(Math.max(k.lastIndexOf("\r"),k.lastIndexOf(`
75
- `))+1))}const c="#".repeat(l),f=n.enter("headingAtx"),h=n.enter("phrasing");u.move(c+" ");let m=n.containerPhrasing(e,{before:"# ",after:`
76
- `,...u.current()});return/^[\t ]/.test(m)&&(m=Zc(m.charCodeAt(0))+m.slice(1)),m=m?c+" "+m:c,n.options.closeAtx&&(m+=" "+c),h(),f(),m}z5.peek=XS;function z5(e){return e.value||""}function XS(){return"<"}R5.peek=ZS;function R5(e,t,n,a){const l=C1(n),u=l==='"'?"Quote":"Apostrophe",c=n.enter("image");let f=n.enter("label");const h=n.createTracker(a);let m=h.move("![");return m+=h.move(n.safe(e.alt,{before:m,after:"]",...h.current()})),m+=h.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),m+=h.move("<"),m+=h.move(n.safe(e.url,{before:m,after:">",...h.current()})),m+=h.move(">")):(f=n.enter("destinationRaw"),m+=h.move(n.safe(e.url,{before:m,after:e.title?" ":")",...h.current()}))),f(),e.title&&(f=n.enter(`title${u}`),m+=h.move(" "+l),m+=h.move(n.safe(e.title,{before:m,after:l,...h.current()})),m+=h.move(l),f()),m+=h.move(")"),c(),m}function ZS(){return"!"}O5.peek=QS;function O5(e,t,n,a){const l=e.referenceType,u=n.enter("imageReference");let c=n.enter("label");const f=n.createTracker(a);let h=f.move("![");const m=n.safe(e.alt,{before:h,after:"]",...f.current()});h+=f.move(m+"]["),c();const g=n.stack;n.stack=[],c=n.enter("reference");const y=n.safe(n.associationId(e),{before:h,after:"]",...f.current()});return c(),n.stack=g,u(),l==="full"||!m||m!==y?h+=f.move(y+"]"):l==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function QS(){return"!"}I5.peek=JS;function I5(e,t,n){let a=e.value||"",l="`",u=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(a);)l+="`";for(/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^`|`$/.test(a))&&(a=" "+a+" ");++u<n.unsafe.length;){const c=n.unsafe[u],f=n.compilePattern(c);let h;if(c.atBreak)for(;h=f.exec(a);){let m=h.index;a.charCodeAt(m)===10&&a.charCodeAt(m-1)===13&&m--,a=a.slice(0,m)+" "+a.slice(h.index+1)}}return l+a+l}function JS(){return"`"}function _5(e,t){const n=p1(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))}L5.peek=ej;function L5(e,t,n,a){const l=C1(n),u=l==='"'?"Quote":"Apostrophe",c=n.createTracker(a);let f,h;if(_5(e,n)){const g=n.stack;n.stack=[],f=n.enter("autolink");let y=c.move("<");return y+=c.move(n.containerPhrasing(e,{before:y,after:">",...c.current()})),y+=c.move(">"),f(),n.stack=g,y}f=n.enter("link"),h=n.enter("label");let m=c.move("[");return m+=c.move(n.containerPhrasing(e,{before:m,after:"](",...c.current()})),m+=c.move("]("),h(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(h=n.enter("destinationLiteral"),m+=c.move("<"),m+=c.move(n.safe(e.url,{before:m,after:">",...c.current()})),m+=c.move(">")):(h=n.enter("destinationRaw"),m+=c.move(n.safe(e.url,{before:m,after:e.title?" ":")",...c.current()}))),h(),e.title&&(h=n.enter(`title${u}`),m+=c.move(" "+l),m+=c.move(n.safe(e.title,{before:m,after:l,...c.current()})),m+=c.move(l),h()),m+=c.move(")"),f(),m}function ej(e,t,n){return _5(e,n)?"<":"["}B5.peek=tj;function B5(e,t,n,a){const l=e.referenceType,u=n.enter("linkReference");let c=n.enter("label");const f=n.createTracker(a);let h=f.move("[");const m=n.containerPhrasing(e,{before:h,after:"]",...f.current()});h+=f.move(m+"]["),c();const g=n.stack;n.stack=[],c=n.enter("reference");const y=n.safe(n.associationId(e),{before:h,after:"]",...f.current()});return c(),n.stack=g,u(),l==="full"||!m||m!==y?h+=f.move(y+"]"):l==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function tj(){return"["}function T1(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 nj(e){const t=T1(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 rj(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 q5(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 aj(e,t,n,a){const l=n.enter("list"),u=n.bulletCurrent;let c=e.ordered?rj(n):T1(n);const f=e.ordered?c==="."?")":".":nj(n);let h=t&&n.bulletLastUsed?c===n.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&g&&(!g.children||!g.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&&(h=!0),q5(n)===c&&g){let y=-1;for(;++y<e.children.length;){const k=e.children[y];if(k&&k.type==="listItem"&&k.children&&k.children[0]&&k.children[0].type==="thematicBreak"){h=!0;break}}}}h&&(c=f),n.bulletCurrent=c;const m=n.containerFlow(e,a);return n.bulletLastUsed=c,n.bulletCurrent=u,l(),m}function ij(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 lj(e,t,n,a){const l=ij(n);let u=n.bulletCurrent||T1(n);t&&t.type==="list"&&t.ordered&&(u=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+u);let c=u.length+1;(l==="tab"||l==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=n.createTracker(a);f.move(u+" ".repeat(c-u.length)),f.shift(c);const h=n.enter("listItem"),m=n.indentLines(n.containerFlow(e,f.current()),g);return h(),m;function g(y,k,x){return k?(x?"":" ".repeat(c))+y:(x?u:u+" ".repeat(c-u.length))+y}}function sj(e,t,n,a){const l=n.enter("paragraph"),u=n.enter("phrasing"),c=n.containerPhrasing(e,a);return u(),l(),c}const oj=i0(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function uj(e,t,n,a){return(e.children.some(function(c){return oj(c)})?n.containerPhrasing:n.containerFlow).call(n,e,a)}function cj(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}U5.peek=dj;function U5(e,t,n,a){const l=cj(n),u=n.enter("strong"),c=n.createTracker(a),f=c.move(l+l);let h=c.move(n.containerPhrasing(e,{after:l,before:f,...c.current()}));const m=h.charCodeAt(0),g=sf(a.before.charCodeAt(a.before.length-1),m,l);g.inside&&(h=Zc(m)+h.slice(1));const y=h.charCodeAt(h.length-1),k=sf(a.after.charCodeAt(0),y,l);k.inside&&(h=h.slice(0,-1)+Zc(y));const x=c.move(l+l);return u(),n.attentionEncodeSurroundingInfo={after:k.outside,before:g.outside},f+h+x}function dj(e,t,n){return n.options.strong||"*"}function fj(e,t,n,a){return n.safe(e.value,a)}function hj(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 mj(e,t,n){const a=(q5(n)+(n.options.ruleSpaces?" ":"")).repeat(hj(n));return n.options.ruleSpaces?a.slice(0,-1):a}const H5={blockquote:BS,break:H2,code:FS,definition:GS,emphasis:D5,hardBreak:H2,heading:KS,html:z5,image:R5,imageReference:O5,inlineCode:I5,link:L5,linkReference:B5,list:aj,listItem:lj,paragraph:sj,root:uj,strong:U5,text:fj,thematicBreak:mj};function pj(){return{enter:{table:gj,tableData:$2,tableHeader:$2,tableRow:vj},exit:{codeText:xj,table:yj,tableData:Bm,tableHeader:Bm,tableRow:Bm}}}function gj(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 yj(e){this.exit(e),this.data.inTable=void 0}function vj(e){this.enter({type:"tableRow",children:[]},e)}function Bm(e){this.exit(e)}function $2(e){this.enter({type:"tableCell",children:[]},e)}function xj(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,bj));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function bj(e,t){return t==="|"?t:e}function wj(e){const t=e||{},n=t.tableCellPadding,a=t.tablePipeAlign,l=t.stringLength,u=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
77
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:k,table:c,tableCell:h,tableRow:f}};function c(x,C,D,R){return m(g(x,D,R),x.align)}function f(x,C,D,R){const O=y(x,D,R),M=m([O]);return M.slice(0,M.indexOf(`
78
- `))}function h(x,C,D,R){const O=D.enter("tableCell"),M=D.enter("phrasing"),q=D.containerPhrasing(x,{...R,before:u,after:u});return M(),O(),q}function m(x,C){return _S(x,{align:C,alignDelimiters:a,padding:n,stringLength:l})}function g(x,C,D){const R=x.children;let O=-1;const M=[],q=C.enter("table");for(;++O<R.length;)M[O]=y(R[O],C,D);return q(),M}function y(x,C,D){const R=x.children;let O=-1;const M=[],q=C.enter("tableRow");for(;++O<R.length;)M[O]=h(R[O],x,C,D);return q(),M}function k(x,C,D){let R=H5.inlineCode(x,C,D);return D.stack.includes("tableCell")&&(R=R.replace(/\|/g,"\\$&")),R}}function kj(){return{exit:{taskListCheckValueChecked:F2,taskListCheckValueUnchecked:F2,paragraph:jj}}}function Sj(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Cj}}}function F2(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function jj(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 l=t.children;let u=-1,c;for(;++u<l.length;){const f=l[u];if(f.type==="paragraph"){c=f;break}}c===n&&(a.value=a.value.slice(1),a.value.length===0?n.children.shift():n.position&&a.position&&typeof a.position.start.offset=="number"&&(a.position.start.column++,a.position.start.offset++,n.position.start=Object.assign({},a.position.start)))}}this.exit(e)}function Cj(e,t,n,a){const l=e.children[0],u=typeof e.checked=="boolean"&&l&&l.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=n.createTracker(a);u&&f.move(c);let h=H5.listItem(e,t,n,{...a,...f.current()});return u&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),h;function m(g){return g+c}}function Tj(){return[iS(),TS(),MS(),pj(),kj()]}function Aj(e){return{extensions:[lS(),AS(e),DS(),wj(e),Sj()]}}const Ej={tokenize:Oj,partial:!0},$5={tokenize:Ij,partial:!0},F5={tokenize:_j,partial:!0},P5={tokenize:Lj,partial:!0},Nj={tokenize:Bj,partial:!0},G5={name:"wwwAutolink",tokenize:zj,previous:Y5},V5={name:"protocolAutolink",tokenize:Rj,previous:W5},Zi={name:"emailAutolink",tokenize:Dj,previous:K5},oi={};function Mj(){return{text:oi}}let _s=48;for(;_s<123;)oi[_s]=Zi,_s++,_s===58?_s=65:_s===91&&(_s=97);oi[43]=Zi;oi[45]=Zi;oi[46]=Zi;oi[95]=Zi;oi[72]=[Zi,V5];oi[104]=[Zi,V5];oi[87]=[Zi,G5];oi[119]=[Zi,G5];function Dj(e,t,n){const a=this;let l,u;return c;function c(y){return!Ap(y)||!K5.call(a,a.previous)||A1(a.events)?n(y):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(y))}function f(y){return Ap(y)?(e.consume(y),f):y===64?(e.consume(y),h):n(y)}function h(y){return y===46?e.check(Nj,g,m)(y):y===45||y===95||Xn(y)?(u=!0,e.consume(y),h):g(y)}function m(y){return e.consume(y),l=!0,h}function g(y){return u&&l&&fr(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(y)):n(y)}}function zj(e,t,n){const a=this;return l;function l(c){return c!==87&&c!==119||!Y5.call(a,a.previous)||A1(a.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Ej,e.attempt($5,e.attempt(F5,u),n),n)(c))}function u(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function Rj(e,t,n){const a=this;let l="",u=!1;return c;function c(y){return(y===72||y===104)&&W5.call(a,a.previous)&&!A1(a.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(y),e.consume(y),f):n(y)}function f(y){if(fr(y)&&l.length<5)return l+=String.fromCodePoint(y),e.consume(y),f;if(y===58){const k=l.toLowerCase();if(k==="http"||k==="https")return e.consume(y),h}return n(y)}function h(y){return y===47?(e.consume(y),u?m:(u=!0,h)):n(y)}function m(y){return y===null||rf(y)||Yt(y)||Ws(y)||xf(y)?n(y):e.attempt($5,e.attempt(F5,g),n)(y)}function g(y){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(y)}}function Oj(e,t,n){let a=0;return l;function l(c){return(c===87||c===119)&&a<3?(a++,e.consume(c),l):c===46&&a===3?(e.consume(c),u):n(c)}function u(c){return c===null?n(c):t(c)}}function Ij(e,t,n){let a,l,u;return c;function c(m){return m===46||m===95?e.check(P5,h,f)(m):m===null||Yt(m)||Ws(m)||m!==45&&xf(m)?h(m):(u=!0,e.consume(m),c)}function f(m){return m===95?a=!0:(l=a,a=void 0),e.consume(m),c}function h(m){return l||a||!u?n(m):t(m)}}function _j(e,t){let n=0,a=0;return l;function l(c){return c===40?(n++,e.consume(c),l):c===41&&a<n?u(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(P5,t,u)(c):c===null||Yt(c)||Ws(c)?t(c):(e.consume(c),l)}function u(c){return c===41&&a++,e.consume(c),l}}function Lj(e,t,n){return a;function a(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),a):f===38?(e.consume(f),u):f===93?(e.consume(f),l):f===60||f===null||Yt(f)||Ws(f)?t(f):n(f)}function l(f){return f===null||f===40||f===91||Yt(f)||Ws(f)?t(f):a(f)}function u(f){return fr(f)?c(f):n(f)}function c(f){return f===59?(e.consume(f),a):fr(f)?(e.consume(f),c):n(f)}}function Bj(e,t,n){return a;function a(u){return e.consume(u),l}function l(u){return Xn(u)?n(u):t(u)}}function Y5(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Yt(e)}function W5(e){return!fr(e)}function K5(e){return!(e===47||Ap(e))}function Ap(e){return e===43||e===45||e===46||e===95||Xn(e)}function A1(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 qj={tokenize:Yj,partial:!0};function Uj(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Pj,continuation:{tokenize:Gj},exit:Vj}},text:{91:{name:"gfmFootnoteCall",tokenize:Fj},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Hj,resolveTo:$j}}}}function Hj(e,t,n){const a=this;let l=a.events.length;const u=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let c;for(;l--;){const h=a.events[l][1];if(h.type==="labelImage"){c=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return f;function f(h){if(!c||!c._balanced)return n(h);const m=Oa(a.sliceSerialize({start:c.end,end:a.now()}));return m.codePointAt(0)!==94||!u.includes(m.slice(1))?n(h):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),t(h))}}function $j(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)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},f=[e[n+1],e[n+2],["enter",a,t],e[n+3],e[n+4],["enter",l,t],["exit",l,t],["enter",u,t],["enter",c,t],["exit",c,t],["exit",u,t],e[e.length-2],e[e.length-1],["exit",a,t]];return e.splice(n,e.length-n+1,...f),e}function Fj(e,t,n){const a=this,l=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let u=0,c;return f;function f(y){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),h}function h(y){return y!==94?n(y):(e.enter("gfmFootnoteCallMarker"),e.consume(y),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",m)}function m(y){if(u>999||y===93&&!c||y===null||y===91||Yt(y))return n(y);if(y===93){e.exit("chunkString");const k=e.exit("gfmFootnoteCallString");return l.includes(Oa(a.sliceSerialize(k)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(y)}return Yt(y)||(c=!0),u++,e.consume(y),y===92?g:m}function g(y){return y===91||y===92||y===93?(e.consume(y),u++,m):m(y)}}function Pj(e,t,n){const a=this,l=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let u,c=0,f;return h;function h(C){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(C),e.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(C){return C===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(C),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",g):n(C)}function g(C){if(c>999||C===93&&!f||C===null||C===91||Yt(C))return n(C);if(C===93){e.exit("chunkString");const D=e.exit("gfmFootnoteDefinitionLabelString");return u=Oa(a.sliceSerialize(D)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(C),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),k}return Yt(C)||(f=!0),c++,e.consume(C),C===92?y:g}function y(C){return C===91||C===92||C===93?(e.consume(C),c++,g):g(C)}function k(C){return C===58?(e.enter("definitionMarker"),e.consume(C),e.exit("definitionMarker"),l.includes(u)||l.push(u),bt(e,x,"gfmFootnoteDefinitionWhitespace")):n(C)}function x(C){return t(C)}}function Gj(e,t,n){return e.check(a0,t,e.attempt(qj,t,n))}function Vj(e){e.exit("gfmFootnoteDefinition")}function Yj(e,t,n){const a=this;return bt(e,l,"gfmFootnoteDefinitionIndent",5);function l(u){const c=a.events[a.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?t(u):n(u)}}function Wj(e){let n=(e||{}).singleTilde;const a={name:"strikethrough",tokenize:u,resolveAll:l};return n==null&&(n=!0),{text:{126:a},insideSpan:{null:[a]},attentionMarkers:{null:[126]}};function l(c,f){let h=-1;for(;++h<c.length;)if(c[h][0]==="enter"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._close){let m=h;for(;m--;)if(c[m][0]==="exit"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._open&&c[h][1].end.offset-c[h][1].start.offset===c[m][1].end.offset-c[m][1].start.offset){c[h][1].type="strikethroughSequence",c[m][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},c[m][1].start),end:Object.assign({},c[h][1].end)},y={type:"strikethroughText",start:Object.assign({},c[m][1].end),end:Object.assign({},c[h][1].start)},k=[["enter",g,f],["enter",c[m][1],f],["exit",c[m][1],f],["enter",y,f]],x=f.parser.constructs.insideSpan.null;x&&Zr(k,k.length,0,bf(x,c.slice(m+1,h),f)),Zr(k,k.length,0,[["exit",y,f],["enter",c[h][1],f],["exit",c[h][1],f],["exit",g,f]]),Zr(c,m-1,h-m+3,k),h=m+k.length-2;break}}for(h=-1;++h<c.length;)c[h][1].type==="strikethroughSequenceTemporary"&&(c[h][1].type="data");return c}function u(c,f,h){const m=this.previous,g=this.events;let y=0;return k;function k(C){return m===126&&g[g.length-1][1].type!=="characterEscape"?h(C):(c.enter("strikethroughSequenceTemporary"),x(C))}function x(C){const D=su(m);if(C===126)return y>1?h(C):(c.consume(C),y++,x);if(y<2&&!n)return h(C);const R=c.exit("strikethroughSequenceTemporary"),O=su(C);return R._open=!O||O===2&&!!D,R._close=!D||D===2&&!!O,f(C)}}}class Kj{constructor(){this.map=[]}add(t,n,a){Xj(this,t,n,a)}consume(t){if(this.map.sort(function(u,c){return u[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 l=a.pop();for(;l;){for(const u of l)t.push(u);l=a.pop()}this.map.length=0}}function Xj(e,t,n,a){let l=0;if(!(n===0&&a.length===0)){for(;l<e.map.length;){if(e.map[l][0]===t){e.map[l][1]+=n,e.map[l][2].push(...a);return}l+=1}e.map.push([t,n,a])}}function Zj(e,t){let n=!1;const a=[];for(;t<e.length;){const l=e[t];if(n){if(l[0]==="enter")l[1].type==="tableContent"&&a.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const u=a.length-1;a[u]=a[u]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return a}function Qj(){return{flow:{null:{name:"table",tokenize:Jj,resolveAll:eC}}}}function Jj(e,t,n){const a=this;let l=0,u=0,c;return f;function f(F){let he=a.events.length-1;for(;he>-1;){const je=a.events[he][1].type;if(je==="lineEnding"||je==="linePrefix")he--;else break}const me=he>-1?a.events[he][1].type:null,Ae=me==="tableHead"||me==="tableRow"?P:h;return Ae===P&&a.parser.lazy[a.now().line]?n(F):Ae(F)}function h(F){return e.enter("tableHead"),e.enter("tableRow"),m(F)}function m(F){return F===124||(c=!0,u+=1),g(F)}function g(F){return F===null?n(F):et(F)?u>1?(u=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),x):n(F):jt(F)?bt(e,g,"whitespace")(F):(u+=1,c&&(c=!1,l+=1),F===124?(e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),c=!0,g):(e.enter("data"),y(F)))}function y(F){return F===null||F===124||Yt(F)?(e.exit("data"),g(F)):(e.consume(F),F===92?k:y)}function k(F){return F===92||F===124?(e.consume(F),y):y(F)}function x(F){return a.interrupt=!1,a.parser.lazy[a.now().line]?n(F):(e.enter("tableDelimiterRow"),c=!1,jt(F)?bt(e,C,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):C(F))}function C(F){return F===45||F===58?R(F):F===124?(c=!0,e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),D):K(F)}function D(F){return jt(F)?bt(e,R,"whitespace")(F):R(F)}function R(F){return F===58?(u+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(F),e.exit("tableDelimiterMarker"),O):F===45?(u+=1,O(F)):F===null||et(F)?L(F):K(F)}function O(F){return F===45?(e.enter("tableDelimiterFiller"),M(F)):K(F)}function M(F){return F===45?(e.consume(F),M):F===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(F),e.exit("tableDelimiterMarker"),q):(e.exit("tableDelimiterFiller"),q(F))}function q(F){return jt(F)?bt(e,L,"whitespace")(F):L(F)}function L(F){return F===124?C(F):F===null||et(F)?!c||l!==u?K(F):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(F)):K(F)}function K(F){return n(F)}function P(F){return e.enter("tableRow"),H(F)}function H(F){return F===124?(e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),H):F===null||et(F)?(e.exit("tableRow"),t(F)):jt(F)?bt(e,H,"whitespace")(F):(e.enter("data"),X(F))}function X(F){return F===null||F===124||Yt(F)?(e.exit("data"),H(F)):(e.consume(F),F===92?J:X)}function J(F){return F===92||F===124?(e.consume(F),X):X(F)}}function eC(e,t){let n=-1,a=!0,l=0,u=[0,0,0,0],c=[0,0,0,0],f=!1,h=0,m,g,y;const k=new Kj;for(;++n<e.length;){const x=e[n],C=x[1];x[0]==="enter"?C.type==="tableHead"?(f=!1,h!==0&&(P2(k,t,h,m,g),g=void 0,h=0),m={type:"table",start:Object.assign({},C.start),end:Object.assign({},C.end)},k.add(n,0,[["enter",m,t]])):C.type==="tableRow"||C.type==="tableDelimiterRow"?(a=!0,y=void 0,u=[0,0,0,0],c=[0,n+1,0,0],f&&(f=!1,g={type:"tableBody",start:Object.assign({},C.start),end:Object.assign({},C.end)},k.add(n,0,[["enter",g,t]])),l=C.type==="tableDelimiterRow"?2:g?3:1):l&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")?(a=!1,c[2]===0&&(u[1]!==0&&(c[0]=c[1],y=Td(k,t,u,l,void 0,y),u=[0,0,0,0]),c[2]=n)):C.type==="tableCellDivider"&&(a?a=!1:(u[1]!==0&&(c[0]=c[1],y=Td(k,t,u,l,void 0,y)),u=c,c=[u[1],n,0,0])):C.type==="tableHead"?(f=!0,h=n):C.type==="tableRow"||C.type==="tableDelimiterRow"?(h=n,u[1]!==0?(c[0]=c[1],y=Td(k,t,u,l,n,y)):c[1]!==0&&(y=Td(k,t,c,l,n,y)),l=0):l&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")&&(c[3]=n)}for(h!==0&&P2(k,t,h,m,g),k.consume(t.events),n=-1;++n<t.events.length;){const x=t.events[n];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=Zj(t.events,n))}return e}function Td(e,t,n,a,l,u){const c=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",f="tableContent";n[0]!==0&&(u.end=Object.assign({},tu(t.events,n[0])),e.add(n[0],0,[["exit",u,t]]));const h=tu(t.events,n[1]);if(u={type:c,start:Object.assign({},h),end:Object.assign({},h)},e.add(n[1],0,[["enter",u,t]]),n[2]!==0){const m=tu(t.events,n[2]),g=tu(t.events,n[3]),y={type:f,start:Object.assign({},m),end:Object.assign({},g)};if(e.add(n[2],0,[["enter",y,t]]),a!==2){const k=t.events[n[2]],x=t.events[n[3]];if(k[1].end=Object.assign({},x[1].end),k[1].type="chunkText",k[1].contentType="text",n[3]>n[2]+1){const C=n[2]+1,D=n[3]-n[2]-1;e.add(C,D,[])}}e.add(n[3]+1,0,[["exit",y,t]])}return l!==void 0&&(u.end=Object.assign({},tu(t.events,l)),e.add(l,0,[["exit",u,t]]),u=void 0),u}function P2(e,t,n,a,l){const u=[],c=tu(t.events,n);l&&(l.end=Object.assign({},c),u.push(["exit",l,t])),a.end=Object.assign({},c),u.push(["exit",a,t]),e.add(n+1,0,u)}function tu(e,t){const n=e[t],a=n[0]==="enter"?"start":"end";return n[1][a]}const tC={name:"tasklistCheck",tokenize:rC};function nC(){return{text:{91:tC}}}function rC(e,t,n){const a=this;return l;function l(h){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?n(h):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),u)}function u(h){return Yt(h)?(e.enter("taskListCheckValueUnchecked"),e.consume(h),e.exit("taskListCheckValueUnchecked"),c):h===88||h===120?(e.enter("taskListCheckValueChecked"),e.consume(h),e.exit("taskListCheckValueChecked"),c):n(h)}function c(h){return h===93?(e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):n(h)}function f(h){return et(h)?t(h):jt(h)?e.check({tokenize:aC},t,n)(h):n(h)}}function aC(e,t,n){return bt(e,a,"whitespace");function a(l){return l===null?n(l):t(l)}}function iC(e){return a5([Mj(),Uj(),Wj(e),Qj(),nC()])}const lC={};function sC(e){const t=this,n=e||lC,a=t.data(),l=a.micromarkExtensions||(a.micromarkExtensions=[]),u=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);l.push(iC(n)),u.push(Tj()),c.push(Aj(n))}function oC(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:u},exit:{mathFlow:l,mathFlowFence:a,mathFlowFenceMeta:n,mathFlowValue:f,mathText:c,mathTextData:f}};function e(h){const m={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[m]}},h)}function t(){this.buffer()}function n(){const h=this.resume(),m=this.stack[this.stack.length-1];m.type,m.meta=h}function a(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function l(h){const m=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),g=this.stack[this.stack.length-1];g.type,this.exit(h),g.value=m;const y=g.data.hChildren[0];y.type,y.tagName,y.children.push({type:"text",value:m}),this.data.mathFlowInside=void 0}function u(h){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},h),this.buffer()}function c(h){const m=this.resume(),g=this.stack[this.stack.length-1];g.type,this.exit(h),g.value=m,g.data.hChildren.push({type:"text",value:m})}function f(h){this.config.enter.data.call(this,h),this.config.exit.data.call(this,h)}}function uC(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),a.peek=l,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
79
- `,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:n,inlineMath:a}};function n(u,c,f,h){const m=u.value||"",g=f.createTracker(h),y="$".repeat(Math.max(M5(m,"$")+1,2)),k=f.enter("mathFlow");let x=g.move(y);if(u.meta){const C=f.enter("mathFlowMeta");x+=g.move(f.safe(u.meta,{after:`
80
- `,before:x,encode:["$"],...g.current()})),C()}return x+=g.move(`
81
- `),m&&(x+=g.move(m+`
82
- `)),x+=g.move(y),k(),x}function a(u,c,f){let h=u.value||"",m=1;for(t||m++;new RegExp("(^|[^$])"+"\\$".repeat(m)+"([^$]|$)").test(h);)m++;const g="$".repeat(m);/[^ \r\n]/.test(h)&&(/^[ \r\n]/.test(h)&&/[ \r\n]$/.test(h)||/^\$|\$$/.test(h))&&(h=" "+h+" ");let y=-1;for(;++y<f.unsafe.length;){const k=f.unsafe[y];if(!k.atBreak)continue;const x=f.compilePattern(k);let C;for(;C=x.exec(h);){let D=C.index;h.codePointAt(D)===10&&h.codePointAt(D-1)===13&&D--,h=h.slice(0,D)+" "+h.slice(C.index+1)}}return g+h+g}function l(){return"$"}}const cC={tokenize:dC,concrete:!0,name:"mathFlow"},G2={tokenize:fC,partial:!0};function dC(e,t,n){const a=this,l=a.events[a.events.length-1],u=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0;let c=0;return f;function f(M){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),h(M)}function h(M){return M===36?(e.consume(M),c++,h):c<2?n(M):(e.exit("mathFlowFenceSequence"),bt(e,m,"whitespace")(M))}function m(M){return M===null||et(M)?y(M):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(M))}function g(M){return M===null||et(M)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),y(M)):M===36?n(M):(e.consume(M),g)}function y(M){return e.exit("mathFlowFence"),a.interrupt?t(M):e.attempt(G2,k,R)(M)}function k(M){return e.attempt({tokenize:O,partial:!0},R,x)(M)}function x(M){return(u?bt(e,C,"linePrefix",u+1):C)(M)}function C(M){return M===null?R(M):et(M)?e.attempt(G2,k,R)(M):(e.enter("mathFlowValue"),D(M))}function D(M){return M===null||et(M)?(e.exit("mathFlowValue"),C(M)):(e.consume(M),D)}function R(M){return e.exit("mathFlow"),t(M)}function O(M,q,L){let K=0;return bt(M,P,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function P(J){return M.enter("mathFlowFence"),M.enter("mathFlowFenceSequence"),H(J)}function H(J){return J===36?(K++,M.consume(J),H):K<c?L(J):(M.exit("mathFlowFenceSequence"),bt(M,X,"whitespace")(J))}function X(J){return J===null||et(J)?(M.exit("mathFlowFence"),q(J)):L(J)}}}function fC(e,t,n){const a=this;return l;function l(c){return c===null?t(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u)}function u(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}function hC(e){let n=(e||{}).singleDollarTextMath;return n==null&&(n=!0),{tokenize:a,resolve:mC,previous:pC,name:"mathText"};function a(l,u,c){let f=0,h,m;return g;function g(D){return l.enter("mathText"),l.enter("mathTextSequence"),y(D)}function y(D){return D===36?(l.consume(D),f++,y):f<2&&!n?c(D):(l.exit("mathTextSequence"),k(D))}function k(D){return D===null?c(D):D===36?(m=l.enter("mathTextSequence"),h=0,C(D)):D===32?(l.enter("space"),l.consume(D),l.exit("space"),k):et(D)?(l.enter("lineEnding"),l.consume(D),l.exit("lineEnding"),k):(l.enter("mathTextData"),x(D))}function x(D){return D===null||D===32||D===36||et(D)?(l.exit("mathTextData"),k(D)):(l.consume(D),x)}function C(D){return D===36?(l.consume(D),h++,C):h===f?(l.exit("mathTextSequence"),l.exit("mathText"),u(D)):(m.type="mathTextData",x(D))}}}function mC(e){let t=e.length-4,n=3,a,l;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;)l===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(l=a):(a===t||e[a][1].type==="lineEnding")&&(e[l][1].type="mathTextData",a!==l+2&&(e[l][1].end=e[a-1][1].end,e.splice(l+2,a-l-2),t-=a-l-2,a=l+2),l=void 0);return e}function pC(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function gC(e){return{flow:{36:cC},text:{36:hC(e)}}}class ze extends Error{constructor(t,n){var a="KaTeX parse error: "+t,l,u,c=n&&n.loc;if(c&&c.start<=c.end){var f=c.lexer.input;l=c.start,u=c.end,l===f.length?a+=" at end of input: ":a+=" at position "+(l+1)+": ";var h=f.slice(l,u).replace(/[^]/g,"$&̲"),m;l>15?m="…"+f.slice(l-15,l):m=f.slice(0,l);var g;u+15<f.length?g=f.slice(u,u+15)+"…":g=f.slice(u),a+=m+h+g}super(a),this.name="ParseError",this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,ze.prototype),this.position=l,l!=null&&u!=null&&(this.length=u-l),this.rawMessage=t}}var yC=/([A-Z])/g,vC=e=>e.replace(yC,"-$1").toLowerCase(),xC={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},bC=/[&><"']/g,Zn=e=>String(e).replace(bC,t=>xC[t]),Gd=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?Gd(e.body[0]):e:e.type==="font"?Gd(e.body):e,wC=new Set(["mathord","textord","atom"]),Qi=e=>wC.has(Gd(e).type),kC=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?t[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():"_relative"},of={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 SC(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 jC(e){if(e.default!==void 0)return e.default;var t=Array.isArray(e.type)?e.type[0]:e.type;return SC(t)}function CC(e,t,n,a){var l=n[t];e[t]=l!==void 0?a.processor?a.processor(l):l:jC(a)}class E1{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(of)){var a=of[n];a&&CC(this,n,t,a)}}reportNonstrict(t,n,a){var l=this.strict;if(typeof l=="function"&&(l=l(t,n,a)),!(!l||l==="ignore")){if(l===!0||l==="error")throw new ze("LaTeX-incompatible input and strict mode is set to 'error': "+(n+" ["+t+"]"),a);l==="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 '"+l+"': "+n+" ["+t+"]"))}}useStrictBehavior(t,n,a){var l=this.strict;if(typeof l=="function")try{l=l(t,n,a)}catch{l="error"}return!l||l==="ignore"?!1:l===!0||l==="error"?!0:l==="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 '"+l+"': "+n+" ["+t+"]")),!1)}isTrusted(t){if("url"in t&&t.url&&!t.protocol){var n=kC(t.url);if(n==null)return!1;t.protocol=n}var a=typeof this.trust=="function"?this.trust(t):this.trust;return!!a}}class Pl{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 ai[TC[this.id]]}sub(){return ai[AC[this.id]]}fracNum(){return ai[EC[this.id]]}fracDen(){return ai[NC[this.id]]}cramp(){return ai[MC[this.id]]}text(){return ai[DC[this.id]]}isTight(){return this.size>=2}}var N1=0,uf=1,iu=2,Wi=3,Qc=4,xa=5,ou=6,hr=7,ai=[new Pl(N1,0,!1),new Pl(uf,0,!0),new Pl(iu,1,!1),new Pl(Wi,1,!0),new Pl(Qc,2,!1),new Pl(xa,2,!0),new Pl(ou,3,!1),new Pl(hr,3,!0)],TC=[Qc,xa,Qc,xa,ou,hr,ou,hr],AC=[xa,xa,xa,xa,hr,hr,hr,hr],EC=[iu,Wi,Qc,xa,ou,hr,ou,hr],NC=[Wi,Wi,xa,xa,hr,hr,hr,hr],MC=[uf,uf,Wi,Wi,xa,xa,hr,hr],DC=[N1,uf,iu,Wi,iu,Wi,iu,Wi],ht={DISPLAY:ai[N1],TEXT:ai[iu],SCRIPT:ai[Qc],SCRIPTSCRIPT:ai[ou]},Ep=[{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 zC(e){for(var t=0;t<Ep.length;t++)for(var n=Ep[t],a=0;a<n.blocks.length;a++){var l=n.blocks[a];if(e>=l[0]&&e<=l[1])return n.name}return null}var Vd=[];Ep.forEach(e=>e.blocks.forEach(t=>Vd.push(...t)));function X5(e){for(var t=0;t<Vd.length;t+=2)if(e>=Vd[t]&&e<=Vd[t+1])return!0;return!1}var In=e=>e+" "+e,eu=80,RC=function(t,n){return"M95,"+(622+t+n)+`
83
- c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
84
- c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
85
- 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
86
- s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
87
- c69,-144,104.5,-217.7,106.5,-221
88
- l`+t/2.075+" -"+t+`
89
- c5.3,-9.3,12,-14,20,-14
90
- H400000v`+(40+t)+`H845.2724
91
- s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
92
- c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
93
- M`+(834+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},OC=function(t,n){return"M263,"+(601+t+n)+`c0.7,0,18,39.7,52,119
94
- c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
95
- c340,-704.7,510.7,-1060.3,512,-1067
96
- l`+t/2.084+" -"+t+`
97
- c4.7,-7.3,11,-11,19,-11
98
- H40000v`+(40+t)+`H1012.3
99
- s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
100
- 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
101
- s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
102
- c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
103
- M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},IC=function(t,n){return"M983 "+(10+t+n)+`
104
- l`+t/3.13+" -"+t+`
105
- c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+`
106
- 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
107
- 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
108
- c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
109
- c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
110
- c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
111
- c53.7,-170.3,84.5,-266.8,92.5,-289.5z
112
- M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},_C=function(t,n){return"M424,"+(2398+t+n)+`
113
- c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
114
- 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
115
- s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
116
- s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
117
- l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000
118
- v`+(40+t)+`H1014.6
119
- s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
120
- c-2,6,-10,9,-24,9
121
- c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+n+`
122
- h400000v`+(40+t)+"h-400000z"},LC=function(t,n){return"M473,"+(2713+t+n)+`
123
- c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+`
124
- c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7
125
- s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
126
- 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
127
- 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
128
- s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
129
- 606zM`+(1001+t)+" "+n+"h400000v"+(40+t)+"H1017.7z"},BC=function(t){var n=t/2;return"M400000 "+t+" H0 L"+n+" 0 l65 45 L145 "+(t-80)+" H400000z"},qC=function(t,n,a){var l=a-54-n-t;return"M702 "+(t+n)+"H400000"+(40+t)+`
130
- H742v`+l+`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
131
- h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
132
- c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
133
- 219 661 l218 661zM702 `+n+"H400000v"+(40+t)+"H742z"},UC=function(t,n,a){n=1e3*n;var l="";switch(t){case"sqrtMain":l=RC(n,eu);break;case"sqrtSize1":l=OC(n,eu);break;case"sqrtSize2":l=IC(n,eu);break;case"sqrtSize3":l=_C(n,eu);break;case"sqrtSize4":l=LC(n,eu);break;case"sqrtTall":l=qC(n,eu,a)}return l},HC=function(t,n){switch(t){case"⎜":return In("M291 0 H417 V"+n+" H291z");case"∣":return In("M145 0 H188 V"+n+" H145z");case"∥":return In("M145 0 H188 V"+n+" H145z")+In("M367 0 H410 V"+n+" H367z");case"⎟":return In("M457 0 H583 V"+n+" H457z");case"⎢":return In("M319 0 H403 V"+n+" H319z");case"⎥":return In("M263 0 H347 V"+n+" H263z");case"⎪":return In("M384 0 H504 V"+n+" H384z");case"⏐":return In("M312 0 H355 V"+n+" H312z");case"‖":return In("M257 0 H300 V"+n+" H257z")+In("M478 0 H521 V"+n+" H478z");default:return""}},V2={doubleleftarrow:`M262 157
134
- 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
135
- 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
136
- 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
137
- 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
138
- 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
139
- -86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
140
- -2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
141
- m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
142
- -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
143
- 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
144
- -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
145
- -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
146
- -13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
147
- 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
148
- -107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
149
- 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
150
- -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
151
- 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
152
- 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
153
- 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
154
- l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
155
- -45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
156
- 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
157
- 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
158
- 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
159
- -331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
160
- 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
161
- 435 0h399565z`,leftgroupunder:`M400000 262
162
- 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
163
- 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
164
- -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
165
- -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
166
- -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
167
- 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
168
- -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
169
- -10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
170
- m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
171
- 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
172
- 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
173
- -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
174
- 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
175
- -2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
176
- 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
177
- -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
178
- -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
179
- 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:In("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:In("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:In("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:In("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
180
- -.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
181
- 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
182
- 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:In("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334
183
- 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
184
- -53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
185
- 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
186
- 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
187
- 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
188
- 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
189
- 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
190
- -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
191
- -320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
192
- 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
193
- 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
194
- -451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
195
- m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
196
- 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
197
- -480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
198
- 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
199
- 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
200
- -707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
201
- m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
202
- 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
203
- -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
204
- 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
205
- 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
206
- -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
207
- -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
208
- 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
209
- -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
210
- 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
211
- 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
212
- 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
213
- -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
214
- 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
215
- 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
216
- -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
217
- -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
218
- 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
219
- -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
220
- 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
221
- 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
222
- 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
223
- -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
224
- -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
225
- 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
226
- 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
227
- -64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
228
- 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
229
- 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
230
- -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
231
- 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:In("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:In("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:In("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
232
- 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
233
- -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
234
- -167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
235
- 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
236
- -70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
237
- -40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
238
- -37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
239
- 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
240
- 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
241
- 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
242
- 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
243
- -19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
244
- 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
245
- -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
246
- 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
247
- 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
248
- -68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
249
- -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
250
- 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
251
- 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
252
- 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
253
- -11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
254
- 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
255
- 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
256
- -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
257
- -11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
258
- 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
259
- 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
260
- -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
261
- 3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
262
- 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
263
- -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
264
- -7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
265
- H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
266
- 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
267
- 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
268
- -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
269
- -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
270
- -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,
271
- -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,
272
- -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,
273
- -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,
274
- -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
275
- c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
276
- 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
277
- 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
278
- 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
279
- 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
280
- c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
281
- M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
282
- -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
283
- 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
284
- -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
285
- -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
286
- -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
287
- 151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
288
- c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
289
- 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
290
- c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
291
- c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
292
- M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
293
- 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,
294
- -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
295
- 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
296
- 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
297
- 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,
298
- 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,
299
- -152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
300
- 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
301
- 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,
302
- -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
303
- 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
304
- M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},$C=function(t,n){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v1759 v84 h347 v-84
305
- 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
306
- 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
307
- c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15
308
- 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
309
- c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15
310
- c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+` v585 h43z
311
- M367 15 v585 v`+n+` v585 c2.667,10,9.667,15,21,15
312
- c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15
313
- 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
314
- MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+n+` v1799 H0 v-84 H319z
315
- MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v602 h84z
316
- M403 1759 V0 H319 V1759 v`+n+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v602 h84z
317
- 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
318
- 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,
319
- -36,557 l0,`+(n+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
320
- 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
321
- 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,
322
- -544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
323
- l0,-`+(n+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
324
- -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,
325
- 63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
326
- c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(n+9)+`
327
- 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
328
- 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
329
- 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
330
- c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
331
- l0,-`+(n+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
332
- -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 FC(e){return"toText"in e}class mu{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(FC(t))return t.toText();throw new Error("Expected MathDomNode with toText, got "+t.constructor.name)}).join("")}}var Np={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},PC={ex:!0,em:!0,mu:!0},Z5=function(t){return typeof t!="string"&&(t=t.unit),t in Np||t in PC||t==="ex"},un=function(t,n){var a;if(t.unit in Np)a=Np[t.unit]/n.fontMetrics().ptPerEm/n.sizeMultiplier;else if(t.unit==="mu")a=n.fontMetrics().cssEmPerMu;else{var l;if(n.style.isTight()?l=n.havingStyle(n.style.text()):l=n,t.unit==="ex")a=l.fontMetrics().xHeight;else if(t.unit==="em")a=l.fontMetrics().quad;else throw new ze("Invalid unit: '"+t.unit+"'");l!==n&&(a*=l.sizeMultiplier/n.sizeMultiplier)}return Math.min(t.number*a,n.maxSize)},Ue=function(t){return+t.toFixed(4)+"em"},Kl=function(t){return t.filter(n=>n).join(" ")},M1=function(t){var n="";for(var a of Object.keys(t)){var l=t[a];l!==void 0&&(n+=vC(a)+":"+l+";")}return n},Q5=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 l=n.getColor();l&&(this.style.color=l)}},J5=function(t){var n=document.createElement(t);n.className=Kl(this.classes),Object.assign(n.style,this.style);for(var a of Object.keys(this.attributes))n.setAttribute(a,this.attributes[a]);for(var l=0;l<this.children.length;l++)n.appendChild(this.children[l].toNode());return n},GC=/[\s"'>/=\x00-\x1f]/,e6=function(t){var n="<"+t;this.classes.length&&(n+=' class="'+Zn(Kl(this.classes))+'"');var a=M1(this.style);a&&(n+=' style="'+Zn(a)+'"');for(var l of Object.keys(this.attributes)){if(GC.test(l))throw new ze("Invalid attribute name '"+l+"'");n+=" "+l+'="'+Zn(this.attributes[l])+'"'}n+=">";for(var u=0;u<this.children.length;u++)n+=this.children[u].toMarkup();return n+="</"+t+">",n};class pu{constructor(t,n,a,l){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,Q5.call(this,t,a,l),this.children=n||[]}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return this.classes.includes(t)}toNode(){return J5.call(this,"span")}toMarkup(){return e6.call(this,"span")}}class Sf{constructor(t,n,a,l){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,Q5.call(this,n,l),this.children=a||[],this.setAttribute("href",t)}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return this.classes.includes(t)}toNode(){return J5.call(this,"a")}toMarkup(){return e6.call(this,"a")}}class VC{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="'+Zn(this.src)+'"'+(' alt="'+Zn(this.alt)+'"'),n=M1(this.style);return n&&(t+=' style="'+Zn(n)+'"'),t+="'/>",t}}var YC={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class Jr{constructor(t,n,a,l,u,c,f,h){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=l||0,this.skew=u||0,this.width=c||0,this.classes=f||[],this.style=h||{},this.maxFontSize=0;var m=zC(this.text.charCodeAt(0));m&&this.classes.push(m+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=YC[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=Ue(this.italic)),this.classes.length>0&&(n=n||document.createElement("span"),n.className=Kl(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+=Zn(Kl(this.classes)),n+='"');var a="";this.italic>0&&(a+="margin-right:"+Ue(this.italic)+";"),a+=M1(this.style),a&&(t=!0,n+=' style="'+Zn(a)+'"');var l=Zn(this.text);return t?(n+=">",n+=l,n+="</span>",n):l}}class Xi{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 l=0;l<this.children.length;l++)n.appendChild(this.children[l].toNode());return n}toMarkup(){var t='<svg xmlns="http://www.w3.org/2000/svg"';for(var n of Object.keys(this.attributes))t+=" "+n+'="'+Zn(this.attributes[n])+'"';t+=">";for(var a=0;a<this.children.length;a++)t+=this.children[a].toMarkup();return t+="</svg>",t}}class Xl{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",V2[this.pathName]),n}toMarkup(){return this.alternate?'<path d="'+Zn(this.alternate)+'"/>':'<path d="'+Zn(V2[this.pathName])+'"/>'}}class Mp{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+'="'+Zn(this.attributes[n])+'"';return t+="/>",t}}function WC(e){if(e instanceof Jr)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}function KC(e){if(e instanceof pu)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}var XC=e=>e instanceof pu||e instanceof Sf||e instanceof mu,ii={"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]}},Ad={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]},Y2={Å:"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 t6(e,t){ii[e]=t}function D1(e,t,n){if(!ii[t])throw new Error("Font metrics not found for font: "+t+".");var a=e.charCodeAt(0),l=ii[t][a];if(!l&&e[0]in Y2&&(a=Y2[e[0]].charCodeAt(0),l=ii[t][a]),!l&&n==="text"&&X5(a)&&(l=ii[t][77]),l)return{depth:l[0],height:l[1],italic:l[2],skew:l[3],width:l[4]}}var qm={};function ZC(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!qm[t]){var n=qm[t]={cssEmPerMu:Ad.quad[t]/18};for(var a in Ad)Ad.hasOwnProperty(a)&&(n[a]=Ad[a][t])}return qm[t]}var ln={math:{},text:{}};function w(e,t,n,a,l,u){ln[e][l]={font:t,group:n,replace:a},u&&a&&(ln[e][a]=ln[e][l])}var S="math",Ce="text",E="main",G="ams",sn="accent-token",We="bin",mr="close",gu="inner",it="mathord",En="op-token",ea="open",s0="punct",V="rel",Ji="spacing",ne="textord";w(S,E,V,"≡","\\equiv",!0);w(S,E,V,"≺","\\prec",!0);w(S,E,V,"≻","\\succ",!0);w(S,E,V,"∼","\\sim",!0);w(S,E,V,"⊥","\\perp");w(S,E,V,"⪯","\\preceq",!0);w(S,E,V,"⪰","\\succeq",!0);w(S,E,V,"≃","\\simeq",!0);w(S,E,V,"∣","\\mid",!0);w(S,E,V,"≪","\\ll",!0);w(S,E,V,"≫","\\gg",!0);w(S,E,V,"≍","\\asymp",!0);w(S,E,V,"∥","\\parallel");w(S,E,V,"⋈","\\bowtie",!0);w(S,E,V,"⌣","\\smile",!0);w(S,E,V,"⊑","\\sqsubseteq",!0);w(S,E,V,"⊒","\\sqsupseteq",!0);w(S,E,V,"≐","\\doteq",!0);w(S,E,V,"⌢","\\frown",!0);w(S,E,V,"∋","\\ni",!0);w(S,E,V,"∝","\\propto",!0);w(S,E,V,"⊢","\\vdash",!0);w(S,E,V,"⊣","\\dashv",!0);w(S,E,V,"∋","\\owns");w(S,E,s0,".","\\ldotp");w(S,E,s0,"⋅","\\cdotp");w(S,E,s0,"⋅","·");w(Ce,E,ne,"⋅","·");w(S,E,ne,"#","\\#");w(Ce,E,ne,"#","\\#");w(S,E,ne,"&","\\&");w(Ce,E,ne,"&","\\&");w(S,E,ne,"ℵ","\\aleph",!0);w(S,E,ne,"∀","\\forall",!0);w(S,E,ne,"ℏ","\\hbar",!0);w(S,E,ne,"∃","\\exists",!0);w(S,E,ne,"∇","\\nabla",!0);w(S,E,ne,"♭","\\flat",!0);w(S,E,ne,"ℓ","\\ell",!0);w(S,E,ne,"♮","\\natural",!0);w(S,E,ne,"♣","\\clubsuit",!0);w(S,E,ne,"℘","\\wp",!0);w(S,E,ne,"♯","\\sharp",!0);w(S,E,ne,"♢","\\diamondsuit",!0);w(S,E,ne,"ℜ","\\Re",!0);w(S,E,ne,"♡","\\heartsuit",!0);w(S,E,ne,"ℑ","\\Im",!0);w(S,E,ne,"♠","\\spadesuit",!0);w(S,E,ne,"§","\\S",!0);w(Ce,E,ne,"§","\\S");w(S,E,ne,"¶","\\P",!0);w(Ce,E,ne,"¶","\\P");w(S,E,ne,"†","\\dag");w(Ce,E,ne,"†","\\dag");w(Ce,E,ne,"†","\\textdagger");w(S,E,ne,"‡","\\ddag");w(Ce,E,ne,"‡","\\ddag");w(Ce,E,ne,"‡","\\textdaggerdbl");w(S,E,mr,"⎱","\\rmoustache",!0);w(S,E,ea,"⎰","\\lmoustache",!0);w(S,E,mr,"⟯","\\rgroup",!0);w(S,E,ea,"⟮","\\lgroup",!0);w(S,E,We,"∓","\\mp",!0);w(S,E,We,"⊖","\\ominus",!0);w(S,E,We,"⊎","\\uplus",!0);w(S,E,We,"⊓","\\sqcap",!0);w(S,E,We,"∗","\\ast");w(S,E,We,"⊔","\\sqcup",!0);w(S,E,We,"◯","\\bigcirc",!0);w(S,E,We,"∙","\\bullet",!0);w(S,E,We,"‡","\\ddagger");w(S,E,We,"≀","\\wr",!0);w(S,E,We,"⨿","\\amalg");w(S,E,We,"&","\\And");w(S,E,V,"⟵","\\longleftarrow",!0);w(S,E,V,"⇐","\\Leftarrow",!0);w(S,E,V,"⟸","\\Longleftarrow",!0);w(S,E,V,"⟶","\\longrightarrow",!0);w(S,E,V,"⇒","\\Rightarrow",!0);w(S,E,V,"⟹","\\Longrightarrow",!0);w(S,E,V,"↔","\\leftrightarrow",!0);w(S,E,V,"⟷","\\longleftrightarrow",!0);w(S,E,V,"⇔","\\Leftrightarrow",!0);w(S,E,V,"⟺","\\Longleftrightarrow",!0);w(S,E,V,"↦","\\mapsto",!0);w(S,E,V,"⟼","\\longmapsto",!0);w(S,E,V,"↗","\\nearrow",!0);w(S,E,V,"↩","\\hookleftarrow",!0);w(S,E,V,"↪","\\hookrightarrow",!0);w(S,E,V,"↘","\\searrow",!0);w(S,E,V,"↼","\\leftharpoonup",!0);w(S,E,V,"⇀","\\rightharpoonup",!0);w(S,E,V,"↙","\\swarrow",!0);w(S,E,V,"↽","\\leftharpoondown",!0);w(S,E,V,"⇁","\\rightharpoondown",!0);w(S,E,V,"↖","\\nwarrow",!0);w(S,E,V,"⇌","\\rightleftharpoons",!0);w(S,G,V,"≮","\\nless",!0);w(S,G,V,"","\\@nleqslant");w(S,G,V,"","\\@nleqq");w(S,G,V,"⪇","\\lneq",!0);w(S,G,V,"≨","\\lneqq",!0);w(S,G,V,"","\\@lvertneqq");w(S,G,V,"⋦","\\lnsim",!0);w(S,G,V,"⪉","\\lnapprox",!0);w(S,G,V,"⊀","\\nprec",!0);w(S,G,V,"⋠","\\npreceq",!0);w(S,G,V,"⋨","\\precnsim",!0);w(S,G,V,"⪹","\\precnapprox",!0);w(S,G,V,"≁","\\nsim",!0);w(S,G,V,"","\\@nshortmid");w(S,G,V,"∤","\\nmid",!0);w(S,G,V,"⊬","\\nvdash",!0);w(S,G,V,"⊭","\\nvDash",!0);w(S,G,V,"⋪","\\ntriangleleft");w(S,G,V,"⋬","\\ntrianglelefteq",!0);w(S,G,V,"⊊","\\subsetneq",!0);w(S,G,V,"","\\@varsubsetneq");w(S,G,V,"⫋","\\subsetneqq",!0);w(S,G,V,"","\\@varsubsetneqq");w(S,G,V,"≯","\\ngtr",!0);w(S,G,V,"","\\@ngeqslant");w(S,G,V,"","\\@ngeqq");w(S,G,V,"⪈","\\gneq",!0);w(S,G,V,"≩","\\gneqq",!0);w(S,G,V,"","\\@gvertneqq");w(S,G,V,"⋧","\\gnsim",!0);w(S,G,V,"⪊","\\gnapprox",!0);w(S,G,V,"⊁","\\nsucc",!0);w(S,G,V,"⋡","\\nsucceq",!0);w(S,G,V,"⋩","\\succnsim",!0);w(S,G,V,"⪺","\\succnapprox",!0);w(S,G,V,"≆","\\ncong",!0);w(S,G,V,"","\\@nshortparallel");w(S,G,V,"∦","\\nparallel",!0);w(S,G,V,"⊯","\\nVDash",!0);w(S,G,V,"⋫","\\ntriangleright");w(S,G,V,"⋭","\\ntrianglerighteq",!0);w(S,G,V,"","\\@nsupseteqq");w(S,G,V,"⊋","\\supsetneq",!0);w(S,G,V,"","\\@varsupsetneq");w(S,G,V,"⫌","\\supsetneqq",!0);w(S,G,V,"","\\@varsupsetneqq");w(S,G,V,"⊮","\\nVdash",!0);w(S,G,V,"⪵","\\precneqq",!0);w(S,G,V,"⪶","\\succneqq",!0);w(S,G,V,"","\\@nsubseteqq");w(S,G,We,"⊴","\\unlhd");w(S,G,We,"⊵","\\unrhd");w(S,G,V,"↚","\\nleftarrow",!0);w(S,G,V,"↛","\\nrightarrow",!0);w(S,G,V,"⇍","\\nLeftarrow",!0);w(S,G,V,"⇏","\\nRightarrow",!0);w(S,G,V,"↮","\\nleftrightarrow",!0);w(S,G,V,"⇎","\\nLeftrightarrow",!0);w(S,G,V,"△","\\vartriangle");w(S,G,ne,"ℏ","\\hslash");w(S,G,ne,"▽","\\triangledown");w(S,G,ne,"◊","\\lozenge");w(S,G,ne,"Ⓢ","\\circledS");w(S,G,ne,"®","\\circledR");w(Ce,G,ne,"®","\\circledR");w(S,G,ne,"∡","\\measuredangle",!0);w(S,G,ne,"∄","\\nexists");w(S,G,ne,"℧","\\mho");w(S,G,ne,"Ⅎ","\\Finv",!0);w(S,G,ne,"⅁","\\Game",!0);w(S,G,ne,"‵","\\backprime");w(S,G,ne,"▲","\\blacktriangle");w(S,G,ne,"▼","\\blacktriangledown");w(S,G,ne,"■","\\blacksquare");w(S,G,ne,"⧫","\\blacklozenge");w(S,G,ne,"★","\\bigstar");w(S,G,ne,"∢","\\sphericalangle",!0);w(S,G,ne,"∁","\\complement",!0);w(S,G,ne,"ð","\\eth",!0);w(Ce,E,ne,"ð","ð");w(S,G,ne,"╱","\\diagup");w(S,G,ne,"╲","\\diagdown");w(S,G,ne,"□","\\square");w(S,G,ne,"□","\\Box");w(S,G,ne,"◊","\\Diamond");w(S,G,ne,"¥","\\yen",!0);w(Ce,G,ne,"¥","\\yen",!0);w(S,G,ne,"✓","\\checkmark",!0);w(Ce,G,ne,"✓","\\checkmark");w(S,G,ne,"ℶ","\\beth",!0);w(S,G,ne,"ℸ","\\daleth",!0);w(S,G,ne,"ℷ","\\gimel",!0);w(S,G,ne,"ϝ","\\digamma",!0);w(S,G,ne,"ϰ","\\varkappa");w(S,G,ea,"┌","\\@ulcorner",!0);w(S,G,mr,"┐","\\@urcorner",!0);w(S,G,ea,"└","\\@llcorner",!0);w(S,G,mr,"┘","\\@lrcorner",!0);w(S,G,V,"≦","\\leqq",!0);w(S,G,V,"⩽","\\leqslant",!0);w(S,G,V,"⪕","\\eqslantless",!0);w(S,G,V,"≲","\\lesssim",!0);w(S,G,V,"⪅","\\lessapprox",!0);w(S,G,V,"≊","\\approxeq",!0);w(S,G,We,"⋖","\\lessdot");w(S,G,V,"⋘","\\lll",!0);w(S,G,V,"≶","\\lessgtr",!0);w(S,G,V,"⋚","\\lesseqgtr",!0);w(S,G,V,"⪋","\\lesseqqgtr",!0);w(S,G,V,"≑","\\doteqdot");w(S,G,V,"≓","\\risingdotseq",!0);w(S,G,V,"≒","\\fallingdotseq",!0);w(S,G,V,"∽","\\backsim",!0);w(S,G,V,"⋍","\\backsimeq",!0);w(S,G,V,"⫅","\\subseteqq",!0);w(S,G,V,"⋐","\\Subset",!0);w(S,G,V,"⊏","\\sqsubset",!0);w(S,G,V,"≼","\\preccurlyeq",!0);w(S,G,V,"⋞","\\curlyeqprec",!0);w(S,G,V,"≾","\\precsim",!0);w(S,G,V,"⪷","\\precapprox",!0);w(S,G,V,"⊲","\\vartriangleleft");w(S,G,V,"⊴","\\trianglelefteq");w(S,G,V,"⊨","\\vDash",!0);w(S,G,V,"⊪","\\Vvdash",!0);w(S,G,V,"⌣","\\smallsmile");w(S,G,V,"⌢","\\smallfrown");w(S,G,V,"≏","\\bumpeq",!0);w(S,G,V,"≎","\\Bumpeq",!0);w(S,G,V,"≧","\\geqq",!0);w(S,G,V,"⩾","\\geqslant",!0);w(S,G,V,"⪖","\\eqslantgtr",!0);w(S,G,V,"≳","\\gtrsim",!0);w(S,G,V,"⪆","\\gtrapprox",!0);w(S,G,We,"⋗","\\gtrdot");w(S,G,V,"⋙","\\ggg",!0);w(S,G,V,"≷","\\gtrless",!0);w(S,G,V,"⋛","\\gtreqless",!0);w(S,G,V,"⪌","\\gtreqqless",!0);w(S,G,V,"≖","\\eqcirc",!0);w(S,G,V,"≗","\\circeq",!0);w(S,G,V,"≜","\\triangleq",!0);w(S,G,V,"∼","\\thicksim");w(S,G,V,"≈","\\thickapprox");w(S,G,V,"⫆","\\supseteqq",!0);w(S,G,V,"⋑","\\Supset",!0);w(S,G,V,"⊐","\\sqsupset",!0);w(S,G,V,"≽","\\succcurlyeq",!0);w(S,G,V,"⋟","\\curlyeqsucc",!0);w(S,G,V,"≿","\\succsim",!0);w(S,G,V,"⪸","\\succapprox",!0);w(S,G,V,"⊳","\\vartriangleright");w(S,G,V,"⊵","\\trianglerighteq");w(S,G,V,"⊩","\\Vdash",!0);w(S,G,V,"∣","\\shortmid");w(S,G,V,"∥","\\shortparallel");w(S,G,V,"≬","\\between",!0);w(S,G,V,"⋔","\\pitchfork",!0);w(S,G,V,"∝","\\varpropto");w(S,G,V,"◀","\\blacktriangleleft");w(S,G,V,"∴","\\therefore",!0);w(S,G,V,"∍","\\backepsilon");w(S,G,V,"▶","\\blacktriangleright");w(S,G,V,"∵","\\because",!0);w(S,G,V,"⋘","\\llless");w(S,G,V,"⋙","\\gggtr");w(S,G,We,"⊲","\\lhd");w(S,G,We,"⊳","\\rhd");w(S,G,V,"≂","\\eqsim",!0);w(S,E,V,"⋈","\\Join");w(S,G,V,"≑","\\Doteq",!0);w(S,G,We,"∔","\\dotplus",!0);w(S,G,We,"∖","\\smallsetminus");w(S,G,We,"⋒","\\Cap",!0);w(S,G,We,"⋓","\\Cup",!0);w(S,G,We,"⩞","\\doublebarwedge",!0);w(S,G,We,"⊟","\\boxminus",!0);w(S,G,We,"⊞","\\boxplus",!0);w(S,G,We,"⋇","\\divideontimes",!0);w(S,G,We,"⋉","\\ltimes",!0);w(S,G,We,"⋊","\\rtimes",!0);w(S,G,We,"⋋","\\leftthreetimes",!0);w(S,G,We,"⋌","\\rightthreetimes",!0);w(S,G,We,"⋏","\\curlywedge",!0);w(S,G,We,"⋎","\\curlyvee",!0);w(S,G,We,"⊝","\\circleddash",!0);w(S,G,We,"⊛","\\circledast",!0);w(S,G,We,"⋅","\\centerdot");w(S,G,We,"⊺","\\intercal",!0);w(S,G,We,"⋒","\\doublecap");w(S,G,We,"⋓","\\doublecup");w(S,G,We,"⊠","\\boxtimes",!0);w(S,G,V,"⇢","\\dashrightarrow",!0);w(S,G,V,"⇠","\\dashleftarrow",!0);w(S,G,V,"⇇","\\leftleftarrows",!0);w(S,G,V,"⇆","\\leftrightarrows",!0);w(S,G,V,"⇚","\\Lleftarrow",!0);w(S,G,V,"↞","\\twoheadleftarrow",!0);w(S,G,V,"↢","\\leftarrowtail",!0);w(S,G,V,"↫","\\looparrowleft",!0);w(S,G,V,"⇋","\\leftrightharpoons",!0);w(S,G,V,"↶","\\curvearrowleft",!0);w(S,G,V,"↺","\\circlearrowleft",!0);w(S,G,V,"↰","\\Lsh",!0);w(S,G,V,"⇈","\\upuparrows",!0);w(S,G,V,"↿","\\upharpoonleft",!0);w(S,G,V,"⇃","\\downharpoonleft",!0);w(S,E,V,"⊶","\\origof",!0);w(S,E,V,"⊷","\\imageof",!0);w(S,G,V,"⊸","\\multimap",!0);w(S,G,V,"↭","\\leftrightsquigarrow",!0);w(S,G,V,"⇉","\\rightrightarrows",!0);w(S,G,V,"⇄","\\rightleftarrows",!0);w(S,G,V,"↠","\\twoheadrightarrow",!0);w(S,G,V,"↣","\\rightarrowtail",!0);w(S,G,V,"↬","\\looparrowright",!0);w(S,G,V,"↷","\\curvearrowright",!0);w(S,G,V,"↻","\\circlearrowright",!0);w(S,G,V,"↱","\\Rsh",!0);w(S,G,V,"⇊","\\downdownarrows",!0);w(S,G,V,"↾","\\upharpoonright",!0);w(S,G,V,"⇂","\\downharpoonright",!0);w(S,G,V,"⇝","\\rightsquigarrow",!0);w(S,G,V,"⇝","\\leadsto");w(S,G,V,"⇛","\\Rrightarrow",!0);w(S,G,V,"↾","\\restriction");w(S,E,ne,"‘","`");w(S,E,ne,"$","\\$");w(Ce,E,ne,"$","\\$");w(Ce,E,ne,"$","\\textdollar");w(S,E,ne,"%","\\%");w(Ce,E,ne,"%","\\%");w(S,E,ne,"_","\\_");w(Ce,E,ne,"_","\\_");w(Ce,E,ne,"_","\\textunderscore");w(S,E,ne,"∠","\\angle",!0);w(S,E,ne,"∞","\\infty",!0);w(S,E,ne,"′","\\prime");w(S,E,ne,"△","\\triangle");w(S,E,ne,"Γ","\\Gamma",!0);w(S,E,ne,"Δ","\\Delta",!0);w(S,E,ne,"Θ","\\Theta",!0);w(S,E,ne,"Λ","\\Lambda",!0);w(S,E,ne,"Ξ","\\Xi",!0);w(S,E,ne,"Π","\\Pi",!0);w(S,E,ne,"Σ","\\Sigma",!0);w(S,E,ne,"Υ","\\Upsilon",!0);w(S,E,ne,"Φ","\\Phi",!0);w(S,E,ne,"Ψ","\\Psi",!0);w(S,E,ne,"Ω","\\Omega",!0);w(S,E,ne,"A","Α");w(S,E,ne,"B","Β");w(S,E,ne,"E","Ε");w(S,E,ne,"Z","Ζ");w(S,E,ne,"H","Η");w(S,E,ne,"I","Ι");w(S,E,ne,"K","Κ");w(S,E,ne,"M","Μ");w(S,E,ne,"N","Ν");w(S,E,ne,"O","Ο");w(S,E,ne,"P","Ρ");w(S,E,ne,"T","Τ");w(S,E,ne,"X","Χ");w(S,E,ne,"¬","\\neg",!0);w(S,E,ne,"¬","\\lnot");w(S,E,ne,"⊤","\\top");w(S,E,ne,"⊥","\\bot");w(S,E,ne,"∅","\\emptyset");w(S,G,ne,"∅","\\varnothing");w(S,E,it,"α","\\alpha",!0);w(S,E,it,"β","\\beta",!0);w(S,E,it,"γ","\\gamma",!0);w(S,E,it,"δ","\\delta",!0);w(S,E,it,"ϵ","\\epsilon",!0);w(S,E,it,"ζ","\\zeta",!0);w(S,E,it,"η","\\eta",!0);w(S,E,it,"θ","\\theta",!0);w(S,E,it,"ι","\\iota",!0);w(S,E,it,"κ","\\kappa",!0);w(S,E,it,"λ","\\lambda",!0);w(S,E,it,"μ","\\mu",!0);w(S,E,it,"ν","\\nu",!0);w(S,E,it,"ξ","\\xi",!0);w(S,E,it,"ο","\\omicron",!0);w(S,E,it,"π","\\pi",!0);w(S,E,it,"ρ","\\rho",!0);w(S,E,it,"σ","\\sigma",!0);w(S,E,it,"τ","\\tau",!0);w(S,E,it,"υ","\\upsilon",!0);w(S,E,it,"ϕ","\\phi",!0);w(S,E,it,"χ","\\chi",!0);w(S,E,it,"ψ","\\psi",!0);w(S,E,it,"ω","\\omega",!0);w(S,E,it,"ε","\\varepsilon",!0);w(S,E,it,"ϑ","\\vartheta",!0);w(S,E,it,"ϖ","\\varpi",!0);w(S,E,it,"ϱ","\\varrho",!0);w(S,E,it,"ς","\\varsigma",!0);w(S,E,it,"φ","\\varphi",!0);w(S,E,We,"∗","*",!0);w(S,E,We,"+","+");w(S,E,We,"−","-",!0);w(S,E,We,"⋅","\\cdot",!0);w(S,E,We,"∘","\\circ",!0);w(S,E,We,"÷","\\div",!0);w(S,E,We,"±","\\pm",!0);w(S,E,We,"×","\\times",!0);w(S,E,We,"∩","\\cap",!0);w(S,E,We,"∪","\\cup",!0);w(S,E,We,"∖","\\setminus",!0);w(S,E,We,"∧","\\land");w(S,E,We,"∨","\\lor");w(S,E,We,"∧","\\wedge",!0);w(S,E,We,"∨","\\vee",!0);w(S,E,ne,"√","\\surd");w(S,E,ea,"⟨","\\langle",!0);w(S,E,ea,"∣","\\lvert");w(S,E,ea,"∥","\\lVert");w(S,E,mr,"?","?");w(S,E,mr,"!","!");w(S,E,mr,"⟩","\\rangle",!0);w(S,E,mr,"∣","\\rvert");w(S,E,mr,"∥","\\rVert");w(S,E,V,"=","=");w(S,E,V,":",":");w(S,E,V,"≈","\\approx",!0);w(S,E,V,"≅","\\cong",!0);w(S,E,V,"≥","\\ge");w(S,E,V,"≥","\\geq",!0);w(S,E,V,"←","\\gets");w(S,E,V,">","\\gt",!0);w(S,E,V,"∈","\\in",!0);w(S,E,V,"","\\@not");w(S,E,V,"⊂","\\subset",!0);w(S,E,V,"⊃","\\supset",!0);w(S,E,V,"⊆","\\subseteq",!0);w(S,E,V,"⊇","\\supseteq",!0);w(S,G,V,"⊈","\\nsubseteq",!0);w(S,G,V,"⊉","\\nsupseteq",!0);w(S,E,V,"⊨","\\models");w(S,E,V,"←","\\leftarrow",!0);w(S,E,V,"≤","\\le");w(S,E,V,"≤","\\leq",!0);w(S,E,V,"<","\\lt",!0);w(S,E,V,"→","\\rightarrow",!0);w(S,E,V,"→","\\to");w(S,G,V,"≱","\\ngeq",!0);w(S,G,V,"≰","\\nleq",!0);w(S,E,Ji," ","\\ ");w(S,E,Ji," ","\\space");w(S,E,Ji," ","\\nobreakspace");w(Ce,E,Ji," ","\\ ");w(Ce,E,Ji," "," ");w(Ce,E,Ji," ","\\space");w(Ce,E,Ji," ","\\nobreakspace");w(S,E,Ji,"","\\nobreak");w(S,E,Ji,"","\\allowbreak");w(S,E,s0,",",",");w(S,E,s0,";",";");w(S,G,We,"⊼","\\barwedge",!0);w(S,G,We,"⊻","\\veebar",!0);w(S,E,We,"⊙","\\odot",!0);w(S,E,We,"⊕","\\oplus",!0);w(S,E,We,"⊗","\\otimes",!0);w(S,E,ne,"∂","\\partial",!0);w(S,E,We,"⊘","\\oslash",!0);w(S,G,We,"⊚","\\circledcirc",!0);w(S,G,We,"⊡","\\boxdot",!0);w(S,E,We,"△","\\bigtriangleup");w(S,E,We,"▽","\\bigtriangledown");w(S,E,We,"†","\\dagger");w(S,E,We,"⋄","\\diamond");w(S,E,We,"⋆","\\star");w(S,E,We,"◃","\\triangleleft");w(S,E,We,"▹","\\triangleright");w(S,E,ea,"{","\\{");w(Ce,E,ne,"{","\\{");w(Ce,E,ne,"{","\\textbraceleft");w(S,E,mr,"}","\\}");w(Ce,E,ne,"}","\\}");w(Ce,E,ne,"}","\\textbraceright");w(S,E,ea,"{","\\lbrace");w(S,E,mr,"}","\\rbrace");w(S,E,ea,"[","\\lbrack",!0);w(Ce,E,ne,"[","\\lbrack",!0);w(S,E,mr,"]","\\rbrack",!0);w(Ce,E,ne,"]","\\rbrack",!0);w(S,E,ea,"(","\\lparen",!0);w(S,E,mr,")","\\rparen",!0);w(Ce,E,ne,"<","\\textless",!0);w(Ce,E,ne,">","\\textgreater",!0);w(S,E,ea,"⌊","\\lfloor",!0);w(S,E,mr,"⌋","\\rfloor",!0);w(S,E,ea,"⌈","\\lceil",!0);w(S,E,mr,"⌉","\\rceil",!0);w(S,E,ne,"\\","\\backslash");w(S,E,ne,"∣","|");w(S,E,ne,"∣","\\vert");w(Ce,E,ne,"|","\\textbar",!0);w(S,E,ne,"∥","\\|");w(S,E,ne,"∥","\\Vert");w(Ce,E,ne,"∥","\\textbardbl");w(Ce,E,ne,"~","\\textasciitilde");w(Ce,E,ne,"\\","\\textbackslash");w(Ce,E,ne,"^","\\textasciicircum");w(S,E,V,"↑","\\uparrow",!0);w(S,E,V,"⇑","\\Uparrow",!0);w(S,E,V,"↓","\\downarrow",!0);w(S,E,V,"⇓","\\Downarrow",!0);w(S,E,V,"↕","\\updownarrow",!0);w(S,E,V,"⇕","\\Updownarrow",!0);w(S,E,En,"∐","\\coprod");w(S,E,En,"⋁","\\bigvee");w(S,E,En,"⋀","\\bigwedge");w(S,E,En,"⨄","\\biguplus");w(S,E,En,"⋂","\\bigcap");w(S,E,En,"⋃","\\bigcup");w(S,E,En,"∫","\\int");w(S,E,En,"∫","\\intop");w(S,E,En,"∬","\\iint");w(S,E,En,"∭","\\iiint");w(S,E,En,"∏","\\prod");w(S,E,En,"∑","\\sum");w(S,E,En,"⨂","\\bigotimes");w(S,E,En,"⨁","\\bigoplus");w(S,E,En,"⨀","\\bigodot");w(S,E,En,"∮","\\oint");w(S,E,En,"∯","\\oiint");w(S,E,En,"∰","\\oiiint");w(S,E,En,"⨆","\\bigsqcup");w(S,E,En,"∫","\\smallint");w(Ce,E,gu,"…","\\textellipsis");w(S,E,gu,"…","\\mathellipsis");w(Ce,E,gu,"…","\\ldots",!0);w(S,E,gu,"…","\\ldots",!0);w(S,E,gu,"⋯","\\@cdots",!0);w(S,E,gu,"⋱","\\ddots",!0);w(S,E,ne,"⋮","\\varvdots");w(Ce,E,ne,"⋮","\\varvdots");w(S,E,sn,"ˊ","\\acute");w(S,E,sn,"ˋ","\\grave");w(S,E,sn,"¨","\\ddot");w(S,E,sn,"~","\\tilde");w(S,E,sn,"ˉ","\\bar");w(S,E,sn,"˘","\\breve");w(S,E,sn,"ˇ","\\check");w(S,E,sn,"^","\\hat");w(S,E,sn,"⃗","\\vec");w(S,E,sn,"˙","\\dot");w(S,E,sn,"˚","\\mathring");w(S,E,it,"","\\@imath");w(S,E,it,"","\\@jmath");w(S,E,ne,"ı","ı");w(S,E,ne,"ȷ","ȷ");w(Ce,E,ne,"ı","\\i",!0);w(Ce,E,ne,"ȷ","\\j",!0);w(Ce,E,ne,"ß","\\ss",!0);w(Ce,E,ne,"æ","\\ae",!0);w(Ce,E,ne,"œ","\\oe",!0);w(Ce,E,ne,"ø","\\o",!0);w(Ce,E,ne,"Æ","\\AE",!0);w(Ce,E,ne,"Œ","\\OE",!0);w(Ce,E,ne,"Ø","\\O",!0);w(Ce,E,sn,"ˊ","\\'");w(Ce,E,sn,"ˋ","\\`");w(Ce,E,sn,"ˆ","\\^");w(Ce,E,sn,"˜","\\~");w(Ce,E,sn,"ˉ","\\=");w(Ce,E,sn,"˘","\\u");w(Ce,E,sn,"˙","\\.");w(Ce,E,sn,"¸","\\c");w(Ce,E,sn,"˚","\\r");w(Ce,E,sn,"ˇ","\\v");w(Ce,E,sn,"¨",'\\"');w(Ce,E,sn,"˝","\\H");w(Ce,E,sn,"◯","\\textcircled");var n6={"--":!0,"---":!0,"``":!0,"''":!0};w(Ce,E,ne,"–","--",!0);w(Ce,E,ne,"–","\\textendash");w(Ce,E,ne,"—","---",!0);w(Ce,E,ne,"—","\\textemdash");w(Ce,E,ne,"‘","`",!0);w(Ce,E,ne,"‘","\\textquoteleft");w(Ce,E,ne,"’","'",!0);w(Ce,E,ne,"’","\\textquoteright");w(Ce,E,ne,"“","``",!0);w(Ce,E,ne,"“","\\textquotedblleft");w(Ce,E,ne,"”","''",!0);w(Ce,E,ne,"”","\\textquotedblright");w(S,E,ne,"°","\\degree",!0);w(Ce,E,ne,"°","\\degree");w(Ce,E,ne,"°","\\textdegree",!0);w(S,E,ne,"£","\\pounds");w(S,E,ne,"£","\\mathsterling",!0);w(Ce,E,ne,"£","\\pounds");w(Ce,E,ne,"£","\\textsterling",!0);w(S,G,ne,"✠","\\maltese");w(Ce,G,ne,"✠","\\maltese");var W2='0123456789/@."';for(var Um=0;Um<W2.length;Um++){var K2=W2.charAt(Um);w(S,E,ne,K2,K2)}var X2='0123456789!@*()-=+";:?/.,';for(var Hm=0;Hm<X2.length;Hm++){var Z2=X2.charAt(Hm);w(Ce,E,ne,Z2,Z2)}var cf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var $m=0;$m<cf.length;$m++){var Ed=cf.charAt($m);w(S,E,it,Ed,Ed),w(Ce,E,ne,Ed,Ed)}w(S,G,ne,"C","ℂ");w(Ce,G,ne,"C","ℂ");w(S,G,ne,"H","ℍ");w(Ce,G,ne,"H","ℍ");w(S,G,ne,"N","ℕ");w(Ce,G,ne,"N","ℕ");w(S,G,ne,"P","ℙ");w(Ce,G,ne,"P","ℙ");w(S,G,ne,"Q","ℚ");w(Ce,G,ne,"Q","ℚ");w(S,G,ne,"R","ℝ");w(Ce,G,ne,"R","ℝ");w(S,G,ne,"Z","ℤ");w(Ce,G,ne,"Z","ℤ");w(S,E,it,"h","ℎ");w(Ce,E,it,"h","ℎ");var ct;for(var cr=0;cr<cf.length;cr++){var mn=cf.charAt(cr);ct=String.fromCharCode(55349,56320+cr),w(S,E,it,mn,ct),w(Ce,E,ne,mn,ct),ct=String.fromCharCode(55349,56372+cr),w(S,E,it,mn,ct),w(Ce,E,ne,mn,ct),ct=String.fromCharCode(55349,56424+cr),w(S,E,it,mn,ct),w(Ce,E,ne,mn,ct),ct=String.fromCharCode(55349,56580+cr),w(S,E,it,mn,ct),w(Ce,E,ne,mn,ct),ct=String.fromCharCode(55349,56684+cr),w(S,E,it,mn,ct),w(Ce,E,ne,mn,ct),ct=String.fromCharCode(55349,56736+cr),w(S,E,it,mn,ct),w(Ce,E,ne,mn,ct),ct=String.fromCharCode(55349,56788+cr),w(S,E,it,mn,ct),w(Ce,E,ne,mn,ct),ct=String.fromCharCode(55349,56840+cr),w(S,E,it,mn,ct),w(Ce,E,ne,mn,ct),ct=String.fromCharCode(55349,56944+cr),w(S,E,it,mn,ct),w(Ce,E,ne,mn,ct),cr<26&&(ct=String.fromCharCode(55349,56632+cr),w(S,E,it,mn,ct),w(Ce,E,ne,mn,ct),ct=String.fromCharCode(55349,56476+cr),w(S,E,it,mn,ct),w(Ce,E,ne,mn,ct))}ct="𝕜";w(S,E,it,"k",ct);w(Ce,E,ne,"k",ct);for(var Ls=0;Ls<10;Ls++){var Gl=Ls.toString();ct=String.fromCharCode(55349,57294+Ls),w(S,E,it,Gl,ct),w(Ce,E,ne,Gl,ct),ct=String.fromCharCode(55349,57314+Ls),w(S,E,it,Gl,ct),w(Ce,E,ne,Gl,ct),ct=String.fromCharCode(55349,57324+Ls),w(S,E,it,Gl,ct),w(Ce,E,ne,Gl,ct),ct=String.fromCharCode(55349,57334+Ls),w(S,E,it,Gl,ct),w(Ce,E,ne,Gl,ct)}var Dp="ÐÞþ";for(var Fm=0;Fm<Dp.length;Fm++){var Nd=Dp.charAt(Fm);w(S,E,it,Nd,Nd),w(Ce,E,ne,Nd,Nd)}var zp={mathClass:"mathbf",textClass:"textbf",font:"Main-Bold"},Q2={mathClass:"mathnormal",textClass:"textit",font:"Math-Italic"},J2={mathClass:"boldsymbol",textClass:"boldsymbol",font:"Main-BoldItalic"},QC={mathClass:"mathscr",textClass:"textscr",font:"Script-Regular"},Hs={mathClass:"",textClass:"",font:""},e3={mathClass:"mathfrak",textClass:"textfrak",font:"Fraktur-Regular"},t3={mathClass:"mathbb",textClass:"textbb",font:"AMS-Regular"},n3={mathClass:"mathboldfrak",textClass:"textboldfrak",font:"Fraktur-Regular"},Rp={mathClass:"mathsf",textClass:"textsf",font:"SansSerif-Regular"},Op={mathClass:"mathboldsf",textClass:"textboldsf",font:"SansSerif-Bold"},r3={mathClass:"mathitsf",textClass:"textitsf",font:"SansSerif-Italic"},Ip={mathClass:"mathtt",textClass:"texttt",font:"Typewriter-Regular"},a3=[zp,zp,Q2,Q2,J2,J2,QC,Hs,Hs,Hs,e3,e3,t3,t3,n3,n3,Rp,Rp,Op,Op,r3,r3,Hs,Hs,Ip,Ip],JC=[zp,Hs,Rp,Op,Ip],eT=e=>{var t=e.charCodeAt(0),n=e.charCodeAt(1),a=(t-55296)*1024+(n-56320)+65536;if(119808<=a&&a<120484){var l=Math.floor((a-119808)/26);return a3[l]}else if(120782<=a&&a<=120831){var u=Math.floor((a-120782)/10);return JC[u]}else{if(a===120485||a===120486)return a3[0];if(120486<a&&a<120782)return Hs;throw new ze("Unsupported character: "+e)}},jf=function(t,n,a){if(ln[a][t]){var l=ln[a][t].replace;l&&(t=l)}return{value:t,metrics:D1(t,n,a)}},dr=function(t,n,a,l,u){var c=jf(t,n,a),f=c.metrics;t=c.value;var h;if(f){var m=f.italic;(a==="text"||l&&l.font==="mathit")&&(m=0),h=new Jr(t,f.height,f.depth,m,f.skew,f.width,u)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+t+"' in style '"+n+"' and mode '"+a+"'")),h=new Jr(t,0,0,0,0,0,u);if(l){h.maxFontSize=l.sizeMultiplier,l.style.isTight()&&h.classes.push("mtight");var g=l.getColor();g&&(h.style.color=g)}return h},z1=function(t,n,a,l){return l===void 0&&(l=[]),a.font==="boldsymbol"&&jf(t,"Main-Bold",n).metrics?dr(t,"Main-Bold",n,a,l.concat(["mathbf"])):t==="\\"||ln[n][t].font==="main"?dr(t,"Main-Regular",n,a,l):dr(t,"AMS-Regular",n,a,l.concat(["amsrm"]))},tT=function(t,n,a){return a!=="textord"&&jf(t,"Math-BoldItalic",n).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},Cf=function(t,n,a){var l=t.mode,u=t.text,c=["mord"],{font:f,fontFamily:h,fontWeight:m,fontShape:g}=n,y=l==="math"||l==="text"&&!!f,k=y?f:h,x="",C="";if(u.charCodeAt(0)===55349){var D=eT(u);x=D.font,C=D[l+"Class"]}if(x)return dr(u,x,l,n,c.concat(C));if(k){var R,O;if(k==="boldsymbol"){var M=tT(u,l,a);R=M.fontName,O=[M.fontClass]}else y?(R=_p[f].fontName,O=[f]):(R=Md(h,m,g),O=[h,m,g]);if(jf(u,R,l).metrics)return dr(u,R,l,n,c.concat(O));if(n6.hasOwnProperty(u)&&R.slice(0,10)==="Typewriter"){for(var q=[],L=0;L<u.length;L++)q.push(dr(u[L],R,l,n,c.concat(O)));return el(q)}}if(a==="mathord")return dr(u,"Math-Italic",l,n,c.concat(["mathnormal"]));if(a==="textord"){var K=ln[l][u]&&ln[l][u].font;if(K==="ams"){var P=Md("amsrm",m,g);return dr(u,P,l,n,c.concat("amsrm",m,g))}else if(K==="main"||!K){var H=Md("textrm",m,g);return dr(u,H,l,n,c.concat(m,g))}else{var X=Md(K,m,g);return dr(u,X,l,n,c.concat(X,m,g))}}else throw new Error("unexpected type: "+a+" in makeOrd")},nT=(e,t)=>{if(Kl(e.classes)!==Kl(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 l of Object.keys(t.style))if(e.style[l]!==t.style[l])return!1;return!0},r6=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],a=e[t+1];n instanceof Jr&&a instanceof Jr&&nT(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},R1=function(t){for(var n=0,a=0,l=0,u=0;u<t.children.length;u++){var c=t.children[u];c.height>n&&(n=c.height),c.depth>a&&(a=c.depth),c.maxFontSize>l&&(l=c.maxFontSize)}t.height=n,t.depth=a,t.maxFontSize=l},Me=function(t,n,a,l){var u=new pu(t,n,a,l);return R1(u),u},Zl=(e,t,n,a)=>new pu(e,t,n,a),uu=function(t,n,a){var l=Me([t],[],n);return l.height=Math.max(a||n.fontMetrics().defaultRuleThickness,n.minRuleThickness),l.style.borderBottomWidth=Ue(l.height),l.maxFontSize=1,l},rT=function(t,n,a,l){var u=new Sf(t,n,a,l);return R1(u),u},el=function(t){var n=new mu(t);return R1(n),n},cu=function(t,n){return t instanceof mu?Me([],[t],n):t},aT=function(t){if(t.positionType==="individualShift"){for(var n=t.children,a=[n[0]],l=-n[0].shift-n[0].elem.depth,u=l,c=1;c<n.length;c++){var f=-n[c].shift-u-n[c].elem.depth,h=f-(n[c-1].elem.height+n[c-1].elem.depth);u=u+f,a.push({type:"kern",size:h}),a.push(n[c])}return{children:a,depth:l}}var m;if(t.positionType==="top"){for(var g=t.positionData,y=0;y<t.children.length;y++){var k=t.children[y];g-=k.type==="kern"?k.size:k.elem.height+k.elem.depth}m=g}else if(t.positionType==="bottom")m=-t.positionData;else{var x=t.children[0];if(x.type!=="elem")throw new Error('First child must have type "elem".');if(t.positionType==="shift")m=-x.elem.depth-t.positionData;else if(t.positionType==="firstBaseline")m=-x.elem.depth;else throw new Error("Invalid positionType "+t.positionType+".")}return{children:t.children,depth:m}},It=function(t,n){for(var{children:a,depth:l}=aT(t),u=0,c=0;c<a.length;c++){var f=a[c];if(f.type==="elem"){var h=f.elem;u=Math.max(u,h.maxFontSize,h.height)}}u+=2;var m=Me(["pstrut"],[]);m.style.height=Ue(u);for(var g=[],y=l,k=l,x=l,C=0;C<a.length;C++){var D=a[C];if(D.type==="kern")x+=D.size;else{var R=D.elem,O=D.wrapperClasses||[],M=D.wrapperStyle||{},q=Me(O,[m,R],void 0,M);q.style.top=Ue(-u-x-R.depth),D.marginLeft&&(q.style.marginLeft=D.marginLeft),D.marginRight&&(q.style.marginRight=D.marginRight),g.push(q),x+=R.height+R.depth}y=Math.min(y,x),k=Math.max(k,x)}var L=Me(["vlist"],g);L.style.height=Ue(k);var K;if(y<0){var P=Me([],[]),H=Me(["vlist"],[P]);H.style.height=Ue(-y);var X=Me(["vlist-s"],[new Jr("​")]);K=[Me(["vlist-r"],[L,X]),Me(["vlist-r"],[H])]}else K=[Me(["vlist-r"],[L])];var J=Me(["vlist-t"],K);return K.length===2&&J.classes.push("vlist-t2"),J.height=k,J.depth=-y,J},a6=(e,t)=>{var n=Me(["mspace"],[],t),a=un(e,t);return n.style.marginRight=Ue(a),n},Md=(e,t,n)=>{var a,l;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"?l="BoldItalic":t==="textbf"?l="Bold":n==="textit"?l="Italic":l="Regular",a+"-"+l},_p={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"}},i6={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},l6=function(t,n){var[a,l,u]=i6[t],c=new Xl(a),f=new Xi([c],{width:Ue(l),height:Ue(u),style:"width:"+Ue(l),viewBox:"0 0 "+1e3*l+" "+1e3*u,preserveAspectRatio:"xMinYMin"}),h=Zl(["overlay"],[f],n);return h.height=u,h.style.height=Ue(u),h.style.width=Ue(l),h},on={number:3,unit:"mu"},Bs={number:4,unit:"mu"},Gi={number:5,unit:"mu"},iT={mord:{mop:on,mbin:Bs,mrel:Gi,minner:on},mop:{mord:on,mop:on,mrel:Gi,minner:on},mbin:{mord:Bs,mop:Bs,mopen:Bs,minner:Bs},mrel:{mord:Gi,mop:Gi,mopen:Gi,minner:Gi},mopen:{},mclose:{mop:on,mbin:Bs,mrel:Gi,minner:on},mpunct:{mord:on,mop:on,mrel:Gi,mopen:on,mclose:on,mpunct:on,minner:on},minner:{mord:on,mop:on,mbin:Bs,mrel:Gi,mopen:on,mpunct:on,minner:on}},lT={mord:{mop:on},mop:{mord:on,mop:on},mbin:{},mrel:{},mopen:{},mclose:{mop:on},mpunct:{},minner:{mop:on}},s6={},df={},ff={};function Ye(e){for(var{type:t,names:n,props:a,handler:l,htmlBuilder:u,mathmlBuilder:c}=e,f={type:t,numArgs:a.numArgs,argTypes:a.argTypes,allowedInArgument:!!a.allowedInArgument,allowedInText:!!a.allowedInText,allowedInMath:a.allowedInMath===void 0?!0:a.allowedInMath,numOptionalArgs:a.numOptionalArgs||0,infix:!!a.infix,primitive:!!a.primitive,handler:l},h=0;h<n.length;++h)s6[n[h]]=f;t&&(u&&(df[t]=u),c&&(ff[t]=c))}function Qs(e){var{type:t,htmlBuilder:n,mathmlBuilder:a}=e;Ye({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:n,mathmlBuilder:a})}var hf=function(t){return t.type==="ordgroup"&&t.body.length===1?t.body[0]:t},Tn=function(t){return t.type==="ordgroup"?t.body:[t]},sT=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),oT=new Set(["rightmost","mrel","mclose","mpunct"]),uT={display:ht.DISPLAY,text:ht.TEXT,script:ht.SCRIPT,scriptscript:ht.SCRIPTSCRIPT},cT={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},_n=function(t,n,a,l){l===void 0&&(l=[null,null]);for(var u=[],c=0;c<t.length;c++){var f=_t(t[c],n);if(f instanceof mu){var h=f.children;u.push(...h)}else u.push(f)}if(r6(u),!a)return u;var m=n;if(t.length===1){var g=t[0];g.type==="sizing"?m=n.havingSize(g.size):g.type==="styling"&&(m=n.havingStyle(uT[g.style]))}var y=Me([l[0]||"leftmost"],[],n),k=Me([l[1]||"rightmost"],[],n),x=a==="root";return Lp(u,(C,D)=>{var R=D.classes[0],O=C.classes[0];R==="mbin"&&oT.has(O)?D.classes[0]="mord":O==="mbin"&&sT.has(R)&&(C.classes[0]="mord")},{node:y},k,x),Lp(u,(C,D)=>{var R,O,M=qp(D),q=qp(C),L=M&&q?C.hasClass("mtight")?(R=lT[M])==null?void 0:R[q]:(O=iT[M])==null?void 0:O[q]:null;if(L)return a6(L,m)},{node:y},k,x),u},Lp=function(t,n,a,l,u){l&&t.push(l);for(var c=0;c<t.length;c++){var f=t[c],h=o6(f);if(h){Lp(h.children,n,a,null,u);continue}var m=!f.hasClass("mspace");if(m){var g=n(f,a.node);g&&(a.insertAfter?a.insertAfter(g):(t.unshift(g),c++))}m?a.node=f:u&&f.hasClass("newline")&&(a.node=Me(["leftmost"])),a.insertAfter=(y=>k=>{t.splice(y+1,0,k),c++})(c)}l&&t.pop()},o6=function(t){return t instanceof mu||t instanceof Sf||t instanceof pu&&t.hasClass("enclosing")?t:null},Bp=function(t,n){var a=o6(t);if(a){var l=a.children;if(l.length){if(n==="right")return Bp(l[l.length-1],"right");if(n==="left")return Bp(l[0],"left")}}return t},qp=function(t,n){if(!t)return null;n&&(t=Bp(t,n));var a=t.classes[0];return cT[a]||null},Jc=function(t,n){var a=["nulldelimiter"].concat(t.baseSizingClasses());return Me(n.concat(a))},_t=function(t,n,a){if(!t)return Me();if(df[t.type]){var l=df[t.type](t,n);if(a&&n.size!==a.size){l=Me(n.sizingClasses(a),[l],n);var u=n.sizeMultiplier/a.sizeMultiplier;l.height*=u,l.depth*=u}return l}else throw new ze("Got group of unknown type: '"+t.type+"'")};function Dd(e,t){var n=Me(["base"],e,t),a=Me(["strut"]);return a.style.height=Ue(n.height+n.depth),n.depth&&(a.style.verticalAlign=Ue(-n.depth)),n.children.unshift(a),n}function Up(e,t){var n=null;e.length===1&&e[0].type==="tag"&&(n=e[0].tag,e=e[0].body);var a=_n(e,t,"root"),l;a.length===2&&a[1].hasClass("tag")&&(l=a.pop());for(var u=[],c=[],f=0;f<a.length;f++)if(c.push(a[f]),a[f].hasClass("mbin")||a[f].hasClass("mrel")||a[f].hasClass("allowbreak")){for(var h=!1;f<a.length-1&&a[f+1].hasClass("mspace")&&!a[f+1].hasClass("newline");)f++,c.push(a[f]),a[f].hasClass("nobreak")&&(h=!0);h||(u.push(Dd(c,t)),c=[])}else a[f].hasClass("newline")&&(c.pop(),c.length>0&&(u.push(Dd(c,t)),c=[]),u.push(a[f]));c.length>0&&u.push(Dd(c,t));var m;n?(m=Dd(_n(n,t,!0),t),m.classes=["tag"],u.push(m)):l&&u.push(l);var g=Me(["katex-html"],u);if(g.setAttribute("aria-hidden","true"),m){var y=m.children[0];y.style.height=Ue(g.height+g.depth),g.depth&&(y.style.verticalAlign=Ue(-g.depth))}return g}function u6(e){return new mu(e)}class _e{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=Kl(this.classes));for(var a=0;a<this.children.length;a++)if(this.children[a]instanceof An&&this.children[a+1]instanceof An){for(var l=this.children[a].toText()+this.children[++a].toText();this.children[a+1]instanceof An;)l+=this.children[++a].toText();t.appendChild(new An(l).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+=Zn(this.attributes[n]),t+='"');this.classes.length>0&&(t+=' class ="'+Zn(Kl(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 An{constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return Zn(this.toText())}toText(){return this.text}}class c6{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",Ue(this.width)),t}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+Ue(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var dT=new Set(["\\imath","\\jmath"]),fT=new Set(["mrow","mtable"]),ba=function(t,n,a){return ln[n][t]&&ln[n][t].replace&&t.charCodeAt(0)!==55349&&!(n6.hasOwnProperty(t)&&a&&(a.fontFamily&&a.fontFamily.slice(4,6)==="tt"||a.font&&a.font.slice(4,6)==="tt"))&&(t=ln[n][t].replace),new An(t)},O1=function(t){return t.length===1?t[0]:new _e("mrow",t)},hT={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"},I1=(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,l=hT[n];if(l)return typeof l=="function"?l(e):l;var u=e.text;if(dT.has(u))return null;if(ln[a][u]){var c=ln[a][u].replace;c&&(u=c)}var f=_p[n].fontName;return D1(u,f,a)?_p[n].variant:null};function Pm(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof An&&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 An&&n.text===","}else return!1}var ta=function(t,n,a){if(t.length===1){var l=Wt(t[0],n);return a&&l instanceof _e&&l.type==="mo"&&(l.setAttribute("lspace","0em"),l.setAttribute("rspace","0em")),[l]}for(var u=[],c,f=0;f<t.length;f++){var h=Wt(t[f],n);if(h instanceof _e&&c instanceof _e){if(h.type==="mtext"&&c.type==="mtext"&&h.getAttribute("mathvariant")===c.getAttribute("mathvariant")){c.children.push(...h.children);continue}else if(h.type==="mn"&&c.type==="mn"){c.children.push(...h.children);continue}else if(Pm(h)&&c.type==="mn"){c.children.push(...h.children);continue}else if(h.type==="mn"&&Pm(c))h.children=[...c.children,...h.children],u.pop();else if((h.type==="msup"||h.type==="msub")&&h.children.length>=1&&(c.type==="mn"||Pm(c))){var m=h.children[0];m instanceof _e&&m.type==="mn"&&(m.children=[...c.children,...m.children],u.pop())}else if(c.type==="mi"&&c.children.length===1){var g=c.children[0];if(g instanceof An&&g.text==="̸"&&(h.type==="mo"||h.type==="mi"||h.type==="mn")){var y=h.children[0];y instanceof An&&y.text.length>0&&(y.text=y.text.slice(0,1)+"̸"+y.text.slice(1),u.pop())}}}u.push(h),c=h}return u},Ql=function(t,n,a){return O1(ta(t,n,a))},Wt=function(t,n){if(!t)return new _e("mrow");if(ff[t.type])return ff[t.type](t,n);throw new ze("Got group of unknown type: '"+t.type+"'")};function i3(e,t,n,a,l){var u=ta(e,n),c;u.length===1&&u[0]instanceof _e&&fT.has(u[0].type)?c=u[0]:c=new _e("mrow",u);var f=new _e("annotation",[new An(t)]);f.setAttribute("encoding","application/x-tex");var h=new _e("semantics",[c,f]),m=new _e("math",[h]);m.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),a&&m.setAttribute("display","block");var g=l?"katex":"katex-mathml";return Me([g],[m])}var mT=[[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]],l3=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],s3=function(t,n){return n.size<2?t:mT[t-1][n.size-1]};class Vi{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||Vi.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=l3[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 Vi(n)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:s3(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:l3[t-1]})}havingBaseStyle(t){t=t||this.style.text();var n=s3(Vi.BASESIZE,t);return this.size===n&&this.textSize===Vi.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!==Vi.BASESIZE?["sizing","reset-size"+this.size,"size"+Vi.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=ZC(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Vi.BASESIZE=6;var d6=function(t){return new Vi({style:t.displayMode?ht.DISPLAY:ht.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},f6=function(t,n){if(n.displayMode){var a=["katex-display"];n.leqno&&a.push("leqno"),n.fleqn&&a.push("fleqn"),t=Me(a,[t])}return t},pT=function(t,n,a){var l=d6(a),u;if(a.output==="mathml")return i3(t,n,l,a.displayMode,!0);if(a.output==="html"){var c=Up(t,l);u=Me(["katex"],[c])}else{var f=i3(t,n,l,a.displayMode,!1),h=Up(t,l);u=Me(["katex"],[f,h])}return f6(u,a)},gT=function(t,n,a){var l=d6(a),u=Up(t,l),c=Me(["katex"],[u]);return f6(c,a)},yT={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":"="},Tf=function(t){var n=new _e("mo",[new An(yT[t.replace(/^\\/,"")])]);return n.setAttribute("stretchy","true"),n},vT={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]},xT=new Set(["widehat","widecheck","widetilde","utilde"]),Af=function(t,n){function a(){var f=4e5,h=t.label.slice(1);if(xT.has(h)&&"base"in t){var m=t.base.type==="ordgroup"?t.base.body.length:1,g,y,k;if(m>5)h==="widehat"||h==="widecheck"?(g=420,f=2364,k=.42,y=h+"4"):(g=312,f=2340,k=.34,y="tilde4");else{var x=[1,1,2,2,3,3][m];h==="widehat"||h==="widecheck"?(f=[0,1062,2364,2364,2364][x],g=[0,239,300,360,420][x],k=[0,.24,.3,.3,.36,.42][x],y=h+x):(f=[0,600,1033,2339,2340][x],g=[0,260,286,306,312][x],k=[0,.26,.286,.3,.306,.34][x],y="tilde"+x)}var C=new Xl(y),D=new Xi([C],{width:"100%",height:Ue(k),viewBox:"0 0 "+f+" "+g,preserveAspectRatio:"none"});return{span:Zl([],[D],n),minWidth:0,height:k}}else{var R=[],O=vT[h];if(!O)throw new Error('No SVG data for "'+h+'".');var[M,q,L]=O,K=L/1e3,P=M.length,H,X;if(P===1){if(O.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+h+'".');H=["hide-tail"],X=[O[3]]}else if(P===2)H=["halfarrow-left","halfarrow-right"],X=["xMinYMin","xMaxYMin"];else if(P===3)H=["brace-left","brace-center","brace-right"],X=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
333
- `+P+" children.");for(var J=0;J<P;J++){var F=new Xl(M[J]),he=new Xi([F],{width:"400em",height:Ue(K),viewBox:"0 0 "+f+" "+L,preserveAspectRatio:X[J]+" slice"}),me=Zl([H[J]],[he],n);if(P===1)return{span:me,minWidth:q,height:K};me.style.height=Ue(K),R.push(me)}return{span:Me(["stretchy"],R,n),minWidth:q,height:K}}}var{span:l,minWidth:u,height:c}=a();return l.height=c,l.style.height=Ue(c),u>0&&(l.style.minWidth=Ue(u)),l},bT=function(t,n,a,l,u){var c,f=t.height+t.depth+a+l;if(/fbox|color|angl/.test(n)){if(c=Me(["stretchy",n],[],u),n==="fbox"){var h=u.color&&u.getColor();h&&(c.style.borderColor=h)}}else{var m=[];/^[bx]cancel$/.test(n)&&m.push(new Mp({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(n)&&m.push(new Mp({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var g=new Xi(m,{width:"100%",height:Ue(f)});c=Zl([],[g],u)}return c.height=f,c.style.height=Ue(f),c},wT={bin:1,close:1,inner:1,open:1,punct:1,rel:1},kT={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function ST(e){return e in wT}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 Ef(e){var t=Nf(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 Nf(e){return e&&(e.type==="atom"||kT.hasOwnProperty(e.type))?e:null}var h6=e=>{if(e instanceof Jr)return e;if(XC(e)&&e.children.length===1)return h6(e.children[0])},_1=(e,t)=>{var n,a,l;e&&e.type==="supsub"?(a=vt(e.base,"accent"),n=a.base,e.base=n,l=KC(_t(e,t)),e.base=a):(a=vt(e,"accent"),n=a.base);var u=_t(n,t.havingCrampedStyle()),c=a.isShifty&&Qi(n),f=0;if(c){var h,m;f=(h=(m=h6(u))==null?void 0:m.skew)!=null?h:0}var g=a.label==="\\c",y=g?u.height+u.depth:Math.min(u.height,t.fontMetrics().xHeight),k;if(a.isStretchy)k=Af(a,t),k=It({positionType:"firstBaseline",children:[{type:"elem",elem:u},{type:"elem",elem:k,wrapperClasses:["svg-align"],wrapperStyle:f>0?{width:"calc(100% - "+Ue(2*f)+")",marginLeft:Ue(2*f)}:void 0}]});else{var x,C;a.label==="\\vec"?(x=l6("vec",t),C=i6.vec[1]):(x=Cf({mode:a.mode,text:a.label},t,"textord"),x=WC(x),x.italic=0,C=x.width,g&&(y+=x.depth)),k=Me(["accent-body"],[x]);var D=a.label==="\\textcircled";D&&(k.classes.push("accent-full"),y=u.height);var R=f;D||(R-=C/2),k.style.left=Ue(R),a.label==="\\textcircled"&&(k.style.top=".2em"),k=It({positionType:"firstBaseline",children:[{type:"elem",elem:u},{type:"kern",size:-y},{type:"elem",elem:k}]})}var O=Me(["mord","accent"],[k],t);return l?(l.children[0]=O,l.height=Math.max(O.height,l.height),l.classes[0]="mord",l):O},m6=(e,t)=>{var n=e.isStretchy?Tf(e.label):new _e("mo",[ba(e.label,e.mode)]),a=new _e("mover",[Wt(e.base,t),n]);return a.setAttribute("accent","true"),a},jT=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));Ye({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=hf(t[0]),a=!jT.test(e.funcName),l=!a||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:a,isShifty:l,base:n}},htmlBuilder:_1,mathmlBuilder:m6});Ye({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:_1,mathmlBuilder:m6});Ye({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:a}=e,l=t[0];return{type:"accentUnder",mode:n.mode,label:a,base:l}},htmlBuilder:(e,t)=>{var n=_t(e.base,t),a=Af(e,t),l=e.label==="\\utilde"?.12:0,u=It({positionType:"top",positionData:n.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:l},{type:"elem",elem:n}]});return Me(["mord","accentunder"],[u],t)},mathmlBuilder:(e,t)=>{var n=Tf(e.label),a=new _e("munder",[Wt(e.base,t),n]);return a.setAttribute("accentunder","true"),a}});var zd=e=>{var t=new _e("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};Ye({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:l}=e;return{type:"xArrow",mode:a.mode,label:l,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,a=t.havingStyle(n.sup()),l=cu(_t(e.body,a,t),t),u=e.label.slice(0,2)==="\\x"?"x":"cd";l.classes.push(u+"-arrow-pad");var c;e.below&&(a=t.havingStyle(n.sub()),c=cu(_t(e.below,a,t),t),c.classes.push(u+"-arrow-pad"));var f=Af(e,t),h=-t.fontMetrics().axisHeight+.5*f.height,m=-t.fontMetrics().axisHeight-.5*f.height-.111;(l.depth>.25||e.label==="\\xleftequilibrium")&&(m-=l.depth);var g;if(c){var y=-t.fontMetrics().axisHeight+c.height+.5*f.height+.111;g=It({positionType:"individualShift",children:[{type:"elem",elem:l,shift:m},{type:"elem",elem:f,shift:h,wrapperClasses:["svg-align"]},{type:"elem",elem:c,shift:y}]})}else g=It({positionType:"individualShift",children:[{type:"elem",elem:l,shift:m},{type:"elem",elem:f,shift:h,wrapperClasses:["svg-align"]}]});return Me(["mrel","x-arrow"],[g],t)},mathmlBuilder(e,t){var n=Tf(e.label);n.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var a;if(e.body){var l=zd(Wt(e.body,t));if(e.below){var u=zd(Wt(e.below,t));a=new _e("munderover",[n,u,l])}else a=new _e("mover",[n,l])}else if(e.below){var c=zd(Wt(e.below,t));a=new _e("munder",[n,c])}else a=zd(),a=new _e("mover",[n,a]);return a}});function p6(e,t){var n=_n(e.body,t,!0);return Me([e.mclass],n,t)}function g6(e,t){var n,a=ta(e.body,t);return e.mclass==="minner"?n=new _e("mpadded",a):e.mclass==="mord"?e.isCharacterBox?(n=a[0],n.type="mi"):n=new _e("mi",a):(e.isCharacterBox?(n=a[0],n.type="mo"):n=new _e("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}Ye({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:a}=e,l=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+a.slice(5),body:Tn(l),isCharacterBox:Qi(l)}},htmlBuilder:p6,mathmlBuilder:g6});var Mf=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"};Ye({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:Mf(t[0]),body:Tn(t[1]),isCharacterBox:Qi(t[1])}}});Ye({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:n,funcName:a}=e,l=t[1],u=t[0],c;a!=="\\stackrel"?c=Mf(l):c="mrel";var f={type:"op",mode:l.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:a!=="\\stackrel",body:Tn(l)},h={type:"supsub",mode:u.mode,base:f,sup:a==="\\underset"?null:u,sub:a==="\\underset"?u:null};return{type:"mclass",mode:n.mode,mclass:c,body:[h],isCharacterBox:Qi(h)}},htmlBuilder:p6,mathmlBuilder:g6});Ye({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:Mf(t[0]),body:Tn(t[0])}},htmlBuilder(e,t){var n=_n(e.body,t,!0),a=Me([e.mclass],n,t);return a.style.textShadow="0.02em 0.01em 0.04px",a},mathmlBuilder(e,t){var n=ta(e.body,t),a=new _e("mstyle",n);return a.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),a}});var CT={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},o3=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),u3=e=>e.type==="textord"&&e.text==="@",TT=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function AT(e,t,n){var a=CT[e];switch(a){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(a,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var l=n.callFunction("\\\\cdleft",[t[0]],[]),u={type:"atom",text:a,mode:"math",family:"rel"},c=n.callFunction("\\Big",[u],[]),f=n.callFunction("\\\\cdright",[t[1]],[]),h={type:"ordgroup",mode:"math",body:[l,c,f]};return n.callFunction("\\\\cdparent",[h],[])}case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var m={type:"textord",text:"\\Vert",mode:"math"};return n.callFunction("\\Big",[m],[])}default:return{type:"textord",text:" ",mode:"math"}}}function ET(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 ze("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var a=[],l=[a],u=0;u<t.length;u++){for(var c=t[u],f=o3(),h=0;h<c.length;h++)if(!u3(c[h]))f.body.push(c[h]);else{a.push(f),h+=1;var m=Ef(c[h]).text,g=new Array(2);if(g[0]={type:"ordgroup",mode:"math",body:[]},g[1]={type:"ordgroup",mode:"math",body:[]},!"=|.".includes(m))if("<>AV".includes(m))for(var y=0;y<2;y++){for(var k=!0,x=h+1;x<c.length;x++){if(TT(c[x],m)){k=!1,h=x;break}if(u3(c[x]))throw new ze("Missing a "+m+" character to complete a CD arrow.",c[x]);g[y].body.push(c[x])}if(k)throw new ze("Missing a "+m+" character to complete a CD arrow.",c[h])}else throw new ze('Expected one of "<>AV=|." after @',c[h]);var C=AT(m,g,e),D={type:"styling",body:[C],mode:"math",style:"display",resetFont:!0};a.push(D),f=o3()}u%2===0?a.push(f):a.shift(),a=[],l.push(a)}e.gullet.endGroup(),e.gullet.endGroup();var R=new Array(l[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:l,arraystretch:1,addJot:!0,rowGaps:[null],cols:R,colSeparationType:"CD",hLinesBeforeRow:new Array(l.length+1).fill([])}}Ye({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=cu(_t(e.label,n,t),t);return a.classes.push("cd-label-"+e.side),a.style.bottom=Ue(.8-a.depth),a.height=0,a.depth=0,a},mathmlBuilder(e,t){var n=new _e("mrow",[Wt(e.label,t)]);return n=new _e("mpadded",[n]),n.setAttribute("width","0"),e.side==="left"&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),n=new _e("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});Ye({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=cu(_t(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(e,t){return new _e("mrow",[Wt(e.fragment,t)])}});Ye({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,a=vt(t[0],"ordgroup"),l=a.body,u="",c=0;c<l.length;c++){var f=vt(l[c],"textord");u+=f.text}var h=parseInt(u),m;if(isNaN(h))throw new ze("\\@char has non-numeric argument "+u);if(h<0||h>=1114111)throw new ze("\\@char with invalid code point "+u);return h<=65535?m=String.fromCharCode(h):(h-=65536,m=String.fromCharCode((h>>10)+55296,(h&1023)+56320)),{type:"textord",mode:n.mode,text:m}}});var y6=(e,t)=>{var n=_n(e.body,t.withColor(e.color),!1);return el(n)},v6=(e,t)=>{var n=ta(e.body,t.withColor(e.color)),a=new _e("mstyle",n);return a.setAttribute("mathcolor",e.color),a};Ye({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,l=t[1];return{type:"color",mode:n.mode,color:a,body:Tn(l)}},htmlBuilder:y6,mathmlBuilder:v6});Ye({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:n,breakOnTokenText:a}=e,l=vt(t[0],"color-token").color;n.gullet.macros.set("\\current@color",l);var u=n.parseExpression(!0,a);return{type:"color",mode:n.mode,color:l,body:u}},htmlBuilder:y6,mathmlBuilder:v6});Ye({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:a}=e,l=a.gullet.future().text==="["?a.parseSizeGroup(!0):null,u=!a.settings.displayMode||!a.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:a.mode,newLine:u,size:l&&vt(l,"size").value}},htmlBuilder(e,t){var n=Me(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=Ue(un(e.size,t)))),n},mathmlBuilder(e,t){var n=new _e("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",Ue(un(e.size,t)))),n}});var Hp={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},x6=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new ze("Expected a control sequence",e);return t},NT=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},b6=(e,t,n,a)=>{var l=e.gullet.macros.get(n.text);l==null&&(n.noexpand=!0,l={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,l,a)};Ye({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(Hp[a.text])return(n==="\\global"||n==="\\\\globallong")&&(a.text=Hp[a.text]),vt(t.parseFunction(),"internal");throw new ze("Invalid token after macro prefix",a)}});Ye({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(),l=a.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(l))throw new ze("Expected a control sequence",a);for(var u=0,c,f=[[]];t.gullet.future().text!=="{";)if(a=t.gullet.popToken(),a.text==="#"){if(t.gullet.future().text==="{"){c=t.gullet.future(),f[u].push("{");break}if(a=t.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new ze('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==u+1)throw new ze('Argument number "'+a.text+'" out of order');u++,f.push([])}else{if(a.text==="EOF")throw new ze("Expected a macro definition");f[u].push(a.text)}var{tokens:h}=t.gullet.consumeArg();return c&&h.unshift(c),(n==="\\edef"||n==="\\xdef")&&(h=t.gullet.expandTokens(h),h.reverse()),t.gullet.macros.set(l,{tokens:h,numArgs:u,delimiters:f},n===Hp[n]),{type:"internal",mode:t.mode}}});Ye({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,a=x6(t.gullet.popToken());t.gullet.consumeSpaces();var l=NT(t);return b6(t,a,l,n==="\\\\globallet"),{type:"internal",mode:t.mode}}});Ye({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,a=x6(t.gullet.popToken()),l=t.gullet.popToken(),u=t.gullet.popToken();return b6(t,a,u,n==="\\\\globalfuture"),t.gullet.pushToken(u),t.gullet.pushToken(l),{type:"internal",mode:t.mode}}});var _c=function(t,n,a){var l=ln.math[t]&&ln.math[t].replace,u=D1(l||t,n,a);if(!u)throw new Error("Unsupported symbol "+t+" and font size "+n+".");return u},L1=function(t,n,a,l){var u=a.havingBaseStyle(n),c=Me(l.concat(u.sizingClasses(a)),[t],a),f=u.sizeMultiplier/a.sizeMultiplier;return c.height*=f,c.depth*=f,c.maxFontSize=u.sizeMultiplier,c},w6=function(t,n,a){var l=n.havingBaseStyle(a),u=(1-n.sizeMultiplier/l.sizeMultiplier)*n.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=Ue(u),t.height-=u,t.depth+=u},MT=function(t,n,a,l,u,c){var f=dr(t,"Main-Regular",u,l),h=L1(f,n,l,c);return w6(h,l,n),h},DT=function(t,n,a,l){return dr(t,"Size"+n+"-Regular",a,l)},k6=function(t,n,a,l,u,c){var f=DT(t,n,u,l),h=L1(Me(["delimsizing","size"+n],[f],l),ht.TEXT,l,c);return a&&w6(h,l,ht.TEXT),h},Gm=function(t,n,a){var l;n==="Size1-Regular"?l="delim-size1":l="delim-size4";var u=Me(["delimsizinginner",l],[Me([],[dr(t,n,a)])]);return{type:"elem",elem:u}},Vm=function(t,n,a){var l=ii["Size4-Regular"][t.charCodeAt(0)]?ii["Size4-Regular"][t.charCodeAt(0)][4]:ii["Size1-Regular"][t.charCodeAt(0)][4],u=new Xl("inner",HC(t,Math.round(1e3*n))),c=new Xi([u],{width:Ue(l),height:Ue(n),style:"width:"+Ue(l),viewBox:"0 0 "+1e3*l+" "+Math.round(1e3*n),preserveAspectRatio:"xMinYMin"}),f=Zl([],[c],a);return f.height=n,f.style.height=Ue(n),f.style.width=Ue(l),{type:"elem",elem:f}},$p=.008,Rd={type:"kern",size:-1*$p},zT=new Set(["|","\\lvert","\\rvert","\\vert"]),RT=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),S6=function(t,n,a,l,u,c){var f,h,m,g,y="",k=0;f=m=g=t,h=null;var x="Size1-Regular";t==="\\uparrow"?m=g="⏐":t==="\\Uparrow"?m=g="‖":t==="\\downarrow"?f=m="⏐":t==="\\Downarrow"?f=m="‖":t==="\\updownarrow"?(f="\\uparrow",m="⏐",g="\\downarrow"):t==="\\Updownarrow"?(f="\\Uparrow",m="‖",g="\\Downarrow"):zT.has(t)?(m="∣",y="vert",k=333):RT.has(t)?(m="∥",y="doublevert",k=556):t==="["||t==="\\lbrack"?(f="⎡",m="⎢",g="⎣",x="Size4-Regular",y="lbrack",k=667):t==="]"||t==="\\rbrack"?(f="⎤",m="⎥",g="⎦",x="Size4-Regular",y="rbrack",k=667):t==="\\lfloor"||t==="⌊"?(m=f="⎢",g="⎣",x="Size4-Regular",y="lfloor",k=667):t==="\\lceil"||t==="⌈"?(f="⎡",m=g="⎢",x="Size4-Regular",y="lceil",k=667):t==="\\rfloor"||t==="⌋"?(m=f="⎥",g="⎦",x="Size4-Regular",y="rfloor",k=667):t==="\\rceil"||t==="⌉"?(f="⎤",m=g="⎥",x="Size4-Regular",y="rceil",k=667):t==="("||t==="\\lparen"?(f="⎛",m="⎜",g="⎝",x="Size4-Regular",y="lparen",k=875):t===")"||t==="\\rparen"?(f="⎞",m="⎟",g="⎠",x="Size4-Regular",y="rparen",k=875):t==="\\{"||t==="\\lbrace"?(f="⎧",h="⎨",g="⎩",m="⎪",x="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(f="⎫",h="⎬",g="⎭",m="⎪",x="Size4-Regular"):t==="\\lgroup"||t==="⟮"?(f="⎧",g="⎩",m="⎪",x="Size4-Regular"):t==="\\rgroup"||t==="⟯"?(f="⎫",g="⎭",m="⎪",x="Size4-Regular"):t==="\\lmoustache"||t==="⎰"?(f="⎧",g="⎭",m="⎪",x="Size4-Regular"):(t==="\\rmoustache"||t==="⎱")&&(f="⎫",g="⎩",m="⎪",x="Size4-Regular");var C=_c(f,x,u),D=C.height+C.depth,R=_c(m,x,u),O=R.height+R.depth,M=_c(g,x,u),q=M.height+M.depth,L=0,K=1;if(h!==null){var P=_c(h,x,u);L=P.height+P.depth,K=2}var H=D+q+L,X=Math.max(0,Math.ceil((n-H)/(K*O))),J=H+X*K*O,F=l.fontMetrics().axisHeight;a&&(F*=l.sizeMultiplier);var he=J/2-F,me=[];if(y.length>0){var Ae=J-D-q,je=Math.round(J*1e3),pe=$C(y,Math.round(Ae*1e3)),Z=new Xl(y,pe),ge=Ue(k/1e3),ye=Ue(je/1e3),oe=new Xi([Z],{width:ge,height:ye,viewBox:"0 0 "+k+" "+je}),U=Zl([],[oe],l);U.height=je/1e3,U.style.width=ge,U.style.height=ye,me.push({type:"elem",elem:U})}else{if(me.push(Gm(g,x,u)),me.push(Rd),h===null){var B=J-D-q+2*$p;me.push(Vm(m,B,l))}else{var ee=(J-D-q-L)/2+2*$p;me.push(Vm(m,ee,l)),me.push(Rd),me.push(Gm(h,x,u)),me.push(Rd),me.push(Vm(m,ee,l))}me.push(Rd),me.push(Gm(f,x,u))}var z=l.havingBaseStyle(ht.TEXT),te=It({positionType:"bottom",positionData:he,children:me});return L1(Me(["delimsizing","mult"],[te],z),ht.TEXT,l,c)},Ym=80,Wm=.08,Km=function(t,n,a,l,u){var c=UC(t,l,a),f=new Xl(t,c),h=new Xi([f],{width:"400em",height:Ue(n),viewBox:"0 0 400000 "+a,preserveAspectRatio:"xMinYMin slice"});return Zl(["hide-tail"],[h],u)},OT=function(t,n){var a=n.havingBaseSizing(),l=E6("\\surd",t*a.sizeMultiplier,A6,a),u=a.sizeMultiplier,c=Math.max(0,n.minRuleThickness-n.fontMetrics().sqrtRuleThickness),f,h,m,g,y;return l.type==="small"?(g=1e3+1e3*c+Ym,t<1?u=1:t<1.4&&(u=.7),h=(1+c+Wm)/u,m=(1+c)/u,f=Km("sqrtMain",h,g,c,n),f.style.minWidth="0.853em",y=.833/u):l.type==="large"?(g=(1e3+Ym)*Fc[l.size],m=(Fc[l.size]+c)/u,h=(Fc[l.size]+c+Wm)/u,f=Km("sqrtSize"+l.size,h,g,c,n),f.style.minWidth="1.02em",y=1/u):(h=t+c+Wm,m=t+c,g=Math.floor(1e3*t+c)+Ym,f=Km("sqrtTall",h,g,c,n),f.style.minWidth="0.742em",y=1.056),f.height=m,f.style.height=Ue(h),{span:f,advanceWidth:y,ruleWidth:(n.fontMetrics().sqrtRuleThickness+c)*u}},j6=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),IT=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),C6=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Fc=[0,1.2,1.8,2.4,3],T6=function(t,n,a,l,u){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),j6.has(t)||C6.has(t))return k6(t,n,!1,a,l,u);if(IT.has(t))return S6(t,Fc[n],!1,a,l,u);throw new ze("Illegal delimiter: '"+t+"'")},_T=[{type:"small",style:ht.SCRIPTSCRIPT},{type:"small",style:ht.SCRIPT},{type:"small",style:ht.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],LT=[{type:"small",style:ht.SCRIPTSCRIPT},{type:"small",style:ht.SCRIPT},{type:"small",style:ht.TEXT},{type:"stack"}],A6=[{type:"small",style:ht.SCRIPTSCRIPT},{type:"small",style:ht.SCRIPT},{type:"small",style:ht.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],BT=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.")},E6=function(t,n,a,l){for(var u=Math.min(2,3-l.style.size),c=u;c<a.length;c++){var f=a[c];if(f.type==="stack")break;var h=_c(t,BT(f),"math"),m=h.height+h.depth;if(f.type==="small"){var g=l.havingBaseStyle(f.style);m*=g.sizeMultiplier}if(m>n)return f}return a[a.length-1]},Fp=function(t,n,a,l,u,c){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var f;C6.has(t)?f=_T:j6.has(t)?f=A6:f=LT;var h=E6(t,n,f,l);return h.type==="small"?MT(t,h.style,a,l,u,c):h.type==="large"?k6(t,h.size,a,l,u,c):S6(t,n,a,l,u,c)},Xm=function(t,n,a,l,u,c){var f=l.fontMetrics().axisHeight*l.sizeMultiplier,h=901,m=5/l.fontMetrics().ptPerEm,g=Math.max(n-f,a+f),y=Math.max(g/500*h,2*g-m);return Fp(t,y,!0,l,u,c)},c3={"\\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}},qT=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 d3(e){return"isMiddle"in e}function Df(e,t){var n=Nf(e);if(n&&qT.has(n.text))return n;throw n?new ze("Invalid delimiter '"+n.text+"' after '"+t.funcName+"'",e):new ze("Invalid delimiter type '"+e.type+"'",e)}Ye({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=Df(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:c3[e.funcName].size,mclass:c3[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim==="."?Me([e.mclass]):T6(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(ba(e.delim,e.mode));var n=new _e("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var a=Ue(Fc[e.size]);return n.setAttribute("minsize",a),n.setAttribute("maxsize",a),n}});function f3(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Ye({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 ze("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Df(t[0],e).text,color:n}}});Ye({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=Df(t[0],e),a=e.parser;++a.leftrightDepth;var l=a.parseExpression(!1);--a.leftrightDepth,a.expect("\\right",!1);var u=vt(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:l,left:n.text,right:u.delim,rightColor:u.color}},htmlBuilder:(e,t)=>{f3(e);for(var n=_n(e.body,t,!0,["mopen","mclose"]),a=0,l=0,u=!1,c=0;c<n.length;c++){var f=n[c];d3(f)?u=!0:(a=Math.max(n[c].height,a),l=Math.max(n[c].depth,l))}a*=t.sizeMultiplier,l*=t.sizeMultiplier;var h;if(e.left==="."?h=Jc(t,["mopen"]):h=Xm(e.left,a,l,t,e.mode,["mopen"]),n.unshift(h),u)for(var m=1;m<n.length;m++){var g=n[m];if(d3(g)){var y=g.isMiddle;n[m]=Xm(y.delim,a,l,y.options,e.mode,[])}}var k;if(e.right===".")k=Jc(t,["mclose"]);else{var x=e.rightColor?t.withColor(e.rightColor):t;k=Xm(e.right,a,l,x,e.mode,["mclose"])}return n.push(k),Me(["minner"],n,t)},mathmlBuilder:(e,t)=>{f3(e);var n=ta(e.body,t);if(e.left!=="."){var a=new _e("mo",[ba(e.left,e.mode)]);a.setAttribute("fence","true"),n.unshift(a)}if(e.right!=="."){var l=new _e("mo",[ba(e.right,e.mode)]);l.setAttribute("fence","true"),e.rightColor&&l.setAttribute("mathcolor",e.rightColor),n.push(l)}return O1(n)}});Ye({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=Df(t[0],e);if(!e.parser.leftrightDepth)throw new ze("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;return e.delim==="."?n=Jc(t,[]):(n=T6(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t}),n},mathmlBuilder:(e,t)=>{var n=e.delim==="\\vert"||e.delim==="|"?ba("|","text"):ba(e.delim,e.mode),a=new _e("mo",[n]);return a.setAttribute("fence","true"),a.setAttribute("lspace","0.05em"),a.setAttribute("rspace","0.05em"),a}});var zf=(e,t)=>{var n=cu(_t(e.body,t),t),a=e.label.slice(1),l=t.sizeMultiplier,u,c,f=Qi(e.body);if(a==="sout")u=Me(["stretchy","sout"]),u.height=t.fontMetrics().defaultRuleThickness/l,c=-.5*t.fontMetrics().xHeight;else if(a==="phase"){var h=un({number:.6,unit:"pt"},t),m=un({number:.35,unit:"ex"},t),g=t.havingBaseSizing();l=l/g.sizeMultiplier;var y=n.height+n.depth+h+m;n.style.paddingLeft=Ue(y/2+h);var k=Math.floor(1e3*y*l),x=BC(k),C=new Xi([new Xl("phase",x)],{width:"400em",height:Ue(k/1e3),viewBox:"0 0 400000 "+k,preserveAspectRatio:"xMinYMin slice"});u=Zl(["hide-tail"],[C],t),u.style.height=Ue(y),c=n.depth+h+m}else{/cancel/.test(a)?f||n.classes.push("cancel-pad"):a==="angl"?n.classes.push("anglpad"):n.classes.push("boxpad");var D,R,O=0;/box/.test(a)?(O=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),D=t.fontMetrics().fboxsep+(a==="colorbox"?0:O),R=D):a==="angl"?(O=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),D=4*O,R=Math.max(0,.25-n.depth)):(D=f?.2:0,R=D),u=bT(n,a,D,R,t),/fbox|boxed|fcolorbox/.test(a)?(u.style.borderStyle="solid",u.style.borderWidth=Ue(O)):a==="angl"&&O!==.049&&(u.style.borderTopWidth=Ue(O),u.style.borderRightWidth=Ue(O)),c=n.depth+R,e.backgroundColor&&(u.style.backgroundColor=e.backgroundColor,e.borderColor&&(u.style.borderColor=e.borderColor))}var M;if(e.backgroundColor)M=It({positionType:"individualShift",children:[{type:"elem",elem:u,shift:c},{type:"elem",elem:n,shift:0}]});else{var q=/cancel|phase/.test(a)?["svg-align"]:[];M=It({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:u,shift:c,wrapperClasses:q}]})}return/cancel/.test(a)&&(M.height=n.height,M.depth=n.depth),/cancel/.test(a)&&!f?Me(["mord","cancel-lap"],[M],t):Me(["mord"],[M],t)},Rf=(e,t)=>{var n,a=new _e(e.label.includes("colorbox")?"mpadded":"menclose",[Wt(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 l=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);a.setAttribute("style","border: "+Ue(l)+" solid "+e.borderColor)}break;case"\\xcancel":a.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&a.setAttribute("mathbackground",e.backgroundColor),a};Ye({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,t,n){var{parser:a,funcName:l}=e,u=vt(t[0],"color-token").color,c=t[1];return{type:"enclose",mode:a.mode,label:l,backgroundColor:u,body:c}},htmlBuilder:zf,mathmlBuilder:Rf});Ye({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,t,n){var{parser:a,funcName:l}=e,u=vt(t[0],"color-token").color,c=vt(t[1],"color-token").color,f=t[2];return{type:"enclose",mode:a.mode,label:l,backgroundColor:c,borderColor:u,body:f}},htmlBuilder:zf,mathmlBuilder:Rf});Ye({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]}}});Ye({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:a}=e,l=t[0];return{type:"enclose",mode:n.mode,label:a,body:l}},htmlBuilder:zf,mathmlBuilder:Rf});Ye({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 l=t[0];return{type:"enclose",mode:n.mode,label:a,body:l}},htmlBuilder:zf,mathmlBuilder:Rf});Ye({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 N6={};function ui(e){for(var{type:t,names:n,props:a,handler:l,htmlBuilder:u,mathmlBuilder:c}=e,f={type:t,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:l},h=0;h<n.length;++h)N6[n[h]]=f;u&&(df[t]=u),c&&(ff[t]=c)}var M6={};function _(e,t){M6[e]=t}class zr{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 zr(t.loc.lexer,t.loc.start,n.loc.end):t&&t.loc}}class Qr{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 Qr(n,zr.range(this,t))}}function h3(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 Of=e=>{var t=e.parser.settings;if(!t.displayMode)throw new ze("{"+e.envName+"} can be used only in display mode.")},UT=new Set(["gather","gather*"]);function B1(e){if(!e.includes("ed"))return!e.includes("*")}function rs(e,t,n){var{hskipBeforeAndAfter:a,addJot:l,cols:u,arraystretch:c,colSeparationType:f,autoTag:h,singleRow:m,emptySingleRow:g,maxNumCols:y,leqno:k}=t;if(e.gullet.beginGroup(),m||e.gullet.macros.set("\\cr","\\\\\\relax"),!c){var x=e.gullet.expandMacroAsText("\\arraystretch");if(x==null)c=1;else if(c=parseFloat(x),!c||c<0)throw new ze("Invalid \\arraystretch: "+x)}e.gullet.beginGroup();var C=[],D=[C],R=[],O=[],M=h!=null?[]:void 0;function q(){h&&e.gullet.macros.set("\\@eqnsw","1",!0)}function L(){M&&(e.gullet.macros.get("\\df@tag")?(M.push(e.subparse([new Qr("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):M.push(!!h&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(q(),O.push(h3(e));;){var K=e.parseExpression(!1,m?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var P={type:"ordgroup",mode:e.mode,body:K};n&&(P={type:"styling",mode:e.mode,style:n,resetFont:!0,body:[P]}),C.push(P);var H=e.fetch().text;if(H==="&"){if(y&&C.length===y){if(m||f)throw new ze("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(H==="\\end"){L(),C.length===1&&P.type==="styling"&&P.body.length===1&&P.body[0].type==="ordgroup"&&P.body[0].body.length===0&&(D.length>1||!g)&&D.pop(),O.length<D.length+1&&O.push([]);break}else if(H==="\\\\"){e.consume();var X=void 0;e.gullet.future().text!==" "&&(X=e.parseSizeGroup(!0)),R.push(X?X.value:null),L(),O.push(h3(e)),C=[],D.push(C),q()}else throw new ze("Expected & or \\\\ or \\cr or \\end",e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:l,arraystretch:c,body:D,cols:u,rowGaps:R,hskipBeforeAndAfter:a,hLinesBeforeRow:O,colSeparationType:f,tags:M,leqno:k}}function q1(e){return e.slice(0,1)==="d"?"display":"text"}var ci=function(t,n){var a,l,u=t.body.length,c=t.hLinesBeforeRow,f=0,h=new Array(u),m=[],g=Math.max(n.fontMetrics().arrayRuleWidth,n.minRuleThickness),y=1/n.fontMetrics().ptPerEm,k=5*y;if(t.colSeparationType&&t.colSeparationType==="small"){var x=n.havingStyle(ht.SCRIPT).sizeMultiplier;k=.2778*(x/n.sizeMultiplier)}var C=t.colSeparationType==="CD"?un({number:3,unit:"ex"},n):12*y,D=3*y,R=t.arraystretch*C,O=.7*R,M=.3*R,q=0;function L(re){for(var be=0;be<re.length;++be)be>0&&(q+=.25),m.push({pos:q,isDashed:re[be]})}for(L(c[0]),a=0;a<t.body.length;++a){var K=t.body[a],P=O,H=M;f<K.length&&(f=K.length);var X={cells:new Array(K.length),height:0,depth:0,pos:0};for(l=0;l<K.length;++l){var J=_t(K[l],n);H<J.depth&&(H=J.depth),P<J.height&&(P=J.height),X.cells[l]=J}var F=t.rowGaps[a],he=0;F&&(he=un(F,n),he>0&&(he+=M,H<he&&(H=he),he=0)),t.addJot&&a<t.body.length-1&&(H+=D),X.height=P,X.depth=H,q+=P,X.pos=q,q+=H+he,h[a]=X,L(c[a+1])}var me=q/2+n.fontMetrics().axisHeight,Ae=t.cols||[],je=[],pe,Z,ge=[];if(t.tags&&t.tags.some(re=>re))for(a=0;a<u;++a){var ye=h[a],oe=ye.pos-me,U=t.tags[a],B=void 0;U===!0?B=Me(["eqn-num"],[],n):U===!1?B=Me([],[],n):B=Me([],_n(U,n,!0),n),B.depth=ye.depth,B.height=ye.height,ge.push({type:"elem",elem:B,shift:oe})}for(l=0,Z=0;l<f||Z<Ae.length;++l,++Z){for(var ee,z=Ae[Z],te=!0;((Te=z)==null?void 0:Te.type)==="separator";){var Te;if(te||(pe=Me(["arraycolsep"],[]),pe.style.width=Ue(n.fontMetrics().doubleRuleSep),je.push(pe)),z.separator==="|"||z.separator===":"){var Re=z.separator==="|"?"solid":"dashed",He=Me(["vertical-separator"],[],n);He.style.height=Ue(q),He.style.borderRightWidth=Ue(g),He.style.borderRightStyle=Re,He.style.margin="0 "+Ue(-g/2);var rt=q-me;rt&&(He.style.verticalAlign=Ue(-rt)),je.push(He)}else throw new ze("Invalid separator type: "+z.separator);Z++,z=Ae[Z],te=!1}if(!(l>=f)){var de=void 0;if(l>0||t.hskipBeforeAndAfter){var ie,Ee;de=(ie=(Ee=z)==null?void 0:Ee.pregap)!=null?ie:k,de!==0&&(pe=Me(["arraycolsep"],[]),pe.style.width=Ue(de),je.push(pe))}var Oe=[];for(a=0;a<u;++a){var Pe=h[a],Xe=Pe.cells[l];if(Xe){var Mt=Pe.pos-me;Xe.depth=Pe.depth,Xe.height=Pe.height,Oe.push({type:"elem",elem:Xe,shift:Mt})}}var qn=It({positionType:"individualShift",children:Oe}),ra=Me(["col-align-"+(((ee=z)==null?void 0:ee.align)||"c")],[qn]);if(je.push(ra),l<f-1||t.hskipBeforeAndAfter){var Jn,er;de=(Jn=(er=z)==null?void 0:er.postgap)!=null?Jn:k,de!==0&&(pe=Me(["arraycolsep"],[]),pe.style.width=Ue(de),je.push(pe))}}}var Kt=Me(["mtable"],je);if(m.length>0){for(var Ln=uu("hline",n,g),Vn=uu("hdashline",n,g),Un=[{type:"elem",elem:Kt,shift:0}];m.length>0;){var Xt=m.pop(),pr=Xt.pos-me;Xt.isDashed?Un.push({type:"elem",elem:Vn,shift:pr}):Un.push({type:"elem",elem:Ln,shift:pr})}Kt=It({positionType:"individualShift",children:Un})}if(ge.length===0)return Me(["mord"],[Kt],n);var ve=It({positionType:"individualShift",children:ge}),Le=Me(["tag"],[ve],n);return el([Kt,Le])},HT={c:"center ",l:"left ",r:"right "},di=function(t,n){for(var a=[],l=new _e("mtd",[],["mtr-glue"]),u=new _e("mtd",[],["mml-eqn-num"]),c=0;c<t.body.length;c++){for(var f=t.body[c],h=[],m=0;m<f.length;m++)h.push(new _e("mtd",[Wt(f[m],n)]));t.tags&&t.tags[c]&&(h.unshift(l),h.push(l),t.leqno?h.unshift(u):h.push(u)),a.push(new _e("mtr",h))}var g=new _e("mtable",a),y=t.arraystretch===.5?.1:.16+t.arraystretch-1+(t.addJot?.09:0);g.setAttribute("rowspacing",Ue(y));var k="",x="";if(t.cols&&t.cols.length>0){var C=t.cols,D="",R=!1,O=0,M=C.length;C[0].type==="separator"&&(k+="top ",O=1),C[C.length-1].type==="separator"&&(k+="bottom ",M-=1);for(var q=O;q<M;q++){var L=C[q];L.type==="align"?(x+=HT[L.align],R&&(D+="none "),R=!0):L.type==="separator"&&R&&(D+=L.separator==="|"?"solid ":"dashed ",R=!1)}g.setAttribute("columnalign",x.trim()),/[sd]/.test(D)&&g.setAttribute("columnlines",D.trim())}if(t.colSeparationType==="align"){for(var K=t.cols||[],P="",H=1;H<K.length;H++)P+=H%2?"0em ":"1em ";g.setAttribute("columnspacing",P.trim())}else t.colSeparationType==="alignat"||t.colSeparationType==="gather"?g.setAttribute("columnspacing","0em"):t.colSeparationType==="small"?g.setAttribute("columnspacing","0.2778em"):t.colSeparationType==="CD"?g.setAttribute("columnspacing","0.5em"):g.setAttribute("columnspacing","1em");var X="",J=t.hLinesBeforeRow;k+=J[0].length>0?"left ":"",k+=J[J.length-1].length>0?"right ":"";for(var F=1;F<J.length-1;F++)X+=J[F].length===0?"none ":J[F][0]?"dashed ":"solid ";return/[sd]/.test(X)&&g.setAttribute("rowlines",X.trim()),k!==""&&(g=new _e("menclose",[g]),g.setAttribute("notation",k.trim())),t.arraystretch&&t.arraystretch<1&&(g=new _e("mstyle",[g]),g.setAttribute("scriptlevel","1")),g},D6=function(t,n){t.envName.includes("ed")||Of(t);var a=[],l=t.envName.includes("at")?"alignat":"align",u=t.envName==="split",c=rs(t.parser,{cols:a,addJot:!0,autoTag:u?void 0:B1(t.envName),emptySingleRow:!0,colSeparationType:l,maxNumCols:u?2:void 0,leqno:t.parser.settings.leqno},"display"),f=0,h=0,m={type:"ordgroup",mode:t.mode,body:[]};if(n[0]&&n[0].type==="ordgroup"){for(var g="",y=0;y<n[0].body.length;y++){var k=vt(n[0].body[y],"textord");g+=k.text}f=Number(g),h=f*2}var x=!h;c.body.forEach(function(O){for(var M=1;M<O.length;M+=2){var q=vt(O[M],"styling"),L=vt(q.body[0],"ordgroup");L.body.unshift(m)}if(x)h<O.length&&(h=O.length);else{var K=O.length/2;if(f<K)throw new ze("Too many math in a row: "+("expected "+f+", but got "+K),O[0])}});for(var C=0;C<h;++C){var D="r",R=0;C%2===1?D="l":C>0&&x&&(R=1),a[C]={type:"align",align:D,pregap:R,postgap:0}}return c.colSeparationType=x?"align":"alignat",c};ui({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=Nf(t[0]),a=n?[t[0]]:vt(t[0],"ordgroup").body,l=a.map(function(c){var f=Ef(c),h=f.text;if("lcr".includes(h))return{type:"align",align:h};if(h==="|")return{type:"separator",separator:"|"};if(h===":")return{type:"separator",separator:":"};throw new ze("Unknown column alignment: "+h,c)}),u={cols:l,hskipBeforeAndAfter:!0,maxNumCols:l.length};return rs(e.parser,u,q1(e.envName))},htmlBuilder:ci,mathmlBuilder:di});ui({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 l=e.parser;if(l.consumeSpaces(),l.fetch().text==="["){if(l.consume(),l.consumeSpaces(),n=l.fetch().text,!"lcr".includes(n))throw new ze("Expected l or c or r",l.nextToken);l.consume(),l.consumeSpaces(),l.expect("]"),l.consume(),a.cols=[{type:"align",align:n}]}}var u=rs(e.parser,a,q1(e.envName)),c=Math.max(0,...u.body.map(f=>f.length));return u.cols=new Array(c).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[u],left:t[0],right:t[1],rightColor:void 0}:u},htmlBuilder:ci,mathmlBuilder:di});ui({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},n=rs(e.parser,t,"script");return n.colSeparationType="small",n},htmlBuilder:ci,mathmlBuilder:di});ui({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=Nf(t[0]),a=n?[t[0]]:vt(t[0],"ordgroup").body,l=a.map(function(f){var h=Ef(f),m=h.text;if("lc".includes(m))return{type:"align",align:m};throw new ze("Unknown column alignment: "+m,f)});if(l.length>1)throw new ze("{subarray} can contain only one column");var u={cols:l,hskipBeforeAndAfter:!1,arraystretch:.5},c=rs(e.parser,u,"script");if(c.body.length>0&&c.body[0].length>1)throw new ze("{subarray} can contain only one column");return c},htmlBuilder:ci,mathmlBuilder:di});ui({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=rs(e.parser,t,q1(e.envName));return{type:"leftright",mode:e.mode,body:[n],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:ci,mathmlBuilder:di});ui({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:D6,htmlBuilder:ci,mathmlBuilder:di});ui({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){UT.has(e.envName)&&Of(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:B1(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return rs(e.parser,t,"display")},htmlBuilder:ci,mathmlBuilder:di});ui({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:D6,htmlBuilder:ci,mathmlBuilder:di});ui({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Of(e);var t={autoTag:B1(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return rs(e.parser,t,"display")},htmlBuilder:ci,mathmlBuilder:di});ui({type:"array",names:["CD"],props:{numArgs:0},handler(e){return Of(e),ET(e.parser)},htmlBuilder:ci,mathmlBuilder:di});_("\\nonumber","\\gdef\\@eqnsw{0}");_("\\notag","\\nonumber");Ye({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new ze(e.funcName+" valid only within array environment")}});var m3=N6;Ye({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:n,funcName:a}=e,l=t[0];if(l.type!=="ordgroup")throw new ze("Invalid environment name",l);for(var u="",c=0;c<l.body.length;++c)u+=vt(l.body[c],"textord").text;if(a==="\\begin"){if(!m3.hasOwnProperty(u))throw new ze("No such environment: "+u,l);var f=m3[u],{args:h,optArgs:m}=n.parseArguments("\\begin{"+u+"}",f),g={mode:n.mode,envName:u,parser:n},y=f.handler(g,h,m);n.expect("\\end",!1);var k=n.nextToken,x=vt(n.parseFunction(),"environment");if(x.name!==u)throw new ze("Mismatch: \\begin{"+u+"} matched by \\end{"+x.name+"}",k);return y}return{type:"environment",mode:n.mode,name:u,nameGroup:l}}});var z6=(e,t)=>{var n=e.font,a=t.withFont(n);return _t(e.body,a)},R6=(e,t)=>{var n=e.font,a=t.withFont(n);return Wt(e.body,a)},p3={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};Ye({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,l=hf(t[0]),u=a;return u in p3&&(u=p3[u]),{type:"font",mode:n.mode,font:u.slice(1),body:l}},htmlBuilder:z6,mathmlBuilder:R6});Ye({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:Mf(a),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:a}],isCharacterBox:Qi(a)}}});Ye({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:a,breakOnTokenText:l}=e,{mode:u}=n,c=n.parseExpression(!0,l);return{type:"font",mode:u,font:"math"+a.slice(1),body:{type:"ordgroup",mode:n.mode,body:c}}},htmlBuilder:z6,mathmlBuilder:R6});var $T=(e,t)=>{var n=t.style,a=n.fracNum(),l=n.fracDen(),u;u=t.havingStyle(a);var c=_t(e.numer,u,t);if(e.continued){var f=8.5/t.fontMetrics().ptPerEm,h=3.5/t.fontMetrics().ptPerEm;c.height=c.height<f?f:c.height,c.depth=c.depth<h?h:c.depth}u=t.havingStyle(l);var m=_t(e.denom,u,t),g,y,k;e.hasBarLine?(e.barSize?(y=un(e.barSize,t),g=uu("frac-line",t,y)):g=uu("frac-line",t),y=g.height,k=g.height):(g=null,y=0,k=t.fontMetrics().defaultRuleThickness);var x,C,D;n.size===ht.DISPLAY.size?(x=t.fontMetrics().num1,y>0?C=3*k:C=7*k,D=t.fontMetrics().denom1):(y>0?(x=t.fontMetrics().num2,C=k):(x=t.fontMetrics().num3,C=3*k),D=t.fontMetrics().denom2);var R;if(g){var M=t.fontMetrics().axisHeight;x-c.depth-(M+.5*y)<C&&(x+=C-(x-c.depth-(M+.5*y))),M-.5*y-(m.height-D)<C&&(D+=C-(M-.5*y-(m.height-D)));var q=-(M-.5*y);R=It({positionType:"individualShift",children:[{type:"elem",elem:m,shift:D},{type:"elem",elem:g,shift:q},{type:"elem",elem:c,shift:-x}]})}else{var O=x-c.depth-(m.height-D);O<C&&(x+=.5*(C-O),D+=.5*(C-O)),R=It({positionType:"individualShift",children:[{type:"elem",elem:m,shift:D},{type:"elem",elem:c,shift:-x}]})}u=t.havingStyle(n),R.height*=u.sizeMultiplier/t.sizeMultiplier,R.depth*=u.sizeMultiplier/t.sizeMultiplier;var L;n.size===ht.DISPLAY.size?L=t.fontMetrics().delim1:n.size===ht.SCRIPTSCRIPT.size?L=t.havingStyle(ht.SCRIPT).fontMetrics().delim2:L=t.fontMetrics().delim2;var K,P;return e.leftDelim==null?K=Jc(t,["mopen"]):K=Fp(e.leftDelim,L,!0,t.havingStyle(n),e.mode,["mopen"]),e.continued?P=Me([]):e.rightDelim==null?P=Jc(t,["mclose"]):P=Fp(e.rightDelim,L,!0,t.havingStyle(n),e.mode,["mclose"]),Me(["mord"].concat(u.sizingClasses(t)),[K,Me(["mfrac"],[R]),P],t)},FT=(e,t)=>{var n=new _e("mfrac",[Wt(e.numer,t),Wt(e.denom,t)]);if(!e.hasBarLine)n.setAttribute("linethickness","0px");else if(e.barSize){var a=un(e.barSize,t);n.setAttribute("linethickness",Ue(a))}if(e.leftDelim!=null||e.rightDelim!=null){var l=[];if(e.leftDelim!=null){var u=new _e("mo",[new An(e.leftDelim.replace("\\",""))]);u.setAttribute("fence","true"),l.push(u)}if(l.push(n),e.rightDelim!=null){var c=new _e("mo",[new An(e.rightDelim.replace("\\",""))]);c.setAttribute("fence","true"),l.push(c)}return O1(l)}return n},O6=(e,t)=>{if(!t)return e;var n={type:"styling",mode:e.mode,style:t,body:[e]};return n};Ye({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,l=t[0],u=t[1],c,f=null,h=null;switch(a){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":c=!0;break;case"\\\\atopfrac":c=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":c=!1,f="(",h=")";break;case"\\\\bracefrac":c=!1,f="\\{",h="\\}";break;case"\\\\brackfrac":c=!1,f="[",h="]";break;default:throw new Error("Unrecognized genfrac command")}var m=a==="\\cfrac",g=null;return m||a.startsWith("\\d")?g="display":a.startsWith("\\t")&&(g="text"),O6({type:"genfrac",mode:n.mode,numer:l,denom:u,continued:m,hasBarLine:c,leftDelim:f,rightDelim:h,barSize:null},g)},htmlBuilder:$T,mathmlBuilder:FT});Ye({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:n,token:a}=e,l;switch(n){case"\\over":l="\\frac";break;case"\\choose":l="\\binom";break;case"\\atop":l="\\\\atopfrac";break;case"\\brace":l="\\\\bracefrac";break;case"\\brack":l="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:l,token:a}}});var g3=["display","text","script","scriptscript"],y3=function(t){var n=null;return t.length>0&&(n=t,n=n==="."?null:n),n};Ye({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],l=t[5],u=hf(t[0]),c=u.type==="atom"&&u.family==="open"?y3(u.text):null,f=hf(t[1]),h=f.type==="atom"&&f.family==="close"?y3(f.text):null,m=vt(t[2],"size"),g,y=null;m.isBlank?g=!0:(y=m.value,g=y.number>0);var k=null,x=t[3];if(x.type==="ordgroup"){if(x.body.length>0){var C=vt(x.body[0],"textord");k=g3[Number(C.text)]}}else x=vt(x,"textord"),k=g3[Number(x.text)];return O6({type:"genfrac",mode:n.mode,numer:a,denom:l,continued:!1,hasBarLine:g,barSize:y,leftDelim:c,rightDelim:h},k)}});Ye({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:n,funcName:a,token:l}=e;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:vt(t[0],"size").value,token:l}}});Ye({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:n,funcName:a}=e,l=t[0],u=vt(t[1],"infix").size;if(!u)throw new Error("\\\\abovefrac expected size, but got "+String(u));var c=t[2],f=u.number>0;return{type:"genfrac",mode:n.mode,numer:l,denom:c,continued:!1,hasBarLine:f,barSize:u,leftDelim:null,rightDelim:null}}});var I6=(e,t)=>{var n=t.style,a,l;e.type==="supsub"?(a=e.sup?_t(e.sup,t.havingStyle(n.sup()),t):_t(e.sub,t.havingStyle(n.sub()),t),l=vt(e.base,"horizBrace")):l=vt(e,"horizBrace");var u=_t(l.base,t.havingBaseStyle(ht.DISPLAY)),c=Af(l,t),f;if(l.isOver?f=It({positionType:"firstBaseline",children:[{type:"elem",elem:u},{type:"kern",size:.1},{type:"elem",elem:c,wrapperClasses:["svg-align"]}]}):f=It({positionType:"bottom",positionData:u.depth+.1+c.height,children:[{type:"elem",elem:c,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:u}]}),a){var h=Me(["minner",l.isOver?"mover":"munder"],[f],t);l.isOver?f=It({positionType:"firstBaseline",children:[{type:"elem",elem:h},{type:"kern",size:.2},{type:"elem",elem:a}]}):f=It({positionType:"bottom",positionData:h.depth+.2+a.height+a.depth,children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:h}]})}return Me(["minner",l.isOver?"mover":"munder"],[f],t)},PT=(e,t)=>{var n=Tf(e.label);return new _e(e.isOver?"mover":"munder",[Wt(e.base,t),n])};Ye({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:I6,mathmlBuilder:PT});Ye({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,a=t[1],l=vt(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:l})?{type:"href",mode:n.mode,href:l,body:Tn(a)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=_n(e.body,t,!1);return rT(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=Ql(e.body,t);return n instanceof _e||(n=new _e("mrow",[n])),n.setAttribute("href",e.href),n}});Ye({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 l=[],u=0;u<a.length;u++){var c=a[u];c==="~"&&(c="\\textasciitilde"),l.push({type:"textord",mode:"text",text:c})}var f={type:"text",mode:n.mode,font:"\\texttt",body:l};return{type:"href",mode:n.mode,href:a,body:Tn(f)}}});Ye({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:Tn(t[0])}},htmlBuilder(e,t){var n=_n(e.body,t.withFont(""),!1);return el(n)},mathmlBuilder(e,t){return new _e("mrow",ta(e.body,t.withFont("")))}});Ye({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:a,token:l}=e,u=vt(t[0],"raw").string,c=t[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var f,h={};switch(a){case"\\htmlClass":h.class=u,f={command:"\\htmlClass",class:u};break;case"\\htmlId":h.id=u,f={command:"\\htmlId",id:u};break;case"\\htmlStyle":h.style=u,f={command:"\\htmlStyle",style:u};break;case"\\htmlData":{for(var m=u.split(","),g=0;g<m.length;g++){var y=m[g],k=y.indexOf("=");if(k<0)throw new ze("\\htmlData key/value '"+y+"' missing equals sign");var x=y.slice(0,k),C=y.slice(k+1);h["data-"+x.trim()]=C}f={command:"\\htmlData",attributes:h};break}default:throw new Error("Unrecognized html command")}return n.settings.isTrusted(f)?{type:"html",mode:n.mode,attributes:h,body:Tn(c)}:n.formatUnsupportedCmd(a)},htmlBuilder:(e,t)=>{var n=_n(e.body,t,!1),a=["enclosing"];e.attributes.class&&a.push(...e.attributes.class.trim().split(/\s+/));var l=Me(a,n,t);for(var u in e.attributes)u!=="class"&&e.attributes.hasOwnProperty(u)&&l.setAttribute(u,e.attributes[u]);return l},mathmlBuilder:(e,t)=>Ql(e.body,t)});Ye({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:Tn(t[0]),mathml:Tn(t[1])}},htmlBuilder:(e,t)=>{var n=_n(e.html,t,!1);return el(n)},mathmlBuilder:(e,t)=>Ql(e.mathml,t)});var Zm=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 ze("Invalid size: '"+t+"' in \\includegraphics");var a={number:+(n[1]+n[2]),unit:n[3]};if(!Z5(a))throw new ze("Invalid unit: '"+a.unit+"' in \\includegraphics.");return a};Ye({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,n)=>{var{parser:a}=e,l={number:0,unit:"em"},u={number:.9,unit:"em"},c={number:0,unit:"em"},f="";if(n[0])for(var h=vt(n[0],"raw").string,m=h.split(","),g=0;g<m.length;g++){var y=m[g].split("=");if(y.length===2){var k=y[1].trim();switch(y[0].trim()){case"alt":f=k;break;case"width":l=Zm(k);break;case"height":u=Zm(k);break;case"totalheight":c=Zm(k);break;default:throw new ze("Invalid key: '"+y[0]+"' in \\includegraphics.")}}}var x=vt(t[0],"url").url;return f===""&&(f=x,f=f.replace(/^.*[\\/]/,""),f=f.substring(0,f.lastIndexOf("."))),a.settings.isTrusted({command:"\\includegraphics",url:x})?{type:"includegraphics",mode:a.mode,alt:f,width:l,height:u,totalheight:c,src:x}:a.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var n=un(e.height,t),a=0;e.totalheight.number>0&&(a=un(e.totalheight,t)-n);var l=0;e.width.number>0&&(l=un(e.width,t));var u={height:Ue(n+a)};l>0&&(u.width=Ue(l)),a>0&&(u.verticalAlign=Ue(-a));var c=new VC(e.src,e.alt,u);return c.height=n,c.depth=a,c},mathmlBuilder:(e,t)=>{var n=new _e("mglyph",[]);n.setAttribute("alt",e.alt);var a=un(e.height,t),l=0;if(e.totalheight.number>0&&(l=un(e.totalheight,t)-a,n.setAttribute("valign",Ue(-l))),n.setAttribute("height",Ue(a+l)),e.width.number>0){var u=un(e.width,t);n.setAttribute("width",Ue(u))}return n.setAttribute("src",e.src),n}});Ye({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,l=vt(t[0],"size");if(n.settings.strict){var u=a[1]==="m",c=l.value.unit==="mu";u?(c||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" supports only mu units, "+("not "+l.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:l.value}},htmlBuilder(e,t){return a6(e.dimension,t)},mathmlBuilder(e,t){var n=un(e.dimension,t);return new c6(n)}});Ye({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:a}=e,l=t[0];return{type:"lap",mode:n.mode,alignment:a.slice(5),body:l}},htmlBuilder:(e,t)=>{var n;e.alignment==="clap"?(n=Me([],[_t(e.body,t)]),n=Me(["inner"],[n],t)):n=Me(["inner"],[_t(e.body,t)]);var a=Me(["fix"],[]),l=Me([e.alignment],[n,a],t),u=Me(["strut"]);return u.style.height=Ue(l.height+l.depth),l.depth&&(u.style.verticalAlign=Ue(-l.depth)),l.children.unshift(u),l=Me(["thinbox"],[l],t),Me(["mord","vbox"],[l],t)},mathmlBuilder:(e,t)=>{var n=new _e("mpadded",[Wt(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}});Ye({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:a}=e,l=a.mode;a.switchMode("math");var u=n==="\\("?"\\)":"$",c=a.parseExpression(!1,u);return a.expect(u),a.switchMode(l),{type:"styling",mode:a.mode,style:"text",resetFont:!0,body:c}}});Ye({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new ze("Mismatched "+e.funcName)}});var v3=(e,t)=>{switch(t.style.size){case ht.DISPLAY.size:return e.display;case ht.TEXT.size:return e.text;case ht.SCRIPT.size:return e.script;case ht.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};Ye({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:Tn(t[0]),text:Tn(t[1]),script:Tn(t[2]),scriptscript:Tn(t[3])}},htmlBuilder:(e,t)=>{var n=v3(e,t),a=_n(n,t,!1);return el(a)},mathmlBuilder:(e,t)=>{var n=v3(e,t);return Ql(n,t)}});var _6=(e,t,n,a,l,u,c)=>{e=Me([],[e]);var f=n&&Qi(n),h,m;if(t){var g=_t(t,a.havingStyle(l.sup()),a);m={elem:g,kern:Math.max(a.fontMetrics().bigOpSpacing1,a.fontMetrics().bigOpSpacing3-g.depth)}}if(n){var y=_t(n,a.havingStyle(l.sub()),a);h={elem:y,kern:Math.max(a.fontMetrics().bigOpSpacing2,a.fontMetrics().bigOpSpacing4-y.height)}}var k;if(m&&h){var x=a.fontMetrics().bigOpSpacing5+h.elem.height+h.elem.depth+h.kern+e.depth+c;k=It({positionType:"bottom",positionData:x,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:h.elem,marginLeft:Ue(-u)},{type:"kern",size:h.kern},{type:"elem",elem:e},{type:"kern",size:m.kern},{type:"elem",elem:m.elem,marginLeft:Ue(u)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]})}else if(h){var C=e.height-c;k=It({positionType:"top",positionData:C,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:h.elem,marginLeft:Ue(-u)},{type:"kern",size:h.kern},{type:"elem",elem:e}]})}else if(m){var D=e.depth+c;k=It({positionType:"bottom",positionData:D,children:[{type:"elem",elem:e},{type:"kern",size:m.kern},{type:"elem",elem:m.elem,marginLeft:Ue(u)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]})}else return e;var R=[k];if(h&&u!==0&&!f){var O=Me(["mspace"],[],a);O.style.marginRight=Ue(u),R.unshift(O)}return Me(["mop","op-limits"],R,a)},L6=new Set(["\\smallint"]),yu=(e,t)=>{var n,a,l=!1,u;e.type==="supsub"?(n=e.sup,a=e.sub,u=vt(e.base,"op"),l=!0):u=vt(e,"op");var c=t.style,f=!1;c.size===ht.DISPLAY.size&&u.symbol&&!L6.has(u.name)&&(f=!0);var h,m;if(u.symbol){var g=f?"Size2-Regular":"Size1-Regular",y="";if((u.name==="\\oiint"||u.name==="\\oiiint")&&(y=u.name.slice(1),u.name=y==="oiint"?"\\iint":"\\iiint"),h=dr(u.name,g,"math",t,["mop","op-symbol",f?"large-op":"small-op"]),m=h.italic,y.length>0){var k=l6(y+"Size"+(f?"2":"1"),t);h=It({positionType:"individualShift",children:[{type:"elem",elem:h,shift:0},{type:"elem",elem:k,shift:f?.08:0}]}),u.name="\\"+y,h.classes.unshift("mop"),h.italic=m}}else if(u.body){var x=_n(u.body,t,!0);x.length===1&&x[0]instanceof Jr?(h=x[0],h.classes[0]="mop"):h=Me(["mop"],x,t)}else{for(var C=[],D=1;D<u.name.length;D++)C.push(z1(u.name[D],u.mode,t));h=Me(["mop"],C,t)}var R=0,O=0;if((h instanceof Jr||u.name==="\\oiint"||u.name==="\\oiiint")&&!u.suppressBaseShift){var M;R=(h.height-h.depth)/2-t.fontMetrics().axisHeight,O=(M=h.italic)!=null?M:0}return l?_6(h,n,a,t,c,O,R):(R&&(h.style.position="relative",h.style.top=Ue(R)),h)},o0=(e,t)=>{var n;if(e.symbol)n=new _e("mo",[ba(e.name,e.mode)]),L6.has(e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new _e("mo",ta(e.body,t));else{n=new _e("mi",[new An(e.name.slice(1))]);var a=new _e("mo",[ba("⁡","text")]);e.parentIsSupSub?n=new _e("mrow",[n,a]):n=u6([n,a])}return n},GT={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};Ye({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,l=a;return l.length===1&&(l=GT[l]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:l}},htmlBuilder:yu,mathmlBuilder:o0});Ye({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:Tn(a)}},htmlBuilder:yu,mathmlBuilder:o0});var VT={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};Ye({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:yu,mathmlBuilder:o0});Ye({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:yu,mathmlBuilder:o0});Ye({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=VT[a]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:yu,mathmlBuilder:o0});var B6=(e,t)=>{var n,a,l=!1,u;e.type==="supsub"?(n=e.sup,a=e.sub,u=vt(e.base,"operatorname"),l=!0):u=vt(e,"operatorname");var c;if(u.body.length>0){for(var f=u.body.map(y=>{var k="text"in y?y.text:void 0;return typeof k=="string"?{type:"textord",mode:y.mode,text:k}:y}),h=_n(f,t.withFont("mathrm"),!0),m=0;m<h.length;m++){var g=h[m];g instanceof Jr&&(g.text=g.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}c=Me(["mop"],h,t)}else c=Me(["mop"],[],t);return l?_6(c,n,a,t,t.style,0,0):c},YT=(e,t)=>{for(var n=ta(e.body,t.withFont("mathrm")),a=!0,l=0;l<n.length;l++){var u=n[l];if(!(u instanceof c6))if(u instanceof _e)switch(u.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":{var c=u.children[0];u.children.length===1&&c instanceof An?c.text=c.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):a=!1;break}default:a=!1}else a=!1}if(a){var f=n.map(g=>g.toText()).join("");n=[new An(f)]}var h=new _e("mi",n);h.setAttribute("mathvariant","normal");var m=new _e("mo",[ba("⁡","text")]);return e.parentIsSupSub?new _e("mrow",[h,m]):u6([h,m])};Ye({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:a}=e,l=t[0];return{type:"operatorname",mode:n.mode,body:Tn(l),alwaysHandleSupSub:a==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:B6,mathmlBuilder:YT});_("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Qs({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?el(_n(e.body,t,!1)):Me(["mord"],_n(e.body,t,!0),t)},mathmlBuilder(e,t){return Ql(e.body,t,!0)}});Ye({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=_t(e.body,t.havingCrampedStyle()),a=uu("overline-line",t),l=t.fontMetrics().defaultRuleThickness,u=It({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*l},{type:"elem",elem:a},{type:"kern",size:l}]});return Me(["mord","overline"],[u],t)},mathmlBuilder(e,t){var n=new _e("mo",[new An("‾")]);n.setAttribute("stretchy","true");var a=new _e("mover",[Wt(e.body,t),n]);return a.setAttribute("accent","true"),a}});Ye({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:Tn(a)}},htmlBuilder:(e,t)=>{var n=_n(e.body,t.withPhantom(),!1);return el(n)},mathmlBuilder:(e,t)=>{var n=ta(e.body,t);return new _e("mphantom",n)}});_("\\hphantom","\\smash{\\phantom{#1}}");Ye({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=Me(["inner"],[_t(e.body,t.withPhantom())]),a=Me(["fix"],[]);return Me(["mord","rlap"],[n,a],t)},mathmlBuilder:(e,t)=>{var n=ta(Tn(e.body),t),a=new _e("mphantom",n),l=new _e("mpadded",[a]);return l.setAttribute("width","0px"),l}});Ye({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,l=t[1];return{type:"raisebox",mode:n.mode,dy:a,body:l}},htmlBuilder(e,t){var n=_t(e.body,t),a=un(e.dy,t);return It({positionType:"shift",positionData:-a,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new _e("mpadded",[Wt(e.body,t)]),a=e.dy.number+e.dy.unit;return n.setAttribute("voffset",a),n}});Ye({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}});Ye({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,l=n[0],u=vt(t[0],"size"),c=vt(t[1],"size");return{type:"rule",mode:a.mode,shift:l&&vt(l,"size").value,width:u.value,height:c.value}},htmlBuilder(e,t){var n=Me(["mord","rule"],[],t),a=un(e.width,t),l=un(e.height,t),u=e.shift?un(e.shift,t):0;return n.style.borderRightWidth=Ue(a),n.style.borderTopWidth=Ue(l),n.style.bottom=Ue(u),n.width=a,n.height=l+u,n.depth=-u,n.maxFontSize=l*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=un(e.width,t),a=un(e.height,t),l=e.shift?un(e.shift,t):0,u=t.color&&t.getColor()||"black",c=new _e("mspace");c.setAttribute("mathbackground",u),c.setAttribute("width",Ue(n)),c.setAttribute("height",Ue(a));var f=new _e("mpadded",[c]);return l>=0?f.setAttribute("height",Ue(l)):(f.setAttribute("height",Ue(l)),f.setAttribute("depth",Ue(-l))),f.setAttribute("voffset",Ue(l)),f}});function q6(e,t,n){for(var a=_n(e,t,!1),l=t.sizeMultiplier/n.sizeMultiplier,u=0;u<a.length;u++){var c=a[u].classes.indexOf("sizing");c<0?Array.prototype.push.apply(a[u].classes,t.sizingClasses(n)):a[u].classes[c+1]==="reset-size"+t.size&&(a[u].classes[c+1]="reset-size"+n.size),a[u].height*=l,a[u].depth*=l}return el(a)}var x3=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],WT=(e,t)=>{var n=t.havingSize(e.size);return q6(e.body,n,t)};Ye({type:"sizing",names:x3,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:a,parser:l}=e,u=l.parseExpression(!1,n);return{type:"sizing",mode:l.mode,size:x3.indexOf(a)+1,body:u}},htmlBuilder:WT,mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),a=ta(e.body,n),l=new _e("mstyle",a);return l.setAttribute("mathsize",Ue(n.sizeMultiplier)),l}});Ye({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:a}=e,l=!1,u=!1,c=n[0]&&vt(n[0],"ordgroup");if(c)for(var f,h=0;h<c.body.length;++h){var m=c.body[h];if(f=Ef(m).text,f==="t")l=!0;else if(f==="b")u=!0;else{l=!1,u=!1;break}}else l=!0,u=!0;var g=t[0];return{type:"smash",mode:a.mode,body:g,smashHeight:l,smashDepth:u}},htmlBuilder:(e,t)=>{var n=Me([],[_t(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 Me(["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 l=It({positionType:"firstBaseline",children:[{type:"elem",elem:n}]});return Me(["mord"],[l],t)},mathmlBuilder:(e,t)=>{var n=new _e("mpadded",[Wt(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}});Ye({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:a}=e,l=n[0],u=t[0];return{type:"sqrt",mode:a.mode,body:u,index:l}},htmlBuilder(e,t){var n=_t(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=cu(n,t);var a=t.fontMetrics(),l=a.defaultRuleThickness,u=l;t.style.id<ht.TEXT.id&&(u=t.fontMetrics().xHeight);var c=l+u/4,f=n.height+n.depth+c+l,{span:h,ruleWidth:m,advanceWidth:g}=OT(f,t),y=h.height-m;y>n.height+n.depth+c&&(c=(c+y-n.height-n.depth)/2);var k=h.height-n.height-c-m;n.style.paddingLeft=Ue(g);var x=It({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+k)},{type:"elem",elem:h},{type:"kern",size:m}]});if(e.index){var C=t.havingStyle(ht.SCRIPTSCRIPT),D=_t(e.index,C,t),R=.6*(x.height-x.depth),O=It({positionType:"shift",positionData:-R,children:[{type:"elem",elem:D}]}),M=Me(["root"],[O]);return Me(["mord","sqrt"],[M,x],t)}else return Me(["mord","sqrt"],[x],t)},mathmlBuilder(e,t){var{body:n,index:a}=e;return a?new _e("mroot",[Wt(n,t),Wt(a,t)]):new _e("msqrt",[Wt(n,t)])}});var Pp={display:ht.DISPLAY,text:ht.TEXT,script:ht.SCRIPT,scriptscript:ht.SCRIPTSCRIPT};function KT(e){return e in Pp}Ye({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:a,parser:l}=e,u=l.parseExpression(!0,n),c=a.slice(1,a.length-5);if(!KT(c))throw new Error("Unknown style: "+c);return{type:"styling",mode:l.mode,style:c,body:u}},htmlBuilder(e,t){var n=Pp[e.style],a=t.havingStyle(n);return e.resetFont&&(a=a.withFont("")),q6(e.body,a,t)},mathmlBuilder(e,t){var n=Pp[e.style],a=t.havingStyle(n);e.resetFont&&(a=a.withFont(""));var l=ta(e.body,a),u=new _e("mstyle",l),c={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},f=c[e.style];return u.setAttribute("scriptlevel",f[0]),u.setAttribute("displaystyle",f[1]),u}});var XT=function(t,n){var a=t.base;if(a)if(a.type==="op"){var l=a.limits&&(n.style.size===ht.DISPLAY.size||a.alwaysHandleSupSub);return l?yu:null}else if(a.type==="operatorname"){var u=a.alwaysHandleSupSub&&(n.style.size===ht.DISPLAY.size||a.limits);return u?B6:null}else{if(a.type==="accent")return Qi(a.base)?_1:null;if(a.type==="horizBrace"){var c=!t.sub;return c===a.isOver?I6:null}else return null}else return null};Qs({type:"supsub",htmlBuilder(e,t){var n=XT(e,t);if(n)return n(e,t);var{base:a,sup:l,sub:u}=e,c=_t(a,t),f,h,m=t.fontMetrics(),g=0,y=0,k=a&&Qi(a);if(l){var x=t.havingStyle(t.style.sup());f=_t(l,x,t),k||(g=c.height-x.fontMetrics().supDrop*x.sizeMultiplier/t.sizeMultiplier)}if(u){var C=t.havingStyle(t.style.sub());h=_t(u,C,t),k||(y=c.depth+C.fontMetrics().subDrop*C.sizeMultiplier/t.sizeMultiplier)}var D;t.style===ht.DISPLAY?D=m.sup1:t.style.cramped?D=m.sup3:D=m.sup2;var R=t.sizeMultiplier,O=Ue(.5/m.ptPerEm/R),M=null;if(h){var q=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(c instanceof Jr||q){var L;M=Ue(-((L=c.italic)!=null?L:0))}}var K;if(f&&h){g=Math.max(g,D,f.depth+.25*m.xHeight),y=Math.max(y,m.sub2);var P=m.defaultRuleThickness,H=4*P;if(g-f.depth-(h.height-y)<H){y=H-(g-f.depth)+h.height;var X=.8*m.xHeight-(g-f.depth);X>0&&(g+=X,y-=X)}var J=[{type:"elem",elem:h,shift:y,marginRight:O,marginLeft:M},{type:"elem",elem:f,shift:-g,marginRight:O}];K=It({positionType:"individualShift",children:J})}else if(h){y=Math.max(y,m.sub1,h.height-.8*m.xHeight);var F=[{type:"elem",elem:h,marginLeft:M,marginRight:O}];K=It({positionType:"shift",positionData:y,children:F})}else if(f)g=Math.max(g,D,f.depth+.25*m.xHeight),K=It({positionType:"shift",positionData:-g,children:[{type:"elem",elem:f,marginRight:O}]});else throw new Error("supsub must have either sup or sub.");var he=qp(c,"right")||"mord";return Me([he],[c,Me(["msupsub"],[K])],t)},mathmlBuilder(e,t){var n=!1,a,l;e.base&&e.base.type==="horizBrace"&&(l=!!e.sup,l===e.base.isOver&&(n=!0,a=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var u=[Wt(e.base,t)];e.sub&&u.push(Wt(e.sub,t)),e.sup&&u.push(Wt(e.sup,t));var c;if(n)c=a?"mover":"munder";else if(e.sub)if(e.sup){var m=e.base;m&&m.type==="op"&&m.limits&&t.style===ht.DISPLAY||m&&m.type==="operatorname"&&m.alwaysHandleSupSub&&(t.style===ht.DISPLAY||m.limits)?c="munderover":c="msubsup"}else{var h=e.base;h&&h.type==="op"&&h.limits&&(t.style===ht.DISPLAY||h.alwaysHandleSupSub)||h&&h.type==="operatorname"&&h.alwaysHandleSupSub&&(h.limits||t.style===ht.DISPLAY)?c="munder":c="msub"}else{var f=e.base;f&&f.type==="op"&&f.limits&&(t.style===ht.DISPLAY||f.alwaysHandleSupSub)||f&&f.type==="operatorname"&&f.alwaysHandleSupSub&&(f.limits||t.style===ht.DISPLAY)?c="mover":c="msup"}return new _e(c,u)}});Qs({type:"atom",htmlBuilder(e,t){return z1(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var n=new _e("mo",[ba(e.text,e.mode)]);if(e.family==="bin"){var a=I1(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 U6={mi:"italic",mn:"normal",mtext:"normal"};Qs({type:"mathord",htmlBuilder(e,t){return Cf(e,t,"mathord")},mathmlBuilder(e,t){var n=new _e("mi",[ba(e.text,e.mode,t)]),a=I1(e,t)||"italic";return a!==U6[n.type]&&n.setAttribute("mathvariant",a),n}});Qs({type:"textord",htmlBuilder(e,t){return Cf(e,t,"textord")},mathmlBuilder(e,t){var n=ba(e.text,e.mode,t),a=I1(e,t)||"normal",l;return e.mode==="text"?l=new _e("mtext",[n]):/[0-9]/.test(e.text)?l=new _e("mn",[n]):e.text==="\\prime"?l=new _e("mo",[n]):l=new _e("mi",[n]),a!==U6[l.type]&&l.setAttribute("mathvariant",a),l}});var Qm={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Jm={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Qs({type:"spacing",htmlBuilder(e,t){if(Jm.hasOwnProperty(e.text)){var n=Jm[e.text].className||"";if(e.mode==="text"){var a=Cf(e,t,"textord");return a.classes.push(n),a}else return Me(["mspace",n],[z1(e.text,e.mode,t)],t)}else{if(Qm.hasOwnProperty(e.text))return Me(["mspace",Qm[e.text]],[],t);throw new ze('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var n;if(Jm.hasOwnProperty(e.text))n=new _e("mtext",[new An(" ")]);else{if(Qm.hasOwnProperty(e.text))return new _e("mspace");throw new ze('Unknown type of space "'+e.text+'"')}return n}});var b3=()=>{var e=new _e("mtd",[]);return e.setAttribute("width","50%"),e};Qs({type:"tag",mathmlBuilder(e,t){var n=new _e("mtable",[new _e("mtr",[b3(),new _e("mtd",[Ql(e.body,t)]),b3(),new _e("mtd",[Ql(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var w3={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},k3={"\\textbf":"textbf","\\textmd":"textmd"},ZT={"\\textit":"textit","\\textup":"textup"},S3=(e,t)=>{var n=e.font;if(n){if(w3[n])return t.withTextFontFamily(w3[n]);if(k3[n])return t.withTextFontWeight(k3[n]);if(n==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(ZT[n])};Ye({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,l=t[0];return{type:"text",mode:n.mode,body:Tn(l),font:a}},htmlBuilder(e,t){var n=S3(e,t),a=_n(e.body,n,!0);return Me(["mord","text"],a,n)},mathmlBuilder(e,t){var n=S3(e,t);return Ql(e.body,n)}});Ye({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=_t(e.body,t),a=uu("underline-line",t),l=t.fontMetrics().defaultRuleThickness,u=It({positionType:"top",positionData:n.height,children:[{type:"kern",size:l},{type:"elem",elem:a},{type:"kern",size:3*l},{type:"elem",elem:n}]});return Me(["mord","underline"],[u],t)},mathmlBuilder(e,t){var n=new _e("mo",[new An("‾")]);n.setAttribute("stretchy","true");var a=new _e("munder",[Wt(e.body,t),n]);return a.setAttribute("accentunder","true"),a}});Ye({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=_t(e.body,t),a=t.fontMetrics().axisHeight,l=.5*(n.height-a-(n.depth+a));return It({positionType:"shift",positionData:l,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new _e("mpadded",[Wt(e.body,t)],["vcenter"]);return new _e("mrow",[n])}});Ye({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new ze("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=j3(e),a=[],l=t.havingStyle(t.style.text()),u=0;u<n.length;u++){var c=n[u];c==="~"&&(c="\\textasciitilde"),a.push(dr(c,"Typewriter-Regular",e.mode,l,["mord","texttt"]))}return Me(["mord","text"].concat(l.sizingClasses(t)),r6(a),l)},mathmlBuilder(e,t){var n=new An(j3(e)),a=new _e("mtext",[n]);return a.setAttribute("mathvariant","monospace"),a}});var j3=e=>e.body.replace(/ /g,e.star?"␣":" "),Wl=s6,H6=`[ \r
334
- ]`,QT="\\\\[a-zA-Z@]+",JT="\\\\[^\uD800-\uDFFF]",eA="("+QT+")"+H6+"*",tA=`\\\\(
335
- |[ \r ]+
336
- ?)[ \r ]*`,Gp="[̀-ͯ]",nA=new RegExp(Gp+"+$"),rA="("+H6+"+)|"+(tA+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(Gp+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Gp+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+eA)+("|"+JT+")");class C3{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(rA,"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 Qr("EOF",new zr(this,n,n));var a=this.tokenRegex.exec(t);if(a===null||a.index!==n)throw new ze("Unexpected character: '"+t[n]+"'",new Qr(t[n],new zr(this,n,n+1)));var l=a[6]||a[3]||(a[2]?"\\ ":" ");if(this.catcodes[l]===14){var u=t.indexOf(`
337
- `,this.tokenRegex.lastIndex);return u===-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=u+1,this.lex()}return new Qr(l,new zr(this,n,this.tokenRegex.lastIndex))}}class aA{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 ze("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 l=0;l<this.undefStack.length;l++)delete this.undefStack[l][t];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][t]=n)}else{var u=this.undefStack[this.undefStack.length-1];u&&!u.hasOwnProperty(t)&&(u[t]=this.current[t])}n==null?delete this.current[t]:this.current[t]=n}}var iA=M6;_("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});_("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});_("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});_("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});_("\\@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}});_("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");_("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var T3={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};_("\\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 ze("\\char` missing argument");a=t.text.charCodeAt(0)}else n=10;if(n){if(a=T3[t.text],a==null||a>=n)throw new ze("Invalid base-"+n+" digit "+t.text);for(var l;(l=T3[e.future().text])!=null&&l<n;)a*=n,a+=l,e.popToken()}return"\\@char{"+a+"}"});var U1=(e,t,n,a)=>{var l=e.consumeArg().tokens;if(l.length!==1)throw new ze("\\newcommand's first argument must be a macro name");var u=l[0].text,c=e.isDefined(u);if(c&&!t)throw new ze("\\newcommand{"+u+"} attempting to redefine "+(u+"; use \\renewcommand"));if(!c&&!n)throw new ze("\\renewcommand{"+u+"} when command "+u+" does not yet exist; use \\newcommand");var f=0;if(l=e.consumeArg().tokens,l.length===1&&l[0].text==="["){for(var h="",m=e.expandNextToken();m.text!=="]"&&m.text!=="EOF";)h+=m.text,m=e.expandNextToken();if(!h.match(/^\s*[0-9]+\s*$/))throw new ze("Invalid number of arguments: "+h);f=parseInt(h),l=e.consumeArg().tokens}return c&&a||e.macros.set(u,{tokens:l,numArgs:f}),""};_("\\newcommand",e=>U1(e,!1,!0,!1));_("\\renewcommand",e=>U1(e,!0,!1,!1));_("\\providecommand",e=>U1(e,!0,!0,!0));_("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(n=>n.text).join("")),""});_("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(n=>n.text).join("")),""});_("\\show",e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),Wl[n],ln.math[n],ln.text[n]),""});_("\\bgroup","{");_("\\egroup","}");_("~","\\nobreakspace");_("\\lq","`");_("\\rq","'");_("\\aa","\\r a");_("\\AA","\\r A");_("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");_("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");_("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");_("ℬ","\\mathscr{B}");_("ℰ","\\mathscr{E}");_("ℱ","\\mathscr{F}");_("ℋ","\\mathscr{H}");_("ℐ","\\mathscr{I}");_("ℒ","\\mathscr{L}");_("ℳ","\\mathscr{M}");_("ℛ","\\mathscr{R}");_("ℭ","\\mathfrak{C}");_("ℌ","\\mathfrak{H}");_("ℨ","\\mathfrak{Z}");_("\\Bbbk","\\Bbb{k}");_("\\llap","\\mathllap{\\textrm{#1}}");_("\\rlap","\\mathrlap{\\textrm{#1}}");_("\\clap","\\mathclap{\\textrm{#1}}");_("\\mathstrut","\\vphantom{(}");_("\\underbar","\\underline{\\text{#1}}");_("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');_("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");_("\\ne","\\neq");_("≠","\\neq");_("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");_("∉","\\notin");_("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");_("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");_("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");_("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");_("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");_("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");_("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");_("⟂","\\perp");_("‼","\\mathclose{!\\mkern-0.8mu!}");_("∌","\\notni");_("⌜","\\ulcorner");_("⌝","\\urcorner");_("⌞","\\llcorner");_("⌟","\\lrcorner");_("©","\\copyright");_("®","\\textregistered");_("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');_("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');_("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');_("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');_("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");_("⋮","\\vdots");_("\\varGamma","\\mathit{\\Gamma}");_("\\varDelta","\\mathit{\\Delta}");_("\\varTheta","\\mathit{\\Theta}");_("\\varLambda","\\mathit{\\Lambda}");_("\\varXi","\\mathit{\\Xi}");_("\\varPi","\\mathit{\\Pi}");_("\\varSigma","\\mathit{\\Sigma}");_("\\varUpsilon","\\mathit{\\Upsilon}");_("\\varPhi","\\mathit{\\Phi}");_("\\varPsi","\\mathit{\\Psi}");_("\\varOmega","\\mathit{\\Omega}");_("\\substack","\\begin{subarray}{c}#1\\end{subarray}");_("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");_("\\boxed","\\fbox{$\\displaystyle{#1}$}");_("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");_("\\implies","\\DOTSB\\;\\Longrightarrow\\;");_("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");_("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");_("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var A3={",":"\\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"},lA=new Set(["bin","rel"]);_("\\dots",function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in A3?t=A3[n]:(n.slice(0,4)==="\\not"||n in ln.math&&lA.has(ln.math[n].group))&&(t="\\dotsb"),t});var H1={")":!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};_("\\dotso",function(e){var t=e.future().text;return t in H1?"\\ldots\\,":"\\ldots"});_("\\dotsc",function(e){var t=e.future().text;return t in H1&&t!==","?"\\ldots\\,":"\\ldots"});_("\\cdots",function(e){var t=e.future().text;return t in H1?"\\@cdots\\,":"\\@cdots"});_("\\dotsb","\\cdots");_("\\dotsm","\\cdots");_("\\dotsi","\\!\\cdots");_("\\dotsx","\\ldots\\,");_("\\DOTSI","\\relax");_("\\DOTSB","\\relax");_("\\DOTSX","\\relax");_("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");_("\\,","\\tmspace+{3mu}{.1667em}");_("\\thinspace","\\,");_("\\>","\\mskip{4mu}");_("\\:","\\tmspace+{4mu}{.2222em}");_("\\medspace","\\:");_("\\;","\\tmspace+{5mu}{.2777em}");_("\\thickspace","\\;");_("\\!","\\tmspace-{3mu}{.1667em}");_("\\negthinspace","\\!");_("\\negmedspace","\\tmspace-{4mu}{.2222em}");_("\\negthickspace","\\tmspace-{5mu}{.277em}");_("\\enspace","\\kern.5em ");_("\\enskip","\\hskip.5em\\relax");_("\\quad","\\hskip1em\\relax");_("\\qquad","\\hskip2em\\relax");_("\\tag","\\@ifstar\\tag@literal\\tag@paren");_("\\tag@paren","\\tag@literal{({#1})}");_("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new ze("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});_("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");_("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");_("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");_("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");_("\\newline","\\\\\\relax");_("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var $6=Ue(ii["Main-Regular"][84][1]-.7*ii["Main-Regular"][65][1]);_("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+$6+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");_("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+$6+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");_("\\hspace","\\@ifstar\\@hspacer\\@hspace");_("\\@hspace","\\hskip #1\\relax");_("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");_("\\ordinarycolon",":");_("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");_("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');_("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');_("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');_("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');_("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');_("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');_("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');_("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');_("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');_("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');_("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');_("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');_("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');_("∷","\\dblcolon");_("∹","\\eqcolon");_("≔","\\coloneqq");_("≕","\\eqqcolon");_("⩴","\\Coloneqq");_("\\ratio","\\vcentcolon");_("\\coloncolon","\\dblcolon");_("\\colonequals","\\coloneqq");_("\\coloncolonequals","\\Coloneqq");_("\\equalscolon","\\eqqcolon");_("\\equalscoloncolon","\\Eqqcolon");_("\\colonminus","\\coloneq");_("\\coloncolonminus","\\Coloneq");_("\\minuscolon","\\eqcolon");_("\\minuscoloncolon","\\Eqcolon");_("\\coloncolonapprox","\\Colonapprox");_("\\coloncolonsim","\\Colonsim");_("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");_("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");_("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");_("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");_("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");_("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");_("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");_("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");_("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");_("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");_("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");_("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");_("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");_("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");_("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");_("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");_("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");_("\\nleqq","\\html@mathml{\\@nleqq}{≰}");_("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");_("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");_("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");_("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");_("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");_("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");_("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");_("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");_("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");_("\\imath","\\html@mathml{\\@imath}{ı}");_("\\jmath","\\html@mathml{\\@jmath}{ȷ}");_("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");_("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");_("⟦","\\llbracket");_("⟧","\\rrbracket");_("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");_("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");_("⦃","\\lBrace");_("⦄","\\rBrace");_("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");_("⦵","\\minuso");_("\\darr","\\downarrow");_("\\dArr","\\Downarrow");_("\\Darr","\\Downarrow");_("\\lang","\\langle");_("\\rang","\\rangle");_("\\uarr","\\uparrow");_("\\uArr","\\Uparrow");_("\\Uarr","\\Uparrow");_("\\N","\\mathbb{N}");_("\\R","\\mathbb{R}");_("\\Z","\\mathbb{Z}");_("\\alef","\\aleph");_("\\alefsym","\\aleph");_("\\Alpha","\\mathrm{A}");_("\\Beta","\\mathrm{B}");_("\\bull","\\bullet");_("\\Chi","\\mathrm{X}");_("\\clubs","\\clubsuit");_("\\cnums","\\mathbb{C}");_("\\Complex","\\mathbb{C}");_("\\Dagger","\\ddagger");_("\\diamonds","\\diamondsuit");_("\\empty","\\emptyset");_("\\Epsilon","\\mathrm{E}");_("\\Eta","\\mathrm{H}");_("\\exist","\\exists");_("\\harr","\\leftrightarrow");_("\\hArr","\\Leftrightarrow");_("\\Harr","\\Leftrightarrow");_("\\hearts","\\heartsuit");_("\\image","\\Im");_("\\infin","\\infty");_("\\Iota","\\mathrm{I}");_("\\isin","\\in");_("\\Kappa","\\mathrm{K}");_("\\larr","\\leftarrow");_("\\lArr","\\Leftarrow");_("\\Larr","\\Leftarrow");_("\\lrarr","\\leftrightarrow");_("\\lrArr","\\Leftrightarrow");_("\\Lrarr","\\Leftrightarrow");_("\\Mu","\\mathrm{M}");_("\\natnums","\\mathbb{N}");_("\\Nu","\\mathrm{N}");_("\\Omicron","\\mathrm{O}");_("\\plusmn","\\pm");_("\\rarr","\\rightarrow");_("\\rArr","\\Rightarrow");_("\\Rarr","\\Rightarrow");_("\\real","\\Re");_("\\reals","\\mathbb{R}");_("\\Reals","\\mathbb{R}");_("\\Rho","\\mathrm{P}");_("\\sdot","\\cdot");_("\\sect","\\S");_("\\spades","\\spadesuit");_("\\sub","\\subset");_("\\sube","\\subseteq");_("\\supe","\\supseteq");_("\\Tau","\\mathrm{T}");_("\\thetasym","\\vartheta");_("\\weierp","\\wp");_("\\Zeta","\\mathrm{Z}");_("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");_("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");_("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");_("\\bra","\\mathinner{\\langle{#1}|}");_("\\ket","\\mathinner{|{#1}\\rangle}");_("\\braket","\\mathinner{\\langle{#1}\\rangle}");_("\\Bra","\\left\\langle#1\\right|");_("\\Ket","\\left|#1\\right\\rangle");var F6=e=>t=>{var n=t.consumeArg().tokens,a=t.consumeArg().tokens,l=t.consumeArg().tokens,u=t.consumeArg().tokens,c=t.macros.get("|"),f=t.macros.get("\\|");t.macros.beginGroup();var h=y=>k=>{e&&(k.macros.set("|",c),l.length&&k.macros.set("\\|",f));var x=y;if(!y&&l.length){var C=k.future();C.text==="|"&&(k.popToken(),x=!0)}return{tokens:x?l:a,numArgs:0}};t.macros.set("|",h(!1)),l.length&&t.macros.set("\\|",h(!0));var m=t.consumeArg().tokens,g=t.expandTokens([...u,...m,...n]);return t.macros.endGroup(),{tokens:g.reverse(),numArgs:0}};_("\\bra@ket",F6(!1));_("\\bra@set",F6(!0));_("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");_("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");_("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");_("\\angln","{\\angl n}");_("\\blue","\\textcolor{##6495ed}{#1}");_("\\orange","\\textcolor{##ffa500}{#1}");_("\\pink","\\textcolor{##ff00af}{#1}");_("\\red","\\textcolor{##df0030}{#1}");_("\\green","\\textcolor{##28ae7b}{#1}");_("\\gray","\\textcolor{gray}{#1}");_("\\purple","\\textcolor{##9d38bd}{#1}");_("\\blueA","\\textcolor{##ccfaff}{#1}");_("\\blueB","\\textcolor{##80f6ff}{#1}");_("\\blueC","\\textcolor{##63d9ea}{#1}");_("\\blueD","\\textcolor{##11accd}{#1}");_("\\blueE","\\textcolor{##0c7f99}{#1}");_("\\tealA","\\textcolor{##94fff5}{#1}");_("\\tealB","\\textcolor{##26edd5}{#1}");_("\\tealC","\\textcolor{##01d1c1}{#1}");_("\\tealD","\\textcolor{##01a995}{#1}");_("\\tealE","\\textcolor{##208170}{#1}");_("\\greenA","\\textcolor{##b6ffb0}{#1}");_("\\greenB","\\textcolor{##8af281}{#1}");_("\\greenC","\\textcolor{##74cf70}{#1}");_("\\greenD","\\textcolor{##1fab54}{#1}");_("\\greenE","\\textcolor{##0d923f}{#1}");_("\\goldA","\\textcolor{##ffd0a9}{#1}");_("\\goldB","\\textcolor{##ffbb71}{#1}");_("\\goldC","\\textcolor{##ff9c39}{#1}");_("\\goldD","\\textcolor{##e07d10}{#1}");_("\\goldE","\\textcolor{##a75a05}{#1}");_("\\redA","\\textcolor{##fca9a9}{#1}");_("\\redB","\\textcolor{##ff8482}{#1}");_("\\redC","\\textcolor{##f9685d}{#1}");_("\\redD","\\textcolor{##e84d39}{#1}");_("\\redE","\\textcolor{##bc2612}{#1}");_("\\maroonA","\\textcolor{##ffbde0}{#1}");_("\\maroonB","\\textcolor{##ff92c6}{#1}");_("\\maroonC","\\textcolor{##ed5fa6}{#1}");_("\\maroonD","\\textcolor{##ca337c}{#1}");_("\\maroonE","\\textcolor{##9e034e}{#1}");_("\\purpleA","\\textcolor{##ddd7ff}{#1}");_("\\purpleB","\\textcolor{##c6b9fc}{#1}");_("\\purpleC","\\textcolor{##aa87ff}{#1}");_("\\purpleD","\\textcolor{##7854ab}{#1}");_("\\purpleE","\\textcolor{##543b78}{#1}");_("\\mintA","\\textcolor{##f5f9e8}{#1}");_("\\mintB","\\textcolor{##edf2df}{#1}");_("\\mintC","\\textcolor{##e0e5cc}{#1}");_("\\grayA","\\textcolor{##f6f7f7}{#1}");_("\\grayB","\\textcolor{##f0f1f2}{#1}");_("\\grayC","\\textcolor{##e3e5e6}{#1}");_("\\grayD","\\textcolor{##d6d8da}{#1}");_("\\grayE","\\textcolor{##babec2}{#1}");_("\\grayF","\\textcolor{##888d93}{#1}");_("\\grayG","\\textcolor{##626569}{#1}");_("\\grayH","\\textcolor{##3b3e40}{#1}");_("\\grayI","\\textcolor{##21242c}{#1}");_("\\kaBlue","\\textcolor{##314453}{#1}");_("\\kaGreen","\\textcolor{##71B307}{#1}");var P6={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class sA{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 aA(iA,n.macros),this.mode=a,this.stack=[]}feed(t){this.lexer=new C3(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,l;if(t){if(this.consumeSpaces(),this.future().text!=="[")return null;n=this.popToken(),{tokens:l,end:a}=this.consumeArg(["]"])}else({tokens:l,start:n,end:a}=this.consumeArg());return this.pushToken(new Qr("EOF",a.loc)),this.pushTokens(l),new Qr("",zr.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 l=this.future(),u,c=0,f=0;do{if(u=this.popToken(),n.push(u),u.text==="{")++c;else if(u.text==="}"){if(--c,c===-1)throw new ze("Extra }",u)}else if(u.text==="EOF")throw new ze("Unexpected end of input in a macro argument, expected '"+(t&&a?t[f]:"}")+"'",u);if(t&&a)if((c===0||c===1&&t[f]==="{")&&u.text===t[f]){if(++f,f===t.length){n.splice(-f,f);break}}else f=0}while(c!==0||a);return l.text==="{"&&n[n.length-1].text==="}"&&(n.pop(),n.shift()),n.reverse(),{tokens:n,start:l,end:u}}consumeArgs(t,n){if(n){if(n.length!==t+1)throw new ze("The length of delimiters doesn't match the number of args!");for(var a=n[0],l=0;l<a.length;l++){var u=this.popToken();if(a[l]!==u.text)throw new ze("Use of the macro doesn't match its definition",u)}}for(var c=[],f=0;f<t;f++)c.push(this.consumeArg(n&&n[f+1]).tokens);return c}countExpansion(t){if(this.expansionCount+=t,this.expansionCount>this.settings.maxExpand)throw new ze("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var n=this.popToken(),a=n.text,l=n.noexpand?null:this._getExpansion(a);if(l==null||t&&l.unexpandable){if(t&&l==null&&a[0]==="\\"&&!this.isDefined(a))throw new ze("Undefined control sequence: "+a);return this.pushToken(n),!1}this.countExpansion(1);var u=l.tokens,c=this.consumeArgs(l.numArgs,l.delimiters);if(l.numArgs){u=u.slice();for(var f=u.length-1;f>=0;--f){var h=u[f];if(h.text==="#"){if(f===0)throw new ze("Incomplete placeholder at end of macro body",h);if(h=u[--f],h.text==="#")u.splice(f+1,1);else if(/^[1-9]$/.test(h.text))u.splice(f,2,...c[+h.text-1]);else throw new ze("Not a valid argument number",h)}}}return this.pushTokens(u),u.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 Qr(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 l=this.stack.pop();l.treatAsRelax&&(l.noexpand=!1,l.treatAsRelax=!1),n.push(l)}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 l=typeof n=="function"?n(this):n;if(typeof l=="string"){var u=0;if(l.includes("#"))for(var c=l.replace(/##/g,"");c.includes("#"+(u+1));)++u;for(var f=new C3(l,this.settings),h=[],m=f.lex();m.text!=="EOF";)h.push(m),m=f.lex();h.reverse();var g={tokens:h,numArgs:u};return g}return l}isDefined(t){return this.macros.has(t)||Wl.hasOwnProperty(t)||ln.math.hasOwnProperty(t)||ln.text.hasOwnProperty(t)||P6.hasOwnProperty(t)}isExpandable(t){var n=this.macros.get(t);return n!=null?typeof n=="string"||typeof n=="function"||!n.unexpandable:Wl.hasOwnProperty(t)&&!Wl[t].primitive}}var E3=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Od=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),ep={"́":{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"}},N3={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class If{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 sA(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 ze("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 Qr("}")),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 l=this.fetch();if(If.endOfExpression.has(l.text)||n&&l.text===n||t&&Wl[l.text]&&Wl[l.text].infix)break;var u=this.parseAtom(n);if(u){if(u.type==="internal")continue}else break;a.push(u)}return this.mode==="text"&&this.formLigatures(a),this.handleInfixNodes(a)}handleInfixNodes(t){for(var n=-1,a,l=0;l<t.length;l++){var u=t[l];if(u.type==="infix"){if(n!==-1)throw new ze("only one infix operator per group",u.token);n=l,a=u.replaceWith}}if(n!==-1&&a){var c,f,h=t.slice(0,n),m=t.slice(n+1);h.length===1&&h[0].type==="ordgroup"?c=h[0]:c={type:"ordgroup",mode:this.mode,body:h},m.length===1&&m[0].type==="ordgroup"?f=m[0]:f={type:"ordgroup",mode:this.mode,body:m};var g;return a==="\\\\abovefrac"?g=this.callFunction(a,[c,t[n],f],[]):g=this.callFunction(a,[c,f],[]),[g]}else return t}handleSupSubscript(t){var n=this.fetch(),a=n.text;this.consume(),this.consumeSpaces();var l;do{var u;l=this.parseGroup(t)}while(((u=l)==null?void 0:u.type)==="internal");if(!l)throw new ze("Expected group after '"+a+"'",n);return l}formatUnsupportedCmd(t){for(var n=[],a=0;a<t.length;a++)n.push({type:"textord",mode:"text",text:t[a]});var l={type:"text",mode:this.mode,body:n},u={type:"color",mode:this.mode,color:this.settings.errorColor,body:[l]};return u}parseAtom(t){var n=this.parseGroup("atom",t);if((n==null?void 0:n.type)==="internal"||this.mode==="text")return n;for(var a,l;;){this.consumeSpaces();var u=this.fetch();if(u.text==="\\limits"||u.text==="\\nolimits"){if(n&&n.type==="op"){var c=u.text==="\\limits";n.limits=c,n.alwaysHandleSupSub=!0}else if(n&&n.type==="operatorname")n.alwaysHandleSupSub&&(n.limits=u.text==="\\limits");else throw new ze("Limit controls must follow a math operator",u);this.consume()}else if(u.text==="^"){if(a)throw new ze("Double superscript",u);a=this.handleSupSubscript("superscript")}else if(u.text==="_"){if(l)throw new ze("Double subscript",u);l=this.handleSupSubscript("subscript")}else if(u.text==="'"){if(a)throw new ze("Double superscript",u);var f={type:"textord",mode:this.mode,text:"\\prime"},h=[f];for(this.consume();this.fetch().text==="'";)h.push(f),this.consume();this.fetch().text==="^"&&h.push(this.handleSupSubscript("superscript")),a={type:"ordgroup",mode:this.mode,body:h}}else if(Od[u.text]){var m=E3.test(u.text),g=[];for(g.push(new Qr(Od[u.text])),this.consume();;){var y=this.fetch().text;if(!Od[y]||E3.test(y)!==m)break;g.unshift(new Qr(Od[y])),this.consume()}var k=this.subparse(g);m?l={type:"ordgroup",mode:"math",body:k}:a={type:"ordgroup",mode:"math",body:k}}else break}return a||l?{type:"supsub",mode:this.mode,base:n,sup:a,sub:l}:n}parseFunction(t,n){var a=this.fetch(),l=a.text,u=Wl[l];if(!u)return null;if(this.consume(),n&&n!=="atom"&&!u.allowedInArgument)throw new ze("Got function '"+l+"' with no arguments"+(n?" as "+n:""),a);if(this.mode==="text"&&!u.allowedInText)throw new ze("Can't use function '"+l+"' in text mode",a);if(this.mode==="math"&&u.allowedInMath===!1)throw new ze("Can't use function '"+l+"' in math mode",a);var{args:c,optArgs:f}=this.parseArguments(l,u);return this.callFunction(l,c,f,a,t)}callFunction(t,n,a,l,u){var c={funcName:t,parser:this,token:l,breakOnTokenText:u},f=Wl[t];if(f&&f.handler)return f.handler(c,n,a);throw new ze("No function handler for "+t)}parseArguments(t,n){var a=n.numArgs+n.numOptionalArgs;if(a===0)return{args:[],optArgs:[]};for(var l=[],u=[],c=0;c<a;c++){var f=n.argTypes&&n.argTypes[c],h=c<n.numOptionalArgs;("primitive"in n&&n.primitive&&f==null||n.type==="sqrt"&&c===1&&u[0]==null)&&(f="primitive");var m=this.parseGroupOfType("argument to '"+t+"'",f,h);if(h)u.push(m);else if(m!=null)l.push(m);else throw new ze("Null argument, please report this as a bug")}return{args:l,optArgs:u}}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 l=this.parseArgumentGroup(a,"text");return l!=null?{type:"styling",mode:l.mode,body:[l],style:"text",resetFont:!0}:null}case"raw":{var u=this.parseStringGroup("raw",a);return u!=null?{type:"raw",mode:"text",string:u.text}:null}case"primitive":{if(a)throw new ze("A primitive argument cannot be optional");var c=this.parseGroup(t);if(c==null)throw new ze("Expected group as "+t,this.fetch());return c}case"original":case null:case void 0:return this.parseArgumentGroup(a);default:throw new ze("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 l="",u;(u=this.fetch()).text!=="EOF";)l+=u.text,this.consume();return this.consume(),a.text=l,a}parseRegexGroup(t,n){for(var a=this.fetch(),l=a,u="",c;(c=this.fetch()).text!=="EOF"&&t.test(u+c.text);)l=c,u+=l.text,this.consume();if(u==="")throw new ze("Invalid "+n+": '"+a.text+"'",a);return a.range(l,u)}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 ze("Invalid color: '"+n.text+"'",n);var l=a[0];return/^[0-9a-f]{6}$/i.test(l)&&(l="#"+l),{type:"color-token",mode:this.mode,color:l}}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 l=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(n.text);if(!l)throw new ze("Invalid size: '"+n.text+"'",n);var u={number:+(l[1]+l[2]),unit:l[3]};if(!Z5(u))throw new ze("Invalid unit: '"+u.unit+"'",n);return{type:"size",mode:this.mode,value:u,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 l=this.mode;n&&this.switchMode(n),this.gullet.beginGroup();var u=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var c={type:"ordgroup",mode:this.mode,loc:a.loc,body:u};return n&&this.switchMode(l),c}parseGroup(t,n){var a=this.fetch(),l=a.text,u;if(l==="{"||l==="\\begingroup"){this.consume();var c=l==="{"?"}":"\\endgroup";this.gullet.beginGroup();var f=this.parseExpression(!1,c),h=this.fetch();this.expect(c),this.gullet.endGroup(),u={type:"ordgroup",mode:this.mode,loc:zr.range(a,h),body:f,semisimple:l==="\\begingroup"||void 0}}else if(u=this.parseFunction(n,t)||this.parseSymbol(),u==null&&l[0]==="\\"&&!P6.hasOwnProperty(l)){if(this.settings.throwOnError)throw new ze("Undefined control sequence: "+l,a);u=this.formatUnsupportedCmd(l),this.consume()}return u}formLigatures(t){for(var n=t.length-1,a=0;a<n;++a){var l=t[a];if(l.type==="textord"){var u=l.text,c=t[a+1];if(!(!c||c.type!=="textord")){if(u==="-"&&c.text==="-"){var f=t[a+2];a+1<n&&f&&f.type==="textord"&&f.text==="-"?(t.splice(a,3,{type:"textord",mode:"text",loc:zr.range(l,f),text:"---"}),n-=2):(t.splice(a,2,{type:"textord",mode:"text",loc:zr.range(l,c),text:"--"}),n-=1)}(u==="'"||u==="`")&&c.text===u&&(t.splice(a,2,{type:"textord",mode:"text",loc:zr.range(l,c),text:u+u}),n-=1)}}}}parseSymbol(){var t=this.fetch(),n=t.text;if(/^\\verb[^a-zA-Z]/.test(n)){this.consume();var a=n.slice(5),l=a.charAt(0)==="*";if(l&&(a=a.slice(1)),a.length<2||a.charAt(0)!==a.slice(-1))throw new ze(`\\verb assertion failed --
338
- please report what input caused this bug`);return a=a.slice(1,-1),{type:"verb",mode:"text",body:a,star:l}}N3.hasOwnProperty(n[0])&&!ln[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=N3[n[0]]+n.slice(1));var u=nA.exec(n);u&&(n=n.substring(0,u.index),n==="i"?n="ı":n==="j"&&(n="ȷ"));var c;if(ln[this.mode][n]){this.settings.strict&&this.mode==="math"&&Dp.includes(n)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+n[0]+'" used in math mode',t);var f=ln[this.mode][n].group,h=zr.range(t),m;ST(f)?m={type:"atom",mode:this.mode,family:f,loc:h,text:n}:m={type:f,mode:this.mode,loc:h,text:n},c=m}else if(n.charCodeAt(0)>=128)this.settings.strict&&(X5(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:zr.range(t),text:n};else return null;if(this.consume(),u)for(var g=0;g<u[0].length;g++){var y=u[0][g];if(!ep[y])throw new ze("Unknown accent ' "+y+"'",t);var k=ep[y][this.mode]||ep[y].text;if(!k)throw new ze("Accent "+y+" unsupported in "+this.mode+" mode",t);c={type:"accent",mode:this.mode,loc:zr.range(t),label:k,isStretchy:!1,isShifty:!0,base:c}}return c}}If.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var $1=function(t,n){if(!(typeof t=="string"||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var a=new If(t,n);delete a.gullet.macros.current["\\df@tag"];var l=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 ze("\\tag works only in display equations");l=[{type:"tag",mode:"text",body:l,tag:a.subparse([new Qr("\\df@tag")])}]}return l},F1=function(t,n,a){n.textContent="";var l=_f(t,a).toNode();n.appendChild(l)};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."),F1=function(){throw new ze("KaTeX doesn't work in quirks mode.")});var G6=function(t,n){var a=_f(t,n).toMarkup();return a},V6=function(t,n){var a=new E1(n);return $1(t,a)},Y6=function(t,n,a){if(a.throwOnError||!(t instanceof ze))throw t;var l=Me(["katex-error"],[new Jr(n)]);return l.setAttribute("title",t.toString()),l.setAttribute("style","color:"+a.errorColor),l},_f=function(t,n){var a=new E1(n);try{var l=$1(t,a);return pT(l,t,a)}catch(u){return Y6(u,t,a)}},W6=function(t,n){var a=new E1(n);try{var l=$1(t,a);return gT(l,t,a)}catch(u){return Y6(u,t,a)}},K6="0.16.47",X6={Span:pu,Anchor:Sf,SymbolNode:Jr,SvgNode:Xi,PathNode:Xl,LineNode:Mp},Vp={version:K6,render:F1,renderToString:G6,ParseError:ze,SETTINGS_SCHEMA:of,__parse:V6,__renderToDomTree:_f,__renderToHTMLTree:W6,__setFontMetrics:t6,__defineSymbol:w,__defineFunction:Ye,__defineMacro:_,__domTree:X6};const oR=Object.freeze(Object.defineProperty({__proto__:null,ParseError:ze,SETTINGS_SCHEMA:of,__defineFunction:Ye,__defineMacro:_,__defineSymbol:w,__domTree:X6,__parse:V6,__renderToDomTree:_f,__renderToHTMLTree:W6,__setFontMetrics:t6,default:Vp,get render(){return F1},renderToString:G6,version:K6},Symbol.toStringTag,{value:"Module"})),oA={};function uA(e){const t=this,n=e||oA,a=t.data(),l=a.micromarkExtensions||(a.micromarkExtensions=[]),u=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);l.push(gC(n)),u.push(oC()),c.push(uC(n))}function cA(e){return e.replace(/(^ {0,3}(`{3,}|~{3,})[^\n]*\n[\s\S]*?(?:^ {0,3}\2[^\n]*(?:\n|$)|(?![\s\S])))|(`+)([^`]|(?!\3)`)*?\3|\\\\|\\\(([\s\S]*?)\\\)|\\\[([\s\S]*?)\\\]/gm,(t,n,a,l,u,c,f)=>n||l||t==="\\\\"?t:c!==void 0?`$${c}$`:f!==void 0?`
339
-
340
- $$
341
- ${f.trim()}
342
- $$
343
-
344
- `:t)}const M3=/[#.]/g;function dA(e,t){const n=e||"",a={};let l=0,u,c;for(;l<n.length;){M3.lastIndex=l;const f=M3.exec(n),h=n.slice(l,f?f.index:n.length);h&&(u?u==="#"?a.id=h:Array.isArray(a.className)?a.className.push(h):a.className=[h]:c=h,l+=h.length),f&&(u=f[0],l++)}return{type:"element",tagName:c||t||"div",properties:a,children:[]}}function Z6(e,t,n){const a=n?pA(n):void 0;function l(u,c,...f){let h;if(u==null){h={type:"root",children:[]};const m=c;f.unshift(m)}else{h=dA(u,t);const m=h.tagName.toLowerCase(),g=a?a.get(m):void 0;if(h.tagName=g||m,fA(c))f.unshift(c);else for(const[y,k]of Object.entries(c))hA(e,h.properties,y,k)}for(const m of f)Yp(h.children,m);return h.type==="element"&&h.tagName==="template"&&(h.content={type:"root",children:h.children},h.children=[]),h}return l}function fA(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 l=t[a];if(l&&typeof l=="object"){if(!Array.isArray(l))return!0;const u=l;for(const c of u)if(typeof c!="number"&&typeof c!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function hA(e,t,n,a){const l=Kv(e,n);let u;if(a!=null){if(typeof a=="number"){if(Number.isNaN(a))return;u=a}else typeof a=="boolean"?u=a:typeof a=="string"?l.spaceSeparated?u=i2(a):l.commaSeparated?u=e2(a):l.commaOrSpaceSeparated?u=i2(e2(a).join(" ")):u=D3(l,l.property,a):Array.isArray(a)?u=[...a]:u=l.property==="style"?mA(a):String(a);if(Array.isArray(u)){const c=[];for(const f of u)c.push(D3(l,l.property,f));u=c}l.property==="className"&&Array.isArray(t.className)&&(u=t.className.concat(u)),t[l.property]=u}}function Yp(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)Yp(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Yp(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function D3(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Kc(n)===Kc(t)))return!0}return n}function mA(e){const t=[];for(const[n,a]of Object.entries(e))t.push([n,a].join(": "));return t.join("; ")}function pA(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const gA=["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"],yA=Z6(Xv,"div"),vA=Z6(vf,"g",gA),tp={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function xA(e,t){return Q6(e,{})||{type:"root",children:[]}}function Q6(e,t){const n=bA(e,t);return n&&t.afterTransform&&t.afterTransform(e,n),n}function bA(e,t){switch(e.nodeType){case 1:return jA(e,t);case 3:return kA(e);case 8:return SA(e);case 9:return z3(e,t);case 10:return wA();case 11:return z3(e,t);default:return}}function z3(e,t){return{type:"root",children:J6(e,t)}}function wA(){return{type:"doctype"}}function kA(e){return{type:"text",value:e.nodeValue||""}}function SA(e){return{type:"comment",value:e.nodeValue||""}}function jA(e,t){const n=e.namespaceURI,a=n===tp.svg?vA:yA,l=n===tp.html?e.tagName.toLowerCase():e.tagName,u=n===tp.html&&l==="template"?e.content:e,c=e.getAttributeNames(),f={};let h=-1;for(;++h<c.length;)f[c[h]]=e.getAttribute(c[h])||"";return a(l,f,J6(u,t))}function J6(e,t){const n=e.childNodes,a=[];let l=-1;for(;++l<n.length;){const u=Q6(n[l],t);u!==void 0&&a.push(u)}return a}new DOMParser;function CA(e,t){const n=TA(e);return xA(n)}function TA(e){const t=document.createElement("template");return t.innerHTML=e,t.content}const R3=(function(e,t,n){const a=i0(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]}),Js=(function(e){if(e==null)return NA;if(typeof e=="string")return EA(e);if(typeof e=="object")return AA(e);if(typeof e=="function")return P1(e);throw new Error("Expected function, string, or array as `test`")});function AA(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Js(e[n]);return P1(a);function a(...l){let u=-1;for(;++u<t.length;)if(t[u].apply(this,l))return!0;return!1}}function EA(e){return P1(t);function t(n){return n.tagName===e}}function P1(e){return t;function t(n,a,l){return!!(MA(n)&&e.call(this,n,typeof a=="number"?a:void 0,l||void 0))}}function NA(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function MA(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const O3=/\n/g,I3=/[\t ]+/g,Wp=Js("br"),_3=Js(BA),DA=Js("p"),L3=Js("tr"),zA=Js(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",LA,qA]),ex=Js(["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 RA(e,t){const n=t||{},a="children"in e?e.children:[],l=ex(e),u=rx(e,{whitespace:n.whitespace||"normal"}),c=[];(e.type==="text"||e.type==="comment")&&c.push(...nx(e,{breakBefore:!0,breakAfter:!0}));let f=-1;for(;++f<a.length;)c.push(...tx(a[f],e,{whitespace:u,breakBefore:f?void 0:l,breakAfter:f<a.length-1?Wp(a[f+1]):l}));const h=[];let m;for(f=-1;++f<c.length;){const g=c[f];typeof g=="number"?m!==void 0&&g>m&&(m=g):g&&(m!==void 0&&m>-1&&h.push(`
345
- `.repeat(m)||" "),m=-1,h.push(g))}return h.join("")}function tx(e,t,n){return e.type==="element"?OA(e,t,n):e.type==="text"?n.whitespace==="normal"?nx(e,n):IA(e):[]}function OA(e,t,n){const a=rx(e,n),l=e.children||[];let u=-1,c=[];if(zA(e))return c;let f,h;for(Wp(e)||L3(e)&&R3(t,e,L3)?h=`
346
- `:DA(e)?(f=2,h=2):ex(e)&&(f=1,h=1);++u<l.length;)c=c.concat(tx(l[u],e,{whitespace:a,breakBefore:u?void 0:f,breakAfter:u<l.length-1?Wp(l[u+1]):h}));return _3(e)&&R3(t,e,_3)&&c.push(" "),f&&c.unshift(f),h&&c.push(h),c}function nx(e,t){const n=String(e.value),a=[],l=[];let u=0;for(;u<=n.length;){O3.lastIndex=u;const h=O3.exec(n),m=h&&"index"in h?h.index:n.length;a.push(_A(n.slice(u,m).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),u===0?t.breakBefore:!0,m===n.length?t.breakAfter:!0)),u=m+1}let c=-1,f;for(;++c<a.length;)a[c].charCodeAt(a[c].length-1)===8203||c<a.length-1&&a[c+1].charCodeAt(0)===8203?(l.push(a[c]),f=void 0):a[c]?(typeof f=="number"&&l.push(f),l.push(a[c]),f=0):(c===0||c===a.length-1)&&l.push(0);return l}function IA(e){return[String(e.value)]}function _A(e,t,n){const a=[];let l=0,u;for(;l<e.length;){I3.lastIndex=l;const c=I3.exec(e);u=c?c.index:e.length,!l&&!u&&c&&!t&&a.push(""),l!==u&&a.push(e.slice(l,u)),l=c?u+c[0].length:u}return l!==u&&!n&&a.push(""),a.join(" ")}function rx(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 LA(e){return!!(e.properties||{}).hidden}function BA(e){return e.tagName==="td"||e.tagName==="th"}function qA(e){return e.tagName==="dialog"&&!(e.properties||{}).open}const UA={},HA=[];function $A(e){const t=e||UA;return function(n,a){k1(n,"element",function(l,u){const c=Array.isArray(l.properties.className)?l.properties.className:HA,f=c.includes("language-math"),h=c.includes("math-display"),m=c.includes("math-inline");let g=h;if(!f&&!h&&!m)return;let y=u[u.length-1],k=l;if(l.tagName==="code"&&f&&y&&y.type==="element"&&y.tagName==="pre"&&(k=y,y=u[u.length-2],g=!0),!y)return;const x=RA(k,{whitespace:"pre"});let C;try{C=Vp.renderToString(x,{...t,displayMode:g,throwOnError:!0})}catch(R){const O=R,M=O.name.toLowerCase();a.message("Could not render math with KaTeX",{ancestors:[...u,l],cause:O,place:l.position,ruleId:M,source:"rehype-katex"});try{C=Vp.renderToString(x,{...t,displayMode:g,strict:"ignore",throwOnError:!1})}catch{C=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(t.errorColor||"#cc0000"),title:String(R)},children:[{type:"text",value:x}]}]}}typeof C=="string"&&(C=CA(C).children);const D=y.children.indexOf(k);return y.children.splice(D,1,...C),S5})}}function FA(e,t,n){return e?t?n==="delta"?e+t:t.startsWith(e)?t:e:e:t}function PA(e,t,n){if(e.kind||e.status!=="pending")return e.status;const a=[...t].reverse().find(l=>l.nodeId===e.id);return a?a.status==="completed"?n.some(l=>l.executionId===a.id&&l.type==="result")?"delivered":"awaiting_review":["accepted","running","failed","cancelled"].includes(a.status)?a.status:e.status:e.status}function GA(e,t){var l;if(!["input:cotask_report","input:cotask_execution"].includes(e.subtype))return null;const n=Date.parse(e.createdAt);return((l=t.filter(u=>(!e.turnId||e.turnId===u.id)&&Date.parse(u.startedAt)<n&&(!u.finishedAt||n<=Date.parse(u.finishedAt))).sort((u,c)=>Date.parse(c.startedAt)-Date.parse(u.startedAt))[0])==null?void 0:l.id)??null}function VA(e){const t=e.phase??e.status,n=e.nodeActivity;if(!n||["draft","finished","completed","cancelled"].includes(t))return[{status:t}];const a=[];return t!=="running"&&a.push({status:t}),n.blocked>0&&a.push({status:"blocked",count:n.blocked}),n.waiting>0&&a.push({status:"waiting",count:n.waiting}),t==="running"&&(n.running>0||a.length===0)&&a.push({status:"running"}),a}const e0=224,Yi=76,B3=e=>`${e.x},${e.y}`,np=(e,t)=>Math.hypot(e.x-t.x,e.y-t.y),YA=(e,t)=>({x:(e.x+t.x)/2,y:(e.y+t.y)/2});function Kp(e,t,n=0){const a=Math.min(...e.map(g=>g.x)),l=Math.max(...e.map(g=>g.x)),u=Math.min(...e.map(g=>g.y)),c=Math.max(...e.map(g=>g.y));if(l<t.x-4||a>t.x+e0+4||c<t.y-4||u>t.y+(t.height??Yi)+4)return!1;if(n>=16||Math.max(l-a,c-u)<.25)return!0;const f=[e[0]],h=[e[e.length-1]];let m=e;for(;m.length>1;)m=m.slice(1).map((g,y)=>YA(m[y],g)),f.push(m[0]),h.unshift(m[m.length-1]);return Kp(f,t,n+1)||Kp(h,t,n+1)}function q3(e,t){return e.every(n=>t.every(a=>!Kp(n,a)))}function WA(e,t){const n=[];let a=e[0];const l=(u,c,f)=>{const h=f/np(u,c);return{x:u.x+(c.x-u.x)*h,y:u.y+(c.y-u.y)*h}};for(let u=1;u<e.length-1;u++){const c=e[u],f=e[u-1],h=e[u+1],m=Math.min(t,np(c,f)/2,np(c,h)/2);if(m<.001){n.push([a,c]),a=c;continue}const g=l(c,f,m),y=l(c,h,m);n.push([a,g],[g,c,y]),a=y}return n.push([a,e[e.length-1]]),n}function U3(e){return`M ${B3(e[0][0])} `+e.map(t=>`${t.length===4?"C":t.length===3?"Q":"L"} ${t.slice(1).map(B3).join(" ")}`).join(" ")}function ax(e,t){const n=e[0],a=e[e.length-1],l=(n.y+a.y)/2,u=[[n,{x:n.x,y:l},{x:a.x,y:l},a]];if(a.y>n.y&&q3(u,t))return{path:U3(u),segments:u};for(const c of[64,40,24,12,6,2,0]){const f=WA(e,c);if(q3(f,t))return{path:U3(f),segments:f}}throw new Error("No unobstructed CoTask route")}function KA(e){return JSON.stringify(e.map(t=>({id:t.id,dependencies:[...t.dependencies].sort(),height:t.height??Yi})).sort((t,n)=>t.id.localeCompare(n.id)))}function ix(e){const t=new Map,n=new Map,a=new Map(e.map(y=>[y.id,y])),l=[];for(;a.size;){const y=[...a.values()].filter(x=>x.dependencies.every(C=>n.has(C)||!a.has(C))),k=y.length?y:[...a.values()];l.push(k);for(const x of k)a.delete(x.id),n.set(x.id,l.length-1)}const u=Math.max(1,...l.map(y=>y.length))*296-24;let c=24;l.forEach(y=>{y.forEach((k,x)=>t.set(k.id,{x:(u-(y.length*296-72))/2+x*296,y:c})),c+=Math.max(Yi,...y.map(k=>k.height??Yi))+80});const f=new Map(e.map(y=>[y.id,y.height??Yi])),h=[...t].map(([y,k])=>({id:y,...k,height:f.get(y)})),m=[];let g=u;for(const y of e)for(const k of y.dependencies){const x=t.get(k),C=t.get(y.id);if(!x||!C)continue;const D={x:x.x+e0/2,y:x.y+(f.get(k)??Yi)},R={x:C.x+e0/2,y:C.y};g+=18;const O=[D,{x:D.x,y:D.y+25},{x:g,y:D.y+25},{x:g,y:R.y-25},{x:R.x,y:R.y-25},R],M=h.filter(q=>q.id!==k&&q.id!==y.id);m.push({source:k,target:y.id,path:ax(O,M).path})}return{positions:t,edges:m,width:g+48,height:Math.max(124,c-80+24)}}async function XA(e){var m;if(!e.length)return ix(e);const{default:t}=await an(async()=>{const{default:g}=await import("./elk.bundled-u20jT_nU.js").then(y=>y.e);return{default:g}},[],import.meta.url),n=new Set(e.map(g=>g.id)),a=e.flatMap(g=>g.dependencies.filter(y=>n.has(y)).map(y=>({source:y,target:g.id}))),u=await new t().layout({id:"root",layoutOptions:{"elk.algorithm":"layered","elk.direction":"DOWN","elk.edgeRouting":"ORTHOGONAL","elk.spacing.nodeNode":"40","elk.layered.spacing.nodeNodeBetweenLayers":"80","elk.layered.spacing.edgeNodeBetweenLayers":"18","elk.padding":"[top=24,left=24,bottom=24,right=24]","elk.layered.crossingMinimization.strategy":"LAYER_SWEEP","elk.layered.nodePlacement.strategy":"NETWORK_SIMPLEX"},children:e.map(g=>({id:g.id,width:e0,height:g.height??Yi})),edges:a.map((g,y)=>({id:`edge-${y}`,sources:[g.source],targets:[g.target]}))}),c=(u.children??[]).map(g=>({id:g.id,x:g.x??0,y:g.y??0,height:g.height})),f=new Map((m=u.edges)==null?void 0:m.map(g=>[g.id,g])),h=a.map((g,y)=>{var C,D;const k=(D=(C=f.get(`edge-${y}`))==null?void 0:C.sections)==null?void 0:D[0];if(!k)throw new Error("Missing CoTask dependency route");const x=[k.startPoint,...k.bendPoints??[],k.endPoint];return{...g,path:ax(x,c.filter(R=>R.id!==g.source&&R.id!==g.target)).path}});return{positions:new Map(c.map(g=>[g.id,g])),edges:h,width:u.width??320,height:u.height??196}}const H3={pending:"待开始",completed:"已确认完成",blocked:"已阻塞",cancelled:"已取消",running:"执行中",accepted:"等待执行",failed:"执行失败",delivered:"已交付,待确认",awaiting_review:"执行已结束,待确认"};function ZA({nodes:e,members:t,executions:n,reports:a,selectedId:l,onSelect:u,onDismiss:c,detail:f,finalCheckpointId:h}){const m=e.some(oe=>oe.kind!==void 0),g=(oe,U)=>oe.kind==="checkpoint"?{pending:"等待前置完成",waiting:"等待 Owner 继续",completed:"已继续"}[U]??H3[U]??U:oe.kind&&U==="completed"?"已完成":H3[U]??U,[y,k]=A.useState({}),x=A.useRef(new Map);A.useEffect(()=>{const oe=new ResizeObserver(()=>{k(U=>{const B=Object.fromEntries([...x.current].map(([ee,z])=>[ee,z.offsetHeight]));return Object.keys(B).length===Object.keys(U).length&&Object.entries(B).every(([ee,z])=>U[ee]===z)?U:B})});return x.current.forEach(U=>oe.observe(U)),()=>oe.disconnect()},[e.map(oe=>oe.id).join("\0")]);const C=KA(e.map(oe=>({...oe,height:y[oe.id]??Yi}))),D=A.useMemo(()=>ix(JSON.parse(C)),[C]),[R,O]=A.useState(null),[M,q]=A.useState(!1),L=(R==null?void 0:R.topology)===C?R.graph:D;A.useEffect(()=>{let oe=!0;return q(!1),XA(JSON.parse(C)).then(U=>{oe&&O({topology:C,graph:U})}).catch(()=>{oe&&q(!0)}),()=>{oe=!1}},[C]);const K=A.useRef(null),[P,H]=A.useState({width:900,height:560}),[X,J]=A.useState(1),[F,he]=A.useState(!1),me=A.useRef(!1),Ae=A.useRef(null),je=A.useId().replace(/:/g,"");A.useEffect(()=>{if(!K.current)return;const oe=new ResizeObserver(([U])=>H({width:U.contentRect.width,height:U.contentRect.height}));return oe.observe(K.current),()=>oe.disconnect()},[]);const pe=Math.min(1,Math.max(.15,Math.min((P.width-32)/L.width,(P.height-32)/L.height))),Z=X??pe,ge=new Map(e.map(oe=>[oe.id,PA(oe,n,a)])),ye=e.find(oe=>oe.id===l);return o.jsxs("section",{className:"cotask-graph","aria-label":"Task dependency graph",children:[o.jsxs("div",{className:"cotask-graph-toolbar",children:[o.jsxs("span",{children:["Arrows show dependencies ",o.jsxs("span",{className:"cotask-graph-count",children:["· ",e.length," nodes / ",L.edges.length," dependencies"]}),M&&o.jsx("small",{role:"status",children:" · 自动布局暂不可用,已显示基础布局"})]}),o.jsxs("div",{children:[o.jsx("button",{"aria-label":"Zoom out",onClick:()=>J(Math.max(.15,Z-.15)),children:"−"}),o.jsxs("span",{children:[Math.round(Z*100),"%"]}),o.jsx("button",{"aria-label":"Zoom in",onClick:()=>J(Math.min(2,Z+.15)),children:"+"}),o.jsx("button",{onClick:()=>J(1),children:"100%"}),o.jsx("button",{onClick:()=>J(null),children:"Fit to view"})]})]}),o.jsxs("div",{className:"cotask-graph-stage",children:[o.jsx("div",{className:`cotask-graph-viewport${F?" dragging":""}`,ref:K,"data-layout":(R==null?void 0:R.topology)===C?"adaptive":"fallback",onClickCapture:oe=>{me.current&&(oe.preventDefault(),oe.stopPropagation())},onClick:oe=>{oe.target.closest("button")||c()},onPointerDown:oe=>{if(oe.button!==0||oe.target.closest(".cotask-node-text"))return;me.current=!1;const U=oe.currentTarget;Ae.current={id:oe.pointerId,x:oe.clientX,y:oe.clientY,left:U.scrollLeft,top:U.scrollTop,moved:!1}},onPointerMove:oe=>{if(!Ae.current||Ae.current.id!==oe.pointerId)return;const U=oe.clientX-Ae.current.x,B=oe.clientY-Ae.current.y;Math.abs(U)+Math.abs(B)>4&&(Ae.current.moved=!0,he(!0),oe.currentTarget.setPointerCapture(oe.pointerId),oe.preventDefault()),Ae.current.moved&&(oe.currentTarget.scrollLeft=Ae.current.left-U,oe.currentTarget.scrollTop=Ae.current.top-B)},onPointerUp:oe=>{Ae.current&&(me.current=Ae.current.moved,Ae.current=null,he(!1),oe.currentTarget.hasPointerCapture(oe.pointerId)&&oe.currentTarget.releasePointerCapture(oe.pointerId),window.setTimeout(()=>{me.current=!1},0))},onPointerCancel:()=>{Ae.current=null,he(!1)},onLostPointerCapture:()=>{Ae.current=null,he(!1)},children:o.jsx("div",{className:"cotask-graph-scroll",style:{width:Math.max(P.width,L.width*Z),height:Math.max(P.height,L.height*Z)},children:o.jsxs("div",{className:"cotask-graph-canvas",style:{width:L.width,height:L.height,transform:`scale(${Z})`,left:0,top:0},children:[o.jsxs("svg",{width:L.width,height:L.height,className:"cotask-graph-edges","aria-hidden":"true",children:[o.jsx("defs",{children:["default","complete","selected"].map(oe=>o.jsx("marker",{id:`${je}-${oe}`,markerWidth:"8",markerHeight:"8",refX:"7",refY:"4",orient:"auto",markerUnits:"userSpaceOnUse",children:o.jsx("path",{d:"M 1 1 L 7 4 L 1 7 Z",className:`cotask-arrow-${oe}`})},oe))}),L.edges.map(oe=>{const U=l&&[oe.source,oe.target].includes(l)?"selected":ge.get(oe.source)==="completed"?"complete":"default";return o.jsx("path",{"data-source":oe.source,"data-target":oe.target,d:oe.path,className:`cotask-edge ${U}`,markerEnd:`url(#${je}-${U})`},`${oe.source}:${oe.target}`)})]}),e.map(oe=>{var ee;const U=L.positions.get(oe.id),B=ge.get(oe.id);return o.jsxs("button",{ref:z=>{z?x.current.set(oe.id,z):x.current.delete(oe.id)},className:`cotask-graph-node ${B}${oe.kind==="checkpoint"?" checkpoint":""}${l===oe.id?" selected":""}`,style:{left:U.x,top:U.y,width:e0,minHeight:Yi},"aria-pressed":l===oe.id,onClick:()=>u(oe),title:oe.dependencies.length?`Depends on: ${oe.dependencies.map(z=>{var te;return((te=e.find(Te=>Te.id===z))==null?void 0:te.name)??z}).join(", ")}`:"No dependencies",children:[oe.dependencies.length>0&&o.jsx("i",{className:"cotask-node-port input"}),o.jsx("strong",{className:"cotask-node-text",children:oe.name}),o.jsxs("span",{className:"cotask-graph-node-footer",children:[o.jsx("span",{className:"cotask-graph-node-member cotask-node-text",children:oe.kind==="checkpoint"?o.jsx(o.Fragment,{children:o.jsxs("span",{className:"cotask-checkpoint-type",children:[o.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true",children:o.jsx("path",{d:"M6 1 11 6 6 11 1 6Z",fill:"none",stroke:"currentColor",strokeWidth:"1.5"})}),oe.id===h?"最终检查点":"检查点"]})}):((ee=t.find(z=>z.id===oe.memberId))==null?void 0:ee.name)??oe.memberId}),o.jsxs("span",{className:"cotask-graph-node-status",children:[o.jsx("i",{}),o.jsx("span",{className:"cotask-node-text",children:g(oe,B)})]})]}),L.edges.some(z=>z.source===oe.id)&&o.jsx("i",{className:"cotask-node-port output"})]},oe.id)})]})})}),ye&&o.jsxs("aside",{className:"cotask-node-drawer","aria-label":`Node details: ${ye.name}`,onKeyDown:oe=>{oe.key==="Escape"&&(oe.stopPropagation(),c())},children:[o.jsxs("header",{children:[o.jsx("strong",{children:ye.name}),o.jsx("button",{onClick:c,"aria-label":"Close node details",children:"关闭"})]}),o.jsx("div",{className:"cotask-node-drawer-content",children:f},ye.id)]})]}),o.jsxs("div",{className:"cotask-graph-legend",children:[o.jsxs("span",{children:[o.jsx("i",{className:"running"}),"执行中"]}),o.jsxs("span",{children:[o.jsx("i",{className:"delivered"}),m?"检查点等待继续":"待 Owner 确认"]}),o.jsxs("span",{children:[o.jsx("i",{className:"completed"}),m?"已完成 / 已继续":"已确认完成"]}),o.jsxs("span",{children:[o.jsx("i",{className:"pending"}),"待开始"]}),o.jsx("span",{children:m?"执行节点报告结果并正常结束后自动完成;检查点由 Owner 检查后继续":"点击节点查看上下文与报告;成员执行结束不等于节点已确认完成"})]})]})}const lx=e=>({draft:"草稿",running:"运行中",pausing:"正在暂停",paused:"已暂停",waiting:"等待继续",finished:"已结束",pending:"Pending",completed:"Completed",blocked:"Blocked",cancelled:"Cancelled",accepted:"Accepted",failed:"Failed"})[e]??e;function rp({task:e}){const t=VA(e),n={running:["active","进行中","M8 5l10 7-10 7Z"],finished:["done","已结束","m6 12 4 4 8-8"],completed:["done","已结束","m6 12 4 4 8-8"],paused:["attention","已暂停","M9 7v10M15 7v10"],pausing:["attention","正在暂停","M9 7v10M15 7v10"],waiting:["attention","等待检查","M12 6v6l4 2"],blocked:["danger","存在阻塞","M12 6v7m0 3v1"],failed:["danger","失败","M12 6v7m0 3v1"],cancelled:["neutral","已取消","m8 8 8 8m0-8-8 8"],draft:["neutral","草稿","M8 8h8M8 12h8M8 16h5"]};return o.jsx("span",{className:"cotask-task-statuses",children:t.map(({status:a,count:l})=>{const[u,c,f]=n[a]??["neutral",lx(a),"M12 6v6l4 2"];return o.jsxs("span",{className:`cotask-task-status ${u}`,children:[o.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[o.jsx("circle",{cx:"12",cy:"12",r:"10"}),o.jsx("path",{d:f})]}),c,l!=null&&` · ${l}`]},a)})})}function QA({ownerId:e,ownerName:t,request:n,onExpanded:a,renderMember:l,renderMarkdown:u}){const[c,f]=A.useState([]),[h,m]=A.useState(null),[g,y]=A.useState(null),[k,x]=A.useState("graph"),[C,D]=A.useState(null),[R,O]=A.useState(null),[M,q]=A.useState(null),[L,K]=A.useState([]),[P,H]=A.useState(null),[X,J]=A.useState(null),[F,he]=A.useState([]),[me,Ae]=A.useState(""),je=A.useRef(null),pe=A.useRef(0),Z=A.useRef("");Z.current=`${h}:${g==null?void 0:g.task.revision}`;const ge=A.useRef(C);ge.current=C;const ye=`conversations/${encodeURIComponent(e)}/cotasks`;A.useEffect(()=>{let ie=!0;const Ee=async()=>{try{const Pe=await n(ye);ie&&f(Pe.tasks)}catch(Pe){ie&&Ae(String(Pe))}};Ee();const Oe=window.setInterval(()=>void Ee(),5e3);return()=>{ie=!1,window.clearInterval(Oe)}},[ye,n]),A.useEffect(()=>(a(h!==null),()=>a(!1)),[h,a]),A.useEffect(()=>{if(!h)return;let ie=!0;const Ee=async()=>{try{const Pe=await n(`${ye}/${encodeURIComponent(h)}`);if(ie&&(y(Pe),Ae("")),k==="operations"){const Xe=await n(`${ye}/${encodeURIComponent(h)}`,{operations:!0});ie&&he(Xe.operations)}}catch(Pe){ie&&Ae(String(Pe))}};Ee();const Oe=window.setInterval(()=>void Ee(),3e3);return()=>{ie=!1,window.clearInterval(Oe)}},[h,ye,n,k]),A.useEffect(()=>{var ie;h&&((ie=je.current)==null||ie.focus())},[h]),A.useEffect(()=>{pe.current++,H(null),J(null),K([])},[g==null?void 0:g.task.revision]);const oe=JSON.stringify(g==null?void 0:g.reports.map(ie=>ie.id)),U=JSON.stringify(g==null?void 0:g.nodes.map(ie=>[ie.id,ie.status,ie.reason]));A.useEffect(()=>{if(!h||!R||!g)return;let ie=!0;if(!g.nodes.some(Ee=>Ee.id===R)){O(null),q(null);return}return n(`${ye}/${encodeURIComponent(h)}`,{nodeIds:[R]}).then(Ee=>{ie&&q(Ee.nodes[0]??null)}).catch(Ee=>{ie&&Ae(String(Ee))}),()=>{ie=!1}},[h,R,g==null?void 0:g.task.revision,oe,U,ye,n]);const B=ie=>{O(null),pe.current++,H(null),J(null),he([]),Ae(""),y(null),m(ie),x("graph"),D(null),q(null),K([])},ee=()=>{pe.current++,O(null),q(null),K([])},z=()=>{pe.current++,m(null)},te=c.find(ie=>ie.status==="running")??c.find(ie=>ie.status==="draft")??c[0];if(!h)return te?o.jsxs("div",{className:"cotask-launcher",children:[o.jsxs("button",{className:"cotask-launch-primary",onClick:()=>B(te.id),children:[o.jsxs("span",{className:"cotask-launch-heading",children:[o.jsx("span",{children:"CoTask"}),o.jsx(rp,{task:te})]}),o.jsx("strong",{children:te.name}),o.jsxs("small",{children:[te.nodeCount," 个节点 ↗"]})]}),c.length>1&&o.jsxs("details",{className:"cotask-task-list",children:[o.jsxs("summary",{children:["其他任务(",c.length-1,")"]}),c.filter(ie=>ie.id!==te.id).map(ie=>o.jsxs("button",{onClick:()=>B(ie.id),children:[o.jsx("strong",{children:ie.name}),o.jsx(rp,{task:ie})]},ie.id))]})]}):null;const Te=ie=>{R!==ie.id&&(pe.current++,Ae(""),q(null),K([]),O(ie.id))},Re=async ie=>{const Ee=++pe.current;try{const Oe=await n(`${ye}/${h}`,{reportIds:[ie.id]});Ee===pe.current&&K(Oe.reports)}catch(Oe){Ae(String(Oe))}},He=g==null?void 0:g.bindings.find(ie=>ie.memberId===C),rt=g==null?void 0:g.members.find(ie=>ie.id===C),de=(ie,Ee=e)=>o.jsx("div",{className:"cotask-markdown",children:u(ie??"",Ee)});return o.jsx("div",{className:"context-panel-overlay settings-overlay cotask-overlay",children:o.jsxs("section",{className:"context-panel settings-panel cotask-frame",role:"dialog","aria-modal":"true","aria-label":"CoTask",tabIndex:-1,ref:je,onKeyDown:ie=>{var Ee;if(ie.stopPropagation(),ie.key==="Escape"&&(ie.preventDefault(),k==="graph"&&R?ee():z()),ie.key==="Tab"){const Oe=(Ee=je.current)==null?void 0:Ee.querySelectorAll('button:not(:disabled),select,input,a[href],textarea,[tabindex="0"]');if(!(Oe!=null&&Oe.length))return;const Pe=Oe[0],Xe=Oe[Oe.length-1];ie.shiftKey&&(document.activeElement===Pe||document.activeElement===je.current)?(ie.preventDefault(),Xe.focus()):!ie.shiftKey&&document.activeElement===Xe&&(ie.preventDefault(),Pe.focus())}},children:[o.jsxs("header",{className:"cotask-header settings-panel-header",children:[o.jsxs("div",{children:[o.jsxs("p",{children:["CoTask · ",t]}),o.jsx("h1",{children:(g==null?void 0:g.task.name)??"Loading task…"})]}),g&&o.jsx(rp,{task:g.task}),o.jsxs("button",{className:"cotask-back",onClick:z,title:`返回 ${t}`,children:[o.jsx("span",{"aria-hidden":"true",children:"← "}),"返回"]})]}),o.jsxs("aside",{className:"cotask-nav",children:[o.jsxs("section",{className:"workspace-group","aria-label":"Task navigation",children:[o.jsx("h2",{className:"cotask-nav-group-title",children:"Task"}),o.jsx("nav",{className:"workspace-group-items",children:[["graph","Task graph"],["operations","Activity"],["settings","Settings"]].map(([ie,Ee])=>o.jsx("button",{className:`session-item${k===ie?" active":""}`,"aria-current":k===ie?"page":void 0,onClick:()=>{x(ie),D(null)},children:o.jsx("span",{className:"session-title",children:Ee})},ie))})]}),o.jsxs("section",{className:"workspace-group","aria-label":"Task members",children:[o.jsx("h2",{className:"cotask-nav-group-title",children:"Members"}),o.jsx("div",{className:"workspace-group-items cotask-member-list",children:g==null?void 0:g.members.map(ie=>{const Ee=g.executions.some(Pe=>Pe.memberId===ie.id&&["accepted","running"].includes(Pe.status)),Oe=Ee?"Running":g.bindings.some(Pe=>Pe.memberId===ie.id&&Pe.workspaceId)?"Idle":"Not created";return o.jsx("button",{className:`session-item${k==="member"&&C===ie.id?" active":""}`,title:`${ie.name} · ${Oe}`,"aria-label":`${ie.name} · ${Oe}`,"aria-current":k==="member"&&C===ie.id?"page":void 0,onClick:()=>{D(ie.id),x("member")},children:o.jsxs("span",{className:"session-heading",children:[o.jsx("span",{className:`session-status${Ee?" running":""}`,"aria-hidden":"true"}),o.jsx("span",{className:"session-title",children:ie.name})]})},ie.id)})})]}),o.jsxs("button",{className:"cotask-return",onClick:z,children:["← Back to ",t]})]}),o.jsxs("section",{className:"cotask-main",children:[me&&o.jsx("div",{className:"cotask-error",role:"alert",children:me}),o.jsx("div",{className:`cotask-body${k==="graph"?" cotask-graph-body":k==="member"?" cotask-member-body":""}`,children:g?o.jsxs(o.Fragment,{children:[g.warnings.length>0&&o.jsx("div",{className:"cotask-warning",children:g.warnings.map((ie,Ee)=>o.jsxs("p",{children:[ie.id?`${ie.id}: `:"Common context: ","Context may exceed the injection limit. (estimated ",ie.estimatedTokens," tokens)"]},Ee))}),k==="graph"&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"cotask-section-heading",children:[o.jsx("h2",{children:"Task graph"}),o.jsxs("span",{children:[g.nodes.filter(ie=>ie.status==="completed").length," / ",g.nodes.length," Completed"]})]}),!g.nodes.length&&o.jsx("p",{children:"No nodes yet. Discuss the plan with the initiating agent to define the graph."}),o.jsxs("details",{className:"cotask-context",onToggle:ie=>{if(ie.currentTarget.open&&P===null){const Ee=Z.current;n(`${ye}/${h}`,{view:"definition"}).then(Oe=>{Z.current===Ee&&H(Oe.definition.commonContext)}).catch(Oe=>{Z.current===Ee&&Ae(String(Oe))})}},children:[o.jsx("summary",{children:"Common context"}),P===null?o.jsx("p",{children:"Loading…"}):de(P)]},g.task.revision),g.nodes.length>0&&o.jsx(ZA,{finalCheckpointId:g.finalCheckpointId,nodes:g.nodes,members:g.members,executions:g.executions,reports:g.reports,selectedId:R??void 0,onSelect:ie=>void Te(ie),onDismiss:ee,detail:(M==null?void 0:M.definition.id)===R?o.jsxs("div",{className:"cotask-node-detail",children:[M.runtime&&o.jsxs("p",{children:[lx(M.runtime.status),M.runtime.reason&&o.jsxs(o.Fragment,{children:[" · ",M.runtime.reason]})]}),de(M.definition.context),o.jsx("h4",{children:M.definition.kind==="checkpoint"?"检查点":"Reports"}),M.reports.length?M.reports.map(ie=>o.jsxs("button",{onClick:()=>void Re(ie),children:[ie.type," · ",ie.summary]},ie.id)):o.jsx("p",{children:M.definition.kind==="checkpoint"?"此节点不启动成员执行,也不生成成员报告。Owner 按上下文检查交付内容后继续。":"No reports yet."}),L.map(ie=>{var Ee;return o.jsxs("article",{children:[o.jsx("h4",{children:ie.summary}),de(ie.content,((Ee=g.executions.find(Oe=>Oe.id===ie.executionId))==null?void 0:Ee.workspaceId)??"")]},ie.id)})]}):o.jsx("p",{children:"Loading node…"})}),g.task.conclusion&&o.jsxs("details",{className:"cotask-conclusion",children:[o.jsx("summary",{children:"Conclusion"}),de(g.task.conclusion)]})]}),k==="operations"&&o.jsxs(o.Fragment,{children:[o.jsx("h2",{children:"Activity"}),o.jsx("p",{children:"Changes are saved immediately and retained if a turn fails."}),F.length?F.map((ie,Ee)=>o.jsxs("details",{className:"cotask-operation",children:[o.jsxs("summary",{children:[String(ie.action)," · ",String(ie.status)," · Turn ",String(ie.turnStatus)]}),o.jsx("pre",{children:JSON.stringify(ie,null,2)})]},Ee)):o.jsx("p",{children:"No activity yet."})]}),k==="settings"&&o.jsx(JA,{task:g.task,path:`${ye}/${h}/settings`,request:n,onSaved:ie=>y({...g,task:ie})},h),k==="member"&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"cotask-section-heading",children:[o.jsx("h2",{children:rt==null?void 0:rt.name}),o.jsx("span",{children:"CoTask member"})]}),o.jsxs("details",{className:"cotask-context",onToggle:ie=>{if(ie.currentTarget.open&&C&&(X==null?void 0:X.id)!==C){const Ee=C,Oe=Z.current;n(`${ye}/${h}`,{memberIds:[Ee]}).then(Pe=>{var Xe;Z.current===Oe&&ge.current===Ee&&J({id:Ee,context:((Xe=Pe.members[0])==null?void 0:Xe.context)??""})}).catch(Pe=>{Z.current===Oe&&ge.current===Ee&&Ae(String(Pe))})}},children:[o.jsx("summary",{children:"Member context"}),(X==null?void 0:X.id)===C?de(X.context):o.jsx("p",{children:"Loading…"})]},`${C}:${g.task.revision}`),He!=null&&He.workspaceId?l(He.workspaceId):o.jsx("p",{children:g.executions.some(ie=>ie.memberId===C)?"This member instance was removed. Execution history is retained.":g.task.executionMode==="self_driving"?"首次符合执行条件时,平台自动创建此成员实例。":"This member will be created when its first node is driven."})]})]}):o.jsx("p",{children:"Loading task…"})})]})]})})}function JA({task:e,path:t,request:n,onSaved:a}){var M,q;const[l,u]=A.useState({...e.runtimeSettings,mode:e.runtimeSettings.mode??"custom",fastMode:e.runtimeSettings.fastMode??!1}),[c,f]=A.useState(e.revision),[h,m]=A.useState([]),[g,y]=A.useState([]),[k,x]=A.useState(!1),[C,D]=A.useState("");A.useEffect(()=>{let L=!0;return Promise.all([n("settings/runtime/models?refresh=0"),n("settings/model-providers/options")]).then(([K,P])=>{L&&(m(K.models),y(P.channels))}).catch(K=>{L&&D(String(K))}),()=>{L=!1}},[n]);const R=h.find(L=>L.model===l.model||L.id===l.model),O=((M=R==null?void 0:R.supportedReasoningEfforts)==null?void 0:M.map(L=>L.reasoningEffort))??["none","minimal","low","medium","high","xhigh","max"];return o.jsxs("section",{className:"cotask-settings",children:[o.jsx("h2",{children:"Settings"}),o.jsx("p",{children:"Settings apply to the whole CoTask and take effect on each member’s next turn."}),o.jsxs("label",{children:["配置模式",o.jsxs("select",{value:l.mode,onChange:L=>u({...l,mode:L.target.value}),children:[o.jsx("option",{value:"global",children:"沿用 CoTask 默认配置"}),o.jsx("option",{value:"custom",children:"CoTask 自定义配置"})]})]}),l.mode==="global"?o.jsx("p",{children:"每个成员在下一次 turn 读取最新 CoTask 默认模型、推理强度和倍速设置;正在运行的 turn 不受影响。"}):o.jsxs(o.Fragment,{children:[o.jsxs("label",{children:["Model source",o.jsxs("select",{value:l.modelSource.type==="codex"?"codex":l.modelSource.channelId,onChange:L=>u({...l,modelSource:L.target.value==="codex"?{type:"codex"}:{type:"custom",channelId:L.target.value}}),children:[o.jsx("option",{value:"codex",children:"Codex"}),l.modelSource.type==="custom"&&!g.some(L=>L.id===l.modelSource.channelId)&&o.jsx("option",{value:l.modelSource.channelId,children:"Current channel unavailable"}),g.map(L=>o.jsx("option",{value:L.id,children:L.name},L.id))]})]}),l.modelSource.type==="codex"?o.jsxs(o.Fragment,{children:[o.jsxs("label",{children:[o.jsx("span",{children:"1.5 倍速(Fast mode)"}),o.jsx("input",{type:"checkbox",checked:l.fastMode,onChange:L=>u({...l,fastMode:L.target.checked})})]}),o.jsxs("label",{children:["Model",o.jsxs("select",{value:l.model,onChange:L=>u({...l,model:L.target.value}),children:[o.jsx("option",{value:"",children:"Default model"}),l.model&&!h.some(L=>L.model===l.model)&&o.jsx("option",{children:l.model}),h.map(L=>o.jsx("option",{value:L.model,children:L.displayName},L.id))]})]}),o.jsxs("label",{children:["Reasoning effort",o.jsxs("select",{value:l.reasoningEffort,onChange:L=>u({...l,reasoningEffort:L.target.value}),children:[o.jsx("option",{value:"",children:"Default"}),l.reasoningEffort&&!O.includes(l.reasoningEffort)&&o.jsx("option",{children:l.reasoningEffort}),O.map(L=>o.jsx("option",{children:L},L))]})]})]}):o.jsxs("p",{children:["Channel model: ",((q=g.find(L=>L.id===l.modelSource.channelId))==null?void 0:q.model)??"Channel unavailable",". Codex reasoning effort does not apply to custom channels."]})]}),o.jsx("button",{disabled:k,onClick:async()=>{x(!0),D("");try{const L=await n(t,{expectedRevision:c,runtimeSettings:l},"PUT");f(L.task.revision),a(L.task),D("Saved. Changes take effect on the next turn.")}catch(L){D(`${String(L)}. If the task changed, reopen Settings before saving.`)}finally{x(!1)}},children:k?"Saving…":"Save settings"}),C&&o.jsx("p",{role:"status",children:C})]})}function eE(e,t=new Date){if(e==null||!Number.isInteger(e)||e<1||e>31)return null;const n=new Date(t.getTime()+480*60*1e3),a=n.getUTCFullYear(),l=n.getUTCMonth(),u=Date.UTC(a,l,n.getUTCDate()),c=h=>Date.UTC(a,l+h,Math.min(e,new Date(Date.UTC(a,l+h+1,0)).getUTCDate()));let f=c(0);return f<u&&(f=c(1)),{date:new Date(f).toISOString().slice(0,10),days:(f-u)/864e5}}function tE({content:e,streaming:t}){const[n,a]=A.useState(!1),l=A.useId();return o.jsxs("section",{className:`message reasoning${t?" is-streaming":""}${n?" is-expanded":""}`,children:[o.jsxs("button",{className:"reasoning-toggle",type:"button","aria-expanded":n,"aria-controls":l,onClick:()=>a(u=>!u),children:[o.jsx("span",{className:"reasoning-indicator","aria-hidden":"true"}),o.jsx("span",{children:t?"思考中":"思考过程"}),o.jsx("span",{className:"reasoning-action",children:n?"收起":"展开"}),o.jsx("svg",{className:"reasoning-chevron",width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true",children:o.jsx("path",{d:"m4 2 4 4-4 4",fill:"none",stroke:"currentColor",strokeWidth:"1.4"})})]}),o.jsx("div",{id:l,hidden:!n&&!t,className:`reasoning-content${n?"":" reasoning-preview"}`,children:o.jsx("div",{className:"message-body",children:n?e:e.slice(-600)})})]})}function nE(e,t){if(!t||typeof t!="object")return null;const{method:n,params:a}=t;if(!a)return null;if(n==="item/completed"){const m=a.item;if((m==null?void 0:m.type)!=="reasoning"||typeof m.id!="string")return null;const g=e.get(m.id)??{itemId:m.id,text:new Map,summary:new Map,completed:!1};for(const y of["text","summary"]){const k=m[y];Array.isArray(k)&&k.forEach((x,C)=>{typeof x=="string"&&x&&g[y].set(C,x)})}return g.completed=!0,e.set(m.id,g),g}const l=/^item\/reasoning\/(text|summaryText)(Delta|Snapshot)$/.exec(n??"");if(!l||typeof a.itemId!="string")return null;const u=l[1]==="text"?"text":"summary",c=a[u==="text"?"contentIndex":"summaryIndex"],f=a[l[2]==="Delta"?"delta":"text"];if(typeof c!="number"||!Number.isSafeInteger(c)||c<0||typeof f!="string")return null;const h=e.get(a.itemId)??{itemId:a.itemId,text:new Map,summary:new Map,completed:!1};return h[u].set(c,l[2]==="Snapshot"?f:(h[u].get(c)??"")+f),e.set(a.itemId,h),h}function rE(e){return[...e.text.size?e.text:e.summary].sort(([n],[a])=>n-a).map(([,n])=>n).join(`
347
-
348
- `)}function aE({id:e,baseUrl:t,query:n}){var g;const[a,l]=A.useState(null),[u,c]=A.useState(!1),[f,h]=A.useState(!1),m=async()=>{c(!0),h(!1);try{const y=await n(e);y.status==="ok"||y.status==="unsupported"?l(y):(h(!0),l(k=>(k==null?void 0:k.status)==="ok"?k:y))}catch{h(!0)}finally{c(!1)}};return A.useEffect(()=>{let y=!1;return c(!0),n(e).then(k=>{y||l(k)}).catch(()=>{y||h(!0)}).finally(()=>{y||c(!1)}),()=>{y=!0}},[e,n]),o.jsxs("div",{className:"channel-balance-inline",children:[o.jsx("span",{className:"channel-balance-total",title:"Available balance",children:(a==null?void 0:a.status)==="ok"&&a.balance?a.balance.balance_infos.map(y=>`${y.currency} ${y.total_balance}`).join(" / "):u?"Checking…":(a==null?void 0:a.status)==="unsupported"?"Balance —":"Balance unavailable"}),f?o.jsx("span",{className:"channel-balance-warning",title:"Refresh failed; the displayed amount may be stale",role:"status",children:"Stale"}):null,a!=null&&a.balance&&!a.balance.is_available?o.jsx("span",{className:"channel-balance-warning",children:"Insufficient"}):null,o.jsx("button",{type:"button","aria-label":"Refresh balance",title:"Refresh balance",disabled:u,onClick:()=>void m(),children:"↻"}),o.jsxs("details",{className:"channel-balance-details",children:[o.jsx("summary",{children:"Details"}),o.jsxs("div",{children:[o.jsxs("p",{className:"channel-endpoint",children:[t," · Responses API"]}),(g=a==null?void 0:a.balance)==null?void 0:g.balance_infos.map(y=>o.jsxs("p",{children:[y.currency," · Granted ",y.granted_balance," · Topped up ",y.topped_up_balance]},y.currency)),a?o.jsxs("small",{children:["Checked ",new Date(a.checkedAt).toLocaleString()]}):null,f?o.jsx("small",{children:"Refresh failed. Any amount shown is the last successful result."}):null,(a==null?void 0:a.status)==="unsupported"?o.jsx("small",{children:"This channel does not support balance queries."}):null,o.jsx("small",{children:"Uses saved credentials; unsaved edits are not queried."})]})]})]})}function sx(e,t){const n=e??{type:"codex"},a=t??{type:"codex"};return n.type===a.type&&(n.type!=="custom"||a.type==="custom"&&n.channelId===a.channelId)}function iE({load:e,save:t,queryBalance:n}){const[a,l]=A.useState(null),[u,c]=A.useState([]),[f,h]=A.useState(!1),[m,g]=A.useState(""),[y,k]=A.useState(!1),[x,C]=A.useState(null),D=JSON.stringify(u)!==JSON.stringify((a==null?void 0:a.channels.map(M=>({channel:M})))??[]);A.useEffect(()=>{let M=!1;return e().then(q=>{M||(l(q),c(q.channels.map(L=>({channel:L}))))}).catch(()=>{M||g("Unable to load channels. Reopen this panel to retry.")}),()=>{M=!0}},[e]);const R=(M,q)=>{k(!1),c(L=>L.map((K,P)=>P===M?{...K,channel:{...K.channel,...q}}:K))},O=async M=>{if(M.preventDefault(),!(!a||f)){h(!0),g(""),k(!1);try{const q=await t({expectedRevision:a.revision,channels:u.map(L=>({channel:L.channel,...L.apiKey?{apiKey:L.apiKey}:{}}))});l(q),c(q.channels.map(L=>({channel:L}))),k(!0),C(null)}catch{g("Channels were not saved. Check the fields. If another administrator changed them, reopen this panel to load the latest version.")}finally{h(!1)}}};return o.jsxs("section",{children:[o.jsx("header",{className:"settings-section-header",children:o.jsxs("div",{children:[o.jsx("h3",{children:"Custom model channels"}),o.jsx("p",{children:"Select a configured channel in Runtime."})]})}),o.jsxs("form",{className:"settings-form",onSubmit:M=>void O(M),children:[!a&&!m?o.jsx("p",{children:"Loading channels…"}):null,o.jsxs("div",{className:"settings-field-wide channel-summary-list",children:[u.map(M=>o.jsxs("article",{className:"channel-summary-card",children:[o.jsxs("div",{className:"channel-summary-identity",children:[o.jsx("h4",{children:M.channel.name||"New channel"}),o.jsx("p",{children:M.channel.model||"Model not configured"})]}),n&&(a!=null&&a.channels.some(q=>q.id===M.channel.id))?o.jsx(aE,{id:M.channel.id,baseUrl:a.channels.find(q=>q.id===M.channel.id).baseUrl,query:n},`${M.channel.id}:${a.revision}`):o.jsx("small",{children:"Not saved"}),o.jsx("button",{type:"button",disabled:f||x!==null&&x!==M.channel.id,onClick:()=>{C(M.channel.id),k(!1)},children:"Edit channel"})]},M.channel.id)),a&&u.length===0?o.jsx("p",{children:"No custom channels yet. Add a channel to get started."}):null]}),u.map((M,q)=>x===M.channel.id?o.jsxs("fieldset",{disabled:f,className:"settings-field-wide model-channel-card",children:[o.jsx("legend",{children:a!=null&&a.channels.some(L=>L.id===M.channel.id)?"Edit channel":"Add channel"}),o.jsxs("label",{className:"settings-field",children:[o.jsx("span",{children:"Name"}),o.jsx("input",{"aria-label":`Channel ${q+1} name`,required:!0,maxLength:128,value:M.channel.name,onChange:L=>R(q,{name:L.target.value})})]}),o.jsxs("label",{className:"settings-field",children:[o.jsx("span",{children:"Type"}),o.jsx("select",{"aria-label":`Channel ${q+1} type`,value:M.channel.kind,onChange:()=>{},children:o.jsx("option",{value:"responses",children:"Responses API"})})]}),o.jsxs("label",{className:"settings-field",children:[o.jsx("span",{children:"Base URL"}),o.jsx("input",{"aria-label":`Channel ${q+1} URL`,type:"url",required:!0,placeholder:"https://api.example.com/v1",value:M.channel.baseUrl,onChange:L=>R(q,{baseUrl:L.target.value})})]}),o.jsxs("label",{className:"settings-field",children:[o.jsx("span",{children:"Model ID"}),o.jsx("input",{"aria-label":`Channel ${q+1} model`,required:!0,maxLength:256,placeholder:"Model ID from your service",value:M.channel.model,onChange:L=>R(q,{model:L.target.value})})]}),o.jsxs("label",{className:"settings-field",children:[o.jsx("span",{children:"API key"}),o.jsx("input",{"aria-label":`Channel ${q+1} API key`,type:"password",autoComplete:"new-password",required:!(a!=null&&a.channels.some(L=>L.id===M.channel.id)),value:M.apiKey??"",placeholder:a!=null&&a.channels.some(L=>L.id===M.channel.id)?"Configured · leave blank to keep":"Enter API key",onChange:L=>{const K=L.target.value;k(!1),c(P=>P.map((H,X)=>X===q?{...H,apiKey:K}:H))}})]}),o.jsx("button",{type:"button",onClick:()=>{c(L=>L.filter((K,P)=>P!==q)),k(!1),C(null)},children:"Remove channel on save"}),o.jsx("small",{children:"Changes take effect only after Save channels. Leave the API key blank to keep the saved key."})]},M.channel.id):null),m?o.jsx("p",{role:"alert",children:m}):null,y?o.jsx("p",{role:"status",children:"Channels saved. New executions use the updated configuration."}):null,o.jsxs("div",{className:"settings-form-actions",children:[o.jsx("button",{type:"button",disabled:!a||f||x!==null||u.length>=100,onClick:()=>{const M=crypto.randomUUID().replaceAll("-","");C(M),k(!1),c(q=>[...q,{channel:{id:M,name:"",kind:"responses",baseUrl:"",model:""}}])},children:"Add channel"}),x||JSON.stringify(u)!==JSON.stringify(a==null?void 0:a.channels.map(M=>({channel:M})))?o.jsx("button",{type:"button",disabled:f,onClick:()=>{c((a==null?void 0:a.channels.map(M=>({channel:M})))??[]),C(null),g("")},children:"Discard changes"}):null,x||D?o.jsx("button",{type:"submit",disabled:!a||f,children:f?"Saving…":"Save channels"}):null]})]})]})}function lE(e){const t=new Map;for(const n of e){if(!n.turnId)continue;if(n.event==="server.wakeup.started"){t.set(n.turnId,"wakeup");continue}if(n.event!=="server.turn")continue;const a=oE(n.data);t.set(n.turnId,typeof a.source=="string"?a.source:"web")}return t}function Pc(e,t){return!!(t&&e.includes(t))}function sE(e){var n;if((e==null?void 0:e.status)!=="failed")return null;const t=(n=e.error)==null?void 0:n.trim();return t?{turnId:e.id,content:t,createdAt:e.finishedAt??e.startedAt}:null}function oE(e){return e&&typeof e=="object"?e:{}}const uE=["summary","message","status","instruction","description","reason","error","text"],$3=96,cE=new Set(["codex.dynamic_tool_request","codex.process_exited","codex.protocol_error"]),dE=new Set(["server.item.snapshot","server.status","runtime.worker_stderr","codex.dynamic_tool_request"]),fE=new Set(["agentMessage","commandExecution","contextCompaction","fileChange","mcpToolCall","reasoning","userMessage","webSearch"]),ox=new Set(["item/commandExecution/terminalInteraction"]),hE=new Map([["server.wakeup.retry_scheduled","Wakeup retry scheduled"],["runtime.worker_exit","Runtime worker exited"]]);function mE(e){if(e.event!=="codex.notification")return!1;const t=si(e.data);return typeof t.method=="string"&&ox.has(t.method)}function pE(e){if(dE.has(e.event))return null;if(e.event.startsWith("server.")||e.event.startsWith("runtime.")||cE.has(e.event))return e.event;if(e.event!=="codex.notification")return null;const t=si(e.data),n=typeof t.method=="string"?t.method:"",a=si(t.params),l=si(a.item),u=typeof l.type=="string"?l.type:"";return!n.startsWith("item/")||ox.has(n)||/(?:\/delta|Delta)$/.test(n)||fE.has(u)?null:n}function ux(e,t){const n=t.replace(/^input:/,""),a=(e==null?void 0:e.trim())??"";return!a||a===t||a===n?hE.get(n)??cx(n):a}function Ks(e,t=[]){const n=si(e),l=[...t,...uE.map(u=>Gc(n[u]))].map(u=>(u==null?void 0:u.replace(/\s+/g," ").trim())??"").find(Boolean);return l?l.length<=$3?l:`${l.slice(0,$3-3)}...`:"查看详情"}function Xp(e,t=new Map){const n=si(e),a=typeof n.unreadCount=="number"&&n.unreadCount>0?Math.floor(n.unreadCount):0,u=(Array.isArray(n.senderWorkspaceIds)?Array.from(new Set(n.senderWorkspaceIds.filter(h=>typeof h=="string").map(h=>h.trim()).filter(Boolean))):[]).map(h=>t.get(h)??h),c="Messages",f=[a>0?String(a):"",u.length>0?`from ${u.join(", ")}`:""].filter(Boolean).join(" ");return{title:c,detail:Ks({},[f])}}function gE(e){const t=si(e),n=Array.isArray(t.offers)?t.offers.map(si).filter(u=>Object.keys(u).length>0):[],a=n.map(u=>{var c;return(c=Gc(u.previewText))==null?void 0:c.trim()}).filter(u=>!!u),l=n.length;return{title:l===1?"New input available":`${l} new inputs available`,detail:Ks({},a.slice(0,2)),meta:l===1?"preview":`${l} previews`}}function yE(e){const t=si(e),n=Gc(t.actionType)??"",a=si(t.payload);return n==="seele_wakeup"||n==="seele_workspace_schedule_wakeup"?{title:(Gc(a.action)??"schedule")==="cancel"?"Wakeup cancellation requested":"Wakeup requested",detail:Ks(a,[Gc(a.instruction)]),meta:"after turn"}:{title:"Action requested",detail:Ks(a,[cx(n||"agent action")]),meta:"after turn"}}function cx(e){const n=(e.split(/[./]/).filter(Boolean).pop()??e).replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").trim();return n?n.charAt(0).toUpperCase()+n.slice(1):"System event"}function Gc(e){if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean")return String(e)}function si(e){return e&&typeof e=="object"?e:{}}function Zp(e){const t=Qp(e);return(Array.isArray(t.changes)?t.changes:[]).flatMap(a=>{const l=Qp(a);if(typeof l.path!="string"||!l.path.trim())return[];const u=wE(l.kind),c=typeof l.diff=="string"?l.diff:"",f=bE(c,u);return[{path:l.path,kind:u,additions:f.additions,deletions:f.deletions}]})}function dx(e,t){const n=P3(e),a=P3(t??"").replace(/\/+$/,"");return a&&(n===a||n.startsWith(`${a}/`))?n.slice(a.length+1)||".":n}function vE(e,t){if(e.length===0)return"File changed";const n=dx(e[0].path,t);return e.length===1?n:`${n} +${e.length-1}`}function xE(e){return e.reduce((t,n)=>({additions:t.additions+n.additions,deletions:t.deletions+n.deletions}),{additions:0,deletions:0})}function bE(e,t){if(!e)return{additions:0,deletions:0};if(t==="add")return{additions:F3(e),deletions:0};if(t==="delete")return{additions:0,deletions:F3(e)};let n=0,a=0;for(const l of e.split(`
349
- `))l.startsWith("+")&&!l.startsWith("+++")?n+=1:l.startsWith("-")&&!l.startsWith("---")&&(a+=1);return{additions:n,deletions:a}}function F3(e){const t=e.split(`
350
- `).length;return e.endsWith(`
351
- `)?Math.max(0,t-1):t}function wE(e){const t=Qp(e);return t.type==="add"?"add":t.type==="delete"?"delete":t.type==="move"||typeof t.move_path=="string"?"move":"update"}function P3(e){return e.replace(/\\/g,"/").replace(/\/+/g,"/")}function Qp(e){return e&&typeof e=="object"?e:{}}const kE=["low","medium","high","xhigh"];function Ps(e){const t=e.trim();return t?{minimal:"Minimal",none:"None",low:"Low",medium:"Medium",high:"High",xhigh:"Extra high",max:"Max",ultra:"Ultra"}[t]??t:"Use model default"}function G3(e,t){const n=t0(e),a=t0(t==null?void 0:t.defaultReasoningEffort);return n?n===a?`${Ps(n)} (model default)`:Ps(n):a?`Not configured (model default: ${Ps(a)})`:"Not configured (model default applies)"}function SE(e,t=""){const n=t0(e==null?void 0:e.defaultReasoningEffort),a=[];if(t||a.push({value:"",label:"Not configured (model default applies)"}),!e){const c=t;return c&&a.push({value:c,label:`${Ps(c)} (configured)`}),a}const u=(fx(e)??kE).filter(c=>!Jp(c));n&&!Jp(n)&&!u.includes(n)&&u.unshift(n);for(const c of u)a.push({value:c,label:c===n?`${Ps(c)} (model default)`:Ps(c)});return t&&!a.some(c=>c.value===t)&&a.push({value:t,label:`${Ps(t)} (configured)`}),a}function jE(e,t){const n=t0(e);if(!n)return null;if(Jp(n))return"The configured reasoning effort is not supported. Choose a supported value explicitly.";if(!t)return null;const a=fx(t);return a!==null?a.includes(n)?null:"The selected model does not support the configured reasoning effort. Your value has been preserved; choose a supported value before saving.":null}function CE(e,t,n){return n||e!==t?e:null}function fx(e){if(!Array.isArray(e==null?void 0:e.supportedReasoningEfforts))return null;const t=[];for(const n of e.supportedReasoningEfforts){const a=t0(n==null?void 0:n.reasoningEffort);a&&!t.includes(a)&&t.push(a)}return t}function t0(e){return typeof e=="string"?e.trim():""}function Jp(e){return e.toLowerCase()==="ultra"}function TE(e){return e.status!=="authorized"||!e.configurationReady}function AE(e,t,n){return e===401&&!n&&t==="authentication_required"?"reauthenticate":"ignore"}function V3(e,t){const n=Date.parse(e??""),a=Date.parse(t??"");return Number.isFinite(n)&&(!Number.isFinite(a)||n>a)}function EE(e,t){var u,c;if(!e||!t||typeof e!="object"||typeof t!="object")return t;const n=e,a=t,l=V3(n.refreshedAt,a.refreshedAt)?{...n}:{...a};return l.usage=V3((u=n.usage)==null?void 0:u.updatedAt,(c=a.usage)==null?void 0:c.updatedAt)?n.usage:a.usage,l}function ap(e,t){var l,u;if(!e)return t;const n={...e.accountDetails},a={...e.credentialStatus};for(const c of e.accounts){const f=t.accounts.find(h=>h.id===c.id);if(!(c.updatedAt&&(f!=null&&f.updatedAt)&&f.updatedAt<c.updatedAt)&&(Object.hasOwn(t.accountDetails,c.id)&&(n[c.id]=EE(n[c.id],t.accountDetails[c.id])),t.credentialStatus&&Object.hasOwn(t.credentialStatus,c.id))){const h=a[c.id],m=t.credentialStatus[c.id],g=Date.parse((h==null?void 0:h.accessTokenExpiresAt)??""),y=Date.parse((m==null?void 0:m.accessTokenExpiresAt)??""),k=Number.isFinite(g)&&(!Number.isFinite(y)||y<g),x=((l=h==null?void 0:h.renewal)==null?void 0:l.lastAttemptAt)!=null&&(((u=m==null?void 0:m.renewal)==null?void 0:u.lastAttemptAt)??0)<h.renewal.lastAttemptAt;!k&&!(x&&!(y>g))&&(a[c.id]=t.credentialStatus[c.id])}}return{...e,accountDetails:n,...e.credentialStatus||t.credentialStatus?{credentialStatus:a}:{}}}const Y3=15e3,W3=[1e3,2e3,5e3,1e4,15e3];function NE(e){return!e.workspaceRunning||e.streamLeaseActive||e.controllerActive?{kind:"none"}:e.currentTurnAbsent?e.retryAt!==null&&e.now>=e.retryAt?{kind:"probe",waitMs:Y3}:{kind:"none"}:{kind:"probe",waitMs:Y3}}function ME(e){const t=Math.min(Math.max(1,Math.floor(e))-1,W3.length-1);return W3[t]}function DE(e){const t=K3(e),n=K3(t.conversation),a=t.workspaceStatus??t.status??n.status;return a==="idle"||a==="error"||a==="done"||a==="initialization_failed"?a:"done"}function K3(e){return e&&typeof e=="object"?e:{}}function zE(e,t,n){return n?"running":e==="running"||e==="error"?e:t==="scheduled"?"waiting":e}function na(e,t){if(!e.deploymentId||!e.userId||!t)throw new Error("Browser storage requires deployment, user, and preference identities.");return["seele","v1",encodeURIComponent(e.deploymentId),encodeURIComponent(e.userId),encodeURIComponent(t)].join(":")}function G1(e,t){const n=[],a=new Set;for(const l of[...e,...t])a.has(l)||(a.add(l),n.push(l));return n}function X3(e,t,n){return G1([t,...e.filter(a=>a!==t)],n)}function RE(e,t){return e.filter(n=>n!==t)}function OE(e,t){const n=e.code==="ArrowUp"?-1:e.code==="ArrowDown"?1:null;return n!==null&&e.metaKey&&e.shiftKey&&e.leftShiftPressed&&!e.ctrlKey&&!e.altKey?{type:"move",direction:n}:t?e.key==="Escape"?{type:"cancel"}:e.code==="Space"&&!e.repeat?{type:"confirm"}:null:null}function $s(e){return`${e.kind}:${e.id}`}function IE(e,t){return e.flatMap(n=>[{kind:"group",id:n.id},...t.has(n.id)?[]:n.conversations.map(a=>({kind:"workspace",id:a.id}))])}function _E(e,t,n,a){if(e.length===0)return null;const l=t?$s(t):null;let u=l?e.findIndex(c=>$s(c)===l):-1;return u<0&&n&&(u=e.findIndex(c=>c.kind==="workspace"&&c.id===n)),u<0?a>0?e[0]:e[e.length-1]:e[(u+a+e.length)%e.length]}function LE(e,t){return t??e}function BE(e,t){return e==="saved"||t==="accept"?"saved":"declined"}const qE=/^[a-z][a-z\d+.-]*:/i,UE=/^L([1-9]\d*)(?:C([1-9]\d*))?$/i;function hx(e){if(!e.startsWith("seele-public:/"))return null;const t=e.slice(13);return t.startsWith("//")||t.includes("\\")?null:t}function HE(e,t){const n=e.trim();if(!n||n.startsWith("#")||n.startsWith("?")||n.startsWith("/api/")||qE.test(n))return null;const a=n.indexOf("#"),l=a>=0?n.slice(0,a):n,u=a>=0?n.slice(a+1):"",c=l.indexOf("?"),f=c>=0?l.slice(0,c):l;let h;try{h=decodeURIComponent(f)}catch{return null}const m=$E(h);if(!m)return null;const g=u.match(UE);return{path:mx(m,t),...g?{line:Number(g[1])}:{},...g!=null&&g[2]?{column:Number(g[2])}:{}}}function mx(e,t){const n=e.replace(/\\/g,"/"),a=t.replace(/\\/g,"/").replace(/\/+$/,"");return n===a||!n.startsWith(`${a}/`)?n:n.slice(a.length+1)}function $E(e){const t=e.trim().replace(/^`+|`+$/g,"").replace(/^\.\//,"");return t||null}function Z3(){const e=A.useRef(null),t=()=>{e.current&&(clearTimeout(e.current.timer),delete e.current.element.dataset.touchDrag),e.current=null};return A.useEffect(()=>{const n=u=>{e.current&&u.preventDefault()},a=u=>{u.touches.length!==1&&t()},l=u=>{const c=e.current;if(!c)return;if(u.touches.length!==1){t();return}if(c.armed){u.preventDefault();return}const f=u.touches[0];Math.hypot(f.clientX-c.x,f.clientY-c.y)>8&&t()};return document.addEventListener("touchmove",l,{passive:!1}),document.addEventListener("touchstart",a,{passive:!0}),document.addEventListener("contextmenu",n),document.addEventListener("touchend",t),document.addEventListener("touchcancel",t),()=>{t(),document.removeEventListener("touchmove",l),document.removeEventListener("touchstart",a),document.removeEventListener("contextmenu",n),document.removeEventListener("touchend",t),document.removeEventListener("touchcancel",t)}},[]),{begin(n,a){if(t(),n.pointerType!=="touch")return;const l=n.currentTarget;l.dataset.touchDrag="holding";const u={x:n.clientX,y:n.clientY,element:l,armed:!1,timer:setTimeout(()=>{e.current===u&&(u.armed=!0,l.dataset.touchDrag="ready",a())},2e3)};e.current=u},allows(n){var a;return n!=="touch"||((a=e.current)==null?void 0:a.armed)===!0},end:t}}const e1="seele:authentication-required",t1="seele:deployment-status-required",px=12,FE=3e3,gx="activeWorkspaceId",V1="workspaceOrder",yx="workspaceGroupOrder",vx="workspaceDrafts",xx="collapsedWorkspaceGroups",bx="sidebarWidth",Q3=5,J3=275,PE=236,GE=420,ev="default",tv=300,VE=2,YE=13,WE=1.65,KE=20,XE=900;class Xs extends Error{constructor(n,a,l,u){super(n);kd(this,"detail");kd(this,"status");kd(this,"body");this.name="DetailedHttpError",this.detail=a,this.status=l,this.body=u}}const ZE=[{value:"workspace-write",label:"Workspace"},{value:"danger-full-access",label:"System"}],Dc={id:null,kind:"source",name:"",description:"",purpose:"",attention:"tracked",refreshPolicy:"manual",status:"draft",sourceCluesText:"",requiredEnvText:""};function Y1(){var e;return((e=document.querySelector('meta[name="seele-public-base-path"]'))==null?void 0:e.content.replace(/\/?$/,"/"))??"/"}function Ne(e){return`${Y1()}api/${e.replace(/^\/+/,"")}`}async function Kn(e,t){const n=await e.text().catch(()=>""),a=`Request failed with ${e.status}`,l=[`${t.method??"GET"} ${t.url}`,`HTTP ${e.status} ${e.statusText||""}`.trim(),n?`Response: ${n}`:"Response: <empty>"].join(`
352
- `);return new Xs(a,l,e.status,n)}function dt(e){return e instanceof Xs?{message:e.message,detail:e.detail}:e instanceof Error?{message:e.message}:{message:String(e)}}function qs(e){const t=dt(e);return t.detail?{message:t.message,detail:t.detail}:t.message}async function Ve(e,t){if(!e.ok)throw await Kn(e,t)}function QE(e){return e instanceof Xs&&e.status===410&&e.body.includes('"turn_not_active"')}function JE(e){return e instanceof Xs&&e.status===409&&e.body.includes('"turn_not_running"')}function eN(e){return e instanceof Xs&&e.status===409&&e.body.includes('"thread_capability_upgrade_required"')}function nv(e){return{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:e})}}async function tN(e){if(e.status!==409)return null;try{const t=await e.json();if(t.error==="turn_already_running"&&typeof t.turnId=="string")return t.turnId}catch{return null}return null}function W1(e){return Math.max(PE,Math.min(GE,Math.round(e)))}function nN(e){try{const t=window.localStorage.getItem(na(e,bx)),n=t?Number.parseInt(t,10):Number.NaN;return Number.isFinite(n)?W1(n):J3}catch{return J3}}function rN(e,t){try{window.localStorage.setItem(na(e,bx),String(W1(t)))}catch{}}function ip(e){wx(e,()=>{e.scrollTop=Math.max(0,e.scrollHeight-e.clientHeight)})}function aN(e,t=48){return e.scrollHeight-e.scrollTop-e.clientHeight<=t}function iN(e){const t=e.split(/\r\n|\r|\n/).length;return Math.min(VE,Math.max(1,t+1))}function lN(e){return Math.ceil(iN(e)*YE*WE+KE)}function wx(e,t){const n=e.style.scrollBehavior;e.style.scrollBehavior="auto",t(),e.style.scrollBehavior=n}function rv(e){const t=e.getBoundingClientRect(),n=t.bottom-32,a=Array.from(e.querySelectorAll(".turn-group[data-turn-id]")),l=[...a].reverse().find(c=>{const f=c.getBoundingClientRect();return f.top<=n&&f.bottom>=t.top})??a[a.length-1]??null;if(!(l!=null&&l.dataset.turnId))return{anchorOffset:null,anchorTurnId:null};const u=l.getBoundingClientRect();return{anchorOffset:n-u.top,anchorTurnId:l.dataset.turnId}}function sN(e,t){return t?Array.from(e.querySelectorAll(".turn-group[data-turn-id]")).find(n=>n.dataset.turnId===t)??null:null}function av(e,t){wx(e,()=>{const n=sN(e,t.anchorTurnId);if(n&&t.anchorOffset!==null){const l=e.getBoundingClientRect().bottom-32,c=n.getBoundingClientRect().top-(l-t.anchorOffset);Math.abs(c)>.5&&(e.scrollTop+=c);return}e.scrollTop=Math.max(0,e.scrollHeight-t.previousScrollHeight)})}function iv(e,t){let n=!1;const a=e.querySelector(".stream-inner")??e,l=typeof ResizeObserver>"u"?null:new ResizeObserver(()=>{n||av(e,t)});av(e,t),l==null||l.observe(a);const u=window.setTimeout(c,1200);function c(){n||(n=!0,l==null||l.disconnect(),window.clearTimeout(u))}return c}function oN(e){try{return window.localStorage.getItem(na(e,gx))}catch{return null}}function lp(e,t){const n=na(e,gx);try{t?window.localStorage.setItem(n,t):window.localStorage.removeItem(n)}catch{}}function nu(e){try{const t=window.localStorage.getItem(na(e,V1)),n=t?JSON.parse(t):[];return Array.isArray(n)?n.filter(a=>typeof a=="string"):[]}catch{return[]}}function kx(e){try{const t=window.localStorage.getItem(na(e,yx)),n=t?JSON.parse(t):[];return Array.isArray(n)?n.filter(a=>typeof a=="string"):[]}catch{return[]}}function Sx(e,t){try{window.localStorage.setItem(na(e,yx),JSON.stringify(t))}catch{}}function Lc(e,t){try{window.localStorage.setItem(na(e,V1),JSON.stringify(t))}catch{}}function jx(e){try{const t=window.localStorage.getItem(na(e,vx)),n=t?JSON.parse(t):{};return!n||typeof n!="object"||Array.isArray(n)?{}:Object.fromEntries(Object.entries(n).filter(a=>typeof a[0]=="string"&&typeof a[1]=="string"))}catch{return{}}}function uN(e,t){return t?jx(e)[t]??"":""}function sp(e,t,n){if(t)try{const a=jx(e);n?a[t]=n:delete a[t],window.localStorage.setItem(na(e,vx),JSON.stringify(a))}catch{}}function cN(e){try{const t=window.localStorage.getItem(na(e,xx)),n=t?JSON.parse(t):[];return new Set(Array.isArray(n)?n.filter(a=>typeof a=="string"):[])}catch{return new Set}}function op(e,t){try{window.localStorage.setItem(na(e,xx),JSON.stringify(Array.from(t)))}catch{}}function Vl(e,t){const n=nu(e);if(n.length===0)return t;const a=new Map(n.map((l,u)=>[l,u]));return[...t].sort((l,u)=>{const c=a.get(l.id),f=a.get(u.id);return c!==void 0&&f!==void 0?c-f:c!==void 0?-1:f!==void 0?1:0})}function Id(e,t){const n=kx(e);if(n.length===0)return t;const a=new Map(n.map((l,u)=>[l,u]));return[...t].sort((l,u)=>{const c=a.get(l.id),f=a.get(u.id);return c!==void 0&&f!==void 0?c-f:c!==void 0?-1:f!==void 0?1:l.createdAt.localeCompare(u.createdAt)})}function _d(e,t){const n=nu(e),a=G1(n,t.map(l=>l.id));JSON.stringify(a)!==JSON.stringify(n)&&Lc(e,a)}function up(e,t){const n=new Set(t.map(u=>u.id)),a=kx(e).filter(u=>n.has(u)),l=t.map(u=>u.id).filter(u=>!a.includes(u));Sx(e,[...a,...l])}function dN(e,t){const n=e.getBoundingClientRect(),a=n.top+n.height/2;return t<a?"before":"after"}function fN(e,t,n,a){if(t===n)return e;const l=e.findIndex(g=>g.id===t),u=e.findIndex(g=>g.id===n);if(l===-1||u===-1)return e;const c=[...e],[f]=c.splice(l,1),h=c.findIndex(g=>g.id===n),m=a==="before"?h:h+1;return c.splice(m,0,f),c}function hN(e,t,n){if(t===n)return e;const a=e.findIndex(h=>h.id===t),l=e.findIndex(h=>h.id===n);if(a===-1||l===-1)return e;const u=[...e],[c]=u.splice(a,1),f=u.findIndex(h=>h.id===n);return u.splice(f+1,0,c),u}function mN({authEnabled:e,currentUser:t,deploymentId:n,onLogout:a}){var tc,Ri,Cl,Ds,Tl;const l=A.useMemo(()=>({deploymentId:n,userId:t.id}),[n,t.id]),[u,c]=A.useState(""),[f,h]=A.useState(new Set),[m,g]=A.useState([]),[y,k]=A.useState([]),[x,C]=A.useState(null),[D,R]=A.useState(!1),[O,M]=A.useState(null),[q,L]=A.useState(null),[K,P]=A.useState(!1),[H,X]=A.useState(!1),[J,F]=A.useState({}),[he,me]=A.useState({}),[Ae,je]=A.useState(null),[pe,Z]=A.useState([]),[ge,ye]=A.useState(null),[oe,U]=A.useState(!1),[B,ee]=A.useState(null),[z,te]=A.useState("checking"),[Te,Re]=A.useState(null),[He,rt]=A.useState(!1),[de,ie]=A.useState(null),[Ee,Oe]=A.useState(!1),[Pe,Xe]=A.useState(null),[Mt,qn]=A.useState(!1),[ra,Jn]=A.useState(!1),[er,Kt]=A.useState([]),[Ln,Vn]=A.useState([]),[Un,Xt]=A.useState({model:"",reasoningEffort:"",fastMode:!1,sandbox:"workspace-write"}),[pr,ve]=A.useState({profuseNotificationEnabled:!1,publicUrl:null}),[Le,re]=A.useState([]),[be,qe]=A.useState(null),[Ge,lt]=A.useState(null),[Ct,gt]=A.useState(!1),[nt,xt]=A.useState(null),[Ut,Zt]=A.useState(!1),[tl,aa]=A.useState(null),[fi,Ia]=A.useState(!1),[Ir,wa]=A.useState({model:"",reasoningEffort:"",fastMode:!1,sandbox:"workspace-write"}),[Jt,nl]=A.useState("global"),[en,hi]=A.useState(null),[rl,as]=A.useState(null),[vu,al]=A.useState({model:"",reasoningEffort:"",fastMode:!1,sandbox:"workspace-write"}),[u0,to]=A.useState({memory:"",items:[]}),[xu,bu]=A.useState({memory:"",items:[]}),[c0,ka]=A.useState({memory:"",items:[]}),[Nn,xn]=A.useState([]),[_r,_a]=A.useState(Dc),[il,ll]=A.useState({description:"",key:"",value:""}),[no,La]=A.useState(null),[wu,ia]=A.useState(()=>new Set),[Ba,mi]=A.useState(!1),[Sa,tn]=A.useState(!1),[d0,ku]=A.useState(!1),[Hn,qa]=A.useState(null),Mn=A.useRef(0);A.useEffect(()=>(++Mn.current,sl(!1),tr(!1),ro(!1),()=>{++Mn.current}),[Sa,Hn]);const[Su,f0]=A.useState(!0),[h0,sl]=A.useState(!1),[is,tr]=A.useState(!1),[gr,ro]=A.useState(!1),[Ua,ja]=A.useState(null),[m0,Ha]=A.useState(null),[ls,nr]=A.useState(null),[Lr,Br]=A.useState(null),[la,pi]=A.useState(null),[ol,ju]=A.useState(null),[Ca,Uf]=A.useState(()=>new Set),[ul,gi]=A.useState(null),[ss,ao]=A.useState(null),[p0,$a]=A.useState(null),[bn,qr]=A.useState(null),[os,sa]=A.useState(null),[oa,io]=A.useState(()=>cN(l)),[nn,cl]=A.useState(null),[us,Ur]=A.useState(()=>nN(l)),[cs,ds]=A.useState(230),[rr,Cu]=A.useState(()=>Date.now()),[lo,g0]=A.useState(0),fs=A.useRef(null),Fa=A.useRef(null),Tu=A.useRef(null),$n=A.useRef(null),yr=A.useRef(null),Ta=A.useRef(!0),dl=A.useRef(null),yi=A.useRef(null),Au=A.useCallback(b=>{var $;const T=Fa.current,N=Aa.current;b&&T&&N&&(yi.current={conversationId:N,scrollTop:T.scrollTop,...rv(T),followBottom:Ta.current},($=cn.current)==null||$.call(cn),cn.current=null),R(b)},[]),vi=A.useRef(null),xi=A.useRef(null),bi=A.useRef(new Set),so=A.useRef(!1),Eu=A.useRef([]),Aa=A.useRef(null),Pa=A.useRef(null);Pa.current=D?x:null;const oo=A.useRef(null),hs=A.useRef(new Map),ms=A.useRef(new Map),uo=A.useRef(new Set),co=A.useRef(new Map),ps=A.useRef(new Map),wi=A.useRef(new Map),fl=A.useRef(new Set),cn=A.useRef(null),ar=A.useRef(new Map),vr=A.useRef(new Map),Ga=A.useRef(new Map),gs=A.useRef(new Set),fo=Z3(),ho=Z3(),ys=A.useRef(null),mo=A.useRef(null),Nu=A.useRef(!1),Mu=A.useRef(!1),po=A.useRef(!1),Be=m.find(b=>b.id===x),y0=(Be==null?void 0:Be.unreadTurnCount)??0,ua=m.find(b=>b.id===Hn),pn=m.find(b=>b.id===en),Du=m.find(b=>b.id===ul),Ea=A.useMemo(()=>{const T=Id(l,y.length>0?y:[{id:"default",title:"Default",createdAt:"",updatedAt:""}]).map(Y=>({id:Y.id,title:Y.title,conversations:[]})),N=new Map(T.map(Y=>[Y.id,Y])),$=T[0];for(const Y of m)(N.get(Y.groupId)??$).conversations.push(Y);return T.filter(Y=>Y.conversations.length>0||Y.id!=="default")},[m,y]),Va=A.useMemo(()=>IE(Ea,oa),[oa,Ea]),Tt=x!==null?J[x]:null,ki=(Tt==null?void 0:Tt.messages)??[],vs=(Tt==null?void 0:Tt.events)??[],hl=Rz(zz(vs),x?he[x]:null),ml=rb(hl),go=(Tt==null?void 0:Tt.status)??(Be==null?void 0:Be.status)??"idle",xr=o1(Be,go),Hf=Hn!==null?((tc=J[Hn])==null?void 0:tc.status)??(ua==null?void 0:ua.status)??"idle":"idle",$f=o1(ua,Hf),xs=x?vr.current.get(x)??null:null,zu=A.useMemo(()=>new Map(m.map(b=>[b.id,b.title])),[m]),yo=A.useMemo(()=>Nx(ki,vs,(Tt==null?void 0:Tt.turns)??[],(Tt==null?void 0:Tt.timelineNodes)??[],xs,zu),[xs,Tt==null?void 0:Tt.timelineNodes,Tt==null?void 0:Tt.turns,vs,ki,zu]),Si=A.useMemo(()=>new Set(ki.filter(b=>b.origin==="clone"&&b.turnId).map(b=>b.turnId)),[ki]),Ya=x!==null&&Ca.has(x),Ff=x!==null&&f.has(x),bs=E7(u,Ff),vo=xs?(Ri=yo.find(b=>Pc(b.turnIds,xs)))==null?void 0:Ri.activity:null,ws=xr==="running"||xr==="initializing"||Ya?vo&&!bz(vo)?vo:{title:xr==="initializing"?"Initializing clone":"Thinking",createdAt:new Date().toISOString(),tone:"running"}:null,Ru=!ws&&xr==="waiting"&&(Be!=null&&Be.nextWakeup)?{title:"Scheduled wakeup",detail:yf(Be.nextWakeup,rr),createdAt:Be.nextWakeup.wakeAt,tone:"waiting"}:null,ji=ws??Ru,v0=B,xo=A.useRef(0);A.useEffect(()=>{x0(),pl()},[]),A.useEffect(()=>()=>{yr.current!==null&&window.clearTimeout(yr.current)},[]),A.useEffect(()=>{let b=!1;const T=()=>{b||(b=!0,ko().finally(()=>{b=!1}))};T();const N=window.setInterval(T,15*1e3);return()=>window.clearInterval(N)},[]),A.useEffect(()=>{const b=window.setInterval(()=>Cu(Date.now()),1e3);return()=>window.clearInterval(b)},[]),A.useEffect(()=>{gs.current=Ca},[Ca]),A.useEffect(()=>{Aa.current=x},[x]),A.useLayoutEffect(()=>{const b=oo.current;if(oo.current=x,!x||b===x)return;const T=window.requestAnimationFrame(()=>{const N=$n.current;N&&!N.disabled&&!document.querySelector('[aria-modal="true"]')&&N.focus({preventScroll:!0})});return()=>window.cancelAnimationFrame(T)},[x]),A.useEffect(()=>{Eu.current=m},[m]),A.useEffect(()=>{const b=na(l,V1),T=N=>{N.key===b&&g($=>Vl(l,$))};return window.addEventListener("storage",T),()=>window.removeEventListener("storage",T)},[l]),A.useEffect(()=>{x&&lp(l,x)},[x,l]),A.useLayoutEffect(()=>{if(D||!x||y0<=0)return;let b=!1;const T=async()=>{if(document.visibilityState==="visible"){g($=>$.map(Y=>Y.id===x?{...Y,unreadTurnCount:0}:Y));try{await yD(x)}catch($){b||console.error($)}}},N=()=>void T();return T(),document.addEventListener("visibilitychange",N),()=>{b=!0,document.removeEventListener("visibilitychange",N)}},[x,y0,D]),A.useEffect(()=>{var b;x&&(D?(Dn(x),(b=ar.current.get(x))==null||b.abort()):(ca(x),wr(x)))},[x,D]),A.useEffect(()=>{const b=window.setInterval(()=>void Gf(),FE);return()=>window.clearInterval(b)},[]),A.useEffect(()=>{var Se;const b=(Se=Be==null?void 0:Be.cloneLineage)==null?void 0:Se.initializationStatus;if(!x||!(b==="copying"||b==="injecting"||b==="initializing")&&(Be==null?void 0:Be.status)!=="initializing"&&(Be==null?void 0:Be.status)!=="initialization_failed")return;let N=!1,$=!1;const Y=async()=>{if(!$){$=!0;try{const $e=Ne(`conversations/${x}/clone`),De=await fetch($e);await Ve(De,{method:"GET",url:$e});const st=await De.json();N||Rn(st.conversation)}catch($e){N||console.warn("Failed to read clone status",$e)}finally{$=!1}}};Y();const ue=(Be==null?void 0:Be.status)==="initialization_failed"?void 0:window.setInterval(()=>void Y(),2e3);return()=>{N=!0,window.clearInterval(ue)}},[x,Be==null?void 0:Be.status,(Cl=Be==null?void 0:Be.cloneLineage)==null?void 0:Cl.initializationStatus]),A.useEffect(()=>{c(uN(l,x))},[x]),A.useEffect(()=>{if(!x||D)return;const b=NE({workspaceRunning:go==="running",streamLeaseActive:Ya,controllerActive:ar.current.has(x),currentTurnAbsent:uo.current.has(x),retryAt:ps.current.get(x)??null,now:Date.now()});b.kind==="probe"&&Zu(x,{waitMs:b.waitMs})},[x,Ya,lo,D,go]),A.useEffect(()=>()=>{for(const b of wi.current.values())window.clearTimeout(b);wi.current.clear()},[]),A.useEffect(()=>{if(!x)return;let b=!1;return YD(x).then(T=>{b||me(N=>({...N,[x]:T}))}).catch(T=>console.error(T)),()=>{b=!0}},[x]),A.useEffect(()=>{!x&&Jt==="workspace"&&nl("global")},[x,Jt]),A.useEffect(()=>{var b;if(Mt){if(!en&&x){hi(x);return}en&&!m.some(T=>T.id===en)&&hi(x??((b=m[0])==null?void 0:b.id)??null)}},[x,m,Mt,en]),A.useEffect(()=>{if(!Mt||t.role!=="admin")return;const b=window.setInterval(()=>void _u(),5e3);return()=>window.clearInterval(b)},[t.role,Mt]),A.useEffect(()=>{!Mt||Jt!=="workspace"||ka({memory:(pn==null?void 0:pn.memory)??"",items:(pn==null?void 0:pn.memoryItems)??[]})},[Jt,Mt,pn==null?void 0:pn.id,pn==null?void 0:pn.memory,pn==null?void 0:pn.memoryItems]),A.useEffect(()=>{if(!Ba)return;x&&jo(x);const b=T=>{T.key==="Escape"&&mi(!1)};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[x,Ba]),A.useEffect(()=>{if(!Mt)return;const b=T=>{T.key==="Escape"&&qn(!1)};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[Mt]),A.useEffect(()=>{var T;if(!Sa)return;if(Hn&&!m.some(N=>N.id===Hn)){qa(x??((T=m[0])==null?void 0:T.id)??null);return}const b=N=>{N.key==="Escape"&&(Ua?ja(null):tn(!1))};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[x,Sa,Ua,Hn,m]),A.useEffect(()=>{if(!Lr)return;pi(null);const b=T=>{T.key==="Escape"&&Br(null)};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[Lr]),A.useEffect(()=>{const b=Y=>{if(Y.code==="ShiftLeft"){po.current=!0;return}const ue=OE({code:Y.code,key:Y.key,metaKey:Y.metaKey,shiftKey:Y.shiftKey,ctrlKey:Y.ctrlKey,altKey:Y.altKey,leftShiftPressed:po.current,repeat:Y.repeat},nn!==null);if((ue==null?void 0:ue.type)==="move"){Y.preventDefault(),X(!0),cl(Se=>_E(Va,Se,Aa.current,ue.direction));return}if((ue==null?void 0:ue.type)==="cancel"){cl(null);return}if(!((ue==null?void 0:ue.type)!=="confirm"||!nn||Ro(Y.target))){if(Y.preventDefault(),nn.kind==="group"){Ms(nn.id);return}wl(nn.id),cl(null),X(!1)}},T=Y=>{Y.code==="ShiftLeft"&&(po.current=!1)},N=()=>{po.current=!1},$=()=>cl(null);return window.addEventListener("keydown",b,!0),window.addEventListener("keyup",T,!0),window.addEventListener("blur",N),window.addEventListener("pointerdown",$),()=>{window.removeEventListener("keydown",b,!0),window.removeEventListener("keyup",T,!0),window.removeEventListener("blur",N),window.removeEventListener("pointerdown",$)}},[nn,Va]),A.useEffect(()=>{nn&&!Va.some(b=>$s(b)===$s(nn))&&cl(null)},[nn,Va]),A.useLayoutEffect(()=>{if(!nn)return;const b=$s(nn),T=document.querySelector(`[data-keyboard-focus-key="${CSS.escape(b)}"]`);T==null||T.focus({preventScroll:!0}),T==null||T.scrollIntoView({block:"nearest"})},[nn]),A.useLayoutEffect(()=>{const b=Tu.current;if(D||!b)return;let T=!1;const N=()=>{if(T)return;const Y=b.getBoundingClientRect();ds(Math.ceil(Y.height+44))};N();const $=typeof ResizeObserver>"u"?null:new ResizeObserver(N);return $==null||$.observe(b),window.addEventListener("resize",N),()=>{T=!0,$==null||$.disconnect(),window.removeEventListener("resize",N)}},[D]),A.useLayoutEffect(()=>{var Se,$e,De;const b=Fa.current;if(!b)return;const T=dl.current!==x;dl.current=x,T&&((Se=cn.current)==null||Se.call(cn),cn.current=null);const N=yi.current;if(N&&N.conversationId!==x)yi.current=null;else if(N&&(Ta.current=N.followBottom,!N.followBottom)){($e=cn.current)==null||$e.call(cn),cn.current=iv(b,{...N,previousScrollHeight:b.scrollHeight-N.scrollTop});return}const $=vi.current;if($&&$.conversationId===x){(De=cn.current)==null||De.call(cn),cn.current=iv(b,$),vi.current=null,Ta.current=!1;return}if(!T&&!Ta.current)return;Ta.current=!0,ip(b);const Y=requestAnimationFrame(()=>ip(b)),ue=window.setTimeout(()=>ip(b),120);return()=>{cancelAnimationFrame(Y),window.clearTimeout(ue)}},[x,D,cs,Tt==null?void 0:Tt.timelineNodes,vs.length,ki.length]);function ks(){var b;yi.current&&(yi.current=null,(b=cn.current)==null||b.call(cn),cn.current=null)}async function Pf(){var T;const b=Fa.current;b&&(yi.current||(Ta.current=aN(b),!(!x||!((T=Tt==null?void 0:Tt.history)!=null&&T.hasMoreBefore))&&(Tt.loadingOlder||bi.current.has(x)||b.scrollTop>96||await Ai(x))))}function Ou(b){var N,$;if(b.history)return b.history;const T=((N=b.timelineNodes)==null?void 0:N.filter(Y=>Y.parentId===null).reduce((Y,ue)=>Y===null||ue.timelineAt<Y.timelineAt||ue.timelineAt===Y.timelineAt&&ue.sequence<Y.sequence?ue:Y,null))??null;return{hasMoreBefore:!1,oldestMessageCreatedAt:(($=b.messages[0])==null?void 0:$.createdAt)??null,oldestTimelineAt:(T==null?void 0:T.timelineAt)??null,oldestTimelineSequence:(T==null?void 0:T.sequence)??null,messageTotal:b.messages.length,eventTotal:b.events.length,loadedMessageCount:b.messages.length,loadedEventCount:b.events.length}}async function Wa(b){const T=new URL(b.url,window.location.href).toString();await navigator.clipboard.writeText(T),pi(b.url)}async function Ss(b,T){await navigator.clipboard.writeText(T),ju(b),yr.current!==null&&window.clearTimeout(yr.current),yr.current=window.setTimeout(()=>{ju(null),yr.current=null},1800)}function Ze(b,T,N){const $=Date.now();nr({id:$,tone:b,text:T,detail:N}),window.setTimeout(()=>{nr(Y=>(Y==null?void 0:Y.id)===$?null:Y)},N?8e3:2400)}function Dn(b){const T=wi.current.get(b);T!==void 0&&(window.clearTimeout(T),wi.current.delete(b))}function ca(b){uo.current.delete(b),co.current.delete(b),ps.current.delete(b),fl.current.delete(b),Dn(b)}function Iu(b){uo.current.add(b),co.current.delete(b),ps.current.delete(b),fl.current.delete(b),Dn(b)}function bo(b){uo.current.add(b),fl.current.delete(b);const T=(co.current.get(b)??0)+1;co.current.set(b,T);const N=ME(T);ps.current.set(b,Date.now()+N),Dn(b);const $=window.setTimeout(()=>{wi.current.delete(b),g0(Y=>Y+1)},N);wi.current.set(b,$)}function wo(b,T){T!=="running"&&ca(b)}async function x0(){try{const[b,T]=await Promise.all([jv(),Tv()]);te("connected");const N=Id(l,T);if(k(N),up(l,N),b.length>0){const $=Vl(l,b),Y=oN(l),ue=$.find(Se=>Se.id===Y)??$[0];g($),_d(l,$),C(ue.id);return}g([]),lp(l,null),C(null)}catch(b){console.error(b),te("error")}}async function Fn(){const[b,T]=await Promise.all([jv(),Tv()]);for(const Y of b)wo(Y.id,Y.status);const N=Vl(l,b),$=Id(l,T);k($),up(l,$),g(N),_d(l,N)}async function Gf(){if(!so.current){so.current=!0;try{const b=await hD(),T=Eu.current,N=new Set(T.map(De=>De.id)),$=new Set(b.map(De=>De.id));if(N.size!==$.size||[...N].some(De=>!$.has(De))){await Fn(),te("connected");return}const Y=Aa.current;for(const De of b)wo(De.id,De.status);const ue=new Map(b.map(De=>[De.id,De])),Se=Y?ue.get(Y)??null:null,$e=Vl(l,T.map(De=>{const st=ue.get(De.id);return st?{...De,status:st.status,statusError:st.statusError,nextWakeup:st.nextWakeup,unreadTurnCount:st.unreadTurnCount,updatedAt:st.updatedAt}:De}));g($e),_d(l,$e),te("connected"),Se&&!gs.current.has(Se.id)&&Rt(Se.id,De=>({...De,status:Se.status}))}catch(b){console.error(b),te("error")}finally{so.current=!1}}}async function pl(){try{const b=await hz();te("connected"),je(b.version)}catch(b){console.error(b),te("error")}}async function ko(){const b=++xo.current;try{const T=await mz();b===xo.current&&ee(T)}catch(T){b===xo.current&&ee(N=>N?{...N,stale:!0,error:"无法读取云端额度缓存"}:null),console.error("runtime rate-limit cache read failed",T)}}async function js(){try{const b=await wD();Kt(b),te("connected")}catch(b){console.error(b),te("error")}}async function So(b){try{const T=await kD(b);Vn(T),te("connected")}catch(T){console.error(T),Vn([]),te("error")}}async function jo(b){try{const T=await SD(b);xn(T),te("connected")}catch(T){console.error(T),xn([]),te("error")}}async function Ci(b){try{const T=await ED();Xt(T),wa(T),b||(as(null),al(T)),te("connected")}catch(T){console.error(T),te("error")}}async function gl(){if(t.role==="admin")try{ve(await ND()),te("connected")}catch(b){console.error(b),te("error")}}async function yl(b=!0){try{const T=await BD(b);re(T.models),te("connected"),T.refreshing&&window.setTimeout(()=>void yl(!1),1e3)}catch(T){console.error(T),re([]),te("error")}}async function Co(){try{const b=await DD();qe(b.codexVersion),lt(b.codexReleasedAt),te("connected")}catch(b){console.error(b),qe(null),lt(null),te("error")}}async function Na(b=!1){b&&Ia(!0);try{const T=await qD(b);xt(T.job),aa(T.latest),te("connected"),T.job&&T.job.status!=="running"&&xi.current===T.job.id&&(xi.current=null,T.job.status==="succeeded"?(await Promise.all([yl(),Co()]),Ze("success",`Codex CLI updated to ${qf(T.job.currentVersion)}`)):Ze("error","Codex CLI update failed",T.job.error??void 0))}catch(T){console.error(T),te("error")}finally{b&&Ia(!1)}}async function b0(){Zt(!0);try{const b=await UD();xi.current=b.id,xt(b),te("connected")}catch(b){console.error(b);const T=dt(b);Ze("error","Unable to start Codex CLI update",T.detail??T.message)}finally{Zt(!1)}}A.useEffect(()=>{if(!Ct||(nt==null?void 0:nt.status)!=="running")return;const b=window.setInterval(()=>void Na(),1e3);return()=>window.clearInterval(b)},[Ct,nt==null?void 0:nt.id,nt==null?void 0:nt.status]);async function To(b){try{const T=await HD(b);as(T),al(T.effective),te("connected")}catch(T){console.error(T),as(null),te("error")}}async function w0(){try{const b=await $D();to(b),bu(b),te("connected")}catch(b){console.error(b),te("error")}}async function Vf(){if(t.role!=="admin"){Z([]);return}try{Z(await tR()),te("connected")}catch(b){console.error(b),te("error")}}async function _u(){if(t.role!=="admin"){ye(null);return}U(!0);try{ye(await MD()),te("connected")}catch(b){console.error(b),te("error")}finally{U(!1)}}async function k0(b=en){const T=[js(),Ci(b),Co(),yl(),w0()];t.role==="admin"&&(T.push(Vf()),T.push(_u()),T.push(gl())),b&&(T.push(wr(b)),T.push(To(b)),T.push(So(b)),T.push(jo(b))),await Promise.all(T)}function Lu(){var T;Jn(!1);const b=x??((T=m[0])==null?void 0:T.id)??null;X(!1),hi(b),nl(t.role==="admin"?"global":b?"workspace":"global"),qn(!0),k0(b)}function S0(){var T;Jn(!1);const b=x??((T=m[0])==null?void 0:T.id)??null;hi(b),nl(b?"workspace":"global"),qn(!0),k0(b)}function Ao(){var T;X(!1);const b=x??((T=m[0])==null?void 0:T.id)??null;qa(b),Ha(null),ja(null),tn(!0)}function Hr(b){hi(b),nl("workspace"),wr(b),To(b),So(b),jo(b),_a(Dc)}async function Eo(b){b.preventDefault();try{if(Jt==="workspace"&&en){const T=(pn==null?void 0:pn.status)==="running",N=await Ev(en,XD(vu,Un,rl));as(N.settings),al(N.settings.effective),Rn(N.conversation),Ze("success","Workspace settings saved",T?"The current turn keeps its existing settings. Changes apply from the next turn.":void 0)}else{const T=await FD(Ir);Xt(T),wa(T),en&&await To(en),Ze("success","Global settings saved")}te("connected")}catch(T){console.error(T),te("error");const N=dt(T);Ze("error","Failed to save runtime settings",N.detail??N.message)}}async function br(b){try{const T=await PD(b);ve(T),te("connected"),Ze("success","Deployment settings saved")}catch(T){console.error(T),te("error");const N=dt(T);throw Ze("error","Failed to save deployment settings",N.detail??N.message),T}}async function vl(){var $;const b=Mn.current,T=ua;if(!T){Ze("error","No workspace selected");return}const N=(($=J[T.id])==null?void 0:$.status)??T.status;if(N==="running"||N==="initializing"){Ze("error","Stop the running turn before resetting runtime");return}ro(!0),Ha(null);try{const Y=await Mv(T.id);if(b!==Mn.current)return;ja(Y),te("connected")}catch(Y){if(b!==Mn.current)return;console.error(Y),te("error");const ue=dt(Y);Ze("error","Failed to preview runtime reset",ue.detail??ue.message)}finally{b===Mn.current&&ro(!1)}}async function Bu(b){const T=Mn.current,N=ua,$=Ua;if(!N||!$||$.conversationId!==N.id){Ze("error","Reset preview is required");return}tr(!0),Ha(null);try{if(await Nv(N.id,{warmup:Su,previewFingerprint:$.fingerprint,selectedEntryIds:b}),T!==Mn.current)return;ja(null),tn(!1),te("connected"),Ze("success","Reset 已提交,可从工作空间标题旁查看进度或停止"),Aa.current===N.id&&await wr(N.id),await Fn()}catch(Y){if(T!==Mn.current)return;console.error(Y),te("error");const ue=dt(Y);Ze("error","Failed to reset runtime thread",ue.detail??ue.message)}finally{T===Mn.current&&tr(!1)}}async function No(){var Y;const b=Mn.current,T=ua;if(!T){Ze("error","No workspace selected");return}const N=((Y=J[T.id])==null?void 0:Y.status)??T.status;if(N==="running"||N==="initializing"){Ze("error","Stop the running turn before clearing context");return}if(window.confirm(`Start "${T.title}" from a blank context?
353
-
354
- This clears Workspace Memory and creates a new Codex thread without restored history. Workspace files, Timeline, metadata, and Base Memory remain intact.`)){sl(!0),Ha(null);try{const ue=await Mv(T.id);if(b!==Mn.current||(await Nv(T.id,{warmup:!1,previewFingerprint:ue.fingerprint,selectedEntryIds:[],clearWorkspaceMemory:!0,saveSelection:!1}),b!==Mn.current))return;ja(null),tn(!1),te("connected"),Ze("success","空白上下文重置已提交,可从工作空间标题旁查看进度或停止"),Aa.current===T.id&&await wr(T.id),await Fn()}catch(ue){if(b!==Mn.current)return;console.error(ue),te("error");const Se=dt(ue);Ze("error","Failed to clear workspace context",Se.detail??Se.message)}finally{b===Mn.current&&sl(!1)}}}async function Mo(b){const T=ua,N=Ua;if(!T||!N||N.conversationId!==T.id)throw new Error("Reset preview is no longer current.");try{await GD(T.id,{previewFingerprint:N.fingerprint,selectedEntryIds:b}),te("connected")}catch($){console.error($),te("error");const Y=dt($);throw Ze("error","Failed to save reset defaults",Y.detail??Y.message),$}}async function qu(b,T){try{const N=await Ev(b,{[T]:null});as(N.settings),al(N.settings.effective),Rn(N.conversation),te("connected"),Ze("success","Workspace override reset")}catch(N){console.error(N),te("error"),Ze("error","Failed to reset workspace override")}}async function Ti(b){try{const T=await rz({memory:nz(b),items:b});return to(T),bu(T),te("connected"),Ze("success","Base memory saved"),T.items}catch(T){throw console.error(T),te("error"),Ze("error","Failed to save memory"),T}}async function j0(b,T){try{const N=await $d(b,{memoryItems:T});return Rn(N),ka({memory:N.memory,items:N.memoryItems}),te("connected"),Ze("success","Workspace memory saved"),N.memoryItems}catch(N){throw console.error(N),te("error"),Ze("error","Failed to save memory"),N}}async function Do(b){b.preventDefault();const T=il.key.trim();if(T)try{if(Jt==="workspace"&&en){const N=await iz(en,T,il.value,il.description);Vn($=>[...$.filter(Y=>Y.key!==N.variable.key),N.variable].sort((Y,ue)=>Y.key.localeCompare(ue.key))),Rn(N.conversation)}else{const N=await az(T,il.value,il.description);Kt($=>[...$.filter(Y=>Y.key!==N.key),N].sort((Y,ue)=>Y.key.localeCompare(ue.key)))}Ze("success",Jt==="workspace"?"Workspace environment saved":"Base environment saved"),ll({description:"",key:"",value:""}),La(null),ia(N=>{const $=new Set(N);return $.delete(T),$}),te("connected")}catch(N){console.error(N),te("error"),Ze("error","Failed to save environment")}}async function xl(b){try{if(Jt==="workspace"&&en){const T=await uz(en,b);Vn(N=>N.filter($=>$.key!==b)),Rn(T)}else await oz(b),Kt(T=>T.filter(N=>N.key!==b));no===b&&(ll({description:"",key:"",value:""}),La(null),ia(T=>{const N=new Set(T);return N.delete(b),N})),te("connected"),Ze("success",Jt==="workspace"?"Workspace environment deleted":"Base environment deleted")}catch(T){console.error(T),te("error"),Ze("error","Failed to delete environment")}}async function Yf(b,T){if(T.preventDefault(),!_r.name.trim()){Ze("error","Knowledge name is required");return}const N=ZD(_r);try{const $=_r.id?await dz(b,_r.id,N):await cz(b,N);xn(Y=>[...Y.filter(ue=>ue.id!==$.id),$].sort(Dv)),_a(Dc),te("connected"),Ze("success","Workspace knowledge saved")}catch($){console.error($),te("error"),Ze("error","Failed to save workspace knowledge")}}async function ir(b,T){try{await fz(b,T),xn(N=>N.filter($=>$.id!==T)),_r.id===T&&_a(Dc),te("connected"),Ze("success","Workspace knowledge deleted")}catch(N){console.error(N),te("error"),Ze("error","Failed to delete workspace knowledge")}}function Uu(b){nl("workspace"),_a(QD(b))}function Ma(b){ll({description:b.description,key:b.key,value:""}),La(b.key),ia(T=>{const N=new Set(T);return N.delete(b.key),N}),Ka(b.key,{preserveTypedValue:!0})}function C0(){const b=no;ll({description:"",key:"",value:""}),La(null),b&&ia(T=>{const N=new Set(T);return N.delete(b),N})}async function zo(b){await Ka(b)}async function Ka(b,T={}){try{const N=Jt==="workspace"&&en?await sz(en,b):await lz(b);ll($=>$.key===b&&(!T.preserveTypedValue||$.value.length===0)?{...$,value:N}:$),ia($=>new Set($).add(b)),te("connected")}catch(N){console.error(N),te("error")}}async function wr(b){var $;if(Pa.current===b)return;const T=(($=yi.current)==null?void 0:$.conversationId)===b,N=await Wc(b);T?ei(N):Kf(N)}async function Hu(b){if(Pa.current!==b)try{const T=await Wc(b);ei(T)}catch(T){console.warn("Failed to synchronize timeline before turn stream",T)}}function $u(){Be&&L({requestId:gz(),sourceId:Be.id,name:`${Be.title} - Clone`,groupId:Be.groupId,excludeTopicHistory:!1})}async function T0(b){if(b.preventDefault(),!(K||!q||!q.name.trim())){P(!0);try{const T=await yz(q.sourceId,q.name.trim(),q.groupId,q.excludeTopicHistory,q.requestId);g(N=>{const $=[T.conversation,...N];return Lc(l,X3(nu(l),T.conversation.id,$.map(Y=>Y.id))),Vl(l,$)}),C(T.conversation.id),L(null),X(!1),Ze(T.error?"error":"success",T.error?"克隆初始化失败":"克隆已提交,可在工作空间中查看初始化状态",T.error??void 0)}catch(T){Ze("error","Clone failed",dt(T).detail??dt(T).message)}finally{P(!1)}}}async function kr(){if(Be)try{const b=await vz(Be.id);Rn(b.conversation),Ze(b.error?"error":"success",b.error?"Clone retry failed":"Clone initialization restarted",b.error??void 0)}catch(b){Ze("error","Clone retry failed",dt(b).detail??dt(b).message)}}async function Ai(b,T={}){var De,st,tt,Lt;const N=J[b];if(!((De=N==null?void 0:N.history)!=null&&De.hasMoreBefore)||N.loadingOlder||bi.current.has(b))return;const $=(st=N==null?void 0:N.history)==null?void 0:st.oldestTimelineAt,Y=(tt=N==null?void 0:N.history)==null?void 0:tt.oldestTimelineSequence,ue=$&&Y!==null&&Y!==void 0?`${$}|${Y}`:Y==null?(Lt=N==null?void 0:N.history)==null?void 0:Lt.oldestMessageCreatedAt:String(Y),Se=Fa.current;if(!ue||!Se)return;if(T.preserveAnchor??!0){const wn=rv(Se);vi.current={anchorOffset:wn.anchorOffset,conversationId:b,previousScrollHeight:Se.scrollHeight,anchorTurnId:wn.anchorTurnId}}else vi.current=null;bi.current.add(b),Rt(b,wn=>({...wn,loadingOlder:!0}));try{const wn=await Wc(b,{before:ue,limit:px});N0(wn)}catch(wn){console.error(wn),vi.current=null}finally{bi.current.delete(b),Rt(b,wn=>({...wn,loadingOlder:!1}))}}async function bl(b,T){const N=await pz(b,T||void 0);g($=>{const Y=[N,...$];return Lc(l,X3(nu(l),N.id,Y.map(ue=>ue.id))),Vl(l,Y)}),C(N.id),X(!1)}function wl(b){b!==Aa.current&&(F(T=>{if(!(b in T))return T;const N={...T};return delete N[b],N}),C(b))}function Cs(){X(!1),Xe({mode:"create",groupId:null,title:""})}function lr(b){Xe({mode:"rename",groupId:b.id,title:b.title})}function sr(){var b;X(!1),Re({mode:"create",conversationId:null,title:"",groupId:(Be==null?void 0:Be.groupId)??((b=y[0])==null?void 0:b.id)})}async function Xa(b){var T;if(b.status!=="running"){Oe(!0);try{await xz(b.id),F($=>{const Y={...$};return delete Y[b.id],Y});const N=Eu.current.filter($=>$.id!==b.id);if(Lc(l,RE(nu(l),b.id)),sp(l,b.id,""),g(N),x===b.id){const $=((T=N[0])==null?void 0:T.id)??null;lp(l,$),C($)}(Te==null?void 0:Te.conversationId)===b.id&&Yn(),ie(null),Ze("success","Workspace 已删除,本地数据正在后台清理")}catch(N){const $=dt(N);Ze("error","Failed to delete workspace",$.detail??$.message)}finally{Oe(!1)}}}async function da(b){if(!(b.id===ev||!window.confirm(`Delete group "${b.title}"?
355
-
356
- Workspaces in this group will move to Default.`)))try{const N=await bD(b.id),$=Id(l,N.groups);k($),up(l,$);const Y=Vl(l,N.conversations);g(Y),_d(l,Y),io(ue=>{const Se=new Set(ue);return Se.delete(b.id),op(l,Se),Se})}catch(N){console.error(N)}}function fa(b){Re({mode:"rename",conversationId:b.id,title:b.title})}function Yn(){rt(!1),Re(null)}function Ts(){Xe(null)}async function Fu(b,T){const N=T.trim(),$=m.find(ue=>ue.id===b);if(!$||!N||N===$.title){Yn();return}const Y=await $d(b,{title:N});Rn(Y),Yn()}function Ro(b){return b instanceof HTMLInputElement||b instanceof HTMLTextAreaElement}function Pu(b){return b instanceof Element&&!!b.closest("input, button")}function zn(b,T){const N=document.elementFromPoint(b,T);return N instanceof HTMLElement?N.closest(".session-item[data-workspace-id]"):null}function Ht(b,T){const N=document.elementFromPoint(b,T);return N instanceof HTMLElement?N.closest(".workspace-group[data-group-id]"):null}function wt(b,T,N){const $=zn(T,N),Y=$==null?void 0:$.dataset.workspaceId;if($&&Y&&Y!==b){qr({kind:"workspace",id:Y,position:dN($,N)});return}const ue=Ht(T,N),Se=ue==null?void 0:ue.dataset.groupId;if(!Se){qr(null);return}qr({kind:"group",id:Se})}function Za(b,T){if(!b.isPrimary||b.button!==0||Pu(b.target))return;b.pointerType!=="touch"&&b.currentTarget.setPointerCapture(b.pointerId),ys.current={id:T,pointerId:b.pointerId,startX:b.clientX,startY:b.clientY};const N=b.currentTarget,$=b.pointerId;fo.begin(b,()=>{N.isConnected&&(N.setPointerCapture($),gi(T),qr(null))})}function Sr(b,T){const N=ys.current;if(!fo.allows(b.pointerType)||!N||N.id!==T||N.pointerId!==b.pointerId)return;const $=Math.hypot(b.clientX-N.startX,b.clientY-N.startY);if(ul!==T){if($<Q3)return;gi(T),qr(null)}b.preventDefault(),sa({x:b.clientX,y:b.clientY}),wt(T,b.clientX,b.clientY)}async function Gu(b,T){var Se;fo.end(),ul===T&&b.preventDefault(),b.currentTarget.hasPointerCapture(b.pointerId)&&b.currentTarget.releasePointerCapture(b.pointerId),ys.current=null;const N=ul===T;N&&(Nu.current=!0);const $=bn;if(!N||!$){gi(null),qr(null),sa(null);return}const Y=m.find($e=>$e.id===T),ue=$.kind==="group"?$.id:(Se=m.find($e=>$e.id===$.id))==null?void 0:Se.groupId;if(!Y||!ue){gi(null),qr(null),sa(null);return}if(g($e=>{const De=$.kind==="workspace"?fN($e.map(st=>st.id===T?{...st,groupId:ue}:st),T,$.id,$.position):[...$e.filter(st=>st.id!==T),{...Y,groupId:ue}];return Lc(l,G1(De.map(st=>st.id),nu(l))),De}),Y.groupId!==ue)try{const $e=await $d(T,{groupId:ue});Rn($e)}catch($e){console.error($e),await Fn()}gi(null),qr(null),sa(null)}function Qa(b){fo.end(),b.currentTarget.hasPointerCapture(b.pointerId)&&b.currentTarget.releasePointerCapture(b.pointerId),ys.current=null,gi(null),qr(null),sa(null)}function A0(b,T){if(!b.isPrimary||b.button!==0)return;b.pointerType!=="touch"&&b.currentTarget.setPointerCapture(b.pointerId),mo.current={id:T,pointerId:b.pointerId,startX:b.clientX,startY:b.clientY};const N=b.currentTarget,$=b.pointerId;ho.begin(b,()=>{N.isConnected&&(N.setPointerCapture($),ao(T),$a(null))})}function E0(b,T){const N=mo.current;if(!ho.allows(b.pointerType)||!N||N.id!==T||N.pointerId!==b.pointerId)return;const $=Math.hypot(b.clientX-N.startX,b.clientY-N.startY);if(ss!==T){if($<Q3)return;ao(T),$a(null)}b.preventDefault();const Y=Ht(b.clientX,b.clientY),ue=Y==null?void 0:Y.dataset.groupId;$a(ue&&ue!==T?ue:null)}function kl(b,T){ho.end(),b.currentTarget.hasPointerCapture(b.pointerId)&&b.currentTarget.releasePointerCapture(b.pointerId);const N=ss===T;N&&(b.preventDefault(),Mu.current=!0);const $=p0;N&&$&&k(Y=>{const ue=hN(Y,T,$);return Sx(l,ue.map(Se=>Se.id)),ue}),mo.current=null,ao(null),$a(null)}function Ei(b){ho.end(),b.currentTarget.hasPointerCapture(b.pointerId)&&b.currentTarget.releasePointerCapture(b.pointerId),mo.current=null,ao(null),$a(null)}function Vu(b){const T=b.target.value;Re(N=>N&&{...N,title:T})}function As(b){const T=b.target.value;Re(N=>N&&{...N,groupId:T})}function Yu(b){const T=b.target.value;Xe(N=>N&&{...N,title:T})}async function Ni(b){if(b.preventDefault(),!Te)return;const T=Te.title.trim();if(T){rt(!0);try{if(Te.mode==="create"){await bl(T,Te.groupId),Yn();return}Te.conversationId&&await Fu(Te.conversationId,T)}catch(N){console.error(N);const $=dt(N);Ze("error",Te.mode==="create"?"Failed to create workspace":"Failed to rename workspace",$.detail??$.message)}finally{rt(!1)}}}function jr(b){b.key==="Escape"&&(b.preventDefault(),b.stopPropagation(),Yn())}async function Ja(b){if(b.preventDefault(),!Pe)return;const T=Pe.title.trim();if(T)try{if(Pe.mode==="rename"){if(!Pe.groupId)return;const $=await xD(Pe.groupId,{title:T});k(Y=>Y.map(ue=>ue.id===$.id?$:ue)),Ts();return}const N=await vD(T);k($=>[...$,N]),io($=>{const Y=new Set($);return Y.delete(N.id),op(l,Y),Y}),Ts()}catch(N){console.error(N)}}function $r(b){b.key==="Escape"&&(b.preventDefault(),b.stopPropagation(),Ts())}async function Wu(b){b.preventDefault(),await Es()}function Ku(b){x&&hs.current.set(x,(hs.current.get(x)??0)+1),c(b),sp(l,x,b)}function ha(b,T,N){const $={conversationId:b,version:N};if(!Yy($,{conversationId:b,version:hs.current.get(b)??0}))return;sp(l,b,"");const Y=Aa.current;Y&&Yy($,{conversationId:Y,version:hs.current.get(Y)??0})&&c(ue=>ue.trim()===T?"":ue)}function Oo(b){if(ms.current.has(b))return null;const T=Symbol(b);return ms.current.set(b,T),h(N=>{const $=new Set(N);return $.add(b),$}),T}function or(b,T){ms.current.get(b)===T&&(ms.current.delete(b),h(N=>{const $=new Set(N);return $.delete(b),$}))}function gn(b){const T=dt(b);Ze("error","Message was not confirmed",`${T.message}. Your text is still in the composer and can be retried.`)}async function Es(b={}){const T=u.trim();if(!T)return;const N=x,$=N7({hasConversation:N!==null,messageSubmitting:N!==null&&ms.current.has(N),hasActiveTurn:N!==null&&vr.current.has(N),hasConfirmedCurrentTurn:N!==null&&fl.current.has(N)},!!b.forceNewTurn);if($==="create-workspace"){sr();return}if($==="blocked"||!N)return;const Y=hs.current.get(N)??0,ue=Oo(N);if(!ue)return;if($==="queue-turn"){await Wf(N,T,Y,ue);return}if($==="steer-turn"){await dn(N,T,Y,ue);return}const Se=`local-${Date.now()}`;Rt(N,De=>({...De,messages:[...De.messages,{id:Se,role:"user",content:T,createdAt:new Date().toISOString()}],status:"running"})),Pr(N,"running"),Cr(N,!0);let $e=!1;try{let De=null;const st=Ne(`conversations/${N}/turns`),tt=await fetch(st,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:T,receiptOnly:!0})});if(tt.ok){const Lt=await tt.json();if(Lt.inputId&&Lt.message){Da(N,Se,Lt.message),$e=!0,ha(N,T,Y),or(N,ue),Cr(N,!1),Zu(N,{waitMs:15e3});return}if(!Lt.turnId)throw new Error("Turn did not return a turn id");if(De=Lt.turnId,!Lt.message)throw new Error("Turn did not return the persisted message");Da(N,Se,Lt.message,De),$e=!0,ha(N,T,Y)}else{const Lt=await tN(tt);if(Lt){De=Lt;const wn=await Ju(N,Lt,T);if(!wn.ok)throw await Kn(wn,{method:"POST",url:Ne(`conversations/${N}/turns/${Lt}/steer`)});const Al=await wn.json();if(!Al.message)throw new Error("Steer did not return the persisted message");Da(N,Se,Al.message,Lt),$e=!0,ha(N,T,Y)}else throw await Kn(tt,{method:"POST",url:st})}if(!De)throw await Kn(tt,{method:"POST",url:st});Qu(N,De),or(N,ue)}catch(De){$e||gn(De);const st=eN(De);st&&Ze("error","Reset thread required","This thread does not support the required Seele tools. Reset this workspace thread and try again."),Rt(N,tt=>({...tt,status:"error",messages:$e?tt.messages:tt.messages.filter(Lt=>Lt.id!==Se),events:[...tt.events,{id:tt.events.length+1,event:"client.error",data:st?{message:"Reset thread required",detail:"This thread does not support the required Seele tools. Reset this workspace thread and try again."}:qs(De),createdAt:new Date().toISOString()}]})),Pr(N,"error"),Cr(N,!1),await Fn()}finally{or(N,ue)}}async function Xu(b){const T=Ga.current.get(b)??[];if(T.length===0)return;const[N,...$]=T;Ga.current.set(b,$),await Qu(b,N)}async function Zu(b,T={}){if(Pa.current===b||gs.current.has(b)||ar.current.has(b))return;Dn(b),ps.current.delete(b);const N=new AbortController;ar.current.set(b,N),Cr(b,!0);try{const $=T.waitMs?`?waitMs=${T.waitMs}`:"",Y=Ne(`conversations/${b}/turns/current/events${$}`),ue=await fetch(Y,{signal:N.signal});if(!ue.ok||!ue.body)throw await Kn(ue,{method:"GET",url:Y});ca(b),fl.current.add(b),await Hu(b),await _v(ue.body,Se=>{const $e=yv(Se,`stream-${Date.now()}-${Math.random().toString(36).slice(2)}`);$e.turnId&&!vr.current.has(b)&&vr.current.set(b,$e.turnId),Rt(b,st=>({...st,status:Fd($e)??st.status,events:gv(st.events,$e)}));const De=Fd($e);De&&Pr(b,De)}),await wr(b),await Fn()}catch($){if(!xv($)){if(JE($)){ar.current.get(b)===N&&bo(b);return}Rt(b,Y=>({...Y,status:"error",events:[...Y.events,{id:Y.events.length+1,event:"client.error",data:qs($),createdAt:new Date().toISOString()}]}))}}finally{ar.current.get(b)===N&&(fl.current.delete(b),vr.current.delete(b),ar.current.delete(b),Cr(b,!1),await Xu(b))}}async function Qu(b,T,N={}){if(Pa.current===b)return;const $=vr.current.get(b);if($===T)return;if($||ar.current.has(b)){const ue=Ga.current.get(b)??[];ue.includes(T)||Ga.current.set(b,[...ue,T]);return}ca(b);const Y=new AbortController;ar.current.set(b,Y),vr.current.set(b,T),Cr(b,!0);try{const ue=Ne(`conversations/${b}/turns/${T}/events`),Se=await fetch(ue,{signal:Y.signal});if(!Se.ok||!Se.body)throw await Kn(Se,{method:"GET",url:ue});await Hu(b),await _v(Se.body,$e=>{const De=yv($e,`stream-${Date.now()}-${Math.random().toString(36).slice(2)}`);Rt(b,tt=>({...tt,status:Fd(De)??tt.status,events:gv(tt.events,De)}));const st=Fd(De);st&&Pr(b,st)}),await wr(b),await Fn()}catch(ue){if(!xv(ue)){if(N.recovered&&QE(ue)){await wr(b),await Fn();return}Rt(b,Se=>({...Se,status:"error",events:[...Se.events,{id:Se.events.length+1,event:"client.error",data:qs(ue),createdAt:new Date().toISOString()}]}))}}finally{ar.current.get(b)===Y&&(vr.current.get(b)===T&&vr.current.delete(b),ar.current.delete(b),Cr(b,!1),await Xu(b))}}async function Wf(b,T,N,$){let Y=!1;const ue=`local-queued-${Date.now()}`;Rt(b,Se=>({...Se,messages:[...Se.messages,{id:ue,role:"user",content:T,createdAt:new Date().toISOString()}]}));try{const Se=Ne(`conversations/${b}/turns`),$e=await fetch(Se,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:T,mode:"queue",receiptOnly:!0})});if(!$e.ok)throw await Kn($e,{method:"POST",url:Se});const De=await $e.json();if(!De.turnId&&!De.inputId)throw new Error("Queued turn did not return a turn id");if(!De.message)throw new Error("Queued turn did not return the persisted message");Da(b,ue,De.message,De.turnId),Y=!0,ha(b,T,N),De.turnId?Qu(b,De.turnId):Zu(b,{waitMs:15e3}),or(b,$),await Fn(),Ze("success",De.inputId?"Message accepted":De.queuePosition?`Queued as next turn (${De.queuePosition})`:"Started new turn")}catch(Se){Y||gn(Se),Rt(b,$e=>({...$e,messages:Y?$e.messages:$e.messages.filter(De=>De.id!==ue),events:[...$e.events,{id:$e.events.length+1,event:"client.error",data:qs(Se),createdAt:new Date().toISOString()}]}))}finally{or(b,$)}}async function dn(b,T,N,$){const Y=vr.current.get(b);let ue=!1;const Se=`local-steer-${Date.now()}`;Rt(b,$e=>({...$e,messages:[...$e.messages,{id:Se,role:"user",content:T,createdAt:new Date().toISOString(),turnId:Y??null}],status:"running"}));try{const $e=Ne(Y?`conversations/${b}/turns/${Y}/steer`:`conversations/${b}/turns/steer`),De=await fetch($e,nv(T));if(!De.ok)throw await Kn(De,{method:"POST",url:$e});const st=await De.json();if(!st.message)throw new Error("Steer did not return the persisted message");Da(b,Se,st.message,Y),ue=!0,ha(b,T,N),or(b,$)}catch($e){gn($e),Rt(b,De=>({...De,messages:ue?De.messages:De.messages.filter(st=>st.id!==Se),events:[...De.events,{id:De.events.length+1,event:"client.error",data:qs($e),createdAt:new Date().toISOString()}]}))}finally{or(b,$)}}async function Ju(b,T,N){return fetch(Ne(`conversations/${b}/turns/${T}/steer`),nv(N))}function Da(b,T,N,$){Rt(b,Y=>({...Y,messages:Wd(Y.messages.filter(ue=>ue.id!==T),[{...N,turnId:$??N.turnId??null}])}))}async function Ns(){var $;if(!x||xr!=="running"&&xr!=="initializing"&&!Ya)return;const b=x,T=xr,N=`client-stop-${Date.now()}`;Iu(b),($=ar.current.get(b))==null||$.abort(),vr.current.delete(b),Ga.current.delete(b),Cr(b,!1),Rt(b,Y=>({...Y,status:"done",events:[...Y.events,{id:N,event:"server.stop",data:{source:"client"},createdAt:new Date().toISOString()}]})),Pr(b,"done");try{const Y=await Io(b);ca(b),Rt(b,ue=>({...ue,status:Y})),Pr(b,Y),Promise.all([wr(b),Fn()]).catch(ue=>{console.warn("Failed to refresh workspace after Stop",ue)})}catch(Y){bo(b),Rt(b,Se=>({...Se,status:T==="initializing"?"initializing":"running",events:[...Se.events.filter($e=>$e.id!==N),{id:Se.events.length+1,event:"client.error",data:qs(Y),createdAt:new Date().toISOString()}]})),Pr(b,T==="initializing"?"initializing":"running");const ue=dt(Y);Ze("error","Stop failed",ue.detail??ue.message);try{await Fn()}catch(Se){console.warn("Failed to refresh workspace after Stop failed",Se)}}}async function Io(b){const T=Ne(`conversations/${b}/turns/interrupt`),N=await fetch(T,{method:"POST"});if(!N.ok)throw await Kn(N,{method:"POST",url:T});return DE(await N.json().catch(()=>null))}async function Sl(){var Y;const b=Mn.current,T=ua;if(!T){Ze("error","No workspace selected");return}if(!window.confirm(`Force stop and repair "${T.title}"?
357
-
358
- This cancels every current or queued turn, kills its runtime, and repairs scheduler state. Future scheduled wakeups are preserved.`))return;const $=T.id;tr(!0),Iu($),(Y=ar.current.get($))==null||Y.abort(),vr.current.delete($),Ga.current.delete($),Cr($,!1);try{const ue=await Io($);ca($),Rt($,Se=>({...Se,status:ue})),Pr($,ue),Aa.current===$&&await wr($),await Fn(),Ze("success","Workspace stopped and repaired")}catch(ue){bo($);const Se=dt(ue);Ze("error","Force stop failed",Se.detail??Se.message);try{await Fn()}catch($e){console.warn("Failed to refresh workspace after force Stop failed",$e)}}finally{b===Mn.current&&tr(!1)}}async function Fr(b,T){if(!x||!b.approvalTurnId||b.approvalRequestId===void 0)return;const N=x;try{const $=Ne(`conversations/${N}/turns/${b.approvalTurnId}/approvals/${encodeURIComponent(String(b.approvalRequestId))}`),Y=await fetch($,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({decision:T})});if(!Y.ok)throw await Kn(Y,{method:"POST",url:$});Rt(N,ue=>({...ue,events:[...ue.events,{id:ue.events.length+1,event:"server.approval.decision",data:{requestId:b.approvalRequestId,decision:T,source:"client"},createdAt:new Date().toISOString()}]}))}catch($){Rt(N,ue=>({...ue,events:[...ue.events,{id:ue.events.length+1,event:"client.error",data:qs($),createdAt:new Date().toISOString()}]}));const Y=dt($);Ze("error","Failed to respond to approval",Y.detail??Y.message)}}async function jl(b,T,N){const $=x,Y=b.workspaceChangeProposalId??b.responsibilityProposalId;if(!$||!Y)return!1;try{const ue=Ne(`conversations/${$}/workspace-change-proposals/${encodeURIComponent(Y)}`),Se=await fetch(ue,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({decision:T,payload:T==="accept"?N??b.workspaceChangePayload:void 0})});if(!Se.ok)throw await Kn(Se,{method:"POST",url:ue});const $e=await Se.json(),De=LE(T,$e.decision),st=De==="accept"?$e.payload??N??b.workspaceChangePayload:null;return Rn($e.conversation),Rt($,tt=>({...tt,events:[...tt.events,{id:`${b.id}:${De}`,event:"server.workspace_change.decision",data:{proposalId:Y,changeType:b.workspaceChangeType??"responsibility",decision:De,payload:st},createdAt:new Date().toISOString()}]})),Ze("success",De==="accept"?"Workspace change applied":"Workspace change declined"),!0}catch(ue){console.error(ue);const Se=dt(ue);return Ze("error","Failed to respond to workspace change proposal",Se.detail??Se.message),!1}}async function Mi(b,T,N){const $=x;if(!(!$||!b.knowledgeProposalId))try{let Y;if(T==="accept")try{Y=JSON.parse(N??b.body)}catch{Ze("error","Knowledge proposal JSON is invalid");return}const ue=Ne(`conversations/${$}/knowledge-proposals/${encodeURIComponent(b.knowledgeProposalId)}`),Se=await fetch(ue,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({decision:T,knowledge:Y})});if(!Se.ok)throw await Kn(Se,{method:"POST",url:ue});const $e=await Se.json();xn([...$e.items??[]].sort(Dv)),Rt($,De=>({...De,events:[...De.events,{id:`${b.id}:${T}`,event:"server.knowledge.decision",data:{proposalId:b.knowledgeProposalId,decision:T,knowledge:T==="accept"?$e.item:null},createdAt:new Date().toISOString()}]})),Ze("success",T==="accept"?"Workspace knowledge saved":"Knowledge proposal declined")}catch(Y){console.error(Y);const ue=dt(Y);Ze("error","Failed to respond to knowledge proposal",ue.detail??ue.message)}}function Kf(b){Pa.current!==b.id&&(wo(b.id,b.status),M0(b),F(T=>{const N=T[b.id],$=b.events.map(Y=>({id:Y.id,turnId:Y.turnId,seq:Y.seq,event:Y.event,data:Y.data,createdAt:Y.createdAt}));return{...T,[b.id]:{messages:b.messages,events:qd($,(N==null?void 0:N.events)??[]),timelineNodes:Xd(b.timelineNodes??[],(N==null?void 0:N.timelineNodes)??[]),turns:Kd(b.turns??[],(N==null?void 0:N.turns)??[]),contextVersions:b.contextVersions??[],status:b.status,history:Ou(b),loadingOlder:!1,fullEventTurnIds:(N==null?void 0:N.fullEventTurnIds)??new Set,loadingEventTurnIds:(N==null?void 0:N.loadingEventTurnIds)??new Set}}}))}function N0(b){const T=Ou(b);Rt(b.id,N=>{var $,Y,ue;return{...N,messages:Wd(b.messages,N.messages),timelineNodes:Xd(b.timelineNodes??[],N.timelineNodes),turns:Kd(b.turns??[],N.turns),events:qd(b.events.map(Se=>({id:Se.id,turnId:Se.turnId,seq:Se.seq,event:Se.event,data:Se.data,createdAt:Se.createdAt})),N.events),contextVersions:((($=b.contextVersions)==null?void 0:$.length)??0)>0?b.contextVersions??[]:N.contextVersions,history:{...T,loadedMessageCount:T.loadedMessageCount+(((Y=N.history)==null?void 0:Y.loadedMessageCount)??N.messages.length),loadedEventCount:T.loadedEventCount+(((ue=N.history)==null?void 0:ue.loadedEventCount)??N.events.length)},loadingOlder:!1}})}function ei(b){if(Pa.current===b.id)return;const T=Ou(b),N=b.events.map($=>({id:$.id,turnId:$.turnId,seq:$.seq,event:$.event,data:$.data,createdAt:$.createdAt}));Rt(b.id,$=>{var Y,ue,Se;return{...$,messages:Wd($.messages,b.messages),timelineNodes:Xd($.timelineNodes,b.timelineNodes??[]),turns:Kd($.turns,b.turns??[]),events:qd(N,$.events),contextVersions:(((Y=b.contextVersions)==null?void 0:Y.length)??0)>0?b.contextVersions??[]:$.contextVersions,status:b.status,history:{...$.history??T,messageTotal:T.messageTotal,eventTotal:T.eventTotal,loadedMessageCount:Math.max(((ue=$.history)==null?void 0:ue.loadedMessageCount)??$.messages.length,$.messages.length,b.messages.length),loadedEventCount:Math.max(((Se=$.history)==null?void 0:Se.loadedEventCount)??$.events.length,$.events.length,b.events.length)},loadingOlder:!1}})}function Rt(b,T){F(N=>{if(Pa.current===b)return N;const $=N[b]??{messages:[],events:[],timelineNodes:[],turns:[],contextVersions:[],status:"idle",history:null,loadingOlder:!1,fullEventTurnIds:new Set,loadingEventTurnIds:new Set};return{...N,[b]:T($)}})}function Pr(b,T){g(N=>N.map($=>$.id===b?{...$,status:T,updatedAt:new Date().toISOString()}:$))}function M0(b){Rn(b)}function Rn(b){g(T=>Vl(l,T.map(N=>N.id===b.id?{...N,...b}:N)))}async function ec(b,T){const N=T.filter($=>{const Y=J[b];return Y&&!Y.fullEventTurnIds.has($)&&!Y.loadingEventTurnIds.has($)});if(N.length!==0){Rt(b,$=>{const Y=new Set($.loadingEventTurnIds);for(const ue of N)Y.add(ue);return{...$,loadingEventTurnIds:Y}});try{const $=await Promise.all(N.map(Y=>Px(b,Y)));Rt(b,Y=>{const ue=new Set(Y.fullEventTurnIds),Se=new Set(Y.loadingEventTurnIds),$e=$.flatMap((De,st)=>{const tt=N[st];return ue.add(tt),Se.delete(tt),De.map(Lt=>({id:Lt.id,turnId:Lt.turnId,seq:Lt.seq,event:Lt.event,data:Lt.data,createdAt:Lt.createdAt}))});return{...Y,events:qd(Y.events,$e),fullEventTurnIds:ue,loadingEventTurnIds:Se}})}catch($){console.error($),Rt(b,Y=>{const ue=new Set(Y.loadingEventTurnIds);for(const Se of N)ue.delete(Se);return{...Y,loadingEventTurnIds:ue}}),Ze("error","Failed to load process details")}}}function Cr(b,T){const N=new Set(gs.current);T?N.add(b):N.delete(b),gs.current=N,Uf($=>{const Y=new Set($);return T?Y.add(b):Y.delete(b),Y})}function Ms(b){io(T=>{const N=new Set(T);return N.has(b)?N.delete(b):N.add(b),op(l,N),N})}function D0(b){var T;return zE(b.status,(T=b.nextWakeup)==null?void 0:T.status,Ca.has(b.id))}function _o(b){var $;const T=($=fs.current)==null?void 0:$.getBoundingClientRect(),N=T?b-T.left:b;return W1(N)}function Di(b){b.preventDefault(),b.currentTarget.setPointerCapture(b.pointerId),Ur(_o(b.clientX))}function zi(b){b.currentTarget.hasPointerCapture(b.pointerId)&&(b.preventDefault(),Ur(_o(b.clientX)))}function z0(b){b.currentTarget.hasPointerCapture(b.pointerId)&&b.currentTarget.releasePointerCapture(b.pointerId);const T=_o(b.clientX);Ur(T),rN(l,T)}return o.jsx(o.Fragment,{children:o.jsxs("main",{className:`shell${H?" mobile-sidebar-open":""}`,ref:fs,style:{"--sidebar-width":`${us}px`},children:[o.jsxs("aside",{className:"sidebar",inert:D,children:[t.role==="admin"?o.jsx(DN,{onOpen:()=>{Lu(),Jn(!0)}}):null,o.jsxs("div",{className:"sidebar-header",children:[o.jsxs("div",{children:[o.jsxs("p",{className:"eyebrow brand-line",children:[o.jsx("span",{children:"Seele"}),Ae?t.role==="admin"?o.jsxs("a",{"aria-label":`Open Seele Host control for Work v${Ae}`,className:"work-version-link",href:`${Y1()}admin/host`,title:"Open Seele Host control: versions, restart, and logs",children:["v",Ae,o.jsx("span",{"aria-hidden":"true",children:"↗"})]}):o.jsxs("span",{children:["v",Ae]}):null,o.jsx("span",{"aria-label":Lv(z),className:`backend-status ${z}`,"data-label":Lv(z)})]}),o.jsxs("div",{className:"sidebar-title-row",children:[o.jsx("h2",{children:"Workspaces"}),e?o.jsx("button",{"aria-label":`Sign out ${t.username}`,className:"sign-out-button",onClick:a,title:`Sign out ${t.username}`,type:"button",children:"Sign out"}):null]})]}),o.jsxs("div",{className:"sidebar-header-actions",children:[o.jsx("button",{"aria-label":"Close workspace list",className:"mobile-sidebar-dismiss",onClick:()=>X(!1),title:"Close workspace list",type:"button",children:"×"}),o.jsx("button",{"aria-label":"New workspace",className:"new-workspace-button",type:"button",onClick:sr,children:"+"})]})]}),o.jsx("nav",{className:"session-list","aria-label":"Workspaces",children:Ea.map(b=>o.jsxs("section",{className:["workspace-group",ss===b.id?"dragging":"",p0===b.id?"drop-after":"",(bn==null?void 0:bn.kind)==="group"&&bn.id===b.id?"drop-into":""].filter(Boolean).join(" "),"data-group-id":b.id,children:[o.jsxs("div",{className:"workspace-group-header",children:[o.jsxs("button",{"aria-expanded":!oa.has(b.id),className:(nn==null?void 0:nn.kind)==="group"&&nn.id===b.id?"workspace-group-toggle keyboard-focused":"workspace-group-toggle","data-keyboard-focus-key":$s({kind:"group",id:b.id}),onClick:T=>{if(Mu.current){T.preventDefault(),Mu.current=!1;return}Ms(b.id)},onDoubleClick:T=>{T.preventDefault(),T.stopPropagation(),lr(b)},onPointerCancel:Ei,onPointerDown:T=>A0(T,b.id),onPointerMove:T=>E0(T,b.id),onPointerUp:T=>kl(T,b.id),type:"button",children:[o.jsx("span",{className:oa.has(b.id)?"workspace-group-caret collapsed":"workspace-group-caret","aria-hidden":"true",children:"▾"}),o.jsx("span",{onDoubleClick:T=>{T.preventDefault(),T.stopPropagation(),lr(b)},title:"Double-click to rename",children:b.title})]}),b.id!==ev?o.jsx("button",{"aria-label":`Delete group ${b.title}`,className:"workspace-group-delete",onClick:T=>{T.stopPropagation(),da(b)},title:"Delete group",type:"button",children:"×"}):null]}),oa.has(b.id)?null:o.jsx("div",{className:"workspace-group-items",children:b.conversations.map(T=>{const N=D0(T);return o.jsxs("div",{className:["session-item",(nn==null?void 0:nn.kind)==="workspace"&&nn.id===T.id?"keyboard-focused":"",T.id===x?"active":"",T.id===ul?"dragging":"",(bn==null?void 0:bn.kind)==="workspace"&&bn.id===T.id?`drop-${bn.position}`:""].filter(Boolean).join(" "),"data-keyboard-focus-key":$s({kind:"workspace",id:T.id}),"data-workspace-id":T.id,onClick:$=>{if(Nu.current){$.preventDefault(),Nu.current=!1;return}wl(T.id),X(!1)},onDoubleClick:$=>{Pu($.target)||($.preventDefault(),fa(T))},onKeyDown:$=>{Ro($.target)||$.key==="Enter"&&(wl(T.id),X(!1))},onPointerCancel:Qa,onPointerDown:$=>Za($,T.id),onPointerMove:$=>Sr($,T.id),onPointerUp:$=>Gu($,T.id),role:"button",tabIndex:0,children:[o.jsxs("span",{className:"session-heading",children:[o.jsx("span",{"aria-label":nf(N,T.nextWakeup,rr),className:`session-status ${N}`,title:nf(N,T.nextWakeup,rr)}),o.jsx("span",{className:"session-title",title:"Double-click to rename",children:T.title}),N==="waiting"&&T.nextWakeup?o.jsx("span",{className:"session-countdown",title:nf(N,T.nextWakeup,rr),children:yf(T.nextWakeup,rr)}):null,T.unreadTurnCount>0?o.jsx("span",{"aria-label":`${T.unreadTurnCount} unread turns`,className:"session-unread",title:`${T.unreadTurnCount} unread turns`,children:T.unreadTurnCount>99?"99+":T.unreadTurnCount}):null,N!=="running"?o.jsx("button",{"aria-label":`Delete ${T.title}`,className:"session-delete",onClick:$=>{$.stopPropagation(),ie(T)},title:"Delete workspace and local data",type:"button",children:"×"}):null]}),o.jsxs("span",{className:"session-workspace",title:T.workspacePath,children:["workspaces/",lu(T.id)]})]},T.id)})})]},b.id))}),o.jsx("footer",{className:"sidebar-footer",children:o.jsxs("div",{className:"sidebar-actions","aria-label":"Workspace actions",children:[o.jsx("button",{"aria-label":"Settings",className:"sidebar-action-button",onClick:Lu,type:"button",children:o.jsx(wv,{})}),o.jsx("button",{"aria-label":"New group",className:"sidebar-action-button",onClick:Cs,type:"button",children:o.jsx(iD,{})}),o.jsx("button",{"aria-label":"Collaboration topics",className:"sidebar-action-button",onClick:()=>{ku(!0),X(!1)},type:"button",children:o.jsx(Zd,{})}),o.jsx("button",{"aria-label":"Console",className:"sidebar-action-button",onClick:Ao,type:"button",children:o.jsx(lD,{})}),o.jsx(cM,{usage:v0})]})})]}),o.jsx("button",{"aria-label":"Close workspace list",className:"mobile-sidebar-backdrop",onClick:()=>X(!1),tabIndex:H?0:-1,type:"button"}),o.jsx("div",{"aria-label":"Resize sidebar",className:"sidebar-resizer",onPointerDown:Di,onPointerMove:zi,onPointerUp:z0,role:"separator",tabIndex:0}),Du&&os?o.jsxs("div",{className:"workspace-drag-preview",style:{transform:`translate3d(${os.x+12}px, ${os.y+10}px, 0)`},children:[o.jsx("span",{className:"workspace-drag-title",children:Du.title}),o.jsxs("span",{className:"workspace-drag-path",children:["workspaces/",lu(Du.id)]})]}):null,Te?o.jsx("div",{className:"workspace-editor-overlay",onKeyDown:jr,role:"presentation",children:o.jsxs("form",{className:"workspace-editor",onKeyDown:jr,onSubmit:b=>void Ni(b),children:[o.jsx("label",{className:"workspace-editor-label",htmlFor:"workspace-title",children:"Workspace name"}),o.jsx("input",{autoFocus:!0,id:"workspace-title",onChange:Vu,onKeyDown:jr,value:Te.title}),Te.mode==="create"?o.jsxs(o.Fragment,{children:[o.jsx("label",{className:"workspace-editor-label",htmlFor:"workspace-group",children:"Group"}),o.jsx("select",{id:"workspace-group",onChange:As,onKeyDown:jr,value:Te.groupId??((Ds=y[0])==null?void 0:Ds.id)??"",children:y.map(b=>o.jsx("option",{value:b.id,children:b.title},b.id))})]}):null,o.jsxs("div",{className:"workspace-editor-actions",children:[o.jsx("button",{type:"button",onClick:Yn,children:"Cancel"}),o.jsx("button",{disabled:He,type:"submit",children:He?"Saving...":Te.mode==="create"?"Create":"Save"})]})]})}):null,Pe?o.jsx("div",{className:"workspace-editor-overlay",onKeyDown:$r,role:"presentation",children:o.jsxs("form",{className:"workspace-editor",onKeyDown:$r,onSubmit:b=>void Ja(b),children:[o.jsx("label",{className:"workspace-editor-label",htmlFor:"workspace-group-title",children:"Group name"}),o.jsx("input",{autoFocus:!0,id:"workspace-group-title",onChange:Yu,onKeyDown:$r,value:Pe.title}),o.jsxs("div",{className:"workspace-editor-actions",children:[o.jsx("button",{type:"button",onClick:Ts,children:"Cancel"}),o.jsx("button",{type:"submit",children:Pe.mode==="create"?"Create":"Save"})]})]})}):null,Mt?o.jsx(SN,{startWithAccounts:ra,currentUser:t,conversations:m,editingEnvironmentKey:no,deploymentSettings:pr,environmentDraft:il,globalEnvironment:er,workspaceEnvironment:Ln,memorySettings:u0,memorySettingsDraft:xu,workspaceMemoryDraft:c0,runtimeSettings:Un,runtimeModels:Le,runtimeCodexVersion:be,runtimeCodexReleasedAt:Ge,runtimeCodexUpdating:(nt==null?void 0:nt.status)==="running",runtimeSettingsDraft:Ir,runtimeSettingsScope:Jt,settingsWorkspace:pn,settingsWorkspaceId:en,systemDiagnostics:ge,systemDiagnosticsLoading:oe,workspaceGroups:Ea,workspaceRuntimeSettings:rl,workspaceRuntimeSettingsDraft:vu,managedUsers:pe,onCancelEnvironmentEdit:C0,onClose:()=>qn(!1),onCreateUser:async b=>{const T=await nR(b);Z(N=>[...N,T]),Ze("success","User created")},onDeleteUser:async b=>{await aR(b),Z(T=>T.filter(N=>N.id!==b)),Ze("success","User deleted")},onSaveDeploymentSettings:br,onDeleteEnvironment:b=>void xl(b),onDraftChange:ll,onEditEnvironment:Ma,onRevealEnvironmentValue:b=>void zo(b),onSaveBaseMemoryItems:b=>Ti(b),onSaveResponsibility:async(b,T)=>{try{const N=await $d(b,{responsibility:T});return Rn(N),te("connected"),Ze("success","Workspace responsibility saved"),N.responsibility}catch(N){throw console.error(N),te("error"),Ze("error","Failed to save workspace responsibility"),N}},onSaveWorkspaceMemoryItems:b=>en?j0(en,b):Promise.reject(new Error("No workspace selected")),onRuntimeDraftChange:wa,onCodexAccountSwitched:async()=>{Ze("success","Codex account selection saved"),(await ub()).codexAccountsReady&&await Promise.all([ko(),yl(!0),Co()])},onUpdateCodexCli:()=>{gt(!0),Na(!0)},onRuntimeScopeChange:nl,onSettingsWorkspaceChange:Hr,onSubmitRuntimeSettings:b=>void Eo(b),onWorkspaceRuntimeDraftChange:al,onWorkspaceRuntimeReset:b=>en?void qu(en,b):void 0,revealedEnvironmentKeys:wu,onSubmitEnvironment:b=>void Do(b),onRefreshSystemDiagnostics:()=>void _u(),onUpdateUser:async(b,T)=>{const N=await rR(b,T);Z($=>$.map(Y=>Y.id===N.id?N:Y)),Ze("success","User updated")}}):null,Ct?o.jsx(kN,{currentReleasedAt:Ge,currentVersion:be,job:nt,latest:tl,latestChecking:fi,starting:Ut,onClose:()=>gt(!1),onRefresh:()=>void Na(),onStart:()=>void b0()}):null,Ba&&Be?o.jsx(gN,{conversation:Be,clockNow:rr,knowledgeDraft:_r,workspaceKnowledge:Nn,tokenUsage:hl,onCancelKnowledgeEdit:()=>_a(Dc),onDeleteKnowledge:b=>void ir(Be.id,b),onEditKnowledge:Uu,onKnowledgeDraftChange:_a,onSubmitKnowledge:b=>void Yf(Be.id,b),onClose:()=>mi(!1)}):null,d0?o.jsx(yN,{conversations:m,onClose:()=>ku(!1),workspaceGroups:Ea}):null,Sa?o.jsx(bN,{busy:h0||is,conversation:ua??null,conversationId:Hn,forceStopBusy:is,preview:(Ua==null?void 0:Ua.conversationId)===Hn?Ua:null,previewLoading:gr,result:m0,status:$f,warmup:Su,workspaceGroups:Ea,onClose:()=>tn(!1),onCancelResetPreview:()=>ja(null),onForceStop:()=>void Sl(),onPreviewReset:()=>void vl(),onStartBlankContext:()=>void No(),onResetRuntime:b=>void Bu(b),onSaveResetSelection:Mo,onWorkspaceChange:b=>{qa(b),Ha(null),ja(null)},onWarmupChange:f0}):null,q?o.jsx("div",{className:"dialog-backdrop",role:"presentation",onMouseDown:()=>!K&&L(null),children:o.jsxs("form",{className:"dialog-card clone-dialog",onSubmit:T0,onMouseDown:b=>b.stopPropagation(),children:[o.jsxs("header",{children:[o.jsxs("div",{children:[o.jsx("h2",{children:"Clone workspace"}),o.jsx("p",{children:"复制成功完成的对话历史与可复用配置到独立 workspace。历史将分批整理压缩,优先保留有效决策与未完成事项。"})]}),o.jsx("button",{"aria-label":"Close",className:"icon-button",onClick:()=>L(null),type:"button",children:"×"})]}),o.jsxs("label",{children:[o.jsx("span",{children:"Name"}),o.jsx("input",{autoFocus:!0,value:q.name,onChange:b=>L(T=>T&&{...T,name:b.target.value})})]}),o.jsxs("label",{children:[o.jsx("span",{children:"Group"}),o.jsx("select",{value:q.groupId,onChange:b=>L(T=>T&&{...T,groupId:b.target.value}),children:Ea.map(b=>o.jsx("option",{value:b.id,children:b.title},b.id))})]}),o.jsxs("label",{children:[o.jsxs("span",{children:[o.jsx("input",{type:"checkbox",checked:q.excludeTopicHistory,disabled:K,onChange:b=>L(T=>T&&{...T,excludeTopicHistory:b.target.checked})})," 排除 Topic 相关历史回复"]}),o.jsx("small",{children:"保留用户直接输入;Topic 消息和成员关系原本就不复制。普通对话中转述的 Topic 内容不会自动清除。"})]}),o.jsxs("footer",{children:[o.jsx("button",{className:"secondary",disabled:K,onClick:()=>L(null),type:"button",children:"Cancel"}),o.jsx("button",{disabled:K||!q.name.trim(),type:"submit",children:K?"Cloning...":"Clone"})]})]})}):null,O?o.jsx("div",{className:"dialog-backdrop",role:"presentation",onMouseDown:()=>M(null),children:o.jsxs("section",{"aria-labelledby":"system-event-detail-title","aria-modal":"true",className:"dialog-card system-event-detail-dialog",onMouseDown:b=>b.stopPropagation(),role:"dialog",children:[o.jsxs("header",{children:[o.jsxs("div",{children:[o.jsx("h2",{id:"system-event-detail-title",children:O.title}),o.jsx("p",{children:ut(O.createdAt)})]}),o.jsx("button",{"aria-label":"Close",className:"icon-button",onClick:()=>M(null),type:"button",children:"×"})]}),o.jsx("div",{className:"system-event-detail-content",children:o.jsx(ru,{content:O.fullDetail??O.detail??"No additional details.",conversation:Be,streaming:!1,onPreviewArtifact:Br,onCopyArtifactUrl:Wa,copiedArtifactUrl:la})}),o.jsx("footer",{children:o.jsx("button",{className:"secondary",onClick:()=>M(null),type:"button",children:"Close"})})]})}):null,de?o.jsx("div",{className:"memory-editor-overlay",onClick:()=>{Ee||ie(null)},role:"presentation",children:o.jsxs("section",{"aria-label":"Confirm workspace deletion","aria-modal":"true",className:"memory-delete-dialog workspace-delete-dialog",onClick:b=>b.stopPropagation(),role:"dialog",children:[o.jsxs("header",{children:[o.jsx("strong",{children:"删除 Workspace"}),o.jsx("button",{"aria-label":"Close workspace deletion confirmation",className:"memory-icon-button",disabled:Ee,onClick:()=>ie(null),title:"Close",type:"button",children:"×"})]}),o.jsxs("p",{children:["删除 ",o.jsx("strong",{children:de.title}),"?本地文件和历史数据将永久清理,无法恢复。"]}),o.jsx("code",{children:de.workspacePath}),o.jsxs("div",{className:"memory-delete-actions",children:[o.jsx("button",{className:"memory-dialog-button",disabled:Ee,onClick:()=>ie(null),type:"button",children:"Cancel"}),o.jsx("button",{className:"memory-dialog-button danger",disabled:Ee,onClick:()=>void Xa(de),type:"button",children:Ee?"正在删除…":"删除并清理数据"})]})]})}):null,ls?o.jsxs("div",{className:`app-toast ${ls.tone}`,role:"status",children:[o.jsx("strong",{children:ls.text}),ls.detail?o.jsx("pre",{children:ls.detail}):null]}):null,o.jsx("section",{className:"conversation",hidden:D,style:D?{display:"none"}:void 0,children:!D&&o.jsxs(o.Fragment,{children:[o.jsxs("header",{className:"topbar",children:[o.jsxs("div",{className:"topbar-main",children:[o.jsx("button",{"aria-label":"Show workspaces",className:"mobile-workspace-menu",onClick:()=>X(!0),title:"Workspaces",type:"button",children:o.jsx(aD,{})}),o.jsxs("div",{className:"topbar-heading",children:[o.jsx("div",{className:"topbar-title-row",children:o.jsx("h1",{children:(Be==null?void 0:Be.title)??"New workspace"})}),Be?o.jsxs("div",{className:"topbar-workspace-row",children:[o.jsxs("p",{className:"topbar-workspace",children:["workspaces/",lu(Be.id)]}),o.jsx(vN,{workspace:Be,refreshKey:h0},Be.id)]}):null]})]}),o.jsx("div",{className:"topbar-actions",children:Be?o.jsxs(o.Fragment,{children:[Be.threadUpgradeRequired?o.jsx("button",{"aria-label":"Reset required for latest thread tools",className:"topbar-icon-button thread-upgrade-button",onClick:Ao,title:`当前 Thread 工具集已过期(${Be.threadCapabilityVersion} / ${Be.requiredThreadCapabilityVersion}),点击进行 Reset`,type:"button",children:o.jsx(eg,{})}):null,o.jsx("button",{"aria-label":"Clone workspace",className:"topbar-icon-button",onClick:$u,title:"Clone workspace",type:"button",children:o.jsx(Fx,{})}),o.jsxs("button",{className:`context-button has-usage ${rg(ml??0)}`,onClick:()=>mi(!0),style:{"--context-usage":`${Bf(ml??0)}%`},title:hl&&ml!==null?`Context ${Math.round(ml)}% · ${Rr(hl.totalTokens)} / ${ef(hl.modelContextWindow)}`:"Context 0% · no usage recorded yet",type:"button",children:[o.jsx("span",{children:"Context"}),o.jsxs("strong",{children:[Math.round(ml??0),"%"]})]}),o.jsx("button",{"aria-label":"Workspace settings",className:"topbar-icon-button",onClick:S0,title:"Workspace settings",type:"button",children:o.jsx(wv,{})})]}):null})]}),(Be==null?void 0:Be.status)==="initialization_failed"&&Be.cloneLineage?o.jsxs("div",{className:"clone-initialization-error",children:[o.jsxs("div",{children:[o.jsx("strong",{children:"克隆初始化失败"}),o.jsx("span",{children:Be.cloneLineage.initializationError??Be.statusError??"初始化未完成,可在当前工作空间重试。"})]}),o.jsx("button",{onClick:()=>void kr(),type:"button",children:"重试初始化"})]}):null,(Be==null?void 0:Be.status)==="initializing"&&Be.cloneLineage?o.jsxs("div",{className:"clone-initialization-status",role:"status",children:[o.jsx("strong",{children:Be.cloneLineage.initializationStatus==="copying"?"正在复制历史记录":Be.cloneLineage.initializationStatus==="injecting"?"正在注入历史并压缩上下文":"正在完成线程初始化"}),o.jsxs("span",{children:["快照截止 ",ut(Be.cloneLineage.snapshotAt)," · 已复制 ",Be.cloneLineage.importedMessageCount," 条记录。可离开页面,初始化会继续。"]})]}):null,o.jsx("div",{className:"stream",onScroll:()=>void Pf(),onWheel:ks,onTouchStart:ks,onPointerDown:ks,onKeyDown:ks,ref:Fa,style:{scrollPaddingBottom:cs},children:o.jsxs("div",{className:"stream-inner",style:{paddingBottom:cs},children:[ki.length===0?o.jsx("div",{className:"empty-state",children:o.jsx("h2",{children:"Start a workspace"})}):null,o.jsxs("section",{className:"message-log","aria-label":"Conversation messages",children:[Be!=null&&Be.cloneLineage&&Si.size>0?o.jsxs("div",{className:"clone-history-boundary clone-history-source",children:[o.jsxs("strong",{children:["Inherited from ",Be.cloneLineage.sourceWorkspaceTitle]}),o.jsxs("span",{children:["through ",ut(Be.cloneLineage.snapshotAt)," · ",Be.cloneLineage.importedMessageCount," messages"]})]}):null,(Tl=Tt==null?void 0:Tt.history)!=null&&Tl.hasMoreBefore?o.jsx("button",{className:"history-loader",type:"button",disabled:Tt.loadingOlder,"aria-busy":Tt.loadingOlder,onClick:()=>x&&void Ai(x),children:Tt.loadingOlder?"正在加载更早消息…":"加载更早消息"}):null,yo.map((b,T)=>{var Se,$e,De,st;const N=((Se=b.user)==null?void 0:Se.type)==="system",$=b.turnIds.some(tt=>Si.has(tt)),Y=yo[T+1],ue=$&&(!Y||!Y.turnIds.some(tt=>Si.has(tt)));return o.jsxs(A.Fragment,{children:[o.jsxs("section",{className:`turn-group${$?" clone-history-turn":""}`,"data-turn-id":b.id,children:[b.user?o.jsxs("div",{className:`turn-panel ${N?"system-turn":"user-turn"}`,children:[Fs(b.user,Be,Br,Wa,la,Fr,jl,Mi,M),o.jsx(Bc,{copied:ol===`${N?"system":"user"}-${b.id}-bottom`,content:qc(b.user),id:`${N?"system":"user"}-${b.id}-bottom`,timestamp:b.user.createdAt,variant:"outside",onCopy:Ss})]}):null,b.followupUsers.length>0?o.jsx("div",{className:"turn-followup-users","aria-label":"Additional turn input",children:b.followupUsers.map(tt=>o.jsxs("div",{className:"turn-panel user-turn followup-user-turn",children:[o.jsx("span",{className:"followup-user-label",children:"Added while running"}),Fs(tt,Be,Br,Wa,la,Fr,jl,Mi,M),o.jsx(Bc,{copied:ol===`user-${tt.id}-bottom`,content:qc(tt),id:`user-${tt.id}-bottom`,timestamp:tt.createdAt,variant:"outside",onCopy:Ss})]},tt.id))}):null,!!(($e=b.cotaskNotices)!=null&&$e.length)&&o.jsxs("details",{className:"cotask-turn-notices",children:[o.jsxs("summary",{children:["CoTask updates · ",b.cotaskNotices.length]}),b.cotaskNotices.map(tt=>o.jsx("div",{children:Fs(tt,Be,Br,Wa,la,Fr,jl,Mi,M)},tt.id))]}),(De=b.acceptedSystemInputs)==null?void 0:De.map(tt=>o.jsxs("div",{className:"turn-panel system-turn",children:[Fs(tt,Be,Br,Wa,la,Fr,jl,Mi,M),o.jsx(Bc,{copied:ol===`system-${tt.id}-bottom`,content:qc(tt),id:`system-${tt.id}-bottom`,timestamp:tt.createdAt,variant:"outside",onCopy:Ss})]},tt.id)),b.agentItems.length>0||b.stopped?o.jsx(Ax,{group:b,conversation:Be,allowProcessView:!$,copiedFooter:ol===`agent-${b.id}-bottom`,copiedArtifactUrl:la,running:!$&&Pc(b.turnIds,xs),onCopyArtifactUrl:Wa,onCopyBubble:Ss,onPreviewArtifact:Br,onLoadProcessDetails:tt=>Be&&!$?ec(Be.id,tt):void 0,onRespondApproval:Fr,onRespondWorkspaceChangeProposal:jl,onRespondKnowledgeProposal:Mi,onOpenSystemEvent:M}):null,(st=b.trailingSystemItems)==null?void 0:st.map(tt=>o.jsxs("div",{className:"turn-panel system-turn",children:[Fs(tt,Be,Br,Wa,la,Fr,jl,Mi,M),o.jsx(Bc,{copied:ol===`system-${tt.id}-bottom`,content:qc(tt),id:`system-${tt.id}-bottom`,timestamp:tt.createdAt,variant:"outside",onCopy:Ss})]},tt.id))]}),ue?o.jsx("div",{className:"clone-history-boundary clone-history-end",children:"Clone starts here"}):null]},b.id)})]})]})}),o.jsxs("form",{className:"composer",onSubmit:Wu,ref:Tu,children:[ji?o.jsxs("div",{className:`global-activity ${ji.tone??"running"}`,children:[ws?o.jsx("button",{"aria-label":"Stop current workspace activity",className:"turn-stop activity-stop",onClick:()=>void Ns(),title:"Stop current workspace activity",type:"button",children:o.jsx(JN,{})}):o.jsx("span",{className:"activity-wait-dot","aria-hidden":"true"}),o.jsxs("div",{className:"global-activity-text",children:[o.jsx("span",{children:ji.title}),ji.detail?o.jsx("small",{children:ji.detail}):null]}),ws?o.jsx("span",{className:"activity-spinner","aria-hidden":"true"}):null]}):null,o.jsx(Uv,{value:u,onChange:Ku,textareaRef:$n,sendDisabled:bs.sendDisabled,disabled:bs.textareaDisabled,allowNewTurn:!0,onShortcut:b=>void Es({forceNewTurn:b})})]}),Lr?o.jsx("div",{className:"artifact-lightbox",onClick:()=>Br(null),role:"presentation",children:o.jsxs("figure",{className:"artifact-lightbox-card",onClick:b=>b.stopPropagation(),children:[o.jsx("button",{"aria-label":"Close preview",className:"artifact-lightbox-close",onClick:()=>Br(null),type:"button",children:"×"}),o.jsx("img",{alt:Lr.name,src:Lr.url}),o.jsxs("figcaption",{children:[o.jsx("span",{children:Lr.name}),o.jsxs("div",{className:"artifact-lightbox-actions",children:[o.jsx("a",{href:Lr.url,rel:"noreferrer",target:"_blank",children:"Open in new tab"}),o.jsx("button",{onClick:()=>void Wa(Lr),type:"button",children:la===Lr.url?"Copied":"Copy URL"})]})]})]})}):null]})}),x&&o.jsx(QA,{ownerId:x,ownerName:(Be==null?void 0:Be.title)??"Workspace",request:Yd,onExpanded:Au,renderMarkdown:(b,T)=>{var N;return Jl(b,T?{id:T,workspacePath:((N=m.find($=>$.id===T))==null?void 0:N.workspacePath)??""}:void 0)},renderMember:b=>o.jsx(pN,{workspaceId:b},b)},x)]})})}async function Yd(e,t,n){const a=Ne(e),l=await fetch(a,{method:n??(t===void 0?"GET":"POST"),headers:t===void 0?void 0:{"Content-Type":"application/json"},body:t===void 0?void 0:JSON.stringify(t)});return await Ve(l,{url:a}),l.json()}function pN({workspaceId:e}){var rt;const[t,n]=A.useState(null),[a,l]=A.useState(""),[u,c]=A.useState(""),f=A.useRef(!1),h=A.useRef(0),[m,g]=A.useState({executionId:null}),y=A.useRef(null),k=A.useRef(!0),x=A.useRef(null),[C,D]=A.useState(null),[R,O]=A.useState(""),[M,q]=A.useState(!1),[L,K]=A.useState(!1),[P,H]=A.useState(null),[X,J]=A.useState(null),F=A.useRef(!1),he=A.useRef(new Map),me=`conversations/${encodeURIComponent(e)}`;function Ae(de,ie=!1){n(Ee=>{const Oe=new Map;for(const Pe of[...(Ee==null?void 0:Ee.events)??[],...he.current.values(),...de.events])Oe.set(Pe.id,Pe);return Ee?{...de,messages:Wd(ie?Ee.messages:de.messages,ie?de.messages:Ee.messages),turns:Kd(ie?de.turns:Ee.turns,ie?Ee.turns:de.turns),timelineNodes:Xd(ie?de.timelineNodes??[]:Ee.timelineNodes??[],ie?Ee.timelineNodes??[]:de.timelineNodes??[]),events:[...Oe.values()],history:ie||!F.current?de.history:Ee.history}:{...de,events:[...Oe.values()]}})}async function je(){return Promise.all([Wc(e),Yd(`${me}/cotask-guidance`)])}async function pe(){const[de,ie]=await je();Ae(de),g(ie)}A.useEffect(()=>{const de=y.current;de&&(x.current?(de.scrollTop=x.current.top+de.scrollHeight-x.current.height,x.current=null):k.current&&(de.scrollTop=de.scrollHeight))},[t]),A.useEffect(()=>{const de=y.current;if(!de||typeof ResizeObserver>"u")return;const ie=new ResizeObserver(()=>{k.current&&(de.scrollTop=de.scrollHeight)});return ie.observe(de),()=>ie.disconnect()},[!!t]),A.useEffect(()=>{let de=!0,ie=!1;const Ee=async()=>{if(!ie){ie=!0;try{const[Pe,Xe]=await je();de&&(Ae(Pe),g(Xe),c(""))}catch(Pe){de&&c(String(Pe))}finally{ie=!1}}};Ee();const Oe=window.setInterval(()=>void Ee(),2e3);return()=>{de=!1,window.clearInterval(Oe)}},[e]);async function Z(de,ie={}){q(!0),l("");try{return await Yd(`${me}/${de}`,ie),await pe(),!0}catch(Ee){return l(String(Ee)),!1}finally{q(!1)}}const ge=(de,ie)=>{de.approvalTurnId&&de.approvalRequestId!==void 0&&Z(`turns/${de.approvalTurnId}/approvals/${encodeURIComponent(String(de.approvalRequestId))}`,{decision:ie})},ye=async(de,ie,Ee)=>{const Oe=de.workspaceChangeProposalId??de.responsibilityProposalId;return Oe?Z(`workspace-change-proposals/${encodeURIComponent(Oe)}`,{decision:ie,payload:ie==="accept"?Ee??de.workspaceChangePayload:void 0}):!1},oe=async(de,ie,Ee)=>{if(de.knowledgeProposalId)try{await Z(`knowledge-proposals/${encodeURIComponent(de.knowledgeProposalId)}`,{decision:ie,knowledge:ie==="accept"?JSON.parse(Ee??de.body):void 0})}catch(Oe){l(String(Oe))}};async function U(de){try{const ie=await Promise.all(de.map(Ee=>Px(e,Ee)));for(const Ee of ie.flat())he.current.set(Ee.id,Ee);await pe()}catch(ie){l(String(ie))}}async function B(){const de=t==null?void 0:t.history;if(!de||L)return;const ie=de.oldestTimelineAt&&de.oldestTimelineSequence!==null?`${de.oldestTimelineAt}|${de.oldestTimelineSequence}`:de.oldestMessageCreatedAt;if(ie){K(!0);try{const Ee=await Wc(e,{before:ie});F.current=!0,y.current&&(x.current={height:y.current.scrollHeight,top:y.current.scrollTop}),Ae(Ee,!0)}catch(Ee){l(String(Ee))}finally{K(!1)}}}const ee=t==null?void 0:t.turns.find(de=>["running","queued","waiting_input","waiting_approval"].includes(de.status)),z=!!m.executionId;async function te(de){if(de==null||de.preventDefault(),!z||!R.trim()||f.current||M)return;const ie=R.trim(),Ee=h.current,Oe=m.executionId;f.current=!0,q(!0),l("");try{await Yd(`${me}/cotask-guidance`,{executionId:Oe,message:ie}),k.current=!0,h.current===Ee&&O(""),pe().catch(Pe=>c(String(Pe)))}catch(Pe){l(String(Pe))}finally{f.current=!1,q(!1)}}const Te=t?Nx(t.messages,t.events,t.turns,t.timelineNodes??[],(ee==null?void 0:ee.id)??null,new Map):[],Re=de=>{navigator.clipboard.writeText(de.url).then(()=>D(de.url)).catch(ie=>l(String(ie)))},He=de=>Fs(de,t??void 0,H,Re,C,ge,ye,oe,J);return o.jsxs("div",{className:"cotask-member-content",children:[(a||u)&&o.jsx("p",{role:"alert",className:"cotask-error",children:a||u}),t?o.jsxs(o.Fragment,{children:[o.jsxs("header",{className:"cotask-member-toolbar",children:[o.jsxs("span",{children:["Member status: ",t.status]}),(ee||t.status==="running")&&o.jsx("button",{disabled:M,onClick:()=>void Z("turns/interrupt"),children:"Stop"})]}),o.jsxs("div",{className:"cotask-member-timeline",ref:y,onScroll:de=>{const ie=de.currentTarget;k.current=ie.scrollHeight-ie.scrollTop-ie.clientHeight<48},children:[((rt=t.history)==null?void 0:rt.hasMoreBefore)&&o.jsx("button",{disabled:L,onClick:()=>void B(),children:L?"Loading…":"Load earlier history"}),Te.map(de=>{var ie,Ee,Oe;return o.jsxs("section",{className:"turn-group",children:[de.user&&He(de.user),de.followupUsers.map(Pe=>o.jsx(A.Fragment,{children:He(Pe)},Pe.id)),!!((ie=de.cotaskNotices)!=null&&ie.length)&&o.jsxs("details",{className:"cotask-turn-notices",children:[o.jsxs("summary",{children:["CoTask updates · ",de.cotaskNotices.length]}),de.cotaskNotices.map(Pe=>o.jsx(A.Fragment,{children:He(Pe)},Pe.id))]}),(Ee=de.acceptedSystemInputs)==null?void 0:Ee.map(Pe=>o.jsx(A.Fragment,{children:He(Pe)},Pe.id)),o.jsx(Ax,{group:de,conversation:t,copiedFooter:C===de.id,copiedArtifactUrl:C,running:!!(ee&&de.turnIds.includes(ee.id)),onCopyArtifactUrl:Re,onCopyBubble:(Pe,Xe)=>{navigator.clipboard.writeText(Xe).then(()=>D(Pe)).catch(Mt=>l(String(Mt)))},onLoadProcessDetails:U,onPreviewArtifact:H,onRespondApproval:ge,onRespondWorkspaceChangeProposal:ye,onRespondKnowledgeProposal:oe,onOpenSystemEvent:J}),(Oe=de.trailingSystemItems)==null?void 0:Oe.map(Pe=>o.jsx(A.Fragment,{children:He(Pe)},Pe.id))]},de.id)}),!Te.length&&o.jsx("p",{children:"Member created. Waiting for task activity."})]}),o.jsxs("form",{className:"cotask-member-reply",onSubmit:de=>void te(de),children:[o.jsx(Uv,{value:R,onChange:de=>{h.current++,O(de)},disabled:!z,sendDisabled:M||!z||!R.trim(),label:"给角色补充引导",sendLabel:"发送",onShortcut:()=>void te(),placeholder:z?"补充引导 · Cmd/Ctrl + Enter":"节点执行期间可补充引导"}),o.jsx("small",{className:"cotask-guidance-hint",children:z?ee?"补充当前节点的过程引导":"节点等待中,恢复执行时接收引导":"当前没有正在执行的任务,暂不可发送。"})]})]}):o.jsx("p",{children:"Loading member activity…"}),P&&o.jsxs("div",{className:"cotask-detail-overlay",role:"dialog","aria-label":"Artifact preview",onKeyDown:de=>{de.key==="Escape"&&(de.stopPropagation(),H(null))},children:[o.jsx("button",{onClick:()=>H(null),children:"Close preview"}),o.jsxs("a",{href:P.url,target:"_blank",rel:"noreferrer",children:["Open in new tab: ",P.name]}),o.jsx("iframe",{title:P.name,src:P.url,sandbox:"allow-scripts",referrerPolicy:"no-referrer"})]}),X&&o.jsxs("div",{className:"cotask-detail-overlay",role:"dialog","aria-label":"Execution event",onKeyDown:de=>{de.key==="Escape"&&(de.stopPropagation(),J(null))},children:[o.jsx("button",{onClick:()=>J(null),children:"Close details"}),o.jsx("h3",{children:X.title}),o.jsx(ru,{content:X.fullDetail??X.detail??"No further details",conversation:t??void 0,onPreviewArtifact:H,onCopyArtifactUrl:Re,copiedArtifactUrl:C})]})]})}function gN({conversation:e,clockNow:t,knowledgeDraft:n,workspaceKnowledge:a,tokenUsage:l,onCancelKnowledgeEdit:u,onDeleteKnowledge:c,onEditKnowledge:f,onKnowledgeDraftChange:h,onSubmitKnowledge:m,onClose:g}){const[y,k]=A.useState("overview"),[x,C]=A.useState(!1),[D,R]=A.useState(!1),[O,M]=A.useState(null),[q,L]=A.useState(null),[K,P]=A.useState(!1),[H,X]=A.useState(null),[J,F]=A.useState(null),[he,me]=A.useState(!1),[Ae,je]=A.useState(null),[pe,Z]=A.useState(null),ge=rb(l),ye=o1(e,e.status),oe=O?Iz(O):null;A.useEffect(()=>{C(!1),M(null),L(null),X(null),F(null),je(null),Z(null)},[e.id]),A.useEffect(()=>{y==="additionalContext"&&!H&&B()},[y,H]),A.useEffect(()=>{y==="compactions"&&!Ae&&ee()},[y,Ae]);const U=()=>{C(!0),R(!0),L(null),VD(e.id).then(z=>M(z)).catch(z=>{const te=dt(z);L(te.detail?`${te.message}
359
- ${te.detail}`:te.message)}).finally(()=>R(!1))},B=()=>{P(!0),F(null),WD(e.id).then(z=>X(z)).catch(z=>{const te=dt(z);F(te.detail?`${te.message}
360
- ${te.detail}`:te.message)}).finally(()=>P(!1))},ee=()=>{me(!0),Z(null),KD(e.id).then(z=>je(z)).catch(z=>{const te=dt(z);Z(te.detail?`${te.message}
361
- ${te.detail}`:te.message)}).finally(()=>me(!1))};return o.jsx("div",{className:"context-panel-overlay workspace-context-overlay",onClick:g,role:"presentation",children:o.jsxs("section",{"aria-label":"Workspace context",className:"context-panel workspace-context-panel",onClick:z=>z.stopPropagation(),children:[o.jsxs("header",{className:"context-panel-header workspace-context-header",children:[o.jsxs("div",{children:[o.jsx("h2",{children:"Workspace Context"}),o.jsx("p",{children:"Long-lived context assets and observable state for this workspace."})]}),o.jsx("button",{"aria-label":"Close context panel",onClick:g,type:"button",children:"×"})]}),o.jsxs("div",{className:"workspace-context-body",children:[o.jsxs("nav",{className:"settings-nav workspace-context-nav","aria-label":"Workspace context sections",children:[o.jsxs("button",{className:y==="overview"?"active":void 0,onClick:()=>k("overview"),type:"button",children:[o.jsx("span",{children:"Overview"}),o.jsx("small",{children:"Identity + state"})]}),o.jsxs("button",{className:y==="responsibility"?"active":void 0,onClick:()=>k("responsibility"),type:"button",children:[o.jsx("span",{children:"Responsibility"}),o.jsx("small",{children:"Long-lived role"})]}),o.jsxs("button",{className:y==="knowledge"?"active":void 0,onClick:()=>k("knowledge"),type:"button",children:[o.jsx("span",{children:"Knowledge"}),o.jsx("small",{children:"Sources + skills"})]}),o.jsxs("button",{className:y==="runtime"?"active":void 0,onClick:()=>k("runtime"),type:"button",children:[o.jsx("span",{children:"Runtime View"}),o.jsx("small",{children:"Thread + tokens"})]}),o.jsxs("button",{className:y==="compactions"?"active":void 0,onClick:()=>k("compactions"),type:"button",children:[o.jsx("span",{children:"Compactions"}),o.jsx("small",{children:"Context history"})]}),o.jsxs("button",{className:y==="additionalContext"?"active":void 0,onClick:()=>k("additionalContext"),type:"button",children:[o.jsx("span",{children:"Additional Context"}),o.jsx("small",{children:"Injected keys"})]})]}),o.jsx("div",{className:"workspace-context-content",children:y==="overview"?o.jsxs("div",{className:"workspace-context-grid",children:[o.jsxs("section",{className:`context-card wide workspace-status-detail ${ye}`,children:[o.jsx("h3",{children:"Current Status"}),o.jsx(Nt,{label:"Status",value:nf(ye,e.nextWakeup,t)}),e.nextWakeup?o.jsxs(o.Fragment,{children:[o.jsx(Nt,{label:"Wakeup state",value:e.nextWakeup.status}),o.jsx(Nt,{label:"Wake at",value:Ki(e.nextWakeup.wakeAt)}),e.nextWakeup.status==="scheduled"?o.jsx(Nt,{label:"Remaining",value:yf(e.nextWakeup,t)}):null,o.jsx(Nt,{label:"Created by",value:e.nextWakeup.createdBy}),o.jsx(Nt,{label:"Attempts",value:`${e.nextWakeup.attemptCount} / ${e.nextWakeup.maxAttempts}`,mono:!0}),o.jsxs("div",{className:"workspace-status-detail-text",children:[o.jsx("span",{children:"Wakeup instruction"}),o.jsx("pre",{children:e.nextWakeup.instruction})]}),e.nextWakeup.error?o.jsxs("div",{className:"workspace-status-detail-text error",children:[o.jsx("span",{children:"Wakeup error"}),o.jsx("pre",{children:e.nextWakeup.error})]}):null]}):null,e.statusError?o.jsxs("div",{className:"workspace-status-detail-text error",children:[o.jsx("span",{children:"Error"}),o.jsx("pre",{children:e.statusError})]}):e.status==="error"||e.status==="initialization_failed"?o.jsx("p",{className:"context-muted",children:"No persisted error detail is available for this status."}):null]}),o.jsxs("section",{className:"context-card",children:[o.jsx("h3",{children:"Workspace"}),o.jsx(Nt,{label:"Name",value:e.title}),o.jsx(Nt,{label:"ID",value:`workspaces/${lu(e.id)}`,mono:!0}),o.jsx(Nt,{label:"Path",value:e.workspacePath,mono:!0})]}),o.jsxs("section",{className:"context-card",children:[o.jsx("h3",{children:"Context Assets"}),o.jsx(Nt,{label:"Responsibility",value:e.responsibility.trim()?"configured":"missing"}),o.jsx(Nt,{label:"Memory",value:e.memory.trim()?"configured":"empty"}),o.jsx(Nt,{label:"Knowledge",value:`${a.length} item${a.length===1?"":"s"}`})]}),o.jsxs("section",{className:"context-card wide",children:[o.jsx("h3",{children:"Current Responsibility"}),e.responsibility.trim()?o.jsx("div",{className:"context-markdown-preview",children:Jl(e.responsibility,e)}):o.jsx("p",{className:"context-muted",children:"No approved responsibility is configured yet."})]}),o.jsxs("section",{className:"context-card wide",children:[o.jsx("h3",{children:"Knowledge Index"}),o.jsx(Tx,{items:a,onDelete:c,onEdit:z=>{f(z),k("knowledge")}})]})]}):y==="responsibility"?o.jsxs("section",{className:"context-tab-surface",children:[o.jsx("header",{className:"settings-section-header",children:o.jsxs("div",{children:[o.jsx("h3",{children:"Workspace Responsibility"}),o.jsx("p",{children:"User-approved long-lived role for this workspace. Edit it from Settings in workspace scope."})]})}),e.responsibility.trim()?o.jsx("div",{className:"context-card context-markdown-preview",children:Jl(e.responsibility,e)}):o.jsx("p",{className:"context-card context-muted",children:"No approved responsibility is configured yet."})]}):y==="knowledge"?o.jsx(HN,{draft:n,items:a,scope:"workspace",workspaceName:e.title,onCancel:u,onDelete:c,onDraftChange:h,onEdit:f,onSubmit:m}):y==="runtime"?o.jsxs("div",{className:"workspace-context-grid",children:[o.jsxs("section",{className:"context-card",children:[o.jsx("h3",{children:"Runtime"}),o.jsx(Nt,{label:"Runtime thread",value:e.codexThreadId??"not started",mono:!0}),o.jsxs("div",{className:"thread-read-actions",children:[o.jsx("button",{disabled:D,onClick:U,type:"button",children:D?"Reading...":"Read Codex thread"}),x?o.jsx("button",{disabled:D,onClick:()=>C(!1),type:"button",children:"Hide"}):null]})]}),o.jsxs("section",{className:"context-card",children:[o.jsx("h3",{children:"Token Window"}),l?o.jsxs(o.Fragment,{children:[o.jsx(Nt,{label:"Used",value:ge===null?"unknown":`${Math.round(ge)}%`,mono:!0}),o.jsx(Nt,{label:"Latest usage",value:l.modelContextWindow?`${Rr(l.totalTokens)} / ${Rr(l.modelContextWindow)}`:Rr(l.totalTokens),mono:!0}),ge!==null?o.jsx("div",{className:`context-token-bar ${rg(ge)}`,children:o.jsx("span",{style:{width:`${Bf(ge)}%`}})}):null,o.jsx(Nt,{label:"Input / output",value:`${ef(l.inputTokens)} / ${ef(l.outputTokens)}`,mono:!0}),o.jsx(Nt,{label:"Reasoning",value:ef(l.reasoningOutputTokens),mono:!0}),o.jsxs("p",{className:"context-muted",children:["Updated ",ut(l.createdAt),"."]})]}):o.jsx("p",{className:"context-muted",children:"No token usage event has been observed in the loaded event window yet."})]}),x?o.jsxs("section",{className:"context-card wide thread-read-panel",children:[o.jsx("h3",{children:"Runtime thread profile"}),o.jsx("p",{className:"context-muted",children:"One-time live thread/read response from Codex app-server. Seele does not persist this profile result."}),D?o.jsx("p",{className:"context-muted",children:"Reading Codex thread..."}):q?o.jsx("pre",{className:"thread-read-error",children:q}):O?o.jsxs(o.Fragment,{children:[oe?o.jsx(WN,{summary:oe}):null,o.jsxs("details",{className:"thread-read-raw",open:!0,children:[o.jsx("summary",{children:"Raw thread/read JSON"}),o.jsx("pre",{className:"thread-read-dump",children:JSON.stringify(O,null,2)})]})]}):o.jsx("p",{className:"context-muted",children:"No thread/read result loaded yet."})]}):null]}):y==="compactions"?o.jsxs("section",{className:"context-tab-surface",children:[o.jsxs("header",{className:"settings-section-header",children:[o.jsxs("div",{children:[o.jsx("h3",{children:"Context Compactions"}),o.jsx("p",{children:"Compaction history recorded for the current runtime thread."})]}),o.jsx("button",{className:"context-refresh-button",disabled:he,onClick:ee,type:"button",children:he?"Refreshing...":"Refresh"})]}),pe?o.jsx("pre",{className:"thread-read-error",children:pe}):he&&!Ae?o.jsx("p",{className:"context-card context-muted",children:"Loading compaction history..."}):Ae!=null&&Ae.length?o.jsx("div",{className:"context-compaction-list",children:Ae.map(z=>o.jsxs("article",{className:"context-compaction-item",children:[o.jsxs("div",{className:"context-compaction-heading",children:[o.jsx("time",{children:ut(z.completedAt??z.usageObservedAt??z.startedAt??"")}),o.jsx("span",{className:`context-compaction-status ${z.status}`,children:z.status==="completed"?"Completed":"Running"})]}),o.jsx("dl",{className:"context-compaction-facts",children:Dz(z).map(te=>o.jsxs("div",{children:[o.jsx("dt",{children:te.label}),o.jsx("dd",{children:te.value})]},te.label))}),o.jsxs("small",{children:[ts(z.id),z.turnId?` · turn ${ts(z.turnId)}`:""]})]},z.id))}):o.jsx("p",{className:"context-card context-muted",children:"No compaction records yet."})]}):o.jsxs("section",{className:"context-tab-surface thread-read-panel",children:[o.jsx("header",{className:"settings-section-header",children:o.jsxs("div",{children:[o.jsx("h3",{children:"Additional Context"}),o.jsx("p",{children:"One-time live render of the application additionalContext for this workspace. Seele does not persist this preview result."})]})}),K?o.jsx("p",{className:"context-card context-muted",children:"Rendering additionalContext..."}):J?o.jsx("pre",{className:"thread-read-error",children:J}):H?o.jsx(VN,{preview:H,refreshing:K,onRefresh:B}):o.jsx("p",{className:"context-card context-muted",children:"No additionalContext preview loaded yet."})]})})]})]})})}function zc(e){const t=e instanceof Xs?e.detail:e instanceof Error?e.message:String(e);let n="";if(e instanceof Xs)try{n=JSON.parse(e.body).error??""}catch{}return`${{collaboration_owner_mismatch:"无法添加参与者:所选工作空间与 Topic 不属于同一个平台用户。请检查工作空间的归属;这不是 Topic Owner 角色不匹配。",collaboration_version_conflict:"Topic 已被更新,本次修改未保存。请重新打开编辑后再试。",workspace_owner_required:"工作空间缺少所属用户,无法创建 Topic。请检查工作空间的归属。"}[n]??"Topic 操作失败,请查看以下错误详情。"}
362
-
363
- ${t}`}function yN({conversations:e,onClose:t,workspaceGroups:n}){var U;const[a,l]=A.useState([]),[u,c]=A.useState("active"),[f,h]=A.useState(null),[m,g]=A.useState([]),[y,k]=A.useState(!0),[x,C]=A.useState(null),[D,R]=A.useState(null),[O,M]=A.useState(!1),[q,L]=A.useState(!1),[K,P]=A.useState(new Set),[H,X]=A.useState({title:"",publicDescription:"",ownerWorkspaceId:((U=e[0])==null?void 0:U.id)??"",participantWorkspaceIds:[]}),J=a.find(B=>B.id===f)??null,F=A.useMemo(()=>new Map(e.map(B=>[B.id,B.title])),[e]),he=a.filter(B=>u==="archived"?B.status==="archived":B.status!=="archived"),me=n.map(B=>({...B,conversations:B.conversations.filter(ee=>ee.id!==H.ownerWorkspaceId)})).filter(B=>B.conversations.length>0),Ae=()=>{var B;C(null),X({title:"",publicDescription:"",ownerWorkspaceId:((B=e[0])==null?void 0:B.id)??"",participantWorkspaceIds:[]}),P(new Set),R("create")},je=()=>{!J||J.status!=="active"||(C(null),X({title:J.title,publicDescription:J.publicDescription,ownerWorkspaceId:J.ownerWorkspaceId,participantWorkspaceIds:J.members.filter(B=>B.role==="participant"&&B.status==="active").map(B=>B.workspaceId)}),P(new Set),R("edit"))},pe=async(B,ee=u)=>{var z;k(!0),C(null);try{const te=await Cv();l(te);const Te=te.filter(He=>ee==="archived"?He.status==="archived":He.status!=="archived"),Re=(B&&Te.some(He=>He.id===B)?B:null)??(f&&Te.some(He=>He.id===f)?f:((z=Te[0])==null?void 0:z.id)??null);h(Re),g(Re?await Hd(Re):[])}catch(te){C(zc(te))}finally{k(!1)}};A.useEffect(()=>{pe()},[]),A.useEffect(()=>{const B=window.setInterval(()=>{(async()=>{try{const ee=await Cv();l(ee),f&&ee.some(z=>z.id===f)&&g(await Hd(f))}catch{}})()},1e4);return()=>window.clearInterval(B)},[f]);const Z=async B=>{h(B),C(null);try{g(await Hd(B))}catch(ee){C(zc(ee))}},ge=async B=>{var z;if(B===u)return;c(B),C(null);const ee=((z=a.find(te=>B==="archived"?te.status==="archived":te.status!=="archived"))==null?void 0:z.id)??null;if(h(ee),!ee){g([]);return}try{g(await Hd(ee))}catch(te){C(zc(te))}},ye=async B=>{var ee;if(B.preventDefault(),!(!H.title.trim()||!H.ownerWorkspaceId)){L(!0),C(null);try{const z=D==="edit"&&J?await pD(J.id,{expectedVersion:J.version,title:H.title.trim(),publicDescription:H.publicDescription.trim(),participantWorkspaceIds:H.participantWorkspaceIds}):await mD({...H,title:H.title.trim(),publicDescription:H.publicDescription.trim()});c("active"),R(null),X({title:"",publicDescription:"",ownerWorkspaceId:((ee=e[0])==null?void 0:ee.id)??"",participantWorkspaceIds:[]}),await pe(z.id,"active")}catch(z){C(zc(z))}finally{L(!1)}}},oe=async()=>{if(!(!J||J.status!=="active")){L(!0),C(null);try{const B=await gD(J.id,J.version);M(!1),c("active"),await pe(void 0,"active")}catch(B){C(zc(B))}finally{L(!1)}}};return o.jsx("div",{className:"context-panel-overlay settings-overlay",onClick:t,role:"presentation",children:o.jsxs("section",{"aria-label":"工作空间协作",className:"context-panel collaboration-panel",onClick:B=>B.stopPropagation(),children:[o.jsxs("header",{className:"context-panel-header collaboration-panel-header",children:[o.jsxs("div",{children:[o.jsx("h2",{children:"协作"}),o.jsx("p",{children:"在明确选择的工作空间之间建立持久、定向的 Topic 通信。"})]}),o.jsxs("div",{className:"collaboration-header-actions",children:[o.jsx("button",{"aria-label":"新建 Topic",className:"memory-icon-button collaboration-new-topic",onClick:Ae,title:"新建 Topic",type:"button",children:"+"}),o.jsx("button",{"aria-label":"关闭协作",className:"icon-button",onClick:t,type:"button",children:"×"})]})]}),x&&!D&&!O?o.jsx("div",{className:"collaboration-error",role:"alert",children:x}):null,o.jsxs("div",{className:"collaboration-body",children:[o.jsxs("nav",{className:"collaboration-topic-list","aria-label":"协作 Topics",children:[o.jsxs("div",{className:"collaboration-topic-tabs",role:"tablist","aria-label":"Topic 列表范围",children:[o.jsx("button",{"aria-selected":u==="active",className:u==="active"?"active":void 0,onClick:()=>void ge("active"),role:"tab",type:"button",children:"当前"}),o.jsx("button",{"aria-selected":u==="archived",className:u==="archived"?"active":void 0,onClick:()=>void ge("archived"),role:"tab",type:"button",children:"已归档"})]}),y?o.jsx("p",{children:"正在加载..."}):he.length===0?o.jsx("p",{children:u==="archived"?"还没有已归档 Topic。":"还没有当前 Topic。"}):he.map(B=>o.jsxs("button",{className:`collaboration-topic-entry${B.id===f?" active":""}`,onClick:()=>void Z(B.id),type:"button",children:[o.jsx("span",{children:B.title}),o.jsxs("small",{children:[B.members.length," 个工作空间 · ",B.status]})]},B.id))]}),o.jsx("main",{className:"collaboration-topic-detail",children:J?o.jsxs(o.Fragment,{children:[o.jsxs("header",{children:[o.jsxs("div",{children:[o.jsx("h3",{children:J.title}),o.jsx("p",{children:J.publicDescription||"没有公开描述。"})]}),o.jsxs("div",{className:"collaboration-topic-actions",children:[o.jsx("span",{children:J.status}),J.status==="active"?o.jsxs(o.Fragment,{children:[o.jsx("button",{"aria-label":`编辑 Topic ${J.title}`,className:"memory-icon-button",onClick:je,title:"编辑",type:"button",children:o.jsx(Lf,{})}),o.jsx("button",{"aria-label":`归档 Topic ${J.title}`,className:"memory-icon-button",onClick:()=>M(!0),title:"归档",type:"button",children:o.jsx(sD,{})})]}):null]})]}),o.jsx("div",{className:"collaboration-members",children:J.members.filter(B=>B.status==="active").map(B=>o.jsxs("span",{children:[B.workspaceTitleSnapshot,o.jsx("small",{children:B.role})]},`${B.workspaceId}-${B.membershipVersion}`))}),o.jsx("div",{className:"collaboration-message-list",children:m.length===0?o.jsx("p",{children:"还没有消息。"}):m.map(B=>o.jsxs("article",{children:[o.jsxs("header",{children:[o.jsx("strong",{children:B.senderTitleSnapshot}),o.jsx("span",{children:B.recipientWorkspaceIds.includes("ALL")?"发给全部参与者":`发给 ${Gx(B.recipientWorkspaceIds.map(ee=>F.get(ee)??ts(ee)))}`}),o.jsx("time",{children:ut(B.createdAt)})]}),o.jsx("div",{className:"markdown-body",children:Jl(B.contentMarkdown,void 0)})]},B.id))})]}):o.jsx("div",{className:"collaboration-empty",children:"选择或新建一个 Topic。"})})]}),D?o.jsx("div",{className:"collaboration-create-overlay",role:"presentation",onClick:()=>!q&&R(null),children:o.jsxs("form",{className:"dialog-card collaboration-create-dialog",onClick:B=>B.stopPropagation(),onSubmit:ye,children:[o.jsxs("header",{children:[o.jsxs("div",{children:[o.jsx("h3",{children:D==="edit"?"编辑 Topic":"新建 Topic"}),o.jsx("p",{children:D==="edit"?"调整公开信息与参与工作空间。":"明确选择本次通信的 owner 与参与者。"})]}),o.jsx("button",{"aria-label":"关闭 Topic 编辑",className:"icon-button",onClick:()=>R(null),type:"button",children:"×"})]}),o.jsxs("label",{children:["标题",o.jsx("input",{autoFocus:!0,placeholder:"填写 Topic 标题",value:H.title,onChange:B=>X(ee=>({...ee,title:B.target.value}))})]}),o.jsxs("label",{children:["公开描述",o.jsx("textarea",{placeholder:"填写所有参与工作空间可见的共享背景",value:H.publicDescription,onChange:B=>X(ee=>({...ee,publicDescription:B.target.value}))})]}),o.jsxs("label",{children:["Owner 工作空间",o.jsx("select",{disabled:D==="edit",value:H.ownerWorkspaceId,onChange:B=>X(ee=>({...ee,ownerWorkspaceId:B.target.value,participantWorkspaceIds:ee.participantWorkspaceIds.filter(z=>z!==B.target.value)})),children:n.map(B=>o.jsx("optgroup",{label:B.title,children:B.conversations.map(ee=>o.jsx("option",{value:ee.id,children:ee.title},ee.id))},B.id))})]}),o.jsxs("fieldset",{className:"collaboration-participant-groups",children:[o.jsx("legend",{children:"参与工作空间"}),o.jsxs("div",{className:"collaboration-participant-toolbar",children:[o.jsxs("span",{children:[H.participantWorkspaceIds.length," 个已选择"]}),o.jsxs("div",{children:[o.jsx("button",{onClick:()=>P(new Set),type:"button",children:"全部展开"}),o.jsx("button",{onClick:()=>P(new Set(me.map(B=>B.id))),type:"button",children:"全部收起"})]})]}),me.map(B=>{const ee=B.conversations,z=ee.filter(Te=>H.participantWorkspaceIds.includes(Te.id)).length,te=K.has(B.id);return o.jsxs("section",{className:"collaboration-participant-group",children:[o.jsxs("header",{children:[o.jsxs("button",{"aria-expanded":!te,className:"collaboration-group-toggle",onClick:()=>P(Te=>{const Re=new Set(Te);return Re.has(B.id)?Re.delete(B.id):Re.add(B.id),Re}),type:"button",children:[o.jsx("span",{"aria-hidden":"true",className:te?void 0:"expanded",children:"›"}),o.jsx("strong",{children:B.title}),o.jsxs("small",{children:[z,"/",ee.length]})]}),o.jsxs("label",{title:`选择 ${B.title} 全部工作空间`,children:[o.jsx("input",{checked:z===ee.length,onChange:()=>X(Te=>{const Re=ee.map(rt=>rt.id),He=new Set(Te.participantWorkspaceIds);return Re.every(rt=>He.has(rt))?Re.forEach(rt=>He.delete(rt)):Re.forEach(rt=>He.add(rt)),{...Te,participantWorkspaceIds:Array.from(He)}}),type:"checkbox"}),o.jsx("span",{children:"全选"})]})]}),te?null:o.jsx("div",{children:ee.map(Te=>o.jsxs("label",{className:"collaboration-participant-option",children:[o.jsx("input",{checked:H.participantWorkspaceIds.includes(Te.id),onChange:Re=>X(He=>({...He,participantWorkspaceIds:Re.target.checked?[...He.participantWorkspaceIds,Te.id]:He.participantWorkspaceIds.filter(rt=>rt!==Te.id)})),type:"checkbox"}),o.jsx("span",{children:Te.title})]},Te.id))})]},B.id)})]}),o.jsxs("footer",{className:"collaboration-submit-footer",children:[x?o.jsx("div",{className:"collaboration-error",role:"alert",children:x}):null,o.jsxs("div",{children:[o.jsx("button",{className:"secondary",disabled:q,onClick:()=>R(null),type:"button",children:"取消"}),o.jsx("button",{disabled:q||!H.title.trim()||!H.ownerWorkspaceId,type:"submit",children:q?"正在保存...":D==="edit"?"保存":"创建 Topic"})]})]})]})}):null,O&&J?o.jsx("div",{className:"collaboration-create-overlay",onClick:()=>!q&&M(!1),role:"presentation",children:o.jsxs("section",{"aria-label":"归档 Topic",className:"dialog-card collaboration-archive-dialog",onClick:B=>B.stopPropagation(),children:[o.jsxs("header",{children:[o.jsxs("div",{children:[o.jsx("h3",{children:"归档 Topic"}),o.jsx("p",{children:"归档后保留历史消息,但工作空间不能再向此 Topic 发送新消息。"})]}),o.jsx("button",{"aria-label":"关闭归档确认",className:"icon-button",onClick:()=>M(!1),type:"button",children:"×"})]}),o.jsx("strong",{children:J.title}),x?o.jsx("div",{className:"collaboration-error",role:"alert",children:x}):null,o.jsxs("footer",{children:[o.jsx("button",{className:"secondary",disabled:q,onClick:()=>M(!1),type:"button",children:"取消"}),o.jsx("button",{className:"danger",disabled:q,onClick:()=>void oe(),type:"button",children:q?"正在归档...":"归档"})]})]})}):null]})})}function vN({workspace:e,refreshKey:t}){const[n,a]=A.useState([]),[l,u]=A.useState(null),[c,f]=A.useState(null),[h,m]=A.useState(!1),[g,y]=A.useState(0);A.useEffect(()=>{let R=!1,O;const M=new AbortController;async function q(){try{const L=Ne(`conversations/${e.id}/runtime/operations`),K=await fetch(L,{signal:M.signal});await Ve(K,{url:L});const P=(await K.json()).operations;R||(a(P),f(null),u(H=>H?P.find(X=>X.id===H.id)??{...H,status:"superseded",stage:"finished"}:null))}catch(L){R||f(dt(L).message)}finally{R||(O=setTimeout(q,3e3))}}return q(),()=>{R=!0,M.abort(),clearTimeout(O)}},[e.id,t,g]),A.useEffect(()=>{if(!l)return;const R=O=>{O.key==="Escape"&&u(null)};return window.addEventListener("keydown",R),()=>window.removeEventListener("keydown",R)},[l==null?void 0:l.id]);async function k(){if(!l||l.status!=="running"||h)return;const R=l.id;m(!0),f(null);try{const O=Ne(`conversations/${e.id}/runtime/operations/${encodeURIComponent(R)}/stop`),M=await fetch(O,{method:"POST"});await Ve(M,{url:O,method:"POST"});const q=await M.json();u(L=>(L==null?void 0:L.id)===R?{...L,status:q.stopped?"stopping":"superseded",stage:q.stopped?L.stage:"finished"}:L),y(L=>L+1)}catch(O){f(dt(O).message)}finally{m(!1)}}const x={running:"进行中",stopping:"正在停止",succeeded:"已完成",failed:"失败",cancelled:"已取消",interrupted:"已中断",superseded:"已结束或被替换"},C={preparing:"准备历史",rebuilding:"注入历史并按容量压缩",finalizing:"保存 Thread 并完成初始化",warming_up:"正在唤醒新 Thread",finished:"处理结束"},D=n.filter(R=>R.status==="running");return o.jsxs(o.Fragment,{children:[D.length?o.jsx("div",{className:"workspace-operation-strip",children:D.map(R=>o.jsxs("button",{className:"workspace-rebuild-notice",type:"button",onClick:()=>u(R),title:"查看实际进度或停止此操作",children:[R.kind==="clone"?o.jsx(Fx,{}):o.jsx(eg,{}),R.kind==="clone"?"Clone":"Reset"," · 进行中 ",o.jsx("span",{"aria-hidden":"true",children:"↗"})]},R.id))}):null,l?H7.createPortal(o.jsx("div",{className:"dialog-backdrop",role:"presentation",onMouseDown:()=>u(null),children:o.jsxs("section",{className:"dialog-card runtime-operation-dialog",role:"dialog","aria-modal":"true","aria-label":`${l.kind==="clone"?"Clone":"Reset"} 进度`,onMouseDown:R=>R.stopPropagation(),children:[o.jsxs("header",{children:[o.jsxs("div",{children:[o.jsxs("h2",{children:[l.kind==="clone"?"Clone":"Reset"," 进度"]}),o.jsx("p",{children:e.title})]}),o.jsx("button",{className:"icon-button",type:"button","aria-label":"关闭进度窗口",onClick:()=>u(null),children:"×"})]}),o.jsxs("dl",{children:[o.jsx("dt",{children:"状态"}),o.jsx("dd",{children:x[l.status]??l.status}),o.jsx("dt",{children:"阶段"}),o.jsx("dd",{children:C[l.stage]??l.stage}),o.jsx("dt",{children:"开始时间"}),o.jsx("dd",{children:Ki(l.startedAt)}),l.completedAt?o.jsxs(o.Fragment,{children:[o.jsx("dt",{children:"结束时间"}),o.jsx("dd",{children:Ki(l.completedAt)})]}):null,o.jsx("dt",{children:"实际进度"}),o.jsx("dd",{children:l.progressAvailable?`已注入 ${l.injectedBatches} 批 · 已压缩 ${l.completedCompactions} 段`:l.status==="running"?"等待进度上报":"无历史进度数据"}),l.totalItems!=null&&l.processedItems!=null?o.jsxs(o.Fragment,{children:[o.jsx("dt",{children:"历史处理"}),o.jsxs("dd",{children:[l.processedItems," / ",l.totalItems," 条",l.totalItems>0?o.jsxs(o.Fragment,{children:[" · ",Math.floor(l.processedItems*100/l.totalItems),"%",o.jsx("progress",{"aria-label":"历史处理进度",max:l.totalItems,value:l.processedItems})]}):"(无历史内容)"]})]}):null]}),o.jsx("p",{children:"进度按已完成处理的历史条目计算,不代表剩余时间;压缩次数随内容容量变化。历史处理完成后仍需保存和初始化。关闭窗口不会停止操作。"}),l.error?o.jsx("p",{role:"alert",children:l.error}):null,c?o.jsxs("p",{role:"alert",children:["进度更新失败:",c]}):null,o.jsxs("footer",{children:[o.jsx("button",{className:"secondary",type:"button",onClick:()=>u(null),children:"关闭"}),o.jsx("button",{className:"danger",type:"button",disabled:h||l.status!=="running",onClick:()=>void k(),children:h?"正在停止…":"停止此操作"})]})]})}),document.body):null]})}function xN({workspaceId:e}){const[t,n]=A.useState({records:[],nextCursor:null}),[a,l]=A.useState(null),[u,c]=A.useState(!1),f=A.useRef(0),h=A.useRef(!1),[m,g]=A.useState(0);A.useEffect(()=>{let x=!1;const C=new AbortController;let D;const R=++f.current;h.current=!1;async function O(){if(!h.current)try{const M=Ne(`conversations/${e}/runtime/reset-history`),q=await fetch(M,{signal:C.signal});await Ve(q,{url:M});const L=await q.json();!x&&R===f.current&&(n(L),l(null))}catch(M){x||l(dt(M).message)}finally{x||(D=setTimeout(O,5e3))}}return O(),()=>{x=!0,++f.current,C.abort(),clearTimeout(D)}},[e,m]);async function y(){if(!t.nextCursor||u)return;h.current=!0;const x=++f.current;c(!0);try{const C=Ne(`conversations/${e}/runtime/reset-history?${new URLSearchParams(t.nextCursor)}`),D=await fetch(C);await Ve(D,{url:C});const R=await D.json();x===f.current&&n(O=>({records:[...O.records,...R.records],nextCursor:R.nextCursor}))}catch(C){x===f.current&&l(dt(C).message)}finally{c(!1)}}const k={running:"进行中",succeeded:"已完成",failed:"失败",cancelled:"已取消",interrupted:"已中断"};return o.jsxs("section",{"aria-label":"Reset history",className:"reset-history",children:[o.jsxs("strong",{children:["Reset 记录 ",o.jsx("button",{className:"secondary",type:"button",onClick:()=>g(x=>x+1),children:"刷新"})]}),o.jsx("small",{children:"关闭窗口不会停止 Reset。记录会保留;旧版记录仅包含成功操作,开始时间不可追溯。"}),a?o.jsx("p",{role:"alert",children:a}):null,!t.records.length&&!a?o.jsx("span",{children:"暂无记录"}):null,o.jsx("ul",{className:"reset-history-list",children:t.records.map(x=>o.jsxs("li",{children:[o.jsxs("span",{className:"reset-history-times",children:[o.jsxs("span",{children:["开始 ",x.id.startsWith("legacy:")?"未知":o.jsx("time",{dateTime:x.startedAt,title:Ki(x.startedAt),children:ut(x.startedAt)})]}),o.jsx("span",{"aria-hidden":"true",children:" → "}),o.jsxs("span",{children:["结束 ",x.completedAt||x.id.startsWith("legacy:")?o.jsx("time",{dateTime:x.completedAt??x.startedAt,title:Ki(x.completedAt??x.startedAt),children:ut(x.completedAt??x.startedAt)}):x.status==="running"?"未结束":"未知"]})]}),o.jsx("span",{children:k[x.status]??x.status}),o.jsx("span",{className:"reset-history-note",title:x.error??void 0,children:x.error||(x.id.startsWith("legacy:")?"旧记录完成时间":"")})]},x.id))}),t.nextCursor?o.jsx("button",{className:"secondary",disabled:u,onClick:()=>void y(),type:"button",children:u?"加载中…":"更早记录"}):null]})}function bN({busy:e,conversation:t,conversationId:n,forceStopBusy:a,preview:l,previewLoading:u,result:c,status:f,warmup:h,workspaceGroups:m,onCancelResetPreview:g,onClose:y,onForceStop:k,onPreviewReset:x,onStartBlankContext:C,onResetRuntime:D,onSaveResetSelection:R,onWorkspaceChange:O,onWarmupChange:M}){const q=!t||e||f==="running"||f==="initializing";return o.jsx("div",{className:"context-panel-overlay settings-overlay",onClick:y,role:"presentation",children:o.jsxs("section",{"aria-label":"Seele console",className:"context-panel console-panel",onClick:L=>L.stopPropagation(),children:[o.jsxs("header",{className:"context-panel-header console-panel-header",children:[o.jsxs("div",{children:[o.jsx("h2",{children:"Console"}),o.jsx("p",{children:"Control actions for the selected workspace runtime."})]}),o.jsxs("div",{className:"console-header-actions",children:[o.jsxs("label",{className:"console-workspace-picker",children:[o.jsx("span",{children:"Workspace"}),o.jsx("select",{onChange:L=>O(L.target.value),value:n??"",children:m.map(L=>o.jsx("optgroup",{label:L.title,children:L.conversations.map(K=>o.jsxs("option",{value:K.id,children:[K.title," · workspaces/",lu(K.id)]},K.id))},L.id))})]}),o.jsx("button",{"aria-label":"Close console",onClick:y,type:"button",children:"×"})]})]}),o.jsx("div",{className:"console-body",children:o.jsxs("section",{className:"console-card",children:[o.jsxs("div",{className:"console-card-heading",children:[o.jsxs("div",{children:[o.jsx("h3",{children:"Workspace Runtime"}),o.jsx("p",{children:"Reset only replaces the Codex runtime thread. Seele workspace history, metadata, and files remain intact."})]}),o.jsx("span",{className:`console-status ${f}`,children:f})]}),o.jsxs("dl",{className:"console-facts",children:[o.jsxs("div",{children:[o.jsx("dt",{children:"Workspace"}),o.jsx("dd",{children:(t==null?void 0:t.title)??"No workspace selected"})]}),o.jsxs("div",{children:[o.jsx("dt",{children:"ID"}),o.jsx("dd",{children:t?`workspaces/${lu(t.id)}`:"-"})]}),o.jsxs("div",{children:[o.jsx("dt",{children:"Thread"}),o.jsx("dd",{children:(t==null?void 0:t.codexThreadId)??"Not created"})]})]}),o.jsxs("label",{className:"console-toggle",children:[o.jsx("input",{checked:h,onChange:L=>M(L.target.checked),type:"checkbox"}),o.jsxs("span",{children:["Run a warmup turn after reset",o.jsx("small",{children:"The workspace will receive a system wakeup to re-orient itself after the thread is rebuilt."})]})]}),o.jsxs("div",{className:"console-actions",children:[o.jsx("button",{className:"danger",disabled:!t||a,onClick:k,title:"Kill the workspace runtime and repair every non-terminal scheduler state",type:"button",children:a?"Stopping & repairing...":"Force stop & repair"}),o.jsx("button",{className:"danger",disabled:q||u,onClick:x,type:"button",children:u?"Preparing preview...":"Preview runtime reset"}),o.jsx("button",{disabled:q||u,onClick:C,type:"button",children:"Clear memory & start blank"}),f==="running"||f==="initializing"?o.jsx("span",{children:"Force stop the active workspace operation before resetting."}):null]}),n?o.jsx(xN,{workspaceId:n},n):null,c?o.jsxs("div",{className:"console-result",children:[o.jsx("strong",{children:c.workspaceMemoryCleared?"Blank workspace context ready":"Runtime reset completed"}),o.jsxs("span",{children:[c.injectedItemCount," visible history items injected"]}),c.historyCompactionCount>0?o.jsxs("span",{children:["Full history processed in ",c.historyBatchCount," chronological batches with ",c.historyCompactionCount," native compactions"]}):null,c.workspaceMemoryCleared?o.jsx("span",{children:"Workspace Memory cleared; Base Memory retained"}):null,o.jsxs("span",{children:["New thread: ",c.newThreadId]}),c.warmupTurnId?o.jsxs("span",{children:["Warmup turn: ",c.warmupTurnId]}):null]}):null]})}),l?o.jsx(wN,{busy:e,preview:l,warmup:h,onCancel:g,onConfirm:D,onSaveSelection:R}):null]})})}function wN({busy:e,preview:t,warmup:n,onCancel:a,onConfirm:l,onSaveSelection:u}){const[c,f]=A.useState(()=>new Set(t.entries.filter(F=>F.includedByDefault).map(F=>F.id))),[h,m]=A.useState(!1),[g,y]=A.useState(!1),[k,x]=A.useState(null),C=A.useRef(null),D=t.entries.filter(F=>c.has(F.id)),R=D.filter(F=>F.role==="user").length,O=D.length-R,M=t.entries.filter(F=>F.topicRelation!==null).map(F=>F.id),q=M.filter(F=>c.has(F)).length,L=t.entries.length>0&&c.size===t.entries.length;A.useEffect(()=>{C.current&&(C.current.indeterminate=c.size>0&&c.size<t.entries.length)},[t.entries.length,c.size]);const K=e||g;async function P(F){y(!0),x(null);try{await u(t.entries.filter(he=>F.has(he.id)).map(he=>he.id)),f(F)}catch(he){x(dt(he).message)}finally{y(!1)}}function H(F,he){const me=new Set(c);he?me.add(F):me.delete(F),P(me)}function X(){const F=new Set(c);M.forEach(he=>F.add(he)),P(F)}function J(){const F=new Set(c);M.forEach(he=>{F.has(he)?F.delete(he):F.add(he)}),P(F)}return o.jsx("div",{className:`reset-preview-overlay ${h?"expanded":""}`,onClick:K?void 0:a,role:"presentation",children:o.jsxs("section",{"aria-label":"Runtime reset preview","aria-modal":"true",className:`reset-preview-dialog ${h?"expanded":""}`,onClick:F=>F.stopPropagation(),role:"dialog",children:[o.jsxs("header",{className:"reset-preview-header",children:[o.jsxs("div",{children:[o.jsx("h3",{children:"Confirm runtime reset"}),o.jsx("p",{children:"The new thread will process the selected original messages in chronological batches. Each batch is compacted natively before the next batch is injected; the old thread context is never reused."})]}),o.jsxs("div",{className:"reset-preview-header-actions",children:[o.jsx("button",{"aria-label":h?"Restore reset preview size":"Expand reset preview",onClick:()=>m(F=>!F),title:h?"Restore size":"Expand",type:"button",children:h?"⊡":"⛶"}),o.jsx("button",{"aria-label":"Close reset preview",disabled:K,onClick:a,type:"button",children:"×"})]})]}),o.jsxs("div",{className:"reset-preview-summary",children:[o.jsxs("label",{className:"reset-preview-select-all",children:[o.jsx("input",{checked:L,disabled:K||t.entries.length===0,onChange:F=>void P(F.target.checked?new Set(t.entries.map(he=>he.id)):new Set),ref:C,type:"checkbox"}),o.jsxs("span",{children:[c.size," of ",t.entries.length," selected"]})]}),o.jsxs("span",{children:[R," user"]}),o.jsxs("span",{children:[O," assistant"]}),M.length>0?o.jsxs("div",{className:"reset-preview-topic-actions",children:[o.jsxs("span",{children:[q," of ",M.length," Topic input + response"]}),o.jsx("button",{disabled:K||q===M.length,onClick:X,type:"button",children:"Select Topic turns"}),o.jsx("button",{disabled:K,onClick:J,type:"button",children:"Invert Topic turns"})]}):null,o.jsxs("span",{children:[t.historyBatchCount," planned batch",t.historyBatchCount===1?"":"es"]}),o.jsxs("span",{children:["~",t.estimatedTokenCount.toLocaleString()," source tokens"]}),o.jsx("span",{children:n?"Warmup enabled":"No warmup"}),g?o.jsx("span",{children:"Saving defaults..."}):null,k?o.jsx("span",{className:"reset-preview-selection-error",children:k}):null]}),o.jsx("div",{className:"reset-preview-list",children:t.entries.length>0?t.entries.map((F,he)=>o.jsxs("article",{className:`reset-preview-item ${F.role} ${c.has(F.id)?"":"excluded"}`,children:[o.jsxs("header",{children:[o.jsxs("label",{children:[o.jsx("input",{"aria-label":`Include ${F.role} message ${he+1}`,checked:c.has(F.id),disabled:K,onChange:me=>H(F.id,me.target.checked),type:"checkbox"}),o.jsx("span",{children:he+1})]}),o.jsx("strong",{children:F.role}),F.topicRelation?o.jsxs("span",{className:"reset-preview-topic-badge",children:["Topic ",F.topicRelation]}):null,o.jsx("time",{dateTime:F.createdAt,children:ut(F.createdAt)})]}),o.jsx("pre",{children:F.content})]},F.id)):o.jsx("p",{className:"reset-preview-empty",children:"No visible history will be injected."})}),o.jsxs("footer",{className:"reset-preview-actions",children:[o.jsxs("small",{children:["Preview fingerprint: ",t.fingerprint.slice(0,12)]}),o.jsxs("div",{children:[o.jsx("button",{disabled:K,onClick:a,type:"button",children:"Cancel"}),o.jsx("button",{className:"danger",disabled:K,onClick:()=>l(t.entries.filter(F=>c.has(F.id)).map(F=>F.id)),type:"button",children:e?"Submitting...":"Confirm full-history reset"})]})]})]})})}function kN({currentReleasedAt:e,currentVersion:t,job:n,latest:a,latestChecking:l,starting:u,onClose:c,onRefresh:f,onStart:h}){const m=(n==null?void 0:n.currentVersion)??t,g=a!=null&&a.version&&$z(a.version,m)?Hz(a.version):null;return A.useEffect(()=>{const y=k=>{k.key==="Escape"&&c()};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[c]),o.jsx("div",{className:"codex-update-overlay",onClick:c,role:"presentation",children:o.jsxs("section",{"aria-label":"Codex CLI update",className:"codex-update-panel",onClick:y=>y.stopPropagation(),children:[o.jsxs("header",{children:[o.jsxs("div",{children:[o.jsx("h3",{children:"Codex CLI update"}),o.jsx("p",{children:"Updates apply to new turns. Running turns continue uninterrupted."})]}),o.jsx("button",{"aria-label":"Close Codex CLI update",onClick:c,type:"button",children:"×"})]}),o.jsxs("dl",{className:"codex-update-summary",children:[o.jsxs("div",{children:[o.jsx("dt",{children:"Status"}),o.jsx("dd",{className:n?`status-${n.status}`:void 0,children:(n==null?void 0:n.status)??"Not started"})]}),o.jsxs("div",{children:[o.jsx("dt",{children:"Current"}),o.jsx("dd",{children:s1(m,(n==null?void 0:n.codexReleasedAt)??e)})]}),o.jsxs("div",{children:[o.jsx("dt",{children:"Latest"}),o.jsxs("dd",{title:(a==null?void 0:a.error)??void 0,children:[l?"Checking...":a!=null&&a.version?s1(a.version,a.releasedAt):a!=null&&a.error?"Check failed":"Not checked",g?o.jsx("a",{className:"codex-release-notes-link",href:g,rel:"noreferrer",target:"_blank",children:"Release notes"}):null]})]}),n?o.jsxs("div",{children:[o.jsx("dt",{children:"Started"}),o.jsx("dd",{children:ut(n.startedAt)})]}):null]}),a!=null&&a.error?o.jsxs("p",{className:"codex-latest-error",children:["Latest version check: ",a.error]}):null,o.jsx("div",{className:"codex-update-log",role:"log","aria-live":"polite",children:n!=null&&n.logs.length?n.logs.map((y,k)=>o.jsxs("div",{className:`log-${y.stream}`,children:[o.jsx("time",{children:Uz(y.at)}),o.jsx("span",{children:y.text})]},`${y.at}-${k}`)):o.jsx("p",{children:"No update logs yet."})}),o.jsxs("footer",{children:[o.jsx("button",{className:"secondary",onClick:f,type:"button",children:"Refresh"}),o.jsx("button",{disabled:u||(n==null?void 0:n.status)==="running",onClick:h,type:"button",children:u?"Starting...":(n==null?void 0:n.status)==="running"?"Updating...":n?"Run again":"Start update"})]})]})})}function SN({startWithAccounts:e=!1,currentUser:t,conversations:n,deploymentSettings:a,editingEnvironmentKey:l,environmentDraft:u,globalEnvironment:c,workspaceEnvironment:f,memorySettings:h,memorySettingsDraft:m,managedUsers:g,workspaceMemoryDraft:y,runtimeSettings:k,runtimeModels:x,runtimeCodexVersion:C,runtimeCodexReleasedAt:D,runtimeCodexUpdating:R,runtimeSettingsDraft:O,runtimeSettingsScope:M,settingsWorkspace:q,settingsWorkspaceId:L,systemDiagnostics:K,systemDiagnosticsLoading:P,workspaceGroups:H,workspaceRuntimeSettings:X,workspaceRuntimeSettingsDraft:J,onCancelEnvironmentEdit:F,onClose:he,onCreateUser:me,onDeleteUser:Ae,onDeleteEnvironment:je,onDraftChange:pe,onEditEnvironment:Z,onSaveBaseMemoryItems:ge,onSaveDeploymentSettings:ye,onSaveResponsibility:oe,onSaveWorkspaceMemoryItems:U,onRevealEnvironmentValue:B,onRuntimeDraftChange:ee,onCodexAccountSwitched:z,onUpdateCodexCli:te,onRuntimeScopeChange:Te,onSettingsWorkspaceChange:Re,onSubmitRuntimeSettings:He,onSubmitEnvironment:rt,onRefreshSystemDiagnostics:de,onUpdateUser:ie,onWorkspaceRuntimeDraftChange:Ee,onWorkspaceRuntimeReset:Oe,revealedEnvironmentKeys:Pe}){const[Xe,Mt]=A.useState(e&&t.role==="admin"?"accounts":"model"),[qn,ra]=A.useState(!1);A.useEffect(()=>{t.role!=="admin"&&["accounts","channels","users","system","deployment"].includes(Xe)&&Mt("model")},[t.role,Xe]);const[Jn,er]=A.useState(null),[Kt,Ln]=A.useState(!1),[Vn,Un]=A.useState((q==null?void 0:q.responsibility)??""),[Xt,pr]=A.useState(!1),ve=A.useRef(null),Le=M==="workspace"?Object.values((X==null?void 0:X.sources)??{}).filter(re=>re==="workspace").length:0;return A.useEffect(()=>{M==="global"&&Ln(!1)},[M]),A.useEffect(()=>{Un((q==null?void 0:q.responsibility)??"")},[q==null?void 0:q.id,q==null?void 0:q.responsibility]),A.useEffect(()=>{if(!Kt)return;const re=qe=>{var lt;const Ge=qe.target;Ge instanceof Node&&((lt=ve.current)!=null&&lt.contains(Ge))||Ln(!1)},be=qe=>{qe.key==="Escape"&&Ln(!1)};return document.addEventListener("pointerdown",re,!0),document.addEventListener("keydown",be,!0),()=>{document.removeEventListener("pointerdown",re,!0),document.removeEventListener("keydown",be,!0)}},[Kt]),o.jsx("div",{className:"context-panel-overlay settings-overlay",onClick:he,role:"presentation",children:o.jsxs("section",{"aria-label":"Seele settings",className:"context-panel settings-panel",onClick:re=>re.stopPropagation(),children:[o.jsxs("header",{className:"context-panel-header settings-panel-header",children:[o.jsxs("div",{className:"settings-panel-title",children:[o.jsx("h2",{children:"Settings"}),Xe!=="system"&&Xe!=="users"&&Xe!=="accounts"&&Xe!=="deployment"?o.jsxs("div",{"aria-label":"Configuration scope",className:"settings-scope-segments",role:"radiogroup",children:[t.role==="admin"?o.jsx("button",{"aria-checked":M==="global",className:M==="global"?"active":void 0,onClick:()=>Te("global"),role:"radio",type:"button",children:"Global"}):null,o.jsxs("div",{className:"settings-workspace-picker",ref:ve,children:[o.jsx("button",{"aria-checked":M==="workspace","aria-expanded":M==="workspace"?Kt:void 0,"aria-label":M==="workspace"?"Settings workspace target":void 0,className:M==="workspace"?"active settings-scope-workspace-trigger":void 0,disabled:n.length===0,onClick:()=>{if(M!=="workspace"){Te("workspace");return}Ln(re=>!re)},role:"radio",type:"button",children:M==="workspace"?o.jsxs(o.Fragment,{children:[o.jsxs("span",{children:["Workspace: ",(q==null?void 0:q.title)??"Select workspace"]}),o.jsx("span",{"aria-hidden":"true",children:"⌄"})]}):"Workspace"}),M==="workspace"&&Kt?o.jsx("div",{className:"settings-workspace-menu",role:"listbox",children:H.map(re=>o.jsxs("div",{className:"settings-workspace-menu-group",children:[o.jsx("div",{className:"settings-workspace-menu-heading",children:re.title}),re.conversations.map(be=>o.jsxs("button",{"aria-selected":be.id===L,className:be.id===L?"selected":void 0,onClick:()=>{Re(be.id),Ln(!1)},role:"option",type:"button",children:[o.jsx("span",{children:be.title}),o.jsxs("small",{children:["workspaces/",be.id]})]},be.id))]},re.id))}):null]})]}):null]}),o.jsx("div",{className:"settings-header-actions",children:o.jsx("button",{"aria-label":"Close settings panel",onClick:he,type:"button",children:"×"})})]}),o.jsxs("div",{className:"settings-body",children:[o.jsxs("nav",{className:"settings-nav","aria-label":"Settings sections",children:[o.jsxs("button",{className:Xe==="model"?"active":void 0,onClick:()=>Mt("model"),type:"button",children:[o.jsx("span",{children:"Runtime"}),o.jsx("small",{children:"Effective settings"})]}),o.jsxs("button",{className:Xe==="responsibility"?"active":void 0,onClick:()=>Mt("responsibility"),type:"button",children:[o.jsx("span",{children:"Responsibility"}),o.jsx("small",{children:"Workspace role"})]}),o.jsxs("button",{className:Xe==="memory"?"active":void 0,onClick:()=>Mt("memory"),type:"button",children:[o.jsx("span",{children:"Memory"}),o.jsx("small",{children:"Base + workspace context"})]}),o.jsxs("button",{className:Xe==="environment"?"active":void 0,onClick:()=>Mt("environment"),type:"button",children:[o.jsx("span",{children:"Environment"}),o.jsx("small",{children:"Base + workspace variables"})]}),t.role==="admin"?o.jsxs(o.Fragment,{children:[o.jsxs("button",{className:Xe==="accounts"?"active":void 0,onClick:()=>Mt("accounts"),type:"button",children:[o.jsx("span",{children:"Codex Accounts"}),o.jsx("small",{children:"Cloud login + active account"})]}),o.jsxs("button",{className:Xe==="channels"?"active":void 0,onClick:()=>Mt("channels"),type:"button",children:[o.jsx("span",{children:"Custom model channels"}),o.jsx("small",{children:"Endpoint + key + fixed model"})]}),o.jsxs("button",{className:Xe==="deployment"?"active":void 0,onClick:()=>Mt("deployment"),type:"button",children:[o.jsx("span",{children:"Deployment"}),o.jsx("small",{children:"Local integrations"})]}),o.jsxs("button",{onClick:()=>{window.location.assign(`${Y1()}admin/host`)},type:"button",children:[o.jsx("span",{children:"Work Operations"}),o.jsx("small",{children:"Versions, restart, logs"})]}),o.jsxs("button",{className:Xe==="system"?"active":void 0,onClick:()=>Mt("system"),type:"button",children:[o.jsx("span",{children:"System"}),o.jsx("small",{children:"Runtime + resources"})]}),o.jsxs("button",{className:Xe==="users"?"active":void 0,onClick:()=>Mt("users"),type:"button",children:[o.jsx("span",{children:"Users"}),o.jsx("small",{children:"Access + roles"})]})]}):null]}),o.jsxs("section",{className:"settings-content",children:[Xe!=="system"&&Xe!=="users"&&Xe!=="accounts"&&Xe!=="channels"&&Xe!=="deployment"?o.jsxs("div",{className:`settings-scope-banner ${M==="workspace"?"workspace":"global"}`,children:[o.jsx("strong",{children:M==="workspace"?"Editing workspace custom settings":"Editing global settings"}),o.jsx("span",{children:M==="workspace"?`${(q==null?void 0:q.title)??"Selected workspace"} overrides global defaults.`:"These defaults apply to every workspace unless that workspace overrides them."})]}):null,Xe==="system"?o.jsx(jN,{conversations:n,diagnostics:K,loading:P,onRefresh:de}):Xe==="users"?o.jsx(RN,{currentUser:t,users:g,onCreate:me,onDelete:Ae,onUpdate:ie}):Xe==="channels"?t.role==="admin"?o.jsx(iE,{load:jD,save:AD,queryBalance:TD}):null:Xe==="accounts"?t.role==="admin"?o.jsx(zN,{onSwitched:z}):null:Xe==="deployment"?o.jsx(ON,{settings:a,onSave:ye}):Xe==="model"?o.jsx(IN,{enabled:M==="global",models:x,workspaceDirty:JSON.stringify(O)!==JSON.stringify(k),children:o.jsx(Cx,{draft:M==="workspace"?J:O,globalSettings:k,models:x,codexVersion:C,codexReleasedAt:D,codexUpdating:R,scope:M,workspaceOverrideCount:Le,settings:M==="workspace"?(X==null?void 0:X.effective)??J:k,workspaceSettings:X,onDraftChange:M==="workspace"?Ee:ee,onResetWorkspaceSetting:Oe,onSubmit:He,onUpdateCodexCli:te})}):Xe==="responsibility"?o.jsx(AN,{draft:Vn,saving:Xt,scope:M,workspace:q,onDraftChange:Un,onSubmit:re=>{re.preventDefault(),re.stopPropagation(),!(M!=="workspace"||!q)&&(pr(!0),oe(q.id,Vn).then(be=>Un(be)).finally(()=>pr(!1)))}}):Xe==="memory"?o.jsx(LN,{baseSettings:h,scope:M,workspaceSettings:y,workspaceName:q==null?void 0:q.title,onSaveBaseItems:ge,onSaveWorkspaceItems:U}):o.jsx(UN,{deleteConfirmKey:Jn,editingEnvironmentKey:l,environmentDraft:u,globalEnvironment:c,scope:M,workspaceEnvironment:f,valueVisible:qn,onCancelEnvironmentEdit:F,onDeleteConfirmChange:er,onDeleteEnvironment:je,onDraftChange:pe,onEditEnvironment:Z,onRevealEnvironmentValue:B,onSubmitEnvironment:rt,onValueVisibleChange:ra,revealedEnvironmentKeys:Pe})]})]})]})})}function jN({conversations:e,diagnostics:t,loading:n,onRefresh:a}){const l=(t==null?void 0:t.runtime.pool)??null,u=A.useMemo(()=>(t==null?void 0:t.systemLogs)??[],[t]),[c,f]=A.useState(!1),h=A.useMemo(()=>new Map(e.map(x=>[x.id,x.title])),[e]),m=A.useMemo(()=>t?JSON.stringify({generatedAt:t.generatedAt,app:t.app,systemLogs:u},null,2):"",[t,u]),g=async()=>{m&&(await navigator.clipboard.writeText(m),f(!0),window.setTimeout(()=>f(!1),1800))},y=()=>{if(!m||!t)return;const x=URL.createObjectURL(new Blob([m],{type:"application/json"})),C=document.createElement("a");C.href=x,C.download=`seele-system-log-${t.generatedAt.replaceAll(":","-").replaceAll(".","-")}.json`,C.click(),URL.revokeObjectURL(x)},k=()=>{if(!t||!u.length)return;const x=u[0],C=u.slice(0,5).map(q=>`- ${Ki(q.createdAt)} · ${q.level.toUpperCase()} · ${q.event} · ${q.summary}`).join(`
364
- `),D=JSON.stringify(x,null,2),R=["## Environment","",`- Seele: ${t.app.version}`,`- Runtime: ${t.app.runtime}`,`- Report generated: ${Ki(t.generatedAt)}`,"","## Latest incident","","```json",D.slice(0,2500),"```","","## Recent system log","",C,"","_Generated by Seele System Log. Attach the downloaded JSON report when more history is needed._"].join(`
365
- `),O=`[System Log] ${x.summary}`.slice(0,180),M=new URL("https://github.com/seele-labs/seele-work/issues/new");M.searchParams.set("title",O),M.searchParams.set("body",R),window.open(M.toString(),"_blank","noopener,noreferrer")};return o.jsxs("section",{className:"system-information-section",children:[o.jsxs("header",{className:"settings-section-header",children:[o.jsxs("div",{children:[o.jsx("h3",{children:"System"}),o.jsx("p",{children:"Read-only runtime and resource information managed by Seele."})]}),o.jsx("button",{className:"system-information-refresh",disabled:n,onClick:a,type:"button",children:n?"Refreshing...":"Refresh"})]}),l?o.jsxs(o.Fragment,{children:[o.jsxs("dl",{className:"system-information-summary",children:[o.jsxs("div",{children:[o.jsx("dt",{children:"LRU pool target"}),o.jsxs("dd",{children:[Rr(l.maxRetainedRuntimes)," runtimes"]}),o.jsx("small",{children:l.capacitySource==="system_memory"?"Idle runtimes are released by least recent use":"Fallback target because system memory was unavailable"})]}),o.jsxs("div",{children:[o.jsx("dt",{children:"Retention policy"}),o.jsxs("dd",{children:["LRU · ",gp(l.maxIdleSeconds*1e3)," max idle"]}),o.jsx("small",{children:"Only idle runtimes are eligible for eviction"})]}),o.jsxs("div",{children:[o.jsx("dt",{children:"Current pool"}),o.jsxs("dd",{children:[l.activeRuntimeCount," active · ",l.idleRuntimeCount," idle"]}),o.jsxs("small",{children:[l.retainedRuntimeCount," retained runtimes"]})]})]}),o.jsxs("section",{className:"system-runtime-list",children:[o.jsxs("header",{children:[o.jsxs("div",{children:[o.jsx("h4",{children:"Workspace runtimes"}),o.jsx("p",{children:"Active workspaces and idle runtimes currently retained for reuse."})]}),o.jsx("time",{dateTime:t==null?void 0:t.generatedAt,children:t?ut(t.generatedAt):""})]}),l.workspaces.length>0?o.jsxs("div",{className:"system-runtime-table",children:[o.jsxs("div",{className:"system-runtime-table-header",children:[o.jsx("span",{children:"Workspace"}),o.jsx("span",{children:"Status"}),o.jsx("span",{children:"Runtime"}),o.jsx("span",{children:"Age"})]}),l.workspaces.map(x=>o.jsxs("div",{className:"system-runtime-row",children:[o.jsxs("div",{children:[o.jsx("strong",{children:h.get(x.workspaceId)??x.workspaceId}),o.jsx("small",{children:x.workspaceId})]}),o.jsx("span",{className:`system-runtime-state ${x.turnId?"active":"idle"}`,children:x.lifecycle==="shutting_down"?"Shutting down":x.turnId?"Active":"Idle"}),o.jsxs("div",{children:[o.jsx("span",{children:x.turnId?x.state:"Retained"}),o.jsx("small",{children:x.pid===null?"PID unavailable":`PID ${x.pid}`})]}),o.jsx("span",{children:x.idleMs===null?gp(x.uptimeMs):`${gp(x.idleMs)} idle`})]},x.workspaceId))]}):o.jsx("div",{className:"system-runtime-empty",children:"No workspace runtimes are currently retained."})]}),o.jsxs("section",{className:"system-runtime-list system-log-list",children:[o.jsxs("header",{children:[o.jsxs("div",{children:[o.jsx("h4",{children:"System log"}),o.jsx("p",{children:"Recent persistent warnings and errors for external diagnostics."})]}),o.jsxs("div",{className:"system-log-actions",children:[o.jsx("button",{"aria-label":"Copy system log report",className:"icon-button",disabled:!u.length,onClick:()=>void g(),title:"Copy system log report",type:"button",children:o.jsx(J1,{})}),o.jsx("button",{"aria-label":"Download system log report",className:"icon-button",disabled:!u.length,onClick:y,title:"Download system log report",type:"button",children:o.jsx(CN,{})}),o.jsx("button",{"aria-label":"Report system log issue",className:"icon-button",disabled:!u.length,onClick:k,title:"Report issue to seele-labs/seele-work",type:"button",children:o.jsx(TN,{})}),c?o.jsx("small",{children:"Copied"}):null]})]}),u.length?o.jsx("div",{className:"system-log-entries",children:u.map(x=>o.jsxs("details",{className:`system-log-entry ${x.level}`,children:[o.jsxs("summary",{children:[o.jsx("span",{className:"system-log-level",children:x.level}),o.jsxs("span",{children:[o.jsx("strong",{children:x.summary}),o.jsxs("small",{children:[x.component," · ",Ki(x.createdAt)]})]})]}),o.jsxs("dl",{children:[o.jsxs("div",{children:[o.jsx("dt",{children:"Event"}),o.jsx("dd",{children:x.event})]}),x.workspaceId?o.jsxs("div",{children:[o.jsx("dt",{children:"Workspace"}),o.jsxs("dd",{children:[h.get(x.workspaceId)??x.workspaceId," · ",x.workspaceId]})]}):null,x.turnId?o.jsxs("div",{children:[o.jsx("dt",{children:"Turn"}),o.jsx("dd",{children:x.turnId})]}):null,x.runtimeId?o.jsxs("div",{children:[o.jsx("dt",{children:"Runtime"}),o.jsx("dd",{children:x.runtimeId})]}):null]}),o.jsx("pre",{children:JSON.stringify(x.detail,null,2)})]},x.id))}):o.jsx("div",{className:"system-runtime-empty",children:"No warnings or errors have been recorded."})]})]}):o.jsx("div",{className:"system-runtime-empty",children:n?"Loading system information...":"System information is unavailable."})]})}function CN(){return o.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",children:o.jsx("path",{d:"M12 3v12m0 0 4-4m-4 4-4-4M5 20h14"})})}function TN(){return o.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",children:[o.jsx("circle",{cx:"12",cy:"12",r:"9"}),o.jsx("path",{d:"M12 7v6m0 4h.01"})]})}function AN({draft:e,saving:t,scope:n,workspace:a,onDraftChange:l,onSubmit:u}){const c=n==="workspace";return o.jsxs(o.Fragment,{children:[o.jsx("header",{className:"settings-section-header",children:o.jsxs("div",{children:[o.jsx("h3",{children:"Responsibility"}),o.jsx("p",{children:"Workspace-specific long-lived role. This is content context, so it is only editable in workspace scope."})]})}),c&&a?o.jsxs("form",{className:"settings-responsibility-form",onSubmit:u,children:[o.jsxs("label",{children:[o.jsx("span",{children:a.title}),o.jsx("textarea",{"aria-label":"Workspace responsibility",onChange:f=>l(f.target.value),placeholder:"Describe this workspace's durable role, scope, and long-term responsibilities.",rows:14,value:e})]}),o.jsx("div",{className:"settings-form-actions",children:o.jsx("button",{disabled:t,type:"submit",children:t?"Saving...":"Save responsibility"})})]}):o.jsx("section",{className:"settings-readonly-block",children:o.jsxs("div",{children:[o.jsx("strong",{children:"Workspace-only setting"}),o.jsx("span",{children:"Switch the header scope to Workspace and choose a workspace to edit its responsibility."})]})})]})}function EN({usage:e}){return o.jsx("div",{"aria-label":"Codex account usage",className:"codex-account-usage",children:[...e.windows].sort((t,n)=>t.windowDurationMins-n.windowDurationMins).map(t=>{const n=Bf(t.usedPercent),a=Ex(t.windowDurationMins);return o.jsxs("div",{className:"codex-account-usage-window",children:[o.jsx("div",{className:"codex-account-usage-heading",children:o.jsxs("span",{children:[a," used ",o.jsxs("small",{children:["(Resets ",sb(t.resetsAt),")"]})]})}),o.jsxs("div",{className:"codex-account-usage-meter",children:[o.jsx("span",{"aria-hidden":"true",className:"codex-account-usage-track",children:o.jsx("span",{style:{width:`${n}%`}})}),o.jsx("strong",{children:lb(n)})]})]},`${t.windowDurationMins}:${t.resetsAt}`)})})}function NN(e){if(!e)return null;const t=e.toLowerCase();return t==="chatgpt"?"ChatGPT":t==="apikey"||t==="api_key"?"API key":e}function MN(e){return e?e.split(/[_-]/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" "):null}function DN({onOpen:e}){const[t,n]=A.useState(null);A.useEffect(()=>{let u=!1,c;const f=async()=>{try{const h=await Qd();u||n(h)}catch{}finally{u||(c=window.setTimeout(()=>void f(),6e4))}};return f(),()=>{u=!0,window.clearTimeout(c)}},[]);const a=(t==null?void 0:t.accounts.filter(u=>{var f,h;const c=(h=(f=t.credentialStatus)==null?void 0:f[u.id])==null?void 0:h.renewal;return(c==null?void 0:c.statusUnavailable)||(c==null?void 0:c.requiresReauthentication)||((c==null?void 0:c.consecutiveFailures)??0)>=4}))??[];if(!a.length)return null;const l=a.some(u=>{var f,h,m,g,y;const c=(h=(f=t==null?void 0:t.credentialStatus)==null?void 0:f[u.id])==null?void 0:h.accessTokenExpiresAt;return((y=(g=(m=t==null?void 0:t.credentialStatus)==null?void 0:m[u.id])==null?void 0:g.renewal)==null?void 0:y.requiresReauthentication)||!c||Date.parse(c)-Date.now()<=48*36e5});return o.jsxs("button",{type:"button",role:"alert",style:{margin:"8px",padding:"8px",textAlign:"left",borderRadius:8,border:`1px solid ${l?"#fecaca":"#fde68a"}`,background:l?"#fef2f2":"#fffbeb",color:l?"#991b1b":"#92400e",fontSize:12,cursor:"pointer"},onClick:e,title:a.map(u=>u.name).join("、"),children:["⚠ ",a.length," 个账号自动续期异常。",l?"请及时检查或重新登录。":"","查看 Codex Accounts →"]})}function zN({onSwitched:e}){var Ln,Vn,Un,Xt,pr,ve,Le;const[t,n]=A.useState(null),[a,l]=A.useState(!1),[u,c]=A.useState(!0),[f,h]=A.useState(!1),[m,g]=A.useState(!1),[y,k]=A.useState(!1),[x,C]=A.useState(""),[D,R]=A.useState(""),[O,M]=A.useState(!1),[q,L]=A.useState(""),[K,P]=A.useState(null),[H,X]=A.useState(null),[J,F]=A.useState(""),[he,me]=A.useState(()=>new Date);A.useEffect(()=>{const re=window.setInterval(()=>me(new Date),3e4);return()=>window.clearInterval(re)},[]);const[Ae,je]=A.useState(""),[pe,Z]=A.useState(null),[ge,ye]=A.useState(""),[oe,U]=A.useState(null),[B,ee]=A.useState(!1),[z,te]=A.useState(""),[Te,Re]=A.useState(null),He=A.useRef(new Map);async function rt(re,be){if(m||f||!window.confirm(`Use one reset credit for ${re.name}? This consumes the credit if an eligible rate-limit window is reset.`))return;const qe=JSON.stringify([re.id,be.id]),Ge=He.current.get(qe)??crypto.randomUUID();He.current.set(qe,Ge),g(!0),R(""),te("");try{const lt=Ne(`settings/runtime/accounts/${encodeURIComponent(re.id)}/reset-credits/consume`),Ct=await fetch(lt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({creditId:be.id,idempotencyKey:Ge})});await Ve(Ct,{method:"POST",url:lt});const gt=await Ct.json(),xt={reset:"Reset credit used. Eligible rate limits have been reset.",alreadyRedeemed:"This reset was already completed.",nothingToReset:"No rate-limit window needs a reset. No credit was used.",noCredit:"No reset credit is available for this account."}[gt.outcome];if(!xt)throw new Error("Reset outcome is unknown. Refresh details before trying again.");(gt.outcome==="nothingToReset"||gt.outcome==="noCredit")&&He.current.delete(qe),te(`${re.name}: ${xt}`),n(Ut=>{if(!Ut)return Ut;const Zt={...Ut.accountDetails};return delete Zt[re.id],{...Ut,accountDetails:Zt}});try{const Ut=await Av(!0);n(Zt=>ap(Zt,Ut))}catch{R("The result above is confirmed, but refreshing details failed. Please refresh details.")}}catch(lt){R(`${dt(lt).message} The outcome may be unknown; retrying this credit on this page reuses the same request ID.`)}finally{g(!1)}}async function de(){var be;const re=await Qd();n(re),l(re.managementAllowed===!0),re.managementAllowed===!0&&((be=re.login)==null?void 0:be.status)==="pending"&&(P(re.login),M(!0))}async function ie(re){h(!0),R("");try{const be=await Av(re);n(qe=>ap(qe,be))}catch(be){R(dt(be).message)}finally{h(!1)}}A.useEffect(()=>{let re=!1;return Qd().then(be=>{var qe;re||(n(be),l(be.managementAllowed===!0),be.managementAllowed===!0&&((qe=be.login)==null?void 0:qe.status)==="pending"&&(P(be.login),M(!0)))}).catch(be=>{re||R(dt(be).message)}).finally(()=>{re||c(!1)}),()=>{re=!0}},[]),A.useEffect(()=>{let re=!1,be=!1;const qe=window.setInterval(()=>{be||m||f||(be=!0,Qd().then(Ge=>{re||n(lt=>{const Ct=ap(lt,Ge),gt=Object.fromEntries(Ge.accounts.map(nt=>[nt.id,Ct.accountDetails[nt.id]??Ge.accountDetails[nt.id]]).filter(([,nt])=>nt!=null));return{...Ge,accountDetails:gt}})}).catch(Ge=>{re||R(dt(Ge).message)}).finally(()=>{be=!1}))},15e3);return()=>{re=!0,window.clearInterval(qe)}},[m,f]),A.useEffect(()=>{if(!K||K.status!=="pending")return;let re=!1;const be=window.setInterval(()=>{RD(K.id).then(async qe=>{re||(P(qe),qe.status!=="pending"&&(window.clearInterval(be),qe.status==="succeeded"&&(n(Ge=>{if(!Ge||!qe.account)return Ge;const lt=Ge.accounts.some(Ct=>{var gt;return Ct.id===((gt=qe.account)==null?void 0:gt.id)})?Ge.accounts.map(Ct=>{var gt;return Ct.id===((gt=qe.account)==null?void 0:gt.id)?qe.account:Ct}):[...Ge.accounts,qe.account];return{...Ge,accounts:lt}}),await de())))}).catch(qe=>{re||R(dt(qe).message)})},1e3);return()=>{re=!0,window.clearInterval(be)}},[K==null?void 0:K.id,K==null?void 0:K.status]);function Ee(){L(""),P(null),R(""),ee(!1),M(!0)}async function Oe(re){re.preventDefault(),g(!0),R("");try{P(await zD(q.trim()))}catch(be){R(dt(be).message)}finally{g(!1)}}async function Pe(){if(!K||K.status!=="pending"){M(!1);return}g(!0),R("");try{const re=await OD(K.id);P(re),M(!1)}catch(re){R(dt(re).message)}finally{g(!1)}}function Xe(re){X(re),F(re.renewalDay==null?"":String(re.renewalDay)),je(re.name),R(""),C("")}async function Mt(re){g(!0),k(!0),R(""),C("");try{const be=Ne(`settings/runtime/accounts/${encodeURIComponent(re.id)}/renew`),qe=await fetch(be,{method:"POST"});await Ve(qe,{method:"POST",url:be});const Ge=await qe.json();n(Ge.snapshot),Ge.renewal.lastError?R(Ge.renewal.lastError):C("令牌已续期,账号选择和其他配置未改变。")}catch(be){R(dt(be).message)}finally{g(!1),k(!1)}}async function qn(re){g(!0),R("");try{const be=Ne(`settings/runtime/accounts/${encodeURIComponent(re.id)}/reauthenticate`),qe=await fetch(be,{method:"POST"});await Ve(qe,{method:"POST",url:be});const Ge=await qe.json();P(Ge.login),X(null),ee(!1),M(!0)}catch(be){R(dt(be).message)}finally{g(!1)}}async function ra(re){if(re.preventDefault(),!H)return;const be=Ae.trim();if(!be){X(null);return}g(!0),R("");try{await ID(H.id,be,J===""?null:Number(J)),await de(),X(null)}catch(qe){R(dt(qe).message)}finally{g(!1)}}async function Jn(){if(pe){g(!0),R("");try{const re=await LD(pe.id);n(re),Z(null),ye("Account selection saved. Each deployment applies it to new requests after syncing; active turns are unchanged."),e().catch(()=>{ye("Account selection saved. Refreshing local status failed; deployment synchronization will continue in the background.")})}catch(re){const be=dt(re);R(be.detail??be.message)}finally{g(!1)}}}async function er(){if(oe){g(!0),R("");try{await _D(oe.id),await de(),U(null)}catch(re){R(dt(re).detail??dt(re).message)}finally{g(!1)}}}const Kt=(t==null?void 0:t.accounts)??[];return o.jsxs("section",{className:"settings-section codex-accounts-section",children:[o.jsxs("header",{className:"settings-section-header",children:[o.jsxs("div",{children:[o.jsx("h3",{children:"Codex Accounts"}),o.jsx("p",{children:"Manage the cloud-owned Codex logins. Every deployment uses the same globally active account; workspaces do not bind to accounts."})]}),o.jsx("div",{className:"codex-account-toolbar",children:a?o.jsxs(o.Fragment,{children:[o.jsx("button",{className:"codex-account-add",disabled:m||f||Kt.length===0,onClick:()=>void ie(!0),type:"button",children:f?"Refreshing...":"Refresh details"}),o.jsx("button",{className:"codex-account-add",disabled:m||f||(K==null?void 0:K.status)==="pending",onClick:Ee,type:"button",children:"Add account"})]}):o.jsx("button",{className:"codex-account-add",disabled:u,onClick:()=>void de().catch(re=>R(dt(re).message)),type:"button",children:"刷新列表"})})]}),!u&&!a?o.jsx("p",{className:"settings-note",role:"status",children:"当前部署只读。新增、删除、切换、登录、续期及使用重置券,请在云端 Work 操作。"}):null,o.jsxs("div",{className:"codex-account-policy",children:[o.jsx("strong",{children:"Cloud-wide account selection"}),o.jsx("span",{children:"Active turns keep their original account. Each deployment uses the selected account for new requests after syncing, without pausing existing work. There is no per-deployment selection."})]}),ge?o.jsx("p",{className:"settings-note",role:"status",children:ge}):null,D?o.jsx("p",{className:"memory-editor-error",children:D}):null,u?o.jsx("p",{className:"settings-note",children:"Loading Codex accounts..."}):null,!u&&Kt.length===0?o.jsx("p",{className:"settings-note",children:"No persisted Codex account. Add one with the official device login flow."}):null,o.jsx("div",{className:"codex-account-list",children:Kt.map(re=>{var aa,fi,Ia,Ir,wa;const be=(t==null?void 0:t.activeAccountId)===re.id,qe=eE(re.renewalDay,he),Ge=(aa=t==null?void 0:t.accountDetails)==null?void 0:aa[re.id],lt=(fi=t==null?void 0:t.credentialStatus)==null?void 0:fi[re.id],Ct=lt==null?void 0:lt.accessTokenExpiresAt,gt=Ct?Date.parse(Ct):NaN,nt=Math.ceil((gt-he.getTime())/864e5),xt=((Ia=t==null?void 0:t.accountIssues)==null?void 0:Ia[re.id])??[],Ut=xt.length>0,Zt=xt.some(Jt=>["missing_credential","invalid_credential","credential_unreadable"].includes(Jt.code)),tl=[re.email,NN(re.accountType),MN(re.planType)].filter(Jt=>!!Jt);return o.jsxs("article",{className:`codex-account-card${be?" active":""}${Ut?" issue":""}`,children:[o.jsxs("div",{className:"codex-account-main",children:[o.jsxs("div",{className:"codex-account-title",children:[o.jsx("strong",{children:re.name}),be?o.jsx("span",{className:"codex-account-active",children:"Selected"}):null,Ut?o.jsx("span",{className:"codex-account-warning",children:"Needs attention"}):null]}),o.jsxs("small",{children:[tl.join(" · ")||`Added ${ut(re.createdAt)}`,qe?o.jsxs("span",{title:`按手动设置的每月 ${re.renewalDay} 日计算(北京时间),下次 ${qe.date}`,children:[" · ",qe.days===0?"今日续费":`距续费 ${qe.days} 天`]}):null,Number.isFinite(gt)?o.jsxs("span",{className:nt<=3?"codex-account-warning":"",title:`访问令牌到期:${ut(Ct)}(北京时间)。${lt!=null&&lt.lastRefreshedAt?`上次续期:${ut(lt.lastRefreshedAt)}。`:""}访问令牌可自动续期;到期不等于账号或订阅失效。若刷新持续失败,请在 Edit 中重新登录。`,children:[" · ",gt<=he.getTime()?"访问令牌已到期":`令牌 ${nt} 天后到期`]}):re.accountType==="chatgpt"?o.jsx("span",{title:"无法从已保存凭据读取有效期,不代表账号已失效",children:" · 令牌有效期未知"}):null,(Ir=lt==null?void 0:lt.renewal)!=null&&Ir.lastError?o.jsxs("span",{className:lt.renewal.requiresReauthentication||lt.renewal.consecutiveFailures>=4?"codex-account-detail-error":"codex-account-warning",style:lt.renewal.requiresReauthentication||lt.renewal.consecutiveFailures>=4?{color:"#b91c1c",fontWeight:600}:void 0,title:`${lt.renewal.lastError};连续失败 ${lt.renewal.consecutiveFailures} 次;最近尝试 ${lt.renewal.lastAttemptAt?ut(new Date(lt.renewal.lastAttemptAt*1e3).toISOString()):"未知"};下次重试 ${lt.renewal.nextAttemptAt?ut(new Date(lt.renewal.nextAttemptAt*1e3).toISOString()):"待定"}(北京时间)`,children:[" · ",lt.renewal.statusUnavailable?"续期状态不可用":lt.renewal.requiresReauthentication?"需要重新登录":lt.renewal.consecutiveFailures>=4?"自动续期异常":"续期重试中"]}):null]}),Ut?o.jsx("div",{className:"codex-account-issues",role:"status",children:xt.map(Jt=>o.jsx("span",{children:Jt.message},Jt.code))}):null,Ge!=null&&Ge.usage?o.jsx(EN,{usage:Ge.usage}):o.jsx("span",{className:"codex-account-usage-empty",children:f?"Reading account usage...":"Usage unavailable"}),Ge?o.jsxs("small",{className:Ge.error?"codex-account-detail-error":"codex-account-refreshed",children:[(wa=Ge.usage)!=null&&wa.updatedAt?`Updated ${ut(Ge.usage.updatedAt)}`:`Checked ${ut(Ge.refreshedAt)}`,Ge.error?` · Refresh issue: ${Ge.error}`:""]}):null]}),o.jsxs("div",{className:"codex-account-actions",children:[o.jsxs("button",{className:"codex-credit-count",type:"button",disabled:m,"aria-label":`${re.name}(${Ge!=null&&Ge.error||!(Ge!=null&&Ge.rateLimitResetCredits)?"券数量未知":`${Ge.rateLimitResetCredits.availableCount} 张可用券`})`,title:`${re.name}(${Ge!=null&&Ge.error||!(Ge!=null&&Ge.rateLimitResetCredits)?"券数量未知":`${Ge.rateLimitResetCredits.availableCount} 张可用券`})`,onClick:()=>{Re(re.id),te(""),R("")},children:[o.jsxs("svg",{"aria-hidden":"true",width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",children:[o.jsx("path",{d:"M3 5h18v5a2 2 0 0 0 0 4v5H3v-5a2 2 0 0 0 0-4V5Z"}),o.jsx("path",{d:"M16 5v3m0 3v2m0 3v3"})]}),o.jsx("span",{children:Ge!=null&&Ge.error||!(Ge!=null&&Ge.rateLimitResetCredits)?"—":Ge.rateLimitResetCredits.availableCount})]}),a?o.jsxs(o.Fragment,{children:[o.jsx("button",{disabled:m||f||Zt,onClick:()=>Xe(re),title:Zt?"Sign in again or delete this account to replace its credential.":void 0,type:"button",children:Ut?"Repair & edit":"Edit"}),o.jsx("button",{disabled:m||be||Ut,onClick:()=>{R(""),Z(re)},type:"button",children:Ut?"Unavailable":"Switch"}),o.jsx("button",{className:"danger",disabled:m||f||be,onClick:()=>{R(""),U(re)},type:"button",children:"Delete"})]}):null]})]},re.id)})}),Te&&Kt.some(re=>re.id===Te)?o.jsxs("dialog",{className:"memory-editor-popover codex-credit-dialog","aria-label":"Rate-limit reset credits",ref:re=>{re&&!re.open&&re.showModal()},onCancel:re=>{re.preventDefault(),m||Re(null)},children:[o.jsxs("header",{children:[o.jsx("strong",{children:"Rate-limit reset credits"}),o.jsx("button",{autoFocus:!0,className:"memory-icon-button",type:"button","aria-label":"Close reset credits",disabled:m,onClick:()=>Re(null),children:"×"})]}),z?o.jsx("p",{className:"settings-note",role:"status",children:z}):null,D?o.jsx("p",{className:"memory-editor-error",role:"alert",children:D}):null,Kt.filter(re=>re.id===Te).map(re=>{var Ge,lt,Ct,gt;const be=(Ge=t==null?void 0:t.accountDetails)==null?void 0:Ge[re.id],qe=be==null?void 0:be.rateLimitResetCredits;return o.jsxs("article",{className:"codex-credit-group",children:[o.jsxs("div",{className:"codex-credit-group-heading",children:[o.jsx("strong",{children:re.name}),o.jsx("span",{children:be!=null&&be.error?"Unavailable":qe?`${qe.availableCount} available`:f?"Loading...":"Unavailable"})]}),qe?qe.availableCount===0&&!((lt=qe.credits)!=null&&lt.length)?o.jsx("small",{children:"No reset credits available."}):null:o.jsx("small",{children:"Credit details unavailable. Refresh details to try again."}),o.jsx("div",{className:"codex-credit-grid",children:(Ct=qe==null?void 0:qe.credits)==null?void 0:Ct.map(nt=>{var tl,aa;const xt=nt.expiresAt!==null&&nt.expiresAt*1e3<=he.getTime(),Ut=nt.status==="available"&&!xt,Zt=xt&&nt.status==="available"?"Expired":nt.status;return o.jsxs("article",{className:`codex-credit-ticket${Ut?"":" inactive"}`,"aria-label":`${re.name}: ${nt.title||"Rate-limit reset"}`,children:[o.jsxs("div",{className:"codex-credit-ticket-heading",children:[o.jsx("strong",{title:nt.title||"Rate-limit reset",children:nt.title||"Rate-limit reset"}),o.jsx("span",{className:"codex-credit-badge",children:Ut?"1 use":Zt})]}),o.jsx("small",{children:nt.expiresAt===null?"No expiry":`Expires ${ut(new Date(nt.expiresAt*1e3).toISOString())}`}),o.jsxs("div",{className:"codex-credit-ticket-actions",children:[o.jsxs("details",{children:[o.jsx("summary",{children:"Details"}),nt.description?o.jsx("p",{children:nt.description}):null,o.jsxs("p",{children:["Single-use credit · ",Zt]}),o.jsxs("p",{children:["Granted ",ut(new Date(nt.grantedAt*1e3).toISOString())]}),nt.resetType!=="codexRateLimits"?o.jsx("p",{children:"This credit type is not supported."}):null]}),a?o.jsx("button",{className:"codex-account-add codex-credit-use",type:"button",disabled:m||f||!!(be!=null&&be.error)||!Ut||nt.resetType!=="codexRateLimits"||!!((aa=(tl=t==null?void 0:t.accountIssues)==null?void 0:tl[re.id])!=null&&aa.length),onClick:()=>void rt(re,nt),children:"Use"}):null]})]},nt.id)})}),qe&&qe.availableCount>(((gt=qe.credits)==null?void 0:gt.length)??0)?o.jsx("small",{children:"Credit details unavailable for some credits. Refresh details to use them."}):null,be!=null&&be.error?o.jsxs("small",{className:"codex-credit-error",children:["Refresh issue: ",be.error]}):null]},re.id)}),a?o.jsx("footer",{className:"memory-editor-actions",children:o.jsx("button",{type:"button",className:"memory-dialog-button",disabled:m||f,onClick:()=>void ie(!0),children:f?"Refreshing...":"Refresh details"})}):null]}):null,H?o.jsx("div",{className:"memory-editor-overlay",onClick:()=>!m&&X(null),role:"presentation",children:o.jsxs("form",{"aria-label":"Edit Codex account",className:"memory-editor-popover codex-account-login-dialog",onClick:re=>re.stopPropagation(),onSubmit:re=>void ra(re),children:[o.jsxs("header",{children:[o.jsx("strong",{children:"Edit Codex Account"}),o.jsx("button",{"aria-label":"Close account editor",className:"memory-icon-button",disabled:m,onClick:()=>X(null),type:"button",children:"×"})]}),o.jsx("p",{className:"settings-note",children:"This name is only a Seele label. It does not change the Codex login or credential."}),o.jsxs("label",{children:[o.jsx("span",{children:"Account name"}),o.jsx("input",{"aria-label":"Codex account name",autoFocus:!0,maxLength:80,onChange:re=>je(re.target.value),value:Ae})]}),o.jsxs("label",{children:[o.jsx("span",{children:"每月续费日"}),o.jsxs("select",{"aria-label":"每月续费日",value:J,title:"按北京时间计算;不足对应日期的月份按月末计算",onChange:re=>F(re.target.value),children:[o.jsx("option",{value:"",children:"未设置"}),Array.from({length:31},(re,be)=>be+1).map(re=>o.jsxs("option",{value:re,children:[re," 日"]},re))]})]}),D?o.jsx("p",{className:"memory-editor-error",children:D}):null,o.jsxs("div",{className:"memory-editor-actions",children:[x?o.jsx("span",{role:"status",children:x}):null,H.accountType==="chatgpt"?o.jsx("button",{className:"memory-dialog-button",disabled:m,onClick:()=>void Mt(H),type:"button",children:y?"续期中…":"立即续期"}):null,o.jsx("button",{className:"memory-dialog-button",disabled:m||((Ln=t==null?void 0:t.login)==null?void 0:Ln.status)==="pending",onClick:()=>void qn(H),type:"button",children:"重新登录"}),o.jsx("button",{className:"memory-dialog-button",disabled:m,onClick:()=>X(null),type:"button",children:"Cancel"}),o.jsx("button",{className:"memory-dialog-button primary",disabled:m||!Ae.trim(),type:"submit",children:m?"Saving...":"Save"})]}),(Xt=(Un=(Vn=t==null?void 0:t.credentialStatus)==null?void 0:Vn[H.id])==null?void 0:Un.renewal)!=null&&Xt.lastResponse?o.jsxs("details",{children:[o.jsx("summary",{children:"最近续期响应(凭据已脱敏)"}),o.jsx("button",{className:"memory-dialog-button",type:"button",onClick:()=>{var re,be,qe;navigator.clipboard.writeText(JSON.stringify((qe=(be=(re=t.credentialStatus)==null?void 0:re[H.id])==null?void 0:be.renewal)==null?void 0:qe.lastResponse,null,2)).then(()=>C("已复制脱敏响应")).catch(()=>R("复制失败,请手动选择响应内容复制"))},children:"复制响应"}),o.jsx("pre",{style:{maxHeight:280,overflow:"auto",whiteSpace:"pre-wrap",overflowWrap:"anywhere"},children:JSON.stringify((ve=(pr=t.credentialStatus[H.id])==null?void 0:pr.renewal)==null?void 0:ve.lastResponse,null,2)})]}):null]})}):null,O?o.jsx("div",{className:"memory-editor-overlay",onClick:()=>!m&&!K&&M(!1),role:"presentation",children:K?o.jsxs("section",{"aria-label":"Complete Codex account login",className:"memory-delete-dialog codex-account-login-dialog",onClick:re=>re.stopPropagation(),children:[o.jsxs("header",{children:[o.jsx("strong",{children:K.reauthenticateAccountId?K.status==="succeeded"?"账号登录已更新":"重新登录 Codex 账号":K.status==="succeeded"?"Account Added":"Complete Codex Login"}),o.jsx("button",{"aria-label":"Close account login",className:"memory-icon-button",disabled:m,onClick:()=>void Pe(),type:"button",children:"×"})]}),K.status==="pending"?o.jsxs(o.Fragment,{children:[o.jsx("p",{children:"Open the official Codex device page and enter this one-time code."}),K.reauthenticateAccountId?o.jsxs("p",{children:["请登录 ",o.jsx("strong",{children:K.accountName})," 对应的原 ChatGPT 用户和 workspace。成功后仅更新凭据,保留名称、续费日和当前账号选择;尚未保存的编辑不会提交。"]}):null,o.jsxs("div",{className:"codex-device-code",children:[o.jsx("strong",{children:K.userCode}),o.jsx("button",{onClick:()=>{navigator.clipboard.writeText(K.userCode),ee(!0),window.setTimeout(()=>ee(!1),1500)},type:"button",children:B?"Copied":"Copy code"})]}),o.jsx("a",{href:K.verificationUrl,rel:"noreferrer",target:"_blank",children:"Open Codex device login"}),o.jsx("small",{className:"codex-login-waiting",children:"Waiting for Codex to confirm the login..."})]}):K.status==="succeeded"?o.jsxs("p",{children:[o.jsx("strong",{children:((Le=K.account)==null?void 0:Le.name)??K.accountName})," is persisted on the cloud and ready to synchronize. It was not activated automatically."]}):o.jsx("p",{className:"memory-editor-error",children:K.error??"Codex login was cancelled."}),o.jsx("div",{className:"memory-delete-actions",children:o.jsx("button",{className:"memory-dialog-button",disabled:m,onClick:()=>void Pe(),type:"button",children:K.status==="pending"?"Cancel login":"Close"})})]}):o.jsxs("form",{"aria-label":"Add Codex account",className:"memory-editor-popover codex-account-login-dialog",onClick:re=>re.stopPropagation(),onSubmit:re=>void Oe(re),children:[o.jsxs("header",{children:[o.jsx("strong",{children:"Add Codex Account"}),o.jsx("button",{"aria-label":"Close account login",className:"memory-icon-button",onClick:()=>M(!1),type:"button",children:"×"})]}),o.jsx("p",{className:"settings-note",children:"Seele creates the login profile on the cloud. Completing login shares it with every deployment but does not make it active."}),o.jsxs("label",{children:[o.jsx("span",{children:"Account name"}),o.jsx("input",{autoFocus:!0,maxLength:80,onChange:re=>L(re.target.value),placeholder:"For example: Codex backup",value:q})]}),D?o.jsx("p",{className:"memory-editor-error",children:D}):null,o.jsxs("div",{className:"memory-editor-actions",children:[o.jsx("button",{className:"memory-dialog-button",onClick:()=>M(!1),type:"button",children:"Cancel"}),o.jsx("button",{className:"memory-dialog-button primary",disabled:m||!q.trim(),type:"submit",children:m?"Starting...":"Continue"})]})]})}):null,pe?o.jsx("div",{className:"memory-editor-overlay",onClick:()=>!m&&Z(null),role:"presentation",children:o.jsxs("section",{"aria-label":"Switch Codex account",className:"memory-delete-dialog",onClick:re=>re.stopPropagation(),children:[o.jsxs("header",{children:[o.jsx("strong",{children:"Switch Codex Account"}),o.jsx("button",{"aria-label":"Close account switch",className:"memory-icon-button",disabled:m,onClick:()=>Z(null),type:"button",children:"×"})]}),o.jsxs("p",{children:["Switch cloud-wide execution to ",o.jsx("strong",{children:pe.name}),"? Active turns continue with the account they started with. New requests use this account once their deployment syncs; workspace threads and memory stay unchanged."]}),D?o.jsx("p",{className:"memory-editor-error",children:D}):null,o.jsxs("div",{className:"memory-delete-actions",children:[o.jsx("button",{className:"memory-dialog-button",disabled:m,onClick:()=>Z(null),type:"button",children:"Cancel"}),o.jsx("button",{className:"memory-dialog-button primary",disabled:m,onClick:()=>void Jn(),type:"button",children:m?"Switching...":"Switch account"})]})]})}):null,oe?o.jsx("div",{className:"memory-editor-overlay",onClick:()=>!m&&U(null),role:"presentation",children:o.jsxs("section",{"aria-label":"Delete Codex account",className:"memory-delete-dialog",onClick:re=>re.stopPropagation(),children:[o.jsxs("header",{children:[o.jsx("strong",{children:"Delete Codex Account"}),o.jsx("button",{"aria-label":"Close account deletion",className:"memory-icon-button",disabled:m,onClick:()=>U(null),type:"button",children:"×"})]}),o.jsxs("p",{children:["Delete ",o.jsx("strong",{children:oe.name})," and its persisted Codex credential from the cloud and every member mirror? This cannot be undone."]}),D?o.jsx("p",{className:"memory-editor-error",children:D}):null,o.jsxs("div",{className:"memory-delete-actions",children:[o.jsx("button",{className:"memory-dialog-button",disabled:m,onClick:()=>U(null),type:"button",children:"Cancel"}),o.jsx("button",{className:"memory-dialog-button danger",disabled:m,onClick:()=>void er(),type:"button",children:m?"Deleting...":"Delete"})]})]})}):null]})}function RN({currentUser:e,users:t,onCreate:n,onDelete:a,onUpdate:l}){const u={username:"",password:"",role:"user",active:!0},[c,f]=A.useState(null),[h,m]=A.useState(u),[g,y]=A.useState(!1),[k,x]=A.useState(null),[C,D]=A.useState("");function R(){m(u),D(""),f("new")}function O(L){m({username:L.username,password:"",role:L.role,active:L.active}),D(""),f(L)}function M(){g||(f(null),D(""))}async function q(L){if(L.preventDefault(),!!c){y(!0),D("");try{c==="new"?await n({username:h.username.trim(),password:h.password,role:h.role}):await l(c.id,{username:h.username.trim(),password:h.password||void 0,role:h.role,active:h.active}),f(null)}catch(K){D(dt(K).message)}finally{y(!1)}}}return o.jsxs("section",{className:"settings-section user-management-section",children:[o.jsx("header",{className:"settings-section-header",children:o.jsxs("div",{children:[o.jsx("h3",{children:"Users"}),o.jsx("p",{children:"Manage sign-in access and Seele roles."})]})}),o.jsx("div",{className:"memory-items-editor-header actions-only",children:o.jsx("button",{"aria-label":"Add user",className:"memory-icon-button",onClick:R,title:"Add user",type:"button",children:"+"})}),o.jsxs("div",{className:"user-list",children:[t.map(L=>o.jsxs("div",{className:"user-list-item",children:[o.jsxs("div",{className:"user-list-main",children:[o.jsxs("div",{children:[o.jsx("strong",{children:L.username}),L.id===e.id?o.jsx("span",{className:"user-current-badge",children:"Current"}):null]}),o.jsxs("small",{children:["Created ",ut(L.createdAt)]})]}),o.jsx("span",{className:`user-role-badge role-${L.role}`,children:L.role}),o.jsx("span",{className:`user-status ${L.active?"active":"disabled"}`,children:L.active?"Active":"Disabled"}),o.jsxs("div",{className:"user-row-actions",children:[o.jsx("button",{"aria-label":`Edit user ${L.username}`,className:"memory-icon-button",onClick:()=>O(L),title:"Edit",type:"button",children:o.jsx(Lf,{})}),o.jsx("button",{"aria-label":`Delete user ${L.username}`,className:"memory-icon-button memory-item-delete",disabled:L.id===e.id,onClick:()=>{D(""),x(L)},title:"Delete",type:"button",children:"×"})]})]},L.id)),t.length===0?o.jsx("p",{className:"settings-note",children:"No users are configured."}):null]}),c?o.jsx("div",{className:"memory-editor-overlay",onClick:M,role:"presentation",children:o.jsxs("form",{"aria-label":c==="new"?"Add user":"Edit user",className:"memory-editor-popover user-editor-popover",onClick:L=>L.stopPropagation(),onSubmit:L=>void q(L),children:[o.jsxs("header",{children:[o.jsx("strong",{children:c==="new"?"Add User":"Edit User"}),o.jsx("button",{"aria-label":"Close user editor",className:"memory-icon-button",onClick:M,title:"Close",type:"button",children:"×"})]}),o.jsxs("label",{children:[o.jsx("span",{children:"Username"}),o.jsx("input",{autoComplete:"off",autoFocus:!0,onChange:L=>m(K=>({...K,username:L.target.value})),placeholder:"Sign-in username",value:h.username})]}),o.jsxs("label",{children:[o.jsx("span",{children:c==="new"?"Initial password":"New password"}),o.jsx("input",{autoComplete:"new-password",minLength:8,onChange:L=>m(K=>({...K,password:L.target.value})),placeholder:c==="new"?"At least 8 characters":"Leave blank to keep the current password",type:"password",value:h.password})]}),o.jsxs("label",{children:[o.jsx("span",{children:"Role"}),o.jsxs("select",{disabled:c!=="new"&&c.id===e.id,onChange:L=>m(K=>({...K,role:L.target.value==="admin"?"admin":"user"})),value:h.role,children:[o.jsx("option",{value:"user",children:"User"}),o.jsx("option",{value:"admin",children:"Admin"})]})]}),c!=="new"?o.jsxs("label",{className:"user-editor-active",children:[o.jsx("input",{checked:h.active,disabled:c.id===e.id,onChange:L=>m(K=>({...K,active:L.target.checked})),type:"checkbox"}),o.jsx("span",{children:"Account active"})]}):null,C?o.jsx("p",{className:"memory-editor-error",children:C}):null,o.jsxs("div",{className:"memory-editor-actions",children:[o.jsx("button",{className:"memory-dialog-button",onClick:M,type:"button",children:"Cancel"}),o.jsx("button",{className:"memory-dialog-button primary",disabled:g||!h.username.trim()||c==="new"&&h.password.length<8||c!=="new"&&h.password.length>0&&h.password.length<8,type:"submit",children:g?"Saving...":"Save"})]})]})}):null,k?o.jsx("div",{className:"memory-editor-overlay",onClick:()=>x(null),role:"presentation",children:o.jsxs("section",{"aria-label":"Delete user",className:"memory-delete-dialog",onClick:L=>L.stopPropagation(),children:[o.jsxs("header",{children:[o.jsx("strong",{children:"Delete User"}),o.jsx("button",{"aria-label":"Close delete user confirmation",className:"memory-icon-button",onClick:()=>x(null),title:"Close",type:"button",children:"×"})]}),o.jsxs("p",{children:["Delete ",o.jsx("strong",{children:k.username}),". Users that own workspaces must be disabled instead."]}),C?o.jsx("p",{className:"memory-editor-error",children:C}):null,o.jsxs("div",{className:"memory-delete-actions",children:[o.jsx("button",{className:"memory-dialog-button",onClick:()=>x(null),type:"button",children:"Cancel"}),o.jsx("button",{className:"memory-dialog-button danger",onClick:()=>{a(k.id).then(()=>x(null)).catch(L=>D(dt(L).message))},type:"button",children:"Delete"})]})]})}):null]})}function ON({settings:e,onSave:t}){const[n,a]=A.useState(e),[l,u]=A.useState(!1);return A.useEffect(()=>a(e),[e]),o.jsxs(o.Fragment,{children:[o.jsx("header",{className:"settings-section-header",children:o.jsxs("div",{children:[o.jsx("h3",{children:"Deployment"}),o.jsx("p",{children:"Settings stored only on this Seele instance. Cloud synchronization does not copy or overwrite them."})]})}),o.jsxs("form",{className:"settings-form",onSubmit:c=>{c.preventDefault(),u(!0),t(n).finally(()=>u(!1))},children:[o.jsxs("label",{className:"settings-field settings-field-wide",children:[o.jsxs("span",{children:[o.jsx("strong",{children:"Public URL"}),o.jsx("small",{children:"The externally reachable main URL of this deployment. Seele uses it when publishing callback links to external systems."})]}),o.jsx("input",{"aria-label":"Public URL of this deployment",onChange:c=>a({...n,publicUrl:c.target.value||null}),placeholder:"https://profuse.antgroup-inc.cn/codex/yishao-0/",type:"url",value:n.publicUrl||""})]}),o.jsxs("label",{className:"settings-toggle-field",children:[o.jsxs("span",{children:[o.jsx("strong",{children:"Profuse notification"}),o.jsx("small",{children:"Send DingTalk notifications from this deployment when a turn finishes or fails. Keep this off where the Profuse endpoint is unreachable."})]}),o.jsx("input",{"aria-label":"Enable Profuse notification on this deployment",checked:n.profuseNotificationEnabled,onChange:c=>a({...n,profuseNotificationEnabled:c.target.checked}),type:"checkbox"})]}),o.jsx("div",{className:"settings-form-actions",children:o.jsx("button",{disabled:l,type:"submit",children:l?"Saving...":"Save deployment settings"})})]})]})}function IN({enabled:e,models:t,workspaceDirty:n,children:a}){const[l,u]=A.useState("workspace"),[c,f]=A.useState(!1);return e?o.jsxs("div",{className:"runtime-defaults",children:[o.jsxs("div",{className:"runtime-default-tabs",role:"tablist","aria-label":"默认配置类型",children:[o.jsxs("button",{type:"button",role:"tab",id:"runtime-workspace-tab","aria-selected":l==="workspace","aria-controls":"runtime-workspace-panel",onClick:()=>u("workspace"),children:["Workspace 默认",n&&o.jsx("small",{children:"未保存"})]}),o.jsxs("button",{type:"button",role:"tab",id:"runtime-cotask-tab","aria-selected":l==="cotask","aria-controls":"runtime-cotask-panel",onClick:()=>u("cotask"),children:["CoTask 默认",c&&o.jsx("small",{children:"未保存"})]})]}),o.jsx("div",{role:"tabpanel",id:"runtime-workspace-panel","aria-labelledby":"runtime-workspace-tab",hidden:l!=="workspace",children:a}),o.jsx("div",{role:"tabpanel",id:"runtime-cotask-panel","aria-labelledby":"runtime-cotask-tab",hidden:l!=="cotask",children:o.jsx(_N,{models:t,onDirtyChange:f})})]}):o.jsx(o.Fragment,{children:a})}function _N({models:e,onDirtyChange:t}){const[n,a]=A.useState(null),[l,u]=A.useState(null),[c,f]=A.useState(""),[h,m]=A.useState(!1),[g,y]=A.useState("");return A.useEffect(()=>{let k=!1;const x=Ne("settings/runtime/cotask");return fetch(x).then(async C=>{await Ve(C,{url:x});const D=await C.json();k||(a(D.settings),u(D.settings))}).catch(C=>{k||f(dt(C).message)}),()=>{k=!0}},[]),A.useEffect(()=>{t==null||t(!!l&&!!n&&JSON.stringify(l)!==JSON.stringify(n))},[l,n,t]),o.jsxs("section",{"aria-label":"CoTask 默认配置",children:[c&&o.jsx("p",{role:"alert",children:c}),!l||!n?!c&&o.jsx("p",{children:"正在读取 CoTask 默认配置…"}):o.jsx("fieldset",{disabled:h,style:{border:0,padding:0,margin:0},children:o.jsx(Cx,{cotaskDefaults:!0,codexReleasedAt:null,codexVersion:null,codexUpdating:!1,draft:l,globalSettings:n,models:e,scope:"global",settings:n,workspaceOverrideCount:0,workspaceSettings:null,onDraftChange:u,onResetWorkspaceSetting:()=>{},onUpdateCodexCli:()=>{},onSubmit:k=>{if(k.preventDefault(),h)return;m(!0),f(""),y("");const x=Ne("settings/runtime/cotask");fetch(x,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)}).then(async C=>(await Ve(C,{url:x,method:"PUT"}),C.json())).then(C=>{a(C.settings),u(C.settings),y("已保存;沿用默认配置的 CoTask 成员在下一次 turn 生效。")}).catch(C=>f(dt(C).message)).finally(()=>m(!1))}})}),g&&o.jsx("p",{role:"status",children:g})]})}function Cx({cotaskDefaults:e=!1,codexReleasedAt:t,codexVersion:n,codexUpdating:a,draft:l,globalSettings:u,models:c,scope:f,settings:h,workspaceOverrideCount:m,workspaceSettings:g,onDraftChange:y,onResetWorkspaceSetting:k,onSubmit:x,onUpdateCodexCli:C}){var Ae,je,pe,Z,ge;const D=f==="workspace",R=l.modelSource??{type:"codex"},O=R.type==="codex",M=((Ae=u.modelSource)==null?void 0:Ae.type)==="custom"?u.modelSource.channelId:null,q=((je=h.modelSource)==null?void 0:je.type)==="custom"?h.modelSource.channelId:null,[L,K]=A.useState(null),[P,H]=A.useState(!1);A.useEffect(()=>{let ye=!1;return CD().then(oe=>{ye||K(oe)}).catch(()=>{ye||H(!0)}),()=>{ye=!0}},[]);const X=tf(l.model,c),J=tf(u.model,c),F=tf(h.model,c),he=jE(l.reasoningEffort,X),me=SE(X,l.reasoningEffort);return o.jsxs(o.Fragment,{children:[o.jsxs("header",{className:"settings-section-header",children:[o.jsxs("div",{children:[o.jsx("h3",{children:e?"CoTask 默认配置":"Runtime"}),o.jsx("p",{children:e?"独立于普通 Workspace 默认值。CoTask 默认沿用此配置;任务内自定义配置优先。运行中的 turn 不受修改影响。":"Configure global defaults or override them for the selected workspace. Running turns keep the settings they started with."})]}),D?o.jsx("span",{className:m>0?"section-override-count active":"section-override-count",children:m>0?`${m} custom`:"No custom runtime"}):null]}),o.jsxs("form",{className:"settings-form runtime-form",onSubmit:x,children:[o.jsxs("div",{className:"settings-wide-field",children:[o.jsx(Rc,{label:"Model source",settingKey:"modelSource",isWorkspaceScope:D,globalValue:M?`Custom · ${((pe=L==null?void 0:L.channels.find(ye=>ye.id===M))==null?void 0:pe.name)??"Unavailable channel"}`:"Codex official",source:sx(l.modelSource,u.modelSource)?g==null?void 0:g.sources.modelSource:"workspace",onReset:k}),o.jsx(Ld,{"aria-label":"Runtime model source",value:R.type,options:[{value:"codex",label:"Codex official"},{value:"custom",label:"Custom"}],onChange:ye=>{var oe;return y({...l,modelSource:ye==="custom"?{type:"custom",channelId:((oe=L==null?void 0:L.channels[0])==null?void 0:oe.id)??""}:{type:"codex"}})}}),O?null:o.jsxs(o.Fragment,{children:[o.jsxs("label",{className:"settings-field",children:[o.jsx("span",{children:"Custom channel"}),o.jsxs("select",{"aria-label":"Runtime custom channel",required:!0,value:R.channelId,onChange:ye=>y({...l,modelSource:{type:"custom",channelId:ye.target.value}}),children:[o.jsx("option",{value:"",disabled:!0,children:"Select a configured channel"}),R.channelId&&!(L!=null&&L.channels.some(ye=>ye.id===R.channelId))?o.jsx("option",{value:R.channelId,children:"Unavailable channel"}):null,L==null?void 0:L.channels.map(ye=>o.jsxs("option",{value:ye.id,children:[ye.name," · ",ye.model]},ye.id))]})]}),P?o.jsx("p",{role:"alert",children:"Unable to load custom channels. Reopen Runtime to retry."}):(L==null?void 0:L.channels.length)===0?o.jsx("p",{children:"Add a channel in Custom model channels first."}):null,o.jsx("small",{children:"The channel fixes the model and connection. Codex reasoning effort and Fast mode do not apply."})]})]}),O?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:Bd(D,Yl(l.model,u.model,g==null?void 0:g.sources.model)),children:[o.jsx(Rc,{globalValue:Ov(u.model,c),isWorkspaceScope:D,label:"Model",settingKey:"model",source:Yl(l.model,u.model,g==null?void 0:g.sources.model),onReset:k}),o.jsx(Ld,{"aria-label":"Runtime model",onChange:ye=>{y({...l,model:ye})},options:Fz(c,l.model),value:l.model||((Z=c.find(ye=>ye.isDefault))==null?void 0:Z.model)||""})]}),o.jsxs("div",{className:Bd(D,Yl(l.reasoningEffort,u.reasoningEffort,g==null?void 0:g.sources.reasoningEffort)),children:[o.jsx(Rc,{globalValue:G3(u.reasoningEffort,J),isWorkspaceScope:D,label:"Reasoning effort",settingKey:"reasoningEffort",source:Yl(l.reasoningEffort,u.reasoningEffort,g==null?void 0:g.sources.reasoningEffort),onReset:k}),o.jsx(Ld,{"aria-label":"Runtime reasoning effort",onChange:ye=>y({...l,reasoningEffort:ye}),options:me,value:l.reasoningEffort}),he?o.jsx("p",{role:"status",children:he}):null]})]}):null,!e&&o.jsxs("div",{className:Bd(D,Yl(l.sandbox,u.sandbox,g==null?void 0:g.sources.sandbox)),children:[o.jsx(Rc,{globalValue:yp(u.sandbox),isWorkspaceScope:D,label:"Permission mode",settingKey:"sandbox",source:Yl(l.sandbox,u.sandbox,g==null?void 0:g.sources.sandbox),onReset:k}),o.jsx(Ld,{"aria-label":"Permission mode",onChange:ye=>y({...l,sandbox:ye}),options:ZE,value:l.sandbox})]}),O?o.jsxs("div",{className:Bd(D,Yl(l.fastMode,u.fastMode,g==null?void 0:g.sources.fastMode),"settings-toggle-field"),children:[o.jsxs("span",{children:[o.jsx(Rc,{globalValue:u.fastMode?"On":"Off",isWorkspaceScope:D,label:"Fast mode",settingKey:"fastMode",source:Yl(l.fastMode,u.fastMode,g==null?void 0:g.sources.fastMode),onReset:k}),o.jsx("small",{children:"1.5x speed with higher Codex credit consumption"})]}),o.jsx("input",{"aria-label":"Enable Fast mode",checked:l.fastMode,onChange:ye=>y({...l,fastMode:ye.target.checked}),type:"checkbox"})]}):null,!e&&o.jsxs("dl",{className:"runtime-summary",children:[o.jsxs("div",{children:[o.jsx("dt",{children:"Current"}),o.jsx("dd",{children:q?o.jsxs(o.Fragment,{children:["Custom · ",((ge=L==null?void 0:L.channels.find(ye=>ye.id===q))==null?void 0:ge.name)??"Unavailable channel"," · ",yp(h.sandbox),"."]}):o.jsxs(o.Fragment,{children:["Model ",Ov(h.model,c),", reasoning"," ",G3(h.reasoningEffort,F),", Fast mode"," ",h.fastMode?"on":"off",", permission"," ",yp(h.sandbox),"."]})})]}),o.jsxs("div",{children:[o.jsx("dt",{children:"Codex CLI"}),o.jsxs("dd",{className:"runtime-version-value",children:[o.jsx("span",{children:s1(n,t)}),o.jsx("button",{className:"runtime-update-button",disabled:a,onClick:C,type:"button",children:a?"Updating...":"Check update"})]})]})]}),o.jsx("div",{className:"settings-form-actions",children:o.jsx("button",{type:"submit",children:e?"保存 CoTask 默认配置":D?"Save workspace overrides":"Save global runtime"})})]})]})}function Rc({globalValue:e,isWorkspaceScope:t,label:n,settingKey:a,source:l,onReset:u}){const c=t&&l==="workspace";return o.jsxs("span",{className:"runtime-field-label",children:[o.jsx("span",{children:n}),t?o.jsxs("span",{className:"runtime-field-meta",children:[o.jsx("span",{className:c?"override":"inherited",children:c?"Workspace override":`Inherited: ${e}`}),c?o.jsx("button",{type:"button",onClick:()=>u(a),children:"Reset"}):null]}):null]})}function Ld({"aria-label":e,onChange:t,options:n,value:a}){const[l,u]=A.useState(!1),c=A.useRef(null),f=n.find(h=>h.value===a)??n[0]??null;return A.useEffect(()=>{if(!l)return;function h(g){var y;(y=c.current)!=null&&y.contains(g.target)||u(!1)}function m(g){g.key==="Escape"&&u(!1)}return document.addEventListener("pointerdown",h,!0),document.addEventListener("keydown",m,!0),()=>{document.removeEventListener("pointerdown",h,!0),document.removeEventListener("keydown",m,!0)}},[l]),o.jsxs("div",{className:"runtime-select",ref:c,children:[o.jsxs("button",{"aria-expanded":l,"aria-label":e,className:"runtime-select-trigger",onClick:()=>u(h=>!h),type:"button",children:[o.jsx("span",{children:(f==null?void 0:f.label)??a}),o.jsx("span",{"aria-hidden":"true",children:"⌄"})]}),l?o.jsx("div",{className:"runtime-select-menu",role:"listbox",children:n.map(h=>o.jsx("button",{"aria-selected":h.value===a,className:h.value===a?"selected":void 0,onClick:()=>{t(h.value),u(!1)},role:"option",type:"button",children:h.label},h.value||"default"))}):null]})}function Yl(e,t,n){return JSON.stringify(e)!==JSON.stringify(t)?"workspace":n}function Bd(e,t,n="settings-wide-field"){return[n,e?"workspace-scoped":"",e&&t==="workspace"?"workspace-overridden":""].filter(Boolean).join(" ")}function LN({baseSettings:e,scope:t,workspaceSettings:n,workspaceName:a,onSaveBaseItems:l,onSaveWorkspaceItems:u}){const c=t==="workspace",f=c?n.items:e.items,h=c?u:l;return o.jsxs(o.Fragment,{children:[o.jsx("header",{className:"settings-section-header",children:o.jsxs("div",{children:[o.jsx("h3",{children:c?"Workspace Memory":"Base Memory"}),o.jsx("p",{children:c?"Workspace memory applies only to the selected workspace. Use stable English keys; values may be Chinese, plain text, or Markdown.":"Base memory applies to every workspace. Use stable English keys; values may be Chinese, plain text, or Markdown."})]})}),c?o.jsxs("section",{className:"settings-readonly-block",children:[o.jsxs("div",{children:[o.jsx("strong",{children:"Base Memory"}),o.jsx("span",{children:"Read-only in workspace scope"})]}),o.jsx(qN,{emptyText:"No base memory is configured.",items:e.items,readonly:!0})]}):null,o.jsx("div",{className:"memory-manager-shell",children:o.jsx(BN,{ariaLabel:c?"Workspace memory":"Base memory",emptyText:"No memory items are configured.",items:f,onSaveItems:h,title:""})})]})}function BN({ariaLabel:e,emptyText:t,items:n,onSaveItems:a,title:l}){var H;const[u,c]=A.useState(Yc(n)),[f,h]=A.useState(null),[m,g]=A.useState({key:"",value:""}),[y,k]=A.useState(null),[x,C]=A.useState(null),[D,R]=A.useState(null);A.useEffect(()=>{c(Yc(n))},[n]),A.useEffect(()=>{if(f===null)return;const X=J=>{J.key==="Escape"&&(L(),C(null))};return document.addEventListener("keydown",X),()=>document.removeEventListener("keydown",X)},[f]);async function O(X,J){R(J);try{const F=await a(X);return c(Yc(F)),F}finally{R(null)}}function M(){C(null),k(null),g({key:"",value:""}),h("new")}function q(X){const J=u[X];J&&(C(null),k(null),g({...J}),h(X))}function L(){h(null),k(null),g({key:"",value:""})}async function K(X){const J=u[X],F=(J==null?void 0:J.key)||`${X}`;await O(u.filter((he,me)=>me!==X),`delete:${F}`),C(null)}async function P(X){X.preventDefault(),X.stopPropagation();const J=m.key.trim(),F=tz(J);if(F){k(F);return}const he=m.value.trim();if(!he){k("Value is required.");return}const me=f==="new"?-1:f;if(u.some((je,pe)=>pe!==me&&je.key.trim()===J)){k(`Key "${J}" already exists. Each memory key must be unique.`);return}const Ae={...m,key:J,value:he};f==="new"?await O([...u,Ae],"add"):typeof f=="number"&&await O(u.map((je,pe)=>pe===f?Ae:je),`save:${f}`),L()}return o.jsxs("section",{className:"memory-items-manager","aria-label":e,children:[o.jsxs("div",{className:l?"memory-items-editor-header":"memory-items-editor-header actions-only",children:[l?o.jsx("span",{children:l}):null,o.jsx("button",{"aria-label":"Add memory item",className:"memory-icon-button",title:"Add",type:"button",onClick:M,children:"+"})]}),u.length?o.jsx("div",{className:"memory-items-grid",children:u.map((X,J)=>o.jsxs("div",{className:"memory-item-display",children:[o.jsxs("pre",{"aria-label":`Memory item ${X.key}`,children:[o.jsx("span",{className:"memory-tag",children:`<${X.key}>`}),`
366
- `,o.jsx("span",{children:X.value}),`
367
- `,o.jsx("span",{className:"memory-tag",children:`</${X.key}>`})]}),o.jsxs("div",{className:"memory-item-actions",children:[o.jsx("button",{"aria-label":`Edit memory item ${X.key||J+1}`,className:"memory-icon-button memory-item-edit",disabled:D!==null,title:"Edit",type:"button",onClick:()=>q(J),children:"✎"}),o.jsx("button",{"aria-label":`Delete memory item ${X.key||J+1}`,className:"memory-icon-button memory-item-delete",disabled:D!==null,title:"Delete",type:"button",onClick:()=>C(J),children:"×"})]})]},`${J}-${X.key}`))}):o.jsx("p",{className:"settings-note",children:t}),f!==null?o.jsx("div",{className:"memory-editor-overlay",onClick:L,role:"presentation",children:o.jsxs("form",{"aria-label":f==="new"?"Add memory item":"Edit memory item",className:"memory-editor-popover",onClick:X=>X.stopPropagation(),onSubmit:X=>void P(X),children:[o.jsxs("header",{children:[o.jsx("strong",{children:f==="new"?"Add Memory":"Edit Memory"}),o.jsx("button",{"aria-label":"Close memory editor",className:"memory-icon-button",title:"Close",type:"button",onClick:L,children:"×"})]}),o.jsxs("label",{children:[o.jsx("span",{children:"Key"}),o.jsx("input",{autoComplete:"off",autoFocus:!0,onChange:X=>g(J=>({...J,key:X.target.value})),placeholder:"Stable technical key used as the injected tag name",value:m.key})]}),o.jsxs("label",{children:[o.jsx("span",{children:"Value · up to 1000 tokens"}),o.jsx("textarea",{onChange:X=>g(J=>({...J,value:X.target.value})),placeholder:"Memory content injected under this key",rows:10,value:m.value})]}),y?o.jsx("p",{className:"memory-editor-error",children:y}):null,o.jsxs("div",{className:"memory-editor-actions",children:[o.jsx("button",{"aria-label":"Cancel memory edit",className:"memory-dialog-button",type:"button",onClick:L,children:"Cancel"}),o.jsx("button",{"aria-label":"Save memory item",className:"memory-dialog-button primary",disabled:D!==null,type:"submit",children:D==="add"||D!=null&&D.startsWith("save:")?"Saving...":"Save"})]})]})}):null,x!==null?o.jsx("div",{className:"memory-editor-overlay",onClick:()=>C(null),role:"presentation",children:o.jsxs("section",{"aria-label":"Confirm delete memory item",className:"memory-delete-dialog",onClick:X=>X.stopPropagation(),children:[o.jsxs("header",{children:[o.jsx("strong",{children:"Delete Memory"}),o.jsx("button",{"aria-label":"Close delete confirmation",className:"memory-icon-button",title:"Close",type:"button",onClick:()=>C(null),children:"×"})]}),o.jsxs("p",{children:["Delete"," ",o.jsx("code",{children:((H=u[x])==null?void 0:H.key)||`item ${x+1}`}),"?"]}),o.jsxs("div",{className:"memory-delete-actions",children:[o.jsx("button",{"aria-label":"Cancel delete",className:"memory-dialog-button",disabled:D!==null,type:"button",onClick:()=>C(null),children:"Cancel"}),o.jsx("button",{"aria-label":"Confirm delete",className:"memory-dialog-button danger",disabled:D!==null,type:"button",onClick:()=>void K(x),children:"Delete"})]})]})}):null]})}function qN({emptyText:e,items:t}){const n=Yc(t);return n.length?o.jsx("div",{className:"memory-items-list",children:n.map(a=>o.jsx("div",{className:"memory-item-display memory-item-readonly",children:o.jsxs("pre",{"aria-label":`Memory item ${a.key}`,children:[o.jsx("span",{className:"memory-tag",children:`<${a.key}>`}),`
368
- `,o.jsx("span",{children:a.value}),`
369
- `,o.jsx("span",{className:"memory-tag",children:`</${a.key}>`})]})},a.key))}):o.jsx("p",{className:"settings-note",children:e})}function UN({deleteConfirmKey:e,editingEnvironmentKey:t,environmentDraft:n,globalEnvironment:a,scope:l,workspaceEnvironment:u,valueVisible:c,onCancelEnvironmentEdit:f,onDeleteConfirmChange:h,onDeleteEnvironment:m,onDraftChange:g,onEditEnvironment:y,onRevealEnvironmentValue:k,onSubmitEnvironment:x,onValueVisibleChange:C,revealedEnvironmentKeys:D}){const R=t!==null&&D.has(t),O=l==="workspace",M=O?u:a,[q,L]=A.useState(!1);function K(){f(),g({description:"",key:"",value:""}),C(!1),L(!0)}function P(J){y(J),C(!1),L(!0)}function H(){L(!1),f(),C(!1)}function X(J){x(J),L(!1)}return o.jsxs(o.Fragment,{children:[o.jsx("header",{className:"settings-section-header",children:o.jsxs("div",{children:[o.jsx("h3",{children:O?"Workspace Environment":"Base Environment"}),o.jsx("p",{children:O?"Workspace variables are stored in this workspace and are merged with base variables for new runs.":"Base variables are injected into every new workspace run. Existing runs keep the environment they started with."})]})}),O?o.jsxs("section",{className:"settings-readonly-block",children:[o.jsxs("div",{children:[o.jsx("strong",{children:"Base Environment"}),o.jsx("span",{children:"Read-only in workspace scope"})]}),o.jsx(lv,{emptyText:"No base environment variables are configured.",readonly:!0,variables:a})]}):null,o.jsxs("section",{className:"environment-manager",children:[o.jsx("div",{className:"memory-items-editor-header actions-only",children:o.jsx("button",{"aria-label":"Add environment variable",className:"memory-icon-button",title:"Add",type:"button",onClick:K,children:"+"})}),o.jsx(lv,{emptyText:O?"No workspace environment variables are configured.":"No base environment variables are configured.",onDelete:J=>h(J),onEdit:P,variables:M})]}),q?o.jsx("div",{className:"memory-editor-overlay",onClick:H,role:"presentation",children:o.jsxs("form",{"aria-label":t?"Edit environment variable":"Add environment variable",className:"memory-editor-popover environment-editor-popover",onClick:J=>J.stopPropagation(),onSubmit:X,children:[o.jsxs("header",{children:[o.jsx("strong",{children:t?"Edit Environment":"Add Environment"}),o.jsx("button",{"aria-label":"Close environment editor",className:"memory-icon-button",title:"Close",type:"button",onClick:H,children:"×"})]}),o.jsxs("label",{children:[o.jsx("span",{children:"Key"}),o.jsx("input",{"aria-label":"Environment variable key",autoComplete:"off",autoFocus:!0,disabled:t!==null,onChange:J=>g({...n,key:J.target.value}),placeholder:"Environment variable name",spellCheck:!1,value:n.key})]}),o.jsxs("label",{children:[o.jsx("span",{children:"Value"}),o.jsxs("span",{className:"environment-value-field",children:[o.jsx("input",{"aria-label":"Environment variable value",autoComplete:"off",onChange:J=>g({...n,value:J.target.value}),placeholder:"Environment variable value",spellCheck:!1,type:c?"text":"password",value:n.value}),o.jsx("button",{"aria-label":c?"Hide value":"Show value",onClick:()=>{if(t&&!R&&!n.value){k(t),C(!0);return}C(!c)},title:c?"Hide value":"Show value",type:"button",children:c?o.jsx(uD,{}):o.jsx(oD,{})})]})]}),o.jsxs("label",{children:[o.jsx("span",{children:"Description"}),o.jsx("input",{"aria-label":"Environment variable description",autoComplete:"off",onChange:J=>g({...n,description:J.target.value}),placeholder:"What this variable is for",spellCheck:!1,value:n.description})]}),o.jsxs("div",{className:"memory-editor-actions",children:[o.jsx("button",{className:"memory-dialog-button",type:"button",onClick:H,children:"Cancel"}),o.jsx("button",{className:"memory-dialog-button primary",disabled:!n.key.trim(),type:"submit",children:"Save"})]})]})}):null,e?o.jsx("div",{className:"memory-editor-overlay",onClick:()=>h(null),role:"presentation",children:o.jsxs("section",{"aria-label":"Confirm delete environment variable",className:"memory-delete-dialog",onClick:J=>J.stopPropagation(),children:[o.jsxs("header",{children:[o.jsx("strong",{children:"Delete Environment"}),o.jsx("button",{"aria-label":"Close delete confirmation",className:"memory-icon-button",title:"Close",type:"button",onClick:()=>h(null),children:"×"})]}),o.jsxs("p",{children:["Delete ",o.jsx("code",{children:e}),"?"]}),o.jsxs("div",{className:"memory-delete-actions",children:[o.jsx("button",{className:"memory-dialog-button",type:"button",onClick:()=>h(null),children:"Cancel"}),o.jsx("button",{className:"memory-dialog-button danger",type:"button",onClick:()=>{m(e),h(null)},children:"Delete"})]})]})}):null]})}function lv({emptyText:e,onDelete:t,onEdit:n,readonly:a=!1,variables:l}){return l.length===0?o.jsx("p",{className:"settings-note",children:e}):o.jsx("div",{className:a?"environment-list readonly":"environment-list",children:l.map(u=>o.jsxs("div",{className:a?"environment-row readonly":"environment-row",children:[o.jsxs("div",{className:"environment-row-main",children:[o.jsxs("pre",{"aria-label":`Environment variable ${u.key}`,children:[o.jsx("span",{className:"memory-tag",children:u.key}),"=",u.hasValue?"••••••":"",u.description?o.jsx("span",{className:"environment-comment",children:` # ${u.description}`}):null]}),o.jsxs("span",{children:[u.hasValue?"configured":"empty"," · updated"," ",ut(u.updatedAt)]})]}),a?o.jsx("span",{className:"environment-readonly-tag",children:"read-only"}):o.jsxs("div",{className:"environment-row-actions",children:[o.jsx("button",{"aria-label":`Edit ${u.key}`,className:"memory-icon-button memory-item-edit",onClick:()=>n==null?void 0:n(u),title:"Edit",type:"button",children:"✎"}),o.jsx("button",{"aria-label":`Delete ${u.key}`,className:"memory-icon-button memory-item-delete",onClick:()=>t==null?void 0:t(u.key),title:"Delete",type:"button",children:"×"})]})]},u.key))})}function Tx({items:e,onDelete:t,onEdit:n}){const[a,l]=A.useState(null),[u,c]=A.useState(null);return e.length===0?o.jsxs("section",{className:"knowledge-empty",children:[o.jsx("h4",{children:"No knowledge registered"}),o.jsx("p",{children:"Give this workspace durable source material in chat. The workspace should decide whether to register it, create local copies, and produce digest or skill files."})]}):o.jsx("div",{className:"knowledge-list",children:e.map(f=>o.jsxs("article",{className:"knowledge-row",children:[o.jsxs("div",{className:"knowledge-row-main",children:[o.jsxs("header",{children:[o.jsx("strong",{children:f.name}),o.jsx("span",{children:$N(f.kind)}),o.jsx("span",{className:GN(f.status),children:FN(f.status)})]}),o.jsx("p",{children:f.purpose||f.description||"No purpose set."}),o.jsxs("div",{className:"knowledge-paths",children:[o.jsx("code",{children:f.digestPath}),o.jsx("code",{children:f.skillPath}),o.jsx("code",{children:f.fetch.scriptPath})]}),f.fetch.requiredEnv.length>0?o.jsx("div",{className:"knowledge-envs",children:f.fetch.requiredEnv.map(h=>o.jsx("span",{title:h.description||h.key,children:h.key},h.key))}):null,u===f.id?o.jsx("small",{className:"knowledge-row-notice",children:"Refresh/check is not automatic yet. Ask this workspace to review or refresh this knowledge source."}):null,o.jsxs("small",{children:[f.attention," · ",PN(f.refreshPolicy)," · updated ",ut(f.updatedAt)]})]}),o.jsx("div",{className:"environment-row-actions",children:a===f.id?o.jsxs(o.Fragment,{children:[o.jsx("button",{className:"danger",onClick:()=>{t(f.id),l(null)},type:"button",children:"Delete"}),o.jsx("button",{onClick:()=>l(null),type:"button",children:"Cancel"})]}):o.jsxs(o.Fragment,{children:[o.jsx("button",{"aria-label":`Check ${f.name}`,onClick:()=>c(f.id),title:"Check or refresh through workspace",type:"button",children:"↻"}),o.jsx("button",{"aria-label":`Edit ${f.name}`,onClick:()=>n(f),title:"Edit knowledge",type:"button",children:o.jsx(Lf,{})}),o.jsx("button",{"aria-label":`Delete ${f.name}`,onClick:()=>l(f.id),title:"Delete knowledge",type:"button",children:"×"})]})})]},f.id))})}function HN({draft:e,items:t,scope:n,workspaceName:a,onCancel:l,onDelete:u,onDraftChange:c,onEdit:f,onSubmit:h}){return n==="workspace"?o.jsxs(o.Fragment,{children:[o.jsx("header",{className:"settings-section-header",children:o.jsxs("div",{children:[o.jsx("h3",{children:"Workspace Knowledge"}),o.jsxs("p",{children:["Long-lived source-backed material for ",a??"this workspace",". The workspace should create and maintain these assets itself when it digests external material. You mainly review status, delete stale items, or trigger a future refresh/check."]})]})}),o.jsx(Tx,{items:t,onDelete:u,onEdit:f}),e.id?o.jsxs("form",{className:"settings-form knowledge-form",onSubmit:h,children:[o.jsxs("div",{className:"knowledge-form-header",children:[o.jsxs("div",{children:[o.jsx("strong",{children:"Edit metadata"}),o.jsx("span",{children:"This is mainly for correction. New knowledge should usually be created by the workspace while processing source material."})]}),o.jsx("button",{className:"secondary",onClick:l,type:"button",children:"Close"})]}),o.jsxs("div",{className:"knowledge-form-grid",children:[o.jsxs("label",{children:[o.jsx("span",{children:"Name"}),o.jsx("input",{"aria-label":"Knowledge name",onChange:g=>c({...e,name:g.target.value}),value:e.name})]}),o.jsxs("label",{children:[o.jsx("span",{children:"Kind"}),o.jsxs("select",{"aria-label":"Knowledge kind",onChange:g=>c({...e,kind:g.target.value}),value:e.kind,children:[o.jsx("option",{value:"source",children:"Source"}),o.jsx("option",{value:"skill",children:"Skill"}),o.jsx("option",{value:"reference",children:"Reference"})]})]}),o.jsxs("label",{children:[o.jsx("span",{children:"Status"}),o.jsxs("select",{"aria-label":"Knowledge status",onChange:g=>c({...e,status:g.target.value}),value:e.status,children:[o.jsx("option",{value:"draft",children:"Draft"}),o.jsx("option",{value:"needs_fetch_method",children:"Needs fetch method"}),o.jsx("option",{value:"needs_credentials",children:"Needs credentials"}),o.jsx("option",{value:"invalid_credentials",children:"Invalid credentials"}),o.jsx("option",{value:"ready",children:"Ready"}),o.jsx("option",{value:"stale_signal",children:"Stale signal"})]})]}),o.jsxs("label",{children:[o.jsx("span",{children:"Attention"}),o.jsxs("select",{"aria-label":"Knowledge attention",onChange:g=>c({...e,attention:g.target.value}),value:e.attention,children:[o.jsx("option",{value:"none",children:"None"}),o.jsx("option",{value:"tracked",children:"Tracked"}),o.jsx("option",{value:"watch",children:"Watch"})]})]}),o.jsxs("label",{children:[o.jsx("span",{children:"Refresh"}),o.jsxs("select",{"aria-label":"Knowledge refresh policy",onChange:g=>c({...e,refreshPolicy:g.target.value}),value:e.refreshPolicy,children:[o.jsx("option",{value:"manual",children:"Manual"}),o.jsx("option",{value:"low-frequency-check",children:"Low-frequency check"})]})]})]}),o.jsxs("label",{className:"settings-wide-field",children:[o.jsx("span",{children:"Purpose"}),o.jsx("textarea",{"aria-label":"Knowledge purpose",onChange:g=>c({...e,purpose:g.target.value}),rows:2,value:e.purpose})]}),o.jsxs("label",{className:"settings-wide-field",children:[o.jsx("span",{children:"Content"}),o.jsx("textarea",{"aria-label":"Knowledge content",onChange:g=>c({...e,description:g.target.value}),rows:2,value:e.description})]}),o.jsxs("label",{className:"settings-wide-field",children:[o.jsx("span",{children:"Source clues"}),o.jsx("textarea",{"aria-label":"Knowledge source clues",onChange:g=>c({...e,sourceCluesText:g.target.value}),rows:4,value:e.sourceCluesText})]}),o.jsxs("label",{className:"settings-wide-field",children:[o.jsx("span",{children:"Required environment"}),o.jsx("textarea",{"aria-label":"Knowledge required environment",onChange:g=>c({...e,requiredEnvText:g.target.value}),rows:3,value:e.requiredEnvText})]}),o.jsx("p",{className:"settings-note",children:"Metadata lives under `.seele/knowledge/<id>/item.json`. Source copies, digest, skill, and fetch script stay in the same folder."}),o.jsx("div",{className:"settings-form-actions",children:o.jsx("button",{disabled:!e.name.trim(),type:"submit",children:"Save metadata"})})]}):null]}):o.jsxs("section",{className:"settings-empty-section",children:[o.jsx("h3",{children:"Workspace Knowledge"}),o.jsx("p",{children:"Knowledge belongs to a specific workspace because source copies, digests, skills, and fetch scripts live under that workspace's `.seele/knowledge` directory. Switch to Workspace scope to manage it."})]})}function $N(e){return e==="skill"?"Skill":e==="reference"?"Reference":"Source"}function FN(e){return e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function PN(e){return e==="low-frequency-check"?"low-frequency check":"manual refresh"}function GN(e){return e==="ready"?"knowledge-status ready":e==="needs_credentials"||e==="invalid_credentials"||e==="needs_fetch_method"?"knowledge-status warning":e==="stale_signal"?"knowledge-status stale":"knowledge-status"}function Nt({label:e,value:t,mono:n=!1}){return o.jsxs("div",{className:"context-field",children:[o.jsx("span",{children:e}),o.jsx("strong",{className:n?"mono":void 0,title:t,children:t})]})}function VN({onRefresh:e,preview:t,refreshing:n}){const a=["workspace_identity","workspace_environment","rendering"],l=A.useMemo(()=>Object.entries(t.context).map(([c,f])=>[c,YN(f)]).sort(([c],[f])=>{const h=a.indexOf(c),m=a.indexOf(f);return h>=0||m>=0?(h>=0?h:Number.MAX_SAFE_INTEGER)-(m>=0?m:Number.MAX_SAFE_INTEGER):c.localeCompare(f)}),[t.context]),u=c=>{var f;(f=document.getElementById(sv(c)))==null||f.scrollIntoView({behavior:"smooth",block:"start"})};return o.jsxs("div",{className:"additional-context-preview",children:[o.jsx("div",{className:"additional-context-header",children:o.jsxs("div",{className:"additional-context-meta",children:[o.jsxs("span",{children:["Generated ",ut(t.generatedAt)]}),o.jsxs("span",{children:[Rr(l.length)," keys"]}),o.jsx("button",{disabled:n,onClick:e,type:"button",children:n?"Rendering...":"Refresh"})]})}),o.jsxs("div",{className:"additional-context-toc",children:[o.jsx("button",{"aria-label":"Additional context outline",type:"button",children:"☰"}),o.jsx("div",{className:"additional-context-toc-menu",children:l.map(([c])=>o.jsx("button",{onClick:()=>u(c),type:"button",children:c},c))})]}),o.jsx("div",{className:"additional-context-list",children:l.map(([c,f])=>o.jsxs("section",{className:"additional-context-item",id:sv(c),children:[o.jsxs("header",{children:[o.jsxs("code",{children:["<",c,">"]}),o.jsxs("span",{children:[Rr(f.length)," chars"]})]}),o.jsx("pre",{children:f})]},c))})]})}function sv(e){return`additional-context-${e.replace(/[^a-zA-Z0-9_-]/g,"-")}`}function YN(e){if(typeof e=="string")return e;if(e!==null&&typeof e=="object"&&"value"in e&&typeof e.value=="string")return e.value;if(e==null)return"";try{return JSON.stringify(e,null,2)}catch{return String(e)}}function WN({summary:e}){return o.jsxs("div",{className:"thread-read-summary",children:[o.jsxs("section",{className:"thread-read-summary-grid",children:[o.jsx(Nt,{label:"Thread",value:e.id,mono:!0}),o.jsx(Nt,{label:"Session",value:e.sessionId,mono:!0}),o.jsx(Nt,{label:"Status",value:e.status}),o.jsx(Nt,{label:"Source",value:e.source}),o.jsx(Nt,{label:"Created",value:Ic(e.createdAt)}),o.jsx(Nt,{label:"Updated",value:Ic(e.updatedAt)}),o.jsx(Nt,{label:"Recency",value:Ic(e.recencyAt)}),o.jsx(Nt,{label:"Turns",value:Rr(e.turnCount),mono:!0}),o.jsx(Nt,{label:"Items",value:Rr(e.itemCount),mono:!0}),o.jsx(Nt,{label:"User / agent",value:`${Rr(e.userMessageCount)} / ${Rr(e.agentMessageCount)}`,mono:!0}),o.jsx(Nt,{label:"Compactions",value:`${Rr(e.compactionCount)} / ${Rr(e.contextCompactionCount)} context`,mono:!0}),o.jsx(Nt,{label:"CWD",value:e.cwd,mono:!0}),o.jsx(Nt,{label:"Path",value:e.path,mono:!0})]}),e.preview?o.jsxs("details",{className:"thread-read-preview",children:[o.jsx("summary",{children:"Preview"}),o.jsx("p",{children:e.preview})]}):null,o.jsxs("section",{className:"thread-read-turns",children:[o.jsxs("div",{children:[o.jsx("strong",{children:"Turns"}),o.jsxs("span",{children:[e.turns.length," turn",e.turns.length===1?"":"s"]})]}),o.jsx("div",{className:"thread-read-turn-list",children:e.turns.map((t,n)=>o.jsxs("details",{className:"thread-read-turn",children:[o.jsxs("summary",{children:[o.jsxs("code",{children:["turn ",n+1]}),o.jsx("span",{title:t.id,children:t.id}),o.jsxs("small",{children:[t.status," · ",t.itemCount," item",t.itemCount===1?"":"s"]})]}),o.jsxs("div",{className:"thread-read-turn-detail",children:[o.jsxs("div",{className:"thread-read-turn-fields",children:[o.jsx(Nt,{label:"Status",value:t.status}),o.jsx(Nt,{label:"Items view",value:t.itemsView}),o.jsx(Nt,{label:"Started",value:Ic(t.startedAt)}),o.jsx(Nt,{label:"Completed",value:Ic(t.completedAt)}),o.jsx(Nt,{label:"Duration",value:t.durationMs===null?"unknown":du(t.durationMs)}),o.jsx(Nt,{label:"Item types",value:t.itemTypes||"none"})]}),t.preview?o.jsx("p",{className:"thread-read-turn-preview",children:t.preview}):null,o.jsxs("details",{className:"thread-read-turn-raw",children:[o.jsx("summary",{children:"Turn raw JSON"}),o.jsx("pre",{children:JSON.stringify(t.raw,null,2)})]})]})]},t.id))})]})]})}function Fs(e,t,n,a,l,u,c,f,h){var m,g,y,k;if(e.type==="reasoning")return o.jsx(tE,{content:e.content,streaming:e.streaming});if(e.type==="assistantText")return o.jsx("article",{className:`message assistant${e.streaming?" streaming":""}`,"data-hover-time":ut(e.createdAt),children:o.jsxs("div",{className:"message-main",children:[o.jsxs("header",{className:"message-header",children:[o.jsx("span",{children:"Seele"}),o.jsx("time",{dateTime:e.createdAt,children:e.streaming?"streaming":ut(e.createdAt)})]}),o.jsx("div",{className:"message-body",children:o.jsx(ru,{content:e.content,conversation:t,streaming:e.streaming,onPreviewArtifact:n,onCopyArtifactUrl:a,copiedArtifactUrl:l})})]})});if(e.type==="turnError")return o.jsxs("article",{className:"turn-error-result","data-hover-time":ut(e.createdAt),role:"alert",children:[o.jsx("strong",{children:"Task failed"}),o.jsx(vv,{content:e.content})]});if(e.type==="message")return o.jsx("article",{className:`message ${e.message.role}`,"data-hover-time":ut(e.message.createdAt),children:o.jsxs("div",{className:"message-main",children:[o.jsxs("header",{className:"message-header",children:[o.jsx("span",{children:Kz(e.message.role)}),o.jsx("time",{dateTime:e.message.createdAt,children:ut(e.message.createdAt)})]}),o.jsx("div",{className:"message-body",children:e.message.role==="user"?o.jsx(vv,{content:e.message.content}):o.jsx(ru,{content:e.message.content,conversation:t,streaming:!1,onPreviewArtifact:n,onCopyArtifactUrl:a,copiedArtifactUrl:l})})]})});if(e.type==="system"){if((m=e.topicMessages)!=null&&m.length)return o.jsx("div",{className:"topic-input-list",children:e.topicMessages.map(C=>o.jsx("article",{className:"message topic-input","data-hover-time":ut(C.createdAt),children:o.jsxs("div",{className:"topic-message-bubble topic-input-bubble",children:[o.jsxs("header",{className:"topic-input-header",children:[o.jsxs("span",{className:"topic-input-sender",children:["From ",C.senderName]}),o.jsx("time",{dateTime:C.createdAt,children:ut(C.createdAt)})]}),o.jsx("div",{className:"topic-input-content message-body",children:o.jsx(ru,{content:C.contentMarkdown,conversation:t,streaming:!1,onPreviewArtifact:n,onCopyArtifactUrl:a,copiedArtifactUrl:l})})]})},C.id))});const x=Ks({},[e.detail]);return o.jsx("article",{className:"message system","data-hover-time":ut(e.createdAt),children:o.jsx("div",{className:"message-main",children:o.jsxs("button",{className:`system-message-body system-message-link${e.visualKind?` ${e.visualKind}`:""}`,onClick:()=>h==null?void 0:h(e),type:"button",children:[e.visualKind==="topic"?o.jsx("span",{className:"system-message-icon",children:o.jsx(Zd,{})}):null,o.jsx("span",{className:"system-message-title",children:e.title}),o.jsx("small",{children:x})]})})})}return e.type==="steerMarker"?o.jsxs("div",{className:"turn-steer-marker","data-message-id":e.messageId,title:e.content,children:[o.jsx("span",{children:"Added while running"}),o.jsx("strong",{children:e.content})]}):e.tool.kind==="command"?o.jsx(iM,{tool:e.tool,onRespondApproval:u}):e.tool.kind==="file"&&((g=e.tool.fileChanges)!=null&&g.length)?o.jsx(rM,{conversation:t,tool:e.tool}):e.tool.kind==="responsibility"||e.tool.kind==="workspaceChange"?o.jsx(tM,{conversation:t,tool:e.tool,onRespond:c}):e.tool.kind==="knowledge"?o.jsx(nM,{tool:e.tool,onRespond:f}):e.tool.kind==="collaboration"&&e.tool.topicAction==="send"?o.jsxs("details",{className:"tool-card collaboration topic-output","data-hover-time":ut(e.tool.createdAt),title:ut(e.tool.createdAt),children:[o.jsxs("summary",{children:[o.jsxs("span",{className:"tool-card-summary-title",children:[o.jsx("span",{className:"tool-card-kind-icon",children:o.jsx(Zd,{})}),o.jsx("span",{children:e.tool.title})]}),e.tool.meta?o.jsx("small",{children:e.tool.meta}):null]}),o.jsxs("div",{className:"topic-message-bubble topic-output-bubble",children:[o.jsxs("header",{className:"topic-input-header",children:[o.jsxs("span",{className:"topic-input-sender",children:["To ",e.tool.topicRecipientLabel??"Topic"]}),o.jsx("time",{dateTime:e.tool.createdAt,children:ut(e.tool.createdAt)})]}),o.jsx("div",{className:"topic-input-content message-body",children:o.jsx(ru,{content:e.tool.topicMessageContent??e.tool.output??"",conversation:t,streaming:!1,onPreviewArtifact:n,onCopyArtifactUrl:a,copiedArtifactUrl:l})})]}),(y=e.tool.rawEvents)!=null&&y.length?o.jsxs("details",{className:"tool-raw-details",children:[o.jsx("summary",{children:"Raw events"}),o.jsx("pre",{className:"tool-raw-json",children:JSON.stringify(e.tool.rawEvents,null,2)})]}):null]}):o.jsxs("details",{className:`tool-card ${e.tool.kind}`,"data-hover-time":ut(e.tool.createdAt),title:ut(e.tool.createdAt),children:[o.jsxs("summary",{children:[o.jsxs("span",{className:"tool-card-summary-title",children:[e.tool.kind==="collaboration"?o.jsx("span",{className:"tool-card-kind-icon",children:o.jsx(Zd,{})}):null,o.jsx("span",{children:e.tool.title})]}),e.tool.meta?o.jsx("small",{children:e.tool.meta}):null]}),o.jsx("code",{children:e.tool.body}),e.tool.output?o.jsx("pre",{children:e.tool.output}):null,(k=e.tool.rawEvents)!=null&&k.length?o.jsxs("details",{className:"tool-raw-details",children:[o.jsx("summary",{children:"Raw events"}),o.jsx("pre",{className:"tool-raw-json",children:JSON.stringify(e.tool.rawEvents,null,2)})]}):null]})}function ov(e){return e.type==="message"||e.type==="turnError"||e.type==="assistantText"&&e.pinnedToResult||e.type==="assistantText"&&e.phase==="final_answer"||e.type==="tool"&&KN(e.tool)}function KN(e){return e.kind==="responsibility"||e.kind==="workspaceChange"&&!!(e.workspaceChangeProposalId??e.responsibilityProposalId)||e.kind==="knowledge"||e.kind==="collaboration"&&e.topicAction==="send"||e.meta==="approval"}function XN(e){const t=[],n=[];for(const a of e)a.type==="tool"&&(a.tool.kind==="collaboration"&&a.tool.topicAction==="send"||a.tool.kind==="workspaceChange"||a.tool.kind==="responsibility")?n.push(a):t.push(a);return[...t,...n]}function Ax({group:e,conversation:t,allowProcessView:n=!0,copiedFooter:a,copiedArtifactUrl:l,running:u,onCopyArtifactUrl:c,onCopyBubble:f,onLoadProcessDetails:h,onPreviewArtifact:m,onRespondApproval:g,onRespondWorkspaceChangeProposal:y,onRespondKnowledgeProposal:k,onOpenSystemEvent:x}){const C=XN(e.agentItems.filter(ov)),D=e.agentItems.some(F=>!ov(F)),R=n&&(D||e.turnIds.length>0),O=u?"process":"result",[M,q]=A.useState(O),[L,K]=A.useState(!1),P=M==="result"?C:e.agentItems,H=oM(P);A.useEffect(()=>{L||q(O)},[O,L]);const X=u||R||e.stopped,J=o.jsxs(o.Fragment,{children:[X?o.jsx("div",{className:"turn-panel-controls",children:u?o.jsx("span",{"aria-label":"Agent run in progress",className:"turn-view-spinner",title:"Agent run in progress"}):R?o.jsx("button",{"aria-label":M==="result"?"Show process":"Show result",className:"turn-view-toggle",title:M==="result"?"Show process":"Show result",type:"button",onClick:()=>{K(!0),q(F=>F==="result"?(h(e.turnIds),"process"):"result")},children:M==="result"?o.jsx(ZN,{}):o.jsx(QN,{})}):null}):null,P.map(F=>o.jsx(A.Fragment,{children:Fs(F,t,m,c,l,g,y,k,x)},F.id)),M==="result"&&P.length===0?o.jsx("div",{className:"turn-result-empty",children:e.stopped?"Run stopped by user":D?"No reliable final answer captured":"No result yet"}):null,o.jsx(Bc,{copied:a,content:H,id:`agent-${e.id}-bottom`,notice:e.notificationFailure,timestamp:uM(P),variant:"outside",onCopy:f})]});return e.stopped?o.jsxs("details",{className:"turn-panel agent-turn stopped","data-collapsed":"true",children:[o.jsxs("summary",{children:[o.jsx("span",{className:"turn-stopped-badge",children:"Stopped"}),o.jsx("span",{children:"Run stopped by user"})]}),o.jsx("div",{className:X?"stopped-turn-body has-controls":"stopped-turn-body",children:J})]}):o.jsx("div",{className:["turn-panel","agent-turn",e.stopped?"stopped":"",X?"has-controls":""].filter(Boolean).join(" "),children:J})}function ZN(){return o.jsx("svg",{"aria-hidden":"true",fill:"none",height:"14",viewBox:"0 0 24 24",width:"14",children:o.jsx("path",{d:"M8 7h8M6 12h12M8 17h8",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"})})}function QN(){return o.jsx("svg",{"aria-hidden":"true",fill:"none",height:"14",viewBox:"0 0 24 24",width:"14",children:o.jsx("path",{d:"m7 12 3 3 7-7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}function JN(){return o.jsx("svg",{"aria-hidden":"true",fill:"none",height:"13",viewBox:"0 0 24 24",width:"13",children:o.jsx("rect",{fill:"currentColor",height:"12",rx:"2.6",width:"12",x:"6",y:"6"})})}function eM({className:e="",description:t,icon:n,onClick:a,timestamp:l,title:u,trailing:c,visibleTitle:f}){return o.jsxs("button",{className:`tool-card file compact-timeline-link ${e}`.trim(),"data-hover-time":ut(l),onClick:a,title:u,type:"button",children:[o.jsx("span",{className:"compact-timeline-link-icon",children:n}),o.jsxs("span",{className:"compact-timeline-link-copy",children:[o.jsx("strong",{children:f}),o.jsx("small",{children:t})]}),c?o.jsx("span",{className:"compact-timeline-link-trailing",children:c}):null]})}function tM({conversation:e,tool:t,onRespond:n}){var R;const a=Je((R=t.workspaceChangePayload)==null?void 0:R.content)||t.body,[l,u]=A.useState(a),[c,f]=A.useState(null),[h,m]=A.useState("source"),[g,y]=A.useState(!1),k=!!(t.workspaceChangeProposalId??t.responsibilityProposalId),x=t.meta==="saved"||t.meta==="declined"?t.meta:k?"pending":"preparing",C=x==="pending";A.useEffect(()=>{u(a)},[a]);async function D(O){f(O);try{await n(t,O,O==="accept"?{content:l}:void 0)&&y(!1)}finally{f(null)}}return o.jsxs(o.Fragment,{children:[o.jsx(eM,{className:"responsibility-request-link",description:"Workspace responsibility",icon:o.jsx(Lf,{}),onClick:()=>y(!0),timestamp:t.createdAt,title:"View workspace change request",trailing:o.jsx("span",{className:`responsibility-request-status ${x}`,children:x}),visibleTitle:t.title}),g?o.jsx("div",{className:"dialog-backdrop",role:"presentation",onMouseDown:()=>!c&&y(!1),children:o.jsxs("section",{"aria-labelledby":`responsibility-proposal-${t.id}`,"aria-modal":"true",className:"dialog-card responsibility-proposal-dialog",onMouseDown:O=>O.stopPropagation(),role:"dialog",children:[o.jsxs("header",{children:[o.jsxs("div",{children:[o.jsx("h2",{id:`responsibility-proposal-${t.id}`,children:t.title}),o.jsxs("p",{children:["Workspace change · ",ut(t.createdAt)]})]}),o.jsx("button",{"aria-label":"Close",className:"icon-button",disabled:!!c,onClick:()=>y(!1),type:"button",children:"×"})]}),o.jsxs("div",{className:"responsibility-proposal-dialog-body",children:[o.jsxs("div",{className:"responsibility-proposal-header",children:[o.jsxs("div",{children:[o.jsx("strong",{children:"Proposed responsibility"}),o.jsx("p",{children:k?"Review or edit the Markdown before applying it to future turns.":"The proposal becomes actionable after the current turn completes."})]}),o.jsx("span",{children:x})]}),t.responsibilityReason?o.jsx("p",{className:"responsibility-proposal-reason",children:t.responsibilityReason}):null,C?o.jsxs("div",{className:"responsibility-proposal-editor",children:[o.jsxs("div",{className:"responsibility-proposal-tabs",role:"tablist",children:[o.jsx("button",{"aria-selected":h==="source",className:h==="source"?"active":"",role:"tab",type:"button",onClick:()=>m("source"),children:"Source"}),o.jsx("button",{"aria-selected":h==="preview",className:h==="preview"?"active":"",role:"tab",type:"button",onClick:()=>m("preview"),children:"Preview"})]}),h==="source"?o.jsx("textarea",{"aria-label":"Proposed workspace responsibility",className:"responsibility-proposal-body",disabled:!!c,onChange:O=>u(O.target.value),rows:12,value:l}):o.jsx("div",{className:"message-body responsibility-markdown-preview",children:Jl(l,e)})]}):o.jsx("div",{className:"message-body responsibility-markdown-preview saved",children:Jl(l,e)})]}),o.jsx("footer",{className:"responsibility-proposal-dialog-actions",children:C?o.jsxs(o.Fragment,{children:[o.jsx("button",{className:"secondary reject",disabled:!!c,type:"button",onClick:()=>void D("decline"),children:c==="decline"?"Rejecting...":"Reject"}),o.jsx("button",{className:"approve",disabled:!!c,type:"button",onClick:()=>void D("accept"),children:c==="accept"?"Saving...":"Save"})]}):o.jsx("button",{className:"secondary",onClick:()=>y(!1),type:"button",children:"Close"})})]})}):null]})}function nM({tool:e,onRespond:t}){const[n,a]=A.useState(e.body),[l,u]=A.useState(null),[c,f]=A.useState("source"),h=e.meta==="saved"||e.meta==="declined"?e.meta:"pending",m=h==="pending",g=uv(n);return A.useEffect(()=>{a(e.body)},[e.body]),o.jsxs("article",{className:"tool-card responsibility knowledge-proposal","data-hover-time":ut(e.createdAt),title:ut(e.createdAt),children:[o.jsxs("div",{className:"responsibility-proposal-header",children:[o.jsxs("div",{children:[o.jsx("strong",{children:e.title}),o.jsx("p",{children:"Long-term knowledge changes require approval. Keep one item as a reusable source or skill, not a tiny note."})]}),o.jsx("span",{children:h})]}),m?o.jsxs("div",{className:"responsibility-proposal-editor",children:[o.jsxs("div",{className:"responsibility-proposal-tabs",role:"tablist",children:[o.jsx("button",{"aria-selected":c==="source",className:c==="source"?"active":"",role:"tab",type:"button",onClick:()=>f("source"),children:"JSON"}),o.jsx("button",{"aria-selected":c==="preview",className:c==="preview"?"active":"",role:"tab",type:"button",onClick:()=>f("preview"),children:"Preview"})]}),c==="source"?o.jsx("textarea",{"aria-label":"Proposed workspace knowledge",className:"responsibility-proposal-body",disabled:!!l,onChange:y=>a(y.target.value),rows:10,value:n}):g?o.jsx(cv,{value:g}):o.jsx("div",{className:"knowledge-proposal-invalid",children:"Invalid JSON. Fix the proposal before saving."})]}):g?o.jsx(cv,{value:g,saved:!0}):o.jsx("pre",{className:"knowledge-proposal-raw",children:n}),m?o.jsxs("div",{className:"tool-approval-actions responsibility-actions",children:[o.jsx("button",{className:"approve",disabled:!!l,type:"button",onClick:()=>{uv(n)&&(u("accept"),Promise.resolve(t(e,"accept",n)).finally(()=>u(null)))},children:l==="accept"?"Saving...":"Save"}),o.jsx("button",{className:"reject",disabled:!!l,type:"button",onClick:()=>{u("decline"),Promise.resolve(t(e,"decline",n)).finally(()=>u(null))},children:l==="decline"?"Rejecting...":"Reject"})]}):null]})}function uv(e){try{const t=JSON.parse(e);return!t||typeof t!="object"||Array.isArray(t)?null:t}catch{return null}}function cp(e){return typeof e=="string"&&e.trim()?e.trim():typeof e=="number"||typeof e=="boolean"?String(e):"-"}function cv({value:e,saved:t}){return o.jsx("div",{className:`knowledge-proposal-preview${t?" saved":""}`,children:o.jsxs("dl",{children:[o.jsxs("div",{children:[o.jsx("dt",{children:"Name"}),o.jsx("dd",{children:cp(e.name)})]}),o.jsxs("div",{children:[o.jsx("dt",{children:"Purpose"}),o.jsx("dd",{children:cp(e.purpose)})]}),o.jsxs("div",{children:[o.jsx("dt",{children:"Content"}),o.jsx("dd",{children:cp(e.content??e.description)})]})]})})}function rM({conversation:e,tool:t}){var c;const n=t.fileChanges??[],a=e==null?void 0:e.workspacePath,l=xE(n),u=t.meta==="started"||t.meta==="running";return o.jsxs("details",{className:`tool-card file${u?" running":" done"}`,"data-hover-time":ut(t.createdAt),title:ut(t.createdAt),children:[o.jsxs("summary",{children:[o.jsxs("span",{className:"tool-card-summary-title",children:[o.jsx("span",{className:"file-change-indicator","aria-hidden":"true"}),o.jsx("span",{className:"file-change-title",children:vE(n,a)})]}),o.jsx(dv,{additions:l.additions,deletions:l.deletions,running:u})]}),o.jsx("div",{className:"file-change-list",children:n.map((f,h)=>o.jsxs("div",{className:"file-change-row",children:[o.jsx("span",{className:"file-change-kind",children:aM(f.kind)}),o.jsx("code",{title:f.path,children:dx(f.path,a)}),o.jsx(dv,{additions:f.additions,deletions:f.deletions})]},`${f.path}:${h}`))}),(c=t.rawEvents)!=null&&c.length?o.jsxs("details",{className:"tool-raw-details",children:[o.jsx("summary",{children:"Raw events"}),o.jsx("pre",{className:"tool-raw-json",children:JSON.stringify(t.rawEvents,null,2)})]}):null]})}function dv({additions:e,deletions:t,running:n=!1}){return o.jsxs("span",{className:"file-change-stats",children:[n?o.jsx("small",{children:"editing"}):null,e>0?o.jsxs("span",{className:"file-change-additions",children:["+",e]}):null,t>0?o.jsxs("span",{className:"file-change-deletions",children:["-",t]}):null]})}function aM(e){switch(e){case"add":return"A";case"delete":return"D";case"move":return"R";default:return"M"}}function iM({tool:e,onRespondApproval:t}){var k;const n=Cz(e),[a,l]=A.useState(!1),[u,c]=A.useState("script"),f=n==="approval"&&e.approvalRequestId!==void 0&&!!e.approvalTurnId,h=pf(e.body)?null:e.body,m=h?Mz(h):null,g=m?`${lM(n)} · ${m}`:n==="running"?"Running script":n==="approval"?"Waiting for approval":"Command",y=Tz(e,n);return o.jsxs("article",{className:`tool-card command ${n}`,"data-hover-time":ut(e.createdAt),title:ut(e.createdAt),children:[o.jsxs("div",{className:"tool-command-bar",children:[o.jsxs("button",{"aria-expanded":a,className:"tool-command-toggle",type:"button",onClick:()=>l(x=>!x),children:[o.jsx("span",{className:"tool-command-indicator","aria-hidden":"true"}),o.jsx("span",{children:g}),o.jsx("small",{className:"tool-command-badge",children:y})]}),a?o.jsxs("div",{className:"tool-command-tabs",role:"tablist","aria-label":"Command details",children:[o.jsx("button",{"aria-selected":u==="script",role:"tab",type:"button",onClick:()=>c("script"),children:"Script"}),o.jsx("button",{"aria-selected":u==="result",role:"tab",type:"button",onClick:()=>c("result"),children:"Result"}),(k=e.rawEvents)!=null&&k.length?o.jsx("button",{"aria-selected":u==="raw",role:"tab",type:"button",onClick:()=>c("raw"),children:"Raw"}):null]}):null,f?o.jsxs("div",{className:"tool-approval-actions",children:[o.jsx("button",{className:"approve",type:"button",onClick:()=>t(e,"accept"),children:"Approve"}),o.jsx("button",{className:"reject",type:"button",onClick:()=>t(e,"decline"),children:"Reject"})]}):null]}),a?u==="script"?o.jsx("div",{className:"tool-tab-panel",role:"tabpanel",children:h?o.jsx(fv,{content:h}):o.jsx("p",{className:"tool-output-pending",children:"Script unavailable"})}):u==="result"?o.jsxs("div",{className:"tool-tab-panel result",role:"tabpanel",children:[o.jsx("p",{className:"tool-command-result-meta",children:Az(e,n)}),e.output?o.jsx(fv,{content:e.output}):o.jsx("p",{className:"tool-output-pending",children:n==="running"?"Waiting for output...":n==="approval"?"Waiting for approval before running.":e.meta??"No output"})]}):o.jsx(sM,{events:e.rawEvents??[]}):null]})}function lM(e){return e==="running"?"Running":e==="approval"?"Approval required":"Command"}function fv({content:e}){const[t,n]=A.useState(!1),a=Nz(e,tv);return o.jsxs("div",{className:"tool-content-block",children:[o.jsx("pre",{className:"tool-content-code",children:t?e:Ez(e,tv)}),a?o.jsx("button",{className:"tool-content-toggle",type:"button",onClick:()=>n(l=>!l),children:t?"Collapse":"Show all"}):null]})}function sM({events:e}){return o.jsx("div",{className:"tool-tab-panel raw",role:"tabpanel",children:o.jsx("pre",{className:"tool-raw-json",children:JSON.stringify(e,null,2)})})}function Bc({copied:e,content:t,id:n,notice:a,timestamp:l,variant:u,onCopy:c}){return t.trim()?o.jsxs("footer",{className:`turn-panel-footer ${u}${a?" has-notice":""}`,children:[a?o.jsx("span",{"aria-label":`Notification failed: ${a}`,className:"turn-panel-footer-notice",role:"img",title:a,children:o.jsx(eg,{})}):null,o.jsx("time",{dateTime:l,children:ut(l)}),o.jsx("button",{"aria-label":e?"Copied markdown":"Copy markdown",onClick:()=>c(n,t),title:e?"Copied":"Copy",type:"button",children:e?o.jsx("span",{"aria-hidden":"true",children:"Copied"}):o.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"12",viewBox:"0 0 24 24",width:"12",children:[o.jsx("rect",{height:"14",rx:"2",stroke:"currentColor",strokeWidth:"2",width:"14",x:"8",y:"8"}),o.jsx("path",{d:"M4 16V6a2 2 0 0 1 2-2h10",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"})]})})]}):null}function qc(e){return e.type==="message"?e.message.role==="user"?e.message.content:n0(e.message.content):e.type==="assistantText"?n0(e.content):e.type==="turnError"?`Task failed
370
-
371
- ${e.content}`:e.type==="system"?[e.title,e.fullDetail??e.detail].filter(t=>!!(t!=null&&t.trim())).join(`
372
-
373
- `):""}function oM(e){return e.map(qc).filter(t=>t.trim()).join(`
374
-
375
- `)}function uM(e){for(let t=e.length-1;t>=0;t-=1){const n=e[t];if(n.type!=="tool")return n.createdAt}return new Date().toISOString()}function cM({usage:e}){if(!e)return o.jsx("span",{"aria-label":"Usage pending",className:"usage-indicator muted","data-tooltip":"Usage pending",role:"status",tabIndex:0,children:o.jsx("strong",{children:"--"})});const t=[e.accountName??"Codex",e.updatedAt?`更新于 ${ut(e.updatedAt)}`:"尚无额度数据",e.stale?"数据待更新":"",e.syncPending?`正在同步到 ${e.selectedAccountName??"新账户"}`:"",e.error?`最近一次刷新失败:${e.error}`:""].filter(Boolean).join(" · ");return o.jsxs("div",{className:"usage-indicators","aria-label":"Seele usage",children:[e.windows.length===0&&o.jsx("span",{className:"usage-indicator muted",role:"status",tabIndex:0,"aria-label":t,"data-tooltip":t,children:"--"}),e.windows.map(n=>o.jsx(dM,{label:Ex(n.windowDurationMins),window:n,accountTooltip:t},`${n.windowDurationMins}:${n.resetsAt}`))]})}function Ex(e){return e%10080===0?`${e/10080}w`:e%1440===0?`${e/1440}d`:e%60===0?`${e/60}h`:`${e}m`}function dM({label:e,window:t,accountTooltip:n}){const a=Bf(t.usedPercent),l=rg(a),u=`${n?`${n} · `:""}${e} usage ${lb(a)} · resets ${sb(t.resetsAt)}`;return o.jsx("span",{"aria-label":u,className:`usage-indicator ${l}`,"data-tooltip":u,role:"status",style:{"--usage-level":`${a}%`},tabIndex:0,children:o.jsxs("strong",{children:[Math.round(a),"%"]})})}function Nx(e,t,n,a,l,u){const c=[...e].sort(Vc),f=new Map(a.filter(H=>H.parentId===null&&H.nodeType==="agent_turn"&&H.turnId!==null).map(H=>[H.turnId,H.sequence])),h=new Map(a.filter(H=>H.parentId===null&&H.nodeType==="agent_turn"&&H.turnId!==null).map(H=>[H.turnId,H.timelineAt])),m=new Map(a.filter(H=>H.nodeType==="user_message"&&H.entityId!==null).map(H=>[H.entityId,H.sequence])),g=new Map(a.filter(H=>H.nodeType==="user_message"&&H.entityId!==null).map(H=>[H.entityId,H.timelineAt])),y=a.filter(H=>H.parentId===null&&H.nodeType==="system_event"),k=new Map(y.flatMap(H=>{const X=GA(H,n);return X&&f.has(X)?[[H.id,X]]:[]})),x=y.filter(H=>!k.has(H.id)&&H.turnId!==null&&H.subtype.startsWith("input:")),C=y.filter(H=>!k.has(H.id)&&!x.includes(H)),D=new Set(y.flatMap(H=>H.turnId?[H.turnId]:[])),R=lE(t),O=new Map(n.map(H=>[H.id,H])),M=a.filter(H=>H.parentId===null&&H.nodeType==="agent_turn"&&H.turnId!==null).map(H=>H.turnId),L=[...new Set(a.length>0?[...M,...l?[l]:[]]:[...n.map(H=>H.id),...c.flatMap(H=>H.turnId?[H.turnId]:[]),...t.flatMap(H=>H.turnId?[H.turnId]:[])])].map(H=>{var rt,de,ie,Ee;const X=O.get(H),J=c.filter(Oe=>Oe.turnId===H),F=J.filter(Oe=>Oe.role==="user").sort((Oe,Pe)=>{const Xe=g.get(Oe.id)??Oe.createdAt,Mt=g.get(Pe.id)??Pe.createdAt;return Xe.localeCompare(Mt)||Vc(Oe,Pe)}),he=J.filter(Oe=>Oe.role==="assistant"),me=t.filter(Oe=>Oe.turnId===H).sort(Vc),Ae=`turn:${H}`,je=a.filter(Oe=>Oe.parentId===Ae).sort((Oe,Pe)=>Oe.sequence-Pe.sequence),pe=(X==null?void 0:X.origin)??R.get(H),Z=x.filter(Oe=>Oe.turnId===H).sort((Oe,Pe)=>Oe.timelineAt.localeCompare(Pe.timelineAt)||Oe.sequence-Pe.sequence).map(Oe=>dp(Oe,void 0,u)),ge=pe==="timeline_event"?[]:a.length>0?xM(je,me,Pc([H],l),u):Dx(me,Pc([H],l),u),ye=he.map(Oc),oe=vM(ge,ye),U=sE(X);U&&oe.push({id:`turn-error-${U.turnId}`,type:"turnError",createdAt:U.createdAt,content:U.content});const B=me.find(Oe=>Oe.event==="server.wakeup.started"),ee=Fe(B==null?void 0:B.data),z=typeof ee.instruction=="string"?ee.instruction.trim():"",te=pe==="timeline_event"?me[0]:void 0,Te=D.has(H)?null:te?Mx(te,(X==null?void 0:X.startedAt)??new Date(0).toISOString()):pM(pe)?{id:`system-${H}`,type:"system",createdAt:(X==null?void 0:X.startedAt)??((rt=me[0])==null?void 0:rt.createdAt)??new Date(0).toISOString(),title:gM(pe??"system"),detail:yM(pe??"system",z),fullDetail:z||void 0}:null,Re=OM(me),He=(F[0]?g.get(F[0].id):(de=x.find(Oe=>Oe.turnId===H))==null?void 0:de.timelineAt)??h.get(H)??(X==null?void 0:X.startedAt)??((ie=J[0])==null?void 0:ie.createdAt)??((Ee=me[0])==null?void 0:Ee.createdAt)??new Date(0).toISOString();return{id:`turn-${H}`,turnIds:[H],user:Te??(F[0]?Oc(F[0]):null),followupUsers:F.slice(1).map(Oc),acceptedSystemInputs:Z,cotaskNotices:y.filter(Oe=>k.get(Oe.id)===H).map(Oe=>dp(Oe,void 0,u)),agentItems:oe,activity:Re??(Pc([H],l)?{id:-1,title:oe.some(Oe=>Oe.type==="assistantText"&&Oe.streaming)?"Writing response":"Working",createdAt:He,tone:"running"}:null),notificationFailure:RM(me),stopped:(X==null?void 0:X.status)==="cancelled"||me.some(Rx),trailingSystemItems:[],sortAt:He,sortSequence:f.get(H)??null}}),K=c.filter(H=>!H.turnId);L.push(...K.map(H=>({id:`message-${H.id}`,turnIds:[],user:H.role==="user"?Oc(H):null,followupUsers:[],agentItems:H.role==="assistant"?[Oc(H)]:[],activity:null,notificationFailure:null,stopped:!1,sortAt:g.get(H.id)??H.createdAt,sortSequence:m.get(H.id)??null})));const P=new Map(t.map(H=>[String(H.id),H]));return L.push(...C.map(H=>({id:H.id,turnIds:[],user:dp(H,H.entityType==="event"&&H.entityId?P.get(H.entityId):void 0,u),followupUsers:[],agentItems:[],activity:null,notificationFailure:null,stopped:!1,trailingSystemItems:[],sortAt:H.timelineAt,sortSequence:H.sequence}))),L.sort((H,X)=>{const J=H.sortAt.localeCompare(X.sortAt);return J!==0?J:H.sortSequence!==null||X.sortSequence!==null?(H.sortSequence??Number.MAX_SAFE_INTEGER)-(X.sortSequence??Number.MAX_SAFE_INTEGER):0}).map(({sortAt:H,...X})=>X)}function dp(e,t,n){var f,h;if(t||e.entityType==="event")return Mx(t??r1(e),e.createdAt);const a=Fe(e.detail);if(e.subtype==="input:collaboration_notice"||e.subtype==="input:topic_message"){const m=Xp(a,n),g=fM(a.messages,n),y=Array.isArray(a.senderWorkspaceIds)?a.senderWorkspaceIds.filter(x=>typeof x=="string"&&x.trim().length>0):[],k=typeof a.unreadCount=="number"?a.unreadCount:0;return{id:e.id,type:"system",createdAt:e.createdAt,title:m.title,detail:m.detail,visualKind:"topic",topicMessages:g,fullDetail:[`## ${m.title}`,"","**Unread**","",String(k),"","**From**","",y.length>0?y.map(x=>{const C=n.get(x)??x;return`${Vs(C)} (\`${x}\`)`}).join(", "):"Unknown"].join(`
376
- `)}}const l=ux(e.title,e.subtype),u=Ks(a,[e.summary,e.contentMarkdown]),c=[`## ${Vs(l)}`,"",((f=e.contentMarkdown)==null?void 0:f.trim())||((h=e.summary)==null?void 0:h.trim())||"",Object.keys(a).length>0?["","```json",JSON.stringify(a,null,2),"```"].join(`
377
- `):""].filter(Boolean).join(`
378
- `);return{id:e.id,type:"system",createdAt:e.createdAt,title:l,detail:u,fullDetail:c||void 0}}function fM(e,t){if(!Array.isArray(e))return[];const n=new Set,a=[];for(const l of e){const u=Fe(l),c=Je(u.id),f=Je(u.senderWorkspaceId),h=Je(u.contentMarkdown).trim(),m=Je(u.createdAt);!c||n.has(c)||!f||!h||!m||(n.add(c),a.push({id:c,senderWorkspaceId:f,senderName:t.get(f)??(Je(u.senderTitleSnapshot)||f),contentMarkdown:h,createdAt:m}))}return a}function Mx(e,t){return e.event==="server.collaboration.topic_created"?hM(e,t):mM(e,t)}function hM(e,t){const n=Fe(Fe(e.data).topic),a=Je(n.title).trim()||"Untitled Topic",l=Je(n.publicDescription).trim()||"未填写描述",u=Array.isArray(n.members)?n.members.map(Fe):[],c=Je(n.ownerWorkspaceId),f=u.find(y=>Je(y.role)==="owner"||Je(y.workspaceId)===c),h=Je(f==null?void 0:f.workspaceTitleSnapshot).trim()||"Unknown workspace",m=u.filter(y=>Je(y.role)!=="owner"&&Je(y.status)==="active"),g=m.length?m.map(y=>{const k=Je(y.workspaceTitleSnapshot).trim()||"Unknown workspace";return`- ${Vs(k)} (\`${Je(y.workspaceId)}\`)`}):["无"];return{id:`collaboration-topic-created-${e.id}`,type:"system",createdAt:e.createdAt??t,title:"Created",detail:a,visualKind:"topic",fullDetail:["## Topic 已创建","","**名称**","",Vs(a),"","**描述**","",Vs(l),"","**Owner Workspace**","",`${Vs(h)} (\`${c}\`)`,"","**协作 Workspace**","",...g].join(`
379
- `)}}function mM(e,t){const n=Fe(e.data),a=n1(e.data),l=ux(void 0,e.event);return{id:`system-event-${e.id}`,type:"system",createdAt:e.createdAt??t,title:l,detail:Ks(n),visualKind:e.event.startsWith("server.collaboration.")?"topic":void 0,fullDetail:[`## ${Vs(l)}`,"","**Event**","",`\`${e.event}\``,"","```json",JSON.stringify(a??null,null,2),"```"].join(`
380
- `)}}function n1(e,t=""){return Array.isArray(e)?e.map(n=>n1(n)):e&&typeof e=="object"?Object.fromEntries(Object.entries(e).map(([n,a])=>[n,n1(a,n)])):typeof e=="string"&&(t==="wakeAt"||t==="wake_at")&&Ki(e)||e}function pM(e){return e==="system"||e==="wakeup"||e==="runtime-reset"||e==="clone_initialization"}function gM(e){return e==="runtime-reset"?"Runtime reset":e==="clone_initialization"?"Clone initialization":e==="system"?"System action":"Scheduled wakeup"}function yM(e,t){return e==="runtime-reset"?"Thread rebuilt":e==="clone_initialization"?"Activating inherited context":e==="system"?"Workspace runtime action":t?Jx(t,20):"Auto resumed"}function vM(e,t){if(e.some(l=>l.type==="assistantText"))return mf(e);if(t.length===0)return e;const n=[...t],a=[];for(const l of e)l.type==="tool"&&Z1(l.tool)&&X1(n,l.tool)||a.push(l);return mf([...a,...n])}function xM(e,t,n,a){var h;const l=new Map(t.filter(m=>m.id!==void 0).map(m=>[String(m.id),m])),u=new Map,c=new Set;for(const m of e){const g=bM(m,t,l);g.length>0&&c.add(m.id);for(const y of g)u.set(li(y),y)}if(n)for(const m of t)wM(e,m)||u.set(li(m),m);else if(t.length>0&&!e.some(m=>m.phase==="process"))for(const m of t)u.set(li(m),m);for(const m of t){const g=Fe(m.data),y=Fe(g.params);(typeof g.method=="string"&&g.method.startsWith("item/reasoning/")||g.method==="item/completed"&&Fe(y.item).type==="reasoning")&&u.set(li(m),m)}const f=Dx([...u.values()].sort(Vc),n,a);for(const m of e)if(!c.has(m.id)){if(m.nodeType==="agent_text"&&m.subtype!=="final_answer"&&((h=m.contentMarkdown)!=null&&h.trim())){f.push({id:m.id,type:"assistantText",createdAt:m.createdAt,content:m.contentMarkdown,phase:kM(m),itemId:m.entityType==="codex_item"?m.entityId??void 0:void 0,streaming:n&&m.status==="running"});continue}m.nodeType==="operation"&&f.push({id:m.id,type:"tool",createdAt:m.createdAt,tool:SM(m,a)})}return mf(f)}function bM(e,t,n){if(e.entityType==="event"&&e.entityId){const a=n.get(e.entityId);return a&&e.phase==="process"&&e.status==="running"?[{...a,timelineSequence:e.sequence}]:[{...r1(e),seq:a==null?void 0:a.seq}]}if(e.entityType==="codex_item"&&e.entityId){const a=t.filter(l=>K1(l)===e.entityId);return a.length>0?a.map(l=>({...l,timelineSequence:e.sequence})):[r1(e)]}return[]}function r1(e){const t=Fe(e.detail),n=e.subtype==="server.collaboration.message_staged"&&e.phase==="result"?e.status==="failed"?"server.collaboration.message_rejected":Je(t.messageId)?"server.collaboration.message_sent":e.subtype:e.subtype;return{id:e.entityId??e.id,turnId:e.turnId,timelineSequence:e.sequence,event:e.entityType==="codex_item"?"codex.notification":n,data:e.detail,createdAt:e.updatedAt||e.createdAt}}function wM(e,t){const n=t.id===void 0?null:String(t.id),a=K1(t);return e.some(l=>n!==null&&l.entityType==="event"&&l.entityId===n||a!==null&&l.entityType==="codex_item"&&l.entityId===a)}function K1(e){if(e.event!=="codex.notification"&&e.event!=="server.item.snapshot")return null;const t=Fe(e.data),n=Fe(t.params),a=Fe(n.item);return Je(a.id)||Je(n.itemId)||null}function kM(e){return e.subtype==="final_answer"?"final_answer":e.phase==="process"?"commentary":"unknown"}function SM(e,t){var a,l;const n=Fe(e.detail);return{id:e.id,kind:e.status==="failed"?"error":"activity",title:e.subtype==="input:collaboration_notice"?Xp(n,t).title:e.title||eb(e.subtype),body:e.subtype==="input:collaboration_notice"?Xp(n,t).detail:((a=e.summary)==null?void 0:a.trim())||((l=e.contentMarkdown)==null?void 0:l.trim())||Yx(n),createdAt:e.createdAt,itemId:e.entityType==="codex_item"?e.entityId??void 0:void 0,meta:e.status}}function Dx(e,t,n){const a=[],l=new Map,u=new Map,c=new Map,f=new Map,h=new Map;for(const m of e){const g=nE(l,m.data);if(g){const O=rE(g);let M=u.get(g.itemId);!M&&O&&(M={id:`reasoning-${m.id}`,type:"reasoning",createdAt:m.createdAt??new Date().toISOString(),content:O,streaming:!1},u.set(g.itemId,M),a.push(M)),M&&(M.content=O,M.streaming=t&&!g.completed);continue}if(m.event==="server.workspace_change.decision"||m.event==="server.responsibility.decision"){AM(a,m);continue}if(m.event==="server.knowledge.decision"){EM(a,m);continue}if(Rx(m)){zM(a);continue}if(m.event==="server.steer"){const O=Fe(m.data),M=typeof O.content=="string"?O.content.trim():typeof O.message=="string"?O.message.trim():"";a.push({id:`steer-${m.id}`,type:"steerMarker",createdAt:m.createdAt??new Date().toISOString(),content:M||"Additional input",messageId:typeof O.messageId=="string"?O.messageId:void 0});continue}const y=Vz(m.data);y!=null&&y.itemId&&h.set(y.itemId,y.phase);const k=Gz(m.data);if(k!=null&&k.text){const O=k.itemId?h.get(k.itemId)??k.phase:k.phase,M=k.itemId??`phase:${O}`,q=`${c.get(M)??""}${k.text}`,L=qx(q),K=f.get(M)??"",P=L.startsWith(K)?L.slice(K.length):L;if(c.set(M,q),f.set(M,L),P){const H=a[a.length-1];(H==null?void 0:H.type)==="assistantText"&&MM(H,k.itemId,O)?(H.content+=P,H.itemId=H.itemId??k.itemId,H.streamKey=H.streamKey??M,H.streaming=t):a.push({id:`assistant-event-${m.id}`,type:"assistantText",createdAt:m.createdAt??new Date().toISOString(),content:P,phase:O,itemId:k.itemId,streamKey:M,streaming:t})}continue}const x=Yz(m.data);if(x!=null&&x.text){const O=n0(x.text),M=x.itemId??`phase:${x.phase}`,q=DM(a,x.itemId,x.phase);if(q>=0&&CM(a,q,x.itemId,x.phase,M,O,m))continue;if(q>=0){const L=a[q];L.type==="assistantText"&&(O?(L.content=O,L.phase=x.phase,L.itemId=L.itemId??x.itemId,L.streamKey=L.streamKey??M,L.streaming=!1,TM(a,q,x.itemId)):a.splice(q,1))}else O&&a.push({id:`assistant-completed-${m.id}`,type:"assistantText",createdAt:m.createdAt??new Date().toISOString(),content:O,phase:x.phase,itemId:x.itemId,streamKey:M,streaming:!1});continue}const C=wz(m,n);if(C){C.rawEvents=[m];const O=mv(a,C);if(O>=0){pv(a[O],C);continue}if(Z1(C)&&X1(a,C)||C.kind==="command"&&C.meta==="running"&&pf(C.body))continue;a.push({id:`tool-${C.id}`,type:"tool",createdAt:C.createdAt,tool:C});continue}const D=kz(m);if(D){D.rawEvents=[m];const O=mv(a,D);if(O>=0){pv(a[O],D);continue}a.push({id:`tool-${D.id}`,type:"tool",createdAt:D.createdAt,tool:D});continue}if(mE(m)){jM(a,m);continue}const R=Sz(m);R&&(R.rawEvents=[m],a.push({id:`tool-${R.id}`,type:"tool",createdAt:R.createdAt,tool:R}))}return mf(a)}function jM(e,t){const n=K1(t);if(n)for(let a=e.length-1;a>=0;a-=1){const l=e[a];if(!(l.type!=="tool"||l.tool.itemId!==n)){l.tool={...l.tool,rawEvents:Ox(l.tool.rawEvents,[t])};return}}}function CM(e,t,n,a,l,u,c){const f=e.reduce((x,C,D)=>C.type==="steerMarker"?D:x,-1);if(f<=t)return!1;const h=e.flatMap((x,C)=>x.type==="assistantText"&&(C===t||(n?x.itemId===n:x.streamKey===l))?[{item:x,index:C}]:[]),m=[...h].reverse().find(({index:x})=>x>f),g=h.filter(x=>x!==m),y=g.map(({item:x})=>x.content).join("");if(!u.startsWith(y)){const x=new Set(h.map(({item:C})=>C));for(let C=e.length-1;C>=0;C--)x.has(e[C])&&e.splice(C,1);return u&&e.push({id:`assistant-completed-${c.id}`,type:"assistantText",createdAt:c.createdAt??new Date().toISOString(),content:u,phase:a,itemId:n,streamKey:l,streaming:!1}),!0}for(const{item:x}of g)x.streaming=!1,x.phase=a;const k=u.slice(y.length);return m?k?(m.item.content=k,m.item.streaming=!1,m.item.phase=a):e.splice(m.index,1):k&&e.push({id:`assistant-completed-${c.id}`,type:"assistantText",createdAt:c.createdAt??new Date().toISOString(),content:k,phase:a,itemId:n,streamKey:l,streaming:!1}),!0}function TM(e,t,n){if(n)for(let a=e.length-1;a>t;a-=1){const l=e[a];l.type==="assistantText"&&l.itemId===n&&e.splice(a,1)}}function AM(e,t){const n=Fe(t.data),a=typeof n.proposalId=="string"?n.proposalId:void 0,l=typeof n.decision=="string"?n.decision:void 0,u=Fe(n.payload),c=Je(u.content)||(typeof n.responsibility=="string"?n.responsibility:void 0);if(!(!a||l!=="accept"&&l!=="decline"))for(let f=e.length-1;f>=0;f-=1){const h=e[f];if(h.type==="tool"&&(h.tool.kind==="responsibility"||h.tool.kind==="workspaceChange")&&(h.tool.workspaceChangeProposalId===a||h.tool.responsibilityProposalId===a)){const m=BE(h.tool.meta,l);h.tool={...h.tool,title:m==="saved"?"Workspace change applied":"Workspace change declined",meta:m,body:m==="saved"?c??h.tool.body:h.tool.body,workspaceChangePayload:m==="saved"&&Object.keys(u).length>0?u:h.tool.workspaceChangePayload};return}}}function EM(e,t){const n=Fe(t.data),a=typeof n.proposalId=="string"?n.proposalId:void 0,l=typeof n.decision=="string"?n.decision:void 0,u=Fe(n.knowledge);if(!(!a||l!=="accept"&&l!=="decline"))for(let c=e.length-1;c>=0;c-=1){const f=e[c];if(f.type==="tool"&&f.tool.kind==="knowledge"&&f.tool.knowledgeProposalId===a){f.tool={...f.tool,title:l==="accept"?"Knowledge saved":"Knowledge proposal declined",meta:l==="accept"?"saved":"declined",body:l==="accept"&&Object.keys(u).length>0?JSON.stringify(u,null,2):f.tool.body};return}}}function X1(e,t){const n=zx(t);if(typeof n!="number")return!1;for(let u=0;u<e.length;u+=1){const c=e[u];if(c.type!=="assistantText"||!hv(c,t))continue;const f=n0(c.content);f!==c.content&&(e[u]={...c,content:f})}let a=0,l=-1;for(let u=0;u<e.length;u+=1){const c=e[u];if(c.type!=="assistantText"||!hv(c,t))continue;l=u;const f=a,h=f+c.content.length;if(a=h,n>=h)continue;const m=Math.max(0,Math.min(c.content.length,n-f)),g=c.content.slice(0,m).trimEnd(),y=c.content.slice(m).trimStart(),k=[];return g&&k.push({...c,id:`${c.id}:before-tool-${t.id}`,content:g,pinnedToResult:!0}),k.push({id:`tool-${t.id}`,type:"tool",createdAt:t.createdAt,tool:t}),y&&k.push({...c,id:`${c.id}:after-tool-${t.id}`,content:y,pinnedToResult:!0}),e.splice(u,1,...k),!0}if(l>=0&&n>=a){const u=e[l];return(u==null?void 0:u.type)==="assistantText"&&(e[l]={...u,pinnedToResult:!0}),e.splice(l+1,0,{id:`tool-${t.id}`,type:"tool",createdAt:t.createdAt,tool:t}),!0}return!1}function hv(e,t){return!t.anchorStreamKey||e.streamKey===t.anchorStreamKey}function mf(e){const t=[],n=[];for(const u of e){if(u.type==="tool"&&Z1(u.tool)){t.push(u.tool);continue}n.push(u)}const a=[...n],l=[];for(const u of t)X1(a,u)||l.push({id:`tool-${u.id}`,type:"tool",createdAt:u.createdAt,tool:u});return NM([...l,...a])}function Z1(e){return typeof zx(e)=="number"}function zx(e){if(typeof e.anchorOffset=="number")return e.anchorOffset;if(e.kind==="responsibility")return e.responsibilityAnchorOffset;if(e.kind==="knowledge")return e.knowledgeAnchorOffset}function NM(e){const t=[];for(let n=0;n<e.length;n+=1){const a=e[n],l=e[n+1];if((a==null?void 0:a.type)==="tool"&&a.tool.kind==="responsibility"&&typeof a.tool.responsibilityAnchorOffset!="number"&&(l==null?void 0:l.type)==="assistantText"){t.push({...l,pinnedToResult:!0}),t.push(a),n+=1;continue}t.push(a)}return t}function MM(e,t,n){return e.type!=="assistantText"?!1:e.itemId&&t?e.itemId===t:e.itemId||t?!1:e.phase===n}function DM(e,t,n){if(t){const a=e.findIndex(l=>l.type==="assistantText"&&l.itemId===t);if(a>=0)return a}for(let a=e.length-1;a>=0;a-=1){const l=e[a];if(l.type==="assistantText"&&l.streaming&&(!t||!l.itemId)&&(l.phase===n||l.phase==="unknown"||n==="unknown"))return a}return-1}function Rx(e){return e.event==="server.stop"||e.event==="server.stopped"}function zM(e){for(const t of e)t.type==="tool"&&t.tool.kind==="command"&&t.tool.meta==="running"&&(t.tool={...t.tool,title:"Command stopped",meta:"stopped"})}function RM(e){for(let t=e.length-1;t>=0;t-=1){const n=e[t];if(n.event!=="server.notification.failed")continue;const a=Fe(n.data);return typeof a.message=="string"?a.message:"Notification failed"}return null}function OM(e){for(let t=e.length-1;t>=0;t-=1){const n=tb(e[t]);if(n)return n}return null}function mv(e,t){for(let n=e.length-1;n>=0;n-=1){const a=e[n];if(a.type==="tool"&&a.tool.kind===t.kind&&(t.itemId&&a.tool.itemId===t.itemId||a.tool.body===t.body&&a.tool.meta==="running"))return n}return-1}function pv(e,t){if(e.type!=="tool")return;const n=e.tool.kind==="command"&&e.tool.meta!=="running"&&t.meta==="running",a=e.tool.kind==="command"&&t.kind==="command"&&pf(t.body)&&!pf(e.tool.body);e.tool={...e.tool,...t,id:e.tool.id,createdAt:e.tool.createdAt,title:n?e.tool.title:t.title,body:a?e.tool.body:t.body,meta:n?e.tool.meta:t.meta,output:t.outputKind?FA(e.tool.output,t.output,t.outputKind):Oz(e.tool.output,t.output),topicRecipientLabel:t.topicRecipientLabel??e.tool.topicRecipientLabel,topicMessageContent:t.topicMessageContent??e.tool.topicMessageContent,rawEvents:Ox(e.tool.rawEvents,t.rawEvents)}}function Ox(e,t){const n=[...e??[],...t??[]];if(n.length===0)return;const a=new Set;return n.filter(l=>{const u=li(l);return a.has(u)?!1:(a.add(u),!0)})}function Oc(e){return{id:`message-${e.id}`,type:"message",createdAt:e.createdAt,message:e}}function Wd(e,t){const n=new Set,a=[...e,...t].filter(l=>n.has(l.id)?!1:(n.add(l.id),!0));return a.filter(l=>Ix(l)?!a.some(u=>IM(u,l)):!0)}function Kd(e,t){const n=new Map;for(const a of[...e,...t])n.set(a.id,a);return[...n.values()].sort((a,l)=>Date.parse(a.startedAt)-Date.parse(l.startedAt))}function Xd(e,t){const n=new Map;for(const a of[...e,...t])n.set(a.id,a);return[...n.values()].sort((a,l)=>a.timelineAt.localeCompare(l.timelineAt)||a.sequence-l.sequence)}function Ix(e){return e.id.startsWith("local-")}function IM(e,t){if(Ix(e)||e.role!==t.role||e.content.trim()!==t.content.trim())return!1;const n=Date.parse(e.createdAt),a=Date.parse(t.createdAt);return Number.isNaN(n)||Number.isNaN(a)?!1:Math.abs(n-a)<=12e4}function qd(e,t){const n=new Map,a=new Map;for(const u of[...e,...t]){const c=li(u);a.has(c)||a.set(c,a.size),n.set(c,u)}return[...n.values()].sort((u,c)=>{const f=_x(u,c);return f!==0?f:(a.get(li(u))??0)-(a.get(li(c))??0)})}function gv(e,t){const n=li(t),a=e.findIndex(u=>li(u)===n);if(a<0)return[...e,t];if(_M(e[a],t))return e;const l=[...e];return l[a]=t,l}function _M(e,t){return e.turnId===t.turnId&&e.event===t.event&&e.createdAt===t.createdAt&&e.seq===t.seq&&JSON.stringify(e.data)===JSON.stringify(t.data)}function li(e){return e.id!==void 0?`${typeof e.id}:${e.id}`:`${e.event}:${e.createdAt??""}:${JSON.stringify(e.data)}`}function Vc(e,t){const n=_x(e,t);return n!==0?n:LM(e.id,t.id)}function _x(e,t){if(e.turnId&&t.turnId&&e.turnId===t.turnId&&typeof e.seq=="number"&&typeof t.seq=="number"&&e.seq!==t.seq)return e.seq-t.seq;const n=Date.parse(e.createdAt??""),a=Date.parse(t.createdAt??"");return!Number.isNaN(n)&&!Number.isNaN(a)&&n!==a?n-a:Number.isNaN(n)!==Number.isNaN(a)?Number.isNaN(n)?1:-1:e.turnId&&e.turnId===t.turnId&&typeof e.timelineSequence=="number"&&typeof t.timelineSequence=="number"?e.timelineSequence-t.timelineSequence:0}function LM(e,t){return e===t?0:e===void 0?1:t===void 0?-1:typeof e=="number"&&typeof t=="number"?e-t:String(e).localeCompare(String(t))}function yv(e,t){const n=Fe(e.data);return typeof n.__seq=="number"&&typeof n.__createdAt=="string"&&Object.prototype.hasOwnProperty.call(n,"payload")?{id:typeof n.__eventId=="string"?n.__eventId:`stream:${n.__turnId??"unknown"}:${n.__seq}`,turnId:typeof n.__turnId=="string"?n.__turnId:null,seq:n.__seq,event:e.event,data:n.payload,createdAt:n.__createdAt}:{id:t,turnId:e.turnId??null,event:e.event,data:e.data,createdAt:e.createdAt??new Date().toISOString()}}const ru=A.memo(function({content:t,conversation:n,streaming:a,onPreviewArtifact:l,onCopyArtifactUrl:u,copiedArtifactUrl:c}){const f=a?qx(t):n0(t),h=n&&!a?GM(f,n):[];return o.jsxs(o.Fragment,{children:[a?o.jsx(UM,{content:f,conversation:n}):Jl(f,n),h.length>0?o.jsx("div",{className:"artifact-preview-list",children:h.map(m=>o.jsx(PM,{artifact:m,onPreview:l,onCopyUrl:u,copied:c===m.url},m.id))}):null]})},BM);function BM(e,t){var n,a,l,u;return e.content===t.content&&e.streaming===t.streaming&&e.copiedArtifactUrl===t.copiedArtifactUrl&&((n=e.conversation)==null?void 0:n.id)===((a=t.conversation)==null?void 0:a.id)&&((l=e.conversation)==null?void 0:l.workspacePath)===((u=t.conversation)==null?void 0:u.workspacePath)}function vv({content:e}){return o.jsx("div",{className:"plain-message-content",children:e})}const qM=2;function UM({content:e,conversation:t}){const n=A.useRef(null),[a,l]=A.useState(null),{committedBlocks:u,activeBlock:c}=HM(e);return A.useLayoutEffect(()=>{const f=n.current;if(!f)return;const h=parseFloat(window.getComputedStyle(f).lineHeight)||28,m=f.scrollHeight;l(g=>{const y=h*qM,k=Math.min(m,y);return g!==null&&k<=g?g:k})},[e]),o.jsxs("div",{className:"streaming-message-content",ref:n,style:a===null?void 0:{minHeight:a},children:[u.map((f,h)=>o.jsx(A.Fragment,{children:Jl(f,t)},`${h}:${f.length}`)),c?o.jsx("p",{className:"streaming-active-line",children:c}):null]})}function HM(e){const t=FM(e),n=t>0?e.slice(0,t):"",a=e.slice(t);return{committedBlocks:$M(n),activeBlock:a}}function $M(e){const t=[];let n=0,a=!1,l=!1;const u=e.match(/[^\n]*(?:\n|$)/g)??[];let c=0;for(const f of u){if(!f)continue;const h=f.trim(),m=c;if(c+=f.length,/^\s*(```|~~~)/.test(f)){a=!a,a||(Ud(t,e.slice(n,c)),n=c);continue}if(a)continue;if(/^\s*\|.*\|\s*$/.test(f)||/^\s*:?-{3,}:?\s*(\|\s*:?-{3,}:?\s*)+\|?\s*$/.test(f)){l=!0;continue}l&&(Ud(t,e.slice(n,m)),n=m,l=!1),h===""&&(Ud(t,e.slice(n,c)),n=c)}return n<e.length&&Ud(t,e.slice(n)),t}function Ud(e,t){t.trim()&&e.push(t)}function FM(e){const t=e.lastIndexOf(`
381
- `);if(t<0)return 0;const n=[0];for(let l=0;l<e.length;l+=1)e[l]===`
382
- `&&l+1<e.length&&n.push(l+1);let a=-1;for(const l of n){const u=e.indexOf(`
383
- `,l),c=e.slice(l,u===-1?e.length:u);/^\s*(```|~~~)/.test(c)&&(a=a===-1?l:-1)}return a>=0?a:t+1}function PM({artifact:e,onPreview:t,onCopyUrl:n,copied:a}){return e?o.jsxs("figure",{className:"artifact-preview",children:[o.jsx("button",{className:"artifact-preview-media",onClick:()=>t(e),type:"button",children:o.jsx("img",{alt:e.name,src:e.url})}),o.jsxs("figcaption",{children:[o.jsx("span",{children:e.name}),o.jsxs("div",{className:"artifact-preview-actions",children:[o.jsx("button",{onClick:()=>t(e),type:"button",children:"Preview"}),o.jsx("a",{href:e.url,rel:"noreferrer",target:"_blank",children:"Open"}),o.jsx("button",{onClick:()=>n(e),type:"button",children:a?"Copied":"Copy"})]})]})]}):null}function GM(e,t){const n=new Map;for(const a of VM(e)){const l=Lx(a);if(l){const u=Bx(l).toLowerCase(),c=n.get(u);(!c||KM(l,c))&&n.set(u,l)}}return Array.from(n.values()).map(a=>YM(a,t)).filter(a=>a!==null)}function VM(e){const t=[],n=/!\[[^\]]*]\(([^)]+)\)/g,a=/\[[^\]]+]\(([^)]+)\)/g,l=/(?:artifact|preview|image|file)\s*:\s*(`?[^`\n]+?\.(?:svg|png|jpe?g|webp|gif)`?)/gim;for(const u of[n,a,l]){let c;for(;(c=u.exec(e))!==null;)t.push(c[1])}return t}function YM(e,t){const n=Lx(e);if(!n||!WM(n))return null;const a=mx(n,t.workspacePath);return{id:`${t.id}:${a}`,path:a,name:Bx(a),url:Ne(`conversations/${t.id}/files?path=${encodeURIComponent(a)}`)}}function Lx(e){const t=e.trim().replace(/^`+|`+$/g,"").replace(/[),.;:,。;:]+$/g,"");return t||null}function WM(e){return/\.(?:svg|png|jpe?g|webp|gif)$/i.test(e)}function Bx(e){return e.replace(/\\/g,"/").split("/").filter(Boolean).pop()??e}function KM(e,t){return e.startsWith("/")&&!t.startsWith("/")?!0:e.length>t.length}function n0(e){return e.trim()}function qx(e){return e.trim()}function xv(e){return e instanceof DOMException&&e.name==="AbortError"||e instanceof Error&&e.name==="AbortError"}function XM(e){return{a({children:t,href:n}){if(!n)return o.jsx(o.Fragment,{children:t});const a=/^[a-z][a-z\d+.-]*:/i.test(n),l=hx(n);if(n.startsWith("seele-public:")&&!l)return o.jsxs("span",{title:"无效的 Seele Public URL 地址",children:[t,"(地址格式无效)"]});const u=!a&&e?ZM(n,e):null,c=l?Ne(`deployment/public-link?path=${encodeURIComponent(l)}`):u??n,f=a||!!u;return o.jsx("a",{className:"markdown-link",href:c,rel:f?"noreferrer":void 0,target:f?"_blank":void 0,children:t})},img(){return null},pre({children:t}){const n=JM(t);return n?Q1(n.language)==="mermaid"?o.jsx(eD,{code:n.code}):o.jsx(rD,{code:n.code,language:n.language}):o.jsx("pre",{children:t})},table({children:t}){return o.jsx("div",{className:"markdown-table-wrap",children:o.jsx("table",{className:"markdown-table",children:t})})},td({align:t,children:n}){return o.jsx("td",{style:bv(t),children:n})},th({align:t,children:n}){return o.jsx("th",{style:bv(t),children:n})}}}function ZM(e,t){if(!e||e.startsWith("#")||e.startsWith("/api/")||e.startsWith("?"))return null;const n=HE(e,t.workspacePath);if(!n)return null;const a=n.line?`#L${n.line}${n.column?`C${n.column}`:""}`:"";return`${Ne(`conversations/${t.id}/files?path=${encodeURIComponent(n.path)}`)}${a}`}function bv(e){return e&&e!=="char"?{textAlign:e}:void 0}function Jl(e,t){const n=cA(QM(e));return o.jsx(Xk,{urlTransform:a=>hx(a)?a:C5(a),components:XM(t),remarkPlugins:[sC,uA],rehypePlugins:[[$A,{trust:!1,strict:"ignore"}]],skipHtml:!0,children:n})}function QM(e){return e.replace(/([^\n])(```[^\n`]*(?:\r?\n|$))/g,`$1
384
- $2`)}function JM(e){var u;const t=A.Children.toArray(e),n=t.length===1&&A.isValidElement(t[0])?t[0]:null;if(!n||n.type!=="code")return null;const l=((u=(n.props.className??"").match(/(?:^|\s)language-([^\s]+)/))==null?void 0:u[1])??"";return{code:a1(n.props.children).replace(/\n$/,""),language:l}}function a1(e){return e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"||typeof e=="bigint"?String(e):Array.isArray(e)?e.map(a1).join(""):A.isValidElement(e)?a1(e.props.children):""}const Ux="github-light",fp=new Map,hp=new Map;let mp=null,pp=null;const Hx=new Set(["bash","css","diff","dockerfile","html","java","javascript","json","jsonc","jsx","markdown","python","shellscript","sql","toml","tsx","typescript","xml","yaml"]);function Q1(e){const t=e.trim().toLowerCase().replace(/^\./,"");return{bash:"bash",cjs:"javascript",console:"shellscript",htm:"html",js:"javascript",jsx:"jsx",md:"markdown",mjs:"javascript",py:"python",rb:"ruby",shell:"bash",ts:"typescript",tsx:"tsx",yml:"yaml",zsh:"bash"}[t]??t}function $x(e){const t=Q1(e);return!t||t==="text"||t==="txt"?"text":Hx.has(t)?t:"text"}function eD({code:e}){const n=`seele-mermaid-${A.useId().replace(/[^a-zA-Z0-9_-]/g,"")}`,[a,l]=A.useState(!1),[u,c]=A.useState(()=>hp.get(e)??null),[f,h]=A.useState(null);A.useEffect(()=>{let g=!1,y;const k=hp.get(e);return k?(c(k),h(null),()=>{g=!0}):(h(null),c(null),tD(n,e).then(x=>{g||(y!==void 0&&window.clearTimeout(y),hp.set(e,x),c(x),h(null))},x=>{if(!g){const C=x instanceof Error?x.message:String(x);y=window.setTimeout(()=>{g||h(C)},XE)}}),()=>{g=!0,y!==void 0&&window.clearTimeout(y)})},[e,n]);async function m(){await navigator.clipboard.writeText(e),l(!0),window.setTimeout(()=>l(!1),1200)}return o.jsxs("figure",{className:`mermaid-block${f?" error":""}`,children:[o.jsx("span",{className:"code-block-kind",children:"mermaid"}),o.jsx("div",{className:"code-block-tools",children:o.jsx("button",{"aria-label":a?"Copied Mermaid source":"Copy Mermaid source",className:a?"copied":"",onClick:()=>void m(),title:a?"Copied":"Copy",type:"button",children:o.jsx(J1,{})})}),u?o.jsx("div",{className:"mermaid-diagram",dangerouslySetInnerHTML:{__html:u}}):f?o.jsxs("div",{className:"mermaid-error",children:[o.jsx("strong",{children:"Mermaid render failed"}),o.jsx("pre",{children:f}),o.jsx("code",{children:e})]}):o.jsx("div",{className:"mermaid-loading",children:"Rendering diagram..."})]})}async function tD(e,t){return(await(await nD()).render(e,t)).svg}function nD(){return pp||(pp=an(()=>import("./mermaid.core-ChGHXuOh.js").then(e=>e.bp),[],import.meta.url).then(e=>{const t=e.default;return t.initialize({startOnLoad:!1,securityLevel:"strict",theme:"base",themeVariables:{background:"#ffffff",primaryColor:"#f9fafa",primaryBorderColor:"#d8d9e8",primaryTextColor:"#0b0f16",lineColor:"#7a8294",secondaryColor:"#f5f5fb",tertiaryColor:"#ffffff",fontFamily:'Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'}}),t})),pp}function rD({code:e,language:t,reserveHeight:n=!1}){const[a,l]=A.useState(!1),[u,c]=A.useState(()=>{if(!Sv(t))return null;const m=kv(e,t);return fp.get(m)??null}),f=n?{"--code-block-min-height":`${lN(e)}px`}:void 0;A.useEffect(()=>{let m=!1;if(!Sv(t))return c(null),()=>{m=!0};const g=kv(e,t),y=fp.get(g);return y?(c(y),()=>{m=!0}):(c(null),cD(e,t).then(k=>{fp.set(g,k),m||c(k)}).catch(k=>{console.warn("Failed to highlight code block",k),m||c(null)}),()=>{m=!0})},[e,t]);async function h(){await navigator.clipboard.writeText(e),l(!0),window.setTimeout(()=>l(!1),1200)}return o.jsxs("figure",{className:"code-block",style:f,children:[t?o.jsx("span",{className:"code-block-kind",children:t}):null,o.jsx("div",{className:"code-block-tools",children:o.jsx("button",{"aria-label":a?"Copied code block":"Copy code block",className:a?"copied":"",onClick:()=>void h(),title:a?"Copied":"Copy",type:"button",children:o.jsx(J1,{})})}),u?o.jsx("div",{className:"code-block-shiki",dangerouslySetInnerHTML:{__html:u}}):o.jsx("pre",{children:o.jsx("code",{children:e})})]})}function J1(){return o.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"13",viewBox:"0 0 24 24",width:"13",children:[o.jsx("rect",{height:"14",rx:"2",stroke:"currentColor",strokeWidth:"2",width:"14",x:"8",y:"8"}),o.jsx("path",{d:"M4 16V6a2 2 0 0 1 2-2h10",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"})]})}function Fx(){return o.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"16",viewBox:"0 0 24 24",width:"16",children:[o.jsx("circle",{cx:"6",cy:"5",r:"2",stroke:"currentColor",strokeWidth:"2"}),o.jsx("circle",{cx:"18",cy:"5",r:"2",stroke:"currentColor",strokeWidth:"2"}),o.jsx("circle",{cx:"12",cy:"19",r:"2",stroke:"currentColor",strokeWidth:"2"}),o.jsx("path",{d:"M6 7v1a6 6 0 0 0 6 6v3M18 7v1a6 6 0 0 1-6 6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})]})}function eg(){return o.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"12",viewBox:"0 0 24 24",width:"12",children:[o.jsx("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"2.2"}),o.jsx("path",{d:"M12 7v6",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2.4"}),o.jsx("circle",{cx:"12",cy:"17",fill:"currentColor",r:"1.25"})]})}function aD(){return o.jsx("svg",{"aria-hidden":"true",fill:"none",height:"18",viewBox:"0 0 24 24",width:"18",children:o.jsx("path",{d:"M4 7h16M4 12h16M4 17h16",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"})})}function iD(){return o.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"14",viewBox:"0 0 24 24",width:"14",children:[o.jsx("path",{d:"M7 7h10M7 12h10M7 17h10",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"}),o.jsx("circle",{cx:"4",cy:"7",fill:"currentColor",r:"1.4"}),o.jsx("circle",{cx:"4",cy:"12",fill:"currentColor",r:"1.4"}),o.jsx("circle",{cx:"4",cy:"17",fill:"currentColor",r:"1.4"})]})}function wv(){return o.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"14",viewBox:"0 0 24 24",width:"14",children:[o.jsx("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor",strokeWidth:"2"}),o.jsx("path",{d:"M19 12a7.8 7.8 0 0 0-.1-1l2-1.5-2-3.4-2.4 1a8 8 0 0 0-1.8-1l-.3-2.6h-4l-.3 2.6a8 8 0 0 0-1.8 1l-2.4-1-2 3.4 2 1.5a7.8 7.8 0 0 0 0 2l-2 1.5 2 3.4 2.4-1a8 8 0 0 0 1.8 1l.3 2.6h4l.3-2.6a8 8 0 0 0 1.8-1l2.4 1 2-3.4-2-1.5c.1-.3.1-.7.1-1Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.7"})]})}function lD(){return o.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"14",viewBox:"0 0 24 24",width:"14",children:[o.jsx("rect",{height:"16",rx:"2.6",stroke:"currentColor",strokeWidth:"1.8",width:"18",x:"3",y:"4"}),o.jsx("path",{d:"m7 9 3 3-3 3M12.5 15h4.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.9"})]})}function Zd(){return o.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"17",viewBox:"0 0 24 24",width:"17",children:[o.jsx("circle",{cx:"7",cy:"12",r:"2.4",stroke:"currentColor",strokeWidth:"1.8"}),o.jsx("circle",{cx:"17",cy:"7",r:"2.4",stroke:"currentColor",strokeWidth:"1.8"}),o.jsx("circle",{cx:"17",cy:"17",r:"2.4",stroke:"currentColor",strokeWidth:"1.8"}),o.jsx("path",{d:"m9.2 10.9 5.6-2.8M9.2 13.1l5.6 2.8",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.8"})]})}function Lf(){return o.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"13",viewBox:"0 0 24 24",width:"13",children:[o.jsx("path",{d:"m4 16-.8 4 4-.8L18.4 8 15.2 4.8 4 16Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"2"}),o.jsx("path",{d:"m13.8 6.2 3.2 3.2",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"})]})}function sD(){return o.jsx("svg",{"aria-hidden":"true",fill:"none",height:"14",viewBox:"0 0 24 24",width:"14",children:o.jsx("path",{d:"M5 8v11h14V8M4 4h16v4H4zM9 12h6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}function oD(){return o.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"14",viewBox:"0 0 24 24",width:"14",children:[o.jsx("path",{d:"M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"2"}),o.jsx("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor",strokeWidth:"2"})]})}function uD(){return o.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"14",viewBox:"0 0 24 24",width:"14",children:[o.jsx("path",{d:"M3 3l18 18",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"}),o.jsx("path",{d:"M9.9 5.4A9.8 9.8 0 0 1 12 5c6 0 9.5 7 9.5 7a15.5 15.5 0 0 1-3 3.8M6.2 6.8C3.8 8.4 2.5 12 2.5 12s3.5 7 9.5 7a9.7 9.7 0 0 0 4-.8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})]})}function kv(e,t){return`${Ux}:${$x(t)}:${e}`}function Sv(e){const t=Q1(e);return!!t&&Hx.has(t)}async function cD(e,t){return(await dD()).codeToHtml(e,{lang:$x(t),theme:Ux})}function dD(){return mp||(mp=fD()),mp}async function fD(){const[{createHighlighterCore:e},{createJavaScriptRegexEngine:t},{default:n},{default:a},{default:l},{default:u},{default:c},{default:f},{default:h},{default:m},{default:g},{default:y},{default:k},{default:x},{default:C},{default:D},{default:R},{default:O},{default:M},{default:q},{default:L},{default:K}]=await Promise.all([an(()=>import("./core-BoyqaSPx.js"),[],import.meta.url),an(()=>import("./engine-javascript-DBd1bXLz.js"),[],import.meta.url),an(()=>import("./github-light-DAi9KRSo.js"),[],import.meta.url),an(()=>import("./bash-BELqPA7S.js").then(P=>P.b),[],import.meta.url),an(()=>import("./css-CLj8gQPS.js"),[],import.meta.url),an(()=>import("./diff-D97Zzqfu.js"),[],import.meta.url),an(()=>import("./dockerfile-BcOcwvcX.js"),[],import.meta.url),an(()=>import("./html-pp8916En.js"),__vite__mapDeps([0,1,2]),import.meta.url),an(()=>import("./java-CylS5w8V.js"),[],import.meta.url),an(()=>import("./javascript-wDzz0qaB.js"),[],import.meta.url),an(()=>import("./json-Cp-IABpG.js"),[],import.meta.url),an(()=>import("./jsonc-Des-eS-w.js"),[],import.meta.url),an(()=>import("./jsx-g9-lgVsj.js"),[],import.meta.url),an(()=>import("./markdown-Cvjx9yec.js"),[],import.meta.url),an(()=>import("./python-B6aJPvgy.js"),[],import.meta.url),an(()=>import("./bash-BELqPA7S.js").then(P=>P.s),[],import.meta.url),an(()=>import("./sql-CRqJ_cUM.js"),[],import.meta.url),an(()=>import("./toml-vGWfd6FD.js"),[],import.meta.url),an(()=>import("./tsx-COt5Ahok.js"),[],import.meta.url),an(()=>import("./typescript-BPQ3VLAy.js"),[],import.meta.url),an(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([3,4]),import.meta.url),an(()=>import("./yaml-Buea-lGh.js"),[],import.meta.url)]);return e({engine:t(),themes:[n],langs:[a,l,u,c,f,h,m,g,y,k,x,C,D,R,O,M,q,L,K]})}async function jv(){const e=Ne("conversations"),t=await fetch(e);return await Ve(t,{url:e}),(await t.json()).conversations}async function hD(){const e=Ne("workspace-states"),t=await fetch(e);return await Ve(t,{url:e}),(await t.json()).workspaces}async function Cv(){const e=Ne("collaboration/topics"),t=await fetch(e);return await Ve(t,{url:e}),(await t.json()).topics}async function Hd(e){const t=Ne(`collaboration/topics/${e}/messages?limit=100`),n=await fetch(t);return await Ve(n,{url:t}),(await n.json()).messages}async function mD(e){const t=Ne("collaboration/topics"),n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return await Ve(n,{method:"POST",url:t}),(await n.json()).topic}async function pD(e,t){const n=Ne(`collaboration/topics/${e}`),a=await fetch(n,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return await Ve(a,{method:"PATCH",url:n}),(await a.json()).topic}async function gD(e,t){const n=Ne(`collaboration/topics/${e}/archive`),a=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expectedVersion:t})});return await Ve(a,{method:"POST",url:n}),(await a.json()).topic}async function yD(e){const t=Ne(`conversations/${e}/read`),n=await fetch(t,{method:"POST"});await Ve(n,{method:"POST",url:t})}async function Tv(){const e=Ne("workspace-groups"),t=await fetch(e);return await Ve(t,{url:e}),(await t.json()).groups}async function vD(e){const t=Ne("workspace-groups"),n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:e})});return await Ve(n,{method:"POST",url:t}),(await n.json()).group}async function xD(e,t){const n=Ne(`workspace-groups/${e}`),a=await fetch(n,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return await Ve(a,{method:"PATCH",url:n}),(await a.json()).group}async function bD(e){const t=Ne(`workspace-groups/${e}`),n=await fetch(t,{method:"DELETE"});return await Ve(n,{method:"DELETE",url:t}),await n.json()}async function wD(){const e=Ne("settings/environment"),t=await fetch(e);return await Ve(t,{url:e}),(await t.json()).variables}async function kD(e){const t=Ne(`conversations/${e}/settings/environment`),n=await fetch(t);return await Ve(n,{url:t}),(await n.json()).variables}async function SD(e){const t=Ne(`conversations/${e}/knowledge`),n=await fetch(t);return await Ve(n,{url:t}),(await n.json()).items}async function jD(){const e=Ne("settings/model-providers"),t=await fetch(e);return await Ve(t,{url:e}),t.json()}async function CD(){const e=Ne("settings/model-providers/options"),t=await fetch(e);return await Ve(t,{url:e}),t.json()}async function TD(e){const t=Ne(`settings/model-providers/${encodeURIComponent(e)}/balance`),n=await fetch(t);return await Ve(n,{url:t}),n.json()}async function AD(e){const t=Ne("settings/model-providers"),n=await fetch(t,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return await Ve(n,{url:t,method:"PUT"}),n.json()}async function ED(){const e=Ne("settings/runtime"),t=await fetch(e);return await Ve(t,{url:e}),(await t.json()).settings}async function ND(){const e=Ne("settings/deployment"),t=await fetch(e);return await Ve(t,{url:e}),(await t.json()).settings}async function MD(){const e=Ne("diagnostics"),t=await fetch(e);return await Ve(t,{url:e}),await t.json()}async function DD(){const e=Ne("settings/runtime/codex"),t=await fetch(e);return await Ve(t,{url:e}),await t.json()}async function Qd(){const e=Ne("settings/runtime/accounts"),t=await fetch(e);await Ve(t,{url:e});const n=await t.json();return eo(),n}async function Av(e=!1){const t=Ne(`settings/runtime/accounts/refresh${e?"?force=1":""}`),n=await fetch(t,{method:"POST"});await Ve(n,{method:"POST",url:t});const a=await n.json();return eo(),a}async function zD(e){const t=Ne("settings/runtime/accounts"),n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e})});await Ve(n,{method:"POST",url:t});const a=await n.json();return a.login.status==="succeeded"&&eo(),a.login}async function RD(e){const t=Ne(`settings/runtime/accounts/login/${e}`),n=await fetch(t);return await Ve(n,{url:t}),(await n.json()).login}async function OD(e){const t=Ne(`settings/runtime/accounts/login/${e}/cancel`),n=await fetch(t,{method:"POST"});return await Ve(n,{method:"POST",url:t}),(await n.json()).login}async function ID(e,t,n){const a=Ne(`settings/runtime/accounts/${e}`),l=await fetch(a,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t,renewalDay:n})});await Ve(l,{method:"PATCH",url:a});const u=await l.json();return eo(),u.account}async function _D(e){const t=Ne(`settings/runtime/accounts/${e}`),n=await fetch(t,{method:"DELETE"});await Ve(n,{method:"DELETE",url:t}),eo()}async function LD(e){const t=Ne(`settings/runtime/accounts/${e}/switch`),n=await fetch(t,{method:"POST"});await Ve(n,{method:"POST",url:t});const a=await n.json();return eo(),a}async function BD(e=!0){const t=Ne(`settings/runtime/models?refresh=${e?"1":"0"}`),n=await fetch(t);return await Ve(n,{url:t}),await n.json()}async function qD(e=!1){const t=Ne(`settings/runtime/codex/update${e?"?refreshLatest=1":""}`),n=await fetch(t);return await Ve(n,{url:t}),await n.json()}async function UD(){const e=Ne("settings/runtime/codex/update"),t=await fetch(e,{method:"POST"});return await Ve(t,{method:"POST",url:e}),(await t.json()).job}async function HD(e){const t=Ne(`conversations/${e}/settings/runtime`),n=await fetch(t);return await Ve(n,{url:t}),(await n.json()).settings}async function $D(){const e=Ne("settings/memory"),t=await fetch(e);return await Ve(t,{url:e}),await t.json()}async function FD(e){const t=Ne("settings/runtime"),n=await fetch(t,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return await Ve(n,{method:"PUT",url:t}),(await n.json()).settings}async function PD(e){const t=Ne("settings/deployment"),n=await fetch(t,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return await Ve(n,{method:"PUT",url:t}),(await n.json()).settings}async function Ev(e,t){const n=Ne(`conversations/${e}/settings/runtime`),a=await fetch(n,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return await Ve(a,{method:"PUT",url:n}),await a.json()}async function Nv(e,t){const n=Ne(`conversations/${e}/runtime/reset`),a=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return await Ve(a,{method:"POST",url:n}),(await a.json()).job}async function Mv(e){const t=Ne(`conversations/${e}/runtime/reset-preview`),n=await fetch(t);return await Ve(n,{url:t}),await n.json()}async function GD(e,t){const n=Ne(`conversations/${e}/runtime/reset-selection`),a=await fetch(n,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});await Ve(a,{method:"PUT",url:n})}async function VD(e){const t=Ne(`conversations/${e}/runtime/thread-read`),n=await fetch(t);return await Ve(n,{url:t}),(await n.json()).result}async function YD(e){const t=Ne(`conversations/${e}/runtime/token-usage`),n=await fetch(t);await Ve(n,{url:t});const a=await n.json();return a.event?nb(a.event):null}async function WD(e){const t=Ne(`conversations/${e}/runtime/additional-context`),n=await fetch(t);return await Ve(n,{url:t}),await n.json()}async function KD(e){const t=Ne(`conversations/${e}/runtime/compactions`),n=await fetch(t);return await Ve(n,{url:t}),(await n.json()).compactions}function XD(e,t,n){return{modelSource:sx(e.modelSource,t.modelSource)&&(n==null?void 0:n.sources.modelSource)!=="workspace"?null:e.modelSource??{type:"codex"},model:e.model===t.model?null:e.model,reasoningEffort:CE(e.reasoningEffort,t.reasoningEffort,(n==null?void 0:n.sources.reasoningEffort)==="workspace"),fastMode:e.fastMode===t.fastMode?null:e.fastMode,sandbox:e.sandbox===t.sandbox?null:e.sandbox}}function ZD(e){return{kind:e.kind,name:e.name,description:e.description,purpose:e.purpose,attention:e.attention,refreshPolicy:e.refreshPolicy,status:e.status,sourceClues:JD(e.sourceCluesText),requiredEnv:ez(e.requiredEnvText)}}function QD(e){return{id:e.id,kind:e.kind,name:e.name,description:e.description,purpose:e.purpose,attention:e.attention,refreshPolicy:e.refreshPolicy,status:e.status,sourceCluesText:e.sourceClues.map(t=>`${t.type}: ${t.value}`).join(`
385
- `),requiredEnvText:e.fetch.requiredEnv.map(t=>t.description?`${t.key} - ${t.description}`:t.key).join(`
386
- `)}}function JD(e){const t=new Date().toISOString();return e.split(/\r?\n/).map(n=>n.trim()).filter(Boolean).map(n=>{const a=n.match(/^([a-zA-Z][\w-]{0,31})\s*:\s*(.+)$/);return{type:a?a[1].toLowerCase():"text",value:a?a[2].trim():n,providedBy:"user",providedAt:t}})}function ez(e){return e.split(/\r?\n/).map(t=>t.trim()).filter(Boolean).map(t=>{const[n,...a]=t.split(/\s+-\s+/);return{key:n.trim().toUpperCase(),description:a.join(" - ").trim()}}).filter(t=>/^[A-Z_][A-Z0-9_]*$/.test(t.key))}function Dv(e,t){const n=zv(t.attention)-zv(e.attention);return n!==0?n:t.updatedAt.localeCompare(e.updatedAt)}function zv(e){return e==="watch"?2:e==="tracked"?1:0}function Yc(e){return e.map(t=>({key:t.key??"",value:t.value??"",updatedAt:t.updatedAt}))}function tz(e){return e?/^[a-z_][a-z0-9_.-]*$/.test(e)?null:"Key must start with a lowercase English letter or underscore, and may contain lowercase letters, numbers, dots, underscores, and hyphens.":"Key is required."}function nz(e){return Yc(e).filter(t=>t.key.trim()&&t.value.trim()).map(t=>`${t.key.trim()}: ${t.value.trim()}`).join(`
387
- `)}async function rz(e){const t=Ne("settings/memory"),n=await fetch(t,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return await Ve(n,{method:"PUT",url:t}),await n.json()}async function az(e,t,n){const a=Ne("settings/environment"),l=await fetch(a,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({description:n,key:e,value:t})});return await Ve(l,{method:"PUT",url:a}),(await l.json()).variable}async function iz(e,t,n,a){const l=Ne(`conversations/${e}/settings/environment`),u=await fetch(l,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({description:a,key:t,value:n})});return await Ve(u,{method:"PUT",url:l}),await u.json()}async function lz(e){const t=Ne(`settings/environment/${encodeURIComponent(e)}/reveal`),n=await fetch(t);return await Ve(n,{url:t}),(await n.json()).variable.value}async function sz(e,t){const n=Ne(`conversations/${e}/settings/environment/${encodeURIComponent(t)}/reveal`),a=await fetch(n);return await Ve(a,{url:n}),(await a.json()).variable.value}async function oz(e){const t=Ne(`settings/environment/${encodeURIComponent(e)}`),n=await fetch(t,{method:"DELETE"});await Ve(n,{method:"DELETE",url:t})}async function uz(e,t){const n=Ne(`conversations/${e}/settings/environment/${encodeURIComponent(t)}`),a=await fetch(n,{method:"DELETE"});return await Ve(a,{method:"DELETE",url:n}),(await a.json()).conversation}async function cz(e,t){const n=Ne(`conversations/${e}/knowledge`),a=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return await Ve(a,{method:"POST",url:n}),(await a.json()).item}async function dz(e,t,n){const a=Ne(`conversations/${e}/knowledge/${encodeURIComponent(t)}`),l=await fetch(a,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});return await Ve(l,{method:"PATCH",url:a}),(await l.json()).item}async function fz(e,t){const n=Ne(`conversations/${e}/knowledge/${encodeURIComponent(t)}`),a=await fetch(n,{method:"DELETE"});await Ve(a,{method:"DELETE",url:n})}async function hz(){const e=Ne("meta"),t=await fetch(e);return await Ve(t,{url:e}),await t.json()}async function mz(){const e=Ne("settings/runtime/rate-limits"),t=await fetch(e);return await Ve(t,{url:e}),(await t.json()).usage??null}async function pz(e,t){const n=Ne("conversations"),a=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:e,groupId:t})});return await Ve(a,{method:"POST",url:n}),(await a.json()).conversation}function gz(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();const e=crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;const t=Array.from(e,n=>n.toString(16).padStart(2,"0")).join("");return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}async function yz(e,t,n,a,l){const u=Ne(`conversations/${e}/clone`),c=await fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t,groupId:n,excludeTopicHistory:a,requestId:l})});return await Ve(c,{method:"POST",url:u}),await c.json()}async function vz(e){const t=Ne(`conversations/${e}/clone/retry`),n=await fetch(t,{method:"POST"});return await Ve(n,{method:"POST",url:t}),await n.json()}async function Wc(e,t={}){const n=new URLSearchParams;n.set("limit",String(t.limit??px)),t.before&&n.set("before",t.before);const a=Ne(`conversations/${e}?${n}`),l=await fetch(a);return await Ve(l,{url:a}),(await l.json()).conversation}async function Px(e,t){const n=Ne(`conversations/${e}/turns/${t}/history-events`),a=await fetch(n);return await Ve(a,{url:n}),(await a.json()).events}async function $d(e,t){const n=Ne(`conversations/${e}`),a=await fetch(n,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return await Ve(a,{method:"PATCH",url:n}),(await a.json()).conversation}async function xz(e){const t=Ne(`conversations/${e}`),n=await fetch(t,{method:"DELETE"});await Ve(n,{method:"DELETE",url:t})}function bz(e){return e.title==="Phase boundary recommended"||e.title==="Long run in progress"}function Gx(e){return e.length<=3?e.join(", "):`${e.slice(0,3).join(", ")} +${e.length-3}`}function wz(e,t){if(e.event==="server.error"||e.event==="client.error")return{id:e.id,kind:"error",title:"Error",body:qz(e.data),createdAt:e.createdAt??new Date().toISOString()};if(e.event==="server.collaboration.message_staged"||e.event==="server.collaboration.message_sent"||e.event==="server.collaboration.message_rejected"){const u=Fe(e.data),c=Je(u.toolCallId),f=typeof u.controlIndex=="number"?u.controlIndex:null;if(c||f!==null){const h=e.event==="server.collaboration.message_staged",m=e.event==="server.collaboration.message_sent",g=Je(u.audience),y=Je(u.recipientWorkspaceId),k=y?[y]:Array.isArray(u.recipientWorkspaceIds)?u.recipientWorkspaceIds.filter(R=>typeof R=="string"):Array.isArray(u.recipients)?u.recipients.filter(R=>typeof R=="string"):[],x=k.filter(R=>R!=="ALL").map(R=>t.get(R)).filter(R=>!!R);let C="Topic";x.length>0?C=Gx(x):k.length===1?C=k[0]==="ALL"?"Topic participants":ts(k[0]):k.length>1?C=`${k.length} workspaces`:g==="public"||g==="all"?C="Topic participants":g==="owner"&&(C="Topic owner");const D=Je(u.topicId);return{id:e.id,kind:"collaboration",title:`Send to ${C}`,body:D?`Topic ${ts(D)}`:"Topic",createdAt:e.createdAt??new Date().toISOString(),itemId:c||`legacy-topic-message:${f}`,meta:h?"pending send":m?"done":"failed",output:h||m?Je(u.contentMarkdown)||void 0:Je(u.reason)||void 0,topicAction:"send",topicRecipientLabel:C,topicMessageContent:(h||m)&&Je(u.contentMarkdown)||void 0}}}if(e.event==="codex.input_request"||e.event==="codex.input_or_approval_request"){const u=Fe(e.data);if(e.event==="codex.input_request"||u.method==="item/tool/requestUserInput"){const c=Fe(u.params),h=(Array.isArray(c.questions)?c.questions:[]).map(m=>{const g=Fe(m),y=typeof g.question=="string"?g.question:"Please provide the missing information.",k=Array.isArray(g.options)?g.options.map(x=>{const C=Fe(x);return typeof C.label=="string"?`- ${C.label}${typeof C.description=="string"?`: ${C.description}`:""}`:""}).filter(Boolean).join(`
388
- `):"";return k?`${y}
389
-
390
- ${k}`:y}).join(`
391
-
392
- `);return{id:e.id,kind:"activity",title:"Seele needs input",body:h||"Please answer in the main input box to continue.",createdAt:e.createdAt??new Date().toISOString(),meta:"waiting for reply"}}}if(e.event==="server.agent_action.staged"){const u=Fe(e.data);if(Je(u.actionType)==="seele_workspace_change"){const f=Fe(u.payload),h=Fe(f.payload),m=Je(f.type)||"workspace";return{id:e.id,kind:"workspaceChange",title:"Preparing workspace change",body:Zx(m,h),createdAt:e.createdAt??new Date().toISOString(),itemId:Je(u.toolCallId)||void 0,meta:"pending turn",workspaceChangeType:m,workspaceChangePayload:h}}const c=yE(u);return{id:e.id,kind:"activity",title:c.title,body:c.detail,createdAt:e.createdAt??new Date().toISOString(),itemId:Je(u.toolCallId)||void 0,meta:c.meta}}if(e.event==="server.workspace_inbox.offered"){const u=gE(e.data);return{id:e.id,kind:"activity",title:u.title,body:u.detail,createdAt:e.createdAt??new Date().toISOString(),meta:u.meta}}if(e.event==="codex.dynamic_tool_request"){const u=Fe(e.data),c=Fe(u.params),f=Je(c.tool)||"dynamic tool",h=Fe(c.arguments);return{id:e.id,kind:f==="seele_topics"?"collaboration":f==="seele_workspace_change"?"workspaceChange":"activity",title:Kx(f,!1,h),body:Xx(f,h),createdAt:e.createdAt??new Date().toISOString(),itemId:Je(c.callId)||void 0,meta:"running",topicAction:f==="seele_topics"?Vx(h.action):void 0,workspaceChangeType:f==="seele_workspace_change"&&Je(h.type)||void 0,workspaceChangePayload:f==="seele_workspace_change"?Fe(h.payload):void 0}}if(e.event==="server.workspace_change.proposed"||e.event==="server.responsibility.proposed"){const u=Fe(e.data),c=Fe(u.payload),f=Je(c.content)||Je(u.responsibility);return{id:e.id,kind:"workspaceChange",title:"Workspace change proposed",body:f,createdAt:e.createdAt??new Date().toISOString(),itemId:Je(u.toolCallId)||void 0,meta:"pending",responsibilityProposalId:String(e.id),workspaceChangeProposalId:String(e.id),responsibilityReason:typeof u.reason=="string"?u.reason:void 0,responsibilityAnchorOffset:typeof u.anchorOffset=="number"?u.anchorOffset:void 0,workspaceChangeType:Je(u.changeType)||"responsibility",workspaceChangePayload:Object.keys(c).length>0?c:{content:f}}}if(e.event==="server.knowledge.proposed"){const u=Fe(e.data),c=Fe(u.knowledge);return{id:e.id,kind:"knowledge",title:u.action==="update"?"Knowledge update proposed":"Knowledge creation proposed",body:JSON.stringify(c,null,2),createdAt:e.createdAt??new Date().toISOString(),meta:"pending",knowledgeProposalId:String(e.id),knowledgeAnchorOffset:typeof u.anchorOffset=="number"?u.anchorOffset:void 0}}if(e.event==="runtime.command.started"||e.event==="runtime.command.completed"){const u=Fe(e.data),c=e.event==="runtime.command.completed",f=typeof u.exitCode=="number"?u.exitCode:null;return{id:e.id,kind:"command",title:c?f!==null&&f!==0?"Command failed":"Command completed":"Seele ran command",body:typeof u.command=="string"?Jd(u.command):"command",createdAt:e.createdAt??new Date().toISOString(),itemId:typeof u.itemId=="string"?u.itemId:void 0,meta:c?f!==null?`exit ${f}`:"done":"running",output:c&&typeof u.output=="string"&&u.output?u.output:void 0}}if(e.event==="runtime.compaction.started"||e.event==="runtime.compaction.completed"){const u=Fe(e.data),c=e.event==="runtime.compaction.completed";return{id:e.id,kind:"activity",title:c?"Context compacted":"Compacting context",body:i1(u,c),createdAt:e.createdAt??new Date().toISOString(),itemId:typeof u.itemId=="string"?u.itemId:void 0,meta:c?"done":"running"}}if(e.event==="codex.server_request"){const u=Fe(e.data);if(u.method==="item/commandExecution/requestApproval"){const c=Bz(u.requestId),f=Fe(u.params),h=typeof f.command=="string"?f.command:"command";return{id:e.id,kind:"command",title:"Command waiting for approval",body:h,createdAt:e.createdAt??new Date().toISOString(),itemId:typeof f.itemId=="string"?f.itemId:void 0,meta:"approval",approvalRequestId:c??void 0,approvalTurnId:typeof e.turnId=="string"?e.turnId:typeof f.turnId=="string"?f.turnId:void 0,approvalReason:typeof f.reason=="string"?f.reason:void 0}}}if(e.event!=="codex.notification"&&e.event!=="server.item.snapshot")return null;const n=Fe(e.data),a=n.method,l=Fe(n.params);if(a==="item/started"){const u=Fe(l.item);if(u.type==="commandExecution"){const f=u.status==="inProgress"&&u.processId===null;return{id:e.id,kind:"command",title:f?"Command waiting for approval":"Seele ran command",body:Jd(u.command),createdAt:e.createdAt??new Date().toISOString(),itemId:typeof u.id=="string"?u.id:void 0,meta:f?"approval":"running"}}const c=Zp(u);if(c.length>0)return{id:e.id,kind:"file",title:"File change",body:c[0].path,createdAt:e.createdAt??new Date().toISOString(),itemId:Je(u.id)||void 0,meta:"started",fileChanges:c}}if(a==="item/completed"){const u=Fe(l.item);if(u.type==="commandExecution"){const f=typeof u.exitCode=="number"?u.exitCode:null;return{id:e.id,kind:"command",title:f!==null&&f!==0?"Command failed":"Command completed",body:Jd(u.command),createdAt:e.createdAt??new Date().toISOString(),itemId:typeof u.id=="string"?u.id:void 0,meta:f!==null?`exit ${f}`:"done",outputKind:"complete",output:typeof u.aggregatedOutput=="string"&&u.aggregatedOutput?u.aggregatedOutput:void 0}}const c=Zp(u);if(c.length>0)return{id:e.id,kind:"file",title:"File changed",body:c[0].path,createdAt:e.createdAt??new Date().toISOString(),itemId:Je(u.id)||void 0,meta:"done",fileChanges:c}}return a==="item/commandExecution/outputDelta"||a==="item/commandExecution/outputSnapshot"?{id:e.id,kind:"command",title:"Command output",body:typeof l.itemId=="string"?l.itemId:"command",createdAt:e.createdAt??new Date().toISOString(),itemId:typeof l.itemId=="string"?l.itemId:void 0,meta:"running",outputKind:"delta",output:a.endsWith("Snapshot")?typeof l.text=="string"?l.text:void 0:typeof l.delta=="string"?l.delta:void 0}:null}function kz(e){if(e.event!=="codex.notification")return null;const t=Fe(e.data),n=t.method;if(n!=="item/started"&&n!=="item/completed")return null;const a=Fe(t.params),l=Fe(a.item),u=typeof l.type=="string"?l.type:"item";if(Wx(u)||ab(l))return null;const c=n==="item/completed",f=Fe(l.arguments),h=u==="dynamicToolCall"&&typeof l.tool=="string"?l.tool:null;return{id:e.id,kind:h==="seele_topics"?"collaboration":h==="seele_workspace_change"?"workspaceChange":"activity",title:h?Kx(h,c,f):c?`Finished ${es(u)}`:`Working on ${es(u)}`,body:h?Xx(h,f):Qx(l,u),createdAt:e.createdAt??new Date().toISOString(),itemId:typeof l.id=="string"?l.id:void 0,meta:h==="seele_wakeup"&&c?"after turn":c?jz(l):"running",topicAction:h==="seele_topics"?Vx(f.action):void 0,workspaceChangeType:h==="seele_workspace_change"&&Je(f.type)||void 0,workspaceChangePayload:h==="seele_workspace_change"?Fe(f.payload):void 0}}function Vx(e){return e==="read"||e==="history"||e==="send"?e:void 0}function Sz(e){if(tb(e)||["server.turn","server.done","server.notification.sent","server.notification.failed","server.approval.decision","server.workspace_change.decision","server.responsibility.decision","server.knowledge.decision","server.collaboration.topic_created"].includes(e.event))return null;const t=pE(e);return t?{id:e.id,kind:"activity",title:eb(t),body:Yx(e.data),createdAt:e.createdAt??new Date().toISOString(),meta:"event"}:null}function Yx(e){const t=Fe(e);for(const n of["title","message","description","status","reason"])if(typeof t[n]=="string"&&t[n].trim())return Jx(t[n].trim(),180);return"Event details are available"}function Wx(e){return["agentMessage","assistantMessage","commandExecution","message","reasoning","plan","systemMessage","userMessage"].includes(e)}function jz(e){return e.status==="failed"||e.status==="error"?"failed":e.status==="cancelled"||e.status==="canceled"?"stopped":"done"}function es(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[-_]+/g," ").toLowerCase()}function Kx(e,t,n){if(e==="seele_topics")switch(Je(n.action)){case"read":return"Read messages";case"history":return"Review history";case"send":return"Send message";default:return t?"Operation completed":"Working"}if(e==="seele_wakeup"){const l=Je(n.action)==="cancel";return t?l?"Wakeup cancellation requested":"Wakeup requested":l?"Requesting wakeup cancellation":"Requesting wakeup"}if(e==="seele_workspace_change")return t?"Workspace change proposed":"Preparing workspace change";const a=es(e);return t?`Finished ${a}`:`Running ${a}`}function Xx(e,t){if(e==="seele_topics"){const n=Je(t.topicId);return n?`Topic ${ts(n)}`:"Topic"}if(e==="seele_wakeup")return Je(t.instruction)||(Je(t.action)==="cancel"?"Cancel the current wakeup":"Schedule the current wakeup");if(e==="seele_workspace_change"){const n=Je(t.type)||"workspace";return Zx(n,Fe(t.payload))}return es(e)}function Zx(e,t){return e==="responsibility"?Je(t.content)||"Workspace responsibility":JSON.stringify(t,null,2)}function Qx(e,t){for(const n of["title","name","description","text","summary"])if(typeof e[n]=="string"&&e[n].trim())return au(e[n].trim(),160);return typeof e.id=="string"?`${es(t)} ${ts(e.id)}`:es(t)}function Cz(e){var n;if(e.meta==="running")return"running";if(e.meta==="approval")return"approval";if(e.meta==="stopped")return"stopped";const t=(n=e.meta)==null?void 0:n.match(/^exit\s+(-?\d+)$/);return t?Number(t[1])===0?"done":"failed":"done"}function Tz(e,t){return t==="running"?"running":t==="approval"?"approval":t==="stopped"?"stopped":t==="failed"?e.meta??"failed":"ok"}function Az(e,t){var a;if(t==="running")return"Command is still running.";if(t==="approval")return"Waiting for approval before running.";if(t==="stopped")return"Command was stopped.";const n=(a=e.meta)==null?void 0:a.match(/^exit\s+(-?\d+)$/);return n?`Exit code: ${n[1]}`:t==="failed"?"Command failed.":"Command completed."}function Ez(e,t){const n=e.split(/\r?\n/),l=n.slice(0,t).join(`
393
- `);return n.length>t?`${l}
394
- ...`:l}function Nz(e,t){return e?e.split(/\r?\n/).filter(n=>n.trim()).length>t:!1}function pf(e){return/^call_[A-Za-z0-9]+$/.test(e)||e==="command"}function Mz(e){const t=e.trim();return!t||t.includes(`
395
- `)?null:au(t,120)}function au(e,t){if(e.length<=t)return e;const n=Math.max(8,Math.floor((t-3)/2));return`${e.slice(0,n)}...${e.slice(-n)}`}function Jx(e,t){return e.length<=t?e:`${e.slice(0,Math.max(1,t-3))}...`}function eb(e){const n=(e.split(/[./]/).filter(Boolean).pop()??e).replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").trim();return n?n.charAt(0).toUpperCase()+n.slice(1):"System event"}function tb(e){const t=e.createdAt??new Date().toISOString();if(e.event==="server.status"){const u=Fe(e.data);if(u.status==="initialized")return{id:e.id,title:"Connected to Seele runtime",createdAt:t,tone:"done"};if(u.status==="turn_started")return{id:e.id,title:"Turn started",createdAt:t,tone:"running"};if(u.status==="archived_thread_replaced")return{id:e.id,title:"Started a fresh runtime thread",detail:typeof u.archivedThreadId=="string"?`archived ${ts(u.archivedThreadId)}`:void 0,createdAt:t,tone:"warning"}}if(e.event==="server.stopped"||e.event==="server.stop")return{id:e.id,title:"Stopped current run",createdAt:t,tone:"error"};if(e.event==="runtime.worker_stale")return{id:e.id,title:"Runtime appears stalled",detail:"No runtime signal for a while",createdAt:t,tone:"warning"};if(e.event==="runtime.worker_recovered")return{id:e.id,title:"Runtime resumed",createdAt:t,tone:"running"};if(e.event==="runtime.compaction.started"){const u=Fe(e.data);return{id:e.id,title:"Codex compacting context",detail:i1(u,!1),createdAt:t,tone:"running"}}if(e.event==="runtime.compaction.completed"){const u=Fe(e.data);return{id:e.id,title:"Codex context compacted",detail:i1(u,!0),createdAt:t,tone:"done"}}if(e.event==="server.turn.long_running")return{id:e.id,title:"Long run in progress",detail:"Consider splitting into a wakeup phase",createdAt:t,tone:"warning"};if(e.event==="server.turn.phase_boundary_recommended"){const u=Fe(e.data);return{id:e.id,title:"Phase boundary recommended",detail:typeof u.operationCount=="number"?`${u.operationCount} operations in this turn`:"Many operations in this turn",createdAt:t,tone:"warning"}}if(e.event==="server.wakeup.started"){const u=Fe(e.data);return{id:e.id,title:"Scheduled wakeup resumed",detail:typeof u.instruction=="string"?au(u.instruction,96):void 0,createdAt:t,tone:"running"}}if(e.event==="codex.server_request"){const u=Fe(e.data);if(u.method==="item/commandExecution/requestApproval"){const c=Fe(u.params);return{id:e.id,title:"Waiting for approval",detail:typeof c.command=="string"?au(c.command,96):"Command needs confirmation",createdAt:t,tone:"warning"}}}if(e.event!=="codex.notification")return null;const n=Fe(e.data),a=n.method,l=Fe(n.params);if(a==="item/started"||a==="item/completed"){const u=Fe(l.item),c=typeof u.type=="string"?u.type:"item",f=a==="item/completed";if(c==="commandExecution")return{id:e.id,title:f?"Command completed":"Running command",detail:au(Jd(u.command),96),createdAt:t,tone:f?"done":"running"};if(c==="contextCompaction")return{id:e.id,title:f?"Codex context compacted":"Codex compacting context",detail:f?void 0:"Current runtime thread is being compacted",createdAt:t,tone:f?"done":"running"};const h=ab(u);if(h)return{id:e.id,title:f?"File update finished":"Editing file",detail:au(h,96),createdAt:t,tone:f?"done":"running"};if(!Wx(c))return{id:e.id,title:f?`Finished ${es(c)}`:`Working on ${es(c)}`,detail:Qx(u,c),createdAt:t,tone:f?"done":"running"}}if(a==="thread/status/changed"){const u=Fe(l.status),c=Array.isArray(u.activeFlags)?u.activeFlags:[];if(u.type==="active"&&c.some(f=>f==="waitingOnApproval"))return{id:e.id,title:"Waiting for approval",detail:"Command needs confirmation",createdAt:t,tone:"warning"}}if(a==="turn/started")return{id:e.id,title:"Seele started working",createdAt:t,tone:"running"};if(a==="turn/completed"){const u=Fe(l.turn);return{id:e.id,title:"Turn completed",detail:typeof u.durationMs=="number"?du(u.durationMs):void 0,createdAt:t,tone:"done"}}if(a==="hook/started"||a==="hook/completed"){const u=Fe(l.run),c=typeof u.eventName=="string"?u.eventName:"hook";return{id:e.id,title:a==="hook/started"?`Running ${Rv(c)}`:`Finished ${Rv(c)}`,detail:typeof u.durationMs=="number"?du(u.durationMs):void 0,createdAt:t,tone:a==="hook/started"?"running":"done"}}return null}function i1(e,t){const n=gf(e.before),a=gf(e.after),l=[];if(t){const u=typeof e.durationMs=="number"?e.durationMs:null;l.push(u===null?"Completed":`Completed in ${du(u)}`)}else l.push("Codex triggered");if(n&&a){l.push(`context ${Gs(n)} → ${Gs(a)}`);const u=n.totalTokens-a.totalTokens;u>0&&l.push(`released ~${tg(u)} tokens`)}else n&&l.push(`context ${Gs(n)}`);return l.join(" · ")}function Dz(e){const t=gf(e.before),n=gf(e.after),a=t&&n?t.totalTokens-n.totalTokens:null;let l="Unavailable";return t&&n?l=`${Gs(t)} → ${Gs(n)}`:t?l=`${Gs(t)} → unavailable`:n&&(l=`unavailable → ${Gs(n)}`),[{label:"Trigger",value:e.trigger==="codex"?"Codex automatic":e.trigger??"Unavailable"},{label:"Duration",value:e.durationMs===null?"Unavailable":du(e.durationMs)},{label:"Context",value:l},{label:"Released",value:a===null?"Unavailable":a>0?`~${tg(a)} tokens`:"No decrease observed"}]}function gf(e){const t=Fe(e);return typeof t.totalTokens=="number"?{totalTokens:t.totalTokens,modelContextWindow:typeof t.modelContextWindow=="number"?t.modelContextWindow:null}:null}function Gs(e){return e.modelContextWindow&&e.modelContextWindow>0?`${Math.round(e.totalTokens/e.modelContextWindow*100)}%`:`${tg(e.totalTokens)} tokens`}function tg(e){return new Intl.NumberFormat("en",{notation:"compact",maximumFractionDigits:1}).format(Math.max(0,e))}function zz(e){let t=null;for(const n of e){const a=nb(n);a&&(!t||Vc(n,t)>0)&&(t=a)}return t}function nb(e){if(e.event!=="codex.notification")return null;const t=Fe(e.data);if(t.method!=="thread/tokenUsage/updated")return null;const n=Fe(t.params),a=Fe(n.tokenUsage),l=Fe(a.last),u=Fe(a.total),c=Object.keys(l).length>0?l:u,f=va(c.totalTokens);return f===null?null:{totalTokens:f,inputTokens:va(c.inputTokens),cachedInputTokens:va(c.cachedInputTokens),outputTokens:va(c.outputTokens),reasoningOutputTokens:va(c.reasoningOutputTokens),modelContextWindow:va(a.modelContextWindow),createdAt:e.createdAt??new Date().toISOString()}}function Rz(...e){return e.reduce((t,n)=>n&&(!t||Date.parse(n.createdAt)>Date.parse(t.createdAt))?n:t,null)}function rb(e){return e!=null&&e.modelContextWindow&&e.modelContextWindow>0?e.totalTokens/e.modelContextWindow*100:null}function Oz(e,t){return e?!t||e===t?e:t.startsWith(e)?t:`${e}${t}`:t}function Jd(e){return typeof e=="string"?e:Array.isArray(e)?e.map(t=>String(t)).join(" "):"command"}function ab(e){var n;const t=e.path??e.file??e.filename;return typeof t=="string"?t:((n=Zp(e)[0])==null?void 0:n.path)??null}function Fe(e){return e&&typeof e=="object"?e:{}}function va(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function Je(e){return typeof e=="string"?e:""}function Vs(e){return e.replace(/([\\`*_[\]<>])/g,"\\$1")}function Iz(e){const t=Fe(e),n=Fe(t.thread);if(!Object.keys(n).length)return null;const a=Array.isArray(n.turns)?n.turns:[],l=[];let u=0,c=0,f=0,h=0,m=0;return a.forEach((g,y)=>{const k=Fe(g),x=Je(k.id)||`turn-${y+1}`,C=Array.isArray(k.items)?k.items:[];u+=C.length,l.push(_z(k,x)),C.forEach(D=>{const R=Fe(D),O=Je(R.type);O==="userMessage"?c+=1:O==="agentMessage"?f+=1:O==="compaction"?h+=1:O==="contextCompaction"&&(m+=1)})}),{id:Je(n.id),sessionId:Je(n.sessionId),status:ib(n.status),source:ng(n.source),cwd:Je(n.cwd),path:Je(n.path),preview:Je(n.preview),createdAt:va(n.createdAt),updatedAt:va(n.updatedAt),recencyAt:va(n.recencyAt),turnCount:a.length,itemCount:u,userMessageCount:c,agentMessageCount:f,compactionCount:h,contextCompactionCount:m,turns:l}}function _z(e,t){const n=Array.isArray(e.items)?e.items:[],a=Array.from(new Set(n.map(u=>Je(Fe(u).type)).filter(u=>u.length>0))).join(", "),l=Lz(n.map(u=>l1(u)).filter(Boolean).join(" "),220);return{id:t,status:ib(e.status),itemsView:Je(e.itemsView)||"unknown",itemCount:n.length,startedAt:va(e.startedAt),completedAt:va(e.completedAt),durationMs:va(e.durationMs),itemTypes:a,preview:l,raw:e}}function l1(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(l1).filter(Boolean).join(`
396
- `);if(!e||typeof e!="object")return"";const t=e,n=Je(t.text),a=l1(t.content);return[n,a].filter(Boolean).join(`
397
- `)}function ib(e){const t=Fe(e);return Je(t.type)||ng(e)}function Lz(e,t){const n=e.replace(/\s+/g," ").trim();return n.length>t?`${n.slice(0,t)}...`:n}function Ic(e){return e===null?"unknown":ut(e*1e3)}function Bz(e){return typeof e=="number"&&Number.isFinite(e)||typeof e=="string"&&e.trim()?e:null}function ng(e){if(typeof e=="string")return e;const t=JSON.stringify(e);return t.length>180?`${t.slice(0,180)}...`:t}function qz(e){if(typeof e=="string")return e;const t=Fe(e),n=typeof t.message=="string"?t.message:null,a=typeof t.detail=="string"?t.detail:null;return n&&a?`${n}
398
-
399
- ${a}`:n||a||ng(e)}function Rv(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[-_]+/g," ").toLowerCase()}function du(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(e<1e4?1:0)}s`}function gp(e){if(e<6e4)return du(e);const t=Math.floor(e/6e4);if(t<60)return`${t}m`;const n=Math.floor(t/60),a=t%60;return a===0?`${n}h`:`${n}h ${a}m`}function lb(e){return`${Math.round(e)}%`}function Rr(e){return new Intl.NumberFormat("en-US").format(e)}function ef(e){return e===null?"unknown":Rr(e)}function Bf(e){return Math.max(0,Math.min(100,Math.round(e)))}function rg(e){return e>=100?"exhausted":e>=90?"danger":e>=75?"warning":"healthy"}function sb(e){return ut(e*1e3)}function ut(e){const t=typeof e=="number"?new Date(e):new Date(e);if(Number.isNaN(t.getTime()))return"";const n={timeZone:"Asia/Shanghai",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1},a=new Intl.DateTimeFormat("en-CA",n).formatToParts(t),l=u=>{var c;return((c=a.find(f=>f.type===u))==null?void 0:c.value)??""};return`${l("month")}/${l("day")} ${l("hour")}:${l("minute")}:${l("second")}`}function Ki(e){const t=ut(e);return t?`${t} UTC+08:00`:""}function Uz(e){const t=new Date(e);return Number.isNaN(t.getTime())?"--:--:--":new Intl.DateTimeFormat("en-GB",{timeZone:"Asia/Shanghai",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(t)}function Ov(e,t){const n=tf(e,t);return n?`${n.displayName}${n.isDefault?" (default)":""}`:e||"Unavailable"}function tf(e,t){return e?t.find(n=>n.model===e)??null:t.find(n=>n.isDefault)??t[0]??null}function qf(e){return e?e.replace(/^codex-cli\s+/i,""):"Unavailable"}function s1(e,t){const n=qf(e);return t?`${n} (${ut(t)})`:n}function Hz(e){return`https://github.com/openai/codex/releases/tag/rust-v${encodeURIComponent(qf(e))}`}function $z(e,t){const n=Iv(e),a=Iv(t);if(!n||!a)return!1;for(let l=0;l<n.core.length;l+=1)if(n.core[l]!==a.core[l])return n.core[l]>a.core[l];return n.prerelease===a.prerelease?!1:n.prerelease?a.prerelease?n.prerelease.localeCompare(a.prerelease,void 0,{numeric:!0})>0:!1:!0}function Iv(e){if(!e)return null;const t=qf(e).match(/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);return t?{core:[Number(t[1]),Number(t[2]),Number(t[3])],prerelease:t[4]??null}:null}function Fz(e,t){const n=e.map(a=>({value:a.model,label:`${a.displayName}${a.isDefault?" (default)":""}`}));return t&&!e.some(a=>a.model===t)&&n.push({value:t,label:`${t} (unavailable)`}),n.length===0&&n.push({value:"",label:"Models unavailable"}),n}async function _v(e,t){const n=e.getReader(),a=new TextDecoder;let l="";for(;;){const{done:u,value:c}=await n.read();if(u)break;l+=a.decode(c,{stream:!0});const f=l.split(`
400
-
401
- `);l=f.pop()??"";for(const h of f){const m=Pz(h);m&&t(m)}}}function Pz(e){const t=e.split(`
402
- `),n=t.find(c=>c.startsWith("event: ")),a=t.filter(c=>c.startsWith("data: ")).map(c=>c.slice(6));if(!n||a.length===0)return null;const l=n.slice(7),u=a.join(`
403
- `);try{return{event:l,data:JSON.parse(u)}}catch{return{event:l,data:u}}}function Gz(e){var a,l,u,c,f;if(!e||typeof e!="object")return null;const t=e;if(t.method!=="item/agentMessage/delta"&&t.method!=="item/plan/delta"&&t.method!=="item/agentMessage/textSnapshot"&&t.method!=="item/plan/textSnapshot")return null;const n=((a=t.params)==null?void 0:a.delta)??((l=t.params)==null?void 0:l.text)??"";return n?{text:n,phase:t.method.startsWith("item/plan/")?"final_answer":((u=t.params)==null?void 0:u.phase)==="commentary"||((c=t.params)==null?void 0:c.phase)==="final_answer"?t.params.phase:"unknown",itemId:(f=t.params)==null?void 0:f.itemId}:null}function Vz(e){var a;if(!e||typeof e!="object")return null;const t=e;if(t.method!=="item/started")return null;const n=(a=t.params)==null?void 0:a.item;return(n==null?void 0:n.type)!=="agentMessage"&&(n==null?void 0:n.type)!=="plan"?null:{itemId:n.id,phase:n.type==="plan"?"final_answer":n.phase==="commentary"||n.phase==="final_answer"?n.phase:"unknown"}}function Yz(e){var a;if(!e||typeof e!="object")return null;const t=e;if(t.method!=="item/completed")return null;const n=(a=t.params)==null?void 0:a.item;return(n==null?void 0:n.type)!=="agentMessage"&&(n==null?void 0:n.type)!=="plan"||!n.text?null:{itemId:n.id,text:n.text,phase:n.type==="plan"?"final_answer":n.phase==="commentary"||n.phase==="final_answer"?n.phase:"unknown"}}function Fd(e){var n,a,l,u;if(e.event==="server.error"||e.event==="client.error")return"error";if(!e.data||typeof e.data!="object")return null;const t=e.data;return t.method==="thread/status/changed"&&((a=(n=t.params)==null?void 0:n.status)==null?void 0:a.type)==="idle"?"done":t.method==="turn/completed"?(u=(l=t.params)==null?void 0:l.turn)!=null&&u.error?"error":"done":null}function lu(e){return e.length<=6?e:e.slice(0,6)}function ts(e){return e.slice(0,8)}function yp(e){switch(e){case"danger-full-access":return"System";case"workspace-write":return"Workspace";case"read-only":return"Read only"}}function o1(e,t){var n;return t==="running"||t==="error"?t:((n=e==null?void 0:e.nextWakeup)==null?void 0:n.status)==="scheduled"?"waiting":t}function Wz(e,t){return`waiting ${yf(e,t)}`}function yf(e,t){const n=Date.parse(e.wakeAt);if(Number.isNaN(n))return"waiting";const a=Math.max(0,Math.ceil((n-t)/1e3));if(a<60)return`${a}s`;const l=Math.ceil(a/60);if(l<60)return`${l}m`;const u=Math.ceil(l/60);return u<24?`${u}h`:`${Math.ceil(u/24)}d`}function nf(e,t=null,n=Date.now()){if(e==="waiting")return t?Wz(t,n):"waiting";switch(e){case"done":return"idle";case"running":return"running";case"error":return"error";case"initializing":return"initializing";case"initialization_failed":return"initialization failed";case"idle":return"idle"}}function Lv(e){switch(e){case"checking":return"backend checking";case"connected":return"backend connected";case"error":return"backend unavailable"}}function Kz(e){return e==="assistant"?"Seele":"You"}const Xz=document.getElementById("root"),ob=window.__seeleCodexRoot??U7.createRoot(Xz);window.__seeleCodexRoot=ob;iR();ob.render(o.jsx(A.StrictMode,{children:o.jsx(Zz,{})}));function Zz(){const[e,t]=A.useState(null),[n,a]=A.useState(null),[l,u]=A.useState(""),[c,f]=A.useState(""),[h,m]=A.useState("admin"),[g,y]=A.useState(""),[k,x]=A.useState(!1),[C,D]=A.useState("");A.useEffect(()=>{let M=!1,q=0;const L=async()=>{try{const K=await Bv();if(M)return;t(K),f("")}catch{if(M)return;f("Reconnecting to Seele..."),q=window.setTimeout(L,2e3)}};return L(),()=>{M=!0,window.clearTimeout(q)}},[]),A.useEffect(()=>{let M=!1,q=0;const L=async()=>{try{const P=await ub();if(M)return;a(P),u(""),q=window.setTimeout(L,P.status==="authorized"&&P.configurationReady&&P.codexAccountsReady?3e4:3e3)}catch{if(M)return;u("Unable to reach Seele."),q=window.setTimeout(L,3e3)}},K=()=>{window.clearTimeout(q),L()};return window.addEventListener(t1,K),L(),()=>{M=!0,window.clearTimeout(q),window.removeEventListener(t1,K)}},[]),A.useEffect(()=>{const M=()=>{t({enabled:!0,authenticated:!1,user:null}),y(""),D("Your session has expired. Sign in again.")};return window.addEventListener(e1,M),()=>window.removeEventListener(e1,M)},[]);async function R(M){M.preventDefault(),x(!0),D("");try{const q=await fetch(Ne("auth/login"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:h,password:g})});if(!q.ok){D(q.status===401?"Incorrect username or password.":q.status===429?"Too many failed attempts. Try again later.":"Login failed.");return}y(""),t(await Bv())}catch{D("Unable to reach Seele.")}finally{x(!1)}}async function O(){await fetch(Ne("auth/logout"),{method:"POST"}).catch(()=>{}),t({enabled:!0,authenticated:!1,user:null})}if(n&&TE(n))return o.jsx(Qz,{authorization:n});if(!e||!n)return o.jsx("main",{className:"auth-shell",children:o.jsx("span",{className:"auth-loading",children:l||c||"Loading Seele..."})});if(!e.enabled||e.authenticated){const M=e.user??{id:"local-admin",username:"admin",role:"admin",active:!0,createdAt:"",updatedAt:""};return o.jsx(mN,{authEnabled:e.enabled,currentUser:M,deploymentId:n.deploymentId,onLogout:O},`${n.deploymentId}:${M.id}`)}return o.jsx("main",{className:"auth-shell",children:o.jsxs("section",{className:"auth-panel",children:[o.jsxs("header",{children:[o.jsx("p",{children:"Seele"}),o.jsx("h1",{children:"Sign in"})]}),o.jsxs("form",{onSubmit:R,children:[o.jsxs("label",{children:[o.jsx("span",{children:"Username"}),o.jsx("input",{autoComplete:"username",autoFocus:!0,onChange:M=>m(M.target.value),value:h})]}),o.jsxs("label",{children:[o.jsx("span",{children:"Password"}),o.jsx("input",{autoComplete:"current-password",onChange:M=>y(M.target.value),type:"password",value:g})]}),C?o.jsx("p",{className:"auth-error",role:"alert",children:C}):null,o.jsx("button",{disabled:k||!h||!g,type:"submit",children:k?"Signing in...":"Sign in"})]})]})})}function Qz({authorization:e}){const t={starting:{title:"Checking deployment authorization",body:"Seele is contacting its configured cloud service."},pending:{title:"Waiting for cloud approval",body:"A cloud administrator must authorize this deployment before it can be used."},revoked:{title:"Deployment access revoked",body:"This deployment is disabled until a cloud administrator authorizes it again."},unavailable:{title:"Cloud authorization unavailable",body:"Seele will keep retrying. Business APIs and the runtime remain paused."},authorized:{title:"Deployment authorized",body:"Seele is ready."}},n=e.status==="authorized"&&!e.configurationReady?{title:"Synchronizing global configuration",body:"Seele is applying the current cloud configuration before the deployment becomes available."}:e.status==="authorized"&&!e.codexAccountsReady?{title:"Synchronizing Codex accounts",body:"Seele is installing the cloud account credentials before the deployment becomes available."}:t[e.status];return o.jsx("main",{className:"deployment-shell",children:o.jsxs("section",{className:"deployment-panel deployment-waiting-panel",children:[o.jsx("div",{className:`deployment-status-mark is-${e.status}`,"aria-hidden":"true"}),o.jsx("p",{className:"deployment-kicker",children:"Seele deployment"}),o.jsx("h1",{children:n.title}),o.jsx("p",{className:"deployment-lead",children:n.body}),o.jsxs("dl",{className:"deployment-facts",children:[o.jsxs("div",{children:[o.jsx("dt",{children:"Deployment ID"}),o.jsx("dd",{children:o.jsx("code",{children:e.deploymentId})})]}),o.jsxs("div",{children:[o.jsx("dt",{children:"Name"}),o.jsx("dd",{children:e.name})]}),o.jsxs("div",{children:[o.jsx("dt",{children:"Cloud"}),o.jsx("dd",{children:e.cloudUrl})]}),o.jsxs("div",{children:[o.jsx("dt",{children:"Last checked"}),o.jsx("dd",{children:e.lastCheckedAt?eR(e.lastCheckedAt):"Starting"})]}),o.jsxs("div",{children:[o.jsx("dt",{children:"Global revision"}),o.jsxs("dd",{children:[e.appliedGlobalRevision," / ",e.requiredGlobalRevision]})]}),o.jsxs("div",{children:[o.jsx("dt",{children:"Codex account revision"}),o.jsxs("dd",{children:[e.appliedCodexAccountRevision," / ",e.requiredCodexAccountRevision]})]})]}),e.lastError||e.configurationError||e.codexAccountError?o.jsx("p",{className:"deployment-error",role:"alert",children:e.lastError||e.configurationError||e.codexAccountError}):null,o.jsx("a",{className:"deployment-primary-link",href:Jz(e.cloudUrl),children:"Open cloud deployment management"}),o.jsx("p",{className:"deployment-retry-note",children:"Authorization is checked automatically."})]})})}function Jz(e){return`${e.replace(/\/+$/,"")}/admin/deployments`}function eR(e){const t=Date.parse(e);return Number.isNaN(t)?e:new Date(t).toLocaleString()}async function ub(){const e=await fetch(Ne("deployment/authorization"));if(!e.ok)throw new Error(`Deployment authorization request failed: ${e.status}`);return e.json()}async function Bv(){const e=await fetch(Ne("auth/session"));if(!e.ok)throw new Error(`Auth session request failed: ${e.status}`);return e.json()}async function tR(){const e=Ne("admin/users"),t=await fetch(e);if(!t.ok)throw await Kn(t,{url:e});return(await t.json()).users}async function nR(e){const t=Ne("admin/users"),n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!n.ok)throw await Kn(n,{method:"POST",url:t});return(await n.json()).user}async function rR(e,t){const n=Ne(`admin/users/${encodeURIComponent(e)}`),a=await fetch(n,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok)throw await Kn(a,{method:"PATCH",url:n});return(await a.json()).user}async function aR(e){const t=Ne(`admin/users/${encodeURIComponent(e)}`),n=await fetch(t,{method:"DELETE"});if(!n.ok)throw await Kn(n,{method:"DELETE",url:t})}function iR(){if(window.__seeleAuthFetchInstalled)return;const e=window.fetch.bind(window);window.fetch=async(...t)=>{const n=await e(...t),a=typeof t[0]=="string"?t[0]:t[0]instanceof URL?t[0].toString():t[0].url;if(n.status===401){const l=await n.clone().json().then(u=>u&&typeof u=="object"&&"error"in u?u.error:void 0).catch(()=>{});AE(n.status,l,a.includes("/api/auth/"))==="reauthenticate"&&window.dispatchEvent(new Event(e1))}return n.status===503&&a.includes("/api/")&&eo(),n},window.__seeleAuthFetchInstalled=!0}function eo(){window.dispatchEvent(new Event(t1))}export{an as _,$7 as a,n8 as b,sR as c,B2 as d,Kv as f,qv as g,Xv as h,oR as k,vf as s,Y7 as w};