diff --git a/README.md b/README.md index fa18b15..9a5e9cd 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ # django-mdeditor -[![ENV](https://img.shields.io/badge/release-v0.1.15-blue.svg)](https://github.com/pylixm/django-mdeditor) -[![ENV](https://img.shields.io/badge/中文-v0.1.15-blue.svg)](./README_CN.md) -[![ENV](https://img.shields.io/badge/Gitter-v0.1.15-blue.svg)](https://gitter.im/django-mdeditor/Lobby) +[![ENV](https://img.shields.io/badge/release-v0.1.16-blue.svg)](https://github.com/pylixm/django-mdeditor) +[![ENV](https://img.shields.io/badge/中文-v0.1.16-blue.svg)](./README_CN.md) +[![ENV](https://img.shields.io/badge/Gitter-v0.1.16-blue.svg)](https://gitter.im/django-mdeditor/Lobby) [![ENV](https://img.shields.io/badge/python-2.x/3.x-green.svg)](https://github.com/pylixm/django-mdeditor) [![ENV](https://img.shields.io/badge/django-1.7+-green.svg)](https://github.com/pylixm/django-mdeditor) [![LICENSE](https://img.shields.io/badge/license-GPL3.0-green.svg)](https://github.com/pylixm/django-mdeditor/master/LICENSE.txt) diff --git a/README_CN.md b/README_CN.md index c3e655f..46108c3 100644 --- a/README_CN.md +++ b/README_CN.md @@ -2,9 +2,9 @@ # django-mdeditor -[![ENV](https://img.shields.io/badge/release-v0.1.15-blue.svg)](https://github.com/pylixm/django-mdeditor) -[![ENV](https://img.shields.io/badge/中文文档-v0.1.15-blue.svg)](./README_CN.md) -[![ENV](https://img.shields.io/badge/gitter-v0.1.15-blue.svg)](https://gitter.im/django-mdeditor/Lobby) +[![ENV](https://img.shields.io/badge/release-v0.1.16-blue.svg)](https://github.com/pylixm/django-mdeditor) +[![ENV](https://img.shields.io/badge/中文文档-v0.1.16-blue.svg)](./README_CN.md) +[![ENV](https://img.shields.io/badge/gitter-v0.1.16-blue.svg)](https://gitter.im/django-mdeditor/Lobby) [![ENV](https://img.shields.io/badge/python-2.x/3.x-green.svg)](https://github.com/pylixm/django-mdeditor) [![ENV](https://img.shields.io/badge/django-1.7+-green.svg)](https://github.com/pylixm/django-mdeditor) [![LICENSE](https://img.shields.io/badge/license-GPL3.0-green.svg)](https://github.com/pylixm/django-mdeditor/master/LICENSE.txt) diff --git a/db.sqlite3 b/db.sqlite3 index 903d8e6..cdcfd3b 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ diff --git a/mdeditor/static/mdeditor/js/editormd.min.js b/mdeditor/static/mdeditor/js/editormd.min.js index e4bcd9f..1763a17 100644 --- a/mdeditor/static/mdeditor/js/editormd.min.js +++ b/mdeditor/static/mdeditor/js/editormd.min.js @@ -1 +1,2 @@ -eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}(';(j(5v){"9k 9e";l(1b gl==="j"&&1b 9q==="43"&&1b 9r==="43"){9r.9q=5v}18 l(1b 3B==="j"){l(3B.73){}18{3B(["72"],5v);}}18{1K.q=5v()}}(j(){"9k 9e";c $=(1b(9d)!=="1N")?9d:c8;l(1b($)==="1N"){u}c q=j(1V,1h){u 38 q.fn.6Z(1V,1h)};q.1g=q.n="b4.3H";q.9A="1.5.0";q.6E="5h://7o.5I.c4/F.3H/";q.N="q-";q.9v={5C:["3t","3W","|","2A","4l","3O","48","2v","4r","2Z","|","h1","h2","h3","h4","h5","h6","|","1I-1G","1I-3Y","45","|","1z","3N-1z","3d","1J","3C-R","1J-3e","3L","4V","1o","17-46","5c","|","3P-1e","1l","J","1C","4n","2F","|","2X","2R"],89:["3t","3W","|","2A","4l","3O","48","4r","2Z","|","h1","h2","h3","h4","h5","h6","|","1I-1G","1I-3Y","45","|","1l","J","1C","|","2X","2R"],cy:["3t","3W","|","1l","J","|","2X","2R"]};q.3z={3i:"3o",15:"",1W:"",1A:"",4p:"3F",4W:"",1s:"",6m:"",1a:"5y%",X:"5y%",2b:"./cl/",5q:"",a5:bw,6z:11,1l:11,7e:"bP 8G! bH bN...",7k:11,6A:13,3h:13,8V:11,6y:11,4s:11,6s:11,2r:13,7h:4,6x:4,6i:11,6B:11,6H:11,6N:11,6S:11,6P:11,6U:11,6J:11,6T:11,4t:11,4y:11,bM:11,9h:"#7P",9i:0.1,6F:"bJ",5j:13,4E:[],68:j(){},9F:j(){},9M:j(){},5B:1F,5S:1F,8p:j(){},8f:j(){},8T:j(){},8X:j(){},9Y:j(){},a4:j(){},bU:13,dM:["aN","aO","aB","6c","dL","aG"],dI:"",dz:13,dw:"",1i:11,3K:13,2D:"",3n:13,1y:"",3p:1,4m:13,2x:11,1X:11,36:11,3D:13,1o:13,1w:13,2e:13,2d:13,2Q:11,12:11,66:11,3j:"5C",dy:{},24:{2v:j(){u q.24.2v},2Z:j(){u q.24.2Z}},69:{2Z:"a","2v":"dE"},4G:{3t:"fa-3t",3W:"fa-eb",2A:"fa-2A",4l:"fa-ec",3O:"fa-3O",48:"fa-48-2g",4r:"fa-4d",h1:q.N+"2A",h2:q.N+"2A",h3:q.N+"2A",h4:q.N+"2A",h5:q.N+"2A",h6:q.N+"2A","1I-1G":"fa-1I-1G","1I-3Y":"fa-1I-3Y",45:"fa-ed",1z:"fa-1z","3N-1z":"fa-e8",3d:"fa-e9-o",1J:"fa-1J","3C-R":"fa-8F-1J-o","1J-3e":"fa-8F-1J-o",3L:"fa-3L",4V:"fa-ej-o",1o:"fa-dZ-o","17-46":"fa-e0",5c:"fa-dW-o","3P-1e":"fa-e4",1l:"fa-8J-e5",3s:"fa-8J",J:"fa-e2",2F:"fa-2F",1C:"fa-e3-67",4n:"fa-cV",2X:"fa-d3-8N",2R:"fa-2R-8N"},9u:{},21:{15:"6O-cn",9C:"d0
d1 cT cK 8G F.",2D:"b0",12:{3t:"cM(1n+Z)",3W:"cH(1n+Y)",2A:"cI",4l:"cJ",3O:"cS",48:"cP",2v:"do",4r:"dp",2Z:"dk",h1:"dl",h2:"dm",h3:"dt",h4:"dq",h5:"dj",h6:"d9","1I-1G":"db","1I-3Y":"d7",45:"dg",1z:"di","3N-1z":"df",3d:"bf",1J:"dc","3C-R":"d6 / b9(du)","1J-3e":"b9(d2)",3L:"e1",4V:"e6",1o:"dH","17-46":"dG",5c:"dF","3P-1e":"dx",1l:"dT",3s:"dS",J:"dN(bG 1P + bu)",1C:"cv(cp)",4n:"c5",2F:"c3",2X:"b2",2R:"cw"+q.1g},4Q:{c6:"cE",cC:"cu",2U:"cs"},M:{1z:{1g:"bB",6I:"bk",ba:"b7",b8:"37:bz。"},bS:{1g:"bF",15:"bI",6I:"bk",bL:"bO",ba:"b7",bC:"37:bW。",bT:"37:by。",b8:"37:ct。"},3d:{1g:"bf",6I:"co",1z:"cD",67:"cF",cB:"cA",c1:"37:cg。",ci:"37:ca。",c9:"37:cb,cd:"},cc:{1g:"ce",cf:"37:c2。"},c7:{1g:"ck",cx:"cG:",cr:"bD",bv:"bx",bQ:"37:bR。",bX:"37:dO。"},dU:{1g:"dQ dA"},2X:{1g:"b2"}}}};q.2V={1w:q.N+"1w"};q.3M=dB;q.k=1F;q.m=1F;q.C=1F;q.p=1F;c 3S,5m;q.5P=q.fn={1m:{5A:13,3T:13,J:13,1C:13},6Z:j(1V,1h){1h=1h||{};l(1b 1V==="43"){1h=1V}c 1f=9;c N=9.N=q.N;c f=9.f=$.3Q(11,{},q.3z,1h);1V=(1b 1V==="43")?f.1V:1V;c F=9.F=$("#"+1V);9.1V=1V;9.21=f.21;c 2V=9.2V={28:{17:N+"17-28",1s:N+"1s-28"}};f.5q=(f.5q==="")?f.2b+"../ea/":f.5q;9.1m.5A=(f.1l)?11:13;l(!F.8A("q")){F.2j("q")}F.14({1a:(1b f.1a==="2M")?f.1a+"1Z":f.1a,X:(1b f.X==="2M")?f.X+"1Z":f.X});l(f.3h){F.14("X","4f")}c 2i=9.2i=F.1L("28");l(2i.1M<1){F.32("<28>");2i=9.2i=F.1L("28")}2i.2j(2V.28.1s).2t("7e",f.7e);l(1b 2i.2t("15")==="1N"||2i.2t("15")===""){2i.2t("15",(f.15!=="")?f.15:1V+"-1s-eh")}c af=[(!f.2r)?"":"",((f.5j)?"<28 1c=\\""+2V.28.17+"\\" 15=\\""+1V+"-17-1J\\">":""),"<19 1c=\\""+N+"J\\"><19 1c=\\"1s-2z "+N+"J-2n\\">","<19 1c=\\""+N+"2n-1Y\\" 23=\\"8s:3e;\\">","<19 1c=\\""+N+"1Y\\">"].42("\\n");F.32(af).2j(N+"ei");l(f.1A!==""){F.2j(N+"1A-"+f.1A)}9.1Y=F.1L("."+N+"1Y");9.a8=F.1L("."+N+"2n-1Y");l(f.1s!==""){2i.40(f.1s)}l(f.6m!==""){2i.40(2i.40()+f.6m)}9.7q=F.1L("."+2V.28.17);9.J=F.1L("."+N+"J");9.1x=9.J.1L("."+N+"J-2n");l(f.4W!==""){9.J.2j(N+"J-1A-"+f.4W)}l(1b 3B==="j"&&3B.73){l(1b 2S!=="1N"){q.k=2S}l(f.4s&&!f.2r){q.3a(f.2b+"2y/5a/M/M");q.3a(f.2b+"2y/5a/2F/aC")}}l((1b 3B==="j"&&3B.73)||!f.6z){l(1b 2G!=="1N"){q.C=2G}l(1b 2P!=="1N"){q.m=2P}9.6t().4Z().3r()}18{9.ai()}u 9},ai:j(){c 1f=9;c f=9.f;c 20=f.2b;c 7b=j(){l(q.44){1f.3r();u}l(f.2e||f.2d){q.29(20+"e7.1T",j(){q.29(20+"dY.1T",j(){l(!f.2e&&f.2d){q.29(20+"4q-5u.1T",j(){1f.3r()})}18 l(f.2e&&!f.2d){q.29(20+"4a.1T",j(){q.29(20+"72.4a.1T",j(){1f.3r()})})}18 l(f.2e&&f.2d){q.29(20+"4a.1T",j(){q.29(20+"72.4a.1T",j(){q.29(20+"4q-5u.1T",j(){1f.3r()})})})}})})}18{1f.3r()}};q.3a(20+"2y/2y.1T");l(f.4s&&!f.2r){q.3a(20+"2y/5a/M/M");q.3a(20+"2y/5a/2F/aC")}l(f.6A){q.3a(20+"2y/5a/d5/8Z")}q.29(20+"2y/2y.1T",j(){q.C=2G;q.29(20+"2y/cL.1T",j(){q.29(20+"2y/cQ.1T",j(){1f.6t();l(f.3i!=="3o"&&f.3i!=="1s"){1f.3r();u 13}1f.4Z();q.29(20+"2P.1T",j(){q.m=2P;l(f.2Q){q.29(20+"dr.1T",j(){7b()})}18{7b()}})})})});u 9},d8:j(1A){c F=9.F;c 6e=9.f.1A;c 4o=9.N+"1A-";F.3E(4o+6e).2j(4o+1A);9.f.1A=1A;u 9},bl:j(1A){c f=9.f;f.4p=1A;l(1A!=="3F"){q.3a(f.2b+"2y/1A/"+f.4p)}9.cm.70("1A",1A);u 9},dh:j(1A){9.bl(1A);u 9},de:j(1A){c J=9.J;c 6e=9.f.4W;c 4o=9.N+"J-1A-";J.3E(4o+6e).2j(4o+1A);9.f.4W=1A;u 9},6t:j(){c f=9.f;c F=9.F;l(f.4p!=="3F"){q.3a(f.2b+"2y/1A/"+f.4p)}c 8I={3i:f.3i,1A:f.4p,7h:f.7h,da:13,ds:f.8V,6y:f.6y,2r:(f.2r)?"dv":13,6x:f.6x,6i:f.6i,6B:f.6B,dn:{"1n-Q":j(cm){cm.cO(cm.1D())}},cN:f.6A,8M:["2G-cR","2G-8Z"],6S:f.6S,6P:f.6P,6T:f.6T,6U:f.6U,6H:f.6H,6N:f.6N,d4:((!f.6J)?13:{cW:(f.6J==="cU")?13:/\\w/})};9.cZ=9.cm=q.C.cY(9.2i[0],8I);9.1v=9.cX=F.1L(".2G");l(f.1W!==""){9.cm.4K(f.1W)}9.1v.14({6F:f.6F,1a:(!f.1l)?"5y%":"50%"});l(f.3h){9.1v.14("X","4f");9.cm.70("dX",dV)}l(!f.6i){9.1v.1d(".2G-8M").14("4C-59","56")}u 9},eg:j(2u){u 9.cm.ef(2u)},ee:j(2u,1W){9.cm.70(2u,1W);u 9},6h:j(4L,7u){9.cm.6h(4L,7u);u 9},8m:j(4L){9.cm.8m(4L);u 9},7k:j(1e){c f=9.f;l(!f.7k){u 9}c cm=9.cm;c F=9.F;c 6j=cm.dR();c J=9.J;l(1b 1e==="3U"){l(1e==="dP"){1e=6j}l(1e==="84"){1e=1}}l(1b 1e!=="2M"){34("3w: 7s 1e 2M dK be an dJ.");u 9}1e=4H(1e)-1;l(1e>6j){34("3w: 7s 1e 2M bK 1-"+6j);u 9}cm.1B({1e:1e,ch:0});c a6=cm.bV();c 7t=a6.7t;c 7r=cm.bE({1e:1e,ch:0},"bY");cm.cq(1F,(7r.1H+7r.7u-7t)/2);l(f.1l){c 4X=9.1v.1d(".2G-31")[0];c X=$(4X).X();c 1p=4X.1p;c 3x=(1p/4X.2f);l(1p===0){J.1p(0)}18 l(1p+X>=4X.2f-16){J.1p(J[0].2f)}18{J.1p(J[0].2f*3x)}}cm.6l();u 9},3Q:j(){l(1b 3b[1]!=="1N"){l(1b 3b[1]==="j"){3b[1]=$.1r(3b[1],9)}9[3b[0]]=3b[1]}l(1b 3b[0]==="43"&&1b 3b[0].1M==="1N"){$.3Q(11,9,3b[0])}u 9},cj:j(2u,1W){l(1b 1W!=="1N"&&1b 1W==="j"){1W=$.1r(1W,9)}9[2u]=1W;u 9},bZ:j(2u,1W){c f=9.f;l(1b 2u==="43"){f=$.3Q(11,f,2u)}l(1b 2u==="3U"){f[2u]=1W}9.f=f;9.4N();u 9},2l:j(3m,1q){c f=9.f;l(1b f["2l"+3m]!=="1N"){f["2l"+3m]=$.1r(1q,9)}u 9},96:j(3m){c f=9.f;l(1b f["2l"+3m]!=="1N"){f["2l"+3m]=j(){}}u 9},c0:j(1q){c f=9.f;l(f.2r){u 9}l(f.12&&(9.12.1M<1||9.12.1d("."+9.N+"1E").17()==="")){9.4Z()}f.12=11;9.12.1Q();9.26();$.1r(1q||j(){},9)();u 9},cz:j(1q){c f=9.f;f.12=13;9.12.2c();9.26();$.1r(1q||j(){},9)();u 9},9s:j(5J){c 1m=9.1m;c F=9.F;c 12=9.12;c f=9.f;l(1b 5J!=="1N"){f.66=5J}c 9x=j(){c w=$(1K);c 1H=w.1p();l(!f.66){u 13}l(1H-F.5d().1H>10&&1H<19 1c=\\""+N+"12-2n\\"><1G 1c=\\""+N+"1E\\">";F.32(9y);12=9.12=F.1L("."+N+"12")}l(!f.12){12.2c();u 9}12.1Q();c 7j=(1b f.3j==="j")?f.3j():((1b f.3j==="3U")?q.9v[f.3j]:f.3j);c 6a=12.1d("."+9.N+"1E"),1E="";c 60=13;2B(c i=0,2w=7j.1M;i<2w;i++){c 15=7j[i];l(15==="||"){60=11}18 l(15==="|"){1E+="<1U 1c=\\"bA\\" 4S=\\"2l\\">|"}18{c 8o=(/h(\\d)/.2s(15));c 2H=15;l(15==="1l"&&!f.1l){2H="3s"}c 1g=f.21.12[2H];c 52=f.9u[2H];c 4J=f.4G[2H];1g=(1b 1g==="1N")?"":1g;52=(1b 52==="1N")?"":52;4J=(1b 4J==="1N")?"":4J;c 3G=60?"<1U 1c=\\"bt-59\\">":"<1U>";l(1b f.69[15]!=="1N"&&1b f.69[15]!=="j"){3G+=f.69[15]}18{3G+="";3G+=""+((8o)?15.6u():((4J==="")?52:""))+"";3G+=""}3G+="";1E=60?3G+1E:1E+3G}}6a.17(1E);6a.1d("[1g=\\"9t\\"]").2t("1g",f.21.12.2Z);6a.1d("[1g=\\"2v\\"]").2t("1g",f.21.12.2v);9.9n();9.9s();u 9},4t:j(){$.1r(q.4t,9)();u 9},4y:j(M){$.1r(q.4y,9)(M);u 9},79:j(15){c 24=9.24=q.24;u(15&&1b 6d[15]!=="1N")?24[15]:24},9n:j(){c 1f=9;c f=9.f;l(!f.12||f.2r){u 9}c 12=9.12;c cm=9.cm;c N=9.N;c 3j=9.3j=12.1d("."+N+"1E > 1U > a");c 6d=9.79();3j.2h(q.2a("3I","33"),j(22){c 2m=$(9).1L(".fa");c 15=2m.2t("15");c W=cm.1D();c V=cm.1u();l(15===""){u}1f.gP=2m;l(1b 6d[15]!=="1N"){$.1r(6d[15],1f)(cm)}18{l(1b f.24[15]!=="1N"){$.1r(f.24[15],1f)(cm,2m,W,V)}}l(15!=="1z"&&15!=="3N-1z"&&15!=="3d"&&15!=="1J-3e"&&15!=="3C-R"&&15!=="1l"&&15!=="J"&&15!=="2F"&&15!=="1C"&&15!=="2R"){cm.6l()}u 13});u 9},7Q:j(1h){u $.1r(q.7Q,9)(1h)},9c:j(){c 1f=9;c F=9.F;c N=9.N;c 97=["<19 1c=\\""+N+"M "+N+"M-2R\\" 23=\\"\\">","<19 1c=\\""+N+"M-2n\\">","

