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__virtualSpaces__Lists__Kn...

1 line
57 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[38447,4585],{29114:function(e,n,t){t.d(n,{Z:function(){return y}});var i=t(82242),r=t.n(i),a=t(7557),o=t.n(a),l=t(41498),s=t.n(l),c=t(79800),u=t.n(c),d=t(59301),p={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},f=t(3113),h=t(22441),m=t(38288),v=t(6848),x=t(27876),g=t(43516),_=t(6638),j=t(71681),w=t(37712),y=function(e){var n,t,i,a,l,c,y,k=e.editOffice,b=void 0===k?"view":k,S=e.data,C=(e.theme,e.type),Z=e.filename,N=e.monacoEditor,P=e.className,F=e.style,E=e.close,T=e.onClose,R=e.hasMask,O=e.disabledDownload,z=e.onImgDimensions,I=e.showNodata,L=(0,d.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),A=u()(L,2),D=(A[0],A[1],(0,d.useState)("")),B=u()(D,2),M=(B[0],B[1]),V=(0,d.useState)(),H=u()(V,2),U=H[0],W=H[1],K="build"===window.ENV?"/react/build":"",q=location.host.startsWith("localhost")?j.Z.PROXY_SERVER:j.Z.API_SERVER,X=(0,d.useRef)();null!==(n=S)&&void 0!==n&&n.startsWith("/api")&&"txt"!==C&&(S=j.Z.API_SERVER+S),Z&&(N.filename=Z),(0,d.useEffect)((function(){var e,n=null===(e=document.cookie)||void 0===e||null===(e=e.replace(/\s/g,""))||void 0===e?void 0:e.split(";");null==n||n.map((function(e){var n=e.split("=");"_educoder_session"===n[0]&&M(n[1])}))}),[]),(0,d.useEffect)((function(){"office"===C&&$()}),[C,S]);var $=function(){var e=s()(o()().mark((function e(){var n,t,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=S,S.startsWith("http")||(n=location.origin+n),t=new URL(n).pathname.split("/").pop(),e.next=5,(0,g.gJ)({attachment_id:t});case 5:i=e.sent,W(i);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),J=function(){S.startsWith("http")||S.startsWith("blob:")?Y():(0,x.Sv)(Z||"educoder",S,Z)},Y=function(){(0,x.Nd)(Z||"educoder",decodeURIComponent(S))};return(0,w.jsxs)("div",{style:r()({},F||{}),className:"".concat(R&&p.bgBlack," ").concat(C?p.wrp:"hide"),children:[E&&(0,w.jsxs)("div",{className:p.close,ref:X,children:[!!z&&(0,w.jsx)(v.Z,{title:"点击对图片进行批注",getPopupContainer:function(){return X.current},children:(0,w.jsx)("span",{onClick:function(){T(),z()},children:(0,w.jsx)("i",{className:"icon-yulanpizhu"})})}),!O&&(0,w.jsx)(v.Z,{title:"点击下载此文件",getPopupContainer:function(){return X.current},children:(0,w.jsx)("span",{onClick:Y,children:(0,w.jsx)("i",{className:"icon-quxiaozhiding"})})}),(0,w.jsx)(v.Z,{title:"关闭",getPopupContainer:function(){return X.current},children:(0,w.jsx)("span",{className:"",onClick:T,children:(0,w.jsx)("i",{className:"icon-guanbi1"})})})]}),(0,w.jsx)("div",{className:"".concat(p[P]," ").concat(P," ").concat(p.monaco," ").concat("txt"===C?"show":"hide"),children:"txt"===C&&(0,w.jsx)(m.ZP,r()({},N))}),"audio"===C&&(0,w.jsx)("audio",{src:(null===(t=S)||void 0===t?void 0:t.indexOf("http"))>-1||null!==(i=S)&&void 0!==i&&i.startsWith("/api")?S:"data:image/png;base64,".concat(S),autoPlay:!0}),"video"===C&&(0,w.jsx)(w.Fragment,{children:(null===(a=S)||void 0===a?void 0:a.indexOf("http"))>-1||null!==(l=S)&&void 0!==l&&l.startsWith("/api")?(0,w.jsx)("video",{controls:!0,src:"".concat(S),autoPlay:!0}):(0,w.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(S),autoPlay:!0})}),"office"===C&&U&&(0,w.jsx)("iframe",{src:"".concat(K,"/office.html?key=").concat(U.key,"&url=").concat(q+U.url,"&callbackUrl=").concat(q+U.callbackUrl,"&fileType=").concat(U.fileType,"&title=").concat(U.title,"&model=").concat(b,"&officeServer=").concat(j.Z.ONLYOFFICE,"&disabledDownload=").concat(!!O)}),"html"===C&&(0,w.jsx)("iframe",{src:S+"&disposition=inline"}),"pdf"===C&&(0,w.jsx)("iframe",{src:"".concat(K,"/js/pdfview/index.html?url=").concat(S,"&disabledDownload=").concat(!!O)}),"image"===C&&(0,w.jsx)("img",{src:(null===(c=S)||void 0===c?void 0:c.indexOf("http"))>-1||null!==(y=S)&&void 0!==y&&y.startsWith("/api")?S:"data:image/png;base64,".concat(S)}),("other"===C||"download"===C)&&(0,w.jsx)(w.Fragment,{children:I?(0,w.jsx)(_.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,w.jsx)(f.ZP,{icon:(0,w.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:J,children:"下载"})}):(0,w.jsxs)(f.ZP,{type:"primary",size:"middle",onClick:J,children:[(0,w.jsx)(h.Z,{}),"点击下载"]})})]})}},4585:function(e,n,t){t.d(n,{Z:function(){return H}});var i=t(82242),r=t.n(i),a=t(37205),o=t.n(a),l=t(91232),s=t.n(l),c=t(79800),u=t.n(c),d=t(59301),p=(t(49040),t(32834)),f=t.n(p),h=t(11690);var m=[],v=["<ul>"],x=new(f().Renderer),g=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function _(){m.length=0,v=["<ul>"]}var j={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function w(e,n,t,i){if(n>=e.length||e[n].level<=t)return n;var r=e[n];i.push("<li><a href='#"+r.anchor+"'>"+r.text+"</a>");var a=[];return n=w(e,++n,r.level,a),a.length>0&&(i.push("<ul>"),a.forEach((function(e){i.push(e)})),i.push("</ul>")),i.push("</li>"),n=w(e,n,t,i)}function y(){return w(m,0,0,v),v.push("</ul>"),v.join("")}var k={heading:function(e){var n=g.exec(e);if(n)return{type:"heading",raw:n[0],depth:n[1].length,text:n[2]}},fences:function(e){var n=this.rules.block.fences.exec(e);if(n){var t=n[0],i=function(e,n){var t=e.match(/^(\s+)(?:```)/);if(null===t)return n;var i=t[1];return n.split("\n").map((function(e){var n=e.match(/^\s+/);return null===n?e:u()(n,1)[0].length>=i.length?e.slice(i.length):e})).join("\n")}(t,n[3]||""),r=n[2]?n[2].trim():n[2];if(["latex","katex","math"].indexOf(r)>=0){var a=C(),o=i;i=a,Z[a]={type:"block",expression:o}}return{type:"code",raw:t,lang:r,text:i}}}},b=/(?:\${2})([^\n`]+?)(?:\${2})/gi,S=0,C=function(){return"__special_katext_id_".concat(S++,"__")},Z={};function N(){return Z}function P(){S=0,Z={}}function F(e){return e=e.replace(b,(function(e,n){var t=C();return Z[t]={type:"inline",expression:n},t}))}var E=x.listitem;x.listitem=function(e){return E(F(e))};var T=x.paragraph;x.paragraph=function(e){return T(F(e))};var R=x.tablecell;x.tablecell=function(e,n){return R(F(e),n)},x.code=function(e,n,t){var i=(n||"").match(/\S*/)[0];return i?["latex","katex","math"].indexOf(i)>=0?"<p class='editormd-tex'>".concat(e,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(n,'">').concat(t?e:(0,h.escape)(e,!0),"</code></pre>\n"):'<pre class="prettyprint linenums"><code>'+(t?e:(0,h.escape)(e,!0))+"</code></pre>"},x.heading=function(e,n,t){var i=this.options.headerPrefix+t.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return m.push({anchor:i,level:n,text:e}),"<h"+n+' id="'+i+'">'+e+"</h"+n+">"},f().setOptions({silent:!0,gfm:!0,pedantic:!1}),f().use({tokenizer:k,renderer:x});var O=f(),z=(t(64018),t(6419)),I=t(71681),L=t(15342),A=t(1012),D=t(29114),B=t(37712),M="@▁@",V=/<pre[^>]*>/g;var H=function(e){var n=e.value,t=void 0===n?"":n,i=e.className,a=e.showTextOnly,l=e.showLines,c=e.style,p=void 0===c?{}:c,f=e.stylesPrev,h=void 0===f?{}:f,m=e.highlightKeywords,v=e.showProgramFill,x=(e.isProgramFill,e.disabledFill),g=void 0!==x&&x,w=e.programFillValue,k=e.onFillChange,b=void 0===k?function(e){}:k,S=e.onFillBlur,C=void 0===S?function(){}:S,Z=String(t),F=(0,d.useState)(""),E=u()(F,2),T=E[0],R=E[1],H=(0,d.useState)("office"),U=u()(H,2),W=U[0],K=U[1],q=(0,d.useState)([]),X=u()(q,2),$=X[0],J=X[1],Y=(0,d.useRef)("a"+(0,A.Z)()),G={},Q=function(e){return e.replace(/<style.*?>([\s\S]+?)<\/style>/gim,(function(e,n){var t=n.replace(/(\n|\r)/g,"").split("}"),i=[];return t.map((function(e){""!=e&&i.push(".".concat(Y.current," ").concat(e))})),"<style>".concat(i.join("}"),"</style>")}))},ee=(0,d.useMemo)((function(){try{Z=Z.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+I.Z.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+I.Z.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+I.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(v){var e=-1;return Z=Z.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,(function(n,t,i){return function(e,n){var t=document.createElement(e===M?"input":"textarea");t.style.width="100%",t.style.height=e===M?"40px":"151px",t.rows=5,t.spellcheck=!1,t.name="edu-program-fill",t.placeholder="请输入",t.dataset.id=n;var i=Object.keys(G).length;return G[i]=t,'<span class="edu-program-fill-wrap '.concat(e===M?"":"show",'" style="width:').concat(e===M?"200px":"100%",'"><span>').concat(t.outerHTML,'<span class="edu-program-fill-score"></span></span></span>')}(n,++e)})),'<pre style="background:#fff;padding:4px">'.concat(Q(Z||""),"</pre>")}var n=O(Z);n=Q(n);var t=N();Z.match(/\[TOC\]/)&&(n=n.replace("<p>[TOC]</p>",y()),_()),n=n.replace(/(__special_katext_id_\d+__)/g,(function(e,n){var i=t[n],r=i.type,a=i.expression;return(0,L.renderToString)(function(e){var n=document.createElement("div");return n.innerHTML=e,0===n.childNodes.length?"":n.childNodes[0].nodeValue}(a)||"",{displayMode:"block"===r,throwOnError:!1,output:"html"})})),n=n.replace(/▁/g,"▁▁▁"),P();var i=document.createElement("div");return i.innerHTML=n,m?(ie(i,m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),i.innerHTML):a?i.innerText:(setTimeout((function(){return oe()}),500),i.innerHTML)}),[Z,m]);(0,d.useEffect)((function(){re.current&&re.current.querySelectorAll(["input","textarea"]).forEach((function(e){e.oninput=ne,e.onblur=te}))}),[$]),(0,d.useEffect)((function(){if(null!=w&&w.length){var e,n=re.current.querySelectorAll(".edu-program-fill-score"),t=re.current.querySelectorAll('[name="edu-program-fill"]'),i=s()(t.entries());try{for(i.s();!(e=i.n()).done;){var r,a=u()(e.value,2),o=a[0],l=a[1];l.value=null===(r=w[o])||void 0===r?void 0:r.value,"warning"===w[o].type?l.className="program-fill-warning":"success"===w[o].type?l.className="program-fill-success":l.className=""}}catch(e){i.e(e)}finally{i.f()}var c,d=s()(n.entries());try{for(d.s();!(c=d.n()).done;){var p,f,h=u()(c.value,2),m=h[0];h[1].innerHTML=null!==(p=w[m])&&void 0!==p&&p.score?"".concat(null===(f=w[m])||void 0===f?void 0:f.score,"分"):""}}catch(e){d.e(e)}finally{d.f()}J(w)}}),[w]);var ne=function(e){$[e.target.dataset.id]=$[e.target.dataset.id]||{},$[e.target.dataset.id].value=e.target.value,J(o()($)),b($,e.target.dataset.id)},te=function(e){$[e.target.dataset.id]=$[e.target.dataset.id]||{},$[e.target.dataset.id].value=e.target.value,J(o()($)),C($,e.target.dataset.id)};function ie(e,n){return e.childNodes.forEach((function(e){if(e.childNodes.length>0)ie(e,n);else if("IMG"!==e.nodeName)if(e.innerHTML){var t;e.innerHTML=null===(t=e.innerHTML)||void 0===t?void 0:t.replace(new RegExp(n,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>')}else{var i=document.createElement("span");i.innerHTML=e.textContent.replace(new RegExp(n,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),e.replaceWith(i)}}))}var re=(0,d.useRef)();function ae(e){var n=e.target;if("A"===n.tagName.toUpperCase()){var t=n.getAttribute("href");if(t.indexOf("office")>-1)e.preventDefault(),R(t),K("office");else if(t.indexOf("application/pdf")>-1)e.preventDefault(),R(t),K("pdf");else if(t.indexOf("text/html")>-1)e.preventDefault(),R(t),K("html");else if(t.startsWith("#")){e.preventDefault();var i=document.getElementById(t.replace("#",""));i&&i.scrollIntoView(!0)}}}j.WebkitLineClamp=l,l&&(p=r()(r()({},p),j));var oe=function(){var e,n=null===(e=re.current)||void 0===e?void 0:e.querySelectorAll("video");null==n||n.forEach((function(e){if(e.oncontextmenu=function(){return!1},e.src.indexOf(".m3u8")>-1)if(e.canPlayType("application/vnd.apple.mpegurl"));else if(z.ZP.isSupported()){var n=new z.ZP;n.loadSource(e.src),n.attachMedia(e)}}))};return(0,d.useEffect)((function(){if(re.current&&ee&&ee.match(V)&&window.PR.prettyPrint(),re.current)return re.current.addEventListener("click",ae),function(){var e;null===(e=re.current)||void 0===e||e.removeEventListener("click",ae),P(),_()}}),[ee,re.current,ae]),(0,B.jsxs)(B.Fragment,{children:[a&&(0,B.jsx)("div",{ref:re,children:ee}),!a&&(0,B.jsx)("div",{ref:re,style:r()({},p),className:"".concat(i||""," ").concat(g?"disabled-fill":""," markdown-body ").concat(Y.current),dangerouslySetInnerHTML:{__html:ee}}),(0,B.jsx)(D.Z,{close:!0,data:T,type:null!=T&&T.length?W:"",style:r()({},h),onClose:function(){return R("")}})]})}},7450:function(e,n,t){t.d(n,{Z:function(){return x}});var i=t(82242),r=t.n(i),a=t(7557),o=t.n(a),l=t(41498),s=t.n(l),c=t(79800),u=t.n(c),d=t(59301),p=t(84686),f=t(49105),h=t(80608),m=(t(87266),{editor_css:"editor_css___cm3Z8"}),v=t(37712),x=(0,h.connect)((function(e){return{user:e.user}}))((function(e){var n=e.defaultvalue,t=e.onChange,i=e.style,a=e.user,l=e.placeholder,c=2097152,h=(0,d.useRef)(null),x=(0,d.useState)(null),g=u()(x,2),_=g[0],j=g[1],w=(0,d.useState)(""),y=u()(w,2),k=y[0],b=y[1];(0,d.useEffect)((function(){b(n)}),[n]),(0,d.useEffect)((function(){t(k)}),[k]);var S={placeholder:l||"请输入内容...",MENU_CONF:{}};S.MENU_CONF.uploadImage={customUpload:function(e,n){return s()(o()().mark((function t(){var i,r;return o()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(i=new FormData).append("file",e),t.next=4,(0,f.ZP)("/api/attachments.json",{method:"post",body:i},!0);case 4:r=t.sent,n(null==r?void 0:r.url,"","");case 6:case"end":return t.stop()}}),t)})))()}},S.MENU_CONF.uploadVideo={customUpload:function(e,n){return s()(o()().mark((function t(){var i,r,l,s,u,d,p,m,v,x,g,_,j,w;return o()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=e.size,r=Math.ceil(i/c),t.prev=2,t.next=5,(0,f.ZP)("/api/attachments/multipart_upload_start",{method:"POST",body:{fileName:e.name,chunkCount:r,user_id:null==a||null===(l=a.userInfo)||void 0===l?void 0:l.user_id}});case 5:if(0===(null==(u=t.sent)?void 0:u.status)){t.next=8;break}throw new Error;case 8:d=u.upload_id,h.current=new AbortController,p=[],0,m=o()().mark((function n(){var t,r,a,l;return o()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:t=v*c,r=Math.min(t+c,i),a=e.slice(t,r),(l=new FormData).append("chunk",a),l.append("fileName",e.name),l.append("chunkIndex",(v+1).toString()),l.append("uploadId",d),p.push((function(){return(0,f.ZP)("/api/attachments/multipart_upload",{method:"POST",body:l,signal:h.current.signal},!0).then((function(e){}))}));case 9:case"end":return n.stop()}}),n)})),v=0;case 14:if(!(v<r)){t.next=19;break}return t.delegateYield(m(),"t0",16);case 16:v++,t.next=14;break;case 19:x=0,g=4,console.log(p,"promises");case 22:if(!(x<p.length)){t.next=31;break}if(!((j=null===(_=p.slice(x,x+g))||void 0===_?void 0:_.map((function(e){return e()}))).length>0)){t.next=29;break}return t.next=27,Promise.all(j);case 27:t.sent,x+=g;case 29:t.next=22;break;case 31:return t.next=33,(0,f.ZP)("/api/attachments/multipart_upload_end",{method:"POST",body:{fileName:e.name,chunkCount:r,uploadId:d,user_id:null==a||null===(s=a.userInfo)||void 0===s?void 0:s.user_id}});case 33:w=t.sent,n(null==w?void 0:w.object,""),t.next=39;break;case 37:t.prev=37,t.t1=t.catch(2);case 39:case"end":return t.stop()}}),t,null,[[2,37]])})))()}};return(0,d.useEffect)((function(){return function(){null!=_&&(_.destroy(),j(null))}}),[_]),(0,v.jsx)(v.Fragment,{children:(0,v.jsxs)("div",{className:null==m?void 0:m.editor_css,style:{border:"1px solid #ccc",zIndex:100},children:[(0,v.jsx)(p.o,{editor:_,defaultConfig:{},mode:"default",style:{borderBottom:"1px solid #ccc"}}),(0,v.jsx)(p.M,{defaultConfig:S,value:k,onCreated:j,onChange:function(e){var n;!function(e){return""==e||new RegExp("^[ ]+$").test(e)}((n=e.getHtml(),n.replace(/<[^<p>]+>/g,"").replace(/<[</p>$]+>/g,"").replace(/&nbsp;/gi,"").replace(/<[^<br/>]+>/g,"")))?b(e.getHtml()):b("")},mode:"default",style:r()({height:"500px",overflowY:"hidden"},i)})]})})}))},84319:function(e,n,t){t.r(n),t.d(n,{default:function(){return he}});var i=t(7557),r=t.n(i),a=t(82242),o=t.n(a),l=t(41498),s=t.n(l),c=t(79800),u=t.n(c),d=t(59301),p=t(80608),f=t(43418),h=t(95237),m=t(71418),v="wrap___NZWPs",x="content___OLcvS",g="name____Thh2",_="list___F7fxl",j="head___ffJpn",w="models___kudCc",y="btns___CQDPq",k="rowsHead___oC1SU",b="time___r7Qed",S="rowsBody___ZNF9c",C=t(49105),Z=t(48410),N=t(4585),P=t(11806),F=t(75916),E=t(27876),T=t(82100),R=t.n(T),O=t(29186),z=t.n(O),I=t(4811),L=t.n(I),A=t(34577),D=t.n(A),B=t(80619),M=t.n(B),V=t(47074),H=t.n(V),U=t(78241),W=t(8591),K=t(3113),q=t(6848),X=t(38854),$=t(57809),J=t(24650),Y=t(32985),G=t(43604),Q=t(53326),ee=t(85160),ne=t(12378),te=t(25526),ie={flex_box_center:"flex_box_center___dw6yv",flex_space_between:"flex_space_between___bkc32",flex_box_vertical_center:"flex_box_vertical_center___jDpm2",flex_box_center_end:"flex_box_center_end___g9JOB",flex_box_column:"flex_box_column___ngIjI","diagram-component":"diagram-component___fHDp0",rightmodal:"rightmodal___Fwj_F",title:"title___YZZgl",button:"button___yQKxh",linetitles:"linetitles___CFVw5",line:"line___hSEjG",additem:"additem___cy1wv",lebels:"lebels___E2znG",describe:"describe___emw2X",describetitle:"describetitle___bgNOs",ehover:"ehover____RCDx",dhover:"dhover___IP_3b",header:"header___PCDQg",headeractivite:"headeractivite___x56tJ"},re=t(6638),ae=t(71681),oe=t(12911),le=t.n(oe),se=t(7450),ce=t(37712),ue=function(e){M()(t,e);var n=H()(t);function t(){return R()(this,t),n.apply(this,arguments)}return z()(t,[{key:"isFixed",value:function(e){return e.node.isSelected}},{key:"doLayout",value:function(e){var n=this;this._isObserving||(this._isObserving=!0,this.diagram.addModelChangedListener((function(e){(""!==e.modelChange||e.change===ne.Vk.Transaction&&"StartingFirstTransaction"===e.propertyName)&&(n.network=null)})));var i=this.network;null===i?this.network=i=this.makeNetwork(e):this.diagram.nodes.each((function(e){var n=i.findVertex(e);null!==n&&(n.bounds=e.actualBounds)})),L()(D()(t.prototype),"doLayout",this).call(this,e),this.network=i}}]),t}(ne.hD),de=["#3CDAA3","#9C41DE","#F84F90","#30A7F1","#6656FF"],pe=["根节点","课件知识单元","实训知识单元","文本知识单元","知识点"],fe=(0,p.connect)((function(e){var n=e.virtualSpaces;return{globalSetting:e.globalSetting,virtualSpaces:n}}))((function(e){e.globalSetting,e.dispatch;var n,t,i=e.virtualSpaces,a=(0,p.useParams)(),l=(0,d.useRef)(),c=(0,d.useState)(!1),v=u()(c,2),x=v[0],g=v[1],_=(0,d.useState)(!1),j=u()(_,2),w=j[0],y=j[1],k=(0,d.useState)(!1),b=u()(k,2),S=b[0],Z=b[1],P=(0,d.useState)(!1),E=u()(P,2),T=E[0],R=E[1],O=(0,d.useState)(!0),z=u()(O,2),I=z[0],L=z[1],A=(0,d.useState)(!1),D=u()(A,2),B=D[0],M=D[1],V=(0,d.useState)({}),H=u()(V,2),oe=H[0],fe=H[1],he=U.Z.useForm(),me=u()(he,1)[0],ve=(0,d.useState)(!1),xe=u()(ve,2),ge=xe[0],_e=xe[1],je=(0,d.useState)(!0),we=u()(je,2),ye=we[0],ke=we[1],be=(0,d.useState)({index:"",name:"",add:!1}),Se=u()(be,2),Ce=Se[0],Ze=Se[1],Ne=(0,d.useState)({}),Pe=u()(Ne,2),Fe=Pe[0],Ee=Pe[1],Te=(0,d.useRef)(null),Re=(0,d.useState)(!1),Oe=u()(Re,2),ze=Oe[0],Ie=Oe[1],Le=(0,d.useState)(!1),Ae=u()(Le,2),De=Ae[0],Be=Ae[1],Me=(0,d.useState)([]),Ve=u()(Me,2),He=Ve[0],Ue=Ve[1],We=(0,d.useState)([]),Ke=u()(We,2),qe=Ke[0],Xe=Ke[1],$e=(0,d.useState)([]),Je=u()($e,2),Ye=Je[0],Ge=Je[1],Qe=(0,d.useState)(""),en=u()(Qe,2),nn=en[0],tn=en[1],rn=(0,d.useState)(!0),an=u()(rn,2),on=an[0],ln=an[1],sn=(0,d.useState)(),cn=u()(sn,2),un=cn[0],dn=cn[1],pn=(0,d.useState)([]),fn=u()(pn,2),hn=fn[0],mn=fn[1],vn=(0,d.useState)(!1),xn=u()(vn,2),gn=xn[0],_n=xn[1],jn=(0,d.useState)(!1),wn=u()(jn,2),yn=wn[0],kn=wn[1],bn=(0,d.useRef)(),Sn=(0,d.useRef)(),Cn=(0,d.useState)(!1),Zn=u()(Cn,2),Nn=Zn[0],Pn=Zn[1],Fn=(0,d.useState)({left:0,top:0,bottom:0,right:0}),En=u()(Fn,2),Tn=En[0],Rn=En[1],On=(0,d.useRef)(null),zn=i.virtualSpacesDetails,In=(null==zn?void 0:zn.is_member)||(0,F.Ny)(),Ln=(0,d.useState)(!1),An=u()(Ln,2),Dn=An[0],Bn=An[1],Mn=(0,d.useState)(600),Vn=u()(Mn,2),Hn=(Vn[0],Vn[1]);(0,d.useEffect)((function(){Ee({}),Kn()}),[a,I]),(0,d.useEffect)((function(){Un(),W.ZP.config({getContainer:function(){return Te.current},top:100})}),[]);var Un=function(){if(!Sn.current){var e=ne.bx.make,n=new ne.S0("myDiagramDiv",{"commandHandler.copiesTree":!1,"commandHandler.copiesParentKey":!1,"commandHandler.deletesTree":!1,"draggingTool.dragsTree":!1,"undoManager.isEnabled":!1,doubleClick:!1});Sn.current=n;var t=ne.bx.make(ne.FF);t.angle=0,t.arrangement=ne.FF.ArrangementFixedRoots,n.layout=t,n.nodeTemplate=e(ne.NB,"Vertical",{selectionObjectName:"TEXT"},e(ne.al,{name:"TEXT",minSize:new ne.$u(30,15)},new ne.KX("text","text").makeTwoWay(),new ne.KX("scale","scale").makeTwoWay(),new ne.KX("font","font").makeTwoWay()),e(ne.bn,"LineH",{stretch:ne.bx.Horizontal,strokeWidth:3,height:3,portId:"",fromSpot:ne.z6.LeftRightSides,toSpot:ne.z6.LeftRightSides},new ne.KX("stroke","brush"),new ne.KX("fromSpot","dir",(function(e){return Jn(e,!0)})),new ne.KX("toSpot","dir",(function(e){return Jn(e,!1)}))),new ne.KX("location","loc",ne.E9.parse).makeTwoWay(ne.E9.stringify),new ne.KX("locationSpot","dir",(function(e){return Jn(e,!1)})),{click:function(e,n){if(In)fe(null==n?void 0:n.data),Rn({left:0,top:0,bottom:0,right:0});else{var t,i;if(null==n||null===(t=n.data)||void 0===t||!t.url)return;window.open(null==n||null===(i=n.data)||void 0===i?void 0:i.url)}}}),n.allowDoubleClick=!1,n.allowSelect="single",n.commandHandler.canDeleteSelection=!1,n.commandHandler.canUndo=!1,n.toolManager.clickSelectingTool.canStartMulti=!1,n.linkTemplate=e(ne.rU,{curve:ne.rU.Bezier,fromShortLength:-2,toShortLength:-2,selectable:!1},e(ne.bn,{strokeWidth:3},new ne.KX("stroke","toNode",(function(e){return e.data.brush?e.data.brush:"black"})).ofObject()))}};function Wn(e){Sn.current.model=ne.Hn.fromJson(JSON.stringify({class:"go.TreeModel",nodeDataArray:e.map((function(e){return e.brush=de[e.unit_type],e}))}))}function Kn(){return qn.apply(this,arguments)}function qn(){return(qn=s()(r()().mark((function e(){var n,t,i,l,s,c;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=I?"/api/knowledge_graphs/tree.json":"/api/knowledge_graphs/map.json",e.next=3,(0,C.ZP)(n,{method:"get",params:{type:2,identifier:a.virtual_spacesId}});case 3:0===(t=e.sent).status&&(s=null==t||null===(i=t.nodeData)||void 0===i?void 0:i.map((function(e,n){return o()(o()({},e),{},{bgcolor:de[e.unit_type],parent:e.parent_id})})),Ee(o()(o()({},t),{},{nodeData:s})),I?(Wn(s),setTimeout((function(){Yn()}),300)):Yn(),(null==(c=null==t||null===(l=t.nodeData)||void 0===l?void 0:l.filter((function(e){return e.id===oe.id})))?void 0:c.length)>0&&fe(o()({},null==c?void 0:c[0])));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Xn={onRemove:function(){Ue([])},beforeUpload:function(e){if(console.log(e),(null==e?void 0:e.size)>52428800)return W.ZP.info("文件超过50M不符合上传要求"),!1;var n=[];return n.push(e),Ue([].concat(n)),!1},fileList:He,accept:".xls,.xlsx"},$n=(0,d.useMemo)((function(){return function e(n){return n.map((function(n){var t=n.title,i=t.indexOf(nn),r=t.substring(0,i),a=t.slice(i+nn.length),o=i>-1?(0,ce.jsxs)("span",{children:[r,(0,ce.jsx)("span",{style:{color:"#f50"},children:nn}),a]}):(0,ce.jsx)("span",{children:t});return n.children?{title:o,key:n.key,children:e(n.children)}:{title:o,key:n.key}}))}(qe)}),[nn,qe]);function Jn(e,n){return"left"===e?n?ne.z6.Left:ne.z6.Right:n?ne.z6.Right:ne.z6.Left}function Yn(){var e,n,t,i;Hn(600),null===(e=Sn.current)||void 0===e||null===(n=e.zoomToFit)||void 0===n||n.call(e),null===(t=bn.current)||void 0===t||null===(i=t.zoomToFit)||void 0===i||i.call(t)}return(0,ce.jsxs)("div",{ref:Te,style:{paddingBottom:20,background:"#FFF",position:"relative",height:"100vh"},children:[(0,ce.jsxs)(m.Z,{spinning:B,children:[(null==Fe?void 0:Fe.is_root)&&(0,ce.jsx)(re.Z,{ButtonClick:s()(r()().mark((function e(){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return M(!0),e.next=3,(0,C.ZP)("/api/knowledge_graphs/set_root.json",{method:"post",body:{type:2,identifier:a.virtual_spacesId}});case 3:n=e.sent,M(!1),0===n.status&&Kn();case 6:case"end":return e.stop()}}),e)}))),buttonProps:{type:"primary"},ButtonText:In&&"新增节点",ButtonTwo:In&&(0,ce.jsx)(K.ZP,{style:{marginLeft:20},onClick:function(){Be(!0)},type:"primary",children:"文件导入"}),styles:{margin:"auto",paddingTop:100}}),!(null!=Fe&&Fe.is_root)&&(0,ce.jsxs)("div",{style:{height:60,border:"1px solid #e7e7e7",display:"flex"},children:[(0,ce.jsxs)("div",{onClick:function(){L(!0),fe({})},className:I?ie.headeractivite:ie.header,children:[(0,ce.jsxs)("div",{children:[" ",(0,ce.jsx)("i",{className:"iconfont icon-zhishishu"})]}),(0,ce.jsx)("div",{children:"知识树"})]}),(0,ce.jsxs)("div",{onClick:function(){L(!1),fe({})},className:I?ie.header:ie.headeractivite,children:[(0,ce.jsxs)("div",{children:[" ",(0,ce.jsx)("i",{className:"iconfont icon-guanxitu"})]}),(0,ce.jsx)("div",{children:"关系图"})]}),(0,ce.jsxs)("div",{onClick:function(){var e,n,t,i,r=I?Sn.current.viewportBounds.width:bn.current.viewportBounds.width,a=I?Sn.current.viewportBounds.height:bn.current.viewportBounds.height;null===(e=Sn.current)||void 0===e||null===(n=e.zoomToRect)||void 0===n||n.call(e,new ne.UL(1,1,r/1.1,a/1.1)),null===(t=bn.current)||void 0===t||null===(i=t.zoomToRect)||void 0===i||i.call(t,new ne.UL(1,1,r/1.1,a/1.1))},className:ie.header,children:[(0,ce.jsxs)("div",{children:[" ",(0,ce.jsx)("i",{className:"iconfont icon-fangda3"})]}),(0,ce.jsx)("div",{children:"放大"})]}),(0,ce.jsxs)("div",{onClick:function(){var e,n,t,i,r=I?Sn.current.viewportBounds.width:bn.current.viewportBounds.width,a=I?Sn.current.viewportBounds.height:bn.current.viewportBounds.height;null===(e=Sn.current)||void 0===e||null===(n=e.zoomToRect)||void 0===n||n.call(e,new ne.UL(1,1,1.1*r,1.1*a)),null===(t=bn.current)||void 0===t||null===(i=t.zoomToRect)||void 0===i||i.call(t,new ne.UL(1,1,1.1*r,1.1*a))},className:ie.header,children:[(0,ce.jsxs)("div",{children:[" ",(0,ce.jsx)("i",{className:"iconfont icon-suoxiao3"})]}),(0,ce.jsx)("div",{children:"缩小"})]}),(0,ce.jsxs)("div",{onClick:function(){var e,n,t,i;Hn(600),null===(e=Sn.current)||void 0===e||null===(n=e.zoomToFit)||void 0===n||n.call(e),null===(t=bn.current)||void 0===t||null===(i=t.zoomToFit)||void 0===i||i.call(t)},className:ie.header,children:[(0,ce.jsxs)("div",{children:[" ",(0,ce.jsx)("i",{className:"iconfont icon-zishiying"})]}),(0,ce.jsx)("div",{children:"最佳适应"})]}),(0,ce.jsxs)("div",{onClick:s()(r()().mark((function e(){var n,t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return kn(!0),e.next=3,(0,C.ZP)("/api/knowledge_graphs.json",{method:"get",params:{type:2,identifier:a.virtual_spacesId}});case 3:0===(n=e.sent).status&&(mn(null==n?void 0:n.list),Xe(null==n?void 0:n.knowledge_graphs),Ge(null==n||null===(t=n.list)||void 0===t?void 0:t.map((function(e){return e.key}))));case 5:case"end":return e.stop()}}),e)}))),className:ie.header,children:[(0,ce.jsxs)("div",{children:[" ",(0,ce.jsx)("i",{className:"iconfont icon-chazhao"})]}),(0,ce.jsx)("div",{children:"查找"})]}),In&&(0,ce.jsxs)("div",{onClick:function(){Be(!0)},className:ie.header,children:[(0,ce.jsxs)("div",{children:[" ",(0,ce.jsx)("i",{className:"iconfont icon-daoru"})]}),(0,ce.jsx)("div",{children:"导入"})]}),(0,ce.jsxs)("div",{style:{flex:1,textAlign:"end",lineHeight:"60px"},children:[In&&(0,ce.jsx)(q.Z,{title:"清空所有数据",getPopupContainer:function(){return Te.current},children:(0,ce.jsx)("i",{onClick:function(){var e;f.Z.confirm({title:"提示",icon:null,centered:!0,getContainer:function(){return Te.current},content:"请确定是否将知识图谱所有的数据清空,恢复空状态,清空后数据不可恢复!本次清空不会影响到课程章节内容,仅作用于知识图谱的数据。",onOk:(e=s()(r()().mark((function e(){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,C.ZP)("/api/knowledge_graphs/delete_all.json",{method:"DELETE",body:{type:2,identifier:a.virtual_spacesId}});case 2:0===e.sent.status&&(Kn(),fe({}));case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},className:"iconfont icon-shanchu14 ".concat(ie.dhover)})}),In&&(0,ce.jsx)(X.Z,{getPopupContainer:function(){return Te.current},menu:{items:[{key:"1",style:{width:100},label:(0,ce.jsx)("a",{href:"".concat(ae.Z.API_SERVER,"/api/knowledge_graphs/export.xlsx?identifier=").concat(a.virtual_spacesId,"&type=2"),children:"导出Excel"})},{key:"2",label:(0,ce.jsx)("a",{href:"".concat(ae.Z.API_SERVER,"/api/knowledge_graphs/export.json?identifier=").concat(a.virtual_spacesId,"&type=2"),children:"导出Word"})}]},children:(0,ce.jsx)("i",{style:{marginLeft:30},className:"iconfont icon-xiazai6 ".concat(ie.ehover)})}),(0,ce.jsx)("i",{onClick:function(){(0,te.vp)()?(Ie(!1),(0,te.BU)()):(Ie(!0),(0,te.Dj)(Te.current)),Yn()},style:{marginLeft:30,marginRight:20},className:"iconfont ".concat(ze?"icon-tuichuquanping3":"icon-quanping4"," ").concat(ie.ehover)})]})]}),(0,ce.jsxs)("div",{className:"relative",children:[!I&&(0,ce.jsx)(ee.FI,{ref:l,divClassName:"diagram-component",style:{backgroundColor:"#fff",height:ze?"calc(100vh - 100px)":540,visibility:null!=Fe&&Fe.is_root?"hidden":"visible"},initDiagram:function(){var e=ne.bx.make,n=e(ne.S0,{allowSelect:!1,"undoManager.isEnabled":!0,initialAutoScale:ne.S0.Uniform,contentAlignment:ne.z6.Center,layout:e(ue,{defaultSpringLength:30,defaultElectricalCharge:100}),SelectionMoved:function(e){return e.diagram.layout.invalidateLayout()},model:e(ne.FJ,{linkKeyProperty:"key",makeUniqueKeyFunction:function(e,n){for(var t=n.key||1;e.findNodeDataForKey(t);)t++;return n.key=t,t},makeUniqueLinkKeyFunction:function(e,n){for(var t=n.key||-1;e.findLinkDataForKey(t);)t--;return n.key=t,t}})});return n.toolManager.draggingTool.doMouseMove=function(){ne.h1.prototype.doMouseMove.call(this),this.isActive&&this.diagram.layout.doLayout(!0)},n.nodeTemplate=e(ne.NB,"Auto",{minSize:new ne.$u(100,100)},e(ne.bn,"Circle",{stroke:"white",spot1:new ne.z6(0,0,5,5),spot2:new ne.z6(1,1,-5,-5)},new ne.KX("fill","bgcolor")),e(ne.al,{font:"bold 10pt helvetica, bold arial, sans-serif",stroke:"white",textAlign:"center",maxSize:new ne.$u(100,NaN)},new ne.KX("text","text")),{click:function(e,n){if(In)fe(null==n?void 0:n.data),Rn({left:0,top:0,bottom:0,right:0});else{var t,i;if(null==n||null===(t=n.data)||void 0===t||!t.url)return;window.open(null==n||null===(i=n.data)||void 0===i?void 0:i.url)}}}),n.linkTemplate=e(ne.rU,{layerName:"Background"},e(ne.bn,{stroke:"black"}),e(ne.bn,{toArrow:"standard",stroke:null}),e(ne.s_,"Auto",e(ne.bn,{fill:e(ne.BD,"Radial",{0:"rgb(240, 240, 240)",.3:"rgb(240, 240, 240)",1:"rgba(240, 240, 240, 0)"}),stroke:null}),e(ne.al,{textAlign:"center",font:"10pt helvetica, arial, sans-serif",stroke:"#555555",margin:4},new ne.KX("text","text")))),n.doubleClick=!1,n.allowDoubleClick=!1,n.allowSelect="single",n.commandHandler.canDeleteSelection=!1,n.commandHandler.canUndo=!1,n.allowInsert=!1,n.toolManager.clickSelectingTool.canStartMulti=!1,bn.current=n,n},nodeDataArray:null==Fe?void 0:Fe.nodeData,linkDataArray:null==Fe?void 0:Fe.linkData}),(0,ce.jsx)("div",{id:"myDiagramDiv",style:{height:ze?"calc(100vh - 100px)":540,width:"100%",visibility:null!=Fe&&Fe.is_root?"hidden":I?"visible":"hidden",position:I?"relative":"absolute"}})]}),(0,ce.jsx)("div",{children:!(null!=Fe&&Fe.is_root)&&pe.map((function(e,n){return(0,ce.jsxs)("span",{style:{marginLeft:0===n&&20,marginRight:30},children:[(0,ce.jsx)("span",{style:{marginRight:6,width:16,height:8,background:de[n],display:"inline-flex",borderRadius:4}}),(0,ce.jsx)("span",{style:{color:"#9096A3"},children:e})]})}))})]}),(0,ce.jsx)("div",{style:{zIndex:1e3},children:(0,ce.jsx)(le(),{disabled:Nn,bounds:Tn,onStart:function(e,n){return function(e,n){var t,i=window.document.documentElement,r=i.clientWidth,a=i.clientHeight,o=null===(t=On.current)||void 0===t?void 0:t.getBoundingClientRect();Rn({left:-o.left+n.x,right:r-(o.right-n.x),top:-o.top+n.y,bottom:a-(o.bottom-n.y)-70})}(0,n)},children:(0,ce.jsx)("div",{ref:On,style:{position:"fixed",cursor:"move",right:0,top:ze?60:260,zIndex:12},children:(0,ce.jsx)("div",{onMouseOver:function(){Nn&&Pn(!ye)},onMouseOut:function(){Pn(!0)},children:oe.id&&(0,ce.jsx)("div",{className:ie.rightmodal,children:(0,ce.jsxs)(m.Z,{spinning:B,children:[(0,ce.jsxs)("div",{style:{display:"flex"},children:[(0,ce.jsxs)("div",{className:ie.title,children:[oe.text," ",(0,ce.jsx)("i",{onClick:function(){g(!0),me.setFieldsValue({name:oe.text})},className:"iconfont icon-bianji3",style:{marginLeft:14,color:"#666666",cursor:"pointer"}})]}),(0,ce.jsx)("div",{children:(0,ce.jsx)("i",{style:{cursor:"pointer"},onClick:function(){var e,n;fe({}),null===(e=Sn.current)||void 0===e||e.clearSelection(),null===(n=bn.current)||void 0===n||n.clearSelection()},className:"iconfont icon-danchuangguanbi"})})]}),(0,ce.jsxs)("div",{style:{marginTop:25},children:[(0,ce.jsxs)("span",{className:ie.button,onClick:function(){oe.unit_type>=4||0===oe.unit_type?0===oe.unit_type?W.ZP.info("根节点暂不支持插入知识点"):W.ZP.info("知识点为最小单位暂不支持插入知识点"):(me.setFieldsValue({name:""}),Z(!0))},children:[(0,ce.jsx)("i",{style:{marginRight:8},className:"iconfont icon-charuzhishidian1"})," 插入知识点"]}),(0,ce.jsxs)("span",{className:ie.button,onClick:function(){oe.unit_type>=4?W.ZP.info("知识点为最小单位暂不支持插入知识单元"):(me.setFieldsValue({name:"",unit_type:3,url:""}),R(!0))},children:[(0,ce.jsx)("i",{style:{marginRight:8},className:"iconfont icon-charuzhishidanyuan"})," 插入知识单元"]}),(0,ce.jsxs)("span",{className:ie.button,onClick:function(){var e;f.Z.confirm({icon:null,title:"提示",centered:!0,getContainer:function(){return Te.current},content:"删除该节点会导致它的子节点一并删除,删除节点不会影响到课程章节内容,删除后,数据不可恢复请确认是否删除",onOk:(e=s()(r()().mark((function e(){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return M(!0),e.next=3,(0,C.ZP)("/api/knowledge_graphs/".concat(oe.id,".json"),{method:"DELETE"});case 3:n=e.sent,M(!1),0===(null==n?void 0:n.status)&&(fe({}),Kn());case 6:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},children:[(0,ce.jsx)("i",{style:{marginRight:8},className:"iconfont icon-shanchujiedian"})," 删除节点"]}),(0,ce.jsxs)("span",{className:ie.button,onClick:s()(r()().mark((function e(){var n,t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return _e(!0),e.next=3,(0,C.ZP)("/api/knowledge_graphs.json",{method:"get",params:{type:2,identifier:a.virtual_spacesId}});case 3:0===(n=e.sent).status&&(mn(null==n?void 0:n.list),Xe(null==n?void 0:n.knowledge_graphs),Ge(null==n||null===(t=n.list)||void 0===t?void 0:t.map((function(e){return e.key}))));case 5:case"end":return e.stop()}}),e)}))),children:[(0,ce.jsx)("i",{style:{marginRight:8},className:"iconfont icon-guanxi"})," 关系"]})]}),(0,ce.jsxs)("div",{style:{marginTop:20},children:[(0,ce.jsxs)("div",{className:ie.linetitles,children:[(0,ce.jsx)("span",{className:ie.line}),"属性"]}),4!=oe.unit_type&&oe.unit_type>0&&(0,ce.jsxs)("div",{style:{paddingLeft:8},children:[(0,ce.jsx)("label",{className:ie.lebels,children:"类型"}),(0,ce.jsxs)($.default,{size:"large",getPopupContainer:function(){return Te.current},style:{width:"100%",marginTop:6},value:oe.unit_type,onChange:function(){var e=s()(r()().mark((function e(n){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return oe.unit_type=n,fe(o()({},oe)),M(!0),e.next=5,(0,C.ZP)("/api/knowledge_graphs/".concat(oe.id,".json"),{method:"put",body:{type:2,unit_type:n}});case 5:t=e.sent,M(!1),0===t.status&&(g(!1),Kn());case 8:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),placeholder:"请选择类型",children:[(0,ce.jsx)($.default.Option,{value:1,children:"课件"}),(0,ce.jsx)($.default.Option,{value:3,children:"文本"}),(0,ce.jsx)($.default.Option,{value:2,children:"实训"})]})]}),(0,ce.jsxs)("div",{style:{paddingLeft:8,marginTop:15},children:[(0,ce.jsx)("label",{className:ie.lebels,style:{display:"flex"},children:"跳转地址"}),(0,ce.jsx)(J.Z,{size:"large",value:oe.url,onChange:function(e){oe.url=e.target.value,fe(o()({},oe))},disabled:ye,onBlur:function(){var e=s()(r()().mark((function e(n){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Pn(!1),!n.target.value){e.next=6;break}if(new RegExp(/^(https?:\/\/)?([\w.-]+)\.([a-z]{2,})(\/\S*)?$/,"i").test(n.target.value)){e.next=6;break}return W.ZP.info("请输入正确的跳转地址"),e.abrupt("return");case 6:return M(!0),e.next=9,(0,C.ZP)("/api/knowledge_graphs/".concat(oe.id,".json"),{method:"put",body:{type:2,url:n.target.value}});case 9:t=e.sent,M(!1),ke(!0),0===t.status&&(g(!1),Kn());case 13:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),style:{width:"81%",marginTop:6}}),(0,ce.jsx)("i",{onClick:function(){ke(!1)},className:"iconfont icon-bianji3",style:{marginLeft:12,marginRight:20,color:"#666666",cursor:"pointer"}}),(0,ce.jsx)("span",{className:ie.button,style:{marginRight:0},onClick:function(){oe.url?window.open(oe.url):W.ZP.info("链接不能为空")},children:"跳转"})]})]}),(0,ce.jsxs)("div",{style:{marginTop:20},children:[(0,ce.jsxs)("div",{className:ie.linetitles,children:[(0,ce.jsx)("span",{className:ie.line}),"关系"]}),null==oe||null===(n=oe.relations)||void 0===n?void 0:n.map((function(e,n){return(0,ce.jsxs)("div",{style:{display:"flex",paddingLeft:8},children:[(0,ce.jsxs)("div",{className:ie.multi_ellipsis1,children:["与节点“",(0,ce.jsx)("span",{style:{fontWeight:600,color:"#000000"},children:e.name}),"”为",e.relation,"关系"]}),(0,ce.jsx)("div",{style:{width:"10%",textAlign:"end"},children:(0,ce.jsx)("i",{onClick:function(){var t;f.Z.confirm({icon:null,title:"提示",getContainer:function(){return Te.current},centered:!0,content:"请确认是否将节点之间的关系解绑",onOk:(t=s()(r()().mark((function t(){var i,a;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return M(!0),t.next=3,(0,C.ZP)("/api/knowledge_graphs/".concat(null==oe?void 0:oe.id,"/delete_relation.json"),{method:"POST",body:{relation_id:e.relation_id}});case 3:i=t.sent,M(!1),0===i.status&&(null===(a=oe.relations)||void 0===a||a.splice(n,1),fe(o()({},oe)),Kn());case 6:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})})},className:"".concat(ie.dhover," iconfont icon-shanchu10")})})]})}))]}),(0,ce.jsxs)("div",{style:{marginTop:20},children:[(0,ce.jsxs)("div",{className:ie.linetitles,children:[(0,ce.jsx)("span",{className:ie.line}),"描述",(0,ce.jsx)("div",{style:{flex:1,textAlign:"end"},children:(0,ce.jsxs)("span",{onClick:function(){Ze({add:!0,name:""}),me.setFieldsValue({describe:""})},className:ie.additem,children:[(0,ce.jsx)("i",{style:{fontSize:12},className:"iconfont icon-tianjiashitixiaojiahao"})," 添加"]})})]}),(0,ce.jsx)("div",{style:{height:200,overflow:"auto"},children:null===(t=oe.descriptions)||void 0===t?void 0:t.map((function(e,n){return(0,ce.jsxs)("div",{className:ie.describe,children:[(0,ce.jsxs)("div",{className:ie.describetitle,children:[(0,ce.jsxs)("div",{style:{fontSize:14,color:"#000000",fontWeight:500},children:["描述",n+1]}),(0,ce.jsxs)("div",{children:[(0,ce.jsx)("i",{onClick:function(){Ze({index:n,name:e}),me.setFieldsValue({describe:e})},style:{marginRight:10},className:"iconfont icon-bianji-moren ".concat(ie.ehover)}),(0,ce.jsx)("i",{onClick:function(){var e;f.Z.confirm({icon:null,title:"提示",getContainer:function(){return Te.current},centered:!0,content:"删除描述后,数据不可恢复,请确认是否删除",onOk:(e=s()(r()().mark((function e(){var t,i;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return null===(t=oe.descriptions)||void 0===t||t.splice(n,1),fe(o()({},oe)),M(!0),e.next=5,(0,C.ZP)("/api/knowledge_graphs/".concat(oe.id,".json"),{method:"put",body:{type:2,descriptions:oe.descriptions}});case 5:i=e.sent,M(!1),0===i.status&&(g(!1),Kn());case 8:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},className:"iconfont icon-shanchutimu ".concat(ie.dhover)})]})]}),(0,ce.jsx)(N.Z,{value:e||""})]})}))})]})]})})})})})}),(0,ce.jsx)(f.Z,{open:x,centered:!0,title:"编辑",getContainer:function(){return Te.current},onCancel:function(){return g(!1)},okButtonProps:{loading:w},onOk:function(){me.submit()},children:(0,ce.jsx)(U.Z,{size:"large",form:me,onFinish:function(){var e=s()(r()().mark((function e(n){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return y(!0),e.next=3,(0,C.ZP)("/api/knowledge_graphs/".concat(oe.id,".json"),{method:"put",body:{type:2,name:n.name}});case 3:t=e.sent,y(!1),0===t.status&&(I&&(oe.text=n.name,fe(oe)),g(!1),W.ZP.info("修改成功"),Kn());case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:(0,ce.jsx)(U.Z.Item,{name:"name",label:"名称",rules:[{required:!0,validator:function(e,n){var t;return(null==n||null===(t=n.replaceAll(" ",""))||void 0===t?void 0:t.length)>0?Promise.resolve():Promise.reject("请输入名称")}}],children:(0,ce.jsx)(J.Z,{maxLength:30})})})}),(0,ce.jsx)(f.Z,{open:S,centered:!0,title:"插入知识点",getContainer:function(){return Te.current},onCancel:function(){return Z(!1)},okButtonProps:{loading:w},onOk:function(){me.submit()},children:(0,ce.jsx)(U.Z,{size:"large",form:me,onFinish:function(){var e=s()(r()().mark((function e(n){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return y(!0),e.next=3,(0,C.ZP)("/api/knowledge_graphs.json",{method:"post",body:o()(o()({},n),{},{unit_type:4,type:2,identifier:a.virtual_spacesId,parent_id:oe.id})});case 3:t=e.sent,y(!1),0===t.status&&(Z(!1),Kn(),W.ZP.info("插入知识点成功"));case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:(0,ce.jsx)(U.Z.Item,{name:"name",label:"知识点名称",rules:[{required:!0,validator:function(e,n){var t;return(null==n||null===(t=n.replaceAll(" ",""))||void 0===t?void 0:t.length)>0?Promise.resolve():Promise.reject("请输入知识点名称")}}],children:(0,ce.jsx)(J.Z,{maxLength:20})})})}),(0,ce.jsx)(f.Z,{open:T,centered:!0,width:550,title:"插入知识单元",getContainer:function(){return Te.current},onCancel:function(){return R(!1)},okButtonProps:{loading:w},onOk:function(){me.submit()},children:(0,ce.jsxs)(U.Z,{size:"large",form:me,labelCol:{span:5},onFinish:function(){var e=s()(r()().mark((function e(n){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,C.ZP)("/api/knowledge_graphs.json",{method:"post",body:o()(o()({},n),{},{type:2,identifier:a.virtual_spacesId,parent_id:oe.id})});case 2:t=e.sent,y(!1),0===t.status&&(R(!1),Kn(),W.ZP.info("插入知识单元成功"));case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,ce.jsx)(U.Z.Item,{name:"name",label:"知识单元名称",rules:[{required:!0,validator:function(e,n){var t;return(null==n||null===(t=n.replaceAll(" ",""))||void 0===t?void 0:t.length)>0?Promise.resolve():Promise.reject("请输入知识单元名称")}}],children:(0,ce.jsx)(J.Z,{placeholder:"请输入知识单元名称",maxLength:20})}),(0,ce.jsx)(U.Z.Item,{name:"unit_type",label:"类型",children:(0,ce.jsxs)($.default,{getPopupContainer:function(){return Te.current},placeholder:"请选择类型",children:[(0,ce.jsx)($.default.Option,{value:1,children:"课件"}),(0,ce.jsx)($.default.Option,{value:3,children:"文本"}),(0,ce.jsx)($.default.Option,{value:2,children:"实训"})]})}),(0,ce.jsx)(U.Z.Item,{name:"url",label:"跳转地址",rules:[{pattern:new RegExp(/^(https?:\/\/)?([\w.-]+)\.([a-z]{2,})(\/\S*)?$/,"i"),message:"请输入正确的地址"}],children:(0,ce.jsx)(J.Z,{placeholder:"请输入点击该节点跳转的链接地址"})})]})}),ge&&(0,ce.jsxs)(f.Z,{open:ge,centered:!0,width:550,title:"添加关系",getContainer:function(){return Te.current},onCancel:function(){dn(""),_e(!1)},okButtonProps:{loading:w},onOk:function(){un?(_e(!1),_n(!0),me.setFieldsValue({relation:1}),tn("")):W.ZP.info("请先选择节点")},children:[(0,ce.jsx)(J.Z.Search,{size:"large",onChange:function(e){var n=e.target.value,t=hn.filter((function(e){return e.title.indexOf(n)>-1})).map((function(e){return e.key}));Ge(t),ln(!0),tn(e.target.value)}}),(0,ce.jsx)(Y.Z,{onExpand:function(e){Ge(e),ln(!1)},style:{maxHeight:300,height:300,marginTop:20,overflow:"auto"},onSelect:function(e){console.log("---",e),dn(null==e?void 0:e[0])},expandedKeys:Ye,defaultExpandAll:!0,autoExpandParent:on,treeData:$n})]}),(Ce.name||Ce.add)&&(0,ce.jsx)(f.Z,{open:Ce.name||Ce.add,title:"描述",width:900,getContainer:function(){return Te.current},centered:!0,onCancel:function(){Ze("")},okButtonProps:{loading:w},onOk:function(){me.submit()},children:(0,ce.jsx)(U.Z,{form:me,onFinish:function(){var e=s()(r()().mark((function e(n){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return y(!0),Ce.add?(oe.descriptions.push(n.describe),fe(o()({},oe))):(oe.descriptions[Ce.index]=n.describe,fe(o()({},oe))),e.next=4,(0,C.ZP)("/api/knowledge_graphs/".concat(oe.id,".json"),{method:"put",body:{type:2,descriptions:oe.descriptions}});case 4:t=e.sent,y(!1),Ze(""),0===t.status&&(g(!1),Kn());case 8:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:(0,ce.jsx)(U.Z.Item,{name:"describe",style:{marginBottom:-10},rules:[{required:!0,validator:function(e,n){var t;return(null==n||null===(t=n.replaceAll(" ",""))||void 0===t?void 0:t.length)>0?Promise.resolve():Promise.reject("请输入描述内容")}}],children:(0,ce.jsx)(se.Z,{placeholder:"请在此输入内容最大限制为65000个字符",defaultValue:Ce.name,onChange:function(e){}})})})}),(0,ce.jsxs)(f.Z,{title:"文件导入",open:De,centered:!0,okButtonProps:{loading:w},onCancel:function(){Be(!1),Ue([])},onOk:s()(r()().mark((function e(){var n,t,i;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=new FormData,!(He.length>0)){e.next=5;break}n.append("file",He[0]),e.next=7;break;case 5:return W.ZP.warning("请选择文件"),e.abrupt("return");case 7:return y(!0),n.append("ec_year_id",a.ec_year_id),n.append("identifier",a.virtual_spacesId),n.append("type","2"),e.next=13,(0,C.ZP)("/api/knowledge_graphs/import.json",{method:"post",body:n},!0);case 13:t=e.sent,y(!1),0===(null==t?void 0:t.status)&&((null==t||null===(i=t.fail)||void 0===i?void 0:i.length)>0&&f.Z.confirm({icon:null,title:"导入失败",content:(0,ce.jsxs)("span",{children:["检测到本次导入存在不符合要求的数据,点击下载",(0,ce.jsx)("a",{href:"".concat(ae.Z.API_SERVER).concat(null==t?void 0:t.url),download:"失败数据.xlsx",children:"导入失败的数据"}),"查看"]})}),Ue([]),(null==t?void 0:t.success)>0&&W.ZP.info("添加成功"),Kn(),Be(!1));case 16:case"end":return e.stop()}}),e)}))),children:[!(null!=Fe&&Fe.is_root)&&(0,ce.jsx)("div",{style:{marginBottom:30,color:"#333333"},children:"检测当前已存数据,导入后原数据将会被删除,按照最新导入的 为主,如继续导入,请按照下方步骤进行"}),(0,ce.jsxs)("p",{style:{color:"#5F6368"},children:["步骤1",(0,ce.jsx)("span",{style:{color:"#000000"},children:"下载"}),(0,ce.jsx)("a",{href:"".concat(ae.Z.API_SERVER,"/api/knowledge_graphs/down_template.json"),download:"模版.xlsx",children:"知识图谱导入模版"})]}),(0,ce.jsx)(h.Z,{children:(0,ce.jsxs)(G.Z,{style:{color:"#5F6368"},children:["步骤2",(0,ce.jsx)("span",{style:{color:"#000000"},children:"上传填写好的《知识图谱导入模版》"})]})}),(0,ce.jsx)(h.Z,{style:{marginTop:10,marginLeft:50},children:(0,ce.jsx)(Q.Z,o()(o()({},Xn),{},{children:(0,ce.jsxs)("span",{style:{padding:"0px 16px",color:"#3061D0",cursor:"pointer",height:32,alignItems:"center",display:"inline-flex",borderRadius:2,border:"1px solid #BACFFE",background:"#F6F7F9 linear-gradient(180deg, #FFFFFF 0%, #F6F7F9 100%)",boxShadow:"0px 2px 4px 0px #E0DFE1, inset 0px 1px 3px 0px rgba(255,255,255,0.5)"},children:[(0,ce.jsx)("i",{style:{fontSize:12,marginRight:6},className:"iconfont icon-tianjiashitixiaojiahao"})," 选择文件"]})}))})]}),(0,ce.jsx)(f.Z,{open:gn,title:"添加关系",width:500,getContainer:function(){return Te.current},centered:!0,onCancel:function(){_n(!1),me.setFieldsValue({relation:null})},okButtonProps:{loading:w},onOk:function(){me.submit()},children:(0,ce.jsx)(U.Z,{form:me,onFinish:function(){var e=s()(r()().mark((function e(n){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return y(!0),e.next=3,(0,C.ZP)("/api/knowledge_graphs/".concat(oe.id,"/relation.json"),{method:"post",body:o()({type:2,parent_id:un},n)});case 3:t=e.sent,y(!1),0===t.status&&(W.ZP.info("关联成功"),Kn(),dn(""),_n(!1),me.setFieldsValue({relation:null}));case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:(0,ce.jsx)(U.Z.Item,{name:"relation",label:"类型",children:(0,ce.jsxs)($.default,{getPopupContainer:function(){return Te.current},placeholder:"请选择类型",children:[(0,ce.jsx)($.default.Option,{value:1,children:"关联"}),(0,ce.jsx)($.default.Option,{value:2,children:"后序"})]})})})}),yn&&(0,ce.jsxs)(f.Z,{open:yn,centered:!0,width:550,title:"查找",getContainer:function(){return Te.current},onCancel:function(){dn(""),kn(!1)},okButtonProps:{loading:w},onOk:function(){var e,n,t,i,r,a,o,l;kn(!1),null===(e=Sn.current)||void 0===e||e.clearSelection(),null===(n=bn.current)||void 0===n||n.clearSelection();var s=null===(t=bn.current)||void 0===t||null===(i=t.findNodeForKey)||void 0===i?void 0:i.call(t,un),c=null===(r=Sn.current)||void 0===r||null===(a=r.findNodeForKey)||void 0===a?void 0:a.call(r,un);null===(o=Sn.current)||void 0===o||null===(o=o.commandHandler)||void 0===o||o.scrollToPart(c),null===(l=bn.current)||void 0===l||null===(l=l.commandHandler)||void 0===l||l.scrollToPart(s),s&&(s.isSelected=!0,In&&(Rn({left:0,top:0,bottom:0,right:0}),fe(s.data))),c&&(c.isSelected=!0,In&&(Rn({left:0,top:0,bottom:0,right:0}),fe(c.data))),dn(""),tn("")},children:[(0,ce.jsx)(J.Z.Search,{size:"large",allowClear:!0,onChange:function(e){var n=e.target.value,t=hn.filter((function(e){return e.title.indexOf(n)>-1})).map((function(e){return e.key}));Ge(t),t.length<=0?Bn(!0):Bn(!1),ln(!0),tn(e.target.value)}}),Dn?(0,ce.jsx)(re.Z,{}):(0,ce.jsx)(Y.Z,{onExpand:function(e){Ge(e),ln(!1)},style:{maxHeight:400,height:400,marginTop:20,overflow:"auto"},onSelect:function(e){dn(null==e?void 0:e[0])},expandedKeys:Ye,defaultExpandAll:!0,autoExpandParent:on,treeData:$n})]})]})})),he=(0,p.connect)((function(e){var n=e.virtualSpaces;return{globalSetting:e.globalSetting,virtualSpaces:n}}))((function(e){e.globalSetting,e.dispatch;var n,t=e.virtualSpaces,i=(0,p.useSearchParams)(),a=u()(i,1)[0],l=(0,d.useState)(!0),c=u()(l,2),T=c[0],R=c[1],O=(0,d.useState)(!1),z=u()(O,2),I=z[0],L=z[1],A=(0,d.useState)(!1),D=u()(A,2),B=D[0],M=D[1],V=(0,d.useState)({}),H=u()(V,2),U=H[0],W=H[1],K=(0,d.useState)(""),q=u()(K,2),X=q[0],$=q[1],J=(0,d.useState)(""),Y=u()(J,2),G=Y[0],Q=Y[1],ee=(0,d.useState)((null==a?void 0:a.get("active"))||"position_and_target"),ne=u()(ee,2),te=ne[0],ie=ne[1],re=t.virtualSpacesDetails,ae=(0,p.useParams)(),oe=(null==re?void 0:re.is_member)||(0,F.Ny)();(0,d.useEffect)((function(){le()}),[te]);var le=function(){var e=s()(r()().mark((function e(){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return R(!0),e.next=3,(0,C.ZP)("/api/virtual_classrooms/".concat(ae.virtual_spacesId,"/knowledge_systems/show.json"),{method:"get",params:{column:te}});case 3:-1!==(null==(n=e.sent)?void 0:n.status)&&(W(o()({},n)),$((null==n?void 0:n[te])||""),Q((null==n?void 0:n[te])||"")),R(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ue=function(){var e=s()(r()().mark((function e(){var n,t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return L(!0),(n={})[te]=X,e.next=5,(0,C.ZP)("/api/virtual_classrooms/".concat(ae.virtual_spacesId,"/knowledge_systems/edit.json"),{method:"put",body:n});case 5:-1!==(null==(t=e.sent)?void 0:t.status)&&(le(),M(!1)),L(!1);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,ce.jsxs)("section",{className:v,children:[(0,ce.jsx)(Z.YG,{value:te,onChange:function(e){e!==te&&(ie(e),M(!1))},tabBarExtraContent:oe&&(0,ce.jsxs)(ce.Fragment,{children:["position_and_target"===te&&(0,ce.jsxs)(Z.op,{onClick:function(){return M(!0)},children:[" ",(0,ce.jsx)("i",{className:"iconfont icon-bianji7 font14 mr5"}),"编辑"]}),"desc"===te&&(0,ce.jsxs)(h.Z,{align:"middle",children:[(0,ce.jsxs)(Z.op,{onClick:function(){return M(!0)},children:[" ",(0,ce.jsx)("i",{className:"iconfont icon-bianji7 font14 mr5"}),"编辑说明"]}),(0,ce.jsxs)(Z.op,{onClick:function(){p.history.push("/".concat(E.AS,"/").concat(ae.virtual_spacesId,"/knowledge/add"))},className:"ml20",children:[" ",(0,ce.jsx)("i",{className:"iconfont icon-tianjiashitixiaojiahao font14 mr5"}),"新增知识点模块"]})]}),"knowledge_graph"===te&&(0,ce.jsxs)(Z.op,{onClick:function(){return M(!0)},children:[" ",(0,ce.jsx)("i",{className:"iconfont icon-bianji7 font14 mr5"}),"编辑知识图谱"]})]}),dataSource:[{id:"position_and_target",name:"课程定位与目标"},{id:"desc",name:"课程知识点"},{id:"knowledge_graph",name:"知识图谱描述"},{id:"knowledge",name:"知识图谱"}]}),(0,ce.jsxs)(m.Z,{spinning:T,children:["desc"!==te&&(0,ce.jsx)("div",{className:"knowledge"!==te&&"mt20",children:B?(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)(se.Z,{defaultvalue:G,onChange:function(e){$(e)}}),(0,ce.jsx)(Z.QD,{confirmTitle:"保存",confirmLoading:I,confirmClick:ue,cancelClick:function(){M(!1),$(U[te]||"")},cancelTitle:"取消",className:"mb25 mt20"})]}):(0,ce.jsx)(N.Z,{value:X})}),"knowledge"===te&&(0,ce.jsx)(fe,{}),"desc"===te&&(0,ce.jsxs)("div",{className:x,children:[!!X&&(0,ce.jsxs)("div",{className:g,children:[(0,ce.jsx)("aside",{children:"说明"}),(0,ce.jsx)(N.Z,{value:X})]}),null==U||null===(n=U.subject_modules)||void 0===n?void 0:n.map((function(e){var n=e.members,t=n.module_content,i=n.module_name,a=n.subject_module_id;return(0,ce.jsxs)("div",{className:_,children:[(0,ce.jsxs)("div",{className:j,children:[(0,ce.jsx)("div",{className:w,children:i}),oe&&(0,ce.jsxs)("div",{className:y,children:[(0,ce.jsx)("div",{onClick:function(){return p.history.push("/".concat(E.AS,"/").concat(ae.virtual_spacesId,"/knowledge/").concat(a,"/edit"))},children:(0,ce.jsxs)("span",{className:"primary-hover",children:[(0,ce.jsx)("i",{className:"iconfont icon-bianji7 font14 mr5"}),"编辑"]})}),(0,ce.jsx)("div",{onClick:function(){return e=a,n=i,void f.Z.confirm({title:"提示",okText:"确定删除",okButtonProps:{danger:!0},icon:!1,className:P.Z.CustomTipsModalCss,cancelText:"取消",content:(0,ce.jsxs)("div",{children:[(0,ce.jsxs)("div",{children:["确认删除 ",n," 吗?"]}),(0,ce.jsx)("div",{className:"mt10",children:"删除后,将无法恢复,请谨慎操作"})]}),onOk:(t=s()(r()().mark((function n(){var t;return r()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,C.ZP)("/api/virtual_classrooms/".concat(ae.virtual_spacesId,"/knowledge_systems/").concat(e,"/del_content.json"),{method:"delete"});case 2:-1!==(null==(t=n.sent)?void 0:t.status)&&le();case 4:case"end":return n.stop()}}),n)}))),function(){return t.apply(this,arguments)})});var e,n,t},children:(0,ce.jsxs)("span",{className:"delete-hover",children:[" ",(0,ce.jsx)("i",{className:"iconfont icon-piliangshanchubeifen font14 mr5"}),"删除"]})})]})]}),(0,ce.jsxs)("div",{className:k,children:[(0,ce.jsx)("div",{children:"知识点"}),(0,ce.jsx)("div",{children:"主要内容"}),(0,ce.jsx)("div",{children:"能力目标"}),(0,ce.jsx)("div",{className:b,children:"学时"}),(0,ce.jsx)("div",{style:{marginRight:0},children:"教案"})]}),null==t?void 0:t.map((function(e,n){var t=e.knowledge_point,i=e.content,r=e.target,a=e.class_hour,o=e.lesson_plan;return(0,ce.jsxs)("div",{className:S,children:[(0,ce.jsx)("div",{children:t}),(0,ce.jsx)("pre",{children:i}),(0,ce.jsx)("pre",{children:r}),(0,ce.jsx)("div",{className:b,children:a}),(0,ce.jsx)("div",{style:{marginRight:0},children:(0,ce.jsx)(N.Z,{value:o})})]},n)}))]},a)}))]}),(0,ce.jsxs)(f.Z,{title:"编辑说明",destroyOnClose:!0,open:"desc"===te&&B,onOk:ue,centered:!0,onCancel:function(){M(!1),$(U[te]||"")},confirmLoading:I,width:686,okText:"确认",cancelText:"取消",wrapClassName:P.Z.CustomCss,children:[(0,ce.jsx)("div",{children:"说明:"}),(0,ce.jsx)(se.Z,{defaultvalue:G,onChange:function(e){$(e)}})]})]})]})}))},25526:function(e,n,t){function i(e){try{e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()}catch(e){console.log(e,":e")}}function r(){window.top.document.webkitExitFullscreen?window.top.document.webkitExitFullscreen():document.exitFullscreen?window.top.document.exitFullscreen():document.msExitFullscreen?window.top.document.msExitFullscreen():document.mozCancelFullScreen&&window.top.document.mozCancelFullScreen()}t.d(n,{BU:function(){return r},Dj:function(){return i},gH:function(){return a},vp:function(){return o}});var a=function(){return document.webkitExitFullscreen?"webkitfullscreenchange":document.exitFullscreen?"fullscreenchange":document.msExitFullscreen?"msfullscreenchange":document.mozCancelFullScreen?"mozfullscreenchange":void 0};function o(){var e=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement;document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",e),null!=e}},11806:function(e,n){n.Z={flex_box_center:"flex_box_center___vG4eV",flex_space_between:"flex_space_between___qVVxe",flex_box_vertical_center:"flex_box_vertical_center___P8Z8s",flex_box_center_end:"flex_box_center_end___VMme3",flex_box_column:"flex_box_column___VMHwm",dropdownmenus:"dropdownmenus___oVzoj",popupClassNames:"popupClassNames___OcZq7",selectdown:"selectdown___mmcA8"}}}]);