Auto Submit

pull/1/head
autosubmit 7 months ago
parent c1eb41c4aa
commit 7adafe8f49

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

File diff suppressed because one or more lines are too long

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

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 ce({open:he=!0,onChange:nt,defaultValue:$e,placement:Ke,width:ht,height:Me,extra:zt,onDynamic:yt,onOpenChange:Le,showExtra:Te=!0}){const et=(0,a.useRef)(null),It=(0,a.useRef)(null),[_e,Se]=(0,a.useState)($e||""),[Qe,gt]=(0,a.useState)($e||""),[Bt,Oe]=(0,a.useState)(!!he),[Mt,bt]=(0,a.useState)(1),ln={selectOnLineNumbers:!0};(0,a.useEffect)(()=>{he&&(Se($e),gt($e),Oe(!0))},[he,$e]),(0,a.useEffect)(()=>{_e!==""&&(clearTimeout(It.current),It.current=setTimeout(()=>{const bn=document.createElement("iframe");if(bn.style.width="100%",bn.style.height="100%",bn.style.border="0",et.current){et.current.innerHTML="",et.current.appendChild(bn);const An=bn.contentDocument||bn.contentWindow.document;An.open(),An.write(_e),An.close()}},1e3))},[he,_e]);const st=bn=>{Se(bn),nt==null||nt(bn,Qe)};return Ae.createElement(ue.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Bt,width:"100%",height:Me||"100vh",rootClassName:re.smartWrp,destroyOnClose:!0,onClose:()=>{Oe(!1),Le==null||Le(_e)},extra:Te&&Ae.createElement("div",null,Ae.createElement(We.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:Mt,onChange:bn=>bt(bn)}),Ae.createElement(Ye.Z,{type:"primary",className:"ml20",onClick:()=>z(this,null,function*(){yield yt(_e,()=>{Oe(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},Ae.createElement(le.Z,{className:"h100"},Ae.createElement(we.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:Mt===1?"block":"none"}},Ae.createElement("div",{className:"h100",ref:et})),Ae.createElement(we.Z,{flex:"1",style:{display:Mt===2?"block":"none"}},Ae.createElement(Ee.ZP,{height:"90vh",value:$e,language:"html",theme:"vs",showMiniMap:!1,options:ln,onChange:st}))))}var qe=ce},97812:function(Fe,wt,E){"use strict";E.d(wt,{Z:function(){return _e}});var a=E(59301),ue=E(97831),le=E(77596),we=E(3977),re=E(14179),Ee=E(56102),We={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Ye=E(6767),Ae=E(90083),z=E(95827),ye=E(30084),ce=E(10787),qe=E(88831),he=E(68201),nt=Object.defineProperty,$e=Object.defineProperties,Ke=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,zt=Object.prototype.propertyIsEnumerable,yt=(Se,Qe,gt)=>Qe in Se?nt(Se,Qe,{enumerable:!0,configurable:!0,writable:!0,value:gt}):Se[Qe]=gt,Le=(Se,Qe)=>{for(var gt in Qe||(Qe={}))Me.call(Qe,gt)&&yt(Se,gt,Qe[gt]);if(ht)for(var gt of ht(Qe))zt.call(Qe,gt)&&yt(Se,gt,Qe[gt]);return Se},Te=(Se,Qe)=>$e(Se,Ke(Qe)),et=(Se,Qe)=>{var gt={};for(var Bt in Se)Me.call(Se,Bt)&&Qe.indexOf(Bt)<0&&(gt[Bt]=Se[Bt]);if(Se!=null&&ht)for(var Bt of ht(Se))Qe.indexOf(Bt)<0&&zt.call(Se,Bt)&&(gt[Bt]=Se[Bt]);return gt},_e=({onFinish:Se,value:Qe,streamingStatus:gt,cancelIndex:Bt,loadImage:Oe,onDynamic:Mt,isHiddenHtml:bt})=>{const[ln,st]=(0,a.useState)(""),[bn,An]=(0,a.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[En,Cn]=(0,a.useState)(0),[un,_t]=(0,a.useState)(!1),Ze=ze=>ze.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(xe,Rt)=>`<mathx data-text="${Rt.trim()}">$$${Rt.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,"`$&`"),Xe=()=>{_t(!0),Se==null||Se()};(0,a.useEffect)(()=>{const ze=Oe?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
</html>`;function ce({open:he=!0,onChange:nt,defaultValue:$e,placement:Ke,width:ht,height:Me,extra:zt,onDynamic:yt,onOpenChange:Le,showExtra:Te=!0}){const et=(0,a.useRef)(null),It=(0,a.useRef)(null),[_e,Se]=(0,a.useState)($e||""),[Qe,gt]=(0,a.useState)($e||""),[Bt,Oe]=(0,a.useState)(!!he),[Mt,bt]=(0,a.useState)(1),ln={selectOnLineNumbers:!0};(0,a.useEffect)(()=>{he&&(Se($e),gt($e),Oe(!0))},[he,$e]),(0,a.useEffect)(()=>{_e!==""&&(clearTimeout(It.current),It.current=setTimeout(()=>{const bn=document.createElement("iframe");if(bn.style.width="100%",bn.style.height="100%",bn.style.border="0",et.current){et.current.innerHTML="",et.current.appendChild(bn);const An=bn.contentDocument||bn.contentWindow.document;An.open(),An.write(_e),An.close()}},1e3))},[he,_e]);const st=bn=>{Se(bn),nt==null||nt(bn,Qe)};return Ae.createElement(ue.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Bt,width:"100%",height:Me||"100vh",rootClassName:re.smartWrp,destroyOnClose:!0,onClose:()=>{Oe(!1),Le==null||Le(_e)},extra:Te&&Ae.createElement("div",null,Ae.createElement(We.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:Mt,onChange:bn=>bt(bn)}),Ae.createElement(Ye.Z,{type:"primary",className:"ml20",onClick:()=>z(this,null,function*(){yield yt(_e,()=>{Oe(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},Ae.createElement(le.Z,{className:"h100"},Ae.createElement(we.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:Mt===1?"block":"none"}},Ae.createElement("div",{className:"h100",ref:et})),Ae.createElement(we.Z,{flex:"1",style:{display:Mt===2?"block":"none"}},Ae.createElement(Ee.ZP,{height:"90vh",value:$e,language:"html",theme:"vs",showMiniMap:!1,options:ln,onChange:st}))))}var qe=ce},97812:function(Fe,wt,E){"use strict";E.d(wt,{Z:function(){return _e}});var a=E(59301),ue=E(97831),le=E(51658),we=E(3977),re=E(53258),Ee=E(56102),We={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Ye=E(6767),Ae=E(90083),z=E(95827),ye=E(30084),ce=E(10787),qe=E(88831),he=E(68201),nt=Object.defineProperty,$e=Object.defineProperties,Ke=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,zt=Object.prototype.propertyIsEnumerable,yt=(Se,Qe,gt)=>Qe in Se?nt(Se,Qe,{enumerable:!0,configurable:!0,writable:!0,value:gt}):Se[Qe]=gt,Le=(Se,Qe)=>{for(var gt in Qe||(Qe={}))Me.call(Qe,gt)&&yt(Se,gt,Qe[gt]);if(ht)for(var gt of ht(Qe))zt.call(Qe,gt)&&yt(Se,gt,Qe[gt]);return Se},Te=(Se,Qe)=>$e(Se,Ke(Qe)),et=(Se,Qe)=>{var gt={};for(var Bt in Se)Me.call(Se,Bt)&&Qe.indexOf(Bt)<0&&(gt[Bt]=Se[Bt]);if(Se!=null&&ht)for(var Bt of ht(Se))Qe.indexOf(Bt)<0&&zt.call(Se,Bt)&&(gt[Bt]=Se[Bt]);return gt},_e=({onFinish:Se,value:Qe,streamingStatus:gt,cancelIndex:Bt,loadImage:Oe,onDynamic:Mt,isHiddenHtml:bt})=>{const[ln,st]=(0,a.useState)(""),[bn,An]=(0,a.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[En,Cn]=(0,a.useState)(0),[un,_t]=(0,a.useState)(!1),Ze=ze=>ze.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(xe,Rt)=>`<mathx data-text="${Rt.trim()}">$$${Rt.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,"`$&`"),Xe=()=>{_t(!0),Se==null||Se()};(0,a.useEffect)(()=>{const ze=Oe?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${Qe}`:Qe,xe=Ze(ze);if(!un)if(Oe||!gt||Bt>0){st(xe),Cn(xe.length),(!gt||Bt>0)&&!Oe&&Xe();return}else if((xe==null?void 0:xe.length)<4)st(xe),Cn(xe.length);else if(En<xe.length){const Rt=xe.length-En,tt=setInterval(()=>{st(xe.slice(0,En+2)),Cn(Ft=>Ft+2)},Rt>10?Math.max(500/(Rt/2),20):50);return()=>clearInterval(tt)}else gt||Xe()},[Qe,gt,Bt,Oe,En]);const ie=(0,a.useMemo)(()=>a.createElement("section",{className:`${We.answer} fadeIn animated edu_md`},a.createElement(ue.UG,{remarkPlugins:[ye.Z,ce.Z],rehypePlugins:[z.Z,we.Z],components:{code(ze){var xe=ze,{node:Rt,inline:tt,className:Ft,children:vt}=xe,Zt=et(xe,["node","inline","className","children"]);const mt=/language-(\w+)/.exec(Ft||""),ot=String(vt).trim();return tt||!mt?a.createElement("code",Le({className:Ft},Zt),vt):a.createElement("code",{className:We.codeCopy,"data-text":`\`\`\`${mt?mt[1]:""}
${vt}

File diff suppressed because one or more lines are too long

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

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

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

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

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

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

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

File diff suppressed because one or more lines are too long

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

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

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

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