"+q.1g+"<9z>v"+q.9A+"

","

"+9.21.9C+"

","

"+q.6E+"

","

hl © gk gi, 7s gq gn.

","","",""].42("\\n");F.32(97);c 2p=9.2p=F.1L("."+N+"M-2R");2p.1d("."+N+"M-2U").2h(q.2a("3I","33"),j(){1f.9j()});2p.14("4C",(q.44)?"7Z 7W #7T":"").14("z-2H",q.3M).1Q();9.7c();u 9},7c:j(){c 2p=9.2p;c 7d=j(){2p.14({1H:($(1K).X()-2p.X())/2+"1Z",2g:($(1K).1a()-2p.1a())/2+"1Z"})};7d();$(1K).26(7d);u 9},bp:j(){$("17,2z").14("47-x","4T");c 1f=9;c F=9.F;c f=9.f;c 2p=9.2p=F.1L("."+9.N+"M-2R");l(2p.1M<1){9.9c()}9.2Y(11);9.1Y.14({93:f.9i,8v:f.9h}).1Q();2p.14("z-2H",q.3M).1Q();9.7c();u 9},9j:j(){$("17,2z").14("47-x","");9.2p.2c();9.1Y.2c();9.2Y(13);u 9},2Y:j(4M){q.2Y(4M);9.26();u 9},4N:j(){c 1f=9;c F=9.F;c f=9.f;9.1v.4k();9.6t();l(!f.2r){l(F.1d(".q-M").1M>0){F.1d(".q-M").4k()}l(f.12){9.79();9.4Z()}}9.3r(11);u 9},2Q:j(){c f=9.f;c 1x=9.1x;l(f.2Q){1x.1d("bd").2j("bh bc");l(1b 85!=="1N"){85()}}u 9},6D:j(){l(3S===1F){u 9}9.1x.1d("."+q.2V.1w).3g(j(){c 1w=$(9);q.k.8q(1w.R(),1w[0]);1w.1d(".2S").14("4d-4Y","1.8w")});u 9},9G:j(){c t=9;c f=9.f;c 1x=9.1x;l(q.44){u 9}l(f.2e){l(5m===1F){u 9}1x.1d(".4a").2e()}l(f.2d){1x.1d(".4q-5u").2d({1A:"89"})}c J=t.J;c 1v=t.1v;c 2K=1v.1d(".2G-31");c X=2K.X();c 1p=2K.1p();c 3x=(1p/2K[0].2f);c 4A=0;J.1d(".1s-1i-1I").3g(j(){4A+=$(9).X()});c 35=J.1d(".q-1i-1E").X();35=(!35)?0:35;l(1p===0){J.1p(0)}18 l(1p+X>=2K[0].2f-16){J.1p(J[0].2f)}18{J.1p((J[0].2f+4A+35)*3x)}u 9},a7:j(49){c 1f=9;c cm=9.cm;c f=9.f;c 24=q.24;c 4E=f.4E;49=49||1F;l(49){2B(c i 7y 49){l($.3J(i,4E)<0){c 4L={};4L[i]=49[i];cm.6h(49)}}}18{2B(c k 7y q.6V){c 6p=q.6V[k];c 9f=(1b 6p==="3U")?$.1r(24[6p],1f):$.1r(6p,1f);l($.3J(k,["78","76","77"])<0&&$.3J(k,4E)<0){c 71={};71[k]=9f;cm.6h(71)}}$(1K).go(j(22){c a0={"a3":"78","a2":"76","9X":"77"};l($.3J(a0[22.6b],4E)<0){bb(22.6b){1t a3:$.1r(24["1l"],1f)();u 13;1O;1t a2:$.1r(24["J"],1f)();u 13;1O;1t 9X:$.1r(24["1C"],1f)();u 13;1O;3F:1O}}})}u 9},9V:j(){c 1f=9;c J=9.J;c f=9.f;c 1v=9.1v;c 2a=q.2a;l(!f.6s){u 9}c 7g=j(){1v.1d(".2G-31").2h(2a("31","4P"),j(22){c X=$(9).X();c 1p=$(9).1p();c 3x=(1p/$(9)[0].2f);c 4A=0;J.1d(".1s-1i-1I").3g(j(){4A+=$(9).X()});c 35=J.1d(".q-1i-1E").X();35=(!35)?0:35;l(1p===0){J.1p(0)}18 l(1p+X>=$(9)[0].2f-16){J.1p(J[0].2f)}18{J.1p((J[0].2f+4A+35)*3x)}$.1r(f.9Y,1f)(22)})};c 7l=j(){1v.1d(".2G-31").5n(2a("31","4P"))};c 7m=j(){J.2h(2a("31","4P"),j(22){c X=$(9).X();c 1p=$(9).1p();c 3x=(1p/$(9)[0].2f);c 2K=1v.1d(".2G-31");l(1p===0){2K.1p(0)}18 l(1p+X>=$(9)[0].2f){2K.1p(2K[0].2f)}18{2K.1p(2K[0].2f*3x)}$.1r(f.a4,1f)(22)})};c 6X=j(){J.5n(2a("31","4P"))};1v.2h({5T:7g,ac:7l,7I:7g,33:7l});l(f.6s==="gg"){u 9}J.2h({5T:7m,ac:6X,7I:7m,33:6X});u 9},9J:j(){c 1f=9;c cm=9.cm;c f=9.f;l(!f.6s){u 9}cm.2l("gC",j(gD,gG){l(f.1l){1f.1x.14("5H",f.3h?"3k 3k 9I 9L":"3k")}3S=9E(j(){9H(3S);1f.4I();3S=1F},f.a5)});u 9},3r:j(4N){4N=4N||13;c 1f=9;c F=9.F;c J=9.J;c f=9.f;9.a8.2c();9.4I();l(f.1l){J.1Q()}F.5x("90",F.1a()).5x("91",F.X());9.26();9.a7();$(1K).26(j(){1f.26()});9.9V().9J();l(!4N){$.1r(f.68,9)()}9.1m.3T=11;u 9},1a:j(1a){9.F.14("1a",(1b 1a==="2M")?1a+"1Z":1a);9.26();u 9},X:j(X){9.F.14("X",(1b X==="2M")?X+"1Z":X);9.26();u 9},26:j(1a,X){1a=1a||1F;X=X||1F;c 1m=9.1m;c F=9.F;c J=9.J;c 12=9.12;c f=9.f;c 1v=9.1v;l(1a){F.14("1a",(1b 1a==="2M")?1a+"1Z":1a)}l(f.3h&&!1m.1C&&!1m.J){F.14("X","4f");1v.14("X","4f")}18{l(X){F.14("X",(1b X==="2M")?X+"1Z":X)}l(1m.1C){F.X($(1K).X())}l(f.12&&!f.2r){1v.14("4U-1H",12.X()+1).X(F.X()-12.X())}18{1v.14("4U-1H",0).X(F.X())}}l(f.1l){1v.1a(F.1a()/2);J.1a((!1m.J)?F.1a()/2:F.1a());9.1x.14("5H",f.3h?"3k 3k 9I 9L":"3k");l(f.12&&!f.2r){J.14("1H",12.X()+1)}18{J.14("1H",0)}l(f.3h&&!1m.1C&&!1m.J){J.X("")}18{c 9K=(f.12&&!f.2r)?F.X()-12.X():F.X();J.X(9K)}}18{1v.1a(F.1a());J.2c()}l(1m.3T){$.1r(f.9F,9)()}u 9},4I:j(){c 1f=9;c 1m=9.1m;c f=9.f;l(3S===1F&&!(!f.1l&&1m.J)){u 9}c cm=9.cm;c 6f=cm.5p();c 1x=9.1x;l(f.3i!=="3o"&&f.3i!=="1s"){9.2i.40(6f);u 9}c 2P=q.m;c 2T=9.2T=[];c 5D=9.gv={1i:f.1i,3K:f.3K,3p:f.3p,2x:f.2x,3D:f.3D,1o:f.1o,1w:f.1w,1X:f.1X,36:f.36,2e:f.2e,2d:f.2d,2Q:f.2Q,};c 4w=9.4w={b3:q.2q(2T,5D),3o:11,aT:11,aY:11,aF:13,7A:(f.4m)?13:11,ad:11,ag:11};2P.gt(4w);c 4O=q.m(6f,4w);4O=q.7G(4O,f.4m);9.2i.R(6f);cm.4I();l(f.5j){9.7q.R(4O)}l(f.1l||(!f.1l&&1m.J)){1x.17(4O);9.2Q();l(f.1i){c 1y=(f.1y==="")?1x:$(f.1y);c 6G=1y.1d("."+9.N+"1i-1E");1y.2t("1x",(f.1y==="")?"11":"13");l(f.1y!==""&&6G.1M>0){6G.4k()}q.8a(2T,1y,f.3n,f.3p);l(f.3n||1y.1d("."+9.N+"1i-1E").1M>0){q.80(1y,(f.2D!=="")?f.2D:9.21.2D)}l(f.1y!==""){1x.1d(".1s-1i").14("4C","56")}}l(f.1w){l(!q.5k&&f.6z){q.7L(j(){q.k=2S;q.5k=11;1f.6D()})}18{q.k=2S;9.6D()}}l(f.2e||f.2d){5m=9E(j(){9H(5m);1f.9G();5m=1F},10)}l(1m.3T){$.1r(f.9M,9)()}}u 9},6l:j(){9.cm.6l();u 9},1B:j(W){9.cm.1B(W);u 9},1D:j(){u 9.cm.1D()},9R:j(9U,9T){9.cm.9R(9U,9T);u 9},1u:j(){u 9.cm.1u()},4x:j(9O){9.cm.4x(9O);u 9},9N:j(){u 9.cm.9N()},1j:j(1W){9.cm.1j(1W);u 9},gy:j(1W){9.1j(1W);u 9},6m:j(3H){c f=9.f;c cm=9.cm;cm.4K(cm.5p()+3H);u 9},gx:j(3H){9.cm.4K(3H||9.f.1s);u 9},8U:j(){u 9.cm.5p()},5p:j(){u 9.cm.5p()},4K:j(1W){9.cm.4K(1W);u 9},4n:j(){9.cm.4K("");u 9},8x:j(){l(!9.f.5j){34("3w: f.5j == 13");u 13}u 9.7q.40()},gA:j(){u 9.8x()},gz:j(){l(!9.f.1l){34("3w: f.1l == 13");u 13}u 9.1x.17()},1l:j(1q){c f=9.f;l($.3J(f.3i,["3o","1s"])<0){u 9}9.1m.5A=f.1l=11;9.J.1Q();l(9.12){c 5Q=f.4G.1l;c 5R=f.4G.3s;c 2m=9.12.1d(".fa[15=1l]");2m.4B().2t("1g",f.21.12.1l);2m.3E(5R).2j(5Q)}9.1v.14("4C-59","7Z 7W #7T").1a(9.F.1a()/2);3S=0;9.4I().26();l(!f.5B){f.5B=1q||j(){}}$.1r(f.5B,9)();u 9},3s:j(1q){c f=9.f;9.1m.5A=f.1l=13;9.J.2c();l(9.12){c 5Q=f.4G.1l;c 5R=f.4G.3s;c 2m=9.12.1d(".fa[15=1l]");2m.4B().2t("1g",f.21.12.3s);2m.3E(5Q).2j(5R)}9.1v.14("4C-59","56").1a(9.F.1a());9.26();l(!f.5S){f.5S=1q||j(){}}$.1r(f.5S,9)();u 9},1Q:j(1q){1q=1q||j(){};c 1f=9;9.F.1Q(0,j(){$.1r(1q,1f)()});u 9},2c:j(1q){1q=1q||j(){};c 1f=9;9.F.2c(0,j(){$.1r(1q,1f)()});u 9},8E:j(){c 1f=9;c F=9.F;c J=9.J;c 12=9.12;c f=9.f;c 1v=9.1v;c 1x=9.1x;l($.3J(f.3i,["3o","1s"])<0){u 9}l(f.12&&12){12.8r();12.1d(".fa[15=J]").8k("5r")}1v.8r();c 4u=j(22){l(22.8j&&22.6b===27){1f.5Z()}};l(1v.14("8s")==="56"){9.1m.J=11;l(9.1m.1C){J.14("8d","#7P")}F.1d("."+9.N+"J-2U-2C").1Q().2h(q.2a("3I","33"),j(){1f.5Z()});l(!f.1l){9.4I()}18{1x.14("5H","")}1x.2j(9.N+"J-5r");J.1Q().14({55:"",1H:0,1a:F.1a(),X:(f.3h&&!9.1m.1C)?"4f":F.X()});l(9.1m.3T){$.1r(f.8p,9)()}$(1K).2h("5z",4u)}18{$(1K).5n("5z",4u);9.5Z()}},5Z:j(){c F=9.F;c J=9.J;c 12=9.12;c f=9.f;c 1x=9.1x;c 8u=F.1d("."+9.N+"J-2U-2C");9.1m.J=13;9.1v.1Q();l(f.12){12.1Q()}J[(f.1l)?"1Q":"2c"]();8u.2c().5n(q.2a("3I","33"));1x.3E(9.N+"J-5r");l(f.1l){1x.14("5H","3k")}J.14({8d:1F,55:"8h",1a:F.1a()/2,X:(f.3h&&!9.1m.1C)?"4f":F.X()-12.X(),1H:(f.12)?12.X():0});l(9.1m.3T){$.1r(f.8f,9)()}u 9},1C:j(){c 1f=9;c 1m=9.1m;c F=9.F;c J=9.J;c 12=9.12;c f=9.f;c 5t=9.N+"1C";l(12){12.1d(".fa[15=1C]").4B().8k("5r")}c 4u=j(22){l(!22.8j&&22.6b===27){l(1m.1C){1f.75()}}};l(!F.8A(5t)){1m.1C=11;$("17,2z").14("47","4T");F.14({1a:$(1K).1a(),X:$(1K).X()}).2j(5t);9.26();$.1r(f.8T,9)();$(1K).2h("5z",4u)}18{$(1K).5n("5z",4u);9.75()}u 9},75:j(){c F=9.F;c f=9.f;c 12=9.12;c 5t=9.N+"1C";9.1m.1C=13;l(12){12.1d(".fa[15=1C]").4B().3E("5r")}$("17,2z").14("47","");F.14({1a:F.5x("90"),X:F.5x("91")}).3E(5t);9.26();$.1r(f.8X,9)();u 9},2O:j(15,2b){c 1f=9;c cm=9.cm;c f=9.f;2b=f.5q+2b;l(1b 3B==="j"){l(1b 9[15]==="1N"){34("3w: "+15+" 5o gw 8B gs, gu gB 8B gI 9 5o.");u 9}9[15](cm);u 9}l($.3J(2b,q.4h.5o)<0){q.8L(2b,j(){q.7E[15]=1f[15];1f[15](cm)})}18{$.1r(q.7E[15],9)(cm)}u 9},2F:j(8O){c f=9.f;l(!f.4s){34("3w: f.4s == 13");u 9}l(!f.2r){9.cm.gH(8O||"1d")}u 9},4s:j(){9.2F("1k");u 9},gK:j(){9.2F("gJ");u 9}};q.fn.6Z.5P=q.fn;q.4t=j(){c f=9.f||{4t:11};l(f.4t){$("17,2z").14("47","4T");9.26()}};q.4y=j(M){c F=9.F;c f=9.f||{4y:11};M.14({1H:($(1K).X()-M.X())/2+"1Z",2g:($(1K).1a()-M.1a())/2+"1Z"});l(f.4y){F.1L("."+9.N+"1Y").14("z-2H",4H(M.14("z-2H"))-1).1Q()}};q.24={3t:j(){9.cm.3t()},3W:j(){9.cm.3W()},2A:j(){c cm=9.cm;c W=cm.1D();c V=cm.1u();cm.1j("**"+V+"**");l(V===""){cm.1B(W.1e,W.ch+2)}},4l:j(){c cm=9.cm;c W=cm.1D();c V=cm.1u();cm.1j("~~"+V+"~~");l(V===""){cm.1B(W.1e,W.ch+2)}},3O:j(){c cm=9.cm;c W=cm.1D();c V=cm.1u();cm.1j("*"+V+"*");l(V===""){cm.1B(W.1e,W.ch+1)}},48:j(){c cm=9.cm;c W=cm.1D();c V=cm.1u();l(W.ch!==0){cm.1B(W.1e,0);cm.1j("> "+V);cm.1B(W.1e,W.ch+2)}18{cm.1j("> "+V)}},5F:j(){c cm=9.cm;c V=cm.1u();c 3v=cm.6r();cm.1j(q.5e(V));cm.4x(3v)},2v:j(){c cm=9.cm;c V=cm.1u();c 3v=cm.6r();cm.1j(q.au(V));cm.4x(3v)},4r:j(){c cm=9.cm;c V=cm.1u();c 3v=cm.6r();cm.1j(V.6u());cm.4x(3v)},2Z:j(){c cm=9.cm;c W=cm.1D();c V=cm.1u();c 3v=cm.6r();cm.1j(V.4j());cm.4x(3v)},h1:j(){c cm=9.cm;c W=cm.1D();c V=cm.1u();l(W.ch!==0){cm.1B(W.1e,0);cm.1j("# "+V);cm.1B(W.1e,W.ch+2)}18{cm.1j("# "+V)}},h2:j(){c cm=9.cm;c W=cm.1D();c V=cm.1u();l(W.ch!==0){cm.1B(W.1e,0);cm.1j("## "+V);cm.1B(W.1e,W.ch+3)}18{cm.1j("## "+V)}},h3:j(){c cm=9.cm;c W=cm.1D();c V=cm.1u();l(W.ch!==0){cm.1B(W.1e,0);cm.1j("### "+V);cm.1B(W.1e,W.ch+4)}18{cm.1j("### "+V)}},h4:j(){c cm=9.cm;c W=cm.1D();c V=cm.1u();l(W.ch!==0){cm.1B(W.1e,0);cm.1j("#### "+V);cm.1B(W.1e,W.ch+5)}18{cm.1j("#### "+V)}},h5:j(){c cm=9.cm;c W=cm.1D();c V=cm.1u();l(W.ch!==0){cm.1B(W.1e,0);cm.1j("##### "+V);cm.1B(W.1e,W.ch+6)}18{cm.1j("##### "+V)}},h6:j(){c cm=9.cm;c W=cm.1D();c V=cm.1u();l(W.ch!==0){cm.1B(W.1e,0);cm.1j("###### "+V);cm.1B(W.1e,W.ch+7)}18{cm.1j("###### "+V)}},"1I-1G":j(){c cm=9.cm;c W=cm.1D();c V=cm.1u();l(V===""){cm.1j("- "+V)}18{c 2I=V.3R("\\n");2B(c i=0,2w=2I.1M;i<2w;i++){2I[i]=(2I[i]==="")?"":"- "+2I[i]}cm.1j(2I.42("\\n"))}},"1I-3Y":j(){c cm=9.cm;c W=cm.1D();c V=cm.1u();l(V===""){cm.1j("1. "+V)}18{c 2I=V.3R("\\n");2B(c i=0,2w=2I.1M;i<2w;i++){2I[i]=(2I[i]==="")?"":(i+1)+". "+2I[i]}cm.1j(2I.42("\\n"))}},45:j(){c cm=9.cm;c W=cm.1D();c V=cm.1u();cm.1j(((W.ch!==0)?"\\n\\n":"\\n")+"------------\\n\\n")},1w:j(){l(!9.f.1w){34("f.1w === 13");u 9}c cm=9.cm;c W=cm.1D();c V=cm.1u();cm.1j("$"+V+"$");l(V===""){cm.1B(W.1e,W.ch+2)}},1z:j(){9.2O("gE","1z-M/1z-M")},"3N-1z":j(){9.2O("gr","3N-1z-M/3N-1z-M")},5c:j(){l(!9.f.2x){34("f.2x === 13");u 9}c cm=9.cm;c V=cm.1u();cm.1j("\\r\\n[========]\\r\\n")},3d:j(){9.2O("ge","3d-M/3d-M")},1J:j(){c cm=9.cm;c W=cm.1D();c V=cm.1u();cm.1j("`"+V+"`");l(V===""){cm.1B(W.1e,W.ch+1)}},"1J-3e":j(){9.2O("gd","1J-3e-M/1J-3e-M")},"3C-R":j(){9.2O("gf","3C-R-M/3C-R-M")},3L:j(){9.2O("gc","3L-M/3L-M")},4V:j(){c cm=9.cm;c V=cm.1u();c 2J=38 7R();c 6M=9.f.21.15;c 1S=q.7N()+" "+q.7N((6M==="6O-cn"||6M==="6O-7f")?"cn-61-30":"61-30");cm.1j(1S)},1o:j(){9.2O("g9","1o-M/1o-M")},"17-46":j(){9.2O("g8","17-46-M/17-46-M")},"3P-1e":j(){9.2O("gb","3P-1e-M/3P-1e-M")},1l:j(){9[9.f.1l?"3s":"1l"]()},J:j(){9.8E()},1C:j(){9.1C()},4n:j(){9.4n()},2F:j(){9.2F()},2X:j(){9.2O("gh","2X-M/2X-M")},2R:j(){9.bp()}};q.6V={"1n-1":"h1","1n-2":"h2","1n-3":"h3","1n-4":"h4","1n-5":"h5","1n-6":"h6","1n-B":"2A","1n-D":"4V","1n-E":j(){c cm=9.cm;c W=cm.1D();c V=cm.1u();l(!9.f.1o){34("3w: f.1o == 13");u}cm.1j(":"+V+":");l(V===""){cm.1B(W.1e,W.ch+1)}},"1n-3q-G":"3P-1e","1n-H":"45","1n-I":"3O","1n-K":"1J","1n-L":j(){c cm=9.cm;c W=cm.1D();c V=cm.1u();c 1g=(V==="")?"":" \\""+V+"\\"";cm.1j("["+V+"]("+1g+")");l(V===""){cm.1B(W.1e,W.ch+1)}},"1n-U":"1I-1G","1P-1n-A":j(){c cm=9.cm;c W=cm.1D();c V=cm.1u();l(!9.f.1X){34("3w: f.1X == 13");u}cm.1j("@"+V);l(V===""){cm.1B(W.1e,W.ch+1)}},"1P-1n-C":"1J","1P-1n-Q":"48","1P-1n-S":"4l","1P-1n-K":"1w","1P-3q-C":j(){c cm=9.cm;c W=cm.1D();c V=cm.1u();cm.1j(["```",V,"```"].42("\\n"));l(V===""){cm.1B(W.1e,W.ch+3)}},"1P-1n-3q-C":"1J-3e","1P-1n-H":"17-46","1P-3q-H":"2X","1P-1n-E":"1o","1P-1n-U":"4r","1P-3q-U":"2v","1P-1n-3q-U":"5F","1P-3q-L":"2Z","1P-1n-I":j(){c cm=9.cm;c W=cm.1D();c V=cm.1u();c 1g=(V==="")?"":" \\""+V+"\\"";cm.1j("!["+V+"]("+1g+")");l(V===""){cm.1B(W.1e,W.ch+4)}},"1P-1n-3q-I":"3d","1P-1n-L":"1z","1P-1n-O":"1I-3Y","1P-1n-P":"3C-R","1P-1n-T":"3L","1P-3q-P":"5c","78":"1l","76":"J","77":"1C",};c 4g=j(3V){u(!7J.5P.4g)?3V.1k(/^[\\s\\bn\\aw]+|[\\s\\bn\\aw]+$/g,""):3V.4g()};q.4g=4g;c 2v=j(3V){u 3V.4j().1k(/\\b(\\w)|\\s(\\w)/g,j($1){u $1.6u()})};q.2v=q.au=2v;c 5e=j(3V){u 3V.4j().1k(/\\b(\\w)/,j($1){u $1.6u()})};c 5F=5e;q.5e=q.5F=5e;q.aM={aQ:"5h://5I.41/"};q.2E={1X:/@(\\w+)/g,aj:/(\\w+)@(\\w+)\\.(\\w+)\\.?(\\w+)?/g,36:/(aK:)?([\\w\\.\\3c]+)@(\\w+)\\.(\\w+)\\.?(\\w+)?/g,1o:/:([\\w\\+-]+):/g,al:/(\\d{2}:\\d{2}:\\d{2})/g,3f:/:(7f-([\\w]+)-?(\\w+)?):/g,ao:/:(fa-([\\w]+)(-(\\w+)){0,}):/g,aq:/:(q-5i-?(\\w+)?):/g,2x:/^\\[[=]{8,}\\]$/};q.1o={2b:"5h://gN.gM.41/gL/1o-gQ-gO/gX/hc/",63:".6c"};q.3f={2b:"hb://3f.ha.41/hf/",63:".6c"};q.2q=j(2T,1h){c 3z={1i:11,3K:13,3p:1,2x:11,1X:11,36:11,3D:13,1o:13,1w:13,2e:13,2d:13,};c f=$.3Q(3z,1h||{});c 2P=q.m;c 2q=38 2P.bq();2T=2T||[];c 2E=q.2E;c 54=2E.1X;c am=2E.1o;c aI=2E.aj;c aS=2E.36;c aV=2E.3f;c aW=2E.ao;c aU=2E.aq;c 6W=2E.2x;2q.1o=j(R){R=R.1k(q.2E.al,j($1){u $1.1k(/:/g,":")});c 4z=R.5s(am);l(!4z||!f.1o){u R}2B(c i=0,2w=4z.1M;i<2w;i++){l(4z[i]===":+1:"){4z[i]=":\\\\+1:"}R=R.1k(38 ah(4z[i]),j($1,$2){c 5K=$1.5s(aW);c 15=$1.1k(/:/g,"");l(5K){2B(c fa=0,aX=5K.1M;fa"}}18{c 5w=$1.5s(aU);c 64=$1.5s(aV);l(5w){2B(c x=0,aZ=5w.1M;x"}}18 l(64){2B(c t=0,b5=64.1M;t"}}18{c 2N=(15==="+1")?"he":15;2N=(2N==="hd")?"h0":2N;2N=(2N==="gZ")?"gY":2N;u""}}})}u R};2q.1X=j(R){l(54.2s(R)){l(f.1X){R=R.1k(aI,j($1,$2,$3,$4){u $1.1k(/@/g,"3c#3c@3c#3c")});R=R.1k(54,j($1,$2){u""+$1+""}).1k(/3c#3c@3c#3c/g,"@")}l(f.36){R=R.1k(aS,j($1,$2,$3,$4,$5){u(!$2&&$.3J($5,"aN|aO|6c|aB|aG|h9|2m|h8".3R("|"))<0)?""+$1+"":$1})}u R}u R};2q.1z=j(1R,1g,R){l(9.1h.7A){9Z{c aJ=h7(gS(1R)).1k(/[^\\w:]/g,"").4j()}a9(e){u""}l(aJ.aR("3l:")===0){u""}}c 4e=""+R.1k(/@/g,"@")+""}l(1g){4e+=" 1g=\\""+1g+"\\""}4e+=">"+R+"";u 4e};2q.eV=j(R,25,eU){c az=R;c 6R=/\\s*\\]*)\\>(.*)\\<\\/a\\>\\s*/;c eT=/\\s*\\]+)\\>([^\\>]*)\\<\\/a\\>\\s*/g;l(6R.2s(R)){c 6C=[];R=R.3R(/\\]+)\\>([^\\>]*)\\<\\/a\\>/);2B(c i=0,2w=R.1M;i<2w;i++){6C.4c(R[i].1k(/\\s*1R\\=\\"(.*)\\"\\s*/g,""))}R=6C.42(" ")}R=4g(R);c ap=R.4j().1k(/[^\\w]+/g,"-");c 1i={R:R,25:25,eY:ap};c ae=/^[\\eX-\\eW]+$/.2s(R);c 1V=(ae)?eS(R).1k(/\\%/g,""):R.4j().1k(/[^\\w]+/g,"-");2T.4c(1i);c 4b="";4b+="";4b+="<5N 1c=\\"6q-1z aA aA-1z\\">";4b+=(6R)?9.1X(9.1o(az)):9.1X(9.1o(R));4b+="";u 4b};2q.2x=j(R){l(6W.2s(R)&&f.2x){R="<45 23=\\"6Q-1O-eN:eM;\\" 1c=\\"6Q-1O q-6Q-1O\\" />"}u R};2q.eR=j(R){c as=/\\$\\$(.*)\\$\\$/g.2s(R);c 5O=/^\\$\\$(.*)\\$\\$/.2s(R);c b6=(5O)?" 1c=\\""+q.2V.1w+"\\"":"";c ax=(f.3K)?/^(\\[aE\\]|\\[ay\\])$/.2s(R):/^\\[aE\\]$/.2s(R);c av=/^\\[ay\\]$/.2s(R);l(!5O&&as){R=R.1k(/(\\$\\$([^\\$]*)\\$\\$)+/g,j($1,$2){u"<5N 1c=\\""+q.2V.1w+"\\">"+$2.1k(/\\$/g,"")+""})}18{R=(5O)?R.1k(/\\$/g,""):R}c 3A="<19 1c=\\"1s-1i q-1s-1i\\">"+R+"";u(ax)?((av)?"<19 1c=\\"q-1i-1E\\">"+3A+"
":3A):((6W.2s(R))?9.2x(R):""+9.1X(9.1o(R))+"

