bilisum 1.13.2 → 1.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/bin/bilisum.js +157 -76
- package/package.json +7 -2
- package/runtime/VERSION +1 -0
- package/runtime/apps/service/pyproject.toml +29 -0
- package/runtime/apps/service/src/video_sum_service/__init__.py +1 -0
- package/runtime/apps/service/src/video_sum_service/__main__.py +5 -0
- package/runtime/apps/service/src/video_sum_service/app.py +480 -0
- package/runtime/apps/service/src/video_sum_service/context.py +24 -0
- package/runtime/apps/service/src/video_sum_service/integrations.py +264 -0
- package/runtime/apps/service/src/video_sum_service/knowledge/__init__.py +5 -0
- package/runtime/apps/service/src/video_sum_service/knowledge/index_service.py +408 -0
- package/runtime/apps/service/src/video_sum_service/knowledge/local_llm.py +319 -0
- package/runtime/apps/service/src/video_sum_service/knowledge/rag_service.py +492 -0
- package/runtime/apps/service/src/video_sum_service/knowledge/tag_service.py +242 -0
- package/runtime/apps/service/src/video_sum_service/main.py +31 -0
- package/runtime/apps/service/src/video_sum_service/repository.py +942 -0
- package/runtime/apps/service/src/video_sum_service/routers/__init__.py +1 -0
- package/runtime/apps/service/src/video_sum_service/routers/knowledge.py +272 -0
- package/runtime/apps/service/src/video_sum_service/routers/system.py +280 -0
- package/runtime/apps/service/src/video_sum_service/routers/tasks.py +287 -0
- package/runtime/apps/service/src/video_sum_service/routers/videos.py +766 -0
- package/runtime/apps/service/src/video_sum_service/runtime_support.py +1007 -0
- package/runtime/apps/service/src/video_sum_service/schemas.py +418 -0
- package/runtime/apps/service/src/video_sum_service/settings_manager.py +130 -0
- package/runtime/apps/service/src/video_sum_service/task_artifacts.py +102 -0
- package/runtime/apps/service/src/video_sum_service/task_exports.py +108 -0
- package/runtime/apps/service/src/video_sum_service/transcribe_worker.py +9 -0
- package/runtime/apps/service/src/video_sum_service/video_assets.py +623 -0
- package/runtime/apps/service/src/video_sum_service/worker.py +381 -0
- package/runtime/apps/web/static/apple-touch-icon.png +0 -0
- package/runtime/apps/web/static/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/runtime/apps/web/static/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/runtime/apps/web/static/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/runtime/apps/web/static/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/runtime/apps/web/static/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/runtime/apps/web/static/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/runtime/apps/web/static/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/runtime/apps/web/static/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/runtime/apps/web/static/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/runtime/apps/web/static/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/runtime/apps/web/static/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/runtime/apps/web/static/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/runtime/apps/web/static/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/runtime/apps/web/static/assets/icons/icon-180.png +0 -0
- package/runtime/apps/web/static/assets/icons/icon-512.png +0 -0
- package/runtime/apps/web/static/assets/icons/icon.svg +17 -0
- package/runtime/apps/web/static/assets/index-Cj5PVjQg.js +388 -0
- package/runtime/apps/web/static/assets/index-DU2t4_7s.css +1 -0
- package/runtime/apps/web/static/favicon-32x32.png +0 -0
- package/runtime/apps/web/static/favicon.ico +0 -0
- package/runtime/apps/web/static/favicon.svg +17 -0
- package/runtime/apps/web/static/index.html +19 -0
- package/runtime/apps/web/static/js/api.js +123 -0
- package/runtime/apps/web/static/js/main.js +932 -0
- package/runtime/apps/web/static/js/state.js +28 -0
- package/runtime/apps/web/static/js/utils.js +81 -0
- package/runtime/apps/web/static/js/views/home.js +604 -0
- package/runtime/apps/web/static/js/views/settings.js +477 -0
- package/runtime/apps/web/static/styles.css +2206 -0
- package/runtime/packages/core/pyproject.toml +18 -0
- package/runtime/packages/core/src/video_sum_core/__init__.py +1 -0
- package/runtime/packages/core/src/video_sum_core/errors.py +22 -0
- package/runtime/packages/core/src/video_sum_core/markdown_exports.py +154 -0
- package/runtime/packages/core/src/video_sum_core/models/__init__.py +1 -0
- package/runtime/packages/core/src/video_sum_core/models/tasks.py +70 -0
- package/runtime/packages/core/src/video_sum_core/pipeline/__init__.py +1 -0
- package/runtime/packages/core/src/video_sum_core/pipeline/base.py +46 -0
- package/runtime/packages/core/src/video_sum_core/pipeline/real.py +3467 -0
- package/runtime/packages/core/src/video_sum_core/transcribe_subprocess.py +173 -0
- package/runtime/packages/core/src/video_sum_core/utils.py +127 -0
- package/runtime/packages/infra/pyproject.toml +16 -0
- package/runtime/packages/infra/src/video_sum_infra/__init__.py +1 -0
- package/runtime/packages/infra/src/video_sum_infra/app.py +39 -0
- package/runtime/packages/infra/src/video_sum_infra/config.py +393 -0
- package/runtime/packages/infra/src/video_sum_infra/db.py +34 -0
- package/runtime/packages/infra/src/video_sum_infra/logging.py +54 -0
- package/runtime/packages/infra/src/video_sum_infra/paths.py +6 -0
- package/runtime/packages/infra/src/video_sum_infra/runtime.py +485 -0
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function Nc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bm={exports:{}},Iu={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var kv;function SS(){if(kv)return Iu;kv=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,s){var o=null;if(s!==void 0&&(o=""+s),i.key!==void 0&&(o=""+i.key),"key"in i){s={};for(var d in i)d!=="key"&&(s[d]=i[d])}else s=i;return i=s.ref,{$$typeof:e,type:r,key:o,ref:i!==void 0?i:null,props:s}}return Iu.Fragment=t,Iu.jsx=n,Iu.jsxs=n,Iu}var Nv;function kS(){return Nv||(Nv=1,Bm.exports=SS()),Bm.exports}var c=kS(),Om={exports:{}},yt={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var jv;function NS(){if(jv)return yt;jv=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),g=Symbol.iterator;function x(H){return H===null||typeof H!="object"?null:(H=g&&H[g]||H["@@iterator"],typeof H=="function"?H:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,j={};function N(H,W,B){this.props=H,this.context=W,this.refs=j,this.updater=B||w}N.prototype.isReactComponent={},N.prototype.setState=function(H,W){if(typeof H!="object"&&typeof H!="function"&&H!=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,H,W,"setState")},N.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function _(){}_.prototype=N.prototype;function E(H,W,B){this.props=H,this.context=W,this.refs=j,this.updater=B||w}var L=E.prototype=new _;L.constructor=E,k(L,N.prototype),L.isPureReactComponent=!0;var D=Array.isArray;function T(){}var O={H:null,A:null,T:null,S:null},Z=Object.prototype.hasOwnProperty;function V(H,W,B){var ce=B.ref;return{$$typeof:e,type:H,key:W,ref:ce!==void 0?ce:null,props:B}}function P(H,W){return V(H.type,W,H.props)}function K(H){return typeof H=="object"&&H!==null&&H.$$typeof===e}function X(H){var W={"=":"=0",":":"=2"};return"$"+H.replace(/[=:]/g,function(B){return W[B]})}var le=/\/+/g;function F(H,W){return typeof H=="object"&&H!==null&&H.key!=null?X(""+H.key):W.toString(36)}function Y(H){switch(H.status){case"fulfilled":return H.value;case"rejected":throw H.reason;default:switch(typeof H.status=="string"?H.then(T,T):(H.status="pending",H.then(function(W){H.status==="pending"&&(H.status="fulfilled",H.value=W)},function(W){H.status==="pending"&&(H.status="rejected",H.reason=W)})),H.status){case"fulfilled":return H.value;case"rejected":throw H.reason}}throw H}function q(H,W,B,ce,pe){var xe=typeof H;(xe==="undefined"||xe==="boolean")&&(H=null);var be=!1;if(H===null)be=!0;else switch(xe){case"bigint":case"string":case"number":be=!0;break;case"object":switch(H.$$typeof){case e:case t:be=!0;break;case y:return be=H._init,q(be(H._payload),W,B,ce,pe)}}if(be)return pe=pe(H),be=ce===""?"."+F(H,0):ce,D(pe)?(B="",be!=null&&(B=be.replace(le,"$&/")+"/"),q(pe,W,B,"",function(Ge){return Ge})):pe!=null&&(K(pe)&&(pe=P(pe,B+(pe.key==null||H&&H.key===pe.key?"":(""+pe.key).replace(le,"$&/")+"/")+be)),W.push(pe)),1;be=0;var ye=ce===""?".":ce+":";if(D(H))for(var Ce=0;Ce<H.length;Ce++)ce=H[Ce],xe=ye+F(ce,Ce),be+=q(ce,W,B,xe,pe);else if(Ce=x(H),typeof Ce=="function")for(H=Ce.call(H),Ce=0;!(ce=H.next()).done;)ce=ce.value,xe=ye+F(ce,Ce++),be+=q(ce,W,B,xe,pe);else if(xe==="object"){if(typeof H.then=="function")return q(Y(H),W,B,ce,pe);throw W=String(H),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(H).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.")}return be}function Q(H,W,B){if(H==null)return H;var ce=[],pe=0;return q(H,ce,"","",function(xe){return W.call(B,xe,pe++)}),ce}function ee(H){if(H._status===-1){var W=H._result;W=W(),W.then(function(B){(H._status===0||H._status===-1)&&(H._status=1,H._result=B)},function(B){(H._status===0||H._status===-1)&&(H._status=2,H._result=B)}),H._status===-1&&(H._status=0,H._result=W)}if(H._status===1)return H._result.default;throw H._result}var ne=typeof reportError=="function"?reportError:function(H){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var W=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof H=="object"&&H!==null&&typeof H.message=="string"?String(H.message):String(H),error:H});if(!window.dispatchEvent(W))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",H);return}console.error(H)},R={map:Q,forEach:function(H,W,B){Q(H,function(){W.apply(this,arguments)},B)},count:function(H){var W=0;return Q(H,function(){W++}),W},toArray:function(H){return Q(H,function(W){return W})||[]},only:function(H){if(!K(H))throw Error("React.Children.only expected to receive a single React element child.");return H}};return yt.Activity=p,yt.Children=R,yt.Component=N,yt.Fragment=n,yt.Profiler=i,yt.PureComponent=E,yt.StrictMode=r,yt.Suspense=f,yt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,yt.__COMPILER_RUNTIME={__proto__:null,c:function(H){return O.H.useMemoCache(H)}},yt.cache=function(H){return function(){return H.apply(null,arguments)}},yt.cacheSignal=function(){return null},yt.cloneElement=function(H,W,B){if(H==null)throw Error("The argument must be a React element, but you passed "+H+".");var ce=k({},H.props),pe=H.key;if(W!=null)for(xe in W.key!==void 0&&(pe=""+W.key),W)!Z.call(W,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&W.ref===void 0||(ce[xe]=W[xe]);var xe=arguments.length-2;if(xe===1)ce.children=B;else if(1<xe){for(var be=Array(xe),ye=0;ye<xe;ye++)be[ye]=arguments[ye+2];ce.children=be}return V(H.type,pe,ce)},yt.createContext=function(H){return H={$$typeof:o,_currentValue:H,_currentValue2:H,_threadCount:0,Provider:null,Consumer:null},H.Provider=H,H.Consumer={$$typeof:s,_context:H},H},yt.createElement=function(H,W,B){var ce,pe={},xe=null;if(W!=null)for(ce in W.key!==void 0&&(xe=""+W.key),W)Z.call(W,ce)&&ce!=="key"&&ce!=="__self"&&ce!=="__source"&&(pe[ce]=W[ce]);var be=arguments.length-2;if(be===1)pe.children=B;else if(1<be){for(var ye=Array(be),Ce=0;Ce<be;Ce++)ye[Ce]=arguments[Ce+2];pe.children=ye}if(H&&H.defaultProps)for(ce in be=H.defaultProps,be)pe[ce]===void 0&&(pe[ce]=be[ce]);return V(H,xe,pe)},yt.createRef=function(){return{current:null}},yt.forwardRef=function(H){return{$$typeof:d,render:H}},yt.isValidElement=K,yt.lazy=function(H){return{$$typeof:y,_payload:{_status:-1,_result:H},_init:ee}},yt.memo=function(H,W){return{$$typeof:m,type:H,compare:W===void 0?null:W}},yt.startTransition=function(H){var W=O.T,B={};O.T=B;try{var ce=H(),pe=O.S;pe!==null&&pe(B,ce),typeof ce=="object"&&ce!==null&&typeof ce.then=="function"&&ce.then(T,ne)}catch(xe){ne(xe)}finally{W!==null&&B.types!==null&&(W.types=B.types),O.T=W}},yt.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},yt.use=function(H){return O.H.use(H)},yt.useActionState=function(H,W,B){return O.H.useActionState(H,W,B)},yt.useCallback=function(H,W){return O.H.useCallback(H,W)},yt.useContext=function(H){return O.H.useContext(H)},yt.useDebugValue=function(){},yt.useDeferredValue=function(H,W){return O.H.useDeferredValue(H,W)},yt.useEffect=function(H,W){return O.H.useEffect(H,W)},yt.useEffectEvent=function(H){return O.H.useEffectEvent(H)},yt.useId=function(){return O.H.useId()},yt.useImperativeHandle=function(H,W,B){return O.H.useImperativeHandle(H,W,B)},yt.useInsertionEffect=function(H,W){return O.H.useInsertionEffect(H,W)},yt.useLayoutEffect=function(H,W){return O.H.useLayoutEffect(H,W)},yt.useMemo=function(H,W){return O.H.useMemo(H,W)},yt.useOptimistic=function(H,W){return O.H.useOptimistic(H,W)},yt.useReducer=function(H,W,B){return O.H.useReducer(H,W,B)},yt.useRef=function(H){return O.H.useRef(H)},yt.useState=function(H){return O.H.useState(H)},yt.useSyncExternalStore=function(H,W,B){return O.H.useSyncExternalStore(H,W,B)},yt.useTransition=function(){return O.H.useTransition()},yt.version="19.2.4",yt}var Cv;function jc(){return Cv||(Cv=1,Om.exports=NS()),Om.exports}var A=jc();const n6=Nc(A);var $m={exports:{}},Pu={},Hm={exports:{}},qm={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Ev;function jS(){return Ev||(Ev=1,(function(e){function t(q,Q){var ee=q.length;q.push(Q);e:for(;0<ee;){var ne=ee-1>>>1,R=q[ne];if(0<i(R,Q))q[ne]=Q,q[ee]=R,ee=ne;else break e}}function n(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var Q=q[0],ee=q.pop();if(ee!==Q){q[0]=ee;e:for(var ne=0,R=q.length,H=R>>>1;ne<H;){var W=2*(ne+1)-1,B=q[W],ce=W+1,pe=q[ce];if(0>i(B,ee))ce<R&&0>i(pe,B)?(q[ne]=pe,q[ce]=ee,ne=ce):(q[ne]=B,q[W]=ee,ne=W);else if(ce<R&&0>i(pe,ee))q[ne]=pe,q[ce]=ee,ne=ce;else break e}}return Q}function i(q,Q){var ee=q.sortIndex-Q.sortIndex;return ee!==0?ee:q.id-Q.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,d=o.now();e.unstable_now=function(){return o.now()-d}}var f=[],m=[],y=1,p=null,g=3,x=!1,w=!1,k=!1,j=!1,N=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function L(q){for(var Q=n(m);Q!==null;){if(Q.callback===null)r(m);else if(Q.startTime<=q)r(m),Q.sortIndex=Q.expirationTime,t(f,Q);else break;Q=n(m)}}function D(q){if(k=!1,L(q),!w)if(n(f)!==null)w=!0,T||(T=!0,X());else{var Q=n(m);Q!==null&&Y(D,Q.startTime-q)}}var T=!1,O=-1,Z=5,V=-1;function P(){return j?!0:!(e.unstable_now()-V<Z)}function K(){if(j=!1,T){var q=e.unstable_now();V=q;var Q=!0;try{e:{w=!1,k&&(k=!1,_(O),O=-1),x=!0;var ee=g;try{t:{for(L(q),p=n(f);p!==null&&!(p.expirationTime>q&&P());){var ne=p.callback;if(typeof ne=="function"){p.callback=null,g=p.priorityLevel;var R=ne(p.expirationTime<=q);if(q=e.unstable_now(),typeof R=="function"){p.callback=R,L(q),Q=!0;break t}p===n(f)&&r(f),L(q)}else r(f);p=n(f)}if(p!==null)Q=!0;else{var H=n(m);H!==null&&Y(D,H.startTime-q),Q=!1}}break e}finally{p=null,g=ee,x=!1}Q=void 0}}finally{Q?X():T=!1}}}var X;if(typeof E=="function")X=function(){E(K)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,F=le.port2;le.port1.onmessage=K,X=function(){F.postMessage(null)}}else X=function(){N(K,0)};function Y(q,Q){O=N(function(){q(e.unstable_now())},Q)}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(q){q.callback=null},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(q){switch(g){case 1:case 2:case 3:var Q=3;break;default:Q=g}var ee=g;g=Q;try{return q()}finally{g=ee}},e.unstable_requestPaint=function(){j=!0},e.unstable_runWithPriority=function(q,Q){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var ee=g;g=q;try{return Q()}finally{g=ee}},e.unstable_scheduleCallback=function(q,Q,ee){var ne=e.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?ne+ee:ne):ee=ne,q){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=ee+R,q={id:y++,callback:Q,priorityLevel:q,startTime:ee,expirationTime:R,sortIndex:-1},ee>ne?(q.sortIndex=ee,t(m,q),n(f)===null&&q===n(m)&&(k?(_(O),O=-1):k=!0,Y(D,ee-ne))):(q.sortIndex=R,t(f,q),w||x||(w=!0,T||(T=!0,X()))),q},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(q){var Q=g;return function(){var ee=g;g=Q;try{return q.apply(this,arguments)}finally{g=ee}}}})(qm)),qm}var Mv;function CS(){return Mv||(Mv=1,Hm.exports=jS()),Hm.exports}var Um={exports:{}},xr={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var _v;function ES(){if(_v)return xr;_v=1;var e=jc();function t(f){var m="https://react.dev/errors/"+f;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)m+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+f+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={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},i=Symbol.for("react.portal");function s(f,m,y){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:p==null?null:""+p,children:f,containerInfo:m,implementation:y}}var o=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,m){if(f==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return xr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,xr.createPortal=function(f,m){var y=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 s(f,m,null,y)},xr.flushSync=function(f){var m=o.T,y=r.p;try{if(o.T=null,r.p=2,f)return f()}finally{o.T=m,r.p=y,r.d.f()}},xr.preconnect=function(f,m){typeof f=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(f,m))},xr.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},xr.preinit=function(f,m){if(typeof f=="string"&&m&&typeof m.as=="string"){var y=m.as,p=d(y,m.crossOrigin),g=typeof m.integrity=="string"?m.integrity:void 0,x=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;y==="style"?r.d.S(f,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:p,integrity:g,fetchPriority:x}):y==="script"&&r.d.X(f,{crossOrigin:p,integrity:g,fetchPriority:x,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},xr.preinitModule=function(f,m){if(typeof f=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=d(m.as,m.crossOrigin);r.d.M(f,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(f)},xr.preload=function(f,m){if(typeof f=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,p=d(y,m.crossOrigin);r.d.L(f,y,{crossOrigin:p,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})}},xr.preloadModule=function(f,m){if(typeof f=="string")if(m){var y=d(m.as,m.crossOrigin);r.d.m(f,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(f)},xr.requestFormReset=function(f){r.d.r(f)},xr.unstable_batchedUpdates=function(f,m){return f(m)},xr.useFormState=function(f,m,y){return o.H.useFormState(f,m,y)},xr.useFormStatus=function(){return o.H.useHostTransitionStatus()},xr.version="19.2.4",xr}var Av;function r6(){if(Av)return Um.exports;Av=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(),Um.exports=ES(),Um.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var Tv;function MS(){if(Tv)return Pu;Tv=1;var e=CS(),t=jc(),n=r6();function r(a){var l="https://react.dev/errors/"+a;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)l+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+a+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function s(a){var l=a,u=a;if(a.alternate)for(;l.return;)l=l.return;else{a=l;do l=a,(l.flags&4098)!==0&&(u=l.return),a=l.return;while(a)}return l.tag===3?u:null}function o(a){if(a.tag===13){var l=a.memoizedState;if(l===null&&(a=a.alternate,a!==null&&(l=a.memoizedState)),l!==null)return l.dehydrated}return null}function d(a){if(a.tag===31){var l=a.memoizedState;if(l===null&&(a=a.alternate,a!==null&&(l=a.memoizedState)),l!==null)return l.dehydrated}return null}function f(a){if(s(a)!==a)throw Error(r(188))}function m(a){var l=a.alternate;if(!l){if(l=s(a),l===null)throw Error(r(188));return l!==a?null:a}for(var u=a,h=l;;){var v=u.return;if(v===null)break;var b=v.alternate;if(b===null){if(h=v.return,h!==null){u=h;continue}break}if(v.child===b.child){for(b=v.child;b;){if(b===u)return f(v),a;if(b===h)return f(v),l;b=b.sibling}throw Error(r(188))}if(u.return!==h.return)u=v,h=b;else{for(var M=!1,$=v.child;$;){if($===u){M=!0,u=v,h=b;break}if($===h){M=!0,h=v,u=b;break}$=$.sibling}if(!M){for($=b.child;$;){if($===u){M=!0,u=b,h=v;break}if($===h){M=!0,h=b,u=v;break}$=$.sibling}if(!M)throw Error(r(189))}}if(u.alternate!==h)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?a:l}function y(a){var l=a.tag;if(l===5||l===26||l===27||l===6)return a;for(a=a.child;a!==null;){if(l=y(a),l!==null)return l;a=a.sibling}return null}var p=Object.assign,g=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),E=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),P=Symbol.for("react.memo_cache_sentinel"),K=Symbol.iterator;function X(a){return a===null||typeof a!="object"?null:(a=K&&a[K]||a["@@iterator"],typeof a=="function"?a:null)}var le=Symbol.for("react.client.reference");function F(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===le?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case k:return"Fragment";case N:return"Profiler";case j:return"StrictMode";case D:return"Suspense";case T:return"SuspenseList";case V:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case w:return"Portal";case E:return a.displayName||"Context";case _:return(a._context.displayName||"Context")+".Consumer";case L:var l=a.render;return a=a.displayName,a||(a=l.displayName||l.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case O:return l=a.displayName||null,l!==null?l:F(a.type)||"Memo";case Z:l=a._payload,a=a._init;try{return F(a(l))}catch{}}return null}var Y=Array.isArray,q=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},ne=[],R=-1;function H(a){return{current:a}}function W(a){0>R||(a.current=ne[R],ne[R]=null,R--)}function B(a,l){R++,ne[R]=a.current,a.current=l}var ce=H(null),pe=H(null),xe=H(null),be=H(null);function ye(a,l){switch(B(xe,l),B(pe,a),B(ce,null),l.nodeType){case 9:case 11:a=(a=l.documentElement)&&(a=a.namespaceURI)?Gy(a):0;break;default:if(a=l.tagName,l=l.namespaceURI)l=Gy(l),a=Yy(l,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}W(ce),B(ce,a)}function Ce(){W(ce),W(pe),W(xe)}function Ge(a){a.memoizedState!==null&&B(be,a);var l=ce.current,u=Yy(l,a.type);l!==u&&(B(pe,a),B(ce,u))}function Pe(a){pe.current===a&&(W(ce),W(pe)),be.current===a&&(W(be),$u._currentValue=ee)}var $e,qe;function nt(a){if($e===void 0)try{throw Error()}catch(u){var l=u.stack.trim().match(/\n( *(at )?)/);$e=l&&l[1]||"",qe=-1<u.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+$e+a+qe}var lt=!1;function We(a,l){if(!a||lt)return"";lt=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(l){var Ne=function(){throw Error()};if(Object.defineProperty(Ne.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ne,[])}catch(he){var fe=he}Reflect.construct(a,[],Ne)}else{try{Ne.call()}catch(he){fe=he}a.call(Ne.prototype)}}else{try{throw Error()}catch(he){fe=he}(Ne=a())&&typeof Ne.catch=="function"&&Ne.catch(function(){})}}catch(he){if(he&&fe&&typeof he.stack=="string")return[he.stack,fe.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=h.DetermineComponentFrameRoot(),M=b[0],$=b[1];if(M&&$){var re=M.split(`
|
|
44
|
+
`),ue=$.split(`
|
|
45
|
+
`);for(v=h=0;h<re.length&&!re[h].includes("DetermineComponentFrameRoot");)h++;for(;v<ue.length&&!ue[v].includes("DetermineComponentFrameRoot");)v++;if(h===re.length||v===ue.length)for(h=re.length-1,v=ue.length-1;1<=h&&0<=v&&re[h]!==ue[v];)v--;for(;1<=h&&0<=v;h--,v--)if(re[h]!==ue[v]){if(h!==1||v!==1)do if(h--,v--,0>v||re[h]!==ue[v]){var ge=`
|
|
46
|
+
`+re[h].replace(" at new "," at ");return a.displayName&&ge.includes("<anonymous>")&&(ge=ge.replace("<anonymous>",a.displayName)),ge}while(1<=h&&0<=v);break}}}finally{lt=!1,Error.prepareStackTrace=u}return(u=a?a.displayName||a.name:"")?nt(u):""}function Dt(a,l){switch(a.tag){case 26:case 27:case 5:return nt(a.type);case 16:return nt("Lazy");case 13:return a.child!==l&&l!==null?nt("Suspense Fallback"):nt("Suspense");case 19:return nt("SuspenseList");case 0:case 15:return We(a.type,!1);case 11:return We(a.type.render,!1);case 1:return We(a.type,!0);case 31:return nt("Activity");default:return""}}function ke(a){try{var l="",u=null;do l+=Dt(a,u),u=a,a=a.return;while(a);return l}catch(h){return`
|
|
47
|
+
Error generating stack: `+h.message+`
|
|
48
|
+
`+h.stack}}var et=Object.prototype.hasOwnProperty,st=e.unstable_scheduleCallback,Nt=e.unstable_cancelCallback,kn=e.unstable_shouldYield,Ht=e.unstable_requestPaint,ct=e.unstable_now,Lt=e.unstable_getCurrentPriorityLevel,de=e.unstable_ImmediatePriority,je=e.unstable_UserBlockingPriority,He=e.unstable_NormalPriority,rt=e.unstable_LowPriority,gt=e.unstable_IdlePriority,Pt=e.log,fn=e.unstable_setDisableYieldValue,Wt=null,Fe=null;function qt(a){if(typeof Pt=="function"&&fn(a),Fe&&typeof Fe.setStrictMode=="function")try{Fe.setStrictMode(Wt,a)}catch{}}var jt=Math.clz32?Math.clz32:_e,Jt=Math.log,Rt=Math.LN2;function _e(a){return a>>>=0,a===0?32:31-(Jt(a)/Rt|0)|0}var Le=256,Ye=262144,Ue=4194304;function dt(a){var l=a&42;if(l!==0)return l;switch(a&-a){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 a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function en(a,l,u){var h=a.pendingLanes;if(h===0)return 0;var v=0,b=a.suspendedLanes,M=a.pingedLanes;a=a.warmLanes;var $=h&134217727;return $!==0?(h=$&~b,h!==0?v=dt(h):(M&=$,M!==0?v=dt(M):u||(u=$&~a,u!==0&&(v=dt(u))))):($=h&~b,$!==0?v=dt($):M!==0?v=dt(M):u||(u=h&~a,u!==0&&(v=dt(u)))),v===0?0:l!==0&&l!==v&&(l&b)===0&&(b=v&-v,u=l&-l,b>=u||b===32&&(u&4194048)!==0)?l:v}function Kt(a,l){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&l)===0}function ft(a,l){switch(a){case 1:case 2:case 4:case 8:case 64:return l+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 l+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 Oe(){var a=Ue;return Ue<<=1,(Ue&62914560)===0&&(Ue=4194304),a}function Ln(a){for(var l=[],u=0;31>u;u++)l.push(a);return l}function kt(a,l){a.pendingLanes|=l,l!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function hn(a,l,u,h,v,b){var M=a.pendingLanes;a.pendingLanes=u,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=u,a.entangledLanes&=u,a.errorRecoveryDisabledLanes&=u,a.shellSuspendCounter=0;var $=a.entanglements,re=a.expirationTimes,ue=a.hiddenUpdates;for(u=M&~u;0<u;){var ge=31-jt(u),Ne=1<<ge;$[ge]=0,re[ge]=-1;var fe=ue[ge];if(fe!==null)for(ue[ge]=null,ge=0;ge<fe.length;ge++){var he=fe[ge];he!==null&&(he.lane&=-536870913)}u&=~Ne}h!==0&&or(a,h,0),b!==0&&v===0&&a.tag!==0&&(a.suspendedLanes|=b&~(M&~l))}function or(a,l,u){a.pendingLanes|=l,a.suspendedLanes&=~l;var h=31-jt(l);a.entangledLanes|=l,a.entanglements[h]=a.entanglements[h]|1073741824|u&261930}function Wn(a,l){var u=a.entangledLanes|=l;for(a=a.entanglements;u;){var h=31-jt(u),v=1<<h;v&l|a[h]&l&&(a[h]|=l),u&=~v}}function Lr(a,l){var u=l&-l;return u=(u&42)!==0?1:Bt(u),(u&(a.suspendedLanes|l))!==0?0:u}function Bt(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=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:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function kr(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function tt(){var a=Q.p;return a!==0?a:(a=window.event,a===void 0?32:gv(a.type))}function Za(a,l){var u=Q.p;try{return Q.p=a,l()}finally{Q.p=u}}var Jn=Math.random().toString(36).slice(2),an="__reactFiber$"+Jn,un="__reactProps$"+Jn,er="__reactContainer$"+Jn,$n="__reactEvents$"+Jn,ol="__reactListeners$"+Jn,tr="__reactHandles$"+Jn,mn="__reactResources$"+Jn,ur="__reactMarker$"+Jn;function Yt(a){delete a[an],delete a[un],delete a[$n],delete a[ol],delete a[tr]}function Rn(a){var l=a[an];if(l)return l;for(var u=a.parentNode;u;){if(l=u[er]||u[an]){if(u=l.alternate,l.child!==null||u!==null&&u.child!==null)for(a=ev(a);a!==null;){if(u=a[an])return u;a=ev(a)}return l}a=u,u=a.parentNode}return null}function Nr(a){if(a=a[an]||a[er]){var l=a.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return a}return null}function Nn(a){var l=a.tag;if(l===5||l===26||l===27||l===6)return a.stateNode;throw Error(r(33))}function Rr(a){var l=a[mn];return l||(l=a[mn]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function cn(a){a[ur]=!0}var Hn=new Set,Qa={};function pr(a,l){Zr(a,l),Zr(a+"Capture",l)}function Zr(a,l){for(Qa[a]=l,a=0;a<l.length;a++)Hn.add(l[a])}var Da=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]*$"),Br={},ul={};function Wa(a){return et.call(ul,a)?!0:et.call(Br,a)?!1:Da.test(a)?ul[a]=!0:(Br[a]=!0,!1)}function Ja(a,l,u){if(Wa(l))if(u===null)a.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":a.removeAttribute(l);return;case"boolean":var h=l.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){a.removeAttribute(l);return}}a.setAttribute(l,""+u)}}function La(a,l,u){if(u===null)a.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(l);return}a.setAttribute(l,""+u)}}function jr(a,l,u,h){if(h===null)a.removeAttribute(u);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(u);return}a.setAttributeNS(l,u,""+h)}}function jn(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function ga(a){var l=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function cl(a,l,u){var h=Object.getOwnPropertyDescriptor(a.constructor.prototype,l);if(!a.hasOwnProperty(l)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var v=h.get,b=h.set;return Object.defineProperty(a,l,{configurable:!0,get:function(){return v.call(this)},set:function(M){u=""+M,b.call(this,M)}}),Object.defineProperty(a,l,{enumerable:h.enumerable}),{getValue:function(){return u},setValue:function(M){u=""+M},stopTracking:function(){a._valueTracker=null,delete a[l]}}}}function Cr(a){if(!a._valueTracker){var l=ga(a)?"checked":"value";a._valueTracker=cl(a,l,""+a[l])}}function dl(a){if(!a)return!1;var l=a._valueTracker;if(!l)return!0;var u=l.getValue(),h="";return a&&(h=ga(a)?a.checked?"true":"false":a.value),a=h,a!==u?(l.setValue(a),!0):!1}function ya(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var fl=/[\n"\\]/g;function An(a){return a.replace(fl,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function gr(a,l,u,h,v,b,M,$){a.name="",M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?a.type=M:a.removeAttribute("type"),l!=null?M==="number"?(l===0&&a.value===""||a.value!=l)&&(a.value=""+jn(l)):a.value!==""+jn(l)&&(a.value=""+jn(l)):M!=="submit"&&M!=="reset"||a.removeAttribute("value"),l!=null?yr(a,M,jn(l)):u!=null?yr(a,M,jn(u)):h!=null&&a.removeAttribute("value"),v==null&&b!=null&&(a.defaultChecked=!!b),v!=null&&(a.checked=v&&typeof v!="function"&&typeof v!="symbol"),$!=null&&typeof $!="function"&&typeof $!="symbol"&&typeof $!="boolean"?a.name=""+jn($):a.removeAttribute("name")}function Cn(a,l,u,h,v,b,M,$){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(a.type=b),l!=null||u!=null){if(!(b!=="submit"&&b!=="reset"||l!=null)){Cr(a);return}u=u!=null?""+jn(u):"",l=l!=null?""+jn(l):u,$||l===a.value||(a.value=l),a.defaultValue=l}h=h??v,h=typeof h!="function"&&typeof h!="symbol"&&!!h,a.checked=$?a.checked:!!h,a.defaultChecked=!!h,M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(a.name=M),Cr(a)}function yr(a,l,u){l==="number"&&ya(a.ownerDocument)===a||a.defaultValue===""+u||(a.defaultValue=""+u)}function qn(a,l,u,h){if(a=a.options,l){l={};for(var v=0;v<u.length;v++)l["$"+u[v]]=!0;for(u=0;u<a.length;u++)v=l.hasOwnProperty("$"+a[u].value),a[u].selected!==v&&(a[u].selected=v),v&&h&&(a[u].defaultSelected=!0)}else{for(u=""+jn(u),l=null,v=0;v<a.length;v++){if(a[v].value===u){a[v].selected=!0,h&&(a[v].defaultSelected=!0);return}l!==null||a[v].disabled||(l=a[v])}l!==null&&(l.selected=!0)}}function Ra(a,l,u){if(l!=null&&(l=""+jn(l),l!==a.value&&(a.value=l),u==null)){a.defaultValue!==l&&(a.defaultValue=l);return}a.defaultValue=u!=null?""+jn(u):""}function vr(a,l,u,h){if(l==null){if(h!=null){if(u!=null)throw Error(r(92));if(Y(h)){if(1<h.length)throw Error(r(93));h=h[0]}u=h}u==null&&(u=""),l=u}u=jn(l),a.defaultValue=u,h=a.textContent,h===u&&h!==""&&h!==null&&(a.value=h),Cr(a)}function Or(a,l){if(l){var u=a.firstChild;if(u&&u===a.lastChild&&u.nodeType===3){u.nodeValue=l;return}}a.textContent=l}var nr=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 hl(a,l,u){var h=l.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?h?a.setProperty(l,""):l==="float"?a.cssFloat="":a[l]="":h?a.setProperty(l,u):typeof u!="number"||u===0||nr.has(l)?l==="float"?a.cssFloat=u:a[l]=(""+u).trim():a[l]=u+"px"}function cr(a,l,u){if(l!=null&&typeof l!="object")throw Error(r(62));if(a=a.style,u!=null){for(var h in u)!u.hasOwnProperty(h)||l!=null&&l.hasOwnProperty(h)||(h.indexOf("--")===0?a.setProperty(h,""):h==="float"?a.cssFloat="":a[h]="");for(var v in l)h=l[v],l.hasOwnProperty(v)&&u[v]!==h&&hl(a,v,h)}else for(var b in l)l.hasOwnProperty(b)&&hl(a,b,l[b])}function Mi(a){if(a.indexOf("-")===-1)return!1;switch(a){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 Un=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"]]),as=/^[\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 ht(a){return as.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function Qr(){}var is=null;function ls(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var ei=null,Ba=null;function Is(a){var l=Nr(a);if(l&&(a=l.stateNode)){var u=a[un]||null;e:switch(a=l.stateNode,l.type){case"input":if(gr(a,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),l=u.name,u.type==="radio"&&l!=null){for(u=a;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+An(""+l)+'"][type="radio"]'),l=0;l<u.length;l++){var h=u[l];if(h!==a&&h.form===a.form){var v=h[un]||null;if(!v)throw Error(r(90));gr(h,v.value,v.defaultValue,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name)}}for(l=0;l<u.length;l++)h=u[l],h.form===a.form&&dl(h)}break e;case"textarea":Ra(a,u.value,u.defaultValue);break e;case"select":l=u.value,l!=null&&qn(a,!!u.multiple,l,!1)}}}var ss=!1;function Oa(a,l,u){if(ss)return a(l,u);ss=!0;try{var h=a(l);return h}finally{if(ss=!1,(ei!==null||Ba!==null)&&(C0(),ei&&(l=ei,a=Ba,Ba=ei=null,Is(l),a)))for(l=0;l<a.length;l++)Is(a[l])}}function $r(a,l){var u=a.stateNode;if(u===null)return null;var h=u[un]||null;if(h===null)return null;u=h[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(a=a.type,h=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!h;break e;default:a=!1}if(a)return null;if(u&&typeof u!="function")throw Error(r(231,l,typeof u));return u}var Hr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ml=!1;if(Hr)try{var rr={};Object.defineProperty(rr,"passive",{get:function(){ml=!0}}),window.addEventListener("test",rr,rr),window.removeEventListener("test",rr,rr)}catch{ml=!1}var va=null,os=null,yn=null;function pl(){if(yn)return yn;var a,l=os,u=l.length,h,v="value"in va?va.value:va.textContent,b=v.length;for(a=0;a<u&&l[a]===v[a];a++);var M=u-a;for(h=1;h<=M&&l[u-h]===v[b-h];h++);return yn=v.slice(a,1<h?1-h:void 0)}function ti(a){var l=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&l===13&&(a=13)):a=l,a===10&&(a=13),32<=a||a===13?a:0}function ni(){return!0}function gl(){return!1}function In(a){function l(u,h,v,b,M){this._reactName=u,this._targetInst=v,this.type=h,this.nativeEvent=b,this.target=M,this.currentTarget=null;for(var $ in a)a.hasOwnProperty($)&&(u=a[$],this[$]=u?u(b):b[$]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?ni:gl,this.isPropagationStopped=gl,this}return p(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=ni)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=ni)},persist:function(){},isPersistent:ni}),l}var Wr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ri=In(Wr),$a=p({},Wr,{view:0,detail:0}),us=In($a),_i,Ai,Ha,ai=p({},$a,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ru,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==Ha&&(Ha&&a.type==="mousemove"?(_i=a.screenX-Ha.screenX,Ai=a.screenY-Ha.screenY):Ai=_i=0,Ha=a),_i)},movementY:function(a){return"movementY"in a?a.movementY:Ai}}),yl=In(ai),G=p({},ai,{dataTransfer:0}),Se=In(G),ve=p({},$a,{relatedTarget:0}),Be=In(ve),I=p({},Wr,{animationName:0,elapsedTime:0,pseudoElement:0}),me=In(I),Ae=p({},Wr,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),ot=In(Ae),At=p({},Wr,{data:0}),Xt=In(At),Er={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xa={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"},Hf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qf(a){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(a):(a=Hf[a])?!!l[a]:!1}function ru(){return qf}var Ic=p({},$a,{key:function(a){if(a.key){var l=Er[a.key]||a.key;if(l!=="Unidentified")return l}return a.type==="keypress"?(a=ti(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?xa[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ru,charCode:function(a){return a.type==="keypress"?ti(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?ti(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),Pc=In(Ic),Jr=p({},ai,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ti=In(Jr),Uf=p({},$a,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ru}),au=In(Uf),Fc=p({},Wr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Hw=In(Fc),qw=p({},ai,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),Uw=In(qw),Iw=p({},Wr,{newState:0,oldState:0}),Pw=In(Iw),Fw=[9,13,27,32],If=Hr&&"CompositionEvent"in window,iu=null;Hr&&"documentMode"in document&&(iu=document.documentMode);var Vw=Hr&&"TextEvent"in window&&!iu,Wg=Hr&&(!If||iu&&8<iu&&11>=iu),Jg=" ",e4=!1;function t4(a,l){switch(a){case"keyup":return Fw.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function n4(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Ps=!1;function Gw(a,l){switch(a){case"compositionend":return n4(l);case"keypress":return l.which!==32?null:(e4=!0,Jg);case"textInput":return a=l.data,a===Jg&&e4?null:a;default:return null}}function Yw(a,l){if(Ps)return a==="compositionend"||!If&&t4(a,l)?(a=pl(),yn=os=va=null,Ps=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return Wg&&l.locale!=="ko"?null:l.data;default:return null}}var Xw={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 r4(a){var l=a&&a.nodeName&&a.nodeName.toLowerCase();return l==="input"?!!Xw[a.type]:l==="textarea"}function a4(a,l,u,h){ei?Ba?Ba.push(h):Ba=[h]:ei=h,l=D0(l,"onChange"),0<l.length&&(u=new ri("onChange","change",null,u,h),a.push({event:u,listeners:l}))}var lu=null,su=null;function Kw(a){qy(a,0)}function Vc(a){var l=Nn(a);if(dl(l))return a}function i4(a,l){if(a==="change")return l}var l4=!1;if(Hr){var Pf;if(Hr){var Ff="oninput"in document;if(!Ff){var s4=document.createElement("div");s4.setAttribute("oninput","return;"),Ff=typeof s4.oninput=="function"}Pf=Ff}else Pf=!1;l4=Pf&&(!document.documentMode||9<document.documentMode)}function o4(){lu&&(lu.detachEvent("onpropertychange",u4),su=lu=null)}function u4(a){if(a.propertyName==="value"&&Vc(su)){var l=[];a4(l,su,a,ls(a)),Oa(Kw,l)}}function Zw(a,l,u){a==="focusin"?(o4(),lu=l,su=u,lu.attachEvent("onpropertychange",u4)):a==="focusout"&&o4()}function Qw(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Vc(su)}function Ww(a,l){if(a==="click")return Vc(l)}function Jw(a,l){if(a==="input"||a==="change")return Vc(l)}function e9(a,l){return a===l&&(a!==0||1/a===1/l)||a!==a&&l!==l}var ea=typeof Object.is=="function"?Object.is:e9;function ou(a,l){if(ea(a,l))return!0;if(typeof a!="object"||a===null||typeof l!="object"||l===null)return!1;var u=Object.keys(a),h=Object.keys(l);if(u.length!==h.length)return!1;for(h=0;h<u.length;h++){var v=u[h];if(!et.call(l,v)||!ea(a[v],l[v]))return!1}return!0}function c4(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function d4(a,l){var u=c4(a);a=0;for(var h;u;){if(u.nodeType===3){if(h=a+u.textContent.length,a<=l&&h>=l)return{node:u,offset:l-a};a=h}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=c4(u)}}function f4(a,l){return a&&l?a===l?!0:a&&a.nodeType===3?!1:l&&l.nodeType===3?f4(a,l.parentNode):"contains"in a?a.contains(l):a.compareDocumentPosition?!!(a.compareDocumentPosition(l)&16):!1:!1}function h4(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var l=ya(a.document);l instanceof a.HTMLIFrameElement;){try{var u=typeof l.contentWindow.location.href=="string"}catch{u=!1}if(u)a=l.contentWindow;else break;l=ya(a.document)}return l}function Vf(a){var l=a&&a.nodeName&&a.nodeName.toLowerCase();return l&&(l==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||l==="textarea"||a.contentEditable==="true")}var t9=Hr&&"documentMode"in document&&11>=document.documentMode,Fs=null,Gf=null,uu=null,Yf=!1;function m4(a,l,u){var h=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Yf||Fs==null||Fs!==ya(h)||(h=Fs,"selectionStart"in h&&Vf(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),uu&&ou(uu,h)||(uu=h,h=D0(Gf,"onSelect"),0<h.length&&(l=new ri("onSelect","select",null,l,u),a.push({event:l,listeners:h}),l.target=Fs)))}function cs(a,l){var u={};return u[a.toLowerCase()]=l.toLowerCase(),u["Webkit"+a]="webkit"+l,u["Moz"+a]="moz"+l,u}var Vs={animationend:cs("Animation","AnimationEnd"),animationiteration:cs("Animation","AnimationIteration"),animationstart:cs("Animation","AnimationStart"),transitionrun:cs("Transition","TransitionRun"),transitionstart:cs("Transition","TransitionStart"),transitioncancel:cs("Transition","TransitionCancel"),transitionend:cs("Transition","TransitionEnd")},Xf={},p4={};Hr&&(p4=document.createElement("div").style,"AnimationEvent"in window||(delete Vs.animationend.animation,delete Vs.animationiteration.animation,delete Vs.animationstart.animation),"TransitionEvent"in window||delete Vs.transitionend.transition);function ds(a){if(Xf[a])return Xf[a];if(!Vs[a])return a;var l=Vs[a],u;for(u in l)if(l.hasOwnProperty(u)&&u in p4)return Xf[a]=l[u];return a}var g4=ds("animationend"),y4=ds("animationiteration"),v4=ds("animationstart"),n9=ds("transitionrun"),r9=ds("transitionstart"),a9=ds("transitioncancel"),x4=ds("transitionend"),b4=new Map,Kf="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(" ");Kf.push("scrollEnd");function qa(a,l){b4.set(a,l),pr(l,[a])}var Gc=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},ba=[],Gs=0,Zf=0;function Yc(){for(var a=Gs,l=Zf=Gs=0;l<a;){var u=ba[l];ba[l++]=null;var h=ba[l];ba[l++]=null;var v=ba[l];ba[l++]=null;var b=ba[l];if(ba[l++]=null,h!==null&&v!==null){var M=h.pending;M===null?v.next=v:(v.next=M.next,M.next=v),h.pending=v}b!==0&&w4(u,v,b)}}function Xc(a,l,u,h){ba[Gs++]=a,ba[Gs++]=l,ba[Gs++]=u,ba[Gs++]=h,Zf|=h,a.lanes|=h,a=a.alternate,a!==null&&(a.lanes|=h)}function Qf(a,l,u,h){return Xc(a,l,u,h),Kc(a)}function fs(a,l){return Xc(a,null,null,l),Kc(a)}function w4(a,l,u){a.lanes|=u;var h=a.alternate;h!==null&&(h.lanes|=u);for(var v=!1,b=a.return;b!==null;)b.childLanes|=u,h=b.alternate,h!==null&&(h.childLanes|=u),b.tag===22&&(a=b.stateNode,a===null||a._visibility&1||(v=!0)),a=b,b=b.return;return a.tag===3?(b=a.stateNode,v&&l!==null&&(v=31-jt(u),a=b.hiddenUpdates,h=a[v],h===null?a[v]=[l]:h.push(l),l.lane=u|536870912),b):null}function Kc(a){if(50<Tu)throw Tu=0,lm=null,Error(r(185));for(var l=a.return;l!==null;)a=l,l=a.return;return a.tag===3?a.stateNode:null}var Ys={};function i9(a,l,u,h){this.tag=a,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ta(a,l,u,h){return new i9(a,l,u,h)}function Wf(a){return a=a.prototype,!(!a||!a.isReactComponent)}function zi(a,l){var u=a.alternate;return u===null?(u=ta(a.tag,l,a.key,a.mode),u.elementType=a.elementType,u.type=a.type,u.stateNode=a.stateNode,u.alternate=a,a.alternate=u):(u.pendingProps=l,u.type=a.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=a.flags&65011712,u.childLanes=a.childLanes,u.lanes=a.lanes,u.child=a.child,u.memoizedProps=a.memoizedProps,u.memoizedState=a.memoizedState,u.updateQueue=a.updateQueue,l=a.dependencies,u.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},u.sibling=a.sibling,u.index=a.index,u.ref=a.ref,u.refCleanup=a.refCleanup,u}function S4(a,l){a.flags&=65011714;var u=a.alternate;return u===null?(a.childLanes=0,a.lanes=l,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=u.childLanes,a.lanes=u.lanes,a.child=u.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=u.memoizedProps,a.memoizedState=u.memoizedState,a.updateQueue=u.updateQueue,a.type=u.type,l=u.dependencies,a.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),a}function Zc(a,l,u,h,v,b){var M=0;if(h=a,typeof a=="function")Wf(a)&&(M=1);else if(typeof a=="string")M=cS(a,u,ce.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case V:return a=ta(31,u,l,v),a.elementType=V,a.lanes=b,a;case k:return hs(u.children,v,b,l);case j:M=8,v|=24;break;case N:return a=ta(12,u,l,v|2),a.elementType=N,a.lanes=b,a;case D:return a=ta(13,u,l,v),a.elementType=D,a.lanes=b,a;case T:return a=ta(19,u,l,v),a.elementType=T,a.lanes=b,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case E:M=10;break e;case _:M=9;break e;case L:M=11;break e;case O:M=14;break e;case Z:M=16,h=null;break e}M=29,u=Error(r(130,a===null?"null":typeof a,"")),h=null}return l=ta(M,u,l,v),l.elementType=a,l.type=h,l.lanes=b,l}function hs(a,l,u,h){return a=ta(7,a,h,l),a.lanes=u,a}function Jf(a,l,u){return a=ta(6,a,null,l),a.lanes=u,a}function k4(a){var l=ta(18,null,null,0);return l.stateNode=a,l}function eh(a,l,u){return l=ta(4,a.children!==null?a.children:[],a.key,l),l.lanes=u,l.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},l}var N4=new WeakMap;function wa(a,l){if(typeof a=="object"&&a!==null){var u=N4.get(a);return u!==void 0?u:(l={value:a,source:l,stack:ke(l)},N4.set(a,l),l)}return{value:a,source:l,stack:ke(l)}}var Xs=[],Ks=0,Qc=null,cu=0,Sa=[],ka=0,vl=null,ii=1,li="";function Di(a,l){Xs[Ks++]=cu,Xs[Ks++]=Qc,Qc=a,cu=l}function j4(a,l,u){Sa[ka++]=ii,Sa[ka++]=li,Sa[ka++]=vl,vl=a;var h=ii;a=li;var v=32-jt(h)-1;h&=~(1<<v),u+=1;var b=32-jt(l)+v;if(30<b){var M=v-v%5;b=(h&(1<<M)-1).toString(32),h>>=M,v-=M,ii=1<<32-jt(l)+v|u<<v|h,li=b+a}else ii=1<<b|u<<v|h,li=a}function th(a){a.return!==null&&(Di(a,1),j4(a,1,0))}function nh(a){for(;a===Qc;)Qc=Xs[--Ks],Xs[Ks]=null,cu=Xs[--Ks],Xs[Ks]=null;for(;a===vl;)vl=Sa[--ka],Sa[ka]=null,li=Sa[--ka],Sa[ka]=null,ii=Sa[--ka],Sa[ka]=null}function C4(a,l){Sa[ka++]=ii,Sa[ka++]=li,Sa[ka++]=vl,ii=l.id,li=l.overflow,vl=a}var dr=null,pn=null,Ot=!1,xl=null,Na=!1,rh=Error(r(519));function bl(a){var l=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw du(wa(l,a)),rh}function E4(a){var l=a.stateNode,u=a.type,h=a.memoizedProps;switch(l[an]=a,l[un]=h,u){case"dialog":Mt("cancel",l),Mt("close",l);break;case"iframe":case"object":case"embed":Mt("load",l);break;case"video":case"audio":for(u=0;u<Du.length;u++)Mt(Du[u],l);break;case"source":Mt("error",l);break;case"img":case"image":case"link":Mt("error",l),Mt("load",l);break;case"details":Mt("toggle",l);break;case"input":Mt("invalid",l),Cn(l,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0);break;case"select":Mt("invalid",l);break;case"textarea":Mt("invalid",l),vr(l,h.value,h.defaultValue,h.children)}u=h.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||l.textContent===""+u||h.suppressHydrationWarning===!0||Fy(l.textContent,u)?(h.popover!=null&&(Mt("beforetoggle",l),Mt("toggle",l)),h.onScroll!=null&&Mt("scroll",l),h.onScrollEnd!=null&&Mt("scrollend",l),h.onClick!=null&&(l.onclick=Qr),l=!0):l=!1,l||bl(a,!0)}function M4(a){for(dr=a.return;dr;)switch(dr.tag){case 5:case 31:case 13:Na=!1;return;case 27:case 3:Na=!0;return;default:dr=dr.return}}function Zs(a){if(a!==dr)return!1;if(!Ot)return M4(a),Ot=!0,!1;var l=a.tag,u;if((u=l!==3&&l!==27)&&((u=l===5)&&(u=a.type,u=!(u!=="form"&&u!=="button")||wm(a.type,a.memoizedProps)),u=!u),u&&pn&&bl(a),M4(a),l===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));pn=Jy(a)}else if(l===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));pn=Jy(a)}else l===27?(l=pn,Ll(a.type)?(a=Cm,Cm=null,pn=a):pn=l):pn=dr?Ca(a.stateNode.nextSibling):null;return!0}function ms(){pn=dr=null,Ot=!1}function ah(){var a=xl;return a!==null&&(Pr===null?Pr=a:Pr.push.apply(Pr,a),xl=null),a}function du(a){xl===null?xl=[a]:xl.push(a)}var ih=H(null),ps=null,Li=null;function wl(a,l,u){B(ih,l._currentValue),l._currentValue=u}function Ri(a){a._currentValue=ih.current,W(ih)}function lh(a,l,u){for(;a!==null;){var h=a.alternate;if((a.childLanes&l)!==l?(a.childLanes|=l,h!==null&&(h.childLanes|=l)):h!==null&&(h.childLanes&l)!==l&&(h.childLanes|=l),a===u)break;a=a.return}}function sh(a,l,u,h){var v=a.child;for(v!==null&&(v.return=a);v!==null;){var b=v.dependencies;if(b!==null){var M=v.child;b=b.firstContext;e:for(;b!==null;){var $=b;b=v;for(var re=0;re<l.length;re++)if($.context===l[re]){b.lanes|=u,$=b.alternate,$!==null&&($.lanes|=u),lh(b.return,u,a),h||(M=null);break e}b=$.next}}else if(v.tag===18){if(M=v.return,M===null)throw Error(r(341));M.lanes|=u,b=M.alternate,b!==null&&(b.lanes|=u),lh(M,u,a),M=null}else M=v.child;if(M!==null)M.return=v;else for(M=v;M!==null;){if(M===a){M=null;break}if(v=M.sibling,v!==null){v.return=M.return,M=v;break}M=M.return}v=M}}function Qs(a,l,u,h){a=null;for(var v=l,b=!1;v!==null;){if(!b){if((v.flags&524288)!==0)b=!0;else if((v.flags&262144)!==0)break}if(v.tag===10){var M=v.alternate;if(M===null)throw Error(r(387));if(M=M.memoizedProps,M!==null){var $=v.type;ea(v.pendingProps.value,M.value)||(a!==null?a.push($):a=[$])}}else if(v===be.current){if(M=v.alternate,M===null)throw Error(r(387));M.memoizedState.memoizedState!==v.memoizedState.memoizedState&&(a!==null?a.push($u):a=[$u])}v=v.return}a!==null&&sh(l,a,u,h),l.flags|=262144}function Wc(a){for(a=a.firstContext;a!==null;){if(!ea(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function gs(a){ps=a,Li=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function fr(a){return _4(ps,a)}function Jc(a,l){return ps===null&&gs(a),_4(a,l)}function _4(a,l){var u=l._currentValue;if(l={context:l,memoizedValue:u,next:null},Li===null){if(a===null)throw Error(r(308));Li=l,a.dependencies={lanes:0,firstContext:l},a.flags|=524288}else Li=Li.next=l;return u}var l9=typeof AbortController<"u"?AbortController:function(){var a=[],l=this.signal={aborted:!1,addEventListener:function(u,h){a.push(h)}};this.abort=function(){l.aborted=!0,a.forEach(function(u){return u()})}},s9=e.unstable_scheduleCallback,o9=e.unstable_NormalPriority,Pn={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function oh(){return{controller:new l9,data:new Map,refCount:0}}function fu(a){a.refCount--,a.refCount===0&&s9(o9,function(){a.controller.abort()})}var hu=null,uh=0,Ws=0,Js=null;function u9(a,l){if(hu===null){var u=hu=[];uh=0,Ws=fm(),Js={status:"pending",value:void 0,then:function(h){u.push(h)}}}return uh++,l.then(A4,A4),l}function A4(){if(--uh===0&&hu!==null){Js!==null&&(Js.status="fulfilled");var a=hu;hu=null,Ws=0,Js=null;for(var l=0;l<a.length;l++)(0,a[l])()}}function c9(a,l){var u=[],h={status:"pending",value:null,reason:null,then:function(v){u.push(v)}};return a.then(function(){h.status="fulfilled",h.value=l;for(var v=0;v<u.length;v++)(0,u[v])(l)},function(v){for(h.status="rejected",h.reason=v,v=0;v<u.length;v++)(0,u[v])(void 0)}),h}var T4=q.S;q.S=function(a,l){my=ct(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&u9(a,l),T4!==null&&T4(a,l)};var ys=H(null);function ch(){var a=ys.current;return a!==null?a:ln.pooledCache}function e0(a,l){l===null?B(ys,ys.current):B(ys,l.pool)}function z4(){var a=ch();return a===null?null:{parent:Pn._currentValue,pool:a}}var eo=Error(r(460)),dh=Error(r(474)),t0=Error(r(542)),n0={then:function(){}};function D4(a){return a=a.status,a==="fulfilled"||a==="rejected"}function L4(a,l,u){switch(u=a[u],u===void 0?a.push(l):u!==l&&(l.then(Qr,Qr),l=u),l.status){case"fulfilled":return l.value;case"rejected":throw a=l.reason,B4(a),a;default:if(typeof l.status=="string")l.then(Qr,Qr);else{if(a=ln,a!==null&&100<a.shellSuspendCounter)throw Error(r(482));a=l,a.status="pending",a.then(function(h){if(l.status==="pending"){var v=l;v.status="fulfilled",v.value=h}},function(h){if(l.status==="pending"){var v=l;v.status="rejected",v.reason=h}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw a=l.reason,B4(a),a}throw xs=l,eo}}function vs(a){try{var l=a._init;return l(a._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(xs=u,eo):u}}var xs=null;function R4(){if(xs===null)throw Error(r(459));var a=xs;return xs=null,a}function B4(a){if(a===eo||a===t0)throw Error(r(483))}var to=null,mu=0;function r0(a){var l=mu;return mu+=1,to===null&&(to=[]),L4(to,a,l)}function pu(a,l){l=l.props.ref,a.ref=l!==void 0?l:null}function a0(a,l){throw l.$$typeof===g?Error(r(525)):(a=Object.prototype.toString.call(l),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":a)))}function O4(a){function l(se,ae){if(a){var oe=se.deletions;oe===null?(se.deletions=[ae],se.flags|=16):oe.push(ae)}}function u(se,ae){if(!a)return null;for(;ae!==null;)l(se,ae),ae=ae.sibling;return null}function h(se){for(var ae=new Map;se!==null;)se.key!==null?ae.set(se.key,se):ae.set(se.index,se),se=se.sibling;return ae}function v(se,ae){return se=zi(se,ae),se.index=0,se.sibling=null,se}function b(se,ae,oe){return se.index=oe,a?(oe=se.alternate,oe!==null?(oe=oe.index,oe<ae?(se.flags|=67108866,ae):oe):(se.flags|=67108866,ae)):(se.flags|=1048576,ae)}function M(se){return a&&se.alternate===null&&(se.flags|=67108866),se}function $(se,ae,oe,we){return ae===null||ae.tag!==6?(ae=Jf(oe,se.mode,we),ae.return=se,ae):(ae=v(ae,oe),ae.return=se,ae)}function re(se,ae,oe,we){var at=oe.type;return at===k?ge(se,ae,oe.props.children,we,oe.key):ae!==null&&(ae.elementType===at||typeof at=="object"&&at!==null&&at.$$typeof===Z&&vs(at)===ae.type)?(ae=v(ae,oe.props),pu(ae,oe),ae.return=se,ae):(ae=Zc(oe.type,oe.key,oe.props,null,se.mode,we),pu(ae,oe),ae.return=se,ae)}function ue(se,ae,oe,we){return ae===null||ae.tag!==4||ae.stateNode.containerInfo!==oe.containerInfo||ae.stateNode.implementation!==oe.implementation?(ae=eh(oe,se.mode,we),ae.return=se,ae):(ae=v(ae,oe.children||[]),ae.return=se,ae)}function ge(se,ae,oe,we,at){return ae===null||ae.tag!==7?(ae=hs(oe,se.mode,we,at),ae.return=se,ae):(ae=v(ae,oe),ae.return=se,ae)}function Ne(se,ae,oe){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return ae=Jf(""+ae,se.mode,oe),ae.return=se,ae;if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case x:return oe=Zc(ae.type,ae.key,ae.props,null,se.mode,oe),pu(oe,ae),oe.return=se,oe;case w:return ae=eh(ae,se.mode,oe),ae.return=se,ae;case Z:return ae=vs(ae),Ne(se,ae,oe)}if(Y(ae)||X(ae))return ae=hs(ae,se.mode,oe,null),ae.return=se,ae;if(typeof ae.then=="function")return Ne(se,r0(ae),oe);if(ae.$$typeof===E)return Ne(se,Jc(se,ae),oe);a0(se,ae)}return null}function fe(se,ae,oe,we){var at=ae!==null?ae.key:null;if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return at!==null?null:$(se,ae,""+oe,we);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case x:return oe.key===at?re(se,ae,oe,we):null;case w:return oe.key===at?ue(se,ae,oe,we):null;case Z:return oe=vs(oe),fe(se,ae,oe,we)}if(Y(oe)||X(oe))return at!==null?null:ge(se,ae,oe,we,null);if(typeof oe.then=="function")return fe(se,ae,r0(oe),we);if(oe.$$typeof===E)return fe(se,ae,Jc(se,oe),we);a0(se,oe)}return null}function he(se,ae,oe,we,at){if(typeof we=="string"&&we!==""||typeof we=="number"||typeof we=="bigint")return se=se.get(oe)||null,$(ae,se,""+we,at);if(typeof we=="object"&&we!==null){switch(we.$$typeof){case x:return se=se.get(we.key===null?oe:we.key)||null,re(ae,se,we,at);case w:return se=se.get(we.key===null?oe:we.key)||null,ue(ae,se,we,at);case Z:return we=vs(we),he(se,ae,oe,we,at)}if(Y(we)||X(we))return se=se.get(oe)||null,ge(ae,se,we,at,null);if(typeof we.then=="function")return he(se,ae,oe,r0(we),at);if(we.$$typeof===E)return he(se,ae,oe,Jc(ae,we),at);a0(ae,we)}return null}function Xe(se,ae,oe,we){for(var at=null,Ut=null,Qe=ae,bt=ae=0,zt=null;Qe!==null&&bt<oe.length;bt++){Qe.index>bt?(zt=Qe,Qe=null):zt=Qe.sibling;var It=fe(se,Qe,oe[bt],we);if(It===null){Qe===null&&(Qe=zt);break}a&&Qe&&It.alternate===null&&l(se,Qe),ae=b(It,ae,bt),Ut===null?at=It:Ut.sibling=It,Ut=It,Qe=zt}if(bt===oe.length)return u(se,Qe),Ot&&Di(se,bt),at;if(Qe===null){for(;bt<oe.length;bt++)Qe=Ne(se,oe[bt],we),Qe!==null&&(ae=b(Qe,ae,bt),Ut===null?at=Qe:Ut.sibling=Qe,Ut=Qe);return Ot&&Di(se,bt),at}for(Qe=h(Qe);bt<oe.length;bt++)zt=he(Qe,se,bt,oe[bt],we),zt!==null&&(a&&zt.alternate!==null&&Qe.delete(zt.key===null?bt:zt.key),ae=b(zt,ae,bt),Ut===null?at=zt:Ut.sibling=zt,Ut=zt);return a&&Qe.forEach(function(Hl){return l(se,Hl)}),Ot&&Di(se,bt),at}function ut(se,ae,oe,we){if(oe==null)throw Error(r(151));for(var at=null,Ut=null,Qe=ae,bt=ae=0,zt=null,It=oe.next();Qe!==null&&!It.done;bt++,It=oe.next()){Qe.index>bt?(zt=Qe,Qe=null):zt=Qe.sibling;var Hl=fe(se,Qe,It.value,we);if(Hl===null){Qe===null&&(Qe=zt);break}a&&Qe&&Hl.alternate===null&&l(se,Qe),ae=b(Hl,ae,bt),Ut===null?at=Hl:Ut.sibling=Hl,Ut=Hl,Qe=zt}if(It.done)return u(se,Qe),Ot&&Di(se,bt),at;if(Qe===null){for(;!It.done;bt++,It=oe.next())It=Ne(se,It.value,we),It!==null&&(ae=b(It,ae,bt),Ut===null?at=It:Ut.sibling=It,Ut=It);return Ot&&Di(se,bt),at}for(Qe=h(Qe);!It.done;bt++,It=oe.next())It=he(Qe,se,bt,It.value,we),It!==null&&(a&&It.alternate!==null&&Qe.delete(It.key===null?bt:It.key),ae=b(It,ae,bt),Ut===null?at=It:Ut.sibling=It,Ut=It);return a&&Qe.forEach(function(wS){return l(se,wS)}),Ot&&Di(se,bt),at}function rn(se,ae,oe,we){if(typeof oe=="object"&&oe!==null&&oe.type===k&&oe.key===null&&(oe=oe.props.children),typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case x:e:{for(var at=oe.key;ae!==null;){if(ae.key===at){if(at=oe.type,at===k){if(ae.tag===7){u(se,ae.sibling),we=v(ae,oe.props.children),we.return=se,se=we;break e}}else if(ae.elementType===at||typeof at=="object"&&at!==null&&at.$$typeof===Z&&vs(at)===ae.type){u(se,ae.sibling),we=v(ae,oe.props),pu(we,oe),we.return=se,se=we;break e}u(se,ae);break}else l(se,ae);ae=ae.sibling}oe.type===k?(we=hs(oe.props.children,se.mode,we,oe.key),we.return=se,se=we):(we=Zc(oe.type,oe.key,oe.props,null,se.mode,we),pu(we,oe),we.return=se,se=we)}return M(se);case w:e:{for(at=oe.key;ae!==null;){if(ae.key===at)if(ae.tag===4&&ae.stateNode.containerInfo===oe.containerInfo&&ae.stateNode.implementation===oe.implementation){u(se,ae.sibling),we=v(ae,oe.children||[]),we.return=se,se=we;break e}else{u(se,ae);break}else l(se,ae);ae=ae.sibling}we=eh(oe,se.mode,we),we.return=se,se=we}return M(se);case Z:return oe=vs(oe),rn(se,ae,oe,we)}if(Y(oe))return Xe(se,ae,oe,we);if(X(oe)){if(at=X(oe),typeof at!="function")throw Error(r(150));return oe=at.call(oe),ut(se,ae,oe,we)}if(typeof oe.then=="function")return rn(se,ae,r0(oe),we);if(oe.$$typeof===E)return rn(se,ae,Jc(se,oe),we);a0(se,oe)}return typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint"?(oe=""+oe,ae!==null&&ae.tag===6?(u(se,ae.sibling),we=v(ae,oe),we.return=se,se=we):(u(se,ae),we=Jf(oe,se.mode,we),we.return=se,se=we),M(se)):u(se,ae)}return function(se,ae,oe,we){try{mu=0;var at=rn(se,ae,oe,we);return to=null,at}catch(Qe){if(Qe===eo||Qe===t0)throw Qe;var Ut=ta(29,Qe,null,se.mode);return Ut.lanes=we,Ut.return=se,Ut}finally{}}}var bs=O4(!0),$4=O4(!1),Sl=!1;function fh(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function hh(a,l){a=a.updateQueue,l.updateQueue===a&&(l.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function kl(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function Nl(a,l,u){var h=a.updateQueue;if(h===null)return null;if(h=h.shared,(Ft&2)!==0){var v=h.pending;return v===null?l.next=l:(l.next=v.next,v.next=l),h.pending=l,l=Kc(a),w4(a,null,u),l}return Xc(a,h,l,u),Kc(a)}function gu(a,l,u){if(l=l.updateQueue,l!==null&&(l=l.shared,(u&4194048)!==0)){var h=l.lanes;h&=a.pendingLanes,u|=h,l.lanes=u,Wn(a,u)}}function mh(a,l){var u=a.updateQueue,h=a.alternate;if(h!==null&&(h=h.updateQueue,u===h)){var v=null,b=null;if(u=u.firstBaseUpdate,u!==null){do{var M={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};b===null?v=b=M:b=b.next=M,u=u.next}while(u!==null);b===null?v=b=l:b=b.next=l}else v=b=l;u={baseState:h.baseState,firstBaseUpdate:v,lastBaseUpdate:b,shared:h.shared,callbacks:h.callbacks},a.updateQueue=u;return}a=u.lastBaseUpdate,a===null?u.firstBaseUpdate=l:a.next=l,u.lastBaseUpdate=l}var ph=!1;function yu(){if(ph){var a=Js;if(a!==null)throw a}}function vu(a,l,u,h){ph=!1;var v=a.updateQueue;Sl=!1;var b=v.firstBaseUpdate,M=v.lastBaseUpdate,$=v.shared.pending;if($!==null){v.shared.pending=null;var re=$,ue=re.next;re.next=null,M===null?b=ue:M.next=ue,M=re;var ge=a.alternate;ge!==null&&(ge=ge.updateQueue,$=ge.lastBaseUpdate,$!==M&&($===null?ge.firstBaseUpdate=ue:$.next=ue,ge.lastBaseUpdate=re))}if(b!==null){var Ne=v.baseState;M=0,ge=ue=re=null,$=b;do{var fe=$.lane&-536870913,he=fe!==$.lane;if(he?(Tt&fe)===fe:(h&fe)===fe){fe!==0&&fe===Ws&&(ph=!0),ge!==null&&(ge=ge.next={lane:0,tag:$.tag,payload:$.payload,callback:null,next:null});e:{var Xe=a,ut=$;fe=l;var rn=u;switch(ut.tag){case 1:if(Xe=ut.payload,typeof Xe=="function"){Ne=Xe.call(rn,Ne,fe);break e}Ne=Xe;break e;case 3:Xe.flags=Xe.flags&-65537|128;case 0:if(Xe=ut.payload,fe=typeof Xe=="function"?Xe.call(rn,Ne,fe):Xe,fe==null)break e;Ne=p({},Ne,fe);break e;case 2:Sl=!0}}fe=$.callback,fe!==null&&(a.flags|=64,he&&(a.flags|=8192),he=v.callbacks,he===null?v.callbacks=[fe]:he.push(fe))}else he={lane:fe,tag:$.tag,payload:$.payload,callback:$.callback,next:null},ge===null?(ue=ge=he,re=Ne):ge=ge.next=he,M|=fe;if($=$.next,$===null){if($=v.shared.pending,$===null)break;he=$,$=he.next,he.next=null,v.lastBaseUpdate=he,v.shared.pending=null}}while(!0);ge===null&&(re=Ne),v.baseState=re,v.firstBaseUpdate=ue,v.lastBaseUpdate=ge,b===null&&(v.shared.lanes=0),_l|=M,a.lanes=M,a.memoizedState=Ne}}function H4(a,l){if(typeof a!="function")throw Error(r(191,a));a.call(l)}function q4(a,l){var u=a.callbacks;if(u!==null)for(a.callbacks=null,a=0;a<u.length;a++)H4(u[a],l)}var no=H(null),i0=H(0);function U4(a,l){a=Fi,B(i0,a),B(no,l),Fi=a|l.baseLanes}function gh(){B(i0,Fi),B(no,no.current)}function yh(){Fi=i0.current,W(no),W(i0)}var na=H(null),ja=null;function jl(a){var l=a.alternate;B(Bn,Bn.current&1),B(na,a),ja===null&&(l===null||no.current!==null||l.memoizedState!==null)&&(ja=a)}function vh(a){B(Bn,Bn.current),B(na,a),ja===null&&(ja=a)}function I4(a){a.tag===22?(B(Bn,Bn.current),B(na,a),ja===null&&(ja=a)):Cl()}function Cl(){B(Bn,Bn.current),B(na,na.current)}function ra(a){W(na),ja===a&&(ja=null),W(Bn)}var Bn=H(0);function l0(a){for(var l=a;l!==null;){if(l.tag===13){var u=l.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||Nm(u)||jm(u)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===a)break;for(;l.sibling===null;){if(l.return===null||l.return===a)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var Bi=0,xt=null,tn=null,Fn=null,s0=!1,ro=!1,ws=!1,o0=0,xu=0,ao=null,d9=0;function Tn(){throw Error(r(321))}function xh(a,l){if(l===null)return!1;for(var u=0;u<l.length&&u<a.length;u++)if(!ea(a[u],l[u]))return!1;return!0}function bh(a,l,u,h,v,b){return Bi=b,xt=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,q.H=a===null||a.memoizedState===null?j2:Rh,ws=!1,b=u(h,v),ws=!1,ro&&(b=F4(l,u,h,v)),P4(a),b}function P4(a){q.H=Su;var l=tn!==null&&tn.next!==null;if(Bi=0,Fn=tn=xt=null,s0=!1,xu=0,ao=null,l)throw Error(r(300));a===null||Vn||(a=a.dependencies,a!==null&&Wc(a)&&(Vn=!0))}function F4(a,l,u,h){xt=a;var v=0;do{if(ro&&(ao=null),xu=0,ro=!1,25<=v)throw Error(r(301));if(v+=1,Fn=tn=null,a.updateQueue!=null){var b=a.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}q.H=C2,b=l(u,h)}while(ro);return b}function f9(){var a=q.H,l=a.useState()[0];return l=typeof l.then=="function"?bu(l):l,a=a.useState()[0],(tn!==null?tn.memoizedState:null)!==a&&(xt.flags|=1024),l}function wh(){var a=o0!==0;return o0=0,a}function Sh(a,l,u){l.updateQueue=a.updateQueue,l.flags&=-2053,a.lanes&=~u}function kh(a){if(s0){for(a=a.memoizedState;a!==null;){var l=a.queue;l!==null&&(l.pending=null),a=a.next}s0=!1}Bi=0,Fn=tn=xt=null,ro=!1,xu=o0=0,ao=null}function Mr(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fn===null?xt.memoizedState=Fn=a:Fn=Fn.next=a,Fn}function On(){if(tn===null){var a=xt.alternate;a=a!==null?a.memoizedState:null}else a=tn.next;var l=Fn===null?xt.memoizedState:Fn.next;if(l!==null)Fn=l,tn=a;else{if(a===null)throw xt.alternate===null?Error(r(467)):Error(r(310));tn=a,a={memoizedState:tn.memoizedState,baseState:tn.baseState,baseQueue:tn.baseQueue,queue:tn.queue,next:null},Fn===null?xt.memoizedState=Fn=a:Fn=Fn.next=a}return Fn}function u0(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function bu(a){var l=xu;return xu+=1,ao===null&&(ao=[]),a=L4(ao,a,l),l=xt,(Fn===null?l.memoizedState:Fn.next)===null&&(l=l.alternate,q.H=l===null||l.memoizedState===null?j2:Rh),a}function c0(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return bu(a);if(a.$$typeof===E)return fr(a)}throw Error(r(438,String(a)))}function Nh(a){var l=null,u=xt.updateQueue;if(u!==null&&(l=u.memoCache),l==null){var h=xt.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(l={data:h.data.map(function(v){return v.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),u===null&&(u=u0(),xt.updateQueue=u),u.memoCache=l,u=l.data[l.index],u===void 0)for(u=l.data[l.index]=Array(a),h=0;h<a;h++)u[h]=P;return l.index++,u}function Oi(a,l){return typeof l=="function"?l(a):l}function d0(a){var l=On();return jh(l,tn,a)}function jh(a,l,u){var h=a.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=u;var v=a.baseQueue,b=h.pending;if(b!==null){if(v!==null){var M=v.next;v.next=b.next,b.next=M}l.baseQueue=v=b,h.pending=null}if(b=a.baseState,v===null)a.memoizedState=b;else{l=v.next;var $=M=null,re=null,ue=l,ge=!1;do{var Ne=ue.lane&-536870913;if(Ne!==ue.lane?(Tt&Ne)===Ne:(Bi&Ne)===Ne){var fe=ue.revertLane;if(fe===0)re!==null&&(re=re.next={lane:0,revertLane:0,gesture:null,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null}),Ne===Ws&&(ge=!0);else if((Bi&fe)===fe){ue=ue.next,fe===Ws&&(ge=!0);continue}else Ne={lane:0,revertLane:ue.revertLane,gesture:null,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},re===null?($=re=Ne,M=b):re=re.next=Ne,xt.lanes|=fe,_l|=fe;Ne=ue.action,ws&&u(b,Ne),b=ue.hasEagerState?ue.eagerState:u(b,Ne)}else fe={lane:Ne,revertLane:ue.revertLane,gesture:ue.gesture,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},re===null?($=re=fe,M=b):re=re.next=fe,xt.lanes|=Ne,_l|=Ne;ue=ue.next}while(ue!==null&&ue!==l);if(re===null?M=b:re.next=$,!ea(b,a.memoizedState)&&(Vn=!0,ge&&(u=Js,u!==null)))throw u;a.memoizedState=b,a.baseState=M,a.baseQueue=re,h.lastRenderedState=b}return v===null&&(h.lanes=0),[a.memoizedState,h.dispatch]}function Ch(a){var l=On(),u=l.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=a;var h=u.dispatch,v=u.pending,b=l.memoizedState;if(v!==null){u.pending=null;var M=v=v.next;do b=a(b,M.action),M=M.next;while(M!==v);ea(b,l.memoizedState)||(Vn=!0),l.memoizedState=b,l.baseQueue===null&&(l.baseState=b),u.lastRenderedState=b}return[b,h]}function V4(a,l,u){var h=xt,v=On(),b=Ot;if(b){if(u===void 0)throw Error(r(407));u=u()}else u=l();var M=!ea((tn||v).memoizedState,u);if(M&&(v.memoizedState=u,Vn=!0),v=v.queue,_h(X4.bind(null,h,v,a),[a]),v.getSnapshot!==l||M||Fn!==null&&Fn.memoizedState.tag&1){if(h.flags|=2048,io(9,{destroy:void 0},Y4.bind(null,h,v,u,l),null),ln===null)throw Error(r(349));b||(Bi&127)!==0||G4(h,l,u)}return u}function G4(a,l,u){a.flags|=16384,a={getSnapshot:l,value:u},l=xt.updateQueue,l===null?(l=u0(),xt.updateQueue=l,l.stores=[a]):(u=l.stores,u===null?l.stores=[a]:u.push(a))}function Y4(a,l,u,h){l.value=u,l.getSnapshot=h,K4(l)&&Z4(a)}function X4(a,l,u){return u(function(){K4(l)&&Z4(a)})}function K4(a){var l=a.getSnapshot;a=a.value;try{var u=l();return!ea(a,u)}catch{return!0}}function Z4(a){var l=fs(a,2);l!==null&&Fr(l,a,2)}function Eh(a){var l=Mr();if(typeof a=="function"){var u=a;if(a=u(),ws){qt(!0);try{u()}finally{qt(!1)}}}return l.memoizedState=l.baseState=a,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oi,lastRenderedState:a},l}function Q4(a,l,u,h){return a.baseState=u,jh(a,tn,typeof h=="function"?h:Oi)}function h9(a,l,u,h,v){if(m0(a))throw Error(r(485));if(a=l.action,a!==null){var b={payload:v,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(M){b.listeners.push(M)}};q.T!==null?u(!0):b.isTransition=!1,h(b),u=l.pending,u===null?(b.next=l.pending=b,W4(l,b)):(b.next=u.next,l.pending=u.next=b)}}function W4(a,l){var u=l.action,h=l.payload,v=a.state;if(l.isTransition){var b=q.T,M={};q.T=M;try{var $=u(v,h),re=q.S;re!==null&&re(M,$),J4(a,l,$)}catch(ue){Mh(a,l,ue)}finally{b!==null&&M.types!==null&&(b.types=M.types),q.T=b}}else try{b=u(v,h),J4(a,l,b)}catch(ue){Mh(a,l,ue)}}function J4(a,l,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(h){e2(a,l,h)},function(h){return Mh(a,l,h)}):e2(a,l,u)}function e2(a,l,u){l.status="fulfilled",l.value=u,t2(l),a.state=u,l=a.pending,l!==null&&(u=l.next,u===l?a.pending=null:(u=u.next,l.next=u,W4(a,u)))}function Mh(a,l,u){var h=a.pending;if(a.pending=null,h!==null){h=h.next;do l.status="rejected",l.reason=u,t2(l),l=l.next;while(l!==h)}a.action=null}function t2(a){a=a.listeners;for(var l=0;l<a.length;l++)(0,a[l])()}function n2(a,l){return l}function r2(a,l){if(Ot){var u=ln.formState;if(u!==null){e:{var h=xt;if(Ot){if(pn){t:{for(var v=pn,b=Na;v.nodeType!==8;){if(!b){v=null;break t}if(v=Ca(v.nextSibling),v===null){v=null;break t}}b=v.data,v=b==="F!"||b==="F"?v:null}if(v){pn=Ca(v.nextSibling),h=v.data==="F!";break e}}bl(h)}h=!1}h&&(l=u[0])}}return u=Mr(),u.memoizedState=u.baseState=l,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n2,lastRenderedState:l},u.queue=h,u=S2.bind(null,xt,h),h.dispatch=u,h=Eh(!1),b=Lh.bind(null,xt,!1,h.queue),h=Mr(),v={state:l,dispatch:null,action:a,pending:null},h.queue=v,u=h9.bind(null,xt,v,b,u),v.dispatch=u,h.memoizedState=a,[l,u,!1]}function a2(a){var l=On();return i2(l,tn,a)}function i2(a,l,u){if(l=jh(a,l,n2)[0],a=d0(Oi)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var h=bu(l)}catch(M){throw M===eo?t0:M}else h=l;l=On();var v=l.queue,b=v.dispatch;return u!==l.memoizedState&&(xt.flags|=2048,io(9,{destroy:void 0},m9.bind(null,v,u),null)),[h,b,a]}function m9(a,l){a.action=l}function l2(a){var l=On(),u=tn;if(u!==null)return i2(l,u,a);On(),l=l.memoizedState,u=On();var h=u.queue.dispatch;return u.memoizedState=a,[l,h,!1]}function io(a,l,u,h){return a={tag:a,create:u,deps:h,inst:l,next:null},l=xt.updateQueue,l===null&&(l=u0(),xt.updateQueue=l),u=l.lastEffect,u===null?l.lastEffect=a.next=a:(h=u.next,u.next=a,a.next=h,l.lastEffect=a),a}function s2(){return On().memoizedState}function f0(a,l,u,h){var v=Mr();xt.flags|=a,v.memoizedState=io(1|l,{destroy:void 0},u,h===void 0?null:h)}function h0(a,l,u,h){var v=On();h=h===void 0?null:h;var b=v.memoizedState.inst;tn!==null&&h!==null&&xh(h,tn.memoizedState.deps)?v.memoizedState=io(l,b,u,h):(xt.flags|=a,v.memoizedState=io(1|l,b,u,h))}function o2(a,l){f0(8390656,8,a,l)}function _h(a,l){h0(2048,8,a,l)}function p9(a){xt.flags|=4;var l=xt.updateQueue;if(l===null)l=u0(),xt.updateQueue=l,l.events=[a];else{var u=l.events;u===null?l.events=[a]:u.push(a)}}function u2(a){var l=On().memoizedState;return p9({ref:l,nextImpl:a}),function(){if((Ft&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}function c2(a,l){return h0(4,2,a,l)}function d2(a,l){return h0(4,4,a,l)}function f2(a,l){if(typeof l=="function"){a=a();var u=l(a);return function(){typeof u=="function"?u():l(null)}}if(l!=null)return a=a(),l.current=a,function(){l.current=null}}function h2(a,l,u){u=u!=null?u.concat([a]):null,h0(4,4,f2.bind(null,l,a),u)}function Ah(){}function m2(a,l){var u=On();l=l===void 0?null:l;var h=u.memoizedState;return l!==null&&xh(l,h[1])?h[0]:(u.memoizedState=[a,l],a)}function p2(a,l){var u=On();l=l===void 0?null:l;var h=u.memoizedState;if(l!==null&&xh(l,h[1]))return h[0];if(h=a(),ws){qt(!0);try{a()}finally{qt(!1)}}return u.memoizedState=[h,l],h}function Th(a,l,u){return u===void 0||(Bi&1073741824)!==0&&(Tt&261930)===0?a.memoizedState=l:(a.memoizedState=u,a=gy(),xt.lanes|=a,_l|=a,u)}function g2(a,l,u,h){return ea(u,l)?u:no.current!==null?(a=Th(a,u,h),ea(a,l)||(Vn=!0),a):(Bi&42)===0||(Bi&1073741824)!==0&&(Tt&261930)===0?(Vn=!0,a.memoizedState=u):(a=gy(),xt.lanes|=a,_l|=a,l)}function y2(a,l,u,h,v){var b=Q.p;Q.p=b!==0&&8>b?b:8;var M=q.T,$={};q.T=$,Lh(a,!1,l,u);try{var re=v(),ue=q.S;if(ue!==null&&ue($,re),re!==null&&typeof re=="object"&&typeof re.then=="function"){var ge=c9(re,h);wu(a,l,ge,la(a))}else wu(a,l,h,la(a))}catch(Ne){wu(a,l,{then:function(){},status:"rejected",reason:Ne},la())}finally{Q.p=b,M!==null&&$.types!==null&&(M.types=$.types),q.T=M}}function g9(){}function zh(a,l,u,h){if(a.tag!==5)throw Error(r(476));var v=v2(a).queue;y2(a,v,l,ee,u===null?g9:function(){return x2(a),u(h)})}function v2(a){var l=a.memoizedState;if(l!==null)return l;l={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oi,lastRenderedState:ee},next:null};var u={};return l.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oi,lastRenderedState:u},next:null},a.memoizedState=l,a=a.alternate,a!==null&&(a.memoizedState=l),l}function x2(a){var l=v2(a);l.next===null&&(l=a.alternate.memoizedState),wu(a,l.next.queue,{},la())}function Dh(){return fr($u)}function b2(){return On().memoizedState}function w2(){return On().memoizedState}function y9(a){for(var l=a.return;l!==null;){switch(l.tag){case 24:case 3:var u=la();a=kl(u);var h=Nl(l,a,u);h!==null&&(Fr(h,l,u),gu(h,l,u)),l={cache:oh()},a.payload=l;return}l=l.return}}function v9(a,l,u){var h=la();u={lane:h,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},m0(a)?k2(l,u):(u=Qf(a,l,u,h),u!==null&&(Fr(u,a,h),N2(u,l,h)))}function S2(a,l,u){var h=la();wu(a,l,u,h)}function wu(a,l,u,h){var v={lane:h,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(m0(a))k2(l,v);else{var b=a.alternate;if(a.lanes===0&&(b===null||b.lanes===0)&&(b=l.lastRenderedReducer,b!==null))try{var M=l.lastRenderedState,$=b(M,u);if(v.hasEagerState=!0,v.eagerState=$,ea($,M))return Xc(a,l,v,0),ln===null&&Yc(),!1}catch{}finally{}if(u=Qf(a,l,v,h),u!==null)return Fr(u,a,h),N2(u,l,h),!0}return!1}function Lh(a,l,u,h){if(h={lane:2,revertLane:fm(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},m0(a)){if(l)throw Error(r(479))}else l=Qf(a,u,h,2),l!==null&&Fr(l,a,2)}function m0(a){var l=a.alternate;return a===xt||l!==null&&l===xt}function k2(a,l){ro=s0=!0;var u=a.pending;u===null?l.next=l:(l.next=u.next,u.next=l),a.pending=l}function N2(a,l,u){if((u&4194048)!==0){var h=l.lanes;h&=a.pendingLanes,u|=h,l.lanes=u,Wn(a,u)}}var Su={readContext:fr,use:c0,useCallback:Tn,useContext:Tn,useEffect:Tn,useImperativeHandle:Tn,useLayoutEffect:Tn,useInsertionEffect:Tn,useMemo:Tn,useReducer:Tn,useRef:Tn,useState:Tn,useDebugValue:Tn,useDeferredValue:Tn,useTransition:Tn,useSyncExternalStore:Tn,useId:Tn,useHostTransitionStatus:Tn,useFormState:Tn,useActionState:Tn,useOptimistic:Tn,useMemoCache:Tn,useCacheRefresh:Tn};Su.useEffectEvent=Tn;var j2={readContext:fr,use:c0,useCallback:function(a,l){return Mr().memoizedState=[a,l===void 0?null:l],a},useContext:fr,useEffect:o2,useImperativeHandle:function(a,l,u){u=u!=null?u.concat([a]):null,f0(4194308,4,f2.bind(null,l,a),u)},useLayoutEffect:function(a,l){return f0(4194308,4,a,l)},useInsertionEffect:function(a,l){f0(4,2,a,l)},useMemo:function(a,l){var u=Mr();l=l===void 0?null:l;var h=a();if(ws){qt(!0);try{a()}finally{qt(!1)}}return u.memoizedState=[h,l],h},useReducer:function(a,l,u){var h=Mr();if(u!==void 0){var v=u(l);if(ws){qt(!0);try{u(l)}finally{qt(!1)}}}else v=l;return h.memoizedState=h.baseState=v,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:v},h.queue=a,a=a.dispatch=v9.bind(null,xt,a),[h.memoizedState,a]},useRef:function(a){var l=Mr();return a={current:a},l.memoizedState=a},useState:function(a){a=Eh(a);var l=a.queue,u=S2.bind(null,xt,l);return l.dispatch=u,[a.memoizedState,u]},useDebugValue:Ah,useDeferredValue:function(a,l){var u=Mr();return Th(u,a,l)},useTransition:function(){var a=Eh(!1);return a=y2.bind(null,xt,a.queue,!0,!1),Mr().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,l,u){var h=xt,v=Mr();if(Ot){if(u===void 0)throw Error(r(407));u=u()}else{if(u=l(),ln===null)throw Error(r(349));(Tt&127)!==0||G4(h,l,u)}v.memoizedState=u;var b={value:u,getSnapshot:l};return v.queue=b,o2(X4.bind(null,h,b,a),[a]),h.flags|=2048,io(9,{destroy:void 0},Y4.bind(null,h,b,u,l),null),u},useId:function(){var a=Mr(),l=ln.identifierPrefix;if(Ot){var u=li,h=ii;u=(h&~(1<<32-jt(h)-1)).toString(32)+u,l="_"+l+"R_"+u,u=o0++,0<u&&(l+="H"+u.toString(32)),l+="_"}else u=d9++,l="_"+l+"r_"+u.toString(32)+"_";return a.memoizedState=l},useHostTransitionStatus:Dh,useFormState:r2,useActionState:r2,useOptimistic:function(a){var l=Mr();l.memoizedState=l.baseState=a;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=u,l=Lh.bind(null,xt,!0,u),u.dispatch=l,[a,l]},useMemoCache:Nh,useCacheRefresh:function(){return Mr().memoizedState=y9.bind(null,xt)},useEffectEvent:function(a){var l=Mr(),u={impl:a};return l.memoizedState=u,function(){if((Ft&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},Rh={readContext:fr,use:c0,useCallback:m2,useContext:fr,useEffect:_h,useImperativeHandle:h2,useInsertionEffect:c2,useLayoutEffect:d2,useMemo:p2,useReducer:d0,useRef:s2,useState:function(){return d0(Oi)},useDebugValue:Ah,useDeferredValue:function(a,l){var u=On();return g2(u,tn.memoizedState,a,l)},useTransition:function(){var a=d0(Oi)[0],l=On().memoizedState;return[typeof a=="boolean"?a:bu(a),l]},useSyncExternalStore:V4,useId:b2,useHostTransitionStatus:Dh,useFormState:a2,useActionState:a2,useOptimistic:function(a,l){var u=On();return Q4(u,tn,a,l)},useMemoCache:Nh,useCacheRefresh:w2};Rh.useEffectEvent=u2;var C2={readContext:fr,use:c0,useCallback:m2,useContext:fr,useEffect:_h,useImperativeHandle:h2,useInsertionEffect:c2,useLayoutEffect:d2,useMemo:p2,useReducer:Ch,useRef:s2,useState:function(){return Ch(Oi)},useDebugValue:Ah,useDeferredValue:function(a,l){var u=On();return tn===null?Th(u,a,l):g2(u,tn.memoizedState,a,l)},useTransition:function(){var a=Ch(Oi)[0],l=On().memoizedState;return[typeof a=="boolean"?a:bu(a),l]},useSyncExternalStore:V4,useId:b2,useHostTransitionStatus:Dh,useFormState:l2,useActionState:l2,useOptimistic:function(a,l){var u=On();return tn!==null?Q4(u,tn,a,l):(u.baseState=a,[a,u.queue.dispatch])},useMemoCache:Nh,useCacheRefresh:w2};C2.useEffectEvent=u2;function Bh(a,l,u,h){l=a.memoizedState,u=u(h,l),u=u==null?l:p({},l,u),a.memoizedState=u,a.lanes===0&&(a.updateQueue.baseState=u)}var Oh={enqueueSetState:function(a,l,u){a=a._reactInternals;var h=la(),v=kl(h);v.payload=l,u!=null&&(v.callback=u),l=Nl(a,v,h),l!==null&&(Fr(l,a,h),gu(l,a,h))},enqueueReplaceState:function(a,l,u){a=a._reactInternals;var h=la(),v=kl(h);v.tag=1,v.payload=l,u!=null&&(v.callback=u),l=Nl(a,v,h),l!==null&&(Fr(l,a,h),gu(l,a,h))},enqueueForceUpdate:function(a,l){a=a._reactInternals;var u=la(),h=kl(u);h.tag=2,l!=null&&(h.callback=l),l=Nl(a,h,u),l!==null&&(Fr(l,a,u),gu(l,a,u))}};function E2(a,l,u,h,v,b,M){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(h,b,M):l.prototype&&l.prototype.isPureReactComponent?!ou(u,h)||!ou(v,b):!0}function M2(a,l,u,h){a=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(u,h),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(u,h),l.state!==a&&Oh.enqueueReplaceState(l,l.state,null)}function Ss(a,l){var u=l;if("ref"in l){u={};for(var h in l)h!=="ref"&&(u[h]=l[h])}if(a=a.defaultProps){u===l&&(u=p({},u));for(var v in a)u[v]===void 0&&(u[v]=a[v])}return u}function _2(a){Gc(a)}function A2(a){console.error(a)}function T2(a){Gc(a)}function p0(a,l){try{var u=a.onUncaughtError;u(l.value,{componentStack:l.stack})}catch(h){setTimeout(function(){throw h})}}function z2(a,l,u){try{var h=a.onCaughtError;h(u.value,{componentStack:u.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function $h(a,l,u){return u=kl(u),u.tag=3,u.payload={element:null},u.callback=function(){p0(a,l)},u}function D2(a){return a=kl(a),a.tag=3,a}function L2(a,l,u,h){var v=u.type.getDerivedStateFromError;if(typeof v=="function"){var b=h.value;a.payload=function(){return v(b)},a.callback=function(){z2(l,u,h)}}var M=u.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(a.callback=function(){z2(l,u,h),typeof v!="function"&&(Al===null?Al=new Set([this]):Al.add(this));var $=h.stack;this.componentDidCatch(h.value,{componentStack:$!==null?$:""})})}function x9(a,l,u,h,v){if(u.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(l=u.alternate,l!==null&&Qs(l,u,v,!0),u=na.current,u!==null){switch(u.tag){case 31:case 13:return ja===null?E0():u.alternate===null&&zn===0&&(zn=3),u.flags&=-257,u.flags|=65536,u.lanes=v,h===n0?u.flags|=16384:(l=u.updateQueue,l===null?u.updateQueue=new Set([h]):l.add(h),um(a,h,v)),!1;case 22:return u.flags|=65536,h===n0?u.flags|=16384:(l=u.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([h])},u.updateQueue=l):(u=l.retryQueue,u===null?l.retryQueue=new Set([h]):u.add(h)),um(a,h,v)),!1}throw Error(r(435,u.tag))}return um(a,h,v),E0(),!1}if(Ot)return l=na.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=v,h!==rh&&(a=Error(r(422),{cause:h}),du(wa(a,u)))):(h!==rh&&(l=Error(r(423),{cause:h}),du(wa(l,u))),a=a.current.alternate,a.flags|=65536,v&=-v,a.lanes|=v,h=wa(h,u),v=$h(a.stateNode,h,v),mh(a,v),zn!==4&&(zn=2)),!1;var b=Error(r(520),{cause:h});if(b=wa(b,u),Au===null?Au=[b]:Au.push(b),zn!==4&&(zn=2),l===null)return!0;h=wa(h,u),u=l;do{switch(u.tag){case 3:return u.flags|=65536,a=v&-v,u.lanes|=a,a=$h(u.stateNode,h,a),mh(u,a),!1;case 1:if(l=u.type,b=u.stateNode,(u.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Al===null||!Al.has(b))))return u.flags|=65536,v&=-v,u.lanes|=v,v=D2(v),L2(v,a,u,h),mh(u,v),!1}u=u.return}while(u!==null);return!1}var Hh=Error(r(461)),Vn=!1;function hr(a,l,u,h){l.child=a===null?$4(l,null,u,h):bs(l,a.child,u,h)}function R2(a,l,u,h,v){u=u.render;var b=l.ref;if("ref"in h){var M={};for(var $ in h)$!=="ref"&&(M[$]=h[$])}else M=h;return gs(l),h=bh(a,l,u,M,b,v),$=wh(),a!==null&&!Vn?(Sh(a,l,v),$i(a,l,v)):(Ot&&$&&th(l),l.flags|=1,hr(a,l,h,v),l.child)}function B2(a,l,u,h,v){if(a===null){var b=u.type;return typeof b=="function"&&!Wf(b)&&b.defaultProps===void 0&&u.compare===null?(l.tag=15,l.type=b,O2(a,l,b,h,v)):(a=Zc(u.type,null,h,l,l.mode,v),a.ref=l.ref,a.return=l,l.child=a)}if(b=a.child,!Yh(a,v)){var M=b.memoizedProps;if(u=u.compare,u=u!==null?u:ou,u(M,h)&&a.ref===l.ref)return $i(a,l,v)}return l.flags|=1,a=zi(b,h),a.ref=l.ref,a.return=l,l.child=a}function O2(a,l,u,h,v){if(a!==null){var b=a.memoizedProps;if(ou(b,h)&&a.ref===l.ref)if(Vn=!1,l.pendingProps=h=b,Yh(a,v))(a.flags&131072)!==0&&(Vn=!0);else return l.lanes=a.lanes,$i(a,l,v)}return qh(a,l,u,h,v)}function $2(a,l,u,h){var v=h.children,b=a!==null?a.memoizedState:null;if(a===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),h.mode==="hidden"){if((l.flags&128)!==0){if(b=b!==null?b.baseLanes|u:u,a!==null){for(h=l.child=a.child,v=0;h!==null;)v=v|h.lanes|h.childLanes,h=h.sibling;h=v&~b}else h=0,l.child=null;return H2(a,l,b,u,h)}if((u&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},a!==null&&e0(l,b!==null?b.cachePool:null),b!==null?U4(l,b):gh(),I4(l);else return h=l.lanes=536870912,H2(a,l,b!==null?b.baseLanes|u:u,u,h)}else b!==null?(e0(l,b.cachePool),U4(l,b),Cl(),l.memoizedState=null):(a!==null&&e0(l,null),gh(),Cl());return hr(a,l,v,u),l.child}function ku(a,l){return a!==null&&a.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function H2(a,l,u,h,v){var b=ch();return b=b===null?null:{parent:Pn._currentValue,pool:b},l.memoizedState={baseLanes:u,cachePool:b},a!==null&&e0(l,null),gh(),I4(l),a!==null&&Qs(a,l,h,!0),l.childLanes=v,null}function g0(a,l){return l=v0({mode:l.mode,children:l.children},a.mode),l.ref=a.ref,a.child=l,l.return=a,l}function q2(a,l,u){return bs(l,a.child,null,u),a=g0(l,l.pendingProps),a.flags|=2,ra(l),l.memoizedState=null,a}function b9(a,l,u){var h=l.pendingProps,v=(l.flags&128)!==0;if(l.flags&=-129,a===null){if(Ot){if(h.mode==="hidden")return a=g0(l,h),l.lanes=536870912,ku(null,a);if(vh(l),(a=pn)?(a=Wy(a,Na),a=a!==null&&a.data==="&"?a:null,a!==null&&(l.memoizedState={dehydrated:a,treeContext:vl!==null?{id:ii,overflow:li}:null,retryLane:536870912,hydrationErrors:null},u=k4(a),u.return=l,l.child=u,dr=l,pn=null)):a=null,a===null)throw bl(l);return l.lanes=536870912,null}return g0(l,h)}var b=a.memoizedState;if(b!==null){var M=b.dehydrated;if(vh(l),v)if(l.flags&256)l.flags&=-257,l=q2(a,l,u);else if(l.memoizedState!==null)l.child=a.child,l.flags|=128,l=null;else throw Error(r(558));else if(Vn||Qs(a,l,u,!1),v=(u&a.childLanes)!==0,Vn||v){if(h=ln,h!==null&&(M=Lr(h,u),M!==0&&M!==b.retryLane))throw b.retryLane=M,fs(a,M),Fr(h,a,M),Hh;E0(),l=q2(a,l,u)}else a=b.treeContext,pn=Ca(M.nextSibling),dr=l,Ot=!0,xl=null,Na=!1,a!==null&&C4(l,a),l=g0(l,h),l.flags|=4096;return l}return a=zi(a.child,{mode:h.mode,children:h.children}),a.ref=l.ref,l.child=a,a.return=l,a}function y0(a,l){var u=l.ref;if(u===null)a!==null&&a.ref!==null&&(l.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(r(284));(a===null||a.ref!==u)&&(l.flags|=4194816)}}function qh(a,l,u,h,v){return gs(l),u=bh(a,l,u,h,void 0,v),h=wh(),a!==null&&!Vn?(Sh(a,l,v),$i(a,l,v)):(Ot&&h&&th(l),l.flags|=1,hr(a,l,u,v),l.child)}function U2(a,l,u,h,v,b){return gs(l),l.updateQueue=null,u=F4(l,h,u,v),P4(a),h=wh(),a!==null&&!Vn?(Sh(a,l,b),$i(a,l,b)):(Ot&&h&&th(l),l.flags|=1,hr(a,l,u,b),l.child)}function I2(a,l,u,h,v){if(gs(l),l.stateNode===null){var b=Ys,M=u.contextType;typeof M=="object"&&M!==null&&(b=fr(M)),b=new u(h,b),l.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=Oh,l.stateNode=b,b._reactInternals=l,b=l.stateNode,b.props=h,b.state=l.memoizedState,b.refs={},fh(l),M=u.contextType,b.context=typeof M=="object"&&M!==null?fr(M):Ys,b.state=l.memoizedState,M=u.getDerivedStateFromProps,typeof M=="function"&&(Bh(l,u,M,h),b.state=l.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(M=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),M!==b.state&&Oh.enqueueReplaceState(b,b.state,null),vu(l,h,b,v),yu(),b.state=l.memoizedState),typeof b.componentDidMount=="function"&&(l.flags|=4194308),h=!0}else if(a===null){b=l.stateNode;var $=l.memoizedProps,re=Ss(u,$);b.props=re;var ue=b.context,ge=u.contextType;M=Ys,typeof ge=="object"&&ge!==null&&(M=fr(ge));var Ne=u.getDerivedStateFromProps;ge=typeof Ne=="function"||typeof b.getSnapshotBeforeUpdate=="function",$=l.pendingProps!==$,ge||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||($||ue!==M)&&M2(l,b,h,M),Sl=!1;var fe=l.memoizedState;b.state=fe,vu(l,h,b,v),yu(),ue=l.memoizedState,$||fe!==ue||Sl?(typeof Ne=="function"&&(Bh(l,u,Ne,h),ue=l.memoizedState),(re=Sl||E2(l,u,re,h,fe,ue,M))?(ge||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(l.flags|=4194308)):(typeof b.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=h,l.memoizedState=ue),b.props=h,b.state=ue,b.context=M,h=re):(typeof b.componentDidMount=="function"&&(l.flags|=4194308),h=!1)}else{b=l.stateNode,hh(a,l),M=l.memoizedProps,ge=Ss(u,M),b.props=ge,Ne=l.pendingProps,fe=b.context,ue=u.contextType,re=Ys,typeof ue=="object"&&ue!==null&&(re=fr(ue)),$=u.getDerivedStateFromProps,(ue=typeof $=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(M!==Ne||fe!==re)&&M2(l,b,h,re),Sl=!1,fe=l.memoizedState,b.state=fe,vu(l,h,b,v),yu();var he=l.memoizedState;M!==Ne||fe!==he||Sl||a!==null&&a.dependencies!==null&&Wc(a.dependencies)?(typeof $=="function"&&(Bh(l,u,$,h),he=l.memoizedState),(ge=Sl||E2(l,u,ge,h,fe,he,re)||a!==null&&a.dependencies!==null&&Wc(a.dependencies))?(ue||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(h,he,re),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(h,he,re)),typeof b.componentDidUpdate=="function"&&(l.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof b.componentDidUpdate!="function"||M===a.memoizedProps&&fe===a.memoizedState||(l.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||M===a.memoizedProps&&fe===a.memoizedState||(l.flags|=1024),l.memoizedProps=h,l.memoizedState=he),b.props=h,b.state=he,b.context=re,h=ge):(typeof b.componentDidUpdate!="function"||M===a.memoizedProps&&fe===a.memoizedState||(l.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||M===a.memoizedProps&&fe===a.memoizedState||(l.flags|=1024),h=!1)}return b=h,y0(a,l),h=(l.flags&128)!==0,b||h?(b=l.stateNode,u=h&&typeof u.getDerivedStateFromError!="function"?null:b.render(),l.flags|=1,a!==null&&h?(l.child=bs(l,a.child,null,v),l.child=bs(l,null,u,v)):hr(a,l,u,v),l.memoizedState=b.state,a=l.child):a=$i(a,l,v),a}function P2(a,l,u,h){return ms(),l.flags|=256,hr(a,l,u,h),l.child}var Uh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ih(a){return{baseLanes:a,cachePool:z4()}}function Ph(a,l,u){return a=a!==null?a.childLanes&~u:0,l&&(a|=ia),a}function F2(a,l,u){var h=l.pendingProps,v=!1,b=(l.flags&128)!==0,M;if((M=b)||(M=a!==null&&a.memoizedState===null?!1:(Bn.current&2)!==0),M&&(v=!0,l.flags&=-129),M=(l.flags&32)!==0,l.flags&=-33,a===null){if(Ot){if(v?jl(l):Cl(),(a=pn)?(a=Wy(a,Na),a=a!==null&&a.data!=="&"?a:null,a!==null&&(l.memoizedState={dehydrated:a,treeContext:vl!==null?{id:ii,overflow:li}:null,retryLane:536870912,hydrationErrors:null},u=k4(a),u.return=l,l.child=u,dr=l,pn=null)):a=null,a===null)throw bl(l);return jm(a)?l.lanes=32:l.lanes=536870912,null}var $=h.children;return h=h.fallback,v?(Cl(),v=l.mode,$=v0({mode:"hidden",children:$},v),h=hs(h,v,u,null),$.return=l,h.return=l,$.sibling=h,l.child=$,h=l.child,h.memoizedState=Ih(u),h.childLanes=Ph(a,M,u),l.memoizedState=Uh,ku(null,h)):(jl(l),Fh(l,$))}var re=a.memoizedState;if(re!==null&&($=re.dehydrated,$!==null)){if(b)l.flags&256?(jl(l),l.flags&=-257,l=Vh(a,l,u)):l.memoizedState!==null?(Cl(),l.child=a.child,l.flags|=128,l=null):(Cl(),$=h.fallback,v=l.mode,h=v0({mode:"visible",children:h.children},v),$=hs($,v,u,null),$.flags|=2,h.return=l,$.return=l,h.sibling=$,l.child=h,bs(l,a.child,null,u),h=l.child,h.memoizedState=Ih(u),h.childLanes=Ph(a,M,u),l.memoizedState=Uh,l=ku(null,h));else if(jl(l),jm($)){if(M=$.nextSibling&&$.nextSibling.dataset,M)var ue=M.dgst;M=ue,h=Error(r(419)),h.stack="",h.digest=M,du({value:h,source:null,stack:null}),l=Vh(a,l,u)}else if(Vn||Qs(a,l,u,!1),M=(u&a.childLanes)!==0,Vn||M){if(M=ln,M!==null&&(h=Lr(M,u),h!==0&&h!==re.retryLane))throw re.retryLane=h,fs(a,h),Fr(M,a,h),Hh;Nm($)||E0(),l=Vh(a,l,u)}else Nm($)?(l.flags|=192,l.child=a.child,l=null):(a=re.treeContext,pn=Ca($.nextSibling),dr=l,Ot=!0,xl=null,Na=!1,a!==null&&C4(l,a),l=Fh(l,h.children),l.flags|=4096);return l}return v?(Cl(),$=h.fallback,v=l.mode,re=a.child,ue=re.sibling,h=zi(re,{mode:"hidden",children:h.children}),h.subtreeFlags=re.subtreeFlags&65011712,ue!==null?$=zi(ue,$):($=hs($,v,u,null),$.flags|=2),$.return=l,h.return=l,h.sibling=$,l.child=h,ku(null,h),h=l.child,$=a.child.memoizedState,$===null?$=Ih(u):(v=$.cachePool,v!==null?(re=Pn._currentValue,v=v.parent!==re?{parent:re,pool:re}:v):v=z4(),$={baseLanes:$.baseLanes|u,cachePool:v}),h.memoizedState=$,h.childLanes=Ph(a,M,u),l.memoizedState=Uh,ku(a.child,h)):(jl(l),u=a.child,a=u.sibling,u=zi(u,{mode:"visible",children:h.children}),u.return=l,u.sibling=null,a!==null&&(M=l.deletions,M===null?(l.deletions=[a],l.flags|=16):M.push(a)),l.child=u,l.memoizedState=null,u)}function Fh(a,l){return l=v0({mode:"visible",children:l},a.mode),l.return=a,a.child=l}function v0(a,l){return a=ta(22,a,null,l),a.lanes=0,a}function Vh(a,l,u){return bs(l,a.child,null,u),a=Fh(l,l.pendingProps.children),a.flags|=2,l.memoizedState=null,a}function V2(a,l,u){a.lanes|=l;var h=a.alternate;h!==null&&(h.lanes|=l),lh(a.return,l,u)}function Gh(a,l,u,h,v,b){var M=a.memoizedState;M===null?a.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:h,tail:u,tailMode:v,treeForkCount:b}:(M.isBackwards=l,M.rendering=null,M.renderingStartTime=0,M.last=h,M.tail=u,M.tailMode=v,M.treeForkCount=b)}function G2(a,l,u){var h=l.pendingProps,v=h.revealOrder,b=h.tail;h=h.children;var M=Bn.current,$=(M&2)!==0;if($?(M=M&1|2,l.flags|=128):M&=1,B(Bn,M),hr(a,l,h,u),h=Ot?cu:0,!$&&a!==null&&(a.flags&128)!==0)e:for(a=l.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&V2(a,u,l);else if(a.tag===19)V2(a,u,l);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===l)break e;for(;a.sibling===null;){if(a.return===null||a.return===l)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(v){case"forwards":for(u=l.child,v=null;u!==null;)a=u.alternate,a!==null&&l0(a)===null&&(v=u),u=u.sibling;u=v,u===null?(v=l.child,l.child=null):(v=u.sibling,u.sibling=null),Gh(l,!1,v,u,b,h);break;case"backwards":case"unstable_legacy-backwards":for(u=null,v=l.child,l.child=null;v!==null;){if(a=v.alternate,a!==null&&l0(a)===null){l.child=v;break}a=v.sibling,v.sibling=u,u=v,v=a}Gh(l,!0,u,null,b,h);break;case"together":Gh(l,!1,null,null,void 0,h);break;default:l.memoizedState=null}return l.child}function $i(a,l,u){if(a!==null&&(l.dependencies=a.dependencies),_l|=l.lanes,(u&l.childLanes)===0)if(a!==null){if(Qs(a,l,u,!1),(u&l.childLanes)===0)return null}else return null;if(a!==null&&l.child!==a.child)throw Error(r(153));if(l.child!==null){for(a=l.child,u=zi(a,a.pendingProps),l.child=u,u.return=l;a.sibling!==null;)a=a.sibling,u=u.sibling=zi(a,a.pendingProps),u.return=l;u.sibling=null}return l.child}function Yh(a,l){return(a.lanes&l)!==0?!0:(a=a.dependencies,!!(a!==null&&Wc(a)))}function w9(a,l,u){switch(l.tag){case 3:ye(l,l.stateNode.containerInfo),wl(l,Pn,a.memoizedState.cache),ms();break;case 27:case 5:Ge(l);break;case 4:ye(l,l.stateNode.containerInfo);break;case 10:wl(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,vh(l),null;break;case 13:var h=l.memoizedState;if(h!==null)return h.dehydrated!==null?(jl(l),l.flags|=128,null):(u&l.child.childLanes)!==0?F2(a,l,u):(jl(l),a=$i(a,l,u),a!==null?a.sibling:null);jl(l);break;case 19:var v=(a.flags&128)!==0;if(h=(u&l.childLanes)!==0,h||(Qs(a,l,u,!1),h=(u&l.childLanes)!==0),v){if(h)return G2(a,l,u);l.flags|=128}if(v=l.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),B(Bn,Bn.current),h)break;return null;case 22:return l.lanes=0,$2(a,l,u,l.pendingProps);case 24:wl(l,Pn,a.memoizedState.cache)}return $i(a,l,u)}function Y2(a,l,u){if(a!==null)if(a.memoizedProps!==l.pendingProps)Vn=!0;else{if(!Yh(a,u)&&(l.flags&128)===0)return Vn=!1,w9(a,l,u);Vn=(a.flags&131072)!==0}else Vn=!1,Ot&&(l.flags&1048576)!==0&&j4(l,cu,l.index);switch(l.lanes=0,l.tag){case 16:e:{var h=l.pendingProps;if(a=vs(l.elementType),l.type=a,typeof a=="function")Wf(a)?(h=Ss(a,h),l.tag=1,l=I2(null,l,a,h,u)):(l.tag=0,l=qh(null,l,a,h,u));else{if(a!=null){var v=a.$$typeof;if(v===L){l.tag=11,l=R2(null,l,a,h,u);break e}else if(v===O){l.tag=14,l=B2(null,l,a,h,u);break e}}throw l=F(a)||a,Error(r(306,l,""))}}return l;case 0:return qh(a,l,l.type,l.pendingProps,u);case 1:return h=l.type,v=Ss(h,l.pendingProps),I2(a,l,h,v,u);case 3:e:{if(ye(l,l.stateNode.containerInfo),a===null)throw Error(r(387));h=l.pendingProps;var b=l.memoizedState;v=b.element,hh(a,l),vu(l,h,null,u);var M=l.memoizedState;if(h=M.cache,wl(l,Pn,h),h!==b.cache&&sh(l,[Pn],u,!0),yu(),h=M.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:M.cache},l.updateQueue.baseState=b,l.memoizedState=b,l.flags&256){l=P2(a,l,h,u);break e}else if(h!==v){v=wa(Error(r(424)),l),du(v),l=P2(a,l,h,u);break e}else{switch(a=l.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(pn=Ca(a.firstChild),dr=l,Ot=!0,xl=null,Na=!0,u=$4(l,null,h,u),l.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(ms(),h===v){l=$i(a,l,u);break e}hr(a,l,h,u)}l=l.child}return l;case 26:return y0(a,l),a===null?(u=av(l.type,null,l.pendingProps,null))?l.memoizedState=u:Ot||(u=l.type,a=l.pendingProps,h=L0(xe.current).createElement(u),h[an]=l,h[un]=a,mr(h,u,a),cn(h),l.stateNode=h):l.memoizedState=av(l.type,a.memoizedProps,l.pendingProps,a.memoizedState),null;case 27:return Ge(l),a===null&&Ot&&(h=l.stateNode=tv(l.type,l.pendingProps,xe.current),dr=l,Na=!0,v=pn,Ll(l.type)?(Cm=v,pn=Ca(h.firstChild)):pn=v),hr(a,l,l.pendingProps.children,u),y0(a,l),a===null&&(l.flags|=4194304),l.child;case 5:return a===null&&Ot&&((v=h=pn)&&(h=Q9(h,l.type,l.pendingProps,Na),h!==null?(l.stateNode=h,dr=l,pn=Ca(h.firstChild),Na=!1,v=!0):v=!1),v||bl(l)),Ge(l),v=l.type,b=l.pendingProps,M=a!==null?a.memoizedProps:null,h=b.children,wm(v,b)?h=null:M!==null&&wm(v,M)&&(l.flags|=32),l.memoizedState!==null&&(v=bh(a,l,f9,null,null,u),$u._currentValue=v),y0(a,l),hr(a,l,h,u),l.child;case 6:return a===null&&Ot&&((a=u=pn)&&(u=W9(u,l.pendingProps,Na),u!==null?(l.stateNode=u,dr=l,pn=null,a=!0):a=!1),a||bl(l)),null;case 13:return F2(a,l,u);case 4:return ye(l,l.stateNode.containerInfo),h=l.pendingProps,a===null?l.child=bs(l,null,h,u):hr(a,l,h,u),l.child;case 11:return R2(a,l,l.type,l.pendingProps,u);case 7:return hr(a,l,l.pendingProps,u),l.child;case 8:return hr(a,l,l.pendingProps.children,u),l.child;case 12:return hr(a,l,l.pendingProps.children,u),l.child;case 10:return h=l.pendingProps,wl(l,l.type,h.value),hr(a,l,h.children,u),l.child;case 9:return v=l.type._context,h=l.pendingProps.children,gs(l),v=fr(v),h=h(v),l.flags|=1,hr(a,l,h,u),l.child;case 14:return B2(a,l,l.type,l.pendingProps,u);case 15:return O2(a,l,l.type,l.pendingProps,u);case 19:return G2(a,l,u);case 31:return b9(a,l,u);case 22:return $2(a,l,u,l.pendingProps);case 24:return gs(l),h=fr(Pn),a===null?(v=ch(),v===null&&(v=ln,b=oh(),v.pooledCache=b,b.refCount++,b!==null&&(v.pooledCacheLanes|=u),v=b),l.memoizedState={parent:h,cache:v},fh(l),wl(l,Pn,v)):((a.lanes&u)!==0&&(hh(a,l),vu(l,null,null,u),yu()),v=a.memoizedState,b=l.memoizedState,v.parent!==h?(v={parent:h,cache:h},l.memoizedState=v,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=v),wl(l,Pn,h)):(h=b.cache,wl(l,Pn,h),h!==v.cache&&sh(l,[Pn],u,!0))),hr(a,l,l.pendingProps.children,u),l.child;case 29:throw l.pendingProps}throw Error(r(156,l.tag))}function Hi(a){a.flags|=4}function Xh(a,l,u,h,v){if((l=(a.mode&32)!==0)&&(l=!1),l){if(a.flags|=16777216,(v&335544128)===v)if(a.stateNode.complete)a.flags|=8192;else if(by())a.flags|=8192;else throw xs=n0,dh}else a.flags&=-16777217}function X2(a,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!uv(l))if(by())a.flags|=8192;else throw xs=n0,dh}function x0(a,l){l!==null&&(a.flags|=4),a.flags&16384&&(l=a.tag!==22?Oe():536870912,a.lanes|=l,uo|=l)}function Nu(a,l){if(!Ot)switch(a.tailMode){case"hidden":l=a.tail;for(var u=null;l!==null;)l.alternate!==null&&(u=l),l=l.sibling;u===null?a.tail=null:u.sibling=null;break;case"collapsed":u=a.tail;for(var h=null;u!==null;)u.alternate!==null&&(h=u),u=u.sibling;h===null?l||a.tail===null?a.tail=null:a.tail.sibling=null:h.sibling=null}}function gn(a){var l=a.alternate!==null&&a.alternate.child===a.child,u=0,h=0;if(l)for(var v=a.child;v!==null;)u|=v.lanes|v.childLanes,h|=v.subtreeFlags&65011712,h|=v.flags&65011712,v.return=a,v=v.sibling;else for(v=a.child;v!==null;)u|=v.lanes|v.childLanes,h|=v.subtreeFlags,h|=v.flags,v.return=a,v=v.sibling;return a.subtreeFlags|=h,a.childLanes=u,l}function S9(a,l,u){var h=l.pendingProps;switch(nh(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gn(l),null;case 1:return gn(l),null;case 3:return u=l.stateNode,h=null,a!==null&&(h=a.memoizedState.cache),l.memoizedState.cache!==h&&(l.flags|=2048),Ri(Pn),Ce(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(a===null||a.child===null)&&(Zs(l)?Hi(l):a===null||a.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,ah())),gn(l),null;case 26:var v=l.type,b=l.memoizedState;return a===null?(Hi(l),b!==null?(gn(l),X2(l,b)):(gn(l),Xh(l,v,null,h,u))):b?b!==a.memoizedState?(Hi(l),gn(l),X2(l,b)):(gn(l),l.flags&=-16777217):(a=a.memoizedProps,a!==h&&Hi(l),gn(l),Xh(l,v,a,h,u)),null;case 27:if(Pe(l),u=xe.current,v=l.type,a!==null&&l.stateNode!=null)a.memoizedProps!==h&&Hi(l);else{if(!h){if(l.stateNode===null)throw Error(r(166));return gn(l),null}a=ce.current,Zs(l)?E4(l):(a=tv(v,h,u),l.stateNode=a,Hi(l))}return gn(l),null;case 5:if(Pe(l),v=l.type,a!==null&&l.stateNode!=null)a.memoizedProps!==h&&Hi(l);else{if(!h){if(l.stateNode===null)throw Error(r(166));return gn(l),null}if(b=ce.current,Zs(l))E4(l);else{var M=L0(xe.current);switch(b){case 1:b=M.createElementNS("http://www.w3.org/2000/svg",v);break;case 2:b=M.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;default:switch(v){case"svg":b=M.createElementNS("http://www.w3.org/2000/svg",v);break;case"math":b=M.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;case"script":b=M.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof h.is=="string"?M.createElement("select",{is:h.is}):M.createElement("select"),h.multiple?b.multiple=!0:h.size&&(b.size=h.size);break;default:b=typeof h.is=="string"?M.createElement(v,{is:h.is}):M.createElement(v)}}b[an]=l,b[un]=h;e:for(M=l.child;M!==null;){if(M.tag===5||M.tag===6)b.appendChild(M.stateNode);else if(M.tag!==4&&M.tag!==27&&M.child!==null){M.child.return=M,M=M.child;continue}if(M===l)break e;for(;M.sibling===null;){if(M.return===null||M.return===l)break e;M=M.return}M.sibling.return=M.return,M=M.sibling}l.stateNode=b;e:switch(mr(b,v,h),v){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&Hi(l)}}return gn(l),Xh(l,l.type,a===null?null:a.memoizedProps,l.pendingProps,u),null;case 6:if(a&&l.stateNode!=null)a.memoizedProps!==h&&Hi(l);else{if(typeof h!="string"&&l.stateNode===null)throw Error(r(166));if(a=xe.current,Zs(l)){if(a=l.stateNode,u=l.memoizedProps,h=null,v=dr,v!==null)switch(v.tag){case 27:case 5:h=v.memoizedProps}a[an]=l,a=!!(a.nodeValue===u||h!==null&&h.suppressHydrationWarning===!0||Fy(a.nodeValue,u)),a||bl(l,!0)}else a=L0(a).createTextNode(h),a[an]=l,l.stateNode=a}return gn(l),null;case 31:if(u=l.memoizedState,a===null||a.memoizedState!==null){if(h=Zs(l),u!==null){if(a===null){if(!h)throw Error(r(318));if(a=l.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(557));a[an]=l}else ms(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;gn(l),a=!1}else u=ah(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=u),a=!0;if(!a)return l.flags&256?(ra(l),l):(ra(l),null);if((l.flags&128)!==0)throw Error(r(558))}return gn(l),null;case 13:if(h=l.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(v=Zs(l),h!==null&&h.dehydrated!==null){if(a===null){if(!v)throw Error(r(318));if(v=l.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(r(317));v[an]=l}else ms(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;gn(l),v=!1}else v=ah(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=v),v=!0;if(!v)return l.flags&256?(ra(l),l):(ra(l),null)}return ra(l),(l.flags&128)!==0?(l.lanes=u,l):(u=h!==null,a=a!==null&&a.memoizedState!==null,u&&(h=l.child,v=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(v=h.alternate.memoizedState.cachePool.pool),b=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(b=h.memoizedState.cachePool.pool),b!==v&&(h.flags|=2048)),u!==a&&u&&(l.child.flags|=8192),x0(l,l.updateQueue),gn(l),null);case 4:return Ce(),a===null&&gm(l.stateNode.containerInfo),gn(l),null;case 10:return Ri(l.type),gn(l),null;case 19:if(W(Bn),h=l.memoizedState,h===null)return gn(l),null;if(v=(l.flags&128)!==0,b=h.rendering,b===null)if(v)Nu(h,!1);else{if(zn!==0||a!==null&&(a.flags&128)!==0)for(a=l.child;a!==null;){if(b=l0(a),b!==null){for(l.flags|=128,Nu(h,!1),a=b.updateQueue,l.updateQueue=a,x0(l,a),l.subtreeFlags=0,a=u,u=l.child;u!==null;)S4(u,a),u=u.sibling;return B(Bn,Bn.current&1|2),Ot&&Di(l,h.treeForkCount),l.child}a=a.sibling}h.tail!==null&&ct()>N0&&(l.flags|=128,v=!0,Nu(h,!1),l.lanes=4194304)}else{if(!v)if(a=l0(b),a!==null){if(l.flags|=128,v=!0,a=a.updateQueue,l.updateQueue=a,x0(l,a),Nu(h,!0),h.tail===null&&h.tailMode==="hidden"&&!b.alternate&&!Ot)return gn(l),null}else 2*ct()-h.renderingStartTime>N0&&u!==536870912&&(l.flags|=128,v=!0,Nu(h,!1),l.lanes=4194304);h.isBackwards?(b.sibling=l.child,l.child=b):(a=h.last,a!==null?a.sibling=b:l.child=b,h.last=b)}return h.tail!==null?(a=h.tail,h.rendering=a,h.tail=a.sibling,h.renderingStartTime=ct(),a.sibling=null,u=Bn.current,B(Bn,v?u&1|2:u&1),Ot&&Di(l,h.treeForkCount),a):(gn(l),null);case 22:case 23:return ra(l),yh(),h=l.memoizedState!==null,a!==null?a.memoizedState!==null!==h&&(l.flags|=8192):h&&(l.flags|=8192),h?(u&536870912)!==0&&(l.flags&128)===0&&(gn(l),l.subtreeFlags&6&&(l.flags|=8192)):gn(l),u=l.updateQueue,u!==null&&x0(l,u.retryQueue),u=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),h=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),h!==u&&(l.flags|=2048),a!==null&&W(ys),null;case 24:return u=null,a!==null&&(u=a.memoizedState.cache),l.memoizedState.cache!==u&&(l.flags|=2048),Ri(Pn),gn(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function k9(a,l){switch(nh(l),l.tag){case 1:return a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 3:return Ri(Pn),Ce(),a=l.flags,(a&65536)!==0&&(a&128)===0?(l.flags=a&-65537|128,l):null;case 26:case 27:case 5:return Pe(l),null;case 31:if(l.memoizedState!==null){if(ra(l),l.alternate===null)throw Error(r(340));ms()}return a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 13:if(ra(l),a=l.memoizedState,a!==null&&a.dehydrated!==null){if(l.alternate===null)throw Error(r(340));ms()}return a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 19:return W(Bn),null;case 4:return Ce(),null;case 10:return Ri(l.type),null;case 22:case 23:return ra(l),yh(),a!==null&&W(ys),a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 24:return Ri(Pn),null;case 25:return null;default:return null}}function K2(a,l){switch(nh(l),l.tag){case 3:Ri(Pn),Ce();break;case 26:case 27:case 5:Pe(l);break;case 4:Ce();break;case 31:l.memoizedState!==null&&ra(l);break;case 13:ra(l);break;case 19:W(Bn);break;case 10:Ri(l.type);break;case 22:case 23:ra(l),yh(),a!==null&&W(ys);break;case 24:Ri(Pn)}}function ju(a,l){try{var u=l.updateQueue,h=u!==null?u.lastEffect:null;if(h!==null){var v=h.next;u=v;do{if((u.tag&a)===a){h=void 0;var b=u.create,M=u.inst;h=b(),M.destroy=h}u=u.next}while(u!==v)}}catch($){Qt(l,l.return,$)}}function El(a,l,u){try{var h=l.updateQueue,v=h!==null?h.lastEffect:null;if(v!==null){var b=v.next;h=b;do{if((h.tag&a)===a){var M=h.inst,$=M.destroy;if($!==void 0){M.destroy=void 0,v=l;var re=u,ue=$;try{ue()}catch(ge){Qt(v,re,ge)}}}h=h.next}while(h!==b)}}catch(ge){Qt(l,l.return,ge)}}function Z2(a){var l=a.updateQueue;if(l!==null){var u=a.stateNode;try{q4(l,u)}catch(h){Qt(a,a.return,h)}}}function Q2(a,l,u){u.props=Ss(a.type,a.memoizedProps),u.state=a.memoizedState;try{u.componentWillUnmount()}catch(h){Qt(a,l,h)}}function Cu(a,l){try{var u=a.ref;if(u!==null){switch(a.tag){case 26:case 27:case 5:var h=a.stateNode;break;case 30:h=a.stateNode;break;default:h=a.stateNode}typeof u=="function"?a.refCleanup=u(h):u.current=h}}catch(v){Qt(a,l,v)}}function si(a,l){var u=a.ref,h=a.refCleanup;if(u!==null)if(typeof h=="function")try{h()}catch(v){Qt(a,l,v)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(v){Qt(a,l,v)}else u.current=null}function W2(a){var l=a.type,u=a.memoizedProps,h=a.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":u.autoFocus&&h.focus();break e;case"img":u.src?h.src=u.src:u.srcSet&&(h.srcset=u.srcSet)}}catch(v){Qt(a,a.return,v)}}function Kh(a,l,u){try{var h=a.stateNode;V9(h,a.type,u,l),h[un]=l}catch(v){Qt(a,a.return,v)}}function J2(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&Ll(a.type)||a.tag===4}function Zh(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||J2(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&Ll(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function Qh(a,l,u){var h=a.tag;if(h===5||h===6)a=a.stateNode,l?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(a,l):(l=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,l.appendChild(a),u=u._reactRootContainer,u!=null||l.onclick!==null||(l.onclick=Qr));else if(h!==4&&(h===27&&Ll(a.type)&&(u=a.stateNode,l=null),a=a.child,a!==null))for(Qh(a,l,u),a=a.sibling;a!==null;)Qh(a,l,u),a=a.sibling}function b0(a,l,u){var h=a.tag;if(h===5||h===6)a=a.stateNode,l?u.insertBefore(a,l):u.appendChild(a);else if(h!==4&&(h===27&&Ll(a.type)&&(u=a.stateNode),a=a.child,a!==null))for(b0(a,l,u),a=a.sibling;a!==null;)b0(a,l,u),a=a.sibling}function ey(a){var l=a.stateNode,u=a.memoizedProps;try{for(var h=a.type,v=l.attributes;v.length;)l.removeAttributeNode(v[0]);mr(l,h,u),l[an]=a,l[un]=u}catch(b){Qt(a,a.return,b)}}var qi=!1,Gn=!1,Wh=!1,ty=typeof WeakSet=="function"?WeakSet:Set,sr=null;function N9(a,l){if(a=a.containerInfo,xm=U0,a=h4(a),Vf(a)){if("selectionStart"in a)var u={start:a.selectionStart,end:a.selectionEnd};else e:{u=(u=a.ownerDocument)&&u.defaultView||window;var h=u.getSelection&&u.getSelection();if(h&&h.rangeCount!==0){u=h.anchorNode;var v=h.anchorOffset,b=h.focusNode;h=h.focusOffset;try{u.nodeType,b.nodeType}catch{u=null;break e}var M=0,$=-1,re=-1,ue=0,ge=0,Ne=a,fe=null;t:for(;;){for(var he;Ne!==u||v!==0&&Ne.nodeType!==3||($=M+v),Ne!==b||h!==0&&Ne.nodeType!==3||(re=M+h),Ne.nodeType===3&&(M+=Ne.nodeValue.length),(he=Ne.firstChild)!==null;)fe=Ne,Ne=he;for(;;){if(Ne===a)break t;if(fe===u&&++ue===v&&($=M),fe===b&&++ge===h&&(re=M),(he=Ne.nextSibling)!==null)break;Ne=fe,fe=Ne.parentNode}Ne=he}u=$===-1||re===-1?null:{start:$,end:re}}else u=null}u=u||{start:0,end:0}}else u=null;for(bm={focusedElem:a,selectionRange:u},U0=!1,sr=l;sr!==null;)if(l=sr,a=l.child,(l.subtreeFlags&1028)!==0&&a!==null)a.return=l,sr=a;else for(;sr!==null;){switch(l=sr,b=l.alternate,a=l.flags,l.tag){case 0:if((a&4)!==0&&(a=l.updateQueue,a=a!==null?a.events:null,a!==null))for(u=0;u<a.length;u++)v=a[u],v.ref.impl=v.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&b!==null){a=void 0,u=l,v=b.memoizedProps,b=b.memoizedState,h=u.stateNode;try{var Xe=Ss(u.type,v);a=h.getSnapshotBeforeUpdate(Xe,b),h.__reactInternalSnapshotBeforeUpdate=a}catch(ut){Qt(u,u.return,ut)}}break;case 3:if((a&1024)!==0){if(a=l.stateNode.containerInfo,u=a.nodeType,u===9)km(a);else if(u===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":km(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(r(163))}if(a=l.sibling,a!==null){a.return=l.return,sr=a;break}sr=l.return}}function ny(a,l,u){var h=u.flags;switch(u.tag){case 0:case 11:case 15:Ii(a,u),h&4&&ju(5,u);break;case 1:if(Ii(a,u),h&4)if(a=u.stateNode,l===null)try{a.componentDidMount()}catch(M){Qt(u,u.return,M)}else{var v=Ss(u.type,l.memoizedProps);l=l.memoizedState;try{a.componentDidUpdate(v,l,a.__reactInternalSnapshotBeforeUpdate)}catch(M){Qt(u,u.return,M)}}h&64&&Z2(u),h&512&&Cu(u,u.return);break;case 3:if(Ii(a,u),h&64&&(a=u.updateQueue,a!==null)){if(l=null,u.child!==null)switch(u.child.tag){case 27:case 5:l=u.child.stateNode;break;case 1:l=u.child.stateNode}try{q4(a,l)}catch(M){Qt(u,u.return,M)}}break;case 27:l===null&&h&4&&ey(u);case 26:case 5:Ii(a,u),l===null&&h&4&&W2(u),h&512&&Cu(u,u.return);break;case 12:Ii(a,u);break;case 31:Ii(a,u),h&4&&iy(a,u);break;case 13:Ii(a,u),h&4&&ly(a,u),h&64&&(a=u.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(u=D9.bind(null,u),J9(a,u))));break;case 22:if(h=u.memoizedState!==null||qi,!h){l=l!==null&&l.memoizedState!==null||Gn,v=qi;var b=Gn;qi=h,(Gn=l)&&!b?Pi(a,u,(u.subtreeFlags&8772)!==0):Ii(a,u),qi=v,Gn=b}break;case 30:break;default:Ii(a,u)}}function ry(a){var l=a.alternate;l!==null&&(a.alternate=null,ry(l)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(l=a.stateNode,l!==null&&Yt(l)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var vn=null,qr=!1;function Ui(a,l,u){for(u=u.child;u!==null;)ay(a,l,u),u=u.sibling}function ay(a,l,u){if(Fe&&typeof Fe.onCommitFiberUnmount=="function")try{Fe.onCommitFiberUnmount(Wt,u)}catch{}switch(u.tag){case 26:Gn||si(u,l),Ui(a,l,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Gn||si(u,l);var h=vn,v=qr;Ll(u.type)&&(vn=u.stateNode,qr=!1),Ui(a,l,u),Ru(u.stateNode),vn=h,qr=v;break;case 5:Gn||si(u,l);case 6:if(h=vn,v=qr,vn=null,Ui(a,l,u),vn=h,qr=v,vn!==null)if(qr)try{(vn.nodeType===9?vn.body:vn.nodeName==="HTML"?vn.ownerDocument.body:vn).removeChild(u.stateNode)}catch(b){Qt(u,l,b)}else try{vn.removeChild(u.stateNode)}catch(b){Qt(u,l,b)}break;case 18:vn!==null&&(qr?(a=vn,Zy(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,u.stateNode),vo(a)):Zy(vn,u.stateNode));break;case 4:h=vn,v=qr,vn=u.stateNode.containerInfo,qr=!0,Ui(a,l,u),vn=h,qr=v;break;case 0:case 11:case 14:case 15:El(2,u,l),Gn||El(4,u,l),Ui(a,l,u);break;case 1:Gn||(si(u,l),h=u.stateNode,typeof h.componentWillUnmount=="function"&&Q2(u,l,h)),Ui(a,l,u);break;case 21:Ui(a,l,u);break;case 22:Gn=(h=Gn)||u.memoizedState!==null,Ui(a,l,u),Gn=h;break;default:Ui(a,l,u)}}function iy(a,l){if(l.memoizedState===null&&(a=l.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{vo(a)}catch(u){Qt(l,l.return,u)}}}function ly(a,l){if(l.memoizedState===null&&(a=l.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{vo(a)}catch(u){Qt(l,l.return,u)}}function j9(a){switch(a.tag){case 31:case 13:case 19:var l=a.stateNode;return l===null&&(l=a.stateNode=new ty),l;case 22:return a=a.stateNode,l=a._retryCache,l===null&&(l=a._retryCache=new ty),l;default:throw Error(r(435,a.tag))}}function w0(a,l){var u=j9(a);l.forEach(function(h){if(!u.has(h)){u.add(h);var v=L9.bind(null,a,h);h.then(v,v)}})}function Ur(a,l){var u=l.deletions;if(u!==null)for(var h=0;h<u.length;h++){var v=u[h],b=a,M=l,$=M;e:for(;$!==null;){switch($.tag){case 27:if(Ll($.type)){vn=$.stateNode,qr=!1;break e}break;case 5:vn=$.stateNode,qr=!1;break e;case 3:case 4:vn=$.stateNode.containerInfo,qr=!0;break e}$=$.return}if(vn===null)throw Error(r(160));ay(b,M,v),vn=null,qr=!1,b=v.alternate,b!==null&&(b.return=null),v.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)sy(l,a),l=l.sibling}var Ua=null;function sy(a,l){var u=a.alternate,h=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Ur(l,a),Ir(a),h&4&&(El(3,a,a.return),ju(3,a),El(5,a,a.return));break;case 1:Ur(l,a),Ir(a),h&512&&(Gn||u===null||si(u,u.return)),h&64&&qi&&(a=a.updateQueue,a!==null&&(h=a.callbacks,h!==null&&(u=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=u===null?h:u.concat(h))));break;case 26:var v=Ua;if(Ur(l,a),Ir(a),h&512&&(Gn||u===null||si(u,u.return)),h&4){var b=u!==null?u.memoizedState:null;if(h=a.memoizedState,u===null)if(h===null)if(a.stateNode===null){e:{h=a.type,u=a.memoizedProps,v=v.ownerDocument||v;t:switch(h){case"title":b=v.getElementsByTagName("title")[0],(!b||b[ur]||b[an]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=v.createElement(h),v.head.insertBefore(b,v.querySelector("head > title"))),mr(b,h,u),b[an]=a,cn(b),h=b;break e;case"link":var M=sv("link","href",v).get(h+(u.href||""));if(M){for(var $=0;$<M.length;$++)if(b=M[$],b.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&b.getAttribute("rel")===(u.rel==null?null:u.rel)&&b.getAttribute("title")===(u.title==null?null:u.title)&&b.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){M.splice($,1);break t}}b=v.createElement(h),mr(b,h,u),v.head.appendChild(b);break;case"meta":if(M=sv("meta","content",v).get(h+(u.content||""))){for($=0;$<M.length;$++)if(b=M[$],b.getAttribute("content")===(u.content==null?null:""+u.content)&&b.getAttribute("name")===(u.name==null?null:u.name)&&b.getAttribute("property")===(u.property==null?null:u.property)&&b.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&b.getAttribute("charset")===(u.charSet==null?null:u.charSet)){M.splice($,1);break t}}b=v.createElement(h),mr(b,h,u),v.head.appendChild(b);break;default:throw Error(r(468,h))}b[an]=a,cn(b),h=b}a.stateNode=h}else ov(v,a.type,a.stateNode);else a.stateNode=lv(v,h,a.memoizedProps);else b!==h?(b===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):b.count--,h===null?ov(v,a.type,a.stateNode):lv(v,h,a.memoizedProps)):h===null&&a.stateNode!==null&&Kh(a,a.memoizedProps,u.memoizedProps)}break;case 27:Ur(l,a),Ir(a),h&512&&(Gn||u===null||si(u,u.return)),u!==null&&h&4&&Kh(a,a.memoizedProps,u.memoizedProps);break;case 5:if(Ur(l,a),Ir(a),h&512&&(Gn||u===null||si(u,u.return)),a.flags&32){v=a.stateNode;try{Or(v,"")}catch(Xe){Qt(a,a.return,Xe)}}h&4&&a.stateNode!=null&&(v=a.memoizedProps,Kh(a,v,u!==null?u.memoizedProps:v)),h&1024&&(Wh=!0);break;case 6:if(Ur(l,a),Ir(a),h&4){if(a.stateNode===null)throw Error(r(162));h=a.memoizedProps,u=a.stateNode;try{u.nodeValue=h}catch(Xe){Qt(a,a.return,Xe)}}break;case 3:if(O0=null,v=Ua,Ua=R0(l.containerInfo),Ur(l,a),Ua=v,Ir(a),h&4&&u!==null&&u.memoizedState.isDehydrated)try{vo(l.containerInfo)}catch(Xe){Qt(a,a.return,Xe)}Wh&&(Wh=!1,oy(a));break;case 4:h=Ua,Ua=R0(a.stateNode.containerInfo),Ur(l,a),Ir(a),Ua=h;break;case 12:Ur(l,a),Ir(a);break;case 31:Ur(l,a),Ir(a),h&4&&(h=a.updateQueue,h!==null&&(a.updateQueue=null,w0(a,h)));break;case 13:Ur(l,a),Ir(a),a.child.flags&8192&&a.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(k0=ct()),h&4&&(h=a.updateQueue,h!==null&&(a.updateQueue=null,w0(a,h)));break;case 22:v=a.memoizedState!==null;var re=u!==null&&u.memoizedState!==null,ue=qi,ge=Gn;if(qi=ue||v,Gn=ge||re,Ur(l,a),Gn=ge,qi=ue,Ir(a),h&8192)e:for(l=a.stateNode,l._visibility=v?l._visibility&-2:l._visibility|1,v&&(u===null||re||qi||Gn||ks(a)),u=null,l=a;;){if(l.tag===5||l.tag===26){if(u===null){re=u=l;try{if(b=re.stateNode,v)M=b.style,typeof M.setProperty=="function"?M.setProperty("display","none","important"):M.display="none";else{$=re.stateNode;var Ne=re.memoizedProps.style,fe=Ne!=null&&Ne.hasOwnProperty("display")?Ne.display:null;$.style.display=fe==null||typeof fe=="boolean"?"":(""+fe).trim()}}catch(Xe){Qt(re,re.return,Xe)}}}else if(l.tag===6){if(u===null){re=l;try{re.stateNode.nodeValue=v?"":re.memoizedProps}catch(Xe){Qt(re,re.return,Xe)}}}else if(l.tag===18){if(u===null){re=l;try{var he=re.stateNode;v?Qy(he,!0):Qy(re.stateNode,!1)}catch(Xe){Qt(re,re.return,Xe)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===a)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===a)break e;for(;l.sibling===null;){if(l.return===null||l.return===a)break e;u===l&&(u=null),l=l.return}u===l&&(u=null),l.sibling.return=l.return,l=l.sibling}h&4&&(h=a.updateQueue,h!==null&&(u=h.retryQueue,u!==null&&(h.retryQueue=null,w0(a,u))));break;case 19:Ur(l,a),Ir(a),h&4&&(h=a.updateQueue,h!==null&&(a.updateQueue=null,w0(a,h)));break;case 30:break;case 21:break;default:Ur(l,a),Ir(a)}}function Ir(a){var l=a.flags;if(l&2){try{for(var u,h=a.return;h!==null;){if(J2(h)){u=h;break}h=h.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var v=u.stateNode,b=Zh(a);b0(a,b,v);break;case 5:var M=u.stateNode;u.flags&32&&(Or(M,""),u.flags&=-33);var $=Zh(a);b0(a,$,M);break;case 3:case 4:var re=u.stateNode.containerInfo,ue=Zh(a);Qh(a,ue,re);break;default:throw Error(r(161))}}catch(ge){Qt(a,a.return,ge)}a.flags&=-3}l&4096&&(a.flags&=-4097)}function oy(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var l=a;oy(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),a=a.sibling}}function Ii(a,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)ny(a,l.alternate,l),l=l.sibling}function ks(a){for(a=a.child;a!==null;){var l=a;switch(l.tag){case 0:case 11:case 14:case 15:El(4,l,l.return),ks(l);break;case 1:si(l,l.return);var u=l.stateNode;typeof u.componentWillUnmount=="function"&&Q2(l,l.return,u),ks(l);break;case 27:Ru(l.stateNode);case 26:case 5:si(l,l.return),ks(l);break;case 22:l.memoizedState===null&&ks(l);break;case 30:ks(l);break;default:ks(l)}a=a.sibling}}function Pi(a,l,u){for(u=u&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var h=l.alternate,v=a,b=l,M=b.flags;switch(b.tag){case 0:case 11:case 15:Pi(v,b,u),ju(4,b);break;case 1:if(Pi(v,b,u),h=b,v=h.stateNode,typeof v.componentDidMount=="function")try{v.componentDidMount()}catch(ue){Qt(h,h.return,ue)}if(h=b,v=h.updateQueue,v!==null){var $=h.stateNode;try{var re=v.shared.hiddenCallbacks;if(re!==null)for(v.shared.hiddenCallbacks=null,v=0;v<re.length;v++)H4(re[v],$)}catch(ue){Qt(h,h.return,ue)}}u&&M&64&&Z2(b),Cu(b,b.return);break;case 27:ey(b);case 26:case 5:Pi(v,b,u),u&&h===null&&M&4&&W2(b),Cu(b,b.return);break;case 12:Pi(v,b,u);break;case 31:Pi(v,b,u),u&&M&4&&iy(v,b);break;case 13:Pi(v,b,u),u&&M&4&&ly(v,b);break;case 22:b.memoizedState===null&&Pi(v,b,u),Cu(b,b.return);break;case 30:break;default:Pi(v,b,u)}l=l.sibling}}function Jh(a,l){var u=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),a=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(a=l.memoizedState.cachePool.pool),a!==u&&(a!=null&&a.refCount++,u!=null&&fu(u))}function em(a,l){a=null,l.alternate!==null&&(a=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==a&&(l.refCount++,a!=null&&fu(a))}function Ia(a,l,u,h){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)uy(a,l,u,h),l=l.sibling}function uy(a,l,u,h){var v=l.flags;switch(l.tag){case 0:case 11:case 15:Ia(a,l,u,h),v&2048&&ju(9,l);break;case 1:Ia(a,l,u,h);break;case 3:Ia(a,l,u,h),v&2048&&(a=null,l.alternate!==null&&(a=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==a&&(l.refCount++,a!=null&&fu(a)));break;case 12:if(v&2048){Ia(a,l,u,h),a=l.stateNode;try{var b=l.memoizedProps,M=b.id,$=b.onPostCommit;typeof $=="function"&&$(M,l.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(re){Qt(l,l.return,re)}}else Ia(a,l,u,h);break;case 31:Ia(a,l,u,h);break;case 13:Ia(a,l,u,h);break;case 23:break;case 22:b=l.stateNode,M=l.alternate,l.memoizedState!==null?b._visibility&2?Ia(a,l,u,h):Eu(a,l):b._visibility&2?Ia(a,l,u,h):(b._visibility|=2,lo(a,l,u,h,(l.subtreeFlags&10256)!==0||!1)),v&2048&&Jh(M,l);break;case 24:Ia(a,l,u,h),v&2048&&em(l.alternate,l);break;default:Ia(a,l,u,h)}}function lo(a,l,u,h,v){for(v=v&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var b=a,M=l,$=u,re=h,ue=M.flags;switch(M.tag){case 0:case 11:case 15:lo(b,M,$,re,v),ju(8,M);break;case 23:break;case 22:var ge=M.stateNode;M.memoizedState!==null?ge._visibility&2?lo(b,M,$,re,v):Eu(b,M):(ge._visibility|=2,lo(b,M,$,re,v)),v&&ue&2048&&Jh(M.alternate,M);break;case 24:lo(b,M,$,re,v),v&&ue&2048&&em(M.alternate,M);break;default:lo(b,M,$,re,v)}l=l.sibling}}function Eu(a,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var u=a,h=l,v=h.flags;switch(h.tag){case 22:Eu(u,h),v&2048&&Jh(h.alternate,h);break;case 24:Eu(u,h),v&2048&&em(h.alternate,h);break;default:Eu(u,h)}l=l.sibling}}var Mu=8192;function so(a,l,u){if(a.subtreeFlags&Mu)for(a=a.child;a!==null;)cy(a,l,u),a=a.sibling}function cy(a,l,u){switch(a.tag){case 26:so(a,l,u),a.flags&Mu&&a.memoizedState!==null&&dS(u,Ua,a.memoizedState,a.memoizedProps);break;case 5:so(a,l,u);break;case 3:case 4:var h=Ua;Ua=R0(a.stateNode.containerInfo),so(a,l,u),Ua=h;break;case 22:a.memoizedState===null&&(h=a.alternate,h!==null&&h.memoizedState!==null?(h=Mu,Mu=16777216,so(a,l,u),Mu=h):so(a,l,u));break;default:so(a,l,u)}}function dy(a){var l=a.alternate;if(l!==null&&(a=l.child,a!==null)){l.child=null;do l=a.sibling,a.sibling=null,a=l;while(a!==null)}}function _u(a){var l=a.deletions;if((a.flags&16)!==0){if(l!==null)for(var u=0;u<l.length;u++){var h=l[u];sr=h,hy(h,a)}dy(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)fy(a),a=a.sibling}function fy(a){switch(a.tag){case 0:case 11:case 15:_u(a),a.flags&2048&&El(9,a,a.return);break;case 3:_u(a);break;case 12:_u(a);break;case 22:var l=a.stateNode;a.memoizedState!==null&&l._visibility&2&&(a.return===null||a.return.tag!==13)?(l._visibility&=-3,S0(a)):_u(a);break;default:_u(a)}}function S0(a){var l=a.deletions;if((a.flags&16)!==0){if(l!==null)for(var u=0;u<l.length;u++){var h=l[u];sr=h,hy(h,a)}dy(a)}for(a=a.child;a!==null;){switch(l=a,l.tag){case 0:case 11:case 15:El(8,l,l.return),S0(l);break;case 22:u=l.stateNode,u._visibility&2&&(u._visibility&=-3,S0(l));break;default:S0(l)}a=a.sibling}}function hy(a,l){for(;sr!==null;){var u=sr;switch(u.tag){case 0:case 11:case 15:El(8,u,l);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var h=u.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:fu(u.memoizedState.cache)}if(h=u.child,h!==null)h.return=u,sr=h;else e:for(u=a;sr!==null;){h=sr;var v=h.sibling,b=h.return;if(ry(h),h===u){sr=null;break e}if(v!==null){v.return=b,sr=v;break e}sr=b}}}var C9={getCacheForType:function(a){var l=fr(Pn),u=l.data.get(a);return u===void 0&&(u=a(),l.data.set(a,u)),u},cacheSignal:function(){return fr(Pn).controller.signal}},E9=typeof WeakMap=="function"?WeakMap:Map,Ft=0,ln=null,Et=null,Tt=0,Zt=0,aa=null,Ml=!1,oo=!1,tm=!1,Fi=0,zn=0,_l=0,Ns=0,nm=0,ia=0,uo=0,Au=null,Pr=null,rm=!1,k0=0,my=0,N0=1/0,j0=null,Al=null,ar=0,Tl=null,co=null,Vi=0,am=0,im=null,py=null,Tu=0,lm=null;function la(){return(Ft&2)!==0&&Tt!==0?Tt&-Tt:q.T!==null?fm():tt()}function gy(){if(ia===0)if((Tt&536870912)===0||Ot){var a=Ye;Ye<<=1,(Ye&3932160)===0&&(Ye=262144),ia=a}else ia=536870912;return a=na.current,a!==null&&(a.flags|=32),ia}function Fr(a,l,u){(a===ln&&(Zt===2||Zt===9)||a.cancelPendingCommit!==null)&&(fo(a,0),zl(a,Tt,ia,!1)),kt(a,u),((Ft&2)===0||a!==ln)&&(a===ln&&((Ft&2)===0&&(Ns|=u),zn===4&&zl(a,Tt,ia,!1)),oi(a))}function yy(a,l,u){if((Ft&6)!==0)throw Error(r(327));var h=!u&&(l&127)===0&&(l&a.expiredLanes)===0||Kt(a,l),v=h?A9(a,l):om(a,l,!0),b=h;do{if(v===0){oo&&!h&&zl(a,l,0,!1);break}else{if(u=a.current.alternate,b&&!M9(u)){v=om(a,l,!1),b=!1;continue}if(v===2){if(b=l,a.errorRecoveryDisabledLanes&b)var M=0;else M=a.pendingLanes&-536870913,M=M!==0?M:M&536870912?536870912:0;if(M!==0){l=M;e:{var $=a;v=Au;var re=$.current.memoizedState.isDehydrated;if(re&&(fo($,M).flags|=256),M=om($,M,!1),M!==2){if(tm&&!re){$.errorRecoveryDisabledLanes|=b,Ns|=b,v=4;break e}b=Pr,Pr=v,b!==null&&(Pr===null?Pr=b:Pr.push.apply(Pr,b))}v=M}if(b=!1,v!==2)continue}}if(v===1){fo(a,0),zl(a,l,0,!0);break}e:{switch(h=a,b=v,b){case 0:case 1:throw Error(r(345));case 4:if((l&4194048)!==l)break;case 6:zl(h,l,ia,!Ml);break e;case 2:Pr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((l&62914560)===l&&(v=k0+300-ct(),10<v)){if(zl(h,l,ia,!Ml),en(h,0,!0)!==0)break e;Vi=l,h.timeoutHandle=Xy(vy.bind(null,h,u,Pr,j0,rm,l,ia,Ns,uo,Ml,b,"Throttled",-0,0),v);break e}vy(h,u,Pr,j0,rm,l,ia,Ns,uo,Ml,b,null,-0,0)}}break}while(!0);oi(a)}function vy(a,l,u,h,v,b,M,$,re,ue,ge,Ne,fe,he){if(a.timeoutHandle=-1,Ne=l.subtreeFlags,Ne&8192||(Ne&16785408)===16785408){Ne={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Qr},cy(l,b,Ne);var Xe=(b&62914560)===b?k0-ct():(b&4194048)===b?my-ct():0;if(Xe=fS(Ne,Xe),Xe!==null){Vi=b,a.cancelPendingCommit=Xe(Cy.bind(null,a,l,b,u,h,v,M,$,re,ge,Ne,null,fe,he)),zl(a,b,M,!ue);return}}Cy(a,l,b,u,h,v,M,$,re)}function M9(a){for(var l=a;;){var u=l.tag;if((u===0||u===11||u===15)&&l.flags&16384&&(u=l.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var h=0;h<u.length;h++){var v=u[h],b=v.getSnapshot;v=v.value;try{if(!ea(b(),v))return!1}catch{return!1}}if(u=l.child,l.subtreeFlags&16384&&u!==null)u.return=l,l=u;else{if(l===a)break;for(;l.sibling===null;){if(l.return===null||l.return===a)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function zl(a,l,u,h){l&=~nm,l&=~Ns,a.suspendedLanes|=l,a.pingedLanes&=~l,h&&(a.warmLanes|=l),h=a.expirationTimes;for(var v=l;0<v;){var b=31-jt(v),M=1<<b;h[b]=-1,v&=~M}u!==0&&or(a,u,l)}function C0(){return(Ft&6)===0?(zu(0),!1):!0}function sm(){if(Et!==null){if(Zt===0)var a=Et.return;else a=Et,Li=ps=null,kh(a),to=null,mu=0,a=Et;for(;a!==null;)K2(a.alternate,a),a=a.return;Et=null}}function fo(a,l){var u=a.timeoutHandle;u!==-1&&(a.timeoutHandle=-1,X9(u)),u=a.cancelPendingCommit,u!==null&&(a.cancelPendingCommit=null,u()),Vi=0,sm(),ln=a,Et=u=zi(a.current,null),Tt=l,Zt=0,aa=null,Ml=!1,oo=Kt(a,l),tm=!1,uo=ia=nm=Ns=_l=zn=0,Pr=Au=null,rm=!1,(l&8)!==0&&(l|=l&32);var h=a.entangledLanes;if(h!==0)for(a=a.entanglements,h&=l;0<h;){var v=31-jt(h),b=1<<v;l|=a[v],h&=~b}return Fi=l,Yc(),u}function xy(a,l){xt=null,q.H=Su,l===eo||l===t0?(l=R4(),Zt=3):l===dh?(l=R4(),Zt=4):Zt=l===Hh?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,aa=l,Et===null&&(zn=1,p0(a,wa(l,a.current)))}function by(){var a=na.current;return a===null?!0:(Tt&4194048)===Tt?ja===null:(Tt&62914560)===Tt||(Tt&536870912)!==0?a===ja:!1}function wy(){var a=q.H;return q.H=Su,a===null?Su:a}function Sy(){var a=q.A;return q.A=C9,a}function E0(){zn=4,Ml||(Tt&4194048)!==Tt&&na.current!==null||(oo=!0),(_l&134217727)===0&&(Ns&134217727)===0||ln===null||zl(ln,Tt,ia,!1)}function om(a,l,u){var h=Ft;Ft|=2;var v=wy(),b=Sy();(ln!==a||Tt!==l)&&(j0=null,fo(a,l)),l=!1;var M=zn;e:do try{if(Zt!==0&&Et!==null){var $=Et,re=aa;switch(Zt){case 8:sm(),M=6;break e;case 3:case 2:case 9:case 6:na.current===null&&(l=!0);var ue=Zt;if(Zt=0,aa=null,ho(a,$,re,ue),u&&oo){M=0;break e}break;default:ue=Zt,Zt=0,aa=null,ho(a,$,re,ue)}}_9(),M=zn;break}catch(ge){xy(a,ge)}while(!0);return l&&a.shellSuspendCounter++,Li=ps=null,Ft=h,q.H=v,q.A=b,Et===null&&(ln=null,Tt=0,Yc()),M}function _9(){for(;Et!==null;)ky(Et)}function A9(a,l){var u=Ft;Ft|=2;var h=wy(),v=Sy();ln!==a||Tt!==l?(j0=null,N0=ct()+500,fo(a,l)):oo=Kt(a,l);e:do try{if(Zt!==0&&Et!==null){l=Et;var b=aa;t:switch(Zt){case 1:Zt=0,aa=null,ho(a,l,b,1);break;case 2:case 9:if(D4(b)){Zt=0,aa=null,Ny(l);break}l=function(){Zt!==2&&Zt!==9||ln!==a||(Zt=7),oi(a)},b.then(l,l);break e;case 3:Zt=7;break e;case 4:Zt=5;break e;case 7:D4(b)?(Zt=0,aa=null,Ny(l)):(Zt=0,aa=null,ho(a,l,b,7));break;case 5:var M=null;switch(Et.tag){case 26:M=Et.memoizedState;case 5:case 27:var $=Et;if(M?uv(M):$.stateNode.complete){Zt=0,aa=null;var re=$.sibling;if(re!==null)Et=re;else{var ue=$.return;ue!==null?(Et=ue,M0(ue)):Et=null}break t}}Zt=0,aa=null,ho(a,l,b,5);break;case 6:Zt=0,aa=null,ho(a,l,b,6);break;case 8:sm(),zn=6;break e;default:throw Error(r(462))}}T9();break}catch(ge){xy(a,ge)}while(!0);return Li=ps=null,q.H=h,q.A=v,Ft=u,Et!==null?0:(ln=null,Tt=0,Yc(),zn)}function T9(){for(;Et!==null&&!kn();)ky(Et)}function ky(a){var l=Y2(a.alternate,a,Fi);a.memoizedProps=a.pendingProps,l===null?M0(a):Et=l}function Ny(a){var l=a,u=l.alternate;switch(l.tag){case 15:case 0:l=U2(u,l,l.pendingProps,l.type,void 0,Tt);break;case 11:l=U2(u,l,l.pendingProps,l.type.render,l.ref,Tt);break;case 5:kh(l);default:K2(u,l),l=Et=S4(l,Fi),l=Y2(u,l,Fi)}a.memoizedProps=a.pendingProps,l===null?M0(a):Et=l}function ho(a,l,u,h){Li=ps=null,kh(l),to=null,mu=0;var v=l.return;try{if(x9(a,v,l,u,Tt)){zn=1,p0(a,wa(u,a.current)),Et=null;return}}catch(b){if(v!==null)throw Et=v,b;zn=1,p0(a,wa(u,a.current)),Et=null;return}l.flags&32768?(Ot||h===1?a=!0:oo||(Tt&536870912)!==0?a=!1:(Ml=a=!0,(h===2||h===9||h===3||h===6)&&(h=na.current,h!==null&&h.tag===13&&(h.flags|=16384))),jy(l,a)):M0(l)}function M0(a){var l=a;do{if((l.flags&32768)!==0){jy(l,Ml);return}a=l.return;var u=S9(l.alternate,l,Fi);if(u!==null){Et=u;return}if(l=l.sibling,l!==null){Et=l;return}Et=l=a}while(l!==null);zn===0&&(zn=5)}function jy(a,l){do{var u=k9(a.alternate,a);if(u!==null){u.flags&=32767,Et=u;return}if(u=a.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!l&&(a=a.sibling,a!==null)){Et=a;return}Et=a=u}while(a!==null);zn=6,Et=null}function Cy(a,l,u,h,v,b,M,$,re){a.cancelPendingCommit=null;do _0();while(ar!==0);if((Ft&6)!==0)throw Error(r(327));if(l!==null){if(l===a.current)throw Error(r(177));if(b=l.lanes|l.childLanes,b|=Zf,hn(a,u,b,M,$,re),a===ln&&(Et=ln=null,Tt=0),co=l,Tl=a,Vi=u,am=b,im=v,py=h,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,R9(He,function(){return Ty(),null})):(a.callbackNode=null,a.callbackPriority=0),h=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||h){h=q.T,q.T=null,v=Q.p,Q.p=2,M=Ft,Ft|=4;try{N9(a,l,u)}finally{Ft=M,Q.p=v,q.T=h}}ar=1,Ey(),My(),_y()}}function Ey(){if(ar===1){ar=0;var a=Tl,l=co,u=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||u){u=q.T,q.T=null;var h=Q.p;Q.p=2;var v=Ft;Ft|=4;try{sy(l,a);var b=bm,M=h4(a.containerInfo),$=b.focusedElem,re=b.selectionRange;if(M!==$&&$&&$.ownerDocument&&f4($.ownerDocument.documentElement,$)){if(re!==null&&Vf($)){var ue=re.start,ge=re.end;if(ge===void 0&&(ge=ue),"selectionStart"in $)$.selectionStart=ue,$.selectionEnd=Math.min(ge,$.value.length);else{var Ne=$.ownerDocument||document,fe=Ne&&Ne.defaultView||window;if(fe.getSelection){var he=fe.getSelection(),Xe=$.textContent.length,ut=Math.min(re.start,Xe),rn=re.end===void 0?ut:Math.min(re.end,Xe);!he.extend&&ut>rn&&(M=rn,rn=ut,ut=M);var se=d4($,ut),ae=d4($,rn);if(se&&ae&&(he.rangeCount!==1||he.anchorNode!==se.node||he.anchorOffset!==se.offset||he.focusNode!==ae.node||he.focusOffset!==ae.offset)){var oe=Ne.createRange();oe.setStart(se.node,se.offset),he.removeAllRanges(),ut>rn?(he.addRange(oe),he.extend(ae.node,ae.offset)):(oe.setEnd(ae.node,ae.offset),he.addRange(oe))}}}}for(Ne=[],he=$;he=he.parentNode;)he.nodeType===1&&Ne.push({element:he,left:he.scrollLeft,top:he.scrollTop});for(typeof $.focus=="function"&&$.focus(),$=0;$<Ne.length;$++){var we=Ne[$];we.element.scrollLeft=we.left,we.element.scrollTop=we.top}}U0=!!xm,bm=xm=null}finally{Ft=v,Q.p=h,q.T=u}}a.current=l,ar=2}}function My(){if(ar===2){ar=0;var a=Tl,l=co,u=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||u){u=q.T,q.T=null;var h=Q.p;Q.p=2;var v=Ft;Ft|=4;try{ny(a,l.alternate,l)}finally{Ft=v,Q.p=h,q.T=u}}ar=3}}function _y(){if(ar===4||ar===3){ar=0,Ht();var a=Tl,l=co,u=Vi,h=py;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?ar=5:(ar=0,co=Tl=null,Ay(a,a.pendingLanes));var v=a.pendingLanes;if(v===0&&(Al=null),kr(u),l=l.stateNode,Fe&&typeof Fe.onCommitFiberRoot=="function")try{Fe.onCommitFiberRoot(Wt,l,void 0,(l.current.flags&128)===128)}catch{}if(h!==null){l=q.T,v=Q.p,Q.p=2,q.T=null;try{for(var b=a.onRecoverableError,M=0;M<h.length;M++){var $=h[M];b($.value,{componentStack:$.stack})}}finally{q.T=l,Q.p=v}}(Vi&3)!==0&&_0(),oi(a),v=a.pendingLanes,(u&261930)!==0&&(v&42)!==0?a===lm?Tu++:(Tu=0,lm=a):Tu=0,zu(0)}}function Ay(a,l){(a.pooledCacheLanes&=l)===0&&(l=a.pooledCache,l!=null&&(a.pooledCache=null,fu(l)))}function _0(){return Ey(),My(),_y(),Ty()}function Ty(){if(ar!==5)return!1;var a=Tl,l=am;am=0;var u=kr(Vi),h=q.T,v=Q.p;try{Q.p=32>u?32:u,q.T=null,u=im,im=null;var b=Tl,M=Vi;if(ar=0,co=Tl=null,Vi=0,(Ft&6)!==0)throw Error(r(331));var $=Ft;if(Ft|=4,fy(b.current),uy(b,b.current,M,u),Ft=$,zu(0,!1),Fe&&typeof Fe.onPostCommitFiberRoot=="function")try{Fe.onPostCommitFiberRoot(Wt,b)}catch{}return!0}finally{Q.p=v,q.T=h,Ay(a,l)}}function zy(a,l,u){l=wa(u,l),l=$h(a.stateNode,l,2),a=Nl(a,l,2),a!==null&&(kt(a,2),oi(a))}function Qt(a,l,u){if(a.tag===3)zy(a,a,u);else for(;l!==null;){if(l.tag===3){zy(l,a,u);break}else if(l.tag===1){var h=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Al===null||!Al.has(h))){a=wa(u,a),u=D2(2),h=Nl(l,u,2),h!==null&&(L2(u,h,l,a),kt(h,2),oi(h));break}}l=l.return}}function um(a,l,u){var h=a.pingCache;if(h===null){h=a.pingCache=new E9;var v=new Set;h.set(l,v)}else v=h.get(l),v===void 0&&(v=new Set,h.set(l,v));v.has(u)||(tm=!0,v.add(u),a=z9.bind(null,a,l,u),l.then(a,a))}function z9(a,l,u){var h=a.pingCache;h!==null&&h.delete(l),a.pingedLanes|=a.suspendedLanes&u,a.warmLanes&=~u,ln===a&&(Tt&u)===u&&(zn===4||zn===3&&(Tt&62914560)===Tt&&300>ct()-k0?(Ft&2)===0&&fo(a,0):nm|=u,uo===Tt&&(uo=0)),oi(a)}function Dy(a,l){l===0&&(l=Oe()),a=fs(a,l),a!==null&&(kt(a,l),oi(a))}function D9(a){var l=a.memoizedState,u=0;l!==null&&(u=l.retryLane),Dy(a,u)}function L9(a,l){var u=0;switch(a.tag){case 31:case 13:var h=a.stateNode,v=a.memoizedState;v!==null&&(u=v.retryLane);break;case 19:h=a.stateNode;break;case 22:h=a.stateNode._retryCache;break;default:throw Error(r(314))}h!==null&&h.delete(l),Dy(a,u)}function R9(a,l){return st(a,l)}var A0=null,mo=null,cm=!1,T0=!1,dm=!1,Dl=0;function oi(a){a!==mo&&a.next===null&&(mo===null?A0=mo=a:mo=mo.next=a),T0=!0,cm||(cm=!0,O9())}function zu(a,l){if(!dm&&T0){dm=!0;do for(var u=!1,h=A0;h!==null;){if(a!==0){var v=h.pendingLanes;if(v===0)var b=0;else{var M=h.suspendedLanes,$=h.pingedLanes;b=(1<<31-jt(42|a)+1)-1,b&=v&~(M&~$),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(u=!0,Oy(h,b))}else b=Tt,b=en(h,h===ln?b:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(b&3)===0||Kt(h,b)||(u=!0,Oy(h,b));h=h.next}while(u);dm=!1}}function B9(){Ly()}function Ly(){T0=cm=!1;var a=0;Dl!==0&&Y9()&&(a=Dl);for(var l=ct(),u=null,h=A0;h!==null;){var v=h.next,b=Ry(h,l);b===0?(h.next=null,u===null?A0=v:u.next=v,v===null&&(mo=u)):(u=h,(a!==0||(b&3)!==0)&&(T0=!0)),h=v}ar!==0&&ar!==5||zu(a),Dl!==0&&(Dl=0)}function Ry(a,l){for(var u=a.suspendedLanes,h=a.pingedLanes,v=a.expirationTimes,b=a.pendingLanes&-62914561;0<b;){var M=31-jt(b),$=1<<M,re=v[M];re===-1?(($&u)===0||($&h)!==0)&&(v[M]=ft($,l)):re<=l&&(a.expiredLanes|=$),b&=~$}if(l=ln,u=Tt,u=en(a,a===l?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),h=a.callbackNode,u===0||a===l&&(Zt===2||Zt===9)||a.cancelPendingCommit!==null)return h!==null&&h!==null&&Nt(h),a.callbackNode=null,a.callbackPriority=0;if((u&3)===0||Kt(a,u)){if(l=u&-u,l===a.callbackPriority)return l;switch(h!==null&&Nt(h),kr(u)){case 2:case 8:u=je;break;case 32:u=He;break;case 268435456:u=gt;break;default:u=He}return h=By.bind(null,a),u=st(u,h),a.callbackPriority=l,a.callbackNode=u,l}return h!==null&&h!==null&&Nt(h),a.callbackPriority=2,a.callbackNode=null,2}function By(a,l){if(ar!==0&&ar!==5)return a.callbackNode=null,a.callbackPriority=0,null;var u=a.callbackNode;if(_0()&&a.callbackNode!==u)return null;var h=Tt;return h=en(a,a===ln?h:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),h===0?null:(yy(a,h,l),Ry(a,ct()),a.callbackNode!=null&&a.callbackNode===u?By.bind(null,a):null)}function Oy(a,l){if(_0())return null;yy(a,l,!0)}function O9(){K9(function(){(Ft&6)!==0?st(de,B9):Ly()})}function fm(){if(Dl===0){var a=Ws;a===0&&(a=Le,Le<<=1,(Le&261888)===0&&(Le=256)),Dl=a}return Dl}function $y(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:ht(""+a)}function Hy(a,l){var u=l.ownerDocument.createElement("input");return u.name=l.name,u.value=l.value,a.id&&u.setAttribute("form",a.id),l.parentNode.insertBefore(u,l),a=new FormData(a),u.parentNode.removeChild(u),a}function $9(a,l,u,h,v){if(l==="submit"&&u&&u.stateNode===v){var b=$y((v[un]||null).action),M=h.submitter;M&&(l=(l=M[un]||null)?$y(l.formAction):M.getAttribute("formAction"),l!==null&&(b=l,M=null));var $=new ri("action","action",null,h,v);a.push({event:$,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(Dl!==0){var re=M?Hy(v,M):new FormData(v);zh(u,{pending:!0,data:re,method:v.method,action:b},null,re)}}else typeof b=="function"&&($.preventDefault(),re=M?Hy(v,M):new FormData(v),zh(u,{pending:!0,data:re,method:v.method,action:b},b,re))},currentTarget:v}]})}}for(var hm=0;hm<Kf.length;hm++){var mm=Kf[hm],H9=mm.toLowerCase(),q9=mm[0].toUpperCase()+mm.slice(1);qa(H9,"on"+q9)}qa(g4,"onAnimationEnd"),qa(y4,"onAnimationIteration"),qa(v4,"onAnimationStart"),qa("dblclick","onDoubleClick"),qa("focusin","onFocus"),qa("focusout","onBlur"),qa(n9,"onTransitionRun"),qa(r9,"onTransitionStart"),qa(a9,"onTransitionCancel"),qa(x4,"onTransitionEnd"),Zr("onMouseEnter",["mouseout","mouseover"]),Zr("onMouseLeave",["mouseout","mouseover"]),Zr("onPointerEnter",["pointerout","pointerover"]),Zr("onPointerLeave",["pointerout","pointerover"]),pr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),pr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),pr("onBeforeInput",["compositionend","keypress","textInput","paste"]),pr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),pr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),pr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Du="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(" "),U9=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Du));function qy(a,l){l=(l&4)!==0;for(var u=0;u<a.length;u++){var h=a[u],v=h.event;h=h.listeners;e:{var b=void 0;if(l)for(var M=h.length-1;0<=M;M--){var $=h[M],re=$.instance,ue=$.currentTarget;if($=$.listener,re!==b&&v.isPropagationStopped())break e;b=$,v.currentTarget=ue;try{b(v)}catch(ge){Gc(ge)}v.currentTarget=null,b=re}else for(M=0;M<h.length;M++){if($=h[M],re=$.instance,ue=$.currentTarget,$=$.listener,re!==b&&v.isPropagationStopped())break e;b=$,v.currentTarget=ue;try{b(v)}catch(ge){Gc(ge)}v.currentTarget=null,b=re}}}}function Mt(a,l){var u=l[$n];u===void 0&&(u=l[$n]=new Set);var h=a+"__bubble";u.has(h)||(Uy(l,a,2,!1),u.add(h))}function pm(a,l,u){var h=0;l&&(h|=4),Uy(u,a,h,l)}var z0="_reactListening"+Math.random().toString(36).slice(2);function gm(a){if(!a[z0]){a[z0]=!0,Hn.forEach(function(u){u!=="selectionchange"&&(U9.has(u)||pm(u,!1,a),pm(u,!0,a))});var l=a.nodeType===9?a:a.ownerDocument;l===null||l[z0]||(l[z0]=!0,pm("selectionchange",!1,l))}}function Uy(a,l,u,h){switch(gv(l)){case 2:var v=pS;break;case 8:v=gS;break;default:v=Tm}u=v.bind(null,l,u,a),v=void 0,!ml||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(v=!0),h?v!==void 0?a.addEventListener(l,u,{capture:!0,passive:v}):a.addEventListener(l,u,!0):v!==void 0?a.addEventListener(l,u,{passive:v}):a.addEventListener(l,u,!1)}function ym(a,l,u,h,v){var b=h;if((l&1)===0&&(l&2)===0&&h!==null)e:for(;;){if(h===null)return;var M=h.tag;if(M===3||M===4){var $=h.stateNode.containerInfo;if($===v)break;if(M===4)for(M=h.return;M!==null;){var re=M.tag;if((re===3||re===4)&&M.stateNode.containerInfo===v)return;M=M.return}for(;$!==null;){if(M=Rn($),M===null)return;if(re=M.tag,re===5||re===6||re===26||re===27){h=b=M;continue e}$=$.parentNode}}h=h.return}Oa(function(){var ue=b,ge=ls(u),Ne=[];e:{var fe=b4.get(a);if(fe!==void 0){var he=ri,Xe=a;switch(a){case"keypress":if(ti(u)===0)break e;case"keydown":case"keyup":he=Pc;break;case"focusin":Xe="focus",he=Be;break;case"focusout":Xe="blur",he=Be;break;case"beforeblur":case"afterblur":he=Be;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":he=yl;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":he=Se;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":he=au;break;case g4:case y4:case v4:he=me;break;case x4:he=Hw;break;case"scroll":case"scrollend":he=us;break;case"wheel":he=Uw;break;case"copy":case"cut":case"paste":he=ot;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":he=Ti;break;case"toggle":case"beforetoggle":he=Pw}var ut=(l&4)!==0,rn=!ut&&(a==="scroll"||a==="scrollend"),se=ut?fe!==null?fe+"Capture":null:fe;ut=[];for(var ae=ue,oe;ae!==null;){var we=ae;if(oe=we.stateNode,we=we.tag,we!==5&&we!==26&&we!==27||oe===null||se===null||(we=$r(ae,se),we!=null&&ut.push(Lu(ae,we,oe))),rn)break;ae=ae.return}0<ut.length&&(fe=new he(fe,Xe,null,u,ge),Ne.push({event:fe,listeners:ut}))}}if((l&7)===0){e:{if(fe=a==="mouseover"||a==="pointerover",he=a==="mouseout"||a==="pointerout",fe&&u!==is&&(Xe=u.relatedTarget||u.fromElement)&&(Rn(Xe)||Xe[er]))break e;if((he||fe)&&(fe=ge.window===ge?ge:(fe=ge.ownerDocument)?fe.defaultView||fe.parentWindow:window,he?(Xe=u.relatedTarget||u.toElement,he=ue,Xe=Xe?Rn(Xe):null,Xe!==null&&(rn=s(Xe),ut=Xe.tag,Xe!==rn||ut!==5&&ut!==27&&ut!==6)&&(Xe=null)):(he=null,Xe=ue),he!==Xe)){if(ut=yl,we="onMouseLeave",se="onMouseEnter",ae="mouse",(a==="pointerout"||a==="pointerover")&&(ut=Ti,we="onPointerLeave",se="onPointerEnter",ae="pointer"),rn=he==null?fe:Nn(he),oe=Xe==null?fe:Nn(Xe),fe=new ut(we,ae+"leave",he,u,ge),fe.target=rn,fe.relatedTarget=oe,we=null,Rn(ge)===ue&&(ut=new ut(se,ae+"enter",Xe,u,ge),ut.target=oe,ut.relatedTarget=rn,we=ut),rn=we,he&&Xe)t:{for(ut=I9,se=he,ae=Xe,oe=0,we=se;we;we=ut(we))oe++;we=0;for(var at=ae;at;at=ut(at))we++;for(;0<oe-we;)se=ut(se),oe--;for(;0<we-oe;)ae=ut(ae),we--;for(;oe--;){if(se===ae||ae!==null&&se===ae.alternate){ut=se;break t}se=ut(se),ae=ut(ae)}ut=null}else ut=null;he!==null&&Iy(Ne,fe,he,ut,!1),Xe!==null&&rn!==null&&Iy(Ne,rn,Xe,ut,!0)}}e:{if(fe=ue?Nn(ue):window,he=fe.nodeName&&fe.nodeName.toLowerCase(),he==="select"||he==="input"&&fe.type==="file")var Ut=i4;else if(r4(fe))if(l4)Ut=Jw;else{Ut=Qw;var Qe=Zw}else he=fe.nodeName,!he||he.toLowerCase()!=="input"||fe.type!=="checkbox"&&fe.type!=="radio"?ue&&Mi(ue.elementType)&&(Ut=i4):Ut=Ww;if(Ut&&(Ut=Ut(a,ue))){a4(Ne,Ut,u,ge);break e}Qe&&Qe(a,fe,ue),a==="focusout"&&ue&&fe.type==="number"&&ue.memoizedProps.value!=null&&yr(fe,"number",fe.value)}switch(Qe=ue?Nn(ue):window,a){case"focusin":(r4(Qe)||Qe.contentEditable==="true")&&(Fs=Qe,Gf=ue,uu=null);break;case"focusout":uu=Gf=Fs=null;break;case"mousedown":Yf=!0;break;case"contextmenu":case"mouseup":case"dragend":Yf=!1,m4(Ne,u,ge);break;case"selectionchange":if(t9)break;case"keydown":case"keyup":m4(Ne,u,ge)}var bt;if(If)e:{switch(a){case"compositionstart":var zt="onCompositionStart";break e;case"compositionend":zt="onCompositionEnd";break e;case"compositionupdate":zt="onCompositionUpdate";break e}zt=void 0}else Ps?t4(a,u)&&(zt="onCompositionEnd"):a==="keydown"&&u.keyCode===229&&(zt="onCompositionStart");zt&&(Wg&&u.locale!=="ko"&&(Ps||zt!=="onCompositionStart"?zt==="onCompositionEnd"&&Ps&&(bt=pl()):(va=ge,os="value"in va?va.value:va.textContent,Ps=!0)),Qe=D0(ue,zt),0<Qe.length&&(zt=new Xt(zt,a,null,u,ge),Ne.push({event:zt,listeners:Qe}),bt?zt.data=bt:(bt=n4(u),bt!==null&&(zt.data=bt)))),(bt=Vw?Gw(a,u):Yw(a,u))&&(zt=D0(ue,"onBeforeInput"),0<zt.length&&(Qe=new Xt("onBeforeInput","beforeinput",null,u,ge),Ne.push({event:Qe,listeners:zt}),Qe.data=bt)),$9(Ne,a,ue,u,ge)}qy(Ne,l)})}function Lu(a,l,u){return{instance:a,listener:l,currentTarget:u}}function D0(a,l){for(var u=l+"Capture",h=[];a!==null;){var v=a,b=v.stateNode;if(v=v.tag,v!==5&&v!==26&&v!==27||b===null||(v=$r(a,u),v!=null&&h.unshift(Lu(a,v,b)),v=$r(a,l),v!=null&&h.push(Lu(a,v,b))),a.tag===3)return h;a=a.return}return[]}function I9(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function Iy(a,l,u,h,v){for(var b=l._reactName,M=[];u!==null&&u!==h;){var $=u,re=$.alternate,ue=$.stateNode;if($=$.tag,re!==null&&re===h)break;$!==5&&$!==26&&$!==27||ue===null||(re=ue,v?(ue=$r(u,b),ue!=null&&M.unshift(Lu(u,ue,re))):v||(ue=$r(u,b),ue!=null&&M.push(Lu(u,ue,re)))),u=u.return}M.length!==0&&a.push({event:l,listeners:M})}var P9=/\r\n?/g,F9=/\u0000|\uFFFD/g;function Py(a){return(typeof a=="string"?a:""+a).replace(P9,`
|
|
49
|
+
`).replace(F9,"")}function Fy(a,l){return l=Py(l),Py(a)===l}function nn(a,l,u,h,v,b){switch(u){case"children":typeof h=="string"?l==="body"||l==="textarea"&&h===""||Or(a,h):(typeof h=="number"||typeof h=="bigint")&&l!=="body"&&Or(a,""+h);break;case"className":La(a,"class",h);break;case"tabIndex":La(a,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":La(a,u,h);break;case"style":cr(a,h,b);break;case"data":if(l!=="object"){La(a,"data",h);break}case"src":case"href":if(h===""&&(l!=="a"||u!=="href")){a.removeAttribute(u);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){a.removeAttribute(u);break}h=ht(""+h),a.setAttribute(u,h);break;case"action":case"formAction":if(typeof h=="function"){a.setAttribute(u,"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 b=="function"&&(u==="formAction"?(l!=="input"&&nn(a,l,"name",v.name,v,null),nn(a,l,"formEncType",v.formEncType,v,null),nn(a,l,"formMethod",v.formMethod,v,null),nn(a,l,"formTarget",v.formTarget,v,null)):(nn(a,l,"encType",v.encType,v,null),nn(a,l,"method",v.method,v,null),nn(a,l,"target",v.target,v,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){a.removeAttribute(u);break}h=ht(""+h),a.setAttribute(u,h);break;case"onClick":h!=null&&(a.onclick=Qr);break;case"onScroll":h!=null&&Mt("scroll",a);break;case"onScrollEnd":h!=null&&Mt("scrollend",a);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(u=h.__html,u!=null){if(v.children!=null)throw Error(r(60));a.innerHTML=u}}break;case"multiple":a.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":a.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){a.removeAttribute("xlink:href");break}u=ht(""+h),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?a.setAttribute(u,""+h):a.removeAttribute(u);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":h&&typeof h!="function"&&typeof h!="symbol"?a.setAttribute(u,""):a.removeAttribute(u);break;case"capture":case"download":h===!0?a.setAttribute(u,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?a.setAttribute(u,h):a.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?a.setAttribute(u,h):a.removeAttribute(u);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?a.removeAttribute(u):a.setAttribute(u,h);break;case"popover":Mt("beforetoggle",a),Mt("toggle",a),Ja(a,"popover",h);break;case"xlinkActuate":jr(a,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":jr(a,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":jr(a,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":jr(a,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":jr(a,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":jr(a,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":jr(a,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":jr(a,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":jr(a,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":Ja(a,"is",h);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=Un.get(u)||u,Ja(a,u,h))}}function vm(a,l,u,h,v,b){switch(u){case"style":cr(a,h,b);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(u=h.__html,u!=null){if(v.children!=null)throw Error(r(60));a.innerHTML=u}}break;case"children":typeof h=="string"?Or(a,h):(typeof h=="number"||typeof h=="bigint")&&Or(a,""+h);break;case"onScroll":h!=null&&Mt("scroll",a);break;case"onScrollEnd":h!=null&&Mt("scrollend",a);break;case"onClick":h!=null&&(a.onclick=Qr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Qa.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(v=u.endsWith("Capture"),l=u.slice(2,v?u.length-7:void 0),b=a[un]||null,b=b!=null?b[u]:null,typeof b=="function"&&a.removeEventListener(l,b,v),typeof h=="function")){typeof b!="function"&&b!==null&&(u in a?a[u]=null:a.hasAttribute(u)&&a.removeAttribute(u)),a.addEventListener(l,h,v);break e}u in a?a[u]=h:h===!0?a.setAttribute(u,""):Ja(a,u,h)}}}function mr(a,l,u){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Mt("error",a),Mt("load",a);var h=!1,v=!1,b;for(b in u)if(u.hasOwnProperty(b)){var M=u[b];if(M!=null)switch(b){case"src":h=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:nn(a,l,b,M,u,null)}}v&&nn(a,l,"srcSet",u.srcSet,u,null),h&&nn(a,l,"src",u.src,u,null);return;case"input":Mt("invalid",a);var $=b=M=v=null,re=null,ue=null;for(h in u)if(u.hasOwnProperty(h)){var ge=u[h];if(ge!=null)switch(h){case"name":v=ge;break;case"type":M=ge;break;case"checked":re=ge;break;case"defaultChecked":ue=ge;break;case"value":b=ge;break;case"defaultValue":$=ge;break;case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(r(137,l));break;default:nn(a,l,h,ge,u,null)}}Cn(a,b,$,re,ue,M,v,!1);return;case"select":Mt("invalid",a),h=M=b=null;for(v in u)if(u.hasOwnProperty(v)&&($=u[v],$!=null))switch(v){case"value":b=$;break;case"defaultValue":M=$;break;case"multiple":h=$;default:nn(a,l,v,$,u,null)}l=b,u=M,a.multiple=!!h,l!=null?qn(a,!!h,l,!1):u!=null&&qn(a,!!h,u,!0);return;case"textarea":Mt("invalid",a),b=v=h=null;for(M in u)if(u.hasOwnProperty(M)&&($=u[M],$!=null))switch(M){case"value":h=$;break;case"defaultValue":v=$;break;case"children":b=$;break;case"dangerouslySetInnerHTML":if($!=null)throw Error(r(91));break;default:nn(a,l,M,$,u,null)}vr(a,h,v,b);return;case"option":for(re in u)if(u.hasOwnProperty(re)&&(h=u[re],h!=null))switch(re){case"selected":a.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:nn(a,l,re,h,u,null)}return;case"dialog":Mt("beforetoggle",a),Mt("toggle",a),Mt("cancel",a),Mt("close",a);break;case"iframe":case"object":Mt("load",a);break;case"video":case"audio":for(h=0;h<Du.length;h++)Mt(Du[h],a);break;case"image":Mt("error",a),Mt("load",a);break;case"details":Mt("toggle",a);break;case"embed":case"source":case"link":Mt("error",a),Mt("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ue in u)if(u.hasOwnProperty(ue)&&(h=u[ue],h!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:nn(a,l,ue,h,u,null)}return;default:if(Mi(l)){for(ge in u)u.hasOwnProperty(ge)&&(h=u[ge],h!==void 0&&vm(a,l,ge,h,u,void 0));return}}for($ in u)u.hasOwnProperty($)&&(h=u[$],h!=null&&nn(a,l,$,h,u,null))}function V9(a,l,u,h){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var v=null,b=null,M=null,$=null,re=null,ue=null,ge=null;for(he in u){var Ne=u[he];if(u.hasOwnProperty(he)&&Ne!=null)switch(he){case"checked":break;case"value":break;case"defaultValue":re=Ne;default:h.hasOwnProperty(he)||nn(a,l,he,null,h,Ne)}}for(var fe in h){var he=h[fe];if(Ne=u[fe],h.hasOwnProperty(fe)&&(he!=null||Ne!=null))switch(fe){case"type":b=he;break;case"name":v=he;break;case"checked":ue=he;break;case"defaultChecked":ge=he;break;case"value":M=he;break;case"defaultValue":$=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(r(137,l));break;default:he!==Ne&&nn(a,l,fe,he,h,Ne)}}gr(a,M,$,re,ue,ge,b,v);return;case"select":he=M=$=fe=null;for(b in u)if(re=u[b],u.hasOwnProperty(b)&&re!=null)switch(b){case"value":break;case"multiple":he=re;default:h.hasOwnProperty(b)||nn(a,l,b,null,h,re)}for(v in h)if(b=h[v],re=u[v],h.hasOwnProperty(v)&&(b!=null||re!=null))switch(v){case"value":fe=b;break;case"defaultValue":$=b;break;case"multiple":M=b;default:b!==re&&nn(a,l,v,b,h,re)}l=$,u=M,h=he,fe!=null?qn(a,!!u,fe,!1):!!h!=!!u&&(l!=null?qn(a,!!u,l,!0):qn(a,!!u,u?[]:"",!1));return;case"textarea":he=fe=null;for($ in u)if(v=u[$],u.hasOwnProperty($)&&v!=null&&!h.hasOwnProperty($))switch($){case"value":break;case"children":break;default:nn(a,l,$,null,h,v)}for(M in h)if(v=h[M],b=u[M],h.hasOwnProperty(M)&&(v!=null||b!=null))switch(M){case"value":fe=v;break;case"defaultValue":he=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:v!==b&&nn(a,l,M,v,h,b)}Ra(a,fe,he);return;case"option":for(var Xe in u)if(fe=u[Xe],u.hasOwnProperty(Xe)&&fe!=null&&!h.hasOwnProperty(Xe))switch(Xe){case"selected":a.selected=!1;break;default:nn(a,l,Xe,null,h,fe)}for(re in h)if(fe=h[re],he=u[re],h.hasOwnProperty(re)&&fe!==he&&(fe!=null||he!=null))switch(re){case"selected":a.selected=fe&&typeof fe!="function"&&typeof fe!="symbol";break;default:nn(a,l,re,fe,h,he)}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 ut in u)fe=u[ut],u.hasOwnProperty(ut)&&fe!=null&&!h.hasOwnProperty(ut)&&nn(a,l,ut,null,h,fe);for(ue in h)if(fe=h[ue],he=u[ue],h.hasOwnProperty(ue)&&fe!==he&&(fe!=null||he!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(r(137,l));break;default:nn(a,l,ue,fe,h,he)}return;default:if(Mi(l)){for(var rn in u)fe=u[rn],u.hasOwnProperty(rn)&&fe!==void 0&&!h.hasOwnProperty(rn)&&vm(a,l,rn,void 0,h,fe);for(ge in h)fe=h[ge],he=u[ge],!h.hasOwnProperty(ge)||fe===he||fe===void 0&&he===void 0||vm(a,l,ge,fe,h,he);return}}for(var se in u)fe=u[se],u.hasOwnProperty(se)&&fe!=null&&!h.hasOwnProperty(se)&&nn(a,l,se,null,h,fe);for(Ne in h)fe=h[Ne],he=u[Ne],!h.hasOwnProperty(Ne)||fe===he||fe==null&&he==null||nn(a,l,Ne,fe,h,he)}function Vy(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function G9(){if(typeof performance.getEntriesByType=="function"){for(var a=0,l=0,u=performance.getEntriesByType("resource"),h=0;h<u.length;h++){var v=u[h],b=v.transferSize,M=v.initiatorType,$=v.duration;if(b&&$&&Vy(M)){for(M=0,$=v.responseEnd,h+=1;h<u.length;h++){var re=u[h],ue=re.startTime;if(ue>$)break;var ge=re.transferSize,Ne=re.initiatorType;ge&&Vy(Ne)&&(re=re.responseEnd,M+=ge*(re<$?1:($-ue)/(re-ue)))}if(--h,l+=8*(b+M)/(v.duration/1e3),a++,10<a)break}}if(0<a)return l/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var xm=null,bm=null;function L0(a){return a.nodeType===9?a:a.ownerDocument}function Gy(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Yy(a,l){if(a===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&l==="foreignObject"?0:a}function wm(a,l){return a==="textarea"||a==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var Sm=null;function Y9(){var a=window.event;return a&&a.type==="popstate"?a===Sm?!1:(Sm=a,!0):(Sm=null,!1)}var Xy=typeof setTimeout=="function"?setTimeout:void 0,X9=typeof clearTimeout=="function"?clearTimeout:void 0,Ky=typeof Promise=="function"?Promise:void 0,K9=typeof queueMicrotask=="function"?queueMicrotask:typeof Ky<"u"?function(a){return Ky.resolve(null).then(a).catch(Z9)}:Xy;function Z9(a){setTimeout(function(){throw a})}function Ll(a){return a==="head"}function Zy(a,l){var u=l,h=0;do{var v=u.nextSibling;if(a.removeChild(u),v&&v.nodeType===8)if(u=v.data,u==="/$"||u==="/&"){if(h===0){a.removeChild(v),vo(l);return}h--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")h++;else if(u==="html")Ru(a.ownerDocument.documentElement);else if(u==="head"){u=a.ownerDocument.head,Ru(u);for(var b=u.firstChild;b;){var M=b.nextSibling,$=b.nodeName;b[ur]||$==="SCRIPT"||$==="STYLE"||$==="LINK"&&b.rel.toLowerCase()==="stylesheet"||u.removeChild(b),b=M}}else u==="body"&&Ru(a.ownerDocument.body);u=v}while(u);vo(l)}function Qy(a,l){var u=a;a=0;do{var h=u.nextSibling;if(u.nodeType===1?l?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(l?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),h&&h.nodeType===8)if(u=h.data,u==="/$"){if(a===0)break;a--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||a++;u=h}while(u)}function km(a){var l=a.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var u=l;switch(l=l.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":km(u),Yt(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}a.removeChild(u)}}function Q9(a,l,u,h){for(;a.nodeType===1;){var v=u;if(a.nodeName.toLowerCase()!==l.toLowerCase()){if(!h&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(h){if(!a[ur])switch(l){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(b=a.getAttribute("rel"),b==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(b!==v.rel||a.getAttribute("href")!==(v.href==null||v.href===""?null:v.href)||a.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin)||a.getAttribute("title")!==(v.title==null?null:v.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(b=a.getAttribute("src"),(b!==(v.src==null?null:v.src)||a.getAttribute("type")!==(v.type==null?null:v.type)||a.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin))&&b&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(l==="input"&&a.type==="hidden"){var b=v.name==null?null:""+v.name;if(v.type==="hidden"&&a.getAttribute("name")===b)return a}else return a;if(a=Ca(a.nextSibling),a===null)break}return null}function W9(a,l,u){if(l==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!u||(a=Ca(a.nextSibling),a===null))return null;return a}function Wy(a,l){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!l||(a=Ca(a.nextSibling),a===null))return null;return a}function Nm(a){return a.data==="$?"||a.data==="$~"}function jm(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function J9(a,l){var u=a.ownerDocument;if(a.data==="$~")a._reactRetry=l;else if(a.data!=="$?"||u.readyState!=="loading")l();else{var h=function(){l(),u.removeEventListener("DOMContentLoaded",h)};u.addEventListener("DOMContentLoaded",h),a._reactRetry=h}}function Ca(a){for(;a!=null;a=a.nextSibling){var l=a.nodeType;if(l===1||l===3)break;if(l===8){if(l=a.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return a}var Cm=null;function Jy(a){a=a.nextSibling;for(var l=0;a;){if(a.nodeType===8){var u=a.data;if(u==="/$"||u==="/&"){if(l===0)return Ca(a.nextSibling);l--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||l++}a=a.nextSibling}return null}function ev(a){a=a.previousSibling;for(var l=0;a;){if(a.nodeType===8){var u=a.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(l===0)return a;l--}else u!=="/$"&&u!=="/&"||l++}a=a.previousSibling}return null}function tv(a,l,u){switch(l=L0(u),a){case"html":if(a=l.documentElement,!a)throw Error(r(452));return a;case"head":if(a=l.head,!a)throw Error(r(453));return a;case"body":if(a=l.body,!a)throw Error(r(454));return a;default:throw Error(r(451))}}function Ru(a){for(var l=a.attributes;l.length;)a.removeAttributeNode(l[0]);Yt(a)}var Ea=new Map,nv=new Set;function R0(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Gi=Q.d;Q.d={f:eS,r:tS,D:nS,C:rS,L:aS,m:iS,X:sS,S:lS,M:oS};function eS(){var a=Gi.f(),l=C0();return a||l}function tS(a){var l=Nr(a);l!==null&&l.tag===5&&l.type==="form"?x2(l):Gi.r(a)}var po=typeof document>"u"?null:document;function rv(a,l,u){var h=po;if(h&&typeof l=="string"&&l){var v=An(l);v='link[rel="'+a+'"][href="'+v+'"]',typeof u=="string"&&(v+='[crossorigin="'+u+'"]'),nv.has(v)||(nv.add(v),a={rel:a,crossOrigin:u,href:l},h.querySelector(v)===null&&(l=h.createElement("link"),mr(l,"link",a),cn(l),h.head.appendChild(l)))}}function nS(a){Gi.D(a),rv("dns-prefetch",a,null)}function rS(a,l){Gi.C(a,l),rv("preconnect",a,l)}function aS(a,l,u){Gi.L(a,l,u);var h=po;if(h&&a&&l){var v='link[rel="preload"][as="'+An(l)+'"]';l==="image"&&u&&u.imageSrcSet?(v+='[imagesrcset="'+An(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(v+='[imagesizes="'+An(u.imageSizes)+'"]')):v+='[href="'+An(a)+'"]';var b=v;switch(l){case"style":b=go(a);break;case"script":b=yo(a)}Ea.has(b)||(a=p({rel:"preload",href:l==="image"&&u&&u.imageSrcSet?void 0:a,as:l},u),Ea.set(b,a),h.querySelector(v)!==null||l==="style"&&h.querySelector(Bu(b))||l==="script"&&h.querySelector(Ou(b))||(l=h.createElement("link"),mr(l,"link",a),cn(l),h.head.appendChild(l)))}}function iS(a,l){Gi.m(a,l);var u=po;if(u&&a){var h=l&&typeof l.as=="string"?l.as:"script",v='link[rel="modulepreload"][as="'+An(h)+'"][href="'+An(a)+'"]',b=v;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=yo(a)}if(!Ea.has(b)&&(a=p({rel:"modulepreload",href:a},l),Ea.set(b,a),u.querySelector(v)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Ou(b)))return}h=u.createElement("link"),mr(h,"link",a),cn(h),u.head.appendChild(h)}}}function lS(a,l,u){Gi.S(a,l,u);var h=po;if(h&&a){var v=Rr(h).hoistableStyles,b=go(a);l=l||"default";var M=v.get(b);if(!M){var $={loading:0,preload:null};if(M=h.querySelector(Bu(b)))$.loading=5;else{a=p({rel:"stylesheet",href:a,"data-precedence":l},u),(u=Ea.get(b))&&Em(a,u);var re=M=h.createElement("link");cn(re),mr(re,"link",a),re._p=new Promise(function(ue,ge){re.onload=ue,re.onerror=ge}),re.addEventListener("load",function(){$.loading|=1}),re.addEventListener("error",function(){$.loading|=2}),$.loading|=4,B0(M,l,h)}M={type:"stylesheet",instance:M,count:1,state:$},v.set(b,M)}}}function sS(a,l){Gi.X(a,l);var u=po;if(u&&a){var h=Rr(u).hoistableScripts,v=yo(a),b=h.get(v);b||(b=u.querySelector(Ou(v)),b||(a=p({src:a,async:!0},l),(l=Ea.get(v))&&Mm(a,l),b=u.createElement("script"),cn(b),mr(b,"link",a),u.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},h.set(v,b))}}function oS(a,l){Gi.M(a,l);var u=po;if(u&&a){var h=Rr(u).hoistableScripts,v=yo(a),b=h.get(v);b||(b=u.querySelector(Ou(v)),b||(a=p({src:a,async:!0,type:"module"},l),(l=Ea.get(v))&&Mm(a,l),b=u.createElement("script"),cn(b),mr(b,"link",a),u.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},h.set(v,b))}}function av(a,l,u,h){var v=(v=xe.current)?R0(v):null;if(!v)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(l=go(u.href),u=Rr(v).hoistableStyles,h=u.get(l),h||(h={type:"style",instance:null,count:0,state:null},u.set(l,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){a=go(u.href);var b=Rr(v).hoistableStyles,M=b.get(a);if(M||(v=v.ownerDocument||v,M={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(a,M),(b=v.querySelector(Bu(a)))&&!b._p&&(M.instance=b,M.state.loading=5),Ea.has(a)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Ea.set(a,u),b||uS(v,a,u,M.state))),l&&h===null)throw Error(r(528,""));return M}if(l&&h!==null)throw Error(r(529,""));return null;case"script":return l=u.async,u=u.src,typeof u=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=yo(u),u=Rr(v).hoistableScripts,h=u.get(l),h||(h={type:"script",instance:null,count:0,state:null},u.set(l,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function go(a){return'href="'+An(a)+'"'}function Bu(a){return'link[rel="stylesheet"]['+a+"]"}function iv(a){return p({},a,{"data-precedence":a.precedence,precedence:null})}function uS(a,l,u,h){a.querySelector('link[rel="preload"][as="style"]['+l+"]")?h.loading=1:(l=a.createElement("link"),h.preload=l,l.addEventListener("load",function(){return h.loading|=1}),l.addEventListener("error",function(){return h.loading|=2}),mr(l,"link",u),cn(l),a.head.appendChild(l))}function yo(a){return'[src="'+An(a)+'"]'}function Ou(a){return"script[async]"+a}function lv(a,l,u){if(l.count++,l.instance===null)switch(l.type){case"style":var h=a.querySelector('style[data-href~="'+An(u.href)+'"]');if(h)return l.instance=h,cn(h),h;var v=p({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return h=(a.ownerDocument||a).createElement("style"),cn(h),mr(h,"style",v),B0(h,u.precedence,a),l.instance=h;case"stylesheet":v=go(u.href);var b=a.querySelector(Bu(v));if(b)return l.state.loading|=4,l.instance=b,cn(b),b;h=iv(u),(v=Ea.get(v))&&Em(h,v),b=(a.ownerDocument||a).createElement("link"),cn(b);var M=b;return M._p=new Promise(function($,re){M.onload=$,M.onerror=re}),mr(b,"link",h),l.state.loading|=4,B0(b,u.precedence,a),l.instance=b;case"script":return b=yo(u.src),(v=a.querySelector(Ou(b)))?(l.instance=v,cn(v),v):(h=u,(v=Ea.get(b))&&(h=p({},u),Mm(h,v)),a=a.ownerDocument||a,v=a.createElement("script"),cn(v),mr(v,"link",h),a.head.appendChild(v),l.instance=v);case"void":return null;default:throw Error(r(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(h=l.instance,l.state.loading|=4,B0(h,u.precedence,a));return l.instance}function B0(a,l,u){for(var h=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=h.length?h[h.length-1]:null,b=v,M=0;M<h.length;M++){var $=h[M];if($.dataset.precedence===l)b=$;else if(b!==v)break}b?b.parentNode.insertBefore(a,b.nextSibling):(l=u.nodeType===9?u.head:u,l.insertBefore(a,l.firstChild))}function Em(a,l){a.crossOrigin==null&&(a.crossOrigin=l.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=l.referrerPolicy),a.title==null&&(a.title=l.title)}function Mm(a,l){a.crossOrigin==null&&(a.crossOrigin=l.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=l.referrerPolicy),a.integrity==null&&(a.integrity=l.integrity)}var O0=null;function sv(a,l,u){if(O0===null){var h=new Map,v=O0=new Map;v.set(u,h)}else v=O0,h=v.get(u),h||(h=new Map,v.set(u,h));if(h.has(a))return h;for(h.set(a,null),u=u.getElementsByTagName(a),v=0;v<u.length;v++){var b=u[v];if(!(b[ur]||b[an]||a==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var M=b.getAttribute(l)||"";M=a+M;var $=h.get(M);$?$.push(b):h.set(M,[b])}}return h}function ov(a,l,u){a=a.ownerDocument||a,a.head.insertBefore(u,l==="title"?a.querySelector("head > title"):null)}function cS(a,l,u){if(u===1||l.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return a=l.disabled,typeof l.precedence=="string"&&a==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function uv(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function dS(a,l,u,h){if(u.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var v=go(h.href),b=l.querySelector(Bu(v));if(b){l=b._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(a.count++,a=$0.bind(a),l.then(a,a)),u.state.loading|=4,u.instance=b,cn(b);return}b=l.ownerDocument||l,h=iv(h),(v=Ea.get(v))&&Em(h,v),b=b.createElement("link"),cn(b);var M=b;M._p=new Promise(function($,re){M.onload=$,M.onerror=re}),mr(b,"link",h),u.instance=b}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(u,l),(l=u.state.preload)&&(u.state.loading&3)===0&&(a.count++,u=$0.bind(a),l.addEventListener("load",u),l.addEventListener("error",u))}}var _m=0;function fS(a,l){return a.stylesheets&&a.count===0&&q0(a,a.stylesheets),0<a.count||0<a.imgCount?function(u){var h=setTimeout(function(){if(a.stylesheets&&q0(a,a.stylesheets),a.unsuspend){var b=a.unsuspend;a.unsuspend=null,b()}},6e4+l);0<a.imgBytes&&_m===0&&(_m=62500*G9());var v=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&q0(a,a.stylesheets),a.unsuspend)){var b=a.unsuspend;a.unsuspend=null,b()}},(a.imgBytes>_m?50:800)+l);return a.unsuspend=u,function(){a.unsuspend=null,clearTimeout(h),clearTimeout(v)}}:null}function $0(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)q0(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var H0=null;function q0(a,l){a.stylesheets=null,a.unsuspend!==null&&(a.count++,H0=new Map,l.forEach(hS,a),H0=null,$0.call(a))}function hS(a,l){if(!(l.state.loading&4)){var u=H0.get(a);if(u)var h=u.get(null);else{u=new Map,H0.set(a,u);for(var v=a.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<v.length;b++){var M=v[b];(M.nodeName==="LINK"||M.getAttribute("media")!=="not all")&&(u.set(M.dataset.precedence,M),h=M)}h&&u.set(null,h)}v=l.instance,M=v.getAttribute("data-precedence"),b=u.get(M)||h,b===h&&u.set(null,v),u.set(M,v),this.count++,h=$0.bind(this),v.addEventListener("load",h),v.addEventListener("error",h),b?b.parentNode.insertBefore(v,b.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(v,a.firstChild)),l.state.loading|=4}}var $u={$$typeof:E,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function mS(a,l,u,h,v,b,M,$,re){this.tag=1,this.containerInfo=a,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=Ln(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ln(0),this.hiddenUpdates=Ln(null),this.identifierPrefix=h,this.onUncaughtError=v,this.onCaughtError=b,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=re,this.incompleteTransitions=new Map}function cv(a,l,u,h,v,b,M,$,re,ue,ge,Ne){return a=new mS(a,l,u,M,re,ue,ge,Ne,$),l=1,b===!0&&(l|=24),b=ta(3,null,null,l),a.current=b,b.stateNode=a,l=oh(),l.refCount++,a.pooledCache=l,l.refCount++,b.memoizedState={element:h,isDehydrated:u,cache:l},fh(b),a}function dv(a){return a?(a=Ys,a):Ys}function fv(a,l,u,h,v,b){v=dv(v),h.context===null?h.context=v:h.pendingContext=v,h=kl(l),h.payload={element:u},b=b===void 0?null:b,b!==null&&(h.callback=b),u=Nl(a,h,l),u!==null&&(Fr(u,a,l),gu(u,a,l))}function hv(a,l){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var u=a.retryLane;a.retryLane=u!==0&&u<l?u:l}}function Am(a,l){hv(a,l),(a=a.alternate)&&hv(a,l)}function mv(a){if(a.tag===13||a.tag===31){var l=fs(a,67108864);l!==null&&Fr(l,a,67108864),Am(a,67108864)}}function pv(a){if(a.tag===13||a.tag===31){var l=la();l=Bt(l);var u=fs(a,l);u!==null&&Fr(u,a,l),Am(a,l)}}var U0=!0;function pS(a,l,u,h){var v=q.T;q.T=null;var b=Q.p;try{Q.p=2,Tm(a,l,u,h)}finally{Q.p=b,q.T=v}}function gS(a,l,u,h){var v=q.T;q.T=null;var b=Q.p;try{Q.p=8,Tm(a,l,u,h)}finally{Q.p=b,q.T=v}}function Tm(a,l,u,h){if(U0){var v=zm(h);if(v===null)ym(a,l,h,I0,u),yv(a,h);else if(vS(v,a,l,u,h))h.stopPropagation();else if(yv(a,h),l&4&&-1<yS.indexOf(a)){for(;v!==null;){var b=Nr(v);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var M=dt(b.pendingLanes);if(M!==0){var $=b;for($.pendingLanes|=2,$.entangledLanes|=2;M;){var re=1<<31-jt(M);$.entanglements[1]|=re,M&=~re}oi(b),(Ft&6)===0&&(N0=ct()+500,zu(0))}}break;case 31:case 13:$=fs(b,2),$!==null&&Fr($,b,2),C0(),Am(b,2)}if(b=zm(h),b===null&&ym(a,l,h,I0,u),b===v)break;v=b}v!==null&&h.stopPropagation()}else ym(a,l,h,null,u)}}function zm(a){return a=ls(a),Dm(a)}var I0=null;function Dm(a){if(I0=null,a=Rn(a),a!==null){var l=s(a);if(l===null)a=null;else{var u=l.tag;if(u===13){if(a=o(l),a!==null)return a;a=null}else if(u===31){if(a=d(l),a!==null)return a;a=null}else if(u===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;a=null}else l!==a&&(a=null)}}return I0=a,null}function gv(a){switch(a){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(Lt()){case de:return 2;case je:return 8;case He:case rt:return 32;case gt:return 268435456;default:return 32}default:return 32}}var Lm=!1,Rl=null,Bl=null,Ol=null,Hu=new Map,qu=new Map,$l=[],yS="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 yv(a,l){switch(a){case"focusin":case"focusout":Rl=null;break;case"dragenter":case"dragleave":Bl=null;break;case"mouseover":case"mouseout":Ol=null;break;case"pointerover":case"pointerout":Hu.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":qu.delete(l.pointerId)}}function Uu(a,l,u,h,v,b){return a===null||a.nativeEvent!==b?(a={blockedOn:l,domEventName:u,eventSystemFlags:h,nativeEvent:b,targetContainers:[v]},l!==null&&(l=Nr(l),l!==null&&mv(l)),a):(a.eventSystemFlags|=h,l=a.targetContainers,v!==null&&l.indexOf(v)===-1&&l.push(v),a)}function vS(a,l,u,h,v){switch(l){case"focusin":return Rl=Uu(Rl,a,l,u,h,v),!0;case"dragenter":return Bl=Uu(Bl,a,l,u,h,v),!0;case"mouseover":return Ol=Uu(Ol,a,l,u,h,v),!0;case"pointerover":var b=v.pointerId;return Hu.set(b,Uu(Hu.get(b)||null,a,l,u,h,v)),!0;case"gotpointercapture":return b=v.pointerId,qu.set(b,Uu(qu.get(b)||null,a,l,u,h,v)),!0}return!1}function vv(a){var l=Rn(a.target);if(l!==null){var u=s(l);if(u!==null){if(l=u.tag,l===13){if(l=o(u),l!==null){a.blockedOn=l,Za(a.priority,function(){pv(u)});return}}else if(l===31){if(l=d(u),l!==null){a.blockedOn=l,Za(a.priority,function(){pv(u)});return}}else if(l===3&&u.stateNode.current.memoizedState.isDehydrated){a.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}a.blockedOn=null}function P0(a){if(a.blockedOn!==null)return!1;for(var l=a.targetContainers;0<l.length;){var u=zm(a.nativeEvent);if(u===null){u=a.nativeEvent;var h=new u.constructor(u.type,u);is=h,u.target.dispatchEvent(h),is=null}else return l=Nr(u),l!==null&&mv(l),a.blockedOn=u,!1;l.shift()}return!0}function xv(a,l,u){P0(a)&&u.delete(l)}function xS(){Lm=!1,Rl!==null&&P0(Rl)&&(Rl=null),Bl!==null&&P0(Bl)&&(Bl=null),Ol!==null&&P0(Ol)&&(Ol=null),Hu.forEach(xv),qu.forEach(xv)}function F0(a,l){a.blockedOn===l&&(a.blockedOn=null,Lm||(Lm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,xS)))}var V0=null;function bv(a){V0!==a&&(V0=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){V0===a&&(V0=null);for(var l=0;l<a.length;l+=3){var u=a[l],h=a[l+1],v=a[l+2];if(typeof h!="function"){if(Dm(h||u)===null)continue;break}var b=Nr(u);b!==null&&(a.splice(l,3),l-=3,zh(b,{pending:!0,data:v,method:u.method,action:h},h,v))}}))}function vo(a){function l(re){return F0(re,a)}Rl!==null&&F0(Rl,a),Bl!==null&&F0(Bl,a),Ol!==null&&F0(Ol,a),Hu.forEach(l),qu.forEach(l);for(var u=0;u<$l.length;u++){var h=$l[u];h.blockedOn===a&&(h.blockedOn=null)}for(;0<$l.length&&(u=$l[0],u.blockedOn===null);)vv(u),u.blockedOn===null&&$l.shift();if(u=(a.ownerDocument||a).$$reactFormReplay,u!=null)for(h=0;h<u.length;h+=3){var v=u[h],b=u[h+1],M=v[un]||null;if(typeof b=="function")M||bv(u);else if(M){var $=null;if(b&&b.hasAttribute("formAction")){if(v=b,M=b[un]||null)$=M.formAction;else if(Dm(v)!==null)continue}else $=M.action;typeof $=="function"?u[h+1]=$:(u.splice(h,3),h-=3),bv(u)}}}function wv(){function a(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(M){return v=M})},focusReset:"manual",scroll:"manual"})}function l(){v!==null&&(v(),v=null),h||setTimeout(u,20)}function u(){if(!h&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var h=!1,v=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(u,100),function(){h=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),v!==null&&(v(),v=null)}}}function Rm(a){this._internalRoot=a}G0.prototype.render=Rm.prototype.render=function(a){var l=this._internalRoot;if(l===null)throw Error(r(409));var u=l.current,h=la();fv(u,h,a,l,null,null)},G0.prototype.unmount=Rm.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var l=a.containerInfo;fv(a.current,2,null,a,null,null),C0(),l[er]=null}};function G0(a){this._internalRoot=a}G0.prototype.unstable_scheduleHydration=function(a){if(a){var l=tt();a={blockedOn:null,target:a,priority:l};for(var u=0;u<$l.length&&l!==0&&l<$l[u].priority;u++);$l.splice(u,0,a),u===0&&vv(a)}};var Sv=t.version;if(Sv!=="19.2.4")throw Error(r(527,Sv,"19.2.4"));Q.findDOMNode=function(a){var l=a._reactInternals;if(l===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=m(l),a=a!==null?y(a):null,a=a===null?null:a.stateNode,a};var bS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Y0=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Y0.isDisabled&&Y0.supportsFiber)try{Wt=Y0.inject(bS),Fe=Y0}catch{}}return Pu.createRoot=function(a,l){if(!i(a))throw Error(r(299));var u=!1,h="",v=_2,b=A2,M=T2;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(h=l.identifierPrefix),l.onUncaughtError!==void 0&&(v=l.onUncaughtError),l.onCaughtError!==void 0&&(b=l.onCaughtError),l.onRecoverableError!==void 0&&(M=l.onRecoverableError)),l=cv(a,1,!1,null,null,u,h,null,v,b,M,wv),a[er]=l.current,gm(a),new Rm(l)},Pu.hydrateRoot=function(a,l,u){if(!i(a))throw Error(r(299));var h=!1,v="",b=_2,M=A2,$=T2,re=null;return u!=null&&(u.unstable_strictMode===!0&&(h=!0),u.identifierPrefix!==void 0&&(v=u.identifierPrefix),u.onUncaughtError!==void 0&&(b=u.onUncaughtError),u.onCaughtError!==void 0&&(M=u.onCaughtError),u.onRecoverableError!==void 0&&($=u.onRecoverableError),u.formState!==void 0&&(re=u.formState)),l=cv(a,1,!0,l,u??null,h,v,re,b,M,$,wv),l.context=dv(null),u=l.current,h=la(),h=Bt(h),v=kl(h),v.callback=null,Nl(u,v,h),u=h,l.current.lanes=u,kt(l,u),oi(l),a[er]=l.current,gm(a),new G0(l)},Pu.version="19.2.4",Pu}var zv;function _S(){if(zv)return $m.exports;zv=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(),$m.exports=MS(),$m.exports}var AS=_S();const TS=Nc(AS);/**
|
|
50
|
+
* react-router v7.14.0
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/var Dv="popstate";function Lv(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function zS(e={}){function t(r,i){var m;let s=(m=i.state)==null?void 0:m.masked,{pathname:o,search:d,hash:f}=s||r.location;return F1("",{pathname:o,search:d,hash:f},i.state&&i.state.usr||null,i.state&&i.state.key||"default",s?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,i){return typeof i=="string"?i:uc(i)}return LS(t,n,null,e)}function _n(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function xi(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function DS(){return Math.random().toString(36).substring(2,10)}function Rv(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function F1(e,t,n=null,r,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ko(t):t,state:n,key:t&&t.key||r||DS(),unstable_mask:i}}function uc({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ko(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function LS(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,d="POP",f=null,m=y();m==null&&(m=0,o.replaceState({...o.state,idx:m},""));function y(){return(o.state||{idx:null}).idx}function p(){d="POP";let j=y(),N=j==null?null:j-m;m=j,f&&f({action:d,location:k.location,delta:N})}function g(j,N){d="PUSH";let _=Lv(j)?j:F1(k.location,j,N);m=y()+1;let E=Rv(_,m),L=k.createHref(_.unstable_mask||_);try{o.pushState(E,"",L)}catch(D){if(D instanceof DOMException&&D.name==="DataCloneError")throw D;i.location.assign(L)}s&&f&&f({action:d,location:k.location,delta:1})}function x(j,N){d="REPLACE";let _=Lv(j)?j:F1(k.location,j,N);m=y();let E=Rv(_,m),L=k.createHref(_.unstable_mask||_);o.replaceState(E,"",L),s&&f&&f({action:d,location:k.location,delta:0})}function w(j){return RS(j)}let k={get action(){return d},get location(){return e(i,o)},listen(j){if(f)throw new Error("A history only accepts one active listener");return i.addEventListener(Dv,p),f=j,()=>{i.removeEventListener(Dv,p),f=null}},createHref(j){return t(i,j)},createURL:w,encodeLocation(j){let N=w(j);return{pathname:N.pathname,search:N.search,hash:N.hash}},push:g,replace:x,go(j){return o.go(j)}};return k}function RS(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),_n(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:uc(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function a6(e,t,n="/"){return BS(e,t,n,!1)}function BS(e,t,n,r){let i=typeof t=="string"?Ko(t):t,s=el(i.pathname||"/",n);if(s==null)return null;let o=i6(e);OS(o);let d=null;for(let f=0;d==null&&f<o.length;++f){let m=XS(s);d=GS(o[f],m,r)}return d}function i6(e,t=[],n=[],r="",i=!1){let s=(o,d,f=i,m)=>{let y={relativePath:m===void 0?o.path||"":m,caseSensitive:o.caseSensitive===!0,childrenIndex:d,route:o};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(r)&&f)return;_n(y.relativePath.startsWith(r),`Absolute route path "${y.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(r.length)}let p=yi([r,y.relativePath]),g=n.concat(y);o.children&&o.children.length>0&&(_n(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),i6(o.children,t,g,p,f)),!(o.path==null&&!o.index)&&t.push({path:p,score:FS(p,o.index),routesMeta:g})};return e.forEach((o,d)=>{var f;if(o.path===""||!((f=o.path)!=null&&f.includes("?")))s(o,d);else for(let m of l6(o.path))s(o,d,!0,m)}),t}function l6(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=l6(r.join("/")),d=[];return d.push(...o.map(f=>f===""?s:[s,f].join("/"))),i&&d.push(...o),d.map(f=>e.startsWith("/")&&f===""?"/":f)}function OS(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:VS(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var $S=/^:[\w-]+$/,HS=3,qS=2,US=1,IS=10,PS=-2,Bv=e=>e==="*";function FS(e,t){let n=e.split("/"),r=n.length;return n.some(Bv)&&(r+=PS),t&&(r+=qS),n.filter(i=>!Bv(i)).reduce((i,s)=>i+($S.test(s)?HS:s===""?US:IS),r)}function VS(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function GS(e,t,n=!1){let{routesMeta:r}=e,i={},s="/",o=[];for(let d=0;d<r.length;++d){let f=r[d],m=d===r.length-1,y=s==="/"?t:t.slice(s.length)||"/",p=Ld({path:f.relativePath,caseSensitive:f.caseSensitive,end:m},y),g=f.route;if(!p&&m&&n&&!r[r.length-1].route.index&&(p=Ld({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},y)),!p)return null;Object.assign(i,p.params),o.push({params:i,pathname:yi([s,p.pathname]),pathnameBase:WS(yi([s,p.pathnameBase])),route:g}),p.pathnameBase!=="/"&&(s=yi([s,p.pathnameBase]))}return o}function Ld(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=YS(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),d=i.slice(1);return{params:r.reduce((m,{paramName:y,isOptional:p},g)=>{if(y==="*"){let w=d[g]||"";o=s.slice(0,s.length-w.length).replace(/(.)\/+$/,"$1")}const x=d[g];return p&&!x?m[y]=void 0:m[y]=(x||"").replace(/%2F/g,"/"),m},{}),pathname:s,pathnameBase:o,pattern:e}}function YS(e,t=!1,n=!0){xi(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,d,f,m,y)=>{if(r.push({paramName:d,isOptional:f!=null}),f){let p=y.charAt(m+o.length);return p&&p!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function XS(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return xi(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function el(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var KS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function ZS(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Ko(e):e,s;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?s=Ov(n.substring(1),"/"):s=Ov(n,t)):s=t,{pathname:s,search:JS(r),hash:ek(i)}}function Ov(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Im(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function QS(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function s6(e){let t=QS(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Hp(e,t,n,r=!1){let i;typeof e=="string"?i=Ko(e):(i={...e},_n(!i.pathname||!i.pathname.includes("?"),Im("?","pathname","search",i)),_n(!i.pathname||!i.pathname.includes("#"),Im("#","pathname","hash",i)),_n(!i.search||!i.search.includes("#"),Im("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,d;if(o==null)d=n;else{let p=t.length-1;if(!r&&o.startsWith("..")){let g=o.split("/");for(;g[0]==="..";)g.shift(),p-=1;i.pathname=g.join("/")}d=p>=0?t[p]:"/"}let f=ZS(i,d),m=o&&o!=="/"&&o.endsWith("/"),y=(s||o===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(m||y)&&(f.pathname+="/"),f}var yi=e=>e.join("/").replace(/\/\/+/g,"/"),WS=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),JS=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ek=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,tk=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function nk(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function rk(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var o6=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function u6(e,t){let n=e;if(typeof n!="string"||!KS.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(o6)try{let s=new URL(window.location.href),o=n.startsWith("//")?new URL(s.protocol+n):new URL(n),d=el(o.pathname,t);o.origin===s.origin&&d!=null?n=d+o.search+o.hash:i=!0}catch{xi(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var c6=["POST","PUT","PATCH","DELETE"];new Set(c6);var ak=["GET",...c6];new Set(ak);var Zo=A.createContext(null);Zo.displayName="DataRouter";var af=A.createContext(null);af.displayName="DataRouterState";var d6=A.createContext(!1);function ik(){return A.useContext(d6)}var f6=A.createContext({isTransitioning:!1});f6.displayName="ViewTransition";var lk=A.createContext(new Map);lk.displayName="Fetchers";var sk=A.createContext(null);sk.displayName="Await";var za=A.createContext(null);za.displayName="Navigation";var Cc=A.createContext(null);Cc.displayName="Location";var wi=A.createContext({outlet:null,matches:[],isDataRoute:!1});wi.displayName="Route";var qp=A.createContext(null);qp.displayName="RouteError";var h6="REACT_ROUTER_ERROR",ok="REDIRECT",uk="ROUTE_ERROR_RESPONSE";function ck(e){if(e.startsWith(`${h6}:${ok}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function dk(e){if(e.startsWith(`${h6}:${uk}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new tk(t.status,t.statusText,t.data)}catch{}}function fk(e,{relative:t}={}){_n(Ec(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=A.useContext(za),{hash:i,pathname:s,search:o}=Mc(e,{relative:t}),d=s;return n!=="/"&&(d=s==="/"?n:yi([n,s])),r.createHref({pathname:d,search:o,hash:i})}function Ec(){return A.useContext(Cc)!=null}function Si(){return _n(Ec(),"useLocation() may be used only in the context of a <Router> component."),A.useContext(Cc).location}var m6="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function p6(e){A.useContext(za).static||A.useLayoutEffect(e)}function lf(){let{isDataRoute:e}=A.useContext(wi);return e?Ck():hk()}function hk(){_n(Ec(),"useNavigate() may be used only in the context of a <Router> component.");let e=A.useContext(Zo),{basename:t,navigator:n}=A.useContext(za),{matches:r}=A.useContext(wi),{pathname:i}=Si(),s=JSON.stringify(s6(r)),o=A.useRef(!1);return p6(()=>{o.current=!0}),A.useCallback((f,m={})=>{if(xi(o.current,m6),!o.current)return;if(typeof f=="number"){n.go(f);return}let y=Hp(f,JSON.parse(s),i,m.relative==="path");e==null&&t!=="/"&&(y.pathname=y.pathname==="/"?t:yi([t,y.pathname])),(m.replace?n.replace:n.push)(y,m.state,m)},[t,n,s,i,e])}A.createContext(null);function mk(){let{matches:e}=A.useContext(wi),t=e[e.length-1];return t?t.params:{}}function Mc(e,{relative:t}={}){let{matches:n}=A.useContext(wi),{pathname:r}=Si(),i=JSON.stringify(s6(n));return A.useMemo(()=>Hp(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function pk(e,t){return g6(e,t)}function g6(e,t,n){var j;_n(Ec(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=A.useContext(za),{matches:i}=A.useContext(wi),s=i[i.length-1],o=s?s.params:{},d=s?s.pathname:"/",f=s?s.pathnameBase:"/",m=s&&s.route;{let N=m&&m.path||"";v6(d,!m||N.endsWith("*")||N.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${N}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
59
|
+
|
|
60
|
+
Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}/*`}">.`)}let y=Si(),p;if(t){let N=typeof t=="string"?Ko(t):t;_n(f==="/"||((j=N.pathname)==null?void 0:j.startsWith(f)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${N.pathname}" was given in the \`location\` prop.`),p=N}else p=y;let g=p.pathname||"/",x=g;if(f!=="/"){let N=f.replace(/^\//,"").split("/");x="/"+g.replace(/^\//,"").split("/").slice(N.length).join("/")}let w=a6(e,{pathname:x});xi(m||w!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),xi(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let k=bk(w&&w.map(N=>Object.assign({},N,{params:Object.assign({},o,N.params),pathname:yi([f,r.encodeLocation?r.encodeLocation(N.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?f:yi([f,r.encodeLocation?r.encodeLocation(N.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathnameBase])})),i,n);return t&&k?A.createElement(Cc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...p},navigationType:"POP"}},k):k}function gk(){let e=jk(),t=nk(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=A.createElement(A.Fragment,null,A.createElement("p",null,"💿 Hey developer 👋"),A.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",A.createElement("code",{style:s},"ErrorBoundary")," or"," ",A.createElement("code",{style:s},"errorElement")," prop on your route.")),A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},t),n?A.createElement("pre",{style:i},n):null,o)}var yk=A.createElement(gk,null),y6=class extends A.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=dk(e.digest);n&&(e=n)}let t=e!==void 0?A.createElement(wi.Provider,{value:this.props.routeContext},A.createElement(qp.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?A.createElement(vk,{error:e},t):t}};y6.contextType=d6;var Pm=new WeakMap;function vk({children:e,error:t}){let{basename:n}=A.useContext(za);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=ck(t.digest);if(r){let i=Pm.get(t);if(i)throw i;let s=u6(r.location,n);if(o6&&!Pm.get(t))if(s.isExternal||r.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const o=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:r.replace}));throw Pm.set(t,o),o}return A.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return e}function xk({routeContext:e,match:t,children:n}){let r=A.useContext(Zo);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),A.createElement(wi.Provider,{value:e},n)}function bk(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,s=r==null?void 0:r.errors;if(s!=null){let y=i.findIndex(p=>p.route.id&&(s==null?void 0:s[p.route.id])!==void 0);_n(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),i=i.slice(0,Math.min(i.length,y+1))}let o=!1,d=-1;if(n&&r){o=r.renderFallback;for(let y=0;y<i.length;y++){let p=i[y];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(d=y),p.route.id){let{loaderData:g,errors:x}=r,w=p.route.loader&&!g.hasOwnProperty(p.route.id)&&(!x||x[p.route.id]===void 0);if(p.route.lazy||w){n.isStatic&&(o=!0),d>=0?i=i.slice(0,d+1):i=[i[0]];break}}}}let f=n==null?void 0:n.onError,m=r&&f?(y,p)=>{var g,x;f(y,{location:r.location,params:((x=(g=r.matches)==null?void 0:g[0])==null?void 0:x.params)??{},unstable_pattern:rk(r.matches),errorInfo:p})}:void 0;return i.reduceRight((y,p,g)=>{let x,w=!1,k=null,j=null;r&&(x=s&&p.route.id?s[p.route.id]:void 0,k=p.route.errorElement||yk,o&&(d<0&&g===0?(v6("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,j=null):d===g&&(w=!0,j=p.route.hydrateFallbackElement||null)));let N=t.concat(i.slice(0,g+1)),_=()=>{let E;return x?E=k:w?E=j:p.route.Component?E=A.createElement(p.route.Component,null):p.route.element?E=p.route.element:E=y,A.createElement(xk,{match:p,routeContext:{outlet:y,matches:N,isDataRoute:r!=null},children:E})};return r&&(p.route.ErrorBoundary||p.route.errorElement||g===0)?A.createElement(y6,{location:r.location,revalidation:r.revalidation,component:k,error:x,children:_(),routeContext:{outlet:null,matches:N,isDataRoute:!0},onError:m}):_()},null)}function Up(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function wk(e){let t=A.useContext(Zo);return _n(t,Up(e)),t}function Sk(e){let t=A.useContext(af);return _n(t,Up(e)),t}function kk(e){let t=A.useContext(wi);return _n(t,Up(e)),t}function Ip(e){let t=kk(e),n=t.matches[t.matches.length-1];return _n(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Nk(){return Ip("useRouteId")}function jk(){var r;let e=A.useContext(qp),t=Sk("useRouteError"),n=Ip("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function Ck(){let{router:e}=wk("useNavigate"),t=Ip("useNavigate"),n=A.useRef(!1);return p6(()=>{n.current=!0}),A.useCallback(async(i,s={})=>{xi(n.current,m6),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...s}))},[e,t])}var $v={};function v6(e,t,n){!t&&!$v[e]&&($v[e]=!0,xi(!1,n))}A.memo(Ek);function Ek({routes:e,future:t,state:n,isStatic:r,onError:i}){return g6(e,void 0,{state:n,isStatic:r,onError:i})}function Eo(e){_n(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Mk({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:s=!1,unstable_useTransitions:o}){_n(!Ec(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),f=A.useMemo(()=>({basename:d,navigator:i,static:s,unstable_useTransitions:o,future:{}}),[d,i,s,o]);typeof n=="string"&&(n=Ko(n));let{pathname:m="/",search:y="",hash:p="",state:g=null,key:x="default",unstable_mask:w}=n,k=A.useMemo(()=>{let j=el(m,d);return j==null?null:{location:{pathname:j,search:y,hash:p,state:g,key:x,unstable_mask:w},navigationType:r}},[d,m,y,p,g,x,r,w]);return xi(k!=null,`<Router basename="${d}"> is not able to match the URL "${m}${y}${p}" because it does not start with the basename, so the <Router> won't render anything.`),k==null?null:A.createElement(za.Provider,{value:f},A.createElement(Cc.Provider,{children:t,value:k}))}function _k({children:e,location:t}){return pk(V1(e),t)}function V1(e,t=[]){let n=[];return A.Children.forEach(e,(r,i)=>{if(!A.isValidElement(r))return;let s=[...t,i];if(r.type===A.Fragment){n.push.apply(n,V1(r.props.children,s));return}_n(r.type===Eo,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),_n(!r.props.index||!r.props.children,"An index route cannot have child routes.");let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=V1(r.props.children,s)),n.push(o)}),n}var Sd="get",kd="application/x-www-form-urlencoded";function sf(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Ak(e){return sf(e)&&e.tagName.toLowerCase()==="button"}function Tk(e){return sf(e)&&e.tagName.toLowerCase()==="form"}function zk(e){return sf(e)&&e.tagName.toLowerCase()==="input"}function Dk(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Lk(e,t){return e.button===0&&(!t||t==="_self")&&!Dk(e)}var X0=null;function Rk(){if(X0===null)try{new FormData(document.createElement("form"),0),X0=!1}catch{X0=!0}return X0}var Bk=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Fm(e){return e!=null&&!Bk.has(e)?(xi(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${kd}"`),null):e}function Ok(e,t){let n,r,i,s,o;if(Tk(e)){let d=e.getAttribute("action");r=d?el(d,t):null,n=e.getAttribute("method")||Sd,i=Fm(e.getAttribute("enctype"))||kd,s=new FormData(e)}else if(Ak(e)||zk(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||d.getAttribute("action");if(r=f?el(f,t):null,n=e.getAttribute("formmethod")||d.getAttribute("method")||Sd,i=Fm(e.getAttribute("formenctype"))||Fm(d.getAttribute("enctype"))||kd,s=new FormData(d,e),!Rk()){let{name:m,type:y,value:p}=e;if(y==="image"){let g=m?`${m}.`:"";s.append(`${g}x`,"0"),s.append(`${g}y`,"0")}else m&&s.append(m,p)}}else{if(sf(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Sd,r=null,i=kd,o=e}return s&&i==="text/plain"&&(o=s,s=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:s,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Pp(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function x6(e,t,n,r){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname==="/"?i.pathname=`_root.${r}`:t&&el(i.pathname,t)==="/"?i.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${r}`,i}async function $k(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Hk(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function qk(e,t,n){let r=await Promise.all(e.map(async i=>{let s=t.routes[i.route.id];if(s){let o=await $k(s,n);return o.links?o.links():[]}return[]}));return Fk(r.flat(1).filter(Hk).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function Hv(e,t,n,r,i,s){let o=(f,m)=>n[m]?f.route.id!==n[m].route.id:!0,d=(f,m)=>{var y;return n[m].pathname!==f.pathname||((y=n[m].route.path)==null?void 0:y.endsWith("*"))&&n[m].params["*"]!==f.params["*"]};return s==="assets"?t.filter((f,m)=>o(f,m)||d(f,m)):s==="data"?t.filter((f,m)=>{var p;let y=r.routes[f.route.id];if(!y||!y.hasLoader)return!1;if(o(f,m)||d(f,m))return!0;if(f.route.shouldRevalidate){let g=f.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((p=n[0])==null?void 0:p.params)||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function Uk(e,t,{includeHydrateFallback:n}={}){return Ik(e.map(r=>{let i=t.routes[r.route.id];if(!i)return[];let s=[i.module];return i.clientActionModule&&(s=s.concat(i.clientActionModule)),i.clientLoaderModule&&(s=s.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(s=s.concat(i.hydrateFallbackModule)),i.imports&&(s=s.concat(i.imports)),s}).flat(1))}function Ik(e){return[...new Set(e)]}function Pk(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Fk(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let s=JSON.stringify(Pk(i));return n.has(s)||(n.add(s),r.push({key:s,link:i})),r},[])}function Fp(){let e=A.useContext(Zo);return Pp(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Vk(){let e=A.useContext(af);return Pp(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Vp=A.createContext(void 0);Vp.displayName="FrameworkContext";function Gp(){let e=A.useContext(Vp);return Pp(e,"You must render this element inside a <HydratedRouter> element"),e}function Gk(e,t){let n=A.useContext(Vp),[r,i]=A.useState(!1),[s,o]=A.useState(!1),{onFocus:d,onBlur:f,onMouseEnter:m,onMouseLeave:y,onTouchStart:p}=t,g=A.useRef(null);A.useEffect(()=>{if(e==="render"&&o(!0),e==="viewport"){let k=N=>{N.forEach(_=>{o(_.isIntersecting)})},j=new IntersectionObserver(k,{threshold:.5});return g.current&&j.observe(g.current),()=>{j.disconnect()}}},[e]),A.useEffect(()=>{if(r){let k=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(k)}}},[r]);let x=()=>{i(!0)},w=()=>{i(!1),o(!1)};return n?e!=="intent"?[s,g,{}]:[s,g,{onFocus:Fu(d,x),onBlur:Fu(f,w),onMouseEnter:Fu(m,x),onMouseLeave:Fu(y,w),onTouchStart:Fu(p,x)}]:[!1,g,{}]}function Fu(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Yk({page:e,...t}){let n=ik(),{router:r}=Fp(),i=A.useMemo(()=>a6(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?n?A.createElement(Kk,{page:e,matches:i,...t}):A.createElement(Zk,{page:e,matches:i,...t}):null}function Xk(e){let{manifest:t,routeModules:n}=Gp(),[r,i]=A.useState([]);return A.useEffect(()=>{let s=!1;return qk(e,t,n).then(o=>{s||i(o)}),()=>{s=!0}},[e,t,n]),r}function Kk({page:e,matches:t,...n}){let r=Si(),{future:i}=Gp(),{basename:s}=Fp(),o=A.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let d=x6(e,s,i.unstable_trailingSlashAwareDataRequests,"rsc"),f=!1,m=[];for(let y of t)typeof y.route.shouldRevalidate=="function"?f=!0:m.push(y.route.id);return f&&m.length>0&&d.searchParams.set("_routes",m.join(",")),[d.pathname+d.search]},[s,i.unstable_trailingSlashAwareDataRequests,e,r,t]);return A.createElement(A.Fragment,null,o.map(d=>A.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...n})))}function Zk({page:e,matches:t,...n}){let r=Si(),{future:i,manifest:s,routeModules:o}=Gp(),{basename:d}=Fp(),{loaderData:f,matches:m}=Vk(),y=A.useMemo(()=>Hv(e,t,m,s,r,"data"),[e,t,m,s,r]),p=A.useMemo(()=>Hv(e,t,m,s,r,"assets"),[e,t,m,s,r]),g=A.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let k=new Set,j=!1;if(t.forEach(_=>{var L;let E=s.routes[_.route.id];!E||!E.hasLoader||(!y.some(D=>D.route.id===_.route.id)&&_.route.id in f&&((L=o[_.route.id])!=null&&L.shouldRevalidate)||E.hasClientLoader?j=!0:k.add(_.route.id))}),k.size===0)return[];let N=x6(e,d,i.unstable_trailingSlashAwareDataRequests,"data");return j&&k.size>0&&N.searchParams.set("_routes",t.filter(_=>k.has(_.route.id)).map(_=>_.route.id).join(",")),[N.pathname+N.search]},[d,i.unstable_trailingSlashAwareDataRequests,f,r,s,y,t,e,o]),x=A.useMemo(()=>Uk(p,s),[p,s]),w=Xk(p);return A.createElement(A.Fragment,null,g.map(k=>A.createElement("link",{key:k,rel:"prefetch",as:"fetch",href:k,...n})),x.map(k=>A.createElement("link",{key:k,rel:"modulepreload",href:k,...n})),w.map(({key:k,link:j})=>A.createElement("link",{key:k,nonce:n.nonce,...j,crossOrigin:j.crossOrigin??n.crossOrigin})))}function Qk(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var Wk=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Wk&&(window.__reactRouterVersion="7.14.0")}catch{}function Jk({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=A.useRef();i.current==null&&(i.current=zS({window:r,v5Compat:!0}));let s=i.current,[o,d]=A.useState({action:s.action,location:s.location}),f=A.useCallback(m=>{n===!1?d(m):A.startTransition(()=>d(m))},[n]);return A.useLayoutEffect(()=>s.listen(f),[s,f]),A.createElement(Mk,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:s,unstable_useTransitions:n})}var b6=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,pi=A.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:s,replace:o,unstable_mask:d,state:f,target:m,to:y,preventScrollReset:p,viewTransition:g,unstable_defaultShouldRevalidate:x,...w},k){let{basename:j,navigator:N,unstable_useTransitions:_}=A.useContext(za),E=typeof y=="string"&&b6.test(y),L=u6(y,j);y=L.to;let D=fk(y,{relative:i}),T=Si(),O=null;if(d){let Y=Hp(d,[],T.unstable_mask?T.unstable_mask.pathname:"/",!0);j!=="/"&&(Y.pathname=Y.pathname==="/"?j:yi([j,Y.pathname])),O=N.createHref(Y)}let[Z,V,P]=Gk(r,w),K=rN(y,{replace:o,unstable_mask:d,state:f,target:m,preventScrollReset:p,relative:i,viewTransition:g,unstable_defaultShouldRevalidate:x,unstable_useTransitions:_});function X(Y){t&&t(Y),Y.defaultPrevented||K(Y)}let le=!(L.isExternal||s),F=A.createElement("a",{...w,...P,href:(le?O:void 0)||L.absoluteURL||D,onClick:le?X:t,ref:Qk(k,V),target:m,"data-discover":!E&&n==="render"?"true":void 0});return Z&&!E?A.createElement(A.Fragment,null,F,A.createElement(Yk,{page:D})):F});pi.displayName="Link";var eN=A.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:s,to:o,viewTransition:d,children:f,...m},y){let p=Mc(o,{relative:m.relative}),g=Si(),x=A.useContext(af),{navigator:w,basename:k}=A.useContext(za),j=x!=null&&oN(p)&&d===!0,N=w.encodeLocation?w.encodeLocation(p).pathname:p.pathname,_=g.pathname,E=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;n||(_=_.toLowerCase(),E=E?E.toLowerCase():null,N=N.toLowerCase()),E&&k&&(E=el(E,k)||E);const L=N!=="/"&&N.endsWith("/")?N.length-1:N.length;let D=_===N||!i&&_.startsWith(N)&&_.charAt(L)==="/",T=E!=null&&(E===N||!i&&E.startsWith(N)&&E.charAt(N.length)==="/"),O={isActive:D,isPending:T,isTransitioning:j},Z=D?t:void 0,V;typeof r=="function"?V=r(O):V=[r,D?"active":null,T?"pending":null,j?"transitioning":null].filter(Boolean).join(" ");let P=typeof s=="function"?s(O):s;return A.createElement(pi,{...m,"aria-current":Z,className:V,ref:y,style:P,to:o,viewTransition:d},typeof f=="function"?f(O):f)});eN.displayName="NavLink";var tN=A.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:s,method:o=Sd,action:d,onSubmit:f,relative:m,preventScrollReset:y,viewTransition:p,unstable_defaultShouldRevalidate:g,...x},w)=>{let{unstable_useTransitions:k}=A.useContext(za),j=lN(),N=sN(d,{relative:m}),_=o.toLowerCase()==="get"?"get":"post",E=typeof d=="string"&&b6.test(d),L=D=>{if(f&&f(D),D.defaultPrevented)return;D.preventDefault();let T=D.nativeEvent.submitter,O=(T==null?void 0:T.getAttribute("formmethod"))||o,Z=()=>j(T||D.currentTarget,{fetcherKey:t,method:O,navigate:n,replace:i,state:s,relative:m,preventScrollReset:y,viewTransition:p,unstable_defaultShouldRevalidate:g});k&&n!==!1?A.startTransition(()=>Z()):Z()};return A.createElement("form",{ref:w,method:_,action:N,onSubmit:r?f:L,...x,"data-discover":!E&&e==="render"?"true":void 0})});tN.displayName="Form";function nN(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function w6(e){let t=A.useContext(Zo);return _n(t,nN(e)),t}function rN(e,{target:t,replace:n,unstable_mask:r,state:i,preventScrollReset:s,relative:o,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:m}={}){let y=lf(),p=Si(),g=Mc(e,{relative:o});return A.useCallback(x=>{if(Lk(x,t)){x.preventDefault();let w=n!==void 0?n:uc(p)===uc(g),k=()=>y(e,{replace:w,unstable_mask:r,state:i,preventScrollReset:s,relative:o,viewTransition:d,unstable_defaultShouldRevalidate:f});m?A.startTransition(()=>k()):k()}},[p,y,g,n,r,i,t,e,s,o,d,f,m])}var aN=0,iN=()=>`__${String(++aN)}__`;function lN(){let{router:e}=w6("useSubmit"),{basename:t}=A.useContext(za),n=Nk(),r=e.fetch,i=e.navigate;return A.useCallback(async(s,o={})=>{let{action:d,method:f,encType:m,formData:y,body:p}=Ok(s,t);if(o.navigate===!1){let g=o.fetcherKey||iN();await r(g,n,o.action||d,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:y,body:p,formMethod:o.method||f,formEncType:o.encType||m,flushSync:o.flushSync})}else await i(o.action||d,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:y,body:p,formMethod:o.method||f,formEncType:o.encType||m,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[r,i,t,n])}function sN(e,{relative:t}={}){let{basename:n}=A.useContext(za),r=A.useContext(wi);_n(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),s={...Mc(e||".",{relative:t})},o=Si();if(e==null){s.search=o.search;let d=new URLSearchParams(s.search),f=d.getAll("index");if(f.some(y=>y==="")){d.delete("index"),f.filter(p=>p).forEach(p=>d.append("index",p));let y=d.toString();s.search=y?`?${y}`:""}}return(!e||e===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:yi([n,s.pathname])),uc(s)}function oN(e,{relative:t}={}){let n=A.useContext(f6);_n(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=w6("useViewTransitionState"),i=Mc(e,{relative:t});if(!n.isTransitioning)return!1;let s=el(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=el(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ld(i.pathname,o)!=null||Ld(i.pathname,s)!=null}r6();const uN={serviceOnline:!1,systemInfo:null,environment:null,settings:null,videos:[],error:""};function _o(e){const t=String(e||"").trim().toLowerCase();return t==="gpu"?"cuda":t==="auto"||t==="cuda"||t==="cpu"?t:"cpu"}function K0(e){const t=_o(e);return t==="cuda"?"GPU (CUDA)":t==="auto"?"自动选择":"CPU"}function cN({transcriptionProvider:e,whisperDevice:t,cudaAvailable:n,hasSettings:r}){return String(e||"").trim().toLowerCase()==="siliconflow"?"云端":_o(t)==="cuda"||!r&&n?"GPU":"CPU"}function S6(e,t){if(!e)return{checked:!1,state:"ready",isConfigured:!0,hasBlockingIssues:!1,issues:[],blockingIssues:[],summary:"正在读取当前配置。",actionText:"前往设置"};const n=[],r=String(e.transcription_provider||"").trim().toLowerCase(),i=!!e.knowledge_enabled,s=String(e.knowledge_llm_mode||"same_as_main").trim().toLowerCase()==="custom",o=s?!!(e.knowledge_llm_enabled&&String(e.knowledge_llm_base_url||"").trim()&&String(e.knowledge_llm_model||"").trim()):!!(e.llm_enabled&&String(e.llm_base_url||"").trim()&&String(e.llm_model||"").trim());r==="siliconflow"&&!e.siliconflow_asr_api_key_configured&&n.push({key:"siliconflow_asr_api_key",title:"缺少语音识别 API Key",description:"当前使用 SiliconFlow 转写,但还没有填写 API Key,无法开始视频转写。",severity:"critical"}),r==="local"&&(t==null?void 0:t.localAsrAvailable)===!1&&n.push({key:"local_asr_runtime",title:"本地 ASR 运行时未就绪",description:"当前使用本地转写,但本地 ASR 尚未安装或当前运行时不可用,请先安装本地 ASR 或切回云端转写。",severity:"critical"});const d=[];e.llm_enabled&&(e.llm_api_key_configured||d.push("API Key"),String(e.llm_base_url||"").trim()||d.push("Base URL"),String(e.llm_model||"").trim()||d.push("模型名")),d.length>0&&n.push({key:"llm_configuration",title:"LLM 配置未补全",description:`当前已启用 LLM,但以下项目仍为空:${d.join("、")}。摘要会回退为本地规则模式。`,severity:"warning"}),e.auto_generate_mindmap&&!e.llm_enabled&&n.push({key:"auto_mindmap_requires_llm",title:"自动导图依赖 LLM",description:"你已开启自动生成思维导图,但当前 LLM 处于关闭状态,导图不会自动生成。",severity:"warning"}),i&&t&&t.knowledgeDependenciesReady===!1&&n.push({key:"knowledge_dependencies",title:"缺少知识库依赖",description:"当前运行时缺少 chromadb 或 sentence-transformers,无法构建知识库索引。",severity:"warning"}),i&&!o&&n.push({key:"knowledge_llm_configuration",title:"知识库 LLM 未补全",description:s?"知识库当前使用独立 LLM,但还没有补全启用状态、Base URL 或模型名,自动打标和问答暂不可用。":"知识库当前跟随主 LLM;请先启用主 LLM,并补全 Base URL 与模型名。",severity:"warning"});const f=n.filter(g=>g.severity==="critical"),m=f.length>0,y=m?"critical":n.length>0?"warning":"ready",p=m?`当前有 ${f.length} 项关键配置缺失,开始总结前需要先补全。`:n.length>0?`当前有 ${n.length} 项增强能力待补全,不影响基础流程但会影响体验。`:"当前运行配置完整,可以直接开始总结。";return{checked:!0,state:y,isConfigured:n.length===0,hasBlockingIssues:m,issues:n,blockingIssues:f,summary:p,actionText:m?"前往设置补全配置":"前往设置优化配置"}}function Z0(e,t){return!e.checked||!t?!1:t.settings_file_exists===!1&&e.issues.length>0}function Vu(e){return{status:e.status,version:e.version,releaseDate:e.releaseDate,releaseNotes:e.releaseNotes,downloadProgress:e.downloadProgress,errorMessage:e.errorMessage}}function dN(e){return e.status!=="available"&&e.status!=="downloaded"?null:`${e.status}:${e.version||"unknown"}`}function _c(e){return e.status==="not-available"&&!!e.errorMessage}function fN(e){if(_c(e))return"不可用";switch(e.status){case"checking":return"检查中";case"available":return"发现新版本";case"not-available":return"已是最新";case"downloading":return"下载中";case"downloaded":return"待安装";case"installing":return"安装中";case"error":return"检查失败";default:return"未检查"}}function hN(e){if(_c(e))return"failed";switch(e.status){case"available":case"downloaded":return"success";case"checking":case"downloading":case"installing":return"running";case"error":return"failed";default:return"pending"}}function mN(e,t){const n=t;if(_c(e))return e.errorMessage||"当前环境不支持自动更新。";switch(e.status){case"checking":return`正在检查更新,当前版本 v${n}。`;case"available":return`发现新版本 v${e.version||"-"},当前版本 v${n}。`;case"not-available":return`当前版本 v${n} 已是最新版本。`;case"downloading":return`正在下载 v${e.version||"-"},进度 ${Math.round(e.downloadProgress)}%。`;case"downloaded":return`v${e.version||"-"} 已下载完成,可立即安装。`;case"installing":return`正在安装 v${e.version||"-"}。`;case"error":return e.errorMessage||"检查更新失败,请稍后重试。";default:return`当前版本 v${n},尚未检查更新。`}}function pN(e){if(!e)return"-";const t=new Date(e);return Number.isNaN(t.getTime())?e:`${t.getFullYear()}.${String(t.getMonth()+1).padStart(2,"0")}.${String(t.getDate()).padStart(2,"0")}`}function k6(e){return e&&{bilibili:"Bilibili",youtube:"YouTube",local:"本地"}[e.toLowerCase()]||"Video"}function Gu(e){return e&&{queued:"排队中",downloading:"下载中",transcribing:"转写中",summarizing:"总结中",mindmap_queued:"导图待生成",mindmap_llm_request:"调用 LLM 中",mindmap_generating:"导图生成中",mindmap_completed:"导图完成",mindmap_failed:"导图失败",completed:"已完成",failed:"失败"}[e]||"待开始"}function Gl(e){return e==="completed"?"status-success":e==="running"?"status-running":e==="failed"?"status-failed":"status-pending"}function qv(e){return e==="completed"?"completed":e==="failed"?"error":e==="mindmap_completed"?"completed":e==="mindmap_failed"?"error":e==="summarizing"||e==="transcribing"||e==="downloading"||e==="mindmap_queued"||e==="mindmap_llm_request"||e==="mindmap_generating"?"active":""}async function vt(e,t){const n=await fetch(e,t);if(!n.ok){const r=await n.text();let i=r||`Request failed: ${n.status}`;try{const s=JSON.parse(r);i=s.detail||s.message||i}catch{i=r||`Request failed: ${n.status}`}throw new Error(i)}return n.json()}function gN(e){const t=e.split(/\r?\n/);let n="message";const r=[];for(const i of t){const s=i.trimEnd();if(!(!s||s.startsWith(":"))){if(s.startsWith("event:")){n=s.slice(6).trim()||"message";continue}s.startsWith("data:")&&r.push(s.slice(5).trimStart())}}return r.length?{event:n,data:r.join(`
|
|
61
|
+
`)}:null}const Ke={getHealth(){return vt("/health")},getSystemInfo(e){const t=new URL("/api/v1/system/info",window.location.origin);return e!=null&&e.runtimeChannel&&t.searchParams.set("runtime_channel",e.runtimeChannel),e!=null&&e.refresh&&t.searchParams.set("refresh","1"),vt(t.toString())},getEnvironment(e){const t=new URL("/api/v1/environment",window.location.origin);return e!=null&&e.runtimeChannel&&t.searchParams.set("runtime_channel",e.runtimeChannel),e!=null&&e.refresh&&t.searchParams.set("refresh","1"),vt(t.toString())},getRuntimeStatus(){return vt("/api/v1/runtime/status")},syncRuntime(e){return vt("/api/v1/runtime/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e??{})})},getSettings(){return vt("/api/v1/settings")},getAppUpdate(){return vt("/api/v1/app/update")},updateSettings(e){return vt("/api/v1/settings",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})},testLlmConnection(e){return vt("/api/v1/llm/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})},testAsrConnection(e){return vt("/api/v1/asr/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})},getSystemLogs(e=200){return vt(`/api/v1/system/logs?lines=${e}`)},shutdownService(){return vt("/api/v1/system/shutdown",{method:"POST"})},listVideos(){return vt("/api/v1/videos")},getVideo(e){return vt(`/api/v1/videos/${e}`)},setVideoFavorite(e,t){return vt(`/api/v1/videos/${e}/favorite`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})},deleteVideo(e){return vt(`/api/v1/videos/${e}`,{method:"DELETE"})},probeVideo(e){return vt("/api/v1/videos/probe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})},uploadLocalVideo(e){const t=new URL("/api/v1/videos/upload",window.location.origin);return t.searchParams.set("filename",e.name),vt(t.toString(),{method:"POST",headers:{"Content-Type":e.type||"application/octet-stream"},body:e})},getVideoTasks(e){return vt(`/api/v1/videos/${e}/tasks`)},createVideoTask(e,t){return vt(`/api/v1/videos/${e}/tasks`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t??{})})},createVideoTasksBatch(e,t){return vt(`/api/v1/videos/${e}/tasks/batch`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})},resummarizeVideoTask(e,t){return vt(`/api/v1/videos/${e}/tasks/resummary`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})},resummarizeVideoTasksBatch(e,t){return vt(`/api/v1/videos/${e}/tasks/resummary/batch`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})},createAggregateSummaryTask(e,t){return vt(`/api/v1/videos/${e}/tasks/aggregate-summary`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t??{})})},getTaskResult(e){return vt(`/api/v1/tasks/${e}/result`)},getTaskEvents(e){return vt(`/api/v1/tasks/${e}/events`)},listTasks(){return vt("/api/v1/tasks")},getTaskMindMap(e){return vt(`/api/v1/tasks/${e}/mindmap`)},exportTaskMarkdown(e,t){return vt(`/api/v1/tasks/${e}/exports/markdown`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t??{})})},generateTaskMindMap(e,t){const n=new URL(`/api/v1/tasks/${e}/mindmap`,window.location.origin);return t!=null&&t.force&&n.searchParams.set("force","1"),vt(n.toString(),{method:"POST"})},deleteTask(e){return vt(`/api/v1/tasks/${e}`,{method:"DELETE"})},installCuda(e){return vt("/api/v1/cuda/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})},installLocalAsr(e){return vt("/api/v1/asr/local/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e??{})})},installKnowledgeDependencies(e){return vt("/api/v1/knowledge/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e??{})})},createTaskEventSource(e,t){const n=new URL(`/api/v1/tasks/${e}/events/stream`,window.location.origin);return t&&n.searchParams.set("after",t),new EventSource(n.toString())},getKnowledgeTags(e){const t=new URL("/api/v1/knowledge/tags",window.location.origin);return e&&t.searchParams.set("video_id",e),vt(t.toString())},addKnowledgeTag(e){return vt("/api/v1/knowledge/tags",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})},deleteKnowledgeTag(e,t){return vt(`/api/v1/knowledge/tags/${encodeURIComponent(e)}/${encodeURIComponent(t)}`,{method:"DELETE"})},autoTagKnowledge(e){return vt("/api/v1/knowledge/auto-tag",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e??{})})},getKnowledgeNetwork(e){const t=new URL("/api/v1/knowledge/network",window.location.origin);for(const n of(e==null?void 0:e.selectedTags)||[])n&&t.searchParams.append("selected_tag",n);return e!=null&&e.maxTags&&t.searchParams.set("max_tags",String(e.maxTags)),e!=null&&e.maxVideos&&t.searchParams.set("max_videos",String(e.maxVideos)),vt(t.toString())},searchKnowledge(e){return vt("/api/v1/knowledge/search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})},askKnowledge(e){return vt("/api/v1/knowledge/ask",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})},async streamKnowledgeAsk(e,t,n){var d,f,m,y,p;const r=await fetch("/api/v1/knowledge/ask/stream",{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify(e),signal:n==null?void 0:n.signal});if(!r.ok){const g=await r.text();throw new Error(g||`Request failed: ${r.status}`)}if(!r.body)throw new Error("浏览器不支持流式响应。");const i=r.body.getReader(),s=new TextDecoder;let o="";for(;;){const{done:g,value:x}=await i.read();o+=s.decode(x,{stream:!g});const w=o.split(`
|
|
62
|
+
|
|
63
|
+
`);o=w.pop()??"";for(const k of w){const j=gN(k);if(!j)continue;let N=j.data;try{N=JSON.parse(j.data)}catch{N=j.data}switch(j.event){case"tool":(d=t.onTool)==null||d.call(t,N);break;case"text_delta":(f=t.onTextDelta)==null||f.call(t,String(N.delta||""));break;case"sources":(m=t.onSources)==null||m.call(t,N.sources||[]);break;case"done":(y=t.onDone)==null||y.call(t,N);break;case"error":(p=t.onError)==null||p.call(t,String(N.message||"流式问答失败"));break}}if(g)break}},getKnowledgeStats(){return vt("/api/v1/knowledge/stats")},rebuildKnowledgeIndex(){return vt("/api/v1/knowledge/rebuild-index",{method:"POST"})}};function yN(){return c.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1"}),c.jsx("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1"}),c.jsx("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1"}),c.jsx("rect",{x:"14",y:"14",width:"7",height:"7",rx:"1"})]})}function vN(){return c.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:c.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})})}function Uv(){return c.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("ellipse",{cx:"12",cy:"5",rx:"8",ry:"3"}),c.jsx("path",{d:"M4 5v6c0 1.66 3.58 3 8 3s8-1.34 8-3V5"}),c.jsx("path",{d:"M4 11v6c0 1.66 3.58 3 8 3s8-1.34 8-3v-6"})]})}function xN(){return c.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"}),c.jsx("rect",{x:"9",y:"9",width:"6",height:"6"}),c.jsx("path",{d:"M9 1v3M15 1v3M9 20v3M15 20v3M20 9h3M20 14h3M1 9h3M1 14h3"})]})}function bN(){return c.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("rect",{x:"3",y:"11",width:"18",height:"10",rx:"2"}),c.jsx("circle",{cx:"12",cy:"5",r:"2"}),c.jsx("path",{d:"M12 7v4"}),c.jsx("line",{x1:"8",y1:"16",x2:"8",y2:"16"}),c.jsx("line",{x1:"16",y1:"16",x2:"16",y2:"16"})]})}function wN(){return c.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),c.jsx("polyline",{points:"14 2 14 8 20 8"}),c.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),c.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"}),c.jsx("polyline",{points:"10 9 9 9 8 9"})]})}function Iv(){return c.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("line",{x1:"4",y1:"21",x2:"4",y2:"14"}),c.jsx("line",{x1:"4",y1:"10",x2:"4",y2:"3"}),c.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"12"}),c.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"3"}),c.jsx("line",{x1:"20",y1:"21",x2:"20",y2:"16"}),c.jsx("line",{x1:"20",y1:"12",x2:"20",y2:"3"}),c.jsx("line",{x1:"1",y1:"14",x2:"7",y2:"14"}),c.jsx("line",{x1:"9",y1:"8",x2:"15",y2:"8"}),c.jsx("line",{x1:"17",y1:"16",x2:"23",y2:"16"})]})}function SN(){return c.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2"}),c.jsx("line",{x1:"8",y1:"21",x2:"16",y2:"21"}),c.jsx("line",{x1:"12",y1:"17",x2:"12",y2:"21"})]})}function kN(){return c.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("polyline",{points:"4 17 10 11 4 5"}),c.jsx("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]})}function NN(e){return c.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[c.jsx("path",{d:"M3.5 7.5A2.5 2.5 0 0 1 6 5h12a2.5 2.5 0 0 1 2.5 2.5v9A2.5 2.5 0 0 1 18 19H6a2.5 2.5 0 0 1-2.5-2.5v-9Z"}),c.jsx("path",{d:"M7.5 9h9"}),c.jsx("path",{d:"M7.5 13h6"}),c.jsx("path",{d:"M7.5 16h4"})]})}function jN(e){return c.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[c.jsx("path",{d:"M7 4.5h10A2.5 2.5 0 0 1 19.5 7v10a2.5 2.5 0 0 1-2.5 2.5H7A2.5 2.5 0 0 1 4.5 17V7A2.5 2.5 0 0 1 7 4.5Z"}),c.jsx("path",{d:"M12 7.5v9"}),c.jsx("path",{d:"M8 10.5h8"}),c.jsx("path",{d:"M8 13.5h5"})]})}function G1(e){return c.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[c.jsx("path",{d:"M12 8.25A3.75 3.75 0 1 0 12 15.75A3.75 3.75 0 1 0 12 8.25Z"}),c.jsx("path",{d:"M19.4 15a1 1 0 0 0 .2 1.1l.1.1a2 2 0 0 1-2.8 2.8l-.1-.1a1 1 0 0 0-1.1-.2 1 1 0 0 0-.6.9V20a2 2 0 0 1-4 0v-.1a1 1 0 0 0-.6-.9 1 1 0 0 0-1.1.2l-.1.1a2 2 0 0 1-2.8-2.8l.1-.1A1 1 0 0 0 6 15.3a1 1 0 0 0-.9-.6H5a2 2 0 0 1 0-4h.1a1 1 0 0 0 .9-.6 1 1 0 0 0-.2-1.1l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1 1 0 0 0 1.1.2h.1a1 1 0 0 0 .6-.9V4a2 2 0 0 1 4 0v.1a1 1 0 0 0 .6.9h.1a1 1 0 0 0 1.1-.2l.1-.1a2 2 0 0 1 2.8 2.8l-.1.1a1 1 0 0 0-.2 1.1v.1a1 1 0 0 0 .9.6h.1a2 2 0 0 1 0 4h-.1a1 1 0 0 0-.9.6V15Z"})]})}function CN(e){return c.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[c.jsx("path",{d:"M3 10.5L12 3l9 7.5V20a1.5 1.5 0 0 1-1.5 1.5H4.5A1.5 1.5 0 0 1 3 20V10.5Z"}),c.jsx("path",{d:"M9 21.5V12.5h6v9"})]})}function EN(e){return c.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[c.jsx("path",{d:"M10 13.5L14 9.5"}),c.jsx("path",{d:"M8.25 16.25L6.5 18a3 3 0 1 1-4.24-4.24L4 12"}),c.jsx("path",{d:"M15.75 7.75L17.5 6a3 3 0 1 1 4.24 4.24L20 12"}),c.jsx("path",{d:"M8 12L6.75 13.25a3.5 3.5 0 0 0 4.95 4.95L13 17"}),c.jsx("path",{d:"M16 12L17.25 10.75a3.5 3.5 0 0 0-4.95-4.95L11 7"})]})}function MN(e){return c.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[c.jsx("path",{d:"M3.75 7.25A2.25 2.25 0 0 1 6 5h12a2.25 2.25 0 0 1 2.25 2.25v9.5A2.25 2.25 0 0 1 18 19H6a2.25 2.25 0 0 1-2.25-2.25Z"}),c.jsx("path",{d:"m10 9 5 3-5 3z"}),c.jsx("path",{d:"M7.5 3.75h9"})]})}function Y1(e){return c.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[c.jsx("circle",{cx:"11",cy:"11",r:"6.5"}),c.jsx("path",{d:"M16 16L20 20"})]})}const _N={amp:"&",apos:"'",gt:">",hellip:"...",lt:"<",nbsp:" ",quot:'"'};function hi(e){if(!e)return"-";const t=new Date(e);return Number.isNaN(t.getTime())?e:`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")} ${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`}function mi(e){if(e==null)return"-";const t=Math.max(0,Math.floor(e)),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60;return n>0?`${n}:${String(r).padStart(2,"0")}:${String(i).padStart(2,"0")}`:`${r}:${String(i).padStart(2,"0")}`}function AN(e){if(e==null)return"-";const t=Math.max(0,Math.round(e)),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60;return n>0?`${n}小时${r}分${i}秒`:r>0?`${r}分${i}秒`:`${i}秒`}function N6(e){return e==null?"-":Number(e).toLocaleString("zh-CN")}function Pa(e){return e&&{queued:"排队中",running:"处理中",completed:"已完成",failed:"失败",cancelled:"已取消"}[e]||"未开始"}function Pv(e){const t=[],n=new Map;for(const g of e){if(g.stage==="downloading"||g.stage==="transcribing"){const x=n.get(g.stage);x==null?(t.push(g),n.set(g.stage,t.length-1)):t[x]=g;continue}t.push(g)}let r=null,i=null;const s=e.at(-1)??null,o=(s==null?void 0:s.stage)??null,d=o==="mindmap_llm_request"||o==="mindmap_generating",f=o==="mindmap_failed",m=o==="mindmap_completed";for(const g of e){if(g.stage==="failed"||g.stage==="mindmap_failed"){i=g;continue}r=g}const y=m?!0:d||f?!1:e.some(g=>g.stage==="completed"),p=d?(s==null?void 0:s.progress)??(r==null?void 0:r.progress)??0:i?i.progress:y?100:(r==null?void 0:r.progress)??0;return{filtered:t,currentEvent:r,failedEvent:i,progress:p,isCompleted:y,hasError:!!i}}function Yp(e){const t=String(e||""),n=TN(t),r=zN(n).replace(/\r\n?/g,`
|
|
64
|
+
`),i=DN(r);return LN(i).split(`
|
|
65
|
+
`).map(o=>RN(o)).join(`
|
|
66
|
+
`)}function j6(e,t=""){const n=Yp(e).trim();if(!n)return Fv(t);const r=$N(n);return HN(r)?Fv(t)||r||n:r}function TN(e){return e.replace(/\f(?=[A-Za-z])/g,"\\f").replace(/\v/g," ").replace(/\u0000/g,"")}function zN(e){const t=(e.match(/\\n/g)||[]).length,n=(e.match(/\n/g)||[]).length;return t===0||n>t?e:e.replace(/\\n/g,`
|
|
67
|
+
`).replace(/\\t/g," ")}function DN(e){return e.replace(/&(#x?[0-9a-fA-F]+|[a-zA-Z]+);/g,(t,n)=>{const r=_N[n.toLowerCase()];if(r!=null)return r;if(n.startsWith("#x")||n.startsWith("#X")){const i=Number.parseInt(n.slice(2),16);return Number.isFinite(i)?String.fromCodePoint(i):t}if(n.startsWith("#")){const i=Number.parseInt(n.slice(1),10);return Number.isFinite(i)?String.fromCodePoint(i):t}return t})}function LN(e){return e.replace(/\\([*#>`])/g,"$1").replace(/==\s*(\*\*[^*\n]+\*\*)\s*==/g,"$1").replace(/(\*\*[^*\n]+\*\*)\s*==(?=$|[\s,。;;::!?!?])/g,"$1").replace(/==\s*([^=\n]{1,80}?)\s*==/g,"**$1**")}function RN(e){if(!e.trim()||e.includes("```"))return e;if(BN(e))return IN(e);const n=qN(ON(e)).replace(/\\\(/g,"$").replace(/\\\)/g,"$").replace(/\\\[/g,"$$").replace(/\\\]/g,"$$"),r=UN(n);return r!==n?r:n.includes("$$")?n:FN(n)}function BN(e){const t=e.trim();return t.startsWith("|")?t.split("|").length>=3:(e.match(/\s\|\s/g)||[]).length>=2}function ON(e){return e.replace(/\|\$([^$]+)\$\|/g,"\\lvert $1 \\rvert").replace(/([“"'`])((?:\\[A-Za-z]+|[A-Za-z0-9{}_^]+)[^“"'`\n]*?)\1/g,(t,n,r)=>{if(!/[\\{}_^]/.test(r)||r.includes("$"))return t;const i=r.replace(new RegExp("(?<=\\b\\w|\\}|])\\s+o\\s+(?=\\d|\\\\|\\w)","g")," \\to ");return`${n}$${i.trim()}$${n}`})}function $N(e){let t=e.trim();for(let n=0;n<2;n+=1)t=t.replace(/\\[A-Za-z]{1,5}$/g,"").replace(/\$([^$\n]{1,120})\$\s*([^\s$,。;;::!?!?]+)(?=$|[\s,。;;::!?!?])/g,(r,i,s)=>/[\\_^(){}\d]/.test(s)?`$${i} ${s.trim()}$`:`$${i}$${s}`).replace(/\s{2,}/g," ").trim();return t}function HN(e){const t=e.trim();if(!t)return!1;if((t.match(/\$/g)||[]).length%2===1||/\\[A-Za-z]{1,5}$/.test(t))return!0;const r=t.split(/(\${1,2}[\s\S]*?\${1,2})/g);let i=!1;for(let s=0;s<r.length;s+=1){const o=r[s];if(o){if(s%2===1){i=!0;continue}if(i&&/[\\_^{}]/.test(o))return!0}}return!1}function Fv(e){var s;const t=Yp(e).replace(/\[(.*?)\]\((.*?)\)/g,"$1").replace(/\${1,2}([\s\S]*?)\${1,2}/g,"$1").replace(/[`*_>#~-]/g," ").replace(/\s+/g," ").trim();if(!t)return"";const n=((s=t.split(/[。;;!!??\n]/,1)[0])==null?void 0:s.trim())||t;if(n.length<=22)return n;const r=n.slice(0,22),i=r.search(/[,,、::\s][^,,、::\s]*$/);return(i>8?r.slice(0,i):r).trim()}function qN(e){let t=e.replace(/\${3,}/g,"$$");return(t.match(/\$\$/g)||[]).length%2===1&&(t=`${t}$$`),(t.match(/\$/g)||[]).length%2===1&&t.trimEnd().endsWith("$")&&!t.trimStart().startsWith("$")?t.replace(/\$(\s*)$/,"$1"):t}function UN(e){var o,d;const t=e.trim();if(!t||t.includes("$")||t.startsWith("#")||t.startsWith("- ")||/^\d+\.\s/.test(t))return e;const n=(t.match(/\\[A-Za-z]+/g)||[]).length,r=(t.match(/[∀∃ε∈∞]|\\(?:forall|exists|varepsilon|in|mathbb|lim|to|text|frac|cdot|iff|Rightarrow|rightarrow)/g)||[]).length;if(n<2||r<2)return e;const i=((o=e.match(/^\s*/))==null?void 0:o[0])??"",s=((d=e.match(/\s*$/))==null?void 0:d[0])??"";return`${i}$${t}$${s}`}function IN(e){const t=e.trim();if(!t.includes("|")||/^[:\-\s|]+$/.test(t))return e;const n=e.split("|");return n.map((i,s)=>{var m,y;if((s===0||s===n.length-1)&&i.trim()==="")return i;const o=((m=i.match(/^\s*/))==null?void 0:m[0])??"",d=((y=i.match(/\s*$/))==null?void 0:y[0])??"",f=i.trim();return!PN(f)||f.includes("$")?i:`${o}$${f}$${d}`}).join("|")}function PN(e){return!e||/[\u4e00-\u9fff]/.test(e)?!1:/\\[A-Za-z]+|[_^=]/.test(e)}function FN(e){return e.split(/(\${1,2}[\s\S]*?\${1,2})/g).map((n,r)=>r%2===1?n:VN(n)).join("")}function VN(e){return e.replace(/(^|[\s((\[【"'“‘::,,])((?:\\[A-Za-z]+(?:\{[^{}\n]+\}){0,2}|\\\{[^{}\n]+\\\}|[A-Za-z][A-Za-z0-9]*_[A-Za-z0-9{}]+|[A-Za-z][A-Za-z0-9]*\^\{?[^{}\s]+\}?)(?:\s*(?:=|\+|-|\*|\/|\\to)\s*(?:\\[A-Za-z]+(?:\{[^{}\n]+\}){0,2}|\\\{[^{}\n]+\\\}|[A-Za-z0-9{}_^.+\-\/()]+))*)(?=$|[\s))\]】"'”’::,,。;;!?!?])/g,(t,n,r)=>`${n}$${r}$`)}function GN(e){return e==="completed"?"已完成":e==="in_progress"?"进行中":e==="failed"?"失败":"未开始"}function YN(e){return e==="completed"?"status-success":e==="in_progress"?"status-running":e==="failed"?"status-failed":"status-pending"}function C6({isOpen:e,mode:t,video:n,pages:r,onClose:i,onSubmit:s}){var O,Z;const[o,d]=A.useState([]),[f,m]=A.useState(null),[y,p]=A.useState(!1);A.useEffect(()=>{e||(d([]),m(null),p(!1))},[e]);const g=A.useMemo(()=>new Set(o),[o]),x=o.length,k=((O=A.useMemo(()=>r.filter(V=>g.has(V.page)),[r,g])[0])==null?void 0:O.cover_url)||((Z=r[0])==null?void 0:Z.cover_url)||(n==null?void 0:n.cover_url)||"",j=(f==null?void 0:f.conflict_pages.length)??0,N=(f==null?void 0:f.skipped_pages.length)??0;if(!e||!n)return null;function _(V){m(null),d(P=>P.includes(V)?P.filter(K=>K!==V):[...P,V].sort((K,X)=>K-X))}async function E(V){if(o.length){p(!0);try{const P=await s({pageNumbers:o,confirm:V});P.requires_confirmation&&m(P)}finally{p(!1)}}}const L=t==="create"?"批量选择要生成的分 P":"批量选择要重生成的分 P",D=t==="create"?`共 ${r.length} 个分 P。默认不勾选任何内容,请手动选择后再开始批量生成。`:`共 ${r.length} 个分 P。请选择要复用转写重新生成摘要的内容。`,T=t==="create"?"批量生成摘要":"批量重生成摘要";return c.jsx("div",{className:"update-dialog-overlay",onClick:()=>!y&&i(),children:c.jsxs("div",{className:"update-dialog multi-page-dialog",onClick:V=>V.stopPropagation(),children:[c.jsxs("div",{className:"update-dialog-header",children:[c.jsx("h2",{children:f?"确认批量处理":L}),c.jsx("button",{className:"close-button",onClick:i,"aria-label":"关闭",disabled:y,children:c.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:c.jsx("path",{d:"M2 2L12 12M12 2L2 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})]}),c.jsxs("div",{className:"update-dialog-body multi-page-dialog-body",children:[c.jsxs("div",{className:"multi-page-dialog-hero",children:[k?c.jsx("img",{src:k,alt:n.title}):c.jsx("div",{className:"multi-page-dialog-placeholder","aria-hidden":"true",children:"P"}),c.jsxs("div",{className:"multi-page-dialog-copy",children:[c.jsx("span",{className:"section-kicker",children:t==="create"?"批量生成":"批量重生成"}),c.jsx("strong",{children:n.title}),c.jsx("small",{children:f?"请确认这次批量操作的执行结果。":D})]})]}),f?c.jsxs("div",{className:"multi-page-confirmation",children:[c.jsxs("div",{className:"multi-page-confirmation-summary",children:[c.jsxs("span",{className:"helper-chip",children:["已选 ",x," 个分 P"]}),j?c.jsx("span",{className:"helper-chip",children:t==="create"?`将跳过 ${j} 个`:`将重跑 ${j} 个`}):null,N?c.jsxs("span",{className:"helper-chip",children:["无法处理 ",N," 个"]}):null]}),f.conflict_pages.length?c.jsx("div",{className:"multi-page-confirmation-list",children:f.conflict_pages.map(V=>c.jsxs("article",{className:"multi-page-confirmation-item",children:[c.jsxs("div",{className:"multi-page-confirmation-head",children:[c.jsx("strong",{children:V.page_title||`P${V.page_number}`}),c.jsx("span",{className:`task-status ${V.action==="rerun"?"status-running":"status-pending"}`,children:V.action==="rerun"?"确认重跑":"确认跳过"})]}),c.jsx("small",{children:V.reason||"-"}),V.existing_status?c.jsxs("span",{className:"multi-page-confirmation-meta",children:["当前状态:",Pa(V.existing_status),V.existing_task_id?` · 任务 ${V.existing_task_id.slice(0,8)}`:""]}):null]},`conflict-${V.page_number}`))}):null,f.skipped_pages.length?c.jsx("div",{className:"multi-page-confirmation-list",children:f.skipped_pages.map(V=>c.jsxs("article",{className:"multi-page-confirmation-item is-muted",children:[c.jsxs("div",{className:"multi-page-confirmation-head",children:[c.jsx("strong",{children:V.page_title||`P${V.page_number}`}),c.jsx("span",{className:"task-status status-pending",children:"将跳过"})]}),c.jsx("small",{children:V.reason||"-"})]},`skipped-${V.page_number}`))}):null]}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"multi-page-toolbar",children:[c.jsxs("span",{className:"multi-page-toolbar-copy",children:["已选 ",x," / ",r.length]}),c.jsxs("div",{className:"multi-page-toolbar-actions",children:[c.jsx("button",{className:"secondary-button",type:"button",disabled:y||x===r.length,onClick:()=>{m(null),d(r.map(V=>V.page))},children:"全选"}),c.jsx("button",{className:"secondary-button",type:"button",disabled:y||x===0,onClick:()=>{m(null),d([])},children:"清空"})]})]}),c.jsx("div",{className:"multi-page-list",role:"listbox","aria-label":"视频分 P 列表","aria-multiselectable":"true",children:r.map(V=>{const P=g.has(V.page),K=YN(V.aggregate_status);return c.jsxs("button",{type:"button",className:`multi-page-item ${P?"is-selected":""}`,"aria-selected":P,onClick:()=>_(V.page),children:[c.jsx("span",{className:`multi-page-item-check ${P?"is-selected":""}`,"aria-hidden":"true",children:P?"✓":""}),c.jsxs("span",{className:"multi-page-item-copy",children:[c.jsxs("span",{className:"multi-page-item-topline",children:[c.jsx("strong",{children:V.title}),c.jsx("span",{className:`task-status ${K}`,children:GN(V.aggregate_status)})]}),c.jsxs("small",{children:["P",V.page," · ",mi(V.duration),V.latest_task_status?` · ${Pa(V.latest_task_status)}`:"",V.latest_task_updated_at?` · ${hi(V.latest_task_updated_at)}`:""]})]})]},V.page)})})]})]}),c.jsx("div",{className:"update-dialog-footer",children:f?c.jsxs(c.Fragment,{children:[c.jsx("button",{className:"secondary-button",type:"button",onClick:()=>m(null),disabled:y,children:"返回修改"}),c.jsx("button",{className:"primary-button",type:"button",onClick:()=>void E(!0),disabled:y,children:y?"正在提交...":t==="create"?"确认继续创建":"确认继续重生成"})]}):c.jsxs(c.Fragment,{children:[c.jsx("button",{className:"secondary-button",type:"button",onClick:i,disabled:y,children:"取消"}),c.jsx("button",{className:"primary-button",type:"button",onClick:()=>void E(!1),disabled:!x||y,children:y?"正在提交...":`${T}${x?` (${x})`:""}`})]})})]})})}function XN({isOpen:e,configHealth:t,onClose:n,onOpenSettings:r,onNavigateToIssue:i}){return!e||!t.checked||t.issues.length===0?null:c.jsx("div",{className:"update-dialog-overlay",onClick:n,children:c.jsxs("div",{className:"update-dialog setup-assistant-dialog",onClick:s=>s.stopPropagation(),children:[c.jsxs("div",{className:"update-dialog-header",children:[c.jsx("h2",{children:"首次启动辅助配置"}),c.jsx("button",{className:"close-button",type:"button",onClick:n,"aria-label":"关闭",children:c.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:c.jsx("path",{d:"M2 2L12 12M12 2L2 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})]}),c.jsxs("div",{className:"update-dialog-body setup-assistant-body",children:[c.jsxs("div",{className:`setup-assistant-hero tone-${t.state}`,children:[c.jsx("span",{className:"section-kicker",children:"Setup Assistant"}),c.jsx("strong",{children:t.hasBlockingIssues?"先补全关键配置,才能顺利开始总结":"当前建议先补全增强能力配置"}),c.jsx("p",{children:t.summary})]}),c.jsxs("div",{className:"setup-assistant-sequence",children:[c.jsxs("div",{className:"setup-assistant-step",children:[c.jsx("span",{children:"1"}),c.jsxs("div",{children:[c.jsx("strong",{children:"先补基础转写能力"}),c.jsx("p",{children:"优先保证“云端转写 API Key”或“本地 ASR 运行时”可用,这是开始处理视频的前提。"})]})]}),c.jsxs("div",{className:"setup-assistant-step",children:[c.jsx("span",{children:"2"}),c.jsxs("div",{children:[c.jsx("strong",{children:"再补 LLM 增强能力"}),c.jsx("p",{children:"如果你希望获得更好的摘要和知识笔记,再补齐 LLM 的 Base URL、模型名和 API Key。"})]})]}),c.jsxs("div",{className:"setup-assistant-step",children:[c.jsx("span",{children:"3"}),c.jsxs("div",{children:[c.jsx("strong",{children:"保存后回到首页开始总结"}),c.jsx("p",{children:"完成保存后,运行状态会自动刷新,红色告警也会消失。"})]})]})]}),c.jsx("div",{className:"setup-assistant-issues",children:t.issues.map(s=>c.jsxs("button",{className:`setup-assistant-issue tone-${s.severity==="critical"?"critical":"warning"}`,type:"button",onClick:()=>i(s.key),children:[c.jsx("strong",{children:s.title}),c.jsx("p",{children:s.description})]},s.key))})]}),c.jsxs("div",{className:"update-dialog-footer",children:[c.jsx("button",{className:"secondary-button",type:"button",onClick:n,children:"稍后再说"}),c.jsx("button",{className:t.hasBlockingIssues?"primary-button danger-button":"primary-button",type:"button",onClick:r,children:t.actionText})]})]})})}function KN({darkMode:e,onToggleTheme:t,serviceOnline:n,backendRunning:r,runtimeDeviceLabel:i,version:s,updateState:o,configHealth:d,onOpenSettings:f,onOpenUpdateDialog:m}){var K;const[y,p]=A.useState(!1),[g,x]=A.useState(!1),w=A.useRef(null),k=!!((K=window.desktop)!=null&&K.window);A.useEffect(()=>{async function X(){if(window.desktop){const le=await window.desktop.window.isMaximized();p(le)}}X()},[]),A.useEffect(()=>{function X(le){var F;(F=w.current)!=null&&F.contains(le.target)||x(!1)}return window.addEventListener("mousedown",X),()=>window.removeEventListener("mousedown",X)},[]);function j(X){X.key==="Escape"&&x(!1)}const N=async()=>{if(window.desktop){await window.desktop.window.maximize();const X=await window.desktop.window.isMaximized();p(X)}},_=async()=>{window.desktop&&await window.desktop.window.minimize()},E=async()=>{window.desktop&&await window.desktop.window.close()},L=n?"在线":r?"启动中":"离线",D=["available","downloading","downloaded","installing"].includes(o.status),T=d.checked&&!d.isConfigured,O=T?"配置缺失":D?"有新版本":"运行状态",Z=D?`v${o.version||"-"}`:o.status==="checking"?"检查中":o.status==="error"?"检查失败":"已是最新",V=d.checked?d.hasBlockingIssues?"需立即补全":d.isConfigured?"已就绪":"建议补全":"检测中";function P(){x(!1),m()}return c.jsxs("div",{className:"title-bar",children:[c.jsxs("div",{className:"title-bar-sidebar-brand",children:[c.jsx("div",{className:"title-bar-brand-mark",children:c.jsx("img",{src:"/static/assets/icons/icon.svg",alt:""})}),c.jsx("span",{className:"title-bar-brand-text",children:"BriefVid"})]}),c.jsx("div",{className:"title-bar-drag-region"}),c.jsxs("div",{className:"title-bar-controls",children:[c.jsxs("div",{className:`title-bar-status-wrap ${g?"is-open":""}`,ref:w,onKeyDown:j,children:[c.jsxs("button",{className:`title-bar-status-pill ${T?"is-danger":D?"is-update":n?"is-success":""}`,type:"button",onClick:()=>{x(X=>!X)},"aria-label":"查看运行状态","aria-expanded":g,"aria-haspopup":"dialog",title:"运行状态",children:[c.jsx("span",{className:`title-bar-status-dot ${T?"is-danger":D?"is-update":n?"is-success":r?"is-pending":""}`}),c.jsx("span",{children:O})]}),c.jsxs("div",{className:`title-bar-status-popover ${g?"is-visible":""}`,role:"dialog","aria-label":"运行状态详情",children:[c.jsx("div",{className:"title-bar-status-header",children:c.jsx("h2",{children:"运行状态"})}),c.jsxs("div",{className:"title-bar-status-stack",children:[c.jsxs("div",{className:`sidebar-status-item ${n?"is-success":""}`,children:[c.jsx("span",{children:"服务"}),c.jsx("strong",{children:L})]}),c.jsxs("div",{className:`sidebar-status-item ${d.hasBlockingIssues?"is-danger":d.isConfigured?"is-success":"is-warning"}`,children:[c.jsx("span",{children:"配置"}),c.jsx("strong",{children:V})]}),c.jsxs("button",{className:`sidebar-status-item sidebar-status-item-button ${D?"is-update":""}`,type:"button",onClick:P,children:[c.jsx("span",{children:"更新"}),c.jsx("strong",{children:Z})]}),c.jsxs("div",{className:"sidebar-status-item",children:[c.jsx("span",{children:"设备"}),c.jsx("strong",{children:i})]}),c.jsxs("button",{className:"sidebar-status-item sidebar-status-item-button",type:"button",onClick:P,children:[c.jsx("span",{children:"版本"}),c.jsx("strong",{children:s||"-"})]})]}),T?c.jsxs("div",{className:"title-bar-status-actions",children:[c.jsx("p",{children:d.summary}),c.jsx("button",{className:"secondary-button title-bar-status-action",type:"button",onClick:()=>{var X,le;x(!1),f(((X=d.blockingIssues[0])==null?void 0:X.key)||((le=d.issues[0])==null?void 0:le.key))},children:d.actionText})]}):null]})]}),c.jsx("button",{className:"title-bar-button",type:"button",onClick:t,"aria-label":e?"切换到浅色模式":"切换到深色模式",title:e?"浅色模式":"深色模式",children:e?c.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("circle",{cx:"12",cy:"12",r:"4"}),c.jsx("path",{d:"M12 2.5v2.25M12 19.25v2.25M4.75 12H2.5M21.5 12h-2.25M5.9 5.9 4.3 4.3M19.7 19.7l-1.6-1.6M18.1 5.9l1.6-1.6M4.3 19.7l1.6-1.6"})]}):c.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:c.jsx("path",{d:"M20 15.5A8.5 8.5 0 1 1 12.5 4a6.5 6.5 0 0 0 7.5 11.5Z"})})}),k?c.jsxs(c.Fragment,{children:[c.jsx("button",{className:"title-bar-button",type:"button",onClick:_,"aria-label":"最小化",children:c.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{d:"M2 6H10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),c.jsx("button",{className:"title-bar-button",type:"button",onClick:N,"aria-label":y?"还原":"最大化",children:y?c.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c.jsx("rect",{x:"1.5",y:"3.5",width:"7",height:"7",stroke:"currentColor",strokeWidth:"1.5"}),c.jsx("path",{d:"M3.5 3.5V1.5H9.5V3.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}):c.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("rect",{x:"1.5",y:"1.5",width:"9",height:"9",stroke:"currentColor",strokeWidth:"1.5"})})}),c.jsx("button",{className:"title-bar-button close",type:"button",onClick:E,"aria-label":"关闭",children:c.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{d:"M2 2L10 10M10 2L2 10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}):null]})]})}function Vv(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,s=!1;for(;!s;){r===-1&&(r=n.length,s=!0);const o=n.slice(i,r).trim();(o||!s)&&t.push(o),i=r+1,r=n.indexOf(",",i)}return t}function ZN(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const QN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,WN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,JN={};function Gv(e,t){return(JN.jsx?WN:QN).test(e)}const ej=/[ \t\n\f\r]/g;function tj(e){return typeof e=="object"?e.type==="text"?Yv(e.value):!1:Yv(e)}function Yv(e){return e.replace(ej,"")===""}class Ac{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ac.prototype.normal={};Ac.prototype.property={};Ac.prototype.space=void 0;function E6(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Ac(n,r,t)}function cc(e){return e.toLowerCase()}class Kr{constructor(t,n){this.attribute=n,this.property=t}}Kr.prototype.attribute="";Kr.prototype.booleanish=!1;Kr.prototype.boolean=!1;Kr.prototype.commaOrSpaceSeparated=!1;Kr.prototype.commaSeparated=!1;Kr.prototype.defined=!1;Kr.prototype.mustUseProperty=!1;Kr.prototype.number=!1;Kr.prototype.overloadedBoolean=!1;Kr.prototype.property="";Kr.prototype.spaceSeparated=!1;Kr.prototype.space=void 0;let nj=0;const wt=Hs(),Yn=Hs(),X1=Hs(),De=Hs(),dn=Hs(),Lo=Hs(),oa=Hs();function Hs(){return 2**++nj}const K1=Object.freeze(Object.defineProperty({__proto__:null,boolean:wt,booleanish:Yn,commaOrSpaceSeparated:oa,commaSeparated:Lo,number:De,overloadedBoolean:X1,spaceSeparated:dn},Symbol.toStringTag,{value:"Module"})),Vm=Object.keys(K1);class Xp extends Kr{constructor(t,n,r,i){let s=-1;if(super(t,n),Xv(this,"space",i),typeof r=="number")for(;++s<Vm.length;){const o=Vm[s];Xv(this,Vm[s],(r&K1[o])===K1[o])}}}Xp.prototype.defined=!0;function Xv(e,t,n){n&&(e[t]=n)}function Qo(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new Xp(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[cc(r)]=r,n[cc(s.attribute)]=r}return new Ac(t,n,e.space)}const M6=Qo({properties:{ariaActiveDescendant:null,ariaAtomic:Yn,ariaAutoComplete:null,ariaBusy:Yn,ariaChecked:Yn,ariaColCount:De,ariaColIndex:De,ariaColSpan:De,ariaControls:dn,ariaCurrent:null,ariaDescribedBy:dn,ariaDetails:null,ariaDisabled:Yn,ariaDropEffect:dn,ariaErrorMessage:null,ariaExpanded:Yn,ariaFlowTo:dn,ariaGrabbed:Yn,ariaHasPopup:null,ariaHidden:Yn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:dn,ariaLevel:De,ariaLive:null,ariaModal:Yn,ariaMultiLine:Yn,ariaMultiSelectable:Yn,ariaOrientation:null,ariaOwns:dn,ariaPlaceholder:null,ariaPosInSet:De,ariaPressed:Yn,ariaReadOnly:Yn,ariaRelevant:null,ariaRequired:Yn,ariaRoleDescription:dn,ariaRowCount:De,ariaRowIndex:De,ariaRowSpan:De,ariaSelected:Yn,ariaSetSize:De,ariaSort:null,ariaValueMax:De,ariaValueMin:De,ariaValueNow:De,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function _6(e,t){return t in e?e[t]:t}function A6(e,t){return _6(e,t.toLowerCase())}const rj=Qo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Lo,acceptCharset:dn,accessKey:dn,action:null,allow:null,allowFullScreen:wt,allowPaymentRequest:wt,allowUserMedia:wt,alt:null,as:null,async:wt,autoCapitalize:null,autoComplete:dn,autoFocus:wt,autoPlay:wt,blocking:dn,capture:null,charSet:null,checked:wt,cite:null,className:dn,cols:De,colSpan:null,content:null,contentEditable:Yn,controls:wt,controlsList:dn,coords:De|Lo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:wt,defer:wt,dir:null,dirName:null,disabled:wt,download:X1,draggable:Yn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:wt,formTarget:null,headers:dn,height:De,hidden:X1,high:De,href:null,hrefLang:null,htmlFor:dn,httpEquiv:dn,id:null,imageSizes:null,imageSrcSet:null,inert:wt,inputMode:null,integrity:null,is:null,isMap:wt,itemId:null,itemProp:dn,itemRef:dn,itemScope:wt,itemType:dn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:wt,low:De,manifest:null,max:null,maxLength:De,media:null,method:null,min:null,minLength:De,multiple:wt,muted:wt,name:null,nonce:null,noModule:wt,noValidate:wt,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:wt,optimum:De,pattern:null,ping:dn,placeholder:null,playsInline:wt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:wt,referrerPolicy:null,rel:dn,required:wt,reversed:wt,rows:De,rowSpan:De,sandbox:dn,scope:null,scoped:wt,seamless:wt,selected:wt,shadowRootClonable:wt,shadowRootDelegatesFocus:wt,shadowRootMode:null,shape:null,size:De,sizes:null,slot:null,span:De,spellCheck:Yn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:De,step:null,style:null,tabIndex:De,target:null,title:null,translate:null,type:null,typeMustMatch:wt,useMap:null,value:Yn,width:De,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:dn,axis:null,background:null,bgColor:null,border:De,borderColor:null,bottomMargin:De,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:wt,declare:wt,event:null,face:null,frame:null,frameBorder:null,hSpace:De,leftMargin:De,link:null,longDesc:null,lowSrc:null,marginHeight:De,marginWidth:De,noResize:wt,noHref:wt,noShade:wt,noWrap:wt,object:null,profile:null,prompt:null,rev:null,rightMargin:De,rules:null,scheme:null,scrolling:Yn,standby:null,summary:null,text:null,topMargin:De,valueType:null,version:null,vAlign:null,vLink:null,vSpace:De,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:wt,disableRemotePlayback:wt,prefix:null,property:null,results:De,security:null,unselectable:null},space:"html",transform:A6}),aj=Qo({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:oa,accentHeight:De,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:De,amplitude:De,arabicForm:null,ascent:De,attributeName:null,attributeType:null,azimuth:De,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:De,by:null,calcMode:null,capHeight:De,className:dn,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:De,diffuseConstant:De,direction:null,display:null,dur:null,divisor:De,dominantBaseline:null,download:wt,dx:null,dy:null,edgeMode:null,editable:null,elevation:De,enableBackground:null,end:null,event:null,exponent:De,externalResourcesRequired:null,fill:null,fillOpacity:De,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:Lo,g2:Lo,glyphName:Lo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:De,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:De,horizOriginX:De,horizOriginY:De,id:null,ideographic:De,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:De,k:De,k1:De,k2:De,k3:De,k4:De,kernelMatrix:oa,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:De,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:De,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:De,overlineThickness:De,paintOrder:null,panose1:null,path:null,pathLength:De,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:dn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:De,pointsAtY:De,pointsAtZ:De,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:oa,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:oa,rev:oa,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:oa,requiredFeatures:oa,requiredFonts:oa,requiredFormats:oa,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:De,specularExponent:De,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:De,strikethroughThickness:De,string:null,stroke:null,strokeDashArray:oa,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:De,strokeOpacity:De,strokeWidth:null,style:null,surfaceScale:De,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:oa,tabIndex:De,tableValues:null,target:null,targetX:De,targetY:De,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:oa,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:De,underlineThickness:De,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:De,values:null,vAlphabetic:De,vMathematical:De,vectorEffect:null,vHanging:De,vIdeographic:De,version:null,vertAdvY:De,vertOriginX:De,vertOriginY:De,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:De,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:_6}),T6=Qo({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()}}),z6=Qo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:A6}),D6=Qo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),ij={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"},lj=/[A-Z]/g,Kv=/-[a-z]/g,sj=/^data[-\w.:]+$/i;function L6(e,t){const n=cc(t);let r=t,i=Kr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&sj.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Kv,uj);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Kv.test(s)){let o=s.replace(lj,oj);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Xp}return new i(r,t)}function oj(e){return"-"+e.toLowerCase()}function uj(e){return e.charAt(1).toUpperCase()}const R6=E6([M6,rj,T6,z6,D6],"html"),of=E6([M6,aj,T6,z6,D6],"svg");function Zv(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function cj(e){return e.join(" ").trim()}var xo={},Gm,Qv;function dj(){if(Qv)return Gm;Qv=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,d=/^\s+|\s+$/g,f=`
|
|
68
|
+
`,m="/",y="*",p="",g="comment",x="declaration";function w(j,N){if(typeof j!="string")throw new TypeError("First argument must be a string");if(!j)return[];N=N||{};var _=1,E=1;function L(F){var Y=F.match(t);Y&&(_+=Y.length);var q=F.lastIndexOf(f);E=~q?F.length-q:E+F.length}function D(){var F={line:_,column:E};return function(Y){return Y.position=new T(F),V(),Y}}function T(F){this.start=F,this.end={line:_,column:E},this.source=N.source}T.prototype.content=j;function O(F){var Y=new Error(N.source+":"+_+":"+E+": "+F);if(Y.reason=F,Y.filename=N.source,Y.line=_,Y.column=E,Y.source=j,!N.silent)throw Y}function Z(F){var Y=F.exec(j);if(Y){var q=Y[0];return L(q),j=j.slice(q.length),Y}}function V(){Z(n)}function P(F){var Y;for(F=F||[];Y=K();)Y!==!1&&F.push(Y);return F}function K(){var F=D();if(!(m!=j.charAt(0)||y!=j.charAt(1))){for(var Y=2;p!=j.charAt(Y)&&(y!=j.charAt(Y)||m!=j.charAt(Y+1));)++Y;if(Y+=2,p===j.charAt(Y-1))return O("End of comment missing");var q=j.slice(2,Y-2);return E+=2,L(q),j=j.slice(Y),E+=2,F({type:g,comment:q})}}function X(){var F=D(),Y=Z(r);if(Y){if(K(),!Z(i))return O("property missing ':'");var q=Z(s),Q=F({type:x,property:k(Y[0].replace(e,p)),value:q?k(q[0].replace(e,p)):p});return Z(o),Q}}function le(){var F=[];P(F);for(var Y;Y=X();)Y!==!1&&(F.push(Y),P(F));return F}return V(),le()}function k(j){return j?j.replace(d,p):p}return Gm=w,Gm}var Wv;function fj(){if(Wv)return xo;Wv=1;var e=xo&&xo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xo,"__esModule",{value:!0}),xo.default=n;const t=e(dj());function n(r,i){let s=null;if(!r||typeof r!="string")return s;const o=(0,t.default)(r),d=typeof i=="function";return o.forEach(f=>{if(f.type!=="declaration")return;const{property:m,value:y}=f;d?i(m,y,f):y&&(s=s||{},s[m]=y)}),s}return xo}var Yu={},Jv;function hj(){if(Jv)return Yu;Jv=1,Object.defineProperty(Yu,"__esModule",{value:!0}),Yu.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(m){return!m||n.test(m)||e.test(m)},o=function(m,y){return y.toUpperCase()},d=function(m,y){return"".concat(y,"-")},f=function(m,y){return y===void 0&&(y={}),s(m)?m:(m=m.toLowerCase(),y.reactCompat?m=m.replace(i,d):m=m.replace(r,d),m.replace(t,o))};return Yu.camelCase=f,Yu}var Xu,e5;function mj(){if(e5)return Xu;e5=1;var e=Xu&&Xu.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(fj()),n=hj();function r(i,s){var o={};return!i||typeof i!="string"||(0,t.default)(i,function(d,f){d&&f&&(o[(0,n.camelCase)(d,s)]=f)}),o}return r.default=r,Xu=r,Xu}var pj=mj();const gj=Nc(pj),B6=O6("end"),Kp=O6("start");function O6(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function yj(e){const t=Kp(e),n=B6(e);if(t&&n)return{start:t,end:n}}function rc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?t5(e.position):"start"in e||"end"in e?t5(e):"line"in e||"column"in e?Z1(e):""}function Z1(e){return n5(e&&e.line)+":"+n5(e&&e.column)}function t5(e){return Z1(e&&e.start)+"-"+Z1(e&&e.end)}function n5(e){return e&&typeof e=="number"?e:1}class Sr extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},o=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(o=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const f=r.indexOf(":");f===-1?s.ruleId=r:(s.source=r.slice(0,f),s.ruleId=r.slice(f+1))}if(!s.place&&s.ancestors&&s.ancestors){const f=s.ancestors[s.ancestors.length-1];f&&(s.place=f.position)}const d=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=d?d.line:void 0,this.name=rc(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=o&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Sr.prototype.file="";Sr.prototype.name="";Sr.prototype.reason="";Sr.prototype.message="";Sr.prototype.stack="";Sr.prototype.column=void 0;Sr.prototype.line=void 0;Sr.prototype.ancestors=void 0;Sr.prototype.cause=void 0;Sr.prototype.fatal=void 0;Sr.prototype.place=void 0;Sr.prototype.ruleId=void 0;Sr.prototype.source=void 0;const Zp={}.hasOwnProperty,vj=new Map,xj=/[A-Z]/g,bj=new Set(["table","tbody","thead","tfoot","tr"]),wj=new Set(["td","th"]),$6="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Sj(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Aj(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");r=_j(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,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"?of:R6,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=H6(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function H6(e,t,n){if(t.type==="element")return kj(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Nj(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Cj(e,t,n);if(t.type==="mdxjsEsm")return jj(e,t);if(t.type==="root")return Ej(e,t,n);if(t.type==="text")return Mj(e,t)}function kj(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=of,e.schema=i),e.ancestors.push(t);const s=U6(e,t.tagName,!1),o=Tj(e,t);let d=Wp(e,t);return bj.has(t.tagName)&&(d=d.filter(function(f){return typeof f=="string"?!tj(f):!0})),q6(e,o,s,t),Qp(o,d),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function Nj(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}dc(e,t.position)}function jj(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);dc(e,t.position)}function Cj(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=of,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:U6(e,t.name,!0),o=zj(e,t),d=Wp(e,t);return q6(e,o,s,t),Qp(o,d),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function Ej(e,t,n){const r={};return Qp(r,Wp(e,t)),e.create(t,e.Fragment,r,n)}function Mj(e,t){return t.value}function q6(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Qp(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function _j(e,t,n){return r;function r(i,s,o,d){const m=Array.isArray(o.children)?n:t;return d?m(s,o,d):m(s,o)}}function Aj(e,t){return n;function n(r,i,s,o){const d=Array.isArray(s.children),f=Kp(r);return t(i,s,o,d,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function Tj(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Zp.call(t.properties,i)){const s=Dj(e,i,t.properties[i]);if(s){const[o,d]=s;e.tableCellAlignToStyle&&o==="align"&&typeof d=="string"&&wj.has(t.tagName)?r=d:n[o]=d}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function zj(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const o=s.expression;o.type;const d=o.properties[0];d.type,Object.assign(n,e.evaluater.evaluateExpression(d.argument))}else dc(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const d=r.value.data.estree.body[0];d.type,s=e.evaluater.evaluateExpression(d.expression)}else dc(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function Wp(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:vj;for(;++r<t.children.length;){const s=t.children[r];let o;if(e.passKeys){const f=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(f){const m=i.get(f)||0;o=f+"-"+m,i.set(f,m+1)}}const d=H6(e,s,o);d!==void 0&&n.push(d)}return n}function Dj(e,t,n){const r=L6(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ZN(n):cj(n)),r.property==="style"){let i=typeof n=="object"?n:Lj(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Rj(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?ij[r.property]||r.property:r.attribute,n]}}function Lj(e,t){try{return gj(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Sr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=$6+"#cannot-parse-style-attribute",i}}function U6(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,o;for(;++s<i.length;){const d=Gv(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};o=o?{type:"MemberExpression",object:o,property:d,computed:!!(s&&d.type==="Literal"),optional:!1}:d}r=o}else r=Gv(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Zp.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);dc(e)}function dc(e,t){const n=new Sr("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=$6+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Rj(e){const t={};let n;for(n in e)Zp.call(e,n)&&(t[Bj(n)]=e[n]);return t}function Bj(e){let t=e.replace(xj,Oj);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Oj(e){return"-"+e.toLowerCase()}const Ym={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"]},$j={};function Jp(e,t){const n=$j,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return I6(e,r,i)}function I6(e,t,n){if(Hj(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 r5(e.children,t,n)}return Array.isArray(e)?r5(e,t,n):""}function r5(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=I6(e[i],t,n);return r.join("")}function Hj(e){return!!(e&&typeof e=="object")}const a5=document.createElement("i");function eg(e){const t="&"+e+";";a5.innerHTML=t;const n=a5.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ca(e,t,n,r){const i=e.length;let s=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);s<r.length;)o=r.slice(s,s+1e4),o.unshift(t,0),e.splice(...o),s+=1e4,t+=1e4}function _a(e,t){return e.length>0?(ca(e,e.length,0,t),e):t}const i5={}.hasOwnProperty;function P6(e){const t={};let n=-1;for(;++n<e.length;)qj(t,e[n]);return t}function qj(e,t){let n;for(n in t){const i=(i5.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let o;if(s)for(o in s){i5.call(i,o)||(i[o]=[]);const d=s[o];Uj(i[o],Array.isArray(d)?d:d?[d]:[])}}}function Uj(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ca(e,0,0,r)}function F6(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 Xa(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Tr=ns(/[A-Za-z]/),br=ns(/[\dA-Za-z]/),Ij=ns(/[#-'*+\--9=?A-Z^-~]/);function Rd(e){return e!==null&&(e<32||e===127)}const Q1=ns(/\d/),Pj=ns(/[\dA-Fa-f]/),Fj=ns(/[!-/:-@[-`{-~]/);function Je(e){return e!==null&&e<-2}function sn(e){return e!==null&&(e<0||e===32)}function _t(e){return e===-2||e===-1||e===32}const uf=ns(new RegExp("\\p{P}|\\p{S}","u")),Ls=ns(/\s/);function ns(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Wo(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let o="";if(s===37&&br(e.charCodeAt(n+1))&&br(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(o=String.fromCharCode(s));else if(s>55295&&s<57344){const d=e.charCodeAt(n+1);s<56320&&d>56319&&d<57344?(o=String.fromCharCode(s,d),i=1):o="�"}else o=String.fromCharCode(s);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Ct(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(f){return _t(f)?(e.enter(n),d(f)):t(f)}function d(f){return _t(f)&&s++<i?(e.consume(f),d):(e.exit(n),t(f))}}const Vj={tokenize:Gj};function Gj(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Ct(e,t,"linePrefix")}function i(d){return e.enter("paragraph"),s(d)}function s(d){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,o(d)}function o(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return Je(d)?(e.consume(d),e.exit("chunkText"),s):(e.consume(d),o)}}const Yj={tokenize:Xj},l5={tokenize:Kj};function Xj(e){const t=this,n=[];let r=0,i,s,o;return d;function d(E){if(r<n.length){const L=n[r];return t.containerState=L[1],e.attempt(L[0].continuation,f,m)(E)}return m(E)}function f(E){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&_();const L=t.events.length;let D=L,T;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){T=t.events[D][1].end;break}N(r);let O=L;for(;O<t.events.length;)t.events[O][1].end={...T},O++;return ca(t.events,D+1,0,t.events.slice(L)),t.events.length=O,m(E)}return d(E)}function m(E){if(r===n.length){if(!i)return g(E);if(i.currentConstruct&&i.currentConstruct.concrete)return w(E);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(l5,y,p)(E)}function y(E){return i&&_(),N(r),g(E)}function p(E){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,w(E)}function g(E){return t.containerState={},e.attempt(l5,x,w)(E)}function x(E){return r++,n.push([t.currentConstruct,t.containerState]),g(E)}function w(E){if(E===null){i&&_(),N(0),e.consume(E);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),k(E)}function k(E){if(E===null){j(e.exit("chunkFlow"),!0),N(0),e.consume(E);return}return Je(E)?(e.consume(E),j(e.exit("chunkFlow")),r=0,t.interrupt=void 0,d):(e.consume(E),k)}function j(E,L){const D=t.sliceStream(E);if(L&&D.push(null),E.previous=s,s&&(s.next=E),s=E,i.defineSkip(E.start),i.write(D),t.parser.lazy[E.start.line]){let T=i.events.length;for(;T--;)if(i.events[T][1].start.offset<o&&(!i.events[T][1].end||i.events[T][1].end.offset>o))return;const O=t.events.length;let Z=O,V,P;for(;Z--;)if(t.events[Z][0]==="exit"&&t.events[Z][1].type==="chunkFlow"){if(V){P=t.events[Z][1].end;break}V=!0}for(N(r),T=O;T<t.events.length;)t.events[T][1].end={...P},T++;ca(t.events,Z+1,0,t.events.slice(O)),t.events.length=T}}function N(E){let L=n.length;for(;L-- >E;){const D=n[L];t.containerState=D[1],D[0].exit.call(t,e)}n.length=E}function _(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Kj(e,t,n){return Ct(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function $o(e){if(e===null||sn(e)||Ls(e))return 1;if(uf(e))return 2}function cf(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const W1={name:"attention",resolveAll:Zj,tokenize:Qj};function Zj(e,t){let n=-1,r,i,s,o,d,f,m,y;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;f=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[r][1].end},g={...e[n][1].start};s5(p,-f),s5(g,f),o={type:f>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},d={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:g},s={type:f>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:f>1?"strong":"emphasis",start:{...o.start},end:{...d.end}},e[r][1].end={...o.start},e[n][1].start={...d.end},m=[],e[r][1].end.offset-e[r][1].start.offset&&(m=_a(m,[["enter",e[r][1],t],["exit",e[r][1],t]])),m=_a(m,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",s,t]]),m=_a(m,cf(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),m=_a(m,[["exit",s,t],["enter",d,t],["exit",d,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(y=2,m=_a(m,[["enter",e[n][1],t],["exit",e[n][1],t]])):y=0,ca(e,r-1,n-r+3,m),n=r+m.length-y-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Qj(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=$o(r);let s;return o;function o(f){return s=f,e.enter("attentionSequence"),d(f)}function d(f){if(f===s)return e.consume(f),d;const m=e.exit("attentionSequence"),y=$o(f),p=!y||y===2&&i||n.includes(f),g=!i||i===2&&y||n.includes(r);return m._open=!!(s===42?p:p&&(i||!g)),m._close=!!(s===42?g:g&&(y||!p)),t(f)}}function s5(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Wj={name:"autolink",tokenize:Jj};function Jj(e,t,n){let r=0;return i;function i(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(x){return Tr(x)?(e.consume(x),o):x===64?n(x):m(x)}function o(x){return x===43||x===45||x===46||br(x)?(r=1,d(x)):m(x)}function d(x){return x===58?(e.consume(x),r=0,f):(x===43||x===45||x===46||br(x))&&r++<32?(e.consume(x),d):(r=0,m(x))}function f(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||Rd(x)?n(x):(e.consume(x),f)}function m(x){return x===64?(e.consume(x),y):Ij(x)?(e.consume(x),m):n(x)}function y(x){return br(x)?p(x):n(x)}function p(x){return x===46?(e.consume(x),r=0,y):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):g(x)}function g(x){if((x===45||br(x))&&r++<63){const w=x===45?g:p;return e.consume(x),w}return n(x)}}const Tc={partial:!0,tokenize:eC};function eC(e,t,n){return r;function r(s){return _t(s)?Ct(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||Je(s)?t(s):n(s)}}const V6={continuation:{tokenize:nC},exit:rC,name:"blockQuote",tokenize:tC};function tC(e,t,n){const r=this;return i;function i(o){if(o===62){const d=r.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),s}return n(o)}function s(o){return _t(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function nC(e,t,n){const r=this;return i;function i(o){return _t(o)?Ct(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return e.attempt(V6,t,n)(o)}}function rC(e){e.exit("blockQuote")}const G6={name:"characterEscape",tokenize:aC};function aC(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return Fj(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const Y6={name:"characterReference",tokenize:iC};function iC(e,t,n){const r=this;let i=0,s,o;return d;function d(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),f}function f(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),m):(e.enter("characterReferenceValue"),s=31,o=br,y(p))}function m(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,o=Pj,y):(e.enter("characterReferenceValue"),s=7,o=Q1,y(p))}function y(p){if(p===59&&i){const g=e.exit("characterReferenceValue");return o===br&&!eg(r.sliceSerialize(g))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(p)&&i++<s?(e.consume(p),y):n(p)}}const o5={partial:!0,tokenize:sC},u5={concrete:!0,name:"codeFenced",tokenize:lC};function lC(e,t,n){const r=this,i={partial:!0,tokenize:D};let s=0,o=0,d;return f;function f(T){return m(T)}function m(T){const O=r.events[r.events.length-1];return s=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,d=T,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(T)}function y(T){return T===d?(o++,e.consume(T),y):o<3?n(T):(e.exit("codeFencedFenceSequence"),_t(T)?Ct(e,p,"whitespace")(T):p(T))}function p(T){return T===null||Je(T)?(e.exit("codeFencedFence"),r.interrupt?t(T):e.check(o5,k,L)(T)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g(T))}function g(T){return T===null||Je(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(T)):_t(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ct(e,x,"whitespace")(T)):T===96&&T===d?n(T):(e.consume(T),g)}function x(T){return T===null||Je(T)?p(T):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(T))}function w(T){return T===null||Je(T)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(T)):T===96&&T===d?n(T):(e.consume(T),w)}function k(T){return e.attempt(i,L,j)(T)}function j(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),N}function N(T){return s>0&&_t(T)?Ct(e,_,"linePrefix",s+1)(T):_(T)}function _(T){return T===null||Je(T)?e.check(o5,k,L)(T):(e.enter("codeFlowValue"),E(T))}function E(T){return T===null||Je(T)?(e.exit("codeFlowValue"),_(T)):(e.consume(T),E)}function L(T){return e.exit("codeFenced"),t(T)}function D(T,O,Z){let V=0;return P;function P(Y){return T.enter("lineEnding"),T.consume(Y),T.exit("lineEnding"),K}function K(Y){return T.enter("codeFencedFence"),_t(Y)?Ct(T,X,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):X(Y)}function X(Y){return Y===d?(T.enter("codeFencedFenceSequence"),le(Y)):Z(Y)}function le(Y){return Y===d?(V++,T.consume(Y),le):V>=o?(T.exit("codeFencedFenceSequence"),_t(Y)?Ct(T,F,"whitespace")(Y):F(Y)):Z(Y)}function F(Y){return Y===null||Je(Y)?(T.exit("codeFencedFence"),O(Y)):Z(Y)}}}function sC(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const Xm={name:"codeIndented",tokenize:uC},oC={partial:!0,tokenize:cC};function uC(e,t,n){const r=this;return i;function i(m){return e.enter("codeIndented"),Ct(e,s,"linePrefix",5)(m)}function s(m){const y=r.events[r.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?o(m):n(m)}function o(m){return m===null?f(m):Je(m)?e.attempt(oC,o,f)(m):(e.enter("codeFlowValue"),d(m))}function d(m){return m===null||Je(m)?(e.exit("codeFlowValue"),o(m)):(e.consume(m),d)}function f(m){return e.exit("codeIndented"),t(m)}}function cC(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):Je(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):Ct(e,s,"linePrefix",5)(o)}function s(o){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(o):Je(o)?i(o):n(o)}}const dC={name:"codeText",previous:hC,resolve:fC,tokenize:mC};function fC(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function hC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function mC(e,t,n){let r=0,i,s;return o;function o(p){return e.enter("codeText"),e.enter("codeTextSequence"),d(p)}function d(p){return p===96?(e.consume(p),r++,d):(e.exit("codeTextSequence"),f(p))}function f(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),f):p===96?(s=e.enter("codeTextSequence"),i=0,y(p)):Je(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("codeTextData"),m(p))}function m(p){return p===null||p===32||p===96||Je(p)?(e.exit("codeTextData"),f(p)):(e.consume(p),m)}function y(p){return p===96?(e.consume(p),i++,y):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(s.type="codeTextData",m(p))}}class pC{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 r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ku(this.left,r),s.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),Ku(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ku(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);Ku(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ku(this.left,n.reverse())}}}function Ku(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 X6(e){const t={};let n=-1,r,i,s,o,d,f,m;const y=new pC(e);for(;++n<y.length;){for(;n in t;)n=t[n];if(r=y.get(n),n&&r[1].type==="chunkFlow"&&y.get(n-1)[1].type==="listItemPrefix"&&(f=r[1]._tokenizer.events,s=0,s<f.length&&f[s][1].type==="lineEndingBlank"&&(s+=2),s<f.length&&f[s][1].type==="content"))for(;++s<f.length&&f[s][1].type!=="content";)f[s][1].type==="chunkText"&&(f[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,gC(y,n)),n=t[n],m=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(o=y.get(s),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(y.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=s);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...y.get(i)[1].start},d=y.slice(i,n),d.unshift(r),y.splice(i,n-i+1,d))}}return ca(e,0,Number.POSITIVE_INFINITY,y.slice(0)),!m}function gC(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const d=o.events,f=[],m={};let y,p,g=-1,x=n,w=0,k=0;const j=[k];for(;x;){for(;e.get(++i)[1]!==x;);s.push(i),x._tokenizer||(y=r.sliceStream(x),x.next||y.push(null),p&&o.defineSkip(x.start),x._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(y),x._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),p=x,x=x.next}for(x=n;++g<d.length;)d[g][0]==="exit"&&d[g-1][0]==="enter"&&d[g][1].type===d[g-1][1].type&&d[g][1].start.line!==d[g][1].end.line&&(k=g+1,j.push(k),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(o.events=[],x?(x._tokenizer=void 0,x.previous=void 0):j.pop(),g=j.length;g--;){const N=d.slice(j[g],j[g+1]),_=s.pop();f.push([_,_+N.length-1]),e.splice(_,2,N)}for(f.reverse(),g=-1;++g<f.length;)m[w+f[g][0]]=w+f[g][1],w+=f[g][1]-f[g][0]-1;return m}const yC={resolve:xC,tokenize:bC},vC={partial:!0,tokenize:wC};function xC(e){return X6(e),e}function bC(e,t){let n;return r;function r(d){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(d)}function i(d){return d===null?s(d):Je(d)?e.check(vC,o,s)(d):(e.consume(d),i)}function s(d){return e.exit("chunkContent"),e.exit("content"),t(d)}function o(d){return e.consume(d),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function wC(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Ct(e,s,"linePrefix")}function s(o){if(o===null||Je(o))return n(o);const d=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function K6(e,t,n,r,i,s,o,d,f){const m=f||Number.POSITIVE_INFINITY;let y=0;return p;function p(N){return N===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(N),e.exit(s),g):N===null||N===32||N===41||Rd(N)?n(N):(e.enter(r),e.enter(o),e.enter(d),e.enter("chunkString",{contentType:"string"}),k(N))}function g(N){return N===62?(e.enter(s),e.consume(N),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),x(N))}function x(N){return N===62?(e.exit("chunkString"),e.exit(d),g(N)):N===null||N===60||Je(N)?n(N):(e.consume(N),N===92?w:x)}function w(N){return N===60||N===62||N===92?(e.consume(N),x):x(N)}function k(N){return!y&&(N===null||N===41||sn(N))?(e.exit("chunkString"),e.exit(d),e.exit(o),e.exit(r),t(N)):y<m&&N===40?(e.consume(N),y++,k):N===41?(e.consume(N),y--,k):N===null||N===32||N===40||Rd(N)?n(N):(e.consume(N),N===92?j:k)}function j(N){return N===40||N===41||N===92?(e.consume(N),k):k(N)}}function Z6(e,t,n,r,i,s){const o=this;let d=0,f;return m;function m(x){return e.enter(r),e.enter(i),e.consume(x),e.exit(i),e.enter(s),y}function y(x){return d>999||x===null||x===91||x===93&&!f||x===94&&!d&&"_hiddenFootnoteSupport"in o.parser.constructs?n(x):x===93?(e.exit(s),e.enter(i),e.consume(x),e.exit(i),e.exit(r),t):Je(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),y):(e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===null||x===91||x===93||Je(x)||d++>999?(e.exit("chunkString"),y(x)):(e.consume(x),f||(f=!_t(x)),x===92?g:p)}function g(x){return x===91||x===92||x===93?(e.consume(x),d++,p):p(x)}}function Q6(e,t,n,r,i,s){let o;return d;function d(g){return g===34||g===39||g===40?(e.enter(r),e.enter(i),e.consume(g),e.exit(i),o=g===40?41:g,f):n(g)}function f(g){return g===o?(e.enter(i),e.consume(g),e.exit(i),e.exit(r),t):(e.enter(s),m(g))}function m(g){return g===o?(e.exit(s),f(o)):g===null?n(g):Je(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),Ct(e,m,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),y(g))}function y(g){return g===o||g===null||Je(g)?(e.exit("chunkString"),m(g)):(e.consume(g),g===92?p:y)}function p(g){return g===o||g===92?(e.consume(g),y):y(g)}}function ac(e,t){let n;return r;function r(i){return Je(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):_t(i)?Ct(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const SC={name:"definition",tokenize:NC},kC={partial:!0,tokenize:jC};function NC(e,t,n){const r=this;let i;return s;function s(x){return e.enter("definition"),o(x)}function o(x){return Z6.call(r,e,d,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function d(x){return i=Xa(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),f):n(x)}function f(x){return sn(x)?ac(e,m)(x):m(x)}function m(x){return K6(e,y,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function y(x){return e.attempt(kC,p,p)(x)}function p(x){return _t(x)?Ct(e,g,"whitespace")(x):g(x)}function g(x){return x===null||Je(x)?(e.exit("definition"),r.parser.defined.push(i),t(x)):n(x)}}function jC(e,t,n){return r;function r(d){return sn(d)?ac(e,i)(d):n(d)}function i(d){return Q6(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function s(d){return _t(d)?Ct(e,o,"whitespace")(d):o(d)}function o(d){return d===null||Je(d)?t(d):n(d)}}const CC={name:"hardBreakEscape",tokenize:EC};function EC(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return Je(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const MC={name:"headingAtx",resolve:_C,tokenize:AC};function _C(e,t){let n=e.length-2,r=3,i,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ca(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function AC(e,t,n){let r=0;return i;function i(y){return e.enter("atxHeading"),s(y)}function s(y){return e.enter("atxHeadingSequence"),o(y)}function o(y){return y===35&&r++<6?(e.consume(y),o):y===null||sn(y)?(e.exit("atxHeadingSequence"),d(y)):n(y)}function d(y){return y===35?(e.enter("atxHeadingSequence"),f(y)):y===null||Je(y)?(e.exit("atxHeading"),t(y)):_t(y)?Ct(e,d,"whitespace")(y):(e.enter("atxHeadingText"),m(y))}function f(y){return y===35?(e.consume(y),f):(e.exit("atxHeadingSequence"),d(y))}function m(y){return y===null||y===35||sn(y)?(e.exit("atxHeadingText"),d(y)):(e.consume(y),m)}}const TC=["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"],c5=["pre","script","style","textarea"],zC={concrete:!0,name:"htmlFlow",resolveTo:RC,tokenize:BC},DC={partial:!0,tokenize:$C},LC={partial:!0,tokenize:OC};function RC(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 BC(e,t,n){const r=this;let i,s,o,d,f;return m;function m(B){return y(B)}function y(B){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(B),p}function p(B){return B===33?(e.consume(B),g):B===47?(e.consume(B),s=!0,k):B===63?(e.consume(B),i=3,r.interrupt?t:R):Tr(B)?(e.consume(B),o=String.fromCharCode(B),j):n(B)}function g(B){return B===45?(e.consume(B),i=2,x):B===91?(e.consume(B),i=5,d=0,w):Tr(B)?(e.consume(B),i=4,r.interrupt?t:R):n(B)}function x(B){return B===45?(e.consume(B),r.interrupt?t:R):n(B)}function w(B){const ce="CDATA[";return B===ce.charCodeAt(d++)?(e.consume(B),d===ce.length?r.interrupt?t:X:w):n(B)}function k(B){return Tr(B)?(e.consume(B),o=String.fromCharCode(B),j):n(B)}function j(B){if(B===null||B===47||B===62||sn(B)){const ce=B===47,pe=o.toLowerCase();return!ce&&!s&&c5.includes(pe)?(i=1,r.interrupt?t(B):X(B)):TC.includes(o.toLowerCase())?(i=6,ce?(e.consume(B),N):r.interrupt?t(B):X(B)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(B):s?_(B):E(B))}return B===45||br(B)?(e.consume(B),o+=String.fromCharCode(B),j):n(B)}function N(B){return B===62?(e.consume(B),r.interrupt?t:X):n(B)}function _(B){return _t(B)?(e.consume(B),_):P(B)}function E(B){return B===47?(e.consume(B),P):B===58||B===95||Tr(B)?(e.consume(B),L):_t(B)?(e.consume(B),E):P(B)}function L(B){return B===45||B===46||B===58||B===95||br(B)?(e.consume(B),L):D(B)}function D(B){return B===61?(e.consume(B),T):_t(B)?(e.consume(B),D):E(B)}function T(B){return B===null||B===60||B===61||B===62||B===96?n(B):B===34||B===39?(e.consume(B),f=B,O):_t(B)?(e.consume(B),T):Z(B)}function O(B){return B===f?(e.consume(B),f=null,V):B===null||Je(B)?n(B):(e.consume(B),O)}function Z(B){return B===null||B===34||B===39||B===47||B===60||B===61||B===62||B===96||sn(B)?D(B):(e.consume(B),Z)}function V(B){return B===47||B===62||_t(B)?E(B):n(B)}function P(B){return B===62?(e.consume(B),K):n(B)}function K(B){return B===null||Je(B)?X(B):_t(B)?(e.consume(B),K):n(B)}function X(B){return B===45&&i===2?(e.consume(B),q):B===60&&i===1?(e.consume(B),Q):B===62&&i===4?(e.consume(B),H):B===63&&i===3?(e.consume(B),R):B===93&&i===5?(e.consume(B),ne):Je(B)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(DC,W,le)(B)):B===null||Je(B)?(e.exit("htmlFlowData"),le(B)):(e.consume(B),X)}function le(B){return e.check(LC,F,W)(B)}function F(B){return e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),Y}function Y(B){return B===null||Je(B)?le(B):(e.enter("htmlFlowData"),X(B))}function q(B){return B===45?(e.consume(B),R):X(B)}function Q(B){return B===47?(e.consume(B),o="",ee):X(B)}function ee(B){if(B===62){const ce=o.toLowerCase();return c5.includes(ce)?(e.consume(B),H):X(B)}return Tr(B)&&o.length<8?(e.consume(B),o+=String.fromCharCode(B),ee):X(B)}function ne(B){return B===93?(e.consume(B),R):X(B)}function R(B){return B===62?(e.consume(B),H):B===45&&i===2?(e.consume(B),R):X(B)}function H(B){return B===null||Je(B)?(e.exit("htmlFlowData"),W(B)):(e.consume(B),H)}function W(B){return e.exit("htmlFlow"),t(B)}}function OC(e,t,n){const r=this;return i;function i(o){return Je(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):n(o)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function $C(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Tc,t,n)}}const HC={name:"htmlText",tokenize:qC};function qC(e,t,n){const r=this;let i,s,o;return d;function d(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),f}function f(R){return R===33?(e.consume(R),m):R===47?(e.consume(R),D):R===63?(e.consume(R),E):Tr(R)?(e.consume(R),Z):n(R)}function m(R){return R===45?(e.consume(R),y):R===91?(e.consume(R),s=0,w):Tr(R)?(e.consume(R),_):n(R)}function y(R){return R===45?(e.consume(R),x):n(R)}function p(R){return R===null?n(R):R===45?(e.consume(R),g):Je(R)?(o=p,Q(R)):(e.consume(R),p)}function g(R){return R===45?(e.consume(R),x):p(R)}function x(R){return R===62?q(R):R===45?g(R):p(R)}function w(R){const H="CDATA[";return R===H.charCodeAt(s++)?(e.consume(R),s===H.length?k:w):n(R)}function k(R){return R===null?n(R):R===93?(e.consume(R),j):Je(R)?(o=k,Q(R)):(e.consume(R),k)}function j(R){return R===93?(e.consume(R),N):k(R)}function N(R){return R===62?q(R):R===93?(e.consume(R),N):k(R)}function _(R){return R===null||R===62?q(R):Je(R)?(o=_,Q(R)):(e.consume(R),_)}function E(R){return R===null?n(R):R===63?(e.consume(R),L):Je(R)?(o=E,Q(R)):(e.consume(R),E)}function L(R){return R===62?q(R):E(R)}function D(R){return Tr(R)?(e.consume(R),T):n(R)}function T(R){return R===45||br(R)?(e.consume(R),T):O(R)}function O(R){return Je(R)?(o=O,Q(R)):_t(R)?(e.consume(R),O):q(R)}function Z(R){return R===45||br(R)?(e.consume(R),Z):R===47||R===62||sn(R)?V(R):n(R)}function V(R){return R===47?(e.consume(R),q):R===58||R===95||Tr(R)?(e.consume(R),P):Je(R)?(o=V,Q(R)):_t(R)?(e.consume(R),V):q(R)}function P(R){return R===45||R===46||R===58||R===95||br(R)?(e.consume(R),P):K(R)}function K(R){return R===61?(e.consume(R),X):Je(R)?(o=K,Q(R)):_t(R)?(e.consume(R),K):V(R)}function X(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),i=R,le):Je(R)?(o=X,Q(R)):_t(R)?(e.consume(R),X):(e.consume(R),F)}function le(R){return R===i?(e.consume(R),i=void 0,Y):R===null?n(R):Je(R)?(o=le,Q(R)):(e.consume(R),le)}function F(R){return R===null||R===34||R===39||R===60||R===61||R===96?n(R):R===47||R===62||sn(R)?V(R):(e.consume(R),F)}function Y(R){return R===47||R===62||sn(R)?V(R):n(R)}function q(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):n(R)}function Q(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),ee}function ee(R){return _t(R)?Ct(e,ne,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):ne(R)}function ne(R){return e.enter("htmlTextData"),o(R)}}const tg={name:"labelEnd",resolveAll:FC,resolveTo:VC,tokenize:GC},UC={tokenize:YC},IC={tokenize:XC},PC={tokenize:KC};function FC(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&ca(e,0,e.length,n),e}function VC(e,t){let n=e.length,r=0,i,s,o,d;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const f={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},m={type:"label",start:{...e[s][1].start},end:{...e[o][1].end}},y={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[o-2][1].start}};return d=[["enter",f,t],["enter",m,t]],d=_a(d,e.slice(s+1,s+r+3)),d=_a(d,[["enter",y,t]]),d=_a(d,cf(t.parser.constructs.insideSpan.null,e.slice(s+r+4,o-3),t)),d=_a(d,[["exit",y,t],e[o-2],e[o-1],["exit",m,t]]),d=_a(d,e.slice(o+1)),d=_a(d,[["exit",f,t]]),ca(e,s,e.length,d),e}function GC(e,t,n){const r=this;let i=r.events.length,s,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return d;function d(g){return s?s._inactive?p(g):(o=r.parser.defined.includes(Xa(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),f):n(g)}function f(g){return g===40?e.attempt(UC,y,o?y:p)(g):g===91?e.attempt(IC,y,o?m:p)(g):o?y(g):p(g)}function m(g){return e.attempt(PC,y,p)(g)}function y(g){return t(g)}function p(g){return s._balanced=!0,n(g)}}function YC(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),i}function i(p){return sn(p)?ac(e,s)(p):s(p)}function s(p){return p===41?y(p):K6(e,o,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function o(p){return sn(p)?ac(e,f)(p):y(p)}function d(p){return n(p)}function f(p){return p===34||p===39||p===40?Q6(e,m,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):y(p)}function m(p){return sn(p)?ac(e,y)(p):y(p)}function y(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function XC(e,t,n){const r=this;return i;function i(d){return Z6.call(r,e,s,o,"reference","referenceMarker","referenceString")(d)}function s(d){return r.parser.defined.includes(Xa(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(d):n(d)}function o(d){return n(d)}}function KC(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const ZC={name:"labelStartImage",resolveAll:tg.resolveAll,tokenize:QC};function QC(e,t,n){const r=this;return i;function i(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),s}function s(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),o):n(d)}function o(d){return d===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(d):t(d)}}const WC={name:"labelStartLink",resolveAll:tg.resolveAll,tokenize:JC};function JC(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),s}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Km={name:"lineEnding",tokenize:eE};function eE(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ct(e,t,"linePrefix")}}const Nd={name:"thematicBreak",tokenize:tE};function tE(e,t,n){let r=0,i;return s;function s(m){return e.enter("thematicBreak"),o(m)}function o(m){return i=m,d(m)}function d(m){return m===i?(e.enter("thematicBreakSequence"),f(m)):r>=3&&(m===null||Je(m))?(e.exit("thematicBreak"),t(m)):n(m)}function f(m){return m===i?(e.consume(m),r++,f):(e.exit("thematicBreakSequence"),_t(m)?Ct(e,d,"whitespace")(m):d(m))}}const Vr={continuation:{tokenize:iE},exit:sE,name:"list",tokenize:aE},nE={partial:!0,tokenize:oE},rE={partial:!0,tokenize:lE};function aE(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return d;function d(x){const w=r.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!r.containerState.marker||x===r.containerState.marker:Q1(x)){if(r.containerState.type||(r.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(Nd,n,m)(x):m(x);if(!r.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(x)}return n(x)}function f(x){return Q1(x)&&++o<10?(e.consume(x),f):(!r.interrupt||o<2)&&(r.containerState.marker?x===r.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"),r.containerState.marker=r.containerState.marker||x,e.check(Tc,r.interrupt?n:y,e.attempt(nE,g,p))}function y(x){return r.containerState.initialBlankLine=!0,s++,g(x)}function p(x){return _t(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),g):n(x)}function g(x){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(x)}}function iE(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Tc,i,s);function i(d){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ct(e,t,"listItemIndent",r.containerState.size+1)(d)}function s(d){return r.containerState.furtherBlankLines||!_t(d)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(d)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(rE,t,o)(d))}function o(d){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ct(e,e.attempt(Vr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function lE(e,t,n){const r=this;return Ct(e,i,"listItemIndent",r.containerState.size+1);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(s):n(s)}}function sE(e){e.exit(this.containerState.type)}function oE(e,t,n){const r=this;return Ct(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const o=r.events[r.events.length-1];return!_t(s)&&o&&o[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const d5={name:"setextUnderline",resolveTo:uE,tokenize:cE};function uE(e,t){let n=e.length,r,i,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",o,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function cE(e,t,n){const r=this;let i;return s;function s(m){let y=r.events.length,p;for(;y--;)if(r.events[y][1].type!=="lineEnding"&&r.events[y][1].type!=="linePrefix"&&r.events[y][1].type!=="content"){p=r.events[y][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),i=m,o(m)):n(m)}function o(m){return e.enter("setextHeadingLineSequence"),d(m)}function d(m){return m===i?(e.consume(m),d):(e.exit("setextHeadingLineSequence"),_t(m)?Ct(e,f,"lineSuffix")(m):f(m))}function f(m){return m===null||Je(m)?(e.exit("setextHeadingLine"),t(m)):n(m)}}const dE={tokenize:fE};function fE(e){const t=this,n=e.attempt(Tc,r,e.attempt(this.parser.constructs.flowInitial,i,Ct(e,e.attempt(this.parser.constructs.flow,i,e.attempt(yC,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const hE={resolveAll:J6()},mE=W6("string"),pE=W6("text");function W6(e){return{resolveAll:J6(e==="text"?gE:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,o,d);return o;function o(y){return m(y)?s(y):d(y)}function d(y){if(y===null){n.consume(y);return}return n.enter("data"),n.consume(y),f}function f(y){return m(y)?(n.exit("data"),s(y)):(n.consume(y),f)}function m(y){if(y===null)return!0;const p=i[y];let g=-1;if(p)for(;++g<p.length;){const x=p[g];if(!x.previous||x.previous.call(r,r.previous))return!0}return!1}}}function J6(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function gE(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 r=e[n-1][1],i=t.sliceStream(r);let s=i.length,o=-1,d=0,f;for(;s--;){const m=i[s];if(typeof m=="string"){for(o=m.length;m.charCodeAt(o-1)===32;)d++,o--;if(o)break;o=-1}else if(m===-2)f=!0,d++;else if(m!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(d=0),d){const m={type:n===e.length||f||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?o:r.start._bufferIndex+o,_index:r.start._index+s,line:r.end.line,column:r.end.column-d,offset:r.end.offset-d},end:{...r.end}};r.end={...m.start},r.start.offset===r.end.offset?Object.assign(r,m):(e.splice(n,0,["enter",m,t],["exit",m,t]),n+=2)}n++}return e}const yE={42:Vr,43:Vr,45:Vr,48:Vr,49:Vr,50:Vr,51:Vr,52:Vr,53:Vr,54:Vr,55:Vr,56:Vr,57:Vr,62:V6},vE={91:SC},xE={[-2]:Xm,[-1]:Xm,32:Xm},bE={35:MC,42:Nd,45:[d5,Nd],60:zC,61:d5,95:Nd,96:u5,126:u5},wE={38:Y6,92:G6},SE={[-5]:Km,[-4]:Km,[-3]:Km,33:ZC,38:Y6,42:W1,60:[Wj,HC],91:WC,92:[CC,G6],93:tg,95:W1,96:dC},kE={null:[W1,hE]},NE={null:[42,95]},jE={null:[]},CE=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:NE,contentInitial:vE,disable:jE,document:yE,flow:bE,flowInitial:xE,insideSpan:kE,string:wE,text:SE},Symbol.toStringTag,{value:"Module"}));function EE(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let o=[],d=[];const f={attempt:O(D),check:O(T),consume:_,enter:E,exit:L,interrupt:O(T,{interrupt:!0})},m={code:null,containerState:{},defineSkip:k,events:[],now:w,parser:e,previous:null,sliceSerialize:g,sliceStream:x,write:p};let y=t.tokenize.call(m,f);return t.resolveAll&&s.push(t),m;function p(K){return o=_a(o,K),j(),o[o.length-1]!==null?[]:(Z(t,0),m.events=cf(s,m.events,m),m.events)}function g(K,X){return _E(x(K),X)}function x(K){return ME(o,K)}function w(){const{_bufferIndex:K,_index:X,line:le,column:F,offset:Y}=r;return{_bufferIndex:K,_index:X,line:le,column:F,offset:Y}}function k(K){i[K.line]=K.column,P()}function j(){let K;for(;r._index<o.length;){const X=o[r._index];if(typeof X=="string")for(K=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===K&&r._bufferIndex<X.length;)N(X.charCodeAt(r._bufferIndex));else N(X)}}function N(K){y=y(K)}function _(K){Je(K)?(r.line++,r.column=1,r.offset+=K===-3?2:1,P()):K!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),m.previous=K}function E(K,X){const le=X||{};return le.type=K,le.start=w(),m.events.push(["enter",le,m]),d.push(le),le}function L(K){const X=d.pop();return X.end=w(),m.events.push(["exit",X,m]),X}function D(K,X){Z(K,X.from)}function T(K,X){X.restore()}function O(K,X){return le;function le(F,Y,q){let Q,ee,ne,R;return Array.isArray(F)?W(F):"tokenize"in F?W([F]):H(F);function H(xe){return be;function be(ye){const Ce=ye!==null&&xe[ye],Ge=ye!==null&&xe.null,Pe=[...Array.isArray(Ce)?Ce:Ce?[Ce]:[],...Array.isArray(Ge)?Ge:Ge?[Ge]:[]];return W(Pe)(ye)}}function W(xe){return Q=xe,ee=0,xe.length===0?q:B(xe[ee])}function B(xe){return be;function be(ye){return R=V(),ne=xe,xe.partial||(m.currentConstruct=xe),xe.name&&m.parser.constructs.disable.null.includes(xe.name)?pe():xe.tokenize.call(X?Object.assign(Object.create(m),X):m,f,ce,pe)(ye)}}function ce(xe){return K(ne,R),Y}function pe(xe){return R.restore(),++ee<Q.length?B(Q[ee]):q}}}function Z(K,X){K.resolveAll&&!s.includes(K)&&s.push(K),K.resolve&&ca(m.events,X,m.events.length-X,K.resolve(m.events.slice(X),m)),K.resolveTo&&(m.events=K.resolveTo(m.events,m))}function V(){const K=w(),X=m.previous,le=m.currentConstruct,F=m.events.length,Y=Array.from(d);return{from:F,restore:q};function q(){r=K,m.previous=X,m.currentConstruct=le,m.events.length=F,d=Y,P()}}function P(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ME(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,s)];else{if(o=e.slice(n,i),r>-1){const d=o[0];typeof d=="string"?o[0]=d.slice(r):o.shift()}s>0&&o.push(e[i].slice(0,s))}return o}function _E(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let o;if(typeof s=="string")o=s;else switch(s){case-5:{o="\r";break}case-4:{o=`
|
|
69
|
+
`;break}case-3:{o=`\r
|
|
70
|
+
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(s)}i=s===-2,r.push(o)}return r.join("")}function AE(e){const r={constructs:P6([CE,...(e||{}).extensions||[]]),content:i(Vj),defined:[],document:i(Yj),flow:i(dE),lazy:{},string:i(mE),text:i(pE)};return r;function i(s){return o;function o(d){return EE(r,s,d)}}}function TE(e){for(;!X6(e););return e}const f5=/[\0\t\n\r]/g;function zE(){let e=1,t="",n=!0,r;return i;function i(s,o,d){const f=[];let m,y,p,g,x;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(o||void 0).decode(s)),p=0,t="",n&&(s.charCodeAt(0)===65279&&p++,n=void 0);p<s.length;){if(f5.lastIndex=p,m=f5.exec(s),g=m&&m.index!==void 0?m.index:s.length,x=s.charCodeAt(g),!m){t=s.slice(p);break}if(x===10&&p===g&&r)f.push(-3),r=void 0;else switch(r&&(f.push(-5),r=void 0),p<g&&(f.push(s.slice(p,g)),e+=g-p),x){case 0:{f.push(65533),e++;break}case 9:{for(y=Math.ceil(e/4)*4,f.push(-2);e++<y;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:r=!0,e=1}p=g+1}return d&&(r&&f.push(-5),t&&f.push(t),f.push(null)),f}}const DE=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function LE(e){return e.replace(DE,RE)}function RE(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return F6(n.slice(s?2:1),s?16:10)}return eg(n)||e}const e7={}.hasOwnProperty;function BE(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),OE(n)(TE(AE(n).document().write(zE()(e,t,!0))))}function OE(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(et),autolinkProtocol:V,autolinkEmail:V,atxHeading:s(lt),blockQuote:s(Ge),characterEscape:V,characterReference:V,codeFenced:s(Pe),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(Pe,o),codeText:s($e,o),codeTextData:V,data:V,codeFlowValue:V,definition:s(qe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(nt),hardBreakEscape:s(We),hardBreakTrailing:s(We),htmlFlow:s(Dt,o),htmlFlowData:V,htmlText:s(Dt,o),htmlTextData:V,image:s(ke),label:o,link:s(et),listItem:s(Nt),listItemValue:g,listOrdered:s(st,p),listUnordered:s(st),paragraph:s(kn),reference:B,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(lt),strong:s(Ht),thematicBreak:s(Lt)},exit:{atxHeading:f(),atxHeadingSequence:D,autolink:f(),autolinkEmail:Ce,autolinkProtocol:ye,blockQuote:f(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:pe,characterReferenceMarkerNumeric:pe,characterReferenceValue:xe,characterReference:be,codeFenced:f(j),codeFencedFence:k,codeFencedFenceInfo:x,codeFencedFenceMeta:w,codeFlowValue:P,codeIndented:f(N),codeText:f(Y),codeTextData:P,data:P,definition:f(),definitionDestinationString:L,definitionLabelString:_,definitionTitleString:E,emphasis:f(),hardBreakEscape:f(X),hardBreakTrailing:f(X),htmlFlow:f(le),htmlFlowData:P,htmlText:f(F),htmlTextData:P,image:f(Q),label:ne,labelText:ee,lineEnding:K,link:f(q),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:ce,resourceDestinationString:R,resourceTitleString:H,resource:W,setextHeading:f(Z),setextHeadingLineSequence:O,setextHeadingText:T,strong:f(),thematicBreak:f()}};t7(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(de){let je={type:"root",children:[]};const He={stack:[je],tokenStack:[],config:t,enter:d,exit:m,buffer:o,resume:y,data:n},rt=[];let gt=-1;for(;++gt<de.length;)if(de[gt][1].type==="listOrdered"||de[gt][1].type==="listUnordered")if(de[gt][0]==="enter")rt.push(gt);else{const Pt=rt.pop();gt=i(de,Pt,gt)}for(gt=-1;++gt<de.length;){const Pt=t[de[gt][0]];e7.call(Pt,de[gt][1].type)&&Pt[de[gt][1].type].call(Object.assign({sliceSerialize:de[gt][2].sliceSerialize},He),de[gt][1])}if(He.tokenStack.length>0){const Pt=He.tokenStack[He.tokenStack.length-1];(Pt[1]||h5).call(He,void 0,Pt[0])}for(je.position={start:ql(de.length>0?de[0][1].start:{line:1,column:1,offset:0}),end:ql(de.length>0?de[de.length-2][1].end:{line:1,column:1,offset:0})},gt=-1;++gt<t.transforms.length;)je=t.transforms[gt](je)||je;return je}function i(de,je,He){let rt=je-1,gt=-1,Pt=!1,fn,Wt,Fe,qt;for(;++rt<=He;){const jt=de[rt];switch(jt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{jt[0]==="enter"?gt++:gt--,qt=void 0;break}case"lineEndingBlank":{jt[0]==="enter"&&(fn&&!qt&&!gt&&!Fe&&(Fe=rt),qt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:qt=void 0}if(!gt&&jt[0]==="enter"&&jt[1].type==="listItemPrefix"||gt===-1&&jt[0]==="exit"&&(jt[1].type==="listUnordered"||jt[1].type==="listOrdered")){if(fn){let Jt=rt;for(Wt=void 0;Jt--;){const Rt=de[Jt];if(Rt[1].type==="lineEnding"||Rt[1].type==="lineEndingBlank"){if(Rt[0]==="exit")continue;Wt&&(de[Wt][1].type="lineEndingBlank",Pt=!0),Rt[1].type="lineEnding",Wt=Jt}else if(!(Rt[1].type==="linePrefix"||Rt[1].type==="blockQuotePrefix"||Rt[1].type==="blockQuotePrefixWhitespace"||Rt[1].type==="blockQuoteMarker"||Rt[1].type==="listItemIndent"))break}Fe&&(!Wt||Fe<Wt)&&(fn._spread=!0),fn.end=Object.assign({},Wt?de[Wt][1].start:jt[1].end),de.splice(Wt||rt,0,["exit",fn,jt[2]]),rt++,He++}if(jt[1].type==="listItemPrefix"){const Jt={type:"listItem",_spread:!1,start:Object.assign({},jt[1].start),end:void 0};fn=Jt,de.splice(rt,0,["enter",Jt,jt[2]]),rt++,He++,Fe=void 0,qt=!0}}}return de[je][1]._spread=Pt,He}function s(de,je){return He;function He(rt){d.call(this,de(rt),rt),je&&je.call(this,rt)}}function o(){this.stack.push({type:"fragment",children:[]})}function d(de,je,He){this.stack[this.stack.length-1].children.push(de),this.stack.push(de),this.tokenStack.push([je,He||void 0]),de.position={start:ql(je.start),end:void 0}}function f(de){return je;function je(He){de&&de.call(this,He),m.call(this,He)}}function m(de,je){const He=this.stack.pop(),rt=this.tokenStack.pop();if(rt)rt[0].type!==de.type&&(je?je.call(this,de,rt[0]):(rt[1]||h5).call(this,de,rt[0]));else throw new Error("Cannot close `"+de.type+"` ("+rc({start:de.start,end:de.end})+"): it’s not open");He.position.end=ql(de.end)}function y(){return Jp(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function g(de){if(this.data.expectingFirstListItemValue){const je=this.stack[this.stack.length-2];je.start=Number.parseInt(this.sliceSerialize(de),10),this.data.expectingFirstListItemValue=void 0}}function x(){const de=this.resume(),je=this.stack[this.stack.length-1];je.lang=de}function w(){const de=this.resume(),je=this.stack[this.stack.length-1];je.meta=de}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function j(){const de=this.resume(),je=this.stack[this.stack.length-1];je.value=de.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function N(){const de=this.resume(),je=this.stack[this.stack.length-1];je.value=de.replace(/(\r?\n|\r)$/g,"")}function _(de){const je=this.resume(),He=this.stack[this.stack.length-1];He.label=je,He.identifier=Xa(this.sliceSerialize(de)).toLowerCase()}function E(){const de=this.resume(),je=this.stack[this.stack.length-1];je.title=de}function L(){const de=this.resume(),je=this.stack[this.stack.length-1];je.url=de}function D(de){const je=this.stack[this.stack.length-1];if(!je.depth){const He=this.sliceSerialize(de).length;je.depth=He}}function T(){this.data.setextHeadingSlurpLineEnding=!0}function O(de){const je=this.stack[this.stack.length-1];je.depth=this.sliceSerialize(de).codePointAt(0)===61?1:2}function Z(){this.data.setextHeadingSlurpLineEnding=void 0}function V(de){const He=this.stack[this.stack.length-1].children;let rt=He[He.length-1];(!rt||rt.type!=="text")&&(rt=ct(),rt.position={start:ql(de.start),end:void 0},He.push(rt)),this.stack.push(rt)}function P(de){const je=this.stack.pop();je.value+=this.sliceSerialize(de),je.position.end=ql(de.end)}function K(de){const je=this.stack[this.stack.length-1];if(this.data.atHardBreak){const He=je.children[je.children.length-1];He.position.end=ql(de.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(je.type)&&(V.call(this,de),P.call(this,de))}function X(){this.data.atHardBreak=!0}function le(){const de=this.resume(),je=this.stack[this.stack.length-1];je.value=de}function F(){const de=this.resume(),je=this.stack[this.stack.length-1];je.value=de}function Y(){const de=this.resume(),je=this.stack[this.stack.length-1];je.value=de}function q(){const de=this.stack[this.stack.length-1];if(this.data.inReference){const je=this.data.referenceType||"shortcut";de.type+="Reference",de.referenceType=je,delete de.url,delete de.title}else delete de.identifier,delete de.label;this.data.referenceType=void 0}function Q(){const de=this.stack[this.stack.length-1];if(this.data.inReference){const je=this.data.referenceType||"shortcut";de.type+="Reference",de.referenceType=je,delete de.url,delete de.title}else delete de.identifier,delete de.label;this.data.referenceType=void 0}function ee(de){const je=this.sliceSerialize(de),He=this.stack[this.stack.length-2];He.label=LE(je),He.identifier=Xa(je).toLowerCase()}function ne(){const de=this.stack[this.stack.length-1],je=this.resume(),He=this.stack[this.stack.length-1];if(this.data.inReference=!0,He.type==="link"){const rt=de.children;He.children=rt}else He.alt=je}function R(){const de=this.resume(),je=this.stack[this.stack.length-1];je.url=de}function H(){const de=this.resume(),je=this.stack[this.stack.length-1];je.title=de}function W(){this.data.inReference=void 0}function B(){this.data.referenceType="collapsed"}function ce(de){const je=this.resume(),He=this.stack[this.stack.length-1];He.label=je,He.identifier=Xa(this.sliceSerialize(de)).toLowerCase(),this.data.referenceType="full"}function pe(de){this.data.characterReferenceType=de.type}function xe(de){const je=this.sliceSerialize(de),He=this.data.characterReferenceType;let rt;He?(rt=F6(je,He==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):rt=eg(je);const gt=this.stack[this.stack.length-1];gt.value+=rt}function be(de){const je=this.stack.pop();je.position.end=ql(de.end)}function ye(de){P.call(this,de);const je=this.stack[this.stack.length-1];je.url=this.sliceSerialize(de)}function Ce(de){P.call(this,de);const je=this.stack[this.stack.length-1];je.url="mailto:"+this.sliceSerialize(de)}function Ge(){return{type:"blockquote",children:[]}}function Pe(){return{type:"code",lang:null,meta:null,value:""}}function $e(){return{type:"inlineCode",value:""}}function qe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function nt(){return{type:"emphasis",children:[]}}function lt(){return{type:"heading",depth:0,children:[]}}function We(){return{type:"break"}}function Dt(){return{type:"html",value:""}}function ke(){return{type:"image",title:null,url:"",alt:null}}function et(){return{type:"link",title:null,url:"",children:[]}}function st(de){return{type:"list",ordered:de.type==="listOrdered",start:null,spread:de._spread,children:[]}}function Nt(de){return{type:"listItem",spread:de._spread,checked:null,children:[]}}function kn(){return{type:"paragraph",children:[]}}function Ht(){return{type:"strong",children:[]}}function ct(){return{type:"text",value:""}}function Lt(){return{type:"thematicBreak"}}}function ql(e){return{line:e.line,column:e.column,offset:e.offset}}function t7(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?t7(e,r):$E(e,r)}}function $E(e,t){let n;for(n in t)if(e7.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function h5(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+rc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+rc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+rc({start:t.start,end:t.end})+") is still open")}function HE(e){const t=this;t.parser=n;function n(r){return BE(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function qE(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 UE(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
71
|
+
`}]}function IE(e,t){const n=t.value?t.value+`
|
|
72
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function PE(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function FE(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function VE(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Wo(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let o,d=e.footnoteCounts.get(r);d===void 0?(d=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=s+1,d+=1,e.footnoteCounts.set(r,d);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,f);const m={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,m),e.applyData(t,m)}function GE(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 YE(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function n7(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function XE(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return n7(e,t);const i={src:Wo(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function KE(e,t){const n={src:Wo(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 r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function ZE(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function QE(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return n7(e,t);const i={href:Wo(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function WE(e,t){const n={href:Wo(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function JE(e,t,n){const r=e.all(t),i=n?eM(n):r7(t),s={},o=[];if(typeof t.checked=="boolean"){const y=r[0];let p;y&&y.type==="element"&&y.tagName==="p"?p=y:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let d=-1;for(;++d<r.length;){const y=r[d];(i||d!==0||y.type!=="element"||y.tagName!=="p")&&o.push({type:"text",value:`
|
|
73
|
+
`}),y.type==="element"&&y.tagName==="p"&&!i?o.push(...y.children):o.push(y)}const f=r[r.length-1];f&&(i||f.type!=="element"||f.tagName!=="p")&&o.push({type:"text",value:`
|
|
74
|
+
`});const m={type:"element",tagName:"li",properties:s,children:o};return e.patch(t,m),e.applyData(t,m)}function eM(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=r7(n[r])}return t}function r7(e){const t=e.spread;return t??e.children.length>1}function tM(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function nM(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function rM(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function aM(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iM(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},d=Kp(t.children[1]),f=B6(t.children[t.children.length-1]);d&&f&&(o.position={start:d,end:f}),i.push(o)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function lM(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,d=o?o.length:t.children.length;let f=-1;const m=[];for(;++f<d;){const p=t.children[f],g={},x=o?o[f]:void 0;x&&(g.align=x);let w={type:"element",tagName:s,properties:g,children:[]};p&&(w.children=e.all(p),e.patch(p,w),w=e.applyData(p,w)),m.push(w)}const y={type:"element",tagName:"tr",properties:{},children:e.wrap(m,!0)};return e.patch(t,y),e.applyData(t,y)}function sM(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const m5=9,p5=32;function oM(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(g5(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(g5(t.slice(i),i>0,!1)),s.join("")}function g5(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===m5||s===p5;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===m5||s===p5;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function uM(e,t){const n={type:"text",value:oM(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function cM(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const dM={blockquote:qE,break:UE,code:IE,delete:PE,emphasis:FE,footnoteReference:VE,heading:GE,html:YE,imageReference:XE,image:KE,inlineCode:ZE,linkReference:QE,link:WE,listItem:JE,list:tM,paragraph:nM,root:rM,strong:aM,table:iM,tableCell:sM,tableRow:lM,text:uM,thematicBreak:cM,toml:Q0,yaml:Q0,definition:Q0,footnoteDefinition:Q0};function Q0(){}const a7=-1,df=0,ic=1,Bd=2,ng=3,rg=4,ag=5,ig=6,i7=7,l7=8,y5=typeof self=="object"?self:globalThis,fM=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,o]=t[i];switch(s){case df:case a7:return n(o,i);case ic:{const d=n([],i);for(const f of o)d.push(r(f));return d}case Bd:{const d=n({},i);for(const[f,m]of o)d[r(f)]=r(m);return d}case ng:return n(new Date(o),i);case rg:{const{source:d,flags:f}=o;return n(new RegExp(d,f),i)}case ag:{const d=n(new Map,i);for(const[f,m]of o)d.set(r(f),r(m));return d}case ig:{const d=n(new Set,i);for(const f of o)d.add(r(f));return d}case i7:{const{name:d,message:f}=o;return n(new y5[d](f),i)}case l7:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:d}=new Uint8Array(o);return n(new DataView(d),o)}}return n(new y5[s](o),i)};return r},v5=e=>fM(new Map,e)(0),bo="",{toString:hM}={},{keys:mM}=Object,Zu=e=>{const t=typeof e;if(t!=="object"||!e)return[df,t];const n=hM.call(e).slice(8,-1);switch(n){case"Array":return[ic,bo];case"Object":return[Bd,bo];case"Date":return[ng,bo];case"RegExp":return[rg,bo];case"Map":return[ag,bo];case"Set":return[ig,bo];case"DataView":return[ic,n]}return n.includes("Array")?[ic,n]:n.includes("Error")?[i7,n]:[Bd,n]},W0=([e,t])=>e===df&&(t==="function"||t==="symbol"),pM=(e,t,n,r)=>{const i=(o,d)=>{const f=r.push(o)-1;return n.set(d,f),f},s=o=>{if(n.has(o))return n.get(o);let[d,f]=Zu(o);switch(d){case df:{let y=o;switch(f){case"bigint":d=l7,y=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);y=null;break;case"undefined":return i([a7],o)}return i([d,y],o)}case ic:{if(f){let g=o;return f==="DataView"?g=new Uint8Array(o.buffer):f==="ArrayBuffer"&&(g=new Uint8Array(o)),i([f,[...g]],o)}const y=[],p=i([d,y],o);for(const g of o)y.push(s(g));return p}case Bd:{if(f)switch(f){case"BigInt":return i([f,o.toString()],o);case"Boolean":case"Number":case"String":return i([f,o.valueOf()],o)}if(t&&"toJSON"in o)return s(o.toJSON());const y=[],p=i([d,y],o);for(const g of mM(o))(e||!W0(Zu(o[g])))&&y.push([s(g),s(o[g])]);return p}case ng:return i([d,o.toISOString()],o);case rg:{const{source:y,flags:p}=o;return i([d,{source:y,flags:p}],o)}case ag:{const y=[],p=i([d,y],o);for(const[g,x]of o)(e||!(W0(Zu(g))||W0(Zu(x))))&&y.push([s(g),s(x)]);return p}case ig:{const y=[],p=i([d,y],o);for(const g of o)(e||!W0(Zu(g)))&&y.push(s(g));return p}}const{message:m}=o;return i([d,{name:f,message:m}],o)};return s},x5=(e,{json:t,lossy:n}={})=>{const r=[];return pM(!(t||n),!!t,new Map,r)(e),r},Od=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?v5(x5(e,t)):structuredClone(e):(e,t)=>v5(x5(e,t));function gM(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 yM(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function vM(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||gM,r=e.options.footnoteBackLabel||yM,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let f=-1;for(;++f<e.footnoteOrder.length;){const m=e.footnoteById.get(e.footnoteOrder[f]);if(!m)continue;const y=e.all(m),p=String(m.identifier).toUpperCase(),g=Wo(p.toLowerCase());let x=0;const w=[],k=e.footnoteCounts.get(p);for(;k!==void 0&&++x<=k;){w.length>0&&w.push({type:"text",value:" "});let _=typeof n=="string"?n:n(f,x);typeof _=="string"&&(_={type:"text",value:_}),w.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+g+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(f,x),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const j=y[y.length-1];if(j&&j.type==="element"&&j.tagName==="p"){const _=j.children[j.children.length-1];_&&_.type==="text"?_.value+=" ":j.children.push({type:"text",value:" "}),j.children.push(...w)}else y.push(...w);const N={type:"element",tagName:"li",properties:{id:t+"fn-"+g},children:e.wrap(y,!0)};e.patch(m,N),d.push(N)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Od(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
75
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
|
|
76
|
+
`}]}}const zc=(function(e){if(e==null)return SM;if(typeof e=="function")return ff(e);if(typeof e=="object")return Array.isArray(e)?xM(e):bM(e);if(typeof e=="string")return wM(e);throw new Error("Expected function, string, or object as test")});function xM(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=zc(e[n]);return ff(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function bM(e){const t=e;return ff(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function wM(e){return ff(t);function t(n){return n&&n.type===e}}function ff(e){return t;function t(n,r,i){return!!(kM(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function SM(){return!0}function kM(e){return e!==null&&typeof e=="object"&&"type"in e}const s7=[],NM=!0,J1=!1,o7="skip";function lg(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=zc(i),o=r?-1:1;d(e,void 0,[])();function d(f,m,y){const p=f&&typeof f=="object"?f:{};if(typeof p.type=="string"){const x=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(g,"name",{value:"node ("+(f.type+(x?"<"+x+">":""))+")"})}return g;function g(){let x=s7,w,k,j;if((!t||s(f,m,y[y.length-1]||void 0))&&(x=jM(n(f,y)),x[0]===J1))return x;if("children"in f&&f.children){const N=f;if(N.children&&x[0]!==o7)for(k=(r?N.children.length:-1)+o,j=y.concat(N);k>-1&&k<N.children.length;){const _=N.children[k];if(w=d(_,k,j)(),w[0]===J1)return w;k=typeof w[1]=="number"?w[1]:k+o}}return x}}}function jM(e){return Array.isArray(e)?e:typeof e=="number"?[NM,e]:e==null?s7:[e]}function sg(e,t,n,r){let i,s,o;typeof t=="function"&&typeof n!="function"?(s=void 0,o=t,i=n):(s=t,o=n,i=r),lg(e,s,d,i);function d(f,m){const y=m[m.length-1],p=y?y.children.indexOf(f):void 0;return o(f,p,y)}}const ep={}.hasOwnProperty,CM={};function EM(e,t){const n=t||CM,r=new Map,i=new Map,s=new Map,o={...dM,...n.handlers},d={all:m,applyData:_M,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:o,one:f,options:n,patch:MM,wrap:TM};return sg(e,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const p=y.type==="definition"?r:i,g=String(y.identifier).toUpperCase();p.has(g)||p.set(g,y)}}),d;function f(y,p){const g=y.type,x=d.handlers[g];if(ep.call(d.handlers,g)&&x)return x(d,y,p);if(d.options.passThrough&&d.options.passThrough.includes(g)){if("children"in y){const{children:k,...j}=y,N=Od(j);return N.children=d.all(y),N}return Od(y)}return(d.options.unknownHandler||AM)(d,y,p)}function m(y){const p=[];if("children"in y){const g=y.children;let x=-1;for(;++x<g.length;){const w=d.one(g[x],y);if(w){if(x&&g[x-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=b5(w.value)),!Array.isArray(w)&&w.type==="element")){const k=w.children[0];k&&k.type==="text"&&(k.value=b5(k.value))}Array.isArray(w)?p.push(...w):p.push(w)}}}return p}}function MM(e,t){e.position&&(t.position=yj(e))}function _M(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&s&&Object.assign(n.properties,Od(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function AM(e,t){const n=t.data||{},r="value"in t&&!(ep.call(n,"hProperties")||ep.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function TM(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
77
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
78
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
79
|
+
`}),n}function b5(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function w5(e,t){const n=EM(e,t),r=n.one(e,void 0),i=vM(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
|
|
80
|
+
`},i),s}function zM(e,t){return e&&"run"in e?async function(n,r){const i=w5(n,{file:r,...t});await e.run(i,r)}:function(n,r){return w5(n,{file:r,...e||t})}}function S5(e){if(e)throw e}var Zm,k5;function DM(){if(k5)return Zm;k5=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(m){return typeof Array.isArray=="function"?Array.isArray(m):t.call(m)==="[object Array]"},s=function(m){if(!m||t.call(m)!=="[object Object]")return!1;var y=e.call(m,"constructor"),p=m.constructor&&m.constructor.prototype&&e.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!y&&!p)return!1;var g;for(g in m);return typeof g>"u"||e.call(m,g)},o=function(m,y){n&&y.name==="__proto__"?n(m,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):m[y.name]=y.newValue},d=function(m,y){if(y==="__proto__")if(e.call(m,y)){if(r)return r(m,y).value}else return;return m[y]};return Zm=function f(){var m,y,p,g,x,w,k=arguments[0],j=1,N=arguments.length,_=!1;for(typeof k=="boolean"&&(_=k,k=arguments[1]||{},j=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});j<N;++j)if(m=arguments[j],m!=null)for(y in m)p=d(k,y),g=d(m,y),k!==g&&(_&&g&&(s(g)||(x=i(g)))?(x?(x=!1,w=p&&i(p)?p:[]):w=p&&s(p)?p:{},o(k,{name:y,newValue:f(_,w,g)})):typeof g<"u"&&o(k,{name:y,newValue:g}));return k},Zm}var LM=DM();const Qm=Nc(LM);function tp(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 RM(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);d(null,...i);function d(f,...m){const y=e[++s];let p=-1;if(f){o(f);return}for(;++p<i.length;)(m[p]===null||m[p]===void 0)&&(m[p]=i[p]);i=m,y?BM(y,d)(...m):o(null,...m)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function BM(e,t){let n;return r;function r(...o){const d=e.length>o.length;let f;d&&o.push(i);try{f=e.apply(this,o)}catch(m){const y=m;if(d&&n)throw y;return i(y)}d||(f&&f.then&&typeof f.then=="function"?f.then(s,i):f instanceof Error?i(f):s(f))}function i(o,...d){n||(n=!0,t(o,...d))}function s(o){i(null,o)}}const ui={basename:OM,dirname:$M,extname:HM,join:qM,sep:"/"};function OM(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Dc(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,d=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else o<0&&(s=!0,o=i+1),d>-1&&(e.codePointAt(i)===t.codePointAt(d--)?d<0&&(r=i):(d=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function $M(e){if(Dc(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function HM(e){Dc(e);let t=e.length,n=-1,r=0,i=-1,s=0,o;for(;t--;){const d=e.codePointAt(t);if(d===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),d===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function qM(...e){let t=-1,n;for(;++t<e.length;)Dc(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":UM(n)}function UM(e){Dc(e);const t=e.codePointAt(0)===47;let n=IM(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function IM(e,t){let n="",r=0,i=-1,s=0,o=-1,d,f;for(;++o<=e.length;){if(o<e.length)d=e.codePointAt(o);else{if(d===47)break;d=47}if(d===47){if(!(i===o-1||s===1))if(i!==o-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",r=0):(n=n.slice(0,f),r=n.length-1-n.lastIndexOf("/")),i=o,s=0;continue}}else if(n.length>0){n="",r=0,i=o,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,s=0}else d===46&&s>-1?s++:s=-1}return n}function Dc(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const PM={cwd:FM};function FM(){return"/"}function np(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function VM(e){if(typeof e=="string")e=new URL(e);else if(!np(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 GM(e)}function GM(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Wm=["history","path","basename","stem","extname","dirname"];class u7{constructor(t){let n;t?np(t)?n={path:t}:typeof t=="string"||YM(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":PM.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Wm.length;){const s=Wm[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)Wm.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?ui.basename(this.path):void 0}set basename(t){e1(t,"basename"),Jm(t,"basename"),this.path=ui.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ui.dirname(this.path):void 0}set dirname(t){N5(this.basename,"dirname"),this.path=ui.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ui.extname(this.path):void 0}set extname(t){if(Jm(t,"extname"),N5(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=ui.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){np(t)&&(t=VM(t)),e1(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ui.basename(this.path,this.extname):void 0}set stem(t){e1(t,"stem"),Jm(t,"stem"),this.path=ui.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Sr(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Jm(e,t){if(e&&e.includes(ui.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ui.sep+"`")}function e1(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function N5(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function YM(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const XM=(function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),KM={}.hasOwnProperty;class og extends XM{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=RM()}copy(){const t=new og;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Qm(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(r1("data",this.frozen),this.namespace[t]=n,this):KM.call(this.namespace,t)&&this.namespace[t]||void 0:t?(r1("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,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=J0(t),r=this.parser||this.Parser;return t1("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),t1("process",this.parser||this.Parser),n1("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,o){const d=J0(t),f=r.parse(d);r.run(f,d,function(y,p,g){if(y||!p||!g)return m(y);const x=p,w=r.stringify(x,g);WM(w)?g.value=w:g.result=w,m(y,g)});function m(y,p){y||!p?o(y):s?s(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),t1("processSync",this.parser||this.Parser),n1("processSync",this.compiler||this.Compiler),this.process(t,i),C5("processSync","process",n),r;function i(s,o){n=!0,S5(s),r=o}}run(t,n,r){j5(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(o,d){const f=J0(n);i.run(t,f,m);function m(y,p,g){const x=p||t;y?d(y):o?o(x):r(void 0,x,g)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),C5("runSync","run",r),i;function s(o,d){S5(o),i=d,r=!0}}stringify(t,n){this.freeze();const r=J0(n),i=this.compiler||this.Compiler;return n1("stringify",i),j5(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(r1("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?d(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(m){if(typeof m=="function")f(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[y,...p]=m;f(y,p)}else o(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function o(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");d(m.plugins),m.settings&&(i.settings=Qm(!0,i.settings,m.settings))}function d(m){let y=-1;if(m!=null)if(Array.isArray(m))for(;++y<m.length;){const p=m[y];s(p)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function f(m,y){let p=-1,g=-1;for(;++p<r.length;)if(r[p][0]===m){g=p;break}if(g===-1)r.push([m,...y]);else if(y.length>0){let[x,...w]=y;const k=r[g][1];tp(k)&&tp(x)&&(x=Qm(!0,k,x)),r[g]=[m,x,...w]}}}}const ZM=new og().freeze();function t1(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function n1(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function r1(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 j5(e){if(!tp(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function C5(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function J0(e){return QM(e)?e:new u7(e)}function QM(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function WM(e){return typeof e=="string"||JM(e)}function JM(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const e_="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",E5=[],M5={allowDangerousHtml:!0},t_=/^(https?|ircs?|mailto|xmpp)$/i,n_=[{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 r_(e){const t=a_(e),n=i_(e);return l_(t.runSync(t.parse(n),n),e)}function a_(e){const t=e.rehypePlugins||E5,n=e.remarkPlugins||E5,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...M5}:M5;return ZM().use(HE).use(n).use(zM,r).use(t)}function i_(e){const t=e.children||"",n=new u7;return typeof t=="string"&&(n.value=t),n}function l_(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,o=t.skipHtml,d=t.unwrapDisallowed,f=t.urlTransform||s_;for(const y of n_)Object.hasOwn(t,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+e_+y.id,void 0);return sg(e,m),Sj(e,{Fragment:c.Fragment,components:i,ignoreInvalidStyle:!0,jsx:c.jsx,jsxs:c.jsxs,passKeys:!0,passNode:!0});function m(y,p,g){if(y.type==="raw"&&g&&typeof p=="number")return o?g.children.splice(p,1):g.children[p]={type:"text",value:y.value},p;if(y.type==="element"){let x;for(x in Ym)if(Object.hasOwn(Ym,x)&&Object.hasOwn(y.properties,x)){const w=y.properties[x],k=Ym[x];(k===null||k.includes(y.tagName))&&(y.properties[x]=f(String(w||""),x,y))}}if(y.type==="element"){let x=n?!n.includes(y.tagName):s?s.includes(y.tagName):!1;if(!x&&r&&typeof p=="number"&&(x=!r(y,p,g)),x&&g&&typeof p=="number")return d&&y.children?g.children.splice(p,1,...y.children):g.children.splice(p,1),p}}}function s_(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||t_.test(e.slice(0,t))?e:""}const _5=/[#.]/g;function o_(e,t){const n=e||"",r={};let i=0,s,o;for(;i<n.length;){_5.lastIndex=i;const d=_5.exec(n),f=n.slice(i,d?d.index:n.length);f&&(s?s==="#"?r.id=f:Array.isArray(r.className)?r.className.push(f):r.className=[f]:o=f,i+=f.length),d&&(s=d[0],i++)}return{type:"element",tagName:o||t||"div",properties:r,children:[]}}function c7(e,t,n){const r=n?f_(n):void 0;function i(s,o,...d){let f;if(s==null){f={type:"root",children:[]};const m=o;d.unshift(m)}else{f=o_(s,t);const m=f.tagName.toLowerCase(),y=r?r.get(m):void 0;if(f.tagName=y||m,u_(o))d.unshift(o);else for(const[p,g]of Object.entries(o))c_(e,f.properties,p,g)}for(const m of d)rp(f.children,m);return f.type==="element"&&f.tagName==="template"&&(f.content={type:"root",children:f.children},f.children=[]),f}return i}function u_(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 r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const s=i;for(const o of s)if(typeof o!="number"&&typeof o!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function c_(e,t,n,r){const i=L6(e,n);let s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=Zv(r):i.commaSeparated?s=Vv(r):i.commaOrSpaceSeparated?s=Zv(Vv(r).join(" ")):s=A5(i,i.property,r):Array.isArray(r)?s=[...r]:s=i.property==="style"?d_(r):String(r);if(Array.isArray(s)){const o=[];for(const d of s)o.push(A5(i,i.property,d));s=o}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function rp(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)rp(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?rp(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function A5(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||cc(n)===cc(t)))return!0}return n}function d_(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function f_(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const h_=["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"],m_=c7(R6,"div"),p_=c7(of,"g",h_),a1={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function g_(e,t){return d7(e,{})||{type:"root",children:[]}}function d7(e,t){const n=y_(e,t);return n&&t.afterTransform&&t.afterTransform(e,n),n}function y_(e,t){switch(e.nodeType){case 1:return w_(e,t);case 3:return x_(e);case 8:return b_(e);case 9:return T5(e,t);case 10:return v_();case 11:return T5(e,t);default:return}}function T5(e,t){return{type:"root",children:f7(e,t)}}function v_(){return{type:"doctype"}}function x_(e){return{type:"text",value:e.nodeValue||""}}function b_(e){return{type:"comment",value:e.nodeValue||""}}function w_(e,t){const n=e.namespaceURI,r=n===a1.svg?p_:m_,i=n===a1.html?e.tagName.toLowerCase():e.tagName,s=n===a1.html&&i==="template"?e.content:e,o=e.getAttributeNames(),d={};let f=-1;for(;++f<o.length;)d[o[f]]=e.getAttribute(o[f])||"";return r(i,d,f7(s,t))}function f7(e,t){const n=e.childNodes,r=[];let i=-1;for(;++i<n.length;){const s=d7(n[i],t);s!==void 0&&r.push(s)}return r}new DOMParser;function S_(e,t){const n=k_(e);return g_(n)}function k_(e){const t=document.createElement("template");return t.innerHTML=e,t.content}const z5=(function(e,t,n){const r=zc(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(r(e.children[t],t,e))return e.children[t]}),qs=(function(e){if(e==null)return C_;if(typeof e=="string")return j_(e);if(typeof e=="object")return N_(e);if(typeof e=="function")return ug(e);throw new Error("Expected function, string, or array as `test`")});function N_(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=qs(e[n]);return ug(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function j_(e){return ug(t);function t(n){return n.tagName===e}}function ug(e){return t;function t(n,r,i){return!!(E_(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function C_(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function E_(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const D5=/\n/g,L5=/[\t ]+/g,ap=qs("br"),R5=qs(R_),M_=qs("p"),B5=qs("tr"),__=qs(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",L_,B_]),h7=qs(["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 A_(e,t){const n=t||{},r="children"in e?e.children:[],i=h7(e),s=g7(e,{whitespace:n.whitespace||"normal"}),o=[];(e.type==="text"||e.type==="comment")&&o.push(...p7(e,{breakBefore:!0,breakAfter:!0}));let d=-1;for(;++d<r.length;)o.push(...m7(r[d],e,{whitespace:s,breakBefore:d?void 0:i,breakAfter:d<r.length-1?ap(r[d+1]):i}));const f=[];let m;for(d=-1;++d<o.length;){const y=o[d];typeof y=="number"?m!==void 0&&y>m&&(m=y):y&&(m!==void 0&&m>-1&&f.push(`
|
|
81
|
+
`.repeat(m)||" "),m=-1,f.push(y))}return f.join("")}function m7(e,t,n){return e.type==="element"?T_(e,t,n):e.type==="text"?n.whitespace==="normal"?p7(e,n):z_(e):[]}function T_(e,t,n){const r=g7(e,n),i=e.children||[];let s=-1,o=[];if(__(e))return o;let d,f;for(ap(e)||B5(e)&&z5(t,e,B5)?f=`
|
|
82
|
+
`:M_(e)?(d=2,f=2):h7(e)&&(d=1,f=1);++s<i.length;)o=o.concat(m7(i[s],e,{whitespace:r,breakBefore:s?void 0:d,breakAfter:s<i.length-1?ap(i[s+1]):f}));return R5(e)&&z5(t,e,R5)&&o.push(" "),d&&o.unshift(d),f&&o.push(f),o}function p7(e,t){const n=String(e.value),r=[],i=[];let s=0;for(;s<=n.length;){D5.lastIndex=s;const f=D5.exec(n),m=f&&"index"in f?f.index:n.length;r.push(D_(n.slice(s,m).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),s===0?t.breakBefore:!0,m===n.length?t.breakAfter:!0)),s=m+1}let o=-1,d;for(;++o<r.length;)r[o].charCodeAt(r[o].length-1)===8203||o<r.length-1&&r[o+1].charCodeAt(0)===8203?(i.push(r[o]),d=void 0):r[o]?(typeof d=="number"&&i.push(d),i.push(r[o]),d=0):(o===0||o===r.length-1)&&i.push(0);return i}function z_(e){return[String(e.value)]}function D_(e,t,n){const r=[];let i=0,s;for(;i<e.length;){L5.lastIndex=i;const o=L5.exec(e);s=o?o.index:e.length,!i&&!s&&o&&!t&&r.push(""),i!==s&&r.push(e.slice(i,s)),i=o?s+o[0].length:s}return i!==s&&!n&&r.push(""),r.join(" ")}function g7(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 L_(e){return!!(e.properties||{}).hidden}function R_(e){return e.tagName==="td"||e.tagName==="th"}function B_(e){return e.tagName==="dialog"&&!(e.properties||{}).open}class Te extends Error{constructor(t,n){var r="KaTeX parse error: "+t,i,s,o=n&&n.loc;if(o&&o.start<=o.end){var d=o.lexer.input;i=o.start,s=o.end,i===d.length?r+=" at end of input: ":r+=" at position "+(i+1)+": ";var f=d.slice(i,s).replace(/[^]/g,"$&̲"),m;i>15?m="…"+d.slice(i-15,i):m=d.slice(0,i);var y;s+15<d.length?y=d.slice(s,s+15)+"…":y=d.slice(s),r+=m+f+y}super(r),this.name="ParseError",Object.setPrototypeOf(this,Te.prototype),this.position=i,i!=null&&s!=null&&(this.length=s-i),this.rawMessage=t}}var O_=/([A-Z])/g,cg=e=>e.replace(O_,"-$1").toLowerCase(),$_={"&":"&",">":">","<":"<",'"':""","'":"'"},H_=/[&><"']/g,wr=e=>String(e).replace(H_,t=>$_[t]),jd=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?jd(e.body[0]):e:e.type==="font"?jd(e.body):e,q_=new Set(["mathord","textord","atom"]),rl=e=>q_.has(jd(e).type),U_=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():"_relative"},ip={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 I_(e){if("default"in e)return e.default;var t=e.type,n=Array.isArray(t)?t[0]:t;if(typeof n!="string")return n.enum[0];switch(n){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class dg{constructor(t){t===void 0&&(t={}),t=t||{};for(var n of Object.keys(ip)){var r=ip[n],i=t[n];this[n]=i!==void 0?r.processor?r.processor(i):i:I_(r)}}reportNonstrict(t,n,r){var i=this.strict;if(typeof i=="function"&&(i=i(t,n,r)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new Te("LaTeX-incompatible input and strict mode is set to 'error': "+(n+" ["+t+"]"),r);i==="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 '"+i+"': "+n+" ["+t+"]"))}}useStrictBehavior(t,n,r){var i=this.strict;if(typeof i=="function")try{i=i(t,n,r)}catch{i="error"}return!i||i==="ignore"?!1:i===!0||i==="error"?!0:i==="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 '"+i+"': "+n+" ["+t+"]")),!1)}isTrusted(t){if("url"in t&&t.url&&!t.protocol){var n=U_(t.url);if(n==null)return!1;t.protocol=n}var r=typeof this.trust=="function"?this.trust(t):this.trust;return!!r}}class Ul{constructor(t,n,r){this.id=t,this.size=n,this.cramped=r}sup(){return ci[P_[this.id]]}sub(){return ci[F_[this.id]]}fracNum(){return ci[V_[this.id]]}fracDen(){return ci[G_[this.id]]}cramp(){return ci[Y_[this.id]]}text(){return ci[X_[this.id]]}isTight(){return this.size>=2}}var fg=0,$d=1,Ro=2,Wi=3,fc=4,Aa=5,Ho=6,zr=7,ci=[new Ul(fg,0,!1),new Ul($d,0,!0),new Ul(Ro,1,!1),new Ul(Wi,1,!0),new Ul(fc,2,!1),new Ul(Aa,2,!0),new Ul(Ho,3,!1),new Ul(zr,3,!0)],P_=[fc,Aa,fc,Aa,Ho,zr,Ho,zr],F_=[Aa,Aa,Aa,Aa,zr,zr,zr,zr],V_=[Ro,Wi,fc,Aa,Ho,zr,Ho,zr],G_=[Wi,Wi,Aa,Aa,zr,zr,zr,zr],Y_=[$d,$d,Wi,Wi,Aa,Aa,zr,zr],X_=[fg,$d,Ro,Wi,Ro,Wi,Ro,Wi],pt={DISPLAY:ci[fg],TEXT:ci[Ro],SCRIPT:ci[fc],SCRIPTSCRIPT:ci[Ho]},lp=[{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 K_(e){for(var t=0;t<lp.length;t++)for(var n=lp[t],r=0;r<n.blocks.length;r++){var i=n.blocks[r];if(e>=i[0]&&e<=i[1])return n.name}return null}var Cd=[];lp.forEach(e=>e.blocks.forEach(t=>Cd.push(...t)));function y7(e){for(var t=0;t<Cd.length;t+=2)if(e>=Cd[t]&&e<=Cd[t+1])return!0;return!1}var ir=e=>e+" "+e,wo=80,Z_=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"},Q_=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"},W_=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"},J_=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"},eA=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"},tA=function(t){var n=t/2;return"M400000 "+t+" H0 L"+n+" 0 l65 45 L145 "+(t-80)+" H400000z"},nA=function(t,n,r){var i=r-54-n-t;return"M702 "+(t+n)+"H400000"+(40+t)+`
|
|
130
|
+
H742v`+i+`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"},rA=function(t,n,r){n=1e3*n;var i="";switch(t){case"sqrtMain":i=Z_(n,wo);break;case"sqrtSize1":i=Q_(n,wo);break;case"sqrtSize2":i=W_(n,wo);break;case"sqrtSize3":i=J_(n,wo);break;case"sqrtSize4":i=eA(n,wo);break;case"sqrtTall":i=nA(n,wo,r)}return i},aA=function(t,n){switch(t){case"⎜":return ir("M291 0 H417 V"+n+" H291z");case"∣":return ir("M145 0 H188 V"+n+" H145z");case"∥":return ir("M145 0 H188 V"+n+" H145z")+ir("M367 0 H410 V"+n+" H367z");case"⎟":return ir("M457 0 H583 V"+n+" H457z");case"⎢":return ir("M319 0 H403 V"+n+" H319z");case"⎥":return ir("M263 0 H347 V"+n+" H263z");case"⎪":return ir("M384 0 H504 V"+n+" H384z");case"⏐":return ir("M312 0 H355 V"+n+" H312z");case"‖":return ir("M257 0 H300 V"+n+" H257z")+ir("M478 0 H521 V"+n+" H478z");default:return""}},O5={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:ir("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:ir("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:ir("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:ir("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:ir("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:ir("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:ir("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:ir("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`},iA=function(t,n){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v1759 h347 v-84
|
|
305
|
+
H403z M403 1759 V0 H319 V1759 v`+n+" v1759 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.")}};class Jo{constructor(t){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(){var t=n=>n.toText();return this.children.map(t).join("")}}var sp={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},lA={ex:!0,em:!0,mu:!0},v7=function(t){return typeof t!="string"&&(t=t.unit),t in sp||t in lA||t==="ex"},Mn=function(t,n){var r;if(t.unit in sp)r=sp[t.unit]/n.fontMetrics().ptPerEm/n.sizeMultiplier;else if(t.unit==="mu")r=n.fontMetrics().cssEmPerMu;else{var i;if(n.style.isTight()?i=n.havingStyle(n.style.text()):i=n,t.unit==="ex")r=i.fontMetrics().xHeight;else if(t.unit==="em")r=i.fontMetrics().quad;else throw new Te("Invalid unit: '"+t.unit+"'");i!==n&&(r*=i.sizeMultiplier/n.sizeMultiplier)}return Math.min(t.number*r,n.maxSize)},Re=function(t){return+t.toFixed(4)+"em"},Wl=function(t){return t.filter(n=>n).join(" ")},x7=function(t,n,r){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},n){n.style.isTight()&&this.classes.push("mtight");var i=n.getColor();i&&(this.style.color=i)}},b7=function(t){var n=document.createElement(t);n.className=Wl(this.classes);for(var r of Object.keys(this.style))n.style[r]=this.style[r];for(var i of Object.keys(this.attributes))n.setAttribute(i,this.attributes[i]);for(var s=0;s<this.children.length;s++)n.appendChild(this.children[s].toNode());return n},sA=/[\s"'>/=\x00-\x1f]/,w7=function(t){var n="<"+t;this.classes.length&&(n+=' class="'+wr(Wl(this.classes))+'"');var r="";for(var i of Object.keys(this.style))r+=cg(i)+":"+this.style[i]+";";r&&(n+=' style="'+wr(r)+'"');for(var s of Object.keys(this.attributes)){if(sA.test(s))throw new Te("Invalid attribute name '"+s+"'");n+=" "+s+'="'+wr(this.attributes[s])+'"'}n+=">";for(var o=0;o<this.children.length;o++)n+=this.children[o].toMarkup();return n+="</"+t+">",n};class eu{constructor(t,n,r,i){x7.call(this,t,r,i),this.children=n||[]}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return this.classes.includes(t)}toNode(){return b7.call(this,"span")}toMarkup(){return w7.call(this,"span")}}class hf{constructor(t,n,r,i){x7.call(this,n,i),this.children=r||[],this.setAttribute("href",t)}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return this.classes.includes(t)}toNode(){return b7.call(this,"a")}toMarkup(){return w7.call(this,"a")}}class oA{constructor(t,n,r){this.alt=n,this.src=t,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=r}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createElement("img");t.src=this.src,t.alt=this.alt,t.className="mord";for(var n of Object.keys(this.style))t.style[n]=this.style[n];return t}toMarkup(){var t='<img src="'+wr(this.src)+'"'+(' alt="'+wr(this.alt)+'"'),n="";for(var r of Object.keys(this.style))n+=cg(r)+":"+this.style[r]+";";return n&&(t+=' style="'+wr(n)+'"'),t+="'/>",t}}var uA={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class fa{constructor(t,n,r,i,s,o,d,f){this.text=t,this.height=n||0,this.depth=r||0,this.italic=i||0,this.skew=s||0,this.width=o||0,this.classes=d||[],this.style=f||{},this.maxFontSize=0;var m=K_(this.text.charCodeAt(0));m&&this.classes.push(m+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=uA[this.text])}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createTextNode(this.text),n=null;this.italic>0&&(n=document.createElement("span"),n.style.marginRight=Re(this.italic)),this.classes.length>0&&(n=n||document.createElement("span"),n.className=Wl(this.classes));for(var r of Object.keys(this.style))n=n||document.createElement("span"),n.style[r]=this.style[r];return n?(n.appendChild(t),n):t}toMarkup(){var t=!1,n="<span";this.classes.length&&(t=!0,n+=' class="',n+=wr(Wl(this.classes)),n+='"');var r="";this.italic>0&&(r+="margin-right:"+Re(this.italic)+";");for(var i of Object.keys(this.style))r+=cg(i)+":"+this.style[i]+";";r&&(t=!0,n+=' style="'+wr(r)+'"');var s=wr(this.text);return t?(n+=">",n+=s,n+="</span>",n):s}}class tl{constructor(t,n){this.children=t||[],this.attributes=n||{}}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"svg");for(var r of Object.keys(this.attributes))n.setAttribute(r,this.attributes[r]);for(var i=0;i<this.children.length;i++)n.appendChild(this.children[i].toNode());return n}toMarkup(){var t='<svg xmlns="http://www.w3.org/2000/svg"';for(var n of Object.keys(this.attributes))t+=" "+n+'="'+wr(this.attributes[n])+'"';t+=">";for(var r=0;r<this.children.length;r++)t+=this.children[r].toMarkup();return t+="</svg>",t}}class Jl{constructor(t,n){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",O5[this.pathName]),n}toMarkup(){return this.alternate?'<path d="'+wr(this.alternate)+'"/>':'<path d="'+wr(O5[this.pathName])+'"/>'}}class op{constructor(t){this.attributes=t||{}}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"line");for(var r of Object.keys(this.attributes))n.setAttribute(r,this.attributes[r]);return n}toMarkup(){var t="<line";for(var n of Object.keys(this.attributes))t+=" "+n+'="'+wr(this.attributes[n])+'"';return t+="/>",t}}function cA(e){if(e instanceof fa)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}function dA(e){if(e instanceof eu)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}var fA=e=>e instanceof eu||e instanceof hf||e instanceof Jo,gi={"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]}},ed={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]},$5={Å:"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 hA(e,t){gi[e]=t}function hg(e,t,n){if(!gi[t])throw new Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),i=gi[t][r];if(!i&&e[0]in $5&&(r=$5[e[0]].charCodeAt(0),i=gi[t][r]),!i&&n==="text"&&y7(r)&&(i=gi[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var i1={};function mA(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!i1[t]){var n=i1[t]={cssEmPerMu:ed.quad[t]/18};for(var r in ed)ed.hasOwnProperty(r)&&(n[r]=ed[r][t])}return i1[t]}var pA={bin:1,close:1,inner:1,open:1,punct:1,rel:1},gA={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},xn={math:{},text:{}};function S(e,t,n,r,i,s){xn[e][i]={font:t,group:n,replace:r},s&&r&&(xn[e][r]=xn[e][i])}var C="math",Ee="text",z="main",J="ams",wn="accent-token",Ve="bin",Dr="close",tu="inner",it="mathord",Zn="op-token",ma="open",Lc="punct",te="rel",al="spacing",ie="textord";S(C,z,te,"≡","\\equiv",!0);S(C,z,te,"≺","\\prec",!0);S(C,z,te,"≻","\\succ",!0);S(C,z,te,"∼","\\sim",!0);S(C,z,te,"⊥","\\perp");S(C,z,te,"⪯","\\preceq",!0);S(C,z,te,"⪰","\\succeq",!0);S(C,z,te,"≃","\\simeq",!0);S(C,z,te,"∣","\\mid",!0);S(C,z,te,"≪","\\ll",!0);S(C,z,te,"≫","\\gg",!0);S(C,z,te,"≍","\\asymp",!0);S(C,z,te,"∥","\\parallel");S(C,z,te,"⋈","\\bowtie",!0);S(C,z,te,"⌣","\\smile",!0);S(C,z,te,"⊑","\\sqsubseteq",!0);S(C,z,te,"⊒","\\sqsupseteq",!0);S(C,z,te,"≐","\\doteq",!0);S(C,z,te,"⌢","\\frown",!0);S(C,z,te,"∋","\\ni",!0);S(C,z,te,"∝","\\propto",!0);S(C,z,te,"⊢","\\vdash",!0);S(C,z,te,"⊣","\\dashv",!0);S(C,z,te,"∋","\\owns");S(C,z,Lc,".","\\ldotp");S(C,z,Lc,"⋅","\\cdotp");S(C,z,Lc,"⋅","·");S(Ee,z,ie,"⋅","·");S(C,z,ie,"#","\\#");S(Ee,z,ie,"#","\\#");S(C,z,ie,"&","\\&");S(Ee,z,ie,"&","\\&");S(C,z,ie,"ℵ","\\aleph",!0);S(C,z,ie,"∀","\\forall",!0);S(C,z,ie,"ℏ","\\hbar",!0);S(C,z,ie,"∃","\\exists",!0);S(C,z,ie,"∇","\\nabla",!0);S(C,z,ie,"♭","\\flat",!0);S(C,z,ie,"ℓ","\\ell",!0);S(C,z,ie,"♮","\\natural",!0);S(C,z,ie,"♣","\\clubsuit",!0);S(C,z,ie,"℘","\\wp",!0);S(C,z,ie,"♯","\\sharp",!0);S(C,z,ie,"♢","\\diamondsuit",!0);S(C,z,ie,"ℜ","\\Re",!0);S(C,z,ie,"♡","\\heartsuit",!0);S(C,z,ie,"ℑ","\\Im",!0);S(C,z,ie,"♠","\\spadesuit",!0);S(C,z,ie,"§","\\S",!0);S(Ee,z,ie,"§","\\S");S(C,z,ie,"¶","\\P",!0);S(Ee,z,ie,"¶","\\P");S(C,z,ie,"†","\\dag");S(Ee,z,ie,"†","\\dag");S(Ee,z,ie,"†","\\textdagger");S(C,z,ie,"‡","\\ddag");S(Ee,z,ie,"‡","\\ddag");S(Ee,z,ie,"‡","\\textdaggerdbl");S(C,z,Dr,"⎱","\\rmoustache",!0);S(C,z,ma,"⎰","\\lmoustache",!0);S(C,z,Dr,"⟯","\\rgroup",!0);S(C,z,ma,"⟮","\\lgroup",!0);S(C,z,Ve,"∓","\\mp",!0);S(C,z,Ve,"⊖","\\ominus",!0);S(C,z,Ve,"⊎","\\uplus",!0);S(C,z,Ve,"⊓","\\sqcap",!0);S(C,z,Ve,"∗","\\ast");S(C,z,Ve,"⊔","\\sqcup",!0);S(C,z,Ve,"◯","\\bigcirc",!0);S(C,z,Ve,"∙","\\bullet",!0);S(C,z,Ve,"‡","\\ddagger");S(C,z,Ve,"≀","\\wr",!0);S(C,z,Ve,"⨿","\\amalg");S(C,z,Ve,"&","\\And");S(C,z,te,"⟵","\\longleftarrow",!0);S(C,z,te,"⇐","\\Leftarrow",!0);S(C,z,te,"⟸","\\Longleftarrow",!0);S(C,z,te,"⟶","\\longrightarrow",!0);S(C,z,te,"⇒","\\Rightarrow",!0);S(C,z,te,"⟹","\\Longrightarrow",!0);S(C,z,te,"↔","\\leftrightarrow",!0);S(C,z,te,"⟷","\\longleftrightarrow",!0);S(C,z,te,"⇔","\\Leftrightarrow",!0);S(C,z,te,"⟺","\\Longleftrightarrow",!0);S(C,z,te,"↦","\\mapsto",!0);S(C,z,te,"⟼","\\longmapsto",!0);S(C,z,te,"↗","\\nearrow",!0);S(C,z,te,"↩","\\hookleftarrow",!0);S(C,z,te,"↪","\\hookrightarrow",!0);S(C,z,te,"↘","\\searrow",!0);S(C,z,te,"↼","\\leftharpoonup",!0);S(C,z,te,"⇀","\\rightharpoonup",!0);S(C,z,te,"↙","\\swarrow",!0);S(C,z,te,"↽","\\leftharpoondown",!0);S(C,z,te,"⇁","\\rightharpoondown",!0);S(C,z,te,"↖","\\nwarrow",!0);S(C,z,te,"⇌","\\rightleftharpoons",!0);S(C,J,te,"≮","\\nless",!0);S(C,J,te,"","\\@nleqslant");S(C,J,te,"","\\@nleqq");S(C,J,te,"⪇","\\lneq",!0);S(C,J,te,"≨","\\lneqq",!0);S(C,J,te,"","\\@lvertneqq");S(C,J,te,"⋦","\\lnsim",!0);S(C,J,te,"⪉","\\lnapprox",!0);S(C,J,te,"⊀","\\nprec",!0);S(C,J,te,"⋠","\\npreceq",!0);S(C,J,te,"⋨","\\precnsim",!0);S(C,J,te,"⪹","\\precnapprox",!0);S(C,J,te,"≁","\\nsim",!0);S(C,J,te,"","\\@nshortmid");S(C,J,te,"∤","\\nmid",!0);S(C,J,te,"⊬","\\nvdash",!0);S(C,J,te,"⊭","\\nvDash",!0);S(C,J,te,"⋪","\\ntriangleleft");S(C,J,te,"⋬","\\ntrianglelefteq",!0);S(C,J,te,"⊊","\\subsetneq",!0);S(C,J,te,"","\\@varsubsetneq");S(C,J,te,"⫋","\\subsetneqq",!0);S(C,J,te,"","\\@varsubsetneqq");S(C,J,te,"≯","\\ngtr",!0);S(C,J,te,"","\\@ngeqslant");S(C,J,te,"","\\@ngeqq");S(C,J,te,"⪈","\\gneq",!0);S(C,J,te,"≩","\\gneqq",!0);S(C,J,te,"","\\@gvertneqq");S(C,J,te,"⋧","\\gnsim",!0);S(C,J,te,"⪊","\\gnapprox",!0);S(C,J,te,"⊁","\\nsucc",!0);S(C,J,te,"⋡","\\nsucceq",!0);S(C,J,te,"⋩","\\succnsim",!0);S(C,J,te,"⪺","\\succnapprox",!0);S(C,J,te,"≆","\\ncong",!0);S(C,J,te,"","\\@nshortparallel");S(C,J,te,"∦","\\nparallel",!0);S(C,J,te,"⊯","\\nVDash",!0);S(C,J,te,"⋫","\\ntriangleright");S(C,J,te,"⋭","\\ntrianglerighteq",!0);S(C,J,te,"","\\@nsupseteqq");S(C,J,te,"⊋","\\supsetneq",!0);S(C,J,te,"","\\@varsupsetneq");S(C,J,te,"⫌","\\supsetneqq",!0);S(C,J,te,"","\\@varsupsetneqq");S(C,J,te,"⊮","\\nVdash",!0);S(C,J,te,"⪵","\\precneqq",!0);S(C,J,te,"⪶","\\succneqq",!0);S(C,J,te,"","\\@nsubseteqq");S(C,J,Ve,"⊴","\\unlhd");S(C,J,Ve,"⊵","\\unrhd");S(C,J,te,"↚","\\nleftarrow",!0);S(C,J,te,"↛","\\nrightarrow",!0);S(C,J,te,"⇍","\\nLeftarrow",!0);S(C,J,te,"⇏","\\nRightarrow",!0);S(C,J,te,"↮","\\nleftrightarrow",!0);S(C,J,te,"⇎","\\nLeftrightarrow",!0);S(C,J,te,"△","\\vartriangle");S(C,J,ie,"ℏ","\\hslash");S(C,J,ie,"▽","\\triangledown");S(C,J,ie,"◊","\\lozenge");S(C,J,ie,"Ⓢ","\\circledS");S(C,J,ie,"®","\\circledR");S(Ee,J,ie,"®","\\circledR");S(C,J,ie,"∡","\\measuredangle",!0);S(C,J,ie,"∄","\\nexists");S(C,J,ie,"℧","\\mho");S(C,J,ie,"Ⅎ","\\Finv",!0);S(C,J,ie,"⅁","\\Game",!0);S(C,J,ie,"‵","\\backprime");S(C,J,ie,"▲","\\blacktriangle");S(C,J,ie,"▼","\\blacktriangledown");S(C,J,ie,"■","\\blacksquare");S(C,J,ie,"⧫","\\blacklozenge");S(C,J,ie,"★","\\bigstar");S(C,J,ie,"∢","\\sphericalangle",!0);S(C,J,ie,"∁","\\complement",!0);S(C,J,ie,"ð","\\eth",!0);S(Ee,z,ie,"ð","ð");S(C,J,ie,"╱","\\diagup");S(C,J,ie,"╲","\\diagdown");S(C,J,ie,"□","\\square");S(C,J,ie,"□","\\Box");S(C,J,ie,"◊","\\Diamond");S(C,J,ie,"¥","\\yen",!0);S(Ee,J,ie,"¥","\\yen",!0);S(C,J,ie,"✓","\\checkmark",!0);S(Ee,J,ie,"✓","\\checkmark");S(C,J,ie,"ℶ","\\beth",!0);S(C,J,ie,"ℸ","\\daleth",!0);S(C,J,ie,"ℷ","\\gimel",!0);S(C,J,ie,"ϝ","\\digamma",!0);S(C,J,ie,"ϰ","\\varkappa");S(C,J,ma,"┌","\\@ulcorner",!0);S(C,J,Dr,"┐","\\@urcorner",!0);S(C,J,ma,"└","\\@llcorner",!0);S(C,J,Dr,"┘","\\@lrcorner",!0);S(C,J,te,"≦","\\leqq",!0);S(C,J,te,"⩽","\\leqslant",!0);S(C,J,te,"⪕","\\eqslantless",!0);S(C,J,te,"≲","\\lesssim",!0);S(C,J,te,"⪅","\\lessapprox",!0);S(C,J,te,"≊","\\approxeq",!0);S(C,J,Ve,"⋖","\\lessdot");S(C,J,te,"⋘","\\lll",!0);S(C,J,te,"≶","\\lessgtr",!0);S(C,J,te,"⋚","\\lesseqgtr",!0);S(C,J,te,"⪋","\\lesseqqgtr",!0);S(C,J,te,"≑","\\doteqdot");S(C,J,te,"≓","\\risingdotseq",!0);S(C,J,te,"≒","\\fallingdotseq",!0);S(C,J,te,"∽","\\backsim",!0);S(C,J,te,"⋍","\\backsimeq",!0);S(C,J,te,"⫅","\\subseteqq",!0);S(C,J,te,"⋐","\\Subset",!0);S(C,J,te,"⊏","\\sqsubset",!0);S(C,J,te,"≼","\\preccurlyeq",!0);S(C,J,te,"⋞","\\curlyeqprec",!0);S(C,J,te,"≾","\\precsim",!0);S(C,J,te,"⪷","\\precapprox",!0);S(C,J,te,"⊲","\\vartriangleleft");S(C,J,te,"⊴","\\trianglelefteq");S(C,J,te,"⊨","\\vDash",!0);S(C,J,te,"⊪","\\Vvdash",!0);S(C,J,te,"⌣","\\smallsmile");S(C,J,te,"⌢","\\smallfrown");S(C,J,te,"≏","\\bumpeq",!0);S(C,J,te,"≎","\\Bumpeq",!0);S(C,J,te,"≧","\\geqq",!0);S(C,J,te,"⩾","\\geqslant",!0);S(C,J,te,"⪖","\\eqslantgtr",!0);S(C,J,te,"≳","\\gtrsim",!0);S(C,J,te,"⪆","\\gtrapprox",!0);S(C,J,Ve,"⋗","\\gtrdot");S(C,J,te,"⋙","\\ggg",!0);S(C,J,te,"≷","\\gtrless",!0);S(C,J,te,"⋛","\\gtreqless",!0);S(C,J,te,"⪌","\\gtreqqless",!0);S(C,J,te,"≖","\\eqcirc",!0);S(C,J,te,"≗","\\circeq",!0);S(C,J,te,"≜","\\triangleq",!0);S(C,J,te,"∼","\\thicksim");S(C,J,te,"≈","\\thickapprox");S(C,J,te,"⫆","\\supseteqq",!0);S(C,J,te,"⋑","\\Supset",!0);S(C,J,te,"⊐","\\sqsupset",!0);S(C,J,te,"≽","\\succcurlyeq",!0);S(C,J,te,"⋟","\\curlyeqsucc",!0);S(C,J,te,"≿","\\succsim",!0);S(C,J,te,"⪸","\\succapprox",!0);S(C,J,te,"⊳","\\vartriangleright");S(C,J,te,"⊵","\\trianglerighteq");S(C,J,te,"⊩","\\Vdash",!0);S(C,J,te,"∣","\\shortmid");S(C,J,te,"∥","\\shortparallel");S(C,J,te,"≬","\\between",!0);S(C,J,te,"⋔","\\pitchfork",!0);S(C,J,te,"∝","\\varpropto");S(C,J,te,"◀","\\blacktriangleleft");S(C,J,te,"∴","\\therefore",!0);S(C,J,te,"∍","\\backepsilon");S(C,J,te,"▶","\\blacktriangleright");S(C,J,te,"∵","\\because",!0);S(C,J,te,"⋘","\\llless");S(C,J,te,"⋙","\\gggtr");S(C,J,Ve,"⊲","\\lhd");S(C,J,Ve,"⊳","\\rhd");S(C,J,te,"≂","\\eqsim",!0);S(C,z,te,"⋈","\\Join");S(C,J,te,"≑","\\Doteq",!0);S(C,J,Ve,"∔","\\dotplus",!0);S(C,J,Ve,"∖","\\smallsetminus");S(C,J,Ve,"⋒","\\Cap",!0);S(C,J,Ve,"⋓","\\Cup",!0);S(C,J,Ve,"⩞","\\doublebarwedge",!0);S(C,J,Ve,"⊟","\\boxminus",!0);S(C,J,Ve,"⊞","\\boxplus",!0);S(C,J,Ve,"⋇","\\divideontimes",!0);S(C,J,Ve,"⋉","\\ltimes",!0);S(C,J,Ve,"⋊","\\rtimes",!0);S(C,J,Ve,"⋋","\\leftthreetimes",!0);S(C,J,Ve,"⋌","\\rightthreetimes",!0);S(C,J,Ve,"⋏","\\curlywedge",!0);S(C,J,Ve,"⋎","\\curlyvee",!0);S(C,J,Ve,"⊝","\\circleddash",!0);S(C,J,Ve,"⊛","\\circledast",!0);S(C,J,Ve,"⋅","\\centerdot");S(C,J,Ve,"⊺","\\intercal",!0);S(C,J,Ve,"⋒","\\doublecap");S(C,J,Ve,"⋓","\\doublecup");S(C,J,Ve,"⊠","\\boxtimes",!0);S(C,J,te,"⇢","\\dashrightarrow",!0);S(C,J,te,"⇠","\\dashleftarrow",!0);S(C,J,te,"⇇","\\leftleftarrows",!0);S(C,J,te,"⇆","\\leftrightarrows",!0);S(C,J,te,"⇚","\\Lleftarrow",!0);S(C,J,te,"↞","\\twoheadleftarrow",!0);S(C,J,te,"↢","\\leftarrowtail",!0);S(C,J,te,"↫","\\looparrowleft",!0);S(C,J,te,"⇋","\\leftrightharpoons",!0);S(C,J,te,"↶","\\curvearrowleft",!0);S(C,J,te,"↺","\\circlearrowleft",!0);S(C,J,te,"↰","\\Lsh",!0);S(C,J,te,"⇈","\\upuparrows",!0);S(C,J,te,"↿","\\upharpoonleft",!0);S(C,J,te,"⇃","\\downharpoonleft",!0);S(C,z,te,"⊶","\\origof",!0);S(C,z,te,"⊷","\\imageof",!0);S(C,J,te,"⊸","\\multimap",!0);S(C,J,te,"↭","\\leftrightsquigarrow",!0);S(C,J,te,"⇉","\\rightrightarrows",!0);S(C,J,te,"⇄","\\rightleftarrows",!0);S(C,J,te,"↠","\\twoheadrightarrow",!0);S(C,J,te,"↣","\\rightarrowtail",!0);S(C,J,te,"↬","\\looparrowright",!0);S(C,J,te,"↷","\\curvearrowright",!0);S(C,J,te,"↻","\\circlearrowright",!0);S(C,J,te,"↱","\\Rsh",!0);S(C,J,te,"⇊","\\downdownarrows",!0);S(C,J,te,"↾","\\upharpoonright",!0);S(C,J,te,"⇂","\\downharpoonright",!0);S(C,J,te,"⇝","\\rightsquigarrow",!0);S(C,J,te,"⇝","\\leadsto");S(C,J,te,"⇛","\\Rrightarrow",!0);S(C,J,te,"↾","\\restriction");S(C,z,ie,"‘","`");S(C,z,ie,"$","\\$");S(Ee,z,ie,"$","\\$");S(Ee,z,ie,"$","\\textdollar");S(C,z,ie,"%","\\%");S(Ee,z,ie,"%","\\%");S(C,z,ie,"_","\\_");S(Ee,z,ie,"_","\\_");S(Ee,z,ie,"_","\\textunderscore");S(C,z,ie,"∠","\\angle",!0);S(C,z,ie,"∞","\\infty",!0);S(C,z,ie,"′","\\prime");S(C,z,ie,"△","\\triangle");S(C,z,ie,"Γ","\\Gamma",!0);S(C,z,ie,"Δ","\\Delta",!0);S(C,z,ie,"Θ","\\Theta",!0);S(C,z,ie,"Λ","\\Lambda",!0);S(C,z,ie,"Ξ","\\Xi",!0);S(C,z,ie,"Π","\\Pi",!0);S(C,z,ie,"Σ","\\Sigma",!0);S(C,z,ie,"Υ","\\Upsilon",!0);S(C,z,ie,"Φ","\\Phi",!0);S(C,z,ie,"Ψ","\\Psi",!0);S(C,z,ie,"Ω","\\Omega",!0);S(C,z,ie,"A","Α");S(C,z,ie,"B","Β");S(C,z,ie,"E","Ε");S(C,z,ie,"Z","Ζ");S(C,z,ie,"H","Η");S(C,z,ie,"I","Ι");S(C,z,ie,"K","Κ");S(C,z,ie,"M","Μ");S(C,z,ie,"N","Ν");S(C,z,ie,"O","Ο");S(C,z,ie,"P","Ρ");S(C,z,ie,"T","Τ");S(C,z,ie,"X","Χ");S(C,z,ie,"¬","\\neg",!0);S(C,z,ie,"¬","\\lnot");S(C,z,ie,"⊤","\\top");S(C,z,ie,"⊥","\\bot");S(C,z,ie,"∅","\\emptyset");S(C,J,ie,"∅","\\varnothing");S(C,z,it,"α","\\alpha",!0);S(C,z,it,"β","\\beta",!0);S(C,z,it,"γ","\\gamma",!0);S(C,z,it,"δ","\\delta",!0);S(C,z,it,"ϵ","\\epsilon",!0);S(C,z,it,"ζ","\\zeta",!0);S(C,z,it,"η","\\eta",!0);S(C,z,it,"θ","\\theta",!0);S(C,z,it,"ι","\\iota",!0);S(C,z,it,"κ","\\kappa",!0);S(C,z,it,"λ","\\lambda",!0);S(C,z,it,"μ","\\mu",!0);S(C,z,it,"ν","\\nu",!0);S(C,z,it,"ξ","\\xi",!0);S(C,z,it,"ο","\\omicron",!0);S(C,z,it,"π","\\pi",!0);S(C,z,it,"ρ","\\rho",!0);S(C,z,it,"σ","\\sigma",!0);S(C,z,it,"τ","\\tau",!0);S(C,z,it,"υ","\\upsilon",!0);S(C,z,it,"ϕ","\\phi",!0);S(C,z,it,"χ","\\chi",!0);S(C,z,it,"ψ","\\psi",!0);S(C,z,it,"ω","\\omega",!0);S(C,z,it,"ε","\\varepsilon",!0);S(C,z,it,"ϑ","\\vartheta",!0);S(C,z,it,"ϖ","\\varpi",!0);S(C,z,it,"ϱ","\\varrho",!0);S(C,z,it,"ς","\\varsigma",!0);S(C,z,it,"φ","\\varphi",!0);S(C,z,Ve,"∗","*",!0);S(C,z,Ve,"+","+");S(C,z,Ve,"−","-",!0);S(C,z,Ve,"⋅","\\cdot",!0);S(C,z,Ve,"∘","\\circ",!0);S(C,z,Ve,"÷","\\div",!0);S(C,z,Ve,"±","\\pm",!0);S(C,z,Ve,"×","\\times",!0);S(C,z,Ve,"∩","\\cap",!0);S(C,z,Ve,"∪","\\cup",!0);S(C,z,Ve,"∖","\\setminus",!0);S(C,z,Ve,"∧","\\land");S(C,z,Ve,"∨","\\lor");S(C,z,Ve,"∧","\\wedge",!0);S(C,z,Ve,"∨","\\vee",!0);S(C,z,ie,"√","\\surd");S(C,z,ma,"⟨","\\langle",!0);S(C,z,ma,"∣","\\lvert");S(C,z,ma,"∥","\\lVert");S(C,z,Dr,"?","?");S(C,z,Dr,"!","!");S(C,z,Dr,"⟩","\\rangle",!0);S(C,z,Dr,"∣","\\rvert");S(C,z,Dr,"∥","\\rVert");S(C,z,te,"=","=");S(C,z,te,":",":");S(C,z,te,"≈","\\approx",!0);S(C,z,te,"≅","\\cong",!0);S(C,z,te,"≥","\\ge");S(C,z,te,"≥","\\geq",!0);S(C,z,te,"←","\\gets");S(C,z,te,">","\\gt",!0);S(C,z,te,"∈","\\in",!0);S(C,z,te,"","\\@not");S(C,z,te,"⊂","\\subset",!0);S(C,z,te,"⊃","\\supset",!0);S(C,z,te,"⊆","\\subseteq",!0);S(C,z,te,"⊇","\\supseteq",!0);S(C,J,te,"⊈","\\nsubseteq",!0);S(C,J,te,"⊉","\\nsupseteq",!0);S(C,z,te,"⊨","\\models");S(C,z,te,"←","\\leftarrow",!0);S(C,z,te,"≤","\\le");S(C,z,te,"≤","\\leq",!0);S(C,z,te,"<","\\lt",!0);S(C,z,te,"→","\\rightarrow",!0);S(C,z,te,"→","\\to");S(C,J,te,"≱","\\ngeq",!0);S(C,J,te,"≰","\\nleq",!0);S(C,z,al," ","\\ ");S(C,z,al," ","\\space");S(C,z,al," ","\\nobreakspace");S(Ee,z,al," ","\\ ");S(Ee,z,al," "," ");S(Ee,z,al," ","\\space");S(Ee,z,al," ","\\nobreakspace");S(C,z,al,null,"\\nobreak");S(C,z,al,null,"\\allowbreak");S(C,z,Lc,",",",");S(C,z,Lc,";",";");S(C,J,Ve,"⊼","\\barwedge",!0);S(C,J,Ve,"⊻","\\veebar",!0);S(C,z,Ve,"⊙","\\odot",!0);S(C,z,Ve,"⊕","\\oplus",!0);S(C,z,Ve,"⊗","\\otimes",!0);S(C,z,ie,"∂","\\partial",!0);S(C,z,Ve,"⊘","\\oslash",!0);S(C,J,Ve,"⊚","\\circledcirc",!0);S(C,J,Ve,"⊡","\\boxdot",!0);S(C,z,Ve,"△","\\bigtriangleup");S(C,z,Ve,"▽","\\bigtriangledown");S(C,z,Ve,"†","\\dagger");S(C,z,Ve,"⋄","\\diamond");S(C,z,Ve,"⋆","\\star");S(C,z,Ve,"◃","\\triangleleft");S(C,z,Ve,"▹","\\triangleright");S(C,z,ma,"{","\\{");S(Ee,z,ie,"{","\\{");S(Ee,z,ie,"{","\\textbraceleft");S(C,z,Dr,"}","\\}");S(Ee,z,ie,"}","\\}");S(Ee,z,ie,"}","\\textbraceright");S(C,z,ma,"{","\\lbrace");S(C,z,Dr,"}","\\rbrace");S(C,z,ma,"[","\\lbrack",!0);S(Ee,z,ie,"[","\\lbrack",!0);S(C,z,Dr,"]","\\rbrack",!0);S(Ee,z,ie,"]","\\rbrack",!0);S(C,z,ma,"(","\\lparen",!0);S(C,z,Dr,")","\\rparen",!0);S(Ee,z,ie,"<","\\textless",!0);S(Ee,z,ie,">","\\textgreater",!0);S(C,z,ma,"⌊","\\lfloor",!0);S(C,z,Dr,"⌋","\\rfloor",!0);S(C,z,ma,"⌈","\\lceil",!0);S(C,z,Dr,"⌉","\\rceil",!0);S(C,z,ie,"\\","\\backslash");S(C,z,ie,"∣","|");S(C,z,ie,"∣","\\vert");S(Ee,z,ie,"|","\\textbar",!0);S(C,z,ie,"∥","\\|");S(C,z,ie,"∥","\\Vert");S(Ee,z,ie,"∥","\\textbardbl");S(Ee,z,ie,"~","\\textasciitilde");S(Ee,z,ie,"\\","\\textbackslash");S(Ee,z,ie,"^","\\textasciicircum");S(C,z,te,"↑","\\uparrow",!0);S(C,z,te,"⇑","\\Uparrow",!0);S(C,z,te,"↓","\\downarrow",!0);S(C,z,te,"⇓","\\Downarrow",!0);S(C,z,te,"↕","\\updownarrow",!0);S(C,z,te,"⇕","\\Updownarrow",!0);S(C,z,Zn,"∐","\\coprod");S(C,z,Zn,"⋁","\\bigvee");S(C,z,Zn,"⋀","\\bigwedge");S(C,z,Zn,"⨄","\\biguplus");S(C,z,Zn,"⋂","\\bigcap");S(C,z,Zn,"⋃","\\bigcup");S(C,z,Zn,"∫","\\int");S(C,z,Zn,"∫","\\intop");S(C,z,Zn,"∬","\\iint");S(C,z,Zn,"∭","\\iiint");S(C,z,Zn,"∏","\\prod");S(C,z,Zn,"∑","\\sum");S(C,z,Zn,"⨂","\\bigotimes");S(C,z,Zn,"⨁","\\bigoplus");S(C,z,Zn,"⨀","\\bigodot");S(C,z,Zn,"∮","\\oint");S(C,z,Zn,"∯","\\oiint");S(C,z,Zn,"∰","\\oiiint");S(C,z,Zn,"⨆","\\bigsqcup");S(C,z,Zn,"∫","\\smallint");S(Ee,z,tu,"…","\\textellipsis");S(C,z,tu,"…","\\mathellipsis");S(Ee,z,tu,"…","\\ldots",!0);S(C,z,tu,"…","\\ldots",!0);S(C,z,tu,"⋯","\\@cdots",!0);S(C,z,tu,"⋱","\\ddots",!0);S(C,z,ie,"⋮","\\varvdots");S(Ee,z,ie,"⋮","\\varvdots");S(C,z,wn,"ˊ","\\acute");S(C,z,wn,"ˋ","\\grave");S(C,z,wn,"¨","\\ddot");S(C,z,wn,"~","\\tilde");S(C,z,wn,"ˉ","\\bar");S(C,z,wn,"˘","\\breve");S(C,z,wn,"ˇ","\\check");S(C,z,wn,"^","\\hat");S(C,z,wn,"⃗","\\vec");S(C,z,wn,"˙","\\dot");S(C,z,wn,"˚","\\mathring");S(C,z,it,"","\\@imath");S(C,z,it,"","\\@jmath");S(C,z,ie,"ı","ı");S(C,z,ie,"ȷ","ȷ");S(Ee,z,ie,"ı","\\i",!0);S(Ee,z,ie,"ȷ","\\j",!0);S(Ee,z,ie,"ß","\\ss",!0);S(Ee,z,ie,"æ","\\ae",!0);S(Ee,z,ie,"œ","\\oe",!0);S(Ee,z,ie,"ø","\\o",!0);S(Ee,z,ie,"Æ","\\AE",!0);S(Ee,z,ie,"Œ","\\OE",!0);S(Ee,z,ie,"Ø","\\O",!0);S(Ee,z,wn,"ˊ","\\'");S(Ee,z,wn,"ˋ","\\`");S(Ee,z,wn,"ˆ","\\^");S(Ee,z,wn,"˜","\\~");S(Ee,z,wn,"ˉ","\\=");S(Ee,z,wn,"˘","\\u");S(Ee,z,wn,"˙","\\.");S(Ee,z,wn,"¸","\\c");S(Ee,z,wn,"˚","\\r");S(Ee,z,wn,"ˇ","\\v");S(Ee,z,wn,"¨",'\\"');S(Ee,z,wn,"˝","\\H");S(Ee,z,wn,"◯","\\textcircled");var S7={"--":!0,"---":!0,"``":!0,"''":!0};S(Ee,z,ie,"–","--",!0);S(Ee,z,ie,"–","\\textendash");S(Ee,z,ie,"—","---",!0);S(Ee,z,ie,"—","\\textemdash");S(Ee,z,ie,"‘","`",!0);S(Ee,z,ie,"‘","\\textquoteleft");S(Ee,z,ie,"’","'",!0);S(Ee,z,ie,"’","\\textquoteright");S(Ee,z,ie,"“","``",!0);S(Ee,z,ie,"“","\\textquotedblleft");S(Ee,z,ie,"”","''",!0);S(Ee,z,ie,"”","\\textquotedblright");S(C,z,ie,"°","\\degree",!0);S(Ee,z,ie,"°","\\degree");S(Ee,z,ie,"°","\\textdegree",!0);S(C,z,ie,"£","\\pounds");S(C,z,ie,"£","\\mathsterling",!0);S(Ee,z,ie,"£","\\pounds");S(Ee,z,ie,"£","\\textsterling",!0);S(C,J,ie,"✠","\\maltese");S(Ee,J,ie,"✠","\\maltese");var H5='0123456789/@."';for(var l1=0;l1<H5.length;l1++){var q5=H5.charAt(l1);S(C,z,ie,q5,q5)}var U5='0123456789!@*()-=+";:?/.,';for(var s1=0;s1<U5.length;s1++){var I5=U5.charAt(s1);S(Ee,z,ie,I5,I5)}var Hd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var o1=0;o1<Hd.length;o1++){var td=Hd.charAt(o1);S(C,z,it,td,td),S(Ee,z,ie,td,td)}S(C,J,ie,"C","ℂ");S(Ee,J,ie,"C","ℂ");S(C,J,ie,"H","ℍ");S(Ee,J,ie,"H","ℍ");S(C,J,ie,"N","ℕ");S(Ee,J,ie,"N","ℕ");S(C,J,ie,"P","ℙ");S(Ee,J,ie,"P","ℙ");S(C,J,ie,"Q","ℚ");S(Ee,J,ie,"Q","ℚ");S(C,J,ie,"R","ℝ");S(Ee,J,ie,"R","ℝ");S(C,J,ie,"Z","ℤ");S(Ee,J,ie,"Z","ℤ");S(C,z,it,"h","ℎ");S(Ee,z,it,"h","ℎ");var mt="";for(var _r=0;_r<Hd.length;_r++){var Dn=Hd.charAt(_r);mt=String.fromCharCode(55349,56320+_r),S(C,z,it,Dn,mt),S(Ee,z,ie,Dn,mt),mt=String.fromCharCode(55349,56372+_r),S(C,z,it,Dn,mt),S(Ee,z,ie,Dn,mt),mt=String.fromCharCode(55349,56424+_r),S(C,z,it,Dn,mt),S(Ee,z,ie,Dn,mt),mt=String.fromCharCode(55349,56580+_r),S(C,z,it,Dn,mt),S(Ee,z,ie,Dn,mt),mt=String.fromCharCode(55349,56684+_r),S(C,z,it,Dn,mt),S(Ee,z,ie,Dn,mt),mt=String.fromCharCode(55349,56736+_r),S(C,z,it,Dn,mt),S(Ee,z,ie,Dn,mt),mt=String.fromCharCode(55349,56788+_r),S(C,z,it,Dn,mt),S(Ee,z,ie,Dn,mt),mt=String.fromCharCode(55349,56840+_r),S(C,z,it,Dn,mt),S(Ee,z,ie,Dn,mt),mt=String.fromCharCode(55349,56944+_r),S(C,z,it,Dn,mt),S(Ee,z,ie,Dn,mt),_r<26&&(mt=String.fromCharCode(55349,56632+_r),S(C,z,it,Dn,mt),S(Ee,z,ie,Dn,mt),mt=String.fromCharCode(55349,56476+_r),S(C,z,it,Dn,mt),S(Ee,z,ie,Dn,mt))}mt="𝕜";S(C,z,it,"k",mt);S(Ee,z,ie,"k",mt);for(var js=0;js<10;js++){var Il=js.toString();mt=String.fromCharCode(55349,57294+js),S(C,z,it,Il,mt),S(Ee,z,ie,Il,mt),mt=String.fromCharCode(55349,57314+js),S(C,z,it,Il,mt),S(Ee,z,ie,Il,mt),mt=String.fromCharCode(55349,57324+js),S(C,z,it,Il,mt),S(Ee,z,ie,Il,mt),mt=String.fromCharCode(55349,57334+js),S(C,z,it,Il,mt),S(Ee,z,ie,Il,mt)}var up="ÐÞþ";for(var u1=0;u1<up.length;u1++){var nd=up.charAt(u1);S(C,z,it,nd,nd),S(Ee,z,ie,nd,nd)}var rd=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],P5=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],yA=(e,t)=>{var n=e.charCodeAt(0),r=e.charCodeAt(1),i=(n-55296)*1024+(r-56320)+65536,s=t==="math"?0:1;if(119808<=i&&i<120484){var o=Math.floor((i-119808)/26);return[rd[o][2],rd[o][s]]}else if(120782<=i&&i<=120831){var d=Math.floor((i-120782)/10);return[P5[d][2],P5[d][s]]}else{if(i===120485||i===120486)return[rd[0][2],rd[0][s]];if(120486<i&&i<120782)return["",""];throw new Te("Unsupported character: "+e)}},mf=function(t,n,r){if(xn[r][t]){var i=xn[r][t].replace;i&&(t=i)}return{value:t,metrics:hg(t,n,r)}},Ar=function(t,n,r,i,s){var o=mf(t,n,r),d=o.metrics;t=o.value;var f;if(d){var m=d.italic;(r==="text"||i&&i.font==="mathit")&&(m=0),f=new fa(t,d.height,d.depth,m,d.skew,d.width,s)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+t+"' in style '"+n+"' and mode '"+r+"'")),f=new fa(t,0,0,0,0,0,s);if(i){f.maxFontSize=i.sizeMultiplier,i.style.isTight()&&f.classes.push("mtight");var y=i.getColor();y&&(f.style.color=y)}return f},mg=function(t,n,r,i){return i===void 0&&(i=[]),r.font==="boldsymbol"&&mf(t,"Main-Bold",n).metrics?Ar(t,"Main-Bold",n,r,i.concat(["mathbf"])):t==="\\"||xn[n][t].font==="main"?Ar(t,"Main-Regular",n,r,i):Ar(t,"AMS-Regular",n,r,i.concat(["amsrm"]))},vA=function(t,n,r,i,s){return s!=="textord"&&mf(t,"Math-BoldItalic",n).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},pf=function(t,n,r){var i=t.mode,s=t.text,o=["mord"],d=i==="math"||i==="text"&&n.font,f=d?n.font:n.fontFamily,m="",y="";if(s.charCodeAt(0)===55349&&([m,y]=yA(s,i)),m.length>0)return Ar(s,m,i,n,o.concat(y));if(f){var p,g;if(f==="boldsymbol"){var x=vA(s,i,n,o,r);p=x.fontName,g=[x.fontClass]}else d?(p=cp[f].fontName,g=[f]):(p=ad(f,n.fontWeight,n.fontShape),g=[f,n.fontWeight,n.fontShape]);if(mf(s,p,i).metrics)return Ar(s,p,i,n,o.concat(g));if(S7.hasOwnProperty(s)&&p.slice(0,10)==="Typewriter"){for(var w=[],k=0;k<s.length;k++)w.push(Ar(s[k],p,i,n,o.concat(g)));return il(w)}}if(r==="mathord")return Ar(s,"Math-Italic",i,n,o.concat(["mathnormal"]));if(r==="textord"){var j=xn[i][s]&&xn[i][s].font;if(j==="ams"){var N=ad("amsrm",n.fontWeight,n.fontShape);return Ar(s,N,i,n,o.concat("amsrm",n.fontWeight,n.fontShape))}else if(j==="main"||!j){var _=ad("textrm",n.fontWeight,n.fontShape);return Ar(s,_,i,n,o.concat(n.fontWeight,n.fontShape))}else{var E=ad(j,n.fontWeight,n.fontShape);return Ar(s,E,i,n,o.concat(E,n.fontWeight,n.fontShape))}}else throw new Error("unexpected type: "+r+" in makeOrd")},xA=(e,t)=>{if(Wl(e.classes)!==Wl(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 r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var i of Object.keys(t.style))if(e.style[i]!==t.style[i])return!1;return!0},k7=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof fa&&r instanceof fa&&xA(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e},pg=function(t){for(var n=0,r=0,i=0,s=0;s<t.children.length;s++){var o=t.children[s];o.height>n&&(n=o.height),o.depth>r&&(r=o.depth),o.maxFontSize>i&&(i=o.maxFontSize)}t.height=n,t.depth=r,t.maxFontSize=i},Me=function(t,n,r,i){var s=new eu(t,n,r,i);return pg(s),s},es=(e,t,n,r)=>new eu(e,t,n,r),qo=function(t,n,r){var i=Me([t],[],n);return i.height=Math.max(r||n.fontMetrics().defaultRuleThickness,n.minRuleThickness),i.style.borderBottomWidth=Re(i.height),i.maxFontSize=1,i},bA=function(t,n,r,i){var s=new hf(t,n,r,i);return pg(s),s},il=function(t){var n=new Jo(t);return pg(n),n},Uo=function(t,n){return t instanceof Jo?Me([],[t],n):t},wA=function(t){if(t.positionType==="individualShift"){for(var n=t.children,r=[n[0]],i=-n[0].shift-n[0].elem.depth,s=i,o=1;o<n.length;o++){var d=-n[o].shift-s-n[o].elem.depth,f=d-(n[o-1].elem.height+n[o-1].elem.depth);s=s+d,r.push({type:"kern",size:f}),r.push(n[o])}return{children:r,depth:i}}var m;if(t.positionType==="top"){for(var y=t.positionData,p=0;p<t.children.length;p++){var g=t.children[p];y-=g.type==="kern"?g.size:g.elem.height+g.elem.depth}m=y}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}},Vt=function(t,n){for(var{children:r,depth:i}=wA(t),s=0,o=0;o<r.length;o++){var d=r[o];if(d.type==="elem"){var f=d.elem;s=Math.max(s,f.maxFontSize,f.height)}}s+=2;var m=Me(["pstrut"],[]);m.style.height=Re(s);for(var y=[],p=i,g=i,x=i,w=0;w<r.length;w++){var k=r[w];if(k.type==="kern")x+=k.size;else{var j=k.elem,N=k.wrapperClasses||[],_=k.wrapperStyle||{},E=Me(N,[m,j],void 0,_);E.style.top=Re(-s-x-j.depth),k.marginLeft&&(E.style.marginLeft=k.marginLeft),k.marginRight&&(E.style.marginRight=k.marginRight),y.push(E),x+=j.height+j.depth}p=Math.min(p,x),g=Math.max(g,x)}var L=Me(["vlist"],y);L.style.height=Re(g);var D;if(p<0){var T=Me([],[]),O=Me(["vlist"],[T]);O.style.height=Re(-p);var Z=Me(["vlist-s"],[new fa("")]);D=[Me(["vlist-r"],[L,Z]),Me(["vlist-r"],[O])]}else D=[Me(["vlist-r"],[L])];var V=Me(["vlist-t"],D);return D.length===2&&V.classes.push("vlist-t2"),V.height=g,V.depth=-p,V},N7=(e,t)=>{var n=Me(["mspace"],[],t),r=Mn(e,t);return n.style.marginRight=Re(r),n},ad=function(t,n,r){var i="";switch(t){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=t}var s;return n==="textbf"&&r==="textit"?s="BoldItalic":n==="textbf"?s="Bold":n==="textit"?s="Italic":s="Regular",i+"-"+s},cp={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"}},j7={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},C7=function(t,n){var[r,i,s]=j7[t],o=new Jl(r),d=new tl([o],{width:Re(i),height:Re(s),style:"width:"+Re(i),viewBox:"0 0 "+1e3*i+" "+1e3*s,preserveAspectRatio:"xMinYMin"}),f=es(["overlay"],[d],n);return f.height=s,f.style.height=Re(s),f.style.width=Re(i),f},En={number:3,unit:"mu"},Cs={number:4,unit:"mu"},Yi={number:5,unit:"mu"},SA={mord:{mop:En,mbin:Cs,mrel:Yi,minner:En},mop:{mord:En,mop:En,mrel:Yi,minner:En},mbin:{mord:Cs,mop:Cs,mopen:Cs,minner:Cs},mrel:{mord:Yi,mop:Yi,mopen:Yi,minner:Yi},mopen:{},mclose:{mop:En,mbin:Cs,mrel:Yi,minner:En},mpunct:{mord:En,mop:En,mrel:Yi,mopen:En,mclose:En,mpunct:En,minner:En},minner:{mord:En,mop:En,mbin:Cs,mrel:Yi,mopen:En,mpunct:En,minner:En}},kA={mord:{mop:En},mop:{mord:En,mop:En},mbin:{},mrel:{},mopen:{},mclose:{mop:En},mpunct:{},minner:{mop:En}},E7={},qd={},Ud={};function Ie(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:s,mathmlBuilder:o}=e,d={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0?!0:r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},f=0;f<n.length;++f)E7[n[f]]=d;t&&(s&&(qd[t]=s),o&&(Ud[t]=o))}function Us(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;Ie({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:n,mathmlBuilder:r})}var Id=function(t){return t.type==="ordgroup"&&t.body.length===1?t.body[0]:t},Xn=function(t){return t.type==="ordgroup"?t.body:[t]},NA=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),jA=new Set(["rightmost","mrel","mclose","mpunct"]),CA={display:pt.DISPLAY,text:pt.TEXT,script:pt.SCRIPT,scriptscript:pt.SCRIPTSCRIPT},EA={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},lr=function(t,n,r,i){i===void 0&&(i=[null,null]);for(var s=[],o=0;o<t.length;o++){var d=Gt(t[o],n);if(d instanceof Jo){var f=d.children;s.push(...f)}else s.push(d)}if(k7(s),!r)return s;var m=n;if(t.length===1){var y=t[0];y.type==="sizing"?m=n.havingSize(y.size):y.type==="styling"&&(m=n.havingStyle(CA[y.style]))}var p=Me([i[0]||"leftmost"],[],n),g=Me([i[1]||"rightmost"],[],n),x=r==="root";return dp(s,(w,k)=>{var j=k.classes[0],N=w.classes[0];j==="mbin"&&jA.has(N)?k.classes[0]="mord":N==="mbin"&&NA.has(j)&&(w.classes[0]="mord")},{node:p},g,x),dp(s,(w,k)=>{var j,N,_=hp(k),E=hp(w),L=_&&E?w.hasClass("mtight")?(j=kA[_])==null?void 0:j[E]:(N=SA[_])==null?void 0:N[E]:null;if(L)return N7(L,m)},{node:p},g,x),s},dp=function(t,n,r,i,s){i&&t.push(i);for(var o=0;o<t.length;o++){var d=t[o],f=M7(d);if(f){dp(f.children,n,r,null,s);continue}var m=!d.hasClass("mspace");if(m){var y=n(d,r.node);y&&(r.insertAfter?r.insertAfter(y):(t.unshift(y),o++))}m?r.node=d:s&&d.hasClass("newline")&&(r.node=Me(["leftmost"])),r.insertAfter=(p=>g=>{t.splice(p+1,0,g),o++})(o)}i&&t.pop()},M7=function(t){return t instanceof Jo||t instanceof hf||t instanceof eu&&t.hasClass("enclosing")?t:null},fp=function(t,n){var r=M7(t);if(r){var i=r.children;if(i.length){if(n==="right")return fp(i[i.length-1],"right");if(n==="left")return fp(i[0],"left")}}return t},hp=function(t,n){if(!t)return null;n&&(t=fp(t,n));var r=t.classes[0];return EA[r]||null},hc=function(t,n){var r=["nulldelimiter"].concat(t.baseSizingClasses());return Me(n.concat(r))},Gt=function(t,n,r){if(!t)return Me();if(qd[t.type]){var i=qd[t.type](t,n);if(r&&n.size!==r.size){i=Me(n.sizingClasses(r),[i],n);var s=n.sizeMultiplier/r.sizeMultiplier;i.height*=s,i.depth*=s}return i}else throw new Te("Got group of unknown type: '"+t.type+"'")};function id(e,t){var n=Me(["base"],e,t),r=Me(["strut"]);return r.style.height=Re(n.height+n.depth),n.depth&&(r.style.verticalAlign=Re(-n.depth)),n.children.unshift(r),n}function mp(e,t){var n=null;e.length===1&&e[0].type==="tag"&&(n=e[0].tag,e=e[0].body);var r=lr(e,t,"root"),i;r.length===2&&r[1].hasClass("tag")&&(i=r.pop());for(var s=[],o=[],d=0;d<r.length;d++)if(o.push(r[d]),r[d].hasClass("mbin")||r[d].hasClass("mrel")||r[d].hasClass("allowbreak")){for(var f=!1;d<r.length-1&&r[d+1].hasClass("mspace")&&!r[d+1].hasClass("newline");)d++,o.push(r[d]),r[d].hasClass("nobreak")&&(f=!0);f||(s.push(id(o,t)),o=[])}else r[d].hasClass("newline")&&(o.pop(),o.length>0&&(s.push(id(o,t)),o=[]),s.push(r[d]));o.length>0&&s.push(id(o,t));var m;n?(m=id(lr(n,t,!0),t),m.classes=["tag"],s.push(m)):i&&s.push(i);var y=Me(["katex-html"],s);if(y.setAttribute("aria-hidden","true"),m){var p=m.children[0];p.style.height=Re(y.height+y.depth),y.depth&&(p.style.verticalAlign=Re(-y.depth))}return y}function _7(e){return new Jo(e)}class ze{constructor(t,n,r){this.type=t,this.attributes={},this.children=n||[],this.classes=r||[]}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=Wl(this.classes));for(var r=0;r<this.children.length;r++)if(this.children[r]instanceof Kn&&this.children[r+1]instanceof Kn){for(var i=this.children[r].toText()+this.children[++r].toText();this.children[r+1]instanceof Kn;)i+=this.children[++r].toText();t.appendChild(new Kn(i).toNode())}else t.appendChild(this.children[r].toNode());return t}toMarkup(){var t="<"+this.type;for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&(t+=" "+n+'="',t+=wr(this.attributes[n]),t+='"');this.classes.length>0&&(t+=' class ="'+wr(Wl(this.classes))+'"'),t+=">";for(var r=0;r<this.children.length;r++)t+=this.children[r].toMarkup();return t+="</"+this.type+">",t}toText(){return this.children.map(t=>t.toText()).join("")}}class Kn{constructor(t){this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return wr(this.toText())}toText(){return this.text}}class A7{constructor(t){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",Re(this.width)),t}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+Re(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var MA=new Set(["\\imath","\\jmath"]),_A=new Set(["mrow","mtable"]),Ta=function(t,n,r){return xn[n][t]&&xn[n][t].replace&&t.charCodeAt(0)!==55349&&!(S7.hasOwnProperty(t)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(t=xn[n][t].replace),new Kn(t)},gg=function(t){return t.length===1?t[0]:new ze("mrow",t)},yg=function(t,n){if(n.fontFamily==="texttt")return"monospace";if(n.fontFamily==="textsf")return n.fontShape==="textit"&&n.fontWeight==="textbf"?"sans-serif-bold-italic":n.fontShape==="textit"?"sans-serif-italic":n.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(n.fontShape==="textit"&&n.fontWeight==="textbf")return"bold-italic";if(n.fontShape==="textit")return"italic";if(n.fontWeight==="textbf")return"bold";var r=n.font;if(!r||r==="mathnormal")return null;var i=t.mode;if(r==="mathit")return"italic";if(r==="boldsymbol")return t.type==="textord"?"bold":"bold-italic";if(r==="mathbf")return"bold";if(r==="mathbb")return"double-struck";if(r==="mathsfit")return"sans-serif-italic";if(r==="mathfrak")return"fraktur";if(r==="mathscr"||r==="mathcal")return"script";if(r==="mathsf")return"sans-serif";if(r==="mathtt")return"monospace";var s=t.text;if(MA.has(s))return null;if(xn[i][s]){var o=xn[i][s].replace;o&&(s=o)}var d=cp[r].fontName;return hg(s,d,i)?cp[r].variant:null};function c1(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof Kn&&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 Kn&&n.text===","}else return!1}var pa=function(t,n,r){if(t.length===1){var i=on(t[0],n);return r&&i instanceof ze&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var s=[],o,d=0;d<t.length;d++){var f=on(t[d],n);if(f instanceof ze&&o instanceof ze){if(f.type==="mtext"&&o.type==="mtext"&&f.getAttribute("mathvariant")===o.getAttribute("mathvariant")){o.children.push(...f.children);continue}else if(f.type==="mn"&&o.type==="mn"){o.children.push(...f.children);continue}else if(c1(f)&&o.type==="mn"){o.children.push(...f.children);continue}else if(f.type==="mn"&&c1(o))f.children=[...o.children,...f.children],s.pop();else if((f.type==="msup"||f.type==="msub")&&f.children.length>=1&&(o.type==="mn"||c1(o))){var m=f.children[0];m instanceof ze&&m.type==="mn"&&(m.children=[...o.children,...m.children],s.pop())}else if(o.type==="mi"&&o.children.length===1){var y=o.children[0];if(y instanceof Kn&&y.text==="̸"&&(f.type==="mo"||f.type==="mi"||f.type==="mn")){var p=f.children[0];p instanceof Kn&&p.text.length>0&&(p.text=p.text.slice(0,1)+"̸"+p.text.slice(1),s.pop())}}}s.push(f),o=f}return s},ts=function(t,n,r){return gg(pa(t,n,r))},on=function(t,n){if(!t)return new ze("mrow");if(Ud[t.type]){var r=Ud[t.type](t,n);return r}else throw new Te("Got group of unknown type: '"+t.type+"'")};function F5(e,t,n,r,i){var s=pa(e,n),o;s.length===1&&s[0]instanceof ze&&_A.has(s[0].type)?o=s[0]:o=new ze("mrow",s);var d=new ze("annotation",[new Kn(t)]);d.setAttribute("encoding","application/x-tex");var f=new ze("semantics",[o,d]),m=new ze("math",[f]);m.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&m.setAttribute("display","block");var y=i?"katex":"katex-mathml";return Me([y],[m])}var AA=[[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]],V5=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],G5=function(t,n){return n.size<2?t:AA[t-1][n.size-1]};class Ki{constructor(t){this.style=t.style,this.color=t.color,this.size=t.size||Ki.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=V5[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 Ki(n)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:G5(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:V5[t-1]})}havingBaseStyle(t){t=t||this.style.text();var n=G5(Ki.BASESIZE,t);return this.size===n&&this.textSize===Ki.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!==Ki.BASESIZE?["sizing","reset-size"+this.size,"size"+Ki.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=mA(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Ki.BASESIZE=6;var T7=function(t){return new Ki({style:t.displayMode?pt.DISPLAY:pt.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},z7=function(t,n){if(n.displayMode){var r=["katex-display"];n.leqno&&r.push("leqno"),n.fleqn&&r.push("fleqn"),t=Me(r,[t])}return t},TA=function(t,n,r){var i=T7(r),s;if(r.output==="mathml")return F5(t,n,i,r.displayMode,!0);if(r.output==="html"){var o=mp(t,i);s=Me(["katex"],[o])}else{var d=F5(t,n,i,r.displayMode,!1),f=mp(t,i);s=Me(["katex"],[d,f])}return z7(s,r)},zA=function(t,n,r){var i=T7(r),s=mp(t,i),o=Me(["katex"],[s]);return z7(o,r)},DA={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":"="},gf=function(t){var n=new ze("mo",[new Kn(DA[t.replace(/^\\/,"")])]);return n.setAttribute("stretchy","true"),n},LA={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]},RA=new Set(["widehat","widecheck","widetilde","utilde"]),yf=function(t,n){function r(){var d=4e5,f=t.label.slice(1);if(RA.has(f)){var m=t,y=m.base.type==="ordgroup"?m.base.body.length:1,p,g,x;if(y>5)f==="widehat"||f==="widecheck"?(p=420,d=2364,x=.42,g=f+"4"):(p=312,d=2340,x=.34,g="tilde4");else{var w=[1,1,2,2,3,3][y];f==="widehat"||f==="widecheck"?(d=[0,1062,2364,2364,2364][w],p=[0,239,300,360,420][w],x=[0,.24,.3,.3,.36,.42][w],g=f+w):(d=[0,600,1033,2339,2340][w],p=[0,260,286,306,312][w],x=[0,.26,.286,.3,.306,.34][w],g="tilde"+w)}var k=new Jl(g),j=new tl([k],{width:"100%",height:Re(x),viewBox:"0 0 "+d+" "+p,preserveAspectRatio:"none"});return{span:es([],[j],n),minWidth:0,height:x}}else{var N=[],_=LA[f],[E,L,D]=_,T=D/1e3,O=E.length,Z,V;if(O===1){var P=_[3];Z=["hide-tail"],V=[P]}else if(O===2)Z=["halfarrow-left","halfarrow-right"],V=["xMinYMin","xMaxYMin"];else if(O===3)Z=["brace-left","brace-center","brace-right"],V=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
333
|
+
`+O+" children.");for(var K=0;K<O;K++){var X=new Jl(E[K]),le=new tl([X],{width:"400em",height:Re(T),viewBox:"0 0 "+d+" "+D,preserveAspectRatio:V[K]+" slice"}),F=es([Z[K]],[le],n);if(O===1)return{span:F,minWidth:L,height:T};F.style.height=Re(T),N.push(F)}return{span:Me(["stretchy"],N,n),minWidth:L,height:T}}}var{span:i,minWidth:s,height:o}=r();return i.height=o,i.style.height=Re(o),s>0&&(i.style.minWidth=Re(s)),i},BA=function(t,n,r,i,s){var o,d=t.height+t.depth+r+i;if(/fbox|color|angl/.test(n)){if(o=Me(["stretchy",n],[],s),n==="fbox"){var f=s.color&&s.getColor();f&&(o.style.borderColor=f)}}else{var m=[];/^[bx]cancel$/.test(n)&&m.push(new op({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(n)&&m.push(new op({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var y=new tl(m,{width:"100%",height:Re(d)});o=es([],[y],s)}return o.height=d,o.style.height=Re(d),o};function St(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 vf(e){var t=xf(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 xf(e){return e&&(e.type==="atom"||gA.hasOwnProperty(e.type))?e:null}var D7=e=>{if(e instanceof fa)return e;if(fA(e)&&e.children.length===1)return D7(e.children[0])},vg=(e,t)=>{var n,r,i;e&&e.type==="supsub"?(r=St(e.base,"accent"),n=r.base,e.base=n,i=dA(Gt(e,t)),e.base=r):(r=St(e,"accent"),n=r.base);var s=Gt(n,t.havingCrampedStyle()),o=r.isShifty&&rl(n),d=0;if(o){var f,m;d=(f=(m=D7(s))==null?void 0:m.skew)!=null?f:0}var y=r.label==="\\c",p=y?s.height+s.depth:Math.min(s.height,t.fontMetrics().xHeight),g;if(r.isStretchy)g=yf(r,t),g=Vt({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:g,wrapperClasses:["svg-align"],wrapperStyle:d>0?{width:"calc(100% - "+Re(2*d)+")",marginLeft:Re(2*d)}:void 0}]});else{var x,w;r.label==="\\vec"?(x=C7("vec",t),w=j7.vec[1]):(x=pf({mode:r.mode,text:r.label},t,"textord"),x=cA(x),x.italic=0,w=x.width,y&&(p+=x.depth)),g=Me(["accent-body"],[x]);var k=r.label==="\\textcircled";k&&(g.classes.push("accent-full"),p=s.height);var j=d;k||(j-=w/2),g.style.left=Re(j),r.label==="\\textcircled"&&(g.style.top=".2em"),g=Vt({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-p},{type:"elem",elem:g}]})}var N=Me(["mord","accent"],[g],t);return i?(i.children[0]=N,i.height=Math.max(N.height,i.height),i.classes[0]="mord",i):N},L7=(e,t)=>{var n=e.isStretchy?gf(e.label):new ze("mo",[Ta(e.label,e.mode)]),r=new ze("mover",[on(e.base,t),n]);return r.setAttribute("accent","true"),r},OA=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));Ie({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=Id(t[0]),r=!OA.test(e.funcName),i=!r||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:vg,mathmlBuilder:L7});Ie({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],r=e.parser.mode;return r==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:vg,mathmlBuilder:L7});Ie({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=Gt(e.base,t),r=yf(e,t),i=e.label==="\\utilde"?.12:0,s=Vt({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:n}]});return Me(["mord","accentunder"],[s],t)},mathmlBuilder:(e,t)=>{var n=gf(e.label),r=new ze("munder",[on(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var ld=e=>{var t=new ze("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};Ie({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:r,funcName:i}=e;return{type:"xArrow",mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=Uo(Gt(e.body,r,t),t),s=e.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(s+"-arrow-pad");var o;e.below&&(r=t.havingStyle(n.sub()),o=Uo(Gt(e.below,r,t),t),o.classes.push(s+"-arrow-pad"));var d=yf(e,t),f=-t.fontMetrics().axisHeight+.5*d.height,m=-t.fontMetrics().axisHeight-.5*d.height-.111;(i.depth>.25||e.label==="\\xleftequilibrium")&&(m-=i.depth);var y;if(o){var p=-t.fontMetrics().axisHeight+o.height+.5*d.height+.111;y=Vt({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:d,shift:f},{type:"elem",elem:o,shift:p}]})}else y=Vt({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:d,shift:f}]});return y.children[0].children[0].children[1].classes.push("svg-align"),Me(["mrel","x-arrow"],[y],t)},mathmlBuilder(e,t){var n=gf(e.label);n.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var i=ld(on(e.body,t));if(e.below){var s=ld(on(e.below,t));r=new ze("munderover",[n,s,i])}else r=new ze("mover",[n,i])}else if(e.below){var o=ld(on(e.below,t));r=new ze("munder",[n,o])}else r=ld(),r=new ze("mover",[n,r]);return r}});function R7(e,t){var n=lr(e.body,t,!0);return Me([e.mclass],n,t)}function B7(e,t){var n,r=pa(e.body,t);return e.mclass==="minner"?n=new ze("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(n=r[0],n.type="mi"):n=new ze("mi",r):(e.isCharacterBox?(n=r[0],n.type="mo"):n=new ze("mo",r),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}Ie({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:Xn(i),isCharacterBox:rl(i)}},htmlBuilder:R7,mathmlBuilder:B7});var bf=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"};Ie({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:bf(t[0]),body:Xn(t[1]),isCharacterBox:rl(t[1])}}});Ie({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:n,funcName:r}=e,i=t[1],s=t[0],o;r!=="\\stackrel"?o=bf(i):o="mrel";var d={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:Xn(i)},f={type:"supsub",mode:s.mode,base:d,sup:r==="\\underset"?null:s,sub:r==="\\underset"?s:null};return{type:"mclass",mode:n.mode,mclass:o,body:[f],isCharacterBox:rl(f)}},htmlBuilder:R7,mathmlBuilder:B7});Ie({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:bf(t[0]),body:Xn(t[0])}},htmlBuilder(e,t){var n=lr(e.body,t,!0),r=Me([e.mclass],n,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){var n=pa(e.body,t),r=new ze("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var $A={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Y5=()=>({type:"styling",body:[],mode:"math",style:"display"}),X5=e=>e.type==="textord"&&e.text==="@",HA=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function qA(e,t,n){var r=$A[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var i=n.callFunction("\\\\cdleft",[t[0]],[]),s={type:"atom",text:r,mode:"math",family:"rel"},o=n.callFunction("\\Big",[s],[]),d=n.callFunction("\\\\cdright",[t[1]],[]),f={type:"ordgroup",mode:"math",body:[i,o,d]};return n.callFunction("\\\\cdparent",[f],[])}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 UA(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 Te("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var r=[],i=[r],s=0;s<t.length;s++){for(var o=t[s],d=Y5(),f=0;f<o.length;f++)if(!X5(o[f]))d.body.push(o[f]);else{r.push(d),f+=1;var m=vf(o[f]).text,y=new Array(2);if(y[0]={type:"ordgroup",mode:"math",body:[]},y[1]={type:"ordgroup",mode:"math",body:[]},!"=|.".includes(m))if("<>AV".includes(m))for(var p=0;p<2;p++){for(var g=!0,x=f+1;x<o.length;x++){if(HA(o[x],m)){g=!1,f=x;break}if(X5(o[x]))throw new Te("Missing a "+m+" character to complete a CD arrow.",o[x]);y[p].body.push(o[x])}if(g)throw new Te("Missing a "+m+" character to complete a CD arrow.",o[f])}else throw new Te('Expected one of "<>AV=|." after @',o[f]);var w=qA(m,y,e),k={type:"styling",body:[w],mode:"math",style:"display"};r.push(k),d=Y5()}s%2===0?r.push(d):r.shift(),r=[],i.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var j=new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:j,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}Ie({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=Uo(Gt(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=Re(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new ze("mrow",[on(e.label,t)]);return n=new ze("mpadded",[n]),n.setAttribute("width","0"),e.side==="left"&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),n=new ze("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});Ie({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=Uo(Gt(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(e,t){return new ze("mrow",[on(e.fragment,t)])}});Ie({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=St(t[0],"ordgroup"),i=r.body,s="",o=0;o<i.length;o++){var d=St(i[o],"textord");s+=d.text}var f=parseInt(s),m;if(isNaN(f))throw new Te("\\@char has non-numeric argument "+s);if(f<0||f>=1114111)throw new Te("\\@char with invalid code point "+s);return f<=65535?m=String.fromCharCode(f):(f-=65536,m=String.fromCharCode((f>>10)+55296,(f&1023)+56320)),{type:"textord",mode:n.mode,text:m}}});var O7=(e,t)=>{var n=lr(e.body,t.withColor(e.color),!1);return il(n)},$7=(e,t)=>{var n=pa(e.body,t.withColor(e.color)),r=new ze("mstyle",n);return r.setAttribute("mathcolor",e.color),r};Ie({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:n}=e,r=St(t[0],"color-token").color,i=t[1];return{type:"color",mode:n.mode,color:r,body:Xn(i)}},htmlBuilder:O7,mathmlBuilder:$7});Ie({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=St(t[0],"color-token").color;n.gullet.macros.set("\\current@color",i);var s=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:i,body:s}},htmlBuilder:O7,mathmlBuilder:$7});Ie({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,i=r.gullet.future().text==="["?r.parseSizeGroup(!0):null,s=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:s,size:i&&St(i,"size").value}},htmlBuilder(e,t){var n=Me(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=Re(Mn(e.size,t)))),n},mathmlBuilder(e,t){var n=new ze("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",Re(Mn(e.size,t)))),n}});var pp={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},H7=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Te("Expected a control sequence",e);return t},IA=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},q7=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i==null&&(n.noexpand=!0,i={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};Ie({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(pp[r.text])return(n==="\\global"||n==="\\\\globallong")&&(r.text=pp[r.text]),St(t.parseFunction(),"internal");throw new Te("Invalid token after macro prefix",r)}});Ie({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new Te("Expected a control sequence",r);for(var s=0,o,d=[[]];t.gullet.future().text!=="{";)if(r=t.gullet.popToken(),r.text==="#"){if(t.gullet.future().text==="{"){o=t.gullet.future(),d[s].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new Te('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==s+1)throw new Te('Argument number "'+r.text+'" out of order');s++,d.push([])}else{if(r.text==="EOF")throw new Te("Expected a macro definition");d[s].push(r.text)}var{tokens:f}=t.gullet.consumeArg();return o&&f.unshift(o),(n==="\\edef"||n==="\\xdef")&&(f=t.gullet.expandTokens(f),f.reverse()),t.gullet.macros.set(i,{tokens:f,numArgs:s,delimiters:d},n===pp[n]),{type:"internal",mode:t.mode}}});Ie({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=H7(t.gullet.popToken());t.gullet.consumeSpaces();var i=IA(t);return q7(t,r,i,n==="\\\\globallet"),{type:"internal",mode:t.mode}}});Ie({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=H7(t.gullet.popToken()),i=t.gullet.popToken(),s=t.gullet.popToken();return q7(t,r,s,n==="\\\\globalfuture"),t.gullet.pushToken(s),t.gullet.pushToken(i),{type:"internal",mode:t.mode}}});var ec=function(t,n,r){var i=xn.math[t]&&xn.math[t].replace,s=hg(i||t,n,r);if(!s)throw new Error("Unsupported symbol "+t+" and font size "+n+".");return s},xg=function(t,n,r,i){var s=r.havingBaseStyle(n),o=Me(i.concat(s.sizingClasses(r)),[t],r),d=s.sizeMultiplier/r.sizeMultiplier;return o.height*=d,o.depth*=d,o.maxFontSize=s.sizeMultiplier,o},U7=function(t,n,r){var i=n.havingBaseStyle(r),s=(1-n.sizeMultiplier/i.sizeMultiplier)*n.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=Re(s),t.height-=s,t.depth+=s},PA=function(t,n,r,i,s,o){var d=Ar(t,"Main-Regular",s,i),f=xg(d,n,i,o);return U7(f,i,n),f},FA=function(t,n,r,i){return Ar(t,"Size"+n+"-Regular",r,i)},I7=function(t,n,r,i,s,o){var d=FA(t,n,s,i),f=xg(Me(["delimsizing","size"+n],[d],i),pt.TEXT,i,o);return r&&U7(f,i,pt.TEXT),f},d1=function(t,n,r){var i;n==="Size1-Regular"?i="delim-size1":i="delim-size4";var s=Me(["delimsizinginner",i],[Me([],[Ar(t,n,r)])]);return{type:"elem",elem:s}},f1=function(t,n,r){var i=gi["Size4-Regular"][t.charCodeAt(0)]?gi["Size4-Regular"][t.charCodeAt(0)][4]:gi["Size1-Regular"][t.charCodeAt(0)][4],s=new Jl("inner",aA(t,Math.round(1e3*n))),o=new tl([s],{width:Re(i),height:Re(n),style:"width:"+Re(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*n),preserveAspectRatio:"xMinYMin"}),d=es([],[o],r);return d.height=n,d.style.height=Re(n),d.style.width=Re(i),{type:"elem",elem:d}},gp=.008,sd={type:"kern",size:-1*gp},VA=new Set(["|","\\lvert","\\rvert","\\vert"]),GA=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),P7=function(t,n,r,i,s,o){var d,f,m,y,p="",g=0;d=m=y=t,f=null;var x="Size1-Regular";t==="\\uparrow"?m=y="⏐":t==="\\Uparrow"?m=y="‖":t==="\\downarrow"?d=m="⏐":t==="\\Downarrow"?d=m="‖":t==="\\updownarrow"?(d="\\uparrow",m="⏐",y="\\downarrow"):t==="\\Updownarrow"?(d="\\Uparrow",m="‖",y="\\Downarrow"):VA.has(t)?(m="∣",p="vert",g=333):GA.has(t)?(m="∥",p="doublevert",g=556):t==="["||t==="\\lbrack"?(d="⎡",m="⎢",y="⎣",x="Size4-Regular",p="lbrack",g=667):t==="]"||t==="\\rbrack"?(d="⎤",m="⎥",y="⎦",x="Size4-Regular",p="rbrack",g=667):t==="\\lfloor"||t==="⌊"?(m=d="⎢",y="⎣",x="Size4-Regular",p="lfloor",g=667):t==="\\lceil"||t==="⌈"?(d="⎡",m=y="⎢",x="Size4-Regular",p="lceil",g=667):t==="\\rfloor"||t==="⌋"?(m=d="⎥",y="⎦",x="Size4-Regular",p="rfloor",g=667):t==="\\rceil"||t==="⌉"?(d="⎤",m=y="⎥",x="Size4-Regular",p="rceil",g=667):t==="("||t==="\\lparen"?(d="⎛",m="⎜",y="⎝",x="Size4-Regular",p="lparen",g=875):t===")"||t==="\\rparen"?(d="⎞",m="⎟",y="⎠",x="Size4-Regular",p="rparen",g=875):t==="\\{"||t==="\\lbrace"?(d="⎧",f="⎨",y="⎩",m="⎪",x="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(d="⎫",f="⎬",y="⎭",m="⎪",x="Size4-Regular"):t==="\\lgroup"||t==="⟮"?(d="⎧",y="⎩",m="⎪",x="Size4-Regular"):t==="\\rgroup"||t==="⟯"?(d="⎫",y="⎭",m="⎪",x="Size4-Regular"):t==="\\lmoustache"||t==="⎰"?(d="⎧",y="⎭",m="⎪",x="Size4-Regular"):(t==="\\rmoustache"||t==="⎱")&&(d="⎫",y="⎩",m="⎪",x="Size4-Regular");var w=ec(d,x,s),k=w.height+w.depth,j=ec(m,x,s),N=j.height+j.depth,_=ec(y,x,s),E=_.height+_.depth,L=0,D=1;if(f!==null){var T=ec(f,x,s);L=T.height+T.depth,D=2}var O=k+E+L,Z=Math.max(0,Math.ceil((n-O)/(D*N))),V=O+Z*D*N,P=i.fontMetrics().axisHeight;r&&(P*=i.sizeMultiplier);var K=V/2-P,X=[];if(p.length>0){var le=V-k-E,F=Math.round(V*1e3),Y=iA(p,Math.round(le*1e3)),q=new Jl(p,Y),Q=Re(g/1e3),ee=Re(F/1e3),ne=new tl([q],{width:Q,height:ee,viewBox:"0 0 "+g+" "+F}),R=es([],[ne],i);R.height=F/1e3,R.style.width=Q,R.style.height=ee,X.push({type:"elem",elem:R})}else{if(X.push(d1(y,x,s)),X.push(sd),f===null){var H=V-k-E+2*gp;X.push(f1(m,H,i))}else{var W=(V-k-E-L)/2+2*gp;X.push(f1(m,W,i)),X.push(sd),X.push(d1(f,x,s)),X.push(sd),X.push(f1(m,W,i))}X.push(sd),X.push(d1(d,x,s))}var B=i.havingBaseStyle(pt.TEXT),ce=Vt({positionType:"bottom",positionData:K,children:X});return xg(Me(["delimsizing","mult"],[ce],B),pt.TEXT,i,o)},h1=80,m1=.08,p1=function(t,n,r,i,s){var o=rA(t,i,r),d=new Jl(t,o),f=new tl([d],{width:"400em",height:Re(n),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return es(["hide-tail"],[f],s)},YA=function(t,n){var r=n.havingBaseSizing(),i=X7("\\surd",t*r.sizeMultiplier,Y7,r),s=r.sizeMultiplier,o=Math.max(0,n.minRuleThickness-n.fontMetrics().sqrtRuleThickness),d,f=0,m=0,y=0,p;return i.type==="small"?(y=1e3+1e3*o+h1,t<1?s=1:t<1.4&&(s=.7),f=(1+o+m1)/s,m=(1+o)/s,d=p1("sqrtMain",f,y,o,n),d.style.minWidth="0.853em",p=.833/s):i.type==="large"?(y=(1e3+h1)*lc[i.size],m=(lc[i.size]+o)/s,f=(lc[i.size]+o+m1)/s,d=p1("sqrtSize"+i.size,f,y,o,n),d.style.minWidth="1.02em",p=1/s):(f=t+o+m1,m=t+o,y=Math.floor(1e3*t+o)+h1,d=p1("sqrtTall",f,y,o,n),d.style.minWidth="0.742em",p=1.056),d.height=m,d.style.height=Re(f),{span:d,advanceWidth:p,ruleWidth:(n.fontMetrics().sqrtRuleThickness+o)*s}},F7=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),XA=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),V7=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),lc=[0,1.2,1.8,2.4,3],G7=function(t,n,r,i,s){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),F7.has(t)||V7.has(t))return I7(t,n,!1,r,i,s);if(XA.has(t))return P7(t,lc[n],!1,r,i,s);throw new Te("Illegal delimiter: '"+t+"'")},KA=[{type:"small",style:pt.SCRIPTSCRIPT},{type:"small",style:pt.SCRIPT},{type:"small",style:pt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],ZA=[{type:"small",style:pt.SCRIPTSCRIPT},{type:"small",style:pt.SCRIPT},{type:"small",style:pt.TEXT},{type:"stack"}],Y7=[{type:"small",style:pt.SCRIPTSCRIPT},{type:"small",style:pt.SCRIPT},{type:"small",style:pt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],QA=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.")},X7=function(t,n,r,i){for(var s=Math.min(2,3-i.style.size),o=s;o<r.length;o++){var d=r[o];if(d.type==="stack")break;var f=ec(t,QA(d),"math"),m=f.height+f.depth;if(d.type==="small"){var y=i.havingBaseStyle(d.style);m*=y.sizeMultiplier}if(m>n)return d}return r[r.length-1]},yp=function(t,n,r,i,s,o){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var d;V7.has(t)?d=KA:F7.has(t)?d=Y7:d=ZA;var f=X7(t,n,d,i);return f.type==="small"?PA(t,f.style,r,i,s,o):f.type==="large"?I7(t,f.size,r,i,s,o):P7(t,n,r,i,s,o)},g1=function(t,n,r,i,s,o){var d=i.fontMetrics().axisHeight*i.sizeMultiplier,f=901,m=5/i.fontMetrics().ptPerEm,y=Math.max(n-d,r+d),p=Math.max(y/500*f,2*y-m);return yp(t,p,!0,i,s,o)},K5={"\\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}},WA=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 wf(e,t){var n=xf(e);if(n&&WA.has(n.text))return n;throw n?new Te("Invalid delimiter '"+n.text+"' after '"+t.funcName+"'",e):new Te("Invalid delimiter type '"+e.type+"'",e)}Ie({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=wf(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:K5[e.funcName].size,mclass:K5[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim==="."?Me([e.mclass]):G7(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(Ta(e.delim,e.mode));var n=new ze("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=Re(lc[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}});function Z5(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Ie({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 Te("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:wf(t[0],e).text,color:n}}});Ie({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=wf(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var s=St(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:i,left:n.text,right:s.delim,rightColor:s.color}},htmlBuilder:(e,t)=>{Z5(e);for(var n=lr(e.body,t,!0,["mopen","mclose"]),r=0,i=0,s=!1,o=0;o<n.length;o++)n[o].isMiddle?s=!0:(r=Math.max(n[o].height,r),i=Math.max(n[o].depth,i));r*=t.sizeMultiplier,i*=t.sizeMultiplier;var d;if(e.left==="."?d=hc(t,["mopen"]):d=g1(e.left,r,i,t,e.mode,["mopen"]),n.unshift(d),s)for(var f=1;f<n.length;f++){var m=n[f],y=m.isMiddle;y&&(n[f]=g1(y.delim,r,i,y.options,e.mode,[]))}var p;if(e.right===".")p=hc(t,["mclose"]);else{var g=e.rightColor?t.withColor(e.rightColor):t;p=g1(e.right,r,i,g,e.mode,["mclose"])}return n.push(p),Me(["minner"],n,t)},mathmlBuilder:(e,t)=>{Z5(e);var n=pa(e.body,t);if(e.left!=="."){var r=new ze("mo",[Ta(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if(e.right!=="."){var i=new ze("mo",[Ta(e.right,e.mode)]);i.setAttribute("fence","true"),e.rightColor&&i.setAttribute("mathcolor",e.rightColor),n.push(i)}return gg(n)}});Ie({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=wf(t[0],e);if(!e.parser.leftrightDepth)throw new Te("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;if(e.delim===".")n=hc(t,[]);else{n=G7(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};n.isMiddle=r}return n},mathmlBuilder:(e,t)=>{var n=e.delim==="\\vert"||e.delim==="|"?Ta("|","text"):Ta(e.delim,e.mode),r=new ze("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var Sf=(e,t)=>{var n=Uo(Gt(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,s,o=0,d=rl(e.body);if(r==="sout")s=Me(["stretchy","sout"]),s.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(r==="phase"){var f=Mn({number:.6,unit:"pt"},t),m=Mn({number:.35,unit:"ex"},t),y=t.havingBaseSizing();i=i/y.sizeMultiplier;var p=n.height+n.depth+f+m;n.style.paddingLeft=Re(p/2+f);var g=Math.floor(1e3*p*i),x=tA(g),w=new tl([new Jl("phase",x)],{width:"400em",height:Re(g/1e3),viewBox:"0 0 400000 "+g,preserveAspectRatio:"xMinYMin slice"});s=es(["hide-tail"],[w],t),s.style.height=Re(p),o=n.depth+f+m}else{/cancel/.test(r)?d||n.classes.push("cancel-pad"):r==="angl"?n.classes.push("anglpad"):n.classes.push("boxpad");var k=0,j=0,N=0;/box/.test(r)?(N=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),k=t.fontMetrics().fboxsep+(r==="colorbox"?0:N),j=k):r==="angl"?(N=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),k=4*N,j=Math.max(0,.25-n.depth)):(k=d?.2:0,j=k),s=BA(n,r,k,j,t),/fbox|boxed|fcolorbox/.test(r)?(s.style.borderStyle="solid",s.style.borderWidth=Re(N)):r==="angl"&&N!==.049&&(s.style.borderTopWidth=Re(N),s.style.borderRightWidth=Re(N)),o=n.depth+j,e.backgroundColor&&(s.style.backgroundColor=e.backgroundColor,e.borderColor&&(s.style.borderColor=e.borderColor))}var _;if(e.backgroundColor)_=Vt({positionType:"individualShift",children:[{type:"elem",elem:s,shift:o},{type:"elem",elem:n,shift:0}]});else{var E=/cancel|phase/.test(r)?["svg-align"]:[];_=Vt({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:s,shift:o,wrapperClasses:E}]})}return/cancel/.test(r)&&(_.height=n.height,_.depth=n.depth),/cancel/.test(r)&&!d?Me(["mord","cancel-lap"],[_],t):Me(["mord"],[_],t)},kf=(e,t)=>{var n=0,r=new ze(e.label.includes("colorbox")?"mpadded":"menclose",[on(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),e.label==="\\fcolorbox"){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+Re(i)+" solid "+e.borderColor)}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};Ie({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,n){var{parser:r,funcName:i}=e,s=St(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:r.mode,label:i,backgroundColor:s,body:o}},htmlBuilder:Sf,mathmlBuilder:kf});Ie({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,n){var{parser:r,funcName:i}=e,s=St(t[0],"color-token").color,o=St(t[1],"color-token").color,d=t[2];return{type:"enclose",mode:r.mode,label:i,backgroundColor:o,borderColor:s,body:d}},htmlBuilder:Sf,mathmlBuilder:kf});Ie({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]}}});Ie({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"enclose",mode:n.mode,label:r,body:i}},htmlBuilder:Sf,mathmlBuilder:kf});Ie({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e;n.mode==="math"&&n.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var i=t[0];return{type:"enclose",mode:n.mode,label:r,body:i}},htmlBuilder:Sf,mathmlBuilder:kf});Ie({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 K7={};function ki(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:s,mathmlBuilder:o}=e,d={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},f=0;f<n.length;++f)K7[n[f]]=d;s&&(qd[t]=s),o&&(Ud[t]=o)}var Z7={};function U(e,t){Z7[e]=t}class Gr{constructor(t,n,r){this.lexer=t,this.start=n,this.end=r}static range(t,n){return n?!t||!t.loc||!n.loc||t.loc.lexer!==n.loc.lexer?null:new Gr(t.loc.lexer,t.loc.start,n.loc.end):t&&t.loc}}class da{constructor(t,n){this.text=t,this.loc=n}range(t,n){return new da(n,Gr.range(this,t))}}function Q5(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 Nf=e=>{var t=e.parser.settings;if(!t.displayMode)throw new Te("{"+e.envName+"} can be used only in display mode.")},JA=new Set(["gather","gather*"]);function bg(e){if(!e.includes("ed"))return!e.includes("*")}function rs(e,t,n){var{hskipBeforeAndAfter:r,addJot:i,cols:s,arraystretch:o,colSeparationType:d,autoTag:f,singleRow:m,emptySingleRow:y,maxNumCols:p,leqno:g}=t;if(e.gullet.beginGroup(),m||e.gullet.macros.set("\\cr","\\\\\\relax"),!o){var x=e.gullet.expandMacroAsText("\\arraystretch");if(x==null)o=1;else if(o=parseFloat(x),!o||o<0)throw new Te("Invalid \\arraystretch: "+x)}e.gullet.beginGroup();var w=[],k=[w],j=[],N=[],_=f!=null?[]:void 0;function E(){f&&e.gullet.macros.set("\\@eqnsw","1",!0)}function L(){_&&(e.gullet.macros.get("\\df@tag")?(_.push(e.subparse([new da("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):_.push(!!f&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(E(),N.push(Q5(e));;){var D=e.parseExpression(!1,m?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var T={type:"ordgroup",mode:e.mode,body:D};n&&(T={type:"styling",mode:e.mode,style:n,body:[T]}),w.push(T);var O=e.fetch().text;if(O==="&"){if(p&&w.length===p){if(m||d)throw new Te("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(O==="\\end"){L(),w.length===1&&T.type==="styling"&&T.body.length===1&&T.body[0].type==="ordgroup"&&T.body[0].body.length===0&&(k.length>1||!y)&&k.pop(),N.length<k.length+1&&N.push([]);break}else if(O==="\\\\"){e.consume();var Z=void 0;e.gullet.future().text!==" "&&(Z=e.parseSizeGroup(!0)),j.push(Z?Z.value:null),L(),N.push(Q5(e)),w=[],k.push(w),E()}else throw new Te("Expected & or \\\\ or \\cr or \\end",e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:i,arraystretch:o,body:k,cols:s,rowGaps:j,hskipBeforeAndAfter:r,hLinesBeforeRow:N,colSeparationType:d,tags:_,leqno:g}}function wg(e){return e.slice(0,1)==="d"?"display":"text"}var Ni=function(t,n){var r,i,s=t.body.length,o=t.hLinesBeforeRow,d=0,f=new Array(s),m=[],y=Math.max(n.fontMetrics().arrayRuleWidth,n.minRuleThickness),p=1/n.fontMetrics().ptPerEm,g=5*p;if(t.colSeparationType&&t.colSeparationType==="small"){var x=n.havingStyle(pt.SCRIPT).sizeMultiplier;g=.2778*(x/n.sizeMultiplier)}var w=t.colSeparationType==="CD"?Mn({number:3,unit:"ex"},n):12*p,k=3*p,j=t.arraystretch*w,N=.7*j,_=.3*j,E=0;function L(He){for(var rt=0;rt<He.length;++rt)rt>0&&(E+=.25),m.push({pos:E,isDashed:He[rt]})}for(L(o[0]),r=0;r<t.body.length;++r){var D=t.body[r],T=N,O=_;d<D.length&&(d=D.length);var Z=new Array(D.length);for(i=0;i<D.length;++i){var V=Gt(D[i],n);O<V.depth&&(O=V.depth),T<V.height&&(T=V.height),Z[i]=V}var P=t.rowGaps[r],K=0;P&&(K=Mn(P,n),K>0&&(K+=_,O<K&&(O=K),K=0)),t.addJot&&r<t.body.length-1&&(O+=k),Z.height=T,Z.depth=O,E+=T,Z.pos=E,E+=O+K,f[r]=Z,L(o[r+1])}var X=E/2+n.fontMetrics().axisHeight,le=t.cols||[],F=[],Y,q,Q=[];if(t.tags&&t.tags.some(He=>He))for(r=0;r<s;++r){var ee=f[r],ne=ee.pos-X,R=t.tags[r],H=void 0;R===!0?H=Me(["eqn-num"],[],n):R===!1?H=Me([],[],n):H=Me([],lr(R,n,!0),n),H.depth=ee.depth,H.height=ee.height,Q.push({type:"elem",elem:H,shift:ne})}for(i=0,q=0;i<d||q<le.length;++i,++q){for(var W,B=le[q],ce=!0;((pe=B)==null?void 0:pe.type)==="separator";){var pe;if(ce||(Y=Me(["arraycolsep"],[]),Y.style.width=Re(n.fontMetrics().doubleRuleSep),F.push(Y)),B.separator==="|"||B.separator===":"){var xe=B.separator==="|"?"solid":"dashed",be=Me(["vertical-separator"],[],n);be.style.height=Re(E),be.style.borderRightWidth=Re(y),be.style.borderRightStyle=xe,be.style.margin="0 "+Re(-y/2);var ye=E-X;ye&&(be.style.verticalAlign=Re(-ye)),F.push(be)}else throw new Te("Invalid separator type: "+B.separator);q++,B=le[q],ce=!1}if(!(i>=d)){var Ce=void 0;if(i>0||t.hskipBeforeAndAfter){var Ge,Pe;Ce=(Ge=(Pe=B)==null?void 0:Pe.pregap)!=null?Ge:g,Ce!==0&&(Y=Me(["arraycolsep"],[]),Y.style.width=Re(Ce),F.push(Y))}var $e=[];for(r=0;r<s;++r){var qe=f[r],nt=qe[i];if(nt){var lt=qe.pos-X;nt.depth=qe.depth,nt.height=qe.height,$e.push({type:"elem",elem:nt,shift:lt})}}var We=Vt({positionType:"individualShift",children:$e}),Dt=Me(["col-align-"+(((W=B)==null?void 0:W.align)||"c")],[We]);if(F.push(Dt),i<d-1||t.hskipBeforeAndAfter){var ke,et;Ce=(ke=(et=B)==null?void 0:et.postgap)!=null?ke:g,Ce!==0&&(Y=Me(["arraycolsep"],[]),Y.style.width=Re(Ce),F.push(Y))}}}var st=Me(["mtable"],F);if(m.length>0){for(var Nt=qo("hline",n,y),kn=qo("hdashline",n,y),Ht=[{type:"elem",elem:st,shift:0}];m.length>0;){var ct=m.pop(),Lt=ct.pos-X;ct.isDashed?Ht.push({type:"elem",elem:kn,shift:Lt}):Ht.push({type:"elem",elem:Nt,shift:Lt})}st=Vt({positionType:"individualShift",children:Ht})}if(Q.length===0)return Me(["mord"],[st],n);var de=Vt({positionType:"individualShift",children:Q}),je=Me(["tag"],[de],n);return il([st,je])},eT={c:"center ",l:"left ",r:"right "},ji=function(t,n){for(var r=[],i=new ze("mtd",[],["mtr-glue"]),s=new ze("mtd",[],["mml-eqn-num"]),o=0;o<t.body.length;o++){for(var d=t.body[o],f=[],m=0;m<d.length;m++)f.push(new ze("mtd",[on(d[m],n)]));t.tags&&t.tags[o]&&(f.unshift(i),f.push(i),t.leqno?f.unshift(s):f.push(s)),r.push(new ze("mtr",f))}var y=new ze("mtable",r),p=t.arraystretch===.5?.1:.16+t.arraystretch-1+(t.addJot?.09:0);y.setAttribute("rowspacing",Re(p));var g="",x="";if(t.cols&&t.cols.length>0){var w=t.cols,k="",j=!1,N=0,_=w.length;w[0].type==="separator"&&(g+="top ",N=1),w[w.length-1].type==="separator"&&(g+="bottom ",_-=1);for(var E=N;E<_;E++){var L=w[E];L.type==="align"?(x+=eT[L.align],j&&(k+="none "),j=!0):L.type==="separator"&&j&&(k+=L.separator==="|"?"solid ":"dashed ",j=!1)}y.setAttribute("columnalign",x.trim()),/[sd]/.test(k)&&y.setAttribute("columnlines",k.trim())}if(t.colSeparationType==="align"){for(var D=t.cols||[],T="",O=1;O<D.length;O++)T+=O%2?"0em ":"1em ";y.setAttribute("columnspacing",T.trim())}else t.colSeparationType==="alignat"||t.colSeparationType==="gather"?y.setAttribute("columnspacing","0em"):t.colSeparationType==="small"?y.setAttribute("columnspacing","0.2778em"):t.colSeparationType==="CD"?y.setAttribute("columnspacing","0.5em"):y.setAttribute("columnspacing","1em");var Z="",V=t.hLinesBeforeRow;g+=V[0].length>0?"left ":"",g+=V[V.length-1].length>0?"right ":"";for(var P=1;P<V.length-1;P++)Z+=V[P].length===0?"none ":V[P][0]?"dashed ":"solid ";return/[sd]/.test(Z)&&y.setAttribute("rowlines",Z.trim()),g!==""&&(y=new ze("menclose",[y]),y.setAttribute("notation",g.trim())),t.arraystretch&&t.arraystretch<1&&(y=new ze("mstyle",[y]),y.setAttribute("scriptlevel","1")),y},Q7=function(t,n){t.envName.includes("ed")||Nf(t);var r=[],i=t.envName.includes("at")?"alignat":"align",s=t.envName==="split",o=rs(t.parser,{cols:r,addJot:!0,autoTag:s?void 0:bg(t.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:s?2:void 0,leqno:t.parser.settings.leqno},"display"),d=0,f=0,m={type:"ordgroup",mode:t.mode,body:[]};if(n[0]&&n[0].type==="ordgroup"){for(var y="",p=0;p<n[0].body.length;p++){var g=St(n[0].body[p],"textord");y+=g.text}d=Number(y),f=d*2}var x=!f;o.body.forEach(function(N){for(var _=1;_<N.length;_+=2){var E=St(N[_],"styling"),L=St(E.body[0],"ordgroup");L.body.unshift(m)}if(x)f<N.length&&(f=N.length);else{var D=N.length/2;if(d<D)throw new Te("Too many math in a row: "+("expected "+d+", but got "+D),N[0])}});for(var w=0;w<f;++w){var k="r",j=0;w%2===1?k="l":w>0&&x&&(j=1),r[w]={type:"align",align:k,pregap:j,postgap:0}}return o.colSeparationType=x?"align":"alignat",o};ki({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=xf(t[0]),r=n?[t[0]]:St(t[0],"ordgroup").body,i=r.map(function(o){var d=vf(o),f=d.text;if("lcr".includes(f))return{type:"align",align:f};if(f==="|")return{type:"separator",separator:"|"};if(f===":")return{type:"separator",separator:":"};throw new Te("Unknown column alignment: "+f,o)}),s={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return rs(e.parser,s,wg(e.envName))},htmlBuilder:Ni,mathmlBuilder:ji});ki({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",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if(e.envName.charAt(e.envName.length-1)==="*"){var i=e.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,!"lcr".includes(n))throw new Te("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),r.cols=[{type:"align",align:n}]}}var s=rs(e.parser,r,wg(e.envName)),o=Math.max(0,...s.body.map(d=>d.length));return s.cols=new Array(o).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[s],left:t[0],right:t[1],rightColor:void 0}:s},htmlBuilder:Ni,mathmlBuilder:ji});ki({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:Ni,mathmlBuilder:ji});ki({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=xf(t[0]),r=n?[t[0]]:St(t[0],"ordgroup").body,i=r.map(function(d){var f=vf(d),m=f.text;if("lc".includes(m))return{type:"align",align:m};throw new Te("Unknown column alignment: "+m,d)});if(i.length>1)throw new Te("{subarray} can contain only one column");var s={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5},o=rs(e.parser,s,"script");if(o.body.length>0&&o.body[0].length>1)throw new Te("{subarray} can contain only one column");return o},htmlBuilder:Ni,mathmlBuilder:ji});ki({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,wg(e.envName));return{type:"leftright",mode:e.mode,body:[n],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:Ni,mathmlBuilder:ji});ki({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Q7,htmlBuilder:Ni,mathmlBuilder:ji});ki({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){JA.has(e.envName)&&Nf(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:bg(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return rs(e.parser,t,"display")},htmlBuilder:Ni,mathmlBuilder:ji});ki({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Q7,htmlBuilder:Ni,mathmlBuilder:ji});ki({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Nf(e);var t={autoTag:bg(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return rs(e.parser,t,"display")},htmlBuilder:Ni,mathmlBuilder:ji});ki({type:"array",names:["CD"],props:{numArgs:0},handler(e){return Nf(e),UA(e.parser)},htmlBuilder:Ni,mathmlBuilder:ji});U("\\nonumber","\\gdef\\@eqnsw{0}");U("\\notag","\\nonumber");Ie({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new Te(e.funcName+" valid only within array environment")}});var W5=K7;Ie({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];if(i.type!=="ordgroup")throw new Te("Invalid environment name",i);for(var s="",o=0;o<i.body.length;++o)s+=St(i.body[o],"textord").text;if(r==="\\begin"){if(!W5.hasOwnProperty(s))throw new Te("No such environment: "+s,i);var d=W5[s],{args:f,optArgs:m}=n.parseArguments("\\begin{"+s+"}",d),y={mode:n.mode,envName:s,parser:n},p=d.handler(y,f,m);n.expect("\\end",!1);var g=n.nextToken,x=St(n.parseFunction(),"environment");if(x.name!==s)throw new Te("Mismatch: \\begin{"+s+"} matched by \\end{"+x.name+"}",g);return p}return{type:"environment",mode:n.mode,name:s,nameGroup:i}}});var W7=(e,t)=>{var n=e.font,r=t.withFont(n);return Gt(e.body,r)},J7=(e,t)=>{var n=e.font,r=t.withFont(n);return on(e.body,r)},J5={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Ie({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:r}=e,i=Id(t[0]),s=r;return s in J5&&(s=J5[s]),{type:"font",mode:n.mode,font:s.slice(1),body:i}},htmlBuilder:W7,mathmlBuilder:J7});Ie({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"mclass",mode:n.mode,mclass:bf(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:rl(r)}}});Ie({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:i}=e,{mode:s}=n,o=n.parseExpression(!0,i),d="math"+r.slice(1);return{type:"font",mode:s,font:d,body:{type:"ordgroup",mode:n.mode,body:o}}},htmlBuilder:W7,mathmlBuilder:J7});var tT=(e,t)=>{var n=t.style,r=n.fracNum(),i=n.fracDen(),s;s=t.havingStyle(r);var o=Gt(e.numer,s,t);if(e.continued){var d=8.5/t.fontMetrics().ptPerEm,f=3.5/t.fontMetrics().ptPerEm;o.height=o.height<d?d:o.height,o.depth=o.depth<f?f:o.depth}s=t.havingStyle(i);var m=Gt(e.denom,s,t),y,p,g;e.hasBarLine?(e.barSize?(p=Mn(e.barSize,t),y=qo("frac-line",t,p)):y=qo("frac-line",t),p=y.height,g=y.height):(y=null,p=0,g=t.fontMetrics().defaultRuleThickness);var x,w,k;n.size===pt.DISPLAY.size?(x=t.fontMetrics().num1,p>0?w=3*g:w=7*g,k=t.fontMetrics().denom1):(p>0?(x=t.fontMetrics().num2,w=g):(x=t.fontMetrics().num3,w=3*g),k=t.fontMetrics().denom2);var j;if(y){var _=t.fontMetrics().axisHeight;x-o.depth-(_+.5*p)<w&&(x+=w-(x-o.depth-(_+.5*p))),_-.5*p-(m.height-k)<w&&(k+=w-(_-.5*p-(m.height-k)));var E=-(_-.5*p);j=Vt({positionType:"individualShift",children:[{type:"elem",elem:m,shift:k},{type:"elem",elem:y,shift:E},{type:"elem",elem:o,shift:-x}]})}else{var N=x-o.depth-(m.height-k);N<w&&(x+=.5*(w-N),k+=.5*(w-N)),j=Vt({positionType:"individualShift",children:[{type:"elem",elem:m,shift:k},{type:"elem",elem:o,shift:-x}]})}s=t.havingStyle(n),j.height*=s.sizeMultiplier/t.sizeMultiplier,j.depth*=s.sizeMultiplier/t.sizeMultiplier;var L;n.size===pt.DISPLAY.size?L=t.fontMetrics().delim1:n.size===pt.SCRIPTSCRIPT.size?L=t.havingStyle(pt.SCRIPT).fontMetrics().delim2:L=t.fontMetrics().delim2;var D,T;return e.leftDelim==null?D=hc(t,["mopen"]):D=yp(e.leftDelim,L,!0,t.havingStyle(n),e.mode,["mopen"]),e.continued?T=Me([]):e.rightDelim==null?T=hc(t,["mclose"]):T=yp(e.rightDelim,L,!0,t.havingStyle(n),e.mode,["mclose"]),Me(["mord"].concat(s.sizingClasses(t)),[D,Me(["mfrac"],[j]),T],t)},nT=(e,t)=>{var n=new ze("mfrac",[on(e.numer,t),on(e.denom,t)]);if(!e.hasBarLine)n.setAttribute("linethickness","0px");else if(e.barSize){var r=Mn(e.barSize,t);n.setAttribute("linethickness",Re(r))}if(e.leftDelim!=null||e.rightDelim!=null){var i=[];if(e.leftDelim!=null){var s=new ze("mo",[new Kn(e.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),i.push(s)}if(i.push(n),e.rightDelim!=null){var o=new ze("mo",[new Kn(e.rightDelim.replace("\\",""))]);o.setAttribute("fence","true"),i.push(o)}return gg(i)}return n},eb=(e,t)=>{if(!t)return e;var n={type:"styling",mode:e.mode,style:t,body:[e]};return n};Ie({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:r}=e,i=t[0],s=t[1],o,d=null,f=null;switch(r){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,d="(",f=")";break;case"\\\\bracefrac":o=!1,d="\\{",f="\\}";break;case"\\\\brackfrac":o=!1,d="[",f="]";break;default:throw new Error("Unrecognized genfrac command")}var m=r==="\\cfrac",y=null;return m||r.startsWith("\\d")?y="display":r.startsWith("\\t")&&(y="text"),eb({type:"genfrac",mode:n.mode,numer:i,denom:s,continued:m,hasBarLine:o,leftDelim:d,rightDelim:f,barSize:null},y)},htmlBuilder:tT,mathmlBuilder:nT});Ie({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:n,token:r}=e,i;switch(n){case"\\over":i="\\frac";break;case"\\choose":i="\\binom";break;case"\\atop":i="\\\\atopfrac";break;case"\\brace":i="\\\\bracefrac";break;case"\\brack":i="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:i,token:r}}});var ex=["display","text","script","scriptscript"],tx=function(t){var n=null;return t.length>0&&(n=t,n=n==="."?null:n),n};Ie({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var{parser:n}=e,r=t[4],i=t[5],s=Id(t[0]),o=s.type==="atom"&&s.family==="open"?tx(s.text):null,d=Id(t[1]),f=d.type==="atom"&&d.family==="close"?tx(d.text):null,m=St(t[2],"size"),y,p=null;m.isBlank?y=!0:(p=m.value,y=p.number>0);var g=null,x=t[3];if(x.type==="ordgroup"){if(x.body.length>0){var w=St(x.body[0],"textord");g=ex[Number(w.text)]}}else x=St(x,"textord"),g=ex[Number(x.text)];return eb({type:"genfrac",mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:y,barSize:p,leftDelim:o,rightDelim:f},g)}});Ie({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:n,funcName:r,token:i}=e;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:St(t[0],"size").value,token:i}}});Ie({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],s=St(t[1],"infix").size;if(!s)throw new Error("\\\\abovefrac expected size, but got "+String(s));var o=t[2],d=s.number>0;return{type:"genfrac",mode:n.mode,numer:i,denom:o,continued:!1,hasBarLine:d,barSize:s,leftDelim:null,rightDelim:null}}});var tb=(e,t)=>{var n=t.style,r,i;e.type==="supsub"?(r=e.sup?Gt(e.sup,t.havingStyle(n.sup()),t):Gt(e.sub,t.havingStyle(n.sub()),t),i=St(e.base,"horizBrace")):i=St(e,"horizBrace");var s=Gt(i.base,t.havingBaseStyle(pt.DISPLAY)),o=yf(i,t),d;if(i.isOver?(d=Vt({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]}),d.children[0].children[0].children[1].classes.push("svg-align")):(d=Vt({positionType:"bottom",positionData:s.depth+.1+o.height,children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]}),d.children[0].children[0].children[0].classes.push("svg-align")),r){var f=Me(["minner",i.isOver?"mover":"munder"],[d],t);i.isOver?d=Vt({positionType:"firstBaseline",children:[{type:"elem",elem:f},{type:"kern",size:.2},{type:"elem",elem:r}]}):d=Vt({positionType:"bottom",positionData:f.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:f}]})}return Me(["minner",i.isOver?"mover":"munder"],[d],t)},rT=(e,t)=>{var n=gf(e.label);return new ze(e.isOver?"mover":"munder",[on(e.base,t),n])};Ie({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"horizBrace",mode:n.mode,label:r,isOver:r.includes("\\over"),base:t[0]}},htmlBuilder:tb,mathmlBuilder:rT});Ie({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],i=St(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:n.mode,href:i,body:Xn(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=lr(e.body,t,!1);return bA(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=ts(e.body,t);return n instanceof ze||(n=new ze("mrow",[n])),n.setAttribute("href",e.href),n}});Ie({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=St(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var i=[],s=0;s<r.length;s++){var o=r[s];o==="~"&&(o="\\textasciitilde"),i.push({type:"textord",mode:"text",text:o})}var d={type:"text",mode:n.mode,font:"\\texttt",body:i};return{type:"href",mode:n.mode,href:r,body:Xn(d)}}});Ie({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:Xn(t[0])}},htmlBuilder(e,t){var n=lr(e.body,t,!1);return il(n)},mathmlBuilder(e,t){return new ze("mrow",pa(e.body,t))}});Ie({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,token:i}=e,s=St(t[0],"raw").string,o=t[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var d,f={};switch(r){case"\\htmlClass":f.class=s,d={command:"\\htmlClass",class:s};break;case"\\htmlId":f.id=s,d={command:"\\htmlId",id:s};break;case"\\htmlStyle":f.style=s,d={command:"\\htmlStyle",style:s};break;case"\\htmlData":{for(var m=s.split(","),y=0;y<m.length;y++){var p=m[y],g=p.indexOf("=");if(g<0)throw new Te("\\htmlData key/value '"+p+"' missing equals sign");var x=p.slice(0,g),w=p.slice(g+1);f["data-"+x.trim()]=w}d={command:"\\htmlData",attributes:f};break}default:throw new Error("Unrecognized html command")}return n.settings.isTrusted(d)?{type:"html",mode:n.mode,attributes:f,body:Xn(o)}:n.formatUnsupportedCmd(r)},htmlBuilder:(e,t)=>{var n=lr(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=Me(r,n,t);for(var s in e.attributes)s!=="class"&&e.attributes.hasOwnProperty(s)&&i.setAttribute(s,e.attributes[s]);return i},mathmlBuilder:(e,t)=>ts(e.body,t)});Ie({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:Xn(t[0]),mathml:Xn(t[1])}},htmlBuilder:(e,t)=>{var n=lr(e.html,t,!1);return il(n)},mathmlBuilder:(e,t)=>ts(e.mathml,t)});var y1=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 Te("Invalid size: '"+t+"' in \\includegraphics");var r={number:+(n[1]+n[2]),unit:n[3]};if(!v7(r))throw new Te("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};Ie({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,i={number:0,unit:"em"},s={number:.9,unit:"em"},o={number:0,unit:"em"},d="";if(n[0])for(var f=St(n[0],"raw").string,m=f.split(","),y=0;y<m.length;y++){var p=m[y].split("=");if(p.length===2){var g=p[1].trim();switch(p[0].trim()){case"alt":d=g;break;case"width":i=y1(g);break;case"height":s=y1(g);break;case"totalheight":o=y1(g);break;default:throw new Te("Invalid key: '"+p[0]+"' in \\includegraphics.")}}}var x=St(t[0],"url").url;return d===""&&(d=x,d=d.replace(/^.*[\\/]/,""),d=d.substring(0,d.lastIndexOf("."))),r.settings.isTrusted({command:"\\includegraphics",url:x})?{type:"includegraphics",mode:r.mode,alt:d,width:i,height:s,totalheight:o,src:x}:r.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var n=Mn(e.height,t),r=0;e.totalheight.number>0&&(r=Mn(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=Mn(e.width,t));var s={height:Re(n+r)};i>0&&(s.width=Re(i)),r>0&&(s.verticalAlign=Re(-r));var o=new oA(e.src,e.alt,s);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new ze("mglyph",[]);n.setAttribute("alt",e.alt);var r=Mn(e.height,t),i=0;if(e.totalheight.number>0&&(i=Mn(e.totalheight,t)-r,n.setAttribute("valign",Re(-i))),n.setAttribute("height",Re(r+i)),e.width.number>0){var s=Mn(e.width,t);n.setAttribute("width",Re(s))}return n.setAttribute("src",e.src),n}});Ie({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=St(t[0],"size");if(n.settings.strict){var s=r[1]==="m",o=i.value.unit==="mu";s?(o||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, "+("not "+i.value.unit+" units")),n.mode!=="math"&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):o&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return N7(e.dimension,t)},mathmlBuilder(e,t){var n=Mn(e.dimension,t);return new A7(n)}});Ie({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment==="clap"?(n=Me([],[Gt(e.body,t)]),n=Me(["inner"],[n],t)):n=Me(["inner"],[Gt(e.body,t)]);var r=Me(["fix"],[]),i=Me([e.alignment],[n,r],t),s=Me(["strut"]);return s.style.height=Re(i.height+i.depth),i.depth&&(s.style.verticalAlign=Re(-i.depth)),i.children.unshift(s),i=Me(["thinbox"],[i],t),Me(["mord","vbox"],[i],t)},mathmlBuilder:(e,t)=>{var n=new ze("mpadded",[on(e.body,t)]);if(e.alignment!=="rlap"){var r=e.alignment==="llap"?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}});Ie({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,i=r.mode;r.switchMode("math");var s=n==="\\("?"\\)":"$",o=r.parseExpression(!1,s);return r.expect(s),r.switchMode(i),{type:"styling",mode:r.mode,style:"text",body:o}}});Ie({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new Te("Mismatched "+e.funcName)}});var nx=(e,t)=>{switch(t.style.size){case pt.DISPLAY.size:return e.display;case pt.TEXT.size:return e.text;case pt.SCRIPT.size:return e.script;case pt.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};Ie({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:Xn(t[0]),text:Xn(t[1]),script:Xn(t[2]),scriptscript:Xn(t[3])}},htmlBuilder:(e,t)=>{var n=nx(e,t),r=lr(n,t,!1);return il(r)},mathmlBuilder:(e,t)=>{var n=nx(e,t);return ts(n,t)}});var nb=(e,t,n,r,i,s,o)=>{e=Me([],[e]);var d=n&&rl(n),f,m;if(t){var y=Gt(t,r.havingStyle(i.sup()),r);m={elem:y,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-y.depth)}}if(n){var p=Gt(n,r.havingStyle(i.sub()),r);f={elem:p,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-p.height)}}var g;if(m&&f){var x=r.fontMetrics().bigOpSpacing5+f.elem.height+f.elem.depth+f.kern+e.depth+o;g=Vt({positionType:"bottom",positionData:x,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:f.elem,marginLeft:Re(-s)},{type:"kern",size:f.kern},{type:"elem",elem:e},{type:"kern",size:m.kern},{type:"elem",elem:m.elem,marginLeft:Re(s)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else if(f){var w=e.height-o;g=Vt({positionType:"top",positionData:w,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:f.elem,marginLeft:Re(-s)},{type:"kern",size:f.kern},{type:"elem",elem:e}]})}else if(m){var k=e.depth+o;g=Vt({positionType:"bottom",positionData:k,children:[{type:"elem",elem:e},{type:"kern",size:m.kern},{type:"elem",elem:m.elem,marginLeft:Re(s)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else return e;var j=[g];if(f&&s!==0&&!d){var N=Me(["mspace"],[],r);N.style.marginRight=Re(s),j.unshift(N)}return Me(["mop","op-limits"],j,r)},rb=new Set(["\\smallint"]),nu=(e,t)=>{var n,r,i=!1,s;e.type==="supsub"?(n=e.sup,r=e.sub,s=St(e.base,"op"),i=!0):s=St(e,"op");var o=t.style,d=!1;o.size===pt.DISPLAY.size&&s.symbol&&!rb.has(s.name)&&(d=!0);var f;if(s.symbol){var m=d?"Size2-Regular":"Size1-Regular",y="";if((s.name==="\\oiint"||s.name==="\\oiiint")&&(y=s.name.slice(1),s.name=y==="oiint"?"\\iint":"\\iiint"),f=Ar(s.name,m,"math",t,["mop","op-symbol",d?"large-op":"small-op"]),y.length>0){var p=f.italic,g=C7(y+"Size"+(d?"2":"1"),t);f=Vt({positionType:"individualShift",children:[{type:"elem",elem:f,shift:0},{type:"elem",elem:g,shift:d?.08:0}]}),s.name="\\"+y,f.classes.unshift("mop"),f.italic=p}}else if(s.body){var x=lr(s.body,t,!0);x.length===1&&x[0]instanceof fa?(f=x[0],f.classes[0]="mop"):f=Me(["mop"],x,t)}else{for(var w=[],k=1;k<s.name.length;k++)w.push(mg(s.name[k],s.mode,t));f=Me(["mop"],w,t)}var j=0,N=0;return(f instanceof fa||s.name==="\\oiint"||s.name==="\\oiiint")&&!s.suppressBaseShift&&(j=(f.height-f.depth)/2-t.fontMetrics().axisHeight,N=f.italic||0),i?nb(f,n,r,t,o,N,j):(j&&(f.style.position="relative",f.style.top=Re(j)),f)},Rc=(e,t)=>{var n;if(e.symbol)n=new ze("mo",[Ta(e.name,e.mode)]),rb.has(e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new ze("mo",pa(e.body,t));else{n=new ze("mi",[new Kn(e.name.slice(1))]);var r=new ze("mo",[Ta("","text")]);e.parentIsSupSub?n=new ze("mrow",[n,r]):n=_7([n,r])}return n},aT={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};Ie({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:r}=e,i=r;return i.length===1&&(i=aT[i]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:nu,mathmlBuilder:Rc});Ie({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Xn(r)}},htmlBuilder:nu,mathmlBuilder:Rc});var iT={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};Ie({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:nu,mathmlBuilder:Rc});Ie({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:nu,mathmlBuilder:Rc});Ie({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:n}=e,r=n;return r.length===1&&(r=iT[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:nu,mathmlBuilder:Rc});var ab=(e,t)=>{var n,r,i=!1,s;e.type==="supsub"?(n=e.sup,r=e.sub,s=St(e.base,"operatorname"),i=!0):s=St(e,"operatorname");var o;if(s.body.length>0){for(var d=s.body.map(p=>{var g="text"in p?p.text:void 0;return typeof g=="string"?{type:"textord",mode:p.mode,text:g}:p}),f=lr(d,t.withFont("mathrm"),!0),m=0;m<f.length;m++){var y=f[m];y instanceof fa&&(y.text=y.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}o=Me(["mop"],f,t)}else o=Me(["mop"],[],t);return i?nb(o,n,r,t,t.style,0,0):o},lT=(e,t)=>{for(var n=pa(e.body,t.withFont("mathrm")),r=!0,i=0;i<n.length;i++){var s=n[i];if(!(s instanceof A7))if(s instanceof ze)switch(s.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":{var o=s.children[0];s.children.length===1&&o instanceof Kn?o.text=o.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):r=!1;break}default:r=!1}else r=!1}if(r){var d=n.map(y=>y.toText()).join("");n=[new Kn(d)]}var f=new ze("mi",n);f.setAttribute("mathvariant","normal");var m=new ze("mo",[Ta("","text")]);return e.parentIsSupSub?new ze("mrow",[f,m]):_7([f,m])};Ie({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"operatorname",mode:n.mode,body:Xn(i),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:ab,mathmlBuilder:lT});U("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Us({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?il(lr(e.body,t,!1)):Me(["mord"],lr(e.body,t,!0),t)},mathmlBuilder(e,t){return ts(e.body,t,!0)}});Ie({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(e,t){var n=Gt(e.body,t.havingCrampedStyle()),r=qo("overline-line",t),i=t.fontMetrics().defaultRuleThickness,s=Vt({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r},{type:"kern",size:i}]});return Me(["mord","overline"],[s],t)},mathmlBuilder(e,t){var n=new ze("mo",[new Kn("‾")]);n.setAttribute("stretchy","true");var r=new ze("mover",[on(e.body,t),n]);return r.setAttribute("accent","true"),r}});Ie({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"phantom",mode:n.mode,body:Xn(r)}},htmlBuilder:(e,t)=>{var n=lr(e.body,t.withPhantom(),!1);return il(n)},mathmlBuilder:(e,t)=>{var n=pa(e.body,t);return new ze("mphantom",n)}});U("\\hphantom","\\smash{\\phantom{#1}}");Ie({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=Me(["inner"],[Gt(e.body,t.withPhantom())]),r=Me(["fix"],[]);return Me(["mord","rlap"],[n,r],t)},mathmlBuilder:(e,t)=>{var n=pa(Xn(e.body),t),r=new ze("mphantom",n),i=new ze("mpadded",[r]);return i.setAttribute("width","0px"),i}});Ie({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e,r=St(t[0],"size").value,i=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=Gt(e.body,t),r=Mn(e.dy,t);return Vt({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new ze("mpadded",[on(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}});Ie({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}});Ie({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,n){var{parser:r}=e,i=n[0],s=St(t[0],"size"),o=St(t[1],"size");return{type:"rule",mode:r.mode,shift:i&&St(i,"size").value,width:s.value,height:o.value}},htmlBuilder(e,t){var n=Me(["mord","rule"],[],t),r=Mn(e.width,t),i=Mn(e.height,t),s=e.shift?Mn(e.shift,t):0;return n.style.borderRightWidth=Re(r),n.style.borderTopWidth=Re(i),n.style.bottom=Re(s),n.width=r,n.height=i+s,n.depth=-s,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=Mn(e.width,t),r=Mn(e.height,t),i=e.shift?Mn(e.shift,t):0,s=t.color&&t.getColor()||"black",o=new ze("mspace");o.setAttribute("mathbackground",s),o.setAttribute("width",Re(n)),o.setAttribute("height",Re(r));var d=new ze("mpadded",[o]);return i>=0?d.setAttribute("height",Re(i)):(d.setAttribute("height",Re(i)),d.setAttribute("depth",Re(-i))),d.setAttribute("voffset",Re(i)),d}});function ib(e,t,n){for(var r=lr(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,s=0;s<r.length;s++){var o=r[s].classes.indexOf("sizing");o<0?Array.prototype.push.apply(r[s].classes,t.sizingClasses(n)):r[s].classes[o+1]==="reset-size"+t.size&&(r[s].classes[o+1]="reset-size"+n.size),r[s].height*=i,r[s].depth*=i}return il(r)}var rx=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],sT=(e,t)=>{var n=t.havingSize(e.size);return ib(e.body,n,t)};Ie({type:"sizing",names:rx,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:i}=e,s=i.parseExpression(!1,n);return{type:"sizing",mode:i.mode,size:rx.indexOf(r)+1,body:s}},htmlBuilder:sT,mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=pa(e.body,n),i=new ze("mstyle",r);return i.setAttribute("mathsize",Re(n.sizeMultiplier)),i}});Ie({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,i=!1,s=!1,o=n[0]&&St(n[0],"ordgroup");if(o)for(var d="",f=0;f<o.body.length;++f){var m=o.body[f];if(d=vf(m).text,d==="t")i=!0;else if(d==="b")s=!0;else{i=!1,s=!1;break}}else i=!0,s=!0;var y=t[0];return{type:"smash",mode:r.mode,body:y,smashHeight:i,smashDepth:s}},htmlBuilder:(e,t)=>{var n=Me([],[Gt(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 r=0;r<n.children.length;r++)e.smashHeight&&(n.children[r].height=0),e.smashDepth&&(n.children[r].depth=0);var i=Vt({positionType:"firstBaseline",children:[{type:"elem",elem:n}]});return Me(["mord"],[i],t)},mathmlBuilder:(e,t)=>{var n=new ze("mpadded",[on(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}});Ie({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,i=n[0],s=t[0];return{type:"sqrt",mode:r.mode,body:s,index:i}},htmlBuilder(e,t){var n=Gt(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=Uo(n,t);var r=t.fontMetrics(),i=r.defaultRuleThickness,s=i;t.style.id<pt.TEXT.id&&(s=t.fontMetrics().xHeight);var o=i+s/4,d=n.height+n.depth+o+i,{span:f,ruleWidth:m,advanceWidth:y}=YA(d,t),p=f.height-m;p>n.height+n.depth+o&&(o=(o+p-n.height-n.depth)/2);var g=f.height-n.height-o-m;n.style.paddingLeft=Re(y);var x=Vt({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+g)},{type:"elem",elem:f},{type:"kern",size:m}]});if(e.index){var w=t.havingStyle(pt.SCRIPTSCRIPT),k=Gt(e.index,w,t),j=.6*(x.height-x.depth),N=Vt({positionType:"shift",positionData:-j,children:[{type:"elem",elem:k}]}),_=Me(["root"],[N]);return Me(["mord","sqrt"],[_,x],t)}else return Me(["mord","sqrt"],[x],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new ze("mroot",[on(n,t),on(r,t)]):new ze("msqrt",[on(n,t)])}});var ax={display:pt.DISPLAY,text:pt.TEXT,script:pt.SCRIPT,scriptscript:pt.SCRIPTSCRIPT};Ie({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:i}=e,s=i.parseExpression(!0,n),o=r.slice(1,r.length-5);return{type:"styling",mode:i.mode,style:o,body:s}},htmlBuilder(e,t){var n=ax[e.style],r=t.havingStyle(n).withFont("");return ib(e.body,r,t)},mathmlBuilder(e,t){var n=ax[e.style],r=t.havingStyle(n),i=pa(e.body,r),s=new ze("mstyle",i),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},d=o[e.style];return s.setAttribute("scriptlevel",d[0]),s.setAttribute("displaystyle",d[1]),s}});var oT=function(t,n){var r=t.base;if(r)if(r.type==="op"){var i=r.limits&&(n.style.size===pt.DISPLAY.size||r.alwaysHandleSupSub);return i?nu:null}else if(r.type==="operatorname"){var s=r.alwaysHandleSupSub&&(n.style.size===pt.DISPLAY.size||r.limits);return s?ab:null}else{if(r.type==="accent")return rl(r.base)?vg:null;if(r.type==="horizBrace"){var o=!t.sub;return o===r.isOver?tb:null}else return null}else return null};Us({type:"supsub",htmlBuilder(e,t){var n=oT(e,t);if(n)return n(e,t);var{base:r,sup:i,sub:s}=e,o=Gt(r,t),d,f,m=t.fontMetrics(),y=0,p=0,g=r&&rl(r);if(i){var x=t.havingStyle(t.style.sup());d=Gt(i,x,t),g||(y=o.height-x.fontMetrics().supDrop*x.sizeMultiplier/t.sizeMultiplier)}if(s){var w=t.havingStyle(t.style.sub());f=Gt(s,w,t),g||(p=o.depth+w.fontMetrics().subDrop*w.sizeMultiplier/t.sizeMultiplier)}var k;t.style===pt.DISPLAY?k=m.sup1:t.style.cramped?k=m.sup3:k=m.sup2;var j=t.sizeMultiplier,N=Re(.5/m.ptPerEm/j),_=null;if(f){var E=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");(o instanceof fa||E)&&(_=Re(-o.italic))}var L;if(d&&f){y=Math.max(y,k,d.depth+.25*m.xHeight),p=Math.max(p,m.sub2);var D=m.defaultRuleThickness,T=4*D;if(y-d.depth-(f.height-p)<T){p=T-(y-d.depth)+f.height;var O=.8*m.xHeight-(y-d.depth);O>0&&(y+=O,p-=O)}var Z=[{type:"elem",elem:f,shift:p,marginRight:N,marginLeft:_},{type:"elem",elem:d,shift:-y,marginRight:N}];L=Vt({positionType:"individualShift",children:Z})}else if(f){p=Math.max(p,m.sub1,f.height-.8*m.xHeight);var V=[{type:"elem",elem:f,marginLeft:_,marginRight:N}];L=Vt({positionType:"shift",positionData:p,children:V})}else if(d)y=Math.max(y,k,d.depth+.25*m.xHeight),L=Vt({positionType:"shift",positionData:-y,children:[{type:"elem",elem:d,marginRight:N}]});else throw new Error("supsub must have either sup or sub.");var P=hp(o,"right")||"mord";return Me([P],[o,Me(["msupsub"],[L])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type==="horizBrace"&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var s=[on(e.base,t)];e.sub&&s.push(on(e.sub,t)),e.sup&&s.push(on(e.sup,t));var o;if(n)o=r?"mover":"munder";else if(e.sub)if(e.sup){var m=e.base;m&&m.type==="op"&&m.limits&&t.style===pt.DISPLAY||m&&m.type==="operatorname"&&m.alwaysHandleSupSub&&(t.style===pt.DISPLAY||m.limits)?o="munderover":o="msubsup"}else{var f=e.base;f&&f.type==="op"&&f.limits&&(t.style===pt.DISPLAY||f.alwaysHandleSupSub)||f&&f.type==="operatorname"&&f.alwaysHandleSupSub&&(f.limits||t.style===pt.DISPLAY)?o="munder":o="msub"}else{var d=e.base;d&&d.type==="op"&&d.limits&&(t.style===pt.DISPLAY||d.alwaysHandleSupSub)||d&&d.type==="operatorname"&&d.alwaysHandleSupSub&&(d.limits||t.style===pt.DISPLAY)?o="mover":o="msup"}return new ze(o,s)}});Us({type:"atom",htmlBuilder(e,t){return mg(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var n=new ze("mo",[Ta(e.text,e.mode)]);if(e.family==="bin"){var r=yg(e,t);r==="bold-italic"&&n.setAttribute("mathvariant",r)}else e.family==="punct"?n.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&n.setAttribute("stretchy","false");return n}});var lb={mi:"italic",mn:"normal",mtext:"normal"};Us({type:"mathord",htmlBuilder(e,t){return pf(e,t,"mathord")},mathmlBuilder(e,t){var n=new ze("mi",[Ta(e.text,e.mode,t)]),r=yg(e,t)||"italic";return r!==lb[n.type]&&n.setAttribute("mathvariant",r),n}});Us({type:"textord",htmlBuilder(e,t){return pf(e,t,"textord")},mathmlBuilder(e,t){var n=Ta(e.text,e.mode,t),r=yg(e,t)||"normal",i;return e.mode==="text"?i=new ze("mtext",[n]):/[0-9]/.test(e.text)?i=new ze("mn",[n]):e.text==="\\prime"?i=new ze("mo",[n]):i=new ze("mi",[n]),r!==lb[i.type]&&i.setAttribute("mathvariant",r),i}});var v1={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},x1={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Us({type:"spacing",htmlBuilder(e,t){if(x1.hasOwnProperty(e.text)){var n=x1[e.text].className||"";if(e.mode==="text"){var r=pf(e,t,"textord");return r.classes.push(n),r}else return Me(["mspace",n],[mg(e.text,e.mode,t)],t)}else{if(v1.hasOwnProperty(e.text))return Me(["mspace",v1[e.text]],[],t);throw new Te('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var n;if(x1.hasOwnProperty(e.text))n=new ze("mtext",[new Kn(" ")]);else{if(v1.hasOwnProperty(e.text))return new ze("mspace");throw new Te('Unknown type of space "'+e.text+'"')}return n}});var ix=()=>{var e=new ze("mtd",[]);return e.setAttribute("width","50%"),e};Us({type:"tag",mathmlBuilder(e,t){var n=new ze("mtable",[new ze("mtr",[ix(),new ze("mtd",[ts(e.body,t)]),ix(),new ze("mtd",[ts(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var lx={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},sx={"\\textbf":"textbf","\\textmd":"textmd"},uT={"\\textit":"textit","\\textup":"textup"},ox=(e,t)=>{var n=e.font;if(n){if(lx[n])return t.withTextFontFamily(lx[n]);if(sx[n])return t.withTextFontWeight(sx[n]);if(n==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(uT[n])};Ie({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:r}=e,i=t[0];return{type:"text",mode:n.mode,body:Xn(i),font:r}},htmlBuilder(e,t){var n=ox(e,t),r=lr(e.body,n,!0);return Me(["mord","text"],r,n)},mathmlBuilder(e,t){var n=ox(e,t);return ts(e.body,n)}});Ie({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=Gt(e.body,t),r=qo("underline-line",t),i=t.fontMetrics().defaultRuleThickness,s=Vt({positionType:"top",positionData:n.height,children:[{type:"kern",size:i},{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n}]});return Me(["mord","underline"],[s],t)},mathmlBuilder(e,t){var n=new ze("mo",[new Kn("‾")]);n.setAttribute("stretchy","true");var r=new ze("munder",[on(e.body,t),n]);return r.setAttribute("accentunder","true"),r}});Ie({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=Gt(e.body,t),r=t.fontMetrics().axisHeight,i=.5*(n.height-r-(n.depth+r));return Vt({positionType:"shift",positionData:i,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new ze("mpadded",[on(e.body,t)],["vcenter"]);return new ze("mrow",[n])}});Ie({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new Te("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=ux(e),r=[],i=t.havingStyle(t.style.text()),s=0;s<n.length;s++){var o=n[s];o==="~"&&(o="\\textasciitilde"),r.push(Ar(o,"Typewriter-Regular",e.mode,i,["mord","texttt"]))}return Me(["mord","text"].concat(i.sizingClasses(t)),k7(r),i)},mathmlBuilder(e,t){var n=new Kn(ux(e)),r=new ze("mtext",[n]);return r.setAttribute("mathvariant","monospace"),r}});var ux=e=>e.body.replace(/ /g,e.star?"␣":" "),Xl=E7,sb=`[ \r
|
|
334
|
+
]`,cT="\\\\[a-zA-Z@]+",dT="\\\\[^\uD800-\uDFFF]",fT="("+cT+")"+sb+"*",hT=`\\\\(
|
|
335
|
+
|[ \r ]+
|
|
336
|
+
?)[ \r ]*`,vp="[̀-ͯ]",mT=new RegExp(vp+"+$"),pT="("+sb+"+)|"+(hT+"|")+"([!-\\[\\]-‧-豈-]"+(vp+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(vp+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+fT)+("|"+dT+")");class cx{constructor(t,n){this.input=t,this.settings=n,this.tokenRegex=new RegExp(pT,"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 da("EOF",new Gr(this,n,n));var r=this.tokenRegex.exec(t);if(r===null||r.index!==n)throw new Te("Unexpected character: '"+t[n]+"'",new da(t[n],new Gr(this,n,n+1)));var i=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[i]===14){var s=t.indexOf(`
|
|
337
|
+
`,this.tokenRegex.lastIndex);return s===-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=s+1,this.lex()}return new da(i,new Gr(this,n,this.tokenRegex.lastIndex))}}class gT{constructor(t,n){t===void 0&&(t={}),n===void 0&&(n={}),this.current=n,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new Te("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,r){if(r===void 0&&(r=!1),r){for(var i=0;i<this.undefStack.length;i++)delete this.undefStack[i][t];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][t]=n)}else{var s=this.undefStack[this.undefStack.length-1];s&&!s.hasOwnProperty(t)&&(s[t]=this.current[t])}n==null?delete this.current[t]:this.current[t]=n}}var yT=Z7;U("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});U("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});U("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});U("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});U("\\@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}});U("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");U("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var dx={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};U("\\char",function(e){var t=e.popToken(),n,r=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]==="\\")r=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new Te("\\char` missing argument");r=t.text.charCodeAt(0)}else n=10;if(n){if(r=dx[t.text],r==null||r>=n)throw new Te("Invalid base-"+n+" digit "+t.text);for(var i;(i=dx[e.future().text])!=null&&i<n;)r*=n,r+=i,e.popToken()}return"\\@char{"+r+"}"});var Sg=(e,t,n,r)=>{var i=e.consumeArg().tokens;if(i.length!==1)throw new Te("\\newcommand's first argument must be a macro name");var s=i[0].text,o=e.isDefined(s);if(o&&!t)throw new Te("\\newcommand{"+s+"} attempting to redefine "+(s+"; use \\renewcommand"));if(!o&&!n)throw new Te("\\renewcommand{"+s+"} when command "+s+" does not yet exist; use \\newcommand");var d=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text==="["){for(var f="",m=e.expandNextToken();m.text!=="]"&&m.text!=="EOF";)f+=m.text,m=e.expandNextToken();if(!f.match(/^\s*[0-9]+\s*$/))throw new Te("Invalid number of arguments: "+f);d=parseInt(f),i=e.consumeArg().tokens}return o&&r||e.macros.set(s,{tokens:i,numArgs:d}),""};U("\\newcommand",e=>Sg(e,!1,!0,!1));U("\\renewcommand",e=>Sg(e,!0,!1,!1));U("\\providecommand",e=>Sg(e,!0,!0,!0));U("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(n=>n.text).join("")),""});U("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(n=>n.text).join("")),""});U("\\show",e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),Xl[n],xn.math[n],xn.text[n]),""});U("\\bgroup","{");U("\\egroup","}");U("~","\\nobreakspace");U("\\lq","`");U("\\rq","'");U("\\aa","\\r a");U("\\AA","\\r A");U("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");U("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");U("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");U("ℬ","\\mathscr{B}");U("ℰ","\\mathscr{E}");U("ℱ","\\mathscr{F}");U("ℋ","\\mathscr{H}");U("ℐ","\\mathscr{I}");U("ℒ","\\mathscr{L}");U("ℳ","\\mathscr{M}");U("ℛ","\\mathscr{R}");U("ℭ","\\mathfrak{C}");U("ℌ","\\mathfrak{H}");U("ℨ","\\mathfrak{Z}");U("\\Bbbk","\\Bbb{k}");U("\\llap","\\mathllap{\\textrm{#1}}");U("\\rlap","\\mathrlap{\\textrm{#1}}");U("\\clap","\\mathclap{\\textrm{#1}}");U("\\mathstrut","\\vphantom{(}");U("\\underbar","\\underline{\\text{#1}}");U("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');U("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");U("\\ne","\\neq");U("≠","\\neq");U("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");U("∉","\\notin");U("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");U("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");U("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");U("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");U("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");U("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");U("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");U("⟂","\\perp");U("‼","\\mathclose{!\\mkern-0.8mu!}");U("∌","\\notni");U("⌜","\\ulcorner");U("⌝","\\urcorner");U("⌞","\\llcorner");U("⌟","\\lrcorner");U("©","\\copyright");U("®","\\textregistered");U("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');U("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');U("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');U("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');U("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");U("⋮","\\vdots");U("\\varGamma","\\mathit{\\Gamma}");U("\\varDelta","\\mathit{\\Delta}");U("\\varTheta","\\mathit{\\Theta}");U("\\varLambda","\\mathit{\\Lambda}");U("\\varXi","\\mathit{\\Xi}");U("\\varPi","\\mathit{\\Pi}");U("\\varSigma","\\mathit{\\Sigma}");U("\\varUpsilon","\\mathit{\\Upsilon}");U("\\varPhi","\\mathit{\\Phi}");U("\\varPsi","\\mathit{\\Psi}");U("\\varOmega","\\mathit{\\Omega}");U("\\substack","\\begin{subarray}{c}#1\\end{subarray}");U("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");U("\\boxed","\\fbox{$\\displaystyle{#1}$}");U("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");U("\\implies","\\DOTSB\\;\\Longrightarrow\\;");U("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");U("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");U("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var fx={",":"\\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"},vT=new Set(["bin","rel"]);U("\\dots",function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in fx?t=fx[n]:(n.slice(0,4)==="\\not"||n in xn.math&&vT.has(xn.math[n].group))&&(t="\\dotsb"),t});var kg={")":!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};U("\\dotso",function(e){var t=e.future().text;return t in kg?"\\ldots\\,":"\\ldots"});U("\\dotsc",function(e){var t=e.future().text;return t in kg&&t!==","?"\\ldots\\,":"\\ldots"});U("\\cdots",function(e){var t=e.future().text;return t in kg?"\\@cdots\\,":"\\@cdots"});U("\\dotsb","\\cdots");U("\\dotsm","\\cdots");U("\\dotsi","\\!\\cdots");U("\\dotsx","\\ldots\\,");U("\\DOTSI","\\relax");U("\\DOTSB","\\relax");U("\\DOTSX","\\relax");U("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");U("\\,","\\tmspace+{3mu}{.1667em}");U("\\thinspace","\\,");U("\\>","\\mskip{4mu}");U("\\:","\\tmspace+{4mu}{.2222em}");U("\\medspace","\\:");U("\\;","\\tmspace+{5mu}{.2777em}");U("\\thickspace","\\;");U("\\!","\\tmspace-{3mu}{.1667em}");U("\\negthinspace","\\!");U("\\negmedspace","\\tmspace-{4mu}{.2222em}");U("\\negthickspace","\\tmspace-{5mu}{.277em}");U("\\enspace","\\kern.5em ");U("\\enskip","\\hskip.5em\\relax");U("\\quad","\\hskip1em\\relax");U("\\qquad","\\hskip2em\\relax");U("\\tag","\\@ifstar\\tag@literal\\tag@paren");U("\\tag@paren","\\tag@literal{({#1})}");U("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new Te("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});U("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");U("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");U("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");U("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");U("\\newline","\\\\\\relax");U("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var ob=Re(gi["Main-Regular"][84][1]-.7*gi["Main-Regular"][65][1]);U("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+ob+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");U("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+ob+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");U("\\hspace","\\@ifstar\\@hspacer\\@hspace");U("\\@hspace","\\hskip #1\\relax");U("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");U("\\ordinarycolon",":");U("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");U("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');U("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');U("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');U("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');U("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');U("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');U("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');U("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');U("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');U("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');U("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');U("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');U("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');U("∷","\\dblcolon");U("∹","\\eqcolon");U("≔","\\coloneqq");U("≕","\\eqqcolon");U("⩴","\\Coloneqq");U("\\ratio","\\vcentcolon");U("\\coloncolon","\\dblcolon");U("\\colonequals","\\coloneqq");U("\\coloncolonequals","\\Coloneqq");U("\\equalscolon","\\eqqcolon");U("\\equalscoloncolon","\\Eqqcolon");U("\\colonminus","\\coloneq");U("\\coloncolonminus","\\Coloneq");U("\\minuscolon","\\eqcolon");U("\\minuscoloncolon","\\Eqcolon");U("\\coloncolonapprox","\\Colonapprox");U("\\coloncolonsim","\\Colonsim");U("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");U("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");U("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");U("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");U("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");U("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");U("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");U("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");U("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");U("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");U("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");U("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");U("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");U("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");U("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");U("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");U("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");U("\\nleqq","\\html@mathml{\\@nleqq}{≰}");U("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");U("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");U("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");U("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");U("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");U("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");U("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");U("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");U("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");U("\\imath","\\html@mathml{\\@imath}{ı}");U("\\jmath","\\html@mathml{\\@jmath}{ȷ}");U("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");U("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");U("⟦","\\llbracket");U("⟧","\\rrbracket");U("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");U("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");U("⦃","\\lBrace");U("⦄","\\rBrace");U("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");U("⦵","\\minuso");U("\\darr","\\downarrow");U("\\dArr","\\Downarrow");U("\\Darr","\\Downarrow");U("\\lang","\\langle");U("\\rang","\\rangle");U("\\uarr","\\uparrow");U("\\uArr","\\Uparrow");U("\\Uarr","\\Uparrow");U("\\N","\\mathbb{N}");U("\\R","\\mathbb{R}");U("\\Z","\\mathbb{Z}");U("\\alef","\\aleph");U("\\alefsym","\\aleph");U("\\Alpha","\\mathrm{A}");U("\\Beta","\\mathrm{B}");U("\\bull","\\bullet");U("\\Chi","\\mathrm{X}");U("\\clubs","\\clubsuit");U("\\cnums","\\mathbb{C}");U("\\Complex","\\mathbb{C}");U("\\Dagger","\\ddagger");U("\\diamonds","\\diamondsuit");U("\\empty","\\emptyset");U("\\Epsilon","\\mathrm{E}");U("\\Eta","\\mathrm{H}");U("\\exist","\\exists");U("\\harr","\\leftrightarrow");U("\\hArr","\\Leftrightarrow");U("\\Harr","\\Leftrightarrow");U("\\hearts","\\heartsuit");U("\\image","\\Im");U("\\infin","\\infty");U("\\Iota","\\mathrm{I}");U("\\isin","\\in");U("\\Kappa","\\mathrm{K}");U("\\larr","\\leftarrow");U("\\lArr","\\Leftarrow");U("\\Larr","\\Leftarrow");U("\\lrarr","\\leftrightarrow");U("\\lrArr","\\Leftrightarrow");U("\\Lrarr","\\Leftrightarrow");U("\\Mu","\\mathrm{M}");U("\\natnums","\\mathbb{N}");U("\\Nu","\\mathrm{N}");U("\\Omicron","\\mathrm{O}");U("\\plusmn","\\pm");U("\\rarr","\\rightarrow");U("\\rArr","\\Rightarrow");U("\\Rarr","\\Rightarrow");U("\\real","\\Re");U("\\reals","\\mathbb{R}");U("\\Reals","\\mathbb{R}");U("\\Rho","\\mathrm{P}");U("\\sdot","\\cdot");U("\\sect","\\S");U("\\spades","\\spadesuit");U("\\sub","\\subset");U("\\sube","\\subseteq");U("\\supe","\\supseteq");U("\\Tau","\\mathrm{T}");U("\\thetasym","\\vartheta");U("\\weierp","\\wp");U("\\Zeta","\\mathrm{Z}");U("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");U("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");U("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");U("\\bra","\\mathinner{\\langle{#1}|}");U("\\ket","\\mathinner{|{#1}\\rangle}");U("\\braket","\\mathinner{\\langle{#1}\\rangle}");U("\\Bra","\\left\\langle#1\\right|");U("\\Ket","\\left|#1\\right\\rangle");var ub=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,s=t.consumeArg().tokens,o=t.macros.get("|"),d=t.macros.get("\\|");t.macros.beginGroup();var f=p=>g=>{e&&(g.macros.set("|",o),i.length&&g.macros.set("\\|",d));var x=p;if(!p&&i.length){var w=g.future();w.text==="|"&&(g.popToken(),x=!0)}return{tokens:x?i:r,numArgs:0}};t.macros.set("|",f(!1)),i.length&&t.macros.set("\\|",f(!0));var m=t.consumeArg().tokens,y=t.expandTokens([...s,...m,...n]);return t.macros.endGroup(),{tokens:y.reverse(),numArgs:0}};U("\\bra@ket",ub(!1));U("\\bra@set",ub(!0));U("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");U("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");U("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");U("\\angln","{\\angl n}");U("\\blue","\\textcolor{##6495ed}{#1}");U("\\orange","\\textcolor{##ffa500}{#1}");U("\\pink","\\textcolor{##ff00af}{#1}");U("\\red","\\textcolor{##df0030}{#1}");U("\\green","\\textcolor{##28ae7b}{#1}");U("\\gray","\\textcolor{gray}{#1}");U("\\purple","\\textcolor{##9d38bd}{#1}");U("\\blueA","\\textcolor{##ccfaff}{#1}");U("\\blueB","\\textcolor{##80f6ff}{#1}");U("\\blueC","\\textcolor{##63d9ea}{#1}");U("\\blueD","\\textcolor{##11accd}{#1}");U("\\blueE","\\textcolor{##0c7f99}{#1}");U("\\tealA","\\textcolor{##94fff5}{#1}");U("\\tealB","\\textcolor{##26edd5}{#1}");U("\\tealC","\\textcolor{##01d1c1}{#1}");U("\\tealD","\\textcolor{##01a995}{#1}");U("\\tealE","\\textcolor{##208170}{#1}");U("\\greenA","\\textcolor{##b6ffb0}{#1}");U("\\greenB","\\textcolor{##8af281}{#1}");U("\\greenC","\\textcolor{##74cf70}{#1}");U("\\greenD","\\textcolor{##1fab54}{#1}");U("\\greenE","\\textcolor{##0d923f}{#1}");U("\\goldA","\\textcolor{##ffd0a9}{#1}");U("\\goldB","\\textcolor{##ffbb71}{#1}");U("\\goldC","\\textcolor{##ff9c39}{#1}");U("\\goldD","\\textcolor{##e07d10}{#1}");U("\\goldE","\\textcolor{##a75a05}{#1}");U("\\redA","\\textcolor{##fca9a9}{#1}");U("\\redB","\\textcolor{##ff8482}{#1}");U("\\redC","\\textcolor{##f9685d}{#1}");U("\\redD","\\textcolor{##e84d39}{#1}");U("\\redE","\\textcolor{##bc2612}{#1}");U("\\maroonA","\\textcolor{##ffbde0}{#1}");U("\\maroonB","\\textcolor{##ff92c6}{#1}");U("\\maroonC","\\textcolor{##ed5fa6}{#1}");U("\\maroonD","\\textcolor{##ca337c}{#1}");U("\\maroonE","\\textcolor{##9e034e}{#1}");U("\\purpleA","\\textcolor{##ddd7ff}{#1}");U("\\purpleB","\\textcolor{##c6b9fc}{#1}");U("\\purpleC","\\textcolor{##aa87ff}{#1}");U("\\purpleD","\\textcolor{##7854ab}{#1}");U("\\purpleE","\\textcolor{##543b78}{#1}");U("\\mintA","\\textcolor{##f5f9e8}{#1}");U("\\mintB","\\textcolor{##edf2df}{#1}");U("\\mintC","\\textcolor{##e0e5cc}{#1}");U("\\grayA","\\textcolor{##f6f7f7}{#1}");U("\\grayB","\\textcolor{##f0f1f2}{#1}");U("\\grayC","\\textcolor{##e3e5e6}{#1}");U("\\grayD","\\textcolor{##d6d8da}{#1}");U("\\grayE","\\textcolor{##babec2}{#1}");U("\\grayF","\\textcolor{##888d93}{#1}");U("\\grayG","\\textcolor{##626569}{#1}");U("\\grayH","\\textcolor{##3b3e40}{#1}");U("\\grayI","\\textcolor{##21242c}{#1}");U("\\kaBlue","\\textcolor{##314453}{#1}");U("\\kaGreen","\\textcolor{##71B307}{#1}");var cb={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class xT{constructor(t,n,r){this.settings=n,this.expansionCount=0,this.feed(t),this.macros=new gT(yT,n.macros),this.mode=r,this.stack=[]}feed(t){this.lexer=new cx(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,r,i;if(t){if(this.consumeSpaces(),this.future().text!=="[")return null;n=this.popToken(),{tokens:i,end:r}=this.consumeArg(["]"])}else({tokens:i,start:n,end:r}=this.consumeArg());return this.pushToken(new da("EOF",r.loc)),this.pushTokens(i),new da("",Gr.range(n,r))}consumeSpaces(){for(;;){var t=this.future();if(t.text===" ")this.stack.pop();else break}}consumeArg(t){var n=[],r=t&&t.length>0;r||this.consumeSpaces();var i=this.future(),s,o=0,d=0;do{if(s=this.popToken(),n.push(s),s.text==="{")++o;else if(s.text==="}"){if(--o,o===-1)throw new Te("Extra }",s)}else if(s.text==="EOF")throw new Te("Unexpected end of input in a macro argument, expected '"+(t&&r?t[d]:"}")+"'",s);if(t&&r)if((o===0||o===1&&t[d]==="{")&&s.text===t[d]){if(++d,d===t.length){n.splice(-d,d);break}}else d=0}while(o!==0||r);return i.text==="{"&&n[n.length-1].text==="}"&&(n.pop(),n.shift()),n.reverse(),{tokens:n,start:i,end:s}}consumeArgs(t,n){if(n){if(n.length!==t+1)throw new Te("The length of delimiters doesn't match the number of args!");for(var r=n[0],i=0;i<r.length;i++){var s=this.popToken();if(r[i]!==s.text)throw new Te("Use of the macro doesn't match its definition",s)}}for(var o=[],d=0;d<t;d++)o.push(this.consumeArg(n&&n[d+1]).tokens);return o}countExpansion(t){if(this.expansionCount+=t,this.expansionCount>this.settings.maxExpand)throw new Te("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var n=this.popToken(),r=n.text,i=n.noexpand?null:this._getExpansion(r);if(i==null||t&&i.unexpandable){if(t&&i==null&&r[0]==="\\"&&!this.isDefined(r))throw new Te("Undefined control sequence: "+r);return this.pushToken(n),!1}this.countExpansion(1);var s=i.tokens,o=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){s=s.slice();for(var d=s.length-1;d>=0;--d){var f=s[d];if(f.text==="#"){if(d===0)throw new Te("Incomplete placeholder at end of macro body",f);if(f=s[--d],f.text==="#")s.splice(d+1,1);else if(/^[1-9]$/.test(f.text))s.splice(d,2,...o[+f.text-1]);else throw new Te("Not a valid argument number",f)}}}return this.pushTokens(s),s.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 da(t)]):void 0}expandTokens(t){var n=[],r=this.stack.length;for(this.pushTokens(t);this.stack.length>r;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),n.push(i)}return this.countExpansion(n.length),n}expandMacroAsText(t){var n=this.expandMacro(t);return n&&n.map(r=>r.text).join("")}_getExpansion(t){var n=this.macros.get(t);if(n==null)return n;if(t.length===1){var r=this.lexer.catcodes[t];if(r!=null&&r!==13)return}var i=typeof n=="function"?n(this):n;if(typeof i=="string"){var s=0;if(i.includes("#"))for(var o=i.replace(/##/g,"");o.includes("#"+(s+1));)++s;for(var d=new cx(i,this.settings),f=[],m=d.lex();m.text!=="EOF";)f.push(m),m=d.lex();f.reverse();var y={tokens:f,numArgs:s};return y}return i}isDefined(t){return this.macros.has(t)||Xl.hasOwnProperty(t)||xn.math.hasOwnProperty(t)||xn.text.hasOwnProperty(t)||cb.hasOwnProperty(t)}isExpandable(t){var n=this.macros.get(t);return n!=null?typeof n=="string"||typeof n=="function"||!n.unexpandable:Xl.hasOwnProperty(t)&&!Xl[t].primitive}}var hx=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),b1={"́":{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"}},mx={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class jf{constructor(t,n){this.mode="math",this.gullet=new xT(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 Te("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 da("}")),this.gullet.pushTokens(t);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=n,r}parseExpression(t,n){for(var r=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(jf.endOfExpression.has(i.text)||n&&i.text===n||t&&Xl[i.text]&&Xl[i.text].infix)break;var s=this.parseAtom(n);if(s){if(s.type==="internal")continue}else break;r.push(s)}return this.mode==="text"&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(t){for(var n=-1,r,i=0;i<t.length;i++){var s=t[i];if(s.type==="infix"){if(n!==-1)throw new Te("only one infix operator per group",s.token);n=i,r=s.replaceWith}}if(n!==-1&&r){var o,d,f=t.slice(0,n),m=t.slice(n+1);f.length===1&&f[0].type==="ordgroup"?o=f[0]:o={type:"ordgroup",mode:this.mode,body:f},m.length===1&&m[0].type==="ordgroup"?d=m[0]:d={type:"ordgroup",mode:this.mode,body:m};var y;return r==="\\\\abovefrac"?y=this.callFunction(r,[o,t[n],d],[]):y=this.callFunction(r,[o,d],[]),[y]}else return t}handleSupSubscript(t){var n=this.fetch(),r=n.text;this.consume(),this.consumeSpaces();var i;do{var s;i=this.parseGroup(t)}while(((s=i)==null?void 0:s.type)==="internal");if(!i)throw new Te("Expected group after '"+r+"'",n);return i}formatUnsupportedCmd(t){for(var n=[],r=0;r<t.length;r++)n.push({type:"textord",mode:"text",text:t[r]});var i={type:"text",mode:this.mode,body:n},s={type:"color",mode:this.mode,color:this.settings.errorColor,body:[i]};return s}parseAtom(t){var n=this.parseGroup("atom",t);if((n==null?void 0:n.type)==="internal"||this.mode==="text")return n;for(var r,i;;){this.consumeSpaces();var s=this.fetch();if(s.text==="\\limits"||s.text==="\\nolimits"){if(n&&n.type==="op"){var o=s.text==="\\limits";n.limits=o,n.alwaysHandleSupSub=!0}else if(n&&n.type==="operatorname")n.alwaysHandleSupSub&&(n.limits=s.text==="\\limits");else throw new Te("Limit controls must follow a math operator",s);this.consume()}else if(s.text==="^"){if(r)throw new Te("Double superscript",s);r=this.handleSupSubscript("superscript")}else if(s.text==="_"){if(i)throw new Te("Double subscript",s);i=this.handleSupSubscript("subscript")}else if(s.text==="'"){if(r)throw new Te("Double superscript",s);var d={type:"textord",mode:this.mode,text:"\\prime"},f=[d];for(this.consume();this.fetch().text==="'";)f.push(d),this.consume();this.fetch().text==="^"&&f.push(this.handleSupSubscript("superscript")),r={type:"ordgroup",mode:this.mode,body:f}}else if(od[s.text]){var m=hx.test(s.text),y=[];for(y.push(new da(od[s.text])),this.consume();;){var p=this.fetch().text;if(!od[p]||hx.test(p)!==m)break;y.unshift(new da(od[p])),this.consume()}var g=this.subparse(y);m?i={type:"ordgroup",mode:"math",body:g}:r={type:"ordgroup",mode:"math",body:g}}else break}return r||i?{type:"supsub",mode:this.mode,base:n,sup:r,sub:i}:n}parseFunction(t,n){var r=this.fetch(),i=r.text,s=Xl[i];if(!s)return null;if(this.consume(),n&&n!=="atom"&&!s.allowedInArgument)throw new Te("Got function '"+i+"' with no arguments"+(n?" as "+n:""),r);if(this.mode==="text"&&!s.allowedInText)throw new Te("Can't use function '"+i+"' in text mode",r);if(this.mode==="math"&&s.allowedInMath===!1)throw new Te("Can't use function '"+i+"' in math mode",r);var{args:o,optArgs:d}=this.parseArguments(i,s);return this.callFunction(i,o,d,r,t)}callFunction(t,n,r,i,s){var o={funcName:t,parser:this,token:i,breakOnTokenText:s},d=Xl[t];if(d&&d.handler)return d.handler(o,n,r);throw new Te("No function handler for "+t)}parseArguments(t,n){var r=n.numArgs+n.numOptionalArgs;if(r===0)return{args:[],optArgs:[]};for(var i=[],s=[],o=0;o<r;o++){var d=n.argTypes&&n.argTypes[o],f=o<n.numOptionalArgs;("primitive"in n&&n.primitive&&d==null||n.type==="sqrt"&&o===1&&s[0]==null)&&(d="primitive");var m=this.parseGroupOfType("argument to '"+t+"'",d,f);if(f)s.push(m);else if(m!=null)i.push(m);else throw new Te("Null argument, please report this as a bug")}return{args:i,optArgs:s}}parseGroupOfType(t,n,r){switch(n){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,n);case"hbox":{var i=this.parseArgumentGroup(r,"text");return i!=null?{type:"styling",mode:i.mode,body:[i],style:"text"}:null}case"raw":{var s=this.parseStringGroup("raw",r);return s!=null?{type:"raw",mode:"text",string:s.text}:null}case"primitive":{if(r)throw new Te("A primitive argument cannot be optional");var o=this.parseGroup(t);if(o==null)throw new Te("Expected group as "+t,this.fetch());return o}case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new Te("Unknown group type as "+t,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(t,n){var r=this.gullet.scanArgument(n);if(r==null)return null;for(var i="",s;(s=this.fetch()).text!=="EOF";)i+=s.text,this.consume();return this.consume(),r.text=i,r}parseRegexGroup(t,n){for(var r=this.fetch(),i=r,s="",o;(o=this.fetch()).text!=="EOF"&&t.test(s+o.text);)i=o,s+=i.text,this.consume();if(s==="")throw new Te("Invalid "+n+": '"+r.text+"'",r);return r.range(i,s)}parseColorGroup(t){var n=this.parseStringGroup("color",t);if(n==null)return null;var r=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(n.text);if(!r)throw new Te("Invalid color: '"+n.text+"'",n);var i=r[0];return/^[0-9a-f]{6}$/i.test(i)&&(i="#"+i),{type:"color-token",mode:this.mode,color:i}}parseSizeGroup(t){var n,r=!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",r=!0);var i=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(n.text);if(!i)throw new Te("Invalid size: '"+n.text+"'",n);var s={number:+(i[1]+i[2]),unit:i[3]};if(!v7(s))throw new Te("Invalid unit: '"+s.unit+"'",n);return{type:"size",mode:this.mode,value:s,isBlank:r}}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 r=n.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:r}}parseArgumentGroup(t,n){var r=this.gullet.scanArgument(t);if(r==null)return null;var i=this.mode;n&&this.switchMode(n),this.gullet.beginGroup();var s=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var o={type:"ordgroup",mode:this.mode,loc:r.loc,body:s};return n&&this.switchMode(i),o}parseGroup(t,n){var r=this.fetch(),i=r.text,s;if(i==="{"||i==="\\begingroup"){this.consume();var o=i==="{"?"}":"\\endgroup";this.gullet.beginGroup();var d=this.parseExpression(!1,o),f=this.fetch();this.expect(o),this.gullet.endGroup(),s={type:"ordgroup",mode:this.mode,loc:Gr.range(r,f),body:d,semisimple:i==="\\begingroup"||void 0}}else if(s=this.parseFunction(n,t)||this.parseSymbol(),s==null&&i[0]==="\\"&&!cb.hasOwnProperty(i)){if(this.settings.throwOnError)throw new Te("Undefined control sequence: "+i,r);s=this.formatUnsupportedCmd(i),this.consume()}return s}formLigatures(t){for(var n=t.length-1,r=0;r<n;++r){var i=t[r];if(i.type==="textord"){var s=i.text,o=t[r+1];if(!(!o||o.type!=="textord")){if(s==="-"&&o.text==="-"){var d=t[r+2];r+1<n&&d&&d.type==="textord"&&d.text==="-"?(t.splice(r,3,{type:"textord",mode:"text",loc:Gr.range(i,d),text:"---"}),n-=2):(t.splice(r,2,{type:"textord",mode:"text",loc:Gr.range(i,o),text:"--"}),n-=1)}(s==="'"||s==="`")&&o.text===s&&(t.splice(r,2,{type:"textord",mode:"text",loc:Gr.range(i,o),text:s+s}),n-=1)}}}}parseSymbol(){var t=this.fetch(),n=t.text;if(/^\\verb[^a-zA-Z]/.test(n)){this.consume();var r=n.slice(5),i=r.charAt(0)==="*";if(i&&(r=r.slice(1)),r.length<2||r.charAt(0)!==r.slice(-1))throw new Te(`\\verb assertion failed --
|
|
338
|
+
please report what input caused this bug`);return r=r.slice(1,-1),{type:"verb",mode:"text",body:r,star:i}}mx.hasOwnProperty(n[0])&&!xn[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=mx[n[0]]+n.slice(1));var s=mT.exec(n);s&&(n=n.substring(0,s.index),n==="i"?n="ı":n==="j"&&(n="ȷ"));var o;if(xn[this.mode][n]){this.settings.strict&&this.mode==="math"&&up.includes(n)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+n[0]+'" used in math mode',t);var d=xn[this.mode][n].group,f=Gr.range(t),m;if(pA.hasOwnProperty(d)){var y=d;m={type:"atom",mode:this.mode,family:y,loc:f,text:n}}else m={type:d,mode:this.mode,loc:f,text:n};o=m}else if(n.charCodeAt(0)>=128)this.settings.strict&&(y7(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)),o={type:"textord",mode:"text",loc:Gr.range(t),text:n};else return null;if(this.consume(),s)for(var p=0;p<s[0].length;p++){var g=s[0][p];if(!b1[g])throw new Te("Unknown accent ' "+g+"'",t);var x=b1[g][this.mode]||b1[g].text;if(!x)throw new Te("Accent "+g+" unsupported in "+this.mode+" mode",t);o={type:"accent",mode:this.mode,loc:Gr.range(t),label:x,isStretchy:!1,isShifty:!0,base:o}}return o}}jf.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var Ng=function(t,n){if(!(typeof t=="string"||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var r=new jf(t,n);delete r.gullet.macros.current["\\df@tag"];var i=r.parse();if(delete r.gullet.macros.current["\\current@color"],delete r.gullet.macros.current["\\color"],r.gullet.macros.get("\\df@tag")){if(!n.displayMode)throw new Te("\\tag works only in display equations");i=[{type:"tag",mode:"text",body:i,tag:r.subparse([new da("\\df@tag")])}]}return i},db=function(t,n,r){n.textContent="";var i=jg(t,r).toNode();n.appendChild(i)};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."),db=function(){throw new Te("KaTeX doesn't work in quirks mode.")});var bT=function(t,n){var r=jg(t,n).toMarkup();return r},wT=function(t,n){var r=new dg(n);return Ng(t,r)},fb=function(t,n,r){if(r.throwOnError||!(t instanceof Te))throw t;var i=Me(["katex-error"],[new fa(n)]);return i.setAttribute("title",t.toString()),i.setAttribute("style","color:"+r.errorColor),i},jg=function(t,n){var r=new dg(n);try{var i=Ng(t,r);return TA(i,t,r)}catch(s){return fb(s,t,r)}},ST=function(t,n){var r=new dg(n);try{var i=Ng(t,r);return zA(i,t,r)}catch(s){return fb(s,t,r)}},kT="0.16.45",NT={Span:eu,Anchor:hf,SymbolNode:fa,SvgNode:tl,PathNode:Jl,LineNode:op},px={version:kT,render:db,renderToString:bT,ParseError:Te,SETTINGS_SCHEMA:ip,__parse:wT,__renderToDomTree:jg,__renderToHTMLTree:ST,__setFontMetrics:hA,__defineSymbol:S,__defineFunction:Ie,__defineMacro:U,__domTree:NT};const jT={},CT=[];function ET(e){const t=e||jT;return function(n,r){lg(n,"element",function(i,s){const o=Array.isArray(i.properties.className)?i.properties.className:CT,d=o.includes("language-math"),f=o.includes("math-display"),m=o.includes("math-inline");let y=f;if(!d&&!f&&!m)return;let p=s[s.length-1],g=i;if(i.tagName==="code"&&d&&p&&p.type==="element"&&p.tagName==="pre"&&(g=p,p=s[s.length-2],y=!0),!p)return;const x=A_(g,{whitespace:"pre"});let w;try{w=px.renderToString(x,{...t,displayMode:y,throwOnError:!0})}catch(j){const N=j,_=N.name.toLowerCase();r.message("Could not render math with KaTeX",{ancestors:[...s,i],cause:N,place:i.position,ruleId:_,source:"rehype-katex"});try{w=px.renderToString(x,{...t,displayMode:y,strict:"ignore",throwOnError:!1})}catch{w=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(t.errorColor||"#cc0000"),title:String(j)},children:[{type:"text",value:x}]}]}}typeof w=="string"&&(w=S_(w).children);const k=p.children.indexOf(g);return p.children.splice(k,1,...w),o7})}}function gx(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function MT(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function _T(e,t,n){const i=zc((n||{}).ignore||[]),s=AT(t);let o=-1;for(;++o<s.length;)lg(e,"text",d);function d(m,y){let p=-1,g;for(;++p<y.length;){const x=y[p],w=g?g.children:void 0;if(i(x,w?w.indexOf(x):void 0,g))return;g=x}if(g)return f(m,y)}function f(m,y){const p=y[y.length-1],g=s[o][0],x=s[o][1];let w=0;const j=p.children.indexOf(m);let N=!1,_=[];g.lastIndex=0;let E=g.exec(m.value);for(;E;){const L=E.index,D={index:E.index,input:E.input,stack:[...y,m]};let T=x(...E,D);if(typeof T=="string"&&(T=T.length>0?{type:"text",value:T}:void 0),T===!1?g.lastIndex=L+1:(w!==L&&_.push({type:"text",value:m.value.slice(w,L)}),Array.isArray(T)?_.push(...T):T&&_.push(T),w=L+E[0].length,N=!0),!g.global)break;E=g.exec(m.value)}return N?(w<m.value.length&&_.push({type:"text",value:m.value.slice(w)}),p.children.splice(j,1,..._)):_=[m],j+_.length}}function AT(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 r=-1;for(;++r<n.length;){const i=n[r];t.push([TT(i[0]),zT(i[1])])}return t}function TT(e){return typeof e=="string"?new RegExp(MT(e),"g"):e}function zT(e){return typeof e=="function"?e:function(){return e}}const w1="phrasing",S1=["autolink","link","image","label"];function DT(){return{transforms:[qT],enter:{literalAutolink:RT,literalAutolinkEmail:k1,literalAutolinkHttp:k1,literalAutolinkWww:k1},exit:{literalAutolink:HT,literalAutolinkEmail:$T,literalAutolinkHttp:BT,literalAutolinkWww:OT}}}function LT(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:w1,notInConstruct:S1},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:w1,notInConstruct:S1},{character:":",before:"[ps]",after:"\\/",inConstruct:w1,notInConstruct:S1}]}}function RT(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function k1(e){this.config.enter.autolinkProtocol.call(this,e)}function BT(e){this.config.exit.autolinkProtocol.call(this,e)}function OT(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 $T(e){this.config.exit.autolinkEmail.call(this,e)}function HT(e){this.exit(e)}function qT(e){_T(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,UT],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),IT]],{ignore:["link","linkReference"]})}function UT(e,t,n,r,i){let s="";if(!hb(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!PT(n)))return!1;const o=FT(n+r);if(!o[0])return!1;const d={type:"link",title:null,url:s+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[d,{type:"text",value:o[1]}]:d}function IT(e,t,n,r){return!hb(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function PT(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 FT(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=gx(e,"(");let s=gx(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function hb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ls(n)||uf(n))&&(!t||n!==47)}mb.peek=JT;function VT(){this.buffer()}function GT(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function YT(){this.buffer()}function XT(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function KT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Xa(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ZT(e){this.exit(e)}function QT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Xa(this.sliceSerialize(e)).toLowerCase(),n.label=t}function WT(e){this.exit(e)}function JT(){return"["}function mb(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const o=n.enter("footnoteReference"),d=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),d(),o(),s+=i.move("]"),s}function ez(){return{enter:{gfmFootnoteCallString:VT,gfmFootnoteCall:GT,gfmFootnoteDefinitionLabelString:YT,gfmFootnoteDefinition:XT},exit:{gfmFootnoteCallString:KT,gfmFootnoteCall:ZT,gfmFootnoteDefinitionLabelString:QT,gfmFootnoteDefinition:WT}}}function tz(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:mb},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,o){const d=s.createTracker(o);let f=d.move("[^");const m=s.enter("footnoteDefinition"),y=s.enter("label");return f+=d.move(s.safe(s.associationId(r),{before:f,after:"]"})),y(),f+=d.move("]:"),r.children&&r.children.length>0&&(d.shift(4),f+=d.move((t?`
|
|
339
|
+
`:" ")+s.indentLines(s.containerFlow(r,d.current()),t?pb:nz))),m(),f}}function nz(e,t,n){return t===0?e:pb(e,t,n)}function pb(e,t,n){return(n?"":" ")+e}const rz=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];gb.peek=oz;function az(){return{canContainEols:["delete"],enter:{strikethrough:lz},exit:{strikethrough:sz}}}function iz(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:rz}],handlers:{delete:gb}}}function lz(e){this.enter({type:"delete",children:[]},e)}function sz(e){this.exit(e)}function gb(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),s(),o}function oz(){return"~"}function uz(e){return e.length}function cz(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||uz,s=[],o=[],d=[],f=[];let m=0,y=-1;for(;++y<e.length;){const k=[],j=[];let N=-1;for(e[y].length>m&&(m=e[y].length);++N<e[y].length;){const _=dz(e[y][N]);if(n.alignDelimiters!==!1){const E=i(_);j[N]=E,(f[N]===void 0||E>f[N])&&(f[N]=E)}k.push(_)}o[y]=k,d[y]=j}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<m;)s[p]=yx(r[p]);else{const k=yx(r);for(;++p<m;)s[p]=k}p=-1;const g=[],x=[];for(;++p<m;){const k=s[p];let j="",N="";k===99?(j=":",N=":"):k===108?j=":":k===114&&(N=":");let _=n.alignDelimiters===!1?1:Math.max(1,f[p]-j.length-N.length);const E=j+"-".repeat(_)+N;n.alignDelimiters!==!1&&(_=j.length+_+N.length,_>f[p]&&(f[p]=_),x[p]=_),g[p]=E}o.splice(1,0,g),d.splice(1,0,x),y=-1;const w=[];for(;++y<o.length;){const k=o[y],j=d[y];p=-1;const N=[];for(;++p<m;){const _=k[p]||"";let E="",L="";if(n.alignDelimiters!==!1){const D=f[p]-(j[p]||0),T=s[p];T===114?E=" ".repeat(D):T===99?D%2?(E=" ".repeat(D/2+.5),L=" ".repeat(D/2-.5)):(E=" ".repeat(D/2),L=E):L=" ".repeat(D)}n.delimiterStart!==!1&&!p&&N.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&_==="")&&(n.delimiterStart!==!1||p)&&N.push(" "),n.alignDelimiters!==!1&&N.push(E),N.push(_),n.alignDelimiters!==!1&&N.push(L),n.padding!==!1&&N.push(" "),(n.delimiterEnd!==!1||p!==m-1)&&N.push("|")}w.push(n.delimiterEnd===!1?N.join("").replace(/ +$/,""):N.join(""))}return w.join(`
|
|
340
|
+
`)}function dz(e){return e==null?"":String(e)}function yx(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 fz(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const o=n.indentLines(n.containerFlow(e,s.current()),hz);return i(),o}function hz(e,t,n){return">"+(n?"":" ")+e}function mz(e,t){return vx(e,t.inConstruct,!0)&&!vx(e,t.notInConstruct,!1)}function vx(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function xx(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
341
|
+
`&&mz(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
342
|
+
`}function yb(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>o&&(o=s):s=1,i=r+t.length,r=n.indexOf(t,i);return o}function pz(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 gz(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 yz(e,t,n,r){const i=gz(n),s=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(pz(e,n)){const p=n.enter("codeIndented"),g=n.indentLines(s,vz);return p(),g}const d=n.createTracker(r),f=i.repeat(Math.max(yb(s,i)+1,3)),m=n.enter("codeFenced");let y=d.move(f);if(e.lang){const p=n.enter(`codeFencedLang${o}`);y+=d.move(n.safe(e.lang,{before:y,after:" ",encode:["`"],...d.current()})),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${o}`);y+=d.move(" "),y+=d.move(n.safe(e.meta,{before:y,after:`
|
|
343
|
+
`,encode:["`"],...d.current()})),p()}return y+=d.move(`
|
|
344
|
+
`),s&&(y+=d.move(s+`
|
|
345
|
+
`)),y+=d.move(f),m(),y}function vz(e,t,n){return(n?"":" ")+e}function Cg(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 xz(e,t,n,r){const i=Cg(n),s=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let d=n.enter("label");const f=n.createTracker(r);let m=f.move("[");return m+=f.move(n.safe(n.associationId(e),{before:m,after:"]",...f.current()})),m+=f.move("]: "),d(),!e.url||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),m+=f.move("<"),m+=f.move(n.safe(e.url,{before:m,after:">",...f.current()})),m+=f.move(">")):(d=n.enter("destinationRaw"),m+=f.move(n.safe(e.url,{before:m,after:e.title?" ":`
|
|
346
|
+
`,...f.current()}))),d(),e.title&&(d=n.enter(`title${s}`),m+=f.move(" "+i),m+=f.move(n.safe(e.title,{before:m,after:i,...f.current()})),m+=f.move(i),d()),o(),m}function bz(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 mc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Pd(e,t,n){const r=$o(e),i=$o(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}vb.peek=wz;function vb(e,t,n,r){const i=bz(n),s=n.enter("emphasis"),o=n.createTracker(r),d=o.move(i);let f=o.move(n.containerPhrasing(e,{after:i,before:d,...o.current()}));const m=f.charCodeAt(0),y=Pd(r.before.charCodeAt(r.before.length-1),m,i);y.inside&&(f=mc(m)+f.slice(1));const p=f.charCodeAt(f.length-1),g=Pd(r.after.charCodeAt(0),p,i);g.inside&&(f=f.slice(0,-1)+mc(p));const x=o.move(i);return s(),n.attentionEncodeSurroundingInfo={after:g.outside,before:y.outside},d+f+x}function wz(e,t,n){return n.options.emphasis||"*"}function Sz(e,t){let n=!1;return sg(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,J1}),!!((!e.depth||e.depth<3)&&Jp(e)&&(t.options.setext||n))}function kz(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(Sz(e,n)){const y=n.enter("headingSetext"),p=n.enter("phrasing"),g=n.containerPhrasing(e,{...s.current(),before:`
|
|
347
|
+
`,after:`
|
|
348
|
+
`});return p(),y(),g+`
|
|
349
|
+
`+(i===1?"=":"-").repeat(g.length-(Math.max(g.lastIndexOf("\r"),g.lastIndexOf(`
|
|
350
|
+
`))+1))}const o="#".repeat(i),d=n.enter("headingAtx"),f=n.enter("phrasing");s.move(o+" ");let m=n.containerPhrasing(e,{before:"# ",after:`
|
|
351
|
+
`,...s.current()});return/^[\t ]/.test(m)&&(m=mc(m.charCodeAt(0))+m.slice(1)),m=m?o+" "+m:o,n.options.closeAtx&&(m+=" "+o),f(),d(),m}xb.peek=Nz;function xb(e){return e.value||""}function Nz(){return"<"}bb.peek=jz;function bb(e,t,n,r){const i=Cg(n),s=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let d=n.enter("label");const f=n.createTracker(r);let m=f.move("![");return m+=f.move(n.safe(e.alt,{before:m,after:"]",...f.current()})),m+=f.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),m+=f.move("<"),m+=f.move(n.safe(e.url,{before:m,after:">",...f.current()})),m+=f.move(">")):(d=n.enter("destinationRaw"),m+=f.move(n.safe(e.url,{before:m,after:e.title?" ":")",...f.current()}))),d(),e.title&&(d=n.enter(`title${s}`),m+=f.move(" "+i),m+=f.move(n.safe(e.title,{before:m,after:i,...f.current()})),m+=f.move(i),d()),m+=f.move(")"),o(),m}function jz(){return"!"}wb.peek=Cz;function wb(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let o=n.enter("label");const d=n.createTracker(r);let f=d.move("![");const m=n.safe(e.alt,{before:f,after:"]",...d.current()});f+=d.move(m+"]["),o();const y=n.stack;n.stack=[],o=n.enter("reference");const p=n.safe(n.associationId(e),{before:f,after:"]",...d.current()});return o(),n.stack=y,s(),i==="full"||!m||m!==p?f+=d.move(p+"]"):i==="shortcut"?f=f.slice(0,-1):f+=d.move("]"),f}function Cz(){return"!"}Sb.peek=Ez;function Sb(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const o=n.unsafe[s],d=n.compilePattern(o);let f;if(o.atBreak)for(;f=d.exec(r);){let m=f.index;r.charCodeAt(m)===10&&r.charCodeAt(m-1)===13&&m--,r=r.slice(0,m)+" "+r.slice(f.index+1)}}return i+r+i}function Ez(){return"`"}function kb(e,t){const n=Jp(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))}Nb.peek=Mz;function Nb(e,t,n,r){const i=Cg(n),s=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let d,f;if(kb(e,n)){const y=n.stack;n.stack=[],d=n.enter("autolink");let p=o.move("<");return p+=o.move(n.containerPhrasing(e,{before:p,after:">",...o.current()})),p+=o.move(">"),d(),n.stack=y,p}d=n.enter("link"),f=n.enter("label");let m=o.move("[");return m+=o.move(n.containerPhrasing(e,{before:m,after:"](",...o.current()})),m+=o.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),m+=o.move("<"),m+=o.move(n.safe(e.url,{before:m,after:">",...o.current()})),m+=o.move(">")):(f=n.enter("destinationRaw"),m+=o.move(n.safe(e.url,{before:m,after:e.title?" ":")",...o.current()}))),f(),e.title&&(f=n.enter(`title${s}`),m+=o.move(" "+i),m+=o.move(n.safe(e.title,{before:m,after:i,...o.current()})),m+=o.move(i),f()),m+=o.move(")"),d(),m}function Mz(e,t,n){return kb(e,n)?"<":"["}jb.peek=_z;function jb(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let o=n.enter("label");const d=n.createTracker(r);let f=d.move("[");const m=n.containerPhrasing(e,{before:f,after:"]",...d.current()});f+=d.move(m+"]["),o();const y=n.stack;n.stack=[],o=n.enter("reference");const p=n.safe(n.associationId(e),{before:f,after:"]",...d.current()});return o(),n.stack=y,s(),i==="full"||!m||m!==p?f+=d.move(p+"]"):i==="shortcut"?f=f.slice(0,-1):f+=d.move("]"),f}function _z(){return"["}function Eg(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 Az(e){const t=Eg(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 Tz(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 Cb(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 zz(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let o=e.ordered?Tz(n):Eg(n);const d=e.ordered?o==="."?")":".":Az(n);let f=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const y=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&y&&(!y.children||!y.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&&(f=!0),Cb(n)===o&&y){let p=-1;for(;++p<e.children.length;){const g=e.children[p];if(g&&g.type==="listItem"&&g.children&&g.children[0]&&g.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(o=d),n.bulletCurrent=o;const m=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=s,i(),m}function Dz(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 Lz(e,t,n,r){const i=Dz(n);let s=n.bulletCurrent||Eg(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let o=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const d=n.createTracker(r);d.move(s+" ".repeat(o-s.length)),d.shift(o);const f=n.enter("listItem"),m=n.indentLines(n.containerFlow(e,d.current()),y);return f(),m;function y(p,g,x){return g?(x?"":" ".repeat(o))+p:(x?s:s+" ".repeat(o-s.length))+p}}function Rz(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),o=n.containerPhrasing(e,r);return s(),i(),o}const Bz=zc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Oz(e,t,n,r){return(e.children.some(function(o){return Bz(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function $z(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Eb.peek=Hz;function Eb(e,t,n,r){const i=$z(n),s=n.enter("strong"),o=n.createTracker(r),d=o.move(i+i);let f=o.move(n.containerPhrasing(e,{after:i,before:d,...o.current()}));const m=f.charCodeAt(0),y=Pd(r.before.charCodeAt(r.before.length-1),m,i);y.inside&&(f=mc(m)+f.slice(1));const p=f.charCodeAt(f.length-1),g=Pd(r.after.charCodeAt(0),p,i);g.inside&&(f=f.slice(0,-1)+mc(p));const x=o.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:g.outside,before:y.outside},d+f+x}function Hz(e,t,n){return n.options.strong||"*"}function qz(e,t,n,r){return n.safe(e.value,r)}function Uz(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 Iz(e,t,n){const r=(Cb(n)+(n.options.ruleSpaces?" ":"")).repeat(Uz(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Mb={blockquote:fz,break:xx,code:yz,definition:xz,emphasis:vb,hardBreak:xx,heading:kz,html:xb,image:bb,imageReference:wb,inlineCode:Sb,link:Nb,linkReference:jb,list:zz,listItem:Lz,paragraph:Rz,root:Oz,strong:Eb,text:qz,thematicBreak:Iz};function Pz(){return{enter:{table:Fz,tableData:bx,tableHeader:bx,tableRow:Gz},exit:{codeText:Yz,table:Vz,tableData:N1,tableHeader:N1,tableRow:N1}}}function Fz(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 Vz(e){this.exit(e),this.data.inTable=void 0}function Gz(e){this.enter({type:"tableRow",children:[]},e)}function N1(e){this.exit(e)}function bx(e){this.enter({type:"tableCell",children:[]},e)}function Yz(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Xz));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Xz(e,t){return t==="|"?t:e}function Kz(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
352
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:g,table:o,tableCell:f,tableRow:d}};function o(x,w,k,j){return m(y(x,k,j),x.align)}function d(x,w,k,j){const N=p(x,k,j),_=m([N]);return _.slice(0,_.indexOf(`
|
|
353
|
+
`))}function f(x,w,k,j){const N=k.enter("tableCell"),_=k.enter("phrasing"),E=k.containerPhrasing(x,{...j,before:s,after:s});return _(),N(),E}function m(x,w){return cz(x,{align:w,alignDelimiters:r,padding:n,stringLength:i})}function y(x,w,k){const j=x.children;let N=-1;const _=[],E=w.enter("table");for(;++N<j.length;)_[N]=p(j[N],w,k);return E(),_}function p(x,w,k){const j=x.children;let N=-1;const _=[],E=w.enter("tableRow");for(;++N<j.length;)_[N]=f(j[N],x,w,k);return E(),_}function g(x,w,k){let j=Mb.inlineCode(x,w,k);return k.stack.includes("tableCell")&&(j=j.replace(/\|/g,"\\$&")),j}}function Zz(){return{exit:{taskListCheckValueChecked:wx,taskListCheckValueUnchecked:wx,paragraph:Wz}}}function Qz(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Jz}}}function wx(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Wz(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 r=n.children[0];if(r&&r.type==="text"){const i=t.children;let s=-1,o;for(;++s<i.length;){const d=i[s];if(d.type==="paragraph"){o=d;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Jz(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",d=n.createTracker(r);s&&d.move(o);let f=Mb.listItem(e,t,n,{...r,...d.current()});return s&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),f;function m(y){return y+o}}function eD(){return[DT(),ez(),az(),Pz(),Zz()]}function tD(e){return{extensions:[LT(),tz(e),iz(),Kz(e),Qz()]}}const nD={tokenize:oD,partial:!0},_b={tokenize:uD,partial:!0},Ab={tokenize:cD,partial:!0},Tb={tokenize:dD,partial:!0},rD={tokenize:fD,partial:!0},zb={name:"wwwAutolink",tokenize:lD,previous:Lb},Db={name:"protocolAutolink",tokenize:sD,previous:Rb},ll={name:"emailAutolink",tokenize:iD,previous:Bb},Ci={};function aD(){return{text:Ci}}let Es=48;for(;Es<123;)Ci[Es]=ll,Es++,Es===58?Es=65:Es===91&&(Es=97);Ci[43]=ll;Ci[45]=ll;Ci[46]=ll;Ci[95]=ll;Ci[72]=[ll,Db];Ci[104]=[ll,Db];Ci[87]=[ll,zb];Ci[119]=[ll,zb];function iD(e,t,n){const r=this;let i,s;return o;function o(p){return!xp(p)||!Bb.call(r,r.previous)||Mg(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),d(p))}function d(p){return xp(p)?(e.consume(p),d):p===64?(e.consume(p),f):n(p)}function f(p){return p===46?e.check(rD,y,m)(p):p===45||p===95||br(p)?(s=!0,e.consume(p),f):y(p)}function m(p){return e.consume(p),i=!0,f}function y(p){return s&&i&&Tr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function lD(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!Lb.call(r,r.previous)||Mg(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(nD,e.attempt(_b,e.attempt(Ab,s),n),n)(o))}function s(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function sD(e,t,n){const r=this;let i="",s=!1;return o;function o(p){return(p===72||p===104)&&Rb.call(r,r.previous)&&!Mg(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(p),e.consume(p),d):n(p)}function d(p){if(Tr(p)&&i.length<5)return i+=String.fromCodePoint(p),e.consume(p),d;if(p===58){const g=i.toLowerCase();if(g==="http"||g==="https")return e.consume(p),f}return n(p)}function f(p){return p===47?(e.consume(p),s?m:(s=!0,f)):n(p)}function m(p){return p===null||Rd(p)||sn(p)||Ls(p)||uf(p)?n(p):e.attempt(_b,e.attempt(Ab,y),n)(p)}function y(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function oD(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),s):n(o)}function s(o){return o===null?n(o):t(o)}}function uD(e,t,n){let r,i,s;return o;function o(m){return m===46||m===95?e.check(Tb,f,d)(m):m===null||sn(m)||Ls(m)||m!==45&&uf(m)?f(m):(s=!0,e.consume(m),o)}function d(m){return m===95?r=!0:(i=r,r=void 0),e.consume(m),o}function f(m){return i||r||!s?n(m):t(m)}}function cD(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?s(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Tb,t,s)(o):o===null||sn(o)||Ls(o)?t(o):(e.consume(o),i)}function s(o){return o===41&&r++,e.consume(o),i}}function dD(e,t,n){return r;function r(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(e.consume(d),r):d===38?(e.consume(d),s):d===93?(e.consume(d),i):d===60||d===null||sn(d)||Ls(d)?t(d):n(d)}function i(d){return d===null||d===40||d===91||sn(d)||Ls(d)?t(d):r(d)}function s(d){return Tr(d)?o(d):n(d)}function o(d){return d===59?(e.consume(d),r):Tr(d)?(e.consume(d),o):n(d)}}function fD(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return br(s)?n(s):t(s)}}function Lb(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||sn(e)}function Rb(e){return!Tr(e)}function Bb(e){return!(e===47||xp(e))}function xp(e){return e===43||e===45||e===46||e===95||br(e)}function Mg(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const hD={tokenize:wD,partial:!0};function mD(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:vD,continuation:{tokenize:xD},exit:bD}},text:{91:{name:"gfmFootnoteCall",tokenize:yD},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:pD,resolveTo:gD}}}}function pD(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const f=r.events[i][1];if(f.type==="labelImage"){o=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return d;function d(f){if(!o||!o._balanced)return n(f);const m=Xa(r.sliceSerialize({start:o.end,end:r.now()}));return m.codePointAt(0)!==94||!s.includes(m.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function gD(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 r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},d=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...d),e}function yD(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,o;return d;function d(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),f}function f(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",m)}function m(p){if(s>999||p===93&&!o||p===null||p===91||sn(p))return n(p);if(p===93){e.exit("chunkString");const g=e.exit("gfmFootnoteCallString");return i.includes(Xa(r.sliceSerialize(g)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return sn(p)||(o=!0),s++,e.consume(p),p===92?y:m}function y(p){return p===91||p===92||p===93?(e.consume(p),s++,m):m(p)}}function vD(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,o=0,d;return f;function f(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(w){return w===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",y):n(w)}function y(w){if(o>999||w===93&&!d||w===null||w===91||sn(w))return n(w);if(w===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return s=Xa(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),g}return sn(w)||(d=!0),o++,e.consume(w),w===92?p:y}function p(w){return w===91||w===92||w===93?(e.consume(w),o++,y):y(w)}function g(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),i.includes(s)||i.push(s),Ct(e,x,"gfmFootnoteDefinitionWhitespace")):n(w)}function x(w){return t(w)}}function xD(e,t,n){return e.check(Tc,t,e.attempt(hD,t,n))}function bD(e){e.exit("gfmFootnoteDefinition")}function wD(e,t,n){const r=this;return Ct(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(s):n(s)}}function SD(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,d){let f=-1;for(;++f<o.length;)if(o[f][0]==="enter"&&o[f][1].type==="strikethroughSequenceTemporary"&&o[f][1]._close){let m=f;for(;m--;)if(o[m][0]==="exit"&&o[m][1].type==="strikethroughSequenceTemporary"&&o[m][1]._open&&o[f][1].end.offset-o[f][1].start.offset===o[m][1].end.offset-o[m][1].start.offset){o[f][1].type="strikethroughSequence",o[m][1].type="strikethroughSequence";const y={type:"strikethrough",start:Object.assign({},o[m][1].start),end:Object.assign({},o[f][1].end)},p={type:"strikethroughText",start:Object.assign({},o[m][1].end),end:Object.assign({},o[f][1].start)},g=[["enter",y,d],["enter",o[m][1],d],["exit",o[m][1],d],["enter",p,d]],x=d.parser.constructs.insideSpan.null;x&&ca(g,g.length,0,cf(x,o.slice(m+1,f),d)),ca(g,g.length,0,[["exit",p,d],["enter",o[f][1],d],["exit",o[f][1],d],["exit",y,d]]),ca(o,m-1,f-m+3,g),f=m+g.length-2;break}}for(f=-1;++f<o.length;)o[f][1].type==="strikethroughSequenceTemporary"&&(o[f][1].type="data");return o}function s(o,d,f){const m=this.previous,y=this.events;let p=0;return g;function g(w){return m===126&&y[y.length-1][1].type!=="characterEscape"?f(w):(o.enter("strikethroughSequenceTemporary"),x(w))}function x(w){const k=$o(m);if(w===126)return p>1?f(w):(o.consume(w),p++,x);if(p<2&&!n)return f(w);const j=o.exit("strikethroughSequenceTemporary"),N=$o(w);return j._open=!N||N===2&&!!k,j._close=!k||k===2&&!!N,d(w)}}}class kD{constructor(){this.map=[]}add(t,n,r){ND(this,t,n,r)}consume(t){if(this.map.sort(function(s,o){return s[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0}}function ND(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function jD(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function CD(){return{flow:{null:{name:"table",tokenize:ED,resolveAll:MD}}}}function ED(e,t,n){const r=this;let i=0,s=0,o;return d;function d(P){let K=r.events.length-1;for(;K>-1;){const F=r.events[K][1].type;if(F==="lineEnding"||F==="linePrefix")K--;else break}const X=K>-1?r.events[K][1].type:null,le=X==="tableHead"||X==="tableRow"?T:f;return le===T&&r.parser.lazy[r.now().line]?n(P):le(P)}function f(P){return e.enter("tableHead"),e.enter("tableRow"),m(P)}function m(P){return P===124||(o=!0,s+=1),y(P)}function y(P){return P===null?n(P):Je(P)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),x):n(P):_t(P)?Ct(e,y,"whitespace")(P):(s+=1,o&&(o=!1,i+=1),P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),o=!0,y):(e.enter("data"),p(P)))}function p(P){return P===null||P===124||sn(P)?(e.exit("data"),y(P)):(e.consume(P),P===92?g:p)}function g(P){return P===92||P===124?(e.consume(P),p):p(P)}function x(P){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(P):(e.enter("tableDelimiterRow"),o=!1,_t(P)?Ct(e,w,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):w(P))}function w(P){return P===45||P===58?j(P):P===124?(o=!0,e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),k):D(P)}function k(P){return _t(P)?Ct(e,j,"whitespace")(P):j(P)}function j(P){return P===58?(s+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),N):P===45?(s+=1,N(P)):P===null||Je(P)?L(P):D(P)}function N(P){return P===45?(e.enter("tableDelimiterFiller"),_(P)):D(P)}function _(P){return P===45?(e.consume(P),_):P===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),E):(e.exit("tableDelimiterFiller"),E(P))}function E(P){return _t(P)?Ct(e,L,"whitespace")(P):L(P)}function L(P){return P===124?w(P):P===null||Je(P)?!o||i!==s?D(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(P)):D(P)}function D(P){return n(P)}function T(P){return e.enter("tableRow"),O(P)}function O(P){return P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),O):P===null||Je(P)?(e.exit("tableRow"),t(P)):_t(P)?Ct(e,O,"whitespace")(P):(e.enter("data"),Z(P))}function Z(P){return P===null||P===124||sn(P)?(e.exit("data"),O(P)):(e.consume(P),P===92?V:Z)}function V(P){return P===92||P===124?(e.consume(P),Z):Z(P)}}function MD(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],o=[0,0,0,0],d=!1,f=0,m,y,p;const g=new kD;for(;++n<e.length;){const x=e[n],w=x[1];x[0]==="enter"?w.type==="tableHead"?(d=!1,f!==0&&(Sx(g,t,f,m,y),y=void 0,f=0),m={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},g.add(n,0,[["enter",m,t]])):w.type==="tableRow"||w.type==="tableDelimiterRow"?(r=!0,p=void 0,s=[0,0,0,0],o=[0,n+1,0,0],d&&(d=!1,y={type:"tableBody",start:Object.assign({},w.start),end:Object.assign({},w.end)},g.add(n,0,[["enter",y,t]])),i=w.type==="tableDelimiterRow"?2:y?3:1):i&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(s[1]!==0&&(o[0]=o[1],p=ud(g,t,s,i,void 0,p),s=[0,0,0,0]),o[2]=n)):w.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(o[0]=o[1],p=ud(g,t,s,i,void 0,p)),s=o,o=[s[1],n,0,0])):w.type==="tableHead"?(d=!0,f=n):w.type==="tableRow"||w.type==="tableDelimiterRow"?(f=n,s[1]!==0?(o[0]=o[1],p=ud(g,t,s,i,n,p)):o[1]!==0&&(p=ud(g,t,o,i,n,p)),i=0):i&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(o[3]=n)}for(f!==0&&Sx(g,t,f,m,y),g.consume(t.events),n=-1;++n<t.events.length;){const x=t.events[n];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=jD(t.events,n))}return e}function ud(e,t,n,r,i,s){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",d="tableContent";n[0]!==0&&(s.end=Object.assign({},Mo(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const f=Mo(t.events,n[1]);if(s={type:o,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const m=Mo(t.events,n[2]),y=Mo(t.events,n[3]),p={type:d,start:Object.assign({},m),end:Object.assign({},y)};if(e.add(n[2],0,[["enter",p,t]]),r!==2){const g=t.events[n[2]],x=t.events[n[3]];if(g[1].end=Object.assign({},x[1].end),g[1].type="chunkText",g[1].contentType="text",n[3]>n[2]+1){const w=n[2]+1,k=n[3]-n[2]-1;e.add(w,k,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return i!==void 0&&(s.end=Object.assign({},Mo(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function Sx(e,t,n,r,i){const s=[],o=Mo(t.events,n);i&&(i.end=Object.assign({},o),s.push(["exit",i,t])),r.end=Object.assign({},o),s.push(["exit",r,t]),e.add(n+1,0,s)}function Mo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const _D={name:"tasklistCheck",tokenize:TD};function AD(){return{text:{91:_D}}}function TD(e,t,n){const r=this;return i;function i(f){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),s)}function s(f){return sn(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),o):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),o):n(f)}function o(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),d):n(f)}function d(f){return Je(f)?t(f):_t(f)?e.check({tokenize:zD},t,n)(f):n(f)}}function zD(e,t,n){return Ct(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function DD(e){return P6([aD(),mD(),SD(e),CD(),AD()])}const LD={};function RD(e){const t=this,n=e||LD,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(DD(n)),s.push(eD()),o.push(tD(n))}function BD(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:s},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,mathFlowValue:d,mathText:o,mathTextData:d}};function e(f){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]}},f)}function t(){this.buffer()}function n(){const f=this.resume(),m=this.stack[this.stack.length-1];m.type,m.meta=f}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(f){const m=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),y=this.stack[this.stack.length-1];y.type,this.exit(f),y.value=m;const p=y.data.hChildren[0];p.type,p.tagName,p.children.push({type:"text",value:m}),this.data.mathFlowInside=void 0}function s(f){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},f),this.buffer()}function o(f){const m=this.resume(),y=this.stack[this.stack.length-1];y.type,this.exit(f),y.value=m,y.data.hChildren.push({type:"text",value:m})}function d(f){this.config.enter.data.call(this,f),this.config.exit.data.call(this,f)}}function OD(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),r.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
|
|
354
|
+
`,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:n,inlineMath:r}};function n(s,o,d,f){const m=s.value||"",y=d.createTracker(f),p="$".repeat(Math.max(yb(m,"$")+1,2)),g=d.enter("mathFlow");let x=y.move(p);if(s.meta){const w=d.enter("mathFlowMeta");x+=y.move(d.safe(s.meta,{after:`
|
|
355
|
+
`,before:x,encode:["$"],...y.current()})),w()}return x+=y.move(`
|
|
356
|
+
`),m&&(x+=y.move(m+`
|
|
357
|
+
`)),x+=y.move(p),g(),x}function r(s,o,d){let f=s.value||"",m=1;for(t||m++;new RegExp("(^|[^$])"+"\\$".repeat(m)+"([^$]|$)").test(f);)m++;const y="$".repeat(m);/[^ \r\n]/.test(f)&&(/^[ \r\n]/.test(f)&&/[ \r\n]$/.test(f)||/^\$|\$$/.test(f))&&(f=" "+f+" ");let p=-1;for(;++p<d.unsafe.length;){const g=d.unsafe[p];if(!g.atBreak)continue;const x=d.compilePattern(g);let w;for(;w=x.exec(f);){let k=w.index;f.codePointAt(k)===10&&f.codePointAt(k-1)===13&&k--,f=f.slice(0,k)+" "+f.slice(w.index+1)}}return y+f+y}function i(){return"$"}}const $D={tokenize:HD,concrete:!0,name:"mathFlow"},kx={tokenize:qD,partial:!0};function HD(e,t,n){const r=this,i=r.events[r.events.length-1],s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0;let o=0;return d;function d(_){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),f(_)}function f(_){return _===36?(e.consume(_),o++,f):o<2?n(_):(e.exit("mathFlowFenceSequence"),Ct(e,m,"whitespace")(_))}function m(_){return _===null||Je(_)?p(_):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(_))}function y(_){return _===null||Je(_)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),p(_)):_===36?n(_):(e.consume(_),y)}function p(_){return e.exit("mathFlowFence"),r.interrupt?t(_):e.attempt(kx,g,j)(_)}function g(_){return e.attempt({tokenize:N,partial:!0},j,x)(_)}function x(_){return(s?Ct(e,w,"linePrefix",s+1):w)(_)}function w(_){return _===null?j(_):Je(_)?e.attempt(kx,g,j)(_):(e.enter("mathFlowValue"),k(_))}function k(_){return _===null||Je(_)?(e.exit("mathFlowValue"),w(_)):(e.consume(_),k)}function j(_){return e.exit("mathFlow"),t(_)}function N(_,E,L){let D=0;return Ct(_,T,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function T(V){return _.enter("mathFlowFence"),_.enter("mathFlowFenceSequence"),O(V)}function O(V){return V===36?(D++,_.consume(V),O):D<o?L(V):(_.exit("mathFlowFenceSequence"),Ct(_,Z,"whitespace")(V))}function Z(V){return V===null||Je(V)?(_.exit("mathFlowFence"),E(V)):L(V)}}}function qD(e,t,n){const r=this;return i;function i(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function UD(e){let n=(e||{}).singleDollarTextMath;return n==null&&(n=!0),{tokenize:r,resolve:ID,previous:PD,name:"mathText"};function r(i,s,o){let d=0,f,m;return y;function y(k){return i.enter("mathText"),i.enter("mathTextSequence"),p(k)}function p(k){return k===36?(i.consume(k),d++,p):d<2&&!n?o(k):(i.exit("mathTextSequence"),g(k))}function g(k){return k===null?o(k):k===36?(m=i.enter("mathTextSequence"),f=0,w(k)):k===32?(i.enter("space"),i.consume(k),i.exit("space"),g):Je(k)?(i.enter("lineEnding"),i.consume(k),i.exit("lineEnding"),g):(i.enter("mathTextData"),x(k))}function x(k){return k===null||k===32||k===36||Je(k)?(i.exit("mathTextData"),g(k)):(i.consume(k),x)}function w(k){return k===36?(i.consume(k),f++,w):f===d?(i.exit("mathTextSequence"),i.exit("mathText"),s(k)):(m.type="mathTextData",x(k))}}}function ID(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="mathTextData"){e[t][1].type="mathTextPadding",e[n][1].type="mathTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="mathTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function PD(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function FD(e){return{flow:{36:$D},text:{36:UD(e)}}}const VD={};function GD(e){const t=this,n=e||VD,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(FD(n)),s.push(BD()),o.push(OD(n))}function Ji({className:e="",compact:t=!1,content:n}){const r=Yp(n).trim();if(!r)return null;const i=["markdown-content",t?"markdown-content-compact":"",e].filter(Boolean).join(" ");return c.jsx("div",{className:i,children:c.jsx(r_,{rehypePlugins:[[ET,{output:"html",strict:"ignore",throwOnError:!1}]],remarkPlugins:[RD,GD],children:r})})}function YD({isOpen:e,updateInfo:t,currentVersion:n,canInstallUpdate:r,onClose:i,onCheck:s,onDownload:o,onInstall:d}){const[f,m]=A.useState(!1),[y,p]=A.useState(!1);if(A.useEffect(()=>{(t==null?void 0:t.status)==="checking"?m(!0):m(!1),(t==null?void 0:t.status)==="downloading"?p(!0):p(!1)},[t]),!e)return null;const g=async()=>{m(!0);try{await s()}catch{}},x=async()=>{p(!0);try{await o()}catch{}},w=()=>!(t!=null&&t.errorMessage)||t.status!=="error"&&t.status!=="not-available"?null:c.jsxs("div",{className:"error-alert",children:[c.jsxs("svg",{className:"error-alert-icon",viewBox:"0 0 24 24",fill:"none",children:[c.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2"}),c.jsx("path",{d:"M12 8V12M12 16H12.01",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),c.jsxs("div",{className:"error-alert-content",children:[c.jsx("h4",{children:t.status==="not-available"?"自动更新不可用":"检查更新失败"}),c.jsx("p",{children:t.errorMessage})]})]}),k=()=>{if(!t)return"未检查更新";switch(t.status){case"checking":return"正在检查更新...";case"available":return`发现新版本:${t.version}`;case"not-available":return t.errorMessage?`自动更新不可用:${t.errorMessage}`:"已是最新版本";case"downloading":return`正在下载更新并准备安装... ${Math.round(t.downloadProgress)}%`;case"downloaded":return`更新已下载完成:${t.version}`;case"installing":return`正在重启并安装更新:${t.version}`;case"error":return`更新出错:${t.errorMessage}`;default:return"未检查更新"}},j=()=>{if(!t)return null;switch(t.status){case"checking":return c.jsx("svg",{className:"status-icon",viewBox:"0 0 24 24",fill:"none",children:c.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2",strokeDasharray:"4 4"})});case"available":return c.jsx("svg",{className:"status-icon accent",viewBox:"0 0 24 24",fill:"none",children:c.jsx("path",{d:"M12 2L15 8L21 9L17 14L18 20L12 17L6 20L7 14L3 9L9 8L12 2Z",fill:"currentColor"})});case"not-available":return c.jsxs("svg",{className:"status-icon success",viewBox:"0 0 24 24",fill:"none",children:[c.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"currentColor",opacity:"0.2"}),c.jsx("path",{d:"M8 12L11 15L16 9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});case"downloading":return c.jsxs("svg",{className:"status-icon accent",viewBox:"0 0 24 24",fill:"none",children:[c.jsx("path",{d:"M21 15V19C21 19.5304 20.7893 20.0391 20.4142 20.4142C20.0391 20.7893 19.5304 21 19 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),c.jsx("polyline",{points:"17 8 12 3 7 8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),c.jsx("line",{x1:"12",y1:"3",x2:"12",y2:"15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});case"downloaded":return c.jsxs("svg",{className:"status-icon success",viewBox:"0 0 24 24",fill:"none",children:[c.jsx("path",{d:"M21 15V19C21 19.5304 20.7893 20.0391 20.4142 20.4142C20.0391 20.7893 19.5304 21 19 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),c.jsx("polyline",{points:"7 10 12 15 17 10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),c.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});case"installing":return c.jsxs("svg",{className:"status-icon accent",viewBox:"0 0 24 24",fill:"none",children:[c.jsx("path",{d:"M12 3V7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),c.jsx("path",{d:"M12 17V21",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),c.jsx("path",{d:"M3 12H7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),c.jsx("path",{d:"M17 12H21",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),c.jsx("path",{d:"M5.64 5.64L8.46 8.46",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),c.jsx("path",{d:"M15.54 15.54L18.36 18.36",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),c.jsx("path",{d:"M18.36 5.64L15.54 8.46",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),c.jsx("path",{d:"M8.46 15.54L5.64 18.36",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]});case"error":return c.jsxs("svg",{className:"status-icon error",viewBox:"0 0 24 24",fill:"none",children:[c.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2"}),c.jsx("path",{d:"M12 8V12M12 16H12.01",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]});default:return null}},N=E=>{if(!E)return"";try{return new Date(E).toLocaleDateString("zh-CN",{year:"numeric",month:"long",day:"numeric"})}catch{return E}},_=()=>{if((t==null?void 0:t.status)==="not-available"){if(t.releaseNotes){const D=t.releaseNotes.trim();return/<\/?[a-z][\s\S]*>/i.test(D)?c.jsx("div",{className:"release-notes-content",dangerouslySetInnerHTML:{__html:D}}):c.jsx(Ji,{className:"release-notes-content",content:D})}return c.jsx("p",{className:"release-notes-empty",children:"当前已是最新版本,暂无更新日志"})}if(!(t!=null&&t.releaseNotes))return c.jsx("p",{className:"release-notes-empty",children:"暂无更新日志"});const E=t.releaseNotes.trim();return/<\/?[a-z][\s\S]*>/i.test(E)?c.jsx("div",{className:"release-notes-content",dangerouslySetInnerHTML:{__html:E}}):c.jsx(Ji,{className:"release-notes-content",content:E})};return c.jsx("div",{className:"update-dialog-overlay",onClick:i,children:c.jsxs("div",{className:"update-dialog",onClick:E=>E.stopPropagation(),children:[c.jsxs("div",{className:"update-dialog-header",children:[c.jsx("h2",{children:"检查更新"}),c.jsx("button",{className:"close-button",onClick:i,"aria-label":"关闭",children:c.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:c.jsx("path",{d:"M2 2L12 12M12 2L2 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})]}),c.jsxs("div",{className:"update-dialog-body",children:[c.jsxs("div",{className:"current-version",children:[c.jsx("span",{children:"当前版本"}),c.jsxs("code",{children:["v",n]})]}),c.jsxs("div",{className:"update-status",children:[j(),c.jsx("span",{className:"status-text",children:k()})]}),r?null:c.jsx("div",{className:"update-status",children:c.jsx("span",{className:"status-text",children:"当前环境仅支持查看最新版本信息和更新日志,不支持自动下载或安装。"})}),(t==null?void 0:t.status)==="error"&&w(),(t==null?void 0:t.status)==="downloading"&&c.jsx("div",{className:"download-progress",children:c.jsx("div",{className:"progress-bar",children:c.jsx("div",{className:"progress-bar-fill",style:{width:`${t.downloadProgress}%`}})})}),((t==null?void 0:t.status)==="available"||(t==null?void 0:t.status)==="downloaded")&&c.jsxs("div",{className:"update-info",children:[c.jsxs("div",{className:"new-version",children:[c.jsx("span",{children:"新版本"}),c.jsxs("strong",{children:["v",t.version]})]}),t.releaseDate&&c.jsxs("div",{className:"release-date",children:[c.jsx("span",{children:"发布日期"}),c.jsx("time",{children:N(t.releaseDate)})]})]}),c.jsxs("div",{className:"release-notes-section",children:[c.jsx("h3",{children:"更新日志"}),c.jsx("div",{className:"release-notes",children:(t==null?void 0:t.status)==="checking"?c.jsx("p",{className:"release-notes-loading",children:"正在加载更新日志..."}):(t==null?void 0:t.status)==="idle"?c.jsx("p",{className:"release-notes-empty",children:'点击"检查更新"按钮查看更新日志'}):_()})]})]}),c.jsxs("div",{className:"update-dialog-footer",children:[r?null:c.jsx("button",{className:"primary-button",onClick:g,disabled:f||(t==null?void 0:t.status)==="checking",children:f||(t==null?void 0:t.status)==="checking"?"检查中...":"检查更新"}),r&&((t==null?void 0:t.status)==="idle"||(t==null?void 0:t.status)==="not-available")?c.jsx("button",{className:"primary-button",onClick:g,disabled:f,children:f?"检查中...":"检查更新"}):null,r&&(t==null?void 0:t.status)==="error"?c.jsx("button",{className:"primary-button",onClick:g,disabled:f,children:f?"检查中...":"重试"}):null,r&&(t==null?void 0:t.status)==="available"?c.jsxs(c.Fragment,{children:[c.jsx("button",{className:"secondary-button",onClick:i,children:"稍后提醒"}),c.jsx("button",{className:"primary-button",onClick:x,disabled:y,children:y?"下载中...":"下载并重启安装"})]}):null,r&&(t==null?void 0:t.status)==="downloaded"?c.jsxs(c.Fragment,{children:[c.jsx("button",{className:"secondary-button",onClick:i,children:"稍后安装"}),c.jsx("button",{className:"primary-button",onClick:d,children:"立即重启安装"})]}):null,r&&(t==null?void 0:t.status)==="downloading"?c.jsx("button",{className:"secondary-button",onClick:i,disabled:!0,children:"下载中..."}):null,r&&(t==null?void 0:t.status)==="checking"?c.jsx("button",{className:"secondary-button",onClick:i,disabled:!0,children:"检查中..."}):null,r&&(t==null?void 0:t.status)==="installing"?c.jsx("button",{className:"secondary-button",onClick:i,disabled:!0,children:"安装中..."}):null]})]})})}function XD(e){return/失败|错误|不可用|未就绪|停止|关闭/i.test(e)?"error":/完成|成功|已复制|已保存|已刷新|已开始|已请求|已切换/i.test(e)?"success":"info"}function KD(e,t,n){return n!==void 0?n:/^正在(刷新|导出|复制|重新生成|生成|提交|拉起)|^已发起/i.test(e)?3200:/处理中|请先|检测到.+请先/i.test(e)?null:t==="error"?6500:4800}function _g({notices:e}){const[t,n]=A.useState({}),r=A.useMemo(()=>e.filter(s=>s.message.trim()).map(s=>{const o=s.tone??XD(s.message);return{...s,tone:o,signature:`${s.id}:${s.message}`,autoDismissMs:KD(s.message,o,s.durationMs)}}),[e]),i=r.filter(s=>t[s.id]!==s.signature);return A.useEffect(()=>{if(!r.length)return;const s=r.filter(o=>o.autoDismissMs!=null&&t[o.id]!==o.signature).map(o=>window.setTimeout(()=>{n(d=>({...d,[o.id]:o.signature}))},o.autoDismissMs??0));return()=>{for(const o of s)window.clearTimeout(o)}},[t,r]),i.length?c.jsx("div",{className:"floating-notice-stack","aria-live":"polite","aria-atomic":"true",children:i.map(s=>c.jsxs("div",{className:`floating-notice-pill tone-${s.tone}`,role:"status",children:[c.jsx("span",{className:"floating-notice-dot","aria-hidden":"true"}),c.jsx("span",{className:"floating-notice-copy",children:s.message}),c.jsx("button",{className:"floating-notice-close",type:"button","aria-label":"关闭提示",onClick:()=>{n(o=>({...o,[s.id]:s.signature}))},children:c.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:c.jsx("path",{d:"M3 3L9 9M9 3L3 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]},s.signature))}):null}function Ob({video:e,onToggleFavorite:t}){const n=Gl(e.latest_status),r=e.pages.length>1,i=e.platform?`is-${e.platform.toLowerCase()}`:"";async function s(f){f.preventDefault(),f.stopPropagation(),await(t==null?void 0:t(e.video_id,!e.is_favorite))}const o=ZD(e);function d(f){var p;const m=f.target;m.style.display="none";const y=(p=m.parentElement)==null?void 0:p.querySelector(".video-card-placeholder");y&&y.classList.remove("is-hidden")}return c.jsxs(pi,{className:"video-card",to:`/videos/${e.video_id}`,children:[c.jsxs("div",{className:"video-card-cover",children:[e.cover_url?c.jsxs(c.Fragment,{children:[c.jsx("img",{src:e.cover_url,alt:e.title,loading:"lazy",onError:d}),c.jsx("div",{className:"video-card-placeholder is-hidden",children:"VIDEO"})]}):c.jsx("div",{className:"video-card-placeholder",children:"VIDEO"}),t?c.jsx("button",{"aria-label":e.is_favorite?"取消收藏":"收藏视频",className:`video-card-favorite ${e.is_favorite?"is-active":""}`,title:e.is_favorite?"取消收藏":"收藏视频",type:"button",onClick:f=>void s(f),children:c.jsx(QD,{})}):null,c.jsx("span",{className:"video-duration",children:mi(e.duration)})]}),c.jsxs("div",{className:"video-card-body",children:[c.jsxs("div",{className:"video-card-topline",children:[c.jsxs("div",{className:"video-card-badges",children:[c.jsx("span",{className:`video-platform-badge ${i}`.trim(),children:k6(e.platform)}),r?c.jsxs("span",{className:"video-page-badge",children:[e.pages.length,"P"]}):null]}),c.jsx("span",{className:`task-status ${n}`,children:Pa(e.latest_status)})]}),c.jsx("h3",{children:e.title}),c.jsxs("div",{className:"video-card-meta",children:[c.jsx("span",{children:hi(e.updated_at)}),c.jsx("span",{className:"video-card-result-state",children:o})]})]})]})}function ZD(e){if(e.has_result)return"摘要已生成";switch(e.latest_status){case"running":return"正在生成摘要";case"queued":return"等待开始处理";case"failed":return"本次生成失败";case"cancelled":return"已取消生成";case"completed":return"未产出摘要";default:return"尚未生成摘要"}}function QD(){return c.jsx("svg",{fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:c.jsx("path",{d:"M12 18.26 4.95 22l1.35-7.84L.6 8.71l7.87-1.14L12 0.5l3.53 7.07 7.87 1.14-5.7 5.45L19.05 22z"})})}function WD({configHealth:e,probePreview:t,probeUrl:n,setProbeUrl:r,submitStatus:i,onProbe:s,onImportLocalVideo:o,canImportLocalVideo:d,onOpenSetupAssistant:f,onOpenConfigIssue:m,favoriteVideos:y,recentVideos:p,onToggleFavorite:g}){return c.jsxs("section",{className:"home-page",children:[c.jsx(_g,{notices:[{id:"home-submit-status",message:i}]}),c.jsxs("div",{className:"section",children:[c.jsx("h2",{className:"section-title",children:"开始总结"}),c.jsx("form",{className:"task-form",onSubmit:s,children:c.jsxs("div",{className:"task-form-row",children:[c.jsx("label",{className:"input-row input-row-hero",style:{flex:1},children:c.jsxs("div",{className:"input-with-icon",style:{flex:1},children:[c.jsx("span",{className:"input-icon","aria-hidden":"true",children:c.jsx(EN,{})}),c.jsx("input",{className:`input-field input-field-hero ${d?"input-field-with-action":""}`.trim(),type:"text",value:n,onChange:x=>r(x.target.value),placeholder:"粘贴 Bilibili / YouTube 视频链接,或直接输入 BV 号",required:!0}),d?c.jsx("button",{className:"input-inline-action",type:"button","aria-label":"导入本地视频",title:"导入本地视频",onClick:()=>void o(),children:c.jsx(MN,{})}):null]})}),c.jsx("button",{className:"primary-button primary-button-hero",type:"submit",children:"开始总结"})]})}),e.checked&&!e.isConfigured?c.jsxs("article",{className:`config-alert-card tone-${e.state}`,children:[c.jsxs("div",{className:"config-alert-copy",children:[c.jsx("span",{className:"section-kicker",children:"运行配置提醒"}),c.jsx("strong",{children:e.hasBlockingIssues?"当前缺少开始总结所需配置":"当前有增强配置待补全"}),c.jsx("p",{children:e.summary}),c.jsx("div",{className:"config-alert-list",children:e.issues.map(x=>c.jsxs("button",{className:"config-alert-item",type:"button",onClick:()=>m(x.key),children:[c.jsx("strong",{children:x.title}),c.jsx("span",{children:x.description})]},x.key))})]}),c.jsx("div",{className:"config-alert-actions",children:c.jsx("button",{className:e.hasBlockingIssues?"primary-button danger-button":"secondary-button",type:"button",onClick:()=>{var x,w;return f(((x=e.blockingIssues[0])==null?void 0:x.key)||((w=e.issues[0])==null?void 0:w.key))},children:e.actionText})})]}):null,t&&c.jsxs("article",{className:"probe-preview",children:[c.jsx("img",{src:t.cover_url,alt:t.title}),c.jsxs("div",{className:"probe-preview-copy",children:[c.jsx("span",{className:"section-kicker",children:"即将加入视频库"}),c.jsx("strong",{children:t.title}),c.jsxs("small",{children:[mi(t.duration)," · ",k6(t.platform)]})]})]})]}),y.length>0?c.jsx("div",{className:"section",children:c.jsx(Nx,{title:"收藏视频",videos:y,onToggleFavorite:g})}):null,c.jsx("div",{className:"section",children:p.length>0?c.jsx(Nx,{title:"最近视频",videos:p,onToggleFavorite:g}):c.jsx("div",{className:"empty-placeholder",children:"还没有视频,先输入一个链接开始总结吧。"})})]})}function Nx({title:e,videos:t,onToggleFavorite:n}){var L;const r=A.useRef(null),[i,s]=A.useState(!1),[o,d]=A.useState(t.length>1),[f,m]=A.useState(!1),[y,p]=A.useState(()=>N(typeof window>"u"?1180:window.innerWidth)),[g,x]=A.useState(0),w=Math.max(1,y*(g+16)),k=Math.max(1,Math.ceil(t.length/Math.max(1,y))),j=f&&g>0?Math.min(k,Math.max(1,Math.round((((L=r.current)==null?void 0:L.scrollLeft)??0)/w)+1)):1;function N(D){return D>=1240?4:D>=820?3:D>=560?2:1}function _(){const D=r.current;if(!D){p(N(typeof window>"u"?1180:window.innerWidth)),m(t.length>1),s(!1),d(t.length>1);return}const T=N(D.clientWidth),O=16;p(T),x(Math.max(176,(D.clientWidth-O*(T-1))/T));const Z=Math.max(0,D.scrollWidth-D.clientWidth),V=Z>8;m(V),s(D.scrollLeft>8),d(V&&D.scrollLeft<Z-8)}A.useEffect(()=>{_();const D=r.current;if(!D)return;const T=()=>_(),O=()=>_(),Z=typeof ResizeObserver<"u"?new ResizeObserver(()=>_()):null;return D.addEventListener("scroll",T,{passive:!0}),window.addEventListener("resize",O),Z==null||Z.observe(D),()=>{D.removeEventListener("scroll",T),window.removeEventListener("resize",O),Z==null||Z.disconnect()}},[t.length]);function E(D){const T=r.current;if(!T)return;const O=T.querySelector(".home-carousel-item"),P=(((O==null?void 0:O.offsetWidth)??T.clientWidth)+16)*y*(D==="left"?-1:1);T.scrollBy({left:P,behavior:"smooth"})}return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"home-carousel-head",children:[c.jsx("h2",{className:"section-title home-carousel-title",children:e}),c.jsx("div",{className:"home-carousel-controls",children:c.jsxs("span",{className:"helper-chip",children:[t.length," 个视频"]})})]}),t.length>0?c.jsxs("div",{className:"home-carousel-shell",children:[c.jsx("div",{className:"home-carousel-stage",ref:r,children:c.jsx("div",{className:"home-carousel-track",children:t.map(D=>c.jsx("div",{className:"home-carousel-item",style:g>0?{width:`${g}px`,flexBasis:`${g}px`}:void 0,children:c.jsx(Ob,{video:D,onToggleFavorite:n})},D.video_id))})}),f?c.jsx("div",{className:"home-carousel-footer",children:c.jsxs("div",{className:"home-carousel-nav-row",children:[c.jsxs("span",{className:"home-carousel-page-indicator",children:[j," / ",k]}),c.jsxs("div",{className:"home-carousel-nav-group",children:[c.jsx("button",{className:"home-carousel-button home-carousel-button-left",type:"button",onClick:()=>E("left"),disabled:!i,"aria-label":`${e}上一页`,children:c.jsx(jx,{direction:"left"})}),c.jsx("button",{className:"home-carousel-button home-carousel-button-right",type:"button",onClick:()=>E("right"),disabled:!o,"aria-label":`${e}下一页`,children:c.jsx(jx,{direction:"right"})})]})]})}):null]}):null]})}function jx({direction:e}){return c.jsx("svg",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",viewBox:"0 0 24 24","aria-hidden":"true",children:e==="left"?c.jsx("path",{d:"m15 18-6-6 6-6"}):c.jsx("path",{d:"m9 6 6 6-6 6"})})}const JD=["我最近主要在学什么主题?","帮我串一下答题卡识别这条知识线。","有哪些视频反复讲 OpenCV / 深度学习?","把最近内容整理成一份复习提纲。"];function eL(e){if(!e)return null;const t=Array.isArray(e.sources)?e.sources:[],n=Object.entries(e).filter(([r])=>r!=="sources");return c.jsxs("div",{className:"knowledge-tool-meta",children:[n.map(([r,i])=>c.jsxs("span",{className:"helper-chip",children:[r.replace(/_/g," ")," ",String(i)]},r)),t.length?c.jsx("div",{className:"knowledge-tool-source-preview",children:t.slice(0,3).map((r,i)=>{if(!r||typeof r!="object")return null;const s=String(r.title||`来源 ${i+1}`),o=String(r.timestamp||"").trim();return c.jsxs("span",{className:"knowledge-tool-source-chip",children:[s,o?` · ${o}`:""]},`${s}-${o||i}`)})}):null]})}function tL(e){return c.jsxs("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[c.jsx("path",{className:"knowledge-tool-summary-icon-page",d:"M6.5 4.5h5.25L15 7.75v7.75H6.5a1.5 1.5 0 0 1-1.5-1.5v-8a1.5 1.5 0 0 1 1.5-1.5Z"}),c.jsx("path",{className:"knowledge-tool-summary-icon-fold",d:"M11.75 4.5v3.25H15"}),c.jsx("path",{d:"M8 10.25h4.25"}),c.jsx("path",{d:"M8 12.75h3"})]})}function nL(e){const t=[];return e.page_number&&t.push(`P${e.page_number}`),e.video_title&&e.video_title!==e.title&&t.push(e.video_title),t.push(`${Math.round(e.relevance_score*100)}%`),e.timestamp&&t.push(e.timestamp),t.join(" · ")}function rL({tools:e=[]}){if(!e.length)return null;const t=e.filter(m=>m.status==="running").length,n=e.filter(m=>m.status==="error").length,r=e.filter(m=>m.status==="completed").length,i=e.find(m=>m.status==="running")||null,s=i?e.findIndex(m=>m.id===i.id):-1,o=t?"running":n?"error":"completed",d=i?`正在调用:${i.label}`:n?"工具链需要注意":"工具链",f=t?`第 ${s+1||r+1}/${e.length} 步`:n?`${n} 个工具失败`:`已完成 ${r} 个工具`;return c.jsxs("details",{className:`knowledge-tool-trace is-${o}`,children:[c.jsxs("summary",{children:[c.jsxs("span",{className:"knowledge-tool-summary-main",children:[c.jsx("span",{className:"knowledge-tool-summary-icon",children:c.jsx(tL,{})}),c.jsx("span",{className:"knowledge-tool-summary-title",children:d}),i?c.jsxs("span",{className:"knowledge-tool-summary-progress","aria-hidden":"true",children:[c.jsx("i",{}),c.jsx("i",{}),c.jsx("i",{})]}):null]}),c.jsx("span",{className:"knowledge-tool-summary-status","aria-live":"polite",children:f})]}),c.jsx("div",{className:"knowledge-tool-list",children:e.map((m,y)=>c.jsxs("article",{className:`knowledge-tool-card is-${m.status}`,children:[c.jsxs("div",{className:"knowledge-tool-head",children:[c.jsxs("div",{className:"knowledge-tool-status",children:[c.jsx("span",{className:"knowledge-tool-status-dot"}),c.jsx("span",{className:"knowledge-tool-step-index",children:y+1}),c.jsx("strong",{children:m.label})]}),c.jsx("span",{className:"knowledge-tool-status-text",children:m.status==="running"?"运行中":m.status==="error"?"失败":"完成"})]}),m.detail?c.jsx("p",{children:m.detail}):null,eL(m.meta)]},m.id))})]})}function aL({query:e,onQueryChange:t,onSubmit:n,onStop:r,onNewConversation:i,onPickSuggestion:s,disabled:o,loading:d,hasContext:f,messages:m,recentQueries:y}){var L;const p=A.useRef(null),g=A.useRef(null),x=A.useRef(null),w=A.useMemo(()=>{const D=new Set;return[...y,...JD].filter(O=>{const Z=O.trim();return!Z||D.has(Z)?!1:(D.add(Z),!0)}).slice(0,6)},[y]),k=m.length>0,j=k?m[m.length-1]:null,N=A.useMemo(()=>((j==null?void 0:j.tools)||[]).map(D=>`${D.id}:${D.status}:${D.detail||""}`).join("|"),[j==null?void 0:j.tools]),_=(j==null?void 0:j.role)==="assistant"&&j.status==="streaming",E=A.useCallback((D="auto")=>{var O;const T=p.current;T&&(T.scrollTo({top:T.scrollHeight,behavior:D}),(O=x.current)==null||O.scrollIntoView({block:"end",behavior:D}))},[]);return A.useLayoutEffect(()=>{k&&E(_?"auto":"smooth")},[k,_,j==null?void 0:j.id,j==null?void 0:j.content,(L=j==null?void 0:j.sources)==null?void 0:L.length,j==null?void 0:j.status,N,m.length,E]),A.useEffect(()=>{if(!_)return;const D=g.current;if(!D)return;let T=0;const O=()=>{window.cancelAnimationFrame(T),T=window.requestAnimationFrame(()=>E("auto"))};O();const Z=new ResizeObserver(O);return Z.observe(D),()=>{window.cancelAnimationFrame(T),Z.disconnect()}},[_,j==null?void 0:j.id,E]),c.jsxs("div",{className:`knowledge-chat-shell knowledge-chat-shell-gpt ${k?"has-thread":"is-empty"}`,children:[c.jsx("div",{ref:p,className:"knowledge-chat-scroll",children:k?c.jsxs("div",{ref:g,className:"knowledge-chat-thread",children:[m.map(D=>{var T;return c.jsx("article",{className:`knowledge-chat-message-row ${D.role==="user"?"is-user":"is-assistant"}`,children:c.jsxs("div",{className:`knowledge-chat-bubble ${D.role==="user"?"is-user":"is-assistant"}`,children:[c.jsxs("div",{className:"knowledge-chat-message-meta",children:[c.jsx("strong",{children:D.role==="user"?"你":"知识库助手"}),D.role==="assistant"&&D.status==="streaming"?c.jsx("span",{className:"knowledge-streaming-indicator",children:"正在输出"}):null]}),D.role==="assistant"?c.jsxs(c.Fragment,{children:[c.jsx(rL,{tools:D.tools}),c.jsx(Ji,{className:"knowledge-chat-markdown",content:D.content||(D.status==="streaming"?"正在整理回答...":"")})]}):c.jsx("p",{className:"knowledge-chat-user-text",children:D.content}),D.role==="assistant"&&((T=D.sources)!=null&&T.length)?c.jsx("div",{className:"knowledge-chat-sources",children:D.sources.map(O=>c.jsxs(pi,{className:"knowledge-chat-source-card",to:`/videos/${O.video_id}`,children:[c.jsx("strong",{children:O.title}),c.jsx("span",{children:nL(O)})]},`${O.video_id}-${O.timestamp||"na"}`))}):null]})},D.id)}),c.jsx("div",{ref:x,className:"knowledge-chat-thread-end","aria-hidden":"true"})]}):c.jsxs("div",{className:"knowledge-chat-welcome",children:[c.jsx("span",{className:"library-kicker",children:"Knowledge Chat"}),c.jsx("h2",{children:"直接问你的知识库"}),c.jsx("p",{children:"边检索、边生成、边展示工具轨迹。把视频、知识笔记和标签关系收束成一个真正能追问的助手。"}),c.jsx("div",{className:"knowledge-chat-suggestion-grid",children:w.map(D=>c.jsx("button",{className:"knowledge-chat-suggestion-card",type:"button",onClick:()=>s(D),children:D},D))})]})}),c.jsx("div",{className:"knowledge-chat-composer-dock",children:c.jsxs("div",{className:"knowledge-chat-composer-surface",children:[c.jsx("textarea",{className:"textarea-field knowledge-chat-textarea",value:e,onChange:D=>t(D.target.value),placeholder:"问知识库任何问题,例如:我最近在学什么?把 OpenCV 相关内容帮我串起来。",onKeyDown:D=>{D.key==="Enter"&&!D.shiftKey&&(D.preventDefault(),n())}}),c.jsxs("div",{className:"knowledge-chat-composer-footer",children:[c.jsx("div",{className:"knowledge-chat-suggestion-row",children:w.slice(0,k?3:4).map(D=>c.jsx("button",{className:"filter-pill",type:"button",onClick:()=>s(D),children:c.jsx("span",{children:D})},D))}),c.jsxs("div",{className:"knowledge-chat-action-row",children:[c.jsx("button",{className:"secondary-button knowledge-chat-new-session",type:"button",onClick:i,disabled:d||!f,title:"清空当前会话上下文",children:"新会话"}),d?c.jsx("button",{className:"secondary-button",type:"button",onClick:r,children:"停止回答"}):null,c.jsx("button",{className:"primary-button knowledge-chat-submit",type:"button",onClick:n,disabled:o||d,children:d?"回答中...":"发送"})]})]})]})})]})}function iL({query:e,onQueryChange:t,results:n,selectedTags:r,allTags:i,onToggleTag:s,onManageTags:o,searching:d,statsSummary:f}){return c.jsxs("div",{className:"knowledge-workbench-grid",children:[c.jsxs("div",{className:"knowledge-panel-card knowledge-sidebar-card",children:[c.jsx("div",{className:"knowledge-section-head",children:c.jsxs("div",{children:[c.jsx("h3",{children:"工作台概览"}),c.jsx("p",{children:"先筛标签,再搜索命中内容。"})]})}),c.jsx("div",{className:"knowledge-stats-grid",children:f.map(m=>c.jsxs("div",{className:"knowledge-stat-chip",children:[c.jsx("span",{children:m.label}),c.jsx("strong",{children:m.value})]},m.label))}),c.jsxs("div",{className:"knowledge-sidebar-section",children:[c.jsxs("div",{className:"knowledge-section-title-row",children:[c.jsx("strong",{children:"已选标签"}),r.length?c.jsx("button",{className:"tertiary-button",type:"button",onClick:()=>r.forEach(m=>s(m)),children:"清空"}):null]}),c.jsx("div",{className:"filter-pill-row",children:r.length?r.map(m=>c.jsx("button",{className:"filter-pill active",type:"button",onClick:()=>s(m),children:c.jsx("span",{children:m})},m)):c.jsx("span",{className:"knowledge-muted-copy",children:"还没有筛选标签。"})})]}),c.jsxs("div",{className:"knowledge-sidebar-section",children:[c.jsx("div",{className:"knowledge-section-title-row",children:c.jsx("strong",{children:"热门标签"})}),c.jsx("div",{className:"knowledge-tag-cloud",children:i.slice(0,18).map(m=>c.jsxs("button",{className:`filter-pill ${r.includes(m.tag)?"active":""}`,type:"button",onClick:()=>s(m.tag),children:[c.jsx("span",{children:m.tag}),c.jsx("strong",{children:m.count})]},m.tag))})]})]}),c.jsxs("div",{className:"knowledge-panel-card knowledge-results-card",children:[c.jsx("div",{className:"knowledge-section-head",children:c.jsxs("div",{children:[c.jsx("h3",{children:"语义搜索"}),c.jsx("p",{children:"把标签筛选和片段级命中放在一起看。"})]})}),c.jsxs("label",{className:"search-field knowledge-search-field",children:[c.jsx("span",{className:"search-icon","aria-hidden":"true",children:c.jsx(Y1,{})}),c.jsx("input",{className:"input-field input-field-search",type:"search",value:e,onChange:m=>t(m.target.value),placeholder:"输入主题、问题或术语,例如:注意力机制、答题卡识别、OpenCV"})]}),c.jsxs("div",{className:"knowledge-result-list",children:[d?c.jsx("div",{className:"knowledge-empty-state",children:"正在搜索知识库..."}):null,!d&&!n.length?c.jsx("div",{className:"knowledge-empty-state",children:e.trim()?"没有找到更合适的命中结果,可以换个问法或先用标签缩小范围。":"输入关键词后,这里会展示最相关的视频片段和命中摘要。"}):null,n.map(m=>c.jsxs("article",{className:"knowledge-result-card",children:[c.jsxs("div",{className:"knowledge-result-head",children:[c.jsxs("div",{children:[c.jsx("h4",{children:c.jsx(pi,{to:`/videos/${m.video_id}`,children:m.title})}),c.jsxs("p",{children:["相关度 ",Math.round(m.relevance_score*100),"%",m.timestamp?` · ${m.timestamp}`:""]})]}),c.jsx("div",{className:"knowledge-result-actions",children:c.jsx("button",{className:"tertiary-button",type:"button",onClick:()=>o(m.video_id),children:"标签"})})]}),c.jsx("p",{className:"knowledge-result-snippet",children:m.snippet}),c.jsx("div",{className:"filter-pill-row",children:m.tags.map(y=>c.jsx("button",{className:`filter-pill ${r.includes(y)?"active":""}`,type:"button",onClick:()=>s(y),children:c.jsx("span",{children:y})},`${m.video_id}-${y}`))})]},`${m.video_id}-${m.timestamp||"na"}`))]})]})]})}function lL({videoId:e,title:t,onClose:n,onUpdated:r}){const[i,s]=A.useState([]),[o,d]=A.useState(""),[f,m]=A.useState(!1);if(A.useEffect(()=>{if(!e)return;let x=!1;return Ke.getKnowledgeTags(e).then(w=>{!x&&"video_id"in w&&s(w.items)}).catch(()=>{}),()=>{x=!0}},[e]),!e)return null;const y=e;async function p(){if(o.trim()){m(!0);try{const x=await Ke.addKnowledgeTag({video_id:y,tag:o.trim()});s(x.items),d(""),r()}finally{m(!1)}}}async function g(x){m(!0);try{const w=await Ke.deleteKnowledgeTag(y,x);s(w.items),r()}finally{m(!1)}}return c.jsx("div",{className:"dialog-backdrop",role:"presentation",onClick:n,children:c.jsxs("div",{className:"knowledge-tag-manager",role:"dialog","aria-modal":"true",onClick:x=>x.stopPropagation(),children:[c.jsxs("div",{className:"knowledge-section-head",children:[c.jsxs("div",{children:[c.jsx("h3",{children:"管理标签"}),c.jsx("p",{children:t||e})]}),c.jsx("button",{className:"tertiary-button",type:"button",onClick:n,children:"关闭"})]}),c.jsxs("div",{className:"knowledge-tag-input-row",children:[c.jsx("input",{className:"input-field",value:o,onChange:x=>d(x.target.value),placeholder:"添加一个标签"}),c.jsx("button",{className:"primary-button",type:"button",onClick:p,disabled:f,children:"添加"})]}),c.jsxs("div",{className:"knowledge-tag-records",children:[i.map(x=>c.jsxs("div",{className:"knowledge-tag-record",children:[c.jsxs("div",{children:[c.jsx("strong",{children:x.tag}),c.jsxs("span",{children:[x.source,x.source!=="manual"?` · ${Math.round(x.confidence*100)}%`:""]})]}),c.jsx("button",{className:"tertiary-button danger",type:"button",onClick:()=>void g(x.tag),children:"删除"})]},`${x.video_id}-${x.tag}`)),i.length?null:c.jsx("div",{className:"knowledge-empty-state",children:"当前视频还没有标签。"})]})]})})}function Qn(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=Qn(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var sL={value:()=>{}};function Cf(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Ed(n)}function Ed(e){this._=e}function oL(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Ed.prototype=Cf.prototype={constructor:Ed,on:function(e,t){var n=this._,r=oL(e+"",n),i,s=-1,o=r.length;if(arguments.length<2){for(;++s<o;)if((i=(e=r[s]).type)&&(i=uL(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<o;)if(i=(e=r[s]).type)n[i]=Cx(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Cx(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Ed(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,s;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],r=0,i=s.length;r<i;++r)s[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,s=r.length;i<s;++i)r[i].value.apply(t,n)}};function uL(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Cx(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=sL,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var bp="http://www.w3.org/1999/xhtml";const Ex={svg:"http://www.w3.org/2000/svg",xhtml:bp,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ef(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Ex.hasOwnProperty(t)?{space:Ex[t],local:e}:e}function cL(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===bp&&t.documentElement.namespaceURI===bp?t.createElement(e):t.createElementNS(n,e)}}function dL(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function $b(e){var t=Ef(e);return(t.local?dL:cL)(t)}function fL(){}function Ag(e){return e==null?fL:function(){return this.querySelector(e)}}function hL(e){typeof e!="function"&&(e=Ag(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],o=s.length,d=r[i]=new Array(o),f,m,y=0;y<o;++y)(f=s[y])&&(m=e.call(f,f.__data__,y,s))&&("__data__"in f&&(m.__data__=f.__data__),d[y]=m);return new ha(r,this._parents)}function mL(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function pL(){return[]}function Hb(e){return e==null?pL:function(){return this.querySelectorAll(e)}}function gL(e){return function(){return mL(e.apply(this,arguments))}}function yL(e){typeof e=="function"?e=gL(e):e=Hb(e);for(var t=this._groups,n=t.length,r=[],i=[],s=0;s<n;++s)for(var o=t[s],d=o.length,f,m=0;m<d;++m)(f=o[m])&&(r.push(e.call(f,f.__data__,m,o)),i.push(f));return new ha(r,i)}function qb(e){return function(){return this.matches(e)}}function Ub(e){return function(t){return t.matches(e)}}var vL=Array.prototype.find;function xL(e){return function(){return vL.call(this.children,e)}}function bL(){return this.firstElementChild}function wL(e){return this.select(e==null?bL:xL(typeof e=="function"?e:Ub(e)))}var SL=Array.prototype.filter;function kL(){return Array.from(this.children)}function NL(e){return function(){return SL.call(this.children,e)}}function jL(e){return this.selectAll(e==null?kL:NL(typeof e=="function"?e:Ub(e)))}function CL(e){typeof e!="function"&&(e=qb(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],o=s.length,d=r[i]=[],f,m=0;m<o;++m)(f=s[m])&&e.call(f,f.__data__,m,s)&&d.push(f);return new ha(r,this._parents)}function Ib(e){return new Array(e.length)}function EL(){return new ha(this._enter||this._groups.map(Ib),this._parents)}function Fd(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Fd.prototype={constructor:Fd,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function ML(e){return function(){return e}}function _L(e,t,n,r,i,s){for(var o=0,d,f=t.length,m=s.length;o<m;++o)(d=t[o])?(d.__data__=s[o],r[o]=d):n[o]=new Fd(e,s[o]);for(;o<f;++o)(d=t[o])&&(i[o]=d)}function AL(e,t,n,r,i,s,o){var d,f,m=new Map,y=t.length,p=s.length,g=new Array(y),x;for(d=0;d<y;++d)(f=t[d])&&(g[d]=x=o.call(f,f.__data__,d,t)+"",m.has(x)?i[d]=f:m.set(x,f));for(d=0;d<p;++d)x=o.call(e,s[d],d,s)+"",(f=m.get(x))?(r[d]=f,f.__data__=s[d],m.delete(x)):n[d]=new Fd(e,s[d]);for(d=0;d<y;++d)(f=t[d])&&m.get(g[d])===f&&(i[d]=f)}function TL(e){return e.__data__}function zL(e,t){if(!arguments.length)return Array.from(this,TL);var n=t?AL:_L,r=this._parents,i=this._groups;typeof e!="function"&&(e=ML(e));for(var s=i.length,o=new Array(s),d=new Array(s),f=new Array(s),m=0;m<s;++m){var y=r[m],p=i[m],g=p.length,x=DL(e.call(y,y&&y.__data__,m,r)),w=x.length,k=d[m]=new Array(w),j=o[m]=new Array(w),N=f[m]=new Array(g);n(y,p,k,j,N,x,t);for(var _=0,E=0,L,D;_<w;++_)if(L=k[_]){for(_>=E&&(E=_+1);!(D=j[E])&&++E<w;);L._next=D||null}}return o=new ha(o,r),o._enter=d,o._exit=f,o}function DL(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function LL(){return new ha(this._exit||this._groups.map(Ib),this._parents)}function RL(e,t,n){var r=this.enter(),i=this,s=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?s.remove():n(s),r&&i?r.merge(i).order():i}function BL(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,s=r.length,o=Math.min(i,s),d=new Array(i),f=0;f<o;++f)for(var m=n[f],y=r[f],p=m.length,g=d[f]=new Array(p),x,w=0;w<p;++w)(x=m[w]||y[w])&&(g[w]=x);for(;f<i;++f)d[f]=n[f];return new ha(d,this._parents)}function OL(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,s=r[i],o;--i>=0;)(o=r[i])&&(s&&o.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(o,s),s=o);return this}function $L(e){e||(e=HL);function t(p,g){return p&&g?e(p.__data__,g.__data__):!p-!g}for(var n=this._groups,r=n.length,i=new Array(r),s=0;s<r;++s){for(var o=n[s],d=o.length,f=i[s]=new Array(d),m,y=0;y<d;++y)(m=o[y])&&(f[y]=m);f.sort(t)}return new ha(i,this._parents).order()}function HL(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function qL(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function UL(){return Array.from(this)}function IL(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,s=r.length;i<s;++i){var o=r[i];if(o)return o}return null}function PL(){let e=0;for(const t of this)++e;return e}function FL(){return!this.node()}function VL(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],s=0,o=i.length,d;s<o;++s)(d=i[s])&&e.call(d,d.__data__,s,i);return this}function GL(e){return function(){this.removeAttribute(e)}}function YL(e){return function(){this.removeAttributeNS(e.space,e.local)}}function XL(e,t){return function(){this.setAttribute(e,t)}}function KL(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function ZL(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function QL(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function WL(e,t){var n=Ef(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?YL:GL:typeof t=="function"?n.local?QL:ZL:n.local?KL:XL)(n,t))}function Pb(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function JL(e){return function(){this.style.removeProperty(e)}}function eR(e,t,n){return function(){this.style.setProperty(e,t,n)}}function tR(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function nR(e,t,n){return arguments.length>1?this.each((t==null?JL:typeof t=="function"?tR:eR)(e,t,n??"")):Io(this.node(),e)}function Io(e,t){return e.style.getPropertyValue(t)||Pb(e).getComputedStyle(e,null).getPropertyValue(t)}function rR(e){return function(){delete this[e]}}function aR(e,t){return function(){this[e]=t}}function iR(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function lR(e,t){return arguments.length>1?this.each((t==null?rR:typeof t=="function"?iR:aR)(e,t)):this.node()[e]}function Fb(e){return e.trim().split(/^|\s+/)}function Tg(e){return e.classList||new Vb(e)}function Vb(e){this._node=e,this._names=Fb(e.getAttribute("class")||"")}Vb.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Gb(e,t){for(var n=Tg(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function Yb(e,t){for(var n=Tg(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function sR(e){return function(){Gb(this,e)}}function oR(e){return function(){Yb(this,e)}}function uR(e,t){return function(){(t.apply(this,arguments)?Gb:Yb)(this,e)}}function cR(e,t){var n=Fb(e+"");if(arguments.length<2){for(var r=Tg(this.node()),i=-1,s=n.length;++i<s;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?uR:t?sR:oR)(n,t))}function dR(){this.textContent=""}function fR(e){return function(){this.textContent=e}}function hR(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function mR(e){return arguments.length?this.each(e==null?dR:(typeof e=="function"?hR:fR)(e)):this.node().textContent}function pR(){this.innerHTML=""}function gR(e){return function(){this.innerHTML=e}}function yR(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function vR(e){return arguments.length?this.each(e==null?pR:(typeof e=="function"?yR:gR)(e)):this.node().innerHTML}function xR(){this.nextSibling&&this.parentNode.appendChild(this)}function bR(){return this.each(xR)}function wR(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function SR(){return this.each(wR)}function kR(e){var t=typeof e=="function"?e:$b(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function NR(){return null}function jR(e,t){var n=typeof e=="function"?e:$b(e),r=t==null?NR:typeof t=="function"?t:Ag(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function CR(){var e=this.parentNode;e&&e.removeChild(this)}function ER(){return this.each(CR)}function MR(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function _R(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function AR(e){return this.select(e?_R:MR)}function TR(e){return arguments.length?this.property("__data__",e):this.node().__data__}function zR(e){return function(t){e.call(this,t,this.__data__)}}function DR(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function LR(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,s;n<i;++n)s=t[n],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++r]=s;++r?t.length=r:delete this.__on}}}function RR(e,t,n){return function(){var r=this.__on,i,s=zR(t);if(r){for(var o=0,d=r.length;o<d;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=n),i.value=t;return}}this.addEventListener(e.type,s,n),i={type:e.type,name:e.name,value:t,listener:s,options:n},r?r.push(i):this.__on=[i]}}function BR(e,t,n){var r=DR(e+""),i,s=r.length,o;if(arguments.length<2){var d=this.node().__on;if(d){for(var f=0,m=d.length,y;f<m;++f)for(i=0,y=d[f];i<s;++i)if((o=r[i]).type===y.type&&o.name===y.name)return y.value}return}for(d=t?RR:LR,i=0;i<s;++i)this.each(d(r[i],t,n));return this}function Xb(e,t,n){var r=Pb(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function OR(e,t){return function(){return Xb(this,e,t)}}function $R(e,t){return function(){return Xb(this,e,t.apply(this,arguments))}}function HR(e,t){return this.each((typeof t=="function"?$R:OR)(e,t))}function*qR(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,s=r.length,o;i<s;++i)(o=r[i])&&(yield o)}var Kb=[null];function ha(e,t){this._groups=e,this._parents=t}function Bc(){return new ha([[document.documentElement]],Kb)}function UR(){return this}ha.prototype=Bc.prototype={constructor:ha,select:hL,selectAll:yL,selectChild:wL,selectChildren:jL,filter:CL,data:zL,enter:EL,exit:LL,join:RL,merge:BL,selection:UR,order:OL,sort:$L,call:qL,nodes:UL,node:IL,size:PL,empty:FL,each:VL,attr:WL,style:nR,property:lR,classed:cR,text:mR,html:vR,raise:bR,lower:SR,append:kR,insert:jR,remove:ER,clone:AR,datum:TR,on:BR,dispatch:HR,[Symbol.iterator]:qR};function ua(e){return typeof e=="string"?new ha([[document.querySelector(e)]],[document.documentElement]):new ha([[e]],Kb)}function IR(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Fa(e,t){if(e=IR(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const PR={passive:!1},pc={capture:!0,passive:!1};function j1(e){e.stopImmediatePropagation()}function Bo(e){e.preventDefault(),e.stopImmediatePropagation()}function Zb(e){var t=e.document.documentElement,n=ua(e).on("dragstart.drag",Bo,pc);"onselectstart"in t?n.on("selectstart.drag",Bo,pc):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Qb(e,t){var n=e.document.documentElement,r=ua(e).on("dragstart.drag",null);t&&(r.on("click.drag",Bo,pc),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const cd=e=>()=>e;function wp(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:s,x:o,y:d,dx:f,dy:m,dispatch:y}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:d,enumerable:!0,configurable:!0},dx:{value:f,enumerable:!0,configurable:!0},dy:{value:m,enumerable:!0,configurable:!0},_:{value:y}})}wp.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function FR(e){return!e.ctrlKey&&!e.button}function VR(){return this.parentNode}function GR(e,t){return t??{x:e.x,y:e.y}}function YR(){return navigator.maxTouchPoints||"ontouchstart"in this}function Wb(){var e=FR,t=VR,n=GR,r=YR,i={},s=Cf("start","drag","end"),o=0,d,f,m,y,p=0;function g(L){L.on("mousedown.drag",x).filter(r).on("touchstart.drag",j).on("touchmove.drag",N,PR).on("touchend.drag touchcancel.drag",_).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function x(L,D){if(!(y||!e.call(this,L,D))){var T=E(this,t.call(this,L,D),L,D,"mouse");T&&(ua(L.view).on("mousemove.drag",w,pc).on("mouseup.drag",k,pc),Zb(L.view),j1(L),m=!1,d=L.clientX,f=L.clientY,T("start",L))}}function w(L){if(Bo(L),!m){var D=L.clientX-d,T=L.clientY-f;m=D*D+T*T>p}i.mouse("drag",L)}function k(L){ua(L.view).on("mousemove.drag mouseup.drag",null),Qb(L.view,m),Bo(L),i.mouse("end",L)}function j(L,D){if(e.call(this,L,D)){var T=L.changedTouches,O=t.call(this,L,D),Z=T.length,V,P;for(V=0;V<Z;++V)(P=E(this,O,L,D,T[V].identifier,T[V]))&&(j1(L),P("start",L,T[V]))}}function N(L){var D=L.changedTouches,T=D.length,O,Z;for(O=0;O<T;++O)(Z=i[D[O].identifier])&&(Bo(L),Z("drag",L,D[O]))}function _(L){var D=L.changedTouches,T=D.length,O,Z;for(y&&clearTimeout(y),y=setTimeout(function(){y=null},500),O=0;O<T;++O)(Z=i[D[O].identifier])&&(j1(L),Z("end",L,D[O]))}function E(L,D,T,O,Z,V){var P=s.copy(),K=Fa(V||T,D),X,le,F;if((F=n.call(L,new wp("beforestart",{sourceEvent:T,target:g,identifier:Z,active:o,x:K[0],y:K[1],dx:0,dy:0,dispatch:P}),O))!=null)return X=F.x-K[0]||0,le=F.y-K[1]||0,function Y(q,Q,ee){var ne=K,R;switch(q){case"start":i[Z]=Y,R=o++;break;case"end":delete i[Z],--o;case"drag":K=Fa(ee||Q,D),R=o;break}P.call(q,L,new wp(q,{sourceEvent:Q,subject:F,target:g,identifier:Z,active:R,x:K[0]+X,y:K[1]+le,dx:K[0]-ne[0],dy:K[1]-ne[1],dispatch:P}),O)}}return g.filter=function(L){return arguments.length?(e=typeof L=="function"?L:cd(!!L),g):e},g.container=function(L){return arguments.length?(t=typeof L=="function"?L:cd(L),g):t},g.subject=function(L){return arguments.length?(n=typeof L=="function"?L:cd(L),g):n},g.touchable=function(L){return arguments.length?(r=typeof L=="function"?L:cd(!!L),g):r},g.on=function(){var L=s.on.apply(s,arguments);return L===s?g:L},g.clickDistance=function(L){return arguments.length?(p=(L=+L)*L,g):Math.sqrt(p)},g}function zg(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Jb(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Oc(){}var gc=.7,Vd=1/gc,Oo="\\s*([+-]?\\d+)\\s*",yc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",vi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",XR=/^#([0-9a-f]{3,8})$/,KR=new RegExp(`^rgb\\(${Oo},${Oo},${Oo}\\)$`),ZR=new RegExp(`^rgb\\(${vi},${vi},${vi}\\)$`),QR=new RegExp(`^rgba\\(${Oo},${Oo},${Oo},${yc}\\)$`),WR=new RegExp(`^rgba\\(${vi},${vi},${vi},${yc}\\)$`),JR=new RegExp(`^hsl\\(${yc},${vi},${vi}\\)$`),eB=new RegExp(`^hsla\\(${yc},${vi},${vi},${yc}\\)$`),Mx={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};zg(Oc,Rs,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:_x,formatHex:_x,formatHex8:tB,formatHsl:nB,formatRgb:Ax,toString:Ax});function _x(){return this.rgb().formatHex()}function tB(){return this.rgb().formatHex8()}function nB(){return e8(this).formatHsl()}function Ax(){return this.rgb().formatRgb()}function Rs(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=XR.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Tx(t):n===3?new Yr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?dd(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?dd(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=KR.exec(e))?new Yr(t[1],t[2],t[3],1):(t=ZR.exec(e))?new Yr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=QR.exec(e))?dd(t[1],t[2],t[3],t[4]):(t=WR.exec(e))?dd(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=JR.exec(e))?Lx(t[1],t[2]/100,t[3]/100,1):(t=eB.exec(e))?Lx(t[1],t[2]/100,t[3]/100,t[4]):Mx.hasOwnProperty(e)?Tx(Mx[e]):e==="transparent"?new Yr(NaN,NaN,NaN,0):null}function Tx(e){return new Yr(e>>16&255,e>>8&255,e&255,1)}function dd(e,t,n,r){return r<=0&&(e=t=n=NaN),new Yr(e,t,n,r)}function rB(e){return e instanceof Oc||(e=Rs(e)),e?(e=e.rgb(),new Yr(e.r,e.g,e.b,e.opacity)):new Yr}function Sp(e,t,n,r){return arguments.length===1?rB(e):new Yr(e,t,n,r??1)}function Yr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}zg(Yr,Sp,Jb(Oc,{brighter(e){return e=e==null?Vd:Math.pow(Vd,e),new Yr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?gc:Math.pow(gc,e),new Yr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Yr(zs(this.r),zs(this.g),zs(this.b),Gd(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:zx,formatHex:zx,formatHex8:aB,formatRgb:Dx,toString:Dx}));function zx(){return`#${Ts(this.r)}${Ts(this.g)}${Ts(this.b)}`}function aB(){return`#${Ts(this.r)}${Ts(this.g)}${Ts(this.b)}${Ts((isNaN(this.opacity)?1:this.opacity)*255)}`}function Dx(){const e=Gd(this.opacity);return`${e===1?"rgb(":"rgba("}${zs(this.r)}, ${zs(this.g)}, ${zs(this.b)}${e===1?")":`, ${e})`}`}function Gd(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function zs(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ts(e){return e=zs(e),(e<16?"0":"")+e.toString(16)}function Lx(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Va(e,t,n,r)}function e8(e){if(e instanceof Va)return new Va(e.h,e.s,e.l,e.opacity);if(e instanceof Oc||(e=Rs(e)),!e)return new Va;if(e instanceof Va)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),s=Math.max(t,n,r),o=NaN,d=s-i,f=(s+i)/2;return d?(t===s?o=(n-r)/d+(n<r)*6:n===s?o=(r-t)/d+2:o=(t-n)/d+4,d/=f<.5?s+i:2-s-i,o*=60):d=f>0&&f<1?0:o,new Va(o,d,f,e.opacity)}function iB(e,t,n,r){return arguments.length===1?e8(e):new Va(e,t,n,r??1)}function Va(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}zg(Va,iB,Jb(Oc,{brighter(e){return e=e==null?Vd:Math.pow(Vd,e),new Va(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?gc:Math.pow(gc,e),new Va(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Yr(C1(e>=240?e-240:e+120,i,r),C1(e,i,r),C1(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Va(Rx(this.h),fd(this.s),fd(this.l),Gd(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Gd(this.opacity);return`${e===1?"hsl(":"hsla("}${Rx(this.h)}, ${fd(this.s)*100}%, ${fd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Rx(e){return e=(e||0)%360,e<0?e+360:e}function fd(e){return Math.max(0,Math.min(1,e||0))}function C1(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Dg=e=>()=>e;function lB(e,t){return function(n){return e+n*t}}function sB(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function oB(e){return(e=+e)==1?t8:function(t,n){return n-t?sB(t,n,e):Dg(isNaN(t)?n:t)}}function t8(e,t){var n=t-e;return n?lB(e,n):Dg(isNaN(e)?t:e)}const Yd=(function e(t){var n=oB(t);function r(i,s){var o=n((i=Sp(i)).r,(s=Sp(s)).r),d=n(i.g,s.g),f=n(i.b,s.b),m=t8(i.opacity,s.opacity);return function(y){return i.r=o(y),i.g=d(y),i.b=f(y),i.opacity=m(y),i+""}}return r.gamma=e,r})(1);function uB(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(s){for(i=0;i<n;++i)r[i]=e[i]*(1-s)+t[i]*s;return r}}function cB(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function dB(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),s=new Array(n),o;for(o=0;o<r;++o)i[o]=sc(e[o],t[o]);for(;o<n;++o)s[o]=t[o];return function(d){for(o=0;o<r;++o)s[o]=i[o](d);return s}}function fB(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function di(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function hB(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=sc(e[i],t[i]):r[i]=t[i];return function(s){for(i in n)r[i]=n[i](s);return r}}var kp=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,E1=new RegExp(kp.source,"g");function mB(e){return function(){return e}}function pB(e){return function(t){return e(t)+""}}function n8(e,t){var n=kp.lastIndex=E1.lastIndex=0,r,i,s,o=-1,d=[],f=[];for(e=e+"",t=t+"";(r=kp.exec(e))&&(i=E1.exec(t));)(s=i.index)>n&&(s=t.slice(n,s),d[o]?d[o]+=s:d[++o]=s),(r=r[0])===(i=i[0])?d[o]?d[o]+=i:d[++o]=i:(d[++o]=null,f.push({i:o,x:di(r,i)})),n=E1.lastIndex;return n<t.length&&(s=t.slice(n),d[o]?d[o]+=s:d[++o]=s),d.length<2?f[0]?pB(f[0].x):mB(t):(t=f.length,function(m){for(var y=0,p;y<t;++y)d[(p=f[y]).i]=p.x(m);return d.join("")})}function sc(e,t){var n=typeof t,r;return t==null||n==="boolean"?Dg(t):(n==="number"?di:n==="string"?(r=Rs(t))?(t=r,Yd):n8:t instanceof Rs?Yd:t instanceof Date?fB:cB(t)?uB:Array.isArray(t)?dB:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?hB:di)(e,t)}var Bx=180/Math.PI,Np={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function r8(e,t,n,r,i,s){var o,d,f;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(f=e*n+t*r)&&(n-=e*f,r-=t*f),(d=Math.sqrt(n*n+r*r))&&(n/=d,r/=d,f/=d),e*r<t*n&&(e=-e,t=-t,f=-f,o=-o),{translateX:i,translateY:s,rotate:Math.atan2(t,e)*Bx,skewX:Math.atan(f)*Bx,scaleX:o,scaleY:d}}var hd;function gB(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Np:r8(t.a,t.b,t.c,t.d,t.e,t.f)}function yB(e){return e==null||(hd||(hd=document.createElementNS("http://www.w3.org/2000/svg","g")),hd.setAttribute("transform",e),!(e=hd.transform.baseVal.consolidate()))?Np:(e=e.matrix,r8(e.a,e.b,e.c,e.d,e.e,e.f))}function a8(e,t,n,r){function i(m){return m.length?m.pop()+" ":""}function s(m,y,p,g,x,w){if(m!==p||y!==g){var k=x.push("translate(",null,t,null,n);w.push({i:k-4,x:di(m,p)},{i:k-2,x:di(y,g)})}else(p||g)&&x.push("translate("+p+t+g+n)}function o(m,y,p,g){m!==y?(m-y>180?y+=360:y-m>180&&(m+=360),g.push({i:p.push(i(p)+"rotate(",null,r)-2,x:di(m,y)})):y&&p.push(i(p)+"rotate("+y+r)}function d(m,y,p,g){m!==y?g.push({i:p.push(i(p)+"skewX(",null,r)-2,x:di(m,y)}):y&&p.push(i(p)+"skewX("+y+r)}function f(m,y,p,g,x,w){if(m!==p||y!==g){var k=x.push(i(x)+"scale(",null,",",null,")");w.push({i:k-4,x:di(m,p)},{i:k-2,x:di(y,g)})}else(p!==1||g!==1)&&x.push(i(x)+"scale("+p+","+g+")")}return function(m,y){var p=[],g=[];return m=e(m),y=e(y),s(m.translateX,m.translateY,y.translateX,y.translateY,p,g),o(m.rotate,y.rotate,p,g),d(m.skewX,y.skewX,p,g),f(m.scaleX,m.scaleY,y.scaleX,y.scaleY,p,g),m=y=null,function(x){for(var w=-1,k=g.length,j;++w<k;)p[(j=g[w]).i]=j.x(x);return p.join("")}}}var vB=a8(gB,"px, ","px)","deg)"),xB=a8(yB,", ",")",")"),bB=1e-12;function Ox(e){return((e=Math.exp(e))+1/e)/2}function wB(e){return((e=Math.exp(e))-1/e)/2}function SB(e){return((e=Math.exp(2*e))-1)/(e+1)}const Md=(function e(t,n,r){function i(s,o){var d=s[0],f=s[1],m=s[2],y=o[0],p=o[1],g=o[2],x=y-d,w=p-f,k=x*x+w*w,j,N;if(k<bB)N=Math.log(g/m)/t,j=function(O){return[d+O*x,f+O*w,m*Math.exp(t*O*N)]};else{var _=Math.sqrt(k),E=(g*g-m*m+r*k)/(2*m*n*_),L=(g*g-m*m-r*k)/(2*g*n*_),D=Math.log(Math.sqrt(E*E+1)-E),T=Math.log(Math.sqrt(L*L+1)-L);N=(T-D)/t,j=function(O){var Z=O*N,V=Ox(D),P=m/(n*_)*(V*SB(t*Z+D)-wB(D));return[d+P*x,f+P*w,m*V/Ox(t*Z+D)]}}return j.duration=N*1e3*t/Math.SQRT2,j}return i.rho=function(s){var o=Math.max(.001,+s),d=o*o,f=d*d;return e(o,d,f)},i})(Math.SQRT2,2,4);var Po=0,tc=0,Qu=0,i8=1e3,Xd,nc,Kd=0,Bs=0,Mf=0,vc=typeof performance=="object"&&performance.now?performance:Date,l8=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Lg(){return Bs||(l8(kB),Bs=vc.now()+Mf)}function kB(){Bs=0}function Zd(){this._call=this._time=this._next=null}Zd.prototype=s8.prototype={constructor:Zd,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Lg():+n)+(t==null?0:+t),!this._next&&nc!==this&&(nc?nc._next=this:Xd=this,nc=this),this._call=e,this._time=n,jp()},stop:function(){this._call&&(this._call=null,this._time=1/0,jp())}};function s8(e,t,n){var r=new Zd;return r.restart(e,t,n),r}function NB(){Lg(),++Po;for(var e=Xd,t;e;)(t=Bs-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Po}function $x(){Bs=(Kd=vc.now())+Mf,Po=tc=0;try{NB()}finally{Po=0,CB(),Bs=0}}function jB(){var e=vc.now(),t=e-Kd;t>i8&&(Mf-=t,Kd=e)}function CB(){for(var e,t=Xd,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Xd=n);nc=e,jp(r)}function jp(e){if(!Po){tc&&(tc=clearTimeout(tc));var t=e-Bs;t>24?(e<1/0&&(tc=setTimeout($x,e-vc.now()-Mf)),Qu&&(Qu=clearInterval(Qu))):(Qu||(Kd=vc.now(),Qu=setInterval(jB,i8)),Po=1,l8($x))}}function Hx(e,t,n){var r=new Zd;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var EB=Cf("start","end","cancel","interrupt"),MB=[],o8=0,qx=1,Cp=2,_d=3,Ux=4,Ep=5,Ad=6;function _f(e,t,n,r,i,s){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;_B(e,n,{name:t,index:r,group:i,on:EB,tween:MB,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:o8})}function Rg(e,t){var n=Ka(e,t);if(n.state>o8)throw new Error("too late; already scheduled");return n}function Ei(e,t){var n=Ka(e,t);if(n.state>_d)throw new Error("too late; already running");return n}function Ka(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function _B(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=s8(s,0,n.time);function s(m){n.state=qx,n.timer.restart(o,n.delay,n.time),n.delay<=m&&o(m-n.delay)}function o(m){var y,p,g,x;if(n.state!==qx)return f();for(y in r)if(x=r[y],x.name===n.name){if(x.state===_d)return Hx(o);x.state===Ux?(x.state=Ad,x.timer.stop(),x.on.call("interrupt",e,e.__data__,x.index,x.group),delete r[y]):+y<t&&(x.state=Ad,x.timer.stop(),x.on.call("cancel",e,e.__data__,x.index,x.group),delete r[y])}if(Hx(function(){n.state===_d&&(n.state=Ux,n.timer.restart(d,n.delay,n.time),d(m))}),n.state=Cp,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Cp){for(n.state=_d,i=new Array(g=n.tween.length),y=0,p=-1;y<g;++y)(x=n.tween[y].value.call(e,e.__data__,n.index,n.group))&&(i[++p]=x);i.length=p+1}}function d(m){for(var y=m<n.duration?n.ease.call(null,m/n.duration):(n.timer.restart(f),n.state=Ep,1),p=-1,g=i.length;++p<g;)i[p].call(e,y);n.state===Ep&&(n.on.call("end",e,e.__data__,n.index,n.group),f())}function f(){n.state=Ad,n.timer.stop(),delete r[t];for(var m in r)return;delete e.__transition}}function Td(e,t){var n=e.__transition,r,i,s=!0,o;if(n){t=t==null?null:t+"";for(o in n){if((r=n[o]).name!==t){s=!1;continue}i=r.state>Cp&&r.state<Ep,r.state=Ad,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[o]}s&&delete e.__transition}}function AB(e){return this.each(function(){Td(this,e)})}function TB(e,t){var n,r;return function(){var i=Ei(this,e),s=i.tween;if(s!==n){r=n=s;for(var o=0,d=r.length;o<d;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function zB(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var s=Ei(this,e),o=s.tween;if(o!==r){i=(r=o).slice();for(var d={name:t,value:n},f=0,m=i.length;f<m;++f)if(i[f].name===t){i[f]=d;break}f===m&&i.push(d)}s.tween=i}}function DB(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Ka(this.node(),n).tween,i=0,s=r.length,o;i<s;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?TB:zB)(n,e,t))}function Bg(e,t,n){var r=e._id;return e.each(function(){var i=Ei(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Ka(i,r).value[t]}}function u8(e,t){var n;return(typeof t=="number"?di:t instanceof Rs?Yd:(n=Rs(t))?(t=n,Yd):n8)(e,t)}function LB(e){return function(){this.removeAttribute(e)}}function RB(e){return function(){this.removeAttributeNS(e.space,e.local)}}function BB(e,t,n){var r,i=n+"",s;return function(){var o=this.getAttribute(e);return o===i?null:o===r?s:s=t(r=o,n)}}function OB(e,t,n){var r,i=n+"",s;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?s:s=t(r=o,n)}}function $B(e,t,n){var r,i,s;return function(){var o,d=n(this),f;return d==null?void this.removeAttribute(e):(o=this.getAttribute(e),f=d+"",o===f?null:o===r&&f===i?s:(i=f,s=t(r=o,d)))}}function HB(e,t,n){var r,i,s;return function(){var o,d=n(this),f;return d==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),f=d+"",o===f?null:o===r&&f===i?s:(i=f,s=t(r=o,d)))}}function qB(e,t){var n=Ef(e),r=n==="transform"?xB:u8;return this.attrTween(e,typeof t=="function"?(n.local?HB:$B)(n,r,Bg(this,"attr."+e,t)):t==null?(n.local?RB:LB)(n):(n.local?OB:BB)(n,r,t))}function UB(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function IB(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function PB(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&IB(e,s)),n}return i._value=t,i}function FB(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&UB(e,s)),n}return i._value=t,i}function VB(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=Ef(e);return this.tween(n,(r.local?PB:FB)(r,t))}function GB(e,t){return function(){Rg(this,e).delay=+t.apply(this,arguments)}}function YB(e,t){return t=+t,function(){Rg(this,e).delay=t}}function XB(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?GB:YB)(t,e)):Ka(this.node(),t).delay}function KB(e,t){return function(){Ei(this,e).duration=+t.apply(this,arguments)}}function ZB(e,t){return t=+t,function(){Ei(this,e).duration=t}}function QB(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?KB:ZB)(t,e)):Ka(this.node(),t).duration}function WB(e,t){if(typeof t!="function")throw new Error;return function(){Ei(this,e).ease=t}}function JB(e){var t=this._id;return arguments.length?this.each(WB(t,e)):Ka(this.node(),t).ease}function eO(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Ei(this,e).ease=n}}function tO(e){if(typeof e!="function")throw new Error;return this.each(eO(this._id,e))}function nO(e){typeof e!="function"&&(e=qb(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],o=s.length,d=r[i]=[],f,m=0;m<o;++m)(f=s[m])&&e.call(f,f.__data__,m,s)&&d.push(f);return new nl(r,this._parents,this._name,this._id)}function rO(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,s=Math.min(r,i),o=new Array(r),d=0;d<s;++d)for(var f=t[d],m=n[d],y=f.length,p=o[d]=new Array(y),g,x=0;x<y;++x)(g=f[x]||m[x])&&(p[x]=g);for(;d<r;++d)o[d]=t[d];return new nl(o,this._parents,this._name,this._id)}function aO(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function iO(e,t,n){var r,i,s=aO(t)?Rg:Ei;return function(){var o=s(this,e),d=o.on;d!==r&&(i=(r=d).copy()).on(t,n),o.on=i}}function lO(e,t){var n=this._id;return arguments.length<2?Ka(this.node(),n).on.on(e):this.each(iO(n,e,t))}function sO(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function oO(){return this.on("end.remove",sO(this._id))}function uO(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Ag(e));for(var r=this._groups,i=r.length,s=new Array(i),o=0;o<i;++o)for(var d=r[o],f=d.length,m=s[o]=new Array(f),y,p,g=0;g<f;++g)(y=d[g])&&(p=e.call(y,y.__data__,g,d))&&("__data__"in y&&(p.__data__=y.__data__),m[g]=p,_f(m[g],t,n,g,m,Ka(y,n)));return new nl(s,this._parents,t,n)}function cO(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Hb(e));for(var r=this._groups,i=r.length,s=[],o=[],d=0;d<i;++d)for(var f=r[d],m=f.length,y,p=0;p<m;++p)if(y=f[p]){for(var g=e.call(y,y.__data__,p,f),x,w=Ka(y,n),k=0,j=g.length;k<j;++k)(x=g[k])&&_f(x,t,n,k,g,w);s.push(g),o.push(y)}return new nl(s,o,t,n)}var dO=Bc.prototype.constructor;function fO(){return new dO(this._groups,this._parents)}function hO(e,t){var n,r,i;return function(){var s=Io(this,e),o=(this.style.removeProperty(e),Io(this,e));return s===o?null:s===n&&o===r?i:i=t(n=s,r=o)}}function c8(e){return function(){this.style.removeProperty(e)}}function mO(e,t,n){var r,i=n+"",s;return function(){var o=Io(this,e);return o===i?null:o===r?s:s=t(r=o,n)}}function pO(e,t,n){var r,i,s;return function(){var o=Io(this,e),d=n(this),f=d+"";return d==null&&(f=d=(this.style.removeProperty(e),Io(this,e))),o===f?null:o===r&&f===i?s:(i=f,s=t(r=o,d))}}function gO(e,t){var n,r,i,s="style."+t,o="end."+s,d;return function(){var f=Ei(this,e),m=f.on,y=f.value[s]==null?d||(d=c8(t)):void 0;(m!==n||i!==y)&&(r=(n=m).copy()).on(o,i=y),f.on=r}}function yO(e,t,n){var r=(e+="")=="transform"?vB:u8;return t==null?this.styleTween(e,hO(e,r)).on("end.style."+e,c8(e)):typeof t=="function"?this.styleTween(e,pO(e,r,Bg(this,"style."+e,t))).each(gO(this._id,e)):this.styleTween(e,mO(e,r,t),n).on("end.style."+e,null)}function vO(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function xO(e,t,n){var r,i;function s(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&vO(e,o,n)),r}return s._value=t,s}function bO(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,xO(e,t,n??""))}function wO(e){return function(){this.textContent=e}}function SO(e){return function(){var t=e(this);this.textContent=t??""}}function kO(e){return this.tween("text",typeof e=="function"?SO(Bg(this,"text",e)):wO(e==null?"":e+""))}function NO(e){return function(t){this.textContent=e.call(this,t)}}function jO(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&NO(i)),t}return r._value=e,r}function CO(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,jO(e))}function EO(){for(var e=this._name,t=this._id,n=d8(),r=this._groups,i=r.length,s=0;s<i;++s)for(var o=r[s],d=o.length,f,m=0;m<d;++m)if(f=o[m]){var y=Ka(f,t);_f(f,e,n,m,o,{time:y.time+y.delay+y.duration,delay:0,duration:y.duration,ease:y.ease})}return new nl(r,this._parents,e,n)}function MO(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(s,o){var d={value:o},f={value:function(){--i===0&&s()}};n.each(function(){var m=Ei(this,r),y=m.on;y!==e&&(t=(e=y).copy(),t._.cancel.push(d),t._.interrupt.push(d),t._.end.push(f)),m.on=t}),i===0&&s()})}var _O=0;function nl(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function d8(){return++_O}var Xi=Bc.prototype;nl.prototype={constructor:nl,select:uO,selectAll:cO,selectChild:Xi.selectChild,selectChildren:Xi.selectChildren,filter:nO,merge:rO,selection:fO,transition:EO,call:Xi.call,nodes:Xi.nodes,node:Xi.node,size:Xi.size,empty:Xi.empty,each:Xi.each,on:lO,attr:qB,attrTween:VB,style:yO,styleTween:bO,text:kO,textTween:CO,remove:oO,tween:DB,delay:XB,duration:QB,ease:JB,easeVarying:tO,end:MO,[Symbol.iterator]:Xi[Symbol.iterator]};function AO(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var TO={time:null,delay:0,duration:250,ease:AO};function zO(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function DO(e){var t,n;e instanceof nl?(t=e._id,e=e._name):(t=d8(),(n=TO).time=Lg(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,s=0;s<i;++s)for(var o=r[s],d=o.length,f,m=0;m<d;++m)(f=o[m])&&_f(f,e,t,m,o,n||zO(f,t));return new nl(r,this._parents,e,t)}Bc.prototype.interrupt=AB;Bc.prototype.transition=DO;const md=e=>()=>e;function LO(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Qi(e,t,n){this.k=e,this.x=t,this.y=n}Qi.prototype={constructor:Qi,scale:function(e){return e===1?this:new Qi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Qi(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Af=new Qi(1,0,0);f8.prototype=Qi.prototype;function f8(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Af;return e.__zoom}function M1(e){e.stopImmediatePropagation()}function Wu(e){e.preventDefault(),e.stopImmediatePropagation()}function RO(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function BO(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Ix(){return this.__zoom||Af}function OO(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function $O(){return navigator.maxTouchPoints||"ontouchstart"in this}function HO(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],s=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>s?(s+o)/2:Math.min(0,s)||Math.max(0,o))}function h8(){var e=RO,t=BO,n=HO,r=OO,i=$O,s=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],d=250,f=Md,m=Cf("start","zoom","end"),y,p,g,x=500,w=150,k=0,j=10;function N(F){F.property("__zoom",Ix).on("wheel.zoom",Z,{passive:!1}).on("mousedown.zoom",V).on("dblclick.zoom",P).filter(i).on("touchstart.zoom",K).on("touchmove.zoom",X).on("touchend.zoom touchcancel.zoom",le).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}N.transform=function(F,Y,q,Q){var ee=F.selection?F.selection():F;ee.property("__zoom",Ix),F!==ee?D(F,Y,q,Q):ee.interrupt().each(function(){T(this,arguments).event(Q).start().zoom(null,typeof Y=="function"?Y.apply(this,arguments):Y).end()})},N.scaleBy=function(F,Y,q,Q){N.scaleTo(F,function(){var ee=this.__zoom.k,ne=typeof Y=="function"?Y.apply(this,arguments):Y;return ee*ne},q,Q)},N.scaleTo=function(F,Y,q,Q){N.transform(F,function(){var ee=t.apply(this,arguments),ne=this.__zoom,R=q==null?L(ee):typeof q=="function"?q.apply(this,arguments):q,H=ne.invert(R),W=typeof Y=="function"?Y.apply(this,arguments):Y;return n(E(_(ne,W),R,H),ee,o)},q,Q)},N.translateBy=function(F,Y,q,Q){N.transform(F,function(){return n(this.__zoom.translate(typeof Y=="function"?Y.apply(this,arguments):Y,typeof q=="function"?q.apply(this,arguments):q),t.apply(this,arguments),o)},null,Q)},N.translateTo=function(F,Y,q,Q,ee){N.transform(F,function(){var ne=t.apply(this,arguments),R=this.__zoom,H=Q==null?L(ne):typeof Q=="function"?Q.apply(this,arguments):Q;return n(Af.translate(H[0],H[1]).scale(R.k).translate(typeof Y=="function"?-Y.apply(this,arguments):-Y,typeof q=="function"?-q.apply(this,arguments):-q),ne,o)},Q,ee)};function _(F,Y){return Y=Math.max(s[0],Math.min(s[1],Y)),Y===F.k?F:new Qi(Y,F.x,F.y)}function E(F,Y,q){var Q=Y[0]-q[0]*F.k,ee=Y[1]-q[1]*F.k;return Q===F.x&&ee===F.y?F:new Qi(F.k,Q,ee)}function L(F){return[(+F[0][0]+ +F[1][0])/2,(+F[0][1]+ +F[1][1])/2]}function D(F,Y,q,Q){F.on("start.zoom",function(){T(this,arguments).event(Q).start()}).on("interrupt.zoom end.zoom",function(){T(this,arguments).event(Q).end()}).tween("zoom",function(){var ee=this,ne=arguments,R=T(ee,ne).event(Q),H=t.apply(ee,ne),W=q==null?L(H):typeof q=="function"?q.apply(ee,ne):q,B=Math.max(H[1][0]-H[0][0],H[1][1]-H[0][1]),ce=ee.__zoom,pe=typeof Y=="function"?Y.apply(ee,ne):Y,xe=f(ce.invert(W).concat(B/ce.k),pe.invert(W).concat(B/pe.k));return function(be){if(be===1)be=pe;else{var ye=xe(be),Ce=B/ye[2];be=new Qi(Ce,W[0]-ye[0]*Ce,W[1]-ye[1]*Ce)}R.zoom(null,be)}})}function T(F,Y,q){return!q&&F.__zooming||new O(F,Y)}function O(F,Y){this.that=F,this.args=Y,this.active=0,this.sourceEvent=null,this.extent=t.apply(F,Y),this.taps=0}O.prototype={event:function(F){return F&&(this.sourceEvent=F),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(F,Y){return this.mouse&&F!=="mouse"&&(this.mouse[1]=Y.invert(this.mouse[0])),this.touch0&&F!=="touch"&&(this.touch0[1]=Y.invert(this.touch0[0])),this.touch1&&F!=="touch"&&(this.touch1[1]=Y.invert(this.touch1[0])),this.that.__zoom=Y,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(F){var Y=ua(this.that).datum();m.call(F,this.that,new LO(F,{sourceEvent:this.sourceEvent,target:N,transform:this.that.__zoom,dispatch:m}),Y)}};function Z(F,...Y){if(!e.apply(this,arguments))return;var q=T(this,Y).event(F),Q=this.__zoom,ee=Math.max(s[0],Math.min(s[1],Q.k*Math.pow(2,r.apply(this,arguments)))),ne=Fa(F);if(q.wheel)(q.mouse[0][0]!==ne[0]||q.mouse[0][1]!==ne[1])&&(q.mouse[1]=Q.invert(q.mouse[0]=ne)),clearTimeout(q.wheel);else{if(Q.k===ee)return;q.mouse=[ne,Q.invert(ne)],Td(this),q.start()}Wu(F),q.wheel=setTimeout(R,w),q.zoom("mouse",n(E(_(Q,ee),q.mouse[0],q.mouse[1]),q.extent,o));function R(){q.wheel=null,q.end()}}function V(F,...Y){if(g||!e.apply(this,arguments))return;var q=F.currentTarget,Q=T(this,Y,!0).event(F),ee=ua(F.view).on("mousemove.zoom",W,!0).on("mouseup.zoom",B,!0),ne=Fa(F,q),R=F.clientX,H=F.clientY;Zb(F.view),M1(F),Q.mouse=[ne,this.__zoom.invert(ne)],Td(this),Q.start();function W(ce){if(Wu(ce),!Q.moved){var pe=ce.clientX-R,xe=ce.clientY-H;Q.moved=pe*pe+xe*xe>k}Q.event(ce).zoom("mouse",n(E(Q.that.__zoom,Q.mouse[0]=Fa(ce,q),Q.mouse[1]),Q.extent,o))}function B(ce){ee.on("mousemove.zoom mouseup.zoom",null),Qb(ce.view,Q.moved),Wu(ce),Q.event(ce).end()}}function P(F,...Y){if(e.apply(this,arguments)){var q=this.__zoom,Q=Fa(F.changedTouches?F.changedTouches[0]:F,this),ee=q.invert(Q),ne=q.k*(F.shiftKey?.5:2),R=n(E(_(q,ne),Q,ee),t.apply(this,Y),o);Wu(F),d>0?ua(this).transition().duration(d).call(D,R,Q,F):ua(this).call(N.transform,R,Q,F)}}function K(F,...Y){if(e.apply(this,arguments)){var q=F.touches,Q=q.length,ee=T(this,Y,F.changedTouches.length===Q).event(F),ne,R,H,W;for(M1(F),R=0;R<Q;++R)H=q[R],W=Fa(H,this),W=[W,this.__zoom.invert(W),H.identifier],ee.touch0?!ee.touch1&&ee.touch0[2]!==W[2]&&(ee.touch1=W,ee.taps=0):(ee.touch0=W,ne=!0,ee.taps=1+!!y);y&&(y=clearTimeout(y)),ne&&(ee.taps<2&&(p=W[0],y=setTimeout(function(){y=null},x)),Td(this),ee.start())}}function X(F,...Y){if(this.__zooming){var q=T(this,Y).event(F),Q=F.changedTouches,ee=Q.length,ne,R,H,W;for(Wu(F),ne=0;ne<ee;++ne)R=Q[ne],H=Fa(R,this),q.touch0&&q.touch0[2]===R.identifier?q.touch0[0]=H:q.touch1&&q.touch1[2]===R.identifier&&(q.touch1[0]=H);if(R=q.that.__zoom,q.touch1){var B=q.touch0[0],ce=q.touch0[1],pe=q.touch1[0],xe=q.touch1[1],be=(be=pe[0]-B[0])*be+(be=pe[1]-B[1])*be,ye=(ye=xe[0]-ce[0])*ye+(ye=xe[1]-ce[1])*ye;R=_(R,Math.sqrt(be/ye)),H=[(B[0]+pe[0])/2,(B[1]+pe[1])/2],W=[(ce[0]+xe[0])/2,(ce[1]+xe[1])/2]}else if(q.touch0)H=q.touch0[0],W=q.touch0[1];else return;q.zoom("touch",n(E(R,H,W),q.extent,o))}}function le(F,...Y){if(this.__zooming){var q=T(this,Y).event(F),Q=F.changedTouches,ee=Q.length,ne,R;for(M1(F),g&&clearTimeout(g),g=setTimeout(function(){g=null},x),ne=0;ne<ee;++ne)R=Q[ne],q.touch0&&q.touch0[2]===R.identifier?delete q.touch0:q.touch1&&q.touch1[2]===R.identifier&&delete q.touch1;if(q.touch1&&!q.touch0&&(q.touch0=q.touch1,delete q.touch1),q.touch0)q.touch0[1]=this.__zoom.invert(q.touch0[0]);else if(q.end(),q.taps===2&&(R=Fa(R,this),Math.hypot(p[0]-R[0],p[1]-R[1])<j)){var H=ua(this).on("dblclick.zoom");H&&H.apply(this,arguments)}}}return N.wheelDelta=function(F){return arguments.length?(r=typeof F=="function"?F:md(+F),N):r},N.filter=function(F){return arguments.length?(e=typeof F=="function"?F:md(!!F),N):e},N.touchable=function(F){return arguments.length?(i=typeof F=="function"?F:md(!!F),N):i},N.extent=function(F){return arguments.length?(t=typeof F=="function"?F:md([[+F[0][0],+F[0][1]],[+F[1][0],+F[1][1]]]),N):t},N.scaleExtent=function(F){return arguments.length?(s[0]=+F[0],s[1]=+F[1],N):[s[0],s[1]]},N.translateExtent=function(F){return arguments.length?(o[0][0]=+F[0][0],o[1][0]=+F[1][0],o[0][1]=+F[0][1],o[1][1]=+F[1][1],N):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},N.constrain=function(F){return arguments.length?(n=F,N):n},N.duration=function(F){return arguments.length?(d=+F,N):d},N.interpolate=function(F){return arguments.length?(f=F,N):f},N.on=function(){var F=m.on.apply(m,arguments);return F===m?N:F},N.clickDistance=function(F){return arguments.length?(k=(F=+F)*F,N):Math.sqrt(k)},N.tapDistance=function(F){return arguments.length?(j=+F,N):j},N}const bi={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},xc=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],m8=["Enter"," ","Escape"],p8={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Fo;(function(e){e.Strict="strict",e.Loose="loose"})(Fo||(Fo={}));var Ds;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Ds||(Ds={}));var bc;(function(e){e.Partial="partial",e.Full="full"})(bc||(bc={}));const g8={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Yl;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Yl||(Yl={}));var Qd;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Qd||(Qd={}));var Ze;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Ze||(Ze={}));const Px={[Ze.Left]:Ze.Right,[Ze.Right]:Ze.Left,[Ze.Top]:Ze.Bottom,[Ze.Bottom]:Ze.Top};function y8(e){return e===null?null:e?"valid":"invalid"}const v8=e=>"id"in e&&"source"in e&&"target"in e,qO=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Og=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),$c=(e,t=[0,0])=>{const{width:n,height:r}=sl(e),i=e.origin??t,s=n*i[0],o=r*i[1];return{x:e.position.x-s,y:e.position.y-o}},UO=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,i)=>{const s=typeof i=="string";let o=!t.nodeLookup&&!s?i:void 0;t.nodeLookup&&(o=s?t.nodeLookup.get(i):Og(i)?i:t.nodeLookup.get(i.id));const d=o?Wd(o,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Tf(r,d)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return zf(n)},Hc=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(i=>{(t.filter===void 0||t.filter(i))&&(n=Tf(n,Wd(i)),r=!0)}),r?zf(n):{x:0,y:0,width:0,height:0}},$g=(e,t,[n,r,i]=[0,0,1],s=!1,o=!1)=>{const d={...Uc(t,[n,r,i]),width:t.width/i,height:t.height/i},f=[];for(const m of e.values()){const{measured:y,selectable:p=!0,hidden:g=!1}=m;if(o&&!p||g)continue;const x=y.width??m.width??m.initialWidth??null,w=y.height??m.height??m.initialHeight??null,k=wc(d,Go(m)),j=(x??0)*(w??0),N=s&&k>0;(!m.internals.handleBounds||N||k>=j||m.dragging)&&f.push(m)}return f},IO=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function PO(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(i=>i.id)):null;return e.forEach(i=>{i.measured.width&&i.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!i.hidden)&&(!r||r.has(i.id))&&n.set(i.id,i)}),n}async function FO({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:s},o){if(e.size===0)return Promise.resolve(!0);const d=PO(e,o),f=Hc(d),m=Hg(f,t,n,(o==null?void 0:o.minZoom)??i,(o==null?void 0:o.maxZoom)??s,(o==null?void 0:o.padding)??.1);return await r.setViewport(m,{duration:o==null?void 0:o.duration,ease:o==null?void 0:o.ease,interpolate:o==null?void 0:o.interpolate}),Promise.resolve(!0)}function x8({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:s}){const o=n.get(e),d=o.parentId?n.get(o.parentId):void 0,{x:f,y:m}=d?d.internals.positionAbsolute:{x:0,y:0},y=o.origin??r;let p=o.extent||i;if(o.extent==="parent"&&!o.expandParent)if(!d)s==null||s("005",bi.error005());else{const x=d.measured.width,w=d.measured.height;x&&w&&(p=[[f,m],[f+x,m+w]])}else d&&Yo(o.extent)&&(p=[[o.extent[0][0]+f,o.extent[0][1]+m],[o.extent[1][0]+f,o.extent[1][1]+m]]);const g=Yo(p)?Os(t,p,o.measured):t;return(o.measured.width===void 0||o.measured.height===void 0)&&(s==null||s("015",bi.error015())),{position:{x:g.x-f+(o.measured.width??0)*y[0],y:g.y-m+(o.measured.height??0)*y[1]},positionAbsolute:g}}async function VO({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){const s=new Set(e.map(g=>g.id)),o=[];for(const g of n){if(g.deletable===!1)continue;const x=s.has(g.id),w=!x&&g.parentId&&o.find(k=>k.id===g.parentId);(x||w)&&o.push(g)}const d=new Set(t.map(g=>g.id)),f=r.filter(g=>g.deletable!==!1),y=IO(o,f);for(const g of f)d.has(g.id)&&!y.find(w=>w.id===g.id)&&y.push(g);if(!i)return{edges:y,nodes:o};const p=await i({nodes:o,edges:y});return typeof p=="boolean"?p?{edges:y,nodes:o}:{edges:[],nodes:[]}:p}const Vo=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Os=(e={x:0,y:0},t,n)=>({x:Vo(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:Vo(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function b8(e,t,n){const{width:r,height:i}=sl(n),{x:s,y:o}=n.internals.positionAbsolute;return Os(e,[[s,o],[s+r,o+i]],t)}const Fx=(e,t,n)=>e<t?Vo(Math.abs(e-t),1,t)/t:e>n?-Vo(Math.abs(e-n),1,t)/t:0,w8=(e,t,n=15,r=40)=>{const i=Fx(e.x,r,t.width-r)*n,s=Fx(e.y,r,t.height-r)*n;return[i,s]},Tf=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Mp=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),zf=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Go=(e,t=[0,0])=>{var i,s;const{x:n,y:r}=Og(e)?e.internals.positionAbsolute:$c(e,t);return{x:n,y:r,width:((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0,height:((s=e.measured)==null?void 0:s.height)??e.height??e.initialHeight??0}},Wd=(e,t=[0,0])=>{var i,s;const{x:n,y:r}=Og(e)?e.internals.positionAbsolute:$c(e,t);return{x:n,y:r,x2:n+(((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0),y2:r+(((s=e.measured)==null?void 0:s.height)??e.height??e.initialHeight??0)}},S8=(e,t)=>zf(Tf(Mp(e),Mp(t))),wc=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},Vx=e=>Ga(e.width)&&Ga(e.height)&&Ga(e.x)&&Ga(e.y),Ga=e=>!isNaN(e)&&isFinite(e),GO=(e,t)=>{},qc=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Uc=({x:e,y:t},[n,r,i],s=!1,o=[1,1])=>{const d={x:(e-n)/i,y:(t-r)/i};return s?qc(d,o):d},Jd=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r});function So(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function YO(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=So(e,n),i=So(e,t);return{top:r,right:i,bottom:r,left:i,x:i*2,y:r*2}}if(typeof e=="object"){const r=So(e.top??e.y??0,n),i=So(e.bottom??e.y??0,n),s=So(e.left??e.x??0,t),o=So(e.right??e.x??0,t);return{top:r,right:o,bottom:i,left:s,x:s+o,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function XO(e,t,n,r,i,s){const{x:o,y:d}=Jd(e,[t,n,r]),{x:f,y:m}=Jd({x:e.x+e.width,y:e.y+e.height},[t,n,r]),y=i-f,p=s-m;return{left:Math.floor(o),top:Math.floor(d),right:Math.floor(y),bottom:Math.floor(p)}}const Hg=(e,t,n,r,i,s)=>{const o=YO(s,t,n),d=(t-o.x)/e.width,f=(n-o.y)/e.height,m=Math.min(d,f),y=Vo(m,r,i),p=e.x+e.width/2,g=e.y+e.height/2,x=t/2-p*y,w=n/2-g*y,k=XO(e,x,w,y,t,n),j={left:Math.min(k.left-o.left,0),top:Math.min(k.top-o.top,0),right:Math.min(k.right-o.right,0),bottom:Math.min(k.bottom-o.bottom,0)};return{x:x-j.left+j.right,y:w-j.top+j.bottom,zoom:y}},Sc=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Yo(e){return e!=null&&e!=="parent"}function sl(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function k8(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function N8(e,t={width:0,height:0},n,r,i){const s={...e},o=r.get(n);if(o){const d=o.origin||i;s.x+=o.internals.positionAbsolute.x-(t.width??0)*d[0],s.y+=o.internals.positionAbsolute.y-(t.height??0)*d[1]}return s}function Gx(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function KO(){let e,t;return{promise:new Promise((r,i)=>{e=r,t=i}),resolve:e,reject:t}}function ZO(e){return{...p8,...e||{}}}function oc(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){const{x:s,y:o}=Ya(e),d=Uc({x:s-((i==null?void 0:i.left)??0),y:o-((i==null?void 0:i.top)??0)},r),{x:f,y:m}=n?qc(d,t):d;return{xSnapped:f,ySnapped:m,...d}}const qg=e=>({width:e.offsetWidth,height:e.offsetHeight}),j8=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},QO=["INPUT","SELECT","TEXTAREA"];function C8(e){var r,i;const t=((i=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:i[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:QO.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const E8=e=>"clientX"in e,Ya=(e,t)=>{var s,o;const n=E8(e),r=n?e.clientX:(s=e.touches)==null?void 0:s[0].clientX,i=n?e.clientY:(o=e.touches)==null?void 0:o[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:i-((t==null?void 0:t.top)??0)}},Yx=(e,t,n,r,i)=>{const s=t.querySelectorAll(`.${e}`);return!s||!s.length?null:Array.from(s).map(o=>{const d=o.getBoundingClientRect();return{id:o.getAttribute("data-handleid"),type:e,nodeId:i,position:o.getAttribute("data-handlepos"),x:(d.left-n.left)/r,y:(d.top-n.top)/r,...qg(o)}})};function M8({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:s,targetControlX:o,targetControlY:d}){const f=e*.125+i*.375+o*.375+n*.125,m=t*.125+s*.375+d*.375+r*.125,y=Math.abs(f-e),p=Math.abs(m-t);return[f,m,y,p]}function pd(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Xx({pos:e,x1:t,y1:n,x2:r,y2:i,c:s}){switch(e){case Ze.Left:return[t-pd(t-r,s),n];case Ze.Right:return[t+pd(r-t,s),n];case Ze.Top:return[t,n-pd(n-i,s)];case Ze.Bottom:return[t,n+pd(i-n,s)]}}function _8({sourceX:e,sourceY:t,sourcePosition:n=Ze.Bottom,targetX:r,targetY:i,targetPosition:s=Ze.Top,curvature:o=.25}){const[d,f]=Xx({pos:n,x1:e,y1:t,x2:r,y2:i,c:o}),[m,y]=Xx({pos:s,x1:r,y1:i,x2:e,y2:t,c:o}),[p,g,x,w]=M8({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:d,sourceControlY:f,targetControlX:m,targetControlY:y});return[`M${e},${t} C${d},${f} ${m},${y} ${r},${i}`,p,g,x,w]}function A8({sourceX:e,sourceY:t,targetX:n,targetY:r}){const i=Math.abs(n-e)/2,s=n<e?n+i:n-i,o=Math.abs(r-t)/2,d=r<t?r+o:r-o;return[s,d,i,o]}function WO({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1,zIndexMode:s="basic"}){if(s==="manual")return r;const o=i&&n?r+1e3:r,d=Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0);return o+d}function JO({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){const s=Tf(Wd(e),Wd(t));s.x===s.x2&&(s.x2+=1),s.y===s.y2&&(s.y2+=1);const o={x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]};return wc(o,zf(s))>0}const e$=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,t$=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),n$=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||e$;let i;return v8(e)?i={...e}:i={...e,id:r(e)},t$(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function T8({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[i,s,o,d]=A8({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,s,o,d]}const Kx={[Ze.Left]:{x:-1,y:0},[Ze.Right]:{x:1,y:0},[Ze.Top]:{x:0,y:-1},[Ze.Bottom]:{x:0,y:1}},r$=({source:e,sourcePosition:t=Ze.Bottom,target:n})=>t===Ze.Left||t===Ze.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},Zx=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function a$({source:e,sourcePosition:t=Ze.Bottom,target:n,targetPosition:r=Ze.Top,center:i,offset:s,stepPosition:o}){const d=Kx[t],f=Kx[r],m={x:e.x+d.x*s,y:e.y+d.y*s},y={x:n.x+f.x*s,y:n.y+f.y*s},p=r$({source:m,sourcePosition:t,target:y}),g=p.x!==0?"x":"y",x=p[g];let w=[],k,j;const N={x:0,y:0},_={x:0,y:0},[,,E,L]=A8({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(d[g]*f[g]===-1){g==="x"?(k=i.x??m.x+(y.x-m.x)*o,j=i.y??(m.y+y.y)/2):(k=i.x??(m.x+y.x)/2,j=i.y??m.y+(y.y-m.y)*o);const Z=[{x:k,y:m.y},{x:k,y:y.y}],V=[{x:m.x,y:j},{x:y.x,y:j}];d[g]===x?w=g==="x"?Z:V:w=g==="x"?V:Z}else{const Z=[{x:m.x,y:y.y}],V=[{x:y.x,y:m.y}];if(g==="x"?w=d.x===x?V:Z:w=d.y===x?Z:V,t===r){const F=Math.abs(e[g]-n[g]);if(F<=s){const Y=Math.min(s-1,s-F);d[g]===x?N[g]=(m[g]>e[g]?-1:1)*Y:_[g]=(y[g]>n[g]?-1:1)*Y}}if(t!==r){const F=g==="x"?"y":"x",Y=d[g]===f[F],q=m[F]>y[F],Q=m[F]<y[F];(d[g]===1&&(!Y&&q||Y&&Q)||d[g]!==1&&(!Y&&Q||Y&&q))&&(w=g==="x"?Z:V)}const P={x:m.x+N.x,y:m.y+N.y},K={x:y.x+_.x,y:y.y+_.y},X=Math.max(Math.abs(P.x-w[0].x),Math.abs(K.x-w[0].x)),le=Math.max(Math.abs(P.y-w[0].y),Math.abs(K.y-w[0].y));X>=le?(k=(P.x+K.x)/2,j=w[0].y):(k=w[0].x,j=(P.y+K.y)/2)}const D={x:m.x+N.x,y:m.y+N.y},T={x:y.x+_.x,y:y.y+_.y};return[[e,...D.x!==w[0].x||D.y!==w[0].y?[D]:[],...w,...T.x!==w[w.length-1].x||T.y!==w[w.length-1].y?[T]:[],n],k,j,E,L]}function i$(e,t,n,r){const i=Math.min(Zx(e,t)/2,Zx(t,n)/2,r),{x:s,y:o}=t;if(e.x===s&&s===n.x||e.y===o&&o===n.y)return`L${s} ${o}`;if(e.y===o){const m=e.x<n.x?-1:1,y=e.y<n.y?1:-1;return`L ${s+i*m},${o}Q ${s},${o} ${s},${o+i*y}`}const d=e.x<n.x?1:-1,f=e.y<n.y?-1:1;return`L ${s},${o+i*f}Q ${s},${o} ${s+i*d},${o}`}function _p({sourceX:e,sourceY:t,sourcePosition:n=Ze.Bottom,targetX:r,targetY:i,targetPosition:s=Ze.Top,borderRadius:o=5,centerX:d,centerY:f,offset:m=20,stepPosition:y=.5}){const[p,g,x,w,k]=a$({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:s,center:{x:d,y:f},offset:m,stepPosition:y});let j=`M${p[0].x} ${p[0].y}`;for(let N=1;N<p.length-1;N++)j+=i$(p[N-1],p[N],p[N+1],o);return j+=`L${p[p.length-1].x} ${p[p.length-1].y}`,[j,g,x,w,k]}function Qx(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function l$(e){var p;const{sourceNode:t,targetNode:n}=e;if(!Qx(t)||!Qx(n))return null;const r=t.internals.handleBounds||Wx(t.handles),i=n.internals.handleBounds||Wx(n.handles),s=Jx((r==null?void 0:r.source)??[],e.sourceHandle),o=Jx(e.connectionMode===Fo.Strict?(i==null?void 0:i.target)??[]:((i==null?void 0:i.target)??[]).concat((i==null?void 0:i.source)??[]),e.targetHandle);if(!s||!o)return(p=e.onError)==null||p.call(e,"008",bi.error008(s?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const d=(s==null?void 0:s.position)||Ze.Bottom,f=(o==null?void 0:o.position)||Ze.Top,m=$s(t,s,d),y=$s(n,o,f);return{sourceX:m.x,sourceY:m.y,targetX:y.x,targetY:y.y,sourcePosition:d,targetPosition:f}}function Wx(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function $s(e,t,n=Ze.Left,r=!1){const i=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,s=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:o,height:d}=t??sl(e);if(r)return{x:i+o/2,y:s+d/2};switch((t==null?void 0:t.position)??n){case Ze.Top:return{x:i+o/2,y:s};case Ze.Right:return{x:i+o,y:s+d/2};case Ze.Bottom:return{x:i+o/2,y:s+d};case Ze.Left:return{x:i,y:s+d/2}}}function Jx(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Ap(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function s$(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){const s=new Set;return e.reduce((o,d)=>([d.markerStart||r,d.markerEnd||i].forEach(f=>{if(f&&typeof f=="object"){const m=Ap(f,t);s.has(m)||(o.push({id:m,color:f.color||n,...f}),s.add(m))}}),o),[]).sort((o,d)=>o.id.localeCompare(d.id))}const z8=1e3,o$=10,Ug={nodeOrigin:[0,0],nodeExtent:xc,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},u$={...Ug,checkEquality:!0};function Ig(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function c$(e,t,n){const r=Ig(Ug,n);for(const i of e.values())if(i.parentId)Fg(i,e,t,r);else{const s=$c(i,r.nodeOrigin),o=Yo(i.extent)?i.extent:r.nodeExtent,d=Os(s,o,sl(i));i.internals.positionAbsolute=d}}function d$(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],r=[];for(const i of e.handles){const s={id:i.id,width:i.width??1,height:i.height??1,nodeId:e.id,x:i.x,y:i.y,position:i.position,type:i.type};i.type==="source"?n.push(s):i.type==="target"&&r.push(s)}return{source:n,target:r}}function Pg(e){return e==="manual"}function Tp(e,t,n,r={}){var y,p;const i=Ig(u$,r),s={i:0},o=new Map(t),d=i!=null&&i.elevateNodesOnSelect&&!Pg(i.zIndexMode)?z8:0;let f=e.length>0,m=!1;t.clear(),n.clear();for(const g of e){let x=o.get(g.id);if(i.checkEquality&&g===(x==null?void 0:x.internals.userNode))t.set(g.id,x);else{const w=$c(g,i.nodeOrigin),k=Yo(g.extent)?g.extent:i.nodeExtent,j=Os(w,k,sl(g));x={...i.defaults,...g,measured:{width:(y=g.measured)==null?void 0:y.width,height:(p=g.measured)==null?void 0:p.height},internals:{positionAbsolute:j,handleBounds:d$(g,x),z:D8(g,d,i.zIndexMode),userNode:g}},t.set(g.id,x)}(x.measured===void 0||x.measured.width===void 0||x.measured.height===void 0)&&!x.hidden&&(f=!1),g.parentId&&Fg(x,t,n,r,s),m||(m=g.selected??!1)}return{nodesInitialized:f,hasSelectedNodes:m}}function f$(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function Fg(e,t,n,r,i){const{elevateNodesOnSelect:s,nodeOrigin:o,nodeExtent:d,zIndexMode:f}=Ig(Ug,r),m=e.parentId,y=t.get(m);if(!y){console.warn(`Parent node ${m} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}f$(e,n),i&&!y.parentId&&y.internals.rootParentIndex===void 0&&f==="auto"&&(y.internals.rootParentIndex=++i.i,y.internals.z=y.internals.z+i.i*o$),i&&y.internals.rootParentIndex!==void 0&&(i.i=y.internals.rootParentIndex);const p=s&&!Pg(f)?z8:0,{x:g,y:x,z:w}=h$(e,y,o,d,p,f),{positionAbsolute:k}=e.internals,j=g!==k.x||x!==k.y;(j||w!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:j?{x:g,y:x}:k,z:w}})}function D8(e,t,n){const r=Ga(e.zIndex)?e.zIndex:0;return Pg(n)?r:r+(e.selected?t:0)}function h$(e,t,n,r,i,s){const{x:o,y:d}=t.internals.positionAbsolute,f=sl(e),m=$c(e,n),y=Yo(e.extent)?Os(m,e.extent,f):m;let p=Os({x:o+y.x,y:d+y.y},r,f);e.extent==="parent"&&(p=b8(p,f,t));const g=D8(e,i,s),x=t.internals.z??0;return{x:p.x,y:p.y,z:x>=g?x+1:g}}function Vg(e,t,n,r=[0,0]){var o;const i=[],s=new Map;for(const d of e){const f=t.get(d.parentId);if(!f)continue;const m=((o=s.get(d.parentId))==null?void 0:o.expandedRect)??Go(f),y=S8(m,d.rect);s.set(d.parentId,{expandedRect:y,parent:f})}return s.size>0&&s.forEach(({expandedRect:d,parent:f},m)=>{var E;const y=f.internals.positionAbsolute,p=sl(f),g=f.origin??r,x=d.x<y.x?Math.round(Math.abs(y.x-d.x)):0,w=d.y<y.y?Math.round(Math.abs(y.y-d.y)):0,k=Math.max(p.width,Math.round(d.width)),j=Math.max(p.height,Math.round(d.height)),N=(k-p.width)*g[0],_=(j-p.height)*g[1];(x>0||w>0||N||_)&&(i.push({id:m,type:"position",position:{x:f.position.x-x+N,y:f.position.y-w+_}}),(E=n.get(m))==null||E.forEach(L=>{e.some(D=>D.id===L.id)||i.push({id:L.id,type:"position",position:{x:L.position.x+x,y:L.position.y+w}})})),(p.width<d.width||p.height<d.height||x||w)&&i.push({id:m,type:"dimensions",setAttributes:!0,dimensions:{width:k+(x?g[0]*x-N:0),height:j+(w?g[1]*w-_:0)}})}),i}function m$(e,t,n,r,i,s,o){const d=r==null?void 0:r.querySelector(".xyflow__viewport");let f=!1;if(!d)return{changes:[],updatedInternals:f};const m=[],y=window.getComputedStyle(d),{m22:p}=new window.DOMMatrixReadOnly(y.transform),g=[];for(const x of e.values()){const w=t.get(x.id);if(!w)continue;if(w.hidden){t.set(w.id,{...w,internals:{...w.internals,handleBounds:void 0}}),f=!0;continue}const k=qg(x.nodeElement),j=w.measured.width!==k.width||w.measured.height!==k.height;if(!!(k.width&&k.height&&(j||!w.internals.handleBounds||x.force))){const _=x.nodeElement.getBoundingClientRect(),E=Yo(w.extent)?w.extent:s;let{positionAbsolute:L}=w.internals;w.parentId&&w.extent==="parent"?L=b8(L,k,t.get(w.parentId)):E&&(L=Os(L,E,k));const D={...w,measured:k,internals:{...w.internals,positionAbsolute:L,handleBounds:{source:Yx("source",x.nodeElement,_,p,w.id),target:Yx("target",x.nodeElement,_,p,w.id)}}};t.set(w.id,D),w.parentId&&Fg(D,t,n,{nodeOrigin:i,zIndexMode:o}),f=!0,j&&(m.push({id:w.id,type:"dimensions",dimensions:k}),w.expandParent&&w.parentId&&g.push({id:w.id,parentId:w.parentId,rect:Go(D,i)}))}}if(g.length>0){const x=Vg(g,t,n,i);m.push(...x)}return{changes:m,updatedInternals:f}}async function p$({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:s}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const o=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,s]],r),d=!!o&&(o.x!==n[0]||o.y!==n[1]||o.k!==n[2]);return Promise.resolve(d)}function e3(e,t,n,r,i,s){let o=i;const d=r.get(o)||new Map;r.set(o,d.set(n,t)),o=`${i}-${e}`;const f=r.get(o)||new Map;if(r.set(o,f.set(n,t)),s){o=`${i}-${e}-${s}`;const m=r.get(o)||new Map;r.set(o,m.set(n,t))}}function L8(e,t,n){e.clear(),t.clear();for(const r of n){const{source:i,target:s,sourceHandle:o=null,targetHandle:d=null}=r,f={edgeId:r.id,source:i,target:s,sourceHandle:o,targetHandle:d},m=`${i}-${o}--${s}-${d}`,y=`${s}-${d}--${i}-${o}`;e3("source",f,y,e,i,o),e3("target",f,m,e,s,d),t.set(r.id,r)}}function R8(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:R8(n,t):!1}function t3(e,t,n){var i;let r=e;do{if((i=r==null?void 0:r.matches)!=null&&i.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function g$(e,t,n,r){const i=new Map;for(const[s,o]of e)if((o.selected||o.id===r)&&(!o.parentId||!R8(o,e))&&(o.draggable||t&&typeof o.draggable>"u")){const d=e.get(s);d&&i.set(s,{id:s,position:d.position||{x:0,y:0},distance:{x:n.x-d.internals.positionAbsolute.x,y:n.y-d.internals.positionAbsolute.y},extent:d.extent,parentId:d.parentId,origin:d.origin,expandParent:d.expandParent,internals:{positionAbsolute:d.internals.positionAbsolute||{x:0,y:0}},measured:{width:d.measured.width??0,height:d.measured.height??0}})}return i}function _1({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var o,d,f;const i=[];for(const[m,y]of t){const p=(o=n.get(m))==null?void 0:o.internals.userNode;p&&i.push({...p,position:y.position,dragging:r})}if(!e)return[i[0],i];const s=(d=n.get(e))==null?void 0:d.internals.userNode;return[s?{...s,position:((f=t.get(e))==null?void 0:f.position)||s.position,dragging:r}:i[0],i]}function y$({dragItems:e,snapGrid:t,x:n,y:r}){const i=e.values().next().value;if(!i)return null;const s={x:n-i.distance.x,y:r-i.distance.y},o=qc(s,t);return{x:o.x-s.x,y:o.y-s.y}}function v$({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let s={x:null,y:null},o=0,d=new Map,f=!1,m={x:0,y:0},y=null,p=!1,g=null,x=!1,w=!1,k=null;function j({noDragClassName:_,handleSelector:E,domNode:L,isSelectable:D,nodeId:T,nodeClickDistance:O=0}){g=ua(L);function Z({x:X,y:le}){const{nodeLookup:F,nodeExtent:Y,snapGrid:q,snapToGrid:Q,nodeOrigin:ee,onNodeDrag:ne,onSelectionDrag:R,onError:H,updateNodePositions:W}=t();s={x:X,y:le};let B=!1;const ce=d.size>1,pe=ce&&Y?Mp(Hc(d)):null,xe=ce&&Q?y$({dragItems:d,snapGrid:q,x:X,y:le}):null;for(const[be,ye]of d){if(!F.has(be))continue;let Ce={x:X-ye.distance.x,y:le-ye.distance.y};Q&&(Ce=xe?{x:Math.round(Ce.x+xe.x),y:Math.round(Ce.y+xe.y)}:qc(Ce,q));let Ge=null;if(ce&&Y&&!ye.extent&&pe){const{positionAbsolute:qe}=ye.internals,nt=qe.x-pe.x+Y[0][0],lt=qe.x+ye.measured.width-pe.x2+Y[1][0],We=qe.y-pe.y+Y[0][1],Dt=qe.y+ye.measured.height-pe.y2+Y[1][1];Ge=[[nt,We],[lt,Dt]]}const{position:Pe,positionAbsolute:$e}=x8({nodeId:be,nextPosition:Ce,nodeLookup:F,nodeExtent:Ge||Y,nodeOrigin:ee,onError:H});B=B||ye.position.x!==Pe.x||ye.position.y!==Pe.y,ye.position=Pe,ye.internals.positionAbsolute=$e}if(w=w||B,!!B&&(W(d,!0),k&&(r||ne||!T&&R))){const[be,ye]=_1({nodeId:T,dragItems:d,nodeLookup:F});r==null||r(k,d,be,ye),ne==null||ne(k,be,ye),T||R==null||R(k,ye)}}async function V(){if(!y)return;const{transform:X,panBy:le,autoPanSpeed:F,autoPanOnNodeDrag:Y}=t();if(!Y){f=!1,cancelAnimationFrame(o);return}const[q,Q]=w8(m,y,F);(q!==0||Q!==0)&&(s.x=(s.x??0)-q/X[2],s.y=(s.y??0)-Q/X[2],await le({x:q,y:Q})&&Z(s)),o=requestAnimationFrame(V)}function P(X){var ce;const{nodeLookup:le,multiSelectionActive:F,nodesDraggable:Y,transform:q,snapGrid:Q,snapToGrid:ee,selectNodesOnDrag:ne,onNodeDragStart:R,onSelectionDragStart:H,unselectNodesAndEdges:W}=t();p=!0,(!ne||!D)&&!F&&T&&((ce=le.get(T))!=null&&ce.selected||W()),D&&ne&&T&&(e==null||e(T));const B=oc(X.sourceEvent,{transform:q,snapGrid:Q,snapToGrid:ee,containerBounds:y});if(s=B,d=g$(le,Y,B,T),d.size>0&&(n||R||!T&&H)){const[pe,xe]=_1({nodeId:T,dragItems:d,nodeLookup:le});n==null||n(X.sourceEvent,d,pe,xe),R==null||R(X.sourceEvent,pe,xe),T||H==null||H(X.sourceEvent,xe)}}const K=Wb().clickDistance(O).on("start",X=>{const{domNode:le,nodeDragThreshold:F,transform:Y,snapGrid:q,snapToGrid:Q}=t();y=(le==null?void 0:le.getBoundingClientRect())||null,x=!1,w=!1,k=X.sourceEvent,F===0&&P(X),s=oc(X.sourceEvent,{transform:Y,snapGrid:q,snapToGrid:Q,containerBounds:y}),m=Ya(X.sourceEvent,y)}).on("drag",X=>{const{autoPanOnNodeDrag:le,transform:F,snapGrid:Y,snapToGrid:q,nodeDragThreshold:Q,nodeLookup:ee}=t(),ne=oc(X.sourceEvent,{transform:F,snapGrid:Y,snapToGrid:q,containerBounds:y});if(k=X.sourceEvent,(X.sourceEvent.type==="touchmove"&&X.sourceEvent.touches.length>1||T&&!ee.has(T))&&(x=!0),!x){if(!f&&le&&p&&(f=!0,V()),!p){const R=Ya(X.sourceEvent,y),H=R.x-m.x,W=R.y-m.y;Math.sqrt(H*H+W*W)>Q&&P(X)}(s.x!==ne.xSnapped||s.y!==ne.ySnapped)&&d&&p&&(m=Ya(X.sourceEvent,y),Z(ne))}}).on("end",X=>{if(!(!p||x)&&(f=!1,p=!1,cancelAnimationFrame(o),d.size>0)){const{nodeLookup:le,updateNodePositions:F,onNodeDragStop:Y,onSelectionDragStop:q}=t();if(w&&(F(d,!1),w=!1),i||Y||!T&&q){const[Q,ee]=_1({nodeId:T,dragItems:d,nodeLookup:le,dragging:!1});i==null||i(X.sourceEvent,d,Q,ee),Y==null||Y(X.sourceEvent,Q,ee),T||q==null||q(X.sourceEvent,ee)}}}).filter(X=>{const le=X.target;return!X.button&&(!_||!t3(le,`.${_}`,L))&&(!E||t3(le,E,L))});g.call(K)}function N(){g==null||g.on(".drag",null)}return{update:j,destroy:N}}function x$(e,t,n){const r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const s of t.values())wc(i,Go(s))>0&&r.push(s);return r}const b$=250;function w$(e,t,n,r){var d,f;let i=[],s=1/0;const o=x$(e,n,t+b$);for(const m of o){const y=[...((d=m.internals.handleBounds)==null?void 0:d.source)??[],...((f=m.internals.handleBounds)==null?void 0:f.target)??[]];for(const p of y){if(r.nodeId===p.nodeId&&r.type===p.type&&r.id===p.id)continue;const{x:g,y:x}=$s(m,p,p.position,!0),w=Math.sqrt(Math.pow(g-e.x,2)+Math.pow(x-e.y,2));w>t||(w<s?(i=[{...p,x:g,y:x}],s=w):w===s&&i.push({...p,x:g,y:x}))}}if(!i.length)return null;if(i.length>1){const m=r.type==="source"?"target":"source";return i.find(y=>y.type===m)??i[0]}return i[0]}function B8(e,t,n,r,i,s=!1){var m,y,p;const o=r.get(e);if(!o)return null;const d=i==="strict"?(m=o.internals.handleBounds)==null?void 0:m[t]:[...((y=o.internals.handleBounds)==null?void 0:y.source)??[],...((p=o.internals.handleBounds)==null?void 0:p.target)??[]],f=(n?d==null?void 0:d.find(g=>g.id===n):d==null?void 0:d[0])??null;return f&&s?{...f,...$s(o,f,f.position,!0)}:f}function O8(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function S$(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const $8=()=>!0;function k$(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:s,isTarget:o,domNode:d,nodeLookup:f,lib:m,autoPanOnConnect:y,flowId:p,panBy:g,cancelConnection:x,onConnectStart:w,onConnect:k,onConnectEnd:j,isValidConnection:N=$8,onReconnectEnd:_,updateConnection:E,getTransform:L,getFromHandle:D,autoPanSpeed:T,dragThreshold:O=1,handleDomNode:Z}){const V=j8(e.target);let P=0,K;const{x:X,y:le}=Ya(e),F=O8(s,Z),Y=d==null?void 0:d.getBoundingClientRect();let q=!1;if(!Y||!F)return;const Q=B8(i,F,r,f,t);if(!Q)return;let ee=Ya(e,Y),ne=!1,R=null,H=!1,W=null;function B(){if(!y||!Y)return;const[Pe,$e]=w8(ee,Y,T);g({x:Pe,y:$e}),P=requestAnimationFrame(B)}const ce={...Q,nodeId:i,type:F,position:Q.position},pe=f.get(i);let be={inProgress:!0,isValid:null,from:$s(pe,ce,Ze.Left,!0),fromHandle:ce,fromPosition:ce.position,fromNode:pe,to:ee,toHandle:null,toPosition:Px[ce.position],toNode:null,pointer:ee};function ye(){q=!0,E(be),w==null||w(e,{nodeId:i,handleId:r,handleType:F})}O===0&&ye();function Ce(Pe){if(!q){const{x:Dt,y:ke}=Ya(Pe),et=Dt-X,st=ke-le;if(!(et*et+st*st>O*O))return;ye()}if(!D()||!ce){Ge(Pe);return}const $e=L();ee=Ya(Pe,Y),K=w$(Uc(ee,$e,!1,[1,1]),n,f,ce),ne||(B(),ne=!0);const qe=H8(Pe,{handle:K,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:o?"target":"source",isValidConnection:N,doc:V,lib:m,flowId:p,nodeLookup:f});W=qe.handleDomNode,R=qe.connection,H=S$(!!K,qe.isValid);const nt=f.get(i),lt=nt?$s(nt,ce,Ze.Left,!0):be.from,We={...be,from:lt,isValid:H,to:qe.toHandle&&H?Jd({x:qe.toHandle.x,y:qe.toHandle.y},$e):ee,toHandle:qe.toHandle,toPosition:H&&qe.toHandle?qe.toHandle.position:Px[ce.position],toNode:qe.toHandle?f.get(qe.toHandle.nodeId):null,pointer:ee};E(We),be=We}function Ge(Pe){if(!("touches"in Pe&&Pe.touches.length>0)){if(q){(K||W)&&R&&H&&(k==null||k(R));const{inProgress:$e,...qe}=be,nt={...qe,toPosition:be.toHandle?be.toPosition:null};j==null||j(Pe,nt),s&&(_==null||_(Pe,nt))}x(),cancelAnimationFrame(P),ne=!1,H=!1,R=null,W=null,V.removeEventListener("mousemove",Ce),V.removeEventListener("mouseup",Ge),V.removeEventListener("touchmove",Ce),V.removeEventListener("touchend",Ge)}}V.addEventListener("mousemove",Ce),V.addEventListener("mouseup",Ge),V.addEventListener("touchmove",Ce),V.addEventListener("touchend",Ge)}function H8(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:s,doc:o,lib:d,flowId:f,isValidConnection:m=$8,nodeLookup:y}){const p=s==="target",g=t?o.querySelector(`.${d}-flow__handle[data-id="${f}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x,y:w}=Ya(e),k=o.elementFromPoint(x,w),j=k!=null&&k.classList.contains(`${d}-flow__handle`)?k:g,N={handleDomNode:j,isValid:!1,connection:null,toHandle:null};if(j){const _=O8(void 0,j),E=j.getAttribute("data-nodeid"),L=j.getAttribute("data-handleid"),D=j.classList.contains("connectable"),T=j.classList.contains("connectableend");if(!E||!_)return N;const O={source:p?E:r,sourceHandle:p?L:i,target:p?r:E,targetHandle:p?i:L};N.connection=O;const V=D&&T&&(n===Fo.Strict?p&&_==="source"||!p&&_==="target":E!==r||L!==i);N.isValid=V&&m(O),N.toHandle=B8(E,_,L,y,n,!0)}return N}const zp={onPointerDown:k$,isValid:H8};function N$({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const i=ua(e);function s({translateExtent:d,width:f,height:m,zoomStep:y=1,pannable:p=!0,zoomable:g=!0,inversePan:x=!1}){const w=E=>{if(E.sourceEvent.type!=="wheel"||!t)return;const L=n(),D=E.sourceEvent.ctrlKey&&Sc()?10:1,T=-E.sourceEvent.deltaY*(E.sourceEvent.deltaMode===1?.05:E.sourceEvent.deltaMode?1:.002)*y,O=L[2]*Math.pow(2,T*D);t.scaleTo(O)};let k=[0,0];const j=E=>{(E.sourceEvent.type==="mousedown"||E.sourceEvent.type==="touchstart")&&(k=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY])},N=E=>{const L=n();if(E.sourceEvent.type!=="mousemove"&&E.sourceEvent.type!=="touchmove"||!t)return;const D=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY],T=[D[0]-k[0],D[1]-k[1]];k=D;const O=r()*Math.max(L[2],Math.log(L[2]))*(x?-1:1),Z={x:L[0]-T[0]*O,y:L[1]-T[1]*O},V=[[0,0],[f,m]];t.setViewportConstrained({x:Z.x,y:Z.y,zoom:L[2]},V,d)},_=h8().on("start",j).on("zoom",p?N:null).on("zoom.wheel",g?w:null);i.call(_,{})}function o(){i.on("zoom",null)}return{update:s,destroy:o,pointer:Fa}}const Df=e=>({x:e.x,y:e.y,zoom:e.k}),A1=({x:e,y:t,zoom:n})=>Af.translate(e,t).scale(n),Ao=(e,t)=>e.target.closest(`.${t}`),q8=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),j$=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,T1=(e,t=0,n=j$,r=()=>{})=>{const i=typeof t=="number"&&t>0;return i||r(),i?e.transition().duration(t).ease(n).on("end",r):e},U8=e=>{const t=e.ctrlKey&&Sc()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function C$({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:s,zoomOnPinch:o,onPanZoomStart:d,onPanZoom:f,onPanZoomEnd:m}){return y=>{if(Ao(y,t))return y.ctrlKey&&y.preventDefault(),!1;y.preventDefault(),y.stopImmediatePropagation();const p=n.property("__zoom").k||1;if(y.ctrlKey&&o){const j=Fa(y),N=U8(y),_=p*Math.pow(2,N);r.scaleTo(n,_,j,y);return}const g=y.deltaMode===1?20:1;let x=i===Ds.Vertical?0:y.deltaX*g,w=i===Ds.Horizontal?0:y.deltaY*g;!Sc()&&y.shiftKey&&i!==Ds.Vertical&&(x=y.deltaY*g,w=0),r.translateBy(n,-(x/p)*s,-(w/p)*s,{internal:!0});const k=Df(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(f==null||f(y,k),e.panScrollTimeout=setTimeout(()=>{m==null||m(y,k),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,d==null||d(y,k))}}function E$({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){const s=r.type==="wheel",o=!t&&s&&!r.ctrlKey,d=Ao(r,e);if(r.ctrlKey&&s&&d&&r.preventDefault(),o||d)return null;r.preventDefault(),n.call(this,r,i)}}function M$({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var s,o,d;if((s=r.sourceEvent)!=null&&s.internal)return;const i=Df(r.transform);e.mouseButton=((o=r.sourceEvent)==null?void 0:o.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=i,((d=r.sourceEvent)==null?void 0:d.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,i))}}function _$({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return s=>{var o,d;e.usedRightMouseButton=!!(n&&q8(t,e.mouseButton??0)),(o=s.sourceEvent)!=null&&o.sync||r([s.transform.x,s.transform.y,s.transform.k]),i&&!((d=s.sourceEvent)!=null&&d.internal)&&(i==null||i(s.sourceEvent,Df(s.transform)))}}function A$({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:s}){return o=>{var d;if(!((d=o.sourceEvent)!=null&&d.internal)&&(e.isZoomingOrPanning=!1,s&&q8(t,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&s(o.sourceEvent),e.usedRightMouseButton=!1,r(!1),i)){const f=Df(o.transform);e.prevViewport=f,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i==null||i(o.sourceEvent,f)},n?150:0)}}}function T$({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:i,zoomOnDoubleClick:s,userSelectionActive:o,noWheelClassName:d,noPanClassName:f,lib:m,connectionInProgress:y}){return p=>{var j;const g=e||t,x=n&&p.ctrlKey,w=p.type==="wheel";if(p.button===1&&p.type==="mousedown"&&(Ao(p,`${m}-flow__node`)||Ao(p,`${m}-flow__edge`)))return!0;if(!r&&!g&&!i&&!s&&!n||o||y&&!w||Ao(p,d)&&w||Ao(p,f)&&(!w||i&&w&&!e)||!n&&p.ctrlKey&&w)return!1;if(!n&&p.type==="touchstart"&&((j=p.touches)==null?void 0:j.length)>1)return p.preventDefault(),!1;if(!g&&!i&&!x&&w||!r&&(p.type==="mousedown"||p.type==="touchstart")||Array.isArray(r)&&!r.includes(p.button)&&p.type==="mousedown")return!1;const k=Array.isArray(r)&&r.includes(p.button)||!p.button||p.button<=1;return(!p.ctrlKey||w)&&k}}function z$({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:i,onPanZoom:s,onPanZoomStart:o,onPanZoomEnd:d,onDraggingChange:f}){const m={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},y=e.getBoundingClientRect(),p=h8().scaleExtent([t,n]).translateExtent(r),g=ua(e).call(p);_({x:i.x,y:i.y,zoom:Vo(i.zoom,t,n)},[[0,0],[y.width,y.height]],r);const x=g.on("wheel.zoom"),w=g.on("dblclick.zoom");p.wheelDelta(U8);function k(K,X){return g?new Promise(le=>{p==null||p.interpolate((X==null?void 0:X.interpolate)==="linear"?sc:Md).transform(T1(g,X==null?void 0:X.duration,X==null?void 0:X.ease,()=>le(!0)),K)}):Promise.resolve(!1)}function j({noWheelClassName:K,noPanClassName:X,onPaneContextMenu:le,userSelectionActive:F,panOnScroll:Y,panOnDrag:q,panOnScrollMode:Q,panOnScrollSpeed:ee,preventScrolling:ne,zoomOnPinch:R,zoomOnScroll:H,zoomOnDoubleClick:W,zoomActivationKeyPressed:B,lib:ce,onTransformChange:pe,connectionInProgress:xe,paneClickDistance:be,selectionOnDrag:ye}){F&&!m.isZoomingOrPanning&&N();const Ce=Y&&!B&&!F;p.clickDistance(ye?1/0:!Ga(be)||be<0?0:be);const Ge=Ce?C$({zoomPanValues:m,noWheelClassName:K,d3Selection:g,d3Zoom:p,panOnScrollMode:Q,panOnScrollSpeed:ee,zoomOnPinch:R,onPanZoomStart:o,onPanZoom:s,onPanZoomEnd:d}):E$({noWheelClassName:K,preventScrolling:ne,d3ZoomHandler:x});if(g.on("wheel.zoom",Ge,{passive:!1}),!F){const $e=M$({zoomPanValues:m,onDraggingChange:f,onPanZoomStart:o});p.on("start",$e);const qe=_$({zoomPanValues:m,panOnDrag:q,onPaneContextMenu:!!le,onPanZoom:s,onTransformChange:pe});p.on("zoom",qe);const nt=A$({zoomPanValues:m,panOnDrag:q,panOnScroll:Y,onPaneContextMenu:le,onPanZoomEnd:d,onDraggingChange:f});p.on("end",nt)}const Pe=T$({zoomActivationKeyPressed:B,panOnDrag:q,zoomOnScroll:H,panOnScroll:Y,zoomOnDoubleClick:W,zoomOnPinch:R,userSelectionActive:F,noPanClassName:X,noWheelClassName:K,lib:ce,connectionInProgress:xe});p.filter(Pe),W?g.on("dblclick.zoom",w):g.on("dblclick.zoom",null)}function N(){p.on("zoom",null)}async function _(K,X,le){const F=A1(K),Y=p==null?void 0:p.constrain()(F,X,le);return Y&&await k(Y),new Promise(q=>q(Y))}async function E(K,X){const le=A1(K);return await k(le,X),new Promise(F=>F(le))}function L(K){if(g){const X=A1(K),le=g.property("__zoom");(le.k!==K.zoom||le.x!==K.x||le.y!==K.y)&&(p==null||p.transform(g,X,null,{sync:!0}))}}function D(){const K=g?f8(g.node()):{x:0,y:0,k:1};return{x:K.x,y:K.y,zoom:K.k}}function T(K,X){return g?new Promise(le=>{p==null||p.interpolate((X==null?void 0:X.interpolate)==="linear"?sc:Md).scaleTo(T1(g,X==null?void 0:X.duration,X==null?void 0:X.ease,()=>le(!0)),K)}):Promise.resolve(!1)}function O(K,X){return g?new Promise(le=>{p==null||p.interpolate((X==null?void 0:X.interpolate)==="linear"?sc:Md).scaleBy(T1(g,X==null?void 0:X.duration,X==null?void 0:X.ease,()=>le(!0)),K)}):Promise.resolve(!1)}function Z(K){p==null||p.scaleExtent(K)}function V(K){p==null||p.translateExtent(K)}function P(K){const X=!Ga(K)||K<0?0:K;p==null||p.clickDistance(X)}return{update:j,destroy:N,setViewport:E,setViewportConstrained:_,getViewport:D,scaleTo:T,scaleBy:O,setScaleExtent:Z,setTranslateExtent:V,syncViewport:L,setClickDistance:P}}var Xo;(function(e){e.Line="line",e.Handle="handle"})(Xo||(Xo={}));function D$({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:s}){const o=e-t,d=n-r,f=[o>0?1:o<0?-1:0,d>0?1:d<0?-1:0];return o&&i&&(f[0]=f[0]*-1),d&&s&&(f[1]=f[1]*-1),f}function n3(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),i=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:i}}function Pl(e,t){return Math.max(0,t-e)}function Fl(e,t){return Math.max(0,e-t)}function gd(e,t,n){return Math.max(0,t-e,e-n)}function r3(e,t){return e?!t:t}function L$(e,t,n,r,i,s,o,d){let{affectsX:f,affectsY:m}=t;const{isHorizontal:y,isVertical:p}=t,g=y&&p,{xSnapped:x,ySnapped:w}=n,{minWidth:k,maxWidth:j,minHeight:N,maxHeight:_}=r,{x:E,y:L,width:D,height:T,aspectRatio:O}=e;let Z=Math.floor(y?x-e.pointerX:0),V=Math.floor(p?w-e.pointerY:0);const P=D+(f?-Z:Z),K=T+(m?-V:V),X=-s[0]*D,le=-s[1]*T;let F=gd(P,k,j),Y=gd(K,N,_);if(o){let ee=0,ne=0;f&&Z<0?ee=Pl(E+Z+X,o[0][0]):!f&&Z>0&&(ee=Fl(E+P+X,o[1][0])),m&&V<0?ne=Pl(L+V+le,o[0][1]):!m&&V>0&&(ne=Fl(L+K+le,o[1][1])),F=Math.max(F,ee),Y=Math.max(Y,ne)}if(d){let ee=0,ne=0;f&&Z>0?ee=Fl(E+Z,d[0][0]):!f&&Z<0&&(ee=Pl(E+P,d[1][0])),m&&V>0?ne=Fl(L+V,d[0][1]):!m&&V<0&&(ne=Pl(L+K,d[1][1])),F=Math.max(F,ee),Y=Math.max(Y,ne)}if(i){if(y){const ee=gd(P/O,N,_)*O;if(F=Math.max(F,ee),o){let ne=0;!f&&!m||f&&!m&&g?ne=Fl(L+le+P/O,o[1][1])*O:ne=Pl(L+le+(f?Z:-Z)/O,o[0][1])*O,F=Math.max(F,ne)}if(d){let ne=0;!f&&!m||f&&!m&&g?ne=Pl(L+P/O,d[1][1])*O:ne=Fl(L+(f?Z:-Z)/O,d[0][1])*O,F=Math.max(F,ne)}}if(p){const ee=gd(K*O,k,j)/O;if(Y=Math.max(Y,ee),o){let ne=0;!f&&!m||m&&!f&&g?ne=Fl(E+K*O+X,o[1][0])/O:ne=Pl(E+(m?V:-V)*O+X,o[0][0])/O,Y=Math.max(Y,ne)}if(d){let ne=0;!f&&!m||m&&!f&&g?ne=Pl(E+K*O,d[1][0])/O:ne=Fl(E+(m?V:-V)*O,d[0][0])/O,Y=Math.max(Y,ne)}}}V=V+(V<0?Y:-Y),Z=Z+(Z<0?F:-F),i&&(g?P>K*O?V=(r3(f,m)?-Z:Z)/O:Z=(r3(f,m)?-V:V)*O:y?(V=Z/O,m=f):(Z=V*O,f=m));const q=f?E+Z:E,Q=m?L+V:L;return{width:D+(f?-Z:Z),height:T+(m?-V:V),x:s[0]*Z*(f?-1:1)+q,y:s[1]*V*(m?-1:1)+Q}}const I8={width:0,height:0,x:0,y:0},R$={...I8,pointerX:0,pointerY:0,aspectRatio:1};function B$(e){return[[0,0],[e.measured.width,e.measured.height]]}function O$(e,t,n){const r=t.position.x+e.position.x,i=t.position.y+e.position.y,s=e.measured.width??0,o=e.measured.height??0,d=n[0]*s,f=n[1]*o;return[[r-d,i-f],[r+s-d,i+o-f]]}function $$({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){const s=ua(e);let o={controlDirection:n3("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function d({controlPosition:m,boundaries:y,keepAspectRatio:p,resizeDirection:g,onResizeStart:x,onResize:w,onResizeEnd:k,shouldResize:j}){let N={...I8},_={...R$};o={boundaries:y,resizeDirection:g,keepAspectRatio:p,controlDirection:n3(m)};let E,L=null,D=[],T,O,Z,V=!1;const P=Wb().on("start",K=>{const{nodeLookup:X,transform:le,snapGrid:F,snapToGrid:Y,nodeOrigin:q,paneDomNode:Q}=n();if(E=X.get(t),!E)return;L=(Q==null?void 0:Q.getBoundingClientRect())??null;const{xSnapped:ee,ySnapped:ne}=oc(K.sourceEvent,{transform:le,snapGrid:F,snapToGrid:Y,containerBounds:L});N={width:E.measured.width??0,height:E.measured.height??0,x:E.position.x??0,y:E.position.y??0},_={...N,pointerX:ee,pointerY:ne,aspectRatio:N.width/N.height},T=void 0,E.parentId&&(E.extent==="parent"||E.expandParent)&&(T=X.get(E.parentId),O=T&&E.extent==="parent"?B$(T):void 0),D=[],Z=void 0;for(const[R,H]of X)if(H.parentId===t&&(D.push({id:R,position:{...H.position},extent:H.extent}),H.extent==="parent"||H.expandParent)){const W=O$(H,E,H.origin??q);Z?Z=[[Math.min(W[0][0],Z[0][0]),Math.min(W[0][1],Z[0][1])],[Math.max(W[1][0],Z[1][0]),Math.max(W[1][1],Z[1][1])]]:Z=W}x==null||x(K,{...N})}).on("drag",K=>{const{transform:X,snapGrid:le,snapToGrid:F,nodeOrigin:Y}=n(),q=oc(K.sourceEvent,{transform:X,snapGrid:le,snapToGrid:F,containerBounds:L}),Q=[];if(!E)return;const{x:ee,y:ne,width:R,height:H}=N,W={},B=E.origin??Y,{width:ce,height:pe,x:xe,y:be}=L$(_,o.controlDirection,q,o.boundaries,o.keepAspectRatio,B,O,Z),ye=ce!==R,Ce=pe!==H,Ge=xe!==ee&&ye,Pe=be!==ne&&Ce;if(!Ge&&!Pe&&!ye&&!Ce)return;if((Ge||Pe||B[0]===1||B[1]===1)&&(W.x=Ge?xe:N.x,W.y=Pe?be:N.y,N.x=W.x,N.y=W.y,D.length>0)){const lt=xe-ee,We=be-ne;for(const Dt of D)Dt.position={x:Dt.position.x-lt+B[0]*(ce-R),y:Dt.position.y-We+B[1]*(pe-H)},Q.push(Dt)}if((ye||Ce)&&(W.width=ye&&(!o.resizeDirection||o.resizeDirection==="horizontal")?ce:N.width,W.height=Ce&&(!o.resizeDirection||o.resizeDirection==="vertical")?pe:N.height,N.width=W.width,N.height=W.height),T&&E.expandParent){const lt=B[0]*(W.width??0);W.x&&W.x<lt&&(N.x=lt,_.x=_.x-(W.x-lt));const We=B[1]*(W.height??0);W.y&&W.y<We&&(N.y=We,_.y=_.y-(W.y-We))}const $e=D$({width:N.width,prevWidth:R,height:N.height,prevHeight:H,affectsX:o.controlDirection.affectsX,affectsY:o.controlDirection.affectsY}),qe={...N,direction:$e};(j==null?void 0:j(K,qe))!==!1&&(V=!0,w==null||w(K,qe),r(W,Q))}).on("end",K=>{V&&(k==null||k(K,{...N}),i==null||i({...N}),V=!1)});s.call(P)}function f(){s.on(".drag",null)}return{update:d,destroy:f}}var z1={exports:{}},D1={},L1={exports:{}},R1={};/**
|
|
358
|
+
* @license React
|
|
359
|
+
* use-sync-external-store-shim.production.js
|
|
360
|
+
*
|
|
361
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
362
|
+
*
|
|
363
|
+
* This source code is licensed under the MIT license found in the
|
|
364
|
+
* LICENSE file in the root directory of this source tree.
|
|
365
|
+
*/var a3;function H$(){if(a3)return R1;a3=1;var e=jc();function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,s=e.useLayoutEffect,o=e.useDebugValue;function d(p,g){var x=g(),w=r({inst:{value:x,getSnapshot:g}}),k=w[0].inst,j=w[1];return s(function(){k.value=x,k.getSnapshot=g,f(k)&&j({inst:k})},[p,x,g]),i(function(){return f(k)&&j({inst:k}),p(function(){f(k)&&j({inst:k})})},[p]),o(x),x}function f(p){var g=p.getSnapshot;p=p.value;try{var x=g();return!n(p,x)}catch{return!0}}function m(p,g){return g()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:d;return R1.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,R1}var i3;function q$(){return i3||(i3=1,L1.exports=H$()),L1.exports}/**
|
|
366
|
+
* @license React
|
|
367
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
368
|
+
*
|
|
369
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
370
|
+
*
|
|
371
|
+
* This source code is licensed under the MIT license found in the
|
|
372
|
+
* LICENSE file in the root directory of this source tree.
|
|
373
|
+
*/var l3;function U$(){if(l3)return D1;l3=1;var e=jc(),t=q$();function n(m,y){return m===y&&(m!==0||1/m===1/y)||m!==m&&y!==y}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,s=e.useRef,o=e.useEffect,d=e.useMemo,f=e.useDebugValue;return D1.useSyncExternalStoreWithSelector=function(m,y,p,g,x){var w=s(null);if(w.current===null){var k={hasValue:!1,value:null};w.current=k}else k=w.current;w=d(function(){function N(T){if(!_){if(_=!0,E=T,T=g(T),x!==void 0&&k.hasValue){var O=k.value;if(x(O,T))return L=O}return L=T}if(O=L,r(E,T))return O;var Z=g(T);return x!==void 0&&x(O,Z)?(E=T,O):(E=T,L=Z)}var _=!1,E,L,D=p===void 0?null:p;return[function(){return N(y())},D===null?void 0:function(){return N(D())}]},[y,p,g,x]);var j=i(m,w[0],w[1]);return o(function(){k.hasValue=!0,k.value=j},[j]),f(j),j},D1}var s3;function I$(){return s3||(s3=1,z1.exports=U$()),z1.exports}var P$=I$();const F$=Nc(P$),V$={},o3=e=>{let t;const n=new Set,r=(y,p)=>{const g=typeof y=="function"?y(t):y;if(!Object.is(g,t)){const x=t;t=p??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(w=>w(t,x))}},i=()=>t,f={setState:r,getState:i,getInitialState:()=>m,subscribe:y=>(n.add(y),()=>n.delete(y)),destroy:()=>{(V$?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},m=t=e(r,i,f);return f},G$=e=>e?o3(e):o3,{useDebugValue:Y$}=n6,{useSyncExternalStoreWithSelector:X$}=F$,K$=e=>e;function P8(e,t=K$,n){const r=X$(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Y$(r),r}const u3=(e,t)=>{const n=G$(e),r=(i,s=t)=>P8(n,i,s);return Object.assign(r,n),r},Z$=(e,t)=>e?u3(e,t):u3;function bn(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const Lf=A.createContext(null),Q$=Lf.Provider,F8=bi.error001();function $t(e,t){const n=A.useContext(Lf);if(n===null)throw new Error(F8);return P8(n,e,t)}function Sn(){const e=A.useContext(Lf);if(e===null)throw new Error(F8);return A.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const c3={display:"none"},W$={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},V8="react-flow__node-desc",G8="react-flow__edge-desc",J$="react-flow__aria-live",eH=e=>e.ariaLiveMessage,tH=e=>e.ariaLabelConfig;function nH({rfId:e}){const t=$t(eH);return c.jsx("div",{id:`${J$}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:W$,children:t})}function rH({rfId:e,disableKeyboardA11y:t}){const n=$t(tH);return c.jsxs(c.Fragment,{children:[c.jsx("div",{id:`${V8}-${e}`,style:c3,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),c.jsx("div",{id:`${G8}-${e}`,style:c3,children:n["edge.a11yDescription.default"]}),!t&&c.jsx(nH,{rfId:e})]})}const Rf=A.forwardRef(({position:e="top-left",children:t,className:n,style:r,...i},s)=>{const o=`${e}`.split("-");return c.jsx("div",{className:Qn(["react-flow__panel",n,...o]),style:r,ref:s,...i,children:t})});Rf.displayName="Panel";function aH({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:c.jsx(Rf,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:c.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const iH=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},yd=e=>e.id;function lH(e,t){return bn(e.selectedNodes.map(yd),t.selectedNodes.map(yd))&&bn(e.selectedEdges.map(yd),t.selectedEdges.map(yd))}function sH({onSelectionChange:e}){const t=Sn(),{selectedNodes:n,selectedEdges:r}=$t(iH,lH);return A.useEffect(()=>{const i={nodes:n,edges:r};e==null||e(i),t.getState().onSelectionChangeHandlers.forEach(s=>s(i))},[n,r,e]),null}const oH=e=>!!e.onSelectionChangeHandlers;function uH({onSelectionChange:e}){const t=$t(oH);return e||t?c.jsx(sH,{onSelectionChange:e}):null}const Dp=typeof window<"u"?A.useLayoutEffect:A.useEffect,Y8=[0,0],cH={x:0,y:0,zoom:1},dH=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],d3=[...dH,"rfId"],fH=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),f3={translateExtent:xc,nodeOrigin:Y8,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function hH(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:s,setNodeExtent:o,reset:d,setDefaultNodesAndEdges:f}=$t(fH,bn),m=Sn();Dp(()=>(f(e.defaultNodes,e.defaultEdges),()=>{y.current=f3,d()}),[]);const y=A.useRef(f3);return Dp(()=>{for(const p of d3){const g=e[p],x=y.current[p];g!==x&&(typeof e[p]>"u"||(p==="nodes"?t(g):p==="edges"?n(g):p==="minZoom"?r(g):p==="maxZoom"?i(g):p==="translateExtent"?s(g):p==="nodeExtent"?o(g):p==="ariaLabelConfig"?m.setState({ariaLabelConfig:ZO(g)}):p==="fitView"?m.setState({fitViewQueued:g}):p==="fitViewOptions"?m.setState({fitViewOptions:g}):m.setState({[p]:g})))}y.current=e},d3.map(p=>e[p])),null}function h3(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function mH(e){var r;const[t,n]=A.useState(e==="system"?null:e);return A.useEffect(()=>{if(e!=="system"){n(e);return}const i=h3(),s=()=>n(i!=null&&i.matches?"dark":"light");return s(),i==null||i.addEventListener("change",s),()=>{i==null||i.removeEventListener("change",s)}},[e]),t!==null?t:(r=h3())!=null&&r.matches?"dark":"light"}const m3=typeof document<"u"?document:null;function kc(e=null,t={target:m3,actInsideInputWithModifier:!0}){const[n,r]=A.useState(!1),i=A.useRef(!1),s=A.useRef(new Set([])),[o,d]=A.useMemo(()=>{if(e!==null){const m=(Array.isArray(e)?e:[e]).filter(p=>typeof p=="string").map(p=>p.replace("+",`
|
|
374
|
+
`).replace(`
|
|
375
|
+
|
|
376
|
+
`,`
|
|
377
|
+
+`).split(`
|
|
378
|
+
`)),y=m.reduce((p,g)=>p.concat(...g),[]);return[m,y]}return[[],[]]},[e]);return A.useEffect(()=>{const f=(t==null?void 0:t.target)??m3,m=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const y=x=>{var j,N;if(i.current=x.ctrlKey||x.metaKey||x.shiftKey||x.altKey,(!i.current||i.current&&!m)&&C8(x))return!1;const k=g3(x.code,d);if(s.current.add(x[k]),p3(o,s.current,!1)){const _=((N=(j=x.composedPath)==null?void 0:j.call(x))==null?void 0:N[0])||x.target,E=(_==null?void 0:_.nodeName)==="BUTTON"||(_==null?void 0:_.nodeName)==="A";t.preventDefault!==!1&&(i.current||!E)&&x.preventDefault(),r(!0)}},p=x=>{const w=g3(x.code,d);p3(o,s.current,!0)?(r(!1),s.current.clear()):s.current.delete(x[w]),x.key==="Meta"&&s.current.clear(),i.current=!1},g=()=>{s.current.clear(),r(!1)};return f==null||f.addEventListener("keydown",y),f==null||f.addEventListener("keyup",p),window.addEventListener("blur",g),window.addEventListener("contextmenu",g),()=>{f==null||f.removeEventListener("keydown",y),f==null||f.removeEventListener("keyup",p),window.removeEventListener("blur",g),window.removeEventListener("contextmenu",g)}}},[e,r]),n}function p3(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(i=>t.has(i)))}function g3(e,t){return t.includes(e)?"code":"key"}const pH=()=>{const e=Sn();return A.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,n):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,i,s],panZoom:o}=e.getState();return o?(await o.setViewport({x:t.x??r,y:t.y??i,zoom:t.zoom??s},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:i,minZoom:s,maxZoom:o,panZoom:d}=e.getState(),f=Hg(t,r,i,s,o,(n==null?void 0:n.padding)??.1);return d?(await d.setViewport(f,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:i,snapToGrid:s,domNode:o}=e.getState();if(!o)return t;const{x:d,y:f}=o.getBoundingClientRect(),m={x:t.x-d,y:t.y-f},y=n.snapGrid??i,p=n.snapToGrid??s;return Uc(m,r,p,y)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:i,y:s}=r.getBoundingClientRect(),o=Jd(t,n);return{x:o.x+i,y:o.y+s}}}),[])};function X8(e,t){const n=[],r=new Map,i=[];for(const s of e)if(s.type==="add"){i.push(s);continue}else if(s.type==="remove"||s.type==="replace")r.set(s.id,[s]);else{const o=r.get(s.id);o?o.push(s):r.set(s.id,[s])}for(const s of t){const o=r.get(s.id);if(!o){n.push(s);continue}if(o[0].type==="remove")continue;if(o[0].type==="replace"){n.push({...o[0].item});continue}const d={...s};for(const f of o)gH(f,d);n.push(d)}return i.length&&i.forEach(s=>{s.index!==void 0?n.splice(s.index,0,{...s.item}):n.push({...s.item})}),n}function gH(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function yH(e,t){return X8(e,t)}function vH(e,t){return X8(e,t)}function _s(e,t){return{id:e,type:"select",selected:t}}function To(e,t=new Set,n=!1){const r=[];for(const[i,s]of e){const o=t.has(i);!(s.selected===void 0&&!o)&&s.selected!==o&&(n&&(s.selected=o),r.push(_s(s.id,o)))}return r}function y3({items:e=[],lookup:t}){var i;const n=[],r=new Map(e.map(s=>[s.id,s]));for(const[s,o]of e.entries()){const d=t.get(o.id),f=((i=d==null?void 0:d.internals)==null?void 0:i.userNode)??d;f!==void 0&&f!==o&&n.push({id:o.id,item:o,type:"replace"}),f===void 0&&n.push({item:o,type:"add",index:s})}for(const[s]of t)r.get(s)===void 0&&n.push({id:s,type:"remove"});return n}function v3(e){return{id:e.id,type:"remove"}}const x3=e=>qO(e),xH=e=>v8(e);function K8(e){return A.forwardRef(e)}function b3(e){const[t,n]=A.useState(BigInt(0)),[r]=A.useState(()=>bH(()=>n(i=>i+BigInt(1))));return Dp(()=>{const i=r.get();i.length&&(e(i),r.reset())},[t]),r}function bH(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const Z8=A.createContext(null);function wH({children:e}){const t=Sn(),n=A.useCallback(d=>{const{nodes:f=[],setNodes:m,hasDefaultNodes:y,onNodesChange:p,nodeLookup:g,fitViewQueued:x,onNodesChangeMiddlewareMap:w}=t.getState();let k=f;for(const N of d)k=typeof N=="function"?N(k):N;let j=y3({items:k,lookup:g});for(const N of w.values())j=N(j);y&&m(k),j.length>0?p==null||p(j):x&&window.requestAnimationFrame(()=>{const{fitViewQueued:N,nodes:_,setNodes:E}=t.getState();N&&E(_)})},[]),r=b3(n),i=A.useCallback(d=>{const{edges:f=[],setEdges:m,hasDefaultEdges:y,onEdgesChange:p,edgeLookup:g}=t.getState();let x=f;for(const w of d)x=typeof w=="function"?w(x):w;y?m(x):p&&p(y3({items:x,lookup:g}))},[]),s=b3(i),o=A.useMemo(()=>({nodeQueue:r,edgeQueue:s}),[]);return c.jsx(Z8.Provider,{value:o,children:e})}function SH(){const e=A.useContext(Z8);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const kH=e=>!!e.panZoom;function Gg(){const e=pH(),t=Sn(),n=SH(),r=$t(kH),i=A.useMemo(()=>{const s=p=>t.getState().nodeLookup.get(p),o=p=>{n.nodeQueue.push(p)},d=p=>{n.edgeQueue.push(p)},f=p=>{var N,_;const{nodeLookup:g,nodeOrigin:x}=t.getState(),w=x3(p)?p:g.get(p.id),k=w.parentId?N8(w.position,w.measured,w.parentId,g,x):w.position,j={...w,position:k,width:((N=w.measured)==null?void 0:N.width)??w.width,height:((_=w.measured)==null?void 0:_.height)??w.height};return Go(j)},m=(p,g,x={replace:!1})=>{o(w=>w.map(k=>{if(k.id===p){const j=typeof g=="function"?g(k):g;return x.replace&&x3(j)?j:{...k,...j}}return k}))},y=(p,g,x={replace:!1})=>{d(w=>w.map(k=>{if(k.id===p){const j=typeof g=="function"?g(k):g;return x.replace&&xH(j)?j:{...k,...j}}return k}))};return{getNodes:()=>t.getState().nodes.map(p=>({...p})),getNode:p=>{var g;return(g=s(p))==null?void 0:g.internals.userNode},getInternalNode:s,getEdges:()=>{const{edges:p=[]}=t.getState();return p.map(g=>({...g}))},getEdge:p=>t.getState().edgeLookup.get(p),setNodes:o,setEdges:d,addNodes:p=>{const g=Array.isArray(p)?p:[p];n.nodeQueue.push(x=>[...x,...g])},addEdges:p=>{const g=Array.isArray(p)?p:[p];n.edgeQueue.push(x=>[...x,...g])},toObject:()=>{const{nodes:p=[],edges:g=[],transform:x}=t.getState(),[w,k,j]=x;return{nodes:p.map(N=>({...N})),edges:g.map(N=>({...N})),viewport:{x:w,y:k,zoom:j}}},deleteElements:async({nodes:p=[],edges:g=[]})=>{const{nodes:x,edges:w,onNodesDelete:k,onEdgesDelete:j,triggerNodeChanges:N,triggerEdgeChanges:_,onDelete:E,onBeforeDelete:L}=t.getState(),{nodes:D,edges:T}=await VO({nodesToRemove:p,edgesToRemove:g,nodes:x,edges:w,onBeforeDelete:L}),O=T.length>0,Z=D.length>0;if(O){const V=T.map(v3);j==null||j(T),_(V)}if(Z){const V=D.map(v3);k==null||k(D),N(V)}return(Z||O)&&(E==null||E({nodes:D,edges:T})),{deletedNodes:D,deletedEdges:T}},getIntersectingNodes:(p,g=!0,x)=>{const w=Vx(p),k=w?p:f(p),j=x!==void 0;return k?(x||t.getState().nodes).filter(N=>{const _=t.getState().nodeLookup.get(N.id);if(_&&!w&&(N.id===p.id||!_.internals.positionAbsolute))return!1;const E=Go(j?N:_),L=wc(E,k);return g&&L>0||L>=E.width*E.height||L>=k.width*k.height}):[]},isNodeIntersecting:(p,g,x=!0)=>{const k=Vx(p)?p:f(p);if(!k)return!1;const j=wc(k,g);return x&&j>0||j>=g.width*g.height||j>=k.width*k.height},updateNode:m,updateNodeData:(p,g,x={replace:!1})=>{m(p,w=>{const k=typeof g=="function"?g(w):g;return x.replace?{...w,data:k}:{...w,data:{...w.data,...k}}},x)},updateEdge:y,updateEdgeData:(p,g,x={replace:!1})=>{y(p,w=>{const k=typeof g=="function"?g(w):g;return x.replace?{...w,data:k}:{...w,data:{...w.data,...k}}},x)},getNodesBounds:p=>{const{nodeLookup:g,nodeOrigin:x}=t.getState();return UO(p,{nodeLookup:g,nodeOrigin:x})},getHandleConnections:({type:p,id:g,nodeId:x})=>{var w;return Array.from(((w=t.getState().connectionLookup.get(`${x}-${p}${g?`-${g}`:""}`))==null?void 0:w.values())??[])},getNodeConnections:({type:p,handleId:g,nodeId:x})=>{var w;return Array.from(((w=t.getState().connectionLookup.get(`${x}${p?g?`-${p}-${g}`:`-${p}`:""}`))==null?void 0:w.values())??[])},fitView:async p=>{const g=t.getState().fitViewResolver??KO();return t.setState({fitViewQueued:!0,fitViewOptions:p,fitViewResolver:g}),n.nodeQueue.push(x=>[...x]),g.promise}}},[]);return A.useMemo(()=>({...i,...e,viewportInitialized:r}),[r])}const w3=e=>e.selected,NH=typeof window<"u"?window:void 0;function jH({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=Sn(),{deleteElements:r}=Gg(),i=kc(e,{actInsideInputWithModifier:!1}),s=kc(t,{target:NH});A.useEffect(()=>{if(i){const{edges:o,nodes:d}=n.getState();r({nodes:d.filter(w3),edges:o.filter(w3)}),n.setState({nodesSelectionActive:!1})}},[i]),A.useEffect(()=>{n.setState({multiSelectionActive:s})},[s])}function CH(e){const t=Sn();A.useEffect(()=>{const n=()=>{var i,s,o,d;if(!e.current||!(((s=(i=e.current).checkVisibility)==null?void 0:s.call(i))??!0))return!1;const r=qg(e.current);(r.height===0||r.width===0)&&((d=(o=t.getState()).onError)==null||d.call(o,"004",bi.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const Bf={position:"absolute",width:"100%",height:"100%",top:0,left:0},EH=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function MH({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:i=.5,panOnScrollMode:s=Ds.Free,zoomOnDoubleClick:o=!0,panOnDrag:d=!0,defaultViewport:f,translateExtent:m,minZoom:y,maxZoom:p,zoomActivationKeyCode:g,preventScrolling:x=!0,children:w,noWheelClassName:k,noPanClassName:j,onViewportChange:N,isControlledViewport:_,paneClickDistance:E,selectionOnDrag:L}){const D=Sn(),T=A.useRef(null),{userSelectionActive:O,lib:Z,connectionInProgress:V}=$t(EH,bn),P=kc(g),K=A.useRef();CH(T);const X=A.useCallback(le=>{N==null||N({x:le[0],y:le[1],zoom:le[2]}),_||D.setState({transform:le})},[N,_]);return A.useEffect(()=>{if(T.current){K.current=z$({domNode:T.current,minZoom:y,maxZoom:p,translateExtent:m,viewport:f,onDraggingChange:q=>D.setState(Q=>Q.paneDragging===q?Q:{paneDragging:q}),onPanZoomStart:(q,Q)=>{const{onViewportChangeStart:ee,onMoveStart:ne}=D.getState();ne==null||ne(q,Q),ee==null||ee(Q)},onPanZoom:(q,Q)=>{const{onViewportChange:ee,onMove:ne}=D.getState();ne==null||ne(q,Q),ee==null||ee(Q)},onPanZoomEnd:(q,Q)=>{const{onViewportChangeEnd:ee,onMoveEnd:ne}=D.getState();ne==null||ne(q,Q),ee==null||ee(Q)}});const{x:le,y:F,zoom:Y}=K.current.getViewport();return D.setState({panZoom:K.current,transform:[le,F,Y],domNode:T.current.closest(".react-flow")}),()=>{var q;(q=K.current)==null||q.destroy()}}},[]),A.useEffect(()=>{var le;(le=K.current)==null||le.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:i,panOnScrollMode:s,zoomOnDoubleClick:o,panOnDrag:d,zoomActivationKeyPressed:P,preventScrolling:x,noPanClassName:j,userSelectionActive:O,noWheelClassName:k,lib:Z,onTransformChange:X,connectionInProgress:V,selectionOnDrag:L,paneClickDistance:E})},[e,t,n,r,i,s,o,d,P,x,j,O,k,Z,X,V,L,E]),c.jsx("div",{className:"react-flow__renderer",ref:T,style:Bf,children:w})}const _H=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function AH(){const{userSelectionActive:e,userSelectionRect:t}=$t(_H,bn);return e&&t?c.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const B1=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},TH=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function zH({isSelecting:e,selectionKeyPressed:t,selectionMode:n=bc.Full,panOnDrag:r,paneClickDistance:i,selectionOnDrag:s,onSelectionStart:o,onSelectionEnd:d,onPaneClick:f,onPaneContextMenu:m,onPaneScroll:y,onPaneMouseEnter:p,onPaneMouseMove:g,onPaneMouseLeave:x,children:w}){const k=Sn(),{userSelectionActive:j,elementsSelectable:N,dragging:_,connectionInProgress:E}=$t(TH,bn),L=N&&(e||j),D=A.useRef(null),T=A.useRef(),O=A.useRef(new Set),Z=A.useRef(new Set),V=A.useRef(!1),P=ee=>{if(V.current||E){V.current=!1;return}f==null||f(ee),k.getState().resetSelectedElements(),k.setState({nodesSelectionActive:!1})},K=ee=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){ee.preventDefault();return}m==null||m(ee)},X=y?ee=>y(ee):void 0,le=ee=>{V.current&&(ee.stopPropagation(),V.current=!1)},F=ee=>{var pe,xe;const{domNode:ne}=k.getState();if(T.current=ne==null?void 0:ne.getBoundingClientRect(),!T.current)return;const R=ee.target===D.current;if(!R&&!!ee.target.closest(".nokey")||!e||!(s&&R||t)||ee.button!==0||!ee.isPrimary)return;(xe=(pe=ee.target)==null?void 0:pe.setPointerCapture)==null||xe.call(pe,ee.pointerId),V.current=!1;const{x:B,y:ce}=Ya(ee.nativeEvent,T.current);k.setState({userSelectionRect:{width:0,height:0,startX:B,startY:ce,x:B,y:ce}}),R||(ee.stopPropagation(),ee.preventDefault())},Y=ee=>{const{userSelectionRect:ne,transform:R,nodeLookup:H,edgeLookup:W,connectionLookup:B,triggerNodeChanges:ce,triggerEdgeChanges:pe,defaultEdgeOptions:xe,resetSelectedElements:be}=k.getState();if(!T.current||!ne)return;const{x:ye,y:Ce}=Ya(ee.nativeEvent,T.current),{startX:Ge,startY:Pe}=ne;if(!V.current){const We=t?0:i;if(Math.hypot(ye-Ge,Ce-Pe)<=We)return;be(),o==null||o(ee)}V.current=!0;const $e={startX:Ge,startY:Pe,x:ye<Ge?ye:Ge,y:Ce<Pe?Ce:Pe,width:Math.abs(ye-Ge),height:Math.abs(Ce-Pe)},qe=O.current,nt=Z.current;O.current=new Set($g(H,$e,R,n===bc.Partial,!0).map(We=>We.id)),Z.current=new Set;const lt=(xe==null?void 0:xe.selectable)??!0;for(const We of O.current){const Dt=B.get(We);if(Dt)for(const{edgeId:ke}of Dt.values()){const et=W.get(ke);et&&(et.selectable??lt)&&Z.current.add(ke)}}if(!Gx(qe,O.current)){const We=To(H,O.current,!0);ce(We)}if(!Gx(nt,Z.current)){const We=To(W,Z.current);pe(We)}k.setState({userSelectionRect:$e,userSelectionActive:!0,nodesSelectionActive:!1})},q=ee=>{var ne,R;ee.button===0&&((R=(ne=ee.target)==null?void 0:ne.releasePointerCapture)==null||R.call(ne,ee.pointerId),!j&&ee.target===D.current&&k.getState().userSelectionRect&&(P==null||P(ee)),k.setState({userSelectionActive:!1,userSelectionRect:null}),V.current&&(d==null||d(ee),k.setState({nodesSelectionActive:O.current.size>0})))},Q=r===!0||Array.isArray(r)&&r.includes(0);return c.jsxs("div",{className:Qn(["react-flow__pane",{draggable:Q,dragging:_,selection:e}]),onClick:L?void 0:B1(P,D),onContextMenu:B1(K,D),onWheel:B1(X,D),onPointerEnter:L?void 0:p,onPointerMove:L?Y:g,onPointerUp:L?q:void 0,onPointerDownCapture:L?F:void 0,onClickCapture:L?le:void 0,onPointerLeave:x,ref:D,style:Bf,children:[w,c.jsx(AH,{})]})}function Lp({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:i,unselectNodesAndEdges:s,multiSelectionActive:o,nodeLookup:d,onError:f}=t.getState(),m=d.get(e);if(!m){f==null||f("012",bi.error012(e));return}t.setState({nodesSelectionActive:!1}),m.selected?(n||m.selected&&o)&&(s({nodes:[m],edges:[]}),requestAnimationFrame(()=>{var y;return(y=r==null?void 0:r.current)==null?void 0:y.blur()})):i([e])}function Q8({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:s,nodeClickDistance:o}){const d=Sn(),[f,m]=A.useState(!1),y=A.useRef();return A.useEffect(()=>{y.current=v$({getStoreItems:()=>d.getState(),onNodeMouseDown:p=>{Lp({id:p,store:d,nodeRef:e})},onDragStart:()=>{m(!0)},onDragStop:()=>{m(!1)}})},[]),A.useEffect(()=>{if(!(t||!e.current||!y.current))return y.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:s,nodeId:i,nodeClickDistance:o}),()=>{var p;(p=y.current)==null||p.destroy()}},[n,r,t,s,e,i,o]),f}const DH=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function W8(){const e=Sn();return A.useCallback(n=>{const{nodeExtent:r,snapToGrid:i,snapGrid:s,nodesDraggable:o,onError:d,updateNodePositions:f,nodeLookup:m,nodeOrigin:y}=e.getState(),p=new Map,g=DH(o),x=i?s[0]:5,w=i?s[1]:5,k=n.direction.x*x*n.factor,j=n.direction.y*w*n.factor;for(const[,N]of m){if(!g(N))continue;let _={x:N.internals.positionAbsolute.x+k,y:N.internals.positionAbsolute.y+j};i&&(_=qc(_,s));const{position:E,positionAbsolute:L}=x8({nodeId:N.id,nextPosition:_,nodeLookup:m,nodeExtent:r,nodeOrigin:y,onError:d});N.position=E,N.internals.positionAbsolute=L,p.set(N.id,N)}f(p)},[])}const Yg=A.createContext(null),LH=Yg.Provider;Yg.Consumer;const J8=()=>A.useContext(Yg),RH=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),BH=(e,t,n)=>r=>{const{connectionClickStartHandle:i,connectionMode:s,connection:o}=r,{fromHandle:d,toHandle:f,isValid:m}=o,y=(f==null?void 0:f.nodeId)===e&&(f==null?void 0:f.id)===t&&(f==null?void 0:f.type)===n;return{connectingFrom:(d==null?void 0:d.nodeId)===e&&(d==null?void 0:d.id)===t&&(d==null?void 0:d.type)===n,connectingTo:y,clickConnecting:(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.id)===t&&(i==null?void 0:i.type)===n,isPossibleEndHandle:s===Fo.Strict?(d==null?void 0:d.type)!==n:e!==(d==null?void 0:d.nodeId)||t!==(d==null?void 0:d.id),connectionInProcess:!!d,clickConnectionInProcess:!!i,valid:y&&m}};function OH({type:e="source",position:t=Ze.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:s=!0,id:o,onConnect:d,children:f,className:m,onMouseDown:y,onTouchStart:p,...g},x){var Y,q;const w=o||null,k=e==="target",j=Sn(),N=J8(),{connectOnClick:_,noPanClassName:E,rfId:L}=$t(RH,bn),{connectingFrom:D,connectingTo:T,clickConnecting:O,isPossibleEndHandle:Z,connectionInProcess:V,clickConnectionInProcess:P,valid:K}=$t(BH(N,w,e),bn);N||(q=(Y=j.getState()).onError)==null||q.call(Y,"010",bi.error010());const X=Q=>{const{defaultEdgeOptions:ee,onConnect:ne,hasDefaultEdges:R}=j.getState(),H={...ee,...Q};if(R){const{edges:W,setEdges:B}=j.getState();B(n$(H,W))}ne==null||ne(H),d==null||d(H)},le=Q=>{if(!N)return;const ee=E8(Q.nativeEvent);if(i&&(ee&&Q.button===0||!ee)){const ne=j.getState();zp.onPointerDown(Q.nativeEvent,{handleDomNode:Q.currentTarget,autoPanOnConnect:ne.autoPanOnConnect,connectionMode:ne.connectionMode,connectionRadius:ne.connectionRadius,domNode:ne.domNode,nodeLookup:ne.nodeLookup,lib:ne.lib,isTarget:k,handleId:w,nodeId:N,flowId:ne.rfId,panBy:ne.panBy,cancelConnection:ne.cancelConnection,onConnectStart:ne.onConnectStart,onConnectEnd:(...R)=>{var H,W;return(W=(H=j.getState()).onConnectEnd)==null?void 0:W.call(H,...R)},updateConnection:ne.updateConnection,onConnect:X,isValidConnection:n||((...R)=>{var H,W;return((W=(H=j.getState()).isValidConnection)==null?void 0:W.call(H,...R))??!0}),getTransform:()=>j.getState().transform,getFromHandle:()=>j.getState().connection.fromHandle,autoPanSpeed:ne.autoPanSpeed,dragThreshold:ne.connectionDragThreshold})}ee?y==null||y(Q):p==null||p(Q)},F=Q=>{const{onClickConnectStart:ee,onClickConnectEnd:ne,connectionClickStartHandle:R,connectionMode:H,isValidConnection:W,lib:B,rfId:ce,nodeLookup:pe,connection:xe}=j.getState();if(!N||!R&&!i)return;if(!R){ee==null||ee(Q.nativeEvent,{nodeId:N,handleId:w,handleType:e}),j.setState({connectionClickStartHandle:{nodeId:N,type:e,id:w}});return}const be=j8(Q.target),ye=n||W,{connection:Ce,isValid:Ge}=zp.isValid(Q.nativeEvent,{handle:{nodeId:N,id:w,type:e},connectionMode:H,fromNodeId:R.nodeId,fromHandleId:R.id||null,fromType:R.type,isValidConnection:ye,flowId:ce,doc:be,lib:B,nodeLookup:pe});Ge&&Ce&&X(Ce);const Pe=structuredClone(xe);delete Pe.inProgress,Pe.toPosition=Pe.toHandle?Pe.toHandle.position:null,ne==null||ne(Q,Pe),j.setState({connectionClickStartHandle:null})};return c.jsx("div",{"data-handleid":w,"data-nodeid":N,"data-handlepos":t,"data-id":`${L}-${N}-${w}-${e}`,className:Qn(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",E,m,{source:!k,target:k,connectable:r,connectablestart:i,connectableend:s,clickconnecting:O,connectingfrom:D,connectingto:T,valid:K,connectionindicator:r&&(!V||Z)&&(V||P?s:i)}]),onMouseDown:le,onTouchStart:le,onClick:_?F:void 0,ref:x,...g,children:f})}const fi=A.memo(K8(OH));function $H({data:e,isConnectable:t,sourcePosition:n=Ze.Bottom}){return c.jsxs(c.Fragment,{children:[e==null?void 0:e.label,c.jsx(fi,{type:"source",position:n,isConnectable:t})]})}function HH({data:e,isConnectable:t,targetPosition:n=Ze.Top,sourcePosition:r=Ze.Bottom}){return c.jsxs(c.Fragment,{children:[c.jsx(fi,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,c.jsx(fi,{type:"source",position:r,isConnectable:t})]})}function qH(){return null}function UH({data:e,isConnectable:t,targetPosition:n=Ze.Top}){return c.jsxs(c.Fragment,{children:[c.jsx(fi,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const ef={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},S3={input:$H,default:HH,output:UH,group:qH};function IH(e){var t,n,r,i;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((i=e.style)==null?void 0:i.height)}}const PH=e=>{const{width:t,height:n,x:r,y:i}=Hc(e.nodeLookup,{filter:s=>!!s.selected});return{width:Ga(t)?t:null,height:Ga(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${i}px)`}};function FH({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Sn(),{width:i,height:s,transformString:o,userSelectionActive:d}=$t(PH,bn),f=W8(),m=A.useRef(null);A.useEffect(()=>{var x;n||(x=m.current)==null||x.focus({preventScroll:!0})},[n]);const y=!d&&i!==null&&s!==null;if(Q8({nodeRef:m,disabled:!y}),!y)return null;const p=e?x=>{const w=r.getState().nodes.filter(k=>k.selected);e(x,w)}:void 0,g=x=>{Object.prototype.hasOwnProperty.call(ef,x.key)&&(x.preventDefault(),f({direction:ef[x.key],factor:x.shiftKey?4:1}))};return c.jsx("div",{className:Qn(["react-flow__nodesselection","react-flow__container",t]),style:{transform:o},children:c.jsx("div",{ref:m,className:"react-flow__nodesselection-rect",onContextMenu:p,tabIndex:n?void 0:-1,onKeyDown:n?void 0:g,style:{width:i,height:s}})})}const k3=typeof window<"u"?window:void 0,VH=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function ew({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:s,onPaneScroll:o,paneClickDistance:d,deleteKeyCode:f,selectionKeyCode:m,selectionOnDrag:y,selectionMode:p,onSelectionStart:g,onSelectionEnd:x,multiSelectionKeyCode:w,panActivationKeyCode:k,zoomActivationKeyCode:j,elementsSelectable:N,zoomOnScroll:_,zoomOnPinch:E,panOnScroll:L,panOnScrollSpeed:D,panOnScrollMode:T,zoomOnDoubleClick:O,panOnDrag:Z,defaultViewport:V,translateExtent:P,minZoom:K,maxZoom:X,preventScrolling:le,onSelectionContextMenu:F,noWheelClassName:Y,noPanClassName:q,disableKeyboardA11y:Q,onViewportChange:ee,isControlledViewport:ne}){const{nodesSelectionActive:R,userSelectionActive:H}=$t(VH,bn),W=kc(m,{target:k3}),B=kc(k,{target:k3}),ce=B||Z,pe=B||L,xe=y&&ce!==!0,be=W||H||xe;return jH({deleteKeyCode:f,multiSelectionKeyCode:w}),c.jsx(MH,{onPaneContextMenu:s,elementsSelectable:N,zoomOnScroll:_,zoomOnPinch:E,panOnScroll:pe,panOnScrollSpeed:D,panOnScrollMode:T,zoomOnDoubleClick:O,panOnDrag:!W&&ce,defaultViewport:V,translateExtent:P,minZoom:K,maxZoom:X,zoomActivationKeyCode:j,preventScrolling:le,noWheelClassName:Y,noPanClassName:q,onViewportChange:ee,isControlledViewport:ne,paneClickDistance:d,selectionOnDrag:xe,children:c.jsxs(zH,{onSelectionStart:g,onSelectionEnd:x,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:s,onPaneScroll:o,panOnDrag:ce,isSelecting:!!be,selectionMode:p,selectionKeyPressed:W,paneClickDistance:d,selectionOnDrag:xe,children:[e,R&&c.jsx(FH,{onSelectionContextMenu:F,noPanClassName:q,disableKeyboardA11y:Q})]})})}ew.displayName="FlowRenderer";const GH=A.memo(ew),YH=e=>t=>e?$g(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function XH(e){return $t(A.useCallback(YH(e),[e]),bn)}const KH=e=>e.updateNodeInternals;function ZH(){const e=$t(KH),[t]=A.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(i=>{const s=i.target.getAttribute("data-id");r.set(s,{id:s,nodeElement:i.target,force:!0})}),e(r)}));return A.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function QH({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const i=Sn(),s=A.useRef(null),o=A.useRef(null),d=A.useRef(e.sourcePosition),f=A.useRef(e.targetPosition),m=A.useRef(t),y=n&&!!e.internals.handleBounds;return A.useEffect(()=>{s.current&&!e.hidden&&(!y||o.current!==s.current)&&(o.current&&(r==null||r.unobserve(o.current)),r==null||r.observe(s.current),o.current=s.current)},[y,e.hidden]),A.useEffect(()=>()=>{o.current&&(r==null||r.unobserve(o.current),o.current=null)},[]),A.useEffect(()=>{if(s.current){const p=m.current!==t,g=d.current!==e.sourcePosition,x=f.current!==e.targetPosition;(p||g||x)&&(m.current=t,d.current=e.sourcePosition,f.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:s.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),s}function WH({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onContextMenu:s,onDoubleClick:o,nodesDraggable:d,elementsSelectable:f,nodesConnectable:m,nodesFocusable:y,resizeObserver:p,noDragClassName:g,noPanClassName:x,disableKeyboardA11y:w,rfId:k,nodeTypes:j,nodeClickDistance:N,onError:_}){const{node:E,internals:L,isParent:D}=$t(ye=>{const Ce=ye.nodeLookup.get(e),Ge=ye.parentLookup.has(e);return{node:Ce,internals:Ce.internals,isParent:Ge}},bn);let T=E.type||"default",O=(j==null?void 0:j[T])||S3[T];O===void 0&&(_==null||_("003",bi.error003(T)),T="default",O=(j==null?void 0:j.default)||S3.default);const Z=!!(E.draggable||d&&typeof E.draggable>"u"),V=!!(E.selectable||f&&typeof E.selectable>"u"),P=!!(E.connectable||m&&typeof E.connectable>"u"),K=!!(E.focusable||y&&typeof E.focusable>"u"),X=Sn(),le=k8(E),F=QH({node:E,nodeType:T,hasDimensions:le,resizeObserver:p}),Y=Q8({nodeRef:F,disabled:E.hidden||!Z,noDragClassName:g,handleSelector:E.dragHandle,nodeId:e,isSelectable:V,nodeClickDistance:N}),q=W8();if(E.hidden)return null;const Q=sl(E),ee=IH(E),ne=V||Z||t||n||r||i,R=n?ye=>n(ye,{...L.userNode}):void 0,H=r?ye=>r(ye,{...L.userNode}):void 0,W=i?ye=>i(ye,{...L.userNode}):void 0,B=s?ye=>s(ye,{...L.userNode}):void 0,ce=o?ye=>o(ye,{...L.userNode}):void 0,pe=ye=>{const{selectNodesOnDrag:Ce,nodeDragThreshold:Ge}=X.getState();V&&(!Ce||!Z||Ge>0)&&Lp({id:e,store:X,nodeRef:F}),t&&t(ye,{...L.userNode})},xe=ye=>{if(!(C8(ye.nativeEvent)||w)){if(m8.includes(ye.key)&&V){const Ce=ye.key==="Escape";Lp({id:e,store:X,unselect:Ce,nodeRef:F})}else if(Z&&E.selected&&Object.prototype.hasOwnProperty.call(ef,ye.key)){ye.preventDefault();const{ariaLabelConfig:Ce}=X.getState();X.setState({ariaLiveMessage:Ce["node.a11yDescription.ariaLiveMessage"]({direction:ye.key.replace("Arrow","").toLowerCase(),x:~~L.positionAbsolute.x,y:~~L.positionAbsolute.y})}),q({direction:ef[ye.key],factor:ye.shiftKey?4:1})}}},be=()=>{var nt;if(w||!((nt=F.current)!=null&&nt.matches(":focus-visible")))return;const{transform:ye,width:Ce,height:Ge,autoPanOnNodeFocus:Pe,setCenter:$e}=X.getState();if(!Pe)return;$g(new Map([[e,E]]),{x:0,y:0,width:Ce,height:Ge},ye,!0).length>0||$e(E.position.x+Q.width/2,E.position.y+Q.height/2,{zoom:ye[2]})};return c.jsx("div",{className:Qn(["react-flow__node",`react-flow__node-${T}`,{[x]:Z},E.className,{selected:E.selected,selectable:V,parent:D,draggable:Z,dragging:Y}]),ref:F,style:{zIndex:L.z,transform:`translate(${L.positionAbsolute.x}px,${L.positionAbsolute.y}px)`,pointerEvents:ne?"all":"none",visibility:le?"visible":"hidden",...E.style,...ee},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:R,onMouseMove:H,onMouseLeave:W,onContextMenu:B,onClick:pe,onDoubleClick:ce,onKeyDown:K?xe:void 0,tabIndex:K?0:void 0,onFocus:K?be:void 0,role:E.ariaRole??(K?"group":void 0),"aria-roledescription":"node","aria-describedby":w?void 0:`${V8}-${k}`,"aria-label":E.ariaLabel,...E.domAttributes,children:c.jsx(LH,{value:e,children:c.jsx(O,{id:e,data:E.data,type:T,positionAbsoluteX:L.positionAbsolute.x,positionAbsoluteY:L.positionAbsolute.y,selected:E.selected??!1,selectable:V,draggable:Z,deletable:E.deletable??!0,isConnectable:P,sourcePosition:E.sourcePosition,targetPosition:E.targetPosition,dragging:Y,dragHandle:E.dragHandle,zIndex:L.z,parentId:E.parentId,...Q})})})}var JH=A.memo(WH);const eq=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function tw(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,onError:s}=$t(eq,bn),o=XH(e.onlyRenderVisibleElements),d=ZH();return c.jsx("div",{className:"react-flow__nodes",style:Bf,children:o.map(f=>c.jsx(JH,{id:f,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:d,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:s},f))})}tw.displayName="NodeRenderer";const tq=A.memo(tw);function nq(e){return $t(A.useCallback(n=>{if(!e)return n.edges.map(i=>i.id);const r=[];if(n.width&&n.height)for(const i of n.edges){const s=n.nodeLookup.get(i.source),o=n.nodeLookup.get(i.target);s&&o&&JO({sourceNode:s,targetNode:o,width:n.width,height:n.height,transform:n.transform})&&r.push(i.id)}return r},[e]),bn)}const rq=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return c.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},aq=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return c.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},N3={[Qd.Arrow]:rq,[Qd.ArrowClosed]:aq};function iq(e){const t=Sn();return A.useMemo(()=>{var i,s;return Object.prototype.hasOwnProperty.call(N3,e)?N3[e]:((s=(i=t.getState()).onError)==null||s.call(i,"009",bi.error009(e)),null)},[e])}const lq=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:s="strokeWidth",strokeWidth:o,orient:d="auto-start-reverse"})=>{const f=iq(t);return f?c.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:s,orient:d,refX:"0",refY:"0",children:c.jsx(f,{color:n,strokeWidth:o})}):null},nw=({defaultColor:e,rfId:t})=>{const n=$t(s=>s.edges),r=$t(s=>s.defaultEdgeOptions),i=A.useMemo(()=>s$(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return i.length?c.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:c.jsx("defs",{children:i.map(s=>c.jsx(lq,{id:s.id,type:s.type,color:s.color,width:s.width,height:s.height,markerUnits:s.markerUnits,strokeWidth:s.strokeWidth,orient:s.orient},s.id))})}):null};nw.displayName="MarkerDefinitions";var sq=A.memo(nw);function rw({x:e,y:t,label:n,labelStyle:r,labelShowBg:i=!0,labelBgStyle:s,labelBgPadding:o=[2,4],labelBgBorderRadius:d=2,children:f,className:m,...y}){const[p,g]=A.useState({x:1,y:0,width:0,height:0}),x=Qn(["react-flow__edge-textwrapper",m]),w=A.useRef(null);return A.useEffect(()=>{if(w.current){const k=w.current.getBBox();g({x:k.x,y:k.y,width:k.width,height:k.height})}},[n]),n?c.jsxs("g",{transform:`translate(${e-p.width/2} ${t-p.height/2})`,className:x,visibility:p.width?"visible":"hidden",...y,children:[i&&c.jsx("rect",{width:p.width+2*o[0],x:-o[0],y:-o[1],height:p.height+2*o[1],className:"react-flow__edge-textbg",style:s,rx:d,ry:d}),c.jsx("text",{className:"react-flow__edge-text",y:p.height/2,dy:"0.3em",ref:w,style:r,children:n}),f]}):null}rw.displayName="EdgeText";const oq=A.memo(rw);function Of({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:s,labelBgStyle:o,labelBgPadding:d,labelBgBorderRadius:f,interactionWidth:m=20,...y}){return c.jsxs(c.Fragment,{children:[c.jsx("path",{...y,d:e,fill:"none",className:Qn(["react-flow__edge-path",y.className])}),m?c.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:m,className:"react-flow__edge-interaction"}):null,r&&Ga(t)&&Ga(n)?c.jsx(oq,{x:t,y:n,label:r,labelStyle:i,labelShowBg:s,labelBgStyle:o,labelBgPadding:d,labelBgBorderRadius:f}):null]})}function j3({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===Ze.Left||e===Ze.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function aw({sourceX:e,sourceY:t,sourcePosition:n=Ze.Bottom,targetX:r,targetY:i,targetPosition:s=Ze.Top}){const[o,d]=j3({pos:n,x1:e,y1:t,x2:r,y2:i}),[f,m]=j3({pos:s,x1:r,y1:i,x2:e,y2:t}),[y,p,g,x]=M8({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:o,sourceControlY:d,targetControlX:f,targetControlY:m});return[`M${e},${t} C${o},${d} ${f},${m} ${r},${i}`,y,p,g,x]}function iw(e){return A.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:s,sourcePosition:o,targetPosition:d,label:f,labelStyle:m,labelShowBg:y,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:x,style:w,markerEnd:k,markerStart:j,interactionWidth:N})=>{const[_,E,L]=aw({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:s,targetPosition:d}),D=e.isInternal?void 0:t;return c.jsx(Of,{id:D,path:_,labelX:E,labelY:L,label:f,labelStyle:m,labelShowBg:y,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:x,style:w,markerEnd:k,markerStart:j,interactionWidth:N})})}const uq=iw({isInternal:!1}),lw=iw({isInternal:!0});uq.displayName="SimpleBezierEdge";lw.displayName="SimpleBezierEdgeInternal";function sw(e){return A.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:s,label:o,labelStyle:d,labelShowBg:f,labelBgStyle:m,labelBgPadding:y,labelBgBorderRadius:p,style:g,sourcePosition:x=Ze.Bottom,targetPosition:w=Ze.Top,markerEnd:k,markerStart:j,pathOptions:N,interactionWidth:_})=>{const[E,L,D]=_p({sourceX:n,sourceY:r,sourcePosition:x,targetX:i,targetY:s,targetPosition:w,borderRadius:N==null?void 0:N.borderRadius,offset:N==null?void 0:N.offset,stepPosition:N==null?void 0:N.stepPosition}),T=e.isInternal?void 0:t;return c.jsx(Of,{id:T,path:E,labelX:L,labelY:D,label:o,labelStyle:d,labelShowBg:f,labelBgStyle:m,labelBgPadding:y,labelBgBorderRadius:p,style:g,markerEnd:k,markerStart:j,interactionWidth:_})})}const ow=sw({isInternal:!1}),uw=sw({isInternal:!0});ow.displayName="SmoothStepEdge";uw.displayName="SmoothStepEdgeInternal";function cw(e){return A.memo(({id:t,...n})=>{var i;const r=e.isInternal?void 0:t;return c.jsx(ow,{...n,id:r,pathOptions:A.useMemo(()=>{var s;return{borderRadius:0,offset:(s=n.pathOptions)==null?void 0:s.offset}},[(i=n.pathOptions)==null?void 0:i.offset])})})}const cq=cw({isInternal:!1}),dw=cw({isInternal:!0});cq.displayName="StepEdge";dw.displayName="StepEdgeInternal";function fw(e){return A.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:s,label:o,labelStyle:d,labelShowBg:f,labelBgStyle:m,labelBgPadding:y,labelBgBorderRadius:p,style:g,markerEnd:x,markerStart:w,interactionWidth:k})=>{const[j,N,_]=T8({sourceX:n,sourceY:r,targetX:i,targetY:s}),E=e.isInternal?void 0:t;return c.jsx(Of,{id:E,path:j,labelX:N,labelY:_,label:o,labelStyle:d,labelShowBg:f,labelBgStyle:m,labelBgPadding:y,labelBgBorderRadius:p,style:g,markerEnd:x,markerStart:w,interactionWidth:k})})}const dq=fw({isInternal:!1}),hw=fw({isInternal:!0});dq.displayName="StraightEdge";hw.displayName="StraightEdgeInternal";function mw(e){return A.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:s,sourcePosition:o=Ze.Bottom,targetPosition:d=Ze.Top,label:f,labelStyle:m,labelShowBg:y,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:x,style:w,markerEnd:k,markerStart:j,pathOptions:N,interactionWidth:_})=>{const[E,L,D]=_8({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:s,targetPosition:d,curvature:N==null?void 0:N.curvature}),T=e.isInternal?void 0:t;return c.jsx(Of,{id:T,path:E,labelX:L,labelY:D,label:f,labelStyle:m,labelShowBg:y,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:x,style:w,markerEnd:k,markerStart:j,interactionWidth:_})})}const fq=mw({isInternal:!1}),pw=mw({isInternal:!0});fq.displayName="BezierEdge";pw.displayName="BezierEdgeInternal";const C3={default:pw,straight:hw,step:dw,smoothstep:uw,simplebezier:lw},E3={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},hq=(e,t,n)=>n===Ze.Left?e-t:n===Ze.Right?e+t:e,mq=(e,t,n)=>n===Ze.Top?e-t:n===Ze.Bottom?e+t:e,M3="react-flow__edgeupdater";function _3({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:s,onMouseOut:o,type:d}){return c.jsx("circle",{onMouseDown:i,onMouseEnter:s,onMouseOut:o,className:Qn([M3,`${M3}-${d}`]),cx:hq(t,r,e),cy:mq(n,r,e),r,stroke:"transparent",fill:"transparent"})}function pq({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:i,targetX:s,targetY:o,sourcePosition:d,targetPosition:f,onReconnect:m,onReconnectStart:y,onReconnectEnd:p,setReconnecting:g,setUpdateHover:x}){const w=Sn(),k=(L,D)=>{if(L.button!==0)return;const{autoPanOnConnect:T,domNode:O,connectionMode:Z,connectionRadius:V,lib:P,onConnectStart:K,cancelConnection:X,nodeLookup:le,rfId:F,panBy:Y,updateConnection:q}=w.getState(),Q=D.type==="target",ee=(H,W)=>{g(!1),p==null||p(H,n,D.type,W)},ne=H=>m==null?void 0:m(n,H),R=(H,W)=>{g(!0),y==null||y(L,n,D.type),K==null||K(H,W)};zp.onPointerDown(L.nativeEvent,{autoPanOnConnect:T,connectionMode:Z,connectionRadius:V,domNode:O,handleId:D.id,nodeId:D.nodeId,nodeLookup:le,isTarget:Q,edgeUpdaterType:D.type,lib:P,flowId:F,cancelConnection:X,panBy:Y,isValidConnection:(...H)=>{var W,B;return((B=(W=w.getState()).isValidConnection)==null?void 0:B.call(W,...H))??!0},onConnect:ne,onConnectStart:R,onConnectEnd:(...H)=>{var W,B;return(B=(W=w.getState()).onConnectEnd)==null?void 0:B.call(W,...H)},onReconnectEnd:ee,updateConnection:q,getTransform:()=>w.getState().transform,getFromHandle:()=>w.getState().connection.fromHandle,dragThreshold:w.getState().connectionDragThreshold,handleDomNode:L.currentTarget})},j=L=>k(L,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),N=L=>k(L,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),_=()=>x(!0),E=()=>x(!1);return c.jsxs(c.Fragment,{children:[(e===!0||e==="source")&&c.jsx(_3,{position:d,centerX:r,centerY:i,radius:t,onMouseDown:j,onMouseEnter:_,onMouseOut:E,type:"source"}),(e===!0||e==="target")&&c.jsx(_3,{position:f,centerX:s,centerY:o,radius:t,onMouseDown:N,onMouseEnter:_,onMouseOut:E,type:"target"})]})}function gq({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:i,onDoubleClick:s,onContextMenu:o,onMouseEnter:d,onMouseMove:f,onMouseLeave:m,reconnectRadius:y,onReconnect:p,onReconnectStart:g,onReconnectEnd:x,rfId:w,edgeTypes:k,noPanClassName:j,onError:N,disableKeyboardA11y:_}){let E=$t($e=>$e.edgeLookup.get(e));const L=$t($e=>$e.defaultEdgeOptions);E=L?{...L,...E}:E;let D=E.type||"default",T=(k==null?void 0:k[D])||C3[D];T===void 0&&(N==null||N("011",bi.error011(D)),D="default",T=(k==null?void 0:k.default)||C3.default);const O=!!(E.focusable||t&&typeof E.focusable>"u"),Z=typeof p<"u"&&(E.reconnectable||n&&typeof E.reconnectable>"u"),V=!!(E.selectable||r&&typeof E.selectable>"u"),P=A.useRef(null),[K,X]=A.useState(!1),[le,F]=A.useState(!1),Y=Sn(),{zIndex:q,sourceX:Q,sourceY:ee,targetX:ne,targetY:R,sourcePosition:H,targetPosition:W}=$t(A.useCallback($e=>{const qe=$e.nodeLookup.get(E.source),nt=$e.nodeLookup.get(E.target);if(!qe||!nt)return{zIndex:E.zIndex,...E3};const lt=l$({id:e,sourceNode:qe,targetNode:nt,sourceHandle:E.sourceHandle||null,targetHandle:E.targetHandle||null,connectionMode:$e.connectionMode,onError:N});return{zIndex:WO({selected:E.selected,zIndex:E.zIndex,sourceNode:qe,targetNode:nt,elevateOnSelect:$e.elevateEdgesOnSelect,zIndexMode:$e.zIndexMode}),...lt||E3}},[E.source,E.target,E.sourceHandle,E.targetHandle,E.selected,E.zIndex]),bn),B=A.useMemo(()=>E.markerStart?`url('#${Ap(E.markerStart,w)}')`:void 0,[E.markerStart,w]),ce=A.useMemo(()=>E.markerEnd?`url('#${Ap(E.markerEnd,w)}')`:void 0,[E.markerEnd,w]);if(E.hidden||Q===null||ee===null||ne===null||R===null)return null;const pe=$e=>{var We;const{addSelectedEdges:qe,unselectNodesAndEdges:nt,multiSelectionActive:lt}=Y.getState();V&&(Y.setState({nodesSelectionActive:!1}),E.selected&<?(nt({nodes:[],edges:[E]}),(We=P.current)==null||We.blur()):qe([e])),i&&i($e,E)},xe=s?$e=>{s($e,{...E})}:void 0,be=o?$e=>{o($e,{...E})}:void 0,ye=d?$e=>{d($e,{...E})}:void 0,Ce=f?$e=>{f($e,{...E})}:void 0,Ge=m?$e=>{m($e,{...E})}:void 0,Pe=$e=>{var qe;if(!_&&m8.includes($e.key)&&V){const{unselectNodesAndEdges:nt,addSelectedEdges:lt}=Y.getState();$e.key==="Escape"?((qe=P.current)==null||qe.blur(),nt({edges:[E]})):lt([e])}};return c.jsx("svg",{style:{zIndex:q},children:c.jsxs("g",{className:Qn(["react-flow__edge",`react-flow__edge-${D}`,E.className,j,{selected:E.selected,animated:E.animated,inactive:!V&&!i,updating:K,selectable:V}]),onClick:pe,onDoubleClick:xe,onContextMenu:be,onMouseEnter:ye,onMouseMove:Ce,onMouseLeave:Ge,onKeyDown:O?Pe:void 0,tabIndex:O?0:void 0,role:E.ariaRole??(O?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":E.ariaLabel===null?void 0:E.ariaLabel||`Edge from ${E.source} to ${E.target}`,"aria-describedby":O?`${G8}-${w}`:void 0,ref:P,...E.domAttributes,children:[!le&&c.jsx(T,{id:e,source:E.source,target:E.target,type:E.type,selected:E.selected,animated:E.animated,selectable:V,deletable:E.deletable??!0,label:E.label,labelStyle:E.labelStyle,labelShowBg:E.labelShowBg,labelBgStyle:E.labelBgStyle,labelBgPadding:E.labelBgPadding,labelBgBorderRadius:E.labelBgBorderRadius,sourceX:Q,sourceY:ee,targetX:ne,targetY:R,sourcePosition:H,targetPosition:W,data:E.data,style:E.style,sourceHandleId:E.sourceHandle,targetHandleId:E.targetHandle,markerStart:B,markerEnd:ce,pathOptions:"pathOptions"in E?E.pathOptions:void 0,interactionWidth:E.interactionWidth}),Z&&c.jsx(pq,{edge:E,isReconnectable:Z,reconnectRadius:y,onReconnect:p,onReconnectStart:g,onReconnectEnd:x,sourceX:Q,sourceY:ee,targetX:ne,targetY:R,sourcePosition:H,targetPosition:W,setUpdateHover:X,setReconnecting:F})]})})}var yq=A.memo(gq);const vq=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function gw({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:i,onReconnect:s,onEdgeContextMenu:o,onEdgeMouseEnter:d,onEdgeMouseMove:f,onEdgeMouseLeave:m,onEdgeClick:y,reconnectRadius:p,onEdgeDoubleClick:g,onReconnectStart:x,onReconnectEnd:w,disableKeyboardA11y:k}){const{edgesFocusable:j,edgesReconnectable:N,elementsSelectable:_,onError:E}=$t(vq,bn),L=nq(t);return c.jsxs("div",{className:"react-flow__edges",children:[c.jsx(sq,{defaultColor:e,rfId:n}),L.map(D=>c.jsx(yq,{id:D,edgesFocusable:j,edgesReconnectable:N,elementsSelectable:_,noPanClassName:i,onReconnect:s,onContextMenu:o,onMouseEnter:d,onMouseMove:f,onMouseLeave:m,onClick:y,reconnectRadius:p,onDoubleClick:g,onReconnectStart:x,onReconnectEnd:w,rfId:n,onError:E,edgeTypes:r,disableKeyboardA11y:k},D))]})}gw.displayName="EdgeRenderer";const xq=A.memo(gw),bq=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function wq({children:e}){const t=$t(bq);return c.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function Sq(e){const t=Gg(),n=A.useRef(!1);A.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const kq=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function Nq(e){const t=$t(kq),n=Sn();return A.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function jq(e){return e.connection.inProgress?{...e.connection,to:Uc(e.connection.to,e.transform)}:{...e.connection}}function Cq(e){return jq}function Eq(e){const t=Cq();return $t(t,bn)}const Mq=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function _q({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:i,width:s,height:o,isValid:d,inProgress:f}=$t(Mq,bn);return!(s&&i&&f)?null:c.jsx("svg",{style:e,width:s,height:o,className:"react-flow__connectionline react-flow__container",children:c.jsx("g",{className:Qn(["react-flow__connection",y8(d)]),children:c.jsx(yw,{style:t,type:n,CustomComponent:r,isValid:d})})})}const yw=({style:e,type:t=Yl.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:i,from:s,fromNode:o,fromHandle:d,fromPosition:f,to:m,toNode:y,toHandle:p,toPosition:g,pointer:x}=Eq();if(!i)return;if(n)return c.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:o,fromHandle:d,fromX:s.x,fromY:s.y,toX:m.x,toY:m.y,fromPosition:f,toPosition:g,connectionStatus:y8(r),toNode:y,toHandle:p,pointer:x});let w="";const k={sourceX:s.x,sourceY:s.y,sourcePosition:f,targetX:m.x,targetY:m.y,targetPosition:g};switch(t){case Yl.Bezier:[w]=_8(k);break;case Yl.SimpleBezier:[w]=aw(k);break;case Yl.Step:[w]=_p({...k,borderRadius:0});break;case Yl.SmoothStep:[w]=_p(k);break;default:[w]=T8(k)}return c.jsx("path",{d:w,fill:"none",className:"react-flow__connection-path",style:e})};yw.displayName="ConnectionLine";const Aq={};function A3(e=Aq){A.useRef(e),Sn(),A.useEffect(()=>{},[e])}function Tq(){Sn(),A.useRef(!1),A.useEffect(()=>{},[])}function vw({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:i,onNodeDoubleClick:s,onEdgeDoubleClick:o,onNodeMouseEnter:d,onNodeMouseMove:f,onNodeMouseLeave:m,onNodeContextMenu:y,onSelectionContextMenu:p,onSelectionStart:g,onSelectionEnd:x,connectionLineType:w,connectionLineStyle:k,connectionLineComponent:j,connectionLineContainerStyle:N,selectionKeyCode:_,selectionOnDrag:E,selectionMode:L,multiSelectionKeyCode:D,panActivationKeyCode:T,zoomActivationKeyCode:O,deleteKeyCode:Z,onlyRenderVisibleElements:V,elementsSelectable:P,defaultViewport:K,translateExtent:X,minZoom:le,maxZoom:F,preventScrolling:Y,defaultMarkerColor:q,zoomOnScroll:Q,zoomOnPinch:ee,panOnScroll:ne,panOnScrollSpeed:R,panOnScrollMode:H,zoomOnDoubleClick:W,panOnDrag:B,onPaneClick:ce,onPaneMouseEnter:pe,onPaneMouseMove:xe,onPaneMouseLeave:be,onPaneScroll:ye,onPaneContextMenu:Ce,paneClickDistance:Ge,nodeClickDistance:Pe,onEdgeContextMenu:$e,onEdgeMouseEnter:qe,onEdgeMouseMove:nt,onEdgeMouseLeave:lt,reconnectRadius:We,onReconnect:Dt,onReconnectStart:ke,onReconnectEnd:et,noDragClassName:st,noWheelClassName:Nt,noPanClassName:kn,disableKeyboardA11y:Ht,nodeExtent:ct,rfId:Lt,viewport:de,onViewportChange:je}){return A3(e),A3(t),Tq(),Sq(n),Nq(de),c.jsx(GH,{onPaneClick:ce,onPaneMouseEnter:pe,onPaneMouseMove:xe,onPaneMouseLeave:be,onPaneContextMenu:Ce,onPaneScroll:ye,paneClickDistance:Ge,deleteKeyCode:Z,selectionKeyCode:_,selectionOnDrag:E,selectionMode:L,onSelectionStart:g,onSelectionEnd:x,multiSelectionKeyCode:D,panActivationKeyCode:T,zoomActivationKeyCode:O,elementsSelectable:P,zoomOnScroll:Q,zoomOnPinch:ee,zoomOnDoubleClick:W,panOnScroll:ne,panOnScrollSpeed:R,panOnScrollMode:H,panOnDrag:B,defaultViewport:K,translateExtent:X,minZoom:le,maxZoom:F,onSelectionContextMenu:p,preventScrolling:Y,noDragClassName:st,noWheelClassName:Nt,noPanClassName:kn,disableKeyboardA11y:Ht,onViewportChange:je,isControlledViewport:!!de,children:c.jsxs(wq,{children:[c.jsx(xq,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:o,onReconnect:Dt,onReconnectStart:ke,onReconnectEnd:et,onlyRenderVisibleElements:V,onEdgeContextMenu:$e,onEdgeMouseEnter:qe,onEdgeMouseMove:nt,onEdgeMouseLeave:lt,reconnectRadius:We,defaultMarkerColor:q,noPanClassName:kn,disableKeyboardA11y:Ht,rfId:Lt}),c.jsx(_q,{style:k,type:w,component:j,containerStyle:N}),c.jsx("div",{className:"react-flow__edgelabel-renderer"}),c.jsx(tq,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:s,onNodeMouseEnter:d,onNodeMouseMove:f,onNodeMouseLeave:m,onNodeContextMenu:y,nodeClickDistance:Pe,onlyRenderVisibleElements:V,noPanClassName:kn,noDragClassName:st,disableKeyboardA11y:Ht,nodeExtent:ct,rfId:Lt}),c.jsx("div",{className:"react-flow__viewport-portal"})]})})}vw.displayName="GraphView";const zq=A.memo(vw),T3=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:s,fitView:o,fitViewOptions:d,minZoom:f=.5,maxZoom:m=2,nodeOrigin:y,nodeExtent:p,zIndexMode:g="basic"}={})=>{const x=new Map,w=new Map,k=new Map,j=new Map,N=r??t??[],_=n??e??[],E=y??[0,0],L=p??xc;L8(k,j,N);const{nodesInitialized:D}=Tp(_,x,w,{nodeOrigin:E,nodeExtent:L,zIndexMode:g});let T=[0,0,1];if(o&&i&&s){const O=Hc(x,{filter:K=>!!((K.width||K.initialWidth)&&(K.height||K.initialHeight))}),{x:Z,y:V,zoom:P}=Hg(O,i,s,f,m,(d==null?void 0:d.padding)??.1);T=[Z,V,P]}return{rfId:"1",width:i??0,height:s??0,transform:T,nodes:_,nodesInitialized:D,nodeLookup:x,parentLookup:w,edges:N,edgeLookup:j,connectionLookup:k,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:f,maxZoom:m,translateExtent:xc,nodeExtent:L,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Fo.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:E,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:o??!1,fitViewOptions:d,fitViewResolver:null,connection:{...g8},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:GO,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:p8,zIndexMode:g,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},Dq=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:s,fitView:o,fitViewOptions:d,minZoom:f,maxZoom:m,nodeOrigin:y,nodeExtent:p,zIndexMode:g})=>Z$((x,w)=>{async function k(){const{nodeLookup:j,panZoom:N,fitViewOptions:_,fitViewResolver:E,width:L,height:D,minZoom:T,maxZoom:O}=w();N&&(await FO({nodes:j,width:L,height:D,panZoom:N,minZoom:T,maxZoom:O},_),E==null||E.resolve(!0),x({fitViewResolver:null}))}return{...T3({nodes:e,edges:t,width:i,height:s,fitView:o,fitViewOptions:d,minZoom:f,maxZoom:m,nodeOrigin:y,nodeExtent:p,defaultNodes:n,defaultEdges:r,zIndexMode:g}),setNodes:j=>{const{nodeLookup:N,parentLookup:_,nodeOrigin:E,elevateNodesOnSelect:L,fitViewQueued:D,zIndexMode:T,nodesSelectionActive:O}=w(),{nodesInitialized:Z,hasSelectedNodes:V}=Tp(j,N,_,{nodeOrigin:E,nodeExtent:p,elevateNodesOnSelect:L,checkEquality:!0,zIndexMode:T}),P=O&&V;D&&Z?(k(),x({nodes:j,nodesInitialized:Z,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:P})):x({nodes:j,nodesInitialized:Z,nodesSelectionActive:P})},setEdges:j=>{const{connectionLookup:N,edgeLookup:_}=w();L8(N,_,j),x({edges:j})},setDefaultNodesAndEdges:(j,N)=>{if(j){const{setNodes:_}=w();_(j),x({hasDefaultNodes:!0})}if(N){const{setEdges:_}=w();_(N),x({hasDefaultEdges:!0})}},updateNodeInternals:j=>{const{triggerNodeChanges:N,nodeLookup:_,parentLookup:E,domNode:L,nodeOrigin:D,nodeExtent:T,debug:O,fitViewQueued:Z,zIndexMode:V}=w(),{changes:P,updatedInternals:K}=m$(j,_,E,L,D,T,V);K&&(c$(_,E,{nodeOrigin:D,nodeExtent:T,zIndexMode:V}),Z?(k(),x({fitViewQueued:!1,fitViewOptions:void 0})):x({}),(P==null?void 0:P.length)>0&&(O&&console.log("React Flow: trigger node changes",P),N==null||N(P)))},updateNodePositions:(j,N=!1)=>{const _=[];let E=[];const{nodeLookup:L,triggerNodeChanges:D,connection:T,updateConnection:O,onNodesChangeMiddlewareMap:Z}=w();for(const[V,P]of j){const K=L.get(V),X=!!(K!=null&&K.expandParent&&(K!=null&&K.parentId)&&(P!=null&&P.position)),le={id:V,type:"position",position:X?{x:Math.max(0,P.position.x),y:Math.max(0,P.position.y)}:P.position,dragging:N};if(K&&T.inProgress&&T.fromNode.id===K.id){const F=$s(K,T.fromHandle,Ze.Left,!0);O({...T,from:F})}X&&K.parentId&&_.push({id:V,parentId:K.parentId,rect:{...P.internals.positionAbsolute,width:P.measured.width??0,height:P.measured.height??0}}),E.push(le)}if(_.length>0){const{parentLookup:V,nodeOrigin:P}=w(),K=Vg(_,L,V,P);E.push(...K)}for(const V of Z.values())E=V(E);D(E)},triggerNodeChanges:j=>{const{onNodesChange:N,setNodes:_,nodes:E,hasDefaultNodes:L,debug:D}=w();if(j!=null&&j.length){if(L){const T=yH(j,E);_(T)}D&&console.log("React Flow: trigger node changes",j),N==null||N(j)}},triggerEdgeChanges:j=>{const{onEdgesChange:N,setEdges:_,edges:E,hasDefaultEdges:L,debug:D}=w();if(j!=null&&j.length){if(L){const T=vH(j,E);_(T)}D&&console.log("React Flow: trigger edge changes",j),N==null||N(j)}},addSelectedNodes:j=>{const{multiSelectionActive:N,edgeLookup:_,nodeLookup:E,triggerNodeChanges:L,triggerEdgeChanges:D}=w();if(N){const T=j.map(O=>_s(O,!0));L(T);return}L(To(E,new Set([...j]),!0)),D(To(_))},addSelectedEdges:j=>{const{multiSelectionActive:N,edgeLookup:_,nodeLookup:E,triggerNodeChanges:L,triggerEdgeChanges:D}=w();if(N){const T=j.map(O=>_s(O,!0));D(T);return}D(To(_,new Set([...j]))),L(To(E,new Set,!0))},unselectNodesAndEdges:({nodes:j,edges:N}={})=>{const{edges:_,nodes:E,nodeLookup:L,triggerNodeChanges:D,triggerEdgeChanges:T}=w(),O=j||E,Z=N||_,V=[];for(const K of O){if(!K.selected)continue;const X=L.get(K.id);X&&(X.selected=!1),V.push(_s(K.id,!1))}const P=[];for(const K of Z)K.selected&&P.push(_s(K.id,!1));D(V),T(P)},setMinZoom:j=>{const{panZoom:N,maxZoom:_}=w();N==null||N.setScaleExtent([j,_]),x({minZoom:j})},setMaxZoom:j=>{const{panZoom:N,minZoom:_}=w();N==null||N.setScaleExtent([_,j]),x({maxZoom:j})},setTranslateExtent:j=>{var N;(N=w().panZoom)==null||N.setTranslateExtent(j),x({translateExtent:j})},resetSelectedElements:()=>{const{edges:j,nodes:N,triggerNodeChanges:_,triggerEdgeChanges:E,elementsSelectable:L}=w();if(!L)return;const D=N.reduce((O,Z)=>Z.selected?[...O,_s(Z.id,!1)]:O,[]),T=j.reduce((O,Z)=>Z.selected?[...O,_s(Z.id,!1)]:O,[]);_(D),E(T)},setNodeExtent:j=>{const{nodes:N,nodeLookup:_,parentLookup:E,nodeOrigin:L,elevateNodesOnSelect:D,nodeExtent:T,zIndexMode:O}=w();j[0][0]===T[0][0]&&j[0][1]===T[0][1]&&j[1][0]===T[1][0]&&j[1][1]===T[1][1]||(Tp(N,_,E,{nodeOrigin:L,nodeExtent:j,elevateNodesOnSelect:D,checkEquality:!1,zIndexMode:O}),x({nodeExtent:j}))},panBy:j=>{const{transform:N,width:_,height:E,panZoom:L,translateExtent:D}=w();return p$({delta:j,panZoom:L,transform:N,translateExtent:D,width:_,height:E})},setCenter:async(j,N,_)=>{const{width:E,height:L,maxZoom:D,panZoom:T}=w();if(!T)return Promise.resolve(!1);const O=typeof(_==null?void 0:_.zoom)<"u"?_.zoom:D;return await T.setViewport({x:E/2-j*O,y:L/2-N*O,zoom:O},{duration:_==null?void 0:_.duration,ease:_==null?void 0:_.ease,interpolate:_==null?void 0:_.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{x({connection:{...g8}})},updateConnection:j=>{x({connection:j})},reset:()=>x({...T3()})}},Object.is);function Lq({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:i,initialHeight:s,initialMinZoom:o,initialMaxZoom:d,initialFitViewOptions:f,fitView:m,nodeOrigin:y,nodeExtent:p,zIndexMode:g,children:x}){const[w]=A.useState(()=>Dq({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:s,fitView:m,minZoom:o,maxZoom:d,fitViewOptions:f,nodeOrigin:y,nodeExtent:p,zIndexMode:g}));return c.jsx(Q$,{value:w,children:c.jsx(wH,{children:x})})}function Rq({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:i,width:s,height:o,fitView:d,fitViewOptions:f,minZoom:m,maxZoom:y,nodeOrigin:p,nodeExtent:g,zIndexMode:x}){return A.useContext(Lf)?c.jsx(c.Fragment,{children:e}):c.jsx(Lq,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:i,initialWidth:s,initialHeight:o,fitView:d,initialFitViewOptions:f,initialMinZoom:m,initialMaxZoom:y,nodeOrigin:p,nodeExtent:g,zIndexMode:x,children:e})}const Bq={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function Oq({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:s,edgeTypes:o,onNodeClick:d,onEdgeClick:f,onInit:m,onMove:y,onMoveStart:p,onMoveEnd:g,onConnect:x,onConnectStart:w,onConnectEnd:k,onClickConnectStart:j,onClickConnectEnd:N,onNodeMouseEnter:_,onNodeMouseMove:E,onNodeMouseLeave:L,onNodeContextMenu:D,onNodeDoubleClick:T,onNodeDragStart:O,onNodeDrag:Z,onNodeDragStop:V,onNodesDelete:P,onEdgesDelete:K,onDelete:X,onSelectionChange:le,onSelectionDragStart:F,onSelectionDrag:Y,onSelectionDragStop:q,onSelectionContextMenu:Q,onSelectionStart:ee,onSelectionEnd:ne,onBeforeDelete:R,connectionMode:H,connectionLineType:W=Yl.Bezier,connectionLineStyle:B,connectionLineComponent:ce,connectionLineContainerStyle:pe,deleteKeyCode:xe="Backspace",selectionKeyCode:be="Shift",selectionOnDrag:ye=!1,selectionMode:Ce=bc.Full,panActivationKeyCode:Ge="Space",multiSelectionKeyCode:Pe=Sc()?"Meta":"Control",zoomActivationKeyCode:$e=Sc()?"Meta":"Control",snapToGrid:qe,snapGrid:nt,onlyRenderVisibleElements:lt=!1,selectNodesOnDrag:We,nodesDraggable:Dt,autoPanOnNodeFocus:ke,nodesConnectable:et,nodesFocusable:st,nodeOrigin:Nt=Y8,edgesFocusable:kn,edgesReconnectable:Ht,elementsSelectable:ct=!0,defaultViewport:Lt=cH,minZoom:de=.5,maxZoom:je=2,translateExtent:He=xc,preventScrolling:rt=!0,nodeExtent:gt,defaultMarkerColor:Pt="#b1b1b7",zoomOnScroll:fn=!0,zoomOnPinch:Wt=!0,panOnScroll:Fe=!1,panOnScrollSpeed:qt=.5,panOnScrollMode:jt=Ds.Free,zoomOnDoubleClick:Jt=!0,panOnDrag:Rt=!0,onPaneClick:_e,onPaneMouseEnter:Le,onPaneMouseMove:Ye,onPaneMouseLeave:Ue,onPaneScroll:dt,onPaneContextMenu:en,paneClickDistance:Kt=1,nodeClickDistance:ft=0,children:Oe,onReconnect:Ln,onReconnectStart:kt,onReconnectEnd:hn,onEdgeContextMenu:or,onEdgeDoubleClick:Wn,onEdgeMouseEnter:Lr,onEdgeMouseMove:Bt,onEdgeMouseLeave:kr,reconnectRadius:tt=10,onNodesChange:Za,onEdgesChange:Jn,noDragClassName:an="nodrag",noWheelClassName:un="nowheel",noPanClassName:er="nopan",fitView:$n,fitViewOptions:ol,connectOnClick:tr,attributionPosition:mn,proOptions:ur,defaultEdgeOptions:Yt,elevateNodesOnSelect:Rn=!0,elevateEdgesOnSelect:Nr=!1,disableKeyboardA11y:Nn=!1,autoPanOnConnect:Rr,autoPanOnNodeDrag:cn,autoPanSpeed:Hn,connectionRadius:Qa,isValidConnection:pr,onError:Zr,style:Da,id:Br,nodeDragThreshold:ul,connectionDragThreshold:Wa,viewport:Ja,onViewportChange:La,width:jr,height:jn,colorMode:ga="light",debug:cl,onScroll:Cr,ariaLabelConfig:dl,zIndexMode:ya="basic",...fl},An){const gr=Br||"1",Cn=mH(ga),yr=A.useCallback(qn=>{qn.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Cr==null||Cr(qn)},[Cr]);return c.jsx("div",{"data-testid":"rf__wrapper",...fl,onScroll:yr,style:{...Da,...Bq},ref:An,className:Qn(["react-flow",i,Cn]),id:Br,role:"application",children:c.jsxs(Rq,{nodes:e,edges:t,width:jr,height:jn,fitView:$n,fitViewOptions:ol,minZoom:de,maxZoom:je,nodeOrigin:Nt,nodeExtent:gt,zIndexMode:ya,children:[c.jsx(hH,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:x,onConnectStart:w,onConnectEnd:k,onClickConnectStart:j,onClickConnectEnd:N,nodesDraggable:Dt,autoPanOnNodeFocus:ke,nodesConnectable:et,nodesFocusable:st,edgesFocusable:kn,edgesReconnectable:Ht,elementsSelectable:ct,elevateNodesOnSelect:Rn,elevateEdgesOnSelect:Nr,minZoom:de,maxZoom:je,nodeExtent:gt,onNodesChange:Za,onEdgesChange:Jn,snapToGrid:qe,snapGrid:nt,connectionMode:H,translateExtent:He,connectOnClick:tr,defaultEdgeOptions:Yt,fitView:$n,fitViewOptions:ol,onNodesDelete:P,onEdgesDelete:K,onDelete:X,onNodeDragStart:O,onNodeDrag:Z,onNodeDragStop:V,onSelectionDrag:Y,onSelectionDragStart:F,onSelectionDragStop:q,onMove:y,onMoveStart:p,onMoveEnd:g,noPanClassName:er,nodeOrigin:Nt,rfId:gr,autoPanOnConnect:Rr,autoPanOnNodeDrag:cn,autoPanSpeed:Hn,onError:Zr,connectionRadius:Qa,isValidConnection:pr,selectNodesOnDrag:We,nodeDragThreshold:ul,connectionDragThreshold:Wa,onBeforeDelete:R,debug:cl,ariaLabelConfig:dl,zIndexMode:ya}),c.jsx(zq,{onInit:m,onNodeClick:d,onEdgeClick:f,onNodeMouseEnter:_,onNodeMouseMove:E,onNodeMouseLeave:L,onNodeContextMenu:D,onNodeDoubleClick:T,nodeTypes:s,edgeTypes:o,connectionLineType:W,connectionLineStyle:B,connectionLineComponent:ce,connectionLineContainerStyle:pe,selectionKeyCode:be,selectionOnDrag:ye,selectionMode:Ce,deleteKeyCode:xe,multiSelectionKeyCode:Pe,panActivationKeyCode:Ge,zoomActivationKeyCode:$e,onlyRenderVisibleElements:lt,defaultViewport:Lt,translateExtent:He,minZoom:de,maxZoom:je,preventScrolling:rt,zoomOnScroll:fn,zoomOnPinch:Wt,zoomOnDoubleClick:Jt,panOnScroll:Fe,panOnScrollSpeed:qt,panOnScrollMode:jt,panOnDrag:Rt,onPaneClick:_e,onPaneMouseEnter:Le,onPaneMouseMove:Ye,onPaneMouseLeave:Ue,onPaneScroll:dt,onPaneContextMenu:en,paneClickDistance:Kt,nodeClickDistance:ft,onSelectionContextMenu:Q,onSelectionStart:ee,onSelectionEnd:ne,onReconnect:Ln,onReconnectStart:kt,onReconnectEnd:hn,onEdgeContextMenu:or,onEdgeDoubleClick:Wn,onEdgeMouseEnter:Lr,onEdgeMouseMove:Bt,onEdgeMouseLeave:kr,reconnectRadius:tt,defaultMarkerColor:Pt,noDragClassName:an,noWheelClassName:un,noPanClassName:er,rfId:gr,disableKeyboardA11y:Nn,nodeExtent:gt,viewport:Ja,onViewportChange:La}),c.jsx(uH,{onSelectionChange:le}),Oe,c.jsx(aH,{proOptions:ur,position:mn}),c.jsx(rH,{rfId:gr,disableKeyboardA11y:Nn})]})})}var xw=K8(Oq);function $q({dimensions:e,lineWidth:t,variant:n,className:r}){return c.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Qn(["react-flow__background-pattern",n,r])})}function Hq({radius:e,className:t}){return c.jsx("circle",{cx:e,cy:e,r:e,className:Qn(["react-flow__background-pattern","dots",t])})}var Kl;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Kl||(Kl={}));const qq={[Kl.Dots]:1,[Kl.Lines]:1,[Kl.Cross]:6},Uq=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function bw({id:e,variant:t=Kl.Dots,gap:n=20,size:r,lineWidth:i=1,offset:s=0,color:o,bgColor:d,style:f,className:m,patternClassName:y}){const p=A.useRef(null),{transform:g,patternId:x}=$t(Uq,bn),w=r||qq[t],k=t===Kl.Dots,j=t===Kl.Cross,N=Array.isArray(n)?n:[n,n],_=[N[0]*g[2]||1,N[1]*g[2]||1],E=w*g[2],L=Array.isArray(s)?s:[s,s],D=j?[E,E]:_,T=[L[0]*g[2]||1+D[0]/2,L[1]*g[2]||1+D[1]/2],O=`${x}${e||""}`;return c.jsxs("svg",{className:Qn(["react-flow__background",m]),style:{...f,...Bf,"--xy-background-color-props":d,"--xy-background-pattern-color-props":o},ref:p,"data-testid":"rf__background",children:[c.jsx("pattern",{id:O,x:g[0]%_[0],y:g[1]%_[1],width:_[0],height:_[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${T[0]},-${T[1]})`,children:k?c.jsx(Hq,{radius:E/2,className:y}):c.jsx($q,{dimensions:D,lineWidth:i,variant:t,className:y})}),c.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${O})`})]})}bw.displayName="Background";const Iq=A.memo(bw);function Pq(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:c.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function Fq(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:c.jsx("path",{d:"M0 0h32v4.2H0z"})})}function Vq(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:c.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function Gq(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:c.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function Yq(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:c.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function vd({children:e,className:t,...n}){return c.jsx("button",{type:"button",className:Qn(["react-flow__controls-button",t]),...n,children:e})}const Xq=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function ww({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:s,onZoomOut:o,onFitView:d,onInteractiveChange:f,className:m,children:y,position:p="bottom-left",orientation:g="vertical","aria-label":x}){const w=Sn(),{isInteractive:k,minZoomReached:j,maxZoomReached:N,ariaLabelConfig:_}=$t(Xq,bn),{zoomIn:E,zoomOut:L,fitView:D}=Gg(),T=()=>{E(),s==null||s()},O=()=>{L(),o==null||o()},Z=()=>{D(i),d==null||d()},V=()=>{w.setState({nodesDraggable:!k,nodesConnectable:!k,elementsSelectable:!k}),f==null||f(!k)},P=g==="horizontal"?"horizontal":"vertical";return c.jsxs(Rf,{className:Qn(["react-flow__controls",P,m]),position:p,style:e,"data-testid":"rf__controls","aria-label":x??_["controls.ariaLabel"],children:[t&&c.jsxs(c.Fragment,{children:[c.jsx(vd,{onClick:T,className:"react-flow__controls-zoomin",title:_["controls.zoomIn.ariaLabel"],"aria-label":_["controls.zoomIn.ariaLabel"],disabled:N,children:c.jsx(Pq,{})}),c.jsx(vd,{onClick:O,className:"react-flow__controls-zoomout",title:_["controls.zoomOut.ariaLabel"],"aria-label":_["controls.zoomOut.ariaLabel"],disabled:j,children:c.jsx(Fq,{})})]}),n&&c.jsx(vd,{className:"react-flow__controls-fitview",onClick:Z,title:_["controls.fitView.ariaLabel"],"aria-label":_["controls.fitView.ariaLabel"],children:c.jsx(Vq,{})}),r&&c.jsx(vd,{className:"react-flow__controls-interactive",onClick:V,title:_["controls.interactive.ariaLabel"],"aria-label":_["controls.interactive.ariaLabel"],children:k?c.jsx(Yq,{}):c.jsx(Gq,{})}),y]})}ww.displayName="Controls";const Kq=A.memo(ww);function Zq({id:e,x:t,y:n,width:r,height:i,style:s,color:o,strokeColor:d,strokeWidth:f,className:m,borderRadius:y,shapeRendering:p,selected:g,onClick:x}){const{background:w,backgroundColor:k}=s||{},j=o||w||k;return c.jsx("rect",{className:Qn(["react-flow__minimap-node",{selected:g},m]),x:t,y:n,rx:y,ry:y,width:r,height:i,style:{fill:j,stroke:d,strokeWidth:f},shapeRendering:p,onClick:x?N=>x(N,e):void 0})}const Qq=A.memo(Zq),Wq=e=>e.nodes.map(t=>t.id),O1=e=>e instanceof Function?e:()=>e;function Jq({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:s=Qq,onClick:o}){const d=$t(Wq,bn),f=O1(t),m=O1(e),y=O1(n),p=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return c.jsx(c.Fragment,{children:d.map(g=>c.jsx(tU,{id:g,nodeColorFunc:f,nodeStrokeColorFunc:m,nodeClassNameFunc:y,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:s,onClick:o,shapeRendering:p},g))})}function eU({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:s,shapeRendering:o,NodeComponent:d,onClick:f}){const{node:m,x:y,y:p,width:g,height:x}=$t(w=>{const k=w.nodeLookup.get(e);if(!k)return{node:void 0,x:0,y:0,width:0,height:0};const j=k.internals.userNode,{x:N,y:_}=k.internals.positionAbsolute,{width:E,height:L}=sl(j);return{node:j,x:N,y:_,width:E,height:L}},bn);return!m||m.hidden||!k8(m)?null:c.jsx(d,{x:y,y:p,width:g,height:x,style:m.style,selected:!!m.selected,className:r(m),color:t(m),borderRadius:i,strokeColor:n(m),strokeWidth:s,shapeRendering:o,onClick:f,id:m.id})}const tU=A.memo(eU);var nU=A.memo(Jq);const rU=200,aU=150,iU=e=>!e.hidden,lU=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?S8(Hc(e.nodeLookup,{filter:iU}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},sU="react-flow__minimap-desc";function Sw({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:i="",nodeBorderRadius:s=5,nodeStrokeWidth:o,nodeComponent:d,bgColor:f,maskColor:m,maskStrokeColor:y,maskStrokeWidth:p,position:g="bottom-right",onClick:x,onNodeClick:w,pannable:k=!1,zoomable:j=!1,ariaLabel:N,inversePan:_,zoomStep:E=1,offsetScale:L=5}){const D=Sn(),T=A.useRef(null),{boundingRect:O,viewBB:Z,rfId:V,panZoom:P,translateExtent:K,flowWidth:X,flowHeight:le,ariaLabelConfig:F}=$t(lU,bn),Y=(e==null?void 0:e.width)??rU,q=(e==null?void 0:e.height)??aU,Q=O.width/Y,ee=O.height/q,ne=Math.max(Q,ee),R=ne*Y,H=ne*q,W=L*ne,B=O.x-(R-O.width)/2-W,ce=O.y-(H-O.height)/2-W,pe=R+W*2,xe=H+W*2,be=`${sU}-${V}`,ye=A.useRef(0),Ce=A.useRef();ye.current=ne,A.useEffect(()=>{if(T.current&&P)return Ce.current=N$({domNode:T.current,panZoom:P,getTransform:()=>D.getState().transform,getViewScale:()=>ye.current}),()=>{var qe;(qe=Ce.current)==null||qe.destroy()}},[P]),A.useEffect(()=>{var qe;(qe=Ce.current)==null||qe.update({translateExtent:K,width:X,height:le,inversePan:_,pannable:k,zoomStep:E,zoomable:j})},[k,j,_,E,K,X,le]);const Ge=x?qe=>{var We;const[nt,lt]=((We=Ce.current)==null?void 0:We.pointer(qe))||[0,0];x(qe,{x:nt,y:lt})}:void 0,Pe=w?A.useCallback((qe,nt)=>{const lt=D.getState().nodeLookup.get(nt).internals.userNode;w(qe,lt)},[]):void 0,$e=N??F["minimap.ariaLabel"];return c.jsx(Rf,{position:g,style:{...e,"--xy-minimap-background-color-props":typeof f=="string"?f:void 0,"--xy-minimap-mask-background-color-props":typeof m=="string"?m:void 0,"--xy-minimap-mask-stroke-color-props":typeof y=="string"?y:void 0,"--xy-minimap-mask-stroke-width-props":typeof p=="number"?p*ne:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof o=="number"?o:void 0},className:Qn(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:c.jsxs("svg",{width:Y,height:q,viewBox:`${B} ${ce} ${pe} ${xe}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":be,ref:T,onClick:Ge,children:[$e&&c.jsx("title",{id:be,children:$e}),c.jsx(nU,{onClick:Pe,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:s,nodeClassName:i,nodeStrokeWidth:o,nodeComponent:d}),c.jsx("path",{className:"react-flow__minimap-mask",d:`M${B-W},${ce-W}h${pe+W*2}v${xe+W*2}h${-pe-W*2}z
|
|
379
|
+
M${Z.x},${Z.y}h${Z.width}v${Z.height}h${-Z.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Sw.displayName="MiniMap";A.memo(Sw);const oU=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,uU={[Xo.Line]:"right",[Xo.Handle]:"bottom-right"};function cU({nodeId:e,position:t,variant:n=Xo.Handle,className:r,style:i=void 0,children:s,color:o,minWidth:d=10,minHeight:f=10,maxWidth:m=Number.MAX_VALUE,maxHeight:y=Number.MAX_VALUE,keepAspectRatio:p=!1,resizeDirection:g,autoScale:x=!0,shouldResize:w,onResizeStart:k,onResize:j,onResizeEnd:N}){const _=J8(),E=typeof e=="string"?e:_,L=Sn(),D=A.useRef(null),T=n===Xo.Handle,O=$t(A.useCallback(oU(T&&x),[T,x]),bn),Z=A.useRef(null),V=t??uU[n];A.useEffect(()=>{if(!(!D.current||!E))return Z.current||(Z.current=$$({domNode:D.current,nodeId:E,getStoreItems:()=>{const{nodeLookup:K,transform:X,snapGrid:le,snapToGrid:F,nodeOrigin:Y,domNode:q}=L.getState();return{nodeLookup:K,transform:X,snapGrid:le,snapToGrid:F,nodeOrigin:Y,paneDomNode:q}},onChange:(K,X)=>{const{triggerNodeChanges:le,nodeLookup:F,parentLookup:Y,nodeOrigin:q}=L.getState(),Q=[],ee={x:K.x,y:K.y},ne=F.get(E);if(ne&&ne.expandParent&&ne.parentId){const R=ne.origin??q,H=K.width??ne.measured.width??0,W=K.height??ne.measured.height??0,B={id:ne.id,parentId:ne.parentId,rect:{width:H,height:W,...N8({x:K.x??ne.position.x,y:K.y??ne.position.y},{width:H,height:W},ne.parentId,F,R)}},ce=Vg([B],F,Y,q);Q.push(...ce),ee.x=K.x?Math.max(R[0]*H,K.x):void 0,ee.y=K.y?Math.max(R[1]*W,K.y):void 0}if(ee.x!==void 0&&ee.y!==void 0){const R={id:E,type:"position",position:{...ee}};Q.push(R)}if(K.width!==void 0&&K.height!==void 0){const H={id:E,type:"dimensions",resizing:!0,setAttributes:g?g==="horizontal"?"width":"height":!0,dimensions:{width:K.width,height:K.height}};Q.push(H)}for(const R of X){const H={...R,type:"position"};Q.push(H)}le(Q)},onEnd:({width:K,height:X})=>{const le={id:E,type:"dimensions",resizing:!1,dimensions:{width:K,height:X}};L.getState().triggerNodeChanges([le])}})),Z.current.update({controlPosition:V,boundaries:{minWidth:d,minHeight:f,maxWidth:m,maxHeight:y},keepAspectRatio:p,resizeDirection:g,onResizeStart:k,onResize:j,onResizeEnd:N,shouldResize:w}),()=>{var K;(K=Z.current)==null||K.destroy()}},[V,d,f,m,y,p,k,j,N,w]);const P=V.split("-");return c.jsx("div",{className:Qn(["react-flow__resize-control","nodrag",...P,n,r]),ref:D,style:{...i,scale:O,...o&&{[T?"backgroundColor":"borderColor"]:o}},children:s})}A.memo(cU);function z3(e,t=12){return e.length>t?`${e.slice(0,t)}…`:e}function dU(e=0){return e>=3?"is-strong":e>=2?"is-medium":"is-soft"}function $1(e,t,n,r,i){return{x:e+Math.cos(i)*n,y:t+Math.sin(i)*r}}function fU({network:e,selectedTags:t,expanded:n,onToggleExpanded:r,onToggleTag:i,onSelectVideo:s}){const{nodes:o,edges:d}=A.useMemo(()=>{const y=new Set(t),p=e.nodes.filter(T=>T.type==="tag").sort((T,O)=>{const Z=+!!(O.focus||y.has(O.label))-+!!(T.focus||y.has(T.label));return Z||Number(O.count||O.degree||0)-Number(T.count||T.degree||0)}),g=e.nodes.filter(T=>T.type==="video"),x=p.filter(T=>T.focus||y.has(T.label)),w=x.length?x:p.slice(0,1),k=new Set(w.map(T=>T.id)),j=p.filter(T=>!k.has(T.id)),N=560,_=300,E=p.map((T,O)=>{const Z=!!(T.focus||y.has(T.label)),V=Number(T.count||T.degree||0),P=w.findIndex(le=>le.id===T.id),K=j.findIndex(le=>le.id===T.id),X=P>=0?w.length===1?{x:N-112,y:_-25}:$1(N-110,_-24,64,44,-Math.PI/2+2*Math.PI*P/w.length):$1(N-96,_-20,y.size?320:360,y.size?190:220,-Math.PI/2+2*Math.PI*Math.max(0,K)/Math.max(1,j.length));return{id:T.id,data:{label:`${z3(T.label)}${T.count?` · ${T.count}`:""}`},position:X,className:`knowledge-flow-node is-tag ${dU(V)} ${P>=0?"is-center":""} ${y.has(T.label)?"is-active":""} ${T.focus?"is-focus":""}`,type:"default",style:{width:P>=0?224:Z||V>=3?204:184}}}),L=216;E.push(...g.map((T,O)=>{const Z=-Math.PI/2+2*Math.PI*O/Math.max(1,g.length);return{id:T.id,data:{label:z3(T.label,18)},position:$1(N-104,_-22,y.size?500:470,y.size?270:250,Z),className:"knowledge-flow-node is-video",type:"default",style:{width:L}}}));const D=e.links.map(T=>({id:`${T.source}-${T.target}`,source:T.source,target:T.target,animated:!1,className:`knowledge-flow-edge is-${T.kind||"cooccurrence"}`,style:{strokeWidth:T.kind==="association"?1:Math.min(3,1+Number(T.weight||1)*.28),opacity:T.kind==="association"?.22:Math.min(.48,.18+Number(T.weight||1)*.06)}}));return{nodes:E,edges:D}},[e,t]),f=e.nodes.filter(y=>y.type==="tag").length,m=e.nodes.filter(y=>y.type==="video").length;return c.jsxs("div",{className:"knowledge-network-card",children:[c.jsxs("div",{className:"knowledge-section-head",children:[c.jsxs("div",{children:[c.jsx("h3",{children:"标签关系概览"}),c.jsx("p",{children:t.length?"聚焦已选标签与相关视频。再点一次标签即可取消。":"默认只显示高价值标签与共现关系,避免全量图谱噪音。"})]}),c.jsxs("div",{className:"knowledge-section-actions",children:[c.jsxs("div",{className:"knowledge-network-legend","aria-label":"图谱统计",children:[c.jsxs("span",{children:[c.jsx("i",{className:"is-tag"}),"标签 ",f]}),c.jsxs("span",{children:[c.jsx("i",{className:"is-video"}),"视频 ",m]}),c.jsxs("span",{children:[c.jsx("i",{className:"is-edge"}),"关系 ",e.links.length]})]}),t.length?c.jsx("button",{className:"tertiary-button",type:"button",onClick:()=>t.forEach(y=>i(y)),children:"清空聚焦"}):null,e.hidden_tag_count?c.jsx("button",{className:"tertiary-button",type:"button",onClick:r,children:n?"收起长尾标签":`查看更多标签 · ${e.hidden_tag_count}`}):null]})]}),c.jsx("div",{className:"knowledge-network-canvas",children:c.jsx(xw,{fitView:!0,fitViewOptions:{padding:.14,maxZoom:1.02},nodes:o,edges:d,onNodeClick:(y,p)=>{if(String(p.id).startsWith("tag_")){i(String(p.id).replace(/^tag_/,""));return}String(p.id).startsWith("video_")&&s(String(p.id).replace(/^video_/,""))},nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,panOnDrag:!0,zoomOnScroll:!1,proOptions:{hideAttribution:!0},children:c.jsx(Iq,{gap:26,size:.8})})})]})}function D3(e,t,n={}){return{id:`${e}-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,role:e,content:t,sources:n.sources||[],tools:n.tools||[],status:n.status}}function hU(){const e=lf(),t=A.useRef(null),[n,r]=A.useState("chat"),[i,s]=A.useState(null),[o,d]=A.useState([]),[f,m]=A.useState({nodes:[],links:[],selected_tags:[]}),[y,p]=A.useState(!1),[g,x]=A.useState(""),[w,k]=A.useState([]),[j,N]=A.useState([]),[_,E]=A.useState(!1),[L,D]=A.useState(""),[T,O]=A.useState([]),[Z,V]=A.useState([]),[P,K]=A.useState(!1),[X,le]=A.useState(""),[F,Y]=A.useState(null),[q,Q]=A.useState(!1),[ee,ne]=A.useState(!1),R=A.useRef(null),H=A.useRef({messageId:"",text:""}),W=A.useRef(null),B=A.useMemo(()=>Object.fromEntries(f.nodes.filter(ke=>ke.type==="video").map(ke=>[String(ke.id).replace(/^video_/,""),ke.label])),[f.nodes]),ce=A.useMemo(()=>[{label:"视频",value:(i==null?void 0:i.video_count)??0},{label:"标签",value:(i==null?void 0:i.tag_count)??0},{label:"索引片段",value:(i==null?void 0:i.indexed_chunk_count)??0},{label:"未标记",value:(i==null?void 0:i.untagged_video_count)??0}],[i]);async function pe(ke=j,et=y){const[st,Nt,kn]=await Promise.all([Ke.getKnowledgeTags(),Ke.getKnowledgeNetwork({selectedTags:ke,maxTags:et?20:12,maxVideos:et?10:8}),Ke.getKnowledgeStats()]);"items"in st&&d(st.items),m(Nt),s(kn),le("")}A.useEffect(()=>{pe().catch(ke=>{le(ke instanceof Error?ke.message:"知识库初始化失败")})},[]),A.useEffect(()=>{pe(j,y).catch(ke=>{le(ke instanceof Error?ke.message:"刷新知识库概览失败")})},[j,y]),A.useEffect(()=>{if(n!=="workspace")return;const ke=g.trim(),et=window.setTimeout(()=>{if(!ke){k([]),E(!1);return}E(!0),Ke.searchKnowledge({query:ke,limit:12,filters:j.length?{tags:j}:void 0}).then(st=>{k(st.results)}).catch(st=>{le(st instanceof Error?st.message:"搜索失败")}).finally(()=>{E(!1)})},300);return()=>window.clearTimeout(et)},[n,g,j]),A.useEffect(()=>{if(!q)return;const ke=et=>{var Nt;const st=et.target;st instanceof Node&&((Nt=R.current)!=null&&Nt.contains(st))||Q(!1)};return window.addEventListener("pointerdown",ke),()=>window.removeEventListener("pointerdown",ke)},[q]),A.useEffect(()=>()=>{W.current!==null&&window.clearTimeout(W.current)},[]);function xe(ke){N(et=>et.includes(ke)?et.filter(st=>st!==ke):[...et,ke])}function be(ke){V(et=>[ke,...et.filter(st=>st!==ke)].slice(0,6))}function ye(ke,et){O(st=>st.map(Nt=>Nt.id===ke?et(Nt):Nt))}function Ce(){W.current!==null&&(window.clearTimeout(W.current),W.current=null);const ke=H.current;if(!ke.messageId||!ke.text)return;const{messageId:et,text:st}=ke;H.current={messageId:et,text:""},ye(et,Nt=>({...Nt,content:`${Nt.content}${st}`}))}function Ge(ke,et){if(!et)return;H.current.messageId!==ke&&(Ce(),H.current={messageId:ke,text:""}),H.current.text+=et,W.current===null&&(W.current=window.setTimeout(Ce,48))}function Pe(){return T.filter(ke=>ke.content.trim()&&ke.status!=="streaming").slice(-8).map(ke=>({role:ke.role,content:ke.content.trim().slice(0,1200)}))}function $e(){var ke;(ke=t.current)==null||ke.abort(),t.current=null,Ce(),K(!1),D(""),O([]),le("")}async function qe(ke){const et=String(ke??L).trim();if(!et||P)return;const st=Pe();K(!0),D(""),le("");const Nt=new AbortController;t.current=Nt;const kn=D3("user",et),Ht=D3("assistant","",{status:"streaming",tools:[],sources:[]});O(ct=>[...ct,kn,Ht]),be(et);try{await Ke.streamKnowledgeAsk({query:et,context_limit:5,history:st},{onTool:ct=>{ye(Ht.id,Lt=>{const de=Lt.tools||[],je=de.some(He=>He.id===ct.id)?de.map(He=>He.id===ct.id?{...He,...ct}:He):[...de,ct];return{...Lt,tools:je}})},onTextDelta:ct=>{Ge(Ht.id,ct)},onSources:ct=>{Ce(),ye(Ht.id,Lt=>({...Lt,sources:ct}))},onDone:ct=>{Ce(),ye(Ht.id,Lt=>({...Lt,content:ct.answer||Lt.content,sources:ct.sources,status:"completed"}))},onError:ct=>{Ce(),le(ct),ye(Ht.id,Lt=>({...Lt,content:Lt.content||`知识库助手暂时没有顺利完成回答。
|
|
380
|
+
|
|
381
|
+
${ct}`,status:"error"}))}},{signal:Nt.signal})}catch(ct){if(Nt.signal.aborted){Ce(),ye(Ht.id,de=>({...de,content:de.content||"已停止本轮回答。",status:"completed"}));return}const Lt=ct instanceof Error?ct.message:"问答失败";Ce(),le(Lt),ye(Ht.id,de=>({...de,content:de.content||`知识库助手暂时没有顺利完成回答。
|
|
382
|
+
|
|
383
|
+
${Lt}`,status:"error"}))}finally{Ce(),t.current=null,K(!1)}}function nt(){var ke;(ke=t.current)==null||ke.abort(),t.current=null,K(!1)}async function lt(){if(!ee){le("正在为未标记视频自动打标...");try{ne(!0);const ke=await Ke.autoTagKnowledge();le(`已处理 ${ke.items.length} 个视频`),await pe()}catch(ke){le(ke instanceof Error?ke.message:"自动打标失败")}finally{ne(!1)}}}async function We(){if(!ee){le("正在重建知识库索引...");try{ne(!0);const ke=await Ke.rebuildKnowledgeIndex();le(`索引已重建,共处理 ${ke.indexed_videos} 个视频`),await pe()}catch(ke){le(ke instanceof Error?ke.message:"索引重建失败")}finally{ne(!1)}}}async function Dt(){if(!ee){le("正在自动打标并重建知识库索引...");try{ne(!0);const ke=await Ke.autoTagKnowledge(),et=await Ke.rebuildKnowledgeIndex();le(`已处理 ${ke.items.length} 个标签任务,索引已重建 ${et.indexed_videos} 个视频`),await pe()}catch(ke){le(ke instanceof Error?ke.message:"知识库维护失败")}finally{ne(!1)}}}return c.jsxs("section",{className:"knowledge-page knowledge-page-refined",children:[c.jsxs("div",{className:"knowledge-topbar",children:[c.jsxs("div",{className:"knowledge-view-tabs",children:[c.jsx("button",{className:`knowledge-view-tab ${n==="chat"?"is-active":""}`,type:"button",onClick:()=>r("chat"),children:"AI 问答"}),c.jsx("button",{className:`knowledge-view-tab ${n==="workspace"?"is-active":""}`,type:"button",onClick:()=>r("workspace"),children:"工作台"})]}),c.jsxs("div",{className:"knowledge-topbar-actions",children:[ce.map(ke=>c.jsxs("span",{className:"helper-chip",children:[ke.label," ",ke.value]},ke.label)),c.jsxs("div",{className:`knowledge-maintenance-menu ${q?"is-open":""}`,ref:R,children:[c.jsxs("button",{className:"secondary-button knowledge-maintenance-trigger",type:"button","aria-haspopup":"menu","aria-expanded":q,disabled:ee,onClick:()=>Q(ke=>!ke),children:[ee?"维护中...":"知识库维护",c.jsx("span",{className:"knowledge-maintenance-caret","aria-hidden":"true"})]}),q?c.jsxs("div",{className:"knowledge-maintenance-popover",role:"menu","aria-label":"知识库维护设置",children:[c.jsxs("button",{className:"knowledge-maintenance-item",type:"button",role:"menuitem",disabled:ee,onClick:()=>{Q(!1),We()},children:[c.jsx("strong",{children:"重建索引"}),c.jsx("span",{children:"重新扫描已有结果并刷新检索索引。"})]}),c.jsxs("button",{className:"knowledge-maintenance-item",type:"button",role:"menuitem",disabled:ee||!(i!=null&&i.knowledge_llm_available),onClick:()=>{Q(!1),lt()},children:[c.jsx("strong",{children:"自动打标未标记视频"}),c.jsx("span",{children:"使用知识库 LLM 为未标记内容补充标签。"})]}),c.jsxs("button",{className:"knowledge-maintenance-item",type:"button",role:"menuitem",disabled:ee||!(i!=null&&i.knowledge_llm_available),onClick:()=>{Q(!1),Dt()},children:[c.jsx("strong",{children:"打标后重建索引"}),c.jsx("span",{children:"先补齐标签,再一次性刷新索引。"})]})]}):null]})]})]}),X?c.jsx("div",{className:"knowledge-status-banner",children:X}):null,i!=null&&i.knowledge_llm_available?null:c.jsx("div",{className:"knowledge-status-banner warning",children:"知识库 LLM 未就绪,自动打标和问答暂不可用。"}),n==="chat"?c.jsx(aL,{query:L,onQueryChange:D,onSubmit:()=>void qe(),onStop:nt,onNewConversation:$e,onPickSuggestion:ke=>{D(ke),qe(ke)},disabled:!(i!=null&&i.knowledge_llm_available),loading:P,hasContext:T.length>0||!!L.trim(),messages:T,recentQueries:Z}):c.jsxs("div",{className:"knowledge-workbench-shell",children:[c.jsx(iL,{query:g,onQueryChange:x,results:w,selectedTags:j,allTags:o,onToggleTag:xe,onManageTags:Y,searching:_,statsSummary:ce}),c.jsx(fU,{network:f,selectedTags:j,expanded:y,onToggleExpanded:()=>p(ke=>!ke),onToggleTag:xe,onSelectVideo:ke=>e(`/videos/${ke}`)})]}),c.jsx(lL,{videoId:F,title:F?B[F]||F:"",onClose:()=>Y(null),onUpdated:()=>void pe()})]})}function Ju({label:e,value:t,detail:n,tone:r="default"}){return c.jsxs("div",{className:`summary-metric metric-${r}`,children:[c.jsx("span",{children:e}),c.jsx("strong",{children:t}),n?c.jsx("small",{children:n}):null]})}const H1=16;function mU(e,t){return t<=7?Array.from({length:t},(n,r)=>r+1):e<=3?[1,2,3,4,"ellipsis",t]:e>=t-2?[1,"ellipsis",t-3,t-2,t-1,t]:[1,"ellipsis",e-1,e,e+1,"ellipsis",t]}function pU({snapshot:e,filteredVideos:t,libraryCounts:n,latestVideo:r,query:i,setQuery:s,activeFilter:o,setLibraryFilter:d,serviceOnline:f,runtimeDeviceLabel:m,onToggleFavorite:y}){var T;const[p,g]=A.useState(1),x=n.withResult!==n.completed,w=[{id:"all",label:"全部",count:n.total},{id:"favorite",label:"收藏",count:n.favorite},{id:"completed",label:"已完成",count:n.completed},{id:"running",label:"处理中",count:n.running},...x?[{id:"with-result",label:"有结果",count:n.withResult}]:[]],k=((T=w.find(O=>O.id===o))==null?void 0:T.label)||"全部",j=r?`最近更新:${r.title}`:"输入链接后,视频会自动进入这里统一管理。",N=Math.max(1,Math.ceil(t.length/H1)),_=Math.min(p,N),E=(_-1)*H1,L=t.slice(E,E+H1),D=mU(_,N);return A.useEffect(()=>{g(1)},[o,i]),A.useEffect(()=>{p>N&&g(N)},[p,N]),c.jsxs("section",{className:"library-page",children:[c.jsxs("section",{className:"library-hero",children:[c.jsxs("div",{className:"library-hero-copy",children:[c.jsx("span",{className:"library-kicker",children:"Library"}),c.jsx("h2",{children:"视频资产与摘要结果"}),c.jsx("p",{children:j})]}),c.jsxs("div",{className:"library-hero-status",children:[c.jsx("span",{className:`helper-chip ${f?"status-success":"status-pending"}`,children:f?"服务在线":"服务离线"}),c.jsx("span",{className:"helper-chip",children:m}),c.jsxs("span",{className:"helper-chip",children:["筛选:",k]})]})]}),c.jsx("section",{className:"library-summary-panel",children:c.jsxs("div",{className:"library-summary-grid",children:[c.jsx(Ju,{label:"视频总数",value:String(n.total),detail:"本地已收录资产",tone:"accent"}),c.jsx(Ju,{label:"已收藏",value:String(n.favorite),detail:"重点沉淀内容",tone:"info"}),c.jsx(Ju,{label:"已完成",value:String(n.completed),detail:"可查看完整摘要",tone:"success"}),c.jsx(Ju,{label:"处理中",value:String(n.running),detail:"正在进行转写或总结",tone:"info"}),x?c.jsx(Ju,{label:"有结果",value:String(n.withResult),detail:"摘要结果已沉淀"}):null]})}),c.jsxs("section",{className:"library-collection",children:[c.jsxs("div",{className:"library-toolbar",children:[c.jsxs("div",{className:"library-toolbar-copy",children:[c.jsx("h3",{children:"视频库"}),c.jsxs("p",{children:["共 ",e.videos.length," 个视频资产,当前第 ",_," / ",N," 页"]})]}),c.jsxs("label",{className:"search-field library-search-field",children:[c.jsx("span",{className:"search-icon","aria-hidden":"true",children:c.jsx(Y1,{})}),c.jsx("input",{className:"input-field input-field-search",type:"search",value:i,onChange:O=>s(O.target.value),placeholder:"搜索标题或来源链接..."})]})]}),c.jsx("div",{className:"filter-pill-row library-filter-row",children:w.map(O=>c.jsxs("button",{className:`filter-pill ${o===O.id?"active":""}`,type:"button",onClick:()=>d(O.id),children:[c.jsx("span",{children:O.label}),c.jsx("strong",{children:O.count})]},O.id))}),t.length?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"video-grid",children:L.map(O=>c.jsx(Ob,{video:O,onToggleFavorite:y},O.video_id))}),N>1?c.jsxs("div",{className:"library-pagination","aria-label":"视频库分页",children:[c.jsxs("div",{className:"library-pagination-summary",children:["显示第 ",E+1,"-",Math.min(E+L.length,t.length)," 条,共 ",t.length," 条"]}),c.jsxs("div",{className:"library-pagination-actions",children:[c.jsx("button",{className:"library-pagination-button",type:"button",disabled:_===1,onClick:()=>g(O=>Math.max(1,O-1)),children:"上一页"}),D.map((O,Z)=>{if(O==="ellipsis")return c.jsx("span",{className:"library-pagination-ellipsis",children:"..."},`ellipsis-${Z}`);const V=O;return c.jsx("span",{className:"library-pagination-slot",children:c.jsx("button",{className:`library-pagination-button ${V===_?"is-active":""}`,type:"button",onClick:()=>g(V),"aria-current":V===_?"page":void 0,children:V})},V)}),c.jsx("button",{className:"library-pagination-button",type:"button",disabled:_===N,onClick:()=>g(O=>Math.min(N,O+1)),children:"下一页"})]})]}):null]}):c.jsxs("div",{className:"library-empty-state",children:[c.jsx("div",{className:"library-empty-visual","aria-hidden":"true",children:c.jsx(Y1,{width:34,height:34})}),c.jsxs("div",{className:"library-empty-copy",children:[c.jsx("h4",{children:"当前筛选条件下还没有视频"}),c.jsx("p",{children:"可以调整筛选条件,或者回到首页输入一个视频链接开始生成摘要。"})]})]})]})]})}const xd=[{id:"overview",label:"概览",description:"查看服务状态、运行时与关键配置。",group:"workspace",icon:c.jsx(yN,{})},{id:"general",label:"服务入口",description:"服务监听地址、端口和基础连接参数。",group:"workspace",icon:c.jsx(G1,{})},{id:"directories",label:"目录设置",description:"数据、缓存和任务文件存储位置。",group:"workspace",icon:c.jsx(vN,{})},{id:"fileManagement",label:"空间清理",description:"查看空间占用并清理缓存与孤儿文件。",group:"workspace",icon:c.jsx(Uv,{})},{id:"model",label:"转写模型",description:"云端 ASR、本地 ASR、Whisper 模型和设备偏好。",group:"workspace",icon:c.jsx(xN,{})},{id:"llm",label:"摘要 LLM",description:"主摘要大模型能力与 API 接入参数。",group:"workspace",icon:c.jsx(bN,{})},{id:"summary",label:"摘要与导图",description:"摘要模式、语言、切块策略和导图生成。",group:"workspace",icon:c.jsx(wN,{})},{id:"knowledge",label:"知识库",description:"知识库开关、索引策略、问答模型和依赖安装。",group:"workspace",icon:c.jsx(Uv,{})},{id:"environment",label:"运行时",description:"检查并维护 Python、Torch、CUDA、ASR 与扩展依赖。",group:"system",icon:c.jsx(SN,{})},{id:"performance",label:"性能",description:"任务级并发和摘要吞吐控制。",group:"system",icon:c.jsx(Iv,{})},{id:"advanced",label:"高级",description:"CUDA 变体、运行时通道和缓存行为。",group:"system",icon:c.jsx(Iv,{})},{id:"updates",label:"应用更新",description:"检查桌面应用新版本并管理安装。",group:"system",icon:c.jsx(G1,{})},{id:"logs",label:"日志与控制",description:"查看服务日志并控制后端进程。",group:"system",icon:c.jsx(kN,{})}];function gU(){return c.jsxs("div",{className:"settings-input-help",children:[c.jsx("span",{className:"settings-input-caption",children:"调用云端语音识别必须提供 API Key。"}),c.jsxs("div",{className:"settings-help-popover",children:[c.jsx("span",{className:"settings-help-link",role:"button",tabIndex:0,children:"如何获得 API?"}),c.jsxs("div",{className:"settings-help-popover-card",id:"siliconflow-api-help",children:[c.jsx("strong",{children:"获取步骤"}),c.jsxs("ol",{children:[c.jsxs("li",{children:["注册 SiliconFlow 账号:"," ",c.jsx("a",{href:"https://cloud.siliconflow.cn/i/d8SF8w5Z",target:"_blank",rel:"noreferrer",children:"点此注册"})]}),c.jsxs("li",{children:["新建 API Key:"," ",c.jsx("a",{href:"https://cloud.siliconflow.cn/me/account/ak",target:"_blank",rel:"noreferrer",children:"前往创建"})]})]})]})]})]})}const L3=60;function Ma(e){if(!Number.isFinite(e)||e<=0)return"0 B";const t=["B","KB","MB","GB","TB"],n=Math.min(Math.floor(Math.log(e)/Math.log(1024)),t.length-1),r=e/1024**n;return`${r>=100||n===0?r.toFixed(0):r.toFixed(1)} ${t[n]}`}function ko(e,t){return`${new Intl.NumberFormat("zh-CN").format(Math.max(0,e))} ${t}`}function No(e,t){const n=Number.parseInt(e,10);return Number.isFinite(n)?Math.max(1,n):t}function yU({snapshot:e,desktop:t,focusIssueRequest:n,onRefresh:r,onSettingsSaved:i,updateInfo:s,canCheckUpdate:o,canInstallUpdate:d,onCheckUpdate:f,onDownloadUpdate:m,onInstallUpdate:y,onOpenUpdateDialog:p}){var ti,ni,gl,In,Wr,ri,$a,us,_i,Ai,Ha,ai,yl,G,Se,ve,Be;const[g,x]=A.useState(e.settings),[w,k]=A.useState(e.environment),[j,N]=A.useState(!1),[_,E]=A.useState(!1),[L,D]=A.useState(""),[T,O]=A.useState(""),[Z,V]=A.useState(""),[P,K]=A.useState(!1),[X,le]=A.useState(0),[F,Y]=A.useState(""),[q,Q]=A.useState(null),[ee,ne]=A.useState(""),[R,H]=A.useState(""),[W,B]=A.useState(""),[ce,pe]=A.useState(!1),[xe,be]=A.useState(""),[ye,Ce]=A.useState(""),[Ge,Pe]=A.useState(!1),[$e,qe]=A.useState(null),[nt,lt]=A.useState(""),[We,Dt]=A.useState(!1),[ke,et]=A.useState(!1),[st,Nt]=A.useState(""),[kn,Ht]=A.useState(((ni=(ti=e.systemInfo)==null?void 0:ti.service)==null?void 0:ni.log_file)||t.logPath||""),[ct,Lt]=A.useState(""),[de,je]=A.useState(""),[He,rt]=A.useState(!1),[gt,Pt]=A.useState(""),[fn,Wt]=A.useState(!1),[Fe,qt]=A.useState(null),[jt,Jt]=A.useState(!1),[Rt,_e]=A.useState(!1),[Le,Ye]=A.useState(""),[Ue,dt]=A.useState("overview"),[en,Kt]=A.useState(null),[ft,Oe]=A.useState(null),[Ln,kt]=A.useState(!1),[hn,or]=A.useState(!1),[Wn,Lr]=A.useState(""),[Bt,kr]=A.useState([]),tt=A.useRef({}),Za=A.useRef(null);A.useEffect(()=>{j||x(e.settings)},[j,e.settings]),A.useEffect(()=>{k(e.environment)},[e.environment]),A.useEffect(()=>{var I,me;Ht(((me=(I=e.systemInfo)==null?void 0:I.service)==null?void 0:me.log_file)||t.logPath||"")},[t.logPath,(In=(gl=e.systemInfo)==null?void 0:gl.service)==null?void 0:In.log_file]),A.useEffect(()=>{Jn(),an({silent:!0})},[]),A.useEffect(()=>{const I=window.setInterval(()=>{an({silent:!0})},18e5);return()=>window.clearInterval(I)},[]);async function Jn(){var I,me,Ae,ot,At;try{const Xt=await Ke.getSystemLogs();Nt(Xt.content||"日志文件存在,但当前还没有内容。"),Ht(Xt.path||((me=(I=e.systemInfo)==null?void 0:I.service)==null?void 0:me.log_file)||t.logPath||"")}catch(Xt){try{const Er=await((Ae=window.desktop)==null?void 0:Ae.logs.readServiceLogTail(200));if(Er){Nt(Er.content||"本地日志文件存在,但当前还没有内容。"),Ht(Er.path||((At=(ot=e.systemInfo)==null?void 0:ot.service)==null?void 0:At.log_file)||t.logPath||""),Lt("服务接口不可用,已切换为本地日志读取。");return}}catch{}Nt(Xt instanceof Error?Xt.message:"读取日志失败")}}async function an(I={}){try{Dt(!0),I.silent||lt("正在检查所有运行时...");const me=await Ke.getRuntimeStatus();qe(me);const Ae=me.channels.filter(ot=>ot.needsUpdate).length;I.silent||lt(Ae>0?`${Ae} 个运行时需要同步基础版本。`:"所有已安装运行时均为最新基础版本。")}catch(me){I.silent||lt(me instanceof Error?me.message:"运行时检查失败")}finally{Dt(!1)}}async function un(){var I;if(!(!g||ke))try{et(!0),lt("正在同步需要更新的运行时...");const me=await Ke.syncRuntime();me.runtimeStatus?qe(me.runtimeStatus):await an({silent:!0});const Ae=me.environment||await Ke.getEnvironment({runtimeChannel:g.runtime_channel,refresh:!0});k(Ae),i(g,Ae);const ot=((I=me.channels)==null?void 0:I.filter(At=>At.synced).length)??0;lt(ot>0?`已同步 ${ot} 个运行时,保留 CUDA / ASR / 知识库扩展包。`:"运行时已检查,无需同步。"),r()}catch(me){lt(me instanceof Error?me.message:"运行时同步失败")}finally{et(!1)}}const er=A.useCallback(async()=>{var I;if(!g||!((I=window.desktop)!=null&&I.fileManager)){Ye("当前环境不支持文件管理。");return}try{Jt(!0),Ye("");let me;if(e.serviceOnline)try{me=(await Ke.listTasks()).map(ot=>ot.task_id)}catch{me=void 0}const Ae=await window.desktop.fileManager.getStorageOverview({dataDir:g.data_dir,cacheDir:g.cache_dir,tasksDir:g.tasks_dir,taskIds:me});qt(Ae),me||Ye("服务离线:已展示本地占用情况,清理操作需要在服务在线时确认引用关系。")}catch(me){Ye(me instanceof Error?me.message:"读取文件占用失败")}finally{Jt(!1)}},[g,g==null?void 0:g.data_dir,g==null?void 0:g.cache_dir,g==null?void 0:g.tasks_dir,e.serviceOnline]);async function $n(I){var me;!g||!((me=window.desktop)!=null&&me.fileManager)||await window.desktop.fileManager.openDirectory(I,{dataDir:g.data_dir,cacheDir:g.cache_dir,tasksDir:g.tasks_dir})}async function ol(){var I;if(!(!g||!((I=window.desktop)!=null&&I.fileManager)||!Yt))try{_e(!0),Ye("");const me=(await Ke.listTasks()).map(xa=>xa.task_id),Ae=await window.desktop.fileManager.getStorageOverview({dataDir:g.data_dir,cacheDir:g.cache_dir,tasksDir:g.tasks_dir,taskIds:me}),ot=Ae.cleanup.orphanTaskCount+Ae.cleanup.cacheCandidateCount,At=Ae.cleanup.orphanTaskBytes+Ae.cleanup.cacheCandidateBytes;if(ot<=0){qt(Ae),Ye("当前没有可安全清理的缓存或孤儿文件。");return}if(!window.confirm(`将删除 ${ot} 项可回收内容,预计释放 ${Ma(At)}。
|
|
384
|
+
|
|
385
|
+
包含:${Ae.cleanup.orphanTaskCount} 个孤儿任务目录、${Ae.cleanup.cacheCandidateCount} 个缓存项。
|
|
386
|
+
此操作不会删除仍被引用的任务结果。`)){qt(Ae),Ye("已取消清理。");return}const Er=await window.desktop.fileManager.cleanupOrphans({cacheDir:g.cache_dir,tasksDir:g.tasks_dir,taskIds:me});await er(),Ye(`已清理 ${Er.deletedCount} 项内容,释放约 ${Ma(Er.reclaimedBytes)}。`)}catch(me){Ye(me instanceof Error?me.message:"清理文件失败")}finally{_e(!1)}}async function tr(){try{or(!0),Lr("");const I=await Ke.listTasks();kr(I.slice(0,L3))}catch(I){Lr(I instanceof Error?I.message:"读取任务列表失败")}finally{or(!1)}}const mn=!!((Wr=t.backend)!=null&&Wr.running),ur=!!((ri=t.backend)!=null&&ri.ready),Yt=e.serviceOnline,Rn=kn||((us=($a=e.systemInfo)==null?void 0:$a.service)==null?void 0:us.log_file)||t.logPath||"-",Nr=`gpu-${(g==null?void 0:g.cuda_variant)||"cu128"}`,Nn=xd.find(I=>I.id===Ue)||xd[0],Rr=xd.filter(I=>I.group==="workspace"),cn=xd.filter(I=>I.group==="system"),Hn=!!(g!=null&&g.llm_enabled&&(g!=null&&g.llm_api_key_configured)),Qa=String((g==null?void 0:g.knowledge_llm_mode)||"same_as_main").trim().toLowerCase()==="custom",pr=Qa?!!(g!=null&&g.knowledge_llm_enabled&&String((g==null?void 0:g.knowledge_llm_base_url)||"").trim()&&String((g==null?void 0:g.knowledge_llm_model)||"").trim()):!!(g!=null&&g.llm_enabled&&String((g==null?void 0:g.llm_base_url)||"").trim()&&String((g==null?void 0:g.llm_model)||"").trim()),Zr=!!(g!=null&&g.auto_generate_mindmap),Da=t.version||((Ai=(_i=e.systemInfo)==null?void 0:_i.application)==null?void 0:Ai.version)||"-",Br=(g==null?void 0:g.transcription_provider)==="local"?!!(w!=null&&w.localAsrAvailable):!!(g!=null&&g.siliconflow_asr_api_key_configured),ul=_c(s),Wa=fN(s),Ja=hN(s),La=mN(s,Da),jr=s.status==="checking"||s.status==="downloading"||s.status==="installing",jn=T.includes("失败"),ga=[{threshold:10,label:"准备环境"},{threshold:26,label:"安装基础工具"},{threshold:48,label:"同步应用依赖"},{threshold:78,label:"安装 CUDA 依赖"},{threshold:92,label:"刷新环境信息"},{threshold:100,label:"完成设置"}];if(A.useEffect(()=>{if(!g||Ue!=="fileManagement")return;const I=window.setTimeout(()=>{er()},100);return()=>window.clearTimeout(I)},[Ue,er]),A.useEffect(()=>{if(!P)return;const I=window.setInterval(()=>{const me=q?Date.now()-q:0,Ae=Math.max(0,Math.floor(me/1e3)),ot=Math.min(94,8+Math.floor(Ae*1.6));le(At=>{const Xt=Math.max(At,ot),Er=ga.find(xa=>Xt<=xa.threshold)||ga[ga.length-1];return Y(`${Er.label} · 已等待 ${Ae} 秒`),Xt})},1200);return()=>window.clearInterval(I)},[P,q]),A.useEffect(()=>{if(!n||!g||Za.current===n.nonce)return;Za.current=n.nonce;const I=pl(n.issueKey);I&&(dt(I.category),Kt(I.targetKey))},[n,g]),A.useEffect(()=>{if(!en)return;const I=tt.current[en];if(!I)return;const me=window.setTimeout(()=>{I.scrollIntoView({behavior:"smooth",block:"center"});const Ae=I.matches("input, select, textarea, button")?I:I.querySelector("input, select, textarea, button");Ae instanceof HTMLElement&&Ae.focus({preventScroll:!0}),Oe(en),Kt(null)},80);return()=>window.clearTimeout(me)},[Ue,en]),A.useEffect(()=>{if(!ft)return;const I=window.setTimeout(()=>Oe(me=>me===ft?null:me),2200);return()=>window.clearTimeout(I)},[ft]),A.useEffect(()=>{Ln&&tr()},[Ln]),!g)return c.jsx("section",{className:"grid-card empty-state-card",children:"正在加载设置..."});const cl=g.transcription_provider==="siliconflow",Cr=g.transcription_provider==="local"?1:2,dl=Cr===1?"当前建议:本地 ASR / CPU 场景任务并发数设为 1,导图并发数设为 1。":"当前建议:云 ASR 或 GPU 场景任务并发数设为 2,导图并发数设为 1。",ya=Bt.filter(I=>I.status==="queued").length,fl=Bt.filter(I=>I.status==="running").length,An=!!(w!=null&&w.localAsrInstalled),gr=!!(w!=null&&w.knowledgeDependenciesReady),Cn=[w!=null&&w.chromadbInstalled?null:"chromadb",w!=null&&w.sentenceTransformersInstalled?null:"sentence-transformers"].filter(Boolean),yr=($e==null?void 0:$e.channels.filter(I=>I.needsUpdate))||[];$e!=null&&$e.channels.find(I=>I.runtimeChannel===((w==null?void 0:w.runtimeChannel)||g.runtime_channel));const qn=($e==null?void 0:$e.pipIndexes.map(I=>I.label).join(" / "))||"official / tsinghua / aliyun",Ra=new Map(((Fe==null?void 0:Fe.directories)||[]).map(I=>[I.key,I])),vr=Ra.get("cache")||null,Or=Ra.get("tasks")||null,nr=Ra.get("logs")||null,hl=Ra.get("runtime")||null,cr=!!(Yt&&(Fe!=null&&Fe.cleanup.serviceAvailable)),Mi=((Fe==null?void 0:Fe.cleanup.orphanTaskBytes)||0)+((Fe==null?void 0:Fe.cleanup.cacheCandidateBytes)||0),Un=((Fe==null?void 0:Fe.cleanup.orphanTaskCount)||0)+((Fe==null?void 0:Fe.cleanup.cacheCandidateCount)||0);function as(I){const me=pl(I);me&&(dt(me.category),Kt(me.targetKey))}function ht(I){N(!0),x(I)}function Qr(I){return String(I.host||"").trim()?I.transcription_provider==="siliconflow"&&!String(I.siliconflow_asr_base_url||"").trim()?{message:"请先填写 SiliconFlow Base URL。",category:"model",targetKey:"siliconflow_asr_base_url"}:I.llm_enabled&&!String(I.llm_base_url||"").trim()?{message:"请先填写 LLM API Base URL。",category:"llm",targetKey:"llm_base_url"}:null:{message:"请先填写监听地址。",category:"general",targetKey:"host"}}async function is(I){if(I.preventDefault(),!g||_)return;const me=Qr(g);if(me){D(me.message),dt(me.category),Kt(me.targetKey);return}try{E(!0);const Ae=await Ke.updateSettings({...g,device_preference:_o(g.device_preference)}),ot=Ae.settings;x(ot),N(!1),D(Ae.message||"设置已保存"),(async()=>{try{const At=await Ke.getEnvironment({runtimeChannel:ot.runtime_channel});k(At),i(ot,At)}catch{i(ot,null)}})()}catch(Ae){D(Ae instanceof Error?Ae.message:"保存设置失败")}finally{E(!1)}}async function ls(){if(g)try{pe(!0),H("正在安装本地语音识别环境..."),B("");const I=await Ke.installLocalAsr();H(I.installed?"本地语音识别环境已安装":"本地语音识别环境安装失败"),B(I.stdoutTail||"");const me=I.environment||await Ke.getEnvironment({runtimeChannel:g.runtime_channel,refresh:!0});if(k(me),I.installed)try{const Ae=await Ke.updateSettings({...g,transcription_provider:"local",device_preference:_o(g.device_preference)});x(Ae.settings),N(!1),D(Ae.message||"已切换为本地 ASR"),i(Ae.settings,me)}catch(Ae){H(`本地 ASR 已安装,但切换默认转写方式失败:${Ae instanceof Error?Ae.message:"保存设置失败"}`)}r()}catch(I){H(I instanceof Error?I.message:"安装本地语音识别环境失败")}finally{pe(!1)}}async function ei(){if(g)try{Pe(!0),be("正在安装知识库依赖..."),Ce("");const I=await Ke.installKnowledgeDependencies();be(I.installed?"知识库依赖已安装并完成检测":"知识库依赖安装后仍未完全就绪"),Ce(I.stdoutTail||"");const me=I.environment||await Ke.getEnvironment({runtimeChannel:g.runtime_channel,refresh:!0});k(me),r()}catch(I){be(I instanceof Error?I.message:"安装知识库依赖失败")}finally{Pe(!1)}}async function Ba(){if(!(!g||fn))try{Wt(!0),Pt("正在测试 LLM 连接与 JSON 输出...");const I=await Ke.testLlmConnection({llm_enabled:g.llm_enabled,llm_provider:g.llm_provider,llm_base_url:g.llm_base_url,llm_api_key:g.llm_api_key,llm_model:g.llm_model}),me=I.jsonPreview||I.responsePreview,Ae=me?`,示例:${me}`:"";Pt(`${I.message}${Ae}`)}catch(I){Pt(I instanceof Error?I.message:"LLM 连接测试失败")}finally{Wt(!1)}}async function Is(){if(!(!g||fn))try{Wt(!0),Pt("正在测试知识库 LLM 连接与 JSON 输出...");const I=await Ke.testLlmConnection({llm_enabled:g.knowledge_llm_enabled,llm_base_url:g.knowledge_llm_base_url,llm_api_key:g.knowledge_llm_api_key,llm_model:g.knowledge_llm_model}),me=I.jsonPreview||I.responsePreview,Ae=me?`,示例:${me}`:"";Pt(`${I.message}${Ae}`)}catch(I){Pt(I instanceof Error?I.message:"知识库 LLM 连接测试失败")}finally{Wt(!1)}}async function ss(){if(!(!g||He))try{rt(!0),je("正在测试 ASR 连接...");const I=await Ke.testAsrConnection({transcription_provider:g.transcription_provider,siliconflow_asr_base_url:g.siliconflow_asr_base_url,siliconflow_asr_api_key:g.siliconflow_asr_api_key,siliconflow_asr_model:g.siliconflow_asr_model}),me=I.responsePreview?`,示例:${I.responsePreview}`:"";je(`${I.message}${me}`)}catch(I){je(I instanceof Error?I.message:"ASR 连接测试失败")}finally{rt(!1)}}const Oa=ga.map((I,me)=>{const Ae=me===0?0:ga[me-1].threshold,ot=X>=I.threshold,At=!ot&&X>Ae;return{...I,state:ot?"done":jn&&At?"failed":At?"active":"pending"}}),$r=Oa.find(I=>I.state==="failed")||Oa.find(I=>I.state==="active")||(X>=100?Oa[Oa.length-1]:Oa.find(I=>I.state==="done"))||null,Hr=Math.round(Math.min(X,100)),ml=F.includes("·")&&((Ha=F.split("·")[1])==null?void 0:Ha.trim())||"",rr=S6(g,w),va=T.includes("失败")?"安装失败":X>=100?"安装完成":P?"正在安装 CUDA 支持":"安装进度",os=($r==null?void 0:$r.label)||"等待开始";function yn(I){return me=>{tt.current[I]=me}}function pl(I){return g?I==="siliconflow_asr_api_key"?{category:"model",targetKey:"siliconflow_asr_api_key"}:I==="local_asr_runtime"?{category:"environment",targetKey:"local_asr_runtime"}:I==="auto_mindmap_requires_llm"?{category:"llm",targetKey:"llm_enabled"}:I==="knowledge_dependencies"?{category:"knowledge",targetKey:"knowledge_dependencies"}:I==="knowledge_llm_configuration"?String(g.knowledge_llm_mode||"same_as_main").trim().toLowerCase()==="custom"?g.knowledge_llm_enabled?String(g.knowledge_llm_base_url||"").trim()?String(g.knowledge_llm_model||"").trim()?{category:"knowledge",targetKey:"knowledge_llm_base_url"}:{category:"knowledge",targetKey:"knowledge_llm_model"}:{category:"knowledge",targetKey:"knowledge_llm_base_url"}:{category:"knowledge",targetKey:"knowledge_llm_enabled"}:g.llm_enabled?String(g.llm_base_url||"").trim()?String(g.llm_model||"").trim()?{category:"knowledge",targetKey:"knowledge_llm_mode"}:{category:"llm",targetKey:"llm_model"}:{category:"llm",targetKey:"llm_base_url"}:{category:"llm",targetKey:"llm_enabled"}:I==="llm_configuration"?String(g.llm_base_url||"").trim()?!g.llm_api_key_configured&&!String(g.llm_api_key||"").trim()?{category:"llm",targetKey:"llm_api_key"}:String(g.llm_model||"").trim()?{category:"llm",targetKey:"llm_base_url"}:{category:"llm",targetKey:"llm_model"}:{category:"llm",targetKey:"llm_base_url"}:null:null}return c.jsxs("div",{className:"settings-page-wrapper",children:[c.jsx(_g,{notices:[{id:"settings-save-status",message:L},{id:"settings-cuda-status",message:T},{id:"settings-local-asr-status",message:R},{id:"settings-knowledge-deps-status",message:xe},{id:"settings-runtime-status",message:nt},{id:"settings-asr-test-status",message:de},{id:"settings-llm-test-status",message:gt},{id:"settings-storage-status",message:Le},{id:"settings-backend-error",message:((ai=t.backend)==null?void 0:ai.lastError)||"",tone:"error"},{id:"settings-service-status",message:ct}]}),c.jsxs("aside",{className:"settings-nav",children:[c.jsxs("div",{className:"settings-nav-header",children:[c.jsx("span",{className:"settings-nav-label-small",children:"BriefVid"}),c.jsxs("div",{className:"settings-nav-brand-card",children:[c.jsxs("div",{className:"settings-nav-brand-copy",children:[c.jsx("span",{className:"settings-nav-brand-kicker",children:"设置"}),c.jsx("strong",{children:"管理应用与运行配置"}),c.jsx("p",{children:"调整目录、模型、服务与环境配置。"})]}),c.jsxs("div",{className:"settings-nav-brand-metrics",children:[c.jsxs("div",{className:"settings-nav-metric",children:[c.jsx("span",{children:"服务"}),c.jsx("strong",{children:Yt?"在线":"离线"})]}),c.jsxs("div",{className:"settings-nav-metric",children:[c.jsx("span",{children:"设备"}),c.jsx("strong",{children:K0(g.whisper_device)})]})]})]})]}),c.jsxs("div",{className:"settings-nav-list",children:[c.jsxs("div",{className:"settings-nav-group",children:[c.jsx("span",{className:"settings-nav-group-label",children:"工作区"}),c.jsx("nav",{className:"settings-nav-links",children:Rr.map(I=>c.jsxs("button",{className:`settings-nav-item ${Ue===I.id?"active":""}`,type:"button",onClick:()=>dt(I.id),children:[c.jsx("span",{className:"settings-nav-icon",children:I.icon}),c.jsxs("span",{className:"settings-nav-copy",children:[c.jsx("span",{className:"settings-nav-label",children:I.label}),c.jsx("span",{className:"settings-nav-description",children:I.description})]})]},I.id))})]}),c.jsxs("div",{className:"settings-nav-group",children:[c.jsx("span",{className:"settings-nav-group-label",children:"系统"}),c.jsx("nav",{className:"settings-nav-links",children:cn.map(I=>c.jsxs("button",{className:`settings-nav-item ${Ue===I.id?"active":""}`,type:"button",onClick:()=>dt(I.id),children:[c.jsx("span",{className:"settings-nav-icon",children:I.icon}),c.jsxs("span",{className:"settings-nav-copy",children:[c.jsx("span",{className:"settings-nav-label",children:I.label}),c.jsx("span",{className:"settings-nav-description",children:I.description})]})]},I.id))})]})]}),c.jsxs("div",{className:"settings-nav-actions",children:[c.jsx("button",{className:"primary-button settings-save-btn",type:"button",disabled:_,onClick:async I=>{I.preventDefault(),await is(I)},children:_?"保存中...":"保存设置"}),c.jsxs("div",{className:"settings-nav-summary",children:[c.jsxs("div",{className:"settings-nav-summary-row",children:[c.jsx("span",{children:"运行时"}),c.jsx("strong",{children:(w==null?void 0:w.runtimeChannel)||g.runtime_channel||"base"})]}),c.jsxs("div",{className:"settings-nav-summary-row",children:[c.jsx("span",{children:"LLM"}),c.jsx("strong",{children:Hn?"已配置":g.llm_enabled?"待补全":"关闭"})]}),c.jsxs("div",{className:"settings-nav-summary-row",children:[c.jsx("span",{children:"自动导图"}),c.jsx("strong",{children:g.auto_generate_mindmap?"开启":"关闭"})]}),c.jsxs("div",{className:"settings-nav-summary-row",children:[c.jsx("span",{children:"知识库"}),c.jsx("strong",{children:g.knowledge_enabled?gr?"就绪":"待安装":"关闭"})]})]})]})]}),c.jsx("main",{className:"settings-content",children:c.jsxs("div",{className:"settings-content-scroll",children:[c.jsxs("header",{className:"settings-page-hero",children:[c.jsxs("div",{className:"settings-page-hero-copy",children:[c.jsx("span",{className:"settings-page-kicker",children:"Settings"}),c.jsx("h1",{children:Nn.label}),c.jsx("p",{children:Nn.description})]}),c.jsxs("div",{className:"settings-page-hero-meta",children:[c.jsx("span",{className:`settings-hero-chip ${Yt?"is-success":"is-danger"}`,children:Yt?"服务在线":"服务离线"}),c.jsx("span",{className:`settings-hero-chip ${rr.hasBlockingIssues?"is-danger":rr.isConfigured?"is-success":"is-warning"}`,children:rr.hasBlockingIssues?"配置缺失":rr.isConfigured?"配置完整":"配置待补全"}),c.jsx("span",{className:"settings-hero-chip",children:(w==null?void 0:w.runtimeChannel)||g.runtime_channel||"base"}),c.jsx("span",{className:`settings-hero-chip ${w!=null&&w.cudaAvailable?"is-success":""}`,children:w!=null&&w.cudaAvailable?"CUDA Ready":"CPU Only"}),c.jsx("span",{className:`settings-hero-chip ${Hn?"is-success":""}`,children:Hn?"LLM 已配置":g.llm_enabled?"LLM 待补全":"LLM 关闭"}),c.jsx("span",{className:`settings-hero-chip ${g.knowledge_enabled&&(w!=null&&w.knowledgeDependenciesReady)?"is-success":g.knowledge_enabled?"is-warning":""}`,children:g.knowledge_enabled?w!=null&&w.knowledgeDependenciesReady?"知识库就绪":"知识库待安装":"知识库关闭"})]})]}),rr.checked?c.jsxs("section",{className:`settings-config-health-card tone-${rr.state}`,children:[c.jsxs("div",{className:"settings-config-health-copy",children:[c.jsx("span",{className:"settings-story-kicker",children:"Setup Health"}),c.jsx("h3",{children:rr.hasBlockingIssues?"先补全关键配置,再开始处理视频":rr.isConfigured?"当前配置状态良好":"建议补全增强能力配置"}),c.jsx("p",{children:rr.summary})]}),rr.isConfigured?null:c.jsx("div",{className:"settings-config-health-list",children:rr.issues.map(I=>c.jsxs("button",{className:"settings-config-health-item",type:"button",onClick:()=>as(I.key),children:[c.jsx("strong",{children:I.title}),c.jsx("span",{children:I.description})]},I.key))})]}):null,Ue==="overview"&&c.jsxs("section",{className:"settings-category-section",children:[c.jsxs("header",{className:"settings-category-header",children:[c.jsx("h2",{children:"设置总览"}),c.jsx("p",{children:"查看当前配置、运行状态和常用操作。"})]}),c.jsxs("div",{className:"settings-story-card",children:[c.jsxs("div",{className:"settings-story-copy",children:[c.jsx("span",{className:"settings-story-kicker",children:"概览"}),c.jsx("h3",{children:"当前配置与运行状态"}),c.jsx("p",{children:"这里展示运行时、模型、摘要模式和服务状态。排障时请切换到环境检测或日志。"})]}),c.jsxs("div",{className:"settings-story-stats",children:[c.jsxs("div",{className:"settings-story-stat",children:[c.jsx("span",{children:"服务端口"}),c.jsxs("strong",{children:[g.host,":",g.port]})]}),c.jsxs("div",{className:"settings-story-stat",children:[c.jsx("span",{children:"转写"}),c.jsx("strong",{children:g.transcription_provider==="siliconflow"?"SiliconFlow API":"本地 ASR"})]}),c.jsxs("div",{className:"settings-story-stat",children:[c.jsx("span",{children:"摘要模式"}),c.jsx("strong",{children:g.summary_mode==="llm"?"LLM 智能摘要":"抽取式摘要"})]})]})]}),c.jsxs("div",{className:"overview-status-grid",children:[c.jsxs("div",{className:"overview-status-card",children:[c.jsx("div",{className:"overview-status-icon",children:c.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[c.jsx("circle",{cx:"12",cy:"12",r:"10"}),c.jsx("path",{d:"M12 6v6l4 2"})]})}),c.jsxs("div",{className:"overview-status-info",children:[c.jsx("span",{className:"overview-status-label",children:"服务状态"}),c.jsx("strong",{className:`overview-status-value ${Yt?"text-success":"text-danger"}`,children:Yt?"运行中":"已停止"})]})]}),c.jsxs("div",{className:"overview-status-card",children:[c.jsx("div",{className:"overview-status-icon",children:c.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[c.jsx("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2"}),c.jsx("line",{x1:"8",y1:"21",x2:"16",y2:"21"})]})}),c.jsxs("div",{className:"overview-status-info",children:[c.jsx("span",{className:"overview-status-label",children:"运行时"}),c.jsx("strong",{className:"overview-status-value",children:(w==null?void 0:w.runtimeChannel)||g.runtime_channel||"base"})]})]}),c.jsxs("div",{className:"overview-status-card",children:[c.jsx("div",{className:"overview-status-icon",children:c.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:c.jsx("polyline",{points:"22 12 18 12 15 21 9 3 6 12 2 12"})})}),c.jsxs("div",{className:"overview-status-info",children:[c.jsx("span",{className:"overview-status-label",children:"推理设备"}),c.jsx("strong",{className:"overview-status-value",children:g.transcription_provider==="siliconflow"?"云端识别":K0(g.whisper_device)})]})]}),c.jsxs("div",{className:"overview-status-card",children:[c.jsx("div",{className:"overview-status-icon",children:c.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:c.jsx("path",{d:"M20.2 7.8l-7.7 7.7a4 4 0 0 1-5.7 0l-3-3a1 1 0 0 1 1.4-1.4l3 3a2 2 0 0 0 2.8 0l7.7-7.7a1 1 0 0 1 1.4 1.4z"})})}),c.jsxs("div",{className:"overview-status-info",children:[c.jsx("span",{className:"overview-status-label",children:"LLM 摘要"}),c.jsx("strong",{className:`overview-status-value ${g.llm_enabled?"text-success":""}`,children:g.llm_enabled?"已启用":"已关闭"})]})]}),c.jsxs("div",{className:"overview-status-card",children:[c.jsx("div",{className:"overview-status-icon",children:c.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:c.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}),c.jsxs("div",{className:"overview-status-info",children:[c.jsx("span",{className:"overview-status-label",children:"语音识别服务"}),c.jsx("strong",{className:`overview-status-value ${Br?"text-success":"text-danger"}`,children:g.transcription_provider==="siliconflow"?Br?"硅基流动已配置":"硅基流动待补全":An?"本地 ASR 已安装":"本地 ASR 未安装"})]})]}),c.jsxs("div",{className:"overview-status-card",children:[c.jsx("div",{className:"overview-status-icon",children:c.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[c.jsx("path",{d:"M4 5h16"}),c.jsx("path",{d:"M4 12h10"}),c.jsx("path",{d:"M4 19h16"}),c.jsx("circle",{cx:"18",cy:"12",r:"2"})]})}),c.jsxs("div",{className:"overview-status-info",children:[c.jsx("span",{className:"overview-status-label",children:"自动导图"}),c.jsx("strong",{className:`overview-status-value ${Zr?"text-success":""}`,children:Zr?"已启用":"已关闭"})]})]})]}),c.jsxs("div",{className:"overview-section",children:[c.jsx("h3",{className:"overview-section-title",children:"环境信息"}),c.jsxs("div",{className:"overview-info-grid",children:[c.jsxs("div",{className:"overview-info-item",children:[c.jsx("span",{className:"overview-info-label",children:"Python"}),c.jsx("span",{className:"overview-info-value",children:(w==null?void 0:w.pythonVersion)||"-"})]}),c.jsxs("div",{className:"overview-info-item",children:[c.jsx("span",{className:"overview-info-label",children:"Torch"}),c.jsx("span",{className:`overview-info-value ${w!=null&&w.torchInstalled?"text-success":""}`,children:w!=null&&w.torchInstalled?(w==null?void 0:w.torchVersion)||"已安装":"未安装"})]}),c.jsxs("div",{className:"overview-info-item",children:[c.jsx("span",{className:"overview-info-label",children:"GPU"}),c.jsx("span",{className:`overview-info-value ${w!=null&&w.cudaAvailable?"text-success":""}`,children:w!=null&&w.cudaAvailable?(w==null?void 0:w.gpuName)||"已就绪":"未检测到"})]}),c.jsxs("div",{className:"overview-info-item",children:[c.jsx("span",{className:"overview-info-label",children:"yt-dlp"}),c.jsx("span",{className:"overview-info-value",children:(w==null?void 0:w.ytDlpVersion)||"-"})]}),c.jsxs("div",{className:"overview-info-item",children:[c.jsx("span",{className:"overview-info-label",children:"本地 ASR"}),c.jsx("span",{className:`overview-info-value ${w!=null&&w.localAsrInstalled?"text-success":""}`,children:w!=null&&w.localAsrInstalled?(w==null?void 0:w.localAsrVersion)||"已安装":"未安装"})]}),c.jsxs("div",{className:"overview-info-item",children:[c.jsx("span",{className:"overview-info-label",children:"FFmpeg"}),c.jsx("span",{className:`overview-info-value ${w!=null&&w.ffmpegLocation?"text-success":""}`,children:w!=null&&w.ffmpegLocation?"已安装":"未安装"})]})]})]}),c.jsxs("div",{className:"overview-section",children:[c.jsx("h3",{className:"overview-section-title",children:"版本信息"}),c.jsxs("div",{className:"overview-info-grid",children:[c.jsxs("div",{className:"overview-info-item",children:[c.jsx("span",{className:"overview-info-label",children:"应用版本"}),c.jsxs("span",{className:"overview-info-value",children:["v",t.version||"-"]})]}),c.jsxs("div",{className:"overview-info-item",children:[c.jsx("span",{className:"overview-info-label",children:"监听地址"}),c.jsxs("span",{className:"overview-info-value",children:[g.host,":",g.port]})]}),c.jsxs("div",{className:"overview-info-item",children:[c.jsx("span",{className:"overview-info-label",children:"语言"}),c.jsx("span",{className:"overview-info-value",children:g.language==="zh"?"中文":g.language==="en"?"English":"日本語"})]}),c.jsxs("div",{className:"overview-info-item",children:[c.jsx("span",{className:"overview-info-label",children:"ASR 模型"}),c.jsx("span",{className:"overview-info-value",children:g.transcription_provider==="siliconflow"?g.siliconflow_asr_model:g.fixed_model})]})]})]}),c.jsxs("div",{className:"overview-section",children:[c.jsx("h3",{className:"overview-section-title",children:"快速操作"}),c.jsxs("div",{className:"overview-actions",children:[c.jsx("button",{className:"tertiary-button",type:"button",onClick:()=>dt("environment"),children:"环境设置"}),c.jsx("button",{className:"tertiary-button",type:"button",onClick:()=>dt("logs"),children:"查看日志"}),c.jsx("button",{className:"tertiary-button",type:"button",onClick:()=>dt("model"),children:"模型配置"}),c.jsx("button",{className:"tertiary-button",type:"button",onClick:()=>dt("llm"),children:"LLM 设置"})]})]})]}),Ue==="general"&&c.jsxs("section",{className:"settings-category-section",children:[c.jsxs("header",{className:"settings-category-header",children:[c.jsx("h2",{children:"基础设置"}),c.jsx("p",{children:"服务监听地址和端口配置。"})]}),c.jsxs("div",{className:"settings-form-group",children:[c.jsxs("label",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"监听地址"}),c.jsx("input",{className:"settings-input-field",ref:yn("host"),value:g.host,onChange:I=>ht({...g,host:I.target.value})}),c.jsx("span",{className:"settings-input-caption",children:"服务绑定的 IP 地址,默认为 127.0.0.1"})]}),c.jsxs("label",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"监听端口"}),c.jsx("input",{className:"settings-input-field",type:"number",value:g.port,onChange:I=>ht({...g,port:parseInt(I.target.value)||3838})}),c.jsx("span",{className:"settings-input-caption",children:"服务端口号,默认 3838"})]})]})]}),Ue==="directories"&&c.jsxs("section",{className:"settings-category-section",children:[c.jsxs("header",{className:"settings-category-header",children:[c.jsx("h2",{children:"目录设置"}),c.jsx("p",{children:"数据存储和缓存目录配置。"})]}),c.jsxs("div",{className:"settings-form-group",children:[c.jsxs("label",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"数据目录"}),c.jsx("input",{className:"settings-input-field",value:String(g.data_dir),onChange:I=>ht({...g,data_dir:I.target.value})}),c.jsx("span",{className:"settings-input-caption",children:"存储视频摘要和元数据"})]}),c.jsxs("label",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"缓存目录"}),c.jsx("input",{className:"settings-input-field",value:String(g.cache_dir),onChange:I=>ht({...g,cache_dir:I.target.value})}),c.jsx("span",{className:"settings-input-caption",children:"临时缓存文件"})]}),c.jsxs("label",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"任务目录"}),c.jsx("input",{className:"settings-input-field",value:String(g.tasks_dir),onChange:I=>ht({...g,tasks_dir:I.target.value})}),c.jsx("span",{className:"settings-input-caption",children:"任务历史记录"})]}),c.jsxs("label",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"输出目录"}),c.jsx("input",{className:"settings-input-field",value:String(g.output_dir),onChange:I=>ht({...g,output_dir:I.target.value})}),c.jsx("span",{className:"settings-input-caption",children:"手动导出的 Markdown / Obsidian 笔记会写入这里。"})]})]})]}),Ue==="fileManagement"&&c.jsxs("section",{className:"settings-category-section",children:[c.jsxs("header",{className:"settings-category-header",children:[c.jsx("h2",{children:"文件管理"}),c.jsx("p",{children:"查看本地空间占用,并安全清理缓存和孤儿任务目录。"})]}),c.jsxs("div",{className:"settings-update-overview",children:[c.jsxs("div",{className:"settings-update-copy",children:[c.jsx("span",{className:"settings-story-kicker",children:"Storage"}),c.jsx("h3",{children:"当前本地占用"}),c.jsxs("p",{children:["已托管空间约 ",Ma((Fe==null?void 0:Fe.totals.managedBytes)||0),", 共 ",ko((Fe==null?void 0:Fe.totals.managedFiles)||0,"文件"),",",ko((Fe==null?void 0:Fe.totals.managedDirectories)||0,"目录"),"。"]})]}),c.jsxs("div",{className:"settings-update-badges",children:[c.jsx("span",{className:"helper-chip",children:jt?"扫描中...":"统计已就绪"}),c.jsx("span",{className:`helper-chip ${cr?"status-success":"status-pending"}`,children:cr?"可校验引用关系":"服务离线,禁用清理"}),c.jsxs("span",{className:"helper-chip",children:["可回收 ",Ma(Mi)]})]})]}),c.jsx("div",{className:"settings-storage-grid",children:((Fe==null?void 0:Fe.directories)||[]).map(I=>c.jsxs("article",{className:"settings-storage-card",children:[c.jsxs("div",{className:"settings-storage-card-head",children:[c.jsxs("div",{children:[c.jsx("span",{className:"settings-update-label",children:I.label}),c.jsx("strong",{children:Ma(I.sizeBytes)})]}),c.jsx("button",{className:"secondary-button",type:"button",onClick:()=>void $n(I.key),children:"打开目录"})]}),c.jsx("p",{className:"settings-storage-path",children:I.path}),c.jsxs("div",{className:"settings-storage-meta",children:[c.jsx("span",{children:I.exists?"目录存在":"目录不存在"}),c.jsx("span",{children:ko(I.fileCount,"文件")}),c.jsx("span",{children:ko(I.directoryCount,"子目录")})]})]},I.key))}),c.jsxs("div",{className:"settings-storage-detail-grid",children:[c.jsxs("article",{className:"settings-storage-panel",children:[c.jsx("span",{className:"settings-update-label",children:"缓存目录"}),c.jsx("strong",{children:Ma((vr==null?void 0:vr.sizeBytes)||0)}),c.jsx("p",{children:"当前仅把 `uploads` 和 `covers` 视为可安全回收的缓存内容,删除后必要资源会自动重新生成。"}),c.jsxs("div",{className:"settings-storage-meta",children:[c.jsx("span",{children:ko((Fe==null?void 0:Fe.cleanup.cacheCandidateCount)||0,"可清理项")}),c.jsxs("span",{children:["预计释放 ",Ma((Fe==null?void 0:Fe.cleanup.cacheCandidateBytes)||0)]})]})]}),c.jsxs("article",{className:"settings-storage-panel",children:[c.jsx("span",{className:"settings-update-label",children:"任务结果"}),c.jsx("strong",{children:Ma((Or==null?void 0:Or.sizeBytes)||0)}),c.jsx("p",{children:"仅识别目录名像任务 ID、但数据库中已不存在的孤儿任务目录,不会删除仍被引用的结果文件。"}),c.jsxs("div",{className:"settings-storage-meta",children:[c.jsx("span",{children:ko((Fe==null?void 0:Fe.cleanup.orphanTaskCount)||0,"孤儿目录")}),c.jsxs("span",{children:["预计释放 ",Ma((Fe==null?void 0:Fe.cleanup.orphanTaskBytes)||0)]})]})]}),c.jsxs("article",{className:"settings-storage-panel",children:[c.jsx("span",{className:"settings-update-label",children:"日志目录"}),c.jsx("strong",{children:Ma((nr==null?void 0:nr.sizeBytes)||0)}),c.jsx("p",{children:"日志仅展示体积和位置,首版不提供清空操作,避免误删排障信息。"})]}),c.jsxs("article",{className:"settings-storage-panel",children:[c.jsx("span",{className:"settings-update-label",children:"运行时目录"}),c.jsx("strong",{children:Ma((hl==null?void 0:hl.sizeBytes)||0)}),c.jsx("p",{children:"运行时目录只做统计,不参与清理,避免影响 Python、Torch 或 CUDA 运行环境。"})]})]}),c.jsxs("div",{className:"settings-update-next-step",children:[c.jsx("strong",{children:"清理说明"}),c.jsx("span",{children:cr?Un>0?`预计可安全清理 ${Un} 项内容,释放约 ${Ma(Mi)}。`:"当前没有发现可安全清理的缓存或孤儿任务目录。":"当前服务离线,无法确认哪些任务目录仍被数据库引用,因此已禁用一键清理。"})]}),c.jsxs("div",{className:"settings-update-actions",children:[c.jsx("button",{className:"primary-button",type:"button",disabled:jt||Rt,onClick:()=>void er(),children:jt?"扫描中...":"刷新统计"}),c.jsx("button",{className:"secondary-button danger-button",type:"button",disabled:!cr||Rt||jt,onClick:()=>void ol(),children:Rt?"清理中...":"一键清理孤儿项"}),c.jsx("button",{className:"secondary-button",type:"button",onClick:()=>void $n("data"),children:"打开数据目录"})]})]}),Ue==="model"&&c.jsxs("section",{className:"settings-category-section",children:[c.jsxs("header",{className:"settings-category-header",children:[c.jsx("h2",{children:"模型设置"}),c.jsx("p",{children:"配置转写方式、云端参数和本地模型策略。"})]}),c.jsxs("div",{className:"settings-form-group",children:[c.jsxs("label",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"转写方式"}),c.jsxs("select",{className:"settings-select-field",ref:yn("transcription_provider"),value:g.transcription_provider,onChange:I=>ht({...g,transcription_provider:I.target.value}),children:[c.jsx("option",{value:"siliconflow",children:"硅基流动 API"}),c.jsx("option",{value:"local",disabled:!An,children:"本地 ASR(需先安装)"})]}),c.jsx("span",{className:"settings-input-caption",children:"默认推荐云端模式。"})]}),cl?c.jsxs(c.Fragment,{children:[c.jsxs("label",{className:`settings-input-group settings-focus-target ${ft==="siliconflow_asr_base_url"?"is-highlighted":""}`,ref:yn("siliconflow_asr_base_url"),children:[c.jsx("span",{className:"settings-input-label",children:"SiliconFlow Base URL"}),c.jsx("input",{className:"settings-input-field",value:g.siliconflow_asr_base_url,onChange:I=>ht({...g,siliconflow_asr_base_url:I.target.value}),placeholder:"https://api.siliconflow.cn/v1"}),c.jsx("span",{className:"settings-input-caption",children:"默认保持 `https://api.siliconflow.cn/v1` 即可。"})]}),c.jsxs("label",{className:`settings-input-group settings-focus-target ${ft==="siliconflow_asr_api_key"?"is-highlighted":""}`,ref:yn("siliconflow_asr_api_key"),children:[c.jsx("span",{className:"settings-input-label",children:"SiliconFlow API Key"}),c.jsx("input",{className:"settings-input-field",type:"password",value:g.siliconflow_asr_api_key,onChange:I=>ht({...g,siliconflow_asr_api_key:I.target.value}),placeholder:"sk-..."}),c.jsx(gU,{})]}),c.jsxs("label",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"ASR 模型"}),c.jsx("input",{className:"settings-input-field",value:g.siliconflow_asr_model,onChange:I=>ht({...g,siliconflow_asr_model:I.target.value}),placeholder:"TeleAI/TeleSpeechASR"}),c.jsx("span",{className:"settings-input-caption",children:"首批支持 `TeleAI/TeleSpeechASR`。"})]}),c.jsxs("div",{className:"settings-inline-actions",children:[c.jsx("button",{className:"secondary-button",type:"button",disabled:He,onClick:()=>void ss(),children:He?"测试中...":"测试 ASR 是否可用"}),c.jsx("span",{className:"settings-input-caption",children:"使用当前表单中的 SiliconFlow Base URL、API Key 和 ASR 模型名发起一次临时转写测试,不会保存设置。"})]})]}):c.jsxs(c.Fragment,{children:[c.jsxs("label",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"推理设备"}),c.jsxs("select",{className:"settings-select-field",value:_o(g.device_preference),onChange:I=>ht({...g,device_preference:I.target.value}),children:[c.jsx("option",{value:"auto",children:"自动选择"}),c.jsx("option",{value:"cuda",children:"GPU (CUDA)"}),c.jsx("option",{value:"cpu",children:"CPU"})]}),c.jsx("span",{className:"settings-input-caption",children:"选择推理设备,GPU 需要 CUDA 支持"})]}),c.jsxs("label",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"模型模式"}),c.jsxs("select",{className:"settings-select-field",value:g.model_mode,onChange:I=>ht({...g,model_mode:I.target.value}),children:[c.jsx("option",{value:"fixed",children:"固定模型"}),c.jsx("option",{value:"auto",children:"自动选择"})]}),c.jsx("span",{className:"settings-input-caption",children:"自动模式会根据设备选择最优模型"})]}),c.jsxs("label",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"固定模型"}),c.jsx("input",{className:"settings-input-field",value:g.fixed_model,onChange:I=>ht({...g,fixed_model:I.target.value}),placeholder:"tiny / base / small / medium / large-v3"}),c.jsx("span",{className:"settings-input-caption",children:"Whisper 模型名称,小模型速度快但精度低"})]})]})]})]}),Ue==="llm"&&c.jsxs("section",{className:"settings-category-section",children:[c.jsxs("header",{className:"settings-category-header",children:[c.jsx("h2",{children:"LLM 设置"}),c.jsx("p",{children:"分别管理主摘要 LLM 与知识库 LLM。"})]}),c.jsxs("div",{className:"settings-form-group",children:[c.jsxs("label",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"启用 LLM 摘要"}),c.jsxs("select",{className:"settings-select-field",ref:yn("llm_enabled"),value:g.llm_enabled?"true":"false",onChange:I=>ht({...g,llm_enabled:I.target.value==="true"}),children:[c.jsx("option",{value:"false",children:"关闭"}),c.jsx("option",{value:"true",children:"开启"})]}),c.jsx("span",{className:"settings-input-caption",children:"使用大语言模型生成更高质量的视频摘要"})]}),c.jsxs("label",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"自动生成思维导图"}),c.jsxs("select",{className:"settings-select-field",value:g.auto_generate_mindmap?"true":"false",onChange:I=>ht({...g,auto_generate_mindmap:I.target.value==="true"}),children:[c.jsx("option",{value:"false",children:"关闭"}),c.jsx("option",{value:"true",children:"开启"})]}),c.jsx("span",{className:"settings-input-caption",children:"任务摘要完成后,后台自动发起思维导图生成。关闭后仍可在详情页手动生成。"})]}),g.llm_enabled&&c.jsxs(c.Fragment,{children:[c.jsxs("label",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"LLM 提供商"}),c.jsxs("select",{className:"settings-select-field",value:g.llm_provider,onChange:I=>ht({...g,llm_provider:I.target.value}),children:[c.jsx("option",{value:"openai-compatible",children:"OpenAI Compatible"}),c.jsx("option",{value:"openai",children:"OpenAI"}),c.jsx("option",{value:"anthropic",children:"Anthropic"}),c.jsx("option",{value:"custom",children:"自定义"})]})]}),c.jsxs("label",{className:`settings-input-group settings-focus-target ${ft==="llm_base_url"?"is-highlighted":""}`,ref:yn("llm_base_url"),children:[c.jsx("span",{className:"settings-input-label",children:"API Base URL"}),c.jsx("input",{className:"settings-input-field",value:g.llm_base_url,onChange:I=>ht({...g,llm_base_url:I.target.value}),placeholder:"https://api.openai.com/v1"}),c.jsx("span",{className:"settings-input-caption",children:"主摘要 LLM API 的基础 URL 地址。"})]}),c.jsxs("label",{className:`settings-input-group settings-focus-target ${ft==="llm_api_key"?"is-highlighted":""}`,ref:yn("llm_api_key"),children:[c.jsx("span",{className:"settings-input-label",children:"API Key"}),c.jsx("input",{className:"settings-input-field",type:"password",value:g.llm_api_key,onChange:I=>ht({...g,llm_api_key:I.target.value}),placeholder:"sk-..."}),c.jsx("span",{className:"settings-input-caption",children:"LLM 服务的 API 密钥"})]}),c.jsxs("label",{className:`settings-input-group settings-focus-target ${ft==="llm_model"?"is-highlighted":""}`,ref:yn("llm_model"),children:[c.jsx("span",{className:"settings-input-label",children:"模型名称"}),c.jsx("input",{className:"settings-input-field",value:g.llm_model,onChange:I=>ht({...g,llm_model:I.target.value}),placeholder:"gpt-4o-mini / claude-3-haiku"}),c.jsx("span",{className:"settings-input-caption",children:"要使用的 LLM 模型名称"})]}),c.jsxs("div",{className:"settings-inline-actions",children:[c.jsx("button",{className:"secondary-button",type:"button",disabled:fn,onClick:()=>void Ba(),children:fn?"测试中...":"测试是否可用"}),c.jsx("span",{className:"settings-input-caption",children:"使用当前表单中的 Base URL、API Key 和模型名临时请求一次,并校验是否能返回合法 JSON,不会保存设置。"})]})]})]})]}),Ue==="knowledge"&&c.jsxs("section",{className:"settings-category-section",children:[c.jsxs("header",{className:"settings-category-header",children:[c.jsx("h2",{children:"知识库"}),c.jsx("p",{children:"知识库默认关闭,依赖按需安装到当前运行时,不进入默认安装包。"})]}),c.jsxs("div",{className:"settings-form-group",children:[c.jsxs("label",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"启用知识库"}),c.jsxs("select",{className:"settings-select-field",value:g.knowledge_enabled?"true":"false",onChange:I=>ht({...g,knowledge_enabled:I.target.value==="true"}),children:[c.jsx("option",{value:"false",children:"关闭"}),c.jsx("option",{value:"true",children:"开启"})]}),c.jsx("span",{className:"settings-input-caption",children:"关闭时不会自动构建索引;标签管理仍可使用。"})]}),c.jsxs("div",{className:`settings-inline-alert ${gr?"success":"warning"} settings-focus-target ${ft==="knowledge_dependencies"?"is-highlighted":""}`,ref:yn("knowledge_dependencies_alert"),children:[c.jsx("strong",{children:gr?"知识库依赖已就绪":"知识库依赖未安装"}),c.jsx("span",{children:gr?`chromadb${w!=null&&w.chromadbVersion?` ${w.chromadbVersion}`:""} 与 sentence-transformers${w!=null&&w.sentenceTransformersVersion?` ${w.sentenceTransformersVersion}`:""} 已在当前运行时可用。`:`默认安装包不包含知识库重依赖。将使用 ${qn} 源依次尝试安装 ${Cn.join("、")||"chromadb 与 sentence-transformers"}。`})]}),c.jsxs("div",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"知识库运行时依赖"}),c.jsxs("div",{className:`settings-actions settings-focus-target ${ft==="knowledge_dependencies"?"is-highlighted":""}`,ref:yn("knowledge_dependencies"),children:[c.jsx("button",{className:"secondary-button",type:"button",disabled:Ge,onClick:()=>void ei(),children:Ge?"安装中...":gr?"重新安装知识库依赖":"安装知识库依赖"}),c.jsx("button",{className:"ghost-button",type:"button",disabled:We,onClick:()=>void an(),children:We?"检查中...":"检查运行时"})]}),c.jsx("span",{className:"settings-input-caption",children:"依赖只安装到当前 runtime,不会写入默认安装包;更新应用时已安装的 runtime 会保留。"}),ye?c.jsx("textarea",{className:"textarea-field log-viewer",rows:8,readOnly:!0,value:ye}):null]}),c.jsxs("label",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"自动维护知识库索引"}),c.jsxs("select",{className:"settings-select-field",value:g.knowledge_index_auto_rebuild||"disabled",disabled:!g.knowledge_enabled,onChange:I=>ht({...g,knowledge_index_auto_rebuild:I.target.value}),children:[c.jsx("option",{value:"disabled",children:"关闭自动维护"}),c.jsx("option",{value:"on_task_completed",children:"视频生成结束后更新索引"})]}),c.jsx("span",{className:"settings-input-caption",children:"开启知识库并安装依赖后,才会在任务完成时自动刷新索引。"})]}),c.jsxs("div",{className:"settings-inline-alert info",children:[c.jsx("strong",{children:"知识库 LLM"}),c.jsx("span",{children:"自动打标和知识库问答可以跟随主 LLM,也可以使用独立配置;不再限制为本地地址。"})]}),c.jsxs("label",{className:`settings-input-group settings-focus-target ${ft==="knowledge_llm_mode"?"is-highlighted":""}`,ref:yn("knowledge_llm_mode"),children:[c.jsx("span",{className:"settings-input-label",children:"知识库 LLM 来源"}),c.jsxs("select",{className:"settings-select-field",value:g.knowledge_llm_mode||"same_as_main",disabled:!g.knowledge_enabled,onChange:I=>ht({...g,knowledge_llm_mode:I.target.value}),children:[c.jsx("option",{value:"same_as_main",children:"跟随主 LLM"}),c.jsx("option",{value:"custom",children:"使用独立配置"})]}),c.jsx("span",{className:"settings-input-caption",children:"“跟随主 LLM”会直接复用摘要 LLM 的 Base URL、API Key 与模型名。"})]}),Qa?c.jsxs(c.Fragment,{children:[c.jsxs("label",{className:`settings-input-group settings-focus-target ${ft==="knowledge_llm_enabled"?"is-highlighted":""}`,ref:yn("knowledge_llm_enabled"),children:[c.jsx("span",{className:"settings-input-label",children:"启用知识库 LLM"}),c.jsxs("select",{className:"settings-select-field",value:g.knowledge_llm_enabled?"true":"false",disabled:!g.knowledge_enabled,onChange:I=>ht({...g,knowledge_llm_enabled:I.target.value==="true"}),children:[c.jsx("option",{value:"false",children:"关闭"}),c.jsx("option",{value:"true",children:"开启"})]})]}),g.knowledge_llm_enabled?c.jsxs(c.Fragment,{children:[c.jsxs("label",{className:`settings-input-group settings-focus-target ${ft==="knowledge_llm_base_url"?"is-highlighted":""}`,ref:yn("knowledge_llm_base_url"),children:[c.jsx("span",{className:"settings-input-label",children:"知识库 API Base URL"}),c.jsx("input",{className:"settings-input-field",value:g.knowledge_llm_base_url,disabled:!g.knowledge_enabled,onChange:I=>ht({...g,knowledge_llm_base_url:I.target.value}),placeholder:"https://api.openai.com/v1"})]}),c.jsxs("label",{className:`settings-input-group settings-focus-target ${ft==="knowledge_llm_api_key"?"is-highlighted":""}`,ref:yn("knowledge_llm_api_key"),children:[c.jsx("span",{className:"settings-input-label",children:"知识库 API Key"}),c.jsx("input",{className:"settings-input-field",type:"password",value:g.knowledge_llm_api_key,disabled:!g.knowledge_enabled,onChange:I=>ht({...g,knowledge_llm_api_key:I.target.value}),placeholder:"sk-..."})]}),c.jsxs("label",{className:`settings-input-group settings-focus-target ${ft==="knowledge_llm_model"?"is-highlighted":""}`,ref:yn("knowledge_llm_model"),children:[c.jsx("span",{className:"settings-input-label",children:"知识库模型名称"}),c.jsx("input",{className:"settings-input-field",value:g.knowledge_llm_model,disabled:!g.knowledge_enabled,onChange:I=>ht({...g,knowledge_llm_model:I.target.value}),placeholder:"gpt-4o-mini / qwen-plus"})]}),c.jsxs("div",{className:"settings-inline-actions",children:[c.jsx("button",{className:"secondary-button",type:"button",disabled:fn||!g.knowledge_enabled,onClick:()=>void Is(),children:fn?"测试中...":"测试知识库 LLM"}),c.jsx("span",{className:"settings-input-caption",children:"使用当前独立知识库配置发起一次临时测试,不会保存设置。"})]})]}):null]}):c.jsxs("div",{className:`settings-inline-alert ${pr?"success":"warning"}`,children:[c.jsx("strong",{children:pr?"知识库当前跟随主 LLM":"知识库当前跟随主 LLM,但主 LLM 还未补全"}),c.jsx("span",{children:pr?"自动打标和问答会直接复用主 LLM 配置。":"请先启用主 LLM,并补全 Base URL 与模型名,或切换为独立配置。"})]})]})]}),Ue==="summary"&&c.jsxs("section",{className:"settings-category-section",children:[c.jsxs("header",{className:"settings-category-header",children:[c.jsx("h2",{children:"摘要参数"}),c.jsx("p",{children:"摘要生成算法参数配置。"})]}),c.jsxs("div",{className:"settings-form-group",children:[c.jsxs("label",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"摘要模式"}),c.jsxs("select",{className:"settings-select-field",value:g.summary_mode,onChange:I=>ht({...g,summary_mode:I.target.value}),children:[c.jsx("option",{value:"llm",children:"LLM 智能摘要"}),c.jsx("option",{value:"extract",children:"抽取式摘要"})]})]}),c.jsxs("label",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"语言"}),c.jsxs("select",{className:"settings-select-field",value:g.language,onChange:I=>ht({...g,language:I.target.value}),children:[c.jsx("option",{value:"zh",children:"中文"}),c.jsx("option",{value:"en",children:"English"}),c.jsx("option",{value:"ja",children:"日本語"})]})]}),c.jsxs("label",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"分块目标字符数"}),c.jsx("input",{className:"settings-input-field",type:"number",min:1,value:g.summary_chunk_target_chars,onChange:I=>ht({...g,summary_chunk_target_chars:No(I.target.value,2200)})}),c.jsx("span",{className:"settings-input-caption",children:"LLM 处理时分块的目标字符数"})]}),c.jsxs("label",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"分块重叠段数"}),c.jsx("input",{className:"settings-input-field",type:"number",min:1,value:g.summary_chunk_overlap_segments,onChange:I=>ht({...g,summary_chunk_overlap_segments:No(I.target.value,2)})}),c.jsx("span",{className:"settings-input-caption",children:"分块之间的重叠段数,保证连续性"})]}),c.jsxs("label",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"重试次数"}),c.jsx("input",{className:"settings-input-field",type:"number",min:1,value:g.summary_chunk_retry_count,onChange:I=>ht({...g,summary_chunk_retry_count:No(I.target.value,2)})}),c.jsx("span",{className:"settings-input-caption",children:"API 调用失败时的重试次数"})]})]})]}),Ue==="performance"&&c.jsxs("section",{className:"settings-category-section",children:[c.jsxs("header",{className:"settings-category-header",children:[c.jsx("h2",{children:"性能调优"}),c.jsx("p",{children:"控制任务级并发与单任务内部分块并发,减少本地资源争抢和云端限流压力。"})]}),c.jsxs("div",{className:"settings-form-group",children:[c.jsxs("label",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"任务并发数"}),c.jsx("input",{className:"settings-input-field",type:"number",min:1,value:g.task_concurrency,onChange:I=>ht({...g,task_concurrency:No(I.target.value,Cr)})}),c.jsx("span",{className:"settings-input-caption",children:"影响下载、转写、摘要的整体链路吞吐;云 API 可能存在并发限流,建议按当前环境推荐值设置。"})]}),c.jsxs("label",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"导图并发数"}),c.jsx("input",{className:"settings-input-field",type:"number",min:1,value:g.mindmap_concurrency,onChange:I=>ht({...g,mindmap_concurrency:No(I.target.value,1)})}),c.jsx("span",{className:"settings-input-caption",children:"影响摘要完成后的导图生成吞吐,不会占用摘要任务的并发槽位;建议保持 1。"})]}),c.jsxs("label",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"摘要分块并发数"}),c.jsx("input",{className:"settings-input-field",type:"number",min:1,value:g.summary_chunk_concurrency,onChange:I=>ht({...g,summary_chunk_concurrency:No(I.target.value,2)})}),c.jsx("span",{className:"settings-input-caption",children:"仅控制单个摘要任务内部同时请求的分块数量,不等同于任务并发数。"})]})]}),c.jsxs("div",{className:"settings-form-group",children:[c.jsxs("div",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"当前建议"}),c.jsx("span",{className:"settings-input-caption",children:dl})]}),c.jsxs("div",{className:"settings-input-group settings-performance-tasklist-entry",children:[c.jsx("span",{className:"settings-input-label",children:"当前任务队列"}),c.jsxs("div",{className:"settings-inline-actions",children:[c.jsx("button",{className:"secondary-button",type:"button",onClick:()=>kt(!0),children:"查看 tasklist"}),c.jsx("span",{className:"settings-input-caption",children:"使用悬浮窗快速查看最近任务,避免占用主要设置区域。"})]})]})]})]}),Ue==="advanced"&&c.jsxs("section",{className:"settings-category-section",children:[c.jsxs("header",{className:"settings-category-header",children:[c.jsx("h2",{children:"高级设置"}),c.jsx("p",{children:"CUDA 变体和运行时配置。"})]}),c.jsxs("div",{className:"settings-form-group",children:[c.jsxs("label",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"CUDA 变体"}),c.jsxs("select",{className:"settings-select-field",value:g.cuda_variant,onChange:I=>ht({...g,cuda_variant:I.target.value}),children:[c.jsx("option",{value:"cu128",children:"CUDA 12.8"}),c.jsx("option",{value:"cu126",children:"CUDA 12.6"}),c.jsx("option",{value:"cu124",children:"CUDA 12.4"})]}),c.jsx("span",{className:"settings-input-caption",children:"PyTorch CUDA 版本"})]}),c.jsxs("label",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"运行时通道"}),c.jsxs("select",{className:"settings-select-field",value:g.runtime_channel,onChange:I=>ht({...g,runtime_channel:I.target.value}),children:[c.jsx("option",{value:"base",children:"基础版"}),c.jsx("option",{value:"gpu-cu128",children:"GPU CUDA12.8"}),c.jsx("option",{value:"gpu-cu126",children:"GPU CUDA12.6"}),c.jsx("option",{value:"gpu-cu124",children:"GPU CUDA12.4"})]})]}),c.jsxs("label",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"保留临时音频"}),c.jsxs("select",{className:"settings-select-field",value:g.preserve_temp_audio?"true":"false",onChange:I=>ht({...g,preserve_temp_audio:I.target.value==="true"}),children:[c.jsx("option",{value:"false",children:"不保留"}),c.jsx("option",{value:"true",children:"保留"})]})]}),c.jsxs("label",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"启用缓存"}),c.jsxs("select",{className:"settings-select-field",value:g.enable_cache?"true":"false",onChange:I=>ht({...g,enable_cache:I.target.value==="true"}),children:[c.jsx("option",{value:"true",children:"开启"}),c.jsx("option",{value:"false",children:"关闭"})]})]})]})]}),Ue==="environment"&&c.jsxs("section",{className:"settings-category-section",children:[c.jsxs("header",{className:"settings-category-header",children:[c.jsx("h2",{children:"运行环境"}),c.jsx("p",{children:"环境检测信息、CUDA 配置和本地 ASR 安装。"})]}),c.jsxs("div",{className:"env-summary-grid settings-env-grid",children:[c.jsxs("div",{className:"metric-card",children:[c.jsx("span",{className:"metric-label",children:"推荐设备"}),c.jsx("strong",{className:"metric-value",children:(w==null?void 0:w.recommendedDevice)||"-"})]}),c.jsxs("div",{className:"metric-card",children:[c.jsx("span",{className:"metric-label",children:"请求设备"}),c.jsx("strong",{className:"metric-value",children:K0(g.device_preference)})]}),c.jsxs("div",{className:"metric-card",children:[c.jsx("span",{className:"metric-label",children:"生效设备"}),c.jsx("strong",{className:`metric-value ${_o(g.whisper_device)==="cuda"?"text-success":""}`,children:K0(g.whisper_device)})]}),c.jsxs("div",{className:"metric-card",children:[c.jsx("span",{className:"metric-label",children:"推荐模型"}),c.jsx("strong",{className:"metric-value",children:(w==null?void 0:w.recommendedModel)||"-"})]}),c.jsxs("div",{className:"metric-card",children:[c.jsx("span",{className:"metric-label",children:"GPU 状态"}),c.jsx("strong",{className:`metric-value ${w!=null&&w.cudaAvailable?"text-success":""}`,children:w!=null&&w.cudaAvailable?"已启用":"未启用"})]}),c.jsxs("div",{className:"metric-card",children:[c.jsx("span",{className:"metric-label",children:"GPU 名称"}),c.jsx("strong",{className:"metric-value",children:(w==null?void 0:w.gpuName)||"未检测到"})]}),c.jsxs("div",{className:"metric-card",children:[c.jsx("span",{className:"metric-label",children:"Torch"}),c.jsx("strong",{className:`metric-value ${w!=null&&w.torchInstalled?"text-success":""}`,children:w!=null&&w.torchInstalled?(w==null?void 0:w.torchVersion)||"已安装":"未安装"})]}),c.jsxs("div",{className:"metric-card",children:[c.jsx("span",{className:"metric-label",children:"Python"}),c.jsx("strong",{className:"metric-value",children:(w==null?void 0:w.pythonVersion)||"-"})]})]}),c.jsxs("div",{className:"settings-cuda-section",children:[c.jsx("h3",{className:"settings-cuda-title",children:"CUDA 目标版本"}),c.jsxs("div",{className:"cuda-insight-grid",children:[c.jsxs("div",{className:"setting-row",children:[c.jsx("span",{className:"setting-label",children:"目标运行时"}),c.jsx("span",{className:"setting-value",children:Nr})]}),c.jsxs("div",{className:"setting-row",children:[c.jsx("span",{className:"setting-label",children:"当前运行时"}),c.jsx("span",{className:"setting-value",children:(w==null?void 0:w.runtimeChannel)||g.runtime_channel||"base"})]}),c.jsxs("div",{className:"setting-row",children:[c.jsx("span",{className:"setting-label",children:"运行时状态"}),c.jsx("span",{className:"setting-value",children:(w==null?void 0:w.runtimeReady)===!1?"未就绪":"已就绪"})]})]}),c.jsxs("div",{className:"settings-actions cuda-button-row",children:[c.jsxs("label",{className:"input-row cuda-picker",children:[c.jsx("span",{className:"input-label",children:"CUDA 目标版本"}),c.jsxs("select",{className:"select-field cuda-select-field",value:g.cuda_variant,disabled:P,onChange:I=>ht({...g,cuda_variant:I.target.value}),children:[c.jsx("option",{value:"cu128",children:"CUDA 12.8"}),c.jsx("option",{value:"cu126",children:"CUDA 12.6"}),c.jsx("option",{value:"cu124",children:"CUDA 12.4"})]})]}),c.jsx("button",{className:"secondary-button",type:"button",disabled:P,onClick:async()=>{try{O("正在重新检测环境...");const I=await Ke.getEnvironment({runtimeChannel:g.runtime_channel,refresh:!0});k(I),O("环境检测完成"),r()}catch(I){O(I instanceof Error?I.message:"环境检测失败")}},children:"重新检测"}),c.jsx("button",{className:"primary-button",type:"button",disabled:P,onClick:async()=>{try{K(!0),Q(Date.now()),le(8),Y("准备 GPU 运行时目录"),O("CUDA 安装已开始,正在准备运行时..."),V(""),ne(`将为 ${Nr} 安装 PyTorch CUDA 依赖,并把运行时切换到该通道。`);const I=await Ke.installCuda({cuda_variant:g.cuda_variant}),me=I.runtimeChannel||g.runtime_channel;K(!1),le(100),Y(I.restartRequired?"CUDA 安装完成,等待重启切换运行时":"CUDA 安装完成"),O(I.restartRequired?"CUDA 安装完成,请重启应用后切换到新的 GPU 运行时":"CUDA 安装命令已执行"),V(I.stdoutTail||""),ne(`安装目标:${I.cudaVariant||g.cuda_variant},运行时通道:${me}。`),x({...g,runtime_channel:me,cuda_variant:I.cudaVariant||g.cuda_variant}),N(!1),k(await Ke.getEnvironment({runtimeChannel:me,refresh:!0})),r()}catch(I){K(!1),Y("CUDA 安装失败"),le(me=>me>0?me:12),O(I instanceof Error?I.message:"CUDA 安装失败"),ne("安装依赖失败。请查看下方输出和服务日志。")}},children:P?"安装中...":"安装 CUDA 支持"})]})]}),c.jsxs("div",{className:"settings-cuda-section",children:[c.jsx("h3",{className:"settings-cuda-title",children:"运行时更新检查"}),c.jsxs("div",{className:"settings-runtime-toolbar",children:[c.jsxs("span",{className:`settings-inline-alert ${yr.length>0?"warning":"success"}`,children:[c.jsx("strong",{children:yr.length>0?"有运行时需要同步":"运行时基础版本一致"}),c.jsx("span",{children:yr.length>0?`${yr.map(I=>I.runtimeChannel).join("、")} 需要同步基础文件;同步会保留 CUDA / ASR / 知识库扩展包。`:`当前基础版本 ${($e==null?void 0:$e.baseAppVersion)||"-"},每 30 分钟自动检查一次。`})]}),c.jsx("button",{className:"secondary-button",type:"button",disabled:We,onClick:()=>void an(),children:We?"检查中...":"检查所有 runtime"}),c.jsx("button",{className:"primary-button compact",type:"button",disabled:ke||We||yr.length===0,onClick:()=>void un(),children:ke?"同步中...":"同步需要更新的 runtime"})]}),c.jsx("div",{className:"runtime-channel-list",role:"list",children:(($e==null?void 0:$e.channels)||[]).map(I=>c.jsxs("div",{className:"runtime-channel-row",role:"listitem",children:[c.jsxs("div",{children:[c.jsx("strong",{children:I.runtimeChannel}),c.jsx("span",{children:I.ready?"已就绪":I.exists?"缺少 Python":"未创建"})]}),c.jsxs("div",{children:[c.jsx("span",{children:I.appVersion||"-"}),c.jsx("span",{children:I.needsUpdate?"需同步":I.exists?"最新":"按需创建"})]})]},I.runtimeChannel))}),c.jsxs("span",{className:"settings-input-caption",children:["已启用国内镜像回退:",qn,"。安装失败时会自动从官方源切换到国内镜像继续尝试。"]})]}),c.jsx("div",{className:"settings-form-group",children:c.jsxs("div",{className:"settings-input-group",children:[c.jsx("span",{className:"settings-input-label",children:"本地 ASR 运行时"}),c.jsx("div",{className:`settings-actions settings-focus-target ${ft==="local_asr_runtime"?"is-highlighted":""}`,ref:yn("local_asr_runtime"),children:c.jsx("button",{className:"secondary-button",type:"button",disabled:ce,onClick:()=>void ls(),children:ce?"安装中...":An?"重新安装本地 ASR":"安装本地 ASR"})}),c.jsx("span",{className:"settings-input-caption",children:An?`当前已安装${w!=null&&w.localAsrVersion?`(${w.localAsrVersion})`:""},安装后会自动切换到本地模式。`:"正式安装包默认不包含本地 ASR;安装到当前运行时后会自动切换到本地模式。"}),W?c.jsx("textarea",{className:"textarea-field log-viewer",rows:8,readOnly:!0,value:W}):null]})}),P||X>0||T?c.jsxs("div",{className:"cuda-progress-card",children:[c.jsxs("div",{className:"cuda-progress-header",children:[c.jsxs("div",{className:"cuda-progress-copy",children:[c.jsx("strong",{children:va}),c.jsxs("span",{children:[os,ml?` · ${ml}`:""]})]}),c.jsxs("span",{className:"cuda-progress-percent",children:[Hr,"%"]})]}),c.jsx("div",{className:"progress-bar-simple cuda-progress-bar",children:c.jsx("div",{className:`progress-fill-simple ${jn?"error":X>=100?"success":""}`,style:{width:`${Math.min(X,100)}%`}})}),c.jsx("div",{className:"cuda-stepper",role:"list","aria-label":"CUDA 安装步骤",children:Oa.map((I,me)=>c.jsxs("div",{className:`cuda-step ${I.state}`,role:"listitem",children:[c.jsx("span",{className:"cuda-step-index",children:me+1}),c.jsx("span",{className:"cuda-step-label",children:I.label}),c.jsx("span",{className:"cuda-step-state",children:I.state==="done"?"已完成":I.state==="failed"?"失败":I.state==="active"?"进行中":"未开始"})]},I.label))}),c.jsx("p",{className:"cuda-helper-text",children:"安装通常需要几分钟。完成后点击“重新检测”确认 GPU 运行时是否已就绪。"}),ee?c.jsx("div",{className:`cuda-status-note ${jn?"is-error":""}`,children:ee}):null]}):null,Z?c.jsxs("label",{className:"input-row",children:[c.jsx("span",{className:"input-label",children:"CUDA 安装输出"}),c.jsx("textarea",{className:"textarea-field log-viewer",rows:12,readOnly:!0,value:Z})]}):null,w!=null&&w.runtimeError?c.jsxs("label",{className:"input-row",children:[c.jsx("span",{className:"input-label",children:"运行时错误详情"}),c.jsx("textarea",{className:"textarea-field log-viewer",rows:8,readOnly:!0,value:w.runtimeError})]}):null,T.includes("完成")||X>=100?c.jsxs("div",{className:"cuda-next-steps",children:[c.jsx("strong",{children:"下一步"}),c.jsx("span",{children:'1. 点击"重新检测"确认 GPU runtime 已就绪。'}),c.jsx("span",{children:'2. 确认"运行时通道"已切换到目标 GPU 通道。'}),c.jsx("span",{children:"3. 若提示需要重启,请重启应用后再开始转写任务。"})]}):null]}),Ue==="logs"&&c.jsxs("section",{className:"settings-category-section",children:[c.jsxs("header",{className:"settings-category-header",children:[c.jsx("h2",{children:"日志与控制"}),c.jsx("p",{children:"查看后端日志并控制服务。"})]}),c.jsxs("div",{className:"control-status-row",children:[c.jsx("span",{className:`helper-chip ${Yt?"status-success":"status-failed"}`,children:Yt?"服务在线":"服务离线"}),c.jsx("span",{className:`helper-chip ${mn?ur?"status-success":"status-running":"status-pending"}`,children:mn?ur?"内置后端运行中":"内置后端启动中":"内置后端未运行"}),(yl=t.backend)!=null&&yl.pid?c.jsxs("span",{className:"helper-chip",children:["PID ",t.backend.pid]}):null]}),c.jsxs("div",{className:"setting-list",children:[c.jsxs("div",{className:"setting-row",children:[c.jsx("span",{className:"setting-label",children:"服务名"}),c.jsx("span",{className:"setting-value",children:((Se=(G=e.systemInfo)==null?void 0:G.application)==null?void 0:Se.name)||"-"})]}),c.jsxs("div",{className:"setting-row",children:[c.jsx("span",{className:"setting-label",children:"版本"}),c.jsx("span",{className:"setting-value",children:((Be=(ve=e.systemInfo)==null?void 0:ve.application)==null?void 0:Be.version)||"-"})]}),c.jsxs("div",{className:"setting-row",children:[c.jsx("span",{className:"setting-label",children:"日志文件"}),c.jsx("span",{className:"setting-value",children:Rn})]})]}),c.jsxs("div",{className:"desktop-actions",children:[c.jsx("button",{className:"secondary-button",type:"button",onClick:()=>void Jn(),children:"刷新日志"}),c.jsx("button",{className:mn?"secondary-button danger-button":"primary-button",type:"button",onClick:async()=>{var I,me;mn?(await((I=window.desktop)==null?void 0:I.backend.stop()),Lt("内置后端已停止")):(await((me=window.desktop)==null?void 0:me.backend.start()),Lt("已请求启动内置后端")),r(),await Jn()},children:mn?"停止内置后端":"启动内置后端"}),c.jsx("button",{className:"secondary-button",type:"button",onClick:async()=>{var I;await((I=window.desktop)==null?void 0:I.shell.openPath(Rn))},children:"打开日志文件"}),c.jsx("button",{className:"secondary-button danger-button",type:"button",disabled:!Yt,onClick:async()=>{await Ke.shutdownService(),Lt("已向服务发送关闭请求"),r(),await Jn()},children:"强制关闭服务"})]}),c.jsxs("label",{className:"input-row",children:[c.jsx("span",{className:"input-label",children:"最近日志"}),c.jsx("textarea",{className:"textarea-field log-viewer",rows:20,readOnly:!0,value:st})]})]}),Ue==="updates"&&c.jsxs("section",{className:"settings-category-section",children:[c.jsxs("header",{className:"settings-category-header",children:[c.jsx("h2",{children:"桌面应用更新"}),c.jsx("p",{children:d?"检查新版本并管理安装。":"查看最新版本信息与更新日志。"})]}),c.jsxs("div",{className:"settings-update-module",children:[c.jsxs("div",{className:"settings-update-overview",children:[c.jsxs("div",{className:"settings-update-copy",children:[c.jsx("span",{className:"settings-story-kicker",children:"Update"}),c.jsx("h3",{children:d?"手动检查桌面端更新":"手动检查最新版本"}),c.jsx("p",{children:La})]}),c.jsxs("div",{className:"settings-update-badges",children:[c.jsxs("span",{className:"helper-chip",children:["当前版本 v",Da]}),c.jsxs("span",{className:`helper-chip status-${Ja}`,children:["状态:",Wa]}),s.version?c.jsxs("span",{className:"helper-chip",children:["最新版本 v",s.version]}):null,s.releaseDate?c.jsxs("span",{className:"helper-chip",children:["发布时间 ",pN(s.releaseDate)]}):null]})]}),c.jsxs("div",{className:"settings-update-grid",children:[c.jsxs("div",{className:"settings-update-panel",children:[c.jsx("span",{className:"settings-update-label",children:"当前安装版本"}),c.jsxs("strong",{children:["v",Da]}),c.jsx("p",{children:d?"检查、下载和安装更新。":"当前环境仅支持检查最新版本。"})]}),c.jsxs("div",{className:`settings-update-panel ${s.status==="available"||s.status==="downloaded"?"is-highlight":""}`,children:[c.jsx("span",{className:"settings-update-label",children:"检查结果"}),c.jsx("strong",{children:ul?"当前环境不可更新":s.status==="available"||s.status==="downloaded"?`发现 v${s.version||"-"}`:s.status==="not-available"?"已是最新版本":s.status==="error"?"检查失败":s.status==="checking"?"正在检查":s.status==="downloading"?`下载中 ${Math.round(s.downloadProgress)}%`:s.status==="installing"?"正在安装":"等待检查"}),c.jsx("p",{children:!d&&s.status==="available"?`已检测到 v${s.version||"-"},请使用桌面安装包完成更新。`:!d&&s.status==="not-available"?"当前环境可查看最新版本信息,但不支持自动下载或安装。":s.status==="available"||s.status==="downloaded"?`当前 v${Da},最新 v${s.version||"-"}`:s.status==="error"?s.errorMessage||"更新检查失败,请重试。":La})]})]}),c.jsxs("div",{className:"settings-update-actions",children:[c.jsx("button",{className:"primary-button",type:"button",disabled:!o||jr,onClick:async()=>{try{if(!o)return;if(d&&s.status==="available"){await m();return}if(d&&s.status==="downloaded"){await y();return}await f()}catch{}},children:o?d?s.status==="checking"?"检查中...":s.status==="downloading"?`下载中... ${Math.round(s.downloadProgress)}%`:s.status==="installing"?"安装中...":s.status==="available"?"下载并重启安装":s.status==="downloaded"?"立即重启安装":s.status==="error"?"重试检查":"检查更新":s.status==="checking"?"检查中...":"检查更新":"当前环境无法检查更新"}),c.jsx("button",{className:"secondary-button",type:"button",disabled:!o,onClick:p,children:"查看更新详情"})]}),s.status==="available"||s.status==="downloaded"?c.jsxs("div",{className:"settings-update-next-step",children:[c.jsx("strong",{children:"下一步"}),c.jsx("span",{children:d?s.status==="available"?"已检测到新版本,继续后会下载更新并自动重启安装。":"更新已下载完成,可以立即重启应用完成安装。":"当前环境仅支持查看最新版本信息,请前往桌面安装包完成更新。"})]}):null]})]})]})}),Ln?c.jsx("div",{className:"settings-tasklist-float",role:"dialog","aria-modal":"false","aria-label":"最近任务列表",onClick:()=>kt(!1),children:c.jsxs("div",{className:"settings-tasklist-panel",onClick:I=>I.stopPropagation(),children:[c.jsxs("div",{className:"settings-tasklist-header",children:[c.jsxs("div",{className:"settings-tasklist-copy",children:[c.jsx("span",{className:"settings-nav-brand-kicker",children:"Tasklist"}),c.jsx("strong",{children:"最近任务队列"}),c.jsxs("span",{children:["聚焦最近 ",L3," 条任务,方便确认 `queued` 与 `running` 的分布。"]})]}),c.jsxs("div",{className:"settings-tasklist-actions",children:[c.jsx("button",{className:"secondary-button",type:"button",disabled:hn,onClick:()=>void tr(),children:hn?"刷新中...":"刷新"}),c.jsx("button",{className:"secondary-button",type:"button",onClick:()=>kt(!1),children:"关闭"})]})]}),c.jsxs("div",{className:"settings-tasklist-summary",children:[c.jsxs("span",{className:"helper-chip",children:["最近 ",Bt.length," 条"]}),c.jsxs("span",{className:`helper-chip ${fl?"status-running":"status-pending"}`,children:["运行中 ",fl]}),c.jsxs("span",{className:`helper-chip ${ya?"status-pending":"status-success"}`,children:["排队中 ",ya]})]}),Wn?c.jsx("div",{className:"detail-error-banner",role:"status",children:Wn}):null,c.jsxs("div",{className:"settings-tasklist-body",children:[hn&&!Bt.length?c.jsx("div",{className:"empty-placeholder",children:"正在同步最近任务..."}):null,!hn&&!Bt.length&&!Wn?c.jsx("div",{className:"empty-placeholder",children:"当前还没有任务记录。"}):null,Bt.map(I=>c.jsxs("article",{className:"settings-tasklist-item",children:[c.jsxs("div",{className:"settings-tasklist-item-top",children:[c.jsxs("div",{className:"settings-tasklist-item-meta",children:[c.jsx("span",{className:`task-status ${Gl(I.status)}`,children:Pa(I.status)}),I.page_number===0?c.jsx("span",{className:"helper-chip",children:I.page_title||"全集总结"}):I.page_number?c.jsxs("span",{className:"helper-chip",children:["P",I.page_number]}):null,c.jsx("span",{className:"helper-chip",children:I.input_type})]}),c.jsx("span",{className:"task-history-id",children:I.task_id.slice(0,8)})]}),c.jsx("strong",{children:I.title||"未命名任务"}),c.jsxs("div",{className:"settings-tasklist-item-subline",children:[c.jsx("span",{children:hi(I.created_at)}),I.task_duration_seconds!=null?c.jsxs("span",{children:["耗时 ",Math.max(0,Math.round(I.task_duration_seconds))," 秒"]}):null]})]},I.task_id))]})]})}):null]})}function vU(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const n=document.implementation.createHTMLDocument(),r=n.createElement("base"),i=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(i),t&&(r.href=t),i.href=e,i.href}const xU=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function Zl(e){const t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}let jo=null;function kw(e={}){return jo||(e.includeStyleProperties?(jo=e.includeStyleProperties,jo):(jo=Zl(window.getComputedStyle(document.documentElement)),jo))}function tf(e,t){const r=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return r?parseFloat(r.replace("px","")):0}function bU(e){const t=tf(e,"border-left-width"),n=tf(e,"border-right-width");return e.clientWidth+t+n}function wU(e){const t=tf(e,"border-top-width"),n=tf(e,"border-bottom-width");return e.clientHeight+t+n}function Nw(e,t={}){const n=t.width||bU(e),r=t.height||wU(e);return{width:n,height:r}}function SU(){let e,t;try{t=process}catch{}const n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const sa=16384;function kU(e){(e.width>sa||e.height>sa)&&(e.width>sa&&e.height>sa?e.width>e.height?(e.height*=sa/e.width,e.width=sa):(e.width*=sa/e.height,e.height=sa):e.width>sa?(e.height*=sa/e.width,e.width=sa):(e.width*=sa/e.height,e.height=sa))}function NU(e,t={}){return e.toBlob?new Promise(n=>{e.toBlob(n,t.type?t.type:"image/png",t.quality?t.quality:1)}):new Promise(n=>{const r=window.atob(e.toDataURL(t.type?t.type:void 0,t.quality?t.quality:void 0).split(",")[1]),i=r.length,s=new Uint8Array(i);for(let o=0;o<i;o+=1)s[o]=r.charCodeAt(o);n(new Blob([s],{type:t.type?t.type:"image/png"}))})}function nf(e){return new Promise((t,n)=>{const r=new Image;r.onload=()=>{r.decode().then(()=>{requestAnimationFrame(()=>t(r))})},r.onerror=n,r.crossOrigin="anonymous",r.decoding="async",r.src=e})}async function jU(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function CU(e,t,n){const r="http://www.w3.org/2000/svg",i=document.createElementNS(r,"svg"),s=document.createElementNS(r,"foreignObject");return i.setAttribute("width",`${t}`),i.setAttribute("height",`${n}`),i.setAttribute("viewBox",`0 0 ${t} ${n}`),s.setAttribute("width","100%"),s.setAttribute("height","100%"),s.setAttribute("x","0"),s.setAttribute("y","0"),s.setAttribute("externalResourcesRequired","true"),i.appendChild(s),s.appendChild(e),jU(i)}const Xr=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||Xr(n,t)};function EU(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function MU(e,t){return kw(t).map(n=>{const r=e.getPropertyValue(n),i=e.getPropertyPriority(n);return`${n}: ${r}${i?" !important":""};`}).join(" ")}function _U(e,t,n,r){const i=`.${e}:${t}`,s=n.cssText?EU(n):MU(n,r);return document.createTextNode(`${i}{${s}}`)}function R3(e,t,n,r){const i=window.getComputedStyle(e,n),s=i.getPropertyValue("content");if(s===""||s==="none")return;const o=xU();try{t.className=`${t.className} ${o}`}catch{return}const d=document.createElement("style");d.appendChild(_U(o,n,i,r)),t.appendChild(d)}function AU(e,t,n){R3(e,t,":before",n),R3(e,t,":after",n)}const B3="application/font-woff",O3="image/jpeg",TU={woff:B3,woff2:B3,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:O3,jpeg:O3,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function zU(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function Xg(e){const t=zU(e).toLowerCase();return TU[t]||""}function DU(e){return e.split(/,/)[1]}function Rp(e){return e.search(/^(data:)/)!==-1}function LU(e,t){return`data:${t};base64,${e}`}async function jw(e,t,n){const r=await fetch(e,t);if(r.status===404)throw new Error(`Resource "${r.url}" not found`);const i=await r.blob();return new Promise((s,o)=>{const d=new FileReader;d.onerror=o,d.onloadend=()=>{try{s(n({res:r,result:d.result}))}catch(f){o(f)}},d.readAsDataURL(i)})}const q1={};function RU(e,t,n){let r=e.replace(/\?.*/,"");return n&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),t?`[${t}]${r}`:r}async function Kg(e,t,n){const r=RU(e,t,n.includeQueryParams);if(q1[r]!=null)return q1[r];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let i;try{const s=await jw(e,n.fetchRequestInit,({res:o,result:d})=>(t||(t=o.headers.get("Content-Type")||""),DU(d)));i=LU(s,t)}catch(s){i=n.imagePlaceholder||"";let o=`Failed to fetch resource: ${e}`;s&&(o=typeof s=="string"?s:s.message),o&&console.warn(o)}return q1[r]=i,i}async function BU(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):nf(t)}async function OU(e,t){if(e.currentSrc){const s=document.createElement("canvas"),o=s.getContext("2d");s.width=e.clientWidth,s.height=e.clientHeight,o==null||o.drawImage(e,0,0,s.width,s.height);const d=s.toDataURL();return nf(d)}const n=e.poster,r=Xg(n),i=await Kg(n,r,t);return nf(i)}async function $U(e,t){var n;try{if(!((n=e==null?void 0:e.contentDocument)===null||n===void 0)&&n.body)return await $f(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function HU(e,t){return Xr(e,HTMLCanvasElement)?BU(e):Xr(e,HTMLVideoElement)?OU(e,t):Xr(e,HTMLIFrameElement)?$U(e,t):e.cloneNode(Cw(e))}const qU=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Cw=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function UU(e,t,n){var r,i;if(Cw(t))return t;let s=[];return qU(e)&&e.assignedNodes?s=Zl(e.assignedNodes()):Xr(e,HTMLIFrameElement)&&(!((r=e.contentDocument)===null||r===void 0)&&r.body)?s=Zl(e.contentDocument.body.childNodes):s=Zl(((i=e.shadowRoot)!==null&&i!==void 0?i:e).childNodes),s.length===0||Xr(e,HTMLVideoElement)||await s.reduce((o,d)=>o.then(()=>$f(d,n)).then(f=>{f&&t.appendChild(f)}),Promise.resolve()),t}function IU(e,t,n){const r=t.style;if(!r)return;const i=window.getComputedStyle(e);i.cssText?(r.cssText=i.cssText,r.transformOrigin=i.transformOrigin):kw(n).forEach(s=>{let o=i.getPropertyValue(s);s==="font-size"&&o.endsWith("px")&&(o=`${Math.floor(parseFloat(o.substring(0,o.length-2)))-.1}px`),Xr(e,HTMLIFrameElement)&&s==="display"&&o==="inline"&&(o="block"),s==="d"&&t.getAttribute("d")&&(o=`path(${t.getAttribute("d")})`),r.setProperty(s,o,i.getPropertyPriority(s))})}function PU(e,t){Xr(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),Xr(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function FU(e,t){if(Xr(e,HTMLSelectElement)){const r=Array.from(t.children).find(i=>e.value===i.getAttribute("value"));r&&r.setAttribute("selected","")}}function VU(e,t,n){return Xr(t,Element)&&(IU(e,t,n),AU(e,t,n),PU(e,t),FU(e,t)),t}async function GU(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(n.length===0)return e;const r={};for(let s=0;s<n.length;s++){const d=n[s].getAttribute("xlink:href");if(d){const f=e.querySelector(d),m=document.querySelector(d);!f&&m&&!r[d]&&(r[d]=await $f(m,t,!0))}}const i=Object.values(r);if(i.length){const s="http://www.w3.org/1999/xhtml",o=document.createElementNS(s,"svg");o.setAttribute("xmlns",s),o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.overflow="hidden",o.style.display="none";const d=document.createElementNS(s,"defs");o.appendChild(d);for(let f=0;f<i.length;f++)d.appendChild(i[f]);e.appendChild(o)}return e}async function $f(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(r=>HU(r,t)).then(r=>UU(e,r,t)).then(r=>VU(e,r,t)).then(r=>GU(r,t))}const Ew=/url\((['"]?)([^'"]+?)\1\)/g,YU=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,XU=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function KU(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function ZU(e){const t=[];return e.replace(Ew,(n,r,i)=>(t.push(i),n)),t.filter(n=>!Rp(n))}async function QU(e,t,n,r,i){try{const s=n?vU(t,n):t,o=Xg(t);let d;return i||(d=await Kg(s,o,r)),e.replace(KU(t),`$1${d}$3`)}catch{}return e}function WU(e,{preferredFontFormat:t}){return t?e.replace(XU,n=>{for(;;){const[r,,i]=YU.exec(n)||[];if(!i)return"";if(i===t)return`src: ${r};`}}):e}function Mw(e){return e.search(Ew)!==-1}async function _w(e,t,n){if(!Mw(e))return e;const r=WU(e,n);return ZU(r).reduce((s,o)=>s.then(d=>QU(d,o,t,n)),Promise.resolve(r))}async function Co(e,t,n){var r;const i=(r=t.style)===null||r===void 0?void 0:r.getPropertyValue(e);if(i){const s=await _w(i,null,n);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function JU(e,t){await Co("background",e,t)||await Co("background-image",e,t),await Co("mask",e,t)||await Co("-webkit-mask",e,t)||await Co("mask-image",e,t)||await Co("-webkit-mask-image",e,t)}async function eI(e,t){const n=Xr(e,HTMLImageElement);if(!(n&&!Rp(e.src))&&!(Xr(e,SVGImageElement)&&!Rp(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,i=await Kg(r,Xg(r),t);await new Promise((s,o)=>{e.onload=s,e.onerror=t.onImageErrorHandler?(...f)=>{try{s(t.onImageErrorHandler(...f))}catch(m){o(m)}}:o;const d=e;d.decode&&(d.decode=s),d.loading==="lazy"&&(d.loading="eager"),n?(e.srcset="",e.src=i):e.href.baseVal=i})}async function tI(e,t){const r=Zl(e.childNodes).map(i=>Aw(i,t));await Promise.all(r).then(()=>e)}async function Aw(e,t){Xr(e,Element)&&(await JU(e,t),await eI(e,t),await tI(e,t))}function nI(e,t){const{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);const r=t.style;return r!=null&&Object.keys(r).forEach(i=>{n[i]=r[i]}),e}const $3={};async function H3(e){let t=$3[e];if(t!=null)return t;const r=await(await fetch(e)).text();return t={url:e,cssText:r},$3[e]=t,t}async function q3(e,t){let n=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,s=(n.match(/url\([^)]+\)/g)||[]).map(async o=>{let d=o.replace(r,"$1");return d.startsWith("https://")||(d=new URL(d,e.url).href),jw(d,t.fetchRequestInit,({result:f})=>(n=n.replace(o,`url(${f})`),[o,f]))});return Promise.all(s).then(()=>n)}function U3(e){if(e==null)return[];const t=[],n=/(\/\*[\s\S]*?\*\/)/gi;let r=e.replace(n,"");const i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const f=i.exec(r);if(f===null)break;t.push(f[0])}r=r.replace(i,"");const s=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",d=new RegExp(o,"gi");for(;;){let f=s.exec(r);if(f===null){if(f=d.exec(r),f===null)break;s.lastIndex=d.lastIndex}else d.lastIndex=s.lastIndex;t.push(f[0])}return t}async function rI(e,t){const n=[],r=[];return e.forEach(i=>{if("cssRules"in i)try{Zl(i.cssRules||[]).forEach((s,o)=>{if(s.type===CSSRule.IMPORT_RULE){let d=o+1;const f=s.href,m=H3(f).then(y=>q3(y,t)).then(y=>U3(y).forEach(p=>{try{i.insertRule(p,p.startsWith("@import")?d+=1:i.cssRules.length)}catch(g){console.error("Error inserting rule from remote css",{rule:p,error:g})}})).catch(y=>{console.error("Error loading remote css",y.toString())});r.push(m)}})}catch(s){const o=e.find(d=>d.href==null)||document.styleSheets[0];i.href!=null&&r.push(H3(i.href).then(d=>q3(d,t)).then(d=>U3(d).forEach(f=>{o.insertRule(f,o.cssRules.length)})).catch(d=>{console.error("Error loading remote stylesheet",d)})),console.error("Error inlining remote css file",s)}}),Promise.all(r).then(()=>(e.forEach(i=>{if("cssRules"in i)try{Zl(i.cssRules||[]).forEach(s=>{n.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${i.href}`,s)}}),n))}function aI(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>Mw(t.style.getPropertyValue("src")))}async function iI(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=Zl(e.ownerDocument.styleSheets),r=await rI(n,t);return aI(r)}function Tw(e){return e.trim().replace(/["']/g,"")}function lI(e){const t=new Set;function n(r){(r.style.fontFamily||getComputedStyle(r).fontFamily).split(",").forEach(s=>{t.add(Tw(s))}),Array.from(r.children).forEach(s=>{s instanceof HTMLElement&&n(s)})}return n(e),t}async function sI(e,t){const n=await iI(e,t),r=lI(e);return(await Promise.all(n.filter(s=>r.has(Tw(s.style.fontFamily))).map(s=>{const o=s.parentStyleSheet?s.parentStyleSheet.href:null;return _w(s.cssText,o,t)}))).join(`
|
|
387
|
+
`)}async function oI(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await sI(e,t);if(n){const r=document.createElement("style"),i=document.createTextNode(n);r.appendChild(i),e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}}async function uI(e,t={}){const{width:n,height:r}=Nw(e,t),i=await $f(e,t,!0);return await oI(i,t),await Aw(i,t),nI(i,t),await CU(i,n,r)}async function cI(e,t={}){const{width:n,height:r}=Nw(e,t),i=await uI(e,t),s=await nf(i),o=document.createElement("canvas"),d=o.getContext("2d"),f=t.pixelRatio||SU(),m=t.canvasWidth||n,y=t.canvasHeight||r;return o.width=m*f,o.height=y*f,t.skipAutoScale||kU(o),o.style.width=`${m}`,o.style.height=`${y}`,t.backgroundColor&&(d.fillStyle=t.backgroundColor,d.fillRect(0,0,o.width,o.height)),d.drawImage(s,0,0,o.width,o.height),o}async function dI(e,t={}){const n=await cI(e,t);return await NU(n)}const zo=0;function Zg(e){return e.page_number??1}function Ql(e){return e.page_number===zo}function I3(e){return Ql(e)?e.page_title||"全集总结":e.page_number?`P${e.page_number}`:""}function fI(e){return e.some(t=>t.status==="running"||t.status==="queued")?"in_progress":e.some(t=>t.status==="completed")?"completed":e.some(t=>t.status==="failed"||t.status==="cancelled")?"failed":"not_started"}function hI(e,t){return e.map(n=>{const r=t.filter(s=>!Ql(s)&&Zg(s)===n.page),i=r[0]??null;return{...n,aggregate_status:fI(r),latest_task_status:(i==null?void 0:i.status)??null,latest_task_updated_at:(i==null?void 0:i.updated_at)??null,has_completed_result:r.some(s=>s.status==="completed")}})}function mI(e,t){return t===zo?e.filter(Ql):t==null?e.filter(n=>!Ql(n)):e.filter(n=>!Ql(n)&&Zg(n)===t)}function Zi(e){const t=String(e||"").trim();if(!t)return"";const n=t.toLowerCase();return/llm request failed with status 404|http 404|status 404: not found/.test(n)?"大模型接口地址无法访问。通常是 Base URL 填写不对,或当前服务商不支持这个接口路径。请到设置页检查 LLM 的 Base URL。":/status 401|authentication failed|unauthorized|invalid api key|incorrect api key/.test(n)?"API Key 校验失败。请检查密钥是否正确、是否过期,或是否复制了多余空格。":/status 403|forbidden|permission denied/.test(n)?"当前账号没有访问这个模型或接口的权限。请检查服务商后台的权限、余额或模型开通状态。":/status 429|rate limit|too many requests/.test(n)?"请求过于频繁,或当前额度不足。请稍后重试,并检查服务商后台是否有限流或余额不足。":/status 500|status 502|status 503|status 504|server error|bad gateway|service unavailable|gateway timeout/.test(n)?"模型服务暂时不可用,通常是服务商接口异常或网络波动。建议稍后再试。":/connect timeout|read timeout|timed out|timeout/.test(n)?"请求超时了。可能是当前网络较慢,或模型响应时间过长,建议稍后重试。":/connection failed|connect error|network error|failed to establish|name or service not known|getaddrinfo/.test(n)?"连接模型服务失败。请检查网络是否正常,以及接口地址是否填写正确。":/not a valid json|未返回合法 json/.test(n)?"模型接口能连通,但没有按要求返回合法 JSON,所以无法继续生成摘要。建议更换模型,或先到设置页点击测试按钮检查。":/siliconflow asr authentication failed|asr 测试失败:认证失败/.test(n)?"语音识别 API Key 校验失败。请检查 SiliconFlow API Key 是否正确。":/siliconflow asr request failed|asr request failed/.test(n)?"语音识别服务调用失败。请检查 SiliconFlow 的 Base URL、模型名和网络连接。":/llm/.test(n)&&/api key/.test(n)?"LLM 的 API Key 似乎有问题。请到设置页重新检查并测试。":t}function P3(e,t){var r;if(t&&e.some(i=>i.task_id===t))return t;const n=e.find(i=>i.status==="completed");return(n==null?void 0:n.task_id)??((r=e[0])==null?void 0:r.task_id)??null}function pI(e,t={}){if(!e)return[];const n=[],r=String(e.overview||"").trim(),i=Array.isArray(e.key_points)?e.key_points:[],s=Array.isArray(e.timeline)?e.timeline:[],o=Array.isArray(e.segment_summaries)?e.segment_summaries:[],d=s.length||o.length;return r&&n.push({id:"overview",kind:"overview",eyebrow:"Overview",title:"核心概览",content:r,meta:`${i.length} 个要点 · ${d} 个章节`}),i.map(f=>f.trim()).filter(Boolean).forEach((f,m)=>{n.push({id:`key-point-${m}`,kind:"key-point",eyebrow:"Key Point",title:"",content:f})}),s.length?s.forEach((f,m)=>{const y=rf(String(f.title||"").trim(),[],String(f.summary||"").trim(),`章节 ${m+1}`),p=String(f.summary||"").trim(),g=typeof f.start=="number"?f.start:null,x=t.chapterAnchor==="page"&&g!=null?Math.max(1,Math.round(g)):null;n.push({id:`chapter-${m}`,kind:"chapter",eyebrow:"Chapter",title:y,content:p||"当前章节暂未生成摘要。",timestampSeconds:t.chapterAnchor==="page"?null:g,pageNumber:x,anchorLabel:x!=null?`P${x}`:void 0})}):o.map(f=>f.trim()).filter(Boolean).forEach((f,m)=>{n.push({id:`chapter-${m}`,kind:"chapter",eyebrow:"Chapter",title:`章节 ${m+1}`,content:f})}),n}function gI(e,t,n={}){const r=Array.isArray(t==null?void 0:t.chapter_groups)?t==null?void 0:t.chapter_groups:[];if(r.length){const d=[];if(r.forEach((f,m)=>{var j,N;if(!f||typeof f!="object")return;const p=(Array.isArray(f.children)?f.children:[]).map((_,E)=>yI(_,`${m}-${E}`,n)).filter(_=>!!_);if(!p.length)return;const g=rf(String(f.title||"").trim(),p.map(_=>_.title),String(f.summary||"").trim(),"主题"),x=String(f.summary||"").trim(),w=n.chapterAnchor==="page"?F3(p):[bd(typeof f.start=="number"?f.start:(j=p[0])==null?void 0:j.timestampSeconds),bd((N=p[p.length-1])==null?void 0:N.timestampSeconds)].filter(Boolean).join(" - "),k=x||[w,`${p.length} 个小章节`].filter(Boolean).join(" · ");d.push({id:`chapter-group-${m}`,title:g,meta:k,items:p})}),d.length)return d}const i=e.filter(d=>d.kind==="chapter");if(!i.length)return[];const s=i.length<=4?2:3,o=[];for(let d=0;d<i.length;d+=s){const f=i.slice(d,d+s),m=f[0],y=f[f.length-1],p=rf("",f.map(w=>w.title),f.map(w=>w.title).join(";"),"主题"),x=[n.chapterAnchor==="page"?F3(f):[bd(m.timestampSeconds),bd(y.timestampSeconds)].filter(Boolean).join(" - "),`${f.length} 个小章节`].filter(Boolean).join(" · ");o.push({id:`chapter-group-${o.length}`,title:p,meta:x,items:f})}return o}function yI(e,t,n={}){if(!e||typeof e!="object")return null;const r=String(e.summary||"").trim(),i=rf(String(e.title||"").trim(),[],r,"章节"),s=String(e.summary||"").trim();if(!i&&!s)return null;const o=typeof e.start=="number"?e.start:null,d=n.chapterAnchor==="page"&&o!=null?Math.max(1,Math.round(o)):null;return{id:`chapter-${t}`,kind:"chapter",eyebrow:"Chapter",title:i||"章节",content:s||"当前章节暂未生成摘要。",timestampSeconds:n.chapterAnchor==="page"?null:o,pageNumber:d,anchorLabel:d!=null?`P${d}`:void 0}}function F3(e){const t=e.map(i=>i.pageNumber).filter(i=>typeof i=="number"&&Number.isFinite(i));if(!t.length)return"";const n=Math.min(...t),r=Math.max(...t);return n===r?`P${n}`:`P${n} - P${r}`}function rf(e,t,n,r){const i=V3(e);if(i&&!G3(i))return i;for(const o of t){const d=V3(o);if(d&&!G3(d))return d}const s=vI(n);return s||r}function V3(e){return e.trim().replace(/^[\-•\d.()、\s]+/,"").slice(0,24)}function G3(e){const t=e.trim().toLowerCase();return/^(大)?章节\s*\d+$/.test(e.trim())||/^第?\s*\d+\s*(章|节|部分)$/.test(e.trim())||/^(part|section|chapter)\s*[-::]?\s*\d+$/.test(t)}function vI(e){var n;const t=(n=e.trim().replace(/^(这一部分|本部分|这里|该部分|这一章|本章|本节|这一节)(主要)?(讲|介绍|讨论|说明|分析|围绕)?/,"").split(/[。;!!??\n]/)[0])==null?void 0:n.trim().replace(/^[::\-]+|[,,、;;::]+$/g,"").replace(/\s+/g,"");return t?t.slice(0,24):""}function zw(e){if(!e)return"";const t=String(e.knowledge_note_markdown||"").trim();if(t)return t;const n=[],r=String(e.overview||"").trim(),i=Array.isArray(e.key_points)?e.key_points.map(o=>o.trim()).filter(Boolean):[],s=Array.isArray(e.timeline)?e.timeline:[];return r&&n.push("## 摘要概览","",r),i.length&&(n.push("","## 关键要点",""),n.push(...i.map(o=>`- ${o}`))),s.length&&(n.push("","## 时间轴",""),s.forEach((o,d)=>{const f=String(o.title||"").trim()||`章节 ${d+1}`,m=String(o.summary||"").trim(),y=typeof o.start=="number"?o.start:null;n.push(`### ${f}`),y!=null&&n.push("",`- 时间点:${Dw(y)}`),m&&n.push("",m),n.push("")})),n.join(`
|
|
388
|
+
`).trim()}function xI(e){return!e||e.status!=="completed"||!e.result?!1:!!zw(e.result).trim()}function Dw(e){const t=Math.max(0,Math.floor(e)),n=Math.floor(t/60),r=t%60;return`${String(n).padStart(2,"0")}:${String(r).padStart(2,"0")}`}function bd(e){return typeof e!="number"?"":Dw(e)}function bI(e){return e!=null&&e.result?null:e?e.status==="running"||e.status==="queued"?{tone:"pending",title:"当前任务还在处理中",description:"可以先查看顶部任务药丸中的实时进度,结果生成后这里会自动可用。"}:e.status==="failed"||e.status==="cancelled"?{tone:"failed",title:"当前任务未生成可用结果",description:"可以切换到其他已完成任务,或重新发起摘要生成。",detail:Zi(e.error_message)||void 0}:{tone:"empty",title:"当前任务还没有结果",description:"请选择其他已完成任务,或者重新生成摘要。"}:{tone:"empty",title:"还没有可展示的任务内容",description:"开始处理后,这里会整理出摘要结果和知识卡片。"}}function wI(e,t){var n,r,i;return(t==null?void 0:t.status)==="ready"&&t.mindmap?null:e?(t==null?void 0:t.status)==="generating"||((n=e.result)==null?void 0:n.mindmap_status)==="generating"?{tone:"pending",title:"思维导图正在生成",description:"系统正在基于当前任务的摘要结果组织主题树,稍后会自动显示在这里。",actionLabel:"生成中",actionEnabled:!1}:(t==null?void 0:t.status)==="failed"||((r=e.result)==null?void 0:r.mindmap_status)==="failed"?{tone:"failed",title:"思维导图生成失败",description:Zi((t==null?void 0:t.error_message)||((i=e.result)==null?void 0:i.mindmap_error_message)||e.error_message)||"这次处理没有成功生成可展示的导图。",actionLabel:"重新生成导图",actionEnabled:!0}:e.status==="running"||e.status==="queued"?{tone:"pending",title:"任务完成后才能生成导图",description:"当前任务仍在处理中。等摘要和知识笔记准备好后,就可以按需生成思维导图。",actionLabel:"处理中",actionEnabled:!1}:e.status==="failed"||e.status==="cancelled"?{tone:"failed",title:"当前任务暂时无法生成导图",description:Zi(e.error_message)||"这次处理没有产出可用于导图组织的结果。",actionLabel:"等待可用结果",actionEnabled:!1}:{tone:"accent",title:"当前任务已可生成思维导图",description:"导图会按主题重组知识卡片、章节结构和知识笔记,并在叶子节点保留可回看时间点。",actionLabel:"生成思维导图",actionEnabled:!0}:{tone:"default",title:"当前还没有可生成导图的任务",description:"请选择一个已完成任务。导图会基于当前任务的知识卡片和知识笔记按需生成。",actionLabel:"等待可用任务",actionEnabled:!1}}function SI(e){var t,n;if(!e)return null;try{const r=new URL(e),i=r.hostname.toLowerCase();if(!i.includes("bilibili.com")&&!i.includes("b23.tv"))return null;const s=((t=r.pathname.match(/\/video\/(BV[0-9A-Za-z]+)/i))==null?void 0:t[1])??null,o=((n=r.pathname.match(/\/video\/av(\d+)/i))==null?void 0:n[1])??null,d=r.searchParams.get("bvid")??s,f=r.searchParams.get("aid")??o,m=r.searchParams.get("p")??"1";if(!d&&!f)return null;const y=new URL("https://player.bilibili.com/player.html");return y.searchParams.set("isOutside","true"),y.searchParams.set("autoplay","0"),y.searchParams.set("p",m),d&&y.searchParams.set("bvid",d),f&&y.searchParams.set("aid",f),y.toString()}catch{return null}}function kI(e){var t;if(!e)return null;try{const n=new URL(e),r=n.hostname.toLowerCase();let i=null;if(r.endsWith("youtu.be")?i=n.pathname.split("/").filter(Boolean)[0]??null:r.includes("youtube.com")&&(n.pathname==="/watch"?i=n.searchParams.get("v"):i=((t=n.pathname.match(/^\/shorts\/([^/?#]+)/i))==null?void 0:t[1])??null),!i)return null;const s=new URL(`https://www.youtube.com/embed/${i}`);return s.searchParams.set("autoplay","0"),s.searchParams.set("rel","0"),s.toString()}catch{return null}}function NI(e,t,n,r){const i=new URL(e);if(n!=null&&Number.isFinite(n)&&n>=0){const s=String(Math.floor(n));t==="youtube"?i.searchParams.set("start",s):i.searchParams.set("t",s)}else t==="youtube"?i.searchParams.delete("start"):i.searchParams.delete("t");return i.searchParams.set("_ts",String(r)),i.toString()}function jI(e){const t=SI(e);if(t&&e)return{platform:"bilibili",embedUrl:t,sourceUrl:e,openLabel:"在 Bilibili 打开"};const n=kI(e);return n&&e?{platform:"youtube",embedUrl:n,sourceUrl:e,openLabel:"在 YouTube 打开"}:null}const CI={stroke:"#4c9fdd",surface:"rgba(76, 159, 221, 0.18)",ink:"#104f7d",shadow:"rgba(76, 159, 221, 0.24)"},Y3=[{stroke:"#f2b84b",surface:"rgba(242, 184, 75, 0.18)",ink:"#805018",shadow:"rgba(242, 184, 75, 0.24)"},{stroke:"#ff8c69",surface:"rgba(255, 140, 105, 0.16)",ink:"#91412a",shadow:"rgba(255, 140, 105, 0.24)"},{stroke:"#8cc8ff",surface:"rgba(140, 200, 255, 0.18)",ink:"#285c86",shadow:"rgba(140, 200, 255, 0.24)"},{stroke:"#f5a64a",surface:"rgba(245, 166, 74, 0.16)",ink:"#8a4a00",shadow:"rgba(245, 166, 74, 0.22)"},{stroke:"#9dd8b3",surface:"rgba(157, 216, 179, 0.18)",ink:"#1f6a47",shadow:"rgba(157, 216, 179, 0.22)"},{stroke:"#f7a8c2",surface:"rgba(247, 168, 194, 0.16)",ink:"#8e4563",shadow:"rgba(247, 168, 194, 0.22)"}],Lw=16/9,X3=220,Rw=360,Do=20,Bp=92,Bw=62,EI=new Set([".mp4",".mov",".mkv",".avi",".wmv",".webm",".flv",".m4v",".ts",".mpeg",".mpg"]),MI=[{id:"knowledge",label:"知识卡片",description:"按概览、要点、章节整理当前任务结果。"},{id:"summary",label:"知识笔记",description:"查看当前任务的完整笔记、重点展开和转写全文。"},{id:"mindmap",label:"思维导图",description:"预留按主题组织的知识结构视图入口。"}];function K3(e,t){const n=new Date(t.updated_at).getTime()-new Date(e.updated_at).getTime();return n!==0?n:new Date(t.created_at).getTime()-new Date(e.created_at).getTime()}function _I(e){return e.status==="completed"}function Z3(e){return e?[{label:"创建时间",value:hi(e.created_at)},{label:"更新时间",value:hi(e.updated_at)},{label:"LLM Token",value:N6(e.llm_total_tokens)},{label:"任务耗时",value:AN(e.task_duration_seconds)}]:[]}function Ow(e,t){const n=Math.max(X3,t-Do*2);return Math.min(Math.max(e,X3),n)}function U1(e,t,n){const r=Ow(e.width,t),i=r/Lw+Bw,s=Math.max(Do,t-r-Do),o=Math.max(Bp,n-i-Do);return{width:r,x:Math.min(Math.max(e.x,Do),s),y:Math.min(Math.max(e.y,Bp),o)}}function Q3(e,t){const n=Ow(Rw,e),r=n/Lw+Bw;return{width:n,x:Math.max(Do,e-n-28),y:Math.max(Bp,t-r-28)}}function Vl(e,t){if(!(t in e))return e;const n={...e};return delete n[t],n}function As(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}async function AI(e){const[t,n]=await Promise.all([Ke.getTaskResult(e),Ke.getTaskEvents(e)]);return{detail:t,events:n}}function TI(e){return c.jsx("svg",{fill:"currentColor",viewBox:"0 0 24 24",...e,children:c.jsx("path",{d:"M12 18.26 4.95 22l1.35-7.84L.6 8.71l7.87-1.14L12 0.5l3.53 7.07 7.87 1.14-5.7 5.45L19.05 22z"})})}function zI({onRefresh:e}){var yn,pl,ti,ni,gl,In,Wr,ri,$a,us,_i,Ai,Ha,ai,yl;const{videoId:t=""}=mk(),n=lf(),[r,i]=A.useState(null),[s,o]=A.useState([]),[d,f]=A.useState({}),[m,y]=A.useState({}),[p,g]=A.useState({}),[x,w]=A.useState(null),[k,j]=A.useState("knowledge"),[N,_]=A.useState("collapsed"),[E,L]=A.useState(!1),[D,T]=A.useState(null),[O,Z]=A.useState(!1),[V,P]=A.useState(""),[K,X]=A.useState({}),[le,F]=A.useState({}),[Y,q]=A.useState(!1),[Q,ee]=A.useState(!1),[ne,R]=A.useState(""),[H,W]=A.useState(null),[B,ce]=A.useState([]),[pe,xe]=A.useState(null),[be,ye]=A.useState(null),[Ce,Ge]=A.useState(!1),[Pe,$e]=A.useState("create"),[qe,nt]=A.useState({nonce:0,seconds:null}),[lt,We]=A.useState(null),Dt=A.useRef(null),ke=A.useRef(null),et=A.useRef(null),st=A.useRef(null),Nt=A.useRef(null),kn=A.useRef(null),Ht=A.useRef(null),ct=A.useRef(null),Lt=A.useRef(""),de=A.useRef(t),je=A.useRef(null),He=A.useRef(0),rt=A.useRef(new Map),gt=A.useRef(new Map),Pt=A.useRef(new Map);A.useEffect(()=>{de.current=t},[t]),A.useEffect(()=>{nt({nonce:0,seconds:null})},[t]),A.useEffect(()=>{je.current=x},[x]),A.useEffect(()=>{let G=!1;return Ke.getSettings().then(Se=>{G||R(String(Se.output_dir||"").trim())}).catch(()=>{}),()=>{G=!0}},[]);async function fn(G,Se={}){const{force:ve=!1}=Se,Be=de.current;if(!ve){const Ae=rt.current.get(G);if(Ae)return f(At=>At[G]?At:{...At,[G]:Ae}),y(At=>Vl(At,G)),Ae;const ot=gt.current.get(G);if(ot)return ot}const I=(Pt.current.get(G)??0)+1;Pt.current.set(G,I),g(Ae=>Ae[G]?Ae:{...Ae,[G]:!0}),y(Ae=>Vl(Ae,G));const me=AI(G).then(Ae=>Pt.current.get(G)!==I?rt.current.get(G)??Ae:(rt.current.set(G,Ae),de.current===Be&&f(ot=>({...ot,[G]:Ae})),Ae)).catch(Ae=>{if(Pt.current.get(G)===I&&de.current===Be){const ot=Ae instanceof Error?Ae.message:"任务详情加载失败";y(At=>({...At,[G]:ot}))}throw Ae}).finally(()=>{gt.current.get(G)===me&>.current.delete(G),Pt.current.get(G)===I&&de.current===Be&&g(Ae=>Vl(Ae,G))});return gt.current.set(G,me),me}async function Wt(G,Se={}){if(!Se.force&&K[G])return K[G];F(ve=>({...ve,[G]:!0}));try{const ve=await Ke.getTaskMindMap(G);return X(Be=>({...Be,[G]:ve})),ve}catch(ve){const Be={task_id:G,status:"failed",error_message:ve instanceof Error?ve.message:"思维导图加载失败",updated_at:null,mindmap:null};throw X(I=>({...I,[G]:Be})),ve}finally{F(ve=>Vl(ve,G))}}async function Fe(G,Se={}){F(ve=>({...ve,[G]:!0}));try{const ve=await Ke.generateTaskMindMap(G,{force:Se.force});return X(Be=>({...Be,[G]:ve})),ve}catch(ve){const Be={task_id:G,status:"failed",error_message:ve instanceof Error?ve.message:"思维导图生成失败",updated_at:null,mindmap:null};throw X(I=>({...I,[G]:Be})),ve}finally{F(ve=>Vl(ve,G))}}async function qt(G={}){var Ae;const{forceTaskIds:Se=[],preferredTaskId:ve,syncLibrary:Be=!1}=G,I=++He.current,me=t;try{const[ot,At]=await Promise.all([Ke.getVideo(me),Ke.getVideoTasks(me)]);if(de.current!==me||He.current!==I)return;const Xt=[...At].sort(K3),Er=ve===void 0?je.current:ve,xa=P3(Xt,Er),Hf=((Ae=Xt[0])==null?void 0:Ae.task_id)??null,qf=[...new Set([xa,Hf].filter(Boolean))],ru=new Set(Se),Ic=new Map;if(await Promise.all(qf.map(async Jr=>{Ic.set(Jr,await fn(Jr,{force:ru.has(Jr)}))})),de.current!==me||He.current!==I)return;const Pc=new Set(Xt.map(Jr=>Jr.task_id));je.current=xa,i(ot),o(At),w(xa),f(Jr=>{const Ti={};for(const Uf of Xt){const au=Uf.task_id,Fc=Ic.get(au)??Jr[au];Fc&&(Ti[au]=Fc)}return Ti}),y(Jr=>Object.fromEntries(Object.entries(Jr).filter(([Ti])=>Pc.has(Ti)))),g(Jr=>Object.fromEntries(Object.entries(Jr).filter(([Ti])=>Pc.has(Ti)))),Be&&e()}catch(ot){throw de.current===me&&He.current===I&&P(ot instanceof Error?ot.message:"视频详情加载失败"),ot}}function jt(G){je.current=G,w(G),fn(G).catch(()=>{})}A.useEffect(()=>{He.current+=1,de.current=t,je.current=null,i(null),o([]),f({}),y({}),g({}),w(null),j("knowledge"),_("collapsed"),L(!1),P(""),X({}),F({}),W(null),xe(null),Z(!1),Ge(!1),$e("create"),We(null),qt({preferredTaskId:null}).catch(()=>{})},[t]);const Jt=A.useMemo(()=>[...s].sort(K3),[s]),Rt=(r==null?void 0:r.pages)??[],_e=A.useMemo(()=>Jt.filter(Ql),[Jt]),Le=A.useMemo(()=>{const G=new Map;for(const Se of Jt){if(Ql(Se))continue;const ve=Zg(Se);G.set(ve,!!G.get(ve)||_I(Se))}return G},[Jt]),Ye=A.useMemo(()=>hI(Rt,Jt),[Rt,Jt]),Ue=A.useMemo(()=>Ye.reduce((G,Se)=>(G.total+=1,Se.aggregate_status==="completed"?G.completed+=1:Se.aggregate_status==="in_progress"?G.inProgress+=1:Se.aggregate_status==="failed"?G.failed+=1:G.notStarted+=1,G),{total:0,completed:0,inProgress:0,notStarted:0,failed:0}),[Ye]),dt=Ye.some(G=>G.has_completed_result),en=Rt.length>0&&(_e.length>0||dt),Kt=pe??((yn=Rt[0])==null?void 0:yn.page)??null,ft=Kt===zo,Oe=Rt.find(G=>G.page===Kt)??null,Ln=A.useMemo(()=>!Rt.length||Kt==null?Jt.filter(G=>!Ql(G)):mI(Jt,Kt),[Rt.length,Kt,Jt]),kt=((pl=Ln[0])==null?void 0:pl.task_id)??null,hn=Ln[0]??null,or=kt?d[kt]??null:null,Wn=(or==null?void 0:or.detail)??null,Lr=(or==null?void 0:or.events)??[],Bt=Ln.find(G=>G.task_id===x)??null,kr=x?d[x]??null:null,tt=(kr==null?void 0:kr.detail)??null,Za=(kr==null?void 0:kr.events)??[],Jn=!!(x&&kt&&x===kt),an=!!(kt&&p[kt]&&!or),un=!!(x&&p[x]&&!kr),er=kt?m[kt]??null:null,$n=x?m[x]??null:null;A.useEffect(()=>{Dt.current=null},[kt]),A.useEffect(()=>{var Se,ve;if(!Rt.length){pe!==null&&xe(null);return}if(pe&&Rt.some(Be=>Be.page===pe)||pe===zo&&en)return;const G=((Se=Jt.find(Be=>Be.page_number!=null&&Be.page_number>0))==null?void 0:Se.page_number)??((ve=Rt[0])==null?void 0:ve.page)??null;xe(G)},[Rt,en,Jt,pe]),A.useEffect(()=>{const G=P3(Ln,je.current);G!==je.current&&(je.current=G,w(G),G&&fn(G).catch(()=>{}))},[Ln]),A.useEffect(()=>{!x||k!=="mindmap"||Wt(x).catch(()=>{})},[k,x]),A.useEffect(()=>{var Be;if(!x)return;const G=K[x];if(!((G==null?void 0:G.status)==="generating"||((Be=tt==null?void 0:tt.result)==null?void 0:Be.mindmap_status)==="generating"))return;const ve=window.setInterval(()=>{Promise.all([Wt(x,{force:!0}),fn(x,{force:!0})]).catch(()=>{})},1500);return()=>window.clearInterval(ve)},[K,(ti=tt==null?void 0:tt.result)==null?void 0:ti.mindmap_status,x]),A.useEffect(()=>{var Se;if(!kt)return;const G=Ke.createTaskEventSource(kt,(Se=Lr.at(-1))==null?void 0:Se.created_at);return G.addEventListener("progress",ve=>{const Be=JSON.parse(ve.data);f(I=>{var At;const me=I[kt];if(!me)return I;const Ae=me.events.some(Xt=>Xt.event_id===Be.event.event_id)?me.events:[...me.events,Be.event],ot={detail:{...me.detail,status:Be.status,updated_at:Be.updated_at,result:Be.result===void 0?me.detail.result:Be.result,llm_total_tokens:((At=Be.result)==null?void 0:At.llm_total_tokens)??me.detail.llm_total_tokens},events:Ae};return rt.current.set(kt,ot),{...I,[kt]:ot}}),o(I=>I.map(me=>{var Ae;return me.task_id===kt?{...me,status:Be.status,updated_at:Be.updated_at,llm_total_tokens:((Ae=Be.result)==null?void 0:Ae.llm_total_tokens)??me.llm_total_tokens}:me})),i(I=>I&&{...I,latest_status:Be.status,updated_at:Be.updated_at,latest_result:Be.result===void 0?I.latest_result:Be.result})}),G.onerror=()=>G.close(),()=>G.close()},[kt]),A.useEffect(()=>{if(!kt||!Lr.length)return;const G=[...Lr].reverse().find(Be=>Be.stage==="completed"||Be.stage==="failed"||Be.stage==="cancelled"||Be.stage==="mindmap_completed"||Be.stage==="mindmap_failed");if(!G)return;const Se=`${kt}:${G.event_id}`;if(Dt.current===Se)return;Dt.current=Se;const ve=window.setTimeout(()=>{qt({forceTaskIds:[kt],preferredTaskId:je.current,syncLibrary:!0}).catch(()=>{})},300);return()=>window.clearTimeout(ve)},[Lr,kt]),A.useEffect(()=>{if(N!=="expanded"&&!E&&!O)return;function G(ve){var At,Xt,Er,xa;const Be=ve.target,I=(At=ke.current)==null?void 0:At.contains(Be),me=(Xt=et.current)==null?void 0:Xt.contains(Be),Ae=(Er=st.current)==null?void 0:Er.contains(Be),ot=(xa=Nt.current)==null?void 0:xa.contains(Be);!I&&!ot&&_("collapsed"),me||(L(!1),T(null)),Ae||Z(!1)}function Se(ve){ve.key==="Escape"&&(_("collapsed"),L(!1),T(null),Z(!1))}return document.addEventListener("mousedown",G),window.addEventListener("keydown",Se),()=>{document.removeEventListener("mousedown",G),window.removeEventListener("keydown",Se)}},[E,O,N]);async function ol(){var I;if(!ct.current||Y)return;if(!navigator.clipboard||typeof ClipboardItem>"u"){P("当前环境不支持将图片复制到剪贴板。");return}const G=ct.current,Se=V,ve=window.getComputedStyle(G),Be=ve.backgroundColor==="rgba(0, 0, 0, 0)"?window.getComputedStyle(document.body).backgroundColor:ve.backgroundColor;q(!0),P("正在导出当前知识卡片..."),G.setAttribute("data-export-mode","true");try{await document.fonts.ready,await new Promise(Ae=>window.requestAnimationFrame(()=>Ae(void 0)));const me=await dI(G,{backgroundColor:Be,cacheBust:!0,pixelRatio:Math.max(window.devicePixelRatio||1,2)});if(!me)throw new Error("未能生成图片,请稍后重试。");if((I=window.desktop)!=null&&I.clipboard){const Ae=await new Promise((ot,At)=>{const Xt=new FileReader;Xt.onloadend=()=>{if(typeof Xt.result=="string"){ot(Xt.result);return}At(new Error("图片编码失败,请稍后重试。"))},Xt.onerror=()=>At(Xt.error??new Error("图片编码失败,请稍后重试。")),Xt.readAsDataURL(me)});await window.desktop.clipboard.writeImage(Ae)}else await navigator.clipboard.write([new ClipboardItem({[me.type]:me})]);P("当前知识卡片已复制为图片。")}catch(me){me instanceof Error&&me.message.includes("Document is not focused")?P("复制失败:请先点一下应用窗口,再重新尝试。"):P(me instanceof Error?me.message:"导出图片失败,请稍后重试。")}finally{G.removeAttribute("data-export-mode"),q(!1),window.setTimeout(()=>{P(me=>me==="当前知识卡片已复制为图片。"||me==="正在导出当前知识卡片..."?Se:me)},2600)}}const tr=(tt==null?void 0:tt.result)??null,mn=A.useMemo(()=>Pv(Lr),[Lr]),ur=A.useMemo(()=>un?{tone:"pending",title:"正在加载所选版本",description:"任务详情载入完成后,工作台会切换到对应的知识卡片和摘要内容。"}:$n?{tone:"failed",title:"所选版本加载失败",description:"可以重新点击该版本重试,或先切换查看其他已完成任务。",detail:Zi($n)}:bI(tt),[un,tt,$n]),Yt=A.useMemo(()=>{var Se;const G=x?K[x]??null:null;return(G==null?void 0:G.status)==="ready"&&(!G.mindmap||!((Se=G.mindmap.nodes)!=null&&Se.length))?{...G,status:"failed",error_message:G.error_message||"思维导图数据为空,请重新生成。",mindmap:null}:G},[K,x]),Rn=A.useMemo(()=>un?{tone:"pending",title:"思维导图将在版本载入后可用",description:"当前正在同步所选内容版本的详细结果。",actionLabel:"加载中",actionEnabled:!1}:$n?{tone:"failed",title:"当前版本暂时无法打开思维导图",description:Zi($n),actionLabel:"稍后重试",actionEnabled:!1}:wI(tt,Yt),[un,Yt,tt,$n]),Nr=A.useMemo(()=>pI(tr,{chapterAnchor:ft?"page":"time"}),[ft,tr]),Nn=Nr.find(G=>G.kind==="overview")??null,Rr=Nr.filter(G=>G.kind==="key-point"),cn=Nr.filter(G=>G.kind==="chapter"),Hn=A.useMemo(()=>gI(cn,tr,{chapterAnchor:ft?"page":"time"}),[cn,ft,tr]),Qa=Hn.length>0&&B.length===Hn.length,pr=A.useMemo(()=>zw(tr),[tr]),Zr=A.useMemo(()=>xI(tt),[tt]),Da=(tr==null?void 0:tr.transcript_text)??"",Br=(Wn==null?void 0:Wn.status)??(hn==null?void 0:hn.status)??(r==null?void 0:r.latest_status),ul=er??Zi((ni=mn.failedEvent)==null?void 0:ni.message)??((gl=mn.currentEvent)==null?void 0:gl.message)??Zi(Wn==null?void 0:Wn.error_message)??(hn?Pa(hn.status):"等待开始处理"),Wa=(kt==null?void 0:kt.slice(0,8))??null,Ja=(Wn==null?void 0:Wn.title)||(hn==null?void 0:hn.title)||(r==null?void 0:r.title)||"当前任务",La=Z3(Wn??hn),jr=er?"同步失败":mn.failedEvent?"处理失败":(In=mn.currentEvent)!=null&&In.stage?Gu(mn.currentEvent.stage):hn?Pa(hn.status):"等待开始",jn=x?x.slice(0,8):null,ga=Z3(tt??Bt),cl=(tr==null?void 0:tr.llm_total_tokens)??(tt==null?void 0:tt.llm_total_tokens)??(Bt==null?void 0:Bt.llm_total_tokens)??null,Cr=(tt==null?void 0:tt.status)??(Bt==null?void 0:Bt.status),dl=!!(x&&((ri=(Wr=tt==null?void 0:tt.result)==null?void 0:Wr.transcript_text)!=null&&ri.trim())&&(($a=tt.result.artifacts)!=null&&$a.summary_path)),ya=un?"加载中":$n?"加载失败":ur?Pa(Cr):"已准备",fl=[{id:"progress",label:"最新运行",value:jr},{id:"content",label:"当前查看",value:ft?"全集总结":Oe?`P${Oe.page}`:jn?`任务 ${jn}`:"暂无任务",mono:!0}],An=Ue.completed,gr=Ue.total>0?Math.max(0,Math.min(100,Math.round(An/Ue.total*100))):0,Cn=A.useMemo(()=>ft?null:jI((Oe==null?void 0:Oe.source_url)||(r==null?void 0:r.source_url)),[Oe==null?void 0:Oe.source_url,ft,r==null?void 0:r.source_url]),yr=A.useMemo(()=>Cn?NI(Cn.embedUrl,Cn.platform,qe.seconds,qe.nonce):null,[Cn,qe]),qn=A.useMemo(()=>{if(!r||String(r.platform||"").toLowerCase()!=="local"||ft)return null;const G=(Oe==null?void 0:Oe.source_url)||r.source_url,Se=(()=>{var ve;try{return`.${((ve=new URL(G,window.location.origin).pathname.split(".").pop())==null?void 0:ve.toLowerCase())||""}`}catch{const Be=String(G||"").split(".");return Be.length>1?`.${Be[Be.length-1].toLowerCase()}`:""}})();return EI.has(Se)?`/api/v1/videos/${r.video_id}/media`:null},[Oe==null?void 0:Oe.source_url,ft,r]),Ra=!!(qn||Cn),vr=(Yt==null?void 0:Yt.status)==="ready"&&((us=tt==null?void 0:tt.result)==null?void 0:us.mindmap_status)!=="generating"?Yt.mindmap??null:null,Or=A.useMemo(()=>Za.filter(G=>G.stage.startsWith("mindmap_")),[Za]),nr=A.useMemo(()=>{var Be,I,me,Ae,ot;if(!x)return null;const G=(Yt==null?void 0:Yt.status)==="generating"||((Be=tt==null?void 0:tt.result)==null?void 0:Be.mindmap_status)==="generating",Se=!!le[x],ve=Or.length?Pv(Or):null;return!G&&!Se&&!(ve!=null&&ve.filtered.length)?null:{progress:Math.max(0,Math.min(100,Math.round((ve==null?void 0:ve.progress)??(Se?6:90)))),currentLabel:(I=ve==null?void 0:ve.currentEvent)!=null&&I.stage?Gu(ve.currentEvent.stage):Se?"提交生成请求":"等待阶段回传",message:(Yt==null?void 0:Yt.error_message)||((me=tt==null?void 0:tt.result)==null?void 0:me.mindmap_error_message)||((Ae=ve==null?void 0:ve.failedEvent)==null?void 0:Ae.message)||((ot=ve==null?void 0:ve.currentEvent)==null?void 0:ot.message)||(Se?"正在向本地服务提交导图生成请求。":"系统正在生成思维导图,阶段完成后会自动刷新。"),events:(ve==null?void 0:ve.filtered)??[],hasError:!!(ve!=null&&ve.failedEvent)}},[Or,le,Yt,(_i=tt==null?void 0:tt.result)==null?void 0:_i.mindmap_error_message,(Ai=tt==null?void 0:tt.result)==null?void 0:Ai.mindmap_status,x]),hl=vr?"主题导图视图":nr?`${nr.currentLabel} · ${nr.progress}%`:"按需生成",cr=A.useMemo(()=>vr?vr.nodes.find(G=>G.id===vr.root)??vr.nodes[0]??null:null,[vr]),Mi=A.useMemo(()=>cr?BI(cr,lt,ft?"page":"time"):{nodes:[],edges:[]},[ft,cr,lt]),Un=A.useMemo(()=>!cr||!lt?null:Op(cr,lt),[cr,lt]);A.useEffect(()=>{const G=Hn.map(ve=>ve.id).join("|"),Se=Lt.current!==G;Lt.current=G,ce(ve=>{const Be=new Set(Hn.map(Ae=>Ae.id)),I=ve.filter(Ae=>Be.has(Ae)),me=I.length===ve.length&&I.every((Ae,ot)=>Ae===ve[ot]);return Hn.length===0?I.length?[]:ve:I.length>0||!Se?me?ve:I:[Hn[0].id]})},[Hn]),A.useEffect(()=>{if(!cr){We(null);return}We(G=>G&&Op(cr,G)?G:null)},[cr]);function as(G){var Se;if(G!=null){if(nt(ve=>({nonce:ve.nonce+1,seconds:G})),k==="knowledge"&&qn&&Ht.current)Ht.current.currentTime=G,Ht.current.play().catch(()=>{});else if(!Cn&&!qn)return;k==="knowledge"&&((Se=kn.current)==null||Se.scrollIntoView({behavior:"smooth",block:"start"}))}}function ht(G,Se){if(Se==null)return;const ve=Rt.find(I=>I.page===Se);if(!ve){P(`没有找到 P${Se} 对应的分 P。`);return}const Be=G.currentTarget.getBoundingClientRect();ye({open:!0,pageNumber:Se,title:ve.title,x:Be.left+Be.width/2,y:Be.bottom+8})}function Qr(){be&&(xe(be.pageNumber),j("knowledge"),Z(!1),ye(null),P(`已跳转到 P${be.pageNumber}「${be.title}」`))}function is(){ye(null)}A.useEffect(()=>{if(!(be!=null&&be.open))return;function G(Se){const ve=Se.target;!ve.closest(".jump-confirm-popover")&&!ve.closest("[data-jump-anchor]")&&ye(null)}return document.addEventListener("mousedown",G),()=>document.removeEventListener("mousedown",G)},[be==null?void 0:be.open]);function ls(){ce(Qa?[]:Hn.map(G=>G.id))}function ei(G,Se){ce(ve=>Se?ve.includes(G)?ve:[...ve,G]:ve.filter(Be=>Be!==G))}async function Ba(G=!1){if(x){j("mindmap"),P(G?"已发起重新生成思维导图...":"已发起生成思维导图...");try{if((await Fe(x,{force:G})).status==="ready"){We(null),P("思维导图已更新");return}P(G?"正在重新生成思维导图...":"正在生成思维导图...")}catch(Se){P(Se instanceof Error?Se.message:"思维导图生成失败")}}}async function Is(){if(!r)return;const G=r,Se=!r.is_favorite;i({...r,is_favorite:Se,favorite_updated_at:Se?new Date().toISOString():null});try{const ve=await Ke.setVideoFavorite(r.video_id,{is_favorite:Se});i(ve),e(),P(Se?"已加入收藏":"已取消收藏")}catch(ve){i(G),P(ve instanceof Error?ve.message:"更新收藏状态失败")}}async function ss(){if(r){L(!1),T(null),P("正在创建全集总结任务...");try{const G=await Ke.createAggregateSummaryTask(r.video_id);xe(zo),await qt({forceTaskIds:[G.task_id],preferredTaskId:G.task_id,syncLibrary:!0}),P("已开始生成全集总结")}catch(G){P(G instanceof Error?G.message:"全集总结创建失败")}}}async function Oa(G){if(!r)throw new Error("当前视频信息不可用,请稍后重试。");P(Pe==="create"?G.confirm?"正在确认批量生成...":"正在创建批量生成任务...":G.confirm?"正在确认批量重生成...":"正在准备批量重生成...");const Se=Pe==="create"?await Ke.createVideoTasksBatch(r.video_id,{page_numbers:G.pageNumbers,confirm:G.confirm}):await Ke.resummarizeVideoTasksBatch(r.video_id,{page_numbers:G.pageNumbers,confirm:G.confirm});if(Se.requires_confirmation)return P(Pe==="create"?`所选内容中有 ${Se.conflict_pages.length} 个分 P 已有成功摘要,确认后会默认跳过。`:`所选内容中有 ${Se.conflict_pages.length} 个分 P 将复用已有转写重新生成摘要,请确认继续。`),Se;await qt({preferredTaskId:null,syncLibrary:!0}),Ge(!1);const ve=Se.created_tasks.length,Be=Se.skipped_pages.length;return P(Pe==="create"?ve>0?`已创建 ${ve} 个批量任务${Be?`,跳过 ${Be} 个分 P`:""}`:`没有创建新任务${Be?`,已跳过 ${Be} 个分 P`:""}`:ve>0?`已发起 ${ve} 个批量重生成任务${Be?`,跳过 ${Be} 个分 P`:""}`:`没有创建新的重生成任务${Be?`,已跳过 ${Be} 个分 P`:""}`),Se}if(!r)return c.jsx("section",{className:"grid-card empty-state-card",children:"正在加载视频详情..."});const $r=(Oe==null?void 0:Oe.source_url)||r.source_url,Hr=String(r.platform||"").toLowerCase()==="local",ml=Hr&&!!((Ha=window.desktop)!=null&&Ha.shell)&&!!$r;async function rr(){var Se;if(!((Se=window.desktop)!=null&&Se.shell)||!$r)return;const G=await window.desktop.shell.openPath($r);if(G)throw new Error(G)}async function va(G="obsidian"){if(!(!x||Q)){ee(!0),P(G==="obsidian"?"正在导出 Obsidian 笔记...":"正在导出 Markdown 笔记...");try{const Se=await Ke.exportTaskMarkdown(x,{target:G});W(Se),R(ve=>ve||Se.directory),await qt({preferredTaskId:x,forceTaskIds:[x]}),P(`已导出到 ${Se.file_name}`)}catch(Se){P(Se instanceof Error?Se.message:"导出 Markdown 失败")}finally{ee(!1)}}}async function os(){var Se;if(!((Se=window.desktop)!=null&&Se.shell)||!(H!=null&&H.directory))return;const G=await window.desktop.shell.openPath(H.directory);if(G)throw new Error(G)}return c.jsxs("section",{className:"video-detail-page",children:[c.jsx(_g,{notices:[{id:"video-detail-status",message:V}]}),(be==null?void 0:be.open)&&c.jsxs("div",{className:"jump-confirm-popover",role:"dialog","aria-modal":"true",style:{left:be.x,top:be.y,transform:"translateX(-50%)"},children:[c.jsx("div",{className:"jump-confirm-popover-arrow","aria-hidden":"true"}),c.jsxs("div",{className:"jump-confirm-popover-content",children:[c.jsxs("p",{className:"jump-confirm-popover-message",children:["跳转到 P",be.pageNumber,"「",be.title,"」?"]}),c.jsxs("div",{className:"jump-confirm-popover-actions",children:[c.jsx("button",{className:"jump-confirm-popover-cancel",onClick:is,type:"button",children:"取消"}),c.jsx("button",{className:"jump-confirm-popover-ok",onClick:Qr,type:"button",children:"跳转"})]})]})]}),c.jsxs("div",{className:"detail-page-shell",children:[c.jsx("div",{className:"detail-page-toolbar",children:c.jsxs(pi,{className:"detail-back-button",to:"/library",children:[c.jsx(UI,{className:"detail-back-icon"}),"返回视频库"]})}),c.jsxs("article",{className:`video-detail-hero ${Ue.total>0?"has-page-batch":"is-single-page"}`,children:[c.jsx("div",{className:"video-detail-media",children:ml?c.jsxs("button",{className:"video-detail-cover video-detail-cover-button",type:"button",onClick:()=>void rr().catch(G=>{P(G instanceof Error?G.message:"打开本地视频失败")}),children:[Oe!=null&&Oe.cover_url||r.cover_url?c.jsx("img",{src:(Oe==null?void 0:Oe.cover_url)||r.cover_url,alt:Oe?`P${Oe.page} ${r.title}`:r.title,loading:"lazy"}):c.jsx("div",{className:"video-detail-cover-placeholder",children:"VIDEO"}),c.jsx("div",{className:"video-detail-cover-overlay",children:c.jsx(e6,{className:"video-detail-play-icon"})}),c.jsx("div",{className:"detail-duration-badge",children:mi((Oe==null?void 0:Oe.duration)??r.duration)})]}):Hr?c.jsxs("div",{className:"video-detail-cover",children:[Oe!=null&&Oe.cover_url||r.cover_url?c.jsx("img",{src:(Oe==null?void 0:Oe.cover_url)||r.cover_url,alt:Oe?`P${Oe.page} ${r.title}`:r.title,loading:"lazy"}):c.jsx("div",{className:"video-detail-cover-placeholder",children:"VIDEO"}),c.jsx("div",{className:"detail-duration-badge",children:mi((Oe==null?void 0:Oe.duration)??r.duration)})]}):c.jsxs("a",{className:"video-detail-cover",href:$r,target:"_blank",rel:"noreferrer",children:[Oe!=null&&Oe.cover_url||r.cover_url?c.jsx("img",{src:(Oe==null?void 0:Oe.cover_url)||r.cover_url,alt:Oe?`P${Oe.page} ${r.title}`:r.title,loading:"lazy"}):c.jsx("div",{className:"video-detail-cover-placeholder",children:"VIDEO"}),c.jsx("div",{className:"video-detail-cover-overlay",children:c.jsx(e6,{className:"video-detail-play-icon"})}),c.jsx("div",{className:"detail-duration-badge",children:mi((Oe==null?void 0:Oe.duration)??r.duration)})]})}),c.jsxs("div",{className:"video-detail-copy",children:[c.jsxs("div",{className:"video-detail-copy-main",children:[c.jsxs("div",{className:"detail-hero-meta-row",children:[c.jsx("span",{className:`detail-status-badge ${Gl(Br)}`,children:Pa(Br)}),c.jsx("span",{className:"detail-hero-meta-time",children:hi(r.updated_at)}),Ue.total>0?c.jsxs("span",{className:"detail-hero-meta-time",children:["共 ",Ue.total," P"]}):null]}),c.jsx("h2",{className:"video-detail-title",children:r.title}),Rt.length?c.jsxs("div",{className:`detail-page-switcher ${O?"is-open":""}`,ref:st,children:[c.jsx("span",{className:"detail-page-switcher-label",children:"当前内容"}),c.jsxs("button",{className:"detail-page-select",type:"button","aria-haspopup":"listbox","aria-expanded":O,onClick:()=>Z(G=>!G),children:[c.jsxs("span",{className:"detail-page-select-value",children:[ft?"全集总结":(Oe==null?void 0:Oe.title)||"选择分 P",Oe&&Le.get(Oe.page)?c.jsx("span",{className:"detail-page-select-check",children:"✓"}):null,ft&&_e.some(G=>G.status==="completed")?c.jsx("span",{className:"detail-page-select-check",children:"✓"}):null]}),c.jsx(Ms,{className:"detail-page-select-caret"})]}),O?c.jsx("div",{className:"detail-page-menu",children:c.jsxs("div",{className:"detail-page-menu-scroll",role:"listbox","aria-label":"选择当前分 P",children:[en?c.jsxs("button",{className:`detail-page-option ${ft?"is-selected":""}`,role:"option","aria-selected":ft,type:"button",onClick:()=>{xe(zo),Z(!1)},children:[c.jsx("span",{className:`detail-page-option-check ${ft?"is-selected":""}`,children:ft?"✓":""}),c.jsxs("span",{className:"detail-page-option-copy",children:[c.jsx("strong",{children:"全集总结"}),_e.length?c.jsxs("small",{children:["已有 ",_e.length," 个版本"]}):c.jsx("small",{children:"可基于已完成分 P 生成"})]})]}):null,Rt.map(G=>{const Se=G.page===Kt,ve=Le.get(G.page);return c.jsxs("button",{className:`detail-page-option ${Se?"is-selected":""}`,type:"button",role:"option","aria-selected":Se,onClick:()=>{xe(G.page),Z(!1)},children:[c.jsx("span",{className:`detail-page-option-check ${Se?"is-selected":""}`,children:Se?"✓":""}),c.jsxs("span",{className:"detail-page-option-copy",children:[c.jsx("strong",{children:G.title}),ve?c.jsx("small",{children:"已生成摘要"}):c.jsx("small",{children:"尚未生成"})]})]},G.page)})]})}):null]}):null]}),c.jsxs("div",{className:"detail-task-float",ref:ke,children:[c.jsxs("div",{className:`detail-hero-capsule ${Gl(Br)} ${N==="expanded"?"is-expanded":""}`,children:[c.jsx("div",{className:"detail-hero-capsule-grid",children:fl.map(G=>c.jsxs("div",{className:"detail-hero-capsule-item",children:[c.jsx("span",{className:"detail-hero-stat-label",children:G.label}),c.jsx("div",{className:"detail-hero-stat-value",children:c.jsx("strong",{className:G.mono?"detail-hero-stat-mono":"",children:G.value})})]},G.id))}),c.jsxs("div",{className:"detail-hero-actions",children:[c.jsx("button",{"aria-label":r.is_favorite?"取消收藏":"收藏视频",className:`detail-action-button secondary detail-action-button-compact detail-action-button-favorite ${r.is_favorite?"is-active":""}`,title:r.is_favorite?"取消收藏":"收藏视频",type:"button",onClick:()=>void Is(),children:c.jsx(TI,{className:"detail-action-icon"})}),c.jsxs("div",{className:"detail-action-menu",ref:et,children:[c.jsxs("button",{"aria-label":"更多操作","aria-expanded":E,"aria-haspopup":"menu",className:`detail-action-button secondary detail-action-button-compact detail-action-menu-trigger ${E?"is-open":""}`,title:"更多操作",type:"button",onClick:()=>{L(G=>{const Se=!G;return Se||T(null),Se})},children:[c.jsx(FI,{className:"detail-action-icon"}),c.jsx(Ms,{className:"detail-action-caret"})]}),E?c.jsxs("div",{className:"detail-action-popover",role:"menu","aria-label":"视频操作设置",children:[c.jsxs("button",{className:`detail-action-menu-item detail-action-menu-group ${D==="regenerate"?"is-open":""}`,role:"menuitem",type:"button",onClick:()=>T(G=>G==="regenerate"?null:"regenerate"),children:[c.jsx("span",{className:"detail-action-menu-item-icon","aria-hidden":"true",children:c.jsx(I1,{className:"detail-action-icon"})}),c.jsx("span",{className:"detail-action-menu-copy",children:c.jsx("strong",{children:"重新生成"})}),c.jsx(Ms,{className:"detail-action-caret"})]}),c.jsxs("div",{className:`detail-action-submenu ${D==="regenerate"?"is-open":""}`,role:"group","aria-label":"重新生成操作","aria-hidden":D!=="regenerate",children:[c.jsxs("button",{className:"detail-action-subitem",role:"menuitem",type:"button",tabIndex:D==="regenerate"?0:-1,disabled:!dl,onClick:async()=>{L(!1),T(null),P("正在基于当前版本重新生成摘要..."),await Ke.resummarizeVideoTask(r.video_id,{task_id:je.current,page_number:Kt}),await qt({preferredTaskId:null,syncLibrary:!0}),P("已开始新的摘要生成任务")},children:[c.jsx(I1,{className:"detail-action-icon"}),c.jsx("span",{children:"仅重跑摘要"})]}),c.jsxs("button",{className:"detail-action-subitem",role:"menuitem",type:"button",tabIndex:D==="regenerate"?0:-1,disabled:!x||Cr!=="completed"||!!(x&&le[x]),onClick:async()=>{L(!1),T(null),await Ba(!0)},children:[c.jsx($w,{className:"detail-action-icon"}),c.jsx("span",{children:"重跑思维导图"})]}),c.jsxs("button",{className:"detail-action-subitem",role:"menuitem",type:"button",tabIndex:D==="regenerate"?0:-1,disabled:ft,onClick:async()=>{L(!1),T(null),P("正在重新转写并生成摘要..."),await Ke.createVideoTask(r.video_id,{page_number:Kt}),await qt({preferredTaskId:null,syncLibrary:!0}),P("已开始新的转写摘要任务")},children:[c.jsx(P1,{className:"detail-action-icon"}),c.jsx("span",{children:"重新转写并生成"})]})]}),c.jsxs("button",{className:`detail-action-menu-item detail-action-menu-group ${D==="batch"?"is-open":""}`,role:"menuitem",type:"button",disabled:Ye.length===0,onClick:()=>T(G=>G==="batch"?null:"batch"),children:[c.jsx("span",{className:"detail-action-menu-item-icon","aria-hidden":"true",children:c.jsx(P1,{className:"detail-action-icon"})}),c.jsx("span",{className:"detail-action-menu-copy",children:c.jsx("strong",{children:"批量处理"})}),c.jsx(Ms,{className:"detail-action-caret"})]}),c.jsxs("div",{className:`detail-action-submenu ${D==="batch"?"is-open":""}`,role:"group","aria-label":"批量处理操作","aria-hidden":D!=="batch",children:[c.jsxs("button",{className:"detail-action-subitem",role:"menuitem",type:"button",tabIndex:D==="batch"?0:-1,onClick:()=>{L(!1),T(null),$e("create"),Ge(!0)},children:[c.jsx(P1,{className:"detail-action-icon"}),c.jsx("span",{children:"批量生成摘要"})]}),c.jsxs("button",{className:"detail-action-subitem",role:"menuitem",type:"button",tabIndex:D==="batch"?0:-1,onClick:()=>{L(!1),T(null),$e("resummary"),Ge(!0)},children:[c.jsx(I1,{className:"detail-action-icon"}),c.jsx("span",{children:"批量重生成摘要"})]}),c.jsxs("button",{className:"detail-action-subitem",role:"menuitem",type:"button",tabIndex:D==="batch"?0:-1,disabled:!dt,onClick:()=>void ss(),children:[c.jsx(Qg,{className:"detail-action-icon"}),c.jsx("span",{children:"生成全集总结"})]})]}),c.jsxs("button",{className:`detail-action-menu-item detail-action-menu-group ${D==="maintenance"?"is-open":""}`,role:"menuitem",type:"button",onClick:()=>T(G=>G==="maintenance"?null:"maintenance"),children:[c.jsx("span",{className:"detail-action-menu-item-icon","aria-hidden":"true",children:c.jsx(t6,{className:"detail-action-icon"})}),c.jsx("span",{className:"detail-action-menu-copy",children:c.jsx("strong",{children:"更多维护"})}),c.jsx(Ms,{className:"detail-action-caret"})]}),c.jsx("div",{className:`detail-action-submenu ${D==="maintenance"?"is-open":""}`,role:"group","aria-label":"维护操作","aria-hidden":D!=="maintenance",children:c.jsxs("button",{className:"detail-action-subitem",role:"menuitem",type:"button",tabIndex:D==="maintenance"?0:-1,onClick:async()=>{L(!1),T(null),P("正在刷新视频信息..."),await Ke.probeVideo({url:r.source_url,force_refresh:!0}),await qt({preferredTaskId:je.current,syncLibrary:!0}),P("视频信息已刷新")},children:[c.jsx(t6,{className:"detail-action-icon"}),c.jsx("span",{children:"刷新视频信息"})]})})]}):null]}),c.jsx("button",{"aria-label":"从视频库删除",className:"detail-action-button danger detail-action-button-compact",title:"从视频库删除",type:"button",onClick:async()=>{window.confirm("确定要从视频库删除这个视频吗?")&&(await Ke.deleteVideo(r.video_id),e(),n("/library"))},children:c.jsx(PI,{className:"detail-action-icon"})})]})]}),N==="expanded"?c.jsxs("section",{className:"grid-card detail-task-panel",role:"dialog","aria-label":"任务进度与历史",onClick:G=>G.stopPropagation(),children:[c.jsxs("div",{className:"detail-task-panel-header",children:[c.jsx("div",{className:"panel-header",children:c.jsx("h2",{children:"任务进度与历史"})}),c.jsx("button",{className:"secondary-button",type:"button",onClick:()=>_("collapsed"),children:"关闭"})]}),c.jsxs("div",{className:"detail-task-panel-body",children:[c.jsxs("article",{className:"detail-task-panel-card detail-task-panel-card-live",children:[c.jsxs("div",{className:"detail-task-section-head",children:[c.jsxs("div",{className:"detail-task-section-copy",children:[c.jsx("span",{className:"detail-task-section-kicker",children:"实时运行"}),c.jsx("h3",{children:"运行中任务"})]}),Wa?c.jsxs("span",{className:"task-history-id",children:["任务 ",Wa]}):null]}),hn?c.jsxs("div",{className:"detail-task-live-grid",children:[c.jsxs("div",{className:"detail-task-live-progress",children:[c.jsxs("div",{className:"progress-bar-wrapper",children:[c.jsx("div",{className:"progress-bar-simple",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(mn.progress),"aria-label":"最新任务进度",children:c.jsx("div",{className:`progress-fill-simple ${mn.hasError?"error":mn.isCompleted?"success":""}`,style:{width:`${mn.progress}%`}})}),c.jsxs("div",{className:"progress-info-simple",children:[c.jsxs("span",{className:"progress-percent-simple",children:[Math.round(mn.progress),"%"]}),c.jsx("span",{className:"progress-status-simple",children:ul})]})]}),er?c.jsxs("div",{className:"detail-error-banner",role:"status",children:[c.jsx("strong",{children:"运行详情同步失败"}),c.jsx("span",{children:er})]}):null,mn.filtered.length?c.jsxs("details",{className:"progress-stage-card",children:[c.jsxs("summary",{children:[c.jsxs("div",{children:[c.jsx("strong",{children:Gu((ai=mn.currentEvent)==null?void 0:ai.stage)}),c.jsxs("span",{children:[mn.filtered.length," 条进度记录"]})]}),c.jsx("span",{className:"progress-stage-toggle",children:"查看记录"})]}),c.jsx("div",{className:"progress-stage-list",children:mn.filtered.map(G=>c.jsxs("article",{className:`progress-event-card ${qv(G.stage)}`,children:[c.jsx("div",{className:"progress-event-index",children:Gu(G.stage)}),c.jsxs("div",{className:"progress-event-copy",children:[c.jsxs("div",{className:"progress-event-topline",children:[c.jsx("strong",{children:G.message}),c.jsx("span",{children:hi(G.created_at)})]}),c.jsxs("div",{className:"progress-event-meta",children:["阶段进度 ",G.progress,"%"]})]})]},G.event_id))})]}):an?c.jsx("div",{className:"detail-inline-note detail-inline-note-pending",role:"status",children:"正在同步该任务的实时进度。"}):c.jsx("div",{className:"empty-placeholder",children:"当前任务还没有生成进度记录。"})]}),c.jsxs("section",{className:"detail-task-snapshot detail-task-snapshot-emphasis",children:[c.jsxs("div",{className:"detail-task-snapshot-head",children:[c.jsxs("div",{className:"detail-task-snapshot-copy",children:[c.jsx("span",{className:"detail-task-snapshot-kicker",children:"当前任务概览"}),c.jsx("strong",{children:Ja}),c.jsx("small",{children:Wa?`任务 ${Wa}`:"任务信息加载中"})]}),c.jsx("span",{className:`helper-chip ${Gl(Br)}`,children:Pa(Br)})]}),c.jsx("div",{className:"detail-task-snapshot-grid",children:La.map(G=>c.jsxs("div",{className:"detail-snapshot-metric",children:[c.jsx("span",{children:G.label}),c.jsx("strong",{children:G.value})]},G.label))})]})]}):c.jsx("div",{className:"empty-placeholder",children:"当前分 P 还没有处理任务。"})]}),c.jsxs("div",{className:"detail-task-panel-grid",children:[c.jsxs("article",{className:"detail-task-panel-card detail-task-panel-card-history",children:[c.jsxs("div",{className:"detail-task-section-head",children:[c.jsxs("div",{className:"detail-task-section-copy",children:[c.jsx("span",{className:"detail-task-section-kicker",children:"版本列表"}),c.jsx("h3",{children:"内容版本"})]}),c.jsx("span",{className:"detail-task-section-count",children:Ln.length})]}),Ln.length?c.jsx("div",{className:"detail-history-list",children:Ln.map(G=>{const Se=G.task_id===x,ve=G.task_id===kt;return c.jsx("article",{className:`detail-history-item ${Se?"active":""}`,children:c.jsxs("button",{"aria-pressed":Se,className:"detail-history-trigger",type:"button",onClick:()=>jt(G.task_id),children:[c.jsxs("div",{className:"detail-history-main",children:[c.jsxs("div",{className:"detail-history-topline",children:[c.jsx("span",{className:`task-status ${Gl(G.status)}`,children:Pa(G.status)}),ve?c.jsx("span",{className:"helper-chip",children:"最新任务"}):null,Se?c.jsx("span",{className:"helper-chip status-success",children:"当前查看"}):null,I3(G)?c.jsx("span",{className:"helper-chip",children:I3(G)}):null]}),c.jsx("strong",{children:G.title||r.title}),c.jsx("small",{children:hi(G.created_at)})]}),c.jsx("div",{className:"detail-history-side",children:c.jsx("span",{className:"task-history-id",children:G.task_id.slice(0,8)})})]})},G.task_id)})}):c.jsx("div",{className:"empty-placeholder",children:"当前分 P 还没有可切换的内容版本。"})]}),c.jsxs("article",{className:"detail-task-panel-card detail-task-panel-card-selected",children:[c.jsxs("div",{className:"detail-task-section-head",children:[c.jsxs("div",{className:"detail-task-section-copy",children:[c.jsx("span",{className:"detail-task-section-kicker",children:"当前查看"}),c.jsx("h3",{children:"查看中的内容版本"})]}),Bt?c.jsx("span",{className:`helper-chip ${Jn?"status-success":"status-pending"}`,children:Jn?"最新版本":"历史版本"}):null]}),Bt?c.jsxs(c.Fragment,{children:[c.jsxs("section",{className:`detail-history-detail ${Jn?"detail-history-detail-live":""}`,children:[c.jsxs("div",{className:"detail-history-detail-head",children:[c.jsxs("div",{className:"detail-history-topline",children:[c.jsx("span",{className:`task-status ${Gl(Bt.status)}`,children:Pa(Bt.status)}),Bt.task_id===kt?c.jsx("span",{className:"helper-chip",children:"最新任务"}):null,c.jsx("span",{className:"helper-chip status-success",children:"当前查看"})]}),c.jsx("span",{className:"task-history-id",children:Bt.task_id.slice(0,8)})]}),c.jsxs("div",{className:"detail-history-detail-copy",children:[c.jsx("strong",{children:Bt.title||r.title}),c.jsx("small",{children:hi(Bt.created_at)})]}),c.jsx("div",{className:"detail-history-metrics",children:ga.map(G=>c.jsxs("div",{className:"detail-snapshot-metric detail-history-metric",children:[c.jsx("span",{children:G.label}),c.jsx("strong",{children:G.value})]},G.label))})]}),un?c.jsx("div",{className:"detail-inline-note detail-inline-note-pending",role:"status",children:"正在加载该版本的详细内容,下方工作台会在同步后切换。"}):null,$n?c.jsxs("div",{className:"detail-error-banner",role:"status",children:[c.jsx("strong",{children:"版本详情加载失败"}),c.jsx("span",{children:Zi($n)})]}):null,tt!=null&&tt.error_message?c.jsxs("div",{className:"detail-error-banner",role:"status",children:[c.jsx("strong",{children:"任务错误"}),c.jsx("span",{children:Zi(tt.error_message)})]}):null,!un&&!$n?c.jsx("div",{className:"detail-inline-note",role:"status",children:tt!=null&&tt.result?"该版本的结果已同步到下方工作台。":"该版本还没有可用结果,下方工作台会展示对应状态。"}):null,c.jsx("div",{className:"detail-history-actions",children:c.jsx("button",{className:"tertiary-button danger",type:"button",onClick:async()=>{window.confirm("确定要删除这条任务记录吗?")&&(rt.current.delete(Bt.task_id),gt.current.delete(Bt.task_id),f(G=>Vl(G,Bt.task_id)),y(G=>Vl(G,Bt.task_id)),g(G=>Vl(G,Bt.task_id)),await Ke.deleteTask(Bt.task_id),await qt({preferredTaskId:Bt.task_id===je.current?null:je.current,syncLibrary:!0}))},children:"删除任务"})})]}):c.jsx("div",{className:"empty-placeholder",children:"选择一个任务版本后,这里会显示该版本的元信息与可用状态。"})]})]})]})]}):null]})]}),Ue.total>0?c.jsxs("div",{className:"detail-batch-side","aria-label":"批量任务统计",ref:Nt,children:[c.jsx("div",{className:"progress-bar-simple detail-batch-progress",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":gr,"aria-label":"批量完成进度",children:c.jsx("div",{className:"progress-fill-simple success",style:{width:`${gr}%`}})}),c.jsxs("div",{className:"detail-batch-inline-meta",children:[c.jsxs("div",{className:"detail-batch-inline-copy",children:[c.jsxs("span",{children:[An," / ",Ue.total]}),c.jsxs("small",{children:["进行中 ",Ue.inProgress," · 未开始 ",Ue.notStarted,Ue.failed?` · 失败 ${Ue.failed}`:""]})]}),c.jsxs("button",{className:"detail-inline-toggle detail-batch-toggle",type:"button","aria-expanded":N==="expanded",onMouseDown:G=>G.stopPropagation(),onClick:G=>{G.stopPropagation(),_(Se=>Se==="expanded"?"collapsed":"expanded")},children:[c.jsx("span",{children:N==="expanded"?"收起":"详情"}),c.jsx(Ms,{className:"detail-task-toggle-icon"})]})]})]}):null]}),c.jsx("section",{className:"video-detail-main",children:c.jsxs("article",{className:"detail-workspace-card",children:[c.jsxs("div",{className:"detail-workspace-header",children:[c.jsx("h3",{className:"detail-workspace-label",children:"Knowledge Workspace"}),c.jsxs("div",{className:"detail-workspace-meta",children:[c.jsxs("span",{className:`detail-workspace-signal ${ur?Gl(Cr):"status-success"}`,children:[c.jsx("span",{className:"detail-workspace-signal-dot"}),ya]}),jn?c.jsxs("span",{children:["任务 ",jn]}):null,cl!=null?c.jsxs("span",{children:[N6(cl)," tokens"]}):null]})]}),c.jsx("nav",{className:"detail-tab-row",role:"tablist","aria-label":"详情工作台视图",children:MI.map(G=>c.jsxs("button",{className:`detail-tab ${k===G.id?"active":""}`,role:"tab",type:"button","aria-selected":k===G.id,onClick:()=>j(G.id),children:[c.jsxs("div",{className:"detail-tab-topline",children:[c.jsx(qI,{active:k===G.id,tab:G.id}),c.jsx("span",{children:G.label})]}),c.jsx("small",{children:G.description})]},G.id))}),k==="knowledge"?ur?c.jsx(J3,{state:ur}):c.jsxs("section",{className:"detail-tab-panel detail-export-target",ref:ct,children:[c.jsxs("div",{className:"detail-knowledge-lead",children:[c.jsxs("section",{className:"detail-content-section detail-content-section-overview",children:[c.jsxs("div",{className:"detail-section-heading",children:[c.jsxs("div",{className:"detail-section-heading-main",children:[c.jsx("h3",{className:"detail-section-label",children:"Overview"}),Nn!=null&&Nn.meta?c.jsx("span",{className:"detail-section-meta",children:Nn.meta}):null]}),c.jsx("button",{className:"detail-section-icon-button",type:"button",onClick:ol,disabled:Y,"aria-label":Y?"正在导出知识卡片图片":"复制当前知识卡片为图片",title:Y?"正在导出知识卡片图片":"复制当前知识卡片为图片",children:c.jsx(XI,{})})]}),c.jsx("h4",{className:"detail-section-title",children:(Nn==null?void 0:Nn.title)||"核心概览"}),Nn!=null&&Nn.content?c.jsx(Ji,{className:"detail-section-body markdown-content-body",compact:!0,content:Nn.content}):c.jsx("p",{className:"detail-section-body",children:"当前任务还没有生成核心概览。"}),qn?c.jsxs("div",{className:"detail-overview-player",ref:kn,children:[c.jsxs("div",{className:"detail-section-heading",children:[c.jsx("h3",{className:"detail-section-label",children:"Player"}),c.jsx("span",{className:"detail-section-meta detail-section-link",children:"本地视频播放器"})]}),c.jsxs("div",{className:"detail-video-embed-frame",children:[c.jsx("video",{ref:Ht,className:"detail-video-embed detail-local-video",controls:!0,preload:"metadata",src:qn,poster:(Oe==null?void 0:Oe.cover_url)||r.cover_url||void 0}),c.jsx("div",{className:"detail-video-export-mask","aria-hidden":"true",children:Oe!=null&&Oe.cover_url||r.cover_url?c.jsx("img",{className:"detail-video-export-cover",src:(Oe==null?void 0:Oe.cover_url)||r.cover_url,alt:""}):c.jsxs("div",{className:"detail-video-export-mask-copy",children:[c.jsx("strong",{children:r.title}),c.jsx("span",{children:"导出知识卡片时会保留当前视频封面,不直接导出播放器画面。"})]})})]})]}):yr&&Cn?c.jsxs("div",{className:"detail-overview-player",ref:kn,children:[c.jsxs("div",{className:"detail-section-heading",children:[c.jsx("h3",{className:"detail-section-label",children:"Player"}),c.jsx("a",{className:"detail-section-meta detail-section-link",href:Cn.sourceUrl,target:"_blank",rel:"noreferrer",children:Cn.openLabel})]}),c.jsxs("div",{className:"detail-video-embed-frame",children:[c.jsx("iframe",{allow:"accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; fullscreen",allowFullScreen:!0,className:"detail-video-embed",referrerPolicy:"strict-origin-when-cross-origin",scrolling:"no",src:yr,title:`${r.title} 播放器`}),c.jsx("div",{className:"detail-video-export-mask","aria-hidden":"true",children:Oe!=null&&Oe.cover_url||r.cover_url?c.jsx("img",{className:"detail-video-export-cover",src:(Oe==null?void 0:Oe.cover_url)||r.cover_url,alt:""}):c.jsxs("div",{className:"detail-video-export-mask-copy",children:[c.jsx("strong",{children:r.title}),c.jsx("span",{children:"播放器画面无法直接导出,已保留当前卡片内容与视频入口。"})]})})]})]}):null]}),c.jsxs("section",{className:"detail-content-section detail-content-section-keypoints",children:[c.jsxs("div",{className:"detail-section-heading",children:[c.jsx("h3",{className:"detail-section-label",children:"Key Points"}),c.jsxs("span",{className:"detail-section-meta",children:[Rr.length," 条"]})]}),Rr.length?c.jsx("div",{className:"detail-point-rail",children:Rr.map((G,Se)=>c.jsx(W3,{card:G,index:Se},G.id))}):c.jsx("div",{className:"empty-placeholder",children:"当前任务还没有生成关键要点卡。"})]})]}),c.jsxs("section",{className:"detail-content-section detail-content-section-last",children:[c.jsxs("div",{className:"detail-section-heading",children:[c.jsx("h3",{className:"detail-section-label",children:"Chapters"}),c.jsxs("div",{className:"detail-section-heading-actions",children:[Hn.length?c.jsx("button",{className:"detail-section-text-action",type:"button",onClick:ls,children:Qa?"一键收起":"一键展开"}):null,c.jsxs("span",{className:"detail-section-meta",children:[cn.length," 条"]})]})]}),Hn.length?c.jsx("div",{className:"detail-chapter-groups",children:Hn.map(G=>{const Se=B.includes(G.id);return c.jsxs("div",{className:`detail-chapter-group ${Se?"is-open":""}`,children:[c.jsxs("button",{className:"detail-chapter-group-summary",type:"button","aria-expanded":Se,onClick:()=>ei(G.id,!Se),children:[c.jsxs("div",{className:"detail-chapter-group-copy",children:[c.jsx("strong",{children:G.title}),c.jsx("span",{children:G.meta})]}),c.jsx("span",{className:"detail-chapter-group-caret","aria-hidden":"true",children:c.jsx(Ms,{})})]}),c.jsx("div",{className:"detail-chapter-group-content",children:c.jsx("div",{className:"detail-chapter-group-body",children:G.items.map((ve,Be)=>c.jsx(W3,{card:ve,index:Be,onJumpToPage:ft?ht:void 0,onSeekToTimestamp:!ft&&Ra?as:void 0},ve.id))})})]},G.id)})}):c.jsx("div",{className:"empty-placeholder",children:"当前任务还没有生成章节知识卡。"})]})]}):null,k==="summary"?ur?c.jsx(J3,{state:ur}):c.jsxs("section",{className:"detail-tab-panel",children:[c.jsxs("section",{className:"detail-content-section",children:[c.jsxs("div",{className:"detail-section-heading",children:[c.jsx("h3",{className:"detail-section-label",children:"Knowledge Note"}),c.jsxs("div",{className:"detail-section-heading-actions",children:[c.jsx("span",{className:"detail-section-meta",children:"完整学习视图"}),c.jsx("button",{className:"detail-section-icon-button",type:"button",disabled:!Zr||Q||!ne,onClick:()=>void va("obsidian"),"aria-label":Q?"正在导出 Obsidian 笔记":"导出到 Obsidian",title:Q?"正在导出 Obsidian 笔记":"导出到 Obsidian",children:c.jsx(GI,{})}),H!=null&&H.directory&&((yl=window.desktop)!=null&&yl.shell)?c.jsx("button",{className:"detail-section-icon-button",type:"button",onClick:()=>void os().catch(G=>{P(G instanceof Error?G.message:"打开导出目录失败")}),"aria-label":"打开导出目录",title:"打开导出目录",children:c.jsx(YI,{})}):null]})]}),c.jsx("h4",{className:"detail-section-title",children:"知识笔记"}),ne?null:c.jsx("p",{className:"detail-section-body",children:"导出前请先在设置中填写输出目录,Markdown / Obsidian 笔记会写入该目录。"}),pr?c.jsx(Ji,{className:"detail-note-markdown",content:pr}):c.jsx("p",{className:"detail-section-body",children:"当前任务还没有生成知识笔记。"})]}),c.jsxs("section",{className:"detail-content-section",children:[c.jsxs("div",{className:"detail-section-heading",children:[c.jsx("h3",{className:"detail-section-label",children:"Transcript"}),c.jsx("span",{className:"detail-section-meta",children:Da?"原始转写":"暂无内容"})]}),c.jsx("pre",{className:"transcript-full",children:Da||"暂无转写全文。"})]})]}):null,k==="mindmap"?c.jsx("section",{className:"detail-tab-panel",children:c.jsxs("section",{className:"detail-content-section detail-content-section-last",children:[c.jsxs("div",{className:"detail-section-heading",children:[c.jsx("h3",{className:"detail-section-label",children:"Mind Map"}),c.jsx("div",{className:"detail-section-heading-actions",children:c.jsx("span",{className:"detail-section-meta",children:hl})})]}),vr?c.jsxs("div",{className:"detail-mindmap-workspace",children:[c.jsx("div",{className:"detail-mindmap-canvas",role:"tree","aria-label":"思维导图",children:c.jsx("div",{className:"detail-mindmap-flow-shell",children:c.jsx(xw,{nodes:Mi.nodes,edges:Mi.edges,fitView:!0,fitViewOptions:{padding:.24},minZoom:.38,maxZoom:1.6,nodeTypes:$I,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!0,proOptions:{hideAttribution:!0},onNodeClick:(G,Se)=>We(Se.id),onPaneClick:()=>We(null),children:c.jsx(Kq,{showInteractive:!1})},`${vr.root}-${vr.nodes.length}`)})}),c.jsx("div",{className:"detail-mindmap-inspector",children:Un?c.jsxs("article",{className:"detail-mindmap-inspector-card",children:[c.jsxs("div",{className:"detail-mindmap-inspector-head",children:[c.jsxs("div",{children:[c.jsx("span",{className:"detail-mindmap-inspector-kicker",children:DI(Un.type)}),c.jsx("h4",{children:j6(Un.label,Un.summary)})]}),ft&&As(Un.time_anchor)?c.jsxs("button",{className:"detail-mindmap-seek-button",type:"button","data-jump-anchor":!0,onClick:G=>ht(G,Math.round(Un.time_anchor??0)),children:[c.jsx($p,{className:"detail-mindmap-seek-icon"}),"查看 P",Math.round(Un.time_anchor??0)," 总结"]}):As(Un.time_anchor)&&Ra?c.jsxs("button",{className:"detail-mindmap-seek-button",type:"button",onClick:()=>as(Un.time_anchor??null),children:[c.jsx($p,{className:"detail-mindmap-seek-icon"}),"定位到片段 ",mi(Un.time_anchor)]}):null]}),Un.summary?c.jsx(Ji,{className:"detail-mindmap-summary-markdown",compact:!0,content:Un.summary}):null,Un.source_chapter_titles.length?c.jsx("div",{className:"detail-mindmap-inspector-tags",children:Un.source_chapter_titles.slice(0,3).map((G,Se)=>{const ve=Un.source_chapter_starts[Se]??null,Be=ft&&As(ve),I=!ft&&As(ve)&&Ra,me=Be?`P${Math.round(ve)}`:As(ve)?mi(ve):"",Ae=`${G}${me?` · ${me}`:""}`;return Be||I?c.jsx("button",{className:"detail-mindmap-inspector-tag is-action",type:"button",onClick:ot=>Be?ht(ot,Math.round(ve)):as(ve),children:Ae},`${G}-${Se}`):c.jsx("span",{className:"detail-mindmap-inspector-tag",children:Ae},`${G}-${Se}`)})}):null]}):c.jsxs("div",{className:"detail-mindmap-inspector-hint",children:[c.jsx("strong",{children:"点击节点查看摘要与来源片段"}),c.jsx("span",{children:"主干只保留结构和标签,避免把导图重新变成一块块内容卡片。"})]})})]}):Rn?c.jsxs("article",{className:`detail-mindmap-placeholder tone-${Rn.tone}`,children:[c.jsxs("div",{className:"detail-mindmap-copy",children:[c.jsx("h4",{className:"detail-section-title",children:Rn.title}),c.jsx("p",{className:"detail-section-body",children:Rn.description}),nr?c.jsxs("div",{className:"detail-mindmap-progress",children:[c.jsxs("div",{className:"progress-bar-wrapper",children:[c.jsx("div",{className:"progress-bar-simple",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":nr.progress,"aria-label":"思维导图生成进度",children:c.jsx("div",{className:`progress-fill-simple ${nr.hasError?"error":nr.progress>=100?"success":""}`,style:{width:`${nr.progress}%`}})}),c.jsxs("div",{className:"progress-info-simple",children:[c.jsxs("span",{className:"progress-percent-simple",children:[nr.progress,"%"]}),c.jsx("span",{className:"progress-status-simple",children:nr.message})]})]}),nr.events.length?c.jsxs("details",{className:"progress-stage-card",children:[c.jsxs("summary",{children:[c.jsx("strong",{children:nr.currentLabel}),c.jsx("span",{className:"progress-stage-toggle",children:"查看导图进度"})]}),c.jsx("div",{className:"progress-stage-list",children:nr.events.map(G=>c.jsxs("article",{className:`progress-event-card ${qv(G.stage)}`,children:[c.jsx("div",{className:"progress-event-index",children:Gu(G.stage)}),c.jsxs("div",{className:"progress-event-copy",children:[c.jsxs("div",{className:"progress-event-topline",children:[c.jsx("strong",{children:G.message}),c.jsx("time",{children:hi(G.created_at)})]}),c.jsxs("div",{className:"progress-event-meta",children:["阶段进度 ",G.progress,"%"]})]})]},G.event_id))})]}):null]}):null]}),Rn.actionLabel?c.jsx("button",{className:"secondary-button",type:"button",disabled:!Rn.actionEnabled||!!(x&&le[x]),"aria-disabled":!Rn.actionEnabled||!!(x&&le[x]),onClick:()=>Ba(Rn.tone==="failed"),children:x&&le[x]?"处理中...":Rn.actionLabel}):null]}):null]})}):null,c.jsx(C6,{isOpen:Ce,mode:Pe,video:r,pages:Ye,onClose:()=>Ge(!1),onSubmit:Oa}),(k==="summary"||k==="mindmap")&&(qn||yr&&Cn)?c.jsx(HI,{embedUrl:yr,localVideoUrl:qn,openLabel:Cn==null?void 0:Cn.openLabel,sourceUrl:Cn==null?void 0:Cn.sourceUrl,seekTarget:qe,title:r.title}):null]})})]})]})}function W3({card:e,index:t,onJumpToPage:n,onSeekToTimestamp:r}){if(e.kind==="chapter"){const i=typeof e.timestampSeconds=="number"&&!!r,s=typeof e.pageNumber=="number"&&!!n,o=i||s,d=c.jsxs("div",{className:"detail-chapter-node-shell",children:[c.jsx("span",{className:"detail-chapter-node-dot","aria-hidden":"true"}),c.jsx("div",{className:"detail-chapter-node-meta",children:c.jsxs("div",{className:"detail-chapter-time",children:[e.anchorLabel?c.jsx(Qg,{className:"detail-inline-icon"}):c.jsx(II,{className:"detail-inline-icon"}),c.jsx("span",{children:e.anchorLabel||(e.timestampSeconds!=null?mi(e.timestampSeconds):"--")})]})}),c.jsxs("div",{className:"detail-chapter-node-copy",children:[c.jsx("h4",{children:e.title}),c.jsx(Ji,{className:"detail-card-markdown",compact:!0,content:e.content})]}),o?c.jsxs("div",{className:"detail-card-link",children:[s?"查看分 P 总结":"定位片段",c.jsx($p,{className:"detail-inline-icon"})]}):null]});return o?c.jsx("button",{className:"detail-chapter-node detail-chapter-node-action",type:"button","data-jump-anchor":!0,onClick:f=>{if(s){n(f,e.pageNumber??null);return}r(e.timestampSeconds??null)},children:d}):c.jsx("article",{className:"detail-chapter-node",children:d})}return c.jsxs("article",{className:"detail-point-item",children:[c.jsx("div",{className:"detail-point-marker","aria-hidden":"true",children:c.jsx("span",{children:String(t+1).padStart(2,"0")})}),c.jsxs("div",{className:"detail-point-main",children:[e.title?c.jsx("div",{className:"detail-point-card-top",children:c.jsx("h4",{children:e.title})}):null,c.jsx(Ji,{className:"detail-card-markdown",compact:!0,content:e.content})]})]})}function Op(e,t){if(e.id===t)return e;for(const n of e.children){const r=Op(n,t);if(r)return r}return null}function DI(e){switch(e){case"root":return"中心主题";case"theme":return"一级主题";case"topic":return"子主题";case"leaf":return"知识点";default:return"节点"}}function zd(e,t=0){const n=t===0?132:e.type==="theme"?88:e.type==="topic"?66:56;if(!e.children.length)return n;const r=t===0?58:t===1?30:18,i=e.children.reduce((s,o)=>s+zd(o,t+1),0)+r*(e.children.length-1);return Math.max(n,i)}function wd(e,t){return e===0?112:e===1?t.type==="leaf"?78:94:t.type==="leaf"?54:68}function Dd(e){switch(e.type){case"root":return{width:252,height:112};case"theme":return{width:208,height:44};case"topic":return{width:212,height:40};case"leaf":return{width:232,height:52};default:return{width:200,height:48}}}function LI(e,t){if(!t)return null;const n=new Map,r=new Map;e.forEach(d=>{d.parentId&&(n.set(d.node.id,d.parentId),r.set(d.parentId,[...r.get(d.parentId)??[],d.node.id]))});const i=new Set([t]);let s=t;for(;n.has(s);)s=n.get(s),i.add(s);const o=[t];for(;o.length;){const d=o.pop();(r.get(d)??[]).forEach(m=>{i.has(m)||(i.add(m),o.push(m))})}return i}function RI(e){const t=[];t.push({node:e,depth:0,branch:"center",x:0,y:0,accent:CI});const n=Dd(e),r=[],i=[];let s=0,o=0;e.children.forEach((g,x)=>{const w=Y3[x%Y3.length],k=zd(g,1);if(s<=o){r.push({node:g,accent:w}),s+=k;return}i.push({node:g,accent:w}),o+=k});const d=(g,x,w,k,j,N,_)=>{if(t.push({node:g,depth:x,branch:w,x:j,y:N,parentId:_,accent:k}),!g.children.length)return;const E=x===1?30:18,L=Dd(g),D=w==="left"?j-L.width:j+L.width,T=g.children.map(V=>({child:V,span:zd(V,x+1)})),O=T.reduce((V,P)=>V+P.span,0)+E*(T.length-1);let Z=N-O/2;T.forEach(({child:V,span:P})=>{const K=Z+P/2,X=w==="left"?D-wd(x,V):D+wd(x,V);d(V,x+1,w,k,X,K,g.id),Z+=P+E})},f=(g,x)=>{if(!g.length)return;const w=58,k=g.map(_=>({..._,span:zd(_.node,1)}));let N=-(k.reduce((_,E)=>_+E.span,0)+w*(k.length-1))/2;k.forEach(({node:_,accent:E,span:L})=>{const D=N+L/2,T=x==="left"?-(n.width/2+wd(0,_)):n.width/2+wd(0,_);d(_,1,x,E,T,D,e.id),N+=L+w})};f(r,"left"),f(i,"right");const m=t.reduce((g,x)=>{const w=Dd(x.node),k=x.branch==="left"?x.x-w.width:x.branch==="right"?x.x:x.x-w.width/2,j=x.branch==="left"?x.x:x.branch==="right"?x.x+w.width:x.x+w.width/2;return{left:Math.min(g.left,k),right:Math.max(g.right,j),top:Math.min(g.top,x.y-w.height/2),bottom:Math.max(g.bottom,x.y+w.height/2)}},{left:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,top:Number.POSITIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY}),y=-((m.left+m.right)/2),p=-((m.top+m.bottom)/2);return t.map(g=>({...g,x:g.x+y,y:g.y+p}))}function BI(e,t,n="time"){const r=RI(e),i=LI(r,t),s=!!(i!=null&&i.size),o=r.map(f=>{const m=t===f.node.id,y=s?!i.has(f.node.id):!1,p=Dd(f.node),g=f.branch==="left"?{x:f.x-p.width,y:f.y-p.height/2}:f.branch==="right"?{x:f.x,y:f.y-p.height/2}:{x:f.x-p.width/2,y:f.y-p.height/2};return{id:f.node.id,type:"mindmap",position:g,draggable:!1,selectable:!0,sourcePosition:f.branch==="left"?Ze.Left:Ze.Right,targetPosition:f.branch==="left"?Ze.Right:Ze.Left,className:`${m?"is-active ":""}${y?"is-muted":""}`.trim(),data:{label:f.node.label,summary:f.node.summary,tone:f.node.type,branch:f.branch,selected:m,muted:y,timeAnchor:f.node.time_anchor??null,pageAnchorLabel:n==="page"&&As(f.node.time_anchor)?`P${Math.round(f.node.time_anchor??0)}`:void 0,sourceChapterTitles:f.node.source_chapter_titles,sourceChapterStarts:f.node.source_chapter_starts,accent:f.accent}}}),d=r.filter(f=>f.parentId).map(f=>{const m=s?!(i.has(f.node.id)&&i.has(f.parentId)):!1;return{id:`${f.parentId}-${f.node.id}`,source:f.parentId,target:f.node.id,sourceHandle:f.branch==="left"?"source-left":"source-right",targetHandle:f.branch==="left"?"target-right":"target-left",type:"simplebezier",animated:!1,className:`detail-mindmap-edge${m?" is-muted":""}`,style:{stroke:f.accent.stroke,strokeWidth:f.depth<=1?2.8:2.2}}});return{nodes:o,edges:d}}function OI({data:e}){const t={"--mindmap-branch":e.accent.stroke,"--mindmap-branch-soft":e.accent.surface,"--mindmap-branch-ink":e.accent.ink,"--mindmap-branch-shadow":e.accent.shadow},n=j6(e.label,e.summary);return c.jsxs("div",{className:`detail-mindmap-node-card tone-${e.tone}`,style:t,children:[e.tone==="root"?c.jsxs(c.Fragment,{children:[c.jsx(fi,{className:"detail-mindmap-handle",id:"source-left",position:Ze.Left,type:"source"}),c.jsx(fi,{className:"detail-mindmap-handle",id:"source-right",position:Ze.Right,type:"source"})]}):c.jsxs(c.Fragment,{children:[c.jsx(fi,{className:"detail-mindmap-handle",id:"target-left",position:Ze.Left,type:"target"}),c.jsx(fi,{className:"detail-mindmap-handle",id:"target-right",position:Ze.Right,type:"target"}),c.jsx(fi,{className:"detail-mindmap-handle",id:"source-left",position:Ze.Left,type:"source"}),c.jsx(fi,{className:"detail-mindmap-handle",id:"source-right",position:Ze.Right,type:"source"})]}),c.jsxs("div",{className:"detail-mindmap-node-head",children:[c.jsx(Ji,{className:"detail-mindmap-node-label",compact:!0,content:n}),e.pageAnchorLabel?c.jsx("small",{children:e.pageAnchorLabel}):As(e.timeAnchor)?c.jsx("small",{children:mi(e.timeAnchor)}):null]})]})}const $I={mindmap:OI};function HI({embedUrl:e,localVideoUrl:t,openLabel:n,sourceUrl:r,seekTarget:i,title:s}){const o=A.useRef(null),[d,f]=A.useState(()=>typeof window>"u"?{width:Rw,x:0,y:0}:Q3(window.innerWidth,window.innerHeight)),m=A.useRef(null);A.useEffect(()=>{function g(){f(x=>U1(x,window.innerWidth,window.innerHeight))}return g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[]),A.useEffect(()=>{function g(w){const k=o.current;if(k){if(k.mode==="drag"){f(j=>U1({...j,width:k.layout.width,x:k.layout.x+(w.clientX-k.originX),y:k.layout.y+(w.clientY-k.originY)},window.innerWidth,window.innerHeight));return}f(j=>U1({...j,width:k.layout.width+(w.clientX-k.originX)},window.innerWidth,window.innerHeight))}}function x(){o.current=null}return window.addEventListener("pointermove",g),window.addEventListener("pointerup",x),window.addEventListener("pointercancel",x),()=>{window.removeEventListener("pointermove",g),window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",x)}},[]),A.useEffect(()=>{!t||!m.current||i.seconds==null||(m.current.currentTime=i.seconds,m.current.play().catch(()=>{}))},[t,i]);function y(g,x){x.button===0&&(o.current={mode:g,originX:x.clientX,originY:x.clientY,layout:d},x.currentTarget.setPointerCapture(x.pointerId),x.preventDefault())}function p(){typeof window>"u"||f(Q3(window.innerWidth,window.innerHeight))}return c.jsxs("div",{className:"detail-floating-player",style:{width:`${d.width}px`,left:`${d.x}px`,top:`${d.y}px`},children:[c.jsxs("div",{className:"detail-floating-player-head",onPointerDown:g=>y("drag",g),children:[c.jsxs("div",{className:"detail-floating-player-copy",children:[c.jsx("span",{className:"detail-floating-player-kicker",children:"Player"}),c.jsx("strong",{children:s})]}),r&&n?c.jsx("a",{className:"detail-floating-player-link",href:r,target:"_blank",rel:"noreferrer",onPointerDown:g=>g.stopPropagation(),children:n}):null]}),c.jsx("div",{className:"detail-video-embed-frame detail-video-embed-frame-floating",children:t?c.jsx("video",{ref:m,className:"detail-video-embed detail-local-video",controls:!0,preload:"metadata",src:t}):e?c.jsx("iframe",{allow:"accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; fullscreen",allowFullScreen:!0,className:"detail-video-embed",referrerPolicy:"strict-origin-when-cross-origin",scrolling:"no",src:e,title:`${s} 悬浮播放器`}):null}),c.jsx("div",{className:"detail-floating-player-resize",role:"presentation",onPointerDown:g=>y("resize",g),onDoubleClick:p})]})}function J3({state:e}){return c.jsx("section",{className:`detail-state-panel tone-${e.tone}`,role:"status",children:c.jsxs("div",{className:"detail-state-copy",children:[c.jsx("h3",{className:"detail-section-label",children:"Workspace State"}),c.jsx("h4",{className:"detail-section-title",children:e.title}),c.jsx("p",{className:"detail-section-body",children:e.description}),e.detail?c.jsx("pre",{className:"detail-state-detail",children:e.detail}):null]})})}function qI({active:e,tab:t}){const n=`detail-tab-icon ${e?"is-active":""}`;return t==="knowledge"?c.jsx($w,{className:n}):t==="summary"?c.jsx(Qg,{className:n}):c.jsx(VI,{className:n})}function UI(e){return c.jsx("svg",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",viewBox:"0 0 24 24",...e,children:c.jsx("path",{d:"m15 18-6-6 6-6"})})}function Ms(e){return c.jsx("svg",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",viewBox:"0 0 24 24",...e,children:c.jsx("path",{d:"m6 9 6 6 6-6"})})}function e6(e){return c.jsxs("svg",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",viewBox:"0 0 24 24",...e,children:[c.jsx("circle",{cx:"12",cy:"12",r:"9"}),c.jsx("path",{d:"m10 8 6 4-6 4z"})]})}function II(e){return c.jsxs("svg",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",viewBox:"0 0 24 24",...e,children:[c.jsx("circle",{cx:"12",cy:"12",r:"9"}),c.jsx("path",{d:"M12 7v5l3 2"})]})}function PI(e){return c.jsxs("svg",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",viewBox:"0 0 24 24",...e,children:[c.jsx("path",{d:"M3 6h18"}),c.jsx("path",{d:"M8 6V4h8v2"}),c.jsx("path",{d:"M19 6l-1 14H6L5 6"}),c.jsx("path",{d:"M10 11v6M14 11v6"})]})}function t6(e){return c.jsxs("svg",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",viewBox:"0 0 24 24",...e,children:[c.jsx("path",{d:"M20 4v6h-6"}),c.jsx("path",{d:"M4 20v-6h6"}),c.jsx("path",{d:"M7 17a8 8 0 0 0 13-5"}),c.jsx("path",{d:"M17 7A8 8 0 0 0 4 12"})]})}function Qg(e){return c.jsxs("svg",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",viewBox:"0 0 24 24",...e,children:[c.jsx("path",{d:"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"}),c.jsx("path",{d:"M14 3v5h5"}),c.jsx("path",{d:"M9 13h6M9 17h6M9 9h2"})]})}function I1(e){return c.jsxs("svg",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",viewBox:"0 0 24 24",...e,children:[c.jsx("path",{d:"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"}),c.jsx("path",{d:"M14 3v5h5"}),c.jsx("path",{d:"M9 9h2M9 13h6"}),c.jsx("path",{d:"M9 17a3 3 0 1 0 3-3"}),c.jsx("path",{d:"M13.75 15.5H12v-1.75"})]})}function P1(e){return c.jsxs("svg",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",viewBox:"0 0 24 24",...e,children:[c.jsx("path",{d:"M4 12a8 8 0 0 1 13-6"}),c.jsx("path",{d:"M20 12a8 8 0 0 1-13 6"}),c.jsx("path",{d:"M17 3v5h-5"}),c.jsx("path",{d:"M7 21v-5h5"}),c.jsx("path",{d:"M9 10.5a3 3 0 0 1 6 0c0 2.2-3 2.2-3 4.5"}),c.jsx("path",{d:"M12 18h.01"})]})}function FI(e){return c.jsxs("svg",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",viewBox:"0 0 24 24",...e,children:[c.jsx("path",{d:"M12 3.75a1.5 1.5 0 0 1 1.471 1.206l.167.835a6.954 6.954 0 0 1 1.309.544l.716-.46a1.5 1.5 0 0 1 1.867.195l.8.8a1.5 1.5 0 0 1 .195 1.867l-.46.716c.224.417.406.856.544 1.309l.835.167A1.5 1.5 0 0 1 20.25 12a1.5 1.5 0 0 1-1.206 1.471l-.835.167a6.954 6.954 0 0 1-.544 1.309l.46.716a1.5 1.5 0 0 1-.195 1.867l-.8.8a1.5 1.5 0 0 1-1.867.195l-.716-.46a6.954 6.954 0 0 1-1.309.544l-.167.835A1.5 1.5 0 0 1 12 20.25a1.5 1.5 0 0 1-1.471-1.206l-.167-.835a6.954 6.954 0 0 1-1.309-.544l-.716.46a1.5 1.5 0 0 1-1.867-.195l-.8-.8a1.5 1.5 0 0 1-.195-1.867l.46-.716a6.954 6.954 0 0 1-.544-1.309l-.835-.167A1.5 1.5 0 0 1 3.75 12a1.5 1.5 0 0 1 1.206-1.471l.835-.167c.138-.453.32-.892.544-1.309l-.46-.716a1.5 1.5 0 0 1 .195-1.867l.8-.8a1.5 1.5 0 0 1 1.867-.195l.716.46a6.954 6.954 0 0 1 1.309-.544l.167-.835A1.5 1.5 0 0 1 12 3.75Z"}),c.jsx("circle",{cx:"12",cy:"12",r:"3.25"})]})}function VI(e){return c.jsxs("svg",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",viewBox:"0 0 24 24",...e,children:[c.jsx("path",{d:"M4 12v7a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-7"}),c.jsx("path",{d:"M12 16V4"}),c.jsx("path",{d:"m7 9 5-5 5 5"})]})}function GI(e){return c.jsxs("svg",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",viewBox:"0 0 24 24",...e,children:[c.jsx("path",{d:"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"}),c.jsx("path",{d:"M14 3v5h5"}),c.jsx("path",{d:"M12 12V6"}),c.jsx("path",{d:"m9.5 9.5 2.5-2.5 2.5 2.5"}),c.jsx("path",{d:"M9 16h6"})]})}function YI(e){return c.jsxs("svg",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",viewBox:"0 0 24 24",...e,children:[c.jsx("path",{d:"M3 7.5A1.5 1.5 0 0 1 4.5 6h4l1.6 2H19.5A1.5 1.5 0 0 1 21 9.5v7A1.5 1.5 0 0 1 19.5 18h-15A1.5 1.5 0 0 1 3 16.5z"}),c.jsx("path",{d:"M3 10h18"}),c.jsx("path",{d:"m13 14 2-2 2 2"}),c.jsx("path",{d:"M17 12v5"})]})}function XI(e){return c.jsxs("svg",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",viewBox:"0 0 24 24",...e,children:[c.jsx("rect",{x:"3.5",y:"6.5",width:"13",height:"13",rx:"2.5"}),c.jsx("path",{d:"M9 6V5.5A2.5 2.5 0 0 1 11.5 3H18a2.5 2.5 0 0 1 2.5 2.5V12"}),c.jsx("path",{d:"m6.5 16.5 3.4-3.4a1.3 1.3 0 0 1 1.84 0l1.26 1.26"}),c.jsx("path",{d:"m12.5 15.5 1.4-1.4a1.3 1.3 0 0 1 1.84 0l.76.76"}),c.jsx("circle",{cx:"11",cy:"10.5",r:"1.1"})]})}function $w(e){return c.jsxs("svg",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",viewBox:"0 0 24 24",...e,children:[c.jsx("path",{d:"M12 5a3 3 0 0 0-3 3v1H8a3 3 0 0 0 0 6h1v1a3 3 0 0 0 6 0v-1h1a3 3 0 0 0 0-6h-1V8a3 3 0 0 0-3-3Z"}),c.jsx("path",{d:"M12 2v3M12 19v3M4.5 12H8M16 12h3.5"})]})}function $p(e){return c.jsxs("svg",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",viewBox:"0 0 24 24",...e,children:[c.jsx("path",{d:"M5 12h14"}),c.jsx("path",{d:"m13 6 6 6-6 6"})]})}function KI(){var Wt,Fe,qt,jt,Jt,Rt;const e=Si(),t=lf(),[n,r]=A.useState(uN),[i,s]=A.useState({version:"",backend:null,logPath:""}),[o,d]=A.useState(""),[f,m]=A.useState("all"),[y,p]=A.useState(""),[g,x]=A.useState(""),[w,k]=A.useState(null),[j,N]=A.useState(!1),[_,E]=A.useState(null),[L,D]=A.useState([]),[T,O]=A.useState(0),[Z,V]=A.useState(null),[P,K]=A.useState(()=>{if(typeof window>"u")return!1;const _e=localStorage.getItem("theme");return _e==="dark"?!0:_e==="light"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches}),[X,le]=A.useState(()=>typeof window>"u"?!1:localStorage.getItem("sidebar-collapsed")==="true"),[F,Y]=A.useState(!1),[q,Q]=A.useState(!1),[ee,ne]=A.useState(!1),[R,H]=A.useState(!1),[W,B]=A.useState({status:"idle",version:"",releaseDate:"",releaseNotes:null,downloadProgress:0,errorMessage:null}),ce=A.useRef(null);A.useEffect(()=>{document.documentElement.setAttribute("data-theme",P?"dark":"light"),localStorage.setItem("theme",P?"dark":"light")},[P]),A.useEffect(()=>{localStorage.setItem("sidebar-collapsed",X?"true":"false")},[X]),A.useEffect(()=>{let _e,Le,Ye=!1;async function Ue(){var Oe,Ln,kt;if(!window.desktop)return;const[dt,en,Kt,ft]=await Promise.all([window.desktop.app.getVersion(),window.desktop.backend.status(),window.desktop.logs.getServiceLogPath(),((Ln=(Oe=window.desktop.update)==null?void 0:Oe.getStatus)==null?void 0:Ln.call(Oe))??Promise.resolve(null)]);Ye||(s({version:dt,backend:en,logPath:Kt}),ft&&B(Vu(ft)),_e=window.desktop.backend.onStatus(hn=>s(or=>({...or,backend:hn}))),Le=(kt=window.desktop.update)==null?void 0:kt.onStatus(hn=>{B(Vu(hn))}))}return Ue(),()=>{Ye=!0,_e==null||_e(),Le==null||Le()}},[]),A.useEffect(()=>{let _e=!1;async function Le(){try{const[Ue,dt,en,Kt,ft]=await Promise.all([Ke.getHealth(),Ke.getSystemInfo(),Ke.getSettings(),Ke.listVideos(),Ke.getEnvironment()]);_e||r({serviceOnline:Ue.status==="ok",systemInfo:dt,settings:en,environment:ft,videos:Kt,error:""})}catch(Ue){_e||r(dt=>({...dt,serviceOnline:!1,error:Ue instanceof Error?Ue.message:"服务暂不可用"}))}}Le();const Ye=window.setInterval(()=>void Le(),8e3);return()=>{_e=!0,window.clearInterval(Ye)}},[T]);function pe(){Q(!0)}function xe(){Q(!1)}const be=A.useMemo(()=>dN(W),[W]);A.useEffect(()=>{be&&Q(!0)},[be]);async function ye(){var Le;if(!((Le=window.desktop)!=null&&Le.update)){const Ye=await Ke.getAppUpdate();return B(Vu(Ye)),Ye}const _e=await window.desktop.update.check();return B(Vu(_e)),_e}async function Ce(){var Le;if(!((Le=window.desktop)!=null&&Le.update))throw new Error("当前环境不支持桌面自动更新。");const _e=await window.desktop.update.download();return B(Vu(_e)),_e}async function Ge(){var _e;if(!((_e=window.desktop)!=null&&_e.update))throw new Error("当前环境不支持桌面自动更新。");await window.desktop.update.install()}const Pe=A.useMemo(()=>[...n.videos].sort((_e,Le)=>new Date(Le.updated_at).getTime()-new Date(_e.updated_at).getTime())[0]??null,[n.videos]),$e=A.useMemo(()=>{const _e=n.videos.filter(dt=>dt.is_favorite).length,Le=n.videos.filter(dt=>dt.latest_status==="completed").length,Ye=n.videos.filter(dt=>dt.latest_status==="running").length,Ue=n.videos.filter(dt=>dt.has_result).length;return{total:n.videos.length,favorite:_e,completed:Le,running:Ye,withResult:Ue}},[n.videos]),qe=A.useMemo(()=>{const _e=o.trim().toLowerCase();return[...n.videos].sort((Le,Ye)=>new Date(Ye.updated_at).getTime()-new Date(Le.updated_at).getTime()).filter(Le=>_e?Le.title.toLowerCase().includes(_e)||Le.source_url.toLowerCase().includes(_e):!0).filter(Le=>f==="favorite"?Le.is_favorite:f==="completed"?Le.latest_status==="completed":f==="running"?Le.latest_status==="running":f==="with-result"?Le.has_result:!0)},[f,o,n.videos]),nt=A.useMemo(()=>[...n.videos].filter(_e=>_e.is_favorite).sort((_e,Le)=>{const Ye=new Date(_e.favorite_updated_at||_e.updated_at).getTime();return new Date(Le.favorite_updated_at||Le.updated_at).getTime()-Ye}),[n.videos]),lt=A.useMemo(()=>[...n.videos].sort((_e,Le)=>new Date(Le.updated_at).getTime()-new Date(_e.updated_at).getTime()).slice(0,6),[n.videos]);async function We(_e,Le){const Ye=n.videos,Ue=Le?new Date().toISOString():null;r(dt=>({...dt,videos:dt.videos.map(en=>en.video_id===_e?{...en,is_favorite:Le,favorite_updated_at:Ue}:en)}));try{const dt=await Ke.setVideoFavorite(_e,{is_favorite:Le});r(en=>({...en,videos:en.videos.map(Kt=>Kt.video_id===_e?{...Kt,...dt}:Kt)}))}catch(dt){throw r(en=>({...en,videos:Ye})),dt}}const Dt=A.useMemo(()=>{var _e,Le,Ye;return cN({transcriptionProvider:(_e=n.settings)==null?void 0:_e.transcription_provider,whisperDevice:(Le=n.settings)==null?void 0:Le.whisper_device,cudaAvailable:(Ye=n.environment)==null?void 0:Ye.cudaAvailable,hasSettings:!!n.settings})},[(Wt=n.environment)==null?void 0:Wt.cudaAvailable,n.settings]),ke=A.useMemo(()=>S6(n.settings,n.environment),[n.environment,n.settings]),et=i.version||((qt=(Fe=n.systemInfo)==null?void 0:Fe.application)==null?void 0:qt.version)||"-";A.useEffect(()=>{if(!Z0(ke,n.settings)){ne(!1),H(!1);return}R||ne(!0)},[ke,R,n.settings]);function st(_e){ne(!1),H(!0),V({issueKey:_e,nonce:Date.now()}),t("/settings")}function Nt(_e){if(_e){st(_e);return}if(Z0(ke,n.settings)){H(!1),ne(!0);return}t("/settings")}function kn(){ne(!1),H(!0)}function Ht(){var Le,Ye;ne(!1);const _e=((Le=ke.blockingIssues[0])==null?void 0:Le.key)||((Ye=ke.issues[0])==null?void 0:Ye.key);if(_e){st(_e);return}t("/settings")}async function ct(_e){if(_e.preventDefault(),!y.trim()){x("请输入 Bilibili / YouTube 视频链接,或直接输入 BV 号");return}if(ke.hasBlockingIssues){x(`当前缺少必需配置:${ke.blockingIssues.map(Le=>Le.title).join("、")}。请先完成设置。`),Z0(ke,n.settings)?(H(!1),ne(!0)):t("/settings");return}x("正在抓取视频信息并准备开始总结...");try{const Le=await Ke.probeVideo({url:y.trim(),force_refresh:!1});if(k(Le.video),Le.requires_selection&&Le.pages.length>0){E(Le.video),D(Le.pages.map(Ye=>({...Ye,aggregate_status:"not_started",has_completed_result:!1}))),N(!0),x(`检测到 ${Le.pages.length} 个分 P,请先勾选要处理的内容`);return}await Ke.createVideoTask(Le.video.video_id),x(Le.cached?"已从视频库读取并开始总结":"视频已加入本地库并开始总结"),p(""),O(Ye=>Ye+1),t(`/videos/${Le.video.video_id}`)}catch(Le){x(Le instanceof Error?Le.message:"开始总结失败")}}async function Lt(){var _e,Le;if(ke.hasBlockingIssues){x(`当前缺少必需配置:${ke.blockingIssues.map(Ye=>Ye.title).join("、")}。请先完成设置。`),Z0(ke,n.settings)?(H(!1),ne(!0)):t("/settings");return}if((_e=window.desktop)!=null&&_e.media){const Ye=await window.desktop.media.pickVideoFile();if(!Ye)return;x("正在读取本地视频信息并准备开始总结...");try{const Ue=await Ke.probeVideo({url:Ye,force_refresh:!1});k(Ue.video),await Ke.createVideoTask(Ue.video.video_id),p(""),x(Ue.cached?"已从本地视频库读取并开始总结":"本地视频已加入视频库并开始总结"),O(dt=>dt+1),t(`/videos/${Ue.video.video_id}`)}catch(Ue){x(Ue instanceof Error?Ue.message:"导入本地视频失败")}return}(Le=ce.current)==null||Le.click()}async function de(_e){var Ye;const Le=(Ye=_e.target.files)==null?void 0:Ye[0];if(_e.target.value="",!!Le){x("正在上传本地视频并准备开始总结...");try{const Ue=await Ke.uploadLocalVideo(Le);k(Ue.video),await Ke.createVideoTask(Ue.video.video_id),p(""),x(Ue.cached?"已从本地视频库读取并开始总结":"本地视频已加入视频库并开始总结"),O(dt=>dt+1),t(`/videos/${Ue.video.video_id}`)}catch(Ue){x(Ue instanceof Error?Ue.message:"导入本地视频失败")}}}async function je(_e){if(!_)throw new Error("当前视频信息已失效,请重新探测。");x(_e.confirm?"正在确认批量任务...":"正在创建批量任务..."),k(_);const Le=await Ke.createVideoTasksBatch(_.video_id,{page_numbers:_e.pageNumbers,confirm:_e.confirm});if(Le.requires_confirmation)return x(`所选内容中有 ${Le.conflict_pages.length} 个分 P 已有成功摘要,请确认后继续。`),Le;N(!1),E(null),D([]),p("");const Ye=Le.created_tasks.length,Ue=Le.skipped_pages.length;return x(Ye>0?`已创建 ${Ye} 个批量任务${Ue?`,跳过 ${Ue} 个已完成分 P`:""}`:`没有创建新任务${Ue?`,已跳过 ${Ue} 个分 P`:""}`),O(dt=>dt+1),t(`/videos/${_.video_id}`),Le}function He(){N(!1),E(null),D([])}e.pathname.startsWith("/settings")||e.pathname.startsWith("/library")||e.pathname.startsWith("/videos/");const rt=e.pathname.startsWith("/settings");e.pathname.startsWith("/library");const gt=!0,Pt=!!((jt=window.desktop)!=null&&jt.update)&&!_c(W),fn=!!((Jt=window.desktop)!=null&&Jt.media)||typeof window<"u";return c.jsxs("div",{className:`app-shell ${X?"sidebar-collapsed":""} ${F?"mobile-sidebar-open":""}`,children:[c.jsx("input",{ref:ce,type:"file",accept:"video/mp4,video/quicktime,video/x-matroska,video/x-msvideo,video/x-ms-wmv,video/webm,video/x-flv,video/mp2t,video/mpeg,.mp4,.mov,.mkv,.avi,.wmv,.webm,.flv,.m4v,.ts,.mpeg,.mpg",style:{display:"none"},onChange:_e=>void de(_e)}),c.jsx(KN,{darkMode:P,onToggleTheme:()=>K(_e=>!_e),serviceOnline:n.serviceOnline,backendRunning:(Rt=i.backend)==null?void 0:Rt.running,runtimeDeviceLabel:Dt,version:et,updateState:W,configHealth:ke,onOpenSettings:Nt,onOpenUpdateDialog:pe}),c.jsxs("aside",{className:"sidebar",children:[c.jsxs("nav",{className:"nav",children:[c.jsxs(pi,{className:`nav-item ${e.pathname==="/"?"active":""}`,to:"/","aria-label":"首页",title:"首页",onClick:()=>Y(!1),children:[c.jsx("span",{className:"nav-icon","aria-hidden":"true",children:c.jsx(CN,{})}),c.jsxs("span",{className:"nav-copy",children:[c.jsx("strong",{children:"首页"}),c.jsx("small",{children:"工作台总览"})]})]}),c.jsxs(pi,{className:`nav-item ${e.pathname==="/library"?"active":""}`,to:"/library","aria-label":"视频库",title:"视频库",onClick:()=>Y(!1),children:[c.jsx("span",{className:"nav-icon","aria-hidden":"true",children:c.jsx(NN,{})}),c.jsxs("span",{className:"nav-copy",children:[c.jsx("strong",{children:"视频库"}),c.jsx("small",{children:"资产管理"})]})]}),c.jsxs(pi,{className:`nav-item ${e.pathname==="/knowledge"?"active":""}`,to:"/knowledge","aria-label":"知识库",title:"知识库",onClick:()=>Y(!1),children:[c.jsx("span",{className:"nav-icon","aria-hidden":"true",children:c.jsx(jN,{})}),c.jsxs("span",{className:"nav-copy",children:[c.jsx("strong",{children:"知识库"}),c.jsx("small",{children:"检索与问答"})]})]}),c.jsxs(pi,{className:`nav-item ${e.pathname.startsWith("/settings")?"active":""}`,to:"/settings","aria-label":"设置",title:"设置",onClick:()=>Y(!1),children:[c.jsx("span",{className:"nav-icon","aria-hidden":"true",children:c.jsx(G1,{})}),c.jsxs("span",{className:"nav-copy",children:[c.jsx("strong",{children:"设置"}),c.jsx("small",{children:"运行配置"})]})]})]}),c.jsx("div",{className:"nav-section-divider"}),c.jsx("button",{className:"sidebar-corner-toggle",type:"button",onClick:()=>le(_e=>!_e),"aria-label":X?"展开侧边栏":"收起侧边栏","aria-pressed":X,title:X?"展开侧边栏":"收起侧边栏",children:c.jsx(ZI,{collapsed:X})})]}),c.jsx("button",{className:"mobile-menu-toggle",type:"button",onClick:()=>Y(!0),"aria-label":"打开菜单",title:"打开菜单",children:c.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),c.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),c.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),F&&c.jsx("div",{className:"mobile-sidebar-overlay",onClick:()=>Y(!1),onKeyDown:_e=>{_e.key==="Escape"&&Y(!1)},role:"button",tabIndex:0,"aria-label":"关闭菜单"}),c.jsx("main",{className:"content",children:c.jsx("div",{className:`content-frame ${rt?"content-frame-settings":""}`,children:n.error&&!n.serviceOnline?c.jsxs("section",{className:"grid-card empty-state-card",children:[c.jsx("div",{className:"spinner"}),c.jsx("h3",{children:"后端暂未就绪"}),c.jsx("p",{children:n.error}),c.jsxs("div",{className:"desktop-actions",children:[c.jsx("button",{className:"primary-button",type:"button",onClick:async()=>{var _e;await((_e=window.desktop)==null?void 0:_e.backend.start()),O(Le=>Le+1)},children:"重新拉起后端"}),c.jsx("button",{className:"secondary-button",type:"button",onClick:()=>O(_e=>_e+1),children:"重新检测"})]})]}):c.jsxs(_k,{children:[c.jsx(Eo,{path:"/",element:c.jsx(WD,{configHealth:ke,probePreview:w,probeUrl:y,setProbeUrl:p,submitStatus:g,onProbe:ct,onImportLocalVideo:Lt,canImportLocalVideo:fn,onOpenSetupAssistant:Nt,onOpenConfigIssue:st,favoriteVideos:nt,recentVideos:lt,onToggleFavorite:We})}),c.jsx(Eo,{path:"/library",element:c.jsx(pU,{snapshot:n,filteredVideos:qe,libraryCounts:$e,latestVideo:Pe,query:o,setQuery:d,activeFilter:f,setLibraryFilter:m,serviceOnline:n.serviceOnline,runtimeDeviceLabel:Dt,onToggleFavorite:We})}),c.jsx(Eo,{path:"/knowledge",element:c.jsx(hU,{})}),c.jsx(Eo,{path:"/videos/:videoId",element:c.jsx(zI,{onRefresh:()=>O(_e=>_e+1)})}),c.jsx(Eo,{path:"/settings",element:c.jsx(yU,{desktop:i,onOpenUpdateDialog:pe,onCheckUpdate:ye,onDownloadUpdate:Ce,onInstallUpdate:Ge,onRefresh:()=>O(_e=>_e+1),onSettingsSaved:(_e,Le)=>{r(Ye=>({...Ye,settings:_e,environment:Le??Ye.environment,systemInfo:Ye.systemInfo?{...Ye.systemInfo,settings:_e,environment:Le??Ye.systemInfo.environment}:Ye.systemInfo}))},snapshot:n,focusIssueRequest:Z,updateInfo:W,canCheckUpdate:gt,canInstallUpdate:Pt})})]})})}),c.jsx(YD,{isOpen:q,updateInfo:W,currentVersion:et,canInstallUpdate:Pt,onClose:xe,onCheck:ye,onDownload:Ce,onInstall:Ge}),c.jsx(C6,{isOpen:j,mode:"create",video:_,pages:L,onClose:He,onSubmit:je}),c.jsx(XN,{isOpen:ee,configHealth:ke,onClose:kn,onOpenSettings:Ht,onNavigateToIssue:st})]})}function ZI({collapsed:e}){return c.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("rect",{x:"3.5",y:"4.5",width:"17",height:"15",rx:"2.5"}),c.jsx("path",{d:"M9 4.5v15"}),e?c.jsx("path",{d:"m13.5 12 3-3m-3 3 3 3"}):c.jsx("path",{d:"m15.5 12-3-3m3 3-3 3"})]})}TS.createRoot(document.getElementById("root")).render(c.jsx(n6.StrictMode,{children:c.jsx(Jk,{children:c.jsx(KI,{})})}));
|