| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/pdf.min-BkbWI2Qj.js","assets/index-CVDyAB5E.js","assets/vue-vendor-CBGUFTsF.js","assets/index-B57dUarq.css","assets/docx-preview.min-BF7SdqYs.js","assets/jszip.min-BbO0dq0w.js","assets/index-mYeLtivx.js","assets/index-BbumWpdU.js","assets/index-D7FBKgC3.css","assets/index-91EZoapZ.js","assets/index-DJ09e1LN.css"])))=>i.map(i=>d[i]);
- var At=Object.defineProperty;var Bt=(s,e,t)=>e in s?At(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var b=(s,e,t)=>Bt(s,typeof e!="symbol"?e+"":e,t);import{d as Et,p as ae,q as Re,o as C,w as j,E as It,G as Ce,s as I,c as z,H as Te,v as D,T as He,b as N,I as Pe,a as H,n as Ot,m as ce,t as J,u as ee,y as Lt,j as F,e as ue,B as Ie,C as ut,A as Dt,K as Qe,L as qt,a3 as ht,F as pt}from"./vue-vendor-CBGUFTsF.js";import{a as jt,a2 as Nt,a3 as Ft,B as Mt,a4 as Zt,c as Gt,T as Vt,a5 as Ht,a6 as Qt,a7 as Ut,d as Ue,l as Kt,a8 as te,a9 as Ke,U as We,aa as Wt,m as Xt,s as Yt,j as Jt,ab as en,ac as he,o as tn,ad as ft,_ as dt}from"./index-CVDyAB5E.js";import{R as gt}from"./index-mYeLtivx.js";/* empty css */import{S as kt}from"./index-91EZoapZ.js";var nn=Object.defineProperty,Xe=Object.getOwnPropertySymbols,sn=Object.prototype.hasOwnProperty,rn=Object.prototype.propertyIsEnumerable,Ye=(s,e,t)=>e in s?nn(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,on=(s,e)=>{for(var t in e||(e={}))sn.call(e,t)&&Ye(s,t,e[t]);if(Xe)for(var t of Xe(e))rn.call(e,t)&&Ye(s,t,e[t]);return s};const ln=["top","right","bottom","left"],an=Et({name:"Drawer",components:{ClientOnly:Zt,ArcoButton:Mt,IconHover:Ft,IconClose:Nt},inheritAttrs:!1,props:{visible:{type:Boolean,default:!1},defaultVisible:{type:Boolean,default:!1},placement:{type:String,default:"right",validator:s=>ln.includes(s)},title:String,mask:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0},closable:{type:Boolean,default:!0},okText:String,cancelText:String,okLoading:{type:Boolean,default:!1},okButtonProps:{type:Object},cancelButtonProps:{type:Object},unmountOnClose:Boolean,width:{type:[Number,String],default:250},height:{type:[Number,String],default:250},popupContainer:{type:[String,Object],default:"body"},drawerStyle:{type:Object},onBeforeOk:{type:Function},onBeforeCancel:{type:Function},escToClose:{type:Boolean,default:!0},renderToBody:{type:Boolean,default:!0},header:{type:Boolean,default:!0},footer:{type:Boolean,default:!0},hideCancel:{type:Boolean,default:!1}},emits:{"update:visible":s=>!0,ok:s=>!0,cancel:s=>!0,open:()=>!0,close:()=>!0,beforeOpen:()=>!0,beforeClose:()=>!0},setup(s,{emit:e}){const{popupContainer:t}=Lt(s),n=Gt("drawer"),{t:r}=Vt(),i=F(s.defaultVisible),o=ue(()=>{var v;return(v=s.visible)!=null?v:i.value}),l=F(!1),u=ue(()=>s.okLoading||l.value),{teleportContainer:a,containerRef:c}=Ht({popupContainer:t,visible:o}),p=F(o.value);let f=!1;const d=v=>{s.escToClose&&v.key===Wt.ESC&&$()&&R(v)},w=()=>{s.escToClose&&!f&&(f=!0,Kt(document.documentElement,"keydown",d))},h=()=>{f&&(f=!1,Xt(document.documentElement,"keydown",d))},{zIndex:g,isLastDialog:$}=Qt("dialog",{visible:o}),_=ue(()=>(c==null?void 0:c.value)===document.body);let x=0;const y=()=>{x++,l.value&&(l.value=!1),i.value=!1,e("update:visible",!1)},S=async v=>{const P=x,le=await new Promise(async Se=>{var Ge;if(te(s.onBeforeOk)){let q=s.onBeforeOk((Ve=!0)=>Se(Ve));if((Ke(q)||!We(q))&&(l.value=!0),Ke(q))try{q=(Ge=await q)!=null?Ge:!0}catch{q=!1}We(q)&&Se(q)}else Se(!0)});P===x&&(le?(e("ok",v),y()):l.value&&(l.value=!1))},R=v=>{var P;let le=!0;te(s.onBeforeCancel)&&(le=(P=s.onBeforeCancel())!=null?P:!1),le&&(e("cancel",v),y())},E=v=>{s.maskClosable&&R(v)},O=()=>{o.value&&e("open")},_e=()=>{o.value||(p.value=!1,oe(),e("close"))},{setOverflowHidden:V,resetOverflow:oe}=Ut(c);Ie(()=>{o.value&&(p.value=!0,V(),w())}),ut(()=>{oe(),h()}),Dt(o,v=>{i.value!==v&&(i.value=v),v?(e("beforeOpen"),p.value=!0,V(),w()):(e("beforeClose"),h())});const $e=ue(()=>{var v;const P=on({[s.placement]:0},(v=s.drawerStyle)!=null?v:{});return["right","left"].includes(s.placement)?P.width=Ue(s.width)?`${s.width}px`:s.width:P.height=Ue(s.height)?`${s.height}px`:s.height,P});return{prefixCls:n,style:$e,t:r,mounted:p,computedVisible:o,mergedOkLoading:u,zIndex:g,handleOk:S,handleCancel:R,handleOpen:O,handleClose:_e,handleMask:E,isFixed:_,teleportContainer:a}}});function cn(s,e,t,n,r,i){const o=ae("icon-close"),l=ae("icon-hover"),u=ae("arco-button"),a=ae("client-only");return C(),Re(a,null,{default:j(()=>[(C(),Re(It,{to:s.teleportContainer,disabled:!s.renderToBody},[!s.unmountOnClose||s.computedVisible||s.mounted?Ce((C(),z("div",Te({key:0,class:`${s.prefixCls}-container`,style:s.isFixed?{zIndex:s.zIndex}:{zIndex:"inherit",position:"absolute"}},s.$attrs),[D(He,{name:"fade-drawer",appear:""},{default:j(()=>[s.mask?Ce((C(),z("div",{key:0,class:N(`${s.prefixCls}-mask`),onClick:e[0]||(e[0]=(...c)=>s.handleMask&&s.handleMask(...c))},null,2)),[[Pe,s.computedVisible]]):I("v-if",!0)]),_:1}),D(He,{name:`slide-${s.placement}-drawer`,appear:"",onAfterEnter:s.handleOpen,onAfterLeave:s.handleClose},{default:j(()=>[Ce(H("div",{class:N(s.prefixCls),style:Ot(s.style)},[s.header?(C(),z("div",{key:0,class:N(`${s.prefixCls}-header`)},[ce(s.$slots,"header",{},()=>[s.$slots.title||s.title?(C(),z("div",{key:0,class:N(`${s.prefixCls}-title`)},[ce(s.$slots,"title",{},()=>[J(ee(s.title),1)])],2)):I("v-if",!0),s.closable?(C(),z("div",{key:1,tabindex:"-1",role:"button","aria-label":"Close",class:N(`${s.prefixCls}-close-btn`),onClick:e[1]||(e[1]=(...c)=>s.handleCancel&&s.handleCancel(...c))},[D(l,null,{default:j(()=>[D(o)]),_:1})],2)):I("v-if",!0)])],2)):I("v-if",!0),H("div",{class:N(`${s.prefixCls}-body`)},[ce(s.$slots,"default")],2),s.footer?(C(),z("div",{key:1,class:N(`${s.prefixCls}-footer`)},[ce(s.$slots,"footer",{},()=>[s.hideCancel?I("v-if",!0):(C(),Re(u,Te({key:0},s.cancelButtonProps,{onClick:s.handleCancel}),{default:j(()=>[J(ee(s.cancelText||s.t("drawer.cancelText")),1)]),_:1},16,["onClick"])),D(u,Te({type:"primary",loading:s.mergedOkLoading},s.okButtonProps,{onClick:s.handleOk}),{default:j(()=>[J(ee(s.okText||s.t("drawer.okText")),1)]),_:1},16,["loading","onClick"])])],2)):I("v-if",!0)],6),[[Pe,s.computedVisible]])]),_:3},8,["name","onAfterEnter","onAfterLeave"])],16)),[[Pe,s.computedVisible||s.mounted]]):I("v-if",!0)],8,["to","disabled"]))]),_:3})}var fe=jt(an,[["render",cn]]),un=Object.defineProperty,Je=Object.getOwnPropertySymbols,hn=Object.prototype.hasOwnProperty,pn=Object.prototype.propertyIsEnumerable,et=(s,e,t)=>e in s?un(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,ze=(s,e)=>{for(var t in e||(e={}))hn.call(e,t)&&et(s,t,e[t]);if(Je)for(var t of Je(e))pn.call(e,t)&&et(s,t,e[t]);return s};const tt=(s,e)=>{let t=en("drawer");const n=()=>{a.component&&(a.component.props.visible=!1),te(s.onOk)&&s.onOk()},r=()=>{a.component&&(a.component.props.visible=!1),te(s.onCancel)&&s.onCancel()},i=async()=>{await qt(),t&&(Qe(null,t),document.body.removeChild(t)),t=null,te(s.onClose)&&s.onClose()},o=()=>{a.component&&(a.component.props.visible=!1)},l=c=>{a.component&&Object.entries(c).forEach(([p,f])=>{a.component.props[p]=f})},a=D(fe,ze(ze(ze({},{visible:!0,renderToBody:!1,unmountOnClose:!0,onOk:n,onCancel:r,onClose:i}),tn(s,["content","title","footer","visible","unmountOnClose","onOk","onCancel","onClose"])),{header:typeof s.header=="boolean"?s.header:void 0,footer:typeof s.footer=="boolean"?s.footer:void 0}),{default:he(s.content),header:typeof s.header!="boolean"?he(s.header):void 0,title:he(s.title),footer:typeof s.footer!="boolean"?he(s.footer):void 0});return(e??nt._context)&&(a.appContext=e??nt._context),Qe(a,t),document.body.appendChild(t),{close:o,update:l}},nt=Object.assign(fe,{open:tt,install:(s,e)=>{Yt(s,e);const t=Jt(e);s.component(t+fe.name,fe);const n={open:(r,i=s._context)=>tt(r,i)};s.config.globalProperties.$drawer=n},_context:null});function Oe(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let G=Oe();function mt(s){G=s}const ne={exec:()=>null};function k(s,e=""){let t=typeof s=="string"?s:s.source;const n={replace:(r,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(T.caret,"$1"),t=t.replace(r,o),n},getRegex:()=>new RegExp(t,e)};return n}const T={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:s=>new RegExp(`^( {0,3}${s})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}#`),htmlBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}<(?:[a-z].*>|!--)`,"i")},fn=/^(?:[ \t]*(?:\n|$))+/,dn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,gn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ie=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,kn=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Le=/(?:[*+-]|\d{1,9}[.)])/,bt=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,wt=k(bt).replace(/bull/g,Le).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),mn=k(bt).replace(/bull/g,Le).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),De=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,bn=/^[^\n]+/,qe=/(?!\s*\])(?:\\.|[^\[\]\\])+/,wn=k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",qe).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),xn=k(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Le).getRegex(),xe="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",je=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,yn=k("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",je).replace("tag",xe).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),xt=k(De).replace("hr",ie).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xe).getRegex(),vn=k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",xt).getRegex(),Ne={blockquote:vn,code:dn,def:wn,fences:gn,heading:kn,hr:ie,html:yn,lheading:wt,list:xn,newline:fn,paragraph:xt,table:ne,text:bn},st=k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ie).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xe).getRegex(),_n={...Ne,lheading:mn,table:st,paragraph:k(De).replace("hr",ie).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",st).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xe).getRegex()},$n={...Ne,html:k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",je).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ne,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:k(De).replace("hr",ie).replace("heading",` *#{1,6} *[^
- ]`).replace("lheading",wt).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Sn=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Rn=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,yt=/^( {2,}|\\)\n(?!\s*$)/,Cn=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ye=/[\p{P}\p{S}]/u,Fe=/[\s\p{P}\p{S}]/u,vt=/[^\s\p{P}\p{S}]/u,Tn=k(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Fe).getRegex(),_t=/(?!~)[\p{P}\p{S}]/u,Pn=/(?!~)[\s\p{P}\p{S}]/u,zn=/(?:[^\s\p{P}\p{S}]|~)/u,An=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,$t=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Bn=k($t,"u").replace(/punct/g,ye).getRegex(),En=k($t,"u").replace(/punct/g,_t).getRegex(),St="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",In=k(St,"gu").replace(/notPunctSpace/g,vt).replace(/punctSpace/g,Fe).replace(/punct/g,ye).getRegex(),On=k(St,"gu").replace(/notPunctSpace/g,zn).replace(/punctSpace/g,Pn).replace(/punct/g,_t).getRegex(),Ln=k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,vt).replace(/punctSpace/g,Fe).replace(/punct/g,ye).getRegex(),Dn=k(/\\(punct)/,"gu").replace(/punct/g,ye).getRegex(),qn=k(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),jn=k(je).replace("(?:-->|$)","-->").getRegex(),Nn=k("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",jn).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ge=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Fn=k(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",ge).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Rt=k(/^!?\[(label)\]\[(ref)\]/).replace("label",ge).replace("ref",qe).getRegex(),Ct=k(/^!?\[(ref)\](?:\[\])?/).replace("ref",qe).getRegex(),Mn=k("reflink|nolink(?!\\()","g").replace("reflink",Rt).replace("nolink",Ct).getRegex(),Me={_backpedal:ne,anyPunctuation:Dn,autolink:qn,blockSkip:An,br:yt,code:Rn,del:ne,emStrongLDelim:Bn,emStrongRDelimAst:In,emStrongRDelimUnd:Ln,escape:Sn,link:Fn,nolink:Ct,punctuation:Tn,reflink:Rt,reflinkSearch:Mn,tag:Nn,text:Cn,url:ne},Zn={...Me,link:k(/^!?\[(label)\]\((.*?)\)/).replace("label",ge).getRegex(),reflink:k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ge).getRegex()},Ae={...Me,emStrongRDelimAst:On,emStrongLDelim:En,url:k(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Gn={...Ae,br:k(yt).replace("{2,}","*").getRegex(),text:k(Ae.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},pe={normal:Ne,gfm:_n,pedantic:$n},U={normal:Me,gfm:Ae,breaks:Gn,pedantic:Zn},Vn={"&":"&","<":"<",">":">",'"':""","'":"'"},rt=s=>Vn[s];function L(s,e){if(e){if(T.escapeTest.test(s))return s.replace(T.escapeReplace,rt)}else if(T.escapeTestNoEncode.test(s))return s.replace(T.escapeReplaceNoEncode,rt);return s}function it(s){try{s=encodeURI(s).replace(T.percentDecode,"%")}catch{return null}return s}function ot(s,e){var i;const t=s.replace(T.findPipe,(o,l,u)=>{let a=!1,c=l;for(;--c>=0&&u[c]==="\\";)a=!a;return a?"|":" |"}),n=t.split(T.splitPipe);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!((i=n.at(-1))!=null&&i.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(T.slashPipe,"|");return n}function K(s,e,t){const n=s.length;if(n===0)return"";let r=0;for(;r<n&&s.charAt(n-r-1)===e;)r++;return s.slice(0,n-r)}function Hn(s,e){if(s.indexOf(e[1])===-1)return-1;let t=0;for(let n=0;n<s.length;n++)if(s[n]==="\\")n++;else if(s[n]===e[0])t++;else if(s[n]===e[1]&&(t--,t<0))return n;return-1}function lt(s,e,t,n,r){const i=e.href,o=e.title||null,l=s[1].replace(r.other.outputLinkReplace,"$1");if(s[0].charAt(0)!=="!"){n.state.inLink=!0;const u={type:"link",raw:t,href:i,title:o,text:l,tokens:n.inlineTokens(l)};return n.state.inLink=!1,u}return{type:"image",raw:t,href:i,title:o,text:l}}function Qn(s,e,t){const n=s.match(t.other.indentCodeCompensation);if(n===null)return e;const r=n[1];return e.split(`
- `).map(i=>{const o=i.match(t.other.beginningSpace);if(o===null)return i;const[l]=o;return l.length>=r.length?i.slice(r.length):i}).join(`
- `)}class ke{constructor(e){b(this,"options");b(this,"rules");b(this,"lexer");this.options=e||G}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:K(n,`
- `)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],r=Qn(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){const r=K(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:K(t[0],`
- `)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let n=K(t[0],`
- `).split(`
- `),r="",i="";const o=[];for(;n.length>0;){let l=!1;const u=[];let a;for(a=0;a<n.length;a++)if(this.rules.other.blockquoteStart.test(n[a]))u.push(n[a]),l=!0;else if(!l)u.push(n[a]);else break;n=n.slice(a);const c=u.join(`
- `),p=c.replace(this.rules.other.blockquoteSetextReplace,`
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
- ${c}`:c,i=i?`${i}
- ${p}`:p;const f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,o,!0),this.lexer.state.top=f,n.length===0)break;const d=o.at(-1);if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){const w=d,h=w.raw+`
- `+n.join(`
- `),g=this.blockquote(h);o[o.length-1]=g,r=r.substring(0,r.length-w.raw.length)+g.raw,i=i.substring(0,i.length-w.text.length)+g.text;break}else if((d==null?void 0:d.type)==="list"){const w=d,h=w.raw+`
- `+n.join(`
- `),g=this.list(h);o[o.length-1]=g,r=r.substring(0,r.length-d.raw.length)+g.raw,i=i.substring(0,i.length-w.raw.length)+g.raw,n=h.substring(o.at(-1).raw.length).split(`
- `);continue}}return{type:"blockquote",raw:r,tokens:o,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const o=this.rules.other.listItemRegex(n);let l=!1;for(;e;){let a=!1,c="",p="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let f=t[2].split(`
- `,1)[0].replace(this.rules.other.listReplaceTabs,_=>" ".repeat(3*_.length)),d=e.split(`
- `,1)[0],w=!f.trim(),h=0;if(this.options.pedantic?(h=2,p=f.trimStart()):w?h=t[1].length+1:(h=t[2].search(this.rules.other.nonSpaceChar),h=h>4?1:h,p=f.slice(h),h+=t[1].length),w&&this.rules.other.blankLine.test(d)&&(c+=d+`
- `,e=e.substring(d.length+1),a=!0),!a){const _=this.rules.other.nextBulletRegex(h),x=this.rules.other.hrRegex(h),y=this.rules.other.fencesBeginRegex(h),S=this.rules.other.headingBeginRegex(h),R=this.rules.other.htmlBeginRegex(h);for(;e;){const E=e.split(`
- `,1)[0];let O;if(d=E,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),O=d):O=d.replace(this.rules.other.tabCharGlobal," "),y.test(d)||S.test(d)||R.test(d)||_.test(d)||x.test(d))break;if(O.search(this.rules.other.nonSpaceChar)>=h||!d.trim())p+=`
- `+O.slice(h);else{if(w||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||y.test(f)||S.test(f)||x.test(f))break;p+=`
- `+d}!w&&!d.trim()&&(w=!0),c+=E+`
- `,e=e.substring(E.length+1),f=O.slice(h)}}i.loose||(l?i.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(l=!0));let g=null,$;this.options.gfm&&(g=this.rules.other.listIsTask.exec(p),g&&($=g[0]!=="[ ] ",p=p.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:c,task:!!g,checked:$,loose:!1,text:p,tokens:[]}),i.raw+=c}const u=i.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let a=0;a<i.items.length;a++)if(this.lexer.state.top=!1,i.items[a].tokens=this.lexer.blockTokens(i.items[a].text,[]),!i.loose){const c=i.items[a].tokens.filter(f=>f.type==="space"),p=c.length>0&&c.some(f=>this.rules.other.anyLine.test(f.raw));i.loose=p}if(i.loose)for(let a=0;a<i.items.length;a++)i.items[a].loose=!0;return i}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:i}}}table(e){var l;const t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;const n=ot(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(l=t[3])!=null&&l.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
- `):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const u of r)this.rules.other.tableAlignRight.test(u)?o.align.push("right"):this.rules.other.tableAlignCenter.test(u)?o.align.push("center"):this.rules.other.tableAlignLeft.test(u)?o.align.push("left"):o.align.push(null);for(let u=0;u<n.length;u++)o.header.push({text:n[u],tokens:this.lexer.inline(n[u]),header:!0,align:o.align[u]});for(const u of i)o.rows.push(ot(u,o.header.length).map((a,c)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:o.align[c]})));return o}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const n=t[1].charAt(t[1].length-1)===`
- `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;const o=K(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{const o=Hn(t[2],"()");if(o>-1){const u=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,u).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){const o=this.rules.other.pedanticHrefTitle.exec(r);o&&(r=o[1],i=o[3])}else i=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),lt(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[r.toLowerCase()];if(!i){const o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return lt(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const o=[...r[0]].length-1;let l,u,a=o,c=0;const p=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,t=t.slice(-1*e.length+o);(r=p.exec(t))!=null;){if(l=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!l)continue;if(u=[...l].length,r[3]||r[4]){a+=u;continue}else if((r[5]||r[6])&&o%3&&!((o+u)%3)){c+=u;continue}if(a-=u,a>0)continue;u=Math.min(u,u+a+c);const f=[...r[0]][0].length,d=e.slice(0,o+r.index+f+u);if(Math.min(o,u)%2){const h=d.slice(1,-1);return{type:"em",raw:d,text:h,tokens:this.lexer.inlineTokens(h)}}const w=d.slice(2,-2);return{type:"strong",raw:d,text:w,tokens:this.lexer.inlineTokens(w)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," ");const r=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let r,i;if(t[2]==="@")r=t[0],i="mailto:"+r;else{let o;do o=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(o!==t[0]);r=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}}class A{constructor(e){b(this,"tokens");b(this,"options");b(this,"state");b(this,"tokenizer");b(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||G,this.options.tokenizer=this.options.tokenizer||new ke,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={other:T,block:pe.normal,inline:U.normal};this.options.pedantic?(t.block=pe.pedantic,t.inline=U.pedantic):this.options.gfm&&(t.block=pe.gfm,this.options.breaks?t.inline=U.breaks:t.inline=U.gfm),this.tokenizer.rules=t}static get rules(){return{block:pe,inline:U}}static lex(e,t){return new A(t).lex(e)}static lexInline(e,t){return new A(t).inlineTokens(e)}lex(e){e=e.replace(T.carriageReturn,`
- `),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const n=this.inlineQueue[t];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){var r,i,o;for(this.options.pedantic&&(e=e.replace(T.tabCharGlobal," ").replace(T.spaceLine,""));e;){let l;if((i=(r=this.options.extensions)==null?void 0:r.block)!=null&&i.some(a=>(l=a.call({lexer:this},e,t))?(e=e.substring(l.raw.length),t.push(l),!0):!1))continue;if(l=this.tokenizer.space(e)){e=e.substring(l.raw.length);const a=t.at(-1);l.raw.length===1&&a!==void 0?a.raw+=`
- `:t.push(l);continue}if(l=this.tokenizer.code(e)){e=e.substring(l.raw.length);const a=t.at(-1);(a==null?void 0:a.type)==="paragraph"||(a==null?void 0:a.type)==="text"?(a.raw+=`
- `+l.raw,a.text+=`
- `+l.text,this.inlineQueue.at(-1).src=a.text):t.push(l);continue}if(l=this.tokenizer.fences(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.heading(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.hr(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.blockquote(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.list(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.html(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.def(e)){e=e.substring(l.raw.length);const a=t.at(-1);(a==null?void 0:a.type)==="paragraph"||(a==null?void 0:a.type)==="text"?(a.raw+=`
- `+l.raw,a.text+=`
- `+l.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title});continue}if(l=this.tokenizer.table(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.lheading(e)){e=e.substring(l.raw.length),t.push(l);continue}let u=e;if((o=this.options.extensions)!=null&&o.startBlock){let a=1/0;const c=e.slice(1);let p;this.options.extensions.startBlock.forEach(f=>{p=f.call({lexer:this},c),typeof p=="number"&&p>=0&&(a=Math.min(a,p))}),a<1/0&&a>=0&&(u=e.substring(0,a+1))}if(this.state.top&&(l=this.tokenizer.paragraph(u))){const a=t.at(-1);n&&(a==null?void 0:a.type)==="paragraph"?(a.raw+=`
- `+l.raw,a.text+=`
- `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(l),n=u.length!==e.length,e=e.substring(l.raw.length);continue}if(l=this.tokenizer.text(e)){e=e.substring(l.raw.length);const a=t.at(-1);(a==null?void 0:a.type)==="text"?(a.raw+=`
- `+l.raw,a.text+=`
- `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(l);continue}if(e){const a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var l,u,a;let n=e,r=null;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)c.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i=!1,o="";for(;e;){i||(o=""),i=!1;let c;if((u=(l=this.options.extensions)==null?void 0:l.inline)!=null&&u.some(f=>(c=f.call({lexer:this},e,t))?(e=e.substring(c.raw.length),t.push(c),!0):!1))continue;if(c=this.tokenizer.escape(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.tag(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.link(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(c.raw.length);const f=t.at(-1);c.type==="text"&&(f==null?void 0:f.type)==="text"?(f.raw+=c.raw,f.text+=c.text):t.push(c);continue}if(c=this.tokenizer.emStrong(e,n,o)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.codespan(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.br(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.del(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.autolink(e)){e=e.substring(c.raw.length),t.push(c);continue}if(!this.state.inLink&&(c=this.tokenizer.url(e))){e=e.substring(c.raw.length),t.push(c);continue}let p=e;if((a=this.options.extensions)!=null&&a.startInline){let f=1/0;const d=e.slice(1);let w;this.options.extensions.startInline.forEach(h=>{w=h.call({lexer:this},d),typeof w=="number"&&w>=0&&(f=Math.min(f,w))}),f<1/0&&f>=0&&(p=e.substring(0,f+1))}if(c=this.tokenizer.inlineText(p)){e=e.substring(c.raw.length),c.raw.slice(-1)!=="_"&&(o=c.raw.slice(-1)),i=!0;const f=t.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=c.raw,f.text+=c.text):t.push(c);continue}if(e){const f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return t}}class me{constructor(e){b(this,"options");b(this,"parser");this.options=e||G}space(e){return""}code({text:e,lang:t,escaped:n}){var o;const r=(o=(t||"").match(T.notSpaceStart))==null?void 0:o[0],i=e.replace(T.endingNewline,"")+`
- `;return r?'<pre><code class="language-'+L(r)+'">'+(n?i:L(i,!0))+`</code></pre>
- `:"<pre><code>"+(n?i:L(i,!0))+`</code></pre>
- `}blockquote({tokens:e}){return`<blockquote>
- ${this.parser.parse(e)}</blockquote>
- `}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
- `}hr(e){return`<hr>
- `}list(e){const t=e.ordered,n=e.start;let r="";for(let l=0;l<e.items.length;l++){const u=e.items[l];r+=this.listitem(u)}const i=t?"ol":"ul",o=t&&n!==1?' start="'+n+'"':"";return"<"+i+o+`>
- `+r+"</"+i+`>
- `}listitem(e){var n;let t="";if(e.task){const r=this.checkbox({checked:!!e.checked});e.loose?((n=e.tokens[0])==null?void 0:n.type)==="paragraph"?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=r+" "+L(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):t+=r+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
- `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
- `}table(e){let t="",n="";for(let i=0;i<e.header.length;i++)n+=this.tablecell(e.header[i]);t+=this.tablerow({text:n});let r="";for(let i=0;i<e.rows.length;i++){const o=e.rows[i];n="";for(let l=0;l<o.length;l++)n+=this.tablecell(o[l]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
- <thead>
- `+t+`</thead>
- `+r+`</table>
- `}tablerow({text:e}){return`<tr>
- ${e}</tr>
- `}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
- `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${L(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){const r=this.parser.parseInline(n),i=it(e);if(i===null)return r;e=i;let o='<a href="'+e+'"';return t&&(o+=' title="'+L(t)+'"'),o+=">"+r+"</a>",o}image({href:e,title:t,text:n}){const r=it(e);if(r===null)return L(n);e=r;let i=`<img src="${e}" alt="${n}"`;return t&&(i+=` title="${L(t)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:L(e.text)}}class Ze{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}}class B{constructor(e){b(this,"options");b(this,"renderer");b(this,"textRenderer");this.options=e||G,this.options.renderer=this.options.renderer||new me,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ze}static parse(e,t){return new B(t).parse(e)}static parseInline(e,t){return new B(t).parseInline(e)}parse(e,t=!0){var r,i;let n="";for(let o=0;o<e.length;o++){const l=e[o];if((i=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&i[l.type]){const a=l,c=this.options.extensions.renderers[a.type].call({parser:this},a);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(a.type)){n+=c||"";continue}}const u=l;switch(u.type){case"space":{n+=this.renderer.space(u);continue}case"hr":{n+=this.renderer.hr(u);continue}case"heading":{n+=this.renderer.heading(u);continue}case"code":{n+=this.renderer.code(u);continue}case"table":{n+=this.renderer.table(u);continue}case"blockquote":{n+=this.renderer.blockquote(u);continue}case"list":{n+=this.renderer.list(u);continue}case"html":{n+=this.renderer.html(u);continue}case"paragraph":{n+=this.renderer.paragraph(u);continue}case"text":{let a=u,c=this.renderer.text(a);for(;o+1<e.length&&e[o+1].type==="text";)a=e[++o],c+=`
- `+this.renderer.text(a);t?n+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):n+=c;continue}default:{const a='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}parseInline(e,t=this.renderer){var r,i;let n="";for(let o=0;o<e.length;o++){const l=e[o];if((i=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&i[l.type]){const a=this.options.extensions.renderers[l.type].call({parser:this},l);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){n+=a||"";continue}}const u=l;switch(u.type){case"escape":{n+=t.text(u);break}case"html":{n+=t.html(u);break}case"link":{n+=t.link(u);break}case"image":{n+=t.image(u);break}case"strong":{n+=t.strong(u);break}case"em":{n+=t.em(u);break}case"codespan":{n+=t.codespan(u);break}case"br":{n+=t.br(u);break}case"del":{n+=t.del(u);break}case"text":{n+=t.text(u);break}default:{const a='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}}class se{constructor(e){b(this,"options");b(this,"block");this.options=e||G}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?A.lex:A.lexInline}provideParser(){return this.block?B.parse:B.parseInline}}b(se,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class Un{constructor(...e){b(this,"defaults",Oe());b(this,"options",this.setOptions);b(this,"parse",this.parseMarkdown(!0));b(this,"parseInline",this.parseMarkdown(!1));b(this,"Parser",B);b(this,"Renderer",me);b(this,"TextRenderer",Ze);b(this,"Lexer",A);b(this,"Tokenizer",ke);b(this,"Hooks",se);this.use(...e)}walkTokens(e,t){var r,i;let n=[];for(const o of e)switch(n=n.concat(t.call(this,o)),o.type){case"table":{const l=o;for(const u of l.header)n=n.concat(this.walkTokens(u.tokens,t));for(const u of l.rows)for(const a of u)n=n.concat(this.walkTokens(a.tokens,t));break}case"list":{const l=o;n=n.concat(this.walkTokens(l.items,t));break}default:{const l=o;(i=(r=this.defaults.extensions)==null?void 0:r.childTokens)!=null&&i[l.type]?this.defaults.extensions.childTokens[l.type].forEach(u=>{const a=l[u].flat(1/0);n=n.concat(this.walkTokens(a,t))}):l.tokens&&(n=n.concat(this.walkTokens(l.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{const r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const o=t.renderers[i.name];o?t.renderers[i.name]=function(...l){let u=i.renderer.apply(this,l);return u===!1&&(u=o.apply(this,l)),u}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=t[i.level];o?o.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),r.extensions=t),n.renderer){const i=this.defaults.renderer||new me(this.defaults);for(const o in n.renderer){if(!(o in i))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const l=o,u=n.renderer[l],a=i[l];i[l]=(...c)=>{let p=u.apply(i,c);return p===!1&&(p=a.apply(i,c)),p||""}}r.renderer=i}if(n.tokenizer){const i=this.defaults.tokenizer||new ke(this.defaults);for(const o in n.tokenizer){if(!(o in i))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const l=o,u=n.tokenizer[l],a=i[l];i[l]=(...c)=>{let p=u.apply(i,c);return p===!1&&(p=a.apply(i,c)),p}}r.tokenizer=i}if(n.hooks){const i=this.defaults.hooks||new se;for(const o in n.hooks){if(!(o in i))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;const l=o,u=n.hooks[l],a=i[l];se.passThroughHooks.has(o)?i[l]=c=>{if(this.defaults.async)return Promise.resolve(u.call(i,c)).then(f=>a.call(i,f));const p=u.call(i,c);return a.call(i,p)}:i[l]=(...c)=>{let p=u.apply(i,c);return p===!1&&(p=a.apply(i,c)),p}}r.hooks=i}if(n.walkTokens){const i=this.defaults.walkTokens,o=n.walkTokens;r.walkTokens=function(l){let u=[];return u.push(o.call(this,l)),i&&(u=u.concat(i.call(this,l))),u}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return A.lex(e,t??this.defaults)}parser(e,t){return B.parse(e,t??this.defaults)}parseMarkdown(e){return(n,r)=>{const i={...r},o={...this.defaults,...i},l=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&i.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const u=o.hooks?o.hooks.provideLexer():e?A.lex:A.lexInline,a=o.hooks?o.hooks.provideParser():e?B.parse:B.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(n):n).then(c=>u(c,o)).then(c=>o.hooks?o.hooks.processAllTokens(c):c).then(c=>o.walkTokens?Promise.all(this.walkTokens(c,o.walkTokens)).then(()=>c):c).then(c=>a(c,o)).then(c=>o.hooks?o.hooks.postprocess(c):c).catch(l);try{o.hooks&&(n=o.hooks.preprocess(n));let c=u(n,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let p=a(c,o);return o.hooks&&(p=o.hooks.postprocess(p)),p}catch(c){return l(c)}}}onError(e,t){return n=>{if(n.message+=`
- Please report this to https://github.com/markedjs/marked.`,e){const r="<p>An error occurred:</p><pre>"+L(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}}const M=new Un;function m(s,e){return M.parse(s,e)}m.options=m.setOptions=function(s){return M.setOptions(s),m.defaults=M.defaults,mt(m.defaults),m};m.getDefaults=Oe;m.defaults=G;m.use=function(...s){return M.use(...s),m.defaults=M.defaults,mt(m.defaults),m};m.walkTokens=function(s,e){return M.walkTokens(s,e)};m.parseInline=M.parseInline;m.Parser=B;m.parser=B.parse;m.Renderer=me;m.TextRenderer=Ze;m.Lexer=A;m.lexer=A.lex;m.Tokenizer=ke;m.Hooks=se;m.parse=m;m.options;m.setOptions;m.use;m.walkTokens;m.parseInline;B.parse;A.lex;var Kn={value:()=>{}};function Wn(){for(var s=0,e=arguments.length,t={},n;s<e;++s){if(!(n=arguments[s]+"")||n in t||/[\s.]/.test(n))throw new Error("illegal type: "+n);t[n]=[]}return new de(t)}function de(s){this._=s}function Xn(s,e){return s.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}de.prototype=Wn.prototype={constructor:de,on:function(s,e){var t=this._,n=Xn(s+"",t),r,i=-1,o=n.length;if(arguments.length<2){for(;++i<o;)if((r=(s=n[i]).type)&&(r=Yn(t[r],s.name)))return r;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++i<o;)if(r=(s=n[i]).type)t[r]=at(t[r],s.name,e);else if(e==null)for(r in t)t[r]=at(t[r],s.name,null);return this},copy:function(){var s={},e=this._;for(var t in e)s[t]=e[t].slice();return new de(s)},call:function(s,e){if((r=arguments.length-2)>0)for(var t=new Array(r),n=0,r,i;n<r;++n)t[n]=arguments[n+2];if(!this._.hasOwnProperty(s))throw new Error("unknown type: "+s);for(i=this._[s],n=0,r=i.length;n<r;++n)i[n].value.apply(e,t)},apply:function(s,e,t){if(!this._.hasOwnProperty(s))throw new Error("unknown type: "+s);for(var n=this._[s],r=0,i=n.length;r<i;++r)n[r].value.apply(e,t)}};function Yn(s,e){for(var t=0,n=s.length,r;t<n;++t)if((r=s[t]).name===e)return r.value}function at(s,e,t){for(var n=0,r=s.length;n<r;++n)if(s[n].name===e){s[n]=Kn,s=s.slice(0,n).concat(s.slice(n+1));break}return t!=null&&s.push({name:e,value:t}),s}var Q=0,X=0,W=0,Tt=1e3,be,Y,we=0,Z=0,ve=0,re=typeof performance=="object"&&performance.now?performance:Date,Pt=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(s){setTimeout(s,17)};function zt(){return Z||(Pt(Jn),Z=re.now()+ve)}function Jn(){Z=0}function Be(){this._call=this._time=this._next=null}Be.prototype=es.prototype={constructor:Be,restart:function(s,e,t){if(typeof s!="function")throw new TypeError("callback is not a function");t=(t==null?zt():+t)+(e==null?0:+e),!this._next&&Y!==this&&(Y?Y._next=this:be=this,Y=this),this._call=s,this._time=t,Ee()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ee())}};function es(s,e,t){var n=new Be;return n.restart(s,e,t),n}function ts(){zt(),++Q;for(var s=be,e;s;)(e=Z-s._time)>=0&&s._call.call(void 0,e),s=s._next;--Q}function ct(){Z=(we=re.now())+ve,Q=X=0;try{ts()}finally{Q=0,ss(),Z=0}}function ns(){var s=re.now(),e=s-we;e>Tt&&(ve-=e,we=s)}function ss(){for(var s,e=be,t,n=1/0;e;)e._call?(n>e._time&&(n=e._time),s=e,e=e._next):(t=e._next,e._next=null,e=s?s._next=t:be=t);Y=s,Ee(n)}function Ee(s){if(!Q){X&&(X=clearTimeout(X));var e=s-Z;e>24?(s<1/0&&(X=setTimeout(ct,s-re.now()-ve)),W&&(W=clearInterval(W))):(W||(we=re.now(),W=setInterval(ns,Tt)),Q=1,Pt(ct))}}function ys(s){throw new Error('Could not dynamically require "'+s+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}function rs(s){ft(()=>import("./pdf.min-BkbWI2Qj.js"),__vite__mapDeps([0,1,2,3])).then(e=>{e.GlobalWorkerOptions.workerSrc="/pdfjs-dist/pdf.worker.min.js",typeof s=="function"&&s(e)}).catch(e=>{console.log(e,"PDF解析库加载错误")})}const is={key:0,class:"loading-pdf-box"},os={class:"loading-spin"},ls={key:1,class:"loading-pdf-box"},as={__name:"ViewerPDFFromUrl",props:{url:String,doc_width:Number,positions:Array},setup(s,{expose:e}){const t=s,n=ht("box");let r=null;const i=[];let o=[],l=1,u=[];const a=F(1),c=F(""),p=(()=>{const h={};return t.positions.forEach((g,$)=>{const _=g[0],x=g[1],y=g[2],S=g[3],R=g[4];_ in h?h[_].push({x1:x,x2:y,y1:S,y2:R}):h[_]=[{x1:x,x2:y,y1:S,y2:R}]}),h})();function f(h,g,$,_,x){h.fillStyle="rgba(255, 255, 0, 0.5)";const y=$-g,S=x-_;h.fillRect(g,_,y,S)}Ie(()=>{a.value=2,c.value="loading",rs(h=>{h.getDocument(t.url).promise.then(async g=>{r=g;const $=g.numPages;let _=-1,x=0;i.length=0,o.length=0;for(let y=1;y<=$;y++){const S=document.createElement("canvas");S.addEventListener("contextmenu",function(v){v.preventDefault()}),o[y]=S.getContext("2d");const R=await g.getPage(y),E=R.getViewport({scale:1}),O=E.width,_e=E.height,V=t.doc_width,oe=V/(O/_e);l=V/O;const $e=R.getViewport({scale:l});if(i.push(x),S.width=V,S.height=oe,x=x+S.height,await R.render({viewport:$e,canvasContext:o[y]}).promise,y in p){const v=p[y];_===-1&&(_=y),v.forEach(P=>{f(o[y],P.x1*l,P.x2*l,P.y1*l,P.y2*l)})}n.value&&n.value.appendChild(S)}a.value=3,c.value="success",_!==-1&&setTimeout(()=>{n.value&&(n.value.scrollTop=i[_-1])})}).catch(g=>{console.log(g,"PDF加载出错"),a.value=4,c.value=`PDF文档 ${t.url} 加载出错。 ERROR: :${g.message}`})})});const d=h=>{const g={};return Array.isArray(h)&&h.forEach(($,_)=>{const x=$[0],y=$[1],S=$[2],R=$[3],E=$[4];x in g?g[x].push({x1:y,x2:S,y1:R,y2:E}):g[x]=[{x1:y,x2:S,y1:R,y2:E}]}),g},w=async(h,g)=>{var $;r&&(setTimeout(()=>{n.value&&(n.value.scrollTop=i[h-1])}),u.includes(h)||($=d(g)[h])==null||$.forEach(x=>{f(o[h],x.x1*l,x.x2*l,x.y1*l,x.y2*l),u.push(h)}))};return ut(()=>{o.forEach(h=>{h.clearRect(0,0,h.canvas.width,h.canvas.height)}),o.length=0,i.length=0,r=null}),e({toPageIndex:w}),(h,g)=>{const $=kt,_=gt;return C(),z(pt,null,[H("div",{class:"pdf-container",id:"pdfContainer",ref_key:"box",ref:n},null,512),a.value===2?(C(),z("div",is,[H("div",os,[D($,{size:36})])])):I("",!0),a.value===4?(C(),z("div",ls,[D(_,{status:"error",title:h.$t("common.doc_error")},{subtitle:j(()=>[J(ee(c.value),1)]),_:1},8,["title"])])):I("",!0)],64)}}},vs=dt(as,[["__scopeId","data-v-d035c650"]]),cs=(s,e)=>new Promise((t,n)=>{ft(()=>import("./docx-preview.min-BF7SdqYs.js"),__vite__mapDeps([4,5,1,2,3,6,7,8,9,10])).then(r=>{const i=r.renderAsync;i(e,s),t()}).catch(r=>{console.log("docx-preview.mjs 加载失败"),n(r)})});async function us(s){try{const e=await fetch(s);if(!e.ok)throw new Error(`Network response was not ok: ${e.statusText}`);return await e.blob()}catch(e){throw console.error("There was a problem with the fetch operation:",e),e}}const _s=s=>{if(!s)return"";const e=s.split(".");return e[e.length-1]},hs={key:0,class:"loading-doc-box"},ps={class:"loading-spin"},fs={key:1,class:"loading-doc-box"},ds={__name:"ViewerDocxFromUrl",props:{url:String,doc_width:Number},setup(s){const e=s,t=ht("box"),n=F(1),r=F("");return Ie(()=>{n.value=2,r.value="loading",us(e.url).then(i=>{cs(t.value,i).then(o=>{n.value=3,r.value="success"}).catch(o=>{n.value=4,r.value=`文档 ${e.url} 加载出错。 ERROR: :${o.message}`})}).catch(i=>{n.value=4,r.value=`文档 ${e.url} 加载出错。 ERROR: :${i.message}`})}),(i,o)=>{const l=kt,u=gt;return C(),z(pt,null,[H("div",{class:"doc-container",ref_key:"box",ref:t},null,512),n.value===2?(C(),z("div",hs,[H("div",ps,[D(l,{size:36})])])):I("",!0),n.value===4?(C(),z("div",fs,[D(u,{status:"error",title:i.$t("common.doc_error")},{subtitle:j(()=>[J(ee(r.value),1)]),_:1},8,["title"])])):I("",!0)],64)}}},$s=dt(ds,[["__scopeId","data-v-0889a676"]]);export{nt as D,Un as M,Be as T,vs as V,$s as a,ys as c,Wn as d,_s as g,rs as l,m,zt as n,cs as r,es as t};
|