\\n")};2q.1J=j(1J,21,eQ){l(21==="eP"||21==="4q"){u"<19 1c=\\"4q-5u\\">"+1J+""}18 l(21==="eZ"){u"<19 1c=\\"4a\\">"+1J+""}18 l(21==="f9"||21==="f8"||21==="2S"){u"

"+1J+"

"}18{u 2P.bq.5P.1J.fd(9,3b)}};2q.fc=j(6v,5Y){c 3y=(5Y.6q)?"fb":"f6";c 51=(5Y.6K)?"<"+3y+" 23=\\"R-6K:"+5Y.6K+"\\">":"<"+3y+">";u 51+9.1X(9.1o(6v))+"\\n"};2q.f2=j(R){l(f.3D&&/^\\s*\\[[x\\s]\\]\\s*/.2s(R)){R=R.1k(/^\\s*\\[\\s\\]\\s*/," ").1k(/^\\s*\\[x\\]\\s*/," ");u"<1U 23=\\"1I-23: 56;\\">"+9.1X(9.1o(R))+""}18{u"<1U>"+9.1X(9.1o(R))+""}};u 2q};q.8a=j(1i,2n,3n,5W){c 17="";c 57=0;c N=9.N;5W=5W||1;2B(c i=0,2w=1i.1M;i<2w;i++){c R=1i[i].R;c 25=1i[i].25;l(25<5W){f4}l(25>57){17+=""}18 l(25<57){17+=(38 f3(57-25+2)).42("")}18{17+=""}17+="<1U>"+R+"<1G>";57=25}c 1y=2n.1d(".1s-1i");l((1y.1M<1&&2n.2t("1x")==="13")){c 3A="<19 1c=\\"1s-1i "+N+"1s-1i\\">";3A=(3n)?"<19 1c=\\""+N+"1i-1E\\">"+3A+"":3A;2n.17(3A);1y=2n.1d(".1s-1i")}l(3n){1y.et("<19 1c=\\""+N+"1i-1E\\">
")}1y.17("<1G 1c=\\"1s-1i-1I\\">").1L(".1s-1i-1I").17(17.1k(/\\r?\\n?\\<1G\\>\\<\\/1G\\>/g,""));u 1y};q.80=j(2n,2D){2D=2D||"es ex ew";c 7D=ev;c 7v=2n.1d("."+9.N+"1i-1E");7v.3g(j(){c t=$(9);c 1i=t.1L(".1s-1i");c 2m="";c 2C=""+2m+2D+"";c 1E=1i.1L("1G");c 1I=1E.1d("1U");1i.32(2C);1I.84().em("<1U>

"+2D+" "+2m+"

