Lines Matching defs:k

11 b,!0)},on:function(c,b,f,k,d){function h(a,g,d,h){a={name:c,sender:this,editor:a,data:g,listenerData:k,stop:d,cancel:h,removeListener:m};return!1===b.call(f,a)?!1:a.data}function m(){n.removeListener(c,b)}var g=a.call(this,c);if(0>g.getListenerIndex(b)){g=g.listeners;f||(f=this);isNaN(d)&&(d=10);var n=this;h.fn=b;h.priority=d;for(var p=g.length-1;0<=p;p--)if(g[p].priority<=d)return g.splice(p+1,0,h),{removeListener:m};g.unshift(h)}return{removeListener:m}},once:function(){var a=Array.prototype.slice.call(arguments),
12 b=a[1];a[1]=function(a){a.removeListener();return b.apply(this,arguments)};return this.on.apply(this,a)},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},l=0,k=function(){l=1};return function(d,h,m){var g=f(this)[d];d=a;var n=l;a=l=0;if(g){var p=g.listeners;if(p.length)for(var p=p.slice(0),t,w=0;w<p.length;w++){if(g.errorProof)try{t=p[w].call(this,m,h,b,k)}catch(q){}else t=p[w].call(this,
13 m,h,b,k);!1===t?l=1:"undefined"!=typeof t&&(h=t);if(a||l)break}}h=l?!1:"undefined"==typeof h?!0:h;a=d;l=n;return h}}(),fireOnce:function(a,b,l){b=this.fire(a,b,l);delete f(this)[a];return b},removeListener:function(a,b){var l=f(this)[a];if(l){var k=l.getListenerIndex(b);0<=k&&l.listeners.splice(k,1)}},removeAllListeners:function(){var a=f(this),b;for(b in a)delete a[b]},hasListeners:function(a){return(a=f(this)[a])&&0<a.listeners.length}}}()),CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,
21 b)}},null,null,999),CKEDITOR.dom={},function(){var a=[],f=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",b=/&/g,c=/>/g,e=/</g,l=/"/g,k=/&(lt|gt|amp|quot|nbsp|shy|#\d{1,5});/g,d={lt:"\x3c",gt:"\x3e",amp:"\x26",quot:'"',nbsp:" ",shy:"­"},h=function(a,g){return"#"==g[0]?String.fromCharCode(parseInt(g.slice(1),10)):d[g]};CKEDITOR.on("reset",function(){a=[]});CKEDITOR.tools={arrayCompare:function(a,g){if(!a&&!g)return!0;if(!a||!g||a.length!=g.length)return!1;for(var d=
25 [].concat(a);for(var g,d=[],b=0;b<a.length;b++)if(g=a[b])/@import|[{}]/.test(g)?d.push("\x3cstyle\x3e"+g+"\x3c/style\x3e"):d.push('\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+g+'"\x3e');return d.join("")},htmlEncode:function(a){return void 0===a||null===a?"":String(a).replace(b,"\x26amp;").replace(c,"\x26gt;").replace(e,"\x26lt;")},htmlDecode:function(a){return a.replace(k,h)},htmlEncodeAttr:function(a){return CKEDITOR.tools.htmlEncode(a).replace(l,"\x26quot;")},htmlDecodeAttr:function(a){return CKEDITOR.tools.htmlDecode(a)},
49 form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,main:1,menu:1,nav:1,ol:1,p:1,pre:1,section:1,table:1,ul:1},l={command:1,link:1,meta:1,noscript:1,script:1,style:1},k={},d={"#":1},h={center:1,dir:1,noframes:1};a(b,{a:1,abbr:1,area:1,audio:1,b:1,bdi:1,bdo:1,br:1,button:1,canvas:1,cite:1,code:1,command:1,datalist:1,del:1,dfn:1,em:1,embed:1,i:1,iframe:1,img:1,input:1,ins:1,kbd:1,keygen:1,label:1,map:1,mark:1,meter:1,noscript:1,object:1,output:1,progress:1,q:1,ruby:1,s:1,samp:1,script:1,select:1,
50 small:1,span:1,strong:1,sub:1,sup:1,textarea:1,time:1,u:1,"var":1,video:1,wbr:1},d,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});a(c,e,b,h);f={a:f(b,{a:1,button:1}),abbr:b,address:c,area:k,article:c,aside:c,audio:a({source:1,track:1},c),b:b,base:k,bdi:b,bdo:b,blockquote:c,body:c,br:k,button:f(b,{a:1,button:1}),canvas:b,caption:c,cite:b,code:b,col:k,colgroup:{col:1},command:k,datalist:a({option:1},b),dd:c,del:b,details:a({summary:1},c),dfn:b,div:c,dl:{dt:1,dd:1},dt:c,
51 em:b,embed:k,fieldset:a({legend:1},c),figcaption:c,figure:a({figcaption:1},c),footer:c,form:c,h1:b,h2:b,h3:b,h4:b,h5:b,h6:b,head:a({title:1,base:1},l),header:c,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:k,html:a({head:1,body:1},c,l),i:b,iframe:d,img:k,input:k,ins:b,kbd:b,keygen:k,label:b,legend:b,li:c,link:k,main:c,map:c,mark:b,menu:a({li:1},c),meta:k,meter:f(b,{meter:1}),nav:c,noscript:a({link:1,meta:1,style:1},b),object:a({param:1},b),ol:{li:1},optgroup:{option:1},option:d,output:b,p:b,param:k,pre:b,
52 progress:f(b,{progress:1}),q:b,rp:b,rt:b,ruby:a({rp:1,rt:1},b),s:b,samp:b,script:d,section:c,select:{optgroup:1,option:1},small:b,source:k,span:b,strong:b,style:d,sub:b,summary:a({h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},b),sup:b,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:c,textarea:d,tfoot:{tr:1},th:c,thead:{tr:1},time:f(b,{time:1}),title:d,tr:{th:1,td:1},track:k,u:b,ul:{li:1},"var":b,video:a({source:1,track:1},c),wbr:k,acronym:b,applet:a({param:1},c),basefont:k,big:b,center:c,
53 dialog:k,dir:{li:1},font:b,isindex:k,noframes:c,strike:b,tt:b};a(f,{$block:a({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},e,h),$blockLimit:{article:1,aside:1,audio:1,body:1,caption:1,details:1,dir:1,div:1,dl:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,header:1,hgroup:1,main:1,menu:1,nav:1,ol:1,section:1,table:1,td:1,th:1,tr:1,ul:1,video:1},$cdata:{script:1,style:1},$editable:{address:1,article:1,aside:1,blockquote:1,body:1,details:1,div:1,fieldset:1,figcaption:1,footer:1,form:1,h1:1,h2:1,
79 getById:function(a){return(a=this.$.getElementById(a))?new CKEDITOR.dom.element(a):null},getByAddress:function(a,f){for(var b=this.$.documentElement,c=0;b&&c<a.length;c++){var e=a[c];if(f)for(var l=-1,k=0;k<b.childNodes.length;k++){var d=b.childNodes[k];if(!0!==f||3!=d.nodeType||!d.previousSibling||3!=d.previousSibling.nodeType)if(l++,l==e){b=d;break}}else b=b.childNodes[e]}return b?new CKEDITOR.dom.node(b):null},getElementsByTag:function(a,f){CKEDITOR.env.ie&&8>=document.documentMode||!f||(a=f+":"+
85 !0;a.$.id||(a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),b=!1);return function(){b||a.removeAttribute("id")}}function b(a,b){var c=CKEDITOR.tools.escapeCss(a.$.id);return"#"+c+" "+b.split(/,\s*/).join(", #"+c+" ")}function c(a){for(var b=0,c=0,g=k[a].length;c<g;c++)b+=parseFloat(this.getComputedStyle(k[a][c])||0,10)||0;return b}var e=document.createElement("_").classList,e="undefined"!==typeof e&&null!==String(e.add).match(/\[Native code\]/gi),l=/[\n\t\r]/g;CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,
109 8!==CKEDITOR.env.version:1)){var k=this.$.getBoundingClientRect(),l=g.$.documentElement,q=l.clientTop||e.$.clientTop||0,v=l.clientLeft||e.$.clientLeft||0,u=!0;CKEDITOR.env.ie&&(u=g.getDocumentElement().contains(this),g=g.getBody().contains(this),u=f&&g||!f&&u);u&&(CKEDITOR.env.webkit||CKEDITOR.env.ie&&12<=CKEDITOR.env.version?(b=e.$.scrollLeft||l.scrollLeft,c=e.$.scrollTop||l.scrollTop):(c=f?e.$:l,b=c.scrollLeft,c=c.scrollTop),b=k.left+b-v,c=k.top+c-q)}else for(q=this,v=null;q&&"body"!=q.getName()&&
110 "html"!=q.getName();){b+=q.$.offsetLeft-q.$.scrollLeft;c+=q.$.offsetTop-q.$.scrollTop;q.equals(this)||(b+=q.$.clientLeft||0,c+=q.$.clientTop||0);for(;v&&!v.equals(q);)b-=v.$.scrollLeft,c-=v.$.scrollTop,v=v.getParent();v=q;q=(k=q.$.offsetParent)?new CKEDITOR.dom.element(k):null}a&&(k=this.getWindow(),q=a.getWindow(),!k.equals(q)&&k.$.frameElement&&(a=(new CKEDITOR.dom.element(k.$.frameElement)).getDocumentPosition(a),b+=a.x,c+=a.y));document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||
111 f||(b+=this.$.clientLeft?1:0,c+=this.$.clientTop?1:0);return{x:b,y:c}},scrollIntoView:function(a){var b=this.getParent();if(b){do if((b.$.clientWidth&&b.$.clientWidth<b.$.scrollWidth||b.$.clientHeight&&b.$.clientHeight<b.$.scrollHeight)&&!b.is("body")&&this.scrollIntoParent(b,a,1),b.is("html")){var c=b.getWindow();try{var g=c.$.frameElement;g&&(b=new CKEDITOR.dom.element(g))}catch(e){}}while(b=b.getParent())}},scrollIntoParent:function(a,b,c){var g,e,f,k;function l(b,g){/body|html/.test(a.getName())?
113 CKEDITOR.env.webkit&&(f=this.getEditor(!1))&&(f._.previousScrollTop=null);f=a.getWindow();e=q(this,f);var x=q(a,f),B=this.$.offsetHeight;g=this.$.offsetWidth;var r=a.$.clientHeight,z=a.$.clientWidth;f=e.x-v(this,"left")-x.x||0;k=e.y-v(this,"top")-x.y||0;g=e.x+g+v(this,"right")-(x.x+z)||0;e=e.y+B+v(this,"bottom")-(x.y+r)||0;(0>k||0<e)&&l(0,!0===b?k:!1===b?e:0>k?k:e);c&&(0>f||0<g)&&l(0>f?f:g,0)},setState:function(a,b,c){b=b||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(b+"_on");this.removeClass(b+
115 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){var c=this.$.attributes;b=b||{};for(var g=0;g<c.length;g++){var e=c[g],f=e.nodeName.toLowerCase(),k;if(!(f in b))if("checked"==f&&(k=this.getAttribute(f)))a.setAttribute(f,k);else if(!CKEDITOR.env.ie||this.hasAttribute(f))k=this.getAttribute(f),null===k&&(k=e.nodeValue),a.setAttribute(f,k)}""!==this.$.style.cssText&&
119 a)));c();return a},findOne:function(a){var c=f(this);a=this.$.querySelector(b(this,a));c();return a?new CKEDITOR.dom.element(a):null},forEach:function(a,b,c){if(!(c||b&&this.type!=b))var g=a(this);if(!1!==g){c=this.getChildren();for(var e=0;e<c.count();e++)g=c.getItem(e),g.type==CKEDITOR.NODE_ELEMENT?g.forEach(a,b):b&&g.type!=b||a(g)}}});var k={width:["border-left-width","border-right-width","padding-left","padding-right"],height:["border-top-width","border-bottom-width","padding-top","padding-bottom"]};
122 getChildCount:1,getChild:1,getChildren:1}),function(){function a(a,b){var g=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(g.collapsed)return this.end(),null;g.optimize()}var c,d=g.startContainer;c=g.endContainer;var e=g.startOffset,f=g.endOffset,m,h=this.guard,k=this.type,n=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var l=c.type==CKEDITOR.NODE_ELEMENT?c:c.getParent(),D=c.type==CKEDITOR.NODE_ELEMENT?c.getChild(f):c.getNext();this._.guardLTR=function(a,
124 k,m):(a?c.type==CKEDITOR.NODE_ELEMENT&&(c=0<f?c.getChild(f-1):!1===m(c,!0)?null:c.getPreviousSourceNode(!0,k,m)):(c=d,c.type==CKEDITOR.NODE_ELEMENT&&((c=c.getChild(e))||(c=!1===m(d,!0)?null:d.getNextSourceNode(!0,k,m)))),c&&!1===m(c)&&(c=null));for(;c&&!this._.end;){this.current=c;if(!this.evaluator||!1!==this.evaluator(c)){if(!b)return c}else if(b&&this.evaluator)return!1;c=c[n](!1,k,m)}this.end();return this.current=null}function f(b){for(var g,c=null;g=a.call(this,b);)c=g;return c}CKEDITOR.dom.walker=
128 return!!(a^g)}};CKEDITOR.dom.walker.invisible=function(a){var b=CKEDITOR.dom.walker.whitespaces(),g=CKEDITOR.env.webkit?1:0;return function(c){b(c)?c=1:(c.type==CKEDITOR.NODE_TEXT&&(c=c.getParent()),c=c.$.offsetWidth<=g);return!!(a^c)}};CKEDITOR.dom.walker.nodeType=function(a,b){return function(g){return!!(b^g.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function b(a){return!l(a)&&!k(a)}return function(g){var c=CKEDITOR.env.needsBrFiller?g.is&&g.is("br"):g.getText&&e.test(g.getText());c&&(c=g.getParent(),
129 g=g.getNext(b),c=c.isBlockBoundary()&&(!g||g.type==CKEDITOR.NODE_ELEMENT&&g.isBlockBoundary()));return!!(a^c)}};CKEDITOR.dom.walker.temp=function(a){return function(b){b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent());b=b&&b.hasAttribute("data-cke-temp");return!!(a^b)}};var e=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,l=CKEDITOR.dom.walker.whitespaces(),k=CKEDITOR.dom.walker.bookmark(),d=CKEDITOR.dom.walker.temp(),h=function(a){return k(a)||l(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$inline)&&!a.is(CKEDITOR.dtd.$empty)};
130 CKEDITOR.dom.walker.ignored=function(a){return function(b){b=l(b)||k(b)||d(b);return!!(a^b)}};var m=CKEDITOR.dom.walker.ignored();CKEDITOR.dom.walker.empty=function(a){return function(b){for(var g=0,c=b.getChildCount();g<c;++g)if(!m(b.getChild(g)))return!!a;return!a}};var g=CKEDITOR.dom.walker.empty(),n=CKEDITOR.dom.walker.validEmptyBlockContainers=CKEDITOR.tools.extend(function(a){var b={},g;for(g in a)CKEDITOR.dtd[g]["#"]&&(b[g]=1);return b}(CKEDITOR.dtd.$block),{caption:1,td:1,th:1});CKEDITOR.dom.walker.editable=
132 this.startOffset=this.startContainer=null;this.collapsed=!0;var f=a instanceof CKEDITOR.dom.document;this.document=f?a:a.getDocument();this.root=f?a.getBody():a},function(){function a(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset}function f(a,b,c,d,e){function f(a,b,g,c){var d=g?a.getPrevious():a.getNext();if(c&&k)return d;r||c?b.append(a.clone(!0,e),g):(a.remove(),l&&b.append(a));return d}function m(){var a,b,g,c=Math.min(N.length,
134 b.mergeSiblings(!1),a.moveToBookmark({startNode:c}))):a.collapse(!0)}a.optimizeBookmark();var k=0===b,l=1==b,r=2==b;b=r||l;var z=a.startContainer,A=a.endContainer,y=a.startOffset,D=a.endOffset,C,F,E,I,H,L;if(r&&A.type==CKEDITOR.NODE_TEXT&&z.equals(A))z=a.document.createText(z.substring(y,D)),c.append(z);else{A.type==CKEDITOR.NODE_TEXT?r?L=!0:A=A.split(D):0<A.getChildCount()?D>=A.getChildCount()?(A=A.getChild(D-1),F=!0):A=A.getChild(D):I=F=!0;z.type==CKEDITOR.NODE_TEXT?r?H=!0:z.split(y):0<z.getChildCount()?
137 return function(d){return c(d)||b(d)?!0:!a&&k(d)||d.type==CKEDITOR.NODE_ELEMENT&&d.is(CKEDITOR.dtd.$removeEmpty)}}function e(a){return function(){var b;return this[a?"getPreviousNode":"getNextNode"](function(a){!b&&m(a)&&(b=a);return h(a)&&!(k(a)&&a.equals(b))})}}var l={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},k=CKEDITOR.dom.walker.bogus(),d=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,
149 c.setStart(a,b);c.setEndAt(h,CKEDITOR.POSITION_BEFORE_END);var c=new CKEDITOR.dom.walker(c),g;for(c.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};g=c.next();){if(g.type!=CKEDITOR.NODE_TEXT)return!1;C=g!=a?g.getText():g.substring(b);if(d.test(C))return!1}return!0};if(this.collapsed)break;var m=this.getCommonAncestor(),h=this.root,k,l,r,z,A,y=!1,D,C;D=this.startContainer;var F=this.startOffset;D.type==CKEDITOR.NODE_TEXT?(F&&(D=!CKEDITOR.tools.trim(D.substring(0,F)).length&&
150 D,y=!!D),D&&((z=D.getPrevious())||(r=D.getParent()))):(F&&(z=D.getChild(F-1)||D.getLast()),z||(r=D));for(r=c(r);r||z;){if(r&&!z){!A&&r.equals(m)&&(A=!0);if(e?r.isBlockBoundary():!h.contains(r))break;y&&"inline"==r.getComputedStyle("display")||(y=!1,A?k=r:this.setStartBefore(r));z=r.getPrevious()}for(;z;)if(D=!1,z.type==CKEDITOR.NODE_COMMENT)z=z.getPrevious();else{if(z.type==CKEDITOR.NODE_TEXT)C=z.getText(),d.test(C)&&(z=null),D=/[\s\ufeff]$/.test(C);else if((z.$.offsetWidth>(CKEDITOR.env.webkit?1:
151 0)||b&&z.is("br"))&&!z.data("cke-bookmark"))if(y&&CKEDITOR.dtd.$removeEmpty[z.getName()]){C=z.getText();if(d.test(C))z=null;else for(var F=z.$.getElementsByTagName("*"),E=0,I;I=F[E++];)if(!CKEDITOR.dtd.$removeEmpty[I.nodeName.toLowerCase()]){z=null;break}z&&(D=!!C.length)}else z=null;D&&(y?A?k=r:r&&this.setStartBefore(r):y=!0);if(z){D=z.getPrevious();if(!r&&!D){r=z;z=null;break}z=D}else r=null}r&&(r=c(r.getParent()))}D=this.endContainer;F=this.endOffset;r=z=null;A=y=!1;D.type==CKEDITOR.NODE_TEXT?
153 b&&z.is("br"))&&!z.data("cke-bookmark"))if(y&&CKEDITOR.dtd.$removeEmpty[z.getName()]){C=z.getText();if(d.test(C))z=null;else for(F=z.$.getElementsByTagName("*"),E=0;I=F[E++];)if(!CKEDITOR.dtd.$removeEmpty[I.nodeName.toLowerCase()]){z=null;break}z&&(D=!!C.length)}else z=null}else D=1;D&&y&&(A?l=r:this.setEndAfter(r));if(z){D=z.getNext();if(!r&&!D){r=z;z=null;break}z=D}else r=null}r&&(r=c(r.getParent()))}k&&l&&(m=k.contains(l)?l:k,this.setStartBefore(m),this.setEndAfter(m));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:r=
157 this.startContainer,h=this.endContainer,k=this.startOffset,l=this.endOffset,r=c=1;m&&m.type==CKEDITOR.NODE_TEXT&&(k?k>=m.getLength()?f.setStartAfter(m):(f.setStartBefore(m),c=0):f.setStartBefore(m));h&&h.type==CKEDITOR.NODE_TEXT&&(l?l>=h.getLength()?f.setEndAfter(h):(f.setEndAfter(h),r=0):f.setEndBefore(h));var f=new CKEDITOR.dom.walker(f),z=CKEDITOR.dom.walker.bookmark(),A=CKEDITOR.dom.walker.bogus();f.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};
177 b=e.startContainer.split(e.startOffset),a.insertAfter(e.startContainer)):e.insertNode(a);a.scrollIntoView();d&&(e.startContainer.setText(c),b.remove());a.remove()},_setStartContainer:function(a){this.startContainer=a},_setEndContainer:function(a){this.endContainer=a},_find:function(a,b){var c=this.getCommonAncestor(),d=this.getBoundaryNodes(),e=[],f,m,h,k;if(c&&c.find)for(m=c.find(a),f=0;f<m.count();f++)if(c=m.getItem(f),b||!c.isReadOnly())h=c.getPosition(d.startNode)&CKEDITOR.POSITION_FOLLOWING||
178 d.startNode.equals(c),k=c.getPosition(d.endNode)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IS_CONTAINED||d.endNode.equals(c),h&&k&&e.push(c);return e}};CKEDITOR.dom.range.mergeRanges=function(a){return CKEDITOR.tools.array.reduce(a,function(a,b){var c=a[a.length-1],d=!1;b=b.clone();b.enlarge(CKEDITOR.ENLARGE_ELEMENT);if(c){var g=new CKEDITOR.dom.range(b.root),d=new CKEDITOR.dom.walker(g),e=CKEDITOR.dom.walker.whitespaces();g.setStart(c.endContainer,c.endOffset);g.setEnd(b.startContainer,b.startOffset);
181 c=new CKEDITOR.dom.range(e.element);c.selectNodeContents(e.element);c=c.createIterator();c.enlargeBr=a.enlargeBr;c.enforceRealBlocks=a.enforceRealBlocks;c.activeFilter=c.filter=h;a._.nestedEditable={element:e.element,container:d,remaining:e.remaining,iterator:c};return 1}function c(a,b,c){if(!b)return!1;a=a.clone();a.collapse(!c);return a.checkBoundaryOfElement(b,c?CKEDITOR.START:CKEDITOR.END)}var e=/^[\r\n\t ]+$/,l=CKEDITOR.dom.walker.bookmark(!1,!0),k=CKEDITOR.dom.walker.whitespaces(!0),d=function(a){return l(a)&&
182 k(a)},h={dd:1,dt:1,li:1};a.prototype={getNextParagraph:function(a){var g,f,k,t,w;a=a||"p";if(this._.nestedEditable){if(g=this._.nestedEditable.iterator.getNextParagraph(a))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,g;this.activeFilter=this.filter;if(b(this,a,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(a);this._.nestedEditable=null}if(!this.range.root.getDtd()[a])return null;
186 v;b(this,a,g);break}else if(v.isBlockBoundary(this.forceBrBreak&&!x&&{br:1})){if("br"==z)B=1;else if(!f&&!v.getChildCount()&&"hr"!=z){g=v;k=v.equals(q);break}f&&(f.setEndAt(v,CKEDITOR.POSITION_BEFORE_START),"br"!=z&&(this._.nextNode=v));u=1}else{if(v.getFirst()){f||(f=this.range.clone(),f.setStartAt(v,CKEDITOR.POSITION_BEFORE_START));v=v.getFirst();continue}B=1}}B&&!f&&(f=this.range.clone(),f.setStartAt(v,CKEDITOR.POSITION_BEFORE_START));k=(!u||B)&&v.equals(q);if(f&&!u)for(;!v.getNext(d)&&!k;){z=
187 v.getParent();if(z.isBlockBoundary(this.forceBrBreak&&!x&&{br:1})){u=1;B=0;k||z.equals(q);f.setEndAt(z,CKEDITOR.POSITION_BEFORE_END);break}v=z;B=1;k=v.equals(q);r=1}B&&f.setEndAt(v,CKEDITOR.POSITION_AFTER_END);v=this._getNextSourceNode(v,r,q);if((k=!v)||u&&f)break}if(!g){if(!f)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;g=new CKEDITOR.dom.elementPath(f.startContainer,f.root);v=g.blockLimit;u={div:1,th:1,td:1};g=g.block;!g&&v&&!this.enforceRealBlocks&&u[v.getName()]&&
188 f.checkStartOfBlock()&&f.checkEndOfBlock()&&!v.equals(f.root)?g=v:!g||this.enforceRealBlocks&&g.is(h)?(g=this.range.document.createElement(a),f.extractContents().appendTo(g),g.trim(),f.insertNode(g),t=w=!0):"li"!=g.getName()?f.checkStartOfBlock()&&f.checkEndOfBlock()||(g=g.clone(!1),f.extractContents().appendTo(g),g.trim(),w=f.splitBlock(),t=!w.wasStartOfBlock,w=!w.wasEndOfBlock,f.insertNode(g)):k||(this._.nextNode=g.equals(q)?null:this._getNextSourceNode(f.getBoundaryNodes().endNode,1,q))}t&&(t=
189 g.getPrevious())&&t.type==CKEDITOR.NODE_ELEMENT&&("br"==t.getName()?t.remove():t.getLast()&&"br"==t.getLast().$.nodeName.toLowerCase()&&t.getLast().remove());w&&(t=g.getLast())&&t.type==CKEDITOR.NODE_ELEMENT&&"br"==t.getName()&&(!CKEDITOR.env.needsBrFiller||t.getPrevious(l)||t.getNext(l))&&t.remove();this._.nextNode||(this._.nextNode=k||g.equals(q)||!q?null:this._getNextSourceNode(g,1,q));return g},_getNextSourceNode:function(a,b,c){function d(a){return!(a.equals(c)||a.equals(e))}var e=this.range.root;
194 extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]},function(){function a(a,b,c,d,g){var e,f;a=[];for(e in b){f=b[e];f="boolean"==typeof f?{}:"function"==typeof f?{match:f}:E(f);"$"!=e.charAt(0)&&(f.elements=e);c&&(f.featureName=c.toLowerCase());var h=f;h.elements=k(h.elements,/\s+/)||null;h.propertiesOnly=h.propertiesOnly||!0===h.elements;var m=/\s*,\s*/,l=void 0;for(l in L){h[l]=k(h[l],
195 m)||null;var r=h,v=N[l],n=k(h[N[l]],m),z=h[l],G=[],x=!0,A=void 0;n?x=!1:n={};for(A in z)"!"==A.charAt(0)&&(A=A.slice(1),G.push(A),n[A]=!0,x=!1);for(;A=G.pop();)z[A]=z["!"+A],delete z["!"+A];r[v]=(x?!1:n)||null}h.match=h.match||null;d.push(f);a.push(f)}b=g.elements;g=g.generic;var C;c=0;for(d=a.length;c<d;++c){e=E(a[c]);f=!0===e.classes||!0===e.styles||!0===e.attributes;h=e;l=v=m=void 0;for(m in L)h[m]=u(h[m]);r=!0;for(l in N){m=N[l];v=h[m];n=[];z=void 0;for(z in v)-1<z.indexOf("*")?n.push(new RegExp("^"+
198 b=b.classes;if(a){for(var d=!1,g=!0===a,f=b.length;f--;)if(g||a(b[f]))b.splice(f,1),d=!0;a=d}else a=!1;c.hadInvalidClass=a||c.hadInvalidClass}}function e(a,b){if(!a)return!1;var c=!1,d=!0===a,e;for(e in b)if(d||a(e))delete b[e],c=!0;return c}function l(a,b,c){if(a.disabled||a.customConfig&&!c||!b)return!1;a._.cachedChecks={};return!0}function k(a,b){if(!a)return!1;if(!0===a)return a;if("string"==typeof a)return a=I(a),"*"==a?!0:CKEDITOR.tools.convertArrayToObject(a.split(b));if(CKEDITOR.tools.isArray(a))return a.length?
201 function p(a){var b=a.styleBackup=a.attributes.style,c=a.classBackup=a.attributes["class"];a.styles||(a.styles=CKEDITOR.tools.parseCssText(b||"",1));a.classes||(a.classes=c?c.split(/\s+/):[])}function t(a,b,d,e){var g=0,h;e.toHtml&&(b.name=b.name.replace(J,"$1"));if(e.doCallbacks&&a.elementCallbacks){a:{h=a.elementCallbacks;for(var m=0,k=h.length,l;m<k;++m)if(l=h[m](b)){h=l;break a}h=void 0}if(h)return h}if(e.doTransform&&(h=a._.transformations[b.name])){p(b);for(m=0;m<h.length;++m)z(a,b,h[m]);q(b)}if(e.doFilter){a:{m=
202 b.name;k=a._;a=k.allowedRules.elements[m];h=k.allowedRules.generic;m=k.disallowedRules.elements[m];k=k.disallowedRules.generic;l=e.skipRequired;var r={valid:!1,validAttributes:{},validClasses:{},validStyles:{},allAttributes:!1,allClasses:!1,allStyles:!1,hadInvalidAttribute:!1,hadInvalidClass:!1,hadInvalidStyle:!1},n,u;if(a||h){p(b);if(m)for(n=0,u=m.length;n<u;++n)if(!1===c(m[n],b,r)){a=null;break a}if(k)for(n=0,u=k.length;n<u;++n)c(k[n],b,r);if(a)for(n=0,u=a.length;n<u;++n)f(a[n],b,r,l);if(h)for(n=
203 0,u=h.length;n<u;++n)f(h[n],b,r,l);a=r}else a=null}if(!a||!a.valid)return d.push(b),1;u=a.validAttributes;var G=a.validStyles;h=a.validClasses;var m=b.attributes,x=b.styles,k=b.classes;l=b.classBackup;var N=b.styleBackup,A,C,y=[],r=[],E=/^data-cke-/;n=!1;delete m.style;delete m["class"];delete b.classBackup;delete b.styleBackup;if(!a.allAttributes)for(A in m)u[A]||(E.test(A)?A==(C=A.replace(/^data-cke-saved-/,""))||u[C]||(delete m[A],n=!0):(delete m[A],n=!0));if(!a.allStyles||a.hadInvalidStyle){for(A in x)a.allStyles||
204 G[A]?y.push(A+":"+x[A]):n=!0;y.length&&(m.style=y.sort().join("; "))}else N&&(m.style=N);if(!a.allClasses||a.hadInvalidClass){for(A=0;A<k.length;++A)(a.allClasses||h[k[A]])&&r.push(k[A]);r.length&&(m["class"]=r.sort().join(" "));l&&r.length<l.split(/\s+/).length&&(n=!0)}else l&&(m["class"]=l);n&&(g=1);if(!e.skipFinalValidation&&!v(b))return d.push(b),1}e.toHtml&&(b.name=b.name.replace(P,"cke:$1"));return g}function w(a){var b=[],c;for(c in a)-1<c.indexOf("*")&&b.push(c.replace(/\*/g,".*"));return b.length?
207 !e[h.name]){e=!1;break b}e=!0}if(e)a.name=b,a.attributes={},c.push({check:"parent-down",el:a});else{e=a.parent;for(var g=e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||"body"==e.name,m,k,f=d.length;0<f;)h=d[--f],g&&(h.type==CKEDITOR.NODE_TEXT||h.type==CKEDITOR.NODE_ELEMENT&&F.$inline[h.name])?(m||(m=new CKEDITOR.htmlParser.element(b),m.insertAfter(a),c.push({check:"parent-down",el:m})),m.add(h,0)):(m=null,k=F[e.name]||F.span,h.insertAfter(a),e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||h.type!=CKEDITOR.NODE_ELEMENT||
208 k[h.name]||c.push({check:"el-up",el:h}));a.remove()}}else d in{style:1,script:1}?a.remove():(a.parent&&c.push({check:"it",el:a.parent}),a.replaceWithChildren())}function z(a,b,c){var d,e;for(d=0;d<c.length;++d)if(e=c[d],!(e.check&&!a.check(e.check,!1)||e.left&&!e.left(b))){e.right(b,K);break}}function A(a,b){var c=b.getDefinition(),d=c.attributes,e=c.styles,g,f,h,m;if(a.name!=c.element)return!1;for(g in d)if("class"==g)for(c=d[g].split(/\s+/),h=a.classes.join("|");m=c.pop();){if(-1==h.indexOf(m))return!1}else if(a.attributes[g]!=
212 d&&(d=E(d),e.classes=d["class"]?d["class"].split(/\s+/):null,e.requiredClasses=e.classes,delete d["class"],e.attributes=d,e.requiredAttributes=d&&CKEDITOR.tools.objectKeys(d))}else if(CKEDITOR.tools.isArray(b)){for(e=0;e<b.length;++e)f=this.allow(b[e],c,d);return f}a(this,b,c,this.allowedContent,this._.allowedRules);return!0},applyTo:function(a,b,c,d){if(this.disabled)return!1;var e=this,g=[],f=this.editor&&this.editor.config.protectedSource,h,m=!1,k={doFilter:!c,doTransform:!0,doCallbacks:!0,toHtml:b};
213 a.forEach(function(a){if(a.type==CKEDITOR.NODE_ELEMENT){if("off"==a.attributes["data-cke-filter"])return!1;if(!b||"span"!=a.name||!~CKEDITOR.tools.objectKeys(a.attributes).join("|").indexOf("data-cke-"))if(h=t(e,a,g,k),h&1)m=!0;else if(h&2)return!1}else if(a.type==CKEDITOR.NODE_COMMENT&&a.value.match(/^\{cke_protected\}(?!\{C\})/)){var c;a:{var d=decodeURIComponent(a.value.replace(/^\{cke_protected\}/,""));c=[];var l,r,v;if(f)for(r=0;r<f.length;++r)if((v=d.match(f[r]))&&v[0].length==d.length){c=!0;
214 break a}d=CKEDITOR.htmlParser.fragment.fromHtml(d);1==d.children.length&&(l=d.children[0]).type==CKEDITOR.NODE_ELEMENT&&t(e,l,c,k);c=!c.length}c||g.push(a)}},null,!0);g.length&&(m=!0);var l;a=[];d=H[d||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];for(var n;c=g.pop();)c.type==CKEDITOR.NODE_ELEMENT?r(c,d,a):c.remove();for(;l=a.pop();)if(c=l.el,c.parent)switch(n=F[c.parent.name]||F.span,l.check){case "it":F.$removeEmpty[c.name]&&!c.children.length?r(c,d,a):v(c)||r(c,d,a);break;case "el-up":c.parent.type==
217 this.addContentForms(a.contentForms);return a.requiredContent&&(this.customConfig||this.disallowedContent.length)?this.check(a.requiredContent):!0},addTransformations:function(a){var b,c;if(!this.disabled&&a){var d=this._.transformations,e;for(e=0;e<a.length;++e){b=a[e];var g=void 0,f=void 0,h=void 0,m=void 0,k=void 0,l=void 0;c=[];for(f=0;f<b.length;++f)h=b[f],"string"==typeof h?(h=h.split(/\s*:\s*/),m=h[0],k=null,l=h[1]):(m=h.check,k=h.left,l=h.right),g||(g=h,g=g.element?g.element:m?m.match(/^([a-z0-9]+)/i)[0]:
218 g.left.getDefinition().element),k instanceof CKEDITOR.style&&(k=D(k)),c.push({check:m==g?null:m,left:k,right:"string"==typeof l?C(l):l});b=g;d[b]||(d[b]=[]);d[b].push(c)}}},check:function(a,b,c){if(this.disabled)return!0;if(CKEDITOR.tools.isArray(a)){for(var d=a.length;d--;)if(this.check(a[d],b,c))return!0;return!1}var e,f;if("string"==typeof a){f=a+"\x3c"+(!1===b?"0":"1")+(c?"1":"0")+"\x3e";if(f in this._.cachedChecks)return this._.cachedChecks[f];d=g(a).$1;e=d.styles;var h=d.classes;d.name=d.elements;
219 d.classes=h=h?h.split(/\s*,\s*/):[];d.styles=m(e);d.attributes=m(d.attributes);d.children=[];h.length&&(d.attributes["class"]=h.join(" "));e&&(d.attributes.style=CKEDITOR.tools.writeCssText(d.styles));e=d}else d=a.getDefinition(),e=d.styles,h=d.attributes||{},e&&!CKEDITOR.tools.isEmpty(e)?(e=E(e),h.style=CKEDITOR.tools.writeCssText(e,!0)):e={},e={name:d.element,attributes:h,classes:h["class"]?h["class"].split(/\s+/):[],styles:e,children:[]};var h=CKEDITOR.tools.clone(e),k=[],l;if(!1!==b&&(l=this._.transformations[e.name])){for(d=
220 0;d<l.length;++d)z(this,e,l[d]);q(e)}t(this,h,k,{doFilter:!0,doTransform:!1!==b,skipRequired:!c,skipFinalValidation:!c});b=0<k.length?!1:CKEDITOR.tools.objectCompare(e.attributes,h.attributes,!0)?!0:!1;"string"==typeof a&&(this._.cachedChecks[f]=b);return b},getAllowedEnterMode:function(){var a=["p","div","br"],b={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(c,d){var e=a.slice(),g;if(this.check(H[c]))return c;for(d||(e=e.reverse());g=e.pop();)if(this.check(g))return b[g];
231 f=this.keystrokes[e],k=this._.editor;a=!1===k.fire("key",{keyCode:e,domEvent:b});a||(f&&(a=!1!==k.execCommand(f,{from:"keystrokeHandler"})),a||(a=!!this.blockedKeystrokes[e]));a&&b.preventDefault(!0);return!a},b=function(b){a&&(a=!1,b.data.preventDefault(!0))};CKEDITOR.keystrokeHandler.prototype={attach:function(a){a.on("keydown",f,this);if(CKEDITOR.env.gecko&&CKEDITOR.env.mac)a.on("keypress",b,this)}}}(),function(){CKEDITOR.lang={languages:{af:1,ar:1,az:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,
233 this[a]?f():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+a+".js"),f,this)},detect:function(a,f){var b=this.languages;f=f||navigator.userLanguage||navigator.language||a;var c=f.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),e=c[1],c=c[2];b[e+"-"+c]?e=e+"-"+c:b[e]||(e=null);CKEDITOR.lang.detect=e?function(){return e}:function(a){return a};return e||a}}}(),CKEDITOR.scriptLoader=function(){var a={},f={};return{load:function(b,c,e,l){var k="string"==typeof b;k&&(b=[b]);e||(e=CKEDITOR);var d=b.length,
234 h=[],m=[],g=function(a){c&&(k?c.call(e,a):c.call(e,h,m))};if(0===d)g(!0);else{var n=function(a,b){(b?h:m).push(a);0>=--d&&(l&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),g(b))},p=function(b,c){a[b]=1;var d=f[b];delete f[b];for(var e=0;e<d.length;e++)d[e](b,c)},t=function(b){if(a[b])n(b,!0);else{var d=f[b]||(f[b]=[]);d.push(n);if(!(1<d.length)){var e=new CKEDITOR.dom.element("script");e.setAttributes({type:"text/javascript",src:b});c&&(CKEDITOR.env.ie&&(8>=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?
235 e.$.onreadystatechange=function(){if("loaded"==e.$.readyState||"complete"==e.$.readyState)e.$.onreadystatechange=null,p(b,!0)}:(e.$.onload=function(){setTimeout(function(){p(b,!0)},0)},e.$.onerror=function(){p(b,!1)}));e.appendTo(CKEDITOR.document.getHead())}}};l&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var w=0;w<d;w++)t(b[w])}},queue:function(){function a(){var b;(b=c[0])&&this.load(b.scriptUrl,b.callback,CKEDITOR,0)}var c=[];return function(e,f){var k=this;c.push({scriptUrl:e,
236 callback:function(){f&&f.apply(this,arguments);c.shift();a.call(k)}});1==c.length&&a.call(this)}}()}}(),CKEDITOR.resourceManager=function(a,f){this.basePath=a;this.fileName=f;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}},CKEDITOR.resourceManager.prototype={add:function(a,f){if(this.registered[a])throw Error('[CKEDITOR.resourceManager.add] The resource name "'+a+'" is already registered.');var b=this.registered[a]=f||{};b.name=a;b.path=this.getPath(a);CKEDITOR.fire(a+
238 file:b||this.fileName+".js"}}},load:function(a,f,b){CKEDITOR.tools.isArray(a)||(a=a?[a]:[]);for(var c=this.loaded,e=this.registered,l=[],k={},d={},h=0;h<a.length;h++){var m=a[h];if(m)if(c[m]||e[m])d[m]=this.get(m);else{var g=this.getFilePath(m);l.push(g);g in k||(k[g]=[]);k[g].push(m)}}CKEDITOR.scriptLoader.load(l,function(a,e){if(e.length)throw Error('[CKEDITOR.resourceManager.load] Resource name "'+k[e[0]].join(",")+'" was not found at "'+e[0]+'".');for(var g=0;g<a.length;g++)for(var h=k[a[g]],
239 m=0;m<h.length;m++){var l=h[m];d[l]=this.get(l);c[l]=1}f.call(b,d)},this)}},CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin"),CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(a){var f={};return function(b,c,e){var l={},k=function(b){a.call(this,b,function(a){CKEDITOR.tools.extend(l,a);var b=[],d;for(d in a){var n=a[d],p=n&&n.requires;if(!f[d]){if(n.icons)for(var t=n.icons.split(","),w=t.length;w--;)CKEDITOR.skin.addIcon(t[w],n.path+"icons/"+(CKEDITOR.env.hidpi&&
240 n.hidpi?"hidpi/":"")+t[w]+".png");f[d]=1}if(p)for(p.split&&(p=p.split(",")),n=0;n<p.length;n++)l[p[n]]||b.push(p[n])}if(b.length)k.call(this,b);else{for(d in l)n=l[d],n.onLoad&&!n.onLoad._called&&(!1===n.onLoad()&&delete l[d],n.onLoad._called=1);c&&c.call(e||window,l)}},this)};k.call(this,b)}}),CKEDITOR.plugins.setLang=function(a,f,b){var c=this.get(a);a=c.langEntries||(c.langEntries={});c=c.lang||(c.lang=[]);c.split&&(c=c.split(","));-1==CKEDITOR.tools.indexOf(c,f)&&c.push(f);a[f]=b},CKEDITOR.ui=
246 !b.readOnly?"disable":b.modes[a.mode]?"enable":"disable"]()}function l(a,b,c){if(b){var d,e,g=a.commands;for(e in g)d=g[e],(c||d.contextSensitive)&&d.refresh(a,b)}}function k(a){var b=a.config.customConfig;if(!b)return!1;var b=CKEDITOR.getUrl(b),c=q[b]||(q[b]={});c.fn?(c.fn.call(a,a.config),CKEDITOR.getUrl(a.config.customConfig)!=b&&k(a)||a.fireOnce("customConfigLoaded")):CKEDITOR.scriptLoader.queue(b,function(){c.fn=CKEDITOR.editorConfig?CKEDITOR.editorConfig:function(){};k(a)});return!0}function d(a,
249 b.customConfig);k(a)||a.fireOnce("customConfigLoaded")}function h(a){CKEDITOR.skin.loadPart("editor",function(){m(a)})}function m(a){CKEDITOR.lang.load(a.config.language,a.config.defaultLanguage,function(b,c){var d=a.config.title;a.langCode=b;a.lang=CKEDITOR.tools.prototypedCopy(c);a.title="string"==typeof d||!1===d?d:[a.lang.editor,a.name].join(", ");a.config.contentsLangDirection||(a.config.contentsLangDirection=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.getDirection(1):a.lang.dir);a.fire("langLoaded");
251 e=[],g=[];a.plugins=c;for(var h in c){var m=c[h],k=m.lang,l=null,r=m.requires,n;CKEDITOR.tools.isArray(r)&&(r=r.join(","));if(r&&(n=r.match(f)))for(;r=n.pop();)CKEDITOR.error("editor-plugin-required",{plugin:r.replace(",",""),requiredBy:h});k&&!a.lang[h]&&(k.split&&(k=k.split(",")),0<=CKEDITOR.tools.indexOf(k,a.langCode)?l=a.langCode:(l=a.langCode.replace(/-.*/,""),l=l!=a.langCode&&0<=CKEDITOR.tools.indexOf(k,l)?l:0<=CKEDITOR.tools.indexOf(k,"en")?"en":k[0]),m.langEntries&&m.langEntries[l]?(a.lang[h]=
254 return b.is("tr")?a.cloneContents():b.clone(!0)}for(var e=new CKEDITOR.dom.documentFragment,g,f,h,m=0;m<a.length;m++){var k=a[m],l=k.startContainer.getAscendant("tr",!0);c(k)?(g||(g=l.getAscendant("table").clone(),g.append(l.getAscendant({thead:1,tbody:1,tfoot:1}).clone()),e.append(g),g=g.findOne("thead, tbody, tfoot")),f&&f.equals(l)||(f=l,h=l.clone(),g.append(h)),h.append(d(k))):e.append(k.cloneContents())}return g?e:b.getHtmlFromRange(a[0])}a.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=
265 CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(b){for(var c,e,l=0,k;c=this._.htmlPartsRegex.exec(b);){e=c.index;if(e>l)if(l=b.substring(l,e),k)k.push(l);else this.onText(l);l=this._.htmlPartsRegex.lastIndex;if(e=c[1])if(e=e.toLowerCase(),k&&CKEDITOR.dtd.$cdata[e]&&(this.onCDATA(k.join("")),k=null),!k){this.onTagClose(e);continue}if(k)k.push(c[0]);else if(e=c[3]){if(e=e.toLowerCase(),!/="/.test(e)){var d=
266 {},h,m=c[4];c=!!c[5];if(m)for(;h=a.exec(m);){var g=h[1].toLowerCase();h=h[2]||h[3]||h[4]||"";d[g]=!h&&f[g]?g:CKEDITOR.tools.htmlDecodeAttr(h)}this.onTagOpen(e,d,c);!k&&CKEDITOR.dtd.$cdata[e]&&(k=[])}}else if(e=c[2])this.onComment(e)}if(b.length>l)this.onText(b.substring(l,b.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(a){this._.output.push("\x3c",a)},openTagClose:function(a,f){f?this._.output.push(" /\x3e"):this._.output.push("\x3e")},
273 var f=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),b={ol:1,ul:1},c=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),e={ul:"li",ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=function(l,k,d){function h(a){var b;if(0<v.length)for(var c=0;c<v.length;c++){var d=v[c],e=d.name,g=CKEDITOR.dtd[e],f=x.name&&CKEDITOR.dtd[x.name];
276 "dt"==a&&"dd"==b||"dd"==a&&"dt"==b:!1}var w=new CKEDITOR.htmlParser,q=k instanceof CKEDITOR.htmlParser.element?k:"string"==typeof k?new CKEDITOR.htmlParser.element(k):new CKEDITOR.htmlParser.fragment,v=[],u=[],x=q,B="textarea"==q.name,r="pre"==q.name;w.onTagOpen=function(d,e,g,k){e=new CKEDITOR.htmlParser.element(d,e);e.isUnknown&&g&&(e.isEmpty=!0);e.isOptionalClose=k;if(a(e))v.push(e);else{if("pre"==d)r=!0;else{if("br"==d&&r){x.add(new CKEDITOR.htmlParser.text("\n"));return}"textarea"==d&&(B=!0)}if("br"==
277 d)u.push(e);else{for(;!(k=(g=x.name)?CKEDITOR.dtd[g]||(x._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):c,e.isUnknown||x.isUnknown||k[d]);)if(x.isOptionalClose)w.onTagClose(g);else if(d in b&&g in b)g=x.children,(g=g[g.length-1])&&"li"==g.name||n(g=new CKEDITOR.htmlParser.element("li"),x),!e.returnPoint&&(e.returnPoint=x),x=g;else if(d in CKEDITOR.dtd.$listItem&&!t(d,g))w.onTagOpen("li"==d?"ul":"dl",{},0,1);else if(g in f&&!t(d,g))!e.returnPoint&&(e.returnPoint=x),x=x.parent;else if(g in CKEDITOR.dtd.$inline&&
282 if(c&&!this.parent&&b)b.onRoot(e,this);b&&this.filterChildren(b,!1,e);b=0;c=this.children;for(e=c.length;b<e;b++)c[b].writeHtml(a)},forEach:function(a,b,c){if(!(c||b&&this.type!=b))var e=a(this);if(!1!==e){c=this.children;for(var f=0;f<c.length;f++)e=c[f],e.type==CKEDITOR.NODE_ELEMENT?e.forEach(a,b):b&&e.type!=b||a(e)}},getFilterContext:function(a){return a||{}}}}(),"use strict",function(){function a(){this.rules=[]}function f(b,c,e,f){var k,d;for(k in c)(d=b[k])||(d=b[k]=new a),d.add(c[k],e,f)}CKEDITOR.htmlParser.filter=
285 c,e)},onComment:function(a,c,e){return this.commentRules.exec(a,c,e)},onRoot:function(a,c){return this.rootRules.exec(a,c)},onElement:function(a,c){for(var e=[this.elementsRules["^"],this.elementsRules[c.name],this.elementsRules.$],f,k=0;3>k;k++)if(f=e[k]){f=f.exec(a,c,this);if(!1===f)return null;if(f&&f!=c)return this.onNode(a,f);if(c.parent&&!c.name)break}return c},onNode:function(a,c){var e=c.type;return e==CKEDITOR.NODE_ELEMENT?this.onElement(a,c):e==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(a,
286 c.value)):e==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(a,c.value)):null},onAttribute:function(a,c,e,f){return(e=this.attributesRules[e])?e.exec(a,f,c,this):f}}});CKEDITOR.htmlParser.filterRulesGroup=a;a.prototype={add:function(a,c,e){this.rules.splice(this.findIndex(c),0,{value:a,priority:c,options:e})},addMany:function(a,c,e){for(var f=[this.findIndex(c),0],k=0,d=a.length;k<d;k++)f.push({value:a[k],priority:c,options:e});this.rules.splice.apply(this.rules,f)},findIndex:function(a){for(var c=
287 this.rules,e=c.length-1;0<=e&&a<c[e].priority;)e--;return e+1},exec:function(a,c){var e=c instanceof CKEDITOR.htmlParser.node||c instanceof CKEDITOR.htmlParser.fragment,f=Array.prototype.slice.call(arguments,1),k=this.rules,d=k.length,h,m,g,n;for(n=0;n<d;n++)if(e&&(h=c.type,m=c.name),g=k[n],!(a.nonEditable&&!g.options.applyToAll||a.nestedEditable&&g.options.excludeNestedEditable)){g=g.value.apply(null,f);if(!1===g||e&&g&&(g.name!=m||g.type!=h))return g;null!=g&&(f[0]=c=g)}return c},execOnName:function(a,
288 c){for(var e=0,f=this.rules,k=f.length,d;c&&e<k;e++)d=f[e],a.nonEditable&&!d.options.applyToAll||a.nestedEditable&&d.options.excludeNestedEditable||(c=c.replace(d.value[0],d.value[1]));return c}}}(),function(){function a(a,d){function g(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function f(a,d){return function(e){if(e.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var f=[],m=b(e),k,r;if(m)for(h(m,1)&&f.push(m);m;)l(m)&&
289 (k=c(m))&&h(k)&&((r=c(k))&&!l(r)?f.push(k):(g(n).insertAfter(k),k.remove())),m=m.previous;for(m=0;m<f.length;m++)f[m].remove();if(f=!a||!1!==("function"==typeof d?d(e):d))n||CKEDITOR.env.needsBrFiller||e.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT?n||CKEDITOR.env.needsBrFiller||!(7<document.documentMode||e.name in CKEDITOR.dtd.tr||e.name in CKEDITOR.dtd.$listItem)?(f=b(e),f=!f||"form"==e.name&&"input"==f.name):f=!1:f=!1;f&&e.add(g(a))}}}function h(a,b){if((!n||CKEDITOR.env.needsBrFiller)&&a.type==CKEDITOR.NODE_ELEMENT&&
291 function(a){return function(b){if(b.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var d=b.attributes;if("data-cke-bogus"in d||"data-cke-eol"in d)delete d["data-cke-bogus"];else{for(d=b.next;d&&e(d);)d=d.next;var f=c(b);!d&&l(b.parent)?k(b.parent,g(a)):l(d)&&f&&!l(f)&&g(a).insertBefore(d)}}}}(n);return m}function f(a,b){return a!=CKEDITOR.ENTER_BR&&!1!==b?a==CKEDITOR.ENTER_DIV?"div":"p":!1}function b(a){for(a=a.children[a.children.length-1];a&&e(a);)a=a.previous;return a}function c(a){for(a=a.previous;a&&
292 e(a);)a=a.previous;return a}function e(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&&a.attributes["data-cke-bookmark"]}function l(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in r||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function k(a,b){var c=a.children[a.children.length-1];a.children.push(b);b.parent=a;c&&(c.next=b,b.previous=c)}function d(a){a=a.attributes;"false"!=a.contenteditable&&(a["data-cke-editable"]=a.contenteditable?"true":1);
306 style:function(a){var b=a.children[0];b&&b.value&&(b.value=CKEDITOR.tools.trim(b.value));a.attributes.type||(a.attributes.type="text/css")},title:function(a){var b=a.children[0];!b&&k(a,b=new CKEDITOR.htmlParser.text);b.value=a.attributes["data-cke-title"]||""},input:h,textarea:h},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(D.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})});
310 CKEDITOR.NODE_ELEMENT&&("string"==typeof a?b.name==a:b.name in a)}}var f=function(a,b){a=a[0];b=b[0];return a<b?-1:a>b?1:0},b=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:b.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a,b){var f=this,k,d;b=f.getFilterContext(b);if(b.off)return!0;if(!f.parent)a.onRoot(b,f);for(;;){k=f.name;if(!(d=
311 a.onElementName(b,k)))return this.remove(),!1;f.name=d;if(!(f=a.onElement(b,f)))return this.remove(),!1;if(f!==this)return this.replaceWith(f),!1;if(f.name==k)break;if(f.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(f),!1;if(!f.name)return this.replaceWithChildren(),!1}k=f.attributes;var h,m;for(h in k){for(d=k[h];;)if(m=a.onAttributeName(b,h))if(m!=h)delete k[h],h=m;else break;else{delete k[h];break}m&&(!1===(d=a.onAttribute(b,f,m,d))?delete k[m]:k[m]=d)}f.isEmpty||this.filterChildren(a,!1,
312 b);return!0},filterChildren:b.filterChildren,writeHtml:function(a,b){b&&this.filter(b);var l=this.name,k=[],d=this.attributes,h,m;a.openTag(l,d);for(h in d)k.push([h,d[h]]);a.sortAttributes&&k.sort(f);h=0;for(m=k.length;h<m;h++)d=k[h],a.attribute(d[0],d[1]);a.openTagClose(l,this.isEmpty);this.writeChildrenHtml(a);this.isEmpty||a.closeTag(l)},writeChildrenHtml:b.writeChildrenHtml,replaceWithChildren:function(){for(var a=this.children,b=a.length;b;)a[--b].insertAfter(this);this.remove()},forEach:b.forEach,
314 this.writeHtml(a);return a.getHtml()},split:function(a){for(var b=this.children.splice(a,this.children.length-a),f=this.clone(),k=0;k<b.length;++k)b[k].parent=f;f.children=b;b[0]&&(b[0].previous=null);0<a&&(this.children[a-1].next=null);this.parent.add(f,this.getIndex()+1);return f},find:function(a,b){void 0===b&&(b=!1);var f=[],k;for(k=0;k<this.children.length;k++){var d=this.children[k];"function"==typeof a&&a(d)?f.push(d):"string"==typeof a&&d.name===a&&f.push(d);b&&d.find&&(f=f.concat(d.find(a,
322 e,l,k){if(!CKEDITOR.env.isCompatible)return null;a=CKEDITOR.dom.element.get(a);if(a.getEditor())throw'The editor instance "'+a.getEditor().name+'" is already attached to the provided element.';var d=new CKEDITOR.editor(e,a,k);k==CKEDITOR.ELEMENT_MODE_REPLACE&&(a.setStyle("visibility","hidden"),d._.required=a.hasAttribute("required"),a.removeAttribute("required"));l&&d.setData(l,null,!0);d.on("loaded",function(){b(d);k==CKEDITOR.ELEMENT_MODE_REPLACE&&d.config.autoUpdateElement&&a.$.form&&d._attachToForm();
323 d.setMode(d.config.startupMode,function(){d.resetDirty();d.status="ready";d.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,d)})});d.on("destroy",f);return d}function f(){var a=this.container,b=this.element;a&&(a.clearCustomData(),a.remove());b&&(b.clearCustomData(),this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(b.show(),this._.required&&b.setAttribute("required","required")),delete this.element)}function b(a){var b=a.name,f=a.element,k=a.elementMode,d=a.fire("uiSpace",{space:"top",
325 b=CKEDITOR.dom.element.createFromHtml(m.output({id:a.id,name:b,langDir:a.lang.dir,langCode:a.langCode,voiceLabel:a.title,topHtml:d?'\x3cspan id\x3d"'+a.ui.spaceId("top")+'" class\x3d"cke_top cke_reset_all" role\x3d"presentation" style\x3d"height:auto"\x3e'+d+"\x3c/span\x3e":"",contentId:a.ui.spaceId("contents"),bottomHtml:h?'\x3cspan id\x3d"'+a.ui.spaceId("bottom")+'" class\x3d"cke_bottom cke_reset_all" role\x3d"presentation"\x3e'+h+"\x3c/span\x3e":"",outerEl:CKEDITOR.env.ie?"span":"div"}));k==CKEDITOR.ELEMENT_MODE_REPLACE?
326 (f.hide(),b.insertAfter(f)):f.append(b);a.container=b;a.ui.contentsElement=a.ui.space("contents");d&&a.ui.space("top").unselectable();h&&a.ui.space("bottom").unselectable();f=a.config.width;k=a.config.height;f&&b.setStyle("width",CKEDITOR.tools.cssLength(f));k&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(k));b.disableContextMenu();CKEDITOR.env.webkit&&b.on("focus",function(){a.focus()});a.fireOnce("uiReady")}CKEDITOR.replace=function(b,e){return a(b,e,null,CKEDITOR.ELEMENT_MODE_REPLACE)};
327 CKEDITOR.appendTo=function(b,e,f){return a(b,e,f,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),b=0;b<a.length;b++){var f=null,k=a[b];if(k.name||k.id){if("string"==typeof arguments[0]){if(!(new RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)")).test(k.className))continue}else if("function"==typeof arguments[0]&&(f={},!1===arguments[0](k,f)))continue;this.replace(k,f)}}};CKEDITOR.editor.prototype.addMode=function(a,b){(this._.modes||(this._.modes=
328 {}))[a]=b};CKEDITOR.editor.prototype.setMode=function(a,b){var f=this,k=this._.modes;if(a!=f.mode&&k&&k[a]){f.fire("beforeSetMode",a);if(f.mode){var d=f.checkDirty(),k=f._.previousModeData,h,m=0;f.fire("beforeModeUnload");f.editable(0);f._.previousMode=f.mode;f._.previousModeData=h=f.getData(1);"source"==f.mode&&k==h&&(f.fire("lockSnapshot",{forceUpdate:!0}),m=1);f.ui.space("contents").setHtml("");f.mode=""}else f._.previousModeData=f.getData(1);this._.modes[a](function(){f.mode=a;void 0!==d&&!d&&
329 f.resetDirty();m?f.fire("unlockSnapshot"):"wysiwyg"==a&&f.fire("saveSnapshot");setTimeout(function(){f.fire("mode");b&&b.call(f)},0)})}};CKEDITOR.editor.prototype.resize=function(a,b,f,k){var d=this.container,h=this.ui.space("contents"),m=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement;k=k?this.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}):d;k.setSize("width",a,!0);m&&(m.style.width="1%");var g=(k.$.offsetHeight||0)-(h.$.clientHeight||
330 0),d=Math.max(b-(f?0:g),0);b=f?b+g:b;h.setStyle("height",d+"px");m&&(m.style.width="100%");this.fire("resize",{outerHeight:b,contentsHeight:d,outerWidth:a||k.getSize("width")})};CKEDITOR.editor.prototype.getResizable=function(a){return a?this.ui.space("contents"):this.container};CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&CKEDITOR.replaceAll(CKEDITOR.replaceClass)})}(),CKEDITOR.config.startupMode="wysiwyg",function(){function a(a){var b=a.editor,d=a.data.path,e=d.blockLimit,g=a.data.selection,
331 h=g.getRanges()[0],m;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)if(g=f(g,d))g.appendBogus(),m=CKEDITOR.env.ie;k(b,d.block,e)&&h.collapsed&&!h.getCommonAncestor().isReadOnly()&&(d=h.clone(),d.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),e=new CKEDITOR.dom.walker(d),e.guard=function(a){return!c(a)||a.type==CKEDITOR.NODE_COMMENT||a.isReadOnly()},!e.checkForward()||d.checkStartOfBlock()&&d.checkEndOfBlock())&&(b=h.fixBlock(!0,b.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p"),CKEDITOR.env.needsBrFiller||
334 CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(f);a.guard=b();a.checkBackward();if(d)return f=e.clone(),f.collapse(),f.setEndAt(d,CKEDITOR.POSITION_AFTER_END),a=new CKEDITOR.dom.walker(f),a.guard=b(!0),d=!1,a.checkForward(),d}return null}function k(a,b,c){return!1!==a.config.autoParagraph&&a.activeEnterMode!=CKEDITOR.ENTER_BR&&(a.editable().equals(c)&&!b||b&&"true"==b.getAttribute("contenteditable"))}function d(a){return a.activeEnterMode!=CKEDITOR.ENTER_BR&&!1!==a.config.autoParagraph?
353 !a.config.disableNativeSpellChecker);var f=a.config.contentsLangDirection;this.getDirection(1)!=f&&this.changeAttr("dir",f);var h=CKEDITOR.getCss();if(h){var f=e.getHead(),k=f.getCustomData("stylesheet");k?h!=k.getText()&&(CKEDITOR.env.ie&&9>CKEDITOR.env.version?k.$.styleSheet.cssText=h:k.setText(h)):(h=e.appendStyleText(h),h=new CKEDITOR.dom.element(h.ownerNode||h.owningElement),f.setCustomData("stylesheet",h),h.data("cke-temp",1))}f=e.getCustomData("stylesheet_ref")||0;e.setCustomData("stylesheet_ref",
354 f+1);this.setCustomData("cke_includeReadonly",!a.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){a=a.data;var b=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");b&&2!=a.$.button&&b.isReadOnly()&&a.preventDefault()});var n={8:1,46:1};this.attachListener(a,"key",function(b){if(a.readOnly)return!0;var c=b.data.domEvent.getKey(),d;if(c in n){b=a.getSelection();var e,f=b.getRanges()[0],h=f.startPath(),m,k,u,c=8==c;CKEDITOR.env.ie&&11>CKEDITOR.env.version&&(e=
356 (k=h.blockLimit.getAscendant("table"))&&f.checkBoundaryOfElement(k,c?CKEDITOR.START:CKEDITOR.END)&&(u=k[c?"getPrevious":"getNext"](g))?(a.fire("saveSnapshot"),f["moveToElementEdit"+(c?"End":"Start")](u),f.checkStartOfBlock()&&f.checkEndOfBlock()?u.remove():f.select(),a.fire("saveSnapshot"),d=1):(k=h.contains(["td","th","caption"]))&&f.checkBoundaryOfElement(k,c?CKEDITOR.START:CKEDITOR.END)&&(d=1))}return!d});a.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&this.attachListener(this,"keyup",
366 q=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function b(c,d){var e,g,f,h,m=[],k=d.range.startContainer;e=d.range.startPath();for(var k=l[k.getName()],n=0,u=c.getChildren(),v=u.count(),x=-1,p=-1,C=0,q=e.contains(l.$list);n<v;++n)e=u.getItem(n),a(e)?(f=e.getName(),q&&f in CKEDITOR.dtd.$list?m=m.concat(b(e,d)):(h=!!k[f],"br"!=f||!e.data("cke-eol")||n&&n!=v-1||(C=(g=n?m[n-1].node:u.getItem(n+1))&&(!a(g)||!g.is("br")),g=g&&a(g)&&l.$block[g.getName()]),-1!=x||h||(x=n),h||(p=n),m.push({isElement:1,
367 isLineBreak:C,isBlock:e.isBlockBoundary(),hasBlockSibling:g,node:e,name:f,allowed:h}),g=C=0)):m.push({isElement:0,node:e,allowed:1});-1<x&&(m[x].firstNotAllowed=1);-1<p&&(m[p].lastNotAllowed=1);return m}function e(b,c){var d=[],g=b.getChildren(),f=g.count(),h,m=0,k=l[c],n=!b.is(l.$inline)||b.is("br");for(n&&d.push(" ");m<f;m++)h=g.getItem(m),a(h)&&!h.is(k)?d=d.concat(e(h,c)):d.push(h);n&&d.push(" ");return d}function g(b){return a(b.startContainer)&&b.startContainer.getChild(b.startOffset-1)}function f(b){return b&&
375 (ba=X.getPosition(W),ba==CKEDITOR.POSITION_IDENTICAL||ba==CKEDITOR.POSITION_CONTAINS?M=0:(W=M.splitElement(X),M.moveToPosition(W,CKEDITOR.POSITION_AFTER_START),M=1)):M=0}if(M)x=0<p;else{M=R.startPath();!t.isBlock&&k(n.editor,M.block,M.blockLimit)&&(Y=d(n.editor))&&(Y=B.createElement(Y),Y.appendBogus(),R.insertNode(Y),CKEDITOR.env.needsBrFiller&&(U=Y.getBogus())&&U.remove(),R.moveToPosition(Y,CKEDITOR.POSITION_BEFORE_END));if((M=R.startPath().block)&&!M.equals(T)){if(U=M.getBogus())U.remove(),Q.push(M);
389 c.createBookmark()}},merge:function(a,c){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var d=a.mergeBlockBookmark.startNode,e=a.mergeBlockBookmark.endNode,g=new CKEDITOR.dom.elementPath(d,c),f=new CKEDITOR.dom.elementPath(e,c),g=g.block,f=f.block;g&&f&&!g.equals(f)&&b(f,d,e);d.remove();e.remove()}}},table:function(){function a(c){var e=[],g,f=new CKEDITOR.dom.walker(c),h=c.startPath().contains(d),m=c.endPath().contains(d),k={};f.guard=function(a,f){if(a.type==CKEDITOR.NODE_ELEMENT){var l="visited_"+
390 (f?"out":"in");if(a.getCustomData(l))return;CKEDITOR.dom.element.setMarker(k,a,l,1)}if(f&&h&&a.equals(h))g=c.clone(),g.setEndAt(h,CKEDITOR.POSITION_BEFORE_END),e.push(g);else if(!f&&m&&a.equals(m))g=c.clone(),g.setStartAt(m,CKEDITOR.POSITION_AFTER_START),e.push(g);else{if(l=!f)l=a.type==CKEDITOR.NODE_ELEMENT&&a.is(d)&&(!h||b(a,h))&&(!m||b(a,m));l&&(g=c.clone(),g.selectNodeContents(a),e.push(g))}};f.lastForward();CKEDITOR.dom.element.clearAllMarkers(k);return e}function b(a,c){var d=CKEDITOR.POSITION_CONTAINS+
392 CKEDITOR.END)&&(b=a.range.clone(),b.setStartBefore(c),b.setEndAfter(g),a.purgeTableBookmark=b.createBookmark())}},detectRanges:function(e,g){var f=c(g,e.bookmark),h=f.clone(),m,k,l=f.getCommonAncestor();l.is(CKEDITOR.dtd.$tableContent)&&!l.is(d)&&(l=l.getAscendant("table",!0));k=l;l=new CKEDITOR.dom.elementPath(f.startContainer,k);k=new CKEDITOR.dom.elementPath(f.endContainer,k);l=l.contains("table");k=k.contains("table");if(l||k)l&&k&&b(l,k)?(e.tableSurroundingRange=h,h.setStartAt(l,CKEDITOR.POSITION_AFTER_END),
393 h.setEndAt(k,CKEDITOR.POSITION_BEFORE_START),h=f.clone(),h.setEndAt(l,CKEDITOR.POSITION_AFTER_END),m=f.clone(),m.setStartAt(k,CKEDITOR.POSITION_BEFORE_START),m=a(h).concat(a(m))):l?k||(e.tableSurroundingRange=h,h.setStartAt(l,CKEDITOR.POSITION_AFTER_END),f.setEndAt(l,CKEDITOR.POSITION_AFTER_END)):(e.tableSurroundingRange=h,h.setEndAt(k,CKEDITOR.POSITION_BEFORE_START),f.setStartAt(k,CKEDITOR.POSITION_AFTER_START)),e.tableContentsRanges=m?m:a(f)},deleteRanges:function(a){for(var b;b=a.tableContentsRanges.pop();)b.extractContents(),
395 fixUneditableRangePosition:function(a){a.startContainer.getDtd()["#"]||a.moveToClosestEditablePosition(null,!0)},autoParagraph:function(a,b){var c=b.startPath(),e;k(a,c.block,c.blockLimit)&&(e=d(a))&&(e=b.document.createElement(e),e.appendBogus(),b.insertNode(e),b.moveToPosition(e,CKEDITOR.POSITION_AFTER_START))}}}()}(),function(){function a(a,b){if(0===a.length)return!1;var c,d;if((c=!b&&1===a.length)&&!(c=a[0].collapsed)){var e=a[0];c=e.startContainer.getAscendant({td:1,th:1},!0);var g=e.endContainer.getAscendant({td:1,
399 k=1===g.length&&g[0]._getTableElement()&&g[0]._getTableElement().is("table"),l=1===e.length&&e[0].collapsed,g=a(e,!!CKEDITOR.env.webkit)&&a(g);f=f&&h?f.equals(h)||h.contains(f):!1;f&&(l||g)?(m&&!k&&d.selectRanges(e),d=!0):d=!1;d=!d}d&&(b.reset(),b=0)}if(!b&&(b=c||this.getSelection(1),!b||b.getType()==CKEDITOR.SELECTION_NONE))return;this.fire("selectionCheck",b);c=this.elementPath();c.compare(this._.selectionPreviousPath)||(d=this._.selectionPreviousPath&&this._.selectionPreviousPath.blockLimit.equals(c.blockLimit),
400 CKEDITOR.env.webkit&&!d&&(this._.previousActive=this.document.getActive()),this._.selectionPreviousPath=c,this.fire("selectionChange",{selection:b,path:c}))}function l(){z=!0;r||(k.call(this),r=CKEDITOR.tools.setTimeout(k,200,this))}function k(){r=null;z&&(CKEDITOR.tools.setTimeout(e,0,this),z=!1)}function d(a){return A(a)||a.type==CKEDITOR.NODE_ELEMENT&&!a.is(CKEDITOR.dtd.$empty)?!0:!1}function h(a){function b(c,d){return c&&c.type!=CKEDITOR.NODE_TEXT?a.clone()["moveToElementEdit"+(d?"End":"Start")](c):
409 function d(a){if(CKEDITOR.env.ie){var b=(a=a.getRanges()[0])?a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&("false"==a.getAttribute("contenteditable")||"true"==a.getAttribute("contenteditable"))},!0):null;return a&&"false"==b.getAttribute("contenteditable")&&b}}var f=c.document,h=CKEDITOR.document,m=c.editable(),k=f.getBody(),n=f.getDocumentElement(),r=m.isInline(),u,v;CKEDITOR.env.gecko&&m.attachListener(m,"focus",function(a){a.removeListener();0!==u&&(a=c.getSelection().getNative())&&
412 x&&(c.document.$.documentElement.scrollLeft=x.x,c.document.$.documentElement.scrollTop=x.y);x=null});if("BackCompat"!=f.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat){var p,w;n.on("mousedown",function(a){function b(a){a=a.data.$;if(p){var c=k.$.createTextRange();try{c.moveToPoint(a.clientX,a.clientY)}catch(d){}p.setEndPoint(0>w.compareEndPoints("StartToStart",c)?"EndToEnd":"StartToStart",c);p.select()}}function c(){n.removeListener("mousemove",b);h.removeListener("mouseup",c);n.removeListener("mouseup",
413 c);p.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y<n.$.clientHeight&&a.$.x<n.$.clientWidth){p=k.$.createTextRange();try{p.moveToPoint(a.$.clientX,a.$.clientY)}catch(d){}w=p.duplicate();n.on("mousemove",b);h.on("mouseup",c);n.on("mouseup",c)}})}if(7<CKEDITOR.env.version&&11>CKEDITOR.env.version)n.on("mousedown",function(a){a.data.getTarget().is("html")&&(h.on("mouseup",b),n.on("mouseup",b))})}}m.attachListener(m,"selectionchange",e,c);m.attachListener(m,"keyup",l,c);m.attachListener(m,"keydown",
424 c.startOffset&&D[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();if(!d.hasChildNodes())return{container:d,offset:0};for(var e=d.children,g,f,h=b.duplicate(),m=0,k=e.length-1,l=-1,n,r;m<=k;)if(l=Math.floor((m+k)/2),g=e[l],h.moveToElementText(g),n=h.compareEndPoints("StartToStart",
425 b),0<n)k=l-1;else if(0>n)m=l+1;else return{container:d,offset:a(g)};if(-1==l||l==e.length-1&&0>n){h.moveToElementText(d);h.setEndPoint("StartToStart",b);h=h.text.replace(/(\r\n|\r)/g,"\n").length;e=d.childNodes;if(!h)return g=e[e.length-1],g.nodeType!=CKEDITOR.NODE_TEXT?{container:d,offset:e.length}:{container:g,offset:g.nodeValue.length};for(d=e.length;0<h&&0<d;)f=e[--d],f.nodeType==CKEDITOR.NODE_TEXT&&(r=f,h-=f.nodeValue.length);return{container:r,offset:-h}}h.collapse(0<n?!0:!1);h.setEndPoint(0<
433 a.checkDirty();a.fire("lockSnapshot");b.remove();a.fire("unlockSnapshot");!c&&a.resetDirty()}delete a._.hiddenSelectionContainer}else CKEDITOR.warn("selection-fake-reset");this.rev=v++},selectElement:function(a){var b=new CKEDITOR.dom.range(this.root);b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},selectRanges:function(b){var d=this.root.editor,e=d&&d._.hiddenSelectionContainer;this.reset();if(e)for(var e=this.root,f,k=0;k<b.length;++k)f=b[k],f.endContainer.equals(e)&&(f.endOffset=Math.min(f.endOffset,
443 2,CKEDITOR.STYLE_OBJECT=3,function(){function a(a,b){for(var c,d;(a=a.getParent())&&!a.equals(b);)if(a.getAttribute("data-nostyle"))c=a;else if(!d){var e=a.getAttribute("contentEditable");"false"==e?c=a:"true"==e&&(d=1)}return c}function f(a,b,c,d){return(a.getPosition(b)|d)==d&&(!c.childRule||c.childRule(a))}function b(c){var d=c.document;if(c.collapsed)d=u(this,d),c.insertNode(d),c.moveToPosition(d,CKEDITOR.POSITION_BEFORE_END);else{var g=this.element,h=this._.definition,m,k=h.ignoreReadonly,l=
444 k||h.includeReadonly;null==l&&(l=c.root.getCustomData("cke_includeReadonly"));var n=CKEDITOR.dtd[g];n||(m=!0,n=CKEDITOR.dtd.span);c.enlarge(CKEDITOR.ENLARGE_INLINE,1);c.trim();var r=c.createBookmark(),v=r.startNode,p=r.endNode,x=v,q;if(!k){var t=c.getCommonAncestor(),k=a(v,t),t=a(p,t);k&&(x=k.getNextSourceNode(!0));t&&(p=t)}for(x.getPosition(p)==CKEDITOR.POSITION_FOLLOWING&&(x=0);x;){k=!1;if(x.equals(p))x=null,k=!0;else{var B=x.type==CKEDITOR.NODE_ELEMENT?x.getName():null,t=B&&"false"==x.getAttribute("contentEditable"),
445 z=B&&x.getAttribute("data-nostyle");if(B&&x.data("cke-bookmark")){x=x.getNextSourceNode(!0);continue}if(t&&l&&CKEDITOR.dtd.$block[B])for(var A=x,y=e(A),D=void 0,C=y.length,da=0,A=C&&new CKEDITOR.dom.range(A.getDocument());da<C;++da){var D=y[da],H=CKEDITOR.filter.instances[D.data("cke-filter")];if(H?H.check(this):1)A.selectNodeContents(D),b.call(this,A)}y=B?!n[B]||z?0:t&&!l?0:f(x,p,h,L):1;if(y)if(D=x.getParent(),y=h,C=g,da=m,!D||!(D.getDtd()||CKEDITOR.dtd.span)[C]&&!da||y.parentRule&&!y.parentRule(D))k=
446 !0;else{if(q||B&&CKEDITOR.dtd.$removeEmpty[B]&&(x.getPosition(p)|L)!=L||(q=c.clone(),q.setStartBefore(x)),B=x.type,B==CKEDITOR.NODE_TEXT||t||B==CKEDITOR.NODE_ELEMENT&&!x.getChildCount()){for(var B=x,F;(k=!B.getNext(I))&&(F=B.getParent(),n[F.getName()])&&f(F,v,h,N);)B=F;q.setEndAfter(B)}}else k=!0;x=x.getNextSourceNode(z||t)}if(k&&q&&!q.collapsed){for(var k=u(this,d),t=k.hasAttributes(),z=q.getCommonAncestor(),B={},y={},D={},C={},ea,E,ha;k&&z;){if(z.getName()==g){for(ea in h.attributes)!C[ea]&&(ha=
447 z.getAttribute(E))&&(k.getAttribute(ea)==ha?y[ea]=1:C[ea]=1);for(E in h.styles)!D[E]&&(ha=z.getStyle(E))&&(k.getStyle(E)==ha?B[E]=1:D[E]=1)}z=z.getParent()}for(ea in y)k.removeAttribute(ea);for(E in B)k.removeStyle(E);t&&!k.hasAttributes()&&(k=null);k?(q.extractContents().appendTo(k),q.insertNode(k),w.call(this,k),k.mergeSiblings(),CKEDITOR.env.ie||k.$.normalize()):(k=new CKEDITOR.dom.element("span"),q.extractContents().appendTo(k),q.insertNode(k),w.call(this,k),k.remove(!0));q=null}}c.moveToBookmark(r);
449 1);var c=a.createBookmark(),d=c.startNode,e=this._.definition.alwaysRemoveElement;if(a.collapsed){for(var g=new CKEDITOR.dom.elementPath(d.getParent(),a.root),f,h=0,m;h<g.elements.length&&(m=g.elements[h])&&m!=g.block&&m!=g.blockLimit;h++)if(this.checkElementRemovable(m)){var k;!e&&a.collapsed&&(a.checkBoundaryOfElement(m,CKEDITOR.END)||(k=a.checkBoundaryOfElement(m,CKEDITOR.START)))?(f=m,f.match=k?"start":"end"):(m.mergeSiblings(),m.is(this.element)?t.call(this,m):q(m,r(this)[m.getName()]))}if(f){e=
451 [];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function l(a){var b=a.getEnclosedNode()||a.getCommonAncestor(!1,!0);(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1))&&!a.isReadOnly()&&x(a,this)}function k(a){var b=a.getCommonAncestor(!0,!0);if(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1)){var b=this._.definition,c=b.attributes;if(c)for(var d in c)a.removeAttribute(d,c[d]);if(b.styles)for(var e in b.styles)b.styles.hasOwnProperty(e)&&
467 h:this.type==CKEDITOR.STYLE_OBJECT?k:null;return this.removeFromRange(a)},applyToObject:function(a){x(a,this)},checkActive:function(a,b){switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(a.block||a.blockLimit,!0,b);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(var c=a.elements,d=0,e;d<c.length;d++)if(e=c[d],this.type!=CKEDITOR.STYLE_INLINE||e!=a.block&&e!=a.blockLimit){if(this.type==CKEDITOR.STYLE_OBJECT){var g=e.getName();if(!("string"==typeof this.element?
474 function(a){for(var e=0;e<b.length;e++){var f=b[e],k=f.style.checkActive(a.data.path,this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;f.fn.call(this,k)}}));b.push({style:a,fn:f})},applyStyle:function(a){a.apply(this)},removeStyle:function(a){a.remove(this)},getStylesSet:function(a){if(this._.stylesDefinitions)a(this._.stylesDefinitions);else{var f=this,b=f.config.stylesCombo_stylesSet||f.config.stylesSet;if(!1===b)a(null);else if(b instanceof Array)f._.stylesDefinitions=b,a(b);else{b||(b="default");
476 this.$.nodeValue+"--\x3e"}}),"use strict",function(){var a={},f={},b;for(b in CKEDITOR.dtd.$blockLimit)b in CKEDITOR.dtd.$list||(a[b]=1);for(b in CKEDITOR.dtd.$block)b in CKEDITOR.dtd.$blockLimit||b in CKEDITOR.dtd.$empty||(f[b]=1);CKEDITOR.dom.elementPath=function(b,e){var l=null,k=null,d=[],h=b,m;e=e||b.getDocument().getBody();do if(h.type==CKEDITOR.NODE_ELEMENT){d.push(h);if(!this.lastElement&&(this.lastElement=h,h.is(CKEDITOR.dtd.$object)||"false"==h.getAttribute("contenteditable")))continue;
477 if(h.equals(e))break;if(!k&&(m=h.getName(),"true"==h.getAttribute("contenteditable")?k=h:!l&&f[m]&&(l=h),a[m])){if(m=!l&&"div"==m){a:{m=h.getChildren();for(var g=0,n=m.count();g<n;g++){var p=m.getItem(g);if(p.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[p.getName()]){m=!0;break a}}m=!1}m=!m}m?l=h:k=h}}while(h=h.getParent());k||(k=e);this.block=l;this.blockLimit=k;this.root=e;this.elements=d}}(),CKEDITOR.dom.elementPath.prototype={compare:function(a){var f=this.elements;a=a&&a.elements;if(!a||
481 this.$.nodeValue.substring(a,f)}}),function(){function a(a,c,e){var f=a.serializable,k=c[e?"endContainer":"startContainer"],d=e?"endOffset":"startOffset",h=f?c.document.getById(a.startNode):a.startNode;a=f?c.document.getById(a.endNode):a.endNode;k.equals(h.getPrevious())?(c.startOffset=c.startOffset-k.getLength()-a.getPrevious().getLength(),k=a.getNext()):k.equals(a.getPrevious())&&(c.startOffset-=k.getLength(),k=a.getNext());k.equals(h.getParent())&&c[d]++;k.equals(a.getParent())&&c[d]++;c[e?"endContainer":
482 "startContainer"]=k;return c}CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,f)};var f={createIterator:function(){var a=this,c=CKEDITOR.dom.walker.bookmark(),e=[],f;return{getNextRange:function(k){f=void 0===f?0:f+1;var d=a[f];if(d&&1<a.length){if(!f)for(var h=a.length-1;0<=h;h--)e.unshift(a[h].createBookmark(!0));if(k)for(var m=0;a[f+m+1];){var g=d.document;k=0;h=g.getById(e[m].endNode);
483 for(g=g.getById(e[m+1].startNode);;){h=h.getNextSourceNode(!1);if(g.equals(h))k=1;else if(c(h)||h.type==CKEDITOR.NODE_ELEMENT&&h.isBlockBoundary())continue;break}if(!k)break;m++}for(d.moveToBookmark(e.shift());m--;)h=a[++f],h.moveToBookmark(e.shift()),d.setEnd(h.endContainer,h.endOffset)}return d}}},createBookmarks:function(b){for(var c=[],e,f=0;f<this.length;f++){c.push(e=this[f].createBookmark(b,!0));for(var k=f+1;k<this.length;k++)this[k]=a(e,this[k]),this[k]=a(e,this[k],!0)}return c},createBookmarks2:function(a){for(var c=
485 f)&&(f="ie"),d[f]){b+="_"+c[e];break}return CKEDITOR.getUrl(a()+b+".css")}function b(a,b){l[a]||(CKEDITOR.document.appendStyleSheet(f(a)),l[a]=1);b&&b()}function c(a){var b=a.getById(k);b||(b=a.getHead().append("style"),b.setAttribute("id",k),b.setAttribute("type","text/css"));return b}function e(a,b,c){var d,e,f;if(CKEDITOR.env.webkit)for(b=b.split("}").slice(0,-1),e=0;e<b.length;e++)b[e]=b[e].split("{");for(var h=0;h<a.length;h++)if(CKEDITOR.env.webkit)for(e=0;e<b.length;e++){f=b[e][1];for(d=0;d<
488 c(CKEDITOR.document);return(this.setUiColor=function(a){this.uiColor=a;var c=CKEDITOR.skin.chameleon,f="",m="";"function"==typeof c&&(f=c(this,"editor"),m=c(this,"panel"));a=[[h,a]];e([b],f,a);e(d,m,a)}).call(this,a)}});var k="cke_ui_color",d=[],h=/\$color/g;CKEDITOR.on("instanceLoaded",function(a){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var b=a.editor;a=function(a){a=(a.data[0]||a.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!a.getById("cke_ui_color")){a=c(a);d.push(a);
491 CKEDITOR.skin.ua_dialog="ie,iequirks,ie8",CKEDITOR.skin.chameleon=function(){var a=function(){return function(a,c){for(var e=a.match(/[^#]./g),f=0;3>f;f++){var k=f,d;d=parseInt(e[f],16);d=("0"+(0>c?0|d*(1+c):0|d+(255-d)*c).toString(16)).slice(-2);e[k]=d}return"#"+e.join("")}}(),f={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_bottom [background-color:{defaultBackground};border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [background-color:{defaultBackground};outline-color:{defaultBorder};] {id} .cke_dialog_tab [background-color:{dialogTab};border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [background-color:{lightBackground};] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} a.cke_button_off:hover,{id} a.cke_button_off:focus,{id} a.cke_button_off:active [background-color:{darkBackground};border-color:{toolbarElementsBorder};] {id} .cke_button_on [background-color:{ckeButtonOn};border-color:{toolbarElementsBorder};] {id} .cke_toolbar_separator,{id} .cke_toolgroup a.cke_button:last-child:after,{id} .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after [background-color: {toolbarElementsBorder};border-color: {toolbarElementsBorder};] {id} a.cke_combo_button:hover,{id} a.cke_combo_button:focus,{id} .cke_combo_on a.cke_combo_button [border-color:{toolbarElementsBorder};background-color:{darkBackground};] {id} .cke_combo:after [border-color:{toolbarElementsBorder};] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover,{id} a.cke_path_item:focus,{id} a.cke_path_item:active [background-color:{darkBackground};] {id}.cke_panel [border-color:{defaultBorder};] "),
496 this)},this),this._.domOnChangeRegistered=!0);this.on("change",b)}},!0),l=/^on([A-Z]\w+)/,k=function(a){for(var b in a)(l.test(b)||"title"==b||"type"==b)&&delete a[b];return a},d=function(a){a=a.data.getKeystroke();a==CKEDITOR.SHIFT+CKEDITOR.ALT+36?this.setDirectionMarker("ltr"):a==CKEDITOR.SHIFT+CKEDITOR.ALT+35&&this.setDirectionMarker("rtl")};CKEDITOR.tools.extend(CKEDITOR.ui.dialog,{labeledElement:function(b,c,d,e){if(!(4>arguments.length)){var f=a.call(this,c);f.labelId=CKEDITOR.tools.getNextId()+
497 "_label";this._.children=[];var k={role:c.role||"presentation"};c.includeLabel&&(k["aria-labelledby"]=f.labelId);CKEDITOR.ui.dialog.uiElement.call(this,b,c,d,"div",null,k,function(){var a=[],d=c.required?" cke_required":"";"horizontal"!=c.labelLayout?a.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+d+'" ',' id\x3d"'+f.labelId+'"',f.inputId?' for\x3d"'+f.inputId+'"':"",(c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e",c.label,"\x3c/label\x3e",'\x3cdiv class\x3d"cke_dialog_ui_labeled_content"',
499 '"':"")+"\x3e"+e.call(this,b,c)+"\x3c/span\x3e"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(b,d,a));return a.join("")})}},textInput:function(b,c,e){if(!(3>arguments.length)){a.call(this,c);var f=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",k={"class":"cke_dialog_ui_input_"+c.type,id:f,type:c.type};c.validate&&(this.validate=c.validate);c.maxLength&&(k.maxlength=c.maxLength);c.size&&(k.size=c.size);c.inputStyle&&(k.style=c.inputStyle);var l=this,w=!1;b.on("load",function(){l.getInputElement().on("keydown",
500 function(a){13==a.data.getKeystroke()&&(w=!0)});l.getInputElement().on("keyup",function(a){13==a.data.getKeystroke()&&w&&(b.getButton("ok")&&setTimeout(function(){b.getButton("ok").click()},0),w=!1);l.bidi&&d.call(l,a)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,b,c,e,function(){var a=['\x3cdiv class\x3d"cke_dialog_ui_input_',c.type,'" role\x3d"presentation"'];c.width&&a.push('style\x3d"width:'+c.width+'" ');a.push("\x3e\x3cinput ");k["aria-labelledby"]=this._.labelId;this._.required&&
501 (k["aria-required"]=this._.required);for(var b in k)a.push(b+'\x3d"'+k[b]+'" ');a.push(" /\x3e\x3c/div\x3e");return a.join("")})}},textarea:function(b,c,e){if(!(3>arguments.length)){a.call(this,c);var f=this,k=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",l={};c.validate&&(this.validate=c.validate);l.rows=c.rows||5;l.cols=c.cols||20;l["class"]="cke_dialog_ui_input_textarea "+(c["class"]||"");"undefined"!=typeof c.inputStyle&&(l.style=c.inputStyle);c.dir&&(l.dir=c.dir);if(f.bidi)b.on("load",
502 function(){f.getInputElement().on("keyup",d)},f);CKEDITOR.ui.dialog.labeledElement.call(this,b,c,e,function(){l["aria-labelledby"]=this._.labelId;this._.required&&(l["aria-required"]=this._.required);var a=['\x3cdiv class\x3d"cke_dialog_ui_input_textarea" role\x3d"presentation"\x3e\x3ctextarea id\x3d"',k,'" '],b;for(b in l)a.push(b+'\x3d"'+CKEDITOR.tools.htmlEncode(l[b])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(f._["default"]),"\x3c/textarea\x3e\x3c/div\x3e");return a.join("")})}},checkbox:function(b,
503 c,d){if(!(3>arguments.length)){var e=a.call(this,c,{"default":!!c["default"]});c.validate&&(this.validate=c.validate);CKEDITOR.ui.dialog.uiElement.call(this,b,c,d,"span",null,null,function(){var a=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),d=[],f=CKEDITOR.tools.getNextId()+"_label",g={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":f};k(a);c["default"]&&(g.checked="checked");"undefined"!=typeof a.inputStyle&&(a.style=a.inputStyle);
505 b,c,d,function(){for(var a=[],d=[],g=(c.id?c.id:CKEDITOR.tools.getNextId())+"_radio",l=0;l<c.items.length;l++){var u=c.items[l],x=void 0!==u[2]?u[2]:u[0],B=void 0!==u[1]?u[1]:u[0],r=CKEDITOR.tools.getNextId()+"_radio_input",z=r+"_label",r=CKEDITOR.tools.extend({},c,{id:r,title:null,type:null},!0),x=CKEDITOR.tools.extend({},r,{title:x},!0),A={type:"radio","class":"cke_dialog_ui_radio_input",name:g,value:B,"aria-labelledby":z},y=[];f._["default"]==B&&(A.checked="checked");k(r);k(x);"undefined"!=typeof r.inputStyle&&
507 (function(){a.on("click",function(a){e.click();a.data.preventDefault()});a.on("keydown",function(a){a.data.getKeystroke()in{32:1}&&(e.click(),a.data.preventDefault())})})();a.unselectable()},this);var f=CKEDITOR.tools.extend({},c);delete f.style;var k=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,b,f,d,"a",null,{style:c.style,href:"javascript:void(0)",title:c.label,hidefocus:"true","class":c["class"],role:"button","aria-labelledby":k},'\x3cspan id\x3d"'+k+'" class\x3d"cke_dialog_ui_button"\x3e'+
509 c.type,'" role\x3d"presentation"');c.width&&d.push('style\x3d"width:'+c.width+'" ');d.push("\x3e");void 0!==c.size&&(g.size=c.size);void 0!==c.multiple&&(g.multiple=c.multiple);k(a);for(var l=0,u;l<c.items.length&&(u=c.items[l]);l++)f.push('\x3coption value\x3d"',CKEDITOR.tools.htmlEncode(void 0!==u[1]?u[1]:u[0]).replace(/"/g,"\x26quot;"),'" /\x3e ',CKEDITOR.tools.htmlEncode(u[0]));"undefined"!=typeof a.inputStyle&&(a.style=a.inputStyle);e.select=new CKEDITOR.ui.dialog.uiElement(b,a,d,"select",null,
511 e.frameId,'" title\x3d"',c.label,'" src\x3d"javascript:void('];a.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0");a.push(')"\x3e\x3c/iframe\x3e');return a.join("")})}},fileButton:function(b,c,d){var e=this;if(!(3>arguments.length)){a.call(this,c);c.validate&&(this.validate=c.validate);var f=CKEDITOR.tools.extend({},c),k=f.onClick;f.className=(f.className?f.className+" ":"")+"cke_dialog_ui_button";f.onClick=function(a){var d=
512 c["for"];k&&!1===k.call(this,a)||(b.getContentElement(d[0],d[1]).submit(),this.disable())};b.on("load",function(){b.getContentElement(c["for"][0],c["for"][1])._.buttons.push(e)});CKEDITOR.ui.dialog.button.call(this,b,f,d)}},html:function(){var a=/^\s*<[\w:]+\s+([^>]*)?>/,b=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,c=/\/$/;return function(d,e,f){if(!(3>arguments.length)){var k=[],l=e.html;"\x3c"!=l.charAt(0)&&(l="\x3cspan\x3e"+l+"\x3c/span\x3e");var v=e.focus;if(v){var u=this.focus;this.focus=function(){("function"==
513 typeof v?v:u).call(this);this.fire("focus")};e.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,d,e,k,"span",null,null,"");k=k.join("").match(a);l=l.match(b)||["","",""];c.test(l[1])&&(l[1]=l[1].slice(0,-1),l[2]="/"+l[2]);f.push([l[1]," ",k[1]||"",l[2]].join(""))}}}(),fieldset:function(a,b,c,d,e){var f=e.label;this._={children:b};CKEDITOR.ui.dialog.uiElement.call(this,a,e,d,"fieldset",null,null,function(){var a=[];f&&a.push("\x3clegend"+
526 '\x3c/label\x3e\x3cinput style\x3d"width:100%" id\x3d"',x,'" aria-labelledby\x3d"',b.labelId,'" type\x3d"file" name\x3d"',CKEDITOR.tools.htmlEncode(d.id||"cke_upload"),'" size\x3d"',CKEDITOR.tools.htmlEncode(0<h?h:""),'" /\x3e\x3c/form\x3e\x3c/body\x3e\x3c/html\x3e\x3cscript\x3e',CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"","window.parent.CKEDITOR.tools.callFunction("+f+");","window.onbeforeunload \x3d function() {window.parent.CKEDITOR.tools.callFunction("+k+")}","\x3c/script\x3e"].join(""));
527 c.$.close();for(h=0;h<e.length;h++)e[h].enable()}var b=this._,c=CKEDITOR.document.getById(b.frameId).getFrameDocument(),d=b.definition,e=b.buttons,f=this.formLoadedNumber,k=this.formUnloadNumber,l=b.dialog._.editor.lang.dir,v=b.dialog._.editor.langCode;f||(f=this.formLoadedNumber=CKEDITOR.tools.addFunction(function(){this.fire("formLoaded")},this),k=this.formUnloadNumber=CKEDITOR.tools.addFunction(function(){this.getInputElement().clearCustomData()},this),this.getDialog()._.editor.on("destroy",function(){CKEDITOR.tools.removeFunction(f);
528 CKEDITOR.tools.removeFunction(k)}));CKEDITOR.env.gecko?setTimeout(a,500):a()},getValue:function(){return this.getInputElement().$.value||""},setInitValue:function(){this._.initValue=""},eventProcessors:{onChange:function(a,b){this._.domOnChangeRegistered||(this.on("formLoaded",function(){this.getInputElement().on("change",function(){this.fire("change",{value:this.getValue()})},this)},this),this._.domOnChangeRegistered=!0);this.on("change",b)}},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.fileButton.prototype=
530 b);CKEDITOR.dialog.addUIElement("fieldset",{build:function(a,b,c){for(var d=b.children,e,f=[],k=[],l=0;l<d.length&&(e=d[l]);l++){var v=[];f.push(v);k.push(CKEDITOR.dialog._.uiElementBuilders[e.type].build(a,e,v))}return new CKEDITOR.ui.dialog[b.type](a,k,f,c,b)}})}}),CKEDITOR.DIALOG_RESIZE_NONE=0,CKEDITOR.DIALOG_RESIZE_WIDTH=1,CKEDITOR.DIALOG_RESIZE_HEIGHT=2,CKEDITOR.DIALOG_RESIZE_BOTH=3,CKEDITOR.DIALOG_STATE_IDLE=1,CKEDITOR.DIALOG_STATE_BUSY=2,function(){function a(){for(var a=this._.tabIdList.length,
534 CKEDITOR.env.edge||(a="javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())",CKEDITOR.dom.element.createFromHtml('\x3ciframe frameBorder\x3d"0" class\x3d"cke_iframe_shim" src\x3d"'+a+'" tabIndex\x3d"-1"\x3e\x3c/iframe\x3e').appendTo(c.getParent()));d.unselectable();e.unselectable();return{element:b,parts:{dialog:b.getChild(0),title:d,close:e,tabs:c.getChild(2),contents:c.getChild([3,0,0,0]),footer:c.getChild([3,0,1,0])}}}function k(a,
536 b)})}function h(a,b){this._={dialog:a};CKEDITOR.tools.extend(this,b)}function m(a){function b(c){var k=a.getSize(),m=CKEDITOR.document.getWindow().getViewPaneSize(),l=c.data.$.screenX,n=c.data.$.screenY,r=l-d.x,u=n-d.y;d={x:l,y:n};e.x+=r;e.y+=u;a.move(e.x+h[3]<g?-h[3]:e.x-h[1]>m.width-k.width-g?m.width-k.width+("rtl"==f.lang.dir?0:h[1]):e.x,e.y+h[0]<g?-h[0]:e.y-h[2]>m.height-k.height-g?m.height-k.height+h[2]:e.y,1);c.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mousemove",
538 y.getChild(0).getFrameDocument();g.on("mousemove",b);g.on("mouseup",c)}f.data.preventDefault()},a)}function g(a){function b(c){var n="rtl"==f.lang.dir,r=l.width,u=l.height,x=r+(c.data.$.screenX-m.x)*(n?-1:1)*(a._.moved?1:2),v=u+(c.data.$.screenY-m.y)*(a._.moved?1:2),p=a._.element.getFirst(),p=n&&p.getComputedStyle("right"),B=a.getPosition();B.y+v>k.height&&(v=k.height-B.y);(n?p:B.x)+x>k.width&&(x=k.width-(n?p:B.x));if(e==CKEDITOR.DIALOG_RESIZE_WIDTH||e==CKEDITOR.DIALOG_RESIZE_BOTH)r=Math.max(d.minWidth||
540 g,h,k,m,l,n,r=CKEDITOR.tools.addFunction(function(d){l=a.getSize();var e=a.parts.contents;e.$.getElementsByTagName("iframe").length&&(n=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_dialog_resize_cover" style\x3d"height: 100%; position: absolute; width: 100%;"\x3e\x3c/div\x3e'),e.append(n));h=l.height-a.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks));g=l.width-a.parts.contents.getSize("width",1);m={x:d.screenX,y:d.screenY};k=CKEDITOR.document.getWindow().getViewPaneSize();
545 g.setStyles({width:a.width+"px",height:a.height+"px"})};var h=function(){var a=b.getScrollPosition(),c=CKEDITOR.dialog._.currentTop;g.setStyles({left:a.x+"px",top:a.y+"px"});if(c){do a=c.getPosition(),c.move(a.x,a.y);while(c=c._.parentDialog)}};z=a;b.on("resize",a);a();CKEDITOR.env.mac&&CKEDITOR.env.webkit||g.focus();if(CKEDITOR.env.ie6Compat){var k=function(){h();arguments.callee.prevScrollHandler.apply(this,arguments)};b.$.setTimeout(function(){k.prevScrollHandler=window.onscroll||function(){};
546 window.onscroll=k},0);h()}}function t(a){y&&(a.focusManager.remove(y),a=CKEDITOR.document.getWindow(),y.hide(),a.removeListener("resize",z),CKEDITOR.env.ie6Compat&&a.$.setTimeout(function(){window.onscroll=window.onscroll&&window.onscroll.prevScrollHandler||null},0),z=null)}var w=CKEDITOR.tools.cssLength,q='\x3cdiv class\x3d"cke_reset_all {editorId} {editorDialogClass} {hidpi}" dir\x3d"{langDir}" lang\x3d"{langCode}" role\x3d"dialog" aria-labelledby\x3d"cke_dialog_title_{id}"\x3e\x3ctable class\x3d"cke_dialog '+
548 CKEDITOR.dialog=function(b,d){function h(){var a=y._.focusList;a.sort(function(a,b){return a.tabIndex!=b.tabIndex?b.tabIndex-a.tabIndex:a.focusIndex-b.focusIndex});for(var b=a.length,c=0;c<b;c++)a[c].focusIndex=c}function k(a){var b=y._.focusList;a=a||0;if(!(1>b.length)){var c=y._.currentFocusIndex;y._.tabBarMode&&0>a&&(c=0);try{b[c].getInputElement().$.blur()}catch(d){}var e=c,f=1<y._.pageCount;do{e+=a;if(f&&!y._.tabBarMode&&(e==b.length||-1==e)){y._.tabBarMode=!0;y._.tabs[y._.currentTabId][0].focus();
549 y._.currentFocusIndex=-1;return}e=(e+b.length)%b.length;if(e==c)break}while(a&&!b[e].isFocusable());b[e].focus();"text"==b[e].type&&b[e].select()}}function n(c){if(y==CKEDITOR.dialog._.currentTop){var d=c.data.getKeystroke(),e="rtl"==b.lang.dir,g=[37,38,39,40];w=t=0;if(9==d||d==CKEDITOR.SHIFT+9)k(d==CKEDITOR.SHIFT+9?-1:1),w=1;else if(d==CKEDITOR.ALT+121&&!y._.tabBarMode&&1<y.getPageCount())y._.tabBarMode=!0,y._.tabs[y._.currentTabId][0].focus(),y._.currentFocusIndex=-1,w=1;else if(-1!=CKEDITOR.tools.indexOf(g,
551 this._.tabBarMode=!1,this._.currentFocusIndex=-1,k(1),w=1;u(c)}}function u(a){w?a.data.preventDefault(1):t&&a.data.stopPropagation()}var x=CKEDITOR.dialog._.dialogDefinitions[d],p=CKEDITOR.tools.clone(v),B=b.config.dialog_buttonsOrder||"OS",q=b.lang.dir,z={},w,t;("OS"==B&&CKEDITOR.env.mac||"rtl"==B&&"ltr"==q||"ltr"==B&&"rtl"==q)&&p.buttons.reverse();x=CKEDITOR.tools.extend(x(b),p);x=CKEDITOR.tools.clone(x);x=new r(this,x);p=l(b);this._={editor:b,element:p.element,name:d,contentSize:{width:0,height:0},
555 d:void 0);return e}})},this,null,0);this.on("cancel",function(a){D(function(c){if(c.isChanged())return b.config.dialog_noConfirmCancel||confirm(b.lang.common.confirmCancel)||(a.data.hide=!1),!0})},this,null,0);this.parts.close.on("click",function(a){!1!==this.fire("cancel",{hide:!0}).hide&&this.hide();a.data.preventDefault()},this);this.changeFocus=k;var C=this._.element;b.focusManager.add(C,1);this.on("show",function(){C.on("keydown",n,this);if(CKEDITOR.env.gecko)C.on("keypress",u,this)});this.on("hide",
557 (a=x.onFocus.call(this))&&a.focus():k(1))},this,null,4294967295);if(CKEDITOR.env.ie6Compat)this.on("load",function(){var a=this.getElement(),b=a.getFirst();b.remove();b.appendTo(a)},this);m(this);g(this);(new CKEDITOR.dom.text(x.title,CKEDITOR.document)).appendTo(this.parts.title);for(q=0;q<x.contents.length;q++)(z=x.contents[q])&&this.addPage(z);this.parts.tabs.on("click",function(a){var b=a.data.getTarget();b.hasClass("cke_dialog_tab")&&(b=b.$.id,this.selectPage(b.substring(4,b.lastIndexOf("_"))),
558 this._.tabBarMode&&(this._.tabBarMode=!1,this._.currentFocusIndex=-1,k(1)),a.data.preventDefault())},this);q=[];z=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:x.buttons},q).getChild();this.parts.footer.setHtml(q.join(""));for(q=0;q<z.length;q++)this._.buttons[z[q].id]=z[q]};CKEDITOR.dialog.prototype={destroy:function(){this.hide();this._.element.remove()},resize:function(){return function(a,b){this._.contentSize&&this._.contentSize.width==
563 a.on("keydown",C);a.on("keyup",F);this._.hasFocus=!1;for(var c in b.contents)if(b.contents[c]){var a=b.contents[c],e=this._.tabs[a.id],f=a.requiredContent,g=0;if(e){for(var h in this._.contents[a.id]){var k=this._.contents[a.id][h];"hbox"!=k.type&&"vbox"!=k.type&&k.getInputElement()&&(k.requiredContent&&!this._.editor.activeFilter.check(k.requiredContent)?k.disable():(k.enable(),g++))}!g||f&&!this._.editor.activeFilter.check(f)?e[0].addClass("cke_dialog_tab_disabled"):e[0].removeClass("cke_dialog_tab_disabled")}}CKEDITOR.tools.setTimeout(function(){this.layout();
574 getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},addFocusable:function(a,b){if("undefined"==typeof b)b=this._.focusList.length,this._.focusList.push(new k(this,a,b));else{this._.focusList.splice(b,0,new k(this,a,b));for(var c=b+1;c<this._.focusList.length;c++)this._.focusList[c].focusIndex++}},setState:function(a){if(this.state!=a){this.state=a;if(a==CKEDITOR.DIALOG_STATE_BUSY){if(!this.parts.spinner){var b=this.getParentEditor().lang.dir,c={attributes:{"class":"cke_dialog_spinner"},
583 k=["\x3c",h," "],m=(e&&e.call?e(b):e)||{},l=(f&&f.call?f(b):f)||{},n=(g&&g.call?g.call(this,a,b):g)||"",r=this.domId=l.id||CKEDITOR.tools.getNextId()+"_uiElement";b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)&&(m.display="none",this.notAllowed=!0);l.id=r;var x={};b.type&&(x["cke_dialog_ui_"+b.type]=1);b.className&&(x[b.className]=1);b.disabled&&(x.cke_disabled=1);for(var u=l["class"]&&l["class"].split?l["class"].split(" "):[],r=0;r<u.length;r++)u[r]&&(x[u[r]]=1);u=[];for(r in x)u.push(r);
584 l["class"]=u.join(" ");b.title&&(l.title=b.title);x=(b.style||"").split(";");b.align&&(u=b.align,m["margin-left"]="left"==u?0:"auto",m["margin-right"]="right"==u?0:"auto");for(r in m)x.push(r+":"+m[r]);b.hidden&&x.push("display:none");for(r=x.length-1;0<=r;r--)""===x[r]&&x.splice(r,1);0<x.length&&(l.style=(l.style?l.style+"; ":"")+x.join("; "));for(r in l)k.push(r+'\x3d"'+CKEDITOR.tools.htmlEncode(l[r])+'" ');k.push("\x3e",n,"\x3c/",h,"\x3e");c.push(k.join(""));(this._||(this._={})).dialog=a;"boolean"==
587 a._.focusList.push(this)-1,this.on("focus",function(){a._.currentFocusIndex=v.focusIndex}))}},hbox:function(a,b,c,d,e){if(!(4>arguments.length)){this._||(this._={});var f=this._.children=b,g=e&&e.widths||null,h=e&&e.height||null,k,m={role:"presentation"};e&&e.align&&(m.align=e.align);CKEDITOR.ui.dialog.uiElement.call(this,a,e||{type:"hbox"},d,"table",{},m,function(){var a=['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];for(k=0;k<c.length;k++){var b="cke_dialog_ui_hbox_child",d=[];0===k&&
588 (b="cke_dialog_ui_hbox_first");k==c.length-1&&(b="cke_dialog_ui_hbox_last");a.push('\x3ctd class\x3d"',b,'" role\x3d"presentation" ');g?g[k]&&d.push("width:"+w(g[k])):d.push("width:"+Math.floor(100/c.length)+"%");h&&d.push("height:"+w(h));e&&void 0!==e.padding&&d.push("padding:"+w(e.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&f[k].align&&d.push("text-align:"+f[k].align);0<d.length&&a.push('style\x3d"'+d.join("; ")+'" ');a.push("\x3e",c[k],"\x3c/td\x3e")}a.push("\x3c/tr\x3e\x3c/tbody\x3e");return a.join("")})}},
590 e.align||("ltr"==a.getParentEditor().lang.dir?"left":"right")),'" ');b.push("\x3e\x3ctbody\x3e");for(var d=0;d<c.length;d++){var k=[];b.push('\x3ctr\x3e\x3ctd role\x3d"presentation" ');g&&k.push("width:"+w(g||"100%"));h?k.push("height:"+w(h[d])):e&&e.expand&&k.push("height:"+Math.floor(100/c.length)+"%");e&&void 0!==e.padding&&k.push("padding:"+w(e.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&f[d].align&&k.push("text-align:"+f[d].align);0<k.length&&b.push('style\x3d"',k.join("; "),'" ');b.push(' class\x3d"cke_dialog_ui_vbox_child"\x3e',
595 this._.children[a[0]].getChild(a.slice(1,a.length)):null}},!0);CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox;(function(){var a={build:function(a,b,c){for(var d=b.children,e,f=[],g=[],h=0;h<d.length&&(e=d[h]);h++){var k=[];f.push(k);g.push(CKEDITOR.dialog._.uiElementBuilders[e.type].build(a,e,k))}return new CKEDITOR.ui.dialog[b.type](a,g,f,c,b)}};CKEDITOR.dialog.addUIElement("hbox",a);CKEDITOR.dialog.addUIElement("vbox",a)})();CKEDITOR.dialogCommand=function(a,b){this.dialogName=a;
609 attributes:"dir"}},requiredContent:"p[dir]",refresh:function(a,b){var c=a.config.useComputedState,d,c=void 0===c||c;if(!c){d=b.lastElement;for(var e=a.editable();d&&!(d.getName()in k||d.equals(e));){var f=d.getParent();if(!f)break;d=f}}d=d||b.block||b.blockLimit;d.equals(a.editable())&&(e=a.getSelection().getRanges()[0].getEnclosedNode())&&e.type==CKEDITOR.NODE_ELEMENT&&(d=e);d&&(c=c?d.getComputedStyle("direction"):d.getStyle("direction")||d.getAttribute("dir"),a.getCommand("bidirtl").setState("rtl"==
610 c?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF),a.getCommand("bidiltr").setState("ltr"==c?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF));c=(b.block||b.blockLimit||a.editable()).getDirection(1);c!=(a._.selDir||a.lang.dir)&&(a._.selDir=c,a.fire("contentDirChanged",c))},exec:function(c){var d=c.getSelection(),h=c.config.enterMode,k=d.getRanges();if(k&&k.length){for(var m={},v=d.createBookmarks(),k=k.createIterator(),u,x=0;u=k.getNextRange(1);){var B=u.getEnclosedNode();B&&(!B||B.type==CKEDITOR.NODE_ELEMENT&&
612 for(;B=r.next();)a(B,b,c,m);u=u.createIterator();for(u.enlargeBr=h!=CKEDITOR.ENTER_BR;B=u.getNextParagraph(h==CKEDITOR.ENTER_P?"p":"div");)a(B,b,c,m)}CKEDITOR.dom.element.clearAllMarkers(m);c.forceNextSelectionCheck();d.selectBookmarks(v);c.focus()}}}}function c(a){var b=a==d.setAttribute,c=a==d.removeAttribute,e=/\bdirection\s*:\s*(.*?)\s*(:?$|;)/;return function(d,f){if(!this.isReadOnly()){var h;if(h=d==(b||c?"dir":"direction")||"style"==d&&(c||e.test(f))){a:{h=this;for(var k=h.getDocument().getBody().getParent();h;){if(h.equals(k)){h=
613 !1;break a}h=h.getParent()}h=!0}h=!h}if(h&&(h=this.getDirection(1),k=a.apply(this,arguments),h!=this.getDirection(1)))return this.getDocument().fire("dirChanged",this),k}return a.apply(this,arguments)}}var e={table:1,ul:1,ol:1,blockquote:1,div:1},l={},k={};CKEDITOR.tools.extend(l,e,{tr:1,p:1,div:1,li:1});CKEDITOR.tools.extend(k,l,{td:1});CKEDITOR.plugins.add("bidi",{init:function(a){function c(b,d,e,f,h){a.addCommand(e,new CKEDITOR.command(a,f));a.ui.addButton&&a.ui.addButton(b,{label:d,command:e,
615 "setAttribute","removeAttribute"],m=0;m<h.length;m++)d[h[m]]=CKEDITOR.tools.override(d[h[m]],c)}(),function(){var a={exec:function(a){var b=a.getCommand("blockquote").state,c=a.getSelection(),e=c&&c.getRanges()[0];if(e){var l=c.createBookmarks();if(CKEDITOR.env.ie){var k=l[0].startNode,d=l[0].endNode,h;if(k&&"blockquote"==k.getParent().getName())for(h=k;h=h.getNext();)if(h.type==CKEDITOR.NODE_ELEMENT&&h.isBlockBoundary()){k.move(h,!0);break}if(d&&"blockquote"==d.getParent().getName())for(h=d;h=h.getPrevious();)if(h.type==
616 CKEDITOR.NODE_ELEMENT&&h.isBlockBoundary()){d.move(h);break}}var m=e.createIterator();m.enlargeBr=a.config.enterMode!=CKEDITOR.ENTER_BR;if(b==CKEDITOR.TRISTATE_OFF){for(k=[];b=m.getNextParagraph();)k.push(b);1>k.length&&(b=a.document.createElement(a.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),d=l.shift(),e.insertNode(b),b.append(new CKEDITOR.dom.text("",a.document)),e.moveToBookmark(d),e.selectNodeContents(b),e.collapse(!0),d=e.createBookmark(),k.push(b),l.unshift(d));h=k[0].getParent();e=[];for(d=
617 0;d<k.length;d++)b=k[d],h=h.getCommonAncestor(b.getParent());for(b={table:1,tbody:1,tr:1,ol:1,ul:1};b[h.getName()];)h=h.getParent();for(d=null;0<k.length;){for(b=k.shift();!b.getParent().equals(h);)b=b.getParent();b.equals(d)||e.push(b);d=b}for(;0<e.length;)if(b=e.shift(),"blockquote"==b.getName()){for(d=new CKEDITOR.dom.documentFragment(a.document);b.getFirst();)d.append(b.getFirst().remove()),k.push(d.getLast());d.replace(b)}else k.push(b);e=a.document.createElement("blockquote");for(e.insertBefore(k[0]);0<
618 k.length;)b=k.shift(),e.append(b)}else if(b==CKEDITOR.TRISTATE_ON){d=[];for(h={};b=m.getNextParagraph();){for(k=e=null;b.getParent();){if("blockquote"==b.getParent().getName()){e=b.getParent();k=b;break}b=b.getParent()}e&&k&&!k.getCustomData("blockquote_moveout")&&(d.push(k),CKEDITOR.dom.element.setMarker(h,k,"blockquote_moveout",!0))}CKEDITOR.dom.element.clearAllMarkers(h);b=[];k=[];for(h={};0<d.length;)m=d.shift(),e=m.getParent(),m.getPrevious()?m.getNext()?(m.breakParent(m.getParent()),k.push(m.getNext())):
619 m.remove().insertAfter(e):m.remove().insertBefore(e),e.getCustomData("blockquote_processed")||(k.push(e),CKEDITOR.dom.element.setMarker(h,e,"blockquote_processed",!0)),b.push(m);CKEDITOR.dom.element.clearAllMarkers(h);for(d=k.length-1;0<=d;d--){e=k[d];a:{h=e;for(var m=0,g=h.getChildCount(),n=void 0;m<g&&(n=h.getChild(m));m++)if(n.type==CKEDITOR.NODE_ELEMENT&&n.isBlockBoundary()){h=!1;break a}h=!0}h&&e.remove()}if(a.config.enterMode==CKEDITOR.ENTER_BR)for(e=!0;b.length;)if(m=b.shift(),"div"==m.getName()){d=
625 CKEDITOR.ui.button.prototype={render:function(a,e){function l(){var b=a.mode;b&&(b=this.modes[b]?void 0!==u[b]?u[b]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,b=a.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:b,this.setState(b),this.refresh&&this.refresh())}var k=CKEDITOR.env,d=this._.id=CKEDITOR.tools.getNextId(),h="",m=this.command,g,n,p;this._.editor=a;var t={id:d,button:this,editor:a,focus:function(){CKEDITOR.document.getById(d).focus()},execute:function(){this.button.click(a)},attach:function(a){this.button.attach(a)}},
626 w=CKEDITOR.tools.addFunction(function(a){if(t.onkey)return a=new CKEDITOR.dom.event(a),!1!==t.onkey(t,a.getKeystroke())}),q=CKEDITOR.tools.addFunction(function(a){var b;t.onfocus&&(b=!1!==t.onfocus(t,new CKEDITOR.dom.event(a)));return b}),v=0;t.clickFn=g=CKEDITOR.tools.addFunction(function(){v&&(a.unlockSelection(1),v=0);t.execute();k.iOS&&a.focus()});if(this.modes){var u={};a.on("beforeModeUnload",function(){a.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(u[a.mode]=this._.state)},this);a.on("activeFilterChange",
628 "rtl"==b,this.icon,this.iconOffset))},this);m?(n=a.getCommandKeystroke(m))&&(p=CKEDITOR.tools.keystrokeToString(a.lang.common.keyboard,n)):h+="off";var x=n=this.name||this.command;this.icon&&!/\./.test(this.icon)&&(x=this.icon,this.icon=null);h={id:d,name:n,iconName:x,label:this.label,cls:this.className||"",state:h,ariaDisabled:"disabled"==h?"true":"false",title:this.title+(p?" ("+p.display+")":""),ariaShortcut:p?a.lang.common.keyboardShortcut+" "+p.aria:"",titleJs:k.gecko&&!k.hc?"":(this.title||
635 !0,CKEDITOR.env.ie||CKEDITOR.env.air?setTimeout(function(){a.toolbox.focus()},100):a.toolbox.focus())}};CKEDITOR.plugins.add("toolbar",{requires:"button",init:function(e){var f,k=function(a,b){var c,g="rtl"==e.lang.dir,n=e.config.toolbarGroupCycling,p=g?37:39,g=g?39:37,n=void 0===n||n;switch(b){case 9:case CKEDITOR.SHIFT+9:for(;!c||!c.items.length;)if(c=9==b?(c?c.next:a.toolbar.next)||e.toolbox.toolbars[0]:(c?c.previous:a.toolbar.previous)||e.toolbox.toolbars[e.toolbox.toolbars.length-1],c.items.length)for(a=
636 c.items[f?c.items.length-1:0];a&&!a.focus;)(a=f?a.previous:a.next)||(c=0);a&&a.focus();return!1;case p:c=a;do c=c.next,!c&&n&&(c=a.toolbar.items[0]);while(c&&!c.focus);c?c.focus():k(a,9);return!1;case 40:return a.button&&a.button.hasArrow?a.execute():k(a,40==b?p:g),!1;case g:case 38:c=a;do c=c.previous,!c&&n&&(c=a.toolbar.items[a.toolbar.items.length-1]);while(c&&!c.focus);c?c.focus():(f=1,k(a,CKEDITOR.SHIFT+9),f=0);return!1;case 27:return e.focus(),!1;case 13:case 32:return a.execute(),!1}return!0};
639 k;a.onfocus=function(){e.toolbox.focusCommandExecuted||e.focus()}};if(y.type==CKEDITOR.UI_SEPARATOR)l=g&&y;else{D=!1!==y.canGroup;if(!u){v=CKEDITOR.tools.getNextId();u={id:v,items:[]};x=B.name&&(e.lang.toolbar.toolbarGroups[B.name]||B.name);m.push('\x3cspan id\x3d"',v,'" class\x3d"cke_toolbar'+(r?' cke_toolbar_last"':'"'),x?' aria-labelledby\x3d"'+v+'_label"':"",' role\x3d"toolbar"\x3e');x&&m.push('\x3cspan id\x3d"',v,'_label" class\x3d"cke_voice_label"\x3e',x,"\x3c/span\x3e");m.push('\x3cspan class\x3d"cke_toolbar_start"\x3e\x3c/span\x3e');
646 c.setStyles({position:"fixed","margin-left":"-9999px"});c.setAttributes({"aria-live":"assertive","aria-atomic":"true"});c.setText(a);CKEDITOR.document.getBody().append(c);setTimeout(function(){c.remove()},100)}a._.notificationArea=new la(a);a.showNotification=function(b,c,e){var f,k;"progress"==c?f=e:k=e;b=new CKEDITOR.plugins.notification(a,{message:b,type:c,progress:f,duration:k});b.show();return b};a.on("key",function(b){if(27==b.data.keyCode){var c=a._.notificationArea.notifications;c.length&&
655 b=b.ui.space("top"),l=b.getClientRect(),k=f.getClientRect(),d,h=this._notificationWidth,m=this._notificationMargin;d=CKEDITOR.document.getWindow();var g=d.getScrollPosition(),n=d.getViewPaneSize(),p=CKEDITOR.document.getBody(),t=p.getDocumentPosition(),w=CKEDITOR.tools.cssLength;h&&m||(d=this.element.getChild(0),h=this._notificationWidth=d.getClientRect().width,m=this._notificationMargin=parseInt(d.getComputedStyle("margin-left"),10)+parseInt(d.getComputedStyle("margin-right"),10));b.isVisible()&&
656 l.bottom>c.top&&l.bottom<c.bottom-k.height?f.setStyles({position:"fixed",top:w(l.bottom)}):0<c.top?f.setStyles({position:"absolute",top:w(e.y)}):e.y+c.height-k.height>g.y?f.setStyles({position:"fixed",top:0}):f.setStyles({position:"absolute",top:w(e.y+c.height-k.height)});var q="fixed"==f.getStyle("position")?c.left:"static"!=p.getComputedStyle("position")?e.x-t.x:e.x;c.width<h+m?e.x+h+m>g.x+n.width?a():f.setStyle("left",w(q)):e.x+h+m>g.x+n.width?f.setStyle("left",w(q)):e.x+c.width/2+h/2+m>g.x+n.width?
658 b)}function f(b){function c(){var a=b.editable();if(CKEDITOR.plugins.clipboard.isCustomCopyCutSupported){var d=function(a){b.readOnly&&"cut"==a.name||D.initPasteDataTransfer(a,b);a.data.preventDefault()};a.on("copy",d);a.on("cut",d);a.on("cut",function(){b.readOnly||b.extractSelectedHtml()},null,null,999)}a.on(D.mainPasteEvent,function(a){"beforepaste"==D.mainPasteEvent&&C||z(a)});"beforepaste"==D.mainPasteEvent&&(a.on("paste",function(a){F||(f(),a.data.preventDefault(),z(a),k("paste"))}),a.on("contextmenu",
660 var c=this.type;if(CKEDITOR.env.ie)a=k(c);else try{a=b.document.$.execCommand(c,!1,null)}catch(d){a=!1}a||b.showNotification(b.lang.clipboard[this.type+"Error"]);return a}}}function e(){return{canUndo:!1,async:!0,fakeKeystroke:CKEDITOR.CTRL+86,exec:function(b,c){function d(c,g){g="undefined"!==typeof g?g:!0;c?(c.method="paste",c.dataTransfer||(c.dataTransfer=D.initPasteDataTransfer()),a(b,c,g)):f&&b.showNotification(k,"info",b.config.clipboard_notificationDuration);b.fire("afterCommandExec",{name:"paste",
661 command:e,returnValue:!!c})}c="undefined"!==typeof c&&null!==c?c:{};var e=this,f="undefined"!==typeof c.notification?c.notification:!0,g=c.type,h=CKEDITOR.tools.keystrokeToString(b.lang.common.keyboard,b.getCommandKeystroke(this)),k="string"===typeof f?f:b.lang.clipboard.pasteNotification.replace(/%1/,'\x3ckbd aria-label\x3d"'+h.aria+'"\x3e'+h.display+"\x3c/kbd\x3e"),h="string"===typeof c?c:c.dataValue;g?b._.nextPasteType=g:delete b._.nextPasteType;"string"===typeof h?d({dataValue:h}):b.getClipboardData(d)}}}
662 function f(){F=1;setTimeout(function(){F=0},100)}function h(){C=1;setTimeout(function(){C=0},10)}function k(a){var c=b.document,d=c.getBody(),e=!1,f=function(){e=!0};d.on(a,f);7<CKEDITOR.env.version?c.$.execCommand(a):c.$.selection.createRange().execCommand(a);d.removeListener(a,f);return e}function m(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var a=b.getSelection(),c,d,e;a.getType()==CKEDITOR.SELECTION_ELEMENT&&(c=a.getSelectedElement())&&(d=a.getRanges()[0],e=b.document.createText(""),e.insertBefore(c),
663 d.setStartBefore(e),d.setEndAfter(c),a.selectRanges([d]),setTimeout(function(){c.getParent()&&(e.remove(),a.selectElement(c))},0))}}function l(a,c){var d=b.document,e=b.editable(),f=function(a){a.cancel()},h;if(!d.getById("cke_pastebin")){var k=b.getSelection(),m=k.createBookmarks();CKEDITOR.env.ie&&k.root.fire("selectionchange");var n=new CKEDITOR.dom.element(!CKEDITOR.env.webkit&&!e.is("body")||CKEDITOR.env.ie?"div":"body",d);n.setAttributes({id:"cke_pastebin","data-cke-temp":"1"});var r=0,d=d.getWindow();
666 (CKEDITOR.document.getBody().$.scrollTop=u);h&&h.removeListener();CKEDITOR.env.ie&&e.focus();k.selectBookmarks(m);n.remove();var a;CKEDITOR.env.webkit&&(a=n.getFirst())&&a.is&&a.hasClass("Apple-style-span")&&(n=a);b.removeListener("selectionChange",f);c(n.getHtml())},0)}}function B(){if("paste"==D.mainPasteEvent)return b.fire("beforePaste",{type:"auto",method:"paste"}),!1;b.focus();f();var a=b.focusManager;a.lock();if(b.editable().fire(D.mainPasteEvent)&&!k("paste"))return a.unlock(),!1;a.unlock();
669 return a.getType()==CKEDITOR.SELECTION_NONE||1==c.length&&c[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var D=CKEDITOR.plugins.clipboard,C=0,F=0,E=0;(function(){b.on("key",r);b.on("contentDom",c);b.on("selectionChange",function(a){E=a.data.selection.getRanges()[0].checkReadOnly();A()});b.contextMenu&&b.contextMenu.addListener(function(a,b){E=b.getRanges()[0].checkReadOnly();return{cut:y("cut"),copy:y("copy"),paste:y("paste")}})})();(function(){function a(c,d,e,f,h){var k=b.lang.clipboard[d];
670 b.addCommand(d,e);b.ui.addButton&&b.ui.addButton(c,{label:k,command:d,toolbar:"clipboard,"+f});b.addMenuItems&&b.addMenuItem(d,{label:k,command:d,group:"clipboard",order:h})}a("Cut","cut",d("cut"),10,1);a("Copy","copy",d("copy"),20,4);a("Paste","paste",e(),30,8)})();b.getClipboardData=function(a,c){function d(a){a.removeListener();a.cancel();c(a.data)}c||(c=a,a=null);b.on("paste",d,null,null,0);!1===B()&&(b.removeListener("paste",d),c(null))}}function b(a){if(CKEDITOR.env.webkit){if(!a.match(/^[^<]*$/g)&&
673 b=b.replace(/<\/?div>/g,""));CKEDITOR.env.gecko&&a.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(b=b.replace(/^<br><br>$/,"\x3cbr\x3e")),-1<b.indexOf("\x3cbr\x3e\x3cbr\x3e")&&(b="\x3cp\x3e"+b.replace(/(<br>){2,}/g,function(a){return c(a.length/4)})+"\x3c/p\x3e"));return k(a,b)}function e(){function a(){var b={},c;for(c in CKEDITOR.dtd)"$"!=c.charAt(0)&&"div"!=c&&"span"!=c&&(b[c]=1);return b}var b={};return{get:function(c){return"plain-text"==c?b.plainText||(b.plainText=new CKEDITOR.filter("br")):
674 "semantic-content"==c?((c=b.semanticContent)||(c=new CKEDITOR.filter,c.allow({$1:{elements:a(),attributes:!0,styles:!1,classes:!1}}),c=b.semanticContent=c),c):c?new CKEDITOR.filter(c):null}}}function l(a,b,c){b=CKEDITOR.htmlParser.fragment.fromHtml(b);var d=new CKEDITOR.htmlParser.basicWriter;c.applyTo(b,!0,!1,a.activeEnterMode);b.writeHtml(d);return d.getHtml()}function k(a,b){a.enterMode==CKEDITOR.ENTER_BR?b=b.replace(/(<\/p><p>)+/g,function(a){return CKEDITOR.tools.repeat("\x3cbr\x3e",a.length/
676 function e(d,f){d.select();a(b,{dataTransfer:f,method:"drop"},1);c.resetDragDataTransfer()}function f(a,c,d){var e={$:a.data.$,target:a.data.getTarget()};c&&(e.dragRange=c);d&&(e.dropRange=d);!1===b.fire(a.name,e)&&a.data.preventDefault()}function h(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()}var k=b.editable(),m=CKEDITOR.plugins.clipboard.getDropTarget(b),l=b.ui.space("top"),B=b.ui.space("bottom");c.preventDefaultDropOnElement(l);c.preventDefaultDropOnElement(B);
677 k.attachListener(m,"dragstart",f);k.attachListener(b,"dragstart",c.resetDragDataTransfer,c,null,1);k.attachListener(b,"dragstart",function(a){c.initDragDataTransfer(a,b)},null,null,2);k.attachListener(b,"dragstart",function(){var a=c.dragRange=b.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(c.dragStartContainerChildCount=a?h(a.startContainer):null,c.dragEndContainerChildCount=a?h(a.endContainer):null)},null,null,100);k.attachListener(m,"dragend",f);k.attachListener(b,"dragend",
678 c.initDragDataTransfer,c,null,1);k.attachListener(b,"dragend",c.resetDragDataTransfer,c,null,100);k.attachListener(m,"dragover",function(a){if(CKEDITOR.env.edge)a.data.preventDefault();else{var b=a.data.getTarget();b&&b.is&&b.is("html")?a.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&a.data.$.dataTransfer.types.contains("Files")&&a.data.preventDefault()}});k.attachListener(m,"drop",function(a){if(!a.data.$.defaultPrevented){a.data.preventDefault();var d=a.data.getTarget();
679 if(!d.isReadOnly()||d.type==CKEDITOR.NODE_ELEMENT&&d.is("html")){var d=c.getRangeAtDropPosition(a,b),e=c.dragRange;d&&f(a,e,d)}}},null,null,9999);k.attachListener(b,"drop",c.initDragDataTransfer,c,null,1);k.attachListener(b,"drop",function(a){if(a=a.data){var f=a.dropRange,h=a.dragRange,k=a.dataTransfer;k.getTransferType(b)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout(function(){c.internalDrop(h,f,k,b)},0):k.getTransferType(b)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?d(h,f,k):e(f,k)}},null,null,9999)})}
680 CKEDITOR.plugins.add("clipboard",{requires:"notification",init:function(a){var d,k=e();a.config.forcePasteAsPlainText?d="plain-text":a.config.pasteFilter?d=a.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in a.config||(d="semantic-content");a.pasteFilter=k.get(d);f(a);h(a);if(CKEDITOR.env.gecko){var m=["image/png","image/jpeg","image/gif"],w;a.on("paste",function(b){var c=b.data,d=c.dataTransfer;if(!c.dataValue&&"paste"==c.method&&d&&1==d.getFilesCount()&&w!=d.id&&(d=d.getFile(0),-1!=CKEDITOR.tools.indexOf(m,
685 h="html"==e||"html"==d.preSniffing?"html":b(f);delete a._.nextPasteType;"htmlifiedtext"==h&&(f=c(a.config,f));"text"==e&&"html"==h?f=l(a,f,k.get("plain-text")):n==CKEDITOR.DATA_TRANSFER_EXTERNAL&&a.pasteFilter&&!d.dontFilter&&(f=l(a,f,a.pasteFilter));d.startsWithEOL&&(f='\x3cbr data-cke-eol\x3d"1"\x3e'+f);d.endsWithEOL&&(f+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==e&&(e="html"==h||"html"==m?"html":"text");d.type=e;d.dataValue=f;delete d.preSniffing;delete d.startsWithEOL;delete d.endsWithEOL},null,
689 d||a.endContainer.getParent().equals(c)&&a.endContainer.getIndex()<d?!0:!1},internalDrop:function(b,c,d,e){var f=CKEDITOR.plugins.clipboard,h=e.editable(),k,m;e.fire("saveSnapshot");e.fire("lockSnapshot",{dontUpdate:1});CKEDITOR.env.ie&&10>CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(b,c,f.dragStartContainerChildCount,f.dragEndContainerChildCount);(m=this.isDropRangeAffectedByDragRange(b,c))||(k=b.createBookmark(!1));f=c.clone().createBookmark(!1);m&&(k=b.createBookmark(!1));b=k.startNode;c=
690 k.endNode;m=f.startNode;c&&b.getPosition(m)&CKEDITOR.POSITION_PRECEDING&&c.getPosition(m)&CKEDITOR.POSITION_FOLLOWING&&m.insertBefore(b);b=e.createRange();b.moveToBookmark(k);h.extractHtmlFromRange(b,1);c=e.createRange();c.moveToBookmark(f);a(e,{dataTransfer:d,method:"drop",range:c},1);e.fire("unlockSnapshot")},getRangeAtDropPosition:function(a,b){var c=a.data.$,d=c.clientX,e=c.clientY,f=b.getSelection(!0).getRanges()[0],h=b.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint&&
691 b.document.$.caretRangeFromPoint(d,e))c=b.document.$.caretRangeFromPoint(d,e),h.setStart(CKEDITOR.dom.node(c.startContainer),c.startOffset),h.collapse(!0);else if(c.rangeParent)h.setStart(CKEDITOR.dom.node(c.rangeParent),c.rangeOffset),h.collapse(!0);else{if(CKEDITOR.env.ie&&8<CKEDITOR.env.version&&f&&b.editable().hasFocus)return f;if(document.body.createTextRange){b.focus();c=b.document.getBody().$.createTextRange();try{for(var k=!1,m=0;20>m&&!k;m++){if(!k)try{c.moveToPoint(d,e-m),k=!0}catch(l){}if(!k)try{c.moveToPoint(d,
692 e+m),k=!0}catch(r){}}if(k){var z="cke-temp-"+(new Date).getTime();c.pasteHTML('\x3cspan id\x3d"'+z+'"\x3e​\x3c/span\x3e');var A=b.document.getById(z);h.moveToPosition(A,CKEDITOR.POSITION_BEFORE_START);A.remove()}else{var y=b.document.$.elementFromPoint(d,e),D=new CKEDITOR.dom.element(y),C;if(D.equals(b.editable())||"html"==D.getName())return f&&f.startContainer&&!f.startContainer.equals(b.editable())?f:null;C=D.getClientRect();d<C.left?h.setStartAt(D,CKEDITOR.POSITION_AFTER_START):h.setStartAt(D,
702 e=this._.panelDefinition.block,l=c.parent||CKEDITOR.document.getBody(),k=this._.panel=new CKEDITOR.ui.floatPanel(a,l,c),c=k.addBlock(b.id,e),d=this;k.onShow=function(){d.className&&this.element.addClass(d.className+"_panel");d.setState(CKEDITOR.TRISTATE_ON);b.on=1;d.editorFocus&&a.focus();if(d.onOpen)d.onOpen()};k.onHide=function(c){d.className&&this.element.getFirst().removeClass(d.className+"_panel");d.setState(d.modes&&d.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);b.on=0;if(!c&&
703 d.onClose)d.onClose()};k.onEscape=function(){k.hide(1);d.document.getById(b.id).focus()};if(this.onBlock)this.onBlock(k,c);c.onHide=function(){b.on=0;d.setState(CKEDITOR.TRISTATE_OFF)}}}}})},beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_PANELBUTTON,CKEDITOR.ui.panelButton.handler)}}),CKEDITOR.UI_PANELBUTTON="panelbutton",function(){CKEDITOR.plugins.add("panel",{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_PANEL,CKEDITOR.ui.panel.handler)}});CKEDITOR.UI_PANEL="panel";CKEDITOR.ui.panel=function(a,
708 dir:c.lang.dir,cls:this.className,frame:"",env:CKEDITOR.env.cssClass,"z-index":c.config.baseFloatZIndex+1};if(this.isFramed){var k=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())":"";l.frame=f.output({id:this.id+"_frame",src:k})}k=a.output(l);e&&e.push(k);return k},addBlock:function(a,b){b=this._.blocks[a]=b instanceof CKEDITOR.ui.panel.block?b:new CKEDITOR.ui.panel.block(this.getHolderElement(),
711 a),CKEDITOR.env.webkit&&a.getDocument().getWindow().focus(),a.focus(),this.onMark&&this.onMark(a))},markFirstDisplayed:function(a){for(var b=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&"none"==a.getStyle("display")},f=this._.getItems(),k,d,h=f.count()-1;0<=h;h--)if(k=f.getItem(h),k.getAscendant(b)||(d=k,this._.focusIndex=h),"true"==k.getAttribute("aria-selected")){d=k;this._.focusIndex=h;break}d&&(a&&a(),CKEDITOR.env.webkit&&d.getDocument().getWindow().focus(),d.focus(),this.onMark&&this.onMark(d))},
712 getItems:function(){return this.element.getElementsByTag("a")}},proto:{show:function(){this.element.setStyle("display","")},hide:function(){this.onHide&&!0===this.onHide.call(this)||this.element.setStyle("display","none")},onKeyDown:function(a,b){var f=this.keys[a];switch(f){case "next":for(var k=this._.focusIndex,f=this.element.getElementsByTag("a"),d;d=f.getItem(++k);)if(d.getAttribute("_cke_focus")&&d.$.offsetWidth){this._.focusIndex=k;d.focus();break}return d||b?!1:(this._.focusIndex=-1,this.onKeyDown(a,
713 1));case "prev":k=this._.focusIndex;for(f=this.element.getElementsByTag("a");0<k&&(d=f.getItem(--k));){if(d.getAttribute("_cke_focus")&&d.$.offsetWidth){this._.focusIndex=k;d.focus();break}d=null}return d||b?!1:(this._.focusIndex=f.count(),this.onKeyDown(a,1));case "click":case "mouseup":return k=this._.focusIndex,(d=0<=k&&this.element.getElementsByTag("a").getItem(k))&&(d.$[f]?d.$[f]():d.$["on"+f]()),!1}return!0}}})}(),CKEDITOR.plugins.add("floatpanel",{requires:"panel"}),function(){function a(a,
714 c,e,l,k){k=CKEDITOR.tools.genKey(c.getUniqueId(),e.getUniqueId(),a.lang.dir,a.uiColor||"",l.css||"",k||"");var d=f[k];d||(d=f[k]=new CKEDITOR.ui.panel(c,l),d.element=e.append(CKEDITOR.dom.element.createFromHtml(d.render(a),c)),d.element.setStyles({display:"none",position:"absolute"}));return d}var f={};CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(b,c,e,f){function k(){g.hide()}e.forceIFrame=1;e.toolbarRelated&&b.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(c=CKEDITOR.document.getById("cke_"+
715 b.name));var d=c.getDocument();f=a(b,d,c,e,f||0);var h=f.element,m=h.getFirst(),g=this;h.disableContextMenu();this.element=h;this._={editor:b,panel:f,parentElement:c,definition:e,document:d,iframe:m,children:[],dir:b.lang.dir,showBlockParams:null};b.on("mode",k);b.on("resize",k);d.getWindow().on("resize",function(){this.reposition()},this)},proto:{addBlock:function(a,c){return this._.panel.addBlock(a,c)},addListBlock:function(a,c){return this._.panel.addListBlock(a,c)},getBlock:function(a){return this._.panel.getBlock(a)},
716 showBlock:function(a,c,e,f,k,d){var h=this._.panel,m=h.showBlock(a);this._.showBlockParams=[].slice.call(arguments);this.allowBlur(!1);var g=this._.editor.editable();this._.returnFocus=g.hasFocus?g:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);this._.hideTimeout=0;var n=this.element,g=this._.iframe,g=CKEDITOR.env.ie&&!CKEDITOR.env.edge?g:new CKEDITOR.dom.window(g.$.contentWindow),p=n.getDocument(),t=this._.parentElement.getPositionedAncestor(),w=c.getDocumentPosition(p),p=t?t.getDocumentPosition(p):
717 {x:0,y:0},q="rtl"==this._.dir,v=w.x+(f||0)-p.x,u=w.y+(k||0)-p.y;!q||1!=e&&4!=e?q||2!=e&&3!=e||(v+=c.$.offsetWidth-1):v+=c.$.offsetWidth;if(3==e||4==e)u+=c.$.offsetHeight-1;this._.panel._.offsetParentId=c.getId();n.setStyles({top:u+"px",left:0,display:""});n.setOpacity(0);n.getFirst().removeStyle("width");this._.editor.focusManager.add(g);this._.blurSet||(CKEDITOR.event.useCapture=!0,g.on("blur",function(a){function b(){delete this._.returnFocus;this.hide()}this.allowBlur()&&a.data.getPhase()==CKEDITOR.EVENT_PHASE_AT_TARGET&&
721 a.top<e&&(u=c>e?u-e:b.height>e?u-a.bottom+b.height:u-a.top);CKEDITOR.env.ie&&(b=a=new CKEDITOR.dom.element(n.$.offsetParent),"html"==b.getName()&&(b=b.getDocument().getBody()),"rtl"==b.getComputedStyle("direction")&&(v=CKEDITOR.env.ie8Compat?v-2*n.getDocument().getDocumentElement().$.scrollLeft:v-(a.$.scrollWidth-a.$.clientWidth)));var a=n.getFirst(),k;(k=a.getCustomData("activePanel"))&&k.onHide&&k.onHide.call(this,1);a.setCustomData("activePanel",this);n.setStyles({top:u+"px",left:v+"px"});n.setOpacity(1);
725 void 0!==a&&(c.allowBlur=a);return c.allowBlur},showAsChild:function(a,c,e,f,k,d){if(this._.activeChild!=a||a._.panel._.offsetParentId!=e.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(c,e,f,k,d),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){a.element.getChild(0).$.style.cssText+=""},100)},hideChild:function(a){var c=
727 {label:f,title:f,modes:{wysiwyg:1},editorFocus:0,toolbar:"colors,"+h,allowedContent:w,requiredContent:w,contentTransformations:t.contentTransformations,panel:{css:CKEDITOR.skin.getPath("editor"),attributes:{role:"listbox","aria-label":k.panelTitle}},onBlock:function(c,e){v=e;e.autoSize=!0;e.element.addClass("cke_colorblock");e.element.setHtml(b(c,d,q));e.element.getDocument().getBody().setStyle("overflow","hidden");CKEDITOR.ui.fire("ready",this);var f=e.keys,h="rtl"==a.lang.dir;f[h?37:39]="next";
729 this._.panel._.iframe.getFrameDocument().getById(q).setStyle("background-color",f);if(c=b&&b.getRanges()[0]){for(var b=new CKEDITOR.dom.walker(c),h=c.collapsed?c.startContainer:b.next(),c="";h;){h.type===CKEDITOR.NODE_TEXT&&(h=h.getParent());h=e(h.getComputedStyle("back"==d?"background-color":"color"));c=c||h;if(c!==h){c="";break}h=b.next()}b=c;c=v._.getItems();for(h=0;h<c.count();h++){var k=c.getItem(h);k.removeAttribute("aria-selected");b&&b==e(k.getAttribute("data-value"))&&k.setAttribute("aria-selected",
731 a.removeStyle(new CKEDITOR.style(l["colorButton_"+e+"Style"],{color:"inherit"}));if(d){var g=l["colorButton_"+e+"Style"];g.childRule="back"==e?function(a){return c(a)}:function(a){return!(a.is("a")||a.getElementsByTag("a").count())||c(a)};a.applyStyle(new CKEDITOR.style(g,{color:d}))}a.fire("saveSnapshot")}});!1!==l.colorButton_enableAutomatic&&f.push('\x3ca class\x3d"cke_colorauto" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',k.auto,'" onclick\x3d"CKEDITOR.tools.callFunction(',u,",null,'",d,"');return false;\" href\x3d\"javascript:void('",
732 k.auto,'\')" role\x3d"option" aria-posinset\x3d"1" aria-setsize\x3d"',v,'"\x3e\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e\x3ctr\x3e\x3ctd colspan\x3d"'+w+'" align\x3d"center"\x3e\x3cspan class\x3d"cke_colorbox" id\x3d"',e,'"\x3e\x3c/span\x3e',k.auto,"\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/a\x3e");f.push('\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e');for(e=0;e<h.length;e++){0===e%w&&f.push("\x3c/tr\x3e\x3ctr\x3e");
734 '"\x3e\x3c/span\x3e\x3c/a\x3e\x3c/td\x3e')}q&&f.push('\x3c/tr\x3e\x3ctr\x3e\x3ctd colspan\x3d"'+w+'" align\x3d"center"\x3e\x3ca class\x3d"cke_colormore" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',k.more,'" onclick\x3d"CKEDITOR.tools.callFunction(',u,",'?','",d,"');return false;\" href\x3d\"javascript:void('",k.more,"')\"",' role\x3d"option" aria-posinset\x3d"',v,'" aria-setsize\x3d"',v,'"\x3e',k.more,"\x3c/a\x3e\x3c/td\x3e");f.push("\x3c/tr\x3e\x3c/table\x3e");return f.join("")}function c(a){return"false"==
735 a.getAttribute("contentEditable")||a.getAttribute("data-nostyle")}function e(a){return CKEDITOR.tools.convertRgbToHex(a||"").replace(/#/,"").toLowerCase()}var l=a.config,k=a.lang.colorbutton;if(!CKEDITOR.env.hc){f("TextColor","fore",k.textColorTitle,10,{contentTransformations:[[{element:"font",check:"span{color}",left:function(a){return!!a.attributes.color},right:function(a){a.name="span";a.attributes.color&&(a.styles.color=a.attributes.color);delete a.attributes.color}}]]});var d={},h=a.config.colorButton_normalizeBackground;
736 if(void 0===h||h)d.contentTransformations=[[{element:"span",left:function(a){var b=CKEDITOR.tools;if("span"!=a.name||!a.styles||!a.styles.background)return!1;a=b.style.parse.background(a.styles.background);return a.color&&1===b.objectKeys(a).length},right:function(b){var c=(new CKEDITOR.style(a.config.colorButton_backStyle,{color:b.styles.background})).getDefinition();b.name=c.element;b.styles=c.styles;b.attributes=c.attributes||{};return b}}]];f("BGColor","back",k.bgColorTitle,20,d)}}}),CKEDITOR.config.colorButton_colors=
753 c){return a[c?"getPrevious":"getNext"](function(a){return a.type!==CKEDITOR.NODE_COMMENT})}function c(a){return a.type==CKEDITOR.NODE_ELEMENT?(a=a.getHtml().replace(/<span.*?>&nbsp;<\/span>/g,""),a.replace(/<.*?>/g,"")):a.getText()}function f(a,g){var k=a,l=/\s/g,r="p br ol ul li td th div caption body".split(" "),n=!1,q=!1,p,w;do{for(p=b(k,g);!p&&k.getParent();){k=k.getParent();if(-1!==e(r,k.getName())){q=n=!0;break}p=b(k,g)}if(p&&p.getName&&-1!==e(r,p.getName())){n=!0;break}k=p}while(k&&k.getStyle&&
754 ("none"==k.getStyle("display")||!k.getText()));for(k||(k=a);k.type!==CKEDITOR.NODE_TEXT;)k=!n||g||q?k.getChild(0):k.getChild(k.getChildCount()-1);for(r=c(k);null!=(q=l.exec(r))&&(w=q.index,g););if("number"!==typeof w&&!n)return f(k,g);if(n)g?w=0:(l=/([\.\b]*$)/,w=(q=l.exec(r))?q.index:r.length);else if(g&&(w+=1,w>r.length))return f(k);return{node:k,offset:w}}var g=/\b\w+\b/ig,l,p,t,w,q;t=w=q=a.startContainer;for(l=c(t);null!=(p=g.exec(l));)if(p.index+p[0].length>=a.startOffset)return a=p.index,g=
778 k=(new CKEDITOR.dom.elementPath(a.getTarget(),c.editable())).contains(function(a){return a.hasAttribute("contenteditable")},!0);k&&"false"==k.getAttribute("contenteditable")&&c.getSelection().fake(k)}var k=a.getTarget().getDocument(),d=a.getTarget().getDocument().getDocumentElement(),c=!k.equals(CKEDITOR.document),k=k.getWindow().getScrollPosition(),h=c?a.$.clientX:a.$.pageX||k.x+a.$.clientX,m=c?a.$.clientY:a.$.pageY||k.y+a.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(d,null,h,m)},CKEDITOR.env.ie?
781 this.getValue();f?a.setAttribute(b,f):a.removeAttribute(b,f)}}var b={id:1,dir:1,classes:1,styles:1};CKEDITOR.plugins.add("dialogadvtab",{requires:"dialog",allowedContent:function(a){a||(a=b);var e=[];a.id&&e.push("id");a.dir&&e.push("dir");var f="";e.length&&(f+="["+e.join(",")+"]");a.classes&&(f+="(*)");a.styles&&(f+="{*}");return f},createAdvancedTab:function(c,e,l){e||(e=b);var k=c.lang.common,d={id:"advanced",label:k.advancedTab,title:k.advancedTab,elements:[{type:"vbox",padding:1,children:[]}]},
782 h=[];if(e.id||e.dir)e.id&&h.push({id:"advId",att:"id",type:"text",requiredContent:l?l+"[id]":null,label:k.id,setup:a,commit:f}),e.dir&&h.push({id:"advLangDir",att:"dir",type:"select",requiredContent:l?l+"[dir]":null,label:k.langDir,"default":"",style:"width:100%",items:[[k.notSet,""],[k.langDirLTR,"ltr"],[k.langDirRTL,"rtl"]],setup:a,commit:f}),d.elements[0].children.push({type:"hbox",widths:["50%","50%"],children:[].concat(h)});if(e.styles||e.classes)h=[],e.styles&&h.push({id:"advStyles",att:"style",
783 type:"text",requiredContent:l?l+"{cke-xyz}":null,label:k.styles,"default":"",validate:CKEDITOR.dialog.validate.inlineStyle(k.invalidInlineStyle),onChange:function(){},getStyle:function(a,b){var c=this.getValue().match(new RegExp("(?:^|;)\\s*"+a+"\\s*:\\s*([^;]*)","i"));return c?c[1]:b},updateStyle:function(a,b){var d=this.getValue(),e=c.document.createElement("span");e.setAttribute("style",d);e.setStyle(a,b);d=CKEDITOR.tools.normalizeCssText(e.getAttribute("style"));this.setValue(d,1)},setup:a,commit:f}),
784 e.classes&&h.push({type:"hbox",widths:["45%","55%"],children:[{id:"advCSSClasses",att:"class",type:"text",requiredContent:l?l+"(cke-xyz)":null,label:k.cssClasses,"default":"",setup:a,commit:f}]}),d.elements[0].children.push({type:"hbox",widths:["50%","50%"],children:[].concat(h)});return d}})}(),function(){CKEDITOR.plugins.add("div",{requires:"dialog",init:function(a){if(!a.blockless){var f=a.lang.div,b="div(*)";CKEDITOR.dialog.isTabEnabled(a,"editdiv","advanced")&&(b+=";div[dir,id,lang,title]{*}");
786 d))&&!d.data("cke-div-added")&&(m.push(d),d.data("cke-div-added"))}for(var f=a.getSelection(),k=f&&f.getRanges(),d,h=f.createBookmarks(),m=[],g=0;g<k.length;g++)d=k[g],d.collapsed?b(f.getStartElement()):(d=new CKEDITOR.dom.walker(d),d.evaluator=b,d.lastForward());for(g=0;g<m.length;g++)m[g].remove(!0);f.selectBookmarks(h)}});a.ui.addButton&&a.ui.addButton("CreateDiv",{label:f.toolbar,command:"creatediv",toolbar:"blocks,50"});a.addMenuItems&&(a.addMenuItems({editdiv:{label:f.edit,command:"editdiv",
788 !a.isReadOnly()},1)}}}(),function(){function a(a,b){function k(b){b=g.list[b];var c;b.equals(a.editable())||"true"==b.getAttribute("contenteditable")?(c=a.createRange(),c.selectNodeContents(b),c=c.select()):(c=a.getSelection(),c.selectElement(b));CKEDITOR.env.ie&&a.fire("selectionChange",{selection:c,path:new CKEDITOR.dom.elementPath(b)});a.focus()}function d(){m&&m.setHtml('\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');delete g.list}var h=a.ui.spaceId("path"),m,g=a._.elementsPath,
789 n=g.idBase;b.html+='\x3cspan id\x3d"'+h+'_label" class\x3d"cke_voice_label"\x3e'+a.lang.elementspath.eleLabel+'\x3c/span\x3e\x3cspan id\x3d"'+h+'" class\x3d"cke_path" role\x3d"group" aria-labelledby\x3d"'+h+'_label"\x3e\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e\x3c/span\x3e';a.on("uiReady",function(){var b=a.ui.space("path");b&&a.focusManager.add(b,1)});g.onClick=k;var p=CKEDITOR.tools.addFunction(k),t=CKEDITOR.tools.addFunction(function(b,c){var d=g.idBase,f;c=new CKEDITOR.dom.event(c);
790 f="rtl"==a.lang.dir;switch(c.getKeystroke()){case f?39:37:case 9:return(f=CKEDITOR.document.getById(d+(b+1)))||(f=CKEDITOR.document.getById(d+"0")),f.focus(),!1;case f?37:39:case CKEDITOR.SHIFT+9:return(f=CKEDITOR.document.getById(d+(b-1)))||(f=CKEDITOR.document.getById(d+(g.list.length-1))),f.focus(),!1;case 27:return a.focus(),!1;case 13:case 32:return k(b),!1}return!0});a.on("selectionChange",function(){for(var b=[],d=g.list=[],f=[],k=g.filters,l=!0,B=a.elementPath().elements,r,z=B.length;z--;){var A=
791 B[z],y=0;r=A.data("cke-display-name")?A.data("cke-display-name"):A.data("cke-real-element-type")?A.data("cke-real-element-type"):A.getName();(l=A.hasAttribute("contenteditable")?"true"==A.getAttribute("contenteditable"):l)||A.hasAttribute("contenteditable")||(y=1);for(var D=0;D<k.length;D++){var C=k[D](A,r);if(!1===C){y=1;break}r=C||r}y||(d.unshift(A),f.unshift(r))}d=d.length;for(k=0;k<d;k++)r=f[k],l=a.lang.elementspath.eleTitle.replace(/%1/,r),r=c.output({id:n+k,label:l,text:r,jsTitle:"javascript:void('"+
792 r+"')",index:k,keyDownFn:t,clickFn:p}),b.unshift(r);m||(m=CKEDITOR.document.getById(h));f=m;f.setHtml(b.join("")+'\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');a.fire("elementsPathUpdate",{space:f})});a.on("readOnly",d);a.on("contentDomUnload",d);a.addCommand("elementsPathFocus",f.toolbarFocus);a.setKeystroke(CKEDITOR.ALT+122,"elementsPathFocus")}var f={toolbarFocus:{editorFocus:!1,readOnly:1,exec:function(a){(a=CKEDITOR.document.getById(a._.elementsPath.idBase+"0"))&&a.focus(CKEDITOR.env.ie||
794 CKEDITOR.plugins.add("elementspath",{init:function(b){b._.elementsPath={idBase:"cke_elementspath_"+CKEDITOR.tools.getNextNumber()+"_",filters:[]};b.on("uiSpace",function(c){"bottom"==c.data.space&&a(b,c.data)})}})}(),function(){function a(a,b,c){c=a.config.forceEnterMode||c;"wysiwyg"==a.mode&&(b||(b=a.activeEnterMode),a.elementPath().isContextFor("p")||(b=CKEDITOR.ENTER_BR,c=1),a.fire("saveSnapshot"),b==CKEDITOR.ENTER_BR?k(a,b,null,c):d(a,b,null,c),a.fire("saveSnapshot"))}function f(a){a=a.getSelection().getRanges(!0);
799 l.moveToElementEditStart(u);l.select();return}}else if(u&&u.is("pre")&&!q){k(a,d,l,p);return}if(w=l.splitBlock(x)){d=w.previousBlock;u=w.nextBlock;v=w.wasStartOfBlock;a=w.wasEndOfBlock;u?(z=u.getParent(),z.is("li")&&(u.breakParent(z),u.move(u.getNext(),1))):d&&(z=d.getParent())&&z.is("li")&&(d.breakParent(z),z=d.getNext(),l.moveToElementEditStart(z),d.move(d.getPrevious()));if(v||a){if(d){if(d.is("li")||!h.test(d.getName())&&!d.is("pre"))B=d.clone()}else u&&(B=u.clone());B?p&&!B.is("li")&&B.renameNode(x):
801 u:B)}else u.is("li")&&(B=l.clone(),B.selectNodeContents(u),B=new CKEDITOR.dom.walker(B),B.evaluator=function(a){return!(e(a)||c(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in CKEDITOR.dtd.$inline&&!(a.getName()in CKEDITOR.dtd.$empty))},(z=B.next())&&z.type==CKEDITOR.NODE_ELEMENT&&z.is("ul","ol")&&(CKEDITOR.env.needsBrFiller?t.createElement("br"):t.createText(" ")).insertBefore(z)),u&&l.moveToElementEditStart(u);l.select();l.scrollIntoView()}}},enterBr:function(a,b,c,e){if(c=c||f(a)){var k=c.document,
802 l=c.checkEndOfBlock(),q=new CKEDITOR.dom.elementPath(a.getSelection().getStartElement()),v=q.block,u=v&&q.block.getName();e||"li"!=u?(!e&&l&&h.test(u)?(l=v.getDirection())?(k=k.createElement("div"),k.setAttribute("dir",l),k.insertAfter(v),c.setStart(k,0)):(k.createElement("br").insertAfter(v),CKEDITOR.env.gecko&&k.createText("").insertAfter(v),c.setStartAt(v.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)):(a="pre"==u&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?
803 k.createText("\r"):k.createElement("br"),c.deleteContents(),c.insertNode(a),CKEDITOR.env.needsBrFiller?(k.createText("").insertAfter(a),l&&(v||q.blockLimit).appendBogus(),a.getNext().$.nodeValue="",c.setStartAt(a.getNext(),CKEDITOR.POSITION_AFTER_START)):c.setStartAt(a,CKEDITOR.POSITION_AFTER_END)),c.collapse(!0),c.select(),c.scrollIntoView()):d(a,b,c,e)}}};var l=CKEDITOR.plugins.enterkey,k=l.enterBr,d=l.enterBlock,h=/^h[1-6]$/}(),function(){function a(a,b){var c={},e=[],l={nbsp:" ",shy:"­",gt:"\x3e",
804 lt:"\x3c",amp:"\x26",apos:"'",quot:'"'};a=a.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(a,d){var f=b?"\x26"+d+";":l[d];c[f]=b?l[d]:"\x26"+d+";";e.push(f);return""});if(!b&&a){a=a.split(",");var k=document.createElement("div"),d;k.innerHTML="\x26"+a.join(";\x26")+";";d=k.innerHTML;k=null;for(k=0;k<d.length;k++){var h=d.charAt(k);c[h]="\x26"+a[k]+";";e.push(h)}}c.regex=e.join(b?"|":"");return c}CKEDITOR.plugins.add("entities",{afterInit:function(f){function b(a){return h[a]}function c(a){return"force"!=
805 e.entities_processNumerical&&k[a]?k[a]:"\x26#"+a.charCodeAt(0)+";"}var e=f.config;if(f=(f=f.dataProcessor)&&f.htmlFilter){var l=[];!1!==e.basicEntities&&l.push("nbsp,gt,lt,amp");e.entities&&(l.length&&l.push("quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,euro"),
807 e.entities_additional&&l.push(e.entities_additional));var k=a(l.join(",")),d=k.regex?"["+k.regex+"]":"a^";delete k.regex;e.entities&&e.entities_processNumerical&&(d="[^ -~]|"+d);var d=new RegExp(d,"g"),h=a("nbsp,gt,lt,amp,shy",!0),m=new RegExp(h.regex,"g");f.addRules({text:function(a){return a.replace(m,b).replace(d,c)}},{applyToAll:!0,excludeNestedEditable:!0})}}})}(),CKEDITOR.config.basicEntities=!0,CKEDITOR.config.entities=!0,CKEDITOR.config.entities_latin=!0,CKEDITOR.config.entities_greek=!0,
809 f)/2,10);c=(c||"location\x3dno,menubar\x3dno,toolbar\x3dno,dependent\x3dyes,minimizable\x3dno,modal\x3dyes,alwaysRaised\x3dyes,resizable\x3dyes,scrollbars\x3dyes")+",width\x3d"+f+",height\x3d"+b+",top\x3d"+e+",left\x3d"+l;var k=window.open("",null,c,!0);if(!k)return!1;try{-1==navigator.userAgent.toLowerCase().indexOf(" chrome/")&&(k.moveTo(l,e),k.resizeTo(f,b)),k.focus(),k.location.href=a}catch(d){window.open(a,null,c,!0)}return!0}}),function(){function a(a,b){var c=[];if(b)for(var d in b)c.push(d+
812 (e.langCode=b.langCode);c.action=a(d.url,e);c.filebrowser=d}function l(a,d,g,k){if(k&&k.length)for(var p,t=k.length;t--;)if(p=k[t],"hbox"!=p.type&&"vbox"!=p.type&&"fieldset"!=p.type||l(a,d,g,p.children),p.filebrowser)if("string"==typeof p.filebrowser&&(p.filebrowser={action:"fileButton"==p.type?"QuickUpload":"Browse",target:p.filebrowser}),"Browse"==p.filebrowser.action){var w=p.filebrowser.url;void 0===w&&(w=a.config["filebrowser"+f(d)+"BrowseUrl"],void 0===w&&(w=a.config.filebrowserBrowseUrl));
814 (a=new CKEDITOR.dom.element("input"),a.setAttributes({name:"ckCsrfToken",type:"hidden"}),b.append(a)),a.setAttribute("value",CKEDITOR.tools.getCsrfToken());return!0}return!1};p.filebrowser.url=w;p.hidden=!1;e(a,g.getContents(p["for"][0]).get(p["for"][1]),p.filebrowser)}}function k(a,b,c){if(-1!==c.indexOf(";")){c=c.split(";");for(var d=0;d<c.length;d++)if(k(a,b,c[d]))return!0;return!1}return(a=a.getContents(b).get(c).filebrowser)&&a.url}function d(a,b){var c=this._.filebrowserSe.getDialog(),d=this._.filebrowserSe["for"],
816 a.on("destroy",function(){CKEDITOR.tools.removeFunction(this._.filebrowserFn)})}});CKEDITOR.on("dialogDefinition",function(a){if(a.editor.plugins.filebrowser)for(var b=a.data.definition,c,d=0;d<b.contents.length;++d)if(c=b.contents[d])l(a.editor,a.data.name,b,c.elements),c.hidden&&c.filebrowser&&(c.hidden=!k(b,c.id,c.filebrowser))})}(),CKEDITOR.plugins.add("find",{requires:"dialog",init:function(a){var f=a.addCommand("find",new CKEDITOR.dialogCommand("find"));f.canUndo=!1;f.readOnly=1;a.addCommand("replace",
825 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(b){var e=b.dataProcessor;(e=e&&e.dataFilter)&&e.addRules({elements:{"cke:object":function(e){var k=e.attributes;if(!(k.classid&&String(k.classid).toLowerCase()||
826 a(e))){for(k=0;k<e.children.length;k++)if("cke:embed"==e.children[k].name){if(!a(e.children[k]))break;return f(b,e)}return null}return f(b,e)},"cke:embed":function(e){return a(e)?f(b,e):null}}},5)}})}(),CKEDITOR.tools.extend(CKEDITOR.config,{flashEmbedTagOnly:!1,flashAddEmbedTag:!0,flashConvertOnEdit:!1}),function(){function a(a){var e=a.config,l=a.fire("uiSpace",{space:"top",html:""}).html,k=function(){function d(a,c,e){h.setStyle(c,b(e));h.setStyle("position",a)}function g(a){var b=l.getDocumentPosition();
829 h.setStyle(d,b(("pin"==m?A:r)+n+("pin"==m?0:"left"==d?B:-B)))):(m="pin",g("pin"),k(d))}}}();if(l){var d=new CKEDITOR.template('\x3cdiv id\x3d"cke_{name}" class\x3d"cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_float cke_{langDir} '+CKEDITOR.env.cssClass+'" dir\x3d"{langDir}" title\x3d"'+(CKEDITOR.env.gecko?" ":"")+'" lang\x3d"{langCode}" role\x3d"application" style\x3d"{style}"'+(a.title?' aria-labelledby\x3d"cke_{name}_arialbl"':" ")+"\x3e"+(a.title?'\x3cspan id\x3d"cke_{name}_arialbl" class\x3d"cke_voice_label"\x3e{voiceLabel}\x3c/span\x3e':
830 " ")+'\x3cdiv class\x3d"cke_inner"\x3e\x3cdiv id\x3d"{topId}" class\x3d"cke_top" role\x3d"presentation"\x3e{content}\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e'),h=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(d.output({content:l,id:a.id,langDir:a.lang.dir,langCode:a.langCode,name:a.name,style:"display:none;z-index:"+(e.baseFloatZIndex-1),topId:a.ui.spaceId("top"),voiceLabel:a.title}))),m=CKEDITOR.tools.eventsBuffer(500,k),g=CKEDITOR.tools.eventsBuffer(100,k);h.unselectable();h.on("mousedown",
831 function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});a.on("focus",function(b){k(b);a.on("change",m.input);f.on("scroll",g.input);f.on("resize",g.input)});a.on("blur",function(){h.hide();a.removeListener("change",m.input);f.removeListener("scroll",g.input);f.removeListener("resize",g.input)});a.on("destroy",function(){f.removeListener("scroll",g.input);f.removeListener("resize",g.input);h.clearCustomData();h.remove()});a.focusManager.hasFocus&&h.show();a.focusManager.add(h,
835 (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,k){var d=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[a]=d;var h;h=CKEDITOR.tools.htmlEncodeAttr(a).replace(c,"\\'");a={id:d,val:h,onclick:CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(k||a),text:b||a};
844 this.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;a.readOnly&&!this.readOnly&&(c=CKEDITOR.TRISTATE_DISABLED);this.setState(c);this.setValue("");c!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}}var l=CKEDITOR.env,k="cke_"+this.id,d=CKEDITOR.tools.addFunction(function(c){p&&(a.unlockSelection(1),p=0);m.execute(c)},this),h=this,m={id:k,combo:this,focus:function(){CKEDITOR.document.getById(k).getChild(1).focus()},execute:function(c){var d=h._;if(d.state!=CKEDITOR.TRISTATE_DISABLED)if(h.createPanel(a),
846 m.onfocus()}),p=0;m.keyDownFn=g;l={id:k,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:l.gecko&&!l.hc?"":(this.title||"").replace("'",""),keydownFn:g,focusFn:n,clickFn:d};f.output(l,c);if(this.onRender)this.onRender();return m},createPanel:function(a){if(!this._.panel){var c=this._.panelDefinition,e=this._.panelDefinition.block,f=c.parent||CKEDITOR.document.getBody(),k="cke_combopanel__"+this.name,d=new CKEDITOR.ui.floatPanel(a,f,c),c=d.addListBlock(this.id,
847 e),h=this;d.onShow=function(){this.element.addClass(k);h.setState(CKEDITOR.TRISTATE_ON);h._.on=1;h.editorFocus&&!a.focusManager.hasFocus&&a.focus();if(h.onOpen)h.onOpen()};d.onHide=function(c){this.element.removeClass(k);h.setState(h.modes&&h.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);h._.on=0;if(!c&&h.onClose)h.onClose()};d.onEscape=function(){d.hide(1)};c.onClick=function(a,b){h.onClick&&h.onClick.call(h,a,b);d.hide()};this._.panel=d;this._.list=c;d.getBlock(this.id).onHide=
850 a}},getState:function(){return this._.state},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,c){this.add(a,CKEDITOR.UI_RICHCOMBO,c)}}(),function(){function a(a,c,e,l,k,d,h,m){var g=a.config,n=new CKEDITOR.style(h),
851 p=k.split(";");k=[];for(var t={},w=0;w<p.length;w++){var q=p[w];if(q){var q=q.split("/"),v={},u=p[w]=q[0];v[e]=k[w]=q[1]||u;t[u]=new CKEDITOR.style(h,v);t[u]._.definition.name=u}else p.splice(w--,1)}a.ui.addRichCombo(c,{label:l.label,title:l.panelTitle,toolbar:"styles,"+m,allowedContent:n,requiredContent:n,contentTransformations:[[{element:"font",check:"span",left:function(a){return!!a.attributes.size||!!a.attributes.align||!!a.attributes.face},right:function(a){var b=" x-small small medium large x-large xx-large 48px".split(" ");
853 t[b].buildPreview(),b)}},onClick:function(c){a.focus();a.fire("saveSnapshot");var d=this.getValue(),e=t[c];if(d&&c!=d){var g=t[d],h=a.getSelection().getRanges()[0];if(h.collapsed){var k=a.elementPath(),m=k.contains(function(a){return g.checkElementRemovable(a)});if(m){var l=h.checkBoundaryOfElement(m,CKEDITOR.START),u=h.checkBoundaryOfElement(m,CKEDITOR.END);if(l&&u){for(l=h.createBookmark();k=m.getFirst();)k.insertBefore(m);m.remove();h.moveToBookmark(l)}else l||u?h.moveToPosition(m,l?CKEDITOR.POSITION_BEFORE_START:
854 CKEDITOR.POSITION_AFTER_END):(h.splitElement(m),h.moveToPosition(m,CKEDITOR.POSITION_AFTER_END)),f(h,k.elements.slice(),m);a.getSelection().selectRanges([h])}}else a.removeStyle(g)}a[d==c?"removeStyle":"applyStyle"](e);a.fire("saveSnapshot")},onRender:function(){a.on("selectionChange",function(c){var e=this.getValue();c=c.data.path.elements;for(var f=0,g;f<c.length;f++){g=c[f];for(var h in t)if(t[h].checkElementMatch(g,!0,a)){h!=e&&this.setValue(h);return}}this.setValue("",d)},this)},refresh:function(){a.activeFilter.check(n)||
858 e={},l=0,k=[],d=0;d<c.length;d++){var h=c[d],m=new CKEDITOR.style(f["format_"+h]);if(!a.filter.customConfig||a.filter.check(m))l++,e[h]=m,e[h]._.enterMode=a.config.enterMode,k.push(m)}0!==l&&a.ui.addRichCombo("Format",{label:b.label,title:b.panelTitle,toolbar:"styles,20",allowedContent:k,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(f.contentsCss),multiSelect:!1,attributes:{"aria-label":b.panelTitle}},init:function(){this.startGroup(b.panelTitle);for(var a in e){var c=b["tag_"+a];this.add(a,
863 l={checkbox:"input",radio:"input",textfield:"input",textarea:"textarea",select:"select",button:"input",form:"form",hiddenfield:"input",imagebutton:"input"},k=function(c,d,h){var k={allowedContent:e[d],requiredContent:l[d]};"form"==d&&(k.context="form");a.addCommand(d,new CKEDITOR.dialogCommand(d,k));a.ui.addButton&&a.ui.addButton(c,{label:f.common[c.charAt(0).toLowerCase()+c.slice(1)],command:d,toolbar:"forms,"+(b+=10)});CKEDITOR.dialog.add(d,h)},d=this.path+"dialogs/";!a.blockless&&k("Form","form",
864 d+"form.js");k("Checkbox","checkbox",d+"checkbox.js");k("Radio","radio",d+"radio.js");k("TextField","textfield",d+"textfield.js");k("Textarea","textarea",d+"textarea.js");k("Select","select",d+"select.js");k("Button","button",d+"button.js");var h=a.plugins.image;h&&!a.plugins.image2&&k("ImageButton","imagebutton",CKEDITOR.plugins.getPath("image")+"dialogs/image.js");k("HiddenField","hiddenfield",d+"hiddenfield.js");a.addMenuItems&&(k={checkbox:{label:f.forms.checkboxAndRadio.checkboxTitle,command:"checkbox",
865 group:"checkbox"},radio:{label:f.forms.checkboxAndRadio.radioTitle,command:"radio",group:"radio"},textfield:{label:f.forms.textfield.title,command:"textfield",group:"textfield"},hiddenfield:{label:f.forms.hidden.title,command:"hiddenfield",group:"hiddenfield"},button:{label:f.forms.button.title,command:"button",group:"button"},select:{label:f.forms.select.title,command:"select",group:"select"},textarea:{label:f.forms.textarea.title,command:"textarea",group:"textarea"}},h&&(k.imagebutton={label:f.image.titleButton,
866 command:"imagebutton",group:"imagebutton"}),!a.blockless&&(k.form={label:f.forms.form.menu,command:"form",group:"form"}),a.addMenuItems(k));a.contextMenu&&(!a.blockless&&a.contextMenu.addListener(function(a,b,c){if((a=c.contains("form",1))&&!a.isReadOnly())return{form:CKEDITOR.TRISTATE_OFF}}),a.contextMenu.addListener(function(a){if(a&&!a.isReadOnly()){var b=a.getName();if("select"==b)return{select:CKEDITOR.TRISTATE_OFF};if("textarea"==b)return{textarea:CKEDITOR.TRISTATE_OFF};if("input"==b){var d=
881 command:"image",group:"image"}});b.contextMenu&&b.contextMenu.addListener(function(c){if(a(b,c))return{image:CKEDITOR.TRISTATE_OFF}})}},afterInit:function(b){function c(c){var l=b.getCommand("justify"+c);if(l){if("left"==c||"right"==c)l.on("exec",function(k){var d=a(b),h;d&&(h=f(d),h==c?(d.removeStyle("float"),c==f(d)&&d.removeAttribute("align")):d.setStyle("float",c),k.cancel())});l.on("refresh",function(k){var d=a(b);d&&(d=f(d),this.setState(d==c?CKEDITOR.TRISTATE_ON:"right"==c||"left"==c?CKEDITOR.TRISTATE_OFF:
882 CKEDITOR.TRISTATE_DISABLED),k.cancel())})}}b.plugins.image2||(c("left"),c("right"),c("center"),c("block"))}})}(),CKEDITOR.config.image_removeLinkByEmptyURL=!0,function(){function a(a,e){var l,k;e.on("refresh",function(a){var c=[f],e;for(e in a.data.states)c.push(a.data.states[e]);this.setState(CKEDITOR.tools.search(c,b)?b:f)},e,null,100);e.on("exec",function(b){l=a.getSelection();k=l.createBookmarks(1);b.data||(b.data={});b.data.done=!1},e,null,0);e.on("exec",function(){a.forceNextSelectionCheck();
883 l.selectBookmarks(k)},e,null,100)}var f=CKEDITOR.TRISTATE_DISABLED,b=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indent",{init:function(b){var e=CKEDITOR.plugins.indent.genericDefinition;a(b,b.addCommand("indent",new e(!0)));a(b,b.addCommand("outdent",new e));b.ui.addButton&&(b.ui.addButton("Indent",{label:b.lang.indent.indent,command:"indent",directional:!0,toolbar:"indent,20"}),b.ui.addButton("Outdent",{label:b.lang.indent.outdent,command:"outdent",directional:!0,toolbar:"indent,10"}));b.on("dirChanged",
889 (b||a.getComputedStyle("direction"))?"margin-left":"margin-right"}var b=CKEDITOR.dtd.$listItem,c=CKEDITOR.dtd.$list,e=CKEDITOR.TRISTATE_DISABLED,l=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentblock",{requires:"indent",init:function(k){function d(){h.specificDefinition.apply(this,arguments);this.allowedContent={"div h1 h2 h3 h4 h5 h6 ol p pre ul":{propertiesOnly:!0,styles:m?null:"margin-left,margin-right",classes:m||null}};this.contentTransformations=[["div: splitMarginShorthand"],["h1: splitMarginShorthand"],
891 d;d.is(b)&&(d=d.getParent());if(this.enterBr||this.getContext(c)){if(m){var h=m,d=d.$.className.match(this.classNameRegex),k=this.isIndent,h=d?k?d[1]!=h.slice(-1):!0:k;return h?l:e}return this.isIndent?l:d?CKEDITOR[0>=(parseInt(d.getStyle(f(d)),10)||0)?"TRISTATE_DISABLED":"TRISTATE_OFF"]:e}return e},exec:function(b){var d=b.getSelection(),d=d&&d.getRanges()[0],e;if(e=b.elementPath().contains(c))a.call(this,e,m);else for(d=d.createIterator(),b=b.config.enterMode,d.enforceRealBlocks=!0,d.enlargeBr=
892 b!=CKEDITOR.ENTER_BR;e=d.getNextParagraph(b==CKEDITOR.ENTER_P?"p":"div");)e.isReadOnly()||a.call(this,e,m);return!0}}}}var h=CKEDITOR.plugins.indent,m=k.config.indentClasses;h.registerCommands(k,{indentblock:new d(k,"indentblock",!0),outdentblock:new d(k,"outdentblock")});CKEDITOR.tools.extend(d.prototype,h.specificDefinition.prototype,{context:{div:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,p:1,pre:1,table:1},classNameRegex:m?new RegExp("(?:^|\\s+)("+m.join("|")+")(?\x3d$|\\s)"):null})}})}(),
893 function(){function a(a){function c(f){for(var h=t.startContainer,l=t.endContainer;h&&!h.getParent().equals(f);)h=h.getParent();for(;l&&!l.getParent().equals(f);)l=l.getParent();if(!h||!l)return!1;for(var q=h,h=[],r=!1;!r;)q.equals(l)&&(r=!0),h.push(q),q=q.getNext();if(1>h.length)return!1;q=f.getParents(!0);for(l=0;l<q.length;l++)if(q[l].getName&&k[q[l].getName()]){f=q[l];break}for(var q=e.isIndent?1:-1,l=h[0],h=h[h.length-1],r=CKEDITOR.plugins.list.listToArray(f,g),z=r[h.getCustomData("listarray_index")].indent,
895 w.push(C)}h&&h.listNode.replace(f);if(w&&w.length)for(l=0;l<w.length;l++){for(C=f=w[l];(C=C.getNext())&&C.is&&C.getName()in k;)CKEDITOR.env.needsNbspFiller&&!f.getFirst(b)&&f.append(t.document.createText(" ")),f.append(C);f.insertAfter(p)}h&&a.fire("contentDomInvalidated");return!0}for(var e=this,g=this.database,k=this.context,l=a.getSelection(),l=(l&&l.getRanges()).createIterator(),t;t=l.getNextRange();){for(var w=t.getCommonAncestor();w&&(w.type!=CKEDITOR.NODE_ELEMENT||!k[w.getName()]);){if(a.editable().equals(w)){w=
896 !1;break}w=w.getParent()}w||(w=t.startPath().contains(k))&&t.setEndAt(w,CKEDITOR.POSITION_BEFORE_END);if(!w){var q=t.getEnclosedNode();q&&q.type==CKEDITOR.NODE_ELEMENT&&q.getName()in k&&(t.setStartAt(q,CKEDITOR.POSITION_AFTER_START),t.setEndAt(q,CKEDITOR.POSITION_BEFORE_END),w=q)}w&&t.startContainer.type==CKEDITOR.NODE_ELEMENT&&t.startContainer.getName()in k&&(q=new CKEDITOR.dom.walker(t),q.evaluator=f,t.startContainer=q.next());w&&t.endContainer.type==CKEDITOR.NODE_ELEMENT&&t.endContainer.getName()in
897 k&&(q=new CKEDITOR.dom.walker(t),q.evaluator=f,t.endContainer=q.previous());if(w)return c(w)}return 0}function f(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is("li")}function b(a){return c(a)&&e(a)}var c=CKEDITOR.dom.walker.whitespaces(!0),e=CKEDITOR.dom.walker.bookmark(!1,!0),l=CKEDITOR.TRISTATE_DISABLED,k=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentlist",{requires:"indent",init:function(b){function c(b){e.specificDefinition.apply(this,arguments);this.requiredContent=["ul","ol"];b.on("key",
898 function(a){if("wysiwyg"==b.mode&&a.data.keyCode==this.indentKey){var c=this.getContext(b.elementPath());!c||this.isIndent&&CKEDITOR.plugins.indentList.firstItemInPath(this.context,b.elementPath(),c)||(b.execCommand(this.relatedGlobal),a.cancel())}},this);this.jobs[this.isIndent?10:30]={refresh:this.isIndent?function(a,b){var c=this.getContext(b),d=CKEDITOR.plugins.indentList.firstItemInPath(this.context,b,c);return c&&this.isIndent&&!d?k:l}:function(a,b){return!this.getContext(b)||this.isIndent?
899 l:k},exec:CKEDITOR.tools.bind(a,this)}}var e=CKEDITOR.plugins.indent;e.registerCommands(b,{indentlist:new c(b,"indentlist",!0),outdentlist:new c(b,"outdentlist")});CKEDITOR.tools.extend(c.prototype,e.specificDefinition.prototype,{context:{ol:1,ul:1}})}});CKEDITOR.plugins.indentList={};CKEDITOR.plugins.indentList.firstItemInPath=function(a,b,c){var e=b.contains(f);c||(c=b.contains(a));return c&&e&&e.equals(c.getFirst(f))}}(),function(){function a(a,b){b=void 0===b||b;var f;if(b)f=a.getComputedStyle("text-align");
900 else{for(;!a.hasAttribute||!a.hasAttribute("align")&&!a.getStyle("text-align");){f=a.getParent();if(!f)break;a=f}f=a.getStyle("text-align")||a.getAttribute("align")||""}f&&(f=f.replace(/(?:-(?:moz|webkit)-)?(?:start|auto)/i,""));!f&&b&&(f="rtl"==a.getComputedStyle("direction")?"right":"left");return f}function f(a,b,f){this.editor=a;this.name=b;this.value=f;this.context="p";b=a.config.justifyClasses;var k=a.config.enterMode==CKEDITOR.ENTER_P?"p":"div";if(b){switch(f){case "left":this.cssClassName=
901 b[0];break;case "center":this.cssClassName=b[1];break;case "right":this.cssClassName=b[2];break;case "justify":this.cssClassName=b[3]}this.cssClassRegex=new RegExp("(?:^|\\s+)(?:"+b.join("|")+")(?\x3d$|\\s)");this.requiredContent=k+"("+this.cssClassName+")"}else this.requiredContent=k+"{text-align}";this.allowedContent={"caption div h1 h2 h3 h4 h5 h6 p pre td th li":{propertiesOnly:!0,styles:this.cssClassName?null:"text-align",classes:this.cssClassName||null}};a.config.enterMode==CKEDITOR.ENTER_BR&&
902 (this.allowedContent.div=!0)}function b(a){var b=a.editor,f=b.createRange();f.setStartBefore(a.data.node);f.setEndAfter(a.data.node);for(var k=new CKEDITOR.dom.walker(f),d;d=k.next();)if(d.type==CKEDITOR.NODE_ELEMENT)if(!d.equals(a.data.node)&&d.getDirection())f.setStartAfter(d),k=new CKEDITOR.dom.walker(f);else{var h=b.config.justifyClasses;h&&(d.hasClass(h[0])?(d.removeClass(h[0]),d.addClass(h[2])):d.hasClass(h[2])&&(d.removeClass(h[2]),d.addClass(h[0])));h=d.getStyle("text-align");"left"==h?d.setStyle("text-align",
903 "right"):"right"==h&&d.setStyle("text-align","left")}}f.prototype={exec:function(b){var f=b.getSelection(),l=b.config.enterMode;if(f){for(var k=f.createBookmarks(),d=f.getRanges(),h=this.cssClassName,m,g,n=b.config.useComputedState,n=void 0===n||n,p=d.length-1;0<=p;p--)for(m=d[p].createIterator(),m.enlargeBr=l!=CKEDITOR.ENTER_BR;g=m.getNextParagraph(l==CKEDITOR.ENTER_P?"p":"div");)if(!g.isReadOnly()){g.removeAttribute("align");g.removeStyle("text-align");var t=h&&(g.$.className=CKEDITOR.tools.ltrim(g.$.className.replace(this.cssClassRegex,
904 ""))),w=this.state==CKEDITOR.TRISTATE_OFF&&(!n||a(g,!0)!=this.value);h?w?g.addClass(h):t||g.removeAttribute("class"):w&&g.setStyle("text-align",this.value)}b.focus();b.forceNextSelectionCheck();f.selectBookmarks(k)}},refresh:function(b,f){var l=f.block||f.blockLimit;this.setState("body"!=l.getName()&&a(l,this.editor.config.useComputedState)==this.value?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)}};CKEDITOR.plugins.add("justify",{init:function(a){if(!a.blockless){var e=new f(a,"justifyleft","left"),
905 l=new f(a,"justifycenter","center"),k=new f(a,"justifyright","right"),d=new f(a,"justifyblock","justify");a.addCommand("justifyleft",e);a.addCommand("justifycenter",l);a.addCommand("justifyright",k);a.addCommand("justifyblock",d);a.ui.addButton&&(a.ui.addButton("JustifyLeft",{label:a.lang.justify.left,command:"justifyleft",toolbar:"align,10"}),a.ui.addButton("JustifyCenter",{label:a.lang.justify.center,command:"justifycenter",toolbar:"align,20"}),a.ui.addButton("JustifyRight",{label:a.lang.justify.right,
908 beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_MENUBUTTON,CKEDITOR.ui.menuButton.handler)}}),CKEDITOR.UI_MENUBUTTON="menubutton","use strict",function(){CKEDITOR.plugins.add("language",{requires:"menubutton",init:function(a){var f=a.config.language_list||["ar:Arabic:rtl","fr:French","es:Spanish"],b=this,c=a.lang.language,e={},l,k,d,h;a.addCommand("language",{allowedContent:"span[!lang,!dir]",requiredContent:"span[lang,dir]",contextSensitive:!0,exec:function(a,b){var c=e["language_"+b];if(c)a[c.style.checkActive(a.elementPath(),
909 a)?"removeStyle":"applyStyle"](c.style)},refresh:function(a){this.setState(b.getCurrentLangElement(a)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)}});for(h=0;h<f.length;h++)l=f[h].split(":"),k=l[0],d="language_"+k,e[d]={label:l[1],langId:k,group:"language",order:h,ltr:"rtl"!=(""+l[2]).toLowerCase(),onClick:function(){a.execCommand("language",this.langId)},role:"menuitemcheckbox"},e[d].style=new CKEDITOR.style({element:"span",attributes:{lang:k,dir:e[d].ltr?"ltr":"rtl"}});e.language_remove={label:c.remove,
919 null:a.createFakeParserElement(b,"cke_anchor","anchor"):null}}});var b=a._.elementsPath&&a._.elementsPath.filters;b&&b.push(function(b,c){if("a"==c&&(CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,b)||b.getAttribute("name")&&(!b.getAttribute("href")||!b.getChildCount())))return"anchor"})}});var e=/^javascript:/,l=/^mailto:([^?]+)(?:\?(.+))?$/,k=/subject=([^;?:@&=$,\/]*)/i,d=/body=([^;?:@&=$,\/]*)/i,h=/^#(.*)$/,m=/^((?:http|https|ftp|news):\/\/)?(.*)$/,g=/^(_(?:self|top|parent|blank))$/,n=/^javascript:void\(location\.href='mailto:'\+String\.fromCharCode\(([^)]+)\)(?:\+'(.*)')?\)$/,
924 "anchor",A.anchor={},A.anchor.name=A.anchor.id=r[1];else if(r=c.match(l)){z=c.match(k);c=c.match(d);A.type="email";var y=A.email={};y.address=r[1];z&&(y.subject=decodeURIComponent(z[1]));c&&(y.body=decodeURIComponent(c[1]))}else c&&(z=c.match(m))&&(A.type="url",A.url={},A.url.protocol=z[1],A.url.url=z[2]);if(b){if(c=b.getAttribute("target"))A.target={type:c.match(g)?c:"frame",name:c};else if(c=(c=b.data("cke-pa-onclick")||b.getAttribute("onclick"))&&c.match(t))for(A.target={type:"popup",name:c[1]};r=
926 h=d.url&&CKEDITOR.tools.trim(d.url.url)||"";g["data-cke-saved-href"]=0===h.indexOf("/")?h:e+h;break;case "anchor":e=d.anchor&&d.anchor.id;g["data-cke-saved-href"]="#"+(d.anchor&&d.anchor.name||e||"");break;case "email":var k=d.email,h=k.address;switch(e){case "":case "encode":var l=encodeURIComponent(k.subject||""),m=encodeURIComponent(k.body||""),k=[];l&&k.push("subject\x3d"+l);m&&k.push("body\x3d"+m);k=k.length?"?"+k.join("\x26"):"";"encode"==e?(e=["javascript:void(location.href\x3d'mailto:'+",
927 f(h)],k&&e.push("+'",a(k),"'"),e.push(")")):e=["mailto:",h,k];break;default:e=h.split("@",2),k.name=e[0],k.domain=e[1],e=["javascript:",b(c,k)]}g["data-cke-saved-href"]=e.join("")}if(d.target)if("popup"==d.target.type){for(var e=["window.open(this.href, '",d.target.name||"","', '"],n="resizable status location toolbar menubar fullscreen scrollbars dependent".split(" "),h=n.length,l=function(a){d.target[a]&&n.push(a+"\x3d"+d.target[a])},k=0;k<h;k++)n[k]+=d.target[n[k]]?"\x3dyes":"\x3dno";l("width");
932 d.remove(1);b.selectBookmarks(c)},requiredContent:"a[name]"};CKEDITOR.tools.extend(CKEDITOR.config,{linkShowAdvancedTab:!0,linkShowTargetTab:!0})}(),function(){function a(a,b,c){function d(c){if(!(!(l=k[c?"getFirst":"getLast"]())||l.is&&l.isBlockBoundary()||!(m=b.root[c?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(!0)))||m.is&&m.isBlockBoundary({br:1})))a.document.createElement("br")[c?"insertBefore":"insertAfter"](l)}for(var e=CKEDITOR.plugins.list.listToArray(b.root,c),f=[],g=0;g<b.contents.length;g++){var h=
933 b.contents[g];(h=h.getAscendant("li",!0))&&!h.getCustomData("list_item_processed")&&(f.push(h),CKEDITOR.dom.element.setMarker(c,h,"list_item_processed",!0))}h=null;for(g=0;g<f.length;g++)h=f[g].getCustomData("listarray_index"),e[h].indent=-1;for(g=h+1;g<e.length;g++)if(e[g].indent>e[g-1].indent+1){f=e[g-1].indent+1-e[g].indent;for(h=e[g].indent;e[g]&&e[g].indent>=h;)e[g].indent+=f,g++;g--}var k=CKEDITOR.plugins.list.arrayToList(e,c,null,a.config.enterMode,b.root.getAttribute("dir")).listNode,l,m;
934 d(!0);d();k.replace(b.root);a.fire("contentDomInvalidated")}function f(a,b){this.name=a;this.context=this.type=b;this.allowedContent=b+" li";this.requiredContent=b}function b(a,b,c,d){for(var e,f;e=a[d?"getLast":"getFirst"](t);)(f=e.getDirection(1))!==b.getDirection(1)&&e.setAttribute("dir",f),e.remove(),c?e[d?"insertBefore":"insertAfter"](c):b.append(e,d)}function c(a){function c(d){var e=a[d?"getPrevious":"getNext"](g);e&&e.type==CKEDITOR.NODE_ELEMENT&&e.is(a.getName())&&(b(a,e,null,!d),a.remove(),
936 z=z.contains(CKEDITOR.dtd.$list);m?(m=m.getBogus())&&m.remove():z&&(m=z.getPrevious(g))&&n(m)&&m.remove();(m=f.getLast())&&m.type==CKEDITOR.NODE_ELEMENT&&m.is("br")&&m.remove();(m=d.startContainer.getChild(d.startOffset))?f.insertBefore(m):d.startContainer.append(f);p&&(f=k(p))&&(l.contains(p)?(b(f,p.getParent(),p),f.remove()):l.append(f));for(;e.checkStartOfBlock()&&e.checkEndOfBlock();){z=e.startPath();f=z.block;if(!f)break;f.is("li")&&(l=f.getParent(),f.equals(l.getLast(g))&&f.equals(l.getFirst(g))&&
937 (f=l));e.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START);f.remove()}e=e.clone();f=a.editable();e.setEndAt(f,CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(e);e.evaluator=function(a){return g(a)&&!n(a)};(e=e.next())&&e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in CKEDITOR.dtd.$list&&c(e);d.moveToBookmark(h);d.select();a.fire("saveSnapshot")}function k(a){return(a=a.getLast(g))&&a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in d?a:null}var d={ol:1,ul:1},h=CKEDITOR.dom.walker.whitespaces(),m=CKEDITOR.dom.walker.bookmark(),
938 g=function(a){return!(h(a)||m(a))},n=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(a,b,c,e,f){if(!d[a.getName()])return[];e||(e=0);c||(c=[]);for(var g=0,h=a.getChildCount();g<h;g++){var k=a.getChild(g);k.type==CKEDITOR.NODE_ELEMENT&&k.getName()in CKEDITOR.dtd.$list&&CKEDITOR.plugins.list.listToArray(k,b,c,e+1);if("li"==k.$.nodeName.toLowerCase()){var l={parent:a,indent:e,element:k,contents:[]};f?l.grandparent=f:(l.grandparent=a.getParent(),l.grandparent&&"li"==l.grandparent.$.nodeName.toLowerCase()&&
939 (l.grandparent=l.grandparent.getParent()));b&&CKEDITOR.dom.element.setMarker(b,k,"listarray_index",c.length);c.push(l);for(var m=0,n=k.getChildCount(),p;m<n;m++)p=k.getChild(m),p.type==CKEDITOR.NODE_ELEMENT&&d[p.getName()]?CKEDITOR.plugins.list.listToArray(p,b,c,e+1,l.grandparent):l.contents.push(p)}}return c},arrayToList:function(a,b,c,e,f){c||(c=0);if(!a||a.length<c+1)return null;for(var h,k=a[c].parent.getDocument(),l=new CKEDITOR.dom.documentFragment(k),n=null,p=c,t=Math.max(a[c].indent,0),C=
941 CKEDITOR.env.needsNbspFiller&&7>=k.$.documentMode&&C.append(k.createText(" ")),C.append(p.listNode),p=p.nextIndex;else if(-1==H.indent&&!c&&h){d[h.getName()]?(C=H.element.clone(!1,!0),F!=h.getDirection(1)&&C.setAttribute("dir",F)):C=new CKEDITOR.dom.documentFragment(k);var n=h.getDirection(1)!=F,L=H.element,N=L.getAttribute("class"),G=L.getAttribute("style"),V=C.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(e!=CKEDITOR.ENTER_BR||n||G||N),J,P=H.contents.length,K;for(h=0;h<P;h++)if(J=H.contents[h],m(J)&&
942 1<P)V?K=J.clone(1,1):C.append(J.clone(1,1));else if(J.type==CKEDITOR.NODE_ELEMENT&&J.isBlockBoundary()){n&&!J.getDirection()&&J.setAttribute("dir",F);E=J;var S=L.getAttribute("style");S&&E.setAttribute("style",S.replace(/([^;])$/,"$1;")+(E.getAttribute("style")||""));N&&J.addClass(N);E=null;K&&(C.append(K),K=null);C.append(J.clone(1,1))}else V?(E||(E=k.createElement(I),C.append(E),n&&E.setAttribute("dir",F)),G&&E.setAttribute("style",G),N&&E.setAttribute("class",N),K&&(E.append(K),K=null),E.append(J.clone(1,
943 1))):C.append(J.clone(1,1));K&&((E||C).append(K),K=null);C.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&p!=a.length-1&&(CKEDITOR.env.needsBrFiller&&(F=C.getLast())&&F.type==CKEDITOR.NODE_ELEMENT&&F.is("br")&&F.remove(),(F=C.getLast(g))&&F.type==CKEDITOR.NODE_ELEMENT&&F.is(CKEDITOR.dtd.$block)||C.append(k.createElement("br")));F=C.$.nodeName.toLowerCase();"div"!=F&&"p"!=F||C.appendBogus();l.append(C);n=null;p++}else return null;E=null;if(a.length<=p||Math.max(a[p].indent,0)<t)break}if(b)for(a=l.getFirst();a;){if(a.type==
944 CKEDITOR.NODE_ELEMENT&&(CKEDITOR.dom.element.clearMarkers(b,a),a.getName()in CKEDITOR.dtd.$listItem&&(c=a,k=f=e=void 0,e=c.getDirection()))){for(f=c.getParent();f&&!(k=f.getDirection());)f=f.getParent();e==k&&c.removeAttribute("dir")}a=a.getNextSourceNode()}return{listNode:l,nextIndex:p}}};var p=/^h[1-6]$/,t=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);f.prototype={exec:function(b){this.refresh(b,b.elementPath());var e=b.config,f=b.getSelection(),h=f&&f.getRanges();if(this.state==CKEDITOR.TRISTATE_OFF){var k=
945 b.editable();if(k.getFirst(g)){var l=1==h.length&&h[0];(e=l&&l.getEnclosedNode())&&e.is&&this.type==e.getName()&&this.setState(CKEDITOR.TRISTATE_ON)}else e.enterMode==CKEDITOR.ENTER_BR?k.appendBogus():h[0].fixBlock(1,e.enterMode==CKEDITOR.ENTER_P?"p":"div"),f.selectRanges(h)}for(var e=f.createBookmarks(!0),k=[],m={},h=h.createIterator(),n=0;(l=h.getNextRange())&&++n;){var A=l.getBoundaryNodes(),y=A.startNode,t=A.endNode;y.type==CKEDITOR.NODE_ELEMENT&&"td"==y.getName()&&l.setStartAt(A.startNode,CKEDITOR.POSITION_AFTER_START);
947 (y={root:F,contents:[A]},k.push(y),CKEDITOR.dom.element.setMarker(m,F,"list_group_object",y));t=1;break}t||(t=C,t.getCustomData("list_group_object_"+n)?t.getCustomData("list_group_object_"+n).contents.push(A):(y={root:t,contents:[A]},CKEDITOR.dom.element.setMarker(m,t,"list_group_object_"+n,y),k.push(y)))}}for(F=[];0<k.length;)if(y=k.shift(),this.state==CKEDITOR.TRISTATE_OFF)if(d[y.root.getName()]){h=b;n=y;y=m;l=F;t=CKEDITOR.plugins.list.listToArray(n.root,y);C=[];for(A=0;A<n.contents.length;A++)E=
953 8==c,p=a.editable(),A=new CKEDITOR.dom.walker(h.clone());A.evaluator=function(a){return g(a)&&!n(a)};A.guard=function(a,b){return!(b&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("table"))};c=h.clone();if(r){var y;(y=m.contains(d))&&h.checkBoundaryOfElement(y,CKEDITOR.START)&&(y=y.getParent())&&y.is("li")&&(y=k(y))?(f=y,y=y.getPrevious(g),c.moveToPosition(y&&n(y)?y:f,CKEDITOR.POSITION_BEFORE_START)):(A.range.setStartAt(p,CKEDITOR.POSITION_AFTER_START),A.range.setEnd(h.startContainer,h.startOffset),(y=A.previous())&&
954 y.type==CKEDITOR.NODE_ELEMENT&&(y.getName()in d||y.is("li"))&&(y.is("li")||(A.range.selectNodeContents(y),A.reset(),A.evaluator=e,y=A.previous()),f=y,c.moveToElementEditEnd(f),c.moveToPosition(c.endPath().block,CKEDITOR.POSITION_BEFORE_END)));if(f)l(a,c,h),b.cancel();else{var t=m.contains(d);t&&h.checkBoundaryOfElement(t,CKEDITOR.START)&&(f=t.getFirst(g),h.checkBoundaryOfElement(f,CKEDITOR.START)&&(y=t.getPrevious(g),k(f)?y&&(h.moveToElementEditEnd(y),h.select()):a.execCommand("outdent"),b.cancel()))}}else if(f=
956 CKEDITOR.POSITION_BEFORE_END),h.endPath().block&&h.moveToPosition(h.endPath().block,CKEDITOR.POSITION_AFTER_START));l(a,c,h);b.cancel()}}else A.range.setEndAt(p,CKEDITOR.POSITION_BEFORE_END),(y=A.next())&&y.type==CKEDITOR.NODE_ELEMENT&&y.is(d)&&(y=y.getFirst(g),m.block&&h.checkStartOfBlock()&&h.checkEndOfBlock()?(m.block.remove(),h.moveToElementEditStart(y),h.select()):k(y)?(h.moveToElementEditStart(y),h.select()):(h=h.clone(),h.moveToElementEditStart(y),l(a,c,h)),b.cancel());setTimeout(function(){a.selectionChange(1)})}}}))}})}(),
960 !0))&&a.editable.contains(b)){var c=k(b);if("true"==c.getAttribute("contenteditable"))return b;if(c.is(a.triggers))return c}return null}function c(a,b,c){r(a,b);r(a,c);a=b.size.bottom;c=c.size.top;return a&&c?0|(a+c)/2:a||c}function e(a,b,c){return b=b[c?"getPrevious":"getNext"](function(b){return b&&b.type==CKEDITOR.NODE_TEXT&&!Z(b)||n(b)&&!p(b)&&!g(a,b)})}function l(a,b,c){return a>b&&a<c}function k(a,b){if(a.data("cke-editable"))return null;for(b||(a=a.getParent());a&&!a.data("cke-editable");){if(a.hasAttribute("contenteditable"))return a;
964 c=a.editable,d=a.trigger,e=d.upper,f=d.lower,g=e||f,h=g.getParent(),k={};this.trigger=d;e&&r(a,e,!0);f&&r(a,f,!0);r(a,h,!0);a.inInlineMode&&z(a,!0);h.equals(c)?(k.left=b.scroll.x,k.right=-b.scroll.x,k.width=""):(k.left=g.size.left-g.size.margin.left+b.scroll.x-(a.inInlineMode?b.editable.left+b.editable.border.left:0),k.width=g.size.outerWidth+g.size.margin.left+g.size.margin.right+b.scroll.x,k.right="");e&&f?k.top=e.size.margin.bottom===f.size.margin.top?0|e.size.bottom+e.size.margin.bottom/2:e.size.margin.bottom<
965 f.size.margin.top?e.size.bottom+e.size.margin.bottom:e.size.bottom+e.size.margin.bottom-f.size.margin.top:e?f||(k.top=e.size.bottom+e.size.margin.bottom):k.top=f.size.top-f.size.margin.top;d.is(P)||l(k.top,b.scroll.y-15,b.scroll.y+5)?(k.top=a.inInlineMode?0:b.scroll.y,this.look(P)):d.is(K)||l(k.top,b.pane.bottom-5,b.pane.bottom+15)?(k.top=a.inInlineMode?b.editable.height+b.editable.padding.top+b.editable.padding.bottom:b.pane.bottom-1,this.look(K)):(a.inInlineMode&&(k.top-=b.editable.top+b.editable.border.top),
966 this.look(S));a.inInlineMode&&(k.top--,k.top+=b.editable.scroll.top,k.left+=b.editable.scroll.left);for(var m in k)k[m]=CKEDITOR.tools.cssLength(k[m]);this.setStyles(k)},look:function(a){if(this.oldLook!=a){for(var b=this.lineChildren.length,c;b--;)(c=this.lineChildren[b]).setAttribute("style",c.base+c.looks[0|a/2]);this.oldLook=a}},wrap:new C("span",a.doc)});for(b=c.lineChildren.length;b--;)c.lineChildren[b].appendTo(c);c.look(S);c.appendTo(c.wrap);c.unselectable();c.lineChildren[0].on("mouseup",
967 function(b){c.detach();h(a,function(b){var c=a.line.trigger;b[c.is(N)?"insertBefore":"insertAfter"](c.is(N)?c.lower:c.upper)},!0);a.editor.focus();E.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();b.data.preventDefault(!0)});c.on("mousedown",function(a){a.data.preventDefault(!0)});a.line=c}function h(a,b,c){var d=new CKEDITOR.dom.range(a.doc),e=a.editor,f;E.ie&&a.enterMode==CKEDITOR.ENTER_BR?f=a.doc.createText(O):(f=(f=k(a.element,!0))&&f.data("cke-enter-mode")||a.enterMode,f=new C(L[f],
969 "data-cke-magicline-dir":!!c});a.lastCmdDirection=!!c});E.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();a.line.detach()}return function(f){f=f.getSelection().getStartElement();var g;f=f.getAscendant(R,1);if(!q(a,f)&&f&&!f.equals(a.editable)&&!f.contains(a.editable)){(g=k(f))&&"false"==g.getAttribute("contenteditable")&&(f=g);a.element=f;g=e(a,f,!c);var h;n(g)&&g.is(a.triggers)&&g.is(Q)&&(!e(a,g,!c)||(h=e(a,g,!c))&&n(h)&&h.is(a.triggers))?d(g):(h=b(a,f),n(h)&&(e(a,h,!c)?(f=e(a,h,!c))&&
973 a.mouse,d=a.view,g=a.triggerOffset,h=b(a);if(!h)return null;r(a,h);var g=Math.min(g,0|h.size.outerHeight/2),k=[],m,q;if(l(c.y,h.size.top-1,h.size.top+g))q=!1;else if(l(c.y,h.size.bottom-g,h.size.bottom+1))q=!0;else return null;if(p(h)||v(a,h,q)||h.getParent().is(ca))return null;var u=e(a,h,!q);if(u){if(u&&u.type==CKEDITOR.NODE_TEXT)return null;if(n(u)){if(p(u)||!w(a,u)||u.getParent().is(ca))return null;k=[u,h][q?"reverse":"concat"]().concat([V,J])}}else h.equals(a.editable[q?"getLast":"getFirst"](a.isRelevant))?
974 (z(a),q&&l(c.y,h.size.bottom-g,d.pane.height)&&l(h.size.bottom,d.pane.height-g,d.pane.height)?m=K:l(c.y,0,h.size.top+g)&&(m=P)):m=S,k=[null,h][q?"reverse":"concat"]().concat([q?G:N,J,m,h.equals(a.editable[q?"getLast":"getFirst"](a.isRelevant))?q?K:P:S]);return 0 in k?new f(k):null}function B(a,b,c,d){for(var f=b.getDocumentPosition(),e={},g={},h={},k={},l=ba.length;l--;)e[ba[l]]=parseInt(b.getComputedStyle.call(b,"border-"+ba[l]+"-width"),10)||0,h[ba[l]]=parseInt(b.getComputedStyle.call(b,"padding-"+
975 ba[l]),10)||0,g[ba[l]]=parseInt(b.getComputedStyle.call(b,"margin-"+ba[l]),10)||0;c&&!d||A(a,d);k.top=f.y-(c?0:a.view.scroll.y);k.left=f.x-(c?0:a.view.scroll.x);k.outerWidth=b.$.offsetWidth;k.outerHeight=b.$.offsetHeight;k.height=k.outerHeight-(h.top+h.bottom+e.top+e.bottom);k.width=k.outerWidth-(h.left+h.right+e.left+e.right);k.bottom=k.top+k.outerHeight;k.right=k.left+k.outerWidth;a.inInlineMode&&(k.scroll={top:b.$.scrollTop,left:b.$.scrollLeft});return D({border:e,padding:h,margin:g,ignoreScroll:c},
976 k,!0)}function r(a,b,c){if(!n(b))return b.size=null;if(!b.size)b.size={};else if(b.size.ignoreScroll==c&&b.size.date>new Date-M)return null;return D(b.size,B(a,b,c),{date:+new Date},!0)}function z(a,b){a.view.editable=B(a,a.editable,b,!0)}function A(a,b){a.view||(a.view={});var c=a.view;if(!(!b&&c&&c.date>new Date-M)){var d=a.win,c=d.getScrollPosition(),d=d.getViewPaneSize();D(a.view,{scroll:{x:c.x,y:c.y,width:a.doc.$.documentElement.scrollWidth-d.width,height:a.doc.$.documentElement.scrollHeight-
977 d.height},pane:{width:d.width,height:d.height,bottom:d.height+c.y},date:+new Date},!0)}}function y(a,b,c,d){for(var e=d,g=d,h=0,k=!1,l=!1,m=a.view.pane.height,r=a.mouse;r.y+h<m&&0<r.y-h;){k||(k=b(e,d));l||(l=b(g,d));!k&&0<r.y-h&&(e=c(a,{x:r.x,y:r.y-h}));!l&&r.y+h<m&&(g=c(a,{x:r.x,y:r.y+h}));if(k&&l)break;h+=2}return new f([e,g,null,null])}CKEDITOR.plugins.add("magicline",{init:function(a){var c=a.config,k=c.magicline_triggerOffset||30,l={editor:a,enterMode:c.enterMode,triggerOffset:k,holdDistance:0|
978 k*(c.magicline_holdDistance||.5),boxColor:c.magicline_color||"#ff0000",rtl:"rtl"==c.contentsLangDirection,tabuList:["data-cke-hidden-sel"].concat(c.magicline_tabuList||[]),triggers:c.magicline_everywhere?R:{table:1,hr:1,div:1,ul:1,ol:1,dl:1,form:1,blockquote:1}},r,v,y;l.isRelevant=function(a){return n(a)&&!g(l,a)&&!p(a)};a.on("contentDom",function(){var k=a.editable(),n=a.document,p=a.window;D(l,{editable:k,inInlineMode:k.isInline(),doc:n,win:p,hotNode:null},!0);l.boundary=l.inInlineMode?l.editable:
979 l.doc.getDocumentElement();k.is(H.$inline)||(l.inInlineMode&&!t(k)&&k.setStyles({position:"relative",top:null,left:null}),d.call(this,l),A(l),k.attachListener(a,"beforeUndoImage",function(){l.line.detach()}),k.attachListener(a,"beforeGetData",function(){l.line.wrap.getParent()&&(l.line.detach(),a.once("getData",function(){l.line.attach()},null,null,1E3))},null,null,0),k.attachListener(l.inInlineMode?n:n.getWindow().getFrame(),"mouseout",function(b){if("wysiwyg"==a.mode)if(l.inInlineMode){var c=b.data.$.clientX;
980 b=b.data.$.clientY;A(l);z(l,!0);var d=l.view.editable,e=l.view.scroll;c>d.left-e.x&&c<d.right-e.x&&b>d.top-e.y&&b<d.bottom-e.y||(clearTimeout(y),y=null,l.line.detach())}else clearTimeout(y),y=null,l.line.detach()}),k.attachListener(k,"keyup",function(){l.hiddenMode=0}),k.attachListener(k,"keydown",function(b){if("wysiwyg"==a.mode)switch(b.data.getKeystroke()){case 2228240:case 16:l.hiddenMode=1,l.line.detach()}}),k.attachListener(l.inInlineMode?k:n,"mousemove",function(b){v=!0;if("wysiwyg"==a.mode&&
981 !a.readOnly&&!y){var c={x:b.data.$.clientX,y:b.data.$.clientY};y=setTimeout(function(){l.mouse=c;y=l.trigger=null;A(l);v&&!l.hiddenMode&&a.focusManager.hasFocus&&!l.line.mouseNear()&&(l.element=W(l,!0))&&((l.trigger=u(l)||x(l)||X(l))&&!q(l,l.trigger.upper||l.trigger.lower)?l.line.attach().place():(l.trigger=null,l.line.detach()),v=!1)},30)}}),k.attachListener(p,"scroll",function(){"wysiwyg"==a.mode&&(l.line.detach(),E.webkit&&(l.hiddenMode=1,clearTimeout(r),r=setTimeout(function(){l.mouseDown||(l.hiddenMode=
982 0)},50)))}),k.attachListener(I?n:p,"mousedown",function(){"wysiwyg"==a.mode&&(l.line.detach(),l.hiddenMode=1,l.mouseDown=1)}),k.attachListener(I?n:p,"mouseup",function(){l.hiddenMode=0;l.mouseDown=0}),a.addCommand("accessPreviousSpace",m(l)),a.addCommand("accessNextSpace",m(l,!0)),a.setKeystroke([[c.magicline_keystrokePrevious,"accessPreviousSpace"],[c.magicline_keystrokeNext,"accessNextSpace"]]),a.on("loadSnapshot",function(){var b,c,d,e;for(e in{p:1,br:1,div:1})for(b=a.document.getElementsByTag(e),
986 e.element,g,h,k;if(!n(f)||f.contains(e.editable)||f.isReadOnly())return null;k=y(e,function(a,b){return!b.equals(a)},function(a,b){return W(a,!0,b)},f);g=k.upper;h=k.lower;if(a(e,g,h))return k.set(V,8);if(g&&f.contains(g))for(;!g.getParent().equals(f);)g=g.getParent();else g=f.getFirst(function(a){return d(e,a)});if(h&&f.contains(h))for(;!h.getParent().equals(f);)h=h.getParent();else h=f.getLast(function(a){return d(e,a)});if(!g||!h)return null;r(e,g);r(e,h);if(!l(e.mouse.y,g.size.top,h.size.bottom))return null;
987 for(var f=Number.MAX_VALUE,m,q,p,u;h&&!h.equals(g)&&(q=g.getNext(e.isRelevant));)m=Math.abs(c(e,g,q)-e.mouse.y),m<f&&(f=m,p=g,u=q),g=q,r(e,g);if(!p||!u||!l(e.mouse.y,p.size.top,u.size.bottom))return null;k.upper=p;k.lower=u;return k.set(V,8)}function d(a,b){return!(b&&b.type==CKEDITOR.NODE_TEXT||aa(b)||p(b)||g(a,b)||b.type==CKEDITOR.NODE_ELEMENT&&b.$&&b.is("br"))}return function(c){var d=b(c),e;if(e=d){e=d.upper;var f=d.lower;e=!e||!f||p(f)||p(e)||f.equals(e)||e.equals(f)||f.contains(e)||e.contains(f)?
999 function(b){b=b.data.getTarget();b.is("div")&&b.hasClass("cke_pagebreak")&&a.getSelection().selectElement(b)})}))},afterInit:function(f){function b(b){CKEDITOR.tools.extend(b.attributes,a(f.lang.pagebreak.alt),!0);b.children.length=0}var c=f.dataProcessor,e=c&&c.dataFilter,c=c&&c.htmlFilter,l=/page-break-after\s*:\s*always/i,k=/display\s*:\s*none/i;c&&c.addRules({attributes:{"class":function(a,b){var c=a.replace("cke_pagebreak","");if(c!=a){var e=CKEDITOR.htmlParser.fragment.fromHtml('\x3cspan style\x3d"display: none;"\x3e\x26nbsp;\x3c/span\x3e').children[0];
1000 b.children.length=0;b.add(e);e=b.attributes;delete e["aria-label"];delete e.contenteditable;delete e.title}return c}}},{applyToAll:!0,priority:5});e&&e.addRules({elements:{div:function(a){if(a.attributes["data-cke-pagebreak"])b(a);else if(l.test(a.attributes.style)){var c=a.children[0];c&&"span"==c.name&&k.test(c.attributes.style)&&b(a)}}}})}});CKEDITOR.plugins.pagebreakCmd={exec:function(f){var b=f.document.createElement("div",{attributes:a(f.lang.pagebreak.alt)});f.insertElement(b)},context:"div",
1002 {canUndo:!1,async:!0,exec:function(a,c){b=1;a.execCommand("paste",{type:"html",notification:c&&"undefined"!==typeof c.notification?c.notification:!0})}});f.ui.addButton&&f.ui.addButton("PasteFromWord",{label:f.lang.pastefromword.toolbar,command:"pastefromword",toolbar:"clipboard,50"});f.on("paste",function(e){var l=e.data,k=(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?l.dataTransfer.getData("text/html",!0):null)||l.dataValue,d={dataValue:k},h=/(class=\"?Mso|style=(?:\"|\')[^\"]*?\bmso\-|w:WordDocument|<o:\w+>|<\/font>)/;
1003 if(k&&(b||h.test(k))&&(!1!==f.fire("pasteFromWord",d)||b)){l.dontFilter=!0;var m=a(f,c,function(){if(m)f.fire("paste",l);else if(!f.config.pasteFromWordPromptCleanup||b||confirm(f.lang.pastefromword.confirmCleanup))d.dataValue=CKEDITOR.cleanWord(d.dataValue,f),f.fire("afterPasteFromWord",d),l.dataValue=d.dataValue;b=0});m&&e.cancel()}},null,null,3)}})}(),function(){var a={canUndo:!1,async:!0,exec:function(a,b){var c=a.lang,e=CKEDITOR.tools.keystrokeToString(c.common.keyboard,a.getCommandKeystroke(CKEDITOR.env.ie?
1006 e.baseHref+'"/\x3e':"";if(e.fullPage)c=b.getData().replace(/<head>/,"$\x26"+f).replace(/[^>]*(?=<\/title>)/,"$\x26 \x26mdash; "+b.lang.preview.preview);else{var e="\x3cbody ",k=b.document&&b.document.getBody();k&&(k.getAttribute("id")&&(e+='id\x3d"'+k.getAttribute("id")+'" '),k.getAttribute("class")&&(e+='class\x3d"'+k.getAttribute("class")+'" '));e+="\x3e";c=b.config.docType+'\x3chtml dir\x3d"'+b.config.contentsLangDirection+'"\x3e\x3chead\x3e'+f+"\x3ctitle\x3e"+b.lang.preview.preview+"\x3c/title\x3e"+
1007 CKEDITOR.tools.buildStyleHtml(b.config.contentsCss)+"\x3c/head\x3e"+e+b.getData()+"\x3c/body\x3e\x3c/html\x3e"}f=640;e=420;k=80;try{var d=window.screen,f=Math.round(.8*d.width),e=Math.round(.7*d.height),k=Math.round(.1*d.width)}catch(h){}if(!1===b.fire("contentPreview",b={dataValue:c}))return!1;var d="",m;CKEDITOR.env.ie&&(window._cke_htmlToLoad=b.dataValue,m="javascript:void( (function(){document.open();"+("("+CKEDITOR.tools.fixDomain+")();").replace(/\/\/.*?\n/g,"").replace(/parent\./g,"window.opener.")+
1008 "document.write( window.opener._cke_htmlToLoad );document.close();window.opener._cke_htmlToLoad \x3d null;})() )",d="");CKEDITOR.env.gecko&&(window._cke_htmlToLoad=b.dataValue,d=CKEDITOR.getUrl(a+"preview.html"));d=window.open(d,null,"toolbar\x3dyes,location\x3dno,status\x3dyes,menubar\x3dyes,scrollbars\x3dyes,resizable\x3dyes,width\x3d"+f+",height\x3d"+e+",left\x3d"+k);CKEDITOR.env.ie&&d&&(d.location=m);CKEDITOR.env.ie||CKEDITOR.env.gecko||(m=d.document,m.open(),m.write(b.dataValue),m.close());return!0}};
1011 a._.removeFormatRegex||(a._.removeFormatRegex=new RegExp("^(?:"+a.config.removeFormatTags.replace(/,/g,"|")+")$","i")),b=a._.removeAttributes||(a._.removeAttributes=a.config.removeFormatAttributes.split(",")),c=CKEDITOR.plugins.removeformat.filter,e=a.getSelection().getRanges(),l=e.createIterator(),k=function(a){return a.type==CKEDITOR.NODE_ELEMENT},d;d=l.getNextRange();){d.collapsed||d.enlarge(CKEDITOR.ENLARGE_ELEMENT);var h=d.createBookmark(),m=h.startNode,g=h.endNode,n=function(b){for(var d=a.elementPath(b),
1012 e=d.elements,g=1,h;(h=e[g])&&!h.equals(d.block)&&!h.equals(d.blockLimit);g++)f.test(h.getName())&&c(a,h)&&b.breakParent(h)};n(m);if(g)for(n(g),m=m.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT);m&&!m.equals(g);)if(m.isReadOnly()){if(m.getPosition(g)&CKEDITOR.POSITION_CONTAINS)break;m=m.getNext(k)}else n=m.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT),"img"==m.getName()&&m.data("cke-realelement")||!c(a,m)||(f.test(m.getName())?m.remove(1):(m.removeAttributes(b),a.fire("removeFormatCleanup",m))),m=n;d.moveToBookmark(h)}a.forceNextSelectionCheck();
1014 CKEDITOR.plugins.add("resize",{init:function(a){function f(b){var e=h.width,f=h.height,k=e+(b.data.$.screenX-d.x)*("rtl"==l?-1:1);b=f+(b.data.$.screenY-d.y);m&&(e=Math.max(c.resize_minWidth,Math.min(k,c.resize_maxWidth)));g&&(f=Math.max(c.resize_minHeight,Math.min(b,c.resize_maxHeight)));a.resize(m?e:null,f)}function b(){CKEDITOR.document.removeListener("mousemove",f);CKEDITOR.document.removeListener("mouseup",b);a.document&&(a.document.removeListener("mousemove",f),a.document.removeListener("mouseup",
1015 b))}var c=a.config,e=a.ui.spaceId("resizer"),l=a.element?a.element.getDirection(1):"ltr";!c.resize_dir&&(c.resize_dir="vertical");void 0===c.resize_maxWidth&&(c.resize_maxWidth=3E3);void 0===c.resize_maxHeight&&(c.resize_maxHeight=3E3);void 0===c.resize_minWidth&&(c.resize_minWidth=750);void 0===c.resize_minHeight&&(c.resize_minHeight=250);if(!1!==c.resize_enabled){var k=null,d,h,m=("both"==c.resize_dir||"horizontal"==c.resize_dir)&&c.resize_minWidth!=c.resize_maxWidth,g=("both"==c.resize_dir||"vertical"==
1016 c.resize_dir)&&c.resize_minHeight!=c.resize_maxHeight,n=CKEDITOR.tools.addFunction(function(e){k||(k=a.getResizable());h={width:k.$.offsetWidth||0,height:k.$.offsetHeight||0};d={x:e.screenX,y:e.screenY};c.resize_minWidth>h.width&&(c.resize_minWidth=h.width);c.resize_minHeight>h.height&&(c.resize_minHeight=h.height);CKEDITOR.document.on("mousemove",f);CKEDITOR.document.on("mouseup",b);a.document&&(a.document.on("mousemove",f),a.document.on("mouseup",b));e.preventDefault&&e.preventDefault()});a.on("destroy",
1027 b=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE,c=function(){f.destroy(a)},e=function(){!f.state.scayt[a.name]||a.readOnly||a.scayt||f.createScayt(a)},l=function(){var c=a.editable();c.attachListener(c,"focus",function(c){CKEDITOR.plugins.scayt&&!a.scayt&&setTimeout(e,0);c=CKEDITOR.plugins.scayt&&CKEDITOR.plugins.scayt.state.scayt[a.name]&&a.scayt;var d,f;if((b||c)&&a._.savedSelection){c=a._.savedSelection.getSelectedElement();c=!c&&a._.savedSelection.getRanges();for(var k=0;k<c.length;k++)f=c[k],"string"===
1028 typeof f.startContainer.$.nodeValue&&(d=f.startContainer.getText().length,(d<f.startOffset||d<f.endOffset)&&a.unlockSelection(!1))}},this,null,-10)},k=function(){b?a.config.scayt_inlineModeImmediateMarkup?e():(a.on("blur",function(){setTimeout(c,0)}),a.on("focus",e),a.focusManager.hasFocus&&e()):e();l();var d=a.editable();d.attachListener(d,"mousedown",function(b){b=b.data.getTarget();var c=a.widgets&&a.widgets.getByElement(b);c&&(c.wrapper=b.getAscendant(function(a){return a.hasAttribute("data-cke-widget-wrapper")},
1029 !0))},this,null,-10)};a.on("contentDom",k);a.on("beforeCommandExec",function(b){var c=a.scayt,e=!1,g=!1,k=!0;b.data.name in f.options.disablingCommandExec&&"wysiwyg"==a.mode?c&&(f.destroy(a),a.fire("scaytButtonState",CKEDITOR.TRISTATE_DISABLED)):"bold"!==b.data.name&&"italic"!==b.data.name&&"underline"!==b.data.name&&"strike"!==b.data.name&&"subscript"!==b.data.name&&"superscript"!==b.data.name&&"enter"!==b.data.name&&"cut"!==b.data.name&&"language"!==b.data.name||!c||("cut"===b.data.name&&(k=!1,
1030 g=!0),"language"===b.data.name&&(g=e=!0),a.fire("reloadMarkupScayt",{removeOptions:{removeInside:k,forceBookmark:g,language:e},timeout:0}))});a.on("beforeSetMode",function(b){if("source"==b.data){if(b=a.scayt)f.destroy(a),a.fire("scaytButtonState",CKEDITOR.TRISTATE_DISABLED);a.document&&a.document.getBody().removeAttribute("_jquid")}});a.on("afterCommandExec",function(b){"wysiwyg"!=a.mode||"undo"!=b.data.name&&"redo"!=b.data.name||setTimeout(function(){f.reloadMarkup(a.scayt)},250)});a.on("readOnly",
1031 function(b){var c;b&&(c=a.scayt,!0===b.editor.readOnly?c&&c.fire("removeMarkupInDocument",{}):c?f.reloadMarkup(c):"wysiwyg"==b.editor.mode&&!0===f.state.scayt[b.editor.name]&&(f.createScayt(a),b.editor.fire("scaytButtonState",CKEDITOR.TRISTATE_ON)))});a.on("beforeDestroy",c);a.on("setData",function(){c();(a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE||a.plugins.divarea)&&k()},this,null,50);a.on("reloadMarkupScayt",function(b){var c=b.data&&b.data.removeOptions,e=b.data&&b.data.timeout,g=b.data&&b.data.language,
1032 k=a.scayt;k&&setTimeout(function(){g&&(c.selectionNode=a.plugins.language.getCurrentLangElement(a),c.selectionNode=c.selectionNode&&c.selectionNode.$||null);k.removeMarkupInSelectionNode(c);f.reloadMarkup(k)},e||0)});a.on("insertElement",function(){a.fire("reloadMarkupScayt",{removeOptions:{forceBookmark:!0}})},this,null,50);a.on("insertHtml",function(){a.scayt&&a.scayt.setFocused&&a.scayt.setFocused(!0);a.fire("reloadMarkupScayt")},this,null,50);a.on("insertText",function(){a.scayt&&a.scayt.setFocused&&
1041 "ignore-words-with-numbers"],k=CKEDITOR.tools.search,d=CKEDITOR.tools.indexOf;a.config.scayt_disableOptionsStorage=function(a){for(var b=[],c=0;c<a.length;c++){var f=a[c],p=!!k(a,"options");if(!k(e,f)||p&&k(l,function(a){if("lang"===a)return!1}))return;k(l,f)&&l.splice(d(l,f),1);if("all"===f||p&&k(a,"lang"))return[];"options"===f&&(l=["lang"])}return b=b.concat(l)}(f)}},addRule:function(a){var f=CKEDITOR.plugins.scayt,b=a.dataProcessor,c=b&&b.htmlFilter,e=a._.elementsPath&&a._.elementsPath.filters,
1042 b=b&&b.dataFilter,l=a.addRemoveFormatFilter,k=function(b){if(a.scayt&&(b.hasAttribute(f.options.data_attribute_name)||b.hasAttribute(f.options.problem_grammar_data_attribute)))return!1},d=function(b){var c=!0;a.scayt&&(b.hasAttribute(f.options.data_attribute_name)||b.hasAttribute(f.options.problem_grammar_data_attribute))&&(c=!1);return c};e&&e.push(k);b&&b.addRules({elements:{span:function(a){var b=a.hasClass(f.options.misspelled_word_class)&&a.attributes[f.options.data_attribute_name],c=a.hasClass(f.options.problem_grammar_class)&&
1047 f,b){var c={},e={},l=b?"word":"phrase",k=b?"startGrammarCheck":"startSpellCheck",d=a.scayt;if(0<f.length&&"no_any_suggestions"!==f[0])if(b)for(b=0;b<f.length;b++){var h="scayt_suggest_"+CKEDITOR.plugins.scayt.suggestions[b].replace(" ","_");a.addCommand(h,this.createCommand(CKEDITOR.plugins.scayt.suggestions[b],l,k));b<a.config.scayt_maxSuggestions?(a.addMenuItem(h,{label:f[b],command:h,group:"scayt_suggest",order:b+1}),c[h]=CKEDITOR.TRISTATE_OFF):(a.addMenuItem(h,{label:f[b],command:h,group:"scayt_moresuggest",
1048 order:b+1}),e[h]=CKEDITOR.TRISTATE_OFF,"on"===a.config.scayt_moreSuggestions&&(a.addMenuItem("scayt_moresuggest",{label:d.getLocal("btn_moreSuggestions"),group:"scayt_moresuggest",order:10,getItems:function(){return e}}),c.scayt_moresuggest=CKEDITOR.TRISTATE_OFF))}else for(b=0;b<f.length;b++)h="grayt_suggest_"+CKEDITOR.plugins.scayt.suggestions[b].replace(" ","_"),a.addCommand(h,this.createCommand(CKEDITOR.plugins.scayt.suggestions[b],l,k)),a.addMenuItem(h,{label:f[b],command:h,group:"grayt_suggest",
1049 order:b+1}),c[h]=CKEDITOR.TRISTATE_OFF;else c.no_scayt_suggest=CKEDITOR.TRISTATE_DISABLED,a.addCommand("no_scayt_suggest",{exec:function(){}}),a.addMenuItem("no_scayt_suggest",{label:d.getLocal("btn_noSuggestions")||"no_scayt_suggest",command:"no_scayt_suggest",group:"scayt_suggest",order:0});return c},menuGenerator:function(a,f){var b=a.scayt,c=this.scaytMenuDefinition(a),e={},l=a.config.scayt_contextCommands.split("|"),k=f.getAttribute(b.getLangAttribute())||b.getLang(),d,h;d=b.isScaytNode(f);h=
1050 b.isGraytNode(f);d?(c=c.scayt,e=f.getAttribute(b.getScaytNodeAttributeName()),b.fire("getSuggestionsList",{lang:k,word:e}),e=this.buildSuggestionMenuItems(a,CKEDITOR.plugins.scayt.suggestions,d)):h&&(c=c.grayt,e=f.getAttribute(b.getGraytNodeAttributeName()),h=b.getProblemDescriptionText(e,k),c.grayt_problemdescription&&h&&(c.grayt_problemdescription.label=h),b.fire("getGrammarSuggestionsList",{lang:k,phrase:e}),e=this.buildSuggestionMenuItems(a,CKEDITOR.plugins.scayt.suggestions,d));if(d&&"off"==
1059 "boolean"===typeof a.config.scayt_ignoreWordsWithNumbers&&(l["ignore-words-with-numbers"]=a.config.scayt_ignoreWordsWithNumbers);var k;try{k=e(l)}catch(d){f.alarmCompatibilityMessage(),delete l.charsToObserve,k=e(l)}k.subscribe("suggestionListSend",function(a){for(var b={},c=[],d=0;d<a.suggestionList.length;d++)b["word_"+a.suggestionList[d]]||(b["word_"+a.suggestionList[d]]=a.suggestionList[d],c.push(a.suggestionList[d]));CKEDITOR.plugins.scayt.suggestions=c});k.subscribe("selectionIsChanged",function(b){a.getSelection().isLocked&&
1060 a.lockSelection()});k.subscribe("graytStateChanged",function(d){b.state.grayt[a.name]=d.state});k.addMarkupHandler&&k.addMarkupHandler(function(b){var d=a.editable(),e=d.getCustomData(b.charName);e&&(e.$=b.node,d.setCustomData(b.charName,e))});a.scayt=k;a.fire("scaytButtonState",a.readOnly?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_ON)}else b.state.scayt[a.name]=!1})},destroy:function(a){a.scayt&&a.scayt.destroy();delete a.scayt;a.fire("scaytButtonState",CKEDITOR.TRISTATE_OFF)},loadScaytLibrary:function(a,
1064 this.scayt?this._.previousValue=c.removeMarkupFromString(this.getSnapshot()):a.call(this)}})}if(!0===CKEDITOR.config.scayt_handleUndoRedo){var a=CKEDITOR.plugins.undo.Image.prototype,f="function"==typeof a.equalsContent?"equalsContent":"equals";a[f]=CKEDITOR.tools.override(a[f],function(a){return function(c){var e=c.editor.scayt,f=this.contents,k=c.contents,d=null;CKEDITOR.plugins.scayt&&CKEDITOR.plugins.scayt.state.scayt[c.editor.name]&&c.editor.scayt&&(this.contents=e.removeMarkupFromString(f)||
1065 "",c.contents=e.removeMarkupFromString(k)||"");d=a.apply(this,arguments);this.contents=f;c.contents=k;return d}})}}),function(){CKEDITOR.plugins.add("selectall",{init:function(a){a.addCommand("selectAll",{modes:{wysiwyg:1,source:1},exec:function(a){var b=a.editable();if(b.is("textarea"))a=b.$,CKEDITOR.env.ie?a.createTextRange().execCommand("SelectAll"):(a.selectionStart=0,a.selectionEnd=a.value.length),a.focus();else{if(b.is("body"))a.document.$.execCommand("SelectAll",!1,null);else{var c=a.createRange();
1067 a.editable()[b]("cke_show_blocks")}}};CKEDITOR.plugins.add("showblocks",{onLoad:function(){var a="p div pre address blockquote h1 h2 h3 h4 h5 h6".split(" "),b,c,e,l,k=CKEDITOR.getUrl(this.path),d=!(CKEDITOR.env.ie&&9>CKEDITOR.env.version),h=d?":not([contenteditable\x3dfalse]):not(.cke_show_blocks_off)":"",m,g;for(b=c=e=l="";m=a.pop();)g=a.length?",":"",b+=".cke_show_blocks "+m+h+g,e+=".cke_show_blocks.cke_contents_ltr "+m+h+g,l+=".cke_show_blocks.cke_contents_rtl "+m+h+g,c+=".cke_show_blocks "+m+
1068 h+"{background-image:url("+CKEDITOR.getUrl(k+"images/block_"+m+".png")+")}";CKEDITOR.addCss((b+"{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px}").concat(c,e+"{background-position:top left;padding-left:8px}",l+"{background-position:top right;padding-right:8px}"));d||CKEDITOR.addCss(".cke_show_blocks [contenteditable\x3dfalse],.cke_show_blocks .cke_show_blocks_off{border:none;padding-top:0;background-image:none}.cke_show_blocks.cke_contents_rtl [contenteditable\x3dfalse],.cke_show_blocks.cke_contents_rtl .cke_show_blocks_off{padding-right:0}.cke_show_blocks.cke_contents_ltr [contenteditable\x3dfalse],.cke_show_blocks.cke_contents_ltr .cke_show_blocks_off{padding-left:0}")},
1073 ""))}}})}});CKEDITOR.on("dialogDefinition",function(a){var b=a.data.name;if("table"==b||"tableProperties"==b)if(a=a.data.definition,b=a.getContents("info").get("txtBorder"),b.commit=CKEDITOR.tools.override(b.commit,function(a){return function(b,f){a.apply(this,arguments);var k=parseInt(this.getValue(),10);f[!k||0>=k?"addClass":"removeClass"]("cke_show_border")}}),a=(a=a.getContents("advanced"))&&a.get("advCSSClasses"))a.setup=CKEDITOR.tools.override(a.setup,function(a){return function(){a.apply(this,
1082 modes:{wysiwyg:1},canUndo:!1});a.ui.addButton&&a.ui.addButton("SpecialChar",{label:a.lang.specialchar.toolbar,command:"specialchar",toolbar:"insert,50"})}}),CKEDITOR.config.specialChars="! \x26quot; # $ % \x26amp; ' ( ) * + - . / 0 1 2 3 4 5 6 7 8 9 : ; \x26lt; \x3d \x26gt; ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ \x26euro; \x26lsquo; \x26rsquo; \x26ldquo; \x26rdquo; \x26ndash; \x26mdash; \x26iexcl; \x26cent; \x26pound; \x26curren; \x26yen; \x26brvbar; \x26sect; \x26uml; \x26copy; \x26ordf; \x26laquo; \x26not; \x26reg; \x26macr; \x26deg; \x26sup2; \x26sup3; \x26acute; \x26micro; \x26para; \x26middot; \x26cedil; \x26sup1; \x26ordm; \x26raquo; \x26frac14; \x26frac12; \x26frac34; \x26iquest; \x26Agrave; \x26Aacute; \x26Acirc; \x26Atilde; \x26Auml; \x26Aring; \x26AElig; \x26Ccedil; \x26Egrave; \x26Eacute; \x26Ecirc; \x26Euml; \x26Igrave; \x26Iacute; \x26Icirc; \x26Iuml; \x26ETH; \x26Ntilde; \x26Ograve; \x26Oacute; \x26Ocirc; \x26Otilde; \x26Ouml; \x26times; \x26Oslash; \x26Ugrave; \x26Uacute; \x26Ucirc; \x26Uuml; \x26Yacute; \x26THORN; \x26szlig; \x26agrave; \x26aacute; \x26acirc; \x26atilde; \x26auml; \x26aring; \x26aelig; \x26ccedil; \x26egrave; \x26eacute; \x26ecirc; \x26euml; \x26igrave; \x26iacute; \x26icirc; \x26iuml; \x26eth; \x26ntilde; \x26ograve; \x26oacute; \x26ocirc; \x26otilde; \x26ouml; \x26divide; \x26oslash; \x26ugrave; \x26uacute; \x26ucirc; \x26uuml; \x26yacute; \x26thorn; \x26yuml; \x26OElig; \x26oelig; \x26#372; \x26#374 \x26#373 \x26#375; \x26sbquo; \x26#8219; \x26bdquo; \x26hellip; \x26trade; \x26#9658; \x26bull; \x26rarr; \x26rArr; \x26hArr; \x26diams; \x26asymp;".split(" "),
1089 b.document),g=0,n=f.length;g<n;g++)m.append((new CKEDITOR.dom.element(f[g],b.document)).clone(!1,!1)).appendBogus();c.moveToElementEditStart(m)}c.select(!0);return!0}}return!1}}}var f={editorFocus:!1,modes:{wysiwyg:1,source:1}},b={exec:function(a){a.container.focusNext(!0,a.tabIndex)}},c={exec:function(a){a.container.focusPrevious(!0,a.tabIndex)}};CKEDITOR.plugins.add("tab",{init:function(e){for(var l=!1!==e.config.enableTabKeyTools,k=e.config.tabSpaces||0,d="";k--;)d+=" ";if(d)e.on("key",function(a){9==
1090 a.data.keyCode&&(e.insertText(d),a.cancel())});if(l)e.on("key",function(a){(9==a.data.keyCode&&e.execCommand("selectNextCell")||a.data.keyCode==CKEDITOR.SHIFT+9&&e.execCommand("selectPreviousCell"))&&a.cancel()});e.addCommand("blur",CKEDITOR.tools.extend(b,f));e.addCommand("blurBack",CKEDITOR.tools.extend(c,f));e.addCommand("selectNextCell",a());e.addCommand("selectPreviousCell",a(!0))}})}(),CKEDITOR.dom.element.prototype.focusNext=function(a,f){var b=void 0===f?this.getTabIndex():f,c,e,l,k,d,h;if(0>=
1091 b)for(d=this.getNextSourceNode(a,CKEDITOR.NODE_ELEMENT);d;){if(d.isVisible()&&0===d.getTabIndex()){l=d;break}d=d.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(d=this.getDocument().getBody().getFirst();d=d.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!c)if(!e&&d.equals(this)){if(e=!0,a){if(!(d=d.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;c=1}}else e&&!this.contains(d)&&(c=1);if(d.isVisible()&&!(0>(h=d.getTabIndex()))){if(c&&h==b){l=d;break}h>b&&(!l||!k||h<k)?(l=d,k=h):l||0!==h||
1092 (l=d,k=h)}}l&&l.focus()},CKEDITOR.dom.element.prototype.focusPrevious=function(a,f){for(var b=void 0===f?this.getTabIndex():f,c,e,l,k=0,d,h=this.getDocument().getBody().getLast();h=h.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!c)if(!e&&h.equals(this)){if(e=!0,a){if(!(h=h.getPreviousSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;c=1}}else e&&!this.contains(h)&&(c=1);if(h.isVisible()&&!(0>(d=h.getTabIndex())))if(0>=b){if(c&&0===d){l=h;break}d>k&&(l=h,k=d)}else{if(c&&d==b){l=h;break}d<b&&(!l||
1093 d>k)&&(l=h,k=d)}}l&&l.focus()},CKEDITOR.plugins.add("table",{requires:"dialog",init:function(a){function f(a){return CKEDITOR.tools.extend(a||{},{contextSensitive:1,refresh:function(a,b){this.setState(b.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!a.blockless){var b=a.lang.table;a.addCommand("table",new CKEDITOR.dialogCommand("table",{context:"table",allowedContent:"table{width,height}[align,border,cellpadding,cellspacing,summary];caption tbody thead tfoot;th td tr[scope];"+
1095 f({exec:function(a){var b=a.elementPath().contains("table",1);if(b){var f=b.getParent(),k=a.editable();1!=f.getChildCount()||f.is("td","th")||f.equals(k)||(b=f);a=a.createRange();a.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START);b.remove();a.select()}}}));a.ui.addButton&&a.ui.addButton("Table",{label:b.toolbar,command:"table",toolbar:"insert,30"});CKEDITOR.dialog.add("table",this.path+"dialogs/table.js");CKEDITOR.dialog.add("tableProperties",this.path+"dialogs/table.js");a.addMenuItems&&a.addMenuItems({table:{label:b.menu,
1097 !t.test(a.getName())||a.getCustomData("selected_cell")||(CKEDITOR.dom.element.setMarker(g,a,"selected_cell",!0),f.push(a))}if(a){for(var e=a.getRanges(),f=[],g={},h=0;h<e.length;h++){var k=e[h];if(k.collapsed)(k=k.getCommonAncestor().getAscendant({td:1,th:1},!0))&&c(k)&&f.push(k);else{var k=new CKEDITOR.dom.walker(k),l;for(k.guard=d;l=k.next();)l.type==CKEDITOR.NODE_ELEMENT&&l.is(CKEDITOR.dtd.table)||(l=l.getAscendant({td:1,th:1},!0))&&!l.getCustomData("selected_cell")&&c(l)&&(CKEDITOR.dom.element.setMarker(g,
1098 l,"selected_cell",!0),f.push(l))}}CKEDITOR.dom.element.clearAllMarkers(g);return f}}function f(b,c){for(var d=w(b)?b:a(b),e=d[0],f=e.getAscendant("table"),e=e.getDocument(),g=d[0].getParent(),h=g.$.rowIndex,d=d[d.length-1],k=d.getParent().$.rowIndex+d.$.rowSpan-1,d=new CKEDITOR.dom.element(f.$.rows[k]),h=c?h:k,g=c?g:d,d=CKEDITOR.tools.buildTableMap(f),f=d[h],h=c?d[h-1]:d[h+1],d=d[0].length,e=e.createElement("tr"),k=0;f[k]&&k<d;k++){var l;1<f[k].rowSpan&&h&&f[k]==h[k]?(l=f[k],l.rowSpan+=1):(l=(new CKEDITOR.dom.element(f[k])).clone(),
1099 l.removeAttribute("rowSpan"),l.appendBogus(),e.append(l),l=l.$);k+=l.colSpan-1}c?e.insertBefore(g):e.insertAfter(g)}function b(c){if(c instanceof CKEDITOR.dom.selection){var d=c.getRanges(),e=a(c),f=e[0].getAscendant("table"),g=CKEDITOR.tools.buildTableMap(f),h=e[0].getParent().$.rowIndex,e=e[e.length-1],k=e.getParent().$.rowIndex+e.$.rowSpan-1,e=[];c.reset();for(c=h;c<=k;c++){for(var l=g[c],m=new CKEDITOR.dom.element(f.$.rows[c]),n=0;n<l.length;n++){var p=new CKEDITOR.dom.element(l[n]),t=p.getParent().$.rowIndex;
1100 1==p.$.rowSpan?p.remove():(--p.$.rowSpan,t==c&&(t=g[c+1],t[n-1]?p.insertAfter(new CKEDITOR.dom.element(t[n-1])):(new CKEDITOR.dom.element(f.$.rows[c+1])).append(p,1)));n+=p.$.colSpan-1}e.push(m)}g=f.$.rows;d[0].moveToPosition(f,CKEDITOR.POSITION_BEFORE_START);h=new CKEDITOR.dom.element(g[k+1]||(0<h?g[h-1]:null)||f.$.parentNode);for(c=e.length;0<=c;c--)b(e[c]);return f.$.parentNode?h:(d[0].select(),null)}c instanceof CKEDITOR.dom.element&&(f=c.getAscendant("table"),1==f.$.rows.length?f.remove():c.remove());
1101 return null}function c(a,b){for(var c=a.getParent().$.cells,d=0,e=0;e<c.length;e++){var f=c[e],d=d+(b?1:f.colSpan);if(f==a.$)break}return d-1}function e(a,b){for(var d=b?Infinity:0,e=0;e<a.length;e++){var f=c(a[e],b);if(b?f<d:f>d)d=f}return d}function l(b,c){for(var d=w(b)?b:a(b),f=d[0].getAscendant("table"),g=e(d,1),d=e(d),h=c?g:d,k=CKEDITOR.tools.buildTableMap(f),f=[],g=[],d=k.length,l=0;l<d;l++)f.push(k[l][h]),g.push(c?k[l][h-1]:k[l][h+1]);for(l=0;l<d;l++)f[l]&&(1<f[l].colSpan&&g[l]==f[l]?(k=f[l],
1102 k.colSpan+=1):(h=new CKEDITOR.dom.element(f[l]),k=h.clone(),k.removeAttribute("colSpan"),k.appendBogus(),k[c?"insertBefore":"insertAfter"].call(k,h),k=k.$),l+=k.rowSpan-1)}function k(a,b){var c=a.getStartElement().getAscendant({td:1,th:1},!0);if(c){var d=c.clone();d.appendBogus();b?d.insertBefore(c):d.insertAfter(c)}}function d(b){if(b instanceof CKEDITOR.dom.selection){var c=b.getRanges(),e=a(b),f=e[0]&&e[0].getAscendant("table"),g;a:{var k=0;g=e.length-1;for(var l={},m,n;m=e[k++];)CKEDITOR.dom.element.setMarker(l,
1103 m,"delete_cell",!0);for(k=0;m=e[k++];)if((n=m.getPrevious())&&!n.getCustomData("delete_cell")||(n=m.getNext())&&!n.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(l);g=n;break a}CKEDITOR.dom.element.clearAllMarkers(l);k=e[0].getParent();(k=k.getPrevious())?g=k.getLast():(k=e[g].getParent(),g=(k=k.getNext())?k.getChild(0):null)}b.reset();for(b=e.length-1;0<=b;b--)d(e[b]);g?h(g,!0):f&&(c[0].moveToPosition(f,CKEDITOR.POSITION_BEFORE_START),c[0].select(),f.remove())}else b instanceof
1105 -1:null}function g(b,c,d){var e=a(b),f;if((c?1!=e.length:2>e.length)||(f=b.getCommonAncestor())&&f.type==CKEDITOR.NODE_ELEMENT&&f.is("table"))return!1;var g;b=e[0];f=b.getAscendant("table");var h=CKEDITOR.tools.buildTableMap(f),k=h.length,l=h[0].length,n=b.getParent().$.rowIndex,p=m(h,n,b);if(c){var t;try{var w=parseInt(b.getAttribute("rowspan"),10)||1;g=parseInt(b.getAttribute("colspan"),10)||1;t=h["up"==c?n-w:"down"==c?n+w:n]["left"==c?p-g:"right"==c?p+g:p]}catch(I){return!1}if(!t||b.$==t)return!1;
1107 H.is("br")||L.append("br")),g.moveChildren(L)),c?g.remove():g.setHtml(""));H=G}if(d)return t*w==N;L.moveChildren(b);b.appendBogus();w>=l?b.removeAttribute("rowSpan"):b.$.rowSpan=t;t>=k?b.removeAttribute("colSpan"):b.$.colSpan=w;d=new CKEDITOR.dom.nodeList(f.$.rows);e=d.count();for(c=e-1;0<=c;c--)f=d.getItem(c),f.$.cells.length||(f.remove(),e++);return b}function n(b,c){var d=a(b);if(1<d.length)return!1;if(c)return!0;var d=d[0],e=d.getParent(),f=e.getAscendant("table"),g=CKEDITOR.tools.buildTableMap(f),
1108 h=e.$.rowIndex,k=m(g,h,d),l=d.$.rowSpan,n;if(1<l){n=Math.ceil(l/2);for(var l=Math.floor(l/2),e=h+n,f=new CKEDITOR.dom.element(f.$.rows[e]),g=m(g,e),p,e=d.clone(),h=0;h<g.length;h++)if(p=g[h],p.parentNode==f.$&&h>k){e.insertBefore(new CKEDITOR.dom.element(p));break}else p=null;p||f.append(e)}else for(l=n=1,f=e.clone(),f.insertAfter(e),f.append(e=d.clone()),p=m(g,h),k=0;k<p.length;k++)p[k].rowSpan++;e.appendBogus();d.$.rowSpan=n;e.$.rowSpan=l;1==n&&d.removeAttribute("rowSpan");1==l&&e.removeAttribute("rowSpan");
1109 return e}function p(b,c){var d=a(b);if(1<d.length)return!1;if(c)return!0;var d=d[0],e=d.getParent(),f=e.getAscendant("table"),f=CKEDITOR.tools.buildTableMap(f),g=m(f,e.$.rowIndex,d),h=d.$.colSpan;if(1<h)e=Math.ceil(h/2),h=Math.floor(h/2);else{for(var h=e=1,k=[],l=0;l<f.length;l++){var n=f[l];k.push(n[g]);1<n[g].rowSpan&&(l+=n[g].rowSpan-1)}for(f=0;f<k.length;f++)k[f].colSpan++}f=d.clone();f.insertAfter(d);f.appendBogus();d.$.colSpan=e;f.$.colSpan=h;1==e&&d.removeAttribute("colSpan");1==h&&f.removeAttribute("colSpan");
1113 exec:function(a){a=a.getSelection();(a=b(a))&&h(a)}}));m("rowInsertBefore",e({requiredContent:"table",exec:function(b){b=b.getSelection();b=a(b);f(b,!0)}}));m("rowInsertAfter",e({requiredContent:"table",exec:function(b){b=b.getSelection();b=a(b);f(b)}}));m("columnDelete",e({requiredContent:"table",exec:function(b){var c=b.getSelection();b=c.getRanges();var d=a(c),e=d[0],f=d[d.length-1],d=e.getAscendant("table"),g=CKEDITOR.tools.buildTableMap(d),k,l,m=[];c.reset();for(var n=0,c=g.length;n<c;n++)for(var p=
1114 0,t=g[n].length;p<t;p++)g[n][p]==e.$&&(k=p),g[n][p]==f.$&&(l=p);for(n=k;n<=l;n++)for(p=0;p<g.length;p++)f=g[p],e=new CKEDITOR.dom.element(d.$.rows[p]),f=new CKEDITOR.dom.element(f[n]),f.$&&(1==f.$.colSpan?f.remove():--f.$.colSpan,p+=f.$.rowSpan-1,e.$.cells.length||m.push(e));l=d.$.rows[0]&&d.$.rows[0].cells;k=new CKEDITOR.dom.element(l[k]||(k?l[k-1]:d.$.parentNode));m.length==c&&(b[0].moveToPosition(d,CKEDITOR.POSITION_AFTER_END),b[0].select(),d.remove());k&&h(k,!0)}}));m("columnInsertBefore",e({requiredContent:"table",
1117 exec:function(a){a=a.getSelection();k(a,!0)}}));m("cellInsertAfter",e({requiredContent:"table",exec:function(a){a=a.getSelection();k(a)}}));c.addMenuItems&&c.addMenuItems({tablecell:{label:t.cell.menu,group:"tablecell",order:1,getItems:function(){var b=c.getSelection(),d=a(b);return{tablecell_insertBefore:CKEDITOR.TRISTATE_OFF,tablecell_insertAfter:CKEDITOR.TRISTATE_OFF,tablecell_delete:CKEDITOR.TRISTATE_OFF,tablecell_merge:g(b,null,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_right:g(b,
1123 insertRow:f,insertColumn:l,getSelectedCells:a};CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)}(),CKEDITOR.tools.buildTableMap=function(a,f,b,c,e){a=a.$.rows;b=b||0;c="number"===typeof c?c:a.length-1;e="number"===typeof e?e:-1;var l=-1,k=[];for(f=f||0;f<=c;f++){l++;!k[l]&&(k[l]=[]);for(var d=-1,h=b;h<=(-1===e?a[f].cells.length-1:e);h++){var m=a[f].cells[h];if(!m)break;for(d++;k[l][d];)d++;for(var g=isNaN(m.colSpan)?1:m.colSpan,m=isNaN(m.rowSpan)?1:m.rowSpan,n=0;n<m&&!(f+n>c);n++){k[l+
1124 n]||(k[l+n]=[]);for(var p=0;p<g;p++)k[l+n][d+p]=a[f].cells[h]}d+=g-1;if(-1!==e&&d>=e)break}}return k},function(){function a(a,b){var c=a.getAscendant("table"),d=b.getAscendant("table"),e=CKEDITOR.tools.buildTableMap(c),f=a.getAscendant("tr",!0).$.rowIndex,g=b.getAscendant("tr",!0).$.rowIndex,h=[],k={},l,m;c.contains(d)&&(b=b.getAscendant({td:1,th:1}),g=b.getAscendant("tr",!0).$.rowIndex);f>g&&(c=f,f=g,g=c,c=a,a=b,b=c);for(c=0;c<e[f].length;c++)if(a.$===e[f][c]){l=c;break}for(c=0;c<e[g].length;c++)if(b.$===
1125 e[g][c]){m=c;break}l>m&&(c=l,l=m,m=c);for(c=f;c<=g;c++)for(f=l;f<=m;f++)d=new CKEDITOR.dom.element(e[c][f]),d.$&&!d.getCustomData("selected_cell")&&(h.push(d),CKEDITOR.dom.element.setMarker(k,d,"selected_cell",!0));CKEDITOR.dom.element.clearAllMarkers(k);return h}function f(a){a=a.data.$;return CKEDITOR.env.ie&&9>CKEDITOR.env.version?1===a.button:0===a.button}function b(a){return(a=a.editable().findOne(".cke_table-faked-selection"))&&a.getAscendant("table")}function c(a,b){var c=a.editable().find(".cke_table-faked-selection"),
1127 function l(b){var c=b.editable().find(".cke_table-faked-selection");1>c.count()||(c=a(c.getItem(0),c.getItem(c.count()-1)),e(b,c))}function k(b,d,f){var g=v(b.getSelection(!0));d=d.is("table")?null:d;var h;(h=w.active&&!w.first)&&!(h=d)&&(h=b.getSelection().getRanges(),h=1<g.length||h[0]&&!h[0].collapsed?!0:!1);if(h)w.first=d||g[0],w.dirty=d?!1:1!==g.length;else if(w.active&&d){g=a(w.first,d);if(!w.dirty&&1===g.length)return c(b,"mouseup"===f.name);w.dirty=!0;w.last=d;e(b,g)}}function d(a){var b=
1130 n,p)&&c(g,!0);!w.active&&"mousedown"===a.name&&f(a)&&p&&(w={active:!0},CKEDITOR.document.on("mouseup",h,null,{editor:g}));(t||p)&&k(g,t||p,a);"mouseup"===a.name&&(f(a)&&(e(a.data.getTarget())||d(n,p))&&l(g),w={active:!1},CKEDITOR.document.removeListener("mouseup",h))}function m(a){var b=a.data.getTarget().getAscendant({td:1,th:1},!0);b&&!b.hasClass("cke_table-faked-selection")&&(a.cancel(),a.data.preventDefault())}function g(a,b){function c(a){a.cancel()}var d=a.getSelection(),e=d.createBookmarks(),
1131 f=a.document,g=a.createRange(),h=f.getDocumentElement().$,k=CKEDITOR.env.ie&&9>CKEDITOR.env.version,l=a.blockless||CKEDITOR.env.ie?"span":"div",m,n,p,t;f.getById("cke_table_copybin")||(m=f.createElement(l),n=f.createElement(l),n.setAttributes({id:"cke_table_copybin","data-cke-temp":"1"}),m.setStyles({position:"absolute",width:"1px",height:"1px",overflow:"hidden"}),m.setStyle("ltr"==a.config.contentsLangDirection?"left":"right","-5000px"),m.setHtml(a.getSelectedHtml(!0)),a.fire("lockSnapshot"),n.append(m),
1132 a.editable().append(n),t=a.on("selectionChange",c,null,null,0),k&&(p=h.scrollTop),g.selectNodeContents(m),g.select(),k&&(h.scrollTop=p),setTimeout(function(){n.remove();d.selectBookmarks(e);t.removeListener();a.fire("unlockSnapshot");b&&(a.extractSelectedHtml(),a.fire("saveSnapshot"))},100))}function n(a){var b=a.editor||a.sender.editor;b.getSelection().isInTable()&&g(b,"cut"===a.name)}function p(b){function c(a){a=a.getRanges()[0];var b=a.endContainer.getAscendant("tr",!0);if(b&&a.collapsed){if(a.checkBoundaryOfElement(b,
1133 CKEDITOR.START))return 1;if(a.checkBoundaryOfElement(b,CKEDITOR.END))return 2}return 0}function d(a){var b=0,c;for(c=0;c<a.length;c++)a[c].length>b&&(b=a[c].length);return b}function f(a){var b=a.getAscendant("table"),c=a.getParent().$.rowIndex,b=CKEDITOR.tools.buildTableMap(b),d;for(d=0;d<b[c].length;d++)if((new CKEDITOR.dom.element(b[c][d])).equals(a))return d}var g=b.editor,h=g.getSelection(),k=new CKEDITOR.dom.element("body"),l=0,m=0,n=0,p=0,t={},q,w,J,P,K,S,O;k.setHtml(b.data.dataValue);p=k.findOne("table");
1134 if(h.getRanges().length&&(h.isInTable()||(q=c(h)))&&(w=v(h),w.length)){b.stop();b=w[0].getAscendant("table");w=v(h,b);J=w[0];n=J.getParent();P=w[w.length-1];K=P.getParent();if(!q)for(O=0;O<w.length;O++)w[O].setHtml("");if(1<k.getChildCount()||!p)w[0].setHtml(k.getHtml()),g.fire("saveSnapshot");else{if(q){w=n.getChildCount();n=K=new CKEDITOR.dom.element("tr");n["insert"+(1===q?"Before":"After")](J.getParent());for(O=0;O<w;O++)J=new CKEDITOR.dom.element("td"),J.appendTo(n);J=n.getFirst();P=n.getLast();
1136 O]),w=0;w<h[O].length;w++)if(S=new CKEDITOR.dom.element(h[O][w]),k=q[O]&&q[O][w]?new CKEDITOR.dom.element(q[O][w]):null,S&&!S.getCustomData("processed")){if(k&&k.getParent())S.replace(k);else if(0===w||h[O][w-1])(k=0!==w?new CKEDITOR.dom.element(h[O][w-1]):null)&&m.equals(k.getParent())?S.insertAfter(k):0<l?S.insertAfter(new CKEDITOR.dom.element(m.$.cells[l])):m.append(S,!0);CKEDITOR.dom.element.setMarker(t,S,"processed",!0)}else S.getCustomData("processed")&&k&&k.remove();CKEDITOR.dom.element.clearAllMarkers(t);
1138 a.getEnclosedNode().setText(""):a.deleteContents();CKEDITOR.tools.array.forEach(a._find("td"),function(a){a.appendBogus()})}var c=a.editable();c.attachListener(c,"keydown",function(a){function c(b,d){if(!d.length)return null;var f=a.createRange(),g=CKEDITOR.dom.range.mergeRanges(d);CKEDITOR.tools.array.forEach(g,function(a){a.enlarge(CKEDITOR.ENLARGE_ELEMENT)});var h=g[0].getBoundaryNodes(),k=h.startNode,h=h.endNode;if(k&&k.is&&k.is(e)){for(var l=k.getAscendant("table",!0),m=k.getPreviousSourceNode(!1,
1139 CKEDITOR.NODE_ELEMENT,l),n=!1,p=function(a){return!k.contains(a)&&a.is&&a.is("td","th")};m&&!p(m);)m=m.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT,l);!m&&h&&h.is&&!h.is("table")&&h.getNext()&&(m=h.getNext().findOne("td, th"),n=!0);if(m)f["moveToElementEdit"+(n?"Start":"End")](m);else f.setStartBefore(k.getAscendant("table",!0)),f.collapse(!0);g[0].deleteContents();return[f]}if(k)return f.moveToElementEditablePosition(k),[f]}var d={37:1,38:1,39:1,40:1,8:1,46:1},e=CKEDITOR.tools.extend({table:1},
1140 CKEDITOR.dtd.$tableContent);delete e.td;delete e.th;return function(e){var f=e.data.getKey(),g,h=37===f||38==f,k,l,m;if(d[f]&&(g=a.getSelection())&&g.isInTable()&&g.isFake)if(k=g.getRanges(),l=k[0]._getTableElement(),m=k[k.length-1]._getTableElement(),e.data.preventDefault(),e.cancel(),8<f&&46>f)k[0].moveToElementEditablePosition(h?l:m,!h),g.selectRanges([k[0]]);else{for(e=0;e<k.length;e++)b(k[e]);(e=c(l,k))?k=e:k[0].moveToElementEditablePosition(l);g.selectRanges(k);a.fire("saveSnapshot")}}}(a),
1145 function(b){return a[b]};CKEDITOR.loadTemplates=function(a,c){for(var e=[],l=0,k=a.length;l<k;l++)f[a[l]]||(e.push(a[l]),f[a[l]]=1);e.length?CKEDITOR.scriptLoader.load(e,c):setTimeout(c,0)}}(),CKEDITOR.config.templates_files=[CKEDITOR.getUrl("plugins/templates/templates/default.js")],CKEDITOR.config.templates_replaceContent=!0,"use strict",function(){var a=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],f={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(c){function e(a){g.enabled&&
1146 !1!==a.data.command.canUndo&&g.save()}function f(){g.enabled=c.readOnly?!1:"wysiwyg"==c.mode;g.onChange()}var g=c.undoManager=new b(c),k=g.editingHandler=new l(g),p=c.addCommand("undo",{exec:function(){g.undo()&&(c.selectionChange(),this.fire("afterUndo"))},startDisabled:!0,canUndo:!1}),t=c.addCommand("redo",{exec:function(){g.redo()&&(c.selectionChange(),this.fire("afterRedo"))},startDisabled:!0,canUndo:!1});c.setKeystroke([[a[0],"undo"],[a[1],"redo"],[a[2],"redo"]]);g.onChange=function(){p.setState(g.undoable()?
1147 CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);t.setState(g.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};c.on("beforeCommandExec",e);c.on("afterCommandExec",e);c.on("saveSnapshot",function(a){g.save(a.data&&a.data.contentOnly)});c.on("contentDom",k.attachListeners,k);c.on("instanceReady",function(){c.fire("saveSnapshot")});c.on("beforeModeUnload",function(){"wysiwyg"==c.mode&&g.save(!0)});c.on("mode",f);c.on("readOnly",f);c.ui.addButton&&(c.ui.addButton("Undo",{label:c.lang.undo.undo,
1150 this.index=-1;this.currentImage=null;this.hasRedo=this.hasUndo=!1;this.locked=null;this.resetType()},resetType:function(){this.strokesRecorded=[0,0];this.typing=!1;this.previousKeyGroup=-1},refreshState:function(){this.hasUndo=!!this.getNextImage(!0);this.hasRedo=!!this.getNextImage(!1);this.resetType();this.onChange()},save:function(a,b,e){var f=this.editor;if(this.locked||"ready"!=f.status||"wysiwyg"!=f.mode)return!1;var k=f.editable();if(!k||"ready"!=k.status)return!1;k=this.snapshots;b||(b=new c(f));
1151 if(!1===b.contents)return!1;if(this.currentImage)if(b.equalsContent(this.currentImage)){if(a||b.equalsSelection(this.currentImage))return!1}else!1!==e&&f.fire("change");k.splice(this.index+1,k.length-this.index-1);k.length==this.limit&&k.shift();this.index=k.push(b)-1;this.currentImage=b;!1!==e&&this.refreshState();return!0},restoreImage:function(a){var b=this.editor,c;a.bookmarks&&(b.focus(),c=b.getSelection());this.locked={level:999};this.editor.loadSnapshot(a.contents);a.bookmarks?c.selectBookmarks(a.bookmarks):
1158 a;this.ignoreInputEvent=!1;this.keyEventsStack=new k;this.lastKeydownImage=null};l.prototype={onKeydown:function(d){var e=d.data.getKey();if(229!==e)if(-1<CKEDITOR.tools.indexOf(a,d.data.getKeystroke()))d.data.preventDefault();else if(this.keyEventsStack.cleanUp(d),d=this.undoManager,this.keyEventsStack.getLast(e)||this.keyEventsStack.push(e),this.lastKeydownImage=new c(d.editor),b.isNavigationKey(e)||this.undoManager.keyGroupChanged(e))if(d.strokesRecorded[0]||d.strokesRecorded[1])d.save(!1,this.lastKeydownImage,
1161 null,null,999);c.attachListener(c,CKEDITOR.env.ie?"keypress":"input",e.onInput,e,null,999);c.attachListener(c,"keyup",e.onKeyup,e,null,999);c.attachListener(c,"paste",e.ignoreInputEventListener,e,null,999);c.attachListener(c,"drop",e.ignoreInputEventListener,e,null,999);c.attachListener(c.isInline()?c:a.document.getDocumentElement(),"click",function(){e.onNavigationKey()},null,null,999);c.attachListener(this.undoManager.editor,"blur",function(){e.keyEventsStack.remove(9)},null,null,999)}};var k=CKEDITOR.plugins.undo.KeyEventsStack=
1162 function(){this.stack=[]};k.prototype={push:function(a){a=this.stack.push({keyCode:a,inputs:0});return this.stack[a-1]},getLastIndex:function(a){if("number"!=typeof a)return this.stack.length-1;for(var b=this.stack.length;b--;)if(this.stack[b].keyCode==a)return b;return-1},getLast:function(a){a=this.getLastIndex(a);return-1!=a?this.stack[a]:null},increment:function(a){this.getLast(a).inputs++},remove:function(a){a=this.getLastIndex(a);-1!=a&&this.stack.splice(a,1)},resetInputs:function(a){if("number"==