redactor-rails 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  /*
2
- Redactor v9.1.4
3
- Updated: Sep 10, 2013
2
+ Redactor v9.1.9
3
+ Updated: Dec 12, 2013
4
4
 
5
5
  http://imperavi.com/redactor/
6
6
 
@@ -9,4 +9,4 @@
9
9
 
10
10
  Usage: $('#content').redactor();
11
11
  */
12
- eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?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}('(B(d){y b=0;y a=E;"h7 h9";y e=B(f){7[0]=f.kT;7[1]=f.ef;7.4B=f;F 7};e.4l.eL=B(){F 7[0]===7[1]};d.fn.L=B(g){y h=[];y f=d7.4l.j6.3y(jk,1);if(1o g==="kS"){7.19(B(){y j=d.1i(7,"L");if(1o j!=="1k"&&d.4V(j[g])){y i=j[g].fh(j,f);if(i!==1k&&i!==j){h.23(i)}}G{F d.39(\'k6 gV 5x "\'+g+\'" 2O 3V\')}})}G{7.19(B(){if(!d.1i(7,"L")){d.1i(7,"L",c(7,g))}})}if(h.11===0){F 7}G{if(h.11===1){F h[0]}G{F h}}};B c(g,f){F 1V c.4l.5t(g,f)}d.3V=c;d.3V.gx="9.1.4";d.3V.C={2L:E,1p:E,2W:E,U:E,c4:"en",4n:"ig",3I:E,dH:E,dp:M,cY:M,ds:M,es:E,ca:M,9J:E,4f:M,1s:E,5E:E,4a:M,5B:E,5R:M,5h:E,7w:60,9O:E,8A:E,8D:E,6f:"7k://",dy:E,69:"a9",67:E,3c:E,6j:E,7h:M,9L:E,cA:M,8b:["1c/fP","1c/fK","1c/eg"],5T:E,31:E,3s:M,5d:M,a7:M,9M:E,db:M,2a:E,dS:["4K","|","3h","3d","4c","|","4x","4G","5n","4t"],1a:M,3Y:E,9l:Q,di:0,7u:E,9t:E,dD:M,5X:\'<1u Z="hI"></1u>\',dC:{},dm:[],3e:["V","|","4K","|","3h","3d","4c","|","4x","4G","5n","4t","|","1c","2J","2Z","1l","2m","|","7B","|","6m"],6r:["4c","3d","3h","4U","4x","4G","6A","6D","6n","5b","1l"],8m:{b:"3h",3O:"3h",i:"3d",em:"3d",6z:"4c",6B:"4c",2d:"4x",2y:"4G",u:"4U",2P:"1l",1E:"1l",1l:"1l"},6p:E,do:["p","2u","2l","h1","h2","h3","h4","h5","h6"],1B:E,4I:M,9E:M,9z:M,7M:E,9D:E,bf:E,5F:E,56:E,5D:["V","6u","2m","1Q","9k","2p","16","hN"],9v:"3O",9w:"em",6v:20,4d:[],5z:[],4S:E,41:"<p>&#6S;</p>",22:"&#6S;",8d:/^(P|H[1-6]|2H|7F|7G|7K|7H|7z|7y)$/i,3Z:["P","eY","fe","fd","eM","ei","ep","eE","eD","eK","7p","6t","4D","eB","8W","7F","7G","7K","7H","7z","7y"],8z:["cr","1Q","6u","hr","i?2e","2m","9k","iy","16","2p","1l","4y","2Q","9y"],8x:["1u","dt","dt","h[1-6]","3t","2p"],ch:["2u","N","dl","co","1C","i0","cq","2y","p","2l","5m","1E","9q","2P","2d"],9W:["P","eY","fe","fd","eM","ei","ep","eE","eD","eK","7p","2H","4D","eB","8W","4C","7F","7G","7K","7H","7z","7y","6t"],bY:{en:{V:"fz",2J:"4A dL",1c:"4A dJ",1l:"9g",2m:"dM",8N:"4A 2m",bG:"bp 2m",4z:"jT",4K:"i5",c6:"hv 1e",bS:"fV",55:"dK",bP:"5O 1",bT:"5O 2",cl:"5O 3",cp:"5O 4",cs:"5O 5",3h:"gM",3d:"kE",8G:"kC cd",8M:"iF cd",4x:"js bK",4G:"jw bK",5n:"iS",4t:"iH",5j:"iJ",6l:"4A",aE:"iX",c1:"5Y",8B:"4A 9g",8q:"5W 9u je",8o:"5W 9u iZ",8r:"5W 9m dE",8Q:"5W 9m dI",8U:"5Y 9m",8O:"5Y 9u",8I:"5Y 9g",b9:"kD",b7:"l4",8R:"5W dF",8S:"5Y dF",R:"kX",bq:"kW",25:"kP",1m:"dE",3E:"dI",bU:"dJ k5 dM",1e:"k9",5S:"aV",kc:"aC",bc:"dL k4 dK",2Z:"4A jW",4M:"cH",jV:"jY",aD:"jZ",dk:"k1 aD",dV:"ke 2Z kq",82:"cL 1e cP cz 1m",85:"kv 1e",87:"cL 1e cP cz 3E",7X:"gI 1e",6m:"4A gz hx",4c:"hA",aM:"hy",aT:"hq 2m in 1V hL",4U:"hF",7B:"hG",aB:"hK (hJ)",aX:"bp"}}};c.fn=d.3V.4l={2s:{6J:8,am:46,8e:40,7m:13,af:27,da:9,hH:17,hD:91,hE:37,cU:91},5t:B(g,f){7.$44=7.$1g=d(g);7.9h=b++;y h=d.3P(M,{},d.3V.C);7.C=d.3P({},h,7.$44.1i(),f);7.4X=M;7.hM=[];7.8g=7.$1g.U("1I");7.hS=7.$1g.U("2i");if(7.C.2W){7.C.1p=M}if(7.C.1B){7.C.4I=E}if(7.C.4I){7.C.1B=E}if(7.C.7u){7.C.3Y=M}7.Q=Q;7.2Y=2Y;7.4e=E;7.c3=1V 2I("^<(/?"+7.C.8z.4T("|/?")+"|"+7.C.8x.4T("|")+")[ >]");7.c2=1V 2I("^<(br|/?"+7.C.8z.4T("|/?")+"|/"+7.C.8x.4T("|/")+")[ >]");7.9e=1V 2I("^</?("+7.C.ch.4T("|")+")[ >]");7.7Y=1V 2I("^("+7.C.9W.4T("|")+")$","i");if(7.C.1B===E){if(7.C.56!==E&&d.3R("p",7.C.56)==="-1"){7.C.56.23("p")}if(7.C.5D!==E){y i=d.3R("p",7.C.5D);if(i!=="-1"){7.C.5D.6E(i,i)}}}if(7.1G("3j")||7.1G("6H")){7.C.3e=7.eJ(7.C.3e,"6m")}7.C.18=7.C.bY[7.C.c4];7.dj()},cM:B(f){F{V:{R:f.V,1b:"96"},4K:{R:f.4K,1b:"1R",2N:{p:{R:f.c6,1b:"3N"},2u:{R:f.bS,1b:"fI",3g:"hP"},2l:{R:f.55,1b:"3N",3g:"hC"},h1:{R:f.bP,1b:"3N",3g:"hn"},h2:{R:f.bT,1b:"3N",3g:"hp"},h3:{R:f.cl,1b:"3N",3g:"hm"},h4:{R:f.cp,1b:"3N",3g:"hi"},h5:{R:f.cs,1b:"3N",3g:"hk"}}},3h:{R:f.3h,1P:"3h"},3d:{R:f.3d,1P:"3d"},4c:{R:f.4c,1P:"hs"},4U:{R:f.4U,1P:"4U"},4x:{R:"&hz; "+f.4x,1P:"6g"},4G:{R:"1. "+f.4G,1P:"6s"},5n:{R:"< "+f.5n,1b:"9N"},4t:{R:"> "+f.4t,1b:"a5"},1c:{R:f.1c,1b:"f4"},2J:{R:f.2J,1b:"eZ"},2Z:{R:f.2Z,1b:"bm"},1l:{R:f.1l,1b:"1R",2N:{8B:{R:f.8B,1b:"fr"},ht:{2q:"7P"},8q:{R:f.8q,1b:"eO"},8o:{R:f.8o,1b:"eP"},8r:{R:f.8r,1b:"eQ"},8Q:{R:f.8Q,1b:"eR"},ip:{2q:"7P"},8R:{R:f.8R,1b:"eS"},8S:{R:f.8S,1b:"8F"},io:{2q:"7P"},8U:{R:f.8U,1b:"eX"},8O:{R:f.8O,1b:"eW"},8I:{R:f.8I,1b:"eV"}}},2m:{R:f.2m,1b:"1R",2N:{2m:{R:f.8N,1b:"8w"},4z:{R:f.4z,1P:"4z"}}},8G:{R:f.8G,1b:"1R"},8M:{R:f.8M,1b:"1R"},7B:{R:f.7B,1b:"1R",2N:{6A:{R:f.82,1b:"9f"},6D:{R:f.85,1b:"9c"},6n:{R:f.87,1b:"9d"},5b:{R:f.7X,1b:"98"}}},6A:{R:f.82,1b:"9f"},6D:{R:f.85,1b:"9c"},6n:{R:f.87,1b:"9d"},5b:{R:f.7X,1b:"98"},6m:{1P:"ba",R:f.6m}}},1h:B(f,g,h){y i=7.C[f+"iw"];if(d.4V(i)){if(g===E){F i.3y(7,h)}G{F i.3y(7,g,h)}}G{F h}},ix:B(){cG(7.7w);d(2Y).2F(".L");7.$1g.2F("L-3W");7.$44.2F(".L").ii("L");y g=7.1S();if(7.C.4S){7.$1M.1W(7.$1g);7.$1M.1j();7.$1g.1f(g).1R()}G{y f=7.$J;if(7.C.1p){f=7.$44}7.$1M.1W(f);7.$1M.1j();f.2k("34").2k("dG").26("30").V(g).1R()}if(7.C.2a){d(".9Y").1j()}},ih:B(){F d.3P({},7)},i2:B(){F 7.$J},i3:B(){F 7.$1M},i4:B(){F(7.C.1p)?7.$2e:E},i1:B(){F 7.$1a},1S:B(){F 7.$1g.1f()},dw:B(){7.$J.26("30").26("4r");y f=7.5u(7.$2e.1K().6O());7.$J.15({30:M,4r:7.C.4n});F f},7x:B(f,g,h){f=f.2V();if(7.C.2W){7.bD(f)}G{7.bt(f,g)}if(h!==E){7.cK()}},bt:B(f,g){if(g!==E){f=7.9r(f);f=7.6c(f);f=7.9n(f);f=7.6y(f);if(7.C.1B===E){f=7.9o(f)}G{f=f.I(/<p(.*?)>([\\w\\W]*?)<\\/p>/gi,"$2<br>")}}f=7.9p(f);7.$J.V(f);7.12()},bD:B(f){y g=7.9X();7.$2e[0].2w="hY:hZ";f=7.9n(f);f=7.6y(f);f=7.61(f);g.7q();g.cy(f);g.cF();if(7.C.2W){7.$J=7.$2e.1K().T("1Q").15({30:M,4r:7.C.4n})}7.12()},8Z:B(f){f=7.9r(f,M);f=7.9o(f);f=7.9p(f);7.$J.V(f);7.12()},12:B(){y f="";7.bX();if(7.C.2W){f=7.dw()}G{f=7.$J.V()}f=7.8K(f);f=7.61(f);f=7.9R(f);f=f.I(/<\\/1u><(2d|2y)>([\\w\\W]*?)<\\/(2d|2y)>/gi,"<$1>$2</$1></1u>");if(d.2o(f)==="<br>"){f=""}if(f!==""&&7.C.ds){f=7.bZ(f)}f=f.I(/<br>/gi,"<br />");f=7.1h("ic",E,f);7.$1g.1f(f);7.1h("ie",E,f);if(7.4X===E){7.1h("7A",E,f)}},8K:B(f){if(!7.C.2W){f=7.6c(f)}f=d.2o(f);f=7.dc(f);f=f.I(/&#6S;/gi,"");f=f.I(/&#d5;/gi,"");f=f.I(/&2j;/gi," ");if(7.C.dy){f=f.I(/<a(.*?)33="dA"(.*?)>/gi,"<a$1$2>");f=f.I(/<a(.*?)>/gi,\'<a$1 33="dA">\')}f=f.I("<!--?3k","<?3k");f=f.I("?-->","?>");f=f.I(/ 1i-5Q=""/gi,"");f=f.I(/<br\\s?\\/?>\\n?<\\/(P|H[1-6]|2H|7F|7G|7K|7H|7z|7y)>/gi,"</$1>");f=f.I(/<O(.*?)id="L-1c-1M"(.*?)>([\\w\\W]*?)<1q(.*?)><\\/O>/i,"$3<1q$4>");f=f.I(/<O(.*?)id="L-1c-ai"(.*?)>(.*?)<\\/O>/i,"");f=f.I(/<O(.*?)id="L-1c-aj"(.*?)>(.*?)<\\/O>/i,"");f=f.I(/<O\\s*?>([\\w\\W]*?)<\\/O>/gi,"$1");f=f.I(/<O(.*?)1i-L="2K"(.*?)>([\\w\\W]*?)<\\/O>/gi,"<O$1$2>$3</O>");f=f.I(/<O(.*?)1i-L-4h=""(.*?)>([\\w\\W]*?)<\\/O>/gi,"<O$1$2>$3</O>");f=f.I(/<O\\s*?>([\\w\\W]*?)<\\/O>/gi,"$1");f=f.I(/<O\\s*?id="2c-1y(.*?)"(.*?)>([\\w\\W]*?)<\\/O>/gi,"");f=f.I(/<O\\s*?>([\\w\\W]*?)<\\/O>/gi,"$1");f=f.I(/<O(.*?)1i-L="2K"(.*?)>([\\w\\W]*?)<\\/O>/gi,"<O$1$2>$3</O>");f=f.I(/<O(.*?)1i-L-4h=""(.*?)>([\\w\\W]*?)<\\/O>/gi,"<O$1$2>$3</O>");f=f.I(/<O>([\\w\\W]*?)<\\/O>/gi,"$1");f=f.I(/;7Q;/gi,";");f=7.bk(f);F f},dj:B(){7.3H="";7.$1M=d(\'<N Z="gl" />\');if(7.$1g[0].X==="gm"){7.C.4S=M}if(7.C.dp===E&&7.43()){7.dn()}G{7.dR();if(7.C.1p){7.C.4a=E;7.cD()}G{if(7.C.4S){7.dT()}G{7.dU()}}if(!7.C.1p){7.9x();7.9b()}}},dn:B(){if(!7.C.4S){7.$J=7.$1g;7.$J.1T();7.$1g=7.7r(7.$J);7.$1g.1f(7.3H)}7.$1M.7s(7.$1g).Y(7.$1g)},dR:B(){if(7.C.4S){7.3H=d.2o(7.$1g.1f())}G{7.3H=d.2o(7.$1g.V())}},dT:B(){7.$J=d("<N />");7.$1M.7s(7.$1g).Y(7.$J).Y(7.$1g);7.dN(7.$J);7.8k()},dU:B(){7.$J=7.$1g;7.$1g=7.7r(7.$J);7.$1M.7s(7.$J).Y(7.$J).Y(7.$1g);7.8k()},7r:B(f){F d("<3W />").15("2q",f.15("id")).U("1I",7.8g)},dN:B(f){d.19(7.$1g.1S(0).3g.3x(/\\s+/),B(g,h){f.28("go"+h)})},8k:B(){7.$J.28("34").15({30:M,4r:7.C.4n});7.$1g.15("4r",7.C.4n).1T();7.7x(7.3H,M,E)},9x:B(){y f=7.$J;if(7.C.1p){f=7.$2e}if(7.C.5E){f.15("5E",7.C.5E)}if(7.C.5B){f.U("gw-1I",7.C.5B+"2r")}if(7.C.dH){7.$J.28("dG")}if(!7.C.4a){f.U("1I",7.8g)}},9b:B(){7.4X=E;if(7.C.1a){7.C.1a=7.cM(7.C.18);7.dQ()}7.fA();7.cB();7.95();if(7.C.5h){7.5h()}2h(d.K(7.5c,7),4);if(7.1G("3o")){84{7.Q.1H("gq",E,E);7.Q.1H("gd",E,E)}86(f){}}if(7.C.1s){2h(d.K(7.1s,7),2x)}if(!7.C.4f){2h(d.K(B(){7.C.4f=M;7.96(E)},7),3S)}7.1h("5t")},95:B(){if(7.C.cA){7.$J.1d("5y.L",d.K(7.d4,7))}7.$J.1d("7j.L",d.K(7.dv,7));7.$J.1d("4k.L",d.K(7.cS,7));7.$J.1d("3D.L",d.K(7.d6,7));if(d.4V(7.C.cE)){7.$1g.1d("4k.L-3W",d.K(7.C.cE,7))}if(d.4V(7.C.cC)){7.$J.1d("1s.L",d.K(7.C.cC,7))}7.$J.1d("cQ.L",d.K(B(){7.4F=E},7));if(d.4V(7.C.cR)){7.$J.1d("cQ.L",d.K(7.C.cR,7))}},d4:B(i){i=i.d0||i;if(2Y.ay===1k){F M}y h=i.aP.6x.11;if(h==0){F M}i.1X();y g=i.aP.6x[0];if(7.C.8b!==E&&7.C.8b.3r(g.1r)==-1){F M}7.1x();y f=d(\'<N id="L-1Z-a8" Z="L-1Z L-1Z-az"><N id="L-1Z-5l" Z="L-1Z-5l" 16="2i: 2x%;"></N></N>\');d(Q.1Q).Y(f);7.aN(7.C.3c,g,M,f,i)},dv:B(g){y h=E;if(7.1G("3G")&&8E.8P.3r("g0")===-1){y f=7.1G("6M").3x(".");if(f[0]<g2){h=M}}if(h){F M}if(7.1G("6H")){F M}if(7.C.7h&&7.cZ(g)){F M}if(7.C.cY){a=M;7.1F();if(!7.4F){if(7.C.4a===M){7.$J.1I(7.$J.1I());7.7i=7.Q.1Q.3v}G{7.7i=7.$J.3v()}}y i=7.8a();2h(d.K(B(){y j=7.8a();7.$J.Y(i);7.1n();y l=7.fk(j);7.er(l);if(7.C.4a===M){7.$J.U("1I","3J")}},7),1)}},cZ:B(i){y h=i.d0||i;7.cW=E;if(1o(h.8c)==="1k"){F E}if(h.8c.cX){y g=h.8c.cX[0].g3();if(g!==2b){7.1x();7.cW=M;y f=1V g5();f.d9=d.K(7.e9,7);f.g6(g);F M}}F E},cS:B(l){if(a){F E}y p=l.6I;y f=l.9K||l.cV;y o=7.3w();y m=7.2B();y i=7.1Y();y h=E;7.1h("4k",l);7.4W(E);if((o&&d(o).1S(0).X==="4C")||(m&&d(m).1S(0).X==="4C")){h=M;if(p===7.2s.8e){7.6Z(i)}}if(p===7.2s.8e){if(o&&d(o).1S(0).X==="4D"){7.6Z(o)}if(m&&d(m).1S(0).X==="4D"){7.6Z(m)}}if(f&&!l.3T){7.5R(l,p)}if(f&&p===90&&!l.3T&&!l.9a){l.1X();if(7.C.4d.11){7.e0()}G{7.Q.1H("gY",E,E)}F}G{if(f&&p===90&&l.3T&&!l.9a){l.1X();if(7.C.5z.11!=0){7.e1()}G{7.Q.1H("h0",E,E)}F}}if(f&&p===65){7.4F=M}G{if(p!=7.2s.cU&&!f){7.4F=E}}if(p==7.2s.7m&&!l.3T&&!l.9K&&!l.cV){if(o.3n==1&&(o.X=="6t"||o.X=="gT")){l.1X();7.1x();7.2T(Q.3F("br"));7.1h("5Z",l);F E}if(h===M){l.1X();7.1x();y j=d(m).1N().1e();7.2T(Q.7o("\\n"));if(j.45(/\\s$/)==-1){7.2T(Q.7o("\\n"))}7.12();7.1h("5Z",l);F E}G{if(!7.C.1B){if(i&&7.C.8d.3u(i.X)){7.1x();2h(d.K(B(){y r=7.1Y();if(r.X==="7p"&&!d(r).3i("34")){y q=d("<p>"+7.C.22+"</p>");d(r).1U(q);7.3A(q)}},7),1)}G{if(i===E){7.1x();y g=d("<p>"+7.C.22+"</p>");7.2T(g[0]);7.3A(g);7.1h("5Z",l);F E}}}if(7.C.1B){if(i&&7.C.8d.3u(i.X)){7.1x();2h(d.K(B(){y q=7.1Y();if((q.X==="7p"||q.X==="P")&&!d(q).3i("34")){7.ev(q)}},7),1)}G{F 7.9B(l)}}if(i.X=="4D"||i.X=="8W"){F 7.9B(l)}}7.1h("5Z",l)}G{if(p===7.2s.7m&&(l.9K||l.3T)){7.1x();l.1X();7.a0()}}if(p===7.2s.da&&7.C.5R){if(!7.C.db){F M}if(7.8p(7.1S())){F M}l.1X();if(h===M&&!l.3T){7.1x();7.2T(Q.7o("\\t"));7.12();F E}G{if(7.C.9M!==E){7.1x();7.2T(Q.7o(d7(7.C.9M+1).4T("\\hb")));7.12();F E}G{if(!l.3T){7.a5()}G{7.9N()}}}F E}if(p===7.2s.6J){if(1o m.X!=="1k"&&/^(H[1-6])$/i.3u(m.X)){y g;if(7.C.1B===E){g=d("<p>"+7.C.22+"</p>")}G{g=d("<br>"+7.C.22)}d(m).1U(g);7.3A(g)}if(1o m.5U!=="1k"&&m.5U!==2b){y n=d.2o(m.5U.I(/[^\\fb-\\fc]/g,""));if(m.1j&&m.3n===3&&m.5U.gS(0)==d5&&n==""){m.1j()}}}},9B:B(f){7.1x();f.1X();7.a0();7.1h("5Z",f);F},d6:B(l){if(a){F E}y f=l.6I;y h=7.3w();y j=7.2B();if(!7.C.1B&&j.3n==3&&(h==E||h.X=="8J")){y i=d("<p>").Y(d(j).4H());d(j).1U(i);y g=d(i).6b();if(1o(g[0])!=="1k"&&g[0].X=="fN"){g.1j()}7.5G(i)}if((7.C.9z||7.C.7M||7.C.9D)&&f===7.2s.7m){7.9H(7.C.6f,7.C.9z,7.C.7M,7.C.9D);2h(d.K(B(){if(7.C.7M){7.3s()}if(7.C.5d){7.5d()}},7),5)}if(7.C.1B===E&&(f===7.2s.am||f===7.2s.6J)){F 7.dP(l)}7.1h("3D",l);7.12()},cB:B(){if(!7.C.9O){F}d.19(7.C.9O,d.K(B(f,g){if(9P[g]){d.3P(7,9P[g]);if(d.4V(9P[g].5t)){7.5t()}}},7))},cD:B(){7.cx();if(7.C.4S){7.a2(7.$1g)}G{7.$9Z=7.$1g.1T();7.$1g=7.7r(7.$9Z);7.a2(7.$9Z)}},a2:B(f){7.$1g.15("4r",7.C.4n).1T();7.$1M.7s(f).Y(7.$2e).Y(7.$1g)},cx:B(){7.$2e=d(\'<1p 16="2i: 2x%;" cm="0" />\').7O("bn",d.K(B(){if(7.C.2W){7.9X();if(7.3H===""){7.3H=7.C.22}7.$2e.1K()[0].cy(7.3H);7.$2e.1K()[0].cF();y f=dX(d.K(B(){if(7.$2e.1K().T("1Q").V()){cG(f);7.9S()}},7),0)}G{7.9S()}},7))},8f:B(){F 7.$2e[0].b0.Q},9X:B(){y f=7.8f();if(f.cO){f.km(f.cO)}F f},9V:B(f){f=f||7.C.U;if(7.f1(f)){7.$2e.1K().T("6u").Y(\'<2m 33="ki" 1w="\'+f+\'" />\')}if(d.kf(f)){d.19(f,d.K(B(h,g){7.9V(g)},7))}},9S:B(){7.$J=7.$2e.1K().T("1Q").15({30:M,4r:7.C.4n});if(7.$J[0]){7.Q=7.$J[0].kn;7.2Y=7.Q.ko||2Y}7.9V();if(7.C.2W){7.8Z(7.$J.V())}G{7.7x(7.3H,M,E)}7.9x();7.9b()},dZ:B(f){if(7.8p(f)){if(7.$44.15("3I")){7.C.3I=7.$44.15("3I")}if(7.C.3I===""){7.C.3I=E}if(7.C.3I!==E){7.C.1s=E;7.$J.7O("1s.4o",d.K(7.cJ,7));F d(\'<O Z="4o" 1i-L="2K">\').15("30",E).1e(7.C.3I)}}F E},cJ:B(){7.$J.T("O.4o").1j();y f="";if(7.C.1B===E){f=7.C.41}7.$J.2F("1s.4o");7.$J.V(f);if(7.C.1B===E){7.3A(7.$J.6O()[0])}7.12()},cK:B(){7.C.3I=E;7.$J.T("O.4o").1j();7.$J.2F("1s.4o")},dc:B(f){F f.I(/<O Z="4o"(.*?)>(.*?)<\\/O>/i,"")},5R:B(g,f){if(!7.C.5R){F}if(!g.9a){if(f===77){7.3U(g,"k2")}G{if(f===66){7.3U(g,"3h")}G{if(f===73){7.3U(g,"3d")}G{if(f===74){7.3U(g,"6g")}G{if(f===75){7.3U(g,"6s")}G{if(f===72){7.3U(g,"k3")}G{if(f===76){7.3U(g,"ka")}}}}}}}}G{if(f===48){7.47(g,"p")}G{if(f===49){7.47(g,"h1")}G{if(f===50){7.47(g,"h2")}G{if(f===51){7.47(g,"h3")}G{if(f===52){7.47(g,"h4")}G{if(f===53){7.47(g,"h5")}G{if(f===54){7.47(g,"h6")}}}}}}}}},3U:B(g,f){g.1X();7.1H(f,E)},47:B(g,f){g.1X();7.3N(f)},1s:B(){if(!7.1G("6H")){7.2Y.2h(d.K(7.97,7,M),1)}G{7.$J.1s()}},fE:B(){7.97()},97:B(h){7.$J.1s();y f=7.2C();f.7f(7.$J[0]);f.6L(h||E);y g=7.1L();g.4u();g.5s(f)},96:B(h){y g;if(7.C.4f){if(h!==E){7.1F()}y f=2b;if(7.C.1p){f=7.$2e.1I();if(7.C.2W){7.$J.26("30")}7.$2e.1T()}G{f=7.$J.kZ();7.$J.1T()}g=7.$1g.1f();7.5H=g;7.$1g.1I(f).1R().1s();7.$1g.1d("4k.L-3W-dW",B(j){if(j.2s===9){y i=d(7);y l=i.1S(0).3A;i.1f(i.1f().7T(0,l)+"\\t"+i.1f().7T(i.1S(0).5G));i.1S(0).3A=i.1S(0).5G=l+1;F E}});7.bv();7.4i("V");7.C.4f=E}G{g=7.$1g.1T().1f();if(1o 7.5H!=="1k"){7.5H=7.61(7.5H,E)!==7.61(g,E)}if(7.5H){if(7.C.2W&&g===""){7.8Z(g)}G{7.7x(g);if(7.C.2W){7.95()}}}if(7.C.1p){7.$2e.1R()}G{7.$J.1R()}if(7.C.2W){7.$J.15("30",M)}7.$1g.2F("4k.L-3W-dW");7.$J.1s();7.1n();7.5c();7.bu();7.7W("V");7.C.4f=M}},5h:B(){y f=E;7.7w=dX(d.K(B(){y g=7.1S();if(f!==g){d.c5({32:7.C.5h,1r:"5g",1i:7.$1g.15("2q")+"="+l3(kQ(g)),36:d.K(B(h){7.1h("5h",E,h);f=g},7)})}},7),7.C.7w*kF)},dQ:B(){if(7.C.2a){7.C.3e=7.C.dS}G{if(!7.C.dD){y g=7.C.3e.3r("V"),h=7.C.3e[g+1];7.C.3e.6E(g,1);if(h==="|"){7.C.3e.6E(g,1)}}}d.3P(7.C.1a,7.C.dC);d.19(7.C.dm,d.K(B(j,l){7.C.3e.23(l)},7));if(7.C.1a){d.19(7.C.1a.4K.2N,d.K(B(j,l){if(d.3R(j,7.C.do)=="-1"){al 7.C.1a.4K.2N[j]}},7))}if(7.C.3e.11===0){F E}7.dz();7.$1a=d("<2d>").28("kN").15("id","kM"+7.9h);if(7.C.2a){7.$2a=d(\'<N Z="9Y">\').15("id","kL"+7.9h).1T();7.$2a.Y(7.$1a);d("1Q").Y(7.$2a)}G{if(7.C.9t){d(7.C.9t).V(7.$1a)}G{7.$1M.5k(7.$1a)}}d.19(7.C.3e,d.K(B(l,m){if(m==="|"){7.$1a.Y(d(7.C.5X))}G{if(7.C.1a[m]){y j=7.C.1a[m];if(7.C.6j===E&&m==="2Z"){F M}7.$1a.Y(d("<1u>").Y(7.5o(m,j)))}}},7));7.$1a.T("a").15("5E","-1");if(7.C.3Y){7.9j();d(7.C.9l).1d("kO.L",d.K(7.9j,7))}if(7.C.6r){y f=d.K(7.62,7);7.$J.1d("6F.L 3D.L",f)}},9j:B(){y j=d(7.C.9l).3v();y h=7.$1M.2M().1O;y i=0;y f=h+7.$1M.1I()+40;if(j>h){y g="2x%";if(7.C.7u){i=7.$1M.2M().1m;g=7.$1M.dB();7.$1a.28("dr")}7.3Y=M;7.$1a.U({2G:"7L",2i:g,ah:j3,1O:7.C.di+"2r",1m:i});if(j<f){7.$1a.U("dq","de")}G{7.$1a.U("dq","7E")}}G{7.3Y=E;7.$1a.U({2G:"fj",2i:"3J",1O:0,1m:i});if(7.C.7u){7.$1a.2k("dr")}}},dz:B(){if(!7.C.2a){F}7.$J.1d("6F.L 3D.L",7,d.K(B(g){y i=7.fo();if(g.1r==="6F"&&i!=""){7.9s(g)}if(g.1r==="3D"&&g.3T&&i!=""){y f=d(7.64(7.1L().j0)),h=f.2M();h.1I=f.1I();7.9s(h,M)}},7))},9s:B(j,f){if(!7.C.2a){F}y i,h;d(".9Y").1T();if(f){i=j.1m;h=j.1O+j.1I+14;if(7.C.1p){h+=7.$1M.2G().1O-d(7.Q).3v();i+=7.$1M.2G().1m}}G{y g=7.$2a.dB();i=j.fT;if(d(7.Q).2i()<(i+g)){i-=g}h=j.fS+14;if(7.C.1p){h+=7.$1M.2G().1O;i+=7.$1M.2G().1m}G{h+=d(7.Q).3v()}}7.$2a.U({1m:i+"2r",1O:h+"2r"}).1R();7.dx()},dx:B(){if(!7.C.2a){F}y f=d.K(B(g){d(g).1d("aW.L",d.K(B(h){if(d(h.1z).2A(7.$1a).11===0){7.$2a.5w(2x);7.ee();d(g).2F(h)}},7)).1d("4k.L",d.K(B(h){if(h.6I===7.2s.af){7.1L().jc()}7.$2a.5w(2x);d(g).2F(h)},7))},7);f(Q);if(7.C.1p){f(7.Q)}},7R:B(){if(!7.C.2a){F}y f=d.K(B(g){d(g).1d("fv.L",d.K(B(h){if(d(h.1z).2A(7.$1a).11===0){7.$2a.5w(2x);d(g).2F(h)}},7))},7);f(Q);if(7.C.1p){f(7.Q)}},by:B(g,f){d.19(f,d.K(B(j,i){if(!i.3g){i.3g=""}y h;if(i.2q==="7P"){h=d(\'<a Z="j8">\')}G{h=d(\'<a 1w="#" Z="\'+i.3g+" ja"+j+\'">\'+i.R+"</a>");h.1d("1v",d.K(B(l){if(l.1X){l.1X()}if(7.1G("3j")){l.dY=E}if(i.1h){i.1h.3y(7,j,h,i,l)}if(i.1P){7.1H(i.1P,j)}if(i.1b){7[i.1b](j)}7.62();if(7.C.2a){7.$2a.5w(2x)}},7))}g.Y(h)},7))},bB:B(l,p){if(!7.C.4f){l.1X();F E}y m=7.$1a.T(".bz"+p);y f=7.2v(p);if(f.3i("5q")){7.7N()}G{7.7N();7.4i(p);f.28("5q");y q=f.2G();if(7.3Y){q=f.2M()}y n=m.2i();if((q.1m+n)>d(Q).2i()){q.1m-=n}y h=q.1m+"2r";y i=29;y j="7D";y o=i+"2r";if(7.C.3Y&&7.3Y){j="7L"}G{if(!7.C.2a){o=q.1O+i+"2r"}}m.U({2G:j,1m:h,1O:o}).1R()}y g=d.K(B(r){7.cu(r,m)},7);d(Q).7O("1v",g);7.$J.7O("1v",g);l.iL()},7N:B(){7.$1a.T("a.5q").2k("5p").2k("5q");d(".bC").1T()},cu:B(g,f){if(!d(g.1z).3i("5q")){f.2k("5q");7.7N()}},5o:B(i,f){y g=d(\'<a 1w="7l:;" R="\'+f.R+\'" Z="8i 7n\'+i+\'"></a>\');g.1d("1v",d.K(B(j){if(j.1X){j.1X()}if(7.1G("3j")){j.dY=E}if(g.3i("8C")){F E}if(7.7b()===E&&!f.1P){7.$J.1s()}if(f.1P){7.$J.1s();7.1H(f.1P,i);7.7R()}G{if(f.1b&&f.1b!=="1R"){7[f.1b](i);7.7R()}G{if(f.1h){f.1h.3y(7,i,g,f,j);7.7R()}G{if(f.2N){7.bB(j,i)}}}}7.62(E,i)},7));if(f.2N){y h=d(\'<N Z="bC bz\'+i+\'" 16="2t: 25;">\');h.7C(7.$1a);7.by(h,f.2N)}F g},2v:B(f){if(!7.C.1a){F E}F d(7.$1a.T("a.7n"+f))},bF:B(g){y f=7.2v(g);if(f.3i("5p")){f.2k("5p")}G{f.28("5p")}},4i:B(f){7.2v(f).28("5p")},7W:B(f){7.2v(f).2k("5p")},bI:B(f){d.19(7.C.1a,d.K(B(g){if(g!=f){7.7W(g)}},7))},bu:B(){7.$1a.T("a.8i").4Z("a.bx").2k("8C")},bv:B(){7.$1a.T("a.8i").4Z("a.bx").28("8C")},jH:B(f,g){7.2v(f).28("7n"+g)},jI:B(f,g){7.2v(f).2k("7n"+g)},jG:B(){7.$1a.Y(d(7.C.5X))},jF:B(f){7.2v(f).1N().1W(d(7.C.5X))},jC:B(f){7.2v(f).1N().38(d(7.C.5X))},jE:B(f){7.2v(f).1N().6b().1j()},jK:B(f){7.2v(f).1N().6N().1j()},jL:B(f){if(!7.C.1a){F}7.2v(f).1N().28("8T")},jR:B(f){if(!7.C.1a){F}7.2v(f).1N().2k("8T")},jS:B(g,h,j,i){if(!7.C.1a){F}y f=7.5o(g,{R:h,1h:j,2N:i});7.$1a.Y(d("<1u>").Y(f))},jQ:B(g,h,j,i){if(!7.C.1a){F}y f=7.5o(g,{R:h,1h:j,2N:i});7.$1a.5k(d("<1u>").Y(f))},jP:B(m,g,i,l,j){if(!7.C.1a){F}y f=7.5o(g,{R:i,1h:l,2N:j});y h=7.2v(m);if(h.2n()!==0){h.1N().1W(d("<1u>").Y(f))}G{7.$1a.Y(d("<1u>").Y(f))}},jM:B(j,g,i,m,l){if(!7.C.1a){F}y f=7.5o(g,{R:i,1h:m,2N:l});y h=7.2v(j);if(h.2n()!==0){h.1N().38(d("<1u>").Y(f))}G{7.$1a.Y(d("<1u>").Y(f))}},jB:B(f,h){y g=7.2v(f);if(h){g.1N().6b().1j()}g.1N().2k("8T");g.1j()},62:B(h,j){y f=7.3w();7.bI(j);if(h===E&&j!=="V"){if(d.3R(j,7.C.6r)!=-1){7.bF(j)}F}if(f&&f.X==="A"){7.$1a.T("a.bH").1e(7.C.18.bG)}G{7.$1a.T("a.bH").1e(7.C.18.8N)}if(7.C.6p){d.19(7.C.6p,d.K(B(l,m){7.C.6r.23(m)},7));d.3P(7.C.8m,7.C.6p)}d.19(7.C.8m,d.K(B(l,m){if(d(f).2A(l,7.$J.1S()[0]).11!=0){7.4i(m)}},7));y g=d(f).2A(7.C.3Z.2V().2X(),7.$J[0]);if(g.11){y i=g.U("1e-79");jr(i){8j"3E":7.4i("6n");6h;8j"bi":7.4i("6D");6h;8j"5b":7.4i("5b");6h;jz:7.4i("6A");6h}}},1P:B(g,h,f){if(g==="fJ"&&7.1G("3j")){h="<"+h+">"}if(g==="3M"&&7.1G("3j")){7.$J.1s();7.Q.2c.57().a6(h)}G{7.Q.1H(g,E,h)}if(f!==E){7.12()}7.1h("1H",g,h)},1H:B(i,h,q){if(!7.C.4f){7.$1g.1s();F E}if(i==="3M"){7.7g(h,q);7.1h("1H",i,h);F}if(7.5M("4C")&&!7.C.bf){F E}if(i==="6g"||i==="6s"){7.1x();y r=7.3w();y m=d(r).2A("2y, 2d");y l=E;if(m.11){l=M;y o=m[0].X;if((i==="6g"&&o==="ju")||(i==="6s"&&o==="jp")){l=E}}7.1F();if(l){y g=7.4Y();y f=7.2E(g);if(1o g[0]!="1k"&&g.11>1&&g[0].3n==3){f.fw(7.1Y())}y j="",s="";d.19(f,d.K(B(v,w){if(w.X=="2H"){y u=d(w);y t=u.4H();t.T("2d","2y").1j();if(7.C.1B===E){j+=7.5u(d("<p>").Y(t.1K()))}G{j+=t.V()+"<br>"}if(v==0){u.28("L-jg").6a();s=7.5u(u)}G{u.1j()}}},7));V=7.$J.V().I(s,"</"+o+">"+j+"<"+o+">");7.$J.V(V);7.$J.T(o+":6a").1j()}G{7.Q.1H(i);y r=7.3w();y m=d(r).2A("2y, 2d");if(m.11){if((7.1G("3j")||7.1G("3o"))&&r.X!=="2H"){d(r).1U(d(r).V())}y n=m.1N();if(7.7d(n)&&7.6i(n[0])){n.1U(n.1K())}}if(7.1G("3o")){7.$J.1s()}}7.1n();7.12();7.1h("1H",i,h);F}if(i==="4z"){7.1x();y p=7.5M("A");if(p){d(p).1U(d(p).1e());7.12();7.1h("1H",i,h);F}}7.1P(i,h,q);if(i==="ba"){7.$J.T("hr").26("id")}},a5:B(){7.9A("4t")},9N:B(){7.9A("5n")},9A:B(i){7.1x();if(i==="4t"){y j=7.1Y();7.1F();if(j&&j.X=="2H"){y o=7.3w();y l=d(o).2A("2y, 2d");y n=l[0].X;y g=7.2E();d.19(g,B(t,u){if(u.X=="2H"){y r=d(u).6N();if(r.2n()!=0&&r[0].X=="2H"){y q=r.6O("2d, 2y");if(q.2n()==0){r.Y(d("<"+n+">").Y(u))}G{q.Y(u)}}}})}G{if(j===E&&7.C.1B===M){7.1P("59","2u");y p=7.1Y();y j=d(\'<N 1i-5Q="">\').V(d(p).V());d(p).1U(j);y h=7.6R(d(j).U("21-1m"))+7.C.6v;d(j).U("21-1m",h+"2r")}G{y f=7.2E();d.19(f,d.K(B(r,s){y q=E;if(s.X==="6t"){F}if(d.3R(s.X,7.C.3Z)!==-1){q=d(s)}G{q=d(s).2A(7.C.3Z.2V().2X(),7.$J[0])}y t=7.6R(q.U("21-1m"))+7.C.6v;q.U("21-1m",t+"2r")},7))}}7.1n()}G{7.1F();y j=7.1Y();if(j&&j.X=="2H"){y g=7.2E();y m=0;7.93(j,m,g)}G{y f=7.2E();d.19(f,d.K(B(r,s){y q=E;if(d.3R(s.X,7.C.3Z)!==-1){q=d(s)}G{q=d(s).2A(7.C.3Z.2V().2X(),7.$J[0])}y t=7.6R(q.U("21-1m"))-7.C.6v;if(t<=0){if(7.C.1B===M&&1o(q.1i("5Q"))!=="1k"){q.1U(q.V())}G{q.U("21-1m","");7.3Q(q,"16")}}G{q.U("21-1m",t+"2r")}},7))}7.1n()}},93:B(f,h,g){if(f&&f.X=="2H"){y i=d(f).1N().1N();if(i.2n()!=0&&i[0].X=="2H"){i.1W(f)}G{if(1o g[h]!="1k"){f=g[h];h++;7.93(f,h,g)}G{7.1H("6g")}}}},9p:B(f){y g=7.dZ(f);if(g!==E){F g}if(7.C.1B===E){if(f===""){f=7.C.41}G{if(f.45(/^<hr\\s?\\/?>$/gi)!==-1){f="<hr>"+7.C.41}}}F f},9o:B(f){if(7.C.9E){f=f.I(/<N(.*?)>([\\w\\W]*?)<\\/N>/gi,"<p$1>$2</p>")}if(7.C.4I){f=7.70(f)}F f},9n:B(f){if(7.C.9J){f=f.I(/\\{\\{(.*?)\\}\\}/gi,"<!-- 6C bN $1 -->");f=f.I(/\\{(.*?)\\}/gi,"<!-- 6C $1 -->")}f=f.I(/<2p(.*?)>([\\w\\W]*?)<\\/2p>/gi,\'<R 1r="1e/7l" 16="2t: 25;" Z="L-2p-3L"$1>$2</R>\');f=f.I(/<16(.*?)>([\\w\\W]*?)<\\/16>/gi,\'<1D$1 16="2t: 25;" 33="L-16-3L">$2</1D>\');f=f.I(/<1C(.*?)>([\\w\\W]*?)<\\/1C>/gi,\'<1D$1 33="L-1C-3L">$2</1D>\');if(7.C.5F){f=f.I(/<\\?3k([\\w\\W]*?)\\?>/gi,\'<1D 16="2t: 25;" 33="L-3k-3L">$1</1D>\')}G{f=f.I(/<\\?3k([\\w\\W]*?)\\?>/gi,"")}F f},bk:B(f){if(7.C.9J){f=f.I(/<!-- 6C bN (.*?) -->/gi,"{{$1}}");f=f.I(/<!-- 6C (.*?) -->/gi,"{$1}")}f=f.I(/<R 1r="1e\\/7l" 16="2t: 25;" Z="L-2p-3L"(.*?)>([\\w\\W]*?)<\\/R>/gi,\'<2p$1 1r="1e/7l">$2<\\/2p>\');f=f.I(/<1D(.*?) 16="2t: 25;" 33="L-16-3L">([\\w\\W]*?)<\\/1D>/gi,"<16$1>$2</16>");f=f.I(/<1D(.*?)33="L-1C-3L"(.*?)>([\\w\\W]*?)<\\/1D>/gi,"<1C$1$2>$3</1C>");if(7.C.5F){f=f.I(/<1D 16="2t: 25;" 33="L-3k-3L">([\\w\\W]*?)<\\/1D>/gi,"<?3k\\r\\n$1\\r\\n?>")}F f},61:B(g,f){if(f!==E){y f=[];y i=g.1J(/<(2l|16|2p|R)(.*?)>([\\w\\W]*?)<\\/(2l|16|2p|R)>/gi);if(i===2b){i=[]}if(7.C.5F){y h=g.1J(/<\\?3k([\\w\\W]*?)\\?>/gi);if(h){i=d.9i(i,h)}}if(i){d.19(i,B(j,l){g=g.I(l,"ce"+j);f.23(l)})}}g=g.I(/\\n/g," ");g=g.I(/[\\t]*/g,"");g=g.I(/\\n\\s*\\n/g,"\\n");g=g.I(/^[\\s\\n]*/g," ");g=g.I(/[\\s\\n]*$/g," ");g=g.I(/>\\s{2,}</g,"> <");g=7.ci(g,f);g=g.I(/\\n\\n/g,"\\n");F g},ci:B(g,f){if(f===E){F g}d.19(f,B(h,j){g=g.I("ce"+h,j)});F g},9R:B(j){j=j.I(/<O>([\\w\\W]*?)<\\/O>/gi,"$1");j=j.I(/[\\iM-\\iQ\\jx]/g,"");y l=["<b>\\\\s*</b>","<b>&2j;</b>","<em>\\\\s*</em>"];y h=["<2l></2l>","<2u>\\\\s*</2u>","<dd></dd>","<dt></dt>","<2d></2d>","<2y></2y>","<1u></1u>","<1l></1l>","<2P></2P>","<O>\\\\s*<O>","<O>&2j;<O>","<p>\\\\s*</p>","<p></p>","<p>&2j;</p>","<p>\\\\s*<br>\\\\s*</p>","<N>\\\\s*</N>","<N>\\\\s*<br>\\\\s*</N>"];if(7.C.ca){h=h.jn(l)}G{h=l}y f=h.11;2O(y g=0;g<f;++g){j=j.I(1V 2I(h[g],"gi"),"")}F j},70:B(m){m=d.2o(m);if(7.C.1B===M){F m}if(m===""||m==="<p></p>"){F 7.C.41}m=m+"\\n";y o=[];y l=m.1J(/<(1l|N|2l|2R)(.*?)>([\\w\\W]*?)<\\/(1l|N|2l|2R)>/gi);if(l===2b){l=[]}y n=m.1J(/<!--([\\w\\W]*?)-->/gi);if(n){l=d.9i(l,n)}if(7.C.5F){y g=m.1J(/<1D(.*?)33="L-3k-3L">([\\w\\W]*?)<\\/1D>/gi);if(g){l=d.9i(l,g)}}if(l){d.19(l,B(q,r){o[q]=r;m=m.I(r,"{I"+q+"}\\n")})}m=m.I(/<br \\/>\\s*<br \\/>/gi,"\\n\\n");B j(s,i,q){F m.I(1V 2I(s,i),q)}y f="(jh|V|1Q|6u|R|9k|16|2p|2m|1p|1l|2Q|9y|iV|iU|iT|4y|2P|1E|9q|N|dl|dd|dt|2d|2y|1u|2l|5m|3t|1C|cq|cr|2u|a3|iG|16|p|h[1-6]|hr|co|jd|1D|fF|fD|iY|68|35|j4|kV|l8|kK|kI|kH)";m=j("(<"+f+"[^>]*>)","gi","\\n$1");m=j("(</"+f+">)","gi","$1\\n\\n");m=j("\\r\\n","g","\\n");m=j("\\r","g","\\n");m=j("/\\n\\n+/","g","\\n\\n");y p=m.3x(1V 2I("\\kA*\\n","g"),-1);m="";2O(y h in p){if(p.ky(h)){if(p[h].45("{I")==-1){m+="<p>"+p[h].I(/^\\n+|\\n+$/g,"")+"</p>"}G{m+=p[h]}}}if(m.45(/<2u/gi)!==-1){d.19(m.1J(/<2u(.*?)>([\\w\\W]*?)<\\/2u>/gi),B(q,r){y t="";t=r.I("<p>","");t=t.I("</p>","<br>");m=m.I(r,t)})}m=j("<p>s*</p>","gi","");m=j("<p>([^<]+)</(N|a3|1C)>","gi","<p>$1</p></$2>");m=j("<p>s*(</?"+f+"[^>]*>)s*</p>","gi","$1");m=j("<p>(<1u.+?)</p>","gi","$1");m=j("<p>s*(</?"+f+"[^>]*>)","gi","$1");m=j("(</?"+f+"[^>]*>)s*</p>","gi","$1");m=j("(</?"+f+"[^>]*>)s*<br />","gi","$1");m=j("<br />(s*</?(?:p|1u|N|dl|dd|dt|9q|2l|1E|2d|2y)[^>]*>)","gi","$1");m=j("\\n</p>","gi","</p>");m=j("<1u><p>","gi","<1u>");m=j("</p></1u>","gi","</1u>");m=j("</1u><p>","gi","</1u>");m=j("<p>\\t?\\n?<p>","gi","<p>");m=j("</dt><p>","gi","</dt>");m=j("</dd><p>","gi","</dd>");m=j("<br></p></2u>","gi","</2u>");m=j("<p>\\t*</p>","gi","");d.19(o,B(q,r){m=m.I("{I"+q+"}",r)});F d.2o(m)},6y:B(f){y g="3O";if(7.C.9v==="b"){g="b"}y h="em";if(7.C.9w==="i"){h="i"}f=f.I(/<O 16="3B-16: 3d;">([\\w\\W]*?)<\\/O>/gi,"<"+h+">$1</"+h+">");f=f.I(/<O 16="3B-l1: 3h;">([\\w\\W]*?)<\\/O>/gi,"<"+g+">$1</"+g+">");if(7.C.9v==="3O"){f=f.I(/<b>([\\w\\W]*?)<\\/b>/gi,"<3O>$1</3O>")}G{f=f.I(/<3O>([\\w\\W]*?)<\\/3O>/gi,"<b>$1</b>")}if(7.C.9w==="em"){f=f.I(/<i>([\\w\\W]*?)<\\/i>/gi,"<em>$1</em>")}G{f=f.I(/<em>([\\w\\W]*?)<\\/em>/gi,"<i>$1</i>")}f=f.I(/<6B>([\\w\\W]*?)<\\/6B>/gi,"<6z>$1</6z>");if(!/<O(.*?)1i-L="2K"(.*?)>([\\w\\W]*?)<\\/O>/gi.3u(f)){f=f.I(/<O(.*?)(?!1i-L="2K")(.*?)>([\\w\\W]*?)<\\/O>/gi,\'<O$1 1i-L="2K"$2>$3</O>\')}F f},6c:B(h){if(h==""||1o h=="1k"){F h}y i=E;if(7.C.56!==E){i=M}y f=i===M?7.C.56:7.C.5D;y g=/<\\/?([a-z][a-8y-9]*)\\b[^>]*>/gi;h=h.I(g,B(l,j){if(i===M){F d.3R(j.2X(),f)>"-1"?l:""}G{F d.3R(j.2X(),f)>"-1"?"":l}});h=7.6y(h);F h},9r:B(f,g){y h=f.1J(/<(2l|55)(.*?)>([\\w\\W]*?)<\\/(2l|55)>/gi);if(h!==2b){d.19(h,d.K(B(l,m){y j=m.1J(/<(2l|55)(.*?)>([\\w\\W]*?)<\\/(2l|55)>/i);j[3]=j[3].I(/&2j;/g," ");if(g!==E){j[3]=7.9C(j[3])}f=f.I(m,"<"+j[1]+j[2]+">"+j[3]+"</"+j[1]+">")},7))}F f},9C:B(f){f=3z(f).I(/&7Q;/g,"&").I(/&6d;/g,"<").I(/&gt;/g,">").I(/&bW;/g,\'"\');F 3z(f).I(/&/g,"&7Q;").I(/</g,"&6d;").I(/>/g,"&gt;").I(/"/g,"&bW;")},bX:B(){y f=7.$J.T("1u, 1q, a, b, 3O, iD, i9, i, em, u, gK, 6B, 6z, O, gG");f.4Z(\'[1i-L="2K"]\').94(\'[16*="3B-2n"][16*="5N-1I"]\').U("3B-2n","").U("5N-1I","");f.4Z(\'[1i-L="2K"]\').94(\'[16*="6o-5J: bR;"][16*="5N-1I"]\').U("6o-5J","").U("5N-1I","");f.4Z(\'[1i-L="2K"]\').94(\'[16*="6o-5J: bR;"]\').U("6o-5J","");f.4Z(\'[1i-L="2K"]\').U("5N-1I","");d.19(f,d.K(B(g,h){7.3Q(h,"16")},7));7.$J.T(\'N[16="1e-79: -3G-3J;"]\').1K().fG()},bZ:B(g){y l=0,n=g.11,m=0,f=2b,h=2b,q="",j="",p="";7.5A=0;2O(;l<n;l++){m=l;if(-1==g.3q(l).3r("<")){j+=g.3q(l);F 7.92(j)}2D(m<n&&g.42(m)!="<"){m++}if(l!=m){p=g.3q(l,m-l);if(!p.1J(/^\\s{2,}$/g)){if("\\n"==j.42(j.11-1)){j+=7.58()}G{if("\\n"==p.42(0)){j+="\\n"+7.58();p=p.I(/^\\s+/,"")}}j+=p}if(p.1J(/\\n/)){j+="\\n"+7.58()}}f=m;2D(m<n&&">"!=g.42(m)){m++}q=g.3q(f,m-f);l=m;y o;if("!--"==q.3q(1,3)){if(!q.1J(/--$/)){2D("-->"!=g.3q(m,3)){m++}m+=2;q=g.3q(f,m-f);l=m}if("\\n"!=j.42(j.11-1)){j+="\\n"}j+=7.58();j+=q+">\\n"}G{if("!"==q[1]){j=7.6q(q+">",j)}G{if("?"==q[1]){j+=q+">\\n"}G{if(o=q.1J(/^<(2p|16|2l)/i)){o[1]=o[1].2X();q=7.8X(q);j=7.6q(q,j);h=3z(g.3q(l+1)).2X().3r("</"+o[1]);if(h){p=g.3q(l+1,h);l+=h;j+=p}}G{q=7.8X(q);j=7.6q(q,j)}}}}}F 7.92(j)},58:B(){y g="";2O(y f=0;f<7.5A;f++){g+="\\t"}F g},92:B(f){f=f.I(/\\n\\s*\\n/g,"\\n");f=f.I(/^[\\s\\n]*/,"");f=f.I(/[\\s\\n]*$/,"");f=f.I(/<2p(.*?)>\\n<\\/2p>/gi,"<2p$1><\\/2p>");7.5A=0;F f},8X:B(g){y i="";g=g.I(/\\n/g," ");g=g.I(/\\s{2,}/g," ");g=g.I(/^\\s+|\\s+$/g," ");y h="";if(g.1J(/\\/$/)){h="/";g=g.I(/\\/+$/,"")}y f;2D(f=/\\s*([^= ]+)(?:=(([\'"\']).*?\\3|[^ ]+))?/.1P(g)){if(f[2]){i+=f[1].2X()+"="+f[2]}G{if(f[1]){i+=f[1].2X()}}i+=" ";g=g.3q(f[0].11)}F i.I(/\\s*$/,"")+h+">"},6q:B(f,h){y g=f.1J(7.9e);if(f.1J(7.c3)||g){h=h.I(/\\s*$/,"");h+="\\n"}if(g&&"/"==f.42(1)){7.5A--}if("\\n"==h.42(h.11-1)){h+=7.58()}if(g&&"/"!=f.42(1)){7.5A++}h+=f;if(f.1J(7.c2)||f.1J(7.9e)){h=h.I(/ *$/,"");h+="\\n"}F h},9f:B(){7.5V("","iC")},9d:B(){7.5V("3E","ib")},9c:B(){7.5V("bi","ir")},98:B(){7.5V("5b","hu")},5V:B(g,i){7.1x();if(7.7Z()){7.Q.1H(i,E,E);F M}7.1F();y j=7.1Y();if(!j&&7.C.1B){7.1P("59","2u");y f=7.1Y();y j=d(\'<N 1i-5Q="">\').V(d(f).V());d(f).1U(j);d(j).U("1e-79",g);7.3Q(j,"16");if(g==""&&1o(d(j).1i("5Q"))!=="1k"){d(j).1U(d(j).V())}}G{y h=7.2E();d.19(h,d.K(B(m,n){y l=E;if(d.3R(n.X,7.C.3Z)!==-1){l=d(n)}G{l=d(n).2A(7.C.3Z.2V().2X(),7.$J[0])}if(l){l.U("1e-79",g);7.3Q(l,"16")}},7))}7.1n();7.12()},dP:B(i){y f=d.2o(7.$J.V());f=f.I(/<br\\s?\\/?>/i,"");y h=f.I(/<p>\\s?<\\/p>/gi,"");if(f===""||h===""){i.1X();y g=d(7.C.41).1S(0);7.$J.V(g);7.1s()}7.12()},3N:B(f){7.1x();y g=7.2E();7.1F();d.19(g,d.K(B(h,j){if(j.X!=="2H"){7.59(f,j)}},7));7.1n();7.12()},59:B(f,i){if(i===E){i=7.1Y()}if(i===E){if(7.C.1B===M){7.1H("fJ",f)}F M}y h="";if(f!=="2l"){h=d(i).1K()}G{h=d(i).V();if(d.2o(h)===""){h=\'<O id="2c-1y-1"></O>\'}}if(i.X==="4C"){f="p"}if(7.C.1B===M&&f==="p"){d(i).1U(d("<N>").Y(h).V()+"<br>")}G{y g=d("<"+f+">").Y(h);d(i).1U(g)}},ed:B(h,f,g){if(g!==E){7.1F()}y i=d("<"+f+"/>");d(h).1U(B(){F i.Y(d(7).1K())});if(g!==E){7.1n()}F i},fI:B(){7.1x();if(7.C.1B===E){7.1F();y l=7.2E();if(l){d.19(l,d.K(B(n,o){if(o.X==="4D"){7.59("p",o,E)}G{if(o.X!=="2H"){7.59("2u",o,E)}}},7))}7.1n()}G{y j=7.1Y();if(j.X==="4D"){7.1F();d(j).1U(d(j).V()+"<br>");7.1n()}G{y m=7.ec("2u");y h=d(m).V();y g=["2d","2y","1l","2P","4y","2Q","9y","dl"];d.19(g,B(n,o){h=h.I(1V 2I("<"+o+"(.*?)>","gi"),"");h=h.I(1V 2I("</"+o+">","gi"),"")});y f=7.C.9W;f.23("1E");d.19(f,B(n,o){h=h.I(1V 2I("<"+o+"(.*?)>","gi"),"");h=h.I(1V 2I("</"+o+">","gi"),"<br>")});d(m).V(h);7.8l(m);y i=d(m).6b();if(i.2n()!=0&&i[0].X==="fN"){i.1j()}}}7.12()},gf:B(f,h){y g=7.2E();d(g).26(f);7.12()},gn:B(f,h){y g=7.2E();d(g).15(f,h);7.12()},gp:B(g){y f=7.2E();d(f).U(g,"");7.3Q(f,"16");7.12()},gc:B(h,g){y f=7.2E();d(f).U(h,g);7.12()},fY:B(g){y f=7.2E();d(f).2k(g);7.3Q(f,"Z");7.12()},fX:B(g){y f=7.2E();d(f).28(g);7.12()},fW:B(f){7.1F();7.9U(B(g){d(g).2k(f);7.3Q(g,"Z")});7.1n();7.12()},g9:B(f){y g=7.2B();if(!d(g).3i(f)){7.4h("28",f)}},gb:B(f){7.1F();7.9U(B(g){d(g).U(f,"");7.3Q(g,"16")});7.1n();7.12()},g7:B(g,f){7.4h("U",g,f)},hg:B(f){7.1F();y h=7.2C(),i=7.64(),g=7.4Y();if(h.4w||h.4E===h.63&&i){g=d(i)}d(g).26(f);7.fH();7.1n();7.12()},he:B(f,g){7.4h("15",f,g)},4h:B(i,f,j){7.1x();7.1F();y g=7.2C();y h=7.64();if((g.4w||g.4E===g.63)&&h&&!7.6i(h)){d(h)[i](f,j)}G{7.Q.1H("5K",E,4);y l=7.$J.T("3B");d.19(l,d.K(B(m,n){7.fM(i,n,f,j)},7))}7.1n();7.12()},fM:B(j,i,f,l){y h=d(i).1N(),g;if(h&&h[0].X==="9T"&&h[0].gB.11!=0){g=h;d(i).1U(d(i).V())}G{g=d(\'<O 1i-L="2K" 1i-L-4h>\').Y(d(i).1K());d(i).1U(g)}d(g)[j](f,l);F g},9U:B(j){y g=7.2C(),h=7.64(),f=7.4Y(),i;if(g.4w||g.4E===g.63&&h){f=d(h);i=M}d.19(f,d.K(B(l,m){if(!i&&m.X!=="9T"){if(m.4b.X==="9T"&&!d(m.4b).3i("34")){m=m.4b}G{F}}j.3y(7,m)},7))},fH:B(){y f=7.$J.T("O[1i-L-4h]");d.19(f,d.K(B(h,j){y g=d(j);if(g.15("Z")===1k&&g.15("16")===1k){g.1K().fG()}},7))},kr:B(f){7.1F();7.Q.1H("5K",E,4);y h=7.$J.T("3B");y g;d.19(h,B(j,m){y l=d("<"+f+"/>").Y(d(m).1K());d(m).1U(l);g=l});7.1n();7.12()},kx:B(f){7.1F();y g=f.l7();y h=7.4Y();y i=d(7.3w()).1N();d.19(h,B(j,l){if(l.X===g){7.9Q(l)}});if(i&&i[0].X===g){7.9Q(i)}7.1n();7.12()},9Q:B(f){d(f).1U(d(f).1K())},7g:B(h,j){y m=7.2B();y i=m.4b;7.$J.1s();7.1x();y f=d("<N>").Y(d.a4(h));h=f.V();h=7.9R(h);f=d("<N>").Y(d.a4(h));y g=7.1Y();if(f.1K().11==1){y l=f.1K()[0].X;if(l!="P"&&l==g.X||l=="4C"){h=f.1e();f=d("<N>").Y(h)}}if(!7.C.1B&&f.1K().11==1&&f.1K()[0].3n==3&&(7.8n().11>2||(!m||m.X=="8J"&&!i||i.X=="fz"))){h="<p>"+h+"</p>"}if(f.1K().11>1&&g||f.1K().is("p, :68, 2d, 2y, N, 1l, 2u, 2l, a3, 1D, 68, 35, fD, fF")){if(7.1G("3j")){7.Q.2c.57().a6(h)}G{7.Q.1H("3M",E,h)}}G{7.6P(h,E)}if(7.4F){7.2Y.2h(d.K(B(){if(!7.C.1B){7.5G(7.$J.1K().eA())}G{7.fE()}},7),1)}7.5c();if(j!==E){7.12()}},6P:B(g,l){y m=7.1L();if(m.2U&&m.4g){y f=m.2U(0);f.fO();y h=7.Q.3F("N");h.4v=g;y n=7.Q.ek(),j,i;2D((j=h.8V)){i=n.5v(j)}f.2T(n);if(i){f=f.88();f.fR(i);f.6L(M);m.4u();m.5s(f)}}if(l!==E){7.12()}},jO:B(g){y f=d(d.a4(g));if(f.11){g=f.1e()}7.$J.1s();if(7.1G("3j")){7.Q.2c.57().a6(g)}G{7.Q.1H("3M",E,g)}7.12()},2T:B(f){f=f[0]||f;y g=7.1L();if(g.2U&&g.4g){4B=g.2U(0);4B.fO();4B.2T(f);4B.kB(f);4B.fR(f);g.4u();g.5s(4B)}},e5:B(j,i){y g;y f=j.fT,m=j.fS;if(7.Q.fQ){y l=7.Q.fQ(f,m);g=7.2C();g.6X(l.kh,l.2M);g.6L(M);g.2T(i)}G{if(7.Q.fx){g=7.Q.fx(f,m);g.2T(i)}G{if(1o Q.1Q.ex!="1k"){g=7.Q.1Q.ex();g.ey(f,m);y h=g.hB();h.ey(f,m);g.ij("ge",h);g.5m()}}}},6Z:B(f){if(7.e7()){if(d(d.2o(7.$J.V())).1S(0)!=d.2o(f)&&7.$J.1K().eA()[0]!==f){F E}7.1x();if(7.C.1B===E){y g=d(7.C.41);d(f).1W(g);7.3A(g)}G{y g=d(\'<O id="2c-1y-1">\'+7.C.22+"</O>",7.Q)[0];d(f).1W(g);d(g).1W(7.C.22);7.1n()}}},a0:B(){7.1F();7.$J.T("#2c-1y-1").38("<br>"+(7.1G("3G")?7.C.22:""));7.1n()},l5:B(){7.1F();7.$J.T("#2c-1y-1").38("<br><br>"+(7.1G("3G")?7.C.22:""));7.1n()},ev:B(f){y g=d("<br>"+7.C.22);d(f).1U(g);7.3A(g)},er:B(h){h=7.1h("iN",E,h);if(7.C.es){y g=7.Q.3F("N");h=h.I(/<br>|<\\/H[1-6]>|<\\/p>|<\\/N>/gi,"\\n");g.4v=h;h=g.80||g.e6;h=h.I("\\n","<br>");h=7.70(h);7.7c(h);F E}if(7.5M("4C")){h=7.eG(h);7.7c(h);F M}h=h.I(/<p(.*?)Z="jt"([\\w\\W]*?)<\\/p>/gi,"<2d><p$2</p>");h=h.I(/<p(.*?)Z="jv"([\\w\\W]*?)<\\/p>/gi,"<p$2</p></2d>");h=h.I(/<!--[\\s\\S]*?-->|<\\?(?:3k)?[\\s\\S]*?\\?>/gi,"");h=h.I(/(&2j;){2,}/gi,"&2j;");h=h.I(/&2j;/gi," ");h=h.I(/<b\\jq="eu-1g-1y(.*?)">([\\w\\W]*?)<\\/b>/gi,"$2");h=h.I(/<b(.*?)id="jl-eu-jo(.*?)">([\\w\\W]*?)<\\/b>/gi,"$3");h=7.6c(h);h=h.I(/<1E><\\/1E>/gi,"[1E]");h=h.I(/<1E>&2j;<\\/1E>/gi,"[1E]");h=h.I(/<1E><br><\\/1E>/gi,"[1E]");h=h.I(/<a(.*?)1w="(.*?)"(.*?)>([\\w\\W]*?)<\\/a>/gi,\'[a 1w="$2"]$4[/a]\');h=h.I(/<1p(.*?)>([\\w\\W]*?)<\\/1p>/gi,"[1p$1]$2[/1p]");h=h.I(/<2J(.*?)>([\\w\\W]*?)<\\/2J>/gi,"[2J$1]$2[/2J]");h=h.I(/<4j(.*?)>([\\w\\W]*?)<\\/4j>/gi,"[4j$1]$2[/4j]");h=h.I(/<3m(.*?)>([\\w\\W]*?)<\\/3m>/gi,"[3m$1]$2[/3m]");h=h.I(/<2R(.*?)>([\\w\\W]*?)<\\/2R>/gi,"[2R$1]$2[/2R]");h=h.I(/<5a(.*?)>/gi,"[5a$1]");h=h.I(/<1q(.*?)16="(.*?)"(.*?)>/gi,"[1q$1$3]");h=h.I(/<1q(.*?)>/gi,"[1q$1]");h=h.I(/ Z="(.*?)"/gi,"");h=h.I(/<(\\w+)([\\w\\W]*?)>/gi,"<$1>");h=h.I(/<[^\\/>][^>]*>(\\s*|\\t*|\\n*|&2j;|<br>)<\\/[^>]+>/gi,"");h=h.I(/<N>\\s*?\\t*?\\n*?(<2d>|<2y>|<p>)/gi,"$1");h=h.I(/\\[1E\\]/gi,"<1E>&2j;</1E>");h=h.I(/\\[a 1w="(.*?)"\\]([\\w\\W]*?)\\[\\/a\\]/gi,\'<a 1w="$1">$2</a>\');h=h.I(/\\[1p(.*?)\\]([\\w\\W]*?)\\[\\/1p\\]/gi,"<1p$1>$2</1p>");h=h.I(/\\[2J(.*?)\\]([\\w\\W]*?)\\[\\/2J\\]/gi,"<2J$1>$2</2J>");h=h.I(/\\[4j(.*?)\\]([\\w\\W]*?)\\[\\/4j\\]/gi,"<4j$1>$2</4j>");h=h.I(/\\[3m(.*?)\\]([\\w\\W]*?)\\[\\/3m\\]/gi,"<3m$1>$2</3m>");h=h.I(/\\[2R(.*?)\\]([\\w\\W]*?)\\[\\/2R\\]/gi,"<2R$1>$2</2R>");h=h.I(/\\[5a(.*?)\\]/gi,"<5a$1>");h=h.I(/\\[1q(.*?)\\]/gi,"<1q$1>");if(7.C.9E){h=h.I(/<N(.*?)>([\\w\\W]*?)<\\/N>/gi,"<p>$2</p>");h=h.I(/<\\/N><p>/gi,"<p>");h=h.I(/<\\/p><\\/N>/gi,"</p>")}if(7.5M("2H")){h=h.I(/<p>([\\w\\W]*?)<\\/p>/gi,"$1<br>")}G{h=7.70(h)}h=h.I(/<O(.*?)>([\\w\\W]*?)<\\/O>/gi,"$2");h=h.I(/<1q>/gi,"");h=h.I(/<[^\\/>][^>][^1q|5a|1g]*>(\\s*|\\t*|\\n*|&2j;|<br>)<\\/[^>]+>/gi,"");h=h.I(/\\n{3,}/gi,"\\n");h=h.I(/<p><p>/gi,"<p>");h=h.I(/<\\/p><\\/p>/gi,"</p>");h=h.I(/<1u>(\\s*|\\t*|\\n*)<p>/gi,"<1u>");h=h.I(/<\\/p>(\\s*|\\t*|\\n*)<\\/1u>/gi,"</1u>");if(7.C.1B===M){h=h.I(/<p(.*?)>([\\w\\W]*?)<\\/p>/gi,"$2<br>")}h=h.I(/<[^\\/>][^>][^1q|5a|1g]*>(\\s*|\\t*|\\n*|&2j;|<br>)<\\/[^>]+>/gi,"");h=h.I(/<1q 2w="3G-iO-32\\:\\/\\/(.*?)"(.*?)>/gi,"");7.9G=E;if(7.1G("3o")){if(7.C.7h){y i=h.1J(/<1q 2w="1i:1c(.*?)"(.*?)>/gi);if(i!==2b){7.9G=i;2O(k in i){y f=i[k].I("<1q",\'<1q 1i-3o-7j-1c="\'+k+\'" \');h=h.I(i[k],f)}}}2D(/<br>$/gi.3u(h)){h=h.I(/<br>$/gi,"")}}h=h.I(/<p>•([\\w\\W]*?)<\\/p>/gi,"<1u>$1</1u>");2D(/<3B>([\\w\\W]*?)<\\/3B>/gi.3u(h)){h=h.I(/<3B>([\\w\\W]*?)<\\/3B>/gi,"$1")}7.7c(h)},eG:B(g){g=g.I(/<br>|<\\/H[1-6]>|<\\/p>|<\\/N>/gi,"\\n");y f=7.Q.3F("N");f.4v=g;F 7.9C(f.80||f.e6)},7c:B(f){if(7.4F){if(!7.C.1B){7.$J.V(7.C.41)}G{7.$J.V("")}7.$J.1s()}f=7.1h("iK",E,f);7.7g(f);7.4F=E;2h(d.K(B(){a=E;if(7.1G("3o")){7.$J.T("p:6a").1j()}if(7.9G!==E){7.e8()}},7),2x);if(7.C.4a){d(7.Q.1Q).3v(7.7i)}G{7.$J.3v(7.7i)}},e8:B(){y f=7.$J.T("1q[1i-3o-7j-1c]");d.19(f,d.K(B(j,l){y h=d(l);y g=l.2w.3x(",");y m=g[1];y n=g[0].3x(";")[0].3x(":")[1];d.5g(7.C.9L,{aH:n,1i:m},d.K(B(o){y i=d.6Y(o);h.15("2w",i.4J);h.26("1i-3o-7j-1c");7.12();7.1h("3c",h,i)},7))},7))},e9:B(i){y g=i.1z.j1;y f=g.3x(",");y h=f[1];y j=f[0].3x(";")[0].3x(":")[1];if(7.C.7h){d.5g(7.C.9L,{aH:j,1i:h},d.K(B(n){y m=d.6Y(n);y l=\'<1q 2w="\'+m.4J+\'" id="e4-1c-1y" />\';7.1H("3M",l,E);y o=d(7.$J.T("1q#e4-1c-1y"));if(o.11){o.26("id")}G{o=E}7.12();if(o){7.1h("3c",o,m)}},7))}G{7.7g(\'<1q 2w="\'+g+\'" />\')}},1x:B(f){if(f!==1k){7.C.4d.23(f)}G{7.1F();7.C.4d.23(7.$J.V());7.7V("4d")}},e0:B(){if(7.C.4d.11===0){7.$J.1s();F}7.1F();7.C.5z.23(7.$J.V());7.1n(E,M);7.$J.V(7.C.4d.e3());7.1n();2h(d.K(7.5c,7),2x)},e1:B(){if(7.C.5z.11===0){7.$J.1s();F E}7.1F();7.C.4d.23(7.$J.V());7.1n(E,M);7.$J.V(7.C.5z.e3());7.1n(M);2h(d.K(7.5c,7),4)},5c:B(){7.3s();7.ea();if(7.C.5d){7.5d()}},5d:B(){7.$J.T("a").1d("1v",d.K(7.eb,7));7.$J.1d("1v.L",d.K(B(f){7.5I(f)},7))},ea:B(){7.$J.T("1l").1d("1v",d.K(7.8H,7))},3s:B(){if(7.C.3s===E){F E}7.$J.T("1q").19(d.K(B(f,g){if(7.1G("3j")){d(g).15("kz","1d")}7.f9(g)},7))},eb:B(h){y i=d(h.1z);y l=i.2M();if(7.C.1p){y g=7.$2e.2M();l.1O=g.1O+(l.1O-d(7.Q).3v());l.1m+=g.1m}y o=d(\'<O Z="L-2m-89"></O>\');y f=i.15("1w");if(f.11>24){f=f.7T(0,24)+"..."}y j=d(\'<a 1w="\'+i.15("1w")+\'" 1z="4Q">\'+f+"</a>").1d("1v",d.K(B(p){7.5I(E)},7));y m=d(\'<a 1w="#">\'+7.C.18.aX+"</a>").1d("1v",d.K(B(p){p.1X();7.8w();7.5I(E)},7));y n=d(\'<a 1w="#">\'+7.C.18.4z+"</a>").1d("1v",d.K(B(p){p.1X();7.1H("4z");7.5I(E)},7));o.Y(j);o.Y(" | ");o.Y(m);o.Y(" | ");o.Y(n);o.U({1O:(l.1O+20)+"2r",1m:l.1m+"2r"});d(".L-2m-89").1j();d("1Q").Y(o)},5I:B(f){if(f!==E&&f.1z.X=="A"){F E}d(".L-2m-89").1j()},1L:B(){if(!7.C.2L){F 7.Q.1L()}G{if(!7.C.1p){F 2L.1L()}G{F 2L.1L(7.$2e[0])}}},2C:B(){if(!7.C.2L){if(7.Q.1L){y f=7.Q.1L();if(f.2U&&f.4g){F f.2U(0)}}F 7.Q.57()}G{if(!7.C.1p){F 2L.57()}G{F 2L.57(7.8f())}}},8l:B(f){7.eN(f)},3A:B(f){7.6e(f[0]||f,0,2b,0)},5G:B(f){7.6e(f[0]||f,1,2b,1)},6e:B(m,l,j,h){if(j==2b){j=m}if(h==2b){h=l}y g=7.1L();if(!g){F}y f=7.2C();f.6X(m,l);f.6W(j,h);84{g.4u()}86(i){}g.5s(f)},ec:B(f){f=f.2X();y i=7.1Y();if(i){y j=7.ed(i,f);7.12();F j}y h=7.1L();y g=h.2U(0);y j=Q.3F(f);j.5v(g.l0());g.2T(j);7.8l(j);F j},kR:B(){y f=7.2C();f.7f(7.$J[0]);y g=7.1L();g.4u();g.5s(f)},ee:B(){7.1L().4u()},eF:B(i){y f=0;y h=7.2C();y g=h.88();g.7f(i);g.6W(h.63,h.ef);f=d.2o(g.2V()).11;F f},eH:B(){F 1V e(7.1L().2U(0))},eN:B(j,g,n){if(1o n==="1k"){n=g}j=j[0]||j;y p=7.2C();p.7f(j);y q=7.8h(j);y m=E;y f=0,r;if(q.11==1&&g){p.6X(q[0],g);p.6W(q[0],n)}G{2O(y o=0,l;l=q[o++];){r=f+l.11;if(!m&&g>=f&&(g<r||(g==r&&o<q.11))){p.6X(l,g-f);m=M}if(m&&n<=r){p.6W(l,n-f);6h}f=r}}y h=7.1L();h.4u();h.5s(p)},8h:B(l){y j=[];if(l.3n==3){j.23(l)}G{y h=l.8Y;2O(y g=0,f=h.11;g<f;++g){j.23.fh(j,7.8h(h[g]))}}F j},1F:B(){if(!7.7b()){7.$J.1s()}if(!7.C.2L){7.fi(7.2C())}G{7.4e=2L.ks()}},fi:B(i,f){if(!i){F}y h=d(\'<O id="2c-1y-1" Z="L-2c-1y">\'+7.C.22+"</O>",7.Q)[0];y g=d(\'<O id="2c-1y-2" Z="L-2c-1y">\'+7.C.22+"</O>",7.Q)[0];if(i.4w===M){7.6K(i,h,M)}G{7.6K(i,h,M);7.6K(i,g,E)}7.4e=7.$J.V();7.1n(E,E)},6K:B(f,h,g){y i=f.88();i.6L(g);i.2T(h);i.kj()},1n:B(i,f){if(!7.C.2L){if(i===M&&7.4e){7.$J.V(7.4e)}y h=7.$J.T("O#2c-1y-1");y g=7.$J.T("O#2c-1y-2");if(7.1G("3o")){7.$J.1s()}G{if(!7.7b()){7.$J.1s()}}if(h.11!=0&&g.11!=0){7.6e(h[0],0,g[0],0)}G{if(h.11!=0){7.6e(h[0],0,2b,0)}}if(f!==E){7.7V();7.4e=E}}G{2L.kk(7.4e)}},7V:B(f){if(!7.C.2L){d.19(7.$J.T("O.L-2c-1y"),B(){y g=d.2o(d(7).V().I(/[^\\fb-\\fc]/g,""));if(g==""){d(7).1j()}G{d(7).26("Z").26("id")}})}G{2L.gN(7.4e)}},2B:B(){y f=E;y g=7.1L();if(g.4g>0){f=g.2U(0).4E}F 7.7d(f)},3w:B(f){f=f||7.2B();if(f){F 7.7d(d(f).1N()[0])}G{F E}},1Y:B(f){if(1o f==="1k"){f=7.2B()}2D(f){if(7.6i(f)){if(d(f).3i("34")){F E}F f}f=f.4b}F E},2E:B(g){y h=[];if(1o g=="1k"){y f=7.2C();if(f&&f.4w===M){F[7.1Y()]}y g=7.4Y(f)}d.19(g,d.K(B(j,l){if(7.C.1p===E&&d(l).9I("N.34").2n()==0){F E}if(7.6i(l)){h.23(l)}},7));if(h.11===0){h=[7.1Y()]}F h},6i:B(f){F f.3n==1&&7.7Y.3u(f.gP)},81:B(f){F 7.7Y.3u(f)},fu:B(j){if(1o j=="1k"||j==E){y j=7.2C()}if(j&&j.4w===M){F[7.2B()]}y f=7.1L();84{y p=f.2U(0).fp()}86(n){F(E)}y l=7.Q.3F("O");l.5v(p);2Y.83=l.8Y;y m=83.11;y g=[];2O(y h=0,o=m;h<o;h++){g.23(83[h])}if(g.11==0){g.23(7.2B())}F g},4Y:B(h,f){if(7.C.1B){F 7.fu(h)}if(1o h=="1k"||h==E){y h=7.2C()}if(h&&h.4w===M){if(1o f==="1k"&&7.81(f)){y l=7.1Y();if(l.X==f){F[l]}G{F[]}}G{F[7.2B()]}}y g=[],j=[];y i=7.Q.1L();if(!i.ha){g=7.8n(i.2U(0))}d.19(g,d.K(B(m,n){if(7.C.1p===E&&d(n).9I("N.34").2n()==0){F E}if(1o f==="1k"){if(d.2o(n.80)!=""){j.23(n)}}G{if(n.X==f){j.23(n)}}},7));if(j.11==0){if(1o f==="1k"&&7.81(f)){y l=7.1Y();if(l.X==f){F j.23(l)}G{F[]}}G{j.23(7.2B())}}F j},64:B(f){if(!f){f=7.2B()}2D(f){if(f.3n==1){if(d(f).3i("34")){F E}F f}f=f.4b}F E},8n:B(g){g=g||7.2C();y h=g.4E;y f=g.63;if(h==f){F[h]}y i=[];2D(h&&h!=f){i.23(h=7.ft(h))}h=g.4E;2D(h&&h!=g.gW){i.fw(h);h=h.4b}F i},ft:B(f){if(f.gr()){F f.8V}G{2D(f&&!f.fs){f=f.4b}if(!f){F 2b}F f.fs}},fo:B(){F 7.1L().2V()},ga:B(){y j="";y l=7.1L();if(l.4g){y g=7.Q.3F("N");y f=l.4g;2O(y h=0;h<f;++h){g.5v(l.2U(h).fp())}j=g.4v}F 7.8K(j)},fr:B(){7.1F();7.4m(7.C.18.1l,7.C.bg,g1,d.K(B(){d("#bb").1v(d.K(7.fa,7));2h(B(){d("#aO").1s()},3S)},7))},fa:B(){y s=d("#aO").1f(),g=d("#b6").1f(),o=d("<N></N>"),f=3b.cg(3b.cb()*cc),q=d(\'<1l id="1l\'+f+\'"><4y></4y></1l>\'),h,m,n,p;2O(h=0;h<s;h++){m=d("<2P></2P>");2O(n=0;n<g;n++){p=d("<1E>"+7.C.22+"</1E>");if(h===0&&n===0){p.Y(\'<O id="2c-1y-1">\'+7.C.22+"</O>")}d(m).Y(p)}q.Y(m)}o.Y(q);y j=o.V();7.2g();7.1n();y l=7.1Y()||7.2B();if(l&&l.X!="8J"){d(l).1W(j)}G{7.6P(j,E)}7.1n();y r=7.$J.T("#1l"+f);7.8H(r);7.62();r.T("O#2c-1y-1").1j();r.26("id");7.12()},8H:B(f){7.$1l=d(f.1z||f).2A("1l");7.$4y=d(f.1z).2A("4y");7.$2Q=7.$1l.T("2Q");7.$8s=d(f.1z||7.$1l.T("1E").6T());7.$3l=d(f.1z||7.$1l.T("2P").6T()).2A("2P")},eV:B(){7.1x();if(!7.$1l){F}7.$1l.1j();7.$1l=E;7.12()},eW:B(){7.1x();if(!7.$3l){F}y f=7.$3l.6N().11?7.$3l.6N():7.$3l.6b();if(f.11){y g=f.6O("1E").6T();if(g.11){g.5k(\'<O id="2c-1y-1">\'+7.C.22+"</O>");7.1n()}}7.$3l.1j();7.12()},eX:B(){7.1x();y f=7.$8s.1S(0).gg;7.$1l.T("2P").19(d.K(B(g,h){y j=f-1<0?f+1:f-1;if(g===0){d(h).T("1E").eq(j).5k(\'<O id="2c-1y-1">\'+7.C.22+"</O>");7.1n()}d(h).T("1E").eq(f).1j()},7));7.12()},eS:B(){7.1x();if(7.$1l.T("2Q").2n()!==0){7.8F()}G{y f=7.$1l.T("2P").6T().4H();f.T("1E").V(7.C.22);7.$2Q=d("<2Q></2Q>");7.$2Q.Y(f);7.$1l.5k(7.$2Q);7.12()}},8F:B(){7.1x();d(7.$2Q).1j();7.$2Q=E;7.12()},eO:B(){7.8t("38")},eP:B(){7.8t("1W")},eQ:B(){7.8u("38")},eR:B(){7.8u("1W")},8t:B(f){7.1x();y g=7.$3l.4H();g.T("1E").V(7.C.22);if(f==="1W"){7.$3l.1W(g)}G{7.$3l.38(g)}7.12()},8u:B(g){7.1x();y f=0;7.$3l.T("1E").19(d.K(B(h,j){if(d(j)[0]===7.$8s[0]){f=h}},7));7.$1l.T("2P").19(d.K(B(h,l){y j=d(l).T("1E").eq(f);y m=j.4H();m.V(7.C.22);g==="1W"?j.1W(m):j.38(m)},7));7.12()},eZ:B(){7.1F();7.4m(7.C.18.2J,7.C.bd,im,d.K(B(){d("#bL").1v(d.K(7.f6,7));2h(B(){d("#ax").1s()},3S)},7))},f6:B(){y f=d("#ax").1f();f=7.6c(f);7.1n();y g=7.1Y()||7.2B();if(g){d(g).1W(f)}G{7.6P(f,E)}7.12();7.2g()},8w:B(){7.1F();y f=d.K(B(){7.5e=E;y h=7.1L();y g="",o="",j="";y i=7.3w();y l=d(i).1N().1S(0);if(l&&l.X==="A"){i=l}if(i&&i.X==="A"){g=i.1w;o=d(i).1e();j=i.1z;7.5e=i}G{o=h.2V()}d(".6w").1f(o);y q=f8.f5.1w.I(/\\/$/i,"");y n=g.I(q,"");if(7.C.6f===E){y p=1V 2I("^(7k|a1|71)://"+f8.f5.hj,"i");n=n.I(p,"")}y m=d("#3K").T("a");if(7.C.8D===E){m.eq(1).1j()}if(7.C.8A===E){m.eq(2).1j()}if(7.C.8D===E&&7.C.8A===E){d("#3K").1j();d("#5C").1f(n)}G{if(g.45("5S:")===0){7.av.3y(7,2);d("#6k").1f(2);d("#aR").1f(g.I("5S:",""))}G{if(n.45(/^#/gi)===0){7.av.3y(7,3);d("#6k").1f(3);d("#aL").1f(n.I(/^#/gi,""))}G{d("#5C").1f(n)}}}if(j==="4Q"){d("#5i").6V("6U",M)}d("#bh").1v(d.K(7.f0,7));2h(B(){d("#5C").1s()},3S)},7);7.4m(7.C.18.2m,7.C.c9,ho,f)},f0:B(){y j=d("#6k").1f();y h="",n="",l="",m="";if(j==="1"){h=d("#5C").1f();n=d("#ck").1f();if(d("#5i").6V("6U")){l=\' 1z="4Q"\';m="4Q"}y i="((hO--)?[a-8y-9]+(-[a-8y-9]+)*.)+[a-z]{2,}";y g=1V 2I("^(7k|a1|71)://"+i,"i");y f=1V 2I("^"+i,"i");if(h.45(g)==-1&&h.45(f)==0&&7.C.6f){h=7.C.6f+h}}G{if(j==="2"){h="5S:"+d("#aR").1f();n=d("#bl").1f()}G{if(j==="3"){h="#"+d("#aL").1f();n=d("#bo").1f()}}}n=n.I(/<|>/g,"");7.f3(\'<a 1w="\'+h+\'"\'+l+">"+n+"</a>",d.2o(n),h,m)},f3:B(f,i,g,h){7.1n();if(i!==""){if(7.5e){7.1x();d(7.5e).1e(i).15("1w",g);if(h!==""){d(7.5e).15("1z",h)}G{d(7.5e).26("1z")}7.12()}G{7.1P("3M",f)}}7.2g()},bm:B(){7.1F();y f=d.K(B(){y g=7.1L();y h="";if(7.7Z()){h=g.1e}G{h=g.2V()}d("#aI").1f(h);if(!7.43()){7.ak("#3X",{32:7.C.6j,31:7.C.31,36:d.K(7.b4,7),39:d.K(B(j,i){7.1h("f2",i)},7)})}7.b3("3X",{3J:M,32:7.C.6j,36:d.K(7.b4,7),39:d.K(B(j,i){7.1h("f2",i)},7)})},7);7.4m(7.C.18.2Z,7.C.fB,bV,f)},b4:B(g){7.1n();if(g!==E){y i=d("#aI").1f();if(i===""){i=g.aB}y h=\'<a 1w="\'+g.4J+\'" id="4J-1y">\'+i+"</a>";if(7.1G("3G")&&!!7.2Y.8L){h=h+"&2j;"}7.1H("3M",h,E);y f=d(7.$J.T("a#4J-1y"));if(f.2n()!=0){f.26("id")}G{f=E}7.12();7.1h("6j",f,g)}7.2g()},f4:B(){7.1F();y f=d.K(B(){if(7.C.67){d.hl(7.C.67,d.K(B(m){y i={},l=0;d.19(m,d.K(B(o,p){if(1o p.6Q!=="1k"){l++;i[p.6Q]=l}},7));y j=E;d.19(m,d.K(B(r,s){y q="";if(1o s.R!=="1k"){q=s.R}y o=0;if(!d.f7(i)&&1o s.6Q!=="1k"){o=i[s.6Q];if(j===E){j=".5f"+o}}y p=d(\'<1q 2w="\'+s.hV+\'" Z="5f 5f\'+o+\'" 33="\'+s.1c+\'" R="\'+q+\'" />\');d("#aA").Y(p);d(p).1v(d.K(7.fU,7))},7));if(!d.f7(i)){d(".5f").1T();d(j).1R();y n=B(o){d(".5f").1T();d(".5f"+d(o.1z).1f()).1R()};y h=d(\'<5m id="il">\');d.19(i,B(p,o){h.Y(d(\'<3t 2S="\'+o+\'">\'+p+"</3t>"))});d("#aA").38(h);h.7A(n)}},7))}G{d("#3K").T("a").eq(1).1j()}if(7.C.3c||7.C.5T){if(!7.43()&&7.C.5T===E){if(d("#3X").11){7.ak("#3X",{32:7.C.3c,31:7.C.31,36:d.K(7.aJ,7),39:d.K(B(i,h){7.1h("ar",h)},7)})}}if(7.C.5T===E){7.b3("3X",{3J:M,32:7.C.3c,36:d.K(7.aJ,7),39:d.K(B(i,h){7.1h("ar",h)},7)})}G{d("#3X").1d("7A.L",d.K(7.cN,7))}}G{d(".3a").1T();if(!7.C.67){d("#3K").1j();d("#aQ").1R()}G{y g=d("#3K").T("a");g.eq(0).1j();g.eq(1).28("4q");d("#aU").1R()}}d("#c8").1v(d.K(7.fC,7));if(!7.C.3c&&!7.C.67){2h(B(){d("#4L").1s()},3S)}},7);7.4m(7.C.18.1c,7.C.c7,it,f)},e2:B(h){y f=h;y g=f.1N().1N();y i=d.K(B(){d("#aF").1f(f.15("aS"));d("#hX").15("1w",f.15("2w"));d("#aG").1f(f.U("4O"));if(d(g).1S(0).X==="A"){d("#4L").1f(d(g).15("1w"));if(d(g).15("1z")=="4Q"){d("#5i").6V("6U",M)}}d("#ct").1v(d.K(B(){7.aq(f)},7));d("#c0").1v(d.K(B(){7.eT(f)},7))},7);7.4m(7.C.18.1c,7.C.fL,i6,i)},aq:B(g){y f=d(g).1N();d(g).1j();if(f.11&&f[0].X==="P"){7.$J.1s();7.3A(f)}7.1h("gh",g);7.2g();7.12()},eT:B(i){y g=d(i);y h=g.1N();g.15("aS",d("#aF").1f());y n=d("#aG").1f();if(n==="1m"){g.U({"4O":"1m",21:"0 "+7.C.69+" "+7.C.69+" 0"})}G{if(n==="3E"){g.U({"4O":"3E",21:"0 0 "+7.C.69+" "+7.C.69+""})}G{y l=g.2A("#L-1c-1M");if(l.2n()!=0){l.U({"4O":"",21:""})}g.U({"4O":"",21:""})}}y j=d.2o(d("#4L").1f());if(j!==""){y m=E;if(d("#5i").6V("6U")){m=M}if(h.1S(0).X!=="A"){y f=d(\'<a 1w="\'+j+\'">\'+7.5u(i)+"</a>");if(m){f.15("1z","4Q")}g.1U(f)}G{h.15("1w",j);if(m){h.15("1z","4Q")}G{h.26("1z")}}}G{if(h.1S(0).X==="A"){h.1U(7.5u(i))}}7.2g();7.3s();7.12()},4W:B(h){if(h!==E&&d(h.1z).1N().2n()!=0&&d(h.1z).1N()[0].id==="L-1c-1M"){F E}y f=7.$J.T("#L-1c-1M");if(f.2n()==0){F E}7.$J.T("#L-1c-aj, #L-1c-ai").1j();y g=f.U("21");if(g!="fy"){f.T("1q").U("21",g);f.U("21","")}f.T("1q").U("eh","");f.1U(B(){F d(7).1K()});d(Q).2F("1v.L-1c-5L-1T");7.$J.2F("1v.L-1c-5L-1T");7.$J.2F("4k.L-1c-al");7.12()},f9:B(g){y f=d(g);f.1d("aW",d.K(B(){7.4W(E)},7));f.1d("fZ",d.K(B(){7.$J.1d("5y.L-1c-fq-5y",d.K(B(){2h(d.K(B(){7.3s();7.$J.2F("5y.L-1c-fq-5y");7.12()},7),1)},7))},7));f.1d("1v",d.K(B(l){if(7.$J.T("#L-1c-1M").2n()!=0){F E}y n=E,q,p,m=f.2i()/f.1I(),o=20,j=10;y h=7.fg(f);y i=E;h.1d("aW",B(r){i=M;r.1X();m=f.2i()/f.1I();q=3b.4P(r.ap-f.eq(0).2M().1m);p=3b.4P(r.ao-f.eq(0).2M().1O)});d(7.Q.1Q).1d("fv",d.K(B(v){if(i){y s=3b.4P(v.ap-f.eq(0).2M().1m)-q;y r=3b.4P(v.ao-f.eq(0).2M().1O)-p;y u=f.1I();y w=6G(u,10)+r;y t=3b.4P(w*m);if(t>o){f.2i(t);if(t<2x){7.4N.U({7t:"-7a",7U:"-hf",5K:"hd",aa:"hc eo"})}G{7.4N.U({7t:"-7e",7U:"-ej",5K:"7e",aa:"7a a9"})}}q=3b.4P(v.ap-f.eq(0).2M().1m);p=3b.4P(v.ao-f.eq(0).2M().1O);7.12()}},7)).1d("6F",B(){i=E});7.$J.1d("4k.L-1c-al",d.K(B(s){y r=s.6I;if(7.2s.6J==r||7.2s.am==r){7.4W(E);7.aq(f)}},7));d(Q).1d("1v.L-1c-5L-1T",d.K(7.4W,7));7.$J.1d("1v.L-1c-5L-1T",d.K(7.4W,7))},7))},fg:B(g){y h=d(\'<O id="L-1c-1M" 1i-L="2K">\');h.U({2G:"fj",2t:"ku-kp",ag:0,jX:"eI kb k8(0, 0, 0, .6)","4O":g.U("4O")});h.15("30",E);y i=g.U("21");if(i!="fy"){h.U("21",i);g.U("21","")}g.U("eh",0.5).1W(h);7.4N=d(\'<O id="L-1c-aj" 1i-L="2K">\'+7.C.18.aX+"</O>");7.4N.U({2G:"7D",ah:2,1O:"50%",1m:"50%",7t:"-7e",7U:"-ej",ag:1,et:"#ew",5J:"#eC",5K:"7e",aa:"7a a9",ae:"kG"});7.4N.15("30",E);7.4N.1d("1v",d.K(B(){7.e2(g)},7));h.Y(7.4N);y f=d(\'<O id="L-1c-ai" 1i-L="2K"></O>\');f.U({2G:"7D",ah:2,ag:1,ae:"jf-5L",j9:"-iE",3E:"-eo",iP:"eI jJ #eC",et:"#ew",2i:"ez",1I:"ez"});f.15("30",E);h.Y(f);h.Y(g);F f},fU:B(g){y f=\'<1q id="1c-1y" 2w="\'+d(g.1z).15("33")+\'" aS="\'+d(g.1z).15("R")+\'" />\';if(7.C.4I){f="<p>"+f+"</p>"}7.78(f,M)},fC:B(){y g=d("#4L").1f();if(g!==""){y f=\'<1q id="1c-1y" 2w="\'+g+\'" />\';if(7.C.1B===E){f="<p>"+f+"</p>"}7.78(f,M)}G{7.2g()}},aJ:B(f){7.78(f)},78:B(g,h){7.1n();if(g!==E){y f="";if(h!==M){f=\'<1q id="1c-1y" 2w="\'+g.4J+\'" />\';if(7.C.4I){f="<p>"+f+"</p>"}}G{f=g}7.1H("3M",f,E);y i=d(7.$J.T("1q#1c-1y"));if(i.11){i.26("id")}G{i=E}7.12();h!==M&&7.1h("3c",i,g)}7.2g();7.3s()},fA:B(){d.3P(7.C,{fB:3z()+\'<1D><N id="L-1Z" Z="L-1Z L-1Z-az" 16="2t: 25;"><N id="L-1Z-5l" Z="L-1Z-5l" 16="2i: 2x%;"></N></N><1C id="gQ" 5x="5g" 4s="" 7J="7I/1C-1i"><1t>\'+7.C.18.aB+\'</1t><1A 1r="1e" id="aI" Z="3p" /><N 16="21-1O: 7a;"><1A 1r="2Z" id="3X" 2q="2Z" /></N></1C></1D>\',fL:3z()+"<1D><1t>"+7.C.18.R+\'</1t><1A id="aF" Z="3p" /><1t>\'+7.C.18.2m+\'</1t><1A id="4L" Z="3p" /><1t><1A 1r="cj" id="5i"> \'+7.C.18.aT+"</1t><1t>"+7.C.18.bq+\'</1t><5m id="aG"><3t 2S="25">\'+7.C.18.25+\'</3t><3t 2S="1m">\'+7.C.18.1m+\'</3t><3t 2S="3E">\'+7.C.18.3E+\'</3t></5m></1D><35><2f id="ct" Z="3f">\'+7.C.18.c1+\'</2f>&2j;&2j;&2j;<2f Z="3f 5r">\'+7.C.18.5j+\'</2f><1A 1r="2f" 2q="aE" Z="3f" id="c0" 2S="\'+7.C.18.aE+\'" /></35>\',c7:3z()+\'<1D><N id="3K"><a 1w="#" Z="4q">\'+7.C.18.4M+\'</a><a 1w="#">\'+7.C.18.aD+\'</a><a 1w="#">\'+7.C.18.2m+\'</a></N><N id="L-1Z" Z="L-1Z L-1Z-az" 16="2t: 25;"><N id="L-1Z-5l" Z="L-1Z-5l" 16="2i: 2x%;"></N></N><1C id="gX" 5x="5g" 4s="" 7J="7I/1C-1i"><N id="cn" Z="3a"><1A 1r="2Z" id="3X" 2q="2Z" /></N><N id="aU" Z="3a" 16="2t: 25;"><N id="aA"></N></N></1C><N id="aQ" Z="3a" 16="2t: 25;"><1t>\'+7.C.18.bU+\'</1t><1A 1r="1e" 2q="4L" id="4L" Z="3p" /></N></1D><35><2f Z="3f 5r">\'+7.C.18.5j+\'</2f><1A 1r="2f" 2q="4M" Z="3f" id="c8" 2S="\'+7.C.18.6l+\'" /></35>\',c9:3z()+\'<1D><1C id="kw" 5x="5g" 4s=""><N id="3K"><a 1w="#" Z="4q">aC</a><a 1w="#">aV</a><a 1w="#">\'+7.C.18.aM+\'</a></N><1A 1r="7E" id="6k" 2S="1" /><N Z="3a" id="cn"><1t>aC</1t><1A 1r="1e" id="5C" Z="3p" /><1t>\'+7.C.18.1e+\'</1t><1A 1r="1e" Z="3p 6w" id="ck" /><1t><1A 1r="cj" id="5i"> \'+7.C.18.aT+\'</1t></N><N Z="3a" id="aU" 16="2t: 25;"><1t>aV</1t><1A 1r="1e" id="aR" Z="3p" /><1t>\'+7.C.18.1e+\'</1t><1A 1r="1e" Z="3p 6w" id="bl" /></N><N Z="3a" id="aQ" 16="2t: 25;"><1t>\'+7.C.18.aM+\'</1t><1A 1r="1e" Z="3p" id="aL" /><1t>\'+7.C.18.1e+\'</1t><1A 1r="1e" Z="3p 6w" id="bo" /></N></1C></1D><35><2f Z="3f 5r">\'+7.C.18.5j+\'</2f><1A 1r="2f" Z="3f" id="bh" 2S="\'+7.C.18.6l+\'" /></35>\',bg:3z()+"<1D><1t>"+7.C.18.b9+\'</1t><1A 1r="1e" 2n="5" 2S="2" id="aO" /><1t>\'+7.C.18.b7+\'</1t><1A 1r="1e" 2n="5" 2S="3" id="b6" /></1D><35><2f Z="3f 5r">\'+7.C.18.5j+\'</2f><1A 1r="2f" 2q="4M" Z="3f" id="bb" 2S="\'+7.C.18.6l+\'" /></35>\',bd:3z()+\'<1D><1C id="jy"><1t>\'+7.C.18.bc+\'</1t><3W id="ax" 16="2i: 99%; 1I: jj;"></3W></1C></1D><35><2f Z="3f 5r">\'+7.C.18.5j+\'</2f><1A 1r="2f" Z="3f" id="bL" 2S="\'+7.C.18.6l+\'" /></35>\'})},4m:B(m,i,g,n){y f=d("#ab");if(!f.11){7.$bw=f=d(\'<N id="ab" 16="2t: 25;"></N>\');d("1Q").5k(7.$bw)}if(7.C.a7){f.1R().1d("1v",d.K(7.2g,7))}y j=d("#ac");if(!j.11){7.$bA=j=d(\'<N id="ac" 16="2t: 25;"><N id="ad">&iR;</N><68 id="7S"></68><N id="7v"></N></N>\');d("1Q").Y(7.$bA)}d("#ad").1d("1v",d.K(7.2g,7));7.5P=d.K(B(o){if(o.2s===7.2s.af){7.2g();F E}},7);d(Q).3D(7.5P);7.$J.3D(7.5P);7.4p=E;if(i.3r("#")==0){7.4p=d(i);d("#7v").6a().Y(7.4p.V());7.4p.V("")}G{d("#7v").6a().Y(i)}j.T("#7S").V(m);if(1o d.fn.du!=="1k"){j.du({iW:"#7S"});j.T("#7S").U("ae","jb")}y l=d("#3K");if(l.11){y h=7;l.T("a").19(B(o,p){o++;d(p).1d("1v",B(r){r.1X();l.T("a").2k("4q");d(7).28("4q");d(".3a").1T();d("#3a"+o).1R();d("#6k").1f(o);if(h.43()===E){y q=j.dh();j.U("21-1O","-"+(q+10)/2+"2r")}})})}j.T(".5r").1d("1v",d.K(7.2g,7));if(7.C.4a===M){7.as=7.Q.1Q.3v}if(7.43()===E){j.U({2G:"7L",1O:"-aZ",1m:"50%",2i:g+"2r",7U:"-"+(g+60)/2+"2r"}).1R();7.au=d(Q.1Q).U("at");d(Q.1Q).U("at","7E")}G{j.U({2G:"7L",2i:"2x%",1I:"2x%",1O:"0",1m:"0",21:"0",5B:"jU"}).1R()}if(1o n==="B"){n()}if(7.43()===E){2h(B(){y o=j.dh();j.U({1O:"50%",1I:"3J",5B:"3J",7t:"-"+(o+10)/2+"2r"})},10)}},2g:B(){d("#ad").2F("1v",7.2g);d("#ac").5w("kJ",d.K(B(){y f=d("#7v");if(7.4p!==E){7.4p.V(f.V());7.4p=E}f.V("");if(7.C.a7){d("#ab").1T().2F("1v",7.2g)}d(Q).dO("3D",7.5P);7.$J.dO("3D",7.5P);7.1n();if(7.C.4a&&7.as){d(7.Q.1Q).3v(7.as)}},7));if(7.43()===E){d(Q.1Q).U("at",7.au?7.au:"de")}F E},av:B(f){d(".3a").1T();d("#3K").T("a").2k("4q").eq(f-1).28("4q");d("#3a"+f).1R()},cN:B(l){y h=l.1z.6x;2O(y g=0,j;j=h[g];g++){7.cw(j)}},cw:B(f){7.cv(f,d.K(B(g){7.d1(f,g)},7))},cv:B(f,h){y g=1V d8();g.7q("gO",7.C.5T+"?2q="+f.2q+"&1r="+f.1r,M);g.gJ("1e/gC; gA=x-gD-gE");g.gH=B(i){if(7.d3==4&&7.b5==3S){d("#L-1Z").bj();h(gF(7.gR))}G{if(7.d3==4&&7.b5!=3S){}}};g.b8()},cT:B(h,f){y g=1V d8();if("h8"in g){g.7q(h,f,M)}G{if(1o d2!="1k"){g=1V d2();g.7q(h,f)}G{g=2b}}F g},d1:B(g,f){y h=7.cT("g8",f);if(!h){}G{h.d9=d.K(B(){if(h.b5==3S){d("#L-1Z").1T();y l=f.3x("?");if(!l[0]){F E}7.1n();y i="";i=\'<1q id="1c-1y" 2w="\'+l[0]+\'" />\';if(7.C.4I){i="<p>"+i+"</p>"}7.1H("3M",i,E);y j=d(7.$J.T("1q#1c-1y"));if(j.11){j.26("id")}G{j=E}7.12();7.1h("3c",j,E);7.2g();7.3s()}G{}},7);h.i8=B(){};h.4M.i7=B(i){};h.bs("ia-iv",g.1r);h.bs("x-iz-iB","iA-iu");h.b8(g)}},b3:B(h,f){7.2z={32:E,36:E,39:E,4X:E,b1:E,3J:E,1A:E};d.3P(7.2z,f);y g=d("#"+h);if(g.11&&g[0].X==="ik"){7.2z.1A=g;7.el=d(g[0].1C)}G{7.el=g}7.cI=7.el.15("4s");if(7.2z.3J){d(7.2z.1A).7A(d.K(B(i){7.el.b2(B(j){F E});7.aY(i)},7))}G{if(7.2z.b1){d("#"+7.2z.b1).1v(d.K(7.aY,7))}}},aY:B(f){d("#L-1Z").bj();7.bM(7.44,7.bO())},bO:B(){7.id="f"+3b.cg(3b.cb()*cc);y g=7.Q.3F("N");y f=\'<1p 16="2t:25" id="\'+7.id+\'" 2q="\'+7.id+\'"></1p>\';g.4v=f;d(g).7C("1Q");if(7.2z.4X){7.2z.4X()}d("#"+7.id).bn(d.K(7.dg,7));F 7.id},bM:B(j,i){if(7.2z.1A){y l="hU"+7.id,g="hw"+7.id;7.1C=d(\'<1C 4s="\'+7.2z.32+\'" 5x="aK" 1z="\'+i+\'" 2q="\'+l+\'" id="\'+l+\'" 7J="7I/1C-1i" />\');if(7.C.31!==E&&1o 7.C.31==="2R"){d.19(7.C.31,d.K(B(n,f){if(f!=2b&&f.2V().3r("#")===0){f=d(f).1f()}y o=d("<1A/>",{1r:"7E",2q:n,2S:f});d(7.1C).Y(o)},7))}y h=7.2z.1A;y m=d(h).4H();d(h).15("id",g).38(m).7C(7.1C);d(7.1C).U("2G","7D").U("1O","-aZ").U("1m","-aZ").7C("1Q");7.1C.b2()}G{j.15("1z",i).15("5x","aK").15("7J","7I/1C-1i").15("4s",7.2z.32);7.44.b2()}},dg:B(){y j=d("#"+7.id)[0],l;if(j.df){l=j.df}G{if(j.b0){l=j.b0.Q}G{l=2Y.gL[7.id].Q}}if(7.2z.36){d("#L-1Z").1T();if(1o l!=="1k"){y h=l.1Q.4v;y g=h.1J(/\\{(.|\\n)*\\}/)[0];g=g.I(/^\\[/,"");g=g.I(/\\]$/,"");y f=d.6Y(g);if(1o f.39=="1k"){7.2z.36(f)}G{7.2z.39(7,f);7.2g()}}G{7.2g();kg("cH kt!")}}7.el.15("4s",7.cI);7.el.15("1z","")},ak:B(g,f){7.4R=d.3P({32:E,36:E,39:E,l6:E,31:E,1e:7.C.18.dV,cf:7.C.18.dk},f);if(2Y.ay===1k){F E}7.aw=d(\'<N Z="k7"></N>\');7.3C=d(\'<N Z="j2">\'+7.4R.1e+"</N>");7.bE=d(\'<N Z="j7">\'+7.4R.cf+"</N>");7.aw.Y(7.3C);d(g).38(7.aw);d(g).38(7.bE);7.3C.1d("jD",d.K(B(){F 7.ff()},7));7.3C.1d("jA",d.K(B(){F 7.fl()},7));7.3C.1S(0).ji=d.K(B(h){h.1X();7.3C.2k("an").28("5y");7.aN(7.4R.32,h.aP.6x[0],E)},7)},aN:B(h,j,f,g,l){if(!f){y m=d.jN.bQ();if(m.4M){m.4M.kU("1Z",d.K(7.fm,7),E)}d.kl({bQ:B(){F m}})}y i=1V ay();i.Y("2Z",j);if(7.C.31!==E&&1o 7.C.31==="2R"){d.19(7.C.31,d.K(B(o,n){if(n!=2b&&n.2V().3r("#")===0){n=d(n).1f()}i.Y(o,n)},7))}d.c5({32:h,gZ:"V",1i:i,hh:E,aH:E,hT:E,1r:"aK",36:d.K(B(p){p=p.I(/^\\[/,"");p=p.I(/\\]$/,"");y o=d.6Y(p);if(f){g.5w("j5",B(){d(7).1j()});y n=d("<1q>");n.15("2w",o.4J).15("id","a8-1c-1y");7.e5(l,n[0]);y q=d(7.$J.T("1q#a8-1c-1y"));if(q.11){q.26("id")}G{q=E}7.12();7.3s();if(q){7.1h("3c",q,o)}if(1o o.39!=="1k"){7.1h("ar",o)}}G{if(1o o.39=="1k"){7.4R.36(o)}G{7.4R.39(7,o);7.4R.36(E)}}},7)})},ff:B(){7.3C.28("an");F E},fl:B(){7.3C.2k("an");F E},fm:B(g,h){y f=g.eU?6G(g.eU/g.gy*2x,10):g;7.3C.1e("gu "+f+"% "+(h||""))},43:B(){F/(gv|gj|gk|iq)/.3u(8E.8P)},6R:B(f){if(1o(f)==="1k"){F 0}F 6G(f.I("2r",""),10)},5u:B(f){F d("<N>").Y(d(f).eq(0).4H()).V()},f1:B(f){F hQ.4l.2V.3y(f)=="[2R 3z]"},8p:B(f){f=f.I(/&#6S;|<br>|<br\\/>|&2j;/gi,"");f=f.I(/\\s/g,"");f=f.I(/^<p>[^\\W\\w\\D\\d]*?<\\/p>$/i,"");F f==""},1G:B(g){y h=8E.8P.2X();y f=/(8L)[ \\/]([\\w.]+)/.1P(h)||/(3G)[ \\/]([\\w.]+)/.1P(h)||/(6H)(?:.*6M|)[ \\/]([\\w.]+)/.1P(h)||/(3j) ([\\w.]+)/.1P(h)||h.3r("g4")<0&&/(3o)(?:.*? gU:([\\w.]+)|)/.1P(h)||[];if(g=="6M"){F f[2]}if(g=="3G"){F(f[1]=="8L"||f[1]=="3G")}F f[1]==g},7Z:B(){if(7.1G("3j")&&6G(7.1G("6M"),10)<9){F M}F E},fk:B(g){y f=g.k0(M);y h=7.Q.3F("N");h.5v(f);F h.4v},8a:B(){y f=7.$J[0];y h=7.Q.ek();y g;2D((g=f.8V)){h.5v(g)}F h},7d:B(f){if(!f){F E}if(7.C.1p){F f}if(d(f).9I("N.34").11==0||d(f).3i("34")){F E}G{F f}},5M:B(f){y g=7.3w(),h=7.2B();F g&&g.X===f?g:h&&h.X===f?h:E},e7:B(){y g=7.1Y();y i=7.eF(g);y h=d.2o(d(g).1e()).I(/\\n\\r\\n/g,"");y f=h.11;if(i==f){F M}G{F E}},7b:B(){y f,g=7.1L();if(g&&g.4g&&g.4g>0){f=g.2U(0).4E}if(!f){F E}if(7.C.1p){if(7.eH().eL()){F!7.$J.is(f)}G{F M}}F d(f).2A("N.34").11!=0},3Q:B(g,f){if(d(g).15(f)==""){d(g).26(f)}},eJ:B(h,g){y f=2b;2D((f=h.3r(g))!==-1){h.6E(f,1)}F h}};c.4l.5t.4l=c.4l;d.3V.fn.9H=B(x,u,m,r){y s=/(^|&6d;|\\s)(9F\\..+?\\..+?)(\\s|&gt;|$)/g,q=/(^|&6d;|\\s)(((71?|a1):\\/\\/|5S:).+?)(\\s|&gt;|$)/g,f=/(71?:\\/\\/.*\\.(?:fP|hW|fK|eg))/gi,w=/^.*(hR.be\\/|v\\/|u\\/\\w\\/|3m\\/|gs\\?v=|\\&v=)([^#\\&\\?]*).*/,t=/7k:\\/\\/(9F\\.)?bJ.8v\\/(\\d+)($|\\/)/;y v=(7.$J?7.$J.1S(0):7).8Y,l=v.11;2D(l--){y j=v[l];if(j.3n===3){y p=j.5U;if(r&&p){y o=\'<1p 2i="bV" 1I="kY" 2w="\',h=\'" cm="0" l2></1p>\';if(p.1J(w)){p=p.I(w,o+"//9F.iI.8v/3m/$2"+h);d(j).1W(p).1j()}G{if(p.1J(t)){p=p.I(t,o+"//jm.bJ.8v/2J/$2"+h);d(j).1W(p).1j()}}}if(m&&p&&p.1J(f)){p=p.I(f,\'<1q 2w="$1">\');d(j).1W(p).1j()}if(u&&p&&(p.1J(s)||p.1J(q))){y g=(p.1J(s)||p.1J(q));g=g[0];if(g.11>50){g=g.7T(0,50)+"..."}p=p.I(/&/g,"&7Q;").I(/</g,"&6d;").I(/>/g,"&gt;").I(s,\'$1<a 1w="\'+x+\'$2">\'+g+"</a>$3").I(q,\'$1<a 1w="$2">\'+g+"</a>$5");d(j).1W(p).1j()}}G{if(j.3n===1&&!/^(a|2f|3W)$/i.3u(j.X)){d.3V.fn.9H.3y(j,x,u,m,r)}}}}})(kd);',62,1311,'|||||||this|||||||||||||||||||||||||||var|||function|opts||false|return|else||replace|editor|proxy|redactor|true|div|span||document|title||find|css|html||tagName|append|class||length|sync|||attr|style||curLang|each|toolbar|func|image|on|text|val|source|callback|data|remove|undefined|table|left|selectionRestore|typeof|iframe|img|type|focus|label|li|click|href|bufferSet|marker|target|input|linebreaks|form|section|td|selectionSave|browser|execCommand|height|match|contents|getSelection|box|parent|top|exec|body|show|get|hide|replaceWith|new|after|preventDefault|getBlock|progress||margin|invisibleSpace|push||none|removeAttr||addClass||air|null|selection|ul|frame|button|modalClose|setTimeout|width|nbsp|removeClass|pre|link|size|trim|script|name|px|keyCode|display|blockquote|buttonGet|src|100|ol|uploadOptions|closest|getCurrent|getRange|while|getBlocks|off|position|LI|RegExp|video|verified|rangy|offset|dropdown|for|tr|thead|object|value|insertNode|getRangeAt|toString|fullpage|toLowerCase|window|file|contenteditable|uploadFields|url|rel|redactor_editor|footer|success||before|error|redactor_tab|Math|imageUpload|italic|buttons|redactor_modal_btn|className|bold|hasClass|msie|php|current_tr|embed|nodeType|mozilla|redactor_input|substr|indexOf|observeImages|option|test|scrollTop|getParent|split|call|String|selectionStart|font|dropareabox|keyup|right|createElement|webkit|content|placeholder|auto|redactor_tabs|tag|inserthtml|formatBlocks|strong|extend|removeEmptyAttr|inArray|200|shiftKey|shortcutsLoad|Redactor|textarea|redactor_file|toolbarFixed|alignmentTags||emptyHtml|charAt|isMobile|element|search||shortcutsLoadFormat|||autoresize|parentNode|deleted|buffer|savedSel|visual|rangeCount|inlineMethods|buttonActive|audio|keydown|prototype|modalInit|direction|redactor_placeholder|modalcontent|redactor_tabs_act|dir|action|indent|removeAllRanges|innerHTML|collapsed|unorderedlist|tbody|unlink|Insert|range|PRE|BLOCKQUOTE|startContainer|selectall|orderedlist|clone|paragraphy|filelink|formatting|redactor_file_link|upload|imageEditter|float|round|_blank|draguploadOptions|textareamode|join|underline|isFunction|imageResizeHide|start|getNodes|not||||||code|allowedTags|createRange|cleanGetTabs|formatBlock|param|justify|observeStart|observeLinks|insert_link_node|redactorfolder|post|autosave|redactor_link_blank|cancel|prepend|bar|select|outdent|buttonBuild|redactor_act|dropact|redactor_btn_modal_close|addRange|init|outerHtml|appendChild|fadeOut|method|drop|rebuffer|cleanlevel|minHeight|redactor_link_url|deniedTags|tabindex|phpTags|selectionEnd|modified|linkObserverTooltipClose|color|fontSize|resize|currentOrParentIs|line|Header|hdlModalClose|tagblock|shortcuts|mailto|s3|nodeValue|alignmentSet|Add|buttonSeparator|Delete|enter||cleanRemoveSpaces|buttonActiveObserver|endContainer|getElement|||imageGetJson|header|imageFloatMargin|empty|next|cleanStripTags|lt|selectionSet|linkProtocol|insertunorderedlist|break|nodeTestBlocks|fileUpload|redactor_tab_selected|insert|horizontalrule|alignright|background|activeButtonsAdd|placeTag|activeButtons|insertorderedlist|TD|head|indentValue|redactor_link_text|files|cleanConvertInlineTags|del|alignleft|strike|template|aligncenter|splice|mouseup|parseInt|opera|which|BACKSPACE|selectionSetMarker|collapse|version|prev|children|insertHtmlAdvanced|folder|normalize|x200b|first|checked|prop|setEnd|setStart|parseJSON|insertAfterLastElement|cleanParagraphy|https|||||||imageInsert|align|7px|isFocused|pasteInsert|isParentRedactor|11px|selectNodeContents|insertHtml|clipboardUpload|saveScroll|paste|http|javascript|ENTER|redactor_btn_|createTextNode|DIV|open|buildCodearea|insertAfter|marginTop|toolbarFixedBox|redactor_modal_inner|autosaveInterval|set|ARTICLE|ASIDE|change|alignment|appendTo|absolute|hidden|ADDRESS|SECTION|FOOTER|multipart|enctype|HEADER|fixed|convertImageLinks|dropdownHideAll|one|separator|amp|airBindMousemoveHide|redactor_modal_header|substring|marginLeft|selectionRemoveMarkers|buttonInactive|align_justify|rTestBlock|oldIE|textContent|tagTestBlock|align_left|selnodes|try|align_center|catch|align_right|cloneRange|tooltip|extractContent|dnbImageTypes|clipboardData|rBlockTest|DOWN|iframeDoc|sourceHeight|getTextNodesIn|redactor_btn|case|buildEnable|selectionElement|activeButtonsStates|getRangeSelectedNodes|insert_row_below|isEmpty|insert_row_above|insert_column_left|current_td|tableAddRow|tableAddColumn|com|linkShow|contOwnLine|z0|ownLine|linkAnchor|insert_table|redactor_button_disabled|linkEmail|navigator|tableDeleteHead|fontcolor|tableObserver|delete_table|BODY|syncClean|chrome|backcolor|link_insert|delete_row|userAgent|insert_column_right|add_head|delete_head|redactor_btn_right|delete_column|firstChild|FIGCAPTION|cleanTag|childNodes|setFullpageOnInit|||cleanFinish|insideOutdent|filter|buildBindKeyboard|toggle|focusSet|alignmentJustify||altKey|buildAfter|alignmentCenter|alignmentRight|cleannewLevel|alignmentLeft|Table|uuid|merge|toolbarObserveScroll|meta|toolbarFixedTarget|Column|cleanConvertProtected|cleanConverters|cleanEmpty|th|cleanSavePreCode|airShow|toolbarExternal|Row|boldTag|italicTag|buildOptions|tfoot|convertLinks|indentingStart|buildEventKeydownInsertLineBreak|cleanEncodeEntities|convertVideoLinks|convertDivs|www|pasteClipboardMozilla|formatLinkify|parents|templateVars|ctrlKey|clipboardUploadUrl|tabSpaces|indentingOutdent|plugins|RedactorPlugins|inlineRemoveFormatReplace|cleanRemoveEmptyTags|iframeLoad|SPAN|inlineEachNodes|iframeAddCss|blockLevelElements|iframePage|redactor_air|sourceOld|insertLineBreak|ftp|iframeAppend|address|parseHTML|indentingIndent|pasteHTML|modalOverlay|drag|10px|padding|redactor_modal_overlay|redactor_modal|redactor_modal_close|cursor|ESC|lineHeight|zIndex|resizer|editter|draguploadInit|delete|DELETE|hover|pageY|pageX|imageRemove|imageUploadError|saveModalScroll|overflow|modalSaveBodyOveflow|modalSetTab|droparea|redactor_insert_video_area|FormData|striped|redactor_image_box|filename|URL|choose|save|redactor_file_alt|redactor_form_image_align|contentType|redactor_filename|imageCallback|POST|redactor_link_anchor|anchor|dragUploadAjax|redactor_table_rows|dataTransfer|redactor_tab3|redactor_link_mailto|alt|link_new_tab|redactor_tab2|Email|mousedown|edit|uploadSubmit|2000px|contentWindow|trigger|submit|uploadInit|fileCallback|status|redactor_table_columns|columns|send|rows|inserthorizontalrule|redactor_insert_table_btn|video_html_code|modal_video||formattingPre|modal_table|redactor_insert_link_btn|center|fadeIn|cleanReConvertProtected|redactor_link_mailto_text|fileShow|load|redactor_link_anchor_text|Edit|image_position||setRequestHeader|setEditor|buttonActiveVisual|buttonInactiveVisual|overlay|redactor_btn_html|dropdownBuild|redactor_dropdown_box_|modal|dropdownShow|redactor_dropdown|setCodeIframe|dropalternative|buttonActiveToggle|link_edit|redactor_dropdown_link|buttonInactiveAll|vimeo|List|redactor_insert_video_btn|uploadForm|double|uploadFrame|header1|xhr|transparent|quote|header2|image_web_link|500|quot|cleanUnverified|langs|cleanHtml|redactorSaveBtn|_delete|cleanlineAfter|cleanlineBefore|lang|ajax|paragraph|modal_image|redactor_upload_btn|modal_link|removeEmptyTags|random|99999|Color|buffer_|atext|floor|newLevel|cleanReplacer|checkbox|redactor_link_url_text|header3|frameborder|redactor_tab1|fieldset|header4|map|area|header5|redactor_image_delete_btn|dropdownHide|s3executeOnSignedUrl|s3uploadFile|iframeCreate|write|the|dragUpload|buildPlugins|focusCallback|iframeStart|textareaKeydownCallback|close|clearInterval|Upload|element_action|placeholderFocus|placeholderRemove|Align|initToolbar|s3handleFileSelect|documentElement|to|blur|blurCallback|buildEventKeydown|s3createCORSRequest|LEFT_WIN|metaKey|clipboardFilePaste|items|cleanup|buildEventClipboardUpload|originalEvent|s3uploadToS3|XDomainRequest|readyState|buildEventDrop|8203|buildEventKeyup|Array|XMLHttpRequest|onload|TAB|tabFocus|placeholderRemoveFromCode||visible|contentDocument|uploadLoaded|outerHeight|toolbarFixedTopOffset|buildStart|or_choose||buttonsAdd|buildMobile|formattingTags|mobile|visibility|toolbar_fixed_box|tidyHtml||draggable|buildEventPaste|getCodeIframe|airBindHide|linkNofollow|airEnable|nofollow|innerWidth|buttonsCustom|buttonSource|Left|Head|redactor_editor_wym|wym|Right|Image|Code|Video|Link|buildAddClasses|unbind|formatEmpty|toolbarBuild|buildContent|airButtons|buildFromTextarea|buildFromElement|drop_file_here|indenting|setInterval|returnValue|placeholderStart|bufferUndo|bufferRedo|imageEdit|pop|clipboard|insertNodeToCaretPositionFromPoint|innerText|isEndOfElement|pasteClipboardUploadMozilla|pasteClipboardUpload|observeTables|linkObserver|selectionWrap|formatChangeTag|selectionRemove|endOffset|gif|opacity|H5|18px|createDocumentFragment||||5px|H6||pasteClean|pastePlainText|backgroundColor|internal|replaceLineBreak|000|createTextRange|moveToPoint|8px|last|OUTPUT|fff|DL|DD|getCaretOffset|pastePre|getCaretOffsetRange|1px|removeFromArrayByValue|DT|equals|H4|setCaret|tableAddRowAbove|tableAddRowBelow|tableAddColumnLeft|tableAddColumnRight|tableAddHead|imageSave|loaded|tableDeleteTable|tableDeleteRow|tableDeleteColumn|H1|videoShow|linkProcess|isString|fileUploadError|linkInsert|imageShow|location|videoInsert|isEmptyObject|self|imageResize|tableInsert|u0000|u1C7F|H3|H2|draguploadOndrag|imageResizeControls|apply|selectionCreateMarker|relative|getFragmentHtml|draguploadOndragleave|uploadProgress||getSelectionText|cloneContents|inside|tableShow|nextSibling|nextNode|getSelectedNodes|mousemove|unshift|caretRangeFromPoint|0px|HTML|modalTemplatesInit|modal_file|imageCallbackLink|aside|focusEnd|article|unwrap|inlineUnwrapSpan|formatQuote|formatblock|jpeg|modal_image_edit|inlineSetMethods|BR|deleteContents|png|caretPositionFromPoint|setStartAfter|clientY|clientX|imageThumbClick|Quote|inlineRemoveClass|blockSetClass|blockRemoveClass|dragstart|Chrome|300|536|getAsFile|compatible|FileReader|readAsDataURL|inlineSetStyle|PUT|inlineSetClass|getSelectionHtml|inlineRemoveStyle|blockSetStyle|enableInlineTableEditing|EndToEnd|blockRemoveAttr|cellIndex|imageDelete||iPod|BlackBerry|redactor_box|TEXTAREA|blockSetAttr|redactor_|blockRemoveStyle|enableObjectResizing|hasChildNodes|watch||Loading|iPhone|min|VERSION|total|Horizontal|charset|attributes|plain|user|defined|decodeURIComponent|cite|onreadystatechange|Justify|overrideMimeType|small|frames|Bold|removeMarkers|GET|nodeName|redactorUploadFileForm|responseText|charCodeAt|TH|rv|such|commonAncestorContainer|redactorInsertImageForm|undo|dataType|redo|||||||use|withCredentials|strict|isCollapsed|u00a0|3px|9px|inlineSetAttr|13px|inlineRemoveAttr|cache|redactor_format_h4|host|redactor_format_h5|getJSON|redactor_format_h3|redactor_format_h1|460|redactor_format_h2|Open||strikethrough|separator_drop1|JustifyFull|Normal|redactorUploadFile|Rule|Anchor|bull|Deleted|duplicate|redactor_format_pre|META|LEFT|Underline|Alignment|CTRL|redactor_separator|optional|Name|tab|dropdowns|applet|xn|redactor_format_blockquote|Object|youtu|sourceWidth|processData|redactorUploadForm|thumb|jpg|redactor_image_edit_src|about|blank|frameset|getToolbar|getEditor|getBox|getIframe|Formatting|380|onprogress|onerror|sup|Content|JustifyRight|syncBefore||syncAfter||ltr|getObject|removeData|setEndPoint|INPUT|redactor_image_box_select|600||separator_drop3|separator_drop2|Android|JustifyCenter||610|read|Type|Callback|destroy|noscript|amz|public|acl|JustifyLeft|sub|4px|Back|math|Indent|youtube|Cancel|pasteAfter|stopPropagation|u200B|pasteBefore|fake|border|u200D|times|Outdent|colgroup|col|caption|handle|Save|hgroup|Below|focusNode|result|redactor_dropareabox|1005|nav|slow|slice|redactor_dropalternative|redactor_separator_drop|bottom|redactor_dropdown_|move|collapseToStart|legend|Above|nw|replaced|comment|ondrop|160px|arguments|docs|player|concat|guid|UL|sid|switch|Unordered|MsoListParagraphCxSpFirst|OL|MsoListParagraphCxSpLast|Ordered|uFEFF|redactorInsertVideoForm|default|dragleave|buttonRemove|buttonAddSeparatorBefore|dragover|buttonRemoveSeparatorAfter|buttonAddSeparatorAfter|buttonAddSeparator|buttonChangeIcon|buttonRemoveIcon|solid|buttonRemoveSeparatorBefore|buttonSetRight|buttonAddBefore|ajaxSettings|insertText|buttonAddAfter|buttonAddFirst|buttonSetLeft|buttonAdd|Unlink|300px|download|File|outline|Download|Choose|cloneNode|Or|removeFormat|superscript|Embed|Web|No|redactor_droparea|rgba|Text|subscript|dashed|web|jQuery|Drop|isArray|alert|offsetNode|stylesheet|detach|restoreSelection|ajaxSetup|removeChild|ownerDocument|defaultView|block|here|inlineFormat|saveSelection|failed|inline|Center|redactorInsertLinkForm|inlineRemoveFormat|hasOwnProperty|unselectable|ns|setEndAfter|Font|Rows|Italic|1000|pointer|summary|menu|fast|details|redactor_air_|redactor_toolbar_|redactor_toolbar|scroll|None|encodeURIComponent|selectionAll|string|startOffset|addEventListener|figure|Position|Title|281|innerHeight|extractContents|weight|allowfullscreen|escape|Columns|insertDoubleLineBreak|preview|toUpperCase|figcaption'.split('|'),0,{}))
12
+ (function(c){var a=0;"use strict";var d=function(e){this[0]=e.startOffset;this[1]=e.endOffset;this.range=e;return this;};d.prototype.equals=function(){return this[0]===this[1];};c.fn.redactor=function(f){var g=[];var e=Array.prototype.slice.call(arguments,1);if(typeof f==="string"){this.each(function(){var j=c.data(this,"redactor");if(typeof j!=="undefined"&&c.isFunction(j[f])){var h=j[f].apply(j,e);if(h!==undefined&&h!==j){g.push(h);}}else{return c.error('No such method "'+f+'" for Redactor');}});}else{this.each(function(){if(!c.data(this,"redactor")){c.data(this,"redactor",b(this,f));}});}if(g.length===0){return this;}else{if(g.length===1){return g[0];}else{return g;}}};function b(f,e){return new b.prototype.init(f,e);}c.Redactor=b;c.Redactor.VERSION="9.1.9";c.Redactor.opts={rangy:false,iframe:false,fullpage:false,css:false,lang:"en",direction:"ltr",placeholder:false,wym:false,mobile:true,cleanup:true,tidyHtml:true,pastePlainText:false,removeEmptyTags:true,templateVars:false,xhtml:false,visual:true,focus:false,tabindex:false,autoresize:true,minHeight:false,maxHeight:false,shortcuts:true,autosave:false,autosaveInterval:60,plugins:false,linkAnchor:true,linkEmail:true,linkProtocol:"http://",linkNofollow:false,linkSize:50,imageFloatMargin:"10px",imageGetJson:false,imageUpload:false,imageUploadParam:"file",fileUpload:false,fileUploadParam:"file",clipboardUpload:true,clipboardUploadUrl:false,dragUpload:true,dnbImageTypes:["image/png","image/jpeg","image/gif"],s3:false,uploadFields:false,observeImages:true,observeLinks:true,modalOverlay:true,tabSpaces:false,tabFocus:true,air:false,airButtons:["formatting","|","bold","italic","deleted","|","unorderedlist","orderedlist","outdent","indent"],toolbar:true,toolbarFixed:false,toolbarFixedTarget:document,toolbarFixedTopOffset:0,toolbarFixedBox:false,toolbarExternal:false,buttonSource:true,buttonSeparator:'<li class="redactor_separator"></li>',buttonsCustom:{},buttonsAdd:[],buttons:["html","|","formatting","|","bold","italic","deleted","|","unorderedlist","orderedlist","outdent","indent","|","image","video","file","table","link","|","alignment","|","horizontalrule"],activeButtons:["deleted","italic","bold","underline","unorderedlist","orderedlist","alignleft","aligncenter","alignright","justify","table"],activeButtonsStates:{b:"bold",strong:"bold",i:"italic",em:"italic",del:"deleted",strike:"deleted",ul:"unorderedlist",ol:"orderedlist",u:"underline",tr:"table",td:"table",table:"table"},activeButtonsAdd:false,formattingTags:["p","blockquote","pre","h1","h2","h3","h4","h5","h6"],linebreaks:false,paragraphy:true,convertDivs:true,convertLinks:true,convertImageLinks:false,convertVideoLinks:false,formattingPre:false,phpTags:false,allowedTags:false,deniedTags:["html","head","link","body","meta","script","style","applet"],boldTag:"strong",italicTag:"em",indentValue:20,buffer:[],rebuffer:[],textareamode:false,emptyHtml:"<p>&#x200b;</p>",invisibleSpace:"&#x200b;",rBlockTest:/^(P|H[1-6]|LI|ADDRESS|SECTION|HEADER|FOOTER|ASIDE|ARTICLE)$/i,alignmentTags:["P","H1","H2","H3","H4","H5","H6","DD","DL","DT","DIV","TD","BLOCKQUOTE","OUTPUT","FIGCAPTION","ADDRESS","SECTION","HEADER","FOOTER","ASIDE","ARTICLE"],ownLine:["area","body","head","hr","i?frame","link","meta","noscript","style","script","table","tbody","thead","tfoot"],contOwnLine:["li","dt","dt","h[1-6]","option","script"],newLevel:["blockquote","div","dl","fieldset","form","frameset","map","ol","p","pre","select","td","th","tr","ul"],blockLevelElements:["P","H1","H2","H3","H4","H5","H6","DD","DL","DT","DIV","LI","BLOCKQUOTE","OUTPUT","FIGCAPTION","PRE","ADDRESS","SECTION","HEADER","FOOTER","ASIDE","ARTICLE","TD"],langs:{en:{html:"HTML",video:"Insert Video",image:"Insert Image",table:"Table",link:"Link",link_insert:"Insert link",link_edit:"Edit link",unlink:"Unlink",formatting:"Formatting",paragraph:"Normal text",quote:"Quote",code:"Code",header1:"Header 1",header2:"Header 2",header3:"Header 3",header4:"Header 4",header5:"Header 5",bold:"Bold",italic:"Italic",fontcolor:"Font Color",backcolor:"Back Color",unorderedlist:"Unordered List",orderedlist:"Ordered List",outdent:"Outdent",indent:"Indent",cancel:"Cancel",insert:"Insert",save:"Save",_delete:"Delete",insert_table:"Insert Table",insert_row_above:"Add Row Above",insert_row_below:"Add Row Below",insert_column_left:"Add Column Left",insert_column_right:"Add Column Right",delete_column:"Delete Column",delete_row:"Delete Row",delete_table:"Delete Table",rows:"Rows",columns:"Columns",add_head:"Add Head",delete_head:"Delete Head",title:"Title",image_position:"Position",none:"None",left:"Left",right:"Right",image_web_link:"Image Web Link",text:"Text",mailto:"Email",web:"URL",video_html_code:"Video Embed Code",file:"Insert File",upload:"Upload",download:"Download",choose:"Choose",or_choose:"Or choose",drop_file_here:"Drop file here",align_left:"Align text to the left",align_center:"Center text",align_right:"Align text to the right",align_justify:"Justify text",horizontalrule:"Insert Horizontal Rule",deleted:"Deleted",anchor:"Anchor",link_new_tab:"Open link in new tab",underline:"Underline",alignment:"Alignment",filename:"Name (optional)",edit:"Edit"}}};b.fn=c.Redactor.prototype={keyCode:{BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,ESC:27,TAB:9,CTRL:17,META:91,LEFT:37,LEFT_WIN:91},init:function(f,e){this.rtePaste=false;this.$element=this.$source=c(f);this.uuid=a++;var g=c.extend(true,{},c.Redactor.opts);this.opts=c.extend({},g,this.$element.data(),e);this.start=true;this.dropdowns=[];this.sourceHeight=this.$source.css("height");this.sourceWidth=this.$source.css("width");if(this.opts.fullpage){this.opts.iframe=true;}if(this.opts.linebreaks){this.opts.paragraphy=false;}if(this.opts.paragraphy){this.opts.linebreaks=false;}if(this.opts.toolbarFixedBox){this.opts.toolbarFixed=true;}this.document=document;this.window=window;this.savedSel=false;this.cleanlineBefore=new RegExp("^<(/?"+this.opts.ownLine.join("|/?")+"|"+this.opts.contOwnLine.join("|")+")[ >]");this.cleanlineAfter=new RegExp("^<(br|/?"+this.opts.ownLine.join("|/?")+"|/"+this.opts.contOwnLine.join("|/")+")[ >]");this.cleannewLevel=new RegExp("^</?("+this.opts.newLevel.join("|")+")[ >]");this.rTestBlock=new RegExp("^("+this.opts.blockLevelElements.join("|")+")$","i");if(this.opts.linebreaks===false){if(this.opts.allowedTags!==false){var h=["strong","em","del"];var j=["b","i","strike"];if(c.inArray("p",this.opts.allowedTags)==="-1"){this.opts.allowedTags.push("p");}for(i in h){if(c.inArray(h[i],this.opts.allowedTags)!="-1"){this.opts.allowedTags.push(j[i]);}}}if(this.opts.deniedTags!==false){var l=c.inArray("p",this.opts.deniedTags);if(l!=="-1"){this.opts.deniedTags.splice(l,l);}}}if(this.browser("msie")||this.browser("opera")){this.opts.buttons=this.removeFromArrayByValue(this.opts.buttons,"horizontalrule");}this.opts.curLang=this.opts.langs[this.opts.lang];this.buildStart();},toolbarInit:function(e){return{html:{title:e.html,func:"toggle"},formatting:{title:e.formatting,func:"show",dropdown:{p:{title:e.paragraph,func:"formatBlocks"},blockquote:{title:e.quote,func:"formatQuote",className:"redactor_format_blockquote"},pre:{title:e.code,func:"formatBlocks",className:"redactor_format_pre"},h1:{title:e.header1,func:"formatBlocks",className:"redactor_format_h1"},h2:{title:e.header2,func:"formatBlocks",className:"redactor_format_h2"},h3:{title:e.header3,func:"formatBlocks",className:"redactor_format_h3"},h4:{title:e.header4,func:"formatBlocks",className:"redactor_format_h4"},h5:{title:e.header5,func:"formatBlocks",className:"redactor_format_h5"}}},bold:{title:e.bold,exec:"bold"},italic:{title:e.italic,exec:"italic"},deleted:{title:e.deleted,exec:"strikethrough"},underline:{title:e.underline,exec:"underline"},unorderedlist:{title:"&bull; "+e.unorderedlist,exec:"insertunorderedlist"},orderedlist:{title:"1. "+e.orderedlist,exec:"insertorderedlist"},outdent:{title:"< "+e.outdent,func:"indentingOutdent"},indent:{title:"> "+e.indent,func:"indentingIndent"},image:{title:e.image,func:"imageShow"},video:{title:e.video,func:"videoShow"},file:{title:e.file,func:"fileShow"},table:{title:e.table,func:"show",dropdown:{insert_table:{title:e.insert_table,func:"tableShow"},separator_drop1:{name:"separator"},insert_row_above:{title:e.insert_row_above,func:"tableAddRowAbove"},insert_row_below:{title:e.insert_row_below,func:"tableAddRowBelow"},insert_column_left:{title:e.insert_column_left,func:"tableAddColumnLeft"},insert_column_right:{title:e.insert_column_right,func:"tableAddColumnRight"},separator_drop2:{name:"separator"},add_head:{title:e.add_head,func:"tableAddHead"},delete_head:{title:e.delete_head,func:"tableDeleteHead"},separator_drop3:{name:"separator"},delete_column:{title:e.delete_column,func:"tableDeleteColumn"},delete_row:{title:e.delete_row,func:"tableDeleteRow"},delete_table:{title:e.delete_table,func:"tableDeleteTable"}}},link:{title:e.link,func:"show",dropdown:{link:{title:e.link_insert,func:"linkShow"},unlink:{title:e.unlink,exec:"unlink"}}},fontcolor:{title:e.fontcolor,func:"show"},backcolor:{title:e.backcolor,func:"show"},alignment:{title:e.alignment,func:"show",dropdown:{alignleft:{title:e.align_left,func:"alignmentLeft"},aligncenter:{title:e.align_center,func:"alignmentCenter"},alignright:{title:e.align_right,func:"alignmentRight"},justify:{title:e.align_justify,func:"alignmentJustify"}}},alignleft:{title:e.align_left,func:"alignmentLeft"},aligncenter:{title:e.align_center,func:"alignmentCenter"},alignright:{title:e.align_right,func:"alignmentRight"},justify:{title:e.align_justify,func:"alignmentJustify"},horizontalrule:{exec:"inserthorizontalrule",title:e.horizontalrule}};},callback:function(e,f,g){var h=this.opts[e+"Callback"];if(c.isFunction(h)){if(f===false){return h.call(this,g);}else{return h.call(this,f,g);}}else{return g;}},destroy:function(){clearInterval(this.autosaveInterval);c(window).off(".redactor");this.$source.off("redactor-textarea");this.$element.off(".redactor").removeData("redactor");var f=this.get();if(this.opts.textareamode){this.$box.after(this.$source);this.$box.remove();this.$source.val(f).show();}else{var e=this.$editor;if(this.opts.iframe){e=this.$element;}this.$box.after(e);this.$box.remove();e.removeClass("redactor_editor").removeClass("redactor_editor_wym").removeAttr("contenteditable").html(f).show();}if(this.opts.air){c("#redactor_air_"+this.uuid).remove();}},getObject:function(){return c.extend({},this);},getEditor:function(){return this.$editor;},getBox:function(){return this.$box;},getIframe:function(){return(this.opts.iframe)?this.$frame:false;},getToolbar:function(){return(this.$toolbar)?this.$toolbar:false;},get:function(){return this.$source.val();},getCodeIframe:function(){this.$editor.removeAttr("contenteditable").removeAttr("dir");var e=this.outerHtml(this.$frame.contents().children());this.$editor.attr({contenteditable:true,dir:this.opts.direction});return e;},set:function(e,f,g){e=e.toString();e=e.replace(/\$/g,"&#36;");if(this.opts.fullpage){this.setCodeIframe(e);}else{this.setEditor(e,f);}if(e==""){g=false;}if(g!==false){this.placeholderRemove();}},setEditor:function(e,f){if(f!==false){e=this.cleanSavePreCode(e);e=this.cleanStripTags(e);e=this.cleanConvertProtected(e);e=this.cleanConvertInlineTags(e,true);if(this.opts.linebreaks===false){e=this.cleanConverters(e);}else{e=e.replace(/<p(.*?)>([\w\W]*?)<\/p>/gi,"$2<br>");}}e=e.replace(/&amp;#36;/g,"$");e=this.cleanEmpty(e);this.$editor.html(e);this.setNonEditable();this.setSpansVerified();this.sync();},setCodeIframe:function(e){var f=this.iframePage();this.$frame[0].src="about:blank";e=this.cleanConvertProtected(e);e=this.cleanConvertInlineTags(e);e=this.cleanRemoveSpaces(e);f.open();f.write(e);f.close();if(this.opts.fullpage){this.$editor=this.$frame.contents().find("body").attr({contenteditable:true,dir:this.opts.direction});}this.setNonEditable();this.setSpansVerified();this.sync();},setFullpageOnInit:function(e){e=this.cleanSavePreCode(e,true);e=this.cleanConverters(e);e=this.cleanEmpty(e);this.$editor.html(e);this.setNonEditable();this.setSpansVerified();this.sync();},setSpansVerified:function(){var f=this.$editor.find("span");var e="inline";c.each(f,function(){var g=this.outerHTML;var j=new RegExp("<"+this.tagName,"gi");var h=g.replace(j,"<"+e);j=new RegExp("</"+this.tagName,"gi");h=h.replace(j,"</"+e);c(this).replaceWith(h);});},setSpansVerifiedHtml:function(e){e=e.replace(/<span(.*?)>/,"<inline$1>");return e.replace(/<\/span>/,"</inline>");},setNonEditable:function(){this.$editor.find(".noneditable").attr("contenteditable",false);},sync:function(){var e="";this.cleanUnverified();if(this.opts.fullpage){e=this.getCodeIframe();}else{e=this.$editor.html();}e=this.syncClean(e);e=this.cleanRemoveEmptyTags(e);e=e.replace(/<\/li><(ul|ol)>([\w\W]*?)<\/(ul|ol)>/gi,"<$1>$2</$1></li>");if(c.trim(e)==="<br>"){e="";}if(this.opts.xhtml){var f=["br","hr","img","link","input","meta"];c.each(f,function(g,h){e=e.replace(new RegExp("<"+h+"(.*?[^/$]?)>","gi"),"<"+h+"$1 />");});}e=this.callback("syncBefore",false,e);this.$source.val(e);this.callback("syncAfter",false,e);if(this.start===false){this.callback("change",false,e);}},syncClean:function(e){if(!this.opts.fullpage){e=this.cleanStripTags(e);}e=c.trim(e);e=this.placeholderRemoveFromCode(e);e=e.replace(/&#x200b;/gi,"");e=e.replace(/&#8203;/gi,"");e=e.replace(/<\/a>&nbsp;/gi,"</a> ");if(this.opts.linkNofollow){e=e.replace(/<a(.*?)rel="nofollow"(.*?)>/gi,"<a$1$2>");e=e.replace(/<a(.*?)>/gi,'<a$1 rel="nofollow">');}e=e.replace("<!--?php","<?php");e=e.replace("?-->","?>");e=e.replace(/<(.*?)class="noeditable"(.*?) contenteditable="false"(.*?)>/gi,'<$1class="noeditable"$2$3>');e=e.replace(/ data-tagblock=""/gi,"");e=e.replace(/<br\s?\/?>\n?<\/(P|H[1-6]|LI|ADDRESS|SECTION|HEADER|FOOTER|ASIDE|ARTICLE)>/gi,"</$1>");e=e.replace(/<span(.*?)id="redactor-image-box"(.*?)>([\w\W]*?)<img(.*?)><\/span>/i,"$3<img$4>");e=e.replace(/<span(.*?)id="redactor-image-resizer"(.*?)>(.*?)<\/span>/i,"");e=e.replace(/<span(.*?)id="redactor-image-editter"(.*?)>(.*?)<\/span>/i,"");e=e.replace(/<font(.*?)>([\w\W]*?)<\/font>/gi,"$2");e=e.replace(/<span(.*?)>([\w\W]*?)<\/span>/gi,"$2");e=e.replace(/<inline>/gi,"<span>");e=e.replace(/<inline /gi,"<span ");e=e.replace(/<\/inline>/gi,"</span>");e=e.replace(/<span(.*?)class="redactor_placeholder"(.*?)>([\w\W]*?)<\/span>/gi,"");e=e.replace(/<span>([\w\W]*?)<\/span>/gi,"$1");e=e.replace(/&amp;/gi,"&");e=e.replace(/™/gi,"&trade;");e=e.replace(/©/gi,"&copy;");e=this.cleanReConvertProtected(e);return e;},buildStart:function(){this.content="";this.$box=c('<div class="redactor_box" />');if(this.$source[0].tagName==="TEXTAREA"){this.opts.textareamode=true;}if(this.opts.mobile===false&&this.isMobile()){this.buildMobile();}else{this.buildContent();if(this.opts.iframe){this.opts.autoresize=false;this.iframeStart();}else{if(this.opts.textareamode){this.buildFromTextarea();}else{this.buildFromElement();}}if(!this.opts.iframe){this.buildOptions();this.buildAfter();}}},buildMobile:function(){if(!this.opts.textareamode){this.$editor=this.$source;this.$editor.hide();this.$source=this.buildCodearea(this.$editor);this.$source.val(this.content);}this.$box.insertAfter(this.$source).append(this.$source);},buildContent:function(){if(this.opts.textareamode){this.content=c.trim(this.$source.val());}else{this.content=c.trim(this.$source.html());}},buildFromTextarea:function(){this.$editor=c("<div />");this.$box.insertAfter(this.$source).append(this.$editor).append(this.$source);this.buildAddClasses(this.$editor);this.buildEnable();},buildFromElement:function(){this.$editor=this.$source;this.$source=this.buildCodearea(this.$editor);this.$box.insertAfter(this.$editor).append(this.$editor).append(this.$source);this.buildEnable();},buildCodearea:function(e){return c("<textarea />").attr("name",e.attr("id")).css("height",this.sourceHeight);},buildAddClasses:function(e){c.each(this.$source.get(0).className.split(/\s+/),function(f,g){e.addClass("redactor_"+g);});},buildEnable:function(){this.$editor.addClass("redactor_editor").attr({contenteditable:true,dir:this.opts.direction});this.$source.attr("dir",this.opts.direction).hide();this.set(this.content,true,false);},buildOptions:function(){var e=this.$editor;if(this.opts.iframe){e=this.$frame;}if(this.opts.tabindex){e.attr("tabindex",this.opts.tabindex);}if(this.opts.minHeight){e.css("min-height",this.opts.minHeight+"px");}if(this.opts.maxHeight){this.opts.autoresize=false;this.sourceHeight=this.opts.maxHeight;}if(this.opts.wym){this.$editor.addClass("redactor_editor_wym");}if(!this.opts.autoresize){e.css("height",this.sourceHeight);}},buildAfter:function(){this.start=false;if(this.opts.toolbar){this.opts.toolbar=this.toolbarInit(this.opts.curLang);this.toolbarBuild();}this.modalTemplatesInit();this.buildPlugins();this.buildBindKeyboard();if(this.opts.autosave){this.autosave();}setTimeout(c.proxy(this.observeStart,this),4);if(this.browser("mozilla")){try{this.document.execCommand("enableObjectResizing",false,false);this.document.execCommand("enableInlineTableEditing",false,false);}catch(f){}}if(this.opts.focus){setTimeout(c.proxy(this.focus,this),100);}if(!this.opts.visual){setTimeout(c.proxy(function(){this.opts.visual=true;this.toggle(false);},this),200);}this.callback("init");},buildBindKeyboard:function(){this.dblEnter=0;if(this.opts.dragUpload&&this.opts.imageUpload!==false){this.$editor.on("drop.redactor",c.proxy(this.buildEventDrop,this));}this.$editor.on("paste.redactor",c.proxy(this.buildEventPaste,this));this.$editor.on("keydown.redactor",c.proxy(this.buildEventKeydown,this));this.$editor.on("keyup.redactor",c.proxy(this.buildEventKeyup,this));if(c.isFunction(this.opts.textareaKeydownCallback)){this.$source.on("keydown.redactor-textarea",c.proxy(this.opts.textareaKeydownCallback,this));}if(c.isFunction(this.opts.focusCallback)){this.$editor.on("focus.redactor",c.proxy(this.opts.focusCallback,this));}var e;c(document).mousedown(function(f){e=c(f.target);});this.$editor.on("blur.redactor",c.proxy(function(f){if(!c(e).hasClass("redactor_toolbar")&&c(e).parents(".redactor_toolbar").size()==0){this.selectall=false;if(c.isFunction(this.opts.blurCallback)){this.callback("blur",f);}}},this));},buildEventDrop:function(j){j=j.originalEvent||j;if(window.FormData===undefined||!j.dataTransfer){return true;}var h=j.dataTransfer.files.length;if(h==0){return true;}j.preventDefault();var g=j.dataTransfer.files[0];if(this.opts.dnbImageTypes!==false&&this.opts.dnbImageTypes.indexOf(g.type)==-1){return true;}this.bufferSet();var f=c('<div id="redactor-progress-drag" class="redactor-progress redactor-progress-striped"><div id="redactor-progress-bar" class="redactor-progress-bar" style="width: 100%;"></div></div>');c(document.body).append(f);if(this.opts.s3===false){this.dragUploadAjax(this.opts.imageUpload,g,true,f,j,this.opts.imageUploadParam);}else{this.s3uploadFile(g);}},buildEventPaste:function(g){var h=false;if(this.browser("webkit")&&navigator.userAgent.indexOf("Chrome")===-1){var f=this.browser("version").split(".");if(f[0]<536){h=true;}}if(h){return true;}if(this.browser("opera")){return true;}if(this.opts.clipboardUpload&&this.buildEventClipboardUpload(g)){return true;}if(this.opts.cleanup){this.rtePaste=true;this.selectionSave();if(!this.selectall){if(this.opts.autoresize===true&&this.fullscreen!==true){this.$editor.height(this.$editor.height());this.saveScroll=this.document.body.scrollTop;}else{this.saveScroll=this.$editor.scrollTop();}}var j=this.extractContent();setTimeout(c.proxy(function(){var e=this.extractContent();this.$editor.append(j);this.selectionRestore();var l=this.getFragmentHtml(e);this.pasteClean(l);if(this.opts.autoresize===true&&this.fullscreen!==true){this.$editor.css("height","auto");}},this),1);}},buildEventClipboardUpload:function(j){var h=j.originalEvent||j;this.clipboardFilePaste=false;if(typeof(h.clipboardData)==="undefined"){return false;}if(h.clipboardData.items){var g=h.clipboardData.items[0].getAsFile();if(g!==null){this.bufferSet();this.clipboardFilePaste=true;var f=new FileReader();f.onload=c.proxy(this.pasteClipboardUpload,this);f.readAsDataURL(g);return true;}}return false;},buildEventKeydown:function(n){if(this.rtePaste){return false;}var r=n.which;var f=n.ctrlKey||n.metaKey;var p=this.getParent();var o=this.getCurrent();var j=this.getBlock();var h=false;this.callback("keydown",n);this.imageResizeHide(false);if((p&&c(p).get(0).tagName==="PRE")||(o&&c(o).get(0).tagName==="PRE")){h=true;if(r===this.keyCode.DOWN){this.insertAfterLastElement(j);}}if(r===this.keyCode.DOWN){if(p&&c(p)[0].tagName==="BLOCKQUOTE"){this.insertAfterLastElement(p);}if(o&&c(o)[0].tagName==="BLOCKQUOTE"){this.insertAfterLastElement(o);}if(p&&c(p)[0].tagName==="P"&&c(p).parent()[0].tagName=="BLOCKQUOTE"){this.insertAfterLastElement(p,c(p).parent()[0]);}if(o&&c(o)[0].tagName==="P"&&p&&c(p)[0].tagName=="BLOCKQUOTE"){this.insertAfterLastElement(o,p);}}if(f&&!n.shiftKey){this.shortcuts(n,r);}if(f&&r===90&&!n.shiftKey&&!n.altKey){n.preventDefault();if(this.opts.buffer.length){this.bufferUndo();}else{this.document.execCommand("undo",false,false);}return;}else{if(f&&r===90&&n.shiftKey&&!n.altKey){n.preventDefault();if(this.opts.rebuffer.length!=0){this.bufferRedo();}else{this.document.execCommand("redo",false,false);}return;}}if(f&&r===65){this.selectall=true;}else{if(r!=this.keyCode.LEFT_WIN&&!f){this.selectall=false;}}if(r==this.keyCode.ENTER&&!n.shiftKey&&!n.ctrlKey&&!n.metaKey){if(this.browser("msie")&&(p.nodeType==1&&(p.tagName=="TD"||p.tagName=="TH"))){n.preventDefault();this.bufferSet();this.insertNode(document.createElement("br"));this.callback("enter",n);return false;}if(j&&(j.tagName=="BLOCKQUOTE"||c(j).parent()[0].tagName=="BLOCKQUOTE")){if(this.isEndOfElement()){if(this.dblEnter==1){var m;var q;if(j.tagName=="BLOCKQUOTE"){q="br";m=j;}else{q="p";m=c(j).parent()[0];}n.preventDefault();this.insertingAfterLastElement(m);this.dblEnter=0;if(q=="p"){c(j).parent().find("p").last().remove();}else{var l=c.trim(c(j).html());c(j).html(l.replace(/<br\s?\/?>$/i,""));}return;}else{this.dblEnter++;}}else{this.dblEnter++;}}if(h===true){return this.buildEventKeydownPre(n,o);}else{if(!this.opts.linebreaks){if(j&&this.opts.rBlockTest.test(j.tagName)){this.bufferSet();setTimeout(c.proxy(function(){var s=this.getBlock();if(s.tagName==="DIV"&&!c(s).hasClass("redactor_editor")){var e=c("<p>"+this.opts.invisibleSpace+"</p>");c(s).replaceWith(e);this.selectionStart(e);}},this),1);}else{if(j===false){this.bufferSet();var g=c("<p>"+this.opts.invisibleSpace+"</p>");this.insertNode(g[0]);this.selectionStart(g);this.callback("enter",n);return false;}}}if(this.opts.linebreaks){if(j&&this.opts.rBlockTest.test(j.tagName)){this.bufferSet();setTimeout(c.proxy(function(){var e=this.getBlock();if((e.tagName==="DIV"||e.tagName==="P")&&!c(e).hasClass("redactor_editor")){this.replaceLineBreak(e);}},this),1);}else{return this.buildEventKeydownInsertLineBreak(n);}}if(j.tagName=="BLOCKQUOTE"||j.tagName=="FIGCAPTION"){return this.buildEventKeydownInsertLineBreak(n);}}this.callback("enter",n);}else{if(r===this.keyCode.ENTER&&(n.ctrlKey||n.shiftKey)){this.bufferSet();n.preventDefault();this.insertLineBreak();}}if(r===this.keyCode.TAB&&this.opts.shortcuts){return this.buildEventKeydownTab(n,h);}if(r===this.keyCode.BACKSPACE){this.buildEventKeydownBackspace(o);}},buildEventKeydownPre:function(h,g){h.preventDefault();this.bufferSet();var f=c(g).parent().text();this.insertNode(document.createTextNode("\n"));if(f.search(/\s$/)==-1){this.insertNode(document.createTextNode("\n"));}this.sync();this.callback("enter",h);return false;},buildEventKeydownTab:function(g,f){if(!this.opts.tabFocus){return true;}if(this.isEmpty(this.get())&&this.opts.tabSpaces===false){return true;}g.preventDefault();if(f===true&&!g.shiftKey){this.bufferSet();this.insertNode(document.createTextNode("\t"));this.sync();return false;}else{if(this.opts.tabSpaces!==false){this.bufferSet();this.insertNode(document.createTextNode(Array(this.opts.tabSpaces+1).join("\u00a0")));this.sync();return false;}else{if(!g.shiftKey){this.indentingIndent();}else{this.indentingOutdent();}}}return false;},buildEventKeydownBackspace:function(f){if(typeof f.tagName!=="undefined"&&/^(H[1-6])$/i.test(f.tagName)){var e;if(this.opts.linebreaks===false){e=c("<p>"+this.opts.invisibleSpace+"</p>");}else{e=c("<br>"+this.opts.invisibleSpace);}c(f).replaceWith(e);this.selectionStart(e);}if(typeof f.nodeValue!=="undefined"&&f.nodeValue!==null){if(f.remove&&f.nodeType===3&&f.nodeValue.match(/[^/\u200B]/g)==null){f.remove();}}},buildEventKeydownInsertLineBreak:function(f){this.bufferSet();f.preventDefault();this.insertLineBreak();this.callback("enter",f);return;},buildEventKeyup:function(m){if(this.rtePaste){return false;}var f=m.which;var h=this.getParent();var l=this.getCurrent();if(!this.opts.linebreaks&&l.nodeType==3&&(h==false||h.tagName=="BODY")){var j=c("<p>").append(c(l).clone());c(l).replaceWith(j);var g=c(j).next();if(typeof(g[0])!=="undefined"&&g[0].tagName=="BR"){g.remove();}this.selectionEnd(j);}if((this.opts.convertLinks||this.opts.convertImageLinks||this.opts.convertVideoLinks)&&f===this.keyCode.ENTER){this.buildEventKeyupConverters();}if(f===this.keyCode.DELETE||f===this.keyCode.BACKSPACE){return this.formatEmpty(m);}this.callback("keyup",m);this.sync();},buildEventKeyupConverters:function(){this.formatLinkify(this.opts.linkProtocol,this.opts.convertLinks,this.opts.convertImageLinks,this.opts.convertVideoLinks,this.opts.linkSize);setTimeout(c.proxy(function(){if(this.opts.convertImageLinks){this.observeImages();}if(this.opts.observeLinks){this.observeLinks();}},this),5);},buildPlugins:function(){if(!this.opts.plugins){return;}c.each(this.opts.plugins,c.proxy(function(e,f){if(RedactorPlugins[f]){c.extend(this,RedactorPlugins[f]);if(c.isFunction(RedactorPlugins[f].init)){this.init();}}},this));},iframeStart:function(){this.iframeCreate();if(this.opts.textareamode){this.iframeAppend(this.$source);}else{this.$sourceOld=this.$source.hide();this.$source=this.buildCodearea(this.$sourceOld);this.iframeAppend(this.$sourceOld);}},iframeAppend:function(e){this.$source.attr("dir",this.opts.direction).hide();this.$box.insertAfter(e).append(this.$frame).append(this.$source);},iframeCreate:function(){this.$frame=c('<iframe style="width: 100%;" frameborder="0" />').one("load",c.proxy(function(){if(this.opts.fullpage){this.iframePage();if(this.content===""){this.content=this.opts.invisibleSpace;}this.$frame.contents()[0].write(this.content);this.$frame.contents()[0].close();var e=setInterval(c.proxy(function(){if(this.$frame.contents().find("body").html()){clearInterval(e);this.iframeLoad();}},this),0);}else{this.iframeLoad();}},this));},iframeDoc:function(){return this.$frame[0].contentWindow.document;},iframePage:function(){var e=this.iframeDoc();if(e.documentElement){e.removeChild(e.documentElement);}return e;},iframeAddCss:function(e){e=e||this.opts.css;if(this.isString(e)){this.$frame.contents().find("head").append('<link rel="stylesheet" href="'+e+'" />');}if(c.isArray(e)){c.each(e,c.proxy(function(g,f){this.iframeAddCss(f);},this));}},iframeLoad:function(){this.$editor=this.$frame.contents().find("body").attr({contenteditable:true,dir:this.opts.direction});if(this.$editor[0]){this.document=this.$editor[0].ownerDocument;this.window=this.document.defaultView||window;}this.iframeAddCss();if(this.opts.fullpage){this.setFullpageOnInit(this.$editor.html());}else{this.set(this.content,true,false);}this.buildOptions();this.buildAfter();},placeholderStart:function(e){if(this.isEmpty(e)){if(this.$element.attr("placeholder")){this.opts.placeholder=this.$element.attr("placeholder");}if(this.opts.placeholder===""){this.opts.placeholder=false;}if(this.opts.placeholder!==false){this.opts.focus=false;this.$editor.one("focus.redactor_placeholder",c.proxy(this.placeholderFocus,this));return c('<span class="redactor_placeholder" data-redactor="verified">').attr("contenteditable",false).text(this.opts.placeholder);}}return false;},placeholderFocus:function(){this.$editor.find("span.redactor_placeholder").remove();var e="";if(this.opts.linebreaks===false){e=this.opts.emptyHtml;}this.$editor.off("focus.redactor_placeholder");this.$editor.html(e);if(this.opts.linebreaks===false){this.selectionStart(this.$editor.children()[0]);}else{this.focus();}this.sync();},placeholderRemove:function(){this.opts.placeholder=false;this.$editor.find("span.redactor_placeholder").remove();this.$editor.off("focus.redactor_placeholder");},placeholderRemoveFromCode:function(e){return e.replace(/<span class="redactor_placeholder"(.*?)>(.*?)<\/span>/i,"");},shortcuts:function(g,f){if(!this.opts.shortcuts){return;}if(!g.altKey){if(f===77){this.shortcutsLoad(g,"removeFormat");}else{if(f===66){this.shortcutsLoad(g,"bold");}else{if(f===73){this.shortcutsLoad(g,"italic");}else{if(f===74){this.shortcutsLoad(g,"insertunorderedlist");}else{if(f===75){this.shortcutsLoad(g,"insertorderedlist");}else{if(f===72){this.shortcutsLoad(g,"superscript");}else{if(f===76){this.shortcutsLoad(g,"subscript");}}}}}}}}else{if(f===48){this.shortcutsLoadFormat(g,"p");}else{if(f===49){this.shortcutsLoadFormat(g,"h1");}else{if(f===50){this.shortcutsLoadFormat(g,"h2");}else{if(f===51){this.shortcutsLoadFormat(g,"h3");}else{if(f===52){this.shortcutsLoadFormat(g,"h4");}else{if(f===53){this.shortcutsLoadFormat(g,"h5");}else{if(f===54){this.shortcutsLoadFormat(g,"h6");}}}}}}}}},shortcutsLoad:function(g,f){g.preventDefault();this.execCommand(f,false);},shortcutsLoadFormat:function(g,f){g.preventDefault();this.formatBlocks(f);},focus:function(){if(!this.browser("opera")){this.window.setTimeout(c.proxy(this.focusSet,this,true),1);}else{this.$editor.focus();}},focusEnd:function(){this.focusSet();},focusSet:function(g){this.$editor.focus();var e=this.getRange();e.selectNodeContents(this.$editor[0]);e.collapse(g||false);var f=this.getSelection();f.removeAllRanges();f.addRange(e);},toggle:function(e){if(this.opts.visual){this.toggleCode(e);}else{this.toggleVisual();}},toggleVisual:function(){var e=this.$source.hide().val();if(typeof this.modified!=="undefined"){this.modified=this.cleanRemoveSpaces(this.modified,false)!==this.cleanRemoveSpaces(e,false);}if(this.modified){if(this.opts.fullpage&&e===""){this.setFullpageOnInit(e);}else{this.set(e);if(this.opts.fullpage){this.buildBindKeyboard();}}}if(this.opts.iframe){this.$frame.show();}else{this.$editor.show();}if(this.opts.fullpage){this.$editor.attr("contenteditable",true);}this.$source.off("keydown.redactor-textarea-indenting");this.$editor.focus();this.selectionRestore();this.observeStart();this.buttonActiveVisual();this.buttonInactive("html");this.opts.visual=true;},toggleCode:function(g){if(g!==false){this.selectionSave();}var e=null;if(this.opts.iframe){e=this.$frame.height();if(this.opts.fullpage){this.$editor.removeAttr("contenteditable");}this.$frame.hide();}else{e=this.$editor.innerHeight();this.$editor.hide();}var f=this.$source.val();if(f!==""&&this.opts.tidyHtml){this.$source.val(this.cleanHtml(f));}this.modified=f;this.$source.height(e).show().focus();this.$source.on("keydown.redactor-textarea-indenting",this.textareaIndenting);this.buttonInactiveVisual();this.buttonActive("html");this.opts.visual=false;},textareaIndenting:function(g){if(g.keyCode===9){var f=c(this);var h=f.get(0).selectionStart;f.val(f.val().substring(0,h)+"\t"+f.val().substring(f.get(0).selectionEnd));f.get(0).selectionStart=f.get(0).selectionEnd=h+1;return false;}},autosave:function(){var e=false;this.autosaveInterval=setInterval(c.proxy(function(){var f=this.get();if(e!==f){c.ajax({url:this.opts.autosave,type:"post",data:this.$source.attr("name")+"="+escape(encodeURIComponent(f)),success:c.proxy(function(g){this.callback("autosave",false,g);e=f;},this)});}},this),this.opts.autosaveInterval*1000);},toolbarBuild:function(){if(this.opts.air){this.opts.buttons=this.opts.airButtons;}else{if(!this.opts.buttonSource){var f=this.opts.buttons.indexOf("html"),g=this.opts.buttons[f+1];this.opts.buttons.splice(f,1);if(g==="|"){this.opts.buttons.splice(f,1);}}}c.extend(this.opts.toolbar,this.opts.buttonsCustom);c.each(this.opts.buttonsAdd,c.proxy(function(h,j){this.opts.buttons.push(j);},this));if(this.opts.toolbar){c.each(this.opts.toolbar.formatting.dropdown,c.proxy(function(h,j){if(c.inArray(h,this.opts.formattingTags)=="-1"){delete this.opts.toolbar.formatting.dropdown[h];}},this));}if(this.opts.buttons.length===0){return false;}this.airEnable();this.$toolbar=c("<ul>").addClass("redactor_toolbar").attr("id","redactor_toolbar_"+this.uuid);if(this.opts.air){this.$air=c('<div class="redactor_air">').attr("id","redactor_air_"+this.uuid).hide();this.$air.append(this.$toolbar);c("body").append(this.$air);}else{if(this.opts.toolbarExternal){c(this.opts.toolbarExternal).html(this.$toolbar);}else{this.$box.prepend(this.$toolbar);}}c.each(this.opts.buttons,c.proxy(function(j,l){if(l==="|"){this.$toolbar.append(c(this.opts.buttonSeparator));}else{if(this.opts.toolbar[l]){var h=this.opts.toolbar[l];if(this.opts.fileUpload===false&&l==="file"){return true;}this.$toolbar.append(c("<li>").append(this.buttonBuild(l,h)));}}},this));this.$toolbar.find("a").attr("tabindex","-1");if(this.opts.toolbarFixed){this.toolbarObserveScroll();c(this.opts.toolbarFixedTarget).on("scroll.redactor",c.proxy(this.toolbarObserveScroll,this));}if(this.opts.activeButtons){var e=c.proxy(this.buttonActiveObserver,this);this.$editor.on("mouseup.redactor keyup.redactor",e);}},toolbarObserveScroll:function(){var j=c(this.opts.toolbarFixedTarget).scrollTop();var g=this.$box.offset().top;var h=0;var e=g+this.$box.height()+40;if(j>g){var f="100%";if(this.opts.toolbarFixedBox){h=this.$box.offset().left;f=this.$box.innerWidth();this.$toolbar.addClass("toolbar_fixed_box");}this.toolbarFixed=true;this.$toolbar.css({position:"fixed",width:f,zIndex:1005,top:this.opts.toolbarFixedTopOffset+"px",left:h});if(j<e){this.$toolbar.css("visibility","visible");}else{this.$toolbar.css("visibility","hidden");}}else{this.toolbarFixed=false;this.$toolbar.css({position:"relative",width:"auto",top:0,left:h});if(this.opts.toolbarFixedBox){this.$toolbar.removeClass("toolbar_fixed_box");}}},airEnable:function(){if(!this.opts.air){return;}this.$editor.on("mouseup.redactor keyup.redactor",this,c.proxy(function(g){var j=this.getSelectionText();if(g.type==="mouseup"&&j!=""){this.airShow(g);}if(g.type==="keyup"&&g.shiftKey&&j!=""){var f=c(this.getElement(this.getSelection().focusNode)),h=f.offset();h.height=f.height();this.airShow(h,true);}},this));},airShow:function(l,f){if(!this.opts.air){return;}var j,h;c(".redactor_air").hide();if(f){j=l.left;h=l.top+l.height+14;if(this.opts.iframe){h+=this.$box.position().top-c(this.document).scrollTop();j+=this.$box.position().left;}}else{var g=this.$air.innerWidth();j=l.clientX;if(c(this.document).width()<(j+g)){j-=g;}h=l.clientY+14;if(this.opts.iframe){h+=this.$box.position().top;j+=this.$box.position().left;}else{h+=c(this.document).scrollTop();}}this.$air.css({left:j+"px",top:h+"px"}).show();this.airBindHide();},airBindHide:function(){if(!this.opts.air){return;}var e=c.proxy(function(f){c(f).on("mousedown.redactor",c.proxy(function(g){if(c(g.target).closest(this.$toolbar).length===0){this.$air.fadeOut(100);this.selectionRemove();c(f).off(g);}},this)).on("keydown.redactor",c.proxy(function(g){if(g.which===this.keyCode.ESC){this.getSelection().collapseToStart();}this.$air.fadeOut(100);c(f).off(g);},this));},this);e(document);if(this.opts.iframe){e(this.document);}},airBindMousemoveHide:function(){if(!this.opts.air){return;}var e=c.proxy(function(f){c(f).on("mousemove.redactor",c.proxy(function(g){if(c(g.target).closest(this.$toolbar).length===0){this.$air.fadeOut(100);c(f).off(g);}},this));},this);e(document);if(this.opts.iframe){e(this.document);}},dropdownBuild:function(f,e){c.each(e,c.proxy(function(j,h){if(!h.className){h.className="";}var g;if(h.name==="separator"){g=c('<a class="redactor_separator_drop">');}else{g=c('<a href="#" class="'+h.className+" redactor_dropdown_"+j+'">'+h.title+"</a>");g.on("click",c.proxy(function(l){if(l.preventDefault){l.preventDefault();}if(this.browser("msie")){l.returnValue=false;}if(h.callback){h.callback.call(this,j,g,h,l);}if(h.exec){this.execCommand(h.exec,j);}if(h.func){this[h.func](j);}this.buttonActiveObserver();if(this.opts.air){this.$air.fadeOut(100);}},this));}f.append(g);},this));},dropdownShow:function(m,q){if(!this.opts.visual){m.preventDefault();return false;}var n=this.$toolbar.find(".redactor_dropdown_box_"+q);var f=this.buttonGet(q);if(f.hasClass("dropact")){this.dropdownHideAll();}else{this.dropdownHideAll();this.buttonActive(q);f.addClass("dropact");var r=f.position();if(this.toolbarFixed){r=f.offset();}var o=n.width();if((r.left+o)>c(document).width()){r.left-=o;}var h=r.left+"px";var j=29;var l="absolute";var p=j+"px";if(this.opts.toolbarFixed&&this.toolbarFixed){l="fixed";}else{if(!this.opts.air){p=r.top+j+"px";}}n.css({position:l,left:h,top:p}).show();}var g=c.proxy(function(s){this.dropdownHide(s,n);},this);c(document).one("click",g);this.$editor.one("click",g);m.stopPropagation();this.$editor.focus();},dropdownHideAll:function(){this.$toolbar.find("a.dropact").removeClass("redactor_act").removeClass("dropact");c(".redactor_dropdown").hide();},dropdownHide:function(g,f){if(!c(g.target).hasClass("dropact")){f.removeClass("dropact");this.dropdownHideAll();}},buttonBuild:function(h,e){var f=c('<a href="javascript:;" title="'+e.title+'" tabindex="-1" class="redactor_btn redactor_btn_'+h+'"></a>');f.on("click",c.proxy(function(j){if(j.preventDefault){j.preventDefault();}if(this.browser("msie")){j.returnValue=false;}if(f.hasClass("redactor_button_disabled")){return false;}if(this.isFocused()===false&&!e.exec){this.$editor.focus();}if(e.exec){this.$editor.focus();this.execCommand(e.exec,h);this.airBindMousemoveHide();}else{if(e.func&&e.func!=="show"){this[e.func](h);this.airBindMousemoveHide();}else{if(e.callback){e.callback.call(this,h,f,e,j);this.airBindMousemoveHide();}else{if(e.dropdown){this.dropdownShow(j,h);}}}}this.buttonActiveObserver(false,h);},this));if(e.dropdown){var g=c('<div class="redactor_dropdown redactor_dropdown_box_'+h+'" style="display: none;">');g.appendTo(this.$toolbar);this.dropdownBuild(g,e.dropdown);}return f;},buttonGet:function(e){if(!this.opts.toolbar){return false;}return c(this.$toolbar.find("a.redactor_btn_"+e));},buttonActiveToggle:function(f){var e=this.buttonGet(f);if(e.hasClass("redactor_act")){e.removeClass("redactor_act");}else{e.addClass("redactor_act");}},buttonActive:function(e){this.buttonGet(e).addClass("redactor_act");},buttonInactive:function(e){this.buttonGet(e).removeClass("redactor_act");},buttonInactiveAll:function(e){c.each(this.opts.toolbar,c.proxy(function(f){if(f!=e){this.buttonInactive(f);}},this));},buttonActiveVisual:function(){this.$toolbar.find("a.redactor_btn").not("a.redactor_btn_html").removeClass("redactor_button_disabled");},buttonInactiveVisual:function(){this.$toolbar.find("a.redactor_btn").not("a.redactor_btn_html").addClass("redactor_button_disabled");},buttonChangeIcon:function(e,f){this.buttonGet(e).addClass("redactor_btn_"+f);},buttonRemoveIcon:function(e,f){this.buttonGet(e).removeClass("redactor_btn_"+f);},buttonAddSeparator:function(){this.$toolbar.append(c(this.opts.buttonSeparator));},buttonAddSeparatorAfter:function(e){this.buttonGet(e).parent().after(c(this.opts.buttonSeparator));},buttonAddSeparatorBefore:function(e){this.buttonGet(e).parent().before(c(this.opts.buttonSeparator));},buttonRemoveSeparatorAfter:function(e){this.buttonGet(e).parent().next().remove();},buttonRemoveSeparatorBefore:function(e){this.buttonGet(e).parent().prev().remove();},buttonSetRight:function(e){if(!this.opts.toolbar){return;}this.buttonGet(e).parent().addClass("redactor_btn_right");},buttonSetLeft:function(e){if(!this.opts.toolbar){return;}this.buttonGet(e).parent().removeClass("redactor_btn_right");},buttonAdd:function(f,g,j,h){if(!this.opts.toolbar){return;}var e=this.buttonBuild(f,{title:g,callback:j,dropdown:h});this.$toolbar.append(c("<li>").append(e));},buttonAddFirst:function(f,g,j,h){if(!this.opts.toolbar){return;}var e=this.buttonBuild(f,{title:g,callback:j,dropdown:h});this.$toolbar.prepend(c("<li>").append(e));},buttonAddAfter:function(m,f,h,l,j){if(!this.opts.toolbar){return;}var e=this.buttonBuild(f,{title:h,callback:l,dropdown:j});var g=this.buttonGet(m);if(g.size()!==0){g.parent().after(c("<li>").append(e));}else{this.$toolbar.append(c("<li>").append(e));}},buttonAddBefore:function(j,f,h,m,l){if(!this.opts.toolbar){return;}var e=this.buttonBuild(f,{title:h,callback:m,dropdown:l});var g=this.buttonGet(j);if(g.size()!==0){g.parent().before(c("<li>").append(e));}else{this.$toolbar.append(c("<li>").append(e));}},buttonRemove:function(e,g){var f=this.buttonGet(e);if(g){f.parent().next().remove();}f.parent().removeClass("redactor_btn_right");f.remove();},buttonActiveObserver:function(h,l){var f=this.getParent();this.buttonInactiveAll(l);if(h===false&&l!=="html"){if(c.inArray(l,this.opts.activeButtons)!=-1){this.buttonActiveToggle(l);}return;}if(f&&f.tagName==="A"){this.$toolbar.find("a.redactor_dropdown_link").text(this.opts.curLang.link_edit);}else{this.$toolbar.find("a.redactor_dropdown_link").text(this.opts.curLang.link_insert);}if(this.opts.activeButtonsAdd){c.each(this.opts.activeButtonsAdd,c.proxy(function(e,m){this.opts.activeButtons.push(m);},this));c.extend(this.opts.activeButtonsStates,this.opts.activeButtonsAdd);}c.each(this.opts.activeButtonsStates,c.proxy(function(e,m){if(c(f).closest(e,this.$editor.get()[0]).length!=0){this.buttonActive(m);}},this));var g=c(f).closest(this.opts.alignmentTags.toString().toLowerCase(),this.$editor[0]);if(g.length){var j=g.css("text-align");switch(j){case"right":this.buttonActive("alignright");break;case"center":this.buttonActive("aligncenter");break;case"justify":this.buttonActive("justify");break;default:this.buttonActive("alignleft");break;}}},execPasteFrag:function(e){var j=this.getSelection();if(j.getRangeAt&&j.rangeCount){range=j.getRangeAt(0);range.deleteContents();var f=document.createElement("div");f.innerHTML=e;var m=document.createDocumentFragment(),h,g;while((h=f.firstChild)){g=m.appendChild(h);}var l=m.firstChild;range.insertNode(m);if(g){range=range.cloneRange();range.setStartAfter(g);range.collapse(true);j.removeAllRanges();j.addRange(range);}}},exec:function(f,g,e){if(f==="formatblock"&&this.browser("msie")){g="<"+g+">";}if(f==="inserthtml"&&this.browser("msie")){if(!this.isIe11()){this.$editor.focus();this.document.selection.createRange().pasteHTML(g);}else{this.execPasteFrag(g);}}else{this.document.execCommand(f,false,g);}if(e!==false){this.sync();}this.callback("execCommand",f,g);},execCommand:function(f,g,e){if(!this.opts.visual){this.$source.focus();return false;}if(f==="inserthtml"){this.insertHtml(g,e);this.callback("execCommand",f,g);return;}if(this.currentOrParentIs("PRE")&&!this.opts.formattingPre){return false;}if(f==="insertunorderedlist"||f==="insertorderedlist"){return this.execLists(f,g);}if(f==="unlink"){return this.execUnlink(f,g);}this.exec(f,g,e);if(f==="inserthorizontalrule"){this.$editor.find("hr").removeAttr("id");}},execUnlink:function(f,g){this.bufferSet();var e=this.currentOrParentIs("A");if(e){c(e).replaceWith(c(e).text());this.sync();this.callback("execCommand",f,g);return;}},execLists:function(j,h){this.bufferSet();var r=this.getParent();var o=c(r).closest("ol, ul");var n=false;if(o.length){n=true;var q=o[0].tagName;if((j==="insertunorderedlist"&&q==="OL")||(j==="insertorderedlist"&&q==="UL")){n=false;}}this.selectionSave();if(n){var f=this.getNodes();var g=this.getBlocks(f);if(typeof f[0]!="undefined"&&f.length>1&&f[0].nodeType==3){g.unshift(this.getBlock());}var m="",t="";c.each(g,c.proxy(function(w,x){if(x.tagName=="LI"){var v=c(x);var u=v.clone();u.find("ul","ol").remove();if(this.opts.linebreaks===false){m+=this.outerHtml(c("<p>").append(u.contents()));}else{m+=u.html()+"<br>";}if(w==0){v.addClass("redactor-replaced").empty();t=this.outerHtml(v);}else{v.remove();}}},this));html=this.$editor.html().replace(t,"</"+q+">"+m+"<"+q+">");this.$editor.html(html);this.$editor.find(q+":empty").remove();}else{var e=this.getParent();this.document.execCommand(j);var r=this.getParent();var o=c(r).closest("ol, ul");if(e&&e.tagName=="TD"){o.wrapAll("<td>");}if(o.length){var s=o.children().first();if(c.trim(c(s).text())==""){var l=c('<span id="selection-marker-1"></span>');c(s).prepend(l);}if((this.browser("msie")||this.browser("mozilla"))&&r.tagName!=="LI"){c(r).replaceWith(c(r).html());}var p=o.parent();if(this.isParentRedactor(p)&&this.nodeTestBlocks(p[0])){p.replaceWith(p.contents());}}if(this.browser("mozilla")){this.$editor.focus();}}this.selectionRestore();c(l).remove();this.sync();this.callback("execCommand",j,h);return;},indentingIndent:function(){this.indentingStart("indent");},indentingOutdent:function(){this.indentingStart("outdent");},indentingStart:function(h){this.bufferSet();if(h==="indent"){var j=this.getBlock();this.selectionSave();if(j&&j.tagName=="LI"){var o=this.getParent();var l=c(o).closest("ol, ul");var n=l[0].tagName;var f=this.getBlocks();c.each(f,function(t,u){if(u.tagName=="LI"){var r=c(u).prev();if(r.size()!=0&&r[0].tagName=="LI"){var q=r.children("ul, ol");if(q.size()==0){r.append(c("<"+n+">").append(u));}else{q.append(u);}}}});}else{if(j===false&&this.opts.linebreaks===true){this.exec("formatBlock","blockquote");var p=this.getBlock();var j=c('<div data-tagblock="">').html(c(p).html());c(p).replaceWith(j);var g=this.normalize(c(j).css("margin-left"))+this.opts.indentValue;c(j).css("margin-left",g+"px");}else{var e=this.getBlocks();c.each(e,c.proxy(function(r,s){var q=false;if(s.tagName==="TD"){return;}if(c.inArray(s.tagName,this.opts.alignmentTags)!==-1){q=c(s);}else{q=c(s).closest(this.opts.alignmentTags.toString().toLowerCase(),this.$editor[0]);}var t=this.normalize(q.css("margin-left"))+this.opts.indentValue;q.css("margin-left",t+"px");},this));}}this.selectionRestore();}else{this.selectionSave();var j=this.getBlock();if(j&&j.tagName=="LI"){var f=this.getBlocks();var m=0;this.insideOutdent(j,m,f);}else{var e=this.getBlocks();c.each(e,c.proxy(function(r,s){var q=false;if(c.inArray(s.tagName,this.opts.alignmentTags)!==-1){q=c(s);}else{q=c(s).closest(this.opts.alignmentTags.toString().toLowerCase(),this.$editor[0]);}var t=this.normalize(q.css("margin-left"))-this.opts.indentValue;if(t<=0){if(this.opts.linebreaks===true&&typeof(q.data("tagblock"))!=="undefined"){q.replaceWith(q.html());}else{q.css("margin-left","");this.removeEmptyAttr(q,"style");}}else{q.css("margin-left",t+"px");}},this));}this.selectionRestore();}this.sync();},insideOutdent:function(e,g,f){if(e&&e.tagName=="LI"){var h=c(e).parent().parent();if(h.size()!=0&&h[0].tagName=="LI"){h.after(e);}else{if(typeof f[g]!="undefined"){e=f[g];g++;this.insideOutdent(e,g,f);}else{this.execCommand("insertunorderedlist");}}}},alignmentLeft:function(){this.alignmentSet("","JustifyLeft");},alignmentRight:function(){this.alignmentSet("right","JustifyRight");},alignmentCenter:function(){this.alignmentSet("center","JustifyCenter");},alignmentJustify:function(){this.alignmentSet("justify","JustifyFull");},alignmentSet:function(f,h){this.bufferSet();if(this.oldIE()){this.document.execCommand(h,false,false);return true;}this.selectionSave();var j=this.getBlock();if(!j&&this.opts.linebreaks){this.exec("formatBlock","blockquote");var e=this.getBlock();var j=c('<div data-tagblock="">').html(c(e).html());c(e).replaceWith(j);c(j).css("text-align",f);this.removeEmptyAttr(j,"style");if(f==""&&typeof(c(j).data("tagblock"))!=="undefined"){c(j).replaceWith(c(j).html());}}else{var g=this.getBlocks();c.each(g,c.proxy(function(m,n){var l=false;if(c.inArray(n.tagName,this.opts.alignmentTags)!==-1){l=c(n);}else{l=c(n).closest(this.opts.alignmentTags.toString().toLowerCase(),this.$editor[0]);}if(l){l.css("text-align",f);this.removeEmptyAttr(l,"style");}},this));}this.selectionRestore();this.sync();},cleanEmpty:function(e){var f=this.placeholderStart(e);if(f!==false){return f;}if(this.opts.linebreaks===false){if(e===""){e=this.opts.emptyHtml;}else{if(e.search(/^<hr\s?\/?>$/gi)!==-1){e="<hr>"+this.opts.emptyHtml;}}}return e;},cleanConverters:function(e){if(this.opts.convertDivs){e=e.replace(/<div(.*?)>([\w\W]*?)<\/div>/gi,"<p$1>$2</p>");}if(this.opts.paragraphy){e=this.cleanParagraphy(e);}return e;},cleanConvertProtected:function(e){if(this.opts.templateVars){e=e.replace(/\{\{(.*?)\}\}/gi,"<!-- template double $1 -->");e=e.replace(/\{(.*?)\}/gi,"<!-- template $1 -->");}e=e.replace(/<script(.*?)>([\w\W]*?)<\/script>/gi,'<title type="text/javascript" style="display: none;" class="redactor-script-tag"$1>$2</title>');e=e.replace(/<style(.*?)>([\w\W]*?)<\/style>/gi,'<section$1 style="display: none;" rel="redactor-style-tag">$2</section>');e=e.replace(/<form(.*?)>([\w\W]*?)<\/form>/gi,'<section$1 rel="redactor-form-tag">$2</section>');if(this.opts.phpTags){e=e.replace(/<\?php([\w\W]*?)\?>/gi,'<section style="display: none;" rel="redactor-php-tag">$1</section>');}else{e=e.replace(/<\?php([\w\W]*?)\?>/gi,"");}return e;},cleanReConvertProtected:function(e){if(this.opts.templateVars){e=e.replace(/<!-- template double (.*?) -->/gi,"{{$1}}");e=e.replace(/<!-- template (.*?) -->/gi,"{$1}");}e=e.replace(/<title type="text\/javascript" style="display: none;" class="redactor-script-tag"(.*?)>([\w\W]*?)<\/title>/gi,'<script$1 type="text/javascript">$2<\/script>');e=e.replace(/<section(.*?) style="display: none;" rel="redactor-style-tag">([\w\W]*?)<\/section>/gi,"<style$1>$2</style>");e=e.replace(/<section(.*?)rel="redactor-form-tag"(.*?)>([\w\W]*?)<\/section>/gi,"<form$1$2>$3</form>");if(this.opts.phpTags){e=e.replace(/<section style="display: none;" rel="redactor-php-tag">([\w\W]*?)<\/section>/gi,"<?php\r\n$1\r\n?>");}return e;},cleanRemoveSpaces:function(f,e){if(e!==false){var e=[];var h=f.match(/<(pre|style|script|title)(.*?)>([\w\W]*?)<\/(pre|style|script|title)>/gi);if(h===null){h=[];}if(this.opts.phpTags){var g=f.match(/<\?php([\w\W]*?)\?>/gi);if(g){h=c.merge(h,g);}}if(h){c.each(h,function(j,l){f=f.replace(l,"buffer_"+j);e.push(l);});}}f=f.replace(/\n/g," ");f=f.replace(/[\t]*/g,"");f=f.replace(/\n\s*\n/g,"\n");f=f.replace(/^[\s\n]*/g," ");f=f.replace(/[\s\n]*$/g," ");f=f.replace(/>\s{2,}</g,"> <");f=this.cleanReplacer(f,e);f=f.replace(/\n\n/g,"\n");return f;},cleanReplacer:function(f,e){if(e===false){return f;}c.each(e,function(g,h){f=f.replace("buffer_"+g,h);});return f;},cleanRemoveEmptyTags:function(h){h=h.replace(/<span>([\w\W]*?)<\/span>/gi,"$1");h=h.replace(/[\u200B-\u200D\uFEFF]/g,"");var j=["<b>\\s*</b>","<b>&nbsp;</b>","<em>\\s*</em>"];var g=["<pre></pre>","<blockquote>\\s*</blockquote>","<dd></dd>","<dt></dt>","<ul></ul>","<ol></ol>","<li></li>","<table></table>","<tr></tr>","<span>\\s*<span>","<span>&nbsp;<span>","<p>\\s*</p>","<p></p>","<p>&nbsp;</p>","<p>\\s*<br>\\s*</p>","<div>\\s*</div>","<div>\\s*<br>\\s*</div>"];if(this.opts.removeEmptyTags){g=g.concat(j);}else{g=j;}var e=g.length;for(var f=0;f<e;++f){h=h.replace(new RegExp(g[f],"gi"),"");}return h;},cleanParagraphy:function(l){l=c.trim(l);if(this.opts.linebreaks===true){return l;}if(l===""||l==="<p></p>"){return this.opts.emptyHtml;}l=l+"\n";var n=[];var j=l.match(/<(table|div|pre|object)(.*?)>([\w\W]*?)<\/(table|div|pre|object)>/gi);if(!j){j=[];}var m=l.match(/<!--([\w\W]*?)-->/gi);if(m){j=c.merge(j,m);}if(this.opts.phpTags){var f=l.match(/<section(.*?)rel="redactor-php-tag">([\w\W]*?)<\/section>/gi);if(f){j=c.merge(j,f);}}if(j){c.each(j,function(p,q){n[p]=q;l=l.replace(q,"{replace"+p+"}\n");});}l=l.replace(/<br \/>\s*<br \/>/gi,"\n\n");function h(s,p,q){return l.replace(new RegExp(s,p),q);}var e="(comment|html|body|head|title|meta|style|script|link|iframe|table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|option|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)";l=h("(<"+e+"[^>]*>)","gi","\n$1");l=h("(</"+e+">)","gi","$1\n\n");l=h("\r\n","g","\n");l=h("\r","g","\n");l=h("/\n\n+/","g","\n\n");var o=l.split(new RegExp("\ns*\n","g"),-1);l="";for(var g in o){if(o.hasOwnProperty(g)){if(o[g].search("{replace")==-1){o[g]=o[g].replace(/<p>\n\t<\/p>/gi,"");o[g]=o[g].replace(/<p><\/p>/gi,"");if(o[g]!=""){l+="<p>"+o[g].replace(/^\n+|\n+$/g,"")+"</p>";}}else{l+=o[g];}}}l=h("<p>s*</p>","gi","");l=h("<p>([^<]+)</(div|address|form)>","gi","<p>$1</p></$2>");l=h("<p>s*(</?"+e+"[^>]*>)s*</p>","gi","$1");l=h("<p>(<li.+?)</p>","gi","$1");l=h("<p>s*(</?"+e+"[^>]*>)","gi","$1");l=h("(</?"+e+"[^>]*>)s*</p>","gi","$1");l=h("(</?"+e+"[^>]*>)s*<br />","gi","$1");l=h("<br />(s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)","gi","$1");l=h("\n</p>","gi","</p>");l=h("<li><p>","gi","<li>");l=h("</p></li>","gi","</li>");l=h("</li><p>","gi","</li>");l=h("<p>\t?\n?<p>","gi","<p>");l=h("</dt><p>","gi","</dt>");l=h("</dd><p>","gi","</dd>");l=h("<br></p></blockquote>","gi","</blockquote>");l=h("<p>\t*</p>","gi","");c.each(n,function(p,q){l=l.replace("{replace"+p+"}",q);});return c.trim(l);},cleanConvertInlineTags:function(e,h){var f="strong";if(this.opts.boldTag==="b"){f="b";}var g="em";if(this.opts.italicTag==="i"){g="i";}e=e.replace(/<span style="font-style: italic;">([\w\W]*?)<\/span>/gi,"<"+g+">$1</"+g+">");e=e.replace(/<span style="font-weight: bold;">([\w\W]*?)<\/span>/gi,"<"+f+">$1</"+f+">");if(this.opts.boldTag==="strong"){e=e.replace(/<b>([\w\W]*?)<\/b>/gi,"<strong>$1</strong>");}else{e=e.replace(/<strong>([\w\W]*?)<\/strong>/gi,"<b>$1</b>");}if(this.opts.italicTag==="em"){e=e.replace(/<i>([\w\W]*?)<\/i>/gi,"<em>$1</em>");}else{e=e.replace(/<em>([\w\W]*?)<\/em>/gi,"<i>$1</i>");}if(h!==true){e=e.replace(/<strike>([\w\W]*?)<\/strike>/gi,"<del>$1</del>");}else{e=e.replace(/<del>([\w\W]*?)<\/del>/gi,"<strike>$1</strike>");}return e;},cleanStripTags:function(g){if(g==""||typeof g=="undefined"){return g;}var h=false;if(this.opts.allowedTags!==false){h=true;}var e=h===true?this.opts.allowedTags:this.opts.deniedTags;var f=/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi;g=g.replace(f,function(l,j){if(h===true){return c.inArray(j.toLowerCase(),e)>"-1"?l:"";}else{return c.inArray(j.toLowerCase(),e)>"-1"?"":l;}});g=this.cleanConvertInlineTags(g);return g;},cleanSavePreCode:function(e,f){var g=e.match(/<(pre|code)(.*?)>([\w\W]*?)<\/(pre|code)>/gi);if(g!==null){c.each(g,c.proxy(function(j,l){var h=l.match(/<(pre|code)(.*?)>([\w\W]*?)<\/(pre|code)>/i);h[3]=h[3].replace(/&nbsp;/g," ");if(f!==false){h[3]=this.cleanEncodeEntities(h[3]);}h[3]=h[3].replace(/\$/g,"&#36;");e=e.replace(l,"<"+h[1]+h[2]+">"+h[3]+"</"+h[1]+">");},this));}return e;},cleanEncodeEntities:function(e){e=String(e).replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"');return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");},cleanUnverified:function(){var e=this.$editor.find("li, img, a, b, strong, sub, sup, i, em, u, small, strike, del, span, cite");e.filter('[style*="background-color: transparent;"][style*="line-height"]').css("background-color","").css("line-height","");e.filter('[style*="background-color: transparent;"]').css("background-color","");e.css("line-height","");c.each(e,c.proxy(function(f,g){this.removeEmptyAttr(g,"style");},this));this.$editor.find('div[style="text-align: -webkit-auto;"]').contents().unwrap();},cleanHtml:function(f){var j=0,m=f.length,l=0,e=null,g=null,p="",h="",o="";this.cleanlevel=0;for(;j<m;j++){l=j;if(-1==f.substr(j).indexOf("<")){h+=f.substr(j);return this.cleanFinish(h);}while(l<m&&f.charAt(l)!="<"){l++;}if(j!=l){o=f.substr(j,l-j);if(!o.match(/^\s{2,}$/g)){if("\n"==h.charAt(h.length-1)){h+=this.cleanGetTabs();}else{if("\n"==o.charAt(0)){h+="\n"+this.cleanGetTabs();o=o.replace(/^\s+/,"");}}h+=o;}if(o.match(/\n/)){h+="\n"+this.cleanGetTabs();}}e=l;while(l<m&&">"!=f.charAt(l)){l++;}p=f.substr(e,l-e);j=l;var n;if("!--"==p.substr(1,3)){if(!p.match(/--$/)){while("-->"!=f.substr(l,3)){l++;}l+=2;p=f.substr(e,l-e);j=l;}if("\n"!=h.charAt(h.length-1)){h+="\n";}h+=this.cleanGetTabs();h+=p+">\n";}else{if("!"==p[1]){h=this.placeTag(p+">",h);}else{if("?"==p[1]){h+=p+">\n";}else{if(n=p.match(/^<(script|style|pre)/i)){n[1]=n[1].toLowerCase();p=this.cleanTag(p);h=this.placeTag(p,h);g=String(f.substr(j+1)).toLowerCase().indexOf("</"+n[1]);if(g){o=f.substr(j+1,g);j+=g;h+=o;}}else{p=this.cleanTag(p);h=this.placeTag(p,h);}}}}}return this.cleanFinish(h);},cleanGetTabs:function(){var f="";for(var e=0;e<this.cleanlevel;e++){f+="\t";}return f;},cleanFinish:function(e){e=e.replace(/\n\s*\n/g,"\n");e=e.replace(/^[\s\n]*/,"");e=e.replace(/[\s\n]*$/,"");e=e.replace(/<script(.*?)>\n<\/script>/gi,"<script$1><\/script>");this.cleanlevel=0;return e;},cleanTag:function(f){var h="";f=f.replace(/\n/g," ");f=f.replace(/\s{2,}/g," ");f=f.replace(/^\s+|\s+$/g," ");var g="";if(f.match(/\/$/)){g="/";f=f.replace(/\/+$/,"");}var e;while(e=/\s*([^= ]+)(?:=((['"']).*?\3|[^ ]+))?/.exec(f)){if(e[2]){h+=e[1].toLowerCase()+"="+e[2];}else{if(e[1]){h+=e[1].toLowerCase();}}h+=" ";f=f.substr(e[0].length);}return h.replace(/\s*$/,"")+g+">";},placeTag:function(e,g){var f=e.match(this.cleannewLevel);if(e.match(this.cleanlineBefore)||f){g=g.replace(/\s*$/,"");g+="\n";}if(f&&"/"==e.charAt(1)){this.cleanlevel--;}if("\n"==g.charAt(g.length-1)){g+=this.cleanGetTabs();}if(f&&"/"!=e.charAt(1)){this.cleanlevel++;}g+=e;if(e.match(this.cleanlineAfter)||e.match(this.cleannewLevel)){g=g.replace(/ *$/,"");g+="\n";}return g;},formatEmpty:function(j){var f=c.trim(this.$editor.html());if(this.opts.linebreaks){if(f==""){j.preventDefault();this.$editor.html("");this.focus();}}else{f=f.replace(/<br\s?\/?>/i,"");var h=f.replace(/<p>\s?<\/p>/gi,"");if(f===""||h===""){j.preventDefault();var g=c(this.opts.emptyHtml).get(0);this.$editor.html(g);this.focus();}}this.sync();},formatBlocks:function(e){this.bufferSet();var f=this.getBlocks();this.selectionSave();c.each(f,c.proxy(function(g,j){if(j.tagName!=="LI"){var h=c(j).parent();if(e==="p"){if((j.tagName==="P"&&h.size()!=0&&h[0].tagName==="BLOCKQUOTE")||j.tagName==="BLOCKQUOTE"){this.formatQuote();return;}else{if(this.opts.linebreaks){return;}else{this.formatBlock(e,j);}}}else{this.formatBlock(e,j);}}},this));this.selectionRestore();this.sync();},formatBlock:function(e,j){if(j===false){j=this.getBlock();}if(j===false){if(this.opts.linebreaks===true){this.execCommand("formatblock",e);}return true;}var h="";if(e!=="pre"){h=c(j).contents();}else{h=c(j).html();if(c.trim(h)===""){h='<span id="selection-marker-1"></span>';}}if(j.tagName==="PRE"){e="p";}if(this.opts.linebreaks===true&&e==="p"){c(j).replaceWith(c("<div>").append(h).html()+"<br>");}else{var f=this.getParent();var g=c("<"+e+">").append(h);c(j).replaceWith(g);if(f&&f.tagName=="TD"){c(g).wrapAll("<td>");}}},formatChangeTag:function(g,e,f){if(f!==false){this.selectionSave();}var h=c("<"+e+"/>");c(g).replaceWith(function(){return h.append(c(this).contents());});if(f!==false){this.selectionRestore();}return h;},formatQuote:function(){this.bufferSet();if(this.opts.linebreaks===false){this.selectionSave();var e=this.getBlocks();var p=false;var u=e.length;if(e){var m="";var v="";var h=false;var r=true;c.each(e,function(w,x){if(x.tagName!=="P"){r=false;}});c.each(e,c.proxy(function(w,x){if(x.tagName==="BLOCKQUOTE"){this.formatBlock("p",x,false);}else{if(x.tagName==="P"){p=c(x).parent();if(p[0].tagName=="BLOCKQUOTE"){var y=c(p).children("p").size();if(y==1){c(p).replaceWith(x);}else{if(y==u){h="blockquote";m+=this.outerHtml(x);}else{h="html";m+=this.outerHtml(x);if(w==0){c(x).addClass("redactor-replaced").empty();v=this.outerHtml(x);}else{c(x).remove();}}}}else{if(r===false||e.length==1){this.formatBlock("blockquote",x,false);}else{h="paragraphs";m+=this.outerHtml(x);}}}else{if(x.tagName!=="LI"){this.formatBlock("blockquote",x,false);}}}},this));if(h){if(h=="paragraphs"){c(e[0]).replaceWith("<blockquote>"+m+"</blockquote>");c(e).remove();}else{if(h=="blockquote"){c(p).replaceWith(m);}else{if(h=="html"){var o=this.$editor.html().replace(v,"</blockquote>"+m+"<blockquote>");this.$editor.html(o);this.$editor.find("blockquote").each(function(){if(c.trim(c(this).html())==""){c(this).remove();}});}}}}}this.selectionRestore();}else{var j=this.getBlock();if(j.tagName==="BLOCKQUOTE"){this.selectionSave();var o=c.trim(c(j).html());var s=c.trim(this.getSelectionHtml());o=o.replace(/<span(.*?)id="selection-marker(.*?)<\/span>/gi,"");if(o==s){c(j).replaceWith(c(j).html()+"<br>");}else{this.inlineFormat("tmp");var l=this.$editor.find("tmp");l.empty();var q=this.$editor.html().replace("<tmp></tmp>",'</blockquote><span id="selection-marker-1">'+this.opts.invisibleSpace+"</span>"+s+"<blockquote>");this.$editor.html(q);l.remove();this.$editor.find("blockquote").each(function(){if(c.trim(c(this).html())==""){c(this).remove();}});}this.selectionRestore();this.$editor.find("span#selection-marker-1").attr("id",false);}else{var g=this.selectionWrap("blockquote");var o=c(g).html();var t=["ul","ol","table","tr","tbody","thead","tfoot","dl"];c.each(t,function(w,x){o=o.replace(new RegExp("<"+x+"(.*?)>","gi"),"");o=o.replace(new RegExp("</"+x+">","gi"),"");});var f=this.opts.blockLevelElements;f.push("td");c.each(f,function(w,x){o=o.replace(new RegExp("<"+x+"(.*?)>","gi"),"");o=o.replace(new RegExp("</"+x+">","gi"),"<br>");});c(g).html(o);this.selectionElement(g);var n=c(g).next();if(n.size()!=0&&n[0].tagName==="BR"){n.remove();}}}this.sync();},blockRemoveAttr:function(e,g){var f=this.getBlocks();c(f).removeAttr(e);this.sync();},blockSetAttr:function(e,g){var f=this.getBlocks();c(f).attr(e,g);this.sync();},blockRemoveStyle:function(f){var e=this.getBlocks();c(e).css(f,"");this.removeEmptyAttr(e,"style");this.sync();},blockSetStyle:function(g,f){var e=this.getBlocks();c(e).css(g,f);this.sync();},blockRemoveClass:function(f){var e=this.getBlocks();c(e).removeClass(f);this.removeEmptyAttr(e,"class");this.sync();},blockSetClass:function(f){var e=this.getBlocks();c(e).addClass(f);this.sync();},inlineRemoveClass:function(e){this.selectionSave();this.inlineEachNodes(function(f){c(f).removeClass(e);this.removeEmptyAttr(f,"class");});this.selectionRestore();this.sync();},inlineSetClass:function(e){var f=this.getCurrent();if(!c(f).hasClass(e)){this.inlineMethods("addClass",e);}},inlineRemoveStyle:function(e){this.selectionSave();this.inlineEachNodes(function(f){c(f).css(e,"");this.removeEmptyAttr(f,"style");});this.selectionRestore();this.sync();},inlineSetStyle:function(f,e){this.inlineMethods("css",f,e);},inlineRemoveAttr:function(e){this.selectionSave();var g=this.getRange(),h=this.getElement(),f=this.getNodes();if(g.collapsed||g.startContainer===g.endContainer&&h){f=c(h);}c(f).removeAttr(e);this.inlineUnwrapSpan();this.selectionRestore();this.sync();},inlineSetAttr:function(e,f){this.inlineMethods("attr",e,f);},inlineMethods:function(h,e,j){this.bufferSet();this.selectionSave();var f=this.getRange();var g=this.getElement();if((f.collapsed||f.startContainer===f.endContainer)&&g&&!this.nodeTestBlocks(g)){c(g)[h](e,j);}else{this.document.execCommand("fontSize",false,4);var l=this.$editor.find("font");c.each(l,c.proxy(function(m,n){this.inlineSetMethods(h,n,e,j);},this));}this.selectionRestore();this.sync();},inlineSetMethods:function(j,o,g,l){var m=c(o).parent(),e;var n=this.getSelectionText();var h=c(m).text();var f=n==h;if(f&&m&&m[0].tagName==="INLINE"&&m[0].attributes.length!=0){e=m;c(o).replaceWith(c(o).html());}else{e=c("<inline>").append(c(o).contents());c(o).replaceWith(e);}c(e)[j](g,l);return e;},inlineEachNodes:function(j){var f=this.getRange(),g=this.getElement(),e=this.getNodes(),h;if(f.collapsed||f.startContainer===f.endContainer&&g){e=c(g);h=true;}c.each(e,c.proxy(function(m,o){if(!h&&o.tagName!=="INLINE"){var l=this.getSelectionText();var p=c(o).parent().text();var n=l==p;if(n&&o.parentNode.tagName==="INLINE"&&!c(o.parentNode).hasClass("redactor_editor")){o=o.parentNode;}else{return;}}j.call(this,o);},this));},inlineUnwrapSpan:function(){var e=this.$editor.find("inline");c.each(e,c.proxy(function(g,h){var f=c(h);if(f.attr("class")===undefined&&f.attr("style")===undefined){f.contents().unwrap();}},this));},inlineFormat:function(e){this.selectionSave();this.document.execCommand("fontSize",false,4);var g=this.$editor.find("font");var f;c.each(g,function(h,l){var j=c("<"+e+"/>").append(c(l).contents());c(l).replaceWith(j);f=j;});this.selectionRestore();this.sync();},inlineRemoveFormat:function(e){this.selectionSave();var f=e.toUpperCase();var g=this.getNodes();var h=c(this.getParent()).parent();c.each(g,function(j,l){if(l.tagName===f){this.inlineRemoveFormatReplace(l);}});if(h&&h[0].tagName===f){this.inlineRemoveFormatReplace(h);}this.selectionRestore();this.sync();},inlineRemoveFormatReplace:function(e){c(e).replaceWith(c(e).contents());},insertHtml:function(g,j){var m=this.getCurrent();var h=m.parentNode;this.$editor.focus();this.bufferSet();var e=c("<div>").append(c.parseHTML(g));g=e.html();g=this.cleanRemoveEmptyTags(g);e=c("<div>").append(c.parseHTML(g));var f=this.getBlock();if(e.contents().length==1){var l=e.contents()[0].tagName;if(l!="P"&&l==f.tagName||l=="PRE"){g=e.text();e=c("<div>").append(g);}}if(!this.opts.linebreaks&&e.contents().length==1&&e.contents()[0].nodeType==3&&(this.getRangeSelectedNodes().length>2||(!m||m.tagName=="BODY"&&!h||h.tagName=="HTML"))){g="<p>"+g+"</p>";}g=this.setSpansVerifiedHtml(g);if(e.contents().length>1&&f||e.contents().is("p, :header, ul, ol, li, div, table, td, blockquote, pre, address, section, header, footer, aside, article")){if(this.browser("msie")){if(!this.isIe11()){this.document.selection.createRange().pasteHTML(g);}else{this.execPasteFrag(g);}}else{this.document.execCommand("inserthtml",false,g);}}else{this.insertHtmlAdvanced(g,false);}if(this.selectall){this.window.setTimeout(c.proxy(function(){if(!this.opts.linebreaks){this.selectionEnd(this.$editor.contents().last());}else{this.focusEnd();}},this),1);}this.observeStart();this.setNonEditable();if(j!==false){this.sync();}},insertHtmlAdvanced:function(f,l){f=this.setSpansVerifiedHtml(f);var m=this.getSelection();if(m.getRangeAt&&m.rangeCount){var e=m.getRangeAt(0);e.deleteContents();var g=this.document.createElement("div");g.innerHTML=f;var n=this.document.createDocumentFragment(),j,h;while((j=g.firstChild)){h=n.appendChild(j);}e.insertNode(n);if(h){e=e.cloneRange();e.setStartAfter(h);e.collapse(true);m.removeAllRanges();m.addRange(e);}}if(l!==false){this.sync();}},insertBeforeCursor:function(f){f=this.setSpansVerifiedHtml(f);var g=c(f);var j=document.createElement("span");j.innerHTML="\u200B";var e=this.getRange();e.insertNode(j);e.insertNode(g[0]);e.collapse(false);var h=this.getSelection();h.removeAllRanges();h.addRange(e);this.sync();},insertText:function(f){var e=c(c.parseHTML(f));if(e.length){f=e.text();}this.$editor.focus();if(this.browser("msie")&&!this.isIe11()){this.document.selection.createRange().pasteHTML(f);}else{this.document.execCommand("inserthtml",false,f);}this.sync();},insertNode:function(j){j=j[0]||j;if(j.tagName=="SPAN"){var e="inline";var f=j.outerHTML;var h=new RegExp("<"+j.tagName,"i");var g=f.replace(h,"<"+e);h=new RegExp("</"+j.tagName,"i");g=g.replace(h,"</"+e);j=c(g)[0];}var l=this.getSelection();if(l.getRangeAt&&l.rangeCount){range=l.getRangeAt(0);range.deleteContents();range.insertNode(j);range.setEndAfter(j);range.setStartAfter(j);l.removeAllRanges();l.addRange(range);}},insertNodeToCaretPositionFromPoint:function(l,j){var g;var f=l.clientX,n=l.clientY;if(this.document.caretPositionFromPoint){var m=this.document.caretPositionFromPoint(f,n);g=this.getRange();g.setStart(m.offsetNode,m.offset);g.collapse(true);g.insertNode(j);}else{if(this.document.caretRangeFromPoint){g=this.document.caretRangeFromPoint(f,n);g.insertNode(j);}else{if(typeof document.body.createTextRange!="undefined"){g=this.document.body.createTextRange();g.moveToPoint(f,n);var h=g.duplicate();h.moveToPoint(f,n);g.setEndPoint("EndToEnd",h);g.select();}}}},insertAfterLastElement:function(e,f){if(typeof(f)!="undefined"){e=f;}if(this.isEndOfElement()){if(this.opts.linebreaks){var g=c("<div>").append(c.trim(this.$editor.html())).contents();if(this.outerHtml(g.last()[0])!=this.outerHtml(e)){return false;}}else{if(this.$editor.contents().last()[0]!==e){return false;}}this.insertingAfterLastElement(e);}},insertingAfterLastElement:function(e){this.bufferSet();if(this.opts.linebreaks===false){var f=c(this.opts.emptyHtml);c(e).after(f);this.selectionStart(f);}else{var f=c('<span id="selection-marker-1">'+this.opts.invisibleSpace+"</span>",this.document)[0];c(e).after(f);c(f).after(this.opts.invisibleSpace);this.selectionRestore();this.$editor.find("span#selection-marker-1").removeAttr("id");}},insertLineBreak:function(){this.selectionSave();this.$editor.find("#selection-marker-1").before("<br>"+(this.browser("webkit")?this.opts.invisibleSpace:""));this.selectionRestore();},insertDoubleLineBreak:function(){this.selectionSave();this.$editor.find("#selection-marker-1").before("<br><br>"+(this.browser("webkit")?this.opts.invisibleSpace:""));this.selectionRestore();},replaceLineBreak:function(e){var f=c("<br>"+this.opts.invisibleSpace);c(e).replaceWith(f);this.selectionStart(f);},pasteClean:function(g){g=this.callback("pasteBefore",false,g);if(this.browser("msie")){var f=c.trim(g);if(f.search(/^<a(.*?)>(.*?)<\/a>$/i)==0){g=g.replace(/^<a(.*?)>(.*?)<\/a>$/i,"$2");}}if(this.opts.pastePlainText){var f=this.document.createElement("div");g=g.replace(/<br>|<\/H[1-6]>|<\/p>|<\/div>/gi,"\n");f.innerHTML=g;g=f.textContent||f.innerText;g=c.trim(g);g=g.replace("\n","<br>");g=this.cleanParagraphy(g);this.pasteInsert(g);return false;}if(this.currentOrParentIs("PRE")){g=this.pastePre(g);this.pasteInsert(g);return true;}g=g.replace(/<p(.*?)class="MsoListParagraphCxSpFirst"([\w\W]*?)<\/p>/gi,"<ul><li$2</li>");g=g.replace(/<p(.*?)class="MsoListParagraphCxSpMiddle"([\w\W]*?)<\/p>/gi,"<li$2</li>");g=g.replace(/<p(.*?)class="MsoListParagraphCxSpLast"([\w\W]*?)<\/p>/gi,"<li$2</li></ul>");g=g.replace(/<p(.*?)class="MsoListParagraph"([\w\W]*?)<\/p>/gi,"<ul><li$2</li></ul>");g=g.replace(/·/g,"");g=g.replace(/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi,"");g=g.replace(/(&nbsp;){2,}/gi,"&nbsp;");g=g.replace(/&nbsp;/gi," ");g=g.replace(/<b\sid="internal-source-marker(.*?)">([\w\W]*?)<\/b>/gi,"$2");g=g.replace(/<b(.*?)id="docs-internal-guid(.*?)">([\w\W]*?)<\/b>/gi,"$3");g=this.cleanStripTags(g);g=g.replace(/<td><\/td>/gi,"[td]");g=g.replace(/<td>&nbsp;<\/td>/gi,"[td]");g=g.replace(/<td><br><\/td>/gi,"[td]");g=g.replace(/<td(.*?)colspan="(.*?)"(.*?)>([\w\W]*?)<\/td>/gi,'[td colspan="$2"]$4[/td]');g=g.replace(/<td(.*?)rowspan="(.*?)"(.*?)>([\w\W]*?)<\/td>/gi,'[td rowspan="$2"]$4[/td]');g=g.replace(/<a(.*?)href="(.*?)"(.*?)>([\w\W]*?)<\/a>/gi,'[a href="$2"]$4[/a]');g=g.replace(/<iframe(.*?)>([\w\W]*?)<\/iframe>/gi,"[iframe$1]$2[/iframe]");g=g.replace(/<video(.*?)>([\w\W]*?)<\/video>/gi,"[video$1]$2[/video]");g=g.replace(/<audio(.*?)>([\w\W]*?)<\/audio>/gi,"[audio$1]$2[/audio]");g=g.replace(/<embed(.*?)>([\w\W]*?)<\/embed>/gi,"[embed$1]$2[/embed]");g=g.replace(/<object(.*?)>([\w\W]*?)<\/object>/gi,"[object$1]$2[/object]");g=g.replace(/<param(.*?)>/gi,"[param$1]");g=g.replace(/<img(.*?)>/gi,"[img$1]");g=g.replace(/ class="(.*?)"/gi,"");g=g.replace(/<(\w+)([\w\W]*?)>/gi,"<$1>");g=g.replace(/<[^\/>][^>]*>(\s*|\t*|\n*|&nbsp;|<br>)<\/[^>]+>/gi,"");g=g.replace(/<div>\s*?\t*?\n*?(<ul>|<ol>|<p>)/gi,"$1");g=g.replace(/\[td colspan="(.*?)"\]([\w\W]*?)\[\/td\]/gi,'<td colspan="$1">$2</td>');g=g.replace(/\[td rowspan="(.*?)"\]([\w\W]*?)\[\/td\]/gi,'<td rowspan="$1">$2</td>');g=g.replace(/\[td\]/gi,"<td>&nbsp;</td>");g=g.replace(/\[a href="(.*?)"\]([\w\W]*?)\[\/a\]/gi,'<a href="$1">$2</a>');g=g.replace(/\[iframe(.*?)\]([\w\W]*?)\[\/iframe\]/gi,"<iframe$1>$2</iframe>");g=g.replace(/\[video(.*?)\]([\w\W]*?)\[\/video\]/gi,"<video$1>$2</video>");g=g.replace(/\[audio(.*?)\]([\w\W]*?)\[\/audio\]/gi,"<audio$1>$2</audio>");g=g.replace(/\[embed(.*?)\]([\w\W]*?)\[\/embed\]/gi,"<embed$1>$2</embed>");g=g.replace(/\[object(.*?)\]([\w\W]*?)\[\/object\]/gi,"<object$1>$2</object>");g=g.replace(/\[param(.*?)\]/gi,"<param$1>");g=g.replace(/\[img(.*?)\]/gi,"<img$1>");if(this.opts.convertDivs){g=g.replace(/<div(.*?)>([\w\W]*?)<\/div>/gi,"<p>$2</p>");g=g.replace(/<\/div><p>/gi,"<p>");g=g.replace(/<\/p><\/div>/gi,"</p>");}if(this.currentOrParentIs("LI")){g=g.replace(/<p>([\w\W]*?)<\/p>/gi,"$1<br>");}else{g=this.cleanParagraphy(g);}g=g.replace(/<span(.*?)>([\w\W]*?)<\/span>/gi,"$2");g=g.replace(/<img>/gi,"");g=g.replace(/<[^\/>][^>][^img|param|source]*>(\s*|\t*|\n*|&nbsp;|<br>)<\/[^>]+>/gi,"");g=g.replace(/\n{3,}/gi,"\n");g=g.replace(/<p><p>/gi,"<p>");g=g.replace(/<\/p><\/p>/gi,"</p>");g=g.replace(/<li>(\s*|\t*|\n*)<p>/gi,"<li>");g=g.replace(/<\/p>(\s*|\t*|\n*)<\/li>/gi,"</li>");if(this.opts.linebreaks===true){g=g.replace(/<p(.*?)>([\w\W]*?)<\/p>/gi,"$2<br>");}g=g.replace(/<[^\/>][^>][^img|param|source]*>(\s*|\t*|\n*|&nbsp;|<br>)<\/[^>]+>/gi,"");g=g.replace(/<img src="webkit-fake-url\:\/\/(.*?)"(.*?)>/gi,"");g=g.replace(/<td(.*?)>(\s*|\t*|\n*)<p>([\w\W]*?)<\/p>(\s*|\t*|\n*)<\/td>/gi,"<td$1>$3</td>");g=g.replace(/<div(.*?)>([\w\W]*?)<\/div>/gi,"$2");g=g.replace(/<div(.*?)>([\w\W]*?)<\/div>/gi,"$2");this.pasteClipboardMozilla=false;if(this.browser("mozilla")){if(this.opts.clipboardUpload){var h=g.match(/<img src="data:image(.*?)"(.*?)>/gi);if(h!==null){this.pasteClipboardMozilla=h;for(k in h){var e=h[k].replace("<img",'<img data-mozilla-paste-image="'+k+'" ');g=g.replace(h[k],e);}}}while(/<br>$/gi.test(g)){g=g.replace(/<br>$/gi,"");}}g=g.replace(/<p>•([\w\W]*?)<\/p>/gi,"<li>$1</li>");while(/<font>([\w\W]*?)<\/font>/gi.test(g)){g=g.replace(/<font>([\w\W]*?)<\/font>/gi,"$1");}g=g.replace(/<p>\n?<li>/gi,"<li>");if(this.browser("msie")&&!this.isIe11()){g=g.replace(/\n/g,"");}this.pasteInsert(g);},pastePre:function(f){f=f.replace(/<br>|<\/H[1-6]>|<\/p>|<\/div>/gi,"\n");var e=this.document.createElement("div");e.innerHTML=f;return this.cleanEncodeEntities(e.textContent||e.innerText);},pasteInsert:function(e){if(this.selectall){if(!this.opts.linebreaks){this.$editor.html(this.opts.emptyHtml);}else{this.$editor.html("");}this.$editor.focus();}e=this.callback("pasteAfter",false,e);this.insertHtml(e);this.selectall=false;setTimeout(c.proxy(function(){this.rtePaste=false;if(this.browser("mozilla")){this.$editor.find("p:empty").remove();}if(this.pasteClipboardMozilla!==false){this.pasteClipboardUploadMozilla();}},this),100);if(this.opts.autoresize&&this.fullscreen!==true){c(this.document.body).scrollTop(this.saveScroll);}else{this.$editor.scrollTop(this.saveScroll);}},pasteClipboardUploadMozilla:function(){var e=this.$editor.find("img[data-mozilla-paste-image]");c.each(e,c.proxy(function(h,j){var g=c(j);var f=j.src.split(",");var l=f[1];var m=f[0].split(";")[0].split(":")[1];c.post(this.opts.clipboardUploadUrl,{contentType:m,data:l},c.proxy(function(o){var n=(typeof o==="string"?c.parseJSON(o):o);g.attr("src",n.filelink);g.removeAttr("data-mozilla-paste-image");this.sync();this.callback("imageUpload",g,n);},this));},this));},pasteClipboardUpload:function(j){var g=j.target.result;var f=g.split(",");var h=f[1];var l=f[0].split(";")[0].split(":")[1];if(this.opts.clipboardUpload){c.post(this.opts.clipboardUploadUrl,{contentType:l,data:h},c.proxy(function(n){var m=(typeof n==="string"?c.parseJSON(n):n);var e='<img src="'+m.filelink+'" id="clipboard-image-marker" />';this.execCommand("inserthtml",e,false);var o=c(this.$editor.find("img#clipboard-image-marker"));if(o.length){o.removeAttr("id");}else{o=false;}this.sync();if(o){this.callback("imageUpload",o,m);}},this));}else{this.insertHtml('<img src="'+g+'" />');}},bufferSet:function(e){if(e!==undefined){this.opts.buffer.push(e);}else{this.selectionSave();this.opts.buffer.push(this.$editor.html());this.selectionRemoveMarkers("buffer");}},bufferUndo:function(){if(this.opts.buffer.length===0){this.$editor.focus();return;}this.selectionSave();this.opts.rebuffer.push(this.$editor.html());this.selectionRestore(false,true);this.$editor.html(this.opts.buffer.pop());this.selectionRestore();setTimeout(c.proxy(this.observeStart,this),100);},bufferRedo:function(){if(this.opts.rebuffer.length===0){this.$editor.focus();return false;}this.selectionSave();this.opts.buffer.push(this.$editor.html());this.selectionRestore(false,true);this.$editor.html(this.opts.rebuffer.pop());this.selectionRestore(true);setTimeout(c.proxy(this.observeStart,this),4);},observeStart:function(){this.observeImages();if(this.opts.observeLinks){this.observeLinks();}},observeLinks:function(){this.$editor.find("a").on("click",c.proxy(this.linkObserver,this));this.$editor.on("click.redactor",c.proxy(function(f){this.linkObserverTooltipClose(f);},this));c(document).on("click.redactor",c.proxy(function(f){this.linkObserverTooltipClose(f);},this));},observeImages:function(){if(this.opts.observeImages===false){return false;}this.$editor.find("img").each(c.proxy(function(e,f){if(this.browser("msie")){c(f).attr("unselectable","on");}this.imageResize(f);},this));},linkObserver:function(h){var j=c(h.target);var m=j.offset();if(this.opts.iframe){var g=this.$frame.offset();m.top=g.top+(m.top-c(this.document).scrollTop());m.left+=g.left;}var p=c('<span class="redactor-link-tooltip"></span>');var f=j.attr("href");if(f.length>24){f=f.substring(0,24)+"...";}var l=c('<a href="'+j.attr("href")+'" target="_blank">'+f+"</a>").on("click",c.proxy(function(q){this.linkObserverTooltipClose(false);},this));var n=c('<a href="#">'+this.opts.curLang.edit+"</a>").on("click",c.proxy(function(q){q.preventDefault();this.linkShow();this.linkObserverTooltipClose(false);},this));var o=c('<a href="#">'+this.opts.curLang.unlink+"</a>").on("click",c.proxy(function(q){q.preventDefault();this.execCommand("unlink");this.linkObserverTooltipClose(false);},this));p.append(l);p.append(" | ");p.append(n);p.append(" | ");p.append(o);p.css({top:(m.top+20)+"px",left:m.left+"px"});c(".redactor-link-tooltip").remove();c("body").append(p);},linkObserverTooltipClose:function(f){if(f!==false&&f.target.tagName=="A"){return false;}c(".redactor-link-tooltip").remove();},getSelection:function(){if(!this.opts.rangy){return this.document.getSelection();}else{if(!this.opts.iframe){return rangy.getSelection();}else{return rangy.getSelection(this.$frame[0]);}}},getRange:function(){if(!this.opts.rangy){if(this.document.getSelection){var e=this.getSelection();if(e.getRangeAt&&e.rangeCount){return e.getRangeAt(0);}}return this.document.createRange();}else{if(!this.opts.iframe){return rangy.createRange();}else{return rangy.createRange(this.iframeDoc());}}},selectionElement:function(e){this.setCaret(e);},selectionStart:function(e){this.selectionSet(e[0]||e,0,null,0);},selectionEnd:function(e){this.selectionSet(e[0]||e,1,null,1);},selectionSet:function(n,m,l,h){if(l==null){l=n;}if(h==null){h=m;}var g=this.getSelection();if(!g){return;}var f=this.getRange();f.setStart(n,m);f.setEnd(l,h);try{g.removeAllRanges();}catch(j){}g.addRange(f);},selectionWrap:function(e){e=e.toLowerCase();var h=this.getBlock();if(h){var j=this.formatChangeTag(h,e);this.sync();return j;}var g=this.getSelection();var f=g.getRangeAt(0);var j=document.createElement(e);j.appendChild(f.extractContents());f.insertNode(j);this.selectionElement(j);return j;},selectionAll:function(){var e=this.getRange();e.selectNodeContents(this.$editor[0]);var f=this.getSelection();f.removeAllRanges();f.addRange(e);},selectionRemove:function(){this.getSelection().removeAllRanges();},getCaretOffset:function(h){var e=0;var g=this.getRange();var f=g.cloneRange();f.selectNodeContents(h);f.setEnd(g.endContainer,g.endOffset);e=c.trim(f.toString()).length;return e;},getCaretOffsetRange:function(){return new d(this.getSelection().getRangeAt(0));},setCaret:function(h,f,m){if(typeof m==="undefined"){m=f;}h=h[0]||h;var o=this.getRange();o.selectNodeContents(h);var p=this.getTextNodesIn(h);var l=false;var e=0,q;if(p.length==1&&f){o.setStart(p[0],f);o.setEnd(p[0],m);}else{for(var n=0,j;j=p[n++];){q=e+j.length;if(!l&&f>=e&&(f<q||(f==q&&n<p.length))){o.setStart(j,f-e);l=true;}if(l&&m<=q){o.setEnd(j,m-e);break;}e=q;}}var g=this.getSelection();g.removeAllRanges();g.addRange(o);},getTextNodesIn:function(j){var h=[];if(j.nodeType==3){h.push(j);}else{var g=j.childNodes;for(var f=0,e=g.length;f<e;++f){h.push.apply(h,this.getTextNodesIn(g[f]));}}return h;},getCurrent:function(){var e=false;var f=this.getSelection();if(f&&f.rangeCount>0){e=f.getRangeAt(0).startContainer;}return this.isParentRedactor(e);},getParent:function(e){e=e||this.getCurrent();if(e){return this.isParentRedactor(c(e).parent()[0]);}else{return false;}},getBlock:function(e){if(typeof e==="undefined"){e=this.getCurrent();}while(e){if(this.nodeTestBlocks(e)){if(c(e).hasClass("redactor_editor")){return false;}return e;}e=e.parentNode;}return false;},getBlocks:function(f){var g=[];if(typeof f=="undefined"){var e=this.getRange();if(e&&e.collapsed===true){return[this.getBlock()];}var f=this.getNodes(e);}c.each(f,c.proxy(function(h,j){if(this.opts.iframe===false&&c(j).parents("div.redactor_editor").size()==0){return false;}if(this.nodeTestBlocks(j)){g.push(j);}},this));if(g.length===0){g=[this.getBlock()];}return g;},nodeTestBlocks:function(e){return e.nodeType==1&&this.rTestBlock.test(e.nodeName);},tagTestBlock:function(e){return this.rTestBlock.test(e);},getNodes:function(g,e){if(typeof g=="undefined"||g==false){var g=this.getRange();}if(g&&g.collapsed===true){if(typeof e==="undefined"&&this.tagTestBlock(e)){var m=this.getBlock();if(m.tagName==e){return[m];}else{return[];}}else{return[this.getCurrent()];}}var f=[],l=[];var j=this.document.getSelection();if(!j.isCollapsed){f=this.getRangeSelectedNodes(j.getRangeAt(0));}c.each(f,c.proxy(function(n,o){if(this.opts.iframe===false&&c(o).parents("div.redactor_editor").size()==0){return false;}if(typeof e==="undefined"){if(c.trim(o.textContent)!=""){l.push(o);}}else{if(o.tagName==e){l.push(o);}}},this));if(l.length==0){if(typeof e==="undefined"&&this.tagTestBlock(e)){var m=this.getBlock();if(m.tagName==e){return l.push(m);}else{return[];}}else{l.push(this.getCurrent());}}var h=l[l.length-1];if(this.nodeTestBlocks(h)){l=l.slice(0,-1);}return l;},getElement:function(e){if(!e){e=this.getCurrent();}while(e){if(e.nodeType==1){if(c(e).hasClass("redactor_editor")){return false;}return e;}e=e.parentNode;}return false;},getRangeSelectedNodes:function(f){f=f||this.getRange();var g=f.startContainer;var e=f.endContainer;if(g==e){return[g];}var h=[];while(g&&g!=e){h.push(g=this.nextNode(g));}g=f.startContainer;while(g&&g!=f.commonAncestorContainer){h.unshift(g);g=g.parentNode;}return h;},nextNode:function(e){if(e.hasChildNodes()){return e.firstChild;}else{while(e&&!e.nextSibling){e=e.parentNode;}if(!e){return null;}return e.nextSibling;}},getSelectionText:function(){return this.getSelection().toString();},getSelectionHtml:function(){var h="";var j=this.getSelection();if(j.rangeCount){var f=this.document.createElement("div");var e=j.rangeCount;for(var g=0;g<e;++g){f.appendChild(j.getRangeAt(g).cloneContents());}h=f.innerHTML;}return this.syncClean(h);},selectionSave:function(){if(!this.isFocused()){this.$editor.focus();}if(!this.opts.rangy){this.selectionCreateMarker(this.getRange());}else{this.savedSel=rangy.saveSelection();}},selectionCreateMarker:function(h,e){if(!h){return;}var g=c('<span id="selection-marker-1" class="redactor-selection-marker">'+this.opts.invisibleSpace+"</span>",this.document)[0];var f=c('<span id="selection-marker-2" class="redactor-selection-marker">'+this.opts.invisibleSpace+"</span>",this.document)[0];if(h.collapsed===true){this.selectionSetMarker(h,g,true);}else{this.selectionSetMarker(h,g,true);this.selectionSetMarker(h,f,false);}this.savedSel=this.$editor.html();this.selectionRestore(false,false);},selectionSetMarker:function(e,g,f){var h=e.cloneRange();h.collapse(f);h.insertNode(g);h.detach();},selectionRestore:function(h,e){if(!this.opts.rangy){if(h===true&&this.savedSel){this.$editor.html(this.savedSel);}var g=this.$editor.find("span#selection-marker-1");var f=this.$editor.find("span#selection-marker-2");if(this.browser("mozilla")){this.$editor.focus();}else{if(!this.isFocused()){this.$editor.focus();}}if(g.length!=0&&f.length!=0){this.selectionSet(g[0],0,f[0],0);}else{if(g.length!=0){this.selectionSet(g[0],0,null,0);}}if(e!==false){this.selectionRemoveMarkers();this.savedSel=false;}}else{rangy.restoreSelection(this.savedSel);}},selectionRemoveMarkers:function(e){if(!this.opts.rangy){c.each(this.$editor.find("span.redactor-selection-marker"),function(){var f=c.trim(c(this).html().replace(/[^\u0000-\u1C7F]/g,""));if(f==""){c(this).remove();}else{c(this).removeAttr("class").removeAttr("id");}});}else{rangy.removeMarkers(this.savedSel);}},tableShow:function(){this.selectionSave();this.modalInit(this.opts.curLang.table,this.opts.modal_table,300,c.proxy(function(){c("#redactor_insert_table_btn").click(c.proxy(this.tableInsert,this));setTimeout(function(){c("#redactor_table_rows").focus();},200);},this));},tableInsert:function(){var r=c("#redactor_table_rows").val(),f=c("#redactor_table_columns").val(),n=c("<div></div>"),e=Math.floor(Math.random()*99999),p=c('<table id="table'+e+'"><tbody></tbody></table>'),g,l,m,o;for(g=0;g<r;g++){l=c("<tr></tr>");for(m=0;m<f;m++){o=c("<td>"+this.opts.invisibleSpace+"</td>");if(g===0&&m===0){o.append('<span id="selection-marker-1">'+this.opts.invisibleSpace+"</span>");}c(l).append(o);}p.append(l);}n.append(p);var h=n.html();this.modalClose();this.selectionRestore();var j=this.getBlock()||this.getCurrent();if(j&&j.tagName!="BODY"){c(j).after(h);}else{this.insertHtmlAdvanced(h,false);}this.selectionRestore();var q=this.$editor.find("#table"+e);this.buttonActiveObserver();q.find("span#selection-marker-1").remove();q.removeAttr("id");this.sync();},tableDeleteTable:function(){var e=c(this.getParent()).closest("table");if(!this.isParentRedactor(e)){return false;}if(e.size()==0){return false;}this.bufferSet();e.remove();this.sync();},tableDeleteRow:function(){var e=c(this.getParent()).closest("table");if(!this.isParentRedactor(e)){return false;}if(e.size()==0){return false;}this.bufferSet();var h=c(this.getParent()).closest("tr");var f=h.prev().length?h.prev():h.next();if(f.length){var g=f.children("td").first();if(g.length){g.prepend('<span id="selection-marker-1">'+this.opts.invisibleSpace+"</span>");}}h.remove();this.selectionRestore();this.sync();},tableDeleteColumn:function(){var g=c(this.getParent()).closest("table");if(!this.isParentRedactor(g)){return false;}if(g.size()==0){return false;}this.bufferSet();var e=c(this.getParent()).closest("td");var f=e.get(0).cellIndex;g.find("tr").each(c.proxy(function(h,j){var l=f-1<0?f+1:f-1;if(h===0){c(j).find("td").eq(l).prepend('<span id="selection-marker-1">'+this.opts.invisibleSpace+"</span>");}c(j).find("td").eq(f).remove();},this));this.selectionRestore();this.sync();},tableAddHead:function(){var e=c(this.getParent()).closest("table");if(!this.isParentRedactor(e)){return false;}if(e.size()==0){return false;}this.bufferSet();if(e.find("thead").size()!==0){this.tableDeleteHead();}else{var f=e.find("tr").first().clone();f.find("td").html(this.opts.invisibleSpace);$thead=c("<thead></thead>");$thead.append(f);e.prepend($thead);this.sync();}},tableDeleteHead:function(){var e=c(this.getParent()).closest("table");if(!this.isParentRedactor(e)){return false;}var f=e.find("thead");if(f.size()==0){return false;}this.bufferSet();f.remove();this.sync();},tableAddRowAbove:function(){this.tableAddRow("before");},tableAddRowBelow:function(){this.tableAddRow("after");},tableAddColumnLeft:function(){this.tableAddColumn("before");},tableAddColumnRight:function(){this.tableAddColumn("after");},tableAddRow:function(f){var e=c(this.getParent()).closest("table");if(!this.isParentRedactor(e)){return false;}if(e.size()==0){return false;}this.bufferSet();var g=c(this.getParent()).closest("tr");var h=g.clone();h.find("td").html(this.opts.invisibleSpace);if(f==="after"){g.after(h);}else{g.before(h);}this.sync();},tableAddColumn:function(h){var g=c(this.getParent()).closest("table");if(!this.isParentRedactor(g)){return false;}if(g.size()==0){return false;}this.bufferSet();var f=0;var j=c(this.getParent()).closest("tr");var e=c(this.getParent()).closest("td");j.find("td").each(c.proxy(function(l,m){if(c(m)[0]===e[0]){f=l;}},this));g.find("tr").each(c.proxy(function(l,n){var m=c(n).find("td").eq(f);var o=m.clone();o.html(this.opts.invisibleSpace);h==="after"?m.after(o):m.before(o);},this));this.sync();},videoShow:function(){this.selectionSave();this.modalInit(this.opts.curLang.video,this.opts.modal_video,600,c.proxy(function(){c("#redactor_insert_video_btn").click(c.proxy(this.videoInsert,this));setTimeout(function(){c("#redactor_insert_video_area").focus();},200);},this));},videoInsert:function(){var e=c("#redactor_insert_video_area").val();e=this.cleanStripTags(e);this.selectionRestore();var f=this.getBlock()||this.getCurrent();if(f){c(f).after(e);}else{this.insertHtmlAdvanced(e,false);}this.sync();this.modalClose();},linkShow:function(){this.selectionSave();var e=c.proxy(function(){this.insert_link_node=false;var g=this.getSelection();var f="",o="",j="";var h=this.getParent();var l=c(h).parent().get(0);if(l&&l.tagName==="A"){h=l;}if(h&&h.tagName==="A"){f=h.href;o=c(h).text();j=h.target;this.insert_link_node=h;}else{o=g.toString();}c(".redactor_link_text").val(o);var q=self.location.href.replace(/\/$/i,"");var n=f.replace(q,"");if(this.opts.linkProtocol===false){var p=new RegExp("^(http|ftp|https)://"+self.location.host,"i");n=n.replace(p,"");}var m=c("#redactor_tabs").find("a");if(this.opts.linkEmail===false){m.eq(1).remove();}if(this.opts.linkAnchor===false){m.eq(2).remove();}if(this.opts.linkEmail===false&&this.opts.linkAnchor===false){c("#redactor_tabs").remove();c("#redactor_link_url").val(n);}else{if(f.search("mailto:")===0){this.modalSetTab.call(this,2);c("#redactor_tab_selected").val(2);c("#redactor_link_mailto").val(f.replace("mailto:",""));}else{if(n.search(/^#/gi)===0){this.modalSetTab.call(this,3);c("#redactor_tab_selected").val(3);c("#redactor_link_anchor").val(n.replace(/^#/gi,""));}else{c("#redactor_link_url").val(n);}}}if(j==="_blank"){c("#redactor_link_blank").prop("checked",true);}c("#redactor_insert_link_btn").click(c.proxy(this.linkProcess,this));setTimeout(function(){c("#redactor_link_url").focus();},200);},this);this.modalInit(this.opts.curLang.link,this.opts.modal_link,460,e);},linkProcess:function(){var j=c("#redactor_tab_selected").val();var g="",n="",l="",m="";if(j==="1"){g=c("#redactor_link_url").val();n=c("#redactor_link_url_text").val();if(c("#redactor_link_blank").prop("checked")){l=' target="_blank"';m="_blank";}var h="((xn--)?[a-z0-9]+(-[a-z0-9]+)*.)+[a-z]{2,}";var f=new RegExp("^(http|ftp|https)://"+h,"i");var e=new RegExp("^"+h,"i");if(g.search(f)==-1&&g.search(e)==0&&this.opts.linkProtocol){g=this.opts.linkProtocol+g;}}else{if(j==="2"){g="mailto:"+c("#redactor_link_mailto").val();n=c("#redactor_link_mailto_text").val();}else{if(j==="3"){g="#"+c("#redactor_link_anchor").val();n=c("#redactor_link_anchor_text").val();}}}n=n.replace(/<|>/g,"");this.linkInsert('<a href="'+g+'"'+l+">"+n+"</a>",c.trim(n),g,m);},linkInsert:function(e,j,f,h){this.selectionRestore();if(j!==""){if(this.insert_link_node){this.bufferSet();c(this.insert_link_node).text(j).attr("href",f);if(h!==""){c(this.insert_link_node).attr("target",h);}else{c(this.insert_link_node).removeAttr("target");}this.sync();}else{var g=c(e).addClass("redactor-added-link");this.exec("inserthtml",this.outerHtml(g),false);this.$editor.find("a.redactor-added-link").removeAttr("style").removeClass("redactor-added-link").each(function(){if(this.className==""){c(this).removeAttr("class");}});this.sync();}}setTimeout(c.proxy(function(){if(this.opts.observeLinks){this.observeLinks();}},this),5);this.modalClose();},fileShow:function(){this.selectionSave();var e=c.proxy(function(){var f=this.getSelection();var g="";if(this.oldIE()){g=f.text;}else{g=f.toString();}c("#redactor_filename").val(g);if(!this.isMobile()){this.draguploadInit("#redactor_file",{url:this.opts.fileUpload,uploadFields:this.opts.uploadFields,success:c.proxy(this.fileCallback,this),error:c.proxy(function(j,h){this.callback("fileUploadError",h);},this),uploadParam:this.opts.fileUploadParam});}this.uploadInit("redactor_file",{auto:true,url:this.opts.fileUpload,success:c.proxy(this.fileCallback,this),error:c.proxy(function(j,h){this.callback("fileUploadError",h);},this)});},this);this.modalInit(this.opts.curLang.file,this.opts.modal_file,500,e);},fileCallback:function(f){this.selectionRestore();if(f!==false){var h=c("#redactor_filename").val();if(h===""){h=f.filename;}var g='<a href="'+f.filelink+'" id="filelink-marker">'+h+"</a>";if(this.browser("webkit")&&!!this.window.chrome){g=g+"&nbsp;";}this.execCommand("inserthtml",g,false);var e=c(this.$editor.find("a#filelink-marker"));if(e.size()!=0){e.removeAttr("id");}else{e=false;}this.sync();this.callback("fileUpload",e,f);}this.modalClose();},imageShow:function(){this.selectionSave();var e=c.proxy(function(){if(this.opts.imageGetJson){c.getJSON(this.opts.imageGetJson,c.proxy(function(m){var h={},l=0;c.each(m,c.proxy(function(o,p){if(typeof p.folder!=="undefined"){l++;h[p.folder]=l;}},this));var j=false;c.each(m,c.proxy(function(r,s){var q="";if(typeof s.title!=="undefined"){q=s.title;}var o=0;if(!c.isEmptyObject(h)&&typeof s.folder!=="undefined"){o=h[s.folder];if(j===false){j=".redactorfolder"+o;}}var p=c('<img src="'+s.thumb+'" class="redactorfolder redactorfolder'+o+'" rel="'+s.image+'" title="'+q+'" />');c("#redactor_image_box").append(p);c(p).click(c.proxy(this.imageThumbClick,this));},this));if(!c.isEmptyObject(h)){c(".redactorfolder").hide();c(j).show();var n=function(o){c(".redactorfolder").hide();c(".redactorfolder"+c(o.target).val()).show();};var g=c('<select id="redactor_image_box_select">');c.each(h,function(p,o){g.append(c('<option value="'+o+'">'+p+"</option>"));});c("#redactor_image_box").before(g);g.change(n);}},this));}else{c("#redactor_tabs").find("a").eq(1).remove();}if(this.opts.imageUpload||this.opts.s3){if(!this.isMobile()&&this.opts.s3===false){if(c("#redactor_file").length){this.draguploadInit("#redactor_file",{url:this.opts.imageUpload,uploadFields:this.opts.uploadFields,success:c.proxy(this.imageCallback,this),error:c.proxy(function(h,g){this.callback("imageUploadError",g);},this),uploadParam:this.opts.imageUploadParam});}}if(this.opts.s3===false){this.uploadInit("redactor_file",{auto:true,url:this.opts.imageUpload,success:c.proxy(this.imageCallback,this),error:c.proxy(function(h,g){this.callback("imageUploadError",g);},this)});}else{c("#redactor_file").on("change.redactor",c.proxy(this.s3handleFileSelect,this));}}else{c(".redactor_tab").hide();if(!this.opts.imageGetJson){c("#redactor_tabs").remove();c("#redactor_tab3").show();}else{var f=c("#redactor_tabs").find("a");f.eq(0).remove();f.eq(1).addClass("redactor_tabs_act");c("#redactor_tab2").show();}}c("#redactor_upload_btn").click(c.proxy(this.imageCallbackLink,this));if(!this.opts.imageUpload&&!this.opts.imageGetJson){setTimeout(function(){c("#redactor_file_link").focus();},200);}},this);this.modalInit(this.opts.curLang.image,this.opts.modal_image,610,e);},imageEdit:function(g){var e=g;var f=e.parent().parent();var h=c.proxy(function(){c("#redactor_file_alt").val(e.attr("alt"));c("#redactor_image_edit_src").attr("href",e.attr("src"));c("#redactor_form_image_align").val(e.css("float"));if(c(f).get(0).tagName==="A"){c("#redactor_file_link").val(c(f).attr("href"));if(c(f).attr("target")=="_blank"){c("#redactor_link_blank").prop("checked",true);}}c("#redactor_image_delete_btn").click(c.proxy(function(){this.imageRemove(e);},this));c("#redactorSaveBtn").click(c.proxy(function(){this.imageSave(e);},this));},this);this.modalInit(this.opts.curLang.edit,this.opts.modal_image_edit,380,h);},imageRemove:function(f){var e=c(f).parent();c(f).remove();if(e.length&&e[0].tagName==="P"){this.$editor.focus();this.selectionStart(e);}this.callback("imageDelete",f);this.modalClose();this.sync();},imageSave:function(h){var f=c(h);var g=f.parent();f.attr("alt",c("#redactor_file_alt").val());var n=c("#redactor_form_image_align").val();if(n==="left"){this.imageMargin="0 "+this.opts.imageFloatMargin+" "+this.opts.imageFloatMargin+" 0";f.css({"float":"left",margin:this.imageMargin});}else{if(n==="right"){this.imageMargin="0 0 "+this.opts.imageFloatMargin+" "+this.opts.imageFloatMargin+"";f.css({"float":"right",margin:this.imageMargin});}else{this.imageMargin="0px";var l=f.closest("#redactor-image-box");if(l.size()!=0){l.css({"float":"",margin:""});}f.css({"float":"",margin:""});}}var j=c.trim(c("#redactor_file_link").val());if(j!==""){var m=false;if(c("#redactor_link_blank").prop("checked")){m=true;}if(g.get(0).tagName!=="A"){var e=c('<a href="'+j+'">'+this.outerHtml(h)+"</a>");if(m){e.attr("target","_blank");}f.replaceWith(e);}else{g.attr("href",j);if(m){g.attr("target","_blank");}else{g.removeAttr("target");}}}else{if(g.get(0).tagName==="A"){g.replaceWith(this.outerHtml(h));}}this.modalClose();this.observeImages();this.sync();},imageResizeHide:function(g){if(g!==false&&c(g.target).parent().size()!=0&&c(g.target).parent()[0].id==="redactor-image-box"){return false;}var f=this.$editor.find("#redactor-image-box");if(f.size()==0){return false;}this.$editor.find("#redactor-image-editter, #redactor-image-resizer").remove();if(this.imageMargin!="0px"){f.find("img").css("margin",this.imageMargin);f.css("margin","");this.imageMargin="0px";}f.find("img").css("opacity","");f.replaceWith(function(){return c(this).contents();});c(document).off("click.redactor-image-resize-hide");this.$editor.off("click.redactor-image-resize-hide");this.$editor.off("keydown.redactor-image-delete");this.sync();},imageResize:function(f){var e=c(f);e.on("mousedown",c.proxy(function(){this.imageResizeHide(false);},this));e.on("dragstart",c.proxy(function(){this.$editor.on("drop.redactor-image-inside-drop",c.proxy(function(){setTimeout(c.proxy(function(){this.observeImages();this.$editor.off("drop.redactor-image-inside-drop");this.sync();},this),1);},this));},this));e.on("click",c.proxy(function(l){if(this.$editor.find("#redactor-image-box").size()!=0){return false;}var n=false,q,p,m=e.width()/e.height(),o=20,j=10;var g=this.imageResizeControls(e);var h=false;g.on("mousedown",function(r){h=true;r.preventDefault();m=e.width()/e.height();q=Math.round(r.pageX-e.eq(0).offset().left);p=Math.round(r.pageY-e.eq(0).offset().top);});c(this.document.body).on("mousemove",c.proxy(function(v){if(h){var s=Math.round(v.pageX-e.eq(0).offset().left)-q;var r=Math.round(v.pageY-e.eq(0).offset().top)-p;var u=e.height();var w=parseInt(u,10)+r;var t=Math.round(w*m);if(t>o){e.width(t);if(t<100){this.imageEditter.css({marginTop:"-7px",marginLeft:"-13px",fontSize:"9px",padding:"3px 5px"});}else{this.imageEditter.css({marginTop:"-11px",marginLeft:"-18px",fontSize:"11px",padding:"7px 10px"});}}q=Math.round(v.pageX-e.eq(0).offset().left);p=Math.round(v.pageY-e.eq(0).offset().top);this.sync();}},this)).on("mouseup",function(){h=false;});this.$editor.on("keydown.redactor-image-delete",c.proxy(function(s){var r=s.which;if(this.keyCode.BACKSPACE==r||this.keyCode.DELETE==r){this.bufferSet();this.imageResizeHide(false);this.imageRemove(e);}},this));c(document).on("click.redactor-image-resize-hide",c.proxy(this.imageResizeHide,this));this.$editor.on("click.redactor-image-resize-hide",c.proxy(this.imageResizeHide,this));},this));},imageResizeControls:function(f){var g=c('<span id="redactor-image-box" data-redactor="verified">');g.css({position:"relative",display:"inline-block",lineHeight:0,outline:"1px dashed rgba(0, 0, 0, .6)","float":f.css("float")});g.attr("contenteditable",false);this.imageMargin=f[0].style.margin;if(this.imageMargin!="0px"){g.css("margin",this.imageMargin);f.css("margin","");}f.css("opacity",0.5).after(g);this.imageEditter=c('<span id="redactor-image-editter" data-redactor="verified">'+this.opts.curLang.edit+"</span>");this.imageEditter.css({position:"absolute",zIndex:2,top:"50%",left:"50%",marginTop:"-11px",marginLeft:"-18px",lineHeight:1,backgroundColor:"#000",color:"#fff",fontSize:"11px",padding:"7px 10px",cursor:"pointer"});this.imageEditter.attr("contenteditable",false);this.imageEditter.on("click",c.proxy(function(){this.imageEdit(f);},this));g.append(this.imageEditter);var e=c('<span id="redactor-image-resizer" data-redactor="verified"></span>');e.css({position:"absolute",zIndex:2,lineHeight:1,cursor:"nw-resize",bottom:"-4px",right:"-5px",border:"1px solid #fff",backgroundColor:"#000",width:"8px",height:"8px"});e.attr("contenteditable",false);g.append(e);g.append(f);return e;},imageThumbClick:function(h){var f='<img id="image-marker" src="'+c(h.target).attr("rel")+'" alt="'+c(h.target).attr("title")+'" />';var g=this.getParent();if(this.opts.paragraphy&&c(g).closest("li").size()==0){f="<p>"+f+"</p>";}this.imageInsert(f,true);},imageCallbackLink:function(){var f=c("#redactor_file_link").val();if(f!==""){var e='<img id="image-marker" src="'+f+'" />';if(this.opts.linebreaks===false){e="<p>"+e+"</p>";}this.imageInsert(e,true);}else{this.modalClose();}},imageCallback:function(e){this.imageInsert(e);},imageInsert:function(f,h){this.selectionRestore();if(f!==false){var e="";if(h!==true){e='<img id="image-marker" src="'+f.filelink+'" />';var g=this.getParent();if(this.opts.paragraphy&&c(g).closest("li").size()==0){e="<p>"+e+"</p>";}}else{e=f;}this.execCommand("inserthtml",e,false);var j=c(this.$editor.find("img#image-marker"));if(j.length){j.removeAttr("id");}else{j=false;}this.sync();h!==true&&this.callback("imageUpload",j,f);}this.modalClose();this.observeImages();},modalTemplatesInit:function(){c.extend(this.opts,{modal_file:String()+'<section><div id="redactor-progress" class="redactor-progress redactor-progress-striped" style="display: none;"><div id="redactor-progress-bar" class="redactor-progress-bar" style="width: 100%;"></div></div><form id="redactorUploadFileForm" method="post" action="" enctype="multipart/form-data"><label>'+this.opts.curLang.filename+'</label><input type="text" id="redactor_filename" class="redactor_input" /><div style="margin-top: 7px;"><input type="file" id="redactor_file" name="'+this.opts.fileUploadParam+'" /></div></form></section>',modal_image_edit:String()+"<section><label>"+this.opts.curLang.title+'</label><input id="redactor_file_alt" class="redactor_input" /><label>'+this.opts.curLang.link+'</label><input id="redactor_file_link" class="redactor_input" /><label><input type="checkbox" id="redactor_link_blank"> '+this.opts.curLang.link_new_tab+"</label><label>"+this.opts.curLang.image_position+'</label><select id="redactor_form_image_align"><option value="none">'+this.opts.curLang.none+'</option><option value="left">'+this.opts.curLang.left+'</option><option value="right">'+this.opts.curLang.right+'</option></select></section><footer><button id="redactor_image_delete_btn" class="redactor_modal_btn redactor_modal_delete_btn">'+this.opts.curLang._delete+'</button>&nbsp;&nbsp;&nbsp;<button class="redactor_modal_btn redactor_btn_modal_close">'+this.opts.curLang.cancel+'</button><input type="button" name="save" class="redactor_modal_btn redactor_modal_action_btn" id="redactorSaveBtn" value="'+this.opts.curLang.save+'" /></footer>',modal_image:String()+'<section><div id="redactor_tabs"><a href="#" class="redactor_tabs_act">'+this.opts.curLang.upload+'</a><a href="#">'+this.opts.curLang.choose+'</a><a href="#">'+this.opts.curLang.link+'</a></div><div id="redactor-progress" class="redactor-progress redactor-progress-striped" style="display: none;"><div id="redactor-progress-bar" class="redactor-progress-bar" style="width: 100%;"></div></div><form id="redactorInsertImageForm" method="post" action="" enctype="multipart/form-data"><div id="redactor_tab1" class="redactor_tab"><input type="file" id="redactor_file" name="'+this.opts.imageUploadParam+'" /></div><div id="redactor_tab2" class="redactor_tab" style="display: none;"><div id="redactor_image_box"></div></div></form><div id="redactor_tab3" class="redactor_tab" style="display: none;"><label>'+this.opts.curLang.image_web_link+'</label><input type="text" name="redactor_file_link" id="redactor_file_link" class="redactor_input" /></div></section><footer><button class="redactor_modal_btn redactor_btn_modal_close">'+this.opts.curLang.cancel+'</button><input type="button" name="upload" class="redactor_modal_btn redactor_modal_action_btn" id="redactor_upload_btn" value="'+this.opts.curLang.insert+'" /></footer>',modal_link:String()+'<section><form id="redactorInsertLinkForm" method="post" action=""><div id="redactor_tabs"><a href="#" class="redactor_tabs_act">URL</a><a href="#">Email</a><a href="#">'+this.opts.curLang.anchor+'</a></div><input type="hidden" id="redactor_tab_selected" value="1" /><div class="redactor_tab" id="redactor_tab1"><label>URL</label><input type="text" id="redactor_link_url" class="redactor_input" /><label>'+this.opts.curLang.text+'</label><input type="text" class="redactor_input redactor_link_text" id="redactor_link_url_text" /><label><input type="checkbox" id="redactor_link_blank"> '+this.opts.curLang.link_new_tab+'</label></div><div class="redactor_tab" id="redactor_tab2" style="display: none;"><label>Email</label><input type="text" id="redactor_link_mailto" class="redactor_input" /><label>'+this.opts.curLang.text+'</label><input type="text" class="redactor_input redactor_link_text" id="redactor_link_mailto_text" /></div><div class="redactor_tab" id="redactor_tab3" style="display: none;"><label>'+this.opts.curLang.anchor+'</label><input type="text" class="redactor_input" id="redactor_link_anchor" /><label>'+this.opts.curLang.text+'</label><input type="text" class="redactor_input redactor_link_text" id="redactor_link_anchor_text" /></div></form></section><footer><button class="redactor_modal_btn redactor_btn_modal_close">'+this.opts.curLang.cancel+'</button><input type="button" class="redactor_modal_btn redactor_modal_action_btn" id="redactor_insert_link_btn" value="'+this.opts.curLang.insert+'" /></footer>',modal_table:String()+"<section><label>"+this.opts.curLang.rows+'</label><input type="text" size="5" value="2" id="redactor_table_rows" /><label>'+this.opts.curLang.columns+'</label><input type="text" size="5" value="3" id="redactor_table_columns" /></section><footer><button class="redactor_modal_btn redactor_btn_modal_close">'+this.opts.curLang.cancel+'</button><input type="button" name="upload" class="redactor_modal_btn redactor_modal_action_btn" id="redactor_insert_table_btn" value="'+this.opts.curLang.insert+'" /></footer>',modal_video:String()+'<section><form id="redactorInsertVideoForm"><label>'+this.opts.curLang.video_html_code+'</label><textarea id="redactor_insert_video_area" style="width: 99%; height: 160px;"></textarea></form></section><footer><button class="redactor_modal_btn redactor_btn_modal_close">'+this.opts.curLang.cancel+'</button><input type="button" class="redactor_modal_btn redactor_modal_action_btn" id="redactor_insert_video_btn" value="'+this.opts.curLang.insert+'" /></footer>'});},modalInit:function(m,h,f,n){var e=c("#redactor_modal_overlay");if(!e.length){this.$overlay=e=c('<div id="redactor_modal_overlay" style="display: none;"></div>');c("body").prepend(this.$overlay);}if(this.opts.modalOverlay){e.show().on("click",c.proxy(this.modalClose,this));}var j=c("#redactor_modal");if(!j.length){this.$modal=j=c('<div id="redactor_modal" style="display: none;"><div id="redactor_modal_close">&times;</div><header id="redactor_modal_header"></header><div id="redactor_modal_inner"></div></div>');c("body").append(this.$modal);}c("#redactor_modal_close").on("click",c.proxy(this.modalClose,this));this.hdlModalClose=c.proxy(function(o){if(o.keyCode===this.keyCode.ESC){this.modalClose();return false;}},this);c(document).keyup(this.hdlModalClose);this.$editor.keyup(this.hdlModalClose);this.modalcontent=false;if(h.indexOf("#")==0){this.modalcontent=c(h);c("#redactor_modal_inner").empty().append(this.modalcontent.html());this.modalcontent.html("");}else{c("#redactor_modal_inner").empty().append(h);}j.find("#redactor_modal_header").html(m);if(typeof c.fn.draggable!=="undefined"){j.draggable({handle:"#redactor_modal_header"});j.find("#redactor_modal_header").css("cursor","move");}var l=c("#redactor_tabs");if(l.length){var g=this;l.find("a").each(function(o,p){o++;c(p).on("click",function(r){r.preventDefault();l.find("a").removeClass("redactor_tabs_act");c(this).addClass("redactor_tabs_act");c(".redactor_tab").hide();c("#redactor_tab"+o).show();c("#redactor_tab_selected").val(o);if(g.isMobile()===false){var q=j.outerHeight();j.css("margin-top","-"+(q+10)/2+"px");}});});}j.find(".redactor_btn_modal_close").on("click",c.proxy(this.modalClose,this));if(this.opts.autoresize===true){this.saveModalScroll=this.document.body.scrollTop;}else{this.saveModalScroll=this.$editor.scrollTop();}if(this.isMobile()===false){j.css({position:"fixed",top:"-2000px",left:"50%",width:f+"px",marginLeft:"-"+(f+60)/2+"px"}).show();this.modalSaveBodyOveflow=c(document.body).css("overflow");c(document.body).css("overflow","hidden");}else{j.css({position:"fixed",width:"100%",height:"100%",top:"0",left:"0",margin:"0",minHeight:"300px"}).show();}if(typeof n==="function"){n();}if(this.isMobile()===false){setTimeout(function(){var o=j.outerHeight();j.css({top:"50%",height:"auto",minHeight:"auto",marginTop:"-"+(o+10)/2+"px"});},10);}},modalClose:function(){c("#redactor_modal_close").off("click",this.modalClose);c("#redactor_modal").fadeOut("fast",c.proxy(function(){var e=c("#redactor_modal_inner");if(this.modalcontent!==false){this.modalcontent.html(e.html());this.modalcontent=false;}e.html("");if(this.opts.modalOverlay){c("#redactor_modal_overlay").hide().off("click",this.modalClose);}c(document).unbind("keyup",this.hdlModalClose);this.$editor.unbind("keyup",this.hdlModalClose);this.selectionRestore();if(this.opts.autoresize&&this.saveModalScroll){c(this.document.body).scrollTop(this.saveModalScroll);}else{if(this.opts.autoresize===false&&this.saveModalScroll){this.$editor.scrollTop(this.saveModalScroll);}}},this));if(this.isMobile()===false){c(document.body).css("overflow",this.modalSaveBodyOveflow?this.modalSaveBodyOveflow:"visible");}return false;},modalSetTab:function(e){c(".redactor_tab").hide();c("#redactor_tabs").find("a").removeClass("redactor_tabs_act").eq(e-1).addClass("redactor_tabs_act");c("#redactor_tab"+e).show();},s3handleFileSelect:function(l){var h=l.target.files;for(var g=0,j;j=h[g];g++){this.s3uploadFile(j);}},s3uploadFile:function(e){this.s3executeOnSignedUrl(e,c.proxy(function(f){this.s3uploadToS3(e,f);},this));},s3executeOnSignedUrl:function(e,h){var f=new XMLHttpRequest();var g="?";if(this.opts.s3.search(/\?/)!="-1"){g="&";}f.open("GET",this.opts.s3+g+"name="+e.name+"&type="+e.type,true);if(f.overrideMimeType){f.overrideMimeType("text/plain; charset=x-user-defined");}f.onreadystatechange=function(j){if(this.readyState==4&&this.status==200){c("#redactor-progress").fadeIn();h(decodeURIComponent(this.responseText));}else{if(this.readyState==4&&this.status!=200){}}};f.send();},s3createCORSRequest:function(g,e){var f=new XMLHttpRequest();if("withCredentials" in f){f.open(g,e,true);}else{if(typeof XDomainRequest!="undefined"){f=new XDomainRequest();f.open(g,e);}else{f=null;}}return f;},s3uploadToS3:function(f,e){var g=this.s3createCORSRequest("PUT",e);if(!g){}else{g.onload=c.proxy(function(){if(g.status==200){c("#redactor-progress, #redactor-progress-drag").hide();var l=e.split("?");if(!l[0]){return false;}this.selectionRestore();var h="";h='<img id="image-marker" src="'+l[0]+'" />';if(this.opts.paragraphy){h="<p>"+h+"</p>";}this.execCommand("inserthtml",h,false);var j=c(this.$editor.find("img#image-marker"));if(j.length){j.removeAttr("id");}else{j=false;}this.sync();this.callback("imageUpload",j,false);this.modalClose();this.observeImages();}else{}},this);g.onerror=function(){};g.upload.onprogress=function(h){};g.setRequestHeader("Content-Type",f.type);g.setRequestHeader("x-amz-acl","public-read");g.send(f);}},uploadInit:function(g,e){this.uploadOptions={url:false,success:false,error:false,start:false,trigger:false,auto:false,input:false};c.extend(this.uploadOptions,e);var f=c("#"+g);if(f.length&&f[0].tagName==="INPUT"){this.uploadOptions.input=f;this.el=c(f[0].form);}else{this.el=f;}this.element_action=this.el.attr("action");if(this.uploadOptions.auto){c(this.uploadOptions.input).change(c.proxy(function(h){this.el.submit(function(j){return false;});this.uploadSubmit(h);},this));}else{if(this.uploadOptions.trigger){c("#"+this.uploadOptions.trigger).click(c.proxy(this.uploadSubmit,this));}}},uploadSubmit:function(f){c("#redactor-progress").fadeIn();this.uploadForm(this.element,this.uploadFrame());},uploadFrame:function(){this.id="f"+Math.floor(Math.random()*99999);var f=this.document.createElement("div");var e='<iframe style="display:none" id="'+this.id+'" name="'+this.id+'"></iframe>';f.innerHTML=e;c(f).appendTo("body");if(this.uploadOptions.start){this.uploadOptions.start();}c("#"+this.id).load(c.proxy(this.uploadLoaded,this));return this.id;},uploadForm:function(j,h){if(this.uploadOptions.input){var l="redactorUploadForm"+this.id,e="redactorUploadFile"+this.id;this.form=c('<form action="'+this.uploadOptions.url+'" method="POST" target="'+h+'" name="'+l+'" id="'+l+'" enctype="multipart/form-data" />');if(this.opts.uploadFields!==false&&typeof this.opts.uploadFields==="object"){c.each(this.opts.uploadFields,c.proxy(function(n,f){if(f!=null&&f.toString().indexOf("#")===0){f=c(f).val();}var o=c("<input/>",{type:"hidden",name:n,value:f});c(this.form).append(o);},this));}var g=this.uploadOptions.input;var m=c(g).clone();c(g).attr("id",e).before(m).appendTo(this.form);c(this.form).css("position","absolute").css("top","-2000px").css("left","-2000px").appendTo("body");this.form.submit();}else{j.attr("target",h).attr("method","POST").attr("enctype","multipart/form-data").attr("action",this.uploadOptions.url);this.element.submit();}},uploadLoaded:function(){var h=c("#"+this.id)[0],j;if(h.contentDocument){j=h.contentDocument;}else{if(h.contentWindow){j=h.contentWindow.document;}else{j=window.frames[this.id].document;}}if(this.uploadOptions.success){c("#redactor-progress").hide();if(typeof j!=="undefined"){var g=j.body.innerHTML;var f=g.match(/\{(.|\n)*\}/)[0];f=f.replace(/^\[/,"");f=f.replace(/\]$/,"");var e=c.parseJSON(f);if(typeof e.error=="undefined"){this.uploadOptions.success(e);}else{this.uploadOptions.error(this,e);this.modalClose();}}else{this.modalClose();alert("Upload failed!");}}this.el.attr("action",this.element_action);this.el.attr("target","");},draguploadInit:function(f,e){this.draguploadOptions=c.extend({url:false,success:false,error:false,preview:false,uploadFields:false,text:this.opts.curLang.drop_file_here,atext:this.opts.curLang.or_choose,uploadParam:false},e);if(window.FormData===undefined){return false;}this.droparea=c('<div class="redactor_droparea"></div>');this.dropareabox=c('<div class="redactor_dropareabox">'+this.draguploadOptions.text+"</div>");this.dropalternative=c('<div class="redactor_dropalternative">'+this.draguploadOptions.atext+"</div>");this.droparea.append(this.dropareabox);c(f).before(this.droparea);c(f).before(this.dropalternative);this.dropareabox.on("dragover",c.proxy(function(){return this.draguploadOndrag();},this));this.dropareabox.on("dragleave",c.proxy(function(){return this.draguploadOndragleave();},this));this.dropareabox.get(0).ondrop=c.proxy(function(g){g.preventDefault();this.dropareabox.removeClass("hover").addClass("drop");this.dragUploadAjax(this.draguploadOptions.url,g.dataTransfer.files[0],false,false,false,this.draguploadOptions.uploadParam);},this);},dragUploadAjax:function(h,l,f,g,n,m){if(!f){var o=c.ajaxSettings.xhr();if(o.upload){o.upload.addEventListener("progress",c.proxy(this.uploadProgress,this),false);}c.ajaxSetup({xhr:function(){return o;}});}var j=new FormData();if(m!==false){j.append(m,l);}else{j.append("file",l);}if(this.opts.uploadFields!==false&&typeof this.opts.uploadFields==="object"){c.each(this.opts.uploadFields,c.proxy(function(p,e){if(e!=null&&e.toString().indexOf("#")===0){e=c(e).val();}j.append(p,e);},this));}c.ajax({url:h,dataType:"html",data:j,cache:false,contentType:false,processData:false,type:"POST",success:c.proxy(function(q){q=q.replace(/^\[/,"");q=q.replace(/\]$/,"");var p=(typeof q==="string"?c.parseJSON(q):q);if(f){g.fadeOut("slow",function(){c(this).remove();});var e=c("<img>");e.attr("src",p.filelink).attr("id","drag-image-marker");this.insertNodeToCaretPositionFromPoint(n,e[0]);var r=c(this.$editor.find("img#drag-image-marker"));if(r.length){r.removeAttr("id");}else{r=false;}this.sync();this.observeImages();if(r){this.callback("imageUpload",r,p);}if(typeof p.error!=="undefined"){this.callback("imageUploadError",p);}}else{if(typeof p.error=="undefined"){this.draguploadOptions.success(p);}else{this.draguploadOptions.error(this,p);this.draguploadOptions.success(false);}}},this)});},draguploadOndrag:function(){this.dropareabox.addClass("hover");return false;},draguploadOndragleave:function(){this.dropareabox.removeClass("hover");return false;},uploadProgress:function(g,h){var f=g.loaded?parseInt(g.loaded/g.total*100,10):g;this.dropareabox.text("Loading "+f+"% "+(h||""));},isMobile:function(){return/(iPhone|iPod|BlackBerry|Android)/.test(navigator.userAgent);},normalize:function(e){if(typeof(e)==="undefined"){return 0;}return parseInt(e.replace("px",""),10);},outerHtml:function(e){return c("<div>").append(c(e).eq(0).clone()).html();},isString:function(e){return Object.prototype.toString.call(e)=="[object String]";},isEmpty:function(e){e=e.replace(/&#x200b;|<br>|<br\/>|&nbsp;/gi,"");e=e.replace(/\s/g,"");e=e.replace(/^<p>[^\W\w\D\d]*?<\/p>$/i,"");return e=="";},isIe11:function(){return !!navigator.userAgent.match(/Trident\/7\./);},browser:function(f){var g=navigator.userAgent.toLowerCase();var e=/(opr)[\/]([\w.]+)/.exec(g)||/(chrome)[ \/]([\w.]+)/.exec(g)||/(webkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(g)||/(webkit)[ \/]([\w.]+)/.exec(g)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(g)||/(msie) ([\w.]+)/.exec(g)||g.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(g)||g.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(g)||[];if(f=="version"){return e[2];}if(f=="webkit"){return(e[1]=="chrome"||e[1]=="webkit");}if(e[1]=="rv"){return f=="msie";}if(e[1]=="opr"){return f=="webkit";}return f==e[1];},oldIE:function(){if(this.browser("msie")&&parseInt(this.browser("version"),10)<9){return true;}return false;},getFragmentHtml:function(f){var e=f.cloneNode(true);var g=this.document.createElement("div");g.appendChild(e);return g.innerHTML;},extractContent:function(){var e=this.$editor[0];var g=this.document.createDocumentFragment();var f;while((f=e.firstChild)){g.appendChild(f);}return g;},isParentRedactor:function(e){if(!e){return false;}if(this.opts.iframe){return e;}if(c(e).parents("div.redactor_editor").length==0||c(e).hasClass("redactor_editor")){return false;}else{return e;}},currentOrParentIs:function(e){var f=this.getParent(),g=this.getCurrent();return f&&f.tagName===e?f:g&&g.tagName===e?g:false;},isEndOfElement:function(){var f=this.getBlock();var h=this.getCaretOffset(f);var g=c.trim(c(f).text()).replace(/\n\r\n/g,"");var e=g.length;if(h==e){return true;}else{return false;}},isFocused:function(){var e,f=this.getSelection();if(f&&f.rangeCount&&f.rangeCount>0){e=f.getRangeAt(0).startContainer;}if(!e){return false;}if(this.opts.iframe){if(this.getCaretOffsetRange().equals()){return !this.$editor.is(e);}else{return true;}}return c(e).closest("div.redactor_editor").length!=0;},removeEmptyAttr:function(f,e){if(c(f).attr(e)==""){c(f).removeAttr(e);}},removeFromArrayByValue:function(g,f){var e=null;while((e=g.indexOf(f))!==-1){g.splice(e,1);}return g;}};b.prototype.init.prototype=b.prototype;c.Redactor.fn.formatLinkify=function(x,u,m,r,j){var s=/(^|&lt;|\s)(www\..+?\..+?)(\s|&gt;|$)/g,q=/(^|&lt;|\s)(((https?|ftp):\/\/|mailto:).+?)(\s|&gt;|$)/g,e=/(https?:\/\/.*\.(?:png|jpg|jpeg|gif))/gi,w=/https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com\S*[^\w\-\s])([\w\-]{11})(?=[^\w\-]|$)(?![?=&+%\w.-]*(?:['"][^<>]*>|<\/a>))[?=&+%\w.-]*/ig,t=/https?:\/\/(www\.)?vimeo.com\/(\d+)($|\/)/;var v=(this.$editor?this.$editor.get(0):this).childNodes,l=v.length;while(l--){var h=v[l];if(h.nodeType===3){var p=h.nodeValue;if(r&&p){var o='<iframe width="500" height="281" src="',g='" frameborder="0" allowfullscreen></iframe>';if(p.match(w)){p=p.replace(w,o+"//www.youtube.com/embed/$1"+g);c(h).after(p).remove();}else{if(p.match(t)){p=p.replace(t,o+"//player.vimeo.com/video/$2"+g);c(h).after(p).remove();}}}if(m&&p&&p.match(e)){p=p.replace(e,'<img src="$1">');c(h).after(p).remove();}if(u&&p&&(p.match(s)||p.match(q))){var f=(p.match(s)||p.match(q));f=f[0];if(f.length>j){f=f.substring(0,j)+"...";}p=p.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(s,'$1<a href="'+x+'$2">'+c.trim(f)+"</a>$3").replace(q,'$1<a href="$2">'+c.trim(f)+"</a>$5");c(h).after(p).remove();}}else{if(h.nodeType===1&&!/^(a|button|textarea)$/i.test(h.tagName)){c.Redactor.fn.formatLinkify.call(h,x,u,m,r,j);}}}};})(jQuery);
@@ -69,7 +69,8 @@ hr {
69
69
  margin-bottom: 15px;
70
70
  }
71
71
  blockquote {
72
- margin-left: 3em;
72
+ margin-left: 1.5em !important;
73
+ padding-left: 0;
73
74
  color: #777;
74
75
  font-style: italic;
75
76
  }
@@ -199,4 +200,3 @@ body.redactor_editor_wym {
199
200
  .redactor_editor_wym ol li ul {
200
201
  border: none !important;
201
202
  }
202
-
@@ -17,7 +17,7 @@ body .redactor_box_fullscreen {
17
17
  position: fixed;
18
18
  top: 0;
19
19
  left: 0;
20
- z-index: 2000;
20
+ z-index: 1000000;
21
21
  overflow: hidden;
22
22
  width: 100%;
23
23
  }
@@ -105,7 +105,7 @@ body .redactor_box_fullscreen {
105
105
  .redactor_editor blockquote,
106
106
  .redactor_editor pre {
107
107
  font-size: 15px;
108
- line-height: 1.5em;
108
+ line-height: 1.5rem;
109
109
  }
110
110
 
111
111
  .redactor_editor,
@@ -164,7 +164,8 @@ body .redactor_box_fullscreen {
164
164
  margin-bottom: 15px !important;
165
165
  }
166
166
  .redactor_editor blockquote {
167
- margin-left: 3em !important;
167
+ margin-left: 1.5em !important;
168
+ padding-left: 0 !important;
168
169
  color: #777;
169
170
  font-style: italic !important;
170
171
  }
@@ -215,7 +216,6 @@ body .redactor_box_fullscreen {
215
216
  border: 0;
216
217
  border-top: 1px solid #ccc;
217
218
  }
218
-
219
219
  .redactor_editor h1,
220
220
  .redactor_editor h2,
221
221
  .redactor_editor h3,
@@ -704,37 +704,42 @@ body .redactor_toolbar li a.redactor_btn_pre { background-position: -875px;
704
704
  margin-left: 8px;
705
705
  padding: 6px 16px 5px 16px;
706
706
  outline: none;
707
- border: 1px solid #ccc;
708
- border-bottom-color: #aaa;
709
- border-radius: 4px;
710
- background-color: #f3f3f3;
711
- background-image: -moz-linear-gradient(top, #ffffff, #e1e1e1);
712
- background-image: -ms-linear-gradient(top, #ffffff, #e1e1e1);
713
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e1e1e1));
714
- background-image: -webkit-linear-gradient(top, #ffffff, #e1e1e1);
715
- background-image: -o-linear-gradient(top, #ffffff, #e1e1e1);
716
- background-image: linear-gradient(top, #ffffff, #e1e1e1);
717
- box-shadow: 0 1px 1px rgba(0, 0, 0, .1);
707
+ border: none;
708
+ border-radius: 3px;
709
+ background-color: #ddd;
718
710
  color: #000;
719
711
  text-align: center;
720
712
  text-decoration: none;
721
- text-shadow: 0 1px 0px #ffffff;
722
713
  font-weight: normal;
723
714
  font-size: 12px;
724
715
  font-family: Helvetica, Arial, Verdana, Tahoma, sans-serif;
725
716
  line-height: 1;
726
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e1e1e1', GradientType=0);
727
717
  cursor: pointer;
728
718
  }
729
719
  .redactor_modal_btn:hover {
730
- color: #555;
720
+ color: #777;
731
721
  background: none;
732
- background: #f3f3f3;
722
+ background: #bbb;
733
723
  text-decoration: none;
734
- text-shadow: 0 1px 0px rgba(255, 255, 255, 0.8);
735
- filter: none;
736
724
  }
737
-
725
+ .redactor_modal_delete_btn {
726
+ background: none;
727
+ color: #fff;
728
+ background-color: #b52525;
729
+ }
730
+ .redactor_modal_delete_btn:hover {
731
+ color: rgba(255, 255, 255, .6);
732
+ background-color: #881b1b;
733
+ }
734
+ .redactor_modal_action_btn {
735
+ background: none;
736
+ color: #fff;
737
+ background-color: #2461b5;
738
+ }
739
+ .redactor_modal_action_btn:hover {
740
+ color: rgba(255, 255, 255, .6);
741
+ background-color: #1a4580;
742
+ }
738
743
 
739
744
  /* Drag and Drop Area */
740
745
  .redactor_droparea {
@@ -820,4 +825,3 @@ body .redactor_toolbar li a.redactor_btn_pre { background-position: -875px;
820
825
  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA6lpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpFRTE5QjlCQTlDMkQxMUUwOUFFQ0M4MEYwM0YzNUE2RCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowNkRFQUIzNjlDMkUxMUUwOUFFQ0M4MEYwM0YzNUE2RCI+IDxkYzp0aXRsZT4gPHJkZjpBbHQ+IDxyZGY6bGkgeG1sOmxhbmc9IngtZGVmYXVsdCI+Z3JhZGllbnQ8L3JkZjpsaT4gPC9yZGY6QWx0PiA8L2RjOnRpdGxlPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpFRTE5QjlCODlDMkQxMUUwOUFFQ0M4MEYwM0YzNUE2RCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpFRTE5QjlCOTlDMkQxMUUwOUFFQ0M4MEYwM0YzNUE2RCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pq477Q0AAAD2SURBVHjaxFIxDsIwDLRF/1AmRp7AM9iYWHkD76AP6h9Qi1SGfqAMqGJg6XA4jts0RUwZiKLEsZ3L+Rwmoi0lDC6Ky4rAMuGO5DY5iuWH93oDegMuK8QA7JIYCMDpvwDDMBzNHCGtONYq2enjHKYLMObCp7dtu/+FDppDgyJpTemsrm/9l7L2ku4aUy4BTEmKR1hmVXV9OjfsqlqC7irAhBKxDnmOQdPc+ynKMXdenEELAFmzrnu8RoK6jpRhHkGJmFgdXmsByNf5Wx+fJPbigEI3OKrB77Bfy2VZzppqC0IfAtlIAusC9CNtUn/iIRXgnALwEWAA/+5+ZNOapmcAAAAASUVORK5CYII=');
821
826
  }
822
827
 
823
-
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redactor-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sammy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-09 00:00:00.000000000 Z
11
+ date: 2014-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mime-types
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: orm_adapter
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: devise
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description: The redactor-rails gem integrates the Redactor editor
@@ -59,7 +59,7 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
- - .gitignore
62
+ - ".gitignore"
63
63
  - Gemfile
64
64
  - MIT-LICENSE
65
65
  - README.md
@@ -155,17 +155,17 @@ require_paths:
155
155
  - lib
156
156
  required_ruby_version: !ruby/object:Gem::Requirement
157
157
  requirements:
158
- - - '>='
158
+ - - ">="
159
159
  - !ruby/object:Gem::Version
160
160
  version: '0'
161
161
  required_rubygems_version: !ruby/object:Gem::Requirement
162
162
  requirements:
163
- - - '>='
163
+ - - ">="
164
164
  - !ruby/object:Gem::Version
165
165
  version: '0'
166
166
  requirements: []
167
167
  rubyforge_project:
168
- rubygems_version: 2.0.6
168
+ rubygems_version: 2.2.2
169
169
  signing_key:
170
170
  specification_version: 4
171
171
  summary: ''