");t.5T(j(){1E.1Q();1I.3g(j(){c 1U=$(9);c 1G=1U.1L("1G");l(1G.17()===""){1G.4k()}l(1G.1M>0&&1G.17()!==""){c 87=1U.1L("a").84();l(87.1L(".fa").1M<1){87.32($(2m).14({ep:"59",eo:"ey"}))}}1U.5T(j(){1G.14("z-2H",7D).1Q();7D+=1}).ar(j(){1G.2c()})})}).ar(j(){1E.2c()})});u 7v};q.7G=j(17,7B){l(1b 17!=="3U"){17=38 7J(17)}l(1b 7B!=="3U"){u 17}c 7z=7B.3R("|");c 7K=7z[0].3R(",");c 53=7z[1];2B(c i=0,2w=7K.1M;i<2w;i++){c 51=7K[i];17=17.1k(38 ah("\\<\\s*"+51+"\\s*([^\\>]*)\\>([^\\>]*)\\<\\s*\\/"+51+"\\s*\\>","eL"),"")}l(1b 53!=="1N"){c 62=/\\<(\\w+)\\s*([^\\>]*)\\>([^\\>]*)\\<\\/(\\w+)\\>/eK;l(53==="*"){17=17.1k(62,j($1,$2,$3,$4,$5){u"<"+$2+">"+$4+""})}18 l(53==="2l*"){17=17.1k(62,j($1,$2,$3,$4,$5){c el=$("<"+$2+">"+$4+"");c aL=$($1)[0].eJ;c a={};$.3g(aL,j(i,e){l(e.aP!==\'"\')a[e.aP]=e.eF});$.3g(a,j(i){l(i.aR("2l")===0){eB a[i]}});el.2t(a);c R=(1b el[1]!=="1N")?$(el[1]).R():"";u el[0].b1+R})}18{17=17.1k(62,j($1,$2,$3,$4){c 7w=53.3R(",");c el=$($1);el.17($4);$.3g(7w,j(i){el.2t(7w[i],1F)});u el[0].b1})}}u 17};q.eA=j(1V,1h){c 3z={3o:11,1i:11,3K:13,3p:1,2D:"b0",3n:13,1y:"",1s:"",bm:13,4m:13,8i:11,2x:11,1X:11,36:11,1w:13,3D:13,1o:13,2e:13,2d:13,2Q:11};q.m=2P;c 19=$("#"+1V);c f=19.f=$.3Q(11,3z,1h||{});c 3Z=19.1d("28");l(3Z.1M<1){19.32("<28>");3Z=19.1d("28")}c 5b=(f.1s==="")?3Z.40():f.1s;c 2T=[];c 5D={1i:f.1i,3K:f.3K,3p:f.3p,3D:f.3D,1o:f.1o,1w:f.1w,2x:f.2x,1X:f.1X,36:f.36,2e:f.2e,2d:f.2d,2Q:f.2Q,};c 4w={b3:q.2q(2T,5D),3o:f.3o,aT:11,aY:11,aF:13,7A:(f.4m)?13:11,ad:11,ag:11};5b=38 7J(5b);c 5E=2P(5b,4w);5E=q.7G(5E,f.4m);l(f.bm){3Z.R(5b)}18{3Z.4k()}19.2j("1s-2z "+9.N+"17-J").32(5E);c 1y=(f.1y!=="")?$(f.1y):19;l(f.1y!==""){1y.2t("1x",13)}l(f.1i){19.1y=9.8a(2T,1y,f.3n,f.3p);l(f.3n||19.1d("."+9.N+"1i-1E").1M>0){9.80(19,f.2D)}l(f.1y!==""){19.1d(".q-1i-1E, .q-1s-1i").4k()}}l(f.2Q){19.1d("bd").2j("bh bc");85()}l(!q.44){l(f.2e){19.1d(".4a").2e()}l(f.2d){19.1d(".4q-5u").2d({1A:"89"})}}l(f.1w){c 81=j(){19.1d("."+q.2V.1w).3g(j(){c 1w=$(9);2S.8q(1w.17().1k(//g,">"),1w[0]);1w.1d(".2S").14("4d-4Y","1.8w")})};l(f.8i&&!q.k&&!q.5k){9.7L(j(){q.k=2S;q.5k=11;81()})}18{81()}}19.8U=j(){u 3Z.40()};u 19};q.fR=["3F","3u"];q.fN=["3F","3u"];q.fJ=["3F","8S-30","8S-88","8P","8P-fI","8R-3u","8R-7F","fH","fM","fL","fK","fU-3u","g4-3u","g3","g2-g7","g6","g5","g1","fX","88","8H-3u","8H-7F","fW-2l-3u","fV","g0","fZ-fY","fp-88-fo","fm","fs-fr","8K-3u","8K-7F"];q.7E={};q.4h={4D:[],14:[],5o:[]};q.8L=j(2W,1q,39){1q=1q||j(){};9.29(2W,j(){q.4h.5o.4c(2W);1q()},39)};q.3a=j(2W,1q,39){39=39||"4i";1q=1q||j(){};c 14=2k.8Q("1z");14.3y="R/14";14.fl="fh";14.68=14.7Y=j(){q.4h.14.4c(2W);1q()};14.1R=2W+".14";l(39==="4i"){2k.8l("4i")[0].5X(14)}18{2k.2z.5X(14)}};q.8Y=(92.fg=="ff fk fj");q.44=(q.8Y&&92.fi.5s(/8./i)=="8.");q.29=j(2W,1q,39){39=39||"4i";1q=1q||j(){};c 2o=1F;2o=2k.8Q("2o");2o.1V=2W.1k(/[\\./]+/g,"-");2o.3y="R/3l";2o.2N=2W+".4D";l(q.44){2o.7Y=j(){l(2o.7U){l(2o.7U==="3T"||2o.7U==="fD"){2o.7Y=1F;q.4h.4D.4c(2W);1q()}}}}18{2o.68=j(){q.4h.4D.4c(2W);1q()}}l(39==="4i"){2k.8l("4i")[0].5X(2o)}18{2k.2z.5X(2o)}};q.7O={14:"//8e.8g.41/8z/8t/8n/0.3.0/2S.1T",4D:"//8e.8g.41/8z/8t/8n/0.3.0/2S.1T"};q.5k=13;q.7L=j(1q){q.3a(q.7O.14,j(){q.29(q.7O.4D,1q||j(){})})};q.2Y=j(4M){$("17,2z").14("47",(4M)?"4T":"")};q.7Q=j(1h){c 3z={15:"",1a:fG,X:fF,1g:"",7H:11,9S:11,6v:"",1Y:11,ab:{8v:"#7P",93:0.1},2Y:11,2L:11,4Q:13};1h=$.3Q(11,3z,1h);c t=9;c F=9.F;c N=q.N;c 9P=(38 7R()).aD();c 7S=((1h.15==="")?N+"M-"+9P:1h.15);c 2a=q.2a;c 17="<19 1c=\\""+N+"M "+7S+"\\">";l(1h.1g!==""){17+="<19 1c=\\""+N+"M-6q\\""+((1h.7H)?" 23=\\"W: 7C;\\"":"")+">";17+="<9Q 1c=\\""+N+"M-1g\\">"+1h.1g+"";17+=""}l(1h.9S){17+=""}17+="<19 1c=\\""+N+"M-2n\\">"+1h.6v;l(1h.2L||1b 1h.2L==="3U"){17+="<19 1c=\\""+N+"M-2L\\">"+((1b 1h.2L==="fE")?"":1h.2L)+""}17+="";17+="<19 1c=\\""+N+"M-1Y "+N+"M-1Y-bg\\">";17+="<19 1c=\\""+N+"M-1Y "+N+"M-1Y-fA\\">";17+="";F.32(17);c M=F.1d("."+7S);M.2Y=j(4M){l(1h.2Y){$("17,2z").14("47",(4M)?"4T":"");t.26()}u M};M.aa=j(){l(1h.1Y){F.1d("."+N+"1Y").14(1h.ab).14("z-2H",q.3M-1).1Q()}u M};M.9W=j(){l(1h.1Y){F.1d("."+N+"1Y").2c()}u M};M.7X=j(1Q){c 7X=M.1d("."+N+"M-1Y");7X[(1Q)?"1Q":"2c"]();u M};M.2Y(11).aa();M.1Q().14({fw:q.3M,4C:(q.44)?"7Z 7W #7T":"",1a:(1b 1h.1a==="2M")?1h.1a+"1Z":1h.1a,X:(1b 1h.X==="2M")?1h.X+"1Z":1h.X});c 7V=j(){M.14({1H:($(1K).X()-M.X())/2+"1Z",2g:($(1K).1a()-M.1a())/2+"1Z"})};7V();$(1K).26(7V);M.1L("."+N+"M-2U").2h(2a("3I","33"),j(){M.2c().2Y(13).9W()});l(1b 1h.4Q==="43"){c 2L=M.2L=M.1d("."+N+"M-2L");2B(c 2u 7y 1h.4Q){c 2C=1h.4Q[2u];c 7x=N+2u+"-2C";2L.32("<9D 1c=\\""+N+"2C "+7x+"\\">"+2C[0]+"");2C[1]=$.1r(2C[1],M);2L.1L("."+7x).2h(2a("3I","33"),2C[1])}}l(1h.1g!==""&&1h.7H){c 8c,86;c 4R=M.1L("."+N+"M-6q");l(!1h.1Y){4R.2h(2a("3I","33"),j(){q.3M+=2;M.14("z-2H",q.3M)})}4R.fz(j(e){e=e||1K.22;8c=e.9l-4H(M[0].23.2g);86=e.9m-4H(M[0].23.1H);2k.58=99});c 6L=j(5G){5G.3E(N+"9a-9b").96("98")};c 8b=j(5G){5G.2j(N+"9a-9b").2l("98",j(22){u 13})};c 99=j(e){e=e||1K.22;c 2g,1H,83=4H(M[0].23.2g),9p=4H(M[0].23.1H);l(83>=0){l(83+M.1a()<=$(1K).1a()){2g=e.9l-8c}18{2g=$(1K).1a()-M.1a();2k.58=1F}}18{2g=0;2k.58=1F}l(9p>=0){1H=e.9m-86}18{1H=0;2k.58=1F}2k.8W=j(){u 13};8b($("2z"));8b(M);M[0].23.2g=2g+"1Z";M[0].23.1H=1H+"1Z"};2k.fx=j(){6L($("2z"));6L(M);2k.8W=1F;2k.58=1F};4R.a1=j(){c 5d=1F;c 9g=j(e){c 4F=e.9o;c 82=$(9).4B().55();5d={x:4F.5L[0].95-82.2g,y:4F.5L[0].9w-82.1H}};c 7C=j(e){e.fy();c 4F=e.9o;$(9).4B().14({1H:4F.5L[0].9w-5d.y,2g:4F.5L[0].95-5d.x})};9.2h("7I",9g).2h("4P",7C)};4R.a1()}q.3M+=2;u M};q.2a=j(6o,6w){6o=6o||"3I";6w=6w||"33";c 3m=6o;9Z{2k.fu("fv");3m=6w}a9(e){}u 3m};q.7N=j(5M){5M=5M||"";c 3X=j(d){u(d<10)?"0"+d:d};c 2J=38 7R();c 5f=2J.fB();c 7M=5f.fC().ft(2,4);c 5g=3X(2J.fq()+1);c 30=3X(2J.fS());c 7n=2J.fT();c 6n=3X(2J.fO());c 1T=3X(2J.fP());c 6g=3X(2J.fQ());c 4v=3X(2J.fe());c 1S="";c 8C=7M+"-"+5g+"-"+30;c 6k=5f+"-"+5g+"-"+30;c 7a=6n+":"+1T+":"+6g;bb(5M){1t"eC eD":1S=2J.aD();1O;1t"eE":1S=2J.ez();1O;1t"8D":1S=7M;1O;1t"5f":1t"5V":1S=5f;1O;1t"5g":1t"5l":1S=5g;1O;1t"cn-61-30":1t"cn-ak":c bo=["eG","eH","eI","eq","ek","eu","f1"];1S="f7"+bo[7n];1O;1t"61-30":1t"ak":c 8y=["gV","gW","gR","hn","hg","hk","hi"];1S=8y[7n];1O;1t"30":1t"dd":1S=30;1O;1t"6n":1t"hh":1S=6n;1O;1t"1T":1t"ga":1S=1T;1O;1t"6g":1t"gF":1S=6g;1O;1t"4v":1S=4v;1O;1t"8D-5l-dd":1S=8C;1O;1t"5V-5l-dd":1S=6k;1O;1t"5V-5l-dd h:i:s 4v":1t"5C + 4v":1S=6k+" "+7a+" "+4v;1O;1t"5C":1t"5V-5l-dd h:i:s":3F:1S=6k+" "+7a;1O}u 1S};u q}));',62,1078,'|||||||||this|||var|||settings||||function||if|||||editormd||||return|||||||||||editor||||preview|||dialog|classPrefix||||text||||selection|cursor|height||||true|toolbar|false|css|name||html|else|div|width|typeof|class|find|line|_0|title|options|toc|replaceSelection|replace|watch|state|Ctrl|emoji|scrollTop|callback|proxy|markdown|case|getSelection|codeMirror|tex|previewContainer|tocContainer|link|theme|setCursor|fullscreen|getCursor|menu|null|ul|top|list|code|window|children|length|undefined|break|Shift|show|href|datefmt|min|li|id|value|atLink|mask|px|loadPath|lang|event|style|toolbarHandlers|level|resize||textarea|loadScript|mouseOrTouch|path|hide|sequenceDiagram|flowChart|scrollHeight|left|bind|markdownTextarea|addClass|document|on|icon|container|script|infoDialog|markedRenderer|readOnly|test|attr|key|ucwords|len|pageBreak|codemirror|body|bold|for|btn|tocTitle|regexs|search|CodeMirror|index|selectionText|date|codeView|footer|number|src|executePlugin|marked|previewCodeHighlight|info|katex|markdownToC|close|classNames|fileName|help|lockScreen|lowercase|day|scroll|append|touchend|alert|tocMenuHeight|emailLink|错误|new|into|loadCSS|arguments|_|image|block|twemoji|each|autoHeight|mode|toolbarIcons|20px|javascript|eventType|tocDropdown|gfm|tocStartLevel|Alt|loadedDisplay|unwatch|undo|dark|selections|Error|percent|type|defaults|tocHTML|define|preformatted|taskList|removeClass|default|menuItem|md|click|inArray|tocm|table|dialogZindex|reference|italic|goto|extend|split|timer|loaded|string|str|redo|addZero|ol|saveTo|val|com|join|object|isIE8|hr|entities|overflow|quote|keyMap|flowchart|headingHTML|push|font|out|auto|trim|loadFiles|head|toLowerCase|remove|del|htmlDecode|clear|themePrefix|editorTheme|sequence|uppercase|searchReplace|dialogLockScreen|escHandle|ms|markedOptions|setSelections|dialogShowMask|matchs|tocHeight|parent|border|js|disabledKeyMaps|orig|toolbarIconsClass|parseInt|save|iconClass|setValue|map|lock|recreate|newMarkdownDoc|touchmove|buttons|dialogHeader|unselectable|hidden|margin|datetime|previewTheme|cmScroll|size|setToolbar||tag|iconTexts|attrs|atLinkReg|position|none|lastLevel|onmousemove|right|addon|markdownDoc|pagebreak|offset|firstUpperCase|year|month|https|logo|saveHTMLToTextarea|kaTeXLoaded|mm|flowchartTimer|unbind|plugin|getValue|pluginPath|active|match|fullscreenClass|diagram|factory|emdlogoMathcs|data|100|keyup|watching|onwatch|full|rendererOptions|markdownParsed|ucfirst|obj|padding|github|fixed|faMatchs|changedTouches|format|span|isTeXLine|prototype|watchIcon|unWatchIcon|onunwatch|mouseover|checkbox|yyyy|startLevel|appendChild|flags|previewed|pullRight|week|htmlTagRegex|ext|twemojiMatchs|twe|toolbarAutoFixed|alt|onload|toolbarCustomIcons|toolbarMenu|keyCode|png|toolbarIconHandlers|oldTheme|cmValue|second|addKeyMap|lineNumbers|count|fymd|focus|appendMarkdown|hour|mouseEventType|_1|header|listSelections|syncScrolling|setCodeMirror|toUpperCase|content|touchEventType|indentUnit|autoCloseTags|autoLoadModules|codeFold|lineWrapping|tempText|katexRender|homePage|fontSize|tocMenu|autoCloseBrackets|url|matchWordHighlight|align|userCanSelect|langName|showTrailingSpace|zh|indentWithTabs|page|hasLinkReg|matchBrackets|styleActiveLine|styleSelectedText|keyMaps|pageBreakReg|previewUnbindScroll|_3|init|setOption|_4|jquery|amd|target|fullscreenExit|F10|F11|F9|getToolbarHandles|hms|loadFlowChartOrSequenceDiagram|infoDialogPosition|_2|placeholder|tw|cmBindScroll|tabSize|logoName|icons|gotoLine|cmUnbindScroll|previewBindScroll|weekDay|pandao|faName|htmlTextarea|coords|The|clientHeight|bottom|tocMenus|filterAttrs|btnClassName|in|expression|sanitize|filters|move|zindex|loadPlugins|light|filterHTMLTags|drag|touchstart|String|filterTags|loadKaTeX|year2|dateFormat|katexURL|fff|createDialog|Date|dialogName|ddd|readyState|dialogPosition|solid|loading|onreadystatechange|1px|tocDropdownMenu|katexHandle|pos|nowLeft|first|prettyPrint|posY|firstA|night|simple|markdownToCRenderer|userUnselect|posX|background|cdnjs|onpreviewed|cloudflare|absolute|autoLoadKaTeX|shiftKey|toggleClass|getElementsByTagName|removeKeyMap|KaTeX|isHeader|onpreviewing|render|toggle|display|libs|previewCloseBtn|backgroundColor|6em|getHTML|weekDays|ajax|hasClass|not|ymd|yy|previewing|file|Markdown|paraiso|codeMirrorConfig|eye|xq|loadPlugin|gutters|circle|command|ambiance|createElement|base16|3024|onfullscreen|getMarkdown|autoFocus|onselectstart|onfullscreenExit|isIE|foldgutter|oldWidth|oldHeight|navigator|opacity|hover|pageX|off|infoDialogHTML|selectstart|moveAction|user|unselect|createInfoDialog|jQuery|strict|handle|start|dialogMaskBgColor|dialogMaskOpacity|hideInfoDialog|use|clientX|clientY|setToolbarHandler|originalEvent|nowTop|exports|module|setToolbarAutoFixed|Lowercase|toolbarIconTexts|toolbarModes|pageY|autoFixedHandle|toolbarHTML|small|version|10px|description|button|setTimeout|onresize|flowChartAndSequenceDiagramRender|clearTimeout|50px|bindChangeEvent|previewHeight|40px|onchange|getSelections|ranges|guid|strong|setSelection|closed|to|from|bindScrollEvent|hideMask|122|onscroll|try|keymaps|touchDraggable|121|120|onpreviewscroll|delay|scrollInfo|registerKeyMaps|containerMask|catch|showMask|maskStyle|mouseout|smartLists|isChinese|appendElements|smartypants|RegExp|loadQueues|email|wd|emojiDatetime|emojiReg||fontAwesome|escapedText|editormdLogo|mouseleave|isTeXInline||wordsFirstUpperCase|isToCMenu|xA0|isToC|TOCM|linkText|octicon|gif|matchesonscrollbar|getTime|TOC|pedantic|webp|img|emailReg|prot|mailto|_5|urls|jpg|jpeg|nodeName|atLinkBase|indexOf|emailLinkReg|tables|editormdLogoReg|twemojiReg|faIconReg|len1|breaks|len2|目录|outerHTML|使用帮助|renderer|Editor|len3|isTeXAddClass|链接标题|urlEmpty|代码块|urlTitle|switch|linenums|pre||添加图片||prettyprint|input|task|链接地址|setEditorTheme|markdownSourceCode|uFEFF|cnWeekDays|showInfoDialog|Renderer||item|pull|ESC还原|otherLanguage|300|其他语言|请填写引用链接的ID|请填写链接地址|divider|添加链接|nameEmpty|请选择代码语言|charCoords|添加引用链接|按|coding|引用名称|13px|range|urlId|dialogDraggable|now|链接ID|Enjoy|unselectedLanguageAlert|请选择代码所属的语言类型|referenceLink|idEmpty|imageUpload|getScrollInfo|引用链接的名称不能为空|codeEmptyAlert|local|config|showToolbar|imageURLEmpty|请填写预格式文本或代码的内容|搜索|io|清空|enter|codeBlock|Zepto|formatNotAllowed|上传的图片不能为空|只允许上传图片文件|preformattedText|允许上传的图片文件格式有|添加预格式文本或代码块|emptyAlert|图片地址不能为空||uploadFileEmpty|set|添加代码块|lib|||图片地址|按ESC还原|scrollTo|selectDefaultText|关闭|请填写引用链接的URL地址|取消|全屏|关于|selectLabel|mini|hideToolbar|本地上传|uploadButton|cancel|图片链接|确定|图片描述|代码语言|重做|粗体|删除线|online|modes|撤销|foldGutter|foldCode|引用|addons|linenumbers|斜体|source|onselected|eraser|showToken|cmElement|fromTextArea|codeEditor|开源在线Markdown编辑器|Open|多语言风格|question|highlightSelectionMatches|fold|预格式文本|有序列表|setTheme|标题6|dragDrop|无序列表|行内代码||setPreviewTheme|引用链接|横线|setCodeMirrorTheme|链接|标题5|将所选转换成小写|标题1|标题2|extraKeys|将每个单词首字母转成大写|将所选转换成大写|标题4|prettify|autofocus|标题3|缩进风格|nocursor|uploadCallbackURL|跳转到行|toolbarTitles|crossDomainUpload|实体字符|99999|24px|3px|Aa|插入分页符|HTML实体字符|Emoji表情|imageUploadURL|integer|must|bmp|imageFormats|全窗口预览HTML|请填写代码内容|last|HTML|lineCount|开启实时预览|关闭实时预览|htmlEntities|Infinity|newspaper|viewportMargin|underscore|smile|copyright|添加表格|desktop|arrows|terminal|slash|日期时间|raphael|anchor|picture|plugins|repeat|strikethrough|minus|setCodeMirrorOption|getOption|getCodeMirrorOption|doc|vertical|clock|四||before|down|paddingTop|float|三|angle|Table|wrap|五|400|Contents|of|4px|toUTCString|markdownToHTML|delete|UNIX|Time|UTC|nodeValue|日|一|二|attributes|ig|igm|always|after|headerPrefix|seq|escaped|paragraph|escape|getLinkTextReg|raw|heading|u9fa5|u4e00|slug|flow|checked|六|listitem|Array|continue|disabled|td|星期|latex|math||th|tablecell|apply|getMilliseconds|Microsoft|appName|stylesheet|appVersion|Explorer|Internet|rel|twilight||eighties|tomorrow|getMonth|ink|vibrant|slice|createEvent|TouchEvent|zIndex|onmouseup|preventDefault|mousedown|con|getFullYear|toString|complete|boolean|240|420|blackboard|mobile|editorThemes|elegant|eclipse|cobalt|previewThemes|getHours|getMinutes|getSeconds|themes|getDate|getDay|erlang|rubyblue|pastel|neo|matrix|the|solarized|neat|mdn|mbo|lesser|monokai|midnight|like|htmlEntitiesDialog|emojiDialog|ii|gotoLineDialog|tableDialog|codeBlockDialog|imageDialog|preformattedTextDialog|single|helpDialog|Pandao|blob|2015|require|master|License|keydown|LICENSE|MIT|referenceLinkDialog|found|setOptions|you|markedRendererOptions|is|setMarkdown|insertValue|getPreviewedHTML|getTextareaSavedHTML|are|change|_6|linkDialog|ss|changeObj|execCommand|load|replaceAll|searchReplaceAll|tools|webpagefx|www|sheet|activeIcon|cheat|Tuesday|unescape|color|lg|Sunday|Monday|graphics|waxing_gibbous_moon|moon|black_square|||||||decodeURIComponent|pdf|ico|maxcdn|http|emojis|black_large_square|plus1|36x36|Thursday||Saturday|external|Friday|Copyright|85em|Wednesday'.split('|'),0,{})) +!function(a){"use strict";"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?module.exports=a:"function"==typeof define?define.amd||define(["jquery"],a):window.editormd=a()}(function(){"use strict";var b,c,d,e,f,g,a="undefined"!=typeof jQuery?jQuery:Zepto;if("undefined"!=typeof a)return b=function(a,c){return new b.fn.init(a,c)},b.title=b.$name="Editor.md",b.version="1.5.0",b.homePage="https://pandao.github.io/editor.md/",b.classPrefix="editormd-",b.toolbarModes={full:["undo","redo","|","bold","del","italic","quote","ucwords","uppercase","lowercase","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","link","reference-link","image","code","preformatted-text","code-block","table","datetime","emoji","html-entities","pagebreak","|","goto-line","watch","preview","fullscreen","clear","search","|","help","info"],simple:["undo","redo","|","bold","del","italic","quote","uppercase","lowercase","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","watch","preview","fullscreen","|","help","info"],mini:["undo","redo","|","watch","preview","|","help","info"]},b.defaults={mode:"gfm",name:"",value:"",theme:"",editorTheme:"default",previewTheme:"",markdown:"",appendMarkdown:"",width:"100%",height:"100%",path:"./lib/",pluginPath:"",delay:300,autoLoadModules:!0,watch:!0,placeholder:"Enjoy Markdown! coding now...",gotoLine:!0,codeFold:!1,autoHeight:!1,autoFocus:!0,autoCloseTags:!0,searchReplace:!0,syncScrolling:!0,readOnly:!1,tabSize:4,indentUnit:4,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,showTrailingSpace:!0,matchBrackets:!0,indentWithTabs:!0,styleSelectedText:!0,matchWordHighlight:!0,styleActiveLine:!0,dialogLockScreen:!0,dialogShowMask:!0,dialogDraggable:!0,dialogMaskBgColor:"#fff",dialogMaskOpacity:.1,fontSize:"13px",saveHTMLToTextarea:!1,disabledKeyMaps:[],onload:function(){},onresize:function(){},onchange:function(){},onwatch:null,onunwatch:null,onpreviewing:function(){},onpreviewed:function(){},onfullscreen:function(){},onfullscreenExit:function(){},onscroll:function(){},onpreviewscroll:function(){},imageUpload:!1,imageFormats:["jpg","jpeg","gif","png","bmp","webp"],imageUploadURL:"",crossDomainUpload:!1,uploadCallbackURL:"",toc:!0,tocm:!1,tocTitle:"",tocDropdown:!1,tocContainer:"",tocStartLevel:1,htmlDecode:!1,pageBreak:!0,atLink:!0,emailLink:!0,taskList:!1,emoji:!1,tex:!1,flowChart:!1,sequenceDiagram:!1,previewCodeHighlight:!0,toolbar:!0,toolbarAutoFixed:!0,toolbarIcons:"full",toolbarTitles:{},toolbarHandlers:{ucwords:function(){return b.toolbarHandlers.ucwords},lowercase:function(){return b.toolbarHandlers.lowercase}},toolbarCustomIcons:{lowercase:'a',ucwords:'Aa'},toolbarIconsClass:{undo:"fa-undo",redo:"fa-repeat",bold:"fa-bold",del:"fa-strikethrough",italic:"fa-italic",quote:"fa-quote-left",uppercase:"fa-font",h1:b.classPrefix+"bold",h2:b.classPrefix+"bold",h3:b.classPrefix+"bold",h4:b.classPrefix+"bold",h5:b.classPrefix+"bold",h6:b.classPrefix+"bold","list-ul":"fa-list-ul","list-ol":"fa-list-ol",hr:"fa-minus",link:"fa-link","reference-link":"fa-anchor",image:"fa-picture-o",code:"fa-code","preformatted-text":"fa-file-code-o","code-block":"fa-file-code-o",table:"fa-table",datetime:"fa-clock-o",emoji:"fa-smile-o","html-entities":"fa-copyright",pagebreak:"fa-newspaper-o","goto-line":"fa-terminal",watch:"fa-eye-slash",unwatch:"fa-eye",preview:"fa-desktop",search:"fa-search",fullscreen:"fa-arrows-alt",clear:"fa-eraser",help:"fa-question-circle",info:"fa-info-circle"},toolbarIconTexts:{},lang:{name:"zh-cn",description:"开源在线Markdown编辑器
Open source online Markdown editor.",tocTitle:"目录",toolbar:{undo:"撤销(Ctrl+Z)",redo:"重做(Ctrl+Y)",bold:"粗体",del:"删除线",italic:"斜体",quote:"引用",ucwords:"将每个单词首字母转成大写",uppercase:"将所选转换成大写",lowercase:"将所选转换成小写",h1:"标题1",h2:"标题2",h3:"标题3",h4:"标题4",h5:"标题5",h6:"标题6","list-ul":"无序列表","list-ol":"有序列表",hr:"横线",link:"链接","reference-link":"引用链接",image:"添加图片",code:"行内代码","preformatted-text":"预格式文本 / 代码块(缩进风格)","code-block":"代码块(多语言风格)",table:"添加表格",datetime:"日期时间",emoji:"Emoji表情","html-entities":"HTML实体字符",pagebreak:"插入分页符","goto-line":"跳转到行",watch:"关闭实时预览",unwatch:"开启实时预览",preview:"全窗口预览HTML(按 Shift + ESC还原)",fullscreen:"全屏(按ESC还原)",clear:"清空",search:"搜索",help:"使用帮助",info:"关于"+b.title},buttons:{enter:"确定",cancel:"取消",close:"关闭"},dialog:{link:{title:"添加链接",url:"链接地址",urlTitle:"链接标题",urlEmpty:"错误:请填写链接地址。"},referenceLink:{title:"添加引用链接",name:"引用名称",url:"链接地址",urlId:"链接ID",urlTitle:"链接标题",nameEmpty:"错误:引用链接的名称不能为空。",idEmpty:"错误:请填写引用链接的ID。",urlEmpty:"错误:请填写引用链接的URL地址。"},image:{title:"添加图片",url:"图片地址",link:"图片链接",alt:"图片描述",uploadButton:"本地上传",imageURLEmpty:"错误:图片地址不能为空。",uploadFileEmpty:"错误:上传的图片不能为空。",formatNotAllowed:"错误:只允许上传图片文件,允许上传的图片文件格式有:"},preformattedText:{title:"添加预格式文本或代码块",emptyAlert:"错误:请填写预格式文本或代码的内容。"},codeBlock:{title:"添加代码块",selectLabel:"代码语言:",selectDefaultText:"请选择代码语言",otherLanguage:"其他语言",unselectedLanguageAlert:"错误:请选择代码所属的语言类型。",codeEmptyAlert:"错误:请填写代码内容。"},htmlEntities:{title:"HTML 实体字符"},help:{title:"使用帮助"}}}},b.classNames={tex:b.classPrefix+"tex"},b.dialogZindex=99999,b.$katex=null,b.$marked=null,b.$CodeMirror=null,b.$prettyPrint=null,b.prototype=b.fn={state:{watching:!1,loaded:!1,preview:!1,fullscreen:!1},init:function(c,d){var f,g,h,i,j,k;return d=d||{},"object"==typeof c&&(d=c),f=this.classPrefix=b.classPrefix,g=this.settings=a.extend(!0,{},b.defaults,d),c="object"==typeof c?g.id:c,h=this.editor=a("#"+c),this.id=c,this.lang=g.lang,i=this.classNames={textarea:{html:f+"html-textarea",markdown:f+"markdown-textarea"}},g.pluginPath=""===g.pluginPath?g.path+"../plugins/":g.pluginPath,this.state.watching=g.watch?!0:!1,h.hasClass("editormd")||h.addClass("editormd"),h.css({width:"number"==typeof g.width?g.width+"px":g.width,height:"number"==typeof g.height?g.height+"px":g.height}),g.autoHeight&&h.css("height","auto"),j=this.markdownTextarea=h.children("textarea"),j.length<1&&(h.append(""),j=this.markdownTextarea=h.children("textarea")),j.addClass(i.textarea.markdown).attr("placeholder",g.placeholder),("undefined"==typeof j.attr("name")||""===j.attr("name"))&&j.attr("name",""!==g.name?g.name:c+"-markdown-doc"),k=[g.readOnly?"":'',g.saveHTMLToTextarea?'':"",'
','
','
'].join("\n"),h.append(k).addClass(f+"vertical"),""!==g.theme&&h.addClass(f+"theme-"+g.theme),this.mask=h.children("."+f+"mask"),this.containerMask=h.children("."+f+"container-mask"),""!==g.markdown&&j.val(g.markdown),""!==g.appendMarkdown&&j.val(j.val()+g.appendMarkdown),this.htmlTextarea=h.children("."+i.textarea.html),this.preview=h.children("."+f+"preview"),this.previewContainer=this.preview.children("."+f+"preview-container"),""!==g.previewTheme&&this.preview.addClass(f+"preview-theme-"+g.previewTheme),"function"==typeof define&&define.amd&&("undefined"!=typeof katex&&(b.$katex=katex),g.searchReplace&&!g.readOnly&&(b.loadCSS(g.path+"codemirror/addon/dialog/dialog"),b.loadCSS(g.path+"codemirror/addon/search/matchesonscrollbar"))),"function"==typeof define&&define.amd||!g.autoLoadModules?("undefined"!=typeof CodeMirror&&(b.$CodeMirror=CodeMirror),"undefined"!=typeof marked&&(b.$marked=marked),this.setCodeMirror().setToolbar().loadedDisplay()):this.loadQueues(),this},loadQueues:function(){var a=this,c=this.settings,d=c.path,e=function(){return b.isIE8?(a.loadedDisplay(),void 0):(c.flowChart||c.sequenceDiagram?b.loadScript(d+"raphael.min",function(){b.loadScript(d+"underscore.min",function(){!c.flowChart&&c.sequenceDiagram?b.loadScript(d+"sequence-diagram.min",function(){a.loadedDisplay()}):c.flowChart&&!c.sequenceDiagram?b.loadScript(d+"flowchart.min",function(){b.loadScript(d+"jquery.flowchart.min",function(){a.loadedDisplay()})}):c.flowChart&&c.sequenceDiagram&&b.loadScript(d+"flowchart.min",function(){b.loadScript(d+"jquery.flowchart.min",function(){b.loadScript(d+"sequence-diagram.min",function(){a.loadedDisplay()})})})})}):a.loadedDisplay(),void 0)};return b.loadCSS(d+"codemirror/codemirror.min"),c.searchReplace&&!c.readOnly&&(b.loadCSS(d+"codemirror/addon/dialog/dialog"),b.loadCSS(d+"codemirror/addon/search/matchesonscrollbar")),c.codeFold&&b.loadCSS(d+"codemirror/addon/fold/foldgutter"),b.loadScript(d+"codemirror/codemirror.min",function(){b.$CodeMirror=CodeMirror,b.loadScript(d+"codemirror/modes.min",function(){b.loadScript(d+"codemirror/addons.min",function(){return a.setCodeMirror(),"gfm"!==c.mode&&"markdown"!==c.mode?(a.loadedDisplay(),!1):(a.setToolbar(),b.loadScript(d+"marked.min",function(){b.$marked=marked,c.previewCodeHighlight?b.loadScript(d+"prettify.min",function(){e()}):e()}),void 0)})})}),this},setTheme:function(a){var b=this.editor,c=this.settings.theme,d=this.classPrefix+"theme-";return b.removeClass(d+c).addClass(d+a),this.settings.theme=a,this},setEditorTheme:function(a){var c=this.settings;return c.editorTheme=a,"default"!==a&&b.loadCSS(c.path+"codemirror/theme/"+c.editorTheme),this.cm.setOption("theme",a),this},setCodeMirrorTheme:function(a){return this.setEditorTheme(a),this},setPreviewTheme:function(a){var b=this.preview,c=this.settings.previewTheme,d=this.classPrefix+"preview-theme-";return b.removeClass(d+c).addClass(d+a),this.settings.previewTheme=a,this},setCodeMirror:function(){var d,a=this.settings,c=this.editor;return"default"!==a.editorTheme&&b.loadCSS(a.path+"codemirror/theme/"+a.editorTheme),d={mode:a.mode,theme:a.editorTheme,tabSize:a.tabSize,dragDrop:!1,autofocus:a.autoFocus,autoCloseTags:a.autoCloseTags,readOnly:a.readOnly?"nocursor":!1,indentUnit:a.indentUnit,lineNumbers:a.lineNumbers,lineWrapping:a.lineWrapping,extraKeys:{"Ctrl-Q":function(a){a.foldCode(a.getCursor())}},foldGutter:a.codeFold,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],matchBrackets:a.matchBrackets,indentWithTabs:a.indentWithTabs,styleActiveLine:a.styleActiveLine,styleSelectedText:a.styleSelectedText,autoCloseBrackets:a.autoCloseBrackets,showTrailingSpace:a.showTrailingSpace,highlightSelectionMatches:a.matchWordHighlight?{showToken:"onselected"===a.matchWordHighlight?!1:/\w/}:!1},this.codeEditor=this.cm=b.$CodeMirror.fromTextArea(this.markdownTextarea[0],d),this.codeMirror=this.cmElement=c.children(".CodeMirror"),""!==a.value&&this.cm.setValue(a.value),this.codeMirror.css({fontSize:a.fontSize,width:a.watch?"50%":"100%"}),a.autoHeight&&(this.codeMirror.css("height","auto"),this.cm.setOption("viewportMargin",1/0)),a.lineNumbers||this.codeMirror.find(".CodeMirror-gutters").css("border-right","none"),this},getCodeMirrorOption:function(a){return this.cm.getOption(a)},setCodeMirrorOption:function(a,b){return this.cm.setOption(a,b),this},addKeyMap:function(a,b){return this.cm.addKeyMap(a,b),this},removeKeyMap:function(a){return this.cm.removeKeyMap(a),this},gotoLine:function(b){var d,f,g,h,i,j,k,l,m,n,c=this.settings;return c.gotoLine?(d=this.cm,this.editor,f=d.lineCount(),g=this.preview,"string"==typeof b&&("last"===b&&(b=f),"first"===b&&(b=1)),"number"!=typeof b?(alert("Error: The line number must be an integer."),this):(b=parseInt(b)-1,b>f?(alert("Error: The line number range 1-"+f),this):(d.setCursor({line:b,ch:0}),h=d.getScrollInfo(),i=h.clientHeight,j=d.charCoords({line:b,ch:0},"local"),d.scrollTo(null,(j.top+j.bottom-i)/2),c.watch&&(k=this.codeMirror.find(".CodeMirror-scroll")[0],l=a(k).height(),m=k.scrollTop,n=m/k.scrollHeight,0===m?g.scrollTop(0):m+l>=k.scrollHeight-16?g.scrollTop(g[0].scrollHeight):g.scrollTop(g[0].scrollHeight*n)),d.focus(),this))):this},extend:function(){return"undefined"!=typeof arguments[1]&&("function"==typeof arguments[1]&&(arguments[1]=a.proxy(arguments[1],this)),this[arguments[0]]=arguments[1]),"object"==typeof arguments[0]&&"undefined"==typeof arguments[0].length&&a.extend(!0,this,arguments[0]),this},set:function(b,c){return"undefined"!=typeof c&&"function"==typeof c&&(c=a.proxy(c,this)),this[b]=c,this},config:function(b,c){var d=this.settings;return"object"==typeof b&&(d=a.extend(!0,d,b)),"string"==typeof b&&(d[b]=c),this.settings=d,this.recreate(),this},on:function(b,c){var d=this.settings;return"undefined"!=typeof d["on"+b]&&(d["on"+b]=a.proxy(c,this)),this},off:function(a){var b=this.settings;return"undefined"!=typeof b["on"+a]&&(b["on"+a]=function(){}),this},showToolbar:function(b){var c=this.settings;return c.readOnly?this:(c.toolbar&&(this.toolbar.length<1||""===this.toolbar.find("."+this.classPrefix+"menu").html())&&this.setToolbar(),c.toolbar=!0,this.toolbar.show(),this.resize(),a.proxy(b||function(){},this)(),this)},hideToolbar:function(b){var c=this.settings;return c.toolbar=!1,this.toolbar.hide(),this.resize(),a.proxy(b||function(){},this)(),this},setToolbarAutoFixed:function(b){var g,c=this.state,d=this.editor,e=this.toolbar,f=this.settings;return"undefined"!=typeof b&&(f.toolbarAutoFixed=b),g=function(){var b=a(window),c=b.scrollTop();return f.toolbarAutoFixed?(c-d.offset().top>10&&c
    ',c.append(g),f=this.toolbar=c.children("."+e+"toolbar")),!a.toolbar)return f.hide(),this;for(f.show(),h="function"==typeof a.toolbarIcons?a.toolbarIcons():"string"==typeof a.toolbarIcons?b.toolbarModes[a.toolbarIcons]:a.toolbarIcons,i=f.find("."+this.classPrefix+"menu"),j="",k=!1,l=0,m=h.length;m>l;l++)n=h[l],"||"===n?k=!0:"|"===n?j+='
  • |
  • ':(o=/h(\d)/.test(n),p=n,"watch"!==n||a.watch||(p="unwatch"),q=a.lang.toolbar[p],r=a.toolbarIconTexts[p],s=a.toolbarIconsClass[p],q="undefined"==typeof q?"":q,r="undefined"==typeof r?"":r,s="undefined"==typeof s?"":s,t=k?'
  • ':"
  • ","undefined"!=typeof a.toolbarCustomIcons[n]&&"function"!=typeof a.toolbarCustomIcons[n]?t+=a.toolbarCustomIcons[n]:(t+='',t+=''+(o?n.toUpperCase():""===s?r:"")+"",t+=""),t+="
  • ",j=k?t+j:j+t);return i.html(j),i.find('[title="Lowercase"]').attr("title",a.lang.toolbar.lowercase),i.find('[title="ucwords"]').attr("title",a.lang.toolbar.ucwords),this.setToolbarHandler(),this.setToolbarAutoFixed(),this},dialogLockScreen:function(){return a.proxy(b.dialogLockScreen,this)(),this},dialogShowMask:function(c){return a.proxy(b.dialogShowMask,this)(c),this},getToolbarHandles:function(a){var c=this.toolbarHandlers=b.toolbarHandlers;return a&&"undefined"!=typeof toolbarIconHandlers[a]?c[a]:c},setToolbarHandler:function(){var e,f,g,h,i,c=this,d=this.settings;return!d.toolbar||d.readOnly?this:(e=this.toolbar,f=this.cm,g=this.classPrefix,h=this.toolbarIcons=e.find("."+g+"menu > li > a"),i=this.getToolbarHandles(),h.bind(b.mouseOrTouch("click","touchend"),function(){var e=a(this).children(".fa"),g=e.attr("name"),h=f.getCursor(),j=f.getSelection();if(""!==g)return c.activeIcon=e,"undefined"!=typeof i[g]?a.proxy(i[g],c)(f):"undefined"!=typeof d.toolbarHandlers[g]&&a.proxy(d.toolbarHandlers[g],c)(f,e,h,j),"link"!==g&&"reference-link"!==g&&"image"!==g&&"code-block"!==g&&"preformatted-text"!==g&&"watch"!==g&&"preview"!==g&&"search"!==g&&"fullscreen"!==g&&"info"!==g&&f.focus(),!1}),this)},createDialog:function(c){return a.proxy(b.createDialog,this)(c)},createInfoDialog:function(){var f,a=this,c=this.editor,d=this.classPrefix,e=['
    ','
    ','

    '+b.title+"v"+b.version+"

    ","

    "+this.lang.description+"

    ",'

    '+b.homePage+'

    ','

    Copyright © 2015 Pandao, The MIT License.

    ',"
    ",'',"
    "].join("\n");return c.append(e),f=this.infoDialog=c.children("."+d+"dialog-info"),f.find("."+d+"dialog-close").bind(b.mouseOrTouch("click","touchend"),function(){a.hideInfoDialog()}),f.css("border",b.isIE8?"1px solid #ddd":"").css("z-index",b.dialogZindex).show(),this.infoDialogPosition(),this},infoDialogPosition:function(){var b=this.infoDialog,c=function(){b.css({top:(a(window).height()-b.height())/2+"px",left:(a(window).width()-b.width())/2+"px"})};return c(),a(window).resize(c),this},showInfoDialog:function(){var d,e,f;return a("html,body").css("overflow-x","hidden"),d=this.editor,e=this.settings,f=this.infoDialog=d.children("."+this.classPrefix+"dialog-info"),f.length<1&&this.createInfoDialog(),this.lockScreen(!0),this.mask.css({opacity:e.dialogMaskOpacity,backgroundColor:e.dialogMaskBgColor}).show(),f.css("z-index",b.dialogZindex).show(),this.infoDialogPosition(),this},hideInfoDialog:function(){return a("html,body").css("overflow-x",""),this.infoDialog.hide(),this.mask.hide(),this.lockScreen(!1),this},lockScreen:function(a){return b.lockScreen(a),this.resize(),this},recreate:function(){var b=this.editor,c=this.settings;return this.codeMirror.remove(),this.setCodeMirror(),c.readOnly||(b.find(".editormd-dialog").length>0&&b.find(".editormd-dialog").remove(),c.toolbar&&(this.getToolbarHandles(),this.setToolbar())),this.loadedDisplay(!0),this},previewCodeHighlight:function(){var a=this.settings,b=this.previewContainer;return a.previewCodeHighlight&&(b.find("pre").addClass("prettyprint linenums"),"undefined"!=typeof prettyPrint&&prettyPrint()),this},katexRender:function(){return null===c?this:(this.previewContainer.find("."+b.classNames.tex).each(function(){var c=a(this);b.$katex.render(c.text(),c[0]),c.find(".katex").css("font-size","1.6em")}),this)},flowChartAndSequenceDiagramRender:function(){var g,h,i,j,k,l,m,n,c=this,e=this.settings,f=this.previewContainer;if(b.isIE8)return this;if(e.flowChart){if(null===d)return this;f.find(".flowchart").flowChart()}return e.sequenceDiagram&&f.find(".sequence-diagram").sequenceDiagram({theme:"simple"}),g=c.preview,h=c.codeMirror,i=h.find(".CodeMirror-scroll"),j=i.height(),k=i.scrollTop(),l=k/i[0].scrollHeight,m=0,g.find(".markdown-toc-list").each(function(){m+=a(this).height()}),n=g.find(".editormd-toc-menu").height(),n=n?n:0,0===k?g.scrollTop(0):k+j>=i[0].scrollHeight-16?g.scrollTop(g[0].scrollHeight):g.scrollTop((g[0].scrollHeight+m+n)*l),this},registerKeyMaps:function(c){var i,j,k,l,m,n,d=this,e=this.cm,f=this.settings,g=b.toolbarHandlers,h=f.disabledKeyMaps;if(c=c||null)for(i in c)a.inArray(i,h)<0&&(j={},j[i]=c[i],e.addKeyMap(c));else{for(k in b.keyMaps)l=b.keyMaps[k],m="string"==typeof l?a.proxy(g[l],d):a.proxy(l,d),a.inArray(k,["F9","F10","F11"])<0&&a.inArray(k,h)<0&&(n={},n[k]=m,e.addKeyMap(n));a(window).keydown(function(b){var c={120:"F9",121:"F10",122:"F11"};if(a.inArray(c[b.keyCode],h)<0)switch(b.keyCode){case 120:return a.proxy(g["watch"],d)(),!1;case 121:return a.proxy(g["preview"],d)(),!1;case 122:return a.proxy(g["fullscreen"],d)(),!1}})}return this},bindScrollEvent:function(){var h,i,j,k,c=this,d=this.preview,e=this.settings,f=this.codeMirror,g=b.mouseOrTouch;return e.syncScrolling?(h=function(){f.find(".CodeMirror-scroll").bind(g("scroll","touchmove"),function(b){var j,f=a(this).height(),g=a(this).scrollTop(),h=g/a(this)[0].scrollHeight,i=0;d.find(".markdown-toc-list").each(function(){i+=a(this).height()}),j=d.find(".editormd-toc-menu").height(),j=j?j:0,0===g?d.scrollTop(0):g+f>=a(this)[0].scrollHeight-16?d.scrollTop(d[0].scrollHeight):d.scrollTop((d[0].scrollHeight+i+j)*h),a.proxy(e.onscroll,c)(b)})},i=function(){f.find(".CodeMirror-scroll").unbind(g("scroll","touchmove"))},j=function(){d.bind(g("scroll","touchmove"),function(b){var d=a(this).height(),g=a(this).scrollTop(),h=g/a(this)[0].scrollHeight,i=f.find(".CodeMirror-scroll");0===g?i.scrollTop(0):g+d>=a(this)[0].scrollHeight?i.scrollTop(i[0].scrollHeight):i.scrollTop(i[0].scrollHeight*h),a.proxy(e.onpreviewscroll,c)(b)})},k=function(){d.unbind(g("scroll","touchmove"))},f.bind({mouseover:h,mouseout:i,touchstart:h,touchend:i}),"single"===e.syncScrolling?this:(d.bind({mouseover:j,mouseout:k,touchstart:j,touchend:k}),this)):this},bindChangeEvent:function(){var a=this,b=this.cm,d=this.settings;return d.syncScrolling?(b.on("change",function(){d.watch&&a.previewContainer.css("padding",d.autoHeight?"20px 20px 50px 40px":"20px"),c=setTimeout(function(){clearTimeout(c),a.save(),c=null},d.delay)}),this):this},loadedDisplay:function(b){var c,d,e,f;return b=b||!1,c=this,d=this.editor,e=this.preview,f=this.settings,this.containerMask.hide(),this.save(),f.watch&&e.show(),d.data("oldWidth",d.width()).data("oldHeight",d.height()),this.resize(),this.registerKeyMaps(),a(window).resize(function(){c.resize()}),this.bindScrollEvent().bindChangeEvent(),b||a.proxy(f.onload,this)(),this.state.loaded=!0,this},width:function(a){return this.editor.css("width","number"==typeof a?a+"px":a),this.resize(),this},height:function(a){return this.editor.css("height","number"==typeof a?a+"px":a),this.resize(),this},resize:function(b,c){var d,e,f,g,h,i,j;return b=b||null,c=c||null,d=this.state,e=this.editor,f=this.preview,g=this.toolbar,h=this.settings,i=this.codeMirror,b&&e.css("width","number"==typeof b?b+"px":b),!h.autoHeight||d.fullscreen||d.preview?(c&&e.css("height","number"==typeof c?c+"px":c),d.fullscreen&&e.height(a(window).height()),h.toolbar&&!h.readOnly?i.css("margin-top",g.height()+1).height(e.height()-g.height()):i.css("margin-top",0).height(e.height())):(e.css("height","auto"),i.css("height","auto")),h.watch?(i.width(e.width()/2),f.width(d.preview?e.width():e.width()/2),this.previewContainer.css("padding",h.autoHeight?"20px 20px 50px 40px":"20px"),h.toolbar&&!h.readOnly?f.css("top",g.height()+1):f.css("top",0),!h.autoHeight||d.fullscreen||d.preview?(j=h.toolbar&&!h.readOnly?e.height()-g.height():e.height(),f.height(j)):f.height("")):(i.width(e.width()),f.hide()),d.loaded&&a.proxy(h.onresize,this)(),this},save:function(){var h,i,j,k,l,m,n,o,p,q,e=this,f=this.state,g=this.settings;return null!==c||!g.watch&&f.preview?(h=this.cm,i=h.getValue(),j=this.previewContainer,"gfm"!==g.mode&&"markdown"!==g.mode?(this.markdownTextarea.val(i),this):(k=b.$marked,l=this.markdownToC=[],m=this.markedRendererOptions={toc:g.toc,tocm:g.tocm,tocStartLevel:g.tocStartLevel,pageBreak:g.pageBreak,taskList:g.taskList,emoji:g.emoji,tex:g.tex,atLink:g.atLink,emailLink:g.emailLink,flowChart:g.flowChart,sequenceDiagram:g.sequenceDiagram,previewCodeHighlight:g.previewCodeHighlight},n=this.markedOptions={renderer:b.markedRenderer(l,m),gfm:!0,tables:!0,breaks:!0,pedantic:!1,sanitize:g.htmlDecode?!1:!0,smartLists:!0,smartypants:!0},k.setOptions(n),o=b.$marked(i,n),o=b.filterHTMLTags(o,g.htmlDecode),this.markdownTextarea.text(i),h.save(),g.saveHTMLToTextarea&&this.htmlTextarea.text(o),(g.watch||!g.watch&&f.preview)&&(j.html(o),this.previewCodeHighlight(),g.toc&&(p=""===g.tocContainer?j:a(g.tocContainer),q=p.find("."+this.classPrefix+"toc-menu"),p.attr("previewContainer",""===g.tocContainer?"true":"false"),""!==g.tocContainer&&q.length>0&&q.remove(),b.markdownToCRenderer(l,p,g.tocDropdown,g.tocStartLevel),(g.tocDropdown||p.find("."+this.classPrefix+"toc-menu").length>0)&&b.tocDropdownMenu(p,""!==g.tocTitle?g.tocTitle:this.lang.tocTitle),""!==g.tocContainer&&j.find(".markdown-toc").css("border","none")),g.tex&&(!b.kaTeXLoaded&&g.autoLoadModules?b.loadKaTeX(function(){b.$katex=katex,b.kaTeXLoaded=!0,e.katexRender()}):(b.$katex=katex,this.katexRender())),(g.flowChart||g.sequenceDiagram)&&(d=setTimeout(function(){clearTimeout(d),e.flowChartAndSequenceDiagramRender(),d=null},10)),f.loaded&&a.proxy(g.onchange,this)()),this)):this},focus:function(){return this.cm.focus(),this},setCursor:function(a){return this.cm.setCursor(a),this},getCursor:function(){return this.cm.getCursor()},setSelection:function(a,b){return this.cm.setSelection(a,b),this},getSelection:function(){return this.cm.getSelection()},setSelections:function(a){return this.cm.setSelections(a),this},getSelections:function(){return this.cm.getSelections()},replaceSelection:function(a){return this.cm.replaceSelection(a),this},insertValue:function(a){return this.replaceSelection(a),this},appendMarkdown:function(a){this.settings;var c=this.cm;return c.setValue(c.getValue()+a),this},setMarkdown:function(a){return this.cm.setValue(a||this.settings.markdown),this},getMarkdown:function(){return this.cm.getValue()},getValue:function(){return this.cm.getValue()},setValue:function(a){return this.cm.setValue(a),this},clear:function(){return this.cm.setValue(""),this},getHTML:function(){return this.settings.saveHTMLToTextarea?this.htmlTextarea.val():(alert("Error: settings.saveHTMLToTextarea == false"),!1)},getTextareaSavedHTML:function(){return this.getHTML()},getPreviewedHTML:function(){return this.settings.watch?this.previewContainer.html():(alert("Error: settings.watch == false"),!1)},watch:function(b){var e,f,g,d=this.settings;return a.inArray(d.mode,["gfm","markdown"])<0?this:(this.state.watching=d.watch=!0,this.preview.show(),this.toolbar&&(e=d.toolbarIconsClass.watch,f=d.toolbarIconsClass.unwatch,g=this.toolbar.find(".fa[name=watch]"),g.parent().attr("title",d.lang.toolbar.watch),g.removeClass(f).addClass(e)),this.codeMirror.css("border-right","1px solid #ddd").width(this.editor.width()/2),c=0,this.save().resize(),d.onwatch||(d.onwatch=b||function(){}),a.proxy(d.onwatch,this)(),this)},unwatch:function(b){var d,e,f,c=this.settings;return this.state.watching=c.watch=!1,this.preview.hide(),this.toolbar&&(d=c.toolbarIconsClass.watch,e=c.toolbarIconsClass.unwatch,f=this.toolbar.find(".fa[name=watch]"),f.parent().attr("title",c.lang.toolbar.unwatch),f.removeClass(d).addClass(e)),this.codeMirror.css("border-right","none").width(this.editor.width()),this.resize(),c.onunwatch||(c.onunwatch=b||function(){}),a.proxy(c.onunwatch,this)(),this},show:function(b){b=b||function(){};var c=this;return this.editor.show(0,function(){a.proxy(b,c)()}),this},hide:function(b){b=b||function(){};var c=this;return this.editor.hide(0,function(){a.proxy(b,c)()}),this},previewing:function(){var j,c=this,d=this.editor,e=this.preview,f=this.toolbar,g=this.settings,h=this.codeMirror,i=this.previewContainer;return a.inArray(g.mode,["gfm","markdown"])<0?this:(g.toolbar&&f&&(f.toggle(),f.find(".fa[name=preview]").toggleClass("active")),h.toggle(),j=function(a){a.shiftKey&&27===a.keyCode&&c.previewed()},"none"===h.css("display")?(this.state.preview=!0,this.state.fullscreen&&e.css("background","#fff"),d.find("."+this.classPrefix+"preview-close-btn").show().bind(b.mouseOrTouch("click","touchend"),function(){c.previewed()}),g.watch?i.css("padding",""):this.save(),i.addClass(this.classPrefix+"preview-active"),e.show().css({position:"",top:0,width:d.width(),height:g.autoHeight&&!this.state.fullscreen?"auto":d.height()}),this.state.loaded&&a.proxy(g.onpreviewing,this)(),a(window).bind("keyup",j)):(a(window).unbind("keyup",j),this.previewed()),void 0)},previewed:function(){var c=this.editor,d=this.preview,e=this.toolbar,f=this.settings,g=this.previewContainer,h=c.find("."+this.classPrefix+"preview-close-btn");return this.state.preview=!1,this.codeMirror.show(),f.toolbar&&e.show(),d[f.watch?"show":"hide"](),h.hide().unbind(b.mouseOrTouch("click","touchend")),g.removeClass(this.classPrefix+"preview-active"),f.watch&&g.css("padding","20px"),d.css({background:null,position:"absolute",width:c.width()/2,height:f.autoHeight&&!this.state.fullscreen?"auto":c.height()-e.height(),top:f.toolbar?e.height():0}),this.state.loaded&&a.proxy(f.onpreviewed,this)(),this},fullscreen:function(){var f,g,h,i,b=this,c=this.state,d=this.editor;return this.preview,f=this.toolbar,g=this.settings,h=this.classPrefix+"fullscreen",f&&f.find(".fa[name=fullscreen]").parent().toggleClass("active"),i=function(a){a.shiftKey||27!==a.keyCode||c.fullscreen&&b.fullscreenExit()},d.hasClass(h)?(a(window).unbind("keyup",i),this.fullscreenExit()):(c.fullscreen=!0,a("html,body").css("overflow","hidden"),d.css({width:a(window).width(),height:a(window).height()}).addClass(h),this.resize(),a.proxy(g.onfullscreen,this)(),a(window).bind("keyup",i)),this},fullscreenExit:function(){var b=this.editor,c=this.settings,d=this.toolbar,e=this.classPrefix+"fullscreen";return this.state.fullscreen=!1,d&&d.find(".fa[name=fullscreen]").parent().removeClass("active"),a("html,body").css("overflow",""),b.css({width:b.data("oldWidth"),height:b.data("oldHeight")}).removeClass(e),this.resize(),a.proxy(c.onfullscreenExit,this)(),this},executePlugin:function(c,d){var e=this,f=this.cm,g=this.settings;return d=g.pluginPath+d,"function"==typeof define?"undefined"==typeof this[c]?(alert("Error: "+c+" plugin is not found, you are not load this plugin."),this):(this[c](f),this):(a.inArray(d,b.loadFiles.plugin)<0?b.loadPlugin(d,function(){b.loadPlugins[c]=e[c],e[c](f)}):a.proxy(b.loadPlugins[c],this)(f),this)},search:function(a){var b=this.settings;return b.searchReplace?(b.readOnly||this.cm.execCommand(a||"find"),this):(alert("Error: settings.searchReplace == false"),this)},searchReplace:function(){return this.search("replace"),this},searchReplaceAll:function(){return this.search("replaceAll"),this}},b.fn.init.prototype=b.fn,b.dialogLockScreen=function(){var b=this.settings||{dialogLockScreen:!0};b.dialogLockScreen&&(a("html,body").css("overflow","hidden"),this.resize())},b.dialogShowMask=function(b){var c=this.editor,d=this.settings||{dialogShowMask:!0};b.css({top:(a(window).height()-b.height())/2+"px",left:(a(window).width()-b.width())/2+"px"}),d.dialogShowMask&&c.children("."+this.classPrefix+"mask").css("z-index",parseInt(b.css("z-index"))-1).show()},b.toolbarHandlers={undo:function(){this.cm.undo()},redo:function(){this.cm.redo()},bold:function(){var a=this.cm,b=a.getCursor(),c=a.getSelection();a.replaceSelection("**"+c+"**"),""===c&&a.setCursor(b.line,b.ch+2)},del:function(){var a=this.cm,b=a.getCursor(),c=a.getSelection();a.replaceSelection("~~"+c+"~~"),""===c&&a.setCursor(b.line,b.ch+2)},italic:function(){var a=this.cm,b=a.getCursor(),c=a.getSelection();a.replaceSelection("*"+c+"*"),""===c&&a.setCursor(b.line,b.ch+1)},quote:function(){var a=this.cm,b=a.getCursor(),c=a.getSelection();0!==b.ch?(a.setCursor(b.line,0),a.replaceSelection("> "+c),a.setCursor(b.line,b.ch+2)):a.replaceSelection("> "+c)},ucfirst:function(){var a=this.cm,c=a.getSelection(),d=a.listSelections();a.replaceSelection(b.firstUpperCase(c)),a.setSelections(d)},ucwords:function(){var a=this.cm,c=a.getSelection(),d=a.listSelections();a.replaceSelection(b.wordsFirstUpperCase(c)),a.setSelections(d)},uppercase:function(){var a=this.cm,b=a.getSelection(),c=a.listSelections();a.replaceSelection(b.toUpperCase()),a.setSelections(c)},lowercase:function(){var c,d,a=this.cm;a.getCursor(),c=a.getSelection(),d=a.listSelections(),a.replaceSelection(c.toLowerCase()),a.setSelections(d)},h1:function(){var a=this.cm,b=a.getCursor(),c=a.getSelection();0!==b.ch?(a.setCursor(b.line,0),a.replaceSelection("# "+c),a.setCursor(b.line,b.ch+2)):a.replaceSelection("# "+c) +},h2:function(){var a=this.cm,b=a.getCursor(),c=a.getSelection();0!==b.ch?(a.setCursor(b.line,0),a.replaceSelection("## "+c),a.setCursor(b.line,b.ch+3)):a.replaceSelection("## "+c)},h3:function(){var a=this.cm,b=a.getCursor(),c=a.getSelection();0!==b.ch?(a.setCursor(b.line,0),a.replaceSelection("### "+c),a.setCursor(b.line,b.ch+4)):a.replaceSelection("### "+c)},h4:function(){var a=this.cm,b=a.getCursor(),c=a.getSelection();0!==b.ch?(a.setCursor(b.line,0),a.replaceSelection("#### "+c),a.setCursor(b.line,b.ch+5)):a.replaceSelection("#### "+c)},h5:function(){var a=this.cm,b=a.getCursor(),c=a.getSelection();0!==b.ch?(a.setCursor(b.line,0),a.replaceSelection("##### "+c),a.setCursor(b.line,b.ch+6)):a.replaceSelection("##### "+c)},h6:function(){var a=this.cm,b=a.getCursor(),c=a.getSelection();0!==b.ch?(a.setCursor(b.line,0),a.replaceSelection("###### "+c),a.setCursor(b.line,b.ch+7)):a.replaceSelection("###### "+c)},"list-ul":function(){var c,d,e,f,a=this.cm;if(a.getCursor(),c=a.getSelection(),""===c)a.replaceSelection("- "+c);else{for(d=c.split("\n"),e=0,f=d.length;f>e;e++)d[e]=""===d[e]?"":"- "+d[e];a.replaceSelection(d.join("\n"))}},"list-ol":function(){var c,d,e,f,a=this.cm;if(a.getCursor(),c=a.getSelection(),""===c)a.replaceSelection("1. "+c);else{for(d=c.split("\n"),e=0,f=d.length;f>e;e++)d[e]=""===d[e]?"":e+1+". "+d[e];a.replaceSelection(d.join("\n"))}},hr:function(){var a=this.cm,b=a.getCursor();a.getSelection(),a.replaceSelection((0!==b.ch?"\n\n":"\n")+"------------\n\n")},tex:function(){var a,b,c;return this.settings.tex?(a=this.cm,b=a.getCursor(),c=a.getSelection(),a.replaceSelection("$$"+c+"$$"),""===c&&a.setCursor(b.line,b.ch+2),void 0):(alert("settings.tex === false"),this)},link:function(){this.executePlugin("linkDialog","link-dialog/link-dialog")},"reference-link":function(){this.executePlugin("referenceLinkDialog","reference-link-dialog/reference-link-dialog")},pagebreak:function(){if(!this.settings.pageBreak)return alert("settings.pageBreak === false"),this;var a=this.cm;a.getSelection(),a.replaceSelection("\r\n[========]\r\n")},image:function(){this.executePlugin("imageDialog","image-dialog/image-dialog")},code:function(){var a=this.cm,b=a.getCursor(),c=a.getSelection();a.replaceSelection("`"+c+"`"),""===c&&a.setCursor(b.line,b.ch+1)},"code-block":function(){this.executePlugin("codeBlockDialog","code-block-dialog/code-block-dialog")},"preformatted-text":function(){this.executePlugin("preformattedTextDialog","preformatted-text-dialog/preformatted-text-dialog")},table:function(){this.executePlugin("tableDialog","table-dialog/table-dialog")},datetime:function(){var e,f,a=this.cm;a.getSelection(),new Date,e=this.settings.lang.name,f=b.dateFormat()+" "+b.dateFormat("zh-cn"===e||"zh-tw"===e?"cn-week-day":"week-day"),a.replaceSelection(f)},emoji:function(){this.executePlugin("emojiDialog","emoji-dialog/emoji-dialog")},"html-entities":function(){this.executePlugin("htmlEntitiesDialog","html-entities-dialog/html-entities-dialog")},"goto-line":function(){this.executePlugin("gotoLineDialog","goto-line-dialog/goto-line-dialog")},watch:function(){this[this.settings.watch?"unwatch":"watch"]()},preview:function(){this.previewing()},fullscreen:function(){this.fullscreen()},clear:function(){this.clear()},search:function(){this.search()},help:function(){this.executePlugin("helpDialog","help-dialog/help-dialog")},info:function(){this.showInfoDialog()}},b.keyMaps={"Ctrl-1":"h1","Ctrl-2":"h2","Ctrl-3":"h3","Ctrl-4":"h4","Ctrl-5":"h5","Ctrl-6":"h6","Ctrl-B":"bold","Ctrl-D":"datetime","Ctrl-E":function(){var a=this.cm,b=a.getCursor(),c=a.getSelection();return this.settings.emoji?(a.replaceSelection(":"+c+":"),""===c&&a.setCursor(b.line,b.ch+1),void 0):(alert("Error: settings.emoji == false"),void 0)},"Ctrl-Alt-G":"goto-line","Ctrl-H":"hr","Ctrl-I":"italic","Ctrl-K":"code","Ctrl-L":function(){var a=this.cm,b=a.getCursor(),c=a.getSelection(),d=""===c?"":' "'+c+'"';a.replaceSelection("["+c+"]("+d+")"),""===c&&a.setCursor(b.line,b.ch+1)},"Ctrl-U":"list-ul","Shift-Ctrl-A":function(){var a=this.cm,b=a.getCursor(),c=a.getSelection();return this.settings.atLink?(a.replaceSelection("@"+c),""===c&&a.setCursor(b.line,b.ch+1),void 0):(alert("Error: settings.atLink == false"),void 0)},"Shift-Ctrl-C":"code","Shift-Ctrl-Q":"quote","Shift-Ctrl-S":"del","Shift-Ctrl-K":"tex","Shift-Alt-C":function(){var a=this.cm,b=a.getCursor(),c=a.getSelection();a.replaceSelection(["```",c,"```"].join("\n")),""===c&&a.setCursor(b.line,b.ch+3)},"Shift-Ctrl-Alt-C":"code-block","Shift-Ctrl-H":"html-entities","Shift-Alt-H":"help","Shift-Ctrl-E":"emoji","Shift-Ctrl-U":"uppercase","Shift-Alt-U":"ucwords","Shift-Ctrl-Alt-U":"ucfirst","Shift-Alt-L":"lowercase","Shift-Ctrl-I":function(){var a=this.cm,b=a.getCursor(),c=a.getSelection(),d=""===c?"":' "'+c+'"';a.replaceSelection("!["+c+"]("+d+")"),""===c&&a.setCursor(b.line,b.ch+4)},"Shift-Ctrl-Alt-I":"image","Shift-Ctrl-L":"link","Shift-Ctrl-O":"list-ol","Shift-Ctrl-P":"preformatted-text","Shift-Ctrl-T":"table","Shift-Alt-P":"pagebreak",F9:"watch",F10:"preview",F11:"fullscreen"},e=function(a){return String.prototype.trim?a.trim():a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},b.trim=e,f=function(a){return a.toLowerCase().replace(/\b(\w)|\s(\w)/g,function(a){return a.toUpperCase()})},b.ucwords=b.wordsFirstUpperCase=f,g=function(a){return a.toLowerCase().replace(/\b(\w)/,function(a){return a.toUpperCase()})},b.firstUpperCase=b.ucfirst=g,b.urls={atLinkBase:"https://github.com/"},b.regexs={atLink:/@(\w+)/g,email:/(\w+)@(\w+)\.(\w+)\.?(\w+)?/g,emailLink:/(mailto:)?([\w\.\_]+)@(\w+)\.(\w+)\.?(\w+)?/g,emoji:/:([\w\+-]+):/g,emojiDatetime:/(\d{2}:\d{2}:\d{2})/g,twemoji:/:(tw-([\w]+)-?(\w+)?):/g,fontAwesome:/:(fa-([\w]+)(-(\w+)){0,}):/g,editormdLogo:/:(editormd-logo-?(\w+)?):/g,pageBreak:/^\[[=]{8,}\]$/},b.emoji={path:"https://www.webpagefx.com/tools/emoji-cheat-sheet/graphics/emojis/",ext:".png"},b.twemoji={path:"http://twemoji.maxcdn.com/36x36/",ext:".png"},b.markedRenderer=function(c,d){var j,k,l,m,n,o,p,q,r,f={toc:!0,tocm:!1,tocStartLevel:1,pageBreak:!0,atLink:!0,emailLink:!0,taskList:!1,emoji:!1,tex:!1,flowChart:!1,sequenceDiagram:!1},g=a.extend(f,d||{}),h=b.$marked,i=new h.Renderer;return c=c||[],j=b.regexs,k=j.atLink,l=j.emoji,m=j.email,n=j.emailLink,o=j.twemoji,p=j.fontAwesome,q=j.editormdLogo,r=j.pageBreak,i.emoji=function(a){var c,d,e;if(a=a.replace(b.regexs.emojiDatetime,function(a){return a.replace(/:/g,":")}),c=a.match(l),!c||!g.emoji)return a;for(d=0,e=c.length;e>d;d++)":+1:"===c[d]&&(c[d]=":\\+1:"),a=a.replace(new RegExp(c[d]),function(a){var f,g,h,i,j,k,l,m,n,r,s,t,d=a.match(p),e=a.replace(/:/g,"");if(d)for(f=0,g=d.length;g>f;f++)return h=d[f].replace(/:/g,""),'';else if(i=a.match(q),j=a.match(o),i)for(k=0,l=i.length;l>k;k++)return m=i[k].replace(/:/g,""),'';else{if(!j)return t="+1"===e?"plus1":e,t="black_large_square"===t?"black_square":t,t="moon"===t?"waxing_gibbous_moon":t,':'+e+':';for(n=0,r=j.length;r>n;n++)return s=j[n].replace(/:/g,"").replace("tw-",""),'twemoji-'+s+''}});return a},i.atLink=function(c){return k.test(c)?(g.atLink&&(c=c.replace(m,function(a){return a.replace(/@/g,"_#_@_#_")}),c=c.replace(k,function(a,c){return''+a+""}).replace(/_#_@_#_/g,"@")),g.emailLink&&(c=c.replace(n,function(b,c,d,e,f){return!c&&a.inArray(f,"jpg|jpeg|png|gif|webp|ico|icon|pdf".split("|"))<0?''+b+"":b})),c):c},i.link=function(a,b,c){var d,f;if(this.options.sanitize){try{d=decodeURIComponent(unescape(a)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(0===d.indexOf("javascript:"))return""}return f=''+c.replace(/@/g,"@")+""):(b&&(f+=' title="'+b+'"'),f+=">"+c+"")},i.heading=function(a,b){var i,j,k,l,m,n,o,p,f=a,g=/\s*\]*)\>(.*)\<\/a\>\s*/;if(g.test(a)){for(i=[],a=a.split(/\]+)\>([^\>]*)\<\/a\>/),j=0,k=a.length;k>j;j++)i.push(a[j].replace(/\s*href\=\"(.*)\"\s*/g,""));a=i.join(" ")}return a=e(a),l=a.toLowerCase().replace(/[^\w]+/g,"-"),m={text:a,level:b,slug:l},n=/^[\u4e00-\u9fa5]+$/.test(a),o=n?escape(a).replace(/\%/g,""):a.toLowerCase().replace(/[^\w]+/g,"-"),c.push(m),p="',p+='',p+='',p+=g?this.atLink(this.emoji(f)):this.atLink(this.emoji(a)),p+=""},i.pageBreak=function(a){return r.test(a)&&g.pageBreak&&(a='
    '),a},i.paragraph=function(a){var i,c=/\$\$(.*)\$\$/g.test(a),d=/^\$\$(.*)\$\$$/.test(a),e=d?' class="'+b.classNames.tex+'"':"",f=g.tocm?/^(\[TOC\]|\[TOCM\])$/.test(a):/^\[TOC\]$/.test(a),h=/^\[TOCM\]$/.test(a);return a=!d&&c?a.replace(/(\$\$([^\$]*)\$\$)+/g,function(a,c){return''+c.replace(/\$/g,"")+""}):d?a.replace(/\$/g,""):a,i='
    '+a+"
    ",f?h?'
    '+i+"

    ":i:r.test(a)?this.pageBreak(a):""+this.atLink(this.emoji(a))+"

    \n"},i.code=function(a,c){return"seq"===c||"sequence"===c?'
    '+a+"
    ":"flow"===c?'
    '+a+"
    ":"math"===c||"latex"===c||"katex"===c?'

    '+a+"

    ":h.Renderer.prototype.code.apply(this,arguments)},i.tablecell=function(a,b){var c=b.header?"th":"td",d=b.align?"<"+c+' style="text-align:'+b.align+'">':"<"+c+">";return d+this.atLink(this.emoji(a))+"\n"},i.listitem=function(a){return g.taskList&&/^\s*\[[x\s]\]\s*/.test(a)?(a=a.replace(/^\s*\[\s\]\s*/,' ').replace(/^\s*\[x\]\s*/,' '),'
  • '+this.atLink(this.emoji(a))+"
  • "):"
  • "+this.atLink(this.emoji(a))+"
  • "},i},b.markdownToCRenderer=function(a,b,c,d){var h,i,j,k,l,m,e="",f=0,g=this.classPrefix;for(d=d||1,h=0,i=a.length;i>h;h++)j=a[h].text,k=a[h].level,d>k||(e+=k>f?"":f>k?new Array(f-k+2).join(""):"",e+='
  • '+j+"
      ",f=k);return l=b.find(".markdown-toc"),l.length<1&&"false"===b.attr("previewContainer")&&(m='
      ',m=c?'
      '+m+"
      ":m,b.html(m),l=b.find(".markdown-toc")),c&&l.wrap('

      '),l.html('
        ').children(".markdown-toc-list").html(e.replace(/\r?\n?\\<\/ul\>/g,"")),l},b.tocDropdownMenu=function(b,c){var d,e;return c=c||"Table of Contents",d=400,e=b.find("."+this.classPrefix+"toc-menu"),e.each(function(){var b=a(this),e=b.children(".markdown-toc"),f='',g=''+f+c+"",h=e.children("ul"),i=h.find("li");e.append(g),i.first().before("
      • "+c+" "+f+"

      • "),b.mouseover(function(){h.show(),i.each(function(){var e,b=a(this),c=b.children("ul");""===c.html()&&c.remove(),c.length>0&&""!==c.html()&&(e=b.children("a").first(),e.children(".fa").length<1&&e.append(a(f).css({"float":"right",paddingTop:"4px"}))),b.mouseover(function(){c.css("z-index",d).show(),d+=1}).mouseleave(function(){c.hide()})})}).mouseleave(function(){h.hide()})}),e},b.filterHTMLTags=function(b,c){var d,e,f,g,h,i,j;if("string"!=typeof b&&(b=new String(b)),"string"!=typeof c)return b;for(d=c.split("|"),e=d[0].split(","),f=d[1],g=0,h=e.length;h>g;g++)i=e[g],b=b.replace(new RegExp("]*)>([^>]*)","igm"),"");return"undefined"!=typeof f&&(j=/\<(\w+)\s*([^\>]*)\>([^\>]*)\<\/(\w+)\>/gi,b="*"===f?b.replace(j,function(a,b,c,d,e){return"<"+b+">"+d+""}):"on*"===f?b.replace(j,function(b,c,d,e,f){var j,g=a("<"+c+">"+e+""),h=a(b)[0].attributes,i={};return a.each(h,function(a,b){'"'!==b.nodeName&&(i[b.nodeName]=b.nodeValue)}),a.each(i,function(a){0===a.indexOf("on")&&delete i[a]}),g.attr(i),j="undefined"!=typeof g[1]?a(g[1]).text():"",g[0].outerHTML+j}):b.replace(j,function(b,c,d,e){var g=f.split(","),h=a(b);return h.html(e),a.each(g,function(a){h.attr(g[a],null)}),h[0].outerHTML})),b},b.markdownToHTML=function(c,d){var f,g,h,i,j,k,l,m,n,o,e={gfm:!0,toc:!0,tocm:!1,tocStartLevel:1,tocTitle:"目录",tocDropdown:!1,tocContainer:"",markdown:"",markdownSourceCode:!1,htmlDecode:!1,autoLoadKaTeX:!0,pageBreak:!0,atLink:!0,emailLink:!0,tex:!1,taskList:!1,emoji:!1,flowChart:!1,sequenceDiagram:!1,previewCodeHighlight:!0};return b.$marked=marked,f=a("#"+c),g=f.settings=a.extend(!0,e,d||{}),h=f.find("textarea"),h.length<1&&(f.append(""),h=f.find("textarea")),i=""===g.markdown?h.val():g.markdown,j=[],k={toc:g.toc,tocm:g.tocm,tocStartLevel:g.tocStartLevel,taskList:g.taskList,emoji:g.emoji,tex:g.tex,pageBreak:g.pageBreak,atLink:g.atLink,emailLink:g.emailLink,flowChart:g.flowChart,sequenceDiagram:g.sequenceDiagram,previewCodeHighlight:g.previewCodeHighlight},l={renderer:b.markedRenderer(j,k),gfm:g.gfm,tables:!0,breaks:!0,pedantic:!1,sanitize:g.htmlDecode?!1:!0,smartLists:!0,smartypants:!0},i=new String(i),m=marked(i,l),m=b.filterHTMLTags(m,g.htmlDecode),g.markdownSourceCode?h.text(i):h.remove(),f.addClass("markdown-body "+this.classPrefix+"html-preview").append(m),n=""!==g.tocContainer?a(g.tocContainer):f,""!==g.tocContainer&&n.attr("previewContainer",!1),g.toc&&(f.tocContainer=this.markdownToCRenderer(j,n,g.tocDropdown,g.tocStartLevel),(g.tocDropdown||f.find("."+this.classPrefix+"toc-menu").length>0)&&this.tocDropdownMenu(f,g.tocTitle),""!==g.tocContainer&&f.find(".editormd-toc-menu, .editormd-markdown-toc").remove()),g.previewCodeHighlight&&(f.find("pre").addClass("prettyprint linenums"),prettyPrint()),b.isIE8||(g.flowChart&&f.find(".flowchart").flowChart(),g.sequenceDiagram&&f.find(".sequence-diagram").sequenceDiagram({theme:"simple"})),g.tex&&(o=function(){f.find("."+b.classNames.tex).each(function(){var b=a(this);katex.render(b.html().replace(/</g,"<").replace(/>/g,">"),b[0]),b.find(".katex").css("font-size","1.6em")})},!g.autoLoadKaTeX||b.$katex||b.kaTeXLoaded?o():this.loadKaTeX(function(){b.$katex=katex,b.kaTeXLoaded=!0,o()})),f.getMarkdown=function(){return h.val()},f},b.themes=["default","dark"],b.previewThemes=["default","dark"],b.editorThemes=["default","3024-day","3024-night","ambiance","ambiance-mobile","base16-dark","base16-light","blackboard","cobalt","eclipse","elegant","erlang-dark","lesser-dark","mbo","mdn-like","midnight","monokai","neat","neo","night","paraiso-dark","paraiso-light","pastel-on-dark","rubyblue","solarized","the-matrix","tomorrow-night-eighties","twilight","vibrant-ink","xq-dark","xq-light"],b.loadPlugins={},b.loadFiles={js:[],css:[],plugin:[]},b.loadPlugin=function(a,c,d){c=c||function(){},this.loadScript(a,function(){b.loadFiles.plugin.push(a),c()},d)},b.loadCSS=function(a,c,d){d=d||"head",c=c||function(){};var e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.onload=e.onreadystatechange=function(){b.loadFiles.css.push(a),c()},e.href=a+".css","head"===d?document.getElementsByTagName("head")[0].appendChild(e):document.body.appendChild(e)},b.isIE="Microsoft Internet Explorer"==navigator.appName,b.isIE8=b.isIE&&"8."==navigator.appVersion.match(/8./i),b.loadScript=function(a,c,d){d=d||"head",c=c||function(){};var e=null;e=document.createElement("script"),e.id=a.replace(/[\.\/]+/g,"-"),e.type="text/javascript",e.src=a+".js",b.isIE8?e.onreadystatechange=function(){e.readyState&&("loaded"===e.readyState||"complete"===e.readyState)&&(e.onreadystatechange=null,b.loadFiles.js.push(a),c())}:e.onload=function(){b.loadFiles.js.push(a),c()},"head"===d?document.getElementsByTagName("head")[0].appendChild(e):document.body.appendChild(e)},b.katexURL={css:"//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min",js:"//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min"},b.kaTeXLoaded=!1,b.loadKaTeX=function(a){b.loadCSS(b.katexURL.css,function(){b.loadScript(b.katexURL.js,a||function(){})})},b.lockScreen=function(b){a("html,body").css("overflow",b?"hidden":"")},b.createDialog=function(c){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,d={name:"",width:420,height:240,title:"",drag:!0,closed:!0,content:"",mask:!0,maskStyle:{backgroundColor:"#fff",opacity:.1},lockScreen:!0,footer:!0,buttons:!1};if(c=a.extend(!0,d,c),e=this,f=this.editor,g=b.classPrefix,h=(new Date).getTime(),i=""===c.name?g+"dialog-"+h:c.name,j=b.mouseOrTouch,k='
        ',""!==c.title&&(k+='
        ",k+=''+c.title+"",k+="
        "),c.closed&&(k+=''),k+='
        '+c.content,(c.footer||"string"==typeof c.footer)&&(k+='"),k+="
        ",k+='
        ',k+='
        ',k+="
        ",f.append(k),l=f.find("."+i),l.lockScreen=function(b){return c.lockScreen&&(a("html,body").css("overflow",b?"hidden":""),e.resize()),l},l.showMask=function(){return c.mask&&f.find("."+g+"mask").css(c.maskStyle).css("z-index",b.dialogZindex-1).show(),l},l.hideMask=function(){return c.mask&&f.find("."+g+"mask").hide(),l},l.loading=function(a){var b=l.find("."+g+"dialog-mask");return b[a?"show":"hide"](),l},l.lockScreen(!0).showMask(),l.show().css({zIndex:b.dialogZindex,border:b.isIE8?"1px solid #ddd":"",width:"number"==typeof c.width?c.width+"px":c.width,height:"number"==typeof c.height?c.height+"px":c.height}),m=function(){l.css({top:(a(window).height()-l.height())/2+"px",left:(a(window).width()-l.width())/2+"px"})},m(),a(window).resize(m),l.children("."+g+"dialog-close").bind(j("click","touchend"),function(){l.hide().lockScreen(!1).hideMask()}),"object"==typeof c.buttons){n=l.footer=l.find("."+g+"dialog-footer");for(o in c.buttons)p=c.buttons[o],q=g+o+"-btn",n.append('"),p[1]=a.proxy(p[1],l),n.children("."+q).bind(j("click","touchend"),p[1])}return""!==c.title&&c.drag&&(t=l.children("."+g+"dialog-header"),c.mask||t.bind(j("click","touchend"),function(){b.dialogZindex+=2,l.css("z-index",b.dialogZindex)}),t.mousedown(function(a){a=a||window.event,r=a.clientX-parseInt(l[0].style.left),s=a.clientY-parseInt(l[0].style.top),document.onmousemove=w}),u=function(a){a.removeClass(g+"user-unselect").off("selectstart")},v=function(a){a.addClass(g+"user-unselect").on("selectstart",function(){return!1})},w=function(b){b=b||window.event;var c,d,e=parseInt(l[0].style.left),f=parseInt(l[0].style.top);e>=0?e+l.width()<=a(window).width()?c=b.clientX-r:(c=a(window).width()-l.width(),document.onmousemove=null):(c=0,document.onmousemove=null),f>=0?d=b.clientY-s:(d=0,document.onmousemove=null),document.onselectstart=function(){return!1},v(a("body")),v(l),l[0].style.left=c+"px",l[0].style.top=d+"px"},document.onmouseup=function(){u(a("body")),u(l),document.onselectstart=null,document.onmousemove=null},t.touchDraggable=function(){var b=null,c=function(c){var d=c.originalEvent,e=a(this).parent().position();b={x:d.changedTouches[0].pageX-e.left,y:d.changedTouches[0].pageY-e.top}},d=function(c){c.preventDefault();var d=c.originalEvent;a(this).parent().css({top:d.changedTouches[0].pageY-b.y,left:d.changedTouches[0].pageX-b.x})};this.bind("touchstart",c).bind("touchmove",d)},t.touchDraggable()),b.dialogZindex+=2,l},b.mouseOrTouch=function(a,b){a=a||"click",b=b||"touchend";var c=a;try{document.createEvent("TouchEvent"),c=b}catch(d){}return c},b.dateFormat=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;switch(a=a||"",b=function(a){return 10>a?"0"+a:a},c=new Date,d=c.getFullYear(),e=d.toString().slice(2,4),f=b(c.getMonth()+1),g=b(c.getDate()),h=c.getDay(),i=b(c.getHours()),j=b(c.getMinutes()),k=b(c.getSeconds()),l=b(c.getMilliseconds()),m="",n=e+"-"+f+"-"+g,o=d+"-"+f+"-"+g,p=i+":"+j+":"+k,a){case"UNIX Time":m=c.getTime();break;case"UTC":m=c.toUTCString();break;case"yy":m=e;break;case"year":case"yyyy":m=d;break;case"month":case"mm":m=f;break;case"cn-week-day":case"cn-wd":q=["日","一","二","三","四","五","六"],m="星期"+q[h];break;case"week-day":case"wd":r=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],m=r[h];break;case"day":case"dd":m=g;break;case"hour":case"hh":m=i;break;case"min":case"ii":m=j;break;case"second":case"ss":m=k;break;case"ms":m=l;break;case"yy-mm-dd":m=n;break;case"yyyy-mm-dd":m=o;break;case"yyyy-mm-dd h:i:s ms":case"full + ms":m=o+" "+p+" "+l;break;case"full":case"yyyy-mm-dd h:i:s":default:m=o+" "+p}return m},b}); \ No newline at end of file diff --git a/setup.py b/setup.py index d7c40ce..e99ab08 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setup( name='django-mdeditor', - version='0.1.15', + version='0.1.16', packages=find_packages(exclude=['mdeditor_demo', 'mdeditor_demo_app.*', 'mdeditor_demo_app']), include_package_data=True, license='GPL-3.0 License',