remons-render-markdown 2.0.1-beta.9 → 2.0.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,7 +25,7 @@ interface MermaidRendererProps {
25
25
  */
26
26
  showCollapse?: boolean;
27
27
  /**
28
- * 默认折叠状态
28
+ * 默认折叠状态(默认 false,即默认展开)
29
29
  */
30
30
  defaultCollapsed?: boolean;
31
31
  /**
@@ -54,7 +54,7 @@ export interface RenderMarkdownProps {
54
54
  */
55
55
  chartConfig?: (text: string) => string;
56
56
  /**
57
- * 代码块默认是否折叠
57
+ * 代码块默认是否折叠;对 mermaid 图表未指定时默认展开
58
58
  */
59
59
  defaultCollapsed?: boolean;
60
60
  /**
@@ -0,0 +1,17 @@
1
+ /**
2
+ * 带圈序号三档的类名,与 newsFlash 的 ICircledClass 同构,便于两处共用同一份分档逻辑。
3
+ * 本库三档在 index.global.less 里是全局类名(非 CSS Module 哈希),故给出默认值;
4
+ * 使用方若要挂自己的类名,通过插件第二参覆盖即可(markdown-it 的 .use(plugin, opts))。
5
+ */
6
+ export interface ICircledClass {
7
+ /** 圈内一位数字(①-⑨、⓪、❶-❾ 等) */
8
+ base: string;
9
+ /** 圈内两位数字(⑩-⑳ 等),字形为装下两位数字把圈画得更大 */
10
+ wide: string;
11
+ /** ㉑-㊿(CJK 符号块):西文字体普遍不收这批码位,落到中文字体按全角字身画圈,需单独一档;缺省退回 wide */
12
+ cjk?: string;
13
+ }
14
+ /** 库内默认类名,对应 index.global.less 的 .mdNum / .mdNumWide / .mdNumCjk */
15
+ export declare const DEFAULT_CIRCLED_CLASS: ICircledClass;
16
+ export declare function circledNumbers(md: any, cls?: ICircledClass): void;
17
+ export default circledNumbers;
@@ -4,5 +4,12 @@
4
4
  * 多实例不再互相抢占第一个 .markdown 容器;增量渲染重建 DOM 后也无需重绑。
5
5
  */
6
6
  export declare const tabsName = "markdown-tabs";
7
+ /**
8
+ * 增量 patch 后还原用户点选的 tab。
9
+ * morphdom 会用新 HTML 的 class 整体覆写按钮与面板,未列入保留名单的 active 会被擦掉,
10
+ * 表现为「输入一个字,选中的 tab 就跳回第一个」。
11
+ * 由 RenderMarkdown 在 patch 完成后同步调用(renderTab 的微任务在 patch 之前执行,管不到)。
12
+ */
13
+ export declare function syncTabState(scope: ParentNode): void;
7
14
  declare function renderTab(): void;
8
15
  export default renderTab;
@@ -49,8 +49,13 @@ interface UseIncrementalRenderOptions {
49
49
  * - 后续渲染:渲染为字符串,然后通过 morphdom patch 容器
50
50
  * - 节流 patch 调用(真节流:首次立即执行 + 周期收尾),避免流式输出期间过多 DOM 操作
51
51
  * - 渲染序号保证内容变化后,飞行中的渲染结果不会污染新状态
52
- * - 按"标签 + className"语义 key 匹配节点,保护 customRenderers(插件)产出的容器状态
53
- * - 保留节点上 JS 添加的 data-* 属性(初始化守卫位),避免 patch 后被重复初始化
52
+ * - 按"标签 + className"语义 key 匹配节点,保护 customRenderers(插件)产出的容器状态;
53
+ * 树内重名 key 会加 [n] 后缀消歧,避免 morphdom 单槽 key 映射让被删节点逃过销毁
54
+ * - 保留节点上 JS 添加的 data-* 属性(初始化守卫位)与运行时 class(折叠态/蒙层),
55
+ * 避免 patch 后被重复初始化或状态被新 HTML 覆写;源码拥有的 data-*(tab 的 data-active 等)
56
+ * 不回填,以新 HTML 为准
57
+ * - 渲染结果为空串、或渲染抛错,都会让 DOM 与源码保持一致(不静默丢弃本轮更新);
58
+ * 空输出同时把 hasContent 置假,与全量模式一样回退到 Empty 占位
54
59
  * - 返回 inner 内容 <div> 的 ref 回调
55
60
  *
56
61
  * 注意:除 content 外的所有选项均为**初始化语义**——仅在挂载时读取一次,
package/dist/index.css CHANGED
@@ -1,2 +1,2 @@
1
- @import "https://at.alicdn.com/t/c/font_2004544_gigrjtfsf6.css";._container_1a6ji_4{z-index:10000;pointer-events:none;flex-direction:column;align-items:center;gap:8px;display:flex;position:fixed;top:8vh;left:50%;transform:translate(-50%)}._item_1a6ji_16{pointer-events:auto}._toast_1a6ji_19{background-color:var(--remons-markdown-color-bg-white);box-shadow:var(--remons-markdown-shadow-sm);border-radius:6px;align-items:center;gap:8px;min-width:200px;padding:10px 20px;font-size:14px;animation:.3s _fadeIn_1a6ji_1;display:flex}._toast-warning_1a6ji_31{color:#faad14}._toast-info_1a6ji_34{color:#1890ff}._toast-error_1a6ji_37{color:#ff4d4f}._toast-success_1a6ji_40{color:#52c41a}@keyframes _fadeIn_1a6ji_1{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}._back-top_gdg5d_4{position:fixed;bottom:20px;right:20px}@media screen and (width<=500px){._back-top_gdg5d_4{width:30px;height:30px}}._empty_container_fkmsv_3{color:#999;flex-direction:column;justify-content:center;align-items:center;gap:12px;height:100%;display:flex}._description_fkmsv_12{font-size:14px}._tocSidebar_lxzj1_1{background:var(--remons-markdown-color-toc);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);width:280px;max-height:calc(100vh - 120px);box-shadow:var(--remons-markdown-shadow-sm);z-index:1000;border:1px solid var(--remons-markdown-color-button-border);border-radius:8px;flex-direction:column;display:flex;position:absolute;top:100px;right:20px}._tocHeader_lxzj1_17{border-bottom:1px solid var(--remons-markdown-color-border);justify-content:space-between;align-items:center;padding:8px 10px;display:flex}._tocHeader_lxzj1_17 ._tocTitle_lxzj1_24{color:var(--remons-markdown-color-text-primary);font-size:14px;font-weight:600}._tocHeader_lxzj1_17 ._tocActions_lxzj1_29{align-items:center;gap:6px;display:flex}._tocHeader_lxzj1_17 ._tocActions_lxzj1_29 .remons-markdown-circle{width:22px;height:22px;font-size:12px}._tocSearchBar_lxzj1_39{border-bottom:1px solid var(--remons-markdown-color-border);background:var(--remons-markdown-color-bg);align-items:center;padding:6px 8px;display:flex}._tocSearchBar_lxzj1_39 ._tocSearchInput_lxzj1_46{border:1px solid var(--remons-markdown-color-border);background:var(--remons-markdown-color-bg);height:28px;color:var(--remons-markdown-color-text);border-radius:4px;outline:none;flex:1;padding:0 8px;font-size:13px}._tocSearchBar_lxzj1_39 ._tocSearchInput_lxzj1_46::placeholder{color:var(--remons-markdown-color-text-placeholder)}._tocSearchBar_lxzj1_39 ._tocSearchInput_lxzj1_46:focus{border-color:var(--remons-markdown-color-primary);box-shadow:0 0 0 2px var(--remons-markdown-color-primary-shadow)}._tocSearchBar_lxzj1_39 ._tocSearchClear_lxzj1_64{cursor:pointer;color:var(--remons-markdown-color-text-placeholder);border-radius:2px;margin-left:4px;padding:4px;font-size:12px;transition:color .2s}._tocSearchBar_lxzj1_39 ._tocSearchClear_lxzj1_64:hover{color:var(--remons-markdown-color-text-primary)}._tocSearchBar_lxzj1_39 ._tocSearchExit_lxzj1_76{cursor:pointer;color:var(--remons-markdown-color-text-placeholder);border-radius:4px;margin-left:4px;padding:4px;font-size:16px;transition:color .2s}._tocSearchBar_lxzj1_39 ._tocSearchExit_lxzj1_76:hover{color:var(--remons-markdown-color-text-primary);background:var(--remons-markdown-color-bg-hover-light)}._tocBody_lxzj1_89{flex:1;padding:8px 0 8px 6px;overflow-y:auto}._tocItem_lxzj1_95 ._tocItemTitle_lxzj1_95{cursor:pointer;border-radius:4px;align-items:center;padding:4px 10px;line-height:20px;transition:all .2s;display:flex;position:relative}._tocItem_lxzj1_95 ._tocItemTitle_lxzj1_95._active_lxzj1_105{color:var(--remons-markdown-color-primary)}._tocItem_lxzj1_95 ._tocItemTitle_lxzj1_95._active_lxzj1_105 ._tocLink_lxzj1_108{color:var(--remons-markdown-color-primary);font-weight:500}._tocItem_lxzj1_95 ._tocItemTitle_lxzj1_95 ._tocExpandIcon_lxzj1_112{color:var(--remons-markdown-color-text-placeholder);cursor:pointer;justify-content:center;align-items:center;width:16px;height:16px;font-size:10px;display:flex;position:absolute;left:-6px}._tocItem_lxzj1_95 ._tocItemTitle_lxzj1_95 ._tocExpandIcon_lxzj1_112:hover{color:var(--remons-markdown-color-text)}._tocItem_lxzj1_95 ._tocItemTitle_lxzj1_95 ._tocLink_lxzj1_108{color:var(--remons-markdown-color-text);text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:13px;text-decoration:none;overflow:hidden}._tocItem_lxzj1_95 ._tocItemTitle_lxzj1_95 ._tocLink_lxzj1_108:hover{color:var(--remons-markdown-color-primary)}._tocChildren_lxzj1_139{overflow:hidden}._highlight_lxzj1_142{color:var(--remons-markdown-color-warning);font-weight:600}._tocEmpty_lxzj1_146{text-align:center;color:var(--remons-markdown-color-text-placeholder);padding:20px 12px;font-size:13px}@media screen and (width<=500px){._tocSidebar_lxzj1_1{width:250px;max-height:calc(100vh - 100px);line-height:18px;top:90px;right:20px}._tocHeader_lxzj1_17{padding:4px 6px}._tocHeader_lxzj1_17 ._tocTitle_lxzj1_24{font-size:12px}._tocSearchBar_lxzj1_39{padding:4px 6px}._tocSearchBar_lxzj1_39 ._tocSearchInput_lxzj1_46{height:24px;padding:0 4px;font-size:12px}._tocSearchBar_lxzj1_39 ._tocSearchExit_lxzj1_76{font-size:14px}._tocBody_lxzj1_89{padding:2px 0}._tocItem_lxzj1_95 ._tocItemTitle_lxzj1_95{padding:2px 6px}._tocItem_lxzj1_95 ._tocItemTitle_lxzj1_95 ._tocLink_lxzj1_108{font-size:12px}._tocItem_lxzj1_95 ._tocItemTitle_lxzj1_95 ._tocExpandIcon_lxzj1_112{width:12px;height:12px;font-size:8px}._tocEmpty_lxzj1_146{padding:10px 6px;font-size:12px}}.pswp{--pswp-bg:#000;--pswp-placeholder-bg:#222;--pswp-root-z-index:100000;--pswp-preloader-color:#4f4f4f66;--pswp-preloader-color-secondary:#ffffffe6;--pswp-icon-color:#fff;--pswp-icon-color-secondary:#4f4f4f;--pswp-icon-stroke-color:#4f4f4f;--pswp-icon-stroke-width:2px;--pswp-error-text-color:var(--pswp-icon-color);width:100%;height:100%;z-index:var(--pswp-root-z-index);touch-action:none;opacity:.003;contain:layout style size;-webkit-tap-highlight-color:#0000;outline:0;display:none;position:fixed;top:0;left:0}.pswp:focus{outline:0}.pswp *{box-sizing:border-box}.pswp img{max-width:none}.pswp--open{display:block}.pswp,.pswp__bg{will-change:opacity;transform:translateZ(0)}.pswp__bg{opacity:.005;background:var(--pswp-bg)}.pswp,.pswp__scroll-wrap{overflow:hidden}.pswp__scroll-wrap,.pswp__bg,.pswp__container,.pswp__item,.pswp__content,.pswp__img,.pswp__zoom-wrap{width:100%;height:100%;position:absolute;top:0;left:0}.pswp__img,.pswp__zoom-wrap{width:auto;height:auto}.pswp--click-to-zoom.pswp--zoom-allowed .pswp__img{cursor:-webkit-zoom-in;cursor:-moz-zoom-in;cursor:zoom-in}.pswp--click-to-zoom.pswp--zoomed-in .pswp__img{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.pswp--click-to-zoom.pswp--zoomed-in .pswp__img:active{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.pswp--no-mouse-drag.pswp--zoomed-in .pswp__img,.pswp--no-mouse-drag.pswp--zoomed-in .pswp__img:active,.pswp__img{cursor:-webkit-zoom-out;cursor:-moz-zoom-out;cursor:zoom-out}.pswp__container,.pswp__img,.pswp__button,.pswp__counter{-webkit-user-select:none;user-select:none}.pswp__item{z-index:1;overflow:hidden}.pswp__hidden{display:none!important}.pswp__content{pointer-events:none}.pswp__content>*{pointer-events:auto}.pswp__error-msg-container{display:grid}.pswp__error-msg{color:var(--pswp-error-text-color);margin:auto;font-size:1em;line-height:1}.pswp .pswp__hide-on-close{opacity:.005;will-change:opacity;transition:opacity var(--pswp-transition-duration) cubic-bezier(.4, 0, .22, 1);z-index:10;pointer-events:none}.pswp--ui-visible .pswp__hide-on-close{opacity:1;pointer-events:auto}.pswp__button{cursor:pointer;width:50px;height:60px;box-shadow:none;opacity:.85;-webkit-appearance:none;-webkit-touch-callout:none;background:0 0;border:0;margin:0;padding:0;display:block;position:relative;overflow:hidden}.pswp__button:hover,.pswp__button:active,.pswp__button:focus{box-shadow:none;opacity:1;background:0 0;border:0;padding:0;transition:none}.pswp__button:disabled{opacity:.3;cursor:auto}.pswp__icn{fill:var(--pswp-icon-color);color:var(--pswp-icon-color-secondary);pointer-events:none;width:32px;height:32px;position:absolute;top:14px;left:9px;overflow:hidden}.pswp__icn-shadow{stroke:var(--pswp-icon-stroke-color);stroke-width:var(--pswp-icon-stroke-width);fill:none}.pswp__icn:focus{outline:0}div.pswp__img--placeholder,.pswp__img--with-bg{background:var(--pswp-placeholder-bg)}.pswp__top-bar{z-index:10;flex-direction:row;justify-content:flex-end;width:100%;height:60px;display:flex;position:absolute;top:0;left:0;pointer-events:none!important}.pswp__top-bar>*{pointer-events:auto;will-change:opacity}.pswp__button--close{margin-right:6px}.pswp__button--arrow{width:75px;height:100px;margin-top:-50px;position:absolute;top:50%}.pswp__button--arrow:disabled{cursor:default;display:none}.pswp__button--arrow .pswp__icn{background:0 0;border-radius:0;width:60px;height:60px;margin-top:-30px;top:50%}.pswp--one-slide .pswp__button--arrow{display:none}.pswp--touch .pswp__button--arrow{visibility:hidden}.pswp--has_mouse .pswp__button--arrow{visibility:visible}.pswp__button--arrow--prev{left:0;right:auto}.pswp__button--arrow--next{right:0}.pswp__button--arrow--next .pswp__icn{left:auto;right:14px;transform:scaleX(-1)}.pswp__button--zoom{display:none}.pswp--zoom-allowed .pswp__button--zoom{display:block}.pswp--zoomed-in .pswp__zoom-icn-bar-v{display:none}.pswp__preloader{width:50px;height:60px;margin-right:auto;position:relative;overflow:hidden}.pswp__preloader .pswp__icn{opacity:0;transition:opacity .2s linear;animation:.6s linear infinite pswp-clockwise}.pswp__preloader--active .pswp__icn{opacity:.85}@keyframes pswp-clockwise{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.pswp__counter{margin-top:15px;height:30px;color:var(--pswp-icon-color);text-shadow:1px 1px 3px var(--pswp-icon-color-secondary);opacity:.85;margin-inline-start:20px;font-size:14px;line-height:30px}.pswp--one-slide .pswp__counter{display:none}.pswp.md-image-preview{--pswp-bg:#12141eb8}html[data-theme=dark] .pswp.md-image-preview{--pswp-bg:#060810c7}.pswp.md-image-preview .pswp__bg{-webkit-backdrop-filter:blur(6px)saturate(1.1)}.pswp.md-image-preview .pswp__top-bar{background-image:linear-gradient(#00000052,#0000)}.hljs{color:#f8f8f2;background:#23241f}.hljs-tag,.hljs-subst{color:#f8f8f2}.hljs-strong,.hljs-emphasis{color:#a8a8a2}.hljs-bullet,.hljs-quote,.hljs-number,.hljs-regexp,.hljs-literal,.hljs-link{color:#ae81ff}.hljs-code,.hljs-title,.hljs-section,.hljs-selector-class{color:#a6e22e}.hljs-strong{font-weight:700}.hljs-keyword,.hljs-selector-tag,.hljs-name,.hljs-attr{color:#f92672}.hljs-symbol,.hljs-attribute{color:#66d9ef}.hljs-params,.hljs-title.class_,.hljs-class .hljs-title{color:#f8f8f2}.hljs-string,.hljs-type,.hljs-built_in,.hljs-selector-id,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-addition,.hljs-variable,.hljs-template-variable{color:#e6db74}.hljs-comment,.hljs-deletion,.hljs-meta{color:#75715e;font-family:Consolas,Inter,Noto Sans SC,-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Microsoft YaHei,sans-serif}.markdown-tabs-tabs-wrapper{border-radius:4px;margin-top:2px;position:relative}.markdown-tabs-tabs-wrapper:after{content:"";pointer-events:none;z-index:10;opacity:0;height:30px;transition:opacity .4s;position:absolute;top:0;left:0;right:0}.markdown-tabs-tabs-wrapper.has-left-mask:after{opacity:1;background:linear-gradient(to right, var(--remons-markdown-tabs-mask,#fff9) 0%, transparent 15%)}.markdown-tabs-tabs-wrapper.has-right-mask:after{opacity:1;background:linear-gradient(to left, var(--remons-markdown-tabs-mask,#fff9) 0%, transparent 10%)}.markdown-tabs-tabs-wrapper.has-both-masks:after{opacity:1;background:linear-gradient(to right, var(--remons-markdown-tabs-mask,#fff9) 0%, transparent 15%, transparent 85%, var(--remons-markdown-tabs-mask,#fff9) 100%)}.markdown-tabs-tabs-wrapper .markdown-tabs-tabs-header{z-index:2;background:0 0;display:flex;top:0;overflow:auto hidden}.markdown-tabs-tabs-wrapper .markdown-tabs-tabs-header::-webkit-scrollbar{display:none}.markdown-tabs-tabs-wrapper .markdown-tabs-tab-button{cursor:pointer;background-color:var(--remons-markdown-color-button);-webkit-backdrop-filter:blur(10px);border:1px solid var(--remons-markdown-color-button-border);min-width:50px;box-shadow:var(--remons-markdown-shadow-sm);border-bottom:none;border-radius:8px 8px 0 0;margin:0 2px;padding:6px 8px;font-size:14px;font-weight:400;transition:background-color .3s ease-in-out,color .3s ease-in-out;position:relative}.markdown-tabs-tabs-wrapper .markdown-tabs-tab-button:last-child{border-right:none;margin-right:0}.markdown-tabs-tabs-wrapper .markdown-tabs-tab-button:first-child{margin-left:0}.markdown-tabs-tabs-wrapper .markdown-tabs-tab-button:hover{background-color:var(--remons-markdown-color-bg-hover);color:var(--remons-markdown-color-primary)}.markdown-tabs-tabs-wrapper .markdown-tabs-tab-button.active{color:var(--remons-markdown-color-primary);box-shadow:var(--remons-markdown-shadow-inset);position:relative}.markdown-tabs-tabs-wrapper .markdown-tabs-tabs-container{position:relative}.markdown-tabs-tabs-wrapper .markdown-tabs-tab-content{border:1px solid var(--remons-markdown-color-button-border);background-color:var(--remons-markdown-color-button);box-shadow:var(--remons-markdown-shadow-sm);border-radius:0 8px 8px;height:auto;padding:2px 10px 0;display:none;overflow:hidden}.markdown-tabs-tabs-wrapper .markdown-tabs-tab-content.active{display:block}[data-theme=dark] .markdown-tabs-tab-button{color:#afafaf;background:#263238;border-color:#1a1d2e}[data-theme=dark] .markdown-tabs-tab-button:hover{background:#2e3350}[data-theme=dark] .markdown-tabs-tab-button.active{background:#2e3350;border:1px solid #2e3350}[data-theme=dark] .markdown-tabs-tab-content{border-color:#2e3350}:root{--vp-c-grey-text:#656869;--vp-c-grey-hover:#e4e4e9;--vp-c-grey-bg:#ebebef;--vp-c-grey-soft:#8e96aa24;--vp-c-purple-text:#6f42c1;--vp-c-purple-hover:#7e4cc9;--vp-c-purple-bg:#8e5cd9;--vp-c-purple-soft:#9f7aea24;--vp-c-blue-text:#2888a7;--vp-c-blue-hover:#2d98ba;--vp-c-blue-bg:#2fa1c5;--vp-c-blue-soft:#1bb2e524;--vp-c-green-text:#18794e;--vp-c-green-hover:#299764;--vp-c-green-bg:#30a46c;--vp-c-green-soft:#10b98124;--vp-c-yellow-text:#915930;--vp-c-yellow-hover:#946300;--vp-c-yellow-bg:#c28100;--vp-c-yellow-soft:#eab30824;--vp-c-red-text:#b8272c;--vp-c-red-hover:#d5393e;--vp-c-red-bg:#e0575b;--vp-c-red-soft:#f43f5e24}[data-theme=dark]{--vp-c-grey-text:#939499;--vp-c-grey-hover:#414853;--vp-c-grey-bg:#32363f;--vp-c-grey-soft:#65758529;--vp-c-blue-text:#c9e8f2;--vp-c-blue-hover:#a6d9ea;--vp-c-blue-bg:#2785a3;--vp-c-blue-soft:#1bb2e529;--vp-c-purple-text:#c8abfa;--vp-c-purple-hover:#a879e6;--vp-c-purple-bg:#8e5cd9;--vp-c-purple-soft:#9f7aea29;--vp-c-green-text:#3dd68c;--vp-c-green-hover:#30a46c;--vp-c-green-bg:#298459;--vp-c-green-soft:#10b98129;--vp-c-yellow-text:#f9b44e;--vp-c-yellow-hover:#da8b17;--vp-c-yellow-bg:#a46a0a;--vp-c-yellow-soft:#eab30829;--vp-c-red-text:#f66f81;--vp-c-red-hover:#f14158;--vp-c-red-bg:#b62a3c;--vp-c-red-soft:#f43f5e29}.markdown .markdown-alert{color:inherit;border-radius:8px;margin:4px 0 8px;padding:6px 10px}.markdown .markdown-alert blockquote{border-left:none;margin:0;padding:0}.markdown .markdown-alert .markdown-alert-title{font-weight:var(--base-text-weight-medium,500);align-items:center;display:flex;position:relative}.markdown .markdown-alert .markdown-alert-title .iconfont{padding-right:4px}@media print{.markdown .markdown-alert{break-inside:avoid;page-break-inside:avoid}}.markdown .markdown-alert.markdown-alert-note{background:var(--vp-c-grey-soft)}.markdown .markdown-alert.markdown-alert-note .markdown-alert-title{color:var(--vp-c-grey-text)}.markdown .markdown-alert.markdown-alert-important{background:var(--vp-c-purple-soft)}.markdown .markdown-alert.markdown-alert-important .markdown-alert-title{color:var(--vp-c-purple-text)}.markdown .markdown-alert.markdown-alert-tip{background:var(--vp-c-green-soft)}.markdown .markdown-alert.markdown-alert-tip .markdown-alert-title{color:var(--vp-c-green-text)}.markdown .markdown-alert.markdown-alert-warning{background:var(--vp-c-yellow-soft)}.markdown .markdown-alert.markdown-alert-warning .markdown-alert-title{color:var(--vp-c-yellow-text)}.markdown .markdown-alert.markdown-alert-caution{background:var(--vp-c-red-soft)}.markdown .markdown-alert.markdown-alert-caution .markdown-alert-title{color:var(--vp-c-red-text)}.markdown{cursor:initial;box-sizing:border-box;color:var(--remons-markdown-color-text-primary);letter-spacing:.01em;background:var(--remons-markdown-color-bg,#f6f8fa);padding:10px 8px 0;font-family:Inter,Noto Sans SC,-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Microsoft YaHei,sans-serif;font-size:16px;font-weight:400;line-height:1.75}.markdown .markdown-footer{align-items:center;margin-top:10px;font-size:12px;display:flex}.markdown .create-time{background:var(--remons-markdown-color-bg-tooltip,#61616141);color:var(--remons-markdown-color-text,#ffffffde);float:left;border-radius:4px;padding:0 4px;font-weight:400}.markdown h1,.markdown h2,.markdown h3,.markdown h4,.markdown h5,.markdown h6{color:var(--remons-markdown-color-text-primary);letter-spacing:0;font-weight:700;line-height:1.35;position:relative}.markdown h1,.markdown h2,.markdown h3,.markdown h4{margin:6px 0}.markdown h5,.markdown h6{margin:4px 0}.markdown h1:first-child,.markdown h2:first-child,.markdown h3:first-child,.markdown h4:first-child,.markdown h5:first-child,.markdown h6:first-child{margin-top:0}.markdown h1{font-size:22px}.markdown h2{font-size:20px}.markdown h3{font-size:18px}.markdown h4{font-size:17px}.markdown h5{font-size:15px}.markdown h6{font-size:14px}.markdown p{word-break:break-word;white-space:pre-line;margin:2px 0 6px;font-size:16px;line-height:22px}.markdown p:empty{margin:0}.markdown ul,.markdown ol{margin:0 0 10px;padding-left:1.5em}.markdown ul li,.markdown ol li{margin:4px 0;font-size:16px;line-height:22px}.markdown ul li p,.markdown ol li p{margin:0}.markdown blockquote{color:var(--remons-markdown-color-text-secondary,#57606a);background:var(--remons-markdown-color-bg-card,#f6f8fa);border-left:4px solid var(--remons-markdown-color-border-dark,#d0d7de);border-radius:0 6px 6px 0;margin:6px 0;padding:4px 6px}.markdown blockquote p:last-child{margin-bottom:0}.markdown img{border-radius:var(--remons-markdown-radius-base,6px);object-fit:cover;object-position:top;cursor:zoom-in;width:auto;max-width:100%;max-height:200px;margin:8px 0;display:block}.markdown table{border:1px solid var(--remons-markdown-color-border-dark,#d0d7de);border-spacing:0;border-collapse:separate;border-radius:6px;max-width:100%;margin:10px 0;display:inline-block;overflow:auto}.markdown table thead{background-color:var(--remons-markdown-color-table-header,#f6f8fa);text-align:left;vertical-align:bottom}.markdown table td,.markdown table th{border-right:1px solid var(--remons-markdown-color-border-dark,#d0d7de);border-bottom:1px solid var(--remons-markdown-color-border-dark,#d0d7de);min-width:56px;padding:6px 8px;font-size:15px;line-height:20px}.markdown table tr:last-child td{border-bottom:0}.markdown table td:last-child,.markdown table th:last-child{border-right:0}@media (prefers-color-scheme:dark){.markdown:not([data-theme]) table thead{background-color:var(--remons-markdown-color-table-header,#2b3046)}}.markdown ul.contains-task-list{padding-left:0}.markdown ul.contains-task-list li.task-list-item{align-items:center;list-style:none;display:flex}.markdown ul.contains-task-list li.task-list-item .task-list-item-checkbox{vertical-align:middle;width:15px;height:15px;margin-right:4px}.markdown .markdown-html{color:var(--remons-markdown-color-text-primary)}.markdown .markdown-html .header-anchor{opacity:0;color:var(--remons-markdown-color-text-placeholder,#999);text-decoration:none;transition:opacity .2s ease-in-out}.markdown .markdown-html h1:hover .header-anchor,.markdown .markdown-html h2:hover .header-anchor,.markdown .markdown-html h3:hover .header-anchor,.markdown .markdown-html h4:hover .header-anchor,.markdown .markdown-html h5:hover .header-anchor,.markdown .markdown-html h6:hover .header-anchor{opacity:1}.markdown code{color:#c7254df1;background:#f9f2f4;border-radius:5px;margin:0 2px;padding:2px 6px;font-family:Consolas,Inter,Noto Sans SC,-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Microsoft YaHei,sans-serif;font-size:.9em;line-height:1.5}.markdown pre:has(code.mermaid-render-noCode){display:none}.markdown pre{color:#f8f8f2;cursor:auto;background-color:#263238;border-radius:10px;margin:10px 0;font-family:Consolas,Inter,Noto Sans SC,-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Microsoft YaHei,sans-serif;font-size:14px;font-weight:400;line-height:1.6;position:relative;overflow:hidden;box-shadow:inset 5px 5px 10px #0f1416,inset -5px -5px 10px #3d505a}.markdown pre code{width:calc(100% - 32px);color:inherit;font-size:inherit;line-height:inherit;background-color:#0000;border-radius:0;margin:0;padding:4px 16px 0;display:inline-block;overflow:auto}.markdown pre .pre-handle{color:#c9d1d9;background:#242933;justify-content:space-between;align-items:center;height:32px;padding-left:16px;padding-right:10px;font-size:12px;line-height:32px;display:flex}.markdown pre .pre-handle>span{font-family:var(--remons-markdown-font-family-editor);align-items:center;display:inline-flex}.markdown pre .pre-handle img{width:36px;height:8px;margin:0 6px 0 0}.markdown pre .pre-handle .code-toggle{margin-left:10px}.markdown pre .pre-handle .copy,.markdown pre .pre-handle .code-toggle{cursor:pointer;font-size:14px}.markdown pre.code-collapsed{max-height:32px;overflow:hidden}.markdown pre.code-collapsed code{overflow:hidden}.markdown a{color:var(--remons-markdown-color-text-primary)}.markdown iframe{border-radius:var(--remons-markdown-radius-base,6px);width:100%;max-height:300px}.markdown .katex .katex-base{font-family:math;font-size:14px}:where(.markdown) a{text-decoration:underline}html[data-theme=dark] .markdown table thead{background-color:var(--remons-markdown-color-table-header,#2b3046)}@media screen and (width<=500px){.markdown iframe{max-height:150px}}@media print{.markdown table{width:100%;display:table}.code-handle{display:none!important}.katex-mathml{display:none}}._tocToggle_gf6l6_1{position:absolute;top:50px;right:20px}._modal-mask_dzv9e_4{z-index:1000;opacity:0;background-color:#00000073;justify-content:center;align-items:center;transition:opacity .3s;display:flex;position:fixed;inset:0}._modal-mask-visible_dzv9e_18{opacity:1}._modal_dzv9e_4{background:#fff;border-radius:8px;flex-direction:column;max-height:90vh;transition:transform .3s;display:flex;transform:scale(.9);box-shadow:0 6px 16px #00000026}._modal-mask-visible_dzv9e_18 ._modal_dzv9e_4{transform:scale(1)}._modal-header_dzv9e_34{border-bottom:1px solid #f0f0f0;justify-content:space-between;align-items:center;padding:10px;display:flex}._modal-title_dzv9e_41{color:#333;font-size:16px;font-weight:500}._modal-close_dzv9e_46{color:#999;cursor:pointer;border-radius:4px;justify-content:center;align-items:center;width:32px;height:32px;font-size:20px;transition:all .2s;display:flex}._modal-close_dzv9e_46:hover{color:#333;background-color:#f5f5f5}._modal-body_dzv9e_62{flex:1;padding:6px;overflow:auto}._modal-footer_dzv9e_67{text-align:right;border-top:1px solid #f0f0f0;padding:16px 24px}[data-theme=dark] ._modal_dzv9e_4{background:#2e3350;box-shadow:0 6px 16px #0006}[data-theme=dark] ._modal-header_dzv9e_34{border-bottom:1px solid #3d4258}[data-theme=dark] ._modal-title_dzv9e_41{color:#e8ecf4}[data-theme=dark] ._modal-close_dzv9e_46{color:#8892a4}[data-theme=dark] ._modal-close_dzv9e_46:hover{color:#e8ecf4;background-color:#3d4258}[data-theme=dark] ._modal-footer_dzv9e_67{border-top:1px solid #3d4258}._tooltip_1kuma_4{display:inline-block}._tooltip-trigger_1kuma_7{cursor:pointer;display:inline-block}._tooltip-inner_1kuma_11{color:#fff;white-space:nowrap;z-index:1070;opacity:0;pointer-events:none;background:#000000bf;border-radius:4px;margin-left:-5px;padding:6px 10px;font-size:12px;line-height:1.5;transition:opacity .2s;position:fixed;transform:translate(-50%,-100%)translateY(0)}._tooltip-inner-visible_1kuma_27{opacity:1}._tooltip-content_1kuma_30{text-overflow:ellipsis;white-space:nowrap;max-width:250px;overflow:hidden}._tooltip-arrow_1kuma_36{border:5px solid #0000;border-top-color:#000000bf;width:0;height:0;position:absolute;top:100%;left:50%;transform:translate(-50%)}._dropdown_13j0u_4{display:inline-block;position:relative}._dropdown-trigger_13j0u_8{cursor:pointer;display:inline-block}._dropdown-menu_13j0u_12{z-index:1050;opacity:0;background:#fff;border-radius:6px;margin-top:4px;padding:4px 0;transition:opacity .2s,transform .2s;position:absolute;top:100%;right:0;transform:translateY(8px);box-shadow:0 4px 12px #00000026}._dropdown-menu-visible_13j0u_26{opacity:1;transform:translateY(0)}._dropdown-item_13j0u_30{white-space:nowrap;color:#333;cursor:pointer;padding:4px 8px;font-size:12px;transition:background-color .2s}._dropdown-item_13j0u_30:hover{background-color:#f5f5f5}._dropdown-item_13j0u_30:active{background-color:#e8e8e8}[data-theme=dark] ._dropdown-menu_13j0u_12{background:#2e3350;box-shadow:0 4px 12px #0006}[data-theme=dark] ._dropdown-item_13j0u_30{color:#e8ecf4}[data-theme=dark] ._dropdown-item_13j0u_30:hover{background-color:#3d4258}[data-theme=dark] ._dropdown-item_13j0u_30:active{background-color:#1e2235}._previewArea_10gpc_2{background:var(--remons-markdown-color-bg-card,#f8f9fa);cursor:grab;border-radius:var(--remons-markdown-radius-base);width:100%;height:100%;position:relative;overflow:hidden}._previewArea_10gpc_2:active{cursor:grabbing}.mermaid-mini ._previewArea_10gpc_2{visibility:hidden}.print-preview ._previewArea_10gpc_2{background:0 0}._previewAreaDisabled_10gpc_22._previewArea_10gpc_2,._previewAreaDisabled_10gpc_22._previewArea_10gpc_2:active{cursor:default}._previewContent_10gpc_31{transform-origin:50%;touch-action:pan-y;justify-content:center;align-items:center;width:100%;height:100%;display:flex}._previewContent_10gpc_31 svg{max-width:100%;max-height:100%;display:block;font-family:var(--remons-markdown-font-family-base)!important}._errorTip_10gpc_47{color:var(--remons-markdown-color-danger,#ef4444);word-break:break-all;background:#fef2f2;border-bottom:1px solid #fee2e2;flex-shrink:0;max-height:120px;padding:8px 12px;font-size:12px;overflow:auto}._emptyTip_10gpc_59{color:var(--remons-markdown-color-text-light,#9ca3af);pointer-events:none;justify-content:center;align-items:center;font-size:14px;display:flex;position:absolute;inset:0}.mermaid-react-root{min-height:36px;margin:10px 0}.mermaid-wrapper,.mermaid-loading{background-color:var(--remons-markdown-mermaid-surface,transparent);border-radius:var(--remons-markdown-radius-base);border:1px solid var(--remons-markdown-color-border,#e4e4e4);box-sizing:border-box;transition:background-color .3s ease-in-out;position:relative;overflow:hidden}.mermaid-wrapper.mermaid-mini,.mermaid-loading.mermaid-mini{max-height:36px}.mermaid-wrapper.print-preview,.mermaid-loading.print-preview{background-color:#0000}.mermaid-wrapper.mermaid-collapsed,.mermaid-loading.mermaid-collapsed{max-height:200px}.mermaid-wrapper.mermaid-collapsed:after,.mermaid-loading.mermaid-collapsed:after{pointer-events:none;content:"";background:linear-gradient(to bottom, transparent, var(--remons-markdown-color-bg-white));height:28px;position:absolute;bottom:0;left:0;right:0}.mermaid-wrapper.mermaid-wrapper-fullscreen{background:var(--remons-markdown-mermaid-fullscreen-bg)}.mermaid-wrapper.mermaid-wrapper-fullscreen.mermaid-collapsed{max-height:none}.mermaid-wrapper.mermaid-wrapper-fullscreen:fullscreen{overflow:hidden}.mermaid-wrapper.mermaid-wrapper-fullscreen:fullscreen .mermaid-toolbar{top:4px;right:8px}.mermaid-loading{justify-content:center;align-items:center;height:200px;display:flex}.mermaid-wrapper svg{display:block}.mermaid-title{align-items:center;font-size:14px;line-height:34px;display:none;position:absolute;left:6px}.mermaid-title .mermaid-title-tag{color:#fc366e;background:#fdf1f6;border-radius:4px;align-items:center;margin-right:4px;display:flex;overflow:hidden}.mermaid-title .mermaid-title-text{box-sizing:border-box;border:1px solid #fc366e;border-left:0;border-radius:0 4px 4px 0;height:20px;margin-left:-1px;padding-left:5px;padding-right:4px;font-size:12px;line-height:18px;display:inline-block}.mermaid-title img{border-radius:0;width:auto;height:20px;margin:0;display:inline-block}.mermaid-mini .mermaid-title{display:flex}.mermaid-toolbar,.mermaid-toolbar-loading{z-index:1;gap:4px;display:inline-flex;position:absolute;top:4px;right:4px}.mermaid-toolbar .remons-markdown-circle,.mermaid-toolbar-loading .remons-markdown-circle{width:24px;height:24px;font-size:12px}.mermaid-toolbar-loading{margin-right:10px}.driver-popover button{box-shadow:none!important}.mermaid-code-modal .markdown{margin-bottom:10px;padding:0 6px}.mermaid-code-modal .markdown pre{margin:0}@media screen and (width<=500px){.mermaid-title{font-size:12px}}:root,html[data-theme=light]{--remons-markdown-color-bg:transparent;--remons-markdown-color-bg-card:transparent;--remons-markdown-color-button:#ffffff26;--remons-markdown-color-toc:#fffc;--remons-markdown-color-bg-white:#fff;--remons-markdown-color-bg-tooltip:#61616141;--remons-markdown-color-text:#61677c;--remons-markdown-color-text-primary:#202124;--remons-markdown-color-text-secondary:#595959;--remons-markdown-color-text-light:#6b7280;--remons-markdown-color-text-placeholder:#999;--remons-markdown-color-shadow:#babecc;--remons-markdown-color-shadow-light:#fff;--remons-markdown-shadow-sm:0 2px 8px #0000000f;--remons-markdown-shadow-inset:inset 1px 1px 2px var(--remons-markdown-color-shadow), inset -1px -1px 2px var(--remons-markdown-color-shadow-light);--remons-markdown-color-primary:#1890ff;--remons-markdown-color-warning:#faad14;--remons-markdown-color-danger:#ef4444;--remons-markdown-color-bg-hover:#f5f5f5;--remons-markdown-color-bg-active:#e6f7ff;--remons-markdown-color-bg-hover-light:#0000000d;--remons-markdown-color-primary-shadow:#1890ff1a;--remons-markdown-color-border:#dbdada;--remons-markdown-color-border-dark:#d0d7de;--remons-markdown-color-button-border:#fffc;--remons-markdown-mermaid-surface:transparent;--remons-markdown-color-table-header:#eef1f4;--remons-markdown-tabs-mask:#fff9;--remons-markdown-font-family-base:Inter, Noto Sans SC, -apple-system, BlinkMacSystemFont, Segoe UI, PingFang SC, Microsoft YaHei, sans-serif;--remons-markdown-font-family-editor:SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;--remons-markdown-radius-base:8px;--remons-markdown-bg-gradient:linear-gradient(137deg, #e5f4ff 0%, #efe7ff 100%);--remons-markdown-mermaid-fullscreen-bg:linear-gradient(137deg, #e5f4ff 0%, #efe7ff 100%)}html[data-theme=dark]{--remons-markdown-color-bg:#1a1d2e;--remons-markdown-color-bg-card:#1e2235;--remons-markdown-color-toc:#1e2235b3;--remons-markdown-color-bg-white:#2e3350;--remons-markdown-color-bg-tooltip:#2e3350;--remons-markdown-color-button:#1e2235b3;--remons-markdown-color-text:#b0b8c8;--remons-markdown-color-text-primary:#e8ecf4;--remons-markdown-color-text-secondary:#8892a4;--remons-markdown-color-text-light:#8892a4;--remons-markdown-color-text-placeholder:#6b7280;--remons-markdown-color-shadow:#12141f;--remons-markdown-color-shadow-light:#28304a;--remons-markdown-shadow-sm:-5px -5px 10px var(--remons-markdown-color-shadow-light), 5px 5px 10px var(--remons-markdown-color-shadow);--remons-markdown-shadow-inset:inset 1px 1px 2px var(--remons-markdown-color-shadow), inset -1px -1px 2px var(--remons-markdown-color-shadow-light);--remons-markdown-color-danger:#ef4444;--remons-markdown-color-primary:#40a9ff;--remons-markdown-color-warning:#faad14;--remons-markdown-color-bg-hover:#363b54;--remons-markdown-color-bg-active:#1c3a5f;--remons-markdown-color-bg-hover-light:#ffffff0d;--remons-markdown-color-primary-shadow:#40a9ff26;--remons-markdown-color-border:#2e3350;--remons-markdown-color-border-dark:#3d4258;--remons-markdown-color-button-border:#ffffff1a;--remons-markdown-mermaid-surface:#2e3350;--remons-markdown-color-table-header:#28304a;--remons-markdown-tabs-mask:#2e335099;--remons-markdown-font-family-base:Inter, Noto Sans SC, -apple-system, BlinkMacSystemFont, Segoe UI, PingFang SC, Microsoft YaHei, sans-serif;--remons-markdown-font-family-editor:SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;--remons-markdown-radius-base:8px;--remons-markdown-bg-gradient:linear-gradient(137deg, #e5f4ff 0%, #efe7ff 100%);--remons-markdown-mermaid-fullscreen-bg:linear-gradient(137deg, #1a1d2e 0%, #232840 100%)}@font-face{font-family:Inter;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v20/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfMZg.ttf)format("truetype")}@font-face{font-family:Inter;font-style:normal;font-weight:500;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v20/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuI6fMZg.ttf)format("truetype")}@font-face{font-family:Inter;font-style:normal;font-weight:600;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v20/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuGKYMZg.ttf)format("truetype")}@font-face{font-family:Inter;font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v20/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuFuYMZg.ttf)format("truetype")}@font-face{font-family:Noto Sans SC;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/notosanssc/v41/k3kCo84MPvpLmixcA63oeAL7Iqp5IZJF9bmaG9_FnYw.ttf)format("truetype")}@font-face{font-family:Noto Sans SC;font-style:normal;font-weight:500;font-display:swap;src:url(https://fonts.gstatic.com/s/notosanssc/v41/k3kCo84MPvpLmixcA63oeAL7Iqp5IZJF9bmaG-3FnYw.ttf)format("truetype")}@font-face{font-family:Noto Sans SC;font-style:normal;font-weight:600;font-display:swap;src:url(https://fonts.gstatic.com/s/notosanssc/v41/k3kCo84MPvpLmixcA63oeAL7Iqp5IZJF9bmaGwHCnYw.ttf)format("truetype")}@font-face{font-family:Noto Sans SC;font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/notosanssc/v41/k3kCo84MPvpLmixcA63oeAL7Iqp5IZJF9bmaGzjCnYw.ttf)format("truetype")}.remons-markdown-circle{background-color:var(--color-bg-white);width:40px;height:40px;box-shadow:var(--remons-markdown-shadow-sm);cursor:pointer;border:1px solid var(--remons-markdown-color-button-border);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:100%;justify-content:center;align-items:center;padding:0;transition:box-shadow .2s ease-in-out;display:inline-flex}.remons-markdown-circle:hover{box-shadow:-2px -2px 5px var(--remons-markdown-color-shadow-light), 2px 2px 5px var(--remons-markdown-color-shadow)}.remons-markdown-circle:active{box-shadow:var(--remons-markdown-shadow-inset)}@media screen and (width<=500px){.remons-markdown-circle{box-shadow:-2px -2px 10px var(--remons-markdown-color-shadow-light), 2px 2px 10px var(--remons-markdown-color-shadow);width:30px;height:30px;font-size:12px}}.driver-popover{all:unset;font-family:var(--driver-popover-font-family,"Helvetica Neue", Inter, ui-sans-serif, "Apple Color Emoji", Helvetica, Arial, sans-serif);box-sizing:border-box;color:#2d2d2d;z-index:1000000000;background-color:#fff;border-radius:5px;min-width:250px;max-width:300px;margin:0;padding:15px;position:fixed;top:0;right:0;box-shadow:0 1px 10px #0006}.driver-popover-title{zoom:1;margin:0;font-size:19px;font-weight:700;line-height:1.5;display:block;position:relative}.driver-popover-close-btn{all:unset;cursor:pointer;color:#d2d2d2;z-index:1;text-align:center;width:32px;height:28px;font-size:18px;font-weight:500;transition:color .2s;position:absolute;top:0;right:0}.driver-popover-close-btn:hover,.driver-popover-close-btn:focus{color:#2d2d2d}.driver-popover-title[style*=block]+.driver-popover-description{margin-top:5px}.driver-popover-description{zoom:1;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.5}.driver-popover-footer{text-align:right;zoom:1;justify-content:space-between;align-items:center;margin-top:15px;display:flex}.driver-popover-progress-text{color:#727272;zoom:1;font-size:13px;font-weight:400}.driver-popover-footer-btn{all:unset;box-sizing:border-box;color:#2d2d2d;cursor:pointer;zoom:1;background-color:#fff;border:1px solid #ccc;border-radius:3px;outline:0;padding:3px 7px;font-size:12px;line-height:1.3;text-decoration:none;display:inline-block}.driver-popover-footer .driver-popover-btn-disabled{opacity:.5;pointer-events:none}.driver-popover-footer-btn:hover,.driver-popover-footer-btn:focus{background-color:#f7f7f7}.driver-popover-navigation-btns{flex-grow:1;justify-content:flex-end;display:flex}.driver-popover-navigation-btns button+button{margin-left:4px}.driver-popover-arrow{content:"";border:5px solid #fff;position:absolute}.driver-popover-arrow-side-over{display:none}.driver-popover-arrow-side-left{border-top-color:#0000;border-bottom-color:#0000;border-right-color:#0000;left:100%}.driver-popover-arrow-side-right{border-top-color:#0000;border-bottom-color:#0000;border-left-color:#0000;right:100%}.driver-popover-arrow-side-top{border-bottom-color:#0000;border-left-color:#0000;border-right-color:#0000;top:100%}.driver-popover-arrow-side-bottom{border-top-color:#0000;border-left-color:#0000;border-right-color:#0000;bottom:100%}.driver-popover-arrow-side-center,.driver-popover-arrow-none{display:none}.driver-active .driver-overlay{pointer-events:none}.driver-active.driver-no-scroll{overflow:hidden}.driver-active *{pointer-events:none}.driver-active .driver-active-element,.driver-active .driver-active-element *,.driver-popover,.driver-popover *{pointer-events:auto}@keyframes animate-fade-in{0%{opacity:0}to{opacity:1}}.driver-fade .driver-overlay{animation:animate-fade-in var(--driver-animation-duration,.4s) ease-in-out}.driver-fade .driver-popover{animation:animate-fade-in var(--driver-animation-duration,.4s)}.driver-active-element-parent-no-scroll{overflow:hidden!important}.driver-no-interaction,.driver-no-interaction *{pointer-events:none!important}
1
+ @import "https://at.alicdn.com/t/c/font_2004544_gigrjtfsf6.css";._container_1a6ji_4{z-index:10000;pointer-events:none;flex-direction:column;align-items:center;gap:8px;display:flex;position:fixed;top:8vh;left:50%;transform:translate(-50%)}._item_1a6ji_16{pointer-events:auto}._toast_1a6ji_19{background-color:var(--remons-markdown-color-bg-white);box-shadow:var(--remons-markdown-shadow-sm);border-radius:6px;align-items:center;gap:8px;min-width:200px;padding:10px 20px;font-size:14px;animation:.3s _fadeIn_1a6ji_1;display:flex}._toast-warning_1a6ji_31{color:#faad14}._toast-info_1a6ji_34{color:#1890ff}._toast-error_1a6ji_37{color:#ff4d4f}._toast-success_1a6ji_40{color:#52c41a}@keyframes _fadeIn_1a6ji_1{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}._back-top_gdg5d_4{position:fixed;bottom:20px;right:20px}@media screen and (width<=500px){._back-top_gdg5d_4{width:30px;height:30px}}._empty_container_fkmsv_3{color:#999;flex-direction:column;justify-content:center;align-items:center;gap:12px;height:100%;display:flex}._description_fkmsv_12{font-size:14px}._tocSidebar_emxjv_1{background:var(--remons-markdown-color-toc);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);width:280px;max-height:calc(100vh - 120px);box-shadow:var(--remons-markdown-shadow-sm);z-index:1000;border:1px solid var(--remons-markdown-color-button-border);opacity:0;transform-origin:100% 0;pointer-events:none;border-radius:8px;flex-direction:column;transition:opacity .2s,transform .2s;display:flex;position:absolute;top:100px;right:32px;transform:translateY(-8px)scale(.98)}._tocSidebar_emxjv_1._open_emxjv_16{opacity:1;pointer-events:auto;transform:translateY(0)scale(1)}._tocHeader_emxjv_31{border-bottom:1px solid var(--remons-markdown-color-border);justify-content:space-between;align-items:center;padding:8px 10px;display:flex}._tocHeader_emxjv_31 ._tocTitle_emxjv_38{color:var(--remons-markdown-color-text-primary);font-size:14px;font-weight:600}._tocHeader_emxjv_31 ._tocActions_emxjv_43{align-items:center;gap:6px;display:flex}._tocHeader_emxjv_31 ._tocActions_emxjv_43 .remons-markdown-circle{width:22px;height:22px;font-size:12px}._tocSearchBar_emxjv_53{border-bottom:1px solid var(--remons-markdown-color-border);background:var(--remons-markdown-color-bg);align-items:center;padding:6px 8px;display:flex}._tocSearchBar_emxjv_53 ._tocSearchInput_emxjv_60{border:1px solid var(--remons-markdown-color-border);background:var(--remons-markdown-color-bg);height:28px;color:var(--remons-markdown-color-text);border-radius:4px;outline:none;flex:1;padding:0 8px;font-size:13px}._tocSearchBar_emxjv_53 ._tocSearchInput_emxjv_60::placeholder{color:var(--remons-markdown-color-text-placeholder)}._tocSearchBar_emxjv_53 ._tocSearchInput_emxjv_60:focus{border-color:var(--remons-markdown-color-primary);box-shadow:0 0 0 2px var(--remons-markdown-color-primary-shadow)}._tocSearchBar_emxjv_53 ._tocSearchClear_emxjv_78{cursor:pointer;color:var(--remons-markdown-color-text-placeholder);border-radius:2px;margin-left:4px;padding:4px;font-size:12px;transition:color .2s}._tocSearchBar_emxjv_53 ._tocSearchClear_emxjv_78:hover{color:var(--remons-markdown-color-text-primary)}._tocSearchBar_emxjv_53 ._tocSearchExit_emxjv_90{cursor:pointer;color:var(--remons-markdown-color-text-placeholder);border-radius:4px;margin-left:4px;padding:4px;font-size:16px;transition:color .2s}._tocSearchBar_emxjv_53 ._tocSearchExit_emxjv_90:hover{color:var(--remons-markdown-color-text-primary);background:var(--remons-markdown-color-bg-hover-light)}._tocBody_emxjv_103{flex:1;padding:8px 0 8px 6px;overflow-y:auto}._tocItem_emxjv_109 ._tocItemTitle_emxjv_109{cursor:pointer;border-radius:4px;align-items:center;padding:4px 10px;line-height:20px;transition:all .2s;display:flex;position:relative}._tocItem_emxjv_109 ._tocItemTitle_emxjv_109._active_emxjv_119{color:var(--remons-markdown-color-primary)}._tocItem_emxjv_109 ._tocItemTitle_emxjv_109._active_emxjv_119 ._tocLink_emxjv_122{color:var(--remons-markdown-color-primary);font-weight:500}._tocItem_emxjv_109 ._tocItemTitle_emxjv_109 ._tocExpandIcon_emxjv_126{color:var(--remons-markdown-color-text-placeholder);cursor:pointer;justify-content:center;align-items:center;width:16px;height:16px;font-size:10px;display:flex;position:absolute;left:-6px}._tocItem_emxjv_109 ._tocItemTitle_emxjv_109 ._tocExpandIcon_emxjv_126:hover{color:var(--remons-markdown-color-text)}._tocItem_emxjv_109 ._tocItemTitle_emxjv_109 ._tocLink_emxjv_122{color:var(--remons-markdown-color-text);text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:13px;text-decoration:none;overflow:hidden}._tocItem_emxjv_109 ._tocItemTitle_emxjv_109 ._tocLink_emxjv_122:hover{color:var(--remons-markdown-color-primary)}._tocChildren_emxjv_153{overflow:hidden}._highlight_emxjv_156{color:var(--remons-markdown-color-warning);font-weight:600}._tocEmpty_emxjv_160{text-align:center;color:var(--remons-markdown-color-text-placeholder);padding:20px 12px;font-size:13px}@media screen and (width<=500px){._tocSidebar_emxjv_1{width:250px;max-height:calc(100vh - 100px);line-height:18px;top:90px;right:32px}._tocHeader_emxjv_31{padding:4px 6px}._tocHeader_emxjv_31 ._tocTitle_emxjv_38{font-size:12px}._tocSearchBar_emxjv_53{padding:4px 6px}._tocSearchBar_emxjv_53 ._tocSearchInput_emxjv_60{height:24px;padding:0 4px;font-size:12px}._tocSearchBar_emxjv_53 ._tocSearchExit_emxjv_90{font-size:14px}._tocBody_emxjv_103{padding:2px 0}._tocItem_emxjv_109 ._tocItemTitle_emxjv_109{padding:2px 6px}._tocItem_emxjv_109 ._tocItemTitle_emxjv_109 ._tocLink_emxjv_122{font-size:12px}._tocItem_emxjv_109 ._tocItemTitle_emxjv_109 ._tocExpandIcon_emxjv_126{width:12px;height:12px;font-size:8px}._tocEmpty_emxjv_160{padding:10px 6px;font-size:12px}}.pswp{--pswp-bg:#000;--pswp-placeholder-bg:#222;--pswp-root-z-index:100000;--pswp-preloader-color:#4f4f4f66;--pswp-preloader-color-secondary:#ffffffe6;--pswp-icon-color:#fff;--pswp-icon-color-secondary:#4f4f4f;--pswp-icon-stroke-color:#4f4f4f;--pswp-icon-stroke-width:2px;--pswp-error-text-color:var(--pswp-icon-color);width:100%;height:100%;z-index:var(--pswp-root-z-index);touch-action:none;opacity:.003;contain:layout style size;-webkit-tap-highlight-color:#0000;outline:0;display:none;position:fixed;top:0;left:0}.pswp:focus{outline:0}.pswp *{box-sizing:border-box}.pswp img{max-width:none}.pswp--open{display:block}.pswp,.pswp__bg{will-change:opacity;transform:translateZ(0)}.pswp__bg{opacity:.005;background:var(--pswp-bg)}.pswp,.pswp__scroll-wrap{overflow:hidden}.pswp__scroll-wrap,.pswp__bg,.pswp__container,.pswp__item,.pswp__content,.pswp__img,.pswp__zoom-wrap{width:100%;height:100%;position:absolute;top:0;left:0}.pswp__img,.pswp__zoom-wrap{width:auto;height:auto}.pswp--click-to-zoom.pswp--zoom-allowed .pswp__img{cursor:-webkit-zoom-in;cursor:-moz-zoom-in;cursor:zoom-in}.pswp--click-to-zoom.pswp--zoomed-in .pswp__img{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.pswp--click-to-zoom.pswp--zoomed-in .pswp__img:active{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.pswp--no-mouse-drag.pswp--zoomed-in .pswp__img,.pswp--no-mouse-drag.pswp--zoomed-in .pswp__img:active,.pswp__img{cursor:-webkit-zoom-out;cursor:-moz-zoom-out;cursor:zoom-out}.pswp__container,.pswp__img,.pswp__button,.pswp__counter{-webkit-user-select:none;user-select:none}.pswp__item{z-index:1;overflow:hidden}.pswp__hidden{display:none!important}.pswp__content{pointer-events:none}.pswp__content>*{pointer-events:auto}.pswp__error-msg-container{display:grid}.pswp__error-msg{color:var(--pswp-error-text-color);margin:auto;font-size:1em;line-height:1}.pswp .pswp__hide-on-close{opacity:.005;will-change:opacity;transition:opacity var(--pswp-transition-duration) cubic-bezier(.4, 0, .22, 1);z-index:10;pointer-events:none}.pswp--ui-visible .pswp__hide-on-close{opacity:1;pointer-events:auto}.pswp__button{cursor:pointer;width:50px;height:60px;box-shadow:none;opacity:.85;-webkit-appearance:none;-webkit-touch-callout:none;background:0 0;border:0;margin:0;padding:0;display:block;position:relative;overflow:hidden}.pswp__button:hover,.pswp__button:active,.pswp__button:focus{box-shadow:none;opacity:1;background:0 0;border:0;padding:0;transition:none}.pswp__button:disabled{opacity:.3;cursor:auto}.pswp__icn{fill:var(--pswp-icon-color);color:var(--pswp-icon-color-secondary);pointer-events:none;width:32px;height:32px;position:absolute;top:14px;left:9px;overflow:hidden}.pswp__icn-shadow{stroke:var(--pswp-icon-stroke-color);stroke-width:var(--pswp-icon-stroke-width);fill:none}.pswp__icn:focus{outline:0}div.pswp__img--placeholder,.pswp__img--with-bg{background:var(--pswp-placeholder-bg)}.pswp__top-bar{z-index:10;flex-direction:row;justify-content:flex-end;width:100%;height:60px;display:flex;position:absolute;top:0;left:0;pointer-events:none!important}.pswp__top-bar>*{pointer-events:auto;will-change:opacity}.pswp__button--close{margin-right:6px}.pswp__button--arrow{width:75px;height:100px;margin-top:-50px;position:absolute;top:50%}.pswp__button--arrow:disabled{cursor:default;display:none}.pswp__button--arrow .pswp__icn{background:0 0;border-radius:0;width:60px;height:60px;margin-top:-30px;top:50%}.pswp--one-slide .pswp__button--arrow{display:none}.pswp--touch .pswp__button--arrow{visibility:hidden}.pswp--has_mouse .pswp__button--arrow{visibility:visible}.pswp__button--arrow--prev{left:0;right:auto}.pswp__button--arrow--next{right:0}.pswp__button--arrow--next .pswp__icn{left:auto;right:14px;transform:scaleX(-1)}.pswp__button--zoom{display:none}.pswp--zoom-allowed .pswp__button--zoom{display:block}.pswp--zoomed-in .pswp__zoom-icn-bar-v{display:none}.pswp__preloader{width:50px;height:60px;margin-right:auto;position:relative;overflow:hidden}.pswp__preloader .pswp__icn{opacity:0;transition:opacity .2s linear;animation:.6s linear infinite pswp-clockwise}.pswp__preloader--active .pswp__icn{opacity:.85}@keyframes pswp-clockwise{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.pswp__counter{margin-top:15px;height:30px;color:var(--pswp-icon-color);text-shadow:1px 1px 3px var(--pswp-icon-color-secondary);opacity:.85;margin-inline-start:20px;font-size:14px;line-height:30px}.pswp--one-slide .pswp__counter{display:none}.pswp.md-image-preview{--pswp-bg:#12141eb8}html[data-theme=dark] .pswp.md-image-preview{--pswp-bg:#060810c7}.pswp.md-image-preview .pswp__bg{-webkit-backdrop-filter:blur(6px)saturate(1.1)}.pswp.md-image-preview .pswp__top-bar{background-image:linear-gradient(#00000052,#0000)}.hljs{color:#f8f8f2;background:#23241f}.hljs-tag,.hljs-subst{color:#f8f8f2}.hljs-strong,.hljs-emphasis{color:#a8a8a2}.hljs-bullet,.hljs-quote,.hljs-number,.hljs-regexp,.hljs-literal,.hljs-link{color:#ae81ff}.hljs-code,.hljs-title,.hljs-section,.hljs-selector-class{color:#a6e22e}.hljs-strong{font-weight:700}.hljs-keyword,.hljs-selector-tag,.hljs-name,.hljs-attr{color:#f92672}.hljs-symbol,.hljs-attribute{color:#66d9ef}.hljs-params,.hljs-title.class_,.hljs-class .hljs-title{color:#f8f8f2}.hljs-string,.hljs-type,.hljs-built_in,.hljs-selector-id,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-addition,.hljs-variable,.hljs-template-variable{color:#e6db74}.hljs-comment,.hljs-deletion,.hljs-meta{color:#75715e;font-family:Consolas,Inter,Noto Sans SC,-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Microsoft YaHei,sans-serif}.markdown-tabs-tabs-wrapper{border-radius:4px;margin-top:2px;position:relative}.markdown-tabs-tabs-wrapper:after{content:"";pointer-events:none;z-index:10;opacity:0;height:30px;transition:opacity .4s;position:absolute;top:0;left:0;right:0}.markdown-tabs-tabs-wrapper.has-left-mask:after{opacity:1;background:linear-gradient(to right, var(--remons-markdown-tabs-mask,#fff9) 0%, transparent 15%)}.markdown-tabs-tabs-wrapper.has-right-mask:after{opacity:1;background:linear-gradient(to left, var(--remons-markdown-tabs-mask,#fff9) 0%, transparent 10%)}.markdown-tabs-tabs-wrapper.has-both-masks:after{opacity:1;background:linear-gradient(to right, var(--remons-markdown-tabs-mask,#fff9) 0%, transparent 15%, transparent 85%, var(--remons-markdown-tabs-mask,#fff9) 100%)}.markdown-tabs-tabs-wrapper .markdown-tabs-tabs-header{z-index:2;background:0 0;display:flex;top:0;overflow:auto hidden}.markdown-tabs-tabs-wrapper .markdown-tabs-tabs-header::-webkit-scrollbar{display:none}.markdown-tabs-tabs-wrapper .markdown-tabs-tab-button{cursor:pointer;background-color:var(--remons-markdown-color-button);-webkit-backdrop-filter:blur(10px);border:1px solid var(--remons-markdown-color-button-border);min-width:50px;box-shadow:var(--remons-markdown-shadow-sm);border-bottom:none;border-radius:8px 8px 0 0;margin:0 2px;padding:6px 8px;font-size:14px;font-weight:400;transition:background-color .3s ease-in-out,color .3s ease-in-out;position:relative}.markdown-tabs-tabs-wrapper .markdown-tabs-tab-button:last-child{border-right:none;margin-right:0}.markdown-tabs-tabs-wrapper .markdown-tabs-tab-button:first-child{margin-left:0}.markdown-tabs-tabs-wrapper .markdown-tabs-tab-button:hover{background-color:var(--remons-markdown-color-bg-hover);color:var(--remons-markdown-color-primary)}.markdown-tabs-tabs-wrapper .markdown-tabs-tab-button.active{color:var(--remons-markdown-color-primary);box-shadow:var(--remons-markdown-shadow-inset);position:relative}.markdown-tabs-tabs-wrapper .markdown-tabs-tabs-container{position:relative}.markdown-tabs-tabs-wrapper .markdown-tabs-tab-content{border:1px solid var(--remons-markdown-color-button-border);background-color:var(--remons-markdown-color-button);box-shadow:var(--remons-markdown-shadow-sm);border-radius:0 8px 8px;height:auto;padding:2px 10px 0;display:none;overflow:hidden}.markdown-tabs-tabs-wrapper .markdown-tabs-tab-content.active{display:block}[data-theme=dark] .markdown-tabs-tab-button{color:#afafaf;background:#263238;border-color:#1a1d2e}[data-theme=dark] .markdown-tabs-tab-button:hover{background:#2e3350}[data-theme=dark] .markdown-tabs-tab-button.active{background:#2e3350;border:1px solid #2e3350}[data-theme=dark] .markdown-tabs-tab-content{border-color:#2e3350}:root{--vp-c-grey-text:#656869;--vp-c-grey-hover:#e4e4e9;--vp-c-grey-bg:#ebebef;--vp-c-grey-soft:#8e96aa24;--vp-c-purple-text:#6f42c1;--vp-c-purple-hover:#7e4cc9;--vp-c-purple-bg:#8e5cd9;--vp-c-purple-soft:#9f7aea24;--vp-c-blue-text:#2888a7;--vp-c-blue-hover:#2d98ba;--vp-c-blue-bg:#2fa1c5;--vp-c-blue-soft:#1bb2e524;--vp-c-green-text:#18794e;--vp-c-green-hover:#299764;--vp-c-green-bg:#30a46c;--vp-c-green-soft:#10b98124;--vp-c-yellow-text:#915930;--vp-c-yellow-hover:#946300;--vp-c-yellow-bg:#c28100;--vp-c-yellow-soft:#eab30824;--vp-c-red-text:#b8272c;--vp-c-red-hover:#d5393e;--vp-c-red-bg:#e0575b;--vp-c-red-soft:#f43f5e24}[data-theme=dark]{--vp-c-grey-text:#939499;--vp-c-grey-hover:#414853;--vp-c-grey-bg:#32363f;--vp-c-grey-soft:#65758529;--vp-c-blue-text:#c9e8f2;--vp-c-blue-hover:#a6d9ea;--vp-c-blue-bg:#2785a3;--vp-c-blue-soft:#1bb2e529;--vp-c-purple-text:#c8abfa;--vp-c-purple-hover:#a879e6;--vp-c-purple-bg:#8e5cd9;--vp-c-purple-soft:#9f7aea29;--vp-c-green-text:#3dd68c;--vp-c-green-hover:#30a46c;--vp-c-green-bg:#298459;--vp-c-green-soft:#10b98129;--vp-c-yellow-text:#f9b44e;--vp-c-yellow-hover:#da8b17;--vp-c-yellow-bg:#a46a0a;--vp-c-yellow-soft:#eab30829;--vp-c-red-text:#f66f81;--vp-c-red-hover:#f14158;--vp-c-red-bg:#b62a3c;--vp-c-red-soft:#f43f5e29}.markdown .markdown-alert{color:inherit;border-radius:8px;margin:4px 0 8px;padding:6px 10px}.markdown .markdown-alert blockquote{border-left:none;margin:0;padding:0}.markdown .markdown-alert .markdown-alert-title{font-weight:var(--base-text-weight-medium,500);align-items:center;display:flex;position:relative}.markdown .markdown-alert .markdown-alert-title .iconfont{padding-right:4px}@media print{.markdown .markdown-alert{break-inside:avoid;page-break-inside:avoid}}.markdown .markdown-alert.markdown-alert-note{background:var(--vp-c-grey-soft)}.markdown .markdown-alert.markdown-alert-note .markdown-alert-title{color:var(--vp-c-grey-text)}.markdown .markdown-alert.markdown-alert-important{background:var(--vp-c-purple-soft)}.markdown .markdown-alert.markdown-alert-important .markdown-alert-title{color:var(--vp-c-purple-text)}.markdown .markdown-alert.markdown-alert-tip{background:var(--vp-c-green-soft)}.markdown .markdown-alert.markdown-alert-tip .markdown-alert-title{color:var(--vp-c-green-text)}.markdown .markdown-alert.markdown-alert-warning{background:var(--vp-c-yellow-soft)}.markdown .markdown-alert.markdown-alert-warning .markdown-alert-title{color:var(--vp-c-yellow-text)}.markdown .markdown-alert.markdown-alert-caution{background:var(--vp-c-red-soft)}.markdown .markdown-alert.markdown-alert-caution .markdown-alert-title{color:var(--vp-c-red-text)}.markdown{cursor:initial;box-sizing:border-box;color:var(--remons-markdown-color-text-primary);letter-spacing:.01em;background:var(--remons-markdown-color-bg,#f6f8fa);padding:10px 8px 0;font-family:Inter,Noto Sans SC,-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Microsoft YaHei,sans-serif;font-size:16px;font-weight:400;line-height:1.75;position:relative}.markdown .markdown-footer{align-items:center;margin-top:10px;font-size:12px;display:flex}.markdown .create-time{background:var(--remons-markdown-color-bg-tooltip,#61616141);color:var(--remons-markdown-color-text,#ffffffde);float:left;border-radius:4px;padding:0 4px;font-weight:400}.markdown h1,.markdown h2,.markdown h3,.markdown h4,.markdown h5,.markdown h6{color:var(--remons-markdown-color-text-primary);letter-spacing:0;font-weight:700;line-height:1.35;position:relative}.markdown h1,.markdown h2,.markdown h3,.markdown h4{margin:6px 0}.markdown h5,.markdown h6{margin:4px 0}.markdown h1:first-child,.markdown h2:first-child,.markdown h3:first-child,.markdown h4:first-child,.markdown h5:first-child,.markdown h6:first-child{margin-top:0}.markdown h1{font-size:22px}.markdown h2{font-size:20px}.markdown h3{font-size:18px}.markdown h4{font-size:17px}.markdown h5{font-size:15px}.markdown h6{font-size:14px}.markdown p{word-break:break-word;white-space:pre-line;margin:2px 0 6px;font-size:16px;line-height:22px}.markdown p:empty{margin:0}.markdown ul,.markdown ol{margin:0 0 10px;padding-left:1.5em}.markdown ul li,.markdown ol li{margin:4px 0;font-size:16px;line-height:22px}.markdown ul li p,.markdown ol li p{margin:0}.markdown blockquote{color:var(--remons-markdown-color-text-secondary,#57606a);background:var(--remons-markdown-color-bg-card,#f6f8fa);border-left:4px solid var(--remons-markdown-color-border-dark,#d0d7de);border-radius:0 6px 6px 0;margin:6px 0;padding:4px 6px}.markdown blockquote p:last-child{margin-bottom:0}.markdown img{border-radius:var(--remons-markdown-radius-base,6px);object-fit:cover;object-position:top;cursor:zoom-in;width:auto;max-width:100%;max-height:200px;margin:8px 0;display:block}.markdown table{border:1px solid var(--remons-markdown-color-border-dark,#d0d7de);border-spacing:0;border-collapse:separate;border-radius:6px;max-width:100%;margin:10px 0;display:inline-block;overflow:auto}.markdown table thead{background-color:var(--remons-markdown-color-table-header,#f6f8fa);text-align:left;vertical-align:bottom}.markdown table td,.markdown table th{border-right:1px solid var(--remons-markdown-color-border-dark,#d0d7de);border-bottom:1px solid var(--remons-markdown-color-border-dark,#d0d7de);min-width:56px;padding:6px 8px;font-size:15px;line-height:20px}.markdown table tr:last-child td{border-bottom:0}.markdown table td:last-child,.markdown table th:last-child{border-right:0}@media (prefers-color-scheme:dark){.markdown:not([data-theme]) table thead{background-color:var(--remons-markdown-color-table-header,#2b3046)}}.markdown ul.contains-task-list{padding-left:0}.markdown ul.contains-task-list li.task-list-item{align-items:center;list-style:none;display:flex}.markdown ul.contains-task-list li.task-list-item .task-list-item-checkbox{vertical-align:middle;width:15px;height:15px;margin-right:4px}.markdown .markdown-html{color:var(--remons-markdown-color-text-primary)}.markdown .markdown-html .header-anchor{opacity:0;color:var(--remons-markdown-color-text-placeholder,#999);text-decoration:none;transition:opacity .2s ease-in-out}.markdown .markdown-html h1:hover .header-anchor,.markdown .markdown-html h2:hover .header-anchor,.markdown .markdown-html h3:hover .header-anchor,.markdown .markdown-html h4:hover .header-anchor,.markdown .markdown-html h5:hover .header-anchor,.markdown .markdown-html h6:hover .header-anchor{opacity:1}.markdown code{color:#c7254df1;background:#f9f2f4;border-radius:5px;margin:0 2px;padding:2px 6px;font-family:Consolas,Inter,Noto Sans SC,-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Microsoft YaHei,sans-serif;font-size:.9em;line-height:1.5}.markdown pre:has(code.mermaid-render-noCode){display:none}.markdown pre{color:#f8f8f2;cursor:auto;background-color:#263238;border-radius:10px;margin:10px 0;font-family:Consolas,Inter,Noto Sans SC,-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Microsoft YaHei,sans-serif;font-size:14px;font-weight:400;line-height:1.6;position:relative;overflow:hidden;box-shadow:inset 5px 5px 10px #0f1416,inset -5px -5px 10px #3d505a}.markdown pre code{width:calc(100% - 32px);color:inherit;font-size:inherit;line-height:inherit;background-color:#0000;border-radius:0;margin:0;padding:4px 16px 0;display:inline-block;overflow:auto}.markdown pre .pre-handle{color:#c9d1d9;background:#242933;justify-content:space-between;align-items:center;height:32px;padding-left:16px;padding-right:10px;font-size:12px;line-height:32px;display:flex}.markdown pre .pre-handle>span{font-family:var(--remons-markdown-font-family-editor);align-items:center;display:inline-flex}.markdown pre .pre-handle img{width:36px;height:8px;margin:0 6px 0 0}.markdown pre .pre-handle .code-toggle{margin-left:10px}.markdown pre .pre-handle .copy,.markdown pre .pre-handle .code-toggle{cursor:pointer;font-size:14px}.markdown pre.code-collapsed{max-height:32px;overflow:hidden}.markdown pre.code-collapsed code{overflow:hidden}.markdown a{color:var(--remons-markdown-color-text-primary)}.markdown iframe{border-radius:var(--remons-markdown-radius-base,6px);width:100%;max-height:300px}.markdown .katex .katex-base{font-family:math;font-size:14px}.markdown .mdNum{font-family:Segoe UI Symbol,Noto Sans Symbols2,Apple Symbols,PingFang SC,Microsoft YaHei,sans-serif;font-size:1.2em;line-height:1}.markdown .mdNumWide{font-family:Segoe UI Symbol,Noto Sans Symbols2,Apple Symbols,PingFang SC,Microsoft YaHei,sans-serif;font-size:1.14em;line-height:1}.markdown .mdNumCjk{font-family:Segoe UI Symbol,Noto Sans Symbols2,Apple Symbols,PingFang SC,Microsoft YaHei,sans-serif;font-size:1em;line-height:1}:where(.markdown) a{text-decoration:underline}html[data-theme=dark] .markdown table thead{background-color:var(--remons-markdown-color-table-header,#2b3046)}@media screen and (width<=500px){.markdown iframe{max-height:150px}}@media print{.markdown table{width:100%;display:table}.code-handle{display:none!important}.katex-mathml{display:none}}._tocToggle_1egap_1{position:absolute;top:50px;right:32px}._modal-mask_dzv9e_4{z-index:1000;opacity:0;background-color:#00000073;justify-content:center;align-items:center;transition:opacity .3s;display:flex;position:fixed;inset:0}._modal-mask-visible_dzv9e_18{opacity:1}._modal_dzv9e_4{background:#fff;border-radius:8px;flex-direction:column;max-height:90vh;transition:transform .3s;display:flex;transform:scale(.9);box-shadow:0 6px 16px #00000026}._modal-mask-visible_dzv9e_18 ._modal_dzv9e_4{transform:scale(1)}._modal-header_dzv9e_34{border-bottom:1px solid #f0f0f0;justify-content:space-between;align-items:center;padding:10px;display:flex}._modal-title_dzv9e_41{color:#333;font-size:16px;font-weight:500}._modal-close_dzv9e_46{color:#999;cursor:pointer;border-radius:4px;justify-content:center;align-items:center;width:32px;height:32px;font-size:20px;transition:all .2s;display:flex}._modal-close_dzv9e_46:hover{color:#333;background-color:#f5f5f5}._modal-body_dzv9e_62{flex:1;padding:6px;overflow:auto}._modal-footer_dzv9e_67{text-align:right;border-top:1px solid #f0f0f0;padding:16px 24px}[data-theme=dark] ._modal_dzv9e_4{background:#2e3350;box-shadow:0 6px 16px #0006}[data-theme=dark] ._modal-header_dzv9e_34{border-bottom:1px solid #3d4258}[data-theme=dark] ._modal-title_dzv9e_41{color:#e8ecf4}[data-theme=dark] ._modal-close_dzv9e_46{color:#8892a4}[data-theme=dark] ._modal-close_dzv9e_46:hover{color:#e8ecf4;background-color:#3d4258}[data-theme=dark] ._modal-footer_dzv9e_67{border-top:1px solid #3d4258}._tooltip_1kuma_4{display:inline-block}._tooltip-trigger_1kuma_7{cursor:pointer;display:inline-block}._tooltip-inner_1kuma_11{color:#fff;white-space:nowrap;z-index:1070;opacity:0;pointer-events:none;background:#000000bf;border-radius:4px;margin-left:-5px;padding:6px 10px;font-size:12px;line-height:1.5;transition:opacity .2s;position:fixed;transform:translate(-50%,-100%)translateY(0)}._tooltip-inner-visible_1kuma_27{opacity:1}._tooltip-content_1kuma_30{text-overflow:ellipsis;white-space:nowrap;max-width:250px;overflow:hidden}._tooltip-arrow_1kuma_36{border:5px solid #0000;border-top-color:#000000bf;width:0;height:0;position:absolute;top:100%;left:50%;transform:translate(-50%)}._dropdown_13j0u_4{display:inline-block;position:relative}._dropdown-trigger_13j0u_8{cursor:pointer;display:inline-block}._dropdown-menu_13j0u_12{z-index:1050;opacity:0;background:#fff;border-radius:6px;margin-top:4px;padding:4px 0;transition:opacity .2s,transform .2s;position:absolute;top:100%;right:0;transform:translateY(8px);box-shadow:0 4px 12px #00000026}._dropdown-menu-visible_13j0u_26{opacity:1;transform:translateY(0)}._dropdown-item_13j0u_30{white-space:nowrap;color:#333;cursor:pointer;padding:4px 8px;font-size:12px;transition:background-color .2s}._dropdown-item_13j0u_30:hover{background-color:#f5f5f5}._dropdown-item_13j0u_30:active{background-color:#e8e8e8}[data-theme=dark] ._dropdown-menu_13j0u_12{background:#2e3350;box-shadow:0 4px 12px #0006}[data-theme=dark] ._dropdown-item_13j0u_30{color:#e8ecf4}[data-theme=dark] ._dropdown-item_13j0u_30:hover{background-color:#3d4258}[data-theme=dark] ._dropdown-item_13j0u_30:active{background-color:#1e2235}._previewArea_10gpc_2{background:var(--remons-markdown-color-bg-card,#f8f9fa);cursor:grab;border-radius:var(--remons-markdown-radius-base);width:100%;height:100%;position:relative;overflow:hidden}._previewArea_10gpc_2:active{cursor:grabbing}.mermaid-mini ._previewArea_10gpc_2{visibility:hidden}.print-preview ._previewArea_10gpc_2{background:0 0}._previewAreaDisabled_10gpc_22._previewArea_10gpc_2,._previewAreaDisabled_10gpc_22._previewArea_10gpc_2:active{cursor:default}._previewContent_10gpc_31{transform-origin:50%;touch-action:pan-y;justify-content:center;align-items:center;width:100%;height:100%;display:flex}._previewContent_10gpc_31 svg{max-width:100%;max-height:100%;display:block;font-family:var(--remons-markdown-font-family-base)!important}._errorTip_10gpc_47{color:var(--remons-markdown-color-danger,#ef4444);word-break:break-all;background:#fef2f2;border-bottom:1px solid #fee2e2;flex-shrink:0;max-height:120px;padding:8px 12px;font-size:12px;overflow:auto}._emptyTip_10gpc_59{color:var(--remons-markdown-color-text-light,#9ca3af);pointer-events:none;justify-content:center;align-items:center;font-size:14px;display:flex;position:absolute;inset:0}.mermaid-react-root{min-height:36px;margin:10px 0}.mermaid-wrapper,.mermaid-loading{background-color:var(--remons-markdown-mermaid-surface,transparent);border-radius:var(--remons-markdown-radius-base);border:1px solid var(--remons-markdown-color-border,#e4e4e4);box-sizing:border-box;transition:background-color .3s ease-in-out;position:relative;overflow:hidden}.mermaid-wrapper.mermaid-mini,.mermaid-loading.mermaid-mini{max-height:36px}.mermaid-wrapper.print-preview,.mermaid-loading.print-preview{background-color:#0000}.mermaid-wrapper.mermaid-collapsed,.mermaid-loading.mermaid-collapsed{max-height:200px}.mermaid-wrapper.mermaid-collapsed:after,.mermaid-loading.mermaid-collapsed:after{pointer-events:none;content:"";background:linear-gradient(to bottom, transparent, var(--remons-markdown-color-bg-white));height:28px;position:absolute;bottom:0;left:0;right:0}.mermaid-wrapper.mermaid-wrapper-fullscreen{background:var(--remons-markdown-mermaid-fullscreen-bg)}.mermaid-wrapper.mermaid-wrapper-fullscreen.mermaid-collapsed{max-height:none}.mermaid-wrapper.mermaid-wrapper-fullscreen:fullscreen{overflow:hidden}.mermaid-wrapper.mermaid-wrapper-fullscreen:fullscreen .mermaid-toolbar{top:4px;right:8px}.mermaid-loading{justify-content:center;align-items:center;height:200px;display:flex}.mermaid-wrapper svg{display:block}.mermaid-title{align-items:center;font-size:14px;line-height:34px;display:none;position:absolute;left:6px}.mermaid-title .mermaid-title-tag{color:#fc366e;background:#fdf1f6;border-radius:4px;align-items:center;margin-right:4px;display:flex;overflow:hidden}.mermaid-title .mermaid-title-text{box-sizing:border-box;border:1px solid #fc366e;border-left:0;border-radius:0 4px 4px 0;height:20px;margin-left:-1px;padding-left:5px;padding-right:4px;font-size:12px;line-height:18px;display:inline-block}.mermaid-title img{border-radius:0;width:auto;height:20px;margin:0;display:inline-block}.mermaid-mini .mermaid-title{display:flex}.mermaid-toolbar,.mermaid-toolbar-loading{z-index:1;gap:4px;display:inline-flex;position:absolute;top:4px;right:4px}.mermaid-toolbar .remons-markdown-circle,.mermaid-toolbar-loading .remons-markdown-circle{width:24px;height:24px;font-size:12px}.mermaid-toolbar-loading{margin-right:10px}.driver-popover button{box-shadow:none!important}.mermaid-code-modal .markdown{margin-bottom:10px;padding:0 6px}.mermaid-code-modal .markdown pre{margin:0}@media screen and (width<=500px){.mermaid-title{font-size:12px}}:root,html[data-theme=light]{--remons-markdown-color-bg:transparent;--remons-markdown-color-bg-card:transparent;--remons-markdown-color-button:#ffffff26;--remons-markdown-color-toc:#fffc;--remons-markdown-color-bg-white:#fff;--remons-markdown-color-bg-tooltip:#61616141;--remons-markdown-color-text:#61677c;--remons-markdown-color-text-primary:#202124;--remons-markdown-color-text-secondary:#595959;--remons-markdown-color-text-light:#6b7280;--remons-markdown-color-text-placeholder:#999;--remons-markdown-color-shadow:#babecc;--remons-markdown-color-shadow-light:#fff;--remons-markdown-shadow-sm:0 2px 8px #0000000f;--remons-markdown-shadow-inset:inset 1px 1px 2px var(--remons-markdown-color-shadow), inset -1px -1px 2px var(--remons-markdown-color-shadow-light);--remons-markdown-color-primary:#1890ff;--remons-markdown-color-warning:#faad14;--remons-markdown-color-danger:#ef4444;--remons-markdown-color-bg-hover:#f5f5f5;--remons-markdown-color-bg-active:#e6f7ff;--remons-markdown-color-bg-hover-light:#0000000d;--remons-markdown-color-primary-shadow:#1890ff1a;--remons-markdown-color-border:#dbdada;--remons-markdown-color-border-dark:#d0d7de;--remons-markdown-color-button-border:#fffc;--remons-markdown-mermaid-surface:transparent;--remons-markdown-color-table-header:#eef1f4;--remons-markdown-tabs-mask:#fff9;--remons-markdown-font-family-base:Inter, Noto Sans SC, -apple-system, BlinkMacSystemFont, Segoe UI, PingFang SC, Microsoft YaHei, sans-serif;--remons-markdown-font-family-editor:SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;--remons-markdown-radius-base:8px;--remons-markdown-bg-gradient:linear-gradient(137deg, #e5f4ff 0%, #efe7ff 100%);--remons-markdown-mermaid-fullscreen-bg:linear-gradient(137deg, #e5f4ff 0%, #efe7ff 100%)}html[data-theme=dark]{--remons-markdown-color-bg:#1a1d2e;--remons-markdown-color-bg-card:#1e2235;--remons-markdown-color-toc:#1e2235b3;--remons-markdown-color-bg-white:#2e3350;--remons-markdown-color-bg-tooltip:#2e3350;--remons-markdown-color-button:#1e2235b3;--remons-markdown-color-text:#b0b8c8;--remons-markdown-color-text-primary:#e8ecf4;--remons-markdown-color-text-secondary:#8892a4;--remons-markdown-color-text-light:#8892a4;--remons-markdown-color-text-placeholder:#6b7280;--remons-markdown-color-shadow:#12141f;--remons-markdown-color-shadow-light:#28304a;--remons-markdown-shadow-sm:-5px -5px 10px var(--remons-markdown-color-shadow-light), 5px 5px 10px var(--remons-markdown-color-shadow);--remons-markdown-shadow-inset:inset 1px 1px 2px var(--remons-markdown-color-shadow), inset -1px -1px 2px var(--remons-markdown-color-shadow-light);--remons-markdown-color-danger:#ef4444;--remons-markdown-color-primary:#40a9ff;--remons-markdown-color-warning:#faad14;--remons-markdown-color-bg-hover:#363b54;--remons-markdown-color-bg-active:#1c3a5f;--remons-markdown-color-bg-hover-light:#ffffff0d;--remons-markdown-color-primary-shadow:#40a9ff26;--remons-markdown-color-border:#2e3350;--remons-markdown-color-border-dark:#3d4258;--remons-markdown-color-button-border:#ffffff1a;--remons-markdown-mermaid-surface:#2e3350;--remons-markdown-color-table-header:#28304a;--remons-markdown-tabs-mask:#2e335099;--remons-markdown-font-family-base:Inter, Noto Sans SC, -apple-system, BlinkMacSystemFont, Segoe UI, PingFang SC, Microsoft YaHei, sans-serif;--remons-markdown-font-family-editor:SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;--remons-markdown-radius-base:8px;--remons-markdown-bg-gradient:linear-gradient(137deg, #e5f4ff 0%, #efe7ff 100%);--remons-markdown-mermaid-fullscreen-bg:linear-gradient(137deg, #1a1d2e 0%, #232840 100%)}@font-face{font-family:Inter;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v20/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfMZg.ttf)format("truetype")}@font-face{font-family:Inter;font-style:normal;font-weight:500;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v20/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuI6fMZg.ttf)format("truetype")}@font-face{font-family:Inter;font-style:normal;font-weight:600;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v20/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuGKYMZg.ttf)format("truetype")}@font-face{font-family:Inter;font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v20/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuFuYMZg.ttf)format("truetype")}@font-face{font-family:Noto Sans SC;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/notosanssc/v41/k3kCo84MPvpLmixcA63oeAL7Iqp5IZJF9bmaG9_FnYw.ttf)format("truetype")}@font-face{font-family:Noto Sans SC;font-style:normal;font-weight:500;font-display:swap;src:url(https://fonts.gstatic.com/s/notosanssc/v41/k3kCo84MPvpLmixcA63oeAL7Iqp5IZJF9bmaG-3FnYw.ttf)format("truetype")}@font-face{font-family:Noto Sans SC;font-style:normal;font-weight:600;font-display:swap;src:url(https://fonts.gstatic.com/s/notosanssc/v41/k3kCo84MPvpLmixcA63oeAL7Iqp5IZJF9bmaGwHCnYw.ttf)format("truetype")}@font-face{font-family:Noto Sans SC;font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/notosanssc/v41/k3kCo84MPvpLmixcA63oeAL7Iqp5IZJF9bmaGzjCnYw.ttf)format("truetype")}.remons-markdown-circle{background-color:var(--color-bg-white);width:40px;height:40px;box-shadow:var(--remons-markdown-shadow-sm);cursor:pointer;border:1px solid var(--remons-markdown-color-button-border);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:100%;justify-content:center;align-items:center;padding:0;transition:box-shadow .2s ease-in-out;display:inline-flex}.remons-markdown-circle:hover{box-shadow:-2px -2px 5px var(--remons-markdown-color-shadow-light), 2px 2px 5px var(--remons-markdown-color-shadow)}.remons-markdown-circle:active{box-shadow:var(--remons-markdown-shadow-inset)}@media screen and (width<=500px){.remons-markdown-circle{box-shadow:-2px -2px 10px var(--remons-markdown-color-shadow-light), 2px 2px 10px var(--remons-markdown-color-shadow);width:30px;height:30px;font-size:12px}}.driver-popover{all:unset;font-family:var(--driver-popover-font-family,"Helvetica Neue", Inter, ui-sans-serif, "Apple Color Emoji", Helvetica, Arial, sans-serif);box-sizing:border-box;color:#2d2d2d;z-index:1000000000;background-color:#fff;border-radius:5px;min-width:250px;max-width:300px;margin:0;padding:15px;position:fixed;top:0;right:0;box-shadow:0 1px 10px #0006}.driver-popover-title{zoom:1;margin:0;font-size:19px;font-weight:700;line-height:1.5;display:block;position:relative}.driver-popover-close-btn{all:unset;cursor:pointer;color:#d2d2d2;z-index:1;text-align:center;width:32px;height:28px;font-size:18px;font-weight:500;transition:color .2s;position:absolute;top:0;right:0}.driver-popover-close-btn:hover,.driver-popover-close-btn:focus{color:#2d2d2d}.driver-popover-title[style*=block]+.driver-popover-description{margin-top:5px}.driver-popover-description{zoom:1;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.5}.driver-popover-footer{text-align:right;zoom:1;justify-content:space-between;align-items:center;margin-top:15px;display:flex}.driver-popover-progress-text{color:#727272;zoom:1;font-size:13px;font-weight:400}.driver-popover-footer-btn{all:unset;box-sizing:border-box;color:#2d2d2d;cursor:pointer;zoom:1;background-color:#fff;border:1px solid #ccc;border-radius:3px;outline:0;padding:3px 7px;font-size:12px;line-height:1.3;text-decoration:none;display:inline-block}.driver-popover-footer .driver-popover-btn-disabled{opacity:.5;pointer-events:none}.driver-popover-footer-btn:hover,.driver-popover-footer-btn:focus{background-color:#f7f7f7}.driver-popover-navigation-btns{flex-grow:1;justify-content:flex-end;display:flex}.driver-popover-navigation-btns button+button{margin-left:4px}.driver-popover-arrow{content:"";border:5px solid #fff;position:absolute}.driver-popover-arrow-side-over{display:none}.driver-popover-arrow-side-left{border-top-color:#0000;border-bottom-color:#0000;border-right-color:#0000;left:100%}.driver-popover-arrow-side-right{border-top-color:#0000;border-bottom-color:#0000;border-left-color:#0000;right:100%}.driver-popover-arrow-side-top{border-bottom-color:#0000;border-left-color:#0000;border-right-color:#0000;top:100%}.driver-popover-arrow-side-bottom{border-top-color:#0000;border-left-color:#0000;border-right-color:#0000;bottom:100%}.driver-popover-arrow-side-center,.driver-popover-arrow-none{display:none}.driver-active .driver-overlay{pointer-events:none}.driver-active.driver-no-scroll{overflow:hidden}.driver-active *{pointer-events:none}.driver-active .driver-active-element,.driver-active .driver-active-element *,.driver-popover,.driver-popover *{pointer-events:auto}@keyframes animate-fade-in{0%{opacity:0}to{opacity:1}}.driver-fade .driver-overlay{animation:animate-fade-in var(--driver-animation-duration,.4s) ease-in-out}.driver-fade .driver-popover{animation:animate-fade-in var(--driver-animation-duration,.4s)}.driver-active-element-parent-no-scroll{overflow:hidden!important}.driver-no-interaction,.driver-no-interaction *{pointer-events:none!important}
2
2
  /*$vite$:1*/
package/dist/index.d.ts CHANGED
@@ -2,11 +2,12 @@ import { default as RenderMarkdown, RenderMarkdownProps } from './components/Ren
2
2
  import { default as markdownFormat, initHighlighter, MarkdownPlugin, AnchorItem } from './components/RenderMarkdown/utils/render-markdown';
3
3
  import { default as languagesCommon } from './components/RenderMarkdown/utils/render-markdown/languagesCommon';
4
4
  import { defaultValidateLink } from './components/RenderMarkdown/utils/render-markdown/validate-link';
5
+ import { circledNumbers, DEFAULT_CIRCLED_CLASS, ICircledClass } from './components/RenderMarkdown/utils/render-markdown/circled-numbers';
5
6
  import { MermaidChart, renderMermaid } from './components/MermaidRenderer';
6
7
  import { useIncrementalRender, MD_PERSIST_ATTR } from './hooks/useIncrementalRender';
7
8
  import { addExcludedSelector, removeExcludedSelector } from './components/ImagePreview';
8
9
  import { ThemeProvider, useTheme, initTheme, ThemeMode } from './hooks/useTheme';
9
10
  import { registerCdn } from './utils/cdn';
10
11
  export default RenderMarkdown;
11
- export type { RenderMarkdownProps, MarkdownPlugin, AnchorItem, ThemeMode };
12
- export { markdownFormat, languagesCommon, initHighlighter, defaultValidateLink, MermaidChart, renderMermaid, useIncrementalRender, MD_PERSIST_ATTR, addExcludedSelector, removeExcludedSelector, ThemeProvider, useTheme, initTheme, registerCdn, };
12
+ export type { RenderMarkdownProps, MarkdownPlugin, AnchorItem, ThemeMode, ICircledClass };
13
+ export { markdownFormat, languagesCommon, initHighlighter, defaultValidateLink, circledNumbers, DEFAULT_CIRCLED_CLASS, MermaidChart, renderMermaid, useIncrementalRender, MD_PERSIST_ATTR, addExcludedSelector, removeExcludedSelector, ThemeProvider, useTheme, initTheme, registerCdn, };
package/dist/index.mjs CHANGED
@@ -1,19 +1,19 @@
1
- import e,{createContext as t,forwardRef as n,memo as r,useCallback as o,useContext as i,useEffect as c,useLayoutEffect as s,useMemo as a,useRef as l,useState as d}from"react";import{CaretDownOutlined as u,CaretRightOutlined as m,CheckCircleOutlined as h,CloseCircleOutlined as p,CloseOutlined as f,CodeOutlined as g,CopyFilled as w,DownOutlined as v,DownloadOutlined as y,DragOutlined as b,ExportOutlined as k,FullscreenExitOutlined as _,FullscreenOutlined as E,ImportOutlined as S,InfoCircleOutlined as C,LoadingOutlined as x,MinusOutlined as L,PlusOutlined as N,ReloadOutlined as T,RightOutlined as M,SearchOutlined as z,UnorderedListOutlined as A,UpOutlined as $,WarningOutlined as j}from"@ant-design/icons";import{createRoot as I}from"react-dom/client";import{Fragment as P,jsx as D,jsxs as q}from"react/jsx-runtime";import F from"classnames";import{IsPC as O,copy as B}from"methods-r";import H from"markdown-it";import W from"markdown-it-anchor";import R from"markdown-it-link-attributes";import G from"highlight.js/lib/core";import{tab as V}from"@mdit/plugin-tab";import U from"markdown-it-github-alerts";import K from"markdown-it-task-lists";import Z from"photoswipe";import X from"morphdom";import Y from"highlight.js/lib/languages/javascript";import J from"highlight.js/lib/languages/typescript";import Q from"highlight.js/lib/languages/css";import ee from"highlight.js/lib/languages/json";import te from"highlight.js/lib/languages/bash";import ne from"highlight.js/lib/languages/xml";import re from"highlight.js/lib/languages/plaintext";import{createPortal as oe}from"react-dom";import ie from"@panzoom/panzoom";import{driver as ce}from"driver.js";var se=Object.create,ae=Object.defineProperty,le=Object.getOwnPropertyDescriptor,de=Object.getOwnPropertyNames,ue=Object.getPrototypeOf,me=Object.prototype.hasOwnProperty,he=(e,t)=>{let n={};for(var r in e)ae(n,r,{get:e[r],enumerable:!0});return t||ae(n,Symbol.toStringTag,{value:"Module"}),n},pe=/* @__PURE__ */((e,t,n)=>(n=null!=e?se(ue(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var o,i=de(t),c=0,s=i.length;c<s;c++)o=i[c],me.call(e,o)||o===n||ae(e,o,{get:(e=>t[e]).bind(null,o),enumerable:!(r=le(t,o))||r.enumerable});return e})(!t&&e&&e.__esModule&&me.call(e,"default")?n:ae(n,"default",{value:e,enumerable:!0}),e)))(/* @__PURE__ */((e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports))((e,t)=>{!function(){var e={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=o(e,r.call(this,n)))}return e}function r(t){if("string"==typeof t||"number"==typeof t)return this&&this[t]||t;if("object"!=typeof t)return"";if(Array.isArray(t))return n.apply(this,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var r="";for(var i in t)e.call(t,i)&&t[i]&&(r=o(r,this&&this[i]||i));return r}function o(e,t){return t?e?e+" "+t:e+t:e}void 0!==t&&t.exports?(n.default=n,t.exports=n):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],function(){return n}):window.classNames=n}()})(),1),fe={container:"_container_1a6ji_4",item:"_item_1a6ji_16",toast:"_toast_1a6ji_19",fadeIn:"_fadeIn_1a6ji_1","toast-warning":"_toast-warning_1a6ji_31","toast-info":"_toast-info_1a6ji_34","toast-error":"_toast-error_1a6ji_37","toast-success":"_toast-success_1a6ji_40"},ge=pe.default.bind(fe),we={warning:/* @__PURE__ */D(j,{style:{color:"#faad14",fontSize:"16px"}}),info:/* @__PURE__ */D(C,{style:{color:"#1890ff",fontSize:"16px"}}),error:/* @__PURE__ */D(p,{style:{color:"#ff4d4f",fontSize:"16px"}}),success:/* @__PURE__ */D(h,{style:{color:"#52c41a",fontSize:"16px"}})},ve=({config:e})=>/* @__PURE__ */q("div",{className:ge("toast",`toast-${e.type}`),children:[we[e.type],/* @__PURE__ */D("span",{children:e.content})]}),ye=()=>{const[e,t]=d([]),n=l(/* @__PURE__ */new Map);return c(()=>{const e=e=>{const{type:r,content:o,duration:i=3e3}=e.detail,c=`message-${Date.now()}-${Math.random()}`,s={key:c,content:o,type:r,duration:i};t(e=>[...e,s]);const a=window.setTimeout(()=>{(e=>{t(t=>t.filter(t=>t.key!==e));const r=n.current.get(e);r&&(clearTimeout(r),n.current.delete(e))})(c)},i);n.current.set(c,a)},r=()=>{t([]),n.current.forEach(e=>clearTimeout(e)),n.current.clear()};return window.addEventListener("custom-message",e),window.addEventListener("custom-message-clear",r),()=>{window.removeEventListener("custom-message",e),window.removeEventListener("custom-message-clear",r),n.current.forEach(e=>clearTimeout(e))}},[]),/* @__PURE__ */D("div",{className:ge("container"),children:e.map(e=>/* @__PURE__ */D("div",{className:ge("item"),children:/* @__PURE__ */D(ve,{config:e})},e.key))})},be=!1,ke={dispatch:(e,t,n)=>{(()=>{if(be)return;be=!0;const e=document.createElement("div");e.id="custom-message-container",document.body.appendChild(e),I(e).render(/* @__PURE__ */D(ye,{}))})(),requestAnimationFrame(()=>{window.dispatchEvent(new CustomEvent("custom-message",{detail:{type:e,content:t,duration:n}}))})},warning:(e,t)=>ke.dispatch("warning",e,t),info:(e,t)=>ke.dispatch("info",e,t),error:(e,t)=>ke.dispatch("error",e,t),success:(e,t)=>ke.dispatch("success",e,t),destroy:()=>{window.dispatchEvent(new Event("custom-message-clear"))}},_e=pe.default.bind({"back-top":"_back-top_gdg5d_4"});function Ee(e){return e.current||window}var Se=r(({target:e,visibilityHeight:t=300})=>{const[n,r]=d(!1),o=l(null);c(()=>{if(e)try{o.current=e()}catch{o.current=null}},[e]),c(()=>{const e=Ee(o),n=()=>{r(function(e){return e===window?window.scrollY||document.documentElement.scrollTop:e.scrollTop}(e)>t)};return e.addEventListener("scroll",n,{passive:!0}),n(),()=>{e.removeEventListener("scroll",n)}},[t]);return n?/* @__PURE__ */D("div",{className:`${_e("back-top")} remons-markdown-circle`,onClick:()=>{Ee(o).scrollTo({top:0,behavior:"smooth"})},children:/* @__PURE__ */D($,{})}):null}),Ce="_empty_container_fkmsv_3",xe="_description_fkmsv_12";function Le({description:e="暂无数据"}){/* @__PURE__ */
2
- return q("div",{className:Ce,children:[/* @__PURE__ */q("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",children:[
3
- /* @__PURE__ */D("rect",{x:"8",y:"16",width:"48",height:"36",rx:"4",stroke:"#d9d9d9",strokeWidth:"2"}),
4
- /* @__PURE__ */D("line",{x1:"16",y1:"28",x2:"48",y2:"28",stroke:"#d9d9d9",strokeWidth:"2"}),
5
- /* @__PURE__ */D("line",{x1:"16",y1:"36",x2:"40",y2:"36",stroke:"#d9d9d9",strokeWidth:"2"}),
6
- /* @__PURE__ */D("line",{x1:"16",y1:"44",x2:"32",y2:"44",stroke:"#d9d9d9",strokeWidth:"2"})]}),/* @__PURE__ */D("span",{className:xe,children:e})]})}var Ne={tocSidebar:"_tocSidebar_lxzj1_1",tocHeader:"_tocHeader_lxzj1_17",tocTitle:"_tocTitle_lxzj1_24",tocActions:"_tocActions_lxzj1_29",tocSearchBar:"_tocSearchBar_lxzj1_39",tocSearchInput:"_tocSearchInput_lxzj1_46",tocSearchClear:"_tocSearchClear_lxzj1_64",tocSearchExit:"_tocSearchExit_lxzj1_76",tocBody:"_tocBody_lxzj1_89",tocItem:"_tocItem_lxzj1_95",tocItemTitle:"_tocItemTitle_lxzj1_95",active:"_active_lxzj1_105",tocLink:"_tocLink_lxzj1_108",tocExpandIcon:"_tocExpandIcon_lxzj1_112",tocChildren:"_tocChildren_lxzj1_139",highlight:"_highlight_lxzj1_142",tocEmpty:"_tocEmpty_lxzj1_146"};function Te({item:e,depth:t=0,activeId:n,searchText:r}){const[o,i]=d(!0),s=e.children&&e.children.length>0,a=e.href===n,u=l(null),m=s?ze(e.children,r):[];if(r&&!m.length&&!Me(e.title,r))return null;c(()=>{n&&s&&e.children.some(e=>e.href===n)&&i(!0)},[n,s,e.children]);/* @__PURE__ */
7
- return q("div",{className:Ne.tocItem,ref:u,style:{paddingLeft:14},children:[/* @__PURE__ */q("div",{className:`${Ne.tocItemTitle}${a?` ${Ne.active}`:""}`,children:[s&&/* @__PURE__ */D("span",{className:Ne.tocExpandIcon,onClick:e=>{e.stopPropagation(),i(!o)},children:/* @__PURE__ */D(o?v:M,{})}),/* @__PURE__ */D("a",{className:Ne.tocLink,href:`#${e.href}`,onClick:t=>{t.preventDefault();const n=e.href,r=document.getElementById(n);r&&(history.pushState(null,"",`#${n}`),r.scrollIntoView({behavior:"smooth",block:"start"}))},children:(e=>{if(!r)return e;const t=function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(r),n=new RegExp(`(${t})`,"gi");return e.split(n).map((e,t)=>e.toLowerCase().includes(r.toLowerCase())?/* @__PURE__ */D("span",{className:Ne.highlight,children:e},t):e)})(e.title)})]}),s&&o&&/* @__PURE__ */D("div",{className:Ne.tocChildren,children:r?m.map((e,o)=>/* @__PURE__ */D(Te,{item:e,depth:t+1,activeId:n,searchText:r},e.href||o)):e.children.map((e,o)=>/* @__PURE__ */D(Te,{item:e,depth:t+1,activeId:n,searchText:r},e.href||o))})]})}function Me(e,t){return!t||e.toLowerCase().includes(t.toLowerCase())}function ze(e,t){return t?e.map(e=>{const n=ze(e.children,t),r=Me(e.title,t);return r||n.length>0?{...e,children:r?e.children:n}:null}).filter(Boolean):e}var Ae=r(function({anchors:e,activeId:t,visible:n,onClose:r}){const o=l(null),i=l(null),s=l(null),[a,u]=d(""),[m,h]=d(!1);c(()=>{if(!t||!o.current||!n)return;const e=o.current.querySelector(`.${Ne.active}`);e&&e.scrollIntoView({behavior:"smooth",block:"nearest"})},[t,n]),c(()=>{if(!m)return;const e=e=>{s.current&&!s.current.contains(e.target)&&(h(!1),u(""))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[m]);const p=()=>{u(""),h(!1)},g=ze(e,a);return e&&0!==e.length&&n?/* @__PURE__ */q("div",{className:F(Ne.tocSidebar,"md-toc-sidebar"),children:[
8
- /* @__PURE__ */q("div",{className:Ne.tocHeader,children:[/* @__PURE__ */D("span",{className:Ne.tocTitle,children:"目录"}),/* @__PURE__ */q("div",{className:Ne.tocActions,children:[!m&&/* @__PURE__ */D("span",{className:"remons-markdown-circle",onClick:()=>{h(!0),setTimeout(()=>i.current?.focus(),50)},title:"搜索",children:/* @__PURE__ */D(z,{})}),/* @__PURE__ */D("span",{className:F("remons-markdown-circle",Ne.tocClose),onClick:r,children:/* @__PURE__ */D(f,{})})]})]}),m&&/* @__PURE__ */q("div",{ref:s,className:Ne.tocSearchBar,children:[
9
- /* @__PURE__ */D("input",{ref:i,className:Ne.tocSearchInput,type:"text",placeholder:"搜索目录…",value:a,onChange:e=>{u(e.target.value)}}),a&&/* @__PURE__ */D("span",{className:Ne.tocSearchClear,onClick:p,children:/* @__PURE__ */D(f,{})}),
10
- /* @__PURE__ */D("span",{className:Ne.tocSearchExit,onClick:p,title:"退出搜索",children:"×"})]}),
11
- /* @__PURE__ */D("div",{className:Ne.tocBody,ref:o,children:g.length>0?g.map((e,n)=>/* @__PURE__ */D(Te,{item:e,activeId:t,searchText:a},e.href||n)):a&&/* @__PURE__ */D("div",{className:Ne.tocEmpty,children:"未找到匹配项"})})]}):null}),$e=/* @__PURE__ */new Set(["[ ]","[x]","[X]"]);function je(e){e.core.ruler.after("inline","github-task-lists-empty",e=>{const t=e.tokens;for(let n=0;n<t.length;n++){const e=t[n];if("inline"!==e.type)continue;const r=e.content;if(!$e.has(r))continue;let o=n-1;if(o>=0&&"paragraph_open"===t[o].type&&(o-=1),o<0||"list_item_open"!==t[o].type)continue;Ie(t[o],"task-list-item");for(let n=o-1;n>=0;n--)if("bullet_list_open"===t[n].type||"ordered_list_open"===t[n].type){Ie(t[n],"contains-task-list");break}const i=new e.constructor("html_inline","",0);i.content="[ ]"===r?'<input class="task-list-item-checkbox" disabled="" type="checkbox">':'<input class="task-list-item-checkbox" checked="" disabled="" type="checkbox">',e.children=[i],e.content=""}})}function Ie(e,t){const n=(e.attrGet("class")||"").split(/\s+/).filter(Boolean);n.includes(t)||e.attrSet("class",[...n,t].join(" "))}var Pe=/^(vbscript|javascript|file|data):/,De=/^data:image\/(gif|png|jpeg|webp);/,qe=/^data:image\/svg\+xml[;,]/i,Fe=/<\s*script|\bon[a-z]+\s*=|<!ENTITY|foreignobject/i;function Oe(e){const t=e.trim().toLowerCase();if(!Pe.test(t))return!0;if(De.test(t))return!0;if(!qe.test(t))return!1;const n=function(e){const t=e.indexOf(",");if(t<0)return null;const n=e.slice(0,t),r=e.slice(t+1);try{return/;base64/i.test(n)?"function"==typeof atob?atob(r):null:decodeURIComponent(r)}catch{return null}}(e);return null!==n&&!Fe.test(n)}var Be={note:"注",tip:"提示",important:"重要",warning:"注意",caution:"警告"},He={note:'<i class="iconfont icon-note"></i>',tip:'<i class="iconfont icon-tip"></i>',important:'<i class="iconfont icon-important"></i>',warning:'<i class="iconfont icon-warning"></i>',caution:'<i class="iconfont icon-caution"></i>'};function We(e){return e.replace(/[\u{1F000}-\u{1FFFF}\u{200D}\u{FE0F}\u{2600}-\u{27BF}\u{2300}-\u{23FF}\u{2700}-\u{27BF}]/gu,"").trim()}var Re="markdown-tabs",Ge=`.${Re}-tabs-header`,Ve=!1;var Ue=e=>{const t=e.target?.closest(`.${Re}-tab-button`);if(!t)return;const n=t.closest(Ge);if(!n)return;const r=n.closest(`.${Re}-tabs-wrapper`)?.querySelector(`.${Re}-tabs-container`);r&&function(e,t,n){const r=t.querySelectorAll(`.${Re}-tab-button`),o=Array.from(r).indexOf(e),i=n.querySelectorAll(`.${Re}-tab-content`);r.forEach(e=>e.classList.remove("active")),i.forEach(e=>e.classList.remove("active")),e.classList.add("active"),i[o]&&i[o].classList.add("active");const c=e.closest(".markdown"),s=e.offsetParent;c&&s&&c.scrollTop>s.offsetTop&&c.scrollTo({top:s.offsetTop,behavior:"smooth"})}(t,n,r)},Ke=e=>{const t=e.target?.closest(Ge);t&&0!==Math.abs(e.deltaY)&&(t.scrollWidth<=t.clientWidth||(e.preventDefault(),t.scrollLeft+=e.deltaY))};function Ze(e){if(e.dataset.maskInited)return;e.dataset.maskInited="1";const t=e.parentElement;if(!t)return;const n=()=>{const{scrollLeft:n,scrollWidth:r,clientWidth:o}=e,i=n>1,c=n+o<r-1;t.classList.remove("has-left-mask","has-right-mask","has-both-masks"),i&&c?t.classList.add("has-both-masks"):i?t.classList.add("has-left-mask"):c&&t.classList.add("has-right-mask")};e.addEventListener("scroll",n),n()}var Xe=!1;var Ye=!1;function Je(){Ve||(Ve=!0,document.addEventListener("click",Ue),document.addEventListener("wheel",Ke,{passive:!1,capture:!0})),document.querySelectorAll(Ge).forEach(e=>Ze(e)),Xe||"undefined"==typeof MutationObserver||(Xe=!0,new MutationObserver(e=>{e.forEach(e=>{e.addedNodes.forEach(e=>{if(1!==e.nodeType)return;const t=e;t.classList.contains("markdown-tabs-tabs-header")&&Ze(t),t.querySelectorAll(Ge).forEach(e=>Ze(e))})})}).observe(document.body,{childList:!0,subtree:!0})),Ye||(Ye=!0,window.addEventListener("resize",()=>{document.querySelectorAll(Ge).forEach(e=>{e.dispatchEvent(new Event("scroll"))})}))}var Qe="0.18.1",et=`https://registry.npmmirror.com/katex/${Qe}/files/dist/katex.min.css`,tt=`https://registry.npmmirror.com/katex/${Qe}/files/dist/katex.min.js`,nt=null;function rt(e,t={}){const n={throwOnError:!1,errorColor:"#cc0000",...t};function r(e,t){try{return function(){if(!window.katex)throw new Error("[katex-loader] KaTeX not loaded. Call ensureKatexLoaded() first.");return window.katex}().renderToString(e,{...n,displayMode:t})}catch(r){const t=r instanceof Error?r.message:String(r);return`<span style="color:${n.errorColor}" title="${o(t)}">${o(e)}</span>`}}function o(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}"undefined"!=typeof window&&window.katex||console.warn("[markdown-it-katex] KaTeX is not loaded yet. Call `await ensureKatexLoaded()` before using this plugin, or use `renderWithKatex()` helper instead."),e.inline.ruler.before("emphasis","katex_inline",(e,t)=>{if(36!==e.src.charCodeAt(e.pos))return!1;if(36===e.src.charCodeAt(e.pos+1))return!1;if(e.pos>0&&92===e.src.charCodeAt(e.pos-1))return!1;const n=e.pos+1;if(n>=e.posMax)return!1;if(/\s/.test(e.src[n]))return!1;let r=n;for(;r<e.posMax&&(36!==e.src.charCodeAt(r)||92===e.src.charCodeAt(r-1));)r++;if(r>=e.posMax)return!1;if(r===n)return!1;if(/\s/.test(e.src[r-1]))return!1;if(!t){const t=e.push("katex_inline","math",0);t.markup="$",t.content=e.src.slice(n,r)}return e.pos=r+1,!0}),e.block.ruler.after("blockquote","katex_block",(e,t,n,r)=>{const o=e.bMarks[t]+e.tShift[t];if(o+2>e.eMarks[t]||"$$"!==e.src.slice(o,o+2))return!1;if(r)return!0;let i=t+1,c=!1;for(;i<n;){const t=e.bMarks[i]+e.tShift[i];if("$$"===e.src.slice(t,e.eMarks[i]).trim()){c=!0;break}i++}const s=e.bMarks[t+1],a=c?e.bMarks[i]:e.eMarks[n-1];e.line=i+(c?1:0);const l=e.push("katex_block","math",0);return l.block=!0,l.markup="$$",l.content=e.src.slice(s,a).trim(),l.map=[t,e.line],!0}),e.renderer.rules.katex_inline=(e,t)=>r(e[t].content,!1),e.renderer.rules.katex_block=(e,t)=>`<div class="katex-block">${r(e[t].content,!0)}</div>\n`}function ot(e){return"string"!=typeof e?"":e.trim().toLowerCase().replace(/[^a-z0-9\u4e00-\u9fff]+/g,"-").replace(/^-|-$/g,"").replace(/-+/g,"-")}function it(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function ct(e){const t=[],n=[];for(let r=0;r<e.length;r++){const o=e[r];if("heading_open"!==o.type)continue;const i=Number((o.tag||"").slice(1));if(!Number.isInteger(i)||i<1||i>6)continue;const c=e[r+1],s="inline"===c?.type?(c.content||"").trim():"";if(!s)continue;const a=o.attrGet("id"),l={title:s,href:("string"==typeof a?a:"")||ot(s),nodeName:`H${i}`,nodeTitle:`<h${i}>${it(s)}</h${i}>`,children:[]};for(;n.length&&n[n.length-1].level>=i;)n.pop();const d=n[n.length-1];d?d.item.children.push(l):t.push(l),n.push({level:i,item:l})}return t}async function st(e,t,n){const r="string"==typeof e?e:null==e?"":String(e);let o=!0;try{await function(e=15e3){return nt||("undefined"==typeof window?Promise.reject(/* @__PURE__ */new Error("[katex-loader] Requires a browser environment.")):window.katex?Promise.resolve():nt=new Promise((t,n)=>{const r=setTimeout(()=>{nt=null,n(/* @__PURE__ */new Error(`[katex-loader] KaTeX CDN timeout after ${e}ms.`))},e),o=document.querySelector(`script[src="${tt}"]`);if(o)return window.katex?(clearTimeout(r),void t()):(o.addEventListener("load",()=>{clearTimeout(r),t()}),void o.addEventListener("error",()=>{clearTimeout(r),nt=null,n(/* @__PURE__ */new Error(`[katex-loader] Failed to load ${tt}`))}));if(!document.querySelector(`link[href="${et}"]`)){const e=document.createElement("link");e.rel="stylesheet",e.href=et,document.head.appendChild(e)}const i=document.createElement("script");i.src=tt,i.onload=()=>{clearTimeout(r),t()},i.onerror=()=>{clearTimeout(r),nt=null,i.remove(),n(/* @__PURE__ */new Error(`[katex-loader] Failed to load ${tt}`))},document.head.appendChild(i)}))}()}catch(l){o=!1,console.warn("[render-markdown] KaTeX 加载失败,公式将降级为纯文本:",l)}const i=function(){const e=/* @__PURE__ */new Set;return t=>{let n=t,r=1;for(;e.has(n);)n=`${t}-${r}`,r+=1;return e.add(n),n}}(),c=new H({langPrefix:"language-",html:n?.html??!0,highlight:function(e,t){if(t&&G.getLanguage(t))try{return G.highlight(e,{language:t}).value}catch(n){}return""}}).use(V,{name:Re}).use(W,{permalink:W.permalink.linkInsideHeader({class:"header-anchor",symbol:"#",placement:"after"}),slugify:e=>i(ot(e))}).use(R,{matcher:e=>e.match(/^https?:\/\//),attrs:{target:"_blank",rel:"noopener"}}).use(U,{titles:Be,icons:He}).use(K).use(je);o&&c.use(rt,{strict:!1,throwOnError:!1}),t&&t.forEach(e=>c.use(e)),c.validateLink=n?.validateLink??Oe;const s=c.parse(r,{});!function(e,t){let n=null;for(let l=e.length-1;l>=0;l--)if("fence"===e[l].type){n=e[l];break}if(!n||!n.map)return;const r=t.split("\n"),o=n.map[0],i=n.markup||"```",c="~"===i[0]?"~":"`",s=Math.max(3,i.length),a=new RegExp("^ {0,3}"+c+"{"+s+",}[ \\t]*$");for(let l=o+1;l<r.length;l++)if(a.test(r[l]))return;n.attrJoin("class","md-fence-open")}(s,r),o||(c.renderer.rules.katex_inline=(e,t)=>it(e[t].content||""),c.renderer.rules.katex_block=(e,t)=>`<code>${it(e[t].content||"")}</code>\n`);const a=c.renderer.render(s,c.options,{}).replace(/class="markdown-alert markdown-alert-(\w+)"[\s\S]*?class="markdown-alert-title"[^>]*>([\s\S]*?)<\/p>/g,(e,t,n)=>{const r=Be[t];if(!r)return e;const o=We(n.replace(/<[^>]*>/g,""));if(o.toLowerCase()===t.toLowerCase()){const t=n.lastIndexOf(">");if(-1!==t){const i=n.substring(0,t+1)+We(n.substring(t+1)).replace(o,r);return e.replace(n,i)}}return e});return queueMicrotask(()=>Je()),{anchor:ct(s),info:a}}function at(e){e&&"object"==typeof e?Object.entries(e).forEach(([e,t])=>{G.getLanguage(e)||G.registerLanguage(e,t)}):console.warn("[render-markdown] initHighlighter 需要传入一个语言包对象")}var lt="data-md-persist",dt="mermaid-react-root",ut="data-md-mermaid-src",mt=/* @__PURE__ */new WeakMap,ht=["pre",`.${dt}`];function pt(e){(Array.isArray(e)?e:[e]).forEach(e=>{ht.includes(e)||ht.push(e)})}function ft(e){(Array.isArray(e)?e:[e]).forEach(e=>{const t=ht.indexOf(e);t>=0&&ht.splice(t,1)})}var gt=(e,t)=>t.some(t=>null!==e.closest(t))||ht.some(t=>null!==e.closest(t));function wt(e){const t=e.currentSrc||e.src,n={src:t,msrc:t,alt:e.alt||void 0,element:e.isConnected?e:void 0};e.naturalWidth&&e.naturalHeight&&(n.width=e.naturalWidth,n.height=e.naturalHeight);const r=e.getAttribute("srcset")||"";return/\d+w/.test(r)&&(n.srcset=r),n}var vt=0,yt=null;function bt(e,t){if(e.active)return;const n=e.images.indexOf(t);if(n<0)return;const r=new Z({dataSource:e.images.map(wt),index:n,bgOpacity:1,initialZoomLevel:"fit",secondaryZoomLevel:1,maxZoomLevel:2,padding:{top:24,bottom:24,left:24,right:24},showHideAnimationType:"zoom",preload:[1,2],loop:!1,wheelToZoom:!0,imageClickAction:"zoom-or-close",bgClickAction:"close",tapAction:"toggle-controls",doubleTapAction:"zoom",pinchToClose:!0,closeOnVerticalDrag:!0,clickToCloseNonZoomable:!0,escKey:!0,arrowKeys:!0,trapFocus:!0,returnFocus:!0,mainClass:"md-image-preview",errorMsg:"图片加载失败",closeTitle:"关闭",zoomTitle:"放大 / 缩小",arrowPrevTitle:"上一张",arrowNextTitle:"下一张",counterTitle:"当前图片序号"});e.active=r;let o=!1,i=()=>{};const c=()=>{o||(o=!0,(vt=Math.max(0,vt-1))>0||null===yt||(document.documentElement.style.overflow=yt,yt=null),i())};if(r.on("close",c),r.on("destroy",()=>{c(),e.active===r&&(e.active=null)}),!1===r.init())return void(e.active=null);!function(){if("undefined"==typeof document)return;if((vt+=1)>1)return;const e=document.documentElement;yt=e.style.overflow,e.style.overflow="hidden"}();const s=()=>{const e=r.currSlide?.zoomLevels;e&&e.fit&&(e.min=Math.min(e.min,.5*e.fit))};r.on("change",s),r.on("loadComplete",s),window.addEventListener("resize",s),s(),i=()=>window.removeEventListener("resize",s)}var kt=/* @__PURE__ */new Map;function _t(e,t){const n=kt.get(e);n?n.push(t):kt.set(e,[t])}function Et(e){const t=kt.get(e);t&&(t.forEach(e=>{try{e.unmount()}catch{}}),kt.delete(e))}function St(e){return kt.get(e)?.[0]}function Ct(){kt.forEach((e,t)=>{t.isConnected||Et(t)})}function xt(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619)>>>0;return`${t.toString(36)}-${e.length.toString(36)}`}function Lt(e){return!!e&&e.classList.contains("mermaid-react-root")&&e.hasAttribute("data-md-mermaid-src")}function Nt(e){if(e)return 1===e.nodeType&&e.classList?.contains("mermaid-react-root")?(Et(e),void e.remove()):void e.querySelectorAll(`.${dt}`).forEach(e=>{Et(e),e.remove()})}var Tt=/* @__PURE__ */new Set(["mermaid-render-noCode","code-collapsed","has-left-mask","has-right-mask","has-both-masks","active"]);function Mt(e){if(1!==e.nodeType)return null;const t=e,n=t.getAttribute("id");if(n)return`id:${n}`;const r=("string"==typeof t.className?t.className:"").split(/\s+/).filter(e=>e&&!e.startsWith("copy-")&&!Tt.has(e)).join(" ");return r?`${t.tagName.toLowerCase()}#${r}`:null}var zt="data-md-mounted",At=e=>{const t=e.getAttribute("data-md-key");return`${e.tagName.toLowerCase()}#${t??(e=>("string"==typeof e.className?e.className:"").split(/\s+/).filter(e=>e&&!e.startsWith("copy-")&&!Tt.has(e)).join(" "))(e)}`},$t=e=>Array.from(e.attributes).some(e=>e.name.endsWith("-placeholder")),jt=e=>{const t={};for(const n of Array.from(e.attributes))n.name.startsWith("data-")&&"data-md-persist"!==n.name&&"data-md-key"!==n.name&&(n.name.endsWith("-placeholder")||(t[n.name]=n.value));return t},It=e=>{const t=e.querySelector(`[${zt}]`);return t||(Array.from(e.querySelectorAll("*")).find($t)??null)},Pt=(e,t)=>{if(0===t.length)return;const n=/* @__PURE__ */new Set;Array.from(e.querySelectorAll("*")).filter(e=>$t(e)).forEach(e=>{const r=e.closest(`[${lt}]`);if(!r)return;const o=At(r),i=t.find(t=>t.key===o&&!n.has(t)&&!!t.configEl&&((e,t)=>{const n=jt(t),r=jt(e);return Object.keys(n).every(e=>r[e]===n[e])})(t.configEl,e));i&&(n.add(i),r.replaceWith(i.el))});const r=Array.from(e.querySelectorAll(`[${lt}]`));t.forEach(t=>{if(n.has(t)||t.configEl)return;if(t.el.isConnected)return;const o=At(t.el),i=Mt(t.el),c=r.find(e=>e!==t.el&&e.isConnected&&!It(e)&&(At(e)===o||Mt(e)===i));c?c.replaceWith(t.el):e.appendChild(t.el),n.add(t)})};function Dt({content:e,codeType:t,customRenderers:n,throttleMs:r=16,html:i=!0,validateLink:s,onNodeDiscarded:a,onPatched:u}){const[m,h]=d([]),[p,f]=d(!1),g=l(""),w=l(null),v=l(!0),y=l(0),b=l({codeType:t,customRenderers:n,throttleMs:r,html:i,validateLink:s}),k=l({onNodeDiscarded:a,onPatched:u});k.current={onNodeDiscarded:a,onPatched:u};const _=o(async(e,t)=>{const{codeType:n,customRenderers:r,html:o,validateLink:i}=b.current,c=n&&"md"!==n?.toLocaleLowerCase()?"```"+n+"\n"+e+"\n```":e,s=await st(c,r,{html:o,validateLink:i});if(!s||t!==y.current)return;const a=s.info;if(!a)return;const l=(e=0)=>{if(t!==y.current)return;const n=w.current;if(!n)return void(e<60&&setTimeout(()=>l(e+1),0));if(h(s.anchor||[]),v.current)return n.innerHTML=a,v.current=!1,void(g.current=c);const r=document.createElement("div");r.innerHTML=a;const o=(e=>{const t=[];e.querySelectorAll(`[${lt}]`).forEach(e=>{const n=e;n.classList.contains("pre-handle")||n.classList.contains("mermaid-react-root")||n.parentElement?.closest("[data-md-persist]")||t.push(n)});const n=t.map(e=>{const t=It(e);return{el:e,key:At(e),configEl:t,mounted:t?.hasAttribute(zt)??!1}});return n.forEach(e=>e.el.remove()),n})(n),i=/* @__PURE__ */new WeakMap;X(n,r,{childrenOnly:!0,getNodeKey:e=>Mt(e),onBeforeElUpdated(e,t){const n=/* @__PURE__ */new Map;for(const r of Array.from(e.attributes))r.name.startsWith("data-")&&!t.hasAttribute(r.name)&&n.set(r.name,r.value);return n.size&&i.set(e,n),!0},onElUpdated(e){const t=i.get(e);t&&(t.forEach((t,n)=>e.setAttribute(n,t)),i.delete(e))},onBeforeNodeAdded:e=>(1!==e.nodeType||!e.classList.contains("pre-handle"))&&e,onBeforeNodeDiscarded:e=>1!==e.nodeType||!e.hasAttribute("data-md-persist"),onNodeDiscarded(e){1===e.nodeType&&k.current.onNodeDiscarded&&k.current.onNodeDiscarded(e)}}),Pt(n,o),g.current=c,k.current.onPatched?.()};l()},[]),E=l(0),S=l(null),C=o((e,t)=>{const n=b.current.throttleMs,r=Date.now()-E.current,o=()=>{E.current=Date.now(),_(e,t)};if(r>=n)return null!=S.current&&(clearTimeout(S.current),S.current=null),void o();null!=S.current&&clearTimeout(S.current),S.current=setTimeout(()=>{S.current=null,t===y.current&&o()},n-r)},[_]);return c(()=>{const{codeType:t}=b.current;if(!e)return y.current+=1,v.current=!0,f(!1),g.current="",void(w.current&&(w.current.innerHTML=""));const n=t&&"md"!==t?.toLocaleLowerCase()?"```"+t+"\n"+e+"\n```":e;if(g.current===n)return;y.current+=1;const r=y.current;f(!0),v.current?_(e,r):C(e,r)},[e,_,C]),c(()=>()=>{y.current+=1,null!=S.current&&(clearTimeout(S.current),S.current=null)},[]),{anchors:m,hasContent:p,setInnerRef:o(e=>{w.current=e},[])}}var qt="_tocToggle_gf6l6_1",Ft=/* @__PURE__ */new Map,Ot=e=>{const t=e.querySelector("code");return t?Ut(t):""},Bt=e=>{const t=e.querySelector("code");return t?Ot(e)+"\0"+(t.textContent??""):null},Ht=e=>{const t=/* @__PURE__ */new Map,n=/* @__PURE__ */new Map,r=/* @__PURE__ */new Map;return e?.querySelectorAll("pre").forEach(e=>{const o=e;if(!o.querySelector("code"))return;const i=(e=>{const t=e.nextElementSibling;return Lt(t)?t:null})(o);i&&r.set(o,i);const c=Bt(o);if(c){const e=t.get(c);e?e.push(o):t.set(c,[o])}const s=Ot(o),a=n.get(s);a?a.push(o):n.set(s,[o])}),{exact:t,byLanguage:n,charts:r}},Wt=0,Rt=e=>({enableMermaid:e.enableMermaid??e.isSlotMermaid??!0,showCollapseButton:e.showCollapseButton??e.isShowCollapsed??!0,toolbarDebounceMs:e.toolbarDebounceMs??e.mermaidDebounce??Gt,incremental:e.incremental??e.useIncremental??!1,transformSource:e.transformSource??e.chartConfig,html:e.html??!0}),Gt=100;function Vt({preNode:e}){const[t,n]=d(()=>e.classList.contains("code-collapsed")),r=l(null);c(()=>()=>r.current?.cancel(),[]);/* @__PURE__ */
12
- return D("span",{className:"code-toggle",onClick:()=>{const t=!e.classList.contains("code-collapsed"),o=e.getBoundingClientRect().height,i=t?32:e.scrollHeight;if(r.current?.cancel(),i===o)return e.classList.toggle("code-collapsed",t),void n(t);t||e.classList.remove("code-collapsed");const c=e.animate([{height:`${o}px`},{height:`${i}px`}],{duration:280,easing:"ease-in-out"});r.current=c,t&&c.finished.then(()=>{r.current===c&&(e.classList.add("code-collapsed"),c.cancel())}),n(t)},children:/* @__PURE__ */D(t?m:u,{})})}var Ut=e=>e.className.match(/language-([^\s]+)/)?.[1]??"",Kt=(e,t)=>{const{enableMermaid:n,showCollapseButton:r}=Rt(t);e.querySelectorAll('code[class*="language-"]').forEach(e=>{const t=e,o=Ut(t),i=n&&"mermaid"===o&&!t.classList.contains("md-fence-open")?"mermaid-render-noCode":"",c=t.parentNode;if(!c)return;const s=c.querySelector(".pre-handle");if(s){const e=s.getAttribute("data-md-copy-id");e&&!t.classList.contains(e)&&t.classList.add(e),i?t.classList.add(i):t.classList.remove("mermaid-render-noCode");const n=s.querySelector("[data-md-lang]");if(n&&n.textContent!==o&&(n.textContent=o),s.getAttribute("data-md-show-collapsed")===String(r))return;Ft.get(s)?.unmount(),Ft.delete(s),s.remove()}const a=(()=>{const e=globalThis.crypto?.randomUUID?.();return e?`copy-${e}`:`copy-${Date.now().toString(36)}-${(Wt++).toString(36)}-${Math.random().toString(36).slice(2,8)}`})();t.classList.add(a),i&&t.classList.add(i);const l=document.createElement("div");l.className="pre-handle",l.setAttribute(lt,""),l.setAttribute("data-md-copy-id",a),l.setAttribute("data-md-show-collapsed",String(r)),c.insertBefore(l,t);const d=/* @__PURE__ */q(P,{children:[/* @__PURE__ */D("img",{src:"https://remons.cn:3008/upload/md_assets/code_icon.png",alt:""}),/* @__PURE__ */D("span",{"data-md-lang":!0,children:o})]}),u=/* @__PURE__ */D("span",{className:"copy",onClick:()=>{const e=c.querySelector("code");e&&(B(e),ke.success("复制成功"))},children:/* @__PURE__ */D(w,{})}),m=I(l);Ft.set(l,m),m.render(/* @__PURE__ */q(P,{children:[/* @__PURE__ */D("span",{children:d}),/* @__PURE__ */q("span",{className:"code-handle",children:[u,r&&/* @__PURE__ */D(Vt,{preNode:c})]})]}))})};function Zt(e){const{content:t,showBackTop:n,showToc:r,footer:i,incrementalThrottleMs:a}=e,u=Rt(e),{incremental:m,toolbarDebounceMs:h}=u,[p,f]=d(""),[g,w]=d([]),[v,y]=d(""),[b,k]=d(!1),_=l(null),E=l(null),S=l(null),C=l(e);C.current=e;const x=l(null);null===x.current&&(x.current=e.backTopTarget??("undefined"!=typeof document?document.body:null));const L=o(()=>k(e=>!e),[]),N=o(()=>k(!1),[]),T=o(()=>x.current,[]),M=o(e=>{const t=[];e.classList?.contains("pre-handle")&&t.push(e),e.querySelectorAll(".pre-handle").forEach(e=>t.push(e)),e.classList?.contains("mermaid-react-root")&&Nt(e),e.querySelectorAll(`.${dt}`).forEach(e=>Nt(e)),t.forEach(e=>{const t=Ft.get(e);t&&(t.unmount(),Ft.delete(e))})},[]),z=o(()=>{_.current&&Kt(_.current,C.current)},[]),{anchors:$,hasContent:j,setInnerRef:I}=Dt({content:t,codeType:e.codeType,customRenderers:e.customRenderers,throttleMs:a,html:u.html,validateLink:e.validateLink,onNodeDiscarded:M,onPatched:z}),P=m?$:g,O=m?j:!!p;c(()=>{let e=null,n=!1;return(async()=>{if(!m){S.current=Ht(_.current);const{codeType:e}=C.current;let r="";r=e&&"md"!==e?.toLocaleLowerCase()?"```"+e+"\n"+t+"\n```":t;const o=await st(r,C.current.customRenderers,{html:Rt(C.current).html,validateLink:C.current.validateLink});if(n)return;f(o?.info),w(o?.anchor||[])}e=setTimeout(async()=>{if(n)return;Rt(C.current).enableMermaid&&Ct();const e=_.current;if(!e)return;Kt(e,C.current);const{isPrintPreview:t,excludedSelectors:r}=C.current;!function(e,t={}){if(!e)return;const{instanceSelectors:n=[],isPrintPreview:r=!1}=t,o=Array.from(e.querySelectorAll("img"));if(r)return void o.forEach(e=>{e.style.maxHeight="none",e.style.width="auto",e.style.display="block"});let i=mt.get(e);i?i.instanceSelectors=n:(i={images:[],bound:!1,instanceSelectors:n,active:null},mt.set(e,i)),i.images=o.filter(e=>!gt(e,n)),i.bound||(i.bound=!0,e.setAttribute("mdImgBound","1"),e.addEventListener("click",t=>{const n=t.target;if(!n||"IMG"!==n.tagName)return;const r=n,o=mt.get(e);o&&!gt(r,o.instanceSelectors)&&bt(o,r)}))}(e,{isPrintPreview:t,instanceSelectors:r});const{enableMermaid:o,transformSource:i}=Rt(C.current),{showDriverGuide:c,defaultCollapsed:s,cdn:a}=C.current;if(o){const{renderMermaidWithControls:n}=await Promise.resolve().then(()=>In);await n({showDriverGuide:c,isPrintPreview:t,transformSource:i,defaultCollapsed:s,cdn:a,rootElement:e})}},h)})(),()=>{n=!0,e&&clearTimeout(e)}},[t]),s(()=>{!m&&p&&(((e,t)=>{if(!e||!t)return;const n=Array.from(e.querySelectorAll("pre")),r=/* @__PURE__ */new Set,o=e=>{const n=t.charts.get(e);n&&(t.charts.delete(e),e.after(n))},i=(e=>{const t=/* @__PURE__ */new Map;return e.forEach(e=>{const n=Ot(e);t.set(n,(t.get(n)??0)+1)}),t})(n),c=/* @__PURE__ */new Map;t.byLanguage.forEach((e,t)=>c.set(t,e.length)),n.forEach(e=>{const n=Bt(e);if(!n)return;const i=t.exact.get(n)?.shift();i&&i!==e&&(r.add(i),e.replaceWith(i),o(i))}),n.forEach(e=>{if(!e.isConnected)return;const n=e.querySelector("code");if(!n)return;const s=Ot(e),a=t.byLanguage.get(s);if(!a?.length)return;if(i.get(s)!==c.get(s))return;let l;for(;a.length;){const t=a.shift();if(t!==e&&!r.has(t)){l=t;break}}if(!l)return;r.add(l);const d=l.querySelector("code");d&&(d.innerHTML=n.innerHTML),e.replaceWith(l),o(l)})})(E.current,S.current),S.current=null,Ft.forEach((e,t)=>{t.isConnected||(e.unmount(),Ft.delete(t))}))},[p,m]);const B=l(null);return B.current=_.current,c(()=>()=>{const e=B.current;e&&(e.querySelectorAll(".pre-handle").forEach(e=>{const t=e,n=Ft.get(t);n&&(n.unmount(),Ft.delete(t))}),Nt(e),function(e){if(!e)return;const t=e,n=mt.get(t);n&&(n.active&&(n.active.destroy(),n.active=null),n.images=[],mt.delete(t))}(e))},[]),c(()=>{if(0===P.length)return;const e=[],t=n=>{n.forEach(n=>{e.push(n.href),n.children?.length&&t(n.children)})};t(P);const n=e.map(e=>document.getElementById(e)).filter(Boolean);if(0===n.length)return;const r=new IntersectionObserver(e=>{const t=e.filter(e=>e.isIntersecting);if(0===t.length)return;const n=t.reduce((e,t)=>t.boundingClientRect.top<e.boundingClientRect.top?t:e);y(n.target.id)},{rootMargin:"0px 0px -90% 0px",threshold:0});return n.forEach(e=>r.observe(e)),()=>r.disconnect()},[P]),c(()=>{const e=()=>{const e=window.location.hash.slice(1);if(!e)return;const t=document.getElementById(e);t&&(t.scrollIntoView({behavior:"smooth",block:"start"}),y(e))},t=setTimeout(e,100),n=()=>e();return window.addEventListener("hashchange",n),()=>{clearTimeout(t),window.removeEventListener("hashchange",n)}},[P]),/* @__PURE__ */q("div",{className:"markdown",children:[O?/* @__PURE__ */q("div",{className:"markdown-html",ref:_,children:[/* @__PURE__ */D("div",{style:{width:"100%"},...m?{ref:I}:{ref:E,dangerouslySetInnerHTML:{__html:p}}}),i&&/* @__PURE__ */D("div",{className:"markdown-footer",children:i})]}):/* @__PURE__ */D(Le,{}),n&&/* @__PURE__ */D(Se,{target:T}),r&&P.length>0&&/* @__PURE__ */D("div",{className:F(qt,"md-toc-toggle","remons-markdown-circle"),onClick:L,children:/* @__PURE__ */D(A,{})}),r&&/* @__PURE__ */D(Ae,{anchors:P,activeId:v,visible:b,onClose:N})]})}var Xt={javascript:Y,typescript:J,css:Q,json:ee,bash:te,xml:ne,plaintext:re};function Yt(e,t){let n,r=!1;if(e instanceof Blob)n=URL.createObjectURL(e),r=!0;else{if("string"!=typeof e)return void ke.error("不支持的下载格式");n=e}const o=document.createElement("a");o.href=n,o.download=t,o.rel="noopener",o.style.display="none",document.body.appendChild(o),o.click(),o.remove(),r&&setTimeout(()=>URL.revokeObjectURL(n),1e3),ke.success(`${t} 已下载`)}function Jt(e,t="image",n=2){const{w:r,h:o}=function(e){const t=e.match(/viewBox=["']?([^"'>\s]+(?:[\s,]+[^"'>\s]+){3})["']/i);let n=0,r=0;if(t){const e=t[1].split(/[\s,]+/).map(Number);4===e.length&&(n=e[2],r=e[3])}const o=e.match(/width=["']?\s*([\d.]+)\s*(px|pt|cm|mm|in)["']/i),i=e.match(/height=["']?\s*([\d.]+)\s*(px|pt|cm|mm|in)["']/i),c=o?parseFloat(o[1]):0,s=i?parseFloat(i[1]):0;return c>0&&s>0?{w:c,h:s}:n>0&&r>0?{w:n,h:r}:{w:c||n||800,h:s||r||600}}(e),i=function(e){const t=(new TextEncoder).encode(e);let n="";for(let r=0;r<t.length;r++)n+=String.fromCharCode(t[r]);return`data:image/svg+xml;base64,${btoa(n)}`}(e),c=new Image;c.crossOrigin="anonymous",c.src=i,c.onload=()=>{const e=document.createElement("canvas");e.width=Math.max(1,Math.round(r*n)),e.height=Math.max(1,Math.round(o*n));const i=e.getContext("2d");i.fillStyle="#ffffff",i.fillRect(0,0,e.width,e.height),i.scale(n,n),i.drawImage(c,0,0,r,o),e.toBlob(e=>{e?Yt(e,`${t}.png`):ke.error("PNG 生成失败")},"image/png")},c.onerror=()=>{ke.error("PNG 生成失败:图片加载失败")}}var Qt="app-theme-mode",en="light",tn="dark";function nn(e){return"light"===e||"dark"===e||"system"===e}function rn(){try{const e=localStorage.getItem(Qt);if(nn(e))return e}catch{}return"system"}function on(e){return"system"===e?"undefined"==typeof window?en:window.matchMedia("(prefers-color-scheme: dark)").matches?tn:en:e}function cn(e){"undefined"!=typeof document&&(document.documentElement.dataset.theme=e)}function sn(){"undefined"!=typeof window&&cn(on(rn()))}var an=t(null);function ln({children:t}){const[n,r]=d(()=>rn()),[i,u]=d(()=>on(n)),m=l(null),h=o(e=>{m.current=e,cn(e)},[]);s(()=>{h(on(rn()))},[h]);const p=o(e=>{if(nn(e)){r(e);try{localStorage.setItem(Qt,e),window.dispatchEvent(new Event("storage"))}catch{}}else console.warn(`[render-markdown] 非法的主题模式: ${e},应为 light | dark | system`)},[]);c(()=>{const e=on(n);u(e),h(e)},[n,h]),c(()=>{if("system"!==n)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),t=e=>{const t=e.matches?tn:en;u(t),h(t)};return e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[n,h]),c(()=>{const e=()=>{const e=rn();e!==n&&r(e)};window.addEventListener("storage",e);const t=new MutationObserver(()=>{const e=document.documentElement.dataset.theme;e!==m.current&&("light"!==e&&"dark"!==e||e===i||u(e))});return t.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>{window.removeEventListener("storage",e),t.disconnect()}},[n,i]);const f=i===tn,g=a(()=>({theme:i,mode:n,isDark:f,setMode:p}),[i,n,f,p]);return e.createElement(an.Provider,{value:g},t)}function dn(){const e=i(an);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}var un={"modal-mask":"_modal-mask_dzv9e_4","modal-mask-visible":"_modal-mask-visible_dzv9e_18",modal:"_modal_dzv9e_4","modal-header":"_modal-header_dzv9e_34","modal-title":"_modal-title_dzv9e_41","modal-close":"_modal-close_dzv9e_46","modal-body":"_modal-body_dzv9e_62","modal-footer":"_modal-footer_dzv9e_67"},mn=pe.default.bind(un),hn=({open:e,title:t,width:n=520,onCancel:r,footer:o,className:i="",children:s})=>{const a=()=>{r?.()};if(c(()=>{if(!e)return;const t=e=>{"Escape"===e.key&&a()};return document.addEventListener("keydown",t),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow=""}},[e]),!e)return null;const l=/* @__PURE__ */D("div",{className:mn("modal-mask","modal-mask-visible"),onClick:e=>{e.target===e.currentTarget&&a()},children:/* @__PURE__ */q("div",{className:mn("modal",i),style:{width:n},onClick:e=>{e.stopPropagation()},children:[
13
- /* @__PURE__ */q("div",{className:mn("modal-header"),children:[/* @__PURE__ */D("span",{className:mn("modal-title"),children:t}),/* @__PURE__ */D("div",{className:mn("modal-close"),onClick:a,children:"×"})]}),
14
- /* @__PURE__ */D("div",{className:mn("modal-body"),children:s}),null!=o&&/* @__PURE__ */D("div",{className:mn("modal-footer"),children:o})]})});return oe(l,document.body)},pn={mermaid:"https://registry.npmmirror.com/mermaid/11.17.2/files/dist/mermaid.min.js"};function fn(e,t){t?pn[e]=t:delete pn[e]}var gn=null;function wn(e){return gn||(gn=new Promise((t,n)=>{if(window.mermaid)return void t(window.mermaid);const r=document.createElement("script");try{r.src=function(e,t){const n=t?.[e]??pn[e];if(!n)throw new Error(`[render-markdown] 未找到名为 "${e}" 的 CDN 配置,请通过 cdn 属性或 registerCdn() 注册`);return n}("mermaid",e)}catch(o){return gn=null,void n(o)}r.onload=()=>{window.mermaid?t(window.mermaid):(gn=null,r.remove(),n(/* @__PURE__ */new Error(`Mermaid 脚本已加载但未挂载 window.mermaid:${r.src}`)))},r.onerror=()=>{gn=null,r.remove(),n(/* @__PURE__ */new Error(`Mermaid 脚本加载失败:${r.src}`))},document.head.appendChild(r)})),gn}var vn=0;function yn({source:e,debounceMs:t=300,isDark:n,transformSource:r,chartConfig:o,cdn:i,securityLevel:s="strict"}){const{mermaid:a,loading:u,error:m}=function(e){const[t,n]=d(null),[r,o]=d(!0),[i,s]=d(null);return c(()=>{let t=!1;return wn(e).then(e=>{t||(n(()=>e),o(!1))}).catch(e=>{t||(s(e),o(!1))}),()=>{t=!0}},[]),{mermaid:t,loading:r,error:i}}(i),[h,p]=d(""),[f,g]=d(""),w=l(0),v=l(void 0);return void 0===v.current&&(v.current=r??o),c(()=>{m&&g(m.message?.split("\n")[0]||String(m))},[m]),c(()=>{a&&a.initialize({startOnLoad:!1,theme:n?"dark":"default",securityLevel:s})},[a,n,s]),c(()=>{if(!a)return;const n=(e||"").trim();if(!n)return p(""),void g("");g("");const r=++w.current,o=setTimeout(async()=>{const e="mermaid-render-"+vn++;try{const t=v.current,o=t?t(n):n,{svg:i}=await a.render(e,o??n);if(r!==w.current)return;p(i),g("")}catch(t){if(r!==w.current)return;console.error("Mermaid render error:",t);const e=t instanceof Error?t.message:String(t);g(e?.split("\n")[0]||e)}finally{const t=document.getElementById(e)||document.getElementById(`d${e}`);t&&t.parentNode&&t.parentNode.removeChild(t)}},t);return()=>clearTimeout(o)},[e,n,a,t]),{svg:h,error:f,loading:u}}var bn={tooltip:"_tooltip_1kuma_4","tooltip-trigger":"_tooltip-trigger_1kuma_7","tooltip-inner":"_tooltip-inner_1kuma_11","tooltip-inner-visible":"_tooltip-inner-visible_1kuma_27","tooltip-content":"_tooltip-content_1kuma_30","tooltip-arrow":"_tooltip-arrow_1kuma_36"},kn=pe.default.bind(bn),_n=({title:e,children:t,visible:n,onVisibleChange:r})=>{const[o,i]=d(!1),s=l(null),a=l(null),[u,m]=d({top:0,left:0}),h=void 0!==n?n:o,p=()=>{if(a.current){const e=a.current.getBoundingClientRect();m({top:e.top-8,left:e.left+e.width/2})}};c(()=>{if(!h)return;const e=()=>p(),t=()=>p();return window.addEventListener("resize",e,{passive:!0}),window.addEventListener("scroll",t,{passive:!0}),p(),()=>{window.removeEventListener("resize",e),window.removeEventListener("scroll",t)}},[h]),c(()=>()=>{s.current&&window.clearTimeout(s.current)},[]);const f=h&&e?oe(/* @__PURE__ */q("div",{className:kn("tooltip-inner","tooltip-inner-visible"),style:{top:u.top,left:u.left},children:[/* @__PURE__ */D("span",{className:kn("tooltip-content"),children:e}),/* @__PURE__ */D("span",{className:kn("tooltip-arrow")})]}),document.body):null;/* @__PURE__ */
15
- return q("div",{ref:a,className:kn("tooltip"),onMouseEnter:()=>{s.current&&window.clearTimeout(s.current),s.current=window.setTimeout(()=>{p(),i(!0),r?.(!0)},150)},onMouseLeave:()=>{s.current&&(window.clearTimeout(s.current),s.current=null),i(!1),r?.(!1)},children:[/* @__PURE__ */D("div",{className:kn("tooltip-trigger"),children:t}),f]})},En={dropdown:"_dropdown_13j0u_4","dropdown-trigger":"_dropdown-trigger_13j0u_8","dropdown-menu":"_dropdown-menu_13j0u_12","dropdown-menu-visible":"_dropdown-menu-visible_13j0u_26","dropdown-item":"_dropdown-item_13j0u_30"},Sn=pe.default.bind(En),Cn=({items:e,children:t,onClick:n,className:r=""})=>{const[o,i]=d(!1),s=l(null),a=()=>{i(!1)};return c(()=>{const e=e=>{s.current&&!s.current.contains(e.target)&&a()};return o&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[o]),/* @__PURE__ */q("div",{ref:s,className:Sn("dropdown",r),children:[/* @__PURE__ */D("div",{className:Sn("dropdown-trigger"),onClick:()=>{i(e=>!e)},children:t}),o&&/* @__PURE__ */D("div",{className:Sn("dropdown-menu","dropdown-menu-visible"),children:e.map(e=>/* @__PURE__ */D("div",{className:Sn("dropdown-item"),onClick:()=>(e=>{n({key:e.key}),a()})(e),children:e.label},e.key))})]})};function xn({showSourceView:e,showCollapse:t,showDownload:n,isFullscreen:r,isCollapsed:o,isMinimize:i,isPanzoomActive:c,isPanzoomAvailable:s,isPanzoomEnabled:a,setIsPanzoomEnabled:l,setIsMinimize:d,setIsCollapsed:u,setShowSource:m,toggleFullscreen:h,downloadMenu:p,panzoomRef:f}){/* @__PURE__ */
16
- return D("div",{className:"mermaid-toolbar",children:[{isShow:e&&o&&!r,icon:/* @__PURE__ */D(i?k:S,{}),tooltip:i?"缩略图":"最小化",onClick:()=>d(e=>!e),className:"mermaid-minimize-btn"},{isShow:s,icon:/* @__PURE__ */D(b,{}),tooltip:a?"取消拖拽":"启用拖拽",onClick:()=>l(e=>!e),className:a?"mermaid-panzoom-btn active":"mermaid-panzoom-btn"},{isShow:c,icon:/* @__PURE__ */D(N,{}),tooltip:"放大",onClick:()=>f.current?.zoomIn()},{isShow:c,icon:/* @__PURE__ */D(L,{}),tooltip:"缩小",onClick:()=>f.current?.zoomOut()},{isShow:c,icon:/* @__PURE__ */D(T,{}),tooltip:"重置",onClick:()=>f.current?.reset()},{isShow:n&&c,icon:/* @__PURE__ */D(y,{}),tooltip:"下载",dropdown:p},{isShow:!0,icon:/* @__PURE__ */D(r?_:E,{}),tooltip:r?"退出全屏":"全屏",onClick:h,className:"mermaid-fullscreen-btn"},{isShow:e&&!r,icon:/* @__PURE__ */D(g,{}),tooltip:"查看源码",onClick:()=>m(!0),className:"mermaid-showcode-btn"},{isShow:t&&!r,icon:/* @__PURE__ */D(o?v:$,{}),tooltip:o?"展开":"收起",onClick:()=>u(e=>!e),className:"mermaid-collapsed-btn"}].map(e=>{if(!1===e.isShow)return null;const t=e.className||e.tooltip,n=e.dropdown?/* @__PURE__ */D(Cn,{items:e.dropdown.items,onClick:e.dropdown.onClick,children:/* @__PURE__ */D("div",{className:`remons-markdown-circle ${e.className||""}`,children:e.icon})},t):/* @__PURE__ */D("div",{className:`remons-markdown-circle ${e.className||""}`,onClick:e.onClick,children:e.icon},t);return e.tooltip&&O()?/* @__PURE__ */D(_n,{title:e.tooltip,children:n},`${t}-tooltip`):n})})}var Ln={previewArea:"_previewArea_10gpc_2",previewAreaDisabled:"_previewAreaDisabled_10gpc_22",previewContent:"_previewContent_10gpc_31",errorTip:"_errorTip_10gpc_47",emptyTip:"_emptyTip_10gpc_59"},Nn=null,Tn=/* @__PURE__ */new WeakSet;var Mn="docList-mermaid-driver",zn="docList-menu-driver",An="docList-pc-menu-driver";function $n({source:t,options:n}){/* @__PURE__ */
17
- return D(e.StrictMode,{children:/* @__PURE__ */D(ln,{children:/* @__PURE__ */D(Pn,{source:t,enablePanzoom:!0,showDownload:!0,showSourceView:!0,showCollapse:!0,transformSource:n.transformSource??n.chartConfig,defaultCollapsed:n.defaultCollapsed??!0,isPrintPreview:n.isPrintPreview??!1,minHeight:200,showDriverGuide:n.showDriverGuide,cdn:n.cdn})})})}async function jn(e={}){const{rootElement:t=document}=e;Ct();const n=[];t.querySelectorAll("code.language-mermaid").forEach(e=>{const t=e;if(t.classList.contains("md-fence-open"))return void t.classList.remove("mermaid-render-noCode");const r=t.parentElement;if(!r||"PRE"!==r.tagName)return;const o=(t.textContent??"").trim();n.push({pre:r,source:o,srcHash:xt(o)})});const r=Array.from(t.querySelectorAll(`.${dt}`)),o=new Map(n.map(e=>[e.pre,e])),i=/* @__PURE__ */new Set;for(const c of n){const e=c.pre.nextElementSibling;Lt(e)&&e.getAttribute("data-md-mermaid-src")===c.srcHash&&i.add(e)}for(const c of n){const e=c.pre.nextElementSibling;if(Lt(e)&&i.has(e))continue;const t=r.find(e=>!i.has(e)&&!o.has(e.previousElementSibling)&&e.getAttribute("data-md-mermaid-src")===c.srcHash);t&&(c.pre.after(t),i.add(t))}for(const c of n){const t=c.pre.nextElementSibling;if(Lt(t)&&i.has(t))continue;const n=Lt(t)&&!i.has(t)?t:null;if(n){n.setAttribute(ut,c.srcHash),i.add(n);const t=St(n);if(t){t.render(/* @__PURE__ */D($n,{source:c.source,options:e}));continue}Et(n),n.remove()}const r=document.createElement("div");r.className=dt,r.setAttribute(ut,c.srcHash),r.setAttribute(lt,""),c.pre.after(r),Et(r);const o=I(r);_t(r,o),o.render(/* @__PURE__ */D($n,{source:c.source,options:e}))}for(const c of r)i.has(c)||(Et(c),c.remove())}var In=/* @__PURE__ */he({MermaidChart:()=>Dn,default:()=>Pn,renderMermaid:()=>qn,renderMermaidWithControls:()=>jn}),Pn=n(function({source:e,debounceMs:t=300,enablePanzoom:n=!0,showDownload:r=!0,showSourceView:i=!1,showCollapse:s=!1,defaultCollapsed:u=!0,className:m="",minHeight:h=200,showDriverGuide:p,isPrintPreview:f=!1,transformSource:g,chartConfig:w,securityLevel:v,cdn:y,driverGuideOnce:b=!0}){const{isDark:k}=dn(),{svg:_,error:E,loading:S}=yn({source:e,debounceMs:t,isDark:k,transformSource:g,chartConfig:w,securityLevel:v,cdn:y}),C=l(null),L=l(null),{isFullscreen:N,isCollapsed:T,toggleCollapseAnimated:M,showSource:z,setShowSource:A,isMinimize:$,toggleMinimizeAnimated:j,isPanzoomEnabled:I,setIsPanzoomEnabled:F,toggleFullscreen:B}=function({showCollapse:e,showSourceView:t,defaultCollapsed:n,isPrintPreview:r,svg:i,error:s,loading:a,wrapperRef:u}){const[m,h]=d(!1),[p,f]=d(n),[g,w]=d(!1),[v,y]=d(t),[b,k]=d(!1),_=l(!1),E=l(null),S=l(p);c(()=>{S.current=p},[p]);const C=l(v);c(()=>{C.current=v},[v]);const x=o((e,t)=>{const n=u.current;if(!n)return;const r=n.getBoundingClientRect().height,o=t?36:e?200:n.scrollHeight;Math.abs(r-o)<1||n.animate([{maxHeight:`${r}px`},{maxHeight:`${o}px`}],{duration:280,easing:"ease-in-out"})},[u]),L=o(e=>{const t="function"==typeof e?e(S.current):e;t!==S.current&&x(t,C.current),f(t)},[x]),N=o(e=>{const t="function"==typeof e?e(C.current):e;t!==C.current&&x(S.current,t),y(t)},[x]);return c(()=>{r&&i&&!s&&!a&&f(!1)},[r,i,s,a]),c(()=>{if(r)return;const t=()=>{const t=u.current;if(!t)return;const r=document.fullscreenElement,o=!!r&&(r===t||t.contains(r));if(o||_.current){if(o)return _.current=!0,E.current=S.current,h(!0),void f(!1);_.current=!1,h(!1),e&&f(E.current??n),E.current=null}};return document.addEventListener("fullscreenchange",t),()=>document.removeEventListener("fullscreenchange",t)},[e,r,n,u]),{isFullscreen:m,setIsFullscreen:h,isCollapsed:p,setIsCollapsed:f,toggleCollapseAnimated:L,toggleMinimizeAnimated:N,showSource:g,setShowSource:w,isMinimize:v,setIsMinimize:y,isPanzoomEnabled:b,setIsPanzoomEnabled:k,toggleFullscreen:o(()=>{const e=u.current;e&&(document.fullscreenElement!==e?e.requestFullscreen?.().catch(()=>{console.warn("[render-markdown] 进入全屏失败(可能被浏览器策略拒绝或非安全上下文)")}):document.exitFullscreen?.().catch(()=>{}))},[u])}}({showCollapse:s,showSourceView:i,defaultCollapsed:u,isPrintPreview:f,svg:_,error:E,loading:S,wrapperRef:C}),H=n&&(N||!T||!s),W=H&&I,R=function({contentRef:e,wrapperRef:t,canUse:n,active:r,isFullscreen:i}){const s=l(null),a=l(null),d=l(null),u=l(r);c(()=>{u.current=r},[r]);const m=o(e=>{d.current?.();const n=t.current;e.bind();const r=e.zoomWithWheel;n?.addEventListener("wheel",r),d.current=()=>{n?.removeEventListener("wheel",r),e.destroy()}},[t]),h=o(()=>{d.current?.(),d.current=null},[]);return c(()=>{const t=e.current;if(!n||!t)return h(),a.current=null,void(s.current=null);const r=ie(t,{maxScale:5,minScale:.1,startScale:1,contain:"outside",noBind:!0});return a.current=r,s.current={destroy:()=>r.destroy(),zoomWithWheel:r.zoomWithWheel,zoomIn:()=>r.zoomIn(),zoomOut:()=>r.zoomOut(),reset:()=>r.reset()},u.current&&m(r),()=>{h(),r.destroy(),a.current===r&&(a.current=null,s.current=null)}},[n,i,e,m,h]),c(()=>{const e=a.current;e&&(r?m(e):h())},[r,m,h]),s}({contentRef:L,wrapperRef:C,canUse:n&&!!_&&!f,active:W,isFullscreen:N});c(()=>{if(!p||f||!_)return;const e=C.current;if(e){if(b){if(e.dataset.mdDriverDone)return;e.dataset.mdDriverDone="1"}!function(e){if(Nn||Tn.has(e))return;const t=n=>{if(n>=e.length)return Nn=null,void Tn.add(e);const r=e[n];if(r.condition&&!r.condition())return void t(n+1);r?.onOpen?.();const o=r.steps.filter(e=>!1!==e.isShow&&!!document.querySelector(e.element));if(0===o.length)return void t(n+1);const i=ce({nextBtnText:"下一步",prevBtnText:"上一步",doneBtnText:"我知道了",showProgress:!0,allowClose:!1,progressText:"第 {{current}} 步,共 {{total}} 步",onDestroyed:()=>{Nn=null,t(n+1)},steps:o});Nn=i,i.drive()};t(0)}(function(e,t){return[{id:zn,condition:()=>!localStorage[zn]&&e&&!O()&&"true"!==localStorage.docListMenuVisible,onOpen:()=>{localStorage[zn]="1"},steps:[{element:".docList-menu-list",popover:{title:"列表",description:"点击此处您可查看当前分类下文章列表"}},{element:".docList-menu-copyHtml",popover:{title:"复制",description:"点击此处您可复制 HTML 渲染的格式内容"}},{element:".docList-menu-copyMarkdown",popover:{title:"复制",description:"点击此处您可复制 markdown 源码"}},{element:".docList-menu-print",popover:{title:"打印",description:"点击此处您可跳转至打印页面,输出为PDF"}}]},{id:An,condition:()=>!localStorage[An]&&O()&&e,onOpen:()=>{localStorage[An]="1"},steps:[{element:".docList-menu-copyHtml",popover:{title:"复制",description:"点击此处您可复制 HTML 渲染的格式内容"}},{element:".docList-menu-copyMarkdown",popover:{title:"复制",description:"点击此处您可复制 markdown 源码"}},{element:".docList-menu-print",popover:{title:"打印",description:"点击此处您可跳转至打印页面,输出为PDF"}},{element:".docList-menu-mermaid-collapse",popover:{title:"展开收起mermaid",description:"点击此处按钮可一键展开收起mermaid图表"},isShow:t}]},{id:Mn,condition:()=>!(!t||localStorage[Mn]||!e),onOpen:()=>{localStorage[Mn]="1"},steps:[{element:".mermaid-react-root",popover:{title:"mermaid",description:"恭喜您解锁 Mermaid 渲染图表"}},{element:".mermaid-react-root .mermaid-minimize-btn",popover:{title:"缩略图",description:"点击此处按钮可查看缩略图"}},{element:".mermaid-react-root .mermaid-fullscreen-btn",popover:{title:"全屏",description:"点击此处按钮可切换为全屏展示"}},{element:".mermaid-react-root .mermaid-showcode-btn",popover:{title:"源码",description:"点击此处按钮查看源码弹窗"}},{element:".mermaid-react-root .mermaid-collapsed-btn",popover:{title:"展开",description:"点击此处按钮展开大图"}}]}]}(i,!!_))}},[_,p,f,i,b]);const G=function(e){const t=e.match(/---\s*\n\s*title:\s*(.+)\s*\n\s*---/);return t?t[1].trim():"mermaid 图表"}(e),V=o(()=>{_?function(e,t="image"){Yt(new Blob([e],{type:"image/svg+xml;charset=utf-8"}),`${t}.svg`)}(_,G):ke.warning("暂无图表")},[_,G]),U=o(()=>{_?Jt(_,G,2):ke.warning("暂无图表")},[_,G]),K=a(()=>({items:[{key:"svg",label:"下载 SVG"},{key:"png",label:"下载 PNG"}],onClick:({key:e})=>"svg"===e?V():U()}),[V,U]),Z=!!_;/* @__PURE__ */
18
- return q("div",{ref:C,className:pe.default.bind(Ln)(N?"mermaid-wrapper-fullscreen":"",s?"mermaid-wrapper":"",T&&s&&!$?"mermaid-collapsed":"",m,$&&T&&!N?"mermaid-mini":"",f?"print-preview":""),style:{minHeight:$?0:h,position:"relative",height:"100%"},children:[!f&&/* @__PURE__ */q(P,{children:[i&&/* @__PURE__ */q("div",{className:"mermaid-title",children:[/* @__PURE__ */q("span",{className:"mermaid-title-tag",children:[/* @__PURE__ */D("img",{src:"data:image/svg+xml,%3csvg%20t='1784097187016'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='5199'%20width='200'%20height='200'%3e%3cpath%20d='M0%200m125.754386%200l772.491228%200q125.754386%200%20125.754386%20125.754386l0%20772.491228q0%20125.754386-125.754386%20125.754386l-772.491228%200q-125.754386%200-125.754386-125.754386l0-772.491228q0-125.754386%20125.754386-125.754386Z'%20fill='%23FC366E'%20p-id='5200'%3e%3c/path%3e%3cpath%20d='M921.150877%20174.547088a417.091368%20417.091368%200%200%200-409.168842%20274.198456%20417.235088%20417.235088%200%200%200-409.150877-274.198456%20417.360842%20417.360842%200%200%200%20181.625263%20361.992982%20223.914667%20223.914667%200%200%201%2097.010526%20185.038597v128.143719h261.084071v-128.07186a223.914667%20223.914667%200%200%201%2097.010526-185.038596%20417.181193%20417.181193%200%200%200%20181.553403-361.921123z'%20fill='%23FFFFFF'%20p-id='5201'%3e%3c/path%3e%3c/svg%3e",alt:""}),/* @__PURE__ */D("span",{className:"mermaid-title-text",children:"Mermaid"})]}),G]}),!Z&&/* @__PURE__ */q("div",{className:"mermaid-toolbar-loading",children:[/* @__PURE__ */D(x,{})," "]}),Z&&/* @__PURE__ */D(xn,{showSourceView:i,showCollapse:s,showDownload:r,isFullscreen:N,isCollapsed:T,isMinimize:$,isPanzoomActive:W,isPanzoomAvailable:H,isPanzoomEnabled:I,setIsPanzoomEnabled:F,setIsMinimize:j,setIsCollapsed:M,setShowSource:A,toggleFullscreen:()=>{R.current?.reset(),B()},downloadMenu:K,panzoomRef:R})]}),E&&/* @__PURE__ */q("div",{className:Ln.errorTip,children:["⚠️ ",E]}),
19
- /* @__PURE__ */q("div",{className:`${Ln.previewArea} ${W?"":Ln.previewAreaDisabled}`,style:{minHeight:Z?"auto":h},children:[/* @__PURE__ */D("div",{ref:L,className:Ln.previewContent,dangerouslySetInnerHTML:{__html:_||""}}),(!Z&&!E||S)&&/* @__PURE__ */D("div",{className:Ln.emptyTip,children:e?.trim()?"渲染中...":"← 输入 Mermaid 源码"})]}),i&&/* @__PURE__ */D(hn,{open:z,title:"Mermaid 源码",className:"mermaid-code-modal",width:O()?800:"calc(100% - 20px)",onCancel:()=>A(!1),footer:null,children:/* @__PURE__ */D(Zt,{showCollapseButton:!1,enableMermaid:!1,codeType:"mermaid",content:e})})]})}),Dn=e=>/* @__PURE__ */D(ln,{children:/* @__PURE__ */D(Pn,{...e})}),qn=e=>/* @__PURE__ */D(Dn,{...e}),Fn=Zt;export{lt as MD_PERSIST_ATTR,Dn as MermaidChart,ln as ThemeProvider,pt as addExcludedSelector,Fn as default,Oe as defaultValidateLink,at as initHighlighter,sn as initTheme,Xt as languagesCommon,st as markdownFormat,fn as registerCdn,ft as removeExcludedSelector,qn as renderMermaid,Dt as useIncrementalRender,dn as useTheme};
1
+ import e,{createContext as t,forwardRef as n,memo as r,useCallback as o,useContext as i,useEffect as c,useLayoutEffect as s,useMemo as a,useRef as l,useState as d}from"react";import{CaretDownOutlined as u,CaretRightOutlined as m,CheckCircleOutlined as h,CloseCircleOutlined as p,CloseOutlined as f,CodeOutlined as g,CopyFilled as v,DownOutlined as w,DownloadOutlined as y,DragOutlined as b,ExportOutlined as k,FullscreenExitOutlined as _,FullscreenOutlined as E,ImportOutlined as S,InfoCircleOutlined as x,LoadingOutlined as C,MinusOutlined as L,PlusOutlined as N,ReloadOutlined as T,RightOutlined as M,SearchOutlined as A,UnorderedListOutlined as $,UpOutlined as j,WarningOutlined as z}from"@ant-design/icons";import{createRoot as I}from"react-dom/client";import{Fragment as P,jsx as q,jsxs as D}from"react/jsx-runtime";import F from"classnames";import{IsPC as O,copy as B}from"methods-r";import H from"markdown-it";import W from"markdown-it-anchor";import R from"markdown-it-link-attributes";import G from"highlight.js/lib/core";import{tab as V}from"@mdit/plugin-tab";import U from"markdown-it-github-alerts";import K from"markdown-it-task-lists";import Z from"photoswipe";import X from"morphdom";import Y from"highlight.js/lib/languages/javascript";import J from"highlight.js/lib/languages/typescript";import Q from"highlight.js/lib/languages/css";import ee from"highlight.js/lib/languages/json";import te from"highlight.js/lib/languages/bash";import ne from"highlight.js/lib/languages/xml";import re from"highlight.js/lib/languages/plaintext";import{createPortal as oe}from"react-dom";import ie from"@panzoom/panzoom";import{driver as ce}from"driver.js";var se=Object.create,ae=Object.defineProperty,le=Object.getOwnPropertyDescriptor,de=Object.getOwnPropertyNames,ue=Object.getPrototypeOf,me=Object.prototype.hasOwnProperty,he=(e,t)=>{let n={};for(var r in e)ae(n,r,{get:e[r],enumerable:!0});return t||ae(n,Symbol.toStringTag,{value:"Module"}),n},pe=/* @__PURE__ */((e,t,n)=>(n=null!=e?se(ue(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var o,i=de(t),c=0,s=i.length;c<s;c++)o=i[c],me.call(e,o)||o===n||ae(e,o,{get:(e=>t[e]).bind(null,o),enumerable:!(r=le(t,o))||r.enumerable});return e})(!t&&e&&e.__esModule&&me.call(e,"default")?n:ae(n,"default",{value:e,enumerable:!0}),e)))(/* @__PURE__ */((e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports))((e,t)=>{!function(){var e={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=o(e,r.call(this,n)))}return e}function r(t){if("string"==typeof t||"number"==typeof t)return this&&this[t]||t;if("object"!=typeof t)return"";if(Array.isArray(t))return n.apply(this,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var r="";for(var i in t)e.call(t,i)&&t[i]&&(r=o(r,this&&this[i]||i));return r}function o(e,t){return t?e?e+" "+t:e+t:e}void 0!==t&&t.exports?(n.default=n,t.exports=n):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],function(){return n}):window.classNames=n}()})(),1),fe={container:"_container_1a6ji_4",item:"_item_1a6ji_16",toast:"_toast_1a6ji_19",fadeIn:"_fadeIn_1a6ji_1","toast-warning":"_toast-warning_1a6ji_31","toast-info":"_toast-info_1a6ji_34","toast-error":"_toast-error_1a6ji_37","toast-success":"_toast-success_1a6ji_40"},ge=pe.default.bind(fe),ve={warning:/* @__PURE__ */q(z,{style:{color:"#faad14",fontSize:"16px"}}),info:/* @__PURE__ */q(x,{style:{color:"#1890ff",fontSize:"16px"}}),error:/* @__PURE__ */q(p,{style:{color:"#ff4d4f",fontSize:"16px"}}),success:/* @__PURE__ */q(h,{style:{color:"#52c41a",fontSize:"16px"}})},we=({config:e})=>/* @__PURE__ */D("div",{className:ge("toast",`toast-${e.type}`),children:[ve[e.type],/* @__PURE__ */q("span",{children:e.content})]}),ye=()=>{const[e,t]=d([]),n=l(/* @__PURE__ */new Map);return c(()=>{const e=e=>{const{type:r,content:o,duration:i=3e3}=e.detail,c=`message-${Date.now()}-${Math.random()}`,s={key:c,content:o,type:r,duration:i};t(e=>[...e,s]);const a=window.setTimeout(()=>{(e=>{t(t=>t.filter(t=>t.key!==e));const r=n.current.get(e);r&&(clearTimeout(r),n.current.delete(e))})(c)},i);n.current.set(c,a)},r=()=>{t([]),n.current.forEach(e=>clearTimeout(e)),n.current.clear()};return window.addEventListener("custom-message",e),window.addEventListener("custom-message-clear",r),()=>{window.removeEventListener("custom-message",e),window.removeEventListener("custom-message-clear",r),n.current.forEach(e=>clearTimeout(e))}},[]),/* @__PURE__ */q("div",{className:ge("container"),children:e.map(e=>/* @__PURE__ */q("div",{className:ge("item"),children:/* @__PURE__ */q(we,{config:e})},e.key))})},be=!1,ke={dispatch:(e,t,n)=>{(()=>{if(be)return;be=!0;const e=document.createElement("div");e.id="custom-message-container",document.body.appendChild(e),I(e).render(/* @__PURE__ */q(ye,{}))})(),requestAnimationFrame(()=>{window.dispatchEvent(new CustomEvent("custom-message",{detail:{type:e,content:t,duration:n}}))})},warning:(e,t)=>ke.dispatch("warning",e,t),info:(e,t)=>ke.dispatch("info",e,t),error:(e,t)=>ke.dispatch("error",e,t),success:(e,t)=>ke.dispatch("success",e,t),destroy:()=>{window.dispatchEvent(new Event("custom-message-clear"))}},_e=pe.default.bind({"back-top":"_back-top_gdg5d_4"});function Ee(e){return e.current||window}var Se=r(({target:e,visibilityHeight:t=300})=>{const[n,r]=d(!1),o=l(null);c(()=>{if(e)try{o.current=e()}catch{o.current=null}},[e]),c(()=>{const e=Ee(o),n=()=>{r(function(e){return e===window?window.scrollY||document.documentElement.scrollTop:e.scrollTop}(e)>t)};return e.addEventListener("scroll",n,{passive:!0}),n(),()=>{e.removeEventListener("scroll",n)}},[t]);return n?/* @__PURE__ */q("div",{className:`${_e("back-top")} remons-markdown-circle`,onClick:()=>{Ee(o).scrollTo({top:0,behavior:"smooth"})},children:/* @__PURE__ */q(j,{})}):null}),xe="_empty_container_fkmsv_3",Ce="_description_fkmsv_12";function Le({description:e="暂无数据"}){/* @__PURE__ */
2
+ return D("div",{className:xe,children:[/* @__PURE__ */D("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",children:[
3
+ /* @__PURE__ */q("rect",{x:"8",y:"16",width:"48",height:"36",rx:"4",stroke:"#d9d9d9",strokeWidth:"2"}),
4
+ /* @__PURE__ */q("line",{x1:"16",y1:"28",x2:"48",y2:"28",stroke:"#d9d9d9",strokeWidth:"2"}),
5
+ /* @__PURE__ */q("line",{x1:"16",y1:"36",x2:"40",y2:"36",stroke:"#d9d9d9",strokeWidth:"2"}),
6
+ /* @__PURE__ */q("line",{x1:"16",y1:"44",x2:"32",y2:"44",stroke:"#d9d9d9",strokeWidth:"2"})]}),/* @__PURE__ */q("span",{className:Ce,children:e})]})}var Ne={tocSidebar:"_tocSidebar_emxjv_1",open:"_open_emxjv_16",tocHeader:"_tocHeader_emxjv_31",tocTitle:"_tocTitle_emxjv_38",tocActions:"_tocActions_emxjv_43",tocSearchBar:"_tocSearchBar_emxjv_53",tocSearchInput:"_tocSearchInput_emxjv_60",tocSearchClear:"_tocSearchClear_emxjv_78",tocSearchExit:"_tocSearchExit_emxjv_90",tocBody:"_tocBody_emxjv_103",tocItem:"_tocItem_emxjv_109",tocItemTitle:"_tocItemTitle_emxjv_109",active:"_active_emxjv_119",tocLink:"_tocLink_emxjv_122",tocExpandIcon:"_tocExpandIcon_emxjv_126",tocChildren:"_tocChildren_emxjv_153",highlight:"_highlight_emxjv_156",tocEmpty:"_tocEmpty_emxjv_160"};function Te({item:e,depth:t=0,activeId:n,searchText:r}){const[o,i]=d(!0),s=e.children&&e.children.length>0,a=e.href===n,u=l(null),m=s?Ae(e.children,r):[];if(r&&!m.length&&!Me(e.title,r))return null;c(()=>{n&&s&&e.children.some(e=>e.href===n)&&i(!0)},[n,s,e.children]);/* @__PURE__ */
7
+ return D("div",{className:Ne.tocItem,ref:u,style:{paddingLeft:14},children:[/* @__PURE__ */D("div",{className:`${Ne.tocItemTitle}${a?` ${Ne.active}`:""}`,children:[s&&/* @__PURE__ */q("span",{className:Ne.tocExpandIcon,onClick:e=>{e.stopPropagation(),i(!o)},children:/* @__PURE__ */q(o?w:M,{})}),/* @__PURE__ */q("a",{className:Ne.tocLink,href:`#${e.href}`,onClick:t=>{t.preventDefault();const n=e.href,r=document.getElementById(n);r&&(history.pushState(null,"",`#${n}`),r.scrollIntoView({behavior:"smooth",block:"start"}))},children:(e=>{if(!r)return e;const t=function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(r),n=new RegExp(`(${t})`,"gi");return e.split(n).map((e,t)=>e.toLowerCase().includes(r.toLowerCase())?/* @__PURE__ */q("span",{className:Ne.highlight,children:e},t):e)})(e.title)})]}),s&&o&&/* @__PURE__ */q("div",{className:Ne.tocChildren,children:r?m.map((e,o)=>/* @__PURE__ */q(Te,{item:e,depth:t+1,activeId:n,searchText:r},e.href||o)):e.children.map((e,o)=>/* @__PURE__ */q(Te,{item:e,depth:t+1,activeId:n,searchText:r},e.href||o))})]})}function Me(e,t){return!t||e.toLowerCase().includes(t.toLowerCase())}function Ae(e,t){return t?e.map(e=>{const n=Ae(e.children,t),r=Me(e.title,t);return r||n.length>0?{...e,children:r?e.children:n}:null}).filter(Boolean):e}var $e=r(function({anchors:e,activeId:t,visible:n,onClose:r}){const o=l(null),i=l(null),s=l(null),a=l(null),[u,m]=d(""),[h,p]=d(!1),[g,v]=d(n),[w,y]=d(n);c(()=>{if(n){v(!0);const e=requestAnimationFrame(()=>y(!0));return()=>cancelAnimationFrame(e)}y(!1);const e=setTimeout(()=>v(!1),220);return()=>clearTimeout(e)},[n]),c(()=>{if(!n)return;const e=e=>{const t=e.target;a.current&&a.current.contains(t)||t.closest(".md-toc-toggle")||r()};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[n,r]),c(()=>{if(!t||!o.current||!n)return;const e=o.current.querySelector(`.${Ne.active}`);e&&e.scrollIntoView({behavior:"smooth",block:"nearest"})},[t,n]),c(()=>{if(!h)return;const e=e=>{s.current&&!s.current.contains(e.target)&&(p(!1),m(""))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[h]);const b=()=>{m(""),p(!1)},k=Ae(e,u);return e&&0!==e.length&&g?/* @__PURE__ */D("div",{ref:a,className:F(Ne.tocSidebar,"md-toc-sidebar",{[Ne.open]:w}),children:[
8
+ /* @__PURE__ */D("div",{className:Ne.tocHeader,children:[/* @__PURE__ */q("span",{className:Ne.tocTitle,children:"目录"}),/* @__PURE__ */D("div",{className:Ne.tocActions,children:[!h&&/* @__PURE__ */q("span",{className:"remons-markdown-circle",onClick:()=>{p(!0),setTimeout(()=>i.current?.focus(),50)},title:"搜索",children:/* @__PURE__ */q(A,{})}),/* @__PURE__ */q("span",{className:F("remons-markdown-circle",Ne.tocClose),onClick:r,children:/* @__PURE__ */q(f,{})})]})]}),h&&/* @__PURE__ */D("div",{ref:s,className:Ne.tocSearchBar,children:[
9
+ /* @__PURE__ */q("input",{ref:i,className:Ne.tocSearchInput,type:"text",placeholder:"搜索目录…",value:u,onChange:e=>{m(e.target.value)}}),u&&/* @__PURE__ */q("span",{className:Ne.tocSearchClear,onClick:b,children:/* @__PURE__ */q(f,{})}),
10
+ /* @__PURE__ */q("span",{className:Ne.tocSearchExit,onClick:b,title:"退出搜索",children:"×"})]}),
11
+ /* @__PURE__ */q("div",{className:Ne.tocBody,ref:o,children:k.length>0?k.map((e,n)=>/* @__PURE__ */q(Te,{item:e,activeId:t,searchText:u},e.href||n)):u&&/* @__PURE__ */q("div",{className:Ne.tocEmpty,children:"未找到匹配项"})})]}):null}),je=/* @__PURE__ */new Set(["[ ]","[x]","[X]"]);function ze(e){e.core.ruler.after("inline","github-task-lists-empty",e=>{const t=e.tokens;for(let n=0;n<t.length;n++){const e=t[n];if("inline"!==e.type)continue;const r=e.content;if(!je.has(r))continue;let o=n-1;if(o>=0&&"paragraph_open"===t[o].type&&(o-=1),o<0||"list_item_open"!==t[o].type)continue;Ie(t[o],"task-list-item");for(let n=o-1;n>=0;n--)if("bullet_list_open"===t[n].type||"ordered_list_open"===t[n].type){Ie(t[n],"contains-task-list");break}const i=new e.constructor("html_inline","",0);i.content="[ ]"===r?'<input class="task-list-item-checkbox" disabled="" type="checkbox">':'<input class="task-list-item-checkbox" checked="" disabled="" type="checkbox">',e.children=[i],e.content=""}})}function Ie(e,t){const n=(e.attrGet("class")||"").split(/\s+/).filter(Boolean);n.includes(t)||e.attrSet("class",[...n,t].join(" "))}var Pe=/(\d\uFE0F?\u20E3)|([\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u3251-\u325F\u32B1-\u32BF])\uFE0F?/g,qe=[10111,10121,10131],De={base:"mdNum",wide:"mdNumWide",cjk:"mdNumCjk"};function Fe(e){const t=Number(e.charAt(0));return 0===t?"⓪":String.fromCharCode(9312+t-1)}function Oe(e,t){return function(e){return e>=12881&&e<=12895||e>=12977&&e<=12991}(e)?t.cjk||t.wide:function(e){return e>=9321&&e<=9331||e>=9341&&e<=9351||e>=9361&&e<=9371||e>=9451&&e<=9460||e>=12881&&e<=12895||e>=12977&&e<=12991||qe.indexOf(e)>=0}(e)?t.wide:t.base}function Be(e,t){return`<span class="${Oe(e.codePointAt(0)||0,t)}">${e}</span>`}function He(e,t=De){e.core.ruler.after("inline","circled-numbers",e=>{for(let n=0;n<e.tokens.length;n++){const r=e.tokens[n];"inline"===r.type&&r.children&&We(e,r.children,t)}})}function We(e,t,n){const r=e.Token;for(let o=0;o<t.length;o++){const e=t[o];if("text"!==e.type||!Pe.test(e.content))continue;Pe.lastIndex=0;const i=[];let c,s=0;for(;c=Pe.exec(e.content);){const t=c[1]?Fe(c[1]):c[2];if(c.index>s){const t=new r("text","",0);t.content=e.content.slice(s,c.index),i.push(t)}const o=new r("html_inline","",0);o.content=Be(t,n),i.push(o),s=c.index+c[0].length}if(s<e.content.length){const t=new r("text","",0);t.content=e.content.slice(s),i.push(t)}t.splice(o,1,...i),o+=i.length-1}}var Re=/^(vbscript|javascript|file|data):/,Ge=/^data:image\/(gif|png|jpeg|webp);/,Ve=/^data:image\/svg\+xml[;,]/i,Ue=/<\s*script|\bon[a-z]+\s*=|<!ENTITY|foreignobject/i;function Ke(e){const t=e.trim().toLowerCase();if(!Re.test(t))return!0;if(Ge.test(t))return!0;if(!Ve.test(t))return!1;const n=function(e){const t=e.indexOf(",");if(t<0)return null;const n=e.slice(0,t),r=e.slice(t+1);try{return/;base64/i.test(n)?"function"==typeof atob?atob(r):null:decodeURIComponent(r)}catch{return null}}(e);return null!==n&&!Ue.test(n)}var Ze={note:"注",tip:"提示",important:"重要",warning:"注意",caution:"警告"},Xe={note:'<i class="iconfont icon-note"></i>',tip:'<i class="iconfont icon-tip"></i>',important:'<i class="iconfont icon-important"></i>',warning:'<i class="iconfont icon-warning"></i>',caution:'<i class="iconfont icon-caution"></i>'};function Ye(e){return e.replace(/[\u{1F000}-\u{1FFFF}\u{200D}\u{FE0F}\u{2600}-\u{27BF}\u{2300}-\u{23FF}\u{2700}-\u{27BF}]/gu,"").trim()}var Je="markdown-tabs",Qe=`.${Je}-tabs-header`,et=`.${Je}-tabs-wrapper`,tt=`.${Je}-tab-button`,nt=`.${Je}-tab-content`,rt="data-md-user-active",ot="data-md-src-active",it="data-md-tabs-count",ct=!1,st=(e,t)=>{const n=e.getAttribute("data-tab");return null!==n&&/^\d+$/.test(n)?Number(n):Array.from(t.querySelectorAll(tt)).indexOf(e)},at=e=>{const t=e.querySelector(Qe);if(!t)return-1;const n=t.querySelector(`${tt}[data-active]`);return n?st(n,t):-1};function lt(e,t,n){const r=t.querySelectorAll(tt),o=n.querySelectorAll(nt);r.forEach(e=>e.classList.remove("active")),o.forEach(e=>e.classList.remove("active"));const i=r[e];if(!i)return;i.classList.add("active");const c=n.querySelector(`${nt}[data-index="${e}"]`)??o[e];c&&c.classList.add("active")}function dt(e){e.querySelectorAll(et).forEach(e=>{const t=e.getAttribute(rt);if(null===t||!/^\d+$/.test(t))return;const n=e.querySelector(Qe),r=e.querySelector(`.${Je}-tabs-container`);if(!n||!r)return;const o=()=>{e.removeAttribute(rt),e.removeAttribute(ot),e.removeAttribute(it)};if(Number(e.getAttribute(ot))!==at(e))return void o();if(Number(e.getAttribute(it))!==n.querySelectorAll(tt).length)return void o();const i=Number(t);if(!n.querySelectorAll(tt)[i])return;const c=n.querySelector(`${tt}.active`);c&&st(c,n)!==i&&lt(i,n,r)})}var ut=e=>{const t=e.target?.closest(tt);if(!t)return;const n=t.closest(Qe);if(!n)return;const r=n.closest(`.${Je}-tabs-wrapper`)?.querySelector(`.${Je}-tabs-container`);r&&function(e,t,n){const r=st(e,t);lt(r,t,n);const o=e.closest(et);o&&(o.setAttribute(rt,String(r)),o.setAttribute(ot,String(at(o))),o.setAttribute(it,String(t.querySelectorAll(tt).length)));const i=e.closest(".markdown"),c=e.offsetParent;i&&c&&i.scrollTop>c.offsetTop&&i.scrollTo({top:c.offsetTop,behavior:"smooth"})}(t,n,r)},mt=e=>{const t=e.target?.closest(Qe);t&&0!==Math.abs(e.deltaY)&&(t.scrollWidth<=t.clientWidth||(e.preventDefault(),t.scrollLeft+=e.deltaY))};function ht(e){if(e.dataset.maskInited)return;e.dataset.maskInited="1";const t=e.parentElement;if(!t)return;const n=()=>{const{scrollLeft:n,scrollWidth:r,clientWidth:o}=e,i=n>1,c=n+o<r-1;t.classList.remove("has-left-mask","has-right-mask","has-both-masks"),i&&c?t.classList.add("has-both-masks"):i?t.classList.add("has-left-mask"):c&&t.classList.add("has-right-mask")};e.addEventListener("scroll",n),n()}var pt=!1;var ft=!1;function gt(){ct||(ct=!0,document.addEventListener("click",ut),document.addEventListener("wheel",mt,{passive:!1,capture:!0})),document.querySelectorAll(Qe).forEach(e=>ht(e)),pt||"undefined"==typeof MutationObserver||(pt=!0,new MutationObserver(e=>{e.forEach(e=>{e.addedNodes.forEach(e=>{if(1!==e.nodeType)return;const t=e;t.classList.contains("markdown-tabs-tabs-header")&&ht(t),t.querySelectorAll(Qe).forEach(e=>ht(e))})})}).observe(document.body,{childList:!0,subtree:!0})),ft||(ft=!0,window.addEventListener("resize",()=>{document.querySelectorAll(Qe).forEach(e=>{e.dispatchEvent(new Event("scroll"))})}))}var vt="0.18.1",wt=`https://registry.npmmirror.com/katex/${vt}/files/dist/katex.min.css`,yt=`https://registry.npmmirror.com/katex/${vt}/files/dist/katex.min.js`,bt=null;function kt(e,t={}){const n={throwOnError:!1,errorColor:"#cc0000",...t};function r(e,t){try{return function(){if(!window.katex)throw new Error("[katex-loader] KaTeX not loaded. Call ensureKatexLoaded() first.");return window.katex}().renderToString(e,{...n,displayMode:t})}catch(r){const t=r instanceof Error?r.message:String(r);return`<span style="color:${n.errorColor}" title="${o(t)}">${o(e)}</span>`}}function o(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}"undefined"!=typeof window&&window.katex||console.warn("[markdown-it-katex] KaTeX is not loaded yet. Call `await ensureKatexLoaded()` before using this plugin, or use `renderWithKatex()` helper instead."),e.inline.ruler.before("emphasis","katex_inline",(e,t)=>{if(36!==e.src.charCodeAt(e.pos))return!1;if(36===e.src.charCodeAt(e.pos+1))return!1;if(e.pos>0&&92===e.src.charCodeAt(e.pos-1))return!1;const n=e.pos+1;if(n>=e.posMax)return!1;if(/\s/.test(e.src[n]))return!1;let r=n;for(;r<e.posMax&&(36!==e.src.charCodeAt(r)||92===e.src.charCodeAt(r-1));)r++;if(r>=e.posMax)return!1;if(r===n)return!1;if(/\s/.test(e.src[r-1]))return!1;if(!t){const t=e.push("katex_inline","math",0);t.markup="$",t.content=e.src.slice(n,r)}return e.pos=r+1,!0}),e.block.ruler.after("blockquote","katex_block",(e,t,n,r)=>{const o=e.bMarks[t]+e.tShift[t];if(o+2>e.eMarks[t]||"$$"!==e.src.slice(o,o+2))return!1;if(r)return!0;let i=t+1,c=!1;for(;i<n;){const t=e.bMarks[i]+e.tShift[i];if("$$"===e.src.slice(t,e.eMarks[i]).trim()){c=!0;break}i++}const s=e.bMarks[t+1],a=c?e.bMarks[i]:e.eMarks[n-1];e.line=i+(c?1:0);const l=e.push("katex_block","math",0);return l.block=!0,l.markup="$$",l.content=e.src.slice(s,a).trim(),l.map=[t,e.line],!0}),e.renderer.rules.katex_inline=(e,t)=>r(e[t].content,!1),e.renderer.rules.katex_block=(e,t)=>`<div class="katex-block">${r(e[t].content,!0)}</div>\n`}function _t(e){return"string"!=typeof e?"":e.trim().toLowerCase().replace(/[^a-z0-9\u4e00-\u9fff]+/g,"-").replace(/^-|-$/g,"").replace(/-+/g,"-")}function Et(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function St(e){const t=[],n=[];for(let r=0;r<e.length;r++){const o=e[r];if("heading_open"!==o.type)continue;const i=Number((o.tag||"").slice(1));if(!Number.isInteger(i)||i<1||i>6)continue;const c=e[r+1],s="inline"===c?.type?(c.content||"").trim():"";if(!s)continue;const a=o.attrGet("id"),l={title:s,href:("string"==typeof a?a:"")||_t(s),nodeName:`H${i}`,nodeTitle:`<h${i}>${Et(s)}</h${i}>`,children:[]};for(;n.length&&n[n.length-1].level>=i;)n.pop();const d=n[n.length-1];d?d.item.children.push(l):t.push(l),n.push({level:i,item:l})}return t}async function xt(e,t,n){const r="string"==typeof e?e:null==e?"":String(e);let o=!0;try{await function(e=15e3){return bt||("undefined"==typeof window?Promise.reject(/* @__PURE__ */new Error("[katex-loader] Requires a browser environment.")):window.katex?Promise.resolve():bt=new Promise((t,n)=>{const r=setTimeout(()=>{bt=null,n(/* @__PURE__ */new Error(`[katex-loader] KaTeX CDN timeout after ${e}ms.`))},e),o=document.querySelector(`script[src="${yt}"]`);if(o)return window.katex?(clearTimeout(r),void t()):(o.addEventListener("load",()=>{clearTimeout(r),t()}),void o.addEventListener("error",()=>{clearTimeout(r),bt=null,n(/* @__PURE__ */new Error(`[katex-loader] Failed to load ${yt}`))}));if(!document.querySelector(`link[href="${wt}"]`)){const e=document.createElement("link");e.rel="stylesheet",e.href=wt,document.head.appendChild(e)}const i=document.createElement("script");i.src=yt,i.onload=()=>{clearTimeout(r),t()},i.onerror=()=>{clearTimeout(r),bt=null,i.remove(),n(/* @__PURE__ */new Error(`[katex-loader] Failed to load ${yt}`))},document.head.appendChild(i)}))}()}catch(l){o=!1,console.warn("[render-markdown] KaTeX 加载失败,公式将降级为纯文本:",l)}const i=function(){const e=/* @__PURE__ */new Set;return t=>{let n=t,r=1;for(;e.has(n);)n=`${t}-${r}`,r+=1;return e.add(n),n}}(),c=new H({langPrefix:"language-",html:n?.html??!0,highlight:function(e,t){if(t&&G.getLanguage(t))try{return G.highlight(e,{language:t}).value}catch(n){}return""}}).use(V,{name:Je}).use(W,{permalink:W.permalink.linkInsideHeader({class:"header-anchor",symbol:"#",placement:"after"}),slugify:e=>i(_t(e))}).use(R,{matcher:e=>e.match(/^https?:\/\//),attrs:{target:"_blank",rel:"noopener"}}).use(U,{titles:Ze,icons:Xe}).use(K).use(ze).use(He);o&&c.use(kt,{strict:!1,throwOnError:!1}),t&&t.forEach(e=>c.use(e)),c.validateLink=n?.validateLink??Ke;const s=c.parse(r,{});!function(e,t){let n=null;for(let l=e.length-1;l>=0;l--)if("fence"===e[l].type){n=e[l];break}if(!n||!n.map)return;const r=t.split("\n"),o=n.map[0],i=n.markup||"```",c="~"===i[0]?"~":"`",s=Math.max(3,i.length),a=new RegExp("^ {0,3}"+c+"{"+s+",}[ \\t]*$");for(let l=o+1;l<r.length;l++)if(a.test(r[l]))return;n.attrJoin("class","md-fence-open")}(s,r),o||(c.renderer.rules.katex_inline=(e,t)=>Et(e[t].content||""),c.renderer.rules.katex_block=(e,t)=>`<code>${Et(e[t].content||"")}</code>\n`);const a=c.renderer.render(s,c.options,{}).replace(/class="markdown-alert markdown-alert-(\w+)"[\s\S]*?class="markdown-alert-title"[^>]*>([\s\S]*?)<\/p>/g,(e,t,n)=>{const r=Ze[t];if(!r)return e;const o=Ye(n.replace(/<[^>]*>/g,""));if(o.toLowerCase()===t.toLowerCase()){const t=n.lastIndexOf(">");if(-1!==t){const i=n.substring(0,t+1)+Ye(n.substring(t+1)).replace(o,r);return e.replace(n,i)}}return e});return queueMicrotask(()=>gt()),{anchor:St(s),info:a}}function Ct(e){e&&"object"==typeof e?Object.entries(e).forEach(([e,t])=>{G.getLanguage(e)||G.registerLanguage(e,t)}):console.warn("[render-markdown] initHighlighter 需要传入一个语言包对象")}var Lt="data-md-persist",Nt="mermaid-react-root",Tt="data-md-mermaid-src",Mt=/* @__PURE__ */new WeakMap,At=["pre",`.${Nt}`];function $t(e){(Array.isArray(e)?e:[e]).forEach(e=>{At.includes(e)||At.push(e)})}function jt(e){(Array.isArray(e)?e:[e]).forEach(e=>{const t=At.indexOf(e);t>=0&&At.splice(t,1)})}var zt=(e,t)=>t.some(t=>null!==e.closest(t))||At.some(t=>null!==e.closest(t));function It(e){const t=e.currentSrc||e.src,n={src:t,msrc:t,alt:e.alt||void 0,element:e.isConnected?e:void 0};e.naturalWidth&&e.naturalHeight&&(n.width=e.naturalWidth,n.height=e.naturalHeight);const r=e.getAttribute("srcset")||"";return/\d+w/.test(r)&&(n.srcset=r),n}var Pt=0,qt=null;function Dt(e,t){if(e.active)return;const n=e.images.indexOf(t);if(n<0)return;const r=new Z({dataSource:e.images.map(It),index:n,bgOpacity:1,initialZoomLevel:"fit",secondaryZoomLevel:1,maxZoomLevel:2,padding:{top:24,bottom:24,left:24,right:24},showHideAnimationType:"zoom",preload:[1,2],loop:!1,wheelToZoom:!0,imageClickAction:"zoom-or-close",bgClickAction:"close",tapAction:"toggle-controls",doubleTapAction:"zoom",pinchToClose:!0,closeOnVerticalDrag:!0,clickToCloseNonZoomable:!0,escKey:!0,arrowKeys:!0,trapFocus:!0,returnFocus:!0,mainClass:"md-image-preview",errorMsg:"图片加载失败",closeTitle:"关闭",zoomTitle:"放大 / 缩小",arrowPrevTitle:"上一张",arrowNextTitle:"下一张",counterTitle:"当前图片序号"});e.active=r;let o=!1,i=()=>{};const c=()=>{o||(o=!0,(Pt=Math.max(0,Pt-1))>0||null===qt||(document.documentElement.style.overflow=qt,qt=null),i())};if(r.on("close",c),r.on("destroy",()=>{c(),e.active===r&&(e.active=null)}),!1===r.init())return void(e.active=null);!function(){if("undefined"==typeof document)return;if((Pt+=1)>1)return;const e=document.documentElement;qt=e.style.overflow,e.style.overflow="hidden"}();const s=()=>{const e=r.currSlide?.zoomLevels;e&&e.fit&&(e.min=Math.min(e.min,.5*e.fit))};r.on("change",s),r.on("loadComplete",s),window.addEventListener("resize",s),s(),i=()=>window.removeEventListener("resize",s)}var Ft=/* @__PURE__ */new Map;function Ot(e,t){const n=Ft.get(e);n?n.push(t):Ft.set(e,[t])}function Bt(e){const t=Ft.get(e);t&&(t.forEach(e=>{try{e.unmount()}catch{}}),Ft.delete(e))}function Ht(e){return Ft.get(e)?.[0]}function Wt(){Ft.forEach((e,t)=>{t.isConnected||Bt(t)})}function Rt(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619)>>>0;return`${t.toString(36)}-${e.length.toString(36)}`}function Gt(e){return!!e&&e.classList.contains("mermaid-react-root")&&e.hasAttribute("data-md-mermaid-src")}function Vt(e){if(e)return 1===e.nodeType&&e.classList?.contains("mermaid-react-root")?(Bt(e),void e.remove()):void e.querySelectorAll(`.${Nt}`).forEach(e=>{Bt(e),e.remove()})}var Ut=/* @__PURE__ */new Set(["mermaid-render-noCode","code-collapsed","has-left-mask","has-right-mask","has-both-masks","active"]),Kt=["mermaid-render-noCode","code-collapsed","has-left-mask","has-right-mask","has-both-masks"],Zt=/* @__PURE__ */new Set(["data-tab","data-index","data-id","data-active"]),Xt=e=>{const t="string"==typeof e.className?e.className:"";return t?t.split(/\s+/).filter(e=>e&&!e.startsWith("copy-")&&!Ut.has(e)).join(" "):""},Yt=e=>{const t=e.getAttribute("id");return t?`id:${t}`:(e=>{const t=Xt(e);return t?`${e.tagName.toLowerCase()}#${t}`:""})(e)},Jt="data-md-mounted",Qt=e=>{const t=e.getAttribute("data-md-key");return`${e.tagName.toLowerCase()}#${t??Xt(e)}`},en=e=>Array.from(e.attributes).some(e=>e.name.endsWith("-placeholder")),tn=e=>{const t={};for(const n of Array.from(e.attributes))n.name.startsWith("data-")&&"data-md-persist"!==n.name&&"data-md-key"!==n.name&&(n.name.endsWith("-placeholder")||(t[n.name]=n.value));return t},nn=e=>{const t=e.querySelector(`[${Jt}]`);return t||(Array.from(e.querySelectorAll("*")).find(en)??null)},rn=e=>{const t=[];e.querySelectorAll(`[${Lt}]`).forEach(e=>{const n=e;n.classList.contains("pre-handle")||n.classList.contains("mermaid-react-root")||n.parentElement?.closest("[data-md-persist]")||t.push(n)});const n=t.map(e=>{const t=nn(e);return{el:e,key:Qt(e),configEl:t,mounted:t?.hasAttribute(Jt)??!1}});return n.forEach(e=>e.el.remove()),n},on=(e,t,n)=>{if(0===t.length)return;const r=/* @__PURE__ */new Set;Array.from(e.querySelectorAll("*")).filter(e=>en(e)).forEach(e=>{const n=e.closest(`[${Lt}]`);if(!n)return;const o=Qt(n),i=t.find(t=>t.key===o&&!r.has(t)&&!!t.configEl&&((e,t)=>{const n=tn(t),r=tn(e);return Object.keys(n).every(e=>r[e]===n[e])})(t.configEl,e));i&&(r.add(i),n.replaceWith(i.el))});const o=Array.from(e.querySelectorAll(`[${Lt}]`));t.forEach(t=>{if(r.has(t)||t.configEl)return;if(t.el.isConnected)return;const n=Qt(t.el),i=Yt(t.el),c=o.find(e=>e!==t.el&&e.isConnected&&!nn(e)&&(Qt(e)===n||Yt(e)===i));c?c.replaceWith(t.el):e.appendChild(t.el),r.add(t)}),n&&t.forEach(e=>{e.el.isConnected||n(e.el)})},cn=(e,t)=>{const n=Array.from(e.children);e.innerHTML="",t&&n.forEach(e=>t(e))};function sn({content:e,codeType:t,customRenderers:n,throttleMs:r=16,html:i=!0,validateLink:s,onNodeDiscarded:a,onPatched:u}){const[m,h]=d([]),[p,f]=d(!1),g=l(""),v=l(null),w=l(!0),y=l(0),b=l({codeType:t,customRenderers:n,throttleMs:r,html:i,validateLink:s}),k=l({onNodeDiscarded:a,onPatched:u});k.current={onNodeDiscarded:a,onPatched:u};const _=l(null),E=o(async(e,t,n=0)=>{const{codeType:r,customRenderers:o,html:i,validateLink:c}=b.current,s=r&&"md"!==r?.toLocaleLowerCase()?"```"+r+"\n"+e+"\n```":e;let a;const l=()=>{t!==y.current||n>=2||(null!=_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{_.current=null,t===y.current&&E(e,t,n+1)},300))};try{a=await xt(s,o,{html:i,validateLink:c})}catch(m){return console.error("[useIncrementalRender] markdown 渲染失败,保留上一版 DOM:",m),void l()}if(!a||t!==y.current)return;const d=a.info??"",u=(e=0)=>{if(t!==y.current)return;const n=v.current;if(!n)return void(e<60?setTimeout(()=>u(e+1),0):console.warn("[useIncrementalRender] 容器未挂载,放弃本轮 patch(源码与渲染可能不一致)"));if(h(a.anchor||[]),""===d.trim()){const e=rn(n);return cn(n,k.current.onNodeDiscarded),e.forEach(e=>{e.el.isConnected||k.current.onNodeDiscarded?.(e.el)}),g.current=s,w.current=!0,f(!1),void k.current.onPatched?.()}if(w.current)return n.innerHTML=d,w.current=!1,void(g.current=s);const r=document.createElement("div");r.innerHTML=d;const o=rn(n),i=((e,t)=>{const n=/* @__PURE__ */new WeakMap,r=e=>{const t=/* @__PURE__ */new Map,r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(let o=r.nextNode();o;o=r.nextNode()){const e=o,r=Yt(e);if(!r)continue;const i=t.get(r);n.set(e,void 0===i?r:`${r}[${i}]`),t.set(r,(i??0)+1)}};return r(e),r(t),n})(n,r),c=/* @__PURE__ */new WeakMap,l=/* @__PURE__ */new WeakMap;X(n,r,{childrenOnly:!0,getNodeKey:e=>1===e.nodeType?i.get(e)??null:null,onBeforeElUpdated(e,t){const n=/* @__PURE__ */new Map;for(const o of Array.from(e.attributes))o.name.startsWith("data-")&&!Zt.has(o.name)&&(t.hasAttribute(o.name)||n.set(o.name,o.value));n.size&&c.set(e,n);const r=Kt.filter(n=>e.classList.contains(n)&&!t.classList.contains(n));return r.length&&l.set(e,r),!0},onElUpdated(e){const t=c.get(e);t&&(t.forEach((t,n)=>e.setAttribute(n,t)),c.delete(e));const n=l.get(e);n&&(n.forEach(t=>e.classList.add(t)),l.delete(e))},onBeforeNodeAdded:e=>(1!==e.nodeType||!e.classList.contains("pre-handle"))&&e,onBeforeNodeDiscarded:e=>1!==e.nodeType||!e.hasAttribute("data-md-persist"),onNodeDiscarded(e){1===e.nodeType&&k.current.onNodeDiscarded&&k.current.onNodeDiscarded(e)}}),on(n,o,k.current.onNodeDiscarded),g.current=s,k.current.onPatched?.()};try{u()}catch(m){console.error("[useIncrementalRender] DOM patch 失败:",m),l()}},[]),S=l(0),x=l(null),C=o((e,t)=>{const n=b.current.throttleMs,r=Date.now()-S.current,o=()=>{S.current=Date.now(),E(e,t)};if(r>=n)return null!=x.current&&(clearTimeout(x.current),x.current=null),void o();null!=x.current&&clearTimeout(x.current),x.current=setTimeout(()=>{x.current=null,t===y.current&&o()},n-r)},[E]);return c(()=>{const{codeType:t}=b.current;if(!e){y.current+=1,null!=_.current&&(clearTimeout(_.current),_.current=null),w.current=!0,f(!1),h([]),g.current="";const e=v.current;return void(e&&cn(e,k.current.onNodeDiscarded))}const n=t&&"md"!==t?.toLocaleLowerCase()?"```"+t+"\n"+e+"\n```":e;if(g.current===n)return;y.current+=1;const r=y.current;f(!0),w.current?E(e,r):C(e,r)},[e,E,C]),c(()=>()=>{y.current+=1,null!=x.current&&(clearTimeout(x.current),x.current=null),null!=_.current&&(clearTimeout(_.current),_.current=null)},[]),{anchors:m,hasContent:p,setInnerRef:o(e=>{v.current=e},[])}}var an="_tocToggle_1egap_1",ln=/* @__PURE__ */new Map,dn=e=>{const t=e.querySelector("code");return t?vn(t):""},un=e=>{const t=e.querySelector("code");return t?dn(e)+"\0"+(t.textContent??""):null},mn=e=>{const t=/* @__PURE__ */new Map,n=/* @__PURE__ */new Map,r=/* @__PURE__ */new Map;return e?.querySelectorAll("pre").forEach(e=>{const o=e;if(!o.querySelector("code"))return;const i=(e=>{const t=e.nextElementSibling;return Gt(t)?t:null})(o);i&&r.set(o,i);const c=un(o);if(c){const e=t.get(c);e?e.push(o):t.set(c,[o])}const s=dn(o),a=n.get(s);a?a.push(o):n.set(s,[o])}),{exact:t,byLanguage:n,charts:r}},hn=0,pn=e=>({enableMermaid:e.enableMermaid??e.isSlotMermaid??!0,showCollapseButton:e.showCollapseButton??e.isShowCollapsed??!0,toolbarDebounceMs:e.toolbarDebounceMs??e.mermaidDebounce??fn,incremental:e.incremental??e.useIncremental??!1,transformSource:e.transformSource??e.chartConfig,html:e.html??!0}),fn=100;function gn({preNode:e}){const[t,n]=d(()=>e.classList.contains("code-collapsed")),r=l(null);c(()=>()=>r.current?.cancel(),[]);/* @__PURE__ */
12
+ return q("span",{className:"code-toggle",onClick:()=>{const t=!e.classList.contains("code-collapsed"),o=e.getBoundingClientRect().height,i=t?32:e.scrollHeight;if(r.current?.cancel(),i===o)return e.classList.toggle("code-collapsed",t),void n(t);t||e.classList.remove("code-collapsed");const c=e.animate([{height:`${o}px`},{height:`${i}px`}],{duration:280,easing:"ease-in-out"});r.current=c,t&&c.finished.then(()=>{r.current===c&&(e.classList.add("code-collapsed"),c.cancel())}),n(t)},children:/* @__PURE__ */q(t?m:u,{})})}var vn=e=>e.className.match(/language-([^\s]+)/)?.[1]??"",wn=(e,t)=>{const{enableMermaid:n,showCollapseButton:r}=pn(t);e.querySelectorAll("pre > code").forEach(e=>{const t=e,o=vn(t),i=o||"text",c=n&&"mermaid"===o&&!t.classList.contains("md-fence-open")?"mermaid-render-noCode":"",s=t.parentNode;if(!s)return;const a=s.querySelector(".pre-handle");if(a){const e=a.getAttribute("data-md-copy-id");e&&!t.classList.contains(e)&&t.classList.add(e),c?t.classList.add(c):t.classList.remove("mermaid-render-noCode");const n=a.querySelector("[data-md-lang]");if(n&&n.textContent!==i&&(n.textContent=i),a.getAttribute("data-md-show-collapsed")===String(r))return;ln.get(a)?.unmount(),ln.delete(a),a.remove()}const l=(()=>{const e=globalThis.crypto?.randomUUID?.();return e?`copy-${e}`:`copy-${Date.now().toString(36)}-${(hn++).toString(36)}-${Math.random().toString(36).slice(2,8)}`})();t.classList.add(l),c&&t.classList.add(c);const d=document.createElement("div");d.className="pre-handle",d.setAttribute(Lt,""),d.setAttribute("data-md-copy-id",l),d.setAttribute("data-md-show-collapsed",String(r)),s.insertBefore(d,t);const u=/* @__PURE__ */D(P,{children:[/* @__PURE__ */q("img",{src:"https://remons.cn:3008/upload/md_assets/code_icon.png",alt:""}),/* @__PURE__ */q("span",{"data-md-lang":!0,children:i})]}),m=/* @__PURE__ */q("span",{className:"copy",onClick:()=>{const e=s.querySelector("code");e&&(B(e),ke.success("复制成功"))},children:/* @__PURE__ */q(v,{})}),h=I(d);ln.set(d,h),h.render(/* @__PURE__ */D(P,{children:[/* @__PURE__ */q("span",{children:u}),/* @__PURE__ */D("span",{className:"code-handle",children:[m,r&&/* @__PURE__ */q(gn,{preNode:s})]})]}))})};function yn(e){const{content:t,showBackTop:n,showToc:r,footer:i,incrementalThrottleMs:a}=e,u=pn(e),{incremental:m,toolbarDebounceMs:h}=u,[p,f]=d(""),[g,v]=d([]),[w,y]=d(""),[b,k]=d(!1),_=l(null),E=l(null),S=l(null),x=l(e);x.current=e;const C=l(null);null===C.current&&(C.current=e.backTopTarget??("undefined"!=typeof document?document.body:null));const L=o(()=>k(e=>!e),[]),N=o(()=>k(!1),[]),T=o(()=>C.current,[]),M=o(e=>{const t=[];e.classList?.contains("pre-handle")&&t.push(e),e.querySelectorAll(".pre-handle").forEach(e=>t.push(e)),e.classList?.contains("mermaid-react-root")&&Vt(e),e.querySelectorAll(`.${Nt}`).forEach(e=>Vt(e)),t.forEach(e=>{const t=ln.get(e);t&&(t.unmount(),ln.delete(e))})},[]),A=o(()=>{const e=_.current;e&&(wn(e,x.current),dt(e),ln.forEach((e,t)=>{t.isConnected||(e.unmount(),ln.delete(t))}))},[]),{anchors:j,hasContent:z,setInnerRef:I}=sn({content:t,codeType:e.codeType,customRenderers:e.customRenderers,throttleMs:a,html:u.html,validateLink:e.validateLink,onNodeDiscarded:M,onPatched:A}),P=m?j:g,O=m?z:!!p;c(()=>{let e=null,n=!1;return(async()=>{if(!m){S.current=mn(_.current);const{codeType:e}=x.current;let o,i="";i=e&&"md"!==e?.toLocaleLowerCase()?"```"+e+"\n"+t+"\n```":t;try{o=await xt(i,x.current.customRenderers,{html:pn(x.current).html,validateLink:x.current.validateLink})}catch(r){return void console.error("[RenderMarkdown] markdown 渲染失败,保留上一版内容:",r)}if(n)return;f(o?.info),v(o?.anchor||[])}e=setTimeout(async()=>{if(n)return;pn(x.current).enableMermaid&&Wt();const e=_.current;if(!e)return;wn(e,x.current),dt(e);const{isPrintPreview:t,excludedSelectors:r}=x.current;!function(e,t={}){if(!e)return;const{instanceSelectors:n=[],isPrintPreview:r=!1}=t,o=Array.from(e.querySelectorAll("img"));if(r)return void o.forEach(e=>{e.style.maxHeight="none",e.style.width="auto",e.style.display="block"});let i=Mt.get(e);i?i.instanceSelectors=n:(i={images:[],bound:!1,instanceSelectors:n,active:null},Mt.set(e,i)),i.images=o.filter(e=>!zt(e,n)),i.bound||(i.bound=!0,e.setAttribute("mdImgBound","1"),e.addEventListener("click",t=>{const n=t.target;if(!n||"IMG"!==n.tagName)return;const r=n,o=Mt.get(e);o&&!zt(r,o.instanceSelectors)&&Dt(o,r)}))}(e,{isPrintPreview:t,instanceSelectors:r});const{enableMermaid:o,transformSource:i}=pn(x.current),{showDriverGuide:c,defaultCollapsed:s,cdn:a}=x.current;if(o){const{renderMermaidWithControls:n}=await Promise.resolve().then(()=>or);await n({showDriverGuide:c,isPrintPreview:t,transformSource:i,defaultCollapsed:s,cdn:a,rootElement:e})}},h)})(),()=>{n=!0,e&&clearTimeout(e)}},[t]),s(()=>{!m&&p&&(((e,t)=>{if(!e||!t)return;const n=Array.from(e.querySelectorAll("pre")),r=/* @__PURE__ */new Set,o=e=>{const n=t.charts.get(e);n&&(t.charts.delete(e),e.after(n))},i=(e=>{const t=/* @__PURE__ */new Map;return e.forEach(e=>{const n=dn(e);t.set(n,(t.get(n)??0)+1)}),t})(n),c=/* @__PURE__ */new Map;t.byLanguage.forEach((e,t)=>c.set(t,e.length)),n.forEach(e=>{const n=un(e);if(!n)return;const i=t.exact.get(n)?.shift();i&&i!==e&&(r.add(i),e.replaceWith(i),o(i))}),n.forEach(e=>{if(!e.isConnected)return;const n=e.querySelector("code");if(!n)return;const s=dn(e),a=t.byLanguage.get(s);if(!a?.length)return;if(i.get(s)!==c.get(s))return;let l;for(;a.length;){const t=a.shift();if(t!==e&&!r.has(t)){l=t;break}}if(!l)return;r.add(l);const d=l.querySelector("code");d&&(d.innerHTML=n.innerHTML),e.replaceWith(l),o(l)})})(E.current,S.current),S.current=null,ln.forEach((e,t)=>{t.isConnected||(e.unmount(),ln.delete(t))}))},[p,m]);const B=l(null);return B.current=_.current,c(()=>()=>{const e=B.current;e&&(e.querySelectorAll(".pre-handle").forEach(e=>{const t=e,n=ln.get(t);n&&(n.unmount(),ln.delete(t))}),Vt(e),function(e){if(!e)return;const t=e,n=Mt.get(t);n&&(n.active&&(n.active.destroy(),n.active=null),n.images=[],Mt.delete(t))}(e))},[]),c(()=>{if(0===P.length)return;const e=[],t=n=>{n.forEach(n=>{e.push(n.href),n.children?.length&&t(n.children)})};t(P);const n=e.map(e=>document.getElementById(e)).filter(Boolean);if(0===n.length)return;const r=new IntersectionObserver(e=>{const t=e.filter(e=>e.isIntersecting);if(0===t.length)return;const n=t.reduce((e,t)=>t.boundingClientRect.top<e.boundingClientRect.top?t:e);y(n.target.id)},{rootMargin:"0px 0px -90% 0px",threshold:0});return n.forEach(e=>r.observe(e)),()=>r.disconnect()},[P]),c(()=>{const e=()=>{const e=window.location.hash.slice(1);if(!e)return;const t=document.getElementById(e);t&&(t.scrollIntoView({behavior:"smooth",block:"start"}),y(e))},t=setTimeout(e,100),n=()=>e();return window.addEventListener("hashchange",n),()=>{clearTimeout(t),window.removeEventListener("hashchange",n)}},[P]),/* @__PURE__ */D("div",{className:"markdown",children:[O?/* @__PURE__ */D("div",{className:"markdown-html",ref:_,children:[/* @__PURE__ */q("div",{style:{width:"100%"},...m?{ref:I}:{ref:E,dangerouslySetInnerHTML:{__html:p}}}),i&&/* @__PURE__ */q("div",{className:"markdown-footer",children:i})]}):/* @__PURE__ */q(Le,{}),n&&/* @__PURE__ */q(Se,{target:T}),r&&P.length>0&&/* @__PURE__ */q("div",{className:F(an,"md-toc-toggle","remons-markdown-circle"),onClick:L,children:/* @__PURE__ */q($,{})}),r&&/* @__PURE__ */q($e,{anchors:P,activeId:w,visible:b,onClose:N})]})}var bn={javascript:Y,typescript:J,css:Q,json:ee,bash:te,xml:ne,plaintext:re};function kn(e,t){let n,r=!1;if(e instanceof Blob)n=URL.createObjectURL(e),r=!0;else{if("string"!=typeof e)return void ke.error("不支持的下载格式");n=e}const o=document.createElement("a");o.href=n,o.download=t,o.rel="noopener",o.style.display="none",document.body.appendChild(o),o.click(),o.remove(),r&&setTimeout(()=>URL.revokeObjectURL(n),1e3),ke.success(`${t} 已下载`)}function _n(e,t="image",n=2){const{w:r,h:o}=function(e){const t=e.match(/viewBox=["']?([^"'>\s]+(?:[\s,]+[^"'>\s]+){3})["']/i);let n=0,r=0;if(t){const e=t[1].split(/[\s,]+/).map(Number);4===e.length&&(n=e[2],r=e[3])}const o=e.match(/width=["']?\s*([\d.]+)\s*(px|pt|cm|mm|in)["']/i),i=e.match(/height=["']?\s*([\d.]+)\s*(px|pt|cm|mm|in)["']/i),c=o?parseFloat(o[1]):0,s=i?parseFloat(i[1]):0;return c>0&&s>0?{w:c,h:s}:n>0&&r>0?{w:n,h:r}:{w:c||n||800,h:s||r||600}}(e),i=function(e){const t=(new TextEncoder).encode(e);let n="";for(let r=0;r<t.length;r++)n+=String.fromCharCode(t[r]);return`data:image/svg+xml;base64,${btoa(n)}`}(e),c=new Image;c.crossOrigin="anonymous",c.src=i,c.onload=()=>{const e=document.createElement("canvas");e.width=Math.max(1,Math.round(r*n)),e.height=Math.max(1,Math.round(o*n));const i=e.getContext("2d");i.fillStyle="#ffffff",i.fillRect(0,0,e.width,e.height),i.scale(n,n),i.drawImage(c,0,0,r,o),e.toBlob(e=>{e?kn(e,`${t}.png`):ke.error("PNG 生成失败")},"image/png")},c.onerror=()=>{ke.error("PNG 生成失败:图片加载失败")}}var En="app-theme-mode",Sn="light",xn="dark";function Cn(e){return"light"===e||"dark"===e||"system"===e}function Ln(){try{const e=localStorage.getItem(En);if(Cn(e))return e}catch{}return"system"}function Nn(e){return"system"===e?"undefined"==typeof window?Sn:window.matchMedia("(prefers-color-scheme: dark)").matches?xn:Sn:e}function Tn(e){"undefined"!=typeof document&&(document.documentElement.dataset.theme=e)}function Mn(){"undefined"!=typeof window&&Tn(Nn(Ln()))}var An=t(null);function $n({children:t}){const[n,r]=d(()=>Ln()),[i,u]=d(()=>Nn(n)),m=l(null),h=o(e=>{m.current=e,Tn(e)},[]);s(()=>{h(Nn(Ln()))},[h]);const p=o(e=>{if(Cn(e)){r(e);try{localStorage.setItem(En,e),window.dispatchEvent(new Event("storage"))}catch{}}else console.warn(`[render-markdown] 非法的主题模式: ${e},应为 light | dark | system`)},[]);c(()=>{const e=Nn(n);u(e),h(e)},[n,h]),c(()=>{if("system"!==n)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),t=e=>{const t=e.matches?xn:Sn;u(t),h(t)};return e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[n,h]),c(()=>{const e=()=>{const e=Ln();e!==n&&r(e)};window.addEventListener("storage",e);const t=new MutationObserver(()=>{const e=document.documentElement.dataset.theme;e!==m.current&&("light"!==e&&"dark"!==e||e===i||u(e))});return t.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>{window.removeEventListener("storage",e),t.disconnect()}},[n,i]);const f=i===xn,g=a(()=>({theme:i,mode:n,isDark:f,setMode:p}),[i,n,f,p]);return e.createElement(An.Provider,{value:g},t)}function jn(){const e=i(An);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}var zn={"modal-mask":"_modal-mask_dzv9e_4","modal-mask-visible":"_modal-mask-visible_dzv9e_18",modal:"_modal_dzv9e_4","modal-header":"_modal-header_dzv9e_34","modal-title":"_modal-title_dzv9e_41","modal-close":"_modal-close_dzv9e_46","modal-body":"_modal-body_dzv9e_62","modal-footer":"_modal-footer_dzv9e_67"},In=pe.default.bind(zn),Pn=({open:e,title:t,width:n=520,onCancel:r,footer:o,className:i="",children:s})=>{const a=()=>{r?.()};if(c(()=>{if(!e)return;const t=e=>{"Escape"===e.key&&a()};return document.addEventListener("keydown",t),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow=""}},[e]),!e)return null;const l=/* @__PURE__ */q("div",{className:In("modal-mask","modal-mask-visible"),onClick:e=>{e.target===e.currentTarget&&a()},children:/* @__PURE__ */D("div",{className:In("modal",i),style:{width:n},onClick:e=>{e.stopPropagation()},children:[
13
+ /* @__PURE__ */D("div",{className:In("modal-header"),children:[/* @__PURE__ */q("span",{className:In("modal-title"),children:t}),/* @__PURE__ */q("div",{className:In("modal-close"),onClick:a,children:"×"})]}),
14
+ /* @__PURE__ */q("div",{className:In("modal-body"),children:s}),null!=o&&/* @__PURE__ */q("div",{className:In("modal-footer"),children:o})]})});return oe(l,document.body)},qn={mermaid:"https://registry.npmmirror.com/mermaid/11.17.2/files/dist/mermaid.min.js"};function Dn(e,t){t?qn[e]=t:delete qn[e]}var Fn=null;function On(e){return Fn||(Fn=new Promise((t,n)=>{if(window.mermaid)return void t(window.mermaid);const r=document.createElement("script");try{r.src=function(e,t){const n=t?.[e]??qn[e];if(!n)throw new Error(`[render-markdown] 未找到名为 "${e}" 的 CDN 配置,请通过 cdn 属性或 registerCdn() 注册`);return n}("mermaid",e)}catch(o){return Fn=null,void n(o)}r.onload=()=>{window.mermaid?t(window.mermaid):(Fn=null,r.remove(),n(/* @__PURE__ */new Error(`Mermaid 脚本已加载但未挂载 window.mermaid:${r.src}`)))},r.onerror=()=>{Fn=null,r.remove(),n(/* @__PURE__ */new Error(`Mermaid 脚本加载失败:${r.src}`))},document.head.appendChild(r)})),Fn}var Bn=0;function Hn({source:e,debounceMs:t=300,isDark:n,transformSource:r,chartConfig:o,cdn:i,securityLevel:s="strict"}){const{mermaid:a,loading:u,error:m}=function(e){const[t,n]=d(null),[r,o]=d(!0),[i,s]=d(null);return c(()=>{let t=!1;return On(e).then(e=>{t||(n(()=>e),o(!1))}).catch(e=>{t||(s(e),o(!1))}),()=>{t=!0}},[]),{mermaid:t,loading:r,error:i}}(i),[h,p]=d(""),[f,g]=d(""),v=l(0),w=l(void 0);return void 0===w.current&&(w.current=r??o),c(()=>{m&&g(m.message?.split("\n")[0]||String(m))},[m]),c(()=>{a&&a.initialize({startOnLoad:!1,theme:n?"dark":"default",securityLevel:s})},[a,n,s]),c(()=>{if(!a)return;const n=(e||"").trim();if(!n)return p(""),void g("");g("");const r=++v.current,o=setTimeout(async()=>{const e="mermaid-render-"+Bn++;try{const t=w.current,o=t?t(n):n,{svg:i}=await a.render(e,o??n);if(r!==v.current)return;p(i),g("")}catch(t){if(r!==v.current)return;console.error("Mermaid render error:",t);const e=t instanceof Error?t.message:String(t);g(e?.split("\n")[0]||e)}finally{const t=document.getElementById(e)||document.getElementById(`d${e}`);t&&t.parentNode&&t.parentNode.removeChild(t)}},t);return()=>clearTimeout(o)},[e,n,a,t]),{svg:h,error:f,loading:u}}var Wn={tooltip:"_tooltip_1kuma_4","tooltip-trigger":"_tooltip-trigger_1kuma_7","tooltip-inner":"_tooltip-inner_1kuma_11","tooltip-inner-visible":"_tooltip-inner-visible_1kuma_27","tooltip-content":"_tooltip-content_1kuma_30","tooltip-arrow":"_tooltip-arrow_1kuma_36"},Rn=pe.default.bind(Wn),Gn=({title:e,children:t,visible:n,onVisibleChange:r})=>{const[o,i]=d(!1),s=l(null),a=l(null),[u,m]=d({top:0,left:0}),h=void 0!==n?n:o,p=()=>{if(a.current){const e=a.current.getBoundingClientRect();m({top:e.top-8,left:e.left+e.width/2})}};c(()=>{if(!h)return;const e=()=>p(),t=()=>p();return window.addEventListener("resize",e,{passive:!0}),window.addEventListener("scroll",t,{passive:!0}),p(),()=>{window.removeEventListener("resize",e),window.removeEventListener("scroll",t)}},[h]),c(()=>()=>{s.current&&window.clearTimeout(s.current)},[]);const f=h&&e?oe(/* @__PURE__ */D("div",{className:Rn("tooltip-inner","tooltip-inner-visible"),style:{top:u.top,left:u.left},children:[/* @__PURE__ */q("span",{className:Rn("tooltip-content"),children:e}),/* @__PURE__ */q("span",{className:Rn("tooltip-arrow")})]}),document.body):null;/* @__PURE__ */
15
+ return D("div",{ref:a,className:Rn("tooltip"),onMouseEnter:()=>{s.current&&window.clearTimeout(s.current),s.current=window.setTimeout(()=>{p(),i(!0),r?.(!0)},150)},onMouseLeave:()=>{s.current&&(window.clearTimeout(s.current),s.current=null),i(!1),r?.(!1)},children:[/* @__PURE__ */q("div",{className:Rn("tooltip-trigger"),children:t}),f]})},Vn={dropdown:"_dropdown_13j0u_4","dropdown-trigger":"_dropdown-trigger_13j0u_8","dropdown-menu":"_dropdown-menu_13j0u_12","dropdown-menu-visible":"_dropdown-menu-visible_13j0u_26","dropdown-item":"_dropdown-item_13j0u_30"},Un=pe.default.bind(Vn),Kn=({items:e,children:t,onClick:n,className:r=""})=>{const[o,i]=d(!1),s=l(null),a=()=>{i(!1)};return c(()=>{const e=e=>{s.current&&!s.current.contains(e.target)&&a()};return o&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[o]),/* @__PURE__ */D("div",{ref:s,className:Un("dropdown",r),children:[/* @__PURE__ */q("div",{className:Un("dropdown-trigger"),onClick:()=>{i(e=>!e)},children:t}),o&&/* @__PURE__ */q("div",{className:Un("dropdown-menu","dropdown-menu-visible"),children:e.map(e=>/* @__PURE__ */q("div",{className:Un("dropdown-item"),onClick:()=>(e=>{n({key:e.key}),a()})(e),children:e.label},e.key))})]})};function Zn({showSourceView:e,showCollapse:t,showDownload:n,isFullscreen:r,isCollapsed:o,isMinimize:i,isPanzoomActive:c,isPanzoomAvailable:s,isPanzoomEnabled:a,setIsPanzoomEnabled:l,setIsMinimize:d,setIsCollapsed:u,setShowSource:m,toggleFullscreen:h,downloadMenu:p,panzoomRef:f}){/* @__PURE__ */
16
+ return q("div",{className:"mermaid-toolbar",children:[{isShow:e&&o&&!r,icon:/* @__PURE__ */q(i?k:S,{}),tooltip:i?"缩略图":"最小化",onClick:()=>d(e=>!e),className:"mermaid-minimize-btn"},{isShow:s,icon:/* @__PURE__ */q(b,{}),tooltip:a?"取消拖拽":"启用拖拽",onClick:()=>l(e=>!e),className:a?"mermaid-panzoom-btn active":"mermaid-panzoom-btn"},{isShow:c,icon:/* @__PURE__ */q(N,{}),tooltip:"放大",onClick:()=>f.current?.zoomIn()},{isShow:c,icon:/* @__PURE__ */q(L,{}),tooltip:"缩小",onClick:()=>f.current?.zoomOut()},{isShow:c,icon:/* @__PURE__ */q(T,{}),tooltip:"重置",onClick:()=>f.current?.reset()},{isShow:n&&c,icon:/* @__PURE__ */q(y,{}),tooltip:"下载",dropdown:p},{isShow:!0,icon:/* @__PURE__ */q(r?_:E,{}),tooltip:r?"退出全屏":"全屏",onClick:h,className:"mermaid-fullscreen-btn"},{isShow:e&&!r,icon:/* @__PURE__ */q(g,{}),tooltip:"查看源码",onClick:()=>m(!0),className:"mermaid-showcode-btn"},{isShow:t&&!r,icon:/* @__PURE__ */q(o?w:j,{}),tooltip:o?"展开":"收起",onClick:()=>u(e=>!e),className:"mermaid-collapsed-btn"}].map(e=>{if(!1===e.isShow)return null;const t=e.className||e.tooltip,n=e.dropdown?/* @__PURE__ */q(Kn,{items:e.dropdown.items,onClick:e.dropdown.onClick,children:/* @__PURE__ */q("div",{className:`remons-markdown-circle ${e.className||""}`,children:e.icon})},t):/* @__PURE__ */q("div",{className:`remons-markdown-circle ${e.className||""}`,onClick:e.onClick,children:e.icon},t);return e.tooltip&&O()?/* @__PURE__ */q(Gn,{title:e.tooltip,children:n},`${t}-tooltip`):n})})}var Xn={previewArea:"_previewArea_10gpc_2",previewAreaDisabled:"_previewAreaDisabled_10gpc_22",previewContent:"_previewContent_10gpc_31",errorTip:"_errorTip_10gpc_47",emptyTip:"_emptyTip_10gpc_59"},Yn=null,Jn=/* @__PURE__ */new WeakSet;var Qn="docList-mermaid-driver",er="docList-menu-driver",tr="docList-pc-menu-driver";function nr({source:t,options:n}){/* @__PURE__ */
17
+ return q(e.StrictMode,{children:/* @__PURE__ */q($n,{children:/* @__PURE__ */q(ir,{source:t,enablePanzoom:!0,showDownload:!0,showSourceView:!0,showCollapse:!0,transformSource:n.transformSource??n.chartConfig,defaultCollapsed:n.defaultCollapsed??!1,isPrintPreview:n.isPrintPreview??!1,minHeight:200,showDriverGuide:n.showDriverGuide,cdn:n.cdn})})})}async function rr(e={}){const{rootElement:t=document}=e;Wt();const n=[];t.querySelectorAll("code.language-mermaid").forEach(e=>{const t=e;if(t.classList.contains("md-fence-open"))return void t.classList.remove("mermaid-render-noCode");const r=t.parentElement;if(!r||"PRE"!==r.tagName)return;const o=(t.textContent??"").trim();n.push({pre:r,source:o,srcHash:Rt(o)})});const r=Array.from(t.querySelectorAll(`.${Nt}`)),o=new Map(n.map(e=>[e.pre,e])),i=/* @__PURE__ */new Set;for(const c of n){const e=c.pre.nextElementSibling;Gt(e)&&e.getAttribute("data-md-mermaid-src")===c.srcHash&&i.add(e)}for(const c of n){const e=c.pre.nextElementSibling;if(Gt(e)&&i.has(e))continue;const t=r.find(e=>!i.has(e)&&!o.has(e.previousElementSibling)&&e.getAttribute("data-md-mermaid-src")===c.srcHash);t&&(c.pre.after(t),i.add(t))}for(const c of n){const t=c.pre.nextElementSibling;if(Gt(t)&&i.has(t))continue;const n=Gt(t)&&!i.has(t)?t:null;if(n){n.setAttribute(Tt,c.srcHash),i.add(n);const t=Ht(n);if(t){t.render(/* @__PURE__ */q(nr,{source:c.source,options:e}));continue}Bt(n),n.remove()}const r=document.createElement("div");r.className=Nt,r.setAttribute(Tt,c.srcHash),r.setAttribute(Lt,""),c.pre.after(r),Bt(r);const o=I(r);Ot(r,o),o.render(/* @__PURE__ */q(nr,{source:c.source,options:e}))}for(const c of r)i.has(c)||(Bt(c),c.remove())}var or=/* @__PURE__ */he({MermaidChart:()=>cr,default:()=>ir,renderMermaid:()=>sr,renderMermaidWithControls:()=>rr}),ir=n(function({source:e,debounceMs:t=300,enablePanzoom:n=!0,showDownload:r=!0,showSourceView:i=!1,showCollapse:s=!1,defaultCollapsed:u=!1,className:m="",minHeight:h=200,showDriverGuide:p,isPrintPreview:f=!1,transformSource:g,chartConfig:v,securityLevel:w,cdn:y,driverGuideOnce:b=!0}){const{isDark:k}=jn(),{svg:_,error:E,loading:S}=Hn({source:e,debounceMs:t,isDark:k,transformSource:g,chartConfig:v,securityLevel:w,cdn:y}),x=l(null),L=l(null),{isFullscreen:N,isCollapsed:T,toggleCollapseAnimated:M,showSource:A,setShowSource:$,isMinimize:j,toggleMinimizeAnimated:z,isPanzoomEnabled:I,setIsPanzoomEnabled:F,toggleFullscreen:B}=function({showCollapse:e,showSourceView:t,defaultCollapsed:n,isPrintPreview:r,svg:i,error:s,loading:a,wrapperRef:u}){const[m,h]=d(!1),[p,f]=d(n),[g,v]=d(!1),[w,y]=d(t),[b,k]=d(!1),_=l(!1),E=l(null),S=l(p);c(()=>{S.current=p},[p]);const x=l(w);c(()=>{x.current=w},[w]);const C=o((e,t)=>{const n=u.current;if(!n)return;const r=n.getBoundingClientRect().height,o=t?36:e?200:n.scrollHeight;Math.abs(r-o)<1||n.animate([{maxHeight:`${r}px`},{maxHeight:`${o}px`}],{duration:280,easing:"ease-in-out"})},[u]),L=o(e=>{const t="function"==typeof e?e(S.current):e;t!==S.current&&C(t,x.current),f(t)},[C]),N=o(e=>{const t="function"==typeof e?e(x.current):e;t!==x.current&&C(S.current,t),y(t)},[C]);return c(()=>{r&&i&&!s&&!a&&f(!1)},[r,i,s,a]),c(()=>{if(r)return;const t=()=>{const t=u.current;if(!t)return;const r=document.fullscreenElement,o=!!r&&(r===t||t.contains(r));if(o||_.current){if(o)return _.current=!0,E.current=S.current,h(!0),void f(!1);_.current=!1,h(!1),e&&f(E.current??n),E.current=null}};return document.addEventListener("fullscreenchange",t),()=>document.removeEventListener("fullscreenchange",t)},[e,r,n,u]),{isFullscreen:m,setIsFullscreen:h,isCollapsed:p,setIsCollapsed:f,toggleCollapseAnimated:L,toggleMinimizeAnimated:N,showSource:g,setShowSource:v,isMinimize:w,setIsMinimize:y,isPanzoomEnabled:b,setIsPanzoomEnabled:k,toggleFullscreen:o(()=>{const e=u.current;e&&(document.fullscreenElement!==e?e.requestFullscreen?.().catch(()=>{console.warn("[render-markdown] 进入全屏失败(可能被浏览器策略拒绝或非安全上下文)")}):document.exitFullscreen?.().catch(()=>{}))},[u])}}({showCollapse:s,showSourceView:i,defaultCollapsed:u,isPrintPreview:f,svg:_,error:E,loading:S,wrapperRef:x}),H=n&&(N||!T||!s),W=H&&I,R=function({contentRef:e,wrapperRef:t,canUse:n,active:r,isFullscreen:i}){const s=l(null),a=l(null),d=l(null),u=l(r);c(()=>{u.current=r},[r]);const m=o(e=>{d.current?.();const n=t.current;e.bind();const r=e.zoomWithWheel;n?.addEventListener("wheel",r),d.current=()=>{n?.removeEventListener("wheel",r),e.destroy()}},[t]),h=o(()=>{d.current?.(),d.current=null},[]);return c(()=>{const t=e.current;if(!n||!t)return h(),a.current=null,void(s.current=null);const r=ie(t,{maxScale:5,minScale:.1,startScale:1,contain:"outside",noBind:!0});return a.current=r,s.current={destroy:()=>r.destroy(),zoomWithWheel:r.zoomWithWheel,zoomIn:()=>r.zoomIn(),zoomOut:()=>r.zoomOut(),reset:()=>r.reset()},u.current&&m(r),()=>{h(),r.destroy(),a.current===r&&(a.current=null,s.current=null)}},[n,i,e,m,h]),c(()=>{const e=a.current;e&&(r?m(e):h())},[r,m,h]),s}({contentRef:L,wrapperRef:x,canUse:n&&!!_&&!f,active:W,isFullscreen:N});c(()=>{if(!p||f||!_)return;const e=x.current;if(e){if(b){if(e.dataset.mdDriverDone)return;e.dataset.mdDriverDone="1"}!function(e){if(Yn||Jn.has(e))return;const t=n=>{if(n>=e.length)return Yn=null,void Jn.add(e);const r=e[n];if(r.condition&&!r.condition())return void t(n+1);r?.onOpen?.();const o=r.steps.filter(e=>!1!==e.isShow&&!!document.querySelector(e.element));if(0===o.length)return void t(n+1);const i=ce({nextBtnText:"下一步",prevBtnText:"上一步",doneBtnText:"我知道了",showProgress:!0,allowClose:!1,progressText:"第 {{current}} 步,共 {{total}} 步",onDestroyed:()=>{Yn=null,t(n+1)},steps:o});Yn=i,i.drive()};t(0)}(function(e,t){return[{id:er,condition:()=>!localStorage[er]&&e&&!O()&&"true"!==localStorage.docListMenuVisible,onOpen:()=>{localStorage[er]="1"},steps:[{element:".docList-menu-list",popover:{title:"列表",description:"点击此处您可查看当前分类下文章列表"}},{element:".docList-menu-copyHtml",popover:{title:"复制",description:"点击此处您可复制 HTML 渲染的格式内容"}},{element:".docList-menu-copyMarkdown",popover:{title:"复制",description:"点击此处您可复制 markdown 源码"}},{element:".docList-menu-print",popover:{title:"打印",description:"点击此处您可跳转至打印页面,输出为PDF"}}]},{id:tr,condition:()=>!localStorage[tr]&&O()&&e,onOpen:()=>{localStorage[tr]="1"},steps:[{element:".docList-menu-copyHtml",popover:{title:"复制",description:"点击此处您可复制 HTML 渲染的格式内容"}},{element:".docList-menu-copyMarkdown",popover:{title:"复制",description:"点击此处您可复制 markdown 源码"}},{element:".docList-menu-print",popover:{title:"打印",description:"点击此处您可跳转至打印页面,输出为PDF"}},{element:".docList-menu-mermaid-collapse",popover:{title:"展开收起mermaid",description:"点击此处按钮可一键展开收起mermaid图表"},isShow:t}]},{id:Qn,condition:()=>!(!t||localStorage[Qn]||!e),onOpen:()=>{localStorage[Qn]="1"},steps:[{element:".mermaid-react-root",popover:{title:"mermaid",description:"恭喜您解锁 Mermaid 渲染图表"}},{element:".mermaid-react-root .mermaid-minimize-btn",popover:{title:"缩略图",description:"点击此处按钮可查看缩略图"}},{element:".mermaid-react-root .mermaid-fullscreen-btn",popover:{title:"全屏",description:"点击此处按钮可切换为全屏展示"}},{element:".mermaid-react-root .mermaid-showcode-btn",popover:{title:"源码",description:"点击此处按钮查看源码弹窗"}},{element:".mermaid-react-root .mermaid-collapsed-btn",popover:{title:"展开",description:"点击此处按钮展开大图"}}]}]}(i,!!_))}},[_,p,f,i,b]);const G=function(e){const t=e.match(/---\s*\n\s*title:\s*(.+)\s*\n\s*---/);return t?t[1].trim():"mermaid 图表"}(e),V=o(()=>{_?function(e,t="image"){kn(new Blob([e],{type:"image/svg+xml;charset=utf-8"}),`${t}.svg`)}(_,G):ke.warning("暂无图表")},[_,G]),U=o(()=>{_?_n(_,G,2):ke.warning("暂无图表")},[_,G]),K=a(()=>({items:[{key:"svg",label:"下载 SVG"},{key:"png",label:"下载 PNG"}],onClick:({key:e})=>"svg"===e?V():U()}),[V,U]),Z=!!_;/* @__PURE__ */
18
+ return D("div",{ref:x,className:pe.default.bind(Xn)(N?"mermaid-wrapper-fullscreen":"",s?"mermaid-wrapper":"",T&&s&&!j?"mermaid-collapsed":"",m,j&&T&&!N?"mermaid-mini":"",f?"print-preview":""),style:{minHeight:j?0:h,position:"relative",height:"100%"},children:[!f&&/* @__PURE__ */D(P,{children:[i&&/* @__PURE__ */D("div",{className:"mermaid-title",children:[/* @__PURE__ */D("span",{className:"mermaid-title-tag",children:[/* @__PURE__ */q("img",{src:"data:image/svg+xml,%3csvg%20t='1784097187016'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='5199'%20width='200'%20height='200'%3e%3cpath%20d='M0%200m125.754386%200l772.491228%200q125.754386%200%20125.754386%20125.754386l0%20772.491228q0%20125.754386-125.754386%20125.754386l-772.491228%200q-125.754386%200-125.754386-125.754386l0-772.491228q0-125.754386%20125.754386-125.754386Z'%20fill='%23FC366E'%20p-id='5200'%3e%3c/path%3e%3cpath%20d='M921.150877%20174.547088a417.091368%20417.091368%200%200%200-409.168842%20274.198456%20417.235088%20417.235088%200%200%200-409.150877-274.198456%20417.360842%20417.360842%200%200%200%20181.625263%20361.992982%20223.914667%20223.914667%200%200%201%2097.010526%20185.038597v128.143719h261.084071v-128.07186a223.914667%20223.914667%200%200%201%2097.010526-185.038596%20417.181193%20417.181193%200%200%200%20181.553403-361.921123z'%20fill='%23FFFFFF'%20p-id='5201'%3e%3c/path%3e%3c/svg%3e",alt:""}),/* @__PURE__ */q("span",{className:"mermaid-title-text",children:"Mermaid"})]}),G]}),!Z&&/* @__PURE__ */D("div",{className:"mermaid-toolbar-loading",children:[/* @__PURE__ */q(C,{})," "]}),Z&&/* @__PURE__ */q(Zn,{showSourceView:i,showCollapse:s,showDownload:r,isFullscreen:N,isCollapsed:T,isMinimize:j,isPanzoomActive:W,isPanzoomAvailable:H,isPanzoomEnabled:I,setIsPanzoomEnabled:F,setIsMinimize:z,setIsCollapsed:M,setShowSource:$,toggleFullscreen:()=>{R.current?.reset(),B()},downloadMenu:K,panzoomRef:R})]}),E&&/* @__PURE__ */D("div",{className:Xn.errorTip,children:["⚠️ ",E]}),
19
+ /* @__PURE__ */D("div",{className:`${Xn.previewArea} ${W?"":Xn.previewAreaDisabled}`,style:{minHeight:Z?"auto":h},children:[/* @__PURE__ */q("div",{ref:L,className:Xn.previewContent,dangerouslySetInnerHTML:{__html:_||""}}),(!Z&&!E||S)&&/* @__PURE__ */q("div",{className:Xn.emptyTip,children:e?.trim()?"渲染中...":"← 输入 Mermaid 源码"})]}),i&&/* @__PURE__ */q(Pn,{open:A,title:"Mermaid 源码",className:"mermaid-code-modal",width:O()?800:"calc(100% - 20px)",onCancel:()=>$(!1),footer:null,children:/* @__PURE__ */q(yn,{showCollapseButton:!1,enableMermaid:!1,codeType:"mermaid",content:e})})]})}),cr=e=>/* @__PURE__ */q($n,{children:/* @__PURE__ */q(ir,{...e})}),sr=e=>/* @__PURE__ */q(cr,{...e}),ar=yn;export{De as DEFAULT_CIRCLED_CLASS,Lt as MD_PERSIST_ATTR,cr as MermaidChart,$n as ThemeProvider,$t as addExcludedSelector,He as circledNumbers,ar as default,Ke as defaultValidateLink,Ct as initHighlighter,Mn as initTheme,bn as languagesCommon,xt as markdownFormat,Dn as registerCdn,jt as removeExcludedSelector,sr as renderMermaid,sn as useIncrementalRender,jn as useTheme};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remons-render-markdown",
3
- "version": "2.0.1-beta.9",
3
+ "version": "2.0.2-beta.0",
4
4
  "description": "一个基于 React 的 Markdown 渲染组件,支持 GFM(GitHub Flavored Markdown)、代码高亮、Mermaid 图表、Tabs 渲染等功能。",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",