@matechat/core 1.12.2 → 1.13.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Bubble/index.css +1 -1
- package/Bubble/index.js +2 -2
- package/Header/index.css +1 -1
- package/Header/index.js +1 -1
- package/Input/index.css +1 -1
- package/Input/index.js +48 -48
- package/Introduction/index.css +1 -1
- package/Introduction/index.js +6 -6
- package/Layout/Content.vue.d.ts +17 -1
- package/Layout/icon/arrow-down.vue.d.ts +3 -0
- package/Layout/icon/arrow-up.vue.d.ts +3 -0
- package/Layout/index.css +1 -1
- package/Layout/index.js +182 -35
- package/Layout/layout-types.d.ts +4 -0
- package/List/index.css +1 -1
- package/List/index.js +1 -1
- package/MarkdownCard/index.css +1 -1
- package/MarkdownCard/index.js +161 -161
- package/Mention/index.css +1 -1
- package/Mention/index.js +6 -6
- package/Prompt/index.css +1 -1
- package/Prompt/index.js +5 -5
- package/README.md +432 -432
- package/Toolbar/index.css +1 -1
- package/Toolbar/index.js +15 -15
- package/package.json +1 -1
package/MarkdownCard/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import "./index.css";
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var I = (o, t, s) =>
|
|
5
|
-
import { defineComponent as de, ref as
|
|
6
|
-
import
|
|
2
|
+
var ve = Object.defineProperty;
|
|
3
|
+
var Ne = (o, t, s) => t in o ? ve(o, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : o[t] = s;
|
|
4
|
+
var I = (o, t, s) => Ne(o, typeof t != "symbol" ? t + "" : t, s);
|
|
5
|
+
import { defineComponent as de, ref as x, computed as G, watch as O, nextTick as U, onMounted as ge, openBlock as C, createElementBlock as M, normalizeClass as E, createElementVNode as w, toDisplayString as V, renderSlot as q, unref as T, createCommentVNode as P, createVNode as Me, Transition as Le, withCtx as Ie, withDirectives as Te, vShow as xe, isVNode as ue, h as y, reactive as De, onBeforeUnmount as ke, useSlots as Ae, Fragment as j, createBlock as Se, resolveDynamicComponent as be } from "vue";
|
|
6
|
+
import k from "highlight.js";
|
|
7
7
|
import je from "markdown-it";
|
|
8
|
-
import { debounce as
|
|
9
|
-
import { getDefaultWhiteList as
|
|
8
|
+
import { debounce as Ee } from "lodash-es";
|
|
9
|
+
import { getDefaultWhiteList as Oe, getDefaultCSSWhiteList as _e, filterXSS as ze } from "xss";
|
|
10
10
|
import { useMcI18n as pe } from "@matechat/core/Locale";
|
|
11
|
-
const Ue = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eenlarge%3c/title%3e%3cg%20id='enlarge'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M7.16666667,1%20C10.572409,1%2013.3333333,3.76092429%2013.3333333,7.16666667%20C13.3333333,8.68984984%2012.781084,10.0840543%2011.8658888,11.1599767%20L14.4225201,13.7154466%20C14.6177822,13.9107088%2014.6177822,14.2272912%2014.4225201,14.4225534%20C14.2489537,14.5961197%2013.9795293,14.6154049%2013.7846612,14.4804088%20L13.7154133,14.4225534%20L11.158968,11.8667467%20C10.083183,12.7814291%208.68937384,13.3333333%207.16666667,13.3333333%20C3.76092429,13.3333333%201,10.572409%201,7.16666667%20C1,3.76092429%203.76092429,1%207.16666667,1%20Z%20M7.16666667,2%20C4.31320904,2%202,4.31320904%202,7.16666667%20C2,10.0201243%204.31320904,12.3333333%207.16666667,12.3333333%20C10.0201243,12.3333333%2012.3333333,10.0201243%2012.3333333,7.16666667%20C12.3333333,4.31320904%2010.0201243,2%207.16666667,2%20Z%20M7.16666667,4.66666667%20C7.41212656,4.66666667%207.61627504,4.84354183%207.658611,5.07679103%20L7.66666667,5.16666667%20L7.666,6.668%20L9.16601582,6.66666666%20C9.44215796,6.66630764%209.66630679,6.88987368%209.66666668,7.16601582%20C9.66698576,7.4114755%209.49037648,7.61585405%209.25718258,7.65849359%20L9.16731751,7.66666666%20L7.666,7.668%20L7.66666667,9.16666667%20C7.66666667,9.44280904%207.44280904,9.66666667%207.16666667,9.66666667%20C6.92120678,9.66666667%206.7170583,9.48979151%206.67472234,9.2565423%20L6.66666667,9.16666667%20L6.666,7.669%20L5.17251751,7.67186668%20C4.89637537,7.6722257%204.67222654,7.44865965%204.67186666,7.17251751%20C4.67154758,6.92705783%204.84815685,6.72267929%205.08135075,6.68003974%20L5.17121582,6.67186709%20L6.666,6.669%20L6.66666667,5.16666667%20C6.66666667,4.89052429%206.89052429,4.66666667%207.16666667,4.66666667%20Z'%20id='形状结合'%20fill='%2371757F'%20fill-rule='nonzero'%3e%3c/path%3e%3c/g%3e%3c/svg%3e", ze = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3ezoom-out%3c/title%3e%3cg%20id='zoom-out'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M7.16666667,1%20C10.572409,1%2013.3333333,3.76092429%2013.3333333,7.16666667%20C13.3333333,8.68984984%2012.781084,10.0840543%2011.8658888,11.1599767%20L14.4225201,13.7154466%20C14.6177822,13.9107088%2014.6177822,14.2272912%2014.4225201,14.4225534%20C14.2489537,14.5961197%2013.9795293,14.6154049%2013.7846612,14.4804088%20L13.7154133,14.4225534%20L11.158968,11.8667467%20C10.083183,12.7814291%208.68937384,13.3333333%207.16666667,13.3333333%20C3.76092429,13.3333333%201,10.572409%201,7.16666667%20C1,3.76092429%203.76092429,1%207.16666667,1%20Z%20M7.16666667,2%20C4.31320904,2%202,4.31320904%202,7.16666667%20C2,10.0201243%204.31320904,12.3333333%207.16666667,12.3333333%20C10.0201243,12.3333333%2012.3333333,10.0201243%2012.3333333,7.16666667%20C12.3333333,4.31320904%2010.0201243,2%207.16666667,2%20Z%20M9.16601582,6.66666666%20C9.44215796,6.66630764%209.66630679,6.88987368%209.66666668,7.16601582%20C9.66698576,7.4114755%209.49037648,7.61585405%209.25718258,7.65849359%20L9.16731751,7.66666666%20L5.17251751,7.67186668%20C4.89637537,7.6722257%204.67222654,7.44865965%204.67186666,7.17251751%20C4.67154758,6.92705783%204.84815685,6.72267929%205.08135075,6.68003974%20L5.17121582,6.67186709%20L9.16601582,6.66666666%20Z'%20id='形状结合'%20fill='%2371757F'%20fill-rule='nonzero'%3e%3c/path%3e%3c/g%3e%3c/svg%3e", We = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3ei下载%3c/title%3e%3cg%20id='页面-1'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='i下载'%3e%3cpath%20d='M14.5,14%20C14.7761424,14%2015,14.2238576%2015,14.5%20C15,14.7761424%2014.7761424,15%2014.5,15%20L1.5,15%20C1.22385763,15%201,14.7761424%201,14.5%20C1,14.2238576%201.22385763,14%201.5,14%20L14.5,14%20Z%20M8,1%20C8.24545989,1%208.44960837,1.17687516%208.49194433,1.41012437%20L8.5,1.5%20L8.5,10.793%20L11.6464466,7.64644661%20C11.820013,7.47288026%2012.0894374,7.45359511%2012.2843055,7.58859116%20L12.3535534,7.64644661%20C12.5271197,7.82001296%2012.5464049,8.08943736%2012.4114088,8.2843055%20L12.3535534,8.35355339%20L8.35355339,12.3535534%20L8.34128643,12.3654113%20C8.32881868,12.3770608%208.31575424,12.3880797%208.30214392,12.3984173%20L8.35355339,12.3535534%20C8.32671912,12.3803877%208.29759357,12.4035342%208.26680652,12.422993%20C8.25568247,12.4299807%208.24404667,12.4367067%208.23212724,12.4429657%20C8.21827569,12.4502504%208.20453886,12.4566485%208.1905951,12.4623894%20C8.17802507,12.4675915%208.16473685,12.4724419%208.15119917,12.4767316%20C8.13583471,12.481552%208.12047425,12.4856039%208.10498705,12.4889143%20C8.09430622,12.4912471%208.08325248,12.4932298%208.07207924,12.494843%20C8.05487076,12.4972949%208.03773477,12.498877%208.02056948,12.4995793%20C8.01375728,12.4998604%208.00689494,12.5%208,12.5%20L7.98043349,12.4996194%20C7.96293275,12.4989382%207.94546098,12.4973429%207.92809589,12.4948333%20L8,12.5%20C7.96390296,12.5%207.92869933,12.4961748%207.89477235,12.4889078%20C7.87952575,12.4856039%207.86416529,12.481552%207.84898836,12.4767587%20C7.83526315,12.4724419%207.82197493,12.4675915%207.80896344,12.4622078%20C7.79546114,12.4566485%207.78172431,12.4502504%207.76824181,12.443195%20C7.75595333,12.4367067%207.74431753,12.4299807%207.73298968,12.422812%20C7.72729809,12.4192668%207.72146362,12.4154054%207.7156945,12.4114088%20L7.69785608,12.3984173%20C7.68424576,12.3880797%207.67118132,12.3770608%207.65871357,12.3654113%20L7.64644661,12.3535534%20L3.64644661,8.35355339%20C3.45118446,8.15829124%203.45118446,7.84170876%203.64644661,7.64644661%20C3.82001296,7.47288026%204.08943736,7.45359511%204.2843055,7.58859116%20L4.35355339,7.64644661%20L7.5,10.793%20L7.5,1.5%20C7.5,1.22385763%207.72385763,1%208,1%20Z'%20id='形状结合'%20fill='%2371757F'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e", Pe = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e全部收起%3c/title%3e%3cg%20id='全部收起'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M4.715694,14.4114091%20C4.910563,14.5464051%205.179987,14.5271201%205.353553,14.3535531%20L5.353553,14.3535531%20L7.99999988,11.7070001%20L10.646447,14.3535531%20L10.715694,14.4114091%20C10.910563,14.5464051%2011.179987,14.5271201%2011.353553,14.3535531%20C11.548816,14.1582911%2011.548816,13.8417091%2011.353553,13.6464471%20L11.353553,13.6464471%20L8.353553,10.6464471%20L8.284306,10.5885911%20C8.089437,10.4535951%207.820013,10.4728801%207.646447,10.6464471%20L7.646447,10.6464471%20L4.646447,13.6464471%20L4.588591,13.7156941%20C4.453595,13.9105631%204.47288,14.1799871%204.646447,14.3535531%20L4.646447,14.3535531%20L4.715694,14.4114091%20Z%20M14.5,7.50000012%20C14.776142,7.50000012%2015,7.72385812%2015,8.00000012%20C15,8.27614212%2014.776142,8.50000012%2014.5,8.50000012%20L1.5,8.50000012%20C1.223858,8.50000012%201,8.27614212%201,8.00000012%20C1,7.72385812%201.223858,7.50000012%201.5,7.50000012%20L14.5,7.50000012%20Z%20M8.284306,5.41140912%20L8.353553,5.35355312%20L11.353553,2.35355312%20C11.548816,2.15829112%2011.548816,1.84170912%2011.353553,1.64644712%20C11.179987,1.47288012%2010.910563,1.45359512%2010.715694,1.58859112%20L10.646447,1.64644712%20L7.99999988,4.29300012%20L5.353553,1.64644712%20C5.179987,1.47288012%204.910563,1.45359512%204.715694,1.58859112%20L4.646447,1.64644712%20C4.47288,1.82001312%204.453595,2.08943712%204.588591,2.28430612%20L4.646447,2.35355312%20L7.646447,5.35355312%20C7.820013,5.52712012%208.089437,5.54640512%208.284306,5.41140912%20Z'%20id='形状结合'%20fill='%2371757F'%20fill-rule='nonzero'%3e%3c/path%3e%3c/g%3e%3c/svg%3e", He = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4IiB2aWV3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MjA5LjUgTDYwNCwyMTUgTDYwNC41LDIxNSBDNjA0Ljc0NTQ2LDIxNSA2MDQuOTQ5NjA4LDIxNC44MjMxMjUgNjA0Ljk5MTk0NCwyMTQuNTg5ODc2IEw2MDUsMjE0LjUgTDYwNSwyMDcuNSBDNjA1LDIwNy4yNTQ1NCA2MDQuODIzMTI1LDIwNy4wNTAzOTIgNjA0LjU4OTg3NiwyMDcuMDA4MDU2IEw2MDQuNSwyMDcgWiIgaWQ9IuW9oueKtue7k+WQiCIgZmlsbD0iIzcxNzU3RiIgZmlsbC1ydWxlPSJub256ZXJvIj48L3BhdGg+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=", Ze = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3estatus/whiteBG/correct%3c/title%3e%3cdesc%3eCreated%20with%20Sketch.%3c/desc%3e%3cdefs%3e%3cpolygon%20id='path-1'%20points='6.53553391%209.77817459%2012.1923882%204.12132034%2013.6066017%205.53553391%206.53553391%2012.6066017%203%209.07106781%204.41421356%207.65685425%206.53553391%209.77817459'%3e%3c/polygon%3e%3c/defs%3e%3cg%20id='status/whiteBG/correct'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cmask%20id='mask-2'%20fill='white'%3e%3cuse%20xlink:href='%23path-1'%3e%3c/use%3e%3c/mask%3e%3cuse%20id='Mask'%20fill='%233DCCA6'%20xlink:href='%23path-1'%3e%3c/use%3e%3c/g%3e%3c/svg%3e";
|
|
11
|
+
const Be = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eenlarge%3c/title%3e%3cg%20id='enlarge'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M7.16666667,1%20C10.572409,1%2013.3333333,3.76092429%2013.3333333,7.16666667%20C13.3333333,8.68984984%2012.781084,10.0840543%2011.8658888,11.1599767%20L14.4225201,13.7154466%20C14.6177822,13.9107088%2014.6177822,14.2272912%2014.4225201,14.4225534%20C14.2489537,14.5961197%2013.9795293,14.6154049%2013.7846612,14.4804088%20L13.7154133,14.4225534%20L11.158968,11.8667467%20C10.083183,12.7814291%208.68937384,13.3333333%207.16666667,13.3333333%20C3.76092429,13.3333333%201,10.572409%201,7.16666667%20C1,3.76092429%203.76092429,1%207.16666667,1%20Z%20M7.16666667,2%20C4.31320904,2%202,4.31320904%202,7.16666667%20C2,10.0201243%204.31320904,12.3333333%207.16666667,12.3333333%20C10.0201243,12.3333333%2012.3333333,10.0201243%2012.3333333,7.16666667%20C12.3333333,4.31320904%2010.0201243,2%207.16666667,2%20Z%20M7.16666667,4.66666667%20C7.41212656,4.66666667%207.61627504,4.84354183%207.658611,5.07679103%20L7.66666667,5.16666667%20L7.666,6.668%20L9.16601582,6.66666666%20C9.44215796,6.66630764%209.66630679,6.88987368%209.66666668,7.16601582%20C9.66698576,7.4114755%209.49037648,7.61585405%209.25718258,7.65849359%20L9.16731751,7.66666666%20L7.666,7.668%20L7.66666667,9.16666667%20C7.66666667,9.44280904%207.44280904,9.66666667%207.16666667,9.66666667%20C6.92120678,9.66666667%206.7170583,9.48979151%206.67472234,9.2565423%20L6.66666667,9.16666667%20L6.666,7.669%20L5.17251751,7.67186668%20C4.89637537,7.6722257%204.67222654,7.44865965%204.67186666,7.17251751%20C4.67154758,6.92705783%204.84815685,6.72267929%205.08135075,6.68003974%20L5.17121582,6.67186709%20L6.666,6.669%20L6.66666667,5.16666667%20C6.66666667,4.89052429%206.89052429,4.66666667%207.16666667,4.66666667%20Z'%20id='形状结合'%20fill='%2371757F'%20fill-rule='nonzero'%3e%3c/path%3e%3c/g%3e%3c/svg%3e", Pe = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3ezoom-out%3c/title%3e%3cg%20id='zoom-out'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M7.16666667,1%20C10.572409,1%2013.3333333,3.76092429%2013.3333333,7.16666667%20C13.3333333,8.68984984%2012.781084,10.0840543%2011.8658888,11.1599767%20L14.4225201,13.7154466%20C14.6177822,13.9107088%2014.6177822,14.2272912%2014.4225201,14.4225534%20C14.2489537,14.5961197%2013.9795293,14.6154049%2013.7846612,14.4804088%20L13.7154133,14.4225534%20L11.158968,11.8667467%20C10.083183,12.7814291%208.68937384,13.3333333%207.16666667,13.3333333%20C3.76092429,13.3333333%201,10.572409%201,7.16666667%20C1,3.76092429%203.76092429,1%207.16666667,1%20Z%20M7.16666667,2%20C4.31320904,2%202,4.31320904%202,7.16666667%20C2,10.0201243%204.31320904,12.3333333%207.16666667,12.3333333%20C10.0201243,12.3333333%2012.3333333,10.0201243%2012.3333333,7.16666667%20C12.3333333,4.31320904%2010.0201243,2%207.16666667,2%20Z%20M9.16601582,6.66666666%20C9.44215796,6.66630764%209.66630679,6.88987368%209.66666668,7.16601582%20C9.66698576,7.4114755%209.49037648,7.61585405%209.25718258,7.65849359%20L9.16731751,7.66666666%20L5.17251751,7.67186668%20C4.89637537,7.6722257%204.67222654,7.44865965%204.67186666,7.17251751%20C4.67154758,6.92705783%204.84815685,6.72267929%205.08135075,6.68003974%20L5.17121582,6.67186709%20L9.16601582,6.66666666%20Z'%20id='形状结合'%20fill='%2371757F'%20fill-rule='nonzero'%3e%3c/path%3e%3c/g%3e%3c/svg%3e", Ue = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3ei下载%3c/title%3e%3cg%20id='页面-1'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='i下载'%3e%3cpath%20d='M14.5,14%20C14.7761424,14%2015,14.2238576%2015,14.5%20C15,14.7761424%2014.7761424,15%2014.5,15%20L1.5,15%20C1.22385763,15%201,14.7761424%201,14.5%20C1,14.2238576%201.22385763,14%201.5,14%20L14.5,14%20Z%20M8,1%20C8.24545989,1%208.44960837,1.17687516%208.49194433,1.41012437%20L8.5,1.5%20L8.5,10.793%20L11.6464466,7.64644661%20C11.820013,7.47288026%2012.0894374,7.45359511%2012.2843055,7.58859116%20L12.3535534,7.64644661%20C12.5271197,7.82001296%2012.5464049,8.08943736%2012.4114088,8.2843055%20L12.3535534,8.35355339%20L8.35355339,12.3535534%20L8.34128643,12.3654113%20C8.32881868,12.3770608%208.31575424,12.3880797%208.30214392,12.3984173%20L8.35355339,12.3535534%20C8.32671912,12.3803877%208.29759357,12.4035342%208.26680652,12.422993%20C8.25568247,12.4299807%208.24404667,12.4367067%208.23212724,12.4429657%20C8.21827569,12.4502504%208.20453886,12.4566485%208.1905951,12.4623894%20C8.17802507,12.4675915%208.16473685,12.4724419%208.15119917,12.4767316%20C8.13583471,12.481552%208.12047425,12.4856039%208.10498705,12.4889143%20C8.09430622,12.4912471%208.08325248,12.4932298%208.07207924,12.494843%20C8.05487076,12.4972949%208.03773477,12.498877%208.02056948,12.4995793%20C8.01375728,12.4998604%208.00689494,12.5%208,12.5%20L7.98043349,12.4996194%20C7.96293275,12.4989382%207.94546098,12.4973429%207.92809589,12.4948333%20L8,12.5%20C7.96390296,12.5%207.92869933,12.4961748%207.89477235,12.4889078%20C7.87952575,12.4856039%207.86416529,12.481552%207.84898836,12.4767587%20C7.83526315,12.4724419%207.82197493,12.4675915%207.80896344,12.4622078%20C7.79546114,12.4566485%207.78172431,12.4502504%207.76824181,12.443195%20C7.75595333,12.4367067%207.74431753,12.4299807%207.73298968,12.422812%20C7.72729809,12.4192668%207.72146362,12.4154054%207.7156945,12.4114088%20L7.69785608,12.3984173%20C7.68424576,12.3880797%207.67118132,12.3770608%207.65871357,12.3654113%20L7.64644661,12.3535534%20L3.64644661,8.35355339%20C3.45118446,8.15829124%203.45118446,7.84170876%203.64644661,7.64644661%20C3.82001296,7.47288026%204.08943736,7.45359511%204.2843055,7.58859116%20L4.35355339,7.64644661%20L7.5,10.793%20L7.5,1.5%20C7.5,1.22385763%207.72385763,1%208,1%20Z'%20id='形状结合'%20fill='%2371757F'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e", Ye = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e全部收起%3c/title%3e%3cg%20id='全部收起'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M4.715694,14.4114091%20C4.910563,14.5464051%205.179987,14.5271201%205.353553,14.3535531%20L5.353553,14.3535531%20L7.99999988,11.7070001%20L10.646447,14.3535531%20L10.715694,14.4114091%20C10.910563,14.5464051%2011.179987,14.5271201%2011.353553,14.3535531%20C11.548816,14.1582911%2011.548816,13.8417091%2011.353553,13.6464471%20L11.353553,13.6464471%20L8.353553,10.6464471%20L8.284306,10.5885911%20C8.089437,10.4535951%207.820013,10.4728801%207.646447,10.6464471%20L7.646447,10.6464471%20L4.646447,13.6464471%20L4.588591,13.7156941%20C4.453595,13.9105631%204.47288,14.1799871%204.646447,14.3535531%20L4.646447,14.3535531%20L4.715694,14.4114091%20Z%20M14.5,7.50000012%20C14.776142,7.50000012%2015,7.72385812%2015,8.00000012%20C15,8.27614212%2014.776142,8.50000012%2014.5,8.50000012%20L1.5,8.50000012%20C1.223858,8.50000012%201,8.27614212%201,8.00000012%20C1,7.72385812%201.223858,7.50000012%201.5,7.50000012%20L14.5,7.50000012%20Z%20M8.284306,5.41140912%20L8.353553,5.35355312%20L11.353553,2.35355312%20C11.548816,2.15829112%2011.548816,1.84170912%2011.353553,1.64644712%20C11.179987,1.47288012%2010.910563,1.45359512%2010.715694,1.58859112%20L10.646447,1.64644712%20L7.99999988,4.29300012%20L5.353553,1.64644712%20C5.179987,1.47288012%204.910563,1.45359512%204.715694,1.58859112%20L4.646447,1.64644712%20C4.47288,1.82001312%204.453595,2.08943712%204.588591,2.28430612%20L4.646447,2.35355312%20L7.646447,5.35355312%20C7.820013,5.52712012%208.089437,5.54640512%208.284306,5.41140912%20Z'%20id='形状结合'%20fill='%2371757F'%20fill-rule='nonzero'%3e%3c/path%3e%3c/g%3e%3c/svg%3e", We = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iMCAwIDE2IDE2IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICAgIDx0aXRsZT5mdW5jdGlvbiBpY29uL2NvcHk8L3RpdGxlPg0KICAgIDxnIGlkPSLpobXpnaItMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+DQogICAgICAgIDxnIGlkPSJBUEktc3RhcnRlci3lm77moIflhaXlupMiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC01OTIuMDAwMDAwLCAtMj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oding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3estatus/whiteBG/correct%3c/title%3e%3cdesc%3eCreated%20with%20Sketch.%3c/desc%3e%3cdefs%3e%3cpolygon%20id='path-1'%20points='6.53553391%209.77817459%2012.1923882%204.12132034%2013.6066017%205.53553391%206.53553391%2012.6066017%203%209.07106781%204.41421356%207.65685425%206.53553391%209.77817459'%3e%3c/polygon%3e%3c/defs%3e%3cg%20id='status/whiteBG/correct'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cmask%20id='mask-2'%20fill='white'%3e%3cuse%20xlink:href='%23path-1'%3e%3c/use%3e%3c/mask%3e%3cuse%20id='Mask'%20fill='%233DCCA6'%20xlink:href='%23path-1'%3e%3c/use%3e%3c/g%3e%3c/svg%3e";
|
|
12
12
|
class he {
|
|
13
13
|
constructor() {
|
|
14
|
-
I(this, "xssWhiteList",
|
|
14
|
+
I(this, "xssWhiteList", Oe());
|
|
15
15
|
I(this, "cssWhiteList", _e());
|
|
16
16
|
this.setDefaultXss();
|
|
17
17
|
}
|
|
@@ -36,7 +36,7 @@ class he {
|
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
filterHtml(t) {
|
|
39
|
-
return
|
|
39
|
+
return ze(t, {
|
|
40
40
|
whiteList: this.xssWhiteList,
|
|
41
41
|
css: {
|
|
42
42
|
whiteList: Object.assign({}, this.cssWhiteList, {
|
|
@@ -49,22 +49,22 @@ class he {
|
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
const
|
|
52
|
+
const Ze = {
|
|
53
53
|
key: 0,
|
|
54
54
|
class: "mc-code-block-header"
|
|
55
|
-
},
|
|
55
|
+
}, Ge = { class: "mc-code-lang" }, Qe = { class: "mc-code-block-actions" }, Fe = {
|
|
56
56
|
key: 0,
|
|
57
57
|
style: { "margin-right": "8px" }
|
|
58
|
-
}, $e = ["title"], Xe = ["title"], Re = ["title"], Ke = ["title"],
|
|
58
|
+
}, $e = ["title"], Xe = ["title"], Re = ["title"], Ke = ["title"], Je = ["title"], Ve = {
|
|
59
59
|
key: 0,
|
|
60
|
-
src:
|
|
60
|
+
src: We
|
|
61
61
|
}, qe = {
|
|
62
62
|
key: 1,
|
|
63
|
-
src:
|
|
63
|
+
src: He
|
|
64
64
|
}, et = {
|
|
65
65
|
key: 0,
|
|
66
66
|
class: "mc-mermaid-content"
|
|
67
|
-
}, tt = { key:
|
|
67
|
+
}, tt = { key: 2 }, st = ["innerHTML"], nt = /* @__PURE__ */ de({
|
|
68
68
|
__name: "CodeBlock",
|
|
69
69
|
props: {
|
|
70
70
|
code: {
|
|
@@ -95,27 +95,27 @@ const Ye = {
|
|
|
95
95
|
setup(o) {
|
|
96
96
|
const t = o, { t: s } = pe(), a = new he();
|
|
97
97
|
let n = null;
|
|
98
|
-
const c =
|
|
99
|
-
|
|
100
|
-
const r =
|
|
98
|
+
const c = x(!0), d = x(!1);
|
|
99
|
+
x("");
|
|
100
|
+
const r = x(!0), g = G(() => {
|
|
101
101
|
var i;
|
|
102
102
|
return t.enableMermaid && ((i = t.language) == null ? void 0 : i.toLowerCase()) === "mermaid";
|
|
103
|
-
}), m =
|
|
103
|
+
}), m = G(() => {
|
|
104
104
|
try {
|
|
105
105
|
const i = t.code.indexOf('<span class="mc-typewriter');
|
|
106
106
|
let e;
|
|
107
|
-
return t.language &&
|
|
107
|
+
return t.language && k.getLanguage(t.language) ? i !== -1 ? e = k.highlight(t.code.slice(0, i), { language: t.language }).value + t.code.slice(i) : e = k.highlight(t.code, { language: t.language }).value : typeof k.highlightAuto !== void 0 ? i !== -1 ? e = k.highlightAuto(t.code.slice(0, i)).value + t.code.slice(i) : e = k.highlightAuto(t.code).value : e = a.filterHtml(t.code), e;
|
|
108
108
|
} catch {
|
|
109
109
|
}
|
|
110
|
-
}), f =
|
|
110
|
+
}), f = x(null), D = () => {
|
|
111
111
|
var e;
|
|
112
112
|
const i = (e = f.value) == null ? void 0 : e.querySelector(".mc-mermaid-content");
|
|
113
113
|
i && n && n.zoomIn(i);
|
|
114
|
-
},
|
|
114
|
+
}, A = () => {
|
|
115
115
|
var e;
|
|
116
116
|
const i = (e = f.value) == null ? void 0 : e.querySelector(".mc-mermaid-content");
|
|
117
117
|
i && n && n.zoomOut(i);
|
|
118
|
-
},
|
|
118
|
+
}, L = () => {
|
|
119
119
|
var e;
|
|
120
120
|
const i = (e = f.value) == null ? void 0 : e.querySelector(".mc-mermaid-content");
|
|
121
121
|
i && n && n.download(i);
|
|
@@ -132,7 +132,7 @@ const Ye = {
|
|
|
132
132
|
console.error("Failed to load MermaidService:", i);
|
|
133
133
|
return;
|
|
134
134
|
}
|
|
135
|
-
|
|
135
|
+
U(async () => {
|
|
136
136
|
var e;
|
|
137
137
|
const i = (e = f.value) == null ? void 0 : e.querySelector(".mc-mermaid-content");
|
|
138
138
|
i && await n.renderToContainer(i, t.code.replace(/<span[^>]*\bclass\s*=\s*['"]mc-typewriter[^>]*>([\s\S]*?)<\/span>/g, "$1"), t.theme);
|
|
@@ -140,7 +140,7 @@ const Ye = {
|
|
|
140
140
|
}
|
|
141
141
|
}, S = () => {
|
|
142
142
|
c.value = !c.value;
|
|
143
|
-
},
|
|
143
|
+
}, Y = Ee((i) => {
|
|
144
144
|
const e = i.target;
|
|
145
145
|
if (navigator.clipboard)
|
|
146
146
|
navigator.clipboard.writeText(t.code);
|
|
@@ -157,70 +157,70 @@ const Ye = {
|
|
|
157
157
|
requestAnimationFrame(() => {
|
|
158
158
|
i.dataset.oldOverflow = i.style.overflow, i.dataset.height ? i.style.maxHeight = i.dataset.height : i.scrollHeight !== 0 ? i.style.maxHeight = `${i.scrollHeight}px` : i.style.maxHeight = 0, i.style.overflow = "hidden";
|
|
159
159
|
});
|
|
160
|
-
},
|
|
160
|
+
}, W = (i) => {
|
|
161
161
|
i.style.maxHeight = "", i.style.overflow = i.dataset.oldOverflow;
|
|
162
|
-
},
|
|
162
|
+
}, z = (i) => {
|
|
163
163
|
i.dataset || (i.dataset = {}), i.dataset.oldOverflow = i.style.overflow, i.style.maxHeight = `${i.scrollHeight}px`, i.style.overflow = "hidden";
|
|
164
164
|
}, R = (i) => {
|
|
165
165
|
i.scrollHeight !== 0 && (i.style.maxHeight = 0);
|
|
166
166
|
}, K = (i) => {
|
|
167
167
|
i.style.maxHeight = "", i.style.overflow = i.dataset.oldOverflow;
|
|
168
|
-
},
|
|
169
|
-
return
|
|
170
|
-
g.value &&
|
|
168
|
+
}, J = G(() => t.theme === "dark" ? "mc-code-block-dark" : "mc-code-block-light");
|
|
169
|
+
return O(() => [t.code, t.theme, t.enableMermaid], () => {
|
|
170
|
+
g.value && U(() => {
|
|
171
171
|
_();
|
|
172
172
|
});
|
|
173
|
-
}, { immediate: !0 }),
|
|
173
|
+
}, { immediate: !0 }), O(
|
|
174
174
|
() => r.value,
|
|
175
175
|
(i) => {
|
|
176
|
-
i && g.value &&
|
|
176
|
+
i && g.value && U(() => {
|
|
177
177
|
_();
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
180
|
), ge(() => {
|
|
181
181
|
g.value && _();
|
|
182
|
-
}), (i, e) => (
|
|
182
|
+
}), (i, e) => (C(), M(
|
|
183
183
|
"div",
|
|
184
184
|
{
|
|
185
|
-
class:
|
|
185
|
+
class: E(["mc-code-block", J.value]),
|
|
186
186
|
ref_key: "rootRef",
|
|
187
187
|
ref: f
|
|
188
188
|
},
|
|
189
189
|
[
|
|
190
|
-
i.$slots.header ? q(i.$slots, "header", { key: 1 }, void 0, !0) : (
|
|
191
|
-
|
|
190
|
+
i.$slots.header ? q(i.$slots, "header", { key: 1 }, void 0, !0) : (C(), M("div", Ze, [
|
|
191
|
+
w(
|
|
192
192
|
"span",
|
|
193
|
-
|
|
194
|
-
|
|
193
|
+
Ge,
|
|
194
|
+
V(o.language),
|
|
195
195
|
1
|
|
196
196
|
/* TEXT */
|
|
197
197
|
),
|
|
198
198
|
q(i.$slots, "actions", {}, () => [
|
|
199
|
-
|
|
200
|
-
g.value ? (
|
|
201
|
-
|
|
199
|
+
w("div", Qe, [
|
|
200
|
+
g.value ? (C(), M("div", Fe, [
|
|
201
|
+
w(
|
|
202
202
|
"ul",
|
|
203
203
|
{
|
|
204
|
-
class:
|
|
204
|
+
class: E(["mc-diagram-switch", { "mc-show-code": !r.value }])
|
|
205
205
|
},
|
|
206
206
|
[
|
|
207
|
-
|
|
207
|
+
w(
|
|
208
208
|
"li",
|
|
209
209
|
{
|
|
210
210
|
onClick: e[0] || (e[0] = (l) => r.value = !0),
|
|
211
|
-
class:
|
|
211
|
+
class: E({ "mc-diagram-switch-active": r.value })
|
|
212
212
|
},
|
|
213
|
-
|
|
213
|
+
V(T(s)("Md.diagram")),
|
|
214
214
|
3
|
|
215
215
|
/* TEXT, CLASS */
|
|
216
216
|
),
|
|
217
|
-
|
|
217
|
+
w(
|
|
218
218
|
"li",
|
|
219
219
|
{
|
|
220
220
|
onClick: e[1] || (e[1] = (l) => r.value = !1),
|
|
221
|
-
class:
|
|
221
|
+
class: E({ "mc-diagram-switch-active": !r.value })
|
|
222
222
|
},
|
|
223
|
-
|
|
223
|
+
V(T(s)("Md.code")),
|
|
224
224
|
3
|
|
225
225
|
/* TEXT, CLASS */
|
|
226
226
|
)
|
|
@@ -228,91 +228,91 @@ const Ye = {
|
|
|
228
228
|
2
|
|
229
229
|
/* CLASS */
|
|
230
230
|
)
|
|
231
|
-
])) :
|
|
232
|
-
g.value && r.value ? (
|
|
231
|
+
])) : P("v-if", !0),
|
|
232
|
+
g.value && r.value ? (C(), M("div", {
|
|
233
233
|
key: 1,
|
|
234
234
|
class: "mc-action-btn mc-toggle-btn",
|
|
235
235
|
title: T(s)("Md.zoomIn"),
|
|
236
|
-
onClick:
|
|
236
|
+
onClick: D
|
|
237
237
|
}, e[3] || (e[3] = [
|
|
238
|
-
|
|
238
|
+
w(
|
|
239
239
|
"img",
|
|
240
|
-
{ src:
|
|
240
|
+
{ src: Be },
|
|
241
241
|
null,
|
|
242
242
|
-1
|
|
243
243
|
/* HOISTED */
|
|
244
244
|
)
|
|
245
|
-
]), 8, $e)) :
|
|
246
|
-
g.value && r.value ? (
|
|
245
|
+
]), 8, $e)) : P("v-if", !0),
|
|
246
|
+
g.value && r.value ? (C(), M("div", {
|
|
247
247
|
key: 2,
|
|
248
248
|
class: "mc-action-btn mc-toggle-btn",
|
|
249
249
|
title: T(s)("Md.zoomOut"),
|
|
250
|
-
onClick:
|
|
250
|
+
onClick: A
|
|
251
251
|
}, e[4] || (e[4] = [
|
|
252
|
-
|
|
252
|
+
w(
|
|
253
253
|
"img",
|
|
254
|
-
{ src:
|
|
254
|
+
{ src: Pe },
|
|
255
255
|
null,
|
|
256
256
|
-1
|
|
257
257
|
/* HOISTED */
|
|
258
258
|
)
|
|
259
|
-
]), 8, Xe)) :
|
|
260
|
-
g.value && r.value ? (
|
|
259
|
+
]), 8, Xe)) : P("v-if", !0),
|
|
260
|
+
g.value && r.value ? (C(), M("div", {
|
|
261
261
|
key: 3,
|
|
262
262
|
class: "mc-action-btn mc-toggle-btn",
|
|
263
263
|
title: T(s)("Md.downLoad"),
|
|
264
|
-
onClick:
|
|
264
|
+
onClick: L
|
|
265
265
|
}, e[5] || (e[5] = [
|
|
266
|
-
|
|
266
|
+
w(
|
|
267
267
|
"img",
|
|
268
|
-
{ src:
|
|
268
|
+
{ src: Ue },
|
|
269
269
|
null,
|
|
270
270
|
-1
|
|
271
271
|
/* HOISTED */
|
|
272
272
|
)
|
|
273
|
-
]), 8, Re)) :
|
|
274
|
-
|
|
273
|
+
]), 8, Re)) : P("v-if", !0),
|
|
274
|
+
w("div", {
|
|
275
275
|
class: "mc-action-btn mc-toggle-btn",
|
|
276
276
|
title: T(s)("Md.toggle"),
|
|
277
277
|
onClick: S
|
|
278
278
|
}, e[6] || (e[6] = [
|
|
279
|
-
|
|
279
|
+
w(
|
|
280
280
|
"img",
|
|
281
|
-
{ src:
|
|
281
|
+
{ src: Ye },
|
|
282
282
|
null,
|
|
283
283
|
-1
|
|
284
284
|
/* HOISTED */
|
|
285
285
|
)
|
|
286
286
|
]), 8, Ke),
|
|
287
|
-
|
|
287
|
+
w("div", {
|
|
288
288
|
class: "mc-action-btn mc-copy-btn",
|
|
289
289
|
title: T(s)("Md.copy"),
|
|
290
290
|
onClick: e[2] || (e[2] = //@ts-ignore
|
|
291
|
-
(...l) => T(
|
|
291
|
+
(...l) => T(Y) && T(Y)(...l))
|
|
292
292
|
}, [
|
|
293
|
-
d.value ? (
|
|
294
|
-
], 8,
|
|
293
|
+
d.value ? (C(), M("img", qe)) : (C(), M("img", Ve))
|
|
294
|
+
], 8, Je)
|
|
295
295
|
])
|
|
296
296
|
], !0)
|
|
297
297
|
])),
|
|
298
|
-
Le
|
|
298
|
+
Me(Le, {
|
|
299
299
|
name: "collapse-transition",
|
|
300
300
|
onBeforeEnter: $,
|
|
301
301
|
onEnter: X,
|
|
302
|
-
onAfterEnter:
|
|
303
|
-
onBeforeLeave:
|
|
302
|
+
onAfterEnter: W,
|
|
303
|
+
onBeforeLeave: z,
|
|
304
304
|
onLeave: R,
|
|
305
305
|
onAfterLeave: K,
|
|
306
306
|
persisted: ""
|
|
307
307
|
}, {
|
|
308
308
|
default: Ie(() => [
|
|
309
|
-
Te(
|
|
309
|
+
Te(w(
|
|
310
310
|
"div",
|
|
311
311
|
null,
|
|
312
312
|
[
|
|
313
|
-
g.value && r.value
|
|
314
|
-
|
|
315
|
-
class:
|
|
313
|
+
g.value && r.value ? (C(), M("div", et)) : i.$slots.content ? q(i.$slots, "content", { key: 1 }, void 0, !0) : (C(), M("pre", tt, [
|
|
314
|
+
w("code", {
|
|
315
|
+
class: E(`hljs language-${o.language}`),
|
|
316
316
|
innerHTML: m.value
|
|
317
317
|
}, null, 10, st)
|
|
318
318
|
]))
|
|
@@ -320,7 +320,7 @@ const Ye = {
|
|
|
320
320
|
512
|
|
321
321
|
/* NEED_PATCH */
|
|
322
322
|
), [
|
|
323
|
-
[
|
|
323
|
+
[xe, c.value]
|
|
324
324
|
])
|
|
325
325
|
]),
|
|
326
326
|
_: 3
|
|
@@ -336,7 +336,7 @@ const Ye = {
|
|
|
336
336
|
for (const [a, n] of t)
|
|
337
337
|
s[a] = n;
|
|
338
338
|
return s;
|
|
339
|
-
}, it = /* @__PURE__ */ me(nt, [["__scopeId", "data-v-
|
|
339
|
+
}, it = /* @__PURE__ */ me(nt, [["__scopeId", "data-v-285b1a39"]]), ot = {
|
|
340
340
|
content: {
|
|
341
341
|
type: String,
|
|
342
342
|
default: ""
|
|
@@ -393,7 +393,7 @@ const Ye = {
|
|
|
393
393
|
type: Object,
|
|
394
394
|
default: () => ({})
|
|
395
395
|
}
|
|
396
|
-
},
|
|
396
|
+
}, F = {
|
|
397
397
|
step: 2,
|
|
398
398
|
interval: 50,
|
|
399
399
|
style: "normal"
|
|
@@ -444,7 +444,7 @@ const Ye = {
|
|
|
444
444
|
}
|
|
445
445
|
const a = t[t.length - 1];
|
|
446
446
|
at(a, o) ? (o.nesting = -1, t.pop()) : s ? o.nesting = 0 : (o.nesting = 1, t.push(o));
|
|
447
|
-
},
|
|
447
|
+
}, Q = (o) => {
|
|
448
448
|
if (!o) return !1;
|
|
449
449
|
try {
|
|
450
450
|
return document.createElement(o), !0;
|
|
@@ -484,7 +484,7 @@ const Ye = {
|
|
|
484
484
|
else
|
|
485
485
|
throw new Error(`Invalid nesting level found in token index ${g}.`);
|
|
486
486
|
}), s.children;
|
|
487
|
-
},
|
|
487
|
+
}, Z = (o) => {
|
|
488
488
|
if (!o || !o.trim()) return [];
|
|
489
489
|
if (typeof window > "u" || typeof DOMParser > "u")
|
|
490
490
|
return [o];
|
|
@@ -504,34 +504,34 @@ const Ye = {
|
|
|
504
504
|
return t.childNodes.length > 0 && t.childNodes.forEach((n) => {
|
|
505
505
|
const c = fe(n);
|
|
506
506
|
(ue(c) || typeof c == "string") && a.push(c);
|
|
507
|
-
}),
|
|
507
|
+
}), Q(t.tagName) ? y(t.tagName.toLowerCase(), s, a) : (o == null ? void 0 : o.textContent) || "";
|
|
508
508
|
};
|
|
509
509
|
function ct() {
|
|
510
|
-
const o =
|
|
510
|
+
const o = De({});
|
|
511
511
|
return {
|
|
512
512
|
getCache: (t) => o[t],
|
|
513
513
|
getCaches: () => ({ ...o }),
|
|
514
514
|
setCache: (t, s) => {
|
|
515
515
|
o[t] = s;
|
|
516
516
|
},
|
|
517
|
-
nextTick:
|
|
517
|
+
nextTick: U
|
|
518
518
|
};
|
|
519
519
|
}
|
|
520
520
|
function dt({
|
|
521
521
|
adapter: o,
|
|
522
522
|
foundationClass: t
|
|
523
523
|
}) {
|
|
524
|
-
const s =
|
|
524
|
+
const s = x(null), a = () => (s.value || (s.value = new t(o), typeof s.value.init == "function" && s.value.init()), s.value), n = () => {
|
|
525
525
|
s.value && (typeof s.value.destroy == "function" && s.value.destroy(), s.value = null);
|
|
526
526
|
};
|
|
527
|
-
return
|
|
527
|
+
return ke(() => {
|
|
528
528
|
n();
|
|
529
529
|
}), {
|
|
530
530
|
foundation: a(),
|
|
531
531
|
destroyFoundation: n
|
|
532
532
|
};
|
|
533
533
|
}
|
|
534
|
-
const
|
|
534
|
+
const N = () => {
|
|
535
535
|
};
|
|
536
536
|
class te {
|
|
537
537
|
constructor(t) {
|
|
@@ -549,17 +549,17 @@ class te {
|
|
|
549
549
|
}
|
|
550
550
|
static get defaultAdapter() {
|
|
551
551
|
return {
|
|
552
|
-
getProp:
|
|
553
|
-
getProps:
|
|
554
|
-
getState:
|
|
555
|
-
getStates:
|
|
556
|
-
setState:
|
|
557
|
-
getContext:
|
|
558
|
-
getContexts:
|
|
559
|
-
getCache:
|
|
560
|
-
setCache:
|
|
561
|
-
getCaches:
|
|
562
|
-
stopPropagation:
|
|
552
|
+
getProp: N,
|
|
553
|
+
getProps: N,
|
|
554
|
+
getState: N,
|
|
555
|
+
getStates: N,
|
|
556
|
+
setState: N,
|
|
557
|
+
getContext: N,
|
|
558
|
+
getContexts: N,
|
|
559
|
+
getCache: N,
|
|
560
|
+
setCache: N,
|
|
561
|
+
getCaches: N,
|
|
562
|
+
stopPropagation: N
|
|
563
563
|
};
|
|
564
564
|
}
|
|
565
565
|
getProp(t) {
|
|
@@ -619,7 +619,7 @@ class gt extends te {
|
|
|
619
619
|
I(this, "parseTypingContent", (s) => {
|
|
620
620
|
const { typingOptions: a } = this.getProps(), { typingIndex: n } = this.getStates();
|
|
621
621
|
s = s.slice(0, n) || "";
|
|
622
|
-
const c = { ...
|
|
622
|
+
const c = { ...F, ...a };
|
|
623
623
|
return c.style === "cursor" ? s += '<span class="mc-typewriter mc-typewriter-cursor">|</span>' : (c.style === "color" || c.style === "gradient") && (s = s.slice(0, -5) + `<span class="mc-typewriter mc-typewriter-${c.style}">${s.slice(-5)}</span>`), s || "";
|
|
624
624
|
});
|
|
625
625
|
I(this, "parseContent", () => {
|
|
@@ -631,21 +631,21 @@ class gt extends te {
|
|
|
631
631
|
var r, g;
|
|
632
632
|
const { typingOptions: s } = this.getProps(), { timer: a } = this.getStates();
|
|
633
633
|
a && clearTimeout(a), this.setState({ isTyping: !0 }), (g = (r = this._adapter).typingStart) == null || g.call(r);
|
|
634
|
-
const n = { ...
|
|
634
|
+
const n = { ...F, ...s }, c = () => {
|
|
635
635
|
const { typingIndex: m, content: f } = this.getStates();
|
|
636
|
-
let
|
|
637
|
-
Array.isArray(n.step) && (
|
|
638
|
-
let
|
|
639
|
-
if (this.setState({ typingIndex:
|
|
636
|
+
let D = n.step || 2;
|
|
637
|
+
Array.isArray(n.step) && (D = n.step[0] + Math.floor(Math.random() * (n.step[1] - n.step[0])));
|
|
638
|
+
let A = m + D;
|
|
639
|
+
if (this.setState({ typingIndex: A }), this.parseContent(), this._adapter.typingEvent(), A >= f.length) {
|
|
640
640
|
this.typewriterEnd(), this.parseContent();
|
|
641
641
|
return;
|
|
642
642
|
}
|
|
643
|
-
let
|
|
643
|
+
let L = setTimeout(
|
|
644
644
|
c,
|
|
645
645
|
typeof n.interval == "number" ? n.interval : 50
|
|
646
646
|
);
|
|
647
647
|
this.setState({
|
|
648
|
-
timer:
|
|
648
|
+
timer: L
|
|
649
649
|
});
|
|
650
650
|
};
|
|
651
651
|
let d = setTimeout(c);
|
|
@@ -688,16 +688,16 @@ const pt = /* @__PURE__ */ de({
|
|
|
688
688
|
props: ot,
|
|
689
689
|
emits: ["afterMdtInit", "typingStart", "typing", "typingEnd"],
|
|
690
690
|
setup(o, { expose: t, emit: s }) {
|
|
691
|
-
const a = new he(), n = o, c = s, d =
|
|
691
|
+
const a = new he(), n = o, c = s, d = Ae();
|
|
692
692
|
let r = null;
|
|
693
693
|
const g = je({
|
|
694
694
|
breaks: !0,
|
|
695
695
|
linkify: !0,
|
|
696
696
|
html: !0,
|
|
697
697
|
highlight: (e, l) => {
|
|
698
|
-
if (l &&
|
|
698
|
+
if (l && k.getLanguage(l))
|
|
699
699
|
try {
|
|
700
|
-
return
|
|
700
|
+
return k.highlight(e, { language: l }).value;
|
|
701
701
|
} catch {
|
|
702
702
|
}
|
|
703
703
|
return "";
|
|
@@ -706,42 +706,42 @@ const pt = /* @__PURE__ */ de({
|
|
|
706
706
|
}), { foundation: m } = ut({
|
|
707
707
|
props: n,
|
|
708
708
|
emit: c
|
|
709
|
-
}), f =
|
|
709
|
+
}), f = x(0), D = x(!1), A = x(), L = () => {
|
|
710
710
|
let e = n.content || "";
|
|
711
|
-
if (n.typing &&
|
|
711
|
+
if (n.typing && D.value) {
|
|
712
712
|
e = n.content.slice(0, f.value) || "";
|
|
713
|
-
const h = { ...
|
|
713
|
+
const h = { ...F, ...n == null ? void 0 : n.typingOptions };
|
|
714
714
|
h.style === "cursor" ? e += '<span class="mc-typewriter mc-typewriter-cursor">|</span>' : (h.style === "color" || h.style === "gradient") && (e = e.slice(0, -5) + `<span class="mc-typewriter mc-typewriter-${h.style}">${e.slice(-5)}</span>`);
|
|
715
715
|
}
|
|
716
716
|
n.enableThink && (e = m.getThinkContent(e, n.thinkOptions));
|
|
717
717
|
const l = g.parse(e, {}), u = ye(l), p = _(u);
|
|
718
|
-
|
|
718
|
+
A.value = y(j, p);
|
|
719
719
|
}, _ = (e) => e.map((l) => S(l)), S = (e) => {
|
|
720
720
|
var l;
|
|
721
721
|
if (e.nodeType === "html_inline" || e.nodeType === "html_block") {
|
|
722
|
-
const u = a.filterHtml(((l = e.openNode) == null ? void 0 : l.content) || ""), p =
|
|
722
|
+
const u = a.filterHtml(((l = e.openNode) == null ? void 0 : l.content) || ""), p = Z(u);
|
|
723
723
|
if (!p || p.length === 0)
|
|
724
724
|
return y("span", u);
|
|
725
|
-
const h = p.map((
|
|
726
|
-
if (typeof
|
|
727
|
-
return y("span",
|
|
728
|
-
const
|
|
729
|
-
return Array.isArray(
|
|
725
|
+
const h = p.map((v) => {
|
|
726
|
+
if (typeof v == "string")
|
|
727
|
+
return y("span", v);
|
|
728
|
+
const B = e.children.map((b) => S(b));
|
|
729
|
+
return Array.isArray(v.children) ? v.children = [...v.children, ...B] : v.children = [v.children, ...B].filter((b) => b), v;
|
|
730
730
|
});
|
|
731
731
|
return y(j, h);
|
|
732
732
|
}
|
|
733
733
|
if (e.nodeType === "inline") {
|
|
734
|
-
const u = g.renderer.render([e.openNode], g.options, {}), p = a.filterHtml(u), h =
|
|
734
|
+
const u = g.renderer.render([e.openNode], g.options, {}), p = a.filterHtml(u), h = Z(p);
|
|
735
735
|
return y(j, h);
|
|
736
736
|
}
|
|
737
|
-
return m.isToken(e) ?
|
|
738
|
-
},
|
|
737
|
+
return m.isToken(e) ? Y(e) : X(e);
|
|
738
|
+
}, Y = (e) => {
|
|
739
739
|
if (e.type === "text")
|
|
740
740
|
return e.content;
|
|
741
741
|
if (e.type === "inline")
|
|
742
742
|
return $(e);
|
|
743
743
|
if (e.type === "fence")
|
|
744
|
-
return
|
|
744
|
+
return W(e);
|
|
745
745
|
if (e.type === "softbreak")
|
|
746
746
|
return g.options.breaks ? y("br") : `
|
|
747
747
|
`;
|
|
@@ -750,43 +750,43 @@ const pt = /* @__PURE__ */ de({
|
|
|
750
750
|
return e.type === "html_block" ? y("div", { innerHTML: l }) : y("span", { innerHTML: l });
|
|
751
751
|
}
|
|
752
752
|
if (e.type === "math_block" && e.markup === "$$") {
|
|
753
|
-
const l = g.renderer.render([e], g.options, {}), u = a.filterHtml(l), p =
|
|
753
|
+
const l = g.renderer.render([e], g.options, {}), u = a.filterHtml(l), p = Z(u);
|
|
754
754
|
return y(j, p);
|
|
755
755
|
}
|
|
756
756
|
if (e.tag) {
|
|
757
|
-
const l =
|
|
757
|
+
const l = Q(e.tag) ? e.tag : "div", u = z(e.attrs || []);
|
|
758
758
|
return y(l, { ...u, key: e.vNodeKey }, e.content);
|
|
759
759
|
}
|
|
760
760
|
return e.content;
|
|
761
761
|
}, $ = (e) => {
|
|
762
|
-
const l = g.renderer.render([e], g.options, {}), u = a.filterHtml(l), p =
|
|
762
|
+
const l = g.renderer.render([e], g.options, {}), u = a.filterHtml(l), p = Z(u);
|
|
763
763
|
return y(j, p);
|
|
764
764
|
}, X = (e) => {
|
|
765
|
-
var h,
|
|
765
|
+
var h, v, B, b, se, ne, ie, oe, re;
|
|
766
766
|
let l = "div";
|
|
767
|
-
(h = e.openNode) != null && h.tag &&
|
|
768
|
-
const u =
|
|
767
|
+
(h = e.openNode) != null && h.tag && Q((v = e.openNode) == null ? void 0 : v.tag) && (l = (B = e.openNode) == null ? void 0 : B.tag);
|
|
768
|
+
const u = z(((b = e.openNode) == null ? void 0 : b.attrs) || []);
|
|
769
769
|
if (((se = e.openNode) == null ? void 0 : se.type) === "fence")
|
|
770
|
-
return
|
|
770
|
+
return W(e.openNode);
|
|
771
771
|
if ((ne = e.openNode) != null && ne.tag) {
|
|
772
|
-
let
|
|
773
|
-
const
|
|
774
|
-
return
|
|
772
|
+
let H = Q((ie = e.openNode) == null ? void 0 : ie.tag) ? (oe = e.openNode) == null ? void 0 : oe.tag : "div";
|
|
773
|
+
const we = e.children.map((le) => S(le)), Ce = z(((re = e.openNode) == null ? void 0 : re.attrs) || []), ae = y(H, { ...Ce, key: e.vNodeKey }, we);
|
|
774
|
+
return H === "table" ? y("div", { className: "mc-table-container", key: `${e.vNodeKey}-table-container` }, [ae]) : ae;
|
|
775
775
|
}
|
|
776
|
-
const p = e.children.map((
|
|
776
|
+
const p = e.children.map((H) => S(H));
|
|
777
777
|
return y(l, { ...u, key: e.vNodeKey }, p);
|
|
778
|
-
},
|
|
778
|
+
}, W = (e) => {
|
|
779
779
|
var p;
|
|
780
780
|
const l = ((p = e.info) == null ? void 0 : p.replace(/<span\b[^>]*>/i, "").replace("</span>", "")) || "", u = e.content;
|
|
781
781
|
return R(l, u, e.tokenIndex);
|
|
782
|
-
},
|
|
783
|
-
|
|
782
|
+
}, z = (e) => e.reduce((l, [u, p]) => (l[u] = p, l), {});
|
|
783
|
+
O(
|
|
784
784
|
() => {
|
|
785
785
|
var e;
|
|
786
786
|
return [n.enableThink, (e = n.thinkOptions) == null ? void 0 : e.customClass, n.theme];
|
|
787
787
|
},
|
|
788
788
|
() => {
|
|
789
|
-
|
|
789
|
+
L();
|
|
790
790
|
}
|
|
791
791
|
);
|
|
792
792
|
const R = (e, l, u) => {
|
|
@@ -818,69 +818,69 @@ const pt = /* @__PURE__ */ de({
|
|
|
818
818
|
p
|
|
819
819
|
);
|
|
820
820
|
}, K = () => {
|
|
821
|
-
clearTimeout(r),
|
|
822
|
-
const e = { ...
|
|
821
|
+
clearTimeout(r), D.value = !0, c("typingStart");
|
|
822
|
+
const e = { ...F, ...n == null ? void 0 : n.typingOptions }, l = () => {
|
|
823
823
|
let u = e.step;
|
|
824
|
-
if (Array.isArray(e.step) && (u = e.step[0] + Math.floor(Math.random() * (e.step[1] - e.step[0]))), f.value += u,
|
|
825
|
-
|
|
824
|
+
if (Array.isArray(e.step) && (u = e.step[0] + Math.floor(Math.random() * (e.step[1] - e.step[0]))), f.value += u, L(), c("typing"), f.value >= n.content.length) {
|
|
825
|
+
J(), L();
|
|
826
826
|
return;
|
|
827
827
|
}
|
|
828
828
|
r = setTimeout(l, e.interval);
|
|
829
829
|
};
|
|
830
830
|
r = setTimeout(l);
|
|
831
831
|
};
|
|
832
|
-
|
|
832
|
+
O(
|
|
833
833
|
() => n.content,
|
|
834
834
|
(e, l) => {
|
|
835
835
|
if (!n.typing) {
|
|
836
|
-
f.value = (e == null ? void 0 : e.length) || 0,
|
|
836
|
+
f.value = (e == null ? void 0 : e.length) || 0, L();
|
|
837
837
|
return;
|
|
838
838
|
}
|
|
839
|
-
e.indexOf(l) === -1 && (f.value = 0),
|
|
839
|
+
e.indexOf(l) === -1 && (f.value = 0), U(() => K());
|
|
840
840
|
},
|
|
841
841
|
{ immediate: !0 }
|
|
842
842
|
);
|
|
843
|
-
const
|
|
844
|
-
|
|
843
|
+
const J = () => {
|
|
844
|
+
D.value = !1, c("typingEnd");
|
|
845
845
|
};
|
|
846
|
-
|
|
846
|
+
O(
|
|
847
847
|
() => n.customXssRules,
|
|
848
848
|
(e) => {
|
|
849
|
-
a.setCustomXssRules(e),
|
|
849
|
+
a.setCustomXssRules(e), L();
|
|
850
850
|
},
|
|
851
851
|
{ deep: !1, immediate: !0 }
|
|
852
|
-
),
|
|
852
|
+
), O(
|
|
853
853
|
() => n.mdPlugins,
|
|
854
854
|
(e) => {
|
|
855
|
-
a.setMdPlugins(e, g),
|
|
855
|
+
a.setMdPlugins(e, g), L();
|
|
856
856
|
},
|
|
857
857
|
{ immediate: !0, deep: !1 }
|
|
858
858
|
);
|
|
859
|
-
const i =
|
|
859
|
+
const i = G(() => n.theme === "dark" ? "mc-markdown-render-dark" : "mc-markdown-render-light");
|
|
860
860
|
return ge(() => {
|
|
861
861
|
c("afterMdtInit", g);
|
|
862
|
-
}), t({ mdt: g }), (e, l) => (
|
|
862
|
+
}), t({ mdt: g }), (e, l) => (C(), M(
|
|
863
863
|
j,
|
|
864
864
|
null,
|
|
865
865
|
[
|
|
866
|
-
|
|
866
|
+
w(
|
|
867
867
|
"div",
|
|
868
868
|
{
|
|
869
|
-
class:
|
|
869
|
+
class: E(["mc-markdown-render", i.value])
|
|
870
870
|
},
|
|
871
871
|
[
|
|
872
|
-
(
|
|
872
|
+
(C(), Se(be(A.value)))
|
|
873
873
|
],
|
|
874
874
|
2
|
|
875
875
|
/* CLASS */
|
|
876
876
|
),
|
|
877
|
-
|
|
877
|
+
P("v-if", !0)
|
|
878
878
|
],
|
|
879
879
|
64
|
|
880
880
|
/* STABLE_FRAGMENT */
|
|
881
881
|
));
|
|
882
882
|
}
|
|
883
|
-
}), ce = /* @__PURE__ */ me(pt, [["__scopeId", "data-v-
|
|
883
|
+
}), ce = /* @__PURE__ */ me(pt, [["__scopeId", "data-v-b2f30ac7"]]);
|
|
884
884
|
ce.install = (o) => {
|
|
885
885
|
o.component("McMarkdownCard", ce);
|
|
886
886
|
};
|