From 51dd629562a3b7538b9a1ed222a23d77b9a4e10b Mon Sep 17 00:00:00 2001 From: Aleksander Nowodzinski Date: Tue, 4 Aug 2015 16:58:12 +0200 Subject: [PATCH 1/5] Added CKEditor 4.5.2 standard-all. --- CHANGES.md | 37 + ckeditor.js | 1756 +++++++++-------- lang/fo.js | 2 +- lang/sv.js | 2 +- plugins/a11yhelp/dialogs/lang/da.js | 14 +- plugins/a11yhelp/dialogs/lang/ko.js | 9 +- plugins/a11yhelp/dialogs/lang/pt-br.js | 7 +- plugins/a11yhelp/dialogs/lang/tr.js | 13 +- plugins/a11yhelp/dialogs/lang/zh-cn.js | 10 +- plugins/autoembed/lang/cs.js | 1 + plugins/autoembed/lang/en.js | 1 + plugins/autoembed/lang/it.js | 1 + plugins/autoembed/lang/nb.js | 1 + plugins/autoembed/lang/pl.js | 1 + plugins/autoembed/lang/zh.js | 1 + plugins/autoembed/plugin.js | 8 +- plugins/autolink/plugin.js | 2 +- plugins/clipboard/dialogs/paste.js | 8 +- plugins/codesnippet/lang/ko.js | 2 +- plugins/codesnippet/plugin.js | 10 +- plugins/devtools/lang/sv.js | 2 +- plugins/devtools/plugin.js | 2 +- plugins/embedbase/lang/da.js | 1 + plugins/embedbase/lang/eo.js | 1 + plugins/embedbase/lang/pt-br.js | 1 + plugins/embedbase/lang/ru.js | 2 +- plugins/embedbase/lang/sv.js | 1 + plugins/embedbase/plugin.js | 14 +- plugins/filetools/lang/da.js | 2 +- plugins/filetools/lang/eo.js | 5 + plugins/filetools/lang/pt-br.js | 5 + plugins/filetools/lang/ru.js | 2 +- plugins/filetools/lang/sv.js | 5 + plugins/filetools/plugin.js | 15 +- plugins/find/lang/hu.js | 2 +- plugins/flash/lang/ja.js | 2 +- plugins/forms/lang/da.js | 6 +- plugins/forms/lang/eo.js | 6 +- plugins/forms/lang/pt-br.js | 6 +- plugins/forms/lang/ru.js | 6 +- plugins/language/plugin.js | 2 +- plugins/mathjax/lang/sv.js | 2 +- plugins/mathjax/plugin.js | 2 +- plugins/notification/lang/da.js | 1 + plugins/notification/lang/eo.js | 1 + plugins/notification/lang/pt-br.js | 1 + plugins/notification/plugin.js | 5 +- plugins/notificationaggregator/plugin.js | 8 +- plugins/pastefromword/filter/default.js | 42 +- plugins/placeholder/lang/sv.js | 2 +- plugins/uploadwidget/lang/eo.js | 5 + plugins/uploadwidget/lang/hu.js | 5 + plugins/uploadwidget/lang/pt-br.js | 5 + plugins/uploadwidget/plugin.js | 12 +- plugins/widget/plugin.js | 62 +- plugins/wsc/dialogs/wsc.js | 129 +- samples/css/samples.css | 10 +- .../js/abstracttoolbarmodifier.js | 28 +- .../js/fulltoolbareditor.js | 4 +- .../toolbarconfigurator/js/toolbarmodifier.js | 2 +- 60 files changed, 1193 insertions(+), 1107 deletions(-) create mode 100644 plugins/autoembed/lang/cs.js create mode 100644 plugins/autoembed/lang/en.js create mode 100644 plugins/autoembed/lang/it.js create mode 100644 plugins/autoembed/lang/nb.js create mode 100644 plugins/autoembed/lang/pl.js create mode 100644 plugins/autoembed/lang/zh.js create mode 100644 plugins/embedbase/lang/da.js create mode 100644 plugins/embedbase/lang/eo.js create mode 100644 plugins/embedbase/lang/pt-br.js create mode 100644 plugins/embedbase/lang/sv.js create mode 100644 plugins/filetools/lang/eo.js create mode 100644 plugins/filetools/lang/pt-br.js create mode 100644 plugins/filetools/lang/sv.js create mode 100644 plugins/notification/lang/da.js create mode 100644 plugins/notification/lang/eo.js create mode 100644 plugins/notification/lang/pt-br.js create mode 100644 plugins/uploadwidget/lang/eo.js create mode 100644 plugins/uploadwidget/lang/hu.js create mode 100644 plugins/uploadwidget/lang/pt-br.js diff --git a/CHANGES.md b/CHANGES.md index 0b079eee4f..6627e1219b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,43 @@ CKEditor 4 Changelog ==================== +## CKEditor 4.5.2 + +Fixed Issues: + +* [#13609](http://dev.ckeditor.com/ticket/13609): [Edge] Fixed: The browser crashes when switching to the source mode. Thanks to [Andrew Williams and Mark Smeed](http://webxsolution.com/)! +* [PR#201](https://github.com/ckeditor/ckeditor-dev/pull/201): Fixed: Buttons in the toolbar configurator cause form submission. Thanks to [colemanw](https://github.com/colemanw)! +* [#13422](http://dev.ckeditor.com/ticket/13422): Fixed: A monospaced font should be used in the `");return""+encodeURIComponent(a)+""})}function l(a){return a.replace(H,function(a,b){return decodeURIComponent(b)})}function o(a){return a.replace(/<\!--(?!{cke_protected})[\s\S]+?--\>/g,function(a){return"<\!--"+ -p+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\>"})}function s(a){return a.replace(/<\!--\{cke_protected\}\{C\}([\s\S]+?)--\>/g,function(a,b){return decodeURIComponent(b)})}function m(a,b){var d=b._.dataStore;return a.replace(/<\!--\{cke_protected\}([\s\S]+?)--\>/g,function(a,b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return d&&d[b]||""})}function n(a,b){for(var d=[],c=b.config.protectedSource,e=b._.dataStore||(b._.dataStore={id:1}),g=/<\!--\{cke_temp(comment)?\}(\d*?)--\>/g, -c=[/|$)/gi,//gi,//gi].concat(c),a=a.replace(/<\!--[\s\S]*?--\>/g,function(a){return"<\!--{cke_tempcomment}"+(d.push(a)-1)+"--\>"}),h=0;h"});a=a.replace(g,function(a,b,c){return"<\!--"+p+(b?"{C}":"")+encodeURIComponent(d[c]).replace(/--/g,"%2D%2D")+"--\>"});a=a.replace(/<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g, -function(a){return a.replace(/<\!--\{cke_protected\}([^>]*)--\>/g,function(a,b){e[e.id]=decodeURIComponent(b);return"{cke_protected_"+e.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,d,c,e){return"<"+d+c+">"+m(s(e),b)+""})}CKEDITOR.htmlDataProcessor=function(b){var c,e,g=this;this.editor=b;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter=e=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(x); -c.addRules(w,{applyToAll:true});c.addRules(a(b,"data"),{applyToAll:true});e.addRules(q);e.addRules(z,{applyToAll:true});e.addRules(a(b,"html"),{applyToAll:true});b.on("toHtml",function(a){var a=a.data,c=a.dataValue,e,c=n(c,b),c=h(c,A),c=d(c),c=h(c,E),c=c.replace(B,"$1cke:$2"),c=c.replace(K,""),c=c.replace(/(]*>)(\r\n|\n)/g,"$1$2$2"),c=c.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");e=a.context||b.editable().getName();var g;if(CKEDITOR.env.ie&& -CKEDITOR.env.version<9&&e=="pre"){e="div";c="
"+c+"
";g=1}e=b.document.createElement(e);e.setHtml("a"+c);c=e.getHtml().substr(1);c=c.replace(RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");g&&(c=c.replace(/^
|<\/pre>$/gi,""));c=c.replace(G,"$1$2");c=l(c);c=s(c);e=a.fixForBody===false?false:f(a.enterMode,b.config.autoParagraph);c=CKEDITOR.htmlParser.fragment.fromHtml(c,a.context,e);if(e){g=c;if(!g.children.length&&CKEDITOR.dtd[g.name][e]){e=new CKEDITOR.htmlParser.element(e);g.add(e)}}a.dataValue=
-c},null,null,5);b.on("toHtml",function(a){a.data.filter.applyTo(a.data.dataValue,true,a.data.dontFilter,a.data.enterMode)&&b.fire("dataFiltered")},null,null,6);b.on("toHtml",function(a){a.data.dataValue.filterChildren(g.dataFilter,true)},null,null,10);b.on("toHtml",function(a){var a=a.data,b=a.dataValue,d=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(d);b=d.getHtml(true);a.dataValue=o(b)},null,null,15);b.on("toDataFormat",function(a){var d=a.data.dataValue;a.data.enterMode!=CKEDITOR.ENTER_BR&&
-(d=d.replace(/^
/i,""));a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(d,a.data.context,f(a.data.enterMode,b.config.autoParagraph))},null,null,5);b.on("toDataFormat",function(a){a.data.dataValue.filterChildren(g.htmlFilter,true)},null,null,10);b.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue,false,true)},null,null,11);b.on("toDataFormat",function(a){var d=a.data.dataValue,c=g.writer;c.reset();d.writeChildrenHtml(c);d=c.getHtml(true);d=s(d);d=m(d,b);a.data.dataValue= -d},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,d,c){var e=this.editor,g,h,i,f;if(b&&typeof b=="object"){g=b.context;d=b.fixForBody;c=b.dontFilter;h=b.filter;i=b.enterMode;f=b.protectedWhitespaces}else g=b;!g&&g!==null&&(g=e.editable().getName());return e.fire("toHtml",{dataValue:a,context:g,fixForBody:d,dontFilter:c,filter:h||e.filter,enterMode:i||e.enterMode,protectedWhitespaces:f}).dataValue},toDataFormat:function(a,b){var d,c,e;if(b){d=b.context;c=b.filter;e=b.enterMode}!d&& -d!==null&&(d=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:c||this.editor.filter,context:d,enterMode:e||this.editor.enterMode}).dataValue}};var r=/(?: |\xa0)$/,p="{cke_protected}",t=CKEDITOR.dtd,v=["caption","colgroup","col","thead","tfoot","tbody"],u=CKEDITOR.tools.extend({},t.$blockLimit,t.$block),x={elements:{input:e,textarea:e}},w={attributeNames:[[/^on/,"data-cke-pa-on"],[/^data-cke-expando$/,""]]},q={elements:{embed:function(a){var b=a.parent; -if(b&&b.name=="object"){var d=b.attributes.width,b=b.attributes.height;if(d)a.attributes.width=d;if(b)a.attributes.height=b}},a:function(a){if(!a.children.length&&!a.attributes.name&&!a.attributes["data-cke-saved-name"])return false}}},z={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var b=a.attributes;if(b){if(b["data-cke-temp"])return false;for(var d=["name","href","src"],c,e=0;e-1&&c>-1&&d!=c)){d=a.parent?a.getIndex():-1;c=b.parent?b.getIndex():-1}return d>c?1:-1})},param:function(a){a.children=[];a.isEmpty=true;return a},span:function(a){a.attributes["class"]=="Apple-style-span"&&delete a.name},html:function(a){delete a.attributes.contenteditable; +c)===false&&b--}},writeHtml:function(a,b){b&&this.filter(b);this.writeChildrenHtml(a)},writeChildrenHtml:function(a,b,c){var d=this.getFilterContext();if(c&&!this.parent&&b)b.onRoot(d,this);b&&this.filterChildren(b,false,d);b=0;c=this.children;for(d=c.length;b=0&&a +7||e.name in CKEDITOR.dtd.tr||e.name in CKEDITOR.dtd.$listItem))h=false;else{h=b(e);h=!h||e.name=="form"&&h.name=="input"}h&&e.add(g(a))}}}function f(a,b){if((!u||CKEDITOR.env.needsBrFiller)&&a.type==CKEDITOR.NODE_ELEMENT&&a.name=="br"&&!a.attributes["data-cke-eol"])return true;var c;if(a.type==CKEDITOR.NODE_TEXT&&(c=a.value.match(o))){if(c.index){(new CKEDITOR.htmlParser.text(a.value.substring(0,c.index))).insertBefore(a);a.value=c[0]}if(!CKEDITOR.env.needsBrFiller&&u&&(!b||a.parent.name in D))return true; +if(!u)if((c=a.previous)&&c.name=="br"||!c||i(c))return true}return false}var j={elements:{}},u=c=="html",D=CKEDITOR.tools.extend({},v),l;for(l in D)"#"in t[l]||delete D[l];for(l in D)j.elements[l]=h(u,a.config.fillEmptyBlocks);j.root=h(u,false);j.elements.br=function(a){return function(b){if(b.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var c=b.attributes;if("data-cke-bogus"in c||"data-cke-eol"in c)delete c["data-cke-bogus"];else{for(c=b.next;c&&e(c);)c=c.next;var h=d(b);!c&&i(b.parent)?k(b.parent, +g(a)):i(c)&&(h&&!i(h))&&g(a).insertBefore(c)}}}}(u);return j}function f(a,b){return a!=CKEDITOR.ENTER_BR&&b!==false?a==CKEDITOR.ENTER_DIV?"div":"p":false}function b(a){for(a=a.children[a.children.length-1];a&&e(a);)a=a.previous;return a}function d(a){for(a=a.previous;a&&e(a);)a=a.previous;return a}function e(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&&a.attributes["data-cke-bookmark"]}function i(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in +v||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function k(a,b){var c=a.children[a.children.length-1];a.children.push(b);b.parent=a;if(c){c.next=b;b.previous=c}}function c(a){a=a.attributes;a.contenteditable!="false"&&(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function j(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}}function h(a){return a.replace(y,function(a,b,c){return"<"+b+c.replace(C, +function(a,b){return B.test(b)&&c.indexOf("data-cke-saved-"+b)==-1?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+">"})}function g(a,b){return a.replace(b,function(a,b,c){a.indexOf("/g,">")+"");return""+encodeURIComponent(a)+""})}function l(a){return a.replace(H,function(a,b){return decodeURIComponent(b)})}function s(a){return a.replace(/<\!--(?!{cke_protected})[\s\S]+?--\>/g,function(a){return"<\!--"+ +r+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\>"})}function n(a){return a.replace(/<\!--\{cke_protected\}\{C\}([\s\S]+?)--\>/g,function(a,b){return decodeURIComponent(b)})}function m(a,b){var c=b._.dataStore;return a.replace(/<\!--\{cke_protected\}([\s\S]+?)--\>/g,function(a,b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return c&&c[b]||""})}function q(a,b){for(var c=[],d=b.config.protectedSource,e=b._.dataStore||(b._.dataStore={id:1}),g=/<\!--\{cke_temp(comment)?\}(\d*?)--\>/g, +d=[/|$)/gi,//gi,//gi].concat(d),a=a.replace(/<\!--[\s\S]*?--\>/g,function(a){return"<\!--{cke_tempcomment}"+(c.push(a)-1)+"--\>"}),h=0;h"});a=a.replace(g,function(a,b,d){return"<\!--"+r+(b?"{C}":"")+encodeURIComponent(c[d]).replace(/--/g,"%2D%2D")+"--\>"});a=a.replace(/<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g, +function(a){return a.replace(/<\!--\{cke_protected\}([^>]*)--\>/g,function(a,b){e[e.id]=decodeURIComponent(b);return"{cke_protected_"+e.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,c,d,e){return"<"+c+d+">"+m(n(e),b)+""})}CKEDITOR.htmlDataProcessor=function(b){var c,d,e=this;this.editor=b;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter=d=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(w); +c.addRules(u,{applyToAll:true});c.addRules(a(b,"data"),{applyToAll:true});d.addRules(p);d.addRules(z,{applyToAll:true});d.addRules(a(b,"html"),{applyToAll:true});b.on("toHtml",function(a){var a=a.data,c=a.dataValue,d,c=q(c,b),c=g(c,A),c=h(c),c=g(c,E),c=c.replace(D,"$1cke:$2"),c=c.replace(K,""),c=c.replace(/(]*>)(\r\n|\n)/g,"$1$2$2"),c=c.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");d=a.context||b.editable().getName();var e;if(CKEDITOR.env.ie&& +CKEDITOR.env.version<9&&d=="pre"){d="div";c="
"+c+"
";e=1}d=b.document.createElement(d);d.setHtml("a"+c);c=d.getHtml().substr(1);c=c.replace(RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");e&&(c=c.replace(/^
|<\/pre>$/gi,""));c=c.replace(F,"$1$2");c=l(c);c=n(c);d=a.fixForBody===false?false:f(a.enterMode,b.config.autoParagraph);c=CKEDITOR.htmlParser.fragment.fromHtml(c,a.context,d);if(d){e=c;if(!e.children.length&&CKEDITOR.dtd[e.name][d]){d=new CKEDITOR.htmlParser.element(d);e.add(d)}}a.dataValue=
+c},null,null,5);b.on("toHtml",function(a){a.data.filter.applyTo(a.data.dataValue,true,a.data.dontFilter,a.data.enterMode)&&b.fire("dataFiltered")},null,null,6);b.on("toHtml",function(a){a.data.dataValue.filterChildren(e.dataFilter,true)},null,null,10);b.on("toHtml",function(a){var a=a.data,b=a.dataValue,c=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(c);b=c.getHtml(true);a.dataValue=s(b)},null,null,15);b.on("toDataFormat",function(a){var c=a.data.dataValue;a.data.enterMode!=CKEDITOR.ENTER_BR&&
+(c=c.replace(/^
/i,""));a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,a.data.context,f(a.data.enterMode,b.config.autoParagraph))},null,null,5);b.on("toDataFormat",function(a){a.data.dataValue.filterChildren(e.htmlFilter,true)},null,null,10);b.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue,false,true)},null,null,11);b.on("toDataFormat",function(a){var c=a.data.dataValue,d=e.writer;d.reset();c.writeChildrenHtml(d);c=d.getHtml(true);c=n(c);c=m(c,b);a.data.dataValue= +c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,c,d){var e=this.editor,g,h,i,f;if(b&&typeof b=="object"){g=b.context;c=b.fixForBody;d=b.dontFilter;h=b.filter;i=b.enterMode;f=b.protectedWhitespaces}else g=b;!g&&g!==null&&(g=e.editable().getName());return e.fire("toHtml",{dataValue:a,context:g,fixForBody:c,dontFilter:d,filter:h||e.filter,enterMode:i||e.enterMode,protectedWhitespaces:f}).dataValue},toDataFormat:function(a,b){var c,d,e;if(b){c=b.context;d=b.filter;e=b.enterMode}!c&& +c!==null&&(c=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:d||this.editor.filter,context:c,enterMode:e||this.editor.enterMode}).dataValue}};var o=/(?: |\xa0)$/,r="{cke_protected}",t=CKEDITOR.dtd,x=["caption","colgroup","col","thead","tfoot","tbody"],v=CKEDITOR.tools.extend({},t.$blockLimit,t.$block),w={elements:{input:c,textarea:c}},u={attributeNames:[[/^on/,"data-cke-pa-on"],[/^data-cke-expando$/,""]]},p={elements:{embed:function(a){var b=a.parent; +if(b&&b.name=="object"){var c=b.attributes.width,b=b.attributes.height;if(c)a.attributes.width=c;if(b)a.attributes.height=b}},a:function(a){if(!a.children.length&&!a.attributes.name&&!a.attributes["data-cke-saved-name"])return false}}},z={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var b=a.attributes;if(b){if(b["data-cke-temp"])return false;for(var c=["name","href","src"],d,e=0;e-1&&d>-1&&c!=d)){c=a.parent?a.getIndex():-1;d=b.parent?b.getIndex():-1}return c>d?1:-1})},param:function(a){a.children=[];a.isEmpty=true;return a},span:function(a){a.attributes["class"]=="Apple-style-span"&&delete a.name},html:function(a){delete a.attributes.contenteditable; delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck;delete a.attributes.contenteditable},style:function(a){var b=a.children[0];if(b&&b.value)b.value=CKEDITOR.tools.trim(b.value);if(!a.attributes.type)a.attributes.type="text/css"},title:function(a){var b=a.children[0];!b&&k(a,b=new CKEDITOR.htmlParser.text);b.value=a.attributes["data-cke-title"]||""},input:j,textarea:j},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||false}}}; -if(CKEDITOR.env.ie)z.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})};var y=/<(a|area|img|input|source)\b([^>]*)>/gi,D=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,C=/^(href|src|name)$/i,E=/(?:])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,A=/(])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,H=/([^<]*)<\/cke:encoded>/gi,B=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,G=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi, -K=/]*?)\/?>(?!\s*<\/cke:\1)/gi}(),"use strict",CKEDITOR.htmlParser.element=function(a,f){this.name=a;this.attributes=f||{};this.children=[];var b=a||"",c=b.match(/^cke:(.*)/);c&&(b=c[1]);b=!(!CKEDITOR.dtd.$nonBodyContent[b]&&!CKEDITOR.dtd.$block[b]&&!CKEDITOR.dtd.$listItem[b]&&!CKEDITOR.dtd.$tableContent[b]&&!(CKEDITOR.dtd.$nonEditable[b]||b=="br"));this.isEmpty=!!CKEDITOR.dtd.$empty[a];this.isUnknown=!CKEDITOR.dtd[a];this._={isBlockLike:b,hasInlineStarted:this.isEmpty||!b}}, -CKEDITOR.htmlParser.cssStyle=function(a){var f={};((a instanceof CKEDITOR.htmlParser.element?a.attributes.style:a)||"").replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,c,g){c=="font-family"&&(g=g.replace(/["']/g,""));f[c.toLowerCase()]=g});return{rules:f,populate:function(a){var c=this.toString();if(c)a instanceof CKEDITOR.dom.element?a.setAttribute("style",c):a instanceof CKEDITOR.htmlParser.element?a.attributes.style=c:a.style=c},toString:function(){var a=[],c; -for(c in f)f[c]&&a.push(c,":",f[c],";");return a.join("")}}},function(){function a(a){return function(b){return b.type==CKEDITOR.NODE_ELEMENT&&(typeof a=="string"?b.name==a:b.name in a)}}var f=function(a,b){a=a[0];b=b[0];return ab?1:0},b=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:b.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a, -b){var i=this,f,e,b=i.getFilterContext(b);if(b.off)return true;if(!i.parent)a.onRoot(b,i);for(;;){f=i.name;if(!(e=a.onElementName(b,f))){this.remove();return false}i.name=e;if(!(i=a.onElement(b,i))){this.remove();return false}if(i!==this){this.replaceWith(i);return false}if(i.name==f)break;if(i.type!=CKEDITOR.NODE_ELEMENT){this.replaceWith(i);return false}if(!i.name){this.replaceWithChildren();return false}}f=i.attributes;var j,d;for(j in f){d=j;for(e=f[j];;)if(d=a.onAttributeName(b,j))if(d!=j){delete f[j]; -j=d}else break;else{delete f[j];break}d&&((e=a.onAttribute(b,i,d,e))===false?delete f[d]:f[d]=e)}i.isEmpty||this.filterChildren(a,false,b);return true},filterChildren:b.filterChildren,writeHtml:function(a,b){b&&this.filter(b);var i=this.name,k=[],e=this.attributes,j,d;a.openTag(i,e);for(j in e)k.push([j,e[j]]);a.sortAttributes&&k.sort(f);j=0;for(d=k.length;j]*)>/gi,C=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,B=/^(href|src|name)$/i,E=/(?:])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,A=/(])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,H=/([^<]*)<\/cke:encoded>/gi,D=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,F=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi, +K=/]*?)\/?>(?!\s*<\/cke:\1)/gi}(),"use strict",CKEDITOR.htmlParser.element=function(a,f){this.name=a;this.attributes=f||{};this.children=[];var b=a||"",d=b.match(/^cke:(.*)/);d&&(b=d[1]);b=!(!CKEDITOR.dtd.$nonBodyContent[b]&&!CKEDITOR.dtd.$block[b]&&!CKEDITOR.dtd.$listItem[b]&&!CKEDITOR.dtd.$tableContent[b]&&!(CKEDITOR.dtd.$nonEditable[b]||b=="br"));this.isEmpty=!!CKEDITOR.dtd.$empty[a];this.isUnknown=!CKEDITOR.dtd[a];this._={isBlockLike:b,hasInlineStarted:this.isEmpty||!b}}, +CKEDITOR.htmlParser.cssStyle=function(a){var f={};((a instanceof CKEDITOR.htmlParser.element?a.attributes.style:a)||"").replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,d,e){d=="font-family"&&(e=e.replace(/["']/g,""));f[d.toLowerCase()]=e});return{rules:f,populate:function(a){var d=this.toString();if(d)a instanceof CKEDITOR.dom.element?a.setAttribute("style",d):a instanceof CKEDITOR.htmlParser.element?a.attributes.style=d:a.style=d},toString:function(){var a=[],d; +for(d in f)f[d]&&a.push(d,":",f[d],";");return a.join("")}}},function(){function a(a){return function(b){return b.type==CKEDITOR.NODE_ELEMENT&&(typeof a=="string"?b.name==a:b.name in a)}}var f=function(a,b){a=a[0];b=b[0];return ab?1:0},b=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:b.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a, +b){var f=this,k,c,b=f.getFilterContext(b);if(b.off)return true;if(!f.parent)a.onRoot(b,f);for(;;){k=f.name;if(!(c=a.onElementName(b,k))){this.remove();return false}f.name=c;if(!(f=a.onElement(b,f))){this.remove();return false}if(f!==this){this.replaceWith(f);return false}if(f.name==k)break;if(f.type!=CKEDITOR.NODE_ELEMENT){this.replaceWith(f);return false}if(!f.name){this.replaceWithChildren();return false}}k=f.attributes;var j,h;for(j in k){h=j;for(c=k[j];;)if(h=a.onAttributeName(b,j))if(h!=j){delete k[j]; +j=h}else break;else{delete k[j];break}h&&((c=a.onAttribute(b,f,h,c))===false?delete k[h]:k[h]=c)}f.isEmpty||this.filterChildren(a,false,b);return true},filterChildren:b.filterChildren,writeHtml:function(a,b){b&&this.filter(b);var i=this.name,k=[],c=this.attributes,j,h;a.openTag(i,c);for(j in c)k.push([j,c[j]]);a.sortAttributes&&k.sort(f);j=0;for(h=k.length;j0)this.children[a-1].next=null;this.parent.add(f,this.getIndex()+1);return f},addClass:function(a){if(!this.hasClass(a)){var b=this.attributes["class"]||"";this.attributes["class"]=b+(b?" ": "")+a}},removeClass:function(a){var b=this.attributes["class"];if(b)(b=CKEDITOR.tools.trim(b.replace(RegExp("(?:\\s+|^)"+a+"(?:\\s+|$)")," ")))?this.attributes["class"]=b:delete this.attributes["class"]},hasClass:function(a){var b=this.attributes["class"];return!b?false:RegExp("(?:^|\\s)"+a+"(?=\\s|$)").test(b)},getFilterContext:function(a){var b=[];a||(a={off:false,nonEditable:false,nestedEditable:false});!a.off&&this.attributes["data-cke-processor"]=="off"&&b.push("off",true);!a.nonEditable&&this.attributes.contenteditable== -"false"?b.push("nonEditable",true):a.nonEditable&&(!a.nestedEditable&&this.attributes.contenteditable=="true")&&b.push("nestedEditable",true);if(b.length)for(var a=CKEDITOR.tools.copy(a),f=0;f'+c.getValue()+"",CKEDITOR.document);a.insertAfter(c);c.hide();c.$.form&&b._attachToForm()}else b.setData(a.getHtml(),null,true);b.on("loaded",function(){b.fire("uiReady");b.editable(a);b.container=a;b.ui.contentsElement=a;b.setData(b.getData(1));b.resetDirty();b.fire("contentDom");b.mode="wysiwyg";b.fire("mode");b.status="ready";b.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,b)},null,null,1E4);b.on("destroy",function(){if(c){b.container.clearCustomData(); -b.container.remove();c.show()}b.element.clearCustomData();delete b.element});return b};CKEDITOR.inlineAll=function(){var a,f,b;for(b in CKEDITOR.dtd.$editable)for(var c=CKEDITOR.document.getElementsByTag(b),g=0,i=c.count();g"+(a.title?'{voiceLabel}':"")+'<{outerEl} class="cke_inner cke_reset" role="presentation">{topHtml}<{outerEl} id="{contentId}" class="cke_contents cke_reset" role="presentation">{bottomHtml}'), -b=CKEDITOR.dom.element.createFromHtml(d.output({id:a.id,name:b,langDir:a.lang.dir,langCode:a.langCode,voiceLabel:a.title,topHtml:e?''+e+"":"",contentId:a.ui.spaceId("contents"),bottomHtml:j?''+j+"":"",outerEl:CKEDITOR.env.ie?"span":"div"}));if(k==CKEDITOR.ELEMENT_MODE_REPLACE){f.hide();b.insertAfter(f)}else f.append(b); -a.container=b;a.ui.contentsElement=a.ui.space("contents");e&&a.ui.space("top").unselectable();j&&a.ui.space("bottom").unselectable();f=a.config.width;k=a.config.height;f&&b.setStyle("width",CKEDITOR.tools.cssLength(f));k&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(k));b.disableContextMenu();CKEDITOR.env.webkit&&b.on("focus",function(){a.focus()});a.fireOnce("uiReady")}CKEDITOR.replace=function(b,g){return a(b,g,null,CKEDITOR.ELEMENT_MODE_REPLACE)};CKEDITOR.appendTo=function(b, -g,f){return a(b,g,f,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),b=0;b'+d.getValue()+"",CKEDITOR.document);a.insertAfter(d);d.hide();d.$.form&&b._attachToForm()}else b.setData(a.getHtml(),null,true);b.on("loaded",function(){b.fire("uiReady");b.editable(a);b.container=a;b.ui.contentsElement=a;b.setData(b.getData(1));b.resetDirty();b.fire("contentDom");b.mode="wysiwyg";b.fire("mode");b.status="ready";b.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,b)},null,null,1E4);b.on("destroy",function(){if(d){b.container.clearCustomData(); +b.container.remove();d.show()}b.element.clearCustomData();delete b.element});return b};CKEDITOR.inlineAll=function(){var a,f,b;for(b in CKEDITOR.dtd.$editable)for(var d=CKEDITOR.document.getElementsByTag(b),e=0,i=d.count();e"+(a.title?'{voiceLabel}':"")+'<{outerEl} class="cke_inner cke_reset" role="presentation">{topHtml}<{outerEl} id="{contentId}" class="cke_contents cke_reset" role="presentation">{bottomHtml}'), +b=CKEDITOR.dom.element.createFromHtml(h.output({id:a.id,name:b,langDir:a.lang.dir,langCode:a.langCode,voiceLabel:a.title,topHtml:c?''+c+"":"",contentId:a.ui.spaceId("contents"),bottomHtml:j?''+j+"":"",outerEl:CKEDITOR.env.ie?"span":"div"}));if(k==CKEDITOR.ELEMENT_MODE_REPLACE){f.hide();b.insertAfter(f)}else f.append(b); +a.container=b;a.ui.contentsElement=a.ui.space("contents");c&&a.ui.space("top").unselectable();j&&a.ui.space("bottom").unselectable();f=a.config.width;k=a.config.height;f&&b.setStyle("width",CKEDITOR.tools.cssLength(f));k&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(k));b.disableContextMenu();CKEDITOR.env.webkit&&b.on("focus",function(){a.focus()});a.fireOnce("uiReady")}CKEDITOR.replace=function(b,e){return a(b,e,null,CKEDITOR.ELEMENT_MODE_REPLACE)};CKEDITOR.appendTo=function(b, +e,f){return a(b,e,f,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),b=0;b'+c+"");d.append(c);a.changeAttr("aria-describedby",e)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");var m=CKEDITOR.dom.walker.whitespaces(true), -n=CKEDITOR.dom.walker.bookmark(false,true),r=CKEDITOR.dom.walker.empty(),p=CKEDITOR.dom.walker.bogus(),t=/(^|]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,v=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function b(d,c){var e,g,h,f,j=[],k=c.range.startContainer;e=c.range.startPath();for(var k=i[k.getName()],B=0,l=d.getChildren(),p=l.count(),u=-1,m=-1,r=0,t=e.contains(i.$list);B-1)j[u].firstNotAllowed=1;if(m>-1)j[m].lastNotAllowed=1;return j}function d(b,c){var e=[],g=b.getChildren(), -h=g.count(),f,j=0,k=i[c],B=!b.is(i.$inline)||b.is("br");for(B&&e.push(" ");j ",p.document);p.insertNode(o);p.setStartAfter(o)}t=new CKEDITOR.dom.elementPath(p.startContainer); -j.endPath=n=new CKEDITOR.dom.elementPath(p.endContainer);if(!p.collapsed){var r=n.block||n.blockLimit,s=p.getCommonAncestor();r&&(!r.equals(s)&&!r.contains(s)&&p.checkEndOfBlock())&&j.zombies.push(r);p.deleteContents()}for(;(x=a(p.startContainer)&&p.startContainer.getChild(p.startOffset-1))&&a(x)&&x.isBlockBoundary()&&t.contains(x);)p.moveToPosition(x,CKEDITOR.POSITION_BEFORE_END);g(p,j.blockLimit,t,n);if(o){p.setEndBefore(o);p.collapse();o.remove()}o=p.startPath();if(r=o.contains(c,false,1)){p.splitElement(r); -j.inlineStylesRoot=r;j.inlineStylesPeak=o.lastElement}o=p.createBookmark();(r=o.startNode.getPrevious(e))&&a(r)&&c(r)&&m.push(r);(r=o.startNode.getNext(e))&&a(r)&&c(r)&&m.push(r);for(r=o.startNode;(r=r.getParent())&&c(r);)m.push(r);p.moveToBookmark(o);if(o=u){o=j.range;if(j.type=="text"&&j.inlineStylesRoot){x=j.inlineStylesPeak;p=x.getDocument().createText("{cke-peak}");for(m=j.inlineStylesRoot.getParent();!x.equals(m);){p=p.appendTo(x.clone());x=x.getParent()}u=p.getOuterHtml().split("{cke-peak}").join(u)}x= -j.blockLimit.getName();if(/^\s+|\s+$/.test(u)&&"span"in CKEDITOR.dtd[x])var v=' ',u=v+u+v;u=j.editor.dataProcessor.toHtml(u,{context:null,fixForBody:false,protectedWhitespaces:!!v,dontFilter:j.dontFilter,filter:j.editor.activeFilter,enterMode:j.editor.activeEnterMode});x=o.document.createElement("body");x.setHtml(u);if(v){x.getFirst().remove();x.getLast().remove()}if((v=o.startPath().block)&&!(v.getChildCount()==1&&v.getBogus()))a:{var A;if(x.getChildCount()== -1&&a(A=x.getFirst())&&A.is(k)&&!A.hasAttribute("contenteditable")){v=A.getElementsByTag("*");o=0;for(m=v.count();o0;else{F=A.startPath();if(!n.isBlock&&h(j.editor,F.block,F.blockLimit)&&(U=l(j.editor))){U=o.createElement(U);U.appendBogus(); -A.insertNode(U);CKEDITOR.env.needsBrFiller&&(L=U.getBogus())&&L.remove();A.moveToPosition(U,CKEDITOR.POSITION_BEFORE_END)}if((F=A.startPath().block)&&!F.equals(M)){if(L=F.getBogus()){L.remove();v.push(F)}M=F}n.firstNotAllowed&&(r=1);if(r&&n.isElement){F=A.startContainer;for(P=null;F&&!i[F.getName()][n.name];){if(F.equals(x)){F=null;break}P=F;F=F.getParent()}if(F){if(P){V=A.splitElement(P);j.zombies.push(V);j.zombies.push(P)}}else{P=x.getName();Y=!m;F=m==p.length-1;P=d(n.node,P);for(var N=[],Z=P.length, -X=0,W=void 0,$=0,ea=-1;X0;){c=a.getItem(b);if(!CKEDITOR.tools.trim(c.getHtml())){c.appendBogus();CKEDITOR.env.ie&&(CKEDITOR.env.version<9&&c.getChildCount())&&c.getFirst().remove()}}}return function(c){var e=c.startContainer,g=e.getAscendant("table",1),h=false;d(g.getElementsByTag("td"));d(g.getElementsByTag("th"));g=c.clone();g.setStart(e,0);g=a(g).lastBackward();if(!g){g=c.clone();g.setEndAt(e, -CKEDITOR.POSITION_BEFORE_END);g=a(g).lastForward();h=true}g||(g=e);if(g.is("table")){c.setStartAt(g,CKEDITOR.POSITION_BEFORE_START);c.collapse(true);g.remove()}else{g.is({tbody:1,thead:1,tfoot:1})&&(g=b(g,"tr",h));g.is("tr")&&(g=b(g,g.getParent().is("thead")?"th":"td",h));(e=g.getBogus())&&e.remove();c.moveToPosition(g,h?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END)}}}();a={detect:function(a,b){var d=a.range,c=d.clone(),e=d.clone(),g=new CKEDITOR.dom.elementPath(d.startContainer,b), -h=new CKEDITOR.dom.elementPath(d.endContainer,b);c.collapse(1);e.collapse();if(g.block&&c.checkBoundaryOfElement(g.block,CKEDITOR.END)){d.setStartAfter(g.block);a.prependEolBr=1}if(h.block&&e.checkBoundaryOfElement(h.block,CKEDITOR.START)){d.setEndBefore(h.block);a.appendEolBr=1}},fix:function(a,b){var d=b.getDocument(),c;if(a.appendEolBr){c=this.createEolBr(d);a.fragment.append(c)}a.prependEolBr&&(!c||c.getPrevious())&&a.fragment.append(this.createEolBr(d),1)},createEolBr:function(a){return a.createElement("br", -{attributes:{"data-cke-eol":1}})}};f={exclude:function(a){var b=a.range.getBoundaryNodes(),d=b.startNode;(b=b.endNode)&&(p(b)&&(!d||!d.equals(b)))&&a.range.setEndBefore(b)}};c={rebuild:function(a,b){var d=a.range,c=d.getCommonAncestor(),e=new CKEDITOR.dom.elementPath(c,b),g=new CKEDITOR.dom.elementPath(d.startContainer,b),d=new CKEDITOR.dom.elementPath(d.endContainer,b),h;c.type==CKEDITOR.NODE_TEXT&&(c=c.getParent());if(e.blockLimit.is({tr:1,table:1})){var f=e.contains("table").getParent();h=function(a){return!a.equals(f)}}else if(e.block&& -e.block.is(CKEDITOR.dtd.$listItem)){g=g.contains(CKEDITOR.dtd.$list);d=d.contains(CKEDITOR.dtd.$list);if(!g.equals(d)){var j=e.contains(CKEDITOR.dtd.$list).getParent();h=function(a){return!a.equals(j)}}}h||(h=function(a){return!a.equals(e.block)&&!a.equals(e.blockLimit)});this.rebuildFragment(a,b,c,h)},rebuildFragment:function(a,b,d,c){for(var e;d&&!d.equals(b)&&c(d);){e=d.clone(0,1);a.fragment.appendTo(e);a.fragment=e;d=d.getParent()}}};b={shrink:function(a){var a=a.range,b=a.startContainer,d=a.endContainer, -c=a.startOffset,e=a.endOffset;b.type==CKEDITOR.NODE_ELEMENT&&(b.equals(d)&&b.is("tr")&&++c==e)&&a.shrink(CKEDITOR.SHRINK_TEXT)}};var x=function(){function a(b,d){var c=b.getParent();if(c.is(CKEDITOR.dtd.$inline))b[d?"insertBefore":"insertAfter"](c)}function b(d,c,e){a(c);a(e,1);for(var g;g=e.getNext();){g.insertAfter(c);c=g}r(d)&&d.remove()}function d(a,b){var c=new CKEDITOR.dom.range(a);c.setStartAfter(b.startNode);c.setEndBefore(b.endNode);return c}return{list:{detectMerge:function(a,b){var c=d(b, -a.bookmark),e=c.startPath(),g=c.endPath(),h=e.contains(CKEDITOR.dtd.$list),f=g.contains(CKEDITOR.dtd.$list);a.mergeList=h&&f&&h.getParent().equals(f.getParent())&&!h.equals(f);a.mergeListItems=e.block&&g.block&&e.block.is(CKEDITOR.dtd.$listItem)&&g.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList||a.mergeListItems){c=c.clone();c.setStartBefore(a.bookmark.startNode);c.setEndAfter(a.bookmark.endNode);a.mergeListBookmark=c.createBookmark()}},merge:function(a,d){if(a.mergeListBookmark){var c=a.mergeListBookmark.startNode, -e=a.mergeListBookmark.endNode,g=new CKEDITOR.dom.elementPath(c,d),h=new CKEDITOR.dom.elementPath(e,d);if(a.mergeList){var f=g.contains(CKEDITOR.dtd.$list),j=h.contains(CKEDITOR.dtd.$list);if(!f.equals(j)){j.moveChildren(f);j.remove()}}if(a.mergeListItems){g=g.contains(CKEDITOR.dtd.$listItem);h=h.contains(CKEDITOR.dtd.$listItem);g.equals(h)||b(h,c,e)}c.remove();e.remove()}}},block:{detectMerge:function(a,b){if(!a.tableContentsRanges&&!a.mergeListBookmark){var d=new CKEDITOR.dom.range(b);d.setStartBefore(a.bookmark.startNode); -d.setEndAfter(a.bookmark.endNode);a.mergeBlockBookmark=d.createBookmark()}},merge:function(a,d){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var c=a.mergeBlockBookmark.startNode,e=a.mergeBlockBookmark.endNode,g=new CKEDITOR.dom.elementPath(c,d),h=new CKEDITOR.dom.elementPath(e,d),g=g.block,h=h.block;g&&(h&&!g.equals(h))&&b(h,c,e);c.remove();e.remove()}}},table:function(){function a(d){var e=[],g,h=new CKEDITOR.dom.walker(d),f=d.startPath().contains(c),j=d.endPath().contains(c),i={};h.guard=function(a, -h){if(a.type==CKEDITOR.NODE_ELEMENT){var k="visited_"+(h?"out":"in");if(a.getCustomData(k))return;CKEDITOR.dom.element.setMarker(i,a,k,1)}if(h&&f&&a.equals(f)){g=d.clone();g.setEndAt(f,CKEDITOR.POSITION_BEFORE_END);e.push(g)}else if(!h&&j&&a.equals(j)){g=d.clone();g.setStartAt(j,CKEDITOR.POSITION_AFTER_START);e.push(g)}else if(!h&&a.type==CKEDITOR.NODE_ELEMENT&&a.is(c)&&(!f||b(a,f))&&(!j||b(a,j))){g=d.clone();g.selectNodeContents(a);e.push(g)}};h.lastForward();CKEDITOR.dom.element.clearAllMarkers(i); -return e}function b(a,d){var c=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED,e=a.getPosition(d);return e===CKEDITOR.POSITION_IDENTICAL?false:(e&c)===0}var c={td:1,th:1,caption:1};return{detectPurge:function(a){var b=a.range,d=b.clone();d.enlarge(CKEDITOR.ENLARGE_ELEMENT);var d=new CKEDITOR.dom.walker(d),e=0;d.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(c)&&++e};d.checkForward();if(e>1){var d=b.startPath().contains("table"),g=b.endPath().contains("table");if(d&&g&&b.checkBoundaryOfElement(d, -CKEDITOR.START)&&b.checkBoundaryOfElement(g,CKEDITOR.END)){b=a.range.clone();b.setStartBefore(d);b.setEndAfter(g);a.purgeTableBookmark=b.createBookmark()}}},detectRanges:function(e,g){var h=d(g,e.bookmark),f=h.clone(),j,i,k=h.getCommonAncestor();k.is(CKEDITOR.dtd.$tableContent)&&!k.is(c)&&(k=k.getAscendant("table",true));i=k;k=new CKEDITOR.dom.elementPath(h.startContainer,i);i=new CKEDITOR.dom.elementPath(h.endContainer,i);k=k.contains("table");i=i.contains("table");if(k||i){if(k&&i&&b(k,i)){e.tableSurroundingRange= -f;f.setStartAt(k,CKEDITOR.POSITION_AFTER_END);f.setEndAt(i,CKEDITOR.POSITION_BEFORE_START);f=h.clone();f.setEndAt(k,CKEDITOR.POSITION_AFTER_END);j=h.clone();j.setStartAt(i,CKEDITOR.POSITION_BEFORE_START);j=a(f).concat(a(j))}else if(k){if(!i){e.tableSurroundingRange=f;f.setStartAt(k,CKEDITOR.POSITION_AFTER_END);h.setEndAt(k,CKEDITOR.POSITION_AFTER_END)}}else{e.tableSurroundingRange=f;f.setEndAt(i,CKEDITOR.POSITION_BEFORE_START);h.setStartAt(i,CKEDITOR.POSITION_AFTER_START)}e.tableContentsRanges=j? -j:a(h)}},deleteRanges:function(a){for(var b;b=a.tableContentsRanges.pop();){b.extractContents();r(b.startContainer)&&b.startContainer.appendBogus()}a.tableSurroundingRange&&a.tableSurroundingRange.extractContents()},purge:function(a){if(a.purgeTableBookmark){var b=a.doc,d=a.range.clone(),b=b.createElement("p");b.insertBefore(a.purgeTableBookmark.startNode);d.moveToBookmark(a.purgeTableBookmark);d.deleteContents();a.range.moveToPosition(b,CKEDITOR.POSITION_AFTER_START)}}}}(),detectExtractMerge:function(a){return!(a.range.startPath().contains(CKEDITOR.dtd.$listItem)&& -a.range.endPath().contains(CKEDITOR.dtd.$listItem))},fixUneditableRangePosition:function(a){a.startContainer.getDtd()["#"]||a.moveToClosestEditablePosition(null,true)},autoParagraph:function(a,b){var d=b.startPath(),c;if(h(a,d.block,d.blockLimit)&&(c=l(a))){c=b.document.createElement(c);c.appendBogus();b.insertNode(c);b.moveToPosition(c,CKEDITOR.POSITION_AFTER_START)}}}}()}(),function(){function a(){var a=this._.fakeSelection,b;if(a){b=this.getSelection(1);if(!b||!b.isHidden()){a.reset();a=0}}if(!a){a= -b||this.getSelection(1);if(!a||a.getType()==CKEDITOR.SELECTION_NONE)return}this.fire("selectionCheck",a);b=this.elementPath();if(!b.compare(this._.selectionPreviousPath)){if(CKEDITOR.env.webkit)this._.previousActive=this.document.getActive();this._.selectionPreviousPath=b;this.fire("selectionChange",{selection:a,path:b})}}function f(){m=true;if(!s){b.call(this);s=CKEDITOR.tools.setTimeout(b,200,this)}}function b(){s=null;if(m){CKEDITOR.tools.setTimeout(a,0,this);m=false}}function c(a){return n(a)|| -a.type==CKEDITOR.NODE_ELEMENT&&!a.is(CKEDITOR.dtd.$empty)?true:false}function g(a){function b(d,c){return!d||d.type==CKEDITOR.NODE_TEXT?false:a.clone()["moveToElementEdit"+(c?"End":"Start")](d)}if(!(a.root instanceof CKEDITOR.editable))return false;var d=a.startContainer,e=a.getPreviousNode(c,null,d),g=a.getNextNode(c,null,d);return b(e)||b(g,1)||!e&&!g&&!(d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()&&d.getBogus())?true:false}function i(a){return a.getCustomData("cke-fillingChar")}function k(a, -b){var c=a&&a.removeCustomData("cke-fillingChar");if(c){if(b!==false){var g,h=a.getDocument().getSelection().getNative(),f=h&&h.type!="None"&&h.getRangeAt(0);if(c.getLength()>1&&f&&f.intersectsNode(c.$)){g=j(h);f=h.focusNode==c.$&&h.focusOffset>0;h.anchorNode==c.$&&h.anchorOffset>0&&g[0].offset--;f&&g[1].offset--}}c.setText(e(c.getText()));g&&d(a.getDocument().$,g)}}function e(a){return a.replace(/\u200B( )?/g,function(a){return a[1]?" ":""})}function j(a){return[{node:a.anchorNode,offset:a.anchorOffset}, -{node:a.focusNode,offset:a.focusOffset}]}function d(a,b){var d=a.getSelection(),c=a.createRange();c.setStart(b[0].node,b[0].offset);c.collapse(true);d.removeAllRanges();d.addRange(c);d.extend(b[1].node,b[1].offset)}function h(a){var b=CKEDITOR.dom.element.createFromHtml('
 
',a.document);a.fire("lockSnapshot");a.editable().append(b);var d=a.getSelection(1),c=a.createRange(), -e=d.root.on("selectionchange",function(a){a.cancel()},null,null,0);c.setStartAt(b,CKEDITOR.POSITION_AFTER_START);c.setEndAt(b,CKEDITOR.POSITION_BEFORE_END);d.selectRanges([c]);e.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=b}function l(a){var b={37:1,39:1,8:1,46:1};return function(d){var c=d.data.getKeystroke();if(b[c]){var e=a.getSelection().getRanges(),g=e[0];if(e.length==1&&g.collapsed)if((c=g[c<38?"getPreviousEditableNode":"getNextEditableNode"]())&&c.type==CKEDITOR.NODE_ELEMENT&& -c.getAttribute("contenteditable")=="false"){a.getSelection().fake(c);d.data.preventDefault();d.cancel()}}}}function o(a){for(var b=0;b=c.getLength()?f.setStartAfter(c):f.setStartBefore(c));e&&e.type==CKEDITOR.NODE_TEXT&&(h?f.setEndAfter(e):f.setEndBefore(e));c=new CKEDITOR.dom.walker(f);c.evaluator=function(c){if(c.type==CKEDITOR.NODE_ELEMENT&&c.isReadOnly()){var e=d.clone();d.setEndBefore(c);d.collapsed&&a.splice(b--,1);if(!(c.getPosition(f.endContainer)&CKEDITOR.POSITION_CONTAINS)){e.setStartAfter(c);e.collapsed||a.splice(b+1,0,e)}return true}return false};c.next()}}return a} -var s,m,n=CKEDITOR.dom.walker.invisible(1),r=function(){function a(b){return function(a){var d=a.editor.createRange();d.moveToClosestEditablePosition(a.selected,b)&&a.editor.getSelection().selectRanges([d]);return false}}function b(a){return function(b){var d=b.editor,c=d.createRange(),e;if(!(e=c.moveToClosestEditablePosition(b.selected,a)))e=c.moveToClosestEditablePosition(b.selected,!a);e&&d.getSelection().selectRanges([c]);d.fire("saveSnapshot");b.selected.remove();if(!e){c.moveToElementEditablePosition(d.editable()); -d.getSelection().selectRanges([c])}d.fire("saveSnapshot");return false}}var d=a(),c=a(1);return{37:d,38:d,39:c,40:c,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(b){function d(){var a=c.getSelection();a&&a.removeAllRanges()}var c=b.editor;c.on("contentDom",function(){function b(){r=new CKEDITOR.dom.selection(c.getSelection());r.lock()}function d(){g.removeListener("mouseup",d);i.removeListener("mouseup",d);var a=CKEDITOR.document.$.selection,b=a.createRange();a.type!="None"&&b.parentElement().ownerDocument== -e.$&&b.select()}var e=c.document,g=CKEDITOR.document,h=c.editable(),j=e.getBody(),i=e.getDocumentElement(),m=h.isInline(),B,r;CKEDITOR.env.gecko&&h.attachListener(h,"focus",function(a){a.removeListener();if(B!==0)if((a=c.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==h.$){a=c.createRange();a.moveToElementEditStart(h);a.select()}},null,null,-2);h.attachListener(h,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){B&&CKEDITOR.env.webkit&&(B=c._.previousActive&&c._.previousActive.equals(e.getActive())); -c.unlockSelection(B);B=0},null,null,-1);h.attachListener(h,"mousedown",function(){B=0});if(CKEDITOR.env.ie||m){p?h.attachListener(h,"beforedeactivate",b,null,null,-1):h.attachListener(c,"selectionCheck",b,null,null,-1);h.attachListener(h,CKEDITOR.env.webkit?"DOMFocusOut":"blur",function(){c.lockSelection(r);B=1},null,null,-1);h.attachListener(h,"mousedown",function(){B=0})}if(CKEDITOR.env.ie&&!m){var t;h.attachListener(h,"mousedown",function(a){if(a.data.$.button==2){a=c.document.getSelection();if(!a|| -a.getType()==CKEDITOR.SELECTION_NONE)t=c.window.getScrollPosition()}});h.attachListener(h,"mouseup",function(a){if(a.data.$.button==2&&t){c.document.$.documentElement.scrollLeft=t.x;c.document.$.documentElement.scrollTop=t.y}t=null});if(e.$.compatMode!="BackCompat"){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)i.on("mousedown",function(a){function b(a){a=a.data.$;if(c){var d=j.$.createTextRange();try{d.moveToPoint(a.clientX,a.clientY)}catch(e){}c.setEndPoint(h.compareEndPoints("StartToStart", -d)<0?"EndToEnd":"StartToStart",d);c.select()}}function d(){i.removeListener("mousemove",b);g.removeListener("mouseup",d);i.removeListener("mouseup",d);c.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y7&&CKEDITOR.env.version<11)i.on("mousedown",function(a){if(a.data.getTarget().is("html")){g.on("mouseup", -d);i.on("mouseup",d)}})}}h.attachListener(h,"selectionchange",a,c);h.attachListener(h,"keyup",f,c);h.attachListener(h,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){c.forceNextSelectionCheck();c.selectionChange(1)});if(m&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var n;h.attachListener(h,"mousedown",function(){n=1});h.attachListener(e.getDocumentElement(),"mouseup",function(){n&&f.call(c);n=0})}else h.attachListener(CKEDITOR.env.ie?h:e.getDocumentElement(),"mouseup",f,c);CKEDITOR.env.webkit&& -h.attachListener(e,"keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:k(h)}},null,null,-1);h.attachListener(h,"keydown",l(c),null,null,-1)});c.on("setData",function(){c.unlockSelection();CKEDITOR.env.webkit&&d()});c.on("contentDomUnload",function(){c.unlockSelection()});if(CKEDITOR.env.ie9Compat)c.on("beforeDestroy",d,null,null,9);c.on("dataReady",function(){delete c._.fakeSelection;delete c._.hiddenSelectionContainer;c.selectionChange(1)}); -c.on("loadSnapshot",function(){var a=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),b=c.editable().getLast(a);if(b&&b.hasAttribute("data-cke-hidden-sel")){b.remove();if(CKEDITOR.env.gecko)(a=c.editable().getFirst(a))&&(a.is("br")&&a.getAttribute("_moz_editor_bogus_node"))&&a.remove()}},null,null,100);c.on("key",function(a){if(c.mode=="wysiwyg"){var b=c.getSelection();if(b.isFake){var d=r[a.data.keyCode];if(d)return d({editor:c,selected:b.getSelectedElement(),selection:b,keyEvent:a})}}})});CKEDITOR.on("instanceReady", -function(a){function b(){var a=g.editable();if(a)if(a=i(a)){var d=g.document.$.getSelection();if(d.type!="None"&&(d.anchorNode==a.$||d.focusNode==a.$))f=j(d);h=a.getText();a.setText(e(h))}}function c(){var a=g.editable();if(a)if(a=i(a)){a.setText(h);if(f){d(g.document.$,f);f=null}}}var g=a.editor,h,f;if(CKEDITOR.env.webkit){g.on("selectionChange",function(){var a=g.editable(),b=i(a);b&&(b.getCustomData("ready")?k(a):b.setCustomData("ready",1))},null,null,-1);g.on("beforeSetMode",function(){k(g.editable())}, -null,null,-1);g.on("beforeUndoImage",b);g.on("afterUndoImage",c);g.on("beforeGetData",b,null,null,0);g.on("getData",c)}});CKEDITOR.editor.prototype.selectionChange=function(b){(b?a:f).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){if((this._.savedSelection||this._.fakeSelection)&&!a)return this._.savedSelection||this._.fakeSelection;return(a=this.editable())&&this.mode=="wysiwyg"?new CKEDITOR.dom.selection(a):null};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1); +"false"&&a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1");a.setAttribute("contentEditable",false)}});b.on("selectionChange",function(a){if(!b.readOnly){var c=b.getSelection();if(c&&!c.isLocked){c=b.checkDirty();b.fire("lockSnapshot");e(a);b.fire("unlockSnapshot");!c&&b.resetDirty()}}})});CKEDITOR.on("instanceCreated",function(a){var b=a.editor;b.on("mode",function(){var a=b.editable();if(a&&a.isInline()){var c=b.title;a.changeAttr("role","textbox");a.changeAttr("aria-label",c); +c&&a.changeAttr("title",c);var d=b.fire("ariaEditorHelpLabel",{}).label;if(d)if(c=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents")){var e=CKEDITOR.tools.getNextId(),d=CKEDITOR.dom.element.createFromHtml(''+d+"");c.append(d);a.changeAttr("aria-describedby",e)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");var m=CKEDITOR.dom.walker.whitespaces(true), +q=CKEDITOR.dom.walker.bookmark(false,true),o=CKEDITOR.dom.walker.empty(),r=CKEDITOR.dom.walker.bogus(),t=/(^|]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,x=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function b(c,d){var e,g,h,f,j=[],k=d.range.startContainer;e=d.range.startPath();for(var k=i[k.getName()],l=0,D=c.getChildren(),m=D.count(),v=-1,r=-1,o=0,t=e.contains(i.$list);l-1)j[v].firstNotAllowed=1;if(r>-1)j[r].lastNotAllowed=1;return j}function d(b,c){var e=[],g=b.getChildren(), +h=g.count(),f,j=0,k=i[c],l=!b.is(i.$inline)||b.is("br");for(l&&e.push(" ");j ",m.document);m.insertNode(n);m.setStartAfter(n)}t=new CKEDITOR.dom.elementPath(m.startContainer); +j.endPath=q=new CKEDITOR.dom.elementPath(m.endContainer);if(!m.collapsed){var o=q.block||q.blockLimit,s=m.getCommonAncestor();o&&(!o.equals(s)&&!o.contains(s)&&m.checkEndOfBlock())&&j.zombies.push(o);m.deleteContents()}for(;(w=a(m.startContainer)&&m.startContainer.getChild(m.startOffset-1))&&a(w)&&w.isBlockBoundary()&&t.contains(w);)m.moveToPosition(w,CKEDITOR.POSITION_BEFORE_END);h(m,j.blockLimit,t,q);if(n){m.setEndBefore(n);m.collapse();n.remove()}n=m.startPath();if(o=n.contains(e,false,1)){m.splitElement(o); +j.inlineStylesRoot=o;j.inlineStylesPeak=n.lastElement}n=m.createBookmark();(o=n.startNode.getPrevious(c))&&a(o)&&e(o)&&r.push(o);(o=n.startNode.getNext(c))&&a(o)&&e(o)&&r.push(o);for(o=n.startNode;(o=o.getParent())&&e(o);)r.push(o);m.moveToBookmark(n);if(n=v){n=j.range;if(j.type=="text"&&j.inlineStylesRoot){w=j.inlineStylesPeak;m=w.getDocument().createText("{cke-peak}");for(r=j.inlineStylesRoot.getParent();!w.equals(r);){m=m.appendTo(w.clone());w=w.getParent()}v=m.getOuterHtml().split("{cke-peak}").join(v)}w= +j.blockLimit.getName();if(/^\s+|\s+$/.test(v)&&"span"in CKEDITOR.dtd[w])var x=' ',v=x+v+x;v=j.editor.dataProcessor.toHtml(v,{context:null,fixForBody:false,protectedWhitespaces:!!x,dontFilter:j.dontFilter,filter:j.editor.activeFilter,enterMode:j.editor.activeEnterMode});w=n.document.createElement("body");w.setHtml(v);if(x){w.getFirst().remove();w.getLast().remove()}if((x=n.startPath().block)&&!(x.getChildCount()==1&&x.getBogus()))a:{var A;if(w.getChildCount()== +1&&a(A=w.getFirst())&&A.is(k)&&!A.hasAttribute("contenteditable")){x=A.getElementsByTag("*");n=0;for(r=x.count();n0;else{G=A.startPath();if(!q.isBlock&&g(j.editor,G.block,G.blockLimit)&&(U=l(j.editor))){U=n.createElement(U);U.appendBogus(); +A.insertNode(U);CKEDITOR.env.needsBrFiller&&(L=U.getBogus())&&L.remove();A.moveToPosition(U,CKEDITOR.POSITION_BEFORE_END)}if((G=A.startPath().block)&&!G.equals(M)){if(L=G.getBogus()){L.remove();x.push(G)}M=G}q.firstNotAllowed&&(o=1);if(o&&q.isElement){G=A.startContainer;for(P=null;G&&!i[G.getName()][q.name];){if(G.equals(w)){G=null;break}P=G;G=G.getParent()}if(G){if(P){V=A.splitElement(P);j.zombies.push(V);j.zombies.push(P)}}else{P=w.getName();Y=!r;G=r==m.length-1;P=d(q.node,P);for(var N=[],Z=P.length, +X=0,W=void 0,$=0,ea=-1;X0;){d=a.getItem(b);if(!CKEDITOR.tools.trim(d.getHtml())){d.appendBogus();CKEDITOR.env.ie&&(CKEDITOR.env.version<9&&d.getChildCount())&&d.getFirst().remove()}}}return function(d){var e=d.startContainer,g=e.getAscendant("table",1),f=false;c(g.getElementsByTag("td"));c(g.getElementsByTag("th"));g=d.clone();g.setStart(e,0);g=a(g).lastBackward();if(!g){g=d.clone();g.setEndAt(e, +CKEDITOR.POSITION_BEFORE_END);g=a(g).lastForward();f=true}g||(g=e);if(g.is("table")){d.setStartAt(g,CKEDITOR.POSITION_BEFORE_START);d.collapse(true);g.remove()}else{g.is({tbody:1,thead:1,tfoot:1})&&(g=b(g,"tr",f));g.is("tr")&&(g=b(g,g.getParent().is("thead")?"th":"td",f));(e=g.getBogus())&&e.remove();d.moveToPosition(g,f?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END)}}}();a={detect:function(a,b){var c=a.range,d=c.clone(),e=c.clone(),g=new CKEDITOR.dom.elementPath(c.startContainer,b), +f=new CKEDITOR.dom.elementPath(c.endContainer,b);d.collapse(1);e.collapse();if(g.block&&d.checkBoundaryOfElement(g.block,CKEDITOR.END)){c.setStartAfter(g.block);a.prependEolBr=1}if(f.block&&e.checkBoundaryOfElement(f.block,CKEDITOR.START)){c.setEndBefore(f.block);a.appendEolBr=1}},fix:function(a,b){var c=b.getDocument(),d;if(a.appendEolBr){d=this.createEolBr(c);a.fragment.append(d)}a.prependEolBr&&(!d||d.getPrevious())&&a.fragment.append(this.createEolBr(c),1)},createEolBr:function(a){return a.createElement("br", +{attributes:{"data-cke-eol":1}})}};f={exclude:function(a){var b=a.range.getBoundaryNodes(),c=b.startNode;(b=b.endNode)&&(r(b)&&(!c||!c.equals(b)))&&a.range.setEndBefore(b)}};d={rebuild:function(a,b){var c=a.range,d=c.getCommonAncestor(),e=new CKEDITOR.dom.elementPath(d,b),g=new CKEDITOR.dom.elementPath(c.startContainer,b),c=new CKEDITOR.dom.elementPath(c.endContainer,b),f;d.type==CKEDITOR.NODE_TEXT&&(d=d.getParent());if(e.blockLimit.is({tr:1,table:1})){var h=e.contains("table").getParent();f=function(a){return!a.equals(h)}}else if(e.block&& +e.block.is(CKEDITOR.dtd.$listItem)){g=g.contains(CKEDITOR.dtd.$list);c=c.contains(CKEDITOR.dtd.$list);if(!g.equals(c)){var j=e.contains(CKEDITOR.dtd.$list).getParent();f=function(a){return!a.equals(j)}}}f||(f=function(a){return!a.equals(e.block)&&!a.equals(e.blockLimit)});this.rebuildFragment(a,b,d,f)},rebuildFragment:function(a,b,c,d){for(var e;c&&!c.equals(b)&&d(c);){e=c.clone(0,1);a.fragment.appendTo(e);a.fragment=e;c=c.getParent()}}};b={shrink:function(a){var a=a.range,b=a.startContainer,c=a.endContainer, +d=a.startOffset,e=a.endOffset;b.type==CKEDITOR.NODE_ELEMENT&&(b.equals(c)&&b.is("tr")&&++d==e)&&a.shrink(CKEDITOR.SHRINK_TEXT)}};var w=function(){function a(b,c){var d=b.getParent();if(d.is(CKEDITOR.dtd.$inline))b[c?"insertBefore":"insertAfter"](d)}function b(c,d,e){a(d);a(e,1);for(var g;g=e.getNext();){g.insertAfter(d);d=g}o(c)&&c.remove()}function c(a,b){var d=new CKEDITOR.dom.range(a);d.setStartAfter(b.startNode);d.setEndBefore(b.endNode);return d}return{list:{detectMerge:function(a,b){var d=c(b, +a.bookmark),e=d.startPath(),g=d.endPath(),f=e.contains(CKEDITOR.dtd.$list),h=g.contains(CKEDITOR.dtd.$list);a.mergeList=f&&h&&f.getParent().equals(h.getParent())&&!f.equals(h);a.mergeListItems=e.block&&g.block&&e.block.is(CKEDITOR.dtd.$listItem)&&g.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList||a.mergeListItems){d=d.clone();d.setStartBefore(a.bookmark.startNode);d.setEndAfter(a.bookmark.endNode);a.mergeListBookmark=d.createBookmark()}},merge:function(a,c){if(a.mergeListBookmark){var d=a.mergeListBookmark.startNode, +e=a.mergeListBookmark.endNode,g=new CKEDITOR.dom.elementPath(d,c),f=new CKEDITOR.dom.elementPath(e,c);if(a.mergeList){var h=g.contains(CKEDITOR.dtd.$list),j=f.contains(CKEDITOR.dtd.$list);if(!h.equals(j)){j.moveChildren(h);j.remove()}}if(a.mergeListItems){g=g.contains(CKEDITOR.dtd.$listItem);f=f.contains(CKEDITOR.dtd.$listItem);g.equals(f)||b(f,d,e)}d.remove();e.remove()}}},block:{detectMerge:function(a,b){if(!a.tableContentsRanges&&!a.mergeListBookmark){var c=new CKEDITOR.dom.range(b);c.setStartBefore(a.bookmark.startNode); +c.setEndAfter(a.bookmark.endNode);a.mergeBlockBookmark=c.createBookmark()}},merge:function(a,c){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var d=a.mergeBlockBookmark.startNode,e=a.mergeBlockBookmark.endNode,g=new CKEDITOR.dom.elementPath(d,c),f=new CKEDITOR.dom.elementPath(e,c),g=g.block,f=f.block;g&&(f&&!g.equals(f))&&b(f,d,e);d.remove();e.remove()}}},table:function(){function a(c){var e=[],g,f=new CKEDITOR.dom.walker(c),h=c.startPath().contains(d),j=c.endPath().contains(d),i={};f.guard=function(a, +f){if(a.type==CKEDITOR.NODE_ELEMENT){var k="visited_"+(f?"out":"in");if(a.getCustomData(k))return;CKEDITOR.dom.element.setMarker(i,a,k,1)}if(f&&h&&a.equals(h)){g=c.clone();g.setEndAt(h,CKEDITOR.POSITION_BEFORE_END);e.push(g)}else if(!f&&j&&a.equals(j)){g=c.clone();g.setStartAt(j,CKEDITOR.POSITION_AFTER_START);e.push(g)}else if(!f&&a.type==CKEDITOR.NODE_ELEMENT&&a.is(d)&&(!h||b(a,h))&&(!j||b(a,j))){g=c.clone();g.selectNodeContents(a);e.push(g)}};f.lastForward();CKEDITOR.dom.element.clearAllMarkers(i); +return e}function b(a,c){var d=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED,e=a.getPosition(c);return e===CKEDITOR.POSITION_IDENTICAL?false:(e&d)===0}var d={td:1,th:1,caption:1};return{detectPurge:function(a){var b=a.range,c=b.clone();c.enlarge(CKEDITOR.ENLARGE_ELEMENT);var c=new CKEDITOR.dom.walker(c),e=0;c.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(d)&&++e};c.checkForward();if(e>1){var c=b.startPath().contains("table"),g=b.endPath().contains("table");if(c&&g&&b.checkBoundaryOfElement(c, +CKEDITOR.START)&&b.checkBoundaryOfElement(g,CKEDITOR.END)){b=a.range.clone();b.setStartBefore(c);b.setEndAfter(g);a.purgeTableBookmark=b.createBookmark()}}},detectRanges:function(e,g){var f=c(g,e.bookmark),h=f.clone(),j,i,k=f.getCommonAncestor();k.is(CKEDITOR.dtd.$tableContent)&&!k.is(d)&&(k=k.getAscendant("table",true));i=k;k=new CKEDITOR.dom.elementPath(f.startContainer,i);i=new CKEDITOR.dom.elementPath(f.endContainer,i);k=k.contains("table");i=i.contains("table");if(k||i){if(k&&i&&b(k,i)){e.tableSurroundingRange= +h;h.setStartAt(k,CKEDITOR.POSITION_AFTER_END);h.setEndAt(i,CKEDITOR.POSITION_BEFORE_START);h=f.clone();h.setEndAt(k,CKEDITOR.POSITION_AFTER_END);j=f.clone();j.setStartAt(i,CKEDITOR.POSITION_BEFORE_START);j=a(h).concat(a(j))}else if(k){if(!i){e.tableSurroundingRange=h;h.setStartAt(k,CKEDITOR.POSITION_AFTER_END);f.setEndAt(k,CKEDITOR.POSITION_AFTER_END)}}else{e.tableSurroundingRange=h;h.setEndAt(i,CKEDITOR.POSITION_BEFORE_START);f.setStartAt(i,CKEDITOR.POSITION_AFTER_START)}e.tableContentsRanges=j? +j:a(f)}},deleteRanges:function(a){for(var b;b=a.tableContentsRanges.pop();){b.extractContents();o(b.startContainer)&&b.startContainer.appendBogus()}a.tableSurroundingRange&&a.tableSurroundingRange.extractContents()},purge:function(a){if(a.purgeTableBookmark){var b=a.doc,c=a.range.clone(),b=b.createElement("p");b.insertBefore(a.purgeTableBookmark.startNode);c.moveToBookmark(a.purgeTableBookmark);c.deleteContents();a.range.moveToPosition(b,CKEDITOR.POSITION_AFTER_START)}}}}(),detectExtractMerge:function(a){return!(a.range.startPath().contains(CKEDITOR.dtd.$listItem)&& +a.range.endPath().contains(CKEDITOR.dtd.$listItem))},fixUneditableRangePosition:function(a){a.startContainer.getDtd()["#"]||a.moveToClosestEditablePosition(null,true)},autoParagraph:function(a,b){var c=b.startPath(),d;if(g(a,c.block,c.blockLimit)&&(d=l(a))){d=b.document.createElement(d);d.appendBogus();b.insertNode(d);b.moveToPosition(d,CKEDITOR.POSITION_AFTER_START)}}}}()}(),function(){function a(){var a=this._.fakeSelection,b;if(a){b=this.getSelection(1);if(!b||!b.isHidden()){a.reset();a=0}}if(!a){a= +b||this.getSelection(1);if(!a||a.getType()==CKEDITOR.SELECTION_NONE)return}this.fire("selectionCheck",a);b=this.elementPath();if(!b.compare(this._.selectionPreviousPath)){if(CKEDITOR.env.webkit)this._.previousActive=this.document.getActive();this._.selectionPreviousPath=b;this.fire("selectionChange",{selection:a,path:b})}}function f(){m=true;if(!n){b.call(this);n=CKEDITOR.tools.setTimeout(b,200,this)}}function b(){n=null;if(m){CKEDITOR.tools.setTimeout(a,0,this);m=false}}function d(a){return q(a)|| +a.type==CKEDITOR.NODE_ELEMENT&&!a.is(CKEDITOR.dtd.$empty)?true:false}function e(a){function b(c,d){return!c||c.type==CKEDITOR.NODE_TEXT?false:a.clone()["moveToElementEdit"+(d?"End":"Start")](c)}if(!(a.root instanceof CKEDITOR.editable))return false;var c=a.startContainer,e=a.getPreviousNode(d,null,c),g=a.getNextNode(d,null,c);return b(e)||b(g,1)||!e&&!g&&!(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()&&c.getBogus())?true:false}function i(a){return a.getCustomData("cke-fillingChar")}function k(a, +b){var d=a&&a.removeCustomData("cke-fillingChar");if(d){if(b!==false){var e,g=a.getDocument().getSelection().getNative(),f=g&&g.type!="None"&&g.getRangeAt(0);if(d.getLength()>1&&f&&f.intersectsNode(d.$)){e=j(g);f=g.focusNode==d.$&&g.focusOffset>0;g.anchorNode==d.$&&g.anchorOffset>0&&e[0].offset--;f&&e[1].offset--}}d.setText(c(d.getText()));e&&h(a.getDocument().$,e)}}function c(a){return a.replace(/\u200B( )?/g,function(a){return a[1]?" ":""})}function j(a){return[{node:a.anchorNode,offset:a.anchorOffset}, +{node:a.focusNode,offset:a.focusOffset}]}function h(a,b){var c=a.getSelection(),d=a.createRange();d.setStart(b[0].node,b[0].offset);d.collapse(true);c.removeAllRanges();c.addRange(d);c.extend(b[1].node,b[1].offset)}function g(a){var b=CKEDITOR.dom.element.createFromHtml('
 
',a.document);a.fire("lockSnapshot");a.editable().append(b);var c=a.getSelection(1),d=a.createRange(), +e=c.root.on("selectionchange",function(a){a.cancel()},null,null,0);d.setStartAt(b,CKEDITOR.POSITION_AFTER_START);d.setEndAt(b,CKEDITOR.POSITION_BEFORE_END);c.selectRanges([d]);e.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=b}function l(a){var b={37:1,39:1,8:1,46:1};return function(c){var d=c.data.getKeystroke();if(b[d]){var e=a.getSelection().getRanges(),g=e[0];if(e.length==1&&g.collapsed)if((d=g[d<38?"getPreviousEditableNode":"getNextEditableNode"]())&&d.type==CKEDITOR.NODE_ELEMENT&& +d.getAttribute("contenteditable")=="false"){a.getSelection().fake(d);c.data.preventDefault();c.cancel()}}}}function s(a){for(var b=0;b=d.getLength()?h.setStartAfter(d):h.setStartBefore(d));e&&e.type==CKEDITOR.NODE_TEXT&&(f?h.setEndAfter(e):h.setEndBefore(e));d=new CKEDITOR.dom.walker(h);d.evaluator=function(d){if(d.type==CKEDITOR.NODE_ELEMENT&&d.isReadOnly()){var e=c.clone();c.setEndBefore(d);c.collapsed&&a.splice(b--,1);if(!(d.getPosition(h.endContainer)&CKEDITOR.POSITION_CONTAINS)){e.setStartAfter(d);e.collapsed||a.splice(b+1,0,e)}return true}return false};d.next()}}return a} +var n,m,q=CKEDITOR.dom.walker.invisible(1),o=function(){function a(b){return function(a){var c=a.editor.createRange();c.moveToClosestEditablePosition(a.selected,b)&&a.editor.getSelection().selectRanges([c]);return false}}function b(a){return function(b){var c=b.editor,d=c.createRange(),e;if(!(e=d.moveToClosestEditablePosition(b.selected,a)))e=d.moveToClosestEditablePosition(b.selected,!a);e&&c.getSelection().selectRanges([d]);c.fire("saveSnapshot");b.selected.remove();if(!e){d.moveToElementEditablePosition(c.editable()); +c.getSelection().selectRanges([d])}c.fire("saveSnapshot");return false}}var c=a(),d=a(1);return{37:c,38:c,39:d,40:d,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(b){function c(){var a=d.getSelection();a&&a.removeAllRanges()}var d=b.editor;d.on("contentDom",function(){function b(){o=new CKEDITOR.dom.selection(d.getSelection());o.lock()}function c(){g.removeListener("mouseup",c);i.removeListener("mouseup",c);var a=CKEDITOR.document.$.selection,b=a.createRange();a.type!="None"&&b.parentElement().ownerDocument== +e.$&&b.select()}var e=d.document,g=CKEDITOR.document,h=d.editable(),j=e.getBody(),i=e.getDocumentElement(),m=h.isInline(),D,o;CKEDITOR.env.gecko&&h.attachListener(h,"focus",function(a){a.removeListener();if(D!==0)if((a=d.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==h.$){a=d.createRange();a.moveToElementEditStart(h);a.select()}},null,null,-2);h.attachListener(h,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){D&&CKEDITOR.env.webkit&&(D=d._.previousActive&&d._.previousActive.equals(e.getActive())); +d.unlockSelection(D);D=0},null,null,-1);h.attachListener(h,"mousedown",function(){D=0});if(CKEDITOR.env.ie||m){r?h.attachListener(h,"beforedeactivate",b,null,null,-1):h.attachListener(d,"selectionCheck",b,null,null,-1);h.attachListener(h,CKEDITOR.env.webkit?"DOMFocusOut":"blur",function(){d.lockSelection(o);D=1},null,null,-1);h.attachListener(h,"mousedown",function(){D=0})}if(CKEDITOR.env.ie&&!m){var t;h.attachListener(h,"mousedown",function(a){if(a.data.$.button==2){a=d.document.getSelection();if(!a|| +a.getType()==CKEDITOR.SELECTION_NONE)t=d.window.getScrollPosition()}});h.attachListener(h,"mouseup",function(a){if(a.data.$.button==2&&t){d.document.$.documentElement.scrollLeft=t.x;d.document.$.documentElement.scrollTop=t.y}t=null});if(e.$.compatMode!="BackCompat"){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)i.on("mousedown",function(a){function b(a){a=a.data.$;if(d){var c=j.$.createTextRange();try{c.moveToPoint(a.clientX,a.clientY)}catch(e){}d.setEndPoint(h.compareEndPoints("StartToStart", +c)<0?"EndToEnd":"StartToStart",c);d.select()}}function c(){i.removeListener("mousemove",b);g.removeListener("mouseup",c);i.removeListener("mouseup",c);d.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y7&&CKEDITOR.env.version<11)i.on("mousedown",function(a){if(a.data.getTarget().is("html")){g.on("mouseup", +c);i.on("mouseup",c)}})}}h.attachListener(h,"selectionchange",a,d);h.attachListener(h,"keyup",f,d);h.attachListener(h,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){d.forceNextSelectionCheck();d.selectionChange(1)});if(m&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var v;h.attachListener(h,"mousedown",function(){v=1});h.attachListener(e.getDocumentElement(),"mouseup",function(){v&&f.call(d);v=0})}else h.attachListener(CKEDITOR.env.ie?h:e.getDocumentElement(),"mouseup",f,d);CKEDITOR.env.webkit&& +h.attachListener(e,"keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:k(h)}},null,null,-1);h.attachListener(h,"keydown",l(d),null,null,-1)});d.on("setData",function(){d.unlockSelection();CKEDITOR.env.webkit&&c()});d.on("contentDomUnload",function(){d.unlockSelection()});if(CKEDITOR.env.ie9Compat)d.on("beforeDestroy",c,null,null,9);d.on("dataReady",function(){delete d._.fakeSelection;delete d._.hiddenSelectionContainer;d.selectionChange(1)}); +d.on("loadSnapshot",function(){var a=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),b=d.editable().getLast(a);if(b&&b.hasAttribute("data-cke-hidden-sel")){b.remove();if(CKEDITOR.env.gecko)(a=d.editable().getFirst(a))&&(a.is("br")&&a.getAttribute("_moz_editor_bogus_node"))&&a.remove()}},null,null,100);d.on("key",function(a){if(d.mode=="wysiwyg"){var b=d.getSelection();if(b.isFake){var c=o[a.data.keyCode];if(c)return c({editor:d,selected:b.getSelectedElement(),selection:b,keyEvent:a})}}})});CKEDITOR.on("instanceReady", +function(a){function b(){var a=e.editable();if(a)if(a=i(a)){var d=e.document.$.getSelection();if(d.type!="None"&&(d.anchorNode==a.$||d.focusNode==a.$))f=j(d);g=a.getText();a.setText(c(g))}}function d(){var a=e.editable();if(a)if(a=i(a)){a.setText(g);if(f){h(e.document.$,f);f=null}}}var e=a.editor,g,f;if(CKEDITOR.env.webkit){e.on("selectionChange",function(){var a=e.editable(),b=i(a);b&&(b.getCustomData("ready")?k(a):b.setCustomData("ready",1))},null,null,-1);e.on("beforeSetMode",function(){k(e.editable())}, +null,null,-1);e.on("beforeUndoImage",b);e.on("afterUndoImage",d);e.on("beforeGetData",b,null,null,0);e.on("getData",d)}});CKEDITOR.editor.prototype.selectionChange=function(b){(b?a:f).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){if((this._.savedSelection||this._.fakeSelection)&&!a)return this._.savedSelection||this._.fakeSelection;return(a=this.editable())&&this.mode=="wysiwyg"?new CKEDITOR.dom.selection(a):null};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1); if(a.getType()!=CKEDITOR.SELECTION_NONE){!a.isLocked&&a.lock();this._.savedSelection=a;return true}return false};CKEDITOR.editor.prototype.unlockSelection=function(a){var b=this._.savedSelection;if(b){b.unlock(a);delete this._.savedSelection;return true}return false};CKEDITOR.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath};CKEDITOR.dom.document.prototype.getSelection=function(){return new CKEDITOR.dom.selection(this)};CKEDITOR.dom.range.prototype.select=function(){var a= -this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);a.selectRanges([this]);return a};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT=3;var p=typeof window.getSelection!="function",t=1;CKEDITOR.dom.selection=function(a){if(a instanceof CKEDITOR.dom.selection)var b=a,a=a.root;var d=a instanceof CKEDITOR.dom.element;this.rev=b?b.rev:t++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root= -d?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(b){CKEDITOR.tools.extend(this._.cache,b._.cache);this.isFake=b.isFake;this.isLocked=b.isLocked;return this}var a=this.getNative(),c,e;if(a)if(a.getRangeAt)c=(e=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(e.commonAncestorContainer);else{try{e=a.createRange()}catch(g){}c=e&&CKEDITOR.dom.element.get(e.item&&e.item(0)||e.parentElement())}if(!c||!(c.type==CKEDITOR.NODE_ELEMENT||c.type==CKEDITOR.NODE_TEXT)||!this.root.equals(c)&& -!this.root.contains(c)){this._.cache.type=CKEDITOR.SELECTION_NONE;this._.cache.startElement=null;this._.cache.selectedElement=null;this._.cache.selectedText="";this._.cache.ranges=new CKEDITOR.dom.rangeList}return this};var v={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};CKEDITOR.dom.selection.prototype={getNative:function(){return this._.cache.nativeSel!==void 0?this._.cache.nativeSel:this._.cache.nativeSel= -p?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:p?function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE;try{var d=this.getNative(),c=d.type;if(c=="Text")b=CKEDITOR.SELECTION_TEXT;if(c=="Control")b=CKEDITOR.SELECTION_ELEMENT;if(d.createRange().parentElement())b=CKEDITOR.SELECTION_TEXT}catch(e){}return a.type=b}:function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_TEXT,d=this.getNative();if(!d||!d.rangeCount)b=CKEDITOR.SELECTION_NONE; -else if(d.rangeCount==1){var d=d.getRangeAt(0),c=d.startContainer;if(c==d.endContainer&&c.nodeType==1&&d.endOffset-d.startOffset==1&&v[c.childNodes[d.startOffset].nodeName.toLowerCase()])b=CKEDITOR.SELECTION_ELEMENT}return a.type=b},getRanges:function(){var a=p?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}var b=function(b,d){b=b.duplicate();b.collapse(d);var c=b.parentElement();if(!c.hasChildNodes())return{container:c,offset:0};for(var e=c.children,g,h,f=b.duplicate(),j=0, -i=e.length-1,k=-1,p,l;j<=i;){k=Math.floor((j+i)/2);g=e[k];f.moveToElementText(g);p=f.compareEndPoints("StartToStart",b);if(p>0)i=k-1;else if(p<0)j=k+1;else return{container:c,offset:a(g)}}if(k==-1||k==e.length-1&&p<0){f.moveToElementText(c);f.setEndPoint("StartToStart",b);f=f.text.replace(/(\r\n|\r)/g,"\n").length;e=c.childNodes;if(!f){g=e[e.length-1];return g.nodeType!=CKEDITOR.NODE_TEXT?{container:c,offset:e.length}:{container:g,offset:g.nodeValue.length}}for(c=e.length;f>0&&c>0;){h=e[--c];if(h.nodeType== -CKEDITOR.NODE_TEXT){l=h;f=f-h.nodeValue.length}}return{container:l,offset:-f}}f.collapse(p>0?true:false);f.setEndPoint(p>0?"StartToStart":"EndToStart",b);f=f.text.replace(/(\r\n|\r)/g,"\n").length;if(!f)return{container:c,offset:a(g)+(p>0?0:1)};for(;f>0;)try{h=g[p>0?"previousSibling":"nextSibling"];if(h.nodeType==CKEDITOR.NODE_TEXT){f=f-h.nodeValue.length;l=h}g=h}catch(m){return{container:c,offset:a(g)}}return{container:l,offset:p>0?-f:l.nodeValue.length+f}};return function(){var a=this.getNative(), -d=a&&a.createRange(),c=this.getType();if(!a)return[];if(c==CKEDITOR.SELECTION_TEXT){a=new CKEDITOR.dom.range(this.root);c=b(d,true);a.setStart(new CKEDITOR.dom.node(c.container),c.offset);c=b(d);a.setEnd(new CKEDITOR.dom.node(c.container),c.offset);a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&a.collapse();return[a]}if(c==CKEDITOR.SELECTION_ELEMENT){for(var c=[],e=0;e1){h=a[a.length-1];a[0].setEnd(h.endContainer,h.endOffset)}h=a[0];var a=h.collapsed,i,l,m;if((d=h.getEnclosedNode())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in v&&(!d.is("a")||!d.getText()))try{m=d.$.createControlRange();m.addElement(d.$);m.select();return}catch(B){}if(h.startContainer.type==CKEDITOR.NODE_ELEMENT&& -h.startContainer.getName()in b||h.endContainer.type==CKEDITOR.NODE_ELEMENT&&h.endContainer.getName()in b){h.shrink(CKEDITOR.NODE_ELEMENT,true);a=h.collapsed}m=h.createBookmark();b=m.startNode;if(!a)e=m.endNode;m=h.document.$.body.createTextRange();m.moveToElementText(b.$);m.moveStart("character",1);if(e){f=h.document.$.body.createTextRange();f.moveToElementText(e.$);m.setEndPoint("EndToEnd",f);m.moveEnd("character",-1)}else{i=b.getNext(j);l=b.hasAscendant("pre");i=!(i&&i.getText&&i.getText().match(f))&& -(l||!b.hasPrevious()||b.getPrevious().is&&b.getPrevious().is("br"));l=h.document.createElement("span");l.setHtml("");l.insertBefore(b);i&&h.document.createText("").insertBefore(b)}h.setStartBefore(b);b.remove();if(a){if(i){m.moveStart("character",-1);m.select();h.document.$.selection.clear()}else m.select();h.moveToPosition(l,CKEDITOR.POSITION_BEFORE_START);l.remove()}else{h.setEndBefore(e);e.remove();m.select()}}else{e=this.getNative();if(!e)return;this.removeAllRanges();for(m=0;m=0){h.collapse(1);l.setEnd(h.endContainer.$,h.endOffset)}else throw r;}e.addRange(l)}}this.reset();this.root.fire("selectionchange")}}}, -fake:function(a){var b=this.root.editor;this.reset();h(b);var d=this._.cache,c=new CKEDITOR.dom.range(this.root);c.setStartBefore(a);c.setEndAfter(a);d.ranges=new CKEDITOR.dom.rangeList(c);d.selectedElement=d.startElement=a;d.type=CKEDITOR.SELECTION_ELEMENT;d.selectedText=d.nativeSel=null;this.isFake=1;this.rev=t++;b._.fakeSelection=this;this.root.fire("selectionchange")},isHidden:function(){var a=this.getCommonAncestor();a&&a.type==CKEDITOR.NODE_TEXT&&(a=a.getParent());return!(!a||!a.data("cke-hidden-sel"))}, -createBookmarks:function(a){a=this.getRanges().createBookmarks(a);this.isFake&&(a.isFake=1);return a},createBookmarks2:function(a){a=this.getRanges().createBookmarks2(a);this.isFake&&(a.isFake=1);return a},selectBookmarks:function(a){for(var b=[],d,c=0;c]*>)[ \t\r\n]*/gi,"$1");f=f.replace(/([ \t\n\r]+| )/g, -" ");f=f.replace(/]*>/gi,"\n");if(CKEDITOR.env.ie){var i=a.getDocument().createElement("div");i.append(g);g.$.outerHTML="
"+f+"
";g.copyAttributes(i.getFirst());g=i.getFirst().remove()}else g.setHtml(f);b=g}else f?b=l(c?[a.getHtml()]:d(a),b):a.moveChildren(b);b.replace(a);if(e){var c=b,j;if((j=c.getPrevious(C))&&j.type==CKEDITOR.NODE_ELEMENT&&j.is("pre")){e=h(j.getHtml(),/\n$/,"")+"\n\n"+h(c.getHtml(),/^\n/,"");CKEDITOR.env.ie?c.$.outerHTML="
"+e+"
":c.setHtml(e);j.remove()}}else c&& -n(b)}function d(a){var b=[];h(a.getOuterHtml(),/(\S\s*)\n(?:\s|(]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,b,d){return b+"
"+d+"
"}).replace(/([\s\S]*?)<\/pre>/gi,function(a,d){b.push(d)});return b}function h(a,b,d){var c="",e="",a=a.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,d){b&&(c=b);d&&(e=d);return""});return c+a.replace(b,d)+e}function l(a,b){var d;a.length>1&&(d=new CKEDITOR.dom.documentFragment(b.getDocument()));
-for(var c=0;c"),e=e.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat(" ",a.length-1)+" "});if(d){var g=b.clone();g.setHtml(e);d.append(g)}else b.setHtml(e)}return d||b}function o(a,b){var d=this._.definition,
-c=d.attributes,d=d.styles,e=v(this)[a.getName()],g=CKEDITOR.tools.isEmpty(c)&&CKEDITOR.tools.isEmpty(d),h;for(h in c)if(!((h=="class"||this._.definition.fullMatch)&&a.getAttribute(h)!=u(h,c[h]))&&!(b&&h.slice(0,5)=="data-")){g=a.hasAttribute(h);a.removeAttribute(h)}for(var f in d)if(!(this._.definition.fullMatch&&a.getStyle(f)!=u(f,d[f],true))){g=g||!!a.getStyle(f);a.removeStyle(f)}m(a,e,w[a.getName()]);g&&(this._.definition.alwaysRemoveElement?n(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==
-CKEDITOR.ENTER_BR&&!a.hasAttributes()?n(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function s(a){for(var b=v(this),d=a.getElementsByTag(this.element),c,e=d.count();--e>=0;){c=d.getItem(e);c.isReadOnly()||o.call(this,c,true)}for(var g in b)if(g!=this.element){d=a.getElementsByTag(g);for(e=d.count()-1;e>=0;e--){c=d.getItem(e);c.isReadOnly()||m(c,b[g])}}}function m(a,b,d){if(b=b&&b.attributes)for(var c=0;c",a||b.name,"");return d.join("")},getDefinition:function(){return this._.definition}};CKEDITOR.style.getStyleText=function(a){var b=a._ST;if(b)return b;var b=a.styles,d=
-a.attributes&&a.attributes.style||"",c="";d.length&&(d=d.replace(z,";"));for(var e in b){var g=b[e],h=(e+":"+g).replace(z,";");g=="inherit"?c=c+h:d=d+h}d.length&&(d=CKEDITOR.tools.normalizeCssText(d,true));return a._ST=d+c};CKEDITOR.style.customHandlers={};CKEDITOR.style.addCustomHandler=function(a){var b=function(a){this._={definition:a};this.setup&&this.setup(a)};b.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype),{assignedTo:CKEDITOR.STYLE_OBJECT},a,true);
+this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);a.selectRanges([this]);return a};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT=3;var r=typeof window.getSelection!="function",t=1;CKEDITOR.dom.selection=function(a){if(a instanceof CKEDITOR.dom.selection)var b=a,a=a.root;var c=a instanceof CKEDITOR.dom.element;this.rev=b?b.rev:t++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=
+c?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(b){CKEDITOR.tools.extend(this._.cache,b._.cache);this.isFake=b.isFake;this.isLocked=b.isLocked;return this}var a=this.getNative(),d,e;if(a)if(a.getRangeAt)d=(e=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(e.commonAncestorContainer);else{try{e=a.createRange()}catch(g){}d=e&&CKEDITOR.dom.element.get(e.item&&e.item(0)||e.parentElement())}if(!d||!(d.type==CKEDITOR.NODE_ELEMENT||d.type==CKEDITOR.NODE_TEXT)||!this.root.equals(d)&&
+!this.root.contains(d)){this._.cache.type=CKEDITOR.SELECTION_NONE;this._.cache.startElement=null;this._.cache.selectedElement=null;this._.cache.selectedText="";this._.cache.ranges=new CKEDITOR.dom.rangeList}return this};var x={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};CKEDITOR.dom.selection.prototype={getNative:function(){return this._.cache.nativeSel!==void 0?this._.cache.nativeSel:this._.cache.nativeSel=
+r?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:r?function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE;try{var c=this.getNative(),d=c.type;if(d=="Text")b=CKEDITOR.SELECTION_TEXT;if(d=="Control")b=CKEDITOR.SELECTION_ELEMENT;if(c.createRange().parentElement())b=CKEDITOR.SELECTION_TEXT}catch(e){}return a.type=b}:function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_TEXT,c=this.getNative();if(!c||!c.rangeCount)b=CKEDITOR.SELECTION_NONE;
+else if(c.rangeCount==1){var c=c.getRangeAt(0),d=c.startContainer;if(d==c.endContainer&&d.nodeType==1&&c.endOffset-c.startOffset==1&&x[d.childNodes[c.startOffset].nodeName.toLowerCase()])b=CKEDITOR.SELECTION_ELEMENT}return a.type=b},getRanges:function(){var a=r?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}var b=function(b,c){b=b.duplicate();b.collapse(c);var d=b.parentElement();if(!d.hasChildNodes())return{container:d,offset:0};for(var e=d.children,g,h,f=b.duplicate(),j=0,
+i=e.length-1,k=-1,l,m;j<=i;){k=Math.floor((j+i)/2);g=e[k];f.moveToElementText(g);l=f.compareEndPoints("StartToStart",b);if(l>0)i=k-1;else if(l<0)j=k+1;else return{container:d,offset:a(g)}}if(k==-1||k==e.length-1&&l<0){f.moveToElementText(d);f.setEndPoint("StartToStart",b);f=f.text.replace(/(\r\n|\r)/g,"\n").length;e=d.childNodes;if(!f){g=e[e.length-1];return g.nodeType!=CKEDITOR.NODE_TEXT?{container:d,offset:e.length}:{container:g,offset:g.nodeValue.length}}for(d=e.length;f>0&&d>0;){h=e[--d];if(h.nodeType==
+CKEDITOR.NODE_TEXT){m=h;f=f-h.nodeValue.length}}return{container:m,offset:-f}}f.collapse(l>0?true:false);f.setEndPoint(l>0?"StartToStart":"EndToStart",b);f=f.text.replace(/(\r\n|\r)/g,"\n").length;if(!f)return{container:d,offset:a(g)+(l>0?0:1)};for(;f>0;)try{h=g[l>0?"previousSibling":"nextSibling"];if(h.nodeType==CKEDITOR.NODE_TEXT){f=f-h.nodeValue.length;m=h}g=h}catch(o){return{container:d,offset:a(g)}}return{container:m,offset:l>0?-f:m.nodeValue.length+f}};return function(){var a=this.getNative(),
+c=a&&a.createRange(),d=this.getType();if(!a)return[];if(d==CKEDITOR.SELECTION_TEXT){a=new CKEDITOR.dom.range(this.root);d=b(c,true);a.setStart(new CKEDITOR.dom.node(d.container),d.offset);d=b(c);a.setEnd(new CKEDITOR.dom.node(d.container),d.offset);a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&a.collapse();return[a]}if(d==CKEDITOR.SELECTION_ELEMENT){for(var d=[],e=0;e1){f=a[a.length-1];a[0].setEnd(f.endContainer,f.endOffset)}f=a[0];var a=f.collapsed,i,l,m;if((c=f.getEnclosedNode())&&c.type==CKEDITOR.NODE_ELEMENT&&c.getName()in x&&(!c.is("a")||!c.getText()))try{m=c.$.createControlRange();m.addElement(c.$);m.select();return}catch(D){}if(f.startContainer.type==CKEDITOR.NODE_ELEMENT&&
+f.startContainer.getName()in b||f.endContainer.type==CKEDITOR.NODE_ELEMENT&&f.endContainer.getName()in b){f.shrink(CKEDITOR.NODE_ELEMENT,true);a=f.collapsed}m=f.createBookmark();b=m.startNode;if(!a)g=m.endNode;m=f.document.$.body.createTextRange();m.moveToElementText(b.$);m.moveStart("character",1);if(g){h=f.document.$.body.createTextRange();h.moveToElementText(g.$);m.setEndPoint("EndToEnd",h);m.moveEnd("character",-1)}else{i=b.getNext(j);l=b.hasAscendant("pre");i=!(i&&i.getText&&i.getText().match(h))&&
+(l||!b.hasPrevious()||b.getPrevious().is&&b.getPrevious().is("br"));l=f.document.createElement("span");l.setHtml("");l.insertBefore(b);i&&f.document.createText("").insertBefore(b)}f.setStartBefore(b);b.remove();if(a){if(i){m.moveStart("character",-1);m.select();f.document.$.selection.clear()}else m.select();f.moveToPosition(l,CKEDITOR.POSITION_BEFORE_START);l.remove()}else{f.setEndBefore(g);g.remove();m.select()}}else{g=this.getNative();if(!g)return;this.removeAllRanges();for(m=0;m=0){f.collapse(1);l.setEnd(f.endContainer.$,f.endOffset)}else throw o;}g.addRange(l)}}this.reset();this.root.fire("selectionchange")}}},
+fake:function(a){var b=this.root.editor;this.reset();g(b);var c=this._.cache,d=new CKEDITOR.dom.range(this.root);d.setStartBefore(a);d.setEndAfter(a);c.ranges=new CKEDITOR.dom.rangeList(d);c.selectedElement=c.startElement=a;c.type=CKEDITOR.SELECTION_ELEMENT;c.selectedText=c.nativeSel=null;this.isFake=1;this.rev=t++;b._.fakeSelection=this;this.root.fire("selectionchange")},isHidden:function(){var a=this.getCommonAncestor();a&&a.type==CKEDITOR.NODE_TEXT&&(a=a.getParent());return!(!a||!a.data("cke-hidden-sel"))},
+createBookmarks:function(a){a=this.getRanges().createBookmarks(a);this.isFake&&(a.isFake=1);return a},createBookmarks2:function(a){a=this.getRanges().createBookmarks2(a);this.isFake&&(a.isFake=1);return a},selectBookmarks:function(a){for(var b=[],c,d=0;d]*>)[ \t\r\n]*/gi,"$1");f=f.replace(/([ \t\n\r]+| )/g,
+" ");f=f.replace(/]*>/gi,"\n");if(CKEDITOR.env.ie){var i=a.getDocument().createElement("div");i.append(e);e.$.outerHTML="
"+f+"
";e.copyAttributes(i.getFirst());e=i.getFirst().remove()}else e.setHtml(f);b=e}else f?b=l(c?[a.getHtml()]:h(a),b):a.moveChildren(b);b.replace(a);if(d){var c=b,j;if((j=c.getPrevious(B))&&j.type==CKEDITOR.NODE_ELEMENT&&j.is("pre")){d=g(j.getHtml(),/\n$/,"")+"\n\n"+g(c.getHtml(),/^\n/,"");CKEDITOR.env.ie?c.$.outerHTML="
"+d+"
":c.setHtml(d);j.remove()}}else c&& +q(b)}function h(a){var b=[];g(a.getOuterHtml(),/(\S\s*)\n(?:\s|(]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,b,c){return b+"
"+c+"
"}).replace(/([\s\S]*?)<\/pre>/gi,function(a,c){b.push(c)});return b}function g(a,b,c){var d="",e="",a=a.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,c){b&&(d=b);c&&(e=c);return""});return d+a.replace(b,c)+e}function l(a,b){var c;a.length>1&&(c=new CKEDITOR.dom.documentFragment(b.getDocument()));
+for(var d=0;d"),e=e.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat(" ",a.length-1)+" "});if(c){var f=b.clone();f.setHtml(e);c.append(f)}else b.setHtml(e)}return c||b}function s(a,b){var c=this._.definition,
+d=c.attributes,c=c.styles,e=x(this)[a.getName()],g=CKEDITOR.tools.isEmpty(d)&&CKEDITOR.tools.isEmpty(c),f;for(f in d)if(!((f=="class"||this._.definition.fullMatch)&&a.getAttribute(f)!=v(f,d[f]))&&!(b&&f.slice(0,5)=="data-")){g=a.hasAttribute(f);a.removeAttribute(f)}for(var h in c)if(!(this._.definition.fullMatch&&a.getStyle(h)!=v(h,c[h],true))){g=g||!!a.getStyle(h);a.removeStyle(h)}m(a,e,u[a.getName()]);g&&(this._.definition.alwaysRemoveElement?q(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==
+CKEDITOR.ENTER_BR&&!a.hasAttributes()?q(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function n(a){for(var b=x(this),c=a.getElementsByTag(this.element),d,e=c.count();--e>=0;){d=c.getItem(e);d.isReadOnly()||s.call(this,d,true)}for(var g in b)if(g!=this.element){c=a.getElementsByTag(g);for(e=c.count()-1;e>=0;e--){d=c.getItem(e);d.isReadOnly()||m(d,b[g])}}}function m(a,b,c){if(b=b&&b.attributes)for(var d=0;d",a||b.name,"");return c.join("")},getDefinition:function(){return this._.definition}};CKEDITOR.style.getStyleText=function(a){var b=a._ST;if(b)return b;var b=a.styles,c=
+a.attributes&&a.attributes.style||"",d="";c.length&&(c=c.replace(z,";"));for(var e in b){var g=b[e],f=(e+":"+g).replace(z,";");g=="inherit"?d=d+f:c=c+f}c.length&&(c=CKEDITOR.tools.normalizeCssText(c,true));return a._ST=c+d};CKEDITOR.style.customHandlers={};CKEDITOR.style.addCustomHandler=function(a){var b=function(a){this._={definition:a};this.setup&&this.setup(a)};b.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype),{assignedTo:CKEDITOR.STYLE_OBJECT},a,true);
 return this.customHandlers[a.type]=b};var E=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,A=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED}(),CKEDITOR.styleCommand=function(a,f){this.requiredContent=this.allowedContent=this.style=a;CKEDITOR.tools.extend(this,f,true)},CKEDITOR.styleCommand.prototype.exec=function(a){a.focus();this.state==CKEDITOR.TRISTATE_OFF?a.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&
-a.removeStyle(this.style)},CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet"),CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet),CKEDITOR.loadStylesSet=function(a,f,b){CKEDITOR.stylesSet.addExternal(a,f,"");CKEDITOR.stylesSet.load(a,b)},CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(a,f){var b=this._.styleStateChangeCallbacks;if(!b){b=this._.styleStateChangeCallbacks=[];this.on("selectionChange",function(a){for(var g=
-0;g"}}),"use strict",function(){var a={},f={},b;for(b in CKEDITOR.dtd.$blockLimit)b in CKEDITOR.dtd.$list||(a[b]=1);for(b in CKEDITOR.dtd.$block)b in CKEDITOR.dtd.$blockLimit||b in CKEDITOR.dtd.$empty||(f[b]=1);CKEDITOR.dom.elementPath=function(b,g){var i=null,k=null,e=[],j=b,d,g=g||b.getDocument().getBody();do if(j.type==CKEDITOR.NODE_ELEMENT){e.push(j);if(!this.lastElement){this.lastElement=j;if(j.is(CKEDITOR.dtd.$object)||j.getAttribute("contenteditable")=="false")continue}if(j.equals(g))break;
-if(!k){d=j.getName();j.getAttribute("contenteditable")=="true"?k=j:!i&&f[d]&&(i=j);if(a[d]){var h;if(h=!i){if(d=d=="div"){a:{d=j.getChildren();h=0;for(var l=d.count();h-1}:typeof a=="function"?c=a:typeof a=="object"&&(c=function(b){return b.getName()in a});var g=this.elements,i=g.length;f&&i--;if(b){g=Array.prototype.slice.call(g,
-0);g.reverse()}for(f=0;f=c){i=g.createText("");i.insertAfter(this)}else{a=g.createText("");a.insertAfter(i);a.remove()}return i},substring:function(a,
-f){return typeof f!="number"?this.$.nodeValue.substr(a):this.$.nodeValue.substring(a,f)}}),function(){function a(a,c,g){var f=a.serializable,k=c[g?"endContainer":"startContainer"],e=g?"endOffset":"startOffset",j=f?c.document.getById(a.startNode):a.startNode,a=f?c.document.getById(a.endNode):a.endNode;if(k.equals(j.getPrevious())){c.startOffset=c.startOffset-k.getLength()-a.getPrevious().getLength();k=a.getNext()}else if(k.equals(a.getPrevious())){c.startOffset=c.startOffset-k.getLength();k=a.getNext()}k.equals(j.getParent())&&
-c[e]++;k.equals(a.getParent())&&c[e]++;c[g?"endContainer":"startContainer"]=k;return c}CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,f)};var f={createIterator:function(){var a=this,c=CKEDITOR.dom.walker.bookmark(),g=[],f;return{getNextRange:function(k){f=f===void 0?0:f+1;var e=a[f];if(e&&a.length>1){if(!f)for(var j=a.length-1;j>=0;j--)g.unshift(a[j].createBookmark(true));if(k)for(var d=
-0;a[f+d+1];){for(var h=e.document,k=0,j=h.getById(g[d].endNode),h=h.getById(g[d+1].startNode);;){j=j.getNextSourceNode(false);if(h.equals(j))k=1;else if(c(j)||j.type==CKEDITOR.NODE_ELEMENT&&j.isBlockBoundary())continue;break}if(!k)break;d++}for(e.moveToBookmark(g.shift());d--;){j=a[++f];j.moveToBookmark(g.shift());e.setEnd(j.endContainer,j.endOffset)}}return e}}},createBookmarks:function(b){for(var c=[],g,f=0;fb?-1:1}),g=
-0,f;g',CKEDITOR.document);a.appendTo(CKEDITOR.document.getHead());try{var f=a.getComputedStyle("border-top-color"),
-b=a.getComputedStyle("border-right-color");CKEDITOR.env.hc=!!(f&&f==b)}catch(c){CKEDITOR.env.hc=false}a.remove()}if(CKEDITOR.env.hc)CKEDITOR.env.cssClass=CKEDITOR.env.cssClass+" cke_hc";CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(a=CKEDITOR._.pending){delete CKEDITOR._.pending;for(f=0;f"}}),"use strict",function(){var a={},f={},b;for(b in CKEDITOR.dtd.$blockLimit)b in CKEDITOR.dtd.$list||(a[b]=1);for(b in CKEDITOR.dtd.$block)b in CKEDITOR.dtd.$blockLimit||b in CKEDITOR.dtd.$empty||(f[b]=1);CKEDITOR.dom.elementPath=function(b,e){var i=null,k=null,c=[],j=b,h,e=e||b.getDocument().getBody();do if(j.type==CKEDITOR.NODE_ELEMENT){c.push(j);if(!this.lastElement){this.lastElement=j;if(j.is(CKEDITOR.dtd.$object)||j.getAttribute("contenteditable")=="false")continue}if(j.equals(e))break;
+if(!k){h=j.getName();j.getAttribute("contenteditable")=="true"?k=j:!i&&f[h]&&(i=j);if(a[h]){var g;if(g=!i){if(h=h=="div"){a:{h=j.getChildren();g=0;for(var l=h.count();g-1}:typeof a=="function"?d=a:typeof a=="object"&&(d=function(b){return b.getName()in a});var e=this.elements,i=e.length;f&&i--;if(b){e=Array.prototype.slice.call(e,
+0);e.reverse()}for(f=0;f=d){i=e.createText("");i.insertAfter(this)}else{a=e.createText("");a.insertAfter(i);a.remove()}return i},substring:function(a,
+f){return typeof f!="number"?this.$.nodeValue.substr(a):this.$.nodeValue.substring(a,f)}}),function(){function a(a,d,e){var f=a.serializable,k=d[e?"endContainer":"startContainer"],c=e?"endOffset":"startOffset",j=f?d.document.getById(a.startNode):a.startNode,a=f?d.document.getById(a.endNode):a.endNode;if(k.equals(j.getPrevious())){d.startOffset=d.startOffset-k.getLength()-a.getPrevious().getLength();k=a.getNext()}else if(k.equals(a.getPrevious())){d.startOffset=d.startOffset-k.getLength();k=a.getNext()}k.equals(j.getParent())&&
+d[c]++;k.equals(a.getParent())&&d[c]++;d[e?"endContainer":"startContainer"]=k;return d}CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,f)};var f={createIterator:function(){var a=this,d=CKEDITOR.dom.walker.bookmark(),e=[],f;return{getNextRange:function(k){f=f===void 0?0:f+1;var c=a[f];if(c&&a.length>1){if(!f)for(var j=a.length-1;j>=0;j--)e.unshift(a[j].createBookmark(true));if(k)for(var h=
+0;a[f+h+1];){for(var g=c.document,k=0,j=g.getById(e[h].endNode),g=g.getById(e[h+1].startNode);;){j=j.getNextSourceNode(false);if(g.equals(j))k=1;else if(d(j)||j.type==CKEDITOR.NODE_ELEMENT&&j.isBlockBoundary())continue;break}if(!k)break;h++}for(c.moveToBookmark(e.shift());h--;){j=a[++f];j.moveToBookmark(e.shift());c.setEnd(j.endContainer,j.endOffset)}}return c}}},createBookmarks:function(b){for(var d=[],e,f=0;fb?-1:1}),e=
+0,f;e',CKEDITOR.document);a.appendTo(CKEDITOR.document.getHead());try{var f=a.getComputedStyle("border-top-color"),
+b=a.getComputedStyle("border-right-color");CKEDITOR.env.hc=!!(f&&f==b)}catch(d){CKEDITOR.env.hc=false}a.remove()}if(CKEDITOR.env.hc)CKEDITOR.env.cssClass=CKEDITOR.env.cssClass+" cke_hc";CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(a=CKEDITOR._.pending){delete CKEDITOR._.pending;for(f=0;f",d.label,"",'");else{c={type:"hbox",widths:d.widths,padding:0,children:[{type:"html",html:'"},{type:"html",html:'"+e.call(this,b,d)+""}]};
-CKEDITOR.dialog._.uiElementBuilders.hbox.build(b,c,a)}return a.join("")})}},textInput:function(b,d,c){if(!(arguments.length<3)){a.call(this,d);var g=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",f={"class":"cke_dialog_ui_input_"+d.type,id:g,type:d.type};if(d.validate)this.validate=d.validate;if(d.maxLength)f.maxlength=d.maxLength;if(d.size)f.size=d.size;if(d.inputStyle)f.style=d.inputStyle;var i=this,k=false;b.on("load",function(){i.getInputElement().on("keydown",function(a){a.data.getKeystroke()==
-13&&(k=true)});i.getInputElement().on("keyup",function(a){if(a.data.getKeystroke()==13&&k){b.getButton("ok")&&setTimeout(function(){b.getButton("ok").click()},0);k=false}i.bidi&&e.call(i,a)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,b,d,c,function(){var a=['");return a.join("")})}},textarea:function(b,d,c){if(!(arguments.length<3)){a.call(this,d);var g=this,f=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",i={};if(d.validate)this.validate=d.validate;i.rows=d.rows||5;i.cols=d.cols||20;i["class"]="cke_dialog_ui_input_textarea "+(d["class"]||"");if(typeof d.inputStyle!="undefined")i.style=d.inputStyle;if(d.dir)i.dir=d.dir;if(g.bidi)b.on("load",function(){g.getInputElement().on("keyup",e)},g);CKEDITOR.ui.dialog.labeledElement.call(this,
-b,d,c,function(){i["aria-labelledby"]=this._.labelId;this._.required&&(i["aria-required"]=this._.required);var a=['");return a.join("")})}},checkbox:function(b,d,c){if(!(arguments.length<3)){var e=a.call(this,d,{"default":!!d["default"]});if(d.validate)this.validate=d.validate;CKEDITOR.ui.dialog.uiElement.call(this,
-b,d,c,"span",null,null,function(){var a=CKEDITOR.tools.extend({},d,{id:d.id?d.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},true),c=[],g=CKEDITOR.tools.getNextId()+"_label",f={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":g};k(a);if(d["default"])f.checked="checked";if(typeof a.inputStyle!="undefined")a.style=a.inputStyle;e.checkbox=new CKEDITOR.ui.dialog.uiElement(b,a,c,"input",null,f);c.push(' ");return c.join("")})}},radio:function(b,d,c){if(!(arguments.length<3)){a.call(this,d);if(!this._["default"])this._["default"]=this._.initValue=d.items[0][1];if(d.validate)this.validate=d.validate;var e=[],g=this;d.role="radiogroup";d.includeLabel=true;CKEDITOR.ui.dialog.labeledElement.call(this,b,d,c,function(){for(var a=[],c=[],f=(d.id?d.id:CKEDITOR.tools.getNextId())+"_radio",h=0;h'+CKEDITOR.tools.htmlEncode(d.label)+"")}},select:function(b,d,c){if(!(arguments.length<3)){var e=a.call(this,d);if(d.validate)this.validate=
-d.validate;e.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,b,d,c,function(){var a=CKEDITOR.tools.extend({},d,{id:d.id?d.id+"_select":CKEDITOR.tools.getNextId()+"_select"},true),c=[],g=[],f={id:e.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};c.push('");return c.join("")})}},file:function(b,d,c){if(!(arguments.length<3)){d["default"]===void 0&&(d["default"]="");var e=CKEDITOR.tools.extend(a.call(this,
-d),{definition:d,buttons:[]});if(d.validate)this.validate=d.validate;b.on("load",function(){CKEDITOR.document.getById(e.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,b,d,c,function(){e.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var a=['');return a.join("")})}},fileButton:function(b,d,c){var e=this;if(!(arguments.length<3)){a.call(this,d);if(d.validate)this.validate=d.validate;var g=CKEDITOR.tools.extend({},d),f=g.onClick;g.className=(g.className?g.className+" ":"")+"cke_dialog_ui_button";g.onClick=function(a){var c=d["for"];if(!f||f.call(this,a)!==false){b.getContentElement(c[0],c[1]).submit();this.disable()}};b.on("load",function(){b.getContentElement(d["for"][0],
-d["for"][1])._.buttons.push(e)});CKEDITOR.ui.dialog.button.call(this,b,g,c)}},html:function(){var a=/^\s*<[\w:]+\s+([^>]*)?>/,b=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,c=/\/$/;return function(e,g,f){if(!(arguments.length<3)){var i=[],k=g.html;k.charAt(0)!="<"&&(k=""+k+"");var r=g.focus;if(r){var p=this.focus;this.focus=function(){(typeof r=="function"?r:p).call(this);this.fire("focus")};if(g.isFocusable)this.isFocusable=this.isFocusable;this.keyboardFocusable=true}CKEDITOR.ui.dialog.uiElement.call(this,
-e,g,i,"span",null,null,"");i=i.join("").match(a);k=k.match(b)||["","",""];if(c.test(k[1])){k[1]=k[1].slice(0,-1);k[2]="/"+k[2]}f.push([k[1]," ",i[1]||"",k[2]].join(""))}}}(),fieldset:function(a,b,c,e,g){var f=g.label;this._={children:b};CKEDITOR.ui.dialog.uiElement.call(this,a,g,e,"fieldset",null,null,function(){var a=[];f&&a.push(""+f+"");for(var b=0;b",c.label,"",'");else{d={type:"hbox",widths:c.widths,padding:0,children:[{type:"html",html:'"},{type:"html",html:'"+e.call(this,b,c)+""}]};
+CKEDITOR.dialog._.uiElementBuilders.hbox.build(b,d,a)}return a.join("")})}},textInput:function(b,d,e){if(!(arguments.length<3)){a.call(this,d);var f=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",i={"class":"cke_dialog_ui_input_"+d.type,id:f,type:d.type};if(d.validate)this.validate=d.validate;if(d.maxLength)i.maxlength=d.maxLength;if(d.size)i.size=d.size;if(d.inputStyle)i.style=d.inputStyle;var k=this,m=false;b.on("load",function(){k.getInputElement().on("keydown",function(a){a.data.getKeystroke()==
+13&&(m=true)});k.getInputElement().on("keyup",function(a){if(a.data.getKeystroke()==13&&m){b.getButton("ok")&&setTimeout(function(){b.getButton("ok").click()},0);m=false}k.bidi&&c.call(k,a)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,b,d,e,function(){var a=['");return a.join("")})}},textarea:function(b,d,e){if(!(arguments.length<3)){a.call(this,d);var f=this,i=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",k={};if(d.validate)this.validate=d.validate;k.rows=d.rows||5;k.cols=d.cols||20;k["class"]="cke_dialog_ui_input_textarea "+(d["class"]||"");if(typeof d.inputStyle!="undefined")k.style=d.inputStyle;if(d.dir)k.dir=d.dir;if(f.bidi)b.on("load",function(){f.getInputElement().on("keyup",c)},f);CKEDITOR.ui.dialog.labeledElement.call(this,
+b,d,e,function(){k["aria-labelledby"]=this._.labelId;this._.required&&(k["aria-required"]=this._.required);var a=['");return a.join("")})}},checkbox:function(b,c,d){if(!(arguments.length<3)){var e=a.call(this,c,{"default":!!c["default"]});if(c.validate)this.validate=c.validate;CKEDITOR.ui.dialog.uiElement.call(this,
+b,c,d,"span",null,null,function(){var a=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},true),d=[],g=CKEDITOR.tools.getNextId()+"_label",f={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":g};k(a);if(c["default"])f.checked="checked";if(typeof a.inputStyle!="undefined")a.style=a.inputStyle;e.checkbox=new CKEDITOR.ui.dialog.uiElement(b,a,d,"input",null,f);d.push(' ");return d.join("")})}},radio:function(b,c,d){if(!(arguments.length<3)){a.call(this,c);if(!this._["default"])this._["default"]=this._.initValue=c.items[0][1];if(c.validate)this.validate=c.validate;var e=[],f=this;c.role="radiogroup";c.includeLabel=true;CKEDITOR.ui.dialog.labeledElement.call(this,b,c,d,function(){for(var a=[],d=[],g=(c.id?c.id:CKEDITOR.tools.getNextId())+"_radio",i=0;i'+CKEDITOR.tools.htmlEncode(c.label)+"")}},select:function(b,c,d){if(!(arguments.length<3)){var e=a.call(this,c);if(c.validate)this.validate=
+c.validate;e.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,b,c,d,function(){var a=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_select":CKEDITOR.tools.getNextId()+"_select"},true),d=[],f=[],g={id:e.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};d.push('");return d.join("")})}},file:function(b,c,d){if(!(arguments.length<3)){c["default"]===void 0&&(c["default"]="");var e=CKEDITOR.tools.extend(a.call(this,
+c),{definition:c,buttons:[]});if(c.validate)this.validate=c.validate;b.on("load",function(){CKEDITOR.document.getById(e.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,b,c,d,function(){e.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var a=['');return a.join("")})}},fileButton:function(b,c,d){var e=this;if(!(arguments.length<3)){a.call(this,c);if(c.validate)this.validate=c.validate;var f=CKEDITOR.tools.extend({},c),i=f.onClick;f.className=(f.className?f.className+" ":"")+"cke_dialog_ui_button";f.onClick=function(a){var d=c["for"];if(!i||i.call(this,a)!==false){b.getContentElement(d[0],d[1]).submit();this.disable()}};b.on("load",function(){b.getContentElement(c["for"][0],
+c["for"][1])._.buttons.push(e)});CKEDITOR.ui.dialog.button.call(this,b,f,d)}},html:function(){var a=/^\s*<[\w:]+\s+([^>]*)?>/,b=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,c=/\/$/;return function(d,e,f){if(!(arguments.length<3)){var i=[],k=e.html;k.charAt(0)!="<"&&(k=""+k+"");var o=e.focus;if(o){var r=this.focus;this.focus=function(){(typeof o=="function"?o:r).call(this);this.fire("focus")};if(e.isFocusable)this.isFocusable=this.isFocusable;this.keyboardFocusable=true}CKEDITOR.ui.dialog.uiElement.call(this,
+d,e,i,"span",null,null,"");i=i.join("").match(a);k=k.match(b)||["","",""];if(c.test(k[1])){k[1]=k[1].slice(0,-1);k[2]="/"+k[2]}f.push([k[1]," ",i[1]||"",k[2]].join(""))}}}(),fieldset:function(a,b,c,d,e){var f=e.label;this._={children:b};CKEDITOR.ui.dialog.uiElement.call(this,a,e,d,"fieldset",null,null,function(){var a=[];f&&a.push(""+f+"");for(var b=0;b0;)a.remove(0);return this},keyboardFocusable:true},
-c,true);CKEDITOR.ui.dialog.checkbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getInputElement:function(){return this._.checkbox.getElement()},setValue:function(a,b){this.getInputElement().$.checked=a;!b&&this.fire("change",{value:a})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(a,b){if(!CKEDITOR.env.ie||CKEDITOR.env.version>8)return g.onChange.apply(this,arguments);a.on("load",
-function(){var a=this._.checkbox.getElement();a.on("propertychange",function(b){b=b.data.$;b.propertyName=="checked"&&this.fire("change",{value:a.$.checked})},this)},this);this.on("change",b);return null}},keyboardFocusable:true},c,true);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(a,b){for(var c=this._.children,e,g=0;g0?new CKEDITOR.dom.element(a.$.forms[0].elements[0]):this.getElement()},submit:function(){this.getInputElement().getParent().$.submit();return this},
-getAction:function(){return this.getInputElement().getParent().$.action},registerEvents:function(a){var b=/^on([A-Z]\w+)/,c,e=function(a,b,d,c){a.on("formLoaded",function(){a.getInputElement().on(d,c,a)})},g;for(g in a)if(c=g.match(b))this.eventProcessors[g]?this.eventProcessors[g].call(this,this._.dialog,a[g]):e(this,this._.dialog,c[1].toLowerCase(),a[g]);return this},reset:function(){function a(){c.$.open();var j="";e.size&&(j=e.size-(CKEDITOR.env.ie?7:0));var t=b.frameId+"_input";c.$.write(['','