"),t=t.replace(/<\/?div>/g,"")),CKEDITOR.env.gecko&&e.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(t=t.replace(/^
")&&(t=""+t.replace(/(
){2,}/g,function(e){return n(e.length/4)})+"
")),a(e,t))}function o(){function e(){var e,t={};for(e in CKEDITOR.dtd)"$"!=e.charAt(0)&&"div"!=e&&"span"!=e&&(t[e]=1);return t}var t={};return{get:function(n){return"plain-text"==n?t.plainText||(t.plainText=new CKEDITOR.filter("br")):"semantic-content"==n?((n=t.semanticContent)||(n=new CKEDITOR.filter,n.allow({$1:{elements:e(),attributes:!0,styles:!1,classes:!1}}),n=t.semanticContent=n),n):n?new CKEDITOR.filter(n):null}}}function r(e,t,n){t=CKEDITOR.htmlParser.fragment.fromHtml(t);var i=new CKEDITOR.htmlParser.basicWriter;return n.applyTo(t,!0,!1,e.activeEnterMode),t.writeHtml(i),i.getHtml()}function a(e,t){return e.enterMode==CKEDITOR.ENTER_BR?t=t.replace(/(<\/p>)+/g,function(e){return CKEDITOR.tools.repeat("
",e.length/7*2)}).replace(/<\/?p>/g,""):e.enterMode==CKEDITOR.ENTER_DIV&&(t=t.replace(/<(\/)?p>/g,"<$1div>")),t}function s(e){e.data.preventDefault(),e.data.$.dataTransfer.dropEffect="none"}function l(t){var n=CKEDITOR.plugins.clipboard;t.on("contentDom",function(){function i(n,i,o){i.select(),e(t,{dataTransfer:o,method:"drop"},1),o.sourceEditor.fire("saveSnapshot"),o.sourceEditor.editable().extractHtmlFromRange(n),o.sourceEditor.getSelection().selectRanges([n]),o.sourceEditor.fire("saveSnapshot")}function o(i,o){i.select(),e(t,{dataTransfer:o,method:"drop"},1),n.resetDragDataTransfer()}function r(e,n,i){var o={$:e.data.$,target:e.data.getTarget()};n&&(o.dragRange=n),i&&(o.dropRange=i),!1===t.fire(e.name,o)&&e.data.preventDefault()}function a(e){return e.type!=CKEDITOR.NODE_ELEMENT&&(e=e.getParent()),e.getChildCount()}var s=t.editable(),l=CKEDITOR.plugins.clipboard.getDropTarget(t),c=t.ui.space("top"),u=t.ui.space("bottom");n.preventDefaultDropOnElement(c),n.preventDefaultDropOnElement(u),s.attachListener(l,"dragstart",r),s.attachListener(t,"dragstart",n.resetDragDataTransfer,n,null,1),s.attachListener(t,"dragstart",function(e){n.initDragDataTransfer(e,t)},null,null,2),s.attachListener(t,"dragstart",function(){var e=n.dragRange=t.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(n.dragStartContainerChildCount=e?a(e.startContainer):null,n.dragEndContainerChildCount=e?a(e.endContainer):null)},null,null,100),s.attachListener(l,"dragend",r),s.attachListener(t,"dragend",n.initDragDataTransfer,n,null,1),s.attachListener(t,"dragend",n.resetDragDataTransfer,n,null,100),s.attachListener(l,"dragover",function(e){var t=e.data.getTarget();t&&t.is&&t.is("html")?e.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&e.data.$.dataTransfer.types.contains("Files")&&e.data.preventDefault()}),s.attachListener(l,"drop",function(e){if(!e.data.$.defaultPrevented){e.data.preventDefault();var i=e.data.getTarget();if(!i.isReadOnly()||i.type==CKEDITOR.NODE_ELEMENT&&i.is("html")){var i=n.getRangeAtDropPosition(e,t),o=n.dragRange;i&&r(e,o,i)}}},null,null,9999),s.attachListener(t,"drop",n.initDragDataTransfer,n,null,1),s.attachListener(t,"drop",function(e){if(e=e.data){var r=e.dropRange,a=e.dragRange,s=e.dataTransfer;s.getTransferType(t)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout(function(){n.internalDrop(a,r,s,t)},0):s.getTransferType(t)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?i(a,r,s):o(r,s)}},null,null,9999)})}CKEDITOR.plugins.add("clipboard",{requires:"dialog",init:function(e){var a,s=o();e.config.forcePasteAsPlainText?a="plain-text":e.config.pasteFilter?a=e.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in e.config||(a="semantic-content"),e.pasteFilter=s.get(a),t(e),l(e),CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js")),e.on("paste",function(t){if(t.data.dataTransfer||(t.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer),!t.data.dataValue){var n=t.data.dataTransfer,i=n.getData("text/html");i?(t.data.dataValue=i,t.data.type="html"):(i=n.getData("text/plain"))&&(t.data.dataValue=e.editable().transformPlainTextToHtml(i),t.data.type="text")}},null,null,1),e.on("paste",function(e){var t=e.data.dataValue,n=CKEDITOR.dtd.$block;if(-1 <\/span>/gi," "),"html"!=e.data.type&&(t=t.replace(/]*>([^<]*)<\/span>/gi,function(e,t){return t.replace(/\t/g," ")})),-1')&&(e.data.startsWithEOL=1,e.data.preSniffing="html",t=t.replace(/
/,"")),t=t.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1")),t.match(/^<[^<]+cke_(editable|contents)/i)){var i,o,r=new CKEDITOR.dom.element("div");for(r.setHtml(t);1==r.getChildCount()&&(i=r.getFirst())&&i.type==CKEDITOR.NODE_ELEMENT&&(i.hasClass("cke_editable")||i.hasClass("cke_contents"));)r=o=i;o&&(t=o.getHtml().replace(/
$/i,""))}CKEDITOR.env.ie?t=t.replace(/^ (?: |\r\n)?<(\w+)/g,function(t,i){return i.toLowerCase()in n?(e.data.preSniffing="html","<"+i):t}):CKEDITOR.env.webkit?t=t.replace(/<\/(\w+)>
<\/div>$/,function(t,i){return i in n?(e.data.endsWithEOL=1,""+i+">"):t}):CKEDITOR.env.gecko&&(t=t.replace(/(\s)
$/,"$1")),e.data.dataValue=t},null,null,3),e.on("paste",function(t){t=t.data;var o,a=t.type,l=t.dataValue,c=e.config.clipboard_defaultContentType||"html",u=t.dataTransfer.getTransferType(e);o="html"==a||"html"==t.preSniffing?"html":n(l),"htmlifiedtext"==o&&(l=i(e.config,l)),"text"==a&&"html"==o?l=r(e,l,s.get("plain-text")):u==CKEDITOR.DATA_TRANSFER_EXTERNAL&&e.pasteFilter&&!t.dontFilter&&(l=r(e,l,e.pasteFilter)),t.startsWithEOL&&(l='
'+l),t.endsWithEOL&&(l+='
'),"auto"==a&&(a="html"==o||"html"==c?"html":"text"),t.type=a,t.dataValue=l,delete t.preSniffing,delete t.startsWithEOL,delete t.endsWithEOL},null,null,6),e.on("paste",function(t){t=t.data,t.dataValue&&(e.insertHtml(t.dataValue,t.type,t.range),setTimeout(function(){e.fire("afterPaste")},0))},null,null,1e3),e.on("pasteDialog",function(t){setTimeout(function(){e.openDialog("paste",t.data)},0)})}}),CKEDITOR.plugins.clipboard={isCustomCopyCutSupported:!CKEDITOR.env.ie&&!CKEDITOR.env.iOS,isCustomDataTypesSupported:!CKEDITOR.env.ie,isFileApiSupported:!CKEDITOR.env.ie||9CKEDITOR.env.version||t.isInline()?t:e.document},fixSplitNodesAfterDrop:function(e,t,n,i){function o(e,n,i){var o=e;if(o.type==CKEDITOR.NODE_TEXT&&(o=e.getParent()),o.equals(n)&&i!=n.getChildCount())return e=t.startContainer.getChild(t.startOffset-1),n=t.startContainer.getChild(t.startOffset),e&&e.type==CKEDITOR.NODE_TEXT&&n&&n.type==CKEDITOR.NODE_TEXT&&(i=e.getLength(),e.setText(e.getText()+n.getText()),n.remove(),t.setStart(e,i),t.collapse(!0)),!0}var r=t.startContainer;"number"==typeof i&&"number"==typeof n&&r.type==CKEDITOR.NODE_ELEMENT&&(o(e.startContainer,r,n)||o(e.endContainer,r,i))},isDropRangeAffectedByDragRange:function(e,t){var n=t.startContainer,i=t.endOffset;return!!(e.endContainer.equals(n)&&e.endOffset<=i||e.startContainer.getParent().equals(n)&&e.startContainer.getIndex()CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(t,n,s.dragStartContainerChildCount,s.dragEndContainerChildCount),(a=this.isDropRangeAffectedByDragRange(t,n))||(r=t.createBookmark(!1)),s=n.clone().createBookmark(!1),a&&(r=t.createBookmark(!1)),t=r.startNode,n=r.endNode,a=s.startNode,n&&t.getPosition(a)&CKEDITOR.POSITION_PRECEDING&&n.getPosition(a)&CKEDITOR.POSITION_FOLLOWING&&a.insertBefore(t),t=o.createRange(),t.moveToBookmark(r),l.extractHtmlFromRange(t,1),n=o.createRange(),n.moveToBookmark(s),e(o,{dataTransfer:i,method:"drop",range:n},1),o.fire("unlockSnapshot")},getRangeAtDropPosition:function(e,t){var n=e.data.$,i=n.clientX,o=n.clientY,r=t.getSelection(!0).getRanges()[0],a=t.createRange();if(e.data.testRange)return e.data.testRange;if(document.caretRangeFromPoint)n=t.document.$.caretRangeFromPoint(i,o),a.setStart(CKEDITOR.dom.node(n.startContainer),n.startOffset),a.collapse(!0);else if(n.rangeParent)a.setStart(CKEDITOR.dom.node(n.rangeParent),n.rangeOffset),a.collapse(!0);else{if(CKEDITOR.env.ie&&8l&&!s;l++){if(!s)try{n.moveToPoint(i,o-l),s=!0}catch(c){}if(!s)try{n.moveToPoint(i,o+l),s=!0}catch(u){}}if(s){var d="cke-temp-"+(new Date).getTime();n.pasteHTML('');var f=t.document.getById(d);a.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START),f.remove()}else{var h,p=t.document.$.elementFromPoint(i,o),m=new CKEDITOR.dom.element(p);if(m.equals(t.editable())||"html"==m.getName())return r&&r.startContainer&&!r.startContainer.equals(t.editable())?r:null;h=m.getClientRect(),i/i,bodyRegExp:/([\s\S]*)<\/body>/i,
fragmentRegExp:/\x3c!--(?:Start|End)Fragment--\x3e/g,data:{},files:[],normalizeType:function(e){return e=e.toLowerCase(),"text"==e||"text/plain"==e?"Text":"url"==e?"URL":e}},this.id=this.getData(c),this.id||(this.id="Text"==c?"":"cke-"+CKEDITOR.tools.getUniqueId()),"Text"!=c)try{this.$.setData(c,this.id)}catch(n){}t&&(this.sourceEditor=t,this.setData("text/html",t.getSelectedHtml(1)),"Text"==c||this.getData("text/plain")||this.setData("text/plain",t.getSelection().getSelectedText()))},CKEDITOR.DATA_TRANSFER_INTERNAL=1,CKEDITOR.DATA_TRANSFER_CROSS_EDITORS=2,CKEDITOR.DATA_TRANSFER_EXTERNAL=3,CKEDITOR.plugins.clipboard.dataTransfer.prototype={getData:function(e){e=this._.normalizeType(e);var t=this._.data[e];if(void 0===t||null===t||""===t)try{t=this.$.getData(e)}catch(n){}return void 0!==t&&null!==t&&""!==t||(t=""),"text/html"==e?(t=t.replace(this._.metaRegExp,""),(e=this._.bodyRegExp.exec(t))&&e.length&&(t=e[1],t=t.replace(this._.fragmentRegExp,""))):"Text"==e&&CKEDITOR.env.gecko&&this.getFilesCount()&&"file://"==t.substring(0,7)&&(t=""),t},setData:function(e,t){if(e=this._.normalizeType(e),this._.data[e]=t,CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==e||"Text"==e){"Text"==c&&"Text"==e&&(this.id=t);try{this.$.setData(e,t)}catch(n){}}},getTransferType:function(e){return this.sourceEditor?this.sourceEditor==e?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function e(e){e=i._.normalizeType(e);var t=i.getData(e);t&&(i._.data[e]=t)}if(this.$){var t,n,i=this;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(t=0;t{frame}
'),t=CKEDITOR.addTemplate("panel-frame",''),n=CKEDITOR.addTemplate("panel-frame-inner",'{css}');CKEDITOR.ui.panel.prototype={render:function(i,o){this.getHolderElement=function(){var e=this._.holder;if(!e){if(this.isFramed){var e=this.document.getById(this.id+"_frame"),t=e.getParent(),e=e.getFrameDocument();CKEDITOR.env.iOS&&t.setStyles({overflow:"scroll","-webkit-overflow-scrolling":"touch"}),t=CKEDITOR.tools.addFunction(CKEDITOR.tools.bind(function(){this.isLoaded=!0,this.onLoad&&this.onLoad()},this)),e.write(n.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),onload:"window.parent.CKEDITOR.tools.callFunction("+t+");"},r))),e.getWindow().$.CKEDITOR=CKEDITOR,e.on("keydown",function(e){var t=e.data.getKeystroke(),n=this.document.getById(this.id).getAttribute("dir");this._.onKeyDown&&!1===this._.onKeyDown(t)?e.data.preventDefault():(27==t||t==("rtl"==n?39:37))&&this.onEscape&&!1===this.onEscape(t)&&e.data.preventDefault()},this),e=e.getBody(),e.unselectable(),CKEDITOR.env.air&&CKEDITOR.tools.callFunction(t)}else e=this.document.getById(this.id);this._.holder=e}return e};var r={editorId:i.id,id:this.id,langCode:i.langCode,dir:i.lang.dir,cls:this.className,frame:"",env:CKEDITOR.env.cssClass,"z-index":i.config.baseFloatZIndex+1};if(this.isFramed){var a=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())":"";r.frame=t.output({id:this.id+"_frame",src:a})}return a=e.output(r),o&&o.push(a),a},addBlock:function(e,t){return t=this._.blocks[e]=t instanceof CKEDITOR.ui.panel.block?t:new CKEDITOR.ui.panel.block(this.getHolderElement(),t),this._.currentBlock||this.showBlock(e),t},getBlock:function(e){return this._.blocks[e]},showBlock:function(e){e=this._.blocks[e];var t=this._.currentBlock,n=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");return t&&t.hide(),this._.currentBlock=e,CKEDITOR.fire("ariaWidget",n),e._.focusIndex=-1,this._.onKeyDown=e.onKeyDown&&CKEDITOR.tools.bind(e.onKeyDown,e),e.show(),e},destroy:function(){this.element&&this.element.remove()}},CKEDITOR.ui.panel.block=CKEDITOR.tools.createClass({$:function(e,t){this.element=e.append(e.getDocument().createElement("div",{attributes:{tabindex:-1,"class":"cke_panel_block"},styles:{display:"none"}})),t&&CKEDITOR.tools.extend(this,t),this.element.setAttributes({role:this.attributes.role||"presentation","aria-label":this.attributes["aria-label"],title:this.attributes.title||this.attributes["aria-label"]}),this.keys={},this._.focusIndex=-1,this.element.disableContextMenu()},_:{markItem:function(e){-1!=e&&(e=this.element.getElementsByTag("a").getItem(this._.focusIndex=e),CKEDITOR.env.webkit&&e.getDocument().getWindow().focus(),e.focus(),this.onMark&&this.onMark(e))}},proto:{show:function(){this.element.setStyle("display","")},hide:function(){this.onHide&&!0===this.onHide.call(this)||this.element.setStyle("display","none")},onKeyDown:function(e,t){var n=this.keys[e];switch(n){case"next":for(var i,o=this._.focusIndex,n=this.element.getElementsByTag("a");i=n.getItem(++o);)if(i.getAttribute("_cke_focus")&&i.$.offsetWidth){this._.focusIndex=o,i.focus();break}return!i&&!t&&(this._.focusIndex=-1,this.onKeyDown(e,1));case"prev":for(o=this._.focusIndex,n=this.element.getElementsByTag("a");0n?p+n:t.width>n?p-e.left:p-e.right+t.width):on?p-n:t.width>n?p-e.right+t.width:p-e.left),n=e.top,t.height-e.topi?m-i:t.height>i?m-e.bottom+t.height:m-e.top),CKEDITOR.env.ie&&(t=e=new CKEDITOR.dom.element(c.$.offsetParent),"html"==t.getName()&&(t=t.getDocument().getBody()),"rtl"==t.getComputedStyle("direction")&&(p=CKEDITOR.env.ie8Compat?p-2*c.getDocument().getDocumentElement().$.scrollLeft:p-(e.$.scrollWidth-e.$.clientWidth)));var u,e=c.getFirst();(u=e.getCustomData("activePanel"))&&u.onHide&&u.onHide.call(this,1),e.setCustomData("activePanel",this),c.setStyles({top:m+"px",left:p+"px"}),c.setOpacity(1),r&&r()},this);a.isLoaded?e():a.onLoad=e,CKEDITOR.tools.setTimeout(function(){var e=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus(),s.element.focus(),CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=e),this.allowBlur(!0),this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:0,this),this.visible=1,this.onShow&&this.onShow.call(this)},reposition:function(){var e=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(),this.showBlock.apply(this,e))},focus:function(){if(CKEDITOR.env.webkit){var e=CKEDITOR.document.getActive();e&&!e.equals(this._.iframe)&&e.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var e=this._.iframe.getFrameDocument().getActive();e&&e.is("a")&&(this._.lastFocused=e)},hide:function(e){!this.visible||this.onHide&&!0===this.onHide.call(this)||(this.hideChild(),CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur(),this.element.setStyle("display","none"),this.visible=0,this.element.getFirst().removeCustomData("activePanel"),(e=e&&this._.returnFocus)&&(CKEDITOR.env.webkit&&e.type&&e.getWindow().$.focus(),e.focus()),delete this._.lastFocused,this._.showBlockParams=null,this._.editor.fire("panelHide",this))},allowBlur:function(e){var t=this._.panel;return void 0!==e&&(t.allowBlur=e),t.allowBlur},showAsChild:function(e,t,n,i,o,r){this._.activeChild==e&&e._.panel._.offsetParentId==n.getId()||(this.hideChild(),e.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=e,this._.focused=!1,e.showBlock(t,n,i,o,r),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){e.element.getChild(0).$.style.cssText+=""},100))},hideChild:function(e){var t=this._.activeChild;t&&(delete t.onHide,delete this._.activeChild,t.hide(),e&&this.focus())}}}),CKEDITOR.on("instanceDestroyed",function(){var e,n=CKEDITOR.tools.isEmpty(CKEDITOR.instances);for(e in t){var i=t[e];n?i.destroy():i.element.hide()}n&&(t={})})}(),CKEDITOR.plugins.add("menu",{requires:"floatpanel",beforeInit:function(e){for(var t=e.config.menu_groups.split(","),n=e._.menuGroups={},i=e._.menuItems={},o=0;ot.group?1:e.ordert.order?1:0})}var t=''),i=CKEDITOR.addTemplate("menuArrow",'');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(e,t){t=this._.definition=t||{},this.id=CKEDITOR.tools.getNextId(),this.editor=e,this.items=[],this._.listeners=[],this._.level=t.level||1;var n=CKEDITOR.tools.extend({},t.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-1,block:{}}),i=n.block.attributes=n.attributes||{};!i.role&&(i.role="menu"),this._.panelDefinition=n},_:{onShow:function(){var e=this.editor.getSelection(),t=e&&e.getStartElement(),n=this.editor.elementPath(),i=this._.listeners;this.removeAll();for(var o=0;o