You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Guidance__index.async.js

1 line
18 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[50869],{92685:function(e,t,n){var a=n(82242),r=n.n(a),i=(n(59301),n(93314)),c=n(3113),l=n(37712);t.Z=function(e){var t=e.img,n=e.buttonProps,a=void 0===n?{}:n,o=e.styles,s=void 0===o?{}:o,u=e.customText,d=e.ButtonText,p=e.ButtonClick,f=e.Buttonclass,h=e.ButtonTwo,v=e.imgStyles,m=e.loading,g=void 0!==m&&m;return(0,l.jsxs)("section",{className:"tc animated fadeIn",style:r()(r()({},{color:"#999",margin:"100px auto",visibility:g?"hidden":"visible"}),s),children:[(0,l.jsx)("img",{src:t||i,style:r()(r()({},v),{},{pointerEvents:"none",userSelect:"none"})}),(0,l.jsx)("p",{className:"mt20 font14",children:u||"暂时还没有相关数据哦!"}),d&&(0,l.jsx)(c.ZP,r()(r()({className:f,onClick:p},a),{},{children:d})),h&&h]})}},79616:function(e,t,n){n.d(t,{Z:function(){return j}});var a=n(82242),r=n.n(a),i=n(7557),c=n.n(i),l=n(41498),o=n.n(l),s=n(79800),u=n.n(s),d=n(59301),p={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},f=n(3113),h=n(74516),v=n(99925),m=n(6848),g=n(69901),x=n(70367),w=n(92685),y=n(47162),_=n(20858),b=n(37712),j=function(e){var t,n,a,i,l,s,j=e.editOffice,k=void 0===j?"view":j,E=e.data,Z=(e.theme,e.type),A=e.filename,S=e.monacoEditor,N=e.className,P=e.style,I=e.close,R=e.onClose,C=e.hasMask,O=e.disabledDownload,T=e.onImgDimensions,L=e.showNodata,z=e.recordInfo,V=(0,d.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),M=u()(V,2),B=(M[0],M[1],(0,d.useState)("")),F=u()(B,2),H=(F[0],F[1]),W=(0,d.useState)(),D=u()(W,2),J=D[0],U=D[1],q="build"===window.ENV?"/react/build":"",$=location.host.startsWith("localhost")?y.Z.PROXY_SERVER:y.Z.API_SERVER,X=(0,d.useRef)();null!==(t=E)&&void 0!==t&&t.startsWith("/api")&&"txt"!==Z&&(E=y.Z.API_SERVER+E);A&&(S.filename=A),(0,d.useEffect)((function(){var e,t=null===(e=document.cookie)||void 0===e||null===(e=e.replace(/\s/g,""))||void 0===e?void 0:e.split(";");null==t||t.map((function(e){var t=e.split("=");"_educoder_session"===t[0]&&H(t[1])}))}),[]),(0,d.useEffect)((function(){var e;"office"===Z&&(E.indexOf("bigfilescdn.")>-1||E.indexOf("bigfiles1")>-1?U({url:E,fileType:(e=E,e.substring(e.lastIndexOf("/")+1).split(".").pop()),model:E.indexOf("model=edit")?"edit":"view"}):Q())}),[Z,E]);var Q=function(){var e=o()(c()().mark((function e(){var t,n,a;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("data:",E),t=E,E.startsWith("http")||(t=location.origin+t),n=new URL(t).pathname.split("/").pop(),e.next=6,(0,x.gJ)({attachment_id:n});case 6:(a=e.sent).url=$+a.url,U(a);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Y=function(){E.startsWith("http")||E.startsWith("blob:")?K():(0,g.Sv)(A||"educoder",E,A)},K=function(){z&&(0,_.fc)({id:null==z?void 0:z.id,watch_type:1,course_id:null==z?void 0:z.course_id}),(0,g.Nd)(A||"educoder",decodeURIComponent(E))};return(0,b.jsxs)("div",{style:r()({},P||{}),className:"".concat(C&&p.bgBlack," ").concat(Z?p.wrp:"hide"),children:[I&&(0,b.jsxs)("div",{className:p.close,ref:X,children:[!!T&&(0,b.jsx)(m.Z,{title:"点击对图片进行批注",getPopupContainer:function(){return X.current},children:(0,b.jsx)("span",{onClick:function(){R(),T()},children:(0,b.jsx)("i",{className:"icon-yulanpizhu"})})}),!O&&(0,b.jsx)(m.Z,{title:"点击下载此文件",getPopupContainer:function(){return X.current},children:(0,b.jsx)("span",{onClick:K,children:(0,b.jsx)("i",{className:"icon-quxiaozhiding"})})}),(0,b.jsx)(m.Z,{title:"关闭",getPopupContainer:function(){return X.current},children:(0,b.jsx)("span",{className:"",onClick:R,children:(0,b.jsx)("i",{className:"icon-guanbi1"})})})]}),(0,b.jsx)("div",{className:"".concat(p[N]," ").concat(N," ").concat(p.monaco," ").concat("txt"===Z?"show":"hide"),children:"txt"===Z&&(0,b.jsx)(b.Fragment,{children:(0,b.jsx)(v.ZP,r()({},S))})}),"audio"===Z&&(0,b.jsx)("audio",{src:"".concat((null===(n=E)||void 0===n?void 0:n.indexOf("http://"))>-1||(null===(a=E)||void 0===a?void 0:a.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(E),autoPlay:!0}),"video"===Z&&(0,b.jsx)(b.Fragment,{children:(null===(i=E)||void 0===i?void 0:i.indexOf("http"))>-1?(0,b.jsx)("video",{controls:!0,src:"".concat(E),autoPlay:!0}):(0,b.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(E),autoPlay:!0})}),"office"===Z&&J&&(0,b.jsx)("iframe",{src:"".concat(q,"/office.html?key=").concat(J.key,"&url=").concat(btoa(J.url),"&callbackUrl=").concat($+J.callbackUrl,"&fileType=").concat(J.fileType,"&title=").concat(J.title,"&model=").concat(k,"&officeServer=").concat(y.Z.ONLYOFFICE,"&disabledDownload=").concat(!!O)}),"html"===Z&&(0,b.jsx)("iframe",{src:E+"&disposition=inline"}),"pdf"===Z&&(0,b.jsx)("iframe",{src:"".concat(q,"/js/pdfview/index.html?url=").concat(encodeURIComponent(E),"&disabledDownload=").concat(!!O)}),"image"===Z&&(0,b.jsx)("img",{src:"".concat((null===(l=E)||void 0===l?void 0:l.indexOf("http://"))>-1||(null===(s=E)||void 0===s?void 0:s.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(E)}),("other"===Z||"download"===Z)&&(0,b.jsx)(b.Fragment,{children:L?(0,b.jsx)(w.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,b.jsx)(f.ZP,{icon:(0,b.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Y,children:"下载"})}):(0,b.jsxs)(f.ZP,{type:"primary",size:"middle",onClick:Y,children:[(0,b.jsx)(h.Z,{}),"点击下载"]})})]})}},605:function(e,t,n){n.d(t,{z:function(){return b}});var a=n(82242),r=n.n(a),i=n(37205),c=n.n(i),l=n(91232),o=n.n(l),s=n(79800),u=n.n(s),d=n(59301),p=(n(68080),n(18067)),f=(n(64018),n(36422)),h=n(47162),v=n(69901),m=n(15342),g=n(1012),x=n(79616),w=n(37712),y="@▁@",_=/<pre[^>]*>/g;var b=function(e,t){e=e||"";var n=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return t?e.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(n,(function(e,t,n,a,r,i,c){var l=t||a||i,o=n||r||c||"?";return h.Z.API_SERVER+"/api/attachments/"+l+o+"&t="+(0,v.Jn)(l,Date.now())+(e.indexOf(")")>-1?")":"&")})).replaceAll('src="(','src="').replaceAll("src='(",'src="'):e=e.replace(n,(function(e,t,n,a,r,i,c){var l=t||a||i,o=n||r||c||"?";return h.Z.API_SERVER+"/api/attachments/"+l+o+"&t="+(0,v.Jn)(l,Date.now())+(e.indexOf(")")>-1?")":"&")})).replace(/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,(function(e,t,n,a,r){var i=t||a,c=n||r||"";return'"'+h.Z.API_SERVER+"/api/attachments/"+i+c+i+c+"&t="+(0,v.Jn)(i,Date.now())})).replace(/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,(function(e,t,n,a,r){var i=t||a,c=n||r||"";return"("+h.Z.API_SERVER+"/files/uploads/"+i+c+i+c+"&t="+(0,v.Jn)(i,Date.now())})).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,"\n")};t.Z=function(e){var t=e.value,n=void 0===t?"":t,a=e.className,i=e.showTextOnly,l=e.showLines,s=e.style,v=void 0===s?{}:s,b=e.stylesPrev,j=void 0===b?{}:b,k=e.highlightKeywords,E=e.showProgramFill,Z=(e.isProgramFill,e.disabledFill),A=void 0!==Z&&Z,S=e.programFillValue,N=e.onFillChange,P=void 0===N?function(e){}:N,I=e.onFillBlur,R=void 0===I?function(){}:I,C=String(n),O=(0,d.useState)(""),T=u()(O,2),L=T[0],z=T[1],V=(0,d.useState)("office"),M=u()(V,2),B=M[0],F=M[1],H=(0,d.useState)([]),W=u()(H,2),D=W[0],J=W[1],U=(0,d.useRef)("a"+(0,g.Z)()),q={};var $=function(e){return e.replace(/<style.*?>([\s\S]+?)<\/style>/gim,(function(e,t){var n=t.replace(/(\n|\r)/g,"").split("}"),a=[];return n.map((function(e){""!=e&&a.push(".".concat(U.current," ").concat(e))})),"<style>".concat(a.join("}"),"</style>")}))},X=(0,d.useMemo)((function(){try{C=C.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+h.Z.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+h.Z.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+h.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,"\n")}catch(e){}if(E){var e=-1;return C=C.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,(function(t,n,a){var r;return function(e,t,n){var a=document.createElement(e===y?"input":"textarea");a.style.width="100%",a.style.height=e===y?"40px":"151px",a.rows=5,a.spellcheck=!1,a.name="edu-program-fill",a.placeholder="请输入",a.dataset.id=t;var r=Object.keys(q).length;return q[r]=a,'<span class="edu-program-fill-wrap '.concat(e===y?"":"show",'" style="width:').concat(e===y?"400px":"100%",'" title=').concat(n||"","><span>").concat(a.outerHTML,'<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>')}(t,++e,null==S||null===(r=S[e])||void 0===r?void 0:r.value)})),'<pre style="background:#fff;padding:4px">'.concat($(C||""),"</pre>")}var t=$(C);t=(0,p.ZP)(t);var n=(0,p.ez)();C.match(/\[TOC\]/)&&(t=t.replace("<p>[TOC]</p>",(0,p.Qv)()),(0,p.Iy)()),t=t.replace(/(__special_katext_id_\d+__)/g,(function(e,t){var a=n[t],r=a.type,i=a.expression;return(0,m.renderToString)(function(e){var t=document.createElement("div");return t.innerHTML=e,0===t.childNodes.length?"":t.childNodes[0].nodeValue}(i)||"",{displayMode:"block"===r,throwOnError:!1,output:"html"})})),t=t.replace(/▁/g,"▁▁▁▁▁"),(0,p.AL)();var a=document.createElement("div");return a.innerHTML=t,i?a.innerText:k?(K(a,k.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),a.innerHTML):(setTimeout((function(){return te()}),500),a.innerHTML)}),[C,k]);(0,d.useEffect)((function(){G.current&&G.current.querySelectorAll(["input","textarea"]).forEach((function(e){e.oninput=Q,e.onblur=Y}))}),[D]),(0,d.useEffect)((function(){if(null!=S&&S.length)try{var e,t=G.current.querySelectorAll(".edu-program-fill-score"),n=G.current.querySelectorAll('[name="edu-program-fill"]'),a=o()(n.entries());try{for(a.s();!(e=a.n()).done;){var r,i,c,l=u()(e.value,2),s=l[0],d=l[1];d.value=(null==S||null===(r=S[s])||void 0===r?void 0:r.value)||"","warning"===(null==S||null===(i=S[s])||void 0===i?void 0:i.type)?d.className="program-fill-warning":"success"===(null==S||null===(c=S[s])||void 0===c?void 0:c.type)?d.className="program-fill-success":d.className=""}}catch(e){a.e(e)}finally{a.f()}var p,f=o()(t.entries());try{for(f.s();!(p=f.n()).done;){var h,v,m=u()(p.value,2),g=m[0];m[1].innerHTML=null!=S&&null!==(h=S[g])&&void 0!==h&&h.score?"".concat(null==S||null===(v=S[g])||void 0===v?void 0:v.score,"分"):""}}catch(e){f.e(e)}finally{f.f()}J(S)}catch(e){console.log(e,"error")}}),[S]);var Q=function(e){D[e.target.dataset.id]=D[e.target.dataset.id]||{},D[e.target.dataset.id].value=e.target.value,J(c()(D)),P(D,e.target.dataset.id)},Y=function(e){D[e.target.dataset.id]=D[e.target.dataset.id]||{},D[e.target.dataset.id].value=e.target.value,J(c()(D)),R(D,e.target.dataset.id)};function K(e,t){return e.childNodes.forEach((function(e){if(e.childNodes.length>0)K(e,t);else if("IMG"!==e.nodeName)if(e.innerHTML){var n;e.innerHTML=null===(n=e.innerHTML)||void 0===n?void 0:n.replace(new RegExp(t,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>')}else{var a=document.createElement("span");a.innerHTML=e.textContent.replace(new RegExp(t,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),e.replaceWith(a)}}))}var G=(0,d.useRef)();function ee(e){var t=e.target;if("A"===t.tagName.toUpperCase()){var n=t.getAttribute("href");if(n.indexOf("office")>-1)e.preventDefault(),z(n),F("office");else if(n.indexOf("application/pdf")>-1)e.preventDefault(),z(n),F("pdf");else if(n.indexOf("text/html")>-1)e.preventDefault(),z(n),F("html");else if(n.startsWith("#")){e.preventDefault();var a=document.getElementById(n.replace("#",""));a&&a.scrollIntoView(!0)}}}p.jb.WebkitLineClamp=l,l&&(v=r()(r()({},v),p.jb));var te=function(){var e,t=null===(e=G.current)||void 0===e?void 0:e.querySelectorAll("video");null==t||t.forEach((function(e){if(e.oncontextmenu=function(){return!1},e.src.indexOf(".m3u8")>-1)if(e.canPlayType("application/vnd.apple.mpegurl"));else if(f.ZP.isSupported()){var t=new f.ZP;t.loadSource(e.src),t.attachMedia(e)}}))};return(0,d.useEffect)((function(){if(G.current&&X&&X.match(_)&&window.PR.prettyPrint(),G.current)return G.current.addEventListener("click",ee),function(){var e;null===(e=G.current)||void 0===e||e.removeEventListener("click",ee),(0,p.AL)(),(0,p.Iy)()}}),[X,G.current,ee]),(0,w.jsxs)(w.Fragment,{children:[i&&(0,w.jsx)("div",{ref:G,children:X}),!i&&(0,w.jsx)("div",{ref:G,style:r()({},v),className:"".concat(a||""," ").concat(A?"disabled-fill":""," markdown-body ").concat(U.current),dangerouslySetInnerHTML:{__html:X}}),(0,w.jsx)(x.Z,{close:!0,data:L,type:null!=L&&L.length?B:"",style:r()({},j),onClose:function(){return z("")}})]})}},79626:function(e,t,n){n.r(t),n.d(t,{default:function(){return A}});var a=n(7557),r=n.n(a),i=n(41498),c=n.n(i),l=n(79800),o=n.n(l),s=n(39647),u=n.n(s),d=n(59301),p=n(78836),f=n(69901),h=n(56511),v=n(3113),m="guidance___BnanP",g="title___b2ocd",x="u___QIqxh",w="active___VXClY",y="content___NNbRj",_="btn___Q2wyi",b=n(32157),j=n(47162),k=n(605),E=n(37712),Z=["user"],A=(0,p.connect)((function(e){return{user:e.user}}))((function(e){var t,n,a,i=e.user,l=(u()(e,Z),(0,d.useState)(1)),s=o()(l,2),A=s[0],S=s[1],N=(0,d.useState)(!1),P=o()(N,2),I=P[0],R=P[1],C=(0,d.useState)(!1),O=o()(C,2),T=O[0],L=O[1],z=(0,d.useState)(""),V=o()(z,2),M=V[0],B=V[1],F=(0,d.useState)(!0),H=o()(F,2),W=H[0],D=H[1],J=(0,d.useState)([{},{}]),U=o()(J,2),q=U[0],$=U[1],X=(0,p.useLocation)(),Q=X.pathname;console.log(X,"location"),(0,d.useEffect)((function(){var e;null!=i&&null!==(e=i.userInfo)&&void 0!==e&&e.identity&&Y()}),[null==i||null===(t=i.userInfo)||void 0===t?void 0:t.identity]),(0,d.useEffect)((function(){K()}),[]);var Y=function(){var e;Q.includes("classrooms")?"student"===(null==i||null===(e=i.userInfo)||void 0===e?void 0:e.identity)&&(R(!0),S(2)):Q.includes("paths")&&L(!0)},K=function(){var e=c()(r()().mark((function e(t){var n,a,i,c;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.ZP)("/api/introductions.json",{method:"get"});case 2:null!=(n=e.sent)&&n.introductions&&(a=null,Q.includes("classrooms")&&(a="course",B("教学课堂")),Q.includes("paths")&&(a="subject",B("实践课程")),i=n.introductions,c=[null==i?void 0:i.find((function(e){return"teacher"===e.clazz&&e.page_type===a})),null==i?void 0:i.find((function(e){return"student"===e.clazz&&e.page_type===a}))],$(c)),D(!1);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,E.jsx)("section",{className:m,children:(0,E.jsxs)(h.Z,{loading:W,active:!0,paragraph:{rows:5},children:[(0,E.jsxs)("div",{className:g,children:[M,"新手指引"]}),(0,E.jsxs)("ul",{className:x,children:[!I&&(0,E.jsx)("li",{onClick:function(){return S(1)},className:1===A?w:"",children:"教师版"}),!T&&(0,E.jsx)("li",{onClick:function(){return S(2)},className:2===A?w:"",children:"学生版"})]}),1===A&&(0,E.jsx)("div",{className:y,children:(0,E.jsx)(k.Z,{value:(null===(n=q[0])||void 0===n?void 0:n.content)||""})}),2===A&&(0,E.jsx)("div",{className:y,children:(0,E.jsx)(k.Z,{value:(null===(a=q[1])||void 0===a?void 0:a.content)||""})}),(0,E.jsx)("div",{className:_,children:(0,E.jsx)(v.ZP,{type:"primary",onClick:function(){var e,t,n=j.Z.API_SERVER+"/api/attachments/"+(1===A?null===(e=q[0])||void 0===e?void 0:e.attachment_id:null===(t=q[1])||void 0===t?void 0:t.attachment_id);(0,f.Nd)("",n)},children:"下载用户手册"})})]})})}))},18067:function(e,t,n){n.d(t,{AL:function(){return b},Iy:function(){return p},Qv:function(){return v},ez:function(){return _},jb:function(){return f}});var a=n(79800),r=n.n(a),i=n(32834),c=n.n(i),l=n(11690);var o=[],s=["<ul>"],u=new(c().Renderer),d=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function p(){o.length=0,s=["<ul>"]}var f={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function h(e,t,n,a){if(t>=e.length||e[t].level<=n)return t;var r=e[t];a.push("<li><a href='#"+r.anchor+"'>"+r.text+"</a>");var i=[];return t=h(e,++t,r.level,i),i.length>0&&(a.push("<ul>"),i.forEach((function(e){a.push(e)})),a.push("</ul>")),a.push("</li>"),t=h(e,t,n,a)}function v(){return h(o,0,0,s),s.push("</ul>"),s.join("")}var m={heading:function(e){var t=d.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},fences:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],a=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var a=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:r()(t,1)[0].length>=a.length?e.slice(a.length):e})).join("\n")}(n,t[3]||""),i=t[2]?t[2].trim():t[2];if(["latex","katex","math"].indexOf(i)>=0){var c=w(),l=a;a=c,y[c]={type:"block",expression:l}}return{type:"code",raw:n,lang:i,text:a}}}},g=/(?:\${2})([^\n`]+?)(?:\${2})/gi,x=0,w=function(){return"__special_katext_id_".concat(x++,"__")},y={};function _(){return y}function b(){x=0,y={}}function j(e){return e=e.replace(g,(function(e,t){var n=w();return y[n]={type:"inline",expression:t},n}))}var k=u.listitem;u.listitem=function(e){return k(j(e))};var E=u.paragraph;u.paragraph=function(e){return E(j(e))};var Z=u.tablecell;u.tablecell=function(e,t){return Z(j(e),t)},u.code=function(e,t,n){var a=(t||"").match(/\S*/)[0];return a?["latex","katex","math"].indexOf(a)>=0?"<p class='editormd-tex'>".concat(e,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(t,'">').concat(n?e:(0,l.escape)(e,!0),"</code></pre>\n"):'<pre class="prettyprint linenums"><code>'+(n?e:(0,l.escape)(e,!0))+"</code></pre>"},u.heading=function(e,t,n){var a=this.options.headerPrefix+n.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return o.push({anchor:a,level:t,text:e}),"<h"+t+' id="'+a+'">'+e+"</h"+t+">"},c().setOptions({silent:!0,gfm:!0,pedantic:!1}),c().use({tokenizer:m,renderer:u}),t.ZP=c()}}]);