Auto Submit

pull/1/head
autosubmit 11 months ago
parent ce94aa7dbd
commit 27b28cf802

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function pe({open:Nt=!0,onChange:et,defaultValue:nt,placement:ht,width:lt,height:gt,extra:vt,onDynamic:Pt,showExtra:At=!0}){const Bt=(0,wt.useRef)(null),jt=(0,wt.useRef)(null),[_t,se]=(0,wt.useState)(nt||""),[Vt,he]=(0,wt.useState)(nt||""),[Zt,Oe]=(0,wt.useState)(!!Nt),[me,Ve]=(0,wt.useState)(1),Xe={selectOnLineNumbers:!0};(0,wt.useEffect)(()=>{Nt&&(se(nt),he(nt),Oe(!0))},[Nt,nt]),(0,wt.useEffect)(()=>{_t!==""&&(clearTimeout(jt.current),jt.current=setTimeout(()=>{const wn=document.createElement("iframe");if(wn.style.width="100%",wn.style.height="100%",wn.style.border="0",Bt.current){Bt.current.innerHTML="",Bt.current.appendChild(wn);const Mn=wn.contentDocument||wn.contentWindow.document;Mn.open(),Mn.write(_t),Mn.close()}},1e3))},[Nt,_t]);const Je=wn=>{se(wn),et==null||et(wn,Vt)};return ye.createElement(te.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Zt,width:At?700:"100%",height:gt||"100vh",rootClassName:ne.smartWrp,destroyOnClose:!0,onClose:()=>Oe(!1),extra:At&&ye.createElement("div",null,ye.createElement(Tt.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:me,onChange:wn=>Ve(wn)}),ye.createElement(be.Z,{type:"primary",className:"ml20",onClick:()=>Jt(this,null,function*(){yield Pt(_t,()=>{Oe(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},ye.createElement(de.Z,{className:"h100"},ye.createElement(Re.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:me===1?"block":"none"}},ye.createElement("div",{className:"h100",ref:Bt})),ye.createElement(Re.Z,{flex:"1",style:{display:me===2?"block":"none"}},ye.createElement(ae.ZP,{height:"90vh",value:nt,language:"html",theme:"vs",showMiniMap:!1,options:Xe,onChange:Je}))))}var je=pe},43276:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return se}});var wt=bt(59301),te=bt(96536),de=bt(77596),Re=bt(93772),ne=bt(14179),ae=bt(56102),Tt={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},be=bt(8591),ye=bt(11611),Jt=bt(35328),Be=bt(30084),pe=bt(10787),je=bt(50304),Nt=bt(83251),et=Object.defineProperty,nt=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable,Pt=(Vt,he,Zt)=>he in Vt?et(Vt,he,{enumerable:!0,configurable:!0,writable:!0,value:Zt}):Vt[he]=Zt,At=(Vt,he)=>{for(var Zt in he||(he={}))gt.call(he,Zt)&&Pt(Vt,Zt,he[Zt]);if(lt)for(var Zt of lt(he))vt.call(he,Zt)&&Pt(Vt,Zt,he[Zt]);return Vt},Bt=(Vt,he)=>nt(Vt,ht(he)),jt=(Vt,he)=>{var Zt={};for(var Oe in Vt)gt.call(Vt,Oe)&&he.indexOf(Oe)<0&&(Zt[Oe]=Vt[Oe]);if(Vt!=null&&lt)for(var Oe of lt(Vt))he.indexOf(Oe)<0&&vt.call(Vt,Oe)&&(Zt[Oe]=Vt[Oe]);return Zt},se=({onFinish:Vt,value:he,streamingStatus:Zt,cancelIndex:Oe,loadImage:me,onDynamic:Ve})=>{const[Xe,Je]=(0,wt.useState)(""),[wn,Mn]=(0,wt.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[we,Yt]=(0,wt.useState)(0),[_e,Zn]=(0,wt.useState)(!1),Dn=Tn=>Tn.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Yn,mn)=>`<mathx data-text="${mn.trim()}">$$${mn.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Ne=()=>{Zn(!0),Vt==null||Vt()};(0,wt.useEffect)(()=>{const Tn=me?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function pe({open:Nt=!0,onChange:et,defaultValue:nt,placement:ht,width:lt,height:gt,extra:vt,onDynamic:Pt,showExtra:At=!0}){const Bt=(0,wt.useRef)(null),jt=(0,wt.useRef)(null),[_t,se]=(0,wt.useState)(nt||""),[Vt,he]=(0,wt.useState)(nt||""),[Zt,Oe]=(0,wt.useState)(!!Nt),[me,Ve]=(0,wt.useState)(1),Xe={selectOnLineNumbers:!0};(0,wt.useEffect)(()=>{Nt&&(se(nt),he(nt),Oe(!0))},[Nt,nt]),(0,wt.useEffect)(()=>{_t!==""&&(clearTimeout(jt.current),jt.current=setTimeout(()=>{const wn=document.createElement("iframe");if(wn.style.width="100%",wn.style.height="100%",wn.style.border="0",Bt.current){Bt.current.innerHTML="",Bt.current.appendChild(wn);const Mn=wn.contentDocument||wn.contentWindow.document;Mn.open(),Mn.write(_t),Mn.close()}},1e3))},[Nt,_t]);const Je=wn=>{se(wn),et==null||et(wn,Vt)};return ye.createElement(te.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Zt,width:At?700:"100%",height:gt||"100vh",rootClassName:ne.smartWrp,destroyOnClose:!0,onClose:()=>Oe(!1),extra:At&&ye.createElement("div",null,ye.createElement(Tt.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:me,onChange:wn=>Ve(wn)}),ye.createElement(be.Z,{type:"primary",className:"ml20",onClick:()=>Jt(this,null,function*(){yield Pt(_t,()=>{Oe(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},ye.createElement(de.Z,{className:"h100"},ye.createElement(Re.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:me===1?"block":"none"}},ye.createElement("div",{className:"h100",ref:Bt})),ye.createElement(Re.Z,{flex:"1",style:{display:me===2?"block":"none"}},ye.createElement(ae.ZP,{height:"90vh",value:nt,language:"html",theme:"vs",showMiniMap:!1,options:Xe,onChange:Je}))))}var je=pe},43276:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return se}});var wt=bt(59301),te=bt(96536),de=bt(77596),Re=bt(93772),ne=bt(14179),ae=bt(56102),Tt={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},be=bt(8591),ye=bt(11611),Jt=bt(13058),Be=bt(30084),pe=bt(10787),je=bt(50304),Nt=bt(83251),et=Object.defineProperty,nt=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable,Pt=(Vt,he,Zt)=>he in Vt?et(Vt,he,{enumerable:!0,configurable:!0,writable:!0,value:Zt}):Vt[he]=Zt,At=(Vt,he)=>{for(var Zt in he||(he={}))gt.call(he,Zt)&&Pt(Vt,Zt,he[Zt]);if(lt)for(var Zt of lt(he))vt.call(he,Zt)&&Pt(Vt,Zt,he[Zt]);return Vt},Bt=(Vt,he)=>nt(Vt,ht(he)),jt=(Vt,he)=>{var Zt={};for(var Oe in Vt)gt.call(Vt,Oe)&&he.indexOf(Oe)<0&&(Zt[Oe]=Vt[Oe]);if(Vt!=null&&lt)for(var Oe of lt(Vt))he.indexOf(Oe)<0&&vt.call(Vt,Oe)&&(Zt[Oe]=Vt[Oe]);return Zt},se=({onFinish:Vt,value:he,streamingStatus:Zt,cancelIndex:Oe,loadImage:me,onDynamic:Ve})=>{const[Xe,Je]=(0,wt.useState)(""),[wn,Mn]=(0,wt.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[we,Yt]=(0,wt.useState)(0),[_e,Zn]=(0,wt.useState)(!1),Dn=Tn=>Tn.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Yn,mn)=>`<mathx data-text="${mn.trim()}">$$${mn.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Ne=()=>{Zn(!0),Vt==null||Vt()};(0,wt.useEffect)(()=>{const Tn=me?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${he}`:he,Yn=Dn(Tn);if(!_e)if(me||!Zt||Oe>0){Je(Yn),Yt(Yn.length),(!Zt||Oe>0)&&!me&&Ne();return}else if((Yn==null?void 0:Yn.length)<4)Je(Yn),Yt(Yn.length);else if(we<Yn.length){const mn=Yn.length-we,ui=setInterval(()=>{Je(Yn.slice(0,we+2)),Yt(Ce=>Ce+2)},mn>10?Math.max(500/(mn/2),20):50);return()=>clearInterval(ui)}else Zt||Ne()},[he,Zt,Oe,me,we]);const pn=(0,wt.useMemo)(()=>wt.createElement("section",{className:`${Tt.answer} fadeIn animated edu_md`},wt.createElement(te.UG,{remarkPlugins:[Be.Z,pe.Z],rehypePlugins:[Jt.Z,Re.Z],components:{code(Tn){var Yn=Tn,{node:mn,inline:ui,className:Ce,children:$n}=Yn,Pi=jt(Yn,["node","inline","className","children"]);const Ot=/language-(\w+)/.exec(Ce||""),Lt=String($n).trim();return ui||!Ot?wt.createElement("code",At({className:Ce},Pi),$n):wt.createElement("code",{className:Tt.codeCopy,"data-text":`\`\`\`${Ot?Ot[1]:""}
${$n}

File diff suppressed because one or more lines are too long

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function mt({open:Be=!0,onChange:ne,defaultValue:ee,placement:ce,width:se,height:ge,extra:ve,onDynamic:Ce,showExtra:ke=!0}){const De=(0,fe.useRef)(null),Ge=(0,fe.useRef)(null),[_e,ht]=(0,fe.useState)(ee||""),[Je,At]=(0,fe.useState)(ee||""),[ze,Ct]=(0,fe.useState)(!!Be),[ct,Tt]=(0,fe.useState)(1),dt={selectOnLineNumbers:!0};(0,fe.useEffect)(()=>{Be&&(ht(ee),At(ee),Ct(!0))},[Be,ee]),(0,fe.useEffect)(()=>{_e!==""&&(clearTimeout(Ge.current),Ge.current=setTimeout(()=>{const Qt=document.createElement("iframe");if(Qt.style.width="100%",Qt.style.height="100%",Qt.style.border="0",De.current){De.current.innerHTML="",De.current.appendChild(Qt);const en=Qt.contentDocument||Qt.contentWindow.document;en.open(),en.write(_e),en.close()}},1e3))},[Be,_e]);const zt=Qt=>{ht(Qt),ne==null||ne(Qt,Je)};return pt.createElement(Re.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:ze,width:ke?700:"100%",height:ge||"100vh",rootClassName:Xe.smartWrp,destroyOnClose:!0,onClose:()=>Ct(!1),extra:ke&&pt.createElement("div",null,pt.createElement(Te.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:ct,onChange:Qt=>Tt(Qt)}),pt.createElement(Dt.Z,{type:"primary",className:"ml20",onClick:()=>Ke(this,null,function*(){yield Ce(_e,()=>{Ct(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},pt.createElement(lt.Z,{className:"h100"},pt.createElement(Pt.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:ct===1?"block":"none"}},pt.createElement("div",{className:"h100",ref:De})),pt.createElement(Pt.Z,{flex:"1",style:{display:ct===2?"block":"none"}},pt.createElement(it.ZP,{height:"90vh",value:ee,language:"html",theme:"vs",showMiniMap:!1,options:dt,onChange:zt}))))}var Gt=mt},43276:function(Fn,Cn,Se){"use strict";Se.d(Cn,{Z:function(){return ht}});var fe=Se(59301),Re=Se(96536),lt=Se(77596),Pt=Se(93772),Xe=Se(14179),it=Se(56102),Te={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Dt=Se(8591),pt=Se(11611),Ke=Se(35328),Mt=Se(30084),mt=Se(10787),Gt=Se(50304),Be=Se(83251),ne=Object.defineProperty,ee=Object.defineProperties,ce=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,Ce=(Je,At,ze)=>At in Je?ne(Je,At,{enumerable:!0,configurable:!0,writable:!0,value:ze}):Je[At]=ze,ke=(Je,At)=>{for(var ze in At||(At={}))ge.call(At,ze)&&Ce(Je,ze,At[ze]);if(se)for(var ze of se(At))ve.call(At,ze)&&Ce(Je,ze,At[ze]);return Je},De=(Je,At)=>ee(Je,ce(At)),Ge=(Je,At)=>{var ze={};for(var Ct in Je)ge.call(Je,Ct)&&At.indexOf(Ct)<0&&(ze[Ct]=Je[Ct]);if(Je!=null&&se)for(var Ct of se(Je))At.indexOf(Ct)<0&&ve.call(Je,Ct)&&(ze[Ct]=Je[Ct]);return ze},ht=({onFinish:Je,value:At,streamingStatus:ze,cancelIndex:Ct,loadImage:ct,onDynamic:Tt})=>{const[dt,zt]=(0,fe.useState)(""),[Qt,en]=(0,fe.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[ft,$e]=(0,fe.useState)(0),[cn,kn]=(0,fe.useState)(!1),Nn=Kn=>Kn.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(ii,dn)=>`<mathx data-text="${dn.trim()}">$$${dn.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Ut=()=>{kn(!0),Je==null||Je()};(0,fe.useEffect)(()=>{const Kn=ct?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function mt({open:Be=!0,onChange:ne,defaultValue:ee,placement:ce,width:se,height:ge,extra:ve,onDynamic:Ce,showExtra:ke=!0}){const De=(0,fe.useRef)(null),Ge=(0,fe.useRef)(null),[_e,ht]=(0,fe.useState)(ee||""),[Je,At]=(0,fe.useState)(ee||""),[ze,Ct]=(0,fe.useState)(!!Be),[ct,Tt]=(0,fe.useState)(1),dt={selectOnLineNumbers:!0};(0,fe.useEffect)(()=>{Be&&(ht(ee),At(ee),Ct(!0))},[Be,ee]),(0,fe.useEffect)(()=>{_e!==""&&(clearTimeout(Ge.current),Ge.current=setTimeout(()=>{const Qt=document.createElement("iframe");if(Qt.style.width="100%",Qt.style.height="100%",Qt.style.border="0",De.current){De.current.innerHTML="",De.current.appendChild(Qt);const en=Qt.contentDocument||Qt.contentWindow.document;en.open(),en.write(_e),en.close()}},1e3))},[Be,_e]);const zt=Qt=>{ht(Qt),ne==null||ne(Qt,Je)};return pt.createElement(Re.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:ze,width:ke?700:"100%",height:ge||"100vh",rootClassName:Xe.smartWrp,destroyOnClose:!0,onClose:()=>Ct(!1),extra:ke&&pt.createElement("div",null,pt.createElement(Te.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:ct,onChange:Qt=>Tt(Qt)}),pt.createElement(Dt.Z,{type:"primary",className:"ml20",onClick:()=>Ke(this,null,function*(){yield Ce(_e,()=>{Ct(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},pt.createElement(lt.Z,{className:"h100"},pt.createElement(Pt.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:ct===1?"block":"none"}},pt.createElement("div",{className:"h100",ref:De})),pt.createElement(Pt.Z,{flex:"1",style:{display:ct===2?"block":"none"}},pt.createElement(it.ZP,{height:"90vh",value:ee,language:"html",theme:"vs",showMiniMap:!1,options:dt,onChange:zt}))))}var Gt=mt},43276:function(Fn,Cn,Se){"use strict";Se.d(Cn,{Z:function(){return ht}});var fe=Se(59301),Re=Se(96536),lt=Se(77596),Pt=Se(93772),Xe=Se(14179),it=Se(56102),Te={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Dt=Se(8591),pt=Se(11611),Ke=Se(13058),Mt=Se(30084),mt=Se(10787),Gt=Se(50304),Be=Se(83251),ne=Object.defineProperty,ee=Object.defineProperties,ce=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,Ce=(Je,At,ze)=>At in Je?ne(Je,At,{enumerable:!0,configurable:!0,writable:!0,value:ze}):Je[At]=ze,ke=(Je,At)=>{for(var ze in At||(At={}))ge.call(At,ze)&&Ce(Je,ze,At[ze]);if(se)for(var ze of se(At))ve.call(At,ze)&&Ce(Je,ze,At[ze]);return Je},De=(Je,At)=>ee(Je,ce(At)),Ge=(Je,At)=>{var ze={};for(var Ct in Je)ge.call(Je,Ct)&&At.indexOf(Ct)<0&&(ze[Ct]=Je[Ct]);if(Je!=null&&se)for(var Ct of se(Je))At.indexOf(Ct)<0&&ve.call(Je,Ct)&&(ze[Ct]=Je[Ct]);return ze},ht=({onFinish:Je,value:At,streamingStatus:ze,cancelIndex:Ct,loadImage:ct,onDynamic:Tt})=>{const[dt,zt]=(0,fe.useState)(""),[Qt,en]=(0,fe.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[ft,$e]=(0,fe.useState)(0),[cn,kn]=(0,fe.useState)(!1),Nn=Kn=>Kn.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(ii,dn)=>`<mathx data-text="${dn.trim()}">$$${dn.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Ut=()=>{kn(!0),Je==null||Je()};(0,fe.useEffect)(()=>{const Kn=ct?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${At}`:At,ii=Nn(Kn);if(!cn)if(ct||!ze||Ct>0){zt(ii),$e(ii.length),(!ze||Ct>0)&&!ct&&Ut();return}else if((ii==null?void 0:ii.length)<4)zt(ii),$e(ii.length);else if(ft<ii.length){const dn=ii.length-ft,ai=setInterval(()=>{zt(ii.slice(0,ft+2)),$e(kt=>kt+2)},dn>10?Math.max(500/(dn/2),20):50);return()=>clearInterval(ai)}else ze||Ut()},[At,ze,Ct,ct,ft]);const Pn=(0,fe.useMemo)(()=>fe.createElement("section",{className:`${Te.answer} fadeIn animated edu_md`},fe.createElement(Re.UG,{remarkPlugins:[Mt.Z,mt.Z],rehypePlugins:[Ke.Z,Pt.Z],components:{code(Kn){var ii=Kn,{node:dn,inline:ai,className:kt,children:Jn}=ii,Li=Ge(ii,["node","inline","className","children"]);const je=/language-(\w+)/.exec(kt||""),Le=String(Jn).trim();return ai||!je?fe.createElement("code",ke({className:kt},Li),Jn):fe.createElement("code",{className:Te.codeCopy,"data-text":`\`\`\`${je?je[1]:""}
${Jn}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function Pe({open:Ft=!0,onChange:et,defaultValue:nt,placement:ht,width:lt,height:pt,extra:yt,onDynamic:Pt,showExtra:Nt=!0}){const Dt=(0,ct.useRef)(null),Zt=(0,ct.useRef)(null),[ne,de]=(0,ct.useState)(nt||""),[Qt,Ce]=(0,ct.useState)(nt||""),[Vt,Ee]=(0,ct.useState)(!!Ft),[ve,Je]=(0,ct.useState)(1),je={selectOnLineNumbers:!0};(0,ct.useEffect)(()=>{Ft&&(de(nt),Ce(nt),Ee(!0))},[Ft,nt]),(0,ct.useEffect)(()=>{ne!==""&&(clearTimeout(Zt.current),Zt.current=setTimeout(()=>{const Hn=document.createElement("iframe");if(Hn.style.width="100%",Hn.style.height="100%",Hn.style.border="0",Dt.current){Dt.current.innerHTML="",Dt.current.appendChild(Hn);const Zn=Hn.contentDocument||Hn.contentWindow.document;Zn.open(),Zn.write(ne),Zn.close()}},1e3))},[Ft,ne]);const en=Hn=>{de(Hn),et==null||et(Hn,Qt)};return me.createElement(Ot.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Vt,width:Nt?700:"100%",height:pt||"100vh",rootClassName:te.smartWrp,destroyOnClose:!0,onClose:()=>Ee(!1),extra:Nt&&me.createElement("div",null,me.createElement(kt.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:ve,onChange:Hn=>Je(Hn)}),me.createElement(ke.Z,{type:"primary",className:"ml20",onClick:()=>Ut(this,null,function*(){yield Pt(ne,()=>{Ee(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},me.createElement(ue.Z,{className:"h100"},me.createElement(Ie.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:ve===1?"block":"none"}},me.createElement("div",{className:"h100",ref:Dt})),me.createElement(Ie.Z,{flex:"1",style:{display:ve===2?"block":"none"}},me.createElement(le.ZP,{height:"90vh",value:nt,language:"html",theme:"vs",showMiniMap:!1,options:je,onChange:en}))))}var He=Pe},43276:function(Fn,An,xt){"use strict";xt.d(An,{Z:function(){return de}});var ct=xt(59301),Ot=xt(96536),ue=xt(77596),Ie=xt(93772),te=xt(14179),le=xt(56102),kt={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},ke=xt(8591),me=xt(11611),Ut=xt(35328),Ae=xt(30084),Pe=xt(10787),He=xt(50304),Ft=xt(83251),et=Object.defineProperty,nt=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,pt=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,Pt=(Qt,Ce,Vt)=>Ce in Qt?et(Qt,Ce,{enumerable:!0,configurable:!0,writable:!0,value:Vt}):Qt[Ce]=Vt,Nt=(Qt,Ce)=>{for(var Vt in Ce||(Ce={}))pt.call(Ce,Vt)&&Pt(Qt,Vt,Ce[Vt]);if(lt)for(var Vt of lt(Ce))yt.call(Ce,Vt)&&Pt(Qt,Vt,Ce[Vt]);return Qt},Dt=(Qt,Ce)=>nt(Qt,ht(Ce)),Zt=(Qt,Ce)=>{var Vt={};for(var Ee in Qt)pt.call(Qt,Ee)&&Ce.indexOf(Ee)<0&&(Vt[Ee]=Qt[Ee]);if(Qt!=null&&lt)for(var Ee of lt(Qt))Ce.indexOf(Ee)<0&&yt.call(Qt,Ee)&&(Vt[Ee]=Qt[Ee]);return Vt},de=({onFinish:Qt,value:Ce,streamingStatus:Vt,cancelIndex:Ee,loadImage:ve,onDynamic:Je})=>{const[je,en]=(0,ct.useState)(""),[Hn,Zn]=(0,ct.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Te,$t]=(0,ct.useState)(0),[dn,Vn]=(0,ct.useState)(!1),Dn=Mn=>Mn.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(ei,cn)=>`<mathx data-text="${cn.trim()}">$$${cn.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Ge=()=>{Vn(!0),Qt==null||Qt()};(0,ct.useEffect)(()=>{const Mn=ve?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function Pe({open:Ft=!0,onChange:et,defaultValue:nt,placement:ht,width:lt,height:pt,extra:yt,onDynamic:Pt,showExtra:Nt=!0}){const Dt=(0,ct.useRef)(null),Zt=(0,ct.useRef)(null),[ne,de]=(0,ct.useState)(nt||""),[Qt,Ce]=(0,ct.useState)(nt||""),[Vt,Ee]=(0,ct.useState)(!!Ft),[ve,Je]=(0,ct.useState)(1),je={selectOnLineNumbers:!0};(0,ct.useEffect)(()=>{Ft&&(de(nt),Ce(nt),Ee(!0))},[Ft,nt]),(0,ct.useEffect)(()=>{ne!==""&&(clearTimeout(Zt.current),Zt.current=setTimeout(()=>{const Hn=document.createElement("iframe");if(Hn.style.width="100%",Hn.style.height="100%",Hn.style.border="0",Dt.current){Dt.current.innerHTML="",Dt.current.appendChild(Hn);const Zn=Hn.contentDocument||Hn.contentWindow.document;Zn.open(),Zn.write(ne),Zn.close()}},1e3))},[Ft,ne]);const en=Hn=>{de(Hn),et==null||et(Hn,Qt)};return me.createElement(Ot.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Vt,width:Nt?700:"100%",height:pt||"100vh",rootClassName:te.smartWrp,destroyOnClose:!0,onClose:()=>Ee(!1),extra:Nt&&me.createElement("div",null,me.createElement(kt.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:ve,onChange:Hn=>Je(Hn)}),me.createElement(ke.Z,{type:"primary",className:"ml20",onClick:()=>Ut(this,null,function*(){yield Pt(ne,()=>{Ee(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},me.createElement(ue.Z,{className:"h100"},me.createElement(Ie.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:ve===1?"block":"none"}},me.createElement("div",{className:"h100",ref:Dt})),me.createElement(Ie.Z,{flex:"1",style:{display:ve===2?"block":"none"}},me.createElement(le.ZP,{height:"90vh",value:nt,language:"html",theme:"vs",showMiniMap:!1,options:je,onChange:en}))))}var He=Pe},43276:function(Fn,An,xt){"use strict";xt.d(An,{Z:function(){return de}});var ct=xt(59301),Ot=xt(96536),ue=xt(77596),Ie=xt(93772),te=xt(14179),le=xt(56102),kt={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},ke=xt(8591),me=xt(11611),Ut=xt(13058),Ae=xt(30084),Pe=xt(10787),He=xt(50304),Ft=xt(83251),et=Object.defineProperty,nt=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,pt=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,Pt=(Qt,Ce,Vt)=>Ce in Qt?et(Qt,Ce,{enumerable:!0,configurable:!0,writable:!0,value:Vt}):Qt[Ce]=Vt,Nt=(Qt,Ce)=>{for(var Vt in Ce||(Ce={}))pt.call(Ce,Vt)&&Pt(Qt,Vt,Ce[Vt]);if(lt)for(var Vt of lt(Ce))yt.call(Ce,Vt)&&Pt(Qt,Vt,Ce[Vt]);return Qt},Dt=(Qt,Ce)=>nt(Qt,ht(Ce)),Zt=(Qt,Ce)=>{var Vt={};for(var Ee in Qt)pt.call(Qt,Ee)&&Ce.indexOf(Ee)<0&&(Vt[Ee]=Qt[Ee]);if(Qt!=null&&lt)for(var Ee of lt(Qt))Ce.indexOf(Ee)<0&&yt.call(Qt,Ee)&&(Vt[Ee]=Qt[Ee]);return Vt},de=({onFinish:Qt,value:Ce,streamingStatus:Vt,cancelIndex:Ee,loadImage:ve,onDynamic:Je})=>{const[je,en]=(0,ct.useState)(""),[Hn,Zn]=(0,ct.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Te,$t]=(0,ct.useState)(0),[dn,Vn]=(0,ct.useState)(!1),Dn=Mn=>Mn.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(ei,cn)=>`<mathx data-text="${cn.trim()}">$$${cn.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Ge=()=>{Vn(!0),Qt==null||Qt()};(0,ct.useEffect)(()=>{const Mn=ve?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${Ce}`:Ce,ei=Dn(Mn);if(!dn)if(ve||!Vt||Ee>0){en(ei),$t(ei.length),(!Vt||Ee>0)&&!ve&&Ge();return}else if((ei==null?void 0:ei.length)<4)en(ei),$t(ei.length);else if(Te<ei.length){const cn=ei.length-Te,Cn=setInterval(()=>{en(ei.slice(0,Te+2)),$t(se=>se+2)},cn>10?Math.max(500/(cn/2),20):50);return()=>clearInterval(Cn)}else Vt||Ge()},[Ce,Vt,Ee,ve,Te]);const We=(0,ct.useMemo)(()=>ct.createElement("section",{className:`${kt.answer} fadeIn animated edu_md`},ct.createElement(Ot.UG,{remarkPlugins:[Ae.Z,Pe.Z],rehypePlugins:[Ut.Z,Ie.Z],components:{code(Mn){var ei=Mn,{node:cn,inline:Cn,className:se,children:gn}=ei,bn=Zt(ei,["node","inline","className","children"]);const It=/language-(\w+)/.exec(se||""),bt=String(gn).trim();return Cn||!It?ct.createElement("code",Nt({className:se},bn),gn):ct.createElement("code",{className:kt.codeCopy,"data-text":`\`\`\`${It?It[1]:""}
${gn}

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function ye({open:M=!0,onChange:we,defaultValue:De,placement:G,width:de,height:ce,extra:ot,onDynamic:Pe,showExtra:it=!0}){const nt=(0,e.useRef)(null),at=(0,e.useRef)(null),[Je,ze]=(0,e.useState)(De||""),[Re,me]=(0,e.useState)(De||""),[Be,S]=(0,e.useState)(!!M),[O,ge]=(0,e.useState)(1),k={selectOnLineNumbers:!0};(0,e.useEffect)(()=>{M&&(ze(De),me(De),S(!0))},[M,De]),(0,e.useEffect)(()=>{Je!==""&&(clearTimeout(at.current),at.current=setTimeout(()=>{const st=document.createElement("iframe");if(st.style.width="100%",st.style.height="100%",st.style.border="0",nt.current){nt.current.innerHTML="",nt.current.appendChild(st);const Wt=st.contentDocument||st.contentWindow.document;Wt.open(),Wt.write(Je),Wt.close()}},1e3))},[M,Je]);const _e=st=>{ze(st),we==null||we(st,Re)};return w.createElement(g.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Be,width:it?700:"100%",height:ce||"100vh",rootClassName:J.smartWrp,destroyOnClose:!0,onClose:()=>S(!1),extra:it&&w.createElement("div",null,w.createElement(q.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:O,onChange:st=>ge(st)}),w.createElement(pe.Z,{type:"primary",className:"ml20",onClick:()=>P(this,null,function*(){yield Pe(Je,()=>{S(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},w.createElement(f.Z,{className:"h100"},w.createElement(te.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:O===1?"block":"none"}},w.createElement("div",{className:"h100",ref:nt})),w.createElement(te.Z,{flex:"1",style:{display:O===2?"block":"none"}},w.createElement(B.ZP,{height:"90vh",value:De,language:"html",theme:"vs",showMiniMap:!1,options:k,onChange:_e}))))}var ne=ye},43276:function(tt,mt,t){"use strict";t.d(mt,{Z:function(){return ze}});var e=t(59301),g=t(96536),f=t(77596),te=t(93772),J=t(14179),B=t(56102),q={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},pe=t(8591),w=t(11611),P=t(35328),oe=t(30084),ye=t(10787),ne=t(50304),M=t(83251),we=Object.defineProperty,De=Object.defineProperties,G=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,ce=Object.prototype.hasOwnProperty,ot=Object.prototype.propertyIsEnumerable,Pe=(Re,me,Be)=>me in Re?we(Re,me,{enumerable:!0,configurable:!0,writable:!0,value:Be}):Re[me]=Be,it=(Re,me)=>{for(var Be in me||(me={}))ce.call(me,Be)&&Pe(Re,Be,me[Be]);if(de)for(var Be of de(me))ot.call(me,Be)&&Pe(Re,Be,me[Be]);return Re},nt=(Re,me)=>De(Re,G(me)),at=(Re,me)=>{var Be={};for(var S in Re)ce.call(Re,S)&&me.indexOf(S)<0&&(Be[S]=Re[S]);if(Re!=null&&de)for(var S of de(Re))me.indexOf(S)<0&&ot.call(Re,S)&&(Be[S]=Re[S]);return Be},ze=({onFinish:Re,value:me,streamingStatus:Be,cancelIndex:S,loadImage:O,onDynamic:ge})=>{const[k,_e]=(0,e.useState)(""),[st,Wt]=(0,e.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Tt,ke]=(0,e.useState)(0),[Pt,lt]=(0,e.useState)(!1),Mt=H=>H.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Fe,gt)=>`<mathx data-text="${gt.trim()}">$$${gt.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),ee=()=>{lt(!0),Re==null||Re()};(0,e.useEffect)(()=>{const H=O?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function ye({open:M=!0,onChange:we,defaultValue:De,placement:G,width:de,height:ce,extra:ot,onDynamic:Pe,showExtra:it=!0}){const nt=(0,e.useRef)(null),at=(0,e.useRef)(null),[Je,ze]=(0,e.useState)(De||""),[Re,me]=(0,e.useState)(De||""),[Be,S]=(0,e.useState)(!!M),[O,ge]=(0,e.useState)(1),k={selectOnLineNumbers:!0};(0,e.useEffect)(()=>{M&&(ze(De),me(De),S(!0))},[M,De]),(0,e.useEffect)(()=>{Je!==""&&(clearTimeout(at.current),at.current=setTimeout(()=>{const st=document.createElement("iframe");if(st.style.width="100%",st.style.height="100%",st.style.border="0",nt.current){nt.current.innerHTML="",nt.current.appendChild(st);const Wt=st.contentDocument||st.contentWindow.document;Wt.open(),Wt.write(Je),Wt.close()}},1e3))},[M,Je]);const _e=st=>{ze(st),we==null||we(st,Re)};return w.createElement(g.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Be,width:it?700:"100%",height:ce||"100vh",rootClassName:J.smartWrp,destroyOnClose:!0,onClose:()=>S(!1),extra:it&&w.createElement("div",null,w.createElement(q.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:O,onChange:st=>ge(st)}),w.createElement(pe.Z,{type:"primary",className:"ml20",onClick:()=>P(this,null,function*(){yield Pe(Je,()=>{S(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},w.createElement(f.Z,{className:"h100"},w.createElement(te.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:O===1?"block":"none"}},w.createElement("div",{className:"h100",ref:nt})),w.createElement(te.Z,{flex:"1",style:{display:O===2?"block":"none"}},w.createElement(B.ZP,{height:"90vh",value:De,language:"html",theme:"vs",showMiniMap:!1,options:k,onChange:_e}))))}var ne=ye},43276:function(tt,mt,t){"use strict";t.d(mt,{Z:function(){return ze}});var e=t(59301),g=t(96536),f=t(77596),te=t(93772),J=t(14179),B=t(56102),q={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},pe=t(8591),w=t(11611),P=t(13058),oe=t(30084),ye=t(10787),ne=t(50304),M=t(83251),we=Object.defineProperty,De=Object.defineProperties,G=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,ce=Object.prototype.hasOwnProperty,ot=Object.prototype.propertyIsEnumerable,Pe=(Re,me,Be)=>me in Re?we(Re,me,{enumerable:!0,configurable:!0,writable:!0,value:Be}):Re[me]=Be,it=(Re,me)=>{for(var Be in me||(me={}))ce.call(me,Be)&&Pe(Re,Be,me[Be]);if(de)for(var Be of de(me))ot.call(me,Be)&&Pe(Re,Be,me[Be]);return Re},nt=(Re,me)=>De(Re,G(me)),at=(Re,me)=>{var Be={};for(var S in Re)ce.call(Re,S)&&me.indexOf(S)<0&&(Be[S]=Re[S]);if(Re!=null&&de)for(var S of de(Re))me.indexOf(S)<0&&ot.call(Re,S)&&(Be[S]=Re[S]);return Be},ze=({onFinish:Re,value:me,streamingStatus:Be,cancelIndex:S,loadImage:O,onDynamic:ge})=>{const[k,_e]=(0,e.useState)(""),[st,Wt]=(0,e.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Tt,ke]=(0,e.useState)(0),[Pt,lt]=(0,e.useState)(!1),Mt=H=>H.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Fe,gt)=>`<mathx data-text="${gt.trim()}">$$${gt.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),ee=()=>{lt(!0),Re==null||Re()};(0,e.useEffect)(()=>{const H=O?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${me}`:me,Fe=Mt(H);if(!Pt)if(O||!Be||S>0){_e(Fe),ke(Fe.length),(!Be||S>0)&&!O&&ee();return}else if((Fe==null?void 0:Fe.length)<4)_e(Fe),ke(Fe.length);else if(Tt<Fe.length){const gt=Fe.length-Tt,Ie=setInterval(()=>{_e(Fe.slice(0,Tt+2)),ke(X=>X+2)},gt>10?Math.max(500/(gt/2),20):50);return()=>clearInterval(Ie)}else Be||ee()},[me,Be,S,O,Tt]);const R=(0,e.useMemo)(()=>e.createElement("section",{className:`${q.answer} fadeIn animated edu_md`},e.createElement(g.UG,{remarkPlugins:[oe.Z,ye.Z],rehypePlugins:[P.Z,te.Z],components:{code(H){var Fe=H,{node:gt,inline:Ie,className:X,children:Ae}=Fe,$=at(Fe,["node","inline","className","children"]);const le=/language-(\w+)/.exec(X||""),Ne=String(Ae).trim();return Ie||!le?e.createElement("code",it({className:X},$),Ae):e.createElement("code",{className:q.codeCopy,"data-text":`\`\`\`${le?le[1]:""}
${Ae}

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function mt({open:De=!0,onChange:te,defaultValue:ne,placement:he,width:le,height:ge,extra:me,onDynamic:Pe,showExtra:Ne=!0}){const we=(0,ye.useRef)(null),ze=(0,ye.useRef)(null),[qe,lt]=(0,ye.useState)(ne||""),[Ke,rt]=(0,ye.useState)(ne||""),[Ge,Tt]=(0,ye.useState)(!!De),[St,Yt]=(0,ye.useState)(1),en={selectOnLineNumbers:!0};(0,ye.useEffect)(()=>{De&&(lt(ne),rt(ne),Tt(!0))},[De,ne]),(0,ye.useEffect)(()=>{qe!==""&&(clearTimeout(ze.current),ze.current=setTimeout(()=>{const bn=document.createElement("iframe");if(bn.style.width="100%",bn.style.height="100%",bn.style.border="0",we.current){we.current.innerHTML="",we.current.appendChild(bn);const yn=bn.contentDocument||bn.contentWindow.document;yn.open(),yn.write(qe),yn.close()}},1e3))},[De,qe]);const Jt=bn=>{lt(bn),te==null||te(bn,Ke)};return pt.createElement(Be.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Ge,width:Ne?700:"100%",height:ge||"100vh",rootClassName:tt.smartWrp,destroyOnClose:!0,onClose:()=>Tt(!1),extra:Ne&&pt.createElement("div",null,pt.createElement(Te.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:St,onChange:bn=>Yt(bn)}),pt.createElement(Dt.Z,{type:"primary",className:"ml20",onClick:()=>_e(this,null,function*(){yield Pe(qe,()=>{Tt(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},pt.createElement(gt.Z,{className:"h100"},pt.createElement(zt.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:St===1?"block":"none"}},pt.createElement("div",{className:"h100",ref:we})),pt.createElement(zt.Z,{flex:"1",style:{display:St===2?"block":"none"}},pt.createElement(ht.ZP,{height:"90vh",value:ne,language:"html",theme:"vs",showMiniMap:!1,options:en,onChange:Jt}))))}var Gt=mt},43276:function(xn,Tn,xe){"use strict";xe.d(Tn,{Z:function(){return lt}});var ye=xe(59301),Be=xe(96536),gt=xe(77596),zt=xe(93772),tt=xe(14179),ht=xe(56102),Te={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Dt=xe(8591),pt=xe(11611),_e=xe(35328),It=xe(30084),mt=xe(10787),Gt=xe(50304),De=xe(83251),te=Object.defineProperty,ne=Object.defineProperties,he=Object.getOwnPropertyDescriptors,le=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,me=Object.prototype.propertyIsEnumerable,Pe=(Ke,rt,Ge)=>rt in Ke?te(Ke,rt,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Ke[rt]=Ge,Ne=(Ke,rt)=>{for(var Ge in rt||(rt={}))ge.call(rt,Ge)&&Pe(Ke,Ge,rt[Ge]);if(le)for(var Ge of le(rt))me.call(rt,Ge)&&Pe(Ke,Ge,rt[Ge]);return Ke},we=(Ke,rt)=>ne(Ke,he(rt)),ze=(Ke,rt)=>{var Ge={};for(var Tt in Ke)ge.call(Ke,Tt)&&rt.indexOf(Tt)<0&&(Ge[Tt]=Ke[Tt]);if(Ke!=null&&le)for(var Tt of le(Ke))rt.indexOf(Tt)<0&&me.call(Ke,Tt)&&(Ge[Tt]=Ke[Tt]);return Ge},lt=({onFinish:Ke,value:rt,streamingStatus:Ge,cancelIndex:Tt,loadImage:St,onDynamic:Yt})=>{const[en,Jt]=(0,ye.useState)(""),[bn,yn]=(0,ye.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Ct,$e]=(0,ye.useState)(0),[an,si]=(0,ye.useState)(!1),Jn=Un=>Un.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(li,Nn)=>`<mathx data-text="${Nn.trim()}">$$${Nn.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Nt=()=>{si(!0),Ke==null||Ke()};(0,ye.useEffect)(()=>{const Un=St?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function mt({open:De=!0,onChange:te,defaultValue:ne,placement:he,width:le,height:ge,extra:me,onDynamic:Pe,showExtra:Ne=!0}){const we=(0,ye.useRef)(null),ze=(0,ye.useRef)(null),[qe,lt]=(0,ye.useState)(ne||""),[Ke,rt]=(0,ye.useState)(ne||""),[Ge,Tt]=(0,ye.useState)(!!De),[St,Yt]=(0,ye.useState)(1),en={selectOnLineNumbers:!0};(0,ye.useEffect)(()=>{De&&(lt(ne),rt(ne),Tt(!0))},[De,ne]),(0,ye.useEffect)(()=>{qe!==""&&(clearTimeout(ze.current),ze.current=setTimeout(()=>{const bn=document.createElement("iframe");if(bn.style.width="100%",bn.style.height="100%",bn.style.border="0",we.current){we.current.innerHTML="",we.current.appendChild(bn);const yn=bn.contentDocument||bn.contentWindow.document;yn.open(),yn.write(qe),yn.close()}},1e3))},[De,qe]);const Jt=bn=>{lt(bn),te==null||te(bn,Ke)};return pt.createElement(Be.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Ge,width:Ne?700:"100%",height:ge||"100vh",rootClassName:tt.smartWrp,destroyOnClose:!0,onClose:()=>Tt(!1),extra:Ne&&pt.createElement("div",null,pt.createElement(Te.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:St,onChange:bn=>Yt(bn)}),pt.createElement(Dt.Z,{type:"primary",className:"ml20",onClick:()=>_e(this,null,function*(){yield Pe(qe,()=>{Tt(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},pt.createElement(gt.Z,{className:"h100"},pt.createElement(zt.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:St===1?"block":"none"}},pt.createElement("div",{className:"h100",ref:we})),pt.createElement(zt.Z,{flex:"1",style:{display:St===2?"block":"none"}},pt.createElement(ht.ZP,{height:"90vh",value:ne,language:"html",theme:"vs",showMiniMap:!1,options:en,onChange:Jt}))))}var Gt=mt},43276:function(xn,Tn,xe){"use strict";xe.d(Tn,{Z:function(){return lt}});var ye=xe(59301),Be=xe(96536),gt=xe(77596),zt=xe(93772),tt=xe(14179),ht=xe(56102),Te={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Dt=xe(8591),pt=xe(11611),_e=xe(13058),It=xe(30084),mt=xe(10787),Gt=xe(50304),De=xe(83251),te=Object.defineProperty,ne=Object.defineProperties,he=Object.getOwnPropertyDescriptors,le=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,me=Object.prototype.propertyIsEnumerable,Pe=(Ke,rt,Ge)=>rt in Ke?te(Ke,rt,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Ke[rt]=Ge,Ne=(Ke,rt)=>{for(var Ge in rt||(rt={}))ge.call(rt,Ge)&&Pe(Ke,Ge,rt[Ge]);if(le)for(var Ge of le(rt))me.call(rt,Ge)&&Pe(Ke,Ge,rt[Ge]);return Ke},we=(Ke,rt)=>ne(Ke,he(rt)),ze=(Ke,rt)=>{var Ge={};for(var Tt in Ke)ge.call(Ke,Tt)&&rt.indexOf(Tt)<0&&(Ge[Tt]=Ke[Tt]);if(Ke!=null&&le)for(var Tt of le(Ke))rt.indexOf(Tt)<0&&me.call(Ke,Tt)&&(Ge[Tt]=Ke[Tt]);return Ge},lt=({onFinish:Ke,value:rt,streamingStatus:Ge,cancelIndex:Tt,loadImage:St,onDynamic:Yt})=>{const[en,Jt]=(0,ye.useState)(""),[bn,yn]=(0,ye.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Ct,$e]=(0,ye.useState)(0),[an,si]=(0,ye.useState)(!1),Jn=Un=>Un.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(li,Nn)=>`<mathx data-text="${Nn.trim()}">$$${Nn.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Nt=()=>{si(!0),Ke==null||Ke()};(0,ye.useEffect)(()=>{const Un=St?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${rt}`:rt,li=Jn(Un);if(!an)if(St||!Ge||Tt>0){Jt(li),$e(li.length),(!Ge||Tt>0)&&!St&&Nt();return}else if((li==null?void 0:li.length)<4)Jt(li),$e(li.length);else if(Ct<li.length){const Nn=li.length-Ct,Ii=setInterval(()=>{Jt(li.slice(0,Ct+2)),$e(yt=>yt+2)},Nn>10?Math.max(500/(Nn/2),20):50);return()=>clearInterval(Ii)}else Ge||Nt()},[rt,Ge,Tt,St,Ct]);const kn=(0,ye.useMemo)(()=>ye.createElement("section",{className:`${Te.answer} fadeIn animated edu_md`},ye.createElement(Be.UG,{remarkPlugins:[It.Z,mt.Z],rehypePlugins:[_e.Z,zt.Z],components:{code(Un){var li=Un,{node:Nn,inline:Ii,className:yt,children:ti}=li,oi=ze(li,["node","inline","className","children"]);const Re=/language-(\w+)/.exec(yt||""),Le=String(ti).trim();return Ii||!Re?ye.createElement("code",Ne({className:yt},oi),ti):ye.createElement("code",{className:Te.codeCopy,"data-text":`\`\`\`${Re?Re[1]:""}
${ti}

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function fe({open:Dt=!0,onChange:et,defaultValue:nt,placement:ht,width:lt,height:gt,extra:vt,onDynamic:Pt,showExtra:bt=!0}){const Tt=(0,mt.useRef)(null),zt=(0,mt.useRef)(null),[$t,he]=(0,mt.useState)(nt||""),[Jt,pe]=(0,mt.useState)(nt||""),[Zt,Ze]=(0,mt.useState)(!!Dt),[ve,Ue]=(0,mt.useState)(1),De={selectOnLineNumbers:!0};(0,mt.useEffect)(()=>{Dt&&(he(nt),pe(nt),Ze(!0))},[Dt,nt]),(0,mt.useEffect)(()=>{$t!==""&&(clearTimeout(zt.current),zt.current=setTimeout(()=>{const Cn=document.createElement("iframe");if(Cn.style.width="100%",Cn.style.height="100%",Cn.style.border="0",Tt.current){Tt.current.innerHTML="",Tt.current.appendChild(Cn);const En=Cn.contentDocument||Cn.contentWindow.document;En.open(),En.write($t),En.close()}},1e3))},[Dt,$t]);const _e=Cn=>{he(Cn),et==null||et(Cn,Jt)};return ge.createElement(_t.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Zt,width:bt?700:"100%",height:gt||"100vh",rootClassName:Xt.smartWrp,destroyOnClose:!0,onClose:()=>Ze(!1),extra:bt&&ge.createElement("div",null,ge.createElement(kt.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:ve,onChange:Cn=>Ue(Cn)}),ge.createElement(be.Z,{type:"primary",className:"ml20",onClick:()=>Vt(this,null,function*(){yield Pt($t,()=>{Ze(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},ge.createElement(re.Z,{className:"h100"},ge.createElement(Ie.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:ve===1?"block":"none"}},ge.createElement("div",{className:"h100",ref:Tt})),ge.createElement(Ie.Z,{flex:"1",style:{display:ve===2?"block":"none"}},ge.createElement(ae.ZP,{height:"90vh",value:nt,language:"html",theme:"vs",showMiniMap:!1,options:De,onChange:_e}))))}var We=fe},43276:function(pn,An,Ct){"use strict";Ct.d(An,{Z:function(){return he}});var mt=Ct(59301),_t=Ct(96536),re=Ct(77596),Ie=Ct(93772),Xt=Ct(14179),ae=Ct(56102),kt={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},be=Ct(8591),ge=Ct(11611),Vt=Ct(35328),Ne=Ct(30084),fe=Ct(10787),We=Ct(50304),Dt=Ct(83251),et=Object.defineProperty,nt=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable,Pt=(Jt,pe,Zt)=>pe in Jt?et(Jt,pe,{enumerable:!0,configurable:!0,writable:!0,value:Zt}):Jt[pe]=Zt,bt=(Jt,pe)=>{for(var Zt in pe||(pe={}))gt.call(pe,Zt)&&Pt(Jt,Zt,pe[Zt]);if(lt)for(var Zt of lt(pe))vt.call(pe,Zt)&&Pt(Jt,Zt,pe[Zt]);return Jt},Tt=(Jt,pe)=>nt(Jt,ht(pe)),zt=(Jt,pe)=>{var Zt={};for(var Ze in Jt)gt.call(Jt,Ze)&&pe.indexOf(Ze)<0&&(Zt[Ze]=Jt[Ze]);if(Jt!=null&&lt)for(var Ze of lt(Jt))pe.indexOf(Ze)<0&&vt.call(Jt,Ze)&&(Zt[Ze]=Jt[Ze]);return Zt},he=({onFinish:Jt,value:pe,streamingStatus:Zt,cancelIndex:Ze,loadImage:ve,onDynamic:Ue})=>{const[De,_e]=(0,mt.useState)(""),[Cn,En]=(0,mt.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[qt,Bt]=(0,mt.useState)(0),[Te,$e]=(0,mt.useState)(!1),mn=Tn=>Tn.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Un,nn)=>`<mathx data-text="${nn.trim()}">$$${nn.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Me=()=>{$e(!0),Jt==null||Jt()};(0,mt.useEffect)(()=>{const Tn=ve?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function fe({open:Dt=!0,onChange:et,defaultValue:nt,placement:ht,width:lt,height:gt,extra:vt,onDynamic:Pt,showExtra:bt=!0}){const Tt=(0,mt.useRef)(null),zt=(0,mt.useRef)(null),[$t,he]=(0,mt.useState)(nt||""),[Jt,pe]=(0,mt.useState)(nt||""),[Zt,Ze]=(0,mt.useState)(!!Dt),[ve,Ue]=(0,mt.useState)(1),De={selectOnLineNumbers:!0};(0,mt.useEffect)(()=>{Dt&&(he(nt),pe(nt),Ze(!0))},[Dt,nt]),(0,mt.useEffect)(()=>{$t!==""&&(clearTimeout(zt.current),zt.current=setTimeout(()=>{const Cn=document.createElement("iframe");if(Cn.style.width="100%",Cn.style.height="100%",Cn.style.border="0",Tt.current){Tt.current.innerHTML="",Tt.current.appendChild(Cn);const En=Cn.contentDocument||Cn.contentWindow.document;En.open(),En.write($t),En.close()}},1e3))},[Dt,$t]);const _e=Cn=>{he(Cn),et==null||et(Cn,Jt)};return ge.createElement(_t.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Zt,width:bt?700:"100%",height:gt||"100vh",rootClassName:Xt.smartWrp,destroyOnClose:!0,onClose:()=>Ze(!1),extra:bt&&ge.createElement("div",null,ge.createElement(kt.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:ve,onChange:Cn=>Ue(Cn)}),ge.createElement(be.Z,{type:"primary",className:"ml20",onClick:()=>Vt(this,null,function*(){yield Pt($t,()=>{Ze(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},ge.createElement(re.Z,{className:"h100"},ge.createElement(Ie.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:ve===1?"block":"none"}},ge.createElement("div",{className:"h100",ref:Tt})),ge.createElement(Ie.Z,{flex:"1",style:{display:ve===2?"block":"none"}},ge.createElement(ae.ZP,{height:"90vh",value:nt,language:"html",theme:"vs",showMiniMap:!1,options:De,onChange:_e}))))}var We=fe},43276:function(pn,An,Ct){"use strict";Ct.d(An,{Z:function(){return he}});var mt=Ct(59301),_t=Ct(96536),re=Ct(77596),Ie=Ct(93772),Xt=Ct(14179),ae=Ct(56102),kt={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},be=Ct(8591),ge=Ct(11611),Vt=Ct(13058),Ne=Ct(30084),fe=Ct(10787),We=Ct(50304),Dt=Ct(83251),et=Object.defineProperty,nt=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable,Pt=(Jt,pe,Zt)=>pe in Jt?et(Jt,pe,{enumerable:!0,configurable:!0,writable:!0,value:Zt}):Jt[pe]=Zt,bt=(Jt,pe)=>{for(var Zt in pe||(pe={}))gt.call(pe,Zt)&&Pt(Jt,Zt,pe[Zt]);if(lt)for(var Zt of lt(pe))vt.call(pe,Zt)&&Pt(Jt,Zt,pe[Zt]);return Jt},Tt=(Jt,pe)=>nt(Jt,ht(pe)),zt=(Jt,pe)=>{var Zt={};for(var Ze in Jt)gt.call(Jt,Ze)&&pe.indexOf(Ze)<0&&(Zt[Ze]=Jt[Ze]);if(Jt!=null&&lt)for(var Ze of lt(Jt))pe.indexOf(Ze)<0&&vt.call(Jt,Ze)&&(Zt[Ze]=Jt[Ze]);return Zt},he=({onFinish:Jt,value:pe,streamingStatus:Zt,cancelIndex:Ze,loadImage:ve,onDynamic:Ue})=>{const[De,_e]=(0,mt.useState)(""),[Cn,En]=(0,mt.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[qt,Bt]=(0,mt.useState)(0),[Te,$e]=(0,mt.useState)(!1),mn=Tn=>Tn.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Un,nn)=>`<mathx data-text="${nn.trim()}">$$${nn.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Me=()=>{$e(!0),Jt==null||Jt()};(0,mt.useEffect)(()=>{const Tn=ve?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${pe}`:pe,Un=mn(Tn);if(!Te)if(ve||!Zt||Ze>0){_e(Un),Bt(Un.length),(!Zt||Ze>0)&&!ve&&Me();return}else if((Un==null?void 0:Un.length)<4)_e(Un),Bt(Un.length);else if(qt<Un.length){const nn=Un.length-qt,Hn=setInterval(()=>{_e(Un.slice(0,qt+2)),Bt(Le=>Le+2)},nn>10?Math.max(500/(nn/2),20):50);return()=>clearInterval(Hn)}else Zt||Me()},[pe,Zt,Ze,ve,qt]);const en=(0,mt.useMemo)(()=>mt.createElement("section",{className:`${kt.answer} fadeIn animated edu_md`},mt.createElement(_t.UG,{remarkPlugins:[Ne.Z,fe.Z],rehypePlugins:[Vt.Z,Ie.Z],components:{code(Tn){var Un=Tn,{node:nn,inline:Hn,className:Le,children:Qn}=Un,xi=zt(Un,["node","inline","className","children"]);const Ot=/language-(\w+)/.exec(Le||""),Lt=String(Qn).trim();return Hn||!Ot?mt.createElement("code",bt({className:Le},xi),Qn):mt.createElement("code",{className:kt.codeCopy,"data-text":`\`\`\`${Ot?Ot[1]:""}
${Qn}

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function ve({open:oe=!0,onChange:a,defaultValue:E,placement:x,width:y,height:z,extra:ee,onDynamic:te,showExtra:ae=!0}){const ie=(0,b.useRef)(null),re=(0,b.useRef)(null),[le,pe]=(0,b.useState)(E||""),[fe,ye]=(0,b.useState)(E||""),[me,ue]=(0,b.useState)(!!oe),[Ye,we]=(0,b.useState)(1),Fe={selectOnLineNumbers:!0};(0,b.useEffect)(()=>{oe&&(pe(E),ye(E),ue(!0))},[oe,E]),(0,b.useEffect)(()=>{le!==""&&(clearTimeout(re.current),re.current=setTimeout(()=>{const be=document.createElement("iframe");if(be.style.width="100%",be.style.height="100%",be.style.border="0",ie.current){ie.current.innerHTML="",ie.current.appendChild(be);const je=be.contentDocument||be.contentWindow.document;je.open(),je.write(le),je.close()}},1e3))},[oe,le]);const Le=be=>{pe(be),a==null||a(be,fe)};return ce.createElement(he.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:me,width:ae?700:"100%",height:z||"100vh",rootClassName:de.smartWrp,destroyOnClose:!0,onClose:()=>ue(!1),extra:ae&&ce.createElement("div",null,ce.createElement(se.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:Ye,onChange:be=>we(be)}),ce.createElement(Ee.Z,{type:"primary",className:"ml20",onClick:()=>Ae(this,null,function*(){yield te(le,()=>{ue(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},ce.createElement(xe.Z,{className:"h100"},ce.createElement(Ce.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:Ye===1?"block":"none"}},ce.createElement("div",{className:"h100",ref:ie})),ce.createElement(Ce.Z,{flex:"1",style:{display:Ye===2?"block":"none"}},ce.createElement(ge.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:Fe,onChange:Le}))))}var Oe=ve},43276:function(Qe,Te,ne){"use strict";ne.d(Te,{Z:function(){return pe}});var b=ne(59301),he=ne(96536),xe=ne(77596),Ce=ne(93772),de=ne(14179),ge=ne(56102),se={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Ee=ne(8591),ce=ne(11611),Ae=ne(35328),Be=ne(30084),ve=ne(10787),Oe=ne(50304),oe=ne(83251),a=Object.defineProperty,E=Object.defineProperties,x=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,te=(fe,ye,me)=>ye in fe?a(fe,ye,{enumerable:!0,configurable:!0,writable:!0,value:me}):fe[ye]=me,ae=(fe,ye)=>{for(var me in ye||(ye={}))z.call(ye,me)&&te(fe,me,ye[me]);if(y)for(var me of y(ye))ee.call(ye,me)&&te(fe,me,ye[me]);return fe},ie=(fe,ye)=>E(fe,x(ye)),re=(fe,ye)=>{var me={};for(var ue in fe)z.call(fe,ue)&&ye.indexOf(ue)<0&&(me[ue]=fe[ue]);if(fe!=null&&y)for(var ue of y(fe))ye.indexOf(ue)<0&&ee.call(fe,ue)&&(me[ue]=fe[ue]);return me},pe=({onFinish:fe,value:ye,streamingStatus:me,cancelIndex:ue,loadImage:Ye,onDynamic:we})=>{const[Fe,Le]=(0,b.useState)(""),[be,je]=(0,b.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Ue,Ke]=(0,b.useState)(0),[at,mt]=(0,b.useState)(!1),ft=qe=>qe.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Xe,_e)=>`<mathx data-text="${_e.trim()}">$$${_e.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),De=()=>{mt(!0),fe==null||fe()};(0,b.useEffect)(()=>{const qe=Ye?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function ve({open:oe=!0,onChange:a,defaultValue:E,placement:x,width:y,height:z,extra:ee,onDynamic:te,showExtra:ae=!0}){const ie=(0,b.useRef)(null),re=(0,b.useRef)(null),[le,pe]=(0,b.useState)(E||""),[fe,ye]=(0,b.useState)(E||""),[me,ue]=(0,b.useState)(!!oe),[Ye,we]=(0,b.useState)(1),Fe={selectOnLineNumbers:!0};(0,b.useEffect)(()=>{oe&&(pe(E),ye(E),ue(!0))},[oe,E]),(0,b.useEffect)(()=>{le!==""&&(clearTimeout(re.current),re.current=setTimeout(()=>{const be=document.createElement("iframe");if(be.style.width="100%",be.style.height="100%",be.style.border="0",ie.current){ie.current.innerHTML="",ie.current.appendChild(be);const je=be.contentDocument||be.contentWindow.document;je.open(),je.write(le),je.close()}},1e3))},[oe,le]);const Le=be=>{pe(be),a==null||a(be,fe)};return ce.createElement(he.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:me,width:ae?700:"100%",height:z||"100vh",rootClassName:de.smartWrp,destroyOnClose:!0,onClose:()=>ue(!1),extra:ae&&ce.createElement("div",null,ce.createElement(se.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:Ye,onChange:be=>we(be)}),ce.createElement(Ee.Z,{type:"primary",className:"ml20",onClick:()=>Ae(this,null,function*(){yield te(le,()=>{ue(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},ce.createElement(xe.Z,{className:"h100"},ce.createElement(Ce.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:Ye===1?"block":"none"}},ce.createElement("div",{className:"h100",ref:ie})),ce.createElement(Ce.Z,{flex:"1",style:{display:Ye===2?"block":"none"}},ce.createElement(ge.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:Fe,onChange:Le}))))}var Oe=ve},43276:function(Qe,Te,ne){"use strict";ne.d(Te,{Z:function(){return pe}});var b=ne(59301),he=ne(96536),xe=ne(77596),Ce=ne(93772),de=ne(14179),ge=ne(56102),se={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Ee=ne(8591),ce=ne(11611),Ae=ne(13058),Be=ne(30084),ve=ne(10787),Oe=ne(50304),oe=ne(83251),a=Object.defineProperty,E=Object.defineProperties,x=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,te=(fe,ye,me)=>ye in fe?a(fe,ye,{enumerable:!0,configurable:!0,writable:!0,value:me}):fe[ye]=me,ae=(fe,ye)=>{for(var me in ye||(ye={}))z.call(ye,me)&&te(fe,me,ye[me]);if(y)for(var me of y(ye))ee.call(ye,me)&&te(fe,me,ye[me]);return fe},ie=(fe,ye)=>E(fe,x(ye)),re=(fe,ye)=>{var me={};for(var ue in fe)z.call(fe,ue)&&ye.indexOf(ue)<0&&(me[ue]=fe[ue]);if(fe!=null&&y)for(var ue of y(fe))ye.indexOf(ue)<0&&ee.call(fe,ue)&&(me[ue]=fe[ue]);return me},pe=({onFinish:fe,value:ye,streamingStatus:me,cancelIndex:ue,loadImage:Ye,onDynamic:we})=>{const[Fe,Le]=(0,b.useState)(""),[be,je]=(0,b.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Ue,Ke]=(0,b.useState)(0),[at,mt]=(0,b.useState)(!1),ft=qe=>qe.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Xe,_e)=>`<mathx data-text="${_e.trim()}">$$${_e.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),De=()=>{mt(!0),fe==null||fe()};(0,b.useEffect)(()=>{const qe=Ye?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${ye}`:ye,Xe=ft(qe);if(!at)if(Ye||!me||ue>0){Le(Xe),Ke(Xe.length),(!me||ue>0)&&!Ye&&De();return}else if((Xe==null?void 0:Xe.length)<4)Le(Xe),Ke(Xe.length);else if(Ue<Xe.length){const _e=Xe.length-Ue,lt=setInterval(()=>{Le(Xe.slice(0,Ue+2)),Ke(Se=>Se+2)},_e>10?Math.max(500/(_e/2),20):50);return()=>clearInterval(lt)}else me||De()},[ye,me,ue,Ye,Ue]);const We=(0,b.useMemo)(()=>b.createElement("section",{className:`${se.answer} fadeIn animated edu_md`},b.createElement(he.UG,{remarkPlugins:[Be.Z,ve.Z],rehypePlugins:[Ae.Z,Ce.Z],components:{code(qe){var Xe=qe,{node:_e,inline:lt,className:Se,children:$e}=Xe,ct=re(Xe,["node","inline","className","children"]);const Re=/language-(\w+)/.exec(Se||""),ze=String($e).trim();return lt||!Re?b.createElement("code",ae({className:Se},ct),$e):b.createElement("code",{className:se.codeCopy,"data-text":`\`\`\`${Re?Re[1]:""}
${$e}

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function Ze({open:oe=!0,onChange:E,defaultValue:y,placement:x,width:b,height:z,extra:te,onDynamic:ae,showExtra:ge=!0}){const me=(0,a.useRef)(null),de=(0,a.useRef)(null),[fe,Se]=(0,a.useState)(y||""),[Pe,Qe]=(0,a.useState)(y||""),[Ue,Ye]=(0,a.useState)(!!oe),[Ke,_e]=(0,a.useState)(1),ke={selectOnLineNumbers:!0};(0,a.useEffect)(()=>{oe&&(Se(y),Qe(y),Ye(!0))},[oe,y]),(0,a.useEffect)(()=>{fe!==""&&(clearTimeout(de.current),de.current=setTimeout(()=>{const st=document.createElement("iframe");if(st.style.width="100%",st.style.height="100%",st.style.border="0",me.current){me.current.innerHTML="",me.current.appendChild(st);const ut=st.contentDocument||st.contentWindow.document;ut.open(),ut.write(fe),ut.close()}},1e3))},[oe,fe]);const at=st=>{Se(st),E==null||E(st,Pe)};return Ce.createElement(Ee.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Ue,width:ge?700:"100%",height:z||"100vh",rootClassName:Fe.smartWrp,destroyOnClose:!0,onClose:()=>Ye(!1),extra:ge&&Ce.createElement("div",null,Ce.createElement(Ae.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:Ke,onChange:st=>_e(st)}),Ce.createElement(Ie.Z,{type:"primary",className:"ml20",onClick:()=>xe(this,null,function*(){yield ae(fe,()=>{Ye(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},Ce.createElement(je.Z,{className:"h100"},Ce.createElement(he.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:Ke===1?"block":"none"}},Ce.createElement("div",{className:"h100",ref:me})),Ce.createElement(he.Z,{flex:"1",style:{display:Ke===2?"block":"none"}},Ce.createElement(De.ZP,{height:"90vh",value:y,language:"html",theme:"vs",showMiniMap:!1,options:ke,onChange:at}))))}var we=Ze},43276:function(Bt,ot,ee){"use strict";ee.d(ot,{Z:function(){return Se}});var a=ee(59301),Ee=ee(96536),je=ee(77596),he=ee(93772),Fe=ee(14179),De=ee(56102),Ae={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Ie=ee(8591),Ce=ee(11611),xe=ee(35328),Re=ee(30084),Ze=ee(10787),we=ee(50304),oe=ee(83251),E=Object.defineProperty,y=Object.defineProperties,x=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,ae=(Pe,Qe,Ue)=>Qe in Pe?E(Pe,Qe,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):Pe[Qe]=Ue,ge=(Pe,Qe)=>{for(var Ue in Qe||(Qe={}))z.call(Qe,Ue)&&ae(Pe,Ue,Qe[Ue]);if(b)for(var Ue of b(Qe))te.call(Qe,Ue)&&ae(Pe,Ue,Qe[Ue]);return Pe},me=(Pe,Qe)=>y(Pe,x(Qe)),de=(Pe,Qe)=>{var Ue={};for(var Ye in Pe)z.call(Pe,Ye)&&Qe.indexOf(Ye)<0&&(Ue[Ye]=Pe[Ye]);if(Pe!=null&&b)for(var Ye of b(Pe))Qe.indexOf(Ye)<0&&te.call(Pe,Ye)&&(Ue[Ye]=Pe[Ye]);return Ue},Se=({onFinish:Pe,value:Qe,streamingStatus:Ue,cancelIndex:Ye,loadImage:Ke,onDynamic:_e})=>{const[ke,at]=(0,a.useState)(""),[st,ut]=(0,a.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[lt,Pt]=(0,a.useState)(0),[qt,Dt]=(0,a.useState)(!1),At=St=>St.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Lt,Kt)=>`<mathx data-text="${Kt.trim()}">$$${Kt.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Ge=()=>{Dt(!0),Pe==null||Pe()};(0,a.useEffect)(()=>{const St=Ke?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function Ze({open:oe=!0,onChange:E,defaultValue:y,placement:x,width:b,height:z,extra:te,onDynamic:ae,showExtra:ge=!0}){const me=(0,a.useRef)(null),de=(0,a.useRef)(null),[fe,Se]=(0,a.useState)(y||""),[Pe,Qe]=(0,a.useState)(y||""),[Ue,Ye]=(0,a.useState)(!!oe),[Ke,_e]=(0,a.useState)(1),ke={selectOnLineNumbers:!0};(0,a.useEffect)(()=>{oe&&(Se(y),Qe(y),Ye(!0))},[oe,y]),(0,a.useEffect)(()=>{fe!==""&&(clearTimeout(de.current),de.current=setTimeout(()=>{const st=document.createElement("iframe");if(st.style.width="100%",st.style.height="100%",st.style.border="0",me.current){me.current.innerHTML="",me.current.appendChild(st);const ut=st.contentDocument||st.contentWindow.document;ut.open(),ut.write(fe),ut.close()}},1e3))},[oe,fe]);const at=st=>{Se(st),E==null||E(st,Pe)};return Ce.createElement(Ee.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Ue,width:ge?700:"100%",height:z||"100vh",rootClassName:Fe.smartWrp,destroyOnClose:!0,onClose:()=>Ye(!1),extra:ge&&Ce.createElement("div",null,Ce.createElement(Ae.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:Ke,onChange:st=>_e(st)}),Ce.createElement(Ie.Z,{type:"primary",className:"ml20",onClick:()=>xe(this,null,function*(){yield ae(fe,()=>{Ye(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},Ce.createElement(je.Z,{className:"h100"},Ce.createElement(he.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:Ke===1?"block":"none"}},Ce.createElement("div",{className:"h100",ref:me})),Ce.createElement(he.Z,{flex:"1",style:{display:Ke===2?"block":"none"}},Ce.createElement(De.ZP,{height:"90vh",value:y,language:"html",theme:"vs",showMiniMap:!1,options:ke,onChange:at}))))}var we=Ze},43276:function(Bt,ot,ee){"use strict";ee.d(ot,{Z:function(){return Se}});var a=ee(59301),Ee=ee(96536),je=ee(77596),he=ee(93772),Fe=ee(14179),De=ee(56102),Ae={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Ie=ee(8591),Ce=ee(11611),xe=ee(13058),Re=ee(30084),Ze=ee(10787),we=ee(50304),oe=ee(83251),E=Object.defineProperty,y=Object.defineProperties,x=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,ae=(Pe,Qe,Ue)=>Qe in Pe?E(Pe,Qe,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):Pe[Qe]=Ue,ge=(Pe,Qe)=>{for(var Ue in Qe||(Qe={}))z.call(Qe,Ue)&&ae(Pe,Ue,Qe[Ue]);if(b)for(var Ue of b(Qe))te.call(Qe,Ue)&&ae(Pe,Ue,Qe[Ue]);return Pe},me=(Pe,Qe)=>y(Pe,x(Qe)),de=(Pe,Qe)=>{var Ue={};for(var Ye in Pe)z.call(Pe,Ye)&&Qe.indexOf(Ye)<0&&(Ue[Ye]=Pe[Ye]);if(Pe!=null&&b)for(var Ye of b(Pe))Qe.indexOf(Ye)<0&&te.call(Pe,Ye)&&(Ue[Ye]=Pe[Ye]);return Ue},Se=({onFinish:Pe,value:Qe,streamingStatus:Ue,cancelIndex:Ye,loadImage:Ke,onDynamic:_e})=>{const[ke,at]=(0,a.useState)(""),[st,ut]=(0,a.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[lt,Pt]=(0,a.useState)(0),[qt,Dt]=(0,a.useState)(!1),At=St=>St.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Lt,Kt)=>`<mathx data-text="${Kt.trim()}">$$${Kt.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Ge=()=>{Dt(!0),Pe==null||Pe()};(0,a.useEffect)(()=>{const St=Ke?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${Qe}`:Qe,Lt=At(St);if(!qt)if(Ke||!Ue||Ye>0){at(Lt),Pt(Lt.length),(!Ue||Ye>0)&&!Ke&&Ge();return}else if((Lt==null?void 0:Lt.length)<4)at(Lt),Pt(Lt.length);else if(lt<Lt.length){const Kt=Lt.length-lt,mn=setInterval(()=>{at(Lt.slice(0,lt+2)),Pt(Me=>Me+2)},Kt>10?Math.max(500/(Kt/2),20):50);return()=>clearInterval(mn)}else Ue||Ge()},[Qe,Ue,Ye,Ke,lt]);const Et=(0,a.useMemo)(()=>a.createElement("section",{className:`${Ae.answer} fadeIn animated edu_md`},a.createElement(Ee.UG,{remarkPlugins:[Re.Z,Ze.Z],rehypePlugins:[xe.Z,he.Z],components:{code(St){var Lt=St,{node:Kt,inline:mn,className:Me,children:Zt}=Lt,Nn=de(Lt,["node","inline","className","children"]);const ft=/language-(\w+)/.exec(Me||""),Ct=String(Zt).trim();return mn||!ft?a.createElement("code",ge({className:Me},Nn),Zt):a.createElement("code",{className:Ae.codeCopy,"data-text":`\`\`\`${ft?ft[1]:""}
${Zt}

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function Ze({open:oe=!0,onChange:a,defaultValue:E,placement:x,width:y,height:z,extra:b,onDynamic:te,showExtra:ae=!0}){const ie=(0,ee.useRef)(null),re=(0,ee.useRef)(null),[ge,Ae]=(0,ee.useState)(E||""),[se,de]=(0,ee.useState)(E||""),[ue,ce]=(0,ee.useState)(!!oe),[Qe,Le]=(0,ee.useState)(1),je={selectOnLineNumbers:!0};(0,ee.useEffect)(()=>{oe&&(Ae(E),de(E),ce(!0))},[oe,E]),(0,ee.useEffect)(()=>{ge!==""&&(clearTimeout(re.current),re.current=setTimeout(()=>{const be=document.createElement("iframe");if(be.style.width="100%",be.style.height="100%",be.style.border="0",ie.current){ie.current.innerHTML="",ie.current.appendChild(be);const Ie=be.contentDocument||be.contentWindow.document;Ie.open(),Ie.write(ge),Ie.close()}},1e3))},[oe,ge]);const We=be=>{Ae(be),a==null||a(be,se)};return fe.createElement(Ce.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:ue,width:ae?700:"100%",height:z||"100vh",rootClassName:me.smartWrp,destroyOnClose:!0,onClose:()=>ce(!1),extra:ae&&fe.createElement("div",null,fe.createElement(Se.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:Qe,onChange:be=>Le(be)}),fe.createElement(we.Z,{type:"primary",className:"ml20",onClick:()=>le(this,null,function*(){yield te(ge,()=>{ce(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},fe.createElement(Oe.Z,{className:"h100"},fe.createElement(ye.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:Qe===1?"block":"none"}},fe.createElement("div",{className:"h100",ref:ie})),fe.createElement(ye.Z,{flex:"1",style:{display:Qe===2?"block":"none"}},fe.createElement(Ee.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:je,onChange:We}))))}var ze=Ze},43276:function(Ue,gt,ne){"use strict";ne.d(gt,{Z:function(){return Ae}});var ee=ne(59301),Ce=ne(96536),Oe=ne(77596),ye=ne(93772),me=ne(14179),Ee=ne(56102),Se={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},we=ne(8591),fe=ne(11611),le=ne(35328),Ne=ne(30084),Ze=ne(10787),ze=ne(50304),oe=ne(83251),a=Object.defineProperty,E=Object.defineProperties,x=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,te=(se,de,ue)=>de in se?a(se,de,{enumerable:!0,configurable:!0,writable:!0,value:ue}):se[de]=ue,ae=(se,de)=>{for(var ue in de||(de={}))z.call(de,ue)&&te(se,ue,de[ue]);if(y)for(var ue of y(de))b.call(de,ue)&&te(se,ue,de[ue]);return se},ie=(se,de)=>E(se,x(de)),re=(se,de)=>{var ue={};for(var ce in se)z.call(se,ce)&&de.indexOf(ce)<0&&(ue[ce]=se[ce]);if(se!=null&&y)for(var ce of y(se))de.indexOf(ce)<0&&b.call(se,ce)&&(ue[ce]=se[ce]);return ue},Ae=({onFinish:se,value:de,streamingStatus:ue,cancelIndex:ce,loadImage:Qe,onDynamic:Le})=>{const[je,We]=(0,ee.useState)(""),[be,Ie]=(0,ee.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Pe,Fe]=(0,ee.useState)(0),[Ge,tt]=(0,ee.useState)(!1),lt=qe=>qe.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Ve,Ye)=>`<mathx data-text="${Ye.trim()}">$$${Ye.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),pe=()=>{tt(!0),se==null||se()};(0,ee.useEffect)(()=>{const qe=Qe?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function Ze({open:oe=!0,onChange:a,defaultValue:E,placement:x,width:y,height:z,extra:b,onDynamic:te,showExtra:ae=!0}){const ie=(0,ee.useRef)(null),re=(0,ee.useRef)(null),[ge,Ae]=(0,ee.useState)(E||""),[se,de]=(0,ee.useState)(E||""),[ue,ce]=(0,ee.useState)(!!oe),[Qe,Le]=(0,ee.useState)(1),je={selectOnLineNumbers:!0};(0,ee.useEffect)(()=>{oe&&(Ae(E),de(E),ce(!0))},[oe,E]),(0,ee.useEffect)(()=>{ge!==""&&(clearTimeout(re.current),re.current=setTimeout(()=>{const be=document.createElement("iframe");if(be.style.width="100%",be.style.height="100%",be.style.border="0",ie.current){ie.current.innerHTML="",ie.current.appendChild(be);const Ie=be.contentDocument||be.contentWindow.document;Ie.open(),Ie.write(ge),Ie.close()}},1e3))},[oe,ge]);const We=be=>{Ae(be),a==null||a(be,se)};return fe.createElement(Ce.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:ue,width:ae?700:"100%",height:z||"100vh",rootClassName:me.smartWrp,destroyOnClose:!0,onClose:()=>ce(!1),extra:ae&&fe.createElement("div",null,fe.createElement(Se.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:Qe,onChange:be=>Le(be)}),fe.createElement(we.Z,{type:"primary",className:"ml20",onClick:()=>le(this,null,function*(){yield te(ge,()=>{ce(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},fe.createElement(Oe.Z,{className:"h100"},fe.createElement(ye.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:Qe===1?"block":"none"}},fe.createElement("div",{className:"h100",ref:ie})),fe.createElement(ye.Z,{flex:"1",style:{display:Qe===2?"block":"none"}},fe.createElement(Ee.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:je,onChange:We}))))}var ze=Ze},43276:function(Ue,gt,ne){"use strict";ne.d(gt,{Z:function(){return Ae}});var ee=ne(59301),Ce=ne(96536),Oe=ne(77596),ye=ne(93772),me=ne(14179),Ee=ne(56102),Se={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},we=ne(8591),fe=ne(11611),le=ne(13058),Ne=ne(30084),Ze=ne(10787),ze=ne(50304),oe=ne(83251),a=Object.defineProperty,E=Object.defineProperties,x=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,te=(se,de,ue)=>de in se?a(se,de,{enumerable:!0,configurable:!0,writable:!0,value:ue}):se[de]=ue,ae=(se,de)=>{for(var ue in de||(de={}))z.call(de,ue)&&te(se,ue,de[ue]);if(y)for(var ue of y(de))b.call(de,ue)&&te(se,ue,de[ue]);return se},ie=(se,de)=>E(se,x(de)),re=(se,de)=>{var ue={};for(var ce in se)z.call(se,ce)&&de.indexOf(ce)<0&&(ue[ce]=se[ce]);if(se!=null&&y)for(var ce of y(se))de.indexOf(ce)<0&&b.call(se,ce)&&(ue[ce]=se[ce]);return ue},Ae=({onFinish:se,value:de,streamingStatus:ue,cancelIndex:ce,loadImage:Qe,onDynamic:Le})=>{const[je,We]=(0,ee.useState)(""),[be,Ie]=(0,ee.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Pe,Fe]=(0,ee.useState)(0),[Ge,tt]=(0,ee.useState)(!1),lt=qe=>qe.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Ve,Ye)=>`<mathx data-text="${Ye.trim()}">$$${Ye.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),pe=()=>{tt(!0),se==null||se()};(0,ee.useEffect)(()=>{const qe=Qe?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${de}`:de,Ve=lt(qe);if(!Ge)if(Qe||!ue||ce>0){We(Ve),Fe(Ve.length),(!ue||ce>0)&&!Qe&&pe();return}else if((Ve==null?void 0:Ve.length)<4)We(Ve),Fe(Ve.length);else if(Pe<Ve.length){const Ye=Ve.length-Pe,Et=setInterval(()=>{We(Ve.slice(0,Pe+2)),Fe(ve=>ve+2)},Ye>10?Math.max(500/(Ye/2),20):50);return()=>clearInterval(Et)}else ue||pe()},[de,ue,ce,Qe,Pe]);const Re=(0,ee.useMemo)(()=>ee.createElement("section",{className:`${Se.answer} fadeIn animated edu_md`},ee.createElement(Ce.UG,{remarkPlugins:[Ne.Z,Ze.Z],rehypePlugins:[le.Z,ye.Z],components:{code(qe){var Ve=qe,{node:Ye,inline:Et,className:ve,children:$e}=Ve,ht=re(Ve,["node","inline","className","children"]);const Xe=/language-(\w+)/.exec(ve||""),Me=String($e).trim();return Et||!Xe?ee.createElement("code",ae({className:ve},ht),$e):ee.createElement("code",{className:Se.codeCopy,"data-text":`\`\`\`${Xe?Xe[1]:""}
${$e}

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function Fe({open:ge=!0,onChange:a,defaultValue:E,placement:b,width:y,height:x,extra:ee,onDynamic:oe,showExtra:he=!0}){const Se=(0,z.useRef)(null),ve=(0,z.useRef)(null),[Le,We]=(0,z.useState)(E||""),[Ne,De]=(0,z.useState)(E||""),[Oe,At]=(0,z.useState)(!!ge),[ct,dt]=(0,z.useState)(1),_e={selectOnLineNumbers:!0};(0,z.useEffect)(()=>{ge&&(We(E),De(E),At(!0))},[ge,E]),(0,z.useEffect)(()=>{Le!==""&&(clearTimeout(ve.current),ve.current=setTimeout(()=>{const it=document.createElement("iframe");if(it.style.width="100%",it.style.height="100%",it.style.border="0",Se.current){Se.current.innerHTML="",Se.current.appendChild(it);const $e=it.contentDocument||it.contentWindow.document;$e.open(),$e.write(Le),$e.close()}},1e3))},[ge,Le]);const et=it=>{We(it),a==null||a(it,Ne)};return Pe.createElement(Ze.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Oe,width:he?700:"100%",height:x||"100vh",rootClassName:Te.smartWrp,destroyOnClose:!0,onClose:()=>At(!1),extra:he&&Pe.createElement("div",null,Pe.createElement(je.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:ct,onChange:it=>dt(it)}),Pe.createElement(Ie.Z,{type:"primary",className:"ml20",onClick:()=>me(this,null,function*(){yield oe(Le,()=>{At(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},Pe.createElement(Je.Z,{className:"h100"},Pe.createElement(Xe.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:ct===1?"block":"none"}},Pe.createElement("div",{className:"h100",ref:Se})),Pe.createElement(Xe.Z,{flex:"1",style:{display:ct===2?"block":"none"}},Pe.createElement(Ke.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:_e,onChange:et}))))}var Ue=Fe},43276:function(Dt,Ct,le){"use strict";le.d(Ct,{Z:function(){return We}});var z=le(59301),Ze=le(96536),Je=le(77596),Xe=le(93772),Te=le(14179),Ke=le(56102),je={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Ie=le(8591),Pe=le(11611),me=le(35328),Qe=le(30084),Fe=le(10787),Ue=le(50304),ge=le(83251),a=Object.defineProperty,E=Object.defineProperties,b=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,oe=(Ne,De,Oe)=>De in Ne?a(Ne,De,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):Ne[De]=Oe,he=(Ne,De)=>{for(var Oe in De||(De={}))x.call(De,Oe)&&oe(Ne,Oe,De[Oe]);if(y)for(var Oe of y(De))ee.call(De,Oe)&&oe(Ne,Oe,De[Oe]);return Ne},Se=(Ne,De)=>E(Ne,b(De)),ve=(Ne,De)=>{var Oe={};for(var At in Ne)x.call(Ne,At)&&De.indexOf(At)<0&&(Oe[At]=Ne[At]);if(Ne!=null&&y)for(var At of y(Ne))De.indexOf(At)<0&&ee.call(Ne,At)&&(Oe[At]=Ne[At]);return Oe},We=({onFinish:Ne,value:De,streamingStatus:Oe,cancelIndex:At,loadImage:ct,onDynamic:dt})=>{const[_e,et]=(0,z.useState)(""),[it,$e]=(0,z.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Ve,gt]=(0,z.useState)(0),[bt,Ft]=(0,z.useState)(!1),ln=tn=>tn.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Xt,pn)=>`<mathx data-text="${pn.trim()}">$$${pn.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),ut=()=>{Ft(!0),Ne==null||Ne()};(0,z.useEffect)(()=>{const tn=ct?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function Fe({open:ge=!0,onChange:a,defaultValue:E,placement:b,width:y,height:x,extra:ee,onDynamic:oe,showExtra:he=!0}){const Se=(0,z.useRef)(null),ve=(0,z.useRef)(null),[Le,We]=(0,z.useState)(E||""),[Ne,De]=(0,z.useState)(E||""),[Oe,At]=(0,z.useState)(!!ge),[ct,dt]=(0,z.useState)(1),_e={selectOnLineNumbers:!0};(0,z.useEffect)(()=>{ge&&(We(E),De(E),At(!0))},[ge,E]),(0,z.useEffect)(()=>{Le!==""&&(clearTimeout(ve.current),ve.current=setTimeout(()=>{const it=document.createElement("iframe");if(it.style.width="100%",it.style.height="100%",it.style.border="0",Se.current){Se.current.innerHTML="",Se.current.appendChild(it);const $e=it.contentDocument||it.contentWindow.document;$e.open(),$e.write(Le),$e.close()}},1e3))},[ge,Le]);const et=it=>{We(it),a==null||a(it,Ne)};return Pe.createElement(Ze.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Oe,width:he?700:"100%",height:x||"100vh",rootClassName:Te.smartWrp,destroyOnClose:!0,onClose:()=>At(!1),extra:he&&Pe.createElement("div",null,Pe.createElement(je.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:ct,onChange:it=>dt(it)}),Pe.createElement(Ie.Z,{type:"primary",className:"ml20",onClick:()=>me(this,null,function*(){yield oe(Le,()=>{At(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},Pe.createElement(Je.Z,{className:"h100"},Pe.createElement(Xe.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:ct===1?"block":"none"}},Pe.createElement("div",{className:"h100",ref:Se})),Pe.createElement(Xe.Z,{flex:"1",style:{display:ct===2?"block":"none"}},Pe.createElement(Ke.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:_e,onChange:et}))))}var Ue=Fe},43276:function(Dt,Ct,le){"use strict";le.d(Ct,{Z:function(){return We}});var z=le(59301),Ze=le(96536),Je=le(77596),Xe=le(93772),Te=le(14179),Ke=le(56102),je={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Ie=le(8591),Pe=le(11611),me=le(13058),Qe=le(30084),Fe=le(10787),Ue=le(50304),ge=le(83251),a=Object.defineProperty,E=Object.defineProperties,b=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,oe=(Ne,De,Oe)=>De in Ne?a(Ne,De,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):Ne[De]=Oe,he=(Ne,De)=>{for(var Oe in De||(De={}))x.call(De,Oe)&&oe(Ne,Oe,De[Oe]);if(y)for(var Oe of y(De))ee.call(De,Oe)&&oe(Ne,Oe,De[Oe]);return Ne},Se=(Ne,De)=>E(Ne,b(De)),ve=(Ne,De)=>{var Oe={};for(var At in Ne)x.call(Ne,At)&&De.indexOf(At)<0&&(Oe[At]=Ne[At]);if(Ne!=null&&y)for(var At of y(Ne))De.indexOf(At)<0&&ee.call(Ne,At)&&(Oe[At]=Ne[At]);return Oe},We=({onFinish:Ne,value:De,streamingStatus:Oe,cancelIndex:At,loadImage:ct,onDynamic:dt})=>{const[_e,et]=(0,z.useState)(""),[it,$e]=(0,z.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Ve,gt]=(0,z.useState)(0),[bt,Ft]=(0,z.useState)(!1),ln=tn=>tn.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Xt,pn)=>`<mathx data-text="${pn.trim()}">$$${pn.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),ut=()=>{Ft(!0),Ne==null||Ne()};(0,z.useEffect)(()=>{const tn=ct?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${De}`:De,Xt=ln(tn);if(!bt)if(ct||!Oe||At>0){et(Xt),gt(Xt.length),(!Oe||At>0)&&!ct&&ut();return}else if((Xt==null?void 0:Xt.length)<4)et(Xt),gt(Xt.length);else if(Ve<Xt.length){const pn=Xt.length-Ve,zn=setInterval(()=>{et(Xt.slice(0,Ve+2)),gt(Ye=>Ye+2)},pn>10?Math.max(500/(pn/2),20):50);return()=>clearInterval(zn)}else Oe||ut()},[De,Oe,At,ct,Ve]);const Tt=(0,z.useMemo)(()=>z.createElement("section",{className:`${je.answer} fadeIn animated edu_md`},z.createElement(Ze.UG,{remarkPlugins:[Qe.Z,Fe.Z],rehypePlugins:[me.Z,Xe.Z],components:{code(tn){var Xt=tn,{node:pn,inline:zn,className:Ye,children:gn}=Xt,Yn=ve(Xt,["node","inline","className","children"]);const ft=/language-(\w+)/.exec(Ye||""),Pt=String(gn).trim();return zn||!ft?z.createElement("code",he({className:Ye},Yn),gn):z.createElement("code",{className:je.codeCopy,"data-text":`\`\`\`${ft?ft[1]:""}
${gn}

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function je({open:oe=!0,onChange:a,defaultValue:E,placement:x,width:y,height:b,extra:z,onDynamic:te,showExtra:ae=!0}){const ie=(0,ee.useRef)(null),re=(0,ee.useRef)(null),[le,pe]=(0,ee.useState)(E||""),[se,Be]=(0,ee.useState)(E||""),[de,Ce]=(0,ee.useState)(!!oe),[at,Ue]=(0,ee.useState)(1),Se={selectOnLineNumbers:!0};(0,ee.useEffect)(()=>{oe&&(pe(E),Be(E),Ce(!0))},[oe,E]),(0,ee.useEffect)(()=>{le!==""&&(clearTimeout(re.current),re.current=setTimeout(()=>{const et=document.createElement("iframe");if(et.style.width="100%",et.style.height="100%",et.style.border="0",ie.current){ie.current.innerHTML="",ie.current.appendChild(et);const Ve=et.contentDocument||et.contentWindow.document;Ve.open(),Ve.write(le),Ve.close()}},1e3))},[oe,le]);const qe=et=>{pe(et),a==null||a(et,se)};return he.createElement(Ae.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:de,width:ae?700:"100%",height:b||"100vh",rootClassName:fe.smartWrp,destroyOnClose:!0,onClose:()=>Ce(!1),extra:ae&&he.createElement("div",null,he.createElement(ge.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:at,onChange:et=>Ue(et)}),he.createElement(ye.Z,{type:"primary",className:"ml20",onClick:()=>ve(this,null,function*(){yield te(le,()=>{Ce(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},he.createElement(ke.Z,{className:"h100"},he.createElement(Ee.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:at===1?"block":"none"}},he.createElement("div",{className:"h100",ref:ie})),he.createElement(Ee.Z,{flex:"1",style:{display:at===2?"block":"none"}},he.createElement(Pe.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:Se,onChange:qe}))))}var Ze=je},43276:function(Te,gt,ne){"use strict";ne.d(gt,{Z:function(){return pe}});var ee=ne(59301),Ae=ne(96536),ke=ne(77596),Ee=ne(93772),fe=ne(14179),Pe=ne(56102),ge={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},ye=ne(8591),he=ne(11611),ve=ne(35328),Ye=ne(30084),je=ne(10787),Ze=ne(50304),oe=ne(83251),a=Object.defineProperty,E=Object.defineProperties,x=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,te=(se,Be,de)=>Be in se?a(se,Be,{enumerable:!0,configurable:!0,writable:!0,value:de}):se[Be]=de,ae=(se,Be)=>{for(var de in Be||(Be={}))b.call(Be,de)&&te(se,de,Be[de]);if(y)for(var de of y(Be))z.call(Be,de)&&te(se,de,Be[de]);return se},ie=(se,Be)=>E(se,x(Be)),re=(se,Be)=>{var de={};for(var Ce in se)b.call(se,Ce)&&Be.indexOf(Ce)<0&&(de[Ce]=se[Ce]);if(se!=null&&y)for(var Ce of y(se))Be.indexOf(Ce)<0&&z.call(se,Ce)&&(de[Ce]=se[Ce]);return de},pe=({onFinish:se,value:Be,streamingStatus:de,cancelIndex:Ce,loadImage:at,onDynamic:Ue})=>{const[Se,qe]=(0,ee.useState)(""),[et,Ve]=(0,ee.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[$e,Je]=(0,ee.useState)(0),[He,nt]=(0,ee.useState)(!1),Xe=We=>We.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(De,tt)=>`<mathx data-text="${tt.trim()}">$$${tt.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),ce=()=>{nt(!0),se==null||se()};(0,ee.useEffect)(()=>{const We=at?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function je({open:oe=!0,onChange:a,defaultValue:E,placement:x,width:y,height:b,extra:z,onDynamic:te,showExtra:ae=!0}){const ie=(0,ee.useRef)(null),re=(0,ee.useRef)(null),[le,pe]=(0,ee.useState)(E||""),[se,Be]=(0,ee.useState)(E||""),[de,Ce]=(0,ee.useState)(!!oe),[at,Ue]=(0,ee.useState)(1),Se={selectOnLineNumbers:!0};(0,ee.useEffect)(()=>{oe&&(pe(E),Be(E),Ce(!0))},[oe,E]),(0,ee.useEffect)(()=>{le!==""&&(clearTimeout(re.current),re.current=setTimeout(()=>{const et=document.createElement("iframe");if(et.style.width="100%",et.style.height="100%",et.style.border="0",ie.current){ie.current.innerHTML="",ie.current.appendChild(et);const Ve=et.contentDocument||et.contentWindow.document;Ve.open(),Ve.write(le),Ve.close()}},1e3))},[oe,le]);const qe=et=>{pe(et),a==null||a(et,se)};return he.createElement(Ae.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:de,width:ae?700:"100%",height:b||"100vh",rootClassName:fe.smartWrp,destroyOnClose:!0,onClose:()=>Ce(!1),extra:ae&&he.createElement("div",null,he.createElement(ge.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:at,onChange:et=>Ue(et)}),he.createElement(ye.Z,{type:"primary",className:"ml20",onClick:()=>ve(this,null,function*(){yield te(le,()=>{Ce(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},he.createElement(ke.Z,{className:"h100"},he.createElement(Ee.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:at===1?"block":"none"}},he.createElement("div",{className:"h100",ref:ie})),he.createElement(Ee.Z,{flex:"1",style:{display:at===2?"block":"none"}},he.createElement(Pe.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:Se,onChange:qe}))))}var Ze=je},43276:function(Te,gt,ne){"use strict";ne.d(gt,{Z:function(){return pe}});var ee=ne(59301),Ae=ne(96536),ke=ne(77596),Ee=ne(93772),fe=ne(14179),Pe=ne(56102),ge={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},ye=ne(8591),he=ne(11611),ve=ne(13058),Ye=ne(30084),je=ne(10787),Ze=ne(50304),oe=ne(83251),a=Object.defineProperty,E=Object.defineProperties,x=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,te=(se,Be,de)=>Be in se?a(se,Be,{enumerable:!0,configurable:!0,writable:!0,value:de}):se[Be]=de,ae=(se,Be)=>{for(var de in Be||(Be={}))b.call(Be,de)&&te(se,de,Be[de]);if(y)for(var de of y(Be))z.call(Be,de)&&te(se,de,Be[de]);return se},ie=(se,Be)=>E(se,x(Be)),re=(se,Be)=>{var de={};for(var Ce in se)b.call(se,Ce)&&Be.indexOf(Ce)<0&&(de[Ce]=se[Ce]);if(se!=null&&y)for(var Ce of y(se))Be.indexOf(Ce)<0&&z.call(se,Ce)&&(de[Ce]=se[Ce]);return de},pe=({onFinish:se,value:Be,streamingStatus:de,cancelIndex:Ce,loadImage:at,onDynamic:Ue})=>{const[Se,qe]=(0,ee.useState)(""),[et,Ve]=(0,ee.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[$e,Je]=(0,ee.useState)(0),[He,nt]=(0,ee.useState)(!1),Xe=We=>We.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(De,tt)=>`<mathx data-text="${tt.trim()}">$$${tt.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),ce=()=>{nt(!0),se==null||se()};(0,ee.useEffect)(()=>{const We=at?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${Be}`:Be,De=Xe(We);if(!He)if(at||!de||Ce>0){qe(De),Je(De.length),(!de||Ce>0)&&!at&&ce();return}else if((De==null?void 0:De.length)<4)qe(De),Je(De.length);else if($e<De.length){const tt=De.length-$e,ct=setInterval(()=>{qe(De.slice(0,$e+2)),Je(ue=>ue+2)},tt>10?Math.max(500/(tt/2),20):50);return()=>clearInterval(ct)}else de||ce()},[Be,de,Ce,at,$e]);const Ie=(0,ee.useMemo)(()=>ee.createElement("section",{className:`${ge.answer} fadeIn animated edu_md`},ee.createElement(Ae.UG,{remarkPlugins:[Ye.Z,je.Z],rehypePlugins:[ve.Z,Ee.Z],components:{code(We){var De=We,{node:tt,inline:ct,className:ue,children:it}=De,Mt=re(De,["node","inline","className","children"]);const Qe=/language-(\w+)/.exec(ue||""),Re=String(it).trim();return ct||!Qe?ee.createElement("code",ae({className:ue},Mt),it):ee.createElement("code",{className:ge.codeCopy,"data-text":`\`\`\`${Qe?Qe[1]:""}
${it}

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function Pe({open:ie=!0,onChange:a,defaultValue:y,placement:b,width:E,height:x,extra:z,onDynamic:oe,showExtra:me=!0}){const Ie=(0,ne.useRef)(null),be=(0,ne.useRef)(null),[ze,Ve]=(0,ne.useState)(y||""),[He,ot]=(0,ne.useState)(y||""),[Te,nt]=(0,ne.useState)(!!ie),[De,lt]=(0,ne.useState)(1),st={selectOnLineNumbers:!0};(0,ne.useEffect)(()=>{ie&&(Ve(y),ot(y),nt(!0))},[ie,y]),(0,ne.useEffect)(()=>{ze!==""&&(clearTimeout(be.current),be.current=setTimeout(()=>{const vt=document.createElement("iframe");if(vt.style.width="100%",vt.style.height="100%",vt.style.border="0",Ie.current){Ie.current.innerHTML="",Ie.current.appendChild(vt);const Ye=vt.contentDocument||vt.contentWindow.document;Ye.open(),Ye.write(ze),Ye.close()}},1e3))},[ie,ze]);const qe=vt=>{Ve(vt),a==null||a(vt,He)};return Fe.createElement(Et.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Te,width:me?700:"100%",height:x||"100vh",rootClassName:je.smartWrp,destroyOnClose:!0,onClose:()=>nt(!1),extra:me&&Fe.createElement("div",null,Fe.createElement(Oe.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:De,onChange:vt=>lt(vt)}),Fe.createElement(he.Z,{type:"primary",className:"ml20",onClick:()=>le(this,null,function*(){yield oe(ze,()=>{nt(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},Fe.createElement(Ke.Z,{className:"h100"},Fe.createElement(et.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:De===1?"block":"none"}},Fe.createElement("div",{className:"h100",ref:Ie})),Fe.createElement(et.Z,{flex:"1",style:{display:De===2?"block":"none"}},Fe.createElement(ke.ZP,{height:"90vh",value:y,language:"html",theme:"vs",showMiniMap:!1,options:st,onChange:qe}))))}var Le=Pe},43276:function(tn,Cn,ve){"use strict";ve.d(Cn,{Z:function(){return Ve}});var ne=ve(59301),Et=ve(96536),Ke=ve(77596),et=ve(93772),je=ve(14179),ke=ve(56102),Oe={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},he=ve(8591),Fe=ve(11611),le=ve(35328),Ue=ve(30084),Pe=ve(10787),Le=ve(50304),ie=ve(83251),a=Object.defineProperty,y=Object.defineProperties,b=Object.getOwnPropertyDescriptors,E=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,oe=(He,ot,Te)=>ot in He?a(He,ot,{enumerable:!0,configurable:!0,writable:!0,value:Te}):He[ot]=Te,me=(He,ot)=>{for(var Te in ot||(ot={}))x.call(ot,Te)&&oe(He,Te,ot[Te]);if(E)for(var Te of E(ot))z.call(ot,Te)&&oe(He,Te,ot[Te]);return He},Ie=(He,ot)=>y(He,b(ot)),be=(He,ot)=>{var Te={};for(var nt in He)x.call(He,nt)&&ot.indexOf(nt)<0&&(Te[nt]=He[nt]);if(He!=null&&E)for(var nt of E(He))ot.indexOf(nt)<0&&z.call(He,nt)&&(Te[nt]=He[nt]);return Te},Ve=({onFinish:He,value:ot,streamingStatus:Te,cancelIndex:nt,loadImage:De,onDynamic:lt})=>{const[st,qe]=(0,ne.useState)(""),[vt,Ye]=(0,ne.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[tt,Ze]=(0,ne.useState)(0),[rt,Ot]=(0,ne.useState)(!1),zt=qt=>qt.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Lt,rn)=>`<mathx data-text="${rn.trim()}">$$${rn.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),ht=()=>{Ot(!0),He==null||He()};(0,ne.useEffect)(()=>{const qt=De?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function Pe({open:ie=!0,onChange:a,defaultValue:y,placement:b,width:E,height:x,extra:z,onDynamic:oe,showExtra:me=!0}){const Ie=(0,ne.useRef)(null),be=(0,ne.useRef)(null),[ze,Ve]=(0,ne.useState)(y||""),[He,ot]=(0,ne.useState)(y||""),[Te,nt]=(0,ne.useState)(!!ie),[De,lt]=(0,ne.useState)(1),st={selectOnLineNumbers:!0};(0,ne.useEffect)(()=>{ie&&(Ve(y),ot(y),nt(!0))},[ie,y]),(0,ne.useEffect)(()=>{ze!==""&&(clearTimeout(be.current),be.current=setTimeout(()=>{const vt=document.createElement("iframe");if(vt.style.width="100%",vt.style.height="100%",vt.style.border="0",Ie.current){Ie.current.innerHTML="",Ie.current.appendChild(vt);const Ye=vt.contentDocument||vt.contentWindow.document;Ye.open(),Ye.write(ze),Ye.close()}},1e3))},[ie,ze]);const qe=vt=>{Ve(vt),a==null||a(vt,He)};return Fe.createElement(Et.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Te,width:me?700:"100%",height:x||"100vh",rootClassName:je.smartWrp,destroyOnClose:!0,onClose:()=>nt(!1),extra:me&&Fe.createElement("div",null,Fe.createElement(Oe.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:De,onChange:vt=>lt(vt)}),Fe.createElement(he.Z,{type:"primary",className:"ml20",onClick:()=>le(this,null,function*(){yield oe(ze,()=>{nt(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},Fe.createElement(Ke.Z,{className:"h100"},Fe.createElement(et.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:De===1?"block":"none"}},Fe.createElement("div",{className:"h100",ref:Ie})),Fe.createElement(et.Z,{flex:"1",style:{display:De===2?"block":"none"}},Fe.createElement(ke.ZP,{height:"90vh",value:y,language:"html",theme:"vs",showMiniMap:!1,options:st,onChange:qe}))))}var Le=Pe},43276:function(tn,Cn,ve){"use strict";ve.d(Cn,{Z:function(){return Ve}});var ne=ve(59301),Et=ve(96536),Ke=ve(77596),et=ve(93772),je=ve(14179),ke=ve(56102),Oe={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},he=ve(8591),Fe=ve(11611),le=ve(13058),Ue=ve(30084),Pe=ve(10787),Le=ve(50304),ie=ve(83251),a=Object.defineProperty,y=Object.defineProperties,b=Object.getOwnPropertyDescriptors,E=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,oe=(He,ot,Te)=>ot in He?a(He,ot,{enumerable:!0,configurable:!0,writable:!0,value:Te}):He[ot]=Te,me=(He,ot)=>{for(var Te in ot||(ot={}))x.call(ot,Te)&&oe(He,Te,ot[Te]);if(E)for(var Te of E(ot))z.call(ot,Te)&&oe(He,Te,ot[Te]);return He},Ie=(He,ot)=>y(He,b(ot)),be=(He,ot)=>{var Te={};for(var nt in He)x.call(He,nt)&&ot.indexOf(nt)<0&&(Te[nt]=He[nt]);if(He!=null&&E)for(var nt of E(He))ot.indexOf(nt)<0&&z.call(He,nt)&&(Te[nt]=He[nt]);return Te},Ve=({onFinish:He,value:ot,streamingStatus:Te,cancelIndex:nt,loadImage:De,onDynamic:lt})=>{const[st,qe]=(0,ne.useState)(""),[vt,Ye]=(0,ne.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[tt,Ze]=(0,ne.useState)(0),[rt,Ot]=(0,ne.useState)(!1),zt=qt=>qt.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Lt,rn)=>`<mathx data-text="${rn.trim()}">$$${rn.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),ht=()=>{Ot(!0),He==null||He()};(0,ne.useEffect)(()=>{const qt=De?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${ot}`:ot,Lt=zt(qt);if(!rt)if(De||!Te||nt>0){qe(Lt),Ze(Lt.length),(!Te||nt>0)&&!De&&ht();return}else if((Lt==null?void 0:Lt.length)<4)qe(Lt),Ze(Lt.length);else if(tt<Lt.length){const rn=Lt.length-tt,bn=setInterval(()=>{qe(Lt.slice(0,tt+2)),Ze(pt=>pt+2)},rn>10?Math.max(500/(rn/2),20):50);return()=>clearInterval(bn)}else Te||ht()},[ot,Te,nt,De,tt]);const jt=(0,ne.useMemo)(()=>ne.createElement("section",{className:`${Oe.answer} fadeIn animated edu_md`},ne.createElement(Et.UG,{remarkPlugins:[Ue.Z,Pe.Z],rehypePlugins:[le.Z,et.Z],components:{code(qt){var Lt=qt,{node:rn,inline:bn,className:pt,children:fn}=Lt,Dn=be(Lt,["node","inline","className","children"]);const fe=/language-(\w+)/.exec(pt||""),gt=String(fn).trim();return bn||!fe?ne.createElement("code",me({className:pt},Dn),fn):ne.createElement("code",{className:Oe.codeCopy,"data-text":`\`\`\`${fe?fe[1]:""}
${fn}

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function Ne({open:oe=!0,onChange:a,defaultValue:E,placement:x,width:y,height:b,extra:z,onDynamic:te,showExtra:ne=!0}){const ie=(0,ee.useRef)(null),re=(0,ee.useRef)(null),[le,ce]=(0,ee.useState)(E||""),[ge,Ee]=(0,ee.useState)(E||""),[se,Be]=(0,ee.useState)(!!oe),[et,Me]=(0,ee.useState)(1),Ge={selectOnLineNumbers:!0};(0,ee.useEffect)(()=>{oe&&(ce(E),Ee(E),Be(!0))},[oe,E]),(0,ee.useEffect)(()=>{le!==""&&(clearTimeout(re.current),re.current=setTimeout(()=>{const Je=document.createElement("iframe");if(Je.style.width="100%",Je.style.height="100%",Je.style.border="0",ie.current){ie.current.innerHTML="",ie.current.appendChild(Je);const Re=Je.contentDocument||Je.contentWindow.document;Re.open(),Re.write(le),Re.close()}},1e3))},[oe,le]);const qe=Je=>{ce(Je),a==null||a(Je,ge)};return ve.createElement(ye.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:se,width:ne?700:"100%",height:b||"100vh",rootClassName:fe.smartWrp,destroyOnClose:!0,onClose:()=>Be(!1),extra:ne&&ve.createElement("div",null,ve.createElement(de.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:et,onChange:Je=>Me(Je)}),ve.createElement(we.Z,{type:"primary",className:"ml20",onClick:()=>pe(this,null,function*(){yield te(le,()=>{Be(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},ve.createElement(De.Z,{className:"h100"},ve.createElement(Pe.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:et===1?"block":"none"}},ve.createElement("div",{className:"h100",ref:ie})),ve.createElement(Pe.Z,{flex:"1",style:{display:et===2?"block":"none"}},ve.createElement(Se.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:Ge,onChange:qe}))))}var Ke=Ne},43276:function(Ce,nt,ae){"use strict";ae.d(nt,{Z:function(){return ce}});var ee=ae(59301),ye=ae(96536),De=ae(77596),Pe=ae(93772),fe=ae(14179),Se=ae(56102),de={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},we=ae(8591),ve=ae(11611),pe=ae(35328),Te=ae(30084),Ne=ae(10787),Ke=ae(50304),oe=ae(83251),a=Object.defineProperty,E=Object.defineProperties,x=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,te=(ge,Ee,se)=>Ee in ge?a(ge,Ee,{enumerable:!0,configurable:!0,writable:!0,value:se}):ge[Ee]=se,ne=(ge,Ee)=>{for(var se in Ee||(Ee={}))b.call(Ee,se)&&te(ge,se,Ee[se]);if(y)for(var se of y(Ee))z.call(Ee,se)&&te(ge,se,Ee[se]);return ge},ie=(ge,Ee)=>E(ge,x(Ee)),re=(ge,Ee)=>{var se={};for(var Be in ge)b.call(ge,Be)&&Ee.indexOf(Be)<0&&(se[Be]=ge[Be]);if(ge!=null&&y)for(var Be of y(ge))Ee.indexOf(Be)<0&&z.call(ge,Be)&&(se[Be]=ge[Be]);return se},ce=({onFinish:ge,value:Ee,streamingStatus:se,cancelIndex:Be,loadImage:et,onDynamic:Me})=>{const[Ge,qe]=(0,ee.useState)(""),[Je,Re]=(0,ee.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Ve,Ue]=(0,ee.useState)(0),[_e,rt]=(0,ee.useState)(!1),at=We=>We.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Ie,tt)=>`<mathx data-text="${tt.trim()}">$$${tt.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),he=()=>{rt(!0),ge==null||ge()};(0,ee.useEffect)(()=>{const We=et?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function Ne({open:oe=!0,onChange:a,defaultValue:E,placement:x,width:y,height:b,extra:z,onDynamic:te,showExtra:ne=!0}){const ie=(0,ee.useRef)(null),re=(0,ee.useRef)(null),[le,ce]=(0,ee.useState)(E||""),[ge,Ee]=(0,ee.useState)(E||""),[se,Be]=(0,ee.useState)(!!oe),[et,Me]=(0,ee.useState)(1),Ge={selectOnLineNumbers:!0};(0,ee.useEffect)(()=>{oe&&(ce(E),Ee(E),Be(!0))},[oe,E]),(0,ee.useEffect)(()=>{le!==""&&(clearTimeout(re.current),re.current=setTimeout(()=>{const Je=document.createElement("iframe");if(Je.style.width="100%",Je.style.height="100%",Je.style.border="0",ie.current){ie.current.innerHTML="",ie.current.appendChild(Je);const Re=Je.contentDocument||Je.contentWindow.document;Re.open(),Re.write(le),Re.close()}},1e3))},[oe,le]);const qe=Je=>{ce(Je),a==null||a(Je,ge)};return ve.createElement(ye.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:se,width:ne?700:"100%",height:b||"100vh",rootClassName:fe.smartWrp,destroyOnClose:!0,onClose:()=>Be(!1),extra:ne&&ve.createElement("div",null,ve.createElement(de.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:et,onChange:Je=>Me(Je)}),ve.createElement(we.Z,{type:"primary",className:"ml20",onClick:()=>pe(this,null,function*(){yield te(le,()=>{Be(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},ve.createElement(De.Z,{className:"h100"},ve.createElement(Pe.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:et===1?"block":"none"}},ve.createElement("div",{className:"h100",ref:ie})),ve.createElement(Pe.Z,{flex:"1",style:{display:et===2?"block":"none"}},ve.createElement(Se.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:Ge,onChange:qe}))))}var Ke=Ne},43276:function(Ce,nt,ae){"use strict";ae.d(nt,{Z:function(){return ce}});var ee=ae(59301),ye=ae(96536),De=ae(77596),Pe=ae(93772),fe=ae(14179),Se=ae(56102),de={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},we=ae(8591),ve=ae(11611),pe=ae(13058),Te=ae(30084),Ne=ae(10787),Ke=ae(50304),oe=ae(83251),a=Object.defineProperty,E=Object.defineProperties,x=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,te=(ge,Ee,se)=>Ee in ge?a(ge,Ee,{enumerable:!0,configurable:!0,writable:!0,value:se}):ge[Ee]=se,ne=(ge,Ee)=>{for(var se in Ee||(Ee={}))b.call(Ee,se)&&te(ge,se,Ee[se]);if(y)for(var se of y(Ee))z.call(Ee,se)&&te(ge,se,Ee[se]);return ge},ie=(ge,Ee)=>E(ge,x(Ee)),re=(ge,Ee)=>{var se={};for(var Be in ge)b.call(ge,Be)&&Ee.indexOf(Be)<0&&(se[Be]=ge[Be]);if(ge!=null&&y)for(var Be of y(ge))Ee.indexOf(Be)<0&&z.call(ge,Be)&&(se[Be]=ge[Be]);return se},ce=({onFinish:ge,value:Ee,streamingStatus:se,cancelIndex:Be,loadImage:et,onDynamic:Me})=>{const[Ge,qe]=(0,ee.useState)(""),[Je,Re]=(0,ee.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Ve,Ue]=(0,ee.useState)(0),[_e,rt]=(0,ee.useState)(!1),at=We=>We.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Ie,tt)=>`<mathx data-text="${tt.trim()}">$$${tt.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),he=()=>{rt(!0),ge==null||ge()};(0,ee.useEffect)(()=>{const We=et?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${Ee}`:Ee,Ie=at(We);if(!_e)if(et||!se||Be>0){qe(Ie),Ue(Ie.length),(!se||Be>0)&&!et&&he();return}else if((Ie==null?void 0:Ie.length)<4)qe(Ie),Ue(Ie.length);else if(Ve<Ie.length){const tt=Ie.length-Ve,Et=setInterval(()=>{qe(Ie.slice(0,Ve+2)),Ue(ue=>ue+2)},tt>10?Math.max(500/(tt/2),20):50);return()=>clearInterval(Et)}else se||he()},[Ee,se,Be,et,Ve]);const be=(0,ee.useMemo)(()=>ee.createElement("section",{className:`${de.answer} fadeIn animated edu_md`},ee.createElement(ye.UG,{remarkPlugins:[Te.Z,Ne.Z],rehypePlugins:[pe.Z,Pe.Z],components:{code(We){var Ie=We,{node:tt,inline:Et,className:ue,children:ot}=Ie,Lt=re(Ie,["node","inline","className","children"]);const Ze=/language-(\w+)/.exec(ue||""),Le=String(ot).trim();return Et||!Ze?ee.createElement("code",ne({className:ue},Lt),ot):ee.createElement("code",{className:de.codeCopy,"data-text":`\`\`\`${Ze?Ze[1]:""}
${ot}

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function Ie({open:oe=!0,onChange:a,defaultValue:E,placement:x,width:y,height:b,extra:z,onDynamic:te,showExtra:ne=!0}){const ie=(0,ee.useRef)(null),re=(0,ee.useRef)(null),[le,me]=(0,ee.useState)(E||""),[ge,Ee]=(0,ee.useState)(E||""),[se,we]=(0,ee.useState)(!!oe),[et,Me]=(0,ee.useState)(1),je={selectOnLineNumbers:!0};(0,ee.useEffect)(()=>{oe&&(me(E),Ee(E),we(!0))},[oe,E]),(0,ee.useEffect)(()=>{le!==""&&(clearTimeout(re.current),re.current=setTimeout(()=>{const Xe=document.createElement("iframe");if(Xe.style.width="100%",Xe.style.height="100%",Xe.style.border="0",ie.current){ie.current.innerHTML="",ie.current.appendChild(Xe);const Ue=Xe.contentDocument||Xe.contentWindow.document;Ue.open(),Ue.write(le),Ue.close()}},1e3))},[oe,le]);const qe=Xe=>{me(Xe),a==null||a(Xe,ge)};return ve.createElement(Fe.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:se,width:ne?700:"100%",height:b||"100vh",rootClassName:fe.smartWrp,destroyOnClose:!0,onClose:()=>we(!1),extra:ne&&ve.createElement("div",null,ve.createElement(de.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:et,onChange:Xe=>Me(Xe)}),ve.createElement(Be.Z,{type:"primary",className:"ml20",onClick:()=>pe(this,null,function*(){yield te(le,()=>{we(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},ve.createElement(De.Z,{className:"h100"},ve.createElement(Pe.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:et===1?"block":"none"}},ve.createElement("div",{className:"h100",ref:ie})),ve.createElement(Pe.Z,{flex:"1",style:{display:et===2?"block":"none"}},ve.createElement(Se.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:je,onChange:qe}))))}var Je=Ie},43276:function(Ce,nt,ae){"use strict";ae.d(nt,{Z:function(){return me}});var ee=ae(59301),Fe=ae(96536),De=ae(77596),Pe=ae(93772),fe=ae(14179),Se=ae(56102),de={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Be=ae(8591),ve=ae(11611),pe=ae(35328),ze=ae(30084),Ie=ae(10787),Je=ae(50304),oe=ae(83251),a=Object.defineProperty,E=Object.defineProperties,x=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,te=(ge,Ee,se)=>Ee in ge?a(ge,Ee,{enumerable:!0,configurable:!0,writable:!0,value:se}):ge[Ee]=se,ne=(ge,Ee)=>{for(var se in Ee||(Ee={}))b.call(Ee,se)&&te(ge,se,Ee[se]);if(y)for(var se of y(Ee))z.call(Ee,se)&&te(ge,se,Ee[se]);return ge},ie=(ge,Ee)=>E(ge,x(Ee)),re=(ge,Ee)=>{var se={};for(var we in ge)b.call(ge,we)&&Ee.indexOf(we)<0&&(se[we]=ge[we]);if(ge!=null&&y)for(var we of y(ge))Ee.indexOf(we)<0&&z.call(ge,we)&&(se[we]=ge[we]);return se},me=({onFinish:ge,value:Ee,streamingStatus:se,cancelIndex:we,loadImage:et,onDynamic:Me})=>{const[je,qe]=(0,ee.useState)(""),[Xe,Ue]=(0,ee.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Ve,Ze]=(0,ee.useState)(0),[_e,rt]=(0,ee.useState)(!1),ot=We=>We.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Oe,tt)=>`<mathx data-text="${tt.trim()}">$$${tt.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),he=()=>{rt(!0),ge==null||ge()};(0,ee.useEffect)(()=>{const We=et?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function Ie({open:oe=!0,onChange:a,defaultValue:E,placement:x,width:y,height:b,extra:z,onDynamic:te,showExtra:ne=!0}){const ie=(0,ee.useRef)(null),re=(0,ee.useRef)(null),[le,me]=(0,ee.useState)(E||""),[ge,Ee]=(0,ee.useState)(E||""),[se,we]=(0,ee.useState)(!!oe),[et,Me]=(0,ee.useState)(1),je={selectOnLineNumbers:!0};(0,ee.useEffect)(()=>{oe&&(me(E),Ee(E),we(!0))},[oe,E]),(0,ee.useEffect)(()=>{le!==""&&(clearTimeout(re.current),re.current=setTimeout(()=>{const Xe=document.createElement("iframe");if(Xe.style.width="100%",Xe.style.height="100%",Xe.style.border="0",ie.current){ie.current.innerHTML="",ie.current.appendChild(Xe);const Ue=Xe.contentDocument||Xe.contentWindow.document;Ue.open(),Ue.write(le),Ue.close()}},1e3))},[oe,le]);const qe=Xe=>{me(Xe),a==null||a(Xe,ge)};return ve.createElement(Fe.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:se,width:ne?700:"100%",height:b||"100vh",rootClassName:fe.smartWrp,destroyOnClose:!0,onClose:()=>we(!1),extra:ne&&ve.createElement("div",null,ve.createElement(de.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:et,onChange:Xe=>Me(Xe)}),ve.createElement(Be.Z,{type:"primary",className:"ml20",onClick:()=>pe(this,null,function*(){yield te(le,()=>{we(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},ve.createElement(De.Z,{className:"h100"},ve.createElement(Pe.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:et===1?"block":"none"}},ve.createElement("div",{className:"h100",ref:ie})),ve.createElement(Pe.Z,{flex:"1",style:{display:et===2?"block":"none"}},ve.createElement(Se.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:je,onChange:qe}))))}var Je=Ie},43276:function(Ce,nt,ae){"use strict";ae.d(nt,{Z:function(){return me}});var ee=ae(59301),Fe=ae(96536),De=ae(77596),Pe=ae(93772),fe=ae(14179),Se=ae(56102),de={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Be=ae(8591),ve=ae(11611),pe=ae(13058),ze=ae(30084),Ie=ae(10787),Je=ae(50304),oe=ae(83251),a=Object.defineProperty,E=Object.defineProperties,x=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,te=(ge,Ee,se)=>Ee in ge?a(ge,Ee,{enumerable:!0,configurable:!0,writable:!0,value:se}):ge[Ee]=se,ne=(ge,Ee)=>{for(var se in Ee||(Ee={}))b.call(Ee,se)&&te(ge,se,Ee[se]);if(y)for(var se of y(Ee))z.call(Ee,se)&&te(ge,se,Ee[se]);return ge},ie=(ge,Ee)=>E(ge,x(Ee)),re=(ge,Ee)=>{var se={};for(var we in ge)b.call(ge,we)&&Ee.indexOf(we)<0&&(se[we]=ge[we]);if(ge!=null&&y)for(var we of y(ge))Ee.indexOf(we)<0&&z.call(ge,we)&&(se[we]=ge[we]);return se},me=({onFinish:ge,value:Ee,streamingStatus:se,cancelIndex:we,loadImage:et,onDynamic:Me})=>{const[je,qe]=(0,ee.useState)(""),[Xe,Ue]=(0,ee.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Ve,Ze]=(0,ee.useState)(0),[_e,rt]=(0,ee.useState)(!1),ot=We=>We.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Oe,tt)=>`<mathx data-text="${tt.trim()}">$$${tt.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),he=()=>{rt(!0),ge==null||ge()};(0,ee.useEffect)(()=>{const We=et?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${Ee}`:Ee,Oe=ot(We);if(!_e)if(et||!se||we>0){qe(Oe),Ze(Oe.length),(!se||we>0)&&!et&&he();return}else if((Oe==null?void 0:Oe.length)<4)qe(Oe),Ze(Oe.length);else if(Ve<Oe.length){const tt=Oe.length-Ve,Et=setInterval(()=>{qe(Oe.slice(0,Ve+2)),Ze(ue=>ue+2)},tt>10?Math.max(500/(tt/2),20):50);return()=>clearInterval(Et)}else se||he()},[Ee,se,we,et,Ve]);const Le=(0,ee.useMemo)(()=>ee.createElement("section",{className:`${de.answer} fadeIn animated edu_md`},ee.createElement(Fe.UG,{remarkPlugins:[ze.Z,Ie.Z],rehypePlugins:[pe.Z,Pe.Z],components:{code(We){var Oe=We,{node:tt,inline:Et,className:ue,children:at}=Oe,Lt=re(Oe,["node","inline","className","children"]);const Qe=/language-(\w+)/.exec(ue||""),be=String(at).trim();return Et||!Qe?ee.createElement("code",ne({className:ue},Lt),at):ee.createElement("code",{className:de.codeCopy,"data-text":`\`\`\`${Qe?Qe[1]:""}
${at}

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function Le({open:oe=!0,onChange:a,defaultValue:E,placement:x,width:b,height:z,extra:ee,onDynamic:ne,showExtra:ae=!0}){const le=(0,y.useRef)(null),re=(0,y.useRef)(null),[ie,Ae]=(0,y.useState)(E||""),[de,Pe]=(0,y.useState)(E||""),[me,ge]=(0,y.useState)(!!oe),[at,Ve]=(0,y.useState)(1),pe={selectOnLineNumbers:!0};(0,y.useEffect)(()=>{oe&&(Ae(E),Pe(E),ge(!0))},[oe,E]),(0,y.useEffect)(()=>{ie!==""&&(clearTimeout(re.current),re.current=setTimeout(()=>{const je=document.createElement("iframe");if(je.style.width="100%",je.style.height="100%",je.style.border="0",le.current){le.current.innerHTML="",le.current.appendChild(je);const Me=je.contentDocument||je.contentWindow.document;Me.open(),Me.write(ie),Me.close()}},1e3))},[oe,ie]);const Ke=je=>{Ae(je),a==null||a(je,de)};return ve.createElement(ue.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:me,width:ae?700:"100%",height:z||"100vh",rootClassName:he.smartWrp,destroyOnClose:!0,onClose:()=>ge(!1),extra:ae&&ve.createElement("div",null,ve.createElement(Ee.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:at,onChange:je=>Ve(je)}),ve.createElement(ke.Z,{type:"primary",className:"ml20",onClick:()=>ce(this,null,function*(){yield ne(ie,()=>{ge(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},ve.createElement(Oe.Z,{className:"h100"},ve.createElement(fe.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:at===1?"block":"none"}},ve.createElement("div",{className:"h100",ref:le})),ve.createElement(fe.Z,{flex:"1",style:{display:at===2?"block":"none"}},ve.createElement(ye.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:pe,onChange:Ke}))))}var Ge=Le},43276:function(lt,Ct,te){"use strict";te.d(Ct,{Z:function(){return Ae}});var y=te(59301),ue=te(96536),Oe=te(77596),fe=te(93772),he=te(14179),ye=te(56102),Ee={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},ke=te(8591),ve=te(11611),ce=te(35328),we=te(30084),Le=te(10787),Ge=te(50304),oe=te(83251),a=Object.defineProperty,E=Object.defineProperties,x=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ne=(de,Pe,me)=>Pe in de?a(de,Pe,{enumerable:!0,configurable:!0,writable:!0,value:me}):de[Pe]=me,ae=(de,Pe)=>{for(var me in Pe||(Pe={}))z.call(Pe,me)&&ne(de,me,Pe[me]);if(b)for(var me of b(Pe))ee.call(Pe,me)&&ne(de,me,Pe[me]);return de},le=(de,Pe)=>E(de,x(Pe)),re=(de,Pe)=>{var me={};for(var ge in de)z.call(de,ge)&&Pe.indexOf(ge)<0&&(me[ge]=de[ge]);if(de!=null&&b)for(var ge of b(de))Pe.indexOf(ge)<0&&ee.call(de,ge)&&(me[ge]=de[ge]);return me},Ae=({onFinish:de,value:Pe,streamingStatus:me,cancelIndex:ge,loadImage:at,onDynamic:Ve})=>{const[pe,Ke]=(0,y.useState)(""),[je,Me]=(0,y.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Te,Qe]=(0,y.useState)(0),[tt,_e]=(0,y.useState)(!1),ot=Je=>Je.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(xe,ct)=>`<mathx data-text="${ct.trim()}">$$${ct.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Ce=()=>{_e(!0),de==null||de()};(0,y.useEffect)(()=>{const Je=at?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function Le({open:oe=!0,onChange:a,defaultValue:E,placement:x,width:b,height:z,extra:ee,onDynamic:ne,showExtra:ae=!0}){const le=(0,y.useRef)(null),re=(0,y.useRef)(null),[ie,Ae]=(0,y.useState)(E||""),[de,Pe]=(0,y.useState)(E||""),[me,ge]=(0,y.useState)(!!oe),[at,Ve]=(0,y.useState)(1),pe={selectOnLineNumbers:!0};(0,y.useEffect)(()=>{oe&&(Ae(E),Pe(E),ge(!0))},[oe,E]),(0,y.useEffect)(()=>{ie!==""&&(clearTimeout(re.current),re.current=setTimeout(()=>{const je=document.createElement("iframe");if(je.style.width="100%",je.style.height="100%",je.style.border="0",le.current){le.current.innerHTML="",le.current.appendChild(je);const Me=je.contentDocument||je.contentWindow.document;Me.open(),Me.write(ie),Me.close()}},1e3))},[oe,ie]);const Ke=je=>{Ae(je),a==null||a(je,de)};return ve.createElement(ue.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:me,width:ae?700:"100%",height:z||"100vh",rootClassName:he.smartWrp,destroyOnClose:!0,onClose:()=>ge(!1),extra:ae&&ve.createElement("div",null,ve.createElement(Ee.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:at,onChange:je=>Ve(je)}),ve.createElement(ke.Z,{type:"primary",className:"ml20",onClick:()=>ce(this,null,function*(){yield ne(ie,()=>{ge(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},ve.createElement(Oe.Z,{className:"h100"},ve.createElement(fe.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:at===1?"block":"none"}},ve.createElement("div",{className:"h100",ref:le})),ve.createElement(fe.Z,{flex:"1",style:{display:at===2?"block":"none"}},ve.createElement(ye.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:pe,onChange:Ke}))))}var Ge=Le},43276:function(lt,Ct,te){"use strict";te.d(Ct,{Z:function(){return Ae}});var y=te(59301),ue=te(96536),Oe=te(77596),fe=te(93772),he=te(14179),ye=te(56102),Ee={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},ke=te(8591),ve=te(11611),ce=te(13058),we=te(30084),Le=te(10787),Ge=te(50304),oe=te(83251),a=Object.defineProperty,E=Object.defineProperties,x=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ne=(de,Pe,me)=>Pe in de?a(de,Pe,{enumerable:!0,configurable:!0,writable:!0,value:me}):de[Pe]=me,ae=(de,Pe)=>{for(var me in Pe||(Pe={}))z.call(Pe,me)&&ne(de,me,Pe[me]);if(b)for(var me of b(Pe))ee.call(Pe,me)&&ne(de,me,Pe[me]);return de},le=(de,Pe)=>E(de,x(Pe)),re=(de,Pe)=>{var me={};for(var ge in de)z.call(de,ge)&&Pe.indexOf(ge)<0&&(me[ge]=de[ge]);if(de!=null&&b)for(var ge of b(de))Pe.indexOf(ge)<0&&ee.call(de,ge)&&(me[ge]=de[ge]);return me},Ae=({onFinish:de,value:Pe,streamingStatus:me,cancelIndex:ge,loadImage:at,onDynamic:Ve})=>{const[pe,Ke]=(0,y.useState)(""),[je,Me]=(0,y.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Te,Qe]=(0,y.useState)(0),[tt,_e]=(0,y.useState)(!1),ot=Je=>Je.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(xe,ct)=>`<mathx data-text="${ct.trim()}">$$${ct.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Ce=()=>{_e(!0),de==null||de()};(0,y.useEffect)(()=>{const Je=at?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${Pe}`:Pe,xe=ot(Je);if(!tt)if(at||!me||ge>0){Ke(xe),Qe(xe.length),(!me||ge>0)&&!at&&Ce();return}else if((xe==null?void 0:xe.length)<4)Ke(xe),Qe(xe.length);else if(Te<xe.length){const ct=xe.length-Te,St=setInterval(()=>{Ke(xe.slice(0,Te+2)),Qe(be=>be+2)},ct>10?Math.max(500/(ct/2),20):50);return()=>clearInterval(St)}else me||Ce()},[Pe,me,ge,at,Te]);const Fe=(0,y.useMemo)(()=>y.createElement("section",{className:`${Ee.answer} fadeIn animated edu_md`},y.createElement(ue.UG,{remarkPlugins:[we.Z,Le.Z],rehypePlugins:[ce.Z,fe.Z],components:{code(Je){var xe=Je,{node:ct,inline:St,className:be,children:it}=xe,Lt=re(xe,["node","inline","className","children"]);const Se=/language-(\w+)/.exec(be||""),Re=String(it).trim();return St||!Se?y.createElement("code",ae({className:be},Lt),it):y.createElement("code",{className:Ee.codeCopy,"data-text":`\`\`\`${Se?Se[1]:""}
${it}

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function f({open:W=!0,onChange:O,defaultValue:N,placement:Q,width:ee,height:ve,extra:Ze,onDynamic:Y,showExtra:j=!0}){const v=(0,e.useRef)(null),q=(0,e.useRef)(null),[K,Z]=(0,e.useState)(N||""),[B,S]=(0,e.useState)(N||""),[g,ne]=(0,e.useState)(!!W),[oe,Ke]=(0,e.useState)(1),I={selectOnLineNumbers:!0};(0,e.useEffect)(()=>{W&&(Z(N),S(N),ne(!0))},[W,N]),(0,e.useEffect)(()=>{K!==""&&(clearTimeout(q.current),q.current=setTimeout(()=>{const Me=document.createElement("iframe");if(Me.style.width="100%",Me.style.height="100%",Me.style.border="0",v.current){v.current.innerHTML="",v.current.appendChild(Me);const Oe=Me.contentDocument||Me.contentWindow.document;Oe.open(),Oe.write(K),Oe.close()}},1e3))},[W,K]);const ie=Me=>{Z(Me),O==null||O(Me,B)};return C.createElement(n.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:g,width:j?700:"100%",height:ve||"100vh",rootClassName:E.smartWrp,destroyOnClose:!0,onClose:()=>ne(!1),extra:j&&C.createElement("div",null,C.createElement(r.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:oe,onChange:Me=>Ke(Me)}),C.createElement(J.Z,{type:"primary",className:"ml20",onClick:()=>i(this,null,function*(){yield Y(K,()=>{ne(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},C.createElement(b.Z,{className:"h100"},C.createElement(R.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:oe===1?"block":"none"}},C.createElement("div",{className:"h100",ref:v})),C.createElement(R.Z,{flex:"1",style:{display:oe===2?"block":"none"}},C.createElement(H.ZP,{height:"90vh",value:N,language:"html",theme:"vs",showMiniMap:!1,options:I,onChange:ie}))))}var G=f},43276:function(Dt,We,t){t.d(We,{Z:function(){return Z}});var e=t(59301),n=t(96536),b=t(77596),R=t(93772),E=t(14179),H=t(56102),r={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},J=t(8591),C=t(11611),i=t(35328),D=t(30084),f=t(10787),G=t(50304),W=t(83251),O=Object.defineProperty,N=Object.defineProperties,Q=Object.getOwnPropertyDescriptors,ee=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,Y=(B,S,g)=>S in B?O(B,S,{enumerable:!0,configurable:!0,writable:!0,value:g}):B[S]=g,j=(B,S)=>{for(var g in S||(S={}))ve.call(S,g)&&Y(B,g,S[g]);if(ee)for(var g of ee(S))Ze.call(S,g)&&Y(B,g,S[g]);return B},v=(B,S)=>N(B,Q(S)),q=(B,S)=>{var g={};for(var ne in B)ve.call(B,ne)&&S.indexOf(ne)<0&&(g[ne]=B[ne]);if(B!=null&&ee)for(var ne of ee(B))S.indexOf(ne)<0&&Ze.call(B,ne)&&(g[ne]=B[ne]);return g},Z=({onFinish:B,value:S,streamingStatus:g,cancelIndex:ne,loadImage:oe,onDynamic:Ke})=>{const[I,ie]=(0,e.useState)(""),[Me,Oe]=(0,e.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[mt,Je]=(0,e.useState)(0),[Se,we]=(0,e.useState)(!1),pe=$e=>$e.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(ze,je)=>`<mathx data-text="${je.trim()}">$$${je.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Ne=()=>{we(!0),B==null||B()};(0,e.useEffect)(()=>{const $e=oe?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function f({open:W=!0,onChange:O,defaultValue:N,placement:Q,width:ee,height:ve,extra:Ze,onDynamic:Y,showExtra:j=!0}){const v=(0,e.useRef)(null),q=(0,e.useRef)(null),[K,Z]=(0,e.useState)(N||""),[B,S]=(0,e.useState)(N||""),[g,ne]=(0,e.useState)(!!W),[oe,Ke]=(0,e.useState)(1),I={selectOnLineNumbers:!0};(0,e.useEffect)(()=>{W&&(Z(N),S(N),ne(!0))},[W,N]),(0,e.useEffect)(()=>{K!==""&&(clearTimeout(q.current),q.current=setTimeout(()=>{const Me=document.createElement("iframe");if(Me.style.width="100%",Me.style.height="100%",Me.style.border="0",v.current){v.current.innerHTML="",v.current.appendChild(Me);const Oe=Me.contentDocument||Me.contentWindow.document;Oe.open(),Oe.write(K),Oe.close()}},1e3))},[W,K]);const ie=Me=>{Z(Me),O==null||O(Me,B)};return C.createElement(n.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:g,width:j?700:"100%",height:ve||"100vh",rootClassName:E.smartWrp,destroyOnClose:!0,onClose:()=>ne(!1),extra:j&&C.createElement("div",null,C.createElement(r.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:oe,onChange:Me=>Ke(Me)}),C.createElement(J.Z,{type:"primary",className:"ml20",onClick:()=>i(this,null,function*(){yield Y(K,()=>{ne(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},C.createElement(b.Z,{className:"h100"},C.createElement(R.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:oe===1?"block":"none"}},C.createElement("div",{className:"h100",ref:v})),C.createElement(R.Z,{flex:"1",style:{display:oe===2?"block":"none"}},C.createElement(H.ZP,{height:"90vh",value:N,language:"html",theme:"vs",showMiniMap:!1,options:I,onChange:ie}))))}var G=f},43276:function(Dt,We,t){t.d(We,{Z:function(){return Z}});var e=t(59301),n=t(96536),b=t(77596),R=t(93772),E=t(14179),H=t(56102),r={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},J=t(8591),C=t(11611),i=t(13058),D=t(30084),f=t(10787),G=t(50304),W=t(83251),O=Object.defineProperty,N=Object.defineProperties,Q=Object.getOwnPropertyDescriptors,ee=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,Y=(B,S,g)=>S in B?O(B,S,{enumerable:!0,configurable:!0,writable:!0,value:g}):B[S]=g,j=(B,S)=>{for(var g in S||(S={}))ve.call(S,g)&&Y(B,g,S[g]);if(ee)for(var g of ee(S))Ze.call(S,g)&&Y(B,g,S[g]);return B},v=(B,S)=>N(B,Q(S)),q=(B,S)=>{var g={};for(var ne in B)ve.call(B,ne)&&S.indexOf(ne)<0&&(g[ne]=B[ne]);if(B!=null&&ee)for(var ne of ee(B))S.indexOf(ne)<0&&Ze.call(B,ne)&&(g[ne]=B[ne]);return g},Z=({onFinish:B,value:S,streamingStatus:g,cancelIndex:ne,loadImage:oe,onDynamic:Ke})=>{const[I,ie]=(0,e.useState)(""),[Me,Oe]=(0,e.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[mt,Je]=(0,e.useState)(0),[Se,we]=(0,e.useState)(!1),pe=$e=>$e.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(ze,je)=>`<mathx data-text="${je.trim()}">$$${je.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Ne=()=>{we(!0),B==null||B()};(0,e.useEffect)(()=>{const $e=oe?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${S}`:S,ze=pe($e);if(!Se)if(oe||!g||ne>0){ie(ze),Je(ze.length),(!g||ne>0)&&!oe&&Ne();return}else if((ze==null?void 0:ze.length)<4)ie(ze),Je(ze.length);else if(mt<ze.length){const je=ze.length-mt,xt=setInterval(()=>{ie(ze.slice(0,mt+2)),Je(Rt=>Rt+2)},je>10?Math.max(500/(je/2),20):50);return()=>clearInterval(xt)}else g||Ne()},[S,g,ne,oe,mt]);const dt=(0,e.useMemo)(()=>e.createElement("section",{className:`${r.answer} fadeIn animated edu_md`},e.createElement(n.UG,{remarkPlugins:[D.Z,f.Z],rehypePlugins:[i.Z,R.Z],components:{code($e){var ze=$e,{node:je,inline:xt,className:Rt,children:wt}=ze,Qe=q(ze,["node","inline","className","children"]);const P=/language-(\w+)/.exec(Rt||""),Ce=String(wt).trim();return xt||!P?e.createElement("code",j({className:Rt},Qe),wt):e.createElement("code",{className:r.codeCopy,"data-text":`\`\`\`${P?P[1]:""}
${wt}

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function Pt({open:Be=!0,onChange:ne,defaultValue:te,placement:he,width:se,height:fe,extra:ve,onDynamic:we,showExtra:Ne=!0}){const Fe=(0,pe.useRef)(null),je=(0,pe.useRef)(null),[Ue,rt]=(0,pe.useState)(te||""),[He,yt]=(0,pe.useState)(te||""),[Ie,Mt]=(0,pe.useState)(!!Be),[it,wt]=(0,pe.useState)(1),nt={selectOnLineNumbers:!0};(0,pe.useEffect)(()=>{Be&&(rt(te),yt(te),Mt(!0))},[Be,te]),(0,pe.useEffect)(()=>{Ue!==""&&(clearTimeout(je.current),je.current=setTimeout(()=>{const Wt=document.createElement("iframe");if(Wt.style.width="100%",Wt.style.height="100%",Wt.style.border="0",Fe.current){Fe.current.innerHTML="",Fe.current.appendChild(Wt);const Vt=Wt.contentDocument||Wt.contentWindow.document;Vt.open(),Vt.write(Ue),Vt.close()}},1e3))},[Be,Ue]);const Lt=Wt=>{rt(Wt),ne==null||ne(Wt,He)};return ct.createElement(Oe.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Ie,width:Ne?700:"100%",height:fe||"100vh",rootClassName:Ke.smartWrp,destroyOnClose:!0,onClose:()=>Mt(!1),extra:Ne&&ct.createElement("div",null,ct.createElement(Ae.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:it,onChange:Wt=>wt(Wt)}),ct.createElement(bt.Z,{type:"primary",className:"ml20",onClick:()=>We(this,null,function*(){yield we(Ue,()=>{Mt(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},ct.createElement(ht.Z,{className:"h100"},ct.createElement(Ot.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:it===1?"block":"none"}},ct.createElement("div",{className:"h100",ref:Fe})),ct.createElement(Ot.Z,{flex:"1",style:{display:it===2?"block":"none"}},ct.createElement(ot.ZP,{height:"90vh",value:te,language:"html",theme:"vs",showMiniMap:!1,options:nt,onChange:Lt}))))}var kt=Pt},43276:function(An,En,Se){"use strict";Se.d(En,{Z:function(){return rt}});var pe=Se(59301),Oe=Se(96536),ht=Se(77596),Ot=Se(93772),Ke=Se(14179),ot=Se(56102),Ae={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},bt=Se(8591),ct=Se(11611),We=Se(35328),Tt=Se(30084),Pt=Se(10787),kt=Se(50304),Be=Se(83251),ne=Object.defineProperty,te=Object.defineProperties,he=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,fe=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,we=(He,yt,Ie)=>yt in He?ne(He,yt,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):He[yt]=Ie,Ne=(He,yt)=>{for(var Ie in yt||(yt={}))fe.call(yt,Ie)&&we(He,Ie,yt[Ie]);if(se)for(var Ie of se(yt))ve.call(yt,Ie)&&we(He,Ie,yt[Ie]);return He},Fe=(He,yt)=>te(He,he(yt)),je=(He,yt)=>{var Ie={};for(var Mt in He)fe.call(He,Mt)&&yt.indexOf(Mt)<0&&(Ie[Mt]=He[Mt]);if(He!=null&&se)for(var Mt of se(He))yt.indexOf(Mt)<0&&ve.call(He,Mt)&&(Ie[Mt]=He[Mt]);return Ie},rt=({onFinish:He,value:yt,streamingStatus:Ie,cancelIndex:Mt,loadImage:it,onDynamic:wt})=>{const[nt,Lt]=(0,pe.useState)(""),[Wt,Vt]=(0,pe.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[at,Ye]=(0,pe.useState)(0),[tn,Pn]=(0,pe.useState)(!1),mn=pn=>pn.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Ln,en)=>`<mathx data-text="${en.trim()}">$$${en.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Gt=()=>{Pn(!0),He==null||He()};(0,pe.useEffect)(()=>{const pn=it?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function Pt({open:Be=!0,onChange:ne,defaultValue:te,placement:he,width:se,height:fe,extra:ve,onDynamic:we,showExtra:Ne=!0}){const Fe=(0,pe.useRef)(null),je=(0,pe.useRef)(null),[Ue,rt]=(0,pe.useState)(te||""),[He,yt]=(0,pe.useState)(te||""),[Ie,Mt]=(0,pe.useState)(!!Be),[it,wt]=(0,pe.useState)(1),nt={selectOnLineNumbers:!0};(0,pe.useEffect)(()=>{Be&&(rt(te),yt(te),Mt(!0))},[Be,te]),(0,pe.useEffect)(()=>{Ue!==""&&(clearTimeout(je.current),je.current=setTimeout(()=>{const Wt=document.createElement("iframe");if(Wt.style.width="100%",Wt.style.height="100%",Wt.style.border="0",Fe.current){Fe.current.innerHTML="",Fe.current.appendChild(Wt);const Vt=Wt.contentDocument||Wt.contentWindow.document;Vt.open(),Vt.write(Ue),Vt.close()}},1e3))},[Be,Ue]);const Lt=Wt=>{rt(Wt),ne==null||ne(Wt,He)};return ct.createElement(Oe.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Ie,width:Ne?700:"100%",height:fe||"100vh",rootClassName:Ke.smartWrp,destroyOnClose:!0,onClose:()=>Mt(!1),extra:Ne&&ct.createElement("div",null,ct.createElement(Ae.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:it,onChange:Wt=>wt(Wt)}),ct.createElement(bt.Z,{type:"primary",className:"ml20",onClick:()=>We(this,null,function*(){yield we(Ue,()=>{Mt(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},ct.createElement(ht.Z,{className:"h100"},ct.createElement(Ot.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:it===1?"block":"none"}},ct.createElement("div",{className:"h100",ref:Fe})),ct.createElement(Ot.Z,{flex:"1",style:{display:it===2?"block":"none"}},ct.createElement(ot.ZP,{height:"90vh",value:te,language:"html",theme:"vs",showMiniMap:!1,options:nt,onChange:Lt}))))}var kt=Pt},43276:function(An,En,Se){"use strict";Se.d(En,{Z:function(){return rt}});var pe=Se(59301),Oe=Se(96536),ht=Se(77596),Ot=Se(93772),Ke=Se(14179),ot=Se(56102),Ae={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},bt=Se(8591),ct=Se(11611),We=Se(13058),Tt=Se(30084),Pt=Se(10787),kt=Se(50304),Be=Se(83251),ne=Object.defineProperty,te=Object.defineProperties,he=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,fe=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,we=(He,yt,Ie)=>yt in He?ne(He,yt,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):He[yt]=Ie,Ne=(He,yt)=>{for(var Ie in yt||(yt={}))fe.call(yt,Ie)&&we(He,Ie,yt[Ie]);if(se)for(var Ie of se(yt))ve.call(yt,Ie)&&we(He,Ie,yt[Ie]);return He},Fe=(He,yt)=>te(He,he(yt)),je=(He,yt)=>{var Ie={};for(var Mt in He)fe.call(He,Mt)&&yt.indexOf(Mt)<0&&(Ie[Mt]=He[Mt]);if(He!=null&&se)for(var Mt of se(He))yt.indexOf(Mt)<0&&ve.call(He,Mt)&&(Ie[Mt]=He[Mt]);return Ie},rt=({onFinish:He,value:yt,streamingStatus:Ie,cancelIndex:Mt,loadImage:it,onDynamic:wt})=>{const[nt,Lt]=(0,pe.useState)(""),[Wt,Vt]=(0,pe.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[at,Ye]=(0,pe.useState)(0),[tn,Pn]=(0,pe.useState)(!1),mn=pn=>pn.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Ln,en)=>`<mathx data-text="${en.trim()}">$$${en.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Gt=()=>{Pn(!0),He==null||He()};(0,pe.useEffect)(()=>{const pn=it?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${yt}`:yt,Ln=mn(pn);if(!tn)if(it||!Ie||Mt>0){Lt(Ln),Ye(Ln.length),(!Ie||Mt>0)&&!it&&Gt();return}else if((Ln==null?void 0:Ln.length)<4)Lt(Ln),Ye(Ln.length);else if(at<Ln.length){const en=Ln.length-at,Zn=setInterval(()=>{Lt(Ln.slice(0,at+2)),Ye(Ct=>Ct+2)},en>10?Math.max(500/(en/2),20):50);return()=>clearInterval(Zn)}else Ie||Gt()},[yt,Ie,Mt,it,at]);const Ut=(0,pe.useMemo)(()=>pe.createElement("section",{className:`${Ae.answer} fadeIn animated edu_md`},pe.createElement(Oe.UG,{remarkPlugins:[Tt.Z,Pt.Z],rehypePlugins:[We.Z,Ot.Z],components:{code(pn){var Ln=pn,{node:en,inline:Zn,className:Ct,children:Tn}=Ln,di=je(Ln,["node","inline","className","children"]);const De=/language-(\w+)/.exec(Ct||""),Ee=String(Tn).trim();return Zn||!De?pe.createElement("code",Ne({className:Ct},di),Tn):pe.createElement("code",{className:Ae.codeCopy,"data-text":`\`\`\`${De?De[1]:""}
${Tn}

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function De({open:oe=!0,onChange:a,defaultValue:E,placement:x,width:b,height:z,extra:ee,onDynamic:ne,showExtra:ae=!0}){const le=(0,y.useRef)(null),re=(0,y.useRef)(null),[ie,Ae]=(0,y.useState)(E||""),[de,Pe]=(0,y.useState)(E||""),[me,ge]=(0,y.useState)(!!oe),[et,Ve]=(0,y.useState)(1),ve={selectOnLineNumbers:!0};(0,y.useEffect)(()=>{oe&&(Ae(E),Pe(E),ge(!0))},[oe,E]),(0,y.useEffect)(()=>{ie!==""&&(clearTimeout(re.current),re.current=setTimeout(()=>{const ze=document.createElement("iframe");if(ze.style.width="100%",ze.style.height="100%",ze.style.border="0",le.current){le.current.innerHTML="",le.current.appendChild(ze);const Ne=ze.contentDocument||ze.contentWindow.document;Ne.open(),Ne.write(ie),Ne.close()}},1e3))},[oe,ie]);const He=ze=>{Ae(ze),a==null||a(ze,de)};return pe.createElement(ue.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:me,width:ae?700:"100%",height:z||"100vh",rootClassName:he.smartWrp,destroyOnClose:!0,onClose:()=>ge(!1),extra:ae&&pe.createElement("div",null,pe.createElement(Ee.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:et,onChange:ze=>Ve(ze)}),pe.createElement(Te.Z,{type:"primary",className:"ml20",onClick:()=>ce(this,null,function*(){yield ne(ie,()=>{ge(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},pe.createElement(Me.Z,{className:"h100"},pe.createElement(fe.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:et===1?"block":"none"}},pe.createElement("div",{className:"h100",ref:le})),pe.createElement(fe.Z,{flex:"1",style:{display:et===2?"block":"none"}},pe.createElement(ye.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:ve,onChange:He}))))}var Ze=De},43276:function(ot,yt,te){"use strict";te.d(yt,{Z:function(){return Ae}});var y=te(59301),ue=te(96536),Me=te(77596),fe=te(93772),he=te(14179),ye=te(56102),Ee={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Te=te(8591),pe=te(11611),ce=te(35328),Fe=te(30084),De=te(10787),Ze=te(50304),oe=te(83251),a=Object.defineProperty,E=Object.defineProperties,x=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ne=(de,Pe,me)=>Pe in de?a(de,Pe,{enumerable:!0,configurable:!0,writable:!0,value:me}):de[Pe]=me,ae=(de,Pe)=>{for(var me in Pe||(Pe={}))z.call(Pe,me)&&ne(de,me,Pe[me]);if(b)for(var me of b(Pe))ee.call(Pe,me)&&ne(de,me,Pe[me]);return de},le=(de,Pe)=>E(de,x(Pe)),re=(de,Pe)=>{var me={};for(var ge in de)z.call(de,ge)&&Pe.indexOf(ge)<0&&(me[ge]=de[ge]);if(de!=null&&b)for(var ge of b(de))Pe.indexOf(ge)<0&&ee.call(de,ge)&&(me[ge]=de[ge]);return me},Ae=({onFinish:de,value:Pe,streamingStatus:me,cancelIndex:ge,loadImage:et,onDynamic:Ve})=>{const[ve,He]=(0,y.useState)(""),[ze,Ne]=(0,y.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Oe,Ge]=(0,y.useState)(0),[_e,rt]=(0,y.useState)(!1),ct=Je=>Je.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Le,dt)=>`<mathx data-text="${dt.trim()}">$$${dt.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),we=()=>{rt(!0),de==null||de()};(0,y.useEffect)(()=>{const Je=et?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function De({open:oe=!0,onChange:a,defaultValue:E,placement:x,width:b,height:z,extra:ee,onDynamic:ne,showExtra:ae=!0}){const le=(0,y.useRef)(null),re=(0,y.useRef)(null),[ie,Ae]=(0,y.useState)(E||""),[de,Pe]=(0,y.useState)(E||""),[me,ge]=(0,y.useState)(!!oe),[et,Ve]=(0,y.useState)(1),ve={selectOnLineNumbers:!0};(0,y.useEffect)(()=>{oe&&(Ae(E),Pe(E),ge(!0))},[oe,E]),(0,y.useEffect)(()=>{ie!==""&&(clearTimeout(re.current),re.current=setTimeout(()=>{const ze=document.createElement("iframe");if(ze.style.width="100%",ze.style.height="100%",ze.style.border="0",le.current){le.current.innerHTML="",le.current.appendChild(ze);const Ne=ze.contentDocument||ze.contentWindow.document;Ne.open(),Ne.write(ie),Ne.close()}},1e3))},[oe,ie]);const He=ze=>{Ae(ze),a==null||a(ze,de)};return pe.createElement(ue.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:me,width:ae?700:"100%",height:z||"100vh",rootClassName:he.smartWrp,destroyOnClose:!0,onClose:()=>ge(!1),extra:ae&&pe.createElement("div",null,pe.createElement(Ee.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:et,onChange:ze=>Ve(ze)}),pe.createElement(Te.Z,{type:"primary",className:"ml20",onClick:()=>ce(this,null,function*(){yield ne(ie,()=>{ge(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},pe.createElement(Me.Z,{className:"h100"},pe.createElement(fe.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:et===1?"block":"none"}},pe.createElement("div",{className:"h100",ref:le})),pe.createElement(fe.Z,{flex:"1",style:{display:et===2?"block":"none"}},pe.createElement(ye.ZP,{height:"90vh",value:E,language:"html",theme:"vs",showMiniMap:!1,options:ve,onChange:He}))))}var Ze=De},43276:function(ot,yt,te){"use strict";te.d(yt,{Z:function(){return Ae}});var y=te(59301),ue=te(96536),Me=te(77596),fe=te(93772),he=te(14179),ye=te(56102),Ee={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Te=te(8591),pe=te(11611),ce=te(13058),Fe=te(30084),De=te(10787),Ze=te(50304),oe=te(83251),a=Object.defineProperty,E=Object.defineProperties,x=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ne=(de,Pe,me)=>Pe in de?a(de,Pe,{enumerable:!0,configurable:!0,writable:!0,value:me}):de[Pe]=me,ae=(de,Pe)=>{for(var me in Pe||(Pe={}))z.call(Pe,me)&&ne(de,me,Pe[me]);if(b)for(var me of b(Pe))ee.call(Pe,me)&&ne(de,me,Pe[me]);return de},le=(de,Pe)=>E(de,x(Pe)),re=(de,Pe)=>{var me={};for(var ge in de)z.call(de,ge)&&Pe.indexOf(ge)<0&&(me[ge]=de[ge]);if(de!=null&&b)for(var ge of b(de))Pe.indexOf(ge)<0&&ee.call(de,ge)&&(me[ge]=de[ge]);return me},Ae=({onFinish:de,value:Pe,streamingStatus:me,cancelIndex:ge,loadImage:et,onDynamic:Ve})=>{const[ve,He]=(0,y.useState)(""),[ze,Ne]=(0,y.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Oe,Ge]=(0,y.useState)(0),[_e,rt]=(0,y.useState)(!1),ct=Je=>Je.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Le,dt)=>`<mathx data-text="${dt.trim()}">$$${dt.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),we=()=>{rt(!0),de==null||de()};(0,y.useEffect)(()=>{const Je=et?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${Pe}`:Pe,Le=ct(Je);if(!_e)if(et||!me||ge>0){He(Le),Ge(Le.length),(!me||ge>0)&&!et&&we();return}else if((Le==null?void 0:Le.length)<4)He(Le),Ge(Le.length);else if(Oe<Le.length){const dt=Le.length-Oe,xt=setInterval(()=>{He(Le.slice(0,Oe+2)),Ge(be=>be+2)},dt>10?Math.max(500/(dt/2),20):50);return()=>clearInterval(xt)}else me||we()},[Pe,me,ge,et,Oe]);const Be=(0,y.useMemo)(()=>y.createElement("section",{className:`${Ee.answer} fadeIn animated edu_md`},y.createElement(ue.UG,{remarkPlugins:[Fe.Z,De.Z],rehypePlugins:[ce.Z,fe.Z],components:{code(Je){var Le=Je,{node:dt,inline:xt,className:be,children:it}=Le,Dt=re(Le,["node","inline","className","children"]);const Se=/language-(\w+)/.exec(be||""),ke=String(it).trim();return xt||!Se?y.createElement("code",ae({className:be},Dt),it):y.createElement("code",{className:Ee.codeCopy,"data-text":`\`\`\`${Se?Se[1]:""}
${it}

@ -139,7 +139,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function A({open:T=!0,onChange:M,defaultValue:G,placement:Y,width:U,height:F,extra:K,onDynamic:le,showExtra:N=!0}){const W=(0,p.useRef)(null),me=(0,p.useRef)(null),[ce,Se]=(0,p.useState)(G||""),[Te,we]=(0,p.useState)(G||""),[Re,Z]=(0,p.useState)(!!T),[Q,q]=(0,p.useState)(1),re={selectOnLineNumbers:!0};(0,p.useEffect)(()=>{T&&(Se(G),we(G),Z(!0))},[T,G]),(0,p.useEffect)(()=>{ce!==""&&(clearTimeout(me.current),me.current=setTimeout(()=>{const oe=document.createElement("iframe");if(oe.style.width="100%",oe.style.height="100%",oe.style.border="0",W.current){W.current.innerHTML="",W.current.appendChild(oe);const E=oe.contentDocument||oe.contentWindow.document;E.open(),E.write(ce),E.close()}},1e3))},[T,ce]);const ge=oe=>{Se(oe),M==null||M(oe,Te)};return o.createElement(ye.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Re,width:N?700:"100%",height:F||"100vh",rootClassName:V.smartWrp,destroyOnClose:!0,onClose:()=>Z(!1),extra:N&&o.createElement("div",null,o.createElement(Ee.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:Q,onChange:oe=>q(oe)}),o.createElement(se.Z,{type:"primary",className:"ml20",onClick:()=>ie(this,null,function*(){yield le(ce,()=>{Z(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},o.createElement(Le.Z,{className:"h100"},o.createElement(pe.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:Q===1?"block":"none"}},o.createElement("div",{className:"h100",ref:W})),o.createElement(pe.Z,{flex:"1",style:{display:Q===2?"block":"none"}},o.createElement(v.ZP,{height:"90vh",value:G,language:"html",theme:"vs",showMiniMap:!1,options:re,onChange:ge}))))}var x=A},43276:function(Ft,pt,C){"use strict";C.d(pt,{Z:function(){return Se}});var p=C(59301),ye=C(96536),Le=C(77596),pe=C(93772),V=C(14179),v=C(56102),Ee={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},se=C(8591),o=C(11611),ie=C(35328),R=C(30084),A=C(10787),x=C(50304),T=C(83251),M=Object.defineProperty,G=Object.defineProperties,Y=Object.getOwnPropertyDescriptors,U=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable,le=(Te,we,Re)=>we in Te?M(Te,we,{enumerable:!0,configurable:!0,writable:!0,value:Re}):Te[we]=Re,N=(Te,we)=>{for(var Re in we||(we={}))F.call(we,Re)&&le(Te,Re,we[Re]);if(U)for(var Re of U(we))K.call(we,Re)&&le(Te,Re,we[Re]);return Te},W=(Te,we)=>G(Te,Y(we)),me=(Te,we)=>{var Re={};for(var Z in Te)F.call(Te,Z)&&we.indexOf(Z)<0&&(Re[Z]=Te[Z]);if(Te!=null&&U)for(var Z of U(Te))we.indexOf(Z)<0&&K.call(Te,Z)&&(Re[Z]=Te[Z]);return Re},Se=({onFinish:Te,value:we,streamingStatus:Re,cancelIndex:Z,loadImage:Q,onDynamic:q})=>{const[re,ge]=(0,p.useState)(""),[oe,E]=(0,p.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[w,H]=(0,p.useState)(0),[ae,We]=(0,p.useState)(!1),He=Dt=>Dt.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(lt,ht)=>`<mathx data-text="${ht.trim()}">$$${ht.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Ze=()=>{We(!0),Te==null||Te()};(0,p.useEffect)(()=>{const Dt=Q?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function A({open:T=!0,onChange:M,defaultValue:G,placement:Y,width:U,height:F,extra:K,onDynamic:le,showExtra:N=!0}){const W=(0,p.useRef)(null),me=(0,p.useRef)(null),[ce,Se]=(0,p.useState)(G||""),[Te,we]=(0,p.useState)(G||""),[Re,Z]=(0,p.useState)(!!T),[Q,q]=(0,p.useState)(1),re={selectOnLineNumbers:!0};(0,p.useEffect)(()=>{T&&(Se(G),we(G),Z(!0))},[T,G]),(0,p.useEffect)(()=>{ce!==""&&(clearTimeout(me.current),me.current=setTimeout(()=>{const oe=document.createElement("iframe");if(oe.style.width="100%",oe.style.height="100%",oe.style.border="0",W.current){W.current.innerHTML="",W.current.appendChild(oe);const E=oe.contentDocument||oe.contentWindow.document;E.open(),E.write(ce),E.close()}},1e3))},[T,ce]);const ge=oe=>{Se(oe),M==null||M(oe,Te)};return o.createElement(ye.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Re,width:N?700:"100%",height:F||"100vh",rootClassName:V.smartWrp,destroyOnClose:!0,onClose:()=>Z(!1),extra:N&&o.createElement("div",null,o.createElement(Ee.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:Q,onChange:oe=>q(oe)}),o.createElement(se.Z,{type:"primary",className:"ml20",onClick:()=>ie(this,null,function*(){yield le(ce,()=>{Z(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},o.createElement(Le.Z,{className:"h100"},o.createElement(pe.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:Q===1?"block":"none"}},o.createElement("div",{className:"h100",ref:W})),o.createElement(pe.Z,{flex:"1",style:{display:Q===2?"block":"none"}},o.createElement(v.ZP,{height:"90vh",value:G,language:"html",theme:"vs",showMiniMap:!1,options:re,onChange:ge}))))}var x=A},43276:function(Ft,pt,C){"use strict";C.d(pt,{Z:function(){return Se}});var p=C(59301),ye=C(96536),Le=C(77596),pe=C(93772),V=C(14179),v=C(56102),Ee={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},se=C(8591),o=C(11611),ie=C(13058),R=C(30084),A=C(10787),x=C(50304),T=C(83251),M=Object.defineProperty,G=Object.defineProperties,Y=Object.getOwnPropertyDescriptors,U=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable,le=(Te,we,Re)=>we in Te?M(Te,we,{enumerable:!0,configurable:!0,writable:!0,value:Re}):Te[we]=Re,N=(Te,we)=>{for(var Re in we||(we={}))F.call(we,Re)&&le(Te,Re,we[Re]);if(U)for(var Re of U(we))K.call(we,Re)&&le(Te,Re,we[Re]);return Te},W=(Te,we)=>G(Te,Y(we)),me=(Te,we)=>{var Re={};for(var Z in Te)F.call(Te,Z)&&we.indexOf(Z)<0&&(Re[Z]=Te[Z]);if(Te!=null&&U)for(var Z of U(Te))we.indexOf(Z)<0&&K.call(Te,Z)&&(Re[Z]=Te[Z]);return Re},Se=({onFinish:Te,value:we,streamingStatus:Re,cancelIndex:Z,loadImage:Q,onDynamic:q})=>{const[re,ge]=(0,p.useState)(""),[oe,E]=(0,p.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[w,H]=(0,p.useState)(0),[ae,We]=(0,p.useState)(!1),He=Dt=>Dt.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(lt,ht)=>`<mathx data-text="${ht.trim()}">$$${ht.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Ze=()=>{We(!0),Te==null||Te()};(0,p.useEffect)(()=>{const Dt=Q?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${we}`:we,lt=He(Dt);if(!ae)if(Q||!Re||Z>0){ge(lt),H(lt.length),(!Re||Z>0)&&!Q&&Ze();return}else if((lt==null?void 0:lt.length)<4)ge(lt),H(lt.length);else if(w<lt.length){const ht=lt.length-w,Gt=setInterval(()=>{ge(lt.slice(0,w+2)),H(tn=>tn+2)},ht>10?Math.max(500/(ht/2),20):50);return()=>clearInterval(Gt)}else Re||Ze()},[we,Re,Z,Q,w]);const yt=(0,p.useMemo)(()=>p.createElement("section",{className:`${Ee.answer} fadeIn animated edu_md`},p.createElement(ye.UG,{remarkPlugins:[R.Z,A.Z],rehypePlugins:[ie.Z,pe.Z],components:{code(Dt){var lt=Dt,{node:ht,inline:Gt,className:tn,children:Ot}=lt,Yt=me(lt,["node","inline","className","children"]);const Jt=/language-(\w+)/.exec(tn||""),zt=String(Ot).trim();return Gt||!Jt?p.createElement("code",N({className:tn},Yt),Ot):p.createElement("code",{className:Ee.codeCopy,"data-text":`\`\`\`${Jt?Jt[1]:""}
${Ot}

@ -136,7 +136,7 @@
initArrayDisplay();
<\/script>
</body>
</html>`;function Ze({open:oe=!0,onChange:E,defaultValue:a,placement:b,width:x,height:z,extra:ee,onDynamic:re,showExtra:he=!0}){const ge=(0,y.useRef)(null),Ce=(0,y.useRef)(null),[be,Te]=(0,y.useState)(a||""),[We,At]=(0,y.useState)(a||""),[Et,Rt]=(0,y.useState)(!!oe),[rn,hn]=(0,y.useState)(1),Dt={selectOnLineNumbers:!0};(0,y.useEffect)(()=>{oe&&(Te(a),At(a),Rt(!0))},[oe,a]),(0,y.useEffect)(()=>{be!==""&&(clearTimeout(Ce.current),Ce.current=setTimeout(()=>{const Pt=document.createElement("iframe");if(Pt.style.width="100%",Pt.style.height="100%",Pt.style.border="0",ge.current){ge.current.innerHTML="",ge.current.appendChild(Pt);const qt=Pt.contentDocument||Pt.contentWindow.document;qt.open(),qt.write(be),qt.close()}},1e3))},[oe,be]);const cn=Pt=>{Te(Pt),E==null||E(Pt,We)};return le.createElement(ze.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Et,width:he?700:"100%",height:z||"100vh",rootClassName:se.smartWrp,destroyOnClose:!0,onClose:()=>Rt(!1),extra:he&&le.createElement("div",null,le.createElement(ye.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:rn,onChange:Pt=>hn(Pt)}),le.createElement(Ae.Z,{type:"primary",className:"ml20",onClick:()=>De(this,null,function*(){yield re(be,()=>{Rt(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},le.createElement(we.Z,{className:"h100"},le.createElement(pe.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:rn===1?"block":"none"}},le.createElement("div",{className:"h100",ref:ge})),le.createElement(pe.Z,{flex:"1",style:{display:rn===2?"block":"none"}},le.createElement(de.ZP,{height:"90vh",value:a,language:"html",theme:"vs",showMiniMap:!1,options:Dt,onChange:cn}))))}var Oe=Ze},43276:function(Vt,Ue,ie){"use strict";ie.d(Ue,{Z:function(){return Te}});var y=ie(59301),ze=ie(96536),we=ie(77596),pe=ie(93772),se=ie(14179),de=ie(56102),ye={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Ae=ie(8591),le=ie(11611),De=ie(35328),Fe=ie(30084),Ze=ie(10787),Oe=ie(50304),oe=ie(83251),E=Object.defineProperty,a=Object.defineProperties,b=Object.getOwnPropertyDescriptors,x=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,re=(We,At,Et)=>At in We?E(We,At,{enumerable:!0,configurable:!0,writable:!0,value:Et}):We[At]=Et,he=(We,At)=>{for(var Et in At||(At={}))z.call(At,Et)&&re(We,Et,At[Et]);if(x)for(var Et of x(At))ee.call(At,Et)&&re(We,Et,At[Et]);return We},ge=(We,At)=>a(We,b(At)),Ce=(We,At)=>{var Et={};for(var Rt in We)z.call(We,Rt)&&At.indexOf(Rt)<0&&(Et[Rt]=We[Rt]);if(We!=null&&x)for(var Rt of x(We))At.indexOf(Rt)<0&&ee.call(We,Rt)&&(Et[Rt]=We[Rt]);return Et},Te=({onFinish:We,value:At,streamingStatus:Et,cancelIndex:Rt,loadImage:rn,onDynamic:hn})=>{const[Dt,cn]=(0,y.useState)(""),[Pt,qt]=(0,y.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Jt,gt]=(0,y.useState)(0),[_t,xn]=(0,y.useState)(!1),jn=on=>on.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Ln,Mn)=>`<mathx data-text="${Mn.trim()}">$$${Mn.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Tt=()=>{xn(!0),We==null||We()};(0,y.useEffect)(()=>{const on=rn?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function Ze({open:oe=!0,onChange:E,defaultValue:a,placement:b,width:x,height:z,extra:ee,onDynamic:re,showExtra:he=!0}){const ge=(0,y.useRef)(null),Ce=(0,y.useRef)(null),[be,Te]=(0,y.useState)(a||""),[We,At]=(0,y.useState)(a||""),[Et,Rt]=(0,y.useState)(!!oe),[rn,hn]=(0,y.useState)(1),Dt={selectOnLineNumbers:!0};(0,y.useEffect)(()=>{oe&&(Te(a),At(a),Rt(!0))},[oe,a]),(0,y.useEffect)(()=>{be!==""&&(clearTimeout(Ce.current),Ce.current=setTimeout(()=>{const Pt=document.createElement("iframe");if(Pt.style.width="100%",Pt.style.height="100%",Pt.style.border="0",ge.current){ge.current.innerHTML="",ge.current.appendChild(Pt);const qt=Pt.contentDocument||Pt.contentWindow.document;qt.open(),qt.write(be),qt.close()}},1e3))},[oe,be]);const cn=Pt=>{Te(Pt),E==null||E(Pt,We)};return le.createElement(ze.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Et,width:he?700:"100%",height:z||"100vh",rootClassName:se.smartWrp,destroyOnClose:!0,onClose:()=>Rt(!1),extra:he&&le.createElement("div",null,le.createElement(ye.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:rn,onChange:Pt=>hn(Pt)}),le.createElement(Ae.Z,{type:"primary",className:"ml20",onClick:()=>De(this,null,function*(){yield re(be,()=>{Rt(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},le.createElement(we.Z,{className:"h100"},le.createElement(pe.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:rn===1?"block":"none"}},le.createElement("div",{className:"h100",ref:ge})),le.createElement(pe.Z,{flex:"1",style:{display:rn===2?"block":"none"}},le.createElement(de.ZP,{height:"90vh",value:a,language:"html",theme:"vs",showMiniMap:!1,options:Dt,onChange:cn}))))}var Oe=Ze},43276:function(Vt,Ue,ie){"use strict";ie.d(Ue,{Z:function(){return Te}});var y=ie(59301),ze=ie(96536),we=ie(77596),pe=ie(93772),se=ie(14179),de=ie(56102),ye={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Ae=ie(8591),le=ie(11611),De=ie(13058),Fe=ie(30084),Ze=ie(10787),Oe=ie(50304),oe=ie(83251),E=Object.defineProperty,a=Object.defineProperties,b=Object.getOwnPropertyDescriptors,x=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,re=(We,At,Et)=>At in We?E(We,At,{enumerable:!0,configurable:!0,writable:!0,value:Et}):We[At]=Et,he=(We,At)=>{for(var Et in At||(At={}))z.call(At,Et)&&re(We,Et,At[Et]);if(x)for(var Et of x(At))ee.call(At,Et)&&re(We,Et,At[Et]);return We},ge=(We,At)=>a(We,b(At)),Ce=(We,At)=>{var Et={};for(var Rt in We)z.call(We,Rt)&&At.indexOf(Rt)<0&&(Et[Rt]=We[Rt]);if(We!=null&&x)for(var Rt of x(We))At.indexOf(Rt)<0&&ee.call(We,Rt)&&(Et[Rt]=We[Rt]);return Et},Te=({onFinish:We,value:At,streamingStatus:Et,cancelIndex:Rt,loadImage:rn,onDynamic:hn})=>{const[Dt,cn]=(0,y.useState)(""),[Pt,qt]=(0,y.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Jt,gt]=(0,y.useState)(0),[_t,xn]=(0,y.useState)(!1),jn=on=>on.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Ln,Mn)=>`<mathx data-text="${Mn.trim()}">$$${Mn.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Tt=()=>{xn(!0),We==null||We()};(0,y.useEffect)(()=>{const on=rn?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${At}`:At,Ln=jn(on);if(!_t)if(rn||!Et||Rt>0){cn(Ln),gt(Ln.length),(!Et||Rt>0)&&!rn&&Tt();return}else if((Ln==null?void 0:Ln.length)<4)cn(Ln),gt(Ln.length);else if(Jt<Ln.length){const Mn=Ln.length-Jt,Bn=setInterval(()=>{cn(Ln.slice(0,Jt+2)),gt(dt=>dt+2)},Mn>10?Math.max(500/(Mn/2),20):50);return()=>clearInterval(Bn)}else Et||Tt()},[At,Et,Rt,rn,Jt]);const un=(0,y.useMemo)(()=>y.createElement("section",{className:`${ye.answer} fadeIn animated edu_md`},y.createElement(ze.UG,{remarkPlugins:[Fe.Z,Ze.Z],rehypePlugins:[De.Z,pe.Z],components:{code(on){var Ln=on,{node:Mn,inline:Bn,className:dt,children:Gt}=Ln,vn=Ce(Ln,["node","inline","className","children"]);const Wn=/language-(\w+)/.exec(dt||""),qn=String(Gt).trim();return Bn||!Wn?y.createElement("code",he({className:dt},vn),Gt):y.createElement("code",{className:ye.codeCopy,"data-text":`\`\`\`${Wn?Wn[1]:""}
${Gt}

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save