Files
StudyDiary/.obsidian/plugins/mp-publisher/main.js
T

3363 lines
878 KiB
JavaScript
Raw Normal View History

2026-07-23 20:36:13 +08:00
/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
var Ul=Object.create;var br=Object.defineProperty;var zl=Object.getOwnPropertyDescriptor;var Vl=Object.getOwnPropertyNames;var Wl=Object.getPrototypeOf,Kl=Object.prototype.hasOwnProperty;var N=(e,t)=>()=>(e&&(t=e(e=0)),t);var _=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Se=(e,t)=>{for(var u in t)br(e,u,{get:t[u],enumerable:!0})},Ho=(e,t,u,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Vl(t))!Kl.call(e,n)&&n!==u&&br(e,n,{get:()=>t[n],enumerable:!(r=zl(t,n))||r.enumerable});return e};var bt=(e,t,u)=>(u=e!=null?Ul(Wl(e)):{},Ho(t||!e||!e.__esModule?br(u,"default",{value:e,enumerable:!0}):u,e)),Fo=e=>Ho(br({},"__esModule",{value:!0}),e);var gr={};Se(gr,{CDATA:()=>fa,Comment:()=>sa,Directive:()=>ia,Doctype:()=>ma,ElementType:()=>V,Root:()=>ca,Script:()=>Aa,Style:()=>la,Tag:()=>da,Text:()=>oa,isTag:()=>aa});function aa(e){return e.type===V.Tag||e.type===V.Script||e.type===V.Style}var V,ca,oa,ia,sa,Aa,la,da,fa,ma,Zt=N(()=>{(function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"})(V||(V={}));ca=V.Root,oa=V.Text,ia=V.Directive,sa=V.Comment,Aa=V.Script,la=V.Style,da=V.Tag,fa=V.CDATA,ma=V.Doctype});function R(e){return aa(e)}function _t(e){return e.type===V.CDATA}function Ce(e){return e.type===V.Text}function Ht(e){return e.type===V.Comment}function Tr(e){return e.type===V.Directive}function Fe(e){return e.type===V.Root}function X(e){return Object.prototype.hasOwnProperty.call(e,"children")}function $t(e,t=!1){let u;if(Ce(e))u=new _e(e.data);else if(Ht(e))u=new Pt(e.data);else if(R(e)){let r=t?pa(e.children):[],n=new Mt(e.name,{...e.attribs},r);r.forEach(a=>a.parent=n),e.namespace!=null&&(n.namespace=e.namespace),e["x-attribsNamespace"]&&(n["x-attribsNamespace"]={...e["x-attribsNamespace"]}),e["x-attribsPrefix"]&&(n["x-attribsPrefix"]={...e["x-attribsPrefix"]}),u=n}else if(_t(e)){let r=t?pa(e.children):[],n=new Nu(r);r.forEach(a=>a.parent=n),u=n}else if(Fe(e)){let r=t?pa(e.children):[],n=new Pe(r);r.forEach(a=>a.parent=n),e["x-mode"]&&(n["x-mode"]=e["x-mode"]),u=n}else if(Tr(e)){let r=new Bt(e.name,e.data);e["x-name"]!=null&&(r["x-name"]=e["x-name"],r["x-publicId"]=e["x-publicId"],r["x-systemId"]=e["x-systemId"]),u=r}else throw new Error(`Not implemented yet: ${e.type}`);return u.startIndex=e.startIndex,u.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(u.sourceCodeLocation=e.sourceCodeLocation),u}function pa(e){let t=e.map(u=>$t(u,!0));for(let u=1;u<t.length;u++)t[u].prev=t[u-1],t[u-1].next=t[u];return t}var Er,Su,_e,Pt,Bt,Cu,Nu,Pe,Mt,ha=N(()=>{Zt();Er=class{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(t){this.parent=t}get previousSibling(){return this.prev}set previousSibling(t){this.prev=t}get nextSibling(){return this.next}set nextSibling(t){this.next=t}cloneNode(t=!1){return $t(this,t)}},Su=class extends Er{constructor(t){super(),this.data=t}get nodeValue(){return this.data}set nodeValue(t){this.data=t}},_e=class extends Su{constructor(){super(...arguments),this.type=V.Text}get nodeType(){return 3}},Pt=class extends Su{constructor(){super(...arguments),this.type=V.Comment}get nodeType(){return 8}},Bt=class extends Su{constructor(t,u){super(u),this.name=t,this.type=V.Directive}get nodeType(){return 1}},Cu=class extends Er{constructor(t){super(),this.children=t}get firstChild(){var t;return(t=this.children[0])!==null&&t!==void 0?t:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(t){this.children=t}},Nu=class extends Cu{constructor(){super(...arguments),this.type=V.CDATA}get nodeType(){return 4}},Pe=class extends Cu{constructor(){super(...arguments),this.type=V.Root}get nodeType(){return 9}},Mt=class extends Cu{constructor(t,u,r=[],n=t==="script"?V.Script:t==="style"?V.Style:V.Tag){super(r),this.name=t,this.attribs=u,this.type=n}get nodeType(){return 1}get tagName(){return this.name}set ta
`:Nr(e.children):_t(e)?Nr(e.children):Ce(e)?e.data:""}function at(e){return Array.isArray(e)?e.map(at).join(""):X(e)&&!Ht(e)?at(e.children):Ce(e)?e.data:""}function Du(e){return Array.isArray(e)?e.map(Du).join(""):X(e)&&(e.type===V.Tag||_t(e))?Du(e.children):Ce(e)?e.data:""}var ka=N(()=>{be();Da();Zt()});function tu(e){return X(e)?e.children:[]}function pi(e){return e.parent||null}function va(e){let t=pi(e);if(t!=null)return tu(t);let u=[e],{prev:r,next:n}=e;for(;r!=null;)u.unshift(r),{prev:r}=r;for(;n!=null;)u.push(n),{next:n}=n;return u}function Sd(e,t){var u;return(u=e.attribs)===null||u===void 0?void 0:u[t]}function Cd(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}function Nd(e){return e.name}function wr(e){let{next:t}=e;for(;t!==null&&!R(t);)({next:t}=t);return t}function Dr(e){let{prev:t}=e;for(;t!==null&&!R(t);)({prev:t}=t);return t}var hi=N(()=>{be()});function ct(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){let t=e.parent.children,u=t.lastIndexOf(e);u>=0&&t.splice(u,1)}e.next=null,e.prev=null,e.parent=null}function wd(e,t){let u=t.prev=e.prev;u&&(u.next=t);let r=t.next=e.next;r&&(r.prev=t);let n=t.parent=e.parent;if(n){let a=n.children;a[a.lastIndexOf(e)]=t,e.parent=null}}function Dd(e,t){if(ct(t),t.next=null,t.parent=e,e.children.push(t)>1){let u=e.children[e.children.length-2];u.next=t,t.prev=u}else t.prev=null}function kd(e,t){ct(t);let{parent:u}=e,r=e.next;if(t.next=r,t.prev=e,e.next=t,t.parent=u,r){if(r.prev=t,u){let n=u.children;n.splice(n.lastIndexOf(r),0,t)}}else u&&u.children.push(t)}function vd(e,t){if(ct(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){let u=e.children[1];u.prev=t,t.next=u}else t.next=null}function Ld(e,t){ct(t);let{parent:u}=e;if(u){let r=u.children;r.splice(r.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=u,t.prev=e.prev,t.next=e,e.prev=t}var bi=N(()=>{});function uu(e,t,u=!0,r=1/0){return kr(e,Array.isArray(t)?t:[t],u,r)}function kr(e,t,u,r){let n=[],a=[Array.isArray(t)?t:[t]],o=[0];for(;;){if(o[0]>=a[0].length){if(o.length===1)return n;a.shift(),o.shift();continue}let i=a[0][o[0]++];if(e(i)&&(n.push(i),--r<=0))return n;u&&X(i)&&i.children.length>0&&(o.unshift(0),a.unshift(i.children))}}function Rd(e,t){return t.find(e)}function vr(e,t,u=!0){let r=Array.isArray(t)?t:[t];for(let n=0;n<r.length;n++){let a=r[n];if(R(a)&&e(a))return a;if(u&&X(a)&&a.children.length>0){let o=vr(e,a.children,!0);if(o)return o}}return null}function gi(e,t){return(Array.isArray(t)?t:[t]).some(u=>R(u)&&e(u)||X(u)&&gi(e,u.children))}function Pd(e,t){let u=[],r=[Array.isArray(t)?t:[t]],n=[0];for(;;){if(n[0]>=r[0].length){if(r.length===1)return u;r.shift(),n.shift();continue}let a=r[0][n[0]++];R(a)&&e(a)&&u.push(a),X(a)&&a.children.length>0&&(n.unshift(0),r.unshift(a.children))}}var La=N(()=>{be()});function Ra(e,t){return typeof t=="function"?u=>R(u)&&t(u.attribs[e]):u=>R(u)&&u.attribs[e]===t}function Bd(e,t){return u=>e(u)||t(u)}function Ei(e){let t=Object.keys(e).map(u=>{let r=e[u];return Object.prototype.hasOwnProperty.call(Lr,u)?Lr[u](r):Ra(u,r)});return t.length===0?null:t.reduce(Bd)}function Md(e,t){let u=Ei(e);return u?u(t):!0}function Hd(e,t,u,r=1/0){let n=Ei(e);return n?uu(n,t,u,r):[]}function Fd(e,t,u=!0){return Array.isArray(t)||(t=[t]),vr(Ra("id",e),t,u)}function Ft(e,t,u=!0,r=1/0){return uu(Lr.tag_name(e),t,u,r)}function qd(e,t,u=!0,r=1/0){return uu(Ra("class",e),t,u,r)}function Ud(e,t,u=!0,r=1/0){return uu(Lr.tag_type(e),t,u,r)}var Lr,Pa=N(()=>{be();La();Lr={tag_name(e){return typeof e=="function"?t=>R(t)&&e(t.name):e==="*"?R:t=>R(t)&&t.name===e},tag_type(e){return typeof e=="function"?t=>e(t.type):t=>t.type===e},tag_contains(e){return typeof e=="function"?t=>Ce(t)&&e(t.data):t=>Ce(t)&&t.data===e}}});function zd(e){let t=e.length;for(;--t>=0;){let u=e[t];if(t>0&&e.lastIndexOf(u,t-1)>=0){e.splice(t,1);continue}for(let r=u.parent;r;r=r.parent)if(e.includes(r)){e.splice(t,1);break}}return e}function Ti(e,t){let u=[],r=[];if(e===t)return 0;let n=X(e)?e:e.parent;for(;n;)u.unshift(n),n=n.parent;for(n=X(t)?t:t.paren
:is(button, input, select, textarea, optgroup, option)[disabled],
optgroup[disabled] > option,
fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)
)`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"}});function $a(e,t){return e===ze.default.falseFunc?ze.default.falseFunc:u=>t.isTag(u)&&e(u)}function ec(e,t){let u=t.getSiblings(e);if(u.length<=1)return[];let r=u.indexOf(e);return r<0||r===u.length-1?[]:u.slice(r+1).filter(t.isTag)}function Za(e){return{xmlMode:!!e.xmlMode,lowerCaseAttributeNames:!!e.lowerCaseAttributeNames,lowerCaseTags:!!e.lowerCaseTags,quirksMode:!!e.quirksMode,cacheResults:!!e.cacheResults,pseudos:e.pseudos,adapter:e.adapter,equals:e.equals}}var ze,_a,Ja,Fr,qr=N(()=>{ze=bt(xt(),1);ja();_a={};Ja=(e,t,u,r,n)=>{let a=n(t,Za(u),r);return a===ze.default.trueFunc?e:a===ze.default.falseFunc?ze.default.falseFunc:o=>a(o)&&e(o)},Fr={is:Ja,matches:Ja,where:Ja,not(e,t,u,r,n){let a=n(t,Za(u),r);return a===ze.default.falseFunc?e:a===ze.default.trueFunc?ze.default.falseFunc:o=>!a(o)&&e(o)},has(e,t,u,r,n){let{adapter:a}=u,o=Za(u);o.relativeSelector=!0;let i=t.some(l=>l.some(Mu))?[_a]:void 0,s=n(t,o,i);if(s===ze.default.falseFunc)return ze.default.falseFunc;let A=$a(s,a);if(i&&s!==ze.default.trueFunc){let{shouldTestNextSiblings:l=!1}=s;return b=>{if(!e(b))return!1;i[0]=b;let g=a.getChildren(b),m=l?[...g,...ec(b,a)]:g;return a.existsOne(A,m)}}return l=>e(l)&&a.existsOne(A,a.getChildren(l))}}});function ts(e,t,u,r,n){var a;let{name:o,data:i}=t;if(Array.isArray(i)){if(!(o in Fr))throw new Error(`Unknown pseudo-class :${o}(${i})`);return Fr[o](e,i,u,r,n)}let s=(a=u.pseudos)===null||a===void 0?void 0:a[o],A=typeof s=="string"?s:Hr[o];if(typeof A=="string"){if(i!=null)throw new Error(`Pseudo ${o} doesn't have any arguments`);let l=it(A);return Fr.is(e,l,u,r,n)}if(typeof s=="function")return Qa(s,o,i,1),l=>s(l,i)&&e(l);if(o in iu)return iu[o](e,i,u,r);if(o in Fu){let l=Fu[o];return Qa(l,o,i,2),b=>l(b,u,i)&&e(b)}throw new Error(`Unknown pseudo-class :${o}`)}var tc=N(()=>{cu();_i();$i();es();qr()});function uc(e,t){let u=t.getParent(e);return u&&t.isTag(u)?u:null}function us(e,t,u,r,n){let{adapter:a,equals:o}=u;switch(t.type){case P.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case P.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case P.Attribute:{if(t.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!u.xmlMode||u.lowerCaseAttributeNames)&&(t.name=t.name.toLowerCase()),Ki[t.action](e,t,u)}case P.Pseudo:return ts(e,t,u,r,n);case P.Tag:{if(t.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:i}=t;return(!u.xmlMode||u.lowerCaseTags)&&(i=i.toLowerCase()),function(A){return a.getName(A)===i&&e(A)}}case P.Descendant:{if(u.cacheResults===!1||typeof WeakSet=="undefined")return function(A){let l=A;for(;l=uc(l,a);)if(e(l))return!0;return!1};let i=new WeakSet;return function(A){let l=A;for(;l=uc(l,a);)if(!i.has(l)){if(a.isTag(l)&&e(l))return!0;i.add(l)}return!1}}case"_flexibleDescendant":return function(s){let A=s;do if(e(A))return!0;while(A=uc(A,a));return!1};case P.Parent:return function(s){return a.getChildren(s).some(A=>a.isTag(A)&&e(A))};case P.Child:return function(s){let A=a.getParent(s);return A!=null&&a.isTag(A)&&e(A)};case P.Sibling:return function(s){let A=a.getSiblings(s);for(let l=0;l<A.length;l++){let b=A[l];if(o(s,b))break;if(a.isTag(b)&&e(b))return!0}return!1};case P.Adjacent:return a.prevElementSibling?function(s){let A=a.prevElementSibling(s);return A!=null&&e(A)}:functi
`)})):{name:n,value:a.replace(Ns,`\r
`)}}).toArray()}var Cs,P1,Ns,ws=N(()=>{be();Cs="input,select,textarea,keygen",P1=/%20/g,Ns=/\r?\n/g});var xc={};Se(xc,{extract:()=>F1});function H1(e){var t;return typeof e=="string"?{selector:e,value:"textContent"}:{selector:e.selector,value:(t=e.value)!==null&&t!==void 0?t:"textContent"}}function F1(e){let t={};for(let u in e){let r=e[u],n=Array.isArray(r),{selector:a,value:o}=H1(n?r[0]:r),i=typeof o=="function"?o:typeof o=="string"?s=>this._make(s).prop(o):s=>this._make(s).extract(o);if(n)t[u]=this._findBySelector(a,Number.POSITIVE_INFINITY).map((s,A)=>i(A,u,t)).get();else{let s=this._findBySelector(a,1);t[u]=s.length>0?i(s[0],u,t):void 0}}return t}var Ds=N(()=>{});var Ot,ks=N(()=>{Bi();gs();ys();Ss();ws();Ds();Ot=class{constructor(t,u,r){if(this.length=0,this.options=r,this._root=u,t){for(let n=0;n<t.length;n++)this[n]=t[n];this.length=t.length}}};Ot.prototype.cheerio="[cheerio object]";Ot.prototype.splice=Array.prototype.splice;Ot.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator];Object.assign(Ot.prototype,Va,hc,gc,Ec,Tc,xc)});function vs(e,t){return function u(r,n,a=!0){if(r==null)throw new Error("cheerio.load() expects a string");let o=ku(n),i=e(r,o,a,null);class s extends Ot{_make(b,g){let m=A(b,g);return m.prevObject=this,m}_parse(b,g,m,p){return e(b,g,m,p)}_render(b){return t(b,this.options)}}function A(l,b,g=i,m){if(l&&Ue(l))return l;let p=ku(m,o),E=typeof g=="string"?[e(g,p,!1,null)]:"length"in g?g:[g],I=Ue(E)?E:new s(E,null,p);if(I._root=I,!l)return new s(void 0,I,p);let w=typeof l=="string"&&Lu(l)?e(l,p,!1,null).children:q1(l)?[l]:Array.isArray(l)?l:void 0,D=new s(w,I,p);if(w)return D;if(typeof l!="string")throw new TypeError("Unexpected type of selector");let O=l,k=b?typeof b=="string"?Lu(b)?new s([e(b,p,!1,null)],I,p):(O=`${b} ${O}`,I):Ue(b)?b:new s(Array.isArray(b)?b:[b],I,p):I;return k?k.find(O):D}return Object.assign(A,Fa,{load:u,_root:i,_options:o,fn:s.prototype,prototype:s.prototype}),A}}function q1(e){return!!e.name||e.type==="root"||e.type==="text"||e.type==="comment"}var Ls=N(()=>{Ma();ru();ks();nu()});function Xr(e){return e>=55296&&e<=57343}function Rs(e){return e>=56320&&e<=57343}function Ps(e,t){return(e-55296)*1024+9216+t}function Yr(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Qr(e){return e>=64976&&e<=65007||U1.has(e)}var U1,$,d,Oe,Jr=N(()=>{U1=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),$="\uFFFD";(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(d||(d={}));Oe={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"}});var x,zu=N(()=>{(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidus
`)}});var $c=_((_0,$0)=>{var J0=!1,Z0=!1,_c=Tn()("lex");_0=$0.exports=Nh;function Nh(e){var t,u="",r,n=0,a=-1,o=0,i=1,s="before-selector",A=[s],l={},b=[],g=["media","keyframes",{name:"-webkit-keyframes",type:"keyframes",prefix:"-webkit-"},{name:"-moz-keyframes",type:"keyframes",prefix:"-moz-"},{name:"-ms-keyframes",type:"keyframes",prefix:"-ms-"},{name:"-o-keyframes",type:"keyframes",prefix:"-o-"},"font-face",{name:"import",state:"before-at-value"},{name:"charset",state:"before-at-value"},"supports","viewport",{name:"namespace",state:"before-at-value"},"document",{name:"-moz-document",type:"document",prefix:"-moz-"},"page"];function m(){return F(),e[a]}function p(B){return B?A[A.length-1-B]:s}function E(B){var q=a+1;return B===e.slice(q,q+B.length)}function I(B){var q=e.slice(a).indexOf(B);return q>0?q:!1}function w(B){return B===D(1)}function D(B){return e[a+(B||1)]}function O(){var B=A.pop();return s=A[A.length-1],B}function k(B){return s=B,A.push(s),A.length}function L(B){var q=s;return A[A.length-1]=s=B,q}function F(B){if((B||1)==1)e[a]==`
`?(i++,n=1):n++,a++;else{var q=e.slice(a,a+B).split(`
`);q.length>1&&(i+=q.length-1,n=1),n+=q[q.length-1].length,a=a+B}}function U(){l.end={line:i,col:n},J0&&_c("addToken:",JSON.stringify(l,null,2)),b.push(l),u="",l={}}function j(B){l={type:B,start:{line:i,col:n}}}for(Z0&&(t=Date.now());r=m();)switch(J0&&_c(r,p()),r){case" ":switch(p()){case"selector":case"value":case"value-paren":case"at-group":case"at-value":case"comment":case"double-string":case"single-string":u+=r;break}break;case`
`:case" ":case"\r":case"\f":switch(p()){case"value":case"value-paren":case"at-group":case"comment":case"single-string":case"double-string":case"selector":u+=r;break;case"at-value":r===`
`&&(l.value=u.trim(),U(),O());break}break;case":":switch(p()){case"name":l.name=u.trim(),u="",L("before-value");break;case"before-selector":u+=r,j("selector"),k("selector");break;case"before-value":L("value"),u+=r;break;default:u+=r;break}break;case";":switch(p()){case"name":case"before-value":case"value":u.trim().length>0&&(l.value=u.trim(),U()),L("before-name");break;case"value-paren":u+=r;break;case"at-value":l.value=u.trim(),U(),O();break;case"before-name":break;default:u+=r;break}break;case"{":switch(p()){case"selector":if(D(-1)==="\\"){u+=r;break}l.text=u.trim(),U(),L("before-name"),o=o+1;break;case"at-group":switch(l.name=u.trim(),l.type){case"font-face":case"viewport":case"page":k("before-name");break;default:k("before-selector")}U(),o=o+1;break;case"name":case"at-rule":l.name=u.trim(),U(),k("before-name"),o=o+1;break;case"comment":case"double-string":case"single-string":u+=r;break;case"before-value":L("value"),u+=r;break}break;case"}":switch(p()){case"before-name":case"name":case"before-value":case"value":u&&(l.value=u.trim()),l.name&&l.value&&U(),j("end"),U(),O(),p()==="at-group"&&(j("at-group-end"),U(),O()),o>0&&(o=o-1);break;case"at-group":case"before-selector":case"selector":if(D(-1)==="\\"){u+=r;break}o>0&&p(1)==="at-group"&&(j("at-group-end"),U()),o>1&&O(),o>0&&(o=o-1);break;case"double-string":case"single-string":case"comment":u+=r;break}break;case'"':case"'":switch(p()){case"double-string":r==='"'&&D(-1)!=="\\"&&O();break;case"single-string":r==="'"&&D(-1)!=="\\"&&O();break;case"before-at-value":L("at-value"),k(r==='"'?"double-string":"single-string");break;case"before-value":L("value"),k(r==='"'?"double-string":"single-string");break;case"comment":break;default:D(-1)!=="\\"&&k(r==='"'?"double-string":"single-string")}u+=r;break;case"/":switch(p()){case"comment":case"double-string":case"single-string":u+=r;break;case"before-value":case"selector":case"name":case"value":if(w("*")){var oe=I("*/");oe&&F(oe+1)}else p()=="before-value"&&L("value"),u+=r;break;default:w("*")?(j("comment"),k("comment"),F()):u+=r;break}break;case"*":switch(p()){case"comment":w("/")?(l.text=u,F(),U(),O()):u+=r;break;case"before-selector":u+=r,j("selector"),k("selector");break;case"before-value":L("value"),u+=r;break;default:u+=r}break;case"@":switch(p()){case"comment":case"double-string":case"single-string":u+=r;break;case"before-value":L("value"),u+=r;break;default:for(var Ke=!1,ve,re,v=0,K=g.length;!Ke&&v<K;++v)re=g[v],ve=re.name||re,E(ve)&&(Ke=!0,j(ve),k(re.state||"at-group"),F(ve.length),re.prefix&&(l.prefix=re.prefix),re.type&&(l.type=re.type));Ke||(u+=r);break}break;case"(":switch(p()){case"value":k("value-paren");break;case"before-value":L("value");break}u+=r;break;case")":switch(p()){case"value-paren":O();break;case"before-value":L("value");break}u+=r;break;default:switch(p()){case"before-selector":j("selector"),k("selector");break;case"before-name":j("property"),L("name");break;case"before-value":L("value");break;case"before-at-value":L("at-value");break}u+=r;break}return Z0&&_c("ran in",Date.now()-t+"ms"),b}});var sA=_((oA,iA)=>{var to=!1,eA=!1,xn=Tn()("parse"),wh=$c();oA=iA.exports=Dh;var uA,bu,rA,uo;function Dh(e,t){var u;t||(t={}),uA=!!t.comments,rA=!!t.position,bu=0,uo=Array.isArray(e)?e.slice():wh(e);var r,n=[],a;for(eA&&(u=Date.now());a=nA();)r=aA(a),r&&n.push(r);return eA&&xn("ran in",Date.now()-u+"ms"),{type:"stylesheet",stylesheet:{rules:n}}}function Kt(e,t){t||(t={});for(var u,r=["type","name","value"],n={},a=0;a<r.length;++a)u=r[a],e[u]&&(n[u]=t[u]||e[u]);for(r=Object.keys(t),a=0;a<r.length;++a)u=r[a],n[u]||(n[u]=t[u]);return rA&&(n.position={start:e.start,end:e.end}),to&&xn("astNode:",JSON.stringify(n,null,2)),n}function nA(){var e=uo.shift();return to&&xn("next:",JSON.stringify(e,null,2)),e}function tA(e){bu=bu+1;var t={};switch(e.type){case"font-face":case"viewport":t.declarations=eo();break;case"page":t.prefix=e.prefix,t.declarations=eo();break;default:t.prefix=e.prefix,t.rules=Mh()}return Kt(e,t)}function kh(e){return Kt(e)}function vh(e){return Kt(e)}function Lh(e){return Kt(e,{text:e.text})}function Rh(
`,nr=" "),AA&&(u=Date.now());var r=bA(e.stylesheet.rules,zh).join(`
`).trim();return AA&&ao("ran in",Date.now()-u+"ms"),r}function ar(e){if(e){no+=e;return}return ro?"":Array(no).join(mA||"")}function Fh(e){return"@"+e.type+" "+e.value+";"+tt}function lA(e){var t="",u=e.prefix||"";e.name&&(t=" "+e.name);var r=e.type!=="page";return"@"+u+e.type+t+nr+gA(e,r)+tt}function pA(e){return fA?"/*"+(e.text||"")+"*/"+tt:""}function hA(e){var t;return e.selectors?t=e.selectors.join(","+tt):(t="@"+e.type,t+=e.name?" "+e.name:""),ar()+t+nr+gA(e)+tt}function bA(e,t){return e.reduce(function(u,r){var n=r.type==="comment"?pA(r):t(r);return n&&u.push(n),u},[])}function gA(e,t){var u=e.declarations,r=Uh;return e.rules&&(u=e.rules,r=hA),u=qh(u,r),u&&(u=tt+u+(t?"":tt)),"{"+u+ar()+"}"}function qh(e,t){if(!e)return"";ar(1);var u=bA(e,t);return ar(-1),u.length?u.join(tt):""}function Uh(e){if(e.type==="property")return Vh(e);dA&&ao("stringifyDeclaration: unexpected node:",JSON.stringify(e))}function zh(e){switch(e.type){case"rule":return hA(e);case"media":case"keyframes":return lA(e);case"comment":return pA(e);case"import":case"charset":case"namespace":return Fh(e);case"font-face":case"supports":case"viewport":case"document":case"page":return lA(e)}dA&&ao("stringifyNode: unexpected node: "+JSON.stringify(e))}function Vh(e){var t=e.name?e.name+":"+nr:"";return ar()+t+e.value+";"}});var IA=_((E4,yA)=>{yA.exports={lex:$c(),parse:sA(),stringify:xA()}});var DA=_((T4,wA)=>{"use strict";var Wh=/([-.*+?^${}()|[\]\/\\])/g,Kh=/\\/g,jt=function(e){return(e+"").replace(Wh,"\\$1")},Gt=function(e){return(e+"").replace(Kh,"")},Gh=RegExp(`^(?:\\s*(,)\\s*|\\s*(<combinator>+)\\s*|(\\s+)|(<unicode>+|\\*)|\\#(<unicode>+)|\\.(<unicode>+)|\\[\\s*(<unicode1>+)(?:\\s*([*^$!~|]?=)(?:\\s*(?:(["']?)(.*?)\\9)))?\\s*\\](?!\\])|(:+)(<unicode>+)(?:\\((?:(?:(["'])([^\\13]*)\\13)|((?:\\([^)]+\\)|[^()]*)+))\\))?)`.replace(/<combinator>/,"["+jt(">+~`!@$%^&={}\\;</")+"]").replace(/<unicode>/g,"(?:[\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])").replace(/<unicode1>/g,"(?:[:\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])")),SA=function(t){this.combinator=t||" ",this.tag="*"};SA.prototype.toString=function(){if(!this.raw){var e="",t,u;if(e+=this.tag||"*",this.id&&(e+="#"+this.id),this.classes&&(e+="."+this.classList.join(".")),this.attributes)for(t=0;u=this.attributes[t++];)e+="["+u.name+(u.operator?u.operator+'"'+u.value+'"':"")+"]";if(this.pseudos)for(t=0;u=this.pseudos[t++];)e+=":"+u.name,u.value&&(e+="("+u.value+")");this.raw=e}return this.raw};var CA=function(){this.length=0};CA.prototype.toString=function(){if(!this.raw){for(var e="",t=0,u;u=this[t++];)t!==1&&(e+=" "),u.combinator!==" "&&(e+=u.combinator+" "),e+=u;this.raw=e}return this.raw};var jh=function(e,t,u,r,n,a,o,i,s,A,l,b,g,m,p,E){var I,w;if((t||!this.length)&&(I=this[this.length++]=new CA,t))return"";if(I||(I=this[this.length-1]),(u||r||!I.length)&&(w=I[I.length++]=new SA(u)),w||(w=I[I.length-1]),n)w.tag=Gt(n);else if(a)w.id=Gt(a);else if(o){var D=Gt(o),O=w.classes||(w.classes={});if(!O[D]){O[D]=jt(o);var k=w.classList||(w.classList=[]);k.push(D),k.sort()}}else g?(E=E||p,(w.pseudos||(w.pseudos=[])).push({type:b.length==1?"class":"element",name:Gt(g),escapedName:jt(g),value:E?Gt(E):null,escapedValue:E?jt(E):null})):i&&(l=l?jt(l):null,(w.attributes||(w.attributes=[])).push({operator:s,name:Gt(i),escapedName:jt(i),value:l?Gt(l):null,escapedValue:l?jt(l):null}));return""},NA=function(t){this.length=0;for(var u=this,r=t,n;t;){if(n=t.replace(Gh,function(){return jh.apply(u,arguments)}),n===t)throw new Error(r+" is an invalid expression");t=n}};NA.prototype.toString=function(){if(!this.raw){for(var e=[],t=0,u;u=this[t++];)e.push(u);this.raw=e.join(", ")}return this.raw};var OA={},Xh=function(e){return e==null?null:(e=(""+e).replace(/^\s+|\s+$/g,""),OA[e]||(OA[e]=new NA(e)))};wA.exports=Xh});var RA=_((vA,LA)=>{"use strict";var Yh=DA();LA.exports=vA=co;function co(e,t){this.text=e,this.spec=void 0,this.styleAttribute=t||!1}co.prototype.parsed=function(){return this.tokens||(this.tokens=kA(this.text)),this.tokens};co.prototype.specificity=function(){var e=this.styleAttribute;return this.spec||(this.spec=t(thi
`&&i!==" ")&&(n+=i))}return n.length&&r.push(n),r};Ie.parseCSS=function(e){var t=Xt.parse(e,{position:!0,comments:!0}),u=typeof t.stylesheet!="undefined"&&t.stylesheet.rules?t.stylesheet.rules:[],r=[],n=!1,a=!1;if(u.length>0&&u[0].type==="comment"&&u[0].text){var o=u[0].text.trim();o==="juice ignore"&&(a=!0)}if(a)return r;for(var i=0,s=u.length;i<s;i++){if(u[i].type==="comment"){if(!u[i].text)continue;var A=u[i].text.trim();A==="juice start ignore"?n=!0:A==="juice end ignore"?n=!1:A==="juice ignore next"&&i++;continue}if(!n&&u[i].type=="rule"){var l=u[i],b=l.selectors,g=[];if(l.declarations)for(var m=!1,p=0;p<l.declarations.length;p++){var E=l.declarations[p];if(E.type==="comment"&&E.text){var I=E.text.trim();if(I==="juice ignore next"){m=!0;continue}}if(m&&E.type==="property"){m=!1;continue}E.type==="property"&&g.push(E)}if(g.length>0)for(var w=0,D=b.length;w<D;w++)r.push([b[w],g])}}return r};Ie.getPreservedText=function(e,t,u){var r=Xt.parse(e,{position:!0,comments:!0}),n=typeof r.stylesheet!="undefined"&&r.stylesheet.rules?r.stylesheet.rules:[],a=[],o=null,i=!1,s=[],A=!1,l=new Set;if(n.length>0&&n[0].type==="comment"&&n[0].text){var b=n[0].text.trim();b==="juice ignore"&&(A=!0)}if(A)return`
`+e+`
`;for(var g=0;g<n.length;g++){if(n[g].type==="comment"&&n[g].text){var m=n[g].text.trim();m==="juice ignore next"&&g+1<n.length&&l.add(g+1)}if(n[g].type==="rule"&&n[g].declarations){for(var p=0;p<n[g].declarations.length;p++)if(n[g].declarations[p].type==="comment"&&n[g].declarations[p].text){var E=n[g].declarations[p].text.trim();if(E==="juice ignore next"){l.add(g);break}}}}for(var g=n.length-1;g>=0;g--){var I=n[g];if(I.type==="comment"){if(!I.text)continue;var m=I.text.trim();m==="juice end ignore"?(i=!0,s.push(I)):m==="juice start ignore"&&(i=!1,s.push(I),s.length>0&&(a.unshift(Xt.stringify({stylesheet:{rules:s.reverse()}},{comments:!0,indentation:" "})),s=[]));continue}if(i){s.push(I);continue}if(l.has(g)){a.unshift(Xt.stringify({stylesheet:{rules:[I]}},{comments:!0,indentation:" "}));continue}(t.fontFaces&&I.type==="font-face"||t.mediaQueries&&I.type==="media"||t.keyFrames&&I.type==="keyframes"||t.pseudos&&I.selectors&&this.matchesPseudo(I.selectors[0],u)||t.preservedSelectors&&I.selectors&&I.selectors.some(function(D){return Ie.matchesPreservedSelector(D,t.preservedSelectors)}))&&a.unshift(Xt.stringify({stylesheet:{rules:[I]}},{comments:!1,indentation:" "})),o=I.position.start}return a.length===0?!1:`
`+a.join(`
`)+`
`};Ie.normalizeLineEndings=function(e){return e.replace(/\r\n/g,`
`).replace(/\n/g,`\r
`)};Ie.matchesPseudo=function(e,t){return t.find(function(u){return e.indexOf(":"+u)>-1})};Ie.matchesPreservedSelector=function(e,t){if(!t||t.length===0)return!1;for(var u=0;u<t.length;u++){var r=t[u];if(e===r||e.indexOf(r)!==-1)return!0}return!1};Ie.removeInlinedSelectorsFromCSS=function(e,t,u,r){for(var n=Xt.parse(e,{position:!0,comments:!0}),a=typeof n.stylesheet!="undefined"&&n.stylesheet.rules?n.stylesheet.rules:[],o=[],i=0;i<a.length;i++){var s=a[i];if(s.type!=="rule"){o.push(s);continue}if(s.selectors&&u.preservePseudos&&this.matchesPseudo(s.selectors[0],r)){o.push(s);continue}if(s.selectors&&u.preservedSelectors&&s.selectors.some(function(b){return Ie.matchesPreservedSelector(b,u.preservedSelectors)})){o.push(s);continue}var A=s.selectors.filter(function(b){return!t.has(b)});if(A.length>0){var l=Object.assign({},s,{selectors:A});o.push(l)}}return o.length===0?"":Xt.stringify({stylesheet:{rules:o}},{comments:!1,indentation:" "})};Ie.compareFunc=function(e,t){for(var u=Math.min(e.length,t.length),r=0;r<u;r++)if(e[r]!==t[r])return e[r]>t[r]?1:-1;return e.length-t.length};Ie.compare=function(e,t){return Ie.compareFunc(e,t)==1?e:t};Ie.getDefaultOptions=function(e){var t=Object.assign({extraCss:"",insertPreservedExtraCss:!0,applyStyleTags:!0,removeStyleTags:!0,removeInlinedSelectors:!1,preserveMediaQueries:!0,preserveFontFaces:!0,preserveKeyFrames:!0,preservePseudos:!0,preservedSelectors:[],applyWidthAttributes:!0,applyHeightAttributes:!0,applyAttributesTableElements:!0,resolveCSSVariables:!0,inlineDuplicateProperties:!1,url:""},e);return t.webResources=t.webResources||{},t}});var HA=_((I4,On)=>{"use strict";var _h=(X0(),Fo(j0)),y4=In(),$h=function(e,t,u){let{xmlMode:r,...n}=t;return t=Object.assign({xml:{decodeEntities:!1,xmlMode:r}},n),e=u(e),_h.load(e,t)},eb=function(){var e=[],t=function(r){var n=On.exports.codeBlocks;return Object.keys(n).forEach(function(a){var o=new RegExp(n[a].start+"([\\S\\s]*?)"+n[a].end,"g");r=r.replace(o,function(i,s){return e.push(i),"JUICE_CODE_BLOCK_"+(e.length-1)+"_"})}),r},u=function(r){for(var n=0;n<e.length;n++){var a=new RegExp("JUICE_CODE_BLOCK_"+n+'_(="")?',"gi");r=r.replace(a,function(){return e[n]})}return r};return{encodeEntities:t,decodeEntities:u}};On.exports=function(e,t,u,r){var n=eb(),a=$h(e,t,n.encodeEntities),o=[a];o.push.apply(o,r);var i=u.apply(void 0,o)||a;return t&&t.xmlMode?n.decodeEntities(i.xml()):n.decodeEntities(i.html())};On.exports.codeBlocks={EJS:{start:"<%",end:"%>"},HBS:{start:"{{",end:"}}"}}});var io=_(Yt=>{"use strict";var oo;Object.defineProperty(Yt,"__esModule",{value:!0});Yt.fromCodePoint=void 0;Yt.replaceCodePoint=FA;Yt.decodeCodePoint=ub;var tb=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);Yt.fromCodePoint=(oo=String.fromCodePoint)!==null&&oo!==void 0?oo:e=>{let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function FA(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=tb.get(e))!==null&&t!==void 0?t:e}function ub(e){return(0,Yt.fromCodePoint)(FA(e))}});var Ao=_(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.decodeBase64=rb;function rb(e){let t=typeof atob=="function"?atob(e):typeof Buffer.from=="function"?Buffer.from(e,"base64").toString("binary"):new Buffer(e,"base64").toString("binary"),u=t.length&-2,r=new Uint16Array(u/2);for(let n=0,a=0;n<u;n+=2){let o=t.charCodeAt(n),i=t.charCodeAt(n+1);r[a++]=o|i<<8}return r}});var lo=_(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.htmlDecodeTree=void 0;var nb=Ao();Sn.htmlDecodeTree=(0,nb.decodeBase64)("QR08ALkAAgH6AYsDNQR2BO0EPgXZBQEGLAbdBxMISQrvCmQLfQurDKQNLw4fD4YPpA+6D/IPAAAAAAAAAAAAAAAAKhBMEY8TmxUWF2EYLBkxGuAa3RsJHDscWR8YIC8jSCSIJcMl6ie3Ku8rEC0CLjoupS7kLgAIRU1hYmNmZ2xtbm9wcnN0dVQAWgBeAGUAaQBzAHcAfgCBAIQAhwCSAJoAoACsALMAbABpA
`+p.extraCss;var w=u(m,I,p);return w&&!p.removeStyleTags&&l(m,w,p,E),m}function l(m,p,E,I){var w=m("style");w.each(function(){var D=this,O=D.childNodes;if(O.length===1&&!(I&&I.has(D))){var k=O[0].nodeValue,L=mt.removeInlinedSelectorsFromCSS(k,p,E,t.ignoredPseudos);L&&L.trim()?D.childNodes[0].nodeValue=L:m(D).remove()}})}function b(m,p){var E=[],I=m("style"),w,D,O;return I.each(function(){if(O=this,w=O.childNodes,w.length!==1){p.removeStyleTags&&m(O).remove();return}if(D=w[0].data,p.applyStyleTags&&m(O).attr("data-embed")===void 0&&E.push(D),p.removeStyleTags&&m(O).attr("data-embed")===void 0){var k=O.childNodes[0].nodeValue,L=mt.getPreservedText(k,{mediaQueries:p.preserveMediaQueries,fontFaces:p.preserveFontFaces,keyFrames:p.preserveKeyFrames,pseudos:p.preservePseudos,preservedSelectors:p.preservedSelectors},t.ignoredPseudos);L?O.childNodes[0].nodeValue=L:m(O).remove()}m(O).removeAttr("data-embed")}),E}function g(m,p){var E=b(m,p),I=E.join(`
`);return I}return t}});var il=_((F4,ol)=>{"use strict";var Io=HA(),kb=cl(),ir=kb(function(e,t){return Io(e,{xmlMode:t&&t.xmlMode},vb,[t])}),vb=function(e,t){return ir.juiceDocument(e,t)};ir.inlineContent=function(e,t,u){return Io(e,{xmlMode:u&&u.xmlMode},ir.inlineDocument,[t,u])};ir.codeBlocks=Io.codeBlocks;ol.exports=ir});var $b={};Se($b,{default:()=>$n});module.exports=Fo($b);var Jt=require("obsidian");var De=require("obsidian");var gu=require("obsidian");function qo(e){try{e.querySelectorAll(".internal-link").forEach(a=>{var s;let o=a.textContent||"",i=activeDocument.createTextNode(o);(s=a.parentNode)==null||s.replaceChild(i,a)}),[".copy-code-button",".clickable-icon",".markdown-embed-link",".collapse-indicator",".file-embed-link",".popover",".tooltip"].forEach(a=>{e.querySelectorAll(a).forEach(i=>{let s=i.tagName.toLowerCase()==="svg",A=i.querySelector("svg")!==null,l=i.closest(".mermaid, .plantuml, pre.mermaid, pre.plantuml")!==null;!s&&!A&&!l&&i.remove()})}),e.querySelectorAll("pre").forEach(a=>{let o=a.classList.contains("mermaid")||a.classList.contains("plantuml"),i=a.querySelector(".mermaid")!==null||a.querySelector(".plantuml")!==null||a.querySelector('[class*="mermaid"]')!==null,s=a.getElementsByTagName("svg").length>0,A=o||i||s;a.querySelectorAll("button").forEach(b=>b.remove()),A||Array.from(a.children).forEach(g=>{g.tagName.toLowerCase()!=="code"&&(g.getElementsByTagName("svg").length>0||g.remove())})}),e.querySelectorAll('input[type="checkbox"].task-list-item-checkbox').forEach(a=>{var s;let o=a.checked,i=activeDocument.createTextNode(o?"[x] ":"[ ] ");(s=a.parentNode)==null||s.insertBefore(i,a),a.remove()})}catch(t){console.error("\u6E05\u7406HTML\u5185\u5BB9\u65F6\u51FA\u9519:",t)}}var Uo=require("obsidian");function zo(e){let t=e,u=new Map,r=0;return t=t.replace(/```[\s\S]*?```|`[^`\n]+?`/g,n=>{let a=`__CODE_BLOCK_${r++}__`;return u.set(a,n),a}),t=t.replace(/\\\[([\s\S]+?)\\\]/g,(n,a)=>`$$${a}$$`),t=t.replace(/\\\(([^\n]+?)\\\)/g,(n,a)=>`$${a}$`),u.forEach((n,a)=>{t=t.replace(a,()=>n)}),t}async function Vo(e,t=3e3){let u=e.querySelector(".math, .math-inline, .math-block, mjx-container"),r=e.querySelector('.mermaid, pre.mermaid, [class*="mermaid"]');if(!u&&!r)return;let n=Date.now();for(;Date.now()-n<t;){let a=!0,o=!0;if(u){let i=e.querySelectorAll("mjx-container");i.length>0?a=Array.from(i).some(s=>s.innerHTML.length>50):a=!1}if(r){let i=e.querySelectorAll('.mermaid, pre.mermaid, [class*="mermaid"]');o=Array.from(i).every(s=>s.querySelector("svg")!==null)}if(a&&o)return;await new Promise(i=>window.setTimeout(i,100))}}async function Wo(e,t){if(!t)return e;let u=Gl(t);if(u.length===0)return e;let n=new DOMParser().parseFromString(e,"text/html"),a=Array.from(n.querySelectorAll("mjx-container")).filter(o=>{var i;return!((i=o.parentElement)!=null&&i.closest("mjx-container"))});for(let o=0;o<Math.min(a.length,u.length);o++){let i=a[o],s=u[o];try{let A=jl(s.tex,s.isBlock);if(A){let l=n.createElement("span");l.appendChild((0,Uo.sanitizeHTMLToDom)(A)),i.replaceWith(l.firstChild)}}catch(A){console.error("[Math] \u8F6C\u6362\u5931\u8D25:",A)}}return n.body.innerHTML}function Gl(e){let t=[],u=e.replace(/```[\s\S]*?```|`[^`\n]*?`/g,o=>" ".repeat(o.length)),r,n=/$$([\s\S]+?)$$/g;for(;(r=n.exec(u))!==null;)t.push({tex:r[1].trim(),isBlock:!0,pos:r.index});let a=/(?<!$)$((?:[^$\n\\]|\\.)+?)$(?!$)/g;for(;(r=a.exec(u))!==null;)t.push({tex:r[1].trim(),isBlock:!1,pos:r.index});return t.sort((o,i)=>o.pos-i.pos)}function jl(e,t){try{let r=`https://latex.codecogs.com/png.latex?\\dpi{200}${encodeURIComponent(e)}`,n=t?"display:block;margin:1em auto;max-width:100%;border-radius:0;":"vertical-align:-2px;display:inline;height:18px;max-height:20px;margin:0;padding:0;border-radius:0;";return`<img src="${r}" alt="${Xl(e)}" style="${n}">`}catch(u){return console.error("[Math] API \u6E32\u67D3\u5931\u8D25:",u),null}}function Xl(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function Yl(e){let t=[],u=e.replace(/\/\*[\s\S]*?\*\//g,""),r=na(u);for(let n of r){let a=n.indexOf("{");if(a===
`))continue;let g=b.split(`
`),m=activeDocument.createDocumentFragment();g.forEach((p,E)=>{E>0&&m.appendChild(activeDocument.createTextNode(`
`)),p.length>0&&m.appendChild(activeDocument.createTextNode(p))}),(s=l.parentNode)==null||s.replaceChild(m,l)}let n=Array.from(u.childNodes),a=[[]];for(let l of n)l.nodeType===Node.TEXT_NODE&&l.textContent===`
`?a.push([]):a[a.length-1].push(l);let o=a.filter(l=>l.length>0);if(o.length<=1)return;let i=[];for(let l of o){let b=0;for(let p of l)if(p.nodeType===Node.TEXT_NODE){let E=p.textContent||"";for(let I of E)if(I===t)b++;else break;if(b>0&&E.length===b)continue;break}else if(p.nodeType===Node.ELEMENT_NODE){let E=p.textContent||"";for(let I of E)if(I===t)b++;else break;break}else break;let g=0;for(let p of l){if(g>=b)break;if(p.nodeType===Node.TEXT_NODE){let E=p.textContent||"",I=b-g,w=E.length<=I?E.length:I;w===E.length?(p.textContent="",g+=E.length):(p.textContent=E.slice(w),g+=w)}else if(p.nodeType===Node.ELEMENT_NODE){let I=p.childNodes[0];if(I&&I.nodeType===Node.TEXT_NODE){let w=I.textContent||"",D=b-g,O=w.length<=D?w.length:D;O===w.length?I.textContent="":I.textContent=w.slice(O),g+=O}break}else break}let m=activeDocument.createElement("section");m.setCssProps(ee(`display: block; margin: 0; padding: 0; padding-left: ${b*.5}em; line-height: 1.6;`));for(let p of l)p.nodeType===Node.TEXT_NODE&&!((A=p.textContent)!=null&&A.length)||m.appendChild(p);i.push(m)}u.empty(),i.forEach(l=>{u.appendChild(l)})})}async function Bn(e,t,u="",r,n=!1,a=!1){let o=activeDocument.createElement("div");o.setCssProps({position:"fixed",left:"-9999px",top:"0",width:"1000px"}),activeDocument.body.appendChild(o);let i=new gu.Component;i.load();try{let s=zo(t);await gu.MarkdownRenderer.render(e,s,o,u,i),await Vo(o,3e3),await Bb(o),qo(o),ut.formatContent(o,{showImageCaption:a}),Rb(o),Pb(o);let A=r?r.getActiveThemeCSS():"",l=Yo(o,A);o.removeAttribute("style");let b=new XMLSerializer,g=activeDocument.createElement("div");for(;o.firstChild;)g.appendChild(o.firstChild);let m=b.serializeToString(g);if(m=m.replace(/ xmlns="http:\/\/www\.w3\.org\/1999\/xhtml"/g,""),n&&m.includes("mjx-"))try{m=await Wo(m,s)}catch(p){console.error("\u6570\u5B66\u516C\u5F0F\u5904\u7406\u5931\u8D25:",p)}return l&&(m=await Pn(m,l)),a&&(m=Hb(m)),m}finally{i.unload(),o.parentNode&&activeDocument.body.removeChild(o)}}async function Bb(e){var u;let t=e.querySelectorAll('.mermaid, pre.mermaid, [class*="mermaid"]');if(t.length!==0)for(let r of Array.from(t)){let n=r.querySelector("svg");if(n)try{let a=await Mb(n);if(!a)continue;let o=activeDocument.createElement("img");o.src=a,o.alt="mermaid diagram",o.setCssProps(ee("display: block; max-width: 100%; margin: 1em auto; border-radius: 0;")),(u=r.parentNode)==null||u.replaceChild(o,r)}catch(a){console.error("[Mermaid] SVG \u8F6C\u56FE\u7247\u5931\u8D25:",a)}}}function Mb(e){return new Promise(t=>{try{let u=e,r=0,n=0,a=u.getAttribute("viewBox");if(a){let E=a.split(/[\s,]+/).map(Number);E.length===4&&E[2]>0&&E[3]>0&&(r=E[2],n=E[3])}if(!r||!n){let E=u.getAttribute("width")||"",I=u.getAttribute("height")||"";E&&!E.includes("%")&&(r=parseFloat(E)||r),I&&!I.includes("%")&&(n=parseFloat(I)||n)}r||(r=800),n||(n=600);let o=2,i=activeDocument.createElement("canvas");i.width=r*o,i.height=n*o;let s=i.getContext("2d");if(!s){t(null);return}let A=u.cloneNode(!0);A.setAttribute("width",String(r)),A.setAttribute("height",String(n)),A.getAttribute("viewBox")||A.setAttribute("viewBox",`0 0 ${r} ${n}`);let b=new XMLSerializer().serializeToString(A),g=new Blob([b],{type:"image/svg+xml;charset=utf-8"}),m=URL.createObjectURL(g),p=new Image;p.onload=()=>{s.fillStyle="#ffffff",s.fillRect(0,0,i.width,i.height),s.drawImage(p,0,0,i.width,i.height),URL.revokeObjectURL(m),t(i.toDataURL("image/png"))},p.onerror=()=>{URL.revokeObjectURL(m),t(null)},p.src=m}catch(u){console.error("SVG \u8F6C PNG \u5931\u8D25:",u),t(null)}})}function Hb(e){let u=new DOMParser().parseFromString(`<div>${e}</div>`,"text/html"),r=u.querySelectorAll(".mp-image-caption");return r.length===0?e:(r.forEach(a=>{a.setCssProps(ee(sr))}),u.body.firstChild.innerHTML)}var Eu=require("obsidian");var sl=require("obsidian");async function Al(e){try{if(e.startsWith("http://")||e.startsWith("https://")){let u=await(0,sl.requestUrl)({url:e});return u.status!==200?null:u.arrayBuffer}let t=await window.fetch(e);return t.ok?await t.arrayBuffer():null}catch(t){return console.error(`\u83B7\u53D6\u56FE\u7247\u
`)}static async inlineCSS(t,u){let r=await Pn(t,u);return r===t&&u&&new Eu.Notice("CSS \u5185\u8054\u5931\u8D25\uFF0C\u6837\u5F0F\u53EF\u80FD\u4E0D\u5B8C\u6574"),r}static cleanupAttributes(t){t.querySelectorAll("*").forEach(u=>{Array.from(u.attributes).forEach(r=>{r.name.startsWith("data-")&&u.removeAttribute(r.name)}),u.removeAttribute("id"),u.removeAttribute("class")})}static applyComputedStylesToCodeBlocks(t,u){let r=t.querySelectorAll("pre"),n=u.querySelectorAll("pre");r.forEach((a,o)=>{let i=n[o];if(!i)return;let s=a.querySelector("code"),A=i.querySelector("code");if(!s||!A)return;let l=s.querySelectorAll("span"),b=A.querySelectorAll("span");l.forEach((g,m)=>{let p=b[m];if(!p)return;let E=window.getComputedStyle(g).color;E&&p.setCssProps({color:E})})})}static applyComputedStylesToCaptions(t,u){let r=t.querySelectorAll(".mp-image-caption"),n=u.querySelectorAll(".mp-image-caption");r.forEach((a,o)=>{let i=n[o];if(!i)return;let s=window.getComputedStyle(a),A=sr.replace(/color:\s*#888/,`color: ${s.color}`);i.setCssProps(ee(A))})}static async processImages(t){var n,a;let u=t.querySelectorAll("img"),r=Array.from(u);for(let o of r)try{if(!o.src||o.src.startsWith("data:"))continue;let i=await Al(o.src);if(!i)continue;let s=(a=(n=o.src.match(/\.(\w+)(?:\?|$)/))==null?void 0:n[1])==null?void 0:a.toLowerCase(),A=s==="png"?"image/png":s==="gif"?"image/gif":s==="webp"?"image/webp":"image/jpeg";o.src=ll(i,A)}catch(i){console.error("\u56FE\u7247\u8F6C\u6362\u5931\u8D25:",i)}}static async getInlinedHtml(t,u=!0){let r=t.cloneNode(!0);u&&await this.processImages(r);let n=r.querySelector(".mp-content-section");if(!n)throw new Error("\u627E\u4E0D\u5230\u5185\u5BB9\u533A\u57DF");let a=this.extractStyleCSS(n);n.querySelectorAll("style").forEach(l=>l.remove());let i=new XMLSerializer().serializeToString(n);i=i.replace(/ xmlns="http:\/\/www\.w3\.org\/1999\/xhtml"/g,"");let s=await this.inlineCSS(i,a),A=activeDocument.createElement("div");return A.appendChild((0,Eu.sanitizeHTMLToDom)(s)),this.applyComputedStylesToCodeBlocks(t,A),this.applyComputedStylesToCaptions(t,A),this.cleanupAttributes(A),Ar(A),A.innerHTML}static async copyToClipboard(t){try{let u=await this.getInlinedHtml(t,!0),r=t.cloneNode(!0),n=new ClipboardItem({"text/html":new Blob([u],{type:"text/html"}),"text/plain":new Blob([r.textContent||""],{type:"text/plain"})});await navigator.clipboard.write([n]),new Eu.Notice("\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F")}catch(u){console.error("\u590D\u5236\u5931\u8D25:",u),new Eu.Notice("\u590D\u5236\u5931\u8D25")}}};var rt=[{value:'Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif',label:"\u9ED8\u8BA4\u5B57\u4F53",isPreset:!0},{value:'SimSun, "\u5B8B\u4F53", serif',label:"\u5B8B\u4F53",isPreset:!0},{value:'SimHei, "\u9ED1\u4F53", sans-serif',label:"\u9ED1\u4F53",isPreset:!0},{value:'KaiTi, "\u6977\u4F53", serif',label:"\u6977\u4F53",isPreset:!0},{value:'"Microsoft YaHei", "\u5FAE\u8F6F\u96C5\u9ED1", sans-serif',label:"\u96C5\u9ED1",isPreset:!0}],So={indexUrl:"https://raw.githubusercontent.com/user/mp-publisher-themes/main/index.json",cacheExpiry:24*60*60*1e3};var lr="mp-preview",Hn=class extends De.ItemView{constructor(u,r,n,a){super(u);this.currentFile=null;this.updateTimer=null;this.lastSyncedThemeId="";this.lastThemeOptionsSnapshot="";this.lastThemeCSSSnapshot="";this.themeManager=r,this.settingsManager=n,this.plugin=a}getViewType(){return lr}getDisplayText(){return"\u516C\u4F17\u53F7\u9884\u89C8"}getIcon(){return"eye"}async onOpen(){var w,D;let u=this.containerEl.children[1];u.empty(),u.classList.remove("view-content"),u.classList.add("mp-view-content");let n=u.createEl("div",{cls:"mp-toolbar"}).createEl("div",{cls:"mp-controls-group"});this.refreshButton=n.createEl("button",{cls:"mp-refresh-button",attr:{"aria-label":"\u5237\u65B0\u9884\u89C8"}}),(0,De.setIcon)(this.refreshButton,"refresh-cw"),this.refreshButton.addEventListener("click",()=>void this.forceRefreshPreview());let a=this.getThemeOptions();this.customThemeSelect=this.createCustomSelect
1. \u9009\u62E9\u559C\u6B22\u7684\u4E3B\u9898\u6A21\u677F
2. \u8C03\u6574\u5B57\u4F53\u548C\u5B57\u53F7
3. \u5B9E\u65F6\u9884\u89C8\u6548\u679C
4. \u4FEE\u6539\u4E3B\u9898 CSS \u540E\u70B9\u51FB\u{1F504}\u5237\u65B0\u6309\u94AE\u66F4\u65B0\u9884\u89C8
5. \u70B9\u51FB\u3010\u590D\u5236\u6309\u94AE\u3011\u5373\u53EF\u7C98\u8D34\u5230\u516C\u4F17\u53F7
6. \u5982\u679C\u4F60\u559C\u6B22\u8FD9\u4E2A\u63D2\u4EF6\uFF0C\u6B22\u8FCE\u5173\u6CE8\u6253\u8D4F`}),this.copyButton=g.createEl("button",{text:"\u590D\u5236\u5230\u516C\u4F17\u53F7",cls:"mp-copy-button"});let p=g.createEl("button",{text:"\u53D1\u5E03",cls:"mp-publish-button"});this.copyButton.addEventListener("click",()=>{(async()=>{if(this.currentFile){this.copyButton.disabled=!0,this.copyButton.setText("\u590D\u5236\u4E2D...");try{let O=await this.app.vault.cachedRead(this.currentFile),k=await Bn(this.app,O,this.currentFile.path,this.themeManager,this.plugin.settings.convertMathToSVG,this.settingsManager.getSettings().showImageCaption),L=activeDocument.createElement("div");L.appendChild((0,De.sanitizeHTMLToDom)(k)),activeDocument.body.appendChild(L),await Mn.copyToClipboard(L),activeDocument.body.removeChild(L),this.copyButton.setText("\u590D\u5236\u6210\u529F"),window.setTimeout(()=>{this.copyButton.disabled=!1,this.copyButton.setText("\u590D\u5236\u4E3A\u516C\u4F17\u53F7\u683C\u5F0F")},2e3)}catch(O){this.copyButton.setText("\u590D\u5236\u5931\u8D25"),window.setTimeout(()=>{this.copyButton.disabled=!1,this.copyButton.setText("\u590D\u5236\u4E3A\u516C\u4F17\u53F7\u683C\u5F0F")},2e3)}}})()}),p.addEventListener("click",()=>{(async()=>{if(!this.currentFile)return;let O=this.app.workspace.getLeavesOfType("markdown"),k=null;for(let L of O){let F=L.view;if(F instanceof De.MarkdownView&&F.file===this.currentFile){k=F;break}}if(!k){await this.app.workspace.openLinkText(this.currentFile.path,"",!1);let L=this.app.workspace.getActiveViewOfType(De.MarkdownView);L&&L.file===this.currentFile&&(k=L)}k&&this.plugin&&typeof this.plugin.showPublishModal=="function"&&this.plugin.showPublishModal.call(this.plugin,k)})()}),this.registerEvent(this.app.workspace.on("file-open",this.onFileOpen.bind(this))),this.registerEvent(this.app.vault.on("modify",this.onFileModify.bind(this))),this.registerEvent(this.app.workspace.on("layout-change",()=>{this.syncThemeFromSettings()}));let E=window.setInterval(()=>{this.syncThemeFromSettings()},2e3);this.register(()=>window.clearInterval(E));let I=this.app.workspace.getActiveFile();await this.onFileOpen(I)}applyCurrentTheme(){let u=this.previewEl.querySelector(".mp-content-section");u&&this.themeManager.applyTheme(u,void 0,"mp-view")}syncThemeFromSettings(){let r=this.settingsManager.getSettings().activeThemeId||"default",n=this.getThemeOptions(),a=n.map(b=>b.value).join(","),o=a!==this.lastThemeOptionsSnapshot;o&&(this.lastThemeOptionsSnapshot=a,this.rebuildSelectOptions(this.customThemeSelect,n,r));let i=this.themeManager.getTheme(r),s=i?i.css.substring(0,200)+i.css.length:"",A=s!==this.lastThemeCSSSnapshot;!(r!==this.lastSyncedThemeId)&&!A&&!o||(this.lastSyncedThemeId=r,this.lastThemeCSSSnapshot=s,this.themeManager.setActiveTheme(r),this.restoreSelectValue(this.customThemeSelect,r,n),this.applyCurrentTheme())}rebuildSelectOptions(u,r,n){let a=u.querySelector(".select-dropdown"),o=u.querySelector(".selected-text"),i=u.querySelector(".custom-select");if(!a||!o||!i)return;a.empty();for(let A of r){let l=a.createEl("div",{cls:`select-item ${A.value===n?"selected":""}`,text:A.label});l.dataset.value=A.value,l.addEventListener("click",()=>{a.querySelectorAll(".select-item").forEach(b=>b.classList.remove("selected")),l.classList.add("selected"),o.textContent=A.label,i.setAttribute("data-value",A.value),a.classList.remove("show"),i.dispatchEvent(new CustomEvent("change",{detail:{value:A.value}}))})}let s=r.find(A=>A.value===n);s&&(o.textContent=s.label,i.setAttribute("data-value",s.value))}restoreSelectValue(u,r,n){var i;let a=u.querySelector(".selected-text"),o=u.querySelector(".select-dropdown");if(a&&o){let s=n.find(A=>A.value===r);s&&(a.textContent=s.label,(i=u.querySelector(".custom-select"))==null||i.setAttribute("data-value",s.value),o.querySelectorAll(".select-item").forEach(A=>{A.getAttribute("data-value")===s.value?A.classList.add("selected"):A.classList.remove("selected")}))}}updateControlsState(u){this.refreshButton.disabled=!u;let r=this.customThemeSelect.querySelector(".custo
.mp-content-section {
font-size: 16px;
color: #4a4a4a;
line-height: 1.8;
letter-spacing: 0.03em;
font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
}
/* \u6807\u9898 */
.mp-content-section h1 {
margin: 32px 0 16px;
font-size: 2em;
font-weight: bold;
color: #2c3e50;
letter-spacing: -0.02em;
line-height: 1.5;
}
.mp-content-section h2 {
margin: 28px 0 14px;
font-size: 1.5em;
font-weight: bold;
color: #34495e;
letter-spacing: -0.01em;
line-height: 1.5;
}
.mp-content-section h3 {
margin: 24px 0 12px;
font-size: 1.25em;
font-weight: bold;
color: #3d566e;
line-height: 1.5;
}
.mp-content-section h4,
.mp-content-section h5,
.mp-content-section h6 {
margin: 20px 0 10px;
font-size: 1em;
font-weight: bold;
color: #47637f;
line-height: 1.5;
}
/* \u6BB5\u843D */
.mp-content-section p {
margin: 1em 0;
line-height: 1.8;
font-size: 1em;
color: #4a4a4a;
}
/* \u5217\u8868\uFF08\u5DF2\u8F6C\u6362\u4E3A section \u7ED3\u6784\uFF0C\u907F\u514D\u516C\u4F17\u53F7\u81EA\u52A8\u5904\u7406 ul/ol/li\uFF09 */
.mp-content-section .mp-list-section {
margin: 1em 0 0 0;
padding: 0;
color: #4a4a4a;
}
.mp-content-section .mp-list-item {
font-size: 1em;
color: #4a4a4a;
line-height: 1.8;
}
/* \u5F15\u7528 */
.mp-content-section blockquote {
border-left: 4px solid #e0e0e0;
border-radius: 6px;
padding: 10px 16px;
background: #f6f8fa;
margin: 0.8em 0;
color: #6a737d;
font-style: italic;
word-wrap: break-word;
}
.mp-content-section blockquote p {
margin: 0;
padding: 0;
line-height: inherit;
}
/* \u4EE3\u7801\u5757 */
.mp-content-section pre {
color: #333;
background: #f8f8f8;
border-radius: 8px;
border: 1px solid #eee;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
margin: 1.2em 0;
padding: 1em;
font-size: 14px;
line-height: 1.6;
white-space: pre-wrap;
overflow-x: auto;
}
/* \u884C\u5185\u4EE3\u7801 */
.mp-content-section code:not(pre code) {
background: #f8f8f8;
padding: 2px 6px;
border-radius: 4px;
color: #333;
font-size: 14px;
border: 1px solid #eee;
}
/* \u94FE\u63A5 */
.mp-content-section a {
color: #3498db;
text-decoration: none;
border-bottom: 1px solid #3498db;
}
/* \u5F3A\u8C03 */
.mp-content-section strong {
font-weight: bold;
color: #4a4a4a;
}
.mp-content-section em {
font-style: italic;
color: #4a4a4a;
}
.mp-content-section del {
text-decoration: line-through;
color: #4a4a4a;
}
/* \u8868\u683C */
.mp-content-section table {
width: 100%;
margin: 1em 0;
border-collapse: collapse;
border: 1px solid #e1e4e8;
}
.mp-content-section th {
background: #f6f8fa;
font-weight: bold;
color: #4a4a4a;
border-bottom: 2px solid #e1e4e8;
padding: 8px;
font-size: 1em;
}
.mp-content-section td {
border: 1px solid #f0f0f0;
padding: 8px;
color: #4a4a4a;
font-size: 1em;
}
/* \u5206\u9694\u7EBF */
.mp-content-section hr {
border: none;
border-top: 1px solid #f0f0f0;
margin: 20px 0;
}
/* \u56FE\u7247 */
.mp-content-section img {
max-width: 100%;
height: auto;
margin: 1em auto;
display: block;
}
/* \u811A\u6CE8 */
.mp-content-section .footnote-ref {
color: #3498db;
text-decoration: none;
font-size: 0.9em;
}
.mp-content-section .footnote-backref {
color: #3498db;
text-decoration: none;
font-size: 0.9em;
}
/* Callout \u63D0\u793A\u6846 */
.mp-content-section .mp-callout {
border-radius: 6px;
padding: 12px 16px;
margin: 1em 0;
border-left: 4px solid #448aff;
background: #e8f0fe;
}
.mp-content-section .mp-callout-title {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 8px;
font-weight: bold;
font-size: 1em;
line-height: 1.5;
}
.mp-content-section .mp-callout-content {
font-size: 0.95em;
line-height: 1.7;
color: #4a4a4a;
}
.mp-content-section .mp-callout-content p {
margin: 4px 0;
padding: 0;
line-height: 1.7;
}
.mp-content-section .mp-callout-note { border-left-color: #448aff; background: #e8f0fe; }
.mp-content-section .mp-callout-note .mp-callout-title { color: #448aff; }
.mp-content-section .mp-callout-info { border-left-color: #448aff; background: #e8f0fe; }
.mp-content-section .mp-callout-info .mp-callout-title { color: #448aff; }
.mp-content-section .mp-callout-tip { border-left-color: #00bfa5; background: #e6f7f2; }
.mp-content-section .mp-callout-tip .mp-callout-title { color: #00bfa5; }
.mp-content-section .mp-callout-hint { border-left-color: #00bfa5; background: #e6f7f2; }
.mp-content-section .mp-callout-hint .mp-callout-title { color: #00bfa5; }
.mp-content-section .mp-callout-important { border-left-color: #7c4dff; background: #f3e8fd; }
.mp-content-section .mp-callout-important .mp-callout-title { color: #7c4dff; }
.mp-content-section .mp-callout-warning { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-warning .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-caution { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-caution .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-danger { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-danger .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-error { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-error .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-bug { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-bug .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-success { border-left-color: #00c853; background: #e8f5e9; }
.mp-content-section .mp-callout-success .mp-callout-title { color: #00c853; }
.mp-content-section .mp-callout-check { border-left-color: #00c853; background: #e8f5e9; }
.mp-content-section .mp-callout-check .mp-callout-title { color: #00c853; }
.mp-content-section .mp-callout-done { border-left-color: #00c853; background: #e8f5e9; }
.mp-content-section .mp-callout-done .mp-callout-title { color: #00c853; }
.mp-content-section .mp-callout-question { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-question .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-help { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-help .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-faq { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-faq .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-failure { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-failure .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-fail { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-fail .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-missing { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-missing .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-abstract { border-left-color: #00b8d4; background: #e0f7fa; }
.mp-content-section .mp-callout-abstract .mp-callout-title { color: #00b8d4; }
.mp-content-section .mp-callout-summary { border-left-color: #00b8d4; background: #e0f7fa; }
.mp-content-section .mp-callout-summary .mp-callout-title { color: #00b8d4; }
.mp-content-section .mp-callout-tldr { border-left-color: #00b8d4; background: #e0f7fa; }
.mp-content-section .mp-callout-tldr .mp-callout-title { color: #00b8d4; }
.mp-content-section .mp-callout-example { border-left-color: #7c4dff; background: #f3e8fd; }
.mp-content-section .mp-callout-example .mp-callout-title { color: #7c4dff; }
.mp-content-section .mp-callout-todo { border-left-color: #448aff; background: #e8f0fe; }
.mp-content-section .mp-callout-todo .mp-callout-title { color: #448aff; }
.mp-content-section .mp-callout-quote { border-left-color: #9e9e9e; background: #f5f5f5; }
.mp-content-section .mp-callout-quote .mp-callout-title { color: #757575; }
.mp-content-section .mp-callout-cite { border-left-color: #9e9e9e; background: #f5f5f5; }
.mp-content-section .mp-callout-cite .mp-callout-title { color: #757575; }
`;var fl=`/* \u4F18\u96C5\u4E3B\u9898 - \u6587\u827A\u6C14\u8D28 */
.mp-content-section {
font-size: 16px;
color: #3f3f3f;
line-height: 1.8;
letter-spacing: 0.05em;
font-family: 'Georgia', 'Noto Serif SC', 'Source Han Serif CN', serif;
}
/* \u6807\u9898 */
.mp-content-section h1 {
margin: 36px 0 18px;
font-size: 1.8em;
font-weight: bold;
color: #8b4513;
text-align: center;
padding-bottom: 12px;
border-bottom: 2px solid #d2691e;
letter-spacing: 0.1em;
}
.mp-content-section h2 {
margin: 30px 0 15px;
font-size: 1.4em;
font-weight: bold;
color: #8b4513;
padding-left: 15px;
border-left: 4px solid #d2691e;
}
.mp-content-section h3 {
margin: 24px 0 12px;
font-size: 1.2em;
font-weight: bold;
color: #a0522d;
}
.mp-content-section h4,
.mp-content-section h5,
.mp-content-section h6 {
margin: 20px 0 10px;
font-size: 1em;
font-weight: bold;
color: #a0522d;
}
/* \u6BB5\u843D */
.mp-content-section p {
margin: 1em 0;
line-height: 2;
text-indent: 0;
color: #3f3f3f;
}
/* \u5217\u8868\uFF08\u5DF2\u8F6C\u6362\u4E3A section \u7ED3\u6784\uFF0C\u907F\u514D\u516C\u4F17\u53F7\u81EA\u52A8\u5904\u7406 ul/ol/li\uFF09 */
.mp-content-section .mp-list-section {
margin: 1em 0 0 0;
padding: 0;
}
.mp-content-section .mp-list-item {
line-height: 1.8;
color: #3f3f3f;
}
/* \u5F15\u7528 */
.mp-content-section blockquote {
border-left: 3px solid #d2691e;
padding: 12px 20px;
background: #fdf5e6;
margin: 1em 0;
color: #8b6914;
font-style: italic;
border-radius: 0 8px 8px 0;
}
.mp-content-section blockquote p {
margin: 0;
line-height: inherit;
}
/* \u4EE3\u7801\u5757 */
.mp-content-section pre {
background: #faf8f5;
border: 1px solid #e8dcc8;
border-radius: 6px;
padding: 1em;
margin: 1.2em 0;
font-size: 14px;
line-height: 1.6;
overflow-x: auto;
}
.mp-content-section code:not(pre code) {
background: #fdf5e6;
padding: 2px 6px;
border-radius: 3px;
color: #8b4513;
font-size: 0.9em;
}
/* \u94FE\u63A5 */
.mp-content-section a {
color: #d2691e;
text-decoration: none;
border-bottom: 1px solid #d2691e;
}
/* \u5F3A\u8C03 */
.mp-content-section strong {
font-weight: bold;
color: #8b4513;
}
.mp-content-section em {
font-style: italic;
color: #3f3f3f;
}
.mp-content-section del {
text-decoration: line-through;
color: #999;
}
/* \u8868\u683C */
.mp-content-section table {
width: 100%;
margin: 1em 0;
border-collapse: collapse;
border: 1px solid #e8dcc8;
}
.mp-content-section th {
background: linear-gradient(135deg, #fdf5e6, #faebd7);
font-weight: bold;
color: #8b4513;
padding: 10px;
border: 1px solid #e8dcc8;
}
.mp-content-section td {
padding: 10px;
border: 1px solid #e8dcc8;
color: #3f3f3f;
}
/* \u5206\u9694\u7EBF */
.mp-content-section hr {
border: none;
border-top: 1px solid #e8dcc8;
margin: 24px 0;
}
/* \u56FE\u7247 */
.mp-content-section img {
max-width: 100%;
height: auto;
display: block;
margin: 1.5em auto;
border-radius: 6px;
box-shadow: 0 2px 8px rgba(139, 69, 19, 0.1);
}
/* \u811A\u6CE8 */
.mp-content-section .footnote-ref,
.mp-content-section .footnote-backref {
color: #d2691e;
text-decoration: none;
font-size: 0.9em;
}
/* Callout \u63D0\u793A\u6846 */
.mp-content-section .mp-callout {
border-radius: 6px;
padding: 12px 16px;
margin: 1em 0;
border-left: 3px solid #d2691e;
background: #fdf5e6;
}
.mp-content-section .mp-callout-title {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 8px;
font-weight: bold;
font-size: 1em;
line-height: 1.5;
}
.mp-content-section .mp-callout-content {
font-size: 0.95em;
line-height: 1.7;
color: #3f3f3f;
}
.mp-content-section .mp-callout-content p {
margin: 4px 0;
padding: 0;
line-height: 1.7;
}
.mp-content-section .mp-callout-note { border-left-color: #448aff; background: #e8f0fe; }
.mp-content-section .mp-callout-note .mp-callout-title { color: #448aff; }
.mp-content-section .mp-callout-info { border-left-color: #448aff; background: #e8f0fe; }
.mp-content-section .mp-callout-info .mp-callout-title { color: #448aff; }
.mp-content-section .mp-callout-tip { border-left-color: #00bfa5; background: #e6f7f2; }
.mp-content-section .mp-callout-tip .mp-callout-title { color: #00bfa5; }
.mp-content-section .mp-callout-hint { border-left-color: #00bfa5; background: #e6f7f2; }
.mp-content-section .mp-callout-hint .mp-callout-title { color: #00bfa5; }
.mp-content-section .mp-callout-important { border-left-color: #7c4dff; background: #f3e8fd; }
.mp-content-section .mp-callout-important .mp-callout-title { color: #7c4dff; }
.mp-content-section .mp-callout-warning { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-warning .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-caution { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-caution .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-danger { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-danger .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-error { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-error .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-bug { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-bug .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-success { border-left-color: #00c853; background: #e8f5e9; }
.mp-content-section .mp-callout-success .mp-callout-title { color: #00c853; }
.mp-content-section .mp-callout-check { border-left-color: #00c853; background: #e8f5e9; }
.mp-content-section .mp-callout-check .mp-callout-title { color: #00c853; }
.mp-content-section .mp-callout-done { border-left-color: #00c853; background: #e8f5e9; }
.mp-content-section .mp-callout-done .mp-callout-title { color: #00c853; }
.mp-content-section .mp-callout-question { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-question .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-help { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-help .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-faq { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-faq .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-failure { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-failure .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-fail { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-fail .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-missing { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-missing .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-abstract { border-left-color: #00b8d4; background: #e0f7fa; }
.mp-content-section .mp-callout-abstract .mp-callout-title { color: #00b8d4; }
.mp-content-section .mp-callout-summary { border-left-color: #00b8d4; background: #e0f7fa; }
.mp-content-section .mp-callout-summary .mp-callout-title { color: #00b8d4; }
.mp-content-section .mp-callout-tldr { border-left-color: #00b8d4; background: #e0f7fa; }
.mp-content-section .mp-callout-tldr .mp-callout-title { color: #00b8d4; }
.mp-content-section .mp-callout-example { border-left-color: #7c4dff; background: #f3e8fd; }
.mp-content-section .mp-callout-example .mp-callout-title { color: #7c4dff; }
.mp-content-section .mp-callout-todo { border-left-color: #448aff; background: #e8f0fe; }
.mp-content-section .mp-callout-todo .mp-callout-title { color: #448aff; }
.mp-content-section .mp-callout-quote { border-left-color: #9e9e9e; background: #f5f5f5; }
.mp-content-section .mp-callout-quote .mp-callout-title { color: #757575; }
.mp-content-section .mp-callout-cite { border-left-color: #9e9e9e; background: #f5f5f5; }
.mp-content-section .mp-callout-cite .mp-callout-title { color: #757575; }
`;var ml=`/* \u6697\u8272\u4E3B\u9898 - \u79D1\u6280\u611F */
.mp-content-section {
font-size: 16px;
color: #cbd5e1;
line-height: 1.75;
letter-spacing: 0.03em;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
background-color: #1e293b;
}
/* \u6807\u9898 */
.mp-content-section h1 {
margin: 32px 0 16px;
font-size: 1.8em;
font-weight: bold;
color: #f1f5f9;
padding: 12px 20px;
background: linear-gradient(135deg, #0f172a, #1e293b);
border-left: 4px solid #38bdf8;
border-radius: 0 6px 6px 0;
}
.mp-content-section h2 {
margin: 28px 0 14px;
font-size: 1.5em;
font-weight: bold;
color: #38bdf8;
padding-bottom: 8px;
border-bottom: 1px solid #334155;
}
.mp-content-section h3 {
margin: 24px 0 12px;
font-size: 1.25em;
font-weight: bold;
color: #7dd3fc;
}
.mp-content-section h4,
.mp-content-section h5,
.mp-content-section h6 {
margin: 20px 0 10px;
font-size: 1em;
font-weight: bold;
color: #94a3b8;
}
/* \u6BB5\u843D */
.mp-content-section p {
margin: 1em 0;
line-height: 1.75;
color: #cbd5e1;
}
/* \u5217\u8868\uFF08\u5DF2\u8F6C\u6362\u4E3A section \u7ED3\u6784\uFF0C\u907F\u514D\u516C\u4F17\u53F7\u81EA\u52A8\u5904\u7406 ul/ol/li\uFF09 */
.mp-content-section .mp-list-section {
margin: 1em 0 0 0;
padding: 0;
color: #cbd5e1;
}
.mp-content-section .mp-list-item {
line-height: 1.75;
}
/* \u5F15\u7528 */
.mp-content-section blockquote {
border-left: 4px solid #38bdf8;
padding: 12px 20px;
background: #0f172a;
margin: 1em 0;
color: #94a3b8;
font-style: italic;
border-radius: 0 6px 6px 0;
}
.mp-content-section blockquote p {
margin: 0;
line-height: inherit;
}
/* \u4EE3\u7801\u5757 */
.mp-content-section pre {
background: #0f172a;
border: 1px solid #334155;
border-radius: 8px;
padding: 1em;
margin: 1.2em 0;
font-size: 14px;
line-height: 1.6;
overflow-x: auto;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.mp-content-section pre code {
color: #e2e8f0;
}
.mp-content-section code:not(pre code) {
background: #334155;
padding: 2px 6px;
border-radius: 4px;
color: #38bdf8;
font-size: 0.9em;
}
/* \u94FE\u63A5 */
.mp-content-section a {
color: #38bdf8;
text-decoration: none;
border-bottom: 1px solid #38bdf8;
}
/* \u5F3A\u8C03 */
.mp-content-section strong {
font-weight: bold;
color: #f1f5f9;
}
.mp-content-section em {
font-style: italic;
color: #cbd5e1;
}
.mp-content-section del {
text-decoration: line-through;
color: #64748b;
}
/* \u8868\u683C */
.mp-content-section table {
width: 100%;
margin: 1em 0;
border-collapse: collapse;
border: 1px solid #334155;
}
.mp-content-section th {
background: #0f172a;
font-weight: bold;
color: #38bdf8;
padding: 10px;
border: 1px solid #334155;
}
.mp-content-section td {
padding: 10px;
border: 1px solid #334155;
color: #cbd5e1;
}
.mp-content-section tr:nth-child(even) {
background: rgba(15, 23, 42, 0.5);
}
/* \u5206\u9694\u7EBF */
.mp-content-section hr {
border: none;
height: 1px;
background: linear-gradient(90deg, transparent, #38bdf8, transparent);
margin: 24px 0;
}
/* \u56FE\u7247 */
.mp-content-section img {
max-width: 100%;
height: auto;
display: block;
margin: 1.5em auto;
border-radius: 8px;
border: 1px solid #334155;
}
/* \u811A\u6CE8 */
.mp-content-section .footnote-ref,
.mp-content-section .footnote-backref {
color: #38bdf8;
text-decoration: none;
font-size: 0.9em;
}
/* Callout \u63D0\u793A\u6846 */
.mp-content-section .mp-callout {
border-radius: 6px;
padding: 12px 16px;
margin: 1em 0;
border-left: 4px solid #38bdf8;
background: #0f172a;
}
.mp-content-section .mp-callout-title {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 8px;
font-weight: bold;
font-size: 1em;
line-height: 1.5;
}
.mp-content-section .mp-callout-content {
font-size: 0.95em;
line-height: 1.7;
color: #cbd5e1;
}
.mp-content-section .mp-callout-content p {
margin: 4px 0;
padding: 0;
line-height: 1.7;
color: #cbd5e1;
}
.mp-content-section .mp-callout-note { border-left-color: #60a5fa; background: #172554; }
.mp-content-section .mp-callout-note .mp-callout-title { color: #60a5fa; }
.mp-content-section .mp-callout-info { border-left-color: #60a5fa; background: #172554; }
.mp-content-section .mp-callout-info .mp-callout-title { color: #60a5fa; }
.mp-content-section .mp-callout-tip { border-left-color: #2dd4bf; background: #042f2e; }
.mp-content-section .mp-callout-tip .mp-callout-title { color: #2dd4bf; }
.mp-content-section .mp-callout-hint { border-left-color: #2dd4bf; background: #042f2e; }
.mp-content-section .mp-callout-hint .mp-callout-title { color: #2dd4bf; }
.mp-content-section .mp-callout-important { border-left-color: #a78bfa; background: #2e1065; }
.mp-content-section .mp-callout-important .mp-callout-title { color: #a78bfa; }
.mp-content-section .mp-callout-warning { border-left-color: #fbbf24; background: #451a03; }
.mp-content-section .mp-callout-warning .mp-callout-title { color: #fbbf24; }
.mp-content-section .mp-callout-caution { border-left-color: #fbbf24; background: #451a03; }
.mp-content-section .mp-callout-caution .mp-callout-title { color: #fbbf24; }
.mp-content-section .mp-callout-danger { border-left-color: #f87171; background: #450a0a; }
.mp-content-section .mp-callout-danger .mp-callout-title { color: #f87171; }
.mp-content-section .mp-callout-error { border-left-color: #f87171; background: #450a0a; }
.mp-content-section .mp-callout-error .mp-callout-title { color: #f87171; }
.mp-content-section .mp-callout-bug { border-left-color: #f87171; background: #450a0a; }
.mp-content-section .mp-callout-bug .mp-callout-title { color: #f87171; }
.mp-content-section .mp-callout-success { border-left-color: #4ade80; background: #052e16; }
.mp-content-section .mp-callout-success .mp-callout-title { color: #4ade80; }
.mp-content-section .mp-callout-check { border-left-color: #4ade80; background: #052e16; }
.mp-content-section .mp-callout-check .mp-callout-title { color: #4ade80; }
.mp-content-section .mp-callout-done { border-left-color: #4ade80; background: #052e16; }
.mp-content-section .mp-callout-done .mp-callout-title { color: #4ade80; }
.mp-content-section .mp-callout-question { border-left-color: #fbbf24; background: #451a03; }
.mp-content-section .mp-callout-question .mp-callout-title { color: #fbbf24; }
.mp-content-section .mp-callout-help { border-left-color: #fbbf24; background: #451a03; }
.mp-content-section .mp-callout-help .mp-callout-title { color: #fbbf24; }
.mp-content-section .mp-callout-faq { border-left-color: #fbbf24; background: #451a03; }
.mp-content-section .mp-callout-faq .mp-callout-title { color: #fbbf24; }
.mp-content-section .mp-callout-failure { border-left-color: #f87171; background: #450a0a; }
.mp-content-section .mp-callout-failure .mp-callout-title { color: #f87171; }
.mp-content-section .mp-callout-fail { border-left-color: #f87171; background: #450a0a; }
.mp-content-section .mp-callout-fail .mp-callout-title { color: #f87171; }
.mp-content-section .mp-callout-missing { border-left-color: #f87171; background: #450a0a; }
.mp-content-section .mp-callout-missing .mp-callout-title { color: #f87171; }
.mp-content-section .mp-callout-abstract { border-left-color: #22d3ee; background: #083344; }
.mp-content-section .mp-callout-abstract .mp-callout-title { color: #22d3ee; }
.mp-content-section .mp-callout-summary { border-left-color: #22d3ee; background: #083344; }
.mp-content-section .mp-callout-summary .mp-callout-title { color: #22d3ee; }
.mp-content-section .mp-callout-tldr { border-left-color: #22d3ee; background: #083344; }
.mp-content-section .mp-callout-tldr .mp-callout-title { color: #22d3ee; }
.mp-content-section .mp-callout-example { border-left-color: #a78bfa; background: #2e1065; }
.mp-content-section .mp-callout-example .mp-callout-title { color: #a78bfa; }
.mp-content-section .mp-callout-todo { border-left-color: #60a5fa; background: #172554; }
.mp-content-section .mp-callout-todo .mp-callout-title { color: #60a5fa; }
.mp-content-section .mp-callout-quote { border-left-color: #94a3b8; background: #1e293b; }
.mp-content-section .mp-callout-quote .mp-callout-title { color: #94a3b8; }
.mp-content-section .mp-callout-cite { border-left-color: #94a3b8; background: #1e293b; }
.mp-content-section .mp-callout-cite .mp-callout-title { color: #94a3b8; }
`;var pl=`/* \u6781\u7B80\u4E3B\u9898 - \u5E72\u51C0\u7EAF\u7CB9 */
.mp-content-section {
font-size: 16px;
color: #333;
line-height: 1.8;
letter-spacing: 0.02em;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
}
/* \u6807\u9898 */
.mp-content-section h1 {
margin: 36px 0 18px;
font-size: 1.8em;
font-weight: 700;
color: #111;
line-height: 1.4;
}
.mp-content-section h2 {
margin: 30px 0 15px;
font-size: 1.4em;
font-weight: 700;
color: #222;
padding-bottom: 8px;
border-bottom: 1px solid #eee;
}
.mp-content-section h3 {
margin: 24px 0 12px;
font-size: 1.2em;
font-weight: 600;
color: #333;
}
.mp-content-section h4,
.mp-content-section h5,
.mp-content-section h6 {
margin: 20px 0 10px;
font-size: 1em;
font-weight: 600;
color: #444;
}
/* \u6BB5\u843D */
.mp-content-section p {
margin: 1em 0;
line-height: 1.8;
color: #333;
}
/* \u5217\u8868\uFF08\u5DF2\u8F6C\u6362\u4E3A section \u7ED3\u6784\uFF0C\u907F\u514D\u516C\u4F17\u53F7\u81EA\u52A8\u5904\u7406 ul/ol/li\uFF09 */
.mp-content-section .mp-list-section {
margin: 1em 0 0 0;
padding: 0;
}
.mp-content-section .mp-list-item {
line-height: 1.8;
color: #333;
}
/* \u5F15\u7528 */
.mp-content-section blockquote {
border-left: 3px solid #ddd;
padding: 10px 16px;
background: transparent;
margin: 1em 0;
color: #666;
}
.mp-content-section blockquote p {
margin: 0;
line-height: inherit;
}
/* \u4EE3\u7801\u5757 */
.mp-content-section pre {
background: #fafafa;
border: 1px solid #eee;
border-radius: 4px;
padding: 1em;
margin: 1.2em 0;
font-size: 13px;
line-height: 1.6;
overflow-x: auto;
}
.mp-content-section code:not(pre code) {
background: #f5f5f5;
padding: 2px 5px;
border-radius: 3px;
color: #e83e8c;
font-size: 0.9em;
}
/* \u94FE\u63A5 */
.mp-content-section a {
color: #333;
text-decoration: underline;
}
/* \u5F3A\u8C03 */
.mp-content-section strong {
font-weight: 700;
color: #111;
}
.mp-content-section em {
font-style: italic;
}
.mp-content-section del {
text-decoration: line-through;
color: #999;
}
/* \u8868\u683C */
.mp-content-section table {
width: 100%;
margin: 1em 0;
border-collapse: collapse;
}
.mp-content-section th {
background: #fafafa;
font-weight: 600;
color: #333;
padding: 8px 12px;
border-bottom: 2px solid #ddd;
text-align: left;
}
.mp-content-section td {
padding: 8px 12px;
border-bottom: 1px solid #eee;
color: #333;
}
/* \u5206\u9694\u7EBF */
.mp-content-section hr {
border: none;
border-top: 1px solid #eee;
margin: 24px 0;
}
/* \u56FE\u7247 */
.mp-content-section img {
max-width: 100%;
height: auto;
display: block;
margin: 1.5em auto;
}
/* \u811A\u6CE8 */
.mp-content-section .footnote-ref,
.mp-content-section .footnote-backref {
color: #333;
text-decoration: underline;
font-size: 0.9em;
}
/* Callout \u63D0\u793A\u6846 */
.mp-content-section .mp-callout {
border-radius: 4px;
padding: 12px 16px;
margin: 1em 0;
border-left: 3px solid #ddd;
background: #fafafa;
}
.mp-content-section .mp-callout-title {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 8px;
font-weight: 600;
font-size: 1em;
line-height: 1.5;
}
.mp-content-section .mp-callout-content {
font-size: 0.95em;
line-height: 1.7;
color: #333;
}
.mp-content-section .mp-callout-content p {
margin: 4px 0;
padding: 0;
line-height: 1.7;
}
.mp-content-section .mp-callout-note { border-left-color: #448aff; background: #e8f0fe; }
.mp-content-section .mp-callout-note .mp-callout-title { color: #448aff; }
.mp-content-section .mp-callout-info { border-left-color: #448aff; background: #e8f0fe; }
.mp-content-section .mp-callout-info .mp-callout-title { color: #448aff; }
.mp-content-section .mp-callout-tip { border-left-color: #00bfa5; background: #e6f7f2; }
.mp-content-section .mp-callout-tip .mp-callout-title { color: #00bfa5; }
.mp-content-section .mp-callout-hint { border-left-color: #00bfa5; background: #e6f7f2; }
.mp-content-section .mp-callout-hint .mp-callout-title { color: #00bfa5; }
.mp-content-section .mp-callout-important { border-left-color: #7c4dff; background: #f3e8fd; }
.mp-content-section .mp-callout-important .mp-callout-title { color: #7c4dff; }
.mp-content-section .mp-callout-warning { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-warning .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-caution { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-caution .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-danger { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-danger .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-error { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-error .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-bug { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-bug .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-success { border-left-color: #00c853; background: #e8f5e9; }
.mp-content-section .mp-callout-success .mp-callout-title { color: #00c853; }
.mp-content-section .mp-callout-check { border-left-color: #00c853; background: #e8f5e9; }
.mp-content-section .mp-callout-check .mp-callout-title { color: #00c853; }
.mp-content-section .mp-callout-done { border-left-color: #00c853; background: #e8f5e9; }
.mp-content-section .mp-callout-done .mp-callout-title { color: #00c853; }
.mp-content-section .mp-callout-question { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-question .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-help { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-help .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-faq { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-faq .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-failure { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-failure .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-fail { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-fail .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-missing { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-missing .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-abstract { border-left-color: #00b8d4; background: #e0f7fa; }
.mp-content-section .mp-callout-abstract .mp-callout-title { color: #00b8d4; }
.mp-content-section .mp-callout-summary { border-left-color: #00b8d4; background: #e0f7fa; }
.mp-content-section .mp-callout-summary .mp-callout-title { color: #00b8d4; }
.mp-content-section .mp-callout-tldr { border-left-color: #00b8d4; background: #e0f7fa; }
.mp-content-section .mp-callout-tldr .mp-callout-title { color: #00b8d4; }
.mp-content-section .mp-callout-example { border-left-color: #7c4dff; background: #f3e8fd; }
.mp-content-section .mp-callout-example .mp-callout-title { color: #7c4dff; }
.mp-content-section .mp-callout-todo { border-left-color: #448aff; background: #e8f0fe; }
.mp-content-section .mp-callout-todo .mp-callout-title { color: #448aff; }
.mp-content-section .mp-callout-quote { border-left-color: #9e9e9e; background: #f5f5f5; }
.mp-content-section .mp-callout-quote .mp-callout-title { color: #757575; }
.mp-content-section .mp-callout-cite { border-left-color: #9e9e9e; background: #f5f5f5; }
.mp-content-section .mp-callout-cite .mp-callout-title { color: #757575; }
`;var hl=`/* \u6E05\u65B0\u7EFF\u610F\u4E3B\u9898 */
.mp-content-section {
font-size: 16px;
color: #3f3f3f;
line-height: 1.75;
letter-spacing: 0.05em;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}
/* \u6807\u9898 */
.mp-content-section h1 {
margin: 32px 0 16px;
font-size: 1.8em;
font-weight: bold;
color: #2b2b2b;
padding-bottom: 12px;
border-bottom: 3px solid #42b983;
text-align: center;
}
.mp-content-section h2 {
margin: 28px 0 14px;
font-size: 1.4em;
font-weight: bold;
color: #fff;
padding: 10px 16px;
background: linear-gradient(to right, #42b983 0%, #85d7b3 100%);
border-radius: 4px;
}
.mp-content-section h3 {
margin: 24px 0 12px;
font-size: 1.2em;
font-weight: bold;
color: #2b2b2b;
padding-left: 12px;
border-left: 4px solid #42b983;
}
.mp-content-section h4,
.mp-content-section h5,
.mp-content-section h6 {
margin: 20px 0 10px;
font-size: 1em;
font-weight: bold;
color: #2b2b2b;
}
/* \u6BB5\u843D */
.mp-content-section p {
margin: 15px 0;
line-height: 1.75;
color: #3f3f3f;
}
/* \u5217\u8868\uFF08\u5DF2\u8F6C\u6362\u4E3A section \u7ED3\u6784\uFF0C\u907F\u514D\u516C\u4F17\u53F7\u81EA\u52A8\u5904\u7406 ul/ol/li\uFF09 */
.mp-content-section .mp-list-section {
margin: 15px 0 0 0;
padding: 0;
}
.mp-content-section .mp-list-item {
line-height: 1.75;
color: #3f3f3f;
}
/* \u5F15\u7528 */
.mp-content-section blockquote {
margin: 20px 0;
padding: 15px 20px;
background-color: #f0faf5;
border-left: 4px solid #42b983;
color: #666;
font-style: italic;
border-radius: 0 6px 6px 0;
}
.mp-content-section blockquote p {
margin: 0;
line-height: inherit;
}
/* \u4EE3\u7801\u5757 */
.mp-content-section pre {
background: #282c34;
border-radius: 6px;
padding: 1em;
margin: 1.2em 0;
font-size: 14px;
line-height: 1.6;
overflow-x: auto;
border: none;
}
.mp-content-section pre code {
color: #abb2bf;
}
.mp-content-section code:not(pre code) {
background: #f0faf5;
padding: 2px 6px;
border-radius: 3px;
color: #42b983;
font-size: 0.9em;
}
/* \u94FE\u63A5 */
.mp-content-section a {
color: #42b983;
text-decoration: none;
border-bottom: 1px solid #42b983;
}
/* \u5F3A\u8C03 */
.mp-content-section strong {
font-weight: bold;
color: #2b2b2b;
}
.mp-content-section em {
font-style: italic;
}
.mp-content-section del {
text-decoration: line-through;
color: #999;
}
/* \u8868\u683C */
.mp-content-section table {
width: 100%;
margin: 1em 0;
border-collapse: collapse;
border: 1px solid #dfe2e5;
}
.mp-content-section th {
background: linear-gradient(135deg, #42b983, #85d7b3);
font-weight: bold;
color: #fff;
padding: 10px 15px;
border: 1px solid #dfe2e5;
}
.mp-content-section td {
padding: 10px 15px;
border: 1px solid #dfe2e5;
color: #3f3f3f;
}
.mp-content-section tr:nth-child(even) {
background-color: #f0faf5;
}
/* \u5206\u9694\u7EBF */
.mp-content-section hr {
border: none;
height: 2px;
background: linear-gradient(90deg, transparent, #42b983, transparent);
margin: 24px 0;
}
/* \u56FE\u7247 */
.mp-content-section img {
max-width: 100%;
height: auto;
display: block;
margin: 1.5em auto;
border-radius: 6px;
}
/* \u811A\u6CE8 */
.mp-content-section .footnote-ref,
.mp-content-section .footnote-backref {
color: #42b983;
text-decoration: none;
font-size: 0.9em;
}
/* Callout \u63D0\u793A\u6846 */
.mp-content-section .mp-callout {
border-radius: 6px;
padding: 12px 16px;
margin: 1em 0;
border-left: 4px solid #42b983;
background: #f0faf5;
}
.mp-content-section .mp-callout-title {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 8px;
font-weight: bold;
font-size: 1em;
line-height: 1.5;
}
.mp-content-section .mp-callout-content {
font-size: 0.95em;
line-height: 1.7;
color: #3f3f3f;
}
.mp-content-section .mp-callout-content p {
margin: 4px 0;
padding: 0;
line-height: 1.7;
}
.mp-content-section .mp-callout-note { border-left-color: #448aff; background: #e8f0fe; }
.mp-content-section .mp-callout-note .mp-callout-title { color: #448aff; }
.mp-content-section .mp-callout-info { border-left-color: #448aff; background: #e8f0fe; }
.mp-content-section .mp-callout-info .mp-callout-title { color: #448aff; }
.mp-content-section .mp-callout-tip { border-left-color: #00bfa5; background: #e6f7f2; }
.mp-content-section .mp-callout-tip .mp-callout-title { color: #00bfa5; }
.mp-content-section .mp-callout-hint { border-left-color: #00bfa5; background: #e6f7f2; }
.mp-content-section .mp-callout-hint .mp-callout-title { color: #00bfa5; }
.mp-content-section .mp-callout-important { border-left-color: #7c4dff; background: #f3e8fd; }
.mp-content-section .mp-callout-important .mp-callout-title { color: #7c4dff; }
.mp-content-section .mp-callout-warning { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-warning .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-caution { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-caution .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-danger { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-danger .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-error { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-error .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-bug { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-bug .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-success { border-left-color: #00c853; background: #e8f5e9; }
.mp-content-section .mp-callout-success .mp-callout-title { color: #00c853; }
.mp-content-section .mp-callout-check { border-left-color: #00c853; background: #e8f5e9; }
.mp-content-section .mp-callout-check .mp-callout-title { color: #00c853; }
.mp-content-section .mp-callout-done { border-left-color: #00c853; background: #e8f5e9; }
.mp-content-section .mp-callout-done .mp-callout-title { color: #00c853; }
.mp-content-section .mp-callout-question { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-question .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-help { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-help .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-faq { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-faq .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-failure { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-failure .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-fail { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-fail .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-missing { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-missing .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-abstract { border-left-color: #00b8d4; background: #e0f7fa; }
.mp-content-section .mp-callout-abstract .mp-callout-title { color: #00b8d4; }
.mp-content-section .mp-callout-summary { border-left-color: #00b8d4; background: #e0f7fa; }
.mp-content-section .mp-callout-summary .mp-callout-title { color: #00b8d4; }
.mp-content-section .mp-callout-tldr { border-left-color: #00b8d4; background: #e0f7fa; }
.mp-content-section .mp-callout-tldr .mp-callout-title { color: #00b8d4; }
.mp-content-section .mp-callout-example { border-left-color: #7c4dff; background: #f3e8fd; }
.mp-content-section .mp-callout-example .mp-callout-title { color: #7c4dff; }
.mp-content-section .mp-callout-todo { border-left-color: #448aff; background: #e8f0fe; }
.mp-content-section .mp-callout-todo .mp-callout-title { color: #448aff; }
.mp-content-section .mp-callout-quote { border-left-color: #9e9e9e; background: #f5f5f5; }
.mp-content-section .mp-callout-quote .mp-callout-title { color: #757575; }
.mp-content-section .mp-callout-cite { border-left-color: #9e9e9e; background: #f5f5f5; }
.mp-content-section .mp-callout-cite .mp-callout-title { color: #757575; }
`;var bl=`/* \u6E29\u6696\u6A59\u5149\u4E3B\u9898 */
.mp-content-section {
font-size: 16px;
color: #3f3f3f;
line-height: 1.75;
letter-spacing: 0.05em;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}
/* \u6807\u9898 */
.mp-content-section h1 {
margin: 32px 0 16px;
font-size: 1.8em;
font-weight: bold;
color: #fff;
padding: 12px 20px;
background-color: #ff6b35;
}
.mp-content-section h2 {
margin: 28px 0 14px;
font-size: 1.4em;
font-weight: bold;
color: #ff6b35;
padding: 10px 16px 10px 20px;
background-color: #fff3ed;
border-left: 4px solid #ff6b35;
}
.mp-content-section h3 {
margin: 24px 0 12px;
font-size: 1.2em;
font-weight: bold;
color: #2b2b2b;
padding-left: 12px;
border-left: 4px solid #ff6b35;
}
.mp-content-section h4,
.mp-content-section h5,
.mp-content-section h6 {
margin: 20px 0 10px;
font-size: 1em;
font-weight: bold;
color: #2b2b2b;
}
/* \u6BB5\u843D */
.mp-content-section p {
margin: 15px 0;
line-height: 1.75;
color: #3f3f3f;
}
/* \u5217\u8868\uFF08\u5DF2\u8F6C\u6362\u4E3A section \u7ED3\u6784\uFF0C\u907F\u514D\u516C\u4F17\u53F7\u81EA\u52A8\u5904\u7406 ul/ol/li\uFF09 */
.mp-content-section .mp-list-section {
margin: 15px 0 0 0;
padding: 0;
}
.mp-content-section .mp-list-item {
line-height: 1.75;
color: #3f3f3f;
}
/* \u5F15\u7528 */
.mp-content-section blockquote {
margin: 20px 0;
padding: 15px 20px;
background-color: #fff3ed;
border-left: 4px solid #ff6b35;
color: #666;
font-style: italic;
}
.mp-content-section blockquote p {
margin: 0;
line-height: inherit;
}
/* \u4EE3\u7801\u5757 */
.mp-content-section pre {
background: #2c2c2c;
border-radius: 5px;
padding: 1em;
margin: 1.2em 0;
font-size: 14px;
line-height: 1.5;
overflow-x: auto;
}
.mp-content-section pre code {
color: #abb2bf;
}
.mp-content-section code:not(pre code) {
background: #fff3ed;
padding: 2px 6px;
border-radius: 3px;
color: #ff6b35;
font-size: 0.9em;
}
/* \u94FE\u63A5 */
.mp-content-section a {
color: #ff6b35;
text-decoration: none;
border-bottom: 1px solid #ff6b35;
}
/* \u5F3A\u8C03 */
.mp-content-section strong {
font-weight: bold;
color: #2b2b2b;
}
.mp-content-section em {
font-style: italic;
}
.mp-content-section del {
text-decoration: line-through;
color: #999;
}
/* \u8868\u683C */
.mp-content-section table {
width: 100%;
margin: 1em 0;
border-collapse: collapse;
border: 1px solid #dfe2e5;
}
.mp-content-section th {
background-color: #ff6b35;
font-weight: bold;
color: #fff;
padding: 10px 15px;
border: 1px solid #dfe2e5;
}
.mp-content-section td {
padding: 10px 15px;
border: 1px solid #dfe2e5;
color: #3f3f3f;
}
.mp-content-section tr:nth-child(even) {
background-color: #fff3ed;
}
/* \u5206\u9694\u7EBF */
.mp-content-section hr {
border: none;
border-top: 1px solid #eee;
margin: 24px 0;
}
/* \u56FE\u7247 */
.mp-content-section img {
max-width: 100%;
height: auto;
display: block;
margin: 1.5em auto;
border-radius: 5px;
}
/* \u811A\u6CE8 */
.mp-content-section .footnote-ref,
.mp-content-section .footnote-backref {
color: #ff6b35;
text-decoration: none;
font-size: 0.9em;
}
/* Callout \u63D0\u793A\u6846 */
.mp-content-section .mp-callout {
border-radius: 5px;
padding: 12px 16px;
margin: 1em 0;
border-left: 4px solid #ff6b35;
background: #fff3ed;
}
.mp-content-section .mp-callout-title {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 8px;
font-weight: bold;
font-size: 1em;
line-height: 1.5;
}
.mp-content-section .mp-callout-content {
font-size: 0.95em;
line-height: 1.7;
color: #3f3f3f;
}
.mp-content-section .mp-callout-content p {
margin: 4px 0;
padding: 0;
line-height: 1.7;
}
.mp-content-section .mp-callout-note { border-left-color: #448aff; background: #e8f0fe; }
.mp-content-section .mp-callout-note .mp-callout-title { color: #448aff; }
.mp-content-section .mp-callout-info { border-left-color: #448aff; background: #e8f0fe; }
.mp-content-section .mp-callout-info .mp-callout-title { color: #448aff; }
.mp-content-section .mp-callout-tip { border-left-color: #00bfa5; background: #e6f7f2; }
.mp-content-section .mp-callout-tip .mp-callout-title { color: #00bfa5; }
.mp-content-section .mp-callout-hint { border-left-color: #00bfa5; background: #e6f7f2; }
.mp-content-section .mp-callout-hint .mp-callout-title { color: #00bfa5; }
.mp-content-section .mp-callout-important { border-left-color: #7c4dff; background: #f3e8fd; }
.mp-content-section .mp-callout-important .mp-callout-title { color: #7c4dff; }
.mp-content-section .mp-callout-warning { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-warning .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-caution { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-caution .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-danger { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-danger .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-error { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-error .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-bug { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-bug .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-success { border-left-color: #00c853; background: #e8f5e9; }
.mp-content-section .mp-callout-success .mp-callout-title { color: #00c853; }
.mp-content-section .mp-callout-check { border-left-color: #00c853; background: #e8f5e9; }
.mp-content-section .mp-callout-check .mp-callout-title { color: #00c853; }
.mp-content-section .mp-callout-done { border-left-color: #00c853; background: #e8f5e9; }
.mp-content-section .mp-callout-done .mp-callout-title { color: #00c853; }
.mp-content-section .mp-callout-question { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-question .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-help { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-help .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-faq { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-faq .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-failure { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-failure .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-fail { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-fail .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-missing { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-missing .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-abstract { border-left-color: #00b8d4; background: #e0f7fa; }
.mp-content-section .mp-callout-abstract .mp-callout-title { color: #00b8d4; }
.mp-content-section .mp-callout-summary { border-left-color: #00b8d4; background: #e0f7fa; }
.mp-content-section .mp-callout-summary .mp-callout-title { color: #00b8d4; }
.mp-content-section .mp-callout-tldr { border-left-color: #00b8d4; background: #e0f7fa; }
.mp-content-section .mp-callout-tldr .mp-callout-title { color: #00b8d4; }
.mp-content-section .mp-callout-example { border-left-color: #7c4dff; background: #f3e8fd; }
.mp-content-section .mp-callout-example .mp-callout-title { color: #7c4dff; }
.mp-content-section .mp-callout-todo { border-left-color: #448aff; background: #e8f0fe; }
.mp-content-section .mp-callout-todo .mp-callout-title { color: #448aff; }
.mp-content-section .mp-callout-quote { border-left-color: #9e9e9e; background: #f5f5f5; }
.mp-content-section .mp-callout-quote .mp-callout-title { color: #757575; }
.mp-content-section .mp-callout-cite { border-left-color: #9e9e9e; background: #f5f5f5; }
.mp-content-section .mp-callout-cite .mp-callout-title { color: #757575; }
`;var gl=`/* \u7329\u7EA2\u4E3B\u9898 - \u70ED\u60C5\u9192\u76EE */
.mp-content-section {
font-size: 16px;
color: #3f3f3f;
line-height: 1.75;
letter-spacing: 0.03em;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
}
/* \u6807\u9898 */
.mp-content-section h1 {
margin: 32px 0 16px;
font-size: 1.8em;
font-weight: bold;
color: #fff;
padding: 12px 20px;
background: linear-gradient(135deg, #dc2626, #ef4444);
border-radius: 4px;
}
.mp-content-section h2 {
margin: 28px 0 14px;
font-size: 1.4em;
font-weight: bold;
color: #dc2626;
padding: 10px 16px;
background-color: #fef2f2;
border-left: 4px solid #dc2626;
}
.mp-content-section h3 {
margin: 24px 0 12px;
font-size: 1.2em;
font-weight: bold;
color: #b91c1c;
padding-left: 12px;
border-left: 3px solid #dc2626;
}
.mp-content-section h4,
.mp-content-section h5,
.mp-content-section h6 {
margin: 20px 0 10px;
font-size: 1em;
font-weight: bold;
color: #991b1b;
}
/* \u6BB5\u843D */
.mp-content-section p {
margin: 15px 0;
line-height: 1.75;
color: #3f3f3f;
}
/* \u5217\u8868\uFF08\u5DF2\u8F6C\u6362\u4E3A section \u7ED3\u6784\uFF0C\u907F\u514D\u516C\u4F17\u53F7\u81EA\u52A8\u5904\u7406 ul/ol/li\uFF09 */
.mp-content-section .mp-list-section {
margin: 15px 0 0 0;
padding: 0;
}
.mp-content-section .mp-list-item {
line-height: 1.75;
color: #3f3f3f;
}
/* \u5F15\u7528 */
.mp-content-section blockquote {
margin: 20px 0;
padding: 15px 20px;
background-color: #fef2f2;
border-left: 4px solid #dc2626;
color: #666;
font-style: italic;
border-radius: 0 6px 6px 0;
}
.mp-content-section blockquote p {
margin: 0;
line-height: inherit;
}
/* \u4EE3\u7801\u5757 */
.mp-content-section pre {
background: #1f2937;
border-radius: 6px;
padding: 1em;
margin: 1.2em 0;
font-size: 14px;
line-height: 1.6;
overflow-x: auto;
}
.mp-content-section pre code {
color: #e5e7eb;
}
.mp-content-section code:not(pre code) {
background: #fef2f2;
padding: 2px 6px;
border-radius: 3px;
color: #dc2626;
font-size: 0.9em;
}
/* \u94FE\u63A5 */
.mp-content-section a {
color: #dc2626;
text-decoration: none;
border-bottom: 1px solid #dc2626;
}
/* \u5F3A\u8C03 */
.mp-content-section strong {
font-weight: bold;
color: #1f2937;
}
.mp-content-section em {
font-style: italic;
}
.mp-content-section del {
text-decoration: line-through;
color: #999;
}
/* \u8868\u683C */
.mp-content-section table {
width: 100%;
margin: 1em 0;
border-collapse: collapse;
border: 1px solid #e5e7eb;
}
.mp-content-section th {
background: linear-gradient(135deg, #dc2626, #ef4444);
font-weight: bold;
color: #fff;
padding: 10px 15px;
border: 1px solid #e5e7eb;
}
.mp-content-section td {
padding: 10px 15px;
border: 1px solid #e5e7eb;
color: #3f3f3f;
}
.mp-content-section tr:nth-child(even) {
background-color: #fef2f2;
}
/* \u5206\u9694\u7EBF */
.mp-content-section hr {
border: none;
height: 2px;
background: linear-gradient(90deg, transparent, #dc2626, transparent);
margin: 24px 0;
}
/* \u56FE\u7247 */
.mp-content-section img {
max-width: 100%;
height: auto;
display: block;
margin: 1.5em auto;
border-radius: 6px;
}
/* \u811A\u6CE8 */
.mp-content-section .footnote-ref,
.mp-content-section .footnote-backref {
color: #dc2626;
text-decoration: none;
font-size: 0.9em;
}
/* Callout \u63D0\u793A\u6846 */
.mp-content-section .mp-callout {
border-radius: 6px;
padding: 12px 16px;
margin: 1em 0;
border-left: 4px solid #dc2626;
background: #fef2f2;
}
.mp-content-section .mp-callout-title {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 8px;
font-weight: bold;
font-size: 1em;
line-height: 1.5;
}
.mp-content-section .mp-callout-content {
font-size: 0.95em;
line-height: 1.7;
color: #3f3f3f;
}
.mp-content-section .mp-callout-content p {
margin: 4px 0;
padding: 0;
line-height: 1.7;
}
.mp-content-section .mp-callout-note { border-left-color: #448aff; background: #e8f0fe; }
.mp-content-section .mp-callout-note .mp-callout-title { color: #448aff; }
.mp-content-section .mp-callout-info { border-left-color: #448aff; background: #e8f0fe; }
.mp-content-section .mp-callout-info .mp-callout-title { color: #448aff; }
.mp-content-section .mp-callout-tip { border-left-color: #00bfa5; background: #e6f7f2; }
.mp-content-section .mp-callout-tip .mp-callout-title { color: #00bfa5; }
.mp-content-section .mp-callout-hint { border-left-color: #00bfa5; background: #e6f7f2; }
.mp-content-section .mp-callout-hint .mp-callout-title { color: #00bfa5; }
.mp-content-section .mp-callout-important { border-left-color: #7c4dff; background: #f3e8fd; }
.mp-content-section .mp-callout-important .mp-callout-title { color: #7c4dff; }
.mp-content-section .mp-callout-warning { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-warning .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-caution { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-caution .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-danger { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-danger .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-error { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-error .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-bug { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-bug .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-success { border-left-color: #00c853; background: #e8f5e9; }
.mp-content-section .mp-callout-success .mp-callout-title { color: #00c853; }
.mp-content-section .mp-callout-check { border-left-color: #00c853; background: #e8f5e9; }
.mp-content-section .mp-callout-check .mp-callout-title { color: #00c853; }
.mp-content-section .mp-callout-done { border-left-color: #00c853; background: #e8f5e9; }
.mp-content-section .mp-callout-done .mp-callout-title { color: #00c853; }
.mp-content-section .mp-callout-question { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-question .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-help { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-help .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-faq { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-faq .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-failure { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-failure .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-fail { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-fail .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-missing { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-missing .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-abstract { border-left-color: #00b8d4; background: #e0f7fa; }
.mp-content-section .mp-callout-abstract .mp-callout-title { color: #00b8d4; }
.mp-content-section .mp-callout-summary { border-left-color: #00b8d4; background: #e0f7fa; }
.mp-content-section .mp-callout-summary .mp-callout-title { color: #00b8d4; }
.mp-content-section .mp-callout-tldr { border-left-color: #00b8d4; background: #e0f7fa; }
.mp-content-section .mp-callout-tldr .mp-callout-title { color: #00b8d4; }
.mp-content-section .mp-callout-example { border-left-color: #7c4dff; background: #f3e8fd; }
.mp-content-section .mp-callout-example .mp-callout-title { color: #7c4dff; }
.mp-content-section .mp-callout-todo { border-left-color: #448aff; background: #e8f0fe; }
.mp-content-section .mp-callout-todo .mp-callout-title { color: #448aff; }
.mp-content-section .mp-callout-quote { border-left-color: #9e9e9e; background: #f5f5f5; }
.mp-content-section .mp-callout-quote .mp-callout-title { color: #757575; }
.mp-content-section .mp-callout-cite { border-left-color: #9e9e9e; background: #f5f5f5; }
.mp-content-section .mp-callout-cite .mp-callout-title { color: #757575; }
`;var El=`/* \u5B66\u672F\u4E3B\u9898 - \u4E25\u8C28\u4E13\u4E1A */
.mp-content-section {
font-size: 16px;
color: #333;
line-height: 1.8;
letter-spacing: 0.02em;
font-family: 'Times New Roman', 'Noto Serif SC', 'Source Han Serif CN', Georgia, serif;
}
/* \u6807\u9898 */
.mp-content-section h1 {
margin: 36px 0 18px;
font-size: 1.8em;
font-weight: bold;
color: #1a365d;
text-align: center;
padding-bottom: 10px;
border-bottom: 2px solid #2b6cb0;
}
.mp-content-section h2 {
margin: 30px 0 15px;
font-size: 1.4em;
font-weight: bold;
color: #2b6cb0;
padding-bottom: 6px;
border-bottom: 1px solid #bee3f8;
}
.mp-content-section h3 {
margin: 24px 0 12px;
font-size: 1.2em;
font-weight: bold;
color: #2c5282;
}
.mp-content-section h4,
.mp-content-section h5,
.mp-content-section h6 {
margin: 20px 0 10px;
font-size: 1em;
font-weight: bold;
color: #2a4365;
}
/* \u6BB5\u843D */
.mp-content-section p {
margin: 1em 0;
line-height: 1.8;
text-align: justify;
color: #333;
}
/* \u5217\u8868\uFF08\u5DF2\u8F6C\u6362\u4E3A section \u7ED3\u6784\uFF0C\u907F\u514D\u516C\u4F17\u53F7\u81EA\u52A8\u5904\u7406 ul/ol/li\uFF09 */
.mp-content-section .mp-list-section {
margin: 1em 0 0 0;
padding: 0;
}
.mp-content-section .mp-list-item {
line-height: 1.8;
color: #333;
}
/* \u5F15\u7528 */
.mp-content-section blockquote {
border-left: 3px solid #2b6cb0;
padding: 12px 20px;
background: #ebf8ff;
margin: 1em 0;
color: #2a4365;
font-style: italic;
}
.mp-content-section blockquote p {
margin: 0;
line-height: inherit;
}
/* \u4EE3\u7801\u5757 */
.mp-content-section pre {
background: #f7fafc;
border: 1px solid #e2e8f0;
border-radius: 4px;
padding: 1em;
margin: 1.2em 0;
font-size: 13px;
line-height: 1.6;
overflow-x: auto;
}
.mp-content-section code:not(pre code) {
background: #ebf8ff;
padding: 2px 5px;
border-radius: 3px;
color: #2b6cb0;
font-size: 0.9em;
}
/* \u94FE\u63A5 */
.mp-content-section a {
color: #2b6cb0;
text-decoration: none;
border-bottom: 1px solid #2b6cb0;
}
/* \u5F3A\u8C03 */
.mp-content-section strong {
font-weight: bold;
color: #1a365d;
}
.mp-content-section em {
font-style: italic;
}
.mp-content-section del {
text-decoration: line-through;
color: #a0aec0;
}
/* \u8868\u683C */
.mp-content-section table {
width: 100%;
margin: 1em 0;
border-collapse: collapse;
border: 1px solid #e2e8f0;
}
.mp-content-section th {
background: #ebf8ff;
font-weight: bold;
color: #1a365d;
padding: 10px 12px;
border: 1px solid #e2e8f0;
text-align: left;
}
.mp-content-section td {
padding: 10px 12px;
border: 1px solid #e2e8f0;
color: #333;
}
.mp-content-section tr:nth-child(even) {
background-color: #f7fafc;
}
/* \u5206\u9694\u7EBF */
.mp-content-section hr {
border: none;
border-top: 1px solid #e2e8f0;
margin: 24px 0;
}
/* \u56FE\u7247 */
.mp-content-section img {
max-width: 100%;
height: auto;
display: block;
margin: 1.5em auto;
}
/* \u811A\u6CE8 */
.mp-content-section .footnote-ref,
.mp-content-section .footnote-backref {
color: #2b6cb0;
text-decoration: none;
font-size: 0.85em;
vertical-align: super;
}
/* Callout \u63D0\u793A\u6846 */
.mp-content-section .mp-callout {
border-radius: 4px;
padding: 12px 16px;
margin: 1em 0;
border-left: 3px solid #2b6cb0;
background: #ebf8ff;
}
.mp-content-section .mp-callout-title {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 8px;
font-weight: bold;
font-size: 1em;
line-height: 1.5;
}
.mp-content-section .mp-callout-content {
font-size: 0.95em;
line-height: 1.7;
color: #333;
}
.mp-content-section .mp-callout-content p {
margin: 4px 0;
padding: 0;
line-height: 1.7;
}
.mp-content-section .mp-callout-note { border-left-color: #448aff; background: #e8f0fe; }
.mp-content-section .mp-callout-note .mp-callout-title { color: #448aff; }
.mp-content-section .mp-callout-info { border-left-color: #448aff; background: #e8f0fe; }
.mp-content-section .mp-callout-info .mp-callout-title { color: #448aff; }
.mp-content-section .mp-callout-tip { border-left-color: #00bfa5; background: #e6f7f2; }
.mp-content-section .mp-callout-tip .mp-callout-title { color: #00bfa5; }
.mp-content-section .mp-callout-hint { border-left-color: #00bfa5; background: #e6f7f2; }
.mp-content-section .mp-callout-hint .mp-callout-title { color: #00bfa5; }
.mp-content-section .mp-callout-important { border-left-color: #7c4dff; background: #f3e8fd; }
.mp-content-section .mp-callout-important .mp-callout-title { color: #7c4dff; }
.mp-content-section .mp-callout-warning { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-warning .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-caution { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-caution .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-danger { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-danger .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-error { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-error .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-bug { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-bug .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-success { border-left-color: #00c853; background: #e8f5e9; }
.mp-content-section .mp-callout-success .mp-callout-title { color: #00c853; }
.mp-content-section .mp-callout-check { border-left-color: #00c853; background: #e8f5e9; }
.mp-content-section .mp-callout-check .mp-callout-title { color: #00c853; }
.mp-content-section .mp-callout-done { border-left-color: #00c853; background: #e8f5e9; }
.mp-content-section .mp-callout-done .mp-callout-title { color: #00c853; }
.mp-content-section .mp-callout-question { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-question .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-help { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-help .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-faq { border-left-color: #ff9100; background: #fff8e1; }
.mp-content-section .mp-callout-faq .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-failure { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-failure .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-fail { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-fail .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-missing { border-left-color: #ff1744; background: #ffeef0; }
.mp-content-section .mp-callout-missing .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-abstract { border-left-color: #00b8d4; background: #e0f7fa; }
.mp-content-section .mp-callout-abstract .mp-callout-title { color: #00b8d4; }
.mp-content-section .mp-callout-summary { border-left-color: #00b8d4; background: #e0f7fa; }
.mp-content-section .mp-callout-summary .mp-callout-title { color: #00b8d4; }
.mp-content-section .mp-callout-tldr { border-left-color: #00b8d4; background: #e0f7fa; }
.mp-content-section .mp-callout-tldr .mp-callout-title { color: #00b8d4; }
.mp-content-section .mp-callout-example { border-left-color: #7c4dff; background: #f3e8fd; }
.mp-content-section .mp-callout-example .mp-callout-title { color: #7c4dff; }
.mp-content-section .mp-callout-todo { border-left-color: #448aff; background: #e8f0fe; }
.mp-content-section .mp-callout-todo .mp-callout-title { color: #448aff; }
.mp-content-section .mp-callout-quote { border-left-color: #9e9e9e; background: #f5f5f5; }
.mp-content-section .mp-callout-quote .mp-callout-title { color: #757575; }
.mp-content-section .mp-callout-cite { border-left-color: #9e9e9e; background: #f5f5f5; }
.mp-content-section .mp-callout-cite .mp-callout-title { color: #757575; }
`;var Tl=`/**
* Theme: \u591A\u5F69
* Author: joeytoday
* Source: https://github.com/joeytoday/obsidian-mp-publisher
* Description: \u591A\u5F69\u98CE\u683C\u4E3B\u9898\uFF0C\u7F51\u683C\u80CC\u666F + \u5F69\u8272\u6807\u9898\u5C42\u7EA7
*/
.mp-content-section {
font-size: 16px;
color: #333;
line-height: 1.8;
letter-spacing: 0.02em;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
background-image:
linear-gradient(rgba(200, 200, 220, 0.15) 1px, transparent 1px),
linear-gradient(90deg, rgba(200, 200, 220, 0.15) 1px, transparent 1px);
background-size: 24px 24px;
}
/* ========== \u6807\u9898 ========== */
/* \u4E00\u7EA7\u6807\u9898\uFF1A\u7EA2\u8272\u5C45\u4E2D */
.mp-content-section h1 {
margin: 36px 0 18px;
font-size: 1.8em;
font-weight: bold;
color: #e03030;
text-align: center;
}
/* \u4E8C\u7EA7\u6807\u9898\uFF1A\u5DE6\u4FA7\u7EFF\u8272\u7AD6\u7EBF + \u7EFF\u8272\u6587\u5B57 */
.mp-content-section h2 {
margin: 30px 0 15px;
font-size: 1.4em;
font-weight: bold;
color: #4C8027;
padding-left: 12px;
border-left: 4px solid #4B8026;
}
/* \u4E09\u7EA7\u6807\u9898\uFF1A\u84DD\u7D2B\u8272\u6587\u5B57 + \u6D45\u84DD\u7D2B\u80CC\u666F */
.mp-content-section h3 {
margin: 24px 0 12px;
font-size: 1.2em;
font-weight: bold;
color: #3947C6;
background-color: #E5E7F5;
padding: 6px 12px;
border-radius: 4px;
}
.mp-content-section h4,
.mp-content-section h5,
.mp-content-section h6 {
margin: 20px 0 10px;
font-size: 1em;
font-weight: bold;
color: #333;
}
/* ========== \u6BB5\u843D ========== */
.mp-content-section p {
margin: 1em 0;
line-height: 1.8;
text-align: justify;
color: #333;
}
/* ========== \u5217\u8868 ========== */
.mp-content-section ul,
.mp-content-section ol {
padding-left: 2em;
margin: 1em 0;
}
.mp-content-section li {
margin: 0.4em 0;
line-height: 1.8;
color: #333;
}
/* ========== \u5F15\u7528 ========== */
.mp-content-section blockquote {
border: none;
border-left: none;
padding: 18px 24px;
background: #F4F4F4;
margin: 1.5em 0;
color: #acacac;
font-style: normal;
border-radius: 8px;
}
.mp-content-section blockquote p {
margin: 0.5em 0;
line-height: 1.8;
}
/* ========== \u4EE3\u7801\u5757 ========== */
.mp-content-section pre {
background: #F8F8F8;
border: 1px solid #E8E7E4;
border-radius: 4px;
padding: 1em;
margin: 1.2em 0;
font-size: 13px;
line-height: 1.6;
overflow-x: auto;
}
.mp-content-section pre .mp-code-header {
margin-bottom: 0.8em;
display: flex;
gap: 6px;
}
.mp-content-section pre .mp-code-dot {
width: 10px;
height: 10px;
border-radius: 50%;
}
.mp-content-section pre .mp-code-dot:nth-child(1) { background-color: #fc8181; }
.mp-content-section pre .mp-code-dot:nth-child(2) { background-color: #f6e05e; }
.mp-content-section pre .mp-code-dot:nth-child(3) { background-color: #68d391; }
.mp-content-section code:not(pre code) {
background: #F9F8F7;
padding: 2px 5px;
border-radius: 3px;
color: #BF7067;
font-size: 0.9em;
}
/* ========== \u94FE\u63A5 ========== */
.mp-content-section a {
color: #2b6cb0;
text-decoration: none;
border-bottom: 1px solid #2b6cb0;
}
/* ========== \u5F3A\u8C03\u6837\u5F0F ========== */
/* \u52A0\u7C97\uFF1A\u9002\u914D\u660E\u6697\u6A21\u5F0F */
.mp-content-section strong {
font-weight: bold;
color: #000000;
}
@media (prefers-color-scheme: dark) {
.mp-content-section strong {
color: #ffffff;
}
}
/* \u659C\u4F53\uFF1A\u84DD\u8272 */
.mp-content-section em {
font-style: italic;
color: #2b6cb0;
}
/* \u5220\u9664\u7EBF */
.mp-content-section del {
text-decoration: line-through;
color: #a0aec0;
}
/* \u9AD8\u4EAE\uFF1A\u80CC\u666F\u8272 #F9DB6B */
.mp-content-section mark {
background-color: #F9DB6B;
padding: 2px 4px;
border-radius: 2px;
}
/* ========== \u8868\u683C ========== */
.mp-content-section table {
width: 100%;
margin: 1em 0;
border-collapse: collapse;
border: 1px solid #e2e8f0;
}
.mp-content-section th {
background: #f0f4f8;
font-weight: bold;
color: #333;
padding: 10px 12px;
border: 1px solid #e2e8f0;
text-align: left;
}
.mp-content-section td {
padding: 10px 12px;
border: 1px solid #e2e8f0;
color: #333;
}
.mp-content-section tr:nth-child(even) {
background-color: #f7fafc;
}
/* ========== \u5206\u9694\u7EBF ========== */
.mp-content-section hr {
border: none;
border-top: 1px solid #e2e8f0;
margin: 24px 0;
}
/* ========== \u56FE\u7247 ========== */
.mp-content-section img {
max-width: 100%;
height: auto;
display: block;
margin: 1.5em auto;
}
/* ========== \u811A\u6CE8 ========== */
.mp-content-section .footnote-ref,
.mp-content-section .footnote-backref {
color: #2b6cb0;
text-decoration: none;
font-size: 0.85em;
vertical-align: super;
}`;var xl=`/**
* Theme: \u5FAE\u4FE1\u7EFF
* Author: sweetwisdom
* Source: https://github.com/sweetwisdom
* Description: \u6E05\u65B0\u7EFF\u97F5\u4E3B\u9898\uFF0C\u6781\u7B80\u7EFF\u8272\u7CFB
*/
/* \u6E05\u65B0\u7EFF\u97F5\u4E3B\u9898 - \u6781\u7B80\u7EFF\u8272\u7CFB */
.mp-content-section {
font-size: 16px;
color: #333333;
line-height: 1.8;
letter-spacing: 0.05em;
font-family: 'Georgia', 'Noto Serif SC', 'Source Han Serif CN', serif;
}
/* \u6807\u9898 - \u5168\u7EFF\u8272\u8FB9\u6846+\u6587\u5B57 */
.mp-content-section h1 {
margin: 36px 0 18px;
font-size: 1.8em;
font-weight: bold;
color: #35B378;
text-align: center;
padding-bottom: 12px;
border-bottom: 2px solid #35B378;
letter-spacing: 0.1em;
}
.mp-content-section h2 {
margin: 30px 0 15px;
font-size: 1.4em;
font-weight: bold;
color: #35B378;
padding-left: 15px;
border-left: 4px solid #35B378;
}
.mp-content-section h3 {
margin: 24px 0 12px;
font-size: 1.2em;
font-weight: bold;
color: #35B378;
}
.mp-content-section h4,
.mp-content-section h5,
.mp-content-section h6 {
margin: 20px 0 10px;
font-size: 1em;
font-weight: bold;
color: #35B378;
}
/* \u6BB5\u843D */
.mp-content-section p {
margin: 1em 0;
line-height: 2;
text-indent: 0;
color: #333333;
}
/* \u5217\u8868 */
.mp-content-section .mp-list-section {
margin: 1em 0 0 0;
padding: 0;
}
.mp-content-section .mp-list-item {
line-height: 1.8;
color: #333333;
}
/* \u5F15\u7528 - \u7EFF\u8272\u8FB9\u6846+\u6D45\u7EFF\u80CC\u666F */
.mp-content-section blockquote {
border-left: 3px solid #35B378;
padding: 12px 20px;
background: #F0FAF5;
margin: 1em 0;
color: #35B378;
font-style: italic;
border-radius: 0 8px 8px 0;
}
.mp-content-section blockquote p {
margin: 0;
line-height: inherit;
}
/* \u4EE3\u7801\u5757 - \u7EFF\u8272\u8FB9\u6846+\u6D45\u7EFF\u5E95\u8272 */
.mp-content-section pre {
background: #F8FDFA;
border: 1px solid #35B378;
border-radius: 6px;
padding: 1em;
margin: 1.2em 0;
font-size: 14px;
line-height: 1.6;
overflow-x: auto;
}
.mp-content-section code:not(pre code) {
background: #F0FAF5;
padding: 2px 6px;
border-radius: 3px;
color: #35B378;
font-size: 0.9em;
}
/* \u94FE\u63A5 - \u5168\u7EFF\u8272 */
.mp-content-section a {
color: #35B378;
text-decoration: none;
border-bottom: 1px solid #35B378;
}
/* \u5F3A\u8C03\u6587\u672C - \u7EFF\u8272\u52A0\u7C97 */
.mp-content-section strong {
font-weight: bold;
color: #35B378;
}
.mp-content-section em {
font-style: italic;
color: #333333;
}
.mp-content-section del {
text-decoration: line-through;
color: #999;
}
/* \u8868\u683C - \u7EFF\u8272\u8FB9\u6846+\u6E10\u53D8\u8868\u5934 */
.mp-content-section table {
width: 100%;
margin: 1em 0;
border-collapse: collapse;
border: 1px solid #35B378;
}
.mp-content-section th {
background: linear-gradient(135deg, #F0FAF5, #E6F7F0);
font-weight: bold;
color: #35B378;
padding: 10px;
border: 1px solid #35B378;
}
.mp-content-section td {
padding: 10px;
border: 1px solid #35B378;
color: #333333;
}
/* \u5206\u9694\u7EBF - \u7EFF\u8272 */
.mp-content-section hr {
border: none;
border-top: 1px solid #35B378;
margin: 24px 0;
}
/* \u56FE\u7247 - \u7EFF\u8272\u9634\u5F71 */
.mp-content-section img {
max-width: 100%;
height: auto;
display: block;
margin: 1.5em auto;
border-radius: 6px;
box-shadow: 0 2px 8px rgba(53, 179, 120, 0.15);
}
/* \u811A\u6CE8 - \u7EFF\u8272 */
.mp-content-section .footnote-ref,
.mp-content-section .footnote-backref {
color: #35B378;
text-decoration: none;
font-size: 0.9em;
}
/* Callout \u63D0\u793A\u6846 - \u7EDF\u4E00\u7EFF\u8272\u4E3B\u9898\uFF0C\u4FDD\u7559\u529F\u80FD\u533A\u5206 */
.mp-content-section .mp-callout {
border-radius: 6px;
padding: 12px 16px;
margin: 1em 0;
border-left: 3px solid #35B378;
background: #F0FAF5;
}
.mp-content-section .mp-callout-title {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 8px;
font-weight: bold;
font-size: 1em;
line-height: 1.5;
color: #35B378;
}
.mp-content-section .mp-callout-content {
font-size: 0.95em;
line-height: 1.7;
color: #333333;
}
.mp-content-section .mp-callout-content p {
margin: 4px 0;
padding: 0;
line-height: 1.7;
}
/* \u7EDF\u4E00\u7EFF\u8272\u7CFB\u63D0\u793A\u6846\uFF0C\u4EC5\u6DF1\u6D45\u533A\u5206 */
.mp-content-section .mp-callout-note,
.mp-content-section .mp-callout-info,
.mp-content-section .mp-callout-tip,
.mp-content-section .mp-callout-hint,
.mp-content-section .mp-callout-important,
.mp-content-section .mp-callout-summary,
.mp-content-section .mp-callout-example,
.mp-content-section .mp-callout-todo {
border-left-color: #35B378;
background: #F0FAF5;
}
.mp-content-section .mp-callout-warning,
.mp-content-section .mp-callout-caution,
.mp-content-section .mp-callout-question,
.mp-content-section .mp-callout-help,
.mp-content-section .mp-callout-faq {
border-left-color: #35B378;
background: #E6F7F0;
}
.mp-content-section .mp-callout-success,
.mp-content-section .mp-callout-check,
.mp-content-section .mp-callout-done {
border-left-color: #2D9F6B;
background: #D1F0E1;
}
.mp-content-section .mp-callout-danger,
.mp-content-section .mp-callout-error,
.mp-content-section .mp-callout-bug,
.mp-content-section .mp-callout-failure,
.mp-content-section .mp-callout-fail,
.mp-content-section .mp-callout-missing {
border-left-color: #FF4D4F;
background: #FFF2F2;
}
.mp-content-section .mp-callout-quote,
.mp-content-section .mp-callout-cite {
border-left-color: #999;
background: #F5F5F5;
}
`;var yl=`/**
* Theme: \u8D64\u971E \xB7 Crimson Glow
* Author: Duyuxuan
* Source: https://github.com/du-yuxuan
* Description: \u6DF1\u84DD + \u53E4\u94DC\u91D1\uFF0C\u6C89\u9759\u4E66\u5377\u6C14\u3002H2 \u81EA\u52A8\u5E8F\u53F7\u3001H1/H3 \u91D1\u70B9\u88C5\u9970\u3001\u5F15\u7528\u5757\u5927\u5F15\u53F7\u3001Callout \u88C5\u9970\u7B26\u53F7\u3002\u6240\u6709 ::before/::after \u5728\u590D\u5236/\u53D1\u5E03\u65F6\u7531 prerenderPseudoElements \u8F6C\u4E3A\u771F\u5B9E DOM \u5143\u7D20\u3002
*/
/* ==================== \u5168\u5C40 ==================== */
.mp-content-section {
font-size: 16px;
color: #1e293b;
line-height: 1.85;
letter-spacing: 0.04em;
font-family: "Noto Serif SC", "Source Han Serif SC", "PingFang SC", "Hiragino Mincho ProN", "Songti SC", Georgia, serif;
counter-reset: h2-counter;
}
/* ==================== \u6807\u9898 ==================== */
/* H1\uFF1A\u6DF1\u84DD\u6587\u5B57 + \u53F3\u4E0B\u91D1\u8272\u5706\u70B9 */
.mp-content-section h1 {
margin: 40px 0 32px;
font-size: 1.7em;
font-weight: 700;
color: #1e3a6e;
letter-spacing: 0.05em;
}
.mp-content-section h1::after {
content: "";
display: block;
width: 18px;
height: 18px;
margin: 8px 0 0 auto;
background: #c4a265;
border-radius: 50%;
}
/* H2\uFF1A\u81EA\u52A8\u5E8F\u53F7 01 02 03\u2026 */
.mp-content-section h2 {
counter-increment: h2-counter;
margin: 36px 0 18px;
font-size: 1.3em;
font-weight: 700;
color: #1e3a6e;
letter-spacing: 0.05em;
}
.mp-content-section h2::before {
content: counter(h2-counter, decimal-leading-zero);
display: block;
margin-bottom: 4px;
font-size: 2.2em;
font-weight: 300;
line-height: 1.1;
color: #c4a265;
font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
letter-spacing: 0.02em;
}
/* H3\uFF1A\u53F3\u4FA7\u540C\u884C\u91D1\u8272\u5706\u70B9 */
.mp-content-section h3 {
margin: 26px 0 12px;
font-size: 1.15em;
font-weight: 700;
color: #1a2f5a;
letter-spacing: 0.04em;
display: flex;
align-items: center;
justify-content: space-between;
}
.mp-content-section h3::after {
content: "";
display: block;
width: 10px;
height: 10px;
min-width: 10px;
margin-left: 12px;
background: #c4a265;
border-radius: 50%;
}
.mp-content-section h4,
.mp-content-section h5,
.mp-content-section h6 {
margin: 22px 0 10px;
font-size: 1em;
font-weight: 700;
color: #334155;
}
/* ==================== \u6BB5\u843D ==================== */
.mp-content-section p {
margin: 16px 0;
line-height: 1.85;
color: #1e293b;
}
/* ==================== \u5217\u8868 ==================== */
.mp-content-section .mp-list-section {
margin: 16px 0 0 0;
color: #1e293b;
}
.mp-content-section .mp-list-item {
line-height: 1.85;
color: #1e293b;
}
/* ==================== \u5F15\u7528\u5757\uFF1A\u91D1\u8272\u5927\u5F15\u53F7 + \u6D45\u84DD\u5E95 ==================== */
.mp-content-section blockquote {
margin: 24px 0;
padding: 28px 24px 20px 52px;
background: transparent;
border: none;
border-radius: 8px;
color: #475569;
font-style: italic;
letter-spacing: 0.03em;
position: relative;
}
.mp-content-section blockquote::before {
content: "\\201C";
position: absolute;
left: 14px;
top: 6px;
font-size: 3em;
line-height: 1;
color: #c4a265;
font-family: Georgia, "Times New Roman", serif;
font-style: normal;
font-weight: 700;
}
.mp-content-section blockquote p {
margin: 0;
line-height: inherit;
color: inherit;
}
/* ==================== \u4EE3\u7801\u5757 ==================== */
.mp-content-section pre {
color: #cbd5e1;
background: #0f172a;
border-radius: 4px;
margin: 1.2em 0;
padding: 1.2em;
font-size: 14px;
line-height: 1.7;
white-space: pre-wrap;
overflow-x: auto;
}
.mp-content-section code:not(pre code) {
background: #edf2fa;
padding: 2px 8px;
border-radius: 3px;
color: #1e3a6e;
font-size: 0.9em;
font-family: "SF Mono", "Cascadia Code", "Fira Code", monospace;
}
/* ==================== \u94FE\u63A5 ==================== */
.mp-content-section a {
color: #1e3a6e;
text-decoration: none;
border-bottom: 1px solid #c4a265;
}
/* ==================== \u5F3A\u8C03 ==================== */
.mp-content-section strong {
font-weight: 800;
color: #1e3a6e;
}
.mp-content-section em {
font-style: italic;
color: #334155;
}
.mp-content-section del {
text-decoration: line-through;
color: #94a3b8;
}
/* ==================== \u8868\u683C ==================== */
.mp-content-section table {
width: 100%;
margin: 1.2em 0;
border-collapse: collapse;
border: 1px solid #cbd5e1;
font-size: 0.95em;
display: block;
overflow-x: auto;
}
.mp-content-section th {
background: linear-gradient(180deg, #1a2f5a, #1e3a6e);
font-weight: 700;
color: #f8fafc;
padding: 11px 16px;
border: 1px solid #94a3b8;
letter-spacing: 0.04em;
white-space: nowrap;
}
.mp-content-section td {
padding: 11px 16px;
border: 1px solid #cbd5e1;
color: #1e293b;
white-space: nowrap;
}
.mp-content-section tr:nth-child(even) {
background-color: #f3f6fc;
}
/* ==================== \u5206\u9694\u7EBF\uFF1A\u4E24\u7AEF\u6E10\u53D8\u9690\u6CA1 ==================== */
.mp-content-section hr {
border: none;
height: 1px;
margin: 32px 0;
background: linear-gradient(90deg, transparent, #c4a265 40%, #c4a265 60%, transparent);
}
/* ==================== \u56FE\u7247 ==================== */
.mp-content-section img {
max-width: 100%;
height: auto;
display: block;
margin: 1.8em auto;
border-radius: 2px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
/* ---- \u56FE\u7247\u56FE\u6CE8 ---- */
.mp-content-section .mp-figcaption {
display: block;
margin: -0.5em auto 1.8em;
text-align: center;
font-size: 0.85em;
color: #94a3b8;
letter-spacing: 0.04em;
line-height: 1.6;
}
/* ==================== \u811A\u6CE8 ==================== */
.mp-content-section .footnote-ref,
.mp-content-section .footnote-backref {
color: #1e3a6e;
text-decoration: none;
font-size: 0.85em;
}
/* ==================== Callout \u63D0\u793A\u6846\uFF08\u88C5\u9970\u7B26\u53F7 + \u65E0\u80CC\u666F\u65E0\u8FB9\u6846\uFF09 ==================== */
.mp-content-section .mp-callout {
border-radius: 0;
padding: 16px 20px 16px 60px;
margin: 1em 0;
border: none;
background: none;
position: relative;
}
.mp-content-section .mp-callout::before {
position: absolute;
left: 12px;
top: 10px;
font-size: 2.4em;
line-height: 1;
font-family: Georgia, "Times New Roman", serif;
font-weight: 400;
opacity: 0.35;
}
.mp-content-section .mp-callout-title {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 8px;
font-weight: 700;
font-size: 1em;
line-height: 1.5;
color: #3d5270;
}
.mp-content-section .mp-callout-content {
font-size: 0.95em;
line-height: 1.8;
color: #1e293b;
}
.mp-content-section .mp-callout-content p {
margin: 4px 0;
padding: 0;
line-height: 1.8;
}
/* Callout \u7C7B\u578B\u53D8\u4F53 */
.mp-callout-note::before, .mp-callout-info::before { content: "\\203B"; color: #4a628a; }
.mp-callout-note .mp-callout-title, .mp-callout-info .mp-callout-title { color: #3d5270; }
.mp-callout-tip::before, .mp-callout-hint::before { content: "\\2726"; color: #5a7a5a; }
.mp-callout-tip .mp-callout-title, .mp-callout-hint .mp-callout-title { color: #4a624a; }
.mp-callout-important::before, .mp-callout-example::before { content: "\\25C6"; color: #6a5a7a; }
.mp-callout-important .mp-callout-title, .mp-callout-example .mp-callout-title { color: #5a4a6a; }
.mp-callout-warning::before, .mp-callout-caution::before, .mp-callout-attention::before,
.mp-callout-question::before, .mp-callout-help::before, .mp-callout-faq::before
{ content: "\\25B2"; color: #8a7a5a; }
.mp-callout-warning .mp-callout-title, .mp-callout-caution .mp-callout-title,
.mp-callout-attention .mp-callout-title, .mp-callout-question .mp-callout-title,
.mp-callout-help .mp-callout-title, .mp-callout-faq .mp-callout-title { color: #6a5a3a; }
.mp-callout-danger::before, .mp-callout-error::before, .mp-callout-bug::before,
.mp-callout-failure::before, .mp-callout-fail::before, .mp-callout-missing::before
{ content: "\\2715"; color: #9a6a6a; }
.mp-callout-danger .mp-callout-title, .mp-callout-error .mp-callout-title,
.mp-callout-bug .mp-callout-title, .mp-callout-failure .mp-callout-title,
.mp-callout-fail .mp-callout-title, .mp-callout-missing .mp-callout-title { color: #8a5a5a; }
.mp-callout-success::before, .mp-callout-check::before, .mp-callout-done::before
{ content: "\\2713"; color: #5a7a5a; }
.mp-callout-success .mp-callout-title, .mp-callout-check .mp-callout-title,
.mp-callout-done .mp-callout-title { color: #4a6a4a; }
.mp-callout-abstract::before, .mp-callout-summary::before, .mp-callout-tldr::before
{ content: "\\00A7"; color: #5a7a7a; }
.mp-callout-abstract .mp-callout-title, .mp-callout-summary .mp-callout-title,
.mp-callout-tldr .mp-callout-title { color: #4a6a6a; }
.mp-callout-todo::before { content: "\\25CB"; color: #5a6a8a; }
.mp-callout-todo .mp-callout-title { color: #4a5a7a; }
.mp-callout-quote::before, .mp-callout-cite::before { content: "\\201C"; color: #8a7a6a; }
.mp-callout-quote .mp-callout-title, .mp-callout-cite .mp-callout-title { color: #6a5a4a; }
`;var Il=`/**
* Theme: Fresh Azure
* Author: bugwhite1
* Source: https://github.com/bugwhite1
* Description: \u4EE5\u6C89\u9759\u7684\u5546\u52A1\u84DD\u4E3A\u4E3B\u8272\u8C03\uFF0C\u642D\u914D\u8584\u8377\u7EFF\u70B9\u7F00\u4E0E\u6A59\u8272\u5F3A\u8C03\uFF0C\u5361\u7247\u5F0F\u6807\u9898\u5757\u914D\u91D1\u8272\u6295\u5F71\uFF0C\u6574\u4F53\u98CE\u683C\u6E05\u723D\u4E13\u4E1A\u3002
*/
/* ==================== \u5168\u5C40 ==================== */
.mp-content-section {
font-size: 15px;
color: rgb(34, 34, 34);
line-height: 27px;
letter-spacing: 0.05em;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}
/* ==================== \u6807\u9898 ==================== */
/* H1\uFF1A\u84DD\u8272\u80CC\u666F\u5757 + \u91D1\u8272\u6295\u5F71 + \u5C45\u4E2D */
.mp-content-section h1 {
margin: 2em auto 1em;
font-size: 20px;
font-weight: 600;
color: #66CDAA;
display: block;
width: fit-content;
background-color: #406494;
padding: 0.5em 1em;
border-radius: 12px;
box-shadow: 4px 4px 0 #f2cc5c;
letter-spacing: 0.06em;
text-shadow: 0 2px 4px rgba(0,0,0,0.3);
text-align: center;
}
/* H2\uFF1A\u84DD\u8272\u80CC\u666F\u5757 + \u5DE6\u4FA7\u8272\u6761 */
.mp-content-section h2 {
margin: 1.5em 0 1em;
font-size: 17px;
font-weight: 600;
color: #66CDAA;
position: relative;
background-color: #4a78a5;
padding: 0.6em 1.2em 0.6em 1.4em;
width: fit-content;
border-left: 8px solid #d0d0d0;
border-radius: 12px;
text-align: left;
letter-spacing: 0.04em;
}
/* H3\uFF1A\u5DE6\u4FA7\u8272\u6761 + \u52A0\u7C97 */
.mp-content-section h3 {
margin: 1em 0 0.6em;
font-size: 15px;
font-weight: 600;
color: #66CDAA;
padding-left: 12px;
border-left: 5px solid #406494;
letter-spacing: 0.03em;
}
/* H4~H6\uFF1A\u4E0E H3 \u540C\u98CE\u683C */
.mp-content-section h4,
.mp-content-section h5,
.mp-content-section h6 {
margin: 1em 0 0.6em;
font-size: 15px;
font-weight: 500;
color: #66CDAA;
padding-left: 12px;
border-left: 5px solid #406494;
letter-spacing: 0.03em;
}
/* ==================== \u6BB5\u843D ==================== */
.mp-content-section p {
margin: 18px 0;
line-height: 27px;
color: rgb(34, 34, 34);
font-size: 15px;
text-align: justify;
}
/* ==================== \u5217\u8868 ==================== */
/* \u4E00\u7EA7\u5217\u8868\u5BB9\u5668\uFF1A\u5361\u7247\u5F0F\u6DE1\u84DD\u80CC\u666F + \u5DE6\u4FA7\u8272\u6761\uFF08padding-left \u7559\u7ED9\u7B26\u53F7\u95F4\u8DDD\uFF09 */
.mp-content-section .mp-list-section {
background: #E0ECF8;
padding-right: 1.5em;
padding-top: 0.5em;
padding-bottom: 0.5em;
margin: 0.8em 0;
border-left: 4px solid #4B74A0;
box-shadow: 0 2px 8px rgba(43, 70, 110, 0.06);
font-size: 14px;
line-height: 1.7;
}
/* \u5217\u8868\u9879 */
.mp-content-section .mp-list-item {
line-height: 1.75;
color: rgb(34, 34, 34);
}
/* \u5D4C\u5957\u5217\u8868\uFF1A\u91CD\u7F6E\u80CC\u666F\uFF0C\u6DFB\u52A0\u5F15\u5BFC\u7EBF */
.mp-content-section .mp-list-section .mp-list-section {
margin: 0.04em 0;
border-left: 1.5px solid #c8d6e5;
background: transparent;
border-radius: 0;
box-shadow: none;
font-size: inherit;
line-height: inherit;
color: inherit;
}
/* ==================== \u5F15\u7528 ==================== */
.mp-content-section blockquote {
margin: 20px 0;
padding: 15px 20px;
background-color: #d9e4ef;
color: #666;
font-style: italic;
}
.mp-content-section blockquote p {
margin: 0;
line-height: inherit;
}
/* ==================== \u4EE3\u7801\u5757 ==================== */
.mp-content-section pre {
background: #1e1e1e;
border-radius: 12px;
padding: 1em;
margin: 1.2em 0;
font-size: 14px;
line-height: 1.6;
overflow-x: auto;
border: none;
white-space: pre-wrap;
}
.mp-content-section pre code {
color: #d4d4d4;
}
/* ==================== \u884C\u5185\u4EE3\u7801 ==================== */
/* \u53EA\u5BF9\u6B63\u6587/\u5217\u8868/\u5F15\u7528/\u8868\u683C/callout \u6BB5\u843D\u4E2D\u7684 code \u5E94\u7528\u884C\u5185\u4EE3\u7801\u6837\u5F0F\uFF0C
\u6392\u9664\u6807\u9898\u3001\u4EE3\u7801\u5757\u7B49\u573A\u666F\u3002 */
.mp-content-section p code,
.mp-content-section .mp-list-item code,
.mp-content-section .mp-callout-content code,
.mp-content-section blockquote code,
.mp-content-section td code,
.mp-content-section th code {
color: #DB1398;
background: #F2F2F2;
background-image: radial-gradient(circle, #D5DDDF 0.8px, transparent 0.8px);
background-size: 5px 5px;
background-repeat: repeat;
padding: 0.2em 0.4em;
border-radius: 4px;
font-size: 0.9em;
font-weight: normal;
font-family: 'JetBrains Mono', 'Fira Code', monospace;
}
/* ==================== \u94FE\u63A5 ==================== */
.mp-content-section a {
color: #66CDAA;
text-decoration: none;
border-bottom: 1px solid #66CDAA;
}
/* ==================== \u5F3A\u8C03 ==================== */
/* \u52A0\u7C97\uFF1A\u6A59\u8272 */
.mp-content-section strong {
font-weight: 600;
color: #FF7732;
}
.mp-content-section em {
font-style: italic;
color: #66CDAA;
}
.mp-content-section del {
text-decoration: line-through;
color: #999;
}
/* ==================== \u8868\u683C ==================== */
.mp-content-section table {
width: 100%;
max-width: 100%;
margin: 0 0 24px 0;
border-collapse: collapse;
table-layout: auto;
word-break: break-word;
border: 1px solid #d0d8e0;
}
.mp-content-section th {
background: linear-gradient(135deg, #406494 0%, #4a78a5 50%, #4B74A0 100%);
font-weight: 600;
color: #66CDAA;
text-align: center;
padding: 10px 14px;
border: 1px solid #d0d8e0;
}
.mp-content-section td {
text-align: left;
padding: 10px 14px;
border: 1px solid #d0d8e0;
}
.mp-content-section tr:nth-child(even) td {
background-color: #E8EFF5;
}
/* ==================== \u5206\u9694\u7EBF ==================== */
.mp-content-section hr {
margin: 24px 0;
border: none;
height: 2px;
background: linear-gradient(90deg, transparent, #406494, transparent);
}
/* ==================== \u56FE\u7247 ==================== */
.mp-content-section img {
max-width: 100%;
height: auto;
display: block;
margin: 1.5em auto;
border-radius: 12px;
}
/* ==================== \u811A\u6CE8 ==================== */
.mp-content-section .footnote-ref,
.mp-content-section .footnote-backref {
color: #66CDAA;
text-decoration: none;
font-size: 0.9em;
}
/* ==================== Callout \u63D0\u793A\u6846 ==================== */
/* \u57FA\u7840\uFF1Aborder-left \u7531\u8F6C\u6362\u5668\u5185\u8054\u6837\u5F0F\u63A7\u5236\uFF08\u5DF2\u5728 main.js \u4E2D\u79FB\u9664 border-left \u5185\u8054\u4EE3\u7801\uFF09\uFF0C
\u6B64\u5904\u901A\u8FC7 CSS \u786E\u4FDD\u5B8C\u5168\u65E0\u5DE6\u4FA7\u8272\u6761 */
.mp-content-section .mp-callout {
border-radius: 12px;
padding: 12px 16px;
margin: 1em 0;
border-left: none;
background: #f0faf5;
}
.mp-content-section .mp-callout-title {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 8px;
font-weight: bold;
font-size: 1em;
line-height: 1.5;
}
.mp-content-section .mp-callout-content {
font-size: 0.95em;
line-height: 1.7;
color: #3f3f3f;
}
.mp-content-section .mp-callout-content p {
margin: 4px 0;
padding: 0;
line-height: 1.7;
}
/* Callout \u7C7B\u578B\u53D8\u4F53\uFF1A\u5168\u90E8\u65E0\u5DE6\u4FA7\u8272\u6761\uFF0C\u4EC5\u4EE5\u5706\u89D2\u80CC\u666F\u8272\u533A\u5206 */
.mp-content-section .mp-callout-note { border-left: none; background: #e8f0fe; }
.mp-content-section .mp-callout-note .mp-callout-title { color: #448aff; }
.mp-content-section .mp-callout-info { border-left: none; background: #e8f0fe; }
.mp-content-section .mp-callout-info .mp-callout-title { color: #448aff; }
.mp-content-section .mp-callout-tip { border-left: none; background: #e6f7f2; }
.mp-content-section .mp-callout-tip .mp-callout-title { color: #00bfa5; }
.mp-content-section .mp-callout-hint { border-left: none; background: #e6f7f2; }
.mp-content-section .mp-callout-hint .mp-callout-title { color: #00bfa5; }
.mp-content-section .mp-callout-important { border-left: none; background: #f3e8fd; }
.mp-content-section .mp-callout-important .mp-callout-title { color: #7c4dff; }
.mp-content-section .mp-callout-warning { border-left: none; background: #fff8e1; }
.mp-content-section .mp-callout-warning .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-caution { border-left: none; background: #fff8e1; }
.mp-content-section .mp-callout-caution .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-attention { border-left: none; background: #fff8e1; }
.mp-content-section .mp-callout-attention .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-danger { border-left: none; background: #ffeef0; }
.mp-content-section .mp-callout-danger .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-error { border-left: none; background: #ffeef0; }
.mp-content-section .mp-callout-error .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-bug { border-left: none; background: #ffeef0; }
.mp-content-section .mp-callout-bug .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-success { border-left: none; background: #e8f5e9; }
.mp-content-section .mp-callout-success .mp-callout-title { color: #00c853; }
.mp-content-section .mp-callout-check { border-left: none; background: #e8f5e9; }
.mp-content-section .mp-callout-check .mp-callout-title { color: #00c853; }
.mp-content-section .mp-callout-done { border-left: none; background: #e8f5e9; }
.mp-content-section .mp-callout-done .mp-callout-title { color: #00c853; }
.mp-content-section .mp-callout-question { border-left: none; background: #fff8e1; }
.mp-content-section .mp-callout-question .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-help { border-left: none; background: #fff8e1; }
.mp-content-section .mp-callout-help .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-faq { border-left: none; background: #fff8e1; }
.mp-content-section .mp-callout-faq .mp-callout-title { color: #ff9100; }
.mp-content-section .mp-callout-failure { border-left: none; background: #ffeef0; }
.mp-content-section .mp-callout-failure .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-fail { border-left: none; background: #ffeef0; }
.mp-content-section .mp-callout-fail .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-missing { border-left: none; background: #ffeef0; }
.mp-content-section .mp-callout-missing .mp-callout-title { color: #ff1744; }
.mp-content-section .mp-callout-abstract { border-left: none; background: #e0f7fa; }
.mp-content-section .mp-callout-abstract .mp-callout-title { color: #00b8d4; }
.mp-content-section .mp-callout-summary { border-left: none; background: #e0f7fa; }
.mp-content-section .mp-callout-summary .mp-callout-title { color: #00b8d4; }
.mp-content-section .mp-callout-tldr { border-left: none; background: #e0f7fa; }
.mp-content-section .mp-callout-tldr .mp-callout-title { color: #00b8d4; }
.mp-content-section .mp-callout-example { border-left: none; background: #f3e8fd; }
.mp-content-section .mp-callout-example .mp-callout-title { color: #7c4dff; }
.mp-content-section .mp-callout-todo { border-left: none; background: #e8f0fe; }
.mp-content-section .mp-callout-todo .mp-callout-title { color: #448aff; }
.mp-content-section .mp-callout-quote { border-left: none; background: #f5f5f5; }
.mp-content-section .mp-callout-quote .mp-callout-title { color: #757575; }
.mp-content-section .mp-callout-cite { border-left: none; background: #f5f5f5; }
.mp-content-section .mp-callout-cite .mp-callout-title { color: #757575; }
`;function Jb(e){let t=e.match(/\/\*\*[\s\S]*?\*\//);if(!t)return{};let u=t[0],r=n=>{let a=u.match(new RegExp(`\\*\\s*${n}:\\s*(.+)`,"i"));return a?a[1].trim():void 0};return{name:r("Theme"),author:r("Author"),authorUrl:r("Source"),description:r("Description")}}function qn(e,t){let u=Jb(t);return{id:`community-${e}`,name:u.name||e,description:u.description||"\u793E\u533A\u6295\u7A3F\u4E3B\u9898",source:"community",css:t,author:u.author,authorUrl:u.authorUrl,isVisible:!0}}var Ol=[{id:"default",name:"\u9ED8\u8BA4",description:"\u7B80\u6D01\u6E05\u723D\u7684\u9ED8\u8BA4\u4E3B\u9898",source:"builtin",css:dl,author:"MP Publisher",isVisible:!0},{id:"elegant",name:"\u4F18\u96C5",description:"\u6587\u827A\u6C14\u8D28\u7684\u4F18\u96C5\u4E3B\u9898",source:"builtin",css:fl,author:"MP Publisher",isVisible:!0},{id:"dark",name:"\u6697\u8272",description:"\u79D1\u6280\u611F\u6697\u8272\u4E3B\u9898",source:"builtin",css:ml,author:"MP Publisher",isVisible:!0},{id:"minimal",name:"\u6781\u7B80",description:"\u5E72\u51C0\u7EAF\u7CB9\u7684\u6781\u7B80\u4E3B\u9898",source:"builtin",css:pl,author:"MP Publisher",isVisible:!0},{id:"green-fresh",name:"\u6E05\u65B0\u7EFF",description:"\u6E05\u65B0\u81EA\u7136\u7684\u7EFF\u8272\u4E3B\u9898",source:"builtin",css:hl,author:"MP Publisher",isVisible:!0},{id:"orange-warm",name:"\u6696\u6A59",description:"\u6E29\u6696\u6D3B\u529B\u7684\u6A59\u8272\u4E3B\u9898",source:"builtin",css:bl,author:"MP Publisher",isVisible:!0},{id:"scarlet",name:"\u7329\u7EA2",description:"\u70ED\u60C5\u9192\u76EE\u7684\u7EA2\u8272\u4E3B\u9898",source:"builtin",css:gl,author:"MP Publisher",isVisible:!0},{id:"academic",name:"\u5B66\u672F",description:"\u4E25\u8C28\u4E13\u4E1A\u7684\u5B66\u672F\u4E3B\u9898",source:"builtin",css:El,author:"MP Publisher",isVisible:!0}],Sl=[qn("colorful-style",Tl),qn("wechat-green",xl),qn("crimson-glow",yl),qn("fresh-azure",Il)];var Un=class{constructor(t,u){this.themes=new Map;this.activeTheme=null;this.injectedStyleElement=null;this.app=t,this.plugin=u,this.currentFont=rt[0].value,this.currentFontSize=16}async initialize(){let t=this.getHiddenThemeIds();for(let n of Ol)n.isVisible=!t.includes(n.id),this.themes.set(n.id,n);for(let n of Sl)n.isVisible=!t.includes(n.id),this.themes.set(n.id,n);let u=this.getThemeSettings();if(u.downloadedRemoteThemes)for(let n of u.downloadedRemoteThemes)this.themes.set(n.id,n);await this.loadLocalThemes();let r=u.activeThemeId||"default";this.setActiveTheme(r),this.currentFont=u.fontFamily||rt[0].value,this.currentFontSize=u.fontSize||16}getThemeSettings(){let t=this.plugin.settingsManager.getSettings();return{activeThemeId:t.activeThemeId||"default",fontFamily:t.fontFamily||rt[0].value,fontSize:t.fontSize||16,customFonts:t.customFonts||rt,downloadedRemoteThemes:t.downloadedRemoteThemes||[],remoteThemeIndexCache:t.remoteThemeIndexCache,remoteIndexLastUpdate:t.remoteIndexLastUpdate}}getAllThemes(){return Array.from(this.themes.values())}getVisibleThemes(){return this.getAllThemes().filter(t=>t.isVisible)}getThemesBySource(t){return this.getAllThemes().filter(u=>u.source===t)}getTheme(t){return this.themes.get(t)}getActiveTheme(){return this.activeTheme}setActiveTheme(t){let u=this.themes.get(t);if(u)return this.activeTheme=u,!0;let r=this.themes.get("default");return r&&(this.activeTheme=r),!1}setFont(t){this.currentFont=t}getFont(){return this.currentFont}setFontSize(t){this.currentFontSize=t}getFontSize(){return this.currentFontSize}applyTheme(t,u,r){let n=u||this.activeTheme;if(!n)return;let a=t.querySelector("style[data-mp-theme]");a&&a.remove(),r&&t.setAttribute("data-mp-scope",r);let o=this.buildFontOverrideCSS(r),s=(r?this.scopeCSS(n.css,r):n.css)+`
`+o,A=activeDocument.createElement("style");A.setAttribute("data-mp-theme",n.id),t.appendChild(A),A.textContent=s}scopeCSS(t,u){let r=`[data-mp-scope="${u}"]`;return t.replace(/\.mp-content-section/g,`.mp-content-section${r}`)}getActiveThemeCSS(){return this.activeTheme?this.activeTheme.css+`
`+this.buildFontOverrideCSS():""}buildFontOverrideCSS(t){let u=t?`[data-mp-scope="${t}"]`:"";return`
/* \u5B57\u4F53/\u5B57\u53F7\u8986\u76D6 */
.mp-content-section${u} {
font-family: ${this.currentFont} !important;
font-size: ${this.currentFontSize}px !important;
}
.mp-content-section${u} p,
.mp-content-section${u} li,
.mp-content-section${u} blockquote,
.mp-content-section${u} th,
.mp-content-section${u} td {
font-family: ${this.currentFont} !important;
font-size: ${this.currentFontSize}px !important;
}
`}getCustomThemeDir(){return this.plugin.manifest.dir+"/custom"}async loadLocalThemes(){let t=this.getCustomThemeDir(),u=this.getHiddenThemeIds();for(let[r,n]of this.themes.entries())n.source==="local"&&this.themes.delete(r);try{let r=this.app.vault.adapter;if(!await r.exists(t)){await r.mkdir(t);return}let n=await r.list(t);for(let a of n.files)if(a.endsWith(".css"))try{let o=await r.read(a),s=(a.split("/").pop()||"").replace(".css",""),A=`local-${s}`,l={id:A,name:s,description:"\u672C\u5730\u81EA\u5B9A\u4E49\u4E3B\u9898",source:"local",css:o,localPath:a,isVisible:!u.includes(A)};this.themes.set(A,l)}catch(o){console.error(`\u8BFB\u53D6\u672C\u5730\u4E3B\u9898\u6587\u4EF6\u5931\u8D25: ${a}`,o)}}catch(r){console.error("\u52A0\u8F7D\u672C\u5730\u4E3B\u9898\u5931\u8D25:",r)}}getHiddenThemeIds(){return this.plugin.settingsManager.getSettings().hiddenThemeIds||[]}async setThemeQuickSwitchVisible(t,u){let r=[...this.getHiddenThemeIds()],n=r.indexOf(t);u&&n>=0?r.splice(n,1):!u&&n<0&&r.push(t),await this.plugin.settingsManager.updateSettings({hiddenThemeIds:r});let a=this.themes.get(t);a&&(a.isVisible=u)}isThemeQuickSwitchVisible(t){return!this.getHiddenThemeIds().includes(t)}async saveLocalTheme(t,u){let r=this.getCustomThemeDir(),n=this.app.vault.adapter;await n.exists(r)||await n.mkdir(r);let a=`${t}.css`,o=`${r}/${a}`;await n.write(o,u);let i=`local-${t}`,s={id:i,name:t,description:"\u672C\u5730\u81EA\u5B9A\u4E49\u4E3B\u9898",source:"local",css:u,localPath:o,isVisible:!0};return this.themes.set(i,s),s}async deleteLocalTheme(t){var r;let u=this.themes.get(t);if(!u||u.source!=="local")return!1;if(u.localPath)try{let n=this.app.vault.adapter;await n.exists(u.localPath)&&await n.remove(u.localPath)}catch(n){console.error("\u5220\u9664\u672C\u5730\u4E3B\u9898\u6587\u4EF6\u5931\u8D25:",n)}return this.themes.delete(t),((r=this.activeTheme)==null?void 0:r.id)===t&&this.setActiveTheme("default"),!0}async updateLocalTheme(t,u){let r=this.themes.get(t);if(!r||r.source!=="local")return!1;if(r.css=u,r.localPath)try{await this.app.vault.adapter.write(r.localPath,u)}catch(n){return console.error("\u66F4\u65B0\u672C\u5730\u4E3B\u9898\u6587\u4EF6\u5931\u8D25:",n),!1}return!0}async renameLocalTheme(t,u){var i;let r=this.themes.get(t);if(!r||r.source!=="local"||!/^[a-zA-Z0-9\-_\u4e00-\u9fff]+$/.test(u))return!1;let n=`local-${u}`,o=`${this.getCustomThemeDir()}/${u}.css`;if(this.themes.has(n)&&n!==t)return!1;try{let s=this.app.vault.adapter;await s.write(o,r.css),r.localPath&&await s.exists(r.localPath)&&await s.remove(r.localPath);let A=((i=this.activeTheme)==null?void 0:i.id)===t;return this.themes.delete(t),r.id=n,r.name=u,r.localPath=o,this.themes.set(n,r),A&&(this.activeTheme=r,await this.plugin.settingsManager.updateSettings({activeThemeId:n})),!0}catch(s){return console.error("\u91CD\u547D\u540D\u672C\u5730\u4E3B\u9898\u5931\u8D25:",s),!1}}async reloadLocalThemes(){for(let[t,u]of this.themes.entries())u.source==="local"&&this.themes.delete(t);await this.loadLocalThemes()}async fetchRemoteThemeIndex(){let t=this.getThemeSettings();if(t.remoteThemeIndexCache&&t.remoteIndexLastUpdate&&Date.now()-t.remoteIndexLastUpdate<So.cacheExpiry)return t.remoteThemeIndexCache;try{let u=await(0,Tu.requestUrl)({url:So.indexUrl,method:"GET"});if(u.status===200&&Array.isArray(u.json)){let r=u.json;return await this.plugin.settingsManager.updateSettings({remoteThemeIndexCache:r,remoteIndexLastUpdate:Date.now()}),r}}catch(u){if(console.error("\u83B7\u53D6\u4E91\u7AEF\u4E3B\u9898\u7D22\u5F15\u5931\u8D25:",u),t.remoteThemeIndexCache)return t.remoteThemeIndexCache}return[]}async downloadRemoteTheme(t){try{let u=await(0,Tu.requestUrl)({url:t.cssUrl,method:"GET"});if(u.status!==200)return new Tu.Notice(`\u4E0B\u8F7D\u4E3B\u9898\u5931\u8D25: HTTP ${u.status}`),null;let r=u.text,n=`remote-${t.id}`,a={id:n,name:t.name,description:t.description,source:"remote",css:r,remoteUrl:t.cssUrl,author:t.author,isVisible:!0};this.themes.set(n,a);let i=this.getThemeSettings().downloadedRemoteThemes.filter(s=>s.id!==n);return i.push(a),await this.plugin.settingsManager.updateSe
\u8FD9\u662F\u4E00\u6BB5\u6B63\u6587\u5185\u5BB9\uFF0C\u7528\u4E8E\u5C55\u793A\u4E3B\u9898\u7684\u6392\u7248\u6548\u679C\u3002**\u52A0\u7C97\u6587\u5B57**\u548C*\u659C\u4F53\u6587\u5B57*\u5728\u8FD9\u91CC\u5C55\u793A\u3002
## \u4E8C\u7EA7\u6807\u9898
> \u5F15\u7528\u5757\uFF1A\u597D\u7684\u8BBE\u8BA1\u662F\u5C3D\u53EF\u80FD\u5C11\u7684\u8BBE\u8BA1\u3002\u2014\u2014 Dieter Rams
### \u4E09\u7EA7\u6807\u9898
- \u65E0\u5E8F\u5217\u8868\u9879 A
- \u65E0\u5E8F\u5217\u8868\u9879 B
- \u5D4C\u5957\u5217\u8868\u9879
- \u65E0\u5E8F\u5217\u8868\u9879 C
1. \u6709\u5E8F\u5217\u8868\u9879\u4E00
2. \u6709\u5E8F\u5217\u8868\u9879\u4E8C
3. \u6709\u5E8F\u5217\u8868\u9879\u4E09
\u8FD9\u662F\u4E00\u6BB5\u5305\u542B\`\u884C\u5185\u4EE3\u7801\`\u7684\u6587\u5B57\u3002\u4E0B\u9762\u662F\u4EE3\u7801\u5757\uFF1A
\`\`\`javascript
function greet(name) {
return \`Hello, \${name}!\`;
}
\`\`\`
| \u8868\u5934 A | \u8868\u5934 B | \u8868\u5934 C |
|--------|--------|--------|
| \u5355\u5143\u683C | \u5355\u5143\u683C | \u5355\u5143\u683C |
| \u5355\u5143\u683C | \u5355\u5143\u683C | \u5355\u5143\u683C |
---
![\u56FE\u7247\u63CF\u8FF0\u793A\u4F8B](https://picsum.photos/seed/mpublisher/400/250)
\u6B63\u6587\u6BB5\u843D\uFF0C\u5C55\u793A\u884C\u95F4\u8DDD\u548C\u5B57\u4F53\u6548\u679C\u3002\u4E2D\u6587\u6392\u7248\u9700\u8981\u5173\u6CE8\u5B57\u95F4\u8DDD\u3001\u884C\u9AD8\u548C\u6BB5\u843D\u95F4\u8DDD\u7684\u534F\u8C03\u3002
`,Wn=class extends xu.ItemView{constructor(u,r){super(u);this.renderComponent=null;this.themeManager=r,this.themeId="",this.themeName=""}getViewType(){return yu}getDisplayText(){return this.themeName?`\u9884\u89C8\uFF1A${this.themeName}`:"\u4E3B\u9898\u9884\u89C8"}getIcon(){return"eye"}setTheme(u,r){this.themeId=u,this.themeName=r}async refresh(){var r,n;let u=this.containerEl.children[1];u&&(u.empty(),u.classList.add("mp-theme-preview-container"),(n=(r=this.leaf).updateHeader)==null||n.call(r),await this.renderPreview(u))}async onOpen(){let u=this.containerEl.children[1];u.empty(),u.classList.add("mp-theme-preview-container"),await this.renderPreview(u)}async renderPreview(u){this.renderComponent&&this.renderComponent.unload(),this.renderComponent=new xu.Component,this.renderComponent.load();let r=u.createEl("div",{cls:"mp-preview-area"});await xu.MarkdownRenderer.render(this.app,Zb,r,"",this.renderComponent),ut.formatContent(r,{showImageCaption:!0});let n=r.querySelector(".mp-content-section");if(n&&this.themeId){let a=this.themeManager.getTheme(this.themeId);a&&this.themeManager.applyTheme(n,a,"theme-preview")}}async onClose(){var u;this.renderComponent&&(this.renderComponent.unload(),this.renderComponent=null),(u=this.containerEl.children[1])==null||u.empty(),await Promise.resolve()}};var kt=require("obsidian");var Iu="mp-theme-css",Kn=class extends kt.ItemView{constructor(u,r){super(u);this.isEditing=!1;this.editedCSS="";this.themeManager=r,this.themeId="",this.themeName=""}getViewType(){return Iu}getDisplayText(){return this.themeName?`CSS\uFF1A${this.themeName}`:"\u4E3B\u9898 CSS"}getIcon(){return"code"}setTheme(u,r){this.themeId=u,this.themeName=r,this.isEditing=!1,this.editedCSS=""}async refresh(){var r,n;let u=this.containerEl.children[1];u&&(u.empty(),u.classList.add("mp-theme-css-container"),this.renderCSS(u),(n=(r=this.leaf).updateHeader)==null||n.call(r))}async onOpen(){let u=this.containerEl.children[1];u.empty(),u.classList.add("mp-theme-css-container"),this.renderCSS(u),await Promise.resolve()}renderCSS(u){u.empty();let r=this.themeId?this.themeManager.getTheme(this.themeId):null;if(!r){u.createEl("div",{text:"\u672A\u627E\u5230\u4E3B\u9898",cls:"mp-theme-css-empty"});return}let n=r.source==="local",a=u.createEl("div",{cls:"mp-theme-css-toolbar"}),o=null;this.isEditing&&n?(o=a.createEl("input",{type:"text",cls:"mp-theme-css-title-input",value:r.name}),o.spellcheck=!1):a.createEl("span",{text:r.name,cls:"mp-theme-css-title"}),a.createEl("span",{text:this.isEditing?"\u7F16\u8F91\u4E2D":"\u53EA\u8BFB",cls:`mp-theme-css-badge ${this.isEditing?"mp-theme-css-badge-editing":""}`});let i=a.createEl("div",{cls:"mp-theme-css-actions"}),s=i.createEl("button",{text:"\u590D\u5236",cls:"mp-theme-css-text-btn"});s.addEventListener("click",()=>{(async()=>{var b;let l=this.isEditing&&((b=u.querySelector(".mp-theme-css-editor"))==null?void 0:b.value)||r.css;await navigator.clipboard.writeText(l),s.textContent="\u5DF2\u590D\u5236",window.setTimeout(()=>{s.textContent="\u590D\u5236"},1500)})()}),n&&(this.isEditing?i.createEl("button",{text:"\u4FDD\u5B58",cls:"mp-theme-css-text-btn mp-theme-css-save-btn"}).addEventListener("click",()=>{(async()=>{var p,E;let b=u.querySelector(".mp-theme-css-editor");if(!b)return;let g=b.value.trim();if(!g){new kt.Notice("CSS \u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A");return}let m=(o==null?void 0:o.value.trim())||r.name;if(!/^[a-zA-Z0-9\-_\u4e00-\u9fff]+$/.test(m)){new kt.Notice("\u540D\u79F0\u53EA\u80FD\u5305\u542B\u5B57\u6BCD\u3001\u6570\u5B57\u3001\u8FDE\u5B57\u7B26\u3001\u4E0B\u5212\u7EBF\u548C\u4E2D\u6587");return}try{let I=r.id;if(m!==r.name){if(!await this.themeManager.renameLocalTheme(r.id,m)){new kt.Notice("\u91CD\u547D\u540D\u5931\u8D25\uFF0C\u540D\u79F0\u53EF\u80FD\u5DF2\u5B58\u5728");return}I=`local-${m}`,this.themeId=I,this.themeName=m}await this.themeManager.updateLocalTheme(I,g),this.isEditing=!1,this.editedCSS="",new kt.Notice(`\u5DF2\u4FDD\u5B58\u300C${m}\u300D`),(E=(p=this.leaf).updateHeader)==null||E.call(p),this.renderCSS(u)}catch(I){new kt.Notice("\u4FDD\u5B58\u5931\u8D25: "
`);for(let a=0;a<n.length;a++){let o=n[a];a>0&&u.appendText(`
`);let i=o.replace(/^\s+/,"");if(i.startsWith("/*")||i.startsWith("*")){u.createEl("span",{cls:"css-hl-comment",text:o});continue}let s=o;for(;s.length>0;){let A=s.match(/^(#[0-9a-fA-F]{3,8})\b/);if(A){u.createEl("span",{cls:"css-hl-color",text:A[1]}),s=s.substring(A[1].length);continue}let l=s.match(/^(-?\d+\.?\d*)(px|em|rem|%|vh|vw|s|ms|deg|fr)?/);if(l&&l[0].length>0){u.createEl("span",{cls:"css-hl-number",text:l[0]}),s=s.substring(l[0].length);continue}let b=s.match(/^(['"])(.*?)\1/);if(b){u.createEl("span",{cls:"css-hl-string",text:b[0]}),s=s.substring(b[0].length);continue}let g=s.match(/^([a-z-]+)(\s*:)/);if(g){u.createEl("span",{cls:"css-hl-property",text:g[1]}),u.appendText(g[2]),s=s.substring(g[0].length);continue}let m=s.match(/^(\.[a-zA-Z_-][a-zA-Z0-9_-]*)/);if(m){u.createEl("span",{cls:"css-hl-selector",text:m[1]}),s=s.substring(m[1].length);continue}if(s[0]==="{"||s[0]==="}"){u.createEl("span",{cls:"css-hl-bracket",text:s[0]}),s=s.substring(1);continue}u.appendText(s[0]),s=s.substring(1)}}}async onClose(){var u;(u=this.containerEl.children[1])==null||u.empty(),await Promise.resolve()}};var dr="mp-theme-manager",Gn=class extends te.ItemView{constructor(u,r,n,a){super(u);this.themeManager=r,this.settingsManager=n,this.plugin=a}getViewType(){return dr}getDisplayText(){return"\u4E3B\u9898\u7BA1\u7406"}getIcon(){return"palette"}async onOpen(){let u=this.containerEl.children[1];u.empty(),u.classList.add("mp-theme-manager"),this.contentEl=u.createEl("div",{cls:"mp-theme-manager-content"}),this.renderContent(),await Promise.resolve()}renderContent(){this.contentEl.empty(),this.renderGuide(),this.renderLocalSection(),this.renderCommunitySection(),this.renderBuiltinSection()}renderGuide(){let u=this.contentEl.createEl("details",{cls:"mp-tm-guide"});u.createEl("summary",{text:"\u4F7F\u7528\u8BF4\u660E"});let r=u.createEl("div",{cls:"mp-tm-guide-content"});r.createEl("p",{text:"\u70B9\u51FB\u4E3B\u9898\u5361\u7247\u5207\u6362\u5F53\u524D\u4F7F\u7528\u7684\u4E3B\u9898\u3002"});let n=r.createEl("ul");n.createEl("li",{text:"\u2611 \u52FE\u9009\u6846 \u2014 \u63A7\u5236\u8BE5\u4E3B\u9898\u662F\u5426\u51FA\u73B0\u5728\u9884\u89C8\u754C\u9762\u7684\u5FEB\u901F\u5207\u6362\u4E0B\u62C9\u5217\u8868\u4E2D"}),n.createEl("li",{text:"\u{1F441} \u9884\u89C8 \u2014 \u5728\u4FA7\u8FB9\u680F\u4E2D\u9884\u89C8\u8BE5\u4E3B\u9898\u7684\u6548\u679C"}),n.createEl("li",{text:"</> \u4EE3\u7801 \u2014 \u67E5\u770B\u6216\u7F16\u8F91\u4E3B\u9898\u7684 CSS \u6E90\u7801"})}renderBuiltinSection(){let u=this.contentEl.createEl("div",{cls:"mp-tm-section"});u.createEl("div",{cls:"mp-tm-section-header"}).createEl("h3",{text:"\u5185\u7F6E\u4E3B\u9898"});let n=this.themeManager.getThemesBySource("builtin"),a=u.createEl("div",{cls:"mp-tm-theme-grid"});for(let o of n)this.renderThemeCard(a,o,!1)}renderCommunitySection(){let u=this.themeManager.getThemesBySource("community");if(u.length===0)return;let r=this.contentEl.createEl("div",{cls:"mp-tm-section"});r.createEl("div",{cls:"mp-tm-section-header"}).createEl("h3",{text:"\u793E\u533A\u6295\u7A3F"});let a=r.createEl("div",{cls:"mp-tm-theme-grid"});for(let o of u)this.renderThemeCard(a,o,!1)}async renderRemoteSection(){let u=this.contentEl.createEl("div",{cls:"mp-tm-section"}),r=u.createEl("div",{cls:"mp-tm-section-header"});r.createEl("h3",{text:"\u4E91\u7AEF\u4E3B\u9898"});let n=r.createEl("button",{cls:"mp-tm-icon-btn",attr:{"aria-label":"\u5237\u65B0\u5217\u8868"}});(0,te.setIcon)(n,"refresh-cw");let a=this.themeManager.getThemesBySource("remote");if(a.length>0){let s=u.createEl("div",{cls:"mp-tm-theme-grid"});for(let A of a)this.renderThemeCard(s,A,!0)}let o=u.createEl("div",{cls:"mp-tm-theme-grid"}),i=async()=>{o.empty(),o.createEl("div",{text:"\u6B63\u5728\u52A0\u8F7D\u2026",cls:"mp-tm-loading"});try{let s=await this.themeManager.fetchRemoteThemeIndex();if(o.empty(),s.length===0){o.createEl("div",{text:"\u6682\u65E0\u53EF\u7528\u7684\u4E91\u7AEF\u4E3B\u9898",cls:"mp-tm-empty"});return}let A=new Set(a.map(b=>b.id.replace("remote-",""))),l=s.filter(b=>!A.has(b.id));if(l.length===0){o.createEl("div",{tex
- **\u4E3B\u9898\u540D\u79F0**\uFF1A
- **\u4F5C\u8005**\uFF1A
- **\u7B80\u77ED\u63CF\u8FF0**\uFF1A
## \u6837\u5F0F\u622A\u56FE
> \u8BF7\u63D0\u4F9B\u81F3\u5C11\u4E00\u5F20\u4F7F\u7528\u8BE5\u4E3B\u9898\u540E\u7684\u516C\u4F17\u53F7\u9884\u89C8\u622A\u56FE
## CSS \u5185\u5BB9
<details>
<summary>\u70B9\u51FB\u5C55\u5F00 CSS \u4EE3\u7801</summary>
\`\`\`css
/* \u5728\u6B64\u7C98\u8D34\u4F60\u7684\u4E3B\u9898 CSS */
\`\`\`
</details>
## \u81EA\u67E5\u6E05\u5355
- [ ] \u6240\u6709\u9009\u62E9\u5668\u4EE5 \`.mp-content-section\` \u5F00\u5934
- [ ] \u6CA1\u6709\u4F7F\u7528 CSS \u53D8\u91CF\u3001@media\u3001@font-face\u3001\u4F2A\u5143\u7D20\u3001!important
- [ ] \u5DF2\u9605\u8BFB [CSS \u4E3B\u9898\u5F00\u53D1\u6307\u5357](https://github.com/joeytoday/obsidian-mp-publisher/blob/main/CSS_THEME_GUIDE.md)
`),m=`https://github.com/joeytoday/obsidian-mp-publisher/issues/new?labels=theme&title=${b}&body=${g}`;window.open(m)}),i.addEventListener("click",()=>{l.classList.toggle("mp-tm-hidden"),l.classList.contains("mp-tm-hidden")||(this.renderCSSEditor(l),l.scrollIntoView({behavior:"smooth",block:"nearest"}))}),o.addEventListener("click",()=>{(async()=>(await this.themeManager.reloadLocalThemes(),new te.Notice("\u5DF2\u91CD\u65B0\u52A0\u8F7D"),this.renderContent()))()})}renderCSSEditor(u,r){u.empty(),u.createEl("h4",{text:r?"\u7F16\u8F91\u4E3B\u9898":"\u65B0\u5EFA\u4E3B\u9898"});let n=u.createEl("div",{cls:"mp-tm-form-group"});n.createEl("label",{text:"\u540D\u79F0"});let a=n.createEl("input",{type:"text",cls:"mp-tm-input",placeholder:"\u5982 my-theme\uFF08\u5B57\u6BCD\u3001\u6570\u5B57\u3001\u8FDE\u5B57\u7B26\uFF09",value:(r==null?void 0:r.name)||""}),o=u.createEl("div",{cls:"mp-tm-form-group"});o.createEl("label",{text:"CSS"}),o.createEl("p",{text:"\u4EE5 .mp-content-section \u4F5C\u4E3A\u6839\u9009\u62E9\u5668",cls:"mp-tm-hint"});let i=o.createEl("textarea",{cls:"mp-tm-css-editor",placeholder:`.mp-content-section {
font-size: 16px;
color: #333;
line-height: 1.8;
}
.mp-content-section h1 {
color: #1a1a2e;
font-size: 1.8em;
}`});i.value=(r==null?void 0:r.css)||"",i.rows=16;let s=u.createEl("div",{cls:"mp-tm-button-group"}),A=s.createEl("button",{text:r?"\u4FDD\u5B58":"\u521B\u5EFA",cls:"mp-tm-primary-btn"}),l=s.createEl("button",{text:"\u53D6\u6D88",cls:"mp-tm-ghost-btn"});A.addEventListener("click",()=>{(async()=>{let b=a.value.trim(),g=i.value.trim();if(!b){new te.Notice("\u8BF7\u8F93\u5165\u4E3B\u9898\u540D\u79F0");return}if(!g){new te.Notice("\u8BF7\u8F93\u5165 CSS \u5185\u5BB9");return}if(!/^[a-zA-Z0-9\-_\u4e00-\u9fff]+$/.test(b)){new te.Notice("\u540D\u79F0\u53EA\u80FD\u5305\u542B\u5B57\u6BCD\u3001\u6570\u5B57\u3001\u8FDE\u5B57\u7B26\u3001\u4E0B\u5212\u7EBF\u548C\u4E2D\u6587");return}try{if(r){if(b!==r.name){if(!await this.themeManager.renameLocalTheme(r.id,b)){new te.Notice("\u91CD\u547D\u540D\u5931\u8D25\uFF0C\u540D\u79F0\u53EF\u80FD\u5DF2\u5B58\u5728");return}let p=`local-${b}`;await this.themeManager.updateLocalTheme(p,g)}else await this.themeManager.updateLocalTheme(r.id,g);new te.Notice(`\u5DF2\u66F4\u65B0\u300C${b}\u300D`)}else await this.themeManager.saveLocalTheme(b,g),new te.Notice(`\u5DF2\u521B\u5EFA\u300C${b}\u300D`);this.renderContent()}catch(m){new te.Notice("\u4FDD\u5B58\u5931\u8D25: "+m.message)}})()}),l.addEventListener("click",()=>{u.classList.add("mp-tm-hidden")})}renderThemeCard(u,r,n){let a=this.themeManager.getActiveTheme(),o=(a==null?void 0:a.id)===r.id,i=u.createEl("div",{cls:`mp-tm-theme-card ${o?"mp-tm-card-active":""}`});i.addEventListener("click",()=>{(async()=>o||(this.themeManager.setActiveTheme(r.id),await this.settingsManager.updateSettings({activeThemeId:r.id}),new te.Notice(`\u5DF2\u5207\u6362\u5230\u300C${r.name}\u300D`),this.renderContent()))()});let s=i.createEl("div",{cls:"mp-tm-card-body"}),A=s.createEl("div",{cls:"mp-tm-card-name-row"});if(o){let E=A.createEl("span",{cls:"mp-tm-check-icon"});(0,te.setIcon)(E,"check")}A.createEl("span",{text:r.name,cls:"mp-tm-card-name"}),r.author&&(r.authorUrl?A.createEl("a",{text:r.author,cls:"mp-tm-card-author",href:r.authorUrl}).addEventListener("click",I=>{I.stopPropagation(),window.open(r.authorUrl,"_blank"),I.preventDefault()}):A.createEl("span",{text:r.author,cls:"mp-tm-card-author"})),r.description&&s.createEl("p",{text:r.description,cls:"mp-tm-card-desc"});let l=i.createEl("div",{cls:"mp-tm-card-actions"}),b=this.themeManager.isThemeQuickSwitchVisible(r.id),g=l.createEl("input",{type:"checkbox",cls:"mp-tm-quick-checkbox",attr:{"aria-label":"\u52A0\u5165\u5FEB\u901F\u5207\u6362"}});g.checked=b,g.addEventListener("click",E=>E.stopPropagation()),g.addEventListener("change",()=>{this.themeManager.setThemeQuickSwitchVisible(r.id,g.checked)});let m=l.createEl("button",{cls:"mp-tm-icon-btn",attr:{"aria-label":"\u9884\u89C8\u6548\u679C"}});(0,te.setIcon)(m,"eye"),m.addEventListener("click",E=>{E.stopPropagation(),this.openThemePreview(r)});let p=l.createEl("button",{cls:"mp-tm-icon-btn",attr:{"aria-label":"\u67E5\u770B CSS"}});if((0,te.setIcon)(p,"code"),p.addEventListener("click",E=>{E.stopPropagation(),this.openThemeCSS(r)}),n){let E=l.createEl("button",{cls:"mp-tm-icon-btn mp-tm-icon-danger",attr:{"aria-label":"\u5220\u9664"}});(0,te.setIcon)(E,"trash-2"),E.addEventListener("click",I=>{I.stopPropagation(),new zn(this.app,"\u5220\u9664\u4E3B\u9898",`\u5220\u9664\u300C${r.name}\u300D\uFF1F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\u3002`,async()=>{r.source==="remote"?await this.themeManager.deleteRemoteTheme(r.id):r.source==="local"&&await this.themeManager.deleteLocalTheme(r.id),new te.Notice(`\u5DF2\u5220\u9664\u300C${r.name}\u300D`),this.renderContent()}).open()})}}async openThemePreview(u){let r=this.app.workspace.getLeavesOfType(yu),n;r.length>0?(n=r[0],this.app.workspace.revealLeaf(n)):(n=this.app.workspace.getLeaf("split","vertical"),await n.setViewState({type:yu,active:!0}));let a=n.view;a&&a.setTheme&&(a.setTheme(u.id,u.name),await a.refresh())}async openThemeCSS(u){let r=this.app.workspace.getLeavesOfType(Iu),n;r.length>0?(n=r[0],this.app.workspace.revealLeaf(n)):(n=this.app.workspace.getLeaf("split","vertical"),await n.setViewState({type:Iu,active:
Content-Disposition: form-data; name="media"; filename="${u}"\r
Content-Type: image/jpeg\r
\r
`,s=`\r
--${o}--`,A=new TextEncoder().encode(i),l=new TextEncoder().encode(s),b=new Uint8Array(A.length+t.byteLength+l.length);b.set(A,0);let g=new Uint8Array(t);b.set(g,A.length),b.set(l,A.length+t.byteLength);let m=await this.requestWithTokenRetry(async E=>(0,J.requestUrl)({url:`https://api.weixin.qq.com/cgi-bin/material/add_material?access_token=${E}&type=image`,method:"POST",headers:{"Content-Type":`multipart/form-data; boundary=${o}`},body:b.buffer}),r);this.logger.debug(`response: ${JSON.stringify(m)}`);let p=m.json;if(p.errcode&&p.errcode!==0)throw this.handleWechatError(p),new Error(p.errmsg);return{url:(n=p.url)!=null?n:"",media_id:(a=p.media_id)!=null?a:""}}catch(o){return this.logger.error("\u4E0A\u4F20\u56FE\u7247\u5931\u8D25:",o),o instanceof Error&&!o.message.includes("errcode")&&new J.Notice("\u4E0A\u4F20\u56FE\u7247\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u6216\u914D\u7F6E"),null}}async processDocumentImages(t,u,r,n){try{if(!u.parent)throw new Error("\u6587\u4EF6\u5FC5\u987B\u5728\u6587\u4EF6\u5939\u4E2D");let a=No(this.plugin,u),o=activeDocument.createElement("div");o.appendChild((0,J.sanitizeHTMLToDom)(t)),Ar(o);let i=o.querySelectorAll("img"),s=i.length;this.logger.debug(`\u53D1\u73B0 ${s} \u5F20\u56FE\u7247\u9700\u8981\u5904\u7406`);let A=0;for(let l of Array.from(i)){let b=l.getAttribute("src");if(!b)continue;if(r){let m=b.split("/").pop()||`\u56FE\u7247 ${A+1}`;r(A,s,m)}let g=await this.processImage(b,u,a,n);g&&(l.setAttribute("src",g),A++)}return Ar(o),o.innerHTML}catch(a){throw this.logger.error("\u5904\u7406\u6587\u6863\u56FE\u7247\u65F6\u51FA\u9519:",a),a}}convertCodeBlockNewlines(t){let u=activeDocument.createElement("div");return u.appendChild((0,J.sanitizeHTMLToDom)(t)),u.querySelectorAll("code").forEach(r=>{var o;if(r.closest("pre"))return;let n=activeDocument.createElement("span"),a=r.getAttribute("style")||"";for(a&&n.setCssProps(ee(a));r.firstChild;)n.appendChild(r.firstChild);(o=r.parentNode)==null||o.replaceChild(n,r)}),u.querySelectorAll("pre code").forEach(r=>{var i;let n=activeDocument.createTreeWalker(r,NodeFilter.SHOW_TEXT),a=[],o;for(;o=n.nextNode();)a.push(o);for(let s of a){let A=s.textContent||"";if(!A.includes(`
`))continue;let l=A.split(`
`),b=activeDocument.createDocumentFragment();l.forEach((g,m)=>{m>0&&b.appendChild(activeDocument.createElement("br")),g&&b.appendChild(activeDocument.createTextNode(g))}),(i=s.parentNode)==null||i.replaceChild(b,s)}}),u.innerHTML}async processImage(t,u,r,n){var a;try{if(t.startsWith("data:image/")){let s=t.match(/^data:image\/(\w+);base64,(.+)$/);if(!s)return null;let A=s[1],l=s[2],b=`formula_${Date.now()}_${Math.random().toString(36).substring(2,7)}.${A}`,g=window.atob(l),m=new Uint8Array(g.length);for(let I=0;I<g.length;I++)m[I]=g.charCodeAt(I);let p=m.buffer;this.logger.debug(`\u4E0A\u4F20\u751F\u6210\u7684\u56FE\u7247: ${b}`);let E=await this.uploadImageAndGetUrl(p,b,n);return E?E.url:null}if(t.startsWith("app://")){let s=t.split("/").pop();if(!s)return null;s.includes("?")&&(s=s.split("?")[0]);let A=Qn(r,s);if(!A){this.logger.debug(`fetch \u672C\u5730\u56FE\u7247: ${t}`);try{let l=await window.fetch(t);if(!l.ok)return this.logger.error(`fetch \u672C\u5730\u56FE\u7247\u5931\u8D25: ${t}, status: ${l.status}`),null;let b=await l.arrayBuffer(),g=await this.uploadImageAndGetUrl(b,s,n);if(!g)return null;A={fileName:s,url:g.url,media_id:g.media_id,uploadTime:Date.now()},Jn(r,s,A),await mr(this.plugin,u,r)}catch(l){return this.logger.error(`fetch \u672C\u5730\u56FE\u7247\u5F02\u5E38: ${t}`,l),null}}return A.url}if(t.startsWith("http")){let s=Qn(r,t);if(!s){this.logger.debug(`\u4E0B\u8F7D\u5E76\u4E0A\u4F20\u7F51\u7EDC\u56FE\u7247: ${t}`);try{let A=await(0,J.requestUrl)({url:t});if(A.status!==200)return this.logger.error(`\u4E0B\u8F7D\u56FE\u7247\u5931\u8D25: ${t}, status: ${A.status}`),null;let l=((a=t.split("/").pop())==null?void 0:a.split("?")[0])||`web_image_${Date.now()}.png`,b=await this.uploadImageAndGetUrl(A.arrayBuffer,l,n);if(!b)return null;s={fileName:t,url:b.url,media_id:b.media_id,uploadTime:Date.now()},Jn(r,t,s),await mr(this.plugin,u,r)}catch(A){return this.logger.error(`\u5904\u7406\u7F51\u7EDC\u56FE\u7247\u5F02\u5E38: ${t}`,A),null}}return s.url}let o=t.split("/").pop();if(!o)return null;o.includes("?")&&(o=o.split("?")[0]);let i=Qn(r,o);if(!i){let s=this.plugin.app.metadataCache.getFirstLinkpathDest(o,u.path);if(!s||!(s instanceof J.TFile))return this.logger.error(`\u65E0\u6CD5\u627E\u5230\u56FE\u7247\u6587\u4EF6: ${o}`),null;let A=await this.plugin.app.vault.readBinary(s),l=await this.uploadImageAndGetUrl(A,o,n);if(!l)return null;i={fileName:o,url:l.url,media_id:l.media_id,uploadTime:Date.now()},Jn(r,o,i),await mr(this.plugin,u,r)}return i.url}catch(o){return this.logger.error("\u5904\u7406\u56FE\u7247\u65F6\u51FA\u9519:",o),null}}async publishToWechat(t,u,r,n,a,o=""){var i,s,A;try{let l=Ll(this.app),b=activeDocument.createElement("div");b.appendChild((0,J.sanitizeHTMLToDom)(u));let m=b.querySelectorAll("img").length+1;l.show(m,"\u6B63\u5728\u53D1\u5E03\u5230\u5FAE\u4FE1\u516C\u4F17\u53F7...");let p=await this.processDocumentImages(u,n,(O,k,L)=>{l.updateProgress(O,m,`\u6B63\u5728\u4E0A\u4F20\u56FE\u7247 ${O+1}/${k}: ${L||""}`.trim())},a);p=this.convertCodeBlockNewlines(p);let E=No(this.plugin,n),I={title:t,content:p,media_id:(i=E.draft)==null?void 0:i.media_id,item:(s=E.draft)==null?void 0:s.item},w=await this.requestWithTokenRetry(async O=>{var k;return(k=E.draft)!=null&&k.media_id?(0,J.requestUrl)({url:`https://api.weixin.qq.com/cgi-bin/draft/update?access_token=${O}`,method:"POST",body:JSON.stringify({media_id:E.draft.media_id,index:0,articles:{title:t,content:p,thumb_media_id:r,author:"",digest:o,show_cover_pic:r?1:0,content_source_url:"",need_open_comment:0,only_fans_can_comment:0}})}):(0,J.requestUrl)({url:`https://api.weixin.qq.com/cgi-bin/draft/add?access_token=${O}`,method:"POST",body:JSON.stringify({articles:[{title:t,content:p,thumb_media_id:r,author:"",digest:o,show_cover_pic:r?1:0,content_source_url:"",need_open_comment:0,only_fans_can_comment:0}]})})},a);if(this.logger.debug(`response: ${JSON.stringify(w)}`),w.json.errcode===40007&&((A=E.draft)!=null&&A.media_id)&&(this.logger.warn("\u8349\u7A3F media_id \u5DF2\u5931\u6548\uFF0C\u5C1D\u8BD5\u91CD\u65B0\u521B\u5EFA\u65B0\u8349\u7A3F"),E.draft.
/*! Bundled license information:
juice/lib/utils.js:
(**
* Returns an array of the selectors.
*
* @license Sizzle CSS Selector Engine - MIT
* @param {String} selectorText from mensch
* @api public
*)
*/
/* nosourcemap */