From d60375b138c1d2c5a7a44a73949b6ba1a2379766 Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Wed, 24 Jun 2015 21:48:36 -0400 Subject: [PATCH] vanilla ckeditor-4.2.2_full --- CHANGES.md | 19 ++ ckeditor.js | 533 ++++++++++++++++---------------- contents.css | 31 +- lang/af.js | 2 +- lang/ar.js | 2 +- lang/bg.js | 2 +- lang/bn.js | 2 +- lang/bs.js | 2 +- lang/ca.js | 2 +- lang/cs.js | 2 +- lang/cy.js | 2 +- lang/da.js | 2 +- lang/de.js | 2 +- lang/el.js | 2 +- lang/en-au.js | 2 +- lang/en-ca.js | 2 +- lang/en-gb.js | 2 +- lang/en.js | 2 +- lang/eo.js | 2 +- lang/es.js | 2 +- lang/et.js | 2 +- lang/eu.js | 2 +- lang/fa.js | 2 +- lang/fi.js | 2 +- lang/fo.js | 2 +- lang/fr-ca.js | 2 +- lang/fr.js | 2 +- lang/gl.js | 2 +- lang/gu.js | 2 +- lang/he.js | 2 +- lang/hi.js | 2 +- lang/hr.js | 2 +- lang/hu.js | 2 +- lang/id.js | 2 +- lang/is.js | 2 +- lang/it.js | 2 +- lang/ja.js | 2 +- lang/ka.js | 2 +- lang/km.js | 2 +- lang/ko.js | 2 +- lang/ku.js | 2 +- lang/lt.js | 2 +- lang/lv.js | 2 +- lang/mk.js | 2 +- lang/mn.js | 2 +- lang/ms.js | 2 +- lang/nb.js | 2 +- lang/nl.js | 2 +- lang/no.js | 2 +- lang/pl.js | 2 +- lang/pt-br.js | 2 +- lang/pt.js | 2 +- lang/ro.js | 2 +- lang/ru.js | 2 +- lang/si.js | 2 +- lang/sk.js | 2 +- lang/sl.js | 2 +- lang/sq.js | 2 +- lang/sr-latn.js | 2 +- lang/sr.js | 2 +- lang/sv.js | 2 +- lang/th.js | 2 +- lang/tr.js | 2 +- lang/ug.js | 2 +- lang/uk.js | 2 +- lang/vi.js | 2 +- lang/zh-cn.js | 2 +- lang/zh.js | 2 +- plugins/a11yhelp/dialogs/lang/el.js | 12 +- plugins/a11yhelp/dialogs/lang/ko.js | 9 + plugins/a11yhelp/dialogs/lang/nl.js | 4 +- plugins/specialchar/dialogs/lang/el.js | 18 +- plugins/specialchar/dialogs/lang/nl.js | 2 +- plugins/wsc/dialogs/wsc.js | 76 ++--- 74 files changed, 434 insertions(+), 400 deletions(-) create mode 100644 plugins/a11yhelp/dialogs/lang/ko.js diff --git a/CHANGES.md b/CHANGES.md index eb0096f..68ca403 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,25 @@ CKEditor 4 Changelog ==================== +## CKEditor 4.2.2 + +Fixed Issues: + +* [#9314](http://dev.ckeditor.com/ticket/9314): Fixed: Incorrect error message on closing a dialog window without saving changs. +* [#10308](http://dev.ckeditor.com/ticket/10308): [IE10] Fixed: Unspecified error when deleting a row. +* [#10945](http://dev.ckeditor.com/ticket/10945): [Chrome] Fixed: Clicking with a mouse inside the editor does not show the caret. +* [#10912](http://dev.ckeditor.com/ticket/10912): Prevent default action when content of a non-editable link is clicked. +* [#10913](http://dev.ckeditor.com/ticket/10913): Fixed [`CKEDITOR.plugins.addExternal`](http://docs.ckeditor.com/#!/api/CKEDITOR.resourceManager-method-addExternal) not handling paths including file name specified. +* [#10666](http://dev.ckeditor.com/ticket/10666): Fixed [`CKEDITOR.tools.isArray`](http://docs.ckeditor.com/#!/api/CKEDITOR.tools-method-isArray) not working cross frame. +* [#10910](http://dev.ckeditor.com/ticket/10910): [IE9] Fixed JavaScript error thrown in Compatibility Mode when clicking and/or typing in the editing area. +* [#10868](http://dev.ckeditor.com/ticket/10868): [IE8] Prevent the browser from crashing when applying the Inline Quotation style. +* [#10915](http://dev.ckeditor.com/ticket/10915): Fixed: Invalid CSS filter in the Kama skin. +* [#10914](http://dev.ckeditor.com/ticket/10914): Plugins [Indent List](http://ckeditor.com/addon/indentlist) and [Indent Block](http://ckeditor.com/addon/indentblock) are now included in the build configuration. +* [#10812](http://dev.ckeditor.com/ticket/10812): Fixed [`range#createBookmark2`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.range-method-createBookmark2) incorrectly normalizing offsets. This bug was causing many issues: [#10850](http://dev.ckeditor.com/ticket/10850), [#10842](http://dev.ckeditor.com/ticket/10842). +* [#10951](http://dev.ckeditor.com/ticket/10951): Reviewed and optimized focus handling on panels (combo, menu buttons, color buttons, and context menu) to enhance accessibility. Fixed [#10705](http://dev.ckeditor.com/ticket/10705), [#10706](http://dev.ckeditor.com/ticket/10706) and [#10707](http://dev.ckeditor.com/ticket/10707). +* [#10704](http://dev.ckeditor.com/ticket/10704): Fixed a JAWS issue with the Select Color dialog window title not being announced. +* [#10753](http://dev.ckeditor.com/ticket/10753): The floating toolbar in inline instances now has a dedicated accessibility label. + ## CKEditor 4.2.1 Fixed Issues: diff --git a/ckeditor.js b/ckeditor.js index 0bd6f49..b784779 100644 --- a/ckeditor.js +++ b/ckeditor.js @@ -2,14 +2,14 @@ Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ -(function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;window.CKEDITOR||(window.CKEDITOR=function(){var b={timestamp:"D8AD",version:"4.2.1",revision:"5010dd4",rnd:Math.floor(900*Math.random())+100,_:{pending:[]},status:"unloaded",basePath:function(){var a=window.CKEDITOR_BASEPATH||"";if(!a)for(var b=document.getElementsByTagName("script"),e=0;e=0;r--)if(m[r].priority<=j){m.splice(r+1,0,i);return{removeListener:k}}m.unshift(i)}return{removeListener:k}}, -once:function(){var a=arguments[1];arguments[1]=function(b){b.removeListener();return a.apply(this,arguments)};return this.on.apply(this,arguments)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,b=function(){a=1},e=0,h=function(){e=1};return function(j,i,k){var m=c(this)[j],j=a,q=e;a=e=0;if(m){var r=m.listeners;if(r.length)for(var r=r.slice(0),l,g=0;g=0&&e.listeners.splice(h,1)}},removeAllListeners:function(){var a=c(this),b;for(b in a)delete a[b]},hasListeners:function(a){return(a=c(this)[a])&&a.listeners.length>0}}}()); +return{define:function(a,d){var e=b.call(this,a);CKEDITOR.tools.extend(e,d,true)},on:function(a,d,e,c,j){function i(b,g,m,q){b={name:a,sender:this,editor:b,data:g,listenerData:c,stop:m,cancel:q,removeListener:l};return d.call(e,b)===false?false:b.data}function l(){q.removeListener(a,d)}var m=b.call(this,a);if(m.getListenerIndex(d)<0){m=m.listeners;e||(e=this);isNaN(j)&&(j=10);var q=this;i.fn=d;i.priority=j;for(var w=m.length-1;w>=0;w--)if(m[w].priority<=j){m.splice(w+1,0,i);return{removeListener:l}}m.unshift(i)}return{removeListener:l}}, +once:function(){var a=arguments[1];arguments[1]=function(b){b.removeListener();return a.apply(this,arguments)};return this.on.apply(this,arguments)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,b=function(){a=1},e=0,h=function(){e=1};return function(j,i,l){var m=c(this)[j],j=a,q=e;a=e=0;if(m){var w=m.listeners;if(w.length)for(var w=w.slice(0),k,g=0;g=0&&e.listeners.splice(h,1)}},removeAllListeners:function(){var a=c(this),b;for(b in a)delete a[b]},hasListeners:function(a){return(a=c(this)[a])&&a.listeners.length>0}}}()); CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(b,c){b in{instanceReady:1,loaded:1}&&(this[b]=true);return CKEDITOR.event.prototype.fire.call(this,b,c,this)},CKEDITOR.editor.prototype.fireOnce=function(b,c){b in{instanceReady:1,loaded:1}&&(this[b]=true);return CKEDITOR.event.prototype.fireOnce.call(this,b,c,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)); CKEDITOR.env||(CKEDITOR.env=function(){var b=navigator.userAgent.toLowerCase(),c=window.opera,a={ie:eval("/*@cc_on!@*/false"),opera:!!c&&c.version,webkit:b.indexOf(" applewebkit/")>-1,air:b.indexOf(" adobeair/")>-1,mac:b.indexOf("macintosh")>-1,quirks:document.compatMode=="BackCompat",mobile:b.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(b),isCustomDomain:function(){if(!this.ie)return false;var a=document.domain,f=window.location.hostname;return a!=f&&a!="["+f+"]"},secure:location.protocol== "https:"};a.gecko=navigator.product=="Gecko"&&!a.webkit&&!a.opera;if(a.webkit)b.indexOf("chrome")>-1?a.chrome=true:a.safari=true;var f=0;if(a.ie){f=a.quirks||!document.documentMode?parseFloat(b.match(/msie (\d+)/)[1]):document.documentMode;a.ie9Compat=f==9;a.ie8Compat=f==8;a.ie7Compat=f==7;a.ie6Compat=f<7||a.quirks&&f<10}if(a.gecko){var d=b.match(/rv:([\d\.]+)/);if(d){d=d[1].split(".");f=d[0]*1E4+(d[1]||0)*100+(d[2]||0)*1}}a.opera&&(f=parseFloat(c.version()));a.air&&(f=parseFloat(b.match(/ adobeair\/(\d+)/)[1])); @@ -19,17 +19,17 @@ a.webkit&&(f=parseFloat(b.match(/ applewebkit\/(\d+)/)[1]));a.version=f;a.isComp CKEDITOR.loadFullCore,c=CKEDITOR.loadFullCoreTimeout;if(b){CKEDITOR.status="basic_ready";b&&b._load?b():c&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},c*1E3)}})})();CKEDITOR.status="basic_loaded"}();CKEDITOR.dom={}; (function(){var b=[],c=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.opera?"-o-":CKEDITOR.env.ie?"-ms-":"";CKEDITOR.on("reset",function(){b=[]});CKEDITOR.tools={arrayCompare:function(a,f){if(!a&&!f)return true;if(!a||!f||a.length!=f.length)return false;for(var b=0;b"+b+""):d.push('');return d.join("")},htmlEncode:function(a){return(""+a).replace(/&/g,"&").replace(/>/g,">").replace(//g,">")},getNextNumber:function(){var a=0;return function(){return++a}}(),getNextId:function(){return"cke_"+this.getNextNumber()},override:function(a,b){var d=b(a);d.prototype=a.prototype;return d},setTimeout:function(a,b,d,c,h){h||(h=window);d||(d=h);return h.setTimeout(function(){c?a.apply(d,[].concat(c)):a.apply(d)},b||0)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(b){return b.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g; -return function(b){return b.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(b){return b.replace(a,"")}}(),indexOf:function(a,b){if(typeof b=="function")for(var d=0,c=a.length;d=0?a[d]:null},bind:function(a,b){return function(){return a.apply(b,arguments)}},createClass:function(a){var b=a.$, -d=a.base,c=a.privates||a._,h=a.proto,a=a.statics;!b&&(b=function(){d&&this.base.apply(this,arguments)});if(c)var j=b,b=function(){var a=this._||(this._={}),b;for(b in c){var f=c[b];a[b]=typeof f=="function"?CKEDITOR.tools.bind(f,this):f}j.apply(this,arguments)};if(d){b.prototype=this.prototypedCopy(d.prototype);b.prototype.constructor=b;b.base=d;b.baseProto=d.prototype;b.prototype.base=function(){this.base=d.prototype.base;d.apply(this,arguments);this.base=arguments.callee}}h&&this.extend(b.prototype, -h,true);a&&this.extend(b,a,true);return b},addFunction:function(a,f){return b.push(function(){return a.apply(f||this,arguments)})-1},removeFunction:function(a){b[a]=null},callFunction:function(a){var f=b[a];return f&&f.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a=/^-?\d+\.?\d*px$/,b;return function(d){b=CKEDITOR.tools.trim(d+"")+"px";return a.test(b)?b:d||""}}(),convertToPx:function(){var a;return function(b){if(!a){a=CKEDITOR.dom.element.createFromHtml('
', -CKEDITOR.document);CKEDITOR.document.getBody().append(a)}if(!/%$/.test(b)){a.setStyle("width",b);return a.$.clientWidth}return b}}(),repeat:function(a,b){return Array(b+1).join(a)},tryThese:function(){for(var a,b=0,d=arguments.length;b"+b+""):d.push('');return d.join("")},htmlEncode:function(a){return(""+a).replace(/&/g,"&").replace(/>/g,">").replace(//g,">")},getNextNumber:function(){var a=0;return function(){return++a}}(),getNextId:function(){return"cke_"+this.getNextNumber()},override:function(a,b){var d=b(a);d.prototype=a.prototype;return d},setTimeout:function(a,b,d,c,h){h||(h=window);d||(d=h);return h.setTimeout(function(){c?a.apply(d,[].concat(c)):a.apply(d)},b||0)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(b){return b.replace(a, +"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;return function(b){return b.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(b){return b.replace(a,"")}}(),indexOf:function(a,b){if(typeof b=="function")for(var d=0,c=a.length;d=0?a[d]:null},bind:function(a,b){return function(){return a.apply(b, +arguments)}},createClass:function(a){var b=a.$,d=a.base,c=a.privates||a._,h=a.proto,a=a.statics;!b&&(b=function(){d&&this.base.apply(this,arguments)});if(c)var j=b,b=function(){var a=this._||(this._={}),b;for(b in c){var f=c[b];a[b]=typeof f=="function"?CKEDITOR.tools.bind(f,this):f}j.apply(this,arguments)};if(d){b.prototype=this.prototypedCopy(d.prototype);b.prototype.constructor=b;b.base=d;b.baseProto=d.prototype;b.prototype.base=function(){this.base=d.prototype.base;d.apply(this,arguments);this.base= +arguments.callee}}h&&this.extend(b.prototype,h,true);a&&this.extend(b,a,true);return b},addFunction:function(a,f){return b.push(function(){return a.apply(f||this,arguments)})-1},removeFunction:function(a){b[a]=null},callFunction:function(a){var f=b[a];return f&&f.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a=/^-?\d+\.?\d*px$/,b;return function(d){b=CKEDITOR.tools.trim(d+"")+"px";return a.test(b)?b:d||""}}(),convertToPx:function(){var a;return function(b){if(!a){a= +CKEDITOR.dom.element.createFromHtml('
',CKEDITOR.document);CKEDITOR.document.getBody().append(a)}if(!/%$/.test(b)){a.setStyle("width",b);return a.$.clientWidth}return b}}(),repeat:function(a,b){return Array(b+1).join(a)},tryThese:function(){for(var a,b=0,d=arguments.length;b=100?"":"progid:DXImageTransform.Microsoft.Alpha(opacity="+a+")")}else this.setStyle("opacity",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select", "none"));if(CKEDITOR.env.ie||CKEDITOR.env.opera){this.setAttribute("unselectable","on");for(var a,b=this.getElementsByTag("*"),c=0,e=b.count();c0)k(0,b===true?i:b===false?h:i<0?i:h);if(c&&(j<0||e>0))k(j<0?j:e,0)},setState:function(a,b,c){b=b||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(b+"_on");this.removeClass(b+"_off");this.removeClass(b+"_disabled");c&&this.setAttribute("aria-pressed",true);c&&this.removeAttribute("aria-disabled"); +this.getParent();if(b){do{(b.$.clientWidth&&b.$.clientWidth0)l(0,b===true?i:b===false?h:i<0?i:h);if(c&&(j<0||e>0))l(j<0?j:e,0)},setState:function(a,b,c){b=b||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(b+"_on");this.removeClass(b+"_off");this.removeClass(b+"_disabled");c&&this.setAttribute("aria-pressed",true);c&&this.removeAttribute("aria-disabled"); break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(b+"_disabled");this.removeClass(b+"_off");this.removeClass(b+"_on");c&&this.setAttribute("aria-disabled",true);c&&this.removeAttribute("aria-pressed");break;default:this.addClass(b+"_off");this.removeClass(b+"_on");this.removeClass(b+"_disabled");c&&this.removeAttribute("aria-pressed");c&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(b){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)}, copyAttributes:function(a,b){for(var c=this.$.attributes,b=b||{},e=0;e=0&&b0&&c;)c=a(c,b.shift());else c=a(c,b);return c?new CKEDITOR.dom.node(c):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){this.on("contextmenu", @@ -103,96 +103,96 @@ function(a){a.data.getTarget().hasClass("cke_enable_context_menu")||a.data.preve b,c;for(b in a){c=a[b];if(c.element.equals(this)&&c.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO)return c}return null}});var c={width:["border-left-width","border-right-width","padding-left","padding-right"],height:["border-top-width","border-bottom-width","padding-top","padding-bottom"]};CKEDITOR.dom.element.prototype.setSize=function(a,c,d){if(typeof c=="number"){if(d&&(!CKEDITOR.env.ie||!CKEDITOR.env.quirks))c=c-b.call(this,a);this.setStyle(a,c+"px")}};CKEDITOR.dom.element.prototype.getSize=function(a, c){var d=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(a)],this.$["client"+CKEDITOR.tools.capitalize(a)])||0;c&&(d=d-b.call(this,a));return d}})();CKEDITOR.dom.documentFragment=function(b){b=b||CKEDITOR.document;this.$=b.type==CKEDITOR.NODE_DOCUMENT?b.$.createDocumentFragment():b}; CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(b){b=b.$;b.parentNode.insertBefore(this.$,b.nextSibling)}},!0,{append:1,appendBogus:1,getFirst:1,getLast:1,getParent:1,getNext:1,getPrevious:1,appendTo:1,moveChildren:1,insertBefore:1,insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,getChildCount:1,getChild:1,getChildren:1}); -(function(){function b(a,b){var c=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(c.collapsed){this.end();return null}c.optimize()}var d,m=c.startContainer;d=c.endContainer;var q=c.startOffset,f=c.endOffset,l,g=this.guard,p=this.type,e=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var u=d.type==CKEDITOR.NODE_ELEMENT?d:d.getParent(),o=d.type==CKEDITOR.NODE_ELEMENT?d.getChild(f):d.getNext();this._.guardLTR=function(a,b){return(!b||!u.equals(a))&&(!o|| -!a.equals(o))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}if(a&&!this._.guardRTL){var F=m.type==CKEDITOR.NODE_ELEMENT?m:m.getParent(),A=m.type==CKEDITOR.NODE_ELEMENT?q?m.getChild(q-1):null:m.getPrevious();this._.guardRTL=function(a,b){return(!b||!F.equals(a))&&(!A||!a.equals(A))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}var s=a?this._.guardRTL:this._.guardLTR;l=g?function(a,b){return s(a,b)===false?false:g(a,b)}:s;if(this.current)d=this.current[e](false,p,l);else{if(a)d.type== -CKEDITOR.NODE_ELEMENT&&(d=f>0?d.getChild(f-1):l(d,true)===false?null:d.getPreviousSourceNode(true,p,l));else{d=m;if(d.type==CKEDITOR.NODE_ELEMENT&&!(d=d.getChild(q)))d=l(m,true)===false?null:m.getNextSourceNode(true,p,l)}d&&l(d)===false&&(d=null)}for(;d&&!this._.end;){this.current=d;if(!this.evaluator||this.evaluator(d)!==false){if(!b)return d}else if(b&&this.evaluator)return false;d=d[e](false,p,l)}this.end();return this.current=null}function c(a){for(var c,d=null;c=b.call(this,a);)d=c;return d} +(function(){function b(a,b){var c=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(c.collapsed){this.end();return null}c.optimize()}var d,m=c.startContainer;d=c.endContainer;var q=c.startOffset,f=c.endOffset,k,g=this.guard,p=this.type,e=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var t=d.type==CKEDITOR.NODE_ELEMENT?d:d.getParent(),n=d.type==CKEDITOR.NODE_ELEMENT?d.getChild(f):d.getNext();this._.guardLTR=function(a,b){return(!b||!t.equals(a))&&(!n|| +!a.equals(n))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}if(a&&!this._.guardRTL){var E=m.type==CKEDITOR.NODE_ELEMENT?m:m.getParent(),B=m.type==CKEDITOR.NODE_ELEMENT?q?m.getChild(q-1):null:m.getPrevious();this._.guardRTL=function(a,b){return(!b||!E.equals(a))&&(!B||!a.equals(B))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}var r=a?this._.guardRTL:this._.guardLTR;k=g?function(a,b){return r(a,b)===false?false:g(a,b)}:r;if(this.current)d=this.current[e](false,p,k);else{if(a)d.type== +CKEDITOR.NODE_ELEMENT&&(d=f>0?d.getChild(f-1):k(d,true)===false?null:d.getPreviousSourceNode(true,p,k));else{d=m;if(d.type==CKEDITOR.NODE_ELEMENT&&!(d=d.getChild(q)))d=k(m,true)===false?null:m.getNextSourceNode(true,p,k)}d&&k(d)===false&&(d=null)}for(;d&&!this._.end;){this.current=d;if(!this.evaluator||this.evaluator(d)!==false){if(!b)return d}else if(b&&this.evaluator)return false;d=d[e](false,p,k)}this.end();return this.current=null}function c(a){for(var c,d=null;c=b.call(this,a);)d=c;return d} CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(a){this.range=a;this._={}},proto:{end:function(){this._.end=1},next:function(){return b.call(this)},previous:function(){return b.call(this,1)},checkForward:function(){return b.call(this,0,1)!==false},checkBackward:function(){return b.call(this,1,1)!==false},lastForward:function(){return c.call(this)},lastBackward:function(){return c.call(this,1)},reset:function(){delete this.current;this._={}}}});var a={block:1,"list-item":1,table:1,"table-row-group":1, "table-header-group":1,"table-footer-group":1,"table-row":1,"table-column-group":1,"table-column":1,"table-cell":1,"table-caption":1};CKEDITOR.dom.element.prototype.isBlockBoundary=function(b){b=b?CKEDITOR.tools.extend({},CKEDITOR.dtd.$block,b||{}):CKEDITOR.dtd.$block;return this.getComputedStyle("float")=="none"&&a[this.getComputedStyle("display")]||b[this.getName()]};CKEDITOR.dom.walker.blockBoundary=function(a){return function(b){return!(b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary(a))}};CKEDITOR.dom.walker.listItemBoundary= function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark=function(a,b){function c(a){return a&&a.getName&&a.getName()=="span"&&a.data("cke-bookmark")}return function(d){var m,q;m=d&&d.type!=CKEDITOR.NODE_ELEMENT&&(q=d.getParent())&&c(q);m=a?m:m||c(d);return!!(b^m)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(b){var c;b&&b.type==CKEDITOR.NODE_TEXT&&(c=!CKEDITOR.tools.trim(b.getText())||CKEDITOR.env.webkit&&b.getText()=="​");return!!(a^c)}};CKEDITOR.dom.walker.invisible= function(a){var b=CKEDITOR.dom.walker.whitespaces();return function(c){if(b(c))c=1;else{c.type==CKEDITOR.NODE_TEXT&&(c=c.getParent());c=!c.$.offsetHeight}return!!(a^c)}};CKEDITOR.dom.walker.nodeType=function(a,b){return function(c){return!!(b^c.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function b(a){return!d(a)&&!e(a)}return function(c){var d=!CKEDITOR.env.ie?c.is&&c.is("br"):c.getText&&f.test(c.getText());if(d){d=c.getParent();c=c.getNext(b);d=d.isBlockBoundary()&&(!c||c.type==CKEDITOR.NODE_ELEMENT&& c.isBlockBoundary())}return!!(a^d)}};var f=/^[\t\r\n ]*(?: |\xa0)$/,d=CKEDITOR.dom.walker.whitespaces(),e=CKEDITOR.dom.walker.bookmark();CKEDITOR.dom.element.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(e(a)||d(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in CKEDITOR.dtd.$inline&&!(a.getName()in CKEDITOR.dtd.$empty));return a&&(!CKEDITOR.env.ie?a.is&&a.is("br"):a.getText&&f.test(a.getText()))?a:false}})(); CKEDITOR.dom.range=function(b){this.endOffset=this.endContainer=this.startOffset=this.startContainer=null;this.collapsed=true;var c=b instanceof CKEDITOR.dom.document;this.document=c?b:b.getDocument();this.root=c?b.getBody():b}; -(function(){function b(){var a=false,b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(true),l=CKEDITOR.dom.walker.bogus();return function(g){if(c(g)||b(g))return true;if(l(g)&&!a)return a=true;return g.type==CKEDITOR.NODE_TEXT&&(g.hasAscendant("pre")||CKEDITOR.tools.trim(g.getText()).length)||g.type==CKEDITOR.NODE_ELEMENT&&!g.is(e)?false:true}}function c(a){var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(1);return function(l){return c(l)||b(l)?true:!a&&h(l)|| -l.type==CKEDITOR.NODE_ELEMENT&&l.is(CKEDITOR.dtd.$removeEmpty)}}function a(a){return!j(a)&&!i(a)}var f=function(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset},d=function(a,b,c,l){a.optimizeBookmark();var g=a.startContainer,d=a.endContainer,f=a.startOffset,e=a.endOffset,h,i;if(d.type==CKEDITOR.NODE_TEXT)d=d.split(e);else if(d.getChildCount()>0)if(e>=d.getChildCount()){d=d.append(a.document.createText(""));i=true}else d=d.getChild(e); -if(g.type==CKEDITOR.NODE_TEXT){g.split(f);g.equals(d)&&(d=g.getNext())}else if(f)if(f>=g.getChildCount()){g=g.append(a.document.createText(""));h=true}else g=g.getChild(f).getPrevious();else{g=g.append(a.document.createText(""),1);h=true}var f=g.getParents(),e=d.getParents(),j,s,x;for(j=0;j0&&!t.equals(d)&&(C=k.append(t.clone()));if(!f[c]||t.$.parentNode!=f[c].$.parentNode)for(t=t.getPrevious();t;){if(t.equals(f[c])||t.equals(g))break;y=t.getPrevious();if(b==2)k.$.insertBefore(t.$.cloneNode(true),k.$.firstChild);else{t.remove();b==1&&k.$.insertBefore(t.$,k.$.firstChild)}t=y}k&&(k=C)}if(b==2){s=a.startContainer;if(s.type==CKEDITOR.NODE_TEXT){s.$.data=s.$.data+s.$.nextSibling.data; -s.$.parentNode.removeChild(s.$.nextSibling)}a=a.endContainer;if(a.type==CKEDITOR.NODE_TEXT&&a.$.nextSibling){a.$.data=a.$.data+a.$.nextSibling.data;a.$.parentNode.removeChild(a.$.nextSibling)}}else{if(s&&x&&(g.$.parentNode!=s.$.parentNode||d.$.parentNode!=x.$.parentNode)){b=x.getIndex();h&&x.$.parentNode==g.$.parentNode&&b--;if(l&&s.type==CKEDITOR.NODE_ELEMENT){l=CKEDITOR.dom.element.createFromHtml(' ',a.document);l.insertAfter(s);s.mergeSiblings(false); -a.moveToBookmark({startNode:l})}else a.setStart(x.getParent(),b)}a.collapse(true)}h&&g.remove();i&&d.$.parentNode&&d.remove()},e={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,"var":1},h=CKEDITOR.dom.walker.bogus(),j=new CKEDITOR.dom.walker.whitespaces,i=new CKEDITOR.dom.walker.bookmark,k=/^[\t\r\n ]*(?: |\xa0)$/;CKEDITOR.dom.range.prototype={clone:function(){var a=new CKEDITOR.dom.range(this.root); +(function(){function b(){var a=false,b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(true),k=CKEDITOR.dom.walker.bogus();return function(g){if(c(g)||b(g))return true;if(k(g)&&!a)return a=true;return g.type==CKEDITOR.NODE_TEXT&&(g.hasAscendant("pre")||CKEDITOR.tools.trim(g.getText()).length)||g.type==CKEDITOR.NODE_ELEMENT&&!g.is(e)?false:true}}function c(a){var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(1);return function(k){return c(k)||b(k)?true:!a&&h(k)|| +k.type==CKEDITOR.NODE_ELEMENT&&k.is(CKEDITOR.dtd.$removeEmpty)}}function a(a){return!j(a)&&!i(a)}var f=function(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset},d=function(a,b,c,k){a.optimizeBookmark();var g=a.startContainer,d=a.endContainer,f=a.startOffset,e=a.endOffset,h,i;if(d.type==CKEDITOR.NODE_TEXT)d=d.split(e);else if(d.getChildCount()>0)if(e>=d.getChildCount()){d=d.append(a.document.createText(""));i=true}else d=d.getChild(e); +if(g.type==CKEDITOR.NODE_TEXT){g.split(f);g.equals(d)&&(d=g.getNext())}else if(f)if(f>=g.getChildCount()){g=g.append(a.document.createText(""));h=true}else g=g.getChild(f).getPrevious();else{g=g.append(a.document.createText(""),1);h=true}var f=g.getParents(),e=d.getParents(),j,r,x;for(j=0;j0&&!s.equals(d)&&(C=l.append(s.clone()));if(!f[c]||s.$.parentNode!=f[c].$.parentNode)for(s=s.getPrevious();s;){if(s.equals(f[c])||s.equals(g))break;y=s.getPrevious();if(b==2)l.$.insertBefore(s.$.cloneNode(true),l.$.firstChild);else{s.remove();b==1&&l.$.insertBefore(s.$,l.$.firstChild)}s=y}l&&(l=C)}if(b==2){r=a.startContainer;if(r.type==CKEDITOR.NODE_TEXT){r.$.data=r.$.data+r.$.nextSibling.data; +r.$.parentNode.removeChild(r.$.nextSibling)}a=a.endContainer;if(a.type==CKEDITOR.NODE_TEXT&&a.$.nextSibling){a.$.data=a.$.data+a.$.nextSibling.data;a.$.parentNode.removeChild(a.$.nextSibling)}}else{if(r&&x&&(g.$.parentNode!=r.$.parentNode||d.$.parentNode!=x.$.parentNode)){b=x.getIndex();h&&x.$.parentNode==g.$.parentNode&&b--;if(k&&r.type==CKEDITOR.NODE_ELEMENT){k=CKEDITOR.dom.element.createFromHtml(' ',a.document);k.insertAfter(r);r.mergeSiblings(false); +a.moveToBookmark({startNode:k})}else a.setStart(x.getParent(),b)}a.collapse(true)}h&&g.remove();i&&d.$.parentNode&&d.remove()},e={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,"var":1},h=CKEDITOR.dom.walker.bogus(),j=new CKEDITOR.dom.walker.whitespaces,i=new CKEDITOR.dom.walker.bookmark,l=/^[\t\r\n ]*(?: |\xa0)$/;CKEDITOR.dom.range.prototype={clone:function(){var a=new CKEDITOR.dom.range(this.root); a.startContainer=this.startContainer;a.startOffset=this.startOffset;a.endContainer=this.endContainer;a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){if(a){this.endContainer=this.startContainer;this.endOffset=this.startOffset}else{this.startContainer=this.endContainer;this.startOffset=this.endOffset}this.collapsed=true},cloneContents:function(){var a=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||d(this,2,a);return a},deleteContents:function(a){this.collapsed|| d(this,0,null,a)},extractContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||d(this,1,b,a);return b},createBookmark:function(a){var b,c,d,g,p=this.collapsed;b=this.document.createElement("span");b.data("cke-bookmark",1);b.setStyle("display","none");b.setHtml(" ");if(a){d="cke_bm_"+CKEDITOR.tools.getNextNumber();b.setAttribute("id",d+(p?"C":"S"))}if(!p){c=b.clone();c.setHtml(" ");a&&c.setAttribute("id",d+"E");g=this.clone();g.collapse();g.insertNode(c)}g= -this.clone();g.collapse(true);g.insertNode(b);if(c){this.setStartAfter(b);this.setEndBefore(c)}else this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return{startNode:a?d+(p?"C":"S"):b,endNode:a?d+"E":c,serializable:a,collapsed:p}},createBookmark2:function(){function a(b,c){return c>0&&b&&b.type==CKEDITOR.NODE_TEXT&&b.getPrevious()&&b.getPrevious().type==CKEDITOR.NODE_TEXT}function b(c){var d,g,p=c.container,q=c.offset;if(p.type==CKEDITOR.NODE_ELEMENT){if(d=p.getChild(q)){if(a(d,q)){p=d;q=0}}else{d= -p.getLast();if(a(d,q)){p=d;q=d.getLength()}}d&&d.type==CKEDITOR.NODE_ELEMENT&&(q=d.getIndex(1))}for(;p.type==CKEDITOR.NODE_TEXT&&(g=p.getPrevious())&&g.type==CKEDITOR.NODE_TEXT;){p=g;q=q+g.getLength()}c.container=p;c.offset=q}return function(a){var c=this.collapsed,g={container:this.startContainer,offset:this.startOffset},d={container:this.endContainer,offset:this.endOffset};if(!g.container||!d.container)return{start:0,end:0};if(a){b(g);c||b(d)}return{start:g.container.getAddress(a),end:c?null:d.container.getAddress(a), -startOffset:g.offset,endOffset:d.offset,normalized:a,collapsed:c,is2:true}}}(),moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),c=a.startOffset,d=a.end&&this.document.getByAddress(a.end,a.normalized),a=a.endOffset;this.setStart(b,c);d?this.setEnd(d,a):this.collapse(true)}else{b=(c=a.serializable)?this.document.getById(a.startNode):a.startNode;a=c?this.document.getById(a.endNode):a.endNode;this.setStartBefore(b);b.remove();if(a){this.setEndBefore(a);a.remove()}else this.collapse(true)}}, -getBoundaryNodes:function(){var a=this.startContainer,b=this.endContainer,c=this.startOffset,d=this.endOffset,g;if(a.type==CKEDITOR.NODE_ELEMENT){g=a.getChildCount();if(g>c)a=a.getChild(c);else if(g<1)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=a.getNextSourceNode()||a}}if(b.type==CKEDITOR.NODE_ELEMENT){g=b.getChildCount();if(g>d)b=b.getChild(d).getPreviousSourceNode(true);else if(g<1)b=b.getPreviousSourceNode();else{for(b=b.$;b.lastChild;)b= -b.lastChild;b=new CKEDITOR.dom.node(b)}}a.getPosition(b)&CKEDITOR.POSITION_FOLLOWING&&(a=b);return{startNode:a,endNode:b}},getCommonAncestor:function(a,b){var c=this.startContainer,d=this.endContainer,c=c.equals(d)?a&&c.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?c.getChild(this.startOffset):c:c.getCommonAncestor(d);return b&&!c.is?c.getParent():c},optimize:function(){var a=this.startContainer,b=this.startOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setStartAfter(a): -this.setStartBefore(a));a=this.endContainer;b=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,b=this.endContainer;a.is&&(a.is("span")&&a.data("cke-bookmark"))&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);b&&(b.is&&b.is("span")&&b.data("cke-bookmark"))&&this.setEndAt(b,CKEDITOR.POSITION_AFTER_END)},trim:function(a,b){var c=this.startContainer,d=this.startOffset,g=this.collapsed; -if((!a||g)&&c&&c.type==CKEDITOR.NODE_TEXT){if(d)if(d>=c.getLength()){d=c.getIndex()+1;c=c.getParent()}else{var p=c.split(d),d=c.getIndex()+1,c=c.getParent();if(this.startContainer.equals(this.endContainer))this.setEnd(p,this.endOffset-this.startOffset);else if(c.equals(this.endContainer))this.endOffset=this.endOffset+1}else{d=c.getIndex();c=c.getParent()}this.setStart(c,d);if(g){this.collapse(true);return}}c=this.endContainer;d=this.endOffset;if(!b&&!g&&c&&c.type==CKEDITOR.NODE_TEXT){if(d){d>=c.getLength()|| -c.split(d);d=c.getIndex()+1}else d=c.getIndex();c=c.getParent();this.setEnd(c,d)}},enlarge:function(a,b){switch(a){case CKEDITOR.ENLARGE_INLINE:var c=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;var d=this.getCommonAncestor(),g=this.root,p,f,e,h,i,j=false,s,x;s=this.startContainer;x=this.startOffset;if(s.type==CKEDITOR.NODE_TEXT){if(x){s=!CKEDITOR.tools.trim(s.substring(0,x)).length&&s;j=!!s}if(s&&!(h=s.getPrevious()))e=s.getParent()}else{x&&(h=s.getChild(x-1)||s.getLast());h||(e=s)}for(;e|| -h;){if(e&&!h){!i&&e.equals(d)&&(i=true);if(c?e.isBlockBoundary():!g.contains(e))break;if(!j||e.getComputedStyle("display")!="inline"){j=false;i?p=e:this.setStartBefore(e)}h=e.getPrevious()}for(;h;){s=false;if(h.type==CKEDITOR.NODE_COMMENT)h=h.getPrevious();else{if(h.type==CKEDITOR.NODE_TEXT){x=h.getText();/[^\s\ufeff]/.test(x)&&(h=null);s=/[\s\ufeff]$/.test(x)}else if((h.$.offsetWidth>0||b&&h.is("br"))&&!h.data("cke-bookmark"))if(j&&CKEDITOR.dtd.$removeEmpty[h.getName()]){x=h.getText();if(/[^\s\ufeff]/.test(x))h= -null;else for(var k=h.$.getElementsByTagName("*"),t=0,C;C=k[t++];)if(!CKEDITOR.dtd.$removeEmpty[C.nodeName.toLowerCase()]){h=null;break}h&&(s=!!x.length)}else h=null;s&&(j?i?p=e:e&&this.setStartBefore(e):j=true);if(h){s=h.getPrevious();if(!e&&!s){e=h;h=null;break}h=s}else e=null}}e&&(e=e.getParent())}s=this.endContainer;x=this.endOffset;e=h=null;i=j=false;if(s.type==CKEDITOR.NODE_TEXT){s=!CKEDITOR.tools.trim(s.substring(x)).length&&s;j=!(s&&s.getLength());if(s&&!(h=s.getNext()))e=s.getParent()}else(h= -s.getChild(x))||(e=s);for(;e||h;){if(e&&!h){!i&&e.equals(d)&&(i=true);if(c?e.isBlockBoundary():!g.contains(e))break;if(!j||e.getComputedStyle("display")!="inline"){j=false;i?f=e:e&&this.setEndAfter(e)}h=e.getNext()}for(;h;){s=false;if(h.type==CKEDITOR.NODE_TEXT){x=h.getText();/[^\s\ufeff]/.test(x)&&(h=null);s=/^[\s\ufeff]/.test(x)}else if(h.type==CKEDITOR.NODE_ELEMENT){if((h.$.offsetWidth>0||b&&h.is("br"))&&!h.data("cke-bookmark"))if(j&&CKEDITOR.dtd.$removeEmpty[h.getName()]){x=h.getText();if(/[^\s\ufeff]/.test(x))h= -null;else{k=h.$.getElementsByTagName("*");for(t=0;C=k[t++];)if(!CKEDITOR.dtd.$removeEmpty[C.nodeName.toLowerCase()]){h=null;break}}h&&(s=!!x.length)}else h=null}else s=1;s&&j&&(i?f=e:this.setEndAfter(e));if(h){s=h.getNext();if(!e&&!s){e=h;h=null;break}h=s}else e=null}e&&(e=e.getParent())}if(p&&f){d=p.contains(f)?f:p;this.setStartBefore(d);this.setEndAfter(d)}break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:e=new CKEDITOR.dom.range(this.root);g=this.root;e.setStartAt(g, -CKEDITOR.POSITION_AFTER_START);e.setEnd(this.startContainer,this.startOffset);e=new CKEDITOR.dom.walker(e);var y,n,w=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),I=function(a){var b=w(a);b||(y=a);return b},c=function(a){var b=I(a);!b&&(a.is&&a.is("br"))&&(n=a);return b};e.guard=I;e=e.lastBackward();y=y||g;this.setStartAt(y,!y.is("br")&&(!e&&this.checkStartOfBlock()||e&&y.contains(e))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){e= -this.clone();e=new CKEDITOR.dom.walker(e);var G=CKEDITOR.dom.walker.whitespaces(),D=CKEDITOR.dom.walker.bookmark();e.evaluator=function(a){return!G(a)&&!D(a)};if((e=e.previous())&&e.type==CKEDITOR.NODE_ELEMENT&&e.is("br"))break}e=this.clone();e.collapse();e.setEndAt(g,CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(e);e.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?c:I;y=null;e=e.lastForward();y=y||g;this.setEndAt(y,!e&&this.checkEndOfBlock()||e&&y.contains(e)?CKEDITOR.POSITION_BEFORE_END: -CKEDITOR.POSITION_BEFORE_START);n&&this.setEndAfter(n)}},shrink:function(a,b,c){if(!this.collapsed){var a=a||CKEDITOR.SHRINK_TEXT,d=this.clone(),g=this.startContainer,e=this.endContainer,f=this.startOffset,h=this.endOffset,i=1,j=1;if(g&&g.type==CKEDITOR.NODE_TEXT)if(f)if(f>=g.getLength())d.setStartAfter(g);else{d.setStartBefore(g);i=0}else d.setStartBefore(g);if(e&&e.type==CKEDITOR.NODE_TEXT)if(h)if(h>=e.getLength())d.setEndAfter(e);else{d.setEndAfter(e);j=0}else d.setEndBefore(e);var d=new CKEDITOR.dom.walker(d), -k=CKEDITOR.dom.walker.bookmark();d.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var s;d.guard=function(b,g){if(k(b))return true;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||g&&b.equals(s)||c===false&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary())return false;!g&&b.type==CKEDITOR.NODE_ELEMENT&&(s=b);return true};if(i)(g=d[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(g,b?CKEDITOR.POSITION_AFTER_START: -CKEDITOR.POSITION_BEFORE_START);if(j){d.reset();(d=d[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(d,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)}return!(!i&&!j)}},insertNode:function(a){this.optimizeBookmark();this.trim(false,true);var b=this.startContainer,c=b.getChild(this.startOffset);c?a.insertBefore(c):b.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,b){this.setStartAt(a, -b);this.collapse(true)},moveToRange:function(a){this.setStart(a.startContainer,a.startOffset);this.setEnd(a.endContainer,a.endOffset)},selectNodeContents:function(a){this.setStart(a,0);this.setEnd(a,a.type==CKEDITOR.NODE_TEXT?a.getLength():a.getChildCount())},setStart:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]){b=a.getIndex();a=a.getParent()}this.startContainer=a;this.startOffset=b;if(!this.endContainer){this.endContainer=a;this.endOffset=b}f(this)},setEnd:function(a, -b){if(a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]){b=a.getIndex()+1;a=a.getParent()}this.endContainer=a;this.endOffset=b;if(!this.startContainer){this.startContainer=a;this.startOffset=b}f(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(a, -b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setStart(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setStart(a,a.getLength()):this.setStart(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(a)}f(this)},setEndAt:function(a,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setEnd(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setEnd(a, -a.getLength()):this.setEnd(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(a)}f(this)},fixBlock:function(a,b){var c=this.createBookmark(),d=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(d);d.trim();CKEDITOR.env.ie||d.appendBogus();this.insertNode(d);this.moveToBookmark(c);return d},splitBlock:function(a){var b=new CKEDITOR.dom.elementPath(this.startContainer, -this.root),c=new CKEDITOR.dom.elementPath(this.endContainer,this.root),d=b.block,g=c.block,e=null;if(!b.blockLimit.equals(c.blockLimit))return null;if(a!="br"){if(!d){d=this.fixBlock(true,a);g=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block}g||(g=this.fixBlock(false,a))}a=d&&this.checkStartOfBlock();b=g&&this.checkEndOfBlock();this.deleteContents();if(d&&d.equals(g))if(b){e=new CKEDITOR.dom.elementPath(this.startContainer,this.root);this.moveToPosition(g,CKEDITOR.POSITION_AFTER_END); -g=null}else if(a){e=new CKEDITOR.dom.elementPath(this.startContainer,this.root);this.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START);d=null}else{g=this.splitElement(d);!CKEDITOR.env.ie&&!d.is("ul","ol")&&d.appendBogus()}return{previousBlock:d,nextBlock:g,wasStartOfBlock:a,wasEndOfBlock:b,elementPath:e}},splitElement:function(a){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var b=this.extractContents(),c=a.clone(false);b.appendTo(c);c.insertAfter(a);this.moveToPosition(a, -CKEDITOR.POSITION_AFTER_END);return c},removeEmptyBlocksAtEnd:function(){function a(d){return function(a){return b(a)||(c(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable())||d.is("table")&&a.is("caption")?false:true}}var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(false);return function(b){for(var c=this.createBookmark(),d=this[b?"endPath":"startPath"](),e=d.block||d.blockLimit,f;e&&!e.equals(d.root)&&!e.getFirst(a(e));){f=e.getParent();this[b?"setEndAt":"setStartAt"](e, -CKEDITOR.POSITION_AFTER_END);e.remove(1);e=f}this.moveToBookmark(c)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(a,b){var d=b==CKEDITOR.START,e=this.clone();e.collapse(d);e[d?"setStartAt":"setEndAt"](a,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(e);e.evaluator=c(d);return e[d?"checkBackward": -"checkForward"]()},checkStartOfBlock:function(){var a=this.startContainer,c=this.startOffset;if(CKEDITOR.env.ie&&c&&a.type==CKEDITOR.NODE_TEXT){a=CKEDITOR.tools.ltrim(a.substring(0,c));k.test(a)&&this.trim(0,1)}this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer,this.root);c=this.clone();c.collapse(true);c.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(c);a.evaluator=b();return a.checkBackward()},checkEndOfBlock:function(){var a=this.endContainer, -c=this.endOffset;if(CKEDITOR.env.ie&&a.type==CKEDITOR.NODE_TEXT){a=CKEDITOR.tools.rtrim(a.substring(c));k.test(a)&&this.trim(1,0)}this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,this.root);c=this.clone();c.collapse(false);c.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END);a=new CKEDITOR.dom.walker(c);a.evaluator=b();return a.checkForward()},getPreviousNode:function(a,b,c){var d=this.clone();d.collapse(1);d.setStartAt(c||this.root,CKEDITOR.POSITION_AFTER_START);c=new CKEDITOR.dom.walker(d); -c.evaluator=a;c.guard=b;return c.previous()},getNextNode:function(a,b,c){var d=this.clone();d.collapse();d.setEndAt(c||this.root,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(d);c.evaluator=a;c.guard=b;return c.next()},checkReadOnly:function(){function a(b,c){for(;b;){if(b.type==CKEDITOR.NODE_ELEMENT){if(b.getAttribute("contentEditable")=="false"&&!b.data("cke-editable"))return 0;if(b.is("html")||b.getAttribute("contentEditable")=="true"&&(b.contains(c)||b.equals(c)))break}b=b.getParent()}return 1} -return function(){var b=this.startContainer,c=this.endContainer;return!(a(b,c)&&a(c,b))}}(),moveToElementEditablePosition:function(b,c){if(b.type==CKEDITOR.NODE_ELEMENT&&!b.isEditable(false)){this.moveToPosition(b,c?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);return true}for(var d=0;b;){if(b.type==CKEDITOR.NODE_TEXT){c&&this.checkEndOfBlock()&&k.test(b.getText())?this.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(b,c?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START); -d=1;break}if(b.type==CKEDITOR.NODE_ELEMENT)if(b.isEditable()){this.moveToPosition(b,c?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START);d=1}else c&&(b.is("br")&&this.checkEndOfBlock())&&this.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START);var e=b,g=d,f=void 0;e.type==CKEDITOR.NODE_ELEMENT&&e.isEditable(false)&&(f=e[c?"getLast":"getFirst"](a));!g&&!f&&(f=e[c?"getPrevious":"getNext"](a));b=f}return!!d},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a, -true)},getEnclosedNode:function(){var a=this.clone();a.optimize();if(a.startContainer.type!=CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),b=CKEDITOR.dom.walker.bookmark(false,true),c=CKEDITOR.dom.walker.whitespaces(true);a.evaluator=function(a){return c(a)&&b(a)};var d=a.next();a.reset();return d&&d.equals(a.previous())?d:null},getTouchedStartNode:function(){var a=this.startContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT? -a:a.getChild(this.startOffset)||a},getTouchedEndNode:function(){var a=this.endContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.endOffset-1)||a},scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml(" ",this.document),b,c,d,g=this.clone();g.optimize();if(d=g.startContainer.type==CKEDITOR.NODE_TEXT){c=g.startContainer.getText();b=g.startContainer.split(g.startOffset);a.insertAfter(g.startContainer)}else g.insertNode(a);a.scrollIntoView(); -if(d){g.startContainer.setText(c);b.remove()}a.remove()}}})();CKEDITOR.POSITION_AFTER_START=1;CKEDITOR.POSITION_BEFORE_END=2;CKEDITOR.POSITION_BEFORE_START=3;CKEDITOR.POSITION_AFTER_END=4;CKEDITOR.ENLARGE_ELEMENT=1;CKEDITOR.ENLARGE_BLOCK_CONTENTS=2;CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS=3;CKEDITOR.ENLARGE_INLINE=4;CKEDITOR.START=1;CKEDITOR.END=2;CKEDITOR.SHRINK_ELEMENT=1;CKEDITOR.SHRINK_TEXT=2; +this.clone();g.collapse(true);g.insertNode(b);if(c){this.setStartAfter(b);this.setEndBefore(c)}else this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return{startNode:a?d+(p?"C":"S"):b,endNode:a?d+"E":c,serializable:a,collapsed:p}},createBookmark2:function(){function a(b){var c=b.container,d=b.offset,g;g=c;var m=d;g=g.type!=CKEDITOR.NODE_ELEMENT||m===0||m==g.getChildCount()?0:g.getChild(m-1).type==CKEDITOR.NODE_TEXT&&g.getChild(m).type==CKEDITOR.NODE_TEXT;if(g){c=c.getChild(d-1);d=c.getLength()}c.type== +CKEDITOR.NODE_ELEMENT&&d>1&&(d=c.getChild(d-1).getIndex(true)+1);if(c.type==CKEDITOR.NODE_TEXT){g=c;for(m=0;(g=g.getPrevious())&&g.type==CKEDITOR.NODE_TEXT;)m=m+g.getLength();d=d+m}b.container=c;b.offset=d}return function(b){var c=this.collapsed,d={container:this.startContainer,offset:this.startOffset},g={container:this.endContainer,offset:this.endOffset};if(b){a(d);c||a(g)}return{start:d.container.getAddress(b),end:c?null:g.container.getAddress(b),startOffset:d.offset,endOffset:g.offset,normalized:b, +collapsed:c,is2:true}}}(),moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),c=a.startOffset,d=a.end&&this.document.getByAddress(a.end,a.normalized),a=a.endOffset;this.setStart(b,c);d?this.setEnd(d,a):this.collapse(true)}else{b=(c=a.serializable)?this.document.getById(a.startNode):a.startNode;a=c?this.document.getById(a.endNode):a.endNode;this.setStartBefore(b);b.remove();if(a){this.setEndBefore(a);a.remove()}else this.collapse(true)}},getBoundaryNodes:function(){var a= +this.startContainer,b=this.endContainer,c=this.startOffset,d=this.endOffset,g;if(a.type==CKEDITOR.NODE_ELEMENT){g=a.getChildCount();if(g>c)a=a.getChild(c);else if(g<1)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=a.getNextSourceNode()||a}}if(b.type==CKEDITOR.NODE_ELEMENT){g=b.getChildCount();if(g>d)b=b.getChild(d).getPreviousSourceNode(true);else if(g<1)b=b.getPreviousSourceNode();else{for(b=b.$;b.lastChild;)b=b.lastChild;b=new CKEDITOR.dom.node(b)}}a.getPosition(b)& +CKEDITOR.POSITION_FOLLOWING&&(a=b);return{startNode:a,endNode:b}},getCommonAncestor:function(a,b){var c=this.startContainer,d=this.endContainer,c=c.equals(d)?a&&c.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?c.getChild(this.startOffset):c:c.getCommonAncestor(d);return b&&!c.is?c.getParent():c},optimize:function(){var a=this.startContainer,b=this.startOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setStartAfter(a):this.setStartBefore(a));a=this.endContainer;b=this.endOffset; +a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,b=this.endContainer;a.is&&(a.is("span")&&a.data("cke-bookmark"))&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);b&&(b.is&&b.is("span")&&b.data("cke-bookmark"))&&this.setEndAt(b,CKEDITOR.POSITION_AFTER_END)},trim:function(a,b){var c=this.startContainer,d=this.startOffset,g=this.collapsed;if((!a||g)&&c&&c.type==CKEDITOR.NODE_TEXT){if(d)if(d>=c.getLength()){d= +c.getIndex()+1;c=c.getParent()}else{var p=c.split(d),d=c.getIndex()+1,c=c.getParent();if(this.startContainer.equals(this.endContainer))this.setEnd(p,this.endOffset-this.startOffset);else if(c.equals(this.endContainer))this.endOffset=this.endOffset+1}else{d=c.getIndex();c=c.getParent()}this.setStart(c,d);if(g){this.collapse(true);return}}c=this.endContainer;d=this.endOffset;if(!b&&!g&&c&&c.type==CKEDITOR.NODE_TEXT){if(d){d>=c.getLength()||c.split(d);d=c.getIndex()+1}else d=c.getIndex();c=c.getParent(); +this.setEnd(c,d)}},enlarge:function(a,b){switch(a){case CKEDITOR.ENLARGE_INLINE:var c=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;var d=this.getCommonAncestor(),g=this.root,p,f,e,h,i,j=false,r,x;r=this.startContainer;x=this.startOffset;if(r.type==CKEDITOR.NODE_TEXT){if(x){r=!CKEDITOR.tools.trim(r.substring(0,x)).length&&r;j=!!r}if(r&&!(h=r.getPrevious()))e=r.getParent()}else{x&&(h=r.getChild(x-1)||r.getLast());h||(e=r)}for(;e||h;){if(e&&!h){!i&&e.equals(d)&&(i=true);if(c?e.isBlockBoundary(): +!g.contains(e))break;if(!j||e.getComputedStyle("display")!="inline"){j=false;i?p=e:this.setStartBefore(e)}h=e.getPrevious()}for(;h;){r=false;if(h.type==CKEDITOR.NODE_COMMENT)h=h.getPrevious();else{if(h.type==CKEDITOR.NODE_TEXT){x=h.getText();/[^\s\ufeff]/.test(x)&&(h=null);r=/[\s\ufeff]$/.test(x)}else if((h.$.offsetWidth>0||b&&h.is("br"))&&!h.data("cke-bookmark"))if(j&&CKEDITOR.dtd.$removeEmpty[h.getName()]){x=h.getText();if(/[^\s\ufeff]/.test(x))h=null;else for(var l=h.$.getElementsByTagName("*"), +s=0,C;C=l[s++];)if(!CKEDITOR.dtd.$removeEmpty[C.nodeName.toLowerCase()]){h=null;break}h&&(r=!!x.length)}else h=null;r&&(j?i?p=e:e&&this.setStartBefore(e):j=true);if(h){r=h.getPrevious();if(!e&&!r){e=h;h=null;break}h=r}else e=null}}e&&(e=e.getParent())}r=this.endContainer;x=this.endOffset;e=h=null;i=j=false;if(r.type==CKEDITOR.NODE_TEXT){r=!CKEDITOR.tools.trim(r.substring(x)).length&&r;j=!(r&&r.getLength());if(r&&!(h=r.getNext()))e=r.getParent()}else(h=r.getChild(x))||(e=r);for(;e||h;){if(e&&!h){!i&& +e.equals(d)&&(i=true);if(c?e.isBlockBoundary():!g.contains(e))break;if(!j||e.getComputedStyle("display")!="inline"){j=false;i?f=e:e&&this.setEndAfter(e)}h=e.getNext()}for(;h;){r=false;if(h.type==CKEDITOR.NODE_TEXT){x=h.getText();/[^\s\ufeff]/.test(x)&&(h=null);r=/^[\s\ufeff]/.test(x)}else if(h.type==CKEDITOR.NODE_ELEMENT){if((h.$.offsetWidth>0||b&&h.is("br"))&&!h.data("cke-bookmark"))if(j&&CKEDITOR.dtd.$removeEmpty[h.getName()]){x=h.getText();if(/[^\s\ufeff]/.test(x))h=null;else{l=h.$.getElementsByTagName("*"); +for(s=0;C=l[s++];)if(!CKEDITOR.dtd.$removeEmpty[C.nodeName.toLowerCase()]){h=null;break}}h&&(r=!!x.length)}else h=null}else r=1;r&&j&&(i?f=e:this.setEndAfter(e));if(h){r=h.getNext();if(!e&&!r){e=h;h=null;break}h=r}else e=null}e&&(e=e.getParent())}if(p&&f){d=p.contains(f)?f:p;this.setStartBefore(d);this.setEndAfter(d)}break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:e=new CKEDITOR.dom.range(this.root);g=this.root;e.setStartAt(g,CKEDITOR.POSITION_AFTER_START);e.setEnd(this.startContainer, +this.startOffset);e=new CKEDITOR.dom.walker(e);var y,o,u=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),I=function(a){var b=u(a);b||(y=a);return b},c=function(a){var b=I(a);!b&&(a.is&&a.is("br"))&&(o=a);return b};e.guard=I;e=e.lastBackward();y=y||g;this.setStartAt(y,!y.is("br")&&(!e&&this.checkStartOfBlock()||e&&y.contains(e))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){e=this.clone();e=new CKEDITOR.dom.walker(e); +var G=CKEDITOR.dom.walker.whitespaces(),D=CKEDITOR.dom.walker.bookmark();e.evaluator=function(a){return!G(a)&&!D(a)};if((e=e.previous())&&e.type==CKEDITOR.NODE_ELEMENT&&e.is("br"))break}e=this.clone();e.collapse();e.setEndAt(g,CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(e);e.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?c:I;y=null;e=e.lastForward();y=y||g;this.setEndAt(y,!e&&this.checkEndOfBlock()||e&&y.contains(e)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);o&&this.setEndAfter(o)}}, +shrink:function(a,b,c){if(!this.collapsed){var a=a||CKEDITOR.SHRINK_TEXT,d=this.clone(),g=this.startContainer,e=this.endContainer,f=this.startOffset,h=this.endOffset,i=1,j=1;if(g&&g.type==CKEDITOR.NODE_TEXT)if(f)if(f>=g.getLength())d.setStartAfter(g);else{d.setStartBefore(g);i=0}else d.setStartBefore(g);if(e&&e.type==CKEDITOR.NODE_TEXT)if(h)if(h>=e.getLength())d.setEndAfter(e);else{d.setEndAfter(e);j=0}else d.setEndBefore(e);var d=new CKEDITOR.dom.walker(d),l=CKEDITOR.dom.walker.bookmark();d.evaluator= +function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var r;d.guard=function(b,g){if(l(b))return true;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||g&&b.equals(r)||c===false&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary())return false;!g&&b.type==CKEDITOR.NODE_ELEMENT&&(r=b);return true};if(i)(g=d[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(g,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);if(j){d.reset(); +(d=d[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(d,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)}return!(!i&&!j)}},insertNode:function(a){this.optimizeBookmark();this.trim(false,true);var b=this.startContainer,c=b.getChild(this.startOffset);c?a.insertBefore(c):b.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,b){this.setStartAt(a,b);this.collapse(true)},moveToRange:function(a){this.setStart(a.startContainer, +a.startOffset);this.setEnd(a.endContainer,a.endOffset)},selectNodeContents:function(a){this.setStart(a,0);this.setEnd(a,a.type==CKEDITOR.NODE_TEXT?a.getLength():a.getChildCount())},setStart:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]){b=a.getIndex();a=a.getParent()}this.startContainer=a;this.startOffset=b;if(!this.endContainer){this.endContainer=a;this.endOffset=b}f(this)},setEnd:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]){b= +a.getIndex()+1;a=a.getParent()}this.endContainer=a;this.endOffset=b;if(!this.startContainer){this.startContainer=a;this.startOffset=b}f(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(a,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setStart(a, +0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setStart(a,a.getLength()):this.setStart(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(a)}f(this)},setEndAt:function(a,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setEnd(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setEnd(a,a.getLength()):this.setEnd(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(a); +break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(a)}f(this)},fixBlock:function(a,b){var c=this.createBookmark(),d=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(d);d.trim();CKEDITOR.env.ie||d.appendBogus();this.insertNode(d);this.moveToBookmark(c);return d},splitBlock:function(a){var b=new CKEDITOR.dom.elementPath(this.startContainer,this.root),c=new CKEDITOR.dom.elementPath(this.endContainer,this.root),d=b.block, +g=c.block,e=null;if(!b.blockLimit.equals(c.blockLimit))return null;if(a!="br"){if(!d){d=this.fixBlock(true,a);g=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block}g||(g=this.fixBlock(false,a))}a=d&&this.checkStartOfBlock();b=g&&this.checkEndOfBlock();this.deleteContents();if(d&&d.equals(g))if(b){e=new CKEDITOR.dom.elementPath(this.startContainer,this.root);this.moveToPosition(g,CKEDITOR.POSITION_AFTER_END);g=null}else if(a){e=new CKEDITOR.dom.elementPath(this.startContainer,this.root); +this.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START);d=null}else{g=this.splitElement(d);!CKEDITOR.env.ie&&!d.is("ul","ol")&&d.appendBogus()}return{previousBlock:d,nextBlock:g,wasStartOfBlock:a,wasEndOfBlock:b,elementPath:e}},splitElement:function(a){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var b=this.extractContents(),c=a.clone(false);b.appendTo(c);c.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return c},removeEmptyBlocksAtEnd:function(){function a(d){return function(a){return b(a)|| +(c(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable())||d.is("table")&&a.is("caption")?false:true}}var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(false);return function(b){for(var c=this.createBookmark(),d=this[b?"endPath":"startPath"](),e=d.block||d.blockLimit,f;e&&!e.equals(d.root)&&!e.getFirst(a(e));){f=e.getParent();this[b?"setEndAt":"setStartAt"](e,CKEDITOR.POSITION_AFTER_END);e.remove(1);e=f}this.moveToBookmark(c)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer, +this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(a,b){var d=b==CKEDITOR.START,e=this.clone();e.collapse(d);e[d?"setStartAt":"setEndAt"](a,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(e);e.evaluator=c(d);return e[d?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var a=this.startContainer,c=this.startOffset;if(CKEDITOR.env.ie&&c&&a.type==CKEDITOR.NODE_TEXT){a=CKEDITOR.tools.ltrim(a.substring(0, +c));l.test(a)&&this.trim(0,1)}this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer,this.root);c=this.clone();c.collapse(true);c.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(c);a.evaluator=b();return a.checkBackward()},checkEndOfBlock:function(){var a=this.endContainer,c=this.endOffset;if(CKEDITOR.env.ie&&a.type==CKEDITOR.NODE_TEXT){a=CKEDITOR.tools.rtrim(a.substring(c));l.test(a)&&this.trim(1,0)}this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer, +this.root);c=this.clone();c.collapse(false);c.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END);a=new CKEDITOR.dom.walker(c);a.evaluator=b();return a.checkForward()},getPreviousNode:function(a,b,c){var d=this.clone();d.collapse(1);d.setStartAt(c||this.root,CKEDITOR.POSITION_AFTER_START);c=new CKEDITOR.dom.walker(d);c.evaluator=a;c.guard=b;return c.previous()},getNextNode:function(a,b,c){var d=this.clone();d.collapse();d.setEndAt(c||this.root,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(d); +c.evaluator=a;c.guard=b;return c.next()},checkReadOnly:function(){function a(b,c){for(;b;){if(b.type==CKEDITOR.NODE_ELEMENT){if(b.getAttribute("contentEditable")=="false"&&!b.data("cke-editable"))return 0;if(b.is("html")||b.getAttribute("contentEditable")=="true"&&(b.contains(c)||b.equals(c)))break}b=b.getParent()}return 1}return function(){var b=this.startContainer,c=this.endContainer;return!(a(b,c)&&a(c,b))}}(),moveToElementEditablePosition:function(b,c){if(b.type==CKEDITOR.NODE_ELEMENT&&!b.isEditable(false)){this.moveToPosition(b, +c?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);return true}for(var d=0;b;){if(b.type==CKEDITOR.NODE_TEXT){c&&this.checkEndOfBlock()&&l.test(b.getText())?this.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(b,c?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);d=1;break}if(b.type==CKEDITOR.NODE_ELEMENT)if(b.isEditable()){this.moveToPosition(b,c?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START);d=1}else c&&(b.is("br")&&this.checkEndOfBlock())&& +this.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START);var e=b,g=d,f=void 0;e.type==CKEDITOR.NODE_ELEMENT&&e.isEditable(false)&&(f=e[c?"getLast":"getFirst"](a));!g&&!f&&(f=e[c?"getPrevious":"getNext"](a));b=f}return!!d},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,true)},getEnclosedNode:function(){var a=this.clone();a.optimize();if(a.startContainer.type!=CKEDITOR.NODE_ELEMENT||a.endContainer.type!= +CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),b=CKEDITOR.dom.walker.bookmark(false,true),c=CKEDITOR.dom.walker.whitespaces(true);a.evaluator=function(a){return c(a)&&b(a)};var d=a.next();a.reset();return d&&d.equals(a.previous())?d:null},getTouchedStartNode:function(){var a=this.startContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.startOffset)||a},getTouchedEndNode:function(){var a=this.endContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT? +a:a.getChild(this.endOffset-1)||a},scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml(" ",this.document),b,c,d,g=this.clone();g.optimize();if(d=g.startContainer.type==CKEDITOR.NODE_TEXT){c=g.startContainer.getText();b=g.startContainer.split(g.startOffset);a.insertAfter(g.startContainer)}else g.insertNode(a);a.scrollIntoView();if(d){g.startContainer.setText(c);b.remove()}a.remove()}}})();CKEDITOR.POSITION_AFTER_START=1;CKEDITOR.POSITION_BEFORE_END=2; +CKEDITOR.POSITION_BEFORE_START=3;CKEDITOR.POSITION_AFTER_END=4;CKEDITOR.ENLARGE_ELEMENT=1;CKEDITOR.ENLARGE_BLOCK_CONTENTS=2;CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS=3;CKEDITOR.ENLARGE_INLINE=4;CKEDITOR.START=1;CKEDITOR.END=2;CKEDITOR.SHRINK_ELEMENT=1;CKEDITOR.SHRINK_TEXT=2; (function(){function b(a){if(!(arguments.length<1)){this.range=a;this.forceBrBreak=0;this.enlargeBr=1;this.enforceRealBlocks=0;this._||(this._={})}}function c(a,b,c){for(a=a.getNextSourceNode(b,null,c);!f(a);)a=a.getNextSourceNode(b,null,c);return a}var a=/^[\r\n\t ]+$/,f=CKEDITOR.dom.walker.bookmark(false,true),d=CKEDITOR.dom.walker.whitespaces(true),e=function(a){return f(a)&&d(a)};b.prototype={getNextParagraph:function(b){b=b||"p";if(!CKEDITOR.dtd[this.range.root.getName()][b])return null;var d, -i,k,m,q,r;if(!this._.started){i=this.range.clone();i.shrink(CKEDITOR.NODE_ELEMENT,true);m=i.endContainer.hasAscendant("pre",true)||i.startContainer.hasAscendant("pre",true);i.enlarge(this.forceBrBreak&&!m||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);if(!i.collapsed){m=new CKEDITOR.dom.walker(i.clone());var l=CKEDITOR.dom.walker.bookmark(true,true);m.evaluator=l;this._.nextNode=m.next();m=new CKEDITOR.dom.walker(i.clone());m.evaluator=l;m=m.previous();this._.lastNode= -m.getNextSourceNode(true);if(this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()){l=this.range.clone();l.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END);if(l.checkEndOfBlock()){l=new CKEDITOR.dom.elementPath(l.endContainer,l.root);this._.lastNode=(l.block||l.blockLimit).getNextSourceNode(true)}}if(!this._.lastNode){this._.lastNode=this._.docEndMarker=i.document.createText("");this._.lastNode.insertAfter(m)}i= -null}this._.started=1}l=this._.nextNode;m=this._.lastNode;for(this._.nextNode=null;l;){var g=0,p=l.hasAscendant("pre"),v=l.type!=CKEDITOR.NODE_ELEMENT,u=0;if(v)l.type==CKEDITOR.NODE_TEXT&&a.test(l.getText())&&(v=0);else{var o=l.getName();if(l.isBlockBoundary(this.forceBrBreak&&!p&&{br:1})){if(o=="br")v=1;else if(!i&&!l.getChildCount()&&o!="hr"){d=l;k=l.equals(m);break}if(i){i.setEndAt(l,CKEDITOR.POSITION_BEFORE_START);if(o!="br")this._.nextNode=l}g=1}else{if(l.getFirst()){if(!i){i=this.range.clone(); -i.setStartAt(l,CKEDITOR.POSITION_BEFORE_START)}l=l.getFirst();continue}v=1}}if(v&&!i){i=this.range.clone();i.setStartAt(l,CKEDITOR.POSITION_BEFORE_START)}k=(!g||v)&&l.equals(m);if(i&&!g)for(;!l.getNext(e)&&!k;){o=l.getParent();if(o.isBlockBoundary(this.forceBrBreak&&!p&&{br:1})){g=1;v=0;k||o.equals(m);i.setEndAt(o,CKEDITOR.POSITION_BEFORE_END);break}l=o;v=1;k=l.equals(m);u=1}v&&i.setEndAt(l,CKEDITOR.POSITION_AFTER_END);l=c(l,u,m);if((k=!l)||g&&i)break}if(!d){if(!i){this._.docEndMarker&&this._.docEndMarker.remove(); -return this._.nextNode=null}d=new CKEDITOR.dom.elementPath(i.startContainer,i.root);l=d.blockLimit;g={div:1,th:1,td:1};d=d.block;if(!d&&l&&!this.enforceRealBlocks&&g[l.getName()]&&i.checkStartOfBlock()&&i.checkEndOfBlock()&&!l.equals(i.root))d=l;else if(!d||this.enforceRealBlocks&&d.getName()=="li"){d=this.range.document.createElement(b);i.extractContents().appendTo(d);d.trim();i.insertNode(d);q=r=true}else if(d.getName()!="li"){if(!i.checkStartOfBlock()||!i.checkEndOfBlock()){d=d.clone(false);i.extractContents().appendTo(d); -d.trim();r=i.splitBlock();q=!r.wasStartOfBlock;r=!r.wasEndOfBlock;i.insertNode(d)}}else if(!k)this._.nextNode=d.equals(m)?null:c(i.getBoundaryNodes().endNode,1,m)}if(q)(i=d.getPrevious())&&i.type==CKEDITOR.NODE_ELEMENT&&(i.getName()=="br"?i.remove():i.getLast()&&i.getLast().$.nodeName.toLowerCase()=="br"&&i.getLast().remove());if(r)(i=d.getLast())&&i.type==CKEDITOR.NODE_ELEMENT&&i.getName()=="br"&&(CKEDITOR.env.ie||i.getPrevious(f)||i.getNext(f))&&i.remove();if(!this._.nextNode)this._.nextNode=k|| +i,l,m,q,w;if(!this._.started){i=this.range.clone();i.shrink(CKEDITOR.NODE_ELEMENT,true);m=i.endContainer.hasAscendant("pre",true)||i.startContainer.hasAscendant("pre",true);i.enlarge(this.forceBrBreak&&!m||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);if(!i.collapsed){m=new CKEDITOR.dom.walker(i.clone());var k=CKEDITOR.dom.walker.bookmark(true,true);m.evaluator=k;this._.nextNode=m.next();m=new CKEDITOR.dom.walker(i.clone());m.evaluator=k;m=m.previous();this._.lastNode= +m.getNextSourceNode(true);if(this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()){k=this.range.clone();k.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END);if(k.checkEndOfBlock()){k=new CKEDITOR.dom.elementPath(k.endContainer,k.root);this._.lastNode=(k.block||k.blockLimit).getNextSourceNode(true)}}if(!this._.lastNode){this._.lastNode=this._.docEndMarker=i.document.createText("");this._.lastNode.insertAfter(m)}i= +null}this._.started=1}k=this._.nextNode;m=this._.lastNode;for(this._.nextNode=null;k;){var g=0,p=k.hasAscendant("pre"),v=k.type!=CKEDITOR.NODE_ELEMENT,t=0;if(v)k.type==CKEDITOR.NODE_TEXT&&a.test(k.getText())&&(v=0);else{var n=k.getName();if(k.isBlockBoundary(this.forceBrBreak&&!p&&{br:1})){if(n=="br")v=1;else if(!i&&!k.getChildCount()&&n!="hr"){d=k;l=k.equals(m);break}if(i){i.setEndAt(k,CKEDITOR.POSITION_BEFORE_START);if(n!="br")this._.nextNode=k}g=1}else{if(k.getFirst()){if(!i){i=this.range.clone(); +i.setStartAt(k,CKEDITOR.POSITION_BEFORE_START)}k=k.getFirst();continue}v=1}}if(v&&!i){i=this.range.clone();i.setStartAt(k,CKEDITOR.POSITION_BEFORE_START)}l=(!g||v)&&k.equals(m);if(i&&!g)for(;!k.getNext(e)&&!l;){n=k.getParent();if(n.isBlockBoundary(this.forceBrBreak&&!p&&{br:1})){g=1;v=0;l||n.equals(m);i.setEndAt(n,CKEDITOR.POSITION_BEFORE_END);break}k=n;v=1;l=k.equals(m);t=1}v&&i.setEndAt(k,CKEDITOR.POSITION_AFTER_END);k=c(k,t,m);if((l=!k)||g&&i)break}if(!d){if(!i){this._.docEndMarker&&this._.docEndMarker.remove(); +return this._.nextNode=null}d=new CKEDITOR.dom.elementPath(i.startContainer,i.root);k=d.blockLimit;g={div:1,th:1,td:1};d=d.block;if(!d&&k&&!this.enforceRealBlocks&&g[k.getName()]&&i.checkStartOfBlock()&&i.checkEndOfBlock()&&!k.equals(i.root))d=k;else if(!d||this.enforceRealBlocks&&d.getName()=="li"){d=this.range.document.createElement(b);i.extractContents().appendTo(d);d.trim();i.insertNode(d);q=w=true}else if(d.getName()!="li"){if(!i.checkStartOfBlock()||!i.checkEndOfBlock()){d=d.clone(false);i.extractContents().appendTo(d); +d.trim();w=i.splitBlock();q=!w.wasStartOfBlock;w=!w.wasEndOfBlock;i.insertNode(d)}}else if(!l)this._.nextNode=d.equals(m)?null:c(i.getBoundaryNodes().endNode,1,m)}if(q)(i=d.getPrevious())&&i.type==CKEDITOR.NODE_ELEMENT&&(i.getName()=="br"?i.remove():i.getLast()&&i.getLast().$.nodeName.toLowerCase()=="br"&&i.getLast().remove());if(w)(i=d.getLast())&&i.type==CKEDITOR.NODE_ELEMENT&&i.getName()=="br"&&(CKEDITOR.env.ie||i.getPrevious(f)||i.getNext(f))&&i.remove();if(!this._.nextNode)this._.nextNode=l|| d.equals(m)||!m?null:c(d,1,m);return d}};CKEDITOR.dom.range.prototype.createIterator=function(){return new b(this)}})(); CKEDITOR.command=function(b,c){this.uiItems=[];this.exec=function(a){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return false;this.editorFocus&&b.focus();return this.fire("exec")===false?true:c.exec.call(this,b,a)!==false};this.refresh=function(a,b){if(!this.readOnly&&a.readOnly)return true;if(this.context&&!b.isContextFor(this.context)){this.disable();return true}this.enable();return this.fire("refresh",{editor:a,path:b})===false?true:c.refresh&&c.refresh.apply(this,arguments)!== false};var a;this.checkAllowed=function(){return typeof a=="boolean"?a:a=b.filter.checkFeature(this)};CKEDITOR.tools.extend(this,c,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!c.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)}; CKEDITOR.command.prototype={enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(!this.preserveState||typeof this.previousState=="undefined"?CKEDITOR.TRISTATE_OFF:this.previousState)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(b){if(this.state==b||!this.checkAllowed())return false;this.previousState=this.state;this.state=b;this.fire("state");return true},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF?this.setState(CKEDITOR.TRISTATE_ON): this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.event.implementOn(CKEDITOR.command.prototype);CKEDITOR.ENTER_P=1;CKEDITOR.ENTER_BR=2;CKEDITOR.ENTER_DIV=3; CKEDITOR.config={customConfig:"config.js",autoUpdateElement:!0,language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:"",bodyId:"",bodyClass:"",fullPage:!1,height:200,extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]}; -(function(){function b(a,b,g,e,f){var p=b.name;if((e||typeof a.elements!="function"||a.elements(p))&&(!a.match||a.match(b))){if(e=!f){a:if(a.nothingRequired)e=true;else{if(f=a.requiredClasses){p=b.classes;for(e=0;e0;){p=g[--f];if(e&&(p.type==CKEDITOR.NODE_TEXT||p.type==CKEDITOR.NODE_ELEMENT&&A.$inline[p.name])){if(!h){h=new CKEDITOR.htmlParser.element(b);h.insertAfter(a);c.push({check:"parent-down",el:h})}h.add(p,0)}else{h=null;p.insertAfter(a);d.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(p.type== -CKEDITOR.NODE_ELEMENT&&!A[d.name][p.name])&&c.push({check:"el-up",el:p})}}a.remove()}}else if(g=="style")a.remove();else{a.parent&&c.push({check:"it",el:a.parent});a.replaceWithChildren()}}function p(a,b,c){var g,d;for(g=0;g";if(l in this._.cachedChecks)return this._.cachedChecks[l];g=h(a).$1;d=g.styles;var n=g.classes;g.name=g.elements;g.classes=n=n?n.split(/\s*,\s*/):[];g.styles=e(d);g.attributes=e(g.attributes);g.children=[];n.length&&(g.attributes["class"]=n.join(" "));if(d)g.attributes.style=CKEDITOR.tools.writeCssText(g.styles);d=g}else{g=a.getDefinition();d=g.styles;n=g.attributes||{};if(d){d=s(d);n.style=CKEDITOR.tools.writeCssText(d,true)}else d={};d={name:g.element,attributes:n,classes:n["class"]? -n["class"].split(/\s+/):[],styles:d,children:[]}}var n=CKEDITOR.tools.clone(d),q=[],o;if(b!==false&&(o=this._.transformations[d.name])){for(g=0;g0?false:CKEDITOR.tools.objectCompare(d.attributes,n.attributes,true)?true:false;typeof a=="string"&&(this._.cachedChecks[l]=b);return b}};var t={styles:1,attributes:1,classes:1},C={styles:"requiredStyles",attributes:"requiredAttributes", -classes:"requiredClasses"},y=/^([a-z0-9*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,n={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},w=CKEDITOR.filter.transformationsTools={sizeToStyle:function(a){this.lengthToStyle(a,"width");this.lengthToStyle(a,"height")},sizeToAttribute:function(a){this.lengthToAttribute(a,"width");this.lengthToAttribute(a,"height")},lengthToStyle:function(a,b,c){c=c||b;if(!(c in a.styles)){var g=a.attributes[b]; -if(g){/^\d+$/.test(g)&&(g=g+"px");a.styles[c]=g}}delete a.attributes[b]},lengthToAttribute:function(a,b,c){c=c||b;if(!(c in a.attributes)){var g=a.styles[b],d=g&&g.match(/^(\d+)(?:\.\d*)?px$/);d?a.attributes[c]=d[1]:g==z&&(a.attributes[c]=z)}delete a.styles[b]},alignmentToStyle:function(a){if(!("float"in a.styles)){var b=a.attributes.align;if(b=="left"||b=="right")a.styles["float"]=b}delete a.attributes.align},alignmentToAttribute:function(a){if(!("align"in a.attributes)){var b=a.styles["float"]; -if(b=="left"||b=="right")a.attributes.align=b}delete a.styles["float"]},matchesStyle:v,transform:function(a,b){if(typeof b=="string")a.name=b;else{var c=b.getDefinition(),g=c.styles,d=c.attributes,e,f,p,h;a.name=c.element;for(e in d)if(e=="class"){c=a.classes.join("|");for(p=d[e].split(/\s+/);h=p.pop();)c.indexOf(h)==-1&&a.classes.push(h)}else a.attributes[e]=d[e];for(f in g)a.styles[f]=g[f]}}}})(); +(function(){function b(a,b,g,e,f){var h=b.name;if((e||typeof a.elements!="function"||a.elements(h))&&(!a.match||a.match(b))){if(e=!f){a:if(a.nothingRequired)e=true;else{if(f=a.requiredClasses){h=b.classes;for(e=0;e0;){h=d[--f];if(e&&(h.type==CKEDITOR.NODE_TEXT||h.type==CKEDITOR.NODE_ELEMENT&&B.$inline[h.name])){if(!p){p=new CKEDITOR.htmlParser.element(b);p.insertAfter(a);c.push({check:"parent-down",el:p})}p.add(h,0)}else{p=null;h.insertAfter(a);g.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(h.type== +CKEDITOR.NODE_ELEMENT&&!B[g.name][h.name])&&c.push({check:"el-up",el:h})}}a.remove()}}else if(d=="style")a.remove();else{a.parent&&c.push({check:"it",el:a.parent});a.replaceWithChildren()}}function p(a,b,c){var d,g;for(d=0;d";if(k in this._.cachedChecks)return this._.cachedChecks[k];d=h(a).$1;g=d.styles;var o=d.classes;d.name=d.elements;d.classes=o=o?o.split(/\s*,\s*/):[];d.styles=e(g);d.attributes=e(d.attributes);d.children=[];o.length&&(d.attributes["class"]=o.join(" "));if(g)d.attributes.style=CKEDITOR.tools.writeCssText(d.styles);g=d}else{d=a.getDefinition();g=d.styles;o=d.attributes||{};if(g){g=r(g);o.style=CKEDITOR.tools.writeCssText(g,true)}else g={};g={name:d.element,attributes:o,classes:o["class"]? +o["class"].split(/\s+/):[],styles:g,children:[]}}var o=CKEDITOR.tools.clone(g),q=[],n;if(b!==false&&(n=this._.transformations[g.name])){for(d=0;d0?false:CKEDITOR.tools.objectCompare(g.attributes,o.attributes,true)?true:false;typeof a=="string"&&(this._.cachedChecks[k]=b);return b}};var s={styles:1,attributes:1,classes:1},C={styles:"requiredStyles",attributes:"requiredAttributes", +classes:"requiredClasses"},y=/^([a-z0-9*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,o={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},u=CKEDITOR.filter.transformationsTools={sizeToStyle:function(a){this.lengthToStyle(a,"width");this.lengthToStyle(a,"height")},sizeToAttribute:function(a){this.lengthToAttribute(a,"width");this.lengthToAttribute(a,"height")},lengthToStyle:function(a,b,c){c=c||b;if(!(c in a.styles)){var d=a.attributes[b]; +if(d){/^\d+$/.test(d)&&(d=d+"px");a.styles[c]=d}}delete a.attributes[b]},lengthToAttribute:function(a,b,c){c=c||b;if(!(c in a.attributes)){var d=a.styles[b],g=d&&d.match(/^(\d+)(?:\.\d*)?px$/);g?a.attributes[c]=g[1]:d==z&&(a.attributes[c]=z)}delete a.styles[b]},alignmentToStyle:function(a){if(!("float"in a.styles)){var b=a.attributes.align;if(b=="left"||b=="right")a.styles["float"]=b}delete a.attributes.align},alignmentToAttribute:function(a){if(!("align"in a.attributes)){var b=a.styles["float"]; +if(b=="left"||b=="right")a.attributes.align=b}delete a.styles["float"]},matchesStyle:v,transform:function(a,b){if(typeof b=="string")a.name=b;else{var c=b.getDefinition(),d=c.styles,g=c.attributes,e,f,h,p;a.name=c.element;for(e in g)if(e=="class"){c=a.classes.join("|");for(h=g[e].split(/\s+/);p=h.pop();)c.indexOf(p)==-1&&a.classes.push(p)}else a.attributes[e]=g[e];for(f in d)a.styles[f]=d[f]}}}})(); (function(){CKEDITOR.focusManager=function(b){if(b.focusManager)return b.focusManager;this.hasFocus=false;this.currentActive=null;this._={editor:b};return this};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(){this._.timer&&clearTimeout(this._.timer);if(!this.hasFocus&&!this._.locked){var b=CKEDITOR.currentInstance;b&&b.focusManager.blur(1);this.hasFocus=true;(b=this._.editor.container)&&b.addClass("cke_focus");this._.editor.fire("focus")}},lock:function(){this._.locked= 1},unlock:function(){delete this._.locked},blur:function(b){function c(){if(this.hasFocus){this.hasFocus=false;var a=this._.editor.container;a&&a.removeClass("cke_focus");this._.editor.fire("blur")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var a=CKEDITOR.focusManager._.blurDelay;b||!a?c.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;c.call(this)},a,this)}},add:function(b,c){var a=b.getCustomData("focusmanager");if(!a||a!=this){a&&a.remove(b);var a= "focus",f="blur";if(c)if(CKEDITOR.env.ie){a="focusin";f="focusout"}else CKEDITOR.event.useCapture=1;var d={blur:function(){b.equals(this.currentActive)&&this.blur()},focus:function(){this.currentActive=b;this.focus()}};b.on(a,d.focus,this);b.on(f,d.blur,this);if(c)CKEDITOR.event.useCapture=0;b.setCustomData("focusmanager",this);b.setCustomData("focusmanager_handlers",d)}},remove:function(b){b.removeCustomData("focusmanager");var c=b.removeCustomData("focusmanager_handlers");b.removeListener("blur", @@ -200,27 +200,27 @@ c.blur);b.removeListener("focus",c.focus)}}})();CKEDITOR.keystrokeHandler=functi (function(){var b,c=function(a){var a=a.data,c=a.getKeystroke(),e=this.keystrokes[c],h=this._.editor;b=h.fire("key",{keyCode:c})===false;if(!b){e&&(b=h.execCommand(e,{from:"keystrokeHandler"})!==false);b||(b=!!this.blockedKeystrokes[c])}b&&a.preventDefault(true);return!b},a=function(a){if(b){b=false;a.data.preventDefault(true)}};CKEDITOR.keystrokeHandler.prototype={attach:function(b){b.on("keydown",c,this);if(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)b.on("keypress",a,this)}}})(); (function(){CKEDITOR.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,"en-au":1,"en-ca":1,"en-gb":1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,"fr-ca":1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,"sr-latn":1,sr:1,sv:1,th:1,tr:1,ug:1,uk:1,vi:1,"zh-cn":1,zh:1},rtl:{ar:1,fa:1,he:1,ku:1,ug:1},load:function(b,c,a){if(!b||!CKEDITOR.lang.languages[b])b=this.detect(c, b);this[b]?a(b,this[b]):CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+b+".js"),function(){this[b].dir=this.rtl[b]?"rtl":"ltr";a(b,this[b])},this)},detect:function(b,c){var a=this.languages,c=c||navigator.userLanguage||navigator.language||b,f=c.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),d=f[1],f=f[2];a[d+"-"+f]?d=d+"-"+f:a[d]||(d=null);CKEDITOR.lang.detect=d?function(){return d}:function(a){return a};return d||b}}})(); -CKEDITOR.scriptLoader=function(){var b={},c={};return{load:function(a,f,d,e){var h=typeof a=="string";h&&(a=[a]);d||(d=CKEDITOR);var j=a.length,i=[],k=[],m=function(a){f&&(h?f.call(d,a):f.call(d,i,k))};if(j===0)m(true);else{var q=function(a,b){(b?i:k).push(a);if(--j<=0){e&&CKEDITOR.document.getDocumentElement().removeStyle("cursor");m(b)}},r=function(a,g){b[a]=1;var d=c[a];delete c[a];for(var e=0;e -1)){var d=new CKEDITOR.dom.element("script");d.setAttributes({type:"text/javascript",src:a});if(f)if(CKEDITOR.env.ie)d.$.onreadystatechange=function(){if(d.$.readyState=="loaded"||d.$.readyState=="complete"){d.$.onreadystatechange=null;r(a,true)}};else{d.$.onload=function(){setTimeout(function(){r(a,true)},0)};d.$.onerror=function(){r(a,false)}}d.appendTo(CKEDITOR.document.getHead())}}};e&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var g=0;g +1)){var g=new CKEDITOR.dom.element("script");g.setAttributes({type:"text/javascript",src:a});if(f)if(CKEDITOR.env.ie)g.$.onreadystatechange=function(){if(g.$.readyState=="loaded"||g.$.readyState=="complete"){g.$.onreadystatechange=null;w(a,true)}};else{g.$.onload=function(){setTimeout(function(){w(a,true)},0)};g.$.onerror=function(){w(a,false)}}g.appendTo(CKEDITOR.document.getHead())}}};e&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var g=0;g=0)o=a.langCode;else{o=a.langCode.replace(/-.*/,"");o=o!=a.langCode&&CKEDITOR.tools.indexOf(n,o)>=0?o:CKEDITOR.tools.indexOf(n,"en")>=0?"en":n[0]}if(!q.langEntries|| -!q.langEntries[o])f.push(CKEDITOR.getUrl(q.path+"lang/"+o+".js"));else{a.lang[l]=q.langEntries[o];o=null}}e.push(o);d.push(q)}CKEDITOR.scriptLoader.load(f,function(){for(var c=["beforeInit","init","afterInit"],f=0;f=0)n=a.langCode;else{n=a.langCode.replace(/-.*/,"");n=n!=a.langCode&&CKEDITOR.tools.indexOf(o,n)>=0?n:CKEDITOR.tools.indexOf(o,"en")>=0?"en":o[0]}if(!q.langEntries|| +!q.langEntries[n])f.push(CKEDITOR.getUrl(q.path+"lang/"+n+".js"));else{a.lang[k]=q.langEntries[n];n=null}}e.push(n);d.push(q)}CKEDITOR.scriptLoader.load(f,function(){for(var c=["beforeInit","init","afterInit"],f=0;f]+)>)|(?:!--([\\S|\\s]*?)--\>)|(?:([^\\s>]+)\\s*((?:(?:\"[^\"]*\")|(?:'[^']*')|[^\"'>])*)\\/?>))","g")}}; (function(){var b=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,c={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(a){for(var f,d,e=0,h;f=this._.htmlPartsRegex.exec(a);){d=f.index;if(d>e){e=a.substring(e,d);if(h)h.push(e);else this.onText(e)}e= -this._.htmlPartsRegex.lastIndex;if(d=f[1]){d=d.toLowerCase();if(h&&CKEDITOR.dtd.$cdata[d]){this.onCDATA(h.join(""));h=null}if(!h){this.onTagClose(d);continue}}if(h)h.push(f[0]);else if(d=f[3]){d=d.toLowerCase();if(!/="/.test(d)){var j={},i;f=f[4];var k=!!(f&&f.charAt(f.length-1)=="/");if(f)for(;i=b.exec(f);){var m=i[1].toLowerCase();i=i[2]||i[3]||i[4]||"";j[m]=!i&&c[m]?m:i}this.onTagOpen(d,j,k);!h&&CKEDITOR.dtd.$cdata[d]&&(h=[])}}else if(d=f[2])this.onComment(d)}if(a.length>e)this.onText(a.substring(e, +this._.htmlPartsRegex.lastIndex;if(d=f[1]){d=d.toLowerCase();if(h&&CKEDITOR.dtd.$cdata[d]){this.onCDATA(h.join(""));h=null}if(!h){this.onTagClose(d);continue}}if(h)h.push(f[0]);else if(d=f[3]){d=d.toLowerCase();if(!/="/.test(d)){var j={},i;f=f[4];var l=!!(f&&f.charAt(f.length-1)=="/");if(f)for(;i=b.exec(f);){var m=i[1].toLowerCase();i=i[2]||i[3]||i[4]||"";j[m]=!i&&c[m]?m:i}this.onTagOpen(d,j,l);!h&&CKEDITOR.dtd.$cdata[d]&&(h=[])}}else if(d=f[2])this.onComment(d)}if(a.length>e)this.onText(a.substring(e, a.length))}}})(); CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(b){this._.output.push("<",b)},openTagClose:function(b,c){c?this._.output.push(" />"):this._.output.push(">")},attribute:function(b,c){typeof c=="string"&&(c=CKEDITOR.tools.htmlEncodeAttr(c));this._.output.push(" ",b,'="',c,'"')},closeTag:function(b){this._.output.push("")},text:function(b){this._.output.push(b)},comment:function(b){this._.output.push("<\!--",b,"--\>")},write:function(b){this._.output.push(b)}, reset:function(){this._.output=[];this._.indent=false},getHtml:function(b){var c=this._.output.join("");b&&this.reset();return c}}});"use strict"; @@ -238,39 +238,39 @@ a=CKEDITOR.tools.indexOf(c,b),f=b.next;c.splice(a+1,0,this);this.next=b.next;thi CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(b){var c=this.value;if(!(c=b.onComment(c,this))){this.remove();return false}if(typeof c!="string"){this.replaceWith(c);return false}this.value=c;return true},writeHtml:function(b,c){c&&this.filter(c);b.comment(this.value)}});"use strict"; (function(){CKEDITOR.htmlParser.text=function(b){this.value=b;this._={isBlockLike:false}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(b){if(!(this.value=b.onText(this.value,this))){this.remove();return false}},writeHtml:function(b,c){c&&this.filter(c);b.text(this.value)}})})();"use strict"; (function(){CKEDITOR.htmlParser.cdata=function(b){this.value=b};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(b){b.write(this.value)}})})();"use strict";CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:true,hasInlineStarted:false}}; -(function(){function b(a){return a.name=="a"&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var c=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),a={ol:1,ul:1},f=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1});CKEDITOR.htmlParser.fragment.fromHtml=function(d,e,h){function j(a){var b;if(p.length>0)for(var c=0;c=0;b--)if(a==p[b].name){p.splice(b,1);return}for(var c=[],d=[],e=u;e!=g&&e.name!=a;){e._.isBlockLike||d.unshift(e);c.push(e);e=e.returnPoint||e.parent}if(e!=g){for(b=0;b0?this.children[b-1]:null;if(c){if(a._.isBlockLike&&c.type==CKEDITOR.NODE_TEXT){c.value=CKEDITOR.tools.rtrim(c.value);if(c.value.length===0){this.children.pop();this.add(a);return}}c.next=a}a.previous=c;a.parent=this; +(function(){function b(a){return a.name=="a"&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var c=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),a={ol:1,ul:1},f=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1});CKEDITOR.htmlParser.fragment.fromHtml=function(d,e,h){function j(a){var b;if(p.length>0)for(var c=0;c=0;b--)if(a==p[b].name){p.splice(b,1);return}for(var c=[],d=[],e=t;e!=g&&e.name!=a;){e._.isBlockLike||d.unshift(e);c.push(e);e=e.returnPoint||e.parent}if(e!=g){for(b=0;b0?this.children[b-1]:null;if(c){if(a._.isBlockLike&&c.type==CKEDITOR.NODE_TEXT){c.value=CKEDITOR.tools.rtrim(c.value);if(c.value.length===0){this.children.pop();this.add(a);return}}c.next=a}a.previous=c;a.parent=this; this.children.splice(b,0,a);if(!this._.hasInlineStarted)this._.hasInlineStarted=a.type==CKEDITOR.NODE_TEXT||a.type==CKEDITOR.NODE_ELEMENT&&!a._.isBlockLike},filter:function(a){a.onRoot(this);this.filterChildren(a)},filterChildren:function(a,b){if(this.childrenFilteredBy!=a.id){if(b&&!this.parent)a.onRoot(this);this.childrenFilteredBy=a.id;for(var c=0;c=0;f--)if(m=b[f]){m.pri=c;a.splice(d,0,m)}}}function a(a,b,c){if(b)for(var d in b){var k=a[d];a[d]=f(k,b[d],c);k||a.$length++}}function f(a,b,f){if(b){b.pri=f;if(a){if(a.splice)c(a,b,f);else{a=a.pri>f?[b,a]:[a,b];a.filter=d}return a}return b.filter=b}}function d(a){for(var b= +b,c){if(c&&!this.parent&&b)b.onRoot(this);b&&this.filterChildren(b);for(var b=0,c=this.children,f=c.length;b=0;f--)if(m=b[f]){m.pri=c;a.splice(d,0,m)}}}function a(a,b,c){if(b)for(var d in b){var l=a[d];a[d]=f(l,b[d],c);l||a.$length++}}function f(a,b,f){if(b){b.pri=f;if(a){if(a.splice)c(a,b,f);else{a=a.pri>f?[b,a]:[a,b];a.filter=d}return a}return b.filter=b}}function d(a){for(var b= a.type||a instanceof CKEDITOR.htmlParser.fragment,c=0;c7||d.name in CKEDITOR.dtd.tr||d.name in CKEDITOR.dtd.$listItem))l=false;else{l=a(d);l=!l||d.name=="form"&&l.name=="input"}l&&d.add(g(b))}}}function p(a,b){if((!q||!CKEDITOR.env.ie)&&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(F))){if(c.index){h(a,new CKEDITOR.htmlParser.text(a.value.substring(0,c.index)));a.value=c[0]}if(CKEDITOR.env.ie&&q&&(!b||a.parent.name in o))return true;if(!q)if((c=a.previous)&&c.name=="br"||!c||e(c))return true}return false}var n={elements:{}},q=c=="html",o=CKEDITOR.tools.extend({},z),r;for(r in o)"#"in s[r]||delete o[r];for(r in o)n.elements[r]=l(q,b.config.fillEmptyBlocks!==false);n.root=l(q);n.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&&d(c);)c=c.next;var l=f(b);!c&&e(b.parent)?j(b.parent,g(a)):e(c)&&(l&&!e(l))&&h(c,g(a))}}}}(q);return n}function c(a){return a.enterMode!=CKEDITOR.ENTER_BR&&a.autoParagraph!==false?a.enterMode==CKEDITOR.ENTER_DIV?"div":"p":false}function a(a){for(a=a.children[a.children.length-1];a&&d(a);)a=a.previous;return a}function f(a){for(a=a.previous;a&&d(a);)a=a.previous; +(function(){function b(b,c){function g(a){return a||CKEDITOR.env.ie?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function k(b,c){return function(d){if(d.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var k=[],h=a(d),p,n;if(h)for(o(h,1)&&k.push(h);h;){if(e(h)&&(p=f(h))&&o(p))if((n=f(p))&&!e(n))k.push(p);else{var u=p,j=g(q),A=u.parent.children,v=CKEDITOR.tools.indexOf(A,u);A.splice(v+1,0,j);A=u.next;u.next=j;j.previous=u;j.parent=u.parent;j.next=A;i(p)}h=h.previous}for(h= +0;h7||d.name in CKEDITOR.dtd.tr||d.name in CKEDITOR.dtd.$listItem))k=false;else{k=a(d);k=!k||d.name=="form"&&k.name=="input"}k&&d.add(g(b))}}}function o(a,b){if((!q||!CKEDITOR.env.ie)&&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(E))){if(c.index){h(a,new CKEDITOR.htmlParser.text(a.value.substring(0,c.index)));a.value=c[0]}if(CKEDITOR.env.ie&&q&&(!b||a.parent.name in n))return true;if(!q)if((c=a.previous)&&c.name=="br"||!c||e(c))return true}return false}var p={elements:{}},q=c=="html",n=CKEDITOR.tools.extend({},z),u;for(u in n)"#"in r[u]||delete n[u];for(u in n)p.elements[u]=k(q,b.config.fillEmptyBlocks!==false);p.root=k(q);p.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&&d(c);)c=c.next;var k=f(b);!c&&e(b.parent)?j(b.parent,g(a)):e(c)&&(k&&!e(k))&&h(c,g(a))}}}}(q);return p}function c(a){return a.enterMode!=CKEDITOR.ENTER_BR&&a.autoParagraph!==false?a.enterMode==CKEDITOR.ENTER_DIV?"div":"p":false}function a(a){for(a=a.children[a.children.length-1];a&&d(a);)a=a.previous;return a}function f(a){for(a=a.previous;a&&d(a);)a=a.previous; return a}function d(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&&a.attributes["data-cke-bookmark"]}function e(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in z||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function h(a,b){var c=a.parent.children,d=CKEDITOR.tools.indexOf(c,a);c.splice(d,0,b);c=a.previous;a.previous=b;b.next=a;b.parent=a.parent;if(c){b.previous=c;c.next=b}}function j(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 i(a){var b=a.parent.children,c=CKEDITOR.tools.indexOf(b,a),d=a.previous,a=a.next;d&&(d.next=a);a&&(a.previous=d);b.splice(c,1)}function k(a){var b=a.parent;return b?CKEDITOR.tools.indexOf(b.children,a):-1}function m(a){a=a.attributes;a.contenteditable!="false"&&(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function q(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}} -function r(a){return a.replace(n,function(a,b,c){return"<"+b+c.replace(w,function(a,b){if(!/^on/.test(b)&&c.indexOf("data-cke-saved-"+b)==-1){a=a.slice(1);return" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a}return a})+">"})}function l(a,b){return a.replace(b,function(a,b,c){a.indexOf("/g,">")+"");return""+encodeURIComponent(a)+""})}function g(a){return a.replace(D,function(a,b){return decodeURIComponent(b)})} -function p(a){return a.replace(/<\!--(?!{cke_protected})[\s\S]+?--\>/g,function(a){return"<\!--"+A+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\>"})}function v(a){return a.replace(/<\!--\{cke_protected\}\{C\}([\s\S]+?)--\>/g,function(a,b){return decodeURIComponent(b)})}function u(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 o(a, +b.parent=a;if(c){c.next=b;b.previous=c}}function i(a){var b=a.parent.children,c=CKEDITOR.tools.indexOf(b,a),d=a.previous,a=a.next;d&&(d.next=a);a&&(a.previous=d);b.splice(c,1)}function l(a){var b=a.parent;return b?CKEDITOR.tools.indexOf(b.children,a):-1}function m(a){a=a.attributes;a.contenteditable!="false"&&(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function q(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}} +function w(a){return a.replace(o,function(a,b,c){return"<"+b+c.replace(u,function(a,b){if(!/^on/.test(b)&&c.indexOf("data-cke-saved-"+b)==-1){a=a.slice(1);return" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a}return a})+">"})}function k(a,b){return a.replace(b,function(a,b,c){a.indexOf("/g,">")+"");return""+encodeURIComponent(a)+""})}function g(a){return a.replace(D,function(a,b){return decodeURIComponent(b)})} +function p(a){return a.replace(/<\!--(?!{cke_protected})[\s\S]+?--\>/g,function(a){return"<\!--"+B+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\>"})}function v(a){return a.replace(/<\!--\{cke_protected\}\{C\}([\s\S]+?)--\>/g,function(a,b){return decodeURIComponent(b)})}function t(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 n(a, b){for(var c=[],d=b.config.protectedSource,g=b._.dataStore||(b._.dataStore={id:1}),e=/<\!--\{cke_temp(comment)?\}(\d*?)--\>/g,d=[//gi,//gi].concat(d),a=a.replace(/<\!--[\s\S]*?--\>/g,function(a){return"<\!--{cke_tempcomment}"+(c.push(a)-1)+"--\>"}),f=0;f"});a=a.replace(e,function(a,b,d){return"<\!--"+ -A+(b?"{C}":"")+encodeURIComponent(c[d]).replace(/--/g,"%2D%2D")+"--\>"});return a.replace(/(['"]).*?\1/g,function(a){return a.replace(/<\!--\{cke_protected\}([\s\S]+?)--\>/g,function(a,b){g[g.id]=decodeURIComponent(b);return"{cke_protected_"+g.id++ +"}"})})}CKEDITOR.htmlDataProcessor=function(a){var d,e,f=this;this.editor=a;this.dataFilter=d=new CKEDITOR.htmlParser.filter;this.htmlFilter=e=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;d.addRules(t);d.addRules(b(a, -"data"));e.addRules(C);e.addRules(b(a,"html"));a.on("toHtml",function(b){var b=b.data,d=b.dataValue,d=o(d,a),d=l(d,G),d=r(d),d=l(d,I),d=d.replace(Q,"$1cke:$2"),d=d.replace(E,""),d=CKEDITOR.env.opera?d:d.replace(/(]*>)(\r\n|\n)/g,"$1$2$2"),e=b.context||a.editable().getName(),f;if(CKEDITOR.env.ie&&CKEDITOR.env.version<9&&e=="pre"){e="div";d="
"+d+"
";f=1}e=a.document.createElement(e);e.setHtml("a"+d);d=e.getHtml().substr(1);d=d.replace(RegExp(" data-cke-"+CKEDITOR.rnd+ +B+(b?"{C}":"")+encodeURIComponent(c[d]).replace(/--/g,"%2D%2D")+"--\>"});return a.replace(/(['"]).*?\1/g,function(a){return a.replace(/<\!--\{cke_protected\}([\s\S]+?)--\>/g,function(a,b){g[g.id]=decodeURIComponent(b);return"{cke_protected_"+g.id++ +"}"})})}CKEDITOR.htmlDataProcessor=function(a){var d,e,f=this;this.editor=a;this.dataFilter=d=new CKEDITOR.htmlParser.filter;this.htmlFilter=e=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;d.addRules(s);d.addRules(b(a, +"data"));e.addRules(C);e.addRules(b(a,"html"));a.on("toHtml",function(b){var b=b.data,d=b.dataValue,d=n(d,a),d=k(d,G),d=w(d),d=k(d,I),d=d.replace(Q,"$1cke:$2"),d=d.replace(F,""),d=CKEDITOR.env.opera?d:d.replace(/(]*>)(\r\n|\n)/g,"$1$2$2"),e=b.context||a.editable().getName(),f;if(CKEDITOR.env.ie&&CKEDITOR.env.version<9&&e=="pre"){e="div";d="
"+d+"
";f=1}e=a.document.createElement(e);e.setHtml("a"+d);d=e.getHtml().substr(1);d=d.replace(RegExp(" data-cke-"+CKEDITOR.rnd+ "-","ig")," ");f&&(d=d.replace(/^
|<\/pre>$/gi,""));d=d.replace(L,"$1$2");d=g(d);d=v(d);b.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(d,b.context,b.fixForBody===false?false:c(a.config))},null,null,5);a.on("toHtml",function(a){a.data.dataValue.filterChildren(f.dataFilter,true)},null,null,10);a.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=p(b)},null,null,15);a.on("toDataFormat",function(b){b.data.dataValue=
-CKEDITOR.htmlParser.fragment.fromHtml(b.data.dataValue,a.editable().getName(),c(a.config))},null,null,5);a.on("toDataFormat",function(a){a.data.dataValue.filterChildren(f.htmlFilter,true)},null,null,10);a.on("toDataFormat",function(b){var c=b.data.dataValue,d=f.writer;d.reset();c.writeChildrenHtml(d);c=d.getHtml(true);c=v(c);c=u(c,a);b.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,c,d){var g=this.editor;!b&&b!==null&&(b=g.editable().getName());return g.fire("toHtml",
-{dataValue:a,context:b,fixForBody:c,dontFilter:!!d}).dataValue},toDataFormat:function(a){return this.editor.fire("toDataFormat",{dataValue:a}).dataValue}};var F=/(?: |\xa0)$/,A="{cke_protected}",s=CKEDITOR.dtd,x=["caption","colgroup","col","thead","tfoot","tbody"],z=CKEDITOR.tools.extend({},s.$blockLimit,s.$block),t={elements:{},attributeNames:[[/^on/,"data-cke-pa-on"]]},C={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,g=0;g-1&&d>-1&&c!=d)){c=k(a);d=k(b)}return c>d?1:-1})},embed:function(a){var b=a.parent;if(b&&b.name=="object"){var c=
+CKEDITOR.htmlParser.fragment.fromHtml(b.data.dataValue,a.editable().getName(),c(a.config))},null,null,5);a.on("toDataFormat",function(a){a.data.dataValue.filterChildren(f.htmlFilter,true)},null,null,10);a.on("toDataFormat",function(b){var c=b.data.dataValue,d=f.writer;d.reset();c.writeChildrenHtml(d);c=d.getHtml(true);c=v(c);c=t(c,a);b.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,c,d){var g=this.editor;!b&&b!==null&&(b=g.editable().getName());return g.fire("toHtml",
+{dataValue:a,context:b,fixForBody:c,dontFilter:!!d}).dataValue},toDataFormat:function(a){return this.editor.fire("toDataFormat",{dataValue:a}).dataValue}};var E=/(?: |\xa0)$/,B="{cke_protected}",r=CKEDITOR.dtd,x=["caption","colgroup","col","thead","tfoot","tbody"],z=CKEDITOR.tools.extend({},r.$blockLimit,r.$block),s={elements:{},attributeNames:[[/^on/,"data-cke-pa-on"]]},C={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,g=0;g-1&&d>-1&&c!=d)){c=l(a);d=l(b)}return c>d?1:-1})},embed:function(a){var b=a.parent;if(b&&b.name=="object"){var c=
 b.attributes.width,b=b.attributes.height;c&&(a.attributes.width=c);b&&(a.attributes.height=b)}},param:function(a){a.children=[];a.isEmpty=true;return a},a:function(a){if(!a.children.length&&!a.attributes.name&&!a.attributes["data-cke-saved-name"])return false},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];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&&j(a,b=new CKEDITOR.htmlParser.text);b.value=a.attributes["data-cke-title"]||""}},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||false}}};if(CKEDITOR.env.ie)C.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})};for(var y in{input:1,
-textarea:1}){t.elements[y]=m;C.elements[y]=q}var n=/<(a|area|img|input|source)\b([^>]*)>/gi,w=/\s(on\w+|href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,I=/(?:])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,G=/(])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,D=/([^<]*)<\/cke:encoded>/gi,Q=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,L=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,E=/]*?)\/?>(?!\s*<\/cke:\1)/gi})();
+textarea:1}){s.elements[y]=m;C.elements[y]=q}var o=/<(a|area|img|input|source)\b([^>]*)>/gi,u=/\s(on\w+|href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,I=/(?:])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,G=/(])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,D=/([^<]*)<\/cke:encoded>/gi,Q=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,L=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,F=/]*?)\/?>(?!\s*<\/cke:\1)/gi})();
 "use strict";CKEDITOR.htmlParser.element=function(b,c){this.name=b;this.attributes=c||{};this.children=[];var a=b||"",f=a.match(/^cke:(.*)/);f&&(a=f[1]);a=!(!CKEDITOR.dtd.$nonBodyContent[a]&&!CKEDITOR.dtd.$block[a]&&!CKEDITOR.dtd.$listItem[a]&&!CKEDITOR.dtd.$tableContent[a]&&!(CKEDITOR.dtd.$nonEditable[a]||a=="br"));this.isEmpty=!!CKEDITOR.dtd.$empty[b];this.isUnknown=!CKEDITOR.dtd[b];this._={isBlockLike:a,hasInlineStarted:this.isEmpty||!a}};
 CKEDITOR.htmlParser.cssStyle=function(b){var c={};((b instanceof CKEDITOR.htmlParser.element?b.attributes.style:b)||"").replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,b,d){b=="font-family"&&(d=d.replace(/["']/g,""));c[b.toLowerCase()]=d});return{rules:c,populate:function(a){var b=this.toString();if(b)a instanceof CKEDITOR.dom.element?a.setAttribute("style",b):a instanceof CKEDITOR.htmlParser.element?a.attributes.style=b:a.style=b},toString:function(){var a=[],b;
 for(b in c)c[b]&&a.push(b,":",c[b],";");return a.join("")}}};
@@ -286,126 +286,127 @@ b.insertAfter(f);f.hide();f.$.form&&a._attachToForm()}else a.setData(b.getHtml()
 CKEDITOR.inlineAll=function(){var b,c,a;for(a in CKEDITOR.dtd.$editable)for(var f=CKEDITOR.document.getElementsByTag(a),d=0,e=f.count();d{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(f.output({id:a.id,name:b,langDir:a.lang.dir,langCode:a.langCode,voiceLabel:[a.lang.editor,a.name].join(", "),topHtml:i?''+i+"":"",contentId:a.ui.spaceId("contents"),bottomHtml:k?''+k+"":"",outerEl:CKEDITOR.env.ie?"span":"div"}));if(j==CKEDITOR.ELEMENT_MODE_REPLACE){c.hide();
-b.insertAfter(c)}else c.append(b);a.container=b;i&&a.ui.space("top").unselectable();k&&a.ui.space("bottom").unselectable();c=a.config.width;j=a.config.height;c&&b.setStyle("width",CKEDITOR.tools.cssLength(c));j&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(j));b.disableContextMenu();CKEDITOR.env.webkit&&b.on("focus",function(){a.focus()});a.fireOnce("uiReady")}CKEDITOR.replace=function(a,c){return b(a,c,null,CKEDITOR.ELEMENT_MODE_REPLACE)};CKEDITOR.appendTo=function(a,c,f){return b(a,
+i=a.fire("uiSpace",{space:"top",html:""}).html,l=a.fire("uiSpace",{space:"bottom",html:""}).html;f||(f=CKEDITOR.addTemplate("maincontainer",'<{outerEl} id="cke_{name}" class="{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} '+CKEDITOR.env.cssClass+'"  dir="{langDir}" lang="{langCode}" role="application" aria-labelledby="cke_{name}_arialbl">{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(f.output({id:a.id,name:b,langDir:a.lang.dir,langCode:a.langCode,voiceLabel:[a.lang.editor,a.name].join(", "),topHtml:i?''+i+"":"",contentId:a.ui.spaceId("contents"),bottomHtml:l?''+l+"":"",outerEl:CKEDITOR.env.ie?"span":"div"}));if(j==CKEDITOR.ELEMENT_MODE_REPLACE){c.hide();
+b.insertAfter(c)}else c.append(b);a.container=b;i&&a.ui.space("top").unselectable();l&&a.ui.space("bottom").unselectable();c=a.config.width;j=a.config.height;c&&b.setStyle("width",CKEDITOR.tools.cssLength(c));j&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(j));b.disableContextMenu();CKEDITOR.env.webkit&&b.on("focus",function(){a.focus()});a.fireOnce("uiReady")}CKEDITOR.replace=function(a,c){return b(a,c,null,CKEDITOR.ELEMENT_MODE_REPLACE)};CKEDITOR.appendTo=function(a,c,f){return b(a,
 c,f,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),b=0;b",i="",a=h+a.replace(f,function(){return i+h})+i}a=a.replace(/\n/g,"
");b||(a=a.replace(RegExp("
(?=)"),function(a){return d.repeat(a,2)}));a=a.replace(/^ | $/g," ");a=a.replace(/(>|\s) /g,function(a,b){return b+" "}).replace(/ (?=<)/g," ");m(this,"text",a)},insertElement:function(b){e(this);for(var c=this.editor,d=c.config.enterMode, -g=c.getSelection(),f=g.getRanges(),i=b.getName(),j=CKEDITOR.dtd.$block[i],o,m,k,s=f.length-1;s>=0;s--){o=f[s];if(!o.checkReadOnly()){o.deleteContents(1);m=!s&&b||b.clone(1);var x,z;if(j)for(;(x=o.getCommonAncestor(0,1))&&(z=CKEDITOR.dtd[x.getName()])&&(!z||!z[i]);)if(x.getName()in CKEDITOR.dtd.span)o.splitElement(x);else if(o.checkStartOfBlock()&&o.checkEndOfBlock()){o.setStartBefore(x);o.collapse(true);x.remove()}else o.splitBlock(d==CKEDITOR.ENTER_DIV?"div":"p",c.editable());o.insertNode(m);k|| -(k=m)}}if(k){o.moveToPosition(k,CKEDITOR.POSITION_AFTER_END);if(j)if((b=k.getNext(a))&&b.type==CKEDITOR.NODE_ELEMENT&&b.is(CKEDITOR.dtd.$block))b.getDtd()["#"]?o.moveToElementEditStart(b):o.moveToElementEditEnd(k);else if(!b&&d!=CKEDITOR.ENTER_BR){b=o.fixBlock(true,d==CKEDITOR.ENTER_DIV?"div":"p");o.moveToElementEditStart(b)}}g.selectRanges([o]);h(this,CKEDITOR.env.opera)},setData:function(a,b){!b&&this.editor.dataProcessor&&(a=this.editor.dataProcessor.toHtml(a));this.setHtml(a);this.editor.fire("dataReady")}, +g=c.getSelection(),f=g.getRanges(),i=b.getName(),j=CKEDITOR.dtd.$block[i],n,m,l,r=f.length-1;r>=0;r--){n=f[r];if(!n.checkReadOnly()){n.deleteContents(1);m=!r&&b||b.clone(1);var x,z;if(j)for(;(x=n.getCommonAncestor(0,1))&&(z=CKEDITOR.dtd[x.getName()])&&(!z||!z[i]);)if(x.getName()in CKEDITOR.dtd.span)n.splitElement(x);else if(n.checkStartOfBlock()&&n.checkEndOfBlock()){n.setStartBefore(x);n.collapse(true);x.remove()}else n.splitBlock(d==CKEDITOR.ENTER_DIV?"div":"p",c.editable());n.insertNode(m);l|| +(l=m)}}if(l){n.moveToPosition(l,CKEDITOR.POSITION_AFTER_END);if(j)if((b=l.getNext(a))&&b.type==CKEDITOR.NODE_ELEMENT&&b.is(CKEDITOR.dtd.$block))b.getDtd()["#"]?n.moveToElementEditStart(b):n.moveToElementEditEnd(l);else if(!b&&d!=CKEDITOR.ENTER_BR){b=n.fixBlock(true,d==CKEDITOR.ENTER_DIV?"div":"p");n.moveToElementEditStart(b)}}g.selectRanges([n]);h(this,CKEDITOR.env.opera)},setData:function(a,b){!b&&this.editor.dataProcessor&&(a=this.editor.dataProcessor.toHtml(a));this.setHtml(a);this.editor.fire("dataReady")}, getData:function(a){var b=this.getHtml();!a&&this.editor.dataProcessor&&(b=this.editor.dataProcessor.toDataFormat(b));return b},setReadOnly:function(a){this.setAttribute("contenteditable",!a)},detach:function(){this.removeClass("cke_editable");var a=this.editor;this._.detach();delete a.document;delete a.window},isInline:function(){return this.getDocument().equals(CKEDITOR.document)},setup:function(){var a=this.editor;this.attachListener(a,"beforeGetData",function(){var b=this.getData();this.is("textarea")|| a.config.ignoreEmptyParagraph!==false&&(b=b.replace(j,function(a,b){return b}));a.setData(b,null,1)},this);this.attachListener(a,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(a,"afterSetData",function(){this.setData(a.getData(1))},this);this.attachListener(a,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(a,"beforeFocus",function(){var b=a.getSelection();(b=b&&b.getNative())&&b.type=="Control"||this.focus()},this);this.attachListener(a,"insertHtml", function(a){this.insertHtml(a.data.dataValue,a.data.mode)},this);this.attachListener(a,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(a,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(a.readOnly);this.attachClass("cke_editable");this.attachClass(a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"cke_editable_inline":a.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE||a.elementMode==CKEDITOR.ELEMENT_MODE_APPENDTO?"cke_editable_themed":"");this.attachClass("cke_contents_"+ a.config.contentsLangDirection);a.keystrokeHandler.blockedKeystrokes[8]=+a.readOnly;a.keystrokeHandler.attach(this);this.on("blur",function(a){CKEDITOR.env.opera&&CKEDITOR.document.getActive().equals(this.isInline()?this:this.getWindow().getFrame())?a.cancel():this.hasFocus=false},null,null,-1);this.on("focus",function(){this.hasFocus=true},null,null,-1);a.focusManager.add(this);if(this.equals(CKEDITOR.document.getActive())){this.hasFocus=true;a.once("contentDom",function(){a.focusManager.focus()})}this.isInline()&& this.changeAttr("tabindex",a.tabIndex);if(!this.is("textarea")){a.document=this.getDocument();a.window=this.getWindow();var b=a.document;this.changeAttr("spellcheck",!a.config.disableNativeSpellChecker);var e=a.config.contentsLangDirection;this.getDirection(1)!=e&&this.changeAttr("dir",e);var g=CKEDITOR.getCss();if(g){e=b.getHead();if(!e.getCustomData("stylesheet")){g=b.appendStyleText(g);g=new CKEDITOR.dom.element(g.ownerNode||g.owningElement);e.setCustomData("stylesheet",g);g.data("cke-temp",1)}}e= -b.getCustomData("stylesheet_ref")||0;b.setCustomData("stylesheet_ref",e+1);this.setCustomData("cke_includeReadonly",!a.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){var a=a.data,b=a.getTarget();b.is("a")&&(a.$.button!=2&&b.isReadOnly())&&a.preventDefault()});this.attachListener(a,"key",function(b){if(a.readOnly)return true;var c=b.data.keyCode,g;if(c in{8:1,46:1}){var e=a.getSelection(),b=e.getRanges()[0],f=b.startPath(),l,h,j,c=c==8;if(e=d(e)){a.fire("saveSnapshot"); -b.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START);e.remove();b.select();a.fire("saveSnapshot");g=1}else if(b.collapsed)if((l=f.block)&&b[c?"checkStartOfBlock":"checkEndOfBlock"]()&&(j=l[c?"getPrevious":"getNext"](i))&&j.is("table")){a.fire("saveSnapshot");b[c?"checkEndOfBlock":"checkStartOfBlock"]()&&l.remove();b["moveToElementEdit"+(c?"End":"Start")](j);b.select();a.fire("saveSnapshot");g=1}else if(f.blockLimit&&f.blockLimit.is("td")&&(h=f.blockLimit.getAscendant("table"))&&b.checkBoundaryOfElement(h, -c?CKEDITOR.START:CKEDITOR.END)&&(j=h[c?"getPrevious":"getNext"](i))){a.fire("saveSnapshot");b["moveToElementEdit"+(c?"End":"Start")](j);b.checkStartOfBlock()&&b.checkEndOfBlock()?j.remove():b.select();a.fire("saveSnapshot");g=1}else if((h=f.contains(["td","th","caption"]))&&b.checkBoundaryOfElement(h,c?CKEDITOR.START:CKEDITOR.END))g=1}return!g});CKEDITOR.env.ie&&this.attachListener(this,"click",c);!CKEDITOR.env.ie&&!CKEDITOR.env.opera&&this.attachListener(this,"mousedown",function(b){var c=b.data.getTarget(); -if(c.is("img","hr","input","textarea","select")){a.getSelection().selectElement(c);c.is("input","textarea","select")&&b.data.preventDefault()}});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(b){if(b.data.$.button==2){b=b.data.getTarget();if(!b.getOuterHtml().replace(j,"")){var c=a.createRange();c.moveToElementEditStart(b);c.select(true)}}});if(CKEDITOR.env.webkit){this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()});this.attachListener(this, -"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()})}}}},_:{detach:function(){this.editor.setData(this.editor.getData(),0,1);this.clearListeners();this.restoreAttrs();var a;if(a=this.removeCustomData("classes"))for(;a.length;)this.removeClass(a.pop());a=this.getDocument();var b=a.getHead();if(b.getCustomData("stylesheet")){var c=a.getCustomData("stylesheet_ref");if(--c)a.setCustomData("stylesheet_ref",c);else{a.removeCustomData("stylesheet_ref");b.removeCustomData("stylesheet").remove()}}delete this.editor}}}); -CKEDITOR.editor.prototype.editable=function(a){var b=this._.editable;if(b&&a)return 0;if(arguments.length)b=this._.editable=a?a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(),null);return b};var j=/(^|]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,i=CKEDITOR.dom.walker.whitespaces(true),k=CKEDITOR.dom.walker.bookmark(false,true);CKEDITOR.on("instanceLoaded",function(a){var c=a.editor;c.on("insertElement", -function(a){a=a.data;if(a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))){a.getAttribute("contentEditable")!="false"&&a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1");a.setAttribute("contentEditable",false)}});c.on("selectionChange",function(a){if(!c.readOnly){var d=c.getSelection();if(d&&!d.isLocked){d=c.checkDirty();c.fire("lockSnapshot");b(a);c.fire("unlockSnapshot");!d&&c.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);if(c=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents")){var d=CKEDITOR.tools.getNextId(),e=CKEDITOR.dom.element.createFromHtml(''+this.lang.common.editorHelp+"");c.append(e);a.changeAttr("aria-describedby",d)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}"); -var m=function(){function b(a){return a.type==CKEDITOR.NODE_ELEMENT}function c(a,d){var g,e,f,h,n=[],l=d.range.startContainer;g=d.range.startPath();for(var l=i[l.getName()],o=0,p=a.getChildren(),j=p.count(),m=-1,k=-1,v=0,F=g.contains(i.$list);o-1)n[m].firstNotAllowed=1;if(k>-1)n[k].lastNotAllowed=1;return n}function d(a,c){var g=[],e=a.getChildren(),f=e.count(),h,n=0,o=i[c],p=!a.is(i.$inline)||a.is("br");for(p&&g.push(" ");n ",t.document);t.insertNode(w);t.setStartAfter(w)}I=new CKEDITOR.dom.elementPath(t.startContainer);k.endPath=G=new CKEDITOR.dom.elementPath(t.endContainer);if(!t.collapsed){var n=G.block||G.blockLimit,Q=t.getCommonAncestor(); -n&&(!n.equals(Q)&&!n.contains(Q)&&t.checkEndOfBlock())&&k.zombies.push(n);t.deleteContents()}for(;(D=b(t.startContainer)&&t.startContainer.getChild(t.startOffset-1))&&b(D)&&D.isBlockBoundary()&&I.contains(D);)t.moveToPosition(D,CKEDITOR.POSITION_BEFORE_END);e(t,k.blockLimit,I,G);if(w){t.setEndBefore(w);t.collapse();w.remove()}w=t.startPath();if(n=w.contains(g,false,1)){t.splitElement(n);k.inlineStylesRoot=n;k.inlineStylesPeak=w.lastElement}w=t.createBookmark();(n=w.startNode.getPrevious(a))&&b(n)&& -g(n)&&y.push(n);(n=w.startNode.getNext(a))&&b(n)&&g(n)&&y.push(n);for(n=w.startNode;(n=n.getParent())&&g(n);)y.push(n);t.moveToBookmark(w);if(w=z){w=k.range;if(k.type=="text"&&k.inlineStylesRoot){D=k.inlineStylesPeak;t=D.getDocument().createText("{cke-peak}");for(y=k.inlineStylesRoot.getParent();!D.equals(y);){t=t.appendTo(D.clone());D=D.getParent()}z=t.getOuterHtml().split("{cke-peak}").join(z)}D=k.blockLimit.getName();if(/^\s+|\s+$/.test(z)&&"span"in CKEDITOR.dtd[D])var L=' ', -z=L+z+L;z=k.editor.dataProcessor.toHtml(z,null,false,k.dontFilter);D=w.document.createElement("body");D.setHtml(z);if(L){D.getFirst().remove();D.getLast().remove()}if((L=w.startPath().block)&&!(L.getChildCount()==1&&L.getBogus()))a:{var E;if(D.getChildCount()==1&&b(E=D.getFirst())&&E.is(j)){L=E.getElementsByTag("*");w=0;for(y=L.count();w0;else{B=E.startPath();if(!G.isBlock&&(N=k.editor.config.enterMode!=CKEDITOR.ENTER_BR&&k.editor.config.autoParagraph!==false?k.editor.config.enterMode==CKEDITOR.ENTER_DIV?"div":"p":false)&&!B.block&&B.blockLimit&&B.blockLimit.equals(E.root)){N=L.createElement(N);!CKEDITOR.env.ie&&N.appendBogus();E.insertNode(N);!CKEDITOR.env.ie&&(J=N.getBogus())&&J.remove();E.moveToPosition(N,CKEDITOR.POSITION_BEFORE_END)}if((B= -E.startPath().block)&&!B.equals(H)){if(J=B.getBogus()){J.remove();D.push(B)}H=B}G.firstNotAllowed&&(t=1);if(t&&G.isElement){B=E.startContainer;for(K=null;B&&!i[B.getName()][G.name];){if(B.equals(z)){B=null;break}K=B;B=B.getParent()}if(B){if(K){O=E.splitElement(K);k.zombies.push(O);k.zombies.push(K)}}else{K=z.getName();P=!w;B=w==I.length-1;K=d(G.node,K);for(var M=[],R=K.length,T=0,U=void 0,V=0,W=-1;T]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,i=CKEDITOR.dom.walker.whitespaces(true),l=CKEDITOR.dom.walker.bookmark(false,true); +CKEDITOR.on("instanceLoaded",function(a){var c=a.editor;c.on("insertElement",function(a){a=a.data;if(a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))){a.getAttribute("contentEditable")!="false"&&a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1");a.setAttribute("contentEditable",false)}});c.on("selectionChange",function(a){if(!c.readOnly){var d=c.getSelection();if(d&&!d.isLocked){d=c.checkDirty();c.fire("lockSnapshot");b(a);c.fire("unlockSnapshot");!d&&c.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);if(c=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents")){var d=CKEDITOR.tools.getNextId(),e=CKEDITOR.dom.element.createFromHtml(''+this.lang.common.editorHelp+"");c.append(e);a.changeAttr("aria-describedby", +d)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");var m=function(){function b(a){return a.type==CKEDITOR.NODE_ELEMENT}function c(a,d){var g,e,f,h,k=[],n=d.range.startContainer;g=d.range.startPath();for(var n=i[n.getName()],p=0,j=a.getChildren(),m=j.count(),l=-1,v=-1,E=0,B=g.contains(i.$list);p-1)k[l].firstNotAllowed=1;if(v>-1)k[v].lastNotAllowed=1;return k}function d(a,c){var g=[],e=a.getChildren(),f=e.count(),h,o=0,n=i[c],p=!a.is(i.$inline)||a.is("br");for(p&&g.push(" ");o ",s.document);s.insertNode(u);s.setStartAfter(u)}I=new CKEDITOR.dom.elementPath(s.startContainer); +l.endPath=G=new CKEDITOR.dom.elementPath(s.endContainer);if(!s.collapsed){var o=G.block||G.blockLimit,Q=s.getCommonAncestor();o&&(!o.equals(Q)&&!o.contains(Q)&&s.checkEndOfBlock())&&l.zombies.push(o);s.deleteContents()}for(;(D=b(s.startContainer)&&s.startContainer.getChild(s.startOffset-1))&&b(D)&&D.isBlockBoundary()&&I.contains(D);)s.moveToPosition(D,CKEDITOR.POSITION_BEFORE_END);e(s,l.blockLimit,I,G);if(u){s.setEndBefore(u);s.collapse();u.remove()}u=s.startPath();if(o=u.contains(g,false,1)){s.splitElement(o); +l.inlineStylesRoot=o;l.inlineStylesPeak=u.lastElement}u=s.createBookmark();(o=u.startNode.getPrevious(a))&&b(o)&&g(o)&&y.push(o);(o=u.startNode.getNext(a))&&b(o)&&g(o)&&y.push(o);for(o=u.startNode;(o=o.getParent())&&g(o);)y.push(o);s.moveToBookmark(u);if(u=z){u=l.range;if(l.type=="text"&&l.inlineStylesRoot){D=l.inlineStylesPeak;s=D.getDocument().createText("{cke-peak}");for(y=l.inlineStylesRoot.getParent();!D.equals(y);){s=s.appendTo(D.clone());D=D.getParent()}z=s.getOuterHtml().split("{cke-peak}").join(z)}D= +l.blockLimit.getName();if(/^\s+|\s+$/.test(z)&&"span"in CKEDITOR.dtd[D])var L=' ',z=L+z+L;z=l.editor.dataProcessor.toHtml(z,null,false,l.dontFilter);D=u.document.createElement("body");D.setHtml(z);if(L){D.getFirst().remove();D.getLast().remove()}if((L=u.startPath().block)&&!(L.getChildCount()==1&&L.getBogus()))a:{var F;if(D.getChildCount()==1&&b(F=D.getFirst())&&F.is(j)){L=F.getElementsByTag("*");u=0;for(y=L.count();u0;else{A=F.startPath();if(!G.isBlock&&(N=l.editor.config.enterMode!=CKEDITOR.ENTER_BR&&l.editor.config.autoParagraph!==false?l.editor.config.enterMode==CKEDITOR.ENTER_DIV?"div":"p":false)&&!A.block&&A.blockLimit&&A.blockLimit.equals(F.root)){N=L.createElement(N);!CKEDITOR.env.ie&&N.appendBogus();F.insertNode(N); +!CKEDITOR.env.ie&&(J=N.getBogus())&&J.remove();F.moveToPosition(N,CKEDITOR.POSITION_BEFORE_END)}if((A=F.startPath().block)&&!A.equals(H)){if(J=A.getBogus()){J.remove();D.push(A)}H=A}G.firstNotAllowed&&(s=1);if(s&&G.isElement){A=F.startContainer;for(K=null;A&&!i[A.getName()][G.name];){if(A.equals(z)){A=null;break}K=A;A=A.getParent()}if(A){if(K){O=F.splitElement(K);l.zombies.push(O);l.zombies.push(K)}}else{K=z.getName();P=!u;A=u==I.length-1;K=d(G.node,K);for(var M=[],R=K.length,T=0,U=void 0,V=0,W=-1;T< +R;T++){U=K[T];if(U==" "){if(!V&&(!P||T)){M.push(new CKEDITOR.dom.text(" "));W=M.length}V=1}else{M.push(U);V=0}}A&&W==M.length&&M.pop();P=M}}if(P){for(;A=P.pop();)F.insertNode(A);P=0}else F.insertNode(G.node);if(G.lastNotAllowed&&u1&&f&&f.intersectsNode(c.$)){d=[e.anchorOffset,e.focusOffset];f=e.focusNode==c.$&&e.focusOffset>0;e.anchorNode==c.$&&e.anchorOffset>0&&d[0]--;f&&d[1]--;var i;f=e;if(!f.isCollapsed){i=f.getRangeAt(0);i.setStart(f.anchorNode,f.anchorOffset);i.setEnd(f.focusNode,f.focusOffset);i=i.collapsed}i&&d.unshift(d.pop())}}c.setText(h(c.getText()));if(d){c=e.getRangeAt(0);c.setStart(c.startContainer,d[0]);c.setEnd(c.startContainer,d[1]);e.removeAllRanges();e.addRange(c)}}}function h(a){return a.replace(/\u200B( )?/g, -function(a){return a[1]?" ":""})}function j(a,b,c){var d=a.on("focus",function(a){a.cancel()},null,null,-100);if(CKEDITOR.env.ie)var e=a.getDocument().on("selectionchange",function(a){a.cancel()},null,null,-100);else{var f=new CKEDITOR.dom.range(a);f.moveToElementEditStart(a);var h=a.getDocument().$.createRange();h.setStart(f.startContainer.$,f.startOffset);h.collapse(1);b.removeAllRanges();b.addRange(h)}c&&a.focus();d.removeListener();e&&e.removeListener()}var i,k,m=CKEDITOR.dom.walker.invisible(1); -CKEDITOR.on("instanceCreated",function(a){function d(){var a=f.getSelection();a&&a.removeAllRanges()}var f=a.editor;f.define("selectionChange",{errorProof:1});f.on("contentDom",function(){var a=f.document,d=CKEDITOR.document,g=f.editable(),h=a.getBody(),l=a.getDocumentElement(),i=g.isInline(),k;CKEDITOR.env.gecko&&g.attachListener(g,"focus",function(a){a.removeListener();if(k!==0){a=f.getSelection().getNative();if(a.isCollapsed&&a.anchorNode==g.$){a=f.createRange();a.moveToElementEditStart(g);a.select()}}}, -null,null,-2);g.attachListener(g,"focus",function(){f.unlockSelection(k);k=0},null,null,-1);g.attachListener(g,"mousedown",function(){k=0});if(CKEDITOR.env.ie||CKEDITOR.env.opera||i){var j,m=function(){j=f.getSelection(1);j.lock()};q?g.attachListener(g,"beforedeactivate",m,null,null,-1):g.attachListener(f,"selectionCheck",m,null,null,-1);g.attachListener(g,"blur",function(){f.lockSelection(j);k=1},null,null,-1)}if(CKEDITOR.env.ie&&!i){var r;g.attachListener(g,"mousedown",function(a){a.data.$.button== -2&&f.document.$.selection.type=="None"&&(r=f.window.getScrollPosition())});g.attachListener(g,"mouseup",function(a){if(a.data.$.button==2&&r){f.document.$.documentElement.scrollLeft=r.x;f.document.$.documentElement.scrollTop=r.y}r=null});if(a.$.compatMode!="BackCompat"){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)l.on("mousedown",function(a){function b(a){a=a.data.$;if(g){var c=h.$.createTextRange();try{c.moveToPoint(a.x,a.y)}catch(d){}g.setEndPoint(f.compareEndPoints("StartToStart",c)<0?"EndToEnd": -"StartToStart",c);g.select()}}function c(){l.removeListener("mousemove",b);d.removeListener("mouseup",c);l.removeListener("mouseup",c);g.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y7){l.on("mousedown",function(a){if(a.data.getTarget().is("html")){d.on("mouseup",y);l.on("mouseup", -y)}});var y=function(){d.removeListener("mouseup",y);l.removeListener("mouseup",y);var b=CKEDITOR.document.$.selection,c=b.createRange();b.type!="None"&&c.parentElement().ownerDocument==a.$&&c.select()}}}}g.attachListener(g,"selectionchange",b,f);g.attachListener(g,"keyup",c,f);g.attachListener(g,"focus",function(){f.forceNextSelectionCheck();f.selectionChange(1)});if(i?CKEDITOR.env.webkit||CKEDITOR.env.gecko:CKEDITOR.env.opera){var n;g.attachListener(g,"mousedown",function(){n=1});g.attachListener(a.getDocumentElement(), -"mouseup",function(){n&&c.call(f);n=0})}else g.attachListener(CKEDITOR.env.ie?g:a.getDocumentElement(),"mouseup",c,f);CKEDITOR.env.webkit&&g.attachListener(a,"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:e(g)}},null,null,-1)});f.on("contentDomUnload",f.forceNextSelectionCheck,f);f.on("dataReady",function(){f.selectionChange(1)});CKEDITOR.env.ie9Compat&&f.on("beforeDestroy",d,null,null,9);CKEDITOR.env.webkit&&f.on("setData", +function(a){return a[1]?" ":""})}function j(a,b,c){var d=a.on("focus",function(a){a.cancel()},null,null,-100);if(CKEDITOR.env.ie)var e=a.getDocument().on("selectionchange",function(a){a.cancel()},null,null,-100);else{var f=new CKEDITOR.dom.range(a);f.moveToElementEditStart(a);var h=a.getDocument().$.createRange();h.setStart(f.startContainer.$,f.startOffset);h.collapse(1);b.removeAllRanges();b.addRange(h)}c&&a.focus();d.removeListener();e&&e.removeListener()}var i,l,m=CKEDITOR.dom.walker.invisible(1); +CKEDITOR.on("instanceCreated",function(a){function d(){var a=f.getSelection();a&&a.removeAllRanges()}var f=a.editor;f.define("selectionChange",{errorProof:1});f.on("contentDom",function(){var a=f.document,d=CKEDITOR.document,g=f.editable(),h=a.getBody(),k=a.getDocumentElement(),i=g.isInline(),l;CKEDITOR.env.gecko&&g.attachListener(g,"focus",function(a){a.removeListener();if(l!==0){a=f.getSelection().getNative();if(a.isCollapsed&&a.anchorNode==g.$){a=f.createRange();a.moveToElementEditStart(g);a.select()}}}, +null,null,-2);g.attachListener(g,"focus",function(){f.unlockSelection(l);l=0},null,null,-1);g.attachListener(g,"mousedown",function(){l=0});if(CKEDITOR.env.ie||CKEDITOR.env.opera||i){var j,m=function(){j=f.getSelection(1);j.lock()};q?g.attachListener(g,"beforedeactivate",m,null,null,-1):g.attachListener(f,"selectionCheck",m,null,null,-1);g.attachListener(g,"blur",function(){f.lockSelection(j);l=1},null,null,-1)}if(CKEDITOR.env.ie&&!i){var w;g.attachListener(g,"mousedown",function(a){a.data.$.button== +2&&f.document.$.selection.type=="None"&&(w=f.window.getScrollPosition())});g.attachListener(g,"mouseup",function(a){if(a.data.$.button==2&&w){f.document.$.documentElement.scrollLeft=w.x;f.document.$.documentElement.scrollTop=w.y}w=null});if(a.$.compatMode!="BackCompat"){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)k.on("mousedown",function(a){function b(a){a=a.data.$;if(g){var c=h.$.createTextRange();try{c.moveToPoint(a.x,a.y)}catch(d){}g.setEndPoint(f.compareEndPoints("StartToStart",c)<0?"EndToEnd": +"StartToStart",c);g.select()}}function c(){k.removeListener("mousemove",b);d.removeListener("mouseup",c);k.removeListener("mouseup",c);g.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y7){k.on("mousedown",function(a){if(a.data.getTarget().is("html")){d.on("mouseup",y);k.on("mouseup", +y)}});var y=function(){d.removeListener("mouseup",y);k.removeListener("mouseup",y);var b=CKEDITOR.document.$.selection,c=b.createRange();b.type!="None"&&c.parentElement().ownerDocument==a.$&&c.select()}}}}g.attachListener(g,"selectionchange",b,f);g.attachListener(g,"keyup",c,f);g.attachListener(g,"focus",function(){f.forceNextSelectionCheck();f.selectionChange(1)});if(i?CKEDITOR.env.webkit||CKEDITOR.env.gecko:CKEDITOR.env.opera){var o;g.attachListener(g,"mousedown",function(){o=1});g.attachListener(a.getDocumentElement(), +"mouseup",function(){o&&c.call(f);o=0})}else g.attachListener(CKEDITOR.env.ie?g:a.getDocumentElement(),"mouseup",c,f);CKEDITOR.env.webkit&&g.attachListener(a,"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:e(g)}},null,null,-1)});f.on("contentDomUnload",f.forceNextSelectionCheck,f);f.on("dataReady",function(){f.selectionChange(1)});CKEDITOR.env.ie9Compat&&f.on("beforeDestroy",d,null,null,9);CKEDITOR.env.webkit&&f.on("setData", d);f.on("contentDomUnload",function(){f.unlockSelection()})});CKEDITOR.on("instanceReady",function(a){var b=a.editor;if(CKEDITOR.env.webkit){b.on("selectionChange",function(){var a=b.editable(),c=d(a);c&&(c.getCustomData("ready")?e(a):c.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){e(b.editable())},null,null,-1);var c,f,a=function(){var a=b.editable();if(a)if(a=d(a)){var e=b.document.$.defaultView.getSelection();e.type=="Caret"&&e.anchorNode==a.$&&(f=1);c=a.getText();a.setText(h(c))}}, i=function(){var a=b.editable();if(a)if(a=d(a)){a.setText(c);if(f){b.document.$.defaultView.getSelection().setPosition(a.$,a.getLength());f=0}}};b.on("beforeUndoImage",a);b.on("afterUndoImage",i);b.on("beforeGetData",a,null,null,0);b.on("getData",i)}});CKEDITOR.editor.prototype.selectionChange=function(a){(a?b:c).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){if(this._.savedSelection&&!a)return this._.savedSelection;return(a=this.editable())?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 q=typeof window.getSelection!="function";CKEDITOR.dom.selection=function(a){var b=a instanceof CKEDITOR.dom.element;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=a=b?a:this.document.getBody(); this.isLocked=0;this._={cache:{}};b=q?this.document.$.selection:this.document.getWindow().$.getSelection();if(CKEDITOR.env.webkit)(b.type=="None"&&this.document.getActive().equals(a)||b.type=="Caret"&&b.anchorNode.nodeType==CKEDITOR.NODE_DOCUMENT)&&j(a,b);else if(CKEDITOR.env.gecko)b&&(this.document.getActive().equals(a)&&b.anchorNode&&b.anchorNode.nodeType==CKEDITOR.NODE_DOCUMENT)&&j(a,b,true);else if(CKEDITOR.env.ie){var c;try{c=this.document.getActive()}catch(d){}if(q)b.type=="None"&&(c&&c.equals(this.document.getDocumentElement()))&& j(a,null,true);else{(b=b&&b.anchorNode)&&(b=new CKEDITOR.dom.node(b));c&&(c.equals(this.document.getDocumentElement())&&b&&(a.equals(b)||a.contains(b)))&&j(a,null,true)}}c=this.getNative();var e,f;if(c)if(c.getRangeAt)e=(f=c.rangeCount&&c.getRangeAt(0))&&new CKEDITOR.dom.node(f.commonAncestorContainer);else{try{f=c.createRange()}catch(h){}e=f&&CKEDITOR.dom.element.get(f.item&&f.item(0)||f.parentElement())}if(!e||!a.equals(e)&&!a.contains(e)){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 r={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=q?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:q?function(){var a= +null;this._.cache.selectedElement=null;this._.cache.selectedText="";this._.cache.ranges=new CKEDITOR.dom.rangeList}return this};var w={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=q?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:q?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&&r[d.childNodes[c.startOffset].nodeName.toLowerCase()])b=CKEDITOR.SELECTION_ELEMENT}return a.type=b},getRanges:function(){var a=q?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(),e=d.ownerDocument;if(!d.hasChildNodes())return{container:d,offset:0};for(var f=d.children,h,i,l=b.duplicate(),k=0,j=f.length-1,m=-1,n,p;k<=j;){m=Math.floor((k+j)/2);h=f[m];l.moveToElementText(h); -n=l.compareEndPoints("StartToStart",b);if(n>0)j=m-1;else if(n<0)k=m+1;else{if(CKEDITOR.env.ie9Compat&&h.tagName=="BR"){f=e.defaultView.getSelection();return{container:f[c?"anchorNode":"focusNode"],offset:f[c?"anchorOffset":"focusOffset"]}}return{container:d,offset:a(h)}}}if(m==-1||m==f.length-1&&n<0){l.moveToElementText(d);l.setEndPoint("StartToStart",b);e=l.text.replace(/(\r\n|\r)/g,"\n").length;f=d.childNodes;if(!e){h=f[f.length-1];return h.nodeType!=CKEDITOR.NODE_TEXT?{container:d,offset:f.length}: -{container:h,offset:h.nodeValue.length}}for(d=f.length;e>0&&d>0;){i=f[--d];if(i.nodeType==CKEDITOR.NODE_TEXT){p=i;e=e-i.nodeValue.length}}return{container:p,offset:-e}}l.collapse(n>0?true:false);l.setEndPoint(n>0?"StartToStart":"EndToStart",b);e=l.text.replace(/(\r\n|\r)/g,"\n").length;if(!e)return{container:d,offset:a(h)+(n>0?0:1)};for(;e>0;)try{i=h[n>0?"previousSibling":"nextSibling"];if(i.nodeType==CKEDITOR.NODE_TEXT){e=e-i.nodeValue.length;p=i}h=i}catch(I){return{container:d,offset:a(h)}}return{container:p, -offset:n>0?-e:p.nodeValue.length+e}};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;e=b.getLength()?j.setStartAfter(b):j.setStartBefore(b));h&&h.type==CKEDITOR.NODE_TEXT&&(k?j.setEndAfter(h):j.setEndBefore(h));b=new CKEDITOR.dom.walker(j);b.evaluator=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&a.isReadOnly()){var b=f.clone();f.setEndBefore(a);f.collapsed&&d.splice(e--,1);if(!(a.getPosition(j.endContainer)&CKEDITOR.POSITION_CONTAINS)){b.setStartAfter(a);b.collapsed|| -d.splice(e+1,0,b)}return true}return false};b.next()}}return c.ranges}}(),getStartElement:function(){var a=this._.cache;if(a.startElement!==void 0)return a.startElement;var b;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:var c=this.getRanges()[0];if(c){if(c.collapsed){b=c.startContainer;b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent())}else{for(c.optimize();;){b=c.startContainer;if(c.startOffset==(b.getChildCount?b.getChildCount(): -b.getLength())&&!b.isBlockBoundary())c.setStartAfter(b);else break}b=c.startContainer;if(b.type!=CKEDITOR.NODE_ELEMENT)return b.getParent();b=b.getChild(c.startOffset);if(!b||b.type!=CKEDITOR.NODE_ELEMENT)b=c.startContainer;else for(c=b.getFirst();c&&c.type==CKEDITOR.NODE_ELEMENT;){b=c;c=c.getFirst()}}b=b.$}}return a.startElement=b?new CKEDITOR.dom.element(b):null},getSelectedElement:function(){var a=this._.cache;if(a.selectedElement!==void 0)return a.selectedElement;var b=this,c=CKEDITOR.tools.tryThese(function(){return b.getNative().createRange().item(0)}, -function(){for(var a=b.getRanges()[0],c,d,e=2;e&&(!(c=a.getEnclosedNode())||!(c.type==CKEDITOR.NODE_ELEMENT&&r[c.getName()]&&(d=c)));e--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return d.$});return a.selectedElement=c?new CKEDITOR.dom.element(c):null},getSelectedText:function(){var a=this._.cache;if(a.selectedText!==void 0)return a.selectedText;var b=this.getNative(),b=q?b.type=="Control"?"":b.createRange().text:b.toString();return a.selectedText=b},lock:function(){this.getRanges();this.getStartElement(); -this.getSelectedElement();this.getSelectedText();this._.cache.nativeSel=null;this.isLocked=1},unlock:function(a){if(this.isLocked){if(a)var b=this.getSelectedElement(),c=!b&&this.getRanges();this.isLocked=0;this.reset();if(a)(a=b||c[0]&&c[0].getCommonAncestor())&&a.getAscendant("body",1)&&(b?this.selectElement(b):this.selectRanges(c))}},reset:function(){this._.cache={}},selectElement:function(a){var b=new CKEDITOR.dom.range(this.root);b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},selectRanges:function(a){if(a.length)if(this.isLocked){var b= -CKEDITOR.document.getActive();this.unlock();this.selectRanges(a);this.lock();!b.equals(this.root)&&b.focus()}else{if(q){var c=CKEDITOR.dom.walker.whitespaces(true),d=/\ufeff|\u00a0/,h={table:1,tbody:1,tr:1};if(a.length>1){b=a[a.length-1];a[0].setEnd(b.endContainer,b.endOffset)}var b=a[0],a=b.collapsed,i,k,j,m=b.getEnclosedNode();if(m&&m.type==CKEDITOR.NODE_ELEMENT&&m.getName()in r&&(!m.is("a")||!m.getText()))try{j=m.$.createControlRange();j.addElement(m.$);j.select();return}catch(x){}(b.startContainer.type== -CKEDITOR.NODE_ELEMENT&&b.startContainer.getName()in h||b.endContainer.type==CKEDITOR.NODE_ELEMENT&&b.endContainer.getName()in h)&&b.shrink(CKEDITOR.NODE_ELEMENT,true);j=b.createBookmark();var h=j.startNode,z;if(!a)z=j.endNode;j=b.document.$.body.createTextRange();j.moveToElementText(h.$);j.moveStart("character",1);if(z){d=b.document.$.body.createTextRange();d.moveToElementText(z.$);j.setEndPoint("EndToEnd",d);j.moveEnd("character",-1)}else{i=h.getNext(c);k=h.hasAscendant("pre");i=!(i&&i.getText&& -i.getText().match(d))&&(k||!h.hasPrevious()||h.getPrevious().is&&h.getPrevious().is("br"));k=b.document.createElement("span");k.setHtml("");k.insertBefore(h);i&&b.document.createText("").insertBefore(h)}b.setStartBefore(h);h.remove();if(a){if(i){j.moveStart("character",-1);j.select();b.document.$.selection.clear()}else j.select();b.moveToPosition(k,CKEDITOR.POSITION_BEFORE_START);k.remove()}else{b.setEndBefore(z);z.remove();j.select()}}else{z=this.getNative();if(!z)return;if(CKEDITOR.env.opera){b= -this.document.$.createRange();b.selectNodeContents(this.root.$);z.addRange(b)}this.removeAllRanges();for(d=0;d=0){b.collapse(1);j.setEnd(b.endContainer.$,b.endOffset)}else throw t;}z.addRange(j)}}this.reset();this.root.fire("selectionchange")}},createBookmarks:function(a){return this.getRanges().createBookmarks(a)},createBookmarks2:function(a){return this.getRanges().createBookmarks2(a)}, -selectBookmarks:function(a){for(var b=[],c=0;c0)l=j-1;else if(m<0)i=j+1;else return{container:d,offset:a(f)}}if(j==-1||j==e.length-1&&m<0){k.moveToElementText(d);k.setEndPoint("StartToStart",b);k=k.text.replace(/(\r\n|\r)/g,"\n").length;e=d.childNodes;if(!k){f=e[e.length-1];return f.nodeType!=CKEDITOR.NODE_TEXT?{container:d,offset:e.length}:{container:f,offset:f.nodeValue.length}}for(d=e.length;k>0&&d>0;){h=e[--d];if(h.nodeType==CKEDITOR.NODE_TEXT){o=h;k=k-h.nodeValue.length}}return{container:o,offset:-k}}k.collapse(m>0?true:false);k.setEndPoint(m> +0?"StartToStart":"EndToStart",b);k=k.text.replace(/(\r\n|\r)/g,"\n").length;if(!k)return{container:d,offset:a(f)+(m>0?0:1)};for(;k>0;)try{h=f[m>0?"previousSibling":"nextSibling"];if(h.nodeType==CKEDITOR.NODE_TEXT){k=k-h.nodeValue.length;o=h}f=h}catch(u){return{container:d,offset:a(f)}}return{container:o,offset:m>0?-k:o.nodeValue.length+k}};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;e=b.getLength()?j.setStartAfter(b):j.setStartBefore(b));h&&h.type==CKEDITOR.NODE_TEXT&&(l?j.setEndAfter(h): +j.setEndBefore(h));b=new CKEDITOR.dom.walker(j);b.evaluator=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&a.isReadOnly()){var b=f.clone();f.setEndBefore(a);f.collapsed&&d.splice(e--,1);if(!(a.getPosition(j.endContainer)&CKEDITOR.POSITION_CONTAINS)){b.setStartAfter(a);b.collapsed||d.splice(e+1,0,b)}return true}return false};b.next()}}return c.ranges}}(),getStartElement:function(){var a=this._.cache;if(a.startElement!==void 0)return a.startElement;var b;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement(); +case CKEDITOR.SELECTION_TEXT:var c=this.getRanges()[0];if(c){if(c.collapsed){b=c.startContainer;b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent())}else{for(c.optimize();;){b=c.startContainer;if(c.startOffset==(b.getChildCount?b.getChildCount():b.getLength())&&!b.isBlockBoundary())c.setStartAfter(b);else break}b=c.startContainer;if(b.type!=CKEDITOR.NODE_ELEMENT)return b.getParent();b=b.getChild(c.startOffset);if(!b||b.type!=CKEDITOR.NODE_ELEMENT)b=c.startContainer;else for(c=b.getFirst();c&&c.type== +CKEDITOR.NODE_ELEMENT;){b=c;c=c.getFirst()}}b=b.$}}return a.startElement=b?new CKEDITOR.dom.element(b):null},getSelectedElement:function(){var a=this._.cache;if(a.selectedElement!==void 0)return a.selectedElement;var b=this,c=CKEDITOR.tools.tryThese(function(){return b.getNative().createRange().item(0)},function(){for(var a=b.getRanges()[0],c,d,e=2;e&&(!(c=a.getEnclosedNode())||!(c.type==CKEDITOR.NODE_ELEMENT&&w[c.getName()]&&(d=c)));e--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return d.$});return a.selectedElement= +c?new CKEDITOR.dom.element(c):null},getSelectedText:function(){var a=this._.cache;if(a.selectedText!==void 0)return a.selectedText;var b=this.getNative(),b=q?b.type=="Control"?"":b.createRange().text:b.toString();return a.selectedText=b},lock:function(){this.getRanges();this.getStartElement();this.getSelectedElement();this.getSelectedText();this._.cache.nativeSel=null;this.isLocked=1},unlock:function(a){if(this.isLocked){if(a)var b=this.getSelectedElement(),c=!b&&this.getRanges();this.isLocked=0; +this.reset();if(a)(a=b||c[0]&&c[0].getCommonAncestor())&&a.getAscendant("body",1)&&(b?this.selectElement(b):this.selectRanges(c))}},reset:function(){this._.cache={}},selectElement:function(a){var b=new CKEDITOR.dom.range(this.root);b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},selectRanges:function(a){if(a.length)if(this.isLocked){var b=CKEDITOR.document.getActive();this.unlock();this.selectRanges(a);this.lock();!b.equals(this.root)&&b.focus()}else{if(q){var c=CKEDITOR.dom.walker.whitespaces(true), +d=/\ufeff|\u00a0/,h={table:1,tbody:1,tr:1};if(a.length>1){b=a[a.length-1];a[0].setEnd(b.endContainer,b.endOffset)}var b=a[0],a=b.collapsed,i,l,j,m=b.getEnclosedNode();if(m&&m.type==CKEDITOR.NODE_ELEMENT&&m.getName()in w&&(!m.is("a")||!m.getText()))try{j=m.$.createControlRange();j.addElement(m.$);j.select();return}catch(x){}(b.startContainer.type==CKEDITOR.NODE_ELEMENT&&b.startContainer.getName()in h||b.endContainer.type==CKEDITOR.NODE_ELEMENT&&b.endContainer.getName()in h)&&b.shrink(CKEDITOR.NODE_ELEMENT, +true);j=b.createBookmark();var h=j.startNode,z;if(!a)z=j.endNode;j=b.document.$.body.createTextRange();j.moveToElementText(h.$);j.moveStart("character",1);if(z){d=b.document.$.body.createTextRange();d.moveToElementText(z.$);j.setEndPoint("EndToEnd",d);j.moveEnd("character",-1)}else{i=h.getNext(c);l=h.hasAscendant("pre");i=!(i&&i.getText&&i.getText().match(d))&&(l||!h.hasPrevious()||h.getPrevious().is&&h.getPrevious().is("br"));l=b.document.createElement("span");l.setHtml("");l.insertBefore(h); +i&&b.document.createText("").insertBefore(h)}b.setStartBefore(h);h.remove();if(a){if(i){j.moveStart("character",-1);j.select();b.document.$.selection.clear()}else j.select();b.moveToPosition(l,CKEDITOR.POSITION_BEFORE_START);l.remove()}else{b.setEndBefore(z);z.remove();j.select()}}else{z=this.getNative();if(!z)return;if(CKEDITOR.env.opera){b=this.document.$.createRange();b.selectNodeContents(this.root.$);z.addRange(b)}this.removeAllRanges();for(d=0;d=0){b.collapse(1);j.setEnd(b.endContainer.$,b.endOffset)}else throw s;}z.addRange(j)}}this.reset();this.root.fire("selectionchange")}},createBookmarks:function(a){return this.getRanges().createBookmarks(a)},createBookmarks2:function(a){return this.getRanges().createBookmarks2(a)},selectBookmarks:function(a){for(var b=[],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 h=a.getDocument().createElement("div");h.append(e);e.$.outerHTML="
"+f+"
";e.copyAttributes(h.getFirst());e=h.getFirst().remove()}else e.setHtml(f);b=e}else f?b=m(c?[a.getHtml()]:i(a),b):a.moveChildren(b);b.replace(a);if(d){var c=b,j;if((j=c.getPrevious(y))&&j.is&&j.is("pre")){d=k(j.getHtml(),/\n$/,"")+ -"\n\n"+k(c.getHtml(),/^\n/,"");CKEDITOR.env.ie?c.$.outerHTML="
"+d+"
":c.setHtml(d);j.remove()}}else c&&g(b)}function i(a){a.getName();var b=[];k(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 k(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 m(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 q(a){var b=this._.definition,c=b.attributes,b=b.styles,d=o(this)[a.getName()],e=CKEDITOR.tools.isEmpty(c)&&CKEDITOR.tools.isEmpty(b),f;for(f in c)if(!((f=="class"||this._.definition.fullMatch)&&a.getAttribute(f)!=F(f,c[f]))){e=a.hasAttribute(f);a.removeAttribute(f)}for(var h in b)if(!(this._.definition.fullMatch&&a.getStyle(h)!=F(h,b[h],true))){e=e||!!a.getStyle(h);a.removeStyle(h)}l(a,d,s[a.getName()]);
-e&&(this._.definition.alwaysRemoveElement?g(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!a.hasAttributes()?g(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function r(a){for(var b=o(this),c=a.getElementsByTag(this.element),d=c.count();--d>=0;)q.call(this,c.getItem(d));for(var e in b)if(e!=this.element){c=a.getElementsByTag(e);for(d=c.count()-1;d>=0;d--){var f=c.getItem(d);l(f,b[e])}}}function l(a,b,c){if(b=b&&b.attributes)for(var 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 h=a.getDocument().createElement("div");h.append(e);e.$.outerHTML="
"+f+"
";e.copyAttributes(h.getFirst());e=h.getFirst().remove()}else e.setHtml(f);b=e}else f?b=m(c?[a.getHtml()]:i(a),b):a.moveChildren(b);b.replace(a);if(d){var c=b,k;if((k=c.getPrevious(y))&&k.is&&k.is("pre")){d=l(k.getHtml(),/\n$/,"")+ +"\n\n"+l(c.getHtml(),/^\n/,"");CKEDITOR.env.ie?c.$.outerHTML="
"+d+"
":c.setHtml(d);k.remove()}}else c&&g(b)}function i(a){a.getName();var b=[];l(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 l(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 m(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 q(a){var b=this._.definition,c=b.attributes,b=b.styles,d=n(this)[a.getName()],e=CKEDITOR.tools.isEmpty(c)&&CKEDITOR.tools.isEmpty(b),f;for(f in c)if(!((f=="class"||this._.definition.fullMatch)&&a.getAttribute(f)!=E(f,c[f]))){e=a.hasAttribute(f);a.removeAttribute(f)}for(var h in b)if(!(this._.definition.fullMatch&&a.getStyle(h)!=E(h,b[h],true))){e=e||!!a.getStyle(h);a.removeStyle(h)}k(a,d,r[a.getName()]);
+e&&(this._.definition.alwaysRemoveElement?g(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!a.hasAttributes()?g(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function w(a){for(var b=n(this),c=a.getElementsByTag(this.element),d=c.count();--d>=0;)q.call(this,c.getItem(d));for(var e in b)if(e!=this.element){c=a.getElementsByTag(e);for(d=c.count()-1;d>=0;d--){var f=c.getItem(d);k(f,b[e])}}}function k(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 f=b[e],g=(e+":"+f).replace(z,";");f=="inherit"?d=d+g:c=c+g}c.length&&(c=CKEDITOR.tools.normalizeCssText(c,true));return a._ST=c+d}})();CKEDITOR.styleCommand=function(b,c){this.requiredContent=this.allowedContent=this.style=b;CKEDITOR.tools.extend(this,c,true)};
 CKEDITOR.styleCommand.prototype.exec=function(b){b.focus();this.state==CKEDITOR.TRISTATE_OFF?b.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&b.removeStyle(this.style)};CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet");CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet);CKEDITOR.loadStylesSet=function(b,c,a){CKEDITOR.stylesSet.addExternal(b,c,"");CKEDITOR.stylesSet.load(b,a)};
 CKEDITOR.editor.prototype.getStylesSet=function(b){if(this._.stylesDefinitions)b(this._.stylesDefinitions);else{var c=this,a=c.config.stylesCombo_stylesSet||c.config.stylesSet;if(a===false)b(null);else if(a instanceof Array){c._.stylesDefinitions=a;b(a)}else{a||(a="default");var a=a.split(":"),f=a[0];CKEDITOR.stylesSet.addExternal(f,a[1]?a.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(f,function(a){c._.stylesDefinitions=a[f];b(c._.stylesDefinitions)})}}};
 CKEDITOR.dom.comment=function(b,c){typeof b=="string"&&(b=(c?c.$:document).createComment(b));CKEDITOR.dom.domObject.call(this,b)};CKEDITOR.dom.comment.prototype=new CKEDITOR.dom.node;CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype,{type:CKEDITOR.NODE_COMMENT,getOuterHtml:function(){return"<\!--"+this.$.nodeValue+"--\>"}});
-(function(){var b={},c;for(c in CKEDITOR.dtd.$blockLimit)c in CKEDITOR.dtd.$list||(b[c]=1);var a={};for(c in CKEDITOR.dtd.$block)c in CKEDITOR.dtd.$blockLimit||c in CKEDITOR.dtd.$empty||(a[c]=1);CKEDITOR.dom.elementPath=function(c,d){var e=null,h=null,j=[],d=d||c.getDocument().getBody(),i=c;do if(i.type==CKEDITOR.NODE_ELEMENT){j.push(i);if(!this.lastElement){this.lastElement=i;if(i.is(CKEDITOR.dtd.$object))continue}var k=i.getName();if(!h){!e&&a[k]&&(e=i);if(b[k]){var m;if(m=!e){if(k=k=="div"){a:{k=
-i.getChildren();m=0;for(var q=k.count();m-1}:typeof b=="function"?f=b:typeof b=="object"&&(f=
 function(a){return a.getName()in b});var d=this.elements,e=d.length;c&&e--;if(a){d=Array.prototype.slice.call(d,0);d.reverse()}for(c=0;c=f){e=d.createText("");e.insertAfter(this)}else{b=d.createText("");b.insertAfter(e);b.remove()}return e},substring:function(b,
 c){return typeof c!="number"?this.$.nodeValue.substr(b):this.$.nodeValue.substring(b,c)}});
 (function(){function b(a,b,c){var e=a.serializable,h=b[c?"endContainer":"startContainer"],j=c?"endOffset":"startOffset",i=e?b.document.getById(a.startNode):a.startNode,a=e?b.document.getById(a.endNode):a.endNode;if(h.equals(i.getPrevious())){b.startOffset=b.startOffset-h.getLength()-a.getPrevious().getLength();h=a.getNext()}else if(h.equals(a.getPrevious())){b.startOffset=b.startOffset-h.getLength();h=a.getNext()}h.equals(i.getParent())&&b[j]++;h.equals(a.getParent())&&b[j]++;b[c?"endContainer":"startContainer"]=
-h;return b}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,c)};var c={createIterator:function(){var a=this,b=CKEDITOR.dom.walker.bookmark(),c=[],e;return{getNextRange:function(h){e=e==void 0?0:e+1;var j=a[e];if(j&&a.length>1){if(!e)for(var i=a.length-1;i>=0;i--)c.unshift(a[i].createBookmark(true));if(h)for(var k=0;a[e+k+1];){for(var m=j.document,h=0,i=m.getById(c[k].endNode),m=m.getById(c[k+
-1].startNode);;){i=i.getNextSourceNode(false);if(m.equals(i))h=1;else if(b(i)||i.type==CKEDITOR.NODE_ELEMENT&&i.isBlockBoundary())continue;break}if(!h)break;k++}for(j.moveToBookmark(c.shift());k--;){i=a[++e];i.moveToBookmark(c.shift());j.setEnd(i.endContainer,i.endOffset)}}return j}}},createBookmarks:function(a){for(var c=[],d,e=0;e1){if(!e)for(var i=a.length-1;i>=0;i--)c.unshift(a[i].createBookmark(true));if(h)for(var l=0;a[e+l+1];){for(var m=j.document,h=0,i=m.getById(c[l].endNode),m=m.getById(c[l+
+1].startNode);;){i=i.getNextSourceNode(false);if(m.equals(i))h=1;else if(b(i)||i.type==CKEDITOR.NODE_ELEMENT&&i.isBlockBoundary())continue;break}if(!h)break;l++}for(j.moveToBookmark(c.shift());l--;){i=a[++e];i.moveToBookmark(c.shift());j.setEnd(i.endContainer,i.endOffset)}}return j}}},createBookmarks:function(a){for(var c=[],d,e=0;eb?-1:1}),e=0,f;e0)&&(a=a+((d.$.offsetWidth||0)-(d.$.clientWidth||
 0)+3));d.setStyle("width",a+10+"px");a=k.element.$.scrollHeight;CKEDITOR.env.ie&&(CKEDITOR.env.quirks&&a>0)&&(a=a+((d.$.offsetHeight||0)-(d.$.clientHeight||0)+3));d.setStyle("height",a+"px");e._.currentBlock.element.setStyle("display","none").removeStyle("display")}else d.removeStyle("height");m&&(f=f-d.$.offsetWidth);d.setStyle("left",f+"px");var b=e.element.getWindow(),a=d.$.getBoundingClientRect(),b=b.getViewPaneSize(),c=a.width||a.right-a.left,g=a.height||a.bottom-a.top,h=m?a.right:b.width-a.left,
 i=m?b.width-a.right:a.left;m?hc?f+c:b.width>c?f-a.left:f-a.right+b.width):hc?f-c:b.width>c?f-a.right+b.width:f-a.left);c=a.top;b.height-a.topg?l-g:b.height>g?l-a.bottom+b.height:l-a.top);if(CKEDITOR.env.ie){b=a=new CKEDITOR.dom.element(d.$.offsetParent);b.getName()=="html"&&(b=b.getDocument().getBody());b.getComputedStyle("direction")=="rtl"&&(f=CKEDITOR.env.ie8Compat?f-d.getDocument().getDocumentElement().$.scrollLeft*2:f-(a.$.scrollWidth-a.$.clientWidth))}var a=d.getFirst(),
-j;(j=a.getCustomData("activePanel"))&&j.onHide&&j.onHide.call(this,1);a.setCustomData("activePanel",this);d.setStyles({top:l+"px",left:f+"px"});d.setOpacity(1)},this);e.isLoaded?a():e.onLoad=a;CKEDITOR.tools.setTimeout(function(){this.focus();this.allowBlur(true);this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:0,this);this.visible=1;this.onShow&&this.onShow.call(this)},focus:function(){if(CKEDITOR.env.webkit){var a=CKEDITOR.document.getActive();!a.equals(this._.iframe)&&a.$.blur()}(this._.lastFocused||
-this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var a=this._.iframe.getFrameDocument().getActive();a.is("a")&&(this._.lastFocused=a)},hide:function(a){if(this.visible&&(!this.onHide||!0!==this.onHide.call(this))){this.hideChild();CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur();this.element.setStyle("display","none");this.visible=0;this.element.getFirst().removeCustomData("activePanel");if(a=a&&this._.returnFocus)CKEDITOR.env.webkit&&a.type&&a.getWindow().$.focus(),
-a.focus();delete this._.lastFocused;this._.editor.fire("panelHide",this)}},allowBlur:function(a){var b=this._.panel;void 0!=a&&(b.allowBlur=a);return b.allowBlur},showAsChild:function(a,b,c,h,g,e){this._.activeChild==a&&a._.panel._.offsetParentId==c.getId()||(this.hideChild(),a.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=a,this._.focused=!1,a.showBlock(b,c,h,g,e),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&
-setTimeout(function(){a.element.getChild(0).$.style.cssText+=""},100))},hideChild:function(a){var b=this._.activeChild;b&&(delete b.onHide,delete this._.activeChild,b.hide(),a&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var a=CKEDITOR.tools.isEmpty(CKEDITOR.instances),b;for(b in i){var c=i[b];a?c.destroy():c.element.hide()}a&&(i={})})})();CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(c){function m(l,g,e,h){var k=new CKEDITOR.style(i["colorButton_"+g+"Style"]),j=CKEDITOR.tools.getNextId()+"_colorBox";c.ui.add(l,CKEDITOR.UI_PANELBUTTON,{label:e,title:e,modes:{wysiwyg:1},editorFocus:1,toolbar:"colors,"+h,allowedContent:k,requiredContent:k,panel:{css:CKEDITOR.skin.getPath("editor"),attributes:{role:"listbox","aria-label":f.panelTitle}},onBlock:function(a,b){b.autoSize=!0;b.element.addClass("cke_colorblock");
+j;(j=a.getCustomData("activePanel"))&&j.onHide&&j.onHide.call(this,1);a.setCustomData("activePanel",this);d.setStyles({top:l+"px",left:f+"px"});d.setOpacity(1)},this);e.isLoaded?a():e.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();k.element.focus();if(CKEDITOR.env.webkit)CKEDITOR.document.getBody().$.scrollTop=a;this.allowBlur(true);this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:0,this);
+this.visible=1;this.onShow&&this.onShow.call(this)},focus:function(){if(CKEDITOR.env.webkit){var a=CKEDITOR.document.getActive();!a.equals(this._.iframe)&&a.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var a=this._.iframe.getFrameDocument().getActive();a.is("a")&&(this._.lastFocused=a)},hide:function(a){if(this.visible&&(!this.onHide||!0!==this.onHide.call(this))){this.hideChild();CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur();
+this.element.setStyle("display","none");this.visible=0;this.element.getFirst().removeCustomData("activePanel");if(a=a&&this._.returnFocus)CKEDITOR.env.webkit&&a.type&&a.getWindow().$.focus(),a.focus();delete this._.lastFocused;this._.editor.fire("panelHide",this)}},allowBlur:function(a){var b=this._.panel;void 0!=a&&(b.allowBlur=a);return b.allowBlur},showAsChild:function(a,b,c,h,g,e){this._.activeChild==a&&a._.panel._.offsetParentId==c.getId()||(this.hideChild(),a.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||
+this.hide()},0,this)},this),this._.activeChild=a,this._.focused=!1,a.showBlock(b,c,h,g,e),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){a.element.getChild(0).$.style.cssText+=""},100))},hideChild:function(a){var b=this._.activeChild;b&&(delete b.onHide,delete this._.activeChild,b.hide(),a&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var a=CKEDITOR.tools.isEmpty(CKEDITOR.instances),b;for(b in i){var c=i[b];a?c.destroy():c.element.hide()}a&&(i=
+{})})})();CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(c){function m(l,g,e,h){var k=new CKEDITOR.style(i["colorButton_"+g+"Style"]),j=CKEDITOR.tools.getNextId()+"_colorBox";c.ui.add(l,CKEDITOR.UI_PANELBUTTON,{label:e,title:e,modes:{wysiwyg:1},editorFocus:0,toolbar:"colors,"+h,allowedContent:k,requiredContent:k,panel:{css:CKEDITOR.skin.getPath("editor"),attributes:{role:"listbox","aria-label":f.panelTitle}},onBlock:function(a,b){b.autoSize=!0;b.element.addClass("cke_colorblock");
 b.element.setHtml(o(a,g,j));b.element.getDocument().getBody().setStyle("overflow","hidden");CKEDITOR.ui.fire("ready",this);var d=b.keys,e="rtl"==c.lang.dir;d[e?37:39]="next";d[40]="next";d[9]="next";d[e?39:37]="prev";d[38]="prev";d[CKEDITOR.SHIFT+9]="prev";d[32]="click"},onOpen:function(){var a=c.getSelection(),a=a&&a.getStartElement(),a=c.elementPath(a),b,a=a.block||a.blockLimit||c.document.getBody();do b=a&&a.getComputedStyle("back"==g?"background-color":"color")||"transparent";while("back"==g&&
 "transparent"==b&&a&&(a=a.getParent()));if(!b||"transparent"==b)b="#ffffff";this._.panel._.iframe.getFrameDocument().getById(j).setStyle("background-color",b);return b}})}function o(l,g,e){var h=[],k=i.colorButton_colors.split(","),j=CKEDITOR.tools.addFunction(function(a,b){if("?"==a){var e=arguments.callee,d=function(a){this.removeListener("ok",d);this.removeListener("cancel",d);"ok"==a.name&&e(this.getContentElement("picker","selectedColor").getValue(),b)};c.openDialog("colordialog",function(){this.on("ok",
 d);this.on("cancel",d)})}else{c.focus();l.hide();c.fire("saveSnapshot");c.removeStyle(new CKEDITOR.style(i["colorButton_"+b+"Style"],{color:"inherit"}));if(a){var f=i["colorButton_"+b+"Style"];f.childRule="back"==b?function(a){return n(a)}:function(a){return!(a.is("a")||a.getElementsByTag("a").count())||n(a)};c.applyStyle(new CKEDITOR.style(f,{color:a}))}c.fire("saveSnapshot")}});h.push('
',f.auto,'
');for(e=0;e");var a=k[e].split("/"),b=a[0],d=a[1]||b;a[1]||(b="#"+b.replace(/^(.)(.)(.)$/,"$1$1$2$2$3$3"));a=c.lang.colorbutton.colors[d]|| d;h.push('')}(c.plugins.colordialog&&void 0===i.colorButton_enableMore||i.colorButton_enableMore)&&h.push('");h.push("
',f.more,"
");return h.join("")}function n(c){return"false"==c.getAttribute("contentEditable")||c.getAttribute("data-nostyle")}var i=c.config,f=c.lang.colorbutton;CKEDITOR.env.hc||(m("TextColor","fore",f.textColorTitle,10),m("BGColor","back",f.bgColorTitle,20))}});CKEDITOR.config.colorButton_colors="000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF"; -CKEDITOR.config.colorButton_foreStyle={element:"span",styles:{color:"#(color)"},overrides:[{element:"font",attributes:{color:null}}]};CKEDITOR.config.colorButton_backStyle={element:"span",styles:{"background-color":"#(color)"}};CKEDITOR.plugins.colordialog={requires:"dialog",init:function(b){b.addCommand("colordialog",new CKEDITOR.dialogCommand("colordialog"));CKEDITOR.dialog.add("colordialog",this.path+"dialogs/colordialog.js");b.getColorFromDialog=function(e,f){var c=function(a){this.removeListener("ok",c);this.removeListener("cancel",c);a="ok"==a.name?this.getValueOf("picker","selectedColor"):null;e.call(f,a)},d=function(a){a.on("ok",c);a.on("cancel",c)};b.execCommand("colordialog");if(b._.storedDialogs&&b._.storedDialogs.colordialog)d(b._.storedDialogs.colordialog); -else CKEDITOR.on("dialogDefinition",function(a){if("colordialog"==a.data.name){var b=a.data.definition;a.removeListener();b.onLoad=CKEDITOR.tools.override(b.onLoad,function(a){return function(){d(this);b.onLoad=a;"function"==typeof a&&a.call(this)}})}})}}};CKEDITOR.plugins.add("colordialog",CKEDITOR.plugins.colordialog);(function(){CKEDITOR.plugins.add("templates",{requires:"dialog",init:function(a){CKEDITOR.dialog.add("templates",CKEDITOR.getUrl(this.path+"dialogs/templates.js"));a.addCommand("templates",new CKEDITOR.dialogCommand("templates"));a.ui.addButton&&a.ui.addButton("Templates",{label:a.lang.templates.button,command:"templates",toolbar:"doctools,10"})}});var c={},f={};CKEDITOR.addTemplates=function(a,d){c[a]=d};CKEDITOR.getTemplates=function(a){return c[a]};CKEDITOR.loadTemplates=function(a,d){for(var e= +CKEDITOR.config.colorButton_foreStyle={element:"span",styles:{color:"#(color)"},overrides:[{element:"font",attributes:{color:null}}]};CKEDITOR.config.colorButton_backStyle={element:"span",styles:{"background-color":"#(color)"}};CKEDITOR.plugins.colordialog={requires:"dialog",init:function(b){var c=new CKEDITOR.dialogCommand("colordialog");c.editorFocus=!1;b.addCommand("colordialog",c);CKEDITOR.dialog.add("colordialog",this.path+"dialogs/colordialog.js");b.getColorFromDialog=function(c,f){var d=function(a){this.removeListener("ok",d);this.removeListener("cancel",d);a="ok"==a.name?this.getValueOf("picker","selectedColor"):null;c.call(f,a)},e=function(a){a.on("ok",d);a.on("cancel",d)};b.execCommand("colordialog");if(b._.storedDialogs&& +b._.storedDialogs.colordialog)e(b._.storedDialogs.colordialog);else CKEDITOR.on("dialogDefinition",function(a){if("colordialog"==a.data.name){var b=a.data.definition;a.removeListener();b.onLoad=CKEDITOR.tools.override(b.onLoad,function(a){return function(){e(this);b.onLoad=a;"function"==typeof a&&a.call(this)}})}})}}};CKEDITOR.plugins.add("colordialog",CKEDITOR.plugins.colordialog);(function(){CKEDITOR.plugins.add("templates",{requires:"dialog",init:function(a){CKEDITOR.dialog.add("templates",CKEDITOR.getUrl(this.path+"dialogs/templates.js"));a.addCommand("templates",new CKEDITOR.dialogCommand("templates"));a.ui.addButton&&a.ui.addButton("Templates",{label:a.lang.templates.button,command:"templates",toolbar:"doctools,10"})}});var c={},f={};CKEDITOR.addTemplates=function(a,d){c[a]=d};CKEDITOR.getTemplates=function(a){return c[a]};CKEDITOR.loadTemplates=function(a,d){for(var e= [],b=0,c=a.length;bc.group?1:a.orderc.order?1:0})}var g=''),m=CKEDITOR.addTemplate("menuItem",g+'{label}{arrowHtml}'), @@ -677,28 +678,28 @@ init:function(a){var b="object[classid,codebase,height,hspace,vspace,width];para {label:a.lang.common.flash,command:"flash",toolbar:"insert,20"});CKEDITOR.dialog.add("flash",this.path+"dialogs/flash.js");a.addMenuItems&&a.addMenuItems({flash:{label:a.lang.flash.properties,command:"flash",group:"flash"}});a.on("doubleclick",function(a){var b=a.data.element;b.is("img")&&"flash"==b.data("cke-real-element-type")&&(a.data.dialog="flash")});a.contextMenu&&a.contextMenu.addListener(function(a){if(a&&a.is("img")&&!a.isReadOnly()&&"flash"==a.data("cke-real-element-type"))return{flash:CKEDITOR.TRISTATE_OFF}})}, afterInit:function(a){var b=a.dataProcessor;(b=b&&b.dataFilter)&&b.addRules({elements:{"cke:object":function(b){var c=b.attributes;if((!c.classid||!(""+c.classid).toLowerCase())&&!d(b)){for(c=0;ch.height-c.bottom?e("pin"):e("bottom");var d=h.width/2,d=0k.width?"rtl"==a.config.contentsLangDirection?"right":"left":d-c.left>c.right-d?"left":"right",f;k.width>h.width? -(d="left",f=0):(f="left"==d?0h.width&&(d="left"==d?"right":"left",f=0));b.setStyle(d,t(("pin"==j?p:l)+f+("pin"==j?0:"left"==d?s:-s)))}else j="pin",e("pin"),o(d)}}();if(l){var b=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(u.output({content:l,id:a.id,langDir:a.lang.dir,langCode:a.langCode,name:a.name,style:"display:none;z-index:"+(i.baseFloatZIndex-1),topId:a.ui.spaceId("top")}))),p=CKEDITOR.tools.eventsBuffer(500, -o),e=CKEDITOR.tools.eventsBuffer(100,o);b.unselectable();b.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});a.on("focus",function(b){o(b);a.on("change",p.input);g.on("scroll",e.input);g.on("resize",e.input)});a.on("blur",function(){b.hide();a.removeListener("change",p.input);g.removeListener("scroll",e.input);g.removeListener("resize",e.input)});a.on("destroy",function(){g.removeListener("scroll",e.input);g.removeListener("resize",e.input);b.clearCustomData(); -b.remove()});a.focusManager.hasFocus&&b.show();a.focusManager.add(b,1)}}var u=CKEDITOR.addTemplate("floatcontainer",'
'),g=CKEDITOR.document.getWindow(),t=CKEDITOR.tools.cssLength; -CKEDITOR.plugins.add("floatingspace",{init:function(a){a.on("loaded",function(){q(this)},null,null,20)}})})();CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var e=CKEDITOR.addTemplate("panel-list",''),f=CKEDITOR.addTemplate("panel-list-item",''),g=CKEDITOR.addTemplate("panel-list-group", +(d="left",f=0):(f="left"==d?0h.width&&(d="left"==d?"right":"left",f=0));b.setStyle(d,t(("pin"==j?p:l)+f+("pin"==j?0:"left"==d?s:-s)))}else j="pin",e("pin"),o(d)}}();if(l){var b=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(u.output({content:l,id:a.id,langDir:a.lang.dir,langCode:a.langCode,name:a.name,style:"display:none;z-index:"+(i.baseFloatZIndex-1),topId:a.ui.spaceId("top"),voiceLabel:a.lang.editorPanel+", "+ +a.name}))),p=CKEDITOR.tools.eventsBuffer(500,o),e=CKEDITOR.tools.eventsBuffer(100,o);b.unselectable();b.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});a.on("focus",function(b){o(b);a.on("change",p.input);g.on("scroll",e.input);g.on("resize",e.input)});a.on("blur",function(){b.hide();a.removeListener("change",p.input);g.removeListener("scroll",e.input);g.removeListener("resize",e.input)});a.on("destroy",function(){g.removeListener("scroll",e.input);g.removeListener("resize", +e.input);b.clearCustomData();b.remove()});a.focusManager.hasFocus&&b.show();a.focusManager.add(b,1)}}var u=CKEDITOR.addTemplate("floatcontainer",'
{voiceLabel}
'), +g=CKEDITOR.document.getWindow(),t=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(a){a.on("loaded",function(){q(this)},null,null,20)}})})();CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var e=CKEDITOR.addTemplate("panel-list",''),f=CKEDITOR.addTemplate("panel-list-item",''),g=CKEDITOR.addTemplate("panel-list-group", '

{label}

');CKEDITOR.ui.panel.prototype.addListBlock=function(a,b){return this.addBlock(a,new CKEDITOR.ui.listBlock(this.getHolderElement(),b))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(a,b){var b=b||{},c=b.attributes||(b.attributes={});(this.multiSelect=!!b.multiSelect)&&(c["aria-multiselectable"]=!0);!c.role&&(c.role="listbox");this.base.apply(this,arguments);this.element.setAttribute("role", c.role);c=this.keys;c[40]="next";c[9]="next";c[38]="prev";c[CKEDITOR.SHIFT+9]="prev";c[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(c[13]="mouseup");this._.pendingHtml=[];this._.pendingList=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var a=e.output({items:this._.pendingList.join("")});this._.pendingList=[];this._.pendingHtml.push(a);delete this._.started}},getClick:function(){this._.click||(this._.click=CKEDITOR.tools.addFunction(function(a){var b=this.toggle(a); if(this.onClick)this.onClick(a,b)},this));return this._.click}},proto:{add:function(a,b,c){var d=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[a]=d;a={id:d,val:a,onclick:CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick",clickFn:this._.getClick(),title:c||a,text:b||a};this._.pendingList.push(f.output(a))},startGroup:function(a){this._.close();var b=CKEDITOR.tools.getNextId();this._.groups[a]=b;this._.pendingHtml.push(g.output({id:b, label:a}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(a){var b=this.isMarked(a);b?this.unmark(a):this.mark(a);return!b},hideGroup:function(a){var b=(a=this.element.getDocument().getById(this._.groups[a]))&&a.getNext();a&&(a.setStyle("display","none"),b&&"ul"==b.getName()&&b.setStyle("display","none"))},hideItem:function(a){this.element.getDocument().getById(this._.items[a]).setStyle("display","none")}, showAll:function(){var a=this._.items,b=this._.groups,c=this.element.getDocument(),d;for(d in a)c.getById(a[d]).setStyle("display","");for(var e in b)a=c.getById(b[e]),d=a.getNext(),a.setStyle("display",""),d&&"ul"==d.getName()&&d.setStyle("display","")},mark:function(a){this.multiSelect||this.unmarkAll();var a=this._.items[a],b=this.element.getDocument().getById(a);b.addClass("cke_selected");this.element.getDocument().getById(a+"_option").setAttribute("aria-selected",!0);this.onMark&&this.onMark(b)}, unmark:function(a){var b=this.element.getDocument(),a=this._.items[a],c=b.getById(a);c.removeClass("cke_selected");b.getById(a+"_option").removeAttribute("aria-selected");this.onUnmark&&this.onUnmark(c)},unmarkAll:function(){var a=this._.items,b=this.element.getDocument(),c;for(c in a){var d=a[c];b.getById(d).removeClass("cke_selected");b.getById(d+"_option").removeAttribute("aria-selected")}this.onUnmark&&this.onUnmark()},isMarked:function(a){return this.element.getDocument().getById(this._.items[a]).hasClass("cke_selected")}, -focus:function(a){this._.focusIndex=-1;var b=this.element.getElementsByTag("a"),c,d=-1;if(a)for(c=this.element.getDocument().getById(this._.items[a]).getFirst();a=b.getItem(++d);){if(a.equals(c)){this._.focusIndex=d;break}}else b=CKEDITOR.document.getWindow().getScrollPosition().y,this.element.focus(),CKEDITOR.env.webkit&&(CKEDITOR.document[CKEDITOR.env.webkit?"getBody":"getDocumentElement"]().$.scrollTop=b);c&&setTimeout(function(){c.focus()},0)}}})}});CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(c){c.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}}); +focus:function(a){this._.focusIndex=-1;var b=this.element.getElementsByTag("a"),c,d=-1;if(a)for(c=this.element.getDocument().getById(this._.items[a]).getFirst();a=b.getItem(++d);){if(a.equals(c)){this._.focusIndex=d;break}}else this.element.focus();c&&setTimeout(function(){c.focus()},0)}}})}});CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(c){c.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}}); (function(){var c='{label}{label}'+ (CKEDITOR.env.hc?"▼":CKEDITOR.env.air?" ":"")+""),h=CKEDITOR.addTemplate("combo",c);CKEDITOR.UI_RICHCOMBO="richcombo";CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(a){CKEDITOR.tools.extend(this,a,{canGroup:!1,title:a.label,modes:{wysiwyg:1},editorFocus:1});a=this.panel||{};delete this.panel;this.id=CKEDITOR.tools.getNextNumber();this.document=a.parent&&a.parent.getDocument()||CKEDITOR.document;a.className="cke_combopanel";a.block={multiSelect:a.multiSelect, attributes:a.attributes};a.toolbarRelated=!0;this._={panelDefinition:a,items:{}}},proto:{renderHtml:function(a){var b=[];this.render(a,b);return b.join("")},render:function(a,b){function j(){var d=this.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;this.setState(a.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:d);this.setValue("")}var c=CKEDITOR.env,g="cke_"+this.id,e=CKEDITOR.tools.addFunction(function(b){i&&(a.unlockSelection(1),i=0);d.execute(b)},this),f=this,d={id:g,combo:this, focus:function(){CKEDITOR.document.getById(g).getChild(1).focus()},execute:function(d){var b=f._;if(b.state!=CKEDITOR.TRISTATE_DISABLED)if(f.createPanel(a),b.on)b.panel.hide();else{f.commit();var c=f.getValue();c?b.list.mark(c):b.list.unmarkAll();b.panel.showBlock(f.id,new CKEDITOR.dom.element(d),4)}},clickFn:e};a.on("mode",j,this);!this.readOnly&&a.on("readOnly",j,this);var k=CKEDITOR.tools.addFunction(function(a,b){var a=new CKEDITOR.dom.event(a),c=a.getKeystroke();switch(c){case 13:case 32:case 40:CKEDITOR.tools.callFunction(e, b);break;default:d.onkey(d,c)}a.preventDefault()}),l=CKEDITOR.tools.addFunction(function(){d.onfocus&&d.onfocus()}),i=0,m=CKEDITOR.tools.addFunction(function(){if(CKEDITOR.env.opera){var b=a.editable();b.isInline()&&b.hasFocus&&(a.lockSelection(),i=1)}});d.keyDownFn=k;c={id:g,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:c.gecko&&10900<=c.version&&!c.hc?"":(this.title||"").replace("'",""),keydownFn:k,mousedownFn:m,focusFn:l,clickFn:e};h.output(c,b); -if(this.onRender)this.onRender();return d},createPanel:function(a){if(!this._.panel){var b=this._.panelDefinition,c=this._.panelDefinition.block,h=b.parent||CKEDITOR.document.getBody(),g="cke_combopanel__"+this.name,e=new CKEDITOR.ui.floatPanel(a,h,b),f=e.addListBlock(this.id,c),d=this;e.onShow=function(){this.element.addClass(g);d.setState(CKEDITOR.TRISTATE_ON);d._.on=1;d.editorFocus&&a.focus();if(d.onOpen)d.onOpen();f.focus(!f.multiSelect&&d.getValue())};e.onHide=function(b){this.element.removeClass(g); -d.setState(d.modes&&d.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);d._.on=0;if(!b&&d.onClose)d.onClose()};e.onEscape=function(){e.hide(1)};f.onClick=function(a,b){d.onClick&&d.onClick.call(d,a,b);e.hide()};this._.panel=e;this._.list=f;e.getBlock(this.id).onHide=function(){d._.on=0;d.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(a,b){this._.value=a;var c=this.document.getById("cke_"+this.id+"_text");c&&(!a&&!b?(b=this.label,c.addClass("cke_combo_inlinelabel")): -c.removeClass("cke_combo_inlinelabel"),c.setText("undefined"!=typeof b?b:a))},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(a){this._.list.mark(a)},hideItem:function(a){this._.list.hideItem(a)},hideGroup:function(a){this._.list.hideGroup(a)},showAll:function(){this._.list.showAll()},add:function(a,b,c){this._.items[a]=c||a;this._.list.add(a,b,c)},startGroup:function(a){this._.list.startGroup(a)},commit:function(){this._.committed||(this._.list.commit(), -this._.committed=1,CKEDITOR.ui.fire("ready",this));this._.committed=1},setState:function(a){if(this._.state!=a){var b=this.document.getById("cke_"+this.id);b.setState(a,"cke_combo");a==CKEDITOR.TRISTATE_DISABLED?b.setAttribute("aria-disabled",!0):b.removeAttribute("aria-disabled");this._.state=a}},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!=CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))}}, -statics:{handler:{create:function(a){return new CKEDITOR.ui.richCombo(a)}}}});CKEDITOR.ui.prototype.addRichCombo=function(a,b){this.add(a,CKEDITOR.UI_RICHCOMBO,b)}})();(function(){function g(a,b,g,h,j,n,k,o){for(var p=a.config,l=new CKEDITOR.style(k),c=j.split(";"),j=[],f={},d=0;d")},lineBreak:function(){!this._.inPre&&0CKEDITOR.env.version&&(c.innerHTML=c.innerHTML.replace(/^.*<\!-- cke-content-start --\>/,""),setTimeout(function(){var a=new CKEDITOR.dom.range(new CKEDITOR.dom.document(b));a.setStart(new CKEDITOR.dom.node(c),0);d.getSelection().selectRanges([a])},0)));c.contentEditable= -!0;CKEDITOR.env.ie&&(c.hideFocus=!0,c.disabled=!0,c.removeAttribute("disabled"));delete this._.isLoadingData;this.$=c;b=new CKEDITOR.dom.document(b);this.setup();CKEDITOR.env.ie&&(b.getDocumentElement().addClass(b.$.compatMode),d.config.enterMode!=CKEDITOR.ENTER_P&&b.on("selectionchange",function(){var a=b.getBody(),c=d.getSelection(),e=c&&c.getRanges()[0];e&&(a.getHtml().match(/^

 <\/p>$/i)&&e.startContainer.equals(a))&&setTimeout(function(){e=d.getSelection().getRanges()[0];if(!e.startContainer.equals("body")){a.getFirst().remove(1); -e.moveToElementEditEnd(a);e.select()}},0)}));try{d.document.$.execCommand("2D-position",!1,!0)}catch(e){}try{d.document.$.execCommand("enableInlineTableEditing",!1,!d.config.disableNativeTableHandles)}catch(g){}if(d.config.disableObjectResizing)try{this.getDocument().$.execCommand("enableObjectResizing",!1,!1)}catch(f){this.attachListener(this,CKEDITOR.env.ie?"resizestart":"resize",function(a){a.data.preventDefault()})}(CKEDITOR.env.gecko||CKEDITOR.env.ie&&"CSS1Compat"==d.document.$.compatMode)&& -this.attachListener(this,"keydown",function(a){var b=a.data.getKeystroke();if(b==33||b==34)if(CKEDITOR.env.ie)setTimeout(function(){d.getSelection().scrollIntoView()},0);else if(d.window.$.innerHeight>this.$.offsetHeight){var c=d.createRange();c[b==33?"moveToElementEditStart":"moveToElementEditEnd"](this);c.select();a.data.preventDefault()}});CKEDITOR.env.ie&&this.attachListener(b,"blur",function(){try{b.$.selection.empty()}catch(a){}});d.document.getElementsByTag("title").getItem(0).data("cke-title", -d.document.$.title);CKEDITOR.env.ie&&(d.document.$.title=this._.docTitle);CKEDITOR.tools.setTimeout(function(){d.fire("contentDom");if(this._.isPendingFocus){d.focus();this._.isPendingFocus=false}setTimeout(function(){d.fire("dataReady")},0);CKEDITOR.env.ie&&setTimeout(function(){if(d.document){var a=d.document.$.body;a.runtimeStyle.marginBottom="0px";a.runtimeStyle.marginBottom=""}},1E3)},0,this)}function l(){var a=[];if(8<=CKEDITOR.document.$.documentMode){a.push("html.CSS1Compat [contenteditable=false]{min-height:0 !important}"); -var d=[],b;for(b in CKEDITOR.dtd.$removeEmpty)d.push("html.CSS1Compat "+b+"[contenteditable=false]");a.push(d.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&&(a.push("html{height:100% !important}"),a.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"));a.push("html{cursor:text;*cursor:auto}");a.push("img,input,textarea{cursor:default}");return a.join("\n")}CKEDITOR.plugins.add("wysiwygarea",{init:function(a){a.config.fullPage&&a.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]", -requiredContent:"body"});a.addMode("wysiwyg",function(d){function b(b){b&&b.removeListener();a.editable(new j(a,e.$.contentWindow.document.body));a.setData(a.getData(1),d)}var c="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",c=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent(c)+"}())":"",e=CKEDITOR.dom.element.createFromHtml('');e.setStyles({width:"100%", -height:"100%"});e.addClass("cke_wysiwyg_frame cke_reset");var g=a.ui.space("contents");g.append(e);if(c=CKEDITOR.env.ie||CKEDITOR.env.gecko)e.on("load",b);var f=a.title,h=a.lang.common.editorHelp;f&&(CKEDITOR.env.ie&&(f+=", "+h),e.setAttribute("title",f));var f=CKEDITOR.tools.getNextId(),i=CKEDITOR.dom.element.createFromHtml(''+h+"");g.append(i,1);a.on("beforeModeUnload",function(a){a.removeListener();i.remove()});e.setAttributes({"aria-describedby":f, -tabIndex:a.tabIndex,allowTransparency:"true"});!c&&b();CKEDITOR.env.webkit&&(c=function(){g.setStyle("width","100%");e.hide();e.setSize("width",g.getSize("width"));g.removeStyle("width");e.show()},e.setCustomData("onResize",c),CKEDITOR.document.getWindow().on("resize",c));a.fire("ariaWidget",e)})}});var j=CKEDITOR.tools.createClass({$:function(a){this.base.apply(this,arguments);this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(a){CKEDITOR.tools.setTimeout(k,0,this,a)},this);this._.docTitle= -this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(a,d){var b=this.editor;if(d)this.setHtml(a),b.fire("dataReady");else{this._.isLoadingData=!0;b._.dataStore={id:1};var c=b.config,e=c.fullPage,g=c.docType,f=CKEDITOR.tools.buildStyleHtml(l()).replace(/