<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[29203] trunk: TinyMCE:</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/29203">29203</a></dd>
<dt>Author</dt> <dd>azaozz</dd>
<dt>Date</dt> <dd>2014-07-17 00:58:41 +0000 (Thu, 17 Jul 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>TinyMCE:
- Update to 4.1.2, changelog: https://github.com/tinymce/tinymce/blob/master/changelog.txt
- Update the tests to 4.1.2.
Fixes <a href="http://core.trac.wordpress.org/ticket/28576">#28576</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludesjstinymcepluginsimagepluginjs">trunk/src/wp-includes/js/tinymce/plugins/image/plugin.js</a></li>
<li><a href="#trunksrcwpincludesjstinymcepluginsimagepluginminjs">trunk/src/wp-includes/js/tinymce/plugins/image/plugin.min.js</a></li>
<li><a href="#trunksrcwpincludesjstinymcepluginsmediapluginjs">trunk/src/wp-includes/js/tinymce/plugins/media/plugin.js</a></li>
<li><a href="#trunksrcwpincludesjstinymcepluginsmediapluginminjs">trunk/src/wp-includes/js/tinymce/plugins/media/plugin.min.js</a></li>
<li><a href="#trunksrcwpincludesjstinymcepluginspastepluginjs">trunk/src/wp-includes/js/tinymce/plugins/paste/plugin.js</a></li>
<li><a href="#trunksrcwpincludesjstinymcepluginspastepluginminjs">trunk/src/wp-includes/js/tinymce/plugins/paste/plugin.min.js</a></li>
<li><a href="#trunksrcwpincludesjstinymcepluginstextcolorpluginjs">trunk/src/wp-includes/js/tinymce/plugins/textcolor/plugin.js</a></li>
<li><a href="#trunksrcwpincludesjstinymcepluginstextcolorpluginminjs">trunk/src/wp-includes/js/tinymce/plugins/textcolor/plugin.min.js</a></li>
<li><a href="#trunksrcwpincludesjstinymceskinslightgrayskinie7mincss">trunk/src/wp-includes/js/tinymce/skins/lightgray/skin.ie7.min.css</a></li>
<li><a href="#trunksrcwpincludesjstinymceskinslightgrayskinmincss">trunk/src/wp-includes/js/tinymce/skins/lightgray/skin.min.css</a></li>
<li><a href="#trunksrcwpincludesjstinymcethemesmodernthemejs">trunk/src/wp-includes/js/tinymce/themes/modern/theme.js</a></li>
<li><a href="#trunksrcwpincludesjstinymcethemesmodernthememinjs">trunk/src/wp-includes/js/tinymce/themes/modern/theme.min.js</a></li>
<li><a href="#trunksrcwpincludesjstinymcetinymcejs">trunk/src/wp-includes/js/tinymce/tinymce.js</a></li>
<li><a href="#trunksrcwpincludesjstinymcetinymceminjs">trunk/src/wp-includes/js/tinymce/tinymce.min.js</a></li>
<li><a href="#trunksrcwpincludesversionphp">trunk/src/wp-includes/version.php</a></li>
<li><a href="#trunktestsquniteditorexternalpluginsnoneditablepluginjs">trunk/tests/qunit/editor/external-plugins/noneditable/plugin.js</a></li>
<li><a href="#trunktestsquniteditorindexhtml">trunk/tests/qunit/editor/index.html</a></li>
<li><a href="#trunktestsquniteditorjsinitjs">trunk/tests/qunit/editor/js/init.js</a></li>
<li><a href="#trunktestsquniteditorpluginsautolinkjs">trunk/tests/qunit/editor/plugins/autolink.js</a></li>
<li><a href="#trunktestsquniteditorpluginspastejs">trunk/tests/qunit/editor/plugins/paste.js</a></li>
<li><a href="#trunktestsquniteditorpluginstablejs">trunk/tests/qunit/editor/plugins/table.js</a></li>
<li><a href="#trunktestsquniteditortinymceEditorjs">trunk/tests/qunit/editor/tinymce/Editor.js</a></li>
<li><a href="#trunktestsquniteditortinymceForceBlocksjs">trunk/tests/qunit/editor/tinymce/ForceBlocks.js</a></li>
<li><a href="#trunktestsquniteditortinymceFormatter_applyjs">trunk/tests/qunit/editor/tinymce/Formatter_apply.js</a></li>
<li><a href="#trunktestsquniteditortinymcedomDOMUtilsjs">trunk/tests/qunit/editor/tinymce/dom/DOMUtils.js</a></li>
<li><a href="#trunktestsquniteditortinymcehtmlSaxParserjs">trunk/tests/qunit/editor/tinymce/html/SaxParser.js</a></li>
<li><a href="#trunktestsquniteditortinymcehtmlSchemajs">trunk/tests/qunit/editor/tinymce/html/Schema.js</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunktestsquniteditorpluginstextpatternjs">trunk/tests/qunit/editor/plugins/textpattern.js</a></li>
<li><a href="#trunktestsquniteditortinymcedomDomQueryjs">trunk/tests/qunit/editor/tinymce/dom/DomQuery.js</a></li>
<li><a href="#trunktestsquniteditortinymceutilColorjs">trunk/tests/qunit/editor/tinymce/util/Color.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludesjstinymcepluginsimagepluginjs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/js/tinymce/plugins/image/plugin.js (29202 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/js/tinymce/plugins/image/plugin.js 2014-07-17 00:49:11 UTC (rev 29202)
+++ trunk/src/wp-includes/js/tinymce/plugins/image/plugin.js 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -216,20 +216,28 @@
</span><span class="cx"> return value;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function srcChange() {
</del><ins>+ function srcChange(e) {
+ var meta = e.meta || {};
+
</ins><span class="cx"> if (imageListCtrl) {
</span><span class="cx"> imageListCtrl.value(editor.convertURL(this.value(), 'src'));
</span><span class="cx"> }
</span><span class="cx">
</span><del>- getImageSize(this.value(), function(data) {
- if (data.width && data.height && imageDimensions) {
- width = data.width;
- height = data.height;
</del><ins>+ tinymce.each(meta, function(value, key) {
+ win.find('#' + key).value(value);
+ });
</ins><span class="cx">
</span><del>- win.find('#width').value(width);
- win.find('#height').value(height);
- }
- });
</del><ins>+ if (!meta.width && !meta.height) {
+ getImageSize(this.value(), function(data) {
+ if (data.width && data.height && imageDimensions) {
+ width = data.width;
+ height = data.height;
+
+ win.find('#width').value(width);
+ win.find('#height').value(height);
+ }
+ });
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> width = dom.getAttrib(imgElm, 'width');
</span><span class="lines">@@ -297,7 +305,14 @@
</span><span class="cx">
</span><span class="cx"> // General settings shared between simple and advanced dialogs
</span><span class="cx"> var generalFormItems = [
</span><del>- {name: 'src', type: 'filepicker', filetype: 'image', label: 'Source', autofocus: true, onchange: srcChange},
</del><ins>+ {
+ name: 'src',
+ type: 'filepicker',
+ filetype: 'image',
+ label: 'Source',
+ autofocus: true,
+ onchange: srcChange
+ },
</ins><span class="cx"> imageListCtrl
</span><span class="cx"> ];
</span><span class="cx">
</span></span></pre></div>
<a id="trunksrcwpincludesjstinymcepluginsimagepluginminjs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/js/tinymce/plugins/image/plugin.min.js (29202 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/js/tinymce/plugins/image/plugin.min.js 2014-07-17 00:49:11 UTC (rev 29202)
+++ trunk/src/wp-includes/js/tinymce/plugins/image/plugin.min.js 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -1 +1 @@
</span><del>-tinymce.PluginManager.add("image",function(a){function b(a,b){function c(a,c){d.parentNode&&d.parentNode.removeChild(d),b({width:a,height:c})}var d=document.createElement("img");d.onload=function(){c(d.clientWidth,d.clientHeight)},d.onerror=function(){c()};var e=d.style;e.visibility="hidden",e.position="fixed",e.bottom=e.left=0,e.width=e.height="auto",document.body.appendChild(d),d.src=a}function c(a,b,c){function d(a,c){return c=c||[],tinymce.each(a,function(a){var e={text:a.text||a.title};a.menu?e.menu=d(a.menu):(e.value=a.value,b(e)),c.push(e)}),c}return d(a,c||[])}function d(b){return function(){var c=a.settings.image_list;"string"==typeof c?tinymce.util.XHR.send({url:c,success:function(a){b(tinymce.util.JSON.parse(a))}}):"function"==typeof c?c(b):b(c)}}function e(d){function e(){var a,b,c,d;a=j.find("#width")[0],b=j.find("#height")[0],a&&b&&(c=a.value(),
d=b.value(),j.find("#constrain")[0].checked()&&k&&l&&c&&d&&(k!=c?(d=Math.round(c/k*d),b.value(d)):(c=Math.round(d/l*c),a.value(c))),k=c,l=d)}function f(){function b(b){function c(){b.onload=b.onerror=null,a.selection&&(a.selection.select(b),a.nodeChanged())}b.onload=function(){o.width||o.height||!r||(p.setAttribs(b,{width:b.clientWidth,height:b.clientHeight}),a.fire("wpNewImageRefresh",{node:b})),c()},b.onerror=c}i(),e(),o=tinymce.extend(o,j.toJSON());var c=o.caption;o.alt||(o.alt=""),""===o.width&&(o.width=null),""===o.height&&(o.height=null),o.style||(o.style=null),o={src:o.src,alt:o.alt,width:o.width,height:o.height,style:o.style,"class":o["class"]},a.undoManager.transact(function(){var d={node:q,data:o,caption:c};return a.fire("wpImageFormSubmit",{imgData:d}),d.cancel?void b(d.node):o.src?(q?p.setAttribs(q,o):(o.id="__mcenew",a
.focus(),a.selection.setContent(p.createHTML("img",o)),q=p.get("__mcenew"),p.setAttrib(q,"id",null)),void b(q)):void(q&&(p.remove(q),a.focus(),a.nodeChanged()))})}function g(a){return a&&(a=a.replace(/px$/,"")),a}function h(){m&&m.value(a.convertURL(this.value(),"src")),b(this.value(),function(a){a.width&&a.height&&r&&(k=a.width,l=a.height,j.find("#width").value(k),j.find("#height").value(l))})}function i(){function b(a){return a.length>0&&/^[0-9]+$/.test(a)&&(a+="px"),a}if(a.settings.image_advtab){var c=j.toJSON(),d=p.parseStyle(c.style);delete d.margin,d["margin-top"]=d["margin-bottom"]=b(c.vspace),d["margin-left"]=d["margin-right"]=b(c.hspace),d["border-width"]=b(c.border),j.find("#style").value(p.serializeStyle(p.parseStyle(p.serializeStyle(d))))}}var j,k,l,m,n,o={},p=a.dom,q
=a.selection.getNode(),r=a.settings.image_dimensions!==!1;k=p.getAttrib(q,"width"),l=p.getAttrib(q,"height"),"IMG"!=q.nodeName||q.getAttribute("data-mce-object")||q.getAttribute("data-mce-placeholder")?q=null:(o={src:p.getAttrib(q,"src"),alt:p.getAttrib(q,"alt"),"class":p.getAttrib(q,"class"),width:k,height:l},a.fire("wpLoadImageData",{imgData:{data:o,node:q}})),d&&(m={type:"listbox",label:"Image list",values:c(d,function(b){b.value=a.convertURL(b.value||b.url,"src")},[{text:"None",value:""}]),value:o.src&&a.convertURL(o.src,"src"),onselect:function(a){var b=j.find("#alt");(!b.value()||a.lastControl&&b.value()==a.lastControl.text())&&b.value(a.control.text()),j.find("#src").value(a.control.value()).fire("change")},onPostRender:function(){m=this}}),a.settings.image_
class_list&&(n={name:"class",type:"listbox",label:"Class",values:c(a.settings.image_class_list,function(b){b.value&&(b.textStyle=function(){return a.formatter.getCssText({inline:"img",classes:[b.value]})})})});var s=[{name:"src",type:"filepicker",filetype:"image",label:"Source",autofocus:!0,onchange:h},m];a.settings.image_description!==!1&&s.push({name:"alt",type:"textbox",label:"Image description"}),r&&s.push({type:"container",label:"Dimensions",layout:"flex",direction:"row",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:3,onchange:e,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:3,onchange:e,ariaLabel:"Height"},{name:"constrain",ty
pe:"checkbox",checked:!0,text:"Constrain proportions"}]}),s.push(n),a.fire("wpLoadImageForm",{data:s}),a.settings.image_advtab?(q&&(o.hspace=g(q.style.marginLeft||q.style.marginRight),o.vspace=g(q.style.marginTop||q.style.marginBottom),o.border=g(q.style.borderWidth),o.style=a.dom.serializeStyle(a.dom.parseStyle(a.dom.getAttrib(q,"style")))),j=a.windowManager.open({title:"Insert/edit image",data:o,bodyType:"tabpanel",body:[{title:"General",type:"form",items:s},{title:"Advanced",type:"form",pack:"start",items:[{label:"Style",name:"style",type:"textbox"},{type:"form",layout:"grid",packV:"start",columns:2,padding:0,alignH:["left","right"],defaults:{type:"textbox",maxWidth:50,onchange:i},items:[{label:"Vertical space",name:"vspace"},{label:"Horizontal space&
quot;,name:"hspace"},{label:"Border",name:"border"}]}]}],onSubmit:f})):j=a.windowManager.open({title:"Insert/edit image",data:o,body:s,onSubmit:f})}a.addButton("image",{icon:"image",tooltip:"Insert/edit image",onclick:d(e),stateSelector:"img:not([data-mce-object],[data-mce-placeholder])"}),a.addMenuItem("image",{icon:"image",text:"Insert image",onclick:d(e),context:"insert",prependToContext:!0}),a.addCommand("mceImage",d(e))});
</del><span class="cx">\ No newline at end of file
</span><ins>+tinymce.PluginManager.add("image",function(a){function b(a,b){function c(a,c){d.parentNode&&d.parentNode.removeChild(d),b({width:a,height:c})}var d=document.createElement("img");d.onload=function(){c(d.clientWidth,d.clientHeight)},d.onerror=function(){c()};var e=d.style;e.visibility="hidden",e.position="fixed",e.bottom=e.left=0,e.width=e.height="auto",document.body.appendChild(d),d.src=a}function c(a,b,c){function d(a,c){return c=c||[],tinymce.each(a,function(a){var e={text:a.text||a.title};a.menu?e.menu=d(a.menu):(e.value=a.value,b(e)),c.push(e)}),c}return d(a,c||[])}function d(b){return function(){var c=a.settings.image_list;"string"==typeof c?tinymce.util.XHR.send({url:c,success:function(a){b(tinymce.util.JSON.parse(a))}}):"function"==typeof c?c(b):b(c)}}function e(d){function e(){var a,b,c,d;a=j.find("#width")[0],b=j.find("#height")[0],a&&b&&(c=a.value(),
d=b.value(),j.find("#constrain")[0].checked()&&k&&l&&c&&d&&(k!=c?(d=Math.round(c/k*d),b.value(d)):(c=Math.round(d/l*c),a.value(c))),k=c,l=d)}function f(){function b(b){function c(){b.onload=b.onerror=null,a.selection&&(a.selection.select(b),a.nodeChanged())}b.onload=function(){o.width||o.height||!r||(p.setAttribs(b,{width:b.clientWidth,height:b.clientHeight}),a.fire("wpNewImageRefresh",{node:b})),c()},b.onerror=c}i(),e(),o=tinymce.extend(o,j.toJSON());var c=o.caption;o.alt||(o.alt=""),""===o.width&&(o.width=null),""===o.height&&(o.height=null),o.style||(o.style=null),o={src:o.src,alt:o.alt,width:o.width,height:o.height,style:o.style,"class":o["class"]},a.undoManager.transact(function(){var d={node:q,data:o,caption:c};return a.fire("wpImageFormSubmit",{imgData:d}),d.cancel?void b(d.node):o.src?(q?p.setAttribs(q,o):(o.id="__mcenew",a
.focus(),a.selection.setContent(p.createHTML("img",o)),q=p.get("__mcenew"),p.setAttrib(q,"id",null)),void b(q)):void(q&&(p.remove(q),a.focus(),a.nodeChanged()))})}function g(a){return a&&(a=a.replace(/px$/,"")),a}function h(c){var d=c.meta||{};m&&m.value(a.convertURL(this.value(),"src")),tinymce.each(d,function(a,b){j.find("#"+b).value(a)}),d.width||d.height||b(this.value(),function(a){a.width&&a.height&&r&&(k=a.width,l=a.height,j.find("#width").value(k),j.find("#height").value(l))})}function i(){function b(a){return a.length>0&&/^[0-9]+$/.test(a)&&(a+="px"),a}if(a.settings.image_advtab){var c=j.toJSON(),d=p.parseStyle(c.style);delete d.margin,d["margin-top"]=d["margin-bottom"]=b(c.vspace),d["margin-left"]=d["margin-right"]=b(c.hspace),d["border-width"]=b(c.border),j.find("#
style").value(p.serializeStyle(p.parseStyle(p.serializeStyle(d))))}}var j,k,l,m,n,o={},p=a.dom,q=a.selection.getNode(),r=a.settings.image_dimensions!==!1;k=p.getAttrib(q,"width"),l=p.getAttrib(q,"height"),"IMG"!=q.nodeName||q.getAttribute("data-mce-object")||q.getAttribute("data-mce-placeholder")?q=null:(o={src:p.getAttrib(q,"src"),alt:p.getAttrib(q,"alt"),"class":p.getAttrib(q,"class"),width:k,height:l},a.fire("wpLoadImageData",{imgData:{data:o,node:q}})),d&&(m={type:"listbox",label:"Image list",values:c(d,function(b){b.value=a.convertURL(b.value||b.url,"src")},[{text:"None",value:""}]),value:o.src&&a.convertURL(o.src,"src"),onselect:function(a){var b=j.find("#alt");(!b.value()||a.lastControl&&b.value()==a.lastControl.text())&&b.value(a.control.text()),j.find("#src").v
alue(a.control.value()).fire("change")},onPostRender:function(){m=this}}),a.settings.image_class_list&&(n={name:"class",type:"listbox",label:"Class",values:c(a.settings.image_class_list,function(b){b.value&&(b.textStyle=function(){return a.formatter.getCssText({inline:"img",classes:[b.value]})})})});var s=[{name:"src",type:"filepicker",filetype:"image",label:"Source",autofocus:!0,onchange:h},m];a.settings.image_description!==!1&&s.push({name:"alt",type:"textbox",label:"Image description"}),r&&s.push({type:"container",label:"Dimensions",layout:"flex",direction:"row",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:3,onchange:e,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"tex
tbox",maxLength:5,size:3,onchange:e,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}),s.push(n),a.fire("wpLoadImageForm",{data:s}),a.settings.image_advtab?(q&&(o.hspace=g(q.style.marginLeft||q.style.marginRight),o.vspace=g(q.style.marginTop||q.style.marginBottom),o.border=g(q.style.borderWidth),o.style=a.dom.serializeStyle(a.dom.parseStyle(a.dom.getAttrib(q,"style")))),j=a.windowManager.open({title:"Insert/edit image",data:o,bodyType:"tabpanel",body:[{title:"General",type:"form",items:s},{title:"Advanced",type:"form",pack:"start",items:[{label:"Style",name:"style",type:"textbox"},{type:"form",layout:"grid",packV:"start",columns:2,padding:0,alignH:["left","right"],defaults:{type:"textbox",maxWidth:50,onchang
e:i},items:[{label:"Vertical space",name:"vspace"},{label:"Horizontal space",name:"hspace"},{label:"Border",name:"border"}]}]}],onSubmit:f})):j=a.windowManager.open({title:"Insert/edit image",data:o,body:s,onSubmit:f})}a.addButton("image",{icon:"image",tooltip:"Insert/edit image",onclick:d(e),stateSelector:"img:not([data-mce-object],[data-mce-placeholder])"}),a.addMenuItem("image",{icon:"image",text:"Insert image",onclick:d(e),context:"insert",prependToContext:!0}),a.addCommand("mceImage",d(e))});
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunksrcwpincludesjstinymcepluginsmediapluginjs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/js/tinymce/plugins/media/plugin.js (29202 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/js/tinymce/plugins/media/plugin.js 2014-07-17 00:49:11 UTC (rev 29202)
+++ trunk/src/wp-includes/js/tinymce/plugins/media/plugin.js 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -20,6 +20,8 @@
</span><span class="cx"> {regex: /maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/, type: 'iframe', w: 425, h: 350, url: '//maps.google.com/maps/ms?msid=$2&output=embed"'}
</span><span class="cx"> ];
</span><span class="cx">
</span><ins>+ var embedChange = (tinymce.Env.ie && tinymce.Env.ie <= 8) ? 'onChange' : 'onInput';
+
</ins><span class="cx"> function guessMime(url) {
</span><span class="cx"> if (url.indexOf('.mp3') != -1) {
</span><span class="cx"> return 'audio/mpeg';
</span><span class="lines">@@ -62,8 +64,21 @@
</span><span class="cx">
</span><span class="cx"> function showDialog() {
</span><span class="cx"> var win, width, height, data;
</span><ins>+
</ins><span class="cx"> var generalFormItems = [
</span><del>- {name: 'source1', type: 'filepicker', filetype: 'media', size: 40, autofocus: true, label: 'Source'}
</del><ins>+ {
+ name: 'source1',
+ type: 'filepicker',
+ filetype: 'media',
+ size: 40,
+ autofocus: true,
+ label: 'Source',
+ onchange: function(e) {
+ tinymce.each(e.meta, function(value, key) {
+ win.find('#' + key).value(value);
+ });
+ }
+ }
</ins><span class="cx"> ];
</span><span class="cx">
</span><span class="cx"> function recalcSize(e) {
</span><span class="lines">@@ -117,6 +132,23 @@
</span><span class="cx"> width = data.width;
</span><span class="cx"> height = data.height;
</span><span class="cx">
</span><ins>+ var embedTextBox = {
+ id: 'mcemediasource',
+ type: 'textbox',
+ flex: 1,
+ name: 'embed',
+ value: getSource(),
+ multiline: true,
+ label: 'Source'
+ };
+
+ function updateValueOnChange() {
+ data = htmlToData( this.value() );
+ this.parent().parent().fromJSON(data);
+ }
+
+ embedTextBox[embedChange] = updateValueOnChange;
+
</ins><span class="cx"> win = editor.windowManager.open({
</span><span class="cx"> title: 'Insert/edit video',
</span><span class="cx"> data: data,
</span><span class="lines">@@ -149,15 +181,7 @@
</span><span class="cx"> text: 'Paste your embed code below:',
</span><span class="cx"> forId: 'mcemediasource'
</span><span class="cx"> },
</span><del>- {
- id: 'mcemediasource',
- type: 'textbox',
- flex: 1,
- name: 'embed',
- value: getSource(),
- multiline: true,
- label: 'Source'
- }
</del><ins>+ embedTextBox
</ins><span class="cx"> ]
</span><span class="cx"> }
</span><span class="cx"> ],
</span><span class="lines">@@ -420,7 +444,7 @@
</span><span class="cx"> width: data.width,
</span><span class="cx"> height: data.height
</span><span class="cx"> });
</span><del>- break;
</del><ins>+ break;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (updateAll) {
</span><span class="lines">@@ -436,13 +460,13 @@
</span><span class="cx"> src: ""
</span><span class="cx"> });
</span><span class="cx"> }
</span><del>- break;
</del><ins>+ break;
</ins><span class="cx">
</span><span class="cx"> case "iframe":
</span><span class="cx"> setAttributes(attrs, {
</span><span class="cx"> src: data.source1
</span><span class="cx"> });
</span><del>- break;
</del><ins>+ break;
</ins><span class="cx">
</span><span class="cx"> case "source":
</span><span class="cx"> sourceCount++;
</span><span class="lines">@@ -457,7 +481,7 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>- break;
</del><ins>+ break;
</ins><span class="cx">
</span><span class="cx"> case "img":
</span><span class="cx"> if (!data.poster) {
</span><span class="lines">@@ -523,7 +547,7 @@
</span><span class="cx"> // Make sure that any messy HTML is retained inside these
</span><span class="cx"> var specialElements = editor.schema.getSpecialElements();
</span><span class="cx"> tinymce.each('video audio iframe object'.split(' '), function(name) {
</span><del>- specialElements[name] = new RegExp('<\/' + name + '[^>]*>','gi');
</del><ins>+ specialElements[name] = new RegExp('<\/' + name + '[^>]*>', 'gi');
</ins><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> // Allow elements
</span></span></pre></div>
<a id="trunksrcwpincludesjstinymcepluginsmediapluginminjs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/js/tinymce/plugins/media/plugin.min.js (29202 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/js/tinymce/plugins/media/plugin.min.js 2014-07-17 00:49:11 UTC (rev 29202)
+++ trunk/src/wp-includes/js/tinymce/plugins/media/plugin.min.js 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -1 +1 @@
</span><del>-tinymce.PluginManager.add("media",function(e,t){function i(e){return-1!=e.indexOf(".mp3")?"audio/mpeg":-1!=e.indexOf(".wav")?"audio/wav":-1!=e.indexOf(".mp4")?"video/mp4":-1!=e.indexOf(".webm")?"video/webm":-1!=e.indexOf(".ogg")?"video/ogg":-1!=e.indexOf(".swf")?"application/x-shockwave-flash":""}function r(t){var i=e.settings.media_scripts;if(i)for(var r=0;r<i.length;r++)if(-1!==t.indexOf(i[r].filter))return i[r]}function o(){function t(e){var t,a,c,s;t=i.find("#width")[0],a=i.find("#height")[0],c=t.value(),s=a.value(),i.find("#constrain")[0].checked()&&r&&o&&c&&s&&(e.control==t?(s=Math.round(c/r*s),a.value(s)):(c=Math.round(s/o*c),t.value(c))),r=c,o=s}var i,r,o,m,d=[{name:"source1",type:"filepicker",filetype:"media",size:40,autofo
cus:!0,label:"Source"}];e.settings.media_alt_source!==!1&&d.push({name:"source2",type:"filepicker",filetype:"media",size:40,label:"Alternative source"}),e.settings.media_poster!==!1&&d.push({name:"poster",type:"filepicker",filetype:"image",size:40,label:"Poster"}),e.settings.media_dimensions!==!1&&d.push({type:"container",label:"Dimensions",layout:"flex",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:3,size:3,onchange:t},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:3,size:3,onchange:t},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}),m=n(e.selection.getNode()),r=m.width,o=m.height,i=e.windowManager.open({title:"Insert/edit video",data:m,bodyType:"tabpanel&qu
ot;,body:[{title:"General",type:"form",onShowTab:function(){m=s(this.next().find("#embed").value()),this.fromJSON(m)},items:d},{title:"Embed",type:"panel",layout:"flex",direction:"column",align:"stretch",padding:10,spacing:10,onShowTab:function(){this.find("#embed").value(c(this.parent().toJSON()))},items:[{type:"label",text:"Paste your embed code below:",forId:"mcemediasource"},{id:"mcemediasource",type:"textbox",flex:1,name:"embed",value:a(),multiline:!0,label:"Source"}]}],onSubmit:function(){var t,i,r,o;for(t=e.dom.select("img[data-mce-object]"),e.insertContent(c(this.toJSON())),i=e.dom.select("img[data-mce-object]"),r=0;r<t.length;r++)for(o=i.length-1;o>=0;o--)t[r]==i[o]&&i.splice(o,1);e.selection.select(i[0]),e.nodeChanged()}})}function a(){var t=e.selection.getNode();return t.getAttribu
te("data-mce-object")?e.selection.getContent():void 0}function c(o){var a="";if(!o.source1&&(tinymce.extend(o,s(o.embed)),!o.source1))return"";if(o.source2||(o.source2=""),o.poster||(o.poster=""),o.source1=e.convertURL(o.source1,"source"),o.source2=e.convertURL(o.source2,"source"),o.source1mime=i(o.source1),o.source2mime=i(o.source2),o.poster=e.convertURL(o.poster,"poster"),o.flashPlayerUrl=e.convertURL(t+"/moxieplayer.swf","movie"),tinymce.each(d,function(e){var t,i,r;if(t=e.regex.exec(o.source1)){for(r=e.url,i=0;t[i];i++)r=r.replace("$"+i,function(){return t[i]});o.source1=r,o.type=e.type,o.width=o.width||e.w,o.height=o.height||e.h}}),o.embed)a=m(o.embed,o,!0);else{var c=r(o.source1);c&&(o.type="script",o.width=c.width,o.height=c.height),o.width=o.width||300,o.height=o.height||150,tinymce.each(o,function(t,i){o[i]=e.dom.encode(t)}),"iframe&qu
ot;==o.type?a+='<iframe src="'+o.source1+'" width="'+o.width+'" height="'+o.height+'"></iframe>':"application/x-shockwave-flash"==o.source1mime?(a+='<object data="'+o.source1+'" width="'+o.width+'" height="'+o.height+'" type="application/x-shockwave-flash">',o.poster&&(a+='<img src="'+o.poster+'" width="'+o.width+'" height="'+o.height+'" />'),a+="</object>"):-1!=o.source1mime.indexOf("audio")?e.settings.audio_template_callback?a=e.settings.audio_template_callback(o):a+='<audio controls="controls" src="'+o.source1+'">'+(o.source2?'\n<source src="'+o.source2+'"'+(o.source2mime?' type="'+o.source2mime+'"':"")+" />\n":"")+"</audio>":"script"==o.type?a+='<script src="'+o.source1+'"></script>':a=
e.settings.video_template_callback?e.settings.video_template_callback(o):'<video width="'+o.width+'" height="'+o.height+'"'+(o.poster?' poster="'+o.poster+'"':"")+' controls="controls">\n<source src="'+o.source1+'"'+(o.source1mime?' type="'+o.source1mime+'"':"")+" />\n"+(o.source2?'<source src="'+o.source2+'"'+(o.source2mime?' type="'+o.source2mime+'"':"")+" />\n":"")+"</video>"}return a}function s(e){var t={};return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!0,special:"script,noscript",start:function(e,i){if(t.source1||"param"!=e||(t.source1=i.map.movie),("iframe"==e||"object"==e||"embed"==e||"video"==e||"audio"==e)&&(t.type||(t.type=e),t=tinymce.extend(i.map,t)),"script"==e){var o=r(i.map.src);if(!o
)return;t={type:"script",source1:i.map.src,width:o.width,height:o.height}}"source"==e&&(t.source1?t.source2||(t.source2=i.map.src):t.source1=i.map.src),"img"!=e||t.poster||(t.poster=i.map.src)}}).parse(e),t.source1=t.source1||t.src||t.data,t.source2=t.source2||"",t.poster=t.poster||"",t}function n(t){return t.getAttribute("data-mce-object")?s(e.serializer.serialize(t,{selection:!0})):{}}function m(e,t,i){function r(e,t){var i,r,o,a;for(i in t)if(o=""+t[i],e.map[i])for(r=e.length;r--;)a=e[r],a.name==i&&(o?(e.map[i]=o,a.value=o):(delete e.map[i],e.splice(r,1)));else o&&(e.push({name:i,value:o}),e.map[i]=o)}var o,a=new tinymce.html.Writer,c=0;return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!0,special:"script,noscript",comment:function(e){a.comment(e)},cdata:function(e){a.cdata(e)},text:function(e,t){a.text(e,t)},start:function(e,s,n){switch(e){case"vide
o":case"object":case"embed":case"img":case"iframe":r(s,{width:t.width,height:t.height})}if(i)switch(e){case"video":r(s,{poster:t.poster,src:""}),t.source2&&r(s,{src:""});break;case"iframe":r(s,{src:t.source1});break;case"source":if(c++,2>=c&&(r(s,{src:t["source"+c],type:t["source"+c+"mime"]}),!t["source"+c]))return;break;case"img":if(!t.poster)return;o=!0}a.start(e,s,n)},end:function(e){if("video"==e&&i)for(var s=1;2>=s;s++)if(t["source"+s]){var n=[];n.map={},s>c&&(r(n,{src:t["source"+s],type:t["source"+s+"mime"]}),a.start("source",n,!0))}if(t.poster&&"object"==e&&i&&!o){var m=[];m.map={},r(m,{src:t.poster,width:t.width,height:t.height}),a.start("img",m,!0)}a.end(e)}},new tinymce.html.Schema({})).p
arse(e),a.getContent()}var d=[{regex:/youtu\.be\/([\w\-.]+)/,type:"iframe",w:425,h:350,url:"//www.youtube.com/embed/$1"},{regex:/youtube\.com(.+)v=([^&]+)/,type:"iframe",w:425,h:350,url:"//www.youtube.com/embed/$2"},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc"},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'//maps.google.com/maps/ms?msid=$2&output=embed"'}];e.on("ResolveName",function(e){var t;1==e.target.nodeType&&(t=e.target.getAttribute("data-mce-object"))&&(e.name=t)}),e.on("preInit",function(){var t=e.schema.getSpecialElements();tinymce.each("video audio iframe object".split(" "),function(e){t[e]=new RegExp("</"+e+"[^>]*>","gi")});var i=e.schema.getBoolAttr
s();tinymce.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(e){i[e]={}}),e.parser.addNodeFilter("iframe,video,audio,object,embed,script",function(t,i){for(var o,a,c,s,n,m,d,u,l=t.length;l--;)if(a=t[l],a.parent&&("script"!=a.name||(u=r(a.attr("src"))))){for(c=new tinymce.html.Node("img",1),c.shortEnded=!0,u&&(u.width&&a.attr("width",u.width.toString()),u.height&&a.attr("height",u.height.toString())),m=a.attributes,o=m.length;o--;)s=m[o].name,n=m[o].value,"width"!==s&&"height"!==s&&"style"!==s&&(("data"==s||"src"==s)&&(n=e.convertURL(n,s)),c.attr("data-mce-p-"+s,n));d=a.firstChild&&a.firstChild.value,d&&(c.attr("data-mce-html",escape(d)),c.firstChild=null),c.attr({width:a.attr("width")||"300",height:a.at
tr("height")||("audio"==i?"30":"150"),style:a.attr("style"),src:tinymce.Env.transparentSrc,"data-mce-object":i,"class":"mce-object mce-object-"+i}),a.replace(c)}}),e.serializer.addAttributeFilter("data-mce-object",function(e,t){for(var i,r,o,a,c,s,n,m=e.length;m--;)if(i=e[m],i.parent){for(n=i.attr(t),r=new tinymce.html.Node(n,1),"audio"!=n&&"script"!=n&&r.attr({width:i.attr("width"),height:i.attr("height")}),r.attr({style:i.attr("style")}),a=i.attributes,o=a.length;o--;){var d=a[o].name;0===d.indexOf("data-mce-p-")&&r.attr(d.substr(11),a[o].value)}"script"==n&&r.attr("type","text/javascript"),c=i.attr("data-mce-html"),c&&(s=new tinymce.html.Node("#text",3),s.raw=!0,s.value=unescape(c),r.append(s)),i.replace(r)}})}),e.on("ObjectSelected",
function(e){var t=e.target.getAttribute("data-mce-object");("audio"==t||"script"==t)&&e.preventDefault()}),e.on("objectResized",function(e){var t,i=e.target;i.getAttribute("data-mce-object")&&(t=i.getAttribute("data-mce-html"),t&&(t=unescape(t),i.setAttribute("data-mce-html",escape(m(t,{width:e.width,height:e.height})))))}),e.addButton("media",{tooltip:"Insert/edit video",onclick:o,stateSelector:["img[data-mce-object=video]","img[data-mce-object=iframe]"]}),e.addMenuItem("media",{icon:"media",text:"Insert video",onclick:o,context:"insert",prependToContext:!0})});
</del><span class="cx">\ No newline at end of file
</span><ins>+tinymce.PluginManager.add("media",function(e,t){function i(e){return-1!=e.indexOf(".mp3")?"audio/mpeg":-1!=e.indexOf(".wav")?"audio/wav":-1!=e.indexOf(".mp4")?"video/mp4":-1!=e.indexOf(".webm")?"video/webm":-1!=e.indexOf(".ogg")?"video/ogg":-1!=e.indexOf(".swf")?"application/x-shockwave-flash":""}function r(t){var i=e.settings.media_scripts;if(i)for(var r=0;r<i.length;r++)if(-1!==t.indexOf(i[r].filter))return i[r]}function o(){function t(e){var t,i,a,c;t=r.find("#width")[0],i=r.find("#height")[0],a=t.value(),c=i.value(),r.find("#constrain")[0].checked()&&o&&m&&a&&c&&(e.control==t?(c=Math.round(a/o*c),i.value(c)):(a=Math.round(c/m*a),t.value(a))),o=a,m=c}function i(){u=n(this.value()),this.parent().parent().fromJSON(u)}var r,o,m,u,l=[{name:"source1",typ
e:"filepicker",filetype:"media",size:40,autofocus:!0,label:"Source",onchange:function(e){tinymce.each(e.meta,function(e,t){r.find("#"+t).value(e)})}}];e.settings.media_alt_source!==!1&&l.push({name:"source2",type:"filepicker",filetype:"media",size:40,label:"Alternative source"}),e.settings.media_poster!==!1&&l.push({name:"poster",type:"filepicker",filetype:"image",size:40,label:"Poster"}),e.settings.media_dimensions!==!1&&l.push({type:"container",label:"Dimensions",layout:"flex",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:3,size:3,onchange:t},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:3,size:3,onchange:t},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain propor
tions"}]}),u=s(e.selection.getNode()),o=u.width,m=u.height;var h={id:"mcemediasource",type:"textbox",flex:1,name:"embed",value:a(),multiline:!0,label:"Source"};h[d]=i,r=e.windowManager.open({title:"Insert/edit video",data:u,bodyType:"tabpanel",body:[{title:"General",type:"form",onShowTab:function(){u=n(this.next().find("#embed").value()),this.fromJSON(u)},items:l},{title:"Embed",type:"panel",layout:"flex",direction:"column",align:"stretch",padding:10,spacing:10,onShowTab:function(){this.find("#embed").value(c(this.parent().toJSON()))},items:[{type:"label",text:"Paste your embed code below:",forId:"mcemediasource"},h]}],onSubmit:function(){var t,i,r,o;for(t=e.dom.select("img[data-mce-object]"),e.insertContent(c(this.toJSON())),i=e.dom.select("img[data-mce-object]"),r=0;r<t.length
;r++)for(o=i.length-1;o>=0;o--)t[r]==i[o]&&i.splice(o,1);e.selection.select(i[0]),e.nodeChanged()}})}function a(){var t=e.selection.getNode();return t.getAttribute("data-mce-object")?e.selection.getContent():void 0}function c(o){var a="";if(!o.source1&&(tinymce.extend(o,n(o.embed)),!o.source1))return"";if(o.source2||(o.source2=""),o.poster||(o.poster=""),o.source1=e.convertURL(o.source1,"source"),o.source2=e.convertURL(o.source2,"source"),o.source1mime=i(o.source1),o.source2mime=i(o.source2),o.poster=e.convertURL(o.poster,"poster"),o.flashPlayerUrl=e.convertURL(t+"/moxieplayer.swf","movie"),tinymce.each(u,function(e){var t,i,r;if(t=e.regex.exec(o.source1)){for(r=e.url,i=0;t[i];i++)r=r.replace("$"+i,function(){return t[i]});o.source1=r,o.type=e.type,o.width=o.width||e.w,o.height=o.height||e.h}}),o.embed)a=m(o.embed,o,!0);else{var c=r(o.source1);c&&(
o.type="script",o.width=c.width,o.height=c.height),o.width=o.width||300,o.height=o.height||150,tinymce.each(o,function(t,i){o[i]=e.dom.encode(t)}),"iframe"==o.type?a+='<iframe src="'+o.source1+'" width="'+o.width+'" height="'+o.height+'"></iframe>':"application/x-shockwave-flash"==o.source1mime?(a+='<object data="'+o.source1+'" width="'+o.width+'" height="'+o.height+'" type="application/x-shockwave-flash">',o.poster&&(a+='<img src="'+o.poster+'" width="'+o.width+'" height="'+o.height+'" />'),a+="</object>"):-1!=o.source1mime.indexOf("audio")?e.settings.audio_template_callback?a=e.settings.audio_template_callback(o):a+='<audio controls="controls" src="'+o.source1+'">'+(o.source2?'\n<source src="'+o.source2+'"'+(o.source2mime?' type="'+o.source2mime+'"
':"")+" />\n":"")+"</audio>":"script"==o.type?a+='<script src="'+o.source1+'"></script>':a=e.settings.video_template_callback?e.settings.video_template_callback(o):'<video width="'+o.width+'" height="'+o.height+'"'+(o.poster?' poster="'+o.poster+'"':"")+' controls="controls">\n<source src="'+o.source1+'"'+(o.source1mime?' type="'+o.source1mime+'"':"")+" />\n"+(o.source2?'<source src="'+o.source2+'"'+(o.source2mime?' type="'+o.source2mime+'"':"")+" />\n":"")+"</video>"}return a}function n(e){var t={};return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!0,special:"script,noscript",start:function(e,i){if(t.source1||"param"!=e||(t.source1=i.map.movie),("iframe"==e||"object"==
e||"embed"==e||"video"==e||"audio"==e)&&(t.type||(t.type=e),t=tinymce.extend(i.map,t)),"script"==e){var o=r(i.map.src);if(!o)return;t={type:"script",source1:i.map.src,width:o.width,height:o.height}}"source"==e&&(t.source1?t.source2||(t.source2=i.map.src):t.source1=i.map.src),"img"!=e||t.poster||(t.poster=i.map.src)}}).parse(e),t.source1=t.source1||t.src||t.data,t.source2=t.source2||"",t.poster=t.poster||"",t}function s(t){return t.getAttribute("data-mce-object")?n(e.serializer.serialize(t,{selection:!0})):{}}function m(e,t,i){function r(e,t){var i,r,o,a;for(i in t)if(o=""+t[i],e.map[i])for(r=e.length;r--;)a=e[r],a.name==i&&(o?(e.map[i]=o,a.value=o):(delete e.map[i],e.splice(r,1)));else o&&(e.push({name:i,value:o}),e.map[i]=o)}var o,a=new tinymce.html.Writer,c=0;return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!0,specia
l:"script,noscript",comment:function(e){a.comment(e)},cdata:function(e){a.cdata(e)},text:function(e,t){a.text(e,t)},start:function(e,n,s){switch(e){case"video":case"object":case"embed":case"img":case"iframe":r(n,{width:t.width,height:t.height})}if(i)switch(e){case"video":r(n,{poster:t.poster,src:""}),t.source2&&r(n,{src:""});break;case"iframe":r(n,{src:t.source1});break;case"source":if(c++,2>=c&&(r(n,{src:t["source"+c],type:t["source"+c+"mime"]}),!t["source"+c]))return;break;case"img":if(!t.poster)return;o=!0}a.start(e,n,s)},end:function(e){if("video"==e&&i)for(var n=1;2>=n;n++)if(t["source"+n]){var s=[];s.map={},n>c&&(r(s,{src:t["source"+n],type:t["source"+n+"mime"]}),a.start("source",s,!0))}if(t.poster&&"object&
quot;==e&&i&&!o){var m=[];m.map={},r(m,{src:t.poster,width:t.width,height:t.height}),a.start("img",m,!0)}a.end(e)}},new tinymce.html.Schema({})).parse(e),a.getContent()}var u=[{regex:/youtu\.be\/([\w\-.]+)/,type:"iframe",w:425,h:350,url:"//www.youtube.com/embed/$1"},{regex:/youtube\.com(.+)v=([^&]+)/,type:"iframe",w:425,h:350,url:"//www.youtube.com/embed/$2"},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc"},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'//maps.google.com/maps/ms?msid=$2&output=embed"'}],d=tinymce.Env.ie&&tinymce.Env.ie<=8?"onChange":"onInput";e.on("ResolveName",function(e){var t;1==e.target.nodeType&&(t=e.target.getAttribute("data-mce-object"))&&(e.name=t)}),e
.on("preInit",function(){var t=e.schema.getSpecialElements();tinymce.each("video audio iframe object".split(" "),function(e){t[e]=new RegExp("</"+e+"[^>]*>","gi")});var i=e.schema.getBoolAttrs();tinymce.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(e){i[e]={}}),e.parser.addNodeFilter("iframe,video,audio,object,embed,script",function(t,i){for(var o,a,c,n,s,m,u,d,l=t.length;l--;)if(a=t[l],a.parent&&("script"!=a.name||(d=r(a.attr("src"))))){for(c=new tinymce.html.Node("img",1),c.shortEnded=!0,d&&(d.width&&a.attr("width",d.width.toString()),d.height&&a.attr("height",d.height.toString())),m=a.attributes,o=m.length;o--;)n=m[o].name,s=m[o].value,"width"!==n&&"height"!==n&&"style"!==n&&(("data"==n||"src"
;==n)&&(s=e.convertURL(s,n)),c.attr("data-mce-p-"+n,s));u=a.firstChild&&a.firstChild.value,u&&(c.attr("data-mce-html",escape(u)),c.firstChild=null),c.attr({width:a.attr("width")||"300",height:a.attr("height")||("audio"==i?"30":"150"),style:a.attr("style"),src:tinymce.Env.transparentSrc,"data-mce-object":i,"class":"mce-object mce-object-"+i}),a.replace(c)}}),e.serializer.addAttributeFilter("data-mce-object",function(e,t){for(var i,r,o,a,c,n,s,m=e.length;m--;)if(i=e[m],i.parent){for(s=i.attr(t),r=new tinymce.html.Node(s,1),"audio"!=s&&"script"!=s&&r.attr({width:i.attr("width"),height:i.attr("height")}),r.attr({style:i.attr("style")}),a=i.attributes,o=a.length;o--;){var u=a[o].name;0===u.indexOf("data-mce-p-")&&r.attr(u.substr(11),a[o].value)}"scr
ipt"==s&&r.attr("type","text/javascript"),c=i.attr("data-mce-html"),c&&(n=new tinymce.html.Node("#text",3),n.raw=!0,n.value=unescape(c),r.append(n)),i.replace(r)}})}),e.on("ObjectSelected",function(e){var t=e.target.getAttribute("data-mce-object");("audio"==t||"script"==t)&&e.preventDefault()}),e.on("objectResized",function(e){var t,i=e.target;i.getAttribute("data-mce-object")&&(t=i.getAttribute("data-mce-html"),t&&(t=unescape(t),i.setAttribute("data-mce-html",escape(m(t,{width:e.width,height:e.height})))))}),e.addButton("media",{tooltip:"Insert/edit video",onclick:o,stateSelector:["img[data-mce-object=video]","img[data-mce-object=iframe]"]}),e.addMenuItem("media",{icon:"media",text:"Insert video",onclick:o,context:"insert",prependToContext:!
0})});
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunksrcwpincludesjstinymcepluginspastepluginjs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/js/tinymce/plugins/paste/plugin.js (29202 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/js/tinymce/plugins/paste/plugin.js 2014-07-17 00:49:11 UTC (rev 29202)
+++ trunk/src/wp-includes/js/tinymce/plugins/paste/plugin.js 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -170,6 +170,10 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ html = filter(html, [
+ /<!\[[^\]]+\]>/g // Conditional comments
+ ]);
+
</ins><span class="cx"> walk(domParser.parse(html));
</span><span class="cx">
</span><span class="cx"> return text;
</span><span class="lines">@@ -182,15 +186,15 @@
</span><span class="cx"> * @return {String} Html contents that got trimmed.
</span><span class="cx"> */
</span><span class="cx"> function trimHtml(html) {
</span><del>- var trimSpaces = function(all, s1, s2) {
</del><ins>+ function trimSpaces(all, s1, s2) {
</ins><span class="cx"> // WebKit meant to preserve multiple spaces but instead inserted around all inline tags,
</span><del>- // including the spans with inline stypes created on paste
</del><ins>+ // including the spans with inline styles created on paste
</ins><span class="cx"> if (!s1 && !s2) {
</span><span class="cx"> return ' ';
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return '\u00a0';
</span><del>- };
</del><ins>+ }
</ins><span class="cx">
</span><span class="cx"> html = filter(html, [
</span><span class="cx"> /^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/g, // Remove anything but the contents within the BODY element
</span><span class="lines">@@ -535,15 +539,25 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function getCaretRangeFromEvent(e) {
</span><del>- var doc = editor.getDoc(), rng;
</del><ins>+ var doc = editor.getDoc(), rng, point;
</ins><span class="cx">
</span><span class="cx"> if (doc.caretPositionFromPoint) {
</span><del>- var point = doc.caretPositionFromPoint(e.clientX, e.clientY);
</del><ins>+ point = doc.caretPositionFromPoint(e.clientX, e.clientY);
</ins><span class="cx"> rng = doc.createRange();
</span><span class="cx"> rng.setStart(point.offsetNode, point.offset);
</span><span class="cx"> rng.collapse(true);
</span><span class="cx"> } else if (doc.caretRangeFromPoint) {
</span><span class="cx"> rng = doc.caretRangeFromPoint(e.clientX, e.clientY);
</span><ins>+ } else if (doc.body.createTextRange) {
+ rng = doc.body.createTextRange();
+
+ try {
+ rng.moveToPoint(e.clientX, e.clientY);
+ rng.collapse(true);
+ } catch (ex) {
+ // Append to top or bottom depending on drop location
+ rng.collapse(e.clientY < doc.body.clientHeight);
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return rng;
</span><span class="lines">@@ -835,7 +849,55 @@
</span><span class="cx"> function convertFakeListsToProperLists(node) {
</span><span class="cx"> var currentListNode, prevListNode, lastLevel = 1;
</span><span class="cx">
</span><del>- function convertParagraphToLi(paragraphNode, listStartTextNode, listName, start) {
</del><ins>+ function getText(node) {
+ var txt = '';
+
+ if (node.type === 3) {
+ return node.value;
+ }
+
+ if ((node = node.firstChild)) {
+ do {
+ txt += getText(node);
+ } while ((node = node.next));
+ }
+
+ return txt;
+ }
+
+ function trimListStart(node, regExp) {
+ if (node.type === 3) {
+ if (regExp.test(node.value)) {
+ node.value = node.value.replace(regExp, '');
+ return false;
+ }
+ }
+
+ if ((node = node.firstChild)) {
+ do {
+ if (!trimListStart(node, regExp)) {
+ return false;
+ }
+ } while ((node = node.next));
+ }
+
+ return true;
+ }
+
+ function removeIgnoredNodes(node) {
+ if (node._listIgnore) {
+ node.remove();
+ return;
+ }
+
+ if ((node = node.firstChild)) {
+ do {
+ removeIgnoredNodes(node);
+ } while ((node = node.next));
+ }
+ }
+
+ function convertParagraphToLi(paragraphNode, listName, start) {
</ins><span class="cx"> var level = paragraphNode._listLevel || lastLevel;
</span><span class="cx">
</span><span class="cx"> // Handle list nesting
</span><span class="lines">@@ -866,19 +928,19 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> paragraphNode.name = 'li';
</span><del>- listStartTextNode.value = '';
</del><span class="cx">
</span><del>- var nextNode = listStartTextNode.next;
- if (nextNode && nextNode.type == 3) {
- nextNode.value = nextNode.value.replace(/^\u00a0+/, '');
- }
-
</del><span class="cx"> // Append list to previous list if it exists
</span><span class="cx"> if (level > lastLevel && prevListNode) {
</span><span class="cx"> prevListNode.lastChild.append(currentListNode);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> lastLevel = level;
</span><ins>+
+ // Remove start of list item "1. " or "· " etc
+ removeIgnoredNodes(paragraphNode);
+ trimListStart(paragraphNode, /^\u00a0+/);
+ trimListStart(paragraphNode, /^\s*([\u2022\u00b7\u00a7\u00d8\u25CF]|\w+\.)/);
+ trimListStart(paragraphNode, /^\u00a0+/);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> var paragraphs = node.getAll('p');
</span><span class="lines">@@ -888,26 +950,17 @@
</span><span class="cx">
</span><span class="cx"> if (node.name == 'p' && node.firstChild) {
</span><span class="cx"> // Find first text node in paragraph
</span><del>- var nodeText = '';
</del><ins>+ var nodeText = getText(node);
</ins><span class="cx"> var listStartTextNode = node.firstChild;
</span><span class="cx">
</span><del>- while (listStartTextNode) {
- nodeText = listStartTextNode.value;
- if (nodeText) {
- break;
- }
-
- listStartTextNode = listStartTextNode.firstChild;
- }
-
</del><span class="cx"> // Detect unordered lists look for bullets
</span><del>- if (/^\s*[\u2022\u00b7\u00a7\u00d8\u25CF]\s*$/.test(nodeText)) {
- convertParagraphToLi(node, listStartTextNode, 'ul');
</del><ins>+ if (/^[\s\u00a0]*[\u2022\u00b7\u00a7\u00d8\u25CF]\s*/.test(nodeText)) {
+ convertParagraphToLi(node, 'ul');
</ins><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Detect ordered lists 1., a. or ixv.
</span><del>- if (/^\s*\w+\.$/.test(nodeText)) {
</del><ins>+ if (/^[\s\u00a0]*\w+\./.test(nodeText) && !/^[\s\u00a0]*\w+\.\s*[^\s]+/.test(listStartTextNode.value)) {
</ins><span class="cx"> // Parse OL start number
</span><span class="cx"> var matches = /([0-9])\./.exec(nodeText);
</span><span class="cx"> var start = 1;
</span><span class="lines">@@ -915,30 +968,43 @@
</span><span class="cx"> start = parseInt(matches[1], 10);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- convertParagraphToLi(node, listStartTextNode, 'ol', start);
</del><ins>+ convertParagraphToLi(node, 'ol', start);
</ins><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ // Convert paragraphs marked as lists but doesn't look like anything
+ if (node._listLevel) {
+ convertParagraphToLi(node, 'ul', 1);
+ continue;
+ }
+
</ins><span class="cx"> currentListNode = null;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function filterStyles(node, styleValue) {
</span><del>- var outputStyles = {}, styles = editor.dom.parseStyle(styleValue);
</del><ins>+ var outputStyles = {}, matches, styles = editor.dom.parseStyle(styleValue);
</ins><span class="cx">
</span><del>- // Parse out list indent level for lists
- if (node.name === 'p') {
- var matches = /mso-list:\w+ \w+([0-9]+)/.exec(styleValue);
-
- if (matches) {
- node._listLevel = parseInt(matches[1], 10);
- }
- }
-
</del><span class="cx"> Tools.each(styles, function(value, name) {
</span><span class="cx"> // Convert various MS styles to W3C styles
</span><span class="cx"> switch (name) {
</span><ins>+ case 'mso-list':
+ // Parse out list indent level for lists
+ matches = /\w+ \w+([0-9]+)/i.exec(styleValue);
+ if (matches) {
+ node._listLevel = parseInt(matches[1], 10);
+ }
+
+ // Remove these nodes <span style="mso-list:Ignore">o</span>
+ // Since the span gets removed we mark the text node and the span
+ if (/Ignore/i.test(value) && node.firstChild) {
+ node._listIgnore = true;
+ node.firstChild._listIgnore = true;
+ }
+
+ break;
+
</ins><span class="cx"> case "horiz-align":
</span><span class="cx"> name = "text-align";
</span><span class="cx"> break;
</span><span class="lines">@@ -1096,7 +1162,7 @@
</span><span class="cx"> node = nodes[i];
</span><span class="cx">
</span><span class="cx"> className = node.attr('class');
</span><del>- if (/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(className)) {
</del><ins>+ if (/^(MsoCommentReference|MsoCommentText|msoDel|MsoCaption)$/i.test(className)) {
</ins><span class="cx"> node.remove();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1304,7 +1370,7 @@
</span><span class="cx"> return before + ' style="' + outputStyles + '"' + after;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- return '';
</del><ins>+ return before + after;
</ins><span class="cx"> });
</span><span class="cx"> } else {
</span><span class="cx"> // Remove all external styles
</span><span class="lines">@@ -1443,5 +1509,5 @@
</span><span class="cx"> });
</span><span class="cx"> });
</span><span class="cx">
</span><del>-expose(["tinymce/pasteplugin/Utils","tinymce/pasteplugin/Clipboard","tinymce/pasteplugin/WordFilter","tinymce/pasteplugin/Quirks","tinymce/pasteplugin/Plugin"]);
</del><ins>+expose(["tinymce/pasteplugin/Utils","tinymce/pasteplugin/WordFilter"]);
</ins><span class="cx"> })(this);
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunksrcwpincludesjstinymcepluginspastepluginminjs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/js/tinymce/plugins/paste/plugin.min.js (29202 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/js/tinymce/plugins/paste/plugin.min.js 2014-07-17 00:49:11 UTC (rev 29202)
+++ trunk/src/wp-includes/js/tinymce/plugins/paste/plugin.min.js 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -1 +1 @@
</span><del>-!function(e,t){"use strict";function n(e,t){for(var n,i=[],r=0;r<e.length;++r){if(n=s[e[r]]||a(e[r]),!n)throw"module definition dependecy not found: "+e[r];i.push(n)}t.apply(null,i)}function i(e,i,r){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(i===t)throw"invalid module definition, dependencies must be specified";if(r===t)throw"invalid module definition, definition function must be specified";n(i,function(){s[e]=r.apply(null,arguments)})}function r(e){return!!s[e]}function a(t){for(var n=e,i=t.split(/[.\/]/),r=0;r<i.length;++r){if(!n[i[r]])return;n=n[i[r]]}return n}function o(n){for(var i=0;i<n.length;i++){for(var r=e,a=n[i],o=a.split(/[.\/]/),l=0;l<o.length-1;++l)r[o[l]]===t&&(r[o[l]]={}),r=r[o[l]];r[o[o.length-1]]=s[a]}}var s={},l="tinymce/pasteplugin/Utils",c="tinymce/util/Tools",d="tinymce/html/DomParser&quo
t;,f="tinymce/html/Schema",u="tinymce/pasteplugin/Clipboard",p="tinymce/Env",m="tinymce/util/VK",g="tinymce/pasteplugin/WordFilter",v="tinymce/html/Serializer",h="tinymce/html/Node",b="tinymce/pasteplugin/Quirks",y="tinymce/pasteplugin/Plugin",w="tinymce/PluginManager";i(l,[c,d,f],function(e,t,n){function i(t,n){return e.each(n,function(e){t=e.constructor==RegExp?t.replace(e,""):t.replace(e[0],e[1])}),t}function r(i){function r(e){var t=e.name,n=e;if("br"===t)return void(s+="\n");if(l[t]&&(s+=" "),c[t])return void(s+=" ");if(3==e.type&&(s+=e.value),!e.shortEnded&&(e=e.firstChild))do r(e);while(e=e.next);d[t]&&n.next&&(s+="\n","p"==t&&(s+="\n"))}var a=new n,o=new t({},a),s="",l=a.getShortEndedElements(),c=e.makeMap("script noscript style textare
a video audio iframe object"," "),d=a.getBlockElements();return r(o.parse(i)),s}function a(e){var t=function(e,t,n){return t||n?"\u00a0":" "};return e=i(e,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/g,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,t],/<br>$/i])}return{filter:i,innerText:r,trimHtml:a}}),i(u,[p,m,l],function(e,t,n){return function(i){function r(e){var t,n=i.dom;if(t=i.fire("BeforePastePreProcess",{content:e}),t=i.fire("PastePreProcess",t),e=t.content,!t.isDefaultPrevented()){if(i.hasEventListeners("PastePostProcess")&&!t.isDefaultPrevented()){var r=n.add(i.getBody(),"div",{style:"display:none"},e);t=i.fire("PastePostProcess",{node:r}),n.remove(r),e=t.node.innerHTML}t.isDefaultPrevented()||i.insertContent(e,{merge:i.settings.paste_merge_formats!==
!1})}}function a(e){e=i.dom.encode(e).replace(/\r\n/g,"\n");var t=i.dom.getParent(i.selection.getStart(),i.dom.isBlock),a=i.settings.forced_root_block,o;a&&(o=i.dom.createHTML(a,i.settings.forced_root_block_attrs),o=o.substr(0,o.length-3)+">"),t&&/^(PRE|DIV)$/.test(t.nodeName)||!a?e=n.filter(e,[[/\n/g,"<br>"]]):(e=n.filter(e,[[/\n\n/g,"</p>"+o],[/^(.*<\/p>)(<p>)$/,o+"$1"],[/\n/g,"<br />"]]),-1!=e.indexOf("<p>")&&(e=o+e)),r(e)}function o(){var t=i.dom,n=i.getBody(),r=i.dom.getViewPort(i.getWin()),a=r.y,o=20,s;if(y=i.selection.getRng(),i.inline&&(s=i.selection.getScrollContainer(),s&&s.scrollTop>0&&(a=s.scrollTop)),y.getClientRects){var l=y.getClientRects();if(l.length)o=a+(l[0].top-t.getPos(n).y);else{o=a;var c=y.startContainer;c&&(3==c.nodeType&&c.parentNode!=n&&(c=c.parentNode),1==c.nodeType&&
(o=t.getPos(c,s||n).y))}}b=t.add(i.getBody(),"div",{id:"mcepastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: absolute; top: "+o+"px;width: 10px; height: 10px; overflow: hidden; opacity: 0"},x),(e.ie||e.gecko)&&t.setStyle(b,"left","rtl"==t.getStyle(n,"direction",!0)?65535:-65535),t.bind(b,"beforedeactivate focusin focusout",function(e){e.stopPropagation()}),b.focus(),i.selection.select(b,!0)}function s(){if(b){for(var e;e=i.dom.get("mcepastebin");)i.dom.remove(e),i.dom.unbind(e);y&&i.selection.setRng(y)}b=y=null}function l(){var e="",t,n,r,a;for(t=i.dom.select("div[id=mcepastebin]"),n=0;n<t.length;n++)r=t[n],r.firstChild&&"mcepastebin"==r.firstChild.id&&(r=r.firstChild),a=r.innerHTML,e!=x&&(e+=a);return e}function c(e){var t={};if(e&&e.types){var n=e.getData("Text");n
&&n.length>0&&(t["text/plain"]=n);for(var i=0;i<e.types.length;i++){var r=e.types[i];t[r]=e.getData(r)}}return t}function d(e){return c(e.clipboardData||i.getDoc().dataTransfer)}function f(e,t){function n(n){function a(){t&&(i.selection.setRng(t),t=null),r('<img src="'+l.result+'">')}var o,s,l;if(n)for(o=0;o<n.length;o++)if(s=n[o],/^image\/(jpeg|png|gif)$/.test(s.type))return l=new FileReader,l.onload=a,l.readAsDataURL(s.getAsFile?s.getAsFile():s),e.preventDefault(),!0}var a=e.clipboardData||e.dataTransfer;return i.settings.paste_data_images&&a?n(a.items)||n(a.files):void 0}function u(e){var t=e.clipboardData;return-1!=navigator.userAgent.indexOf("Android")&&t&&t.items&&0===t.items.length}function p(e){var t=i.getDoc(),n;if(t.caretPositionFromPoint){var r=t.caretPositionFromPoint(e.clientX,e.clientY);n=t.createRange(),n.setStart(r.offsetNode,r.offset),n.collapse(!0)}else t.caretRange
FromPoint&&(n=t.caretRangeFromPoint(e.clientX,e.clientY));return n}function m(e,t){return t in e&&e[t].length>0}function g(e){return t.metaKeyPressed(e)&&86==e.keyCode||e.shiftKey&&45==e.keyCode}function v(){i.on("keydown",function(t){function n(e){g(e)&&!e.isDefaultPrevented()&&s()}if(g(t)&&!t.isDefaultPrevented()){if(P=t.shiftKey&&86==t.keyCode,P&&e.webkit&&-1!=navigator.userAgent.indexOf("Version/"))return;if(t.stopImmediatePropagation(),w=(new Date).getTime(),e.ie&&P)return t.preventDefault(),void i.fire("paste",{ieFake:!0});s(),o(),i.once("keyup",n),i.once("paste",function(){i.off("keyup",n)})}}),i.on("paste",function(t){var c=d(t),p=(new Date).getTime()-w<1e3,g="text"==h.pasteFormat||P;return P=!1,t.isDefaultPrevented()||u(t)?void s():f(t)?void s():(p||t.preventDefault(),!e.ie||p&&!t.ieFake||(o(),i
.dom.bind(b,"paste",function(e){e.stopPropagation()}),i.getDoc().execCommand("Paste",!1,null),c["text/html"]=l()),void setTimeout(function(){var e;return m(c,"text/html")?e=c["text/html"]:(e=l(),e==x&&(g=!0)),e=n.trimHtml(e),b&&b.firstChild&&"mcepastebin"===b.firstChild.id&&(g=!0),s(),g&&(e=m(c,"text/plain")&&-1==e.indexOf("</p>")?c["text/plain"]:n.innerText(e)),e==x?void(p||i.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents.")):void(g?a(e):r(e))},0))}),i.on("dragstart",function(e){if(e.dataTransfer.types)try{e.dataTransfer.setData("mce-internal",i.selection.getContent())}catch(t){}}),i.on("drop",function(e){var t=p(e);if(!e.isDefaultPrevented()&&!f(e,t)&&t){var n=c(e.dataTransfer),o=n["mce-internal"]||n["text/html"]||n["text/pla
in"];o&&(e.preventDefault(),i.undoManager.transact(function(){n["mce-internal"]&&i.execCommand("Delete"),i.selection.setRng(t),n["text/html"]?r(o):a(o)}))}}),i.on("dragover dragend",function(e){var t,n=e.dataTransfer;if(i.settings.paste_data_images&&n)for(t=0;t<n.types.length;t++)if("Files"==n.types[t])return e.preventDefault(),!1})}var h=this,b,y,w=0,x="%MCEPASTEBIN%",P;h.pasteHtml=r,h.pasteText=a,i.on("preInit",function(){v(),i.parser.addNodeFilter("img",function(t){if(!i.settings.paste_data_images)for(var n=t.length;n--;){var r=t[n].attributes.map.src;r&&/^(data:image|webkit\-fake\-url)/.test(r)&&(t[n].attr("data-mce-object")||r===e.transparentSrc||t[n].remove())}})})}}),i(g,[c,d,f,v,h,l],function(e,t,n,i,r,a){function o(e){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordD
ocument/i.test(e)||/class="OutlineElement/.test(e)||/id="?docs\-internal\-guid\-/.test(e)}function s(s){var l=s.settings;s.on("BeforePastePreProcess",function(c){function d(e){function t(e,t,o,s){var l=e._listLevel||a;l!=a&&(a>l?n&&(n=n.parent.parent):(i=n,n=null)),n&&n.name==o?n.append(e):(i=i||n,n=new r(o,1),s>1&&n.attr("start",""+s),e.wrap(n)),e.name="li",t.value="";var c=t.next;c&&3==c.type&&(c.value=c.value.replace(/^\u00a0+/,"")),l>a&&i&&i.lastChild.append(n),a=l}for(var n,i,a=1,o=e.getAll("p"),s=0;s<o.length;s++)if(e=o[s],"p"==e.name&&e.firstChild){for(var l="",c=e.firstChild;c&&!(l=c.value);)c=c.firstChild;if(/^\s*[\u2022\u00b7\u00a7\u00d8\u25CF]\s*$/.test(l)){t(e,c,"ul");continue}if(/^\s*\w+\.$/.test(l)){var d=/([0-9])\./.exec(l),f=1;d&&(f=parseInt(d[1],10)),t(e,c,&qu
ot;ol",f);continue}n=null}}function f(t,n){var i={},a=s.dom.parseStyle(n);if("p"===t.name){var o=/mso-list:\w+ \w+([0-9]+)/.exec(n);o&&(t._listLevel=parseInt(o[1],10))}return e.each(a,function(e,n){switch(n){case"horiz-align":n="text-align";break;case"vert-align":n="vertical-align";break;case"font-color":case"mso-foreground":n="color";break;case"mso-background":case"mso-highlight":n="background";break;case"font-weight":case"font-style":return void("normal"!=e&&(i[n]=e));case"mso-element":if(/^(comment|comment-list)$/i.test(e))return void t.remove()}return 0===n.indexOf("mso-comment")?void t.remove():void(0!==n.indexOf("mso-")&&("all"==p||m&&m[n])&&(i[n]=e))}),/(bold)/i.test(i["font-weight"])&&(delete i["font-weight"],t.wrap(new r(&quo
t;b",1))),/(italic)/i.test(i["font-style"])&&(delete i["font-style"],t.wrap(new r("i",1))),i=s.dom.serializeStyle(i,t.name),i?i:null}var u=c.content,p,m;if(p=l.paste_retain_style_properties,p&&(m=e.makeMap(p.split(/[, ]/))),l.paste_enable_default_filters!==!1&&o(c.content)){c.wordContent=!0,u=a.filter(u,[/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\u00a0"],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(e,t){return t.length>0?t.replace(/./," ").slice(Math.floor(t.length/2)).split("").join("\u00a0"):""}]]);var g=l.paste_word_valid_elements;g||(g="-strong/b,-em/i,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-table[width]
,-tr,-td[colspan|rowspan|width],-th,-thead,-tfoot,-tbody,-a[href|name],sub,sup,strike,br,del");var v=new n({valid_elements:g,valid_children:"-li[p]"});e.each(v.elements,function(e){e.attributes["class"]||(e.attributes["class"]={},e.attributesOrder.push("class")),e.attributes.style||(e.attributes.style={},e.attributesOrder.push("style"))});var h=new t({},v);h.addAttributeFilter("style",function(e){for(var t=e.length,n;t--;)n=e[t],n.attr("style",f(n,n.attr("style"))),"span"==n.name&&n.parent&&!n.attributes.length&&n.unwrap()}),h.addAttributeFilter("class",function(e){for(var t=e.length,n,i;t--;)n=e[t],i=n.attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(i)&&n.remove(),n.attr("class",null)}),h.addNodeFilter("del",function(e){for(var t=e.length;t--;)e[t].remove()}),h.addNodeFilter("a",function(
e){for(var t=e.length,n,i,r;t--;)if(n=e[t],i=n.attr("href"),r=n.attr("name"),i&&-1!=i.indexOf("#_msocom_"))n.remove();else if(i&&0===i.indexOf("file://")&&(i=i.split("#")[1],i&&(i="#"+i)),i||r){if(r&&!/^_?(?:toc|edn|ftn)/i.test(r)){n.unwrap();continue}n.attr({href:i,name:r})}else n.unwrap()});var b=h.parse(u);d(b),c.content=new i({},v).serialize(b)}})}return s.isWordContent=o,s}),i(b,[p,c,g,l],function(e,t,n,i){return function(r){function a(e){r.on("BeforePastePreProcess",function(t){t.content=e(t.content)})}function o(e){if(!n.isWordContent(e))return e;var a=[];t.each(r.schema.getBlockElements(),function(e,t){a.push(t)});var o=new RegExp("(?:<br> [\\s\\r\\n]+|<br>)*(<\\/?("+a.join("|")+")[^>]*>)(?:<br> [\\s\\r\\n]+|<br>)*","g");return e=i.filter(e,[[o,"$1"]]),e=i.filter(e,[[
/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}function s(e){if(n.isWordContent(e))return e;var t=r.settings.paste_webkit_styles;if(r.settings.paste_remove_styles_if_webkit===!1||"all"==t)return e;if(t&&(t=t.split(/[, ]/)),t){var i=r.dom,a=r.selection.getNode();e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(e,n,r,o){var s=i.parseStyle(r,"span"),l={};if("none"===t)return n+o;for(var c=0;c<t.length;c++){var d=s[t[c]],f=i.getStyle(a,t[c],!0);/color/.test(t[c])&&(d=i.toHex(d),f=i.toHex(f)),f!=d&&(l[t[c]]=d)}return l=i.serializeStyle(l,"span"),l?n+' style="'+l+'"'+o:""})}else e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return e=e.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(e,t,n,i
){return t+' style="'+n+'"'+i})}e.webkit&&a(s),e.ie&&a(o)}}),i(y,[w,u,g,b],function(e,t,n,i){var r;e.add("paste",function(e){function a(){"text"==s.pasteFormat?(this.active(!1),s.pasteFormat="html"):(s.pasteFormat="text",this.active(!0),r||(e.windowManager.alert("Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off."),r=!0))}var o=this,s,l=e.settings;o.clipboard=s=new t(e),o.quirks=new i(e),o.wordFilter=new n(e),e.settings.paste_as_text&&(o.clipboard.pasteFormat="text"),l.paste_preprocess&&e.on("PastePreProcess",function(e){l.paste_preprocess.call(o,o,e)}),l.paste_postprocess&&e.on("PastePostProcess",function(e){l.paste_postprocess.call(o,o,e)}),e.addCommand("mceInsertClipboardContent",function(e,t){t.content&&o.clipboard.pasteHtml(t.content),t.text&&o.clipboard.pasteText(t.t
ext)}),e.paste_block_drop&&e.on("dragend dragover draggesture dragdrop drop drag",function(e){e.preventDefault(),e.stopPropagation()}),e.settings.paste_data_images||e.on("drop",function(e){var t=e.dataTransfer;t&&t.files&&t.files.length>0&&e.preventDefault()}),e.addButton("pastetext",{icon:"pastetext",tooltip:"Paste as text",onclick:a,active:"text"==o.clipboard.pasteFormat}),e.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,active:s.pasteFormat,onclick:a})})}),o([l,u,g,b,y])}(this);
</del><span class="cx">\ No newline at end of file
</span><ins>+!function(e,t){"use strict";function n(e,t){for(var n,r=[],i=0;i<e.length;++i){if(n=s[e[i]]||o(e[i]),!n)throw"module definition dependecy not found: "+e[i];r.push(n)}t.apply(null,r)}function r(e,r,i){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(r===t)throw"invalid module definition, dependencies must be specified";if(i===t)throw"invalid module definition, definition function must be specified";n(r,function(){s[e]=i.apply(null,arguments)})}function i(e){return!!s[e]}function o(t){for(var n=e,r=t.split(/[.\/]/),i=0;i<r.length;++i){if(!n[r[i]])return;n=n[r[i]]}return n}function a(n){for(var r=0;r<n.length;r++){for(var i=e,o=n[r],a=o.split(/[.\/]/),l=0;l<a.length-1;++l)i[a[l]]===t&&(i[a[l]]={}),i=i[a[l]];i[a[a.length-1]]=s[o]}}var s={},l="tinymce/pasteplugin/Utils",c="tinymce/util/Tools",u="tinymce/html/DomParser&quo
t;,d="tinymce/html/Schema",f="tinymce/pasteplugin/Clipboard",p="tinymce/Env",m="tinymce/util/VK",h="tinymce/pasteplugin/WordFilter",g="tinymce/html/Serializer",v="tinymce/html/Node",y="tinymce/pasteplugin/Quirks",b="tinymce/pasteplugin/Plugin",C="tinymce/PluginManager";r(l,[c,u,d],function(e,t,n){function r(t,n){return e.each(n,function(e){t=e.constructor==RegExp?t.replace(e,""):t.replace(e[0],e[1])}),t}function i(i){function o(e){var t=e.name,n=e;if("br"===t)return void(l+="\n");if(c[t]&&(l+=" "),u[t])return void(l+=" ");if(3==e.type&&(l+=e.value),!e.shortEnded&&(e=e.firstChild))do o(e);while(e=e.next);d[t]&&n.next&&(l+="\n","p"==t&&(l+="\n"))}var a=new n,s=new t({},a),l="",c=a.getShortEndedElements(),u=e.makeMap("script noscript style textare
a video audio iframe object"," "),d=a.getBlockElements();return i=r(i,[/<!\[[^\]]+\]>/g]),o(s.parse(i)),l}function o(e){function t(e,t,n){return t||n?"\xa0":" "}return e=r(e,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/g,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,t],/<br>$/i])}return{filter:r,innerText:i,trimHtml:o}}),r(f,[p,m,l],function(e,t,n){return function(r){function i(e){var t,n=r.dom;if(t=r.fire("BeforePastePreProcess",{content:e}),t=r.fire("PastePreProcess",t),e=t.content,!t.isDefaultPrevented()){if(r.hasEventListeners("PastePostProcess")&&!t.isDefaultPrevented()){var i=n.add(r.getBody(),"div",{style:"display:none"},e);t=r.fire("PastePostProcess",{node:i}),n.remove(i),e=t.node.innerHTML}t.isDefaultPrevented()||r.insertContent(e,{merge:r.settin
gs.paste_merge_formats!==!1})}}function o(e){e=r.dom.encode(e).replace(/\r\n/g,"\n");var t=r.dom.getParent(r.selection.getStart(),r.dom.isBlock),o=r.settings.forced_root_block,a;o&&(a=r.dom.createHTML(o,r.settings.forced_root_block_attrs),a=a.substr(0,a.length-3)+">"),t&&/^(PRE|DIV)$/.test(t.nodeName)||!o?e=n.filter(e,[[/\n/g,"<br>"]]):(e=n.filter(e,[[/\n\n/g,"</p>"+a],[/^(.*<\/p>)(<p>)$/,a+"$1"],[/\n/g,"<br />"]]),-1!=e.indexOf("<p>")&&(e=a+e)),i(e)}function a(){var t=r.dom,n=r.getBody(),i=r.dom.getViewPort(r.getWin()),o=i.y,a=20,s;if(b=r.selection.getRng(),r.inline&&(s=r.selection.getScrollContainer(),s&&s.scrollTop>0&&(o=s.scrollTop)),b.getClientRects){var l=b.getClientRects();if(l.length)a=o+(l[0].top-t.getPos(n).y);else{a=o;var c=b.startContainer;c&&(3==c.nodeType&&c.parentNode!=n&&(c=c.parentNode
),1==c.nodeType&&(a=t.getPos(c,s||n).y))}}y=t.add(r.getBody(),"div",{id:"mcepastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: absolute; top: "+a+"px;width: 10px; height: 10px; overflow: hidden; opacity: 0"},x),(e.ie||e.gecko)&&t.setStyle(y,"left","rtl"==t.getStyle(n,"direction",!0)?65535:-65535),t.bind(y,"beforedeactivate focusin focusout",function(e){e.stopPropagation()}),y.focus(),r.selection.select(y,!0)}function s(){if(y){for(var e;e=r.dom.get("mcepastebin");)r.dom.remove(e),r.dom.unbind(e);b&&r.selection.setRng(b)}y=b=null}function l(){var e="",t,n,i,o;for(t=r.dom.select("div[id=mcepastebin]"),n=0;n<t.length;n++)i=t[n],i.firstChild&&"mcepastebin"==i.firstChild.id&&(i=i.firstChild),o=i.innerHTML,e!=x&&(e+=o);return e}function c(e){var t={};if(e&&e.types){var n=e.ge
tData("Text");n&&n.length>0&&(t["text/plain"]=n);for(var r=0;r<e.types.length;r++){var i=e.types[r];t[i]=e.getData(i)}}return t}function u(e){return c(e.clipboardData||r.getDoc().dataTransfer)}function d(e,t){function n(n){function o(){t&&(r.selection.setRng(t),t=null),i('<img src="'+l.result+'">')}var a,s,l;if(n)for(a=0;a<n.length;a++)if(s=n[a],/^image\/(jpeg|png|gif)$/.test(s.type))return l=new FileReader,l.onload=o,l.readAsDataURL(s.getAsFile?s.getAsFile():s),e.preventDefault(),!0}var o=e.clipboardData||e.dataTransfer;return r.settings.paste_data_images&&o?n(o.items)||n(o.files):void 0}function f(e){var t=e.clipboardData;return-1!=navigator.userAgent.indexOf("Android")&&t&&t.items&&0===t.items.length}function p(e){var t=r.getDoc(),n,i;if(t.caretPositionFromPoint)i=t.caretPositionFromPoint(e.clientX,e.clientY),n=t.createRange(),n.setStart(i.offsetNode,i.offset),n.collapse
(!0);else if(t.caretRangeFromPoint)n=t.caretRangeFromPoint(e.clientX,e.clientY);else if(t.body.createTextRange){n=t.body.createTextRange();try{n.moveToPoint(e.clientX,e.clientY),n.collapse(!0)}catch(o){n.collapse(e.clientY<t.body.clientHeight)}}return n}function m(e,t){return t in e&&e[t].length>0}function h(e){return t.metaKeyPressed(e)&&86==e.keyCode||e.shiftKey&&45==e.keyCode}function g(){r.on("keydown",function(t){function n(e){h(e)&&!e.isDefaultPrevented()&&s()}if(h(t)&&!t.isDefaultPrevented()){if(w=t.shiftKey&&86==t.keyCode,w&&e.webkit&&-1!=navigator.userAgent.indexOf("Version/"))return;if(t.stopImmediatePropagation(),C=(new Date).getTime(),e.ie&&w)return t.preventDefault(),void r.fire("paste",{ieFake:!0});s(),a(),r.once("keyup",n),r.once("paste",function(){r.off("keyup",n)})}}),r.on("paste",function(t){var c=u(t),p=(new Da
te).getTime()-C<1e3,h="text"==v.pasteFormat||w;return w=!1,t.isDefaultPrevented()||f(t)?void s():d(t)?void s():(p||t.preventDefault(),!e.ie||p&&!t.ieFake||(a(),r.dom.bind(y,"paste",function(e){e.stopPropagation()}),r.getDoc().execCommand("Paste",!1,null),c["text/html"]=l()),void setTimeout(function(){var e;return m(c,"text/html")?e=c["text/html"]:(e=l(),e==x&&(h=!0)),e=n.trimHtml(e),y&&y.firstChild&&"mcepastebin"===y.firstChild.id&&(h=!0),s(),h&&(e=m(c,"text/plain")&&-1==e.indexOf("</p>")?c["text/plain"]:n.innerText(e)),e==x?void(p||r.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents.")):void(h?o(e):i(e))},0))}),r.on("dragstart",function(e){if(e.dataTransfer.types)try{e.dataTransfer.setData("mce-internal",r.selection.getContent())}catch(t){}}),r.on("drop&
quot;,function(e){var t=p(e);if(!e.isDefaultPrevented()&&!d(e,t)&&t){var n=c(e.dataTransfer),a=n["mce-internal"]||n["text/html"]||n["text/plain"];a&&(e.preventDefault(),r.undoManager.transact(function(){n["mce-internal"]&&r.execCommand("Delete"),r.selection.setRng(t),n["text/html"]?i(a):o(a)}))}}),r.on("dragover dragend",function(e){var t,n=e.dataTransfer;if(r.settings.paste_data_images&&n)for(t=0;t<n.types.length;t++)if("Files"==n.types[t])return e.preventDefault(),!1})}var v=this,y,b,C=0,x="%MCEPASTEBIN%",w;v.pasteHtml=i,v.pasteText=o,r.on("preInit",function(){g(),r.parser.addNodeFilter("img",function(t){if(!r.settings.paste_data_images)for(var n=t.length;n--;){var i=t[n].attributes.map.src;i&&/^(data:image|webkit\-fake\-url)/.test(i)&&(t[n].attr("data-mce-object")||i===e.transparentSrc||t[n].remove())}})
})}}),r(h,[c,u,d,g,v,l],function(e,t,n,r,i,o){function a(e){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i.test(e)||/class="OutlineElement/.test(e)||/id="?docs\-internal\-guid\-/.test(e)}function s(s){var l=s.settings;s.on("BeforePastePreProcess",function(c){function u(e){function t(e){var n="";if(3===e.type)return e.value;if(e=e.firstChild)do n+=t(e);while(e=e.next);return n}function n(e,t){if(3===e.type&&t.test(e.value))return e.value=e.value.replace(t,""),!1;if(e=e.firstChild)do if(!n(e,t))return!1;while(e=e.next);return!0}function r(e){if(e._listIgnore)return void e.remove();if(e=e.firstChild)do r(e);while(e=e.next)}function o(e,t,o){var c=e._listLevel||l;c!=l&&(l>c?a&&(a=a.parent.parent):(s=a,a=null)),a&&a.name==t?a.append(e):(s=s||a,a=new i(t,1),o>1&&a.attr("start",""+o),e.wrap(a)),e.name=
"li",c>l&&s&&s.lastChild.append(a),l=c,r(e),n(e,/^\u00a0+/),n(e,/^\s*([\u2022\u00b7\u00a7\u00d8\u25CF]|\w+\.)/),n(e,/^\u00a0+/)}for(var a,s,l=1,c=e.getAll("p"),u=0;u<c.length;u++)if(e=c[u],"p"==e.name&&e.firstChild){var d=t(e),f=e.firstChild;if(/^[\s\u00a0]*[\u2022\u00b7\u00a7\u00d8\u25CF]\s*/.test(d)){o(e,"ul");continue}if(/^[\s\u00a0]*\w+\./.test(d)&&!/^[\s\u00a0]*\w+\.\s*[^\s]+/.test(f.value)){var p=/([0-9])\./.exec(d),m=1;p&&(m=parseInt(p[1],10)),o(e,"ol",m);continue}if(e._listLevel){o(e,"ul",1);continue}a=null}}function d(t,n){var r={},o,a=s.dom.parseStyle(n);return e.each(a,function(e,i){switch(i){case"mso-list":o=/\w+ \w+([0-9]+)/i.exec(n),o&&(t._listLevel=parseInt(o[1],10)),/Ignore/i.test(e)&&t.firstChild&&(t._listIgnore=!0,t.firstChild._listIgnore=!0);break;case"horiz-align":i="text-align";break;case"vert-align&
quot;:i="vertical-align";break;case"font-color":case"mso-foreground":i="color";break;case"mso-background":case"mso-highlight":i="background";break;case"font-weight":case"font-style":return void("normal"!=e&&(r[i]=e));case"mso-element":if(/^(comment|comment-list)$/i.test(e))return void t.remove()}return 0===i.indexOf("mso-comment")?void t.remove():void(0!==i.indexOf("mso-")&&("all"==p||m&&m[i])&&(r[i]=e))}),/(bold)/i.test(r["font-weight"])&&(delete r["font-weight"],t.wrap(new i("b",1))),/(italic)/i.test(r["font-style"])&&(delete r["font-style"],t.wrap(new i("i",1))),r=s.dom.serializeStyle(r,t.name),r?r:null}var f=c.content,p,m;if(p=l.paste_retain_style_properties,p&&(m=e.makeMap(p.split(/[, ]/))),l.paste_enable_default_filters!==!1&
amp;&a(c.content)){c.wordContent=!0,f=o.filter(f,[/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\xa0"],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(e,t){return t.length>0?t.replace(/./," ").slice(Math.floor(t.length/2)).split("").join("\xa0"):""}]]);var h=l.paste_word_valid_elements;h||(h="-strong/b,-em/i,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-table[width],-tr,-td[colspan|rowspan|width],-th,-thead,-tfoot,-tbody,-a[href|name],sub,sup,strike,br,del");var g=new n({valid_elements:h,valid_children:"-li[p]"});e.each(g.elements,function(e){e.attributes["class"]||(e.attributes["class"]={},e.attributesOrder.push("class")),e.attri
butes.style||(e.attributes.style={},e.attributesOrder.push("style"))});var v=new t({},g);v.addAttributeFilter("style",function(e){for(var t=e.length,n;t--;)n=e[t],n.attr("style",d(n,n.attr("style"))),"span"==n.name&&n.parent&&!n.attributes.length&&n.unwrap()}),v.addAttributeFilter("class",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel|MsoCaption)$/i.test(r)&&n.remove(),n.attr("class",null)}),v.addNodeFilter("del",function(e){for(var t=e.length;t--;)e[t].remove()}),v.addNodeFilter("a",function(e){for(var t=e.length,n,r,i;t--;)if(n=e[t],r=n.attr("href"),i=n.attr("name"),r&&-1!=r.indexOf("#_msocom_"))n.remove();else if(r&&0===r.indexOf("file://")&&(r=r.split("#")[1],r&&(r="#"+r)),r||i){if(i&&!/^_
?(?:toc|edn|ftn)/i.test(i)){n.unwrap();continue}n.attr({href:r,name:i})}else n.unwrap()});var y=v.parse(f);u(y),c.content=new r({},g).serialize(y)}})}return s.isWordContent=a,s}),r(y,[p,c,h,l],function(e,t,n,r){return function(i){function o(e){i.on("BeforePastePreProcess",function(t){t.content=e(t.content)})}function a(e){if(!n.isWordContent(e))return e;var o=[];t.each(i.schema.getBlockElements(),function(e,t){o.push(t)});var a=new RegExp("(?:<br> [\\s\\r\\n]+|<br>)*(<\\/?("+o.join("|")+")[^>]*>)(?:<br> [\\s\\r\\n]+|<br>)*","g");return e=r.filter(e,[[a,"$1"]]),e=r.filter(e,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}function s(e){if(n.isWordContent(e))return e;var t=i.settings.paste_webkit_styles;if(i.settings.paste_remove_styles_if_webkit===!1||"all"==t)return e;if(t&
amp;&(t=t.split(/[, ]/)),t){var r=i.dom,o=i.selection.getNode();e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(e,n,i,a){var s=r.parseStyle(i,"span"),l={};if("none"===t)return n+a;for(var c=0;c<t.length;c++){var u=s[t[c]],d=r.getStyle(o,t[c],!0);/color/.test(t[c])&&(u=r.toHex(u),d=r.toHex(d)),d!=u&&(l[t[c]]=u)}return l=r.serializeStyle(l,"span"),l?n+' style="'+l+'"'+a:n+a})}else e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return e=e.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(e,t,n,r){return t+' style="'+n+'"'+r})}e.webkit&&o(s),e.ie&&o(a)}}),r(b,[C,f,h,y],function(e,t,n,r){var i;e.add("paste",function(e){function o(){"text"==s.pasteFormat?(this.active(!1),s.pasteFormat="html"):(s.pasteFormat="text",this.active(!0),i||(e.wind
owManager.alert("Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off."),i=!0))}var a=this,s,l=e.settings;a.clipboard=s=new t(e),a.quirks=new r(e),a.wordFilter=new n(e),e.settings.paste_as_text&&(a.clipboard.pasteFormat="text"),l.paste_preprocess&&e.on("PastePreProcess",function(e){l.paste_preprocess.call(a,a,e)}),l.paste_postprocess&&e.on("PastePostProcess",function(e){l.paste_postprocess.call(a,a,e)}),e.addCommand("mceInsertClipboardContent",function(e,t){t.content&&a.clipboard.pasteHtml(t.content),t.text&&a.clipboard.pasteText(t.text)}),e.paste_block_drop&&e.on("dragend dragover draggesture dragdrop drop drag",function(e){e.preventDefault(),e.stopPropagation()}),e.settings.paste_data_images||e.on("drop",function(e){var t=e.dataTransfer;t&&t.files&&t.files.length>0&&e.preventDefault()
}),e.addButton("pastetext",{icon:"pastetext",tooltip:"Paste as text",onclick:o,active:"text"==a.clipboard.pasteFormat}),e.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,active:s.pasteFormat,onclick:o})})}),a([l,h])}(this);
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunksrcwpincludesjstinymcepluginstextcolorpluginjs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/js/tinymce/plugins/textcolor/plugin.js (29202 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/js/tinymce/plugins/textcolor/plugin.js 2014-07-17 00:49:11 UTC (rev 29202)
+++ trunk/src/wp-includes/js/tinymce/plugins/textcolor/plugin.js 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -12,8 +12,25 @@
</span><span class="cx"> /*eslint consistent-this:0 */
</span><span class="cx">
</span><span class="cx"> tinymce.PluginManager.add('textcolor', function(editor) {
</span><del>- var VK = tinymce.util.VK;
</del><ins>+ var cols, rows;
</ins><span class="cx">
</span><ins>+ rows = editor.settings.textcolor_rows || 5;
+ cols = editor.settings.textcolor_cols || 8;
+
+ function getCurrentColor(format) {
+ var color;
+
+ editor.dom.getParents(editor.selection.getStart(), function(elm) {
+ var value;
+
+ if ((value = elm.style[format == 'forecolor' ? 'color' : 'background-color'])) {
+ color = value;
+ }
+ });
+
+ return color;
+ }
+
</ins><span class="cx"> function mapColors() {
</span><span class="cx"> var i, colors = [], colorMap;
</span><span class="cx">
</span><span class="lines">@@ -49,21 +66,20 @@
</span><span class="cx"> "00FFFF", "Aqua",
</span><span class="cx"> "00CCFF", "Sky blue",
</span><span class="cx"> "993366", "Red violet",
</span><del>- "C0C0C0", "Silver",
</del><ins>+ "FFFFFF", "White",
</ins><span class="cx"> "FF99CC", "Pink",
</span><span class="cx"> "FFCC99", "Peach",
</span><span class="cx"> "FFFF99", "Light yellow",
</span><span class="cx"> "CCFFCC", "Pale green",
</span><span class="cx"> "CCFFFF", "Pale cyan",
</span><span class="cx"> "99CCFF", "Light sky blue",
</span><del>- "CC99FF", "Plum",
- "FFFFFF", "White"
</del><ins>+ "CC99FF", "Plum"
</ins><span class="cx"> ];
</span><span class="cx">
</span><span class="cx"> for (i = 0; i < colorMap.length; i += 2) {
</span><span class="cx"> colors.push({
</span><span class="cx"> text: colorMap[i + 1],
</span><del>- color: colorMap[i]
</del><ins>+ color: '#' + colorMap[i]
</ins><span class="cx"> });
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -71,14 +87,33 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function renderColorPicker() {
</span><del>- var ctrl = this, colors, color, html, last, rows, cols, x, y, i;
</del><ins>+ var ctrl = this, colors, color, html, last, x, y, i, id = ctrl._id, count = 0;
</ins><span class="cx">
</span><ins>+ function getColorCellHtml(color, title) {
+ var isNoColor = color == 'transparent';
+
+ return (
+ '<td class="mce-grid-cell' + (isNoColor ? ' mce-colorbtn-trans' : '') + '">' +
+ '<div id="' + id + '-' + (count++) + '"' +
+ ' data-mce-color="' + (color ? color : '') + '"' +
+ ' role="option"' +
+ ' tabIndex="-1"' +
+ ' style="' + (color ? 'background-color: ' + color : '') + '"' +
+ ' title="' + tinymce.translate(title) + '">' +
+ (isNoColor ? '×' : '') +
+ '</div>' +
+ '</td>'
+ );
+ }
+
</ins><span class="cx"> colors = mapColors();
</span><ins>+ colors.push({
+ text: tinymce.translate("No color"),
+ color: "transparent"
+ });
</ins><span class="cx">
</span><span class="cx"> html = '<table class="mce-grid mce-grid-border mce-colorbutton-grid" role="list" cellspacing="0"><tbody>';
</span><span class="cx"> last = colors.length - 1;
</span><del>- rows = editor.settings.textcolor_rows || 5;
- cols = editor.settings.textcolor_cols || 8;
</del><span class="cx">
</span><span class="cx"> for (y = 0; y < rows; y++) {
</span><span class="cx"> html += '<tr>';
</span><span class="lines">@@ -90,44 +125,32 @@
</span><span class="cx"> html += '<td></td>';
</span><span class="cx"> } else {
</span><span class="cx"> color = colors[i];
</span><del>- html += (
- '<td>' +
- '<div id="' + ctrl._id + '-' + i + '"' +
- ' data-mce-color="' + color.color + '"' +
- ' role="option"' +
- ' tabIndex="-1"' +
- ' style="' + (color ? 'background-color: #' + color.color : '') + '"' +
- ' title="' + color.text + '">' +
- '</div>' +
- '</td>'
- );
</del><ins>+ html += getColorCellHtml(color.color, color.text);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> html += '</tr>';
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (editor.settings.textcolor_enable_hex) {
- var hexIdN = last + 1;
- var hexInputColSpan = cols - 1;
</del><ins>+ if (editor.settings.color_picker_callback) {
</ins><span class="cx"> html += (
</span><span class="cx"> '<tr>' +
</span><del>- '<td>' +
- '<div id="' + ctrl._id + '-' + hexIdN + '"' +
- 'data-mce-color=""' +
- 'style="background-color: #FFFFFF"' +
- 'data-mce-hex-picker="true"' +
- 'role="option" ' +
- '>' +
</del><ins>+ '<td colspan="' + cols + '" class="mce-custom-color-btn">' +
+ '<div id="' + id + '-c" class="mce-widget mce-btn mce-btn-small mce-btn-flat" ' +
+ 'role="button" tabindex="-1" aria-labelledby="' + id + '-c" style="width: 100%">' +
+ '<button type="button" role="presentation" tabindex="-1">' + tinymce.translate('Custom...') + '</button>' +
</ins><span class="cx"> '</div>' +
</span><span class="cx"> '</td>' +
</span><del>- '<td colspan="' + hexInputColSpan + '">' +
- '# <input type="text" class="mce-textcolor-hexpicker"' +
- 'role="textbox" name="mce-hexcolorpicker"' +
- 'id="' + ctrl._id + '-hexcolorpicker" maxlength="6" >' +
- '</td>' +
</del><span class="cx"> '</tr>'
</span><span class="cx"> );
</span><ins>+
+ html += '<tr>';
+
+ for (x = 0; x < cols; x++) {
+ html += getColorCellHtml('', 'Custom color');
+ }
+
+ html += '</tr>';
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> html += '</tbody></table>';
</span><span class="lines">@@ -135,134 +158,101 @@
</span><span class="cx"> return html;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ function applyFormat(format, value) {
+ editor.focus();
+ editor.formatter.apply(format, {value: value});
+ editor.nodeChanged();
+ }
+
+ function removeFormat(format) {
+ editor.focus();
+ editor.formatter.remove(format, {value: null}, null, true);
+ editor.nodeChanged();
+ }
+
</ins><span class="cx"> function onPanelClick(e) {
</span><span class="cx"> var buttonCtrl = this.parent(), value;
</span><del>-
- if (e.target.getAttribute('disabled')) {
- return;
- }
- if ((value = e.target.getAttribute('data-mce-color'))) {
- if (this.lastId) {
- document.getElementById(this.lastId).setAttribute('aria-selected', false);
- }
</del><span class="cx">
</span><del>- e.target.setAttribute('aria-selected', true);
- this.lastId = e.target.id;
-
</del><ins>+ function selectColor(value) {
</ins><span class="cx"> buttonCtrl.hidePanel();
</span><del>- value = '#' + value;
</del><span class="cx"> buttonCtrl.color(value);
</span><del>- editor.execCommand(buttonCtrl.settings.selectcmd, false, value);
</del><ins>+ applyFormat(buttonCtrl.settings.format, value);
</ins><span class="cx"> }
</span><del>- }
</del><span class="cx">
</span><del>- function onButtonClick() {
- var self = this;
-
- if (self._color) {
- editor.execCommand(self.settings.selectcmd, false, self._color);
</del><ins>+ function setDivColor(div, value) {
+ div.style.background = value;
+ div.setAttribute('data-mce-color', value);
</ins><span class="cx"> }
</span><del>- }
</del><span class="cx">
</span><del>- /**
- * isValidHex checks if the provided string is valid hex color string
- *
- * @param {string} hexString 3 or 6 chars string representing a color.
- * @return {Boolean} [true] the string is valid hex color
- * [false] the string is not valid hex color
- */
- function isValidHex(hexString) {
- return /(^[0-9A-F]{3,6}$)/i.test(hexString);
- }
</del><ins>+ if (tinymce.DOM.getParent(e.target, '.mce-custom-color-btn')) {
+ buttonCtrl.hidePanel();
</ins><span class="cx">
</span><del>- /**
- * isSpecialStroke checks if the keyCode is currently a special one:
- * backspace, delete, arrow keys (left/right)
- * or if it's a special ctrl+x/c/v
- *
- * @param {string} keyCode
- * @return {Boolean}
- */
- function isSpecialStroke(e) {
- var keyCode = e.keyCode;
- // Allow delete and backspace
- if (keyCode === VK.BACKSPACE || keyCode === VK.DELETE ) {
- return true;
- }
</del><ins>+ editor.settings.color_picker_callback.call(editor, function(value) {
+ var tableElm = buttonCtrl.panel.getEl().getElementsByTagName('table')[0];
+ var customColorCells, div, i;
</ins><span class="cx">
</span><del>- // Allow arrow movements
- if (keyCode === VK.LEFT || keyCode === VK.RIGHT) {
- return true;
- }
</del><ins>+ customColorCells = tinymce.map(tableElm.rows[tableElm.rows.length - 1].childNodes, function(elm) {
+ return elm.firstChild;
+ });
</ins><span class="cx">
</span><del>- // Allow CTRL/CMD + C/V/X
- if ((tinymce.isMac ? e.metaKey : e.ctrlKey) && (keyCode == 67 || keyCode == 88 || keyCode == 86)) {
- return true;
- }
</del><ins>+ for (i = 0; i < customColorCells.length; i++) {
+ div = customColorCells[i];
+ if (!div.getAttribute('data-mce-color')) {
+ break;
+ }
+ }
</ins><span class="cx">
</span><del>- return false;
- }
</del><ins>+ // Shift colors to the right
+ // TODO: Might need to be the left on RTL
+ if (i == cols) {
+ for (i = 0; i < cols - 1; i++) {
+ setDivColor(customColorCells[i], customColorCells[i + 1].getAttribute('data-mce-color'));
+ }
+ }
</ins><span class="cx">
</span><del>- function initHexPicker(e) {
- if (!editor.settings.textcolor_enable_hex) {
- return;
</del><ins>+ setDivColor(div, value);
+ selectColor(value);
+ }, getCurrentColor(buttonCtrl.settings.format));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- var wrapper = document.querySelector('#' + e.target._id);
- var input = wrapper.querySelector('[name="mce-hexcolorpicker"]');
- var hexcolorDiv = wrapper.querySelector('[data-mce-hex-picker]');
- var inputEvent = 'input';
</del><ins>+ value = e.target.getAttribute('data-mce-color');
+ if (value) {
+ if (this.lastId) {
+ document.getElementById(this.lastId).setAttribute('aria-selected', false);
+ }
</ins><span class="cx">
</span><del>- editor.dom.events.bind(input, 'keydown', function(e){
- var keyCode = e.keyCode;
</del><ins>+ e.target.setAttribute('aria-selected', true);
+ this.lastId = e.target.id;
</ins><span class="cx">
</span><del>- if (isSpecialStroke(e)) {
</del><ins>+ if (value == 'transparent') {
+ removeFormat(buttonCtrl.settings.format);
+ buttonCtrl.hidePanel();
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- // Look for anything which is not A-Z or 0-9 and it is not a special char.
- if (!((keyCode >= 48 && keyCode <= 57) || (keyCode >= 65 && keyCode <= 70) || (keyCode >= 96 && keyCode <= 105)) ) {
- e.preventDefault();
- }
</del><ins>+ selectColor(value);
+ } else if (value !== null) {
+ buttonCtrl.hidePanel();
+ }
+ }
</ins><span class="cx">
</span><del>- // On Enter, take it like a click on the hexcolorDiv
- if ( (keyCode === VK.ENTER && isValidHex(input.value) ) ) {
- hexcolorDiv.click();
- }
</del><ins>+ function onButtonClick() {
+ var self = this;
</ins><span class="cx">
</span><del>- });
-
- // If IE8 we can't use the input event, so we have to
- // listen for keypress and paste events.
- // In IE9 the input implementation is buggy so
- // we use the same events as we'd like on IE8
- if (tinymce.Env.ie && tinymce.Env.ie <= 9) {
- inputEvent = 'keypress paste blur keydown keyup propertychange';
</del><ins>+ if (self._color) {
+ applyFormat(self.settings.format, self._color);
</ins><span class="cx"> }
</span><del>-
- editor.dom.events.bind(input, inputEvent, function(){
- if (isValidHex(input.value)) {
- hexcolorDiv.setAttribute('data-mce-color', input.value);
- hexcolorDiv.setAttribute('style', 'background-color:#' + input.value);
- hexcolorDiv.removeAttribute('disabled');
- } else {
- hexcolorDiv.setAttribute('disabled', 'disabled');
- }
-
- });
-
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> editor.addButton('forecolor', {
</span><span class="cx"> type: 'colorbutton',
</span><span class="cx"> tooltip: 'Text color',
</span><del>- selectcmd: 'ForeColor',
</del><ins>+ format: 'forecolor',
</ins><span class="cx"> panel: {
</span><span class="cx"> role: 'application',
</span><span class="cx"> ariaRemember: true,
</span><span class="cx"> html: renderColorPicker,
</span><del>- onclick: onPanelClick,
- onPostRender: initHexPicker
</del><ins>+ onclick: onPanelClick
</ins><span class="cx"> },
</span><span class="cx"> onclick: onButtonClick
</span><span class="cx"> });
</span><span class="lines">@@ -270,13 +260,12 @@
</span><span class="cx"> editor.addButton('backcolor', {
</span><span class="cx"> type: 'colorbutton',
</span><span class="cx"> tooltip: 'Background color',
</span><del>- selectcmd: 'HiliteColor',
</del><ins>+ format: 'hilitecolor',
</ins><span class="cx"> panel: {
</span><span class="cx"> role: 'application',
</span><span class="cx"> ariaRemember: true,
</span><span class="cx"> html: renderColorPicker,
</span><del>- onclick: onPanelClick,
- onPostRender: initHexPicker
</del><ins>+ onclick: onPanelClick
</ins><span class="cx"> },
</span><span class="cx"> onclick: onButtonClick
</span><span class="cx"> });
</span></span></pre></div>
<a id="trunksrcwpincludesjstinymcepluginstextcolorpluginminjs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/js/tinymce/plugins/textcolor/plugin.min.js (29202 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/js/tinymce/plugins/textcolor/plugin.min.js 2014-07-17 00:49:11 UTC (rev 29202)
+++ trunk/src/wp-includes/js/tinymce/plugins/textcolor/plugin.min.js 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -1 +1 @@
</span><del>-tinymce.PluginManager.add("textcolor",function(e){function t(){var t,o,r=[];for(o=e.settings.textcolor_map||["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blu
e","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Red violet","C0C0C0","Silver","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum","FFFFFF","White"],t=0;t<o.length;t+=2)r.push({text:o[t+1],color:o[t]});return r}function o(){var o,r,l,c,i,a,n,d,s,u=this;for(o=t(),l='<table class="mce-grid mce-grid-border mce-colorbutton-grid" role="list" cellspacing="0"><tbody>',c=o.length-1,i=e.settin
gs.textcolor_rows||5,a=e.settings.textcolor_cols||8,d=0;i>d;d++){for(l+="<tr>",n=0;a>n;n++)s=d*a+n,s>c?l+="<td></td>":(r=o[s],l+='<td><div id="'+u._id+"-"+s+'" data-mce-color="'+r.color+'" role="option" tabIndex="-1" style="'+(r?"background-color: #"+r.color:"")+'" title="'+r.text+'"></div></td>');l+="</tr>"}if(e.settings.textcolor_enable_hex){var F=c+1,m=a-1;l+='<tr><td><div id="'+u._id+"-"+F+'"data-mce-color=""style="background-color: #FFFFFF"data-mce-hex-picker="true"role="option" ></div></td><td colspan="'+m+'"># <input type="text" class="mce-textcolor-hexpicker"role="textbox" name="mce-hexcolorpicker"id="'+u._id+'-hexcolorpicker" maxlength="6&
quot; ></td></tr>'}return l+="</tbody></table>"}function r(t){var o,r=this.parent();t.target.getAttribute("disabled")||(o=t.target.getAttribute("data-mce-color"))&&(this.lastId&&document.getElementById(this.lastId).setAttribute("aria-selected",!1),t.target.setAttribute("aria-selected",!0),this.lastId=t.target.id,r.hidePanel(),o="#"+o,r.color(o),e.execCommand(r.settings.selectcmd,!1,o))}function l(){var t=this;t._color&&e.execCommand(t.settings.selectcmd,!1,t._color)}function c(e){return/(^[0-9A-F]{3,6}$)/i.test(e)}function i(e){var t=e.keyCode;return t===n.BACKSPACE||t===n.DELETE?!0:t===n.LEFT||t===n.RIGHT?!0:(tinymce.isMac?e.metaKey:e.ctrlKey)&&(67==t||88==t||86==t)?!0:!1}function a(t){if(e.settings.textcolor_enable_hex){var o=document.querySelector("#"+t.target._id),r=o.querySelector('[name="mce-hexcolorpicker"]'),l=o.querySelector("[data-
mce-hex-picker]"),a="input";e.dom.events.bind(r,"keydown",function(e){var t=e.keyCode;i(e)||(t>=48&&57>=t||t>=65&&70>=t||t>=96&&105>=t||e.preventDefault(),t===n.ENTER&&c(r.value)&&l.click())}),tinymce.Env.ie&&tinymce.Env.ie<=9&&(a="keypress paste blur keydown keyup propertychange"),e.dom.events.bind(r,a,function(){c(r.value)?(l.setAttribute("data-mce-color",r.value),l.setAttribute("style","background-color:#"+r.value),l.removeAttribute("disabled")):l.setAttribute("disabled","disabled")})}}var n=tinymce.util.VK;e.addButton("forecolor",{type:"colorbutton",tooltip:"Text color",selectcmd:"ForeColor",panel:{role:"application",ariaRemember:!0,html:o,onclick:r,onPostRender:a},onclick:l}),e.addButton("backcolor",{type:"colorbutton",tooltip:"Backgro
und color",selectcmd:"HiliteColor",panel:{role:"application",ariaRemember:!0,html:o,onclick:r,onPostRender:a},onclick:l})});
</del><span class="cx">\ No newline at end of file
</span><ins>+tinymce.PluginManager.add("textcolor",function(t){function e(e){var o;return t.dom.getParents(t.selection.getStart(),function(t){var r;(r=t.style["forecolor"==e?"color":"background-color"])&&(o=r)}),o}function o(){var e,o,r=[];for(o=t.settings.textcolor_map||["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF
9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Red violet","FFFFFF","White","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum"],e=0;e<o.length;e+=2)r.push({text:o[e+1],color:"#"+o[e]});return r}function r(){function e(t,e){var o="transparent&
quot;==t;return'<td class="mce-grid-cell'+(o?" mce-colorbtn-trans":"")+'"><div id="'+m+"-"+F++ +'" data-mce-color="'+(t?t:"")+'" role="option" tabIndex="-1" style="'+(t?"background-color: "+t:"")+'" title="'+tinymce.translate(e)+'">'+(o?"×":"")+"</div></td>"}var r,l,a,n,c,d,u,g=this,m=g._id,F=0;for(r=o(),r.push({text:tinymce.translate("No color"),color:"transparent"}),a='<table class="mce-grid mce-grid-border mce-colorbutton-grid" role="list" cellspacing="0"><tbody>',n=r.length-1,d=0;s>d;d++){for(a+="<tr>",c=0;i>c;c++)u=d*i+c,u>n?a+="<td></td>":(l=r[u],a+=e(l.color,l.text));a+="</tr>"}if(t.settings.color_picker_callback){for(a+='<tr><td colspan="'+i+'"
class="mce-custom-color-btn"><div id="'+m+'-c" class="mce-widget mce-btn mce-btn-small mce-btn-flat" role="button" tabindex="-1" aria-labelledby="'+m+'-c" style="width: 100%"><button type="button" role="presentation" tabindex="-1">'+tinymce.translate("Custom...")+"</button></div></td></tr>",a+="<tr>",c=0;i>c;c++)a+=e("","Custom color");a+="</tr>"}return a+="</tbody></table>"}function l(e,o){t.focus(),t.formatter.apply(e,{value:o}),t.nodeChanged()}function a(e){t.focus(),t.formatter.remove(e,{value:null},null,!0),t.nodeChanged()}function n(o){function r(t){s.hidePanel(),s.color(t),l(s.settings.format,t)}function n(t,e){t.style.background=e,t.setAttribute("data-mce-color",e)}var c,s=this.parent();if(tinymce.DOM.getParent(o.target,".mce-c
ustom-color-btn")&&(s.hidePanel(),t.settings.color_picker_callback.call(t,function(t){var e,o,l,a=s.panel.getEl().getElementsByTagName("table")[0];for(e=tinymce.map(a.rows[a.rows.length-1].childNodes,function(t){return t.firstChild}),l=0;l<e.length&&(o=e[l],o.getAttribute("data-mce-color"));l++);if(l==i)for(l=0;i-1>l;l++)n(e[l],e[l+1].getAttribute("data-mce-color"));n(o,t),r(t)},e(s.settings.format))),c=o.target.getAttribute("data-mce-color")){if(this.lastId&&document.getElementById(this.lastId).setAttribute("aria-selected",!1),o.target.setAttribute("aria-selected",!0),this.lastId=o.target.id,"transparent"==c)return a(s.settings.format),void s.hidePanel();r(c)}else null!==c&&s.hidePanel()}function c(){var t=this;t._color&&l(t.settings.format,t._color)}var i,s;s=t.settings.textcolor_rows||5,i=t.settings.textcolor_cols||8,t.addButton("forecolor",{type:&quo
t;colorbutton",tooltip:"Text color",format:"forecolor",panel:{role:"application",ariaRemember:!0,html:r,onclick:n},onclick:c}),t.addButton("backcolor",{type:"colorbutton",tooltip:"Background color",format:"hilitecolor",panel:{role:"application",ariaRemember:!0,html:r,onclick:n},onclick:c})});
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunksrcwpincludesjstinymceskinslightgrayskinie7mincss"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/js/tinymce/skins/lightgray/skin.ie7.min.css (29202 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/js/tinymce/skins/lightgray/skin.ie7.min.css 2014-07-17 00:49:11 UTC (rev 29202)
+++ trunk/src/wp-includes/js/tinymce/skins/lightgray/skin.ie7.min.css 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -1 +1 @@
</span><del>-.mce-container,.mce-container *,.mce-widget,.mce-widget *,.mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;-webkit-tap-highlight-color:transparent;line-height:normal;font-weight:normal;text-align:left;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr}.mce-widget button{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.mce-container *[unselectable]{-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.mce-fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.mce-fade.mce-in{opacity:1}.mce-tinymce{visibility:inherit !important;position:relative}.mce-fullscreen{border:0;padding:0;margin
:0;overflow:hidden;height:100%;z-index:100}div.mce-fullscreen{position:fixed;top:0;left:0;width:100%;height:auto}.mce-tinymce{display:block;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mce-wordcount{position:absolute;top:0;right:0;padding:8px}div.mce-edit-area{background:#FFF;filter:none}.mce-statusbar{position:relative}.mce-statusbar .mce-container-body{position:relative}.mce-fullscreen .mce-resizehandle{display:none}.mce-charmap{border-collapse:collapse}.mce-charmap td{cursor:default;border:1px solid #9e9e9e;width:20px;height:20px;line-height:20px;text-align:center;vertical-align:middle;padding:2px}.mce-charmap td div{text-align:center}.mce-charmap td:hover{background:#d9d9d9}.mce-grid td div{border:1px solid #d6d6d6;width:12px;height:12px;margin:2px;cursor:pointer}.mce-grid td div:focus{border-color:#a1a1a1}.mce-grid td div[disabled]{cursor:not-allowed}.mce-grid{border-spacing:2px;border-collapse:separate}.mce-grid a{display:block;border:1px solid transpare
nt}.mce-grid a:hover,.mce-grid a:focus{border-color:#a1a1a1}.mce-grid-border{margin:0 4px 0 4px}.mce-grid-border a{border-color:#d6d6d6;width:13px;height:13px}.mce-grid-border a:hover,.mce-grid-border a.mce-active{border-color:#a1a1a1;background:#c8def4}.mce-text-center{text-align:center}div.mce-tinymce-inline{width:100%;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}input.mce-textcolor-hexpicker{border:1px solid #d6d6d6;margin:2px;height:12px;font-size:11px}.mce-toolbar-grp{padding-bottom:2px}.mce-toolbar-grp .mce-flow-layout-item{margin-bottom:0}.mce-rtl .mce-wordcount{left:0;right:auto}.mce-container,.mce-container-body{display:block}.mce-autoscroll{overflow:hidden}.mce-scrollbar{position:absolute;width:7px;height:100%;top:2px;right:2px;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-scrollbar-h{top:auto;right:auto;left:2px;bottom:2px;width:100%;height:7px}.mce-scrollbar-thumb{position:absolute;background-color:#000;border:1px solid #888;border-color:rgba(85,85,85,0
.6);width:5px;height:100%;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.mce-scrollbar-h .mce-scrollbar-thumb{width:100%;height:5px}.mce-scrollbar:hover,.mce-scrollbar.mce-active{background-color:#AAA;opacity:.6;filter:alpha(opacity=60);zoom:1;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.mce-scroll{position:relative}.mce-panel{border:0 solid #9e9e9e;background-color:#f0f0f0;background-image:-moz-linear-gradient(top, #fdfdfd, #ddd);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fdfdfd), to(#ddd));background-image:-webkit-linear-gradient(top, #fdfdfd, #ddd);background-image:-o-linear-gradient(top, #fdfdfd, #ddd);background-image:linear-gradient(to bottom, #fdfdfd, #ddd);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffdfdfd', endColorstr='#ffdddddd', GradientType=0);zoom:1}.mce-floatpanel{position:absolute;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px
rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2)}.mce-floatpanel.mce-fixed{position:fixed}.mce-floatpanel .mce-arrow,.mce-floatpanel .mce-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.mce-floatpanel .mce-arrow{border-width:11px}.mce-floatpanel .mce-arrow:after{border-width:10px;content:""}.mce-floatpanel.mce-popover{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);top:0;left:0;background:#fff;border:1px solid #9e9e9e;border:1px solid rgba(0,0,0,0.25)}.mce-floatpanel.mce-popover.mce-bottom{margin-top:10px;*margin-top:0}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#9e9e9e;border-bottom-color:r
gba(0,0,0,0.25);top:-11px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.mce-floatpanel.mce-popover.mce-bottom.mce-start{margin-left:-22px}.mce-floatpanel.mce-popover.mce-bottom.mce-start>.mce-arrow{left:20px}.mce-floatpanel.mce-popover.mce-bottom.mce-end{margin-left:22px}.mce-floatpanel.mce-popover.mce-bottom.mce-end>.mce-arrow{right:10px;left:auto}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;background:#fff;height:100%}div.mce-fullscreen{position:fixed;top:0;left:0}#mce-modal-block{opacity:0;filter:alpha(opacity=0);zoom:1;position:fixed;left:0;top:0;width:100%;height:100%;background:#000}#mce-modal-block.mce-in{opacity:.3;filter:alpha(opacity=30);zoom:1}.mce-window-move{cursor:move}.mce-window{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0,
0, 0, 0.3);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;background:#fff;position:fixed;top:0;left:0;opacity:0;-webkit-transition:opacity 150ms ease-in;transition:opacity 150ms ease-in}.mce-window.mce-in{opacity:1}.mce-window-head{padding:9px 15px;border-bottom:1px solid #c5c5c5;position:relative}.mce-window-head .mce-close{position:absolute;right:15px;top:9px;font-size:20px;font-weight:bold;line-height:20px;color:#858585;cursor:pointer;height:20px;overflow:hidden}.mce-close:hover{color:#adadad}.mce-window-head .mce-title{line-height:20px;font-size:20px;font-weight:bold;text-rendering:optimizelegibility;padding-right:10px}.mce-window .mce-container-body{display:block}.mce-foot{display:block;background-color:#fff;border-top:1px solid #c5c5c5;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.mce-window-head .mce-dragh{position:absolute;top:0;left:0;cursor:move;width:90%;height:100%}.mce-window ifram
e{width:100%;height:100%}.mce-window.mce-fullscreen,.mce-window.mce-fullscreen .mce-foot{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mce-rtl .mce-window-head .mce-close{position:absolute;right:auto;left:15px}.mce-rtl .mce-window-head .mce-dragh{left:auto;right:0}.mce-rtl .mce-window-head .mce-title{direction:rtl;text-align:right}.mce-abs-layout{position:relative}body .mce-abs-layout-item,.mce-abs-end{position:absolute}.mce-abs-end{width:1px;height:1px}.mce-container-body.mce-abs-layout{overflow:hidden}.mce-tooltip{position:absolute;padding:5px;opacity:.8;filter:alpha(opacity=80);zoom:1}.mce-tooltip-inner{font-size:11px;background-color:#000;color:#fff;max-width:200px;padding:5px 8px 4px 8px;text-align:center;white-space:normal}.mce-tooltip-inner{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-tooltip-inner{-webkit-box-shadow:0 0 5px #000000;-moz-box-shadow:0 0 5px #000000;box-shadow:0 0 5px #000000}.mce-tooltip-arrow{position:absolute;width:
0;height:0;line-height:0;border:5px dashed #000}.mce-tooltip-arrow-n{border-bottom-color:#000}.mce-tooltip-arrow-s{border-top-color:#000}.mce-tooltip-arrow-e{border-left-color:#000}.mce-tooltip-arrow-w{border-right-color:#000}.mce-tooltip-nw,.mce-tooltip-sw{margin-left:-14px}.mce-tooltip-n .mce-tooltip-arrow{top:0px;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-nw .mce-tooltip-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-ne .mce-tooltip-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-s .mce-tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-sw .mce-tooltip-arrow{bottom:0;left:10px;border-top-styl
e:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-se .mce-tooltip-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-e .mce-tooltip-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.mce-tooltip-w .mce-tooltip-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.mce-btn{border:1px solid #b1b1b1;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25) rgba(0,0,0,0.25);position:relative;text-shadow:0 1px 1px rgba(255,255,255,0.75);display:inline-block;*display:inline;*zoom:1;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(25
5, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);background-color:#f0f0f0;background-image:-moz-linear-gradient(top, #fff, #d9d9d9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#d9d9d9));background-image:-webkit-linear-gradient(top, #fff, #d9d9d9);background-image:-o-linear-gradient(top, #fff, #d9d9d9);background-image:linear-gradient(to bottom, #fff, #d9d9d9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffd9d9d9', GradientType=0);zoom:1}.mce-btn:hover,.mce-btn:focus{color:#333;background-color:#e3e3e3;background-image:-moz-linear-gradient(top, #f2f2f2, #ccc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#ccc));background-image:-webkit-linear-gradient(top, #f2f2f2, #ccc);background-image:-o-linear-gradient(top, #f2f2f2, #ccc);background-image:linear-gradient(to bottom, #f2f2f2, #c
cc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffcccccc', GradientType=0);zoom:1}.mce-btn.mce-disabled button,.mce-btn.mce-disabled:hover button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-btn.mce-active,.mce-btn.mce-active:hover{background-color:#d6d6d6;background-image:-moz-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#c0c0c0));background-image:-webkit-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-o-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:linear-gradient(to bottom, #e6e6e6, #c0c0c0);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffc0c0c0', GradientType=0);zoom:1;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inse
t 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-btn:not(.mce-disabled):active{background-color:#d6d6d6;background-image:-moz-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#c0c0c0));background-image:-webkit-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-o-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:linear-gradient(to bottom, #e6e6e6, #c0c0c0);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffc0c0c0', GradientType=0);zoom:1;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-btn button{padding:4px 10px;font-size:14px;line-height:20px;*li
ne-height:16px;cursor:pointer;color:#333;text-align:center;overflow:visible;-webkit-appearance:none}.mce-btn button::-moz-focus-inner{border:0;padding:0}.mce-btn i{text-shadow:1px 1px #fff}.mce-primary{min-width:50px;color:#fff;border:1px solid #b1b1b1;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25) rgba(0,0,0,0.25);background-color:#006dcc;background-image:-moz-linear-gradient(top, #08c, #04c);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#04c));background-image:-webkit-linear-gradient(top, #08c, #04c);background-image:-o-linear-gradient(top, #08c, #04c);background-image:linear-gradient(to bottom, #08c, #04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);zoom:1}.mce-primary:hover,.mce-primary:focus{background-color:#005fb3;background-image:-moz-linear-gradient(top, #0077b3, #003cb3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0077
b3), to(#003cb3));background-image:-webkit-linear-gradient(top, #0077b3, #003cb3);background-image:-o-linear-gradient(top, #0077b3, #003cb3);background-image:linear-gradient(to bottom, #0077b3, #003cb3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0077b3', endColorstr='#ff003cb3', GradientType=0);zoom:1}.mce-primary.mce-disabled button,.mce-primary.mce-disabled:hover button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-primary.mce-active,.mce-primary.mce-active:hover,.mce-primary:not(.mce-disabled):active{background-color:#005299;background-image:-moz-linear-gradient(top, #069, #039);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#069), to(#039));background-image:-webkit-linear-gradient(top, #069, #039);background-image:-o-linear-gradient(top, #069, #039);background-image:linear-gradient(to bottom, #069, #039);background-repeat:repeat-x;filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff006699', endColorstr='#ff003399', GradientType=0);zoom:1;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-primary button,.mce-primary button i{color:#fff;text-shadow:1px 1px #333}.mce-btn-large button{padding:9px 14px;font-size:16px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.mce-btn-large i{margin-top:2px}.mce-btn-small button{padding:1px 5px;font-size:12px;*padding-bottom:2px}.mce-btn-small i{line-height:20px;vertical-align:top;*line-height:18px}.mce-btn .mce-caret{margin-top:8px;margin-left:0}.mce-btn-small .mce-caret{margin-top:8px;margin-left:0}.mce-caret{display:inline-block;*display:inline;*zoom:1;width:0;height:0;vertical-align:top;border-top:4px solid #333;border-right:4px
solid transparent;border-left:4px solid transparent;content:""}.mce-disabled .mce-caret{border-top-color:#aaa}.mce-caret.mce-up{border-bottom:4px solid #333;border-top:0}.mce-rtl .mce-btn button{direction:rtl}.mce-btn-group .mce-btn{border-width:1px 0 1px 0;margin:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mce-btn-group .mce-first{border-left:1px solid #b1b1b1;border-left:1px solid rgba(0,0,0,0.25);-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.mce-btn-group .mce-last{border-right:1px solid #b1b1b1;border-right:1px solid rgba(0,0,0,0.1);-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.mce-btn-group .mce-first.mce-last{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-btn-group .mce-btn.mce-flow-layout-item{margin:0}.mce-checkbox{cursor:pointer}i.mce-i-checkbox{margin:0 3px 0 0;border:1px solid #c5c5c5;-webkit-border-radius:3px;-moz-border-radi
us:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);background-color:#f0f0f0;background-image:-moz-linear-gradient(top, #fff, #d9d9d9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#d9d9d9));background-image:-webkit-linear-gradient(top, #fff, #d9d9d9);background-image:-o-linear-gradient(top, #fff, #d9d9d9);background-image:linear-gradient(to bottom, #fff, #d9d9d9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffd9d9d9', GradientType=0);zoom:1;text-indent:-10em;*font-size:0;*line-height:0;*text-indent:0;overflow:hidden}.mce-checked i.mce-i-checkbox{color:#333;font-size:16px;line-height:16px;text-indent:0}.mce-checkbox:focus i.mce-i-checkbox,.mce-checkbox.mce-focus
i.mce-i-checkbox{border:1px solid rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65)}.mce-checkbox.mce-disabled .mce-label,.mce-checkbox.mce-disabled i.mce-i-checkbox{color:#acacac}.mce-rtl .mce-checkbox{direction:rtl;text-align:right}.mce-rtl i.mce-i-checkbox{margin:0 0 0 3px}.mce-colorbutton .mce-ico{position:relative}.mce-colorbutton-grid{margin:4px}.mce-colorbutton button{padding-right:4px}.mce-colorbutton .mce-preview{padding-right:3px;display:block;position:absolute;left:50%;top:50%;margin-left:-14px;margin-top:7px;background:gray;width:13px;height:2px;overflow:hidden}.mce-colorbutton.mce-btn-small .mce-preview{margin-left:-16px;padding-right:0;width:16px}.mce-colorbutton .mce-open{padding-left:4px;border-left:1px solid transparent;border-right:1px sol
id transparent}.mce-colorbutton:hover .mce-open{border-left-color:#bdbdbd;border-right-color:#bdbdbd}.mce-colorbutton.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-colorbutton{direction:rtl}.mce-rtl .mce-colorbutton .mce-preview{margin-left:0;padding-right:0;padding-left:4px;margin-right:-14px}.mce-rtl .mce-colorbutton.mce-btn-small .mce-preview{margin-left:0;padding-right:0;margin-right:-17px;padding-left:0}.mce-rtl .mce-colorbutton button{padding-right:10px;padding-left:10px}.mce-rtl .mce-colorbutton .mce-open{padding-left:4px;padding-right:4px}.mce-combobox{display:inline-block;*display:inline;*zoom:1;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);*height:32px}.mce-combobox input{border:1px solid #c5c5c5;border-right-color:#c5c5c5;height:28px}.mce-combobox.mce-disabled input{color:#adadad}.mce-
combobox.mce-has-open input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.mce-combobox .mce-btn{border-left:0;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.mce-combobox button{padding-right:8px;padding-left:8px}.mce-combobox.mce-disabled .mce-btn button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-path{display:inline-block;*display:inline;*zoom:1;padding:8px;white-space:normal}.mce-path .mce-txt{display:inline-block;padding-right:3px}.mce-path .mce-path-body{display:inline-block}.mce-path-item{display:inline-block;*display:inline;*zoom:1;cursor:pointer;color:#333}.mce-path-item:hover{text-decoration:underline}.mce-path-item:focus{background:#666;color:#fff}.mce-path .mce-divider{display:inline}.mce-disabled .mce-path-item{color:#aaa}.mce-rtl .mce-path{direction:rtl}.mce-fieldset{border:0 solid #9E9E9E;-webkit-borde
r-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-fieldset>.mce-container-body{margin-top:-15px}.mce-fieldset-title{margin-left:5px;padding:0 5px 0 5px}.mce-fit-layout{display:inline-block;*display:inline;*zoom:1}.mce-fit-layout-item{position:absolute}.mce-flow-layout-item{display:inline-block;*display:inline;*zoom:1}.mce-flow-layout-item{margin:2px 0 2px 2px}.mce-flow-layout-item.mce-last{margin-right:2px}.mce-flow-layout{white-space:normal}.mce-tinymce-inline .mce-flow-layout{white-space:nowrap}.mce-rtl .mce-flow-layout{text-align:right;direction:rtl}.mce-rtl .mce-flow-layout-item{margin:2px 2px 2px 0}.mce-rtl .mce-flow-layout-item.mce-last{margin-left:2px}.mce-iframe{border:0 solid #9e9e9e;width:100%;height:100%}.mce-label{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden}.mce-label.mce-autoscroll{overflow:auto}.mce-label.mce-disabled{color:#aaa}.mce-label.mce-multiline{white-space:pre-wrap}.mce-label.mce-error{c
olor:#a00}.mce-rtl .mce-label{text-align:right;direction:rtl}.mce-menubar .mce-menubtn{border-color:transparent;background:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:none}.mce-menubar{border:1px solid #c4c4c4}.mce-menubar .mce-menubtn button span{color:#333}.mce-menubar .mce-caret{border-top-color:#333}.mce-menubar .mce-menubtn:hover,.mce-menubar .mce-menubtn.mce-active,.mce-menubar .mce-menubtn:focus{border-color:transparent;background:#e6e6e6;filter:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-menubtn span{color:#333;margin-right:2px;line-height:20px;*line-height:16px}.mce-menubtn.mce-btn-small span{font-size:12px}.mce-menubtn.mce-fixed-width span{display:inline-block;overflow-x:hidden;text-overflow:ellipsis;width:90px}.mce-menubtn.mce-fixed-width.mce-btn-small span{width:70px}.mce-menubtn .mce-caret{*margin-top:6px}.mce-rtl .mce-menubtn button{direction:rtl;
text-align:right}.mce-listbox button{text-align:left;padding-right:20px;position:relative}.mce-listbox .mce-caret{position:absolute;margin-top:-2px;right:8px;top:50%}.mce-rtl .mce-listbox .mce-caret{right:auto;left:8px}.mce-rtl .mce-listbox button{padding-right:10px;padding-left:20px}.mce-menu-item{display:block;padding:6px 15px 6px 12px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap;cursor:pointer;line-height:normal;border-left:4px solid transparent;margin-bottom:1px}.mce-menu-item .mce-ico,.mce-menu-item .mce-text{color:#333}.mce-menu-item.mce-disabled .mce-text,.mce-menu-item.mce-disabled .mce-ico{color:#adadad}.mce-menu-item:hover .mce-text,.mce-menu-item.mce-selected .mce-text,.mce-menu-item:focus .mce-text{color:#fff}.mce-menu-item:hover .mce-ico,.mce-menu-item.mce-selected .mce-ico,.mce-menu-item:focus .mce-ico{color:#fff}.mce-menu-item.mce-disabled:hover{background:#ccc}.mce-menu-shortcut{display:inline-block;color:#adadad}.mce-menu-shortcut{dis
play:inline-block;*display:inline;*zoom:1;padding:0 15px 0 20px}.mce-menu-item:hover .mce-menu-shortcut,.mce-menu-item.mce-selected .mce-menu-shortcut,.mce-menu-item:focus .mce-menu-shortcut{color:#fff}.mce-menu-item .mce-caret{margin-top:4px;*margin-top:3px;margin-right:6px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid #333}.mce-menu-item.mce-selected .mce-caret,.mce-menu-item:focus .mce-caret,.mce-menu-item:hover .mce-caret{border-left-color:#fff}.mce-menu-align .mce-menu-shortcut{*margin-top:-2px}.mce-menu-align .mce-menu-shortcut,.mce-menu-align .mce-caret{position:absolute;right:0}.mce-menu-item.mce-active i{visibility:visible}.mce-menu-item-normal.mce-active{background-color:#c8def4}.mce-menu-item-preview.mce-active{border-left:5px solid #aaa}.mce-menu-item-normal.mce-active .mce-text{color:#333}.mce-menu-item-normal.mce-active:hover .mce-text,.mce-menu-item-normal.mce-active:hover .mce-ico{color:#fff}.mce-menu-item-normal.mce-activ
e:focus .mce-text,.mce-menu-item-normal.mce-active:focus .mce-ico{color:#fff}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{text-decoration:none;color:#fff;background-color:#0081c2;background-image:-moz-linear-gradient(top, #08c, #0077b3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#0077b3));background-image:-webkit-linear-gradient(top, #08c, #0077b3);background-image:-o-linear-gradient(top, #08c, #0077b3);background-image:linear-gradient(to bottom, #08c, #0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);zoom:1}div.mce-menu .mce-menu-item-sep,.mce-menu-item-sep:hover{border:0;padding:0;height:1px;margin:9px 1px;overflow:hidden;background:#cbcbcb;border-bottom:1px solid #fff;cursor:default;filter:none}.mce-menu.mce-rtl{direction:rtl}.mce-rtl .mce-menu-item{text-align:right;direction:rtl;padding:6px 12px 6px 15px}.mce-menu-align.mce-r
tl .mce-menu-shortcut,.mce-menu-align.mce-rtl .mce-caret{right:auto;left:0}.mce-rtl .mce-menu-item .mce-caret{margin-left:6px;margin-right:0;border-right:4px solid #333;border-left:0}.mce-rtl .mce-menu-item.mce-selected .mce-caret,.mce-rtl .mce-menu-item:focus .mce-caret,.mce-rtl .mce-menu-item:hover .mce-caret{border-left-color:transparent;border-right-color:#fff}.mce-menu{position:absolute;left:0;top:0;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;z-index:1000;padding:5px 0 5px 0;margin:2px 0 0;min-width:160px;background:#fff;border:1px solid #989898;border:1px solid rgba(0,0,0,0.2);z-index:1002;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);max-height:400px;overflow:auto;overflow-x:hidden}.mce-menu i{display:none}.mce-menu-has-icons i{display:inline-block;*display:inline}.mce-menu-su
b-tr-tl{margin:-6px 0 0 -1px}.mce-menu-sub-br-bl{margin:6px 0 0 -1px}.mce-menu-sub-tl-tr{margin:-6px 0 0 1px}.mce-menu-sub-bl-br{margin:6px 0 0 1px}.mce-container-body .mce-resizehandle{position:absolute;right:0;bottom:0;width:16px;height:16px;visibility:visible;cursor:s-resize;margin:0}.mce-container-body .mce-resizehandle-both{cursor:se-resize}i.mce-i-resize{color:#333}.mce-spacer{visibility:hidden}.mce-splitbtn .mce-open{border-left:1px solid transparent;border-right:1px solid transparent}.mce-splitbtn:hover .mce-open{border-left-color:#bdbdbd;border-right-color:#bdbdbd}.mce-splitbtn button{padding-right:4px}.mce-splitbtn .mce-open{padding-left:4px}.mce-splitbtn .mce-open.mce-active{-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-splitbtn.mce-btn-small .mce-open{padding:0 3px 0 3
px}.mce-rtl .mce-splitbtn{direction:rtl;text-align:right}.mce-rtl .mce-splitbtn button{padding-right:10px;padding-left:10px}.mce-rtl .mce-splitbtn .mce-open{padding-left:4px;padding-right:4px}.mce-stack-layout-item{display:block}.mce-tabs{display:block;border-bottom:1px solid #c5c5c5}.mce-tab{display:inline-block;*display:inline;*zoom:1;border:1px solid #c5c5c5;border-width:0 1px 0 0;background:#e3e3e3;padding:8px;text-shadow:0 1px 1px rgba(255,255,255,0.75);height:13px;cursor:pointer}.mce-tab:hover{background:#fdfdfd}.mce-tab.mce-active{background:#fdfdfd;border-bottom-color:transparent;margin-bottom:-1px;height:14px}.mce-rtl .mce-tabs{text-align:right;direction:rtl}.mce-rtl .mce-tab{border-width:0 0 0 1px}.mce-textbox{background:#fff;border:1px solid #c5c5c5;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);di
splay:inline-block;-webkit-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;height:28px;resize:none;padding:0 4px 0 4px;white-space:pre-wrap;*white-space:pre;color:#333}.mce-textbox:focus,.mce-textbox.mce-focus{border-color:rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65)}.mce-placeholder .mce-textbox{color:#aaa}.mce-textbox.mce-multiline{padding:4px}.mce-textbox.mce-disabled{color:#adadad}.mce-rtl .mce-textbox{text-align:right;direction:rtl}.mce-throbber{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;filter:alpha(opacity=60);zoom:1;background:#fff url('img/loader.gif') no-repeat center center}.mce-throbber-inline{position:static;height:50px}@font-face{font-family:'tinymce';src:url('f
onts/tinymce.eot');src:url('fonts/tinymce.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce.woff') format('woff'),url('fonts/tinymce.ttf') format('truetype'),url('fonts/tinymce.svg#tinymce') format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'tinymce-small';src:url('fonts/tinymce-small.eot');src:url('fonts/tinymce-small.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce-small.woff') format('woff'),url('fonts/tinymce-small.ttf') format('truetype'),url('fonts/tinymce-small.svg#tinymce') format('svg');font-weight:normal;font-style:normal}.mce-ico{font-family:'tinymce';font-style:normal;font-weight:normal;font-size:16px;line-height:16px;vertical-align:text-top;-webkit-font-smoothing:antialiased;display:inline-block;background:transparent center center;width:16px;height:16px;color:#333;-ie7-icon:' '}.mce-btn-small .mce-ico{font-family:'tinymce-small'}.mce-ico,i.mce-i-checkbox{zoom:expression(this.runtimeStyle['zoom'] = '1', this.innerHTML = this.
currentStyle['-ie7-icon'].substr(1, 1) + ' ')}.mce-i-save{-ie7-icon:"\e000"}.mce-i-newdocument{-ie7-icon:"\e001"}.mce-i-fullpage{-ie7-icon:"\e002"}.mce-i-alignleft{-ie7-icon:"\e003"}.mce-i-aligncenter{-ie7-icon:"\e004"}.mce-i-alignright{-ie7-icon:"\e005"}.mce-i-alignjustify{-ie7-icon:"\e006"}.mce-i-cut{-ie7-icon:"\e007"}.mce-i-paste{-ie7-icon:"\e008"}.mce-i-searchreplace{-ie7-icon:"\e009"}.mce-i-bullist{-ie7-icon:"\e00a"}.mce-i-numlist{-ie7-icon:"\e00b"}.mce-i-indent{-ie7-icon:"\e00c"}.mce-i-outdent{-ie7-icon:"\e00d"}.mce-i-blockquote{-ie7-icon:"\e00e"}.mce-i-undo{-ie7-icon:"\e00f"}.mce-i-redo{-ie7-icon:"\e010"}.mce-i-link{-ie7-icon:"\e011"}.mce-i-unlink{-ie7-icon:"\e012"}.mce-i-anchor{-ie7-icon:"\e013"}.mce-i-image{-ie7-icon:"\e014"}.mce-i-media{-ie7-icon:"\e015
"}.mce-i-help{-ie7-icon:"\e016"}.mce-i-code{-ie7-icon:"\e017"}.mce-i-insertdatetime{-ie7-icon:"\e018"}.mce-i-preview{-ie7-icon:"\e019"}.mce-i-forecolor{-ie7-icon:"\e01a"}.mce-i-backcolor{-ie7-icon:"\e01a"}.mce-i-table{-ie7-icon:"\e01b"}.mce-i-hr{-ie7-icon:"\e01c"}.mce-i-removeformat{-ie7-icon:"\e01d"}.mce-i-subscript{-ie7-icon:"\e01e"}.mce-i-superscript{-ie7-icon:"\e01f"}.mce-i-charmap{-ie7-icon:"\e020"}.mce-i-emoticons{-ie7-icon:"\e021"}.mce-i-print{-ie7-icon:"\e022"}.mce-i-fullscreen{-ie7-icon:"\e023"}.mce-i-spellchecker{-ie7-icon:"\e024"}.mce-i-nonbreaking{-ie7-icon:"\e025"}.mce-i-template{-ie7-icon:"\e026"}.mce-i-pagebreak{-ie7-icon:"\e027"}.mce-i-restoredraft{-ie7-icon:"\e028"}.mce-i-untitled{-ie7-icon:"\e029"}.mce-i-bold{-ie7-icon:"\e02a"}.mce-i-italic{-ie
7-icon:"\e02b"}.mce-i-underline{-ie7-icon:"\e02c"}.mce-i-strikethrough{-ie7-icon:"\e02d"}.mce-i-visualchars{-ie7-icon:"\e02e"}.mce-i-ltr{-ie7-icon:"\e02f"}.mce-i-rtl{-ie7-icon:"\e030"}.mce-i-copy{-ie7-icon:"\e031"}.mce-i-resize{-ie7-icon:"\e032"}.mce-i-browse{-ie7-icon:"\e034"}.mce-i-pastetext{-ie7-icon:"\e035"}.mce-i-checkbox,.mce-i-selected{-ie7-icon:"\e033"}.mce-i-selected{visibility:hidden}.mce-i-backcolor{background:#BBB}
</del><span class="cx">\ No newline at end of file
</span><ins>+.mce-container,.mce-container *,.mce-widget,.mce-widget *,.mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;-webkit-tap-highlight-color:transparent;line-height:normal;font-weight:normal;text-align:left;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-widget button{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.mce-container *[unselectable]{-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.mce-fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.mce-fade.mce-in{opacity:1}.mce-tinymce{visibility:inherit !important;position:relative}.mce-fullscreen{border:0;p
adding:0;margin:0;overflow:hidden;height:100%;z-index:100}div.mce-fullscreen{position:fixed;top:0;left:0;width:100%;height:auto}.mce-tinymce{display:block;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mce-wordcount{position:absolute;top:0;right:0;padding:8px}div.mce-edit-area{background:#FFF;filter:none}.mce-statusbar{position:relative}.mce-statusbar .mce-container-body{position:relative}.mce-fullscreen .mce-resizehandle{display:none}.mce-charmap{border-collapse:collapse}.mce-charmap td{cursor:default;border:1px solid #9e9e9e;width:20px;height:20px;line-height:20px;text-align:center;vertical-align:middle;padding:2px}.mce-charmap td div{text-align:center}.mce-charmap td:hover{background:#d9d9d9}.mce-grid td.mce-grid-cell div{border:1px solid #d6d6d6;width:15px;height:15px;margin:0px;cursor:pointer}.mce-grid td.mce-grid-cell div:focus{border-color:#a1a1a1}.mce-grid td.mce-grid-cell div[disabled]{cursor:not-allowed}.mce-grid{border-spacing:2px;border-collapse:sepa
rate}.mce-grid a{display:block;border:1px solid transparent}.mce-grid a:hover,.mce-grid a:focus{border-color:#a1a1a1}.mce-grid-border{margin:0 4px 0 4px}.mce-grid-border a{border-color:#d6d6d6;width:13px;height:13px}.mce-grid-border a:hover,.mce-grid-border a.mce-active{border-color:#a1a1a1;background:#c8def4}.mce-text-center{text-align:center}div.mce-tinymce-inline{width:100%;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-colorbtn-trans div{text-align:center;vertical-align:middle;font-weight:bold;font-size:20px;line-height:16px;color:#707070}.mce-toolbar-grp{padding-bottom:2px}.mce-toolbar-grp .mce-flow-layout-item{margin-bottom:0}.mce-rtl .mce-wordcount{left:0;right:auto}.mce-container,.mce-container-body{display:block}.mce-autoscroll{overflow:hidden}.mce-scrollbar{position:absolute;width:7px;height:100%;top:2px;right:2px;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-scrollbar-h{top:auto;right:auto;left:2px;bottom:2px;width:100%;height:7px}.mce-scrollbar-thumb
{position:absolute;background-color:#000;border:1px solid #888;border-color:rgba(85,85,85,0.6);width:5px;height:100%;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.mce-scrollbar-h .mce-scrollbar-thumb{width:100%;height:5px}.mce-scrollbar:hover,.mce-scrollbar.mce-active{background-color:#AAA;opacity:.6;filter:alpha(opacity=60);zoom:1;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.mce-scroll{position:relative}.mce-panel{border:0 solid #9e9e9e;background-color:#f0f0f0;background-image:-moz-linear-gradient(top, #fdfdfd, #ddd);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fdfdfd), to(#ddd));background-image:-webkit-linear-gradient(top, #fdfdfd, #ddd);background-image:-o-linear-gradient(top, #fdfdfd, #ddd);background-image:linear-gradient(to bottom, #fdfdfd, #ddd);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffdfdfd', endColorstr='#ffdddddd', GradientType=0);zoom:1}.mce-floatpanel{pos
ition:absolute;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2)}.mce-floatpanel.mce-fixed{position:fixed}.mce-floatpanel .mce-arrow,.mce-floatpanel .mce-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.mce-floatpanel .mce-arrow{border-width:11px}.mce-floatpanel .mce-arrow:after{border-width:10px;content:""}.mce-floatpanel.mce-popover{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);top:0;left:0;background:#fff;border:1px solid #9e9e9e;border:1px solid rgba(0,0,0,0.25)}.mce-floatpanel.mce-popover.mce-bottom{margin-top:10px;*margin-top:0}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow{left
:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#9e9e9e;border-bottom-color:rgba(0,0,0,0.25);top:-11px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.mce-floatpanel.mce-popover.mce-bottom.mce-start{margin-left:-22px}.mce-floatpanel.mce-popover.mce-bottom.mce-start>.mce-arrow{left:20px}.mce-floatpanel.mce-popover.mce-bottom.mce-end{margin-left:22px}.mce-floatpanel.mce-popover.mce-bottom.mce-end>.mce-arrow{right:10px;left:auto}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;background:#fff;height:100%}div.mce-fullscreen{position:fixed;top:0;left:0}#mce-modal-block{opacity:0;filter:alpha(opacity=0);zoom:1;position:fixed;left:0;top:0;width:100%;height:100%;background:#000}#mce-modal-block.mce-in{opacity:.3;filter:alpha(opacity=30);zoom:1}.mce-window-move{cursor:move}.mce-window{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px r
gba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;background:#fff;position:fixed;top:0;left:0;opacity:0;-webkit-transition:opacity 150ms ease-in;transition:opacity 150ms ease-in}.mce-window.mce-in{opacity:1}.mce-window-head{padding:9px 15px;border-bottom:1px solid #c5c5c5;position:relative}.mce-window-head .mce-close{position:absolute;right:15px;top:9px;font-size:20px;font-weight:bold;line-height:20px;color:#858585;cursor:pointer;height:20px;overflow:hidden}.mce-close:hover{color:#adadad}.mce-window-head .mce-title{line-height:20px;font-size:20px;font-weight:bold;text-rendering:optimizelegibility;padding-right:10px}.mce-window .mce-container-body{display:block}.mce-foot{display:block;background-color:#fff;border-top:1px solid #c5c5c5;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.mce-window-head .m
ce-dragh{position:absolute;top:0;left:0;cursor:move;width:90%;height:100%}.mce-window iframe{width:100%;height:100%}.mce-window.mce-fullscreen,.mce-window.mce-fullscreen .mce-foot{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mce-rtl .mce-window-head .mce-close{position:absolute;right:auto;left:15px}.mce-rtl .mce-window-head .mce-dragh{left:auto;right:0}.mce-rtl .mce-window-head .mce-title{direction:rtl;text-align:right}.mce-abs-layout{position:relative}body .mce-abs-layout-item,.mce-abs-end{position:absolute}.mce-abs-end{width:1px;height:1px}.mce-container-body.mce-abs-layout{overflow:hidden}.mce-tooltip{position:absolute;padding:5px;opacity:.8;filter:alpha(opacity=80);zoom:1}.mce-tooltip-inner{font-size:11px;background-color:#000;color:#fff;max-width:200px;padding:5px 8px 4px 8px;text-align:center;white-space:normal}.mce-tooltip-inner{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-tooltip-inner{-webkit-box-shadow:0 0 5px #000000;-moz-box-sh
adow:0 0 5px #000000;box-shadow:0 0 5px #000000}.mce-tooltip-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.mce-tooltip-arrow-n{border-bottom-color:#000}.mce-tooltip-arrow-s{border-top-color:#000}.mce-tooltip-arrow-e{border-left-color:#000}.mce-tooltip-arrow-w{border-right-color:#000}.mce-tooltip-nw,.mce-tooltip-sw{margin-left:-14px}.mce-tooltip-n .mce-tooltip-arrow{top:0px;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-nw .mce-tooltip-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-ne .mce-tooltip-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-s .mce-tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-ri
ght-color:transparent}.mce-tooltip-sw .mce-tooltip-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-se .mce-tooltip-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-e .mce-tooltip-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.mce-tooltip-w .mce-tooltip-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.mce-btn{border:1px solid #b1b1b1;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25) rgba(0,0,0,0.25);position:relative;text-shadow:0 1px 1px rgba(255,255,255,0.75);display:inline-block;*display:inline;*zoom:1;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 rg
ba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);background-color:#f0f0f0;background-image:-moz-linear-gradient(top, #fff, #d9d9d9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#d9d9d9));background-image:-webkit-linear-gradient(top, #fff, #d9d9d9);background-image:-o-linear-gradient(top, #fff, #d9d9d9);background-image:linear-gradient(to bottom, #fff, #d9d9d9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffd9d9d9', GradientType=0);zoom:1}.mce-btn:hover,.mce-btn:focus{color:#333;background-color:#e3e3e3;background-image:-moz-linear-gradient(top, #f2f2f2, #ccc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#ccc));background-image:-webkit-linear-gradient(top, #f2f2f2, #ccc);background-image:-o-
linear-gradient(top, #f2f2f2, #ccc);background-image:linear-gradient(to bottom, #f2f2f2, #ccc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffcccccc', GradientType=0);zoom:1}.mce-btn.mce-disabled button,.mce-btn.mce-disabled:hover button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-btn.mce-active,.mce-btn.mce-active:hover{background-color:#d6d6d6;background-image:-moz-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#c0c0c0));background-image:-webkit-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-o-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:linear-gradient(to bottom, #e6e6e6, #c0c0c0);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffc0c0c0', GradientType=0);zoom:1;-webkit-box-sha
dow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-btn:active{background-color:#d6d6d6;background-image:-moz-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#c0c0c0));background-image:-webkit-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-o-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:linear-gradient(to bottom, #e6e6e6, #c0c0c0);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffc0c0c0', GradientType=0);zoom:1;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.
05)}.mce-btn button{padding:4px 10px;font-size:14px;line-height:20px;*line-height:16px;cursor:pointer;color:#333;text-align:center;overflow:visible;-webkit-appearance:none}.mce-btn button::-moz-focus-inner{border:0;padding:0}.mce-btn i{text-shadow:1px 1px #fff}.mce-primary{min-width:50px;color:#fff;border:1px solid #b1b1b1;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25) rgba(0,0,0,0.25);background-color:#006dcc;background-image:-moz-linear-gradient(top, #08c, #04c);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#04c));background-image:-webkit-linear-gradient(top, #08c, #04c);background-image:-o-linear-gradient(top, #08c, #04c);background-image:linear-gradient(to bottom, #08c, #04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);zoom:1}.mce-primary:hover,.mce-primary:focus{background-color:#005fb3;background-image:-moz-linear-gradient(top, #0077b3, #0
03cb3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0077b3), to(#003cb3));background-image:-webkit-linear-gradient(top, #0077b3, #003cb3);background-image:-o-linear-gradient(top, #0077b3, #003cb3);background-image:linear-gradient(to bottom, #0077b3, #003cb3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0077b3', endColorstr='#ff003cb3', GradientType=0);zoom:1}.mce-primary.mce-disabled button,.mce-primary.mce-disabled:hover button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-primary.mce-active,.mce-primary.mce-active:hover,.mce-primary:not(.mce-disabled):active{background-color:#005299;background-image:-moz-linear-gradient(top, #069, #039);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#069), to(#039));background-image:-webkit-linear-gradient(top, #069, #039);background-image:-o-linear-gradient(top, #069, #039);background-image:l
inear-gradient(to bottom, #069, #039);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff006699', endColorstr='#ff003399', GradientType=0);zoom:1;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-primary button,.mce-primary button i{color:#fff;text-shadow:1px 1px #333}.mce-btn-large button{padding:9px 14px;font-size:16px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.mce-btn-large i{margin-top:2px}.mce-btn-small button{padding:1px 5px;font-size:12px;*padding-bottom:2px}.mce-btn-small i{line-height:20px;vertical-align:top;*line-height:18px}.mce-btn .mce-caret{margin-top:8px;margin-left:0}.mce-btn-small .mce-caret{margin-top:8px;margin-left:0}.mce-caret{display:inline-block;*display:inline;*zoom:1;width:
0;height:0;vertical-align:top;border-top:4px solid #333;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.mce-disabled .mce-caret{border-top-color:#aaa}.mce-caret.mce-up{border-bottom:4px solid #333;border-top:0}.mce-btn-flat{border:0;background:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:none}.mce-btn-flat:hover,.mce-btn-flat.mce-active,.mce-btn-flat:focus,.mce-btn-flat:active{border:0;background:#e6e6e6;filter:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-rtl .mce-btn button{direction:rtl}.mce-btn-group .mce-btn{border-width:1px 0 1px 0;margin:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mce-btn-group .mce-first{border-left:1px solid #b1b1b1;border-left:1px solid rgba(0,0,0,0.25);-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.mce-btn-group .mce-last{border-r
ight:1px solid #b1b1b1;border-right:1px solid rgba(0,0,0,0.1);-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.mce-btn-group .mce-first.mce-last{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-btn-group .mce-btn.mce-flow-layout-item{margin:0}.mce-checkbox{cursor:pointer}i.mce-i-checkbox{margin:0 3px 0 0;border:1px solid #c5c5c5;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);background-color:#f0f0f0;background-image:-moz-linear-gradient(top, #fff, #d9d9d9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#d9d9d9));background-image:-webkit-linear-gradient(top, #fff, #d9d9d9);background-image:-o-linear-gradient(top, #fff, #d9d9d
9);background-image:linear-gradient(to bottom, #fff, #d9d9d9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffd9d9d9', GradientType=0);zoom:1;text-indent:-10em;*font-size:0;*line-height:0;*text-indent:0;overflow:hidden}.mce-checked i.mce-i-checkbox{color:#333;font-size:16px;line-height:16px;text-indent:0}.mce-checkbox:focus i.mce-i-checkbox,.mce-checkbox.mce-focus i.mce-i-checkbox{border:1px solid rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65)}.mce-checkbox.mce-disabled .mce-label,.mce-checkbox.mce-disabled i.mce-i-checkbox{color:#acacac}.mce-rtl .mce-checkbox{direction:rtl;text-align:right}.mce-rtl i.mce-i-checkbox{margin:0 0 0 3px}.mce-combobox{display:inline-block;*display:inline;
*zoom:1;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);*height:32px}.mce-combobox input{border:1px solid #c5c5c5;border-right-color:#c5c5c5;height:28px}.mce-combobox.mce-disabled input{color:#adadad}.mce-combobox.mce-has-open input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.mce-combobox .mce-btn{border-left:0;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.mce-combobox button{padding-right:8px;padding-left:8px}.mce-combobox.mce-disabled .mce-btn button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-colorbox i{border:1px solid #c5c5c5;width:14px;height:14px}.mce-colorbutton .mce-ico{position:relative}.mce-colorbutton-grid{margin:4px}.mce-color
button button{padding-right:4px}.mce-colorbutton .mce-preview{padding-right:3px;display:block;position:absolute;left:50%;top:50%;margin-left:-14px;margin-top:7px;background:gray;width:13px;height:2px;overflow:hidden}.mce-colorbutton.mce-btn-small .mce-preview{margin-left:-16px;padding-right:0;width:16px}.mce-colorbutton .mce-open{padding-left:4px;border-left:1px solid transparent;border-right:1px solid transparent}.mce-colorbutton:hover .mce-open{border-left-color:#bdbdbd;border-right-color:#bdbdbd}.mce-colorbutton.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-colorbutton{direction:rtl}.mce-rtl .mce-colorbutton .mce-preview{margin-left:0;padding-right:0;padding-left:4px;margin-right:-14px}.mce-rtl .mce-colorbutton.mce-btn-small .mce-preview{margin-left:0;padding-right:0;margin-right:-17px;padding-left:0}.mce-rtl .mce-colorbutton button{padding-right:10px;padding-left:10px}.mce-rtl .mce-colorbutton .mce-open{padding-left:4px;padding-right:4px}.mce-colorpicker{position:rel
ative;width:250px;height:220px}.mce-colorpicker-sv{position:absolute;top:0;left:0;width:90%;height:100%;border:1px solid #c5c5c5;cursor:crosshair;overflow:hidden}.mce-colorpicker-h-chunk{width:100%}.mce-colorpicker-overlay1,.mce-colorpicker-overlay2{width:100%;height:100%;position:absolute;top:0;left:0}.mce-colorpicker-overlay1{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr='#ffffff', endColorstr='#00ffffff');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#ffffff', endColorstr='#00ffffff')";background:linear-gradient(to right, #fff, rgba(255,255,255,0))}.mce-colorpicker-overlay2{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#00000000', endColorstr='#000000');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#00000000', endColorstr='#000000')";background:linear-gradient(to bottom, rgba(0,0,0,0), #000)}.mce-colorpicker-selecto
r1{background:none;position:absolute;width:12px;height:12px;margin:-8px 0 0 -8px;border:1px solid black;border-radius:50%}.mce-colorpicker-selector2{position:absolute;width:10px;height:10px;border:1px solid white;border-radius:50%}.mce-colorpicker-h{position:absolute;top:0;right:0;width:6.5%;height:100%;border:1px solid #c5c5c5;cursor:crosshair}.mce-colorpicker-h-marker{margin-top:-4px;position:absolute;top:0;left:-1px;width:100%;border:1px solid #333;background:#fff;height:4px;z-index:100}.mce-path{display:inline-block;*display:inline;*zoom:1;padding:8px;white-space:normal}.mce-path .mce-txt{display:inline-block;padding-right:3px}.mce-path .mce-path-body{display:inline-block}.mce-path-item{display:inline-block;*display:inline;*zoom:1;cursor:pointer;color:#333}.mce-path-item:hover{text-decoration:underline}.mce-path-item:focus{background:#666;color:#fff}.mce-path .mce-divider{display:inline}.mce-disabled .mce-path-item{color:#aaa}.mce-rtl .mce-path{direction:rtl}.mce-fieldset{border
:0 solid #9E9E9E;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-fieldset>.mce-container-body{margin-top:-15px}.mce-fieldset-title{margin-left:5px;padding:0 5px 0 5px}.mce-fit-layout{display:inline-block;*display:inline;*zoom:1}.mce-fit-layout-item{position:absolute}.mce-flow-layout-item{display:inline-block;*display:inline;*zoom:1}.mce-flow-layout-item{margin:2px 0 2px 2px}.mce-flow-layout-item.mce-last{margin-right:2px}.mce-flow-layout{white-space:normal}.mce-tinymce-inline .mce-flow-layout{white-space:nowrap}.mce-rtl .mce-flow-layout{text-align:right;direction:rtl}.mce-rtl .mce-flow-layout-item{margin:2px 2px 2px 0}.mce-rtl .mce-flow-layout-item.mce-last{margin-left:2px}.mce-iframe{border:0 solid #9e9e9e;width:100%;height:100%}.mce-label{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden}.mce-label.mce-autoscroll{overflow:auto}.mce-label.mce-disabled{color:#aaa}.mce-label.mce-multiline{white-space:p
re-wrap}.mce-label.mce-error{color:#a00}.mce-rtl .mce-label{text-align:right;direction:rtl}.mce-menubar .mce-menubtn{border-color:transparent;background:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:none}.mce-menubar{border:1px solid #c4c4c4}.mce-menubar .mce-menubtn button span{color:#333}.mce-menubar .mce-caret{border-top-color:#333}.mce-menubar .mce-menubtn:hover,.mce-menubar .mce-menubtn.mce-active,.mce-menubar .mce-menubtn:focus{border-color:transparent;background:#e6e6e6;filter:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-menubtn span{color:#333;margin-right:2px;line-height:20px;*line-height:16px}.mce-menubtn.mce-btn-small span{font-size:12px}.mce-menubtn.mce-fixed-width span{display:inline-block;overflow-x:hidden;text-overflow:ellipsis;width:90px}.mce-menubtn.mce-fixed-width.mce-btn-small span{width:70px}.mce-menubtn .mce-caret{*margin-top:6px}.mce-rtl .mce
-menubtn button{direction:rtl;text-align:right}.mce-listbox button{text-align:left;padding-right:20px;position:relative}.mce-listbox .mce-caret{position:absolute;margin-top:-2px;right:8px;top:50%}.mce-rtl .mce-listbox .mce-caret{right:auto;left:8px}.mce-rtl .mce-listbox button{padding-right:10px;padding-left:20px}.mce-menu-item{display:block;padding:6px 15px 6px 12px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap;cursor:pointer;line-height:normal;border-left:4px solid transparent;margin-bottom:1px}.mce-menu-item .mce-ico,.mce-menu-item .mce-text{color:#333}.mce-menu-item.mce-disabled .mce-text,.mce-menu-item.mce-disabled .mce-ico{color:#adadad}.mce-menu-item:hover .mce-text,.mce-menu-item.mce-selected .mce-text,.mce-menu-item:focus .mce-text{color:#fff}.mce-menu-item:hover .mce-ico,.mce-menu-item.mce-selected .mce-ico,.mce-menu-item:focus .mce-ico{color:#fff}.mce-menu-item.mce-disabled:hover{background:#ccc}.mce-menu-shortcut{display:inline-block;color:
#adadad}.mce-menu-shortcut{display:inline-block;*display:inline;*zoom:1;padding:0 15px 0 20px}.mce-menu-item:hover .mce-menu-shortcut,.mce-menu-item.mce-selected .mce-menu-shortcut,.mce-menu-item:focus .mce-menu-shortcut{color:#fff}.mce-menu-item .mce-caret{margin-top:4px;*margin-top:3px;margin-right:6px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid #333}.mce-menu-item.mce-selected .mce-caret,.mce-menu-item:focus .mce-caret,.mce-menu-item:hover .mce-caret{border-left-color:#fff}.mce-menu-align .mce-menu-shortcut{*margin-top:-2px}.mce-menu-align .mce-menu-shortcut,.mce-menu-align .mce-caret{position:absolute;right:0}.mce-menu-item.mce-active i{visibility:visible}.mce-menu-item-normal.mce-active{background-color:#c8def4}.mce-menu-item-preview.mce-active{border-left:5px solid #aaa}.mce-menu-item-normal.mce-active .mce-text{color:#333}.mce-menu-item-normal.mce-active:hover .mce-text,.mce-menu-item-normal.mce-active:hover .mce-ico{color:#fff}.
mce-menu-item-normal.mce-active:focus .mce-text,.mce-menu-item-normal.mce-active:focus .mce-ico{color:#fff}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{text-decoration:none;color:#fff;background-color:#0081c2;background-image:-moz-linear-gradient(top, #08c, #0077b3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#0077b3));background-image:-webkit-linear-gradient(top, #08c, #0077b3);background-image:-o-linear-gradient(top, #08c, #0077b3);background-image:linear-gradient(to bottom, #08c, #0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);zoom:1}div.mce-menu .mce-menu-item-sep,.mce-menu-item-sep:hover{border:0;padding:0;height:1px;margin:9px 1px;overflow:hidden;background:#cbcbcb;border-bottom:1px solid #fff;cursor:default;filter:none}.mce-menu.mce-rtl{direction:rtl}.mce-rtl .mce-menu-item{text-align:right;direction:rtl;padding:6px 12px
6px 15px}.mce-menu-align.mce-rtl .mce-menu-shortcut,.mce-menu-align.mce-rtl .mce-caret{right:auto;left:0}.mce-rtl .mce-menu-item .mce-caret{margin-left:6px;margin-right:0;border-right:4px solid #333;border-left:0}.mce-rtl .mce-menu-item.mce-selected .mce-caret,.mce-rtl .mce-menu-item:focus .mce-caret,.mce-rtl .mce-menu-item:hover .mce-caret{border-left-color:transparent;border-right-color:#fff}.mce-menu{position:absolute;left:0;top:0;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;z-index:1000;padding:5px 0 5px 0;margin:2px 0 0;min-width:160px;background:#fff;border:1px solid #989898;border:1px solid rgba(0,0,0,0.2);z-index:1002;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);max-height:400px;overflow:auto;overflow-x:hidden}.mce-menu i{display:none}.mce-menu-has-icons i{display:inline-bloc
k;*display:inline}.mce-menu-sub-tr-tl{margin:-6px 0 0 -1px}.mce-menu-sub-br-bl{margin:6px 0 0 -1px}.mce-menu-sub-tl-tr{margin:-6px 0 0 1px}.mce-menu-sub-bl-br{margin:6px 0 0 1px}.mce-container-body .mce-resizehandle{position:absolute;right:0;bottom:0;width:16px;height:16px;visibility:visible;cursor:s-resize;margin:0}.mce-container-body .mce-resizehandle-both{cursor:se-resize}i.mce-i-resize{color:#333}.mce-spacer{visibility:hidden}.mce-splitbtn .mce-open{border-left:1px solid transparent;border-right:1px solid transparent}.mce-splitbtn:hover .mce-open{border-left-color:#bdbdbd;border-right-color:#bdbdbd}.mce-splitbtn button{padding-right:4px}.mce-splitbtn .mce-open{padding-left:4px}.mce-splitbtn .mce-open.mce-active{-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-splitbtn.mce-btn-sma
ll .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-splitbtn{direction:rtl;text-align:right}.mce-rtl .mce-splitbtn button{padding-right:10px;padding-left:10px}.mce-rtl .mce-splitbtn .mce-open{padding-left:4px;padding-right:4px}.mce-stack-layout-item{display:block}.mce-tabs{display:block;border-bottom:1px solid #c5c5c5}.mce-tab{display:inline-block;*display:inline;*zoom:1;border:1px solid #c5c5c5;border-width:0 1px 0 0;background:#e3e3e3;padding:8px;text-shadow:0 1px 1px rgba(255,255,255,0.75);height:13px;cursor:pointer}.mce-tab:hover{background:#fdfdfd}.mce-tab.mce-active{background:#fdfdfd;border-bottom-color:transparent;margin-bottom:-1px;height:14px}.mce-rtl .mce-tabs{text-align:right;direction:rtl}.mce-rtl .mce-tab{border-width:0 0 0 1px}.mce-textbox{background:#fff;border:1px solid #c5c5c5;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1
px 1px rgba(0, 0, 0, 0.075);display:inline-block;-webkit-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;height:28px;resize:none;padding:0 4px 0 4px;white-space:pre-wrap;*white-space:pre;color:#333}.mce-textbox:focus,.mce-textbox.mce-focus{border-color:rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65)}.mce-placeholder .mce-textbox{color:#aaa}.mce-textbox.mce-multiline{padding:4px}.mce-textbox.mce-disabled{color:#adadad}.mce-rtl .mce-textbox{text-align:right;direction:rtl}.mce-throbber{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;filter:alpha(opacity=60);zoom:1;background:#fff url('img/loader.gif') no-repeat center center}.mce-throbber-inline{position:static;height:50px}@font-face{fo
nt-family:'tinymce';src:url('fonts/tinymce.eot');src:url('fonts/tinymce.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce.woff') format('woff'),url('fonts/tinymce.ttf') format('truetype'),url('fonts/tinymce.svg#tinymce') format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'tinymce-small';src:url('fonts/tinymce-small.eot');src:url('fonts/tinymce-small.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce-small.woff') format('woff'),url('fonts/tinymce-small.ttf') format('truetype'),url('fonts/tinymce-small.svg#tinymce') format('svg');font-weight:normal;font-style:normal}.mce-ico{font-family:'tinymce';font-style:normal;font-weight:normal;font-size:16px;line-height:16px;vertical-align:text-top;-webkit-font-smoothing:antialiased;display:inline-block;background:transparent center center;width:16px;height:16px;color:#333;-ie7-icon:' '}.mce-btn-small .mce-ico{font-family:'tinymce-small'}.mce-ico,i.mce-i-checkbox{zoom:expression(this.runtimeStyle['zoom']
= '1', this.innerHTML = this.currentStyle['-ie7-icon'].substr(1, 1) + ' ')}.mce-i-save{-ie7-icon:"\e000"}.mce-i-newdocument{-ie7-icon:"\e001"}.mce-i-fullpage{-ie7-icon:"\e002"}.mce-i-alignleft{-ie7-icon:"\e003"}.mce-i-aligncenter{-ie7-icon:"\e004"}.mce-i-alignright{-ie7-icon:"\e005"}.mce-i-alignjustify{-ie7-icon:"\e006"}.mce-i-cut{-ie7-icon:"\e007"}.mce-i-paste{-ie7-icon:"\e008"}.mce-i-searchreplace{-ie7-icon:"\e009"}.mce-i-bullist{-ie7-icon:"\e00a"}.mce-i-numlist{-ie7-icon:"\e00b"}.mce-i-indent{-ie7-icon:"\e00c"}.mce-i-outdent{-ie7-icon:"\e00d"}.mce-i-blockquote{-ie7-icon:"\e00e"}.mce-i-undo{-ie7-icon:"\e00f"}.mce-i-redo{-ie7-icon:"\e010"}.mce-i-link{-ie7-icon:"\e011"}.mce-i-unlink{-ie7-icon:"\e012"}.mce-i-anchor{-ie7-icon:"\e013"}.mce-i-image{-ie7-icon:"\e014"}.mce
-i-media{-ie7-icon:"\e015"}.mce-i-help{-ie7-icon:"\e016"}.mce-i-code{-ie7-icon:"\e017"}.mce-i-insertdatetime{-ie7-icon:"\e018"}.mce-i-preview{-ie7-icon:"\e019"}.mce-i-forecolor{-ie7-icon:"\e01a"}.mce-i-backcolor{-ie7-icon:"\e01a"}.mce-i-table{-ie7-icon:"\e01b"}.mce-i-hr{-ie7-icon:"\e01c"}.mce-i-removeformat{-ie7-icon:"\e01d"}.mce-i-subscript{-ie7-icon:"\e01e"}.mce-i-superscript{-ie7-icon:"\e01f"}.mce-i-charmap{-ie7-icon:"\e020"}.mce-i-emoticons{-ie7-icon:"\e021"}.mce-i-print{-ie7-icon:"\e022"}.mce-i-fullscreen{-ie7-icon:"\e023"}.mce-i-spellchecker{-ie7-icon:"\e024"}.mce-i-nonbreaking{-ie7-icon:"\e025"}.mce-i-template{-ie7-icon:"\e026"}.mce-i-pagebreak{-ie7-icon:"\e027"}.mce-i-restoredraft{-ie7-icon:"\e028"}.mce-i-untitled{-ie7-icon:"\e029"}.mce-i-bold{-ie7-icon:"
;\e02a"}.mce-i-italic{-ie7-icon:"\e02b"}.mce-i-underline{-ie7-icon:"\e02c"}.mce-i-strikethrough{-ie7-icon:"\e02d"}.mce-i-visualchars{-ie7-icon:"\e02e"}.mce-i-ltr{-ie7-icon:"\e02f"}.mce-i-rtl{-ie7-icon:"\e030"}.mce-i-copy{-ie7-icon:"\e031"}.mce-i-resize{-ie7-icon:"\e032"}.mce-i-browse{-ie7-icon:"\e034"}.mce-i-pastetext{-ie7-icon:"\e035"}.mce-i-checkbox,.mce-i-selected{-ie7-icon:"\e033"}.mce-i-selected{visibility:hidden}.mce-i-backcolor{background:#BBB}
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunksrcwpincludesjstinymceskinslightgrayskinmincss"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/js/tinymce/skins/lightgray/skin.min.css (29202 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/js/tinymce/skins/lightgray/skin.min.css 2014-07-17 00:49:11 UTC (rev 29202)
+++ trunk/src/wp-includes/js/tinymce/skins/lightgray/skin.min.css 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -1 +1 @@
</span><del>-.mce-container,.mce-container *,.mce-widget,.mce-widget *,.mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;-webkit-tap-highlight-color:transparent;line-height:normal;font-weight:normal;text-align:left;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr}.mce-widget button{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.mce-container *[unselectable]{-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.mce-fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.mce-fade.mce-in{opacity:1}.mce-tinymce{visibility:inherit !important;position:relative}.mce-fullscreen{border:0;padding:0;margin
:0;overflow:hidden;height:100%;z-index:100}div.mce-fullscreen{position:fixed;top:0;left:0;width:100%;height:auto}.mce-tinymce{display:block;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mce-wordcount{position:absolute;top:0;right:0;padding:8px}div.mce-edit-area{background:#FFF;filter:none}.mce-statusbar{position:relative}.mce-statusbar .mce-container-body{position:relative}.mce-fullscreen .mce-resizehandle{display:none}.mce-charmap{border-collapse:collapse}.mce-charmap td{cursor:default;border:1px solid #9e9e9e;width:20px;height:20px;line-height:20px;text-align:center;vertical-align:middle;padding:2px}.mce-charmap td div{text-align:center}.mce-charmap td:hover{background:#d9d9d9}.mce-grid td div{border:1px solid #d6d6d6;width:12px;height:12px;margin:2px;cursor:pointer}.mce-grid td div:focus{border-color:#a1a1a1}.mce-grid td div[disabled]{cursor:not-allowed}.mce-grid{border-spacing:2px;border-collapse:separate}.mce-grid a{display:block;border:1px solid transpare
nt}.mce-grid a:hover,.mce-grid a:focus{border-color:#a1a1a1}.mce-grid-border{margin:0 4px 0 4px}.mce-grid-border a{border-color:#d6d6d6;width:13px;height:13px}.mce-grid-border a:hover,.mce-grid-border a.mce-active{border-color:#a1a1a1;background:#c8def4}.mce-text-center{text-align:center}div.mce-tinymce-inline{width:100%;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}input.mce-textcolor-hexpicker{border:1px solid #d6d6d6;margin:2px;height:12px;font-size:11px}.mce-toolbar-grp{padding-bottom:2px}.mce-toolbar-grp .mce-flow-layout-item{margin-bottom:0}.mce-rtl .mce-wordcount{left:0;right:auto}.mce-container,.mce-container-body{display:block}.mce-autoscroll{overflow:hidden}.mce-scrollbar{position:absolute;width:7px;height:100%;top:2px;right:2px;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-scrollbar-h{top:auto;right:auto;left:2px;bottom:2px;width:100%;height:7px}.mce-scrollbar-thumb{position:absolute;background-color:#000;border:1px solid #888;border-color:rgba(85,85,85,0
.6);width:5px;height:100%;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.mce-scrollbar-h .mce-scrollbar-thumb{width:100%;height:5px}.mce-scrollbar:hover,.mce-scrollbar.mce-active{background-color:#AAA;opacity:.6;filter:alpha(opacity=60);zoom:1;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.mce-scroll{position:relative}.mce-panel{border:0 solid #9e9e9e;background-color:#f0f0f0;background-image:-moz-linear-gradient(top, #fdfdfd, #ddd);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fdfdfd), to(#ddd));background-image:-webkit-linear-gradient(top, #fdfdfd, #ddd);background-image:-o-linear-gradient(top, #fdfdfd, #ddd);background-image:linear-gradient(to bottom, #fdfdfd, #ddd);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffdfdfd', endColorstr='#ffdddddd', GradientType=0);zoom:1}.mce-floatpanel{position:absolute;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px
rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2)}.mce-floatpanel.mce-fixed{position:fixed}.mce-floatpanel .mce-arrow,.mce-floatpanel .mce-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.mce-floatpanel .mce-arrow{border-width:11px}.mce-floatpanel .mce-arrow:after{border-width:10px;content:""}.mce-floatpanel.mce-popover{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);top:0;left:0;background:#fff;border:1px solid #9e9e9e;border:1px solid rgba(0,0,0,0.25)}.mce-floatpanel.mce-popover.mce-bottom{margin-top:10px;*margin-top:0}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#9e9e9e;border-bottom-color:r
gba(0,0,0,0.25);top:-11px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.mce-floatpanel.mce-popover.mce-bottom.mce-start{margin-left:-22px}.mce-floatpanel.mce-popover.mce-bottom.mce-start>.mce-arrow{left:20px}.mce-floatpanel.mce-popover.mce-bottom.mce-end{margin-left:22px}.mce-floatpanel.mce-popover.mce-bottom.mce-end>.mce-arrow{right:10px;left:auto}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;background:#fff;height:100%}div.mce-fullscreen{position:fixed;top:0;left:0}#mce-modal-block{opacity:0;filter:alpha(opacity=0);zoom:1;position:fixed;left:0;top:0;width:100%;height:100%;background:#000}#mce-modal-block.mce-in{opacity:.3;filter:alpha(opacity=30);zoom:1}.mce-window-move{cursor:move}.mce-window{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0,
0, 0, 0.3);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;background:#fff;position:fixed;top:0;left:0;opacity:0;-webkit-transition:opacity 150ms ease-in;transition:opacity 150ms ease-in}.mce-window.mce-in{opacity:1}.mce-window-head{padding:9px 15px;border-bottom:1px solid #c5c5c5;position:relative}.mce-window-head .mce-close{position:absolute;right:15px;top:9px;font-size:20px;font-weight:bold;line-height:20px;color:#858585;cursor:pointer;height:20px;overflow:hidden}.mce-close:hover{color:#adadad}.mce-window-head .mce-title{line-height:20px;font-size:20px;font-weight:bold;text-rendering:optimizelegibility;padding-right:10px}.mce-window .mce-container-body{display:block}.mce-foot{display:block;background-color:#fff;border-top:1px solid #c5c5c5;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.mce-window-head .mce-dragh{position:absolute;top:0;left:0;cursor:move;width:90%;height:100%}.mce-window ifram
e{width:100%;height:100%}.mce-window.mce-fullscreen,.mce-window.mce-fullscreen .mce-foot{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mce-rtl .mce-window-head .mce-close{position:absolute;right:auto;left:15px}.mce-rtl .mce-window-head .mce-dragh{left:auto;right:0}.mce-rtl .mce-window-head .mce-title{direction:rtl;text-align:right}.mce-abs-layout{position:relative}body .mce-abs-layout-item,.mce-abs-end{position:absolute}.mce-abs-end{width:1px;height:1px}.mce-container-body.mce-abs-layout{overflow:hidden}.mce-tooltip{position:absolute;padding:5px;opacity:.8;filter:alpha(opacity=80);zoom:1}.mce-tooltip-inner{font-size:11px;background-color:#000;color:#fff;max-width:200px;padding:5px 8px 4px 8px;text-align:center;white-space:normal}.mce-tooltip-inner{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-tooltip-inner{-webkit-box-shadow:0 0 5px #000000;-moz-box-shadow:0 0 5px #000000;box-shadow:0 0 5px #000000}.mce-tooltip-arrow{position:absolute;width:
0;height:0;line-height:0;border:5px dashed #000}.mce-tooltip-arrow-n{border-bottom-color:#000}.mce-tooltip-arrow-s{border-top-color:#000}.mce-tooltip-arrow-e{border-left-color:#000}.mce-tooltip-arrow-w{border-right-color:#000}.mce-tooltip-nw,.mce-tooltip-sw{margin-left:-14px}.mce-tooltip-n .mce-tooltip-arrow{top:0px;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-nw .mce-tooltip-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-ne .mce-tooltip-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-s .mce-tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-sw .mce-tooltip-arrow{bottom:0;left:10px;border-top-styl
e:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-se .mce-tooltip-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-e .mce-tooltip-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.mce-tooltip-w .mce-tooltip-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.mce-btn{border:1px solid #b1b1b1;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25) rgba(0,0,0,0.25);position:relative;text-shadow:0 1px 1px rgba(255,255,255,0.75);display:inline-block;*display:inline;*zoom:1;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(25
5, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);background-color:#f0f0f0;background-image:-moz-linear-gradient(top, #fff, #d9d9d9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#d9d9d9));background-image:-webkit-linear-gradient(top, #fff, #d9d9d9);background-image:-o-linear-gradient(top, #fff, #d9d9d9);background-image:linear-gradient(to bottom, #fff, #d9d9d9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffd9d9d9', GradientType=0);zoom:1}.mce-btn:hover,.mce-btn:focus{color:#333;background-color:#e3e3e3;background-image:-moz-linear-gradient(top, #f2f2f2, #ccc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#ccc));background-image:-webkit-linear-gradient(top, #f2f2f2, #ccc);background-image:-o-linear-gradient(top, #f2f2f2, #ccc);background-image:linear-gradient(to bottom, #f2f2f2, #c
cc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffcccccc', GradientType=0);zoom:1}.mce-btn.mce-disabled button,.mce-btn.mce-disabled:hover button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-btn.mce-active,.mce-btn.mce-active:hover{background-color:#d6d6d6;background-image:-moz-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#c0c0c0));background-image:-webkit-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-o-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:linear-gradient(to bottom, #e6e6e6, #c0c0c0);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffc0c0c0', GradientType=0);zoom:1;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inse
t 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-btn:not(.mce-disabled):active{background-color:#d6d6d6;background-image:-moz-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#c0c0c0));background-image:-webkit-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-o-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:linear-gradient(to bottom, #e6e6e6, #c0c0c0);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffc0c0c0', GradientType=0);zoom:1;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-btn button{padding:4px 10px;font-size:14px;line-height:20px;*li
ne-height:16px;cursor:pointer;color:#333;text-align:center;overflow:visible;-webkit-appearance:none}.mce-btn button::-moz-focus-inner{border:0;padding:0}.mce-btn i{text-shadow:1px 1px #fff}.mce-primary{min-width:50px;color:#fff;border:1px solid #b1b1b1;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25) rgba(0,0,0,0.25);background-color:#006dcc;background-image:-moz-linear-gradient(top, #08c, #04c);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#04c));background-image:-webkit-linear-gradient(top, #08c, #04c);background-image:-o-linear-gradient(top, #08c, #04c);background-image:linear-gradient(to bottom, #08c, #04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);zoom:1}.mce-primary:hover,.mce-primary:focus{background-color:#005fb3;background-image:-moz-linear-gradient(top, #0077b3, #003cb3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0077
b3), to(#003cb3));background-image:-webkit-linear-gradient(top, #0077b3, #003cb3);background-image:-o-linear-gradient(top, #0077b3, #003cb3);background-image:linear-gradient(to bottom, #0077b3, #003cb3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0077b3', endColorstr='#ff003cb3', GradientType=0);zoom:1}.mce-primary.mce-disabled button,.mce-primary.mce-disabled:hover button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-primary.mce-active,.mce-primary.mce-active:hover,.mce-primary:not(.mce-disabled):active{background-color:#005299;background-image:-moz-linear-gradient(top, #069, #039);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#069), to(#039));background-image:-webkit-linear-gradient(top, #069, #039);background-image:-o-linear-gradient(top, #069, #039);background-image:linear-gradient(to bottom, #069, #039);background-repeat:repeat-x;filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff006699', endColorstr='#ff003399', GradientType=0);zoom:1;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-primary button,.mce-primary button i{color:#fff;text-shadow:1px 1px #333}.mce-btn-large button{padding:9px 14px;font-size:16px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.mce-btn-large i{margin-top:2px}.mce-btn-small button{padding:1px 5px;font-size:12px;*padding-bottom:2px}.mce-btn-small i{line-height:20px;vertical-align:top;*line-height:18px}.mce-btn .mce-caret{margin-top:8px;margin-left:0}.mce-btn-small .mce-caret{margin-top:8px;margin-left:0}.mce-caret{display:inline-block;*display:inline;*zoom:1;width:0;height:0;vertical-align:top;border-top:4px solid #333;border-right:4px
solid transparent;border-left:4px solid transparent;content:""}.mce-disabled .mce-caret{border-top-color:#aaa}.mce-caret.mce-up{border-bottom:4px solid #333;border-top:0}.mce-rtl .mce-btn button{direction:rtl}.mce-btn-group .mce-btn{border-width:1px 0 1px 0;margin:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mce-btn-group .mce-first{border-left:1px solid #b1b1b1;border-left:1px solid rgba(0,0,0,0.25);-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.mce-btn-group .mce-last{border-right:1px solid #b1b1b1;border-right:1px solid rgba(0,0,0,0.1);-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.mce-btn-group .mce-first.mce-last{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-btn-group .mce-btn.mce-flow-layout-item{margin:0}.mce-checkbox{cursor:pointer}i.mce-i-checkbox{margin:0 3px 0 0;border:1px solid #c5c5c5;-webkit-border-radius:3px;-moz-border-radi
us:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);background-color:#f0f0f0;background-image:-moz-linear-gradient(top, #fff, #d9d9d9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#d9d9d9));background-image:-webkit-linear-gradient(top, #fff, #d9d9d9);background-image:-o-linear-gradient(top, #fff, #d9d9d9);background-image:linear-gradient(to bottom, #fff, #d9d9d9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffd9d9d9', GradientType=0);zoom:1;text-indent:-10em;*font-size:0;*line-height:0;*text-indent:0;overflow:hidden}.mce-checked i.mce-i-checkbox{color:#333;font-size:16px;line-height:16px;text-indent:0}.mce-checkbox:focus i.mce-i-checkbox,.mce-checkbox.mce-focus
i.mce-i-checkbox{border:1px solid rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65)}.mce-checkbox.mce-disabled .mce-label,.mce-checkbox.mce-disabled i.mce-i-checkbox{color:#acacac}.mce-rtl .mce-checkbox{direction:rtl;text-align:right}.mce-rtl i.mce-i-checkbox{margin:0 0 0 3px}.mce-colorbutton .mce-ico{position:relative}.mce-colorbutton-grid{margin:4px}.mce-colorbutton button{padding-right:4px}.mce-colorbutton .mce-preview{padding-right:3px;display:block;position:absolute;left:50%;top:50%;margin-left:-14px;margin-top:7px;background:gray;width:13px;height:2px;overflow:hidden}.mce-colorbutton.mce-btn-small .mce-preview{margin-left:-16px;padding-right:0;width:16px}.mce-colorbutton .mce-open{padding-left:4px;border-left:1px solid transparent;border-right:1px sol
id transparent}.mce-colorbutton:hover .mce-open{border-left-color:#bdbdbd;border-right-color:#bdbdbd}.mce-colorbutton.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-colorbutton{direction:rtl}.mce-rtl .mce-colorbutton .mce-preview{margin-left:0;padding-right:0;padding-left:4px;margin-right:-14px}.mce-rtl .mce-colorbutton.mce-btn-small .mce-preview{margin-left:0;padding-right:0;margin-right:-17px;padding-left:0}.mce-rtl .mce-colorbutton button{padding-right:10px;padding-left:10px}.mce-rtl .mce-colorbutton .mce-open{padding-left:4px;padding-right:4px}.mce-combobox{display:inline-block;*display:inline;*zoom:1;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);*height:32px}.mce-combobox input{border:1px solid #c5c5c5;border-right-color:#c5c5c5;height:28px}.mce-combobox.mce-disabled input{color:#adadad}.mce-
combobox.mce-has-open input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.mce-combobox .mce-btn{border-left:0;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.mce-combobox button{padding-right:8px;padding-left:8px}.mce-combobox.mce-disabled .mce-btn button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-path{display:inline-block;*display:inline;*zoom:1;padding:8px;white-space:normal}.mce-path .mce-txt{display:inline-block;padding-right:3px}.mce-path .mce-path-body{display:inline-block}.mce-path-item{display:inline-block;*display:inline;*zoom:1;cursor:pointer;color:#333}.mce-path-item:hover{text-decoration:underline}.mce-path-item:focus{background:#666;color:#fff}.mce-path .mce-divider{display:inline}.mce-disabled .mce-path-item{color:#aaa}.mce-rtl .mce-path{direction:rtl}.mce-fieldset{border:0 solid #9E9E9E;-webkit-borde
r-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-fieldset>.mce-container-body{margin-top:-15px}.mce-fieldset-title{margin-left:5px;padding:0 5px 0 5px}.mce-fit-layout{display:inline-block;*display:inline;*zoom:1}.mce-fit-layout-item{position:absolute}.mce-flow-layout-item{display:inline-block;*display:inline;*zoom:1}.mce-flow-layout-item{margin:2px 0 2px 2px}.mce-flow-layout-item.mce-last{margin-right:2px}.mce-flow-layout{white-space:normal}.mce-tinymce-inline .mce-flow-layout{white-space:nowrap}.mce-rtl .mce-flow-layout{text-align:right;direction:rtl}.mce-rtl .mce-flow-layout-item{margin:2px 2px 2px 0}.mce-rtl .mce-flow-layout-item.mce-last{margin-left:2px}.mce-iframe{border:0 solid #9e9e9e;width:100%;height:100%}.mce-label{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden}.mce-label.mce-autoscroll{overflow:auto}.mce-label.mce-disabled{color:#aaa}.mce-label.mce-multiline{white-space:pre-wrap}.mce-label.mce-error{c
olor:#a00}.mce-rtl .mce-label{text-align:right;direction:rtl}.mce-menubar .mce-menubtn{border-color:transparent;background:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:none}.mce-menubar{border:1px solid #c4c4c4}.mce-menubar .mce-menubtn button span{color:#333}.mce-menubar .mce-caret{border-top-color:#333}.mce-menubar .mce-menubtn:hover,.mce-menubar .mce-menubtn.mce-active,.mce-menubar .mce-menubtn:focus{border-color:transparent;background:#e6e6e6;filter:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-menubtn span{color:#333;margin-right:2px;line-height:20px;*line-height:16px}.mce-menubtn.mce-btn-small span{font-size:12px}.mce-menubtn.mce-fixed-width span{display:inline-block;overflow-x:hidden;text-overflow:ellipsis;width:90px}.mce-menubtn.mce-fixed-width.mce-btn-small span{width:70px}.mce-menubtn .mce-caret{*margin-top:6px}.mce-rtl .mce-menubtn button{direction:rtl;
text-align:right}.mce-listbox button{text-align:left;padding-right:20px;position:relative}.mce-listbox .mce-caret{position:absolute;margin-top:-2px;right:8px;top:50%}.mce-rtl .mce-listbox .mce-caret{right:auto;left:8px}.mce-rtl .mce-listbox button{padding-right:10px;padding-left:20px}.mce-menu-item{display:block;padding:6px 15px 6px 12px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap;cursor:pointer;line-height:normal;border-left:4px solid transparent;margin-bottom:1px}.mce-menu-item .mce-ico,.mce-menu-item .mce-text{color:#333}.mce-menu-item.mce-disabled .mce-text,.mce-menu-item.mce-disabled .mce-ico{color:#adadad}.mce-menu-item:hover .mce-text,.mce-menu-item.mce-selected .mce-text,.mce-menu-item:focus .mce-text{color:#fff}.mce-menu-item:hover .mce-ico,.mce-menu-item.mce-selected .mce-ico,.mce-menu-item:focus .mce-ico{color:#fff}.mce-menu-item.mce-disabled:hover{background:#ccc}.mce-menu-shortcut{display:inline-block;color:#adadad}.mce-menu-shortcut{dis
play:inline-block;*display:inline;*zoom:1;padding:0 15px 0 20px}.mce-menu-item:hover .mce-menu-shortcut,.mce-menu-item.mce-selected .mce-menu-shortcut,.mce-menu-item:focus .mce-menu-shortcut{color:#fff}.mce-menu-item .mce-caret{margin-top:4px;*margin-top:3px;margin-right:6px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid #333}.mce-menu-item.mce-selected .mce-caret,.mce-menu-item:focus .mce-caret,.mce-menu-item:hover .mce-caret{border-left-color:#fff}.mce-menu-align .mce-menu-shortcut{*margin-top:-2px}.mce-menu-align .mce-menu-shortcut,.mce-menu-align .mce-caret{position:absolute;right:0}.mce-menu-item.mce-active i{visibility:visible}.mce-menu-item-normal.mce-active{background-color:#c8def4}.mce-menu-item-preview.mce-active{border-left:5px solid #aaa}.mce-menu-item-normal.mce-active .mce-text{color:#333}.mce-menu-item-normal.mce-active:hover .mce-text,.mce-menu-item-normal.mce-active:hover .mce-ico{color:#fff}.mce-menu-item-normal.mce-activ
e:focus .mce-text,.mce-menu-item-normal.mce-active:focus .mce-ico{color:#fff}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{text-decoration:none;color:#fff;background-color:#0081c2;background-image:-moz-linear-gradient(top, #08c, #0077b3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#0077b3));background-image:-webkit-linear-gradient(top, #08c, #0077b3);background-image:-o-linear-gradient(top, #08c, #0077b3);background-image:linear-gradient(to bottom, #08c, #0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);zoom:1}div.mce-menu .mce-menu-item-sep,.mce-menu-item-sep:hover{border:0;padding:0;height:1px;margin:9px 1px;overflow:hidden;background:#cbcbcb;border-bottom:1px solid #fff;cursor:default;filter:none}.mce-menu.mce-rtl{direction:rtl}.mce-rtl .mce-menu-item{text-align:right;direction:rtl;padding:6px 12px 6px 15px}.mce-menu-align.mce-r
tl .mce-menu-shortcut,.mce-menu-align.mce-rtl .mce-caret{right:auto;left:0}.mce-rtl .mce-menu-item .mce-caret{margin-left:6px;margin-right:0;border-right:4px solid #333;border-left:0}.mce-rtl .mce-menu-item.mce-selected .mce-caret,.mce-rtl .mce-menu-item:focus .mce-caret,.mce-rtl .mce-menu-item:hover .mce-caret{border-left-color:transparent;border-right-color:#fff}.mce-menu{position:absolute;left:0;top:0;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;z-index:1000;padding:5px 0 5px 0;margin:2px 0 0;min-width:160px;background:#fff;border:1px solid #989898;border:1px solid rgba(0,0,0,0.2);z-index:1002;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);max-height:400px;overflow:auto;overflow-x:hidden}.mce-menu i{display:none}.mce-menu-has-icons i{display:inline-block;*display:inline}.mce-menu-su
b-tr-tl{margin:-6px 0 0 -1px}.mce-menu-sub-br-bl{margin:6px 0 0 -1px}.mce-menu-sub-tl-tr{margin:-6px 0 0 1px}.mce-menu-sub-bl-br{margin:6px 0 0 1px}.mce-container-body .mce-resizehandle{position:absolute;right:0;bottom:0;width:16px;height:16px;visibility:visible;cursor:s-resize;margin:0}.mce-container-body .mce-resizehandle-both{cursor:se-resize}i.mce-i-resize{color:#333}.mce-spacer{visibility:hidden}.mce-splitbtn .mce-open{border-left:1px solid transparent;border-right:1px solid transparent}.mce-splitbtn:hover .mce-open{border-left-color:#bdbdbd;border-right-color:#bdbdbd}.mce-splitbtn button{padding-right:4px}.mce-splitbtn .mce-open{padding-left:4px}.mce-splitbtn .mce-open.mce-active{-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-splitbtn.mce-btn-small .mce-open{padding:0 3px 0 3
px}.mce-rtl .mce-splitbtn{direction:rtl;text-align:right}.mce-rtl .mce-splitbtn button{padding-right:10px;padding-left:10px}.mce-rtl .mce-splitbtn .mce-open{padding-left:4px;padding-right:4px}.mce-stack-layout-item{display:block}.mce-tabs{display:block;border-bottom:1px solid #c5c5c5}.mce-tab{display:inline-block;*display:inline;*zoom:1;border:1px solid #c5c5c5;border-width:0 1px 0 0;background:#e3e3e3;padding:8px;text-shadow:0 1px 1px rgba(255,255,255,0.75);height:13px;cursor:pointer}.mce-tab:hover{background:#fdfdfd}.mce-tab.mce-active{background:#fdfdfd;border-bottom-color:transparent;margin-bottom:-1px;height:14px}.mce-rtl .mce-tabs{text-align:right;direction:rtl}.mce-rtl .mce-tab{border-width:0 0 0 1px}.mce-textbox{background:#fff;border:1px solid #c5c5c5;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);di
splay:inline-block;-webkit-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;height:28px;resize:none;padding:0 4px 0 4px;white-space:pre-wrap;*white-space:pre;color:#333}.mce-textbox:focus,.mce-textbox.mce-focus{border-color:rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65)}.mce-placeholder .mce-textbox{color:#aaa}.mce-textbox.mce-multiline{padding:4px}.mce-textbox.mce-disabled{color:#adadad}.mce-rtl .mce-textbox{text-align:right;direction:rtl}.mce-throbber{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;filter:alpha(opacity=60);zoom:1;background:#fff url('img/loader.gif') no-repeat center center}.mce-throbber-inline{position:static;height:50px}@font-face{font-family:'tinymce';src:url('f
onts/tinymce.eot');src:url('fonts/tinymce.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce.woff') format('woff'),url('fonts/tinymce.ttf') format('truetype'),url('fonts/tinymce.svg#tinymce') format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'tinymce-small';src:url('fonts/tinymce-small.eot');src:url('fonts/tinymce-small.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce-small.woff') format('woff'),url('fonts/tinymce-small.ttf') format('truetype'),url('fonts/tinymce-small.svg#tinymce') format('svg');font-weight:normal;font-style:normal}.mce-ico{font-family:'tinymce',Arial;font-style:normal;font-weight:normal;font-variant:normal;font-size:16px;line-height:16px;speak:none;vertical-align:text-top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;background:transparent center center;background-size:cover;width:16px;height:16px;color:#333}.mce-btn-small .mce-ico{font-family:'tinymce-small',Arial}.mce-i-save:
before{content:"\e000"}.mce-i-newdocument:before{content:"\e001"}.mce-i-fullpage:before{content:"\e002"}.mce-i-alignleft:before{content:"\e003"}.mce-i-aligncenter:before{content:"\e004"}.mce-i-alignright:before{content:"\e005"}.mce-i-alignjustify:before{content:"\e006"}.mce-i-cut:before{content:"\e007"}.mce-i-paste:before{content:"\e008"}.mce-i-searchreplace:before{content:"\e009"}.mce-i-bullist:before{content:"\e00a"}.mce-i-numlist:before{content:"\e00b"}.mce-i-indent:before{content:"\e00c"}.mce-i-outdent:before{content:"\e00d"}.mce-i-blockquote:before{content:"\e00e"}.mce-i-undo:before{content:"\e00f"}.mce-i-redo:before{content:"\e010"}.mce-i-link:before{content:"\e011"}.mce-i-unlink:before{content:"\e012"}.mce-i-anchor:before{content:"\e013"}.mce-i-image:before{content:"\e014&qu
ot;}.mce-i-media:before{content:"\e015"}.mce-i-help:before{content:"\e016"}.mce-i-code:before{content:"\e017"}.mce-i-insertdatetime:before{content:"\e018"}.mce-i-preview:before{content:"\e019"}.mce-i-forecolor:before{content:"\e01a"}.mce-i-backcolor:before{content:"\e01a"}.mce-i-table:before{content:"\e01b"}.mce-i-hr:before{content:"\e01c"}.mce-i-removeformat:before{content:"\e01d"}.mce-i-subscript:before{content:"\e01e"}.mce-i-superscript:before{content:"\e01f"}.mce-i-charmap:before{content:"\e020"}.mce-i-emoticons:before{content:"\e021"}.mce-i-print:before{content:"\e022"}.mce-i-fullscreen:before{content:"\e023"}.mce-i-spellchecker:before{content:"\e024"}.mce-i-nonbreaking:before{content:"\e025"}.mce-i-template:before{content:"\e026"}.mce-i-pagebreak:before{content:"\e027"}.mce-i-rest
oredraft:before{content:"\e028"}.mce-i-untitled:before{content:"\e029"}.mce-i-bold:before{content:"\e02a"}.mce-i-italic:before{content:"\e02b"}.mce-i-underline:before{content:"\e02c"}.mce-i-strikethrough:before{content:"\e02d"}.mce-i-visualchars:before{content:"\e02e"}.mce-i-visualblocks:before{content:"\e02e"}.mce-i-ltr:before{content:"\e02f"}.mce-i-rtl:before{content:"\e030"}.mce-i-copy:before{content:"\e031"}.mce-i-resize:before{content:"\e032"}.mce-i-browse:before{content:"\e034"}.mce-i-pastetext:before{content:"\e035"}.mce-i-checkbox:before,.mce-i-selected:before{content:"\e033"}.mce-i-selected{visibility:hidden}i.mce-i-backcolor{text-shadow:none;background:#bbb}
</del><span class="cx">\ No newline at end of file
</span><ins>+.mce-container,.mce-container *,.mce-widget,.mce-widget *,.mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;-webkit-tap-highlight-color:transparent;line-height:normal;font-weight:normal;text-align:left;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-widget button{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.mce-container *[unselectable]{-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.mce-fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.mce-fade.mce-in{opacity:1}.mce-tinymce{visibility:inherit !important;position:relative}.mce-fullscreen{border:0;p
adding:0;margin:0;overflow:hidden;height:100%;z-index:100}div.mce-fullscreen{position:fixed;top:0;left:0;width:100%;height:auto}.mce-tinymce{display:block;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mce-wordcount{position:absolute;top:0;right:0;padding:8px}div.mce-edit-area{background:#FFF;filter:none}.mce-statusbar{position:relative}.mce-statusbar .mce-container-body{position:relative}.mce-fullscreen .mce-resizehandle{display:none}.mce-charmap{border-collapse:collapse}.mce-charmap td{cursor:default;border:1px solid #9e9e9e;width:20px;height:20px;line-height:20px;text-align:center;vertical-align:middle;padding:2px}.mce-charmap td div{text-align:center}.mce-charmap td:hover{background:#d9d9d9}.mce-grid td.mce-grid-cell div{border:1px solid #d6d6d6;width:15px;height:15px;margin:0px;cursor:pointer}.mce-grid td.mce-grid-cell div:focus{border-color:#a1a1a1}.mce-grid td.mce-grid-cell div[disabled]{cursor:not-allowed}.mce-grid{border-spacing:2px;border-collapse:sepa
rate}.mce-grid a{display:block;border:1px solid transparent}.mce-grid a:hover,.mce-grid a:focus{border-color:#a1a1a1}.mce-grid-border{margin:0 4px 0 4px}.mce-grid-border a{border-color:#d6d6d6;width:13px;height:13px}.mce-grid-border a:hover,.mce-grid-border a.mce-active{border-color:#a1a1a1;background:#c8def4}.mce-text-center{text-align:center}div.mce-tinymce-inline{width:100%;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-colorbtn-trans div{text-align:center;vertical-align:middle;font-weight:bold;font-size:20px;line-height:16px;color:#707070}.mce-toolbar-grp{padding-bottom:2px}.mce-toolbar-grp .mce-flow-layout-item{margin-bottom:0}.mce-rtl .mce-wordcount{left:0;right:auto}.mce-container,.mce-container-body{display:block}.mce-autoscroll{overflow:hidden}.mce-scrollbar{position:absolute;width:7px;height:100%;top:2px;right:2px;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-scrollbar-h{top:auto;right:auto;left:2px;bottom:2px;width:100%;height:7px}.mce-scrollbar-thumb
{position:absolute;background-color:#000;border:1px solid #888;border-color:rgba(85,85,85,0.6);width:5px;height:100%;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.mce-scrollbar-h .mce-scrollbar-thumb{width:100%;height:5px}.mce-scrollbar:hover,.mce-scrollbar.mce-active{background-color:#AAA;opacity:.6;filter:alpha(opacity=60);zoom:1;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.mce-scroll{position:relative}.mce-panel{border:0 solid #9e9e9e;background-color:#f0f0f0;background-image:-moz-linear-gradient(top, #fdfdfd, #ddd);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fdfdfd), to(#ddd));background-image:-webkit-linear-gradient(top, #fdfdfd, #ddd);background-image:-o-linear-gradient(top, #fdfdfd, #ddd);background-image:linear-gradient(to bottom, #fdfdfd, #ddd);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffdfdfd', endColorstr='#ffdddddd', GradientType=0);zoom:1}.mce-floatpanel{pos
ition:absolute;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2)}.mce-floatpanel.mce-fixed{position:fixed}.mce-floatpanel .mce-arrow,.mce-floatpanel .mce-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.mce-floatpanel .mce-arrow{border-width:11px}.mce-floatpanel .mce-arrow:after{border-width:10px;content:""}.mce-floatpanel.mce-popover{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);top:0;left:0;background:#fff;border:1px solid #9e9e9e;border:1px solid rgba(0,0,0,0.25)}.mce-floatpanel.mce-popover.mce-bottom{margin-top:10px;*margin-top:0}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow{left
:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#9e9e9e;border-bottom-color:rgba(0,0,0,0.25);top:-11px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.mce-floatpanel.mce-popover.mce-bottom.mce-start{margin-left:-22px}.mce-floatpanel.mce-popover.mce-bottom.mce-start>.mce-arrow{left:20px}.mce-floatpanel.mce-popover.mce-bottom.mce-end{margin-left:22px}.mce-floatpanel.mce-popover.mce-bottom.mce-end>.mce-arrow{right:10px;left:auto}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;background:#fff;height:100%}div.mce-fullscreen{position:fixed;top:0;left:0}#mce-modal-block{opacity:0;filter:alpha(opacity=0);zoom:1;position:fixed;left:0;top:0;width:100%;height:100%;background:#000}#mce-modal-block.mce-in{opacity:.3;filter:alpha(opacity=30);zoom:1}.mce-window-move{cursor:move}.mce-window{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px r
gba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;background:#fff;position:fixed;top:0;left:0;opacity:0;-webkit-transition:opacity 150ms ease-in;transition:opacity 150ms ease-in}.mce-window.mce-in{opacity:1}.mce-window-head{padding:9px 15px;border-bottom:1px solid #c5c5c5;position:relative}.mce-window-head .mce-close{position:absolute;right:15px;top:9px;font-size:20px;font-weight:bold;line-height:20px;color:#858585;cursor:pointer;height:20px;overflow:hidden}.mce-close:hover{color:#adadad}.mce-window-head .mce-title{line-height:20px;font-size:20px;font-weight:bold;text-rendering:optimizelegibility;padding-right:10px}.mce-window .mce-container-body{display:block}.mce-foot{display:block;background-color:#fff;border-top:1px solid #c5c5c5;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.mce-window-head .m
ce-dragh{position:absolute;top:0;left:0;cursor:move;width:90%;height:100%}.mce-window iframe{width:100%;height:100%}.mce-window.mce-fullscreen,.mce-window.mce-fullscreen .mce-foot{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mce-rtl .mce-window-head .mce-close{position:absolute;right:auto;left:15px}.mce-rtl .mce-window-head .mce-dragh{left:auto;right:0}.mce-rtl .mce-window-head .mce-title{direction:rtl;text-align:right}.mce-abs-layout{position:relative}body .mce-abs-layout-item,.mce-abs-end{position:absolute}.mce-abs-end{width:1px;height:1px}.mce-container-body.mce-abs-layout{overflow:hidden}.mce-tooltip{position:absolute;padding:5px;opacity:.8;filter:alpha(opacity=80);zoom:1}.mce-tooltip-inner{font-size:11px;background-color:#000;color:#fff;max-width:200px;padding:5px 8px 4px 8px;text-align:center;white-space:normal}.mce-tooltip-inner{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-tooltip-inner{-webkit-box-shadow:0 0 5px #000000;-moz-box-sh
adow:0 0 5px #000000;box-shadow:0 0 5px #000000}.mce-tooltip-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.mce-tooltip-arrow-n{border-bottom-color:#000}.mce-tooltip-arrow-s{border-top-color:#000}.mce-tooltip-arrow-e{border-left-color:#000}.mce-tooltip-arrow-w{border-right-color:#000}.mce-tooltip-nw,.mce-tooltip-sw{margin-left:-14px}.mce-tooltip-n .mce-tooltip-arrow{top:0px;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-nw .mce-tooltip-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-ne .mce-tooltip-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-s .mce-tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-ri
ght-color:transparent}.mce-tooltip-sw .mce-tooltip-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-se .mce-tooltip-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-e .mce-tooltip-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.mce-tooltip-w .mce-tooltip-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.mce-btn{border:1px solid #b1b1b1;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25) rgba(0,0,0,0.25);position:relative;text-shadow:0 1px 1px rgba(255,255,255,0.75);display:inline-block;*display:inline;*zoom:1;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 rg
ba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);background-color:#f0f0f0;background-image:-moz-linear-gradient(top, #fff, #d9d9d9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#d9d9d9));background-image:-webkit-linear-gradient(top, #fff, #d9d9d9);background-image:-o-linear-gradient(top, #fff, #d9d9d9);background-image:linear-gradient(to bottom, #fff, #d9d9d9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffd9d9d9', GradientType=0);zoom:1}.mce-btn:hover,.mce-btn:focus{color:#333;background-color:#e3e3e3;background-image:-moz-linear-gradient(top, #f2f2f2, #ccc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#ccc));background-image:-webkit-linear-gradient(top, #f2f2f2, #ccc);background-image:-o-
linear-gradient(top, #f2f2f2, #ccc);background-image:linear-gradient(to bottom, #f2f2f2, #ccc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffcccccc', GradientType=0);zoom:1}.mce-btn.mce-disabled button,.mce-btn.mce-disabled:hover button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-btn.mce-active,.mce-btn.mce-active:hover{background-color:#d6d6d6;background-image:-moz-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#c0c0c0));background-image:-webkit-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-o-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:linear-gradient(to bottom, #e6e6e6, #c0c0c0);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffc0c0c0', GradientType=0);zoom:1;-webkit-box-sha
dow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-btn:active{background-color:#d6d6d6;background-image:-moz-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#c0c0c0));background-image:-webkit-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-o-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:linear-gradient(to bottom, #e6e6e6, #c0c0c0);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffc0c0c0', GradientType=0);zoom:1;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.
05)}.mce-btn button{padding:4px 10px;font-size:14px;line-height:20px;*line-height:16px;cursor:pointer;color:#333;text-align:center;overflow:visible;-webkit-appearance:none}.mce-btn button::-moz-focus-inner{border:0;padding:0}.mce-btn i{text-shadow:1px 1px #fff}.mce-primary{min-width:50px;color:#fff;border:1px solid #b1b1b1;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25) rgba(0,0,0,0.25);background-color:#006dcc;background-image:-moz-linear-gradient(top, #08c, #04c);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#04c));background-image:-webkit-linear-gradient(top, #08c, #04c);background-image:-o-linear-gradient(top, #08c, #04c);background-image:linear-gradient(to bottom, #08c, #04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);zoom:1}.mce-primary:hover,.mce-primary:focus{background-color:#005fb3;background-image:-moz-linear-gradient(top, #0077b3, #0
03cb3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0077b3), to(#003cb3));background-image:-webkit-linear-gradient(top, #0077b3, #003cb3);background-image:-o-linear-gradient(top, #0077b3, #003cb3);background-image:linear-gradient(to bottom, #0077b3, #003cb3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0077b3', endColorstr='#ff003cb3', GradientType=0);zoom:1}.mce-primary.mce-disabled button,.mce-primary.mce-disabled:hover button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-primary.mce-active,.mce-primary.mce-active:hover,.mce-primary:not(.mce-disabled):active{background-color:#005299;background-image:-moz-linear-gradient(top, #069, #039);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#069), to(#039));background-image:-webkit-linear-gradient(top, #069, #039);background-image:-o-linear-gradient(top, #069, #039);background-image:l
inear-gradient(to bottom, #069, #039);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff006699', endColorstr='#ff003399', GradientType=0);zoom:1;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-primary button,.mce-primary button i{color:#fff;text-shadow:1px 1px #333}.mce-btn-large button{padding:9px 14px;font-size:16px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.mce-btn-large i{margin-top:2px}.mce-btn-small button{padding:1px 5px;font-size:12px;*padding-bottom:2px}.mce-btn-small i{line-height:20px;vertical-align:top;*line-height:18px}.mce-btn .mce-caret{margin-top:8px;margin-left:0}.mce-btn-small .mce-caret{margin-top:8px;margin-left:0}.mce-caret{display:inline-block;*display:inline;*zoom:1;width:
0;height:0;vertical-align:top;border-top:4px solid #333;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.mce-disabled .mce-caret{border-top-color:#aaa}.mce-caret.mce-up{border-bottom:4px solid #333;border-top:0}.mce-btn-flat{border:0;background:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:none}.mce-btn-flat:hover,.mce-btn-flat.mce-active,.mce-btn-flat:focus,.mce-btn-flat:active{border:0;background:#e6e6e6;filter:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-rtl .mce-btn button{direction:rtl}.mce-btn-group .mce-btn{border-width:1px 0 1px 0;margin:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mce-btn-group .mce-first{border-left:1px solid #b1b1b1;border-left:1px solid rgba(0,0,0,0.25);-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.mce-btn-group .mce-last{border-r
ight:1px solid #b1b1b1;border-right:1px solid rgba(0,0,0,0.1);-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.mce-btn-group .mce-first.mce-last{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-btn-group .mce-btn.mce-flow-layout-item{margin:0}.mce-checkbox{cursor:pointer}i.mce-i-checkbox{margin:0 3px 0 0;border:1px solid #c5c5c5;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);background-color:#f0f0f0;background-image:-moz-linear-gradient(top, #fff, #d9d9d9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#d9d9d9));background-image:-webkit-linear-gradient(top, #fff, #d9d9d9);background-image:-o-linear-gradient(top, #fff, #d9d9d
9);background-image:linear-gradient(to bottom, #fff, #d9d9d9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffd9d9d9', GradientType=0);zoom:1;text-indent:-10em;*font-size:0;*line-height:0;*text-indent:0;overflow:hidden}.mce-checked i.mce-i-checkbox{color:#333;font-size:16px;line-height:16px;text-indent:0}.mce-checkbox:focus i.mce-i-checkbox,.mce-checkbox.mce-focus i.mce-i-checkbox{border:1px solid rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65)}.mce-checkbox.mce-disabled .mce-label,.mce-checkbox.mce-disabled i.mce-i-checkbox{color:#acacac}.mce-rtl .mce-checkbox{direction:rtl;text-align:right}.mce-rtl i.mce-i-checkbox{margin:0 0 0 3px}.mce-combobox{display:inline-block;*display:inline;
*zoom:1;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);*height:32px}.mce-combobox input{border:1px solid #c5c5c5;border-right-color:#c5c5c5;height:28px}.mce-combobox.mce-disabled input{color:#adadad}.mce-combobox.mce-has-open input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.mce-combobox .mce-btn{border-left:0;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.mce-combobox button{padding-right:8px;padding-left:8px}.mce-combobox.mce-disabled .mce-btn button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-colorbox i{border:1px solid #c5c5c5;width:14px;height:14px}.mce-colorbutton .mce-ico{position:relative}.mce-colorbutton-grid{margin:4px}.mce-color
button button{padding-right:4px}.mce-colorbutton .mce-preview{padding-right:3px;display:block;position:absolute;left:50%;top:50%;margin-left:-14px;margin-top:7px;background:gray;width:13px;height:2px;overflow:hidden}.mce-colorbutton.mce-btn-small .mce-preview{margin-left:-16px;padding-right:0;width:16px}.mce-colorbutton .mce-open{padding-left:4px;border-left:1px solid transparent;border-right:1px solid transparent}.mce-colorbutton:hover .mce-open{border-left-color:#bdbdbd;border-right-color:#bdbdbd}.mce-colorbutton.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-colorbutton{direction:rtl}.mce-rtl .mce-colorbutton .mce-preview{margin-left:0;padding-right:0;padding-left:4px;margin-right:-14px}.mce-rtl .mce-colorbutton.mce-btn-small .mce-preview{margin-left:0;padding-right:0;margin-right:-17px;padding-left:0}.mce-rtl .mce-colorbutton button{padding-right:10px;padding-left:10px}.mce-rtl .mce-colorbutton .mce-open{padding-left:4px;padding-right:4px}.mce-colorpicker{position:rel
ative;width:250px;height:220px}.mce-colorpicker-sv{position:absolute;top:0;left:0;width:90%;height:100%;border:1px solid #c5c5c5;cursor:crosshair;overflow:hidden}.mce-colorpicker-h-chunk{width:100%}.mce-colorpicker-overlay1,.mce-colorpicker-overlay2{width:100%;height:100%;position:absolute;top:0;left:0}.mce-colorpicker-overlay1{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr='#ffffff', endColorstr='#00ffffff');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#ffffff', endColorstr='#00ffffff')";background:linear-gradient(to right, #fff, rgba(255,255,255,0))}.mce-colorpicker-overlay2{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#00000000', endColorstr='#000000');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#00000000', endColorstr='#000000')";background:linear-gradient(to bottom, rgba(0,0,0,0), #000)}.mce-colorpicker-selecto
r1{background:none;position:absolute;width:12px;height:12px;margin:-8px 0 0 -8px;border:1px solid black;border-radius:50%}.mce-colorpicker-selector2{position:absolute;width:10px;height:10px;border:1px solid white;border-radius:50%}.mce-colorpicker-h{position:absolute;top:0;right:0;width:6.5%;height:100%;border:1px solid #c5c5c5;cursor:crosshair}.mce-colorpicker-h-marker{margin-top:-4px;position:absolute;top:0;left:-1px;width:100%;border:1px solid #333;background:#fff;height:4px;z-index:100}.mce-path{display:inline-block;*display:inline;*zoom:1;padding:8px;white-space:normal}.mce-path .mce-txt{display:inline-block;padding-right:3px}.mce-path .mce-path-body{display:inline-block}.mce-path-item{display:inline-block;*display:inline;*zoom:1;cursor:pointer;color:#333}.mce-path-item:hover{text-decoration:underline}.mce-path-item:focus{background:#666;color:#fff}.mce-path .mce-divider{display:inline}.mce-disabled .mce-path-item{color:#aaa}.mce-rtl .mce-path{direction:rtl}.mce-fieldset{border
:0 solid #9E9E9E;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-fieldset>.mce-container-body{margin-top:-15px}.mce-fieldset-title{margin-left:5px;padding:0 5px 0 5px}.mce-fit-layout{display:inline-block;*display:inline;*zoom:1}.mce-fit-layout-item{position:absolute}.mce-flow-layout-item{display:inline-block;*display:inline;*zoom:1}.mce-flow-layout-item{margin:2px 0 2px 2px}.mce-flow-layout-item.mce-last{margin-right:2px}.mce-flow-layout{white-space:normal}.mce-tinymce-inline .mce-flow-layout{white-space:nowrap}.mce-rtl .mce-flow-layout{text-align:right;direction:rtl}.mce-rtl .mce-flow-layout-item{margin:2px 2px 2px 0}.mce-rtl .mce-flow-layout-item.mce-last{margin-left:2px}.mce-iframe{border:0 solid #9e9e9e;width:100%;height:100%}.mce-label{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden}.mce-label.mce-autoscroll{overflow:auto}.mce-label.mce-disabled{color:#aaa}.mce-label.mce-multiline{white-space:p
re-wrap}.mce-label.mce-error{color:#a00}.mce-rtl .mce-label{text-align:right;direction:rtl}.mce-menubar .mce-menubtn{border-color:transparent;background:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:none}.mce-menubar{border:1px solid #c4c4c4}.mce-menubar .mce-menubtn button span{color:#333}.mce-menubar .mce-caret{border-top-color:#333}.mce-menubar .mce-menubtn:hover,.mce-menubar .mce-menubtn.mce-active,.mce-menubar .mce-menubtn:focus{border-color:transparent;background:#e6e6e6;filter:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-menubtn span{color:#333;margin-right:2px;line-height:20px;*line-height:16px}.mce-menubtn.mce-btn-small span{font-size:12px}.mce-menubtn.mce-fixed-width span{display:inline-block;overflow-x:hidden;text-overflow:ellipsis;width:90px}.mce-menubtn.mce-fixed-width.mce-btn-small span{width:70px}.mce-menubtn .mce-caret{*margin-top:6px}.mce-rtl .mce
-menubtn button{direction:rtl;text-align:right}.mce-listbox button{text-align:left;padding-right:20px;position:relative}.mce-listbox .mce-caret{position:absolute;margin-top:-2px;right:8px;top:50%}.mce-rtl .mce-listbox .mce-caret{right:auto;left:8px}.mce-rtl .mce-listbox button{padding-right:10px;padding-left:20px}.mce-menu-item{display:block;padding:6px 15px 6px 12px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap;cursor:pointer;line-height:normal;border-left:4px solid transparent;margin-bottom:1px}.mce-menu-item .mce-ico,.mce-menu-item .mce-text{color:#333}.mce-menu-item.mce-disabled .mce-text,.mce-menu-item.mce-disabled .mce-ico{color:#adadad}.mce-menu-item:hover .mce-text,.mce-menu-item.mce-selected .mce-text,.mce-menu-item:focus .mce-text{color:#fff}.mce-menu-item:hover .mce-ico,.mce-menu-item.mce-selected .mce-ico,.mce-menu-item:focus .mce-ico{color:#fff}.mce-menu-item.mce-disabled:hover{background:#ccc}.mce-menu-shortcut{display:inline-block;color:
#adadad}.mce-menu-shortcut{display:inline-block;*display:inline;*zoom:1;padding:0 15px 0 20px}.mce-menu-item:hover .mce-menu-shortcut,.mce-menu-item.mce-selected .mce-menu-shortcut,.mce-menu-item:focus .mce-menu-shortcut{color:#fff}.mce-menu-item .mce-caret{margin-top:4px;*margin-top:3px;margin-right:6px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid #333}.mce-menu-item.mce-selected .mce-caret,.mce-menu-item:focus .mce-caret,.mce-menu-item:hover .mce-caret{border-left-color:#fff}.mce-menu-align .mce-menu-shortcut{*margin-top:-2px}.mce-menu-align .mce-menu-shortcut,.mce-menu-align .mce-caret{position:absolute;right:0}.mce-menu-item.mce-active i{visibility:visible}.mce-menu-item-normal.mce-active{background-color:#c8def4}.mce-menu-item-preview.mce-active{border-left:5px solid #aaa}.mce-menu-item-normal.mce-active .mce-text{color:#333}.mce-menu-item-normal.mce-active:hover .mce-text,.mce-menu-item-normal.mce-active:hover .mce-ico{color:#fff}.
mce-menu-item-normal.mce-active:focus .mce-text,.mce-menu-item-normal.mce-active:focus .mce-ico{color:#fff}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{text-decoration:none;color:#fff;background-color:#0081c2;background-image:-moz-linear-gradient(top, #08c, #0077b3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#0077b3));background-image:-webkit-linear-gradient(top, #08c, #0077b3);background-image:-o-linear-gradient(top, #08c, #0077b3);background-image:linear-gradient(to bottom, #08c, #0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);zoom:1}div.mce-menu .mce-menu-item-sep,.mce-menu-item-sep:hover{border:0;padding:0;height:1px;margin:9px 1px;overflow:hidden;background:#cbcbcb;border-bottom:1px solid #fff;cursor:default;filter:none}.mce-menu.mce-rtl{direction:rtl}.mce-rtl .mce-menu-item{text-align:right;direction:rtl;padding:6px 12px
6px 15px}.mce-menu-align.mce-rtl .mce-menu-shortcut,.mce-menu-align.mce-rtl .mce-caret{right:auto;left:0}.mce-rtl .mce-menu-item .mce-caret{margin-left:6px;margin-right:0;border-right:4px solid #333;border-left:0}.mce-rtl .mce-menu-item.mce-selected .mce-caret,.mce-rtl .mce-menu-item:focus .mce-caret,.mce-rtl .mce-menu-item:hover .mce-caret{border-left-color:transparent;border-right-color:#fff}.mce-menu{position:absolute;left:0;top:0;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;z-index:1000;padding:5px 0 5px 0;margin:2px 0 0;min-width:160px;background:#fff;border:1px solid #989898;border:1px solid rgba(0,0,0,0.2);z-index:1002;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);max-height:400px;overflow:auto;overflow-x:hidden}.mce-menu i{display:none}.mce-menu-has-icons i{display:inline-bloc
k;*display:inline}.mce-menu-sub-tr-tl{margin:-6px 0 0 -1px}.mce-menu-sub-br-bl{margin:6px 0 0 -1px}.mce-menu-sub-tl-tr{margin:-6px 0 0 1px}.mce-menu-sub-bl-br{margin:6px 0 0 1px}.mce-container-body .mce-resizehandle{position:absolute;right:0;bottom:0;width:16px;height:16px;visibility:visible;cursor:s-resize;margin:0}.mce-container-body .mce-resizehandle-both{cursor:se-resize}i.mce-i-resize{color:#333}.mce-spacer{visibility:hidden}.mce-splitbtn .mce-open{border-left:1px solid transparent;border-right:1px solid transparent}.mce-splitbtn:hover .mce-open{border-left-color:#bdbdbd;border-right-color:#bdbdbd}.mce-splitbtn button{padding-right:4px}.mce-splitbtn .mce-open{padding-left:4px}.mce-splitbtn .mce-open.mce-active{-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-splitbtn.mce-btn-sma
ll .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-splitbtn{direction:rtl;text-align:right}.mce-rtl .mce-splitbtn button{padding-right:10px;padding-left:10px}.mce-rtl .mce-splitbtn .mce-open{padding-left:4px;padding-right:4px}.mce-stack-layout-item{display:block}.mce-tabs{display:block;border-bottom:1px solid #c5c5c5}.mce-tab{display:inline-block;*display:inline;*zoom:1;border:1px solid #c5c5c5;border-width:0 1px 0 0;background:#e3e3e3;padding:8px;text-shadow:0 1px 1px rgba(255,255,255,0.75);height:13px;cursor:pointer}.mce-tab:hover{background:#fdfdfd}.mce-tab.mce-active{background:#fdfdfd;border-bottom-color:transparent;margin-bottom:-1px;height:14px}.mce-rtl .mce-tabs{text-align:right;direction:rtl}.mce-rtl .mce-tab{border-width:0 0 0 1px}.mce-textbox{background:#fff;border:1px solid #c5c5c5;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1
px 1px rgba(0, 0, 0, 0.075);display:inline-block;-webkit-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;height:28px;resize:none;padding:0 4px 0 4px;white-space:pre-wrap;*white-space:pre;color:#333}.mce-textbox:focus,.mce-textbox.mce-focus{border-color:rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65)}.mce-placeholder .mce-textbox{color:#aaa}.mce-textbox.mce-multiline{padding:4px}.mce-textbox.mce-disabled{color:#adadad}.mce-rtl .mce-textbox{text-align:right;direction:rtl}.mce-throbber{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;filter:alpha(opacity=60);zoom:1;background:#fff url('img/loader.gif') no-repeat center center}.mce-throbber-inline{position:static;height:50px}@font-face{fo
nt-family:'tinymce';src:url('fonts/tinymce.eot');src:url('fonts/tinymce.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce.woff') format('woff'),url('fonts/tinymce.ttf') format('truetype'),url('fonts/tinymce.svg#tinymce') format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'tinymce-small';src:url('fonts/tinymce-small.eot');src:url('fonts/tinymce-small.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce-small.woff') format('woff'),url('fonts/tinymce-small.ttf') format('truetype'),url('fonts/tinymce-small.svg#tinymce') format('svg');font-weight:normal;font-style:normal}.mce-ico{font-family:'tinymce',Arial;font-style:normal;font-weight:normal;font-variant:normal;font-size:16px;line-height:16px;speak:none;vertical-align:text-top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;background:transparent center center;background-size:cover;width:16px;height:16px;color:#333}.mce-btn-small .mce-ico{font-family:'tin
ymce-small',Arial}.mce-i-save:before{content:"\e000"}.mce-i-newdocument:before{content:"\e001"}.mce-i-fullpage:before{content:"\e002"}.mce-i-alignleft:before{content:"\e003"}.mce-i-aligncenter:before{content:"\e004"}.mce-i-alignright:before{content:"\e005"}.mce-i-alignjustify:before{content:"\e006"}.mce-i-cut:before{content:"\e007"}.mce-i-paste:before{content:"\e008"}.mce-i-searchreplace:before{content:"\e009"}.mce-i-bullist:before{content:"\e00a"}.mce-i-numlist:before{content:"\e00b"}.mce-i-indent:before{content:"\e00c"}.mce-i-outdent:before{content:"\e00d"}.mce-i-blockquote:before{content:"\e00e"}.mce-i-undo:before{content:"\e00f"}.mce-i-redo:before{content:"\e010"}.mce-i-link:before{content:"\e011"}.mce-i-unlink:before{content:"\e012"}.mce-i-anchor:before{content:"\e013"}.mce-i-image
:before{content:"\e014"}.mce-i-media:before{content:"\e015"}.mce-i-help:before{content:"\e016"}.mce-i-code:before{content:"\e017"}.mce-i-insertdatetime:before{content:"\e018"}.mce-i-preview:before{content:"\e019"}.mce-i-forecolor:before{content:"\e01a"}.mce-i-backcolor:before{content:"\e01a"}.mce-i-table:before{content:"\e01b"}.mce-i-hr:before{content:"\e01c"}.mce-i-removeformat:before{content:"\e01d"}.mce-i-subscript:before{content:"\e01e"}.mce-i-superscript:before{content:"\e01f"}.mce-i-charmap:before{content:"\e020"}.mce-i-emoticons:before{content:"\e021"}.mce-i-print:before{content:"\e022"}.mce-i-fullscreen:before{content:"\e023"}.mce-i-spellchecker:before{content:"\e024"}.mce-i-nonbreaking:before{content:"\e025"}.mce-i-template:before{content:"\e026"}.mce-i-pagebreak:before{content
:"\e027"}.mce-i-restoredraft:before{content:"\e028"}.mce-i-untitled:before{content:"\e029"}.mce-i-bold:before{content:"\e02a"}.mce-i-italic:before{content:"\e02b"}.mce-i-underline:before{content:"\e02c"}.mce-i-strikethrough:before{content:"\e02d"}.mce-i-visualchars:before{content:"\e02e"}.mce-i-visualblocks:before{content:"\e02e"}.mce-i-ltr:before{content:"\e02f"}.mce-i-rtl:before{content:"\e030"}.mce-i-copy:before{content:"\e031"}.mce-i-resize:before{content:"\e032"}.mce-i-browse:before{content:"\e034"}.mce-i-pastetext:before{content:"\e035"}.mce-i-checkbox:before,.mce-i-selected:before{content:"\e033"}.mce-i-selected{visibility:hidden}i.mce-i-backcolor{text-shadow:none;background:#bbb}
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunksrcwpincludesjstinymcethemesmodernthemejs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/js/tinymce/themes/modern/theme.js (29202 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/js/tinymce/themes/modern/theme.js 2014-07-17 00:49:11 UTC (rev 29202)
+++ trunk/src/wp-includes/js/tinymce/themes/modern/theme.js 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -342,13 +342,13 @@
</span><span class="cx"> width = Math.max(settings.min_width || 100, width);
</span><span class="cx"> width = Math.min(settings.max_width || 0xFFFF, width);
</span><span class="cx">
</span><del>- DOM.css(containerElm, 'width', width + (containerSize.width - iframeSize.width));
- DOM.css(iframeElm, 'width', width);
</del><ins>+ DOM.setStyle(containerElm, 'width', width + (containerSize.width - iframeSize.width));
+ DOM.setStyle(iframeElm, 'width', width);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> height = Math.max(settings.min_height || 100, height);
</span><span class="cx"> height = Math.min(settings.max_height || 0xFFFF, height);
</span><del>- DOM.css(iframeElm, 'height', height);
</del><ins>+ DOM.setStyle(iframeElm, 'height', height);
</ins><span class="cx">
</span><span class="cx"> editor.fire('ResizeEditor');
</span><span class="cx"> }
</span><span class="lines">@@ -383,7 +383,7 @@
</span><span class="cx"> deltaY = Math.max(0, scrollContainerPos.y - bodyPos.y);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- panel.fixed(false).moveRel(body, editor.rtl ? ['tr-br', 'br-tr'] : ['tl-bl', 'bl-tl']).moveBy(deltaX, deltaY);
</del><ins>+ panel.fixed(false).moveRel(body, editor.rtl ? ['tr-br', 'br-tr'] : ['tl-bl', 'bl-tl', 'tr-br']).moveBy(deltaX, deltaY);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunksrcwpincludesjstinymcethemesmodernthememinjs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/js/tinymce/themes/modern/theme.min.js (29202 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/js/tinymce/themes/modern/theme.min.js 2014-07-17 00:49:11 UTC (rev 29202)
+++ trunk/src/wp-includes/js/tinymce/themes/modern/theme.min.js 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -1 +1 @@
</span><del>-tinymce.ThemeManager.add("modern",function(e){function t(){function t(t){var n,o=[];if(t)return d(t.split(/[ ,]/),function(t){function i(){var i=e.selection;"bullist"==r&&i.selectorChanged("ul > li",function(e,i){for(var n,o=i.parents.length;o--&&(n=i.parents[o].nodeName,"OL"!=n&&"UL"!=n););t.active(e&&"UL"==n)}),"numlist"==r&&i.selectorChanged("ol > li",function(e,i){for(var n,o=i.parents.length;o--&&(n=i.parents[o].nodeName,"OL"!=n&&"UL"!=n););t.active(e&&"OL"==n)}),t.settings.stateSelector&&i.selectorChanged(t.settings.stateSelector,function(e){t.active(e)},!0),t.settings.disabledStateSelector&&i.selectorChanged(t.settings.disabledStateSelector,function(e){t.disabled(e)})}var r;"|"==t?n=null:c.has(t)?(t={type:t},u.toolbar_items_size&&(t.size=u.toolbar_items_
size),o.push(t),n=null):(n||(n={type:"buttongroup",items:[]},o.push(n)),e.buttons[t]&&(r=t,t=e.buttons[r],"function"==typeof t&&(t=t()),t.type=t.type||"button",u.toolbar_items_size&&(t.size=u.toolbar_items_size),t=c.create(t),n.items.push(t),e.initialized?i():e.on("init",i)))}),i.push({type:"toolbar",layout:"flow",items:o}),!0}var i=[];if(tinymce.isArray(u.toolbar)){if(0===u.toolbar.length)return;tinymce.each(u.toolbar,function(e,t){u["toolbar"+(t+1)]=e}),delete u.toolbar}for(var n=1;10>n&&t(u["toolbar"+n]);n++);return i.length||u.toolbar===!1||t(u.toolbar||f),i.length?{type:"panel",layout:"stack",classes:"toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:i}:void 0}function i(){function t(t){var i;return"|"==t?{text:"|"}:i=e.menuItems[t]}function i(i){var n,o,r,a,s;if(s=tinymce.makeMap((u.removed_menuitems||"").sp
lit(/[ ,]/)),u.menu?(o=u.menu[i],a=!0):o=h[i],o){n={text:o.title},r=[],d((o.items||"").split(/[ ,]/),function(e){var i=t(e);i&&!s[e]&&r.push(t(e))}),a||d(e.menuItems,function(e){e.context==i&&("before"==e.separator&&r.push({text:"|"}),e.prependToContext?r.unshift(e):r.push(e),"after"==e.separator&&r.push({text:"|"}))});for(var l=0;l<r.length;l++)"|"==r[l].text&&(0===l||l==r.length-1)&&r.splice(l,1);if(n.menu=r,!n.menu.length)return null}return n}var n,o=[],r=[];if(u.menu)for(n in u.menu)r.push(n);else for(n in h)r.push(n);for(var a="string"==typeof u.menubar?u.menubar.split(/[ ,]/):r,s=0;s<a.length;s++){var l=a[s];l=i(l),l&&o.push(l)}return o}function n(t){function i(e){var i=t.find(e)[0];i&&i.focus(!0)}e.shortcuts.add("Alt+F9","",function(){i("menubar")}),e.shortcuts.add("Alt+F10","",fun
ction(){i("toolbar")}),e.shortcuts.add("Alt+F11","",function(){i("elementpath")}),t.on("cancel",function(){e.focus()})}function o(t,i){function n(e){return{width:e.clientWidth,height:e.clientHeight}}var o,r,a,s;o=e.getContainer(),r=e.getContentAreaContainer().firstChild,a=n(o),s=n(r),null!==t&&(t=Math.max(u.min_width||100,t),t=Math.min(u.max_width||65535,t),m.css(o,"width",t+(a.width-s.width)),m.css(r,"width",t)),i=Math.max(u.min_height||100,i),i=Math.min(u.max_height||65535,i),m.css(r,"height",i),e.fire("ResizeEditor")}function r(t,i){var n=e.getContentAreaContainer();l.resizeTo(n.clientWidth+t,n.clientHeight+i)}function a(o){function r(){if(h&&h.moveRel&&h.visible()&&!h._fixed){var t=e.selection.getScrollContainer(),i=e.getBody(),n=0,o=0;if(t){var r=m.getPos(i),a=m.getPos(t);n=Math.max(0,a.x-r.x),o=Math.max(0,a.y-r.y)}h.fixed(!1).moveRel(i,e.rtl?["tr-br&qu
ot;,"br-tr"]:["tl-bl","bl-tl"]).moveBy(n,o)}}function a(){h&&(h.show(),r(),m.addClass(e.getBody(),"mce-edit-focus"))}function s(){h&&(h.hide(),m.removeClass(e.getBody(),"mce-edit-focus"))}function d(){return h?void(h.visible()||a()):(h=l.panel=c.create({type:f?"panel":"floatpanel",role:"application",classes:"tinymce tinymce-inline",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!!f,border:1,items:[u.menubar===!1?null:{type:"menubar",border:"0 0 1 0",items:i()},t()]}),e.fire("BeforeRenderUI"),h.renderTo(f||document.body).reflow(),n(h),a(),e.on("nodeChange",r),e.on("activate",a),e.on("deactivate",s),void e.nodeChanged())}var h,f;return u.fixed_toolbar_container&&(f=m.select(u.fixed_toolbar_container)[0]),u.content_editable=!0,e.on("focus",funct
ion(){o.skinUiCss?tinymce.DOM.styleSheetLoader.load(o.skinUiCss,d,d):d()}),e.on("blur hide",s),e.on("remove",function(){h&&(h.remove(),h=null)}),o.skinUiCss&&tinymce.DOM.styleSheetLoader.load(o.skinUiCss),{}}function s(r){var a,s,d;return r.skinUiCss&&tinymce.DOM.loadCSS(r.skinUiCss),a=l.panel=c.create({type:"panel",role:"application",classes:"tinymce",style:"visibility: hidden",layout:"stack",border:1,items:[u.menubar===!1?null:{type:"menubar",border:"0 0 1 0",items:i()},t(),{type:"panel",name:"iframe",layout:"stack",classes:"edit-area",html:"",border:"1 0 0 0"}]}),u.resize!==!1&&(s={type:"resizehandle",direction:u.resize,onResizeStart:function(){var t=e.getContentAreaContainer().firstChild;d={width:t.clientWidth,height:t.clientHeight}},onResize:function(e){"both"==u.resize?o(d.width
+e.deltaX,d.height+e.deltaY):o(null,d.height+e.deltaY)}}),u.statusbar!==!1&&a.add({type:"panel",name:"statusbar",classes:"statusbar",layout:"flow",border:"1 0 0 0",ariaRoot:!0,items:[{type:"elementpath"},s]}),u.readonly&&a.find("*").disabled(!0),e.fire("BeforeRenderUI"),a.renderBefore(r.targetNode).reflow(),u.width&&tinymce.DOM.setStyle(a.getEl(),"width",u.width),e.on("remove",function(){a.remove(),a=null}),n(a),{iframeContainer:a.find("#iframe")[0].getEl(),editorContainer:a.getEl()}}var l=this,u=e.settings,c=tinymce.ui.Factory,d=tinymce.each,m=tinymce.DOM,h={file:{title:"File",items:"newdocument"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall"},insert:{title:"Insert",items:"|"},view:{title:"View",items:"visualaid |"},format:{title:"Format
",items:"bold italic underline strikethrough superscript subscript | formats | removeformat"},table:{title:"Table"},tools:{title:"Tools"}},f="undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image";l.renderUI=function(t){var i=u.skin!==!1?u.skin||"lightgray":!1;if(i){var n=u.skin_url;n=n?e.documentBaseURI.toAbsolute(n):tinymce.baseURL+"/skins/"+i,t.skinUiCss=tinymce.Env.documentMode<=7?n+"/skin.ie7.min.css":n+"/skin.min.css",e.contentCSS.push(n+"/content"+(e.inline?".inline":"")+".min.css")}return e.on("ProgressState",function(e){l.throbber=l.throbber||new tinymce.ui.Throbber(l.panel.getEl("body")),e.state?l.throbber.show(e.time):l.throbber.hide()}),u.inline?a(t):s(t)},l.resizeTo=o,l.resizeBy=r});
</del><span class="cx">\ No newline at end of file
</span><ins>+tinymce.ThemeManager.add("modern",function(e){function t(){function t(t){var n,o=[];if(t)return d(t.split(/[ ,]/),function(t){function i(){var i=e.selection;"bullist"==r&&i.selectorChanged("ul > li",function(e,i){for(var n,o=i.parents.length;o--&&(n=i.parents[o].nodeName,"OL"!=n&&"UL"!=n););t.active(e&&"UL"==n)}),"numlist"==r&&i.selectorChanged("ol > li",function(e,i){for(var n,o=i.parents.length;o--&&(n=i.parents[o].nodeName,"OL"!=n&&"UL"!=n););t.active(e&&"OL"==n)}),t.settings.stateSelector&&i.selectorChanged(t.settings.stateSelector,function(e){t.active(e)},!0),t.settings.disabledStateSelector&&i.selectorChanged(t.settings.disabledStateSelector,function(e){t.disabled(e)})}var r;"|"==t?n=null:c.has(t)?(t={type:t},u.toolbar_items_size&&(t.size=u.toolbar_items_
size),o.push(t),n=null):(n||(n={type:"buttongroup",items:[]},o.push(n)),e.buttons[t]&&(r=t,t=e.buttons[r],"function"==typeof t&&(t=t()),t.type=t.type||"button",u.toolbar_items_size&&(t.size=u.toolbar_items_size),t=c.create(t),n.items.push(t),e.initialized?i():e.on("init",i)))}),i.push({type:"toolbar",layout:"flow",items:o}),!0}var i=[];if(tinymce.isArray(u.toolbar)){if(0===u.toolbar.length)return;tinymce.each(u.toolbar,function(e,t){u["toolbar"+(t+1)]=e}),delete u.toolbar}for(var n=1;10>n&&t(u["toolbar"+n]);n++);return i.length||u.toolbar===!1||t(u.toolbar||f),i.length?{type:"panel",layout:"stack",classes:"toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:i}:void 0}function i(){function t(t){var i;return"|"==t?{text:"|"}:i=e.menuItems[t]}function i(i){var n,o,r,a,s;if(s=tinymce.makeMap((u.removed_menuitems||"").sp
lit(/[ ,]/)),u.menu?(o=u.menu[i],a=!0):o=h[i],o){n={text:o.title},r=[],d((o.items||"").split(/[ ,]/),function(e){var i=t(e);i&&!s[e]&&r.push(t(e))}),a||d(e.menuItems,function(e){e.context==i&&("before"==e.separator&&r.push({text:"|"}),e.prependToContext?r.unshift(e):r.push(e),"after"==e.separator&&r.push({text:"|"}))});for(var l=0;l<r.length;l++)"|"==r[l].text&&(0===l||l==r.length-1)&&r.splice(l,1);if(n.menu=r,!n.menu.length)return null}return n}var n,o=[],r=[];if(u.menu)for(n in u.menu)r.push(n);else for(n in h)r.push(n);for(var a="string"==typeof u.menubar?u.menubar.split(/[ ,]/):r,s=0;s<a.length;s++){var l=a[s];l=i(l),l&&o.push(l)}return o}function n(t){function i(e){var i=t.find(e)[0];i&&i.focus(!0)}e.shortcuts.add("Alt+F9","",function(){i("menubar")}),e.shortcuts.add("Alt+F10","",fun
ction(){i("toolbar")}),e.shortcuts.add("Alt+F11","",function(){i("elementpath")}),t.on("cancel",function(){e.focus()})}function o(t,i){function n(e){return{width:e.clientWidth,height:e.clientHeight}}var o,r,a,s;o=e.getContainer(),r=e.getContentAreaContainer().firstChild,a=n(o),s=n(r),null!==t&&(t=Math.max(u.min_width||100,t),t=Math.min(u.max_width||65535,t),m.setStyle(o,"width",t+(a.width-s.width)),m.setStyle(r,"width",t)),i=Math.max(u.min_height||100,i),i=Math.min(u.max_height||65535,i),m.setStyle(r,"height",i),e.fire("ResizeEditor")}function r(t,i){var n=e.getContentAreaContainer();l.resizeTo(n.clientWidth+t,n.clientHeight+i)}function a(o){function r(){if(h&&h.moveRel&&h.visible()&&!h._fixed){var t=e.selection.getScrollContainer(),i=e.getBody(),n=0,o=0;if(t){var r=m.getPos(i),a=m.getPos(t);n=Math.max(0,a.x-r.x),o=Math.max(0,a.y-r.y)}h.fixed(!1).moveRel(i,e.rtl?
["tr-br","br-tr"]:["tl-bl","bl-tl","tr-br"]).moveBy(n,o)}}function a(){h&&(h.show(),r(),m.addClass(e.getBody(),"mce-edit-focus"))}function s(){h&&(h.hide(),m.removeClass(e.getBody(),"mce-edit-focus"))}function d(){return h?void(h.visible()||a()):(h=l.panel=c.create({type:f?"panel":"floatpanel",role:"application",classes:"tinymce tinymce-inline",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!!f,border:1,items:[u.menubar===!1?null:{type:"menubar",border:"0 0 1 0",items:i()},t()]}),e.fire("BeforeRenderUI"),h.renderTo(f||document.body).reflow(),n(h),a(),e.on("nodeChange",r),e.on("activate",a),e.on("deactivate",s),void e.nodeChanged())}var h,f;return u.fixed_toolbar_container&&(f=m.select(u.fixed_toolbar_container)[0]),u.content_editabl
e=!0,e.on("focus",function(){o.skinUiCss?tinymce.DOM.styleSheetLoader.load(o.skinUiCss,d,d):d()}),e.on("blur hide",s),e.on("remove",function(){h&&(h.remove(),h=null)}),o.skinUiCss&&tinymce.DOM.styleSheetLoader.load(o.skinUiCss),{}}function s(r){var a,s,d;return r.skinUiCss&&tinymce.DOM.loadCSS(r.skinUiCss),a=l.panel=c.create({type:"panel",role:"application",classes:"tinymce",style:"visibility: hidden",layout:"stack",border:1,items:[u.menubar===!1?null:{type:"menubar",border:"0 0 1 0",items:i()},t(),{type:"panel",name:"iframe",layout:"stack",classes:"edit-area",html:"",border:"1 0 0 0"}]}),u.resize!==!1&&(s={type:"resizehandle",direction:u.resize,onResizeStart:function(){var t=e.getContentAreaContainer().firstChild;d={width:t.clientWidth,height:t.clientHeight}},onResize:function(e){&qu
ot;both"==u.resize?o(d.width+e.deltaX,d.height+e.deltaY):o(null,d.height+e.deltaY)}}),u.statusbar!==!1&&a.add({type:"panel",name:"statusbar",classes:"statusbar",layout:"flow",border:"1 0 0 0",ariaRoot:!0,items:[{type:"elementpath"},s]}),u.readonly&&a.find("*").disabled(!0),e.fire("BeforeRenderUI"),a.renderBefore(r.targetNode).reflow(),u.width&&tinymce.DOM.setStyle(a.getEl(),"width",u.width),e.on("remove",function(){a.remove(),a=null}),n(a),{iframeContainer:a.find("#iframe")[0].getEl(),editorContainer:a.getEl()}}var l=this,u=e.settings,c=tinymce.ui.Factory,d=tinymce.each,m=tinymce.DOM,h={file:{title:"File",items:"newdocument"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall"},insert:{title:"Insert",items:"|"},view:{title:"View",items:"visualaid |&
quot;},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript | formats | removeformat"},table:{title:"Table"},tools:{title:"Tools"}},f="undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image";l.renderUI=function(t){var i=u.skin!==!1?u.skin||"lightgray":!1;if(i){var n=u.skin_url;n=n?e.documentBaseURI.toAbsolute(n):tinymce.baseURL+"/skins/"+i,t.skinUiCss=tinymce.Env.documentMode<=7?n+"/skin.ie7.min.css":n+"/skin.min.css",e.contentCSS.push(n+"/content"+(e.inline?".inline":"")+".min.css")}return e.on("ProgressState",function(e){l.throbber=l.throbber||new tinymce.ui.Throbber(l.panel.getEl("body")),e.state?l.throbber.show(e.time):l.throbber.hide()}),u.inline?a(t):s(t)},l.resizeTo=o,l.resizeBy=r});
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunksrcwpincludesjstinymcetinymcejs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/js/tinymce/tinymce.js (29202 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/js/tinymce/tinymce.js 2014-07-17 00:49:11 UTC (rev 29202)
+++ trunk/src/wp-includes/js/tinymce/tinymce.js 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-// 4.0.29 (2014-06-xx)
</del><ins>+// 4.1.2 (2014-07-15)
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Compiled inline version. (Library mode)
</span><span class="lines">@@ -662,24 +662,31 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> /*jshint bitwise:false, expr:true, noempty:false, sub:true, eqnull:true, latedef:false, maxlen:255 */
</span><del>-/*eslint dot-notation:0, no-empty:0, no-cond-assign:0, no-unused-expressions:0, new-cap:0, no-nested-ternary:0, func-style:0, no-bitwise:0, max-len:0, brace-style:0 */
</del><ins>+/*eslint dot-notation:0, no-empty:0, no-cond-assign:0, no-unused-expressions:0, new-cap:0 */
+/*eslint no-nested-ternary:0, func-style:0, no-bitwise:0, max-len:0, brace-style:0, no-return-assign:0 */
</ins><span class="cx">
</span><del>-/*
- * Sizzle CSS Selector Engine
- * Copyright, The Dojo Foundation
- * Released under the MIT, BSD, and GPL Licenses.
- * More information: http://sizzlejs.com/
</del><ins>+/**
+ * Sizzle CSS Selector Engine v@VERSION
+ * http://sizzlejs.com/
+ *
+ * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: @DATE
</ins><span class="cx"> */
</span><span class="cx"> define("tinymce/dom/Sizzle", [], function() {
</span><span class="cx"> var i,
</span><del>- cachedruns,
</del><ins>+ support,
</ins><span class="cx"> Expr,
</span><span class="cx"> getText,
</span><span class="cx"> isXML,
</span><ins>+ tokenize,
</ins><span class="cx"> compile,
</span><ins>+ select,
</ins><span class="cx"> outermostContext,
</span><del>- recompare,
</del><span class="cx"> sortInput,
</span><ins>+ hasDuplicate,
</ins><span class="cx">
</span><span class="cx"> // Local document vars
</span><span class="cx"> setDocument,
</span><span class="lines">@@ -694,20 +701,24 @@
</span><span class="cx"> // Instance-specific data
</span><span class="cx"> expando = "sizzle" + -(new Date()),
</span><span class="cx"> preferredDoc = window.document,
</span><del>- support = {},
</del><span class="cx"> dirruns = 0,
</span><span class="cx"> done = 0,
</span><span class="cx"> classCache = createCache(),
</span><span class="cx"> tokenCache = createCache(),
</span><span class="cx"> compilerCache = createCache(),
</span><del>- hasDuplicate = false,
- sortOrder = function() { return 0; },
</del><ins>+ sortOrder = function( a, b ) {
+ if ( a === b ) {
+ hasDuplicate = true;
+ }
+ return 0;
+ },
</ins><span class="cx">
</span><span class="cx"> // General-purpose constants
</span><span class="cx"> strundefined = typeof undefined,
</span><span class="cx"> MAX_NEGATIVE = 1 << 31,
</span><span class="cx">
</span><del>- // Array methods
</del><ins>+ // Instance methods
+ hasOwn = ({}).hasOwnProperty,
</ins><span class="cx"> arr = [],
</span><span class="cx"> pop = arr.pop,
</span><span class="cx"> push_native = arr.push,
</span><span class="lines">@@ -725,78 +736,83 @@
</span><span class="cx"> return -1;
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
</ins><span class="cx">
</span><span class="cx"> // Regular expressions
</span><span class="cx">
</span><del>- // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
</del><ins>+ // http://www.w3.org/TR/css3-selectors/#whitespace
</ins><span class="cx"> whitespace = "[\\x20\\t\\r\\n\\f]",
</span><del>- // http://www.w3.org/TR/css3-syntax/#characters
- characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
</del><span class="cx">
</span><del>- // Loosely modeled on CSS identifier characters
- // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
- // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
- identifier = characterEncoding.replace( "w", "w#" ),
</del><ins>+ // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+ identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
</ins><span class="cx">
</span><del>- // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
- operators = "([*^$|!~]?=)",
- attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
- "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
</del><ins>+ // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
+ attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
+ // Operator (capture 2)
+ "*([*^$|!~]?=)" + whitespace +
+ // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
+ "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
+ "*\\]",
</ins><span class="cx">
</span><del>- // Prefer arguments quoted,
- // then not containing pseudos/brackets,
- // then attribute selectors/non-parenthetical expressions,
- // then anything else
- // These preferences are here to reduce the number of selectors
- // needing tokenize in the PSEUDO preFilter
- pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)",
</del><ins>+ pseudos = ":(" + identifier + ")(?:\\((" +
+ // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
+ // 1. quoted (capture 3; capture 4 or capture 5)
+ "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
+ // 2. simple (capture 6)
+ "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
+ // 3. anything else (capture 2)
+ ".*" +
+ ")\\)|)",
</ins><span class="cx">
</span><span class="cx"> // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
</span><span class="cx"> rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
</span><span class="cx">
</span><span class="cx"> rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
</span><del>- rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ),
</del><ins>+ rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
+
+ rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
+
</ins><span class="cx"> rpseudo = new RegExp( pseudos ),
</span><span class="cx"> ridentifier = new RegExp( "^" + identifier + "$" ),
</span><span class="cx">
</span><span class="cx"> matchExpr = {
</span><del>- "ID": new RegExp( "^#(" + characterEncoding + ")" ),
- "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
- "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ),
- "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
</del><ins>+ "ID": new RegExp( "^#(" + identifier + ")" ),
+ "CLASS": new RegExp( "^\\.(" + identifier + ")" ),
+ "TAG": new RegExp( "^(" + identifier + "|[*])" ),
</ins><span class="cx"> "ATTR": new RegExp( "^" + attributes ),
</span><span class="cx"> "PSEUDO": new RegExp( "^" + pseudos ),
</span><span class="cx"> "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
</span><span class="cx"> "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
</span><span class="cx"> "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
</span><ins>+ "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
</ins><span class="cx"> // For use in libraries implementing .is()
</span><span class="cx"> // We use this for POS matching in `select`
</span><span class="cx"> "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
</span><span class="cx"> whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
</span><span class="cx"> },
</span><span class="cx">
</span><del>- rsibling = /[\x20\t\r\n\f]*[+~]/,
</del><ins>+ rinputs = /^(?:input|select|textarea|button)$/i,
+ rheader = /^h\d$/i,
</ins><span class="cx">
</span><del>- rnative = /^[^{]+\{\s*\[native code/,
</del><ins>+ rnative = /^[^{]+\{\s*\[native \w/,
</ins><span class="cx">
</span><span class="cx"> // Easily-parseable/retrievable ID or TAG or CLASS selectors
</span><del>- rquickExpr = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,
</del><ins>+ rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
</ins><span class="cx">
</span><del>- rinputs = /^(?:input|select|textarea|button)$/i,
- rheader = /^h\d$/i,
-
</del><ins>+ rsibling = /[+~]/,
</ins><span class="cx"> rescape = /'|\\/g,
</span><del>- rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,
</del><span class="cx">
</span><span class="cx"> // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
</span><del>- runescape = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,
- funescape = function( _, escaped ) {
</del><ins>+ runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
+ funescape = function( _, escaped, escapedWhitespace ) {
</ins><span class="cx"> var high = "0x" + escaped - 0x10000;
</span><span class="cx"> // NaN means non-codepoint
</span><del>- return high !== high ?
</del><ins>+ // Support: Firefox<24
+ // Workaround erroneous numeric interpretation of +"0x"
+ return high !== high || escapedWhitespace ?
</ins><span class="cx"> escaped :
</span><del>- // BMP codepoint
</del><span class="cx"> high < 0 ?
</span><ins>+ // BMP codepoint
</ins><span class="cx"> String.fromCharCode( high + 0x10000 ) :
</span><span class="cx"> // Supplemental Plane codepoint (surrogate pair)
</span><span class="cx"> String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
</span><span class="lines">@@ -831,63 +847,6 @@
</span><span class="cx"> };
</span><span class="cx"> }
</span><span class="cx">
</span><del>-/**
- * For feature detection
- * @param {Function} fn The function to test for native support
- */
-function isNative( fn ) {
- return rnative.test( fn + "" );
-}
-
-/**
- * Create key-value caches of limited size
- * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
- * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
- * deleting the oldest entry
- */
-function createCache() {
- var cache,
- keys = [];
-
- cache = function( key, value ) {
- // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
- if ( keys.push( key += " " ) > Expr.cacheLength ) {
- // Only keep the most recent entries
- delete cache[ keys.shift() ];
- }
- cache[ key ] = value;
- return value;
- };
-
- return cache;
-}
-
-/**
- * Mark a function for special use by Sizzle
- * @param {Function} fn The function to mark
- */
-function markFunction( fn ) {
- fn[ expando ] = true;
- return fn;
-}
-
-/**
- * Support testing using an element
- * @param {Function} fn Passed the created div and expects a boolean result
- */
-function assert( fn ) {
- var div = document.createElement("div");
-
- try {
- return !!fn( div );
- } catch (e) {
- return false;
- } finally {
- // release memory in IE
- div = null;
- }
-}
-
</del><span class="cx"> function Sizzle( selector, context, results, seed ) {
</span><span class="cx"> var match, elem, m, nodeType,
</span><span class="cx"> // QSA vars
</span><span class="lines">@@ -917,7 +876,7 @@
</span><span class="cx"> if ( nodeType === 9 ) {
</span><span class="cx"> elem = context.getElementById( m );
</span><span class="cx"> // Check parentNode to catch when Blackberry 4.6 returns
</span><del>- // nodes that are no longer in the document #6963
</del><ins>+ // nodes that are no longer in the document (jQuery #6963)
</ins><span class="cx"> if ( elem && elem.parentNode ) {
</span><span class="cx"> // Handle the case where IE, Opera, and Webkit return items
</span><span class="cx"> // by name instead of ID
</span><span class="lines">@@ -943,16 +902,15 @@
</span><span class="cx"> return results;
</span><span class="cx">
</span><span class="cx"> // Speed-up: Sizzle(".CLASS")
</span><del>- } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {
</del><ins>+ } else if ( (m = match[3]) && support.getElementsByClassName ) {
</ins><span class="cx"> push.apply( results, context.getElementsByClassName( m ) );
</span><span class="cx"> return results;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // QSA path
</span><del>- if ( support.qsa && !rbuggyQSA.test(selector) ) {
- old = true;
- nid = expando;
</del><ins>+ if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
+ nid = old = expando;
</ins><span class="cx"> newContext = context;
</span><span class="cx"> newSelector = nodeType === 9 && selector;
</span><span class="cx">
</span><span class="lines">@@ -974,7 +932,7 @@
</span><span class="cx"> while ( i-- ) {
</span><span class="cx"> groups[i] = nid + toSelector( groups[i] );
</span><span class="cx"> }
</span><del>- newContext = rsibling.test( selector ) && context.parentNode || context;
</del><ins>+ newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context;
</ins><span class="cx"> newSelector = groups.join(",");
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -999,8 +957,158 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Detect xml
</del><ins>+ * Create key-value caches of limited size
+ * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
+ * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
+ * deleting the oldest entry
+ */
+function createCache() {
+ var keys = [];
+
+ function cache( key, value ) {
+ // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
+ if ( keys.push( key + " " ) > Expr.cacheLength ) {
+ // Only keep the most recent entries
+ delete cache[ keys.shift() ];
+ }
+ return (cache[ key + " " ] = value);
+ }
+ return cache;
+}
+
+/**
+ * Mark a function for special use by Sizzle
+ * @param {Function} fn The function to mark
+ */
+function markFunction( fn ) {
+ fn[ expando ] = true;
+ return fn;
+}
+
+/**
+ * Support testing using an element
+ * @param {Function} fn Passed the created div and expects a boolean result
+ */
+function assert( fn ) {
+ var div = document.createElement("div");
+
+ try {
+ return !!fn( div );
+ } catch (e) {
+ return false;
+ } finally {
+ // Remove from its parent by default
+ if ( div.parentNode ) {
+ div.parentNode.removeChild( div );
+ }
+ // release memory in IE
+ div = null;
+ }
+}
+
+/**
+ * Adds the same handler for all of the specified attrs
+ * @param {String} attrs Pipe-separated list of attributes
+ * @param {Function} handler The method that will be applied
+ */
+function addHandle( attrs, handler ) {
+ var arr = attrs.split("|"),
+ i = attrs.length;
+
+ while ( i-- ) {
+ Expr.attrHandle[ arr[i] ] = handler;
+ }
+}
+
+/**
+ * Checks document order of two siblings
+ * @param {Element} a
+ * @param {Element} b
+ * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
+ */
+function siblingCheck( a, b ) {
+ var cur = b && a,
+ diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
+ ( ~b.sourceIndex || MAX_NEGATIVE ) -
+ ( ~a.sourceIndex || MAX_NEGATIVE );
+
+ // Use IE sourceIndex if available on both nodes
+ if ( diff ) {
+ return diff;
+ }
+
+ // Check if b follows a
+ if ( cur ) {
+ while ( (cur = cur.nextSibling) ) {
+ if ( cur === b ) {
+ return -1;
+ }
+ }
+ }
+
+ return a ? 1 : -1;
+}
+
+/**
+ * Returns a function to use in pseudos for input types
+ * @param {String} type
+ */
+function createInputPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === type;
+ };
+}
+
+/**
+ * Returns a function to use in pseudos for buttons
+ * @param {String} type
+ */
+function createButtonPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return (name === "input" || name === "button") && elem.type === type;
+ };
+}
+
+/**
+ * Returns a function to use in pseudos for positionals
+ * @param {Function} fn
+ */
+function createPositionalPseudo( fn ) {
+ return markFunction(function( argument ) {
+ argument = +argument;
+ return markFunction(function( seed, matches ) {
+ var j,
+ matchIndexes = fn( [], seed.length, argument ),
+ i = matchIndexes.length;
+
+ // Match elements found at the specified indexes
+ while ( i-- ) {
+ if ( seed[ (j = matchIndexes[i]) ] ) {
+ seed[j] = !(matches[j] = seed[j]);
+ }
+ }
+ });
+ });
+}
+
+/**
+ * Checks a node for validity as a Sizzle context
+ * @param {Element|Object=} context
+ * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
+ */
+function testContext( context ) {
+ return context && typeof context.getElementsByTagName !== strundefined && context;
+}
+
+// Expose support vars for convenience
+support = Sizzle.support = {};
+
+/**
+ * Detects XML nodes
</ins><span class="cx"> * @param {Element|Object} elem An element or a document
</span><ins>+ * @returns {Boolean} True iff elem is a non-HTML XML node
</ins><span class="cx"> */
</span><span class="cx"> isXML = Sizzle.isXML = function( elem ) {
</span><span class="cx"> // documentElement is verified for cases where it doesn't yet exist
</span><span class="lines">@@ -1015,7 +1123,9 @@
</span><span class="cx"> * @returns {Object} Returns the current document
</span><span class="cx"> */
</span><span class="cx"> setDocument = Sizzle.setDocument = function( node ) {
</span><del>- var doc = node ? node.ownerDocument || node : preferredDoc;
</del><ins>+ var hasCompare,
+ doc = node ? node.ownerDocument || node : preferredDoc,
+ parent = doc.defaultView;
</ins><span class="cx">
</span><span class="cx"> // If no document and documentElement is available, return
</span><span class="cx"> if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
</span><span class="lines">@@ -1029,90 +1139,62 @@
</span><span class="cx"> // Support tests
</span><span class="cx"> documentIsHTML = !isXML( doc );
</span><span class="cx">
</span><del>- // Check if getElementsByTagName("*") returns only elements
- support.getElementsByTagName = assert(function( div ) {
- div.appendChild( doc.createComment("") );
- return !div.getElementsByTagName("*").length;
- });
</del><ins>+ // Support: IE>8
+ // If iframe document is assigned to "document" variable and if iframe has been reloaded,
+ // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
+ // IE6-8 do not support the defaultView property so parent will be undefined
+ if ( parent && parent !== parent.top ) {
+ // IE11 does not have attachEvent, so all must suffer
+ if ( parent.addEventListener ) {
+ parent.addEventListener( "unload", function() {
+ setDocument();
+ }, false );
+ } else if ( parent.attachEvent ) {
+ parent.attachEvent( "onunload", function() {
+ setDocument();
+ });
+ }
+ }
</ins><span class="cx">
</span><del>- // Check if attributes should be retrieved by attribute nodes
</del><ins>+ /* Attributes
+ ---------------------------------------------------------------------- */
+
+ // Support: IE<8
+ // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)
</ins><span class="cx"> support.attributes = assert(function( div ) {
</span><del>- div.innerHTML = "<select></select>";
- var type = typeof div.lastChild.getAttribute("multiple");
- // IE8 returns a string for some attributes even when not present
- return type !== "boolean" && type !== "string";
</del><ins>+ div.className = "i";
+ return !div.getAttribute("className");
</ins><span class="cx"> });
</span><span class="cx">
</span><del>- // Check if getElementsByClassName can be trusted
- support.getElementsByClassName = assert(function( div ) {
- // Opera can't find a second classname (in 9.6)
- div.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>";
- if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) {
- return false;
- }
</del><ins>+ /* getElement(s)By*
+ ---------------------------------------------------------------------- */
</ins><span class="cx">
</span><del>- // Safari 3.2 caches class attributes and doesn't catch changes
- div.lastChild.className = "e";
- return div.getElementsByClassName("e").length === 2;
</del><ins>+ // Check if getElementsByTagName("*") returns only elements
+ support.getElementsByTagName = assert(function( div ) {
+ div.appendChild( doc.createComment("") );
+ return !div.getElementsByTagName("*").length;
</ins><span class="cx"> });
</span><span class="cx">
</span><del>- // Check if getElementsByName privileges form controls or returns elements by ID
- // If so, assume (for broader support) that getElementById returns elements by name
- support.getByName = assert(function( div ) {
- // Inject content
- div.id = expando + 0;
- // Support: Windows 8 Native Apps
- // Assigning innerHTML with "name" attributes throws uncatchable exceptions
- // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx
- div.appendChild( document.createElement("a") ).setAttribute( "name", expando );
- div.appendChild( document.createElement("i") ).setAttribute( "name", expando );
- docElem.appendChild( div );
</del><ins>+ // Support: IE<9
+ support.getElementsByClassName = rnative.test( doc.getElementsByClassName );
</ins><span class="cx">
</span><del>- // Test
- var pass = doc.getElementsByName &&
- // buggy browsers will return fewer than the correct 2
- doc.getElementsByName( expando ).length === 2 +
- // buggy browsers will return more than the correct 0
- doc.getElementsByName( expando + 0 ).length;
-
- // Cleanup
- docElem.removeChild( div );
-
- return pass;
</del><ins>+ // Support: IE<10
+ // Check if getElementById returns elements by name
+ // The broken getElementById methods don't pick up programatically-set names,
+ // so use a roundabout getElementsByName test
+ support.getById = assert(function( div ) {
+ docElem.appendChild( div ).id = expando;
+ return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
</ins><span class="cx"> });
</span><span class="cx">
</span><del>- // Support: Webkit<537.32
- // Detached nodes confoundingly follow *each other*
- support.sortDetached = assert(function( div1 ) {
- return div1.compareDocumentPosition &&
- // Should return 1, but Webkit returns 4 (following)
- (div1.compareDocumentPosition( document.createElement("div") ) & 1);
- });
-
- // IE6/7 return modified attributes
- Expr.attrHandle = assert(function( div ) {
- div.innerHTML = "<a href='#'></a>";
- return div.firstChild && typeof div.firstChild.getAttribute !== strundefined &&
- div.firstChild.getAttribute("href") === "#";
- }) ?
- {} :
- {
- "href": function( elem ) {
- return elem.getAttribute( "href", 2 );
- },
- "type": function( elem ) {
- return elem.getAttribute("type");
- }
- };
-
</del><span class="cx"> // ID find and filter
</span><del>- if ( support.getByName ) {
</del><ins>+ if ( support.getById ) {
</ins><span class="cx"> Expr.find["ID"] = function( id, context ) {
</span><span class="cx"> if ( typeof context.getElementById !== strundefined && documentIsHTML ) {
</span><span class="cx"> var m = context.getElementById( id );
</span><span class="cx"> // Check parentNode to catch when Blackberry 4.6 returns
</span><span class="cx"> // nodes that are no longer in the document #6963
</span><del>- return m && m.parentNode ? [m] : [];
</del><ins>+ return m && m.parentNode ? [ m ] : [];
</ins><span class="cx"> }
</span><span class="cx"> };
</span><span class="cx"> Expr.filter["ID"] = function( id ) {
</span><span class="lines">@@ -1122,17 +1204,10 @@
</span><span class="cx"> };
</span><span class="cx"> };
</span><span class="cx"> } else {
</span><del>- Expr.find["ID"] = function( id, context ) {
- if ( typeof context.getElementById !== strundefined && documentIsHTML ) {
- var m = context.getElementById( id );
</del><ins>+ // Support: IE6/7
+ // getElementById is not reliable as a find shortcut
+ delete Expr.find["ID"];
</ins><span class="cx">
</span><del>- return m ?
- m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ?
- [m] :
- undefined :
- [];
- }
- };
</del><span class="cx"> Expr.filter["ID"] = function( id ) {
</span><span class="cx"> var attrId = id.replace( runescape, funescape );
</span><span class="cx"> return function( elem ) {
</span><span class="lines">@@ -1168,31 +1243,29 @@
</span><span class="cx"> return results;
</span><span class="cx"> };
</span><span class="cx">
</span><del>- // Name
- Expr.find["NAME"] = support.getByName && function( tag, context ) {
- if ( typeof context.getElementsByName !== strundefined ) {
- return context.getElementsByName( name );
- }
- };
-
</del><span class="cx"> // Class
</span><span class="cx"> Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
</span><del>- if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {
</del><ins>+ if ( documentIsHTML ) {
</ins><span class="cx"> return context.getElementsByClassName( className );
</span><span class="cx"> }
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+ /* QSA/matchesSelector
+ ---------------------------------------------------------------------- */
+
</ins><span class="cx"> // QSA and matchesSelector support
</span><span class="cx">
</span><span class="cx"> // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
</span><span class="cx"> rbuggyMatches = [];
</span><span class="cx">
</span><del>- // qSa(:focus) reports false when true (Chrome 21),
- // no need to also add to buggyMatches since matches checks buggyQSA
- // A support test would require too much code (would include document ready)
- rbuggyQSA = [ ":focus" ];
</del><ins>+ // qSa(:focus) reports false when true (Chrome 21)
+ // We allow this because of a bug in IE8/9 that throws an error
+ // whenever `document.activeElement` is accessed on an iframe
+ // So, we allow :focus to pass through QSA all the time to avoid the IE error
+ // See http://bugs.jquery.com/ticket/13378
+ rbuggyQSA = [];
</ins><span class="cx">
</span><del>- if ( (support.qsa = isNative(doc.querySelectorAll)) ) {
</del><ins>+ if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
</ins><span class="cx"> // Build QSA regex
</span><span class="cx"> // Regex strategy adopted from Diego Perini
</span><span class="cx"> assert(function( div ) {
</span><span class="lines">@@ -1201,11 +1274,20 @@
</span><span class="cx"> // setting a boolean content attribute,
</span><span class="cx"> // since its presence should be enough
</span><span class="cx"> // http://bugs.jquery.com/ticket/12359
</span><del>- div.innerHTML = "<select><option selected=''></option></select>";
</del><ins>+ div.innerHTML = "<select msallowcapture=''><option selected=''></option></select>";
</ins><span class="cx">
</span><del>- // IE8 - Some boolean attributes are not treated correctly
</del><ins>+ // Support: IE8, Opera 11-12.16
+ // Nothing should be selected when empty strings follow ^= or $= or *=
+ // The test attribute must be unknown in Opera but "safe" for WinRT
+ // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
+ if ( div.querySelectorAll("[msallowcapture^='']").length ) {
+ rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
+ }
+
+ // Support: IE8
+ // Boolean attributes and "value" are not treated correctly
</ins><span class="cx"> if ( !div.querySelectorAll("[selected]").length ) {
</span><del>- rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" );
</del><ins>+ rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Webkit/Opera - :checked should return selected option elements
</span><span class="lines">@@ -1217,12 +1299,16 @@
</span><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> assert(function( div ) {
</span><ins>+ // Support: Windows 8 Native Apps
+ // The type and name attributes are restricted during .innerHTML assignment
+ var input = doc.createElement("input");
+ input.setAttribute( "type", "hidden" );
+ div.appendChild( input ).setAttribute( "name", "D" );
</ins><span class="cx">
</span><del>- // Opera 10-12/IE8 - ^= $= *= and empty values
- // Should not select anything
- div.innerHTML = "<input type='hidden' i=''/>";
- if ( div.querySelectorAll("[i^='']").length ) {
- rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" );
</del><ins>+ // Support: IE8
+ // Enforce case-sensitivity of name attribute
+ if ( div.querySelectorAll("[name=d]").length ) {
+ rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
</span><span class="lines">@@ -1237,9 +1323,9 @@
</span><span class="cx"> });
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if ( (support.matchesSelector = isNative( (matches = docElem.matchesSelector ||
</del><ins>+ if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
+ docElem.webkitMatchesSelector ||
</ins><span class="cx"> docElem.mozMatchesSelector ||
</span><del>- docElem.webkitMatchesSelector ||
</del><span class="cx"> docElem.oMatchesSelector ||
</span><span class="cx"> docElem.msMatchesSelector) )) ) {
</span><span class="cx">
</span><span class="lines">@@ -1255,13 +1341,17 @@
</span><span class="cx"> });
</span><span class="cx"> }
</span><span class="cx">
</span><del>- rbuggyQSA = new RegExp( rbuggyQSA.join("|") );
</del><ins>+ rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
</ins><span class="cx"> rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
</span><span class="cx">
</span><ins>+ /* Contains
+ ---------------------------------------------------------------------- */
+ hasCompare = rnative.test( docElem.compareDocumentPosition );
+
</ins><span class="cx"> // Element contains another
</span><del>- // Purposefully does not implement inclusive descendant
</del><ins>+ // Purposefully does not implement inclusive descendent
</ins><span class="cx"> // As in, an element does not contain itself
</span><del>- contains = isNative(docElem.contains) || docElem.compareDocumentPosition ?
</del><ins>+ contains = hasCompare || rnative.test( docElem.contains ) ?
</ins><span class="cx"> function( a, b ) {
</span><span class="cx"> var adown = a.nodeType === 9 ? a.documentElement : a,
</span><span class="cx"> bup = b && b.parentNode;
</span><span class="lines">@@ -1282,8 +1372,11 @@
</span><span class="cx"> return false;
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+ /* Sorting
+ ---------------------------------------------------------------------- */
+
</ins><span class="cx"> // Document order sorting
</span><del>- sortOrder = docElem.compareDocumentPosition ?
</del><ins>+ sortOrder = hasCompare ?
</ins><span class="cx"> function( a, b ) {
</span><span class="cx">
</span><span class="cx"> // Flag for duplicate removal
</span><span class="lines">@@ -1292,34 +1385,46 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b );
-
</del><ins>+ // Sort on method existence if only one input has compareDocumentPosition
+ var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
</ins><span class="cx"> if ( compare ) {
</span><del>- // Disconnected nodes
- if ( compare & 1 ||
- (recompare && b.compareDocumentPosition( a ) === compare) ) {
</del><ins>+ return compare;
+ }
</ins><span class="cx">
</span><del>- // Choose the first element that is related to our preferred document
- if ( a === doc || contains(preferredDoc, a) ) {
- return -1;
- }
- if ( b === doc || contains(preferredDoc, b) ) {
- return 1;
- }
</del><ins>+ // Calculate position if both inputs belong to the same document
+ compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
+ a.compareDocumentPosition( b ) :
</ins><span class="cx">
</span><del>- // Maintain original order
- return sortInput ?
- ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
- 0;
</del><ins>+ // Otherwise we know they are disconnected
+ 1;
+
+ // Disconnected nodes
+ if ( compare & 1 ||
+ (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
+
+ // Choose the first element that is related to our preferred document
+ if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
+ return -1;
</ins><span class="cx"> }
</span><ins>+ if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
+ return 1;
+ }
</ins><span class="cx">
</span><del>- return compare & 4 ? -1 : 1;
</del><ins>+ // Maintain original order
+ return sortInput ?
+ ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
+ 0;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- // Not directly comparable, sort on existence of method
- return a.compareDocumentPosition ? -1 : 1;
</del><ins>+ return compare & 4 ? -1 : 1;
</ins><span class="cx"> } :
</span><span class="cx"> function( a, b ) {
</span><ins>+ // Exit early if the nodes are identical
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
</ins><span class="cx"> var cur,
</span><span class="cx"> i = 0,
</span><span class="cx"> aup = a.parentNode,
</span><span class="lines">@@ -1327,17 +1432,14 @@
</span><span class="cx"> ap = [ a ],
</span><span class="cx"> bp = [ b ];
</span><span class="cx">
</span><del>- // Exit early if the nodes are identical
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
-
</del><span class="cx"> // Parentless nodes are either documents or disconnected
</span><del>- } else if ( !aup || !bup ) {
</del><ins>+ if ( !aup || !bup ) {
</ins><span class="cx"> return a === doc ? -1 :
</span><span class="cx"> b === doc ? 1 :
</span><span class="cx"> aup ? -1 :
</span><span class="cx"> bup ? 1 :
</span><ins>+ sortInput ?
+ ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
</ins><span class="cx"> 0;
</span><span class="cx">
</span><span class="cx"> // If the nodes are siblings, we can do a quick check
</span><span class="lines">@@ -1370,7 +1472,7 @@
</span><span class="cx"> 0;
</span><span class="cx"> };
</span><span class="cx">
</span><del>- return document;
</del><ins>+ return doc;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> Sizzle.matches = function( expr, elements ) {
</span><span class="lines">@@ -1386,8 +1488,10 @@
</span><span class="cx"> // Make sure that attribute selectors are quoted
</span><span class="cx"> expr = expr.replace( rattributeQuotes, "='$1']" );
</span><span class="cx">
</span><del>- // rbuggyQSA always contains :focus, so no need for an existence check
- if ( support.matchesSelector && documentIsHTML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && !rbuggyQSA.test(expr) ) {
</del><ins>+ if ( support.matchesSelector && documentIsHTML &&
+ ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
+ ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
+
</ins><span class="cx"> try {
</span><span class="cx"> var ret = matches.call( elem, expr );
</span><span class="cx">
</span><span class="lines">@@ -1401,7 +1505,7 @@
</span><span class="cx"> } catch(e) {}
</span><span class="cx"> }
</span><span class="cx">
</span><del>- return Sizzle( expr, document, null, [elem] ).length > 0;
</del><ins>+ return Sizzle( expr, document, null, [ elem ] ).length > 0;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> Sizzle.contains = function( context, elem ) {
</span><span class="lines">@@ -1413,32 +1517,34 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> Sizzle.attr = function( elem, name ) {
</span><del>- var val;
-
</del><span class="cx"> // Set document vars if needed
</span><span class="cx"> if ( ( elem.ownerDocument || elem ) !== document ) {
</span><span class="cx"> setDocument( elem );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if ( documentIsHTML ) {
- name = name.toLowerCase();
- }
- if ( (val = Expr.attrHandle[ name ]) ) {
- return val( elem );
- }
- if ( !documentIsHTML || support.attributes ) {
- return elem.getAttribute( name );
- }
- return ( (val = elem.getAttributeNode( name )) || elem.getAttribute( name ) ) && elem[ name ] === true ?
- name :
- val && val.specified ? val.value : null;
</del><ins>+ var fn = Expr.attrHandle[ name.toLowerCase() ],
+ // Don't get fooled by Object.prototype properties (jQuery #13807)
+ val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
+ fn( elem, name, !documentIsHTML ) :
+ undefined;
+
+ return val !== undefined ?
+ val :
+ support.attributes || !documentIsHTML ?
+ elem.getAttribute( name ) :
+ (val = elem.getAttributeNode(name)) && val.specified ?
+ val.value :
+ null;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> Sizzle.error = function( msg ) {
</span><span class="cx"> throw new Error( "Syntax error, unrecognized expression: " + msg );
</span><span class="cx"> };
</span><span class="cx">
</span><del>-// Document sorting and removing duplicates
</del><ins>+/**
+ * Document sorting and removing duplicates
+ * @param {ArrayLike} results
+ */
</ins><span class="cx"> Sizzle.uniqueSort = function( results ) {
</span><span class="cx"> var elem,
</span><span class="cx"> duplicates = [],
</span><span class="lines">@@ -1447,8 +1553,6 @@
</span><span class="cx">
</span><span class="cx"> // Unless we *know* we can detect duplicates, assume their presence
</span><span class="cx"> hasDuplicate = !support.detectDuplicates;
</span><del>- // Compensate for sort limitations
- recompare = !support.sortDetached;
</del><span class="cx"> sortInput = !support.sortStable && results.slice( 0 );
</span><span class="cx"> results.sort( sortOrder );
</span><span class="cx">
</span><span class="lines">@@ -1463,72 +1567,14 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ // Clear input after sorting to release objects
+ // See https://github.com/jquery/sizzle/pull/225
+ sortInput = null;
+
</ins><span class="cx"> return results;
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Checks document order of two siblings
- * @param {Element} a
- * @param {Element} b
- * @returns Returns -1 if a precedes b, 1 if a follows b
- */
-function siblingCheck( a, b ) {
- var cur = b && a,
- diff = cur && ( ~b.sourceIndex || MAX_NEGATIVE ) - ( ~a.sourceIndex || MAX_NEGATIVE );
-
- // Use IE sourceIndex if available on both nodes
- if ( diff ) {
- return diff;
- }
-
- // Check if b follows a
- if ( cur ) {
- while ( (cur = cur.nextSibling) ) {
- if ( cur === b ) {
- return -1;
- }
- }
- }
-
- return a ? 1 : -1;
-}
-
-// Returns a function to use in pseudos for input types
-function createInputPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === type;
- };
-}
-
-// Returns a function to use in pseudos for buttons
-function createButtonPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return (name === "input" || name === "button") && elem.type === type;
- };
-}
-
-// Returns a function to use in pseudos for positionals
-function createPositionalPseudo( fn ) {
- return markFunction(function( argument ) {
- argument = +argument;
- return markFunction(function( seed, matches ) {
- var j,
- matchIndexes = fn( [], seed.length, argument ),
- i = matchIndexes.length;
-
- // Match elements found at the specified indexes
- while ( i-- ) {
- if ( seed[ (j = matchIndexes[i]) ] ) {
- seed[j] = !(matches[j] = seed[j]);
- }
- }
- });
- });
-}
-
-/**
</del><span class="cx"> * Utility function for retrieving the text value of an array of DOM nodes
</span><span class="cx"> * @param {Array|Element} elem
</span><span class="cx"> */
</span><span class="lines">@@ -1540,13 +1586,13 @@
</span><span class="cx">
</span><span class="cx"> if ( !nodeType ) {
</span><span class="cx"> // If no nodeType, this is expected to be an array
</span><del>- for ( ; (node = elem[i]); i++ ) {
</del><ins>+ while ( (node = elem[i++]) ) {
</ins><span class="cx"> // Do not traverse comment nodes
</span><span class="cx"> ret += getText( node );
</span><span class="cx"> }
</span><span class="cx"> } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
</span><span class="cx"> // Use textContent for elements
</span><del>- // innerText usage removed for consistency of new lines (see #11153)
</del><ins>+ // innerText usage removed for consistency of new lines (jQuery #11153)
</ins><span class="cx"> if ( typeof elem.textContent === "string" ) {
</span><span class="cx"> return elem.textContent;
</span><span class="cx"> } else {
</span><span class="lines">@@ -1572,6 +1618,8 @@
</span><span class="cx">
</span><span class="cx"> match: matchExpr,
</span><span class="cx">
</span><ins>+ attrHandle: {},
+
</ins><span class="cx"> find: {},
</span><span class="cx">
</span><span class="cx"> relative: {
</span><span class="lines">@@ -1586,7 +1634,7 @@
</span><span class="cx"> match[1] = match[1].replace( runescape, funescape );
</span><span class="cx">
</span><span class="cx"> // Move the given value to match[3] whether quoted or unquoted
</span><del>- match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape );
</del><ins>+ match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
</ins><span class="cx">
</span><span class="cx"> if ( match[2] === "~=" ) {
</span><span class="cx"> match[3] = " " + match[3] + " ";
</span><span class="lines">@@ -1629,15 +1677,15 @@
</span><span class="cx">
</span><span class="cx"> "PSEUDO": function( match ) {
</span><span class="cx"> var excess,
</span><del>- unquoted = !match[5] && match[2];
</del><ins>+ unquoted = !match[6] && match[2];
</ins><span class="cx">
</span><span class="cx"> if ( matchExpr["CHILD"].test( match[0] ) ) {
</span><span class="cx"> return null;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Accept quoted arguments as-is
</span><del>- if ( match[4] ) {
- match[2] = match[4];
</del><ins>+ if ( match[3] ) {
+ match[2] = match[4] || match[5] || "";
</ins><span class="cx">
</span><span class="cx"> // Strip excess characters from unquoted arguments
</span><span class="cx"> } else if ( unquoted && rpseudo.test( unquoted ) &&
</span><span class="lines">@@ -1658,15 +1706,13 @@
</span><span class="cx">
</span><span class="cx"> filter: {
</span><span class="cx">
</span><del>- "TAG": function( nodeName ) {
- if ( nodeName === "*" ) {
- return function() { return true; };
- }
-
- nodeName = nodeName.replace( runescape, funescape ).toLowerCase();
- return function( elem ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
- };
</del><ins>+ "TAG": function( nodeNameSelector ) {
+ var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
+ return nodeNameSelector === "*" ?
+ function() { return true; } :
+ function( elem ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+ };
</ins><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> "CLASS": function( className ) {
</span><span class="lines">@@ -1675,7 +1721,7 @@
</span><span class="cx"> return pattern ||
</span><span class="cx"> (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
</span><span class="cx"> classCache( className, function( elem ) {
</span><del>- return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" );
</del><ins>+ return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" );
</ins><span class="cx"> });
</span><span class="cx"> },
</span><span class="cx">
</span><span class="lines">@@ -1867,6 +1913,7 @@
</span><span class="cx"> }),
</span><span class="cx">
</span><span class="cx"> "contains": markFunction(function( text ) {
</span><ins>+ text = text.replace( runescape, funescape );
</ins><span class="cx"> return function( elem ) {
</span><span class="cx"> return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
</span><span class="cx"> };
</span><span class="lines">@@ -1943,12 +1990,11 @@
</span><span class="cx"> // Contents
</span><span class="cx"> "empty": function( elem ) {
</span><span class="cx"> // http://www.w3.org/TR/selectors/#empty-pseudo
</span><del>- // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
- // not comment, processing instructions, or others
- // Thanks to Diego Perini for the nodeName shortcut
- // Greater than "@" means alpha characters (specifically not starting with "#" or "?")
</del><ins>+ // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
+ // but not by others (comment: 8; processing instruction: 7; etc.)
+ // nodeType < 6 works because attributes (2) do not appear as children
</ins><span class="cx"> for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
</span><del>- if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) {
</del><ins>+ if ( elem.nodeType < 6 ) {
</ins><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -1975,11 +2021,12 @@
</span><span class="cx">
</span><span class="cx"> "text": function( elem ) {
</span><span class="cx"> var attr;
</span><del>- // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
- // use getAttribute instead to test this case
</del><span class="cx"> return elem.nodeName.toLowerCase() === "input" &&
</span><span class="cx"> elem.type === "text" &&
</span><del>- ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type );
</del><ins>+
+ // Support: IE<8
+ // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
+ ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
</ins><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> // Position-in-collection
</span><span class="lines">@@ -2029,6 +2076,8 @@
</span><span class="cx"> }
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+Expr.pseudos["nth"] = Expr.pseudos["eq"];
+
</ins><span class="cx"> // Add button/input type pseudos
</span><span class="cx"> for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
</span><span class="cx"> Expr.pseudos[ i ] = createInputPseudo( i );
</span><span class="lines">@@ -2037,7 +2086,12 @@
</span><span class="cx"> Expr.pseudos[ i ] = createButtonPseudo( i );
</span><span class="cx"> }
</span><span class="cx">
</span><del>-function tokenize( selector, parseOnly ) {
</del><ins>+// Easy API for creating new setFilters
+function setFilters() {}
+setFilters.prototype = Expr.filters = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
</ins><span class="cx"> var matched, match, tokens, type,
</span><span class="cx"> soFar, groups, preFilters,
</span><span class="cx"> cached = tokenCache[ selector + " " ];
</span><span class="lines">@@ -2058,7 +2112,7 @@
</span><span class="cx"> // Don't consume trailing commas as valid
</span><span class="cx"> soFar = soFar.slice( match[0].length ) || soFar;
</span><span class="cx"> }
</span><del>- groups.push( tokens = [] );
</del><ins>+ groups.push( (tokens = []) );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> matched = false;
</span><span class="lines">@@ -2066,11 +2120,11 @@
</span><span class="cx"> // Combinators
</span><span class="cx"> if ( (match = rcombinators.exec( soFar )) ) {
</span><span class="cx"> matched = match.shift();
</span><del>- tokens.push( {
</del><ins>+ tokens.push({
</ins><span class="cx"> value: matched,
</span><span class="cx"> // Cast descendant combinators to space
</span><span class="cx"> type: match[0].replace( rtrim, " " )
</span><del>- } );
</del><ins>+ });
</ins><span class="cx"> soFar = soFar.slice( matched.length );
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2079,11 +2133,11 @@
</span><span class="cx"> if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
</span><span class="cx"> (match = preFilters[ type ]( match ))) ) {
</span><span class="cx"> matched = match.shift();
</span><del>- tokens.push( {
</del><ins>+ tokens.push({
</ins><span class="cx"> value: matched,
</span><span class="cx"> type: type,
</span><span class="cx"> matches: match
</span><del>- } );
</del><ins>+ });
</ins><span class="cx"> soFar = soFar.slice( matched.length );
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -2102,7 +2156,7 @@
</span><span class="cx"> Sizzle.error( selector ) :
</span><span class="cx"> // Cache the tokens
</span><span class="cx"> tokenCache( selector, groups ).slice( 0 );
</span><del>-}
</del><ins>+};
</ins><span class="cx">
</span><span class="cx"> function toSelector( tokens ) {
</span><span class="cx"> var i = 0,
</span><span class="lines">@@ -2131,8 +2185,8 @@
</span><span class="cx">
</span><span class="cx"> // Check against all ancestor/preceding elements
</span><span class="cx"> function( elem, context, xml ) {
</span><del>- var data, cache, outerCache,
- dirkey = dirruns + " " + doneName;
</del><ins>+ var oldCache, outerCache,
+ newCache = [ dirruns, doneName ];
</ins><span class="cx">
</span><span class="cx"> // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
</span><span class="cx"> if ( xml ) {
</span><span class="lines">@@ -2147,14 +2201,17 @@
</span><span class="cx"> while ( (elem = elem[ dir ]) ) {
</span><span class="cx"> if ( elem.nodeType === 1 || checkNonElements ) {
</span><span class="cx"> outerCache = elem[ expando ] || (elem[ expando ] = {});
</span><del>- if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {
- if ( (data = cache[1]) === true || data === cachedruns ) {
- return data === true;
- }
</del><ins>+ if ( (oldCache = outerCache[ dir ]) &&
+ oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
+
+ // Assign to newCache so results back-propagate to previous elements
+ return (newCache[ 2 ] = oldCache[ 2 ]);
</ins><span class="cx"> } else {
</span><del>- cache = outerCache[ dir ] = [ dirkey ];
- cache[1] = matcher( elem, context, xml ) || cachedruns;
- if ( cache[1] === true ) {
</del><ins>+ // Reuse newcache so results back-propagate to previous elements
+ outerCache[ dir ] = newCache;
+
+ // A match means we're done; a fail means we have to keep checking
+ if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -2178,6 +2235,15 @@
</span><span class="cx"> matchers[0];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+function multipleContexts( selector, contexts, results ) {
+ var i = 0,
+ len = contexts.length;
+ for ( ; i < len; i++ ) {
+ Sizzle( selector, contexts[i], results );
+ }
+ return results;
+}
+
</ins><span class="cx"> function condense( unmatched, map, filter, context, xml ) {
</span><span class="cx"> var elem,
</span><span class="cx"> newUnmatched = [],
</span><span class="lines">@@ -2330,7 +2396,10 @@
</span><span class="cx"> }
</span><span class="cx"> return setMatcher(
</span><span class="cx"> i > 1 && elementMatcher( matchers ),
</span><del>- i > 1 && toSelector( tokens.slice( 0, i - 1 ) ).replace( rtrim, "$1" ),
</del><ins>+ i > 1 && toSelector(
+ // If the preceding token was a descendant combinator, insert an implicit any-element `*`
+ tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
+ ).replace( rtrim, "$1" ),
</ins><span class="cx"> matcher,
</span><span class="cx"> i < j && matcherFromTokens( tokens.slice( i, j ) ),
</span><span class="cx"> j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
</span><span class="lines">@@ -2345,31 +2414,30 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
</span><del>- // A counter to specify which element is currently being matched
- var matcherCachedRuns = 0,
- bySet = setMatchers.length > 0,
</del><ins>+ var bySet = setMatchers.length > 0,
</ins><span class="cx"> byElement = elementMatchers.length > 0,
</span><del>- superMatcher = function( seed, context, xml, results, expandContext ) {
</del><ins>+ superMatcher = function( seed, context, xml, results, outermost ) {
</ins><span class="cx"> var elem, j, matcher,
</span><del>- setMatched = [],
</del><span class="cx"> matchedCount = 0,
</span><span class="cx"> i = "0",
</span><span class="cx"> unmatched = seed && [],
</span><del>- outermost = expandContext != null,
</del><ins>+ setMatched = [],
</ins><span class="cx"> contextBackup = outermostContext,
</span><del>- // We must always have either seed elements or context
- elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
</del><ins>+ // We must always have either seed elements or outermost context
+ elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
</ins><span class="cx"> // Use integer dirruns iff this is the outermost matcher
</span><del>- dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);
</del><ins>+ dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
+ len = elems.length;
</ins><span class="cx">
</span><span class="cx"> if ( outermost ) {
</span><span class="cx"> outermostContext = context !== document && context;
</span><del>- cachedruns = matcherCachedRuns;
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Add elements passing elementMatchers directly to results
</span><span class="cx"> // Keep `i` a string if there are no elements so `matchedCount` will be "00" below
</span><del>- for ( ; (elem = elems[i]) != null; i++ ) {
</del><ins>+ // Support: IE<9, Safari
+ // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
+ for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
</ins><span class="cx"> if ( byElement && elem ) {
</span><span class="cx"> j = 0;
</span><span class="cx"> while ( (matcher = elementMatchers[j++]) ) {
</span><span class="lines">@@ -2380,7 +2448,6 @@
</span><span class="cx"> }
</span><span class="cx"> if ( outermost ) {
</span><span class="cx"> dirruns = dirrunsUnique;
</span><del>- cachedruns = ++matcherCachedRuns;
</del><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2445,7 +2512,7 @@
</span><span class="cx"> superMatcher;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
</del><ins>+compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
</ins><span class="cx"> var i,
</span><span class="cx"> setMatchers = [],
</span><span class="cx"> elementMatchers = [],
</span><span class="lines">@@ -2453,12 +2520,12 @@
</span><span class="cx">
</span><span class="cx"> if ( !cached ) {
</span><span class="cx"> // Generate a function of recursive functions that can be used to check each element
</span><del>- if ( !group ) {
- group = tokenize( selector );
</del><ins>+ if ( !match ) {
+ match = tokenize( selector );
</ins><span class="cx"> }
</span><del>- i = group.length;
</del><ins>+ i = match.length;
</ins><span class="cx"> while ( i-- ) {
</span><del>- cached = matcherFromTokens( group[i] );
</del><ins>+ cached = matcherFromTokens( match[i] );
</ins><span class="cx"> if ( cached[ expando ] ) {
</span><span class="cx"> setMatchers.push( cached );
</span><span class="cx"> } else {
</span><span class="lines">@@ -2468,206 +2535,259 @@
</span><span class="cx">
</span><span class="cx"> // Cache the compiled function
</span><span class="cx"> cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
</span><ins>+
+ // Save selector and tokenization
+ cached.selector = selector;
</ins><span class="cx"> }
</span><span class="cx"> return cached;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-function multipleContexts( selector, contexts, results ) {
- var i = 0,
- len = contexts.length;
- for ( ; i < len; i++ ) {
- Sizzle( selector, contexts[i], results );
- }
- return results;
-}
-
-function select( selector, context, results, seed ) {
</del><ins>+/**
+ * A low-level selection function that works with Sizzle's compiled
+ * selector functions
+ * @param {String|Function} selector A selector or a pre-compiled
+ * selector function built with Sizzle.compile
+ * @param {Element} context
+ * @param {Array} [results]
+ * @param {Array} [seed] A set of elements to match against
+ */
+select = Sizzle.select = function( selector, context, results, seed ) {
</ins><span class="cx"> var i, tokens, token, type, find,
</span><del>- match = tokenize( selector );
</del><ins>+ compiled = typeof selector === "function" && selector,
+ match = !seed && tokenize( (selector = compiled.selector || selector) );
</ins><span class="cx">
</span><del>- if ( !seed ) {
- // Try to minimize operations if there is only one group
- if ( match.length === 1 ) {
</del><ins>+ results = results || [];
</ins><span class="cx">
</span><del>- // Take a shortcut and set the context if the root selector is an ID
- tokens = match[0] = match[0].slice( 0 );
- if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
- context.nodeType === 9 && documentIsHTML &&
- Expr.relative[ tokens[1].type ] ) {
</del><ins>+ // Try to minimize operations if there is no seed and only one group
+ if ( match.length === 1 ) {
</ins><span class="cx">
</span><del>- context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
- if ( !context ) {
- return results;
- }
</del><ins>+ // Take a shortcut and set the context if the root selector is an ID
+ tokens = match[0] = match[0].slice( 0 );
+ if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
+ support.getById && context.nodeType === 9 && documentIsHTML &&
+ Expr.relative[ tokens[1].type ] ) {
</ins><span class="cx">
</span><del>- selector = selector.slice( tokens.shift().value.length );
</del><ins>+ context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
+ if ( !context ) {
+ return results;
+
+ // Precompiled matchers will still verify ancestry, so step up a level
+ } else if ( compiled ) {
+ context = context.parentNode;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- // Fetch a seed set for right-to-left matching
- i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
- while ( i-- ) {
- token = tokens[i];
</del><ins>+ selector = selector.slice( tokens.shift().value.length );
+ }
</ins><span class="cx">
</span><del>- // Abort if we hit a combinator
- if ( Expr.relative[ (type = token.type) ] ) {
- break;
- }
- if ( (find = Expr.find[ type ]) ) {
- // Search, expanding context for leading sibling combinators
- if ( (seed = find(
- token.matches[0].replace( runescape, funescape ),
- rsibling.test( tokens[0].type ) && context.parentNode || context
- )) ) {
</del><ins>+ // Fetch a seed set for right-to-left matching
+ i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
+ while ( i-- ) {
+ token = tokens[i];
</ins><span class="cx">
</span><del>- // If seed is empty or no tokens remain, we can return early
- tokens.splice( i, 1 );
- selector = seed.length && toSelector( tokens );
- if ( !selector ) {
- push.apply( results, seed );
- return results;
- }
</del><ins>+ // Abort if we hit a combinator
+ if ( Expr.relative[ (type = token.type) ] ) {
+ break;
+ }
+ if ( (find = Expr.find[ type ]) ) {
+ // Search, expanding context for leading sibling combinators
+ if ( (seed = find(
+ token.matches[0].replace( runescape, funescape ),
+ rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
+ )) ) {
</ins><span class="cx">
</span><del>- break;
</del><ins>+ // If seed is empty or no tokens remain, we can return early
+ tokens.splice( i, 1 );
+ selector = seed.length && toSelector( tokens );
+ if ( !selector ) {
+ push.apply( results, seed );
+ return results;
</ins><span class="cx"> }
</span><ins>+
+ break;
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- // Compile and execute a filtering function
</del><ins>+ // Compile and execute a filtering function if one is not provided
</ins><span class="cx"> // Provide `match` to avoid retokenization if we modified the selector above
</span><del>- compile( selector, match )(
</del><ins>+ ( compiled || compile( selector, match ) )(
</ins><span class="cx"> seed,
</span><span class="cx"> context,
</span><span class="cx"> !documentIsHTML,
</span><span class="cx"> results,
</span><del>- rsibling.test( selector )
</del><ins>+ rsibling.test( selector ) && testContext( context.parentNode ) || context
</ins><span class="cx"> );
</span><span class="cx"> return results;
</span><del>-}
</del><ins>+};
</ins><span class="cx">
</span><del>-// Deprecated
-Expr.pseudos["nth"] = Expr.pseudos["eq"];
</del><ins>+// One-time assignments
</ins><span class="cx">
</span><del>-// Easy API for creating new setFilters
-function setFilters() {}
-setFilters.prototype = Expr.filters = Expr.pseudos;
-Expr.setFilters = new setFilters();
-
-// Check sort stability
</del><ins>+// Sort stability
</ins><span class="cx"> support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
</span><span class="cx">
</span><del>-// Initialize with the default document
</del><ins>+// Support: Chrome 14-35+
+// Always assume duplicates if they aren't passed to the comparison function
+support.detectDuplicates = !!hasDuplicate;
+
+// Initialize against the default document
</ins><span class="cx"> setDocument();
</span><span class="cx">
</span><del>-// Always assume the presence of duplicates if sort doesn't
-// pass them to our comparison function (as in Google Chrome).
-[0, 0].sort( sortOrder );
-support.detectDuplicates = hasDuplicate;
</del><ins>+// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
+// Detached nodes confoundingly follow *each other*
+support.sortDetached = assert(function( div1 ) {
+ // Should return 1, but returns 4 (following)
+ return div1.compareDocumentPosition( document.createElement("div") ) & 1;
+});
</ins><span class="cx">
</span><del>-/*
-// EXPOSE
-if ( typeof define === "function" && define.amd ) {
- define(function() { return Sizzle; });
-} else {
- window.Sizzle = Sizzle;
</del><ins>+// Support: IE<8
+// Prevent attribute/property "interpolation"
+// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+if ( !assert(function( div ) {
+ div.innerHTML = "<a href='#'></a>";
+ return div.firstChild.getAttribute("href") === "#" ;
+}) ) {
+ addHandle( "type|href|height|width", function( elem, name, isXML ) {
+ if ( !isXML ) {
+ return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
+ }
+ });
</ins><span class="cx"> }
</span><del>-*/
</del><span class="cx">
</span><ins>+// Support: IE<9
+// Use defaultValue in place of getAttribute("value")
+if ( !support.attributes || !assert(function( div ) {
+ div.innerHTML = "<input/>";
+ div.firstChild.setAttribute( "value", "" );
+ return div.firstChild.getAttribute( "value" ) === "";
+}) ) {
+ addHandle( "value", function( elem, name, isXML ) {
+ if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
+ return elem.defaultValue;
+ }
+ });
+}
+
+// Support: IE<9
+// Use getAttributeNode to fetch booleans when getAttribute lies
+if ( !assert(function( div ) {
+ return div.getAttribute("disabled") == null;
+}) ) {
+ addHandle( booleans, function( elem, name, isXML ) {
+ var val;
+ if ( !isXML ) {
+ return elem[ name ] === true ? name.toLowerCase() :
+ (val = elem.getAttributeNode( name )) && val.specified ?
+ val.value :
+ null;
+ }
+ });
+}
+
</ins><span class="cx"> // EXPOSE
</span><span class="cx"> return Sizzle;
</span><span class="cx"> });
</span><span class="cx">
</span><del>-// Included from: js/tinymce/classes/dom/DomQuery.js
</del><ins>+// Included from: js/tinymce/classes/util/Tools.js
</ins><span class="cx">
</span><span class="cx"> /**
</span><del>- * DomQuery.js
</del><ins>+ * Tools.js
</ins><span class="cx"> *
</span><span class="cx"> * Copyright, Moxiecode Systems AB
</span><span class="cx"> * Released under LGPL License.
</span><span class="cx"> *
</span><span class="cx"> * License: http://www.tinymce.com/license
</span><span class="cx"> * Contributing: http://www.tinymce.com/contributing
</span><del>- *
- * Some of this logic is based on jQuery code that is released under
- * MIT license that grants us to sublicense it under LGPL.
- *
- * @ignore-file
</del><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * @class tinymce.dom.DomQuery
</del><ins>+ * This class contains various utlity functions. These are also exposed
+ * directly on the tinymce namespace.
+ *
+ * @class tinymce.util.Tools
</ins><span class="cx"> */
</span><del>-define("tinymce/dom/DomQuery", [
- "tinymce/dom/EventUtils",
- "tinymce/dom/Sizzle"
-], function(EventUtils, Sizzle) {
- var doc = document, push = Array.prototype.push, slice = Array.prototype.slice;
- var rquickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/;
- var Event = EventUtils.Event;
</del><ins>+define("tinymce/util/Tools", [], function() {
+ /**
+ * Removes whitespace from the beginning and end of a string.
+ *
+ * @method trim
+ * @param {String} s String to remove whitespace from.
+ * @return {String} New string with removed whitespace.
+ */
+ var whiteSpaceRegExp = /^\s*|\s*$/g;
</ins><span class="cx">
</span><del>- function isDefined(obj) {
- return typeof obj !== "undefined";
</del><ins>+ function trim(str) {
+ return (str === null || str === undefined) ? '' : ("" + str).replace(whiteSpaceRegExp, '');
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- function isString(obj) {
- return typeof obj === "string";
- }
</del><ins>+ /**
+ * Returns true/false if the object is an array or not.
+ *
+ * @method isArray
+ * @param {Object} obj Object to check.
+ * @return {boolean} true/false state if the object is an array or not.
+ */
+ var isArray = Array.isArray || function(obj) {
+ return Object.prototype.toString.call(obj) === "[object Array]";
+ };
</ins><span class="cx">
</span><del>- function createFragment(html) {
- var frag, node, container;
</del><ins>+ /**
+ * Checks if a object is of a specific type for example an array.
+ *
+ * @method is
+ * @param {Object} o Object to check type of.
+ * @param {string} t Optional type to check for.
+ * @return {Boolean} true/false if the object is of the specified type.
+ */
+ function is(o, t) {
+ if (!t) {
+ return o !== undefined;
+ }
</ins><span class="cx">
</span><del>- container = doc.createElement("div");
- frag = doc.createDocumentFragment();
- container.innerHTML = html;
-
- while ((node = container.firstChild)) {
- frag.appendChild(node);
</del><ins>+ if (t == 'array' && isArray(o)) {
+ return true;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- return frag;
</del><ins>+ return typeof(o) == t;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- function domManipulate(targetNodes, sourceItem, callback) {
- var i;
</del><ins>+ /**
+ * Converts the specified object into a real JavaScript array.
+ *
+ * @method toArray
+ * @param {Object} obj Object to convert into array.
+ * @return {Array} Array object based in input.
+ */
+ function toArray(obj) {
+ var array = obj, i, l;
</ins><span class="cx">
</span><del>- if (typeof sourceItem === "string") {
- sourceItem = createFragment(sourceItem);
- } else if (sourceItem.length) {
- for (i = 0; i < sourceItem.length; i++) {
- domManipulate(targetNodes, sourceItem[i], callback);
</del><ins>+ if (!isArray(obj)) {
+ array = [];
+ for (i = 0, l = obj.length; i < l; i++) {
+ array[i] = obj[i];
</ins><span class="cx"> }
</span><del>-
- return targetNodes;
</del><span class="cx"> }
</span><span class="cx">
</span><del>- i = targetNodes.length;
- while (i--) {
- callback.call(targetNodes[i], sourceItem.parentNode ? sourceItem : sourceItem);
- }
-
- return targetNodes;
</del><ins>+ return array;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- function hasClass(node, className) {
- return node && className && (' ' + node.className + ' ').indexOf(' ' + className + ' ') !== -1;
- }
-
</del><span class="cx"> /**
</span><del>- * Makes a map object out of a string that gets separated by a delimiter.
</del><ins>+ * Makes a name/object map out of an array with names.
</ins><span class="cx"> *
</span><span class="cx"> * @method makeMap
</span><del>- * @param {String} items Item string to split.
- * @param {Object} map Optional object to add items to.
- * @return {Object} name/value object with items as keys.
</del><ins>+ * @param {Array/String} items Items to make map out of.
+ * @param {String} delim Optional delimiter to split string by.
+ * @param {Object} map Optional map to add items to.
+ * @return {Object} Name/value map of items.
</ins><span class="cx"> */
</span><del>- function makeMap(items, map) {
</del><ins>+ function makeMap(items, delim, map) {
</ins><span class="cx"> var i;
</span><span class="cx">
</span><span class="cx"> items = items || [];
</span><ins>+ delim = delim || ',';
</ins><span class="cx">
</span><span class="cx"> if (typeof(items) == "string") {
</span><del>- items = items.split(' ');
</del><ins>+ items = items.split(delim);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> map = map || {};
</span><span class="lines">@@ -2680,60 +2800,681 @@
</span><span class="cx"> return map;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- var numericCssMap = makeMap('fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom');
</del><ins>+ /**
+ * Performs an iteration of all items in a collection such as an object or array. This method will execure the
+ * callback function for each item in the collection, if the callback returns false the iteration will terminate.
+ * The callback has the following format: cb(value, key_or_index).
+ *
+ * @method each
+ * @param {Object} o Collection to iterate.
+ * @param {function} cb Callback function to execute for each item.
+ * @param {Object} s Optional scope to execute the callback in.
+ * @example
+ * // Iterate an array
+ * tinymce.each([1,2,3], function(v, i) {
+ * console.debug("Value: " + v + ", Index: " + i);
+ * });
+ *
+ * // Iterate an object
+ * tinymce.each({a: 1, b: 2, c: 3], function(v, k) {
+ * console.debug("Value: " + v + ", Key: " + k);
+ * });
+ */
+ function each(o, cb, s) {
+ var n, l;
</ins><span class="cx">
</span><del>- function DomQuery(selector, context) {
- /*eslint new-cap:0 */
- return new DomQuery.fn.init(selector, context);
</del><ins>+ if (!o) {
+ return 0;
+ }
+
+ s = s || o;
+
+ if (o.length !== undefined) {
+ // Indexed arrays, needed for Safari
+ for (n = 0, l = o.length; n < l; n++) {
+ if (cb.call(s, o[n], n, o) === false) {
+ return 0;
+ }
+ }
+ } else {
+ // Hashtables
+ for (n in o) {
+ if (o.hasOwnProperty(n)) {
+ if (cb.call(s, o[n], n, o) === false) {
+ return 0;
+ }
+ }
+ }
+ }
+
+ return 1;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Extends the specified object with another object.
</del><ins>+ * Creates a new array by the return value of each iteration function call. This enables you to convert
+ * one array list into another.
</ins><span class="cx"> *
</span><del>- * @method extend
- * @param {Object} target Object to extend.
- * @param {Object..} obj Multiple objects to extend with.
- * @return {Object} Same as target, the extended object.
</del><ins>+ * @method map
+ * @param {Array} a Array of items to iterate.
+ * @param {function} f Function to call for each item. It's return value will be the new value.
+ * @return {Array} Array with new values based on function return values.
</ins><span class="cx"> */
</span><del>- function extend(target) {
- var args = arguments, arg, i, key;
</del><ins>+ function map(a, f) {
+ var o = [];
</ins><span class="cx">
</span><del>- for (i = 1; i < args.length; i++) {
- arg = args[i];
</del><ins>+ each(a, function(v) {
+ o.push(f(v));
+ });
</ins><span class="cx">
</span><del>- for (key in arg) {
- target[key] = arg[key];
</del><ins>+ return o;
+ }
+
+ /**
+ * Filters out items from the input array by calling the specified function for each item.
+ * If the function returns false the item will be excluded if it returns true it will be included.
+ *
+ * @method grep
+ * @param {Array} a Array of items to loop though.
+ * @param {function} f Function to call for each item. Include/exclude depends on it's return value.
+ * @return {Array} New array with values imported and filtered based in input.
+ * @example
+ * // Filter out some items, this will return an array with 4 and 5
+ * var items = tinymce.grep([1,2,3,4,5], function(v) {return v > 3;});
+ */
+ function grep(a, f) {
+ var o = [];
+
+ each(a, function(v) {
+ if (!f || f(v)) {
+ o.push(v);
</ins><span class="cx"> }
</span><del>- }
</del><ins>+ });
</ins><span class="cx">
</span><del>- return target;
</del><ins>+ return o;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Converts the specified object into a real JavaScript array.
</del><ins>+ * Creates a class, subclass or static singleton.
+ * More details on this method can be found in the Wiki.
</ins><span class="cx"> *
</span><del>- * @method toArray
- * @param {Object} obj Object to convert into array.
- * @return {Array} Array object based in input.
</del><ins>+ * @method create
+ * @param {String} s Class name, inheritage and prefix.
+ * @param {Object} p Collection of methods to add to the class.
+ * @param {Object} root Optional root object defaults to the global window object.
+ * @example
+ * // Creates a basic class
+ * tinymce.create('tinymce.somepackage.SomeClass', {
+ * SomeClass: function() {
+ * // Class constructor
+ * },
+ *
+ * method: function() {
+ * // Some method
+ * }
+ * });
+ *
+ * // Creates a basic subclass class
+ * tinymce.create('tinymce.somepackage.SomeSubClass:tinymce.somepackage.SomeClass', {
+ * SomeSubClass: function() {
+ * // Class constructor
+ * this.parent(); // Call parent constructor
+ * },
+ *
+ * method: function() {
+ * // Some method
+ * this.parent(); // Call parent method
+ * },
+ *
+ * 'static': {
+ * staticMethod: function() {
+ * // Static method
+ * }
+ * }
+ * });
+ *
+ * // Creates a singleton/static class
+ * tinymce.create('static tinymce.somepackage.SomeSingletonClass', {
+ * method: function() {
+ * // Some method
+ * }
+ * });
</ins><span class="cx"> */
</span><del>- function toArray(obj) {
- var array = [], i, l;
</del><ins>+ function create(s, p, root) {
+ var self = this, sp, ns, cn, scn, c, de = 0;
</ins><span class="cx">
</span><del>- for (i = 0, l = obj.length; i < l; i++) {
- array[i] = obj[i];
</del><ins>+ // Parse : <prefix> <class>:<super class>
+ s = /^((static) )?([\w.]+)(:([\w.]+))?/.exec(s);
+ cn = s[3].match(/(^|\.)(\w+)$/i)[2]; // Class name
+
+ // Create namespace for new class
+ ns = self.createNS(s[3].replace(/\.\w+$/, ''), root);
+
+ // Class already exists
+ if (ns[cn]) {
+ return;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- return array;
</del><ins>+ // Make pure static class
+ if (s[2] == 'static') {
+ ns[cn] = p;
+
+ if (this.onCreate) {
+ this.onCreate(s[2], s[3], ns[cn]);
+ }
+
+ return;
+ }
+
+ // Create default constructor
+ if (!p[cn]) {
+ p[cn] = function() {};
+ de = 1;
+ }
+
+ // Add constructor and methods
+ ns[cn] = p[cn];
+ self.extend(ns[cn].prototype, p);
+
+ // Extend
+ if (s[5]) {
+ sp = self.resolve(s[5]).prototype;
+ scn = s[5].match(/\.(\w+)$/i)[1]; // Class name
+
+ // Extend constructor
+ c = ns[cn];
+ if (de) {
+ // Add passthrough constructor
+ ns[cn] = function() {
+ return sp[scn].apply(this, arguments);
+ };
+ } else {
+ // Add inherit constructor
+ ns[cn] = function() {
+ this.parent = sp[scn];
+ return c.apply(this, arguments);
+ };
+ }
+ ns[cn].prototype[cn] = ns[cn];
+
+ // Add super methods
+ self.each(sp, function(f, n) {
+ ns[cn].prototype[n] = sp[n];
+ });
+
+ // Add overridden methods
+ self.each(p, function(f, n) {
+ // Extend methods if needed
+ if (sp[n]) {
+ ns[cn].prototype[n] = function() {
+ this.parent = sp[n];
+ return f.apply(this, arguments);
+ };
+ } else {
+ if (n != cn) {
+ ns[cn].prototype[n] = f;
+ }
+ }
+ });
+ }
+
+ // Add static methods
+ /*jshint sub:true*/
+ self.each(p['static'], function(f, n) {
+ ns[cn][n] = f;
+ });
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Returns the index of the specified item inside the array.
</del><ins>+ * Returns the index of a value in an array, this method will return -1 if the item wasn't found.
</ins><span class="cx"> *
</span><span class="cx"> * @method inArray
</span><del>- * @param {Object} item Item to look for.
- * @param {Array} array Array to look for item in.
- * @return {Number} Index of the item or -1.
</del><ins>+ * @param {Array} a Array/Object to search for value in.
+ * @param {Object} v Value to check for inside the array.
+ * @return {Number/String} Index of item inside the array inside an object. Or -1 if it wasn't found.
+ * @example
+ * // Get index of value in array this will alert 1 since 2 is at that index
+ * alert(tinymce.inArray([1,2,3], 2));
</ins><span class="cx"> */
</span><ins>+ function inArray(a, v) {
+ var i, l;
+
+ if (a) {
+ for (i = 0, l = a.length; i < l; i++) {
+ if (a[i] === v) {
+ return i;
+ }
+ }
+ }
+
+ return -1;
+ }
+
+ function extend(obj, ext) {
+ var i, l, name, args = arguments, value;
+
+ for (i = 1, l = args.length; i < l; i++) {
+ ext = args[i];
+ for (name in ext) {
+ if (ext.hasOwnProperty(name)) {
+ value = ext[name];
+
+ if (value !== undefined) {
+ obj[name] = value;
+ }
+ }
+ }
+ }
+
+ return obj;
+ }
+
+ /**
+ * Executed the specified function for each item in a object tree.
+ *
+ * @method walk
+ * @param {Object} o Object tree to walk though.
+ * @param {function} f Function to call for each item.
+ * @param {String} n Optional name of collection inside the objects to walk for example childNodes.
+ * @param {String} s Optional scope to execute the function in.
+ */
+ function walk(o, f, n, s) {
+ s = s || this;
+
+ if (o) {
+ if (n) {
+ o = o[n];
+ }
+
+ each(o, function(o, i) {
+ if (f.call(s, o, i, n) === false) {
+ return false;
+ }
+
+ walk(o, f, n, s);
+ });
+ }
+ }
+
+ /**
+ * Creates a namespace on a specific object.
+ *
+ * @method createNS
+ * @param {String} n Namespace to create for example a.b.c.d.
+ * @param {Object} o Optional object to add namespace to, defaults to window.
+ * @return {Object} New namespace object the last item in path.
+ * @example
+ * // Create some namespace
+ * tinymce.createNS('tinymce.somepackage.subpackage');
+ *
+ * // Add a singleton
+ * var tinymce.somepackage.subpackage.SomeSingleton = {
+ * method: function() {
+ * // Some method
+ * }
+ * };
+ */
+ function createNS(n, o) {
+ var i, v;
+
+ o = o || window;
+
+ n = n.split('.');
+ for (i = 0; i < n.length; i++) {
+ v = n[i];
+
+ if (!o[v]) {
+ o[v] = {};
+ }
+
+ o = o[v];
+ }
+
+ return o;
+ }
+
+ /**
+ * Resolves a string and returns the object from a specific structure.
+ *
+ * @method resolve
+ * @param {String} n Path to resolve for example a.b.c.d.
+ * @param {Object} o Optional object to search though, defaults to window.
+ * @return {Object} Last object in path or null if it couldn't be resolved.
+ * @example
+ * // Resolve a path into an object reference
+ * var obj = tinymce.resolve('a.b.c.d');
+ */
+ function resolve(n, o) {
+ var i, l;
+
+ o = o || window;
+
+ n = n.split('.');
+ for (i = 0, l = n.length; i < l; i++) {
+ o = o[n[i]];
+
+ if (!o) {
+ break;
+ }
+ }
+
+ return o;
+ }
+
+ /**
+ * Splits a string but removes the whitespace before and after each value.
+ *
+ * @method explode
+ * @param {string} s String to split.
+ * @param {string} d Delimiter to split by.
+ * @example
+ * // Split a string into an array with a,b,c
+ * var arr = tinymce.explode('a, b, c');
+ */
+ function explode(s, d) {
+ if (!s || is(s, 'array')) {
+ return s;
+ }
+
+ return map(s.split(d || ','), trim);
+ }
+
+ return {
+ trim: trim,
+ isArray: isArray,
+ is: is,
+ toArray: toArray,
+ makeMap: makeMap,
+ each: each,
+ map: map,
+ grep: grep,
+ inArray: inArray,
+ extend: extend,
+ create: create,
+ walk: walk,
+ createNS: createNS,
+ resolve: resolve,
+ explode: explode
+ };
+});
+
+// Included from: js/tinymce/classes/Env.js
+
+/**
+ * Env.js
+ *
+ * Copyright, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/**
+ * This class contains various environment constants like browser versions etc.
+ * Normally you don't want to sniff specific browser versions but sometimes you have
+ * to when it's impossible to feature detect. So use this with care.
+ *
+ * @class tinymce.Env
+ * @static
+ */
+define("tinymce/Env", [], function() {
+ var nav = navigator, userAgent = nav.userAgent;
+ var opera, webkit, ie, ie11, gecko, mac, iDevice;
+
+ opera = window.opera && window.opera.buildNumber;
+ webkit = /WebKit/.test(userAgent);
+ ie = !webkit && !opera && (/MSIE/gi).test(userAgent) && (/Explorer/gi).test(nav.appName);
+ ie = ie && /MSIE (\w+)\./.exec(userAgent)[1];
+ ie11 = userAgent.indexOf('Trident/') != -1 && (userAgent.indexOf('rv:') != -1 || nav.appName.indexOf('Netscape') != -1) ? 11 : false;
+ ie = ie || ie11;
+ gecko = !webkit && !ie11 && /Gecko/.test(userAgent);
+ mac = userAgent.indexOf('Mac') != -1;
+ iDevice = /(iPad|iPhone)/.test(userAgent);
+
+ // Is a iPad/iPhone and not on iOS5 sniff the WebKit version since older iOS WebKit versions
+ // says it has contentEditable support but there is no visible caret.
+ var contentEditable = !iDevice || userAgent.match(/AppleWebKit\/(\d*)/)[1] >= 534;
+
+ return {
+ /**
+ * Constant that is true if the browser is Opera.
+ *
+ * @property opera
+ * @type Boolean
+ * @final
+ */
+ opera: opera,
+
+ /**
+ * Constant that is true if the browser is WebKit (Safari/Chrome).
+ *
+ * @property webKit
+ * @type Boolean
+ * @final
+ */
+ webkit: webkit,
+
+ /**
+ * Constant that is more than zero if the browser is IE.
+ *
+ * @property ie
+ * @type Boolean
+ * @final
+ */
+ ie: ie,
+
+ /**
+ * Constant that is true if the browser is Gecko.
+ *
+ * @property gecko
+ * @type Boolean
+ * @final
+ */
+ gecko: gecko,
+
+ /**
+ * Constant that is true if the os is Mac OS.
+ *
+ * @property mac
+ * @type Boolean
+ * @final
+ */
+ mac: mac,
+
+ /**
+ * Constant that is true if the os is iOS.
+ *
+ * @property iOS
+ * @type Boolean
+ * @final
+ */
+ iOS: iDevice,
+
+ /**
+ * Constant that is true if the browser supports editing.
+ *
+ * @property contentEditable
+ * @type Boolean
+ * @final
+ */
+ contentEditable: contentEditable,
+
+ /**
+ * Transparent image data url.
+ *
+ * @property transparentSrc
+ * @type Boolean
+ * @final
+ */
+ transparentSrc: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
+
+ /**
+ * Returns true/false if the browser can or can't place the caret after a inline block like an image.
+ *
+ * @property noCaretAfter
+ * @type Boolean
+ * @final
+ */
+ caretAfter: ie != 8,
+
+ /**
+ * Constant that is true if the browser supports native DOM Ranges. IE 9+.
+ *
+ * @property range
+ * @type Boolean
+ */
+ range: window.getSelection && "Range" in window,
+
+ /**
+ * Returns the IE document mode for non IE browsers this will fake IE 10.
+ *
+ * @property documentMode
+ * @type Number
+ */
+ documentMode: ie ? (document.documentMode || 7) : 10
+ };
+});
+
+// Included from: js/tinymce/classes/dom/DomQuery.js
+
+/**
+ * DomQuery.js
+ *
+ * Copyright, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/**
+ * This class mimics most of the jQuery API:
+ *
+ * This is whats currently implemented:
+ * - Utility functions
+ * - DOM traversial
+ * - DOM manipulation
+ * - Event binding
+ *
+ * This is not currently implemented:
+ * - Dimension
+ * - Ajax
+ * - Animation
+ * - Advanced chaining
+ *
+ * @example
+ * var $ = tinymce.dom.DomQuery;
+ * $('p').attr('attr', 'value').addClass('class');
+ *
+ * @class tinymce.dom.DomQuery
+ */
+define("tinymce/dom/DomQuery", [
+ "tinymce/dom/EventUtils",
+ "tinymce/dom/Sizzle",
+ "tinymce/util/Tools",
+ "tinymce/Env"
+], function(EventUtils, Sizzle, Tools, Env) {
+ var doc = document, push = Array.prototype.push, slice = Array.prototype.slice;
+ var rquickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/;
+ var Event = EventUtils.Event, undef;
+
+ function isDefined(obj) {
+ return typeof obj !== 'undefined';
+ }
+
+ function isString(obj) {
+ return typeof obj === 'string';
+ }
+
+ function createFragment(html, fragDoc) {
+ var frag, node, container;
+
+ fragDoc = fragDoc || doc;
+ container = fragDoc.createElement('div');
+ frag = fragDoc.createDocumentFragment();
+ container.innerHTML = html;
+
+ while ((node = container.firstChild)) {
+ frag.appendChild(node);
+ }
+
+ return frag;
+ }
+
+ function domManipulate(targetNodes, sourceItem, callback, reverse) {
+ var i;
+
+ if (isString(sourceItem)) {
+ sourceItem = createFragment(sourceItem, getElementDocument(targetNodes[0]));
+ } else if (sourceItem.length && !sourceItem.nodeType) {
+ sourceItem = DomQuery.makeArray(sourceItem);
+
+ if (reverse) {
+ for (i = sourceItem.length - 1; i >= 0; i--) {
+ domManipulate(targetNodes, sourceItem[i], callback, reverse);
+ }
+ } else {
+ for (i = 0; i < sourceItem.length; i++) {
+ domManipulate(targetNodes, sourceItem[i], callback, reverse);
+ }
+ }
+
+ return targetNodes;
+ }
+
+ if (sourceItem.nodeType) {
+ i = targetNodes.length;
+ while (i--) {
+ callback.call(targetNodes[i], sourceItem);
+ }
+ }
+
+ return targetNodes;
+ }
+
+ function hasClass(node, className) {
+ return node && className && (' ' + node.className + ' ').indexOf(' ' + className + ' ') !== -1;
+ }
+
+ function wrap(elements, wrapper, all) {
+ var lastParent, newWrapper;
+
+ wrapper = DomQuery(wrapper)[0];
+
+ elements.each(function() {
+ var self = this;
+
+ if (!all || lastParent != self.parentNode) {
+ lastParent = self.parentNode;
+ newWrapper = wrapper.cloneNode(false);
+ self.parentNode.insertBefore(newWrapper, self);
+ newWrapper.appendChild(self);
+ } else {
+ newWrapper.appendChild(self);
+ }
+ });
+
+ return elements;
+ }
+
+ var numericCssMap = Tools.makeMap('fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom', ' ');
+ var booleanMap = Tools.makeMap('checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected', ' ');
+ var propFix = {
+ 'for': 'htmlFor',
+ 'class': 'className',
+ 'readonly': 'readOnly'
+ };
+ var cssFix = {
+ float: 'cssFloat'
+ };
+
+ var attrHooks = {}, cssHooks = {};
+
+ function DomQuery(selector, context) {
+ /*eslint new-cap:0 */
+ return new DomQuery.fn.init(selector, context);
+ }
+
</ins><span class="cx"> function inArray(item, array) {
</span><span class="cx"> var i;
</span><span class="cx">
</span><span class="lines">@@ -2751,31 +3492,12 @@
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- /**
- * Returns true/false if the specified object is an array.
- *
- * @method isArray
- * @param {Object} obj Object to check if it's an array.
- * @return {Boolean} true/false if the input object is array or not.
- */
- var isArray = Array.isArray || function(obj) {
- return Object.prototype.toString.call(obj) === "[object Array]";
- };
-
</del><span class="cx"> var whiteSpaceRegExp = /^\s*|\s*$/g;
</span><span class="cx">
</span><span class="cx"> function trim(str) {
</span><del>- return (str === null || str === undefined) ? '' : ("" + str).replace(whiteSpaceRegExp, '');
</del><ins>+ return (str === null || str === undef) ? '' : ("" + str).replace(whiteSpaceRegExp, '');
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- /**
- * Executes the callback function for each item in array/object. If you return false in the
- * callback it will break the loop.
- *
- * @method each
- * @param {Object} obj Object to iterate.
- * @param {function} callback Callback function to execute for each item.
- */
</del><span class="cx"> function each(obj, callback) {
</span><span class="cx"> var length, key, i, undef, value;
</span><span class="cx">
</span><span class="lines">@@ -2787,7 +3509,7 @@
</span><span class="cx"> for (key in obj) {
</span><span class="cx"> if (obj.hasOwnProperty(key)) {
</span><span class="cx"> value = obj[key];
</span><del>- if (callback.call(value, value, key) === false) {
</del><ins>+ if (callback.call(value, key, value) === false) {
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -2796,7 +3518,7 @@
</span><span class="cx"> // Loop array items
</span><span class="cx"> for (i = 0; i < length; i++) {
</span><span class="cx"> value = obj[i];
</span><del>- if (callback.call(value, value, key) === false) {
</del><ins>+ if (callback.call(value, i, value) === false) {
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -2806,11 +3528,65 @@
</span><span class="cx"> return obj;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ function grep(array, callback) {
+ var out = [];
+
+ each(array, function(i, item) {
+ if (callback(item, i)) {
+ out.push(item);
+ }
+ });
+
+ return out;
+ }
+
+ function getElementDocument(element) {
+ if (!element) {
+ return doc;
+ }
+
+ if (element.nodeType == 9) {
+ return element;
+ }
+
+ return element.ownerDocument;
+ }
+
</ins><span class="cx"> DomQuery.fn = DomQuery.prototype = {
</span><span class="cx"> constructor: DomQuery,
</span><ins>+
+ /**
+ * Selector for the current set.
+ *
+ * @property selector
+ * @type String
+ */
</ins><span class="cx"> selector: "",
</span><ins>+
+ /**
+ * Context used to create the set.
+ *
+ * @property context
+ * @type Element
+ */
+ context: null,
+
+ /**
+ * Number of items in the current set.
+ *
+ * @property length
+ * @type Number
+ */
</ins><span class="cx"> length: 0,
</span><span class="cx">
</span><ins>+ /**
+ * Constructs a new DomQuery instance with the specified selector or context.
+ *
+ * @constructor
+ * @method init
+ * @param {String/Array/DomQuery} selector Optional CSS selector/Array or array like object or HTML string.
+ * @param {Document/Element} context Optional context to search in.
+ */
</ins><span class="cx"> init: function(selector, context) {
</span><span class="cx"> var self = this, match, node;
</span><span class="cx">
</span><span class="lines">@@ -2825,7 +3601,19 @@
</span><span class="cx"> return self;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ if (context && context.nodeType) {
+ self.context = context;
+ } else {
+ if (context) {
+ return DomQuery(selector).attr(context);
+ } else {
+ self.context = context = document;
+ }
+ }
+
</ins><span class="cx"> if (isString(selector)) {
</span><ins>+ self.selector = selector;
+
</ins><span class="cx"> if (selector.charAt(0) === "<" && selector.charAt(selector.length - 1) === ">" && selector.length >= 3) {
</span><span class="cx"> match = [null, selector, null];
</span><span class="cx"> } else {
</span><span class="lines">@@ -2834,14 +3622,19 @@
</span><span class="cx">
</span><span class="cx"> if (match) {
</span><span class="cx"> if (match[1]) {
</span><del>- node = createFragment(selector).firstChild;
</del><ins>+ node = createFragment(selector, getElementDocument(context)).firstChild;
+
</ins><span class="cx"> while (node) {
</span><del>- this.add(node);
</del><ins>+ push.call(self, node);
</ins><span class="cx"> node = node.nextSibling;
</span><span class="cx"> }
</span><span class="cx"> } else {
</span><del>- node = doc.getElementById(match[2]);
</del><ins>+ node = getElementDocument(context).getElementById(match[2]);
</ins><span class="cx">
</span><ins>+ if (!node) {
+ return self;
+ }
+
</ins><span class="cx"> if (node.id !== match[2]) {
</span><span class="cx"> return self.find(selector);
</span><span class="cx"> }
</span><span class="lines">@@ -2850,70 +3643,189 @@
</span><span class="cx"> self[0] = node;
</span><span class="cx"> }
</span><span class="cx"> } else {
</span><del>- return DomQuery(context || document).find(selector);
</del><ins>+ return DomQuery(context).find(selector);
</ins><span class="cx"> }
</span><span class="cx"> } else {
</span><del>- this.add(selector);
</del><ins>+ this.add(selector, false);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return self;
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ /**
+ * Converts the current set to an array.
+ *
+ * @method toArray
+ * @param {Array} Array of all nodes in set.
+ */
</ins><span class="cx"> toArray: function() {
</span><del>- return toArray(this);
</del><ins>+ return Tools.toArray(this);
</ins><span class="cx"> },
</span><span class="cx">
</span><del>- add: function(items) {
- var self = this;
</del><ins>+ /**
+ * Adds new nodes to the set.
+ *
+ * @method add
+ * @param {Array/tinymce.dom.DomQuery} items Array of all nodes to add to set.
+ * @return {tinymce.dom.DomQuery} New instance with nodes added.
+ */
+ add: function(items, sort) {
+ var self = this, nodes, i;
</ins><span class="cx">
</span><del>- // Force single item into array
- if (!isArray(items)) {
- if (items instanceof DomQuery) {
- self.add(items.toArray());
- } else {
- push.call(self, items);
</del><ins>+ if (isString(items)) {
+ return self.add(DomQuery(items));
+ }
+
+ if (items.nodeType) {
+ return self.add([items]);
+ }
+
+ if (sort !== false) {
+ nodes = DomQuery.unique(self.toArray().concat(DomQuery.makeArray(items)));
+ self.length = nodes.length;
+ for (i = 0; i < nodes.length; i++) {
+ self[i] = nodes[i];
</ins><span class="cx"> }
</span><span class="cx"> } else {
</span><del>- push.apply(self, items);
</del><ins>+ push.apply(self, DomQuery.makeArray(items));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return self;
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ /**
+ * Sets/gets attributes on the elements in the current set.
+ *
+ * @method attr
+ * @param {String/Object} name Name of attribute to get or an object with attributes to set.
+ * @param {String} value Optional value to set.
+ * @return {tinymce.dom.DomQuery/String} Current set or the specified attribute when only the name is specified.
+ */
</ins><span class="cx"> attr: function(name, value) {
</span><del>- var self = this;
</del><ins>+ var self = this, hook;
</ins><span class="cx">
</span><span class="cx"> if (typeof name === "object") {
</span><del>- each(name, function(value, name) {
</del><ins>+ each(name, function(name, value) {
</ins><span class="cx"> self.attr(name, value);
</span><span class="cx"> });
</span><span class="cx"> } else if (isDefined(value)) {
</span><span class="cx"> this.each(function() {
</span><ins>+ var hook;
+
</ins><span class="cx"> if (this.nodeType === 1) {
</span><del>- this.setAttribute(name, value);
</del><ins>+ hook = attrHooks[name];
+ if (hook && hook.set) {
+ hook.set(this, value);
+ return;
+ }
+
+ if (value === null) {
+ this.removeAttribute(name, 2);
+ } else {
+ this.setAttribute(name, value, 2);
+ }
</ins><span class="cx"> }
</span><span class="cx"> });
</span><span class="cx"> } else {
</span><del>- return self[0] && self[0].nodeType === 1 ? self[0].getAttribute(name) : undefined;
</del><ins>+ if (self[0] && self[0].nodeType === 1) {
+ hook = attrHooks[name];
+ if (hook && hook.get) {
+ return hook.get(self[0], name);
+ }
+
+ if (booleanMap[name]) {
+ return self.prop(name) ? name : undef;
+ }
+
+ value = self[0].getAttribute(name, 2);
+
+ if (value === null) {
+ value = undef;
+ }
+ }
+
+ return value;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return self;
</span><span class="cx"> },
</span><span class="cx">
</span><del>- css: function(name, value) {
</del><ins>+ /**
+ * Removes attributse on the elements in the current set.
+ *
+ * @method removeAttr
+ * @param {String/Object} name Name of attribute to remove.
+ * @return {tinymce.dom.DomQuery/String} Current set.
+ */
+ removeAttr: function(name) {
+ return this.attr(name, null);
+ },
+
+ /**
+ * Sets/gets properties on the elements in the current set.
+ *
+ * @method attr
+ * @param {String/Object} name Name of property to get or an object with properties to set.
+ * @param {String} value Optional value to set.
+ * @return {tinymce.dom.DomQuery/String} Current set or the specified property when only the name is specified.
+ */
+ prop: function(name, value) {
</ins><span class="cx"> var self = this;
</span><span class="cx">
</span><ins>+ name = propFix[name] || name;
+
</ins><span class="cx"> if (typeof name === "object") {
</span><del>- each(name, function(value, name) {
- self.css(name, value);
</del><ins>+ each(name, function(name, value) {
+ self.prop(name, value);
</ins><span class="cx"> });
</span><ins>+ } else if (isDefined(value)) {
+ this.each(function() {
+ if (this.nodeType == 1) {
+ this[name] = value;
+ }
+ });
</ins><span class="cx"> } else {
</span><del>- // Camelcase it, if needed
- name = name.replace(/-(\D)/g, function(a, b) {
</del><ins>+ if (self[0] && self[0].nodeType && name in self[0]) {
+ return self[0][name];
+ }
+
+ return value;
+ }
+
+ return self;
+ },
+
+ /**
+ * Sets/gets styles on the elements in the current set.
+ *
+ * @method css
+ * @param {String/Object} name Name of style to get or an object with styles to set.
+ * @param {String} value Optional value to set.
+ * @return {tinymce.dom.DomQuery/String} Current set or the specified style when only the name is specified.
+ */
+ css: function(name, value) {
+ var self = this, elm, hook;
+
+ function camel(name) {
+ return name.replace(/-(\D)/g, function(a, b) {
</ins><span class="cx"> return b.toUpperCase();
</span><span class="cx"> });
</span><ins>+ }
</ins><span class="cx">
</span><ins>+ function dashed(name) {
+ return name.replace(/[A-Z]/g, function(a) {
+ return '-' + a;
+ });
+ }
+
+ if (typeof name === "object") {
+ each(name, function(name, value) {
+ self.css(name, value);
+ });
+ } else {
</ins><span class="cx"> if (isDefined(value)) {
</span><ins>+ name = camel(name);
+
</ins><span class="cx"> // Default px suffix on these
</span><span class="cx"> if (typeof(value) === 'number' && !numericCssMap[name]) {
</span><span class="cx"> value += 'px';
</span><span class="lines">@@ -2922,25 +3834,55 @@
</span><span class="cx"> self.each(function() {
</span><span class="cx"> var style = this.style;
</span><span class="cx">
</span><del>- // IE specific opacity
- if (name === "opacity" && this.runtimeStyle && typeof(this.runtimeStyle.opacity) === "undefined") {
- style.filter = value === '' ? '' : "alpha(opacity=" + (value * 100) + ")";
</del><ins>+ hook = cssHooks[name];
+ if (hook && hook.set) {
+ hook.set(this, value);
+ return;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> try {
</span><del>- style[name] = value;
</del><ins>+ this.style[cssFix[name] || name] = value;
</ins><span class="cx"> } catch (ex) {
</span><span class="cx"> // Ignore
</span><span class="cx"> }
</span><ins>+
+ if (value === null || value === '') {
+ if (style.removeProperty) {
+ style.removeProperty(dashed(name));
+ } else {
+ style.removeAttribute(name);
+ }
+ }
</ins><span class="cx"> });
</span><span class="cx"> } else {
</span><del>- return self[0] ? self[0].style[name] : undefined;
</del><ins>+ elm = self[0];
+
+ hook = cssHooks[name];
+ if (hook && hook.get) {
+ return hook.get(elm);
+ }
+
+ if (elm.ownerDocument.defaultView) {
+ try {
+ return elm.ownerDocument.defaultView.getComputedStyle(elm, null).getPropertyValue(dashed(name));
+ } catch (ex) {
+ return undef;
+ }
+ } else if (elm.currentStyle) {
+ return elm.currentStyle[camel(name)];
+ }
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return self;
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ /**
+ * Removes all nodes in set from the document.
+ *
+ * @method remove
+ * @return {tinymce.dom.DomQuery} Current set with the removed nodes.
+ */
</ins><span class="cx"> remove: function() {
</span><span class="cx"> var self = this, node, i = this.length;
</span><span class="cx">
</span><span class="lines">@@ -2956,6 +3898,12 @@
</span><span class="cx"> return this;
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ /**
+ * Empties all elements in set.
+ *
+ * @method empty
+ * @return {tinymce.dom.DomQuery} Current set with the empty nodes.
+ */
</ins><span class="cx"> empty: function() {
</span><span class="cx"> var self = this, node, i = this.length;
</span><span class="cx">
</span><span class="lines">@@ -2969,13 +3917,26 @@
</span><span class="cx"> return this;
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ /**
+ * Sets or gets the HTML of the current set or first set node.
+ *
+ * @method html
+ * @param {String} value Optional innerHTML value to set on each element.
+ * @return {tinymce.dom.DomQuery/String} Current set or the innerHTML of the first element.
+ */
</ins><span class="cx"> html: function(value) {
</span><span class="cx"> var self = this, i;
</span><span class="cx">
</span><span class="cx"> if (isDefined(value)) {
</span><span class="cx"> i = self.length;
</span><del>- while (i--) {
- self[i].innerHTML = value;
</del><ins>+
+ try {
+ while (i--) {
+ self[i].innerHTML = value;
+ }
+ } catch (ex) {
+ // Workaround for "Unkown runtime error" when DIV is added to P on IE
+ DomQuery(self[i]).empty().append(value);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return self;
</span><span class="lines">@@ -2984,21 +3945,39 @@
</span><span class="cx"> return self[0] ? self[0].innerHTML : '';
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ /**
+ * Sets or gets the text of the current set or first set node.
+ *
+ * @method text
+ * @param {String} value Optional innerText value to set on each element.
+ * @return {tinymce.dom.DomQuery/String} Current set or the innerText of the first element.
+ */
</ins><span class="cx"> text: function(value) {
</span><span class="cx"> var self = this, i;
</span><span class="cx">
</span><span class="cx"> if (isDefined(value)) {
</span><span class="cx"> i = self.length;
</span><span class="cx"> while (i--) {
</span><del>- self[i].innerText = self[0].textContent = value;
</del><ins>+ if ("innerText" in self[i]) {
+ self[i].innerText = value;
+ } else {
+ self[0].textContent = value;
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return self;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- return self[0] ? self[0].innerText || self[0].textContent : '';
</del><ins>+ return self[0] ? (self[0].innerText || self[0].textContent) : '';
</ins><span class="cx"> },
</span><span class="cx">
</span><ins>+ /**
+ * Appends the specified node/html or node set to the current set nodes.
+ *
+ * @method append
+ * @param {String/Element/Array/tinymce.dom.DomQuery} content Content to append to each element in set.
+ * @return {tinymce.dom.DomQuery} Current set.
+ */
</ins><span class="cx"> append: function() {
</span><span class="cx"> return domManipulate(this, arguments, function(node) {
</span><span class="cx"> if (this.nodeType === 1) {
</span><span class="lines">@@ -3007,70 +3986,216 @@
</span><span class="cx"> });
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ /**
+ * Prepends the specified node/html or node set to the current set nodes.
+ *
+ * @method prepend
+ * @param {String/Element/Array/tinymce.dom.DomQuery} content Content to prepend to each element in set.
+ * @return {tinymce.dom.DomQuery} Current set.
+ */
</ins><span class="cx"> prepend: function() {
</span><span class="cx"> return domManipulate(this, arguments, function(node) {
</span><span class="cx"> if (this.nodeType === 1) {
</span><span class="cx"> this.insertBefore(node, this.firstChild);
</span><span class="cx"> }
</span><del>- });
</del><ins>+ }, true);
</ins><span class="cx"> },
</span><span class="cx">
</span><ins>+ /**
+ * Adds the specified elements before current set nodes.
+ *
+ * @method before
+ * @param {String/Element/Array/tinymce.dom.DomQuery} content Content to add before to each element in set.
+ * @return {tinymce.dom.DomQuery} Current set.
+ */
</ins><span class="cx"> before: function() {
</span><span class="cx"> var self = this;
</span><span class="cx">
</span><span class="cx"> if (self[0] && self[0].parentNode) {
</span><span class="cx"> return domManipulate(self, arguments, function(node) {
</span><del>- this.parentNode.insertBefore(node, this.nextSibling);
</del><ins>+ this.parentNode.insertBefore(node, this);
</ins><span class="cx"> });
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return self;
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ /**
+ * Adds the specified elements after current set nodes.
+ *
+ * @method after
+ * @param {String/Element/Array/tinymce.dom.DomQuery} content Content to add after to each element in set.
+ * @return {tinymce.dom.DomQuery} Current set.
+ */
</ins><span class="cx"> after: function() {
</span><span class="cx"> var self = this;
</span><span class="cx">
</span><span class="cx"> if (self[0] && self[0].parentNode) {
</span><span class="cx"> return domManipulate(self, arguments, function(node) {
</span><del>- this.parentNode.insertBefore(node, this);
- });
</del><ins>+ this.parentNode.insertBefore(node, this.nextSibling);
+ }, true);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return self;
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ /**
+ * Appends the specified set nodes to the specified selector/instance.
+ *
+ * @method appendTo
+ * @param {String/Element/Array/tinymce.dom.DomQuery} val Item to append the current set to.
+ * @return {tinymce.dom.DomQuery} Current set with the appended nodes.
+ */
</ins><span class="cx"> appendTo: function(val) {
</span><span class="cx"> DomQuery(val).append(this);
</span><span class="cx">
</span><span class="cx"> return this;
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ /**
+ * Prepends the specified set nodes to the specified selector/instance.
+ *
+ * @method prependTo
+ * @param {String/Element/Array/tinymce.dom.DomQuery} val Item to prepend the current set to.
+ * @return {tinymce.dom.DomQuery} Current set with the prepended nodes.
+ */
+ prependTo: function(val) {
+ DomQuery(val).prepend(this);
+
+ return this;
+ },
+
+ /**
+ * Replaces the nodes in set with the specified content.
+ *
+ * @method replaceWith
+ * @param {String/Element/Array/tinymce.dom.DomQuery} content Content to replace nodes with.
+ * @return {tinymce.dom.DomQuery} Set with replaced nodes.
+ */
+ replaceWith: function(content) {
+ return this.before(content).remove();
+ },
+
+ /**
+ * Wraps all elements in set with the specified wrapper.
+ *
+ * @method wrap
+ * @param {String/Element/Array/tinymce.dom.DomQuery} content Content to wrap nodes with.
+ * @return {tinymce.dom.DomQuery} Set with wrapped nodes.
+ */
+ wrap: function(wrapper) {
+ return wrap(this, wrapper);
+ },
+
+ /**
+ * Wraps all nodes in set with the specified wrapper. If the nodes are siblings all of them
+ * will be wrapped in the same wrapper.
+ *
+ * @method wrapAll
+ * @param {String/Element/Array/tinymce.dom.DomQuery} content Content to wrap nodes with.
+ * @return {tinymce.dom.DomQuery} Set with wrapped nodes.
+ */
+ wrapAll: function(wrapper) {
+ return wrap(this, wrapper, true);
+ },
+
+ /**
+ * Wraps all elements inner contents in set with the specified wrapper.
+ *
+ * @method wrapInner
+ * @param {String/Element/Array/tinymce.dom.DomQuery} content Content to wrap nodes with.
+ * @return {tinymce.dom.DomQuery} Set with wrapped nodes.
+ */
+ wrapInner: function(wrapper) {
+ this.each(function() {
+ DomQuery(this).contents().wrapAll(wrapper);
+ });
+
+ return this;
+ },
+
+ /**
+ * Unwraps all elements by removing the parent element of each item in set.
+ *
+ * @method unwrap
+ * @return {tinymce.dom.DomQuery} Set with unwrapped nodes.
+ */
+ unwrap: function() {
+ return this.parent().each(function() {
+ DomQuery(this).replaceWith(this.childNodes);
+ });
+ },
+
+ /**
+ * Clones all nodes in set.
+ *
+ * @method clone
+ * @return {tinymce.dom.DomQuery} Set with cloned nodes.
+ */
+ clone: function() {
+ var result = [];
+
+ this.each(function() {
+ result.push(this.cloneNode(true));
+ });
+
+ return DomQuery(result);
+ },
+
+ /**
+ * Adds the specified class name to the current set elements.
+ *
+ * @method addClass
+ * @param {String} className Class name to add.
+ * @return {tinymce.dom.DomQuery} Current set.
+ */
</ins><span class="cx"> addClass: function(className) {
</span><span class="cx"> return this.toggleClass(className, true);
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ /**
+ * Removes the specified class name to the current set elements.
+ *
+ * @method removeClass
+ * @param {String} className Class name to remove.
+ * @return {tinymce.dom.DomQuery} Current set.
+ */
</ins><span class="cx"> removeClass: function(className) {
</span><span class="cx"> return this.toggleClass(className, false);
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ /**
+ * Toggles the specified class name on the current set elements.
+ *
+ * @method toggleClass
+ * @param {String} className Class name to add/remove.
+ * @param {Boolean} state Optional state to toggle on/off.
+ * @return {tinymce.dom.DomQuery} Current set.
+ */
</ins><span class="cx"> toggleClass: function(className, state) {
</span><span class="cx"> var self = this;
</span><span class="cx">
</span><ins>+ // Functions are not supported
+ if (typeof className != 'string') {
+ return self;
+ }
+
</ins><span class="cx"> if (className.indexOf(' ') !== -1) {
</span><span class="cx"> each(className.split(' '), function() {
</span><span class="cx"> self.toggleClass(this, state);
</span><span class="cx"> });
</span><span class="cx"> } else {
</span><del>- self.each(function(node) {
- var existingClassName;
</del><ins>+ self.each(function(index, node) {
+ var existingClassName, classState;
</ins><span class="cx">
</span><del>- if (hasClass(node, className) !== state) {
</del><ins>+ classState = hasClass(node, className);
+ if (classState !== state) {
</ins><span class="cx"> existingClassName = node.className;
</span><span class="cx">
</span><del>- if (state) {
</del><ins>+ if (classState) {
+ node.className = trim((" " + existingClassName + " ").replace(' ' + className + ' ', ' '));
+ } else {
</ins><span class="cx"> node.className += existingClassName ? ' ' + className : className;
</span><del>- } else {
- node.className = trim((" " + existingClassName + " ").replace(' ' + className + ' ', ' '));
</del><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> });
</span><span class="lines">@@ -3079,100 +4204,234 @@
</span><span class="cx"> return self;
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ /**
+ * Returns true/false if the first item in set has the specified class.
+ *
+ * @method hasClass
+ * @param {String} className Class name to check for.
+ * @return {Boolean} True/false if the set has the specified class.
+ */
</ins><span class="cx"> hasClass: function(className) {
</span><span class="cx"> return hasClass(this[0], className);
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ /**
+ * Executes the callback function for each item DomQuery collection. If you return false in the
+ * callback it will break the loop.
+ *
+ * @method each
+ * @param {function} callback Callback function to execute for each item.
+ * @return {tinymce.dom.DomQuery} Current set.
+ */
</ins><span class="cx"> each: function(callback) {
</span><span class="cx"> return each(this, callback);
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ /**
+ * Binds an event with callback function to the elements in set.
+ *
+ * @method on
+ * @param {String} name Name of the event to bind.
+ * @param {function} callback Callback function to execute when the event occurs.
+ * @return {tinymce.dom.DomQuery} Current set.
+ */
</ins><span class="cx"> on: function(name, callback) {
</span><span class="cx"> return this.each(function() {
</span><span class="cx"> Event.bind(this, name, callback);
</span><span class="cx"> });
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ /**
+ * Unbinds an event with callback function to the elements in set.
+ *
+ * @method off
+ * @param {String} name Optional name of the event to bind.
+ * @param {function} callback Optional callback function to execute when the event occurs.
+ * @return {tinymce.dom.DomQuery} Current set.
+ */
</ins><span class="cx"> off: function(name, callback) {
</span><span class="cx"> return this.each(function() {
</span><span class="cx"> Event.unbind(this, name, callback);
</span><span class="cx"> });
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ /**
+ * Triggers the specified event by name or event object.
+ *
+ * @method trigger
+ * @param {String/Object} name Name of the event to trigger or event object.
+ * @return {tinymce.dom.DomQuery} Current set.
+ */
+ trigger: function(name) {
+ return this.each(function() {
+ if (typeof name == 'object') {
+ Event.fire(this, name.type, name);
+ } else {
+ Event.fire(this, name);
+ }
+ });
+ },
+
+ /**
+ * Shows all elements in set.
+ *
+ * @method show
+ * @return {tinymce.dom.DomQuery} Current set.
+ */
</ins><span class="cx"> show: function() {
</span><span class="cx"> return this.css('display', '');
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ /**
+ * Hides all elements in set.
+ *
+ * @method hide
+ * @return {tinymce.dom.DomQuery} Current set.
+ */
</ins><span class="cx"> hide: function() {
</span><span class="cx"> return this.css('display', 'none');
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ /**
+ * Slices the current set.
+ *
+ * @method slice
+ * @param {Number} start Start index to slice at.
+ * @param {Number} end Optional ened index to end slice at.
+ * @return {tinymce.dom.DomQuery} Sliced set.
+ */
</ins><span class="cx"> slice: function() {
</span><span class="cx"> return new DomQuery(slice.apply(this, arguments));
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ /**
+ * Makes the set equal to the specified index.
+ *
+ * @method eq
+ * @param {Number} index Index to set it equal to.
+ * @return {tinymce.dom.DomQuery} Single item set.
+ */
</ins><span class="cx"> eq: function(index) {
</span><span class="cx"> return index === -1 ? this.slice(index) : this.slice(index, +index + 1);
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ /**
+ * Makes the set equal to first element in set.
+ *
+ * @method first
+ * @return {tinymce.dom.DomQuery} Single item set.
+ */
</ins><span class="cx"> first: function() {
</span><span class="cx"> return this.eq(0);
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ /**
+ * Makes the set equal to last element in set.
+ *
+ * @method last
+ * @return {tinymce.dom.DomQuery} Single item set.
+ */
</ins><span class="cx"> last: function() {
</span><span class="cx"> return this.eq(-1);
</span><span class="cx"> },
</span><span class="cx">
</span><del>- replaceWith: function(content) {
- var self = this;
</del><ins>+ /**
+ * Finds elements by the specified selector for each element in set.
+ *
+ * @method find
+ * @param {String} selector Selector to find elements by.
+ * @return {tinymce.dom.DomQuery} Set with matches elements.
+ */
+ find: function(selector) {
+ var i, l, ret = [];
</ins><span class="cx">
</span><del>- if (self[0]) {
- self[0].parentNode.replaceChild(DomQuery(content)[0], self[0]);
</del><ins>+ for (i = 0, l = this.length; i < l; i++) {
+ DomQuery.find(selector, this[i], ret);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- return self;
</del><ins>+ return DomQuery(ret);
</ins><span class="cx"> },
</span><span class="cx">
</span><del>- wrap: function(wrapper) {
- wrapper = DomQuery(wrapper)[0];
</del><ins>+ /**
+ * Filters the current set with the specified selector.
+ *
+ * @method filter
+ * @param {String/function} selector Selector to filter elements by.
+ * @return {tinymce.dom.DomQuery} Set with filtered elements.
+ */
+ filter: function(selector) {
+ if (typeof selector == 'function') {
+ return DomQuery(grep(this.toArray(), function(item, i) {
+ return selector(i, item);
+ }));
+ }
</ins><span class="cx">
</span><del>- return this.each(function() {
- var self = this, newWrapper = wrapper.cloneNode(false);
- self.parentNode.insertBefore(newWrapper, self);
- newWrapper.appendChild(self);
- });
</del><ins>+ return DomQuery(DomQuery.filter(selector, this.toArray()));
</ins><span class="cx"> },
</span><span class="cx">
</span><del>- unwrap: function() {
- return this.each(function() {
- var self = this, node = self.firstChild, currentNode;
</del><ins>+ /**
+ * Gets the current node or any partent matching the specified selector.
+ *
+ * @method closest
+ * @param {String/Element/tinymce.dom.DomQuery} selector Selector or element to find.
+ * @return {tinymce.dom.DomQuery} Set with closest elements.
+ */
+ closest: function(selector) {
+ var result = [];
</ins><span class="cx">
</span><ins>+ if (selector instanceof DomQuery) {
+ selector = selector[0];
+ }
+
+ this.each(function(i, node) {
</ins><span class="cx"> while (node) {
</span><del>- currentNode = node;
- node = node.nextSibling;
- self.parentNode.insertBefore(currentNode, self);
</del><ins>+ if (typeof selector == 'string' && DomQuery(node).is(selector)) {
+ result.push(node);
+ break;
+ } else if (node == selector) {
+ result.push(node);
+ break;
+ }
+
+ node = node.parentNode;
</ins><span class="cx"> }
</span><span class="cx"> });
</span><ins>+
+ return DomQuery(result);
</ins><span class="cx"> },
</span><span class="cx">
</span><del>- clone: function() {
- var result = [];
</del><ins>+ /**
+ * Returns the offset of the first element in set or sets the top/left css properties of all elements in set.
+ *
+ * @method offset
+ * @param {Object} offset Optional offset object to set on each item.
+ * @return {Object/tinymce.dom.DomQuery} Returns the first element offset or the current set if you specified an offset.
+ */
+ offset: function(offset) {
+ var elm, doc, docElm;
+ var x = 0, y = 0, pos;
</ins><span class="cx">
</span><del>- this.each(function() {
- result.push(this.cloneNode(true));
- });
</del><ins>+ if (!offset) {
+ elm = this[0];
</ins><span class="cx">
</span><del>- return DomQuery(result);
- },
</del><ins>+ if (elm) {
+ doc = elm.ownerDocument;
+ docElm = doc.documentElement;
</ins><span class="cx">
</span><del>- find: function(selector) {
- var i, l, ret = [];
</del><ins>+ if (elm.getBoundingClientRect) {
+ pos = elm.getBoundingClientRect();
+ x = pos.left + (docElm.scrollLeft || doc.body.scrollLeft) - docElm.clientLeft;
+ y = pos.top + (docElm.scrollTop || doc.body.scrollTop) - docElm.clientTop;
+ }
+ }
</ins><span class="cx">
</span><del>- for (i = 0, l = this.length; i < l; i++) {
- DomQuery.find(selector, this[i], ret);
</del><ins>+ return {
+ left: x,
+ top: y
+ };
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- return DomQuery(ret);
</del><ins>+ return this.css(offset);
</ins><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> push: push,
</span><span class="lines">@@ -3181,21 +4440,90 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> // Static members
</span><del>- extend(DomQuery, {
- extend: extend,
- toArray: toArray,
</del><ins>+ Tools.extend(DomQuery, {
+ /**
+ * Extends the specified object with one or more objects.
+ *
+ * @static
+ * @method extend
+ * @param {Object} target Target object to extend with new items.
+ * @param {Object..} object Object to extend the target with.
+ * @return {Object} Extended input object.
+ */
+ extend: Tools.extend,
+
+ /**
+ * Creates an array out of an array like object.
+ *
+ * @static
+ * @method makeArray
+ * @param {Object} object Object to convert to array.
+ * @return {Arrau} Array produced from object.
+ */
+ makeArray: Tools.toArray,
+
+ /**
+ * Returns the index of the specified item inside the array.
+ *
+ * @static
+ * @method inArray
+ * @param {Object} item Item to look for.
+ * @param {Array} array Array to look for item in.
+ * @return {Number} Index of the item or -1.
+ */
</ins><span class="cx"> inArray: inArray,
</span><del>- isArray: isArray,
</del><ins>+
+ /**
+ * Returns true/false if the specified object is an array or not.
+ *
+ * @static
+ * @method isArray
+ * @param {Object} array Object to check if it's an array or not.
+ * @return {Boolean} True/false if the object is an array.
+ */
+ isArray: Tools.isArray,
+
+ /**
+ * Executes the callback function for each item in array/object. If you return false in the
+ * callback it will break the loop.
+ *
+ * @static
+ * @method each
+ * @param {Object} obj Object to iterate.
+ * @param {function} callback Callback function to execute for each item.
+ */
</ins><span class="cx"> each: each,
</span><ins>+
+ /**
+ * Removes whitespace from the beginning and end of a string.
+ *
+ * @static
+ * @method trim
+ * @param {String} str String to remove whitespace from.
+ * @return {String} New string with removed whitespace.
+ */
</ins><span class="cx"> trim: trim,
</span><del>- makeMap: makeMap,
</del><span class="cx">
</span><ins>+ /**
+ * Filters out items from the input array by calling the specified function for each item.
+ * If the function returns false the item will be excluded if it returns true it will be included.
+ *
+ * @static
+ * @method grep
+ * @param {Array} array Array of items to loop though.
+ * @param {function} callback Function to call for each item. Include/exclude depends on it's return value.
+ * @return {Array} New array with values imported and filtered based in input.
+ * @example
+ * // Filter out some items, this will return an array with 4 and 5
+ * var items = DomQuery.grep([1, 2, 3, 4, 5], function(v) {return v > 3;});
+ */
+ grep: grep,
+
</ins><span class="cx"> // Sizzle
</span><span class="cx"> find: Sizzle,
</span><span class="cx"> expr: Sizzle.selectors,
</span><span class="cx"> unique: Sizzle.uniqueSort,
</span><span class="cx"> text: Sizzle.getText,
</span><del>- isXMLDoc: Sizzle.isXML,
</del><span class="cx"> contains: Sizzle.contains,
</span><span class="cx"> filter: function(expr, elems, not) {
</span><span class="cx"> if (not) {
</span><span class="lines">@@ -3215,7 +4543,21 @@
</span><span class="cx"> function dir(el, prop, until) {
</span><span class="cx"> var matched = [], cur = el[prop];
</span><span class="cx">
</span><del>- while (cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !DomQuery(cur).is(until))) {
</del><ins>+ if (typeof until != 'string' && until instanceof DomQuery) {
+ until = until[0];
+ }
+
+ while (cur && cur.nodeType !== 9) {
+ if (until !== undefined) {
+ if (cur === until) {
+ break;
+ }
+
+ if (typeof until == 'string' && DomQuery(cur).is(until)) {
+ break;
+ }
+ }
+
</ins><span class="cx"> if (cur.nodeType === 1) {
</span><span class="cx"> matched.push(cur);
</span><span class="cx"> }
</span><span class="lines">@@ -3226,71 +4568,139 @@
</span><span class="cx"> return matched;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function sibling(n, el, siblingName, nodeType) {
- var r = [];
</del><ins>+ function sibling(node, siblingName, nodeType, until) {
+ var result = [];
</ins><span class="cx">
</span><del>- for(; n; n = n[siblingName]) {
- if ((!nodeType || n.nodeType === nodeType) && n !== el) {
- r.push(n);
</del><ins>+ if (until instanceof DomQuery) {
+ until = until[0];
+ }
+
+ for (; node; node = node[siblingName]) {
+ if (nodeType && node.nodeType !== nodeType) {
+ continue;
</ins><span class="cx"> }
</span><ins>+
+ if (until !== undefined) {
+ if (node === until) {
+ break;
+ }
+
+ if (typeof until == 'string' && DomQuery(node).is(until)) {
+ break;
+ }
+ }
+
+ result.push(node);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- return r;
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+ function firstSibling(node, siblingName, nodeType) {
+ for (node = node[siblingName]; node; node = node[siblingName]) {
+ if (node.nodeType == nodeType) {
+ return node;
+ }
+ }
+
+ return null;
+ }
+
</ins><span class="cx"> each({
</span><ins>+ /**
+ * Returns a new collection with the parent of each item in current collection matching the optional selector.
+ *
+ * @method parent
+ * @param {String} selector Selector to match parents agains.
+ * @return {tinymce.dom.DomQuery} New DomQuery instance with all matching parents.
+ */
</ins><span class="cx"> parent: function(node) {
</span><span class="cx"> var parent = node.parentNode;
</span><span class="cx">
</span><span class="cx"> return parent && parent.nodeType !== 11 ? parent : null;
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ /**
+ * Returns a new collection with the all the parents of each item in current collection matching the optional selector.
+ *
+ * @method parents
+ * @param {String} selector Selector to match parents agains.
+ * @return {tinymce.dom.DomQuery} New DomQuery instance with all matching parents.
+ */
</ins><span class="cx"> parents: function(node) {
</span><span class="cx"> return dir(node, "parentNode");
</span><span class="cx"> },
</span><span class="cx">
</span><del>- parentsUntil: function(node, until) {
- return dir(node, "parentNode", until);
- },
-
</del><ins>+ /**
+ * Returns a new collection with next sibling of each item in current collection matching the optional selector.
+ *
+ * @method next
+ * @param {String} selector Selector to match the next element against.
+ * @return {tinymce.dom.DomQuery} New DomQuery instance with all matching elements.
+ */
</ins><span class="cx"> next: function(node) {
</span><del>- return sibling(node, 'nextSibling', 1);
</del><ins>+ return firstSibling(node, 'nextSibling', 1);
</ins><span class="cx"> },
</span><span class="cx">
</span><ins>+ /**
+ * Returns a new collection with previous sibling of each item in current collection matching the optional selector.
+ *
+ * @method prev
+ * @param {String} selector Selector to match the previous element against.
+ * @return {tinymce.dom.DomQuery} New DomQuery instance with all matching elements.
+ */
</ins><span class="cx"> prev: function(node) {
</span><del>- return sibling(node, 'previousSibling', 1);
</del><ins>+ return firstSibling(node, 'previousSibling', 1);
</ins><span class="cx"> },
</span><span class="cx">
</span><del>- nextNodes: function(node) {
- return sibling(node, 'nextSibling');
- },
-
- prevNodes: function(node) {
- return sibling(node, 'previousSibling');
- },
-
</del><ins>+ /**
+ * Returns all child elements matching the optional selector.
+ *
+ * @method children
+ * @param {String} selector Selector to match the elements against.
+ * @return {tinymce.dom.DomQuery} New DomQuery instance with all matching elements.
+ */
</ins><span class="cx"> children: function(node) {
</span><span class="cx"> return sibling(node.firstChild, 'nextSibling', 1);
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ /**
+ * Returns all child nodes matching the optional selector.
+ *
+ * @method contents
+ * @return {tinymce.dom.DomQuery} New DomQuery instance with all matching elements.
+ */
</ins><span class="cx"> contents: function(node) {
</span><del>- return toArray((node.nodeName === "iframe" ? node.contentDocument || node.contentWindow.document : node).childNodes);
</del><ins>+ return Tools.toArray((node.nodeName === "iframe" ? node.contentDocument || node.contentWindow.document : node).childNodes);
</ins><span class="cx"> }
</span><del>- }, function(name, fn){
</del><ins>+ }, function(name, fn) {
</ins><span class="cx"> DomQuery.fn[name] = function(selector) {
</span><del>- var self = this, result;
</del><ins>+ var self = this, result = [];
</ins><span class="cx">
</span><del>- if (self.length > 1) {
- throw new Error("DomQuery only supports traverse functions on a single node.");
- }
</del><ins>+ self.each(function() {
+ var nodes = fn.call(result, this, selector, result);
</ins><span class="cx">
</span><del>- if (self[0]) {
- result = fn(self[0], selector);
</del><ins>+ if (nodes) {
+ if (DomQuery.isArray(nodes)) {
+ result.push.apply(result, nodes);
+ } else {
+ result.push(nodes);
+ }
+ }
+ });
+
+ // If traversing on multiple elements we might get the same elements twice
+ if (this.length > 1) {
+ result = DomQuery.unique(result);
+
+ if (name.indexOf('parents') === 0) {
+ result = result.reverse();
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> result = DomQuery(result);
</span><span class="cx">
</span><del>- if (selector && name !== "parentsUntil") {
</del><ins>+ if (selector) {
</ins><span class="cx"> return result.filter(selector);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3298,16 +4708,185 @@
</span><span class="cx"> };
</span><span class="cx"> });
</span><span class="cx">
</span><del>- DomQuery.fn.filter = function(selector) {
- return DomQuery.filter(selector);
- };
</del><ins>+ each({
+ /**
+ * Returns a new collection with the all the parents until the matching selector/element
+ * of each item in current collection matching the optional selector.
+ *
+ * @method parentsUntil
+ * @param {String/Element/tinymce.dom.DomQuery} until Until the matching selector or element.
+ * @return {tinymce.dom.DomQuery} New DomQuery instance with all matching parents.
+ */
+ parentsUntil: function(node, until) {
+ return dir(node, "parentNode", until);
+ },
</ins><span class="cx">
</span><ins>+ /**
+ * Returns a new collection with all next siblings of each item in current collection matching the optional selector.
+ *
+ * @method nextUntil
+ * @param {String/Element/tinymce.dom.DomQuery} until Until the matching selector or element.
+ * @return {tinymce.dom.DomQuery} New DomQuery instance with all matching elements.
+ */
+ nextUntil: function(node, until) {
+ return sibling(node, 'nextSibling', 1, until).slice(1);
+ },
+
+ /**
+ * Returns a new collection with all previous siblings of each item in current collection matching the optional selector.
+ *
+ * @method prevUntil
+ * @param {String/Element/tinymce.dom.DomQuery} until Until the matching selector or element.
+ * @return {tinymce.dom.DomQuery} New DomQuery instance with all matching elements.
+ */
+ prevUntil: function(node, until) {
+ return sibling(node, 'previousSibling', 1, until).slice(1);
+ }
+ }, function(name, fn) {
+ DomQuery.fn[name] = function(selector, filter) {
+ var self = this, result = [];
+
+ self.each(function() {
+ var nodes = fn.call(result, this, selector, result);
+
+ if (nodes) {
+ if (DomQuery.isArray(nodes)) {
+ result.push.apply(result, nodes);
+ } else {
+ result.push(nodes);
+ }
+ }
+ });
+
+ // If traversing on multiple elements we might get the same elements twice
+ if (this.length > 1) {
+ result = DomQuery.unique(result);
+
+ if (name.indexOf('parents') === 0 || name === 'prevUntil') {
+ result = result.reverse();
+ }
+ }
+
+ result = DomQuery(result);
+
+ if (filter) {
+ return result.filter(filter);
+ }
+
+ return result;
+ };
+ });
+
+ /**
+ * Returns true/false if the current set items matches the selector.
+ *
+ * @method is
+ * @param {String} selector Selector to match the elements against.
+ * @return {Boolean} True/false if the current set matches the selector.
+ */
</ins><span class="cx"> DomQuery.fn.is = function(selector) {
</span><span class="cx"> return !!selector && this.filter(selector).length > 0;
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> DomQuery.fn.init.prototype = DomQuery.fn;
</span><span class="cx">
</span><ins>+ DomQuery.overrideDefaults = function(callback) {
+ var defaults;
+
+ function jQuerySub(selector, context) {
+ defaults = defaults || callback();
+
+ if (arguments.length === 0) {
+ selector = defaults.element;
+ }
+
+ if (!context) {
+ context = defaults.context;
+ }
+
+ return new jQuerySub.fn.init(selector, context);
+ }
+
+ DomQuery.extend(jQuerySub, this);
+
+ return jQuerySub;
+ };
+
+ function appendHooks(targetHooks, prop, hooks) {
+ each(hooks, function(name, func) {
+ targetHooks[name] = targetHooks[name] || {};
+ targetHooks[name][prop] = func;
+ });
+ }
+
+ if (Env.ie && Env.ie < 8) {
+ appendHooks(attrHooks, 'get', {
+ maxlength: function(elm) {
+ var value = elm.maxLength;
+
+ if (value === 0x7fffffff) {
+ return undef;
+ }
+
+ return value;
+ },
+
+ size: function(elm) {
+ var value = elm.size;
+
+ if (value === 20) {
+ return undef;
+ }
+
+ return value;
+ },
+
+ 'class': function(elm) {
+ return elm.className;
+ },
+
+ style: function(elm) {
+ var value = elm.style.cssText;
+
+ if (value.length === 0) {
+ return undef;
+ }
+
+ return value;
+ }
+ });
+
+ appendHooks(attrHooks, 'set', {
+ 'class': function(elm, value) {
+ elm.className = value;
+ },
+
+ style: function(elm, value) {
+ elm.style.cssText = value;
+ }
+ });
+ }
+
+ if (Env.ie && Env.ie < 9) {
+ cssFix.float = 'styleFloat';
+
+ appendHooks(cssHooks, 'set', {
+ opacity: function(elm, value) {
+ var style = elm.style;
+
+ if (value === null || value === '') {
+ style.removeAttribute('filter');
+ } else {
+ style.zoom = 1;
+ style.filter = 'alpha(opacity=' + (value * 100) + ')';
+ }
+ }
+ });
+ }
+
+ DomQuery.attrHooks = attrHooks;
+ DomQuery.cssHooks = cssHooks;
+
</ins><span class="cx"> return DomQuery;
</span><span class="cx"> });
</span><span class="cx">
</span><span class="lines">@@ -3693,30 +5272,44 @@
</span><span class="cx"> * TreeWalker class enables you to walk the DOM in a linear manner.
</span><span class="cx"> *
</span><span class="cx"> * @class tinymce.dom.TreeWalker
</span><ins>+ * @example
+ * var walker = new tinymce.dom.TreeWalker(startNode);
+ *
+ * do {
+ * console.log(walker.current());
+ * } while (walker.next());
</ins><span class="cx"> */
</span><span class="cx"> define("tinymce/dom/TreeWalker", [], function() {
</span><del>- return function(start_node, root_node) {
- var node = start_node;
</del><ins>+ /**
+ * Constructs a new TreeWalker instance.
+ *
+ * @constructor
+ * @method TreeWalker
+ * @param {Node} startNode Node to start walking from.
+ * @param {node} rootNode Optional root node to never walk out of.
+ */
+ return function(startNode, rootNode) {
+ var node = startNode;
</ins><span class="cx">
</span><del>- function findSibling(node, start_name, sibling_name, shallow) {
</del><ins>+ function findSibling(node, startName, siblingName, shallow) {
</ins><span class="cx"> var sibling, parent;
</span><span class="cx">
</span><span class="cx"> if (node) {
</span><span class="cx"> // Walk into nodes if it has a start
</span><del>- if (!shallow && node[start_name]) {
- return node[start_name];
</del><ins>+ if (!shallow && node[startName]) {
+ return node[startName];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Return the sibling if it has one
</span><del>- if (node != root_node) {
- sibling = node[sibling_name];
</del><ins>+ if (node != rootNode) {
+ sibling = node[siblingName];
</ins><span class="cx"> if (sibling) {
</span><span class="cx"> return sibling;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Walk up the parents to look for siblings
</span><del>- for (parent = node.parentNode; parent && parent != root_node; parent = parent.parentNode) {
- sibling = parent[sibling_name];
</del><ins>+ for (parent = node.parentNode; parent && parent != rootNode; parent = parent.parentNode) {
+ sibling = parent[siblingName];
</ins><span class="cx"> if (sibling) {
</span><span class="cx"> return sibling;
</span><span class="cx"> }
</span><span class="lines">@@ -3759,512 +5352,6 @@
</span><span class="cx"> };
</span><span class="cx"> });
</span><span class="cx">
</span><del>-// Included from: js/tinymce/classes/util/Tools.js
-
-/**
- * Tools.js
- *
- * Copyright, Moxiecode Systems AB
- * Released under LGPL License.
- *
- * License: http://www.tinymce.com/license
- * Contributing: http://www.tinymce.com/contributing
- */
-
-/**
- * This class contains various utlity functions. These are also exposed
- * directly on the tinymce namespace.
- *
- * @class tinymce.util.Tools
- */
-define("tinymce/util/Tools", [], function() {
- /**
- * Removes whitespace from the beginning and end of a string.
- *
- * @method trim
- * @param {String} s String to remove whitespace from.
- * @return {String} New string with removed whitespace.
- */
- var whiteSpaceRegExp = /^\s*|\s*$/g;
-
- function trim(str) {
- return (str === null || str === undefined) ? '' : ("" + str).replace(whiteSpaceRegExp, '');
- }
-
- /**
- * Returns true/false if the object is an array or not.
- *
- * @method isArray
- * @param {Object} obj Object to check.
- * @return {boolean} true/false state if the object is an array or not.
- */
- var isArray = Array.isArray || function(obj) {
- return Object.prototype.toString.call(obj) === "[object Array]";
- };
-
- /**
- * Checks if a object is of a specific type for example an array.
- *
- * @method is
- * @param {Object} o Object to check type of.
- * @param {string} t Optional type to check for.
- * @return {Boolean} true/false if the object is of the specified type.
- */
- function is(o, t) {
- if (!t) {
- return o !== undefined;
- }
-
- if (t == 'array' && isArray(o)) {
- return true;
- }
-
- return typeof(o) == t;
- }
-
- /**
- * Converts the specified object into a real JavaScript array.
- *
- * @method toArray
- * @param {Object} obj Object to convert into array.
- * @return {Array} Array object based in input.
- */
- function toArray(obj) {
- var array = [], i, l;
-
- for (i = 0, l = obj.length; i < l; i++) {
- array[i] = obj[i];
- }
-
- return array;
- }
-
- /**
- * Makes a name/object map out of an array with names.
- *
- * @method makeMap
- * @param {Array/String} items Items to make map out of.
- * @param {String} delim Optional delimiter to split string by.
- * @param {Object} map Optional map to add items to.
- * @return {Object} Name/value map of items.
- */
- function makeMap(items, delim, map) {
- var i;
-
- items = items || [];
- delim = delim || ',';
-
- if (typeof(items) == "string") {
- items = items.split(delim);
- }
-
- map = map || {};
-
- i = items.length;
- while (i--) {
- map[items[i]] = {};
- }
-
- return map;
- }
-
- /**
- * Performs an iteration of all items in a collection such as an object or array. This method will execure the
- * callback function for each item in the collection, if the callback returns false the iteration will terminate.
- * The callback has the following format: cb(value, key_or_index).
- *
- * @method each
- * @param {Object} o Collection to iterate.
- * @param {function} cb Callback function to execute for each item.
- * @param {Object} s Optional scope to execute the callback in.
- * @example
- * // Iterate an array
- * tinymce.each([1,2,3], function(v, i) {
- * console.debug("Value: " + v + ", Index: " + i);
- * });
- *
- * // Iterate an object
- * tinymce.each({a: 1, b: 2, c: 3], function(v, k) {
- * console.debug("Value: " + v + ", Key: " + k);
- * });
- */
- function each(o, cb, s) {
- var n, l;
-
- if (!o) {
- return 0;
- }
-
- s = s || o;
-
- if (o.length !== undefined) {
- // Indexed arrays, needed for Safari
- for (n = 0, l = o.length; n < l; n++) {
- if (cb.call(s, o[n], n, o) === false) {
- return 0;
- }
- }
- } else {
- // Hashtables
- for (n in o) {
- if (o.hasOwnProperty(n)) {
- if (cb.call(s, o[n], n, o) === false) {
- return 0;
- }
- }
- }
- }
-
- return 1;
- }
-
- /**
- * Creates a new array by the return value of each iteration function call. This enables you to convert
- * one array list into another.
- *
- * @method map
- * @param {Array} a Array of items to iterate.
- * @param {function} f Function to call for each item. It's return value will be the new value.
- * @return {Array} Array with new values based on function return values.
- */
- function map(a, f) {
- var o = [];
-
- each(a, function(v) {
- o.push(f(v));
- });
-
- return o;
- }
-
- /**
- * Filters out items from the input array by calling the specified function for each item.
- * If the function returns false the item will be excluded if it returns true it will be included.
- *
- * @method grep
- * @param {Array} a Array of items to loop though.
- * @param {function} f Function to call for each item. Include/exclude depends on it's return value.
- * @return {Array} New array with values imported and filtered based in input.
- * @example
- * // Filter out some items, this will return an array with 4 and 5
- * var items = tinymce.grep([1,2,3,4,5], function(v) {return v > 3;});
- */
- function grep(a, f) {
- var o = [];
-
- each(a, function(v) {
- if (!f || f(v)) {
- o.push(v);
- }
- });
-
- return o;
- }
-
- /**
- * Creates a class, subclass or static singleton.
- * More details on this method can be found in the Wiki.
- *
- * @method create
- * @param {String} s Class name, inheritage and prefix.
- * @param {Object} p Collection of methods to add to the class.
- * @param {Object} root Optional root object defaults to the global window object.
- * @example
- * // Creates a basic class
- * tinymce.create('tinymce.somepackage.SomeClass', {
- * SomeClass: function() {
- * // Class constructor
- * },
- *
- * method: function() {
- * // Some method
- * }
- * });
- *
- * // Creates a basic subclass class
- * tinymce.create('tinymce.somepackage.SomeSubClass:tinymce.somepackage.SomeClass', {
- * SomeSubClass: function() {
- * // Class constructor
- * this.parent(); // Call parent constructor
- * },
- *
- * method: function() {
- * // Some method
- * this.parent(); // Call parent method
- * },
- *
- * 'static': {
- * staticMethod: function() {
- * // Static method
- * }
- * }
- * });
- *
- * // Creates a singleton/static class
- * tinymce.create('static tinymce.somepackage.SomeSingletonClass', {
- * method: function() {
- * // Some method
- * }
- * });
- */
- function create(s, p, root) {
- var self = this, sp, ns, cn, scn, c, de = 0;
-
- // Parse : <prefix> <class>:<super class>
- s = /^((static) )?([\w.]+)(:([\w.]+))?/.exec(s);
- cn = s[3].match(/(^|\.)(\w+)$/i)[2]; // Class name
-
- // Create namespace for new class
- ns = self.createNS(s[3].replace(/\.\w+$/, ''), root);
-
- // Class already exists
- if (ns[cn]) {
- return;
- }
-
- // Make pure static class
- if (s[2] == 'static') {
- ns[cn] = p;
-
- if (this.onCreate) {
- this.onCreate(s[2], s[3], ns[cn]);
- }
-
- return;
- }
-
- // Create default constructor
- if (!p[cn]) {
- p[cn] = function() {};
- de = 1;
- }
-
- // Add constructor and methods
- ns[cn] = p[cn];
- self.extend(ns[cn].prototype, p);
-
- // Extend
- if (s[5]) {
- sp = self.resolve(s[5]).prototype;
- scn = s[5].match(/\.(\w+)$/i)[1]; // Class name
-
- // Extend constructor
- c = ns[cn];
- if (de) {
- // Add passthrough constructor
- ns[cn] = function() {
- return sp[scn].apply(this, arguments);
- };
- } else {
- // Add inherit constructor
- ns[cn] = function() {
- this.parent = sp[scn];
- return c.apply(this, arguments);
- };
- }
- ns[cn].prototype[cn] = ns[cn];
-
- // Add super methods
- self.each(sp, function(f, n) {
- ns[cn].prototype[n] = sp[n];
- });
-
- // Add overridden methods
- self.each(p, function(f, n) {
- // Extend methods if needed
- if (sp[n]) {
- ns[cn].prototype[n] = function() {
- this.parent = sp[n];
- return f.apply(this, arguments);
- };
- } else {
- if (n != cn) {
- ns[cn].prototype[n] = f;
- }
- }
- });
- }
-
- // Add static methods
- /*jshint sub:true*/
- self.each(p['static'], function(f, n) {
- ns[cn][n] = f;
- });
- }
-
- /**
- * Returns the index of a value in an array, this method will return -1 if the item wasn't found.
- *
- * @method inArray
- * @param {Array} a Array/Object to search for value in.
- * @param {Object} v Value to check for inside the array.
- * @return {Number/String} Index of item inside the array inside an object. Or -1 if it wasn't found.
- * @example
- * // Get index of value in array this will alert 1 since 2 is at that index
- * alert(tinymce.inArray([1,2,3], 2));
- */
- function inArray(a, v) {
- var i, l;
-
- if (a) {
- for (i = 0, l = a.length; i < l; i++) {
- if (a[i] === v) {
- return i;
- }
- }
- }
-
- return -1;
- }
-
- function extend(obj, ext) {
- var i, l, name, args = arguments, value;
-
- for (i = 1, l = args.length; i < l; i++) {
- ext = args[i];
- for (name in ext) {
- if (ext.hasOwnProperty(name)) {
- value = ext[name];
-
- if (value !== undefined) {
- obj[name] = value;
- }
- }
- }
- }
-
- return obj;
- }
-
- /**
- * Executed the specified function for each item in a object tree.
- *
- * @method walk
- * @param {Object} o Object tree to walk though.
- * @param {function} f Function to call for each item.
- * @param {String} n Optional name of collection inside the objects to walk for example childNodes.
- * @param {String} s Optional scope to execute the function in.
- */
- function walk(o, f, n, s) {
- s = s || this;
-
- if (o) {
- if (n) {
- o = o[n];
- }
-
- each(o, function(o, i) {
- if (f.call(s, o, i, n) === false) {
- return false;
- }
-
- walk(o, f, n, s);
- });
- }
- }
-
- /**
- * Creates a namespace on a specific object.
- *
- * @method createNS
- * @param {String} n Namespace to create for example a.b.c.d.
- * @param {Object} o Optional object to add namespace to, defaults to window.
- * @return {Object} New namespace object the last item in path.
- * @example
- * // Create some namespace
- * tinymce.createNS('tinymce.somepackage.subpackage');
- *
- * // Add a singleton
- * var tinymce.somepackage.subpackage.SomeSingleton = {
- * method: function() {
- * // Some method
- * }
- * };
- */
- function createNS(n, o) {
- var i, v;
-
- o = o || window;
-
- n = n.split('.');
- for (i = 0; i < n.length; i++) {
- v = n[i];
-
- if (!o[v]) {
- o[v] = {};
- }
-
- o = o[v];
- }
-
- return o;
- }
-
- /**
- * Resolves a string and returns the object from a specific structure.
- *
- * @method resolve
- * @param {String} n Path to resolve for example a.b.c.d.
- * @param {Object} o Optional object to search though, defaults to window.
- * @return {Object} Last object in path or null if it couldn't be resolved.
- * @example
- * // Resolve a path into an object reference
- * var obj = tinymce.resolve('a.b.c.d');
- */
- function resolve(n, o) {
- var i, l;
-
- o = o || window;
-
- n = n.split('.');
- for (i = 0, l = n.length; i < l; i++) {
- o = o[n[i]];
-
- if (!o) {
- break;
- }
- }
-
- return o;
- }
-
- /**
- * Splits a string but removes the whitespace before and after each value.
- *
- * @method explode
- * @param {string} s String to split.
- * @param {string} d Delimiter to split by.
- * @example
- * // Split a string into an array with a,b,c
- * var arr = tinymce.explode('a, b, c');
- */
- function explode(s, d) {
- if (!s || is(s, 'array')) {
- return s;
- }
-
- return map(s.split(d || ','), trim);
- }
-
- return {
- trim: trim,
- isArray: isArray,
- is: is,
- toArray: toArray,
- makeMap: makeMap,
- each: each,
- map: map,
- grep: grep,
- inArray: inArray,
- extend: extend,
- create: create,
- walk: walk,
- createNS: createNS,
- resolve: resolve,
- explode: explode
- };
-});
-
</del><span class="cx"> // Included from: js/tinymce/classes/dom/Range.js
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -5312,144 +6399,6 @@
</span><span class="cx"> return Entities;
</span><span class="cx"> });
</span><span class="cx">
</span><del>-// Included from: js/tinymce/classes/Env.js
-
-/**
- * Env.js
- *
- * Copyright, Moxiecode Systems AB
- * Released under LGPL License.
- *
- * License: http://www.tinymce.com/license
- * Contributing: http://www.tinymce.com/contributing
- */
-
-/**
- * This class contains various environment constants like browser versions etc.
- * Normally you don't want to sniff specific browser versions but sometimes you have
- * to when it's impossible to feature detect. So use this with care.
- *
- * @class tinymce.Env
- * @static
- */
-define("tinymce/Env", [], function() {
- var nav = navigator, userAgent = nav.userAgent;
- var opera, webkit, ie, ie11, gecko, mac, iDevice;
-
- opera = window.opera && window.opera.buildNumber;
- webkit = /WebKit/.test(userAgent);
- ie = !webkit && !opera && (/MSIE/gi).test(userAgent) && (/Explorer/gi).test(nav.appName);
- ie = ie && /MSIE (\w+)\./.exec(userAgent)[1];
- ie11 = userAgent.indexOf('Trident/') != -1 && (userAgent.indexOf('rv:') != -1 || nav.appName.indexOf('Netscape') != -1) ? 11 : false;
- ie = ie || ie11;
- gecko = !webkit && !ie11 && /Gecko/.test(userAgent);
- mac = userAgent.indexOf('Mac') != -1;
- iDevice = /(iPad|iPhone)/.test(userAgent);
-
- // Is a iPad/iPhone and not on iOS5 sniff the WebKit version since older iOS WebKit versions
- // says it has contentEditable support but there is no visible caret.
- var contentEditable = !iDevice || userAgent.match(/AppleWebKit\/(\d*)/)[1] >= 534;
-
- return {
- /**
- * Constant that is true if the browser is Opera.
- *
- * @property opera
- * @type Boolean
- * @final
- */
- opera: opera,
-
- /**
- * Constant that is true if the browser is WebKit (Safari/Chrome).
- *
- * @property webKit
- * @type Boolean
- * @final
- */
- webkit: webkit,
-
- /**
- * Constant that is more than zero if the browser is IE.
- *
- * @property ie
- * @type Boolean
- * @final
- */
- ie: ie,
-
- /**
- * Constant that is true if the browser is Gecko.
- *
- * @property gecko
- * @type Boolean
- * @final
- */
- gecko: gecko,
-
- /**
- * Constant that is true if the os is Mac OS.
- *
- * @property mac
- * @type Boolean
- * @final
- */
- mac: mac,
-
- /**
- * Constant that is true if the os is iOS.
- *
- * @property iOS
- * @type Boolean
- * @final
- */
- iOS: iDevice,
-
- /**
- * Constant that is true if the browser supports editing.
- *
- * @property contentEditable
- * @type Boolean
- * @final
- */
- contentEditable: contentEditable,
-
- /**
- * Transparent image data url.
- *
- * @property transparentSrc
- * @type Boolean
- * @final
- */
- transparentSrc: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
-
- /**
- * Returns true/false if the browser can or can't place the caret after a inline block like an image.
- *
- * @property noCaretAfter
- * @type Boolean
- * @final
- */
- caretAfter: ie != 8,
-
- /**
- * Constant that is true if the browser supports native DOM Ranges. IE 9+.
- *
- * @property range
- * @type Boolean
- */
- range: window.getSelection && "Range" in window,
-
- /**
- * Returns the IE document mode for non IE browsers this will fake IE 10.
- *
- * @property documentMode
- * @type Number
- */
- documentMode: ie ? (document.documentMode || 7) : 10
- };
-});
-
</del><span class="cx"> // Included from: js/tinymce/classes/dom/StyleSheetLoader.js
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -5663,6 +6612,7 @@
</span><span class="cx"> */
</span><span class="cx"> define("tinymce/dom/DOMUtils", [
</span><span class="cx"> "tinymce/dom/Sizzle",
</span><ins>+ "tinymce/dom/DomQuery",
</ins><span class="cx"> "tinymce/html/Styles",
</span><span class="cx"> "tinymce/dom/EventUtils",
</span><span class="cx"> "tinymce/dom/TreeWalker",
</span><span class="lines">@@ -5671,14 +6621,62 @@
</span><span class="cx"> "tinymce/Env",
</span><span class="cx"> "tinymce/util/Tools",
</span><span class="cx"> "tinymce/dom/StyleSheetLoader"
</span><del>-], function(Sizzle, Styles, EventUtils, TreeWalker, Range, Entities, Env, Tools, StyleSheetLoader) {
</del><ins>+], function(Sizzle, $, Styles, EventUtils, TreeWalker, Range, Entities, Env, Tools, StyleSheetLoader) {
</ins><span class="cx"> // Shorten names
</span><del>- var each = Tools.each, is = Tools.is, grep = Tools.grep, trim = Tools.trim, extend = Tools.extend;
- var isWebKit = Env.webkit, isIE = Env.ie;
</del><ins>+ var each = Tools.each, is = Tools.is, grep = Tools.grep, trim = Tools.trim;
+ var isIE = Env.ie;
</ins><span class="cx"> var simpleSelectorRe = /^([a-z0-9],?)+$/i;
</span><span class="cx"> var whiteSpaceRegExp = /^[ \t\r\n]*$/;
</span><del>- var numericCssMap = Tools.makeMap('fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom', ' ');
</del><span class="cx">
</span><ins>+ function setupAttrHooks(domUtils, settings) {
+ var attrHooks = {}, keepValues = settings.keep_values, keepUrlHook;
+
+ keepUrlHook = {
+ set: function($elm, value, name) {
+ if (settings.url_converter) {
+ value = settings.url_converter.call(settings.url_converter_scope || domUtils, value, name, $elm[0]);
+ }
+
+ $elm.attr('data-mce-' + name, value).attr(name, value);
+ },
+
+ get: function($elm, name) {
+ return $elm.attr('data-mce-' + name) || $elm.attr(name);
+ }
+ };
+
+ attrHooks = {
+ style: {
+ set: function($elm, value) {
+ if (value !== null && typeof value === 'object') {
+ $elm.css(value);
+ return;
+ }
+
+ if (keepValues) {
+ $elm.attr('data-mce-style', value);
+ }
+
+ $elm.attr('style', value);
+ },
+
+ get: function($elm) {
+ var value = $elm.attr('data-mce-style') || $elm.attr('style');
+
+ value = domUtils.serializeStyle(domUtils.parseStyle(value), $elm[0].nodeName);
+
+ return value;
+ }
+ }
+ };
+
+ if (keepValues) {
+ attrHooks.href = attrHooks.src = keepUrlHook;
+ }
+
+ return attrHooks;
+ }
+
</ins><span class="cx"> /**
</span><span class="cx"> * Constructs a new DOMUtils instance. Consult the Wiki for more details on settings etc for this class.
</span><span class="cx"> *
</span><span class="lines">@@ -5696,15 +6694,9 @@
</span><span class="cx"> self.counter = 0;
</span><span class="cx"> self.stdMode = !isIE || doc.documentMode >= 8;
</span><span class="cx"> self.boxModel = !isIE || doc.compatMode == "CSS1Compat" || self.stdMode;
</span><del>- self.hasOuterHTML = "outerHTML" in doc.createElement("a");
</del><span class="cx"> self.styleSheetLoader = new StyleSheetLoader(doc);
</span><del>- this.boundEvents = [];
-
- self.settings = settings = extend({
- keep_values: false,
- hex_colors: 1
- }, settings);
-
</del><ins>+ self.boundEvents = [];
+ self.settings = settings = settings || {};
</ins><span class="cx"> self.schema = settings.schema;
</span><span class="cx"> self.styles = new Styles({
</span><span class="cx"> url_converter: settings.url_converter,
</span><span class="lines">@@ -5713,7 +6705,14 @@
</span><span class="cx">
</span><span class="cx"> self.fixDoc(doc);
</span><span class="cx"> self.events = settings.ownEvents ? new EventUtils(settings.proxy) : EventUtils.Event;
</span><ins>+ self.attrHooks = setupAttrHooks(self, settings);
</ins><span class="cx"> blockElementsMap = settings.schema ? settings.schema.getBlockElements() : {};
</span><ins>+ self.$ = $.overrideDefaults(function() {
+ return {
+ context: doc,
+ element: self.getRoot()
+ };
+ });
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Returns true/false if the specified element is a block element or not.
</span><span class="lines">@@ -5741,22 +6740,16 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> DOMUtils.prototype = {
</span><del>- root: null,
- props: {
- "for": "htmlFor",
- "class": "className",
- className: "className",
- checked: "checked",
- disabled: "disabled",
- maxlength: "maxLength",
- readonly: "readOnly",
- selected: "selected",
- value: "value",
- id: "id",
- name: "name",
- type: "type"
</del><ins>+ $$: function(elm) {
+ if (typeof elm == 'string') {
+ elm = this.get(elm);
+ }
+
+ return this.$(elm);
</ins><span class="cx"> },
</span><span class="cx">
</span><ins>+ root: null,
+
</ins><span class="cx"> fixDoc: function(doc) {
</span><span class="cx"> var settings = this.settings, name;
</span><span class="cx">
</span><span class="lines">@@ -5798,19 +6791,7 @@
</span><span class="cx">
</span><span class="cx"> return clone;
</span><span class="cx"> }
</span><del>-/*
- // Setup HTML5 patched document fragment
- if (!self.frag) {
- self.frag = doc.createDocumentFragment();
- self.fixDoc(self.frag);
- }
</del><span class="cx">
</span><del>- // Make a deep copy by adding it to the document fragment then removing it this removed the :section
- clone = doc.createElement('div');
- self.frag.appendChild(clone);
- clone.innerHTML = node.outerHTML;
- self.frag.removeChild(clone);
-*/
</del><span class="cx"> return clone.firstChild;
</span><span class="cx"> },
</span><span class="cx">
</span><span class="lines">@@ -5824,7 +6805,7 @@
</span><span class="cx"> getRoot: function() {
</span><span class="cx"> var self = this;
</span><span class="cx">
</span><del>- return self.get(self.settings.root_element) || self.doc.body;
</del><ins>+ return self.settings.root_element || self.doc.body;
</ins><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -6037,8 +7018,8 @@
</span><span class="cx"> select: function(selector, scope) {
</span><span class="cx"> var self = this;
</span><span class="cx">
</span><del>- //Sizzle.selectors.cacheLength = 0;
- return Sizzle(selector, self.get(scope) || self.get(self.settings.root_element) || self.doc, []);
</del><ins>+ /*eslint new-cap:0 */
+ return Sizzle(selector, self.get(scope) || self.settings.root_element || self.doc, []);
</ins><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -6079,6 +7060,8 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> var elms = elm.nodeType ? [elm] : elm;
</span><ins>+
+ /*eslint new-cap:0 */
</ins><span class="cx"> return Sizzle(selector, elms[0].ownerDocument || elms[0], null, elms).length > 0;
</span><span class="cx"> },
</span><span class="cx">
</span><span class="lines">@@ -6196,7 +7179,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @method remove
</span><span class="cx"> * @param {String/Element/Array} node ID of element or DOM element object or array containing multiple elements/ids.
</span><del>- * @param {Boolean} keep_children Optional state to keep children or not. If set to true all children will be
</del><ins>+ * @param {Boolean} keepChildren Optional state to keep children or not. If set to true all children will be
</ins><span class="cx"> * placed at the location of the removed element.
</span><span class="cx"> * @return {Element/Array} HTML DOM element that got removed, or an array of removed elements if multiple input elements
</span><span class="cx"> * were passed in.
</span><span class="lines">@@ -6207,27 +7190,26 @@
</span><span class="cx"> * // Removes an element by id in the document
</span><span class="cx"> * tinymce.DOM.remove('mydiv');
</span><span class="cx"> */
</span><del>- remove: function(node, keep_children) {
- return this.run(node, function(node) {
- var child, parent = node.parentNode;
</del><ins>+ remove: function(node, keepChildren) {
+ node = this.$$(node);
</ins><span class="cx">
</span><del>- if (!parent) {
- return null;
- }
</del><ins>+ if (keepChildren) {
+ node.each(function() {
+ var child;
</ins><span class="cx">
</span><del>- if (keep_children) {
- while ((child = node.firstChild)) {
- // IE 8 will crash if you don't remove completely empty text nodes
- if (!isIE || child.nodeType !== 3 || child.nodeValue) {
- parent.insertBefore(child, node);
</del><ins>+ while ((child = this.firstChild)) {
+ if (child.nodeType == 3 && child.data.length === 0) {
+ this.removeChild(child);
</ins><span class="cx"> } else {
</span><del>- node.removeChild(child);
</del><ins>+ this.parentNode.insertBefore(child, this);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><del>- }
</del><ins>+ }).remove();
+ } else {
+ node.remove();
+ }
</ins><span class="cx">
</span><del>- return parent.removeChild(node);
- });
</del><ins>+ return node.length > 1 ? node.toArray() : node[0];
</ins><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -6246,50 +7228,11 @@
</span><span class="cx"> * tinymce.DOM.setStyle('mydiv', 'background-color', 'red');
</span><span class="cx"> */
</span><span class="cx"> setStyle: function(elm, name, value) {
</span><del>- return this.run(elm, function(elm) {
- var self = this, style, key;
</del><ins>+ elm = this.$$(elm).css(name, value);
</ins><span class="cx">
</span><del>- if (name) {
- if (typeof(name) === 'string') {
- style = elm.style;
-
- // Camelcase it, if needed
- name = name.replace(/-(\D)/g, function(a, b) {
- return b.toUpperCase();
- });
-
- // Default px suffix on these
- if (((typeof(value) === 'number') || /^[\-0-9\.]+$/.test(value)) && !numericCssMap[name]) {
- value += 'px';
- }
-
- // IE specific opacity
- if (name === "opacity" && elm.runtimeStyle && typeof(elm.runtimeStyle.opacity) === "undefined") {
- style.filter = value === '' ? '' : "alpha(opacity=" + (value * 100) + ")";
- }
-
- if (name == "float") {
- // Old IE vs modern browsers
- name = "cssFloat" in elm.style ? "cssFloat" : "styleFloat";
- }
-
- try {
- style[name] = value;
- } catch (ex) {
- // Ignore IE errors
- }
-
- // Force update of the style data
- if (self.settings.update_styles) {
- elm.removeAttribute('data-mce-style');
- }
- } else {
- for (key in name) {
- self.setStyle(elm, key, name[key]);
- }
- }
- }
- });
</del><ins>+ if (this.settings.update_styles) {
+ elm.attr('data-mce-style', null);
+ }
</ins><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -6302,27 +7245,12 @@
</span><span class="cx"> * @return {String} Current style or computed style value of an element.
</span><span class="cx"> */
</span><span class="cx"> getStyle: function(elm, name, computed) {
</span><del>- elm = this.get(elm);
</del><ins>+ elm = this.$$(elm);
</ins><span class="cx">
</span><del>- if (!elm) {
- return;
</del><ins>+ if (computed) {
+ return elm.css(name);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- // W3C
- if (this.doc.defaultView && computed) {
- // Remove camelcase
- name = name.replace(/[A-Z]/g, function(a){
- return '-' + a;
- });
-
- try {
- return this.doc.defaultView.getComputedStyle(elm, null).getPropertyValue(name);
- } catch (ex) {
- // Old safari might fail
- return null;
- }
- }
-
</del><span class="cx"> // Camelcase it, if needed
</span><span class="cx"> name = name.replace(/-(\D)/g, function(a, b) {
</span><span class="cx"> return b.toUpperCase();
</span><span class="lines">@@ -6332,12 +7260,7 @@
</span><span class="cx"> name = isIE ? 'styleFloat' : 'cssFloat';
</span><span class="cx"> }
</span><span class="cx">
</span><del>- // IE & Opera
- if (elm.currentStyle && computed) {
- return elm.currentStyle[name];
- }
-
- return elm.style ? elm.style[name] : undefined;
</del><ins>+ return elm[0] && elm[0].style ? elm[0].style[name] : undefined;
</ins><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -6354,13 +7277,9 @@
</span><span class="cx"> * tinymce.DOM.setStyles('mydiv', {'background-color': 'red', 'color': 'green'});
</span><span class="cx"> */
</span><span class="cx"> setStyles: function(elm, styles) {
</span><del>- this.setStyle(elm, styles);
</del><ins>+ this.$$(elm).css(styles);
</ins><span class="cx"> },
</span><span class="cx">
</span><del>- css: function(elm, name, value) {
- this.setStyle(elm, name, value);
- },
-
</del><span class="cx"> /**
</span><span class="cx"> * Removes all attributes from an element or elements.
</span><span class="cx"> *
</span><span class="lines">@@ -6391,73 +7310,29 @@
</span><span class="cx"> * tinymce.dom.setAttrib('mydiv', 'class', 'myclass');
</span><span class="cx"> */
</span><span class="cx"> setAttrib: function(elm, name, value) {
</span><del>- var self = this;
</del><ins>+ var self = this, originalValue, hook, settings = self.settings;
</ins><span class="cx">
</span><del>- // What's the point
- if (!elm || !name) {
- return;
</del><ins>+ if (value === '') {
+ value = null;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- return this.run(elm, function(elm) {
- var settings = self.settings;
- var originalValue = elm.getAttribute(name);
</del><ins>+ elm = self.$$(elm);
+ originalValue = elm.attr(name);
</ins><span class="cx">
</span><del>- if (value !== null) {
- switch (name) {
- case "style":
- if (!is(value, 'string')) {
- each(value, function(value, name) {
- self.setStyle(elm, name, value);
- });
</del><ins>+ hook = self.attrHooks[name];
+ if (hook && hook.set) {
+ hook.set(elm, value, name);
+ } else {
+ elm.attr(name, value);
+ }
</ins><span class="cx">
</span><del>- return;
- }
-
- // No mce_style for elements with these since they might get resized by the user
- if (settings.keep_values) {
- if (value) {
- elm.setAttribute('data-mce-style', value, 2);
- } else {
- elm.removeAttribute('data-mce-style', 2);
- }
- }
-
- elm.style.cssText = value;
- break;
-
- case "class":
- elm.className = value || ''; // Fix IE null bug
- break;
-
- case "src":
- case "href":
- if (settings.keep_values) {
- if (settings.url_converter) {
- value = settings.url_converter.call(settings.url_converter_scope || self, value, name, elm);
- }
-
- self.setAttrib(elm, 'data-mce-' + name, value, 2);
- }
-
- break;
-
- case "shape":
- elm.setAttribute('data-mce-style', value);
- break;
- }
- }
-
- if (is(value) && value !== null && value.length !== 0) {
- elm.setAttribute(name, '' + value, 2);
- } else {
- elm.removeAttribute(name, 2);
- }
-
- // fire onChangeAttrib event for attributes that have changed
- if (originalValue != value && settings.onSetAttrib) {
- settings.onSetAttrib({attrElm: elm, attrName: name, attrValue: value});
- }
- });
</del><ins>+ if (originalValue != value && settings.onSetAttrib) {
+ settings.onSetAttrib({
+ attrElm: elm,
+ attrName: name,
+ attrValue: value
+ });
+ }
</ins><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -6476,9 +7351,9 @@
</span><span class="cx"> setAttribs: function(elm, attrs) {
</span><span class="cx"> var self = this;
</span><span class="cx">
</span><del>- return this.run(elm, function(elm) {
</del><ins>+ self.$$(elm).each(function(i, node) {
</ins><span class="cx"> each(attrs, function(value, name) {
</span><del>- self.setAttrib(elm, name, value);
</del><ins>+ self.setAttrib(node, name, value);
</ins><span class="cx"> });
</span><span class="cx"> });
</span><span class="cx"> },
</span><span class="lines">@@ -6493,139 +7368,22 @@
</span><span class="cx"> * @return {String} Attribute value string, default value or null if the attribute wasn't found.
</span><span class="cx"> */
</span><span class="cx"> getAttrib: function(elm, name, defaultVal) {
</span><del>- var value, self = this, undef;
</del><ins>+ var self = this, hook, value;
</ins><span class="cx">
</span><del>- elm = self.get(elm);
</del><ins>+ elm = self.$$(elm);
</ins><span class="cx">
</span><del>- if (!elm || elm.nodeType !== 1) {
- return defaultVal === undef ? false : defaultVal;
</del><ins>+ hook = self.attrHooks[name];
+ if (hook && hook.get) {
+ value = hook.get(elm, name);
+ } else {
+ value = elm.attr(name);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- if (!is(defaultVal)) {
- defaultVal = '';
</del><ins>+ if (typeof value == 'undefined') {
+ value = defaultVal || '';
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- // Try the mce variant for these
- if (/^(src|href|style|coords|shape)$/.test(name)) {
- value = elm.getAttribute("data-mce-" + name);
-
- if (value) {
- return value;
- }
- }
-
- if (isIE && self.props[name]) {
- value = elm[self.props[name]];
- value = value && value.nodeValue ? value.nodeValue : value;
- }
-
- if (!value) {
- value = elm.getAttribute(name, 2);
- }
-
- // Check boolean attribs
- if (/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(name)) {
- if (elm[self.props[name]] === true && value === '') {
- return name;
- }
-
- return value ? name : '';
- }
-
- // Inner input elements will override attributes on form elements
- if (elm.nodeName === "FORM" && elm.getAttributeNode(name)) {
- return elm.getAttributeNode(name).nodeValue;
- }
-
- if (name === 'style') {
- value = value || elm.style.cssText;
-
- if (value) {
- value = self.serializeStyle(self.parseStyle(value), elm.nodeName);
-
- if (self.settings.keep_values) {
- elm.setAttribute('data-mce-style', value);
- }
- }
- }
-
- // Remove Apple and WebKit stuff
- if (isWebKit && name === "class" && value) {
- value = value.replace(/(apple|webkit)\-[a-z\-]+/gi, '');
- }
-
- // Handle IE issues
- if (isIE) {
- switch (name) {
- case 'rowspan':
- case 'colspan':
- // IE returns 1 as default value
- if (value === 1) {
- value = '';
- }
-
- break;
-
- case 'size':
- // IE returns +0 as default value for size
- if (value === '+0' || value === 20 || value === 0) {
- value = '';
- }
-
- break;
-
- case 'width':
- case 'height':
- case 'vspace':
- case 'checked':
- case 'disabled':
- case 'readonly':
- if (value === 0) {
- value = '';
- }
-
- break;
-
- case 'hspace':
- // IE returns -1 as default value
- if (value === -1) {
- value = '';
- }
-
- break;
-
- case 'maxlength':
- case 'tabindex':
- // IE returns default value
- if (value === 32768 || value === 2147483647 || value === '32768') {
- value = '';
- }
-
- break;
-
- case 'multiple':
- case 'compact':
- case 'noshade':
- case 'nowrap':
- if (value === 65535) {
- return name;
- }
-
- return defaultVal;
-
- case 'shape':
- value = value.toLowerCase();
- break;
-
- default:
- // IE has odd anonymous function for event attributes
- if (name.indexOf('on') === 0 && value) {
- value = ('' + value).replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/, '$1');
- }
- }
- }
-
- return (value !== undef && value !== null && value !== '') ? '' + value : defaultVal;
</del><ins>+ return value;
</ins><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -6819,22 +7577,7 @@
</span><span class="cx"> * tinymce.DOM.addClass('mydiv', 'myclass');
</span><span class="cx"> */
</span><span class="cx"> addClass: function(elm, cls) {
</span><del>- return this.run(elm, function(elm) {
- var clsVal;
-
- if (!cls) {
- return 0;
- }
-
- if (this.hasClass(elm, cls)) {
- return elm.className;
- }
-
- clsVal = this.removeClass(elm, cls);
- elm.className = clsVal = (clsVal !== '' ? (clsVal + ' ') : '') + cls;
-
- return clsVal;
- });
</del><ins>+ this.$$(elm).addClass(cls);
</ins><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -6853,32 +7596,7 @@
</span><span class="cx"> * tinymce.DOM.removeClass('mydiv', 'myclass');
</span><span class="cx"> */
</span><span class="cx"> removeClass: function(elm, cls) {
</span><del>- var self = this, re;
-
- return self.run(elm, function(elm) {
- var val;
-
- if (self.hasClass(elm, cls)) {
- if (!re) {
- re = new RegExp("(^|\\s+)" + cls + "(\\s+|$)", "g");
- }
-
- val = elm.className.replace(re, ' ');
- val = trim(val != ' ' ? val : '');
-
- elm.className = val;
-
- // Empty class attr
- if (!val) {
- elm.removeAttribute('class');
- elm.removeAttribute('className');
- }
-
- return val;
- }
-
- return elm.className;
- });
</del><ins>+ this.toggleClass(elm, cls, false);
</ins><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -6890,13 +7608,7 @@
</span><span class="cx"> * @return {Boolean} true/false if the specified element has the specified class.
</span><span class="cx"> */
</span><span class="cx"> hasClass: function(elm, cls) {
</span><del>- elm = this.get(elm);
-
- if (!elm || !cls) {
- return false;
- }
-
- return (' ' + elm.className + ' ').indexOf(' ' + cls + ' ') !== -1;
</del><ins>+ return this.$$(elm).hasClass(cls);
</ins><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -6908,15 +7620,11 @@
</span><span class="cx"> * @param {[type]} state Optional state to set.
</span><span class="cx"> */
</span><span class="cx"> toggleClass: function(elm, cls, state) {
</span><del>- state = state === undefined ? !this.hasClass(elm, cls) : state;
-
- if (this.hasClass(elm, cls) !== state) {
- if (state) {
- this.addClass(elm, cls);
- } else {
- this.removeClass(elm, cls);
</del><ins>+ this.$$(elm).toggleClass(cls, state).each(function() {
+ if (this.className === '') {
+ $(this).attr('class', null);
</ins><span class="cx"> }
</span><del>- }
</del><ins>+ });
</ins><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -6926,7 +7634,7 @@
</span><span class="cx"> * @param {String/Element/Array} elm ID of DOM element or DOM element or array with elements or IDs to show.
</span><span class="cx"> */
</span><span class="cx"> show: function(elm) {
</span><del>- return this.setStyle(elm, 'display', 'block');
</del><ins>+ this.$$(elm).show();
</ins><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -6939,7 +7647,7 @@
</span><span class="cx"> * tinymce.DOM.hide('myid');
</span><span class="cx"> */
</span><span class="cx"> hide: function(elm) {
</span><del>- return this.setStyle(elm, 'display', 'none');
</del><ins>+ this.$$(elm).hide();
</ins><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -6950,9 +7658,7 @@
</span><span class="cx"> * @return {Boolean} true/false if the element is hidden or not.
</span><span class="cx"> */
</span><span class="cx"> isHidden: function(elm) {
</span><del>- elm = this.get(elm);
-
- return !elm || elm.style.display == 'none' || this.getStyle(elm, 'display') == 'none';
</del><ins>+ return this.$$(elm).css('display') == 'none';
</ins><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -6972,7 +7678,7 @@
</span><span class="cx"> * URLs will get converted, hex color values fixed etc. Check processHTML for details.
</span><span class="cx"> *
</span><span class="cx"> * @method setHTML
</span><del>- * @param {Element/String/Array} e DOM element, element id string or array of elements/ids to set HTML inside of.
</del><ins>+ * @param {Element/String/Array} elm DOM element, element id string or array of elements/ids to set HTML inside of.
</ins><span class="cx"> * @param {String} h HTML content to set as inner HTML of the element.
</span><span class="cx"> * @example
</span><span class="cx"> * // Sets the inner HTML of all paragraphs in the active editor
</span><span class="lines">@@ -6981,44 +7687,35 @@
</span><span class="cx"> * // Sets the inner HTML of an element by id in the document
</span><span class="cx"> * tinymce.DOM.setHTML('mydiv', 'some inner html');
</span><span class="cx"> */
</span><del>- setHTML: function(element, html) {
- var self = this;
</del><ins>+ setHTML: function(elm, html) {
+ elm = this.$$(elm);
</ins><span class="cx">
</span><del>- return self.run(element, function(element) {
- if (isIE) {
</del><ins>+ if (isIE) {
+ elm.each(function(i, target) {
+ if (target.canHaveHTML === false) {
+ return;
+ }
+
</ins><span class="cx"> // Remove all child nodes, IE keeps empty text nodes in DOM
</span><del>- while (element.firstChild) {
- element.removeChild(element.firstChild);
</del><ins>+ while (target.firstChild) {
+ target.removeChild(target.firstChild);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> try {
</span><span class="cx"> // IE will remove comments from the beginning
</span><span class="cx"> // unless you padd the contents with something
</span><del>- element.innerHTML = '<br />' + html;
- element.removeChild(element.firstChild);
</del><ins>+ target.innerHTML = '<br>' + html;
+ target.removeChild(target.firstChild);
</ins><span class="cx"> } catch (ex) {
</span><del>- // IE sometimes produces an unknown runtime error on innerHTML if it's a block element
- // within a block element for example a div inside a p
- // This seems to fix this problem
-
- // Create new div with HTML contents and a BR in front to keep comments
- var newElement = self.create('div');
- newElement.innerHTML = '<br />' + html;
-
- // Add all children from div to target
- each(grep(newElement.childNodes), function(node, i) {
- // Skip br element
- if (i && element.canHaveHTML) {
- element.appendChild(node);
- }
- });
</del><ins>+ // IE sometimes produces an unknown runtime error on innerHTML if it's a div inside a p
+ $('<div>').html('<br>' + html).contents().slice(1).appendTo(target);
</ins><span class="cx"> }
</span><del>- } else {
- element.innerHTML = html;
- }
</del><span class="cx">
</span><del>- return html;
- });
</del><ins>+ return html;
+ });
+ } else {
+ elm.html(html);
+ }
</ins><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -7032,22 +7729,8 @@
</span><span class="cx"> * tinymce.activeEditor.getOuterHTML(tinymce.activeEditor.getBody());
</span><span class="cx"> */
</span><span class="cx"> getOuterHTML: function(elm) {
</span><del>- var doc, self = this;
-
- elm = self.get(elm);
-
- if (!elm) {
- return null;
- }
-
- if (elm.nodeType === 1 && self.hasOuterHTML) {
- return elm.outerHTML;
- }
-
- doc = (elm.ownerDocument || self.doc).createElement("body");
- doc.appendChild(elm.cloneNode(true));
-
- return doc.innerHTML;
</del><ins>+ elm = this.get(elm);
+ return elm.nodeType == 1 ? elm.outerHTML : $('<div>').append($(elm).clone()).html();
</ins><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -7064,45 +7747,16 @@
</span><span class="cx"> * // Sets the outer HTML of an element by id in the document
</span><span class="cx"> * tinymce.DOM.setOuterHTML('mydiv', '<div>some html</div>');
</span><span class="cx"> */
</span><del>- setOuterHTML: function(elm, html, doc) {
</del><ins>+ setOuterHTML: function(elm, html) {
</ins><span class="cx"> var self = this;
</span><span class="cx">
</span><del>- return self.run(elm, function(elm) {
- function set() {
- var node, tempElm;
-
- tempElm = doc.createElement("body");
- tempElm.innerHTML = html;
-
- node = tempElm.lastChild;
- while (node) {
- self.insertAfter(node.cloneNode(true), elm);
- node = node.previousSibling;
- }
-
- self.remove(elm);
</del><ins>+ self.$$(elm).each(function() {
+ try {
+ this.outerHTML = html;
+ } catch (ex) {
+ // OuterHTML for IE it sometimes produces an "unknown runtime error"
+ self.remove($(this).html(html), true);
</ins><span class="cx"> }
</span><del>-
- // Only set HTML on elements
- if (elm.nodeType == 1) {
- doc = doc || elm.ownerDocument || self.doc;
-
- if (isIE) {
- try {
- // Try outerHTML for IE it sometimes produces an unknown runtime error
- if (elm.nodeType == 1 && self.hasOuterHTML) {
- elm.outerHTML = html;
- } else {
- set();
- }
- } catch (ex) {
- // Fix for unknown runtime error
- set();
- }
- } else {
- set();
- }
- }
</del><span class="cx"> });
</span><span class="cx"> },
</span><span class="cx">
</span><span class="lines">@@ -7132,14 +7786,14 @@
</span><span class="cx"> * @param {Element/String/Array} reference_node Reference element, element id or array of elements to insert after.
</span><span class="cx"> * @return {Element/Array} Element that got added or an array with elements.
</span><span class="cx"> */
</span><del>- insertAfter: function(node, reference_node) {
- reference_node = this.get(reference_node);
</del><ins>+ insertAfter: function(node, referenceNode) {
+ referenceNode = this.get(referenceNode);
</ins><span class="cx">
</span><span class="cx"> return this.run(node, function(node) {
</span><span class="cx"> var parent, nextSibling;
</span><span class="cx">
</span><del>- parent = reference_node.parentNode;
- nextSibling = reference_node.nextSibling;
</del><ins>+ parent = referenceNode.parentNode;
+ nextSibling = referenceNode.nextSibling;
</ins><span class="cx">
</span><span class="cx"> if (nextSibling) {
</span><span class="cx"> parent.insertBefore(node, nextSibling);
</span><span class="lines">@@ -7194,8 +7848,8 @@
</span><span class="cx"> newElm = self.create(name);
</span><span class="cx">
</span><span class="cx"> // Copy attribs to new block
</span><del>- each(self.getAttribs(elm), function(attr_node) {
- self.setAttrib(newElm, attr_node.nodeName, self.getAttrib(elm, attr_node.nodeName));
</del><ins>+ each(self.getAttribs(elm), function(attrNode) {
+ self.setAttrib(newElm, attrNode.nodeName, self.getAttrib(elm, attrNode.nodeName));
</ins><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> // Replace block
</span><span class="lines">@@ -8275,6 +8929,637 @@
</span><span class="cx"> * });
</span><span class="cx"> */
</span><span class="cx">
</span><ins>+// Included from: js/tinymce/classes/dom/RangeUtils.js
+
+/**
+ * RangeUtils.js
+ *
+ * Copyright, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/**
+ * This class contains a few utility methods for ranges.
+ *
+ * @class tinymce.dom.RangeUtils
+ * @private
+ */
+define("tinymce/dom/RangeUtils", [
+ "tinymce/util/Tools",
+ "tinymce/dom/TreeWalker"
+], function(Tools, TreeWalker) {
+ var each = Tools.each;
+
+ function getEndChild(container, index) {
+ var childNodes = container.childNodes;
+
+ index--;
+
+ if (index > childNodes.length - 1) {
+ index = childNodes.length - 1;
+ } else if (index < 0) {
+ index = 0;
+ }
+
+ return childNodes[index] || container;
+ }
+
+ function RangeUtils(dom) {
+ /**
+ * Walks the specified range like object and executes the callback for each sibling collection it finds.
+ *
+ * @method walk
+ * @param {Object} rng Range like object.
+ * @param {function} callback Callback function to execute for each sibling collection.
+ */
+ this.walk = function(rng, callback) {
+ var startContainer = rng.startContainer,
+ startOffset = rng.startOffset,
+ endContainer = rng.endContainer,
+ endOffset = rng.endOffset,
+ ancestor, startPoint,
+ endPoint, node, parent, siblings, nodes;
+
+ // Handle table cell selection the table plugin enables
+ // you to fake select table cells and perform formatting actions on them
+ nodes = dom.select('td.mce-item-selected,th.mce-item-selected');
+ if (nodes.length > 0) {
+ each(nodes, function(node) {
+ callback([node]);
+ });
+
+ return;
+ }
+
+ /**
+ * Excludes start/end text node if they are out side the range
+ *
+ * @private
+ * @param {Array} nodes Nodes to exclude items from.
+ * @return {Array} Array with nodes excluding the start/end container if needed.
+ */
+ function exclude(nodes) {
+ var node;
+
+ // First node is excluded
+ node = nodes[0];
+ if (node.nodeType === 3 && node === startContainer && startOffset >= node.nodeValue.length) {
+ nodes.splice(0, 1);
+ }
+
+ // Last node is excluded
+ node = nodes[nodes.length - 1];
+ if (endOffset === 0 && nodes.length > 0 && node === endContainer && node.nodeType === 3) {
+ nodes.splice(nodes.length - 1, 1);
+ }
+
+ return nodes;
+ }
+
+ /**
+ * Collects siblings
+ *
+ * @private
+ * @param {Node} node Node to collect siblings from.
+ * @param {String} name Name of the sibling to check for.
+ * @return {Array} Array of collected siblings.
+ */
+ function collectSiblings(node, name, end_node) {
+ var siblings = [];
+
+ for (; node && node != end_node; node = node[name]) {
+ siblings.push(node);
+ }
+
+ return siblings;
+ }
+
+ /**
+ * Find an end point this is the node just before the common ancestor root.
+ *
+ * @private
+ * @param {Node} node Node to start at.
+ * @param {Node} root Root/ancestor element to stop just before.
+ * @return {Node} Node just before the root element.
+ */
+ function findEndPoint(node, root) {
+ do {
+ if (node.parentNode == root) {
+ return node;
+ }
+
+ node = node.parentNode;
+ } while (node);
+ }
+
+ function walkBoundary(start_node, end_node, next) {
+ var siblingName = next ? 'nextSibling' : 'previousSibling';
+
+ for (node = start_node, parent = node.parentNode; node && node != end_node; node = parent) {
+ parent = node.parentNode;
+ siblings = collectSiblings(node == start_node ? node : node[siblingName], siblingName);
+
+ if (siblings.length) {
+ if (!next) {
+ siblings.reverse();
+ }
+
+ callback(exclude(siblings));
+ }
+ }
+ }
+
+ // If index based start position then resolve it
+ if (startContainer.nodeType == 1 && startContainer.hasChildNodes()) {
+ startContainer = startContainer.childNodes[startOffset];
+ }
+
+ // If index based end position then resolve it
+ if (endContainer.nodeType == 1 && endContainer.hasChildNodes()) {
+ endContainer = getEndChild(endContainer, endOffset);
+ }
+
+ // Same container
+ if (startContainer == endContainer) {
+ return callback(exclude([startContainer]));
+ }
+
+ // Find common ancestor and end points
+ ancestor = dom.findCommonAncestor(startContainer, endContainer);
+
+ // Process left side
+ for (node = startContainer; node; node = node.parentNode) {
+ if (node === endContainer) {
+ return walkBoundary(startContainer, ancestor, true);
+ }
+
+ if (node === ancestor) {
+ break;
+ }
+ }
+
+ // Process right side
+ for (node = endContainer; node; node = node.parentNode) {
+ if (node === startContainer) {
+ return walkBoundary(endContainer, ancestor);
+ }
+
+ if (node === ancestor) {
+ break;
+ }
+ }
+
+ // Find start/end point
+ startPoint = findEndPoint(startContainer, ancestor) || startContainer;
+ endPoint = findEndPoint(endContainer, ancestor) || endContainer;
+
+ // Walk left leaf
+ walkBoundary(startContainer, startPoint, true);
+
+ // Walk the middle from start to end point
+ siblings = collectSiblings(
+ startPoint == startContainer ? startPoint : startPoint.nextSibling,
+ 'nextSibling',
+ endPoint == endContainer ? endPoint.nextSibling : endPoint
+ );
+
+ if (siblings.length) {
+ callback(exclude(siblings));
+ }
+
+ // Walk right leaf
+ walkBoundary(endContainer, endPoint);
+ };
+
+ /**
+ * Splits the specified range at it's start/end points.
+ *
+ * @private
+ * @param {Range/RangeObject} rng Range to split.
+ * @return {Object} Range position object.
+ */
+ this.split = function(rng) {
+ var startContainer = rng.startContainer,
+ startOffset = rng.startOffset,
+ endContainer = rng.endContainer,
+ endOffset = rng.endOffset;
+
+ function splitText(node, offset) {
+ return node.splitText(offset);
+ }
+
+ // Handle single text node
+ if (startContainer == endContainer && startContainer.nodeType == 3) {
+ if (startOffset > 0 && startOffset < startContainer.nodeValue.length) {
+ endContainer = splitText(startContainer, startOffset);
+ startContainer = endContainer.previousSibling;
+
+ if (endOffset > startOffset) {
+ endOffset = endOffset - startOffset;
+ startContainer = endContainer = splitText(endContainer, endOffset).previousSibling;
+ endOffset = endContainer.nodeValue.length;
+ startOffset = 0;
+ } else {
+ endOffset = 0;
+ }
+ }
+ } else {
+ // Split startContainer text node if needed
+ if (startContainer.nodeType == 3 && startOffset > 0 && startOffset < startContainer.nodeValue.length) {
+ startContainer = splitText(startContainer, startOffset);
+ startOffset = 0;
+ }
+
+ // Split endContainer text node if needed
+ if (endContainer.nodeType == 3 && endOffset > 0 && endOffset < endContainer.nodeValue.length) {
+ endContainer = splitText(endContainer, endOffset).previousSibling;
+ endOffset = endContainer.nodeValue.length;
+ }
+ }
+
+ return {
+ startContainer: startContainer,
+ startOffset: startOffset,
+ endContainer: endContainer,
+ endOffset: endOffset
+ };
+ };
+
+ /**
+ * Normalizes the specified range by finding the closest best suitable caret location.
+ *
+ * @private
+ * @param {Range} rng Range to normalize.
+ * @return {Boolean} True/false if the specified range was normalized or not.
+ */
+ this.normalize = function(rng) {
+ var normalized, collapsed;
+
+ function normalizeEndPoint(start) {
+ var container, offset, walker, body = dom.getRoot(), node, nonEmptyElementsMap;
+ var directionLeft, isAfterNode;
+
+ function hasBrBeforeAfter(node, left) {
+ var walker = new TreeWalker(node, dom.getParent(node.parentNode, dom.isBlock) || body);
+
+ while ((node = walker[left ? 'prev' : 'next']())) {
+ if (node.nodeName === "BR") {
+ return true;
+ }
+ }
+ }
+
+ function isPrevNode(node, name) {
+ return node.previousSibling && node.previousSibling.nodeName == name;
+ }
+
+ // Walks the dom left/right to find a suitable text node to move the endpoint into
+ // It will only walk within the current parent block or body and will stop if it hits a block or a BR/IMG
+ function findTextNodeRelative(left, startNode) {
+ var walker, lastInlineElement, parentBlockContainer;
+
+ startNode = startNode || container;
+ parentBlockContainer = dom.getParent(startNode.parentNode, dom.isBlock) || body;
+
+ // Lean left before the BR element if it's the only BR within a block element. Gecko bug: #6680
+ // This: <p><br>|</p> becomes <p>|<br></p>
+ if (left && startNode.nodeName == 'BR' && isAfterNode && dom.isEmpty(parentBlockContainer)) {
+ container = startNode.parentNode;
+ offset = dom.nodeIndex(startNode);
+ normalized = true;
+ return;
+ }
+
+ // Walk left until we hit a text node we can move to or a block/br/img
+ walker = new TreeWalker(startNode, parentBlockContainer);
+ while ((node = walker[left ? 'prev' : 'next']())) {
+ // Break if we hit a non content editable node
+ if (dom.getContentEditableParent(node) === "false") {
+ return;
+ }
+
+ // Found text node that has a length
+ if (node.nodeType === 3 && node.nodeValue.length > 0) {
+ container = node;
+ offset = left ? node.nodeValue.length : 0;
+ normalized = true;
+ return;
+ }
+
+ // Break if we find a block or a BR/IMG/INPUT etc
+ if (dom.isBlock(node) || nonEmptyElementsMap[node.nodeName.toLowerCase()]) {
+ return;
+ }
+
+ lastInlineElement = node;
+ }
+
+ // Only fetch the last inline element when in caret mode for now
+ if (collapsed && lastInlineElement) {
+ container = lastInlineElement;
+ normalized = true;
+ offset = 0;
+ }
+ }
+
+ container = rng[(start ? 'start' : 'end') + 'Container'];
+ offset = rng[(start ? 'start' : 'end') + 'Offset'];
+ isAfterNode = container.nodeType == 1 && offset === container.childNodes.length;
+ nonEmptyElementsMap = dom.schema.getNonEmptyElements();
+ directionLeft = start;
+
+ if (container.nodeType == 1 && offset > container.childNodes.length - 1) {
+ directionLeft = false;
+ }
+
+ // If the container is a document move it to the body element
+ if (container.nodeType === 9) {
+ container = dom.getRoot();
+ offset = 0;
+ }
+
+ // If the container is body try move it into the closest text node or position
+ if (container === body) {
+ // If start is before/after a image, table etc
+ if (directionLeft) {
+ node = container.childNodes[offset > 0 ? offset - 1 : 0];
+ if (node) {
+ if (nonEmptyElementsMap[node.nodeName] || node.nodeName == "TABLE") {
+ return;
+ }
+ }
+ }
+
+ // Resolve the index
+ if (container.hasChildNodes()) {
+ offset = Math.min(!directionLeft && offset > 0 ? offset - 1 : offset, container.childNodes.length - 1);
+ container = container.childNodes[offset];
+ offset = 0;
+
+ // Don't walk into elements that doesn't have any child nodes like a IMG
+ if (container.hasChildNodes() && !/TABLE/.test(container.nodeName)) {
+ // Walk the DOM to find a text node to place the caret at or a BR
+ node = container;
+ walker = new TreeWalker(container, body);
+
+ do {
+ // Found a text node use that position
+ if (node.nodeType === 3 && node.nodeValue.length > 0) {
+ offset = directionLeft ? 0 : node.nodeValue.length;
+ container = node;
+ normalized = true;
+ break;
+ }
+
+ // Found a BR/IMG element that we can place the caret before
+ if (nonEmptyElementsMap[node.nodeName.toLowerCase()]) {
+ offset = dom.nodeIndex(node);
+ container = node.parentNode;
+
+ // Put caret after image when moving the end point
+ if (node.nodeName == "IMG" && !directionLeft) {
+ offset++;
+ }
+
+ normalized = true;
+ break;
+ }
+ } while ((node = (directionLeft ? walker.next() : walker.prev())));
+ }
+ }
+ }
+
+ // Lean the caret to the left if possible
+ if (collapsed) {
+ // So this: <b>x</b><i>|x</i>
+ // Becomes: <b>x|</b><i>x</i>
+ // Seems that only gecko has issues with this
+ if (container.nodeType === 3 && offset === 0) {
+ findTextNodeRelative(true);
+ }
+
+ // Lean left into empty inline elements when the caret is before a BR
+ // So this: <i><b></b><i>|<br></i>
+ // Becomes: <i><b>|</b><i><br></i>
+ // Seems that only gecko has issues with this.
+ // Special edge case for <p><a>x</a>|<br></p> since we don't want <p><a>x|</a><br></p>
+ if (container.nodeType === 1) {
+ node = container.childNodes[offset];
+
+ // Offset is after the containers last child
+ // then use the previous child for normalization
+ if (!node) {
+ node = container.childNodes[offset - 1];
+ }
+
+ if (node && node.nodeName === 'BR' && !isPrevNode(node, 'A') &&
+ !hasBrBeforeAfter(node) && !hasBrBeforeAfter(node, true)) {
+ findTextNodeRelative(true, node);
+ }
+ }
+ }
+
+ // Lean the start of the selection right if possible
+ // So this: x[<b>x]</b>
+ // Becomes: x<b>[x]</b>
+ if (directionLeft && !collapsed && container.nodeType === 3 && offset === container.nodeValue.length) {
+ findTextNodeRelative(false);
+ }
+
+ // Set endpoint if it was normalized
+ if (normalized) {
+ rng['set' + (start ? 'Start' : 'End')](container, offset);
+ }
+ }
+
+ collapsed = rng.collapsed;
+
+ normalizeEndPoint(true);
+
+ if (!collapsed) {
+ normalizeEndPoint();
+ }
+
+ // If it was collapsed then make sure it still is
+ if (normalized && collapsed) {
+ rng.collapse(true);
+ }
+
+ return normalized;
+ };
+ }
+
+ /**
+ * Compares two ranges and checks if they are equal.
+ *
+ * @static
+ * @method compareRanges
+ * @param {DOMRange} rng1 First range to compare.
+ * @param {DOMRange} rng2 First range to compare.
+ * @return {Boolean} true/false if the ranges are equal.
+ */
+ RangeUtils.compareRanges = function(rng1, rng2) {
+ if (rng1 && rng2) {
+ // Compare native IE ranges
+ if (rng1.item || rng1.duplicate) {
+ // Both are control ranges and the selected element matches
+ if (rng1.item && rng2.item && rng1.item(0) === rng2.item(0)) {
+ return true;
+ }
+
+ // Both are text ranges and the range matches
+ if (rng1.isEqual && rng2.isEqual && rng2.isEqual(rng1)) {
+ return true;
+ }
+ } else {
+ // Compare w3c ranges
+ return rng1.startContainer == rng2.startContainer && rng1.startOffset == rng2.startOffset;
+ }
+ }
+
+ return false;
+ };
+
+ return RangeUtils;
+});
+
+// Included from: js/tinymce/classes/NodeChange.js
+
+/**
+ * NodeChange.js
+ *
+ * Copyright, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/**
+ * This class handles the nodechange event dispatching both manual and though selection change events.
+ *
+ * @class tinymce.NodeChange
+ * @private
+ */
+define("tinymce/NodeChange", [
+ "tinymce/dom/RangeUtils"
+], function(RangeUtils) {
+ return function(editor) {
+ var lastRng, lastPath = [];
+
+ /**
+ * Returns true/false if the current element path has been changed or not.
+ *
+ * @private
+ * @return {Boolean} True if the element path is the same false if it's not.
+ */
+ function isSameElementPath(startElm) {
+ var i, currentPath;
+
+ currentPath = editor.$(startElm).parentsUntil(editor.getBody()).add(startElm);
+ if (currentPath.length === lastPath.length) {
+ for (i = currentPath.length; i >= 0; i--) {
+ if (currentPath[i] !== lastPath[i]) {
+ break;
+ }
+ }
+
+ if (i === -1) {
+ lastPath = currentPath;
+ return true;
+ }
+ }
+
+ lastPath = currentPath;
+
+ return false;
+ }
+
+ // Gecko doesn't support the "selectionchange" event
+ if (!('onselectionchange' in editor.getDoc())) {
+ editor.on('NodeChange Click MouseUp KeyUp', function(e) {
+ var nativeRng, fakeRng;
+
+ // Since DOM Ranges mutate on modification
+ // of the DOM we need to clone it's contents
+ nativeRng = editor.selection.getRng();
+ fakeRng = {
+ startContainer: nativeRng.startContainer,
+ startOffset: nativeRng.startOffset,
+ endContainer: nativeRng.endContainer,
+ endOffset: nativeRng.endOffset
+ };
+
+ // Always treat nodechange as a selectionchange since applying
+ // formatting to the current range wouldn't update the range but it's parent
+ if (e.type == 'nodechange' || !RangeUtils.compareRanges(fakeRng, lastRng)) {
+ editor.fire('SelectionChange');
+ }
+
+ lastRng = fakeRng;
+ });
+ }
+
+ // IE has a bug where it fires a selectionchange on right click that has a range at the start of the body
+ // When the contextmenu event fires the selection is located at the right location
+ editor.on('contextmenu', function() {
+ editor.fire('SelectionChange');
+ });
+
+ editor.on('SelectionChange', function() {
+ var startElm = editor.selection.getStart();
+
+ // Selection change might fire when focus is lost so check if the start is still within the body
+ if (!isSameElementPath(startElm) && editor.dom.isChildOf(startElm, editor.getBody())) {
+ editor.nodeChanged({selectionChange: true});
+ }
+ });
+
+ /**
+ * Distpaches out a onNodeChange event to all observers. This method should be called when you
+ * need to update the UI states or element path etc.
+ *
+ * @method nodeChanged
+ * @param {Object} args Optional args to pass to NodeChange event handlers.
+ */
+ this.nodeChanged = function(args) {
+ var selection = editor.selection, node, parents, root;
+
+ // Fix for bug #1896577 it seems that this can not be fired while the editor is loading
+ if (editor.initialized && !editor.settings.disable_nodechange && !editor.settings.readonly) {
+ // Get start node
+ root = editor.getBody();
+ node = selection.getStart() || root;
+ node = node.ownerDocument != editor.getDoc() ? editor.getBody() : node;
+
+ // Edge case for <p>|<img></p>
+ if (node.nodeName == 'IMG' && selection.isCollapsed()) {
+ node = node.parentNode;
+ }
+
+ // Get parents and add them to object
+ parents = [];
+ editor.dom.getParent(node, function(node) {
+ if (node === root) {
+ return true;
+ }
+
+ parents.push(node);
+ });
+
+ args = args || {};
+ args.element = node;
+ args.parents = parents;
+
+ editor.fire('NodeChange', args);
+ }
+ };
+ };
+});
+
</ins><span class="cx"> // Included from: js/tinymce/classes/html/Node.js
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -9177,7 +10462,7 @@
</span><span class="cx"> 'dfn code mark q sup sub samp');
</span><span class="cx">
</span><span class="cx"> each((settings.special || 'script noscript style textarea').split(' '), function(name) {
</span><del>- specialElements[name] = new RegExp('<\/' + name + '[^>]*>','gi');
</del><ins>+ specialElements[name] = new RegExp('<\/' + name + '[^>]*>', 'gi');
</ins><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> // Converts a wildcard expression string to a regexp for example *a will become /.*a/.
</span><span class="lines">@@ -9187,16 +10472,16 @@
</span><span class="cx">
</span><span class="cx"> // Parses the specified valid_elements string and adds to the current rules
</span><span class="cx"> // This function is a bit hard to read since it's heavily optimized for speed
</span><del>- function addValidElements(valid_elements) {
</del><ins>+ function addValidElements(validElements) {
</ins><span class="cx"> var ei, el, ai, al, matches, element, attr, attrData, elementName, attrName, attrType, attributes, attributesOrder,
</span><span class="cx"> prefix, outputName, globalAttributes, globalAttributesOrder, key, value,
</span><span class="cx"> elementRuleRegExp = /^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,
</span><span class="cx"> attrRuleRegExp = /^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,
</span><span class="cx"> hasPatternsRegExp = /[*?+]/;
</span><span class="cx">
</span><del>- if (valid_elements) {
</del><ins>+ if (validElements) {
</ins><span class="cx"> // Split valid elements into an array with rules
</span><del>- valid_elements = split(valid_elements, ',');
</del><ins>+ validElements = split(validElements, ',');
</ins><span class="cx">
</span><span class="cx"> if (elements['@']) {
</span><span class="cx"> globalAttributes = elements['@'].attributes;
</span><span class="lines">@@ -9204,9 +10489,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Loop all rules
</span><del>- for (ei = 0, el = valid_elements.length; ei < el; ei++) {
</del><ins>+ for (ei = 0, el = validElements.length; ei < el; ei++) {
</ins><span class="cx"> // Parse element rule
</span><del>- matches = elementRuleRegExp.exec(valid_elements[ei]);
</del><ins>+ matches = elementRuleRegExp.exec(validElements[ei]);
</ins><span class="cx"> if (matches) {
</span><span class="cx"> // Setup local names for matches
</span><span class="cx"> prefix = matches[1];
</span><span class="lines">@@ -9336,11 +10621,11 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function setValidElements(valid_elements) {
</del><ins>+ function setValidElements(validElements) {
</ins><span class="cx"> elements = {};
</span><span class="cx"> patternElements = [];
</span><span class="cx">
</span><del>- addValidElements(valid_elements);
</del><ins>+ addValidElements(validElements);
</ins><span class="cx">
</span><span class="cx"> each(schemaItems, function(element, name) {
</span><span class="cx"> children[name] = element.children;
</span><span class="lines">@@ -9348,14 +10633,14 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Adds custom non HTML elements to the schema
</span><del>- function addCustomElements(custom_elements) {
</del><ins>+ function addCustomElements(customElements) {
</ins><span class="cx"> var customElementRegExp = /^(~)?(.+)$/;
</span><span class="cx">
</span><del>- if (custom_elements) {
</del><ins>+ if (customElements) {
</ins><span class="cx"> // Flush cached items since we are altering the default maps
</span><span class="cx"> mapCache.text_block_elements = mapCache.block_elements = null;
</span><span class="cx">
</span><del>- each(split(custom_elements, ','), function(rule) {
</del><ins>+ each(split(customElements, ','), function(rule) {
</ins><span class="cx"> var matches = customElementRegExp.exec(rule),
</span><span class="cx"> inline = matches[1] === '~',
</span><span class="cx"> cloneName = inline ? 'span' : 'div',
</span><span class="lines">@@ -9393,11 +10678,11 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Adds valid children to the schema object
</span><del>- function addValidChildren(valid_children) {
</del><ins>+ function addValidChildren(validChildren) {
</ins><span class="cx"> var childRuleRegExp = /^([+\-]?)(\w+)\[([^\]]+)\]$/;
</span><span class="cx">
</span><del>- if (valid_children) {
- each(split(valid_children, ','), function(rule) {
</del><ins>+ if (validChildren) {
+ each(split(validChildren, ','), function(rule) {
</ins><span class="cx"> var matches = childRuleRegExp.exec(rule), parent, prefix;
</span><span class="cx">
</span><span class="cx"> if (matches) {
</span><span class="lines">@@ -9842,7 +11127,7 @@
</span><span class="cx"> var count = 1, index, matches, tokenRegExp, shortEndedElements;
</span><span class="cx">
</span><span class="cx"> shortEndedElements = schema.getShortEndedElements();
</span><del>- tokenRegExp = /<([!?\/])?([A-Za-z0-9\-\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g;
</del><ins>+ tokenRegExp = /<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g;
</ins><span class="cx"> tokenRegExp.lastIndex = index = startIndex;
</span><span class="cx">
</span><span class="cx"> while ((matches = tokenRegExp.exec(html))) {
</span><span class="lines">@@ -10010,7 +11295,7 @@
</span><span class="cx"> '(?:!DOCTYPE([\\w\\W]*?)>)|' + // DOCTYPE
</span><span class="cx"> '(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|' + // PI
</span><span class="cx"> '(?:\\/([^>]+)>)|' + // End element
</span><del>- '(?:([A-Za-z0-9\\-\\:\\.]+)((?:\\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\\/|\\s+)>)' + // Start element
</del><ins>+ '(?:([A-Za-z0-9\\-_\\:\\.]+)((?:\\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\\/|\\s+)>)' + // Start element
</ins><span class="cx"> ')', 'g');
</span><span class="cx">
</span><span class="cx"> attrRegExp = /([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g;
</span><span class="lines">@@ -12618,7 +13903,11 @@
</span><span class="cx"> ratio = startH / startW;
</span><span class="cx"> selectedHandle = handle;
</span><span class="cx">
</span><del>- handle.startPos = dom.getPos(handle.elm, rootElement);
</del><ins>+ handle.startPos = {
+ x: targetWidth * handle[0] + selectedElmX,
+ y: targetHeight * handle[1] + selectedElmY
+ };
+
</ins><span class="cx"> startScrollWidth = rootElement.scrollWidth;
</span><span class="cx"> startScrollHeight = rootElement.scrollHeight;
</span><span class="cx">
</span><span class="lines">@@ -12741,7 +14030,7 @@
</span><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> controlElm = e.type == 'mousedown' ? e.target : selection.getNode();
</span><del>- controlElm = dom.getParent(controlElm, isIE ? 'table' : 'table,img,hr');
</del><ins>+ controlElm = dom.$(controlElm).closest(isIE ? 'table' : 'table,img,hr')[0];
</ins><span class="cx">
</span><span class="cx"> if (isChildOrEqual(controlElm, rootElement)) {
</span><span class="cx"> disableGeckoResize();
</span><span class="lines">@@ -12791,6 +14080,11 @@
</span><span class="cx">
</span><span class="cx"> // Remove native selection and let the magic begin
</span><span class="cx"> resizeStarted = true;
</span><ins>+ editor.fire('ObjectResizeStart', {
+ target: selectedElm,
+ width: selectedElm.clientWidth,
+ height: selectedElm.clientHeight
+ });
</ins><span class="cx"> editor.getDoc().selection.empty();
</span><span class="cx"> showResizeRect(target, name, lastMouseDownEvent);
</span><span class="cx"> }
</span><span class="lines">@@ -12799,6 +14093,7 @@
</span><span class="cx"> var target = e.srcElement;
</span><span class="cx">
</span><span class="cx"> if (target != selectedElm) {
</span><ins>+ editor.fire('ObjectSelected', {target: target});
</ins><span class="cx"> detachResizeStartListener();
</span><span class="cx">
</span><span class="cx"> if (target.id.indexOf('mceResizeHandle') === 0) {
</span><span class="lines">@@ -12879,7 +14174,7 @@
</span><span class="cx"> editor.on('mouseup', function(e) {
</span><span class="cx"> var nodeName = e.target.nodeName;
</span><span class="cx">
</span><del>- if (/^(TABLE|IMG|HR)$/.test(nodeName)) {
</del><ins>+ if (!resizeStarted && /^(TABLE|IMG|HR)$/.test(nodeName)) {
</ins><span class="cx"> editor.selection.select(e.target, nodeName == 'TABLE');
</span><span class="cx"> editor.nodeChanged();
</span><span class="cx"> }
</span><span class="lines">@@ -12938,503 +14233,6 @@
</span><span class="cx"> };
</span><span class="cx"> });
</span><span class="cx">
</span><del>-// Included from: js/tinymce/classes/dom/RangeUtils.js
-
-/**
- * RangeUtils.js
- *
- * Copyright, Moxiecode Systems AB
- * Released under LGPL License.
- *
- * License: http://www.tinymce.com/license
- * Contributing: http://www.tinymce.com/contributing
- */
-
-/**
- * This class contains a few utility methods for ranges.
- *
- * @class tinymce.dom.RangeUtils
- * @private
- */
-define("tinymce/dom/RangeUtils", [
- "tinymce/util/Tools",
- "tinymce/dom/TreeWalker"
-], function(Tools, TreeWalker) {
- var each = Tools.each;
-
- function getEndChild(container, index) {
- var childNodes = container.childNodes;
-
- index--;
-
- if (index > childNodes.length - 1) {
- index = childNodes.length - 1;
- } else if (index < 0) {
- index = 0;
- }
-
- return childNodes[index] || container;
- }
-
- function RangeUtils(dom) {
- /**
- * Walks the specified range like object and executes the callback for each sibling collection it finds.
- *
- * @method walk
- * @param {Object} rng Range like object.
- * @param {function} callback Callback function to execute for each sibling collection.
- */
- this.walk = function(rng, callback) {
- var startContainer = rng.startContainer,
- startOffset = rng.startOffset,
- endContainer = rng.endContainer,
- endOffset = rng.endOffset,
- ancestor, startPoint,
- endPoint, node, parent, siblings, nodes;
-
- // Handle table cell selection the table plugin enables
- // you to fake select table cells and perform formatting actions on them
- nodes = dom.select('td.mce-item-selected,th.mce-item-selected');
- if (nodes.length > 0) {
- each(nodes, function(node) {
- callback([node]);
- });
-
- return;
- }
-
- /**
- * Excludes start/end text node if they are out side the range
- *
- * @private
- * @param {Array} nodes Nodes to exclude items from.
- * @return {Array} Array with nodes excluding the start/end container if needed.
- */
- function exclude(nodes) {
- var node;
-
- // First node is excluded
- node = nodes[0];
- if (node.nodeType === 3 && node === startContainer && startOffset >= node.nodeValue.length) {
- nodes.splice(0, 1);
- }
-
- // Last node is excluded
- node = nodes[nodes.length - 1];
- if (endOffset === 0 && nodes.length > 0 && node === endContainer && node.nodeType === 3) {
- nodes.splice(nodes.length - 1, 1);
- }
-
- return nodes;
- }
-
- /**
- * Collects siblings
- *
- * @private
- * @param {Node} node Node to collect siblings from.
- * @param {String} name Name of the sibling to check for.
- * @return {Array} Array of collected siblings.
- */
- function collectSiblings(node, name, end_node) {
- var siblings = [];
-
- for (; node && node != end_node; node = node[name]) {
- siblings.push(node);
- }
-
- return siblings;
- }
-
- /**
- * Find an end point this is the node just before the common ancestor root.
- *
- * @private
- * @param {Node} node Node to start at.
- * @param {Node} root Root/ancestor element to stop just before.
- * @return {Node} Node just before the root element.
- */
- function findEndPoint(node, root) {
- do {
- if (node.parentNode == root) {
- return node;
- }
-
- node = node.parentNode;
- } while(node);
- }
-
- function walkBoundary(start_node, end_node, next) {
- var siblingName = next ? 'nextSibling' : 'previousSibling';
-
- for (node = start_node, parent = node.parentNode; node && node != end_node; node = parent) {
- parent = node.parentNode;
- siblings = collectSiblings(node == start_node ? node : node[siblingName], siblingName);
-
- if (siblings.length) {
- if (!next) {
- siblings.reverse();
- }
-
- callback(exclude(siblings));
- }
- }
- }
-
- // If index based start position then resolve it
- if (startContainer.nodeType == 1 && startContainer.hasChildNodes()) {
- startContainer = startContainer.childNodes[startOffset];
- }
-
- // If index based end position then resolve it
- if (endContainer.nodeType == 1 && endContainer.hasChildNodes()) {
- endContainer = getEndChild(endContainer, endOffset);
- }
-
- // Same container
- if (startContainer == endContainer) {
- return callback(exclude([startContainer]));
- }
-
- // Find common ancestor and end points
- ancestor = dom.findCommonAncestor(startContainer, endContainer);
-
- // Process left side
- for (node = startContainer; node; node = node.parentNode) {
- if (node === endContainer) {
- return walkBoundary(startContainer, ancestor, true);
- }
-
- if (node === ancestor) {
- break;
- }
- }
-
- // Process right side
- for (node = endContainer; node; node = node.parentNode) {
- if (node === startContainer) {
- return walkBoundary(endContainer, ancestor);
- }
-
- if (node === ancestor) {
- break;
- }
- }
-
- // Find start/end point
- startPoint = findEndPoint(startContainer, ancestor) || startContainer;
- endPoint = findEndPoint(endContainer, ancestor) || endContainer;
-
- // Walk left leaf
- walkBoundary(startContainer, startPoint, true);
-
- // Walk the middle from start to end point
- siblings = collectSiblings(
- startPoint == startContainer ? startPoint : startPoint.nextSibling,
- 'nextSibling',
- endPoint == endContainer ? endPoint.nextSibling : endPoint
- );
-
- if (siblings.length) {
- callback(exclude(siblings));
- }
-
- // Walk right leaf
- walkBoundary(endContainer, endPoint);
- };
-
- /**
- * Splits the specified range at it's start/end points.
- *
- * @private
- * @param {Range/RangeObject} rng Range to split.
- * @return {Object} Range position object.
- */
- this.split = function(rng) {
- var startContainer = rng.startContainer,
- startOffset = rng.startOffset,
- endContainer = rng.endContainer,
- endOffset = rng.endOffset;
-
- function splitText(node, offset) {
- return node.splitText(offset);
- }
-
- // Handle single text node
- if (startContainer == endContainer && startContainer.nodeType == 3) {
- if (startOffset > 0 && startOffset < startContainer.nodeValue.length) {
- endContainer = splitText(startContainer, startOffset);
- startContainer = endContainer.previousSibling;
-
- if (endOffset > startOffset) {
- endOffset = endOffset - startOffset;
- startContainer = endContainer = splitText(endContainer, endOffset).previousSibling;
- endOffset = endContainer.nodeValue.length;
- startOffset = 0;
- } else {
- endOffset = 0;
- }
- }
- } else {
- // Split startContainer text node if needed
- if (startContainer.nodeType == 3 && startOffset > 0 && startOffset < startContainer.nodeValue.length) {
- startContainer = splitText(startContainer, startOffset);
- startOffset = 0;
- }
-
- // Split endContainer text node if needed
- if (endContainer.nodeType == 3 && endOffset > 0 && endOffset < endContainer.nodeValue.length) {
- endContainer = splitText(endContainer, endOffset).previousSibling;
- endOffset = endContainer.nodeValue.length;
- }
- }
-
- return {
- startContainer: startContainer,
- startOffset: startOffset,
- endContainer: endContainer,
- endOffset: endOffset
- };
- };
-
- /**
- * Normalizes the specified range by finding the closest best suitable caret location.
- *
- * @private
- * @param {Range} rng Range to normalize.
- * @return {Boolean} True/false if the specified range was normalized or not.
- */
- this.normalize = function(rng) {
- var normalized, collapsed;
-
- function normalizeEndPoint(start) {
- var container, offset, walker, body = dom.getRoot(), node, nonEmptyElementsMap;
- var directionLeft, isAfterNode;
-
- function hasBrBeforeAfter(node, left) {
- var walker = new TreeWalker(node, dom.getParent(node.parentNode, dom.isBlock) || body);
-
- while ((node = walker[left ? 'prev' : 'next']())) {
- if (node.nodeName === "BR") {
- return true;
- }
- }
- }
-
- function isPrevNode(node, name) {
- return node.previousSibling && node.previousSibling.nodeName == name;
- }
-
- // Walks the dom left/right to find a suitable text node to move the endpoint into
- // It will only walk within the current parent block or body and will stop if it hits a block or a BR/IMG
- function findTextNodeRelative(left, startNode) {
- var walker, lastInlineElement, parentBlockContainer;
-
- startNode = startNode || container;
- parentBlockContainer = dom.getParent(startNode.parentNode, dom.isBlock) || body;
-
- // Lean left before the BR element if it's the only BR within a block element. Gecko bug: #6680
- // This: <p><br>|</p> becomes <p>|<br></p>
- if (left && startNode.nodeName == 'BR' && isAfterNode && dom.isEmpty(parentBlockContainer)) {
- container = startNode.parentNode;
- offset = dom.nodeIndex(startNode);
- normalized = true;
- return;
- }
-
- // Walk left until we hit a text node we can move to or a block/br/img
- walker = new TreeWalker(startNode, parentBlockContainer);
- while ((node = walker[left ? 'prev' : 'next']())) {
- // Break if we hit a non content editable node
- if (dom.getContentEditableParent(node) === "false") {
- return;
- }
-
- // Found text node that has a length
- if (node.nodeType === 3 && node.nodeValue.length > 0) {
- container = node;
- offset = left ? node.nodeValue.length : 0;
- normalized = true;
- return;
- }
-
- // Break if we find a block or a BR/IMG/INPUT etc
- if (dom.isBlock(node) || nonEmptyElementsMap[node.nodeName.toLowerCase()]) {
- return;
- }
-
- lastInlineElement = node;
- }
-
- // Only fetch the last inline element when in caret mode for now
- if (collapsed && lastInlineElement) {
- container = lastInlineElement;
- normalized = true;
- offset = 0;
- }
- }
-
- container = rng[(start ? 'start' : 'end') + 'Container'];
- offset = rng[(start ? 'start' : 'end') + 'Offset'];
- isAfterNode = container.nodeType == 1 && offset === container.childNodes.length;
- nonEmptyElementsMap = dom.schema.getNonEmptyElements();
- directionLeft = start;
-
- if (container.nodeType == 1 && offset > container.childNodes.length - 1) {
- directionLeft = false;
- }
-
- // If the container is a document move it to the body element
- if (container.nodeType === 9) {
- container = dom.getRoot();
- offset = 0;
- }
-
- // If the container is body try move it into the closest text node or position
- if (container === body) {
- // If start is before/after a image, table etc
- if (directionLeft) {
- node = container.childNodes[offset > 0 ? offset - 1 : 0];
- if (node) {
- if (nonEmptyElementsMap[node.nodeName] || node.nodeName == "TABLE") {
- return;
- }
- }
- }
-
- // Resolve the index
- if (container.hasChildNodes()) {
- offset = Math.min(!directionLeft && offset > 0 ? offset - 1 : offset, container.childNodes.length - 1);
- container = container.childNodes[offset];
- offset = 0;
-
- // Don't walk into elements that doesn't have any child nodes like a IMG
- if (container.hasChildNodes() && !/TABLE/.test(container.nodeName)) {
- // Walk the DOM to find a text node to place the caret at or a BR
- node = container;
- walker = new TreeWalker(container, body);
-
- do {
- // Found a text node use that position
- if (node.nodeType === 3 && node.nodeValue.length > 0) {
- offset = directionLeft ? 0 : node.nodeValue.length;
- container = node;
- normalized = true;
- break;
- }
-
- // Found a BR/IMG element that we can place the caret before
- if (nonEmptyElementsMap[node.nodeName.toLowerCase()]) {
- offset = dom.nodeIndex(node);
- container = node.parentNode;
-
- // Put caret after image when moving the end point
- if (node.nodeName == "IMG" && !directionLeft) {
- offset++;
- }
-
- normalized = true;
- break;
- }
- } while ((node = (directionLeft ? walker.next() : walker.prev())));
- }
- }
- }
-
- // Lean the caret to the left if possible
- if (collapsed) {
- // So this: <b>x</b><i>|x</i>
- // Becomes: <b>x|</b><i>x</i>
- // Seems that only gecko has issues with this
- if (container.nodeType === 3 && offset === 0) {
- findTextNodeRelative(true);
- }
-
- // Lean left into empty inline elements when the caret is before a BR
- // So this: <i><b></b><i>|<br></i>
- // Becomes: <i><b>|</b><i><br></i>
- // Seems that only gecko has issues with this.
- // Special edge case for <p><a>x</a>|<br></p> since we don't want <p><a>x|</a><br></p>
- if (container.nodeType === 1) {
- node = container.childNodes[offset];
-
- // Offset is after the containers last child
- // then use the previous child for normalization
- if (!node) {
- node = container.childNodes[offset - 1];
- }
-
- if (node && node.nodeName === 'BR' && !isPrevNode(node, 'A') &&
- !hasBrBeforeAfter(node) && !hasBrBeforeAfter(node, true)) {
- findTextNodeRelative(true, node);
- }
- }
- }
-
- // Lean the start of the selection right if possible
- // So this: x[<b>x]</b>
- // Becomes: x<b>[x]</b>
- if (directionLeft && !collapsed && container.nodeType === 3 && offset === container.nodeValue.length) {
- findTextNodeRelative(false);
- }
-
- // Set endpoint if it was normalized
- if (normalized) {
- rng['set' + (start ? 'Start' : 'End')](container, offset);
- }
- }
-
- collapsed = rng.collapsed;
-
- normalizeEndPoint(true);
-
- if (!collapsed) {
- normalizeEndPoint();
- }
-
- // If it was collapsed then make sure it still is
- if (normalized && collapsed) {
- rng.collapse(true);
- }
-
- return normalized;
- };
- }
-
- /**
- * Compares two ranges and checks if they are equal.
- *
- * @static
- * @method compareRanges
- * @param {DOMRange} rng1 First range to compare.
- * @param {DOMRange} rng2 First range to compare.
- * @return {Boolean} true/false if the ranges are equal.
- */
- RangeUtils.compareRanges = function(rng1, rng2) {
- if (rng1 && rng2) {
- // Compare native IE ranges
- if (rng1.item || rng1.duplicate) {
- // Both are control ranges and the selected element matches
- if (rng1.item && rng2.item && rng1.item(0) === rng2.item(0)) {
- return true;
- }
-
- // Both are text ranges and the range matches
- if (rng1.isEqual && rng2.isEqual && rng2.isEqual(rng1)) {
- return true;
- }
- } else {
- // Compare w3c ranges
- return rng1.startContainer == rng2.startContainer && rng1.startOffset == rng2.startOffset;
- }
- }
-
- return false;
- };
-
- return RangeUtils;
-});
-
</del><span class="cx"> // Included from: js/tinymce/classes/dom/BookmarkManager.js
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -14261,9 +15059,9 @@
</span><span class="cx"> * Collapse the selection to start or end of range.
</span><span class="cx"> *
</span><span class="cx"> * @method collapse
</span><del>- * @param {Boolean} to_start Optional boolean state if to collapse to end or not. Defaults to start.
</del><ins>+ * @param {Boolean} toStart Optional boolean state if to collapse to end or not. Defaults to start.
</ins><span class="cx"> */
</span><del>- collapse: function(to_start) {
</del><ins>+ collapse: function(toStart) {
</ins><span class="cx"> var self = this, rng = self.getRng(), node;
</span><span class="cx">
</span><span class="cx"> // Control range on IE
</span><span class="lines">@@ -14273,7 +15071,7 @@
</span><span class="cx"> rng.moveToElementText(node);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- rng.collapse(!!to_start);
</del><ins>+ rng.collapse(!!toStart);
</ins><span class="cx"> self.setRng(rng);
</span><span class="cx"> },
</span><span class="cx">
</span><span class="lines">@@ -15196,8 +15994,8 @@
</span><span class="cx"> {inline: 'strike', remove: 'all'}
</span><span class="cx"> ],
</span><span class="cx">
</span><del>- forecolor: {inline: 'span', styles: {color: '%value'}, wrap_links: false},
- hilitecolor: {inline: 'span', styles: {backgroundColor: '%value'}, wrap_links: false},
</del><ins>+ forecolor: {inline: 'span', styles: {color: '%value'}, wrap_links: false, remove_similar: true},
+ hilitecolor: {inline: 'span', styles: {backgroundColor: '%value'}, wrap_links: false, remove_similar: true},
</ins><span class="cx"> fontname: {inline: 'span', styles: {fontFamily: '%value'}},
</span><span class="cx"> fontsize: {inline: 'span', styles: {fontSize: '%value'}},
</span><span class="cx"> fontsize_class: {inline: 'span', attributes: {'class': '%value'}},
</span><span class="lines">@@ -15418,62 +16216,6 @@
</span><span class="cx"> return rng;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function applyStyleToList(node, bookmark, wrapElm, newWrappers, process){
- var nodes = [], listIndex = -1, list, startIndex = -1, endIndex = -1, currentWrapElm;
-
- // find the index of the first child list.
- each(node.childNodes, function(n, index) {
- if (n.nodeName === "UL" || n.nodeName === "OL") {
- listIndex = index;
- list = n;
- return false;
- }
- });
-
- // get the index of the bookmarks
- each(node.childNodes, function(n, index) {
- if (isBookmarkNode(n)) {
- if (n.id == bookmark.id + "_start") {
- startIndex = index;
- } else if (n.id == bookmark.id + "_end") {
- endIndex = index;
- }
- }
- });
-
- // if the selection spans across an embedded list, or there isn't an embedded list - handle processing normally
- if (listIndex <= 0 || (startIndex < listIndex && endIndex > listIndex)) {
- each(grep(node.childNodes), process);
- return 0;
- } else {
- currentWrapElm = dom.clone(wrapElm, FALSE);
-
- // create a list of the nodes on the same side of the list as the selection
- each(grep(node.childNodes), function(n, index) {
- if ((startIndex < listIndex && index < listIndex) || (startIndex > listIndex && index > listIndex)) {
- nodes.push(n);
- n.parentNode.removeChild(n);
- }
- });
-
- // insert the wrapping element either before or after the list.
- if (startIndex < listIndex) {
- node.insertBefore(currentWrapElm, list);
- } else if (startIndex > listIndex) {
- node.insertBefore(currentWrapElm, list.nextSibling);
- }
-
- // add the new nodes to the list.
- newWrappers.push(currentWrapElm);
-
- each(nodes, function(node) {
- currentWrapElm.appendChild(node);
- });
-
- return currentWrapElm;
- }
- }
-
</del><span class="cx"> function applyRngStyle(rng, bookmark, node_specific) {
</span><span class="cx"> var newWrappers = [], wrapName, wrapElm, contentEditable = true;
</span><span class="cx">
</span><span class="lines">@@ -15570,10 +16312,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> currentWrapElm.appendChild(node);
</span><del>- } else if (nodeName == 'li' && bookmark) {
- // Start wrapping - if we are in a list node and have a bookmark, then
- // we will always begin by wrapping in a new element.
- currentWrapElm = applyStyleToList(node, bookmark, wrapElm, newWrappers, process);
</del><span class="cx"> } else {
</span><span class="cx"> // Start a new wrapper for possible children
</span><span class="cx"> currentWrapElm = 0;
</span><span class="lines">@@ -15778,7 +16516,7 @@
</span><span class="cx"> * @param {Object} vars Optional list of variables to replace within format before removing it.
</span><span class="cx"> * @param {Node/Range} node Optional node or DOM range to remove the format from defaults to current selection.
</span><span class="cx"> */
</span><del>- function remove(name, vars, node) {
</del><ins>+ function remove(name, vars, node, similar) {
</ins><span class="cx"> var formatList = get(name), format = formatList[0], bookmark, rng, contentEditable = true;
</span><span class="cx">
</span><span class="cx"> // Merges the styles for each node
</span><span class="lines">@@ -15828,7 +16566,7 @@
</span><span class="cx"> // Find format root element
</span><span class="cx"> if (!formatRoot && parent.id != '_start' && parent.id != '_end') {
</span><span class="cx"> // Is the node matching the format we are looking for
</span><del>- format = matchNode(parent, name, vars);
</del><ins>+ format = matchNode(parent, name, vars, similar);
</ins><span class="cx"> if (format && format.split !== false) {
</span><span class="cx"> formatRoot = parent;
</span><span class="cx"> }
</span><span class="lines">@@ -15838,12 +16576,12 @@
</span><span class="cx"> return formatRoot;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function wrapAndSplit(format_root, container, target, split) {
</del><ins>+ function wrapAndSplit(formatRoot, container, target, split) {
</ins><span class="cx"> var parent, clone, lastClone, firstClone, i, formatRootParent;
</span><span class="cx">
</span><span class="cx"> // Format root found then clone formats and split it
</span><del>- if (format_root) {
- formatRootParent = format_root.parentNode;
</del><ins>+ if (formatRoot) {
+ formatRootParent = formatRoot.parentNode;
</ins><span class="cx">
</span><span class="cx"> for (parent = container.parentNode; parent && parent != formatRootParent; parent = parent.parentNode) {
</span><span class="cx"> clone = dom.clone(parent, FALSE);
</span><span class="lines">@@ -15870,8 +16608,8 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Never split block elements if the format is mixed
</span><del>- if (split && (!format.mixed || !isBlock(format_root))) {
- container = dom.split(format_root, container);
</del><ins>+ if (split && (!format.mixed || !isBlock(formatRoot))) {
+ container = dom.split(formatRoot, container);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Wrap container in cloned formats
</span><span class="lines">@@ -16003,7 +16741,7 @@
</span><span class="cx">
</span><span class="cx"> ed.nodeChanged();
</span><span class="cx"> } else {
</span><del>- performCaretAction('remove', name, vars);
</del><ins>+ performCaretAction('remove', name, vars, similar);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -16235,6 +16973,11 @@
</span><span class="cx"> ed.on('NodeChange', function(e) {
</span><span class="cx"> var parents = getParents(e.element), matchedFormats = {};
</span><span class="cx">
</span><ins>+ // Ignore bogus nodes like the <a> tag created by moveStart()
+ parents = Tools.grep(parents, function(node) {
+ return !node.getAttribute('data-mce-bogus');
+ });
+
</ins><span class="cx"> // Check for new formats
</span><span class="cx"> each(formatChangeData, function(callbacks, format) {
</span><span class="cx"> each(parents, function(node) {
</span><span class="lines">@@ -16834,7 +17577,7 @@
</span><span class="cx"> compare_node = 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!compare_node || isEq(getStyle(compare_node, name), value)) {
</del><ins>+ if (format.remove_similar || (!compare_node || isEq(getStyle(compare_node, name), value))) {
</ins><span class="cx"> dom.setStyle(node, name, '');
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -17092,7 +17835,7 @@
</span><span class="cx"> return container;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function performCaretAction(type, name, vars) {
</del><ins>+ function performCaretAction(type, name, vars, similar) {
</ins><span class="cx"> var caretContainerId = '_mce_caret', debug = ed.settings.caret_debug;
</span><span class="cx">
</span><span class="cx"> // Creates a caret container bogus element
</span><span class="lines">@@ -17260,7 +18003,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> while (node) {
</span><del>- if (matchNode(node, name, vars)) {
</del><ins>+ if (matchNode(node, name, vars, similar)) {
</ins><span class="cx"> formatNode = node;
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="lines">@@ -17321,7 +18064,7 @@
</span><span class="cx"> // Move selection to text node
</span><span class="cx"> selection.setCursorLocation(node, 1);
</span><span class="cx">
</span><del>- // If the formatNode is empty, we can remove it safely.
</del><ins>+ // If the formatNode is empty, we can remove it safely.
</ins><span class="cx"> if (dom.isEmpty(formatNode)) {
</span><span class="cx"> dom.remove(formatNode);
</span><span class="cx"> }
</span><span class="lines">@@ -17419,7 +18162,7 @@
</span><span class="cx"> if (node.nodeType == 3 && !isWhiteSpaceNode(node)) {
</span><span class="cx"> // IE has a "neat" feature where it moves the start node into the closest element
</span><span class="cx"> // we can avoid this by inserting an element before it and then remove it after we set the selection
</span><del>- tmpNode = dom.create('a', null, INVISIBLE_CHAR);
</del><ins>+ tmpNode = dom.create('a', {'data-mce-bogus': 'all'}, INVISIBLE_CHAR);
</ins><span class="cx"> node.parentNode.insertBefore(tmpNode, node);
</span><span class="cx">
</span><span class="cx"> // Set selection and remove tmpNode
</span><span class="lines">@@ -17474,6 +18217,7 @@
</span><span class="cx"> * It will keep all data-mce-bogus="1" elements since these can be used to place the caret etc and will
</span><span class="cx"> * be removed by the serialization logic when you save.
</span><span class="cx"> *
</span><ins>+ * @private
</ins><span class="cx"> * @return {String} HTML contents of the editor excluding some internal bogus elements.
</span><span class="cx"> */
</span><span class="cx"> function getContent() {
</span><span class="lines">@@ -17598,7 +18342,7 @@
</span><span class="cx"> editor.addShortcut('ctrl+z', '', 'Undo');
</span><span class="cx"> editor.addShortcut('ctrl+y,ctrl+shift+z', '', 'Redo');
</span><span class="cx">
</span><del>- editor.on('AddUndo Undo Redo ClearUndos MouseUp', function(e) {
</del><ins>+ editor.on('AddUndo Undo Redo ClearUndos', function(e) {
</ins><span class="cx"> if (!e.isDefaultPrevented()) {
</span><span class="cx"> editor.nodeChanged();
</span><span class="cx"> }
</span><span class="lines">@@ -19265,7 +20009,7 @@
</span><span class="cx"> editor.setContent('');
</span><span class="cx"> },
</span><span class="cx">
</span><del>- "InsertLineBreak": function (command, ui, value) {
</del><ins>+ InsertLineBreak: function(command, ui, value) {
</ins><span class="cx"> // We load the current event in from EnterKey.js when appropriate to heed
</span><span class="cx"> // certain event-specific variations such as ctrl-enter in a list
</span><span class="cx"> var evt = value;
</span><span class="lines">@@ -19453,13 +20197,14 @@
</span><span class="cx"> define("tinymce/util/URI", [
</span><span class="cx"> "tinymce/util/Tools"
</span><span class="cx"> ], function(Tools) {
</span><del>- var each = Tools.each, trim = Tools.trim,
- DEFAULT_PORTS = {
- 'ftp': 21,
- 'http': 80,
- 'https': 443,
- 'mailto': 25
- };
</del><ins>+ var each = Tools.each, trim = Tools.trim;
+ var queryParts = "source protocol authority userInfo user password host port relative path directory file query anchor".split(' ');
+ var DEFAULT_PORTS = {
+ 'ftp': 21,
+ 'http': 80,
+ 'https': 443,
+ 'mailto': 25
+ };
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Constructs a new URI instance.
</span><span class="lines">@@ -19508,7 +20253,7 @@
</span><span class="cx"> /*eslint max-len: 0 */
</span><span class="cx"> url = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(url);
</span><span class="cx">
</span><del>- each(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"], function(v, i) {
</del><ins>+ each(queryParts, function(v, i) {
</ins><span class="cx"> var part = url[i];
</span><span class="cx">
</span><span class="cx"> // Zope 3 workaround, they use @@something
</span><span class="lines">@@ -19642,7 +20387,7 @@
</span><span class="cx"> * @returns {Boolean} True if the origins are the same.
</span><span class="cx"> */
</span><span class="cx"> isSameOrigin: function(uri) {
</span><del>- if (this.host == uri.host && this.protocol == uri.protocol){
</del><ins>+ if (this.host == uri.host && this.protocol == uri.protocol) {
</ins><span class="cx"> if (this.port == uri.port) {
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="lines">@@ -19897,7 +20642,7 @@
</span><span class="cx"> // Creates a overloaded method for the class
</span><span class="cx"> // this enables you to use this._super(); to call the super function
</span><span class="cx"> function createMethod(name, fn) {
</span><del>- return function(){
</del><ins>+ return function() {
</ins><span class="cx"> var self = this, tmp = self._super, ret;
</span><span class="cx">
</span><span class="cx"> self._super = _super[name];
</span><span class="lines">@@ -19911,7 +20656,7 @@
</span><span class="cx"> // Instantiate a base class (but only create the instance,
</span><span class="cx"> // don't run the init constructor)
</span><span class="cx"> initializing = true;
</span><del>-
</del><ins>+
</ins><span class="cx"> /*eslint new-cap:0 */
</span><span class="cx"> prototype = new self();
</span><span class="cx"> initializing = false;
</span><span class="lines">@@ -22160,7 +22905,7 @@
</span><span class="cx"> * @method encode
</span><span class="cx"> * @param {String/Object/Array} text Text to entity encode.
</span><span class="cx"> * @param {Boolean} [translate=true] False if the contents shouldn't be translated.
</span><del>- * @return {String} Encoded and possible traslated string.
</del><ins>+ * @return {String} Encoded and possible traslated string.
</ins><span class="cx"> */
</span><span class="cx"> encode: function(text, translate) {
</span><span class="cx"> if (translate !== false) {
</span><span class="lines">@@ -22823,7 +23568,13 @@
</span><span class="cx"> return function(settings) {
</span><span class="cx"> var root = settings.root, focusedElement, focusedControl;
</span><span class="cx">
</span><del>- focusedElement = document.activeElement;
</del><ins>+ try {
+ focusedElement = document.activeElement;
+ } catch (ex) {
+ // IE sometimes fails to return a proper element
+ focusedElement = document.body;
+ }
+
</ins><span class="cx"> focusedControl = root.getParentCtrl(focusedElement);
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -23775,7 +24526,6 @@
</span><span class="cx"> height: docSize.height,
</span><span class="cx"> zIndex: 0x7FFFFFFF,
</span><span class="cx"> opacity: 0.0001,
</span><del>- background: 'red',
</del><span class="cx"> cursor: cursor
</span><span class="cx"> });
</span><span class="cx">
</span><span class="lines">@@ -24273,7 +25023,7 @@
</span><span class="cx"> "use strict";
</span><span class="cx">
</span><span class="cx"> return {
</span><del>- /**
</del><ins>+ /**
</ins><span class="cx"> * Resizes the control to contents.
</span><span class="cx"> *
</span><span class="cx"> * @method resizeToContent
</span><span class="lines">@@ -24284,7 +25034,7 @@
</span><span class="cx"> this.reflow();
</span><span class="cx"> },
</span><span class="cx">
</span><del>- /**
</del><ins>+ /**
</ins><span class="cx"> * Resizes the control to a specific width/height.
</span><span class="cx"> *
</span><span class="cx"> * @method resizeTo
</span><span class="lines">@@ -24305,7 +25055,7 @@
</span><span class="cx"> return this.layoutRect({minW: w, minH: h, w: w, h: h}).reflow();
</span><span class="cx"> },
</span><span class="cx">
</span><del>- /**
</del><ins>+ /**
</ins><span class="cx"> * Resizes the control to a specific relative width/height.
</span><span class="cx"> *
</span><span class="cx"> * @method resizeBy
</span><span class="lines">@@ -25117,8 +25867,8 @@
</span><span class="cx"> /**
</span><span class="cx"> * This class is used to create MessageBoxes like alerts/confirms etc.
</span><span class="cx"> *
</span><del>- * @class tinymce.ui.Window
- * @extends tinymce.ui.FloatPanel
</del><ins>+ * @class tinymce.ui.MessageBox
+ * @extends tinymce.ui.Window
</ins><span class="cx"> */
</span><span class="cx"> define("tinymce/ui/MessageBox", [
</span><span class="cx"> "tinymce/ui/Window"
</span><span class="lines">@@ -25200,44 +25950,41 @@
</span><span class="cx"> msgBox: function(settings) {
</span><span class="cx"> var buttons, callback = settings.callback || function() {};
</span><span class="cx">
</span><ins>+ function createButton(text, status, primary) {
+ return {
+ type: "button",
+ text: text,
+ subtype: primary ? 'primary' : '',
+ onClick: function(e) {
+ e.control.parents()[1].close();
+ callback(status);
+ }
+ };
+ }
+
</ins><span class="cx"> switch (settings.buttons) {
</span><span class="cx"> case MessageBox.OK_CANCEL:
</span><span class="cx"> buttons = [
</span><del>- {type: "button", text: "Ok", subtype: "primary", onClick: function(e) {
- e.control.parents()[1].close();
- callback(true);
- }},
-
- {type: "button", text: "Cancel", onClick: function(e) {
- e.control.parents()[1].close();
- callback(false);
- }}
</del><ins>+ createButton('Ok', true, true),
+ createButton('Cancel', false)
</ins><span class="cx"> ];
</span><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> case MessageBox.YES_NO:
</span><ins>+ case MessageBox.YES_NO_CANCEL:
</ins><span class="cx"> buttons = [
</span><del>- {type: "button", text: "Ok", subtype: "primary", onClick: function(e) {
- e.control.parents()[1].close();
- callback(true);
- }}
</del><ins>+ createButton('Yes', 1, true),
+ createButton('No', 0)
</ins><span class="cx"> ];
</span><del>- break;
</del><span class="cx">
</span><del>- case MessageBox.YES_NO_CANCEL:
- buttons = [
- {type: "button", text: "Ok", subtype: "primary", onClick: function(e) {
- e.control.parents()[1].close();
- }}
- ];
</del><ins>+ if (settings.buttons == MessageBox.YES_NO_CANCEL) {
+ buttons.push(createButton('Cancel', -1));
+ }
</ins><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> default:
</span><span class="cx"> buttons = [
</span><del>- {type: "button", text: "Ok", subtype: "primary", onClick: function(e) {
- e.control.parents()[1].close();
- callback(true);
- }}
</del><ins>+ createButton('Ok', true, true)
</ins><span class="cx"> ];
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="lines">@@ -25633,7 +26380,7 @@
</span><span class="cx"> * 7. Delete by selecting contents and writing a character.'
</span><span class="cx"> *
</span><span class="cx"> * This code is a ugly hack since writing full custom delete logic for just this bug
</span><del>- * fix seemed like a huge task. I hope we can remove this before the year 2030.
</del><ins>+ * fix seemed like a huge task. I hope we can remove this before the year 2030.
</ins><span class="cx"> */
</span><span class="cx"> function cleanupStylesWhenDeleting() {
</span><span class="cx"> var doc = editor.getDoc(), urlPrefix = 'data:text/mce-internal,';
</span><span class="lines">@@ -26049,8 +26796,6 @@
</span><span class="cx"> if (e.nodeName == 'A' && dom.hasClass(e, 'mce-item-anchor')) {
</span><span class="cx"> selection.select(e);
</span><span class="cx"> }
</span><del>-
- editor.nodeChanged();
</del><span class="cx"> });
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -26680,6 +27425,26 @@
</span><span class="cx"> });
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ /**
+ * Sometimes WebKit/Blink generates BR elements with the Apple-interchange-newline class.
+ *
+ * Scenario:
+ * 1) Create a table 2x2.
+ * 2) Select and copy cells A2-B2.
+ * 3) Paste and it will add BR element to table cell.
+ */
+ function removeAppleInterchangeBrs() {
+ parser.addNodeFilter('br', function(nodes) {
+ var i = nodes.length;
+
+ while (i--) {
+ if (nodes[i].attr('class') == 'Apple-interchange-newline') {
+ nodes[i].remove();
+ }
+ }
+ });
+ }
+
</ins><span class="cx"> // All browsers
</span><span class="cx"> removeBlockQuoteOnBackSpace();
</span><span class="cx"> emptyEditorWhenDeleting();
</span><span class="lines">@@ -26693,6 +27458,7 @@
</span><span class="cx"> setDefaultBlockType();
</span><span class="cx"> blockFormSubmitInsideEditor();
</span><span class="cx"> disableBackspaceIntoATable();
</span><ins>+ removeAppleInterchangeBrs();
</ins><span class="cx">
</span><span class="cx"> // iOS
</span><span class="cx"> if (Env.iOS) {
</span><span class="lines">@@ -27170,7 +27936,9 @@
</span><span class="cx"> */
</span><span class="cx"> define("tinymce/Editor", [
</span><span class="cx"> "tinymce/dom/DOMUtils",
</span><ins>+ "tinymce/dom/DomQuery",
</ins><span class="cx"> "tinymce/AddOnManager",
</span><ins>+ "tinymce/NodeChange",
</ins><span class="cx"> "tinymce/html/Node",
</span><span class="cx"> "tinymce/dom/Serializer",
</span><span class="cx"> "tinymce/html/Serializer",
</span><span class="lines">@@ -27192,7 +27960,7 @@
</span><span class="cx"> "tinymce/EditorObservable",
</span><span class="cx"> "tinymce/Shortcuts"
</span><span class="cx"> ], function(
</span><del>- DOMUtils, AddOnManager, Node, DomSerializer, Serializer,
</del><ins>+ DOMUtils, DomQuery, AddOnManager, NodeChange, Node, DomSerializer, Serializer,
</ins><span class="cx"> Selection, Formatter, UndoManager, EnterKey, ForceBlocks, EditorCommands,
</span><span class="cx"> URI, ScriptLoader, EventUtils, WindowManager,
</span><span class="cx"> Schema, DomParser, Quirks, Env, Tools, EditorObservable, Shortcuts
</span><span class="lines">@@ -27264,9 +28032,9 @@
</span><span class="cx"> inline_styles: true,
</span><span class="cx"> convert_fonts_to_spans: true,
</span><span class="cx"> indent: 'simple',
</span><del>- indent_before: 'p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,' +
</del><ins>+ indent_before: 'p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,ol,li,dl,dt,dd,area,table,thead,' +
</ins><span class="cx"> 'tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist',
</span><del>- indent_after: 'p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,' +
</del><ins>+ indent_after: 'p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,ol,li,dl,dt,dd,area,table,thead,' +
</ins><span class="cx"> 'tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist',
</span><span class="cx"> validate: true,
</span><span class="cx"> entity_encoding: 'named',
</span><span class="lines">@@ -27371,6 +28139,10 @@
</span><span class="cx"> self.queryValueCommands = {};
</span><span class="cx"> self.loadedCSS = {};
</span><span class="cx">
</span><ins>+ if (settings.target) {
+ self.targetElm = settings.target;
+ }
+
</ins><span class="cx"> self.suffix = editorManager.suffix;
</span><span class="cx"> self.editorManager = editorManager;
</span><span class="cx"> self.inline = settings.inline;
</span><span class="lines">@@ -27378,6 +28150,22 @@
</span><span class="cx"> // Call setup
</span><span class="cx"> editorManager.fire('SetupEditor', self);
</span><span class="cx"> self.execCallback('setup', self);
</span><ins>+
+ /**
+ * Dom query instance with default scope to the editor document and default element is the body of the editor.
+ *
+ * @property $
+ * @type tinymce.dom.DomQuery
+ * @example
+ * tinymce.activeEditor.$('p').css('color', 'red');
+ * tinymce.activeEditor.$().append('<p>new</p>');
+ */
+ self.$ = DomQuery.overrideDefaults(function() {
+ return {
+ context: self.inline ? self.getBody() : self.getDoc(),
+ element: self.getBody()
+ };
+ });
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> Editor.prototype = {
</span><span class="lines">@@ -27544,9 +28332,9 @@
</span><span class="cx">
</span><span class="cx"> each(dependencies, function(dep) {
</span><span class="cx"> var defaultSettings = {
</span><del>- prefix:'plugins/',
</del><ins>+ prefix: 'plugins/',
</ins><span class="cx"> resource: dep,
</span><del>- suffix:'/plugin' + suffix + '.js'
</del><ins>+ suffix: '/plugin' + suffix + '.js'
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> dep = PluginManager.createUrl(defaultSettings, dep);
</span><span class="lines">@@ -27604,7 +28392,7 @@
</span><span class="cx"> self.theme = new Theme(self, ThemeManager.urls[settings.theme]);
</span><span class="cx">
</span><span class="cx"> if (self.theme.init) {
</span><del>- self.theme.init(self, ThemeManager.urls[settings.theme] || self.documentBaseUrl.replace(/\/$/, ''));
</del><ins>+ self.theme.init(self, ThemeManager.urls[settings.theme] || self.documentBaseUrl.replace(/\/$/, ''), self.$);
</ins><span class="cx"> }
</span><span class="cx"> } else {
</span><span class="cx"> self.theme = settings.theme;
</span><span class="lines">@@ -27617,11 +28405,11 @@
</span><span class="cx"> pluginUrl = PluginManager.urls[plugin] || self.documentBaseUrl.replace(/\/$/, '');
</span><span class="cx"> plugin = trim(plugin);
</span><span class="cx"> if (Plugin && inArray(initializedPlugins, plugin) === -1) {
</span><del>- each(PluginManager.dependencies(plugin), function(dep){
</del><ins>+ each(PluginManager.dependencies(plugin), function(dep) {
</ins><span class="cx"> initPlugin(dep);
</span><span class="cx"> });
</span><span class="cx">
</span><del>- pluginInstance = new Plugin(self, pluginUrl);
</del><ins>+ pluginInstance = new Plugin(self, pluginUrl, self.$);
</ins><span class="cx">
</span><span class="cx"> self.plugins[plugin] = pluginInstance;
</span><span class="cx">
</span><span class="lines">@@ -27664,12 +28452,6 @@
</span><span class="cx">
</span><span class="cx"> // Resize editor
</span><span class="cx"> if (!settings.content_editable) {
</span><del>- DOM.setStyles(o.sizeContainer || o.editorContainer, {
- wi2dth: w,
- // TODO: Fix this
- h2eight: h
- });
-
</del><span class="cx"> h = (o.iframeHeight || h) + (typeof(h) == 'number' ? (o.deltaHeight || 0) : '');
</span><span class="cx"> if (h < minHeight) {
</span><span class="cx"> h = minHeight;
</span><span class="lines">@@ -27747,8 +28529,9 @@
</span><span class="cx"> bodyClass = bodyClass[self.id] || '';
</span><span class="cx"> }
</span><span class="cx">
</span><del>- self.iframeHTML += '</head><body id="' + bodyId + '" class="mce-content-body ' + bodyClass + '" ' +
- 'onload="window.parent.tinymce.get(\'' + self.id + '\').fire(\'load\');"><br></body></html>';
</del><ins>+ self.iframeHTML += '</head><body id="' + bodyId +
+ '" class="mce-content-body ' + bodyClass +
+ '" data-id="' + self.id + '"><br></body></html>';
</ins><span class="cx">
</span><span class="cx"> /*eslint no-script-url:0 */
</span><span class="cx"> var domainRelaxUrl = 'javascript:(function(){' +
</span><span class="lines">@@ -27763,14 +28546,14 @@
</span><span class="cx">
</span><span class="cx"> // Create iframe
</span><span class="cx"> // TODO: ACC add the appropriate description on this.
</span><del>- n = DOM.add(o.iframeContainer, 'iframe', {
</del><ins>+ var ifr = DOM.create('iframe', {
</ins><span class="cx"> id: self.id + "_ifr",
</span><del>- src: url || 'javascript:""', // Workaround for HTTPS warning in IE6/7
</del><ins>+ //src: url || 'javascript:""', // Workaround for HTTPS warning in IE6/7
</ins><span class="cx"> frameBorder: '0',
</span><span class="cx"> allowTransparency: "true",
</span><span class="cx"> title: self.editorManager.translate(
</span><del>- "Rich Text Area. Press ALT-F9 for menu. " +
- "Press ALT-F10 for toolbar. Press ALT-0 for help"
</del><ins>+ "Rich Text Area. Press ALT-F9 for menu. " +
+ "Press ALT-F10 for toolbar. Press ALT-0 for help"
</ins><span class="cx"> ),
</span><span class="cx"> style: {
</span><span class="cx"> width: '100%',
</span><span class="lines">@@ -27779,6 +28562,15 @@
</span><span class="cx"> }
</span><span class="cx"> });
</span><span class="cx">
</span><ins>+ ifr.onload = function() {
+ ifr.onload = null;
+ self.fire("load");
+ };
+
+ DOM.setAttrib("src", url || 'javascript:""');
+
+ n = DOM.add(o.iframeContainer, ifr);
+
</ins><span class="cx"> // Try accessing the document this will fail on IE when document.domain is set to the same as location.hostname
</span><span class="cx"> // Then we have to force domain relaxing using the domainRelaxUrl approach very ugly!!
</span><span class="cx"> if (ie) {
</span><span class="lines">@@ -27790,12 +28582,14 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> self.contentAreaContainer = o.iframeContainer;
</span><ins>+ self.iframeElement = ifr;
</ins><span class="cx">
</span><span class="cx"> if (o.editorContainer) {
</span><span class="cx"> DOM.get(o.editorContainer).style.display = self.orgDisplay;
</span><ins>+ self.hidden = DOM.isHidden(o.editorContainer);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- DOM.get(self.id).style.display = 'none';
</del><ins>+ self.getElement().style.display = 'none';
</ins><span class="cx"> DOM.setAttrib(self.id, 'aria-hidden', true);
</span><span class="cx">
</span><span class="cx"> if (!url) {
</span><span class="lines">@@ -27813,7 +28607,7 @@
</span><span class="cx"> * @private
</span><span class="cx"> */
</span><span class="cx"> initContentBody: function(skipWrite) {
</span><del>- var self = this, settings = self.settings, targetElm = DOM.get(self.id), doc = self.getDoc(), body, contentCssText;
</del><ins>+ var self = this, settings = self.settings, targetElm = self.getElement(), doc = self.getDoc(), body, contentCssText;
</ins><span class="cx">
</span><span class="cx"> // Restore visibility on target element
</span><span class="cx"> if (!settings.inline) {
</span><span class="lines">@@ -27886,7 +28680,7 @@
</span><span class="cx"> hex_colors: settings.force_hex_style_colors,
</span><span class="cx"> class_filter: settings.class_filter,
</span><span class="cx"> update_styles: true,
</span><del>- root_element: settings.content_editable ? self.id : null,
</del><ins>+ root_element: self.inline ? self.getBody() : null,
</ins><span class="cx"> collect: settings.content_editable,
</span><span class="cx"> schema: self.schema,
</span><span class="cx"> onSetAttrib: function(e) {
</span><span class="lines">@@ -27960,7 +28754,7 @@
</span><span class="cx"> node = nodes[i];
</span><span class="cx">
</span><span class="cx"> if (node.isEmpty(nonEmptyElements)) {
</span><del>- node.empty().append(new Node('br', 1)).shortEnded = true;
</del><ins>+ node.append(new Node('br', 1)).shortEnded = true;
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> });
</span><span class="lines">@@ -28015,6 +28809,7 @@
</span><span class="cx"> self.forceBlocks = new ForceBlocks(self);
</span><span class="cx"> self.enterKey = new EnterKey(self);
</span><span class="cx"> self.editorCommands = new EditorCommands(self);
</span><ins>+ self._nodeChangeDispatcher = new NodeChange(self);
</ins><span class="cx">
</span><span class="cx"> self.fire('PreInit');
</span><span class="cx">
</span><span class="lines">@@ -28025,7 +28820,7 @@
</span><span class="cx">
</span><span class="cx"> self.fire('PostRender');
</span><span class="cx">
</span><del>- self.quirks = Quirks(self);
</del><ins>+ self.quirks = new Quirks(self);
</ins><span class="cx">
</span><span class="cx"> if (settings.directionality) {
</span><span class="cx"> body.dir = settings.directionality;
</span><span class="lines">@@ -28098,7 +28893,7 @@
</span><span class="cx">
</span><span class="cx"> // Handle auto focus
</span><span class="cx"> if (settings.auto_focus) {
</span><del>- setTimeout(function () {
</del><ins>+ setTimeout(function() {
</ins><span class="cx"> var ed = self.editorManager.get(settings.auto_focus);
</span><span class="cx">
</span><span class="cx"> ed.selection.select(ed.getBody(), 1);
</span><span class="lines">@@ -28117,13 +28912,13 @@
</span><span class="cx"> * it will also place DOM focus inside the editor.
</span><span class="cx"> *
</span><span class="cx"> * @method focus
</span><del>- * @param {Boolean} skip_focus Skip DOM focus. Just set is as the active editor.
</del><ins>+ * @param {Boolean} skipFocus Skip DOM focus. Just set is as the active editor.
</ins><span class="cx"> */
</span><del>- focus: function(skip_focus) {
</del><ins>+ focus: function(skipFocus) {
</ins><span class="cx"> var oed, self = this, selection = self.selection, contentEditable = self.settings.content_editable, rng;
</span><span class="cx"> var controlElm, doc = self.getDoc(), body;
</span><span class="cx">
</span><del>- if (!skip_focus) {
</del><ins>+ if (!skipFocus) {
</ins><span class="cx"> // Get selected control element
</span><span class="cx"> rng = selection.getRng();
</span><span class="cx"> if (rng.item) {
</span><span class="lines">@@ -28300,36 +29095,7 @@
</span><span class="cx"> * @param {Object} args Optional args to pass to NodeChange event handlers.
</span><span class="cx"> */
</span><span class="cx"> nodeChanged: function(args) {
</span><del>- var self = this, selection = self.selection, node, parents, root;
-
- // Fix for bug #1896577 it seems that this can not be fired while the editor is loading
- if (self.initialized && !self.settings.disable_nodechange && !self.settings.readonly) {
- // Get start node
- root = self.getBody();
- node = selection.getStart() || root;
- node = ie && node.ownerDocument != self.getDoc() ? self.getBody() : node; // Fix for IE initial state
-
- // Edge case for <p>|<img></p>
- if (node.nodeName == 'IMG' && selection.isCollapsed()) {
- node = node.parentNode;
- }
-
- // Get parents and add them to object
- parents = [];
- self.dom.getParent(node, function(node) {
- if (node === root) {
- return true;
- }
-
- parents.push(node);
- });
-
- args = args || {};
- args.element = node;
- args.parents = parents;
-
- self.fire('NodeChange', args);
- }
</del><ins>+ this._nodeChangeDispatcher.nodeChanged(args);
</ins><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -28727,10 +29493,10 @@
</span><span class="cx"> * @example
</span><span class="cx"> * // Show progress for the active editor
</span><span class="cx"> * tinymce.activeEditor.setProgressState(true);
</span><del>- *
</del><ins>+ *
</ins><span class="cx"> * // Hide progress for the active editor
</span><span class="cx"> * tinymce.activeEditor.setProgressState(false);
</span><del>- *
</del><ins>+ *
</ins><span class="cx"> * // Show progress after 3 seconds
</span><span class="cx"> * tinymce.activeEditor.setProgressState(true, 3000);
</span><span class="cx"> */
</span><span class="lines">@@ -28875,7 +29641,7 @@
</span><span class="cx"> content = '<br data-mce-bogus="1">';
</span><span class="cx"> }
</span><span class="cx">
</span><del>- body.innerHTML = content;
</del><ins>+ self.dom.setHTML(body, content);
</ins><span class="cx">
</span><span class="cx"> self.fire('SetContent', args);
</span><span class="cx"> } else {
</span><span class="lines">@@ -29023,7 +29789,11 @@
</span><span class="cx"> * @return {Element} HTML DOM element for the replaced element.
</span><span class="cx"> */
</span><span class="cx"> getElement: function() {
</span><del>- return DOM.get(this.settings.content_element || this.id);
</del><ins>+ if (!this.targetElm) {
+ this.targetElm = DOM.get(this.id);
+ }
+
+ return this.targetElm;
</ins><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -29036,7 +29806,7 @@
</span><span class="cx"> var self = this, elm;
</span><span class="cx">
</span><span class="cx"> if (!self.contentWindow) {
</span><del>- elm = DOM.get(self.id + "_ifr");
</del><ins>+ elm = self.iframeElement;
</ins><span class="cx">
</span><span class="cx"> if (elm) {
</span><span class="cx"> self.contentWindow = elm.contentWindow;
</span><span class="lines">@@ -29134,12 +29904,10 @@
</span><span class="cx"> cls = settings.visual_table_class || 'mce-item-table';
</span><span class="cx"> value = dom.getAttrib(elm, 'border');
</span><span class="cx">
</span><del>- if (!value || value == '0') {
- if (self.hasVisual) {
- dom.addClass(elm, cls);
- } else {
- dom.removeClass(elm, cls);
- }
</del><ins>+ if ((!value || value == '0') && self.hasVisual) {
+ dom.addClass(elm, cls);
+ } else {
+ dom.removeClass(elm, cls);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return;
</span><span class="lines">@@ -29149,12 +29917,10 @@
</span><span class="cx"> value = dom.getAttrib(elm, 'name') || elm.id;
</span><span class="cx"> cls = settings.visual_anchor_class || 'mce-item-anchor';
</span><span class="cx">
</span><del>- if (value) {
- if (self.hasVisual) {
- dom.addClass(elm, cls);
- } else {
- dom.removeClass(elm, cls);
- }
</del><ins>+ if (value && self.hasVisual) {
+ dom.addClass(elm, cls);
+ } else {
+ dom.removeClass(elm, cls);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -29265,7 +30031,8 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> self.contentAreaContainer = self.formElement = self.container = self.editorContainer = null;
</span><del>- self.settings.content_element = self.bodyElement = self.contentDocument = self.contentWindow = null;
</del><ins>+ self.bodyElement = self.contentDocument = self.contentWindow = null;
+ self.iframeElement = self.targetElm = null;
</ins><span class="cx">
</span><span class="cx"> if (self.selection) {
</span><span class="cx"> self.selection = self.selection.win = self.selection.dom = self.selection.dom.doc = null;
</span><span class="lines">@@ -29480,20 +30247,36 @@
</span><span class="cx"> editor.on('init', function() {
</span><span class="cx"> // Gecko/WebKit has ghost selections in iframes and IE only has one selection per browser tab
</span><span class="cx"> if (editor.inline || Env.ie) {
</span><del>- // On other browsers take snapshot on nodechange in inline mode since they have Ghost selections for iframes
- editor.on('nodechange keyup', function() {
- var node = document.activeElement;
</del><ins>+ // Use the onbeforedeactivate event when available since it works better see #7023
+ if ("onbeforedeactivate" in document && Env.ie < 9) {
+ editor.dom.bind(editor.getBody(), 'beforedeactivate', function() {
+ try {
+ editor.lastRng = editor.selection.getRng();
+ } catch (ex) {
+ // IE throws "Unexcpected call to method or property access" some times so lets ignore it
+ }
+ });
+ } else {
+ // On other browsers take snapshot on nodechange in inline mode since they have Ghost selections for iframes
+ editor.on('nodechange mouseup keyup', function(e) {
+ var node = getActiveElement();
</ins><span class="cx">
</span><del>- // IE 11 reports active element as iframe not body of iframe
- if (node && node.id == editor.id + '_ifr') {
- node = editor.getBody();
- }
</del><ins>+ // Only act on manual nodechanges
+ if (e.type == 'nodechange' && e.selectionChange) {
+ return;
+ }
</ins><span class="cx">
</span><del>- if (editor.dom.isChildOf(node, editor.getBody())) {
- editor.lastRng = editor.selection.getRng();
- }
- });
</del><ins>+ // IE 11 reports active element as iframe not body of iframe
+ if (node && node.id == editor.id + '_ifr') {
+ node = editor.getBody();
+ }
</ins><span class="cx">
</span><ins>+ if (editor.dom.isChildOf(node, editor.getBody())) {
+ editor.lastRng = editor.selection.getRng();
+ }
+ });
+ }
+
</ins><span class="cx"> // Handles the issue with WebKit not retaining selection within inline document
</span><span class="cx"> // If the user releases the mouse out side the body since a mouse up event wont occur on the body
</span><span class="cx"> if (Env.webkit && !selectionChangeHandler) {
</span><span class="lines">@@ -29570,8 +30353,9 @@
</span><span class="cx"> var activeEditor = editorManager.activeEditor;
</span><span class="cx">
</span><span class="cx"> if (activeEditor && e.target.ownerDocument == document) {
</span><del>- // Check to make sure we have a valid selection
- if (activeEditor.selection) {
</del><ins>+ // Check to make sure we have a valid selection don't update the bookmark if it's
+ // a focusin to the body of the editor see #7025
+ if (activeEditor.selection && e.target != activeEditor.getBody()) {
</ins><span class="cx"> activeEditor.selection.lastFocusBookmark = createBookmark(activeEditor.dom, activeEditor.lastRng);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -29662,6 +30446,7 @@
</span><span class="cx"> */
</span><span class="cx"> define("tinymce/EditorManager", [
</span><span class="cx"> "tinymce/Editor",
</span><ins>+ "tinymce/dom/DomQuery",
</ins><span class="cx"> "tinymce/dom/DOMUtils",
</span><span class="cx"> "tinymce/util/URI",
</span><span class="cx"> "tinymce/Env",
</span><span class="lines">@@ -29669,7 +30454,7 @@
</span><span class="cx"> "tinymce/util/Observable",
</span><span class="cx"> "tinymce/util/I18n",
</span><span class="cx"> "tinymce/FocusManager"
</span><del>-], function(Editor, DOMUtils, URI, Env, Tools, Observable, I18n, FocusManager) {
</del><ins>+], function(Editor, DomQuery, DOMUtils, URI, Env, Tools, Observable, I18n, FocusManager) {
</ins><span class="cx"> var DOM = DOMUtils.DOM;
</span><span class="cx"> var explode = Tools.explode, each = Tools.each, extend = Tools.extend;
</span><span class="cx"> var instanceCounter = 0, beforeUnloadDelegate, EditorManager;
</span><span class="lines">@@ -29713,12 +30498,20 @@
</span><span class="cx">
</span><span class="cx"> EditorManager = {
</span><span class="cx"> /**
</span><ins>+ * Dom query instance.
+ *
+ * @property $
+ * @type tinymce.dom.DomQuery
+ */
+ $: DomQuery,
+
+ /**
</ins><span class="cx"> * Major version of TinyMCE build.
</span><span class="cx"> *
</span><span class="cx"> * @property majorVersion
</span><span class="cx"> * @type String
</span><span class="cx"> */
</span><del>- majorVersion : '4',
</del><ins>+ majorVersion: '4',
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Minor version of TinyMCE build.
</span><span class="lines">@@ -29726,7 +30519,7 @@
</span><span class="cx"> * @property minorVersion
</span><span class="cx"> * @type String
</span><span class="cx"> */
</span><del>- minorVersion : '0.29',
</del><ins>+ minorVersion: '1.2',
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Release date of TinyMCE build.
</span><span class="lines">@@ -29734,7 +30527,7 @@
</span><span class="cx"> * @property releaseDate
</span><span class="cx"> * @type String
</span><span class="cx"> */
</span><del>- releaseDate: '2014-06-xx',
</del><ins>+ releaseDate: '2014-07-15',
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Collection of editor instances.
</span><span class="lines">@@ -29894,26 +30687,27 @@
</span><span class="cx"> return id;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function createEditor(id, settings) {
</del><ins>+ function createEditor(id, settings, targetElm) {
</ins><span class="cx"> if (!purgeDestroyedEditor(self.get(id))) {
</span><span class="cx"> var editor = new Editor(id, settings, self);
</span><ins>+ editor.targetElm = editor.targetElm || targetElm;
</ins><span class="cx"> editors.push(editor);
</span><span class="cx"> editor.render();
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function execCallback(se, n, s) {
- var f = se[n];
</del><ins>+ function execCallback(name) {
+ var callback = settings[name];
</ins><span class="cx">
</span><del>- if (!f) {
</del><ins>+ if (!callback) {
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- return f.apply(s || this, Array.prototype.slice.call(arguments, 2));
</del><ins>+ return callback.apply(self, Array.prototype.slice.call(arguments, 2));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- function hasClass(n, c) {
- return c.constructor === RegExp ? c.test(n.className) : DOM.hasClass(n, c);
</del><ins>+ function hasClass(elm, className) {
+ return className.constructor === RegExp ? className.test(elm.className) : DOM.hasClass(elm, className);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function readyHandler() {
</span><span class="lines">@@ -29921,13 +30715,13 @@
</span><span class="cx">
</span><span class="cx"> DOM.unbind(window, 'ready', readyHandler);
</span><span class="cx">
</span><del>- execCallback(settings, 'onpageload');
</del><ins>+ execCallback('onpageload');
</ins><span class="cx">
</span><span class="cx"> if (settings.types) {
</span><span class="cx"> // Process type specific selector
</span><span class="cx"> each(settings.types, function(type) {
</span><span class="cx"> each(DOM.select(type.selector), function(elm) {
</span><del>- createEditor(createId(elm), extend({}, settings, type));
</del><ins>+ createEditor(createId(elm), extend({}, settings, type), elm);
</ins><span class="cx"> });
</span><span class="cx"> });
</span><span class="cx">
</span><span class="lines">@@ -29935,10 +30729,12 @@
</span><span class="cx"> } else if (settings.selector) {
</span><span class="cx"> // Process global selector
</span><span class="cx"> each(DOM.select(settings.selector), function(elm) {
</span><del>- createEditor(createId(elm), settings);
</del><ins>+ createEditor(createId(elm), settings, elm);
</ins><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> return;
</span><ins>+ } else if (settings.target) {
+ createEditor(createId(settings.target), settings);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Fallback to old setting
</span><span class="lines">@@ -29958,7 +30754,7 @@
</span><span class="cx"> if (e.name === v) {
</span><span class="cx"> v = 'mce_editor_' + instanceCounter++;
</span><span class="cx"> DOM.setAttrib(e, 'id', v);
</span><del>- createEditor(v, settings);
</del><ins>+ createEditor(v, settings, e);
</ins><span class="cx"> }
</span><span class="cx"> });
</span><span class="cx"> });
</span><span class="lines">@@ -29975,7 +30771,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!settings.editor_selector || hasClass(elm, settings.editor_selector)) {
</span><del>- createEditor(createId(elm), settings);
</del><ins>+ createEditor(createId(elm), settings, elm);
</ins><span class="cx"> }
</span><span class="cx"> });
</span><span class="cx"> break;
</span><span class="lines">@@ -29995,7 +30791,7 @@
</span><span class="cx">
</span><span class="cx"> // All done
</span><span class="cx"> if (l == co) {
</span><del>- execCallback(settings, 'oninit');
</del><ins>+ execCallback('oninit');
</ins><span class="cx"> }
</span><span class="cx"> });
</span><span class="cx"> } else {
</span><span class="lines">@@ -30004,7 +30800,7 @@
</span><span class="cx">
</span><span class="cx"> // All done
</span><span class="cx"> if (l == co) {
</span><del>- execCallback(settings, 'oninit');
</del><ins>+ execCallback('oninit');
</ins><span class="cx"> }
</span><span class="cx"> });
</span><span class="cx"> }
</span><span class="lines">@@ -30124,7 +30920,11 @@
</span><span class="cx"> selector = selector.selector || selector;
</span><span class="cx">
</span><span class="cx"> each(DOM.select(selector), function(elm) {
</span><del>- self.remove(editors[elm.id]);
</del><ins>+ editor = editors[elm.id];
+
+ if (editor) {
+ self.remove(editor);
+ }
</ins><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> return;
</span><span class="lines">@@ -30480,23 +31280,23 @@
</span><span class="cx">
</span><span class="cx"> if (t == 'object') {
</span><span class="cx"> if (o.hasOwnProperty && Object.prototype.toString.call(o) === '[object Array]') {
</span><del>- for (i = 0, v = '['; i < o.length; i++) {
- v += (i > 0 ? ',' : '') + serialize(o[i], quote);
- }
-
- return v + ']';
</del><ins>+ for (i = 0, v = '['; i < o.length; i++) {
+ v += (i > 0 ? ',' : '') + serialize(o[i], quote);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- v = '{';
</del><ins>+ return v + ']';
+ }
</ins><span class="cx">
</span><del>- for (name in o) {
- if (o.hasOwnProperty(name)) {
- v += typeof o[name] != 'function' ? (v.length > 1 ? ',' + quote : quote) + name +
- quote + ':' + serialize(o[name], quote) : '';
- }
</del><ins>+ v = '{';
+
+ for (name in o) {
+ if (o.hasOwnProperty(name)) {
+ v += typeof o[name] != 'function' ? (v.length > 1 ? ',' + quote : quote) + name +
+ quote + ':' + serialize(o[name], quote) : '';
</ins><span class="cx"> }
</span><ins>+ }
</ins><span class="cx">
</span><del>- return v + '}';
</del><ins>+ return v + '}';
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return '' + o;
</span><span class="lines">@@ -31782,224 +32582,6 @@
</span><span class="cx"> });
</span><span class="cx"> });
</span><span class="cx">
</span><del>-// Included from: js/tinymce/classes/ui/PanelButton.js
-
-/**
- * PanelButton.js
- *
- * Copyright, Moxiecode Systems AB
- * Released under LGPL License.
- *
- * License: http://www.tinymce.com/license
- * Contributing: http://www.tinymce.com/contributing
- */
-
-/**
- * Creates a new panel button.
- *
- * @class tinymce.ui.PanelButton
- * @extends tinymce.ui.Button
- */
-define("tinymce/ui/PanelButton", [
- "tinymce/ui/Button",
- "tinymce/ui/FloatPanel"
-], function(Button, FloatPanel) {
- "use strict";
-
- return Button.extend({
- /**
- * Shows the panel for the button.
- *
- * @method showPanel
- */
- showPanel: function() {
- var self = this, settings = self.settings;
-
- self.active(true);
-
- if (!self.panel) {
- var panelSettings = settings.panel;
-
- // Wrap panel in grid layout if type if specified
- // This makes it possible to add forms or other containers directly in the panel option
- if (panelSettings.type) {
- panelSettings = {
- layout: 'grid',
- items: panelSettings
- };
- }
-
- panelSettings.role = panelSettings.role || 'dialog';
- panelSettings.popover = true;
- panelSettings.autohide = true;
- panelSettings.ariaRoot = true;
-
- self.panel = new FloatPanel(panelSettings).on('hide', function() {
- self.active(false);
- }).on('cancel', function(e) {
- e.stopPropagation();
- self.focus();
- self.hidePanel();
- }).parent(self).renderTo(self.getContainerElm());
-
- self.panel.fire('show');
- self.panel.reflow();
- } else {
- self.panel.show();
- }
-
- self.panel.moveRel(self.getEl(), settings.popoverAlign || (self.isRtl() ? ['bc-tr', 'bc-tc'] : ['bc-tl', 'bc-tc']));
- },
-
- /**
- * Hides the panel for the button.
- *
- * @method hidePanel
- */
- hidePanel: function() {
- var self = this;
-
- if (self.panel) {
- self.panel.hide();
- }
- },
-
- /**
- * Called after the control has been rendered.
- *
- * @method postRender
- */
- postRender: function() {
- var self = this;
-
- self.aria('haspopup', true);
-
- self.on('click', function(e) {
- if (e.control === self) {
- if (self.panel && self.panel.visible()) {
- self.hidePanel();
- } else {
- self.showPanel();
- self.panel.focus(!!e.aria);
- }
- }
- });
-
- return self._super();
- }
- });
-});
-
-// Included from: js/tinymce/classes/ui/ColorButton.js
-
-/**
- * ColorButton.js
- *
- * Copyright, Moxiecode Systems AB
- * Released under LGPL License.
- *
- * License: http://www.tinymce.com/license
- * Contributing: http://www.tinymce.com/contributing
- */
-
-/**
- * This class creates a color button control. This is a split button in which the main
- * button has a visual representation of the currently selected color. When clicked
- * the caret button displays a color picker, allowing the user to select a new color.
- *
- * @-x-less ColorButton.less
- * @class tinymce.ui.ColorButton
- * @extends tinymce.ui.PanelButton
- */
-define("tinymce/ui/ColorButton", [
- "tinymce/ui/PanelButton",
- "tinymce/dom/DOMUtils"
-], function(PanelButton, DomUtils) {
- "use strict";
-
- var DOM = DomUtils.DOM;
-
- return PanelButton.extend({
- /**
- * Constructs a new ColorButton instance with the specified settings.
- *
- * @constructor
- * @param {Object} settings Name/value object with settings.
- */
- init: function(settings) {
- this._super(settings);
- this.addClass('colorbutton');
- },
-
- /**
- * Getter/setter for the current color.
- *
- * @method color
- * @param {String} [color] Color to set.
- * @return {String|tinymce.ui.ColorButton} Current color or current instance.
- */
- color: function(color) {
- if (color) {
- this._color = color;
- this.getEl('preview').style.backgroundColor = color;
- return this;
- }
-
- return this._color;
- },
-
- /**
- * Renders the control as a HTML string.
- *
- * @method renderHtml
- * @return {String} HTML representing the control.
- */
- renderHtml: function() {
- var self = this, id = self._id, prefix = self.classPrefix;
- var icon = self.settings.icon ? prefix + 'ico ' + prefix + 'i-' + self.settings.icon : '';
- var image = self.settings.image ? ' style="background-image: url(\'' + self.settings.image + '\')"' : '';
-
- return (
- '<div id="' + id + '" class="' + self.classes() + '" role="button" tabindex="-1" aria-haspopup="true">' +
- '<button role="presentation" hidefocus="1" type="button" tabindex="-1">' +
- (icon ? '<i class="' + icon + '"' + image + '></i>' : '') +
- '<span id="' + id + '-preview" class="' + prefix + 'preview"></span>' +
- (self._text ? (icon ? ' ' : '') + (self._text) : '') +
- '</button>' +
- '<button type="button" class="' + prefix + 'open" hidefocus="1" tabindex="-1">' +
- ' <i class="' + prefix + 'caret"></i>' +
- '</button>' +
- '</div>'
- );
- },
-
- /**
- * Called after the control has been rendered.
- *
- * @method postRender
- */
- postRender: function() {
- var self = this, onClickHandler = self.settings.onclick;
-
- self.on('click', function(e) {
- if (e.aria && e.aria.key == 'down') {
- return;
- }
-
- if (e.control == self && !DOM.getParent(e.target, '.' + self.classPrefix + 'open')) {
- e.stopImmediatePropagation();
- onClickHandler.call(self, e);
- }
- });
-
- delete self.settings.onclick;
-
- return self._super();
- }
-
- });
-});
-
</del><span class="cx"> // Included from: js/tinymce/classes/ui/ComboBox.js
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -32335,6 +32917,734 @@
</span><span class="cx"> });
</span><span class="cx"> });
</span><span class="cx">
</span><ins>+// Included from: js/tinymce/classes/ui/ColorBox.js
+
+/**
+ * ColorBox.js
+ *
+ * Copyright, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/**
+ * This widget lets you enter colors and browse for colors by pressing the color button. It also displays
+ * a preview of the current color.
+ *
+ * @-x-less ColorBox.less
+ * @class tinymce.ui.ColorBox
+ * @extends tinymce.ui.ComboBox
+ */
+define("tinymce/ui/ColorBox", [
+ "tinymce/ui/ComboBox"
+], function(ComboBox) {
+ "use strict";
+
+ return ComboBox.extend({
+ /**
+ * Constructs a new control instance with the specified settings.
+ *
+ * @constructor
+ * @param {Object} settings Name/value object with settings.
+ */
+ init: function(settings) {
+ var self = this;
+
+ settings.spellcheck = false;
+ settings.icon = 'none';
+
+ self._super(settings);
+
+ self.addClass('colorbox');
+ self.on('change keyup postrender', function() {
+ self.repaintColor(self.value());
+ });
+ },
+
+ repaintColor: function(value) {
+ this.getEl().getElementsByTagName('i')[0].style.background = value;
+ },
+
+ value: function(value) {
+ var self = this;
+
+ if (typeof value != "undefined") {
+ if (self._rendered) {
+ self.repaintColor(value);
+ }
+ }
+
+ return self._super(value);
+ }
+ });
+});
+
+// Included from: js/tinymce/classes/ui/PanelButton.js
+
+/**
+ * PanelButton.js
+ *
+ * Copyright, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/**
+ * Creates a new panel button.
+ *
+ * @class tinymce.ui.PanelButton
+ * @extends tinymce.ui.Button
+ */
+define("tinymce/ui/PanelButton", [
+ "tinymce/ui/Button",
+ "tinymce/ui/FloatPanel"
+], function(Button, FloatPanel) {
+ "use strict";
+
+ return Button.extend({
+ /**
+ * Shows the panel for the button.
+ *
+ * @method showPanel
+ */
+ showPanel: function() {
+ var self = this, settings = self.settings;
+
+ self.active(true);
+
+ if (!self.panel) {
+ var panelSettings = settings.panel;
+
+ // Wrap panel in grid layout if type if specified
+ // This makes it possible to add forms or other containers directly in the panel option
+ if (panelSettings.type) {
+ panelSettings = {
+ layout: 'grid',
+ items: panelSettings
+ };
+ }
+
+ panelSettings.role = panelSettings.role || 'dialog';
+ panelSettings.popover = true;
+ panelSettings.autohide = true;
+ panelSettings.ariaRoot = true;
+
+ self.panel = new FloatPanel(panelSettings).on('hide', function() {
+ self.active(false);
+ }).on('cancel', function(e) {
+ e.stopPropagation();
+ self.focus();
+ self.hidePanel();
+ }).parent(self).renderTo(self.getContainerElm());
+
+ self.panel.fire('show');
+ self.panel.reflow();
+ } else {
+ self.panel.show();
+ }
+
+ self.panel.moveRel(self.getEl(), settings.popoverAlign || (self.isRtl() ? ['bc-tr', 'bc-tc'] : ['bc-tl', 'bc-tc']));
+ },
+
+ /**
+ * Hides the panel for the button.
+ *
+ * @method hidePanel
+ */
+ hidePanel: function() {
+ var self = this;
+
+ if (self.panel) {
+ self.panel.hide();
+ }
+ },
+
+ /**
+ * Called after the control has been rendered.
+ *
+ * @method postRender
+ */
+ postRender: function() {
+ var self = this;
+
+ self.aria('haspopup', true);
+
+ self.on('click', function(e) {
+ if (e.control === self) {
+ if (self.panel && self.panel.visible()) {
+ self.hidePanel();
+ } else {
+ self.showPanel();
+ self.panel.focus(!!e.aria);
+ }
+ }
+ });
+
+ return self._super();
+ }
+ });
+});
+
+// Included from: js/tinymce/classes/ui/ColorButton.js
+
+/**
+ * ColorButton.js
+ *
+ * Copyright, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/**
+ * This class creates a color button control. This is a split button in which the main
+ * button has a visual representation of the currently selected color. When clicked
+ * the caret button displays a color picker, allowing the user to select a new color.
+ *
+ * @-x-less ColorButton.less
+ * @class tinymce.ui.ColorButton
+ * @extends tinymce.ui.PanelButton
+ */
+define("tinymce/ui/ColorButton", [
+ "tinymce/ui/PanelButton",
+ "tinymce/dom/DOMUtils"
+], function(PanelButton, DomUtils) {
+ "use strict";
+
+ var DOM = DomUtils.DOM;
+
+ return PanelButton.extend({
+ /**
+ * Constructs a new ColorButton instance with the specified settings.
+ *
+ * @constructor
+ * @param {Object} settings Name/value object with settings.
+ */
+ init: function(settings) {
+ this._super(settings);
+ this.addClass('colorbutton');
+ },
+
+ /**
+ * Getter/setter for the current color.
+ *
+ * @method color
+ * @param {String} [color] Color to set.
+ * @return {String|tinymce.ui.ColorButton} Current color or current instance.
+ */
+ color: function(color) {
+ if (color) {
+ this._color = color;
+ this.getEl('preview').style.backgroundColor = color;
+ return this;
+ }
+
+ return this._color;
+ },
+
+ /**
+ * Renders the control as a HTML string.
+ *
+ * @method renderHtml
+ * @return {String} HTML representing the control.
+ */
+ renderHtml: function() {
+ var self = this, id = self._id, prefix = self.classPrefix;
+ var icon = self.settings.icon ? prefix + 'ico ' + prefix + 'i-' + self.settings.icon : '';
+ var image = self.settings.image ? ' style="background-image: url(\'' + self.settings.image + '\')"' : '';
+
+ return (
+ '<div id="' + id + '" class="' + self.classes() + '" role="button" tabindex="-1" aria-haspopup="true">' +
+ '<button role="presentation" hidefocus="1" type="button" tabindex="-1">' +
+ (icon ? '<i class="' + icon + '"' + image + '></i>' : '') +
+ '<span id="' + id + '-preview" class="' + prefix + 'preview"></span>' +
+ (self._text ? (icon ? ' ' : '') + (self._text) : '') +
+ '</button>' +
+ '<button type="button" class="' + prefix + 'open" hidefocus="1" tabindex="-1">' +
+ ' <i class="' + prefix + 'caret"></i>' +
+ '</button>' +
+ '</div>'
+ );
+ },
+
+ /**
+ * Called after the control has been rendered.
+ *
+ * @method postRender
+ */
+ postRender: function() {
+ var self = this, onClickHandler = self.settings.onclick;
+
+ self.on('click', function(e) {
+ if (e.aria && e.aria.key == 'down') {
+ return;
+ }
+
+ if (e.control == self && !DOM.getParent(e.target, '.' + self.classPrefix + 'open')) {
+ e.stopImmediatePropagation();
+ onClickHandler.call(self, e);
+ }
+ });
+
+ delete self.settings.onclick;
+
+ return self._super();
+ }
+ });
+});
+
+// Included from: js/tinymce/classes/util/Color.js
+
+/**
+ * Color.js
+ *
+ * Copyright, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/**
+ * This class lets you parse/serialize colors and convert rgb/hsb.
+ *
+ * @class tinymce.util.Color
+ * @example
+ * var white = new tinymce.util.Color({r: 255, g: 255, b: 255});
+ * var red = new tinymce.util.Color('#FF0000');
+ *
+ * console.log(white.toHex(), red.toHsv());
+ */
+define("tinymce/util/Color", [], function() {
+ var min = Math.min, max = Math.max, round = Math.round;
+
+ /**
+ * Constructs a new color instance.
+ *
+ * @constructor
+ * @method Color
+ * @param {String} value Optional initial value to parse.
+ */
+ function Color(value) {
+ var self = this, r = 0, g = 0, b = 0;
+
+ function rgb2hsv(r, g, b) {
+ var h, s, v, d, minRGB, maxRGB;
+
+ h = 0;
+ s = 0;
+ v = 0;
+ r = r / 255;
+ g = g / 255;
+ b = b / 255;
+
+ minRGB = min(r, min(g, b));
+ maxRGB = max(r, max(g, b));
+
+ if (minRGB == maxRGB) {
+ v = minRGB;
+
+ return {
+ h: 0,
+ s: 0,
+ v: v * 100
+ };
+ }
+
+ /*eslint no-nested-ternary:0 */
+ d = (r == minRGB) ? g - b : ((b == minRGB) ? r - g : b - r);
+ h = (r == minRGB) ? 3 : ((b == minRGB) ? 1 : 5);
+ h = 60 * (h - d / (maxRGB - minRGB));
+ s = (maxRGB - minRGB) / maxRGB;
+ v = maxRGB;
+
+ return {
+ h: round(h),
+ s: round(s * 100),
+ v: round(v * 100)
+ };
+ }
+
+ function hsvToRgb(hue, saturation, brightness) {
+ var side, chroma, x, match;
+
+ hue = (parseInt(hue, 10) || 0) % 360;
+ saturation = parseInt(saturation, 10) / 100;
+ brightness = parseInt(brightness, 10) / 100;
+ saturation = max(0, min(saturation, 1));
+ brightness = max(0, min(brightness, 1));
+
+ if (saturation === 0) {
+ r = g = b = round(255 * brightness);
+ return;
+ }
+
+ side = hue / 60;
+ chroma = brightness * saturation;
+ x = chroma * (1 - Math.abs(side % 2 - 1));
+ match = brightness - chroma;
+
+ switch (Math.floor(side)) {
+ case 0:
+ r = chroma;
+ g = x;
+ b = 0;
+ break;
+
+ case 1:
+ r = x;
+ g = chroma;
+ b = 0;
+ break;
+
+ case 2:
+ r = 0;
+ g = chroma;
+ b = x;
+ break;
+
+ case 3:
+ r = 0;
+ g = x;
+ b = chroma;
+ break;
+
+ case 4:
+ r = x;
+ g = 0;
+ b = chroma;
+ break;
+
+ case 5:
+ r = chroma;
+ g = 0;
+ b = x;
+ break;
+
+ default:
+ r = g = b = 0;
+ }
+
+ r = round(255 * (r + match));
+ g = round(255 * (g + match));
+ b = round(255 * (b + match));
+ }
+
+ /**
+ * Returns the hex string of the current color. For example: #ff00ff
+ *
+ * @method toHex
+ * @return {String} Hex string of current color.
+ */
+ function toHex() {
+ function hex(val) {
+ val = parseInt(val, 10).toString(16);
+
+ return val.length > 1 ? val : '0' + val;
+ }
+
+ return '#' + hex(r) + hex(g) + hex(b);
+ }
+
+ /**
+ * Returns the r, g, b values of the color. Each channel has a range from 0-255.
+ *
+ * @method toRgb
+ * @return {Object} Object with r, g, b fields.
+ */
+ function toRgb() {
+ return {
+ r: r,
+ g: g,
+ b: b
+ };
+ }
+
+ /**
+ * Returns the h, s, v values of the color. Ranges: h=0-360, s=0-100, v=0-100.
+ *
+ * @method toHsv
+ * @return {Object} Object with h, s, v fields.
+ */
+ function toHsv() {
+ return rgb2hsv(r, g, b);
+ }
+
+ /**
+ * Parses the specified value and populates the color instance.
+ *
+ * Supported format examples:
+ * * rbg(255,0,0)
+ * * #ff0000
+ * * #fff
+ * * {r: 255, g: 0, b: 0}
+ * * {h: 360, s: 100, v: 100}
+ *
+ * @method parse
+ * @param {Object/String} value Color value to parse.
+ * @return {tinymce.util.Color} Current color instance.
+ */
+ function parse(value) {
+ var matches;
+
+ if (typeof value == 'object') {
+ if ("r" in value) {
+ r = value.r;
+ g = value.g;
+ b = value.b;
+ } else if ("v" in value) {
+ hsvToRgb(value.h, value.s, value.v);
+ }
+ } else {
+ if ((matches = /rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(value))) {
+ r = parseInt(matches[1], 10);
+ g = parseInt(matches[2], 10);
+ b = parseInt(matches[3], 10);
+ } else if ((matches = /#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(value))) {
+ r = parseInt(matches[1], 16);
+ g = parseInt(matches[2], 16);
+ b = parseInt(matches[3], 16);
+ } else if ((matches = /#([0-F])([0-F])([0-F])/gi.exec(value))) {
+ r = parseInt(matches[1] + matches[1], 16);
+ g = parseInt(matches[2] + matches[2], 16);
+ b = parseInt(matches[3] + matches[3], 16);
+ }
+ }
+
+ r = r < 0 ? 0 : (r > 255 ? 255 : r);
+ g = g < 0 ? 0 : (g > 255 ? 255 : g);
+ b = b < 0 ? 0 : (b > 255 ? 255 : b);
+
+ return self;
+ }
+
+ if (value) {
+ parse(value);
+ }
+
+ self.toRgb = toRgb;
+ self.toHsv = toHsv;
+ self.toHex = toHex;
+ self.parse = parse;
+ }
+
+ return Color;
+});
+
+// Included from: js/tinymce/classes/ui/ColorPicker.js
+
+/**
+ * ColorPicker.js
+ *
+ * Copyright, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/**
+ * Color picker widget lets you select colors.
+ *
+ * @-x-less ColorPicker.less
+ * @class tinymce.ui.ColorPicker
+ * @extends tinymce.ui.Widget
+ */
+define("tinymce/ui/ColorPicker", [
+ "tinymce/ui/Widget",
+ "tinymce/ui/DragHelper",
+ "tinymce/ui/DomUtils",
+ "tinymce/util/Color"
+], function(Widget, DragHelper, DomUtils, Color) {
+ "use strict";
+
+ return Widget.extend({
+ Defaults: {
+ classes: "widget colorpicker"
+ },
+
+ /**
+ * Constructs a new colorpicker instance with the specified settings.
+ *
+ * @constructor
+ * @param {Object} settings Name/value object with settings.
+ * @setting {String} color Initial color value.
+ */
+ init: function(settings) {
+ this._super(settings);
+ },
+
+ postRender: function() {
+ var self = this, color = self.color(), hsv, hueRootElm, huePointElm, svRootElm, svPointElm;
+
+ hueRootElm = self.getEl('h');
+ huePointElm = self.getEl('hp');
+ svRootElm = self.getEl('sv');
+ svPointElm = self.getEl('svp');
+
+ function getPos(elm, event) {
+ var pos = DomUtils.getPos(elm), x, y;
+
+ x = event.pageX - pos.x;
+ y = event.pageY - pos.y;
+
+ x = Math.max(0, Math.min(x / elm.clientWidth, 1));
+ y = Math.max(0, Math.min(y / elm.clientHeight, 1));
+
+ return {
+ x: x,
+ y: y
+ };
+ }
+
+ function updateColor(hsv, hueUpdate) {
+ var hue = (360 - hsv.h) / 360;
+
+ DomUtils.css(huePointElm, {
+ top: (hue * 100) + '%'
+ });
+
+ if (!hueUpdate) {
+ DomUtils.css(svPointElm, {
+ left: hsv.s + '%',
+ top: (100 - hsv.v) + '%'
+ });
+ }
+
+ svRootElm.style.background = new Color({s: 100, v: 100, h: hsv.h}).toHex();
+ self.color().parse({s: hsv.s, v: hsv.v, h: hsv.h});
+ }
+
+ function updateSaturationAndValue(e) {
+ var pos;
+
+ pos = getPos(svRootElm, e);
+ hsv.s = pos.x * 100;
+ hsv.v = (1 - pos.y) * 100;
+
+ updateColor(hsv);
+ self.fire('change');
+ }
+
+ function updateHue(e) {
+ var pos;
+
+ pos = getPos(hueRootElm, e);
+ hsv = color.toHsv();
+ hsv.h = (1 - pos.y) * 360;
+ updateColor(hsv, true);
+ self.fire('change');
+ }
+
+ self._repaint = function() {
+ hsv = color.toHsv();
+ updateColor(hsv);
+ };
+
+ self._super();
+
+ self._svdraghelper = new DragHelper(self._id + '-sv', {
+ start: updateSaturationAndValue,
+ drag: updateSaturationAndValue
+ });
+
+ self._hdraghelper = new DragHelper(self._id + '-h', {
+ start: updateHue,
+ drag: updateHue
+ });
+
+ self._repaint();
+ },
+
+ rgb: function() {
+ return this.color().toRgb();
+ },
+
+ value: function(value) {
+ var self = this;
+
+ if (arguments.length) {
+ self.color().parse(value);
+
+ if (self._rendered) {
+ self._repaint();
+ }
+ } else {
+ return self.color().toHex();
+ }
+ },
+
+ color: function() {
+ if (!this._color) {
+ this._color = new Color();
+ }
+
+ return this._color;
+ },
+
+ /**
+ * Renders the control as a HTML string.
+ *
+ * @method renderHtml
+ * @return {String} HTML representing the control.
+ */
+ renderHtml: function() {
+ var self = this, id = self._id, prefix = self.classPrefix, hueHtml;
+ var stops = '#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000';
+
+ function getOldIeFallbackHtml() {
+ var i, l, html = '', gradientPrefix, stopsList;
+
+ gradientPrefix = 'filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=';
+ stopsList = stops.split(',');
+ for (i = 0, l = stopsList.length - 1; i < l; i++) {
+ html += (
+ '<div class="' + prefix + 'colorpicker-h-chunk" style="' +
+ 'height:' + (100 / l) + '%;' +
+ gradientPrefix + stopsList[i] + ',endColorstr=' + stopsList[i + 1] + ');' +
+ '-ms-' + gradientPrefix + stopsList[i] + ',endColorstr=' + stopsList[i + 1] + ')' +
+ '"></div>'
+ );
+ }
+
+ return html;
+ }
+
+ var gradientCssText = (
+ 'background: -ms-linear-gradient(top,' + stops + ');' +
+ 'background: linear-gradient(to bottom,' + stops + ');'
+ );
+
+ hueHtml = (
+ '<div id="' + id + '-h" class="' + prefix + 'colorpicker-h" style="' + gradientCssText + '">' +
+ getOldIeFallbackHtml() +
+ '<div id="' + id + '-hp" class="' + prefix + 'colorpicker-h-marker"></div>' +
+ '</div>'
+ );
+
+ return (
+ '<div id="' + id + '" class="' + self.classes() + '">' +
+ '<div id="' + id + '-sv" class="' + prefix + 'colorpicker-sv">' +
+ '<div class="' + prefix + 'colorpicker-overlay1">' +
+ '<div class="' + prefix + 'colorpicker-overlay2">' +
+ '<div id="' + id + '-svp" class="' + prefix + 'colorpicker-selector1">' +
+ '<div class="' + prefix + 'colorpicker-selector2"></div>' +
+ '</div>' +
+ '</div>' +
+ '</div>' +
+ '</div>' +
+ hueHtml +
+ '</div>'
+ );
+ }
+ });
+});
+
</ins><span class="cx"> // Included from: js/tinymce/classes/ui/Path.js
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -32525,38 +33835,32 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> self.on('select', function(e) {
</span><del>- var parents = [], node, body = editor.getBody();
-
</del><span class="cx"> editor.focus();
</span><del>-
- node = editor.selection.getStart();
- while (node && node != body) {
- if (!isHidden(node)) {
- parents.push(node);
- }
-
- node = node.parentNode;
- }
-
- editor.selection.select(parents[parents.length - 1 - e.index]);
</del><ins>+ editor.selection.select(this.data()[e.index].element);
</ins><span class="cx"> editor.nodeChanged();
</span><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> editor.on('nodeChange', function(e) {
</span><del>- var parents = [], selectionParents = e.parents, i = selectionParents.length;
</del><ins>+ var outParents = [], parents = e.parents, i = parents.length;
</ins><span class="cx">
</span><span class="cx"> while (i--) {
</span><del>- if (selectionParents[i].nodeType == 1 && !isHidden(selectionParents[i])) {
</del><ins>+ if (parents[i].nodeType == 1 && !isHidden(parents[i])) {
</ins><span class="cx"> var args = editor.fire('ResolveName', {
</span><del>- name: selectionParents[i].nodeName.toLowerCase(),
- target: selectionParents[i]
</del><ins>+ name: parents[i].nodeName.toLowerCase(),
+ target: parents[i]
</ins><span class="cx"> });
</span><span class="cx">
</span><del>- parents.push({name: args.name});
</del><ins>+ if (!args.isDefaultPrevented()) {
+ outParents.push({name: args.name, element: parents[i]});
+ }
+
+ if (args.isPropagationStopped()) {
+ break;
+ }
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- self.data(parents);
</del><ins>+ self.data(outParents);
</ins><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> return self._super();
</span><span class="lines">@@ -32654,8 +33958,9 @@
</span><span class="cx"> */
</span><span class="cx"> define("tinymce/ui/Form", [
</span><span class="cx"> "tinymce/ui/Container",
</span><del>- "tinymce/ui/FormItem"
-], function(Container, FormItem) {
</del><ins>+ "tinymce/ui/FormItem",
+ "tinymce/util/Tools"
+], function(Container, FormItem, Tools) {
</ins><span class="cx"> "use strict";
</span><span class="cx">
</span><span class="cx"> return Container.extend({
</span><span class="lines">@@ -32683,19 +33988,29 @@
</span><span class="cx"> preRender: function() {
</span><span class="cx"> var self = this, items = self.items();
</span><span class="cx">
</span><ins>+ if (!self.settings.formItemDefaults) {
+ self.settings.formItemDefaults = {
+ layout: 'flex',
+ autoResize: "overflow",
+ defaults: {flex: 1}
+ };
+ }
+
</ins><span class="cx"> // Wrap any labeled items in FormItems
</span><span class="cx"> items.each(function(ctrl) {
</span><span class="cx"> var formItem, label = ctrl.settings.label;
</span><span class="cx">
</span><span class="cx"> if (label) {
</span><del>- formItem = new FormItem({
- layout: 'flex',
- autoResize: "overflow",
- defaults: {flex: 1},
- items: [
- {type: 'label', id: ctrl._id + '-l', text: label, flex: 0, forId: ctrl._id, disabled: ctrl.disabled()}
- ]
- });
</del><ins>+ formItem = new FormItem(Tools.extend({
+ items: {
+ type: 'label',
+ id: ctrl._id + '-l',
+ text: label,
+ flex: 0,
+ forId: ctrl._id,
+ disabled: ctrl.disabled()
+ }
+ }, self.settings.formItemDefaults));
</ins><span class="cx">
</span><span class="cx"> formItem.type = 'formitem';
</span><span class="cx"> ctrl.aria('labelledby', ctrl._id + '-l');
</span><span class="lines">@@ -32882,29 +34197,55 @@
</span><span class="cx"> * @param {Object} settings Name/value object with settings.
</span><span class="cx"> */
</span><span class="cx"> init: function(settings) {
</span><del>- var self = this, editor = tinymce.activeEditor, fileBrowserCallback, fileBrowserCallbackTypes;
</del><ins>+ var self = this, editor = tinymce.activeEditor, editorSettings = editor.settings;
+ var actionCallback, fileBrowserCallback, fileBrowserCallbackTypes;
</ins><span class="cx">
</span><span class="cx"> settings.spellcheck = false;
</span><span class="cx">
</span><del>- fileBrowserCallbackTypes = editor.settings.file_browser_callback_types;
</del><ins>+ fileBrowserCallbackTypes = editorSettings.file_picker_types || editorSettings.file_browser_callback_types;
</ins><span class="cx"> if (fileBrowserCallbackTypes) {
</span><span class="cx"> fileBrowserCallbackTypes = Tools.makeMap(fileBrowserCallbackTypes, /[, ]/);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- fileBrowserCallback = editor.settings.file_browser_callback;
- if (fileBrowserCallback && (!fileBrowserCallbackTypes || fileBrowserCallbackTypes[settings.filetype])) {
- settings.icon = 'browse';
</del><ins>+ if (!fileBrowserCallbackTypes || fileBrowserCallbackTypes[settings.filetype]) {
+ fileBrowserCallback = editorSettings.file_picker_callback;
+ if (fileBrowserCallback && (!fileBrowserCallbackTypes || fileBrowserCallbackTypes[settings.filetype])) {
+ actionCallback = function() {
+ var meta = self.fire('beforecall').meta;
</ins><span class="cx">
</span><del>- settings.onaction = function() {
- fileBrowserCallback(
- self.getEl('inp').id,
- self.getEl('inp').value,
- settings.filetype,
- window
- );
- };
</del><ins>+ meta = Tools.extend({filetype: settings.filetype}, meta);
+
+ // file_picker_callback(callback, currentValue, metaData)
+ fileBrowserCallback.call(
+ editor,
+ function(value, meta) {
+ self.value(value).fire('change', {meta: meta});
+ },
+ self.value(),
+ meta
+ );
+ };
+ } else {
+ // Legacy callback: file_picker_callback(id, currentValue, filetype, window)
+ fileBrowserCallback = editorSettings.file_browser_callback;
+ if (fileBrowserCallback && (!fileBrowserCallbackTypes || fileBrowserCallbackTypes[settings.filetype])) {
+ actionCallback = function() {
+ fileBrowserCallback(
+ self.getEl('inp').id,
+ self.value(),
+ settings.filetype,
+ window
+ );
+ };
+ }
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+ if (actionCallback) {
+ settings.icon = 'browse';
+ settings.onaction = actionCallback;
+ }
+
</ins><span class="cx"> self._super(settings);
</span><span class="cx"> }
</span><span class="cx"> });
</span><span class="lines">@@ -33841,7 +35182,7 @@
</span><span class="cx"> recalc: function(container) {
</span><span class="cx"> var settings = container.settings, rows, cols, items, contLayoutRect, width, height, rect,
</span><span class="cx"> ctrlLayoutRect, ctrl, x, y, posX, posY, ctrlSettings, contPaddingBox, align, spacingH, spacingV, alignH, alignV, maxX, maxY,
</span><del>- colWidths = [], rowHeights = [], ctrlMinWidth, ctrlMinHeight, availableWidth, availableHeight;
</del><ins>+ colWidths = [], rowHeights = [], ctrlMinWidth, ctrlMinHeight, availableWidth, availableHeight, reverseRows, idx;
</ins><span class="cx">
</span><span class="cx"> // Get layout settings
</span><span class="cx"> settings = container.settings;
</span><span class="lines">@@ -33854,6 +35195,7 @@
</span><span class="cx"> alignH = settings.alignH || settings.align;
</span><span class="cx"> alignV = settings.alignV || settings.align;
</span><span class="cx"> contPaddingBox = container._paddingBox;
</span><ins>+ reverseRows = 'reverseRows' in settings ? settings.reverseRows : container.isRtl();
</ins><span class="cx">
</span><span class="cx"> if (alignH && typeof(alignH) == "string") {
</span><span class="cx"> alignH = [alignH];
</span><span class="lines">@@ -33980,8 +35322,14 @@
</span><span class="cx"> height = rowHeights[y] + flexV;
</span><span class="cx">
</span><span class="cx"> for (x = 0; x < cols; x++) {
</span><del>- ctrl = items[y * cols + x];
</del><ins>+ if (reverseRows) {
+ idx = y * cols + cols - 1 - x;
+ } else {
+ idx = y * cols + x;
+ }
</ins><span class="cx">
</span><ins>+ ctrl = items[idx];
+
</ins><span class="cx"> // No more controls to render then break
</span><span class="cx"> if (!ctrl) {
</span><span class="cx"> break;
</span><span class="lines">@@ -34008,7 +35356,7 @@
</span><span class="cx"> align = ctrlSettings.alignV || (alignV ? (alignV[x] || alignV[0]) : null);
</span><span class="cx"> if (align == "center") {
</span><span class="cx"> ctrlLayoutRect.y = posY + (height / 2) - (ctrlLayoutRect.h / 2);
</span><del>- } else if (align == "bottom") {
</del><ins>+ } else if (align == "bottom") {
</ins><span class="cx"> ctrlLayoutRect.y = posY + height - ctrlLayoutRect.h;
</span><span class="cx"> } else if (align == "stretch") {
</span><span class="cx"> ctrlLayoutRect.h = height;
</span><span class="lines">@@ -34318,7 +35666,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @-x-less MenuBar.less
</span><span class="cx"> * @class tinymce.ui.MenuBar
</span><del>- * @extends tinymce.ui.Container
</del><ins>+ * @extends tinymce.ui.Toolbar
</ins><span class="cx"> */
</span><span class="cx"> define("tinymce/ui/MenuBar", [
</span><span class="cx"> "tinymce/ui/Toolbar"
</span><span class="lines">@@ -34749,7 +36097,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @-x-less MenuItem.less
</span><span class="cx"> * @class tinymce.ui.MenuItem
</span><del>- * @extends tinymce.ui.Control
</del><ins>+ * @extends tinymce.ui.Widget
</ins><span class="cx"> */
</span><span class="cx"> define("tinymce/ui/MenuItem", [
</span><span class="cx"> "tinymce/ui/Widget",
</span><span class="lines">@@ -35354,7 +36702,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @-x-less SplitButton.less
</span><span class="cx"> * @class tinymce.ui.SplitButton
</span><del>- * @extends tinymce.ui.Button
</del><ins>+ * @extends tinymce.ui.MenuButton
</ins><span class="cx"> */
</span><span class="cx"> define("tinymce/ui/SplitButton", [
</span><span class="cx"> "tinymce/ui/MenuButton",
</span><span class="lines">@@ -35520,8 +36868,6 @@
</span><span class="cx"> "use strict";
</span><span class="cx">
</span><span class="cx"> return Panel.extend({
</span><del>- lastIdx: 0,
-
</del><span class="cx"> Defaults: {
</span><span class="cx"> layout: 'absolute',
</span><span class="cx"> defaults: {
</span><span class="lines">@@ -35550,13 +36896,14 @@
</span><span class="cx"> activeTabElm.setAttribute('aria-selected', "true");
</span><span class="cx"> DomUtils.addClass(activeTabElm, this.classPrefix + 'active');
</span><span class="cx">
</span><del>- if (idx != this.lastIdx) {
- this.items()[this.lastIdx].hide();
- this.lastIdx = idx;
- }
-
</del><span class="cx"> this.items()[idx].show().fire('showtab');
</span><span class="cx"> this.reflow();
</span><ins>+
+ this.items().each(function(item, i) {
+ if (idx != i) {
+ item.hide();
+ }
+ });
</ins><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -35639,12 +36986,10 @@
</span><span class="cx"> minW = DomUtils.getSize(self.getEl('head')).width;
</span><span class="cx"> minW = minW < 0 ? 0 : minW;
</span><span class="cx"> minH = 0;
</span><del>- self.items().each(function(item, i) {
</del><ins>+
+ self.items().each(function(item) {
</ins><span class="cx"> minW = Math.max(minW, item.layoutRect().minW);
</span><span class="cx"> minH = Math.max(minH, item.layoutRect().minH);
</span><del>- if (self.settings.activeTab != i) {
- item.hide();
- }
</del><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> self.items().each(function(ctrl) {
</span><span class="lines">@@ -35969,5 +37314,5 @@
</span><span class="cx"> };
</span><span class="cx"> });
</span><span class="cx">
</span><del>-expose(["tinymce/dom/EventUtils","tinymce/dom/Sizzle","tinymce/dom/DomQuery","tinymce/html/Styles","tinymce/dom/TreeWalker","tinymce/util/Tools","tinymce/dom/Range","tinymce/html/Entities","tinymce/Env","tinymce/dom/StyleSheetLoader","tinymce/dom/DOMUtils","tinymce/dom/ScriptLoader","tinymce/AddOnManager","tinymce/html/Node","tinymce/html/Schema","tinymce/html/SaxParser","tinymce/html/DomParser","tinymce/html/Writer","tinymce/html/Serializer","tinymce/dom/Serializer","tinymce/dom/TridentSelection","tinymce/util/VK","tinymce/dom/ControlSelection","tinymce/dom/RangeUtils","tinymce/dom/BookmarkManager","tinymce/dom/Selection","tinymce/dom/ElementUtils","tinymce/fmt/Preview","tinymce/Formatter&q
uot;,"tinymce/UndoManager","tinymce/EnterKey","tinymce/ForceBlocks","tinymce/EditorCommands","tinymce/util/URI","tinymce/util/Class","tinymce/util/EventDispatcher","tinymce/ui/Selector","tinymce/ui/Collection","tinymce/ui/DomUtils","tinymce/ui/Control","tinymce/ui/Factory","tinymce/ui/KeyboardNavigation","tinymce/ui/Container","tinymce/ui/DragHelper","tinymce/ui/Scrollable","tinymce/ui/Panel","tinymce/ui/Movable","tinymce/ui/Resizable","tinymce/ui/FloatPanel","tinymce/ui/Window","tinymce/ui/MessageBox","tinymce/WindowManager","tinymce/util/Quirks","tinymce/util/Observable","tinymce/EditorObservable","tinymce/Shortcuts","tinymce/Editor","tinymce/util/I18n","tinymce/FocusManager","tiny
mce/EditorManager","tinymce/LegacyInput","tinymce/util/XHR","tinymce/util/JSON","tinymce/util/JSONRequest","tinymce/util/JSONP","tinymce/util/LocalStorage","tinymce/Compat","tinymce/ui/Layout","tinymce/ui/AbsoluteLayout","tinymce/ui/Tooltip","tinymce/ui/Widget","tinymce/ui/Button","tinymce/ui/ButtonGroup","tinymce/ui/Checkbox","tinymce/ui/PanelButton","tinymce/ui/ColorButton","tinymce/ui/ComboBox","tinymce/ui/Path","tinymce/ui/ElementPath","tinymce/ui/FormItem","tinymce/ui/Form","tinymce/ui/FieldSet","tinymce/ui/FilePicker","tinymce/ui/FitLayout","tinymce/ui/FlexLayout","tinymce/ui/FlowLayout","tinymce/ui/FormatControls","tinymce/ui/GridLayout","tinymce/ui/Iframe","tinymce/ui/Label",
"tinymce/ui/Toolbar","tinymce/ui/MenuBar","tinymce/ui/MenuButton","tinymce/ui/ListBox","tinymce/ui/MenuItem","tinymce/ui/Menu","tinymce/ui/Radio","tinymce/ui/ResizeHandle","tinymce/ui/Spacer","tinymce/ui/SplitButton","tinymce/ui/StackLayout","tinymce/ui/TabPanel","tinymce/ui/TextBox","tinymce/ui/Throbber"]);
</del><ins>+expose(["tinymce/dom/EventUtils","tinymce/dom/Sizzle","tinymce/util/Tools","tinymce/Env","tinymce/dom/DomQuery","tinymce/html/Styles","tinymce/dom/TreeWalker","tinymce/dom/Range","tinymce/html/Entities","tinymce/dom/DOMUtils","tinymce/dom/ScriptLoader","tinymce/AddOnManager","tinymce/html/Node","tinymce/html/Schema","tinymce/html/SaxParser","tinymce/html/DomParser","tinymce/html/Writer","tinymce/html/Serializer","tinymce/dom/Serializer","tinymce/dom/TridentSelection","tinymce/util/VK","tinymce/dom/ControlSelection","tinymce/dom/BookmarkManager","tinymce/dom/Selection","tinymce/dom/ElementUtils","tinymce/Formatter","tinymce/UndoManager","tinymce/EnterKey","tinymce/ForceBlocks","tinym
ce/EditorCommands","tinymce/util/URI","tinymce/util/Class","tinymce/util/EventDispatcher","tinymce/ui/Selector","tinymce/ui/Collection","tinymce/ui/DomUtils","tinymce/ui/Control","tinymce/ui/Factory","tinymce/ui/KeyboardNavigation","tinymce/ui/Container","tinymce/ui/DragHelper","tinymce/ui/Scrollable","tinymce/ui/Panel","tinymce/ui/Movable","tinymce/ui/Resizable","tinymce/ui/FloatPanel","tinymce/ui/Window","tinymce/ui/MessageBox","tinymce/WindowManager","tinymce/util/Quirks","tinymce/util/Observable","tinymce/EditorObservable","tinymce/Shortcuts","tinymce/Editor","tinymce/util/I18n","tinymce/FocusManager","tinymce/EditorManager","tinymce/LegacyInput","tinymce/util/XHR","tinymce/util/JSON&
quot;,"tinymce/util/JSONRequest","tinymce/util/JSONP","tinymce/util/LocalStorage","tinymce/Compat","tinymce/ui/Layout","tinymce/ui/AbsoluteLayout","tinymce/ui/Tooltip","tinymce/ui/Widget","tinymce/ui/Button","tinymce/ui/ButtonGroup","tinymce/ui/Checkbox","tinymce/ui/ComboBox","tinymce/ui/ColorBox","tinymce/ui/PanelButton","tinymce/ui/ColorButton","tinymce/util/Color","tinymce/ui/ColorPicker","tinymce/ui/Path","tinymce/ui/ElementPath","tinymce/ui/FormItem","tinymce/ui/Form","tinymce/ui/FieldSet","tinymce/ui/FilePicker","tinymce/ui/FitLayout","tinymce/ui/FlexLayout","tinymce/ui/FlowLayout","tinymce/ui/FormatControls","tinymce/ui/GridLayout","tinymce/ui/Iframe","tinymce/ui/Label","tinym
ce/ui/Toolbar","tinymce/ui/MenuBar","tinymce/ui/MenuButton","tinymce/ui/ListBox","tinymce/ui/MenuItem","tinymce/ui/Menu","tinymce/ui/Radio","tinymce/ui/ResizeHandle","tinymce/ui/Spacer","tinymce/ui/SplitButton","tinymce/ui/StackLayout","tinymce/ui/TabPanel","tinymce/ui/TextBox","tinymce/ui/Throbber"]);
</ins><span class="cx"> })(this);
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunksrcwpincludesjstinymcetinymceminjs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/js/tinymce/tinymce.min.js (29202 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/js/tinymce/tinymce.min.js 2014-07-17 00:49:11 UTC (rev 29202)
+++ trunk/src/wp-includes/js/tinymce/tinymce.min.js 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -1,11 +1,11 @@
</span><del>-// 4.0.29 (2014-06-xx)
-!function(e,t){"use strict";function n(e,t){for(var n,r=[],i=0;i<e.length;++i){if(n=s[e[i]]||o(e[i]),!n)throw"module definition dependecy not found: "+e[i];r.push(n)}t.apply(null,r)}function r(e,r,i){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(r===t)throw"invalid module definition, dependencies must be specified";if(i===t)throw"invalid module definition, definition function must be specified";n(r,function(){s[e]=i.apply(null,arguments)})}function i(e){return!!s[e]}function o(t){for(var n=e,r=t.split(/[.\/]/),i=0;i<r.length;++i){if(!n[r[i]])return;n=n[r[i]]}return n}function a(n){for(var r=0;r<n.length;r++){for(var i=e,o=n[r],a=o.split(/[.\/]/),l=0;l<a.length-1;++l)i[a[l]]===t&&(i[a[l]]={}),i=i[a[l]];i[a[a.length-1]]=s[o]}}var s={},l="tinymce/dom/EventUtils",c="tinymce/dom/Sizzle",u="tinymce/dom/DomQuery",d="tinymc
e/html/Styles",f="tinymce/dom/TreeWalker",p="tinymce/util/Tools",m="tinymce/dom/Range",h="tinymce/html/Entities",g="tinymce/Env",v="tinymce/dom/StyleSheetLoader",y="tinymce/dom/DOMUtils",b="tinymce/dom/ScriptLoader",C="tinymce/AddOnManager",x="tinymce/html/Node",w="tinymce/html/Schema",_="tinymce/html/SaxParser",N="tinymce/html/DomParser",E="tinymce/html/Writer",k="tinymce/html/Serializer",S="tinymce/dom/Serializer",T="tinymce/dom/TridentSelection",R="tinymce/util/VK",A="tinymce/dom/ControlSelection",B="tinymce/dom/RangeUtils",D="tinymce/dom/BookmarkManager",L="tinymce/dom/Selection",M="tinymce/dom/ElementUtils",H="tinymce/fmt/Preview",P="tinymce/Formatter",O="tinymce/UndoManager",I="tinymce/EnterKey",F="tin
ymce/ForceBlocks",z="tinymce/EditorCommands",W="tinymce/util/URI",V="tinymce/util/Class",U="tinymce/util/EventDispatcher",q="tinymce/ui/Selector",$="tinymce/ui/Collection",j="tinymce/ui/DomUtils",K="tinymce/ui/Control",G="tinymce/ui/Factory",Y="tinymce/ui/KeyboardNavigation",X="tinymce/ui/Container",J="tinymce/ui/DragHelper",Q="tinymce/ui/Scrollable",Z="tinymce/ui/Panel",et="tinymce/ui/Movable",tt="tinymce/ui/Resizable",nt="tinymce/ui/FloatPanel",rt="tinymce/ui/Window",it="tinymce/ui/MessageBox",ot="tinymce/WindowManager",at="tinymce/util/Quirks",st="tinymce/util/Observable",lt="tinymce/EditorObservable",ct="tinymce/Shortcuts",ut="tinymce/Editor",dt="tinymce/util/I18n",ft="tinymce/FocusManager",pt="tinymce/E
ditorManager",mt="tinymce/LegacyInput",ht="tinymce/util/XHR",gt="tinymce/util/JSON",vt="tinymce/util/JSONRequest",yt="tinymce/util/JSONP",bt="tinymce/util/LocalStorage",Ct="tinymce/Compat",xt="tinymce/ui/Layout",wt="tinymce/ui/AbsoluteLayout",_t="tinymce/ui/Tooltip",Nt="tinymce/ui/Widget",Et="tinymce/ui/Button",kt="tinymce/ui/ButtonGroup",St="tinymce/ui/Checkbox",Tt="tinymce/ui/PanelButton",Rt="tinymce/ui/ColorButton",At="tinymce/ui/ComboBox",Bt="tinymce/ui/Path",Dt="tinymce/ui/ElementPath",Lt="tinymce/ui/FormItem",Mt="tinymce/ui/Form",Ht="tinymce/ui/FieldSet",Pt="tinymce/ui/FilePicker",Ot="tinymce/ui/FitLayout",It="tinymce/ui/FlexLayout",Ft="tinymce/ui/FlowLayout",zt="tinymce/ui/FormatControls",Wt="tinymce/
ui/GridLayout",Vt="tinymce/ui/Iframe",Ut="tinymce/ui/Label",qt="tinymce/ui/Toolbar",$t="tinymce/ui/MenuBar",jt="tinymce/ui/MenuButton",Kt="tinymce/ui/ListBox",Gt="tinymce/ui/MenuItem",Yt="tinymce/ui/Menu",Xt="tinymce/ui/Radio",Jt="tinymce/ui/ResizeHandle",Qt="tinymce/ui/Spacer",Zt="tinymce/ui/SplitButton",en="tinymce/ui/StackLayout",tn="tinymce/ui/TabPanel",nn="tinymce/ui/TextBox",rn="tinymce/ui/Throbber";r(l,[],function(){function e(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r||!1):e.attachEvent&&e.attachEvent("on"+t,n)}function t(e,t,n,r){e.removeEventListener?e.removeEventListener(t,n,r||!1):e.detachEvent&&e.detachEvent("on"+t,n)}function n(e,t){function n(){return!1}function r(){return!0}var i,o=t||{},l;for(i in e)s[i]||(o[i]=e[i]);if(o.target||(o.target=o.srcElement||docum
ent),e&&a.test(e.type)&&e.pageX===l&&e.clientX!==l){var c=o.target.ownerDocument||document,u=c.documentElement,d=c.body;o.pageX=e.clientX+(u&&u.scrollLeft||d&&d.scrollLeft||0)-(u&&u.clientLeft||d&&d.clientLeft||0),o.pageY=e.clientY+(u&&u.scrollTop||d&&d.scrollTop||0)-(u&&u.clientTop||d&&d.clientTop||0)}return o.preventDefault=function(){o.isDefaultPrevented=r,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},o.stopPropagation=function(){o.isPropagationStopped=r,e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},o.stopImmediatePropagation=function(){o.isImmediatePropagationStopped=r,o.stopPropagation()},o.isDefaultPrevented||(o.isDefaultPrevented=n,o.isPropagationStopped=n,o.isImmediatePropagationStopped=n),o}function r(n,r,i){function o(){i.domLoaded||(i.domLoaded=!0,r(c))}function a(){("complete"===l.readyState||"interactive"===l.readyState
&&l.body)&&(t(l,"readystatechange",a),o())}function s(){try{l.documentElement.doScroll("left")}catch(e){return void setTimeout(s,0)}o()}var l=n.document,c={type:"ready"};return i.domLoaded?void r(c):(l.addEventListener?"complete"===l.readyState?o():e(n,"DOMContentLoaded",o):(e(l,"readystatechange",a),l.documentElement.doScroll&&n.self===n.top&&s()),void e(n,"load",o))}function i(){function i(e,t){var n,r,i,o,a=s[t];if(n=a&&a[e.type])for(r=0,i=n.length;i>r;r++)if(o=n[r],o&&o.func.call(o.scope,e)===!1&&e.preventDefault(),e.isImmediatePropagationStopped())return}var a=this,s={},l,c,u,d,f;c=o+(+new Date).toString(32),d="onmouseenter"in document.documentElement,u="onfocusin"in document.documentElement,f={mouseenter:"mouseover",mouseleave:"mouseout"},l=1,a.domLoaded=!1,a.events=s,a.bind=function(t,o,p,m){function h(e){i(n(
e||_.event),g)}var g,v,y,b,C,x,w,_=window;if(t&&3!==t.nodeType&&8!==t.nodeType){for(t[c]?g=t[c]:(g=l++,t[c]=g,s[g]={}),m=m||t,o=o.split(" "),y=o.length;y--;)b=o[y],x=h,C=w=!1,"DOMContentLoaded"===b&&(b="ready"),a.domLoaded&&"ready"===b&&"complete"==t.readyState?p.call(m,n({type:b})):(d||(C=f[b],C&&(x=function(e){var t,r;if(t=e.currentTarget,r=e.relatedTarget,r&&t.contains)r=t.contains(r);else for(;r&&r!==t;)r=r.parentNode;r||(e=n(e||_.event),e.type="mouseout"===e.type?"mouseleave":"mouseenter",e.target=t,i(e,g))})),u||"focusin"!==b&&"focusout"!==b||(w=!0,C="focusin"===b?"focus":"blur",x=function(e){e=n(e||_.event),e.type="focus"===e.type?"focusin":"focusout",i(e,g)}),v=s[g][b],v?"ready"===b&&a.domLoaded?p({type:b}):v.push({func:p,scope:m
}):(s[g][b]=v=[{func:p,scope:m}],v.fakeName=C,v.capture=w,v.nativeHandler=x,"ready"===b?r(t,x,a):e(t,C||b,x,w)));return t=v=0,p}},a.unbind=function(e,n,r){var i,o,l,u,d,f;if(!e||3===e.nodeType||8===e.nodeType)return a;if(i=e[c]){if(f=s[i],n){for(n=n.split(" "),l=n.length;l--;)if(d=n[l],o=f[d]){if(r)for(u=o.length;u--;)if(o[u].func===r){var p=o.nativeHandler,m=o.fakeName,h=o.capture;o=o.slice(0,u).concat(o.slice(u+1)),o.nativeHandler=p,o.fakeName=m,o.capture=h,f[d]=o}r&&0!==o.length||(delete f[d],t(e,o.fakeName||d,o.nativeHandler,o.capture))}}else{for(d in f)o=f[d],t(e,o.fakeName||d,o.nativeHandler,o.capture);f={}}for(d in f)return a;delete s[i];try{delete e[c]}catch(g){e[c]=null}}return a},a.fire=function(e,t,r){var o;if(!e||3===e.nodeType||8===e.nodeType)return a;r=n(null,r),r.type=t,r.target=e;do o=e[c],o&&i(r,o),e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow;while(e&&!r.isPropagationStopped());return a},a.clean=function(
e){var t,n,r=a.unbind;if(!e||3===e.nodeType||8===e.nodeType)return a;if(e[c]&&r(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(r(e),n=e.getElementsByTagName("*"),t=n.length;t--;)e=n[t],e[c]&&r(e);return a},a.destroy=function(){s={}},a.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1}}var o="mce-data-",a=/^(?:mouse|contextmenu)|click/,s={keyLocation:1,layerX:1,layerY:1,returnValue:1};return i.Event=new i,i.Event.bind(window,"ready",function(){}),i}),r(c,[],function(){function e(e){return ht.test(e+"")}function n(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>_.cacheLength&&delete e[t.shift()],e[n]=r,r}}function r(e){return e[I]=!0,e}function i(e){var t=B.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t=null}}function o(e,t,n,r){var i,o,a,s,l,c,f,p,m,h;if((t?t.ownerDocument||t:F)!==B&&A(t),t
=t||B,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(L&&!r){if(i=gt.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&O(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return Z.apply(n,t.getElementsByTagName(e)),n;if((a=i[3])&&z.getElementsByClassName&&t.getElementsByClassName)return Z.apply(n,t.getElementsByClassName(a)),n}if(z.qsa&&!M.test(e)){if(f=!0,p=I,m=t,h=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(c=u(e),(f=t.getAttribute("id"))?p=f.replace(bt,"\\$&"):t.setAttribute("id",p),p="[id='"+p+"'] ",l=c.length;l--;)c[l]=p+d(c[l]);m=mt.test(e)&&t.parentNode||t,h=c.join(",")}if(h)try{return Z.apply(n,m.querySelectorAll(h)),n}catch(g){}finally{f||
t.removeAttribute("id")}}}return b(e.replace(lt,"$1"),t,n,r)}function a(e,t){var n=t&&e,r=n&&(~t.sourceIndex||Y)-(~e.sourceIndex||Y);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function u(e,t){var n,r,i,a,s,l,c,u=q[e+" "];if(u)return t?0:u.slice(0);for(s=e,l=[],c=_.preFilter;s;){(!n||(r=ct.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=ut.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(lt," ")}),s=s.slice(n.length));for(a in _.filter)!(r=pt[a].exec(s))||
c[a]&&!(r=c[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?o.error(e):q(e,l).slice(0)}function d(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function f(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=V++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,a){var s,l,c,u=W+" "+o;if(a){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||i)if(c=t[I]||(t[I]={}),(l=c[r])&&l[0]===u){if((s=l[1])===!0||s===w)return s===!0}else if(l=c[r]=[u],l[1]=e(t,n,a)||w,l[1]===!0)return!0}}function p(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function m(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,c=null!=t;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),c&&t.push(s));return a}function h(e,t,n,i,o,a){retu
rn i&&!i[I]&&(i=h(i)),o&&!o[I]&&(o=h(o,a)),r(function(r,a,s,l){var c,u,d,f=[],p=[],h=a.length,g=r||y(t||"*",s.nodeType?[s]:s,[]),v=!e||!r&&t?g:m(g,f,e,s,l),b=n?o||(r?e:h||i)?[]:a:v;if(n&&n(v,b,s,l),i)for(c=m(b,p),i(c,[],s,l),u=c.length;u--;)(d=c[u])&&(b[p[u]]=!(v[p[u]]=d));if(r){if(o||e){if(o){for(c=[],u=b.length;u--;)(d=b[u])&&c.push(v[u]=d);o(null,b=[],c,l)}for(u=b.length;u--;)(d=b[u])&&(c=o?tt.call(r,d):f[u])>-1&&(r[c]=!(a[c]=d))}}else b=m(b===a?b.splice(h,b.length):b),o?o(null,a,b,l):Z.apply(a,b)})}function g(e){for(var t,n,r,i=e.length,o=_.relative[e[0].type],a=o||_.relative[" "],s=o?1:0,l=f(function(e){return e===t},a,!0),c=f(function(e){return tt.call(t,e)>-1},a,!0),u=[function(e,n,r){return!o&&(r||n!==S)||((t=n).nodeType?l(e,n,r):c(e,n,r))}];i>s;s++)if(n=_.relative[e[s].type])u=[f(p(u),n)];else{if(n=_.filter[e[s].type].apply(null,e[s].matches),n[I]){for(r=++s;
i>r&&!_.relative[e[r].type];r++);return h(s>1&&p(u),s>1&&d(e.slice(0,s-1)).replace(lt,"$1"),n,r>s&&g(e.slice(s,r)),i>r&&g(e=e.slice(r)),i>r&&d(e))}u.push(n)}return p(u)}function v(e,t){var n=0,i=t.length>0,a=e.length>0,s=function(r,s,l,c,u){var d,f,p,h=[],g=0,v="0",y=r&&[],b=null!=u,C=S,x=r||a&&_.find.TAG("*",u&&s.parentNode||s),N=W+=null==C?1:Math.random()||.1;for(b&&(S=s!==B&&s,w=n);null!=(d=x[v]);v++){if(a&&d){for(f=0;p=e[f++];)if(p(d,s,l)){c.push(d);break}b&&(W=N,w=++n)}i&&((d=!p&&d)&&g--,r&&y.push(d))}if(g+=v,i&&v!==g){for(f=0;p=t[f++];)p(y,h,s,l);if(r){if(g>0)for(;v--;)y[v]||h[v]||(h[v]=J.call(c));h=m(h)}Z.apply(c,h),b&&!r&&h.length>0&&g+t.length>1&&o.uniqueSort(c)}return b&&(W=N,S=C),y};return i?r(s):s}function y(e,t,n){for(var r=0,i
=t.length;i>r;r++)o(e,t[r],n);return n}function b(e,t,n,r){var i,o,a,s,l,c=u(e);if(!r&&1===c.length){if(o=c[0]=c[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&9===t.nodeType&&L&&_.relative[o[1].type]){if(t=(_.find.ID(a.matches[0].replace(xt,wt),t)||[])[0],!t)return n;e=e.slice(o.shift().value.length)}for(i=pt.needsContext.test(e)?0:o.length;i--&&(a=o[i],!_.relative[s=a.type]);)if((l=_.find[s])&&(r=l(a.matches[0].replace(xt,wt),mt.test(o[0].type)&&t.parentNode||t))){if(o.splice(i,1),e=r.length&&d(o),!e)return Z.apply(n,r),n;break}}return k(e,c)(r,t,!L,n,mt.test(e)),n}function C(){}var x,w,_,N,E,k,S,T,R,A,B,D,L,M,H,P,O,I="sizzle"+-new Date,F=window.document,z={},W=0,V=0,U=n(),q=n(),$=n(),j=!1,K=function(){return 0},G=typeof t,Y=1<<31,X=[],J=X.pop,Q=X.push,Z=X.push,et=X.slice,tt=X.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},nt="[\\
x20\\t\\r\\n\\f]",rt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",it=rt.replace("w","w#"),ot="([*^$|!~]?=)",at="\\["+nt+"*("+rt+")"+nt+"*(?:"+ot+nt+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+it+")|)|)"+nt+"*\\]",st=":("+rt+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+at.replace(3,8)+")*)|.*)\\)|)",lt=new RegExp("^"+nt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+nt+"+$","g"),ct=new RegExp("^"+nt+"*,"+nt+"*"),ut=new RegExp("^"+nt+"*([\\x20\\t\\r\\n\\f>+~])"+nt+"*"),dt=new RegExp(st),ft=new RegExp("^"+it+"$"),pt={ID:new RegExp("^#("+rt+")"),CLASS:new RegExp("^\\.("+rt+")"),NAME:new RegExp("^\\[name=['\"]?("+rt+")['\"]?\\]"),TAG:new RegExp("^(&q
uot;+rt.replace("w","w*")+")"),ATTR:new RegExp("^"+at),PSEUDO:new RegExp("^"+st),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+nt+"*(even|odd|(([+-]|)(\\d*)n|)"+nt+"*(?:([+-]|)"+nt+"*(\\d+)|))"+nt+"*\\)|)","i"),needsContext:new RegExp("^"+nt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+nt+"*((?:-\\d)?\\d*)"+nt+"*\\)|)(?=[^-]|$)","i")},mt=/[\x20\t\r\n\f]*[+~]/,ht=/^[^{]+\{\s*\[native code/,gt=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,vt=/^(?:input|select|textarea|button)$/i,yt=/^h\d$/i,bt=/'|\\/g,Ct=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,xt=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,wt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)};try{Z.apply(X=et.call(F.childNodes),F.childNodes),X
[F.childNodes.length].nodeType}catch(_t){Z={apply:X.length?function(e,t){Q.apply(e,et.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}E=o.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},A=o.setDocument=function(n){var r=n?n.ownerDocument||n:F;return r!==B&&9===r.nodeType&&r.documentElement?(B=r,D=r.documentElement,L=!E(r),z.getElementsByTagName=i(function(e){return e.appendChild(r.createComment("")),!e.getElementsByTagName("*").length}),z.attributes=i(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),z.getElementsByClassName=i(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",e.getElementsByClassName&&e.getElementsByClassName("e&qu
ot;).length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),z.getByName=i(function(e){e.id=I+0,e.appendChild(B.createElement("a")).setAttribute("name",I),e.appendChild(B.createElement("i")).setAttribute("name",I),D.appendChild(e);var t=r.getElementsByName&&r.getElementsByName(I).length===2+r.getElementsByName(I+0).length;return D.removeChild(e),t}),z.sortDetached=i(function(e){return e.compareDocumentPosition&&1&e.compareDocumentPosition(B.createElement("div"))}),_.attrHandle=i(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==G&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},z.getByName?(_.find.ID=function(e,t){if(typeof t.getElementById!==G&&
amp;L){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},_.filter.ID=function(e){var t=e.replace(xt,wt);return function(e){return e.getAttribute("id")===t}}):(_.find.ID=function(e,n){if(typeof n.getElementById!==G&&L){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==G&&r.getAttributeNode("id").value===e?[r]:t:[]}},_.filter.ID=function(e){var t=e.replace(xt,wt);return function(e){var n=typeof e.getAttributeNode!==G&&e.getAttributeNode("id");return n&&n.value===t}}),_.find.TAG=z.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==G?t.getElementsByTagName(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},_.find.NAME=z.getByName&&function(e,t){return typeof t.getElementsByName!==G?t.getElementsByName(name):void 0},_.find.CLASS=z.getElementsByClassName
&&function(e,t){return typeof t.getElementsByClassName!==G&&L?t.getElementsByClassName(e):void 0},H=[],M=[":focus"],(z.qsa=e(r.querySelectorAll))&&(i(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||M.push("\\["+nt+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||M.push(":checked")}),i(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&M.push("[*^$]="+nt+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||M.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),M.push(",.*:")})),(z.matchesSelector=e(P=D.matchesSelector||D.mozMatchesSelector||D.webkitMatchesSelector||D.oMatchesSelector||D.msMatc
hesSelector))&&i(function(e){z.disconnectedMatch=P.call(e,"div"),P.call(e,"[s!='']:x"),H.push("!=",st)}),M=new RegExp(M.join("|")),H=H.length&&new RegExp(H.join("|")),O=e(D.contains)||D.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},K=D.compareDocumentPosition?function(e,t){if(e===t)return j=!0,0;var n=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return n?1&n||T&&t.compareDocumentPosition(e)===n?e===r||O(F,e)?-1:t===r||O(F,t)?1:R?tt.call(R,e)-tt.call(R,t):0:4&n?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var n,i=0,o=e.parentNode,s=t.parentNode,l=[e],c=[t];if(e===t)return j=!0,0;if(!o|
|!s)return e===r?-1:t===r?1:o?-1:s?1:0;if(o===s)return a(e,t);for(n=e;n=n.parentNode;)l.unshift(n);for(n=t;n=n.parentNode;)c.unshift(n);for(;l[i]===c[i];)i++;return i?a(l[i],c[i]):l[i]===F?-1:c[i]===F?1:0},B):B},o.matches=function(e,t){return o(e,null,null,t)},o.matchesSelector=function(e,t){if((e.ownerDocument||e)!==B&&A(e),t=t.replace(Ct,"='$1']"),z.matchesSelector&&L&&(!H||!H.test(t))&&!M.test(t))try{var n=P.call(e,t);if(n||z.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return o(t,B,null,[e]).length>0},o.contains=function(e,t){return(e.ownerDocument||e)!==B&&A(e),O(e,t)},o.attr=function(e,t){var n;return(e.ownerDocument||e)!==B&&A(e),L&&(t=t.toLowerCase()),(n=_.attrHandle[t])?n(e):!L||z.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},o.error=function(e){throw new Error("Syntax error, u
nrecognized expression: "+e)},o.uniqueSort=function(e){var t,n=[],r=0,i=0;if(j=!z.detectDuplicates,T=!z.sortDetached,R=!z.sortStable&&e.slice(0),e.sort(K),j){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return e},N=o.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=N(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=N(t);return n},_=o.selectors={cacheLength:50,createPseudo:r,match:pt,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(xt,wt),e[3]=(e[4]||e[5]||"").replace(xt,wt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slic
e(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||o.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&o.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return pt.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&dt.test(n)&&(t=u(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(xt,wt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=U[e+" "];return t||(t=new RegExp("(^|"+nt+")"+e+"("+nt+"|$)"))&&U(e,function(e){return t.test(e.className||typeof e.getAttribute!==G&&e.getAttribute("class")||"")})},ATTR:function(e,t,n
){return function(r){var i=o.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,f,p,m,h=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s;if(g){if(o){for(;h;){for(d=t;d=d[h];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;m=h="only"===e&&!m&&"nextSibling"}return!0}if(m=[a?g.firstChild:g.lastChild],a&&
;y){for(u=g[I]||(g[I]={}),c=u[e]||[],p=c[0]===W&&c[1],f=c[0]===W&&c[2],d=p&&g.childNodes[p];d=++p&&d&&d[h]||(f=p=0)||m.pop();)if(1===d.nodeType&&++f&&d===t){u[e]=[W,p,f];break}}else if(y&&(c=(t[I]||(t[I]={}))[e])&&c[0]===W)f=c[1];else for(;(d=++p&&d&&d[h]||(f=p=0)||m.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++f||(y&&((d[I]||(d[I]={}))[e]=[W,f]),d!==t)););return f-=i,f===r||f%r===0&&f/r>=0}}},PSEUDO:function(e,t){var n,i=_.pseudos[e]||_.setFilters[e.toLowerCase()]||o.error("unsupported pseudo: "+e);return i[I]?i(t):i.length>1?(n=[e,e,"",t],_.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,n){for(var r,o=i(e,t),a=o.length;a--;)r=tt.call(e,o[a]),e[r]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:r(function(e){var t=[],n=[],i=k(e.replace(lt,"$1"));return i[I]?r(function(e,t,n,r){for(var o,a=i(e,null,
r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),!n.pop()}}),has:r(function(e){return function(t){return o(e,t).length>0}}),contains:r(function(e){return function(t){return(t.textContent||t.innerText||N(t)).indexOf(e)>-1}}),lang:r(function(e){return ft.test(e||"")||o.error("unsupported lang: "+e),e=e.replace(xt,wt).toLowerCase(),function(t){var n;do if(n=L?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(e){var t=window.location&&window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===D},focus:function(e){return e===B.activeElement&&(!B.hasFocus||B.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},check
ed:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!_.pseudos.empty(e)},header:function(e){return yt.test(e.nodeName)},input:function(e){return vt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[0>n?n+t:n]}),even:c(function(e,t){for(var n=0;t>n;n+=2)
e.push(n);return e}),odd:c(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=0>n?n+t:n;++r<t;)e.push(r);return e})}};for(x in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})_.pseudos[x]=s(x);for(x in{submit:!0,reset:!0})_.pseudos[x]=l(x);return k=o.compile=function(e,t){var n,r=[],i=[],o=$[e+" "];if(!o){for(t||(t=u(e)),n=t.length;n--;)o=g(t[n]),o[I]?r.push(o):i.push(o);o=$(e,v(i,r))}return o},_.pseudos.nth=_.pseudos.eq,C.prototype=_.filters=_.pseudos,_.setFilters=new C,z.sortStable=I.split("").sort(K).join("")===I,A(),[0,0].sort(K),z.detectDuplicates=j,o}),r(u,[l,c],function(e,n){function r(e){return"undefined"!=typeof e}function i(e){return"string"==typeof e}function o(e){var t,n,r;for(r=v.createElement("div"),t=v.createDocumentFragment(),r.innerHTML=e;n=r.firstChild;)t.appendChild(n);return t}funct
ion a(e,t,n){var r;if("string"==typeof t)t=o(t);else if(t.length){for(r=0;r<t.length;r++)a(e,t[r],n);return e}for(r=e.length;r--;)n.call(e[r],t.parentNode?t:t);return e}function s(e,t){return e&&t&&-1!==(" "+e.className+" ").indexOf(" "+t+" ")}function l(e,t){var n;for(e=e||[],"string"==typeof e&&(e=e.split(" ")),t=t||{},n=e.length;n--;)t[e[n]]={};return t}function c(e,t){return new c.fn.init(e,t)}function u(e){var t=arguments,n,r,i;for(r=1;r<t.length;r++){n=t[r];for(i in n)e[i]=n[i]}return e}function d(e){var t=[],n,r;for(n=0,r=e.length;r>n;n++)t[n]=e[n];return t}function f(e,t){var n;if(t.indexOf)return t.indexOf(e);for(n=t.length;n--;)if(t[n]===e)return n;return-1}function p(e){return null===e||e===t?"":(""+e).replace(N,"")}function m(e,t){var n,r,i,o,a;if(e)if(n=e.length,n===o){for(r in e)if(e.hasOwnProperty(r)&&(a=e[r],t.call(a,a,r)===!1))
break}else for(i=0;n>i&&(a=e[i],t.call(a,a,r)!==!1);i++);return e}function h(e,n,r){for(var i=[],o=e[n];o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!c(o).is(r));)1===o.nodeType&&i.push(o),o=o[n];return i}function g(e,t,n,r){for(var i=[];e;e=e[n])r&&e.nodeType!==r||e===t||i.push(e);return i}var v=document,y=Array.prototype.push,b=Array.prototype.slice,C=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,x=e.Event,w=l("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"),_=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},N=/^\s*|\s*$/g;return c.fn=c.prototype={constructor:c,selector:"",length:0,init:function(e,t){var n=this,r,a;if(!e)return n;if(e.nodeType)return n.context=n[0]=e,n.length=1,n;if(i(e)){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:C.exec(e),!r)return c(t||document
).find(e);if(r[1])for(a=o(e).firstChild;a;)this.add(a),a=a.nextSibling;else{if(a=v.getElementById(r[2]),a.id!==r[2])return n.find(e);n.length=1,n[0]=a}}else this.add(e);return n},toArray:function(){return d(this)},add:function(e){var t=this;return _(e)?y.apply(t,e):e instanceof c?t.add(e.toArray()):y.call(t,e),t},attr:function(e,n){var i=this;if("object"==typeof e)m(e,function(e,t){i.attr(t,e)});else{if(!r(n))return i[0]&&1===i[0].nodeType?i[0].getAttribute(e):t;this.each(function(){1===this.nodeType&&this.setAttribute(e,n)})}return i},css:function(e,n){var i=this;if("object"==typeof e)m(e,function(e,t){i.css(t,e)});else{if(e=e.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}),!r(n))return i[0]?i[0].style[e]:t;"number"!=typeof n||w[e]||(n+="px"),i.each(function(){var t=this.style;"opacity"===e&&this.runtimeStyle&&"undefined"==typeof this.runtimeStyle.opacity&&(t.filter="&qu
ot;===n?"":"alpha(opacity="+100*n+")");try{t[e]=n}catch(r){}})}return i},remove:function(){for(var e=this,t,n=this.length;n--;)t=e[n],x.clean(t),t.parentNode&&t.parentNode.removeChild(t);return this},empty:function(){for(var e=this,t,n=this.length;n--;)for(t=e[n];t.firstChild;)t.removeChild(t.firstChild);return this},html:function(e){var t=this,n;if(r(e)){for(n=t.length;n--;)t[n].innerHTML=e;return t}return t[0]?t[0].innerHTML:""},text:function(e){var t=this,n;if(r(e)){for(n=t.length;n--;)t[n].innerText=t[0].textContent=e;return t}return t[0]?t[0].innerText||t[0].textContent:""},append:function(){return a(this,arguments,function(e){1===this.nodeType&&this.appendChild(e)})},prepend:function(){return a(this,arguments,function(e){1===this.nodeType&&this.insertBefore(e,this.firstChild)})},before:function(){var e=this;return e[0]&&e[0].parentNode?a(e,arguments,function(e){this.parentNode.insertBefore(e,this
.nextSibling)}):e},after:function(){var e=this;return e[0]&&e[0].parentNode?a(e,arguments,function(e){this.parentNode.insertBefore(e,this)}):e},appendTo:function(e){return c(e).append(this),this},addClass:function(e){return this.toggleClass(e,!0)},removeClass:function(e){return this.toggleClass(e,!1)},toggleClass:function(e,t){var n=this;return-1!==e.indexOf(" ")?m(e.split(" "),function(){n.toggleClass(this,t)}):n.each(function(n){var r;s(n,e)!==t&&(r=n.className,t?n.className+=r?" "+e:e:n.className=p((" "+r+" ").replace(" "+e+" "," ")))}),n},hasClass:function(e){return s(this[0],e)},each:function(e){return m(this,e)},on:function(e,t){return this.each(function(){x.bind(this,e,t)})},off:function(e,t){return this.each(function(){x.unbind(this,e,t)})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slic
e:function(){return new c(b.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},replaceWith:function(e){var t=this;return t[0]&&t[0].parentNode.replaceChild(c(e)[0],t[0]),t},wrap:function(e){return e=c(e)[0],this.each(function(){var t=this,n=e.cloneNode(!1);t.parentNode.insertBefore(n,t),n.appendChild(t)})},unwrap:function(){return this.each(function(){for(var e=this,t=e.firstChild,n;t;)n=t,t=t.nextSibling,e.parentNode.insertBefore(n,e)})},clone:function(){var e=[];return this.each(function(){e.push(this.cloneNode(!0))}),c(e)},find:function(e){var t,n,r=[];for(t=0,n=this.length;n>t;t++)c.find(e,this[t],r);return c(r)},push:y,sort:[].sort,splice:[].splice},u(c,{extend:u,toArray:d,inArray:f,isArray:_,each:m,trim:p,makeMap:l,find:n,expr:n.selectors,unique:n.uniqueSort,text:n.getText,isXMLDoc:n.isXML,contains:n.contains,filter:function(e,t,n){return n&&(e=":n
ot("+e+")"),t=1===t.length?c.find.matchesSelector(t[0],e)?[t[0]]:[]:c.find.matches(e,t)}}),m({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,"parentNode")},parentsUntil:function(e,t){return h(e,"parentNode",t)},next:function(e){return g(e,"nextSibling",1)},prev:function(e){return g(e,"previousSibling",1)},nextNodes:function(e){return g(e,"nextSibling")},prevNodes:function(e){return g(e,"previousSibling")},children:function(e){return g(e.firstChild,"nextSibling",1)},contents:function(e){return d(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(e,t){c.fn[e]=function(n){var r=this,i;if(r.length>1)throw new Error("DomQuery only supports traverse functions on a single node.");return r[0]&&(i=t(r[0],n)),i=c(i),n&&"parentsUntil"!==e?i.filter(n):i}}),c.
fn.filter=function(e){return c.filter(e)},c.fn.is=function(e){return!!e&&this.filter(e).length>0},c.fn.init.prototype=c.fn,c}),r(d,[],function(){return function(e,t){function n(e,t,n,r){function i(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e
-}return"#"+i(t)+i(n)+i(r)}var r=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,i=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,o=/\s*([^:]+):\s*([^;]+);?/g,a=/\s+$/,s,l,c={},u,d,f,p="\ufeff";for(e=e||{},t&&(d=t.getValidStyles(),f=t.getInvalidStyles()),u=("\\\" \\' \\; \\: ; : "+p).split(" "),l=0;l<u.length;l++)c[u[l]]=p+l,c[p+l]=u[l];return{toHex:function(e){return e.replace(r,n)},parse:function(t){function s(e,t,n){var r,i,o,a;if(r=h[e+"-top"+t],r&&(i=h[e+"-right"+t],i&&(o=h[e+"-bottom"+t],o&&(a=h[e+"-left"+t])))){var s=[r,i,o,a];for(l=s.length-1;l--&&s[l]===s[l+1];);l>-1&&n||(h[e+t]=-1==l?s[0]:s.join(" "),delete h[e+"-top"+t],delete h[e+"-right"+t],delete h[e+"-bottom"+t],delete h[e+&
quot;-left"+t])}}function u(e){var t=h[e],n;if(t){for(t=t.split(" "),n=t.length;n--;)if(t[n]!==t[0])return!1;return h[e]=t[0],!0}}function d(e,t,n,r){u(t)&&u(n)&&u(r)&&(h[e]=h[t]+" "+h[n]+" "+h[r],delete h[t],delete h[n],delete h[r])}function f(e){return b=!0,c[e]}function p(e,t){return b&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return c[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e}function m(t,n,r,i,o,a){if(o=o||a)return o=p(o),"'"+o.replace(/\'/g,"\\'")+"'";if(n=p(n||r||i),!e.allow_script_urls){var s=n.replace(/[\s\r\n]+/,"");if(/(java|vb)script:/i.test(s))return"";if(!e.allow_svg_data_urls&&/^data:image\/svg/i.test(s))return""}return C&&(n=C.call(x,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"}var h={},g,v,y,b,C=e.url_converter,x=e.url_converter_scope||this;if(t){for(t=t.replace(/[
\u0000-\u001F]/g,""),t=t.replace(/\\[\"\';:\uFEFF]/g,f).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,f)});g=o.exec(t);){if(v=g[1].replace(a,"").toLowerCase(),y=g[2].replace(a,""),y=y.replace(/\\[0-9a-f]+/g,function(e){return String.fromCharCode(parseInt(e.substr(1),16))}),v&&y.length>0){if(!e.allow_script_urls&&("behavior"==v||/expression\s*\(|\/\*|\*\//.test(y)))continue;"font-weight"===v&&"700"===y?y="bold":("color"===v||"background-color"===v)&&(y=y.toLowerCase()),y=y.replace(r,n),y=y.replace(i,m),h[v]=b?p(y,!0):y}o.lastIndex=g.index+g[0].length}s("border","",!0),s("border","-width"),s("border","-color"),s("border","-style"),s("padding",""),s("margin",""),d("border","border-width&
quot;,"border-style","border-color"),"medium none"===h.border&&delete h.border,"none"===h["border-image"]&&delete h["border-image"]}return h},serialize:function(e,t){function n(t){var n,r,o,a;if(n=d[t])for(r=0,o=n.length;o>r;r++)t=n[r],a=e[t],a!==s&&a.length>0&&(i+=(i.length>0?" ":"")+t+": "+a+";")}function r(e,t){var n;return n=f["*"],n&&n[e]?!1:(n=f[t],n&&n[e]?!1:!0)}var i="",o,a;if(t&&d)n("*"),n(t);else for(o in e)a=e[o],a!==s&&a.length>0&&(!f||r(o,t))&&(i+=(i.length>0?" ":"")+o+": "+a+";");return i}}}}),r(f,[],function(){return function(e,t){function n(e,n,r,i){var o,a;if(e){if(!i&&e[n])return e[n];if(e!=t){if(o=e[r])return o;for(a=e.parentNode;a&&a!=t;a=a.parentNode)if(o=a[r])return o}}}var r=e;this.cu
rrent=function(){return r},this.next=function(e){return r=n(r,"firstChild","nextSibling",e)},this.prev=function(e){return r=n(r,"lastChild","previousSibling",e)}}}),r(p,[],function(){function e(e){return null===e||e===t?"":(""+e).replace(h,"")}function n(e,n){return n?"array"==n&&g(e)?!0:typeof e==n:e!==t}function r(e){var t=[],n,r;for(n=0,r=e.length;r>n;n++)t[n]=e[n];return t}function i(e,t,n){var r;for(e=e||[],t=t||",","string"==typeof e&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n}function o(e,n,r){var i,o;if(!e)return 0;if(r=r||e,e.length!==t){for(i=0,o=e.length;o>i;i++)if(n.call(r,e[i],i,e)===!1)return 0}else for(i in e)if(e.hasOwnProperty(i)&&n.call(r,e[i],i,e)===!1)return 0;return 1}function a(e,t){var n=[];return o(e,function(e){n.push(t(e))}),n}function s(e,t){var n=[];return o(e,function(e){(!t||t(e))&&n.push(e)}),n}functi
on l(e,t,n){var r=this,i,o,a,s,l,c=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),a=e[3].match(/(^|\.)(\w+)$/i)[2],o=r.createNS(e[3].replace(/\.\w+$/,""),n),!o[a]){if("static"==e[2])return o[a]=t,void(this.onCreate&&this.onCreate(e[2],e[3],o[a]));t[a]||(t[a]=function(){},c=1),o[a]=t[a],r.extend(o[a].prototype,t),e[5]&&(i=r.resolve(e[5]).prototype,s=e[5].match(/\.(\w+)$/i)[1],l=o[a],o[a]=c?function(){return i[s].apply(this,arguments)}:function(){return this.parent=i[s],l.apply(this,arguments)},o[a].prototype[a]=o[a],r.each(i,function(e,t){o[a].prototype[t]=i[t]}),r.each(t,function(e,t){i[t]?o[a].prototype[t]=function(){return this.parent=i[t],e.apply(this,arguments)}:t!=a&&(o[a].prototype[t]=e)})),r.each(t["static"],function(e,t){o[a][t]=e})}}function c(e,t){var n,r;if(e)for(n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1}function u(e,n){var r,i,o,a=arguments,s;for(r=1,i=a.length;i>r;r++){n=a[r];for(o in n)n.hasOwnP
roperty(o)&&(s=n[o],s!==t&&(e[o]=s))}return e}function d(e,t,n,r){r=r||this,e&&(n&&(e=e[n]),o(e,function(e,i){return t.call(r,e,i,n)===!1?!1:void d(e,t,n,r)}))}function f(e,t){var n,r;for(t=t||window,e=e.split("."),n=0;n<e.length;n++)r=e[n],t[r]||(t[r]={}),t=t[r];return t}function p(e,t){var n,r;for(t=t||window,e=e.split("."),n=0,r=e.length;r>n&&(t=t[e[n]],t);n++);return t}function m(t,r){return!t||n(t,"array")?t:a(t.split(r||","),e)}var h=/^\s*|\s*$/g,g=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};return{trim:e,isArray:g,is:n,toArray:r,makeMap:i,each:o,map:a,grep:s,inArray:c,extend:u,create:l,walk:d,createNS:f,resolve:p,explode:m}}),r(m,[p],function(e){function t(n){function r(){return H.createDocumentFragment()}function i(e,t){_(F,e,t)}function o(e,t){_(z,e,t)}function a(e){i(e.parentNode,j(e))}function s(e){i(e.parentNode,j(e)+1)}function l(e){
o(e.parentNode,j(e))}function c(e){o(e.parentNode,j(e)+1)}function u(e){e?(M[U]=M[V],M[q]=M[W]):(M[V]=M[U],M[W]=M[q]),M.collapsed=F}function d(e){a(e),c(e)}function f(e){i(e,0),o(e,1===e.nodeType?e.childNodes.length:e.nodeValue.length)}function p(e,t){var n=M[V],r=M[W],i=M[U],o=M[q],a=t.startContainer,s=t.startOffset,l=t.endContainer,c=t.endOffset;return 0===e?w(n,r,a,s):1===e?w(i,o,a,s):2===e?w(i,o,l,c):3===e?w(n,r,l,c):void 0}function m(){N(I)}function h(){return N(P)}function g(){return N(O)}function v(e){var t=this[V],r=this[W],i,o;3!==t.nodeType&&4!==t.nodeType||!t.nodeValue?(t.childNodes.length>0&&(o=t.childNodes[r]),o?t.insertBefore(e,o):3==t.nodeType?n.insertAfter(e,t):t.appendChild(e)):r?r>=t.nodeValue.length?n.insertAfter(e,t):(i=t.splitText(r),t.parentNode.insertBefore(e,i)):t.parentNode.insertBefore(e,t)}function y(e){var t=M.extractContents();M.insertNode(e),e.appendChild(t),M.selectNode(e)}function b(){return $(new t(n),{startContainer:M[V],startO
ffset:M[W],endContainer:M[U],endOffset:M[q],collapsed:M.collapsed,commonAncestorContainer:M.commonAncestorContainer})}function C(e,t){var n;if(3==e.nodeType)return e;if(0>t)return e;for(n=e.firstChild;n&&t>0;)--t,n=n.nextSibling;return n?n:e}function x(){return M[V]==M[U]&&M[W]==M[q]}function w(e,t,r,i){var o,a,s,l,c,u;if(e==r)return t==i?0:i>t?-1:1;for(o=r;o&&o.parentNode!=e;)o=o.parentNode;if(o){for(a=0,s=e.firstChild;s!=o&&t>a;)a++,s=s.nextSibling;return a>=t?-1:1}for(o=e;o&&o.parentNode!=r;)o=o.parentNode;if(o){for(a=0,s=r.firstChild;s!=o&&i>a;)a++,s=s.nextSibling;return i>a?-1:1}for(l=n.findCommonAncestor(e,r),c=e;c&&c.parentNode!=l;)c=c.parentNode;for(c||(c=l),u=r;u&&u.parentNode!=l;)u=u.parentNode;if(u||(u=l),c==u)return 0;for(s=l.firstChild;s;){if(s==c)return-1;if(s==u)return 1;s=s.nextSibling}}function _(e,t,r){var i,o;for(e?(M[V]=t,M[W]=r):(M[U]=t,M[q]=r),i=M[U];i.parentNode;)i=i.parentNod
e;for(o=M[V];o.parentNode;)o=o.parentNode;o==i?w(M[V],M[W],M[U],M[q])>0&&M.collapse(e):M.collapse(e),M.collapsed=x(),M.commonAncestorContainer=n.findCommonAncestor(M[V],M[U])}function N(e){var t,n=0,r=0,i,o,a,s,l,c;if(M[V]==M[U])return E(e);for(t=M[U],i=t.parentNode;i;t=i,i=i.parentNode){if(i==M[V])return k(t,e);++n}for(t=M[V],i=t.parentNode;i;t=i,i=i.parentNode){if(i==M[U])return S(t,e);++r}for(o=r-n,a=M[V];o>0;)a=a.parentNode,o--;for(s=M[U];0>o;)s=s.parentNode,o++;for(l=a.parentNode,c=s.parentNode;l!=c;l=l.parentNode,c=c.parentNode)a=l,s=c;return T(a,s,e)}function E(e){var t,n,i,o,a,s,l,c,u;if(e!=I&&(t=r()),M[W]==M[q])return t;if(3==M[V].nodeType){if(n=M[V].nodeValue,i=n.substring(M[W],M[q]),e!=O&&(o=M[V],c=M[W],u=M[q]-M[W],0===c&&u>=o.nodeValue.length-1?o.parentNode.removeChild(o):o.deleteData(c,u),M.collapse(F)),e==I)return;return i.length>0&&t.appendChild(H.createTextNode(i)),t}for(o=C(M[V],M[W]),a=M[q]-M[W];o&&a>
;0;)s=o.nextSibling,l=D(o,e),t&&t.appendChild(l),--a,o=s;return e!=O&&M.collapse(F),t}function k(e,t){var n,i,o,a,s,l;if(t!=I&&(n=r()),i=R(e,t),n&&n.appendChild(i),o=j(e),a=o-M[W],0>=a)return t!=O&&(M.setEndBefore(e),M.collapse(z)),n;for(i=e.previousSibling;a>0;)s=i.previousSibling,l=D(i,t),n&&n.insertBefore(l,n.firstChild),--a,i=s;return t!=O&&(M.setEndBefore(e),M.collapse(z)),n}function S(e,t){var n,i,o,a,s,l;for(t!=I&&(n=r()),o=A(e,t),n&&n.appendChild(o),i=j(e),++i,a=M[q]-i,o=e.nextSibling;o&&a>0;)s=o.nextSibling,l=D(o,t),n&&n.appendChild(l),--a,o=s;return t!=O&&(M.setStartAfter(e),M.collapse(F)),n}function T(e,t,n){var i,o,a,s,l,c,u;for(n!=I&&(o=r()),i=A(e,n),o&&o.appendChild(i),a=j(e),s=j(t),++a,l=s-a,c=e.nextSibling;l>0;)u=c.nextSibling,i=D(c,n),o&&o.appendChild(i),c=u,--l;return i=R(t,n),o&&o.appendChild(i),n!=O&&(M.setStartAfter(
e),M.collapse(F)),o}function R(e,t){var n=C(M[U],M[q]-1),r,i,o,a,s,l=n!=M[U];if(n==e)return B(n,l,z,t);for(r=n.parentNode,i=B(r,z,z,t);r;){for(;n;)o=n.previousSibling,a=B(n,l,z,t),t!=I&&i.insertBefore(a,i.firstChild),l=F,n=o;if(r==e)return i;n=r.previousSibling,r=r.parentNode,s=B(r,z,z,t),t!=I&&s.appendChild(i),i=s}}function A(e,t){var n=C(M[V],M[W]),r=n!=M[V],i,o,a,s,l;if(n==e)return B(n,r,F,t);for(i=n.parentNode,o=B(i,z,F,t);i;){for(;n;)a=n.nextSibling,s=B(n,r,F,t),t!=I&&o.appendChild(s),r=F,n=a;if(i==e)return o;n=i.nextSibling,i=i.parentNode,l=B(i,z,F,t),t!=I&&l.appendChild(o),o=l}}function B(e,t,r,i){var o,a,s,l,c;if(t)return D(e,i);if(3==e.nodeType){if(o=e.nodeValue,r?(l=M[W],a=o.substring(l),s=o.substring(0,l)):(l=M[q],a=o.substring(0,l),s=o.substring(l)),i!=O&&(e.nodeValue=s),i==I)return;return c=n.clone(e,z),c.nodeValue=a,c}if(i!=I)return n.clone(e,z)}function D(e,t){return t!=I?t==O?n.clone(e,F):e:void e.parentNode.removeChild(e)}func
tion L(){return n.create("body",null,g()).outerText}var M=this,H=n.doc,P=0,O=1,I=2,F=!0,z=!1,W="startOffset",V="startContainer",U="endContainer",q="endOffset",$=e.extend,j=n.nodeIndex;return $(M,{startContainer:H,startOffset:0,endContainer:H,endOffset:0,collapsed:F,commonAncestorContainer:H,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:i,setEnd:o,setStartBefore:a,setStartAfter:s,setEndBefore:l,setEndAfter:c,collapse:u,selectNode:d,selectNodeContents:f,compareBoundaryPoints:p,deleteContents:m,extractContents:h,cloneContents:g,insertNode:v,surroundContents:y,cloneRange:b,toStringIE:L}),M}return t.prototype.toString=function(){return this.toStringIE()},t}),r(h,[p],function(e){function t(e){var t;return t=document.createElement("div"),t.innerHTML=e,t.textContent||t.innerText||e}function n(e,t){var n,r,i,a={};if(e){for(e=e.split(","),t=t||10,n=0;n<e.length;n+=2)r=String.fromCharCode(parseInt(e
[n],t)),o[r]||(i="&"+e[n+1]+";",a[r]=i,a[i]=r);return a}}var r=e.makeMap,i,o,a,s=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=/[<>&\"\']/g,u=/&(#x|#)?([\w]+);/g,d={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};o={'"':""","'&q
uot;:"'","<":"<",">":">","&":"&","`":"`"},a={"<":"<",">":">","&":"&",""":'"',"'":"'"},i=n("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,7
5,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,m
inus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);var f={encodeRaw:function(e,t){return e.replace(t?s:l,function(e){return o[e]||e})},encodeAllRaw:function(e){return(""+e).replace(c,function(e){return o[e]||e})},encodeNumeric:function(e,t){return e.replace(t?s:l,function(e){return e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":o[e]||"&am
p;#"+e.charCodeAt(0)+";"})},encodeNamed:function(e,t,n){return n=n||i,e.replace(t?s:l,function(e){return o[e]||n[e]||e})},getEncodeFunc:function(e,t){function a(e,n){return e.replace(n?s:l,function(e){return o[e]||t[e]||"&#"+e.charCodeAt(0)+";"||e})}function c(e,n){return f.encodeNamed(e,n,t)}return t=n(t)||i,e=r(e.replace(/\+/g,",")),e.named&&e.numeric?a:e.named?t?c:f.encodeNamed:e.numeric?f.encodeNumeric:f.encodeRaw},decode:function(e){return e.replace(u,function(e,n,r){return n?(r=parseInt(r,2===n.length?16:10),r>65535?(r-=65536,String.fromCharCode(55296+(r>>10),56320+(1023&r))):d[r]||String.fromCharCode(r)):a[e]||i[e]||t(e)})}};return f}),r(g,[],function(){var e=navigator,t=e.userAgent,n,r,i,o,a,s,l;n=window.opera&&window.opera.buildNumber,r=/WebKit/.test(t),i=!r&&!n&&/MSIE/gi.test(t)&&/Explorer/gi.test(e.appName),i=i&&/MSIE (\w+)\./.exec(t)[1],o=-1==t.indexOf("Trid
ent/")||-1==t.indexOf("rv:")&&-1==e.appName.indexOf("Netscape")?!1:11,i=i||o,a=!r&&!o&&/Gecko/.test(t),s=-1!=t.indexOf("Mac"),l=/(iPad|iPhone)/.test(t);var c=!l||t.match(/AppleWebKit\/(\d*)/)[1]>=534;return{opera:n,webkit:r,ie:i,gecko:a,mac:s,iOS:l,contentEditable:c,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:8!=i,range:window.getSelection&&"Range"in window,documentMode:i?document.documentMode||7:10}}),r(v,[],function(){return function(e,t){function n(t){e.getElementsByTagName("head")[0].appendChild(t)}function r(t,r,s){function l(){for(var e=v.passed,t=e.length;t--;)e[t]();v.status=2,v.passed=[],v.failed=[]}function c(){for(var e=v.failed,t=e.length;t--;)e[t]();v.status=3,v.passed=[],v.failed=[]}function u(){var e=navigator.userAgent.match(/WebKit\/(\d*)/);return!!(e&&e[1]<536)}function d(e,t){e()||((new Date).
getTime()-g<a?window.setTimeout(t,0):c())}function f(){d(function(){for(var t=e.styleSheets,n,r=t.length,i;r--;)if(n=t[r],i=n.ownerNode?n.ownerNode:n.owningElement,i&&i.id===m.id)return l(),!0},f)}function p(){d(function(){try{var e=h.sheet.cssRules;return l(),!!e}catch(t){}},p)}var m,h,g,v;if(o[t]?v=o[t]:(v={passed:[],failed:[]},o[t]=v),r&&v.passed.push(r),s&&v.failed.push(s),1!=v.status){if(2==v.status)return void l();if(3==v.status)return void c();if(v.status=1,m=e.createElement("link"),m.rel="stylesheet",m.type="text/css",m.id="u"+i++,m.async=!1,m.defer=!1,g=(new Date).getTime(),"onload"in m&&!u())m.onload=f,m.onerror=c;else{if(navigator.userAgent.indexOf("Firefox")>0)return h=e.createElement("style"),h.textContent='@import "'+t+'"',p(),void n(h);f()}n(m),m.href=t}}var i=0,o={},a;t=t||{},a=t.maxLoadTime||5e3,this.load=r}}),r(y,[c,d,l,f,m,h,g,p,v],function(e,n,r,i
,o,a,s,l,c){function u(e,t){var i=this,o;i.doc=e,i.win=window,i.files={},i.counter=0,i.stdMode=!v||e.documentMode>=8,i.boxModel=!v||"CSS1Compat"==e.compatMode||i.stdMode,i.hasOuterHTML="outerHTML"in e.createElement("a"),i.styleSheetLoader=new c(e),this.boundEvents=[],i.settings=t=h({keep_values:!1,hex_colors:1},t),i.schema=t.schema,i.styles=new n({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema),i.fixDoc(e),i.events=t.ownEvents?new r(t.proxy):r.Event,o=t.schema?t.schema.getBlockElements():{},i.isBlock=function(e){if(!e)return!1;var t=e.nodeType;return t?!(1!==t||!o[e.nodeName]):!!o[e]}}var d=l.each,f=l.is,p=l.grep,m=l.trim,h=l.extend,g=s.webkit,v=s.ie,y=/^([a-z0-9],?)+$/i,b=/^[ \t\r\n]*$/,C=l.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," ");return u.prototype={root:null,props:{"for":"htmlFor","class":"className",className:&
quot;className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value",id:"id",name:"name",type:"type"},fixDoc:function(e){var t=this.settings,n;if(v&&t.schema){"abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video".replace(/\w+/g,function(t){e.createElement(t)});for(n in t.schema.getCustomElements())e.createElement(n)}},clone:function(e,t){var n=this,r,i;return!v||1!==e.nodeType||t?e.cloneNode(t):(i=n.doc,t?r.firstChild:(r=i.createElement(e.nodeName),d(n.getAttribs(e),function(t){n.setAttrib(r,t.nodeName,n.getAttrib(e,t.nodeName))}),r))},getRoot:function(){var e=this;return e.get(e.settings.root_element)||e.doc.body},getViewPort:function(e){var t,n;return e=e?e:this.win,t=e.document,n=this.boxModel?t.documentElement:t.body,{x
:e.pageXOffset||n.scrollLeft,y:e.pageYOffset||n.scrollTop,w:e.innerWidth||n.clientWidth,h:e.innerHeight||n.clientHeight}},getRect:function(e){var t=this,n,r;return e=t.get(e),n=t.getPos(e),r=t.getSize(e),{x:n.x,y:n.y,w:r.w,h:r.h}},getSize:function(e){var t=this,n,r;return e=t.get(e),n=t.getStyle(e,"width"),r=t.getStyle(e,"height"),-1===n.indexOf("px")&&(n=0),-1===r.indexOf("px")&&(r=0),{w:parseInt(n,10)||e.offsetWidth||e.clientWidth,h:parseInt(r,10)||e.offsetHeight||e.clientHeight}},getParent:function(e,t,n){return this.getParents(e,t,n,!1)},getParents:function(e,n,r,i){var o=this,a,s=[];for(e=o.get(e),i=i===t,r=r||("BODY"!=o.getRoot().nodeName?o.getRoot().parentNode:null),f(n,"string")&&(a=n,n="*"===n?function(e){return 1==e.nodeType}:function(e){return o.is(e,a)});e&&e!=r&&e.nodeType&&9!==e.nodeType;){if(!n||n(e)){if(!i)return e;s.push(e)}e=e.parentNode}return i?s:
null},get:function(e){var t;return e&&this.doc&&"string"==typeof e&&(t=e,e=this.doc.getElementById(e),e&&e.id!==t)?this.doc.getElementsByName(t)[1]:e},getNext:function(e,t){return this._findSib(e,t,"nextSibling")},getPrev:function(e,t){return this._findSib(e,t,"previousSibling")},select:function(t,n){var r=this;return e(t,r.get(n)||r.get(r.settings.root_element)||r.doc,[])},is:function(n,r){var i;if(n.length===t){if("*"===r)return 1==n.nodeType;if(y.test(r)){for(r=r.toLowerCase().split(/,/),n=n.nodeName.toLowerCase(),i=r.length-1;i>=0;i--)if(r[i]==n)return!0;return!1}}if(n.nodeType&&1!=n.nodeType)return!1;var o=n.nodeType?[n]:n;return e(r,o[0].ownerDocument||o[0],null,o).length>0},add:function(e,t,n,r,i){var o=this;return this.run(e,function(e){var a;return a=f(t,"string")?o.doc.createElement(t):t,o.setAttribs(a,n),r&&(r.nodeType?a.appendChild(r):o.setHTML(a,r)),i?a:e.appendChild(
a)})},create:function(e,t,n){return this.add(this.doc.createElement(e),e,t,n,1)},createHTML:function(e,t,n){var r="",i;r+="<"+e;for(i in t)t.hasOwnProperty(i)&&null!==t[i]&&"undefined"!=typeof t[i]&&(r+=" "+i+'="'+this.encode(t[i])+'"');return"undefined"!=typeof n?r+">"+n+"</"+e+">":r+" />"},createFragment:function(e){var t,n,r=this.doc,i;for(i=r.createElement("div"),t=r.createDocumentFragment(),e&&(i.innerHTML=e);n=i.firstChild;)t.appendChild(n);return t},remove:function(e,t){return this.run(e,function(e){var n,r=e.parentNode;if(!r)return null;if(t)for(;n=e.firstChild;)!v||3!==n.nodeType||n.nodeValue?r.insertBefore(n,e):e.removeChild(n);return r.removeChild(e)})},setStyle:function(e,t,n){return this.run(e,function(e){var r=this,i,o;if(t)if("string"==typeof t){i=e.style,t=t.replace(/-(\D)/g,function(e,t){return t.toUpp
erCase()}),"number"!=typeof n&&!/^[\-0-9\.]+$/.test(n)||C[t]||(n+="px"),"opacity"===t&&e.runtimeStyle&&"undefined"==typeof e.runtimeStyle.opacity&&(i.filter=""===n?"":"alpha(opacity="+100*n+")"),"float"==t&&(t="cssFloat"in e.style?"cssFloat":"styleFloat");try{i[t]=n}catch(a){}r.settings.update_styles&&e.removeAttribute("data-mce-style")}else for(o in t)r.setStyle(e,o,t[o])})},getStyle:function(e,n,r){if(e=this.get(e)){if(this.doc.defaultView&&r){n=n.replace(/[A-Z]/g,function(e){return"-"+e});try{return this.doc.defaultView.getComputedStyle(e,null).getPropertyValue(n)}catch(i){return null}}return n=n.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}),"float"==n&&(n=v?"styleFloat":"cssFloat"),e.currentStyle&&r?e.currentStyle[n]:e.style?e.styl
e[n]:t}},setStyles:function(e,t){this.setStyle(e,t)},css:function(e,t,n){this.setStyle(e,t,n)},removeAllAttribs:function(e){return this.run(e,function(e){var t,n=e.attributes;for(t=n.length-1;t>=0;t--)e.removeAttributeNode(n.item(t))})},setAttrib:function(e,t,n){var r=this;if(e&&t)return this.run(e,function(e){var i=r.settings,o=e.getAttribute(t);if(null!==n)switch(t){case"style":if(!f(n,"string"))return void d(n,function(t,n){r.setStyle(e,n,t)});i.keep_values&&(n?e.setAttribute("data-mce-style",n,2):e.removeAttribute("data-mce-style",2)),e.style.cssText=n;break;case"class":e.className=n||"";break;case"src":case"href":i.keep_values&&(i.url_converter&&(n=i.url_converter.call(i.url_converter_scope||r,n,t,e)),r.setAttrib(e,"data-mce-"+t,n,2));break;case"shape":e.setAttribute("data-mce-style",n)}f(n)&&null!==n&&0!==n.length?e.se
tAttribute(t,""+n,2):e.removeAttribute(t,2),o!=n&&i.onSetAttrib&&i.onSetAttrib({attrElm:e,attrName:t,attrValue:n})})},setAttribs:function(e,t){var n=this;return this.run(e,function(e){d(t,function(t,r){n.setAttrib(e,r,t)})})},getAttrib:function(e,t,n){var r,i=this,o;if(e=i.get(e),!e||1!==e.nodeType)return n===o?!1:n;if(f(n)||(n=""),/^(src|href|style|coords|shape)$/.test(t)&&(r=e.getAttribute("data-mce-"+t)))return r;if(v&&i.props[t]&&(r=e[i.props[t]],r=r&&r.nodeValue?r.nodeValue:r),r||(r=e.getAttribute(t,2)),/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(t))return e[i.props[t]]===!0&&""===r?t:r?t:"";if("FORM"===e.nodeName&&e.getAttributeNode(t))return e.getAttributeNode(t).nodeValue;if("style"===t&&(r=r||e.style.cssText,r&&(r=i.serializeStyle(i.parseStyle(r),e.nodeName),i.settin
gs.keep_values&&e.setAttribute("data-mce-style",r))),g&&"class"===t&&r&&(r=r.replace(/(apple|webkit)\-[a-z\-]+/gi,"")),v)switch(t){case"rowspan":case"colspan":1===r&&(r="");break;case"size":("+0"===r||20===r||0===r)&&(r="");break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":0===r&&(r="");break;case"hspace":-1===r&&(r="");break;case"maxlength":case"tabindex":(32768===r||2147483647===r||"32768"===r)&&(r="");break;case"multiple":case"compact":case"noshade":case"nowrap":return 65535===r?t:n;case"shape":r=r.toLowerCase();break;default:0===t.indexOf("on")&&r&&(r=(""+r).replace(/^fu
nction\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1"))}return r!==o&&null!==r&&""!==r?""+r:n},getPos:function(e,t){var n=this,r=0,i=0,o,a=n.doc,s;if(e=n.get(e),t=t||a.body,e){if(t===a.body&&e.getBoundingClientRect)return s=e.getBoundingClientRect(),t=n.boxModel?a.documentElement:a.body,r=s.left+(a.documentElement.scrollLeft||a.body.scrollLeft)-t.clientLeft,i=s.top+(a.documentElement.scrollTop||a.body.scrollTop)-t.clientTop,{x:r,y:i};for(o=e;o&&o!=t&&o.nodeType;)r+=o.offsetLeft||0,i+=o.offsetTop||0,o=o.offsetParent;for(o=e.parentNode;o&&o!=t&&o.nodeType;)r-=o.scrollLeft||0,i-=o.scrollTop||0,o=o.parentNode}return{x:r,y:i}},parseStyle:function(e){return this.styles.parse(e)},serializeStyle:function(e,t){return this.styles.serialize(e,t)},addStyle:function(e){var t=this,n=t.doc,r,i;if(t!==u.DOM&&n===document){var o=u.DOM.addedStyles;if(o=o||[],o[e])return;o[e]=!0,u.DOM.addedStyles=o}i=n.getElementById(&quo
t;mceDefaultStyles"),i||(i=n.createElement("style"),i.id="mceDefaultStyles",i.type="text/css",r=n.getElementsByTagName("head")[0],r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i)),i.styleSheet?i.styleSheet.cssText+=e:i.appendChild(n.createTextNode(e))},loadCSS:function(e){var t=this,n=t.doc,r;return t!==u.DOM&&n===document?void u.DOM.loadCSS(e):(e||(e=""),r=n.getElementsByTagName("head")[0],void d(e.split(","),function(e){var i;t.files[e]||(t.files[e]=!0,i=t.create("link",{rel:"stylesheet",href:e}),v&&n.documentMode&&n.recalc&&(i.onload=function(){n.recalc&&n.recalc(),i.onload=null}),r.appendChild(i))}))},addClass:function(e,t){return this.run(e,function(e){var n;return t?this.hasClass(e,t)?e.className:(n=this.removeClass(e,t),e.className=n=(""!==n?n+" ":"")+t,n):0})},removeClass:function(e,t){var n=this,r;re
turn n.run(e,function(e){var i;return n.hasClass(e,t)?(r||(r=new RegExp("(^|\\s+)"+t+"(\\s+|$)","g")),i=e.className.replace(r," "),i=m(" "!=i?i:""),e.className=i,i||(e.removeAttribute("class"),e.removeAttribute("className")),i):e.className})},hasClass:function(e,t){return e=this.get(e),e&&t?-1!==(" "+e.className+" ").indexOf(" "+t+" "):!1},toggleClass:function(e,n,r){r=r===t?!this.hasClass(e,n):r,this.hasClass(e,n)!==r&&(r?this.addClass(e,n):this.removeClass(e,n))},show:function(e){return this.setStyle(e,"display","block")},hide:function(e){return this.setStyle(e,"display","none")},isHidden:function(e){return e=this.get(e),!e||"none"==e.style.display||"none"==this.getStyle(e,"display")},uniqueId:function(e){return(e?e:"mce_")+this.counter++},setHTML:function(e,t){var n=t
his;return n.run(e,function(e){if(v){for(;e.firstChild;)e.removeChild(e.firstChild);try{e.innerHTML="<br />"+t,e.removeChild(e.firstChild)}catch(r){var i=n.create("div");i.innerHTML="<br />"+t,d(p(i.childNodes),function(t,n){n&&e.canHaveHTML&&e.appendChild(t)})}}else e.innerHTML=t;return t})},getOuterHTML:function(e){var t,n=this;return(e=n.get(e))?1===e.nodeType&&n.hasOuterHTML?e.outerHTML:(t=(e.ownerDocument||n.doc).createElement("body"),t.appendChild(e.cloneNode(!0)),t.innerHTML):null},setOuterHTML:function(e,t,n){var r=this;return r.run(e,function(e){function i(){var i,o;for(o=n.createElement("body"),o.innerHTML=t,i=o.lastChild;i;)r.insertAfter(i.cloneNode(!0),e),i=i.previousSibling;r.remove(e)}if(1==e.nodeType)if(n=n||e.ownerDocument||r.doc,v)try{1==e.nodeType&&r.hasOuterHTML?e.outerHTML=t:i()}catch(o){i()}else i()})},decode:a.decode,encode:a.encodeAllRaw,insertAfter:function(e,t){retu
rn t=this.get(t),this.run(e,function(e){var n,r;return n=t.parentNode,r=t.nextSibling,r?n.insertBefore(e,r):n.appendChild(e),e})},replace:function(e,t,n){var r=this;return r.run(t,function(t){return f(t,"array")&&(e=e.cloneNode(!0)),n&&d(p(t.childNodes),function(t){e.appendChild(t)}),t.parentNode.replaceChild(e,t)})},rename:function(e,t){var n=this,r;return e.nodeName!=t.toUpperCase()&&(r=n.create(t),d(n.getAttribs(e),function(t){n.setAttrib(r,t.nodeName,n.getAttrib(e,t.nodeName))}),n.replace(r,e,1)),r||e},findCommonAncestor:function(e,t){for(var n=e,r;n;){for(r=t;r&&n!=r;)r=r.parentNode;if(n==r)break;n=n.parentNode}return!n&&e.ownerDocument?e.ownerDocument.documentElement:n},toHex:function(e){return this.styles.toHex(l.trim(e))},run:function(e,t,n){var r=this,i;return"string"==typeof e&&(e=r.get(e)),e?(n=n||this,e.nodeType||!e.length&&0!==e.length?t.call(n,e):(i=[],d(e,function(e,o){e&&("string
"==typeof e&&(e=r.get(e)),i.push(t.call(n,e,o)))}),i)):!1},getAttribs:function(e){var t;if(e=this.get(e),!e)return[];if(v){if(t=[],"OBJECT"==e.nodeName)return e.attributes;"OPTION"===e.nodeName&&this.getAttrib(e,"selected")&&t.push({specified:1,nodeName:"selected"});var n=/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi;return e.cloneNode(!1).outerHTML.replace(n,"").replace(/[\w:\-]+/gi,function(e){t.push({specified:1,nodeName:e})}),t}return e.attributes},isEmpty:function(e,t){var n=this,r,o,a,s,l,c=0;if(e=e.firstChild){s=new i(e,e.parentNode),t=t||n.schema?n.schema.getNonEmptyElements():null;do{if(a=e.nodeType,1===a){if(e.getAttribute("data-mce-bogus"))continue;if(l=e.nodeName.toLowerCase(),t&&t[l]){if("br"===l){c++;continue}return!1}for(o=n.getAttribs(e),r=o.length;r--;)if(l=o[r].nodeName,"name"===l||"data-mce-bookmark"===l)retu
rn!1}if(8==a)return!1;if(3===a&&!b.test(e.nodeValue))return!1}while(e=s.next())}return 1>=c},createRng:function(){var e=this.doc;return e.createRange?e.createRange():new o(this)},nodeIndex:function(e,t){var n=0,r,i;if(e)for(r=e.nodeType,e=e.previousSibling;e;e=e.previousSibling)i=e.nodeType,(!t||3!=i||i!=r&&e.nodeValue.length)&&(n++,r=i);return n},split:function(e,t,n){function r(e){function t(e){var t=e.previousSibling&&"SPAN"==e.previousSibling.nodeName,n=e.nextSibling&&"SPAN"==e.nextSibling.nodeName;return t&&n}var n,o=e.childNodes,a=e.nodeType;if(1!=a||"bookmark"!=e.getAttribute("data-mce-type")){for(n=o.length-1;n>=0;n--)r(o[n]);if(9!=a){if(3==a&&e.nodeValue.length>0){var s=m(e.nodeValue).length;if(!i.isBlock(e.parentNode)||s>0||0===s&&t(e))return}else if(1==a&&(o=e.childNodes,1==o.length&&o[0]&&1==o[0].nodeType&&"bookmark"
;==o[0].getAttribute("data-mce-type")&&e.parentNode.insertBefore(o[0],e),o.length||/^(br|hr|input|img)$/i.test(e.nodeName)))return;i.remove(e)}return e}}var i=this,o=i.createRng(),a,s,l;return e&&t?(o.setStart(e.parentNode,i.nodeIndex(e)),o.setEnd(t.parentNode,i.nodeIndex(t)),a=o.extractContents(),o=i.createRng(),o.setStart(t.parentNode,i.nodeIndex(t)+1),o.setEnd(e.parentNode,i.nodeIndex(e)+1),s=o.extractContents(),l=e.parentNode,l.insertBefore(r(a),e),n?l.replaceChild(n,t):l.insertBefore(t,e),l.insertBefore(r(s),e),i.remove(e),n||t):void 0},bind:function(e,t,n,r){var i=this;if(l.isArray(e)){for(var o=e.length;o--;)e[o]=i.bind(e[o],t,n,r);return e}return!i.settings.collect||e!==i.doc&&e!==i.win||i.boundEvents.push([e,t,n,r]),i.events.bind(e,t,n,r||i)},unbind:function(e,t,n){var r=this,i;if(l.isArray(e)){for(i=e.length;i--;)e[i]=r.unbind(e[i],t,n);return e}if(r.boundEvents&&(e===r.doc||e===r.win))for(i=r.boundEvents.length;i--;){var o=r.bound
Events[i];e!=o[0]||t&&t!=o[1]||n&&n!=o[2]||this.events.unbind(o[0],o[1],o[2])}return this.events.unbind(e,t,n)},fire:function(e,t,n){return this.events.fire(e,t,n)},getContentEditable:function(e){var t;return e&&1==e.nodeType?(t=e.getAttribute("data-mce-contenteditable"),t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null):null},getContentEditableParent:function(e){for(var t=this.getRoot(),n=null;e&&e!==t&&(n=this.getContentEditable(e),null===n);e=e.parentNode);return n
-},destroy:function(){var t=this;if(t.boundEvents){for(var n=t.boundEvents.length;n--;){var r=t.boundEvents[n];this.events.unbind(r[0],r[1],r[2])}t.boundEvents=null}e.setDocument&&e.setDocument(),t.win=t.doc=t.root=t.events=t.frag=null},isChildOf:function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},dumpRng:function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset},_findSib:function(e,t,n){var r=this,i=t;if(e)for("string"==typeof i&&(i=function(e){return r.is(e,t)}),e=e[n];e;e=e[n])if(i(e))return e;return null}},u.DOM=new u(document),u}),r(b,[y,p],function(e,t){function n(){function e(e,t){function n(){o.remove(s),a&&(a.onreadystatechange=a.onload=a=null),t()}function i(){"undefined"!=typeof console&&console.log&&console.log("Failed to load: "+e)}var o=r,a,s
;s=o.uniqueId(),a=document.createElement("script"),a.id=s,a.type="text/javascript",a.src=e,"onreadystatechange"in a?a.onreadystatechange=function(){/loaded|complete/.test(a.readyState)&&n()}:a.onload=n,a.onerror=i,(document.getElementsByTagName("head")[0]||document.body).appendChild(a)}var t=0,n=1,a=2,s={},l=[],c={},u=[],d=0,f;this.isDone=function(e){return s[e]==a},this.markDone=function(e){s[e]=a},this.add=this.load=function(e,n,r){var i=s[e];i==f&&(l.push(e),s[e]=t),n&&(c[e]||(c[e]=[]),c[e].push({func:n,scope:r||this}))},this.loadQueue=function(e,t){this.loadScripts(l,e,t)},this.loadScripts=function(t,r,l){function p(e){i(c[e],function(e){e.func.call(e.scope)}),c[e]=f}var m;u.push({func:r,scope:l||this}),(m=function(){var r=o(t);t.length=0,i(r,function(t){return s[t]==a?void p(t):void(s[t]!=n&&(s[t]=n,d++,e(t,function(){s[t]=a,d--,p(t),m()})))}),d||(i(u,function(e){e.func.call(e.scope)}),u.length=0)})()}}var
r=e.DOM,i=t.each,o=t.grep;return n.ScriptLoader=new n,n}),r(C,[b,p],function(e,n){function r(){var e=this;e.items=[],e.urls={},e.lookup={}}var i=n.each;return r.prototype={get:function(e){return this.lookup[e]?this.lookup[e].instance:t},dependencies:function(e){var t;return this.lookup[e]&&(t=this.lookup[e].dependencies),t||[]},requireLangPack:function(t,n){var i=r.language;if(i&&r.languageLoad!==!1){if(n)if(n=","+n+",",-1!=n.indexOf(","+i.substr(0,2)+","))i=i.substr(0,2);else if(-1==n.indexOf(","+i+","))return;e.ScriptLoader.add(this.urls[t]+"/langs/"+i+".js")}},add:function(e,t,n){return this.items.push(t),this.lookup[e]={instance:t,dependencies:n},t},createUrl:function(e,t){return"object"==typeof t?t:{prefix:e.prefix,resource:t,suffix:e.suffix}},addComponents:function(t,n){var r=this.urls[t];i(n,function(t){e.ScriptLoader.add(r+"/"+t)})},load:function(n,o,a,s){funct
ion l(){var r=c.dependencies(n);i(r,function(e){var n=c.createUrl(o,e);c.load(n.resource,n,t,t)}),a&&a.call(s?s:e)}var c=this,u=o;c.urls[n]||("object"==typeof o&&(u=o.prefix+o.resource+o.suffix),0!==u.indexOf("/")&&-1==u.indexOf("://")&&(u=r.baseURL+"/"+u),c.urls[n]=u.substring(0,u.lastIndexOf("/")),c.lookup[n]?l():e.ScriptLoader.add(u,l,s))}},r.PluginManager=new r,r.ThemeManager=new r,r}),r(x,[],function(){function e(e,t,n){var r,i,o=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[o])return e[o];if(e!==t){if(r=e[a])return r;for(i=e.parent;i&&i!==t;i=i.parent)if(r=i[a])return r}}function t(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}var n=/^[ \t\r\n]*$/,r={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};return t.protot
ype={replace:function(e){var t=this;return e.parent&&e.remove(),t.insert(e,t),t.remove(),t},attr:function(e,t){var n=this,r,i,o;if("string"!=typeof e){for(i in e)n.attr(i,e[i]);return n}if(r=n.attributes){if(t!==o){if(null===t){if(e in r.map)for(delete r.map[e],i=r.length;i--;)if(r[i].name===e)return r=r.splice(i,1),n;return n}if(e in r.map){for(i=r.length;i--;)if(r[i].name===e){r[i].value=t;break}}else r.push({name:e,value:t});return r.map[e]=t,n}return r.map[e]}},clone:function(){var e=this,n=new t(e.name,e.type),r,i,o,a,s;if(o=e.attributes){for(s=[],s.map={},r=0,i=o.length;i>r;r++)a=o[r],"id"!==a.name&&(s[s.length]={name:a.name,value:a.value},s.map[a.name]=a.value);n.attributes=s}return n.value=e.value,n.shortEnded=e.shortEnded,n},wrap:function(e){var t=this;return t.parent.insert(e,t),e.append(t),t},unwrap:function(){var e=this,t,n;for(t=e.firstChild;t;)n=t.next,e.insert(t,e,!0),t=n;e.remove()},remove:function(){var e=this,t=e.parent,n=e.ne
xt,r=e.prev;return t&&(t.firstChild===e?(t.firstChild=n,n&&(n.prev=null)):r.next=n,t.lastChild===e?(t.lastChild=r,r&&(r.next=null)):n.prev=r,e.parent=e.next=e.prev=null),e},append:function(e){var t=this,n;return e.parent&&e.remove(),n=t.lastChild,n?(n.next=e,e.prev=n,t.lastChild=e):t.lastChild=t.firstChild=e,e.parent=t,e},insert:function(e,t,n){var r;return e.parent&&e.remove(),r=t.parent||this,n?(t===r.firstChild?r.firstChild=e:t.prev.next=e,e.prev=t.prev,e.next=t,t.prev=e):(t===r.lastChild?r.lastChild=e:t.next.prev=e,e.next=t.next,e.prev=t,t.next=e),e.parent=r,e},getAll:function(t){var n=this,r,i=[];for(r=n.firstChild;r;r=e(r,n))r.name===t&&i.push(r);return i},empty:function(){var t=this,n,r,i;if(t.firstChild){for(n=[],i=t.firstChild;i;i=e(i,t))n.push(i);for(r=n.length;r--;)i=n[r],i.parent=i.firstChild=i.lastChild=i.next=i.prev=null}return t.firstChild=t.lastChild=null,t},isEmpty:function(t){var r=this,i=r.firstChild,o,a;if(i)do{if(1
===i.type){if(i.attributes.map["data-mce-bogus"])continue;if(t[i.name])return!1;for(o=i.attributes.length;o--;)if(a=i.attributes[o].name,"name"===a||0===a.indexOf("data-mce-"))return!1}if(8===i.type)return!1;if(3===i.type&&!n.test(i.value))return!1}while(i=e(i,r));return!0},walk:function(t){return e(this,null,t)}},t.create=function(e,n){var i,o;if(i=new t(e,r[e]||1),n)for(o in n)i.attr(o,n[o]);return i},t}),r(w,[p],function(e){function t(e,t){return e?e.split(t||" "):[]}function n(e){function n(e,n,r){function i(e){var t={},n,r;for(n=0,r=e.length;r>n;n++)t[e[n]]={};return t}var a,l,c,u=arguments;for(r=r||[],n=n||"","string"==typeof r&&(r=t(r)),l=3;l<u.length;l++)"string"==typeof u[l]&&(u[l]=t(u[l])),r.push.apply(r,u[l]);for(e=t(e),a=e.length;a--;)c=[].concat(s,t(n)),o[e[a]]={attributes:i(c),attributesOrder:c,children:i(r)}}function r(e,n){var r,i,a,s;for(e=t(e),r=e.length,n=t(n);r--;)
for(i=o[e[r]],a=0,s=n.length;s>a;a++)i.attributes[n[a]]={},i.attributesOrder.push(n[a])}var o={},s,l,c,u,d,f;return i[e]?i[e]:(s=t("id accesskey class dir lang style tabindex title"),l=t("address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul"),c=t("a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment"),"html4"!=e&&(s.push.apply(s,t("contenteditable contextmenu draggable dropzone hidden spellcheck translate")),l.push.apply(l,t("article aside details dialog figure header footer hgroup section nav")),c.push.apply(c,t("audio canvas command datalist mark meter output progress time wbr video ruby bdi keygen"))),"html5-strict"!=e&&(s.push("xml:lang"),f=t("acronym applet basefont big font strike tt"),c.push.apply(c,f)
,a(f,function(e){n(e,"",c)}),d=t("center dir isindex noframes"),l.push.apply(l,d),u=[].concat(l,c),a(d,function(e){n(e,"",u)})),u=u||[].concat(l,c),n("html","manifest","head body"),n("head","","base command link meta noscript script style title"),n("title hr noscript br"),n("base","href target"),n("link","href rel media hreflang type sizes hreflang"),n("meta","name http-equiv content charset"),n("style","media type scoped"),n("script","src async defer type charset"),n("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",u),n("address dt dd div caption","",u),n("h1 h2 h3 h4 h5 h6 pre p abbr code var samp k
bd sub sup i b u bdo span legend em strong small s cite dfn","",c),n("blockquote","cite",u),n("ol","reversed start type","li"),n("ul","","li"),n("li","value",u),n("dl","","dt dd"),n("a","href target rel media hreflang type",c),n("q","cite",c),n("ins del","cite datetime",u),n("img","src alt usemap ismap width height"),n("iframe","src name width height",u),n("embed","src type width height"),n("object","data type typemustmatch name usemap form width height",u,"param"),n("param","name value"),n("map","name",u,"area"),n("area","alt coords shape href target rel media hreflang type"),n("table","border","cap
tion colgroup thead tfoot tbody tr"+("html4"==e?" col":"")),n("colgroup","span","col"),n("col","span"),n("tbody thead tfoot","","tr"),n("tr","","td th"),n("td","colspan rowspan headers",u),n("th","colspan rowspan headers scope abbr",u),n("form","accept-charset action autocomplete enctype method name novalidate target",u),n("fieldset","disabled form name",u,"legend"),n("label","form for",c),n("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),n("button","disabled form formaction formenctype formmethod formnovalidate formtarget
name type value","html4"==e?u:c),n("select","disabled form multiple name required size","option optgroup"),n("optgroup","disabled label","option"),n("option","disabled label selected value"),n("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),n("menu","type label",u,"li"),n("noscript","",u),"html4"!=e&&(n("wbr"),n("ruby","",c,"rt rp"),n("figcaption","",u),n("mark rt rp summary bdi","",c),n("canvas","width height",u),n("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",u,"track source"),n("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume&q
uot;,u,"track source"),n("source","src type media"),n("track","kind src srclang label default"),n("datalist","",c,"option"),n("article section nav aside header footer","",u),n("hgroup","","h1 h2 h3 h4 h5 h6"),n("figure","",u,"figcaption"),n("time","datetime",c),n("dialog","open",u),n("command","type label icon disabled checked radiogroup command"),n("output","for form name",c),n("progress","value max",c),n("meter","value min max low high optimum",c),n("details","open",u,"summary"),n("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!=e&&(r("script","language xml:space"),r("style","xm
l:space"),r("object","declare classid code codebase codetype archive standby align border hspace vspace"),r("embed","align name hspace vspace"),r("param","valuetype type"),r("a","charset name rev shape coords"),r("br","clear"),r("applet","codebase archive code object alt name width height align hspace vspace"),r("img","name longdesc align border hspace vspace"),r("iframe","longdesc frameborder marginwidth marginheight scrolling align"),r("font basefont","size color face"),r("input","usemap align"),r("select","onchange"),r("textarea"),r("h1 h2 h3 h4 h5 h6 div p legend caption","align"),r("ul","type compact"),r("li","type"),r("ol dl menu dir","compact"),r("pre",&quo
t;width xml:space"),r("hr","align noshade size width"),r("isindex","prompt"),r("table","summary width frame rules cellspacing cellpadding align bgcolor"),r("col","width align char charoff valign"),r("colgroup","width align char charoff valign"),r("thead","align char charoff valign"),r("tr","align char charoff valign bgcolor"),r("th","axis align char charoff valign nowrap bgcolor width height"),r("form","accept"),r("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),r("tfoot","align char charoff valign"),r("tbody","align char charoff valign"),r("area","nohref"),r("body","background bgcolor text link vlink alink")),"html4"!=e&&(r("input button select textar
ea","autofocus"),r("input textarea","placeholder"),r("a","download"),r("link script img","crossorigin"),r("iframe","sandbox seamless allowfullscreen")),a(t("a form meter progress dfn"),function(e){o[e]&&delete o[e].children[e]}),delete o.caption.children.table,i[e]=o,o)}function r(e,t){var n;return e&&(n={},"string"==typeof e&&(e={"*":e}),a(e,function(e,r){n[r]="map"==t?o(e,/[, ]/):l(e,/[, ]/)})),n}var i={},o=e.makeMap,a=e.each,s=e.extend,l=e.explode,c=e.inArray;return function(e){function u(t,n,r){var a=e[t];return a?a=o(a,/[, ]/,o(a.toUpperCase(),/[, ]/)):(a=i[t],a||(a=o(n," ",o(n.toUpperCase()," ")),a=s(a,r),i[t]=a)),a}function d(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")}function f(e){var n,r,i,a,s,l,u,f,p,m,h,g,v,b,x,w,_,N,E,k=/^([#+\-])?([^\[!\/]+)(?:\/([^\
[!]+))?(?:(!?)\[([^\]]+)\])?$/,S=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,T=/[*?+]/;if(e)for(e=t(e,","),y["@"]&&(w=y["@"].attributes,_=y["@"].attributesOrder),n=0,r=e.length;r>n;n++)if(s=k.exec(e[n])){if(b=s[1],p=s[2],x=s[3],f=s[5],g={},v=[],l={attributes:g,attributesOrder:v},"#"===b&&(l.paddEmpty=!0),"-"===b&&(l.removeEmpty=!0),"!"===s[4]&&(l.removeEmptyAttrs=!0),w){for(N in w)g[N]=w[N];v.push.apply(v,_)}if(f)for(f=t(f,"|"),i=0,a=f.length;a>i;i++)if(s=S.exec(f[i])){if(u={},h=s[1],m=s[2].replace(/::/g,":"),b=s[3],E=s[4],"!"===h&&(l.attributesRequired=l.attributesRequired||[],l.attributesRequired.push(m),u.required=!0),"-"===h){delete g[m],v.splice(c(v,m),1);continue}b&&("="===b&&(l.attributesDefault=l.attributesDefault||[],l.attributesDefault.push({name:m,value:E}),u.defaultValue=E),":&
quot;===b&&(l.attributesForced=l.attributesForced||[],l.attributesForced.push({name:m,value:E}),u.forcedValue=E),"<"===b&&(u.validValues=o(E,"?"))),T.test(m)?(l.attributePatterns=l.attributePatterns||[],u.pattern=d(m),l.attributePatterns.push(u)):(g[m]||v.push(m),g[m]=u)}w||"@"!=p||(w=g,_=v),x&&(l.outputName=p,y[x]=l),T.test(p)?(l.pattern=d(p),C.push(l)):y[p]=l}}function p(e){y={},C=[],f(e),a(_,function(e,t){b[t]=e.children})}function m(e){var n=/^(~)?(.+)$/;e&&(i.text_block_elements=i.block_elements=null,a(t(e,","),function(e){var t=n.exec(e),r="~"===t[1],i=r?"span":"div",o=t[2];if(b[o]=b[i],L[o]=i,r||(R[o.toUpperCase()]={},R[o]={}),!y[o]){var l=y[i];l=s({},l),delete l.removeEmptyAttrs,delete l.removeEmpty,y[o]=l}a(b,function(e,t){e[i]&&(b[t]=e=s({},b[t]),e[o]=e[i])})}))}function h(e){var n=/^([+\-]?)(\w+)\[([^\]]+)\]$/;e&&a(t(e,","),function(e){var r=n
.exec(e),i,o;r&&(o=r[1],i=o?b[r[2]]:b[r[2]]={"#comment":{}},i=b[r[2]],a(t(r[3],"|"),function(e){"-"===o?(b[r[2]]=i=s({},b[r[2]]),delete i[e]):i[e]={}}))})}function g(e){var t=y[e],n;if(t)return t;for(n=C.length;n--;)if(t=C[n],t.pattern.test(e))return t}var v=this,y={},b={},C=[],x,w,_,N,E,k,S,T,R,A,B,D,L={},M={};e=e||{},_=n(e.schema),e.verify_html===!1&&(e.valid_elements="*[*]"),x=r(e.valid_styles),w=r(e.invalid_styles,"map"),T=r(e.valid_classes,"map"),N=u("whitespace_elements","pre script noscript style textarea video audio iframe object"),E=u("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),k=u("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),S=u("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize nos
hade nowrap readonly selected autoplay loop controls"),A=u("non_empty_elements","td th iframe video audio object script",k),B=u("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside nav figure"),R=u("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup",B),D=u("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),a((e.special||"script noscript style textarea").split(" "),function(e){M[e]=new RegExp("</"+e+"[^>]*>","gi")}),e.valid_elements?p(e.valid_elements):(a(_,function(e,t){y[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},b[t]=e.children}),"html5"!=e.schema&&a(t("strong/b em/i"),function(e){e
=t(e,"/"),y[e[1]].outputName=e[0]}),y.img.attributesDefault=[{name:"alt",value:""}],a(t("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(e){y[e]&&(y[e].removeEmpty=!0)}),a(t("p h1 h2 h3 h4 h5 h6 th td pre div address caption"),function(e){y[e].paddEmpty=!0}),a(t("span"),function(e){y[e].removeEmptyAttrs=!0})),m(e.custom_elements),h(e.valid_children),f(e.extended_valid_elements),h("+ol[ul|ol],+ul[ul|ol]"),e.invalid_elements&&a(l(e.invalid_elements),function(e){y[e]&&delete y[e]}),g("span")||f("span[!data-mce-type|*]"),v.children=b,v.getValidStyles=function(){return x},v.getInvalidStyles=function(){return w},v.getValidClasses=function(){return T},v.getBoolAttrs=function(){return S},v.getBlockElements=function(){return R},v.getTextBlockElements=function(){return B},v.getTextInlineElements=function(){return D},v.getShortEndedElements=function(){r
eturn k},v.getSelfClosingElements=function(){return E},v.getNonEmptyElements=function(){return A},v.getWhiteSpaceElements=function(){return N},v.getSpecialElements=function(){return M},v.isValidChild=function(e,t){var n=b[e];return!(!n||!n[t])},v.isValid=function(e,t){var n,r,i=g(e);if(i){if(!t)return!0;if(i.attributes[t])return!0;if(n=i.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(e))return!0}return!1},v.getElementRule=g,v.getCustomElements=function(){return L},v.addValidElements=f,v.setValidElements=p,v.addCustomElements=m,v.addValidChildren=h,v.elements=y}}),r(_,[w,h,p],function(e,t,n){function r(e,t,n){var r=1,i,o,a,s;for(s=e.getShortEndedElements(),a=/<([!?\/])?([A-Za-z0-9\-\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g,a.lastIndex=i=n;o=a.exec(t);){if(i=a.lastIndex,"/"===o[1])r--;else if(!o[1]){if(o[2]in s)continue;r++}if(0===r)break}return i}function i(i,a){function s(){}var l=this;i=i||{},l.sche
ma=a=a||new e,i.fix_self_closing!==!1&&(i.fix_self_closing=!0),o("comment cdata text start end pi doctype".split(" "),function(e){e&&(l[e]=i[e]||s)}),l.parse=function(e){function o(e){var t,n;for(t=p.length;t--&&p[t].name!==e;);if(t>=0){for(n=p.length-1;n>=t;n--)e=p[n],e.valid&&l.end(e.name);p.length=t}}function s(e,t,n,r,o){var a,s,l=/[\s\u0000-\u001F]+/g;if(t=t.toLowerCase(),n=t in x?t:z(n||r||o||""),_&&!y&&0!==t.indexOf("data-")){if(a=T[t],!a&&R){for(s=R.length;s--&&(a=R[s],!a.pattern.test(t)););-1===s&&(a=null)}if(!a)return;if(a.validValues&&!(n in a.validValues))return}if(V[t]&&!i.allow_script_urls){var c=n.replace(l,"");try{c=decodeURIComponent(c)}catch(u){c=unescape(c)}if(U.test(c))return;if(!i.allow_html_data_urls&&q.test(c)&&!/^data:image\//i.test(c))return}m.map[t]=n,m.push({name:t,value:n})}var l=this,c,u=0,d,f,p=[
],m,h,g,v,y,b,C,x,w,_,N,E,k,S,T,R,A,B,D,L,M,H,P,O,I,F=0,z=t.decode,W,V=n.makeMap("src,href,data,background,formaction,poster"),U=/((java|vb)script|mhtml):/i,q=/^data:/i;for(H=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-\\:\\.]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),P=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,C=a.getShortEndedElements(),M=i.self_closing_elements||a.getSelfClosingElements(),x=a.getBoolAttrs(),_=i.validate,b=i.remove_internals,W=i.fix_self_closing,O=a.getSpecialElements();c=H.exec(e);){if(u<c.index&&l.text(z(e.substr(u,c.index-u))),d=c[6])d=d.toLowerCase(),":"===d.charAt(0)&&(d=d.substr(1)),o(d);else if(d=c[7]){if(d=d.toLowerCase(),&quo
t;:"===d.charAt(0)&&(d=d.substr(1)),w=d in C,W&&M[d]&&p.length>0&&p[p.length-1].name===d&&o(d),!_||(N=a.getElementRule(d))){if(E=!0,_&&(T=N.attributes,R=N.attributePatterns),(S=c[8])?(y=-1!==S.indexOf("data-mce-type"),y&&b&&(E=!1),m=[],m.map={},S.replace(P,s)):(m=[],m.map={}),_&&!y){if(A=N.attributesRequired,B=N.attributesDefault,D=N.attributesForced,L=N.removeEmptyAttrs,L&&!m.length&&(E=!1),D)for(h=D.length;h--;)k=D[h],v=k.name,I=k.value,"{$uid}"===I&&(I="mce_"+F++),m.map[v]=I,m.push({name:v,value:I});if(B)for(h=B.length;h--;)k=B[h],v=k.name,v in m.map||(I=k.value,"{$uid}"===I&&(I="mce_"+F++),m.map[v]=I,m.push({name:v,value:I}));if(A){for(h=A.length;h--&&!(A[h]in m.map););-1===h&&(E=!1)}if(k=m.map["data-mce-bogus"]){if("all"===k){u=r(a,e,H.lastIndex),H.lastIndex=u;continue}E=!1}}E&&a
mp;l.start(d,m,w)}else E=!1;if(f=O[d]){f.lastIndex=u=c.index+c[0].length,(c=f.exec(e))?(E&&(g=e.substr(u,c.index-u)),u=c.index+c[0].length):(g=e.substr(u),u=e.length),E&&(g.length>0&&l.text(g,!0),l.end(d)),H.lastIndex=u;continue}w||(S&&S.indexOf("/")==S.length-1?E&&l.end(d):p.push({name:d,valid:E}))}else(d=c[1])?(">"===d.charAt(0)&&(d=" "+d),i.allow_conditional_comments||"[if"!==d.substr(0,3)||(d=" "+d),l.comment(d)):(d=c[2])?l.cdata(d):(d=c[3])?l.doctype(d):(d=c[4])&&l.pi(d,c[5]);u=c.index+c[0].length}for(u<e.length&&l.text(z(e.substr(u))),h=p.length-1;h>=0;h--)d=p[h],d.valid&&l.end(d.name)}}var o=n.each;return i.findEndTag=r,i}),r(N,[x,w,_,p],function(e,t,n,r){var i=r.makeMap,o=r.each,a=r.explode,s=r.extend;return function(r,l){function c(t){var n,r,o,a,s,c,d,f,p,m,h,g,v,y;for(h=i("tr,td,th,tbody,thead,tfoot,table"),m=l.getNonEmptyElements
(),g=l.getTextBlockElements(),n=0;n<t.length;n++)if(r=t[n],r.parent&&!r.fixed)if(g[r.name]&&"li"==r.parent.name){for(v=r.next;v&&g[v.name];)v.name="li",v.fixed=!0,r.parent.insert(v,r.parent),v=v.next;r.unwrap(r)}else{for(a=[r],o=r.parent;o&&!l.isValidChild(o.name,r.name)&&!h[o.name];o=o.parent)a.push(o);if(o&&a.length>1){for(a.reverse(),s=c=u.filterNode(a[0].clone()),p=0;p<a.length-1;p++){for(l.isValidChild(c.name,a[p].name)?(d=u.filterNode(a[p].clone()),c.append(d)):d=c,f=a[p].firstChild;f&&f!=a[p+1];)y=f.next,d.append(f),f=y;c=d}s.isEmpty(m)?o.insert(r,a[0],!0):(o.insert(s,a[0],!0),o.insert(r,s)),o=a[0],(o.isEmpty(m)||o.firstChild===o.lastChild&&"br"===o.firstChild.name)&&o.empty().remove()}else if(r.parent){if("li"===r.name){if(v=r.prev,v&&("ul"===v.name||"ul"===v.name)){v.append(r);continue}if(v=r.next,v&&("ul"===v
.name||"ul"===v.name)){v.insert(r,v.firstChild,!0);continue}r.wrap(u.filterNode(new e("ul",1)));continue}l.isValidChild(r.parent.name,"div")&&l.isValidChild("div",r.name)?r.wrap(u.filterNode(new e("div",1))):"style"===r.name||"script"===r.name?r.empty().remove():r.unwrap()}}}var u=this,d={},f=[],p={},m={};r=r||{},r.validate="validate"in r?r.validate:!0,r.root_name=r.root_name||"body",u.schema=l=l||new t,u.filterNode=function(e){var t,n,r;n in d&&(r=p[n],r?r.push(e):p[n]=[e]),t=f.length;for(;t--;)n=f[t].name,n in e.attributes.map&&(r=m[n],r?r.push(e):m[n]=[e]);return e},u.addNodeFilter=function(e,t){o(a(e),function(e){var n=d[e];n||(d[e]=n=[]),n.push(t)})},u.addAttributeFilter=function(e,t){o(a(e),function(e){var n;for(n=0;n<f.length;n++)if(f[n].name===e)return void f[n].callbacks.push(t);f.push({name:e,callbacks:[t]})})},u.parse=function(t,o){function a(){function e(e
){e&&(t=e.firstChild,t&&3==t.type&&(t.value=t.value.replace(R,"")),t=e.lastChild,t&&3==t.type&&(t.value=t.value.replace(D,"")))}var t=y.firstChild,n,i;if(l.isValidChild(y.name,I.toLowerCase())){for(;t;)n=t.next,3==t.type||1==t.type&&"p"!==t.name&&!T[t.name]&&!t.attr("data-mce-type")?i?i.append(t):(i=u(I,1),i.attr(r.forced_root_block_attrs),y.insert(i,t),i.append(t)):(e(i),i=null),t=n;e(i)}}function u(t,n){var r=new e(t,n),i;return t in d&&(i=p[t],i?i.push(r):p[t]=[r]),r}function h(e){var t,n,r;for(t=e.prev;t&&3===t.type;)n=t.value.replace(D,""),n.length>0?(t.value=n,t=t.prev):(r=t.prev,t.remove(),t=r)}function g(e){var t,n={};for(t in e)"li"!==t&&"p"!=t&&(n[t]=e[t]);return n}var v,y,b,C,x,w,_,N,E,k,S,T,R,A=[],B,D,L,M,H,P,O,I;if(o=o||{},p={},m={},T=s(i("script,style,head,html,body,title,meta,param"),l.getBlo
ckElements()),O=l.getNonEmptyElements(),P=l.children,S=r.validate,I="forced_root_block"in o?o.forced_root_block:r.forced_root_block,H=l.getWhiteSpaceElements(),R=/^[ \t\r\n]+/,D=/[ \t\r\n]+$/,L=/[ \t\r\n]+/g,M=/^[ \t\r\n]+$/,v=new n({validate:S,allow_script_urls:r.allow_script_urls,allow_conditional_comments:r.allow_conditional_comments,self_closing_elements:g(l.getSelfClosingElements()),cdata:function(e){b.append(u("#cdata",4)).value=e},text:function(e,t){var n;B||(e=e.replace(L," "),b.lastChild&&T[b.lastChild.name]&&(e=e.replace(R,""))),0!==e.length&&(n=u("#text",3),n.raw=!!t,b.append(n).value=e)},comment:function(e){b.append(u("#comment",8)).value=e},pi:function(e,t){b.append(u(e,7)).value=t,h(b)},doctype:function(e){var t;t=b.append(u("#doctype",10)),t.value=e,h(b)},start:function(e,t,n){var r,i,o,a,s;if(o=S?l.getElementRule(e):{}){for(r=u(o.outputName||e,1),r.attributes=t,r.shortEnded=
n,b.append(r),s=P[b.name],s&&P[r.name]&&!s[r.name]&&A.push(r),i=f.length;i--;)a=f[i].name,a in t.map&&(E=m[a],E?E.push(r):m[a]=[r]);T[e]&&h(r),n||(b=r),!B&&H[e]&&(B=!0)}},end:function(t){var n,r,i,o,a;if(r=S?l.getElementRule(t):{}){if(T[t]&&!B){if(n=b.firstChild,n&&3===n.type)if(i=n.value.replace(R,""),i.length>0)n.value=i,n=n.next;else for(o=n.next,n.remove(),n=o;n&&3===n.type;)i=n.value,o=n.next,(0===i.length||M.test(i))&&(n.remove(),n=o),n=o;if(n=b.lastChild,n&&3===n.type)if(i=n.value.replace(D,""),i.length>0)n.value=i,n=n.prev;else for(o=n.prev,n.remove(),n=o;n&&3===n.type;)i=n.value,o=n.prev,(0===i.length||M.test(i))&&(n.remove(),n=o),n=o}if(B&&H[t]&&(B=!1),(r.removeEmpty||r.paddEmpty)&&b.isEmpty(O))if(r.paddEmpty)b.empty().append(new e("#text","3")).value="\xa0";else if(!b.attributes.map.
name&&!b.attributes.map.id)return a=b.parent,b.unwrap(),void(b=a);b=b.parent}}},l),y=b=new e(o.context||r.root_name,11),v.parse(t),S&&A.length&&(o.context?o.invalid=!0:c(A)),I&&("body"==y.name||o.isRootContent)&&a(),!o.invalid){for(k in p){for(E=d[k],C=p[k],_=C.length;_--;)C[_].parent||C.splice(_,1);for(x=0,w=E.length;w>x;x++)E[x](C,k,o)}for(x=0,w=f.length;w>x;x++)if(E=f[x],E.name in m){for(C=m[E.name],_=C.length;_--;)C[_].parent||C.splice(_,1);for(_=0,N=E.callbacks.length;N>_;_++)E.callbacks[_](C,E.name,o)}}return y},r.remove_trailing_brs&&u.addNodeFilter("br",function(t){var n,r=t.length,i,o=s({},l.getBlockElements()),a=l.getNonEmptyElements(),c,u,d,f,p,m;for(o.body=1,n=0;r>n;n++)if(i=t[n],c=i.parent,o[i.parent.name]&&i===c.lastChild){for(d=i.prev;d;){if(f=d.name,"span"!==f||"bookmark"!==d.attr("data-mce-type")){if("br"!==f)break;if("br"===f){i=
null;break}}d=d.prev}i&&(i.remove(),c.isEmpty(a)&&(p=l.getElementRule(c.name),p&&(p.removeEmpty?c.remove():p.paddEmpty&&(c.empty().append(new e("#text",3)).value="\xa0"))))}else{for(u=i;c&&c.firstChild===u&&c.lastChild===u&&(u=c,!o[c.name]);)c=c.parent;u===c&&(m=new e("#text",3),m.value="\xa0",i.replace(m))}}),r.allow_html_in_named_anchor||u.addAttributeFilter("id,name",function(e){for(var t=e.length,n,r,i,o;t--;)if(o=e[t],"a"===o.name&&o.firstChild&&!o.attr("href")){i=o.parent,n=o.lastChild;do r=n.prev,i.insert(n,o),n=r;while(n)}}),r.validate&&l.getValidClasses()&&u.addAttributeFilter("class",function(e){for(var t=e.length,n,r,i,o,a,s=l.getValidClasses(),c,u;t--;){for(n=e[t],r=n.attr("class").split(" "),a="",i=0;i<r.length;i++)o=r[i],u=!1,c=s["*"],c&&c[o]&
;&(u=!0),c=s[n.name],u||!c||c[o]||(u=!0),u&&(a&&(a+=" "),a+=o);a.length||(a=null),n.attr("class",a)}})}}),r(E,[h,p],function(e,t){var n=t.makeMap;return function(t){var r=[],i,o,a,s,l;return t=t||{},i=t.indent,o=n(t.indent_before||""),a=n(t.indent_after||""),s=e.getEncodeFunc(t.entity_encoding||"raw",t.entities),l="html"==t.element_format,{start:function(e,t,n){var c,u,d,f;if(i&&o[e]&&r.length>0&&(f=r[r.length-1],f.length>0&&"\n"!==f&&r.push("\n")),r.push("<",e),t)for(c=0,u=t.length;u>c;c++)d=t[c],r.push(" ",d.name,'="',s(d.value,!0),'"');r[r.length]=!n||l?">":" />",n&&i&&a[e]&&r.length>0&&(f=r[r.length-1],f.length>0&&"\n"!==f&&r.push("\n"))},end:function(e){var t;r.push("</",e,">"
;),i&&a[e]&&r.length>0&&(t=r[r.length-1],t.length>0&&"\n"!==t&&r.push("\n"))},text:function(e,t){e.length>0&&(r[r.length]=t?e:s(e))},cdata:function(e){r.push("<![CDATA[",e,"]]>")},comment:function(e){r.push("<!--",e,"-->")},pi:function(e,t){t?r.push("<?",e," ",t,"?>"):r.push("<?",e,"?>"),i&&r.push("\n")},doctype:function(e){r.push("<!DOCTYPE",e,">",i?"\n":"")},reset:function(){r.length=0},getContent:function(){return r.join("").replace(/\n$/,"")}}}}),r(k,[E,w],function(e,t){return function(n,r){var i=this,o=new e(n);n=n||{},n.validate="validate"in n?n.validate:!0,i.schema=r=r||new t,i.writer=o,i.serialize=function(e){function t(e){var n=i[e.type],s,l,c,u,d,f,p,m,h;if(n)n(e);else{if(s=e.name,l=e.shortEnd
ed,c=e.attributes,a&&c&&c.length>1){for(f=[],f.map={},h=r.getElementRule(e.name),p=0,m=h.attributesOrder.length;m>p;p++)u=h.attributesOrder[p],u in c.map&&(d=c.map[u],f.map[u]=d,f.push({name:u,value:d}));for(p=0,m=c.length;m>p;p++)u=c[p].name,u in f.map||(d=c.map[u],f.map[u]=d,f.push({name:u,value:d}));c=f}if(o.start(e.name,c,l),!l){if(e=e.firstChild)do t(e);while(e=e.next);o.end(s)}}}var i,a;return a=n.validate,i={3:function(e){o.text(e.value,e.raw)},8:function(e){o.comment(e.value)},7:function(e){o.pi(e.name,e.value)},10:function(e){o.doctype(e.value)},4:function(e){o.cdata(e.value)},11:function(e){if(e=e.firstChild)do t(e);while(e=e.next)}},o.reset(),1!=e.type||n.inner?i[11](e):t(e),o.getContent()}}}),r(S,[y,N,h,k,x,w,g,p],function(e,t,n,r,i,o,a,s){var l=s.each,c=s.trim,u=e.DOM;return function(e,i){var s,d,f;return i&&(s=i.dom,d=i.schema),s=s||u,d=d||new o(e),e.entity_encoding=e.entity_encoding||"named",e.remove_trailing_brs=&quo
t;remove_trailing_brs"in e?e.remove_trailing_brs:!0,f=new t(e,d),f.addAttributeFilter("data-mce-tabindex",function(e,t){for(var n=e.length,r;n--;)r=e[n],r.attr("tabindex",r.attributes.map["data-mce-tabindex"]),r.attr(t,null)}),f.addAttributeFilter("src,href,style",function(t,n){for(var r=t.length,i,o,a="data-mce-"+n,l=e.url_converter,c=e.url_converter_scope,u;r--;)i=t[r],o=i.attributes.map[a],o!==u?(i.attr(n,o.length>0?o:null),i.attr(a,null)):(o=i.attributes.map[n],"style"===n?o=s.serializeStyle(s.parseStyle(o),i.name):l&&(o=l.call(c,o,n,i.name)),i.attr(n,o.length>0?o:null))}),f.addAttributeFilter("class",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.attr("class"),r&&(r=n.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),n.attr("class",r.length>0?r:null))}),f.addAttributeFilter("data-mce-type",function(e,t,n){for(var r=e.len
gth,i;r--;)i=e[r],"bookmark"!==i.attributes.map["data-mce-type"]||n.cleanup||i.remove()}),f.addNodeFilter("noscript",function(e){for(var t=e.length,r;t--;)r=e[t].firstChild,r&&(r.value=n.decode(r.value))}),f.addNodeFilter("script,style",function(e,t){function n(e){return e.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}for(var r=e.length,i,o,a;r--;)i=e[r],o=i.firstChild?i.firstChild.value:"","script"===t?(a=i.attr("type"),a&&i.attr("type","mce-no/type"==a?null:a.replace(/^mce\-/,"")),o.length>0&&
(i.firstChild.value="// <![CDATA[\n"+n(o)+"\n// ]]>")):o.length>0&&(i.firstChild.value="<!--\n"+n(o)+"\n-->")}),f.addNodeFilter("#comment",function(e){for(var t=e.length,n;t--;)n=e[t],0===n.value.indexOf("[CDATA[")?(n.name="#cdata",n.type=4,n.value=n.value.replace(/^\[CDATA\[|\]\]$/g,"")):0===n.value.indexOf("mce:protected ")&&(n.name="#text",n.type=3,n.raw=!0,n.value=unescape(n.value).substr(14))}),f.addNodeFilter("xml:namespace,input",function(e,t){for(var n=e.length,r;n--;)r=e[n],7===r.type?r.remove():1===r.type&&("input"!==t||"type"in r.attributes.map||r.attr("type","text"))}),e.fix_list_elements&&f.addNodeFilter("ul,ol",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.parent,("ul"===r.name||"ol"===r.name)&&n.prev&&"li"===n.prev
.name&&n.prev.append(n)}),f.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),{schema:d,addNodeFilter:f.addNodeFilter,addAttributeFilter:f.addAttributeFilter,serialize:function(t,n){var i=this,o,u,p,m,h;
-return a.ie&&s.select("script,style,select,map").length>0?(h=t.innerHTML,t=t.cloneNode(!1),s.setHTML(t,h)):t=t.cloneNode(!0),o=t.ownerDocument.implementation,o.createHTMLDocument&&(u=o.createHTMLDocument(""),l("BODY"==t.nodeName?t.childNodes:[t],function(e){u.body.appendChild(u.importNode(e,!0))}),t="BODY"!=t.nodeName?u.body.firstChild:u.body,p=s.doc,s.doc=u),n=n||{},n.format=n.format||"html",n.selection&&(n.forced_root_block=""),n.no_events||(n.node=t,i.onPreProcess(n)),m=new r(e,d),n.content=m.serialize(f.parse(c(n.getInner?t.innerHTML:s.getOuterHTML(t)),n)),n.cleanup||(n.content=n.content.replace(/\uFEFF/g,"")),n.no_events||i.onPostProcess(n),p&&(s.doc=p),n.node=null,n.content},addRules:function(e){d.addValidElements(e)},setRules:function(e){d.setValidElements(e)},onPreProcess:function(e){i&&i.fire("PreProcess",e)},onPostProcess:function(e){i&&i.fire(
"PostProcess",e)}}}}),r(T,[],function(){function e(e){function t(t,n){var r,i=0,o,a,s,l,c,u,d=-1,f;if(r=t.duplicate(),r.collapse(n),f=r.parentElement(),f.ownerDocument===e.dom.doc){for(;"false"===f.contentEditable;)f=f.parentNode;if(!f.hasChildNodes())return{node:f,inside:1};for(s=f.children,o=s.length-1;o>=i;)if(u=Math.floor((i+o)/2),l=s[u],r.moveToElementText(l),d=r.compareEndPoints(n?"StartToStart":"EndToEnd",t),d>0)o=u-1;else{if(!(0>d))return{node:l};i=u+1}if(0>d)for(l?r.collapse(!1):(r.moveToElementText(f),r.collapse(!0),l=f,a=!0),c=0;0!==r.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==r.move("character",1)&&f==r.parentElement();)c++;else for(r.collapse(!0),c=0;0!==r.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==r.move("character",-1)&&f==r.parentElement();)c++;return{node:l,position:d,offset:c,inside:a}}}function n(){
function n(e){var n=t(o,e),r,i,s=0,l,c,u;if(r=n.node,i=n.offset,n.inside&&!r.hasChildNodes())return void a[e?"setStart":"setEnd"](r,0);if(i===c)return void a[e?"setStartBefore":"setEndAfter"](r);if(n.position<0){if(l=n.inside?r.firstChild:r.nextSibling,!l)return void a[e?"setStartAfter":"setEndAfter"](r);if(!i)return void(3==l.nodeType?a[e?"setStart":"setEnd"](l,0):a[e?"setStartBefore":"setEndBefore"](l));for(;l;){if(3==l.nodeType&&(u=l.nodeValue,s+=u.length,s>=i)){r=l,s-=i,s=u.length-s;break}l=l.nextSibling}}else{if(l=r.previousSibling,!l)return a[e?"setStartBefore":"setEndBefore"](r);if(!i)return void(3==r.nodeType?a[e?"setStart":"setEnd"](l,r.nodeValue.length):a[e?"setStartAfter":"setEndAfter"](l));for(;l;){if(3==l.nodeType&&(s+=l.nodeValue.length,s>=i)){r=l,s-=i;break}l=l.previousSibling}}
a[e?"setStart":"setEnd"](r,s)}var o=e.getRng(),a=i.createRng(),s,l,c,u,d;if(s=o.item?o.item(0):o.parentElement(),s.ownerDocument!=i.doc)return a;if(l=e.isCollapsed(),o.item)return a.setStart(s.parentNode,i.nodeIndex(s)),a.setEnd(a.startContainer,a.startOffset+1),a;try{n(!0),l||n()}catch(f){if(-2147024809!=f.number)throw f;d=r.getBookmark(2),c=o.duplicate(),c.collapse(!0),s=c.parentElement(),l||(c=o.duplicate(),c.collapse(!1),u=c.parentElement(),u.innerHTML=u.innerHTML),s.innerHTML=s.innerHTML,r.moveToBookmark(d),o=e.getRng(),n(!0),l||n()}return a}var r=this,i=e.dom,o=!1;this.getBookmark=function(n){function r(e){var t,n,r,o,a=[];for(t=e.parentNode,n=i.getRoot().parentNode;t!=n&&9!==t.nodeType;){for(r=t.children,o=r.length;o--;)if(e===r[o]){a.push(o);break}e=t,t=t.parentNode}return a}function o(e){var n;return n=t(a,e),n?{position:n.position,offset:n.offset,indexes:r(n.node),inside:n.inside}:void 0}var a=e.getRng(),s={};return 2===n&&(a.item?s.star
t={ctrl:!0,indexes:r(a.item(0))}:(s.start=o(!0),e.isCollapsed()||(s.end=o()))),s},this.moveToBookmark=function(e){function t(e){var t,n,r,o;for(t=i.getRoot(),n=e.length-1;n>=0;n--)o=t.children,r=e[n],r<=o.length-1&&(t=o[r]);return t}function n(n){var i=e[n?"start":"end"],a,s,l,c;i&&(a=i.position>0,s=o.createTextRange(),s.moveToElementText(t(i.indexes)),c=i.offset,c!==l?(s.collapse(i.inside||a),s.moveStart("character",a?-c:c)):s.collapse(n),r.setEndPoint(n?"StartToStart":"EndToStart",s),n&&r.collapse(!0))}var r,o=i.doc.body;e.start&&(e.start.ctrl?(r=o.createControlRange(),r.addElement(t(e.start.indexes)),r.select()):(r=o.createTextRange(),n(!0),n(),r.select()))},this.addRange=function(t){function n(e){var t,n,a,d,m;a=i.create("a"),t=e?s:c,n=e?l:u,d=r.duplicate(),(t==f||t==f.documentElement)&&(t=p,n=0),3==t.nodeType?(t.parentNode.insertBefore(a,t),d.moveToElementText(a),d.moveS
tart("character",n),i.remove(a),r.setEndPoint(e?"StartToStart":"EndToEnd",d)):(m=t.childNodes,m.length?(n>=m.length?i.insertAfter(a,m[m.length-1]):t.insertBefore(a,m[n]),d.moveToElementText(a)):t.canHaveHTML&&(t.innerHTML="<span></span>",a=t.firstChild,d.moveToElementText(a),d.collapse(o)),r.setEndPoint(e?"StartToStart":"EndToEnd",d),i.remove(a))}var r,a,s,l,c,u,d,f=e.dom.doc,p=f.body,m,h;if(s=t.startContainer,l=t.startOffset,c=t.endContainer,u=t.endOffset,r=p.createTextRange(),s==c&&1==s.nodeType){if(l==u&&!s.hasChildNodes()){if(s.canHaveHTML)return d=s.previousSibling,d&&!d.hasChildNodes()&&i.isBlock(d)?d.innerHTML="":d=null,s.innerHTML="<span></span><span></span>",r.moveToElementText(s.lastChild),r.select(),i.doc.selection.clear(),s.innerHTML="",void(d&&(d.in
nerHTML=""));l=i.nodeIndex(s),s=s.parentNode}if(l==u-1)try{if(h=s.childNodes[l],a=p.createControlRange(),a.addElement(h),a.select(),m=e.getRng(),m.item&&h===m.item(0))return}catch(g){}}n(!0),n(),r.select()},this.getRangeAt=n}return e}),r(R,[g],function(e){return{BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey},metaKeyPressed:function(t){return e.mac?t.metaKey:t.ctrlKey&&!t.altKey}}}),r(A,[R,p,g],function(e,t,n){return function(r,i){function o(e){var t=i.settings.object_resizing;return t===!1||n.iOS?!1:("string"!=typeof t&&(t="table,img,div"),"false"===e.getAttribute("data-mce-resize")?!1:i.dom.is(e,t))}function a(t){var n,r,o,a,s;n=t.screenX-T,r=t.screenY-R,P=n*k[2]+D,O=r*k[3]+L,P=5>P?5:P,O=5>O?5:O,o="IMG"==w.nodeName&&i.settings.resize_img_proportional!==!1?!e.modifierPressed(t):e.modifie
rPressed(t)||"IMG"==w.nodeName&&k[2]*k[3]!==0,o&&(W(n)>W(r)?(O=V(P*M),P=V(O/M)):(P=V(O/M),O=V(P*M))),C.setStyles(_,{width:P,height:O}),a=k.startPos.x+n,s=k.startPos.y+r,a=a>0?a:0,s=s>0?s:0,C.setStyles(N,{left:a,top:s,display:"block"}),N.innerHTML=P+" × "+O,k[2]<0&&_.clientWidth<=P&&C.setStyle(_,"left",A+(D-P)),k[3]<0&&_.clientHeight<=O&&C.setStyle(_,"top",B+(L-O)),n=U.scrollWidth-q,r=U.scrollHeight-$,n+r!==0&&C.setStyles(N,{left:a-n,top:s-r}),H||(i.fire("ObjectResizeStart",{target:w,width:D,height:L}),H=!0)}function s(){function e(e,t){t&&(w.style[e]||!i.schema.isValid(w.nodeName.toLowerCase(),e)?C.setStyle(w,e,t):C.setAttrib(w,e,t))}H=!1,e("width",P),e("height",O),C.unbind(I,"mousemove",a),C.unbind(I,"mouseup",s),F!=I&&(C.unbind(F,"mousemove",a),C.unbind(F,"mouseup&qu
ot;,s)),C.remove(_),C.remove(N),z&&"TABLE"!=w.nodeName||l(w),i.fire("ObjectResized",{target:w,width:P,height:O}),i.nodeChanged()}function l(e,t,r){var l,u,d,f,p;g(),l=C.getPos(e,U),A=l.x,B=l.y,p=e.getBoundingClientRect(),u=p.width||p.right-p.left,d=p.height||p.bottom-p.top,w!=e&&(h(),w=e,P=O=0),f=i.fire("ObjectSelected",{target:e}),o(e)&&!f.isDefaultPrevented()?x(E,function(e,i){function o(t){T=t.screenX,R=t.screenY,D=w.clientWidth,L=w.clientHeight,M=L/D,k=e,e.startPos=C.getPos(e.elm,U),q=U.scrollWidth,$=U.scrollHeight,_=w.cloneNode(!0),C.addClass(_,"mce-clonedresizable"),C.setAttrib(_,"data-mce-bogus","all"),_.contentEditable=!1,_.unSelectabe=!0,C.setStyles(_,{left:A,top:B,margin:0}),_.removeAttribute("data-mce-selected"),U.appendChild(_),C.bind(I,"mousemove",a),C.bind(I,"mouseup",s),F!=I&&(C.bind(F,"mousemove",a),C.bind(F,"mouseup",s)),N=C.a
dd(U,"div",{"class":"mce-resize-helper","data-mce-bogus":"all"},D+" × "+L)}var l,c;return t?void(i==t&&o(r)):(l=C.get("mceResizeHandle"+i),l?C.show(l):(c=U,l=C.add(c,"div",{id:"mceResizeHandle"+i,"data-mce-bogus":"all","class":"mce-resizehandle",unselectable:!0,style:"cursor:"+i+"-resize; margin:0; padding:0"}),n.ie&&(l.contentEditable=!1)),e.elm||(C.bind(l,"mousedown",function(e){e.stopImmediatePropagation(),e.preventDefault(),o(e)}),e.elm=l),void C.setStyles(l,{left:u*e[0]+A-l.offsetWidth/2,top:d*e[1]+B-l.offsetHeight/2}))}):c(),w.setAttribute("data-mce-selected","1")}function c(){var e,t;g(),w&&w.removeAttribute("data-mce-selected");for(e in E)t=C.get("mceResizeHandle"+e),t&&(C.unbind(t),C.remove(t))}function u(e){function t(e,t){if(e)do if(e
===t)return!0;while(e=e.parentNode)}var n;return x(C.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),n="mousedown"==e.type?e.target:r.getNode(),n=C.getParent(n,z?"table":"table,img,hr"),t(n,U)&&(v(),t(r.getStart(),n)&&t(r.getEnd(),n)&&(!z||n!=r.getStart()&&"IMG"!==r.getStart().nodeName))?void l(n):void c()}function d(e,t,n){e&&e.attachEvent&&e.attachEvent("on"+t,n)}function f(e,t,n){e&&e.detachEvent&&e.detachEvent("on"+t,n)}function p(e){var t=e.srcElement,n,r,o,a,s,c,u;n=t.getBoundingClientRect(),c=S.clientX-n.left,u=S.clientY-n.top;for(r in E)if(o=E[r],a=t.offsetWidth*o[0],s=t.offsetHeight*o[1],W(a-c)<8&&W(s-u)<8){k=o;break}H=!0,i.getDoc().selection.empty(),l(t,r,S)}function m(e){var t=e.srcElement;if(t!=w){if(h(),0===t.id.indexOf("mceResizeHandle"))return
void(e.returnValue=!1);("IMG"==t.nodeName||"TABLE"==t.nodeName)&&(c(),w=t,d(t,"resizestart",p))}}function h(){f(w,"resizestart",p)}function g(){for(var e in E){var t=E[e];t.elm&&(C.unbind(t.elm),delete t.elm)}}function v(){try{i.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}}function y(e){var t;if(z){t=I.body.createControlRange();try{return t.addElement(e),t.select(),!0}catch(n){}}}function b(){w=_=null,z&&(h(),f(U,"controlselect",m))}var C=i.dom,x=t.each,w,_,N,E,k,S,T,R,A,B,D,L,M,H,P,O,I=i.getDoc(),F=document,z=n.ie&&n.ie<11,W=Math.abs,V=Math.round,U=i.getBody(),q,$;E={n:[.5,0,0,-1],e:[1,.5,1,0],s:[.5,1,0,1],w:[0,.5,-1,0],nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};var j=".mce-content-body";return i.contentStyles.push(j+" div.mce-resizehandle {position: absolute;border: 1px solid black;background: #FFF;width: 5px;height: 5px;z-index: 10000}"
+j+" .mce-resizehandle:hover {background: #000}"+j+" img[data-mce-selected], hr[data-mce-selected] {outline: 1px solid black;resize: none}"+j+" .mce-clonedresizable {position: absolute;"+(n.gecko?"":"outline: 1px dashed black;")+"opacity: .5;filter: alpha(opacity=50);z-index: 10000}"+j+" .mce-resize-helper {background-color: #555;background-color: rgba(0,0,0,0.75);border-radius: 3px;border: 1px;color: white;display: none;font-family: sans-serif;font-size: 12px;white-space: nowrap;line-height: 14px;margin: 5px 10px;padding: 5px;position: absolute;z-index: 10001}"),i.on("init",function(){z?(i.on("ObjectResized",function(e){"TABLE"!=e.target.nodeName&&(c(),y(e.target))}),d(U,"controlselect",m),i.on("mousedown",function(e){S=e})):(v(),n.ie>=11&&(i.on("mouseup",function(e){var t=e.target.nodeName;/^(TABLE|IMG|HR)$/.test(t)&&(i.select
ion.select(e.target,"TABLE"==t),i.nodeChanged())}),i.dom.bind(U,"mscontrolselect",function(e){/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"==e.target.tagName&&window.setTimeout(function(){i.selection.select(e.target)},0))}))),i.on("nodechange mousedown mouseup ResizeEditor",u),i.on("keydown keyup",function(e){w&&"TABLE"==w.nodeName&&u(e)}),i.on("hide",c)}),i.on("remove",g),{isResizable:o,showResizeRect:l,hideResizeRect:c,updateResizeRect:u,controlSelect:y,destroy:b}}}),r(B,[p,f],function(e,t){function n(e,t){var n=e.childNodes;return t--,t>n.length-1?t=n.length-1:0>t&&(t=0),n[t]||e}function r(e){this.walk=function(t,r){function o(e){var t;return t=e[0],3===t.nodeType&&t===c&&u>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===f&&e.length>0&&t===d&&3===t.nodeType&&e.spli
ce(e.length-1,1),e}function a(e,t,n){for(var r=[];e&&e!=n;e=e[t])r.push(e);return r}function s(e,t){do{if(e.parentNode==t)return e;e=e.parentNode}while(e)}function l(e,t,n){var i=n?"nextSibling":"previousSibling";for(g=e,v=g.parentNode;g&&g!=t;g=v)v=g.parentNode,y=a(g==e?g:g[i],i),y.length&&(n||y.reverse(),r(o(y)))}var c=t.startContainer,u=t.startOffset,d=t.endContainer,f=t.endOffset,p,m,h,g,v,y,b;if(b=e.select("td.mce-item-selected,th.mce-item-selected"),b.length>0)return void i(b,function(e){r([e])});if(1==c.nodeType&&c.hasChildNodes()&&(c=c.childNodes[u]),1==d.nodeType&&d.hasChildNodes()&&(d=n(d,f)),c==d)return r(o([c]));for(p=e.findCommonAncestor(c,d),g=c;g;g=g.parentNode){if(g===d)return l(c,p,!0);if(g===p)break}for(g=d;g;g=g.parentNode){if(g===c)return l(d,p);if(g===p)break}m=s(c,p)||c,h=s(d,p)||d,l(c,m,!0),y=a(m==c?m:m.nextSibling,"nextSibling",h==d?h.nextSibling:h),y.length&
;&r(o(y)),l(d,h)},this.split=function(e){function t(e,t){return e.splitText(t)}var n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset;return n==i&&3==n.nodeType?r>0&&r<n.nodeValue.length&&(i=t(n,r),n=i.previousSibling,o>r?(o-=r,n=i=t(i,o).previousSibling,o=i.nodeValue.length,r=0):o=0):(3==n.nodeType&&r>0&&r<n.nodeValue.length&&(n=t(n,r),r=0),3==i.nodeType&&o>0&&o<i.nodeValue.length&&(i=t(i,o).previousSibling,o=i.nodeValue.length)),{startContainer:n,startOffset:r,endContainer:i,endOffset:o}},this.normalize=function(n){function r(r){function a(n,r){for(var i=new t(n,e.getParent(n.parentNode,e.isBlock)||f);n=i[r?"prev":"next"]();)if("BR"===n.nodeName)return!0}function s(e,t){return e.previousSibling&&e.previousSibling.nodeName==t}function l(n,r){var a,s,l;if(r=r||c,l=e.getParent(r.parentNode,e.isBlock)||f,n&&"BR"==r.node
Name&&g&&e.isEmpty(l))return c=r.parentNode,u=e.nodeIndex(r),void(i=!0);for(a=new t(r,l);p=a[n?"prev":"next"]();){if("false"===e.getContentEditableParent(p))return;if(3===p.nodeType&&p.nodeValue.length>0)return c=p,u=n?p.nodeValue.length:0,void(i=!0);if(e.isBlock(p)||m[p.nodeName.toLowerCase()])return;s=p}o&&s&&(c=s,i=!0,u=0)}var c,u,d,f=e.getRoot(),p,m,h,g;if(c=n[(r?"start":"end")+"Container"],u=n[(r?"start":"end")+"Offset"],g=1==c.nodeType&&u===c.childNodes.length,m=e.schema.getNonEmptyElements(),h=r,1==c.nodeType&&u>c.childNodes.length-1&&(h=!1),9===c.nodeType&&(c=e.getRoot(),u=0),c===f){if(h&&(p=c.childNodes[u>0?u-1:0],p&&(m[p.nodeName]||"TABLE"==p.nodeName)))return;if(c.hasChildNodes()&&(u=Math.min(!h&&u>0?u-1:u,c.childNodes.length-1),c=c.childNodes[u],u=0,c.hasChil
dNodes()&&!/TABLE/.test(c.nodeName))){p=c,d=new t(c,f);do{if(3===p.nodeType&&p.nodeValue.length>0){u=h?0:p.nodeValue.length,c=p,i=!0;break}if(m[p.nodeName.toLowerCase()]){u=e.nodeIndex(p),c=p.parentNode,"IMG"!=p.nodeName||h||u++,i=!0;break}}while(p=h?d.next():d.prev())}}o&&(3===c.nodeType&&0===u&&l(!0),1===c.nodeType&&(p=c.childNodes[u],p||(p=c.childNodes[u-1]),!p||"BR"!==p.nodeName||s(p,"A")||a(p)||a(p,!0)||l(!0,p))),h&&!o&&3===c.nodeType&&u===c.nodeValue.length&&l(!1),i&&n["set"+(r?"Start":"End")](c,u)}var i,o;return o=n.collapsed,r(!0),o||r(),i&&o&&n.collapse(!0),i}}var i=e.each;return r.compareRanges=function(e,t){if(e&&t){if(!e.item&&!e.duplicate)return e.startContainer==t.startContainer&&e.startOffset==t.startOffset;if(e.item&&t.item&&e.item(0)===t.item(0))return!0;if(e.isE
qual&&t.isEqual&&t.isEqual(e))return!0}return!1},r}),r(D,[g,p],function(e,t){function n(n){var r=n.dom;this.getBookmark=function(e,i){function o(e,n){var i=0;return t.each(r.select(e),function(e,t){e==n&&(i=t)}),i}function a(e){function t(t){var n,r,i,o=t?"start":"end";n=e[o+"Container"],r=e[o+"Offset"],1==n.nodeType&&"TR"==n.nodeName&&(i=n.childNodes,n=i[Math.min(t?r:r-1,i.length-1)],n&&(r=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,r)))}return t(!0),t(),e}function s(){function e(e,t){var n=e[t?"startContainer":"endContainer"],a=e[t?"startOffset":"endOffset"],s=[],l,c,u=0;if(3==n.nodeType){if(i)for(l=n.previousSibling;l&&3==l.nodeType;l=l.previousSibling)a+=l.nodeValue.length;s.push(a)}else c=n.childNodes,a>=c.length&&c.length&&(u=1,a=Math.max(0,c.length-1)),s.push(r.nodeIndex(c[a]
,i)+u);for(;n&&n!=o;n=n.parentNode)s.push(r.nodeIndex(n,i));return s}var t=n.getRng(!0),o=r.getRoot(),a={};return a.start=e(t,!0),n.isCollapsed()||(a.end=e(t)),a}var l,c,u,d,f,p,m="",h;if(2==e)return p=n.getNode(),f=p?p.nodeName:null,"IMG"==f?{name:f,index:o(f,p)}:n.tridentSel?n.tridentSel.getBookmark(e):s();if(e)return{rng:n.getRng()};if(l=n.getRng(),u=r.uniqueId(),d=n.isCollapsed(),h="overflow:hidden;line-height:0px",l.duplicate||l.item){if(l.item)return p=l.item(0),f=p.nodeName,{name:f,index:o(f,p)};c=l.duplicate();try{l.collapse(),l.pasteHTML('<span data-mce-type="bookmark" id="'+u+'_start" style="'+h+'">'+m+"</span>"),d||(c.collapse(!1),l.moveToElementText(c.parentElement()),0===l.compareEndPoints("StartToEnd",c)&&c.move("character",-1),c.pasteHTML('<span data-mce-type="bookmark" id="'+u+'_end" style="'+h+'">'+m+&q
uot;</span>"))}catch(g){return null}}else{if(p=n.getNode(),f=p.nodeName,"IMG"==f)return{name:f,index:o(f,p)};c=a(l.cloneRange()),d||(c.collapse(!1),c.insertNode(r.create("span",{"data-mce-type":"bookmark",id:u+"_end",style:h},m))),l=a(l),l.collapse(!0),l.insertNode(r.create("span",{"data-mce-type":"bookmark",id:u+"_start",style:h},m))}return n.moveToBookmark({id:u,keep:1}),{id:u}},this.moveToBookmark=function(i){function o(e){var t=i[e?"start":"end"],n,r,o,a;if(t){for(o=t[0],r=c,n=t.length-1;n>=1;n--){if(a=r.childNodes,t[n]>a.length-1)return;r=a[t[n]]}3===r.nodeType&&(o=Math.min(t[0],r.nodeValue.length)),1===r.nodeType&&(o=Math.min(t[0],r.childNodes.length)),e?l.setStart(r,o):l.setEnd(r,o)}return!0}function a(n){var o=r.get(i.id+"_"+n),a,s,l,c,m=i.keep;if(o&&(a=o.parentNode,"start"==n?(m?(a=o.firstChild,s=1):s=r.no
deIndex(o),u=d=a,f=p=s):(m?(a=o.firstChild,s=1):s=r.nodeIndex(o),d=a,p=s),!m)){for(c=o.previousSibling,l=o.nextSibling,t.each(t.grep(o.childNodes),function(e){3==e.nodeType&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});o=r.get(i.id+"_"+n);)r.remove(o,1);c&&l&&c.nodeType==l.nodeType&&3==c.nodeType&&!e.opera&&(s=c.nodeValue.length,c.appendData(l.nodeValue),r.remove(l),"start"==n?(u=d=c,f=p=s):(d=c,p=s))}}function s(t){return!r.isBlock(t)||t.innerHTML||e.ie||(t.innerHTML='<br data-mce-bogus="1" />'),t}var l,c,u,d,f,p;if(i)if(i.start){if(l=r.createRng(),c=r.getRoot(),n.tridentSel)return n.tridentSel.moveToBookmark(i);o(!0)&&o()&&n.setRng(l)}else i.id?(a("start"),a("end"),u&&(l=r.createRng(),l.setStart(s(u),f),l.setEnd(s(d),p),n.setRng(l))):i.name?n.select(r.select(i.name)[i.index]):i.rng&&n.setRng(i.rng)}}return n.isBookmarkNode=function(
e){return e&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},n}),r(L,[f,T,A,B,D,g,p],function(e,n,r,i,o,a,s){function l(e,t,i,a){var s=this;s.dom=e,s.win=t,s.serializer=i,s.editor=a,s.bookmarkManager=new o(s),s.controlSelection=new r(s,a),s.win.getSelection||(s.tridentSel=new n(s))}var c=s.each,u=s.trim,d=a.ie;return l.prototype={setCursorLocation:function(e,t){var n=this,r=n.dom.createRng();e?(r.setStart(e,t),r.setEnd(e,t),n.setRng(r),n.collapse(!1)):(n._moveEndPoint(r,n.editor.getBody(),!0),n.setRng(r))},getContent:function(e){var n=this,r=n.getRng(),i=n.dom.create("body"),o=n.getSel(),a,s,l;return e=e||{},a=s="",e.get=!0,e.format=e.format||"html",e.selection=!0,n.editor.fire("BeforeGetContent",e),"text"==e.format?n.isCollapsed()?"":r.text||(o.toString?o.toString():""):(r.cloneContents?(l=r.cloneContents(),l&&i.appendChild(l)):r.item!==t||r.
htmlText!==t?(i.innerHTML="<br>"+(r.item?r.item(0).outerHTML:r.htmlText),i.removeChild(i.firstChild)):i.innerHTML=r.toString(),/^\s/.test(i.innerHTML)&&(a=" "),/\s+$/.test(i.innerHTML)&&(s=" "),e.getInner=!0,e.content=n.isCollapsed()?"":a+n.serializer.serialize(i,e)+s,n.editor.fire("GetContent",e),e.content)},setContent:function(e,t){var n=this,r=n.getRng(),i,o=n.win.document,a,s;if(t=t||{format:"html"},t.set=!0,t.selection=!0,e=t.content=e,t.no_events||n.editor.fire("BeforeSetContent",t),e=t.content,r.insertNode){e+='<span id="__caret">_</span>',r.startContainer==o&&r.endContainer==o?o.body.innerHTML=e:(r.deleteContents(),0===o.body.childNodes.length?o.body.innerHTML=e:r.createContextualFragment?r.insertNode(r.createContextualFragment(e)):(a=o.createDocumentFragment(),s=o.createElement("div"),a.appendChild(s),s.outerHTML=e,r.insertNode(a))),i=n.dom.get
("__caret"),r=o.createRange(),r.setStartBefore(i),r.setEndBefore(i),n.setRng(r),n.dom.remove("__caret");try{n.setRng(r)}catch(l){}}else r.item&&(o.execCommand("Delete",!1,null),r=n.getRng()),/^\s+/.test(e)?(r.pasteHTML('<span id="__mce_tmp">_</span>'+e),n.dom.remove("__mce_tmp")):r.pasteHTML(e);t.no_events||n.editor.fire("SetContent",t)},getStart:function(){var e=this,t=e.getRng(),n,r,i,o;if(t.duplicate||t.item){if(t.item)return t.item(0);for(i=t.duplicate(),i.collapse(1),n=i.parentElement(),n.ownerDocument!==e.dom.doc&&(n=e.dom.getRoot()),r=o=t.parentElement();o=o.parentNode;)if(o==n){n=r;break}return n}return n=t.startContainer,1==n.nodeType&&n.hasChildNodes()&&(n=n.childNodes[Math.min(n.childNodes.length-1,t.startOffset)]),n&&3==n.nodeType?n.parentNode:n},getEnd:function(){var e=this,t=e.getRng(),n,r;return t.duplicate||t.item?t.item?t.item(0):(t=t.duplicate(),t.collaps
e(0),n=t.parentElement(),n.ownerDocument!==e.dom.doc&&(n=e.dom.getRoot()),n&&"BODY"==n.nodeName?n.lastChild||n:n):(n=t.endContainer,r=t.endOffset,1==n.nodeType&&n.hasChildNodes()&&(n=n.childNodes[r>0?r-1:r]),n&&3==n.nodeType?n.parentNode:n)},getBookmark:function(e,t){return this.bookmarkManager.getBookmark(e,t)},moveToBookmark:function(e){return this.bookmarkManager.moveToBookmark(e)},select:function(e,t){var n=this,r=n.dom,i=r.createRng(),o;if(n.lastFocusBookmark=null,e){if(!t&&n.controlSelection.controlSelect(e))return;o=r.nodeIndex(e),i.setStart(e.parentNode,o),i.setEnd(e.parentNode,o+1),t&&(n._moveEndPoint(i,e,!0),n._moveEndPoint(i,e)),n.setRng(i)}return e},isCollapsed:function(){var e=this,t=e.getRng(),n=e.getSel();return!t||t.item?!1:t.compareEndPoints?0===t.compareEndPoints("StartToEnd",t):!n||t.collapsed},collapse:function(e){var t=this,n=t.getRng(),r;n.item&&(r=n.item(0),n=t.win.document.
body.createTextRange(),n.moveToElementText(r)),n.collapse(!!e),t.setRng(n)},getSel:function(){var e=this.win;return e.getSelection?e.getSelection():e.document.selection},getRng:function(e){function t(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(r){return-1}}var n=this,r,i,o,a=n.win.document,s;if(!e&&n.lastFocusBookmark){var l=n.lastFocusBookmark;return l.startContainer?(i=a.createRange(),i.setStart(l.startContainer,l.startOffset),i.setEnd(l.endContainer,l.endOffset)):i=l,i}if(e&&n.tridentSel)return n.tridentSel.getRangeAt(0);try{(r=n.getSel())&&(i=r.rangeCount>0?r.getRangeAt(0):r.createRange?r.createRange():a.createRange())}catch(c){}if(d&&i&&i.setStart&&a.selection){try{s=a.selection.createRange()}catch(c){}s&&s.item&&(o=s.item(0),i=a.createRange(),i.setStartBefore(o),i.setEndAfter(o))}return i||(i=a.createRange?a.createRange():a.body.createTextRange()),i.setStart&&9===i.startContainer.nodeType&&
amp;i.collapsed&&(o=n.dom.getRoot(),i.setStart(o,0),i.setEnd(o,0)),n.selectedRange&&n.explicitRange&&(0===t(i.START_TO_START,i,n.selectedRange)&&0===t(i.END_TO_END,i,n.selectedRange)?i=n.explicitRange:(n.selectedRange=null,n.explicitRange=null)),i},setRng:function(e,t){var n=this,r;if(e.select)try{e.select()}catch(i){}else if(n.tridentSel){if(e.cloneRange)try{return void n.tridentSel.addRange(e)}catch(i){}}else if(r=n.getSel()){n.explicitRange=e;try{r.removeAllRanges(),r.addRange(e)}catch(i){}t===!1&&r.extend&&(r.collapse(e.endContainer,e.endOffset),r.extend(e.startContainer,e.startOffset)),n.selectedRange=r.rangeCount>0?r.getRangeAt(0):null}},setNode:function(e){var t=this;return t.setContent(t.dom.getOuterHTML(e)),e},getNode:function(){function e(e,t){for(var n=e;e&&3===e.nodeType&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n}var t=this,n=t.getRng(),r,i=n.startContainer,o=n.endContainer,a=n.startOf
fset,s=n.endOffset,l=t.dom.getRoot();return n?n.setStart?(r=n.commonAncestorContainer,!n.collapsed&&(i==o&&2>s-a&&i.hasChildNodes()&&(r=i.childNodes[a]),3===i.nodeType&&3===o.nodeType&&(i=i.length===a?e(i.nextSibling,!0):i.parentNode,o=0===s?e(o.previousSibling,!1):o.parentNode,i&&i===o))?i:r&&3==r.nodeType?r.parentNode:r):(r=n.item?n.item(0):n.parentElement(),r.ownerDocument!==t.win.document&&(r=l),r):l},getSelectedBlocks:function(t,n){var r=this,i=r.dom,o,a,s=[];if(a=i.getRoot(),t=i.getParent(t||r.getStart(),i.isBlock),n=i.getParent(n||r.getEnd(),i.isBlock),t&&t!=a&&s.push(t),t&&n&&t!=n){o=t;for(var l=new e(t,a);(o=l.next())&&o!=n;)i.isBlock(o)&&s.push(o)}return n&&t!=n&&n!=a&&s.push(n),s},isForward:function(){var e=this.dom,t=this.getSel(),n,r;return t&&t.anchorNode&&t.focusNode?(n=e.createRng(),n.setStart(t.anchorNode,
t.anchorOffset),n.collapse(!0),r=e.createRng(),r.setStart(t.focusNode,t.focusOffset),r.collapse(!0),n.compareBoundaryPoints(n.START_TO_START,r)<=0):!0},normalize:function(){var e=this,t=e.getRng();return!d&&new i(e.dom).normalize(t)&&e.setRng(t,e.isForward()),t},selectorChanged:function(e,t){var n=this,r;return n.selectorChangedData||(n.selectorChangedData={},r={},n.editor.on("NodeChange",function(e){var t=e.element,i=n.dom,o=i.getParents(t,null,i.getRoot()),a={};c(n.selectorChangedData,function(e,t){c(o,function(n){return i.is(n,t)?(r[t]||(c(e,function(e){e(!0,{node:n,selector:t,parents:o})}),r[t]=e),a[t]=e,!1):void 0})}),c(r,function(e,n){a[n]||(delete r[n],c(e,function(e){e(!1,{node:t,selector:n,parents:o})}))})})),n.selectorChangedData[e]||(n.selectorChangedData[e]=[]),n.selectorChangedData[e].push(t),n},getScrollContainer:function(){for(var e,t=this.dom.getRoot();t&&"BODY"!=t.nodeName;){if(t.scrollHeight>t.clientHeight){e=t;brea
k}t=t.parentNode}return e},scrollIntoView:function(e){function t(e){for(var t=0,n=0,r=e;r&&r.nodeType;)t+=r.offsetLeft||0,n+=r.offsetTop||0,r=r.offsetParent;return{x:t,y:n}}var n,r,i=this,o=i.dom,a=o.getRoot(),s,l;if("BODY"!=a.nodeName){var c=i.getScrollContainer();if(c)return n=t(e).y-t(c).y,l=c.clientHeight,s=c.scrollTop,void((s>n||n+25>s+l)&&(c.scrollTop=s>n?n:n-l+25))}r=o.getViewPort(i.editor.getWin()),n=o.getPos(e).y,s=r.y,l=r.h,(n<r.y||n+25>s+l)&&i.editor.getWin().scrollTo(0,s>n?n:n-l+25)},_moveEndPoint:function(t,n,r){var i=n,o=new e(n,i),s=this.dom.schema.getNonEmptyElements();do{if(3==n.nodeType&&0!==u(n.nodeValue).length)return void(r?t.setStart(n,0):t.setEnd(n,n.nodeValue.length));if(s[n.nodeName])return void(r?t.setStartBefore(n):"BR"==n.nodeName?t.setEndBefore(n):t.setEndAfter(n));if(a.ie&&a.ie<11&&this.dom.isBlock(n)&&this.dom.isEmpty(n))return void(r?t.setStart(n,0):t.setE
nd(n,0))}while(n=r?o.next():o.prev());"BODY"==i.nodeName&&(r?t.setStart(i,0):t.setEnd(i,i.childNodes.length))},destroy:function(){this.win=null,this.controlSelection.destroy()}},l}),r(M,[D,p],function(e,t){function n(t){this.compare=function(n,i){function o(e){var n={};return r(t.getAttribs(e),function(r){var i=r.nodeName.toLowerCase();0!==i.indexOf("_")&&"style"!==i&&"data-mce-style"!==i&&(n[i]=t.getAttrib(e,i))}),n}function a(e,t){var n,r;for(r in e)if(e.hasOwnProperty(r)){if(n=t[r],"undefined"==typeof n)return!1;if(e[r]!=n)return!1;delete t[r]}for(r in t)if(t.hasOwnProperty(r))return!1;return!0}return n.nodeName!=i.nodeName?!1:a(o(n),o(i))&&a(t.parseStyle(t.getAttrib(n,"style")),t.parseStyle(t.getAttrib(i,"style")))?!e.isBookmarkNode(n)&&!e.isBookmarkNode(i):!1}}var r=t.each;return n}),r(H,[p],function(e){function t(e,t){function r(e){return e.replace(/%(\w+)/g,&q
uot;")}var i,o,a=e.dom,s="",l,c;if(c=e.settings.preview_styles,c===!1)return"";if(c||(c="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"),"string"==typeof t){if(t=e.formatter.get(t),!t)return;t=t[0]}return i=t.block||t.inline||"span",o=a.create(i),n(t.styles,function(e,t){e=r(e),e&&a.setStyle(o,t,e)}),n(t.attributes,function(e,t){e=r(e),e&&a.setAttrib(o,t,e)}),n(t.classes,function(e){e=r(e),a.hasClass(o,e)||a.addClass(o,e)}),e.fire("PreviewFormats"),a.setStyles(o,{position:"absolute",left:-65535}),e.getBody().appendChild(o),l=a.getStyle(e.getBody(),"fontSize",!0),l=/px$/.test(l)?parseInt(l,10):0,n(c.split(" "),function(t){var n=a.getStyle(o,t,!0);if(!("background-color"==t&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)&&(n=a.getStyle(e.getBody(),t,!0),"#
ffffff"==a.toHex(n).toLowerCase())||"color"==t&&"#000000"==a.toHex(n).toLowerCase())){if("font-size"==t&&/em|%$/.test(n)){if(0===l)return;n=parseFloat(n,10)/(/%$/.test(n)?100:1),n=n*l+"px"}"border"==t&&n&&(s+="padding:0 2px;"),s+=t+":"+n+";"}}),e.fire("AfterPreviewFormats"),a.remove(o),s}var n=e.each;return{getCssText:t}}),r(P,[f,B,D,M,p,H],function(e,t,n,r,i,o){return function(a){function s(e){return e.nodeType&&(e=e.nodeName),!!a.schema.getTextBlockElements()[e.toLowerCase()]}function l(e,t){return W.getParents(e,t,W.getRoot())}function c(e){return 1===e.nodeType&&"_mce_caret"===e.id}function u(){p({valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"
;bottom"}}],alignleft:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},defaultBlock:"div"},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"right"}}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:&qu
ot;justify"},defaultBlock:"div"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},wrap_links:!1},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},wrap_links:!1},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}}
,fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(){return!0},onformat:function(e,t,n){it(n,function(t,n){W.setAttrib(e,n,t)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]}),it("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/),function(e){p(e,{block:e,remove:"all"})}),p(a.s
ettings.formats)}function d(){a.addShortcut("ctrl+b","bold_desc","Bold"),a.addShortcut("ctrl+i","italic_desc","Italic"),a.addShortcut("ctrl+u","underline_desc","Underline");for(var e=1;6>=e;e++)a.addShortcut("ctrl+"+e,"",["FormatBlock",!1,"h"+e]);a.addShortcut("ctrl+7","",["FormatBlock",!1,"p"]),a.addShortcut("ctrl+8","",["FormatBlock",!1,"div"]),a.addShortcut("ctrl+9","",["FormatBlock",!1,"address"])}function f(e){return e?z[e]:z}function p(e,t){e&&("string"!=typeof e?it(e,function(e,t){p(t,e)}):(t=t.length?t:[t],it(t,function(e){e.deep===Z&&(e.deep=!e.selector),e.split===Z&&(e.split=!e.selector||e.inline),e.remove===Z&&e.selector&&!e.inline&&(e.remove="none"),e.sele
ctor&&e.inline&&(e.mixed=!0,e.block_expand=!0),"string"==typeof e.classes&&(e.classes=e.classes.split(/\s+/))
-}),z[e]=t))}function m(e){var t;return a.dom.getParent(e,function(e){return t=a.dom.getStyle(e,"text-decoration"),t&&"none"!==t}),t}function h(e){var t;1===e.nodeType&&e.parentNode&&1===e.parentNode.nodeType&&(t=m(e.parentNode),a.dom.getStyle(e,"color")&&t?a.dom.setStyle(e,"text-decoration",t):a.dom.getStyle(e,"textdecoration")===t&&a.dom.setStyle(e,"text-decoration",null))}function g(t,n,r){function i(e,t){if(t=t||p,e){if(t.onformat&&t.onformat(e,t,n,r),it(t.styles,function(t,r){W.setStyle(e,r,R(t,n))}),t.styles){var i=W.getAttrib(e,"style");i&&e.setAttribute("data-mce-style",i)}it(t.attributes,function(t,r){W.setAttrib(e,r,R(t,n))}),it(t.classes,function(t){t=R(t,n),W.hasClass(e,t)||W.addClass(e,t)})}}function o(){function t(t,n){var i=new e(n);for(r=i.current();r;r=i.prev())if(r.childNodes.length>1||r==t||"BR"==r.tagName)retu
rn r}var n=a.selection.getRng(),i=n.startContainer,o=n.endContainer;if(i!=o&&0===n.endOffset){var s=t(i,o),l=3==s.nodeType?s.length:s.childNodes.length;n.setEnd(s,l)}return n}function l(e,t,n,r,i){var o=[],a=-1,s,l=-1,c=-1,u;return it(e.childNodes,function(e,t){return"UL"===e.nodeName||"OL"===e.nodeName?(a=t,s=e,!1):void 0}),it(e.childNodes,function(e,n){rt(e)&&(e.id==t.id+"_start"?l=n:e.id==t.id+"_end"&&(c=n))}),0>=a||a>l&&c>a?(it(ot(e.childNodes),i),0):(u=W.clone(n,X),it(ot(e.childNodes),function(e,t){(a>l&&a>t||l>a&&t>a)&&(o.push(e),e.parentNode.removeChild(e))}),a>l?e.insertBefore(u,s):l>a&&e.insertBefore(u,s.nextSibling),r.push(u),it(o,function(e){u.appendChild(e)}),u)}function u(e,r,o){var a=[],u,f,m=!0;u=p.inline||p.block,f=W.create(u),i(f),U.walk(e,function(e){function h(e){var v,C,x,w,_;return _=m,v=e.nodeName.toLowerCase(),C=e.parentNode.nodeNa
me.toLowerCase(),1===e.nodeType&&et(e)&&(_=m,m="true"===et(e),w=!0),k(v,"br")?(g=0,void(p.block&&W.remove(e))):p.wrapper&&b(e,t,n)?void(g=0):m&&!w&&p.block&&!p.wrapper&&s(v)&&q(C,u)?(e=W.rename(e,u),i(e),a.push(e),void(g=0)):p.selector&&(it(d,function(t){"collapsed"in t&&t.collapsed!==y||W.is(e,t.selector)&&!c(e)&&(i(e,t),x=!0)}),!p.inline||x)?void(g=0):void(!m||w||!q(u,v)||!q(C,u)||!o&&3===e.nodeType&&1===e.nodeValue.length&&65279===e.nodeValue.charCodeAt(0)||c(e)||p.inline&&$(e)?"li"==v&&r?g=l(e,r,f,a,h):(g=0,it(ot(e.childNodes),h),w&&(m=_),g=0):(g||(g=W.clone(f,X),e.parentNode.insertBefore(g,e),a.push(g)),g.appendChild(e)))}var g;it(e,h)}),p.wrap_links===!1&&it(a,function(e){function t(e){var n,r,i;if("A"===e.nodeName){for(r=W.clone(f,X),a.push(r),i=ot(e.childNodes),n=0;n&l
t;i.length;n++)r.appendChild(i[n]);e.appendChild(r)}it(ot(e.childNodes),t)}t(e)}),it(a,function(e){function r(e){var t=0;return it(e.childNodes,function(e){A(e)||rt(e)||t++}),t}function o(e){var t,n;return it(e.childNodes,function(e){return 1!=e.nodeType||rt(e)||c(e)?void 0:(t=e,X)}),t&&!rt(t)&&E(t,p)&&(n=W.clone(t,X),i(n),W.replace(n,e,J),W.remove(t,1)),n||e}var s;if(s=r(e),(a.length>1||!$(e))&&0===s)return void W.remove(e,1);if(p.inline||p.wrapper){if(p.exact||1!==s||(e=o(e)),it(d,function(t){it(W.select(t.inline,e),function(e){var r;if(!rt(e)){if(t.wrap_links===!1){r=e.parentNode;do if("A"===r.nodeName)return;while(r=r.parentNode)}L(t,n,e,t.exact?e:null)}})}),b(e.parentNode,t,n))return W.remove(e,1),e=0,J;p.merge_with_parents&&W.getParent(e.parentNode,function(r){return b(r,t,n)?(W.remove(e,1),e=0,J):void 0}),e&&p.merge_siblings!==!1&&(e=P(H(e),e),e=P(e,H(e,J)))}})}var d=f(t),p=d[0],m,v,y=!r&&V.isCollaps
ed();if(p)if(r)r.nodeType?(v=W.createRng(),v.setStartBefore(r),v.setEndAfter(r),u(D(v,d),null,!0)):u(r,null,!0);else if(y&&p.inline&&!W.select("td.mce-item-selected,th.mce-item-selected").length)I("apply",t,n);else{var C=a.selection.getNode();j||!d[0].defaultBlock||W.getParent(C,W.isBlock)||g(d[0].defaultBlock),a.selection.setRng(o()),m=V.getBookmark(),u(D(V.getRng(J),d),m),p.styles&&(p.styles.color||p.styles.textDecoration)&&(at(C,h,"childNodes"),h(C)),V.moveToBookmark(m),F(V.getRng(J)),a.nodeChanged()}}function v(e,t,n){function r(e){var n,i,o,a,s;if(1===e.nodeType&&et(e)&&(a=v,v="true"===et(e),s=!0),n=ot(e.childNodes),v&&!s)for(i=0,o=d.length;o>i&&!L(d[i],t,e,e);i++);if(p.deep&&n.length){for(i=0,o=n.length;o>i;i++)r(n[i]);s&&(v=a)}}function i(n){var r;return it(l(n.parentNode).reverse(),function(n){var i;r||"_start"==n.id||"_end"==n.id|
|(i=b(n,e,t),i&&i.split!==!1&&(r=n))}),r}function o(e,n,r,i){var o,a,s,l,c,u;if(e){for(u=e.parentNode,o=n.parentNode;o&&o!=u;o=o.parentNode){for(a=W.clone(o,X),c=0;c<d.length;c++)if(L(d[c],t,a,a)){a=0;break}a&&(s&&a.appendChild(s),l||(l=a),s=a)}!i||p.mixed&&$(e)||(n=W.split(e,n)),s&&(r.parentNode.insertBefore(s,r),l.appendChild(r))}return n}function s(e){return o(i(e),e,e,!0)}function c(e){var t=W.get(e?"_start":"_end"),n=t[e?"firstChild":"lastChild"];return rt(n)&&(n=n[e?"firstChild":"lastChild"]),W.remove(t,!0),n}function u(e){var t,n,i=e.commonAncestorContainer;e=D(e,d,J),p.split&&(t=O(e,J),n=O(e),t!=n?(/^(TR|TH|TD)$/.test(t.nodeName)&&t.firstChild&&(t="TR"==t.nodeName?t.firstChild.firstChild||t:t.firstChild||t),i&&/^T(HEAD|BODY|FOOT|R)$/.test(i.nodeName)&&/^(TH|TD)$/.test(n.nodeName)&&n.firstChild
&&(n=n.firstChild||n),t=B(t,"span",{id:"_start","data-mce-type":"bookmark"}),n=B(n,"span",{id:"_end","data-mce-type":"bookmark"}),s(t),s(n),t=c(J),n=c()):t=n=s(t),e.startContainer=t.parentNode,e.startOffset=K(t),e.endContainer=n.parentNode,e.endOffset=K(n)+1),U.walk(e,function(e){it(e,function(e){r(e),1===e.nodeType&&"underline"===a.dom.getStyle(e,"text-decoration")&&e.parentNode&&"underline"===m(e.parentNode)&&L({deep:!1,exact:!0,inline:"span",styles:{textDecoration:"underline"}},null,e)})})}var d=f(e),p=d[0],h,g,v=!0;return n?void(n.nodeType?(g=W.createRng(),g.setStartBefore(n),g.setEndAfter(n),u(g)):u(n)):void(V.isCollapsed()&&p.inline&&!W.select("td.mce-item-selected,th.mce-item-selected").length?I("remove",e,t):(h=V.getBookmark(),u(V.getRng(J)),V.moveToBookmark(h),p.inline&am
p;&C(e,t,V.getStart())&&F(V.getRng(!0)),a.nodeChanged()))}function y(e,t,n){var r=f(e);!C(e,t,n)||"toggle"in r[0]&&!r[0].toggle?g(e,t,n):v(e,t,n)}function b(e,t,n,r){function i(e,t,i){var o,a,s=t[i],l;if(t.onmatch)return t.onmatch(e,t,i);if(s)if(s.length===Z){for(o in s)if(s.hasOwnProperty(o)){if(a="attributes"===i?W.getAttrib(e,o):S(e,o),r&&!a&&!t.exact)return;if((!r||t.exact)&&!k(a,T(R(s[o],n),o)))return}}else for(l=0;l<s.length;l++)if("attributes"===i?W.getAttrib(e,s[l]):S(e,s[l]))return t;return t}var o=f(t),a,s,l;if(o&&e)for(s=0;s<o.length;s++)if(a=o[s],E(e,a)&&i(e,a,"attributes")&&i(e,a,"styles")){if(l=a.classes)for(s=0;s<l.length;s++)if(!W.hasClass(e,l[s]))return;return a}}function C(e,t,n){function r(n){var r=W.getRoot();return n===r?!1:(n=W.getParent(n,function(n){return n.parentNode===r||!!b(n,e,t,!0)}),b(n,e,t))}var i;return n?r(n):(n=V.getNode(),
r(n)?J:(i=V.getStart(),i!=n&&r(i)?J:X))}function x(e,t){var n,r=[],i={};return n=V.getStart(),W.getParent(n,function(n){var o,a;for(o=0;o<e.length;o++)a=e[o],!i[a]&&b(n,a,t)&&(i[a]=!0,r.push(a))},W.getRoot()),r}function w(e){var t=f(e),n,r,i,o,a;if(t)for(n=V.getStart(),r=l(n),o=t.length-1;o>=0;o--){if(a=t[o].selector,!a||t[o].defaultBlock)return J;for(i=r.length-1;i>=0;i--)if(W.is(r[i],a))return J}return X}function _(e,t,n){var r;return Q||(Q={},r={},a.on("NodeChange",function(e){var t=l(e.element),n={};it(Q,function(e,i){it(t,function(o){return b(o,i,{},e.similar)?(r[i]||(it(e,function(e){e(!0,{node:o,format:i,parents:t})}),r[i]=e),n[i]=e,!1):void 0})}),it(r,function(i,o){n[o]||(delete r[o],it(i,function(n){n(!1,{node:e.element,format:o,parents:t})}))})})),it(e.split(","),function(e){Q[e]||(Q[e]=[],Q[e].similar=n),Q[e].push(t)}),this}function N(e){return o.getCssText(a,e)}function E(e,t){return k(e,t.inline)?J:k(e,t.block)?J:t.se
lector?1==e.nodeType&&W.is(e,t.selector):void 0}function k(e,t){return e=e||"",t=t||"",e=""+(e.nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()==t.toLowerCase()}function S(e,t){return T(W.getStyle(e,t),t)}function T(e,t){return("color"==t||"backgroundColor"==t)&&(e=W.toHex(e)),"fontWeight"==t&&700==e&&(e="bold"),"fontFamily"==t&&(e=e.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+e}function R(e,t){return"string"!=typeof e?e=e(t):t&&(e=e.replace(/%(\w+)/g,function(e,n){return t[n]||e})),e}function A(e){return e&&3===e.nodeType&&/^([\t \r\n]+|)$/.test(e.nodeValue)}function B(e,t,n){var r=W.create(t,n);return e.parentNode.insertBefore(r,e),r.appendChild(e),r}function D(t,n,r){function i(e){function t(e){return"BR"==e.nodeName&&e.getAttribute("data-mce-bogus")&am
p;&!e.nextSibling}var r,i,o,a,s;if(r=i=e?g:y,a=e?"previousSibling":"nextSibling",s=W.getRoot(),3==r.nodeType&&!A(r)&&(e?v>0:b<r.nodeValue.length))return r;for(;;){if(!n[0].block_expand&&$(i))return i;for(o=i[a];o;o=o[a])if(!rt(o)&&!A(o)&&!t(o))return i;if(i.parentNode==s){r=i;break}i=i.parentNode}return r}function o(e,t){for(t===Z&&(t=3===e.nodeType?e.length:e.childNodes.length);e&&e.hasChildNodes();)e=e.childNodes[t],e&&(t=3===e.nodeType?e.length:e.childNodes.length);return{node:e,offset:t}}function c(e){for(var t=e;t;){if(1===t.nodeType&&et(t))return"false"===et(t)?t:e;t=t.parentNode}return e}function u(t,n,i){function o(e,t){var n,o,a=e.nodeValue;return"undefined"==typeof t&&(t=i?a.length:0),i?(n=a.lastIndexOf(" ",t),o=a.lastIndexOf("\xa0",t),n=n>o?n:o,-1===n||r||n++):(n=a.indexOf(" ",t),o=a.indexOf("\xa0",t),
n=-1!==n&&(-1===o||o>n)?n:o),n}var s,l,c,u;if(3===t.nodeType){if(c=o(t,n),-1!==c)return{container:t,offset:c};u=t}for(s=new e(t,W.getParent(t,$)||a.getBody());l=s[i?"prev":"next"]();)if(3===l.nodeType){if(u=l,c=o(l),-1!==c)return{container:l,offset:c}}else if($(l))break;return u?(n=i?0:u.length,{container:u,offset:n}):void 0}function d(e,r){var i,o,a,s;for(3==e.nodeType&&0===e.nodeValue.length&&e[r]&&(e=e[r]),i=l(e),o=0;o<i.length;o++)for(a=0;a<n.length;a++)if(s=n[a],!("collapsed"in s&&s.collapsed!==t.collapsed)&&W.is(i[o],s.selector))return i[o];return e}function f(e,t){var r,i=W.getRoot();if(n[0].wrapper||(r=W.getParent(e,n[0].block,i)),r||(r=W.getParent(3==e.nodeType?e.parentNode:e,function(e){return e!=i&&s(e)})),r&&n[0].wrapper&&(r=l(r,"ul,ol").reverse()[0]||r),!r)for(r=e;r[t]&&!$(r[t])&&(r=r[t],!k(r,"br")););return r||e}var p,m,h,g=
t.startContainer,v=t.startOffset,y=t.endContainer,b=t.endOffset;if(1==g.nodeType&&g.hasChildNodes()&&(p=g.childNodes.length-1,g=g.childNodes[v>p?p:v],3==g.nodeType&&(v=0)),1==y.nodeType&&y.hasChildNodes()&&(p=y.childNodes.length-1,y=y.childNodes[b>p?p:b-1],3==y.nodeType&&(b=y.nodeValue.length)),g=c(g),y=c(y),(rt(g.parentNode)||rt(g))&&(g=rt(g)?g:g.parentNode,g=g.nextSibling||g,3==g.nodeType&&(v=0)),(rt(y.parentNode)||rt(y))&&(y=rt(y)?y:y.parentNode,y=y.previousSibling||y,3==y.nodeType&&(b=y.length)),n[0].inline&&(t.collapsed&&(h=u(g,v,!0),h&&(g=h.container,v=h.offset),h=u(y,b),h&&(y=h.container,b=h.offset)),m=o(y,b),m.node)){for(;m.node&&0===m.offset&&m.node.previousSibling;)m=o(m.node.previousSibling);m.node&&m.offset>0&&3===m.node.nodeType&&" "===m.node.nodeValue.charAt(m.offset-1)&&m.offset>1&&
;(y=m.node,y.splitText(m.offset-1))}return(n[0].inline||n[0].block_expand)&&(n[0].inline&&3==g.nodeType&&0!==v||(g=i(!0)),n[0].inline&&3==y.nodeType&&b!==y.nodeValue.length||(y=i())),n[0].selector&&n[0].expand!==X&&!n[0].inline&&(g=d(g,"previousSibling"),y=d(y,"nextSibling")),(n[0].block||n[0].selector)&&(g=f(g,"previousSibling"),y=f(y,"nextSibling"),n[0].block&&($(g)||(g=i(!0)),$(y)||(y=i()))),1==g.nodeType&&(v=K(g),g=g.parentNode),1==y.nodeType&&(b=K(y)+1,y=y.parentNode),{startContainer:g,startOffset:v,endContainer:y,endOffset:b}}function L(e,t,n,r){var i,o,a;if(!E(n,e))return X;if("all"!=e.remove)for(it(e.styles,function(e,i){e=T(R(e,t),i),"number"==typeof i&&(i=e,r=0),(!r||k(S(r,i),e))&&W.setStyle(n,i,""),a=1}),a&&""===W.getAttrib(n,"style")&&(n.removeAttribute(&qu
ot;style"),n.removeAttribute("data-mce-style")),it(e.attributes,function(e,i){var o;if(e=R(e,t),"number"==typeof i&&(i=e,r=0),!r||k(W.getAttrib(r,i),e)){if("class"==i&&(e=W.getAttrib(n,i),e&&(o="",it(e.split(/\s+/),function(e){/mce\w+/.test(e)&&(o+=(o?" ":"")+e)}),o)))return void W.setAttrib(n,i,o);"class"==i&&n.removeAttribute("className"),Y.test(i)&&n.removeAttribute("data-mce-"+i),n.removeAttribute(i)}}),it(e.classes,function(e){e=R(e,t),(!r||W.hasClass(r,e))&&W.removeClass(n,e)}),o=W.getAttribs(n),i=0;i<o.length;i++)if(0!==o[i].nodeName.indexOf("_"))return X;return"none"!=e.remove?(M(n,e),J):void 0}function M(e,t){function n(e,t,n){return e=H(e,t,n),!e||"BR"==e.nodeName||$(e)}var r=e.parentNode,i;t.block&&(j?r==W.getRoot()&&(t.list_block&&k(e,t.list_block)||it(ot(e.childNode
s),function(e){q(j,e.nodeName.toLowerCase())?i?i.appendChild(e):(i=B(e,j),W.setAttribs(i,a.settings.forced_root_block_attrs)):i=0})):$(e)&&!$(r)&&(n(e,X)||n(e.firstChild,J,1)||e.insertBefore(W.create("br"),e.firstChild),n(e,J)||n(e.lastChild,X,1)||e.appendChild(W.create("br")))),t.selector&&t.inline&&!k(t.inline,e)||W.remove(e,1)}function H(e,t,n){if(e)for(t=t?"nextSibling":"previousSibling",e=n?e:e[t];e;e=e[t])if(1==e.nodeType||!A(e))return e}function P(e,t){function n(e,t){for(i=e;i;i=i[t]){if(3==i.nodeType&&0!==i.nodeValue.length)return e;if(1==i.nodeType&&!rt(i))return i}return e}var i,o,a=new r(W);if(e&&t&&(e=n(e,"previousSibling"),t=n(t,"nextSibling"),a.compare(e,t))){for(i=e.nextSibling;i&&i!=t;)o=i,i=i.nextSibling,e.appendChild(o);return W.remove(t),it(ot(t.childNodes),function(t){e.appendChild(t)}),e}return t}function O(t,n){var r,i,o;return r=
t[n?"startContainer":"endContainer"],i=t[n?"startOffset":"endOffset"],1==r.nodeType&&(o=r.childNodes.length-1,!n&&i&&i--,r=r.childNodes[i>o?o:i]),3===r.nodeType&&n&&i>=r.nodeValue.length&&(r=new e(r,a.getBody()).next()||r),3!==r.nodeType||n||0!==i||(r=new e(r,a.getBody()).prev()||r),r}function I(t,n,r){function i(e){var t=W.create("span",{id:h,"data-mce-bogus":!0,style:y?"color:red":""});return e&&t.appendChild(a.getDoc().createTextNode(G)),t}function o(e,t){for(;e;){if(3===e.nodeType&&e.nodeValue!==G||e.childNodes.length>1)return!1;t&&1===e.nodeType&&t.push(e),e=e.firstChild}return!0}function l(e){for(;e;){if(e.id===h)return e;e=e.parentNode}}function c(t){var n;if(t)for(n=new e(t,t),t=n.current();t;t=n.next())if(3===t.nodeType)return t}function u(e,t){var n,r;if(e)r=V.getRng(!0),o(e)?(t!==!1&&(r.setStartBef
ore(e),r.setEndBefore(e)),W.remove(e)):(n=c(e),n.nodeValue.charAt(0)===G&&(n.deleteData(0,1),r.startContainer==n&&r.startOffset--,r.endContainer==n&&r.endOffset--),W.remove(e,1)),V.setRng(r);else if(e=l(V.getStart()),!e)for(;e=W.get(h);)u(e,!1)}function d(){var e,t,o,a,s,u,d;e=V.getRng(!0),a=e.startOffset,u=e.startContainer,d=u.nodeValue,t=l(V.getStart()),t&&(o=c(t)),d&&a>0&&a<d.length&&/\w/.test(d.charAt(a))&&/\w/.test(d.charAt(a-1))?(s=V.getBookmark(),e.collapse(!0),e=D(e,f(n)),e=U.split(e),g(n,r,e),V.moveToBookmark(s)):(t&&o.nodeValue===G?g(n,r,t):(t=i(!0),o=t.firstChild,e.insertNode(t),a=1,g(n,r,t)),V.setCursorLocation(o,a))}function p(){var e=V.getRng(!0),t,o,a,l,c,u,d=[],p,m;for(t=e.startContainer,o=e.startOffset,c=t,3==t.nodeType&&(o!=t.nodeValue.length&&(l=!0),c=c.parentNode);c;){if(b(c,n,r)){u=c;break}c.nextSibling&&(l=!0),d.push(c),c=c.parentNode}if(u)if(l)a=V.getBookmark(
),e.collapse(!0),e=D(e,f(n),!0),e=U.split(e),v(n,r,e),V.moveToBookmark(a);else{for(m=i(),c=m,p=d.length-1;p>=0;p--)c.appendChild(W.clone(d[p],!1)),c=c.firstChild;c.appendChild(W.doc.createTextNode(G)),c=c.firstChild;var h=W.getParent(u,s);h&&W.isEmpty(h)?u.parentNode.replaceChild(m,u):W.insertAfter(m,u),V.setCursorLocation(c,1),W.isEmpty(u)&&W.remove(u)}}function m(){var e;e=l(V.getStart()),e&&!W.isEmpty(e)&&at(e,function(e){1!=e.nodeType||e.id===h||W.isEmpty(e)||W.setAttrib(e,"data-mce-bogus",null)},"childNodes")}var h="_mce_caret",y=a.settings.caret_debug;a._hasCaretEvents||(nt=function(){var e=[],t;if(o(l(V.getStart()),e))for(t=e.length;t--;)W.setAttrib(e[t],"data-mce-bogus","1")},tt=function(e){var t=e.keyCode;u(),(8==t||37==t||39==t)&&u(l(V.getStart())),m()},a.on("SetContent",function(e){e.selection&&m()}),a._hasCaretEvents=!0),"apply"==t?d():p()}function F(t
){var n=t.startContainer,r=t.startOffset,i,o,a,s,l;if(3==n.nodeType&&r>=n.nodeValue.length&&(r=K(n),n=n.parentNode,i=!0),1==n.nodeType)for(s=n.childNodes,n=s[Math.min(r,s.length-1)],o=new e(n,W.getParent(n,W.isBlock)),(r>s.length-1||i)&&o.next(),a=o.current();a;a=o.next())if(3==a.nodeType&&!A(a))return l=W.create("a",null,G),a.parentNode.insertBefore(l,a),t.setStart(a,0),V.setRng(t),void W.remove(l)}var z={},W=a.dom,V=a.selection,U=new t(W),q=a.schema.isValidChild,$=W.isBlock,j=a.settings.forced_root_block,K=W.nodeIndex,G="\ufeff",Y=/^(src|href|style)$/,X=!1,J=!0,Q,Z,et=W.getContentEditable,tt,nt,rt=n.isBookmarkNode,it=i.each,ot=i.grep,at=i.walk,st=i.extend;st(this,{get:f,register:p,apply:g,remove:v,toggle:y,match:C,matchAll:x,matchNode:b,canApply:w,formatChanged:_,getCssText:N}),u(),d(),a.on("BeforeGetContent",function(){nt&&nt()}),a.on("mouseup keydown",function(e){tt&&tt(e)})}}),r(O,[g,p
,_],function(e,t,n){var r=t.trim,i;return i=new RegExp(["<span[^>]+data-mce-bogus[^>]+>[\u200b\ufeff]+<\\/span>",'\\s?data-mce-selected="[^"]+"'].join("|"),"gi"),function(t){function o(){var e=r(t.getContent({format:"raw",no_events:1})),o=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,a,s,l,c,u,d=t.schema;for(e=e.replace(i,""),u=d.getShortEndedElements();c=o.exec(e);)s=o.lastIndex,l=c[0].length,a=u[c[1]]?s:n.findEndTag(d,e,s),e=e.substring(0,s-l)+e.substring(a),o.lastIndex=s-l;return e}function a(e){s.typing=!1,s.add({},e)}var s=this,l=0,c=[],u,d,f=0;return t.on("init",function(){s.add()}),t.on("BeforeExecCommand",function(e){var t=e.command;"Undo"!=t&&"Redo"!=t&&"mceRepaint"!=t&&s.beforeChange()}),t.on("ExecCommand",function(e){var t=e.command;"Undo"!=t&&"Redo"!=t&&
"mceRepaint"!=t&&a(e)}),t.on("ObjectResizeStart",function(){s.beforeChange()}),t.on("SaveContent ObjectResized blur",a),t.on("DragEnd",a),t.on("KeyUp",function(n){var r=n.keyCode;(r>=33&&36>=r||r>=37&&40>=r||45==r||13==r||n.ctrlKey)&&(a(),t.nodeChanged()),(46==r||8==r||e.mac&&(91==r||93==r))&&t.nodeChanged(),d&&s.typing&&(t.isDirty()||(t.isNotDirty=!c[0]||o()==c[0].content,t.isNotDirty||t.fire("change",{level:c[0],lastLevel:null})),t.fire("TypingUndo"),d=!1,t.nodeChanged())}),t.on("KeyDown",function(e){var t=e.keyCode;return t>=33&&36>=t||t>=37&&40>=t||45==t?void(s.typing&&a(e)):void((16>t||t>20)&&224!=t&&91!=t&&!s.typing&&(s.beforeChange(),s.typing=!0,s.add({},e),d=!0))}),t.on("MouseDown",function(e){s.typing&&a(e)}),t.addShortcut("c
trl+z","","Undo"),t.addShortcut("ctrl+y,ctrl+shift+z","","Redo"),t.on("AddUndo Undo Redo ClearUndos MouseUp",function(e){e.isDefaultPrevented()||t.nodeChanged()}),s={data:c,typing:!1,beforeChange:function(){f||(u=t.selection.getBookmark(2,!0))},add:function(e,n){var r,i=t.settings,a;if(e=e||{},e.content=o(),f||t.removed)return null;if(a=c[l],t.fire("BeforeAddUndo",{level:e,lastLevel:a,originalEvent:n}).isDefaultPrevented())return null;if(a&&a.content==e.content)return null;if(c[l]&&(c[l].beforeBookmark=u),i.custom_undo_redo_levels&&c.length>i.custom_undo_redo_levels){for(r=0;r<c.length-1;r++)c[r]=c[r+1];c.length--,l=c.length}e.bookmark=t.selection.getBookmark(2,!0),l<c.length-1&&(c.length=l+1),c.push(e),l=c.length-1;var s={level:e,lastLevel:a,originalEvent:n};return t.fire("AddUndo",s),l>0&&(t.isNotDirty=!1,t.fire("change",s)),e},undo:fun
ction(){var e;return s.typing&&(s.add(),s.typing=!1),l>0&&(e=c[--l],0===l&&(t.isNotDirty=!0),t.setContent(e.content,{format:"raw"}),t.selection.moveToBookmark(e.beforeBookmark),t.fire("undo",{level:e})),e},redo:function(){var e;return l<c.length-1&&(e=c[++l],t.setContent(e.content,{format:"raw"}),t.selection.moveToBookmark(e.bookmark),t.fire("redo",{level:e})),e},clear:function(){c=[],l=0,s.typing=!1,t.fire("ClearUndos")},hasUndo:function(){return l>0||s.typing&&c[0]&&o()!=c[0].content},hasRedo:function(){return l<c.length-1&&!this.typing},transact:function(e){s.beforeChange();try{f++,e()}finally{f--}s.add()}}}}),r(I,[f,B,g],function(e,t,n){var r=n.ie&&n.ie<11;return function(i){function o(o){function f(e){return e&&a.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&!/^(fixed|absolute)/i.test(e.style.position)&&"
true"!==a.getContentEditable(e)}function p(e){var t;a.isBlock(e)&&(t=s.getRng(),e.appendChild(a.create("span",null,"\xa0")),s.select(e),e.lastChild.outerHTML="",s.setRng(t))}function m(e){var t=e,n=[],r;if(t){for(;t=t.firstChild;){if(a.isBlock(t))return;1!=t.nodeType||d[t.nodeName.toLowerCase()]||n.push(t)}for(r=n.length;r--;)t=n[r],!t.hasChildNodes()||t.firstChild==t.lastChild&&""===t.firstChild.nodeValue?a.remove(t):"A"==t.nodeName&&" "===(t.innerText||t.textContent)&&a.remove(t)}}function h(t){function r(e){for(;e;){if(1==e.nodeType||3==e.nodeType&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}}var i,o,l,c=t,u;if(t){if(n.ie&&n.ie<9&&A&&A.firstChild&&A.firstChild==A.lastChild&&"BR"==A.firstChild.tagName&&a.remove(A.firstChild),/^(LI|DT|DD)$/.test(t.nodeName)){var f=r(t.firstChild);f&&/^(UL|O
L|DL)$/.test(f.nodeName)&&t.insertBefore(a.doc.createTextNode("\xa0"),t.firstChild)}if(l=a.createRng(),n.ie||t.normalize(),t.hasChildNodes()){for(i=new e(t,t);o=i.current();){if(3==o.nodeType){l.setStart(o,0),l.setEnd(o,0);break}if(d[o.nodeName.toLowerCase()]){l.setStartBefore(o),l.setEndBefore(o);break}c=o,o=i.next()}o||(l.setStart(c,0),l.setEnd(c,0))}else"BR"==t.nodeName?t.nextSibling&&a.isBlock(t.nextSibling)?((!B||9>B)&&(u=a.create("br"),t.parentNode.insertBefore(u,t)),l.setStartBefore(t),l.setEndBefore(t)):(l.setStartAfter(t),l.setEndAfter(t)):(l.setStart(t,0),l.setEnd(t,0));s.setRng(l),a.remove(u),s.scrollIntoView(t)}}function g(e){var t=l.forced_root_block;t&&t.toLowerCase()===e.tagName.toLowerCase()&&a.setAttribs(e,l.forced_root_block_attrs)}function v(e){var t=T,n,i,o,s=u.getTextInlineElements();if(e||"TABLE"==P?(n=a.create(e||I),g(n)):n=A.cloneNode(!1),o=n,l.keep_styles!==!1)do if(s[t.nodeNa
me]){if("_mce_caret"==t.id)continue;i=t.cloneNode(!1),a.setAttrib(i,"id",""),n.hasChildNodes()?(i.appendChild(n.firstChild),n.appendChild(i)):(o=i,n.appendChild(i))}while(t=t.parentNode);return r||(o.innerHTML='<br data-mce-bogus="1">'),n}function y(t){var n,r,i;if(3==T.nodeType&&(t?R>0:R<T.nodeValue.length))return!1;if(T.parentNode==A&&F&&!t)return!0;if(t&&1==T.nodeType&&T==A.firstChild)return!0;if("TABLE"===T.nodeName||T.previousSibling&&"TABLE"==T.previousSibling.nodeName)return F&&!t||!F&&t;for(n=new e(T,A),3==T.nodeType&&(t&&0===R?n.prev():t||R!=T.nodeValue.length||n.next());r=n.current();){if(1===r.nodeType){if(!r.getAttribute("data-mce-bogus")&&(i=r.nodeName.toLowerCase(),d[i]&&"br"!==i))return!1}else if(3===r.nodeType&&!/^[ \t\r\n]*$/.test(r.nodeValue))return!1;t?n.prev():n.next()}r
eturn!0}function b(e,t){var n,r,o,s,l,c,d=I||"P";if(r=a.getParent(e,a.isBlock),c=i.getBody().nodeName.toLowerCase(),!r||!f(r)){if(r=r||S,!r.hasChildNodes())return n=a.create(d),g(n),r.appendChild(n),E.setStart(n,0),E.setEnd(n,0),n;for(s=e;s.parentNode!=r;)s=s.parentNode;for(;s&&!a.isBlock(s);)o=s,s=s.previousSibling;if(o&&u.isValidChild(c,d.toLowerCase())){for(n=a.create(d),g(n),o.parentNode.insertBefore(n,o),s=o;s&&!a.isBlock(s);)l=s.nextSibling,n.appendChild(s),s=l;E.setStart(e,t),E.setEnd(e,t)}}return e}function C(){function e(e){for(var t=H[e?"firstChild":"lastChild"];t&&1!=t.nodeType;)t=t[e?"nextSibling":"previousSibling"];return t===A}function t(){var e=H.parentNode;return/^(LI|DT|DD)$/.test(e.nodeName)?e:H}var n=H.parentNode.nodeName;/^(OL|UL|LI)$/.test(n)&&(I="LI"),L=I?v(I):a.create("BR"),e(!0)&&e()?"LI"==n?a.insertAfter(L,t()):a.replace(L,H):e(!0)?
"LI"==n?(a.insertAfter(L,t()),L.appendChild(a.doc.createTextNode(" ")),L.appendChild(H)):H.parentNode.insertBefore(L,H):e()?(a.insertAfter(L,t()),p(L)):(H=t(),k=E.cloneRange(),k.setStartAfter(A),k.setEndAfter(H),M=k.extractContents(),"LI"==I&&"LI"==M.firstChild.nodeName?(L=M.firstChild,a.insertAfter(M,H)):(a.insertAfter(M,H),a.insertAfter(L,H))),a.remove(A),h(L),c.add()}function x(){i.execCommand("InsertLineBreak",!1,o)}function w(e){do 3===e.nodeType&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild;while(e)}function _(e){var t=a.getRoot(),n,r;for(n=e;n!==t&&"false"!==a.getContentEditable(n);)"true"===a.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==t?r:t}function N(e){var t;r||(e.normalize(),t=e.lastChild,(!t||/^(left|right)$/gi.test(a.getStyle(t,"float",!0)))&&a.add(e,"br"))}var E,k,S,T,R,A,B,D,L,M,H,P,O,I,F;if(E=s.getR
ng(!0),!o.isDefaultPrevented()){if(!E.collapsed)return void i.execCommand("Delete");if(new t(a).normalize(E),T=E.startContainer,R=E.startOffset,I=(l.force_p_newlines?"p":"")||l.forced_root_block,I=I?I.toUpperCase():"",B=a.doc.documentMode,D=o.shiftKey,1==T.nodeType&&T.hasChildNodes()&&(F=R>T.childNodes.length-1,T=T.childNodes[Math.min(R,T.childNodes.length-1)]||T,R=F&&3==T.nodeType?T.nodeValue.length:0),S=_(T)){if(c.beforeChange(),!a.isBlock(S)&&S!=a.getRoot())return void((!I||D)&&x());if((I&&!D||!I&&D)&&(T=b(T,R)),A=a.getParent(T,a.isBlock),H=A?a.getParent(A.parentNode,a.isBlock):null,P=A?A.nodeName.toUpperCase():"",O=H?H.nodeName.toUpperCase():"","LI"!=O||o.ctrlKey||(A=H,P=O),/^(LI|DT|DD)$/.test(P)){if(!I&&D)return void x();if(a.isEmpty(A))return void C()}if("PRE"==P&&l.br_in_pre!==!1){if(!D)return void x()}else if(!I&am
p;&!D&&"LI"!=P||I&&D)return void x();I&&A===i.getBody()||(I=I||"P",y()?(L=/^(H[1-6]|PRE|FIGURE)$/.test(P)&&"HGROUP"!=O?v(I):v(),l.end_container_on_empty_block&&f(H)&&a.isEmpty(A)?L=a.split(H,A):a.insertAfter(L,A),h(L)):y(!0)?(L=A.parentNode.insertBefore(v(),A),p(L),h(A)):(k=E.cloneRange(),k.setEndAfter(A),M=k.extractContents(),w(M),L=M.firstChild,a.insertAfter(M,A),m(L),N(A),h(L)),a.setAttrib(L,"id",""),i.fire("NewBlock",{newBlock:L}),c.add())}}}var a=i.dom,s=i.selection,l=i.settings,c=i.undoManager,u=i.schema,d=u.getNonEmptyElements();i.on("keydown",function(e){13==e.keyCode&&o(e)!==!1&&e.preventDefault()})}}),r(F,[],function(){return function(e){function t(){var t=i.getStart(),s=e.getBody(),l,c,u,d,f,p,m,h=-16777215,g,v,y,b,C;if(C=n.forced_root_block,t&&1===t.nodeType&&C){for(;t&&t!=s;){if(a[t.nodeName])return;t=t.parentN
ode}if(l=i.getRng(),l.setStart){c=l.startContainer,u=l.startOffset,d=l.endContainer,f=l.endOffset;try{v=e.getDoc().activeElement===s}catch(x){}}else l.item&&(t=l.item(0),l=e.getDoc().body.createTextRange(),l.moveToElementText(t)),v=l.parentElement().ownerDocument===e.getDoc(),y=l.duplicate(),y.collapse(!0),u=-1*y.move("character",h),y.collapsed||(y=l.duplicate(),y.collapse(!1),f=-1*y.move("character",h)-u);for(t=s.firstChild,b=s.nodeName.toLowerCase();t;)if((3===t.nodeType||1==t.nodeType&&!a[t.nodeName])&&o.isValidChild(b,C.toLowerCase())){if(3===t.nodeType&&0===t.nodeValue.length){m=t,t=t.nextSibling,r.remove(m);continue}p||(p=r.create(C,e.settings.forced_root_block_attrs),t.parentNode.insertBefore(p,t),g=!0),m=t,t=t.nextSibling,p.appendChild(m)}else p=null,t=t.nextSibling;if(g&&v){if(l.setStart)l.setStart(c,u),l.setEnd(d,f),i.setRng(l);else try{l=e.getDoc().body.createTextRange(),l.moveToElementText(s),l.collapse(!0),l.mo
veStart("character",u),f>0&&l.moveEnd("character",f),l.select()}catch(x){}e.nodeChanged()}}}var n=e.settings,r=e.dom,i=e.selection,o=e.schema,a=o.getBlockElements();n.forced_root_block&&e.on("NodeChange",t)}}),r(z,[k,g,p,M,B,f],function(e,n,r,i,o,a){var s=r.each,l=r.extend,c=r.map,u=r.inArray,d=r.explode,f=n.gecko,p=n.ie,m=n.ie&&n.ie<11,h=!0,g=!1;return function(r){function v(e,t,n){var r;return e=e.toLowerCase(),(r=T.exec[e])?(r(e,t,n),h):g}function y(e){var t;return e=e.toLowerCase(),(t=T.state[e])?t(e):-1}function b(e){var t;return e=e.toLowerCase(),(t=T.value[e])?t(e):g}function C(e,t){t=t||"exec",s(e,function(e,n){s(n.toLowerCase().split(","),function(n){T[t][n]=e})})}function x(e,n,i){return n===t&&(n=g),i===t&&(i=null),r.getDoc().execCommand(e,n,i)}function w(e){return A.match(e)}function _(e,n){A.toggle(e,n?{value:n}:t),r.nodeChanged()}function N(e){B=S.getBookmark(e)}function E()
{S.moveToBookmark(B)}var k=r.dom,S=r.selection,T={state:{},exec:{},value:{}},R=r.settings,A=r.formatter,B;l(this,{execCommand:v,queryCommandState:y,queryCommandValue:b,addCommands:C}),C({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){r.undoManager.add()},"Cut,Copy,Paste":function(e){var t=r.getDoc(),i;try{x(e)}catch(o){i=h}if(i||!t.queryCommandSupported(e)){var a=r.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");n.mac&&(a=a.replace(/Ctrl\+/g,"\u2318+")),r.windowManager.alert(a)}},unlink:function(){if(S.isCollapsed()){var e=S.getNode();return void("A"==e.tagName&&r.dom.remove(e,!0))}A.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var t=e.substring(7);"full"==t&&(t="justify"),s("left,center,right
,justify".split(","),function(e){t!=e&&A.remove("align"+e)}),_("align"+t),v("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(e){var t,n;x(e),t=k.getParent(S.getNode(),"ol,ul"),t&&(n=t.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName)&&(N(),k.split(n,t),E()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){_(e)},"ForeColor,HiliteColor,FontName":function(e,t,n){_(e,n)},FontSize:function(e,t,n){var r,i;n>=1&&7>=n&&(i=d(R.font_size_style_values),r=d(R.font_size_classes),n=r?r[n-1]||n:i[n-1]||n),_(e,n)},RemoveFormat:function(e){A.remove(e)},mceBlockQuote:function(){_("blockquote")},FormatBlock:function(e,t,n){return _(n||"p")},mceCleanup:function(){var e=S.getBookmark();r.setContent(r.getContent({cleanup:h}),{cleanup:h}),S.moveToBookmark(e)},mceRemoveNode:function(e,t,n){var i=n||S.getNode();i!=
r.getBody()&&(N(),r.dom.remove(i,h),E())},mceSelectNodeDepth:function(e,t,n){var i=0;k.getParent(S.getNode(),function(e){return 1==e.nodeType&&i++==n?(S.select(e),g):void 0},r.getBody())},mceSelectNode:function(e,t,n){S.select(n)},mceInsertContent:function(t,n,o){function a(e){function t(e){return r[e]&&3==r[e].nodeType}var n,r,i;return n=S.getRng(!0),r=n.startContainer,i=n.startOffset,3==r.nodeType&&(i>0?e=e.replace(/^ /," "):t("previousSibling")||(e=e.replace(/^ /," ")),i<r.length?e=e.replace(/ (<br>|)$/," "):t("nextSibling")||(e=e.replace(/( | )(<br>|)$/," "))),e}function l(e){if(w)for(b=e.firstChild;b;b=b.walk(!0))_[b.name]&&b.attr("data-mce-new","true")}function c(){if(w){var e=r.getBody(),t=new i(k);s(k.select("*[data-mce-new]"),function(n){n.removeAttribute("data-mce-new");for
(var r=n.parentNode;r&&r!=e;r=r.parentNode)t.compare(r,n)&&k.remove(n,!0)})}}var u,d,f,m,h,g,v,y,b,C,x,w,_=r.schema.getTextInlineElements();"string"!=typeof o&&(w=o.merge,o=o.content),/^ | $/.test(o)&&(o=a(o)),u=r.parser,d=new e({},r.schema),x='<span id="mce_marker" data-mce-type="bookmark">ÈB;</span>',g={content:o,format:"html",selection:!0},r.fire("BeforeSetContent",g),o=g.content,-1==o.indexOf("{$caret}")&&(o+="{$caret}"),o=o.replace(/\{\$caret\}/,x),y=S.getRng();var N=y.startContainer||(y.parentElement?y.parentElement():null),E=r.getBody();N===E&&S.isCollapsed()&&k.isBlock(E.firstChild)&&k.isEmpty(E.firstChild)&&(y=k.createRng(),y.setStart(E.firstChild,0),y.setEnd(E.firstChild,0),S.setRng(y)),S.isCollapsed()||r.getDoc().execCommand("Delete",!1,null),f=S.getNode();var T={context:f.nodeName.toLowerCa
se()};if(h=u.parse(o,T),l(h),b=h.lastChild,"mce_marker"==b.attr("id"))for(v=b,b=b.prev;b;b=b.walk(!0))if(3==b.type||!k.isBlock(b.name)){b.parent.insert(v,b,"br"===b.name);break}if(T.invalid){for(S.setContent(x),f=S.getNode(),m=r.getBody(),9==f.nodeType?f=b=m:b=f;b!==m;)f=b,b=b.parentNode;o=f==m?m.innerHTML:k.getOuterHTML(f),o=d.serialize(u.parse(o.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return d.serialize(h)}))),f==m?k.setHTML(m,o):k.setOuterHTML(f,o)}else o=d.serialize(h),b=f.firstChild,C=f.lastChild,!b||b===C&&"BR"===b.nodeName?k.setHTML(f,o):S.setContent(o);c(),v=k.get("mce_marker"),S.scrollIntoView(v),y=k.createRng(),b=v.previousSibling,b&&3==b.nodeType?(y.setStart(b,b.nodeValue.length),p||(C=v.nextSibling,C&&3==C.nodeType&&(b.appendData(C.data),C.parentNode.removeChild(C)))):(y.setStartBefore(v),y.setEndBefore(v)),k.remove(v),S.setRng(y),r.fire(&qu
ot;SetContent",g),r.addVisual()
-},mceInsertRawHTML:function(e,t,n){S.setContent("tiny_mce_marker"),r.setContent(r.getContent().replace(/tiny_mce_marker/g,function(){return n}))},mceToggleFormat:function(e,t,n){_(n)},mceSetContent:function(e,t,n){r.setContent(n)},"Indent,Outdent":function(e){var t,n,i;t=R.indentation,n=/[a-z%]+$/i.exec(t),t=parseInt(t,10),y("InsertUnorderedList")||y("InsertOrderedList")?x(e):(R.forced_root_block||k.getParent(S.getNode(),k.isBlock)||A.apply("div"),s(S.getSelectedBlocks(),function(o){if("LI"!=o.nodeName){var a=r.getParam("indent_use_margin",!1)?"margin":"padding";a+="rtl"==k.getStyle(o,"direction",!0)?"Right":"Left","outdent"==e?(i=Math.max(0,parseInt(o.style[a]||0,10)-t),k.setStyle(o,a,i?i+n:"")):(i=parseInt(o.style[a]||0,10)+t+n,k.setStyle(o,a,i))}}))},mceRepaint:function(){if(f)try{N(h),S.getSel()&&S.getSel().selectAllChildre
n(r.getBody()),S.collapse(h),E()}catch(e){}},InsertHorizontalRule:function(){r.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){r.hasVisual=!r.hasVisual,r.addVisual()},mceReplaceContent:function(e,t,n){r.execCommand("mceInsertContent",!1,n.replace(/\{\$selection\}/g,S.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;"string"==typeof n&&(n={href:n}),r=k.getParent(S.getNode(),"a"),n.href=n.href.replace(" ","%20"),r&&n.href||A.remove("link"),n.href&&A.apply("link",n,r)},selectAll:function(){var e=k.getRoot(),t;S.getRng().setStart?(t=k.createRng(),t.setStart(e,0),t.setEnd(e,e.childNodes.length),S.setRng(t)):(t=S.getRng(),t.item||(t.moveToElementText(e),t.select()))},"delete":function(){x("Delete");var e=r.getBody();k.isEmpty(e)&&(r.setContent(""),e.firstChild&&k.isBlock(
e.firstChild)?r.selection.setCursorLocation(e.firstChild,0):r.selection.setCursorLocation(e,0))},mceNewDocument:function(){r.setContent("")},InsertLineBreak:function(e,t,n){function i(){for(var e=new a(p,v),t,n=r.schema.getNonEmptyElements();t=e.next();)if(n[t.nodeName.toLowerCase()]||t.length>0)return!0}var s=n,l,c,u,d=S.getRng(!0);new o(k).normalize(d);var f=d.startOffset,p=d.startContainer;if(1==p.nodeType&&p.hasChildNodes()){var g=f>p.childNodes.length-1;p=p.childNodes[Math.min(f,p.childNodes.length-1)]||p,f=g&&3==p.nodeType?p.nodeValue.length:0}var v=k.getParent(p,k.isBlock),y=v?v.nodeName.toUpperCase():"",b=v?k.getParent(v.parentNode,k.isBlock):null,C=b?b.nodeName.toUpperCase():"",x=s&&s.ctrlKey;"LI"!=C||x||(v=b,y=C),p&&3==p.nodeType&&f>=p.nodeValue.length&&(m||i()||(l=k.create("br"),d.insertNode(l),d.setStartAfter(l),d.setEndAfter(l),c=!0)),l=k.create("br"),d.i
nsertNode(l);var w=k.doc.documentMode;return m&&"PRE"==y&&(!w||8>w)&&l.parentNode.insertBefore(k.doc.createTextNode("\r"),l),u=k.create("span",{}," "),l.parentNode.insertBefore(u,l),S.scrollIntoView(u),k.remove(u),c?(d.setStartBefore(l),d.setEndBefore(l)):(d.setStartAfter(l),d.setEndAfter(l)),S.setRng(d),r.undoManager.add(),h}}),C({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var t="align"+e.substring(7),n=S.isCollapsed()?[k.getParent(S.getNode(),k.isBlock)]:S.getSelectedBlocks(),r=c(n,function(e){return!!A.matchNode(e,t)});return-1!==u(r,h)},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return w(e)},mceBlockQuote:function(){return w("blockquote")},Outdent:function(){var e;if(R.inline_styles){if((e=k.getParent(S.getStart(),k.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return h;if((e=k.getParent(S.getEnd(),k.isB
lock))&&parseInt(e.style.paddingLeft,10)>0)return h}return y("InsertUnorderedList")||y("InsertOrderedList")||!R.inline_styles&&!!k.getParent(S.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(e){var t=k.getParent(S.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),C({"FontSize,FontName":function(e){var t=0,n;return(n=k.getParent(S.getNode(),"span"))&&(t="fontsize"==e?n.style.fontSize:n.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()),t}},"value"),C({Undo:function(){r.undoManager.undo()},Redo:function(){r.undoManager.redo()}})}}),r(W,[p],function(e){function t(e,i){var o=this,a,s;if(e=r(e),i=o.settings=i||{},a=i.base_uri,/^([\w\-]+):([^\/]{2})/i.
test(e)||/^\s*#/.test(e))return void(o.source=e);var l=0===e.indexOf("//");0!==e.indexOf("/")||l||(e=(a?a.protocol||"http":"http")+"://mce_host"+e),/^[\w\-]*:?\/\//.test(e)||(s=i.base_uri?i.base_uri.path:new t(location.href).directory,""===i.base_uri.protocol?e="//mce_host"+o.toAbsPath(s,e):(e=/([^#?]*)([#?]?.*)/.exec(e),e=(a&&a.protocol||"http")+"://mce_host"+o.toAbsPath(s,e[1])+e[2])),e=e.replace(/@@/g,"(mce_at)"),e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e),n(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","ancho
r"],function(t,n){var r=e[n];r&&(r=r.replace(/\(mce_at\)/g,"@@")),o[t]=r}),a&&(o.protocol||(o.protocol=a.protocol),o.userInfo||(o.userInfo=a.userInfo),o.port||"mce_host"!==o.host||(o.port=a.port),o.host&&"mce_host"!==o.host||(o.host=a.host),o.source=""),l&&(o.protocol="")}var n=e.each,r=e.trim,i={ftp:21,http:80,https:443,mailto:25};return t.prototype={setPath:function(e){var t=this;e=/^(.*?)\/?(\w+)?$/.exec(e),t.path=e[0],t.directory=e[1],t.file=e[2],t.source="",t.getURI()},toRelative:function(e){var n=this,r;if("./"===e)return e;if(e=new t(e,{base_uri:n}),"mce_host"!=e.host&&n.host!=e.host&&e.host||n.port!=e.port||n.protocol!=e.protocol&&""!==e.protocol)return e.getURI();var i=n.getURI(),o=e.getURI();return i==o||"/"==i.charAt(i.length-1)&&i.substr(0,i.length-1)==o?i:(r=n.toRelPath(n.path,e.path),e.query&&(r
+="?"+e.query),e.anchor&&(r+="#"+e.anchor),r)},toAbsolute:function(e,n){return e=new t(e,{base_uri:this}),e.getURI(n&&this.isSameOrigin(e))},isSameOrigin:function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=i[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},toRelPath:function(e,t){var n,r=0,i="",o,a;if(e=e.substring(0,e.lastIndexOf("/")),e=e.split("/"),n=t.split("/"),e.length>=n.length)for(o=0,a=e.length;a>o;o++)if(o>=n.length||e[o]!=n[o]){r=o+1;break}if(e.length<n.length)for(o=0,a=n.length;a>o;o++)if(o>=e.length||e[o]!=n[o]){r=o+1;break}if(1===r)return t;for(o=0,a=e.length-(r-1);a>o;o++)i+="../";for(o=r-1,a=n.length;a>o;o++)i+=o!=r-1?"/"+n[o]:n[o];return i},toAbsPath:function(e,t){var r,i=0,o=[],a,s;for(a=/\/$/.test(t)?"/":"",e=e.split("/"),t=t.split("
/"),n(e,function(e){e&&o.push(e)}),e=o,r=t.length-1,o=[];r>=0;r--)0!==t[r].length&&"."!==t[r]&&(".."!==t[r]?i>0?i--:o.push(t[r]):i++);return r=e.length-i,s=0>=r?o.reverse().join("/"):e.slice(0,r).join("/")+"/"+o.reverse().join("/"),0!==s.indexOf("/")&&(s="/"+s),a&&s.lastIndexOf("/")!==s.length-1&&(s+=a),s},getURI:function(e){var t,n=this;return(!n.source||e)&&(t="",e||(t+=n.protocol?n.protocol+"://":"//",n.userInfo&&(t+=n.userInfo+"@"),n.host&&(t+=n.host),n.port&&(t+=":"+n.port)),n.path&&(t+=n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),n.source=t),n.source}},t}),r(V,[p],function(e){function t(){}var n=e.each,r=e.extend,i,o;return t.extend=i=function(e){function t(){var e,t,n,r=this;if(!o&&
amp;(r.init&&r.init.apply(r,arguments),t=r.Mixins))for(e=t.length;e--;)n=t[e],n.init&&n.init.apply(r,arguments)}function a(){return this}function s(e,t){return function(){var n=this,r=n._super,i;return n._super=c[e],i=t.apply(n,arguments),n._super=r,i}}var l=this,c=l.prototype,u,d,f;o=!0,u=new l,o=!1,e.Mixins&&(n(e.Mixins,function(t){t=t;for(var n in t)"init"!==n&&(e[n]=t[n])}),c.Mixins&&(e.Mixins=c.Mixins.concat(e.Mixins))),e.Methods&&n(e.Methods.split(","),function(t){e[t]=a}),e.Properties&&n(e.Properties.split(","),function(t){var n="_"+t;e[t]=function(e){var t=this,r;return e!==r?(t[n]=e,t):t[n]}}),e.Statics&&n(e.Statics,function(e,n){t[n]=e}),e.Defaults&&c.Defaults&&(e.Defaults=r({},c.Defaults,e.Defaults));for(d in e)f=e[d],u[d]="function"==typeof f&&c[d]?s(d,f):f;return t.prototype=u,t.constructor=t,t.extend=i,t},t}),r(U,[p],function(e){func
tion t(e){function t(){return!1}function n(){return!0}function r(r,i){var a,s,l,d;if(r=r.toLowerCase(),i=i||{},i.type=r,i.target||(i.target=c),i.preventDefault||(i.preventDefault=function(){i.isDefaultPrevented=n},i.stopPropagation=function(){i.isPropagationStopped=n},i.stopImmediatePropagation=function(){i.isImmediatePropagationStopped=n},i.isDefaultPrevented=t,i.isPropagationStopped=t,i.isImmediatePropagationStopped=t),e.beforeFire&&e.beforeFire(i),a=u[r])for(s=0,l=a.length;l>s;s++){if(a[s]=d=a[s],d.once&&o(r,d),i.isImmediatePropagationStopped())return i.stopPropagation(),i;if(d.call(c,i)===!1)return i.preventDefault(),i}return i}function i(e,n,r){var i,o,a;if(n===!1&&(n=t),n)for(o=e.toLowerCase().split(" "),a=o.length;a--;)e=o[a],i=u[e],i||(i=u[e]=[],d(e,!0)),r?i.unshift(n):i.push(n);return l}function o(e,t){var n,r,i,o,a;if(e)for(o=e.toLowerCase().split(" "),n=o.length;n--;){if(e=o[n],r=u[e],!e){for(i in u)d(i,!1),delete u[i];return
l}if(r){if(t)for(a=r.length;a--;)r[a]===t&&(r=r.slice(0,a).concat(r.slice(a+1)),u[e]=r);else r.length=0;r.length||(d(e,!1),delete u[e])}}else{for(e in u)d(e,!1);u={}}return l}function a(e,t,n){return t.once=!0,i(e,t,n)}function s(e){return e=e.toLowerCase(),!(!u[e]||0===u[e].length)}var l=this,c,u={},d;e=e||{},c=e.scope||l,d=e.toggleEvent||t,l.fire=r,l.on=i,l.off=o,l.once=a,l.has=s}var n=e.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate"," ");return t.isNative=function(e){return!!n[e.toLowerCase()]},t}),r(q,[V],function(e){function t(e){for(var t=[],n=e.length,r;n--;)r=e[n],r.__checked||(t.push(r),r.__checked=1);for(n=t.length;n--;)delete t[n].__checked;return t}var n=/^([\w\\*]+)?
(?:#([\w\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i,r=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i=/^\s*|\s*$/g,o,a=e.extend({init:function(e){function t(e){return e?(e=e.toLowerCase(),function(t){return"*"===e||t.type===e}):void 0}function o(e){return e?function(t){return t._name===e}:void 0}function a(e){return e?(e=e.split("."),function(t){for(var n=e.length;n--;)if(!t.hasClass(e[n]))return!1;return!0}):void 0}function s(e,t,n){return e?function(r){var i=r[e]?r[e]():"";return t?"="===t?i===n:"*="===t?i.indexOf(n)>=0:"~="===t?(" "+i+" ").indexOf(" "+n+" ")>=0:"!="===t?i!=n:"^="===t?0===i.indexOf(n):"$="===t?i.substr(i.length-n.length)===n:!1:!!n}:void 0}function l(e){var t;return e?(e=/(?:not\(
(.+)\))|(.+)/i.exec(e),e[1]?(t=u(e[1],[]),function(e){return!d(e,t)}):(e=e[2],function(t,n,r){return"first"===e?0===n:"last"===e?n===r-1:"even"===e?n%2===0:"odd"===e?n%2===1:t[e]?t[e]():!1})):void 0}function c(e,r,c){function u(e){e&&r.push(e)}var d;return d=n.exec(e.replace(i,"")),u(t(d[1])),u(o(d[2])),u(a(d[3])),u(s(d[4],d[5],d[6])),u(l(d[7])),r.psuedo=!!d[7],r.direct=c,r}function u(e,t){var n=[],i,o,a;do if(r.exec(""),o=r.exec(e),o&&(e=o[3],n.push(o[1]),o[2])){i=o[3];break}while(o);for(i&&u(i,t),e=[],a=0;a<n.length;a++)">"!=n[a]&&e.push(c(n[a],[],">"===n[a-1]));return t.push(e),t}var d=this.match;this._selectors=u(e,[])},match:function(e,t){var n,r,i,o,a,s,l,c,u,d,f,p,m;for(t=t||this._selectors,n=0,r=t.length;r>n;n++){for(a=t[n],o=a.length,m=e,p=0,i=o-1;i>=0;i--)for(c=a[i];m;){if(c.psuedo)for(f=m.parent().items(),u=d=f.length;u--&&f[u]!==m;);for(s
=0,l=c.length;l>s;s++)if(!c[s](m,u,d)){s=l+1;break}if(s===l){p++;break}if(i===o-1)break;m=m.parent()}if(p===o)return!0}return!1},find:function(e){function n(e,t,i){var o,a,s,l,c,u=t[i];for(o=0,a=e.length;a>o;o++){for(c=e[o],s=0,l=u.length;l>s;s++)if(!u[s](c,o,a)){s=l+1;break}if(s===l)i==t.length-1?r.push(c):c.items&&n(c.items(),t,i+1);else if(u.direct)return;c.items&&n(c.items(),t,i)}}var r=[],i,s,l=this._selectors;if(e.items){for(i=0,s=l.length;s>i;i++)n(e.items(),l[i],0);s>1&&(r=t(r))}return o||(o=a.Collection),new o(r)}});return a}),r($,[p,q,V],function(e,t,n){var r,i,o=Array.prototype.push,a=Array.prototype.slice;return i={length:0,init:function(e){e&&this.add(e)},add:function(t){var n=this;return e.isArray(t)?o.apply(n,t):t instanceof r?n.add(t.toArray()):o.call(n,t),n},set:function(e){var t=this,n=t.length,r;for(t.length=0,t.add(e),r=t.length;n>r;r++)delete t[r];return t},filter:function(e){var n=this,i,o,a=[],s,l;for("str
ing"==typeof e?(e=new t(e),l=function(t){return e.match(t)}):l=e,i=0,o=n.length;o>i;i++)s=n[i],l(s)&&a.push(s);return new r(a)},slice:function(){return new r(a.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},each:function(t){return e.each(this,t),this},toArray:function(){return e.toArray(this)},indexOf:function(e){for(var t=this,n=t.length;n--&&t[n]!==e;);return n},reverse:function(){return new r(e.toArray(this).reverse())},hasClass:function(e){return this[0]?this[0].hasClass(e):!1},prop:function(e,t){var n=this,r,i;return t!==r?(n.each(function(n){n[e]&&n[e](t)}),n):(i=n[0],i&&i[e]?i[e]():void 0)},exec:function(t){var n=this,r=e.toArray(arguments).slice(1);return n.each(function(e){e[t]&&e[t].apply(e,r)}),n},remove:function(){for(var e=this.length;e--;)this[e].remove();return this}},e.each("fire on off show hide addClass removeClass append prepend before after reflow".split(" "
),function(t){i[t]=function(){var n=e.toArray(arguments);return this.each(function(e){t in e&&e[t].apply(e,n)}),this}}),e.each("text name disabled active selected checked visible parent value data".split(" "),function(e){i[e]=function(t){return this.prop(e,t)}}),r=n.extend(i),t.Collection=r,r}),r(j,[p,y],function(e,t){var n=0;return{id:function(){return"mceu_"+n++},createFragment:function(e){return t.DOM.createFragment(e)},getWindowSize:function(){return t.DOM.getViewPort()},getSize:function(e){var t,n;if(e.getBoundingClientRect){var r=e.getBoundingClientRect();t=Math.max(r.width||r.right-r.left,e.offsetWidth),n=Math.max(r.height||r.bottom-r.bottom,e.offsetHeight)}else t=e.offsetWidth,n=e.offsetHeight;return{width:t,height:n}},getPos:function(e,n){return t.DOM.getPos(e,n)},getViewPort:function(e){return t.DOM.getViewPort(e)},get:function(e){return document.getElementById(e)},addClass:function(e,n){return t.DOM.addClass(e,n)},removeClass:function
(e,n){return t.DOM.removeClass(e,n)},hasClass:function(e,n){return t.DOM.hasClass(e,n)},toggleClass:function(e,n,r){return t.DOM.toggleClass(e,n,r)},css:function(e,n,r){return t.DOM.setStyle(e,n,r)},on:function(e,n,r,i){return t.DOM.bind(e,n,r,i)},off:function(e,n,r){return t.DOM.unbind(e,n,r)},fire:function(e,n,r){return t.DOM.fire(e,n,r)},innerHtml:function(e,n){t.DOM.setHTML(e,n)}}}),r(K,[V,p,U,$,j],function(e,t,n,r,i){function o(e){return e._eventDispatcher||(e._eventDispatcher=new n({scope:e,toggleEvent:function(t,r){r&&n.isNative(t)&&(e._nativeEvents||(e._nativeEvents={}),e._nativeEvents[t]=!0,e._rendered&&e.bindPendingEvents())}})),e._eventDispatcher}var a={},s="onmousewheel"in document,l=!1,c="mce-",u=e.extend({Statics:{elementIdCache:a,classPrefix:c},isRtl:function(){return u.rtl},classPrefix:c,init:function(e){var n=this,r,o;if(n.settings=e=t.extend({},n.Defaults,e),n._id=e.id||i.id(),n._text=n._name="",n._width=n._heig
ht=0,n._aria={role:e.role},r=e.classes)for(r=r.split(" "),r.map={},o=r.length;o--;)r.map[r[o]]=!0;n._classes=r||[],n.visible(!0),t.each("title text width height name classes visible disabled active value".split(" "),function(t){var r=e[t],i;r!==i?n[t](r):n["_"+t]===i&&(n["_"+t]=!1)}),n.on("click",function(){return n.disabled()?!1:void 0}),e.classes&&t.each(e.classes.split(" "),function(e){n.addClass(e)}),n.settings=e,n._borderBox=n.parseBox(e.border),n._paddingBox=n.parseBox(e.padding),n._marginBox=n.parseBox(e.margin),e.hidden&&n.hide()},Properties:"parent,title,text,width,height,disabled,active,name,value",Methods:"renderHtml",getContainerElm:function(){return document.body},getParentCtrl:function(e){for(var t,n=this.getRoot().controlIdLookup;e&&n&&!(t=n[e.id]);)e=e.parentNode;return t},parseBox:function(e){var t,n=10;if(e)return"number"==type
of e?(e=e||0,{top:e,left:e,bottom:e,right:e}):(e=e.split(" "),t=e.length,1===t?e[1]=e[2]=e[3]=e[0]:2===t?(e[2]=e[0],e[3]=e[1]):3===t&&(e[3]=e[1]),{top:parseInt(e[0],n)||0,right:parseInt(e[1],n)||0,bottom:parseInt(e[2],n)||0,left:parseInt(e[3],n)||0})},borderBox:function(){return this._borderBox},paddingBox:function(){return this._paddingBox},marginBox:function(){return this._marginBox},measureBox:function(e,t){function n(t){var n=document.defaultView;return n?(t=t.replace(/[A-Z]/g,function(e){return"-"+e}),n.getComputedStyle(e,null).getPropertyValue(t)):e.currentStyle[t]}function r(e){var t=parseFloat(n(e),10);return isNaN(t)?0:t}return{top:r(t+"TopWidth"),right:r(t+"RightWidth"),bottom:r(t+"BottomWidth"),left:r(t+"LeftWidth")}},initLayoutRect:function(){var e=this,t=e.settings,n,r,o=e.getEl(),a,s,l,c,u,d,f,p;n=e._borderBox=e._borderBox||e.measureBox(o,"border"),e._paddingBox=e._paddingBox||e.measureBox(o,
"padding"),e._marginBox=e._marginBox||e.measureBox(o,"margin"),p=i.getSize(o),d=t.minWidth,f=t.minHeight,l=d||p.width,c=f||p.height,a=t.width,s=t.height,u=t.autoResize,u="undefined"!=typeof u?u:!a&&!s,a=a||l,s=s||c;var m=n.left+n.right,h=n.top+n.bottom,g=t.maxWidth||65535,v=t.maxHeight||65535;return e._layoutRect=r={x:t.x||0,y:t.y||0,w:a,h:s,deltaW:m,deltaH:h,contentW:a-m,contentH:s-h,innerW:a-m,innerH:s-h,startMinWidth:d||0,startMinHeight:f||0,minW:Math.min(l,g),minH:Math.min(c,v),maxW:g,maxH:v,autoResize:u,scrollW:0},e._lastLayoutRect={},r},layoutRect:function(e){var t=this,n=t._layoutRect,r,i,o,a,s,l;return n||(n=t.initLayoutRect()),e?(o=n.deltaW,a=n.deltaH,e.x!==s&&(n.x=e.x),e.y!==s&&(n.y=e.y),e.minW!==s&&(n.minW=e.minW),e.minH!==s&&(n.minH=e.minH),i=e.w,i!==s&&(i=i<n.minW?n.minW:i,i=i>n.maxW?n.maxW:i,n.w=i,n.innerW=i-o),i=e.h,i!==s&&(i=i<n.minH?n.minH:i,i=i>n.maxH?n.maxH:i,n.h=i,n.
innerH=i-a),i=e.innerW,i!==s&&(i=i<n.minW-o?n.minW-o:i,i=i>n.maxW-o?n.maxW-o:i,n.innerW=i,n.w=i+o),i=e.innerH,i!==s&&(i=i<n.minH-a?n.minH-a:i,i=i>n.maxH-a?n.maxH-a:i,n.innerH=i,n.h=i+a),e.contentW!==s&&(n.contentW=e.contentW),e.contentH!==s&&(n.contentH=e.contentH),r=t._lastLayoutRect,(r.x!==n.x||r.y!==n.y||r.w!==n.w||r.h!==n.h)&&(l=u.repaintControls,l&&l.map&&!l.map[t._id]&&(l.push(t),l.map[t._id]=!0),r.x=n.x,r.y=n.y,r.w=n.w,r.h=n.h),t):n},repaint:function(){var e=this,t,n,r,i,o=0,a=0,s,l;l=document.createRange?function(e){return e}:Math.round,t=e.getEl().style,r=e._layoutRect,s=e._lastRepaintRect||{},i=e._borderBox,o=i.left+i.right,a=i.top+i.bottom,r.x!==s.x&&(t.left=l(r.x)+"px",s.x=r.x),r.y!==s.y&&(t.top=l(r.y)+"px",s.y=r.y),r.w!==s.w&&(t.width=l(r.w-o)+"px",s.w=r.w),r.h!==s.h&&(t.height=l(r.h-a)+"px",s.h=r.h),e._hasBody&&r.in
nerW!==s.innerW&&(n=e.getEl("body").style,n.width=l(r.innerW)+"px",s.innerW=r.innerW),e._hasBody&&r.innerH!==s.innerH&&(n=n||e.getEl("body").style,n.height=l(r.innerH)+"px",s.innerH=r.innerH),e._lastRepaintRect=s,e.fire("repaint",{},!1)},on:function(e,t){function n(e){var t,n;return"string"!=typeof e?e:function(i){return t||r.parentsAndSelf().each(function(r){var i=r.settings.callbacks;return i&&(t=i[e])?(n=r,!1):void 0}),t.call(n,i)}}var r=this;return o(r).on(e,n(t)),r},off:function(e,t){return o(this).off(e,t),this},fire:function(e,t,n){var r=this;if(t=t||{},t.control||(t.control=r),t=o(r).fire(e,t),n!==!1&&r.parent)for(var i=r.parent();i&&!t.isPropagationStopped();)i.fire(e,t,!1),i=i.parent();return t},hasEventListeners:function(e){return o(this).has(e)},parents:function(e){var t=this,n,i=new r;for(n=t.parent();n;n=n.parent())i.add(n);return e&&(i=i.filter(e)),i},pa
rentsAndSelf:function(e){return new r(this).add(this.parents(e))},next:function(){var e=this.parent().items();return e[e.indexOf(this)+1]},prev:function(){var e=this.parent().items();return e[e.indexOf(this)-1]},findCommonAncestor:function(e,t){for(var n;e;){for(n=t;n&&e!=n;)n=n.parent();if(e==n)break;e=e.parent()}return e},hasClass:function(e,t){var n=this._classes[t||"control"];return e=this.classPrefix+e,n&&!!n.map[e]},addClass:function(e,t){var n=this,r,i;return e=this.classPrefix+e,r=n._classes[t||"control"],r||(r=[],r.map={},n._classes[t||"control"]=r),r.map[e]||(r.map[e]=e,r.push(e),n._rendered&&(i=n.getEl(t),i&&(i.className=r.join(" ")))),n},removeClass:function(e,t){var n=this,r,i,o;if(e=this.classPrefix+e,r=n._classes[t||"control"],r&&r.map[e])for(delete r.map[e],i=r.length;i--;)r[i]===e&&r.splice(i,1);return n._rendered&&(o=n.getEl(t),o&&(o.className=r.join(&q
uot; "))),n},toggleClass:function(e,t,n){var r=this;return t?r.addClass(e,n):r.removeClass(e,n),r},classes:function(e){var t=this._classes[e||"control"];return t?t.join(" "):""},innerHtml:function(e){return i.innerHtml(this.getEl(),e),this},getEl:function(e,t){var n,r=e?this._id+"-"+e:this._id;return n=a[r]=(t===!0?null:a[r])||i.get(r)},visible:function(e){var t=this,n;return"undefined"!=typeof e?(t._visible!==e&&(t._rendered&&(t.getEl().style.display=e?"":"none"),t._visible=e,n=t.parent(),n&&(n._lastRect=null),t.fire(e?"show":"hide")),t):t._visible},show:function(){return this.visible(!0)},hide:function(){return this.visible(!1)},focus:function(){try{this.getEl().focus()}catch(e){}return this},blur:function(){return this.getEl().blur(),this},aria:function(e,t){var n=this,r=n.getEl(n.ariaTarget);return"undefined"==typeof t?n._aria[e]:(n._aria[e]=t,n._rende
red&&r.setAttribute("role"==e?e:"aria-"+e,t),n)},encode:function(e,t){return t!==!1&&(e=this.translate(e)),(e||"").replace(/[&<>"]/g,function(e){return"&#"+e.charCodeAt(0)+";"})},translate:function(e){return u.translate?u.translate(e):e},before:function(e){var t=this,n=t.parent();return n&&n.insert(e,n.items().indexOf(t),!0),t},after:function(e){var t=this,n=t.parent();return n&&n.insert(e,n.items().indexOf(t)),t},remove:function(){var e=this,t=e.getEl(),n=e.parent(),r,o;if(e.items){var s=e.items().toArray();for(o=s.length;o--;)s[o].remove()}n&&n.items&&(r=[],n.items().each(function(t){t!==e&&r.push(t)}),n.items().set(r),n._lastRect=null),e._eventsRoot&&e._eventsRoot==e&&i.off(t);var l=e.getRoot().controlIdLookup;if(l&&delete l[e._id],delete a[e._id],t&&t.parentNode){var c=t.getElementsByTagName("*");for(o=c.length;o--
;)delete a[c[o].id];t.parentNode.removeChild(t)}return e._rendered=!1,e},renderBefore:function(e){var t=this;return e.parentNode.insertBefore(i.createFragment(t.renderHtml()),e),t.postRender(),t},renderTo:function(e){var t=this;return e=e||t.getContainerElm(),e.appendChild(i.createFragment(t.renderHtml())),t.postRender(),t},postRender:function(){var e=this,t=e.settings,n,r,o,a,s;for(a in t)0===a.indexOf("on")&&e.on(a.substr(2),t[a]);if(e._eventsRoot){for(o=e.parent();!s&&o;o=o.parent())s=o._eventsRoot;if(s)for(a in s._nativeEvents)e._nativeEvents[a]=!0}e.bindPendingEvents(),t.style&&(n=e.getEl(),n&&(n.setAttribute("style",t.style),n.style.cssText=t.style)),e._visible||i.css(e.getEl(),"display","none"),e.settings.border&&(r=e.borderBox(),i.css(e.getEl(),{"border-top-width":r.top,"border-right-width":r.right,"border-bottom-width":r.bottom,"border-left-width":r.left})
);var l=e.getRoot();l.controlIdLookup||(l.controlIdLookup={}),l.controlIdLookup[e._id]=e;for(var c in e._aria)e.aria(c,e._aria[c]);e.fire("postrender",{},!1)},scrollIntoView:function(e){function t(e,t){var n,r,i=e;for(n=r=0;i&&i!=t&&i.nodeType;)n+=i.offsetLeft||0,r+=i.offsetTop||0,i=i.offsetParent;return{x:n,y:r}}var n=this.getEl(),r=n.parentNode,i,o,a,s,l,c,u=t(n,r);return i=u.x,o=u.y,a=n.offsetWidth,s=n.offsetHeight,l=r.clientWidth,c=r.clientHeight,"end"==e?(i-=l-a,o-=c-s):"center"==e&&(i-=l/2-a/2,o-=c/2-s/2),r.scrollLeft=i,r.scrollTop=o,this},bindPendingEvents:function(){function e(e){var t=o.getParentCtrl(e.target);t&&t.fire(e.type,e)}function t(){var e=d._lastHoverCtrl;e&&(e.fire("mouseleave",{target:e.getEl()}),e.parents().each(function(e){e.fire("mouseleave",{target:e.getEl()})}),d._lastHoverCtrl=null)}function n(e){var t=o.getParentCtrl(e.target),n=d._lastHoverCtrl,r=0,i,a,s;if(t!==n){i
f(d._lastHoverCtrl=t,a=t.parents().toArray().reverse(),a.push(t),n){for(s=n.parents().toArray().reverse(),s.push(n),r=0;r<s.length&&a[r]===s[r];r++);for(i=s.length-1;i>=r;i--)n=s[i],n.fire("mouseleave",{target:n.getEl()})}for(i=r;i<a.length;i++)t=a[i],t.fire("mouseenter",{target:t.getEl()})}}function r(e){e.preventDefault(),"mousewheel"==e.type?(e.deltaY=-1/40*e.wheelDelta,e.wheelDeltaX&&(e.deltaX=-1/40*e.wheelDeltaX)):(e.deltaX=0,e.deltaY=e.detail),e=o.fire("wheel",e)}var o=this,a,c,u,d,f,p;if(o._rendered=!0,f=o._nativeEvents){for(u=o.parents().toArray(),u.unshift(o),a=0,c=u.length;!d&&c>a;a++)d=u[a]._eventsRoot;for(d||(d=u[u.length-1]||o),o._eventsRoot=d,c=a,a=0;c>a;a++)u[a]._eventsRoot=d;var m=d._delegates;m||(m=d._delegates={});for(p in f){if(!f)return!1;"wheel"!==p||l?("mouseenter"===p||"mouseleave"===p?d._hasMouseEnter||(i.on(d.getEl(),"mouseleave",t),i.on(d.g
etEl(),"mouseover",n),d._hasMouseEnter=1):m[p]||(i.on(d.getEl(),p,e),m[p]=!0),f[p]=!1):s?i.on(o.getEl(),"mousewheel",r):i.on(o.getEl(),"DOMMouseScroll",r)}}},getRoot:function(){for(var e=this,t,n=[];e;){if(e.rootControl){t=e.rootControl;break}n.push(e),t=e,e=e.parent()}t||(t=this);for(var r=n.length;r--;)n[r].rootControl=t;return t},reflow:function(){return this.repaint(),this}});return u}),r(G,[],function(){var e={},t;return{add:function(t,n){e[t.toLowerCase()]=n},has:function(t){return!!e[t.toLowerCase()]},create:function(n,r){var i,o,a;if(!t){a=tinymce.ui;for(o in a)e[o.toLowerCase()]=a[o];t=!0}if("string"==typeof n?(r=r||{},r.type=n):(r=n,n=r.type),n=n.toLowerCase(),i=e[n],!i)throw new Error("Could not find control by type: "+n);return i=new i(r),i.type=n,i}}}),r(Y,[],function(){return function(e){function t(e){return e=e||b,e&&e.getAttribute("role")}function n(e){for(var n,r=e||b;r=r.parentNode;)if(n=t(r))retur
n n}function r(e){var t=b;return t?t.getAttribute("aria-"+e):void 0}function i(e){var t=e.tagName.toUpperCase();return"INPUT"==t||"TEXTAREA"==t}function o(e){return i(e)&&!e.hidden?!0:/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell)$/.test(t(e))?!0:!1}function a(e){function t(e){if(1==e.nodeType&&"none"!=e.style.display){o(e)&&n.push(e);for(var r=0;r<e.childNodes.length;r++)t(e.childNodes[r])}}var n=[];return t(e||y.getEl()),n}function s(e){var t,n;e=e||C,n=e.parents().toArray(),n.unshift(e);for(var r=0;r<n.length&&(t=n[r],!t.settings.ariaRoot);r++);return t}function l(e){var t=s(e),n=a(t.getEl());t.settings.ariaRemember&&"lastAriaIndex"in t?c(t.lastAriaIndex,n):c(0,n)}function c(e,t){return 0>e?e=t.length-1:e>=t.length&&(e=0),t[e]&&t[e].focus(),e}function u(e,t){var n=-1,r=s();t=t||a(r.getEl());for(var i=0;i<t.length;i++)t[i]===b&&(n=i);n
+=e,r.lastAriaIndex=c(n,t)}function d(){var e=n();"tablist"==e?u(-1,a(b.parentNode)):C.parent().submenu?g():u(-1)}function f(){var e=t(),i=n();"tablist"==i?u(1,a(b.parentNode)):"menuitem"==e&&"menu"==i&&r("haspopup")?v():u(1)}function p(){u(-1)}function m(){var e=t(),i=n();"menuitem"==e&&"menubar"==i?v():"button"==e&&r("haspopup")?v({key:"down"}):u(1)}function h(e){var t=n();if("tablist"==t){var r=a(C.getEl("body"))[0];r&&r.focus()}else u(e.shiftKey?-1:1)}function g(){C.fire("cancel")}function v(e){e=e||{},C.fire("click",{target:b,aria:e})}var y=e.root,b,C;return b=document.activeElement,C=y.getParentCtrl(b),y.on("keydown",function(e){function t(e,t){i(b)||t(e)!==!1&&e.preventDefault()}if(!e.isDefaultPrevented())switch(e.keyCode){case 37:t(e,d);break;case 39:t(e,f);break;case 38:t(e,p);br
eak;case 40:t(e,m);break;case 27:g();break;case 14:case 13:case 32:t(e,v);break;case 9:h(e)!==!1&&e.preventDefault()}}),y.on("focusin",function(e){b=e.target,C=e.control}),{focusFirst:l}}}),r(X,[K,$,q,G,Y,p,j],function(e,t,n,r,i,o,a){var s={};return e.extend({layout:"",innerClass:"container-inner",init:function(e){var n=this;n._super(e),e=n.settings,n._fixed=e.fixed,n._items=new t,n.isRtl()&&n.addClass("rtl"),n.addClass("container"),n.addClass("container-body","body"),e.containerCls&&n.addClass(e.containerCls),n._layout=r.create((e.layout||n.layout)+"layout"),n.settings.items&&n.add(n.settings.items),n._hasBody=!0},items:function(){return this._items},find:function(e){return e=s[e]=s[e]||new n(e),e.find(this)},add:function(e){var t=this;return t.items().add(t.create(e)).parent(t),t},focus:function(e){var t=this,n,r,i;return e&&(r=t.keyboardNav||t.parents().eq(-1)[0
].keyboardNav)?void r.focusFirst(t):(i=t.find("*"),t.statusbar&&i.add(t.statusbar.items()),i.each(function(e){return e.settings.autofocus?(n=null,!1):void(e.canFocus&&(n=n||e))}),n&&n.focus(),t)},replace:function(e,t){for(var n,r=this.items(),i=r.length;i--;)if(r[i]===e){r[i]=t;break}i>=0&&(n=t.getEl(),n&&n.parentNode.removeChild(n),n=e.getEl(),n&&n.parentNode.removeChild(n)),t.parent(this)},create:function(t){var n=this,i,a=[];return o.isArray(t)||(t=[t]),o.each(t,function(t){t&&(t instanceof e||("string"==typeof t&&(t={type:t}),i=o.extend({},n.settings.defaults,t),t.type=i.type=i.type||t.type||n.settings.defaultType||(i.defaults?i.defaults.type:null),t=r.create(i)),a.push(t))}),a},renderNew:function(){var e=this;return e.items().each(function(t,n){var r,i;t.parent(e),t._rendered||(r=e.getEl("body"),i=a.createFragment(t.renderHtml()),r.hasChildNodes()&&n<=r.childNodes.length-
1?r.insertBefore(i,r.childNodes[n]):r.appendChild(i),t.postRender())}),e._layout.applyClasses(e),e._lastRect=null,e},append:function(e){return this.add(e).renderNew()},prepend:function(e){var t=this;return t.items().set(t.create(e).concat(t.items().toArray())),t.renderNew()},insert:function(e,t,n){var r=this,i,o,a;return e=r.create(e),i=r.items(),!n&&t<i.length-1&&(t+=1),t>=0&&t<i.length&&(o=i.slice(0,t).toArray(),a=i.slice(t).toArray(),i.set(o.concat(e,a))),r.renderNew()},fromJSON:function(e){var t=this;for(var n in e)t.find("#"+n).value(e[n]);return t},toJSON:function(){var e=this,t={};return e.find("*").each(function(e){var n=e.name(),r=e.value();n&&"undefined"!=typeof r&&(t[n]=r)}),t},preRender:function(){},renderHtml:function(){var e=this,t=e._layout,n=this.settings.role;return e.preRender(),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes()+'"'+(n?' role="'+
this.settings.role+'"':"")+'><div id="'+e._id+'-body" class="'+e.classes("body")+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></div>"},postRender:function(){var e=this,t;return e.items().exec("postRender"),e._super(),e._layout.postRender(e),e._rendered=!0,e.settings.style&&a.css(e.getEl(),e.settings.style),e.settings.border&&(t=e.borderBox(),a.css(e.getEl(),{"border-top-width":t.top,"border-right-width":t.right,"border-bottom-width":t.bottom,"border-left-width":t.left})),e.parent()||(e.keyboardNav=new i({root:e})),e},initLayoutRect:function(){var e=this,t=e._super();return e._layout.recalc(e),t},recalc:function(){var e=this,t=e._layoutRect,n=e._lastRect;return n&&n.w==t.w&&n.h==t.h?void 0:(e._layout.recalc(e),t=e.layoutRect(),e._lastRect={x:t.x,y:t.y,w:t.w,h:t.h},!0)},reflow:function(){var t;if(this.visible()){fo
r(e.repaintControls=[],e.repaintControls.map={},this.recalc(),t=e.repaintControls.length;t--;)e.repaintControls[t].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),e.repaintControls=[]}return this}})}),r(J,[j],function(e){function t(){var e=document,t,n,r,i,o,a,s,l,c=Math.max;return t=e.documentElement,n=e.body,r=c(t.scrollWidth,n.scrollWidth),i=c(t.clientWidth,n.clientWidth),o=c(t.offsetWidth,n.offsetWidth),a=c(t.scrollHeight,n.scrollHeight),s=c(t.clientHeight,n.clientHeight),l=c(t.offsetHeight,n.offsetHeight),{width:o>r?i:r,height:l>a?s:a}}return function(n,r){function i(){return a.getElementById(r.handle||n)}var o,a=document,s,l,c,u,d,f;r=r||{},l=function(n){var l=t(),p,m;n.preventDefault(),s=n.button,p=i(),d=n.screenX,f=n.screenY,m=window.getComputedStyle?window.getComputedStyle(p,null).getPropertyValue("cursor"):p.runtimeStyle.cursor,o=a.createElement("div"),e.css(o,{position:&q
uot;absolute",top:0,left:0,width:l.width,height:l.height,zIndex:2147483647,opacity:1e-4,background:"red",cursor:m}),a.body.appendChild(o),e.on(a,"mousemove",u),e.on(a,"mouseup",c),r.start(n)
-},u=function(e){return e.button!==s?c(e):(e.deltaX=e.screenX-d,e.deltaY=e.screenY-f,e.preventDefault(),void r.drag(e))},c=function(t){e.off(a,"mousemove",u),e.off(a,"mouseup",c),o.parentNode.removeChild(o),r.stop&&r.stop(t)},this.destroy=function(){e.off(i())},e.on(i(),"mousedown",l)}}),r(Q,[j,J],function(e,t){return{init:function(){var e=this;e.on("repaint",e.renderScroll)},renderScroll:function(){function n(){function t(t,a,s,l,c,u){var d,f,p,m,h,g,v,y,b;if(f=i.getEl("scroll"+t)){if(y=a.toLowerCase(),b=s.toLowerCase(),i.getEl("absend")&&e.css(i.getEl("absend"),y,i.layoutRect()[l]-1),!c)return void e.css(f,"display","none");e.css(f,"display","block"),d=i.getEl("body"),p=i.getEl("scroll"+t+"t"),m=d["client"+s]-2*o,m-=n&&r?f["client"+u]:0,h=d["scroll"+s],g=m/h,v={},v[y]=d["offset"+a]
+o,v[b]=m,e.css(f,v),v={},v[y]=d["scroll"+a]*g,v[b]=m*g,e.css(p,v)}}var n,r,a;a=i.getEl("body"),n=a.scrollWidth>a.clientWidth,r=a.scrollHeight>a.clientHeight,t("h","Left","Width","contentW",n,"Height"),t("v","Top","Height","contentH",r,"Width")}function r(){function n(n,r,a,s,l){var c,u=i._id+"-scroll"+n,d=i.classPrefix;i.getEl().appendChild(e.createFragment('<div id="'+u+'" class="'+d+"scrollbar "+d+"scrollbar-"+n+'"><div id="'+u+'t" class="'+d+'scrollbar-thumb"></div></div>')),i.draghelper=new t(u+"t",{start:function(){c=i.getEl("body")["scroll"+r],e.addClass(e.get(u),d+"active")},drag:function(e){var t,u,d,f,p=i.layoutRect();u=p.contentW>p.innerW,d=p.contentH>p.innerH,f=i.getEl("body")["client"+a]-2
*o,f-=u&&d?i.getEl("scroll"+n)["client"+l]:0,t=f/i.getEl("body")["scroll"+a],i.getEl("body")["scroll"+r]=c+e["delta"+s]/t},stop:function(){e.removeClass(e.get(u),d+"active")}})}i.addClass("scroll"),n("v","Top","Height","Y","Width"),n("h","Left","Width","X","Height")}var i=this,o=2;i.settings.autoScroll&&(i._hasScroll||(i._hasScroll=!0,r(),i.on("wheel",function(e){var t=i.getEl("body");t.scrollLeft+=10*(e.deltaX||0),t.scrollTop+=10*e.deltaY,n()}),e.on(i.getEl("body"),"scroll",n)),n())}}}),r(Z,[X,Q],function(e,t){return e.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[t],renderHtml:function(){var e=this,t=e._layout,n=e.settings.html;return e.preRender(),t.preRender(e),"undefined"==typeof n?n='<div
id="'+e._id+'-body" class="'+e.classes("body")+'">'+t.renderHtml(e)+"</div>":("function"==typeof n&&(n=n.call(e)),e._hasBody=!1),'<div id="'+e._id+'" class="'+e.classes()+'" hidefocus="1" tabindex="-1" role="group">'+(e._preBodyHtml||"")+n+"</div>"}})}),r(et,[j],function(e){function t(t,n,r){var i,o,a,s,l,c,u,d,f,p;return f=e.getViewPort(),o=e.getPos(n),a=o.x,s=o.y,t._fixed&&(a-=f.x,s-=f.y),i=t.getEl(),p=e.getSize(i),l=p.width,c=p.height,p=e.getSize(n),u=p.width,d=p.height,r=(r||"").split(""),"b"===r[0]&&(s+=d),"r"===r[1]&&(a+=u),"c"===r[0]&&(s+=Math.round(d/2)),"c"===r[1]&&(a+=Math.round(u/2)),"b"===r[3]&&(s-=c),"r"===r[4]&&(a-=l),"c"===r[3]&&(s-=Math.round(c/2)),"c"===r[4]
&&(a-=Math.round(l/2)),{x:a,y:s,w:l,h:c}}return{testMoveRel:function(n,r){for(var i=e.getViewPort(),o=0;o<r.length;o++){var a=t(this,n,r[o]);if(this._fixed){if(a.x>0&&a.x+a.w<i.w&&a.y>0&&a.y+a.h<i.h)return r[o]}else if(a.x>i.x&&a.x+a.w<i.w+i.x&&a.y>i.y&&a.y+a.h<i.h+i.y)return r[o]}return r[0]},moveRel:function(e,n){"string"!=typeof n&&(n=this.testMoveRel(e,n));var r=t(this,e,n);return this.moveTo(r.x,r.y)},moveBy:function(e,t){var n=this,r=n.layoutRect();return n.moveTo(r.x+e,r.y+t),n},moveTo:function(t,n){function r(e,t,n){return 0>e?0:e+n>t?(e=t-n,0>e?0:e):e}var i=this;if(i.settings.constrainToViewport){var o=e.getViewPort(window),a=i.layoutRect();t=r(t,o.w+o.x,a.w),n=r(n,o.h+o.y,a.h)}return i._rendered?i.layoutRect({x:t,y:n}).repaint():(i.settings.x=t,i.settings.y=n),i.fire("move",{x:t,y:n}),i}}}),r(tt,[j],function(e){return{resizeToContent:function(){this._layo
utRect.autoResize=!0,this._lastRect=null,this.reflow()},resizeTo:function(t,n){if(1>=t||1>=n){var r=e.getWindowSize();t=1>=t?t*r.w:t,n=1>=n?n*r.h:n}return this._layoutRect.autoResize=!1,this.layoutRect({minW:t,minH:n,w:t,h:n}).reflow()},resizeBy:function(e,t){var n=this,r=n.layoutRect();return n.resizeTo(r.w+e,r.h+t)}}}),r(nt,[Z,et,tt,j],function(e,t,n,r){function i(){function e(e,t){for(;e;){if(e==t)return!0;e=e.parent()}}c||(c=function(t){if(2!=t.button)for(var n=f.length;n--;){var r=f[n],i=r.getParentCtrl(t.target);if(r.settings.autohide){if(i&&(e(i,r)||r.parent()===i))continue;t=r.fire("autohide",{target:t.target}),t.isDefaultPrevented()||r.hide()}}},r.on(document,"click",c))}function o(){u||(u=function(){var e;for(e=f.length;e--;)s(f[e])},r.on(window,"scroll",u))}function a(){d||(d=function(){h.hideAll()},r.on(window,"resize",d))}function s(e){function t(t,n){for(var r,i=0;i<f.length;i++)if(f[i]!=e)for(r=f[i].parent
();r&&(r=r.parent());)r==e&&f[i].fixed(t).moveBy(0,n).repaint()}var n=r.getViewPort().y;e.settings.autofix&&(e._fixed?e._autoFixY>n&&(e.fixed(!1).layoutRect({y:e._autoFixY}).repaint(),t(!1,e._autoFixY-n)):(e._autoFixY=e.layoutRect().y,e._autoFixY<n&&(e.fixed(!0).layoutRect({y:0}).repaint(),t(!0,n-e._autoFixY))))}function l(e){var t;for(t=f.length;t--;)f[t]===e&&f.splice(t,1);for(t=p.length;t--;)p[t]===e&&p.splice(t,1)}var c,u,d,f=[],p=[],m,h=e.extend({Mixins:[t,n],init:function(e){function t(){var e,t=h.zIndex||65535,i;if(p.length)for(e=0;e<p.length;e++)p[e].modal&&(t++,i=p[e]),p[e].getEl().style.zIndex=t,p[e].zIndex=t,t++;var o=document.getElementById(n.classPrefix+"modal-block");i?r.css(o,"z-index",i.zIndex-1):o&&(o.parentNode.removeChild(o),m=!1),h.currentZIndex=t}var n=this;n._super(e),n._eventsRoot=n,n.addClass("floatpanel"),e.autohide&&(i(),a(),f.push(n)),e.au
tofix&&(o(),n.on("move",function(){s(this)})),n.on("postrender show",function(e){if(e.control==n){var i,o=n.classPrefix;n.modal&&!m&&(i=r.createFragment('<div id="'+o+'modal-block" class="'+o+"reset "+o+'fade"></div>'),i=i.firstChild,n.getContainerElm().appendChild(i),setTimeout(function(){r.addClass(i,o+"in"),r.addClass(n.getEl(),o+"in")},0),m=!0),p.push(n),t()}}),n.on("close hide",function(e){if(e.control==n){for(var r=p.length;r--;)p[r]===n&&p.splice(r,1);t()}}),n.on("show",function(){n.parents().each(function(e){return e._fixed?(n.fixed(!0),!1):void 0})}),e.popover&&(n._preBodyHtml='<div class="'+n.classPrefix+'arrow"></div>',n.addClass("popover").addClass("bottom").addClass(n.isRtl()?"end":"start"))},fixed:function(e){var t=this;if(t._fixed!=e){if(t._rendered){var n=r.getViewPo
rt();e?t.layoutRect().y-=n.y:t.layoutRect().y+=n.y}t.toggleClass("fixed",e),t._fixed=e}return t},show:function(){var e=this,t,n=e._super();for(t=f.length;t--&&f[t]!==e;);return-1===t&&f.push(e),n},hide:function(){return l(this),this._super()},hideAll:function(){h.hideAll()},close:function(){var e=this;return e.fire("close"),e.remove()},remove:function(){l(this),this._super()},postRender:function(){var e=this;return e.settings.bodyRole&&this.getEl("body").setAttribute("role",e.settings.bodyRole),e._super()}});return h.hideAll=function(){for(var e=f.length;e--;){var t=f[e];t&&t.settings.autohide&&(t.hide(),f.splice(e,1))}},h}),r(rt,[nt,Z,j,J],function(e,t,n,r){var i=e.extend({modal:!0,Defaults:{border:1,layout:"flex",containerCls:"panel",role:"dialog",callbacks:{submit:function(){this.fire("submit",{data:this.toJSON()})},close:function(){this.close()}}},init:function
(e){var n=this;n._super(e),n.isRtl()&&n.addClass("rtl"),n.addClass("window"),n._fixed=!0,e.buttons&&(n.statusbar=new t({layout:"flex",border:"1 0 0 0",spacing:3,padding:10,align:"center",pack:n.isRtl()?"start":"end",defaults:{type:"button"},items:e.buttons}),n.statusbar.addClass("foot"),n.statusbar.parent(n)),n.on("click",function(e){-1!=e.target.className.indexOf(n.classPrefix+"close")&&n.close()}),n.on("cancel",function(){n.close()}),n.aria("describedby",n.describedBy||n._id+"-none"),n.aria("label",e.title),n._fullscreen=!1},recalc:function(){var e=this,t=e.statusbar,r,i,o,a;e._fullscreen&&(e.layoutRect(n.getWindowSize()),e.layoutRect().contentH=e.layoutRect().innerH),e._super(),r=e.layoutRect(),e.settings.title&&!e._fullscreen&&(i=r.headerW,i>r.w&&(o=r.x-Math.max(0,i/2),e.la
youtRect({w:i,x:o}),a=!0)),t&&(t.layoutRect({w:e.layoutRect().innerW}).recalc(),i=t.layoutRect().minW+r.deltaW,i>r.w&&(o=r.x-Math.max(0,i-r.w),e.layoutRect({w:i,x:o}),a=!0)),a&&e.recalc()},initLayoutRect:function(){var e=this,t=e._super(),r=0,i;if(e.settings.title&&!e._fullscreen){i=e.getEl("head");var o=n.getSize(i);t.headerW=o.width,t.headerH=o.height,r+=t.headerH}e.statusbar&&(r+=e.statusbar.layoutRect().h),t.deltaH+=r,t.minH+=r,t.h+=r;var a=n.getWindowSize();return t.x=Math.max(0,a.w/2-t.w/2),t.y=Math.max(0,a.h/2-t.h/2),t},renderHtml:function(){var e=this,t=e._layout,n=e._id,r=e.classPrefix,i=e.settings,o="",a="",s=i.html;return e.preRender(),t.preRender(e),i.title&&(o='<div id="'+n+'-head" class="'+r+'window-head"><div id="'+n+'-title" class="'+r+'title">'+e.encode(i.title)+'</div><button type="button" class="'+r+'close&quo
t; aria-hidden="true">\xd7</button><div id="'+n+'-dragh" class="'+r+'dragh"></div></div>'),i.url&&(s='<iframe src="'+i.url+'" tabindex="-1"></iframe>'),"undefined"==typeof s&&(s=t.renderHtml(e)),e.statusbar&&(a=e.statusbar.renderHtml()),'<div id="'+n+'" class="'+e.classes()+'" hidefocus="1"><div class="'+e.classPrefix+'reset" role="application">'+o+'<div id="'+n+'-body" class="'+e.classes("body")+'">'+s+"</div>"+a+"</div></div>"},fullscreen:function(e){var t=this,r=document.documentElement,i,o=t.classPrefix,a;if(e!=t._fullscreen)if(n.on(window,"resize",function(){var e;if(t._fullscreen)if(i)t._timer||(t._timer=setTimeout(function(){var e=n.getWindowSize();t.moveTo(0,0).resizeTo(e.w,e.h),t._timer=0},50));else{e=(new Dat
e).getTime();var r=n.getWindowSize();t.moveTo(0,0).resizeTo(r.w,r.h),(new Date).getTime()-e>50&&(i=!0)}}),a=t.layoutRect(),t._fullscreen=e,e){t._initial={x:a.x,y:a.y,w:a.w,h:a.h},t._borderBox=t.parseBox("0"),t.getEl("head").style.display="none",a.deltaH-=a.headerH+2,n.addClass(r,o+"fullscreen"),n.addClass(document.body,o+"fullscreen"),t.addClass("fullscreen");var s=n.getWindowSize();t.moveTo(0,0).resizeTo(s.w,s.h)}else t._borderBox=t.parseBox(t.settings.border),t.getEl("head").style.display="",a.deltaH+=a.headerH,n.removeClass(r,o+"fullscreen"),n.removeClass(document.body,o+"fullscreen"),t.removeClass("fullscreen"),t.moveTo(t._initial.x,t._initial.y).resizeTo(t._initial.w,t._initial.h);return t.reflow()},postRender:function(){var e=this,t;setTimeout(function(){e.addClass("in")},0),e._super(),e.statusbar&&e.statusbar.postRender(),e.focus(),this.dr
agHelper=new r(e._id+"-dragh",{start:function(){t={x:e.layoutRect().x,y:e.layoutRect().y}},drag:function(n){e.moveTo(t.x+n.deltaX,t.y+n.deltaY)}}),e.on("submit",function(t){t.isDefaultPrevented()||e.close()})},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var e=this,t=e.classPrefix;e.dragHelper.destroy(),e._super(),e.statusbar&&this.statusbar.remove(),e._fullscreen&&(n.removeClass(document.documentElement,t+"fullscreen"),n.removeClass(document.body,t+"fullscreen"))},getContentWindow:function(){var e=this.getEl().getElementsByTagName("iframe")[0];return e?e.contentWindow:null}});return i}),r(it,[rt],function(e){var t=e.extend({init:function(e){e={border:1,padding:20,layout:"flex",pack:"center",align:"center",containerCls:"panel",autoScroll:!0,buttons:{type:"button",text:"Ok",action:"ok"},items:{type:&q
uot;label",multiline:!0,maxWidth:500,maxHeight:200}},this._super(e)},Statics:{OK:1,OK_CANCEL:2,YES_NO:3,YES_NO_CANCEL:4,msgBox:function(n){var r,i=n.callback||function(){};switch(n.buttons){case t.OK_CANCEL:r=[{type:"button",text:"Ok",subtype:"primary",onClick:function(e){e.control.parents()[1].close(),i(!0)}},{type:"button",text:"Cancel",onClick:function(e){e.control.parents()[1].close(),i(!1)}}];break;case t.YES_NO:r=[{type:"button",text:"Ok",subtype:"primary",onClick:function(e){e.control.parents()[1].close(),i(!0)}}];break;case t.YES_NO_CANCEL:r=[{type:"button",text:"Ok",subtype:"primary",onClick:function(e){e.control.parents()[1].close()}}];break;default:r=[{type:"button",text:"Ok",subtype:"primary",onClick:function(e){e.control.parents()[1].close(),i(!0)}}]}return new e({padding:20,x:n.x,y:n.y,minWidth:300,minHeight:100,layout:"f
lex",pack:"center",align:"center",buttons:r,title:n.title,role:"alertdialog",items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200,text:n.text},onPostRender:function(){this.aria("describedby",this.items()[0]._id)},onClose:n.onClose,onCancel:function(){i(!1)}}).renderTo(document.body).reflow()},alert:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,t.msgBox(e)},confirm:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,e.buttons=t.OK_CANCEL,t.msgBox(e)}}});return t}),r(ot,[rt,it],function(e,t){return function(n){function r(){return o.length?o[o.length-1]:void 0}var i=this,o=[];i.windows=o,i.open=function(t,r){var i;return n.editorManager.activeEditor=n,t.title=t.title||" ",t.url=t.url||t.file,t.url&&(t.width=parseInt(t.width||320,10),t.height=parseInt(t.height||240,10)),t.body&&(t.items={defaults:t.defaults,type:t.bodyType||"f
orm",items:t.body}),t.url||t.buttons||(t.buttons=[{text:"Ok",subtype:"primary",onclick:function(){i.find("form")[0].submit()}},{text:"Cancel",onclick:function(){i.close()}}]),i=new e(t),o.push(i),i.on("close",function(){for(var e=o.length;e--;)o[e]===i&&o.splice(e,1);n.focus()}),t.data&&i.on("postRender",function(){this.find("*").each(function(e){var n=e.name();n in t.data&&e.value(t.data[n])})}),i.features=t||{},i.params=r||{},n.nodeChanged(),i.renderTo().reflow()},i.alert=function(e,r,i){t.alert(e,function(){r?r.call(i||this):n.focus()})},i.confirm=function(e,n,r){t.confirm(e,function(e){n.call(r||this,e)})},i.close=function(){r()&&r().close()},i.getParams=function(){return r()?r().params:null},i.setParams=function(e){r()&&(r().params=e)},i.getWindows=function(){return o}}}),r(at,[R,B,x,h,g,p],function(e,t,n,r,i,o){return function(a){function s(e,t){try{a.getDoc().exe
cCommand(e,!1,t)}catch(n){}}function l(){var e=a.getDoc().documentMode;return e?e:6}function c(e){return e.isDefaultPrevented()}function u(){function t(e){var t=new i(function(){});o.each(a.getBody().getElementsByTagName("*"),function(e){"SPAN"==e.tagName&&e.setAttribute("mce-data-marked",1),!e.hasAttribute("data-mce-style")&&e.hasAttribute("style")&&a.dom.setAttrib(e,"style",e.getAttribute("style"))}),t.observe(a.getDoc(),{childList:!0,attributes:!0,subtree:!0,attributeFilter:["style"]}),a.getDoc().execCommand(e?"ForwardDelete":"Delete",!1,null);var n=a.selection.getRng(),r=n.startContainer.parentNode;o.each(t.takeRecords(),function(e){if(q.isChildOf(e.target,a.getBody())){if("style"==e.attributeName){var t=e.target.getAttribute("data-mce-style");t?e.target.setAttribute("style",t):e.target.removeAttribute("style")}o.each
(e.addedNodes,function(e){if("SPAN"==e.nodeName&&!e.getAttribute("mce-data-marked")){var t,i;e==r&&(t=n.startOffset,i=e.firstChild),q.remove(e,!0),i&&(n.setStart(i,t),n.setEnd(i,t),a.selection.setRng(n))}})}}),t.disconnect(),o.each(a.dom.select("span[mce-data-marked]"),function(e){e.removeAttribute("mce-data-marked")})}var n=a.getDoc(),r="data:text/mce-internal,",i=window.MutationObserver,s,l;i||(s=!0,i=function(){function e(e){var t=e.relatedNode||e.target;n.push({target:t,addedNodes:[t]})}function t(e){var t=e.relatedNode||e.target;n.push({target:t,attributeName:e.attrName})}var n=[],r;this.observe=function(n){r=n,r.addEventListener("DOMSubtreeModified",e,!1),r.addEventListener("DOMNodeInsertedIntoDocument",e,!1),r.addEventListener("DOMNodeInserted",e,!1),r.addEventListener("DOMAttrModified",t,!1)},this.disconnect=function(){r.removeEventListener("DOMSubtreeModifi
ed",e,!1),r.removeEventListener("DOMNodeInsertedIntoDocument",e,!1),r.removeEventListener("DOMNodeInserted",e,!1),r.removeEventListener("DOMAttrModified",t,!1)},this.takeRecords=function(){return n}}),a.on("keydown",function(n){var r=n.keyCode==U,i=e.metaKeyPressed(n);if(!c(n)&&(r||n.keyCode==V)){var o=a.selection.getRng(),s=o.startContainer,l=o.startOffset;if(!i&&o.collapsed&&3==s.nodeType&&(r?l<s.data.length:l>0))return;n.preventDefault(),i&&a.selection.getSel().modify("extend",r?"forward":"backward","word"),t(r)}}),a.on("keypress",function(n){c(n)||$.isCollapsed()||!n.charCode||e.metaKeyPressed(n)||(n.preventDefault(),t(!0),a.selection.setContent(String.fromCharCode(n.charCode)))}),a.addCommand("Delete",function(){t()}),a.addCommand("ForwardDelete",function(){t(!0)}),s||(a.on("dragstart",function(e){var t;a.sele
ction.isCollapsed()&&"IMG"==e.target.tagName&&$.select(e.target),l=$.getRng(),t=a.selection.getContent(),t.length>0&&e.dataTransfer.setData("URL","data:text/mce-internal,"+escape(t))}),a.on("drop",function(e){if(!c(e)){var i=e.dataTransfer.getData("URL");if(!i||-1==i.indexOf(r)||!n.caretRangeFromPoint)return;i=unescape(i.substr(r.length)),n.caretRangeFromPoint&&(e.preventDefault(),window.setTimeout(function(){var r=n.caretRangeFromPoint(e.x,e.y);l&&($.setRng(l),l=null),t(),$.setRng(r),a.insertContent(i)},0))}}),a.on("cut",function(e){!c(e)&&e.clipboardData&&(e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/html",a.selection.getContent()),e.clipboardData.setData("text/plain",a.selection.getContent({format:"text"})),t(!0))}))}function d(){function e(e){var t=q.create("body"),n=e.cloneContents();return
t.appendChild(n),$.serializer.serialize(t,{format:"html"})}function n(n){if(!n.setStart){if(n.item)return!1;var r=n.duplicate();return r.moveToElementText(a.getBody()),t.compareRanges(n,r)}var i=e(n),o=q.createRng();o.selectNode(a.getBody());var s=e(o);return i===s}a.on("keydown",function(e){var t=e.keyCode,r,i;if(!c(e)&&(t==U||t==V)){if(r=a.selection.isCollapsed(),i=a.getBody(),r&&!q.isEmpty(i))return;if(!r&&!n(a.selection.getRng()))return;e.preventDefault(),a.setContent(""),i.firstChild&&q.isBlock(i.firstChild)?a.selection.setCursorLocation(i.firstChild,0):a.selection.setCursorLocation(i,0),a.nodeChanged()}})}function f(){a.on("keydown",function(t){!c(t)&&65==t.keyCode&&e.metaKeyPressed(t)&&(t.preventDefault(),a.execCommand("SelectAll"))})}function p(){a.settings.content_editable||(q.bind(a.getDoc(),"focusin",function(){$.setRng($.getRng())}),q.bind(a.getDoc(),"
;mousedown",function(e){e.target==a.getDoc().documentElement&&(a.getBody().focus(),$.setRng($.getRng()))}))}function m(){a.on("keydown",function(e){if(!c(e)&&e.keyCode===V){if(!a.getBody().getElementsByTagName("hr").length)return;if($.isCollapsed()&&0===$.getRng(!0).startOffset){var t=$.getNode(),n=t.previousSibling;if("HR"==t.nodeName)return q.remove(t),void e.preventDefault();n&&n.nodeName&&"hr"===n.nodeName.toLowerCase()&&(q.remove(n),e.preventDefault())}}})}function h(){window.Range.prototype.getClientRects||a.on("mousedown",function(e){if(!c(e)&&"HTML"===e.target.nodeName){var t=a.getBody();t.blur(),setTimeout(function(){t.focus()},0)}})}function g(){a.on("click",function(e){e=e.target,/^(IMG|HR)$/.test(e.nodeName)&&$.getSel().setBaseAndExtent(e,0,e,1),"A"==e.nodeName&&q.hasClass(e,"mce-item-anchor")&&$.se
lect(e),a.nodeChanged()})}function v(){function e(){var e=q.getAttribs($.getStart().cloneNode(!1));return function(){var t=$.getStart();t!==a.getBody()&&(q.setAttrib(t,"style",null),W(e,function(e){t.setAttributeNode(e.cloneNode(!0))}))}}function t(){return!$.isCollapsed()&&q.getParent($.getStart(),q.isBlock)!=q.getParent($.getEnd(),q.isBlock)}a.on("keypress",function(n){var r;return c(n)||8!=n.keyCode&&46!=n.keyCode||!t()?void 0:(r=e(),a.getDoc().execCommand("delete",!1,null),r(),n.preventDefault(),!1)}),q.bind(a.getDoc(),"cut",function(n){var r;!c(n)&&t()&&(r=e(),setTimeout(function(){r()},0))})}function y(){var e,n;a.on("selectionchange",function(){n&&(clearTimeout(n),n=0),n=window.setTimeout(function(){if(!a.removed){var n=$.getRng();e&&t.compareRanges(n,e)||(a.nodeChanged(),e=n)}},50)})}function b(){document.body.setAttribute("role","application")}functi
on C(){a.on("keydown",function(e){if(!c(e)&&e.keyCode===V&&$.isCollapsed()&&0===$.getRng(!0).startOffset){var t=$.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})}function x(){l()>7||(s("RespectVisibilityInDesign",!0),a.contentStyles.push(".mceHideBrInPre pre br {display: none}"),q.addClass(a.getBody(),"mceHideBrInPre"),K.addNodeFilter("pre",function(e){for(var t=e.length,r,i,o,a;t--;)for(r=e[t].getAll("br"),i=r.length;i--;)o=r[i],a=o.prev,a&&3===a.type&&"\n"!=a.value.charAt(a.value-1)?a.value+="\n":o.parent.insert(new n("#text",3),o,!0).value="\n"}),G.addNodeFilter("pre",function(e){for(var t=e.length,n,r,i,o;t--;)for(n=e[t].getAll("br"),r=n.length;r--;)i=n[r],o=i.prev,o&&3==o.type&&(o.value=o.value.replace(/\r?\n$/,&qu
ot;"))}))}function w(){q.bind(a.getBody(),"mouseup",function(){var e,t=$.getNode();"IMG"==t.nodeName&&((e=q.getStyle(t,"width"))&&(q.setAttrib(t,"width",e.replace(/[^0-9%]+/g,"")),q.setStyle(t,"width","")),(e=q.getStyle(t,"height"))&&(q.setAttrib(t,"height",e.replace(/[^0-9%]+/g,"")),q.setStyle(t,"height","")))})}function _(){a.on("keydown",function(t){var n,r,i,o,s;if(!c(t)&&t.keyCode==e.BACKSPACE&&(n=$.getRng(),r=n.startContainer,i=n.startOffset,o=q.getRoot(),s=r,n.collapsed&&0===i)){for(;s&&s.parentNode&&s.parentNode.firstChild==s&&s.parentNode!=o;)s=s.parentNode;"BLOCKQUOTE"===s.tagName&&(a.formatter.toggle("blockquote",null,s),n=q.createRng(),n.setStart(r,0),n.setEnd(r,0),$.setRng(n))}})}function N(){function e(){a._refreshContentEditable(),s(&quo
t;StyleWithCSS",!1),s("enableInlineTableEditing",!1),j.object_resizing||s("enableObjectResizing",!1)}j.readonly||a.on("BeforeExecCommand MouseDown",e)}function E(){function e(){W(q.select("a"),function(e){var t=e.parentNode,n=q.getRoot();if(t.lastChild===e){for(;t&&!q.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}q.add(t,"br",{"data-mce-bogus":1})}})}a.on("SetContent ExecCommand",function(t){("setcontent"==t.type||"mceInsertLink"===t.command)&&e()})}function k(){j.forced_root_block&&a.on("init",function(){s("DefaultParagraphSeparator",j.forced_root_block)})}function S(){a.on("Undo Redo SetContent",function(e){e.initial||a.execCommand("mceRepaint")})}function T(){a.on("keydown",function(e){var t;c(e)||e.keyCode!=V||(t=a.getDoc().selection.createRange(),t&&t.item&&(e.preventDef
ault(),a.undoManager.beforeChange(),q.remove(t.item(0)),a.undoManager.add()))})}function R(){var e;l()>=10&&(e="",W("p div h1 h2 h3 h4 h5 h6".split(" "),function(t,n){e+=(n>0?",":"")+t+":empty"}),a.contentStyles.push(e+"{padding-right: 1px !important}"))}function A(){l()<9&&(K.addNodeFilter("noscript",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.firstChild,r&&n.attr("data-mce-innertext",r.value)}),G.addNodeFilter("noscript",function(e){for(var t=e.length,i,o,a;t--;)i=e[t],o=e[t].firstChild,o?o.value=r.decode(o.value):(a=i.attributes.map["data-mce-innertext"],a&&(i.attr("data-mce-innertext",null),o=new n("#text",3),o.value=a,o.raw=!0,i.append(o)))}))}function B(){function e(e,t){var n=i.createTextRange();try{n.moveToPoint(e,t)}catch(r){n=null}return n}function t(t){var r;t.button?(r=e(t.x,t.y),r&&(r.co
mpareEndPoints("StartToStart",a)>0?r.setEndPoint("StartToStart",a):r.setEndPoint("EndToEnd",a),r.select())):n()}function n(){var e=r.selection.createRange();a&&!e.item&&0===e.compareEndPoints("StartToEnd",e)&&a.select(),q.unbind(r,"mouseup",n),q.unbind(r,"mousemove",t),a=o=0}var r=q.doc,i=r.body,o,a,s;r.documentElement.unselectable=!0,q.bind(r,"mousedown contextmenu",function(i){if("HTML"===i.target.nodeName){if(o&&n(),s=r.documentElement,s.scrollHeight>s.clientHeight)return;o=1,a=e(i.x,i.y),a&&(q.bind(r,"mouseup",n),q.bind(r,"mousemove",t),q.getRoot().focus(),a.select())}})}function D(){a.on("keyup focusin mouseup",function(t){65==t.keyCode&&e.metaKeyPressed(t)||$.normalize()},!0)}function L(){a.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")}function M(){a.
inline||a.on("keydown",function(){document.activeElement==document.body&&a.getWin().focus()})}function H(){a.inline||(a.contentStyles.push("body {min-height: 150px}"),a.on("click",function(e){"HTML"==e.target.nodeName&&(a.getBody().focus(),a.selection.normalize(),a.nodeChanged())}))}function P(){i.mac&&a.on("keydown",function(t){!e.metaKeyPressed(t)||37!=t.keyCode&&39!=t.keyCode||(t.preventDefault(),a.selection.getSel().modify("move",37==t.keyCode?"backward":"forward","word"))})}function O(){s("AutoUrlDetect",!1)}function I(){a.inline||a.on("focus blur beforegetcontent",function(){var e=a.dom.create("br");a.getBody().appendChild(e),e.parentNode.removeChild(e)},!0)}function F(){a.on("click",function(e){var t=e.target;do if("A"===t.tagName)return void e.preventDefault();while(t=t.parentNode)}),a.contentStyles.push(&
quot;.mce-content-body {-webkit-touch-callout: none}")}function z(){a.on("init",function(){a.dom.bind(a.getBody(),"submit",function(e){e.preventDefault()})})}var W=o.each,V=e.BACKSPACE,U=e.DELETE,q=a.dom,$=a.selection,j=a.settings,K=a.parser,G=a.serializer,Y=i.gecko,X=i.ie,J=i.webkit;_(),d(),D(),J&&(u(),p(),g(),k(),z(),C(),i.iOS?(y(),M(),H(),F()):f()),X&&i.ie<11&&(m(),b(),x(),w(),T(),R(),A(),B()),i.ie>=11&&(H(),I(),C()),i.ie&&(f(),O()),Y&&(m(),h(),v(),N(),E(),S(),L(),P(),C())}}),r(st,[U],function(e){function t(t){return t._eventDispatcher||(t._eventDispatcher=new e({scope:t,toggleEvent:function(n,r){e.isNative(n)&&t.toggleNativeEvent&&t.toggleNativeEvent(n,r)}})),t._eventDispatcher}return{fire:function(e,n,r){var i=this;if(i.removed&&"remove"!==e)return n;if(n=t(i).fire(e,n,r),r!==!1&&i.parent)for(var o=i.parent();o&&!n.isPropagationStopped();)o.fire(e,n,!
1),o=o.parent();return n},on:function(e,n,r){return t(this).on(e,n,r)},off:function(e,n){return t(this).off(e,n)},once:function(e,n){return t(this).once(e,n)},hasEventListeners:function(e){return t(this).has(e)}}}),r(lt,[st,y,p],function(e,t,n){function r(e,t){return"selectionchange"==t?e.getDoc():!e.inline&&/^mouse|click|contextmenu|drop|dragover|dragend/.test(t)?e.getDoc():e.getBody()}function i(e,t){var n=e.settings.event_root,i=e.editorManager,a=i.eventRootElm||r(e,t);if(n){if(i.rootEvents||(i.rootEvents={},i.on("RemoveEditor",function(){i.activeEditor||(o.unbind(a),delete i.rootEvents)})),i.rootEvents[t])return;a==e.getBody()&&(a=o.select(n)[0],i.eventRootElm=a),i.rootEvents[t]=!0,o.bind(a,t,function(e){for(var n=e.target,r=i.editors,a=r.length;a--;){var s=r[a].getBody();(s===n||o.isChildOf(n,s))&&(r[a].hidden||r[a].fire(t,e))}})}else e.dom.bind(a,t,function(n){e.hidden||e.fire(t,n)})}var o=t.DOM,a={bindPendingEventDelegates:function(
){var e=this;n.each(e._pendingNativeEvents,function(t){i(e,t)})},toggleNativeEvent:function(e,t){var n=this;n.settings.readonly||"focus"!=e&&"blur"!=e&&(t?n.initialized?i(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&n.dom.unbind(r(n,e),e))}};return a=n.extend({},e,a)}),r(ct,[p,g],function(e,t){var n=e.each,r=e.explode,i={f9:120,f10:121,f11:122};return function(o){var a=this,s={};o.on("keyup keypress keydown",function(e){(e.altKey||e.ctrlKey||e.metaKey)&&n(s,function(n){var r=t.mac?e.metaKey:e.ctrlKey;if(n.ctrl==r&&n.alt==e.altKey&&n.shift==e.shiftKey)return e.keyCode==n.keyCode||e.charCode&&e.charCode==n.charCode?(e.preventDefault(),"keydown"==e.type&&n.func.call(n.scope),!0):void 0})}),a.add=function(t,a,l,c){var u;return u=l,"string"==typeof l?l=function(){o.execCommand(u,!1,null)}:e.isArray(u)&&(l=functio
n(){o.execCommand(u[0],u[1],u[2])}),n(r(t.toLowerCase()),function(e){var t={func:l,scope:c||o,desc:o.translate(a),alt:!1,ctrl:!1,shift:!1};n(r(e,"+"),function(e){switch(e){case"alt":case"ctrl":case"shift":t[e]=!0;break;default:/^[0-9]{2,}$/.test(e)?t.keyCode=parseInt(e,10):(t.charCode=e.charCodeAt(0),t.keyCode=i[e]||e.toUpperCase().charCodeAt(0))}}),s[(t.ctrl?"ctrl":"")+","+(t.alt?"alt":"")+","+(t.shift?"shift":"")+","+t.keyCode]=t}),!0}}}),r(ut,[y,C,x,S,k,L,P,O,I,F,z,W,b,l,ot,w,N,at,g,p,lt,ct],function(e,n,r,i,o,a,s,l,c,u,d,f,p,m,h,g,v,y,b,C,x,w){function _(e,t,r){var i=this,o,a;o=i.documentBaseUrl=r.documentBaseURL,a=r.baseURI,i.settings=t=S({id:e,theme:"modern",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:o,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_u
rls:!0,remove_script_host:!0,object_resizing:!0,doctype:"<!DOCTYPE html>",visual:!0,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,padd_empty_editor:!0,render_ui:!0,indentation:"30px",inline_styles:!0,convert_fonts_to_spans:!0,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",validate:!0,entity_encoding:"named",url_converter:i.convertURL,url_converter_scope:i,ie7_compat:!0},t),n.language=t.language||"en",n.languageLoad=t.lang
uage_load,n.baseURL=r.baseURL,i.id=t.id=e,i.isNotDirty=!0,i.plugins={},i.documentBaseURI=new f(t.document_base_url||o,{base_uri:a}),i.baseURI=a,i.contentCSS=[],i.contentStyles=[],i.shortcuts=new w(i),i.execCommands={},i.queryStateCommands={},i.queryValueCommands={},i.loadedCSS={},i.suffix=r.suffix,i.editorManager=r,i.inline=t.inline,r.fire("SetupEditor",i),i.execCallback("setup",i)}var N=e.DOM,E=n.ThemeManager,k=n.PluginManager,S=C.extend,T=C.each,R=C.explode,A=C.inArray,B=C.trim,D=C.resolve,L=m.Event,M=b.gecko,H=b.ie;return _.prototype={render:function(){function e(){N.unbind(window,"ready",e),n.render()}function t(){var e=p.ScriptLoader;if(r.language&&"en"!=r.language&&!r.language_url&&(r.language_url=n.editorManager.baseURL+"/langs/"+r.language+".js"),r.language_url&&e.add(r.language_url),r.theme&&"function"!=typeof r.theme&&"-"!=r.theme.charAt(0)&&a
mp;!E.urls[r.theme]){var t=r.theme_url;t=t?n.documentBaseURI.toAbsolute(t):"themes/"+r.theme+"/theme"+o+".js",E.load(r.theme,t)}C.isArray(r.plugins)&&(r.plugins=r.plugins.join(" ")),T(r.external_plugins,function(e,t){k.load(t,e),r.plugins+=" "+t}),T(r.plugins.split(/[ ,]/),function(e){if(e=B(e),e&&!k.urls[e])if("-"==e.charAt(0)){e=e.substr(1,e.length);var t=k.dependencies(e);T(t,function(e){var t={prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"};e=k.createUrl(t,e),k.load(e.resource,e)})}else k.load(e,{prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"})}),e.loadQueue(function(){n.removed||n.init()})}var n=this,r=n.settings,i=n.id,o=n.suffix;if(!L.domLoaded)return void N.bind(window,"ready",e);if(n.getElement()&&b.contentEditable){r.inline?n.inline=!0:(n.orgVisibility=n.getElement().style.visibility,n.getElement().style.vis
ibility="hidden");var a=n.getElement().form||N.getParent(i,"form");a&&(n.formElement=a,r.hidden_input&&!/TEXTAREA|INPUT/i.test(n.getElement().nodeName)&&(N.insertAfter(N.create("input",{type:"hidden",name:i}),i),n.hasHiddenInput=!0),n.formEventDelegate=function(e){n.fire(e.type,e)},N.bind(a,"submit reset",n.formEventDelegate),n.on("reset",function(){n.setContent(n.startContent,{format:"raw"})}),!r.submit_patch||a.submit.nodeType||a.submit.length||a._mceOldSubmit||(a._mceOldSubmit=a.submit,a.submit=function(){return n.editorManager.triggerSave(),n.isNotDirty=!0,a._mceOldSubmit(a)})),n.windowManager=new h(n),"xml"==r.encoding&&n.on("GetContent",function(e){e.save&&(e.content=N.encode(e.content))}),r.add_form_submit_trigger&&n.on("submit",function(){n.initialized&&n.save()}),r.add_unload_trigger&&(n._beforeUnload=function(){
!n.initialized||n.destroyed||n.isHidden()||n.save({format:"raw",no_events:!0,set_dirty:!1})},n.editorManager.on("BeforeUnload",n._beforeUnload)),t()}},init:function(){function e(n){var r=k.get(n),i,o;i=k.urls[n]||t.documentBaseUrl.replace(/\/$/,""),n=B(n),r&&-1===A(h,n)&&(T(k.dependencies(n),function(t){e(t)}),o=new r(t,i),t.plugins[n]=o,o.init&&(o.init(t,i),h.push(n)))
-}var t=this,n=t.settings,r=t.getElement(),i,o,a,s,l,c,u,d,f,p,m,h=[];if(t.rtl=this.editorManager.i18n.rtl,t.editorManager.add(t),n.aria_label=n.aria_label||N.getAttrib(r,"aria-label",t.getLang("aria.rich_text_area")),n.theme&&("function"!=typeof n.theme?(n.theme=n.theme.replace(/-/,""),c=E.get(n.theme),t.theme=new c(t,E.urls[n.theme]),t.theme.init&&t.theme.init(t,E.urls[n.theme]||t.documentBaseUrl.replace(/\/$/,""))):t.theme=n.theme),T(n.plugins.replace(/\-/g,"").split(/[ ,]/),e),n.render_ui&&t.theme&&(t.orgDisplay=r.style.display,"function"!=typeof n.theme?(i=n.width||r.style.width||r.offsetWidth,o=n.height||r.style.height||r.offsetHeight,a=n.min_height||100,p=/^[0-9\.]+(|px)$/i,p.test(""+i)&&(i=Math.max(parseInt(i,10),100)),p.test(""+o)&&(o=Math.max(parseInt(o,10),a)),l=t.theme.renderUI({targetNode:r,width:i,height:o,deltaWidth:n.delta_width,del
taHeight:n.delta_height}),n.content_editable||(N.setStyles(l.sizeContainer||l.editorContainer,{wi2dth:i,h2eight:o}),o=(l.iframeHeight||o)+("number"==typeof o?l.deltaHeight||0:""),a>o&&(o=a))):(l=n.theme(t,r),l.editorContainer.nodeType&&(l.editorContainer=l.editorContainer.id=l.editorContainer.id||t.id+"_parent"),l.iframeContainer.nodeType&&(l.iframeContainer=l.iframeContainer.id=l.iframeContainer.id||t.id+"_iframecontainer"),o=l.iframeHeight||r.offsetHeight),t.editorContainer=l.editorContainer),n.content_css&&T(R(n.content_css),function(e){t.contentCSS.push(t.documentBaseURI.toAbsolute(e))}),n.content_style&&t.contentStyles.push(n.content_style),n.content_editable)return r=s=l=null,t.initContentBody();for(t.iframeHTML=n.doctype+"<html><head>",n.document_base_url!=t.documentBaseUrl&&(t.iframeHTML+='<base href="'+t.documentBaseURI.getURI()+'" />'),!b.caretAf
ter&&n.ie7_compat&&(t.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" />'),t.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',m=0;m<t.contentCSS.length;m++){var g=t.contentCSS[m];t.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+g+'" />',t.loadedCSS[g]=!0}d=n.body_id||"tinymce",-1!=d.indexOf("=")&&(d=t.getParam("body_id","","hash"),d=d[t.id]||d),f=n.body_class||"",-1!=f.indexOf("=")&&(f=t.getParam("body_class","","hash"),f=f[t.id]||""),t.iframeHTML+='</head><body id="'+d+'" class="mce-content-body '+f+'" onload="window.parent.tinymce.get(\''+t.id+"').fire('load');\"><br></body></html>";var v='javascript:(function(){document.
open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody(true);})()';if(document.domain!=location.hostname&&(u=v),s=N.add(l.iframeContainer,"iframe",{id:t.id+"_ifr",src:u||'javascript:""',frameBorder:"0",allowTransparency:"true",title:t.editorManager.translate("Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help"),style:{width:"100%",height:o,display:"block"}}),H)try{t.getDoc()}catch(y){s.src=u=v}t.contentAreaContainer=l.iframeContainer,l.editorContainer&&(N.get(l.editorContainer).style.display=t.orgDisplay),N.get(t.id).style.display="none",N.setAttrib(t.id,"aria-hidden",!0),u||t.initContentBody(),r=s=l=null},initContentBody:function(t){var n=this,o=n.settings,f=N.get(n.id),p=n.getDoc(),m,h;o.inline||(n.getElement()
.style.visibility=n.orgVisibility),t||o.content_editable||(p.open(),p.write(n.iframeHTML),p.close()),o.content_editable&&(n.on("remove",function(){var e=this.getBody();N.removeClass(e,"mce-content-body"),N.removeClass(e,"mce-edit-focus"),N.setAttrib(e,"contentEditable",null)}),N.addClass(f,"mce-content-body"),n.contentDocument=p=o.content_document||document,n.contentWindow=o.content_window||window,n.bodyElement=f,o.content_document=o.content_window=null,o.root_name=f.nodeName.toLowerCase()),m=n.getBody(),m.disabled=!0,o.readonly||(n.inline&&"static"==N.getStyle(m,"position",!0)&&(m.style.position="relative"),m.contentEditable=n.getParam("content_editable_state",!0)),m.disabled=!1,n.schema=new g(o),n.dom=new e(p,{keep_values:!0,url_converter:n.convertURL,url_converter_scope:n,hex_colors:o.force_hex_style_colors,class_filter:o.class_filter,update_styles:!0,root_element:o.c
ontent_editable?n.id:null,collect:o.content_editable,schema:n.schema,onSetAttrib:function(e){n.fire("SetAttrib",e)}}),n.parser=new v(o,n.schema),n.parser.addAttributeFilter("src,href,style,tabindex",function(e,t){for(var r=e.length,i,o=n.dom,a,s;r--;)i=e[r],a=i.attr(t),s="data-mce-"+t,i.attributes.map[s]||("style"===t?(a=o.serializeStyle(o.parseStyle(a),i.name),a.length||(a=null),i.attr(s,a),i.attr(t,a)):"tabindex"===t?(i.attr(s,a),i.attr(t,null)):i.attr(s,n.convertURL(a,t,i.name)))}),n.parser.addNodeFilter("script",function(e){for(var t=e.length,n;t--;)n=e[t],n.attr("type","mce-"+(n.attr("type")||"no/type"))}),n.parser.addNodeFilter("#cdata",function(e){for(var t=e.length,n;t--;)n=e[t],n.type=8,n.name="#comment",n.value="[CDATA["+n.value+"]]"}),n.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var t=e.length,i,o=n.schem
a.getNonEmptyElements();t--;)i=e[t],i.isEmpty(o)&&(i.empty().append(new r("br",1)).shortEnded=!0)}),n.serializer=new i(o,n),n.selection=new a(n.dom,n.getWin(),n.serializer,n),n.formatter=new s(n),n.undoManager=new l(n),n.forceBlocks=new u(n),n.enterKey=new c(n),n.editorCommands=new d(n),n.fire("PreInit"),o.browser_spellcheck||o.gecko_spellcheck||(p.body.spellcheck=!1,N.setAttrib(m,"spellcheck","false")),n.fire("PostRender"),n.quirks=y(n),o.directionality&&(m.dir=o.directionality),o.nowrap&&(m.style.whiteSpace="nowrap"),o.protect&&n.on("BeforeSetContent",function(e){T(o.protect,function(t){e.content=e.content.replace(t,function(e){return"<!--mce:protected "+escape(e)+"-->"})})}),n.on("SetContent",function(){n.addVisual(n.getBody())}),o.padd_empty_editor&&n.on("PostProcess",function(e){e.content=e.content.replace(/^(<p[^>]*&g
t;( | |\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")}),n.load({initial:!0,format:"html"}),n.startContent=n.getContent({format:"raw"}),n.initialized=!0,n.bindPendingEventDelegates(),n.fire("init"),n.focus(!0),n.nodeChanged({initial:!0}),n.execCallback("init_instance_callback",n),n.contentStyles.length>0&&(h="",T(n.contentStyles,function(e){h+=e+"\r\n"}),n.dom.addStyle(h)),T(n.contentCSS,function(e){n.loadedCSS[e]||(n.dom.loadCSS(e),n.loadedCSS[e]=!0)}),o.auto_focus&&setTimeout(function(){var e=n.editorManager.get(o.auto_focus);e.selection.select(e.getBody(),1),e.selection.collapse(1),e.getBody().focus(),e.getWin().focus()},100),f=p=m=null},focus:function(e){var t,n=this,r=n.selection,i=n.settings.content_editable,o,a,s=n.getDoc(),l;if(!e){if(o=r.getRng(),o.item&&(a=o.item(0)),n._refreshContentEditable(),i||(b.opera||n.getBody().focus(),n.getWin().focus()),M||
i){if(l=n.getBody(),l.setActive)try{l.setActive()}catch(c){l.focus()}else l.focus();i&&r.normalize()}a&&a.ownerDocument==s&&(o=s.body.createControlRange(),o.addElement(a),o.select())}n.editorManager.activeEditor!=n&&((t=n.editorManager.activeEditor)&&t.fire("deactivate",{relatedTarget:n}),n.fire("activate",{relatedTarget:t})),n.editorManager.activeEditor=n},execCallback:function(e){var t=this,n=t.settings[e],r;if(n)return t.callbackLookup&&(r=t.callbackLookup[e])&&(n=r.func,r=r.scope),"string"==typeof n&&(r=n.replace(/\.\w+$/,""),r=r?D(r):0,n=D(n),t.callbackLookup=t.callbackLookup||{},t.callbackLookup[e]={func:n,scope:r}),n.apply(r||t,Array.prototype.slice.call(arguments,1))},translate:function(e){var t=this.settings.language||"en",n=this.editorManager.i18n;return e?n.data[t+"."+e]||e.replace(/\{\#([^\}]+)\}/g,function(e,r){return n.data[t+"."+r]||&qu
ot;{#"+r+"}"}):""},getLang:function(e,n){return this.editorManager.i18n.data[(this.settings.language||"en")+"."+e]||(n!==t?n:"{#"+e+"}")},getParam:function(e,t,n){var r=e in this.settings?this.settings[e]:t,i;return"hash"===n?(i={},"string"==typeof r?T(r.split(r.indexOf("=")>0?/[;,](?![^=;,]*(?:[;,]|$))/:","),function(e){e=e.split("="),i[B(e[0])]=B(e.length>1?e[1]:e)}):i=r,i):r},nodeChanged:function(e){var t=this,n=t.selection,r,i,o;!t.initialized||t.settings.disable_nodechange||t.settings.readonly||(o=t.getBody(),r=n.getStart()||o,r=H&&r.ownerDocument!=t.getDoc()?t.getBody():r,"IMG"==r.nodeName&&n.isCollapsed()&&(r=r.parentNode),i=[],t.dom.getParent(r,function(e){return e===o?!0:void i.push(e)}),e=e||{},e.element=r,e.parents=i,t.fire("NodeChange",e))},addButton:function(e,t){var n=this;t.cmd&&(t.onclick=function
(){n.execCommand(t.cmd)}),t.text||t.icon||(t.icon=e),n.buttons=n.buttons||{},t.tooltip=t.tooltip||t.title,n.buttons[e]=t},addMenuItem:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),n.menuItems=n.menuItems||{},n.menuItems[e]=t},addCommand:function(e,t,n){this.execCommands[e]={func:t,scope:n||this}},addQueryStateHandler:function(e,t,n){this.queryStateCommands[e]={func:t,scope:n||this}},addQueryValueHandler:function(e,t,n){this.queryValueCommands[e]={func:t,scope:n||this}},addShortcut:function(e,t,n,r){this.shortcuts.add(e,t,n,r)},execCommand:function(e,t,n,r){var i=this,o=0,a;if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(e)||r&&r.skip_focus||i.focus(),r=S({},r),r=i.fire("BeforeExecCommand",{command:e,ui:t,value:n}),r.isDefaultPrevented())return!1;if((a=i.execCommands[e])&&a.func.call(a.scope,t,n)!==!0)return i.fire("ExecCommand",{command:e,ui:t,value:n}),!0;if(T(i.plugins,function(r)
{return r.execCommand&&r.execCommand(e,t,n)?(i.fire("ExecCommand",{command:e,ui:t,value:n}),o=!0,!1):void 0}),o)return o;if(i.theme&&i.theme.execCommand&&i.theme.execCommand(e,t,n))return i.fire("ExecCommand",{command:e,ui:t,value:n}),!0;if(i.editorCommands.execCommand(e,t,n))return i.fire("ExecCommand",{command:e,ui:t,value:n}),!0;try{o=i.getDoc().execCommand(e,t,n)}catch(s){}return o?(i.fire("ExecCommand",{command:e,ui:t,value:n}),!0):!1},queryCommandState:function(e){var t=this,n,r;if(!t._isHidden()){if((n=t.queryStateCommands[e])&&(r=n.func.call(n.scope),r===!0||r===!1))return r;if(r=t.editorCommands.queryCommandState(e),-1!==r)return r;try{return t.getDoc().queryCommandState(e)}catch(i){}}},queryCommandValue:function(e){var n=this,r,i;if(!n._isHidden()){if((r=n.queryValueCommands[e])&&(i=r.func.call(r.scope),i!==!0))return i;if(i=n.editorCommands.queryCommandValue(e),i!==t)return i;try{return n.getD
oc().queryCommandValue(e)}catch(o){}}},show:function(){var e=this;e.hidden&&(e.hidden=!1,e.inline?e.getBody().contentEditable=!0:(N.show(e.getContainer()),N.hide(e.id)),e.load(),e.fire("show"))},hide:function(){var e=this,t=e.getDoc();e.hidden||(H&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable=!1,e==e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(N.hide(e.getContainer()),N.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.fire("hide"))},isHidden:function(){return!!this.hidden},setProgressState:function(e,t){this.fire("ProgressState",{state:e,time:t})},load:function(e){var n=this,r=n.getElement(),i;return r?(e=e||{},e.load=!0,i=n.setContent(r.value!==t?r.value:r.innerHTML,e),e.element=r,e.no_events||n.fire("LoadContent",e),e.element=r=null,i):void 0},save:function(e){var t=this,n=t.getElement(),r,i;if(n&&t.initi
alized)return e=e||{},e.save=!0,e.element=n,r=e.content=t.getContent(e),e.no_events||t.fire("SaveContent",e),r=e.content,/TEXTAREA|INPUT/i.test(n.nodeName)?n.value=r:(t.inline||(n.innerHTML=r),(i=N.getParent(t.id,"form"))&&T(i.elements,function(e){return e.name==t.id?(e.value=r,!1):void 0})),e.element=n=null,e.set_dirty!==!1&&(t.isNotDirty=!0),r},setContent:function(e,t){var n=this,r=n.getBody(),i;return t=t||{},t.format=t.format||"html",t.set=!0,t.content=e,t.no_events||n.fire("BeforeSetContent",t),e=t.content,0===e.length||/^\s+$/.test(e)?(i=n.settings.forced_root_block,i&&n.schema.isValidChild(r.nodeName.toLowerCase(),i.toLowerCase())?(e=H&&11>H?"":'<br data-mce-bogus="1">',e=n.dom.createHTML(i,n.settings.forced_root_block_attrs,e)):H||(e='<br data-mce-bogus="1">'),r.innerHTML=e,n.fire("SetContent",t)):("raw"!==t.format&&(e=new o({},n.sc
hema).serialize(n.parser.parse(e,{isRootContent:!0}))),t.content=B(e),n.dom.setHTML(r,t.content),t.no_events||n.fire("SetContent",t)),t.content},getContent:function(e){var t=this,n,r=t.getBody();return e=e||{},e.format=e.format||"html",e.get=!0,e.getInner=!0,e.no_events||t.fire("BeforeGetContent",e),n="raw"==e.format?r.innerHTML:"text"==e.format?r.innerText||r.textContent:t.serializer.serialize(r,e),e.content="text"!=e.format?B(n):n,e.no_events||t.fire("GetContent",e),e.content},insertContent:function(e,t){t&&(e=S({content:e},t)),this.execCommand("mceInsertContent",!1,e)},isDirty:function(){return!this.isNotDirty},getContainer:function(){var e=this;return e.container||(e.container=N.get(e.editorContainer||e.id+"_parent")),e.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return N.get(this.settings.content_element||this.id)},getWin:fu
nction(){var e=this,t;return e.contentWindow||(t=N.get(e.id+"_ifr"),t&&(e.contentWindow=t.contentWindow)),e.contentWindow},getDoc:function(){var e=this,t;return e.contentDocument||(t=e.getWin(),t&&(e.contentDocument=t.document)),e.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(e,t,n){var r=this,i=r.settings;return i.urlconverter_callback?r.execCallback("urlconverter_callback",e,n,!0,t):!i.convert_urls||n&&"LINK"==n.nodeName||0===e.indexOf("file:")||0===e.length?e:i.relative_urls?r.documentBaseURI.toRelative(e):e=r.documentBaseURI.toAbsolute(e,i.remove_script_host)},addVisual:function(e){var n=this,r=n.settings,i=n.dom,o;e=e||n.getBody(),n.hasVisual===t&&(n.hasVisual=r.visual),T(i.select("table,a",e),function(e){var t;switch(e.nodeName){case"TABLE":return o=r.visual_table_class||"mce-item-table",t=i.getAttrib(e,"border")
,void(t&&"0"!=t||(n.hasVisual?i.addClass(e,o):i.removeClass(e,o)));case"A":return void(i.getAttrib(e,"href",!1)||(t=i.getAttrib(e,"name")||e.id,o=r.visual_anchor_class||"mce-item-anchor",t&&(n.hasVisual?i.addClass(e,o):i.removeClass(e,o))))}}),n.fire("VisualAid",{element:e,hasVisual:n.hasVisual})},remove:function(){var e=this;if(!e.removed){e.save(),e.removed=1,e.hasHiddenInput&&N.remove(e.getElement().nextSibling),e.inline||(H&&10>H&&e.getDoc().execCommand("SelectAll",!1,null),N.setStyle(e.id,"display",e.orgDisplay),e.getBody().onload=null,L.unbind(e.getWin()),L.unbind(e.getDoc()));var t=e.getContainer();L.unbind(e.getBody()),L.unbind(t),e.fire("remove"),e.editorManager.remove(e),N.remove(t),e.destroy()}},destroy:function(e){var t=this,n;if(!t.destroyed){if(!e&&!t.removed)return void t.remove();e&&M&&(L.unbind(t.getDoc()),L.unb
ind(t.getWin()),L.unbind(t.getBody())),e||(t.editorManager.off("beforeunload",t._beforeUnload),t.theme&&t.theme.destroy&&t.theme.destroy(),t.selection.destroy(),t.dom.destroy()),n=t.formElement,n&&(n._mceOldSubmit&&(n.submit=n._mceOldSubmit,n._mceOldSubmit=null),N.unbind(n,"submit reset",t.formEventDelegate)),t.contentAreaContainer=t.formElement=t.container=t.editorContainer=null,t.settings.content_element=t.bodyElement=t.contentDocument=t.contentWindow=null,t.selection&&(t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null),t.destroyed=1}},_refreshContentEditable:function(){var e=this,t,n;e._isHidden()&&(t=e.getBody(),n=t.parentNode,n.removeChild(t),n.appendChild(t),t.focus())},_isHidden:function(){var e;return M?(e=this.selection.getSel(),!e||!e.rangeCount||0===e.rangeCount):0}},S(_.prototype,x),_}),r(dt,[],function(){var e={};return{rtl:!1,add:function(t,n){for(var r in n)e[r]=n[r];this.rtl=this.r
tl||"rtl"===e._dir},translate:function(t){if("undefined"==typeof t)return t;if("string"!=typeof t&&t.raw)return t.raw;if(t.push){var n=t.slice(1);t=(e[t[0]]||t[0]).replace(/\{([^\}]+)\}/g,function(e,t){return n[t]})}return e[t]||t},data:e}}),r(ft,[y,g],function(e,t){function n(e){function s(){try{return document.activeElement}catch(e){return document.body}}function l(e,t){if(t&&t.startContainer){if(!e.isChildOf(t.startContainer,e.getRoot())||!e.isChildOf(t.endContainer,e.getRoot()))return;return{startContainer:t.startContainer,startOffset:t.startOffset,endContainer:t.endContainer,endOffset:t.endOffset}}return t}function c(e,t){var n;return t.startContainer?(n=e.getDoc().createRange(),n.setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset)):n=t,n}function u(e){return!!a.getParent(e,n.isEditorUIElement)}function d(n){var d=n.editor;d.on("init",function(){(d.inline||t.ie)&&(d.on("nodechange key
up",function(){var e=document.activeElement;e&&e.id==d.id+"_ifr"&&(e=d.getBody()),d.dom.isChildOf(e,d.getBody())&&(d.lastRng=d.selection.getRng())}),t.webkit&&!r&&(r=function(){var t=e.activeEditor;if(t&&t.selection){var n=t.selection.getRng();n&&!n.collapsed&&(d.lastRng=n)}},a.bind(document,"selectionchange",r)))}),d.on("setcontent",function(){d.lastRng=null}),d.on("mousedown",function(){d.selection.lastFocusBookmark=null}),d.on("focusin",function(){var t=e.focusedEditor;d.selection.lastFocusBookmark&&(d.selection.setRng(c(d,d.selection.lastFocusBookmark)),d.selection.lastFocusBookmark=null),t!=d&&(t&&t.fire("blur",{focusedEditor:d}),e.activeEditor=d,e.focusedEditor=d,d.fire("focus",{blurredEditor:t}),d.focus(!0)),d.lastRng=null}),d.on("focusout",function(){window.setTimeout(function(){var t=e.focusedEditor;u(s(
))||t!=d||(d.fire("blur",{focusedEditor:null}),e.focusedEditor=null,d.selection&&(d.selection.lastFocusBookmark=null))},0)}),i||(i=function(t){var n=e.activeEditor;n&&t.target.ownerDocument==document&&(n.selection&&(n.selection.lastFocusBookmark=l(n.dom,n.lastRng)),u(t.target)||e.focusedEditor!=n||(n.fire("blur",{focusedEditor:null}),e.focusedEditor=null))},a.bind(document,"focusin",i)),d.inline&&!o&&(o=function(t){var n=e.activeEditor;if(n.inline&&!n.dom.isChildOf(t.target,n.getBody())){var r=n.selection.getRng();r.collapsed||(n.lastRng=r)}},a.bind(document,"mouseup",o))}function f(t){e.focusedEditor==t.editor&&(e.focusedEditor=null),e.activeEditor||(a.unbind(document,"selectionchange",r),a.unbind(document,"focusin",i),a.unbind(document,"mouseup",o),r=i=o=null)}e.on("AddEditor",d),e.on("RemoveEditor",f)}var r,i,o,a=e.DOM;return n.
isEditorUIElement=function(e){return-1!==e.className.toString().indexOf("mce-")},n}),r(pt,[ut,y,W,g,p,st,dt,ft],function(e,t,n,r,i,o,a,s){function l(e){var t=g.editors,n;delete t[e.id];for(var r=0;r<t.length;r++)if(t[r]==e){t.splice(r,1),n=!0;break}return g.activeEditor==e&&(g.activeEditor=t[0]),g.focusedEditor==e&&(g.focusedEditor=null),n}function c(e){return e&&!(e.getContainer()||e.getBody()).parentNode&&(l(e),e.destroy(!0),e=null),e}var u=t.DOM,d=i.explode,f=i.each,p=i.extend,m=0,h,g;return g={majorVersion:"4",minorVersion:"0.29",releaseDate:"2014-06-xx",editors:[],i18n:a,activeEditor:null,setup:function(){var e=this,t,r,i="",o,a;if(r=document.location.href,/^[^:]+:\/\/\/?[^\/]+\//.test(r)&&(r=r.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(r)||(r+="/")),o=window.tinymce||window.tinyMCEPreInit)t=o.base||o.baseURL,i=o.suffix;else{for(var l
=document.getElementsByTagName("script"),c=0;c<l.length;c++)if(a=l[c].src,/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(a)){-1!=a.indexOf(".min")&&(i=".min"),t=a.substring(0,a.lastIndexOf("/"));break}!t&&document.currentScript&&(a=document.currentScript.src,-1!=a.indexOf(".min")&&(i=".min"),t=a.substring(0,a.lastIndexOf("/")))}e.baseURL=new n(r).toAbsolute(t),e.documentBaseURL=r,e.baseURI=new n(e.baseURL),e.suffix=i,e.focusManager=new s(e)},init:function(t){function n(e){var t=e.id;return t||(t=e.name,t=t&&!u.get(t)?e.name:u.uniqueId(),e.setAttribute("id",t)),t}function r(t,n){if(!c(s.get(t))){var r=new e(t,n,s);l.push(r),r.render()}}function i(e,t,n){var r=e[t];if(r)return r.apply(n||this,Array.prototype.slice.call(arguments,2))}function o(e,t){return t.constructor===RegExp?t.test(e.className):u.hasClass(e,t)}function a(){var c,g;if(u.unbind(window,"r
eady",a),i(t,"onpageload"),t.types)return void f(t.types,function(e){f(u.select(e.selector),function(i){r(n(i),p({},t,e))})});if(t.selector)return void f(u.select(t.selector),function(e){r(n(e),t)});switch(t.mode){case"exact":c=t.elements||"",c.length>0&&f(d(c),function(n){u.get(n)?(h=new e(n,t,s),l.push(h),h.render()):f(document.forms,function(e){f(e.elements,function(e){e.name===n&&(n="mce_editor_"+m++,u.setAttrib(e,"id",n),r(n,t))})})});break;case"textareas":case"specific_textareas":f(u.select("textarea"),function(e){t.editor_deselector&&o(e,t.editor_deselector)||(!t.editor_selector||o(e,t.editor_selector))&&r(n(e),t)})}t.oninit&&(c=g=0,f(l,function(e){g++,e.initialized?c++:e.on("init",function(){c++,c==g&&i(t,"oninit")}),c==g&&i(t,"oninit")}))}var s=this,l=[],h;s.settings=t,u.bind(window,"ready",a)
},get:function(e){return arguments.length?e in this.editors?this.editors[e]:null:this.editors},add:function(e){var t=this,n=t.editors;return n[e.id]=e,n.push(e),t.activeEditor=e,t.fire("AddEditor",{editor:e}),h||(h=function(){t.fire("BeforeUnload")},u.bind(window,"beforeunload",h)),e},createEditor:function(t,n){return this.add(new e(t,n,this))},remove:function(e){var t=this,n,r=t.editors,i;{if(e)return"string"==typeof e?(e=e.selector||e,void f(u.select(e),function(e){t.remove(r[e.id])})):(i=e,r[i.id]?(l(i)&&t.fire("RemoveEditor",{editor:i}),r.length||u.unbind(window,"beforeunload",h),i.remove(),i):null);for(n=r.length-1;n>=0;n--)t.remove(r[n])}},execCommand:function(t,n,r){var i=this,o=i.get(r);switch(t){case"mceAddEditor":return i.get(r)||new e(r,i.settings,i).render(),!0;case"mceRemoveEditor":return o&&o.remove(),!0;case"mceToggleEditor":return o?(o.isHidden()?o.show():o.hi
de(),!0):(i.execCommand("mceAddEditor",0,r),!0)}return i.activeEditor?i.activeEditor.execCommand(t,n,r):!1},triggerSave:function(){f(this.editors,function(e){e.save()})},addI18n:function(e,t){a.add(e,t)},translate:function(e){return a.translate(e)}},p(g,o),g.setup(),window.tinymce=window.tinyMCE=g,g}),r(mt,[pt,p],function(e,t){var n=t.each,r=t.explode;e.on("AddEditor",function(e){var t=e.editor;t.on("preInit",function(){function e(e,t){n(t,function(t,n){t&&s.setStyle(e,n,t)}),s.rename(e,"span")}function i(e){s=t.dom,l.convert_fonts_to_spans&&n(s.select("font,u,strike",e.node),function(e){o[e.nodeName.toLowerCase()](s,e)})}var o,a,s,l=t.settings;l.inline_styles&&(a=r(l.font_size_legacy_values),o={font:function(t,n){e(n,{backgroundColor:n.style.backgroundColor,color:n.color,fontFamily:n.face,fontSize:a[parseInt(n.size,10)-1]})},u:function(t,n){e(n,{textDecoration:"underline"})},strike:function(t,n){e(n
,{textDecoration:"line-through"})}},t.on("PreProcess SetContent",i))})})}),r(ht,[],function(){return{send:function(e){function t(){!e.async||4==n.readyState||r++>1e4?(e.success&&1e4>r&&200==n.status?e.success.call(e.success_scope,""+n.responseText,n,e):e.error&&e.error.call(e.error_scope,r>1e4?"TIMED_OUT":"GENERAL",n,e),n=null):setTimeout(t,10)}var n,r=0;if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=e.async===!1?!1:!0,e.data=e.data||"",n=new XMLHttpRequest){if(n.overrideMimeType&&n.overrideMimeType(e.content_type),n.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(n.withCredentials=!0),e.content_type&&n.setRequestHeader("Content-Type",e.content_type),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.send(e.data),!e.async)return t(
);setTimeout(t,10)}}}}),r(gt,[],function(){function e(t,n){var r,i,o,a;if(n=n||'"',null===t)return"null";if(o=typeof t,"string"==o)return i="\bb t\nn\ff\rr\"\"''\\\\",n+t.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,t){return'"'===n&&"'"===e?e:(r=i.indexOf(t),r+1?"\\"+i.charAt(r+1):(e=t.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e))})+n;if("object"==o){if(t.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(t)){for(r=0,i="[";r<t.length;r++)i+=(r>0?",":"")+e(t[r],n);return i+"]"}i="{";for(a in t)t.hasOwnProperty(a)&&(i+="function"!=typeof t[a]?(i.length>1?","+n:n)+a+n+":"+e(t[a],n):"");return i+"}"}return""+t}return{serialize:e,parse:function(e){try{return window[String.fromCharCode(101)+&q
uot;val"]("("+e+")")}catch(t){}}}}),r(vt,[gt,ht,p],function(e,t,n){function r(e){this.settings=i({},e),this.count=0}var i=n.extend;return r.sendRPC=function(e){return(new r).send(e)},r.prototype={send:function(n){var r=n.error,o=n.success;n=i(this.settings,n),n.success=function(t,i){t=e.parse(t),"undefined"==typeof t&&(t={error:"JSON Parse error."}),t.error?r.call(n.error_scope||n.scope,t.error,i):o.call(n.success_scope||n.scope,t.result)},n.error=function(e,t){r&&r.call(n.error_scope||n.scope,e,t)},n.data=e.serialize({id:n.id||"c"+this.count++,method:n.method,params:n.params}),n.content_type="application/json",t.send(n)}},r}),r(yt,[y],function(e){return{callbacks:{},count:0,send:function(n){var r=this,i=e.DOM,o=n.count!==t?n.count:r.count,a="tinymce_jsonp_"+o;r.callbacks[o]=function(e){i.remove(a),delete r.callbacks[o],n.callback(e)},i.add(i.doc.body,"script",{id:a,src:n.url,type:&q
uot;text/javascript"}),r.count++}}}),r(bt,[],function(){function e(){s=[];for(var e in a)s.push(e);i.length=s.length}function n(){function n(e){var n,r;return r=e!==t?u+e:i.indexOf(",",u),-1===r||r>i.length?null:(n=i.substring(u,r),u=r+1,n)}var r,i,s,u=0;if(a={},c){o.load(l),i=o.getAttribute(l)||"";do{var d=n();if(null===d)break;if(r=n(parseInt(d,32)||0),null!==r){if(d=n(),null===d)break;s=n(parseInt(d,32)||0),r&&(a[r]=s)}}while(null!==r);e()}}function r(){var t,n="";if(c){for(var r in a)t=a[r],n+=(n?",":"")+r.length.toString(32)+","+r+","+t.length.toString(32)+","+t;o.setAttribute(l,n);try{o.save(l)}catch(i){}e()}}var i,o,a,s,l,c;try{if(window.localStorage)return localStorage}catch(u){}return l="tinymce",o=document.documentElement,c=!!o.addBehavior,c&&o.addBehavior("#default#userData"),i={key:function(e){return s[e]},getItem:function(e){return e in a?a[e]:null
},setItem:function(e,t){a[e]=""+t,r()},removeItem:function(e){delete a[e],r()},clear:function(){a={},r()}},n(),i}),r(Ct,[y,l,b,C,p,g],function(e,t,n,r,i,o){var a=window.tinymce;return a.DOM=e.DOM,a.ScriptLoader=n.ScriptLoader,a.PluginManager=r.PluginManager,a.ThemeManager=r.ThemeManager,a.dom=a.dom||{},a.dom.Event=t.Event,i.each(i,function(e,t){a[t]=e}),i.each("isOpera isWebKit isIE isGecko isMac".split(" "),function(e){a[e]=o[e.substr(2).toLowerCase()]}),{}}),r(xt,[V,p],function(e,t){return e.extend({Defaults:{firstControlClass:"first",lastControlClass:"last"},init:function(e){this.settings=t.extend({},this.Defaults,e)},preRender:function(e){e.addClass(this.settings.containerClass,"body")},applyClasses:function(e){var t=this,n=t.settings,r,i,o;r=e.items().filter(":visible"),i=n.firstControlClass,o=n.lastControlClass,r.each(function(e){e.removeClass(i).removeClass(o),n.controlClass&&e.addClass(n.controlCla
ss)}),r.eq(0).addClass(i),r.eq(-1).addClass(o)},renderHtml:function(e){var t=this,n=t.settings,r,i="";return r=e.items(),r.eq(0).addClass(n.firstControlClass),r.eq(-1).addClass(n.lastControlClass),r.each(function(e){n.controlClass&&e.addClass(n.controlClass),i+=e.renderHtml()}),i},recalc:function(){},postRender:function(){}})}),r(wt,[xt],function(e){return e.extend({Defaults:{containerClass:"abs-layout",controlClass:"abs-layout-item"},recalc:function(e){e.items().filter(":visible").each(function(e){var t=e.settings;e.layoutRect({x:t.x,y:t.y,w:t.w,h:t.h}),e.recalc&&e.recalc()})},renderHtml:function(e){return'<div id="'+e._id+'-absend" class="'+e.classPrefix+'abs-end"></div>'+this._super(e)}})}),r(_t,[K,et],function(e,t){return e.extend({Mixins:[t],Defaults:{classes:"widget tooltip tooltip-n"},text:function(e){var t=this;return"undefined"!=typeof e?(t._value=e,t._rendered&&a
mp;(t.getEl().lastChild.innerHTML=t.encode(e)),t):t._value},renderHtml:function(){var e=this,t=e.classPrefix;return'<div id="'+e._id+'" class="'+e.classes()+'" role="presentation"><div class="'+t+'tooltip-arrow"></div><div class="'+t+'tooltip-inner">'+e.encode(e._text)+"</div></div>"},repaint:function(){var e=this,t,n;t=e.getEl().style,n=e._layoutRect,t.left=n.x+"px",t.top=n.y+"px",t.zIndex=131070}})}),r(Nt,[K,_t],function(e,t){var n,r=e.extend({init:function(e){var t=this;t._super(e),e=t.settings,t.canFocus=!0,e.tooltip&&r.tooltips!==!1&&(t.on("mouseenter",function(n){var r=t.tooltip().moveTo(-65535);if(n.control==t){var i=r.text(e.tooltip).show().testMoveRel(t.getEl(),["bc-tc","bc-tl","bc-tr"]);r.toggleClass("tooltip-n","bc-tc"==i),r.toggleClass("tooltip-nw","bc-tl"==i),r.
toggleClass("tooltip-ne","bc-tr"==i),r.moveRel(t.getEl(),i)}else r.hide()}),t.on("mouseleave mousedown click",function(){t.tooltip().hide()})),t.aria("label",e.ariaLabel||e.tooltip)},tooltip:function(){return n||(n=new t({type:"tooltip"}),n.renderTo()),n},active:function(e){var t=this,n;return e!==n&&(t.aria("pressed",e),t.toggleClass("active",e)),t._super(e)},disabled:function(e){var t=this,n;return e!==n&&(t.aria("disabled",e),t.toggleClass("disabled",e)),t._super(e)},postRender:function(){var e=this,t=e.settings;e._rendered=!0,e._super(),e.parent()||!t.width&&!t.height||(e.initLayoutRect(),e.repaint()),t.autofocus&&e.focus()},remove:function(){this._super(),n&&(n.remove(),n=null)}});return r}),r(Et,[Nt],function(e){return e.extend({Defaults:{classes:"widget btn",role:"button"},init:function(e){var t=this,n;t.on("click mousedown
",function(e){e.preventDefault()}),t._super(e),n=e.size,e.subtype&&t.addClass(e.subtype),n&&t.addClass("btn-"+n)},icon:function(e){var t=this,n=t.classPrefix;if("undefined"==typeof e)return t.settings.icon;if(t.settings.icon=e,e=e?n+"ico "+n+"i-"+t.settings.icon:"",t._rendered){var r=t.getEl().firstChild,i=r.getElementsByTagName("i")[0];e?(i&&i==r.firstChild||(i=document.createElement("i"),r.insertBefore(i,r.firstChild)),i.className=e):i&&r.removeChild(i),t.text(t._text)}return t},repaint:function(){var e=this.getEl().firstChild.style;e.width=e.height="100%",this._super()},text:function(e){var t=this;if(t._rendered){var n=t.getEl().lastChild.lastChild;n&&(n.data=t.translate(e))}return t._super(e)},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.settings.icon,i;return i=e.settings.image,i?(r="none","string"!=typeof i&&(i
=window.getSelection?i[0]:i[1]),i=" style=\"background-image: url('"+i+"')\""):i="",r=e.settings.icon?n+"ico "+n+"i-"+r:"",'<div id="'+t+'" class="'+e.classes()+'" tabindex="-1" aria-labelledby="'+t+'"><button role="presentation" type="button" tabindex="-1">'+(r?'<i class="'+r+'"'+i+"></i>":"")+(e._text?(r?"\xa0":"")+e.encode(e._text):"")+"</button></div>"}})}),r(kt,[X],function(e){return e.extend({Defaults:{defaultType:"button",role:"group"},renderHtml:function(){var e=this,t=e._layout;return e.addClass("btn-group"),e.preRender(),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes()+'"><div id="'+e._id+'-body">'+(e.settings.html||"")+t.renderHtml(e)+"&
lt;/div></div>"}})}),r(St,[Nt],function(e){return e.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(e){var t=this;t._super(e),t.on("click mousedown",function(e){e.preventDefault()}),t.on("click",function(e){e.preventDefault(),t.disabled()||t.checked(!t.checked())}),t.checked(t.settings.checked)},checked:function(e){var t=this;return"undefined"!=typeof e?(e?t.addClass("checked"):t.removeClass("checked"),t._checked=e,t.aria("checked",e),t):t._checked},value:function(e){return this.checked(e)},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;return'<div id="'+t+'" class="'+e.classes()+'" unselectable="on" aria-labelledby="'+t+'-al" tabindex="-1"><i class="'+n+"ico "+n+'i-checkbox"></i><span id="'+t+'-al" class="'+n+'label">'+e.encode(e._text)+
"</span></div>"}})}),r(Tt,[Et,nt],function(e,t){return e.extend({showPanel:function(){var e=this,n=e.settings;if(e.active(!0),e.panel)e.panel.show();else{var r=n.panel;r.type&&(r={layout:"grid",items:r}),r.role=r.role||"dialog",r.popover=!0,r.autohide=!0,r.ariaRoot=!0,e.panel=new t(r).on("hide",function(){e.active(!1)}).on("cancel",function(t){t.stopPropagation(),e.focus(),e.hidePanel()}).parent(e).renderTo(e.getContainerElm()),e.panel.fire("show"),e.panel.reflow()
-}e.panel.moveRel(e.getEl(),n.popoverAlign||(e.isRtl()?["bc-tr","bc-tc"]:["bc-tl","bc-tc"]))},hidePanel:function(){var e=this;e.panel&&e.panel.hide()},postRender:function(){var e=this;return e.aria("haspopup",!0),e.on("click",function(t){t.control===e&&(e.panel&&e.panel.visible()?e.hidePanel():(e.showPanel(),e.panel.focus(!!t.aria)))}),e._super()}})}),r(Rt,[Tt,y],function(e,t){var n=t.DOM;return e.extend({init:function(e){this._super(e),this.addClass("colorbutton")},color:function(e){return e?(this._color=e,this.getEl("preview").style.backgroundColor=e,this):this._color},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.settings.icon?n+"ico "+n+"i-"+e.settings.icon:"",i=e.settings.image?" style=\"background-image: url('"+e.settings.image+"')\"":"";return'<div id="'+t+'" class="'+e.cla
sses()+'" role="button" tabindex="-1" aria-haspopup="true"><button role="presentation" hidefocus="1" type="button" tabindex="-1">'+(r?'<i class="'+r+'"'+i+"></i>":"")+'<span id="'+t+'-preview" class="'+n+'preview"></span>'+(e._text?(r?" ":"")+e._text:"")+'</button><button type="button" class="'+n+'open" hidefocus="1" tabindex="-1"> <i class="'+n+'caret"></i></button></div>'},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(r){r.aria&&"down"==r.aria.key||r.control!=e||n.getParent(r.target,"."+e.classPrefix+"open")||(r.stopImmediatePropagation(),t.call(e,r))}),delete e.settings.onclick,e._super()}})}),r(At,[Nt,G,j],function(e,t,n){retu
rn e.extend({init:function(e){var t=this;t._super(e),t.addClass("combobox"),t.subinput=!0,t.ariaTarget="inp",e=t.settings,e.menu=e.menu||e.values,e.menu&&(e.icon="caret"),t.on("click",function(n){for(var r=n.target,i=t.getEl();r&&r!=i;)r.id&&-1!=r.id.indexOf("-open")&&(t.fire("action"),e.menu&&(t.showMenu(),n.aria&&t.menu.items()[0].focus())),r=r.parentNode}),t.on("keydown",function(e){"INPUT"==e.target.nodeName&&13==e.keyCode&&t.parents().reverse().each(function(n){return e.preventDefault(),t.fire("change"),n.hasEventListeners("submit")&&n.toJSON?(n.fire("submit",{data:n.toJSON()}),!1):void 0})}),e.placeholder&&(t.addClass("placeholder"),t.on("focusin",function(){t._hasOnChange||(n.on(t.getEl("inp"),"change",function(){t.fire("change")}),t._hasOn
Change=!0),t.hasClass("placeholder")&&(t.getEl("inp").value="",t.removeClass("placeholder"))}),t.on("focusout",function(){0===t.value().length&&(t.getEl("inp").value=e.placeholder,t.addClass("placeholder"))}))},showMenu:function(){var e=this,n=e.settings,r;e.menu||(r=n.menu||[],r.length?r={type:"menu",items:r}:r.type=r.type||"menu",e.menu=t.create(r).parent(e).renderTo(e.getContainerElm()),e.fire("createmenu"),e.menu.reflow(),e.menu.on("cancel",function(t){t.control===e.menu&&e.focus()}),e.menu.on("show hide",function(t){t.control.items().each(function(t){t.active(t.value()==e.value())})}).fire("show"),e.menu.on("select",function(t){e.value(t.control.value())}),e.on("focusin",function(t){"INPUT"==t.target.tagName.toUpperCase()&&e.menu.hide()}),e.aria("expanded",!0)),e.menu.show(),e.me
nu.layoutRect({w:e.layoutRect().w}),e.menu.moveRel(e.getEl(),e.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},value:function(e){var t=this;return"undefined"!=typeof e?(t._value=e,t.removeClass("placeholder"),t._rendered&&(t.getEl("inp").value=e),t):t._rendered?(e=t.getEl("inp").value,e!=t.settings.placeholder?e:""):t._value},disabled:function(e){var t=this;return t._rendered&&"undefined"!=typeof e&&(t.getEl("inp").disabled=e),t._super(e)},focus:function(){this.getEl("inp").focus()},repaint:function(){var e=this,t=e.getEl(),r=e.getEl("open"),i=e.layoutRect(),o,a;o=r?i.w-n.getSize(r).width-10:i.w-10;var s=document;return s.all&&(!s.documentMode||s.documentMode<=8)&&(a=e.layoutRect().h-2+"px"),n.css(t.firstChild,{width:o,lineHeight:a}),e._super(),e},postRender:function(){var e=this;return n.on(this.getEl(&q
uot;inp"),"change",function(){e.fire("change")}),e._super()},remove:function(){n.off(this.getEl("inp")),this._super()},renderHtml:function(){var e=this,t=e._id,n=e.settings,r=e.classPrefix,i=n.value||n.placeholder||"",o,a,s="",l="";return"spellcheck"in n&&(l+=' spellcheck="'+n.spellcheck+'"'),n.maxLength&&(l+=' maxlength="'+n.maxLength+'"'),n.size&&(l+=' size="'+n.size+'"'),n.subtype&&(l+=' type="'+n.subtype+'"'),e.disabled()&&(l+=' disabled="disabled"'),o=n.icon,o&&"caret"!=o&&(o=r+"ico "+r+"i-"+n.icon),a=e._text,(o||a)&&(s='<div id="'+t+'-open" class="'+r+"btn "+r+'open" tabIndex="-1" role="button"><button id="'+t+'-action" type="button" hidefocus="1" tabindex="-1">
'+("caret"!=o?'<i class="'+o+'"></i>':'<i class="'+r+'caret"></i>')+(a?(o?" ":"")+a:"")+"</button></div>",e.addClass("has-open")),'<div id="'+t+'" class="'+e.classes()+'"><input id="'+t+'-inp" class="'+r+"textbox "+r+'placeholder" value="'+i+'" hidefocus="1"'+l+" />"+s+"</div>"}})}),r(Bt,[Nt],function(e){return e.extend({init:function(e){var t=this;e.delimiter||(e.delimiter="\xbb"),t._super(e),t.addClass("path"),t.canFocus=!0,t.on("click",function(e){var n,r=e.target;(n=r.getAttribute("data-index"))&&t.fire("select",{value:t.data()[n],index:n})})},focus:function(){var e=this;return e.getEl().firstChild.focus(),e},data:function(e){var t=this;return"undefined"!=typeof e?(t._data=e,t.update(),t):t._
data},update:function(){this.innerHtml(this._getPathHtml())},postRender:function(){var e=this;e._super(),e.data(e.settings.data)},renderHtml:function(){var e=this;return'<div id="'+e._id+'" class="'+e.classes()+'">'+e._getPathHtml()+"</div>"},_getPathHtml:function(){var e=this,t=e._data||[],n,r,i="",o=e.classPrefix;for(n=0,r=t.length;r>n;n++)i+=(n>0?'<div class="'+o+'divider" aria-hidden="true"> '+e.settings.delimiter+" </div>":"")+'<div role="button" class="'+o+"path-item"+(n==r-1?" "+o+"last":"")+'" data-index="'+n+'" tabindex="-1" id="'+e._id+"-"+n+'" aria-level="'+n+'">'+t[n].name+"</div>";return i||(i='<div class="'+o+'path-item">\xa0</div>'),i}})}),r(Dt,[Bt,pt],function(e,t){return e.extend({postRender:function(){func
tion e(e){if(1===e.nodeType){if("BR"==e.nodeName||e.getAttribute("data-mce-bogus"))return!0;if("bookmark"===e.getAttribute("data-mce-type"))return!0}return!1}var n=this,r=t.activeEditor;return n.on("select",function(t){var n=[],i,o=r.getBody();for(r.focus(),i=r.selection.getStart();i&&i!=o;)e(i)||n.push(i),i=i.parentNode;r.selection.select(n[n.length-1-t.index]),r.nodeChanged()}),r.on("nodeChange",function(t){for(var i=[],o=t.parents,a=o.length;a--;)if(1==o[a].nodeType&&!e(o[a])){var s=r.fire("ResolveName",{name:o[a].nodeName.toLowerCase(),target:o[a]});i.push({name:s.name})}n.data(i)}),n._super()}})}),r(Lt,[X],function(e){return e.extend({Defaults:{layout:"flex",align:"center",defaults:{flex:1}},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.addClass("formitem"),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes()+'" h
idefocus="1" tabindex="-1">'+(e.settings.title?'<div id="'+e._id+'-title" class="'+n+'title">'+e.settings.title+"</div>":"")+'<div id="'+e._id+'-body" class="'+e.classes("body")+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></div>"}})}),r(Mt,[X,Lt],function(e,t){return e.extend({Defaults:{containerCls:"form",layout:"flex",direction:"column",align:"stretch",flex:1,padding:20,labelGap:30,spacing:10,callbacks:{submit:function(){this.submit()}}},preRender:function(){var e=this,n=e.items();n.each(function(n){var r,i=n.settings.label;i&&(r=new t({layout:"flex",autoResize:"overflow",defaults:{flex:1},items:[{type:"label",id:n._id+"-l",text:i,flex:0,forId:n._id,disabled:n.disabled()}]}),r.type="formitem",n.aria("labelledby",n._id+"-l&q
uot;),"undefined"==typeof n.settings.flex&&(n.settings.flex=1),e.replace(n,r),r.add(n))})},recalcLabels:function(){var e=this,t=0,n=[],r,i,o;if(e.settings.labelGapCalc!==!1)for(o="children"==e.settings.labelGapCalc?e.find("formitem"):e.items(),o.filter("formitem").each(function(e){var r=e.items()[0],i=r.getEl().clientWidth;t=i>t?i:t,n.push(r)}),i=e.settings.labelGap||0,r=n.length;r--;)n[r].settings.minWidth=t+i},visible:function(e){var t=this._super(e);return e===!0&&this._rendered&&this.recalcLabels(),t},submit:function(){return this.fire("submit",{data:this.toJSON()})},postRender:function(){var e=this;e._super(),e.recalcLabels(),e.fromJSON(e.settings.data)}})}),r(Ht,[Mt],function(e){return e.extend({Defaults:{containerCls:"fieldset",layout:"flex",direction:"column",align:"stretch",flex:1,padding:"25 15 5 15",labelGap:30,spacing:10,border:1},renderHtml:func
tion(){var e=this,t=e._layout,n=e.classPrefix;return e.preRender(),t.preRender(e),'<fieldset id="'+e._id+'" class="'+e.classes()+'" hidefocus="1" tabindex="-1">'+(e.settings.title?'<legend id="'+e._id+'-title" class="'+n+'fieldset-title">'+e.settings.title+"</legend>":"")+'<div id="'+e._id+'-body" class="'+e.classes("body")+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></fieldset>"}})}),r(Pt,[At,p],function(e,t){return e.extend({init:function(e){var n=this,r=tinymce.activeEditor,i,o;e.spellcheck=!1,o=r.settings.file_browser_callback_types,o&&(o=t.makeMap(o,/[, ]/)),i=r.settings.file_browser_callback,!i||o&&!o[e.filetype]||(e.icon="browse",e.onaction=function(){i(n.getEl("inp").id,n.getEl("inp").value,e.filetype,window)}),n._super(e)}})}),r(Ot,[wt],function(e){return e.ex
tend({recalc:function(e){var t=e.layoutRect(),n=e.paddingBox();e.items().filter(":visible").each(function(e){e.layoutRect({x:n.left,y:n.top,w:t.innerW-n.right-n.left,h:t.innerH-n.top-n.bottom}),e.recalc&&e.recalc()})}})}),r(It,[wt],function(e){return e.extend({recalc:function(e){var t,n,r,i,o,a,s,l,c,u,d,f,p,m,h,g,v=[],y,b,C,x,w,_,N,E,k,S,T,R,A,B,D,L,M,H,P,O,I,F,z=Math.max,W=Math.min;for(r=e.items().filter(":visible"),i=e.layoutRect(),o=e._paddingBox,a=e.settings,f=e.isRtl()?a.direction||"row-reversed":a.direction,s=a.align,l=e.isRtl()?a.pack||"end":a.pack,c=a.spacing||0,("row-reversed"==f||"column-reverse"==f)&&(r=r.set(r.toArray().reverse()),f=f.split("-")[0]),"column"==f?(k="y",N="h",E="minH",S="maxH",R="innerH",T="top",A="deltaH",B="contentH",P="left",M="w",D="x",L="inner
W",H="minW",O="right",I="deltaW",F="contentW"):(k="x",N="w",E="minW",S="maxW",R="innerW",T="left",A="deltaW",B="contentW",P="top",M="h",D="y",L="innerH",H="minH",O="bottom",I="deltaH",F="contentH"),d=i[R]-o[T]-o[T],_=u=0,t=0,n=r.length;n>t;t++)p=r[t],m=p.layoutRect(),h=p.settings,g=h.flex,d-=n-1>t?c:0,g>0&&(u+=g,m[S]&&v.push(p),m.flex=g),d-=m[E],y=o[P]+m[H]+o[O],y>_&&(_=y);if(x={},x[E]=0>d?i[E]-d+i[A]:i[R]-d+i[A],x[H]=_+i[I],x[B]=i[R]-d,x[F]=_,x.minW=W(x.minW,i.maxW),x.minH=W(x.minH,i.maxH),x.minW=z(x.minW,i.startMinWidth),x.minH=z(x.minH,i.startMinHeight),!i.autoResize||x.minW==i.minW&&x.minH==i.minH){for(C=d/u,t=0,n=v.length;n>t;t++)p=v[t],m=p.layoutRect(),b=m[S],y=m[E]+m.flex*C,y>b?(d-=m[S]-m[E],u-=m.flex,m.flex=0,m.maxFlexSiz
e=b):m.maxFlexSize=0;for(C=d/u,w=o[T],x={},0===u&&("end"==l?w=d+o[T]:"center"==l?(w=Math.round(i[R]/2-(i[R]-d)/2)+o[T],0>w&&(w=o[T])):"justify"==l&&(w=o[T],c=Math.floor(d/(r.length-1)))),x[D]=o[P],t=0,n=r.length;n>t;t++)p=r[t],m=p.layoutRect(),y=m.maxFlexSize||m[E],"center"===s?x[D]=Math.round(i[L]/2-m[M]/2):"stretch"===s?(x[M]=z(m[H]||0,i[L]-o[P]-o[O]),x[D]=o[P]):"end"===s&&(x[D]=i[L]-m[M]-o.top),m.flex>0&&(y+=m.flex*C),x[N]=y,x[k]=w,p.layoutRect(x),p.recalc&&p.recalc(),w+=y+c}else if(x.w=x.minW,x.h=x.minH,e.layoutRect(x),this.recalc(e),null===e._lastRect){var V=e.parent();V&&(V._lastRect=null,V.recalc())}}})}),r(Ft,[xt],function(e){return e.extend({Defaults:{containerClass:"flow-layout",controlClass:"flow-layout-item",endClass:"break"},recalc:function(e){e.items().filter(":visible").each(function(e){e.recalc&&e
.recalc()})}})}),r(zt,[K,Nt,nt,p,pt,g],function(e,t,n,r,i,o){function a(e){function t(t,n){return function(){var r=this;e.on("nodeChange",function(i){var o=e.formatter,a=null;s(i.parents,function(e){return s(t,function(t){return n?o.matchNode(e,n,{value:t.value})&&(a=t.value):o.matchNode(e,t.value)&&(a=t.value),a?!1:void 0}),a?!1:void 0}),r.value(a)})}}function r(e){e=e.replace(/;$/,"").split(";");for(var t=e.length;t--;)e[t]=e[t].split("=");return e}function i(){function t(e){var n=[];if(e)return s(e,function(e){var o={text:e.title,icon:e.icon};if(e.items)o.menu=t(e.items);else{var a=e.format||"custom"+r++;e.format||(e.name=a,i.push(e)),o.format=a,o.cmd=e.cmd}n.push(o)}),n}function n(){var n;return n=t(e.settings.style_formats_merge?e.settings.style_formats?o.concat(e.settings.style_formats):o:e.settings.style_formats||o)}var r=0,i=[],o=[{title:"Headings",items:[{title:"Heading 1",format:"h1&
quot;},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strikethrough",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote"
;,format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Alignment",items:[{title:"Left",icon:"alignleft",format:"alignleft"},{title:"Center",icon:"aligncenter",format:"aligncenter"},{title:"Right",icon:"alignright",format:"alignright"},{title:"Justify",icon:"alignjustify",format:"alignjustify"}]}];return e.on("init",function(){s(i,function(t){e.formatter.register(t.name,t)})}),{type:"menu",items:n(),onPostRender:function(t){e.fire("renderFormatsMenu",{control:t.control})},itemDefaults:{preview:!0,textStyle:function(){return this.settings.format?e.formatter.getCssText(this.settings.format):void 0},onPostRender:function(){var t=this;t.parent().on("show",function(){var n,r;n=t.settings.format,n&&(t.disabled(!e.formatter.canApply(n)
),t.active(e.formatter.match(n))),r=t.settings.cmd,r&&t.active(e.queryCommandState(r))})},onclick:function(){this.settings.format&&l(this.settings.format),this.settings.cmd&&e.execCommand(this.settings.cmd)}}}}function o(t){return function(){function n(){return e.undoManager?e.undoManager[t]():!1}var r=this;t="redo"==t?"hasRedo":"hasUndo",r.disabled(!n()),e.on("Undo Redo AddUndo TypingUndo ClearUndos",function(){r.disabled(!n())})}}function a(){var t=this;e.on("VisualAid",function(e){t.active(e.hasVisual)}),t.active(e.hasVisual)}function l(t){t.control&&(t=t.control.value()),t&&e.execCommand("mceToggleFormat",!1,t)}var c;c=i(),s({bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript"},function(t,n){e.addButton(n,{tooltip:t,onPostRender:function(){var t=t
his;e.formatter?e.formatter.formatChanged(n,function(e){t.active(e)}):e.on("init",function(){e.formatter.formatChanged(n,function(e){t.active(e)})})},onclick:function(){l(n)}})}),s({outdent:["Decrease indent","Outdent"],indent:["Increase indent","Indent"],cut:["Cut","Cut"],copy:["Copy","Copy"],paste:["Paste","Paste"],help:["Help","mceHelp"],selectall:["Select all","SelectAll"],hr:["Insert horizontal rule","InsertHorizontalRule"],removeformat:["Clear formatting","RemoveFormat"],visualaid:["Visual aids","mceToggleVisualAid"],newdocument:["New document","mceNewDocument"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1]})}),s({blockquote:["Blockquote","mceBlockQuote"],numlist:["Numbered list","InsertOrderedList"],bulli
st:["Bullet list","InsertUnorderedList"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],alignleft:["Align left","JustifyLeft"],aligncenter:["Align center","JustifyCenter"],alignright:["Align right","JustifyRight"],alignjustify:["Justify","JustifyFull"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1],onPostRender:function(){var t=this;e.formatter?e.formatter.formatChanged(n,function(e){t.active(e)}):e.on("init",function(){e.formatter.formatChanged(n,function(e){t.active(e)})})}})}),e.addButton("undo",{tooltip:"Undo",onPostRender:o("undo"),cmd:"undo"}),e.addButton("redo",{tooltip:"Redo",onPostRender:o("redo"),cmd:"redo"}),e.addMenuItem("newdocument",{text:"New document",shortcut:"Ctrl+N",icon:&q
uot;newdocument",cmd:"mceNewDocument"}),e.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Ctrl+Z",onPostRender:o("undo"),cmd:"undo"}),e.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Ctrl+Y",onPostRender:o("redo"),cmd:"redo"}),e.addMenuItem("visualaid",{text:"Visual aids",selectable:!0,onPostRender:a,cmd:"mceToggleVisualAid"}),s({cut:["Cut","Cut","Ctrl+X"],copy:["Copy","Copy","Ctrl+C"],paste:["Paste","Paste","Ctrl+V"],selectall:["Select all","SelectAll","Ctrl+A"],bold:["Bold","Bold","Ctrl+B"],italic:["Italic","Italic","Ctrl+I"],underline:["Underline","Underline"],strikethrough:["Strikethrough","St
rikethrough"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],removeformat:["Clear formatting","RemoveFormat"]},function(t,n){e.addMenuItem(n,{text:t[0],icon:n,shortcut:t[2],cmd:t[1]})}),e.on("mousedown",function(){n.hideAll()}),e.addButton("styleselect",{type:"menubutton",text:"Formats",menu:c}),e.addButton("formatselect",function(){var n=[],i=r(e.settings.block_formats||"Paragraph=p;Address=address;Pre=pre;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6");return s(i,function(t){n.push({text:t[0],value:t[1],textStyle:function(){return e.formatter.getCssText(t[1])}})}),{type:"listbox",text:i[0][0],values:n,fixedWidth:!0,onselect:l,onPostRender:t(n)}}),e.addButton("fontselect",function(){var n="Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial bla
ck,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",i=[],o=r(e.settings.font_formats||n);return s(o,function(e){i.push({text:{raw:e[0]},value:e[1],textStyle:-1==e[1].indexOf("dings")?"font-family:"+e[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:i,fixedWidth:!0,onPostRender:t(i,"fontname"),onselect:function(t){t.control.settings.value&&e.execCommand("FontName",!1,t.control.settings.value)}}}),e.addButton("fontsizeselect",function(){var n=[],r="8pt 10pt 12pt 14pt 18pt 24pt 36pt",i=e.settin
gs.fontsize_formats||r;return s(i.split(" "),function(e){var t=e,r=e,i=e.split("=");i.length>1&&(t=i[0],r=i[1]),n.push({text:t,value:r})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:n,fixedWidth:!0,onPostRender:t(n,"fontsize"),onclick:function(t){t.control.settings.value&&e.execCommand("FontSize",!1,t.control.settings.value)}}}),e.addMenuItem("formats",{text:"Formats",menu:c})}var s=r.each;i.on("AddEditor",function(t){t.editor.rtl&&(e.rtl=!0),a(t.editor)}),e.translate=function(e){return i.translate(e)},t.tooltips=!o.iOS}),r(Wt,[wt],function(e){return e.extend({recalc:function(e){var t=e.settings,n,r,i,o,a,s,l,c,u,d,f,p,m,h,g,v,y,b,C,x,w,_,N=[],E=[],k,S,T,R;for(t=e.settings,i=e.items().filter(":visible"),o=e.layoutRect(),r=t.columns||Math.ceil(Math.sqrt(i.length)),n=Math.ceil(i.length/r),y=t.spacingH||t.spacing||0,b=t.spacingV||t.
spacing||0,C=t.alignH||t.align,x=t.alignV||t.align,g=e._paddingBox,C&&"string"==typeof C&&(C=[C]),x&&"string"==typeof x&&(x=[x]),d=0;r>d;d++)N.push(0);for(f=0;n>f;f++)E.push(0);for(f=0;n>f;f++)for(d=0;r>d&&(u=i[f*r+d],u);d++)c=u.layoutRect(),k=c.minW,S=c.minH,N[d]=k>N[d]?k:N[d],E[f]=S>E[f]?S:E[f];for(T=o.innerW-g.left-g.right,w=0,d=0;r>d;d++)w+=N[d]+(d>0?y:0),T-=(d>0?y:0)+N[d];for(R=o.innerH-g.top-g.bottom,_=0,f=0;n>f;f++)_+=E[f]+(f>0?b:0),R-=(f>0?b:0)+E[f];if(w+=g.left+g.right,_+=g.top+g.bottom,l={},l.minW=w+(o.w-o.innerW),l.minH=_+(o.h-o.innerH),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH,l.minW=Math.min(l.minW,o.maxW),l.minH=Math.min(l.minH,o.maxH),l.minW=Math.max(l.minW,o.startMinWidth),l.minH=Math.max(l.minH,o.startMinHeight),!o.autoResize||l.minW==o.minW&&l.minH==o.minH){o.autoResize&&(l=e.layoutRect(l),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH)
;var A;A="start"==t.packV?0:R>0?Math.floor(R/n):0;var B=0,D=t.flexWidths;if(D)for(d=0;d<D.length;d++)B+=D[d];else B=r;var L=T/B;for(d=0;r>d;d++)N[d]+=D?D[d]*L:L;for(m=g.top,f=0;n>f;f++){for(p=g.left,s=E[f]+A,d=0;r>d&&(u=i[f*r+d],u);d++)h=u.settings,c=u.layoutRect(),a=Math.max(N[d],c.startMinWidth),c.x=p,c.y=m,v=h.alignH||(C?C[d]||C[0]:null),"center"==v?c.x=p+a/2-c.w/2:"right"==v?c.x=p+a-c.w:"stretch"==v&&(c.w=a),v=h.alignV||(x?x[d]||x[0]:null),"center"==v?c.y=m+s/2-c.h/2:"bottom"==v?c.y=m+s-c.h:"stretch"==v&&(c.h=s),u.layoutRect(c),p+=a+y,u.recalc&&u.recalc();m+=s+b}}else if(l.w=l.minW,l.h=l.minH,e.layoutRect(l),this.recalc(e),null===e._lastRect){var M=e.parent();M&&(M._lastRect=null,M.recalc())}}})}),r(Vt,[Nt],function(e){return e.extend({renderHtml:function(){var e=this;return e.addClass("iframe"),e.canFocus=!1,'<iframe id="'+e._id+'"
class="'+e.classes()+'" tabindex="-1" src="'+(e.settings.url||"javascript:''")+'" frameborder="0"></iframe>'},src:function(e){this.getEl().src=e},html:function(e,t){var n=this,r=this.getEl().contentWindow.document.body;return r?(r.innerHTML=e,t&&t()):setTimeout(function(){n.html(e)},0),this}})}),r(Ut,[Nt,j],function(e,t){return e.extend({init:function(e){var t=this;t._super(e),t.addClass("widget"),t.addClass("label"),t.canFocus=!1,e.multiline&&t.addClass("autoscroll"),e.strong&&t.addClass("strong")},initLayoutRect:function(){var e=this,n=e._super();if(e.settings.multiline){var r=t.getSize(e.getEl());r.width>n.maxW&&(n.minW=n.maxW,e.addClass("multiline")),e.getEl().style.width=n.minW+"px",n.startMinH=n.h=n.minH=Math.min(n.maxH,t.getSize(e.getEl()).height)}return n},repaint:function(){var e=this;return e.settings.multiline||(e.getEl(
).style.lineHeight=e.layoutRect().h+"px"),e._super()},text:function(e){var t=this;return t._rendered&&e&&this.innerHtml(t.encode(e)),t._super(e)},renderHtml:function(){var e=this,t=e.settings.forId;return'<label id="'+e._id+'" class="'+e.classes()+'"'+(t?' for="'+t+'"':"")+">"+e.encode(e._text)+"</label>"}})}),r(qt,[X],function(e){return e.extend({Defaults:{role:"toolbar",layout:"flow"},init:function(e){var t=this;t._super(e),t.addClass("toolbar")},postRender:function(){var e=this;return e.items().addClass("toolbar-item"),e._super()}})}),r($t,[qt],function(e){return e.extend({Defaults:{role:"menubar",containerCls:"menubar",ariaRoot:!0,defaults:{type:"menubutton"}}})}),r(jt,[Et,G,$t],function(e,t,n){function r(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1}var i=e.extend({init:function(e){var t=this;t._renderO
pen=!0,t._super(e),t.addClass("menubtn"),e.fixedWidth&&t.addClass("fixed-width"),t.aria("haspopup",!0),t.hasPopup=!0},showMenu:function(){var e=this,n=e.settings,r;return e.menu&&e.menu.visible()?e.hideMenu():(e.menu||(r=n.menu||[],r.length?r={type:"menu",items:r}:r.type=r.type||"menu",e.menu=t.create(r).parent(e).renderTo(),e.fire("createmenu"),e.menu.reflow(),e.menu.on("cancel",function(t){t.control.parent()===e.menu&&(t.stopPropagation(),e.focus(),e.hideMenu())}),e.menu.on("select",function(){e.focus()}),e.menu.on("show hide",function(t){t.control==e.menu&&e.activeMenu("show"==t.type),e.aria("expanded","show"==t.type)}).fire("show")),e.menu.show(),e.menu.layoutRect({w:e.layoutRect().w}),void e.menu.moveRel(e.getEl(),e.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"]))},hideMenu:function
(){var e=this;e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide())},activeMenu:function(e){this.toggleClass("active",e)},renderHtml:function(){var e=this,t=e._id,r=e.classPrefix,i=e.settings.icon?r+"ico "+r+"i-"+e.settings.icon:"";return e.aria("role",e.parent()instanceof n?"menuitem":"button"),'<div id="'+t+'" class="'+e.classes()+'" tabindex="-1" aria-labelledby="'+t+'"><button id="'+t+'-open" role="presentation" type="button" tabindex="-1">'+(i?'<i class="'+i+'"></i>':"")+"<span>"+(e._text?(i?"\xa0":"")+e.encode(e._text):"")+'</span> <i class="'+r+'caret"></i></button></div>'},postRender:function(){var e=this;return e.on("click",function(t){t.control
===e&&r(t.target,e.getEl())&&(e.showMenu(),t.aria&&e.menu.items()[0].focus())}),e.on("mouseenter",function(t){var n=t.control,r=e.parent(),o;n&&r&&n instanceof i&&n.parent()==r&&(r.items().filter("MenuButton").each(function(e){e.hideMenu&&e!=n&&(e.menu&&e.menu.visible()&&(o=!0),e.hideMenu())}),o&&(n.focus(),n.showMenu()))}),e._super()},text:function(e){var t=this,n,r;if(t._rendered)for(r=t.getEl("open").getElementsByTagName("span"),n=0;n<r.length;n++)r[n].innerHTML=(t.settings.icon&&e?"\xa0":"")+t.encode(e);return this._super(e)},remove:function(){this._super(),this.menu&&this.menu.remove()}});return i}),r(Kt,[jt],function(e){return e.extend({init:function(e){function t(r){for(var a=0;a<r.length;a++){if(i=r[a].selected||e.value===r[a].value){o=o||r[a].text,n._value=r[a].value;break}r[a].menu&&t(r[a].
menu)}}var n=this,r,i,o,a;n._values=r=e.values,r&&("undefined"!=typeof e.value&&t(r),!i&&r.length>0&&(o=r[0].text,n._value=r[0].value),e.menu=r),e.text=e.text||o||r[0].text,n._super(e),n.addClass("listbox"),n.on("select",function(t){var r=t.control;a&&(t.lastControl=a),e.multiple?r.active(!r.active()):n.value(t.control.settings.value),a=r})},value:function(e){function t(e,n){e.items().each(function(e){i=e.value()===n,i&&(o=o||e.text()),e.active(i),e.menu&&t(e.menu,n)})}function n(t){for(var r=0;r<t.length;r++)i=t[r].value==e,i&&(o=o||t[r].text),t[r].active=i,t[r].menu&&n(t[r].menu)}var r=this,i,o,a;return"undefined"!=typeof e&&(r.menu?t(r.menu,e):(a=r.settings.menu,n(a)),r.text(o||this.settings.text)),r._super(e)}})}),r(Gt,[Nt,G,g],function(e,t,n){return e.extend({Defaults:{border:0,role:"menuitem"},init:function(e){var t=this;t.hasPopup=!0,t._super
(e),e=t.settings,t.addClass("menu-item"),e.menu&&t.addClass("menu-item-expand"),e.preview&&t.addClass("menu-item-preview"),("-"===t._text||"|"===t._text)&&(t.addClass("menu-item-sep"),t.aria("role","separator"),t._text="-"),e.selectable&&(t.aria("role","menuitemcheckbox"),t.addClass("menu-item-checkbox"),e.icon="selected"),e.preview||e.selectable||t.addClass("menu-item-normal"),t.on("mousedown",function(e){e.preventDefault()}),e.menu&&!e.ariaHideMenu&&t.aria("haspopup",!0)},hasMenus:function(){return!!this.settings.menu},showMenu:function(){var e=this,n=e.settings,r,i=e.parent();if(i.items().each(function(t){t!==e&&t.hideMenu()}),n.menu){r=e.menu,r?r.show():(r=n.menu,r.length?r={type:"menu",items:r}:r.type=r.type||"menu",i.settings.itemDefaults&&a
mp;(r.itemDefaults=i.settings.itemDefaults),r=e.menu=t.create(r).parent(e).renderTo(),r.reflow(),r.on("cancel",function(t){t.stopPropagation(),e.focus(),r.hide()}),r.on("show hide",function(e){e.control.items().each(function(e){e.active(e.settings.selected)})}).fire("show"),r.on("hide",function(t){t.control===r&&e.removeClass("selected")}),r.submenu=!0),r._parentMenu=i,r.addClass("menu-sub");var o=r.testMoveRel(e.getEl(),e.isRtl()?["tl-tr","bl-br","tr-tl","br-bl"]:["tr-tl","br-bl","tl-tr","bl-br"]);r.moveRel(e.getEl(),o),r.rel=o,o="menu-sub-"+o,r.removeClass(r._lastRel),r.addClass(o),r._lastRel=o,e.addClass("selected"),e.aria("expanded",!0)}},hideMenu:function(){var e=this;return e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide(),e.aria("expanded",!1))
,e},renderHtml:function(){var e=this,t=e._id,r=e.settings,i=e.classPrefix,o=e.encode(e._text),a=e.settings.icon,s="",l=r.shortcut;return a&&e.parent().addClass("menu-has-icons"),r.image&&(a="none",s=" style=\"background-image: url('"+r.image+"')\""),l&&n.mac&&(l=l.replace(/ctrl\+alt\+/i,"⌥⌘"),l=l.replace(/ctrl\+/i,"⌘"),l=l.replace(/alt\+/i,"⌥"),l=l.replace(/shift\+/i,"⇧")),a=i+"ico "+i+"i-"+(e.settings.icon||"none"),'<div id="'+t+'" class="'+e.classes()+'" tabindex="-1">'+("-"!==o?'<i class="'+a+'"'+s+"></i>\xa0":"")+("-"!==o?'<span id="'+t+'-text" class="'+i+'text">'+o+"</span>":"")+(l?'<div id="'+t+'-shortcut&quo
t; class="'+i+'menu-shortcut">'+l+"</div>":"")+(r.menu?'<div class="'+i+'caret"></div>':"")+"</div>"},postRender:function(){var e=this,t=e.settings,n=t.textStyle;if("function"==typeof n&&(n=n.call(this)),n){var r=e.getEl("text");r&&r.setAttribute("style",n)}return e.on("mouseenter click",function(n){n.control===e&&(t.menu||"click"!==n.type?(e.showMenu(),n.aria&&e.menu.focus(!0)):(e.fire("select"),e.parent().hideAll()))}),e._super(),e},active:function(e){return"undefined"!=typeof e&&this.aria("checked",e),this._super(e)},remove:function(){this._super(),this.menu&&this.menu.remove()}})}),r(Yt,[nt,Gt,p],function(e,t,n){var r=e.extend({Defaults:{defaultType:"menuitem",border:1,layout:"stack",role:"application",bodyRole:"menu",ariaRoot:!
0},init:function(e){var t=this;if(e.autohide=!0,e.constrainToViewport=!0,e.itemDefaults)for(var r=e.items,i=r.length;i--;)r[i]=n.extend({},e.itemDefaults,r[i]);t._super(e),t.addClass("menu")},repaint:function(){return this.toggleClass("menu-align",!0),this._super(),this.getEl().style.height="",this.getEl("body").style.height="",this},cancel:function(){var e=this;e.hideAll(),e.fire("select")},hideAll:function(){var e=this;return this.find("menuitem").exec("hideMenu"),e._super()},preRender:function(){var e=this;return e.items().each(function(t){var n=t.settings;return n.icon||n.selectable?(e._hasIcons=!0,!1):void 0}),e._super()}});return r}),r(Xt,[St],function(e){return e.extend({Defaults:{classes:"radio",role:"radio"}})}),r(Jt,[Nt,J],function(e,t){return e.extend({renderHtml:function(){var e=this,t=e.classPrefix;return e.addClass("resizehandle"),"both"==e.settings.d
irection&&e.addClass("resizehandle-both"),e.canFocus=!1,'<div id="'+e._id+'" class="'+e.classes()+'"><i class="'+t+"ico "+t+'i-resize"></i></div>'},postRender:function(){var e=this;e._super(),e.resizeDragHelper=new t(this._id,{start:function(){e.fire("ResizeStart")},drag:function(t){"both"!=e.settings.direction&&(t.deltaX=0),e.fire("Resize",t)},stop:function(){e.fire("ResizeEnd")}})},remove:function(){return this.resizeDragHelper&&this.resizeDragHelper.destroy(),this._super()}})}),r(Qt,[Nt],function(e){return e.extend({renderHtml:function(){var e=this;return e.addClass("spacer"),e.canFocus=!1,'<div id="'+e._id+'" class="'+e.classes()+'"></div>'}})}),r(Zt,[jt,j],function(e,t){return e.extend({Defaults:{classes:"widget btn splitbtn",role:"button"},repaint:function(){var e=this,n=e.getEl()
,r=e.layoutRect(),i,o;return e._super(),i=n.firstChild,o=n.lastChild,t.css(i,{width:r.w-t.getSize(o).width,height:r.h-2}),t.css(o,{height:r.h-2}),e},activeMenu:function(e){var n=this;t.toggleClass(n.getEl().lastChild,n.classPrefix+"active",e)},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.settings.icon?n+"ico "+n+"i-"+e.settings.icon:"";return'<div id="'+t+'" class="'+e.classes()+'" role="button" tabindex="-1"><button type="button" hidefocus="1" tabindex="-1">'+(r?'<i class="'+r+'"></i>':"")+(e._text?(r?" ":"")+e._text:"")+'</button><button type="button" class="'+n+'open" hidefocus="1" tabindex="-1">'+(e._menuBtnText?(r?"\xa0":"")+e._menuBtnText:"")+' <i class="'+n+'caret"></i></but
ton></div>'},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(e){var n=e.target;if(e.control==this)for(;n;){if(e.aria&&"down"!=e.aria.key||"BUTTON"==n.nodeName&&-1==n.className.indexOf("open"))return e.stopImmediatePropagation(),void t.call(this,e);n=n.parentNode}}),delete e.settings.onclick,e._super()}})}),r(en,[Ft],function(e){return e.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"}})}),r(tn,[Z,j],function(e,t){return e.extend({lastIdx:0,Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(e){var n;this.activeTabId&&(n=this.getEl(this.activeTabId),t.removeClass(n,this.classPrefix+"active"),n.setAttribute("aria-selected","false")),this.activeTabId="t"+e,n=this.getEl("t"+e),n.setAttribute("aria-selected&
quot;,"true"),t.addClass(n,this.classPrefix+"active"),e!=this.lastIdx&&(this.items()[this.lastIdx].hide(),this.lastIdx=e),this.items()[e].show().fire("showtab"),this.reflow()
-},renderHtml:function(){var e=this,t=e._layout,n="",r=e.classPrefix;return e.preRender(),t.preRender(e),e.items().each(function(t,i){var o=e._id+"-t"+i;t.aria("role","tabpanel"),t.aria("labelledby",o),n+='<div id="'+o+'" class="'+r+'tab" unselectable="on" role="tab" aria-controls="'+t._id+'" aria-selected="false" tabIndex="-1">'+e.encode(t.settings.title)+"</div>"}),'<div id="'+e._id+'" class="'+e.classes()+'" hidefocus="1" tabindex="-1"><div id="'+e._id+'-head" class="'+r+'tabs" role="tablist">'+n+'</div><div id="'+e._id+'-body" class="'+e.classes("body")+'">'+t.renderHtml(e)+"</div></div>"},postRender:function(){var e=this;e._super(),e.settings.activeTab=e.settings.activeTab||0,e.activateTab(e.sett
ings.activeTab),this.on("click",function(t){var n=t.target.parentNode;if(t.target.parentNode.id==e._id+"-head")for(var r=n.childNodes.length;r--;)n.childNodes[r]==t.target&&e.activateTab(r)})},initLayoutRect:function(){var e=this,n,r,i;r=t.getSize(e.getEl("head")).width,r=0>r?0:r,i=0,e.items().each(function(t,n){r=Math.max(r,t.layoutRect().minW),i=Math.max(i,t.layoutRect().minH),e.settings.activeTab!=n&&t.hide()}),e.items().each(function(e){e.settings.x=0,e.settings.y=0,e.settings.w=r,e.settings.h=i,e.layoutRect({x:0,y:0,w:r,h:i})});var o=t.getSize(e.getEl("head")).height;return e.settings.minWidth=r,e.settings.minHeight=i+o,n=e._super(),n.deltaH+=o,n.innerH=n.h-n.deltaH,n}})}),r(nn,[Nt,j],function(e,t){return e.extend({init:function(e){var t=this;t._super(e),t._value=e.value||"",t.addClass("textbox"),e.multiline?t.addClass("multiline"):t.on("keydown",function(e){13==e.keyCode&&
;t.parents().reverse().each(function(t){return e.preventDefault(),t.hasEventListeners("submit")&&t.toJSON?(t.fire("submit",{data:t.toJSON()}),!1):void 0})})},disabled:function(e){var t=this;return t._rendered&&"undefined"!=typeof e&&(t.getEl().disabled=e),t._super(e)},value:function(e){var t=this;return"undefined"!=typeof e?(t._value=e,t._rendered&&(t.getEl().value=e),t):t._rendered?t.getEl().value:t._value},repaint:function(){var e=this,t,n,r,i=0,o=0,a;t=e.getEl().style,n=e._layoutRect,a=e._lastRepaintRect||{};var s=document;return!e.settings.multiline&&s.all&&(!s.documentMode||s.documentMode<=8)&&(t.lineHeight=n.h-o+"px"),r=e._borderBox,i=r.left+r.right+8,o=r.top+r.bottom+(e.settings.multiline?8:0),n.x!==a.x&&(t.left=n.x+"px",a.x=n.x),n.y!==a.y&&(t.top=n.y+"px",a.y=n.y),n.w!==a.w&&(t.width=n.w-i+"px",a.w=n.w),n.h!==a.h&a
mp;&(t.height=n.h-o+"px",a.h=n.h),e._lastRepaintRect=a,e.fire("repaint",{},!1),e},renderHtml:function(){var e=this,t=e._id,n=e.settings,r=e.encode(e._value,!1),i="";return"spellcheck"in n&&(i+=' spellcheck="'+n.spellcheck+'"'),n.maxLength&&(i+=' maxlength="'+n.maxLength+'"'),n.size&&(i+=' size="'+n.size+'"'),n.subtype&&(i+=' type="'+n.subtype+'"'),e.disabled()&&(i+=' disabled="disabled"'),n.multiline?'<textarea id="'+t+'" class="'+e.classes()+'" '+(n.rows?' rows="'+n.rows+'"':"")+' hidefocus="1"'+i+">"+r+"</textarea>":'<input id="'+t+'" class="'+e.classes()+'" value="'+r+'" hidefocus="1"'+i+" />"},postRender:function(){var e=this;return t.on(e.getEl(),"change",function(t){e.fire("change",t)}),e._
super()},remove:function(){t.off(this.getEl()),this._super()}})}),r(rn,[j,K],function(e,t){return function(n,r){var i=this,o,a=t.classPrefix;i.show=function(t){return i.hide(),o=!0,window.setTimeout(function(){o&&n.appendChild(e.createFragment('<div class="'+a+"throbber"+(r?" "+a+"throbber-inline":"")+'"></div>'))},t||0),i},i.hide=function(){var e=n.lastChild;return e&&-1!=e.className.indexOf("throbber")&&e.parentNode.removeChild(e),o=!1,i}}}),a([l,c,u,d,f,p,m,h,g,v,y,b,C,x,w,_,N,E,k,S,T,R,A,B,D,L,M,H,P,O,I,F,z,W,V,U,q,$,j,K,G,Y,X,J,Q,Z,et,tt,nt,rt,it,ot,at,st,lt,ct,ut,dt,ft,pt,mt,ht,gt,vt,yt,bt,Ct,xt,wt,_t,Nt,Et,kt,St,Tt,Rt,At,Bt,Dt,Lt,Mt,Ht,Pt,Ot,It,Ft,zt,Wt,Vt,Ut,qt,$t,jt,Kt,Gt,Yt,Xt,Jt,Qt,Zt,en,tn,nn,rn])}(this);
</del><span class="cx">\ No newline at end of file
</span><ins>+// 4.1.2 (2014-07-15)
+!function(e,t){"use strict";function n(e,t){for(var n,r=[],i=0;i<e.length;++i){if(n=s[e[i]]||o(e[i]),!n)throw"module definition dependecy not found: "+e[i];r.push(n)}t.apply(null,r)}function r(e,r,i){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(r===t)throw"invalid module definition, dependencies must be specified";if(i===t)throw"invalid module definition, definition function must be specified";n(r,function(){s[e]=i.apply(null,arguments)})}function i(e){return!!s[e]}function o(t){for(var n=e,r=t.split(/[.\/]/),i=0;i<r.length;++i){if(!n[r[i]])return;n=n[r[i]]}return n}function a(n){for(var r=0;r<n.length;r++){for(var i=e,o=n[r],a=o.split(/[.\/]/),l=0;l<a.length-1;++l)i[a[l]]===t&&(i[a[l]]={}),i=i[a[l]];i[a[a.length-1]]=s[o]}}var s={},l="tinymce/dom/EventUtils",c="tinymce/dom/Sizzle",u="tinymce/util/Tools",d="tinymce/
Env",f="tinymce/dom/DomQuery",p="tinymce/html/Styles",h="tinymce/dom/TreeWalker",m="tinymce/dom/Range",g="tinymce/html/Entities",v="tinymce/dom/StyleSheetLoader",y="tinymce/dom/DOMUtils",b="tinymce/dom/ScriptLoader",C="tinymce/AddOnManager",x="tinymce/dom/RangeUtils",w="tinymce/NodeChange",_="tinymce/html/Node",E="tinymce/html/Schema",N="tinymce/html/SaxParser",k="tinymce/html/DomParser",S="tinymce/html/Writer",T="tinymce/html/Serializer",R="tinymce/dom/Serializer",A="tinymce/dom/TridentSelection",B="tinymce/util/VK",D="tinymce/dom/ControlSelection",L="tinymce/dom/BookmarkManager",H="tinymce/dom/Selection",M="tinymce/dom/ElementUtils",P="tinymce/fmt/Preview",O="tinymce/Formatter",I="tinymce/UndoManager",F="t
inymce/EnterKey",z="tinymce/ForceBlocks",W="tinymce/EditorCommands",V="tinymce/util/URI",U="tinymce/util/Class",$="tinymce/util/EventDispatcher",q="tinymce/ui/Selector",j="tinymce/ui/Collection",K="tinymce/ui/DomUtils",Y="tinymce/ui/Control",G="tinymce/ui/Factory",X="tinymce/ui/KeyboardNavigation",J="tinymce/ui/Container",Q="tinymce/ui/DragHelper",Z="tinymce/ui/Scrollable",et="tinymce/ui/Panel",tt="tinymce/ui/Movable",nt="tinymce/ui/Resizable",rt="tinymce/ui/FloatPanel",it="tinymce/ui/Window",ot="tinymce/ui/MessageBox",at="tinymce/WindowManager",st="tinymce/util/Quirks",lt="tinymce/util/Observable",ct="tinymce/EditorObservable",ut="tinymce/Shortcuts",dt="tinymce/Editor",ft="tinymce/util/I18n",pt="tinymce/Foc
usManager",ht="tinymce/EditorManager",mt="tinymce/LegacyInput",gt="tinymce/util/XHR",vt="tinymce/util/JSON",yt="tinymce/util/JSONRequest",bt="tinymce/util/JSONP",Ct="tinymce/util/LocalStorage",xt="tinymce/Compat",wt="tinymce/ui/Layout",_t="tinymce/ui/AbsoluteLayout",Et="tinymce/ui/Tooltip",Nt="tinymce/ui/Widget",kt="tinymce/ui/Button",St="tinymce/ui/ButtonGroup",Tt="tinymce/ui/Checkbox",Rt="tinymce/ui/ComboBox",At="tinymce/ui/ColorBox",Bt="tinymce/ui/PanelButton",Dt="tinymce/ui/ColorButton",Lt="tinymce/util/Color",Ht="tinymce/ui/ColorPicker",Mt="tinymce/ui/Path",Pt="tinymce/ui/ElementPath",Ot="tinymce/ui/FormItem",It="tinymce/ui/Form",Ft="tinymce/ui/FieldSet",zt="tinymce/ui/FilePicker",Wt="tinymce/ui/FitLayo
ut",Vt="tinymce/ui/FlexLayout",Ut="tinymce/ui/FlowLayout",$t="tinymce/ui/FormatControls",qt="tinymce/ui/GridLayout",jt="tinymce/ui/Iframe",Kt="tinymce/ui/Label",Yt="tinymce/ui/Toolbar",Gt="tinymce/ui/MenuBar",Xt="tinymce/ui/MenuButton",Jt="tinymce/ui/ListBox",Qt="tinymce/ui/MenuItem",Zt="tinymce/ui/Menu",en="tinymce/ui/Radio",tn="tinymce/ui/ResizeHandle",nn="tinymce/ui/Spacer",rn="tinymce/ui/SplitButton",on="tinymce/ui/StackLayout",an="tinymce/ui/TabPanel",sn="tinymce/ui/TextBox",ln="tinymce/ui/Throbber";r(l,[],function(){function e(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r||!1):e.attachEvent&&e.attachEvent("on"+t,n)}function t(e,t,n,r){e.removeEventListener?e.removeEventListener(t,n,r||!1):e.detachEvent&&e.detachEvent("on"+t,n)}functi
on n(e,t){function n(){return!1}function r(){return!0}var i,o=t||{},l;for(i in e)s[i]||(o[i]=e[i]);if(o.target||(o.target=o.srcElement||document),e&&a.test(e.type)&&e.pageX===l&&e.clientX!==l){var c=o.target.ownerDocument||document,u=c.documentElement,d=c.body;o.pageX=e.clientX+(u&&u.scrollLeft||d&&d.scrollLeft||0)-(u&&u.clientLeft||d&&d.clientLeft||0),o.pageY=e.clientY+(u&&u.scrollTop||d&&d.scrollTop||0)-(u&&u.clientTop||d&&d.clientTop||0)}return o.preventDefault=function(){o.isDefaultPrevented=r,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},o.stopPropagation=function(){o.isPropagationStopped=r,e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},o.stopImmediatePropagation=function(){o.isImmediatePropagationStopped=r,o.stopPropagation()},o.isDefaultPrevented||(o.isDefaultPrevented=n,o.isPropagationStopped=n,o.isImmediatePropagationStopped=n),o}function r(n,r
,i){function o(){i.domLoaded||(i.domLoaded=!0,r(c))}function a(){("complete"===l.readyState||"interactive"===l.readyState&&l.body)&&(t(l,"readystatechange",a),o())}function s(){try{l.documentElement.doScroll("left")}catch(e){return void setTimeout(s,0)}o()}var l=n.document,c={type:"ready"};return i.domLoaded?void r(c):(l.addEventListener?"complete"===l.readyState?o():e(n,"DOMContentLoaded",o):(e(l,"readystatechange",a),l.documentElement.doScroll&&n.self===n.top&&s()),void e(n,"load",o))}function i(){function i(e,t){var n,r,i,o,a=s[t];if(n=a&&a[e.type])for(r=0,i=n.length;i>r;r++)if(o=n[r],o&&o.func.call(o.scope,e)===!1&&e.preventDefault(),e.isImmediatePropagationStopped())return}var a=this,s={},l,c,u,d,f;c=o+(+new Date).toString(32),d="onmouseenter"in document.documentElement,u="onfocusin"in document.documentElement,f
={mouseenter:"mouseover",mouseleave:"mouseout"},l=1,a.domLoaded=!1,a.events=s,a.bind=function(t,o,p,h){function m(e){i(n(e||_.event),g)}var g,v,y,b,C,x,w,_=window;if(t&&3!==t.nodeType&&8!==t.nodeType){for(t[c]?g=t[c]:(g=l++,t[c]=g,s[g]={}),h=h||t,o=o.split(" "),y=o.length;y--;)b=o[y],x=m,C=w=!1,"DOMContentLoaded"===b&&(b="ready"),a.domLoaded&&"ready"===b&&"complete"==t.readyState?p.call(h,n({type:b})):(d||(C=f[b],C&&(x=function(e){var t,r;if(t=e.currentTarget,r=e.relatedTarget,r&&t.contains)r=t.contains(r);else for(;r&&r!==t;)r=r.parentNode;r||(e=n(e||_.event),e.type="mouseout"===e.type?"mouseleave":"mouseenter",e.target=t,i(e,g))})),u||"focusin"!==b&&"focusout"!==b||(w=!0,C="focusin"===b?"focus":"blur",x=function(e){e=n(e||_.event),e.type="focus"===e.typ
e?"focusin":"focusout",i(e,g)}),v=s[g][b],v?"ready"===b&&a.domLoaded?p({type:b}):v.push({func:p,scope:h}):(s[g][b]=v=[{func:p,scope:h}],v.fakeName=C,v.capture=w,v.nativeHandler=x,"ready"===b?r(t,x,a):e(t,C||b,x,w)));return t=v=0,p}},a.unbind=function(e,n,r){var i,o,l,u,d,f;if(!e||3===e.nodeType||8===e.nodeType)return a;if(i=e[c]){if(f=s[i],n){for(n=n.split(" "),l=n.length;l--;)if(d=n[l],o=f[d]){if(r)for(u=o.length;u--;)if(o[u].func===r){var p=o.nativeHandler,h=o.fakeName,m=o.capture;o=o.slice(0,u).concat(o.slice(u+1)),o.nativeHandler=p,o.fakeName=h,o.capture=m,f[d]=o}r&&0!==o.length||(delete f[d],t(e,o.fakeName||d,o.nativeHandler,o.capture))}}else{for(d in f)o=f[d],t(e,o.fakeName||d,o.nativeHandler,o.capture);f={}}for(d in f)return a;delete s[i];try{delete e[c]}catch(g){e[c]=null}}return a},a.fire=function(e,t,r){var o;if(!e||3===e.nodeType||8===e.nodeType)return a;r=n(null,r),r.type=t,r.target=e;do o=e[c],o&&
i(r,o),e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow;while(e&&!r.isPropagationStopped());return a},a.clean=function(e){var t,n,r=a.unbind;if(!e||3===e.nodeType||8===e.nodeType)return a;if(e[c]&&r(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(r(e),n=e.getElementsByTagName("*"),t=n.length;t--;)e=n[t],e[c]&&r(e);return a},a.destroy=function(){s={}},a.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1}}var o="mce-data-",a=/^(?:mouse|contextmenu)|click/,s={keyLocation:1,layerX:1,layerY:1,returnValue:1};return i.Event=new i,i.Event.bind(window,"ready",function(){}),i}),r(c,[],function(){function e(e,t,n,r){var i,o,a,s,l,c,d,p,h,m;if((t?t.ownerDocument||t:z)!==D&&B(t),t=t||D,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(H&&!r){if(i=vt.exec(e))if(a=i[1]){if(9===s){if(o=t.getElement
ById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&I(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return Z.apply(n,t.getElementsByTagName(e)),n;if((a=i[3])&&x.getElementsByClassName)return Z.apply(n,t.getElementsByClassName(a)),n}if(x.qsa&&(!M||!M.test(e))){if(p=d=F,h=t,m=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(c=N(e),(d=t.getAttribute("id"))?p=d.replace(bt,"\\$&"):t.setAttribute("id",p),p="[id='"+p+"'] ",l=c.length;l--;)c[l]=p+f(c[l]);h=yt.test(e)&&u(t.parentNode)||t,m=c.join(",")}if(m)try{return Z.apply(n,h.querySelectorAll(m)),n}catch(g){}finally{d||t.removeAttribute("id")}}}return S(e.replace(st,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>w.cacheLength&&delete e[t.shift()],e[n+" &quo
t;]=r}var t=[];return e}function r(e){return e[F]=!0,e}function i(e){var t=D.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=e.length;r--;)w.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||Y)-(~e.sourceIndex||Y);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function u(e){return e&&typeof e.getElementsByTagName!==K&&e}function d(){
}function f(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function p(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=V++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,a){var s,l,c=[W,o];if(a){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||i){if(l=t[F]||(t[F]={}),(s=l[r])&&s[0]===W&&s[1]===o)return c[2]=s[2];if(l[r]=c,c[2]=e(t,n,a))return!0}}}function h(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function m(t,n,r){for(var i=0,o=n.length;o>i;i++)e(t,n[i],r);return r}function g(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,c=null!=t;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),c&&t.push(s));return a}function v(e,t,n,i,o,a){return i&&!i[F]&&(i=v(i)),o&&!o[F]&&(o=v(o,a)),r(function(r,a,s,l){var c,u,d,f=[],p=[],h=a.l
ength,v=r||m(t||"*",s.nodeType?[s]:s,[]),y=!e||!r&&t?v:g(v,f,e,s,l),b=n?o||(r?e:h||i)?[]:a:y;if(n&&n(y,b,s,l),i)for(c=g(b,p),i(c,[],s,l),u=c.length;u--;)(d=c[u])&&(b[p[u]]=!(y[p[u]]=d));if(r){if(o||e){if(o){for(c=[],u=b.length;u--;)(d=b[u])&&c.push(y[u]=d);o(null,b=[],c,l)}for(u=b.length;u--;)(d=b[u])&&(c=o?tt.call(r,d):f[u])>-1&&(r[c]=!(a[c]=d))}}else b=g(b===a?b.splice(h,b.length):b),o?o(null,a,b,l):Z.apply(a,b)})}function y(e){for(var t,n,r,i=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,l=p(function(e){return e===t},a,!0),c=p(function(e){return tt.call(t,e)>-1},a,!0),u=[function(e,n,r){return!o&&(r||n!==T)||((t=n).nodeType?l(e,n,r):c(e,n,r))}];i>s;s++)if(n=w.relative[e[s].type])u=[p(h(u),n)];else{if(n=w.filter[e[s].type].apply(null,e[s].matches),n[F]){for(r=++s;i>r&&!w.relative[e[r].type];r++);return v(s>1&&h(u),s>1&&f(e.slice(0,s-1).concat({value
:" "===e[s-2].type?"*":""})).replace(st,"$1"),n,r>s&&y(e.slice(s,r)),i>r&&y(e=e.slice(r)),i>r&&f(e))}u.push(n)}return h(u)}function b(t,n){var i=n.length>0,o=t.length>0,a=function(r,a,s,l,c){var u,d,f,p=0,h="0",m=r&&[],v=[],y=T,b=r||o&&w.find.TAG("*",c),C=W+=null==y?1:Math.random()||.1,x=b.length;for(c&&(T=a!==D&&a);h!==x&&null!=(u=b[h]);h++){if(o&&u){for(d=0;f=t[d++];)if(f(u,a,s)){l.push(u);break}c&&(W=C)}i&&((u=!f&&u)&&p--,r&&m.push(u))}if(p+=h,i&&h!==p){for(d=0;f=n[d++];)f(m,v,a,s);if(r){if(p>0)for(;h--;)m[h]||v[h]||(v[h]=J.call(l));v=g(v)}Z.apply(l,v),c&&!r&&v.length>0&&p+n.length>1&&e.uniqueSort(l)}return c&&(W=C,T=y),m};return i?r(a):a}var C,x,w,_,E,N,k,S,T,R,A,B,D,L,H,M,P,O,I,F="sizzle"+-new Date,z=window.document,W=0,V=0,U=n(
),$=n(),q=n(),j=function(e,t){return e===t&&(A=!0),0},K=typeof t,Y=1<<31,G={}.hasOwnProperty,X=[],J=X.pop,Q=X.push,Z=X.push,et=X.slice,tt=X.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},nt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",rt="[\\x20\\t\\r\\n\\f]",it="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ot="\\["+rt+"*("+it+")(?:"+rt+"*([*^$|!~]?=)"+rt+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+it+"))|)"+rt+"*\\]",at=":("+it+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ot+")*)|.*)\\)|)",st=new RegExp("^"+rt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+rt+"+$","g"),lt=new RegExp("^"+rt+"*,"+rt+&q
uot;*"),ct=new RegExp("^"+rt+"*([>+~]|"+rt+")"+rt+"*"),ut=new RegExp("="+rt+"*([^\\]'\"]*?)"+rt+"*\\]","g"),dt=new RegExp(at),ft=new RegExp("^"+it+"$"),pt={ID:new RegExp("^#("+it+")"),CLASS:new RegExp("^\\.("+it+")"),TAG:new RegExp("^("+it+"|[*])"),ATTR:new RegExp("^"+ot),PSEUDO:new RegExp("^"+at),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+rt+"*(even|odd|(([+-]|)(\\d*)n|)"+rt+"*(?:([+-]|)"+rt+"*(\\d+)|))"+rt+"*\\)|)","i"),bool:new RegExp("^(?:"+nt+")$","i"),needsContext:new RegExp("^"+rt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+rt+"*((?:-\\d)?\\d*)"+rt+"*\\)|)(?=[^-]|$)","i")},ht=/^(?:input|select|textarea|button
)$/i,mt=/^h\d$/i,gt=/^[^{]+\{\s*\[native \w/,vt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,yt=/[+~]/,bt=/'|\\/g,Ct=new RegExp("\\\\([\\da-f]{1,6}"+rt+"?|("+rt+")|.)","ig"),xt=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{Z.apply(X=et.call(z.childNodes),z.childNodes),X[z.childNodes.length].nodeType}catch(wt){Z={apply:X.length?function(e,t){Q.apply(e,et.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}x=e.support={},E=e.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},B=e.setDocument=function(e){var t,n=e?e.ownerDocument||e:z,r=n.defaultView;return n!==D&&9===n.nodeType&&n.documentElement?(D=n,L=n.documentElement,H=!E(n),r&&r!==r.top&&(r.addEventListener?r.addEventListener("unload",function(){B()},!1):r.att
achEvent&&r.attachEvent("onunload",function(){B()})),x.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=i(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=gt.test(n.getElementsByClassName),x.getById=i(function(e){return L.appendChild(e).id=F,!n.getElementsByName||!n.getElementsByName(F).length}),x.getById?(w.find.ID=function(e,t){if(typeof t.getElementById!==K&&H){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},w.filter.ID=function(e){var t=e.replace(Ct,xt);return function(e){return e.getAttribute("id")===t}}):(delete w.find.ID,w.filter.ID=function(e){var t=e.replace(Ct,xt);return function(e){var n=typeof e.getAttributeNode!==K&&e.getAttributeNode("id");return n&&n.value===t}}),w.find.TAG=x.getElementsByTagName?function(e,t){return typeof t.getEl
ementsByTagName!==K?t.getElementsByTagName(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=x.getElementsByClassName&&function(e,t){return H?t.getElementsByClassName(e):void 0},P=[],M=[],(x.qsa=gt.test(n.querySelectorAll))&&(i(function(e){e.innerHTML="<select msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&M.push("[*^$]="+rt+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||M.push("\\["+rt+"*(?:value|"+nt+")"),e.querySelectorAll(":checked").length||M.push(":checked")}),i(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.quer
ySelectorAll("[name=d]").length&&M.push("name"+rt+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||M.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),M.push(",.*:")})),(x.matchesSelector=gt.test(O=L.matches||L.webkitMatchesSelector||L.mozMatchesSelector||L.oMatchesSelector||L.msMatchesSelector))&&i(function(e){x.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),P.push("!=",at)}),M=M.length&&new RegExp(M.join("|")),P=P.length&&new RegExp(P.join("|")),t=gt.test(L.compareDocumentPosition),I=t||gt.test(L.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},j=t?function(e,
t){if(e===t)return A=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r?r:(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&r||!x.sortDetached&&t.compareDocumentPosition(e)===r?e===n||e.ownerDocument===z&&I(z,e)?-1:t===n||t.ownerDocument===z&&I(z,t)?1:R?tt.call(R,e)-tt.call(R,t):0:4&r?-1:1)}:function(e,t){if(e===t)return A=!0,0;var r,i=0,o=e.parentNode,s=t.parentNode,l=[e],c=[t];if(!o||!s)return e===n?-1:t===n?1:o?-1:s?1:R?tt.call(R,e)-tt.call(R,t):0;if(o===s)return a(e,t);for(r=e;r=r.parentNode;)l.unshift(r);for(r=t;r=r.parentNode;)c.unshift(r);for(;l[i]===c[i];)i++;return i?a(l[i],c[i]):l[i]===z?-1:c[i]===z?1:0},n):D},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==D&&B(t),n=n.replace(ut,"='$1']"),!(!x.matchesSelector||!H||P&&P.test(n)||M&&M.test(n)))try{var r=O.call(t,n);if(r||x.disconnectedMatch||t.docum
ent&&11!==t.document.nodeType)return r}catch(i){}return e(n,D,null,[t]).length>0},e.contains=function(e,t){return(e.ownerDocument||e)!==D&&B(e),I(e,t)},e.attr=function(e,n){(e.ownerDocument||e)!==D&&B(e);var r=w.attrHandle[n.toLowerCase()],i=r&&G.call(w.attrHandle,n.toLowerCase())?r(e,n,!H):t;return i!==t?i:x.attributes||!H?e.getAttribute(n):(i=e.getAttributeNode(n))&&i.specified?i.value:null},e.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},e.uniqueSort=function(e){var t,n=[],r=0,i=0;if(A=!x.detectDuplicates,R=!x.sortStable&&e.slice(0),e.sort(j),A){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return R=null,e},_=e.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=_(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e
[r++];)n+=_(t);return n},w=e.selectors={cacheLength:50,createPseudo:r,match:pt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Ct,xt),e[3]=(e[3]||e[4]||e[5]||"").replace(Ct,xt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pt.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&dt.test(n)&&(t=N(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(
e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Ct,xt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=U[e+" "];return t||(t=new RegExp("(^|"+rt+")"+e+"("+rt+"|$)"))&&U(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==K&&e.getAttribute("class")||"")})},ATTR:function(t,n,r){return function(i){var o=e.attr(i,t);return null==o?"!="===n:n?(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o+" ").indexOf(r)>-1:"|="===n?o===r||o.slice(0,r.length+1)===r+"-"
;:!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,f,p,h,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s;if(g){if(o){for(;m;){for(d=t;d=d[m];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;h=m="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?g.firstChild:g.lastChild],a&&y){for(u=g[F]||(g[F]={}),c=u[e]||[],p=c[0]===W&&c[1],f=c[0]===W&&c[2],d=p&&g.childNodes[p];d=++p&&d&&d[m]||(f=p=0)||h.pop();)if(1===d.nodeType&&++f&&d===t){u[e]=[W,p,f];break}}else if(y&&(c=(t[F]||(t[F]={}))[e])&&c[0]===W)f=c[1];else for(;(d=++p&&d&&d[m]||(f=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||
!++f||(y&&((d[F]||(d[F]={}))[e]=[W,f]),d!==t)););return f-=i,f===r||f%r===0&&f/r>=0}}},PSEUDO:function(t,n){var i,o=w.pseudos[t]||w.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[F]?o(n):o.length>1?(i=[t,t,"",n],w.setFilters.hasOwnProperty(t.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=tt.call(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=k(e.replace(st,"$1"));return i[F]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),!n.pop()}}),has:r(function(t){return function(n){return e(t,n).length>0}}),contains:r(function(e){return e=e.replace(Ct,xt),function(t){return(t.textContent||t.innerText||_(t)).indexOf(e)>-1}}),lang:r(function(t){return ft.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(Ct,xt).toLowe
rCase(),function(e){var n;do if(n=H?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return n=n.toLowerCase(),n===t||0===n.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=window.location&&window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===L},focus:function(e){return e===D.activeElement&&(!D.hasFocus||D.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return mt
.test(e.nodeName)},input:function(e){return ht.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[0>n?n+t:n]}),even:c(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=0>n?n+t:n;++r<t;)e.push(r);return e})}},w.pseudos.nth=w.pseudos.eq;for(C in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[C]=s(C);for(C in{submit:!0,reset:!0})w.pseudos[C]=l(C);return d.prototype=w.filters=w.pseudos,w.setFi
lters=new d,N=e.tokenize=function(t,n){var r,i,o,a,s,l,c,u=$[t+" "];if(u)return n?0:u.slice(0);for(s=t,l=[],c=w.preFilter;s;){(!r||(i=lt.exec(s)))&&(i&&(s=s.slice(i[0].length)||s),l.push(o=[])),r=!1,(i=ct.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(st," ")}),s=s.slice(r.length));for(a in w.filter)!(i=pt[a].exec(s))||c[a]&&!(i=c[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?e.error(t):$(t,l).slice(0)},k=e.compile=function(e,t){var n,r=[],i=[],o=q[e+" "];if(!o){for(t||(t=N(e)),n=t.length;n--;)o=y(t[n]),o[F]?r.push(o):i.push(o);o=q(e,b(i,r)),o.selector=e}return o},S=e.select=function(e,t,n,r){var i,o,a,s,l,c="function"==typeof e&&e,d=!r&&N(e=c.selector||e);if(n=n||[],1===d.length){if(o=d[0]=d[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&x.getById&&9===t.nodeType&&H&&w.rel
ative[o[1].type]){if(t=(w.find.ID(a.matches[0].replace(Ct,xt),t)||[])[0],!t)return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=pt.needsContext.test(e)?0:o.length;i--&&(a=o[i],!w.relative[s=a.type]);)if((l=w.find[s])&&(r=l(a.matches[0].replace(Ct,xt),yt.test(o[0].type)&&u(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&f(o),!e)return Z.apply(n,r),n;break}}return(c||k(e,d))(r,t,!H,n,yt.test(e)&&u(t.parentNode)||t),n},x.sortStable=F.split("").sort(j).join("")===F,x.detectDuplicates=!!A,B(),x.sortDetached=i(function(e){return 1&e.compareDocumentPosition(D.createElement("div"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&i(function(e){return e.inne
rHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(nt,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),e}),r(u,[],function(){function e(e){return null===e||e===t?"":(""+e).replace(m,"")}function n(e,n){return n?"array"==n&&g(e)?!0:typeof e==n:e!==t}function r(e){var t=e,n,r;if(!g(e))for(t=[],n=0,r=e.length;r>n;n++)t[n]=e[n];return t}function i(e,t,n){var r;for(e=e||[],t=t||",","string"==typeof e&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n}function o(e,n,r){var i,o;if(!e)return 0;if(r=r||e,e.length!==t){for(i=0,o=e.length;o>i;i++)
if(n.call(r,e[i],i,e)===!1)return 0}else for(i in e)if(e.hasOwnProperty(i)&&n.call(r,e[i],i,e)===!1)return 0;return 1}function a(e,t){var n=[];return o(e,function(e){n.push(t(e))}),n}function s(e,t){var n=[];return o(e,function(e){(!t||t(e))&&n.push(e)}),n}function l(e,t,n){var r=this,i,o,a,s,l,c=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),a=e[3].match(/(^|\.)(\w+)$/i)[2],o=r.createNS(e[3].replace(/\.\w+$/,""),n),!o[a]){if("static"==e[2])return o[a]=t,void(this.onCreate&&this.onCreate(e[2],e[3],o[a]));t[a]||(t[a]=function(){},c=1),o[a]=t[a],r.extend(o[a].prototype,t),e[5]&&(i=r.resolve(e[5]).prototype,s=e[5].match(/\.(\w+)$/i)[1],l=o[a],o[a]=c?function(){return i[s].apply(this,arguments)}:function(){return this.parent=i[s],l.apply(this,arguments)},o[a].prototype[a]=o[a],r.each(i,function(e,t){o[a].prototype[t]=i[t]}),r.each(t,function(e,t){i[t]?o[a].prototype[t]=function(){return this.parent=i[t],e.apply(this,arguments)}:t!=
a&&(o[a].prototype[t]=e)})),r.each(t["static"],function(e,t){o[a][t]=e})}}function c(e,t){var n,r;if(e)for(n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1}function u(e,n){var r,i,o,a=arguments,s;for(r=1,i=a.length;i>r;r++){n=a[r];for(o in n)n.hasOwnProperty(o)&&(s=n[o],s!==t&&(e[o]=s))}return e}function d(e,t,n,r){r=r||this,e&&(n&&(e=e[n]),o(e,function(e,i){return t.call(r,e,i,n)===!1?!1:void d(e,t,n,r)}))}function f(e,t){var n,r;for(t=t||window,e=e.split("."),n=0;n<e.length;n++)r=e[n],t[r]||(t[r]={}),t=t[r];return t}function p(e,t){var n,r;for(t=t||window,e=e.split("."),n=0,r=e.length;r>n&&(t=t[e[n]],t);n++);return t}function h(t,r){return!t||n(t,"array")?t:a(t.split(r||","),e)}var m=/^\s*|\s*$/g,g=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};return{trim:e,isArray:g,is:n,toArray:r,makeMap:i,each:o,map:a,grep:s,inArray
:c,extend:u,create:l,walk:d,createNS:f,resolve:p,explode:h}}),r(d,[],function(){var e=navigator,t=e.userAgent,n,r,i,o,a,s,l;n=window.opera&&window.opera.buildNumber,r=/WebKit/.test(t),i=!r&&!n&&/MSIE/gi.test(t)&&/Explorer/gi.test(e.appName),i=i&&/MSIE (\w+)\./.exec(t)[1],o=-1==t.indexOf("Trident/")||-1==t.indexOf("rv:")&&-1==e.appName.indexOf("Netscape")?!1:11,i=i||o,a=!r&&!o&&/Gecko/.test(t),s=-1!=t.indexOf("Mac"),l=/(iPad|iPhone)/.test(t);var c=!l||t.match(/AppleWebKit\/(\d*)/)[1]>=534;return{opera:n,webkit:r,ie:i,gecko:a,mac:s,iOS:l,contentEditable:c,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:8!=i,range:window.getSelection&&"Range"in window,documentMode:i?document.documentMode||7:10}}),r(f,[l,c,u,d],function(e,n,r,i){function o(e){return"undefined"!=typeof e}function a(e){re
turn"string"==typeof e}function s(e,t){var n,r,i;for(t=t||x,i=t.createElement("div"),n=t.createDocumentFragment(),i.innerHTML=e;r=i.firstChild;)n.appendChild(r);return n}function l(e,t,n,r){var i;if(a(t))t=s(t,g(e[0]));else if(t.length&&!t.nodeType){if(t=d.makeArray(t),r)for(i=t.length-1;i>=0;i--)l(e,t[i],n,r);else for(i=0;i<t.length;i++)l(e,t[i],n,r);return e}if(t.nodeType)for(i=e.length;i--;)n.call(e[i],t);return e}function c(e,t){return e&&t&&-1!==(" "+e.className+" ").indexOf(" "+t+" ")}function u(e,t,n){var r,i;return t=d(t)[0],e.each(function(){var e=this;n&&r==e.parentNode?i.appendChild(e):(r=e.parentNode,i=t.cloneNode(!1),e.parentNode.insertBefore(i,e),i.appendChild(e))}),e}function d(e,t){return new d.fn.init(e,t)}function f(e,t){var n;if(t.indexOf)return t.indexOf(e);for(n=t.length;n--;)if(t[n]===e)return n;return-1}function p(e){return null===e||e===k?"":("&quo
t;+e).replace(L,"")}function h(e,t){var n,r,i,o,a;if(e)if(n=e.length,n===o){for(r in e)if(e.hasOwnProperty(r)&&(a=e[r],t.call(a,r,a)===!1))break}else for(i=0;n>i&&(a=e[i],t.call(a,i,a)!==!1);i++);return e}function m(e,t){var n=[];return h(e,function(e,r){t(r,e)&&n.push(r)}),n}function g(e){return e?9==e.nodeType?e:e.ownerDocument:x}function v(e,n,r){var i=[],o=e[n];for("string"!=typeof r&&r instanceof d&&(r=r[0]);o&&9!==o.nodeType;){if(r!==t){if(o===r)break;if("string"==typeof r&&d(o).is(r))break}1===o.nodeType&&i.push(o),o=o[n]}return i}function y(e,n,r,i){var o=[];for(i instanceof d&&(i=i[0]);e;e=e[n])if(!r||e.nodeType===r){if(i!==t){if(e===i)break;if("string"==typeof i&&d(e).is(i))break}o.push(e)}return o}function b(e,t,n){for(e=e[t];e;e=e[t])if(e.nodeType==n)return e;return null}function C(e,t,n){h(n,function(n,r){e[n]=e[n]||{},e[n][t]=r})}var x=document,w=A
rray.prototype.push,_=Array.prototype.slice,E=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,N=e.Event,k,S=r.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),T=r.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),R={"for":"htmlFor","class":"className",readonly:"readOnly"},A={"float":"cssFloat"},B={},D={},L=/^\s*|\s*$/g;return d.fn=d.prototype={constructor:d,selector:"",context:null,length:0,init:function(e,t){var n=this,r,i;if(!e)return n;if(e.nodeType)return n.context=n[0]=e,n.length=1,n;if(t&&t.nodeType)n.context=t;else{if(t)return d(e).attr(t);n.context=t=document}if(a(e)){if(n.selector=e,r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:E.exec(e),!r)return d(t).find(e);if(r[1])for(i=s(
e,g(t)).firstChild;i;)w.call(n,i),i=i.nextSibling;else{if(i=g(t).getElementById(r[2]),!i)return n;if(i.id!==r[2])return n.find(e);n.length=1,n[0]=i}}else this.add(e,!1);return n},toArray:function(){return r.toArray(this)},add:function(e,t){var n=this,r,i;if(a(e))return n.add(d(e));if(e.nodeType)return n.add([e]);if(t!==!1)for(r=d.unique(n.toArray().concat(d.makeArray(e))),n.length=r.length,i=0;i<r.length;i++)n[i]=r[i];else w.apply(n,d.makeArray(e));
+return n},attr:function(e,t){var n=this,r;if("object"==typeof e)h(e,function(e,t){n.attr(e,t)});else{if(!o(t)){if(n[0]&&1===n[0].nodeType){if(r=B[e],r&&r.get)return r.get(n[0],e);if(T[e])return n.prop(e)?e:k;t=n[0].getAttribute(e,2),null===t&&(t=k)}return t}this.each(function(){var n;if(1===this.nodeType){if(n=B[e],n&&n.set)return void n.set(this,t);null===t?this.removeAttribute(e,2):this.setAttribute(e,t,2)}})}return n},removeAttr:function(e){return this.attr(e,null)},prop:function(e,t){var n=this;if(e=R[e]||e,"object"==typeof e)h(e,function(e,t){n.prop(e,t)});else{if(!o(t))return n[0]&&n[0].nodeType&&e in n[0]?n[0][e]:t;this.each(function(){1==this.nodeType&&(this[e]=t)})}return n},css:function(e,t){function n(e){return e.replace(/-(\D)/g,function(e,t){return t.toUpperCase()})}function r(e){return e.replace(/[A-Z]/g,function(e){return"-"+e})}var i=this,a,s;if("object"==typeof e)h(e,func
tion(e,t){i.css(e,t)});else if(o(t))e=n(e),"number"!=typeof t||S[e]||(t+="px"),i.each(function(){var n=this.style;if(s=D[e],s&&s.set)return void s.set(this,t);try{this.style[A[e]||e]=t}catch(i){}(null===t||""===t)&&(n.removeProperty?n.removeProperty(r(e)):n.removeAttribute(e))});else{if(a=i[0],s=D[e],s&&s.get)return s.get(a);if(a.ownerDocument.defaultView)try{return a.ownerDocument.defaultView.getComputedStyle(a,null).getPropertyValue(r(e))}catch(l){return k}else if(a.currentStyle)return a.currentStyle[n(e)]}return i},remove:function(){for(var e=this,t,n=this.length;n--;)t=e[n],N.clean(t),t.parentNode&&t.parentNode.removeChild(t);return this},empty:function(){for(var e=this,t,n=this.length;n--;)for(t=e[n];t.firstChild;)t.removeChild(t.firstChild);return this},html:function(e){var t=this,n;if(o(e)){n=t.length;try{for(;n--;)t[n].innerHTML=e}catch(r){d(t[n]).empty().append(e)}return t}return t[0]?t[0].innerHTML:""}
,text:function(e){var t=this,n;if(o(e)){for(n=t.length;n--;)"innerText"in t[n]?t[n].innerText=e:t[0].textContent=e;return t}return t[0]?t[0].innerText||t[0].textContent:""},append:function(){return l(this,arguments,function(e){1===this.nodeType&&this.appendChild(e)})},prepend:function(){return l(this,arguments,function(e){1===this.nodeType&&this.insertBefore(e,this.firstChild)},!0)},before:function(){var e=this;return e[0]&&e[0].parentNode?l(e,arguments,function(e){this.parentNode.insertBefore(e,this)}):e},after:function(){var e=this;return e[0]&&e[0].parentNode?l(e,arguments,function(e){this.parentNode.insertBefore(e,this.nextSibling)},!0):e},appendTo:function(e){return d(e).append(this),this},prependTo:function(e){return d(e).prepend(this),this},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){return u(this,e)},wrapAll:function(e){return u(this,e,!0)},wrapInner:function(e){return this.each(function(){d(thi
s).contents().wrapAll(e)}),this},unwrap:function(){return this.parent().each(function(){d(this).replaceWith(this.childNodes)})},clone:function(){var e=[];return this.each(function(){e.push(this.cloneNode(!0))}),d(e)},addClass:function(e){return this.toggleClass(e,!0)},removeClass:function(e){return this.toggleClass(e,!1)},toggleClass:function(e,t){var n=this;return"string"!=typeof e?n:(-1!==e.indexOf(" ")?h(e.split(" "),function(){n.toggleClass(this,t)}):n.each(function(n,r){var i,o;o=c(r,e),o!==t&&(i=r.className,o?r.className=p((" "+i+" ").replace(" "+e+" "," ")):r.className+=i?" "+e:e)}),n)},hasClass:function(e){return c(this[0],e)},each:function(e){return h(this,e)},on:function(e,t){return this.each(function(){N.bind(this,e,t)})},off:function(e,t){return this.each(function(){N.unbind(this,e,t)})},trigger:function(e){return this.each(function(){"object"==typeof e?N.fire(this
,e.type,e):N.fire(this,e)})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return new d(_.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},find:function(e){var t,n,r=[];for(t=0,n=this.length;n>t;t++)d.find(e,this[t],r);return d(r)},filter:function(e){return d("function"==typeof e?m(this.toArray(),function(t,n){return e(n,t)}):d.filter(e,this.toArray()))},closest:function(e){var t=[];return e instanceof d&&(e=e[0]),this.each(function(n,r){for(;r;){if("string"==typeof e&&d(r).is(e)){t.push(r);break}if(r==e){t.push(r);break}r=r.parentNode}}),d(t)},offset:function(e){var t,n,r,i=0,o=0,a;return e?this.css(e):(t=this[0],t&&(n=t.ownerDocument,r=n.documentElement,t.getBoundingClientRect&&(a=t.getBoundingClientRect(),i=a.le
ft+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,o=a.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:i,top:o})},push:w,sort:[].sort,splice:[].splice},r.extend(d,{extend:r.extend,makeArray:r.toArray,inArray:f,isArray:r.isArray,each:h,trim:p,grep:m,find:n,expr:n.selectors,unique:n.uniqueSort,text:n.getText,contains:n.contains,filter:function(e,t,n){return n&&(e=":not("+e+")"),t=1===t.length?d.find.matchesSelector(t[0],e)?[t[0]]:[]:d.find.matches(e,t)}}),h({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return v(e,"parentNode")},next:function(e){return b(e,"nextSibling",1)},prev:function(e){return b(e,"previousSibling",1)},children:function(e){return y(e.firstChild,"nextSibling",1)},contents:function(e){return r.toArray(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(e,t){d.fn[e]=function(n){var r=this,i
=[];return r.each(function(){var e=t.call(i,this,n,i);e&&(d.isArray(e)?i.push.apply(i,e):i.push(e))}),this.length>1&&(i=d.unique(i),0===e.indexOf("parents")&&(i=i.reverse())),i=d(i),n?i.filter(n):i}}),h({parentsUntil:function(e,t){return v(e,"parentNode",t)},nextUntil:function(e,t){return y(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return y(e,"previousSibling",1,t).slice(1)}},function(e,t){d.fn[e]=function(n,r){var i=this,o=[];return i.each(function(){var e=t.call(o,this,n,o);e&&(d.isArray(e)?o.push.apply(o,e):o.push(e))}),this.length>1&&(o=d.unique(o),(0===e.indexOf("parents")||"prevUntil"===e)&&(o=o.reverse())),o=d(o),r?o.filter(r):o}}),d.fn.is=function(e){return!!e&&this.filter(e).length>0},d.fn.init.prototype=d.fn,d.overrideDefaults=function(e){function t(r,i){return n=n||e(),0===arguments.length&&(r=n.element),i||(i=n.context),new t.f
n.init(r,i)}var n;return d.extend(t,this),t},i.ie&&i.ie<8&&(C(B,"get",{maxlength:function(e){var t=e.maxLength;return 2147483647===t?k:t},size:function(e){var t=e.size;return 20===t?k:t},"class":function(e){return e.className},style:function(e){var t=e.style.cssText;return 0===t.length?k:t}}),C(B,"set",{"class":function(e,t){e.className=t},style:function(e,t){e.style.cssText=t}})),i.ie&&i.ie<9&&(A.float="styleFloat",C(D,"set",{opacity:function(e,t){var n=e.style;null===t||""===t?n.removeAttribute("filter"):(n.zoom=1,n.filter="alpha(opacity="+100*t+")")}})),d.attrHooks=B,d.cssHooks=D,d}),r(p,[],function(){return function(e,t){function n(e,t,n,r){function i(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e}return"#"+i(t)+i(n)+i(r)}var r=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,i=/(?:url(?:(?:\(\s*\&q
uot;([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,o=/\s*([^:]+):\s*([^;]+);?/g,a=/\s+$/,s,l,c={},u,d,f,p="\ufeff";for(e=e||{},t&&(d=t.getValidStyles(),f=t.getInvalidStyles()),u=("\\\" \\' \\; \\: ; : "+p).split(" "),l=0;l<u.length;l++)c[u[l]]=p+l,c[p+l]=u[l];return{toHex:function(e){return e.replace(r,n)},parse:function(t){function s(e,t,n){var r,i,o,a;if(r=m[e+"-top"+t],r&&(i=m[e+"-right"+t],i&&(o=m[e+"-bottom"+t],o&&(a=m[e+"-left"+t])))){var s=[r,i,o,a];for(l=s.length-1;l--&&s[l]===s[l+1];);l>-1&&n||(m[e+t]=-1==l?s[0]:s.join(" "),delete m[e+"-top"+t],delete m[e+"-right"+t],delete m[e+"-bottom"+t],delete m[e+"-left"+t])}}function u(e){var t=m[e],n;if(t){for(t=t.split(" "),n=t.length;n--;)if(t[n]!==t[0])return!1;
return m[e]=t[0],!0}}function d(e,t,n,r){u(t)&&u(n)&&u(r)&&(m[e]=m[t]+" "+m[n]+" "+m[r],delete m[t],delete m[n],delete m[r])}function f(e){return b=!0,c[e]}function p(e,t){return b&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return c[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e}function h(t,n,r,i,o,a){if(o=o||a)return o=p(o),"'"+o.replace(/\'/g,"\\'")+"'";if(n=p(n||r||i),!e.allow_script_urls){var s=n.replace(/[\s\r\n]+/,"");if(/(java|vb)script:/i.test(s))return"";if(!e.allow_svg_data_urls&&/^data:image\/svg/i.test(s))return""}return C&&(n=C.call(x,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"}var m={},g,v,y,b,C=e.url_converter,x=e.url_converter_scope||this;if(t){for(t=t.replace(/[\u0000-\u001F]/g,""),t=t.replace(/\\[\"\';:\uFEFF]/g,f).replace(/\"[^\"]+\"|\'[^\']+\'/g,funct
ion(e){return e.replace(/[;:]/g,f)});g=o.exec(t);){if(v=g[1].replace(a,"").toLowerCase(),y=g[2].replace(a,""),y=y.replace(/\\[0-9a-f]+/g,function(e){return String.fromCharCode(parseInt(e.substr(1),16))}),v&&y.length>0){if(!e.allow_script_urls&&("behavior"==v||/expression\s*\(|\/\*|\*\//.test(y)))continue;"font-weight"===v&&"700"===y?y="bold":("color"===v||"background-color"===v)&&(y=y.toLowerCase()),y=y.replace(r,n),y=y.replace(i,h),m[v]=b?p(y,!0):y}o.lastIndex=g.index+g[0].length}s("border","",!0),s("border","-width"),s("border","-color"),s("border","-style"),s("padding",""),s("margin",""),d("border","border-width","border-style","border-color"),"medium none"===m.border&&delete m.border,"n
one"===m["border-image"]&&delete m["border-image"]}return m},serialize:function(e,t){function n(t){var n,r,o,a;if(n=d[t])for(r=0,o=n.length;o>r;r++)t=n[r],a=e[t],a!==s&&a.length>0&&(i+=(i.length>0?" ":"")+t+": "+a+";")}function r(e,t){var n;return n=f["*"],n&&n[e]?!1:(n=f[t],n&&n[e]?!1:!0)}var i="",o,a;if(t&&d)n("*"),n(t);else for(o in e)a=e[o],a!==s&&a.length>0&&(!f||r(o,t))&&(i+=(i.length>0?" ":"")+o+": "+a+";");return i}}}}),r(h,[],function(){return function(e,t){function n(e,n,r,i){var o,a;if(e){if(!i&&e[n])return e[n];if(e!=t){if(o=e[r])return o;for(a=e.parentNode;a&&a!=t;a=a.parentNode)if(o=a[r])return o}}}var r=e;this.current=function(){return r},this.next=function(e){return r=n(r,"firstChild","nextSibling",e)},this.prev=f
unction(e){return r=n(r,"lastChild","previousSibling",e)}}}),r(m,[u],function(e){function t(n){function r(){return M.createDocumentFragment()}function i(e,t){_(F,e,t)}function o(e,t){_(z,e,t)}function a(e){i(e.parentNode,j(e))}function s(e){i(e.parentNode,j(e)+1)}function l(e){o(e.parentNode,j(e))}function c(e){o(e.parentNode,j(e)+1)}function u(e){e?(H[U]=H[V],H[$]=H[W]):(H[V]=H[U],H[W]=H[$]),H.collapsed=F}function d(e){a(e),c(e)}function f(e){i(e,0),o(e,1===e.nodeType?e.childNodes.length:e.nodeValue.length)}function p(e,t){var n=H[V],r=H[W],i=H[U],o=H[$],a=t.startContainer,s=t.startOffset,l=t.endContainer,c=t.endOffset;return 0===e?w(n,r,a,s):1===e?w(i,o,a,s):2===e?w(i,o,l,c):3===e?w(n,r,l,c):void 0}function h(){E(I)}function m(){return E(P)}function g(){return E(O)}function v(e){var t=this[V],r=this[W],i,o;3!==t.nodeType&&4!==t.nodeType||!t.nodeValue?(t.childNodes.length>0&&(o=t.childNodes[r]),o?t.insertBefore(e,o):3==t.nodeType?n.insertAfter
(e,t):t.appendChild(e)):r?r>=t.nodeValue.length?n.insertAfter(e,t):(i=t.splitText(r),t.parentNode.insertBefore(e,i)):t.parentNode.insertBefore(e,t)}function y(e){var t=H.extractContents();H.insertNode(e),e.appendChild(t),H.selectNode(e)}function b(){return q(new t(n),{startContainer:H[V],startOffset:H[W],endContainer:H[U],endOffset:H[$],collapsed:H.collapsed,commonAncestorContainer:H.commonAncestorContainer})}function C(e,t){var n;if(3==e.nodeType)return e;if(0>t)return e;for(n=e.firstChild;n&&t>0;)--t,n=n.nextSibling;return n?n:e}function x(){return H[V]==H[U]&&H[W]==H[$]}function w(e,t,r,i){var o,a,s,l,c,u;if(e==r)return t==i?0:i>t?-1:1;for(o=r;o&&o.parentNode!=e;)o=o.parentNode;if(o){for(a=0,s=e.firstChild;s!=o&&t>a;)a++,s=s.nextSibling;return a>=t?-1:1}for(o=e;o&&o.parentNode!=r;)o=o.parentNode;if(o){for(a=0,s=r.firstChild;s!=o&&i>a;)a++,s=s.nextSibling;return i>a?-1:1}for(l=n.findCommonAncestor(e,r),c=e;c&a
mp;&c.parentNode!=l;)c=c.parentNode;for(c||(c=l),u=r;u&&u.parentNode!=l;)u=u.parentNode;if(u||(u=l),c==u)return 0;for(s=l.firstChild;s;){if(s==c)return-1;if(s==u)return 1;s=s.nextSibling}}function _(e,t,r){var i,o;for(e?(H[V]=t,H[W]=r):(H[U]=t,H[$]=r),i=H[U];i.parentNode;)i=i.parentNode;for(o=H[V];o.parentNode;)o=o.parentNode;o==i?w(H[V],H[W],H[U],H[$])>0&&H.collapse(e):H.collapse(e),H.collapsed=x(),H.commonAncestorContainer=n.findCommonAncestor(H[V],H[U])}function E(e){var t,n=0,r=0,i,o,a,s,l,c;if(H[V]==H[U])return N(e);for(t=H[U],i=t.parentNode;i;t=i,i=i.parentNode){if(i==H[V])return k(t,e);++n}for(t=H[V],i=t.parentNode;i;t=i,i=i.parentNode){if(i==H[U])return S(t,e);++r}for(o=r-n,a=H[V];o>0;)a=a.parentNode,o--;for(s=H[U];0>o;)s=s.parentNode,o++;for(l=a.parentNode,c=s.parentNode;l!=c;l=l.parentNode,c=c.parentNode)a=l,s=c;return T(a,s,e)}function N(e){var t,n,i,o,a,s,l,c,u;if(e!=I&&(t=r()),H[W]==H[$])return t;if(3==H[V].nodeType){if(n=H[V].nodeVa
lue,i=n.substring(H[W],H[$]),e!=O&&(o=H[V],c=H[W],u=H[$]-H[W],0===c&&u>=o.nodeValue.length-1?o.parentNode.removeChild(o):o.deleteData(c,u),H.collapse(F)),e==I)return;return i.length>0&&t.appendChild(M.createTextNode(i)),t}for(o=C(H[V],H[W]),a=H[$]-H[W];o&&a>0;)s=o.nextSibling,l=D(o,e),t&&t.appendChild(l),--a,o=s;return e!=O&&H.collapse(F),t}function k(e,t){var n,i,o,a,s,l;if(t!=I&&(n=r()),i=R(e,t),n&&n.appendChild(i),o=j(e),a=o-H[W],0>=a)return t!=O&&(H.setEndBefore(e),H.collapse(z)),n;for(i=e.previousSibling;a>0;)s=i.previousSibling,l=D(i,t),n&&n.insertBefore(l,n.firstChild),--a,i=s;return t!=O&&(H.setEndBefore(e),H.collapse(z)),n}function S(e,t){var n,i,o,a,s,l;for(t!=I&&(n=r()),o=A(e,t),n&&n.appendChild(o),i=j(e),++i,a=H[$]-i,o=e.nextSibling;o&&a>0;)s=o.nextSibling,l=D(o,t),n&&n.appendChild(l),--a,o=s;return t!=O&&(H.setStartAfter(e),H.
collapse(F)),n}function T(e,t,n){var i,o,a,s,l,c,u;for(n!=I&&(o=r()),i=A(e,n),o&&o.appendChild(i),a=j(e),s=j(t),++a,l=s-a,c=e.nextSibling;l>0;)u=c.nextSibling,i=D(c,n),o&&o.appendChild(i),c=u,--l;return i=R(t,n),o&&o.appendChild(i),n!=O&&(H.setStartAfter(e),H.collapse(F)),o}function R(e,t){var n=C(H[U],H[$]-1),r,i,o,a,s,l=n!=H[U];if(n==e)return B(n,l,z,t);for(r=n.parentNode,i=B(r,z,z,t);r;){for(;n;)o=n.previousSibling,a=B(n,l,z,t),t!=I&&i.insertBefore(a,i.firstChild),l=F,n=o;if(r==e)return i;n=r.previousSibling,r=r.parentNode,s=B(r,z,z,t),t!=I&&s.appendChild(i),i=s}}function A(e,t){var n=C(H[V],H[W]),r=n!=H[V],i,o,a,s,l;if(n==e)return B(n,r,F,t);for(i=n.parentNode,o=B(i,z,F,t);i;){for(;n;)a=n.nextSibling,s=B(n,r,F,t),t!=I&&o.appendChild(s),r=F,n=a;if(i==e)return o;n=i.nextSibling,i=i.parentNode,l=B(i,z,F,t),t!=I&&l.appendChild(o),o=l}}function B(e,t,r,i){var o,a,s,l,c;if(t)return D(e,i);if(3==e.nodeType){if(o
=e.nodeValue,r?(l=H[W],a=o.substring(l),s=o.substring(0,l)):(l=H[$],a=o.substring(0,l),s=o.substring(l)),i!=O&&(e.nodeValue=s),i==I)return;return c=n.clone(e,z),c.nodeValue=a,c}if(i!=I)return n.clone(e,z)}function D(e,t){return t!=I?t==O?n.clone(e,F):e:void e.parentNode.removeChild(e)}function L(){return n.create("body",null,g()).outerText}var H=this,M=n.doc,P=0,O=1,I=2,F=!0,z=!1,W="startOffset",V="startContainer",U="endContainer",$="endOffset",q=e.extend,j=n.nodeIndex;return q(H,{startContainer:M,startOffset:0,endContainer:M,endOffset:0,collapsed:F,commonAncestorContainer:M,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:i,setEnd:o,setStartBefore:a,setStartAfter:s,setEndBefore:l,setEndAfter:c,collapse:u,selectNode:d,selectNodeContents:f,compareBoundaryPoints:p,deleteContents:h,extractContents:m,cloneContents:g,insertNode:v,surroundContents:y,cloneRange:b,toStringIE:L}),H}return t.prototype.toString=funct
ion(){return this.toStringIE()},t}),r(g,[u],function(e){function t(e){var t;return t=document.createElement("div"),t.innerHTML=e,t.textContent||t.innerText||e}function n(e,t){var n,r,i,a={};if(e){for(e=e.split(","),t=t||10,n=0;n<e.length;n+=2)r=String.fromCharCode(parseInt(e[n],t)),o[r]||(i="&"+e[n+1]+";",a[r]=i,a[i]=r);return a}}var r=e.makeMap,i,o,a,s=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=/[<>&\"\']/g,u=/&(#x|#)?([\w]+);/g,d={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",
148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};o={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},a={"<":"<",">":">","&":"&",""":'"',"'":"'"},i=n("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,
65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816
,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);var f={encodeRaw:function(e,t){return e.replace(t?s:l,function(e){r
eturn o[e]||e})},encodeAllRaw:function(e){return(""+e).replace(c,function(e){return o[e]||e})},encodeNumeric:function(e,t){return e.replace(t?s:l,function(e){return e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":o[e]||"&#"+e.charCodeAt(0)+";"})},encodeNamed:function(e,t,n){return n=n||i,e.replace(t?s:l,function(e){return o[e]||n[e]||e})},getEncodeFunc:function(e,t){function a(e,n){return e.replace(n?s:l,function(e){return o[e]||t[e]||"&#"+e.charCodeAt(0)+";"||e})}function c(e,n){return f.encodeNamed(e,n,t)}return t=n(t)||i,e=r(e.replace(/\+/g,",")),e.named&&e.numeric?a:e.named?t?c:f.encodeNamed:e.numeric?f.encodeNumeric:f.encodeRaw},decode:function(e){return e.replace(u,function(e,n,r){return n?(r=parseInt(r,2===n.length?16:10),r>65535?(r-=65536,String.fromCharCode(55296+(r>>10),56320+(1023&r))):d[r]||String.fromCharCode(r)):a[e]||i[e]
||t(e)})}};return f}),r(v,[],function(){return function(e,t){function n(t){e.getElementsByTagName("head")[0].appendChild(t)}function r(t,r,s){function l(){for(var e=v.passed,t=e.length;t--;)e[t]();v.status=2,v.passed=[],v.failed=[]}function c(){for(var e=v.failed,t=e.length;t--;)e[t]();v.status=3,v.passed=[],v.failed=[]}function u(){var e=navigator.userAgent.match(/WebKit\/(\d*)/);return!!(e&&e[1]<536)}function d(e,t){e()||((new Date).getTime()-g<a?window.setTimeout(t,0):c())}function f(){d(function(){for(var t=e.styleSheets,n,r=t.length,i;r--;)if(n=t[r],i=n.ownerNode?n.ownerNode:n.owningElement,i&&i.id===h.id)return l(),!0},f)}function p(){d(function(){try{var e=m.sheet.cssRules;return l(),!!e}catch(t){}},p)}var h,m,g,v;if(o[t]?v=o[t]:(v={passed:[],failed:[]},o[t]=v),r&&v.passed.push(r),s&&v.failed.push(s),1!=v.status){if(2==v.status)return void l();if(3==v.status)return void c();if(v.status=1,h=e.createElement("link"),h.rel
="stylesheet",h.type="text/css",h.id="u"+i++,h.async=!1,h.defer=!1,g=(new Date).getTime(),"onload"in h&&!u())h.onload=f,h.onerror=c;else{if(navigator.userAgent.indexOf("Firefox")>0)return m=e.createElement("style"),m.textContent='@import "'+t+'"',p(),void n(m);f()}n(h),h.href=t}}var i=0,o={},a;t=t||{},a=t.maxLoadTime||5e3,this.load=r}}),r(y,[c,f,p,l,h,m,g,d,u,v],function(e,n,r,i,o,a,s,l,c,u){function d(e,t){var n={},r=t.keep_values,i;return i={set:function(n,r,i){t.url_converter&&(r=t.url_converter.call(t.url_converter_scope||e,r,i,n[0])),n.attr("data-mce-"+i,r).attr(i,r)},get:function(e,t){return e.attr("data-mce-"+t)||e.attr(t)}},n={style:{set:function(e,t){return null!==t&&"object"==typeof t?void e.css(t):(r&&e.attr("data-mce-style",t),void e.attr("style",t))},get:function(t){var n=t.attr("data-mce-style")||t.attr(&qu
ot;style");return n=e.serializeStyle(e.parseStyle(n),t[0].nodeName)}}},r&&(n.href=n.src=i),n}function f(e,t){var o=this,a;o.doc=e,o.win=window,o.files={},o.counter=0,o.stdMode=!v||e.documentMode>=8,o.boxModel=!v||"CSS1Compat"==e.compatMode||o.stdMode,o.styleSheetLoader=new u(e),o.boundEvents=[],o.settings=t=t||{},o.schema=t.schema,o.styles=new r({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema),o.fixDoc(e),o.events=t.ownEvents?new i(t.proxy):i.Event,o.attrHooks=d(o,t),a=t.schema?t.schema.getBlockElements():{},o.$=n.overrideDefaults(function(){return{context:e,element:o.getRoot()}}),o.isBlock=function(e){if(!e)return!1;var t=e.nodeType;return t?!(1!==t||!a[e.nodeName]):!!a[e]}}var p=c.each,h=c.is,m=c.grep,g=c.trim,v=l.ie,y=/^([a-z0-9],?)+$/i,b=/^[ \t\r\n]*$/;return f.prototype={$$:function(e){return"string"==typeof e&&(e=this.get(e)),this.$(e)},root:null,fixDoc:function(e){var t=this.settings,n;if(v&&am
p;t.schema){"abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video".replace(/\w+/g,function(t){e.createElement(t)});for(n in t.schema.getCustomElements())e.createElement(n)}},clone:function(e,t){var n=this,r,i;return!v||1!==e.nodeType||t?e.cloneNode(t):(i=n.doc,t?r.firstChild:(r=i.createElement(e.nodeName),p(n.getAttribs(e),function(t){n.setAttrib(r,t.nodeName,n.getAttrib(e,t.nodeName))}),r))},getRoot:function(){var e=this;return e.settings.root_element||e.doc.body},getViewPort:function(e){var t,n;return e=e?e:this.win,t=e.document,n=this.boxModel?t.documentElement:t.body,{x:e.pageXOffset||n.scrollLeft,y:e.pageYOffset||n.scrollTop,w:e.innerWidth||n.clientWidth,h:e.innerHeight||n.clientHeight}},getRect:function(e){var t=this,n,r;return e=t.get(e),n=t.getPos(e),r=t.getSize(e),{x:n.x,y:n.y,w:r.w,h:r.h}},getSize:function(e){var t=this,n,r;return e=t.get(e),n=t.getStyle(e,"width"),
r=t.getStyle(e,"height"),-1===n.indexOf("px")&&(n=0),-1===r.indexOf("px")&&(r=0),{w:parseInt(n,10)||e.offsetWidth||e.clientWidth,h:parseInt(r,10)||e.offsetHeight||e.clientHeight}},getParent:function(e,t,n){return this.getParents(e,t,n,!1)},getParents:function(e,n,r,i){var o=this,a,s=[];for(e=o.get(e),i=i===t,r=r||("BODY"!=o.getRoot().nodeName?o.getRoot().parentNode:null),h(n,"string")&&(a=n,n="*"===n?function(e){return 1==e.nodeType}:function(e){return o.is(e,a)});e&&e!=r&&e.nodeType&&9!==e.nodeType;){if(!n||n(e)){if(!i)return e;s.push(e)}e=e.parentNode}return i?s:null},get:function(e){var t;return e&&this.doc&&"string"==typeof e&&(t=e,e=this.doc.getElementById(e),e&&e.id!==t)?this.doc.getElementsByName(t)[1]:e},getNext:function(e,t){return this._findSib(e,t,"nextSibling")},getPrev:function(e,t){return this._findSib(e,t,"
;previousSibling")},select:function(t,n){var r=this;return e(t,r.get(n)||r.settings.root_element||r.doc,[])},is:function(n,r){var i;if(n.length===t){if("*"===r)return 1==n.nodeType;if(y.test(r)){for(r=r.toLowerCase().split(/,/),n=n.nodeName.toLowerCase(),i=r.length-1;i>=0;i--)if(r[i]==n)return!0;return!1}}if(n.nodeType&&1!=n.nodeType)return!1;var o=n.nodeType?[n]:n;return e(r,o[0].ownerDocument||o[0],null,o).length>0},add:function(e,t,n,r,i){var o=this;return this.run(e,function(e){var a;return a=h(t,"string")?o.doc.createElement(t):t,o.setAttribs(a,n),r&&(r.nodeType?a.appendChild(r):o.setHTML(a,r)),i?a:e.appendChild(a)})},create:function(e,t,n){return this.add(this.doc.createElement(e),e,t,n,1)},createHTML:function(e,t,n){var r="",i;r+="<"+e;for(i in t)t.hasOwnProperty(i)&&null!==t[i]&&"undefined"!=typeof t[i]&&(r+=" "+i+'="'+this.encode(t[i])+'"');return"
;undefined"!=typeof n?r+">"+n+"</"+e+">":r+" />"},createFragment:function(e){var t,n,r=this.doc,i;for(i=r.createElement("div"),t=r.createDocumentFragment(),e&&(i.innerHTML=e);n=i.firstChild;)t.appendChild(n);return t},remove:function(e,t){return e=this.$$(e),t?e.each(function(){for(var e;e=this.firstChild;)3==e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)}).remove():e.remove(),e.length>1?e.toArray():e[0]},setStyle:function(e,t,n){e=this.$$(e).css(t,n),this.settings.update_styles&&e.attr("data-mce-style",null)},getStyle:function(e,n,r){return e=this.$$(e),r?e.css(n):(n=n.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}),"float"==n&&(n=v?"styleFloat":"cssFloat"),e[0]&&e[0].style?e[0].style[n]:t)},setStyles:function(e,t){this.$$(e).css(t)},removeAllAttribs:function(e){return this.run(e,functio
n(e){var t,n=e.attributes;for(t=n.length-1;t>=0;t--)e.removeAttributeNode(n.item(t))})},setAttrib:function(e,t,n){var r=this,i,o,a=r.settings;""===n&&(n=null),e=r.$$(e),i=e.attr(t),o=r.attrHooks[t],o&&o.set?o.set(e,n,t):e.attr(t,n),i!=n&&a.onSetAttrib&&a.onSetAttrib({attrElm:e,attrName:t,attrValue:n})},setAttribs:function(e,t){var n=this;n.$$(e).each(function(e,r){p(t,function(e,t){n.setAttrib(r,t,e)})})},getAttrib:function(e,t,n){var r=this,i,o;return e=r.$$(e),i=r.attrHooks[t],o=i&&i.get?i.get(e,t):e.attr(t),"undefined"==typeof o&&(o=n||""),o},getPos:function(e,t){var n=this,r=0,i=0,o,a=n.doc,s;if(e=n.get(e),t=t||a.body,e){if(t===a.body&&e.getBoundingClientRect)return s=e.getBoundingClientRect(),t=n.boxModel?a.documentElement:a.body,r=s.left+(a.documentElement.scrollLeft||a.body.scrollLeft)-t.clientLeft,i=s.top+(a.documentElement.scrollTop||a.body.scrollTop)-t.clientTop,{x:r,y:i};for(o=e;o&
;&o!=t&&o.nodeType;)r+=o.offsetLeft||0,i+=o.offsetTop||0,o=o.offsetParent;for(o=e.parentNode;o&&o!=t&&o.nodeType;)r-=o.scrollLeft||0,i-=o.scrollTop||0,o=o.parentNode}return{x:r,y:i}},parseStyle:function(e){return this.styles.parse(e)},serializeStyle:function(e,t){return this.styles.serialize(e,t)},addStyle:function(e){var t=this,n=t.doc,r,i;if(t!==f.DOM&&n===document){var o=f.DOM.addedStyles;if(o=o||[],o[e])return;o[e]=!0,f.DOM.addedStyles=o}i=n.getElementById("mceDefaultStyles"),i||(i=n.createElement("style"),i.id="mceDefaultStyles",i.type="text/css",r=n.getElementsByTagName("head")[0],r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i)),i.styleSheet?i.styleSheet.cssText+=e:i.appendChild(n.createTextNode(e))},loadCSS:function(e){var t=this,n=t.doc,r;return t!==f.DOM&&n===document?void f.DOM.loadCSS(e):(e||(e=""),r=n.getElementsByTagName("head")[0],void p(e.spli
t(","),function(e){var i;t.files[e]||(t.files[e]=!0,i=t.create("link",{rel:"stylesheet",href:e}),v&&n.documentMode&&n.recalc&&(i.onload=function(){n.recalc&&n.recalc(),i.onload=null}),r.appendChild(i))}))},addClass:function(e,t){this.$$(e).addClass(t)},removeClass:function(e,t){this.toggleClass(e,t,!1)},hasClass:function(e,t){return this.$$(e).hasClass(t)},toggleClass:function(e,t,r){this.$$(e).toggleClass(t,r).each(function(){""===this.className&&n(this).attr("class",null)})},show:function(e){this.$$(e).show()},hide:function(e){this.$$(e).hide()},isHidden:function(e){return"none"==this.$$(e).css("display")},uniqueId:function(e){return(e?e:"mce_")+this.counter++},setHTML:function(e,t){e=this.$$(e),v?e.each(function(e,r){if(r.canHaveHTML!==!1){for(;r.firstChild;)r.removeChild(r.firstChild);try{r.innerHTML="<br>"+t,r.removeChild(r.firstChild)}catch(i)
{n("<div>").html("<br>"+t).contents().slice(1).appendTo(r)}return t}}):e.html(t)},getOuterHTML:function(e){return e=this.get(e),1==e.nodeType?e.outerHTML:n("<div>").append(n(e).clone()).html()},setOuterHTML:function(e,t){var r=this;r.$$(e).each(function(){try{this.outerHTML=t}catch(e){r.remove(n(this).html(t),!0)}})},decode:s.decode,encode:s.encodeAllRaw,insertAfter:function(e,t){return t=this.get(t),this.run(e,function(e){var n,r;return n=t.parentNode,r=t.nextSibling,r?n.insertBefore(e,r):n.appendChild(e),e})},replace:function(e,t,n){var r=this;return r.run(t,function(t){return h(t,"array")&&(e=e.cloneNode(!0)),n&&p(m(t.childNodes),function(t){e.appendChild(t)}),t.parentNode.replaceChild(e,t)})},rename:function(e,t){var n=this,r;return e.nodeName!=t.toUpperCase()&&(r=n.create(t),p(n.getAttribs(e),function(t){n.setAttrib(r,t.nodeName,n.getAttrib(e,t.nodeName))}),n.replace(r,e,1)),r||e},findCommonAncest
or:function(e,t){for(var n=e,r;n;){for(r=t;r&&n!=r;)r=r.parentNode;if(n==r)break;n=n.parentNode}return!n&&e.ownerDocument?e.ownerDocument.documentElement:n},toHex:function(e){return this.styles.toHex(c.trim(e))},run:function(e,t,n){var r=this,i;return"string"==typeof e&&(e=r.get(e)),e?(n=n||this,e.nodeType||!e.length&&0!==e.length?t.call(n,e):(i=[],p(e,function(e,o){e&&("string"==typeof e&&(e=r.get(e)),i.push(t.call(n,e,o)))}),i)):!1},getAttribs:function(e){var t;if(e=this.get(e),!e)return[];if(v){if(t=[],"OBJECT"==e.nodeName)return e.attributes;"OPTION"===e.nodeName&&this.getAttrib(e,"selected")&&t.push({specified:1,nodeName:"selected"});var n=/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi;return e.cloneNode(!1).outerHTML.replace(n,"").replace(/[\w:\-]+/gi,function(e){t.push({specified:1,nodeName:e})}),t}return e.attribu
tes},isEmpty:function(e,t){var n=this,r,i,a,s,l,c=0;if(e=e.firstChild){s=new o(e,e.parentNode),t=t||n.schema?n.schema.getNonEmptyElements():null;do{if(a=e.nodeType,1===a){if(e.getAttribute("data-mce-bogus"))continue;if(l=e.nodeName.toLowerCase(),t&&t[l]){if("br"===l){c++;continue}return!1}for(i=n.getAttribs(e),r=i.length;r--;)if(l=i[r].nodeName,"name"===l||"data-mce-bookmark"===l)return!1}if(8==a)return!1;if(3===a&&!b.test(e.nodeValue))return!1}while(e=s.next())}return 1>=c},createRng:function(){var e=this.doc;return e.createRange?e.createRange():new a(this)},nodeIndex:function(e,t){var n=0,r,i;if(e)for(r=e.nodeType,e=e.previousSibling;e;e=e.previousSibling)i=e.nodeType,(!t||3!=i||i!=r&&e.nodeValue.length)&&(n++,r=i);return n},split:function(e,t,n){function r(e){function t(e){var t=e.previousSibling&&"SPAN"==e.previousSibling.nodeName,n=e.nextSibling&&"SPAN"==e.nextSibling.
nodeName;return t&&n}var n,o=e.childNodes,a=e.nodeType;if(1!=a||"bookmark"!=e.getAttribute("data-mce-type")){for(n=o.length-1;n>=0;n--)r(o[n]);if(9!=a){if(3==a&&e.nodeValue.length>0){var s=g(e.nodeValue).length;if(!i.isBlock(e.parentNode)||s>0||0===s&&t(e))return}else if(1==a&&(o=e.childNodes,1==o.length&&o[0]&&1==o[0].nodeType&&"bookmark"==o[0].getAttribute("data-mce-type")&&e.parentNode.insertBefore(o[0],e),o.length||/^(br|hr|input|img)$/i.test(e.nodeName)))return;i.remove(e)}return e}}var i=this,o=i.createRng(),a,s,l;return e&&t?(o.setStart(e.parentNode,i.nodeIndex(e)),o.setEnd(t.parentNode,i.nodeIndex(t)),a=o.extractContents(),o=i.createRng(),o.setStart(t.parentNode,i.nodeIndex(t)+1),o.setEnd(e.parentNode,i.nodeIndex(e)+1),s=o.extractContents(),l=e.parentNode,l.insertBefore(r(a),e),n?l.replaceChild(n,t):l.insertBefore(t,e),l.insertBefore(r(s),e),i.remove(e),n|
|t):void 0
+},bind:function(e,t,n,r){var i=this;if(c.isArray(e)){for(var o=e.length;o--;)e[o]=i.bind(e[o],t,n,r);return e}return!i.settings.collect||e!==i.doc&&e!==i.win||i.boundEvents.push([e,t,n,r]),i.events.bind(e,t,n,r||i)},unbind:function(e,t,n){var r=this,i;if(c.isArray(e)){for(i=e.length;i--;)e[i]=r.unbind(e[i],t,n);return e}if(r.boundEvents&&(e===r.doc||e===r.win))for(i=r.boundEvents.length;i--;){var o=r.boundEvents[i];e!=o[0]||t&&t!=o[1]||n&&n!=o[2]||this.events.unbind(o[0],o[1],o[2])}return this.events.unbind(e,t,n)},fire:function(e,t,n){return this.events.fire(e,t,n)},getContentEditable:function(e){var t;return e&&1==e.nodeType?(t=e.getAttribute("data-mce-contenteditable"),t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null):null},getContentEditableParent:function(e){for(var t=this.getRoot(),n=null;e&&e!==t&&(n=this.getContentEditable(e),null===n);e=e.parentNode);return n
},destroy:function(){var t=this;if(t.boundEvents){for(var n=t.boundEvents.length;n--;){var r=t.boundEvents[n];this.events.unbind(r[0],r[1],r[2])}t.boundEvents=null}e.setDocument&&e.setDocument(),t.win=t.doc=t.root=t.events=t.frag=null},isChildOf:function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},dumpRng:function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset},_findSib:function(e,t,n){var r=this,i=t;if(e)for("string"==typeof i&&(i=function(e){return r.is(e,t)}),e=e[n];e;e=e[n])if(i(e))return e;return null}},f.DOM=new f(document),f}),r(b,[y,u],function(e,t){function n(){function e(e,t){function n(){o.remove(s),a&&(a.onreadystatechange=a.onload=a=null),t()}function i(){"undefined"!=typeof console&&console.log&&console.log("Failed to load: "+e)}var o=r,a,s
;s=o.uniqueId(),a=document.createElement("script"),a.id=s,a.type="text/javascript",a.src=e,"onreadystatechange"in a?a.onreadystatechange=function(){/loaded|complete/.test(a.readyState)&&n()}:a.onload=n,a.onerror=i,(document.getElementsByTagName("head")[0]||document.body).appendChild(a)}var t=0,n=1,a=2,s={},l=[],c={},u=[],d=0,f;this.isDone=function(e){return s[e]==a},this.markDone=function(e){s[e]=a},this.add=this.load=function(e,n,r){var i=s[e];i==f&&(l.push(e),s[e]=t),n&&(c[e]||(c[e]=[]),c[e].push({func:n,scope:r||this}))},this.loadQueue=function(e,t){this.loadScripts(l,e,t)},this.loadScripts=function(t,r,l){function p(e){i(c[e],function(e){e.func.call(e.scope)}),c[e]=f}var h;u.push({func:r,scope:l||this}),(h=function(){var r=o(t);t.length=0,i(r,function(t){return s[t]==a?void p(t):void(s[t]!=n&&(s[t]=n,d++,e(t,function(){s[t]=a,d--,p(t),h()})))}),d||(i(u,function(e){e.func.call(e.scope)}),u.length=0)})()}}var
r=e.DOM,i=t.each,o=t.grep;return n.ScriptLoader=new n,n}),r(C,[b,u],function(e,n){function r(){var e=this;e.items=[],e.urls={},e.lookup={}}var i=n.each;return r.prototype={get:function(e){return this.lookup[e]?this.lookup[e].instance:t},dependencies:function(e){var t;return this.lookup[e]&&(t=this.lookup[e].dependencies),t||[]},requireLangPack:function(t,n){var i=r.language;if(i&&r.languageLoad!==!1){if(n)if(n=","+n+",",-1!=n.indexOf(","+i.substr(0,2)+","))i=i.substr(0,2);else if(-1==n.indexOf(","+i+","))return;e.ScriptLoader.add(this.urls[t]+"/langs/"+i+".js")}},add:function(e,t,n){return this.items.push(t),this.lookup[e]={instance:t,dependencies:n},t},createUrl:function(e,t){return"object"==typeof t?t:{prefix:e.prefix,resource:t,suffix:e.suffix}},addComponents:function(t,n){var r=this.urls[t];i(n,function(t){e.ScriptLoader.add(r+"/"+t)})},load:function(n,o,a,s){funct
ion l(){var r=c.dependencies(n);i(r,function(e){var n=c.createUrl(o,e);c.load(n.resource,n,t,t)}),a&&a.call(s?s:e)}var c=this,u=o;c.urls[n]||("object"==typeof o&&(u=o.prefix+o.resource+o.suffix),0!==u.indexOf("/")&&-1==u.indexOf("://")&&(u=r.baseURL+"/"+u),c.urls[n]=u.substring(0,u.lastIndexOf("/")),c.lookup[n]?l():e.ScriptLoader.add(u,l,s))}},r.PluginManager=new r,r.ThemeManager=new r,r}),r(x,[u,h],function(e,t){function n(e,t){var n=e.childNodes;return t--,t>n.length-1?t=n.length-1:0>t&&(t=0),n[t]||e}function r(e){this.walk=function(t,r){function o(e){var t;return t=e[0],3===t.nodeType&&t===c&&u>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===f&&e.length>0&&t===d&&3===t.nodeType&&e.splice(e.length-1,1),e}function a(e,t,n){for(var r=[];e&&e!=n;e=e[t])r.push(e);return r}function s(e,t){do{if(e.parentNode==t)retur
n e;e=e.parentNode}while(e)}function l(e,t,n){var i=n?"nextSibling":"previousSibling";for(g=e,v=g.parentNode;g&&g!=t;g=v)v=g.parentNode,y=a(g==e?g:g[i],i),y.length&&(n||y.reverse(),r(o(y)))}var c=t.startContainer,u=t.startOffset,d=t.endContainer,f=t.endOffset,p,h,m,g,v,y,b;if(b=e.select("td.mce-item-selected,th.mce-item-selected"),b.length>0)return void i(b,function(e){r([e])});if(1==c.nodeType&&c.hasChildNodes()&&(c=c.childNodes[u]),1==d.nodeType&&d.hasChildNodes()&&(d=n(d,f)),c==d)return r(o([c]));for(p=e.findCommonAncestor(c,d),g=c;g;g=g.parentNode){if(g===d)return l(c,p,!0);if(g===p)break}for(g=d;g;g=g.parentNode){if(g===c)return l(d,p);if(g===p)break}h=s(c,p)||c,m=s(d,p)||d,l(c,h,!0),y=a(h==c?h:h.nextSibling,"nextSibling",m==d?m.nextSibling:m),y.length&&r(o(y)),l(d,m)},this.split=function(e){function t(e,t){return e.splitText(t)}var n=e.startContainer,r=e.startOffset,i=e.endContai
ner,o=e.endOffset;return n==i&&3==n.nodeType?r>0&&r<n.nodeValue.length&&(i=t(n,r),n=i.previousSibling,o>r?(o-=r,n=i=t(i,o).previousSibling,o=i.nodeValue.length,r=0):o=0):(3==n.nodeType&&r>0&&r<n.nodeValue.length&&(n=t(n,r),r=0),3==i.nodeType&&o>0&&o<i.nodeValue.length&&(i=t(i,o).previousSibling,o=i.nodeValue.length)),{startContainer:n,startOffset:r,endContainer:i,endOffset:o}},this.normalize=function(n){function r(r){function a(n,r){for(var i=new t(n,e.getParent(n.parentNode,e.isBlock)||f);n=i[r?"prev":"next"]();)if("BR"===n.nodeName)return!0}function s(e,t){return e.previousSibling&&e.previousSibling.nodeName==t}function l(n,r){var a,s,l;if(r=r||c,l=e.getParent(r.parentNode,e.isBlock)||f,n&&"BR"==r.nodeName&&g&&e.isEmpty(l))return c=r.parentNode,u=e.nodeIndex(r),void(i=!0);for(a=new t(r,l);p=a[n?"prev":"n
ext"]();){if("false"===e.getContentEditableParent(p))return;if(3===p.nodeType&&p.nodeValue.length>0)return c=p,u=n?p.nodeValue.length:0,void(i=!0);if(e.isBlock(p)||h[p.nodeName.toLowerCase()])return;s=p}o&&s&&(c=s,i=!0,u=0)}var c,u,d,f=e.getRoot(),p,h,m,g;if(c=n[(r?"start":"end")+"Container"],u=n[(r?"start":"end")+"Offset"],g=1==c.nodeType&&u===c.childNodes.length,h=e.schema.getNonEmptyElements(),m=r,1==c.nodeType&&u>c.childNodes.length-1&&(m=!1),9===c.nodeType&&(c=e.getRoot(),u=0),c===f){if(m&&(p=c.childNodes[u>0?u-1:0],p&&(h[p.nodeName]||"TABLE"==p.nodeName)))return;if(c.hasChildNodes()&&(u=Math.min(!m&&u>0?u-1:u,c.childNodes.length-1),c=c.childNodes[u],u=0,c.hasChildNodes()&&!/TABLE/.test(c.nodeName))){p=c,d=new t(c,f);do{if(3===p.nodeType&&p.nodeValue.length>0){u=m?0:p.nodeValue
.length,c=p,i=!0;break}if(h[p.nodeName.toLowerCase()]){u=e.nodeIndex(p),c=p.parentNode,"IMG"!=p.nodeName||m||u++,i=!0;break}}while(p=m?d.next():d.prev())}}o&&(3===c.nodeType&&0===u&&l(!0),1===c.nodeType&&(p=c.childNodes[u],p||(p=c.childNodes[u-1]),!p||"BR"!==p.nodeName||s(p,"A")||a(p)||a(p,!0)||l(!0,p))),m&&!o&&3===c.nodeType&&u===c.nodeValue.length&&l(!1),i&&n["set"+(r?"Start":"End")](c,u)}var i,o;return o=n.collapsed,r(!0),o||r(),i&&o&&n.collapse(!0),i}}var i=e.each;return r.compareRanges=function(e,t){if(e&&t){if(!e.item&&!e.duplicate)return e.startContainer==t.startContainer&&e.startOffset==t.startOffset;if(e.item&&t.item&&e.item(0)===t.item(0))return!0;if(e.isEqual&&t.isEqual&&t.isEqual(e))return!0}return!1},r}),r(w,[x],function(e){return function(t){function n(e){var n,r;if(r=
t.$(e).parentsUntil(t.getBody()).add(e),r.length===i.length){for(n=r.length;n>=0&&r[n]===i[n];n--);if(-1===n)return i=r,!0}return i=r,!1}var r,i=[];"onselectionchange"in t.getDoc()||t.on("NodeChange Click MouseUp KeyUp",function(n){var i,o;i=t.selection.getRng(),o={startContainer:i.startContainer,startOffset:i.startOffset,endContainer:i.endContainer,endOffset:i.endOffset},"nodechange"!=n.type&&e.compareRanges(o,r)||t.fire("SelectionChange"),r=o}),t.on("contextmenu",function(){t.fire("SelectionChange")}),t.on("SelectionChange",function(){var e=t.selection.getStart();!n(e)&&t.dom.isChildOf(e,t.getBody())&&t.nodeChanged({selectionChange:!0})}),this.nodeChanged=function(e){var n=t.selection,r,i,o;!t.initialized||t.settings.disable_nodechange||t.settings.readonly||(o=t.getBody(),r=n.getStart()||o,r=r.ownerDocument!=t.getDoc()?t.getBody():r,"IMG"==r.nodeName&&n.isColl
apsed()&&(r=r.parentNode),i=[],t.dom.getParent(r,function(e){return e===o?!0:void i.push(e)}),e=e||{},e.element=r,e.parents=i,t.fire("NodeChange",e))}}}),r(_,[],function(){function e(e,t,n){var r,i,o=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[o])return e[o];if(e!==t){if(r=e[a])return r;for(i=e.parent;i&&i!==t;i=i.parent)if(r=i[a])return r}}function t(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}var n=/^[ \t\r\n]*$/,r={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};return t.prototype={replace:function(e){var t=this;return e.parent&&e.remove(),t.insert(e,t),t.remove(),t},attr:function(e,t){var n=this,r,i,o;if("string"!=typeof e){for(i in e)n.attr(i,e[i]);return n}if(r=n.attributes){if(t!==o){if(null===t){if(e in r.map)for(delete r.map[e],i=r.length;i--;)if(r[i]
.name===e)return r=r.splice(i,1),n;return n}if(e in r.map){for(i=r.length;i--;)if(r[i].name===e){r[i].value=t;break}}else r.push({name:e,value:t});return r.map[e]=t,n}return r.map[e]}},clone:function(){var e=this,n=new t(e.name,e.type),r,i,o,a,s;if(o=e.attributes){for(s=[],s.map={},r=0,i=o.length;i>r;r++)a=o[r],"id"!==a.name&&(s[s.length]={name:a.name,value:a.value},s.map[a.name]=a.value);n.attributes=s}return n.value=e.value,n.shortEnded=e.shortEnded,n},wrap:function(e){var t=this;return t.parent.insert(e,t),e.append(t),t},unwrap:function(){var e=this,t,n;for(t=e.firstChild;t;)n=t.next,e.insert(t,e,!0),t=n;e.remove()},remove:function(){var e=this,t=e.parent,n=e.next,r=e.prev;return t&&(t.firstChild===e?(t.firstChild=n,n&&(n.prev=null)):r.next=n,t.lastChild===e?(t.lastChild=r,r&&(r.next=null)):n.prev=r,e.parent=e.next=e.prev=null),e},append:function(e){var t=this,n;return e.parent&&e.remove(),n=t.lastChild,n?(n.next=e,e.prev=n,t.l
astChild=e):t.lastChild=t.firstChild=e,e.parent=t,e},insert:function(e,t,n){var r;return e.parent&&e.remove(),r=t.parent||this,n?(t===r.firstChild?r.firstChild=e:t.prev.next=e,e.prev=t.prev,e.next=t,t.prev=e):(t===r.lastChild?r.lastChild=e:t.next.prev=e,e.next=t.next,e.prev=t,t.next=e),e.parent=r,e},getAll:function(t){var n=this,r,i=[];for(r=n.firstChild;r;r=e(r,n))r.name===t&&i.push(r);return i},empty:function(){var t=this,n,r,i;if(t.firstChild){for(n=[],i=t.firstChild;i;i=e(i,t))n.push(i);for(r=n.length;r--;)i=n[r],i.parent=i.firstChild=i.lastChild=i.next=i.prev=null}return t.firstChild=t.lastChild=null,t},isEmpty:function(t){var r=this,i=r.firstChild,o,a;if(i)do{if(1===i.type){if(i.attributes.map["data-mce-bogus"])continue;if(t[i.name])return!1;for(o=i.attributes.length;o--;)if(a=i.attributes[o].name,"name"===a||0===a.indexOf("data-mce-"))return!1}if(8===i.type)return!1;if(3===i.type&&!n.test(i.value))return!1}while(i=e(i,r));
return!0},walk:function(t){return e(this,null,t)}},t.create=function(e,n){var i,o;if(i=new t(e,r[e]||1),n)for(o in n)i.attr(o,n[o]);return i},t}),r(E,[u],function(e){function t(e,t){return e?e.split(t||" "):[]}function n(e){function n(e,n,r){function i(e){var t={},n,r;for(n=0,r=e.length;r>n;n++)t[e[n]]={};return t}var a,l,c,u=arguments;for(r=r||[],n=n||"","string"==typeof r&&(r=t(r)),l=3;l<u.length;l++)"string"==typeof u[l]&&(u[l]=t(u[l])),r.push.apply(r,u[l]);for(e=t(e),a=e.length;a--;)c=[].concat(s,t(n)),o[e[a]]={attributes:i(c),attributesOrder:c,children:i(r)}}function r(e,n){var r,i,a,s;for(e=t(e),r=e.length,n=t(n);r--;)for(i=o[e[r]],a=0,s=n.length;s>a;a++)i.attributes[n[a]]={},i.attributesOrder.push(n[a])}var o={},s,l,c,u,d,f;return i[e]?i[e]:(s=t("id accesskey class dir lang style tabindex title"),l=t("address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul"),c=t(&q
uot;a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment"),"html4"!=e&&(s.push.apply(s,t("contenteditable contextmenu draggable dropzone hidden spellcheck translate")),l.push.apply(l,t("article aside details dialog figure header footer hgroup section nav")),c.push.apply(c,t("audio canvas command datalist mark meter output progress time wbr video ruby bdi keygen"))),"html5-strict"!=e&&(s.push("xml:lang"),f=t("acronym applet basefont big font strike tt"),c.push.apply(c,f),a(f,function(e){n(e,"",c)}),d=t("center dir isindex noframes"),l.push.apply(l,d),u=[].concat(l,c),a(d,function(e){n(e,"",u)})),u=u||[].concat(l,c),n("html","manifest","head body"),n("head","","base command link meta n
oscript script style title"),n("title hr noscript br"),n("base","href target"),n("link","href rel media hreflang type sizes hreflang"),n("meta","name http-equiv content charset"),n("style","media type scoped"),n("script","src async defer type charset"),n("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",u),n("address dt dd div caption","",u),n("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",c),n("blockquote","cite",u),n("ol","reversed start type","li"),n("ul","","li"),n("li","value",u),n("dl","&quo
t;,"dt dd"),n("a","href target rel media hreflang type",c),n("q","cite",c),n("ins del","cite datetime",u),n("img","src alt usemap ismap width height"),n("iframe","src name width height",u),n("embed","src type width height"),n("object","data type typemustmatch name usemap form width height",u,"param"),n("param","name value"),n("map","name",u,"area"),n("area","alt coords shape href target rel media hreflang type"),n("table","border","caption colgroup thead tfoot tbody tr"+("html4"==e?" col":"")),n("colgroup","span","col"),n("col","span"),n("tbody thead tfoot","","tr"),n("tr","","td th"),n(&qu
ot;td","colspan rowspan headers",u),n("th","colspan rowspan headers scope abbr",u),n("form","accept-charset action autocomplete enctype method name novalidate target",u),n("fieldset","disabled form name",u,"legend"),n("label","form for",c),n("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),n("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"==e?u:c),n("select","disabled form multiple name required size","option optgroup"),n("optgroup","disabled label","option"),n("option","disabled label selected value"),n("textarea&
quot;,"cols dirname disabled form maxlength name readonly required rows wrap"),n("menu","type label",u,"li"),n("noscript","",u),"html4"!=e&&(n("wbr"),n("ruby","",c,"rt rp"),n("figcaption","",u),n("mark rt rp summary bdi","",c),n("canvas","width height",u),n("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",u,"track source"),n("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",u,"track source"),n("source","src type media"),n("track","kind src srclang label default"),n("datalist","",c,"option"),n("article section nav aside header footer","",u),n("hgroup","&q
uot;,"h1 h2 h3 h4 h5 h6"),n("figure","",u,"figcaption"),n("time","datetime",c),n("dialog","open",u),n("command","type label icon disabled checked radiogroup command"),n("output","for form name",c),n("progress","value max",c),n("meter","value min max low high optimum",c),n("details","open",u,"summary"),n("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!=e&&(r("script","language xml:space"),r("style","xml:space"),r("object","declare classid code codebase codetype archive standby align border hspace vspace"),r("embed","align name hspace vspace"),r("param","valuetype type"),r("a","charset name rev shape coords"),r("
;br","clear"),r("applet","codebase archive code object alt name width height align hspace vspace"),r("img","name longdesc align border hspace vspace"),r("iframe","longdesc frameborder marginwidth marginheight scrolling align"),r("font basefont","size color face"),r("input","usemap align"),r("select","onchange"),r("textarea"),r("h1 h2 h3 h4 h5 h6 div p legend caption","align"),r("ul","type compact"),r("li","type"),r("ol dl menu dir","compact"),r("pre","width xml:space"),r("hr","align noshade size width"),r("isindex","prompt"),r("table","summary width frame rules cellspacing cellpadding align bgcolor"),r("col","width align char charoff valign"),r("colgroup"
;,"width align char charoff valign"),r("thead","align char charoff valign"),r("tr","align char charoff valign bgcolor"),r("th","axis align char charoff valign nowrap bgcolor width height"),r("form","accept"),r("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),r("tfoot","align char charoff valign"),r("tbody","align char charoff valign"),r("area","nohref"),r("body","background bgcolor text link vlink alink")),"html4"!=e&&(r("input button select textarea","autofocus"),r("input textarea","placeholder"),r("a","download"),r("link script img","crossorigin"),r("iframe","sandbox seamless allowfullscreen")),a(t("a form meter progress dfn"),function(e){o
[e]&&delete o[e].children[e]}),delete o.caption.children.table,i[e]=o,o)}function r(e,t){var n;return e&&(n={},"string"==typeof e&&(e={"*":e}),a(e,function(e,r){n[r]="map"==t?o(e,/[, ]/):l(e,/[, ]/)})),n}var i={},o=e.makeMap,a=e.each,s=e.extend,l=e.explode,c=e.inArray;return function(e){function u(t,n,r){var a=e[t];return a?a=o(a,/[, ]/,o(a.toUpperCase(),/[, ]/)):(a=i[t],a||(a=o(n," ",o(n.toUpperCase()," ")),a=s(a,r),i[t]=a)),a}function d(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")}function f(e){var n,r,i,a,s,l,u,f,p,h,m,g,v,b,x,w,_,E,N,k=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,S=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,T=/[*?+]/;if(e)for(e=t(e,","),y["@"]&&(w=y["@"].attributes,_=y["@"].attributesOrder),n=0,r=e.length;r>n;n++)if(s=k.exec(e[n])){if(b=s[1],p=s[2],x=s[3],f=s[5],g={},v=
[],l={attributes:g,attributesOrder:v},"#"===b&&(l.paddEmpty=!0),"-"===b&&(l.removeEmpty=!0),"!"===s[4]&&(l.removeEmptyAttrs=!0),w){for(E in w)g[E]=w[E];v.push.apply(v,_)}if(f)for(f=t(f,"|"),i=0,a=f.length;a>i;i++)if(s=S.exec(f[i])){if(u={},m=s[1],h=s[2].replace(/::/g,":"),b=s[3],N=s[4],"!"===m&&(l.attributesRequired=l.attributesRequired||[],l.attributesRequired.push(h),u.required=!0),"-"===m){delete g[h],v.splice(c(v,h),1);continue}b&&("="===b&&(l.attributesDefault=l.attributesDefault||[],l.attributesDefault.push({name:h,value:N}),u.defaultValue=N),":"===b&&(l.attributesForced=l.attributesForced||[],l.attributesForced.push({name:h,value:N}),u.forcedValue=N),"<"===b&&(u.validValues=o(N,"?"))),T.test(h)?(l.attributePatterns=l.attributePatterns||[],u.pattern=d(h),l.attributePatterns.push(u)):(g[h]||v.push(h),
g[h]=u)}w||"@"!=p||(w=g,_=v),x&&(l.outputName=p,y[x]=l),T.test(p)?(l.pattern=d(p),C.push(l)):y[p]=l}}function p(e){y={},C=[],f(e),a(_,function(e,t){b[t]=e.children})}function h(e){var n=/^(~)?(.+)$/;e&&(i.text_block_elements=i.block_elements=null,a(t(e,","),function(e){var t=n.exec(e),r="~"===t[1],i=r?"span":"div",o=t[2];if(b[o]=b[i],L[o]=i,r||(R[o.toUpperCase()]={},R[o]={}),!y[o]){var l=y[i];l=s({},l),delete l.removeEmptyAttrs,delete l.removeEmpty,y[o]=l}a(b,function(e,t){e[i]&&(b[t]=e=s({},b[t]),e[o]=e[i])})}))}function m(e){var n=/^([+\-]?)(\w+)\[([^\]]+)\]$/;e&&a(t(e,","),function(e){var r=n.exec(e),i,o;r&&(o=r[1],i=o?b[r[2]]:b[r[2]]={"#comment":{}},i=b[r[2]],a(t(r[3],"|"),function(e){"-"===o?(b[r[2]]=i=s({},b[r[2]]),delete i[e]):i[e]={}}))})}function g(e){var t=y[e],n;if(t)return t;for(n=C.length;n--;)if(t=C[n],t.pattern.test(e))return t}var v=this,y
={},b={},C=[],x,w,_,E,N,k,S,T,R,A,B,D,L={},H={};e=e||{},_=n(e.schema),e.verify_html===!1&&(e.valid_elements="*[*]"),x=r(e.valid_styles),w=r(e.invalid_styles,"map"),T=r(e.valid_classes,"map"),E=u("whitespace_elements","pre script noscript style textarea video audio iframe object"),N=u("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),k=u("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),S=u("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),A=u("non_empty_elements","td th iframe video audio object script",k),B=u("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup asi
de nav figure"),R=u("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup",B),D=u("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),a((e.special||"script noscript style textarea").split(" "),function(e){H[e]=new RegExp("</"+e+"[^>]*>","gi")}),e.valid_elements?p(e.valid_elements):(a(_,function(e,t){y[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},b[t]=e.children}),"html5"!=e.schema&&a(t("strong/b em/i"),function(e){e=t(e,"/"),y[e[1]].outputName=e[0]}),y.img.attributesDefault=[{name:"alt",value:""}],a(t("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(e){y[e]&&(y[e].removeEmpty=!0)}),a(t("p h1 h2 h3 h4 h5 h6 th td pre div address capt
ion"),function(e){y[e].paddEmpty=!0}),a(t("span"),function(e){y[e].removeEmptyAttrs=!0})),h(e.custom_elements),m(e.valid_children),f(e.extended_valid_elements),m("+ol[ul|ol],+ul[ul|ol]"),e.invalid_elements&&a(l(e.invalid_elements),function(e){y[e]&&delete y[e]}),g("span")||f("span[!data-mce-type|*]"),v.children=b,v.getValidStyles=function(){return x},v.getInvalidStyles=function(){return w},v.getValidClasses=function(){return T},v.getBoolAttrs=function(){return S},v.getBlockElements=function(){return R},v.getTextBlockElements=function(){return B},v.getTextInlineElements=function(){return D},v.getShortEndedElements=function(){return k},v.getSelfClosingElements=function(){return N},v.getNonEmptyElements=function(){return A},v.getWhiteSpaceElements=function(){return E},v.getSpecialElements=function(){return H},v.isValidChild=function(e,t){var n=b[e];return!(!n||!n[t])},v.isValid=function(e,t){var n,r,i=g(e);if(i){if(!t)return!
0;if(i.attributes[t])return!0;if(n=i.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(e))return!0}return!1},v.getElementRule=g,v.getCustomElements=function(){return L},v.addValidElements=f,v.setValidElements=p,v.addCustomElements=h,v.addValidChildren=m,v.elements=y}}),r(N,[E,g,u],function(e,t,n){function r(e,t,n){var r=1,i,o,a,s;for(s=e.getShortEndedElements(),a=/<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g,a.lastIndex=i=n;o=a.exec(t);){if(i=a.lastIndex,"/"===o[1])r--;else if(!o[1]){if(o[2]in s)continue;r++}if(0===r)break}return i}function i(i,a){function s(){}var l=this;i=i||{},l.schema=a=a||new e,i.fix_self_closing!==!1&&(i.fix_self_closing=!0),o("comment cdata text start end pi doctype".split(" "),function(e){e&&(l[e]=i[e]||s)}),l.parse=function(e){function o(e){var t,n;for(t=p.length;t--&&p[t].name!==e;);if(t>=0){for(n=p.length-1;n
>=t;n--)e=p[n],e.valid&&l.end(e.name);p.length=t}}function s(e,t,n,r,o){var a,s,l=/[\s\u0000-\u001F]+/g;if(t=t.toLowerCase(),n=t in x?t:z(n||r||o||""),_&&!y&&0!==t.indexOf("data-")){if(a=T[t],!a&&R){for(s=R.length;s--&&(a=R[s],!a.pattern.test(t)););-1===s&&(a=null)}if(!a)return;if(a.validValues&&!(n in a.validValues))return}if(V[t]&&!i.allow_script_urls){var c=n.replace(l,"");try{c=decodeURIComponent(c)}catch(u){c=unescape(c)}if(U.test(c))return;if(!i.allow_html_data_urls&&$.test(c)&&!/^data:image\//i.test(c))return}h.map[t]=n,h.push({name:t,value:n})}var l=this,c,u=0,d,f,p=[],h,m,g,v,y,b,C,x,w,_,E,N,k,S,T,R,A,B,D,L,H,M,P,O,I,F=0,z=t.decode,W,V=n.makeMap("src,href,data,background,formaction,poster"),U=/((java|vb)script|mhtml):/i,$=/^data:/i;for(M=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)
|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-_\\:\\.]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),P=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,C=a.getShortEndedElements(),H=i.self_closing_elements||a.getSelfClosingElements(),x=a.getBoolAttrs(),_=i.validate,b=i.remove_internals,W=i.fix_self_closing,O=a.getSpecialElements();c=M.exec(e);){if(u<c.index&&l.text(z(e.substr(u,c.index-u))),d=c[6])d=d.toLowerCase(),":"===d.charAt(0)&&(d=d.substr(1)),o(d);else if(d=c[7]){if(d=d.toLowerCase(),":"===d.charAt(0)&&(d=d.substr(1)),w=d in C,W&&H[d]&&p.length>0&&p[p.length-1].name===d&&o(d),!_||(E=a.getElementRule(d))){if(N=!0,_&&(T=E.attributes,R=E.attributePatterns),(S=c[8])?(y=-1!==S.indexOf("data-mce-type"),y&&b&
&(N=!1),h=[],h.map={},S.replace(P,s)):(h=[],h.map={}),_&&!y){if(A=E.attributesRequired,B=E.attributesDefault,D=E.attributesForced,L=E.removeEmptyAttrs,L&&!h.length&&(N=!1),D)for(m=D.length;m--;)k=D[m],v=k.name,I=k.value,"{$uid}"===I&&(I="mce_"+F++),h.map[v]=I,h.push({name:v,value:I});if(B)for(m=B.length;m--;)k=B[m],v=k.name,v in h.map||(I=k.value,"{$uid}"===I&&(I="mce_"+F++),h.map[v]=I,h.push({name:v,value:I}));if(A){for(m=A.length;m--&&!(A[m]in h.map););-1===m&&(N=!1)}if(k=h.map["data-mce-bogus"]){if("all"===k){u=r(a,e,M.lastIndex),M.lastIndex=u;continue}N=!1}}N&&l.start(d,h,w)}else N=!1;if(f=O[d]){f.lastIndex=u=c.index+c[0].length,(c=f.exec(e))?(N&&(g=e.substr(u,c.index-u)),u=c.index+c[0].length):(g=e.substr(u),u=e.length),N&&(g.length>0&&l.text(g,!0),l.end(d)),M.lastIndex=u;continue}w||(S&&S.indexOf("/")==S.le
ngth-1?N&&l.end(d):p.push({name:d,valid:N}))}else(d=c[1])?(">"===d.charAt(0)&&(d=" "+d),i.allow_conditional_comments||"[if"!==d.substr(0,3)||(d=" "+d),l.comment(d)):(d=c[2])?l.cdata(d):(d=c[3])?l.doctype(d):(d=c[4])&&l.pi(d,c[5]);u=c.index+c[0].length}for(u<e.length&&l.text(z(e.substr(u))),m=p.length-1;m>=0;m--)d=p[m],d.valid&&l.end(d.name)}}var o=n.each;return i.findEndTag=r,i}),r(k,[_,E,N,u],function(e,t,n,r){var i=r.makeMap,o=r.each,a=r.explode,s=r.extend;return function(r,l){function c(t){var n,r,o,a,s,c,d,f,p,h,m,g,v,y;for(m=i("tr,td,th,tbody,thead,tfoot,table"),h=l.getNonEmptyElements(),g=l.getTextBlockElements(),n=0;n<t.length;n++)if(r=t[n],r.parent&&!r.fixed)if(g[r.name]&&"li"==r.parent.name){for(v=r.next;v&&g[v.name];)v.name="li",v.fixed=!0,r.parent.insert(v,r.parent),v=v.next;r.unwrap(r)}else{for(a=[r],o=r.parent;o&&!l.is
ValidChild(o.name,r.name)&&!m[o.name];o=o.parent)a.push(o);if(o&&a.length>1){for(a.reverse(),s=c=u.filterNode(a[0].clone()),p=0;p<a.length-1;p++){for(l.isValidChild(c.name,a[p].name)?(d=u.filterNode(a[p].clone()),c.append(d)):d=c,f=a[p].firstChild;f&&f!=a[p+1];)y=f.next,d.append(f),f=y;c=d}s.isEmpty(h)?o.insert(r,a[0],!0):(o.insert(s,a[0],!0),o.insert(r,s)),o=a[0],(o.isEmpty(h)||o.firstChild===o.lastChild&&"br"===o.firstChild.name)&&o.empty().remove()}else if(r.parent){if("li"===r.name){if(v=r.prev,v&&("ul"===v.name||"ul"===v.name)){v.append(r);continue}if(v=r.next,v&&("ul"===v.name||"ul"===v.name)){v.insert(r,v.firstChild,!0);continue}r.wrap(u.filterNode(new e("ul",1)));continue}l.isValidChild(r.parent.name,"div")&&l.isValidChild("div",r.name)?r.wrap(u.filterNode(new e("div",1))):"style"===r.name||"s
cript"===r.name?r.empty().remove():r.unwrap()}}}var u=this,d={},f=[],p={},h={};r=r||{},r.validate="validate"in r?r.validate:!0,r.root_name=r.root_name||"body",u.schema=l=l||new t,u.filterNode=function(e){var t,n,r;n in d&&(r=p[n],r?r.push(e):p[n]=[e]),t=f.length;for(;t--;)n=f[t].name,n in e.attributes.map&&(r=h[n],r?r.push(e):h[n]=[e]);return e},u.addNodeFilter=function(e,t){o(a(e),function(e){var n=d[e];n||(d[e]=n=[]),n.push(t)})},u.addAttributeFilter=function(e,t){o(a(e),function(e){var n;for(n=0;n<f.length;n++)if(f[n].name===e)return void f[n].callbacks.push(t);f.push({name:e,callbacks:[t]})})},u.parse=function(t,o){function a(){function e(e){e&&(t=e.firstChild,t&&3==t.type&&(t.value=t.value.replace(R,"")),t=e.lastChild,t&&3==t.type&&(t.value=t.value.replace(D,"")))}var t=y.firstChild,n,i;if(l.isValidChild(y.name,I.toLowerCase())){for(;t;)n=t.next,3==t.type||1==t.type&&
"p"!==t.name&&!T[t.name]&&!t.attr("data-mce-type")?i?i.append(t):(i=u(I,1),i.attr(r.forced_root_block_attrs),y.insert(i,t),i.append(t)):(e(i),i=null),t=n;e(i)}}function u(t,n){var r=new e(t,n),i;return t in d&&(i=p[t],i?i.push(r):p[t]=[r]),r}function m(e){var t,n,r;for(t=e.prev;t&&3===t.type;)n=t.value.replace(D,""),n.length>0?(t.value=n,t=t.prev):(r=t.prev,t.remove(),t=r)}function g(e){var t,n={};for(t in e)"li"!==t&&"p"!=t&&(n[t]=e[t]);return n}var v,y,b,C,x,w,_,E,N,k,S,T,R,A=[],B,D,L,H,M,P,O,I;if(o=o||{},p={},h={},T=s(i("script,style,head,html,body,title,meta,param"),l.getBlockElements()),O=l.getNonEmptyElements(),P=l.children,S=r.validate,I="forced_root_block"in o?o.forced_root_block:r.forced_root_block,M=l.getWhiteSpaceElements(),R=/^[ \t\r\n]+/,D=/[ \t\r\n]+$/,L=/[ \t\r\n]+/g,H=/^[ \t\r\n]+$/,v=new n({validate:S,allow_script_urls:r.allow_script_urls,allow_co
nditional_comments:r.allow_conditional_comments,self_closing_elements:g(l.getSelfClosingElements()),cdata:function(e){b.append(u("#cdata",4)).value=e},text:function(e,t){var n;B||(e=e.replace(L," "),b.lastChild&&T[b.lastChild.name]&&(e=e.replace(R,""))),0!==e.length&&(n=u("#text",3),n.raw=!!t,b.append(n).value=e)},comment:function(e){b.append(u("#comment",8)).value=e},pi:function(e,t){b.append(u(e,7)).value=t,m(b)},doctype:function(e){var t;t=b.append(u("#doctype",10)),t.value=e,m(b)},start:function(e,t,n){var r,i,o,a,s;if(o=S?l.getElementRule(e):{}){for(r=u(o.outputName||e,1),r.attributes=t,r.shortEnded=n,b.append(r),s=P[b.name],s&&P[r.name]&&!s[r.name]&&A.push(r),i=f.length;i--;)a=f[i].name,a in t.map&&(N=h[a],N?N.push(r):h[a]=[r]);T[e]&&m(r),n||(b=r),!B&&M[e]&&(B=!0)}},end:function(t){var n,r,i,o,a;if(r=S?l.getElementRule(t):{}){if(T[t]&&
amp;!B){if(n=b.firstChild,n&&3===n.type)if(i=n.value.replace(R,""),i.length>0)n.value=i,n=n.next;else for(o=n.next,n.remove(),n=o;n&&3===n.type;)i=n.value,o=n.next,(0===i.length||H.test(i))&&(n.remove(),n=o),n=o;if(n=b.lastChild,n&&3===n.type)if(i=n.value.replace(D,""),i.length>0)n.value=i,n=n.prev;else for(o=n.prev,n.remove(),n=o;n&&3===n.type;)i=n.value,o=n.prev,(0===i.length||H.test(i))&&(n.remove(),n=o),n=o}if(B&&M[t]&&(B=!1),(r.removeEmpty||r.paddEmpty)&&b.isEmpty(O))if(r.paddEmpty)b.empty().append(new e("#text","3")).value="\xa0";else if(!b.attributes.map.name&&!b.attributes.map.id)return a=b.parent,b.unwrap(),void(b=a);b=b.parent}}},l),y=b=new e(o.context||r.root_name,11),v.parse(t),S&&A.length&&(o.context?o.invalid=!0:c(A)),I&&("body"==y.name||o.isRootContent)&&a(),!o.invalid){for(k in p){for(N=d[k],
C=p[k],_=C.length;_--;)C[_].parent||C.splice(_,1);for(x=0,w=N.length;w>x;x++)N[x](C,k,o)}for(x=0,w=f.length;w>x;x++)if(N=f[x],N.name in h){for(C=h[N.name],_=C.length;_--;)C[_].parent||C.splice(_,1);for(_=0,E=N.callbacks.length;E>_;_++)N.callbacks[_](C,N.name,o)}}return y},r.remove_trailing_brs&&u.addNodeFilter("br",function(t){var n,r=t.length,i,o=s({},l.getBlockElements()),a=l.getNonEmptyElements(),c,u,d,f,p,h;for(o.body=1,n=0;r>n;n++)if(i=t[n],c=i.parent,o[i.parent.name]&&i===c.lastChild){for(d=i.prev;d;){if(f=d.name,"span"!==f||"bookmark"!==d.attr("data-mce-type")){if("br"!==f)break;if("br"===f){i=null;break}}d=d.prev}i&&(i.remove(),c.isEmpty(a)&&(p=l.getElementRule(c.name),p&&(p.removeEmpty?c.remove():p.paddEmpty&&(c.empty().append(new e("#text",3)).value="\xa0"))))
+}else{for(u=i;c&&c.firstChild===u&&c.lastChild===u&&(u=c,!o[c.name]);)c=c.parent;u===c&&(h=new e("#text",3),h.value="\xa0",i.replace(h))}}),r.allow_html_in_named_anchor||u.addAttributeFilter("id,name",function(e){for(var t=e.length,n,r,i,o;t--;)if(o=e[t],"a"===o.name&&o.firstChild&&!o.attr("href")){i=o.parent,n=o.lastChild;do r=n.prev,i.insert(n,o),n=r;while(n)}}),r.validate&&l.getValidClasses()&&u.addAttributeFilter("class",function(e){for(var t=e.length,n,r,i,o,a,s=l.getValidClasses(),c,u;t--;){for(n=e[t],r=n.attr("class").split(" "),a="",i=0;i<r.length;i++)o=r[i],u=!1,c=s["*"],c&&c[o]&&(u=!0),c=s[n.name],u||!c||c[o]||(u=!0),u&&(a&&(a+=" "),a+=o);a.length||(a=null),n.attr("class",a)}})}}),r(S,[g,u],function(e,t){var n=t.makeMap;return function(t){var r=[],i,o,a,s,l;
return t=t||{},i=t.indent,o=n(t.indent_before||""),a=n(t.indent_after||""),s=e.getEncodeFunc(t.entity_encoding||"raw",t.entities),l="html"==t.element_format,{start:function(e,t,n){var c,u,d,f;if(i&&o[e]&&r.length>0&&(f=r[r.length-1],f.length>0&&"\n"!==f&&r.push("\n")),r.push("<",e),t)for(c=0,u=t.length;u>c;c++)d=t[c],r.push(" ",d.name,'="',s(d.value,!0),'"');r[r.length]=!n||l?">":" />",n&&i&&a[e]&&r.length>0&&(f=r[r.length-1],f.length>0&&"\n"!==f&&r.push("\n"))},end:function(e){var t;r.push("</",e,">"),i&&a[e]&&r.length>0&&(t=r[r.length-1],t.length>0&&"\n"!==t&&r.push("\n"))},text:function(e,t){e.length>0&&(r[r.length]=t?e:s(e))},cdata:function
(e){r.push("<![CDATA[",e,"]]>")},comment:function(e){r.push("<!--",e,"-->")},pi:function(e,t){t?r.push("<?",e," ",t,"?>"):r.push("<?",e,"?>"),i&&r.push("\n")},doctype:function(e){r.push("<!DOCTYPE",e,">",i?"\n":"")},reset:function(){r.length=0},getContent:function(){return r.join("").replace(/\n$/,"")}}}}),r(T,[S,E],function(e,t){return function(n,r){var i=this,o=new e(n);n=n||{},n.validate="validate"in n?n.validate:!0,i.schema=r=r||new t,i.writer=o,i.serialize=function(e){function t(e){var n=i[e.type],s,l,c,u,d,f,p,h,m;if(n)n(e);else{if(s=e.name,l=e.shortEnded,c=e.attributes,a&&c&&c.length>1){for(f=[],f.map={},m=r.getElementRule(e.name),p=0,h=m.attributesOrder.length;h>p;p++)u=m.attributesOrder[p],u in c.map&&(d=c.map[u],f.map[u]=d,f.push({name:u,v
alue:d}));for(p=0,h=c.length;h>p;p++)u=c[p].name,u in f.map||(d=c.map[u],f.map[u]=d,f.push({name:u,value:d}));c=f}if(o.start(e.name,c,l),!l){if(e=e.firstChild)do t(e);while(e=e.next);o.end(s)}}}var i,a;return a=n.validate,i={3:function(e){o.text(e.value,e.raw)},8:function(e){o.comment(e.value)},7:function(e){o.pi(e.name,e.value)},10:function(e){o.doctype(e.value)},4:function(e){o.cdata(e.value)},11:function(e){if(e=e.firstChild)do t(e);while(e=e.next)}},o.reset(),1!=e.type||n.inner?i[11](e):t(e),o.getContent()}}}),r(R,[y,k,g,T,_,E,d,u],function(e,t,n,r,i,o,a,s){var l=s.each,c=s.trim,u=e.DOM;return function(e,i){var s,d,f;return i&&(s=i.dom,d=i.schema),s=s||u,d=d||new o(e),e.entity_encoding=e.entity_encoding||"named",e.remove_trailing_brs="remove_trailing_brs"in e?e.remove_trailing_brs:!0,f=new t(e,d),f.addAttributeFilter("data-mce-tabindex",function(e,t){for(var n=e.length,r;n--;)r=e[n],r.attr("tabindex",r.attributes.map["data-
mce-tabindex"]),r.attr(t,null)}),f.addAttributeFilter("src,href,style",function(t,n){for(var r=t.length,i,o,a="data-mce-"+n,l=e.url_converter,c=e.url_converter_scope,u;r--;)i=t[r],o=i.attributes.map[a],o!==u?(i.attr(n,o.length>0?o:null),i.attr(a,null)):(o=i.attributes.map[n],"style"===n?o=s.serializeStyle(s.parseStyle(o),i.name):l&&(o=l.call(c,o,n,i.name)),i.attr(n,o.length>0?o:null))}),f.addAttributeFilter("class",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.attr("class"),r&&(r=n.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),n.attr("class",r.length>0?r:null))}),f.addAttributeFilter("data-mce-type",function(e,t,n){for(var r=e.length,i;r--;)i=e[r],"bookmark"!==i.attributes.map["data-mce-type"]||n.cleanup||i.remove()}),f.addNodeFilter("noscript",function(e){for(var t=e.length,r;t--;)r=e[t].firstChild,r&&(r.value=n
.decode(r.value))}),f.addNodeFilter("script,style",function(e,t){function n(e){return e.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}for(var r=e.length,i,o,a;r--;)i=e[r],o=i.firstChild?i.firstChild.value:"","script"===t?(a=i.attr("type"),a&&i.attr("type","mce-no/type"==a?null:a.replace(/^mce\-/,"")),o.length>0&&(i.firstChild.value="// <![CDATA[\n"+n(o)+"\n// ]]>")):o.length>0&&(i.firstChild.value="<!--\n"+n(o)+"\n-->")}),f.addNodeFilter("#comment",function(e){
for(var t=e.length,n;t--;)n=e[t],0===n.value.indexOf("[CDATA[")?(n.name="#cdata",n.type=4,n.value=n.value.replace(/^\[CDATA\[|\]\]$/g,"")):0===n.value.indexOf("mce:protected ")&&(n.name="#text",n.type=3,n.raw=!0,n.value=unescape(n.value).substr(14))}),f.addNodeFilter("xml:namespace,input",function(e,t){for(var n=e.length,r;n--;)r=e[n],7===r.type?r.remove():1===r.type&&("input"!==t||"type"in r.attributes.map||r.attr("type","text"))}),e.fix_list_elements&&f.addNodeFilter("ul,ol",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.parent,("ul"===r.name||"ol"===r.name)&&n.prev&&"li"===n.prev.name&&n.prev.append(n)}),f.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize",function(e,t){for(var n=e.length;n--;)e[n].attr(t,
null)}),{schema:d,addNodeFilter:f.addNodeFilter,addAttributeFilter:f.addAttributeFilter,serialize:function(t,n){var i=this,o,u,p,h,m;return a.ie&&s.select("script,style,select,map").length>0?(m=t.innerHTML,t=t.cloneNode(!1),s.setHTML(t,m)):t=t.cloneNode(!0),o=t.ownerDocument.implementation,o.createHTMLDocument&&(u=o.createHTMLDocument(""),l("BODY"==t.nodeName?t.childNodes:[t],function(e){u.body.appendChild(u.importNode(e,!0))}),t="BODY"!=t.nodeName?u.body.firstChild:u.body,p=s.doc,s.doc=u),n=n||{},n.format=n.format||"html",n.selection&&(n.forced_root_block=""),n.no_events||(n.node=t,i.onPreProcess(n)),h=new r(e,d),n.content=h.serialize(f.parse(c(n.getInner?t.innerHTML:s.getOuterHTML(t)),n)),n.cleanup||(n.content=n.content.replace(/\uFEFF/g,"")),n.no_events||i.onPostProcess(n),p&&(s.doc=p),n.node=null,n.content},addRules:function(e){d.addValidElements(e)},setRules:function(e){d.se
tValidElements(e)},onPreProcess:function(e){i&&i.fire("PreProcess",e)},onPostProcess:function(e){i&&i.fire("PostProcess",e)}}}}),r(A,[],function(){function e(e){function t(t,n){var r,i=0,o,a,s,l,c,u,d=-1,f;if(r=t.duplicate(),r.collapse(n),f=r.parentElement(),f.ownerDocument===e.dom.doc){for(;"false"===f.contentEditable;)f=f.parentNode;if(!f.hasChildNodes())return{node:f,inside:1};for(s=f.children,o=s.length-1;o>=i;)if(u=Math.floor((i+o)/2),l=s[u],r.moveToElementText(l),d=r.compareEndPoints(n?"StartToStart":"EndToEnd",t),d>0)o=u-1;else{if(!(0>d))return{node:l};i=u+1}if(0>d)for(l?r.collapse(!1):(r.moveToElementText(f),r.collapse(!0),l=f,a=!0),c=0;0!==r.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==r.move("character",1)&&f==r.parentElement();)c++;else for(r.collapse(!0),c=0;0!==r.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&a
mp;0!==r.move("character",-1)&&f==r.parentElement();)c++;return{node:l,position:d,offset:c,inside:a}}}function n(){function n(e){var n=t(o,e),r,i,s=0,l,c,u;if(r=n.node,i=n.offset,n.inside&&!r.hasChildNodes())return void a[e?"setStart":"setEnd"](r,0);if(i===c)return void a[e?"setStartBefore":"setEndAfter"](r);if(n.position<0){if(l=n.inside?r.firstChild:r.nextSibling,!l)return void a[e?"setStartAfter":"setEndAfter"](r);if(!i)return void(3==l.nodeType?a[e?"setStart":"setEnd"](l,0):a[e?"setStartBefore":"setEndBefore"](l));for(;l;){if(3==l.nodeType&&(u=l.nodeValue,s+=u.length,s>=i)){r=l,s-=i,s=u.length-s;break}l=l.nextSibling}}else{if(l=r.previousSibling,!l)return a[e?"setStartBefore":"setEndBefore"](r);if(!i)return void(3==r.nodeType?a[e?"setStart":"setEnd"](l,r.nodeValue.length):a[e?"setStartAfter":
"setEndAfter"](l));for(;l;){if(3==l.nodeType&&(s+=l.nodeValue.length,s>=i)){r=l,s-=i;break}l=l.previousSibling}}a[e?"setStart":"setEnd"](r,s)}var o=e.getRng(),a=i.createRng(),s,l,c,u,d;if(s=o.item?o.item(0):o.parentElement(),s.ownerDocument!=i.doc)return a;if(l=e.isCollapsed(),o.item)return a.setStart(s.parentNode,i.nodeIndex(s)),a.setEnd(a.startContainer,a.startOffset+1),a;try{n(!0),l||n()}catch(f){if(-2147024809!=f.number)throw f;d=r.getBookmark(2),c=o.duplicate(),c.collapse(!0),s=c.parentElement(),l||(c=o.duplicate(),c.collapse(!1),u=c.parentElement(),u.innerHTML=u.innerHTML),s.innerHTML=s.innerHTML,r.moveToBookmark(d),o=e.getRng(),n(!0),l||n()}return a}var r=this,i=e.dom,o=!1;this.getBookmark=function(n){function r(e){var t,n,r,o,a=[];for(t=e.parentNode,n=i.getRoot().parentNode;t!=n&&9!==t.nodeType;){for(r=t.children,o=r.length;o--;)if(e===r[o]){a.push(o);break}e=t,t=t.parentNode}return a}function o(e){var n;return n=t(a,e),n?{pos
ition:n.position,offset:n.offset,indexes:r(n.node),inside:n.inside}:void 0}var a=e.getRng(),s={};return 2===n&&(a.item?s.start={ctrl:!0,indexes:r(a.item(0))}:(s.start=o(!0),e.isCollapsed()||(s.end=o()))),s},this.moveToBookmark=function(e){function t(e){var t,n,r,o;for(t=i.getRoot(),n=e.length-1;n>=0;n--)o=t.children,r=e[n],r<=o.length-1&&(t=o[r]);return t}function n(n){var i=e[n?"start":"end"],a,s,l,c;i&&(a=i.position>0,s=o.createTextRange(),s.moveToElementText(t(i.indexes)),c=i.offset,c!==l?(s.collapse(i.inside||a),s.moveStart("character",a?-c:c)):s.collapse(n),r.setEndPoint(n?"StartToStart":"EndToStart",s),n&&r.collapse(!0))}var r,o=i.doc.body;e.start&&(e.start.ctrl?(r=o.createControlRange(),r.addElement(t(e.start.indexes)),r.select()):(r=o.createTextRange(),n(!0),n(),r.select()))},this.addRange=function(t){function n(e){var t,n,a,d,h;a=i.create("a"),t=e?s:c,n=e?l:u,d=r.dup
licate(),(t==f||t==f.documentElement)&&(t=p,n=0),3==t.nodeType?(t.parentNode.insertBefore(a,t),d.moveToElementText(a),d.moveStart("character",n),i.remove(a),r.setEndPoint(e?"StartToStart":"EndToEnd",d)):(h=t.childNodes,h.length?(n>=h.length?i.insertAfter(a,h[h.length-1]):t.insertBefore(a,h[n]),d.moveToElementText(a)):t.canHaveHTML&&(t.innerHTML="<span></span>",a=t.firstChild,d.moveToElementText(a),d.collapse(o)),r.setEndPoint(e?"StartToStart":"EndToEnd",d),i.remove(a))}var r,a,s,l,c,u,d,f=e.dom.doc,p=f.body,h,m;if(s=t.startContainer,l=t.startOffset,c=t.endContainer,u=t.endOffset,r=p.createTextRange(),s==c&&1==s.nodeType){if(l==u&&!s.hasChildNodes()){if(s.canHaveHTML)return d=s.previousSibling,d&&!d.hasChildNodes()&&i.isBlock(d)?d.innerHTML="":d=null,s.innerHTML="<span></span><span>&
lt;/span>",r.moveToElementText(s.lastChild),r.select(),i.doc.selection.clear(),s.innerHTML="",void(d&&(d.innerHTML=""));l=i.nodeIndex(s),s=s.parentNode}if(l==u-1)try{if(m=s.childNodes[l],a=p.createControlRange(),a.addElement(m),a.select(),h=e.getRng(),h.item&&m===h.item(0))return}catch(g){}}n(!0),n(),r.select()},this.getRangeAt=n}return e}),r(B,[d],function(e){return{BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey},metaKeyPressed:function(t){return e.mac?t.metaKey:t.ctrlKey&&!t.altKey}}}),r(D,[B,u,d],function(e,t,n){return function(r,i){function o(e){var t=i.settings.object_resizing;return t===!1||n.iOS?!1:("string"!=typeof t&&(t="table,img,div"),"false"===e.getAttribute("data-mce-resize")?!1:i.dom.is(e,t))}function a(t){var n,r,o,a,s;n=t.screenX-T,r=t.screenY-R,P=n*k[2]+D,O=r*k[3]+L,P=5
>P?5:P,O=5>O?5:O,o="IMG"==w.nodeName&&i.settings.resize_img_proportional!==!1?!e.modifierPressed(t):e.modifierPressed(t)||"IMG"==w.nodeName&&k[2]*k[3]!==0,o&&(W(n)>W(r)?(O=V(P*H),P=V(O/H)):(P=V(O/H),O=V(P*H))),C.setStyles(_,{width:P,height:O}),a=k.startPos.x+n,s=k.startPos.y+r,a=a>0?a:0,s=s>0?s:0,C.setStyles(E,{left:a,top:s,display:"block"}),E.innerHTML=P+" × "+O,k[2]<0&&_.clientWidth<=P&&C.setStyle(_,"left",A+(D-P)),k[3]<0&&_.clientHeight<=O&&C.setStyle(_,"top",B+(L-O)),n=U.scrollWidth-$,r=U.scrollHeight-q,n+r!==0&&C.setStyles(E,{left:a-n,top:s-r}),M||(i.fire("ObjectResizeStart",{target:w,width:D,height:L}),M=!0)}function s(){function e(e,t){t&&(w.style[e]||!i.schema.isValid(w.nodeName.toLowerCase(),e)?C.setStyle(w,e,t):C.setAttrib(w,e,t))}M=!1,e("width",P),e("height",O),C.unbind(I,&quo
t;mousemove",a),C.unbind(I,"mouseup",s),F!=I&&(C.unbind(F,"mousemove",a),C.unbind(F,"mouseup",s)),C.remove(_),C.remove(E),z&&"TABLE"!=w.nodeName||l(w),i.fire("ObjectResized",{target:w,width:P,height:O}),i.nodeChanged()}function l(e,t,r){var l,u,d,f,p;g(),l=C.getPos(e,U),A=l.x,B=l.y,p=e.getBoundingClientRect(),u=p.width||p.right-p.left,d=p.height||p.bottom-p.top,w!=e&&(m(),w=e,P=O=0),f=i.fire("ObjectSelected",{target:e}),o(e)&&!f.isDefaultPrevented()?x(N,function(e,i){function o(t){T=t.screenX,R=t.screenY,D=w.clientWidth,L=w.clientHeight,H=L/D,k=e,e.startPos={x:u*e[0]+A,y:d*e[1]+B},$=U.scrollWidth,q=U.scrollHeight,_=w.cloneNode(!0),C.addClass(_,"mce-clonedresizable"),C.setAttrib(_,"data-mce-bogus","all"),_.contentEditable=!1,_.unSelectabe=!0,C.setStyles(_,{left:A,top:B,margin:0}),_.removeAttribute("data-mce-selected"),U.appendChild(_),C.bind(I,"
;mousemove",a),C.bind(I,"mouseup",s),F!=I&&(C.bind(F,"mousemove",a),C.bind(F,"mouseup",s)),E=C.add(U,"div",{"class":"mce-resize-helper","data-mce-bogus":"all"},D+" × "+L)}var l,c;return t?void(i==t&&o(r)):(l=C.get("mceResizeHandle"+i),l?C.show(l):(c=U,l=C.add(c,"div",{id:"mceResizeHandle"+i,"data-mce-bogus":"all","class":"mce-resizehandle",unselectable:!0,style:"cursor:"+i+"-resize; margin:0; padding:0"}),n.ie&&(l.contentEditable=!1)),e.elm||(C.bind(l,"mousedown",function(e){e.stopImmediatePropagation(),e.preventDefault(),o(e)}),e.elm=l),void C.setStyles(l,{left:u*e[0]+A-l.offsetWidth/2,top:d*e[1]+B-l.offsetHeight/2}))}):c(),w.setAttribute("data-mce-selected","1")}function c(){var e,t;g(),w&&w.removeAttribute("data-mce-select
ed");for(e in N)t=C.get("mceResizeHandle"+e),t&&(C.unbind(t),C.remove(t))}function u(e){function t(e,t){if(e)do if(e===t)return!0;while(e=e.parentNode)}var n;return x(C.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),n="mousedown"==e.type?e.target:r.getNode(),n=C.$(n).closest(z?"table":"table,img,hr")[0],t(n,U)&&(v(),t(r.getStart(),n)&&t(r.getEnd(),n)&&(!z||n!=r.getStart()&&"IMG"!==r.getStart().nodeName))?void l(n):void c()}function d(e,t,n){e&&e.attachEvent&&e.attachEvent("on"+t,n)}function f(e,t,n){e&&e.detachEvent&&e.detachEvent("on"+t,n)}function p(e){var t=e.srcElement,n,r,o,a,s,c,u;n=t.getBoundingClientRect(),c=S.clientX-n.left,u=S.clientY-n.top;for(r in N)if(o=N[r],a=t.offsetWidth*o[0],s=t.offsetHeight*o[1],W(a-c)<8&&W(s-u)<8){k=o;break}M=
!0,i.fire("ObjectResizeStart",{target:w,width:w.clientWidth,height:w.clientHeight}),i.getDoc().selection.empty(),l(t,r,S)}function h(e){var t=e.srcElement;if(t!=w){if(i.fire("ObjectSelected",{target:t}),m(),0===t.id.indexOf("mceResizeHandle"))return void(e.returnValue=!1);("IMG"==t.nodeName||"TABLE"==t.nodeName)&&(c(),w=t,d(t,"resizestart",p))}}function m(){f(w,"resizestart",p)}function g(){for(var e in N){var t=N[e];t.elm&&(C.unbind(t.elm),delete t.elm)}}function v(){try{i.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}}function y(e){var t;if(z){t=I.body.createControlRange();try{return t.addElement(e),t.select(),!0}catch(n){}}}function b(){w=_=null,z&&(m(),f(U,"controlselect",h))}var C=i.dom,x=t.each,w,_,E,N,k,S,T,R,A,B,D,L,H,M,P,O,I=i.getDoc(),F=document,z=n.ie&&n.ie<11,W=Math.abs,V=Math.round,U=i.getBody(),$,q;N={n:[.5,0,0,-1],e:[1,.5,1,0],s:[
.5,1,0,1],w:[0,.5,-1,0],nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};var j=".mce-content-body";return i.contentStyles.push(j+" div.mce-resizehandle {position: absolute;border: 1px solid black;background: #FFF;width: 5px;height: 5px;z-index: 10000}"+j+" .mce-resizehandle:hover {background: #000}"+j+" img[data-mce-selected], hr[data-mce-selected] {outline: 1px solid black;resize: none}"+j+" .mce-clonedresizable {position: absolute;"+(n.gecko?"":"outline: 1px dashed black;")+"opacity: .5;filter: alpha(opacity=50);z-index: 10000}"+j+" .mce-resize-helper {background-color: #555;background-color: rgba(0,0,0,0.75);border-radius: 3px;border: 1px;color: white;display: none;font-family: sans-serif;font-size: 12px;white-space: nowrap;line-height: 14px;margin: 5px 10px;padding: 5px;position: absolute;z-index: 10001}"),i.on("init",function(){z?(i.on("ObjectResized",function(e
){"TABLE"!=e.target.nodeName&&(c(),y(e.target))}),d(U,"controlselect",h),i.on("mousedown",function(e){S=e})):(v(),n.ie>=11&&(i.on("mouseup",function(e){var t=e.target.nodeName;!M&&/^(TABLE|IMG|HR)$/.test(t)&&(i.selection.select(e.target,"TABLE"==t),i.nodeChanged())}),i.dom.bind(U,"mscontrolselect",function(e){/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"==e.target.tagName&&window.setTimeout(function(){i.selection.select(e.target)},0))}))),i.on("nodechange mousedown mouseup ResizeEditor",u),i.on("keydown keyup",function(e){w&&"TABLE"==w.nodeName&&u(e)}),i.on("hide",c)}),i.on("remove",g),{isResizable:o,showResizeRect:l,hideResizeRect:c,updateResizeRect:u,controlSelect:y,destroy:b}}}),r(L,[d,u],function(e,t){function n(n){var r=n.dom;this.getBookmark=function(e,i){function o(e,n
){var i=0;return t.each(r.select(e),function(e,t){e==n&&(i=t)}),i}function a(e){function t(t){var n,r,i,o=t?"start":"end";n=e[o+"Container"],r=e[o+"Offset"],1==n.nodeType&&"TR"==n.nodeName&&(i=n.childNodes,n=i[Math.min(t?r:r-1,i.length-1)],n&&(r=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,r)))}return t(!0),t(),e}function s(){function e(e,t){var n=e[t?"startContainer":"endContainer"],a=e[t?"startOffset":"endOffset"],s=[],l,c,u=0;if(3==n.nodeType){if(i)for(l=n.previousSibling;l&&3==l.nodeType;l=l.previousSibling)a+=l.nodeValue.length;s.push(a)}else c=n.childNodes,a>=c.length&&c.length&&(u=1,a=Math.max(0,c.length-1)),s.push(r.nodeIndex(c[a],i)+u);for(;n&&n!=o;n=n.parentNode)s.push(r.nodeIndex(n,i));return s}var t=n.getRng(!0),o=r.getRoot(),a={};return a.start=e(t,!0),n.isCollapsed()||(a.end=e(
t)),a}var l,c,u,d,f,p,h="",m;if(2==e)return p=n.getNode(),f=p?p.nodeName:null,"IMG"==f?{name:f,index:o(f,p)}:n.tridentSel?n.tridentSel.getBookmark(e):s();if(e)return{rng:n.getRng()};if(l=n.getRng(),u=r.uniqueId(),d=n.isCollapsed(),m="overflow:hidden;line-height:0px",l.duplicate||l.item){if(l.item)return p=l.item(0),f=p.nodeName,{name:f,index:o(f,p)};c=l.duplicate();try{l.collapse(),l.pasteHTML('<span data-mce-type="bookmark" id="'+u+'_start" style="'+m+'">'+h+"</span>"),d||(c.collapse(!1),l.moveToElementText(c.parentElement()),0===l.compareEndPoints("StartToEnd",c)&&c.move("character",-1),c.pasteHTML('<span data-mce-type="bookmark" id="'+u+'_end" style="'+m+'">'+h+"</span>"))}catch(g){return null}}else{if(p=n.getNode(),f=p.nodeName,"IMG"==f)return{name:f,index:o(f,p)};c=a(l.cloneRange()),d||(c.collapse
(!1),c.insertNode(r.create("span",{"data-mce-type":"bookmark",id:u+"_end",style:m},h))),l=a(l),l.collapse(!0),l.insertNode(r.create("span",{"data-mce-type":"bookmark",id:u+"_start",style:m},h))}return n.moveToBookmark({id:u,keep:1}),{id:u}},this.moveToBookmark=function(i){function o(e){var t=i[e?"start":"end"],n,r,o,a;if(t){for(o=t[0],r=c,n=t.length-1;n>=1;n--){if(a=r.childNodes,t[n]>a.length-1)return;r=a[t[n]]}3===r.nodeType&&(o=Math.min(t[0],r.nodeValue.length)),1===r.nodeType&&(o=Math.min(t[0],r.childNodes.length)),e?l.setStart(r,o):l.setEnd(r,o)}return!0}function a(n){var o=r.get(i.id+"_"+n),a,s,l,c,h=i.keep;if(o&&(a=o.parentNode,"start"==n?(h?(a=o.firstChild,s=1):s=r.nodeIndex(o),u=d=a,f=p=s):(h?(a=o.firstChild,s=1):s=r.nodeIndex(o),d=a,p=s),!h)){for(c=o.previousSibling,l=o.nextSibling,t.each(t.grep(o.childNodes),function(e){3==e.
nodeType&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});o=r.get(i.id+"_"+n);)r.remove(o,1);c&&l&&c.nodeType==l.nodeType&&3==c.nodeType&&!e.opera&&(s=c.nodeValue.length,c.appendData(l.nodeValue),r.remove(l),"start"==n?(u=d=c,f=p=s):(d=c,p=s))}}function s(t){return!r.isBlock(t)||t.innerHTML||e.ie||(t.innerHTML='<br data-mce-bogus="1" />'),t}var l,c,u,d,f,p;if(i)if(i.start){if(l=r.createRng(),c=r.getRoot(),n.tridentSel)return n.tridentSel.moveToBookmark(i);o(!0)&&o()&&n.setRng(l)}else i.id?(a("start"),a("end"),u&&(l=r.createRng(),l.setStart(s(u),f),l.setEnd(s(d),p),n.setRng(l))):i.name?n.select(r.select(i.name)[i.index]):i.rng&&n.setRng(i.rng)}}return n.isBookmarkNode=function(e){return e&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},n}),r(H,[h,A,D,x,L,d,u],function(e,n,r,
i,o,a,s){function l(e,t,i,a){var s=this;s.dom=e,s.win=t,s.serializer=i,s.editor=a,s.bookmarkManager=new o(s),s.controlSelection=new r(s,a),s.win.getSelection||(s.tridentSel=new n(s))}var c=s.each,u=s.trim,d=a.ie;return l.prototype={setCursorLocation:function(e,t){var n=this,r=n.dom.createRng();e?(r.setStart(e,t),r.setEnd(e,t),n.setRng(r),n.collapse(!1)):(n._moveEndPoint(r,n.editor.getBody(),!0),n.setRng(r))},getContent:function(e){var n=this,r=n.getRng(),i=n.dom.create("body"),o=n.getSel(),a,s,l;return e=e||{},a=s="",e.get=!0,e.format=e.format||"html",e.selection=!0,n.editor.fire("BeforeGetContent",e),"text"==e.format?n.isCollapsed()?"":r.text||(o.toString?o.toString():""):(r.cloneContents?(l=r.cloneContents(),l&&i.appendChild(l)):r.item!==t||r.htmlText!==t?(i.innerHTML="<br>"+(r.item?r.item(0).outerHTML:r.htmlText),i.removeChild(i.firstChild)):i.innerHTML=r.toString(),/^\s/.test(i.innerHTM
L)&&(a=" "),/\s+$/.test(i.innerHTML)&&(s=" "),e.getInner=!0,e.content=n.isCollapsed()?"":a+n.serializer.serialize(i,e)+s,n.editor.fire("GetContent",e),e.content)},setContent:function(e,t){var n=this,r=n.getRng(),i,o=n.win.document,a,s;if(t=t||{format:"html"},t.set=!0,t.selection=!0,e=t.content=e,t.no_events||n.editor.fire("BeforeSetContent",t),e=t.content,r.insertNode){e+='<span id="__caret">_</span>',r.startContainer==o&&r.endContainer==o?o.body.innerHTML=e:(r.deleteContents(),0===o.body.childNodes.length?o.body.innerHTML=e:r.createContextualFragment?r.insertNode(r.createContextualFragment(e)):(a=o.createDocumentFragment(),s=o.createElement("div"),a.appendChild(s),s.outerHTML=e,r.insertNode(a))),i=n.dom.get("__caret"),r=o.createRange(),r.setStartBefore(i),r.setEndBefore(i),n.setRng(r),n.dom.remove("__caret");try{n.setRng(r)}catch(l){}}else r.item&a
mp;&(o.execCommand("Delete",!1,null),r=n.getRng()),/^\s+/.test(e)?(r.pasteHTML('<span id="__mce_tmp">_</span>'+e),n.dom.remove("__mce_tmp")):r.pasteHTML(e);t.no_events||n.editor.fire("SetContent",t)},getStart:function(){var e=this,t=e.getRng(),n,r,i,o;if(t.duplicate||t.item){if(t.item)return t.item(0);for(i=t.duplicate(),i.collapse(1),n=i.parentElement(),n.ownerDocument!==e.dom.doc&&(n=e.dom.getRoot()),r=o=t.parentElement();o=o.parentNode;)if(o==n){n=r;break}return n}return n=t.startContainer,1==n.nodeType&&n.hasChildNodes()&&(n=n.childNodes[Math.min(n.childNodes.length-1,t.startOffset)]),n&&3==n.nodeType?n.parentNode:n},getEnd:function(){var e=this,t=e.getRng(),n,r;return t.duplicate||t.item?t.item?t.item(0):(t=t.duplicate(),t.collapse(0),n=t.parentElement(),n.ownerDocument!==e.dom.doc&&(n=e.dom.getRoot()),n&&"BODY"==n.nodeName?n.lastChild||n:n):(n=t.endContainer,r=t.en
dOffset,1==n.nodeType&&n.hasChildNodes()&&(n=n.childNodes[r>0?r-1:r]),n&&3==n.nodeType?n.parentNode:n)},getBookmark:function(e,t){return this.bookmarkManager.getBookmark(e,t)},moveToBookmark:function(e){return this.bookmarkManager.moveToBookmark(e)},select:function(e,t){var n=this,r=n.dom,i=r.createRng(),o;if(n.lastFocusBookmark=null,e){if(!t&&n.controlSelection.controlSelect(e))return;o=r.nodeIndex(e),i.setStart(e.parentNode,o),i.setEnd(e.parentNode,o+1),t&&(n._moveEndPoint(i,e,!0),n._moveEndPoint(i,e)),n.setRng(i)}return e},isCollapsed:function(){var e=this,t=e.getRng(),n=e.getSel();return!t||t.item?!1:t.compareEndPoints?0===t.compareEndPoints("StartToEnd",t):!n||t.collapsed},collapse:function(e){var t=this,n=t.getRng(),r;n.item&&(r=n.item(0),n=t.win.document.body.createTextRange(),n.moveToElementText(r)),n.collapse(!!e),t.setRng(n)},getSel:function(){var e=this.win;return e.getSelection?e.getSelection():e.document.selec
tion},getRng:function(e){function t(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(r){return-1}}var n=this,r,i,o,a=n.win.document,s;if(!e&&n.lastFocusBookmark){var l=n.lastFocusBookmark;return l.startContainer?(i=a.createRange(),i.setStart(l.startContainer,l.startOffset),i.setEnd(l.endContainer,l.endOffset)):i=l,i}if(e&&n.tridentSel)return n.tridentSel.getRangeAt(0);try{(r=n.getSel())&&(i=r.rangeCount>0?r.getRangeAt(0):r.createRange?r.createRange():a.createRange())}catch(c){}if(d&&i&&i.setStart&&a.selection){try{s=a.selection.createRange()}catch(c){}s&&s.item&&(o=s.item(0),i=a.createRange(),i.setStartBefore(o),i.setEndAfter(o))}return i||(i=a.createRange?a.createRange():a.body.createTextRange()),i.setStart&&9===i.startContainer.nodeType&&i.collapsed&&(o=n.dom.getRoot(),i.setStart(o,0),i.setEnd(o,0)),n.selectedRange&&n.explicitRange&&(0===t(i.START_TO_START,i,n.selectedRan
ge)&&0===t(i.END_TO_END,i,n.selectedRange)?i=n.explicitRange:(n.selectedRange=null,n.explicitRange=null)),i},setRng:function(e,t){var n=this,r;if(e.select)try{e.select()}catch(i){}else if(n.tridentSel){if(e.cloneRange)try{return void n.tridentSel.addRange(e)}catch(i){}}else if(r=n.getSel()){n.explicitRange=e;try{r.removeAllRanges(),r.addRange(e)}catch(i){}t===!1&&r.extend&&(r.collapse(e.endContainer,e.endOffset),r.extend(e.startContainer,e.startOffset)),n.selectedRange=r.rangeCount>0?r.getRangeAt(0):null}},setNode:function(e){var t=this;return t.setContent(t.dom.getOuterHTML(e)),e},getNode:function(){function e(e,t){for(var n=e;e&&3===e.nodeType&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n}var t=this,n=t.getRng(),r,i=n.startContainer,o=n.endContainer,a=n.startOffset,s=n.endOffset,l=t.dom.getRoot();return n?n.setStart?(r=n.commonAncestorContainer,!n.collapsed&&(i==o&&2>s-a&&i.hasChildNodes()&&
amp;(r=i.childNodes[a]),3===i.nodeType&&3===o.nodeType&&(i=i.length===a?e(i.nextSibling,!0):i.parentNode,o=0===s?e(o.previousSibling,!1):o.parentNode,i&&i===o))?i:r&&3==r.nodeType?r.parentNode:r):(r=n.item?n.item(0):n.parentElement(),r.ownerDocument!==t.win.document&&(r=l),r):l},getSelectedBlocks:function(t,n){var r=this,i=r.dom,o,a,s=[];if(a=i.getRoot(),t=i.getParent(t||r.getStart(),i.isBlock),n=i.getParent(n||r.getEnd(),i.isBlock),t&&t!=a&&s.push(t),t&&n&&t!=n){o=t;for(var l=new e(t,a);(o=l.next())&&o!=n;)i.isBlock(o)&&s.push(o)}return n&&t!=n&&n!=a&&s.push(n),s},isForward:function(){var e=this.dom,t=this.getSel(),n,r;return t&&t.anchorNode&&t.focusNode?(n=e.createRng(),n.setStart(t.anchorNode,t.anchorOffset),n.collapse(!0),r=e.createRng(),r.setStart(t.focusNode,t.focusOffset),r.collapse(!0),n.compareBoundaryPoints(n.START_TO_START,r)<=0):!0},normalize
:function(){var e=this,t=e.getRng();return!d&&new i(e.dom).normalize(t)&&e.setRng(t,e.isForward()),t},selectorChanged:function(e,t){var n=this,r;return n.selectorChangedData||(n.selectorChangedData={},r={},n.editor.on("NodeChange",function(e){var t=e.element,i=n.dom,o=i.getParents(t,null,i.getRoot()),a={};c(n.selectorChangedData,function(e,t){c(o,function(n){return i.is(n,t)?(r[t]||(c(e,function(e){e(!0,{node:n,selector:t,parents:o})}),r[t]=e),a[t]=e,!1):void 0})}),c(r,function(e,n){a[n]||(delete r[n],c(e,function(e){e(!1,{node:t,selector:n,parents:o})}))})})),n.selectorChangedData[e]||(n.selectorChangedData[e]=[]),n.selectorChangedData[e].push(t),n},getScrollContainer:function(){for(var e,t=this.dom.getRoot();t&&"BODY"!=t.nodeName;){if(t.scrollHeight>t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e){function t(e){for(var t=0,n=0,r=e;r&&r.nodeType;)t+=r.offsetLeft||0,n+=r.offsetTop||0,r=r.offsetParent
;return{x:t,y:n}}var n,r,i=this,o=i.dom,a=o.getRoot(),s,l;if("BODY"!=a.nodeName){var c=i.getScrollContainer();if(c)return n=t(e).y-t(c).y,l=c.clientHeight,s=c.scrollTop,void((s>n||n+25>s+l)&&(c.scrollTop=s>n?n:n-l+25))}r=o.getViewPort(i.editor.getWin()),n=o.getPos(e).y,s=r.y,l=r.h,(n<r.y||n+25>s+l)&&i.editor.getWin().scrollTo(0,s>n?n:n-l+25)},_moveEndPoint:function(t,n,r){var i=n,o=new e(n,i),s=this.dom.schema.getNonEmptyElements();do{if(3==n.nodeType&&0!==u(n.nodeValue).length)return void(r?t.setStart(n,0):t.setEnd(n,n.nodeValue.length));if(s[n.nodeName])return void(r?t.setStartBefore(n):"BR"==n.nodeName?t.setEndBefore(n):t.setEndAfter(n));if(a.ie&&a.ie<11&&this.dom.isBlock(n)&&this.dom.isEmpty(n))return void(r?t.setStart(n,0):t.setEnd(n,0))}while(n=r?o.next():o.prev());"BODY"==i.nodeName&&(r?t.setStart(i,0):t.setEnd(i,i.childNodes.length))},destroy:function(){this.win=null,th
is.controlSelection.destroy()}},l}),r(M,[L,u],function(e,t){function n(t){this.compare=function(n,i){function o(e){var n={};return r(t.getAttribs(e),function(r){var i=r.nodeName.toLowerCase();0!==i.indexOf("_")&&"style"!==i&&"data-mce-style"!==i&&(n[i]=t.getAttrib(e,i))}),n}function a(e,t){var n,r;for(r in e)if(e.hasOwnProperty(r)){if(n=t[r],"undefined"==typeof n)return!1;if(e[r]!=n)return!1;delete t[r]}for(r in t)if(t.hasOwnProperty(r))return!1;return!0}return n.nodeName!=i.nodeName?!1:a(o(n),o(i))&&a(t.parseStyle(t.getAttrib(n,"style")),t.parseStyle(t.getAttrib(i,"style")))?!e.isBookmarkNode(n)&&!e.isBookmarkNode(i):!1}}var r=t.each;return n}),r(P,[u],function(e){function t(e,t){function r(e){return e.replace(/%(\w+)/g,"")}var i,o,a=e.dom,s="",l,c;if(c=e.settings.preview_styles,c===!1)return"";if(c||(c="font-family font-size font-weight font-style
text-decoration text-transform color background-color border border-radius outline text-shadow"),"string"==typeof t){if(t=e.formatter.get(t),!t)return;t=t[0]}return i=t.block||t.inline||"span",o=a.create(i),n(t.styles,function(e,t){e=r(e),e&&a.setStyle(o,t,e)}),n(t.attributes,function(e,t){e=r(e),e&&a.setAttrib(o,t,e)}),n(t.classes,function(e){e=r(e),a.hasClass(o,e)||a.addClass(o,e)}),e.fire("PreviewFormats"),a.setStyles(o,{position:"absolute",left:-65535}),e.getBody().appendChild(o),l=a.getStyle(e.getBody(),"fontSize",!0),l=/px$/.test(l)?parseInt(l,10):0,n(c.split(" "),function(t){var n=a.getStyle(o,t,!0);if(!("background-color"==t&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)&&(n=a.getStyle(e.getBody(),t,!0),"#ffffff"==a.toHex(n).toLowerCase())||"color"==t&&"#000000"==a.toHex(n).toLowerCase())){if("font-size"==t&&/em|%$/.
test(n)){if(0===l)return;n=parseFloat(n,10)/(/%$/.test(n)?100:1),n=n*l+"px"}"border"==t&&n&&(s+="padding:0 2px;"),s+=t+":"+n+";"}}),e.fire("AfterPreviewFormats"),a.remove(o),s}var n=e.each;return{getCssText:t}}),r(O,[h,x,L,M,u,P],function(e,t,n,r,i,o){return function(a){function s(e){return e.nodeType&&(e=e.nodeName),!!a.schema.getTextBlockElements()[e.toLowerCase()]}function l(e,t){return W.getParents(e,t,W.getRoot())}function c(e){return 1===e.nodeType&&"_mce_caret"===e.id}function u(){p({valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},defaultBlock:"div"}
,{selector:"img,table",collapsed:!1,styles:{"float":"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},defaultBlock:"div"},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"right"}}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},defaultBlock:"div"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold&quo
t;}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},wrap_links:!1,remove_similar:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},wrap_links:!1,remove_similar:!0},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote&q
uot;,wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(){return!0
+},onformat:function(e,t,n){it(n,function(t,n){W.setAttrib(e,n,t)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]}),it("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/),function(e){p(e,{block:e,remove:"all"})}),p(a.settings.formats)}function d(){a.addShortcut("ctrl+b","bold_desc","Bold"),a.addShortcut("ctrl+i","italic_desc","Italic"),a.addShortcut("ctrl+u","underline_desc","Underline");for(var e=1;6>=e;e++)a.addShortcut("ctrl+"+e,"",["FormatBlock",!1,"h"+e]);a.addSh
ortcut("ctrl+7","",["FormatBlock",!1,"p"]),a.addShortcut("ctrl+8","",["FormatBlock",!1,"div"]),a.addShortcut("ctrl+9","",["FormatBlock",!1,"address"])}function f(e){return e?z[e]:z}function p(e,t){e&&("string"!=typeof e?it(e,function(e,t){p(t,e)}):(t=t.length?t:[t],it(t,function(e){e.deep===Z&&(e.deep=!e.selector),e.split===Z&&(e.split=!e.selector||e.inline),e.remove===Z&&e.selector&&!e.inline&&(e.remove="none"),e.selector&&e.inline&&(e.mixed=!0,e.block_expand=!0),"string"==typeof e.classes&&(e.classes=e.classes.split(/\s+/))}),z[e]=t))}function h(e){var t;return a.dom.getParent(e,function(e){return t=a.dom.getStyle(e,"text-decoration"),t&&"none"!==t}),t}function m(e){var t;1===e.nodeType&&e.parentNode&&1===e.parentNode.n
odeType&&(t=h(e.parentNode),a.dom.getStyle(e,"color")&&t?a.dom.setStyle(e,"text-decoration",t):a.dom.getStyle(e,"textdecoration")===t&&a.dom.setStyle(e,"text-decoration",null))}function g(t,n,r){function i(e,t){if(t=t||d,e){if(t.onformat&&t.onformat(e,t,n,r),it(t.styles,function(t,r){W.setStyle(e,r,R(t,n))}),t.styles){var i=W.getAttrib(e,"style");i&&e.setAttribute("data-mce-style",i)}it(t.attributes,function(t,r){W.setAttrib(e,r,R(t,n))}),it(t.classes,function(t){t=R(t,n),W.hasClass(e,t)||W.addClass(e,t)})}}function o(){function t(t,n){var i=new e(n);for(r=i.current();r;r=i.prev())if(r.childNodes.length>1||r==t||"BR"==r.tagName)return r}var n=a.selection.getRng(),i=n.startContainer,o=n.endContainer;if(i!=o&&0===n.endOffset){var s=t(i,o),l=3==s.nodeType?s.length:s.childNodes.length;n.setEnd(s,l)}return n}function l(e,r,o){var a=[],l,f,p=!0;l=d.inline||d.block,f=W.c
reate(l),i(f),U.walk(e,function(e){function r(e){var m,g,y,C,x;return x=p,m=e.nodeName.toLowerCase(),g=e.parentNode.nodeName.toLowerCase(),1===e.nodeType&&et(e)&&(x=p,p="true"===et(e),C=!0),k(m,"br")?(h=0,void(d.block&&W.remove(e))):d.wrapper&&b(e,t,n)?void(h=0):p&&!C&&d.block&&!d.wrapper&&s(m)&&$(g,l)?(e=W.rename(e,l),i(e),a.push(e),void(h=0)):d.selector&&(it(u,function(t){"collapsed"in t&&t.collapsed!==v||W.is(e,t.selector)&&!c(e)&&(i(e,t),y=!0)}),!d.inline||y)?void(h=0):void(!p||C||!$(l,m)||!$(g,l)||!o&&3===e.nodeType&&1===e.nodeValue.length&&65279===e.nodeValue.charCodeAt(0)||c(e)||d.inline&&q(e)?(h=0,it(ot(e.childNodes),r),C&&(p=x),h=0):(h||(h=W.clone(f,X),e.parentNode.insertBefore(h,e),a.push(h)),h.appendChild(e)))}var h;it(e,r)}),d.wrap_links===!1&&it(a,function(e){function t(e){var n,r,i;if("
;A"===e.nodeName){for(r=W.clone(f,X),a.push(r),i=ot(e.childNodes),n=0;n<i.length;n++)r.appendChild(i[n]);e.appendChild(r)}it(ot(e.childNodes),t)}t(e)}),it(a,function(e){function r(e){var t=0;return it(e.childNodes,function(e){A(e)||rt(e)||t++}),t}function o(e){var t,n;return it(e.childNodes,function(e){return 1!=e.nodeType||rt(e)||c(e)?void 0:(t=e,X)}),t&&!rt(t)&&N(t,d)&&(n=W.clone(t,X),i(n),W.replace(n,e,J),W.remove(t,1)),n||e}var s;if(s=r(e),(a.length>1||!q(e))&&0===s)return void W.remove(e,1);if(d.inline||d.wrapper){if(d.exact||1!==s||(e=o(e)),it(u,function(t){it(W.select(t.inline,e),function(e){var r;if(!rt(e)){if(t.wrap_links===!1){r=e.parentNode;do if("A"===r.nodeName)return;while(r=r.parentNode)}L(t,n,e,t.exact?e:null)}})}),b(e.parentNode,t,n))return W.remove(e,1),e=0,J;d.merge_with_parents&&W.getParent(e.parentNode,function(r){return b(r,t,n)?(W.remove(e,1),e=0,J):void 0}),e&&d.merge_siblings!==!1&&
(e=P(M(e),e),e=P(e,M(e,J)))}})}var u=f(t),d=u[0],p,h,v=!r&&V.isCollapsed();if(d)if(r)r.nodeType?(h=W.createRng(),h.setStartBefore(r),h.setEndAfter(r),l(D(h,u),null,!0)):l(r,null,!0);else if(v&&d.inline&&!W.select("td.mce-item-selected,th.mce-item-selected").length)I("apply",t,n);else{var y=a.selection.getNode();j||!u[0].defaultBlock||W.getParent(y,W.isBlock)||g(u[0].defaultBlock),a.selection.setRng(o()),p=V.getBookmark(),l(D(V.getRng(J),u),p),d.styles&&(d.styles.color||d.styles.textDecoration)&&(at(y,m,"childNodes"),m(y)),V.moveToBookmark(p),F(V.getRng(J)),a.nodeChanged()}}function v(e,t,n,r){function i(e){var n,r,o,a,s;if(1===e.nodeType&&et(e)&&(a=y,y="true"===et(e),s=!0),n=ot(e.childNodes),y&&!s)for(r=0,o=p.length;o>r&&!L(p[r],t,e,e);r++);if(m.deep&&n.length){for(r=0,o=n.length;o>r;r++)i(n[r]);s&&(y=a)}}function o(n){var i;return it(l(n.parentNode).
reverse(),function(n){var o;i||"_start"==n.id||"_end"==n.id||(o=b(n,e,t,r),o&&o.split!==!1&&(i=n))}),i}function s(e,n,r,i){var o,a,s,l,c,u;if(e){for(u=e.parentNode,o=n.parentNode;o&&o!=u;o=o.parentNode){for(a=W.clone(o,X),c=0;c<p.length;c++)if(L(p[c],t,a,a)){a=0;break}a&&(s&&a.appendChild(s),l||(l=a),s=a)}!i||m.mixed&&q(e)||(n=W.split(e,n)),s&&(r.parentNode.insertBefore(s,r),l.appendChild(r))}return n}function c(e){return s(o(e),e,e,!0)}function u(e){var t=W.get(e?"_start":"_end"),n=t[e?"firstChild":"lastChild"];return rt(n)&&(n=n[e?"firstChild":"lastChild"]),W.remove(t,!0),n}function d(e){var t,n,r=e.commonAncestorContainer;e=D(e,p,J),m.split&&(t=O(e,J),n=O(e),t!=n?(/^(TR|TH|TD)$/.test(t.nodeName)&&t.firstChild&&(t="TR"==t.nodeName?t.firstChild.firstChild||t:t.firstChild||t),r&&/^T(HEAD|BODY|FOOT
|R)$/.test(r.nodeName)&&/^(TH|TD)$/.test(n.nodeName)&&n.firstChild&&(n=n.firstChild||n),t=B(t,"span",{id:"_start","data-mce-type":"bookmark"}),n=B(n,"span",{id:"_end","data-mce-type":"bookmark"}),c(t),c(n),t=u(J),n=u()):t=n=c(t),e.startContainer=t.parentNode,e.startOffset=K(t),e.endContainer=n.parentNode,e.endOffset=K(n)+1),U.walk(e,function(e){it(e,function(e){i(e),1===e.nodeType&&"underline"===a.dom.getStyle(e,"text-decoration")&&e.parentNode&&"underline"===h(e.parentNode)&&L({deep:!1,exact:!0,inline:"span",styles:{textDecoration:"underline"}},null,e)})})}var p=f(e),m=p[0],g,v,y=!0;return n?void(n.nodeType?(v=W.createRng(),v.setStartBefore(n),v.setEndAfter(n),d(v)):d(n)):void(V.isCollapsed()&&m.inline&&!W.select("td.mce-item-selected,th.mce-item-selected").length?I("r
emove",e,t,r):(g=V.getBookmark(),d(V.getRng(J)),V.moveToBookmark(g),m.inline&&C(e,t,V.getStart())&&F(V.getRng(!0)),a.nodeChanged()))}function y(e,t,n){var r=f(e);!C(e,t,n)||"toggle"in r[0]&&!r[0].toggle?g(e,t,n):v(e,t,n)}function b(e,t,n,r){function i(e,t,i){var o,a,s=t[i],l;if(t.onmatch)return t.onmatch(e,t,i);if(s)if(s.length===Z){for(o in s)if(s.hasOwnProperty(o)){if(a="attributes"===i?W.getAttrib(e,o):S(e,o),r&&!a&&!t.exact)return;if((!r||t.exact)&&!k(a,T(R(s[o],n),o)))return}}else for(l=0;l<s.length;l++)if("attributes"===i?W.getAttrib(e,s[l]):S(e,s[l]))return t;return t}var o=f(t),a,s,l;if(o&&e)for(s=0;s<o.length;s++)if(a=o[s],N(e,a)&&i(e,a,"attributes")&&i(e,a,"styles")){if(l=a.classes)for(s=0;s<l.length;s++)if(!W.hasClass(e,l[s]))return;return a}}function C(e,t,n){function r(n){var r=W.getRoot();return n===r?!1:(n=W.getParent(n,function(n){re
turn n.parentNode===r||!!b(n,e,t,!0)}),b(n,e,t))}var i;return n?r(n):(n=V.getNode(),r(n)?J:(i=V.getStart(),i!=n&&r(i)?J:X))}function x(e,t){var n,r=[],i={};return n=V.getStart(),W.getParent(n,function(n){var o,a;for(o=0;o<e.length;o++)a=e[o],!i[a]&&b(n,a,t)&&(i[a]=!0,r.push(a))},W.getRoot()),r}function w(e){var t=f(e),n,r,i,o,a;if(t)for(n=V.getStart(),r=l(n),o=t.length-1;o>=0;o--){if(a=t[o].selector,!a||t[o].defaultBlock)return J;for(i=r.length-1;i>=0;i--)if(W.is(r[i],a))return J}return X}function _(e,t,n){var r;return Q||(Q={},r={},a.on("NodeChange",function(e){var t=l(e.element),n={};t=i.grep(t,function(e){return!e.getAttribute("data-mce-bogus")}),it(Q,function(e,i){it(t,function(o){return b(o,i,{},e.similar)?(r[i]||(it(e,function(e){e(!0,{node:o,format:i,parents:t})}),r[i]=e),n[i]=e,!1):void 0})}),it(r,function(i,o){n[o]||(delete r[o],it(i,function(n){n(!1,{node:e.element,format:o,parents:t})}))})})),it(e.split(","),f
unction(e){Q[e]||(Q[e]=[],Q[e].similar=n),Q[e].push(t)}),this}function E(e){return o.getCssText(a,e)}function N(e,t){return k(e,t.inline)?J:k(e,t.block)?J:t.selector?1==e.nodeType&&W.is(e,t.selector):void 0}function k(e,t){return e=e||"",t=t||"",e=""+(e.nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()==t.toLowerCase()}function S(e,t){return T(W.getStyle(e,t),t)}function T(e,t){return("color"==t||"backgroundColor"==t)&&(e=W.toHex(e)),"fontWeight"==t&&700==e&&(e="bold"),"fontFamily"==t&&(e=e.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+e}function R(e,t){return"string"!=typeof e?e=e(t):t&&(e=e.replace(/%(\w+)/g,function(e,n){return t[n]||e})),e}function A(e){return e&&3===e.nodeType&&/^([\t \r\n]+|)$/.test(e.nodeValue)}function B(e,t,n){var r=W.create(t,n);return e.parentNode.insertBefor
e(r,e),r.appendChild(e),r}function D(t,n,r){function i(e){function t(e){return"BR"==e.nodeName&&e.getAttribute("data-mce-bogus")&&!e.nextSibling}var r,i,o,a,s;if(r=i=e?g:y,a=e?"previousSibling":"nextSibling",s=W.getRoot(),3==r.nodeType&&!A(r)&&(e?v>0:b<r.nodeValue.length))return r;for(;;){if(!n[0].block_expand&&q(i))return i;for(o=i[a];o;o=o[a])if(!rt(o)&&!A(o)&&!t(o))return i;if(i.parentNode==s){r=i;break}i=i.parentNode}return r}function o(e,t){for(t===Z&&(t=3===e.nodeType?e.length:e.childNodes.length);e&&e.hasChildNodes();)e=e.childNodes[t],e&&(t=3===e.nodeType?e.length:e.childNodes.length);return{node:e,offset:t}}function c(e){for(var t=e;t;){if(1===t.nodeType&&et(t))return"false"===et(t)?t:e;t=t.parentNode}return e}function u(t,n,i){function o(e,t){var n,o,a=e.nodeValue;return"undefined"==typeof t&&(t=i?a.length:0),i?(n
=a.lastIndexOf(" ",t),o=a.lastIndexOf("\xa0",t),n=n>o?n:o,-1===n||r||n++):(n=a.indexOf(" ",t),o=a.indexOf("\xa0",t),n=-1!==n&&(-1===o||o>n)?n:o),n}var s,l,c,u;if(3===t.nodeType){if(c=o(t,n),-1!==c)return{container:t,offset:c};u=t}for(s=new e(t,W.getParent(t,q)||a.getBody());l=s[i?"prev":"next"]();)if(3===l.nodeType){if(u=l,c=o(l),-1!==c)return{container:l,offset:c}}else if(q(l))break;return u?(n=i?0:u.length,{container:u,offset:n}):void 0}function d(e,r){var i,o,a,s;for(3==e.nodeType&&0===e.nodeValue.length&&e[r]&&(e=e[r]),i=l(e),o=0;o<i.length;o++)for(a=0;a<n.length;a++)if(s=n[a],!("collapsed"in s&&s.collapsed!==t.collapsed)&&W.is(i[o],s.selector))return i[o];return e}function f(e,t){var r,i=W.getRoot();if(n[0].wrapper||(r=W.getParent(e,n[0].block,i)),r||(r=W.getParent(3==e.nodeType?e.parentNode:e,function(e){return e!=i&&s(e)})),r&&n[0].
wrapper&&(r=l(r,"ul,ol").reverse()[0]||r),!r)for(r=e;r[t]&&!q(r[t])&&(r=r[t],!k(r,"br")););return r||e}var p,h,m,g=t.startContainer,v=t.startOffset,y=t.endContainer,b=t.endOffset;if(1==g.nodeType&&g.hasChildNodes()&&(p=g.childNodes.length-1,g=g.childNodes[v>p?p:v],3==g.nodeType&&(v=0)),1==y.nodeType&&y.hasChildNodes()&&(p=y.childNodes.length-1,y=y.childNodes[b>p?p:b-1],3==y.nodeType&&(b=y.nodeValue.length)),g=c(g),y=c(y),(rt(g.parentNode)||rt(g))&&(g=rt(g)?g:g.parentNode,g=g.nextSibling||g,3==g.nodeType&&(v=0)),(rt(y.parentNode)||rt(y))&&(y=rt(y)?y:y.parentNode,y=y.previousSibling||y,3==y.nodeType&&(b=y.length)),n[0].inline&&(t.collapsed&&(m=u(g,v,!0),m&&(g=m.container,v=m.offset),m=u(y,b),m&&(y=m.container,b=m.offset)),h=o(y,b),h.node)){for(;h.node&&0===h.offset&&h.node.previousSibling;)h=o(h.node.previousS
ibling);h.node&&h.offset>0&&3===h.node.nodeType&&" "===h.node.nodeValue.charAt(h.offset-1)&&h.offset>1&&(y=h.node,y.splitText(h.offset-1))}return(n[0].inline||n[0].block_expand)&&(n[0].inline&&3==g.nodeType&&0!==v||(g=i(!0)),n[0].inline&&3==y.nodeType&&b!==y.nodeValue.length||(y=i())),n[0].selector&&n[0].expand!==X&&!n[0].inline&&(g=d(g,"previousSibling"),y=d(y,"nextSibling")),(n[0].block||n[0].selector)&&(g=f(g,"previousSibling"),y=f(y,"nextSibling"),n[0].block&&(q(g)||(g=i(!0)),q(y)||(y=i()))),1==g.nodeType&&(v=K(g),g=g.parentNode),1==y.nodeType&&(b=K(y)+1,y=y.parentNode),{startContainer:g,startOffset:v,endContainer:y,endOffset:b}}function L(e,t,n,r){var i,o,a;if(!N(n,e))return X;if("all"!=e.remove)for(it(e.styles,function(i,o){i=T(R(i,t),o),"number"==typeof o&&(o=
i,r=0),(e.remove_similar||!r||k(S(r,o),i))&&W.setStyle(n,o,""),a=1}),a&&""===W.getAttrib(n,"style")&&(n.removeAttribute("style"),n.removeAttribute("data-mce-style")),it(e.attributes,function(e,i){var o;if(e=R(e,t),"number"==typeof i&&(i=e,r=0),!r||k(W.getAttrib(r,i),e)){if("class"==i&&(e=W.getAttrib(n,i),e&&(o="",it(e.split(/\s+/),function(e){/mce\w+/.test(e)&&(o+=(o?" ":"")+e)}),o)))return void W.setAttrib(n,i,o);"class"==i&&n.removeAttribute("className"),G.test(i)&&n.removeAttribute("data-mce-"+i),n.removeAttribute(i)}}),it(e.classes,function(e){e=R(e,t),(!r||W.hasClass(r,e))&&W.removeClass(n,e)}),o=W.getAttribs(n),i=0;i<o.length;i++)if(0!==o[i].nodeName.indexOf("_"))return X;return"none"!=e.remove?(H(n,e),J):void 0}function H(e,t){function n(e,t,n){re
turn e=M(e,t,n),!e||"BR"==e.nodeName||q(e)}var r=e.parentNode,i;t.block&&(j?r==W.getRoot()&&(t.list_block&&k(e,t.list_block)||it(ot(e.childNodes),function(e){$(j,e.nodeName.toLowerCase())?i?i.appendChild(e):(i=B(e,j),W.setAttribs(i,a.settings.forced_root_block_attrs)):i=0})):q(e)&&!q(r)&&(n(e,X)||n(e.firstChild,J,1)||e.insertBefore(W.create("br"),e.firstChild),n(e,J)||n(e.lastChild,X,1)||e.appendChild(W.create("br")))),t.selector&&t.inline&&!k(t.inline,e)||W.remove(e,1)}function M(e,t,n){if(e)for(t=t?"nextSibling":"previousSibling",e=n?e:e[t];e;e=e[t])if(1==e.nodeType||!A(e))return e}function P(e,t){function n(e,t){for(i=e;i;i=i[t]){if(3==i.nodeType&&0!==i.nodeValue.length)return e;if(1==i.nodeType&&!rt(i))return i}return e}var i,o,a=new r(W);if(e&&t&&(e=n(e,"previousSibling"),t=n(t,"nextSibling"),a.compare(e,t))){for(i=e.nextS
ibling;i&&i!=t;)o=i,i=i.nextSibling,e.appendChild(o);return W.remove(t),it(ot(t.childNodes),function(t){e.appendChild(t)}),e}return t}function O(t,n){var r,i,o;return r=t[n?"startContainer":"endContainer"],i=t[n?"startOffset":"endOffset"],1==r.nodeType&&(o=r.childNodes.length-1,!n&&i&&i--,r=r.childNodes[i>o?o:i]),3===r.nodeType&&n&&i>=r.nodeValue.length&&(r=new e(r,a.getBody()).next()||r),3!==r.nodeType||n||0!==i||(r=new e(r,a.getBody()).prev()||r),r}function I(t,n,r,i){function o(e){var t=W.create("span",{id:y,"data-mce-bogus":!0,style:C?"color:red":""});return e&&t.appendChild(a.getDoc().createTextNode(Y)),t}function l(e,t){for(;e;){if(3===e.nodeType&&e.nodeValue!==Y||e.childNodes.length>1)return!1;t&&1===e.nodeType&&t.push(e),e=e.firstChild}return!0}function c(e){for(;e;){if(e.id===y)return e;e=e.parentNod
e}}function u(t){var n;if(t)for(n=new e(t,t),t=n.current();t;t=n.next())if(3===t.nodeType)return t}function d(e,t){var n,r;if(e)r=V.getRng(!0),l(e)?(t!==!1&&(r.setStartBefore(e),r.setEndBefore(e)),W.remove(e)):(n=u(e),n.nodeValue.charAt(0)===Y&&(n.deleteData(0,1),r.startContainer==n&&r.startOffset--,r.endContainer==n&&r.endOffset--),W.remove(e,1)),V.setRng(r);else if(e=c(V.getStart()),!e)for(;e=W.get(y);)d(e,!1)}function p(){var e,t,i,a,s,l,d;e=V.getRng(!0),a=e.startOffset,l=e.startContainer,d=l.nodeValue,t=c(V.getStart()),t&&(i=u(t)),d&&a>0&&a<d.length&&/\w/.test(d.charAt(a))&&/\w/.test(d.charAt(a-1))?(s=V.getBookmark(),e.collapse(!0),e=D(e,f(n)),e=U.split(e),g(n,r,e),V.moveToBookmark(s)):(t&&i.nodeValue===Y?g(n,r,t):(t=o(!0),i=t.firstChild,e.insertNode(t),a=1,g(n,r,t)),V.setCursorLocation(i,a))}function h(){var e=V.getRng(!0),t,a,l,c,u,d,p=[],h,m;for(t=e.startContainer,a=e.startOffset,u=t,3==t.no
deType&&(a!=t.nodeValue.length&&(c=!0),u=u.parentNode);u;){if(b(u,n,r,i)){d=u;break}u.nextSibling&&(c=!0),p.push(u),u=u.parentNode}if(d)if(c)l=V.getBookmark(),e.collapse(!0),e=D(e,f(n),!0),e=U.split(e),v(n,r,e),V.moveToBookmark(l);else{for(m=o(),u=m,h=p.length-1;h>=0;h--)u.appendChild(W.clone(p[h],!1)),u=u.firstChild;u.appendChild(W.doc.createTextNode(Y)),u=u.firstChild;var g=W.getParent(d,s);g&&W.isEmpty(g)?d.parentNode.replaceChild(m,d):W.insertAfter(m,d),V.setCursorLocation(u,1),W.isEmpty(d)&&W.remove(d)}}function m(){var e;e=c(V.getStart()),e&&!W.isEmpty(e)&&at(e,function(e){1!=e.nodeType||e.id===y||W.isEmpty(e)||W.setAttrib(e,"data-mce-bogus",null)},"childNodes")}var y="_mce_caret",C=a.settings.caret_debug;a._hasCaretEvents||(nt=function(){var e=[],t;if(l(c(V.getStart()),e))for(t=e.length;t--;)W.setAttrib(e[t],"data-mce-bogus","1")},tt=function(e){var t=e.keyCode;d(),(8=
=t||37==t||39==t)&&d(c(V.getStart())),m()},a.on("SetContent",function(e){e.selection&&m()}),a._hasCaretEvents=!0),"apply"==t?p():h()}function F(t){var n=t.startContainer,r=t.startOffset,i,o,a,s,l;if(3==n.nodeType&&r>=n.nodeValue.length&&(r=K(n),n=n.parentNode,i=!0),1==n.nodeType)for(s=n.childNodes,n=s[Math.min(r,s.length-1)],o=new e(n,W.getParent(n,W.isBlock)),(r>s.length-1||i)&&o.next(),a=o.current();a;a=o.next())if(3==a.nodeType&&!A(a))return l=W.create("a",{"data-mce-bogus":"all"},Y),a.parentNode.insertBefore(l,a),t.setStart(a,0),V.setRng(t),void W.remove(l)}var z={},W=a.dom,V=a.selection,U=new t(W),$=a.schema.isValidChild,q=W.isBlock,j=a.settings.forced_root_block,K=W.nodeIndex,Y="\ufeff",G=/^(src|href|style)$/,X=!1,J=!0,Q,Z,et=W.getContentEditable,tt,nt,rt=n.isBookmarkNode,it=i.each,ot=i.grep,at=i.walk,st=i.extend;st(this,{get:f,register:p,apply:g,remove:v,toggle:y,
match:C,matchAll:x,matchNode:b,canApply:w,formatChanged:_,getCssText:E}),u(),d(),a.on("BeforeGetContent",function(){nt&&nt()}),a.on("mouseup keydown",function(e){tt&&tt(e)})}}),r(I,[d,u,N],function(e,t,n){var r=t.trim,i;return i=new RegExp(["<span[^>]+data-mce-bogus[^>]+>[\u200b\ufeff]+<\\/span>",'\\s?data-mce-selected="[^"]+"'].join("|"),"gi"),function(t){function o(){var e=r(t.getContent({format:"raw",no_events:1})),o=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,a,s,l,c,u,d=t.schema;for(e=e.replace(i,""),u=d.getShortEndedElements();c=o.exec(e);)s=o.lastIndex,l=c[0].length,a=u[c[1]]?s:n.findEndTag(d,e,s),e=e.substring(0,s-l)+e.substring(a),o.lastIndex=s-l;return e}function a(e){s.typing=!1,s.add({},e)}var s=this,l=0,c=[],u,d,f=0;return t.on("init",function(){s.add()}),t.on("BeforeExecCommand",function(e){var t=e.command;"
Undo"!=t&&"Redo"!=t&&"mceRepaint"!=t&&s.beforeChange()}),t.on("ExecCommand",function(e){var t=e.command;"Undo"!=t&&"Redo"!=t&&"mceRepaint"!=t&&a(e)}),t.on("ObjectResizeStart",function(){s.beforeChange()}),t.on("SaveContent ObjectResized blur",a),t.on("DragEnd",a),t.on("KeyUp",function(n){var r=n.keyCode;(r>=33&&36>=r||r>=37&&40>=r||45==r||13==r||n.ctrlKey)&&(a(),t.nodeChanged()),(46==r||8==r||e.mac&&(91==r||93==r))&&t.nodeChanged(),d&&s.typing&&(t.isDirty()||(t.isNotDirty=!c[0]||o()==c[0].content,t.isNotDirty||t.fire("change",{level:c[0],lastLevel:null})),t.fire("TypingUndo"),d=!1,t.nodeChanged())}),t.on("KeyDown",function(e){var t=e.keyCode;return t>=33&&36>=t||t>=37&&40>=t||45==t?void(s.typing&&a(e)
):void((16>t||t>20)&&224!=t&&91!=t&&!s.typing&&(s.beforeChange(),s.typing=!0,s.add({},e),d=!0))}),t.on("MouseDown",function(e){s.typing&&a(e)}),t.addShortcut("ctrl+z","","Undo"),t.addShortcut("ctrl+y,ctrl+shift+z","","Redo"),t.on("AddUndo Undo Redo ClearUndos",function(e){e.isDefaultPrevented()||t.nodeChanged()}),s={data:c,typing:!1,beforeChange:function(){f||(u=t.selection.getBookmark(2,!0))},add:function(e,n){var r,i=t.settings,a;if(e=e||{},e.content=o(),f||t.removed)return null;if(a=c[l],t.fire("BeforeAddUndo",{level:e,lastLevel:a,originalEvent:n}).isDefaultPrevented())return null;if(a&&a.content==e.content)return null;if(c[l]&&(c[l].beforeBookmark=u),i.custom_undo_redo_levels&&c.length>i.custom_undo_redo_levels){for(r=0;r<c.length-1;r++)c[r]=c[r+1];c.length--,l=c.length}e.bookmark=t.selection.getBookmark(2,!0),l<
c.length-1&&(c.length=l+1),c.push(e),l=c.length-1;var s={level:e,lastLevel:a,originalEvent:n};return t.fire("AddUndo",s),l>0&&(t.isNotDirty=!1,t.fire("change",s)),e},undo:function(){var e;return s.typing&&(s.add(),s.typing=!1),l>0&&(e=c[--l],0===l&&(t.isNotDirty=!0),t.setContent(e.content,{format:"raw"}),t.selection.moveToBookmark(e.beforeBookmark),t.fire("undo",{level:e})),e},redo:function(){var e;return l<c.length-1&&(e=c[++l],t.setContent(e.content,{format:"raw"}),t.selection.moveToBookmark(e.bookmark),t.fire("redo",{level:e})),e},clear:function(){c=[],l=0,s.typing=!1,t.fire("ClearUndos")},hasUndo:function(){return l>0||s.typing&&c[0]&&o()!=c[0].content},hasRedo:function(){return l<c.length-1&&!this.typing},transact:function(e){s.beforeChange();try{f++,e()}finally{f--}s.add()}}}}),r(F,[h,x,d],function(e,t,n){var r=n.ie&&a
mp;n.ie<11;return function(i){function o(o){function f(e){return e&&a.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&!/^(fixed|absolute)/i.test(e.style.position)&&"true"!==a.getContentEditable(e)}function p(e){var t;a.isBlock(e)&&(t=s.getRng(),e.appendChild(a.create("span",null,"\xa0")),s.select(e),e.lastChild.outerHTML="",s.setRng(t))}function h(e){var t=e,n=[],r;if(t){for(;t=t.firstChild;){if(a.isBlock(t))return;1!=t.nodeType||d[t.nodeName.toLowerCase()]||n.push(t)}for(r=n.length;r--;)t=n[r],!t.hasChildNodes()||t.firstChild==t.lastChild&&""===t.firstChild.nodeValue?a.remove(t):"A"==t.nodeName&&" "===(t.innerText||t.textContent)&&a.remove(t)}}function m(t){function r(e){for(;e;){if(1==e.nodeType||3==e.nodeType&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}}var i,o,l,c=t,u;if(t){if(n.ie&&n.ie<9&&a
mp;A&&A.firstChild&&A.firstChild==A.lastChild&&"BR"==A.firstChild.tagName&&a.remove(A.firstChild),/^(LI|DT|DD)$/.test(t.nodeName)){var f=r(t.firstChild);f&&/^(UL|OL|DL)$/.test(f.nodeName)&&t.insertBefore(a.doc.createTextNode("\xa0"),t.firstChild)}if(l=a.createRng(),n.ie||t.normalize(),t.hasChildNodes()){for(i=new e(t,t);o=i.current();){if(3==o.nodeType){l.setStart(o,0),l.setEnd(o,0);break}if(d[o.nodeName.toLowerCase()]){l.setStartBefore(o),l.setEndBefore(o);break}c=o,o=i.next()}o||(l.setStart(c,0),l.setEnd(c,0))}else"BR"==t.nodeName?t.nextSibling&&a.isBlock(t.nextSibling)?((!B||9>B)&&(u=a.create("br"),t.parentNode.insertBefore(u,t)),l.setStartBefore(t),l.setEndBefore(t)):(l.setStartAfter(t),l.setEndAfter(t)):(l.setStart(t,0),l.setEnd(t,0));s.setRng(l),a.remove(u),s.scrollIntoView(t)}}function g(e){var t=l.forced_root_block;t&&t.toLowerCase()===e.tagName.toLowerCase()&am
p;&a.setAttribs(e,l.forced_root_block_attrs)}function v(e){var t=T,n,i,o,s=u.getTextInlineElements();if(e||"TABLE"==P?(n=a.create(e||I),g(n)):n=A.cloneNode(!1),o=n,l.keep_styles!==!1)do if(s[t.nodeName]){if("_mce_caret"==t.id)continue;i=t.cloneNode(!1),a.setAttrib(i,"id",""),n.hasChildNodes()?(i.appendChild(n.firstChild),n.appendChild(i)):(o=i,n.appendChild(i))}while(t=t.parentNode);return r||(o.innerHTML='<br data-mce-bogus="1">'),n}function y(t){var n,r,i;if(3==T.nodeType&&(t?R>0:R<T.nodeValue.length))return!1;if(T.parentNode==A&&F&&!t)return!0;if(t&&1==T.nodeType&&T==A.firstChild)return!0;if("TABLE"===T.nodeName||T.previousSibling&&"TABLE"==T.previousSibling.nodeName)return F&&!t||!F&&t;for(n=new e(T,A),3==T.nodeType&&(t&&0===R?n.prev():t||R!=T.nodeValue.length||n.next());r=n.current();){if(1===r.nodeType){if(!r.getA
ttribute("data-mce-bogus")&&(i=r.nodeName.toLowerCase(),d[i]&&"br"!==i))return!1}else if(3===r.nodeType&&!/^[ \t\r\n]*$/.test(r.nodeValue))return!1;t?n.prev():n.next()}return!0}function b(e,t){var n,r,o,s,l,c,d=I||"P";if(r=a.getParent(e,a.isBlock),c=i.getBody().nodeName.toLowerCase(),!r||!f(r)){if(r=r||S,!r.hasChildNodes())return n=a.create(d),g(n),r.appendChild(n),N.setStart(n,0),N.setEnd(n,0),n;for(s=e;s.parentNode!=r;)s=s.parentNode;for(;s&&!a.isBlock(s);)o=s,s=s.previousSibling;if(o&&u.isValidChild(c,d.toLowerCase())){for(n=a.create(d),g(n),o.parentNode.insertBefore(n,o),s=o;s&&!a.isBlock(s);)l=s.nextSibling,n.appendChild(s),s=l;N.setStart(e,t),N.setEnd(e,t)}}return e}function C(){function e(e){for(var t=M[e?"firstChild":"lastChild"];t&&1!=t.nodeType;)t=t[e?"nextSibling":"previousSibling"];return t===A}function t(){var e=M.parentNode;return/^(LI|DT|DD)$/.
test(e.nodeName)?e:M}var n=M.parentNode.nodeName;/^(OL|UL|LI)$/.test(n)&&(I="LI"),L=I?v(I):a.create("BR"),e(!0)&&e()?"LI"==n?a.insertAfter(L,t()):a.replace(L,M):e(!0)?"LI"==n?(a.insertAfter(L,t()),L.appendChild(a.doc.createTextNode(" ")),L.appendChild(M)):M.parentNode.insertBefore(L,M):e()?(a.insertAfter(L,t()),p(L)):(M=t(),k=N.cloneRange(),k.setStartAfter(A),k.setEndAfter(M),H=k.extractContents(),"LI"==I&&"LI"==H.firstChild.nodeName?(L=H.firstChild,a.insertAfter(H,M)):(a.insertAfter(H,M),a.insertAfter(L,M))),a.remove(A),m(L),c.add()}function x(){i.execCommand("InsertLineBreak",!1,o)}function w(e){do 3===e.nodeType&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild;while(e)}function _(e){var t=a.getRoot(),n,r;for(n=e;n!==t&&"false"!==a.getContentEditable(n);)"true"===a.getContentEditable(n)&&(r=n),n=n.parentNode;r
eturn n!==t?r:t}function E(e){var t;r||(e.normalize(),t=e.lastChild,(!t||/^(left|right)$/gi.test(a.getStyle(t,"float",!0)))&&a.add(e,"br"))}var N,k,S,T,R,A,B,D,L,H,M,P,O,I,F;if(N=s.getRng(!0),!o.isDefaultPrevented()){if(!N.collapsed)return void i.execCommand("Delete");if(new t(a).normalize(N),T=N.startContainer,R=N.startOffset,I=(l.force_p_newlines?"p":"")||l.forced_root_block,I=I?I.toUpperCase():"",B=a.doc.documentMode,D=o.shiftKey,1==T.nodeType&&T.hasChildNodes()&&(F=R>T.childNodes.length-1,T=T.childNodes[Math.min(R,T.childNodes.length-1)]||T,R=F&&3==T.nodeType?T.nodeValue.length:0),S=_(T)){if(c.beforeChange(),!a.isBlock(S)&&S!=a.getRoot())return void((!I||D)&&x());if((I&&!D||!I&&D)&&(T=b(T,R)),A=a.getParent(T,a.isBlock),M=A?a.getParent(A.parentNode,a.isBlock):null,P=A?A.nodeName.toUpperCase():"",O=M?M.nodeName.toUpperCase():"",
"LI"!=O||o.ctrlKey||(A=M,P=O),/^(LI|DT|DD)$/.test(P)){if(!I&&D)return void x();if(a.isEmpty(A))return void C()}if("PRE"==P&&l.br_in_pre!==!1){if(!D)return void x()}else if(!I&&!D&&"LI"!=P||I&&D)return void x();I&&A===i.getBody()||(I=I||"P",y()?(L=/^(H[1-6]|PRE|FIGURE)$/.test(P)&&"HGROUP"!=O?v(I):v(),l.end_container_on_empty_block&&f(M)&&a.isEmpty(A)?L=a.split(M,A):a.insertAfter(L,A),m(L)):y(!0)?(L=A.parentNode.insertBefore(v(),A),p(L),m(A)):(k=N.cloneRange(),k.setEndAfter(A),H=k.extractContents(),w(H),L=H.firstChild,a.insertAfter(H,A),h(L),E(A),m(L)),a.setAttrib(L,"id",""),i.fire("NewBlock",{newBlock:L}),c.add())}}}var a=i.dom,s=i.selection,l=i.settings,c=i.undoManager,u=i.schema,d=u.getNonEmptyElements();i.on("keydown",function(e){13==e.keyCode&&o(e)!==!1&&e.preventDefault()})}}),r(z,[],function(){return fu
nction(e){function t(){var t=i.getStart(),s=e.getBody(),l,c,u,d,f,p,h,m=-16777215,g,v,y,b,C;if(C=n.forced_root_block,t&&1===t.nodeType&&C){for(;t&&t!=s;){if(a[t.nodeName])return;t=t.parentNode}if(l=i.getRng(),l.setStart){c=l.startContainer,u=l.startOffset,d=l.endContainer,f=l.endOffset;try{v=e.getDoc().activeElement===s}catch(x){}}else l.item&&(t=l.item(0),l=e.getDoc().body.createTextRange(),l.moveToElementText(t)),v=l.parentElement().ownerDocument===e.getDoc(),y=l.duplicate(),y.collapse(!0),u=-1*y.move("character",m),y.collapsed||(y=l.duplicate(),y.collapse(!1),f=-1*y.move("character",m)-u);for(t=s.firstChild,b=s.nodeName.toLowerCase();t;)if((3===t.nodeType||1==t.nodeType&&!a[t.nodeName])&&o.isValidChild(b,C.toLowerCase())){if(3===t.nodeType&&0===t.nodeValue.length){h=t,t=t.nextSibling,r.remove(h);continue}p||(p=r.create(C,e.settings.forced_root_block_attrs),t.parentNode.insertBefore(p,t),g=!0),h=t,t=t.next
Sibling,p.appendChild(h)}else p=null,t=t.nextSibling;if(g&&v){if(l.setStart)l.setStart(c,u),l.setEnd(d,f),i.setRng(l);else try{l=e.getDoc().body.createTextRange(),l.moveToElementText(s),l.collapse(!0),l.moveStart("character",u),f>0&&l.moveEnd("character",f),l.select()}catch(x){}e.nodeChanged()}}}var n=e.settings,r=e.dom,i=e.selection,o=e.schema,a=o.getBlockElements();n.forced_root_block&&e.on("NodeChange",t)}}),r(W,[T,d,u,M,x,h],function(e,n,r,i,o,a){var s=r.each,l=r.extend,c=r.map,u=r.inArray,d=r.explode,f=n.gecko,p=n.ie,h=n.ie&&n.ie<11,m=!0,g=!1;return function(r){function v(e,t,n){var r;return e=e.toLowerCase(),(r=T.exec[e])?(r(e,t,n),m):g}function y(e){var t;return e=e.toLowerCase(),(t=T.state[e])?t(e):-1}function b(e){var t;return e=e.toLowerCase(),(t=T.value[e])?t(e):g}function C(e,t){t=t||"exec",s(e,function(e,n){s(n.toLowerCase().split(","),function(n){T[t][n]=e})})}function x(e,n,i){retu
rn n===t&&(n=g),i===t&&(i=null),r.getDoc().execCommand(e,n,i)}function w(e){return A.match(e)}function _(e,n){A.toggle(e,n?{value:n}:t),r.nodeChanged()}function E(e){B=S.getBookmark(e)}function N(){S.moveToBookmark(B)}var k=r.dom,S=r.selection,T={state:{},exec:{},value:{}},R=r.settings,A=r.formatter,B;l(this,{execCommand:v,queryCommandState:y,queryCommandValue:b,addCommands:C}),C({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){r.undoManager.add()},"Cut,Copy,Paste":function(e){var t=r.getDoc(),i;try{x(e)}catch(o){i=m}if(i||!t.queryCommandSupported(e)){var a=r.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");n.mac&&(a=a.replace(/Ctrl\+/g,"\u2318+")),r.windowManager.alert(a)}},unlink:function(){if(S.isCollapsed()){var e=S.getNode();return void("A"==e.tagName&&r.dom.rem
ove(e,!0))}A.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var t=e.substring(7);"full"==t&&(t="justify"),s("left,center,right,justify".split(","),function(e){t!=e&&A.remove("align"+e)}),_("align"+t),v("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(e){var t,n;x(e),t=k.getParent(S.getNode(),"ol,ul"),t&&(n=t.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName)&&(E(),k.split(n,t),N()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){_(e)},"ForeColor,HiliteColor,FontName":function(e,t,n){_(e,n)},FontSize:function(e,t,n){var r,i;n>=1&&7>=n&&(i=d(R.font_size_style_values),r=d(R.font_size_classes),n=r?r[n-1]||n:i[n-1]||n),_(e,n)},RemoveFormat:function(e){A.remove(e)},mceBlockQuote:function(){_("blockquote")},FormatBlock:fu
nction(e,t,n){return _(n||"p")},mceCleanup:function(){var e=S.getBookmark();r.setContent(r.getContent({cleanup:m}),{cleanup:m}),S.moveToBookmark(e)},mceRemoveNode:function(e,t,n){var i=n||S.getNode();i!=r.getBody()&&(E(),r.dom.remove(i,m),N())},mceSelectNodeDepth:function(e,t,n){var i=0;k.getParent(S.getNode(),function(e){return 1==e.nodeType&&i++==n?(S.select(e),g):void 0},r.getBody())},mceSelectNode:function(e,t,n){S.select(n)},mceInsertContent:function(t,n,o){function a(e){function t(e){return r[e]&&3==r[e].nodeType}var n,r,i;return n=S.getRng(!0),r=n.startContainer,i=n.startOffset,3==r.nodeType&&(i>0?e=e.replace(/^ /," "):t("previousSibling")||(e=e.replace(/^ /," ")),i<r.length?e=e.replace(/ (<br>|)$/," "):t("nextSibling")||(e=e.replace(/( | )(<br>|)$/," "))),e}function l(e){if(w)for(b=e.firstChild;b;b=b.walk(!0))_[b
.name]&&b.attr("data-mce-new","true")}function c(){if(w){var e=r.getBody(),t=new i(k);s(k.select("*[data-mce-new]"),function(n){n.removeAttribute("data-mce-new");for(var r=n.parentNode;r&&r!=e;r=r.parentNode)t.compare(r,n)&&k.remove(n,!0)})}}var u,d,f,h,m,g,v,y,b,C,x,w,_=r.schema.getTextInlineElements();"string"!=typeof o&&(w=o.merge,o=o.content),/^ | $/.test(o)&&(o=a(o)),u=r.parser,d=new e({},r.schema),x='<span id="mce_marker" data-mce-type="bookmark">ÈB;</span>',g={content:o,format:"html",selection:!0},r.fire("BeforeSetContent",g),o=g.content,-1==o.indexOf("{$caret}")&&(o+="{$caret}"),o=o.replace(/\{\$caret\}/,x),y=S.getRng();var E=y.startContainer||(y.parentElement?y.parentElement():null),N=r.getBody();E===N&&S.isCollapsed()&&k.isBlock(N.firstChild)&&k.isEmpty(N.firstCh
ild)&&(y=k.createRng(),y.setStart(N.firstChild,0),y.setEnd(N.firstChild,0),S.setRng(y)),S.isCollapsed()||r.getDoc().execCommand("Delete",!1,null),f=S.getNode();var T={context:f.nodeName.toLowerCase()};
+if(m=u.parse(o,T),l(m),b=m.lastChild,"mce_marker"==b.attr("id"))for(v=b,b=b.prev;b;b=b.walk(!0))if(3==b.type||!k.isBlock(b.name)){b.parent.insert(v,b,"br"===b.name);break}if(T.invalid){for(S.setContent(x),f=S.getNode(),h=r.getBody(),9==f.nodeType?f=b=h:b=f;b!==h;)f=b,b=b.parentNode;o=f==h?h.innerHTML:k.getOuterHTML(f),o=d.serialize(u.parse(o.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return d.serialize(m)}))),f==h?k.setHTML(h,o):k.setOuterHTML(f,o)}else o=d.serialize(m),b=f.firstChild,C=f.lastChild,!b||b===C&&"BR"===b.nodeName?k.setHTML(f,o):S.setContent(o);c(),v=k.get("mce_marker"),S.scrollIntoView(v),y=k.createRng(),b=v.previousSibling,b&&3==b.nodeType?(y.setStart(b,b.nodeValue.length),p||(C=v.nextSibling,C&&3==C.nodeType&&(b.appendData(C.data),C.parentNode.removeChild(C)))):(y.setStartBefore(v),y.setEndBefore(v)),k.remove(v),S.setRng(y),r.fire("Set
Content",g),r.addVisual()},mceInsertRawHTML:function(e,t,n){S.setContent("tiny_mce_marker"),r.setContent(r.getContent().replace(/tiny_mce_marker/g,function(){return n}))},mceToggleFormat:function(e,t,n){_(n)},mceSetContent:function(e,t,n){r.setContent(n)},"Indent,Outdent":function(e){var t,n,i;t=R.indentation,n=/[a-z%]+$/i.exec(t),t=parseInt(t,10),y("InsertUnorderedList")||y("InsertOrderedList")?x(e):(R.forced_root_block||k.getParent(S.getNode(),k.isBlock)||A.apply("div"),s(S.getSelectedBlocks(),function(o){if("LI"!=o.nodeName){var a=r.getParam("indent_use_margin",!1)?"margin":"padding";a+="rtl"==k.getStyle(o,"direction",!0)?"Right":"Left","outdent"==e?(i=Math.max(0,parseInt(o.style[a]||0,10)-t),k.setStyle(o,a,i?i+n:"")):(i=parseInt(o.style[a]||0,10)+t+n,k.setStyle(o,a,i))}}))},mceRepaint:function(){if(f)try{E(m),S.getSel()&&a
mp;S.getSel().selectAllChildren(r.getBody()),S.collapse(m),N()}catch(e){}},InsertHorizontalRule:function(){r.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){r.hasVisual=!r.hasVisual,r.addVisual()},mceReplaceContent:function(e,t,n){r.execCommand("mceInsertContent",!1,n.replace(/\{\$selection\}/g,S.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;"string"==typeof n&&(n={href:n}),r=k.getParent(S.getNode(),"a"),n.href=n.href.replace(" ","%20"),r&&n.href||A.remove("link"),n.href&&A.apply("link",n,r)},selectAll:function(){var e=k.getRoot(),t;S.getRng().setStart?(t=k.createRng(),t.setStart(e,0),t.setEnd(e,e.childNodes.length),S.setRng(t)):(t=S.getRng(),t.item||(t.moveToElementText(e),t.select()))},"delete":function(){x("Delete");var e=r.getBody();k.isEmpty(e)&&(r.setContent(""),e.
firstChild&&k.isBlock(e.firstChild)?r.selection.setCursorLocation(e.firstChild,0):r.selection.setCursorLocation(e,0))},mceNewDocument:function(){r.setContent("")},InsertLineBreak:function(e,t,n){function i(){for(var e=new a(p,v),t,n=r.schema.getNonEmptyElements();t=e.next();)if(n[t.nodeName.toLowerCase()]||t.length>0)return!0}var s=n,l,c,u,d=S.getRng(!0);new o(k).normalize(d);var f=d.startOffset,p=d.startContainer;if(1==p.nodeType&&p.hasChildNodes()){var g=f>p.childNodes.length-1;p=p.childNodes[Math.min(f,p.childNodes.length-1)]||p,f=g&&3==p.nodeType?p.nodeValue.length:0}var v=k.getParent(p,k.isBlock),y=v?v.nodeName.toUpperCase():"",b=v?k.getParent(v.parentNode,k.isBlock):null,C=b?b.nodeName.toUpperCase():"",x=s&&s.ctrlKey;"LI"!=C||x||(v=b,y=C),p&&3==p.nodeType&&f>=p.nodeValue.length&&(h||i()||(l=k.create("br"),d.insertNode(l),d.setStartAfter(l),d.setEndAfter(l),c=!0)),
l=k.create("br"),d.insertNode(l);var w=k.doc.documentMode;return h&&"PRE"==y&&(!w||8>w)&&l.parentNode.insertBefore(k.doc.createTextNode("\r"),l),u=k.create("span",{}," "),l.parentNode.insertBefore(u,l),S.scrollIntoView(u),k.remove(u),c?(d.setStartBefore(l),d.setEndBefore(l)):(d.setStartAfter(l),d.setEndAfter(l)),S.setRng(d),r.undoManager.add(),m}}),C({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var t="align"+e.substring(7),n=S.isCollapsed()?[k.getParent(S.getNode(),k.isBlock)]:S.getSelectedBlocks(),r=c(n,function(e){return!!A.matchNode(e,t)});return-1!==u(r,m)},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return w(e)},mceBlockQuote:function(){return w("blockquote")},Outdent:function(){var e;if(R.inline_styles){if((e=k.getParent(S.getStart(),k.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return m;if((
e=k.getParent(S.getEnd(),k.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return m}return y("InsertUnorderedList")||y("InsertOrderedList")||!R.inline_styles&&!!k.getParent(S.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(e){var t=k.getParent(S.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),C({"FontSize,FontName":function(e){var t=0,n;return(n=k.getParent(S.getNode(),"span"))&&(t="fontsize"==e?n.style.fontSize:n.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()),t}},"value"),C({Undo:function(){r.undoManager.undo()},Redo:function(){r.undoManager.redo()}})}}),r(V,[u],function(e){function t(e,o){var a=this,s,l;if(e=r(e),o=a.settings=o||{},s=o.base
_uri,/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))return void(a.source=e);var c=0===e.indexOf("//");0!==e.indexOf("/")||c||(e=(s?s.protocol||"http":"http")+"://mce_host"+e),/^[\w\-]*:?\/\//.test(e)||(l=o.base_uri?o.base_uri.path:new t(location.href).directory,""===o.base_uri.protocol?e="//mce_host"+a.toAbsPath(l,e):(e=/([^#?]*)([#?]?.*)/.exec(e),e=(s&&s.protocol||"http")+"://mce_host"+a.toAbsPath(l,e[1])+e[2])),e=e.replace(/@@/g,"(mce_at)"),e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e),n(i,function(t,n){var r=e[n];r&&(r=r.replace(/\(mce_at\)/g,"@@")),a[t]=r}),s&&(a.protocol||(a.protocol=s.protocol),a.userInfo||(a.userInfo=s.userInfo),a.port||"mce_host"!==a.host||(a.port=s.port),a.
host&&"mce_host"!==a.host||(a.host=s.host),a.source=""),c&&(a.protocol="")}var n=e.each,r=e.trim,i="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),o={ftp:21,http:80,https:443,mailto:25};return t.prototype={setPath:function(e){var t=this;e=/^(.*?)\/?(\w+)?$/.exec(e),t.path=e[0],t.directory=e[1],t.file=e[2],t.source="",t.getURI()},toRelative:function(e){var n=this,r;if("./"===e)return e;if(e=new t(e,{base_uri:n}),"mce_host"!=e.host&&n.host!=e.host&&e.host||n.port!=e.port||n.protocol!=e.protocol&&""!==e.protocol)return e.getURI();var i=n.getURI(),o=e.getURI();return i==o||"/"==i.charAt(i.length-1)&&i.substr(0,i.length-1)==o?i:(r=n.toRelPath(n.path,e.path),e.query&&(r+="?"+e.query),e.anchor&&(r+="#"+e.anchor),r)},toAbsolute:function(e,n){ret
urn e=new t(e,{base_uri:this}),e.getURI(n&&this.isSameOrigin(e))},isSameOrigin:function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=o[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},toRelPath:function(e,t){var n,r=0,i="",o,a;if(e=e.substring(0,e.lastIndexOf("/")),e=e.split("/"),n=t.split("/"),e.length>=n.length)for(o=0,a=e.length;a>o;o++)if(o>=n.length||e[o]!=n[o]){r=o+1;break}if(e.length<n.length)for(o=0,a=n.length;a>o;o++)if(o>=e.length||e[o]!=n[o]){r=o+1;break}if(1===r)return t;for(o=0,a=e.length-(r-1);a>o;o++)i+="../";for(o=r-1,a=n.length;a>o;o++)i+=o!=r-1?"/"+n[o]:n[o];return i},toAbsPath:function(e,t){var r,i=0,o=[],a,s;for(a=/\/$/.test(t)?"/":"",e=e.split("/"),t=t.split("/"),n(e,function(e){e&&o.push(e)}),e=o,r=t.length-1,o=[];r>=0;r--)0!==t[r].length&&
amp;"."!==t[r]&&(".."!==t[r]?i>0?i--:o.push(t[r]):i++);return r=e.length-i,s=0>=r?o.reverse().join("/"):e.slice(0,r).join("/")+"/"+o.reverse().join("/"),0!==s.indexOf("/")&&(s="/"+s),a&&s.lastIndexOf("/")!==s.length-1&&(s+=a),s},getURI:function(e){var t,n=this;return(!n.source||e)&&(t="",e||(t+=n.protocol?n.protocol+"://":"//",n.userInfo&&(t+=n.userInfo+"@"),n.host&&(t+=n.host),n.port&&(t+=":"+n.port)),n.path&&(t+=n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),n.source=t),n.source}},t}),r(U,[u],function(e){function t(){}var n=e.each,r=e.extend,i,o;return t.extend=i=function(e){function t(){var e,t,n,r=this;if(!o&&(r.init&&r.init.apply(r,arguments),t=r.Mixins))for(e=t.length;e--;)n=t[e],n.init&&n
.init.apply(r,arguments)}function a(){return this}function s(e,t){return function(){var n=this,r=n._super,i;return n._super=c[e],i=t.apply(n,arguments),n._super=r,i}}var l=this,c=l.prototype,u,d,f;o=!0,u=new l,o=!1,e.Mixins&&(n(e.Mixins,function(t){t=t;for(var n in t)"init"!==n&&(e[n]=t[n])}),c.Mixins&&(e.Mixins=c.Mixins.concat(e.Mixins))),e.Methods&&n(e.Methods.split(","),function(t){e[t]=a}),e.Properties&&n(e.Properties.split(","),function(t){var n="_"+t;e[t]=function(e){var t=this,r;return e!==r?(t[n]=e,t):t[n]}}),e.Statics&&n(e.Statics,function(e,n){t[n]=e}),e.Defaults&&c.Defaults&&(e.Defaults=r({},c.Defaults,e.Defaults));for(d in e)f=e[d],u[d]="function"==typeof f&&c[d]?s(d,f):f;return t.prototype=u,t.constructor=t,t.extend=i,t},t}),r($,[u],function(e){function t(e){function t(){return!1}function n(){return!0}function r(r,i){var a,s,l,d;if(r=r.toLowerCase(),
i=i||{},i.type=r,i.target||(i.target=c),i.preventDefault||(i.preventDefault=function(){i.isDefaultPrevented=n},i.stopPropagation=function(){i.isPropagationStopped=n},i.stopImmediatePropagation=function(){i.isImmediatePropagationStopped=n},i.isDefaultPrevented=t,i.isPropagationStopped=t,i.isImmediatePropagationStopped=t),e.beforeFire&&e.beforeFire(i),a=u[r])for(s=0,l=a.length;l>s;s++){if(a[s]=d=a[s],d.once&&o(r,d),i.isImmediatePropagationStopped())return i.stopPropagation(),i;if(d.call(c,i)===!1)return i.preventDefault(),i}return i}function i(e,n,r){var i,o,a;if(n===!1&&(n=t),n)for(o=e.toLowerCase().split(" "),a=o.length;a--;)e=o[a],i=u[e],i||(i=u[e]=[],d(e,!0)),r?i.unshift(n):i.push(n);return l}function o(e,t){var n,r,i,o,a;if(e)for(o=e.toLowerCase().split(" "),n=o.length;n--;){if(e=o[n],r=u[e],!e){for(i in u)d(i,!1),delete u[i];return l}if(r){if(t)for(a=r.length;a--;)r[a]===t&&(r=r.slice(0,a).concat(r.slice(a+1)),u[e]=r);else r
.length=0;r.length||(d(e,!1),delete u[e])}}else{for(e in u)d(e,!1);u={}}return l}function a(e,t,n){return t.once=!0,i(e,t,n)}function s(e){return e=e.toLowerCase(),!(!u[e]||0===u[e].length)}var l=this,c,u={},d;e=e||{},c=e.scope||l,d=e.toggleEvent||t,l.fire=r,l.on=i,l.off=o,l.once=a,l.has=s}var n=e.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate"," ");return t.isNative=function(e){return!!n[e.toLowerCase()]},t}),r(q,[U],function(e){function t(e){for(var t=[],n=e.length,r;n--;)r=e[n],r.__checked||(t.push(r),r.__checked=1);for(n=t.length;n--;)delete t[n].__checked;return t}var n=/^([\w\\*]+)?(?:#([\w\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i,r=/((?:\((?:
\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i=/^\s*|\s*$/g,o,a=e.extend({init:function(e){function t(e){return e?(e=e.toLowerCase(),function(t){return"*"===e||t.type===e}):void 0}function o(e){return e?function(t){return t._name===e}:void 0}function a(e){return e?(e=e.split("."),function(t){for(var n=e.length;n--;)if(!t.hasClass(e[n]))return!1;return!0}):void 0}function s(e,t,n){return e?function(r){var i=r[e]?r[e]():"";return t?"="===t?i===n:"*="===t?i.indexOf(n)>=0:"~="===t?(" "+i+" ").indexOf(" "+n+" ")>=0:"!="===t?i!=n:"^="===t?0===i.indexOf(n):"$="===t?i.substr(i.length-n.length)===n:!1:!!n}:void 0}function l(e){var t;return e?(e=/(?:not\((.+)\))|(.+)/i.exec(e),e[1]?(t=u(e[1],[]),function(e){return!d(e,t)}):(e=e[2],function(t,n,r){return&qu
ot;first"===e?0===n:"last"===e?n===r-1:"even"===e?n%2===0:"odd"===e?n%2===1:t[e]?t[e]():!1})):void 0}function c(e,r,c){function u(e){e&&r.push(e)}var d;return d=n.exec(e.replace(i,"")),u(t(d[1])),u(o(d[2])),u(a(d[3])),u(s(d[4],d[5],d[6])),u(l(d[7])),r.psuedo=!!d[7],r.direct=c,r}function u(e,t){var n=[],i,o,a;do if(r.exec(""),o=r.exec(e),o&&(e=o[3],n.push(o[1]),o[2])){i=o[3];break}while(o);for(i&&u(i,t),e=[],a=0;a<n.length;a++)">"!=n[a]&&e.push(c(n[a],[],">"===n[a-1]));return t.push(e),t}var d=this.match;this._selectors=u(e,[])},match:function(e,t){var n,r,i,o,a,s,l,c,u,d,f,p,h;for(t=t||this._selectors,n=0,r=t.length;r>n;n++){for(a=t[n],o=a.length,h=e,p=0,i=o-1;i>=0;i--)for(c=a[i];h;){if(c.psuedo)for(f=h.parent().items(),u=d=f.length;u--&&f[u]!==h;);for(s=0,l=c.length;l>s;s++)if(!c[s](h,u,d)){s=l+1;break}if(s===l){p++;break}if(i===o-1)break;h=h.parent()
}if(p===o)return!0}return!1},find:function(e){function n(e,t,i){var o,a,s,l,c,u=t[i];for(o=0,a=e.length;a>o;o++){for(c=e[o],s=0,l=u.length;l>s;s++)if(!u[s](c,o,a)){s=l+1;break}if(s===l)i==t.length-1?r.push(c):c.items&&n(c.items(),t,i+1);else if(u.direct)return;c.items&&n(c.items(),t,i)}}var r=[],i,s,l=this._selectors;if(e.items){for(i=0,s=l.length;s>i;i++)n(e.items(),l[i],0);s>1&&(r=t(r))}return o||(o=a.Collection),new o(r)}});return a}),r(j,[u,q,U],function(e,t,n){var r,i,o=Array.prototype.push,a=Array.prototype.slice;return i={length:0,init:function(e){e&&this.add(e)},add:function(t){var n=this;return e.isArray(t)?o.apply(n,t):t instanceof r?n.add(t.toArray()):o.call(n,t),n},set:function(e){var t=this,n=t.length,r;for(t.length=0,t.add(e),r=t.length;n>r;r++)delete t[r];return t},filter:function(e){var n=this,i,o,a=[],s,l;for("string"==typeof e?(e=new t(e),l=function(t){return e.match(t)}):l=e,i=0,o=n.length;o>i;i++)s=n[i],
l(s)&&a.push(s);return new r(a)},slice:function(){return new r(a.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},each:function(t){return e.each(this,t),this},toArray:function(){return e.toArray(this)},indexOf:function(e){for(var t=this,n=t.length;n--&&t[n]!==e;);return n},reverse:function(){return new r(e.toArray(this).reverse())},hasClass:function(e){return this[0]?this[0].hasClass(e):!1},prop:function(e,t){var n=this,r,i;return t!==r?(n.each(function(n){n[e]&&n[e](t)}),n):(i=n[0],i&&i[e]?i[e]():void 0)},exec:function(t){var n=this,r=e.toArray(arguments).slice(1);return n.each(function(e){e[t]&&e[t].apply(e,r)}),n},remove:function(){for(var e=this.length;e--;)this[e].remove();return this}},e.each("fire on off show hide addClass removeClass append prepend before after reflow".split(" "),function(t){i[t]=function(){var n=e.toArray(arguments);return this.each(function(e){t in e&&e
[t].apply(e,n)}),this}}),e.each("text name disabled active selected checked visible parent value data".split(" "),function(e){i[e]=function(t){return this.prop(e,t)}}),r=n.extend(i),t.Collection=r,r}),r(K,[u,y],function(e,t){var n=0;return{id:function(){return"mceu_"+n++},createFragment:function(e){return t.DOM.createFragment(e)},getWindowSize:function(){return t.DOM.getViewPort()},getSize:function(e){var t,n;if(e.getBoundingClientRect){var r=e.getBoundingClientRect();t=Math.max(r.width||r.right-r.left,e.offsetWidth),n=Math.max(r.height||r.bottom-r.bottom,e.offsetHeight)}else t=e.offsetWidth,n=e.offsetHeight;return{width:t,height:n}},getPos:function(e,n){return t.DOM.getPos(e,n)},getViewPort:function(e){return t.DOM.getViewPort(e)},get:function(e){return document.getElementById(e)},addClass:function(e,n){return t.DOM.addClass(e,n)},removeClass:function(e,n){return t.DOM.removeClass(e,n)},hasClass:function(e,n){return t.DOM.hasClass(e,n)},toggleClass:fun
ction(e,n,r){return t.DOM.toggleClass(e,n,r)},css:function(e,n,r){return t.DOM.setStyle(e,n,r)},on:function(e,n,r,i){return t.DOM.bind(e,n,r,i)},off:function(e,n,r){return t.DOM.unbind(e,n,r)},fire:function(e,n,r){return t.DOM.fire(e,n,r)},innerHtml:function(e,n){t.DOM.setHTML(e,n)}}}),r(Y,[U,u,$,j,K],function(e,t,n,r,i){function o(e){return e._eventDispatcher||(e._eventDispatcher=new n({scope:e,toggleEvent:function(t,r){r&&n.isNative(t)&&(e._nativeEvents||(e._nativeEvents={}),e._nativeEvents[t]=!0,e._rendered&&e.bindPendingEvents())}})),e._eventDispatcher}var a={},s="onmousewheel"in document,l=!1,c="mce-",u=e.extend({Statics:{elementIdCache:a,classPrefix:c},isRtl:function(){return u.rtl},classPrefix:c,init:function(e){var n=this,r,o;if(n.settings=e=t.extend({},n.Defaults,e),n._id=e.id||i.id(),n._text=n._name="",n._width=n._height=0,n._aria={role:e.role},r=e.classes)for(r=r.split(" "),r.map={},o=r.length;o--;)r.map[r[o]
]=!0;n._classes=r||[],n.visible(!0),t.each("title text width height name classes visible disabled active value".split(" "),function(t){var r=e[t],i;r!==i?n[t](r):n["_"+t]===i&&(n["_"+t]=!1)}),n.on("click",function(){return n.disabled()?!1:void 0}),e.classes&&t.each(e.classes.split(" "),function(e){n.addClass(e)}),n.settings=e,n._borderBox=n.parseBox(e.border),n._paddingBox=n.parseBox(e.padding),n._marginBox=n.parseBox(e.margin),e.hidden&&n.hide()},Properties:"parent,title,text,width,height,disabled,active,name,value",Methods:"renderHtml",getContainerElm:function(){return document.body},getParentCtrl:function(e){for(var t,n=this.getRoot().controlIdLookup;e&&n&&!(t=n[e.id]);)e=e.parentNode;return t},parseBox:function(e){var t,n=10;if(e)return"number"==typeof e?(e=e||0,{top:e,left:e,bottom:e,right:e}):(e=e.split(" "),t=e.length,1===t?e[1]=e[2]=e[3]
=e[0]:2===t?(e[2]=e[0],e[3]=e[1]):3===t&&(e[3]=e[1]),{top:parseInt(e[0],n)||0,right:parseInt(e[1],n)||0,bottom:parseInt(e[2],n)||0,left:parseInt(e[3],n)||0})},borderBox:function(){return this._borderBox},paddingBox:function(){return this._paddingBox},marginBox:function(){return this._marginBox},measureBox:function(e,t){function n(t){var n=document.defaultView;return n?(t=t.replace(/[A-Z]/g,function(e){return"-"+e}),n.getComputedStyle(e,null).getPropertyValue(t)):e.currentStyle[t]}function r(e){var t=parseFloat(n(e),10);return isNaN(t)?0:t}return{top:r(t+"TopWidth"),right:r(t+"RightWidth"),bottom:r(t+"BottomWidth"),left:r(t+"LeftWidth")}},initLayoutRect:function(){var e=this,t=e.settings,n,r,o=e.getEl(),a,s,l,c,u,d,f,p;n=e._borderBox=e._borderBox||e.measureBox(o,"border"),e._paddingBox=e._paddingBox||e.measureBox(o,"padding"),e._marginBox=e._marginBox||e.measureBox(o,"margin"),p=i.getSize(o),d=t.m
inWidth,f=t.minHeight,l=d||p.width,c=f||p.height,a=t.width,s=t.height,u=t.autoResize,u="undefined"!=typeof u?u:!a&&!s,a=a||l,s=s||c;var h=n.left+n.right,m=n.top+n.bottom,g=t.maxWidth||65535,v=t.maxHeight||65535;return e._layoutRect=r={x:t.x||0,y:t.y||0,w:a,h:s,deltaW:h,deltaH:m,contentW:a-h,contentH:s-m,innerW:a-h,innerH:s-m,startMinWidth:d||0,startMinHeight:f||0,minW:Math.min(l,g),minH:Math.min(c,v),maxW:g,maxH:v,autoResize:u,scrollW:0},e._lastLayoutRect={},r},layoutRect:function(e){var t=this,n=t._layoutRect,r,i,o,a,s,l;return n||(n=t.initLayoutRect()),e?(o=n.deltaW,a=n.deltaH,e.x!==s&&(n.x=e.x),e.y!==s&&(n.y=e.y),e.minW!==s&&(n.minW=e.minW),e.minH!==s&&(n.minH=e.minH),i=e.w,i!==s&&(i=i<n.minW?n.minW:i,i=i>n.maxW?n.maxW:i,n.w=i,n.innerW=i-o),i=e.h,i!==s&&(i=i<n.minH?n.minH:i,i=i>n.maxH?n.maxH:i,n.h=i,n.innerH=i-a),i=e.innerW,i!==s&&(i=i<n.minW-o?n.minW-o:i,i=i>n.maxW-o?n.maxW-o:i,n.innerW=i
,n.w=i+o),i=e.innerH,i!==s&&(i=i<n.minH-a?n.minH-a:i,i=i>n.maxH-a?n.maxH-a:i,n.innerH=i,n.h=i+a),e.contentW!==s&&(n.contentW=e.contentW),e.contentH!==s&&(n.contentH=e.contentH),r=t._lastLayoutRect,(r.x!==n.x||r.y!==n.y||r.w!==n.w||r.h!==n.h)&&(l=u.repaintControls,l&&l.map&&!l.map[t._id]&&(l.push(t),l.map[t._id]=!0),r.x=n.x,r.y=n.y,r.w=n.w,r.h=n.h),t):n},repaint:function(){var e=this,t,n,r,i,o=0,a=0,s,l;l=document.createRange?function(e){return e}:Math.round,t=e.getEl().style,r=e._layoutRect,s=e._lastRepaintRect||{},i=e._borderBox,o=i.left+i.right,a=i.top+i.bottom,r.x!==s.x&&(t.left=l(r.x)+"px",s.x=r.x),r.y!==s.y&&(t.top=l(r.y)+"px",s.y=r.y),r.w!==s.w&&(t.width=l(r.w-o)+"px",s.w=r.w),r.h!==s.h&&(t.height=l(r.h-a)+"px",s.h=r.h),e._hasBody&&r.innerW!==s.innerW&&(n=e.getEl("body").style,n.width=l(r.innerW)+"px",s.innerW
=r.innerW),e._hasBody&&r.innerH!==s.innerH&&(n=n||e.getEl("body").style,n.height=l(r.innerH)+"px",s.innerH=r.innerH),e._lastRepaintRect=s,e.fire("repaint",{},!1)},on:function(e,t){function n(e){var t,n;return"string"!=typeof e?e:function(i){return t||r.parentsAndSelf().each(function(r){var i=r.settings.callbacks;return i&&(t=i[e])?(n=r,!1):void 0}),t.call(n,i)}}var r=this;return o(r).on(e,n(t)),r},off:function(e,t){return o(this).off(e,t),this},fire:function(e,t,n){var r=this;if(t=t||{},t.control||(t.control=r),t=o(r).fire(e,t),n!==!1&&r.parent)for(var i=r.parent();i&&!t.isPropagationStopped();)i.fire(e,t,!1),i=i.parent();return t},hasEventListeners:function(e){return o(this).has(e)},parents:function(e){var t=this,n,i=new r;for(n=t.parent();n;n=n.parent())i.add(n);return e&&(i=i.filter(e)),i},parentsAndSelf:function(e){return new r(this).add(this.parents(e))},next:function(){var e=this.parent().i
tems();return e[e.indexOf(this)+1]},prev:function(){var e=this.parent().items();return e[e.indexOf(this)-1]},findCommonAncestor:function(e,t){for(var n;e;){for(n=t;n&&e!=n;)n=n.parent();if(e==n)break;e=e.parent()}return e},hasClass:function(e,t){var n=this._classes[t||"control"];return e=this.classPrefix+e,n&&!!n.map[e]},addClass:function(e,t){var n=this,r,i;return e=this.classPrefix+e,r=n._classes[t||"control"],r||(r=[],r.map={},n._classes[t||"control"]=r),r.map[e]||(r.map[e]=e,r.push(e),n._rendered&&(i=n.getEl(t),i&&(i.className=r.join(" ")))),n},removeClass:function(e,t){var n=this,r,i,o;if(e=this.classPrefix+e,r=n._classes[t||"control"],r&&r.map[e])for(delete r.map[e],i=r.length;i--;)r[i]===e&&r.splice(i,1);return n._rendered&&(o=n.getEl(t),o&&(o.className=r.join(" "))),n},toggleClass:function(e,t,n){var r=this;return t?r.addClass(e,n):r.removeClass(e,n),r}
,classes:function(e){var t=this._classes[e||"control"];return t?t.join(" "):""},innerHtml:function(e){return i.innerHtml(this.getEl(),e),this},getEl:function(e,t){var n,r=e?this._id+"-"+e:this._id;return n=a[r]=(t===!0?null:a[r])||i.get(r)},visible:function(e){var t=this,n;return"undefined"!=typeof e?(t._visible!==e&&(t._rendered&&(t.getEl().style.display=e?"":"none"),t._visible=e,n=t.parent(),n&&(n._lastRect=null),t.fire(e?"show":"hide")),t):t._visible},show:function(){return this.visible(!0)},hide:function(){return this.visible(!1)},focus:function(){try{this.getEl().focus()}catch(e){}return this},blur:function(){return this.getEl().blur(),this},aria:function(e,t){var n=this,r=n.getEl(n.ariaTarget);return"undefined"==typeof t?n._aria[e]:(n._aria[e]=t,n._rendered&&r.setAttribute("role"==e?e:"aria-"+e,t),n)},encode:function(e,t){retur
n t!==!1&&(e=this.translate(e)),(e||"").replace(/[&<>"]/g,function(e){return"&#"+e.charCodeAt(0)+";"})},translate:function(e){return u.translate?u.translate(e):e},before:function(e){var t=this,n=t.parent();return n&&n.insert(e,n.items().indexOf(t),!0),t},after:function(e){var t=this,n=t.parent();return n&&n.insert(e,n.items().indexOf(t)),t},remove:function(){var e=this,t=e.getEl(),n=e.parent(),r,o;if(e.items){var s=e.items().toArray();for(o=s.length;o--;)s[o].remove()}n&&n.items&&(r=[],n.items().each(function(t){t!==e&&r.push(t)}),n.items().set(r),n._lastRect=null),e._eventsRoot&&e._eventsRoot==e&&i.off(t);var l=e.getRoot().controlIdLookup;if(l&&delete l[e._id],delete a[e._id],t&&t.parentNode){var c=t.getElementsByTagName("*");for(o=c.length;o--;)delete a[c[o].id];t.parentNode.removeChild(t)}return e._rendered=!1,e},renderBefore:function(e){var t
=this;return e.parentNode.insertBefore(i.createFragment(t.renderHtml()),e),t.postRender(),t},renderTo:function(e){var t=this;return e=e||t.getContainerElm(),e.appendChild(i.createFragment(t.renderHtml())),t.postRender(),t},postRender:function(){var e=this,t=e.settings,n,r,o,a,s;for(a in t)0===a.indexOf("on")&&e.on(a.substr(2),t[a]);if(e._eventsRoot){for(o=e.parent();!s&&o;o=o.parent())s=o._eventsRoot;if(s)for(a in s._nativeEvents)e._nativeEvents[a]=!0}e.bindPendingEvents(),t.style&&(n=e.getEl(),n&&(n.setAttribute("style",t.style),n.style.cssText=t.style)),e._visible||i.css(e.getEl(),"display","none"),e.settings.border&&(r=e.borderBox(),i.css(e.getEl(),{"border-top-width":r.top,"border-right-width":r.right,"border-bottom-width":r.bottom,"border-left-width":r.left}));var l=e.getRoot();l.controlIdLookup||(l.controlIdLookup={}),l.controlIdLookup[e._id]=e;for(var c in e
._aria)e.aria(c,e._aria[c]);e.fire("postrender",{},!1)},scrollIntoView:function(e){function t(e,t){var n,r,i=e;for(n=r=0;i&&i!=t&&i.nodeType;)n+=i.offsetLeft||0,r+=i.offsetTop||0,i=i.offsetParent;return{x:n,y:r}}var n=this.getEl(),r=n.parentNode,i,o,a,s,l,c,u=t(n,r);return i=u.x,o=u.y,a=n.offsetWidth,s=n.offsetHeight,l=r.clientWidth,c=r.clientHeight,"end"==e?(i-=l-a,o-=c-s):"center"==e&&(i-=l/2-a/2,o-=c/2-s/2),r.scrollLeft=i,r.scrollTop=o,this},bindPendingEvents:function(){function e(e){var t=o.getParentCtrl(e.target);t&&t.fire(e.type,e)}function t(){var e=d._lastHoverCtrl;e&&(e.fire("mouseleave",{target:e.getEl()}),e.parents().each(function(e){e.fire("mouseleave",{target:e.getEl()})}),d._lastHoverCtrl=null)}function n(e){var t=o.getParentCtrl(e.target),n=d._lastHoverCtrl,r=0,i,a,s;if(t!==n){if(d._lastHoverCtrl=t,a=t.parents().toArray().reverse(),a.push(t),n){for(s=n.parents().toArray().reverse
(),s.push(n),r=0;r<s.length&&a[r]===s[r];r++);for(i=s.length-1;i>=r;i--)n=s[i],n.fire("mouseleave",{target:n.getEl()})}for(i=r;i<a.length;i++)t=a[i],t.fire("mouseenter",{target:t.getEl()})}}function r(e){e.preventDefault(),"mousewheel"==e.type?(e.deltaY=-1/40*e.wheelDelta,e.wheelDeltaX&&(e.deltaX=-1/40*e.wheelDeltaX)):(e.deltaX=0,e.deltaY=e.detail),e=o.fire("wheel",e)}var o=this,a,c,u,d,f,p;if(o._rendered=!0,f=o._nativeEvents){for(u=o.parents().toArray(),u.unshift(o),a=0,c=u.length;!d&&c>a;a++)d=u[a]._eventsRoot;for(d||(d=u[u.length-1]||o),o._eventsRoot=d,c=a,a=0;c>a;a++)u[a]._eventsRoot=d;var h=d._delegates;h||(h=d._delegates={});for(p in f){if(!f)return!1;"wheel"!==p||l?("mouseenter"===p||"mouseleave"===p?d._hasMouseEnter||(i.on(d.getEl(),"mouseleave",t),i.on(d.getEl(),"mouseover",n),d._hasMouseEnter=1):h[p]||(i.on(d.getEl(),p,e),h[p]=!0),f[p]=!1):s?i.on
(o.getEl(),"mousewheel",r):i.on(o.getEl(),"DOMMouseScroll",r)}}},getRoot:function(){for(var e=this,t,n=[];e;){if(e.rootControl){t=e.rootControl;break}n.push(e),t=e,e=e.parent()}t||(t=this);for(var r=n.length;r--;)n[r].rootControl=t;return t},reflow:function(){return this.repaint(),this}});return u}),r(G,[],function(){var e={},t;return{add:function(t,n){e[t.toLowerCase()]=n},has:function(t){return!!e[t.toLowerCase()]},create:function(n,r){var i,o,a;if(!t){a=tinymce.ui;for(o in a)e[o.toLowerCase()]=a[o];t=!0}if("string"==typeof n?(r=r||{},r.type=n):(r=n,n=r.type),n=n.toLowerCase(),i=e[n],!i)throw new Error("Could not find control by type: "+n);return i=new i(r),i.type=n,i}}}),r(X,[],function(){return function(e){function t(e){return e=e||b,e&&e.getAttribute("role")}function n(e){for(var n,r=e||b;r=r.parentNode;)if(n=t(r))return n}function r(e){var t=b;return t?t.getAttribute("aria-"+e):void 0}function i(e){var t=e.tag
Name.toUpperCase();return"INPUT"==t||"TEXTAREA"==t}function o(e){return i(e)&&!e.hidden?!0:/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell)$/.test(t(e))?!0:!1}function a(e){function t(e){if(1==e.nodeType&&"none"!=e.style.display){o(e)&&n.push(e);for(var r=0;r<e.childNodes.length;r++)t(e.childNodes[r])}}var n=[];return t(e||y.getEl()),n}function s(e){var t,n;e=e||C,n=e.parents().toArray(),n.unshift(e);for(var r=0;r<n.length&&(t=n[r],!t.settings.ariaRoot);r++);return t}function l(e){var t=s(e),n=a(t.getEl());t.settings.ariaRemember&&"lastAriaIndex"in t?c(t.lastAriaIndex,n):c(0,n)}function c(e,t){return 0>e?e=t.length-1:e>=t.length&&(e=0),t[e]&&t[e].focus(),e}function u(e,t){var n=-1,r=s();t=t||a(r.getEl());for(var i=0;i<t.length;i++)t[i]===b&&(n=i);n+=e,r.lastAriaIndex=c(n,t)}function d(){var e=n();"tablist"==e?u(-1,a(b.parentNode)):C.parent
().submenu?g():u(-1)}function f(){var e=t(),i=n();"tablist"==i?u(1,a(b.parentNode)):"menuitem"==e&&"menu"==i&&r("haspopup")?v():u(1)}function p(){u(-1)}function h(){var e=t(),i=n();"menuitem"==e&&"menubar"==i?v():"button"==e&&r("haspopup")?v({key:"down"}):u(1)}function m(e){var t=n();if("tablist"==t){var r=a(C.getEl("body"))[0];r&&r.focus()}else u(e.shiftKey?-1:1)}function g(){C.fire("cancel")}function v(e){e=e||{},C.fire("click",{target:b,aria:e})}var y=e.root,b,C;try{b=document.activeElement}catch(x){b=document.body}return C=y.getParentCtrl(b),y.on("keydown",function(e){function t(e,t){i(b)||t(e)!==!1&&e.preventDefault()}if(!e.isDefaultPrevented())switch(e.keyCode){case 37:t(e,d);break;case 39:t(e,f);break;case 38:t(e,p);break;case 40:t(e,h);break;case 27:g();break;case 14:case 13:case 32:t(e,v);
break;case 9:m(e)!==!1&&e.preventDefault()}}),y.on("focusin",function(e){b=e.target,C=e.control}),{focusFirst:l}}}),r(J,[Y,j,q,G,X,u,K],function(e,t,n,r,i,o,a){var s={};return e.extend({layout:"",innerClass:"container-inner",init:function(e){var n=this;n._super(e),e=n.settings,n._fixed=e.fixed,n._items=new t,n.isRtl()&&n.addClass("rtl"),n.addClass("container"),n.addClass("container-body","body"),e.containerCls&&n.addClass(e.containerCls),n._layout=r.create((e.layout||n.layout)+"layout"),n.settings.items&&n.add(n.settings.items),n._hasBody=!0},items:function(){return this._items},find:function(e){return e=s[e]=s[e]||new n(e),e.find(this)},add:function(e){var t=this;return t.items().add(t.create(e)).parent(t),t},focus:function(e){var t=this,n,r,i;return e&&(r=t.keyboardNav||t.parents().eq(-1)[0].keyboardNav)?void r.focusFirst(t):(i=t.find("*"),t.statusbar&a
mp;&i.add(t.statusbar.items()),i.each(function(e){return e.settings.autofocus?(n=null,!1):void(e.canFocus&&(n=n||e))}),n&&n.focus(),t)},replace:function(e,t){for(var n,r=this.items(),i=r.length;i--;)if(r[i]===e){r[i]=t;break}i>=0&&(n=t.getEl(),n&&n.parentNode.removeChild(n),n=e.getEl(),n&&n.parentNode.removeChild(n)),t.parent(this)},create:function(t){var n=this,i,a=[];return o.isArray(t)||(t=[t]),o.each(t,function(t){t&&(t instanceof e||("string"==typeof t&&(t={type:t}),i=o.extend({},n.settings.defaults,t),t.type=i.type=i.type||t.type||n.settings.defaultType||(i.defaults?i.defaults.type:null),t=r.create(i)),a.push(t))}),a},renderNew:function(){var e=this;return e.items().each(function(t,n){var r,i;t.parent(e),t._rendered||(r=e.getEl("body"),i=a.createFragment(t.renderHtml()),r.hasChildNodes()&&n<=r.childNodes.length-1?r.insertBefore(i,r.childNodes[n]):r.appendChild(i),t.postRender())}),e._
layout.applyClasses(e),e._lastRect=null,e},append:function(e){return this.add(e).renderNew()},prepend:function(e){var t=this;return t.items().set(t.create(e).concat(t.items().toArray())),t.renderNew()},insert:function(e,t,n){var r=this,i,o,a;return e=r.create(e),i=r.items(),!n&&t<i.length-1&&(t+=1),t>=0&&t<i.length&&(o=i.slice(0,t).toArray(),a=i.slice(t).toArray(),i.set(o.concat(e,a))),r.renderNew()},fromJSON:function(e){var t=this;for(var n in e)t.find("#"+n).value(e[n]);return t},toJSON:function(){var e=this,t={};return e.find("*").each(function(e){var n=e.name(),r=e.value();n&&"undefined"!=typeof r&&(t[n]=r)}),t},preRender:function(){},renderHtml:function(){var e=this,t=e._layout,n=this.settings.role;return e.preRender(),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes()+'"'+(n?' role="'+this.settings.role+'"':"")+'><div id="'+e._id+'-
body" class="'+e.classes("body")+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></div>"},postRender:function(){var e=this,t;return e.items().exec("postRender"),e._super(),e._layout.postRender(e),e._rendered=!0,e.settings.style&&a.css(e.getEl(),e.settings.style),e.settings.border&&(t=e.borderBox(),a.css(e.getEl(),{"border-top-width":t.top,"border-right-width":t.right,"border-bottom-width":t.bottom,"border-left-width":t.left})),e.parent()||(e.keyboardNav=new i({root:e})),e},initLayoutRect:function(){var e=this,t=e._super();return e._layout.recalc(e),t},recalc:function(){var e=this,t=e._layoutRect,n=e._lastRect;
+return n&&n.w==t.w&&n.h==t.h?void 0:(e._layout.recalc(e),t=e.layoutRect(),e._lastRect={x:t.x,y:t.y,w:t.w,h:t.h},!0)},reflow:function(){var t;if(this.visible()){for(e.repaintControls=[],e.repaintControls.map={},this.recalc(),t=e.repaintControls.length;t--;)e.repaintControls[t].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),e.repaintControls=[]}return this}})}),r(Q,[K],function(e){function t(){var e=document,t,n,r,i,o,a,s,l,c=Math.max;return t=e.documentElement,n=e.body,r=c(t.scrollWidth,n.scrollWidth),i=c(t.clientWidth,n.clientWidth),o=c(t.offsetWidth,n.offsetWidth),a=c(t.scrollHeight,n.scrollHeight),s=c(t.clientHeight,n.clientHeight),l=c(t.offsetHeight,n.offsetHeight),{width:o>r?i:r,height:l>a?s:a}}return function(n,r){function i(){return a.getElementById(r.handle||n)}var o,a=document,s,l,c,u,d,f;r=r||{},l=function(n){var l=t(),p,h;n.preventDefault(),s=n.button,p=i(),d=n.screenX,f=n.sc
reenY,h=window.getComputedStyle?window.getComputedStyle(p,null).getPropertyValue("cursor"):p.runtimeStyle.cursor,o=a.createElement("div"),e.css(o,{position:"absolute",top:0,left:0,width:l.width,height:l.height,zIndex:2147483647,opacity:1e-4,cursor:h}),a.body.appendChild(o),e.on(a,"mousemove",u),e.on(a,"mouseup",c),r.start(n)},u=function(e){return e.button!==s?c(e):(e.deltaX=e.screenX-d,e.deltaY=e.screenY-f,e.preventDefault(),void r.drag(e))},c=function(t){e.off(a,"mousemove",u),e.off(a,"mouseup",c),o.parentNode.removeChild(o),r.stop&&r.stop(t)},this.destroy=function(){e.off(i())},e.on(i(),"mousedown",l)}}),r(Z,[K,Q],function(e,t){return{init:function(){var e=this;e.on("repaint",e.renderScroll)},renderScroll:function(){function n(){function t(t,a,s,l,c,u){var d,f,p,h,m,g,v,y,b;if(f=i.getEl("scroll"+t)){if(y=a.toLowerCase(),b=s.toLowerCase(),i.getEl("absend")&&
e.css(i.getEl("absend"),y,i.layoutRect()[l]-1),!c)return void e.css(f,"display","none");e.css(f,"display","block"),d=i.getEl("body"),p=i.getEl("scroll"+t+"t"),h=d["client"+s]-2*o,h-=n&&r?f["client"+u]:0,m=d["scroll"+s],g=h/m,v={},v[y]=d["offset"+a]+o,v[b]=h,e.css(f,v),v={},v[y]=d["scroll"+a]*g,v[b]=h*g,e.css(p,v)}}var n,r,a;a=i.getEl("body"),n=a.scrollWidth>a.clientWidth,r=a.scrollHeight>a.clientHeight,t("h","Left","Width","contentW",n,"Height"),t("v","Top","Height","contentH",r,"Width")}function r(){function n(n,r,a,s,l){var c,u=i._id+"-scroll"+n,d=i.classPrefix;i.getEl().appendChild(e.createFragment('<div id="'+u+'" class="'+d+"scrollbar "+d+"scrollbar-"+n+'"><div id="
'+u+'t" class="'+d+'scrollbar-thumb"></div></div>')),i.draghelper=new t(u+"t",{start:function(){c=i.getEl("body")["scroll"+r],e.addClass(e.get(u),d+"active")},drag:function(e){var t,u,d,f,p=i.layoutRect();u=p.contentW>p.innerW,d=p.contentH>p.innerH,f=i.getEl("body")["client"+a]-2*o,f-=u&&d?i.getEl("scroll"+n)["client"+l]:0,t=f/i.getEl("body")["scroll"+a],i.getEl("body")["scroll"+r]=c+e["delta"+s]/t},stop:function(){e.removeClass(e.get(u),d+"active")}})}i.addClass("scroll"),n("v","Top","Height","Y","Width"),n("h","Left","Width","X","Height")}var i=this,o=2;i.settings.autoScroll&&(i._hasScroll||(i._hasScroll=!0,r(),i.on("wheel",function(e){var t=i.getEl("body");t.scrol
lLeft+=10*(e.deltaX||0),t.scrollTop+=10*e.deltaY,n()}),e.on(i.getEl("body"),"scroll",n)),n())}}}),r(et,[J,Z],function(e,t){return e.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[t],renderHtml:function(){var e=this,t=e._layout,n=e.settings.html;return e.preRender(),t.preRender(e),"undefined"==typeof n?n='<div id="'+e._id+'-body" class="'+e.classes("body")+'">'+t.renderHtml(e)+"</div>":("function"==typeof n&&(n=n.call(e)),e._hasBody=!1),'<div id="'+e._id+'" class="'+e.classes()+'" hidefocus="1" tabindex="-1" role="group">'+(e._preBodyHtml||"")+n+"</div>"}})}),r(tt,[K],function(e){function t(t,n,r){var i,o,a,s,l,c,u,d,f,p;return f=e.getViewPort(),o=e.getPos(n),a=o.x,s=o.y,t._fixed&&(a-=f.x,s-=f.y),i=t.getEl(),p=e.getSize(i),l=p.width,c=p.height,p=e.getSize(n),u=p.w
idth,d=p.height,r=(r||"").split(""),"b"===r[0]&&(s+=d),"r"===r[1]&&(a+=u),"c"===r[0]&&(s+=Math.round(d/2)),"c"===r[1]&&(a+=Math.round(u/2)),"b"===r[3]&&(s-=c),"r"===r[4]&&(a-=l),"c"===r[3]&&(s-=Math.round(c/2)),"c"===r[4]&&(a-=Math.round(l/2)),{x:a,y:s,w:l,h:c}}return{testMoveRel:function(n,r){for(var i=e.getViewPort(),o=0;o<r.length;o++){var a=t(this,n,r[o]);if(this._fixed){if(a.x>0&&a.x+a.w<i.w&&a.y>0&&a.y+a.h<i.h)return r[o]}else if(a.x>i.x&&a.x+a.w<i.w+i.x&&a.y>i.y&&a.y+a.h<i.h+i.y)return r[o]}return r[0]},moveRel:function(e,n){"string"!=typeof n&&(n=this.testMoveRel(e,n));var r=t(this,e,n);return this.moveTo(r.x,r.y)},moveBy:function(e,t){var n=this,r=n.layoutRect();return n.moveTo(r.x+e,r.y+t),n},moveTo:function(t,n){functio
n r(e,t,n){return 0>e?0:e+n>t?(e=t-n,0>e?0:e):e}var i=this;if(i.settings.constrainToViewport){var o=e.getViewPort(window),a=i.layoutRect();t=r(t,o.w+o.x,a.w),n=r(n,o.h+o.y,a.h)}return i._rendered?i.layoutRect({x:t,y:n}).repaint():(i.settings.x=t,i.settings.y=n),i.fire("move",{x:t,y:n}),i}}}),r(nt,[K],function(e){return{resizeToContent:function(){this._layoutRect.autoResize=!0,this._lastRect=null,this.reflow()},resizeTo:function(t,n){if(1>=t||1>=n){var r=e.getWindowSize();t=1>=t?t*r.w:t,n=1>=n?n*r.h:n}return this._layoutRect.autoResize=!1,this.layoutRect({minW:t,minH:n,w:t,h:n}).reflow()},resizeBy:function(e,t){var n=this,r=n.layoutRect();return n.resizeTo(r.w+e,r.h+t)}}}),r(rt,[et,tt,nt,K],function(e,t,n,r){function i(){function e(e,t){for(;e;){if(e==t)return!0;e=e.parent()}}c||(c=function(t){if(2!=t.button)for(var n=f.length;n--;){var r=f[n],i=r.getParentCtrl(t.target);if(r.settings.autohide){if(i&&(e(i,r)||r.parent()===i))continue;t=r.fire(&q
uot;autohide",{target:t.target}),t.isDefaultPrevented()||r.hide()}}},r.on(document,"click",c))}function o(){u||(u=function(){var e;for(e=f.length;e--;)s(f[e])},r.on(window,"scroll",u))}function a(){d||(d=function(){m.hideAll()},r.on(window,"resize",d))}function s(e){function t(t,n){for(var r,i=0;i<f.length;i++)if(f[i]!=e)for(r=f[i].parent();r&&(r=r.parent());)r==e&&f[i].fixed(t).moveBy(0,n).repaint()}var n=r.getViewPort().y;e.settings.autofix&&(e._fixed?e._autoFixY>n&&(e.fixed(!1).layoutRect({y:e._autoFixY}).repaint(),t(!1,e._autoFixY-n)):(e._autoFixY=e.layoutRect().y,e._autoFixY<n&&(e.fixed(!0).layoutRect({y:0}).repaint(),t(!0,n-e._autoFixY))))}function l(e){var t;for(t=f.length;t--;)f[t]===e&&f.splice(t,1);for(t=p.length;t--;)p[t]===e&&p.splice(t,1)}var c,u,d,f=[],p=[],h,m=e.extend({Mixins:[t,n],init:function(e){function t(){var e,t=m.zIndex||65535,i;if(p.length)for(e=0;e<p.lengt
h;e++)p[e].modal&&(t++,i=p[e]),p[e].getEl().style.zIndex=t,p[e].zIndex=t,t++;var o=document.getElementById(n.classPrefix+"modal-block");i?r.css(o,"z-index",i.zIndex-1):o&&(o.parentNode.removeChild(o),h=!1),m.currentZIndex=t}var n=this;n._super(e),n._eventsRoot=n,n.addClass("floatpanel"),e.autohide&&(i(),a(),f.push(n)),e.autofix&&(o(),n.on("move",function(){s(this)})),n.on("postrender show",function(e){if(e.control==n){var i,o=n.classPrefix;n.modal&&!h&&(i=r.createFragment('<div id="'+o+'modal-block" class="'+o+"reset "+o+'fade"></div>'),i=i.firstChild,n.getContainerElm().appendChild(i),setTimeout(function(){r.addClass(i,o+"in"),r.addClass(n.getEl(),o+"in")},0),h=!0),p.push(n),t()}}),n.on("close hide",function(e){if(e.control==n){for(var r=p.length;r--;)p[r]===n&&p.splice(r,1);t()}}),n.on("show",fun
ction(){n.parents().each(function(e){return e._fixed?(n.fixed(!0),!1):void 0})}),e.popover&&(n._preBodyHtml='<div class="'+n.classPrefix+'arrow"></div>',n.addClass("popover").addClass("bottom").addClass(n.isRtl()?"end":"start"))},fixed:function(e){var t=this;if(t._fixed!=e){if(t._rendered){var n=r.getViewPort();e?t.layoutRect().y-=n.y:t.layoutRect().y+=n.y}t.toggleClass("fixed",e),t._fixed=e}return t},show:function(){var e=this,t,n=e._super();for(t=f.length;t--&&f[t]!==e;);return-1===t&&f.push(e),n},hide:function(){return l(this),this._super()},hideAll:function(){m.hideAll()},close:function(){var e=this;return e.fire("close"),e.remove()},remove:function(){l(this),this._super()},postRender:function(){var e=this;return e.settings.bodyRole&&this.getEl("body").setAttribute("role",e.settings.bodyRole),e._super()}});return m.hideAll=function(){for(var e=f.l
ength;e--;){var t=f[e];t&&t.settings.autohide&&(t.hide(),f.splice(e,1))}},m}),r(it,[rt,et,K,Q],function(e,t,n,r){var i=e.extend({modal:!0,Defaults:{border:1,layout:"flex",containerCls:"panel",role:"dialog",callbacks:{submit:function(){this.fire("submit",{data:this.toJSON()})},close:function(){this.close()}}},init:function(e){var n=this;n._super(e),n.isRtl()&&n.addClass("rtl"),n.addClass("window"),n._fixed=!0,e.buttons&&(n.statusbar=new t({layout:"flex",border:"1 0 0 0",spacing:3,padding:10,align:"center",pack:n.isRtl()?"start":"end",defaults:{type:"button"},items:e.buttons}),n.statusbar.addClass("foot"),n.statusbar.parent(n)),n.on("click",function(e){-1!=e.target.className.indexOf(n.classPrefix+"close")&&n.close()}),n.on("cancel",function(){n.close()}),n.aria("describedby",n.d
escribedBy||n._id+"-none"),n.aria("label",e.title),n._fullscreen=!1},recalc:function(){var e=this,t=e.statusbar,r,i,o,a;e._fullscreen&&(e.layoutRect(n.getWindowSize()),e.layoutRect().contentH=e.layoutRect().innerH),e._super(),r=e.layoutRect(),e.settings.title&&!e._fullscreen&&(i=r.headerW,i>r.w&&(o=r.x-Math.max(0,i/2),e.layoutRect({w:i,x:o}),a=!0)),t&&(t.layoutRect({w:e.layoutRect().innerW}).recalc(),i=t.layoutRect().minW+r.deltaW,i>r.w&&(o=r.x-Math.max(0,i-r.w),e.layoutRect({w:i,x:o}),a=!0)),a&&e.recalc()},initLayoutRect:function(){var e=this,t=e._super(),r=0,i;if(e.settings.title&&!e._fullscreen){i=e.getEl("head");var o=n.getSize(i);t.headerW=o.width,t.headerH=o.height,r+=t.headerH}e.statusbar&&(r+=e.statusbar.layoutRect().h),t.deltaH+=r,t.minH+=r,t.h+=r;var a=n.getWindowSize();return t.x=Math.max(0,a.w/2-t.w/2),t.y=Math.max(0,a.h/2-t.h/2),t},renderHtml:function(){var e=this
,t=e._layout,n=e._id,r=e.classPrefix,i=e.settings,o="",a="",s=i.html;return e.preRender(),t.preRender(e),i.title&&(o='<div id="'+n+'-head" class="'+r+'window-head"><div id="'+n+'-title" class="'+r+'title">'+e.encode(i.title)+'</div><button type="button" class="'+r+'close" aria-hidden="true">\xd7</button><div id="'+n+'-dragh" class="'+r+'dragh"></div></div>'),i.url&&(s='<iframe src="'+i.url+'" tabindex="-1"></iframe>'),"undefined"==typeof s&&(s=t.renderHtml(e)),e.statusbar&&(a=e.statusbar.renderHtml()),'<div id="'+n+'" class="'+e.classes()+'" hidefocus="1"><div class="'+e.classPrefix+'reset" role="application">'+o+'<div id="'+n+'-body" class="'+e.classes("body")+'&quo
t;>'+s+"</div>"+a+"</div></div>"},fullscreen:function(e){var t=this,r=document.documentElement,i,o=t.classPrefix,a;if(e!=t._fullscreen)if(n.on(window,"resize",function(){var e;if(t._fullscreen)if(i)t._timer||(t._timer=setTimeout(function(){var e=n.getWindowSize();t.moveTo(0,0).resizeTo(e.w,e.h),t._timer=0},50));else{e=(new Date).getTime();var r=n.getWindowSize();t.moveTo(0,0).resizeTo(r.w,r.h),(new Date).getTime()-e>50&&(i=!0)}}),a=t.layoutRect(),t._fullscreen=e,e){t._initial={x:a.x,y:a.y,w:a.w,h:a.h},t._borderBox=t.parseBox("0"),t.getEl("head").style.display="none",a.deltaH-=a.headerH+2,n.addClass(r,o+"fullscreen"),n.addClass(document.body,o+"fullscreen"),t.addClass("fullscreen");var s=n.getWindowSize();t.moveTo(0,0).resizeTo(s.w,s.h)}else t._borderBox=t.parseBox(t.settings.border),t.getEl("head").style.display="",a.deltaH+=a.headerH,n.remove
Class(r,o+"fullscreen"),n.removeClass(document.body,o+"fullscreen"),t.removeClass("fullscreen"),t.moveTo(t._initial.x,t._initial.y).resizeTo(t._initial.w,t._initial.h);return t.reflow()},postRender:function(){var e=this,t;setTimeout(function(){e.addClass("in")},0),e._super(),e.statusbar&&e.statusbar.postRender(),e.focus(),this.dragHelper=new r(e._id+"-dragh",{start:function(){t={x:e.layoutRect().x,y:e.layoutRect().y}},drag:function(n){e.moveTo(t.x+n.deltaX,t.y+n.deltaY)}}),e.on("submit",function(t){t.isDefaultPrevented()||e.close()})},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var e=this,t=e.classPrefix;e.dragHelper.destroy(),e._super(),e.statusbar&&this.statusbar.remove(),e._fullscreen&&(n.removeClass(document.documentElement,t+"fullscreen"),n.removeClass(document.body,t+"fullscreen"))},getContentWindow:function(){var e=this.get
El().getElementsByTagName("iframe")[0];return e?e.contentWindow:null}});return i}),r(ot,[it],function(e){var t=e.extend({init:function(e){e={border:1,padding:20,layout:"flex",pack:"center",align:"center",containerCls:"panel",autoScroll:!0,buttons:{type:"button",text:"Ok",action:"ok"},items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200}},this._super(e)},Statics:{OK:1,OK_CANCEL:2,YES_NO:3,YES_NO_CANCEL:4,msgBox:function(n){function r(e,t,n){return{type:"button",text:e,subtype:n?"primary":"",onClick:function(e){e.control.parents()[1].close(),o(t)}}}var i,o=n.callback||function(){};switch(n.buttons){case t.OK_CANCEL:i=[r("Ok",!0,!0),r("Cancel",!1)];break;case t.YES_NO:case t.YES_NO_CANCEL:i=[r("Yes",1,!0),r("No",0)],n.buttons==t.YES_NO_CANCEL&&i.push(r("Cancel",-1));break;default:i=[r("Ok",!0,!
0)]}return new e({padding:20,x:n.x,y:n.y,minWidth:300,minHeight:100,layout:"flex",pack:"center",align:"center",buttons:i,title:n.title,role:"alertdialog",items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200,text:n.text},onPostRender:function(){this.aria("describedby",this.items()[0]._id)},onClose:n.onClose,onCancel:function(){o(!1)}}).renderTo(document.body).reflow()},alert:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,t.msgBox(e)},confirm:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,e.buttons=t.OK_CANCEL,t.msgBox(e)}}});return t}),r(at,[it,ot],function(e,t){return function(n){function r(){return o.length?o[o.length-1]:void 0}var i=this,o=[];i.windows=o,i.open=function(t,r){var i;return n.editorManager.activeEditor=n,t.title=t.title||" ",t.url=t.url||t.file,t.url&&(t.width=parseInt(t.width||320,10),t.height=parseInt(t.heigh
t||240,10)),t.body&&(t.items={defaults:t.defaults,type:t.bodyType||"form",items:t.body}),t.url||t.buttons||(t.buttons=[{text:"Ok",subtype:"primary",onclick:function(){i.find("form")[0].submit()}},{text:"Cancel",onclick:function(){i.close()}}]),i=new e(t),o.push(i),i.on("close",function(){for(var e=o.length;e--;)o[e]===i&&o.splice(e,1);n.focus()}),t.data&&i.on("postRender",function(){this.find("*").each(function(e){var n=e.name();n in t.data&&e.value(t.data[n])})}),i.features=t||{},i.params=r||{},n.nodeChanged(),i.renderTo().reflow()},i.alert=function(e,r,i){t.alert(e,function(){r?r.call(i||this):n.focus()})},i.confirm=function(e,n,r){t.confirm(e,function(e){n.call(r||this,e)})},i.close=function(){r()&&r().close()},i.getParams=function(){return r()?r().params:null},i.setParams=function(e){r()&&(r().params=e)},i.getWindows=function(){return o}}}),r(st,[B,x,_,
g,d,u],function(e,t,n,r,i,o){return function(a){function s(e,t){try{a.getDoc().execCommand(e,!1,t)}catch(n){}}function l(){var e=a.getDoc().documentMode;return e?e:6}function c(e){return e.isDefaultPrevented()}function u(){function t(e){var t=new i(function(){});o.each(a.getBody().getElementsByTagName("*"),function(e){"SPAN"==e.tagName&&e.setAttribute("mce-data-marked",1),!e.hasAttribute("data-mce-style")&&e.hasAttribute("style")&&a.dom.setAttrib(e,"style",e.getAttribute("style"))}),t.observe(a.getDoc(),{childList:!0,attributes:!0,subtree:!0,attributeFilter:["style"]}),a.getDoc().execCommand(e?"ForwardDelete":"Delete",!1,null);var n=a.selection.getRng(),r=n.startContainer.parentNode;o.each(t.takeRecords(),function(e){if(q.isChildOf(e.target,a.getBody())){if("style"==e.attributeName){var t=e.target.getAttribute("data-mce-style");t?e.target.se
tAttribute("style",t):e.target.removeAttribute("style")}o.each(e.addedNodes,function(e){if("SPAN"==e.nodeName&&!e.getAttribute("mce-data-marked")){var t,i;e==r&&(t=n.startOffset,i=e.firstChild),q.remove(e,!0),i&&(n.setStart(i,t),n.setEnd(i,t),a.selection.setRng(n))}})}}),t.disconnect(),o.each(a.dom.select("span[mce-data-marked]"),function(e){e.removeAttribute("mce-data-marked")})}var n=a.getDoc(),r="data:text/mce-internal,",i=window.MutationObserver,s,l;i||(s=!0,i=function(){function e(e){var t=e.relatedNode||e.target;n.push({target:t,addedNodes:[t]})}function t(e){var t=e.relatedNode||e.target;n.push({target:t,attributeName:e.attrName})}var n=[],r;this.observe=function(n){r=n,r.addEventListener("DOMSubtreeModified",e,!1),r.addEventListener("DOMNodeInsertedIntoDocument",e,!1),r.addEventListener("DOMNodeInserted",e,!1),r.addEventListener("DOMAttrModified&qu
ot;,t,!1)},this.disconnect=function(){r.removeEventListener("DOMSubtreeModified",e,!1),r.removeEventListener("DOMNodeInsertedIntoDocument",e,!1),r.removeEventListener("DOMNodeInserted",e,!1),r.removeEventListener("DOMAttrModified",t,!1)},this.takeRecords=function(){return n}}),a.on("keydown",function(n){var r=n.keyCode==$,i=e.metaKeyPressed(n);if(!c(n)&&(r||n.keyCode==U)){var o=a.selection.getRng(),s=o.startContainer,l=o.startOffset;if(!i&&o.collapsed&&3==s.nodeType&&(r?l<s.data.length:l>0))return;n.preventDefault(),i&&a.selection.getSel().modify("extend",r?"forward":"backward","word"),t(r)}}),a.on("keypress",function(n){c(n)||j.isCollapsed()||!n.charCode||e.metaKeyPressed(n)||(n.preventDefault(),t(!0),a.selection.setContent(String.fromCharCode(n.charCode)))}),a.addCommand("Delete",function(){t()}),a.addCommand("ForwardDelet
e",function(){t(!0)}),s||(a.on("dragstart",function(e){var t;a.selection.isCollapsed()&&"IMG"==e.target.tagName&&j.select(e.target),l=j.getRng(),t=a.selection.getContent(),t.length>0&&e.dataTransfer.setData("URL","data:text/mce-internal,"+escape(t))}),a.on("drop",function(e){if(!c(e)){var i=e.dataTransfer.getData("URL");if(!i||-1==i.indexOf(r)||!n.caretRangeFromPoint)return;i=unescape(i.substr(r.length)),n.caretRangeFromPoint&&(e.preventDefault(),window.setTimeout(function(){var r=n.caretRangeFromPoint(e.x,e.y);l&&(j.setRng(l),l=null),t(),j.setRng(r),a.insertContent(i)},0))}}),a.on("cut",function(e){!c(e)&&e.clipboardData&&(e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/html",a.selection.getContent()),e.clipboardData.setData("text/plain",a.selection.getContent({format:"text"})),t(!0))}))}func
tion d(){function e(e){var t=q.create("body"),n=e.cloneContents();return t.appendChild(n),j.serializer.serialize(t,{format:"html"})}function n(n){if(!n.setStart){if(n.item)return!1;var r=n.duplicate();return r.moveToElementText(a.getBody()),t.compareRanges(n,r)}var i=e(n),o=q.createRng();o.selectNode(a.getBody());var s=e(o);return i===s}a.on("keydown",function(e){var t=e.keyCode,r,i;if(!c(e)&&(t==$||t==U)){if(r=a.selection.isCollapsed(),i=a.getBody(),r&&!q.isEmpty(i))return;if(!r&&!n(a.selection.getRng()))return;e.preventDefault(),a.setContent(""),i.firstChild&&q.isBlock(i.firstChild)?a.selection.setCursorLocation(i.firstChild,0):a.selection.setCursorLocation(i,0),a.nodeChanged()}})}function f(){a.on("keydown",function(t){!c(t)&&65==t.keyCode&&e.metaKeyPressed(t)&&(t.preventDefault(),a.execCommand("SelectAll"))})}function p(){a.settings.content_editable||(q.bind(a.getD
oc(),"focusin",function(){j.setRng(j.getRng())}),q.bind(a.getDoc(),"mousedown",function(e){e.target==a.getDoc().documentElement&&(a.getBody().focus(),j.setRng(j.getRng()))}))}function h(){a.on("keydown",function(e){if(!c(e)&&e.keyCode===U){if(!a.getBody().getElementsByTagName("hr").length)return;if(j.isCollapsed()&&0===j.getRng(!0).startOffset){var t=j.getNode(),n=t.previousSibling;if("HR"==t.nodeName)return q.remove(t),void e.preventDefault();n&&n.nodeName&&"hr"===n.nodeName.toLowerCase()&&(q.remove(n),e.preventDefault())}}})}function m(){window.Range.prototype.getClientRects||a.on("mousedown",function(e){if(!c(e)&&"HTML"===e.target.nodeName){var t=a.getBody();t.blur(),setTimeout(function(){t.focus()},0)}})}function g(){a.on("click",function(e){e=e.target,/^(IMG|HR)$/.test(e.nodeName)&&j.getSel().setBaseAndExtent(e,0,e,1),"A&
quot;==e.nodeName&&q.hasClass(e,"mce-item-anchor")&&j.select(e)})}function v(){function e(){var e=q.getAttribs(j.getStart().cloneNode(!1));return function(){var t=j.getStart();t!==a.getBody()&&(q.setAttrib(t,"style",null),V(e,function(e){t.setAttributeNode(e.cloneNode(!0))}))}}function t(){return!j.isCollapsed()&&q.getParent(j.getStart(),q.isBlock)!=q.getParent(j.getEnd(),q.isBlock)}a.on("keypress",function(n){var r;return c(n)||8!=n.keyCode&&46!=n.keyCode||!t()?void 0:(r=e(),a.getDoc().execCommand("delete",!1,null),r(),n.preventDefault(),!1)}),q.bind(a.getDoc(),"cut",function(n){var r;!c(n)&&t()&&(r=e(),setTimeout(function(){r()},0))})}function y(){var e,n;a.on("selectionchange",function(){n&&(clearTimeout(n),n=0),n=window.setTimeout(function(){if(!a.removed){var n=j.getRng();e&&t.compareRanges(n,e)||(a.nodeChanged(),e=n)}},50)})}function b(){document.
body.setAttribute("role","application")}function C(){a.on("keydown",function(e){if(!c(e)&&e.keyCode===U&&j.isCollapsed()&&0===j.getRng(!0).startOffset){var t=j.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})}function x(){l()>7||(s("RespectVisibilityInDesign",!0),a.contentStyles.push(".mceHideBrInPre pre br {display: none}"),q.addClass(a.getBody(),"mceHideBrInPre"),Y.addNodeFilter("pre",function(e){for(var t=e.length,r,i,o,a;t--;)for(r=e[t].getAll("br"),i=r.length;i--;)o=r[i],a=o.prev,a&&3===a.type&&"\n"!=a.value.charAt(a.value-1)?a.value+="\n":o.parent.insert(new n("#text",3),o,!0).value="\n"}),G.addNodeFilter("pre",function(e){for(var t=e.length,n,r,i,o;t--;)for(n=e[t].getAll("br"),r=n.length;r--;)i=n[r],o=i.prev,o
&&3==o.type&&(o.value=o.value.replace(/\r?\n$/,""))}))}function w(){q.bind(a.getBody(),"mouseup",function(){var e,t=j.getNode();"IMG"==t.nodeName&&((e=q.getStyle(t,"width"))&&(q.setAttrib(t,"width",e.replace(/[^0-9%]+/g,"")),q.setStyle(t,"width","")),(e=q.getStyle(t,"height"))&&(q.setAttrib(t,"height",e.replace(/[^0-9%]+/g,"")),q.setStyle(t,"height","")))})}function _(){a.on("keydown",function(t){var n,r,i,o,s;if(!c(t)&&t.keyCode==e.BACKSPACE&&(n=j.getRng(),r=n.startContainer,i=n.startOffset,o=q.getRoot(),s=r,n.collapsed&&0===i)){for(;s&&s.parentNode&&s.parentNode.firstChild==s&&s.parentNode!=o;)s=s.parentNode;"BLOCKQUOTE"===s.tagName&&(a.formatter.toggle("blockquote",null,s),n=q.createRng(),n.setStart(r,0),n.setEnd(r,0),j.setRng(n
))}})}function E(){function e(){a._refreshContentEditable(),s("StyleWithCSS",!1),s("enableInlineTableEditing",!1),K.object_resizing||s("enableObjectResizing",!1)}K.readonly||a.on("BeforeExecCommand MouseDown",e)}function N(){function e(){V(q.select("a"),function(e){var t=e.parentNode,n=q.getRoot();if(t.lastChild===e){for(;t&&!q.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}q.add(t,"br",{"data-mce-bogus":1})}})}a.on("SetContent ExecCommand",function(t){("setcontent"==t.type||"mceInsertLink"===t.command)&&e()})}function k(){K.forced_root_block&&a.on("init",function(){s("DefaultParagraphSeparator",K.forced_root_block)})}function S(){a.on("Undo Redo SetContent",function(e){e.initial||a.execCommand("mceRepaint")})}function T(){a.on("keydown",function(e){var t;c(e)||e.keyCode!=U||(t=a.getDoc(
).selection.createRange(),t&&t.item&&(e.preventDefault(),a.undoManager.beforeChange(),q.remove(t.item(0)),a.undoManager.add()))})}function R(){var e;l()>=10&&(e="",V("p div h1 h2 h3 h4 h5 h6".split(" "),function(t,n){e+=(n>0?",":"")+t+":empty"}),a.contentStyles.push(e+"{padding-right: 1px !important}"))}function A(){l()<9&&(Y.addNodeFilter("noscript",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.firstChild,r&&n.attr("data-mce-innertext",r.value)}),G.addNodeFilter("noscript",function(e){for(var t=e.length,i,o,a;t--;)i=e[t],o=e[t].firstChild,o?o.value=r.decode(o.value):(a=i.attributes.map["data-mce-innertext"],a&&(i.attr("data-mce-innertext",null),o=new n("#text",3),o.value=a,o.raw=!0,i.append(o)))}))}function B(){function e(e,t){var n=i.createTextRange();try{n.moveToPoint(e,t)}catch(r){n=null}re
turn n}function t(t){var r;t.button?(r=e(t.x,t.y),r&&(r.compareEndPoints("StartToStart",a)>0?r.setEndPoint("StartToStart",a):r.setEndPoint("EndToEnd",a),r.select())):n()}function n(){var e=r.selection.createRange();a&&!e.item&&0===e.compareEndPoints("StartToEnd",e)&&a.select(),q.unbind(r,"mouseup",n),q.unbind(r,"mousemove",t),a=o=0}var r=q.doc,i=r.body,o,a,s;r.documentElement.unselectable=!0,q.bind(r,"mousedown contextmenu",function(i){if("HTML"===i.target.nodeName){if(o&&n(),s=r.documentElement,s.scrollHeight>s.clientHeight)return;o=1,a=e(i.x,i.y),a&&(q.bind(r,"mouseup",n),q.bind(r,"mousemove",t),q.getRoot().focus(),a.select())}})}function D(){a.on("keyup focusin mouseup",function(t){65==t.keyCode&&e.metaKeyPressed(t)||j.normalize()},!0)}function L(){a.contentStyles.push("img:-moz-broken {-moz-force-broken-i
mage-icon:1;min-width:24px;min-height:24px}")}function H(){a.inline||a.on("keydown",function(){document.activeElement==document.body&&a.getWin().focus()})}function M(){a.inline||(a.contentStyles.push("body {min-height: 150px}"),a.on("click",function(e){"HTML"==e.target.nodeName&&(a.getBody().focus(),a.selection.normalize(),a.nodeChanged())}))}function P(){i.mac&&a.on("keydown",function(t){!e.metaKeyPressed(t)||37!=t.keyCode&&39!=t.keyCode||(t.preventDefault(),a.selection.getSel().modify("move",37==t.keyCode?"backward":"forward","word"))})}function O(){s("AutoUrlDetect",!1)}function I(){a.inline||a.on("focus blur beforegetcontent",function(){var e=a.dom.create("br");a.getBody().appendChild(e),e.parentNode.removeChild(e)},!0)}function F(){a.on("click",function(e){var t=e.target;do if("A"===t.tagName)return void
e.preventDefault();while(t=t.parentNode)}),a.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")}function z(){a.on("init",function(){a.dom.bind(a.getBody(),"submit",function(e){e.preventDefault()})})}function W(){Y.addNodeFilter("br",function(e){for(var t=e.length;t--;)"Apple-interchange-newline"==e[t].attr("class")&&e[t].remove()})}var V=o.each,U=e.BACKSPACE,$=e.DELETE,q=a.dom,j=a.selection,K=a.settings,Y=a.parser,G=a.serializer,X=i.gecko,J=i.ie,Q=i.webkit;_(),d(),D(),Q&&(u(),p(),g(),k(),z(),C(),W(),i.iOS?(y(),H(),M(),F()):f()),J&&i.ie<11&&(h(),b(),x(),w(),T(),R(),A(),B()),i.ie>=11&&(M(),I(),C()),i.ie&&(f(),O()),X&&(h(),m(),v(),E(),N(),S(),L(),P(),C())}}),r(lt,[$],function(e){function t(t){return t._eventDispatcher||(t._eventDispatcher=new e({scope:t,toggleEvent:function(n,r){e.isNative(n)&&t.toggleNativeEvent&&t.toggleNativeEv
ent(n,r)}})),t._eventDispatcher}return{fire:function(e,n,r){var i=this;if(i.removed&&"remove"!==e)return n;if(n=t(i).fire(e,n,r),r!==!1&&i.parent)for(var o=i.parent();o&&!n.isPropagationStopped();)o.fire(e,n,!1),o=o.parent();return n},on:function(e,n,r){return t(this).on(e,n,r)},off:function(e,n){return t(this).off(e,n)},once:function(e,n){return t(this).once(e,n)},hasEventListeners:function(e){return t(this).has(e)}}}),r(ct,[lt,y,u],function(e,t,n){function r(e,t){return"selectionchange"==t?e.getDoc():!e.inline&&/^mouse|click|contextmenu|drop|dragover|dragend/.test(t)?e.getDoc():e.getBody()}function i(e,t){var n=e.settings.event_root,i=e.editorManager,a=i.eventRootElm||r(e,t);if(n){if(i.rootEvents||(i.rootEvents={},i.on("RemoveEditor",function(){i.activeEditor||(o.unbind(a),delete i.rootEvents)})),i.rootEvents[t])return;a==e.getBody()&&(a=o.select(n)[0],i.eventRootElm=a),i.rootEvents[t]=!0,o.bind(a,t,function(e){
for(var n=e.target,r=i.editors,a=r.length;a--;){var s=r[a].getBody();(s===n||o.isChildOf(n,s))&&(r[a].hidden||r[a].fire(t,e))}})}else e.dom.bind(a,t,function(n){e.hidden||e.fire(t,n)})}var o=t.DOM,a={bindPendingEventDelegates:function(){var e=this;n.each(e._pendingNativeEvents,function(t){i(e,t)})},toggleNativeEvent:function(e,t){var n=this;n.settings.readonly||"focus"!=e&&"blur"!=e&&(t?n.initialized?i(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&n.dom.unbind(r(n,e),e))}};return a=n.extend({},e,a)}),r(ut,[u,d],function(e,t){var n=e.each,r=e.explode,i={f9:120,f10:121,f11:122};return function(o){var a=this,s={};o.on("keyup keypress keydown",function(e){(e.altKey||e.ctrlKey||e.metaKey)&&n(s,function(n){var r=t.mac?e.metaKey:e.ctrlKey;if(n.ctrl==r&&n.alt==e.altKey&&n.shift==e.shiftKey)return e.keyCode==n.keyCode||e.charCode&&e.charCode==n.
charCode?(e.preventDefault(),"keydown"==e.type&&n.func.call(n.scope),!0):void 0})}),a.add=function(t,a,l,c){var u;return u=l,"string"==typeof l?l=function(){o.execCommand(u,!1,null)}:e.isArray(u)&&(l=function(){o.execCommand(u[0],u[1],u[2])}),n(r(t.toLowerCase()),function(e){var t={func:l,scope:c||o,desc:o.translate(a),alt:!1,ctrl:!1,shift:!1};n(r(e,"+"),function(e){switch(e){case"alt":case"ctrl":case"shift":t[e]=!0;break;default:/^[0-9]{2,}$/.test(e)?t.keyCode=parseInt(e,10):(t.charCode=e.charCodeAt(0),t.keyCode=i[e]||e.toUpperCase().charCodeAt(0))}}),s[(t.ctrl?"ctrl":"")+","+(t.alt?"alt":"")+","+(t.shift?"shift":"")+","+t.keyCode]=t}),!0}}}),r(dt,[y,f,C,w,_,R,T,H,O,I,F,z,W,V,b,l,at,E,k,st,d,u,ct,ut],function(e,n,r,i,o,a,s,l,c,u,d,f,p,h,m,g,v,y,b,C,x,w,_,E){function N(e,t,i){var o=this,a,s;a=o.documentBaseUrl=i.documen
tBaseURL,s=i.baseURI,o.settings=t=R({id:e,theme:"modern",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:a,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"<!DOCTYPE html>",visual:!0,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,padd_empty_editor:!0,render_ui:!0,indentation:"30px",inline_styles:!0,convert_fonts_to_spans:!0,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,ol,li,dl,dt
,dd,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",validate:!0,entity_encoding:"named",url_converter:o.convertURL,url_converter_scope:o,ie7_compat:!0},t),r.language=t.language||"en",r.languageLoad=t.language_load,r.baseURL=i.baseURL,o.id=t.id=e,o.isNotDirty=!0,o.plugins={},o.documentBaseURI=new h(t.document_base_url||a,{base_uri:s}),o.baseURI=s,o.contentCSS=[],o.contentStyles=[],o.shortcuts=new E(o),o.execCommands={},o.queryStateCommands={},o.queryValueCommands={},o.loadedCSS={},t.target&&(o.targetElm=t.target),o.suffix=i.suffix,o.editorManager=i,o.inline=t.inline,i.fire("SetupEditor",o),o.execCallback("setup",o),o.$=n.overrideDefaults(function(){return{context:o.inline?o.getBody():o.getDoc(),element:o.getBody()}})}var k=e.DOM,S=r.ThemeManager,T=r.PluginManager,R=w.extend,A=w.each,B=w.explode,D=w.inArray,L=w.trim,H=w.resolve,M=g.Event,P=x.gecko,O=x.ie;return N.prototype={render:functi
on(){function e(){k.unbind(window,"ready",e),n.render()}function t(){var e=m.ScriptLoader;if(r.language&&"en"!=r.language&&!r.language_url&&(r.language_url=n.editorManager.baseURL+"/langs/"+r.language+".js"),r.language_url&&e.add(r.language_url),r.theme&&"function"!=typeof r.theme&&"-"!=r.theme.charAt(0)&&!S.urls[r.theme]){var t=r.theme_url;t=t?n.documentBaseURI.toAbsolute(t):"themes/"+r.theme+"/theme"+o+".js",S.load(r.theme,t)}w.isArray(r.plugins)&&(r.plugins=r.plugins.join(" ")),A(r.external_plugins,function(e,t){T.load(t,e),r.plugins+=" "+t}),A(r.plugins.split(/[ ,]/),function(e){if(e=L(e),e&&!T.urls[e])if("-"==e.charAt(0)){e=e.substr(1,e.length);var t=T.dependencies(e);A(t,function(e){var t={prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"};e=T.createUrl(t
,e),T.load(e.resource,e)})}else T.load(e,{prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"})}),e.loadQueue(function(){n.removed||n.init()})}var n=this,r=n.settings,i=n.id,o=n.suffix;if(!M.domLoaded)return void k.bind(window,"ready",e);if(n.getElement()&&x.contentEditable){r.inline?n.inline=!0:(n.orgVisibility=n.getElement().style.visibility,n.getElement().style.visibility="hidden");
+var a=n.getElement().form||k.getParent(i,"form");a&&(n.formElement=a,r.hidden_input&&!/TEXTAREA|INPUT/i.test(n.getElement().nodeName)&&(k.insertAfter(k.create("input",{type:"hidden",name:i}),i),n.hasHiddenInput=!0),n.formEventDelegate=function(e){n.fire(e.type,e)},k.bind(a,"submit reset",n.formEventDelegate),n.on("reset",function(){n.setContent(n.startContent,{format:"raw"})}),!r.submit_patch||a.submit.nodeType||a.submit.length||a._mceOldSubmit||(a._mceOldSubmit=a.submit,a.submit=function(){return n.editorManager.triggerSave(),n.isNotDirty=!0,a._mceOldSubmit(a)})),n.windowManager=new v(n),"xml"==r.encoding&&n.on("GetContent",function(e){e.save&&(e.content=k.encode(e.content))}),r.add_form_submit_trigger&&n.on("submit",function(){n.initialized&&n.save()}),r.add_unload_trigger&&(n._beforeUnload=function(){!n.initialized||n.destroyed|
|n.isHidden()||n.save({format:"raw",no_events:!0,set_dirty:!1})},n.editorManager.on("BeforeUnload",n._beforeUnload)),t()}},init:function(){function e(n){var r=T.get(n),i,o;i=T.urls[n]||t.documentBaseUrl.replace(/\/$/,""),n=L(n),r&&-1===D(m,n)&&(A(T.dependencies(n),function(t){e(t)}),o=new r(t,i,t.$),t.plugins[n]=o,o.init&&(o.init(t,i),m.push(n)))}var t=this,n=t.settings,r=t.getElement(),i,o,a,s,l,c,u,d,f,p,h,m=[];if(t.rtl=this.editorManager.i18n.rtl,t.editorManager.add(t),n.aria_label=n.aria_label||k.getAttrib(r,"aria-label",t.getLang("aria.rich_text_area")),n.theme&&("function"!=typeof n.theme?(n.theme=n.theme.replace(/-/,""),c=S.get(n.theme),t.theme=new c(t,S.urls[n.theme]),t.theme.init&&t.theme.init(t,S.urls[n.theme]||t.documentBaseUrl.replace(/\/$/,""),t.$)):t.theme=n.theme),A(n.plugins.replace(/\-/g,"").split(/[ ,]/),e),n.render_ui&&t.theme&a
mp;&(t.orgDisplay=r.style.display,"function"!=typeof n.theme?(i=n.width||r.style.width||r.offsetWidth,o=n.height||r.style.height||r.offsetHeight,a=n.min_height||100,p=/^[0-9\.]+(|px)$/i,p.test(""+i)&&(i=Math.max(parseInt(i,10),100)),p.test(""+o)&&(o=Math.max(parseInt(o,10),a)),l=t.theme.renderUI({targetNode:r,width:i,height:o,deltaWidth:n.delta_width,deltaHeight:n.delta_height}),n.content_editable||(o=(l.iframeHeight||o)+("number"==typeof o?l.deltaHeight||0:""),a>o&&(o=a))):(l=n.theme(t,r),l.editorContainer.nodeType&&(l.editorContainer=l.editorContainer.id=l.editorContainer.id||t.id+"_parent"),l.iframeContainer.nodeType&&(l.iframeContainer=l.iframeContainer.id=l.iframeContainer.id||t.id+"_iframecontainer"),o=l.iframeHeight||r.offsetHeight),t.editorContainer=l.editorContainer),n.content_css&&A(B(n.content_css),function(e){t.contentCSS.push(t.documentBaseURI.toA
bsolute(e))}),n.content_style&&t.contentStyles.push(n.content_style),n.content_editable)return r=s=l=null,t.initContentBody();for(t.iframeHTML=n.doctype+"<html><head>",n.document_base_url!=t.documentBaseUrl&&(t.iframeHTML+='<base href="'+t.documentBaseURI.getURI()+'" />'),!x.caretAfter&&n.ie7_compat&&(t.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" />'),t.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',h=0;h<t.contentCSS.length;h++){var g=t.contentCSS[h];t.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+g+'" />',t.loadedCSS[g]=!0}d=n.body_id||"tinymce",-1!=d.indexOf("=")&&(d=t.getParam("body_id","","hash"),d=d[t.id]||d),f=n.body_class||"",-1!=f.indexOf("=")&&(f=t.getParam(&quo
t;body_class","","hash"),f=f[t.id]||""),t.iframeHTML+='</head><body id="'+d+'" class="mce-content-body '+f+'" data-id="'+t.id+'"><br></body></html>';var v='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody(true);})()';document.domain!=location.hostname&&(u=v);var y=k.create("iframe",{id:t.id+"_ifr",frameBorder:"0",allowTransparency:"true",title:t.editorManager.translate("Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help"),style:{width:"100%",height:o,display:"block"}});if(y.onload=function(){y.onload=null,t.fire("load")},k.setAttrib("src",u||'javascript:""'),s=k.add(l.iframeContainer,y),O)t
ry{t.getDoc()}catch(b){s.src=u=v}t.contentAreaContainer=l.iframeContainer,t.iframeElement=y,l.editorContainer&&(k.get(l.editorContainer).style.display=t.orgDisplay,t.hidden=k.isHidden(l.editorContainer)),t.getElement().style.display="none",k.setAttrib(t.id,"aria-hidden",!0),u||t.initContentBody(),r=s=l=null},initContentBody:function(t){var n=this,r=n.settings,s=n.getElement(),h=n.getDoc(),m,g;r.inline||(n.getElement().style.visibility=n.orgVisibility),t||r.content_editable||(h.open(),h.write(n.iframeHTML),h.close()),r.content_editable&&(n.on("remove",function(){var e=this.getBody();k.removeClass(e,"mce-content-body"),k.removeClass(e,"mce-edit-focus"),k.setAttrib(e,"contentEditable",null)}),k.addClass(s,"mce-content-body"),n.contentDocument=h=r.content_document||document,n.contentWindow=r.content_window||window,n.bodyElement=s,r.content_document=r.content_window=null,r.root_name=s.nodeName.toLowerCa
se()),m=n.getBody(),m.disabled=!0,r.readonly||(n.inline&&"static"==k.getStyle(m,"position",!0)&&(m.style.position="relative"),m.contentEditable=n.getParam("content_editable_state",!0)),m.disabled=!1,n.schema=new y(r),n.dom=new e(h,{keep_values:!0,url_converter:n.convertURL,url_converter_scope:n,hex_colors:r.force_hex_style_colors,class_filter:r.class_filter,update_styles:!0,root_element:n.inline?n.getBody():null,collect:r.content_editable,schema:n.schema,onSetAttrib:function(e){n.fire("SetAttrib",e)}}),n.parser=new b(r,n.schema),n.parser.addAttributeFilter("src,href,style,tabindex",function(e,t){for(var r=e.length,i,o=n.dom,a,s;r--;)i=e[r],a=i.attr(t),s="data-mce-"+t,i.attributes.map[s]||("style"===t?(a=o.serializeStyle(o.parseStyle(a),i.name),a.length||(a=null),i.attr(s,a),i.attr(t,a)):"tabindex"===t?(i.attr(s,a),i.attr(t,null)):i.attr(s,n.convertURL(a,t,i.name)))}),n.parser.ad
dNodeFilter("script",function(e){for(var t=e.length,n;t--;)n=e[t],n.attr("type","mce-"+(n.attr("type")||"no/type"))}),n.parser.addNodeFilter("#cdata",function(e){for(var t=e.length,n;t--;)n=e[t],n.type=8,n.name="#comment",n.value="[CDATA["+n.value+"]]"}),n.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var t=e.length,r,i=n.schema.getNonEmptyElements();t--;)r=e[t],r.isEmpty(i)&&(r.append(new o("br",1)).shortEnded=!0)}),n.serializer=new a(r,n),n.selection=new l(n.dom,n.getWin(),n.serializer,n),n.formatter=new c(n),n.undoManager=new u(n),n.forceBlocks=new f(n),n.enterKey=new d(n),n.editorCommands=new p(n),n._nodeChangeDispatcher=new i(n),n.fire("PreInit"),r.browser_spellcheck||r.gecko_spellcheck||(h.body.spellcheck=!1,k.setAttrib(m,"spellcheck","false")),n.fire("PostRender"),n.quirks=new C(n),r.directionality&&
amp;(m.dir=r.directionality),r.nowrap&&(m.style.whiteSpace="nowrap"),r.protect&&n.on("BeforeSetContent",function(e){A(r.protect,function(t){e.content=e.content.replace(t,function(e){return"<!--mce:protected "+escape(e)+"-->"})})}),n.on("SetContent",function(){n.addVisual(n.getBody())}),r.padd_empty_editor&&n.on("PostProcess",function(e){e.content=e.content.replace(/^(<p[^>]*>( | |\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")}),n.load({initial:!0,format:"html"}),n.startContent=n.getContent({format:"raw"}),n.initialized=!0,n.bindPendingEventDelegates(),n.fire("init"),n.focus(!0),n.nodeChanged({initial:!0}),n.execCallback("init_instance_callback",n),n.contentStyles.length>0&&(g="",A(n.contentStyles,function(e){g+=e+"\r\n"}),n.dom.addStyle(g)),A(n.contentCSS,function(e){n.loadedCS
S[e]||(n.dom.loadCSS(e),n.loadedCSS[e]=!0)}),r.auto_focus&&setTimeout(function(){var e=n.editorManager.get(r.auto_focus);e.selection.select(e.getBody(),1),e.selection.collapse(1),e.getBody().focus(),e.getWin().focus()},100),s=h=m=null},focus:function(e){var t,n=this,r=n.selection,i=n.settings.content_editable,o,a,s=n.getDoc(),l;if(!e){if(o=r.getRng(),o.item&&(a=o.item(0)),n._refreshContentEditable(),i||(x.opera||n.getBody().focus(),n.getWin().focus()),P||i){if(l=n.getBody(),l.setActive)try{l.setActive()}catch(c){l.focus()}else l.focus();i&&r.normalize()}a&&a.ownerDocument==s&&(o=s.body.createControlRange(),o.addElement(a),o.select())}n.editorManager.activeEditor!=n&&((t=n.editorManager.activeEditor)&&t.fire("deactivate",{relatedTarget:n}),n.fire("activate",{relatedTarget:t})),n.editorManager.activeEditor=n},execCallback:function(e){var t=this,n=t.settings[e],r;if(n)return t.callbackLookup&&(r=t.callb
ackLookup[e])&&(n=r.func,r=r.scope),"string"==typeof n&&(r=n.replace(/\.\w+$/,""),r=r?H(r):0,n=H(n),t.callbackLookup=t.callbackLookup||{},t.callbackLookup[e]={func:n,scope:r}),n.apply(r||t,Array.prototype.slice.call(arguments,1))},translate:function(e){var t=this.settings.language||"en",n=this.editorManager.i18n;return e?n.data[t+"."+e]||e.replace(/\{\#([^\}]+)\}/g,function(e,r){return n.data[t+"."+r]||"{#"+r+"}"}):""},getLang:function(e,n){return this.editorManager.i18n.data[(this.settings.language||"en")+"."+e]||(n!==t?n:"{#"+e+"}")},getParam:function(e,t,n){var r=e in this.settings?this.settings[e]:t,i;return"hash"===n?(i={},"string"==typeof r?A(r.split(r.indexOf("=")>0?/[;,](?![^=;,]*(?:[;,]|$))/:","),function(e){e=e.split("="),i[L(e[0])]=L(e.length>1?e[1]:e)}):i=r,i):r},nodeChanged:functio
n(e){this._nodeChangeDispatcher.nodeChanged(e)},addButton:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),t.text||t.icon||(t.icon=e),n.buttons=n.buttons||{},t.tooltip=t.tooltip||t.title,n.buttons[e]=t},addMenuItem:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),n.menuItems=n.menuItems||{},n.menuItems[e]=t},addCommand:function(e,t,n){this.execCommands[e]={func:t,scope:n||this}},addQueryStateHandler:function(e,t,n){this.queryStateCommands[e]={func:t,scope:n||this}},addQueryValueHandler:function(e,t,n){this.queryValueCommands[e]={func:t,scope:n||this}},addShortcut:function(e,t,n,r){this.shortcuts.add(e,t,n,r)},execCommand:function(e,t,n,r){var i=this,o=0,a;if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(e)||r&&r.skip_focus||i.focus(),r=R({},r),r=i.fire("BeforeExecCommand",{command:e,ui:t,value:n}),r.isDefaultPrevented())return!1;if((a=i.execCommands[e])&&a.func
.call(a.scope,t,n)!==!0)return i.fire("ExecCommand",{command:e,ui:t,value:n}),!0;if(A(i.plugins,function(r){return r.execCommand&&r.execCommand(e,t,n)?(i.fire("ExecCommand",{command:e,ui:t,value:n}),o=!0,!1):void 0}),o)return o;if(i.theme&&i.theme.execCommand&&i.theme.execCommand(e,t,n))return i.fire("ExecCommand",{command:e,ui:t,value:n}),!0;if(i.editorCommands.execCommand(e,t,n))return i.fire("ExecCommand",{command:e,ui:t,value:n}),!0;try{o=i.getDoc().execCommand(e,t,n)}catch(s){}return o?(i.fire("ExecCommand",{command:e,ui:t,value:n}),!0):!1},queryCommandState:function(e){var t=this,n,r;if(!t._isHidden()){if((n=t.queryStateCommands[e])&&(r=n.func.call(n.scope),r===!0||r===!1))return r;if(r=t.editorCommands.queryCommandState(e),-1!==r)return r;try{return t.getDoc().queryCommandState(e)}catch(i){}}},queryCommandValue:function(e){var n=this,r,i;if(!n._isHidden()){if((r=n.queryValueCommands[e])&&
;(i=r.func.call(r.scope),i!==!0))return i;if(i=n.editorCommands.queryCommandValue(e),i!==t)return i;try{return n.getDoc().queryCommandValue(e)}catch(o){}}},show:function(){var e=this;e.hidden&&(e.hidden=!1,e.inline?e.getBody().contentEditable=!0:(k.show(e.getContainer()),k.hide(e.id)),e.load(),e.fire("show"))},hide:function(){var e=this,t=e.getDoc();e.hidden||(O&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable=!1,e==e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(k.hide(e.getContainer()),k.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.fire("hide"))},isHidden:function(){return!!this.hidden},setProgressState:function(e,t){this.fire("ProgressState",{state:e,time:t})},load:function(e){var n=this,r=n.getElement(),i;return r?(e=e||{},e.load=!0,i=n.setContent(r.value!==t?r.value:r.innerHTML,e),e.element=r,e.no_events||n.fire("Lo
adContent",e),e.element=r=null,i):void 0},save:function(e){var t=this,n=t.getElement(),r,i;if(n&&t.initialized)return e=e||{},e.save=!0,e.element=n,r=e.content=t.getContent(e),e.no_events||t.fire("SaveContent",e),r=e.content,/TEXTAREA|INPUT/i.test(n.nodeName)?n.value=r:(t.inline||(n.innerHTML=r),(i=k.getParent(t.id,"form"))&&A(i.elements,function(e){return e.name==t.id?(e.value=r,!1):void 0})),e.element=n=null,e.set_dirty!==!1&&(t.isNotDirty=!0),r},setContent:function(e,t){var n=this,r=n.getBody(),i;return t=t||{},t.format=t.format||"html",t.set=!0,t.content=e,t.no_events||n.fire("BeforeSetContent",t),e=t.content,0===e.length||/^\s+$/.test(e)?(i=n.settings.forced_root_block,i&&n.schema.isValidChild(r.nodeName.toLowerCase(),i.toLowerCase())?(e=O&&11>O?"":'<br data-mce-bogus="1">',e=n.dom.createHTML(i,n.settings.forced_root_block_attrs,e)):O||(e='<br data-mce-bogus=&quo
t;1">'),n.dom.setHTML(r,e),n.fire("SetContent",t)):("raw"!==t.format&&(e=new s({},n.schema).serialize(n.parser.parse(e,{isRootContent:!0}))),t.content=L(e),n.dom.setHTML(r,t.content),t.no_events||n.fire("SetContent",t)),t.content},getContent:function(e){var t=this,n,r=t.getBody();return e=e||{},e.format=e.format||"html",e.get=!0,e.getInner=!0,e.no_events||t.fire("BeforeGetContent",e),n="raw"==e.format?r.innerHTML:"text"==e.format?r.innerText||r.textContent:t.serializer.serialize(r,e),e.content="text"!=e.format?L(n):n,e.no_events||t.fire("GetContent",e),e.content},insertContent:function(e,t){t&&(e=R({content:e},t)),this.execCommand("mceInsertContent",!1,e)},isDirty:function(){return!this.isNotDirty},getContainer:function(){var e=this;return e.container||(e.container=k.get(e.editorContainer||e.id+"_parent")),e.container},getContentAreaContainer:function
(){return this.contentAreaContainer},getElement:function(){return this.targetElm||(this.targetElm=k.get(this.id)),this.targetElm},getWin:function(){var e=this,t;return e.contentWindow||(t=e.iframeElement,t&&(e.contentWindow=t.contentWindow)),e.contentWindow},getDoc:function(){var e=this,t;return e.contentDocument||(t=e.getWin(),t&&(e.contentDocument=t.document)),e.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(e,t,n){var r=this,i=r.settings;return i.urlconverter_callback?r.execCallback("urlconverter_callback",e,n,!0,t):!i.convert_urls||n&&"LINK"==n.nodeName||0===e.indexOf("file:")||0===e.length?e:i.relative_urls?r.documentBaseURI.toRelative(e):e=r.documentBaseURI.toAbsolute(e,i.remove_script_host)},addVisual:function(e){var n=this,r=n.settings,i=n.dom,o;e=e||n.getBody(),n.hasVisual===t&&(n.hasVisual=r.visual),A(i.select("table,a",e),function(e){var t;switch(e
.nodeName){case"TABLE":return o=r.visual_table_class||"mce-item-table",t=i.getAttrib(e,"border"),void(t&&"0"!=t||!n.hasVisual?i.removeClass(e,o):i.addClass(e,o));case"A":return void(i.getAttrib(e,"href",!1)||(t=i.getAttrib(e,"name")||e.id,o=r.visual_anchor_class||"mce-item-anchor",t&&n.hasVisual?i.addClass(e,o):i.removeClass(e,o)))}}),n.fire("VisualAid",{element:e,hasVisual:n.hasVisual})},remove:function(){var e=this;if(!e.removed){e.save(),e.removed=1,e.hasHiddenInput&&k.remove(e.getElement().nextSibling),e.inline||(O&&10>O&&e.getDoc().execCommand("SelectAll",!1,null),k.setStyle(e.id,"display",e.orgDisplay),e.getBody().onload=null,M.unbind(e.getWin()),M.unbind(e.getDoc()));var t=e.getContainer();M.unbind(e.getBody()),M.unbind(t),e.fire("remove"),e.editorManager.remove(e),k.remove(t),e.destroy()}},destroy:function(e){var t
=this,n;if(!t.destroyed){if(!e&&!t.removed)return void t.remove();e&&P&&(M.unbind(t.getDoc()),M.unbind(t.getWin()),M.unbind(t.getBody())),e||(t.editorManager.off("beforeunload",t._beforeUnload),t.theme&&t.theme.destroy&&t.theme.destroy(),t.selection.destroy(),t.dom.destroy()),n=t.formElement,n&&(n._mceOldSubmit&&(n.submit=n._mceOldSubmit,n._mceOldSubmit=null),k.unbind(n,"submit reset",t.formEventDelegate)),t.contentAreaContainer=t.formElement=t.container=t.editorContainer=null,t.bodyElement=t.contentDocument=t.contentWindow=null,t.iframeElement=t.targetElm=null,t.selection&&(t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null),t.destroyed=1}},_refreshContentEditable:function(){var e=this,t,n;e._isHidden()&&(t=e.getBody(),n=t.parentNode,n.removeChild(t),n.appendChild(t),t.focus())},_isHidden:function(){var e;return P?(e=this.selection.getSel(),!e||!e.rangeCount||0===e.rangeCou
nt):0}},R(N.prototype,_),N}),r(ft,[],function(){var e={};return{rtl:!1,add:function(t,n){for(var r in n)e[r]=n[r];this.rtl=this.rtl||"rtl"===e._dir},translate:function(t){if("undefined"==typeof t)return t;if("string"!=typeof t&&t.raw)return t.raw;if(t.push){var n=t.slice(1);t=(e[t[0]]||t[0]).replace(/\{([^\}]+)\}/g,function(e,t){return n[t]})}return e[t]||t},data:e}}),r(pt,[y,d],function(e,t){function n(e){function s(){try{return document.activeElement}catch(e){return document.body}}function l(e,t){if(t&&t.startContainer){if(!e.isChildOf(t.startContainer,e.getRoot())||!e.isChildOf(t.endContainer,e.getRoot()))return;return{startContainer:t.startContainer,startOffset:t.startOffset,endContainer:t.endContainer,endOffset:t.endOffset}}return t}function c(e,t){var n;return t.startContainer?(n=e.getDoc().createRange(),n.setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset)):n=t,n}function u(e){return!!a.getParent(e,n.isEd
itorUIElement)}function d(n){var d=n.editor;d.on("init",function(){(d.inline||t.ie)&&("onbeforedeactivate"in document&&t.ie<9?d.dom.bind(d.getBody(),"beforedeactivate",function(){try{d.lastRng=d.selection.getRng()}catch(e){}}):d.on("nodechange mouseup keyup",function(e){var t=s();"nodechange"==e.type&&e.selectionChange||(t&&t.id==d.id+"_ifr"&&(t=d.getBody()),d.dom.isChildOf(t,d.getBody())&&(d.lastRng=d.selection.getRng()))}),t.webkit&&!r&&(r=function(){var t=e.activeEditor;if(t&&t.selection){var n=t.selection.getRng();n&&!n.collapsed&&(d.lastRng=n)}},a.bind(document,"selectionchange",r)))}),d.on("setcontent",function(){d.lastRng=null}),d.on("mousedown",function(){d.selection.lastFocusBookmark=null}),d.on("focusin",function(){var t=e.focusedEditor;d.selection.lastFocusBookmark&&(d.selecti
on.setRng(c(d,d.selection.lastFocusBookmark)),d.selection.lastFocusBookmark=null),t!=d&&(t&&t.fire("blur",{focusedEditor:d}),e.activeEditor=d,e.focusedEditor=d,d.fire("focus",{blurredEditor:t}),d.focus(!0)),d.lastRng=null}),d.on("focusout",function(){window.setTimeout(function(){var t=e.focusedEditor;u(s())||t!=d||(d.fire("blur",{focusedEditor:null}),e.focusedEditor=null,d.selection&&(d.selection.lastFocusBookmark=null))},0)}),i||(i=function(t){var n=e.activeEditor;n&&t.target.ownerDocument==document&&(n.selection&&t.target!=n.getBody()&&(n.selection.lastFocusBookmark=l(n.dom,n.lastRng)),u(t.target)||e.focusedEditor!=n||(n.fire("blur",{focusedEditor:null}),e.focusedEditor=null))},a.bind(document,"focusin",i)),d.inline&&!o&&(o=function(t){var n=e.activeEditor;if(n.inline&&!n.dom.isChildOf(t.target,n.getBody())){var r=n.selection.getRng();r.collap
sed||(n.lastRng=r)}},a.bind(document,"mouseup",o))}function f(t){e.focusedEditor==t.editor&&(e.focusedEditor=null),e.activeEditor||(a.unbind(document,"selectionchange",r),a.unbind(document,"focusin",i),a.unbind(document,"mouseup",o),r=i=o=null)}e.on("AddEditor",d),e.on("RemoveEditor",f)}var r,i,o,a=e.DOM;return n.isEditorUIElement=function(e){return-1!==e.className.toString().indexOf("mce-")},n}),r(ht,[dt,f,y,V,d,u,lt,ft,pt],function(e,t,n,r,i,o,a,s,l){function c(e){var t=v.editors,n;delete t[e.id];for(var r=0;r<t.length;r++)if(t[r]==e){t.splice(r,1),n=!0;break}return v.activeEditor==e&&(v.activeEditor=t[0]),v.focusedEditor==e&&(v.focusedEditor=null),n}function u(e){return e&&!(e.getContainer()||e.getBody()).parentNode&&(c(e),e.destroy(!0),e=null),e}var d=n.DOM,f=o.explode,p=o.each,h=o.extend,m=0,g,v;return v={$:t,majorVersion:"4",minorVersion:"1.2",re
leaseDate:"2014-07-15",editors:[],i18n:s,activeEditor:null,setup:function(){var e=this,t,n,i="",o,a;if(n=document.location.href,/^[^:]+:\/\/\/?[^\/]+\//.test(n)&&(n=n.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(n)||(n+="/")),o=window.tinymce||window.tinyMCEPreInit)t=o.base||o.baseURL,i=o.suffix;else{for(var s=document.getElementsByTagName("script"),c=0;c<s.length;c++)if(a=s[c].src,/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(a)){-1!=a.indexOf(".min")&&(i=".min"),t=a.substring(0,a.lastIndexOf("/"));break}!t&&document.currentScript&&(a=document.currentScript.src,-1!=a.indexOf(".min")&&(i=".min"),t=a.substring(0,a.lastIndexOf("/")))}e.baseURL=new r(n).toAbsolute(t),e.documentBaseURL=n,e.baseURI=new r(e.baseURL),e.suffix=i,e.focusManager=new l(e)},init:function(t){function n(e){var t=e.id;return t||
(t=e.name,t=t&&!d.get(t)?e.name:d.uniqueId(),e.setAttribute("id",t)),t}function r(t,n,r){if(!u(s.get(t))){var i=new e(t,n,s);i.targetElm=i.targetElm||r,l.push(i),i.render()}}function i(e){var n=t[e];if(n)return n.apply(s,Array.prototype.slice.call(arguments,2))}function o(e,t){return t.constructor===RegExp?t.test(e.className):d.hasClass(e,t)}function a(){var u,g;if(d.unbind(window,"ready",a),i("onpageload"),t.types)return void p(t.types,function(e){p(d.select(e.selector),function(i){r(n(i),h({},t,e),i)})});if(t.selector)return void p(d.select(t.selector),function(e){r(n(e),t,e)});switch(t.target&&r(n(t.target),t),t.mode){case"exact":u=t.elements||"",u.length>0&&p(f(u),function(n){d.get(n)?(c=new e(n,t,s),l.push(c),c.render()):p(document.forms,function(e){p(e.elements,function(e){e.name===n&&(n="mce_editor_"+m++,d.setAttrib(e,"id",n),r(n,t,e))})})});break;case"textareas"
:case"specific_textareas":p(d.select("textarea"),function(e){t.editor_deselector&&o(e,t.editor_deselector)||(!t.editor_selector||o(e,t.editor_selector))&&r(n(e),t,e)})}t.oninit&&(u=g=0,p(l,function(e){g++,e.initialized?u++:e.on("init",function(){u++,u==g&&i("oninit")}),u==g&&i("oninit")}))}var s=this,l=[],c;s.settings=t,d.bind(window,"ready",a)},get:function(e){return arguments.length?e in this.editors?this.editors[e]:null:this.editors},add:function(e){var t=this,n=t.editors;return n[e.id]=e,n.push(e),t.activeEditor=e,t.fire("AddEditor",{editor:e}),g||(g=function(){t.fire("BeforeUnload")},d.bind(window,"beforeunload",g)),e},createEditor:function(t,n){return this.add(new e(t,n,this))},remove:function(e){var t=this,n,r=t.editors,i;{if(e)return"string"==typeof e?(e=e.selector||e,void p(d.select(e),function(e){i=r[e.id],i&&t.remove(i)})):(i=
e,r[i.id]?(c(i)&&t.fire("RemoveEditor",{editor:i}),r.length||d.unbind(window,"beforeunload",g),i.remove(),i):null);for(n=r.length-1;n>=0;n--)t.remove(r[n])}},execCommand:function(t,n,r){var i=this,o=i.get(r);switch(t){case"mceAddEditor":return i.get(r)||new e(r,i.settings,i).render(),!0;case"mceRemoveEditor":return o&&o.remove(),!0;case"mceToggleEditor":return o?(o.isHidden()?o.show():o.hide(),!0):(i.execCommand("mceAddEditor",0,r),!0)}return i.activeEditor?i.activeEditor.execCommand(t,n,r):!1},triggerSave:function(){p(this.editors,function(e){e.save()})},addI18n:function(e,t){s.add(e,t)},translate:function(e){return s.translate(e)}},h(v,a),v.setup(),window.tinymce=window.tinyMCE=v,v}),r(mt,[ht,u],function(e,t){var n=t.each,r=t.explode;e.on("AddEditor",function(e){var t=e.editor;t.on("preInit",function(){function e(e,t){n(t,function(t,n){t&&s.setStyle(e,n,t)}),s.rename(e,"
span")}function i(e){s=t.dom,l.convert_fonts_to_spans&&n(s.select("font,u,strike",e.node),function(e){o[e.nodeName.toLowerCase()](s,e)})}var o,a,s,l=t.settings;l.inline_styles&&(a=r(l.font_size_legacy_values),o={font:function(t,n){e(n,{backgroundColor:n.style.backgroundColor,color:n.color,fontFamily:n.face,fontSize:a[parseInt(n.size,10)-1]})},u:function(t,n){e(n,{textDecoration:"underline"})},strike:function(t,n){e(n,{textDecoration:"line-through"})}},t.on("PreProcess SetContent",i))})})}),r(gt,[],function(){return{send:function(e){function t(){!e.async||4==n.readyState||r++>1e4?(e.success&&1e4>r&&200==n.status?e.success.call(e.success_scope,""+n.responseText,n,e):e.error&&e.error.call(e.error_scope,r>1e4?"TIMED_OUT":"GENERAL",n,e),n=null):setTimeout(t,10)}var n,r=0;if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e
.scope,e.async=e.async===!1?!1:!0,e.data=e.data||"",n=new XMLHttpRequest){if(n.overrideMimeType&&n.overrideMimeType(e.content_type),n.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(n.withCredentials=!0),e.content_type&&n.setRequestHeader("Content-Type",e.content_type),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.send(e.data),!e.async)return t();setTimeout(t,10)}}}}),r(vt,[],function(){function e(t,n){var r,i,o,a;if(n=n||'"',null===t)return"null";if(o=typeof t,"string"==o)return i="\bb t\nn\ff\rr\"\"''\\\\",n+t.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,t){return'"'===n&&"'"===e?e:(r=i.indexOf(t),r+1?"\\"+i.charAt(r+1):(e=t.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e))})+n;if("object"==o){if(t.hasOwnProperty&&"[object
Array]"===Object.prototype.toString.call(t)){for(r=0,i="[";r<t.length;r++)i+=(r>0?",":"")+e(t[r],n);return i+"]"}i="{";for(a in t)t.hasOwnProperty(a)&&(i+="function"!=typeof t[a]?(i.length>1?","+n:n)+a+n+":"+e(t[a],n):"");return i+"}"}return""+t}return{serialize:e,parse:function(e){try{return window[String.fromCharCode(101)+"val"]("("+e+")")}catch(t){}}}}),r(yt,[vt,gt,u],function(e,t,n){function r(e){this.settings=i({},e),this.count=0}var i=n.extend;return r.sendRPC=function(e){return(new r).send(e)},r.prototype={send:function(n){var r=n.error,o=n.success;n=i(this.settings,n),n.success=function(t,i){t=e.parse(t),"undefined"==typeof t&&(t={error:"JSON Parse error."}),t.error?r.call(n.error_scope||n.scope,t.error,i):o.call(n.success_scope||n.scope,t.result)},n.error=function(e,t){r&&r.call
(n.error_scope||n.scope,e,t)},n.data=e.serialize({id:n.id||"c"+this.count++,method:n.method,params:n.params}),n.content_type="application/json",t.send(n)}},r}),r(bt,[y],function(e){return{callbacks:{},count:0,send:function(n){var r=this,i=e.DOM,o=n.count!==t?n.count:r.count,a="tinymce_jsonp_"+o;r.callbacks[o]=function(e){i.remove(a),delete r.callbacks[o],n.callback(e)},i.add(i.doc.body,"script",{id:a,src:n.url,type:"text/javascript"}),r.count++}}}),r(Ct,[],function(){function e(){s=[];for(var e in a)s.push(e);i.length=s.length}function n(){function n(e){var n,r;return r=e!==t?u+e:i.indexOf(",",u),-1===r||r>i.length?null:(n=i.substring(u,r),u=r+1,n)}var r,i,s,u=0;if(a={},c){o.load(l),i=o.getAttribute(l)||"";do{var d=n();if(null===d)break;if(r=n(parseInt(d,32)||0),null!==r){if(d=n(),null===d)break;s=n(parseInt(d,32)||0),r&&(a[r]=s)}}while(null!==r);e()}}function r(){var t,n="";if(c){for(var r in
a)t=a[r],n+=(n?",":"")+r.length.toString(32)+","+r+","+t.length.toString(32)+","+t;o.setAttribute(l,n);try{o.save(l)}catch(i){}e()}}var i,o,a,s,l,c;try{if(window.localStorage)return localStorage}catch(u){}return l="tinymce",o=document.documentElement,c=!!o.addBehavior,c&&o.addBehavior("#default#userData"),i={key:function(e){return s[e]},getItem:function(e){return e in a?a[e]:null},setItem:function(e,t){a[e]=""+t,r()},removeItem:function(e){delete a[e],r()},clear:function(){a={},r()}},n(),i}),r(xt,[y,l,b,C,u,d],function(e,t,n,r,i,o){var a=window.tinymce;return a.DOM=e.DOM,a.ScriptLoader=n.ScriptLoader,a.PluginManager=r.PluginManager,a.ThemeManager=r.ThemeManager,a.dom=a.dom||{},a.dom.Event=t.Event,i.each(i,function(e,t){a[t]=e}),i.each("isOpera isWebKit isIE isGecko isMac".split(" "),function(e){a[e]=o[e.substr(2).toLowerCase()]}),{}}),r(wt,[U,u],function(e,t){return e.extend(
{Defaults:{firstControlClass:"first",lastControlClass:"last"},init:function(e){this.settings=t.extend({},this.Defaults,e)},preRender:function(e){e.addClass(this.settings.containerClass,"body")},applyClasses:function(e){var t=this,n=t.settings,r,i,o;r=e.items().filter(":visible"),i=n.firstControlClass,o=n.lastControlClass,r.each(function(e){e.removeClass(i).removeClass(o),n.controlClass&&e.addClass(n.controlClass)}),r.eq(0).addClass(i),r.eq(-1).addClass(o)},renderHtml:function(e){var t=this,n=t.settings,r,i="";return r=e.items(),r.eq(0).addClass(n.firstControlClass),r.eq(-1).addClass(n.lastControlClass),r.each(function(e){n.controlClass&&e.addClass(n.controlClass),i+=e.renderHtml()}),i},recalc:function(){},postRender:function(){}})}),r(_t,[wt],function(e){return e.extend({Defaults:{containerClass:"abs-layout",controlClass:"abs-layout-item"},recalc:function(e){e.items().filter(":visible").e
ach(function(e){var t=e.settings;e.layoutRect({x:t.x,y:t.y,w:t.w,h:t.h}),e.recalc&&e.recalc()})},renderHtml:function(e){return'<div id="'+e._id+'-absend" class="'+e.classPrefix+'abs-end"></div>'+this._super(e)}})}),r(Et,[Y,tt],function(e,t){return e.extend({Mixins:[t],Defaults:{classes:"widget tooltip tooltip-n"},text:function(e){var t=this;return"undefined"!=typeof e?(t._value=e,t._rendered&&(t.getEl().lastChild.innerHTML=t.encode(e)),t):t._value},renderHtml:function(){var e=this,t=e.classPrefix;return'<div id="'+e._id+'" class="'+e.classes()+'" role="presentation"><div class="'+t+'tooltip-arrow"></div><div class="'+t+'tooltip-inner">'+e.encode(e._text)+"</div></div>"},repaint:function(){var e=this,t,n;t=e.getEl().style,n=e._layoutRect,t.left=n.x+"px",t.top=n.y+"px",t.zIndex=131070}})}),r(Nt,[Y,Et],fu
nction(e,t){var n,r=e.extend({init:function(e){var t=this;t._super(e),e=t.settings,t.canFocus=!0,e.tooltip&&r.tooltips!==!1&&(t.on("mouseenter",function(n){var r=t.tooltip().moveTo(-65535);if(n.control==t){var i=r.text(e.tooltip).show().testMoveRel(t.getEl(),["bc-tc","bc-tl","bc-tr"]);r.toggleClass("tooltip-n","bc-tc"==i),r.toggleClass("tooltip-nw","bc-tl"==i),r.toggleClass("tooltip-ne","bc-tr"==i),r.moveRel(t.getEl(),i)}else r.hide()}),t.on("mouseleave mousedown click",function(){t.tooltip().hide()})),t.aria("label",e.ariaLabel||e.tooltip)},tooltip:function(){return n||(n=new t({type:"tooltip"}),n.renderTo()),n},active:function(e){var t=this,n;return e!==n&&(t.aria("pressed",e),t.toggleClass("active",e)),t._super(e)},disabled:function(e){var t=this,n;return e!==n&&(t.aria("disabled",e),t.toggl
eClass("disabled",e)),t._super(e)},postRender:function(){var e=this,t=e.settings;e._rendered=!0,e._super(),e.parent()||!t.width&&!t.height||(e.initLayoutRect(),e.repaint()),t.autofocus&&e.focus()},remove:function(){this._super(),n&&(n.remove(),n=null)}});return r}),r(kt,[Nt],function(e){return e.extend({Defaults:{classes:"widget btn",role:"button"},init:function(e){var t=this,n;t.on("click mousedown",function(e){e.preventDefault()}),t._super(e),n=e.size,e.subtype&&t.addClass(e.subtype),n&&t.addClass("btn-"+n)},icon:function(e){var t=this,n=t.classPrefix;if("undefined"==typeof e)return t.settings.icon;if(t.settings.icon=e,e=e?n+"ico "+n+"i-"+t.settings.icon:"",t._rendered){var r=t.getEl().firstChild,i=r.getElementsByTagName("i")[0];e?(i&&i==r.firstChild||(i=document.createElement("i"),r.insertBefore(i,r.firstChild)),i.className=
e):i&&r.removeChild(i),t.text(t._text)}return t},repaint:function(){var e=this.getEl().firstChild.style;e.width=e.height="100%",this._super()},text:function(e){var t=this;if(t._rendered){var n=t.getEl().lastChild.lastChild;n&&(n.data=t.translate(e))}return t._super(e)},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.settings.icon,i;return i=e.settings.image,i?(r="none","string"!=typeof i&&(i=window.getSelection?i[0]:i[1]),i=" style=\"background-image: url('"+i+"')\""):i="",r=e.settings.icon?n+"ico "+n+"i-"+r:"",'<div id="'+t+'" class="'+e.classes()+'" tabindex="-1" aria-labelledby="'+t+'"><button role="presentation" type="button" tabindex="-1">'+(r?'<i class="'+r+'"'+i+"></i>":"")+(e._text?(r?"\xa0":"")+e.e
ncode(e._text):"")+"</button></div>"}})}),r(St,[J],function(e){return e.extend({Defaults:{defaultType:"button",role:"group"},renderHtml:function(){var e=this,t=e._layout;return e.addClass("btn-group"),e.preRender(),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes()+'"><div id="'+e._id+'-body">'+(e.settings.html||"")+t.renderHtml(e)+"</div></div>"
+}})}),r(Tt,[Nt],function(e){return e.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(e){var t=this;t._super(e),t.on("click mousedown",function(e){e.preventDefault()}),t.on("click",function(e){e.preventDefault(),t.disabled()||t.checked(!t.checked())}),t.checked(t.settings.checked)},checked:function(e){var t=this;return"undefined"!=typeof e?(e?t.addClass("checked"):t.removeClass("checked"),t._checked=e,t.aria("checked",e),t):t._checked},value:function(e){return this.checked(e)},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;return'<div id="'+t+'" class="'+e.classes()+'" unselectable="on" aria-labelledby="'+t+'-al" tabindex="-1"><i class="'+n+"ico "+n+'i-checkbox"></i><span id="'+t+'-al" class="'+n+'label">'+e.encode(e._text)+"</span></div&g
t;"}})}),r(Rt,[Nt,G,K],function(e,t,n){return e.extend({init:function(e){var t=this;t._super(e),t.addClass("combobox"),t.subinput=!0,t.ariaTarget="inp",e=t.settings,e.menu=e.menu||e.values,e.menu&&(e.icon="caret"),t.on("click",function(n){for(var r=n.target,i=t.getEl();r&&r!=i;)r.id&&-1!=r.id.indexOf("-open")&&(t.fire("action"),e.menu&&(t.showMenu(),n.aria&&t.menu.items()[0].focus())),r=r.parentNode}),t.on("keydown",function(e){"INPUT"==e.target.nodeName&&13==e.keyCode&&t.parents().reverse().each(function(n){return e.preventDefault(),t.fire("change"),n.hasEventListeners("submit")&&n.toJSON?(n.fire("submit",{data:n.toJSON()}),!1):void 0})}),e.placeholder&&(t.addClass("placeholder"),t.on("focusin",function(){t._hasOnChange||(n.on(t.getEl("inp"),"change",
function(){t.fire("change")}),t._hasOnChange=!0),t.hasClass("placeholder")&&(t.getEl("inp").value="",t.removeClass("placeholder"))}),t.on("focusout",function(){0===t.value().length&&(t.getEl("inp").value=e.placeholder,t.addClass("placeholder"))}))},showMenu:function(){var e=this,n=e.settings,r;e.menu||(r=n.menu||[],r.length?r={type:"menu",items:r}:r.type=r.type||"menu",e.menu=t.create(r).parent(e).renderTo(e.getContainerElm()),e.fire("createmenu"),e.menu.reflow(),e.menu.on("cancel",function(t){t.control===e.menu&&e.focus()}),e.menu.on("show hide",function(t){t.control.items().each(function(t){t.active(t.value()==e.value())})}).fire("show"),e.menu.on("select",function(t){e.value(t.control.value())}),e.on("focusin",function(t){"INPUT"==t.target.tagName.toUpperCase()&&e.menu.hide()}),e.a
ria("expanded",!0)),e.menu.show(),e.menu.layoutRect({w:e.layoutRect().w}),e.menu.moveRel(e.getEl(),e.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},value:function(e){var t=this;return"undefined"!=typeof e?(t._value=e,t.removeClass("placeholder"),t._rendered&&(t.getEl("inp").value=e),t):t._rendered?(e=t.getEl("inp").value,e!=t.settings.placeholder?e:""):t._value},disabled:function(e){var t=this;return t._rendered&&"undefined"!=typeof e&&(t.getEl("inp").disabled=e),t._super(e)},focus:function(){this.getEl("inp").focus()},repaint:function(){var e=this,t=e.getEl(),r=e.getEl("open"),i=e.layoutRect(),o,a;o=r?i.w-n.getSize(r).width-10:i.w-10;var s=document;return s.all&&(!s.documentMode||s.documentMode<=8)&&(a=e.layoutRect().h-2+"px"),n.css(t.firstChild,{width:o,lineHeight:a}),e._super(),e},postRender
:function(){var e=this;return n.on(this.getEl("inp"),"change",function(){e.fire("change")}),e._super()},remove:function(){n.off(this.getEl("inp")),this._super()},renderHtml:function(){var e=this,t=e._id,n=e.settings,r=e.classPrefix,i=n.value||n.placeholder||"",o,a,s="",l="";return"spellcheck"in n&&(l+=' spellcheck="'+n.spellcheck+'"'),n.maxLength&&(l+=' maxlength="'+n.maxLength+'"'),n.size&&(l+=' size="'+n.size+'"'),n.subtype&&(l+=' type="'+n.subtype+'"'),e.disabled()&&(l+=' disabled="disabled"'),o=n.icon,o&&"caret"!=o&&(o=r+"ico "+r+"i-"+n.icon),a=e._text,(o||a)&&(s='<div id="'+t+'-open" class="'+r+"btn "+r+'open" tabIndex="-1" role="button"><button id="'+t+'-action" type="button" hid
efocus="1" tabindex="-1">'+("caret"!=o?'<i class="'+o+'"></i>':'<i class="'+r+'caret"></i>')+(a?(o?" ":"")+a:"")+"</button></div>",e.addClass("has-open")),'<div id="'+t+'" class="'+e.classes()+'"><input id="'+t+'-inp" class="'+r+"textbox "+r+'placeholder" value="'+i+'" hidefocus="1"'+l+" />"+s+"</div>"}})}),r(At,[Rt],function(e){return e.extend({init:function(e){var t=this;e.spellcheck=!1,e.icon="none",t._super(e),t.addClass("colorbox"),t.on("change keyup postrender",function(){t.repaintColor(t.value())})},repaintColor:function(e){this.getEl().getElementsByTagName("i")[0].style.background=e},value:function(e){var t=this;return"undefined"!=typeof e&&t._rendered&&t.repaintColor
(e),t._super(e)}})}),r(Bt,[kt,rt],function(e,t){return e.extend({showPanel:function(){var e=this,n=e.settings;if(e.active(!0),e.panel)e.panel.show();else{var r=n.panel;r.type&&(r={layout:"grid",items:r}),r.role=r.role||"dialog",r.popover=!0,r.autohide=!0,r.ariaRoot=!0,e.panel=new t(r).on("hide",function(){e.active(!1)}).on("cancel",function(t){t.stopPropagation(),e.focus(),e.hidePanel()}).parent(e).renderTo(e.getContainerElm()),e.panel.fire("show"),e.panel.reflow()}e.panel.moveRel(e.getEl(),n.popoverAlign||(e.isRtl()?["bc-tr","bc-tc"]:["bc-tl","bc-tc"]))},hidePanel:function(){var e=this;e.panel&&e.panel.hide()},postRender:function(){var e=this;return e.aria("haspopup",!0),e.on("click",function(t){t.control===e&&(e.panel&&e.panel.visible()?e.hidePanel():(e.showPanel(),e.panel.focus(!!t.aria)))}),e._super()}})}),r(Dt,[Bt,y],function(e,t){var n=t
.DOM;return e.extend({init:function(e){this._super(e),this.addClass("colorbutton")},color:function(e){return e?(this._color=e,this.getEl("preview").style.backgroundColor=e,this):this._color},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.settings.icon?n+"ico "+n+"i-"+e.settings.icon:"",i=e.settings.image?" style=\"background-image: url('"+e.settings.image+"')\"":"";return'<div id="'+t+'" class="'+e.classes()+'" role="button" tabindex="-1" aria-haspopup="true"><button role="presentation" hidefocus="1" type="button" tabindex="-1">'+(r?'<i class="'+r+'"'+i+"></i>":"")+'<span id="'+t+'-preview" class="'+n+'preview"></span>'+(e._text?(r?" ":"")+e._text:"")+'</button><button
type="button" class="'+n+'open" hidefocus="1" tabindex="-1"> <i class="'+n+'caret"></i></button></div>'},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(r){r.aria&&"down"==r.aria.key||r.control!=e||n.getParent(r.target,"."+e.classPrefix+"open")||(r.stopImmediatePropagation(),t.call(e,r))}),delete e.settings.onclick,e._super()}})}),r(Lt,[],function(){function e(e){function i(e,i,o){var a,s,l,c,u,d;return a=0,s=0,l=0,e/=255,i/=255,o/=255,u=t(e,t(i,o)),d=n(e,n(i,o)),u==d?(l=u,{h:0,s:0,v:100*l}):(c=e==u?i-o:o==u?e-i:o-e,a=e==u?3:o==u?1:5,a=60*(a-c/(d-u)),s=(d-u)/d,l=d,{h:r(a),s:r(100*s),v:r(100*l)})}function o(e,i,o){var a,s,l,c;if(e=(parseInt(e,10)||0)%360,i=parseInt(i,10)/100,o=parseInt(o,10)/100,i=n(0,t(i,1)),o=n(0,t(o,1)),0===i)return void(d=f=p=r(255*o));switch(a=e/60,s=o*i,l=s*(1-Math.abs(a%2-1)),c=o-s,Math.floor(a)){case 0
:d=s,f=l,p=0;break;case 1:d=l,f=s,p=0;break;case 2:d=0,f=s,p=l;break;case 3:d=0,f=l,p=s;break;case 4:d=l,f=0,p=s;break;case 5:d=s,f=0,p=l;break;default:d=f=p=0}d=r(255*(d+c)),f=r(255*(f+c)),p=r(255*(p+c))}function a(){function e(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e}return"#"+e(d)+e(f)+e(p)}function s(){return{r:d,g:f,b:p}}function l(){return i(d,f,p)}function c(e){var t;return"object"==typeof e?"r"in e?(d=e.r,f=e.g,p=e.b):"v"in e&&o(e.h,e.s,e.v):(t=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e))?(d=parseInt(t[1],10),f=parseInt(t[2],10),p=parseInt(t[3],10)):(t=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e))?(d=parseInt(t[1],16),f=parseInt(t[2],16),p=parseInt(t[3],16)):(t=/#([0-F])([0-F])([0-F])/gi.exec(e))&&(d=parseInt(t[1]+t[1],16),f=parseInt(t[2]+t[2],16),p=parseInt(t[3]+t[3],16)),d=0>d?0:d>255?255:d,f=0>f?0:f>255?255:f,p=0>p?0:p>255?255:p,u}var u=this,d=
0,f=0,p=0;e&&c(e),u.toRgb=s,u.toHsv=l,u.toHex=a,u.parse=c}var t=Math.min,n=Math.max,r=Math.round;return e}),r(Ht,[Nt,Q,K,Lt],function(e,t,n,r){return e.extend({Defaults:{classes:"widget colorpicker"},init:function(e){this._super(e)},postRender:function(){function e(e,t){var r=n.getPos(e),i,o;return i=t.pageX-r.x,o=t.pageY-r.y,i=Math.max(0,Math.min(i/e.clientWidth,1)),o=Math.max(0,Math.min(o/e.clientHeight,1)),{x:i,y:o}}function i(e,t){var i=(360-e.h)/360;n.css(d,{top:100*i+"%"}),t||n.css(p,{left:e.s+"%",top:100-e.v+"%"}),f.style.background=new r({s:100,v:100,h:e.h}).toHex(),s.color().parse({s:e.s,v:e.v,h:e.h})}function o(t){var n;n=e(f,t),c.s=100*n.x,c.v=100*(1-n.y),i(c),s.fire("change")}function a(t){var n;n=e(u,t),c=l.toHsv(),c.h=360*(1-n.y),i(c,!0),s.fire("change")}var s=this,l=s.color(),c,u,d,f,p;u=s.getEl("h"),d=s.getEl("hp"),f=s.getEl("sv"),p=s.getEl("svp"),s._repaint=fu
nction(){c=l.toHsv(),i(c)},s._super(),s._svdraghelper=new t(s._id+"-sv",{start:o,drag:o}),s._hdraghelper=new t(s._id+"-h",{start:a,drag:a}),s._repaint()},rgb:function(){return this.color().toRgb()},value:function(e){var t=this;return arguments.length?(t.color().parse(e),void(t._rendered&&t._repaint())):t.color().toHex()},color:function(){return this._color||(this._color=new r),this._color},renderHtml:function(){function e(){var e,t,n="",i,a;for(i="filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=",a=o.split(","),e=0,t=a.length-1;t>e;e++)n+='<div class="'+r+'colorpicker-h-chunk" style="height:'+100/t+"%;"+i+a[e]+",endColorstr="+a[e+1]+");-ms-"+i+a[e]+",endColorstr="+a[e+1]+')"></div>';return n}var t=this,n=t._id,r=t.classPrefix,i,o="#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00
,#ff8000,#ff0000",a="background: -ms-linear-gradient(top,"+o+");background: linear-gradient(to bottom,"+o+");";return i='<div id="'+n+'-h" class="'+r+'colorpicker-h" style="'+a+'">'+e()+'<div id="'+n+'-hp" class="'+r+'colorpicker-h-marker"></div></div>','<div id="'+n+'" class="'+t.classes()+'"><div id="'+n+'-sv" class="'+r+'colorpicker-sv"><div class="'+r+'colorpicker-overlay1"><div class="'+r+'colorpicker-overlay2"><div id="'+n+'-svp" class="'+r+'colorpicker-selector1"><div class="'+r+'colorpicker-selector2"></div></div></div></div></div>'+i+"</div>"}})}),r(Mt,[Nt],function(e){return e.extend({init:function(e){var t=this;e.delimiter||(e.delimiter="\xbb"),t._super(e),t.addClass("path"),t
.canFocus=!0,t.on("click",function(e){var n,r=e.target;(n=r.getAttribute("data-index"))&&t.fire("select",{value:t.data()[n],index:n})})},focus:function(){var e=this;return e.getEl().firstChild.focus(),e},data:function(e){var t=this;return"undefined"!=typeof e?(t._data=e,t.update(),t):t._data},update:function(){this.innerHtml(this._getPathHtml())},postRender:function(){var e=this;e._super(),e.data(e.settings.data)},renderHtml:function(){var e=this;return'<div id="'+e._id+'" class="'+e.classes()+'">'+e._getPathHtml()+"</div>"},_getPathHtml:function(){var e=this,t=e._data||[],n,r,i="",o=e.classPrefix;for(n=0,r=t.length;r>n;n++)i+=(n>0?'<div class="'+o+'divider" aria-hidden="true"> '+e.settings.delimiter+" </div>":"")+'<div role="button" class="'+o+"path-item"+(n==r-1?" "+o+"last":&qu
ot;")+'" data-index="'+n+'" tabindex="-1" id="'+e._id+"-"+n+'" aria-level="'+n+'">'+t[n].name+"</div>";return i||(i='<div class="'+o+'path-item">\xa0</div>'),i}})}),r(Pt,[Mt,ht],function(e,t){return e.extend({postRender:function(){function e(e){if(1===e.nodeType){if("BR"==e.nodeName||e.getAttribute("data-mce-bogus"))return!0;if("bookmark"===e.getAttribute("data-mce-type"))return!0}return!1}var n=this,r=t.activeEditor;return n.on("select",function(e){r.focus(),r.selection.select(this.data()[e.index].element),r.nodeChanged()}),r.on("nodeChange",function(t){for(var i=[],o=t.parents,a=o.length;a--;)if(1==o[a].nodeType&&!e(o[a])){var s=r.fire("ResolveName",{name:o[a].nodeName.toLowerCase(),target:o[a]});if(s.isDefaultPrevented()||i.push({name:s.name,element:o[a]}),s.isPropagationStopped())break}n.data(i)}),n._su
per()}})}),r(Ot,[J],function(e){return e.extend({Defaults:{layout:"flex",align:"center",defaults:{flex:1}},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.addClass("formitem"),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes()+'" hidefocus="1" tabindex="-1">'+(e.settings.title?'<div id="'+e._id+'-title" class="'+n+'title">'+e.settings.title+"</div>":"")+'<div id="'+e._id+'-body" class="'+e.classes("body")+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></div>"}})}),r(It,[J,Ot,u],function(e,t,n){return e.extend({Defaults:{containerCls:"form",layout:"flex",direction:"column",align:"stretch",flex:1,padding:20,labelGap:30,spacing:10,callbacks:{submit:function(){this.submit()}}},preRender:function(){var e=this,r=e.items();e.se
ttings.formItemDefaults||(e.settings.formItemDefaults={layout:"flex",autoResize:"overflow",defaults:{flex:1}}),r.each(function(r){var i,o=r.settings.label;o&&(i=new t(n.extend({items:{type:"label",id:r._id+"-l",text:o,flex:0,forId:r._id,disabled:r.disabled()}},e.settings.formItemDefaults)),i.type="formitem",r.aria("labelledby",r._id+"-l"),"undefined"==typeof r.settings.flex&&(r.settings.flex=1),e.replace(r,i),i.add(r))})},recalcLabels:function(){var e=this,t=0,n=[],r,i,o;if(e.settings.labelGapCalc!==!1)for(o="children"==e.settings.labelGapCalc?e.find("formitem"):e.items(),o.filter("formitem").each(function(e){var r=e.items()[0],i=r.getEl().clientWidth;t=i>t?i:t,n.push(r)}),i=e.settings.labelGap||0,r=n.length;r--;)n[r].settings.minWidth=t+i},visible:function(e){var t=this._super(e);return e===!0&&this._rendered&&this.recalcLabels(),t},submit
:function(){return this.fire("submit",{data:this.toJSON()})},postRender:function(){var e=this;e._super(),e.recalcLabels(),e.fromJSON(e.settings.data)}})}),r(Ft,[It],function(e){return e.extend({Defaults:{containerCls:"fieldset",layout:"flex",direction:"column",align:"stretch",flex:1,padding:"25 15 5 15",labelGap:30,spacing:10,border:1},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.preRender(),t.preRender(e),'<fieldset id="'+e._id+'" class="'+e.classes()+'" hidefocus="1" tabindex="-1">'+(e.settings.title?'<legend id="'+e._id+'-title" class="'+n+'fieldset-title">'+e.settings.title+"</legend>":"")+'<div id="'+e._id+'-body" class="'+e.classes("body")+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></fieldset>"}})}),r(zt,[Rt,u],function(e,t
){return e.extend({init:function(e){var n=this,r=tinymce.activeEditor,i=r.settings,o,a,s;e.spellcheck=!1,s=i.file_picker_types||i.file_browser_callback_types,s&&(s=t.makeMap(s,/[, ]/)),(!s||s[e.filetype])&&(a=i.file_picker_callback,!a||s&&!s[e.filetype]?(a=i.file_browser_callback,!a||s&&!s[e.filetype]||(o=function(){a(n.getEl("inp").id,n.value(),e.filetype,window)})):o=function(){var i=n.fire("beforecall").meta;i=t.extend({filetype:e.filetype},i),a.call(r,function(e,t){n.value(e).fire("change",{meta:t})},n.value(),i)}),o&&(e.icon="browse",e.onaction=o),n._super(e)}})}),r(Wt,[_t],function(e){return e.extend({recalc:function(e){var t=e.layoutRect(),n=e.paddingBox();e.items().filter(":visible").each(function(e){e.layoutRect({x:n.left,y:n.top,w:t.innerW-n.right-n.left,h:t.innerH-n.top-n.bottom}),e.recalc&&e.recalc()})}})}),r(Vt,[_t],function(e){return e.extend({recalc:function(e){var t,n,r,
i,o,a,s,l,c,u,d,f,p,h,m,g,v=[],y,b,C,x,w,_,E,N,k,S,T,R,A,B,D,L,H,M,P,O,I,F,z=Math.max,W=Math.min;for(r=e.items().filter(":visible"),i=e.layoutRect(),o=e._paddingBox,a=e.settings,f=e.isRtl()?a.direction||"row-reversed":a.direction,s=a.align,l=e.isRtl()?a.pack||"end":a.pack,c=a.spacing||0,("row-reversed"==f||"column-reverse"==f)&&(r=r.set(r.toArray().reverse()),f=f.split("-")[0]),"column"==f?(k="y",E="h",N="minH",S="maxH",R="innerH",T="top",A="deltaH",B="contentH",P="left",H="w",D="x",L="innerW",M="minW",O="right",I="deltaW",F="contentW"):(k="x",E="w",N="minW",S="maxW",R="innerW",T="left",A="deltaW",B="contentW",P="top",H="h",D="y",L="inn
erH",M="minH",O="bottom",I="deltaH",F="contentH"),d=i[R]-o[T]-o[T],_=u=0,t=0,n=r.length;n>t;t++)p=r[t],h=p.layoutRect(),m=p.settings,g=m.flex,d-=n-1>t?c:0,g>0&&(u+=g,h[S]&&v.push(p),h.flex=g),d-=h[N],y=o[P]+h[M]+o[O],y>_&&(_=y);if(x={},x[N]=0>d?i[N]-d+i[A]:i[R]-d+i[A],x[M]=_+i[I],x[B]=i[R]-d,x[F]=_,x.minW=W(x.minW,i.maxW),x.minH=W(x.minH,i.maxH),x.minW=z(x.minW,i.startMinWidth),x.minH=z(x.minH,i.startMinHeight),!i.autoResize||x.minW==i.minW&&x.minH==i.minH){for(C=d/u,t=0,n=v.length;n>t;t++)p=v[t],h=p.layoutRect(),b=h[S],y=h[N]+h.flex*C,y>b?(d-=h[S]-h[N],u-=h.flex,h.flex=0,h.maxFlexSize=b):h.maxFlexSize=0;for(C=d/u,w=o[T],x={},0===u&&("end"==l?w=d+o[T]:"center"==l?(w=Math.round(i[R]/2-(i[R]-d)/2)+o[T],0>w&&(w=o[T])):"justify"==l&&(w=o[T],c=Math.floor(d/(r.length-1)))),x[D]=o[P],t=0,n=r.length;n>t;t++)p=r[t],h=p.layoutRect(),y=h.
maxFlexSize||h[N],"center"===s?x[D]=Math.round(i[L]/2-h[H]/2):"stretch"===s?(x[H]=z(h[M]||0,i[L]-o[P]-o[O]),x[D]=o[P]):"end"===s&&(x[D]=i[L]-h[H]-o.top),h.flex>0&&(y+=h.flex*C),x[E]=y,x[k]=w,p.layoutRect(x),p.recalc&&p.recalc(),w+=y+c}else if(x.w=x.minW,x.h=x.minH,e.layoutRect(x),this.recalc(e),null===e._lastRect){var V=e.parent();V&&(V._lastRect=null,V.recalc())}}})}),r(Ut,[wt],function(e){return e.extend({Defaults:{containerClass:"flow-layout",controlClass:"flow-layout-item",endClass:"break"},recalc:function(e){e.items().filter(":visible").each(function(e){e.recalc&&e.recalc()})}})}),r($t,[Y,Nt,rt,u,ht,d],function(e,t,n,r,i,o){function a(e){function t(t,n){return function(){var r=this;e.on("nodeChange",function(i){var o=e.formatter,a=null;s(i.parents,function(e){return s(t,function(t){return n?o.matchNode(e,n,{value:t.value})&&(a=t.value):o.matchNode(e
,t.value)&&(a=t.value),a?!1:void 0}),a?!1:void 0}),r.value(a)})}}function r(e){e=e.replace(/;$/,"").split(";");for(var t=e.length;t--;)e[t]=e[t].split("=");return e}function i(){function t(e){var n=[];if(e)return s(e,function(e){var o={text:e.title,icon:e.icon};if(e.items)o.menu=t(e.items);else{var a=e.format||"custom"+r++;e.format||(e.name=a,i.push(e)),o.format=a,o.cmd=e.cmd}n.push(o)}),n}function n(){var n;return n=t(e.settings.style_formats_merge?e.settings.style_formats?o.concat(e.settings.style_formats):o:e.settings.style_formats||o)}var r=0,i=[],o=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title
:"Bold",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strikethrough",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Alignment",items:[{title:"Left",icon:"alignleft",format:"alignleft"},{title:"Center",icon:"aligncenter",format:
"aligncenter"},{title:"Right",icon:"alignright",format:"alignright"},{title:"Justify",icon:"alignjustify",format:"alignjustify"}]}];return e.on("init",function(){s(i,function(t){e.formatter.register(t.name,t)})}),{type:"menu",items:n(),onPostRender:function(t){e.fire("renderFormatsMenu",{control:t.control})},itemDefaults:{preview:!0,textStyle:function(){return this.settings.format?e.formatter.getCssText(this.settings.format):void 0},onPostRender:function(){var t=this;t.parent().on("show",function(){var n,r;n=t.settings.format,n&&(t.disabled(!e.formatter.canApply(n)),t.active(e.formatter.match(n))),r=t.settings.cmd,r&&t.active(e.queryCommandState(r))})},onclick:function(){this.settings.format&&l(this.settings.format),this.settings.cmd&&e.execCommand(this.settings.cmd)}}}}function o(t){return function(){function n(){return e.undoManager?e.undoMa
nager[t]():!1}var r=this;t="redo"==t?"hasRedo":"hasUndo",r.disabled(!n()),e.on("Undo Redo AddUndo TypingUndo ClearUndos",function(){r.disabled(!n())})}}function a(){var t=this;e.on("VisualAid",function(e){t.active(e.hasVisual)}),t.active(e.hasVisual)}function l(t){t.control&&(t=t.control.value()),t&&e.execCommand("mceToggleFormat",!1,t)}var c;c=i(),s({bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript"},function(t,n){e.addButton(n,{tooltip:t,onPostRender:function(){var t=this;e.formatter?e.formatter.formatChanged(n,function(e){t.active(e)}):e.on("init",function(){e.formatter.formatChanged(n,function(e){t.active(e)})})},onclick:function(){l(n)}})}),s({outdent:["Decrease indent","Outdent"],indent:["Increase indent","Indent"],cu
t:["Cut","Cut"],copy:["Copy","Copy"],paste:["Paste","Paste"],help:["Help","mceHelp"],selectall:["Select all","SelectAll"],hr:["Insert horizontal rule","InsertHorizontalRule"],removeformat:["Clear formatting","RemoveFormat"],visualaid:["Visual aids","mceToggleVisualAid"],newdocument:["New document","mceNewDocument"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1]})}),s({blockquote:["Blockquote","mceBlockQuote"],numlist:["Numbered list","InsertOrderedList"],bullist:["Bullet list","InsertUnorderedList"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],alignleft:["Align left","JustifyLeft"],aligncenter:["Align center","JustifyCenter"],align
right:["Align right","JustifyRight"],alignjustify:["Justify","JustifyFull"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1],onPostRender:function(){var t=this;e.formatter?e.formatter.formatChanged(n,function(e){t.active(e)}):e.on("init",function(){e.formatter.formatChanged(n,function(e){t.active(e)})})}})}),e.addButton("undo",{tooltip:"Undo",onPostRender:o("undo"),cmd:"undo"}),e.addButton("redo",{tooltip:"Redo",onPostRender:o("redo"),cmd:"redo"}),e.addMenuItem("newdocument",{text:"New document",shortcut:"Ctrl+N",icon:"newdocument",cmd:"mceNewDocument"}),e.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Ctrl+Z",onPostRender:o("undo"),cmd:"undo"}),e.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Ct
rl+Y",onPostRender:o("redo"),cmd:"redo"}),e.addMenuItem("visualaid",{text:"Visual aids",selectable:!0,onPostRender:a,cmd:"mceToggleVisualAid"}),s({cut:["Cut","Cut","Ctrl+X"],copy:["Copy","Copy","Ctrl+C"],paste:["Paste","Paste","Ctrl+V"],selectall:["Select all","SelectAll","Ctrl+A"],bold:["Bold","Bold","Ctrl+B"],italic:["Italic","Italic","Ctrl+I"],underline:["Underline","Underline"],strikethrough:["Strikethrough","Strikethrough"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],removeformat:["Clear formatting","RemoveFormat"]},function(t,n){e.addMenuItem(n,{text:t[0],icon:n,shortcut:t[2],cmd:t[1]})}),e.on("mousedown"
,function(){n.hideAll()}),e.addButton("styleselect",{type:"menubutton",text:"Formats",menu:c}),e.addButton("formatselect",function(){var n=[],i=r(e.settings.block_formats||"Paragraph=p;Address=address;Pre=pre;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6");return s(i,function(t){n.push({text:t[0],value:t[1],textStyle:function(){return e.formatter.getCssText(t[1])}})}),{type:"listbox",text:i[0][0],values:n,fixedWidth:!0,onselect:l,onPostRender:t(n)}}),e.addButton("fontselect",function(){var n="Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Tr
ebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",i=[],o=r(e.settings.font_formats||n);return s(o,function(e){i.push({text:{raw:e[0]},value:e[1],textStyle:-1==e[1].indexOf("dings")?"font-family:"+e[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:i,fixedWidth:!0,onPostRender:t(i,"fontname"),onselect:function(t){t.control.settings.value&&e.execCommand("FontName",!1,t.control.settings.value)}}}),e.addButton("fontsizeselect",function(){var n=[],r="8pt 10pt 12pt 14pt 18pt 24pt 36pt",i=e.settings.fontsize_formats||r;return s(i.split(" "),function(e){var t=e,r=e,i=e.split("=");i.length>1&&(t=i[0],r=i[1]),n.push({text:t,value:r})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:n,fixedWidth:!0,onPostRender:t(n,"fontsiz
e"),onclick:function(t){t.control.settings.value&&e.execCommand("FontSize",!1,t.control.settings.value)}}}),e.addMenuItem("formats",{text:"Formats",menu:c})}var s=r.each;i.on("AddEditor",function(t){t.editor.rtl&&(e.rtl=!0),a(t.editor)}),e.translate=function(e){return i.translate(e)},t.tooltips=!o.iOS}),r(qt,[_t],function(e){return e.extend({recalc:function(e){var t=e.settings,n,r,i,o,a,s,l,c,u,d,f,p,h,m,g,v,y,b,C,x,w,_,E=[],N=[],k,S,T,R,A,B;t=e.settings,i=e.items().filter(":visible"),o=e.layoutRect(),r=t.columns||Math.ceil(Math.sqrt(i.length)),n=Math.ceil(i.length/r),y=t.spacingH||t.spacing||0,b=t.spacingV||t.spacing||0,C=t.alignH||t.align,x=t.alignV||t.align,g=e._paddingBox,A="reverseRows"in t?t.reverseRows:e.isRtl(),C&&"string"==typeof C&&(C=[C]),x&&"string"==typeof x&&(x=[x]);for(d=0;r>d;d++)E.push(0);for(f=0;n>f;f++)N.push(0);for(f=0;n>f;
f++)for(d=0;r>d&&(u=i[f*r+d],u);d++)c=u.layoutRect(),k=c.minW,S=c.minH,E[d]=k>E[d]?k:E[d],N[f]=S>N[f]?S:N[f];for(T=o.innerW-g.left-g.right,w=0,d=0;r>d;d++)w+=E[d]+(d>0?y:0),T-=(d>0?y:0)+E[d];for(R=o.innerH-g.top-g.bottom,_=0,f=0;n>f;f++)_+=N[f]+(f>0?b:0),R-=(f>0?b:0)+N[f];if(w+=g.left+g.right,_+=g.top+g.bottom,l={},l.minW=w+(o.w-o.innerW),l.minH=_+(o.h-o.innerH),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH,l.minW=Math.min(l.minW,o.maxW),l.minH=Math.min(l.minH,o.maxH),l.minW=Math.max(l.minW,o.startMinWidth),l.minH=Math.max(l.minH,o.startMinHeight),!o.autoResize||l.minW==o.minW&&l.minH==o.minH){o.autoResize&&(l=e.layoutRect(l),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH);var D;D="start"==t.packV?0:R>0?Math.floor(R/n):0;var L=0,H=t.flexWidths;if(H)for(d=0;d<H.length;d++)L+=H[d];else L=r;var M=T/L;for(d=0;r>d;d++)E[d]+=H?H[d]*M:M;for(h=g.top,f=0;n>f;f++){for(p=g.left,s=N[f]+D,d=0;r>d&&
(B=A?f*r+r-1-d:f*r+d,u=i[B],u);d++)m=u.settings,c=u.layoutRect(),a=Math.max(E[d],c.startMinWidth),c.x=p,c.y=h,v=m.alignH||(C?C[d]||C[0]:null),"center"==v?c.x=p+a/2-c.w/2:"right"==v?c.x=p+a-c.w:"stretch"==v&&(c.w=a),v=m.alignV||(x?x[d]||x[0]:null),"center"==v?c.y=h+s/2-c.h/2:"bottom"==v?c.y=h+s-c.h:"stretch"==v&&(c.h=s),u.layoutRect(c),p+=a+y,u.recalc&&u.recalc();h+=s+b}}else if(l.w=l.minW,l.h=l.minH,e.layoutRect(l),this.recalc(e),null===e._lastRect){var P=e.parent();P&&(P._lastRect=null,P.recalc())}}})}),r(jt,[Nt],function(e){return e.extend({renderHtml:function(){var e=this;return e.addClass("iframe"),e.canFocus=!1,'<iframe id="'+e._id+'" class="'+e.classes()+'" tabindex="-1" src="'+(e.settings.url||"javascript:''")+'" frameborder="0"></iframe>'},src:function(e){this.getEl().src=e},html:function(e,t){var n=this
,r=this.getEl().contentWindow.document.body;return r?(r.innerHTML=e,t&&t()):setTimeout(function(){n.html(e)},0),this}})}),r(Kt,[Nt,K],function(e,t){return e.extend({init:function(e){var t=this;t._super(e),t.addClass("widget"),t.addClass("label"),t.canFocus=!1,e.multiline&&t.addClass("autoscroll"),e.strong&&t.addClass("strong")},initLayoutRect:function(){var e=this,n=e._super();if(e.settings.multiline){var r=t.getSize(e.getEl());r.width>n.maxW&&(n.minW=n.maxW,e.addClass("multiline")),e.getEl().style.width=n.minW+"px",n.startMinH=n.h=n.minH=Math.min(n.maxH,t.getSize(e.getEl()).height)}return n},repaint:function(){var e=this;return e.settings.multiline||(e.getEl().style.lineHeight=e.layoutRect().h+"px"),e._super()},text:function(e){var t=this;return t._rendered&&e&&this.innerHtml(t.encode(e)),t._super(e)},renderHtml:function(){var e=this,t=e.settings.forId;return'<
;label id="'+e._id+'" class="'+e.classes()+'"'+(t?' for="'+t+'"':"")+">"+e.encode(e._text)+"</label>"}})}),r(Yt,[J],function(e){return e.extend({Defaults:{role:"toolbar",layout:"flow"},init:function(e){var t=this;t._super(e),t.addClass("toolbar")},postRender:function(){var e=this;return e.items().addClass("toolbar-item"),e._super()}})}),r(Gt,[Yt],function(e){return e.extend({Defaults:{role:"menubar",containerCls:"menubar",ariaRoot:!0,defaults:{type:"menubutton"}}})}),r(Xt,[kt,G,Gt],function(e,t,n){function r(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1}var i=e.extend({init:function(e){var t=this;t._renderOpen=!0,t._super(e),t.addClass("menubtn"),e.fixedWidth&&t.addClass("fixed-width"),t.aria("haspopup",!0),t.hasPopup=!0},showMenu:function(){var e=this,n=e.settings,r;return e.menu&&e.menu.vi
sible()?e.hideMenu():(e.menu||(r=n.menu||[],r.length?r={type:"menu",items:r}:r.type=r.type||"menu",e.menu=t.create(r).parent(e).renderTo(),e.fire("createmenu"),e.menu.reflow(),e.menu.on("cancel",function(t){t.control.parent()===e.menu&&(t.stopPropagation(),e.focus(),e.hideMenu())}),e.menu.on("select",function(){e.focus()}),e.menu.on("show hide",function(t){t.control==e.menu&&e.activeMenu("show"==t.type),e.aria("expanded","show"==t.type)}).fire("show")),e.menu.show(),e.menu.layoutRect({w:e.layoutRect().w}),void e.menu.moveRel(e.getEl(),e.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"]))},hideMenu:function(){var e=this;e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide())},activeMenu:function(e){this.toggleClass("active",e)},renderHtml:function(){var e=this,t=e._id,r=e.classPrefix,
i=e.settings.icon?r+"ico "+r+"i-"+e.settings.icon:"";return e.aria("role",e.parent()instanceof n?"menuitem":"button"),'<div id="'+t+'" class="'+e.classes()+'" tabindex="-1" aria-labelledby="'+t+'"><button id="'+t+'-open" role="presentation" type="button" tabindex="-1">'+(i?'<i class="'+i+'"></i>':"")+"<span>"+(e._text?(i?"\xa0":"")+e.encode(e._text):"")+'</span> <i class="'+r+'caret"></i></button></div>'},postRender:function(){var e=this;return e.on("click",function(t){t.control===e&&r(t.target,e.getEl())&&(e.showMenu(),t.aria&&e.menu.items()[0].focus())}),e.on("mouseenter",function(t){var n=t.control,r=e.parent(),o;n&&r&&n instanceof i&&n.parent()==r
&&(r.items().filter("MenuButton").each(function(e){e.hideMenu&&e!=n&&(e.menu&&e.menu.visible()&&(o=!0),e.hideMenu())}),o&&(n.focus(),n.showMenu()))}),e._super()},text:function(e){var t=this,n,r;if(t._rendered)for(r=t.getEl("open").getElementsByTagName("span"),n=0;n<r.length;n++)r[n].innerHTML=(t.settings.icon&&e?"\xa0":"")+t.encode(e);return this._super(e)},remove:function(){this._super(),this.menu&&this.menu.remove()}});return i}),r(Jt,[Xt],function(e){return e.extend({init:function(e){function t(r){for(var a=0;a<r.length;a++){if(i=r[a].selected||e.value===r[a].value){o=o||r[a].text,n._value=r[a].value;break}r[a].menu&&t(r[a].menu)}}var n=this,r,i,o,a;n._values=r=e.values,r&&("undefined"!=typeof e.value&&t(r),!i&&r.length>0&&(o=r[0].text,n._value=r[0].value),e.menu=r),e.text=e.text||o||r[0].text,n._super(e),n.ad
dClass("listbox"),n.on("select",function(t){var r=t.control;a&&(t.lastControl=a),e.multiple?r.active(!r.active()):n.value(t.control.settings.value),a=r})},value:function(e){function t(e,n){e.items().each(function(e){i=e.value()===n,i&&(o=o||e.text()),e.active(i),e.menu&&t(e.menu,n)})}function n(t){for(var r=0;r<t.length;r++)i=t[r].value==e,i&&(o=o||t[r].text),t[r].active=i,t[r].menu&&n(t[r].menu)}var r=this,i,o,a;return"undefined"!=typeof e&&(r.menu?t(r.menu,e):(a=r.settings.menu,n(a)),r.text(o||this.settings.text)),r._super(e)}})}),r(Qt,[Nt,G,d],function(e,t,n){return e.extend({Defaults:{border:0,role:"menuitem"},init:function(e){var t=this;t.hasPopup=!0,t._super(e),e=t.settings,t.addClass("menu-item"),e.menu&&t.addClass("menu-item-expand"),e.preview&&t.addClass("menu-item-preview"),("-"===t._text||"|"===t._text)&&(t.ad
dClass("menu-item-sep"),t.aria("role","separator"),t._text="-"),e.selectable&&(t.aria("role","menuitemcheckbox"),t.addClass("menu-item-checkbox"),e.icon="selected"),e.preview||e.selectable||t.addClass("menu-item-normal"),t.on("mousedown",function(e){e.preventDefault()
+}),e.menu&&!e.ariaHideMenu&&t.aria("haspopup",!0)},hasMenus:function(){return!!this.settings.menu},showMenu:function(){var e=this,n=e.settings,r,i=e.parent();if(i.items().each(function(t){t!==e&&t.hideMenu()}),n.menu){r=e.menu,r?r.show():(r=n.menu,r.length?r={type:"menu",items:r}:r.type=r.type||"menu",i.settings.itemDefaults&&(r.itemDefaults=i.settings.itemDefaults),r=e.menu=t.create(r).parent(e).renderTo(),r.reflow(),r.on("cancel",function(t){t.stopPropagation(),e.focus(),r.hide()}),r.on("show hide",function(e){e.control.items().each(function(e){e.active(e.settings.selected)})}).fire("show"),r.on("hide",function(t){t.control===r&&e.removeClass("selected")}),r.submenu=!0),r._parentMenu=i,r.addClass("menu-sub");var o=r.testMoveRel(e.getEl(),e.isRtl()?["tl-tr","bl-br","tr-tl","br-bl"]:["tr-tl","br-bl&qu
ot;,"tl-tr","bl-br"]);r.moveRel(e.getEl(),o),r.rel=o,o="menu-sub-"+o,r.removeClass(r._lastRel),r.addClass(o),r._lastRel=o,e.addClass("selected"),e.aria("expanded",!0)}},hideMenu:function(){var e=this;return e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide(),e.aria("expanded",!1)),e},renderHtml:function(){var e=this,t=e._id,r=e.settings,i=e.classPrefix,o=e.encode(e._text),a=e.settings.icon,s="",l=r.shortcut;return a&&e.parent().addClass("menu-has-icons"),r.image&&(a="none",s=" style=\"background-image: url('"+r.image+"')\""),l&&n.mac&&(l=l.replace(/ctrl\+alt\+/i,"⌥⌘"),l=l.replace(/ctrl\+/i,"⌘"),l=l.replace(/alt\+/i,"⌥"),l=l.replace(/shift\+/i,"⇧")),a=i+"ico "+i+"i-"+(e.settin
gs.icon||"none"),'<div id="'+t+'" class="'+e.classes()+'" tabindex="-1">'+("-"!==o?'<i class="'+a+'"'+s+"></i>\xa0":"")+("-"!==o?'<span id="'+t+'-text" class="'+i+'text">'+o+"</span>":"")+(l?'<div id="'+t+'-shortcut" class="'+i+'menu-shortcut">'+l+"</div>":"")+(r.menu?'<div class="'+i+'caret"></div>':"")+"</div>"},postRender:function(){var e=this,t=e.settings,n=t.textStyle;if("function"==typeof n&&(n=n.call(this)),n){var r=e.getEl("text");r&&r.setAttribute("style",n)}return e.on("mouseenter click",function(n){n.control===e&&(t.menu||"click"!==n.type?(e.showMenu(),n.aria&&e.menu.focus(!0)):(e.fire("select"),e.parent().hideAll()))}),e._sup
er(),e},active:function(e){return"undefined"!=typeof e&&this.aria("checked",e),this._super(e)},remove:function(){this._super(),this.menu&&this.menu.remove()}})}),r(Zt,[rt,Qt,u],function(e,t,n){var r=e.extend({Defaults:{defaultType:"menuitem",border:1,layout:"stack",role:"application",bodyRole:"menu",ariaRoot:!0},init:function(e){var t=this;if(e.autohide=!0,e.constrainToViewport=!0,e.itemDefaults)for(var r=e.items,i=r.length;i--;)r[i]=n.extend({},e.itemDefaults,r[i]);t._super(e),t.addClass("menu")},repaint:function(){return this.toggleClass("menu-align",!0),this._super(),this.getEl().style.height="",this.getEl("body").style.height="",this},cancel:function(){var e=this;e.hideAll(),e.fire("select")},hideAll:function(){var e=this;return this.find("menuitem").exec("hideMenu"),e._super()},preRender:function(){var e=this;return e.items(
).each(function(t){var n=t.settings;return n.icon||n.selectable?(e._hasIcons=!0,!1):void 0}),e._super()}});return r}),r(en,[Tt],function(e){return e.extend({Defaults:{classes:"radio",role:"radio"}})}),r(tn,[Nt,Q],function(e,t){return e.extend({renderHtml:function(){var e=this,t=e.classPrefix;return e.addClass("resizehandle"),"both"==e.settings.direction&&e.addClass("resizehandle-both"),e.canFocus=!1,'<div id="'+e._id+'" class="'+e.classes()+'"><i class="'+t+"ico "+t+'i-resize"></i></div>'},postRender:function(){var e=this;e._super(),e.resizeDragHelper=new t(this._id,{start:function(){e.fire("ResizeStart")},drag:function(t){"both"!=e.settings.direction&&(t.deltaX=0),e.fire("Resize",t)},stop:function(){e.fire("ResizeEnd")}})},remove:function(){return this.resizeDragHelper&&this.resizeDragHelper.destroy(),this.
_super()}})}),r(nn,[Nt],function(e){return e.extend({renderHtml:function(){var e=this;return e.addClass("spacer"),e.canFocus=!1,'<div id="'+e._id+'" class="'+e.classes()+'"></div>'}})}),r(rn,[Xt,K],function(e,t){return e.extend({Defaults:{classes:"widget btn splitbtn",role:"button"},repaint:function(){var e=this,n=e.getEl(),r=e.layoutRect(),i,o;return e._super(),i=n.firstChild,o=n.lastChild,t.css(i,{width:r.w-t.getSize(o).width,height:r.h-2}),t.css(o,{height:r.h-2}),e},activeMenu:function(e){var n=this;t.toggleClass(n.getEl().lastChild,n.classPrefix+"active",e)},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.settings.icon?n+"ico "+n+"i-"+e.settings.icon:"";return'<div id="'+t+'" class="'+e.classes()+'" role="button" tabindex="-1"><button type="button" hidefocus="1" tabindex="-1">'+(r?'<
;i class="'+r+'"></i>':"")+(e._text?(r?" ":"")+e._text:"")+'</button><button type="button" class="'+n+'open" hidefocus="1" tabindex="-1">'+(e._menuBtnText?(r?"\xa0":"")+e._menuBtnText:"")+' <i class="'+n+'caret"></i></button></div>'},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(e){var n=e.target;if(e.control==this)for(;n;){if(e.aria&&"down"!=e.aria.key||"BUTTON"==n.nodeName&&-1==n.className.indexOf("open"))return e.stopImmediatePropagation(),void t.call(this,e);n=n.parentNode}}),delete e.settings.onclick,e._super()}})}),r(on,[Ut],function(e){return e.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"}})}),r(an,[et,K],function(e,t){return e.ext
end({Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(e){var n;this.activeTabId&&(n=this.getEl(this.activeTabId),t.removeClass(n,this.classPrefix+"active"),n.setAttribute("aria-selected","false")),this.activeTabId="t"+e,n=this.getEl("t"+e),n.setAttribute("aria-selected","true"),t.addClass(n,this.classPrefix+"active"),this.items()[e].show().fire("showtab"),this.reflow(),this.items().each(function(t,n){e!=n&&t.hide()})},renderHtml:function(){var e=this,t=e._layout,n="",r=e.classPrefix;return e.preRender(),t.preRender(e),e.items().each(function(t,i){var o=e._id+"-t"+i;t.aria("role","tabpanel"),t.aria("labelledby",o),n+='<div id="'+o+'" class="'+r+'tab" unselectable="on" role="tab" aria-controls="'+t._id+'" aria-selected="false"
; tabIndex="-1">'+e.encode(t.settings.title)+"</div>"}),'<div id="'+e._id+'" class="'+e.classes()+'" hidefocus="1" tabindex="-1"><div id="'+e._id+'-head" class="'+r+'tabs" role="tablist">'+n+'</div><div id="'+e._id+'-body" class="'+e.classes("body")+'">'+t.renderHtml(e)+"</div></div>"},postRender:function(){var e=this;e._super(),e.settings.activeTab=e.settings.activeTab||0,e.activateTab(e.settings.activeTab),this.on("click",function(t){var n=t.target.parentNode;if(t.target.parentNode.id==e._id+"-head")for(var r=n.childNodes.length;r--;)n.childNodes[r]==t.target&&e.activateTab(r)})},initLayoutRect:function(){var e=this,n,r,i;r=t.getSize(e.getEl("head")).width,r=0>r?0:r,i=0,e.items().each(function(e){r=Math.max(r,e.layoutRect().minW),i=Math.max(i,e.layoutRect().minH)}),e.i
tems().each(function(e){e.settings.x=0,e.settings.y=0,e.settings.w=r,e.settings.h=i,e.layoutRect({x:0,y:0,w:r,h:i})});var o=t.getSize(e.getEl("head")).height;return e.settings.minWidth=r,e.settings.minHeight=i+o,n=e._super(),n.deltaH+=o,n.innerH=n.h-n.deltaH,n}})}),r(sn,[Nt,K],function(e,t){return e.extend({init:function(e){var t=this;t._super(e),t._value=e.value||"",t.addClass("textbox"),e.multiline?t.addClass("multiline"):t.on("keydown",function(e){13==e.keyCode&&t.parents().reverse().each(function(t){return e.preventDefault(),t.hasEventListeners("submit")&&t.toJSON?(t.fire("submit",{data:t.toJSON()}),!1):void 0})})},disabled:function(e){var t=this;return t._rendered&&"undefined"!=typeof e&&(t.getEl().disabled=e),t._super(e)},value:function(e){var t=this;return"undefined"!=typeof e?(t._value=e,t._rendered&&(t.getEl().value=e),t):t._rendered?t.getEl().va
lue:t._value},repaint:function(){var e=this,t,n,r,i=0,o=0,a;t=e.getEl().style,n=e._layoutRect,a=e._lastRepaintRect||{};var s=document;return!e.settings.multiline&&s.all&&(!s.documentMode||s.documentMode<=8)&&(t.lineHeight=n.h-o+"px"),r=e._borderBox,i=r.left+r.right+8,o=r.top+r.bottom+(e.settings.multiline?8:0),n.x!==a.x&&(t.left=n.x+"px",a.x=n.x),n.y!==a.y&&(t.top=n.y+"px",a.y=n.y),n.w!==a.w&&(t.width=n.w-i+"px",a.w=n.w),n.h!==a.h&&(t.height=n.h-o+"px",a.h=n.h),e._lastRepaintRect=a,e.fire("repaint",{},!1),e},renderHtml:function(){var e=this,t=e._id,n=e.settings,r=e.encode(e._value,!1),i="";return"spellcheck"in n&&(i+=' spellcheck="'+n.spellcheck+'"'),n.maxLength&&(i+=' maxlength="'+n.maxLength+'"'),n.size&&(i+=' size="'+n.size+'"'),n.subtype&&(i+=' type="'+n.subtype+'"'),e.di
sabled()&&(i+=' disabled="disabled"'),n.multiline?'<textarea id="'+t+'" class="'+e.classes()+'" '+(n.rows?' rows="'+n.rows+'"':"")+' hidefocus="1"'+i+">"+r+"</textarea>":'<input id="'+t+'" class="'+e.classes()+'" value="'+r+'" hidefocus="1"'+i+" />"},postRender:function(){var e=this;return t.on(e.getEl(),"change",function(t){e.fire("change",t)}),e._super()},remove:function(){t.off(this.getEl()),this._super()}})}),r(ln,[K,Y],function(e,t){return function(n,r){var i=this,o,a=t.classPrefix;i.show=function(t){return i.hide(),o=!0,window.setTimeout(function(){o&&n.appendChild(e.createFragment('<div class="'+a+"throbber"+(r?" "+a+"throbber-inline":"")+'"></div>'))},t||0),i},i.hide=function(){var e=n.lastChild;return e&&-1!=e.className.inde
xOf("throbber")&&e.parentNode.removeChild(e),o=!1,i}}}),a([l,c,u,d,f,p,h,m,g,y,b,C,_,E,N,k,S,T,R,A,B,D,L,H,M,O,I,F,z,W,V,U,$,q,j,K,Y,G,X,J,Q,Z,et,tt,nt,rt,it,ot,at,st,lt,ct,ut,dt,ft,pt,ht,mt,gt,vt,yt,bt,Ct,xt,wt,_t,Et,Nt,kt,St,Tt,Rt,At,Bt,Dt,Lt,Ht,Mt,Pt,Ot,It,Ft,zt,Wt,Vt,Ut,$t,qt,jt,Kt,Yt,Gt,Xt,Jt,Qt,Zt,en,tn,nn,rn,on,an,sn,ln])}(this);
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunksrcwpincludesversionphp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/version.php (29202 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/version.php 2014-07-17 00:49:11 UTC (rev 29202)
+++ trunk/src/wp-includes/version.php 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -18,7 +18,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @global string $tinymce_version
</span><span class="cx"> */
</span><del>-$tinymce_version = '4028-20140706';
</del><ins>+$tinymce_version = '4102-20140716';
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Holds the required PHP version
</span></span></pre></div>
<a id="trunktestsquniteditorexternalpluginsnoneditablepluginjs"></a>
<div class="modfile"><h4>Modified: trunk/tests/qunit/editor/external-plugins/noneditable/plugin.js (29202 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/qunit/editor/external-plugins/noneditable/plugin.js 2014-07-17 00:49:11 UTC (rev 29202)
+++ trunk/tests/qunit/editor/external-plugins/noneditable/plugin.js 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -133,18 +133,18 @@
</span><span class="cx"> var rng, child, currentCaretContainer, lastContainer;
</span><span class="cx">
</span><span class="cx"> if (caretContainer) {
</span><del>- rng = selection.getRng(true);
- rng.setStartBefore(caretContainer);
- rng.setEndBefore(caretContainer);
</del><ins>+ rng = selection.getRng(true);
+ rng.setStartBefore(caretContainer);
+ rng.setEndBefore(caretContainer);
</ins><span class="cx">
</span><del>- child = findFirstTextNode(caretContainer);
- if (child && child.nodeValue.charAt(0) == invisibleChar) {
- child = child.deleteData(0, 1);
- }
</del><ins>+ child = findFirstTextNode(caretContainer);
+ if (child && child.nodeValue.charAt(0) == invisibleChar) {
+ child = child.deleteData(0, 1);
+ }
</ins><span class="cx">
</span><del>- dom.remove(caretContainer, true);
</del><ins>+ dom.remove(caretContainer, true);
</ins><span class="cx">
</span><del>- selection.setRng(rng);
</del><ins>+ selection.setRng(rng);
</ins><span class="cx"> } else {
</span><span class="cx"> currentCaretContainer = getParentCaretContainer(selection.getStart());
</span><span class="cx"> while ((caretContainer = dom.get(caretContainerId)) && caretContainer !== lastContainer) {
</span></span></pre></div>
<a id="trunktestsquniteditorindexhtml"></a>
<div class="modfile"><h4>Modified: trunk/tests/qunit/editor/index.html (29202 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/qunit/editor/index.html 2014-07-17 00:49:11 UTC (rev 29202)
+++ trunk/tests/qunit/editor/index.html 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> <script src="js/init.js"></script>
</span><span class="cx">
</span><span class="cx"> <!-- tinymce.dom.* -->
</span><ins>+ <script src="tinymce/dom/DomQuery.js"></script>
</ins><span class="cx"> <script src="tinymce/dom/DOMUtils.js"></script>
</span><span class="cx"> <script src="tinymce/dom/EventUtils.js"></script>
</span><span class="cx"> <script src="tinymce/dom/Range.js"></script>
</span><span class="lines">@@ -61,6 +62,7 @@
</span><span class="cx"> <script src="tinymce/ui/Window.js"></script>
</span><span class="cx">
</span><span class="cx"> <!-- tinymce.util.* -->
</span><ins>+ <script src="tinymce/util/Color.js"></script>
</ins><span class="cx"> <script src="tinymce/util/EventDispatcher.js"></script>
</span><span class="cx"> <script src="tinymce/util/JSON.js"></script>
</span><span class="cx"> <script src="tinymce/util/JSONRequest.js"></script>
</span><span class="lines">@@ -84,21 +86,22 @@
</span><span class="cx"> <script src="tinymce/UndoManager.js"></script>
</span><span class="cx">
</span><span class="cx"> <!-- tinymce.plugins.* -->
</span><del>-<!--<script src="plugins/autosave.js"></script>
</del><ins>+<!--<script src="plugins/autolink.js"></script>
</ins><span class="cx"> <script src="plugins/autosave.js"></script>
</span><span class="cx"> <script src="plugins/fullpage.js"></script> -->
</span><span class="cx"> <script src="plugins/image.js"></script>
</span><span class="cx"> <!--<script src="plugins/importcss.js"></script>
</span><span class="cx"> <script src="plugins/jquery_plugin.js"></script>
</span><span class="cx"> <script src="plugins/legacyoutput.js"></script>
</span><del>- <script src="plugins/lists.js"></script>
- <script src="plugins/lists.js"></script> -->
</del><ins>+ <script src="plugins/link.js"></script>
+ <script src="plugins/lists.js"></script>-->
</ins><span class="cx"> <script src="plugins/media.js"></script>
</span><span class="cx"> <!--<script src="plugins/noneditable.js"></script> -->
</span><span class="cx"> <script src="plugins/paste.js"></script>
</span><span class="cx"> <!--<script src="plugins/searchreplace.js"></script>
</span><span class="cx"> <script src="plugins/spellchecker.js"></script>
</span><span class="cx"> <script src="plugins/table.js"></script>
</span><del>- <script src="plugins/wordcount.js"></script> -->
</del><ins>+ <script src="plugins/textpattern.js"></script>
+ <script src="plugins/wordcount.js"></script>-->
</ins><span class="cx"> </body>
</span><span class="cx"> </html>
</span></span></pre></div>
<a id="trunktestsquniteditorjsinitjs"></a>
<div class="modfile"><h4>Modified: trunk/tests/qunit/editor/js/init.js (29202 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/qunit/editor/js/init.js 2014-07-17 00:49:11 UTC (rev 29202)
+++ trunk/tests/qunit/editor/js/init.js 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -4,6 +4,8 @@
</span><span class="cx"> QUnit.config.reorder = false;
</span><span class="cx"> QUnit.config.hidepassed = true;
</span><span class="cx">
</span><ins>+ window.editor = window.inlineEditor = null;
+
</ins><span class="cx"> var oldModule = module;
</span><span class="cx">
</span><span class="cx"> QUnit.moduleStart(function(details) {
</span></span></pre></div>
<a id="trunktestsquniteditorpluginsautolinkjs"></a>
<div class="modfile"><h4>Modified: trunk/tests/qunit/editor/plugins/autolink.js (29202 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/qunit/editor/plugins/autolink.js 2014-07-17 00:49:11 UTC (rev 29202)
+++ trunk/tests/qunit/editor/plugins/autolink.js 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -49,32 +49,32 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> test("Urls ended with space", function() {
</span><del>- equal(typeUrl('http://www.tinymce.com'), '<p><a href="http://www.tinymce.com">http://www.tinymce.com</a></p>');
- equal(typeUrl('https://www.tinymce.com'), '<p><a href="https://www.tinymce.com">https://www.tinymce.com</a></p>');
- equal(typeUrl('ssh://www.tinymce.com'), '<p><a href="ssh://www.tinymce.com">ssh://www.tinymce.com</a></p>');
- equal(typeUrl('ftp://www.tinymce.com'), '<p><a href="ftp://www.tinymce.com">ftp://www.tinymce.com</a></p>');
- equal(typeUrl('www.tinymce.com'), '<p><a href="http://www.tinymce.com">www.tinymce.com</a></p>');
- equal(typeUrl('www.tinymce.com.'), '<p><a href="http://www.tinymce.com">www.tinymce.com</a>.</p>');
</del><ins>+ equal(typeUrl('http://www.domain.com'), '<p><a href="http://www.domain.com">http://www.domain.com</a></p>');
+ equal(typeUrl('https://www.domain.com'), '<p><a href="https://www.domain.com">https://www.domain.com</a></p>');
+ equal(typeUrl('ssh://www.domain.com'), '<p><a href="ssh://www.domain.com">ssh://www.domain.com</a></p>');
+ equal(typeUrl('ftp://www.domain.com'), '<p><a href="ftp://www.domain.com">ftp://www.domain.com</a></p>');
+ equal(typeUrl('www.domain.com'), '<p><a href="http://www.domain.com">www.domain.com</a></p>');
+ equal(typeUrl('www.domain.com.'), '<p><a href="http://www.domain.com">www.domain.com</a>.</p>');
</ins><span class="cx"> equal(typeUrl('user@domain.com'), '<p><a href="mailto:user@domain.com">user@domain.com</a></p>');
</span><span class="cx"> equal(typeUrl('mailto:user@domain.com'), '<p><a href="mailto:user@domain.com">mailto:user@domain.com</a></p>');
</span><span class="cx"> equal(typeUrl('first-last@domain.com'), '<p><a href="mailto:first-last@domain.com">first-last@domain.com</a></p>');
</span><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> test("Urls ended with )", function() {
</span><del>- equal(typeAnEclipsedURL('http://www.tinymce.com'), '<p>(<a href="http://www.tinymce.com">http://www.tinymce.com</a>)</p>');
- equal(typeAnEclipsedURL('https://www.tinymce.com'), '<p>(<a href="https://www.tinymce.com">https://www.tinymce.com</a>)</p>');
- equal(typeAnEclipsedURL('ssh://www.tinymce.com'), '<p>(<a href="ssh://www.tinymce.com">ssh://www.tinymce.com</a>)</p>');
- equal(typeAnEclipsedURL('ftp://www.tinymce.com'), '<p>(<a href="ftp://www.tinymce.com">ftp://www.tinymce.com</a>)</p>');
- equal(typeAnEclipsedURL('www.tinymce.com'), '<p>(<a href="http://www.tinymce.com">www.tinymce.com</a>)</p>');
- equal(typeAnEclipsedURL('www.tinymce.com.'), '<p>(<a href="http://www.tinymce.com">www.tinymce.com</a>.)</p>');
</del><ins>+ equal(typeAnEclipsedURL('http://www.domain.com'), '<p>(<a href="http://www.domain.com">http://www.domain.com</a>)</p>');
+ equal(typeAnEclipsedURL('https://www.domain.com'), '<p>(<a href="https://www.domain.com">https://www.domain.com</a>)</p>');
+ equal(typeAnEclipsedURL('ssh://www.domain.com'), '<p>(<a href="ssh://www.domain.com">ssh://www.domain.com</a>)</p>');
+ equal(typeAnEclipsedURL('ftp://www.domain.com'), '<p>(<a href="ftp://www.domain.com">ftp://www.domain.com</a>)</p>');
+ equal(typeAnEclipsedURL('www.domain.com'), '<p>(<a href="http://www.domain.com">www.domain.com</a>)</p>');
+ equal(typeAnEclipsedURL('www.domain.com.'), '<p>(<a href="http://www.domain.com">www.domain.com</a>.)</p>');
</ins><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> test("Urls ended with new line", function() {
</span><del>- equal(typeNewlineURL('http://www.tinymce.com'), '<p><a href="http://www.tinymce.com">http://www.tinymce.com</a></p><p> </p>');
- equal(typeNewlineURL('https://www.tinymce.com'), '<p><a href="https://www.tinymce.com">https://www.tinymce.com</a></p><p> </p>');
- equal(typeNewlineURL('ssh://www.tinymce.com'), '<p><a href="ssh://www.tinymce.com">ssh://www.tinymce.com</a></p><p> </p>');
- equal(typeNewlineURL('ftp://www.tinymce.com'), '<p><a href="ftp://www.tinymce.com">ftp://www.tinymce.com</a></p><p> </p>');
- equal(typeNewlineURL('www.tinymce.com'), '<p><a href="http://www.tinymce.com">www.tinymce.com</a></p><p> </p>');
- equal(typeNewlineURL('www.tinymce.com.'), '<p><a href="http://www.tinymce.com">www.tinymce.com</a>.</p><p> </p>');
</del><ins>+ equal(typeNewlineURL('http://www.domain.com'), '<p><a href="http://www.domain.com">http://www.domain.com</a></p><p> </p>');
+ equal(typeNewlineURL('https://www.domain.com'), '<p><a href="https://www.domain.com">https://www.domain.com</a></p><p> </p>');
+ equal(typeNewlineURL('ssh://www.domain.com'), '<p><a href="ssh://www.domain.com">ssh://www.domain.com</a></p><p> </p>');
+ equal(typeNewlineURL('ftp://www.domain.com'), '<p><a href="ftp://www.domain.com">ftp://www.domain.com</a></p><p> </p>');
+ equal(typeNewlineURL('www.domain.com'), '<p><a href="http://www.domain.com">www.domain.com</a></p><p> </p>');
+ equal(typeNewlineURL('www.domain.com.'), '<p><a href="http://www.domain.com">www.domain.com</a>.</p><p> </p>');
</ins><span class="cx"> });
</span><span class="cx"> })();
</span></span></pre></div>
<a id="trunktestsquniteditorpluginspastejs"></a>
<div class="modfile"><h4>Modified: trunk/tests/qunit/editor/plugins/paste.js (29202 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/qunit/editor/plugins/paste.js 2014-07-17 00:49:11 UTC (rev 29202)
+++ trunk/tests/qunit/editor/plugins/paste.js 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -204,9 +204,9 @@
</span><span class="cx"> '<a href="#_ftnref238571849" name="_ftn238571849">[5]</a>' +
</span><span class="cx"> '<a href="#_edn238571849" name="_ednref238571849">[6]</a>' +
</span><span class="cx"> '<a href="#_ednref238571849" name="_edn238571849">[7]</a>' +
</span><del>- '<a href="http://www.tinymce.com/someurl">8</a>' +
</del><ins>+ '<a href="http://domain.tinymce.com/someurl">8</a>' +
</ins><span class="cx"> '<a name="#unknown">9</a>' +
</span><del>- '<a href="http://www.tinymce.com/someurl" name="named_link">named_link</a>' +
</del><ins>+ '<a href="http://domain.tinymce.com/someurl" name="named_link">named_link</a>' +
</ins><span class="cx"> '<a>5</a>' +
</span><span class="cx"> '</p>'
</span><span class="cx"> )
</span><span class="lines">@@ -222,7 +222,7 @@
</span><span class="cx"> '<a href="#_ftnref238571849" name="_ftn238571849">[5]</a>' +
</span><span class="cx"> '<a href="#_edn238571849" name="_ednref238571849">[6]</a>' +
</span><span class="cx"> '<a href="#_ednref238571849" name="_edn238571849">[7]</a>' +
</span><del>- '<a href="http://www.tinymce.com/someurl">8</a>' +
</del><ins>+ '<a href="http://domain.tinymce.com/someurl">8</a>' +
</ins><span class="cx"> '9' +
</span><span class="cx"> 'named_link' +
</span><span class="cx"> '5' +
</span><span class="lines">@@ -279,7 +279,83 @@
</span><span class="cx">
</span><span class="cx"> equal(editor.getContent(), '<p>1</p>');
</span><span class="cx"> });
</span><ins>+
+test('paste nested (UL) word list', function() {
+ editor.setContent('');
</ins><span class="cx">
</span><ins>+ editor.execCommand('mceInsertClipboardContent', false, {
+ content: (
+ "<p class=MsoListParagraphCxSpFirst style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'>" +
+ "<![if !supportLists]><span style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'>" +
+ "<span style='mso-list:Ignore'>·<span style='font:7.0pt \"Times New Roman\"'> " +
+ "</span></span></span><![endif]>a</p>" +
+
+ "<p class=MsoListParagraphCxSpMiddle style='margin-left:72.0pt;mso-add-space:auto;text-indent:-18.0pt;mso-list:l0 level2 lfo1'>" +
+ "<![if !supportLists]><span style='font-family:\"Courier New\";mso-fareast-font-family:\"Courier New\"'>" +
+ "<span style='mso-list:Ignore'>o<span style='font:7.0pt \"Times New Roman\"'> </span></span></span><![endif]>b</p>" +
+
+ "<p class=MsoListParagraphCxSpLast style='margin-left:108.0pt;mso-add-space:auto;text-indent:-18.0pt;mso-list:l0 level3 lfo1'>" +
+ "<![if !supportLists]><span style='font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings'>" +
+ "<span style='mso-list:Ignore'>§<span style='font:7.0pt \"Times New Roman\"'> </span></span></span><![endif]>c 1. x</p>"
+ )
+ });
+
+ equal(
+ editor.getContent(),
+ '<ul>'+
+ '<li>a' +
+ '<ul>' +
+ '<li>b' +
+ '<ul>' +
+ '<li>c 1. x</li>' +
+ '</ul>' +
+ '</li>' +
+ '</ul>' +
+ '</li>' +
+ '</ul>'
+ );
+});
+
+test('paste nested (OL) word list', function() {
+ editor.setContent('');
+
+ editor.execCommand('mceInsertClipboardContent', false, {
+ content: (
+ "<p class=MsoListParagraphCxSpFirst style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'>" +
+ "<![if !supportLists]><span style='mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin'>" +
+ "<span style='mso-list:Ignore'>1.<span style='font:7.0pt \"Times New Roman\"'> </span>" +
+ "</span></span><![endif]>a</p>" +
+
+ "<p class=MsoListParagraphCxSpMiddle style='margin-left:72.0pt;mso-add-space:auto;text-indent:-18.0pt;mso-list:l0 level2 lfo1'>" +
+ "<![if !supportLists]><span style='mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin'><span style='mso-list:Ignore'>a." +
+ "<span style='font:7.0pt \"Times New Roman\"'> </span></span></span><![endif]>b</p>" +
+
+ "<p class=MsoListParagraphCxSpLast style='margin-left:108.0pt;mso-add-space:auto;text-indent:-108.0pt;mso-text-indent-alt:-9.0pt;mso-list:l0 level3 lfo1'>" +
+ "<![if !supportLists]><span style='mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin'><span style='mso-list:Ignore'>" +
+ "<span style='font:7.0pt \"Times New Roman\"'> " +
+ " " +
+ " " +
+ " </span>i.<span style='font:7.0pt \"Times New Roman\"'>" +
+ " </span></span></span><![endif]>c</p>"
+ )
+ });
+
+ equal(
+ editor.getContent(),
+ '<ol>'+
+ '<li>a' +
+ '<ol>' +
+ '<li>b' +
+ '<ol>' +
+ '<li>c</li>' +
+ '</ol>' +
+ '</li>' +
+ '</ol>' +
+ '</li>' +
+ '</ol>'
+ );
+});
+
</ins><span class="cx"> test("Paste paste_merge_formats: true", function() {
</span><span class="cx"> editor.settings.paste_merge_formats = true;
</span><span class="cx">
</span><span class="lines">@@ -464,6 +540,10 @@
</span><span class="cx"> equal(editor.getContent(), '<p><em>c</em></p>');
</span><span class="cx"> });
</span><span class="cx">
</span><ins>+test('paste innerText of conditional comments', function() {
+ equal(tinymce.pasteplugin.Utils.innerText('<![if !supportLists]>X<![endif]>'), 'X');
+});
+
</ins><span class="cx"> test('paste innerText of single P', function() {
</span><span class="cx"> editor.setContent('<p>a</p>');
</span><span class="cx"> equal(tinymce.pasteplugin.Utils.innerText(editor.getBody().innerHTML), 'a');
</span><span class="lines">@@ -509,6 +589,10 @@
</span><span class="cx"> equal(tinymce.pasteplugin.Utils.trimHtml('a\n<body>\n<!--StartFragment-->\nb\n<!--EndFragment-->\n</body>\nc'), '\nb\n');
</span><span class="cx"> equal(tinymce.pasteplugin.Utils.trimHtml('a<!--StartFragment-->b<!--EndFragment-->c'), 'abc');
</span><span class="cx"> equal(tinymce.pasteplugin.Utils.trimHtml('a<body>b</body>c'), 'b');
</span><ins>+ equal(tinymce.pasteplugin.Utils.trimHtml('a<span class="Apple-converted-space">\u00a0<\/span>b'), 'a b');
+ equal(tinymce.pasteplugin.Utils.trimHtml('<span class="Apple-converted-space">\u00a0<\/span>b'), ' b');
+ equal(tinymce.pasteplugin.Utils.trimHtml('a<span class="Apple-converted-space">\u00a0<\/span>'), 'a ');
+ equal(tinymce.pasteplugin.Utils.trimHtml('<span class="Apple-converted-space">\u00a0<\/span>'), ' ');
</ins><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> if (tinymce.Env.webkit) {
</span><span class="lines">@@ -568,10 +652,17 @@
</span><span class="cx"> test('paste webkit remove runtime styles (font-family)', function() {
</span><span class="cx"> editor.settings.paste_webkit_styles = 'font-family';
</span><span class="cx"> editor.setContent('');
</span><del>- editor.execCommand('mceInsertClipboardContent', false, {content: '<span style="font-family:arial; text-indent: 10px">Test</span>'});
- equal(editor.getContent(), '<p><span style="font-family: arial;">Test</span></p>');
</del><ins>+ editor.execCommand('mceInsertClipboardContent', false, {content: '<span style="font-family:serif; text-indent: 10px">Test</span>'});
+ equal(editor.getContent(), '<p><span style="font-family: serif;">Test</span></p>');
</ins><span class="cx"> });
</span><span class="cx">
</span><ins>+ test('paste webkit remove runtime styles font-family allowed but not specified', function() {
+ editor.settings.paste_webkit_styles = 'font-family';
+ editor.setContent('');
+ editor.execCommand('mceInsertClipboardContent', false, {content: '<p title="x" style="text-indent: 10px">Test</p>'});
+ equal(editor.getContent(), '<p title="x">Test</p>');
+ });
+
</ins><span class="cx"> test('paste webkit remove runtime styles (custom styles)', function() {
</span><span class="cx"> editor.settings.paste_webkit_styles = 'color font-style';
</span><span class="cx"> editor.setContent('');
</span></span></pre></div>
<a id="trunktestsquniteditorpluginstablejs"></a>
<div class="modfile"><h4>Modified: trunk/tests/qunit/editor/plugins/table.js (29202 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/qunit/editor/plugins/table.js 2014-07-17 00:49:11 UTC (rev 29202)
+++ trunk/tests/qunit/editor/plugins/table.js 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -10,13 +10,26 @@
</span><span class="cx"> indent: false,
</span><span class="cx"> plugins: 'table',
</span><span class="cx"> valid_styles: {
</span><del>- '*' : 'width,height,vertical-align,text-align,float'
</del><ins>+ '*' : 'width,height,vertical-align,text-align,float,border-color,background-color'
</ins><span class="cx"> },
</span><span class="cx"> init_instance_callback: function(ed) {
</span><span class="cx"> window.editor = ed;
</span><span class="cx"> QUnit.start();
</span><span class="cx"> }
</span><span class="cx"> });
</span><ins>+ },
+ teardown: function() {
+ var win = Utils.getFontmostWindow();
+
+ if (win) {
+ win.close();
+ }
+
+ delete editor.settings.table_adv_tab;
+ delete editor.settings.table_cell_adv_tab;
+ delete editor.settings.table_class_list;
+ delete editor.settings.table_cell_class_list;
+ delete editor.settings.table_row_class_list;
</ins><span class="cx"> }
</span><span class="cx"> });
</span><span class="cx">
</span><span class="lines">@@ -35,7 +48,7 @@
</span><span class="cx"> test("Table properties dialog (get data from plain table)", function() {
</span><span class="cx"> editor.setContent('<table><tr><td>X</td></tr></table>');
</span><span class="cx"> Utils.setSelection('td', 0);
</span><del>- editor.execCommand('mceInsertTable');
</del><ins>+ editor.execCommand('mceTableProps');
</ins><span class="cx">
</span><span class="cx"> deepEqual(Utils.getFontmostWindow().toJSON(), {
</span><span class="cx"> "align": "",
</span><span class="lines">@@ -44,12 +57,73 @@
</span><span class="cx"> "cellpadding": "",
</span><span class="cx"> "cellspacing": "",
</span><span class="cx"> "height": "",
</span><ins>+ "width": "",
+ "backgroundColor": "",
+ "borderColor": "",
+ "style": ""
+ });
+ });
+
+ test("Table properties dialog (get/set data from/to plain table, no adv tab)", function() {
+ editor.settings.table_adv_tab = false;
+
+ editor.setContent('<table><tr><td>X</td></tr></table>');
+ Utils.setSelection('td', 0);
+ editor.execCommand('mceTableProps');
+
+ deepEqual(Utils.getFontmostWindow().toJSON(), {
+ "align": "",
+ "border": "",
+ "caption": false,
+ "cellpadding": "",
+ "cellspacing": "",
+ "height": "",
</ins><span class="cx"> "width": ""
</span><span class="cx"> });
</span><span class="cx">
</span><del>- Utils.getFontmostWindow().close();
</del><ins>+ fillAndSubmitWindowForm({
+ width: "100",
+ height: "101"
+ });
+
+ equal(
+ cleanTableHtml(editor.getContent()),
+ '<table style="width: 100px; height: 101px;"><tbody><tr><td>x</td></tr></tbody></table>'
+ );
</ins><span class="cx"> });
</span><span class="cx">
</span><ins>+ test("Table properties dialog (get/set data from/to plain table, class list)", function() {
+ editor.settings.table_class_list = [{title: 'Class1', value: 'class1'}];
+
+ editor.setContent('<table><tr><td>X</td></tr></table>');
+ Utils.setSelection('td', 0);
+ editor.execCommand('mceTableProps');
+
+ deepEqual(Utils.getFontmostWindow().toJSON(), {
+ "align": "",
+ "border": "",
+ "caption": false,
+ "cellpadding": "",
+ "cellspacing": "",
+ "height": "",
+ "width": "",
+ "backgroundColor": "",
+ "borderColor": "",
+ "style": "",
+ "class": ""
+ });
+
+ fillAndSubmitWindowForm({
+ width: "100",
+ height: "101"
+ });
+
+ equal(
+ cleanTableHtml(editor.getContent()),
+ '<table style="width: 100px; height: 101px;"><tbody><tr><td>x</td></tr></tbody></table>'
+ );
+ });
+
</ins><span class="cx"> test("Table properties dialog (get data from full table)", function() {
</span><span class="cx"> editor.setContent(
</span><span class="cx"> '<table style="width: 100px; height: 101px;" border="4" cellspacing="2" cellpadding="3">' +
</span><span class="lines">@@ -63,7 +137,7 @@
</span><span class="cx"> );
</span><span class="cx">
</span><span class="cx"> Utils.setSelection('td', 0);
</span><del>- editor.execCommand('mceInsertTable');
</del><ins>+ editor.execCommand('mceTableProps');
</ins><span class="cx">
</span><span class="cx"> deepEqual(Utils.getFontmostWindow().toJSON(), {
</span><span class="cx"> "align": "",
</span><span class="lines">@@ -72,16 +146,17 @@
</span><span class="cx"> "cellpadding": "3",
</span><span class="cx"> "cellspacing": "2",
</span><span class="cx"> "height": "101",
</span><del>- "width": "100"
</del><ins>+ "width": "100",
+ "backgroundColor": "",
+ "borderColor": "",
+ "style": "width: 100px; height: 101px;"
</ins><span class="cx"> });
</span><del>-
- Utils.getFontmostWindow().close();
</del><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> test("Table properties dialog (add caption)", function() {
</span><span class="cx"> editor.setContent('<table><tr><td>X</td></tr></table>');
</span><span class="cx"> Utils.setSelection('td', 0);
</span><del>- editor.execCommand('mceInsertTable');
</del><ins>+ editor.execCommand('mceTableProps');
</ins><span class="cx"> fillAndSubmitWindowForm({
</span><span class="cx"> caption: true
</span><span class="cx"> });
</span><span class="lines">@@ -95,7 +170,7 @@
</span><span class="cx"> test("Table properties dialog (remove caption)", function() {
</span><span class="cx"> editor.setContent('<table><caption> </caption><tr><td>X</td></tr></table>');
</span><span class="cx"> Utils.setSelection('td', 0);
</span><del>- editor.execCommand('mceInsertTable');
</del><ins>+ editor.execCommand('mceTableProps');
</ins><span class="cx"> fillAndSubmitWindowForm({
</span><span class="cx"> caption: false
</span><span class="cx"> });
</span><span class="lines">@@ -109,7 +184,7 @@
</span><span class="cx"> test("Table properties dialog (change size in pixels)", function() {
</span><span class="cx"> editor.setContent('<table><tr><td>X</td></tr></table>');
</span><span class="cx"> Utils.setSelection('td', 0);
</span><del>- editor.execCommand('mceInsertTable');
</del><ins>+ editor.execCommand('mceTableProps');
</ins><span class="cx"> fillAndSubmitWindowForm({
</span><span class="cx"> width: 100,
</span><span class="cx"> height: 101
</span><span class="lines">@@ -124,7 +199,7 @@
</span><span class="cx"> test("Table properties dialog (change size in %)", function() {
</span><span class="cx"> editor.setContent('<table><tr><td>X</td></tr></table>');
</span><span class="cx"> Utils.setSelection('td', 0);
</span><del>- editor.execCommand('mceInsertTable');
</del><ins>+ editor.execCommand('mceTableProps');
</ins><span class="cx"> fillAndSubmitWindowForm({
</span><span class="cx"> width: "100%",
</span><span class="cx"> height: "101%"
</span><span class="lines">@@ -136,10 +211,10 @@
</span><span class="cx"> );
</span><span class="cx"> });
</span><span class="cx">
</span><del>- test("Table properties dialog (change: border,cellpadding,cellspacing,align)", function() {
- editor.setContent('<table><tr><td>X</td></tr></table>');
</del><ins>+ test("Table properties dialog (change: border,cellpadding,cellspacing,align,backgroundColor,borderColor)", function() {
+ editor.setContent('<table style="border-color: red; background-color: blue"><tr><td>X</td></tr></table>');
</ins><span class="cx"> Utils.setSelection('td', 0);
</span><del>- editor.execCommand('mceInsertTable');
</del><ins>+ editor.execCommand('mceTableProps');
</ins><span class="cx"> fillAndSubmitWindowForm({
</span><span class="cx"> border: "1",
</span><span class="cx"> cellpadding: "2",
</span><span class="lines">@@ -149,7 +224,7 @@
</span><span class="cx">
</span><span class="cx"> equal(
</span><span class="cx"> cleanTableHtml(editor.getContent()),
</span><del>- '<table style="float: right;" border="1" cellspacing="3" cellpadding="2"><tbody><tr><td>x</td></tr></tbody></table>'
</del><ins>+ '<table style="float: right; border-color: red; background-color: blue;" border="1" cellspacing="3" cellpadding="2"><tbody><tr><td>x</td></tr></tbody></table>'
</ins><span class="cx"> );
</span><span class="cx"> });
</span><span class="cx">
</span><span class="lines">@@ -164,14 +239,42 @@
</span><span class="cx"> "height": "",
</span><span class="cx"> "scope": "",
</span><span class="cx"> "type": "td",
</span><ins>+ "width": "",
+ "backgroundColor": "",
+ "borderColor": "",
+ "style": ""
+ });
+ });
+
+ test("Table cell properties dialog (get/set data from/to plain cell, no adv tab)", function() {
+ editor.settings.table_cell_adv_tab = false;
+
+ editor.setContent('<table><tr><td>X</td></tr></table>');
+ Utils.setSelection('td', 0);
+ editor.execCommand('mceTableCellProps');
+
+ deepEqual(Utils.getFontmostWindow().toJSON(), {
+ "align": "",
+ "valign": "",
+ "height": "",
+ "scope": "",
+ "type": "td",
</ins><span class="cx"> "width": ""
</span><span class="cx"> });
</span><span class="cx">
</span><del>- Utils.getFontmostWindow().close();
</del><ins>+ fillAndSubmitWindowForm({
+ width: 100,
+ height: 101
+ });
+
+ equal(
+ cleanTableHtml(editor.getContent()),
+ '<table><tbody><tr><td style="width: 100px; height: 101px;">x</td></tr></tbody></table>'
+ );
</ins><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> test("Table cell properties dialog (get data from complex cell)", function() {
</span><del>- editor.setContent('<table><tr><th style="text-align: right; vertical-align: top; width: 10px; height: 11px" scope="row">X</th></tr></table>');
</del><ins>+ editor.setContent('<table><tr><th style="text-align: right; vertical-align: top; width: 10px; height: 11px; border-color: red; background-color: blue" scope="row">X</th></tr></table>');
</ins><span class="cx"> Utils.setSelection('th', 0);
</span><span class="cx"> editor.execCommand('mceTableCellProps');
</span><span class="cx">
</span><span class="lines">@@ -181,10 +284,11 @@
</span><span class="cx"> "height": "11",
</span><span class="cx"> "scope": "row",
</span><span class="cx"> "type": "th",
</span><del>- "width": "10"
</del><ins>+ "width": "10",
+ "backgroundColor": "blue",
+ "borderColor": "red",
+ "style": "width: 10px; height: 11px; vertical-align: top; text-align: right; border-color: red; background-color: blue;"
</ins><span class="cx"> });
</span><del>-
- Utils.getFontmostWindow().close();
</del><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> test("Table cell properties dialog (update all)", function() {
</span><span class="lines">@@ -214,24 +318,26 @@
</span><span class="cx"> deepEqual(Utils.getFontmostWindow().toJSON(), {
</span><span class="cx"> "align": "",
</span><span class="cx"> "height": "",
</span><del>- "type": "tbody"
</del><ins>+ "type": "tbody",
+ "backgroundColor": "",
+ "borderColor": "",
+ "style": ""
</ins><span class="cx"> });
</span><del>-
- Utils.getFontmostWindow().close();
</del><span class="cx"> });
</span><span class="cx">
</span><del>- test("Table row properties dialog (get data from complex cell)", function() {
- editor.setContent('<table><thead><tr style="height: 10px; text-align: right"><td>X</td></tr></thead></table>');
</del><ins>+ test("Table row properties dialog (get data from complex row)", function() {
+ editor.setContent('<table><thead><tr style="height: 10px; text-align: right; border-color: red; background-color: blue"><td>X</td></tr></thead></table>');
</ins><span class="cx"> Utils.setSelection('td', 0);
</span><span class="cx"> editor.execCommand('mceTableRowProps');
</span><span class="cx">
</span><span class="cx"> deepEqual(Utils.getFontmostWindow().toJSON(), {
</span><span class="cx"> "align": "right",
</span><span class="cx"> "height": "10",
</span><del>- "type": "thead"
</del><ins>+ "type": "thead",
+ "backgroundColor": "blue",
+ "borderColor": "red",
+ "style": "height: 10px; text-align: right; border-color: red; background-color: blue;"
</ins><span class="cx"> });
</span><del>-
- Utils.getFontmostWindow().close();
</del><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> test("Table row properties dialog (update all)", function() {
</span><span class="lines">@@ -301,7 +407,7 @@
</span><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> test("mceTableMergeCells command with cell selection", function() {
</span><del>- editor.setContent('<table><tr><td class="mce-item-selected">1</td><td class="mce-item-selected">2</td></tr></table>');
</del><ins>+ editor.getBody().innerHTML = '<table><tr><td class="mce-item-selected">1</td><td class="mce-item-selected">2</td></tr></table>';
</ins><span class="cx"> Utils.setSelection('td', 0);
</span><span class="cx"> editor.execCommand('mceTableMergeCells');
</span><span class="cx"> equal(cleanTableHtml(editor.getContent()), '<table><tbody><tr><td colspan="2">12</td></tr></tbody></table>');
</span></span></pre></div>
<a id="trunktestsquniteditorpluginstextpatternjs"></a>
<div class="addfile"><h4>Added: trunk/tests/qunit/editor/plugins/textpattern.js (0 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/qunit/editor/plugins/textpattern.js (rev 0)
+++ trunk/tests/qunit/editor/plugins/textpattern.js 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -0,0 +1,126 @@
</span><ins>+(function() {
+ module("tinymce.plugins.TextPattern", {
+ setupModule: function() {
+ QUnit.stop();
+
+ tinymce.init({
+ selector: 'textarea',
+ add_unload_trigger: false,
+ skin: false,
+ indent: false,
+ plugins: "textpattern",
+ init_instance_callback: function(ed) {
+ window.editor = ed;
+ QUnit.start();
+ }
+ });
+ },
+
+ teardown: function() {
+ delete editor.settings.textpattern_patterns;
+ }
+ });
+
+ test('Italic format on single word using space', function() {
+ editor.setContent('<p>*abc*\u00a0</p>');
+ Utils.setSelection('p', 6);
+ editor.fire('keyup', {keyCode: 32});
+
+ equal(
+ editor.getContent(),
+ '<p><em>abc</em> </p>'
+ );
+ });
+
+ test('Bold format on single word using space', function() {
+ editor.setContent('<p>**abc**\u00a0</p>');
+ Utils.setSelection('p', 8);
+ editor.fire('keyup', {keyCode: 32});
+
+ equal(
+ editor.getContent(),
+ '<p><strong>abc</strong> </p>'
+ );
+ });
+
+ test('Bold format on multiple words using space', function() {
+ editor.setContent('<p>**abc 123**\u00a0</p>');
+ Utils.setSelection('p', 12);
+ editor.fire('keyup', {keyCode: 32});
+
+ equal(
+ editor.getContent(),
+ '<p><strong>abc 123</strong> </p>'
+ );
+ });
+
+ test('Bold format on single word using enter', function() {
+ editor.setContent('<p>**abc**</p>');
+ Utils.setSelection('p', 7);
+ editor.fire('keydown', {keyCode: 13});
+
+ equal(
+ editor.getContent(),
+ '<p><strong>abc</strong></p><p> </p>'
+ );
+ });
+
+ test('H1 format on single word node using enter', function() {
+ editor.setContent('<p>#abc</p>');
+ Utils.setSelection('p', 4);
+ editor.fire('keydown', {keyCode: 13});
+
+ equal(
+ editor.getContent(),
+ '<h1>abc</h1><p> </p>'
+ );
+ });
+
+ test('OL format on single word node using enter', function() {
+ editor.setContent('<p>1. abc</p>');
+ Utils.setSelection('p', 6);
+ editor.fire('keydown', {keyCode: 13});
+
+ equal(
+ editor.getContent(),
+ '<ol><li>abc</li><li></li></ol>'
+ );
+ });
+
+ test('UL format on single word node using enter', function() {
+ editor.setContent('<p>* abc</p>');
+ Utils.setSelection('p', 5);
+ editor.fire('keydown', {keyCode: 13});
+
+ equal(
+ editor.getContent(),
+ '<ul><li>abc</li><li></li></ul>'
+ );
+ });
+
+ test('getPatterns/setPatterns', function() {
+ editor.plugins.textpattern.setPatterns([
+ {start: '#', format: 'h1'},
+ {start: '##', format: 'h2'},
+ {start: '###', format: 'h3'}
+ ]);
+
+ deepEqual(
+ editor.plugins.textpattern.getPatterns(),
+ [
+ {
+ "format": "h3",
+ "start": "###"
+ },
+ {
+ "format": "h2",
+ "start": "##"
+ },
+ {
+ "format": "h1",
+ "start": "#"
+ }
+ ]
+ );
+ });
+})();
</ins><span class="cx">\ No newline at end of file
</span><span class="cx">Property changes on: trunk/tests/qunit/editor/plugins/textpattern.js
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+native
</ins><span class="cx">\ No newline at end of property
</span><a id="trunktestsquniteditortinymceEditorjs"></a>
<div class="modfile"><h4>Modified: trunk/tests/qunit/editor/tinymce/Editor.js (29202 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/qunit/editor/tinymce/Editor.js 2014-07-17 00:49:11 UTC (rev 29202)
+++ trunk/tests/qunit/editor/tinymce/Editor.js 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -324,10 +324,10 @@
</span><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> test('insertContent', function() {
</span><del>- editor.setContent('<p>a</p>');
</del><ins>+ editor.setContent('<p>ab</p>');
</ins><span class="cx"> Utils.setSelection('p', 1);
</span><del>- editor.insertContent('b');
- equal(editor.getContent(), '<p>ab</p>');
</del><ins>+ editor.insertContent('c');
+ equal(editor.getContent(), '<p>acb</p>');
</ins><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> test('insertContent merge', function() {
</span></span></pre></div>
<a id="trunktestsquniteditortinymceForceBlocksjs"></a>
<div class="modfile"><h4>Modified: trunk/tests/qunit/editor/tinymce/ForceBlocks.js (29202 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/qunit/editor/tinymce/ForceBlocks.js 2014-07-17 00:49:11 UTC (rev 29202)
+++ trunk/tests/qunit/editor/tinymce/ForceBlocks.js 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -72,9 +72,14 @@
</span><span class="cx">
</span><span class="cx"> editor.settings.forced_root_block = 'div';
</span><span class="cx"> editor.getBody().innerHTML = 'abcd<div>abcd</div>';
</span><del>- Utils.setSelection('body', 2);
</del><span class="cx"> body.insertBefore(editor.getDoc().createTextNode(''), body.firstChild);
</span><span class="cx"> body.appendChild(editor.getDoc().createTextNode(''));
</span><ins>+
+ var rng = editor.dom.createRng();
+ rng.setStart(editor.getBody().childNodes[1], 1);
+ rng.setEnd(editor.getBody().childNodes[1], 1);
+ editor.selection.setRng(rng);
+
</ins><span class="cx"> Utils.pressArrowKey();
</span><span class="cx"> equal(Utils.cleanHtml(body.innerHTML), '<div>abcd</div><div>abcd</div>');
</span><span class="cx"> equal(editor.selection.getNode().nodeName, 'DIV');
</span></span></pre></div>
<a id="trunktestsquniteditortinymceFormatter_applyjs"></a>
<div class="modfile"><h4>Modified: trunk/tests/qunit/editor/tinymce/Formatter_apply.js (29202 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/qunit/editor/tinymce/Formatter_apply.js 2014-07-17 00:49:11 UTC (rev 29202)
+++ trunk/tests/qunit/editor/tinymce/Formatter_apply.js 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -20,7 +20,7 @@
</span><span class="cx"> init_instance_callback: function(ed) {
</span><span class="cx"> window.editor = ed;
</span><span class="cx">
</span><del>- if (window.inlineEditor) {
</del><ins>+ if (inlineEditor) {
</ins><span class="cx"> QUnit.start();
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> init_instance_callback: function(ed) {
</span><span class="cx"> window.inlineEditor = ed;
</span><span class="cx">
</span><del>- if (window.editor) {
</del><ins>+ if (editor) {
</ins><span class="cx"> QUnit.start();
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -1086,6 +1086,17 @@
</span><span class="cx"> equal(editor.getContent(), '<ul><li><h1>text</h1><ul><li>nested</li></ul></li></ul>', "heading should not automatically apply to sublists");
</span><span class="cx"> });
</span><span class="cx">
</span><ins>+test("Applying formats on a list including child nodes", function(){
+ editor.formatter.register('format', {inline: 'strong'});
+ editor.setContent('<ol><li>a</li><li>b<ul><li>c</li><li>d<br /><ol><li>e</li><li>f</li></ol></li></ul></li><li>g</li></ol>');
+ rng = editor.dom.createRng();
+ rng.setStart(editor.dom.select('li')[0].firstChild, 0);
+ rng.setEnd(editor.dom.select('li')[6].firstChild, 1);
+ editor.selection.setRng(rng);
+ editor.formatter.apply("format");
+ equal(editor.getContent(), '<ol><li><strong>a</strong></li><li><strong>b</strong><ul><li><strong>c</strong></li><li><strong>d</strong><br /><ol><li><strong>e</strong></li><li><strong>f</strong></li></ol></li></ul></li><li><strong>g</strong></li></ol>', "should be applied to all sublists");
+});
+
</ins><span class="cx"> test('Block format on li element', function() {
</span><span class="cx"> editor.setContent('<ul><li>text<ul><li>nested</li></ul></li></ul>');
</span><span class="cx"> var rng = editor.dom.createRng();
</span><span class="lines">@@ -1595,4 +1606,4 @@
</span><span class="cx"> });
</span><span class="cx"> inlineEditor.formatter.apply('format');
</span><span class="cx"> equal(inlineEditor.getContent(), '<div>a</div><p>b</p>');
</span><del>-});
</del><ins>+});
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunktestsquniteditortinymcedomDOMUtilsjs"></a>
<div class="modfile"><h4>Modified: trunk/tests/qunit/editor/tinymce/dom/DOMUtils.js (29202 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/qunit/editor/tinymce/dom/DOMUtils.js 2014-07-17 00:49:11 UTC (rev 29202)
+++ trunk/tests/qunit/editor/tinymce/dom/DOMUtils.js 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -62,17 +62,13 @@
</span><span class="cx"> DOM.remove('test');
</span><span class="cx"> });
</span><span class="cx">
</span><del>- test('addClass', 10, function() {
</del><ins>+ test('addClass', function() {
</ins><span class="cx"> DOM.add(document.body, 'div', {id : 'test'});
</span><span class="cx">
</span><span class="cx"> DOM.get('test').className = '';
</span><span class="cx"> DOM.addClass('test', 'abc');
</span><span class="cx"> equal(DOM.get('test').className, 'abc');
</span><span class="cx">
</span><del>- DOM.get('test').className = '';
- equal(DOM.addClass('test', 'abc'), 'abc');
- equal(DOM.addClass(null, 'abc'), false);
-
</del><span class="cx"> DOM.addClass('test', '123');
</span><span class="cx"> equal(DOM.get('test').className, 'abc 123');
</span><span class="cx">
</span><span class="lines">@@ -83,17 +79,10 @@
</span><span class="cx"> equal(DOM.get('test4').className, 'abc');
</span><span class="cx"> DOM.get('test').innerHTML = '';
</span><span class="cx">
</span><del>- DOM.get('test').innerHTML = '<span id="test2"></span><span id="test3"></span><span id="test4"></span>';
- DOM.addClass(['test2', 'test3', 'test4'], 'abc');
- equal(DOM.get('test2').className, 'abc');
- equal(DOM.get('test3').className, 'abc');
- equal(DOM.get('test4').className, 'abc');
- DOM.get('test').innerHTML = '';
-
</del><span class="cx"> DOM.remove('test');
</span><span class="cx"> });
</span><span class="cx">
</span><del>- test('removeClass', 4, function() {
</del><ins>+ test('removeClass', 5, function() {
</ins><span class="cx"> DOM.add(document.body, 'div', {id : 'test'});
</span><span class="cx">
</span><span class="cx"> DOM.get('test').className = 'abc 123 xyz';
</span><span class="lines">@@ -105,8 +94,11 @@
</span><span class="cx"> equal(DOM.get('test2').className, '');
</span><span class="cx"> equal(DOM.get('test3').className, 'test test');
</span><span class="cx"> equal(DOM.get('test4').className, 'test');
</span><del>- DOM.get('test').innerHTML = '';
</del><span class="cx">
</span><ins>+ DOM.get('test').innerHTML = '<span id="test2" class="test"></span>';
+ DOM.removeClass('test2', 'test');
+ equal(Utils.normalizeHtml(DOM.get('test').innerHTML), '<span id="test2"></span>');
+
</ins><span class="cx"> DOM.remove('test');
</span><span class="cx"> });
</span><span class="cx">
</span><span class="lines">@@ -185,29 +177,17 @@
</span><span class="cx"> equal(DOM.uniqueId(), 'mce_2');
</span><span class="cx"> });
</span><span class="cx">
</span><del>- test('showHide', 10, function() {
</del><ins>+ test('showHide', function() {
</ins><span class="cx"> DOM.add(document.body, 'div', {id : 'test'});
</span><span class="cx">
</span><span class="cx"> DOM.show('test');
</span><del>- equal(DOM.get('test').style.display, 'block');
</del><ins>+ equal(DOM.get('test').style.display, '');
</ins><span class="cx"> ok(!DOM.isHidden('test'));
</span><span class="cx">
</span><span class="cx"> DOM.hide('test');
</span><span class="cx"> equal(DOM.get('test').style.display, 'none');
</span><span class="cx"> ok(DOM.isHidden('test'));
</span><span class="cx">
</span><del>- DOM.get('test').innerHTML = '<span id="test2"></span><span id="test3"></span><span id="test4"></span>';
- DOM.hide(['test2', 'test3', 'test4'], 'test');
- equal(DOM.get('test2').style.display, 'none');
- equal(DOM.get('test3').style.display, 'none');
- equal(DOM.get('test4').style.display, 'none');
-
- DOM.get('test').innerHTML = '<span id="test2"></span><span id="test3"></span><span id="test4"></span>';
- DOM.show(['test2', 'test3', 'test4'], 'test');
- equal(DOM.get('test2').style.display, 'block');
- equal(DOM.get('test3').style.display, 'block');
- equal(DOM.get('test4').style.display, 'block');
-
</del><span class="cx"> // Cleanup
</span><span class="cx"> DOM.setAttrib('test', 'style', '');
</span><span class="cx">
</span><span class="lines">@@ -246,7 +226,7 @@
</span><span class="cx"> equal(DOM.encode('abc<>"&\'\u00e5\u00e4\u00f6'), 'abc<>"&'\u00e5\u00e4\u00f6');
</span><span class="cx"> });
</span><span class="cx">
</span><del>- test('setGetAttrib', 16, function() {
</del><ins>+ test('setGetAttrib', function() {
</ins><span class="cx"> var dom;
</span><span class="cx">
</span><span class="cx"> DOM.add(document.body, 'div', {id : 'test'});
</span><span class="lines">@@ -275,12 +255,6 @@
</span><span class="cx"> equal(DOM.getAttrib('test', 'src'), '&<>"123&<>"src');
</span><span class="cx"> equal(DOM.getAttrib('test', 'href'), '&<>"abc&<>"href');
</span><span class="cx">
</span><del>- DOM.get('test').innerHTML = '<span id="test2"></span><span id="test3"></span><span id="test4"></span>';
- DOM.setAttribs(['test2', 'test3', 'test4'], {test1 : "1", test2 : "2"});
- equal(DOM.getAttrib('test2', 'test1'), '1');
- equal(DOM.getAttrib('test3', 'test2'), '2');
- equal(DOM.getAttrib('test4', 'test1'), '1');
-
</del><span class="cx"> equal(DOM.getAttrib(document, 'test'), false);
</span><span class="cx"> equal(DOM.getAttrib(document, 'test', ''), '');
</span><span class="cx"> equal(DOM.getAttrib(document, 'test', 'x'), 'x');
</span><span class="lines">@@ -314,32 +288,32 @@
</span><span class="cx"> DOM.remove('test');
</span><span class="cx"> });
</span><span class="cx">
</span><del>- test('setGetStyles', 9, function() {
</del><ins>+ test('setGetStyles', function() {
</ins><span class="cx"> DOM.add(document.body, 'div', {id : 'test'});
</span><span class="cx">
</span><span class="cx"> DOM.setStyle('test', 'font-size', '20px');
</span><del>- equal(DOM.getStyle('test', 'font-size'), '20px', null, tinymce.isWebKit);
</del><ins>+ equal(DOM.getStyle('test', 'font-size'), '20px');
</ins><span class="cx">
</span><span class="cx"> DOM.setStyle('test', 'fontSize', '21px');
</span><del>- equal(DOM.getStyle('test', 'fontSize'), '21px', null, tinymce.isWebKit);
</del><ins>+ equal(DOM.getStyle('test', 'fontSize'), '21px');
</ins><span class="cx">
</span><span class="cx"> DOM.setStyles('test', {fontSize : '22px', display : 'inline'});
</span><del>- equal(DOM.getStyle('test', 'fontSize'), '22px', null, tinymce.isWebKit);
- equal(DOM.getStyle('test', 'display'), 'inline', null, tinymce.isWebKit);
</del><ins>+ equal(DOM.getStyle('test', 'fontSize'), '22px');
+ equal(DOM.getStyle('test', 'display'), 'inline');
</ins><span class="cx">
</span><del>- DOM.get('test').innerHTML = '<span id="test2"></span><span id="test3"></span><span id="test4"></span>';
- DOM.setStyles(['test2', 'test3', 'test4'], {fontSize : "22px"});
- equal(DOM.getStyle('test2', 'fontSize'), '22px');
- equal(DOM.getStyle('test3', 'fontSize'), '22px');
- equal(DOM.getStyle('test4', 'fontSize'), '22px');
</del><ins>+ DOM.setStyle('test', 'fontSize', 23);
+ equal(DOM.getStyle('test', 'fontSize'), '23px');
</ins><span class="cx">
</span><span class="cx"> DOM.setStyle('test', 'fontSize', 23);
</span><del>- equal(DOM.getStyle('test', 'fontSize'), '23px', null, tinymce.isWebKit);
</del><ins>+ DOM.setStyle('test', 'fontSize', '');
+ equal(DOM.getStyle('test', 'fontSize'), '');
</ins><span class="cx">
</span><del>- DOM.setStyle('test', 'fontSize', '24');
- equal(DOM.getStyle('test', 'fontSize'), '24px', null, tinymce.isWebKit);
</del><ins>+ DOM.setStyle('test', 'fontSize', 23);
+ DOM.setStyle('test', 'fontSize', null);
+ equal(DOM.getStyle('test', 'fontSize'), '');
</ins><span class="cx">
</span><span class="cx"> DOM.setAttrib('test', 'style', '');
</span><ins>+ equal(typeof DOM.getStyle(null, 'fontSize'), 'undefined');
</ins><span class="cx">
</span><span class="cx"> DOM.remove('test');
</span><span class="cx"> });
</span><span class="lines">@@ -503,7 +477,7 @@
</span><span class="cx"> ok(DOM.isBlock('div'));
</span><span class="cx"> });
</span><span class="cx">
</span><del>- test('remove', 3, function() {
</del><ins>+ test('remove', 2, function() {
</ins><span class="cx"> DOM.add(document.body, 'div', {id : 'test'});
</span><span class="cx">
</span><span class="cx"> DOM.setHTML('test', '<span id="test2"><span>test</span><span>test2</span></span>');
</span><span class="lines">@@ -513,10 +487,6 @@
</span><span class="cx"> DOM.setHTML('test', '<span id="test2"><span>test</span><span>test2</span></span>');
</span><span class="cx"> equal(DOM.remove('test2').nodeName, 'SPAN');
</span><span class="cx">
</span><del>- DOM.get('test').innerHTML = '<span id="test2"></span><span id="test3"></span><span id="test4"></span>';
- DOM.remove(['test2', 'test4']);
- equal(DOM.select('span', 'test').length, 1);
-
</del><span class="cx"> DOM.remove('test');
</span><span class="cx"> });
</span><span class="cx">
</span></span></pre></div>
<a id="trunktestsquniteditortinymcedomDomQueryjs"></a>
<div class="addfile"><h4>Added: trunk/tests/qunit/editor/tinymce/dom/DomQuery.js (0 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/qunit/editor/tinymce/dom/DomQuery.js (rev 0)
+++ trunk/tests/qunit/editor/tinymce/dom/DomQuery.js 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -0,0 +1,1004 @@
</span><ins>+(function() {
+ module("tinymce.dom.DomQuery", {
+ teardown: function() {
+ document.getElementById('view').innerHTML = '';
+ }
+ });
+
+ function normalizeParentNode(parentNode) {
+ // IE 8 will return a document fragment as it's parent when nodes are removed
+ if (parentNode && parentNode.nodeType == 11) {
+ return null;
+ }
+
+ return parentNode;
+ }
+
+ function normalizeStyleValue(value) {
+ if (typeof value == 'string') {
+ return value.toLowerCase().replace(/\s+/g, ' ').replace(/;\s*$/, '');
+ }
+
+ return value;
+ }
+
+ function splitAtView(nodes) {
+ nodes.each(function(i) {
+ if (this.id == 'view') {
+ nodes = nodes.slice(0, i);
+ return false;
+ }
+ });
+
+ return nodes;
+ }
+
+ function addTests(prefix, $) {
+ test(prefix + 'Constructor HTML', function() {
+ var $html;
+
+ $html = $('<b>a</b><i>b</i>');
+ equal($html.length, 2);
+ equal($html[0].tagName, 'B');
+ equal($html[1].tagName, 'I');
+ });
+
+ test(prefix + 'Constructor HTML with attributes', function() {
+ var $html;
+
+ $html = $('<b>', {id: 'id', title: 'title'});
+ equal($html.length, 1);
+ equal($html[0].tagName, 'B');
+ equal($html[0].getAttribute('id'), 'id');
+ equal($html[0].getAttribute('title'), 'title');
+ });
+
+ test(prefix + 'Constructor selector', function() {
+ var $selector;
+
+ $selector = $('#view');
+ equal($selector.length, 1);
+ equal($selector.selector, '#view');
+ strictEqual($selector.context, document);
+ });
+
+ test(prefix + 'Constructor selector and context', function() {
+ var $selector;
+
+ $selector = $('#view', document);
+ equal($selector.length, 1);
+ equal($selector.selector, '#view');
+ strictEqual($selector.context, document);
+ });
+
+ test(prefix + 'Constructor selector and context', function() {
+ var $selector;
+
+ $('#view').html('<div><b>a</b></div><div><b>b</b></div>');
+ $('b', $('#view div')[0]).html('x');
+ equal($('#view').html().toLowerCase().replace(/[\r\n]/g, ''), '<div><b>x</b></div><div><b>b</b></div>');
+ });
+
+ test(prefix + 'Constructor array', function() {
+ var $html;
+
+ $html = $([document.getElementById('view'), document.body]);
+ equal($html.length, 2);
+ equal($html[0].tagName, 'DIV');
+ equal($html[1].tagName, 'BODY');
+ });
+
+ test(prefix + 'Constructor query instance', function() {
+ var $clone;
+
+ $clone = $($('#view'));
+ equal($clone.length, 1);
+ equal($clone[0].tagName, 'DIV');
+ });
+
+ test(prefix + 'static extend()', function() {
+ var data;
+
+ deepEqual($.extend({a: 1, b: 1}, {b: 2, c: 2}), {a: 1, b: 2, c: 2});
+ deepEqual($.extend({a: 1, b: 1}, {b: 2, c: 2}, {c: 3, d: 3}), {a: 1, b: 2, c: 3, d: 3});
+
+ data = {a: 1, b: 1};
+ ok(data === $.extend(data, {b: 2, c: 2}, {c: 3, d: 3}), {a: 1, b: 2, c: 3, d: 3});
+ });
+
+ test(prefix + 'static makeArray()', function() {
+ deepEqual($.makeArray({'0': 'a', '1': 'b', length: 2}), ['a', 'b']);
+ });
+
+ test(prefix + 'static inArray()', function() {
+ deepEqual($.inArray(1, [1, 2]), 0);
+ deepEqual($.inArray(2, [1, 2]), 1);
+ deepEqual($.inArray(3, [1, 2]), -1);
+ });
+
+ test(prefix + 'static grep()', function() {
+ deepEqual($.grep([1, 2, 3], function(v) {return v > 1;}), [2, 3]);
+ });
+
+ test(prefix + 'static isArray()', function() {
+ ok($.isArray([]));
+ ok(!$.isArray({}));
+ });
+
+ test(prefix + 'static each()', function() {
+ var data;
+
+ data = '';
+ $.each([1, 2, 3], function(key, value) {
+ data += '' + value + key;
+ });
+
+ equal(data, '102132');
+
+ data = '';
+ $.each({a: 1, b: 2, c: 3}, function(key, value) {
+ data += '' + value + key;
+ });
+
+ equal(data, '1a2b3c');
+
+ data = '';
+ $.each([1, 2, 3], function(key, value) {
+ data += '' + value + key;
+
+ if (value == 2) {
+ return false;
+ }
+ });
+
+ equal(data, '1021');
+ });
+
+ test(prefix + 'static trim()', function() {
+ equal($.trim(' a '), 'a');
+ equal($.trim('a '), 'a');
+ equal($.trim(' a'), 'a');
+ });
+
+ test(prefix + 'static unique()', function() {
+ var nodes;
+
+ nodes = $.unique([document.getElementById('view'), document.getElementById('view'), document.body]);
+ equal(nodes.length, 2);
+ equal(nodes[0].tagName, 'BODY');
+ equal(nodes[1].tagName, 'DIV');
+ });
+
+ test(prefix + 'toArray()', function() {
+ ok($.isArray($('#view').toArray()));
+ equal($('#view').toArray().length, 1);
+ });
+
+ test(prefix + 'add() single element', function() {
+ var $nodes = $('#view').add(document.body);
+ equal($nodes.length, 2);
+ equal($nodes[0].tagName, 'BODY');
+ equal($nodes[1].tagName, 'DIV');
+ });
+
+ test(prefix + 'add() multiple elements (duplicates)', function() {
+ var $nodes = $('#view,#view').add([document.body, document.body]);
+ equal($nodes.length, 2);
+ equal($nodes[0].tagName, 'BODY');
+ equal($nodes[1].tagName, 'DIV');
+ });
+
+ test(prefix + 'add() multiple elements (non duplicates)', function() {
+ var $nodes = $('#view').add([$('<b/>')[0], $('<i/>')[0]]);
+ equal($nodes.length, 3);
+ equal($nodes[0].tagName, 'DIV');
+ equal($nodes[1].tagName, 'B');
+ equal($nodes[2].tagName, 'I');
+ });
+
+ test(prefix + 'add() selector', function() {
+ var $nodes = $().add('#view');
+ equal($nodes.length, 1);
+ equal($nodes[0].tagName, 'DIV');
+ });
+
+ test(prefix + 'attr() set/get attr on element', function() {
+ var $elm;
+
+ $elm = $('<b/>').attr('id', 'x');
+ equal($elm.attr('id'), 'x');
+ equal(typeof $elm.attr('noattr'), 'undefined', 'Undefined attribute shouldn\'t have a value');
+
+ $elm = $('<b/>').attr('attr', null);
+ equal(typeof $elm.attr('attr'), 'undefined', 'Deleted attribute shouldn\'t have a value (1)');
+
+ $elm = $('<b/>').attr('id', 1);
+ strictEqual($elm.attr('id'), '1');
+ });
+
+ test(prefix + 'attr() set/get style attr on element (IE 7)', function() {
+ $elm = $('<b style="font-size: 10px" />').attr('style', 'font-size: 43px');
+ equal(normalizeStyleValue($elm.attr('style')), 'font-size: 43px');
+ });
+
+ test(prefix + 'attr() set/get checked attr on element (IE 7)', function() {
+ $elm = $('<input type="checkbox" />').attr('checked', 'checked');
+ equal($elm.attr('checked').toLowerCase(), 'checked');
+ });
+
+ test(prefix + 'attr() get special attrs on element (IE 7)', function() {
+ $elm = $('<input type="checkbox" />');
+ equal(typeof $elm.attr('maxlength'), 'undefined', 'Undefined maxlength');
+ equal(typeof $elm.attr('size'), 'undefined', 'Undefined size');
+ equal(typeof $elm.attr('checked'), 'undefined', 'Undefined checked');
+ equal(typeof $elm.attr('readonly'), 'undefined', 'Undefined readonly');
+ equal(typeof $elm.attr('disabled'), 'undefined', 'Undefined disabled');
+
+ $elm = $('<input type="text" />');
+ equal(typeof $elm.attr('maxlength'), 'undefined', 'Undefined maxlength');
+ equal(typeof $elm.attr('size'), 'undefined', 'Undefined size');
+ equal(typeof $elm.attr('checked'), 'undefined', 'Undefined checked');
+ equal(typeof $elm.attr('readonly'), 'undefined', 'Undefined readonly');
+ equal(typeof $elm.attr('disabled'), 'undefined', 'Undefined disabled');
+
+ $elm = $('<input type="text" size="11" maxlength="21" disabled="disabled" />');
+ equal($elm.attr('maxlength'), '21', 'maxlength');
+ equal($elm.attr('size'), '11', 'size');
+ equal($elm.attr('disabled'), 'disabled', 'disabled');
+
+ $elm = $('<textarea></textarea>');
+ equal(typeof $elm.attr('maxlength'), 'undefined', 'Undefined maxlength');
+ equal(typeof $elm.attr('size'), 'undefined', 'Undefined size');
+ equal(typeof $elm.attr('checked'), 'undefined', 'Undefined checked');
+ equal(typeof $elm.attr('readonly'), 'undefined', 'Undefined readonly');
+ equal(typeof $elm.attr('disabled'), 'undefined', 'Undefined disabled');
+
+ $elm = $('<textarea readonly="readonly"></textarea>');
+ equal($elm.attr('readonly'), 'readonly', 'readonly');
+ });
+
+ test(prefix + 'attr() set/get attrs on element', function() {
+ var $elm;
+
+ $elm = $('<b/>').attr({id: 'x', title: 'y'});
+ equal($elm.attr('id'), 'x');
+ equal($elm.attr('title'), 'y');
+ });
+
+ test(prefix + 'attr() set/get on non element', function() {
+ var $elm;
+
+ $elm = $([document.createTextNode('x')]).attr('id', 'x');
+ equal(typeof $elm.attr('id'), 'undefined');
+ });
+
+ test(prefix + 'removeAttr() on element', function() {
+ var $elm;
+
+ $elm = $('<b attr="a" />').removeAttr('AttR');
+ equal(typeof $elm.attr('attr'), 'undefined');
+
+ $elm = $([document.createTextNode('x')]).removeAttr('id');
+ equal(typeof $elm.attr('id'), 'undefined');
+ });
+
+ test(prefix + 'prop() set/get attr on element', function() {
+ var $elm;
+
+ $elm = $('<b/>').prop('id', 'x');
+ equal($elm.prop('id'), 'x');
+ equal(typeof $elm.prop('noprop'), 'undefined');
+
+ $elm = $('<b class="x"/>');
+ equal($elm.prop('class'), 'x');
+ equal($elm.prop('className'), 'x');
+
+ $elm = $('<label for="x"/>');
+ equal($elm.prop('for'), 'x');
+ equal($elm.prop('htmlFor'), 'x');
+ });
+
+ test(prefix + 'prop() set/get attrs on element', function() {
+ var $elm;
+
+ $elm = $('<b/>').prop({id: 'x', title: 'y'});
+ equal($elm.prop('id'), 'x');
+ equal($elm.prop('title'), 'y');
+ });
+
+ test(prefix + 'css() get/set single item on element', function() {
+ var $elm;
+
+ $elm = $('<b />').appendTo('#view').css('font-size', 42);
+ equal($elm.css('font-size'), '42px');
+
+ $elm = $('<b />').appendTo('#view').css('fontSize', 42);
+ equal($elm.css('fontSize'), '42px');
+ });
+
+ test(prefix + 'css() get/set items on element', function() {
+ var $elm;
+
+ $elm = $('<b>x</b>').appendTo('#view').css({'font-size': 42, 'text-indent': 42});
+ equal($elm.css('font-size'), '42px');
+ equal($elm.css('text-indent'), '42px');
+ });
+
+ test(prefix + 'css() set opacity', function() {
+ var styles = new tinymce.html.Styles();
+
+ if (tinymce.Env.ie && tinymce.Env.ie < 9) {
+ // jQuery has a slightly different output but basically the same
+ deepEqual(styles.parse($('<b></b>').css('opacity', 0.5).attr('style')), {filter: 'alpha(opacity=50)', 'zoom': '1'});
+ strictEqual(typeof $('<b></b>').css('opacity', null).attr('style'), 'undefined');
+ } else {
+ strictEqual(normalizeStyleValue($('<b></b>').css('opacity', 0.5).attr('style')), 'opacity: 0.5');
+ ok(!$('<b></b>').css('opacity', null).attr('style'));
+ ok(!$('<b></b>').css('opacity', '').attr('style'));
+ }
+ });
+
+ test(prefix + 'css() set float', function() {
+ strictEqual(normalizeStyleValue($('<b></b>').css('float', 'right').attr('style')), 'float: right');
+ ok(!$('<b style="float: left"></b>').css('float', '').attr('style'));
+ ok(!$('<b></b>').css('float', null).attr('style'));
+ });
+
+ test(prefix + 'remove() single element', function() {
+ var $elm;
+
+ $elm = $('<b>x</b>').appendTo('#view').remove();
+ strictEqual(normalizeParentNode($elm[0].parentNode), null);
+ });
+
+ test(prefix + 'remove() multiple elements', function() {
+ var $elm;
+
+ $elm = $('<b>x</b><em>x</em>').appendTo('#view').remove();
+ strictEqual(normalizeParentNode($elm[0].parentNode), null);
+ strictEqual(normalizeParentNode($elm[1].parentNode), null);
+ });
+
+ test(prefix + 'remove() unappended element', function() {
+ var $elm;
+
+ $elm = $('<b>x</b>').remove();
+ strictEqual(normalizeParentNode($elm[0].parentNode), null);
+ });
+
+ test(prefix + 'empty() single element', function() {
+ var $elm;
+
+ $elm = $('<b><i>x<i>y</b>').empty();
+ strictEqual($elm[0].firstChild, null);
+ });
+
+ test(prefix + 'html() set on single element', function() {
+ var $elm;
+
+ $elm = $('<b></b>').html('<i>x</i>');
+ strictEqual($elm[0].firstChild.tagName, 'I');
+ });
+
+ test(prefix + 'html() get on element/elements', function() {
+ strictEqual($('<b><i>x</i></b>').html().toLowerCase(), '<i>x</i>');
+ strictEqual($('<b><i>x</i></b><i>a</i>').html().toLowerCase(), '<i>x</i>');
+ });
+
+ /*
+ test(prefix + 'html() set comment as first child (IE)', function() {
+ $('#view').html('<!-- x -->y');
+ strictEqual($('#view').html(), '<!-- x -->y');
+ });
+ */
+
+ test(prefix + 'html() set DIV as child of P (IE 8)', function() {
+ $('<p></p>').appendTo('#view');
+ $('#view p').html('<div>x</div>');
+ strictEqual($('#view').html().toLowerCase().replace(/[\r\n]/g, ''), '<p><div>x</div></p>');
+ });
+
+ test(prefix + 'text() set on single element', function() {
+ var $elm;
+
+ $elm = $('<b></b>').text('<i>x</i>');
+ strictEqual($elm[0].firstChild.data, '<i>x</i>');
+ });
+
+ test(prefix + 'text() get on element', function() {
+ strictEqual($('<b><i>x</i>y</b>').text().toLowerCase(), 'xy');
+ });
+
+ test(prefix + 'append() to element', function() {
+ var $elm;
+
+ $elm = $('<b>a</b>');
+ $elm.append($('<i>b</i>'));
+ strictEqual($elm.html().toLowerCase(), 'a<i>b</i>');
+
+ $elm = $('<b>a</b>');
+ $elm.append('<i>b</i>');
+ strictEqual($elm.html().toLowerCase(), 'a<i>b</i>');
+
+ $elm = $('<b>a</b>');
+ $elm.append('b');
+ strictEqual($elm.html().toLowerCase(), 'ab');
+
+ $elm = $('<b>a</b>');
+ $elm.append($('<i>b</i><b>c</b>'));
+ strictEqual($elm.html().toLowerCase(), 'a<i>b</i><b>c</b>');
+
+ $elm = $('<b></b>');
+ $elm.append($('<i>b</i>'));
+ strictEqual($elm.html().toLowerCase(), '<i>b</i>');
+ });
+
+ test(prefix + 'prepend() to element', function() {
+ var $elm;
+
+ $elm = $('<b>a</b>');
+ $elm.prepend($('<i>b</i>'));
+ strictEqual($elm.html().toLowerCase(), '<i>b</i>a');
+
+ $elm = $('<b>a</b>');
+ $elm.prepend($('<i>b</i><b>c</b>'));
+ strictEqual($elm.html().toLowerCase(), '<i>b</i><b>c</b>a');
+
+ $elm = $('<b></b>');
+ $elm.prepend($('<i>b</i>'));
+ strictEqual($elm.html().toLowerCase(), '<i>b</i>');
+ });
+
+ test(prefix + 'before() element', function() {
+ var $elm;
+
+ $elm = $('<b><i>a</i></b>');
+ $elm.children().before($('<i>b</i>'));
+ strictEqual($elm.html().toLowerCase(), '<i>b</i><i>a</i>');
+
+ $elm = $('<b><i>a</i></b>');
+ $elm.children().before($('<i>b</i><i>c</i>'));
+ strictEqual($elm.html().toLowerCase(), '<i>b</i><i>c</i><i>a</i>');
+ });
+
+ test(prefix + 'after() element', function() {
+ var $elm;
+
+ $elm = $('<b><i>a</i></b>');
+ $elm.children().after($('<i>b</i>'));
+ strictEqual($elm.html().toLowerCase(), '<i>a</i><i>b</i>');
+
+ $elm = $('<b><i>a</i></b>');
+ $elm.children().after($('<i>b</i><i>c</i>'));
+ strictEqual($elm.html().toLowerCase(), '<i>a</i><i>b</i><i>c</i>');
+ });
+
+ test(prefix + 'appendTo() to element', function() {
+ var $elm;
+
+ $elm = $('<b>a</b>');
+ $('<i>b</i>').appendTo($elm);
+ strictEqual($elm.html().toLowerCase(), 'a<i>b</i>');
+
+ $elm = $('<b>a</b>');
+ $('<i>b</i><b>c</b>').appendTo($elm);
+ strictEqual($elm.html().toLowerCase(), 'a<i>b</i><b>c</b>');
+
+ $elm = $('<b></b>');
+ $('<i>b</i>').appendTo($elm);
+ strictEqual($elm.html().toLowerCase(), '<i>b</i>');
+ });
+
+ test(prefix + 'prependTo() to element', function() {
+ var $elm;
+
+ $elm = $('<b>a</b>');
+ $('<i>b</i>').prependTo($elm);
+ strictEqual($elm.html().toLowerCase(), '<i>b</i>a');
+
+ $elm = $('<b>a</b>');
+ $('<i>b</i><b>c</b>').prependTo($elm);
+ strictEqual($elm.html().toLowerCase(), '<i>b</i><b>c</b>a');
+
+ $elm = $('<b></b>');
+ $('<i>b</i>').prependTo($elm);
+ strictEqual($elm.html().toLowerCase(), '<i>b</i>');
+ });
+
+ test(prefix + 'addClass() to element', function() {
+ var $elm;
+
+ $elm = $('<b></b>').addClass('a');
+ strictEqual($elm.attr('class'), 'a');
+
+ $elm = $('<b class="a"></b>').addClass('b');
+ strictEqual($elm.attr('class'), 'a b');
+ });
+
+ test(prefix + 'removeClass() from element', function() {
+ var $elm;
+
+ $elm = $('<b class="x"></b>').removeClass('a');
+ strictEqual($elm.attr('class'), 'x');
+
+ $elm = $('<b class="a b"></b>').removeClass('b');
+ strictEqual($elm.attr('class'), 'a');
+
+ $elm = $('<b class="a"></b>').removeClass('a');
+ strictEqual($elm.attr('class'), '');
+ });
+
+ test(prefix + 'toggleClass() on element', function() {
+ var $elm;
+
+ $elm = $('<b class="x"></b>').toggleClass('a');
+ strictEqual($elm.attr('class'), 'x a');
+
+ $elm = $('<b class="a b"></b>').toggleClass('b');
+ strictEqual($elm.attr('class'), 'a');
+
+ $elm = $('<b class="a"></b>').toggleClass('a', true);
+ strictEqual($elm.attr('class'), 'a');
+
+ $elm = $('<b class="a b"></b>').toggleClass('a', false);
+ strictEqual($elm.attr('class'), 'b');
+ });
+
+ test(prefix + 'toggleClass() on element', function() {
+ strictEqual($('<b class="a"></b>').hasClass('a'), true);
+ strictEqual($('<b class="a"></b>').hasClass('b'), false);
+ strictEqual($('<b class="a b"></b>').hasClass('b'), true);
+ strictEqual($('<b class="a b"></b>').hasClass('a'), true);
+ });
+
+ test(prefix + 'filter()', function() {
+ strictEqual($('<b></b><i></i><u></u>').filter('b,i').length, 2);
+ strictEqual($('<b></b><i></i><u></u>').filter(function(i, elm) {
+ return elm.tagName != 'U';
+ }).length, 2);
+ strictEqual($('<b></b><i></i><u></u>').filter(function(i, elm) {
+ return i != 2;
+ }).length, 2);
+ });
+
+ test(prefix + 'each() collection', function() {
+ var $html = $('<b>a</b><i>b</i>'), data;
+
+ data = '';
+ $html.each(function(index, elm) {
+ data += index + elm.innerHTML + this.innerHTML;
+ });
+ strictEqual(data, '0aa1bb');
+
+ data = '';
+ $html.each(function(index, elm) {
+ data += index + elm.innerHTML + this.innerHTML;
+
+ if (index === 0) {
+ return false;
+ }
+ });
+ strictEqual(data, '0aa');
+ });
+
+ test(prefix + 'on()/off()/trigger()', function() {
+ var $elm = $('<b />'), lastArgs1, lastArgs2;
+
+ // Single listener
+ $elm.on('click', function(e) {
+ lastArgs1 = e;
+ });
+ $elm.trigger('click');
+ strictEqual(lastArgs1.type, 'click');
+
+ // Single listener trigger object
+ $elm.off().on('click', function(e) {
+ lastArgs1 = e;
+ });
+ $elm.trigger({type: 'click', custom: 'x'});
+ strictEqual(lastArgs1.type, 'click');
+ strictEqual(lastArgs1.custom, 'x');
+
+ // Unbind listeners
+ lastArgs1 = null;
+ $elm.off('click');
+ $elm.trigger('click');
+ strictEqual(lastArgs1, null);
+
+ // Bind two listeners
+ $elm.on('click', function(e) {
+ lastArgs1 = e;
+ });
+ $elm.on('click', function(e) {
+ lastArgs2 = e;
+ });
+ $elm.trigger('click');
+ strictEqual(lastArgs1.type, 'click');
+ strictEqual(lastArgs2.type, 'click');
+
+ // Bind two listeners and stop propagation
+ lastArgs1 = lastArgs2 = null;
+ $elm.off('click');
+ $elm.on('click', function(e) {
+ lastArgs1 = e;
+ e.stopImmediatePropagation();
+ });
+ $elm.on('click', function(e) {
+ lastArgs2 = e;
+ });
+ $elm.trigger('click');
+ strictEqual(lastArgs1.type, 'click');
+ strictEqual(lastArgs2, null);
+ });
+
+ test(prefix + 'show()/hide() element', function() {
+ equal(normalizeStyleValue($('<b></b>').hide().attr('style')), 'display: none');
+ ok(!$('<b></b>').show().attr('style'));
+ });
+
+ test(prefix + 'slice/eq/first/last() on collection', function() {
+ var $html = $('<b>1</b><i>2</i><em>3</em>');
+
+ strictEqual($html.slice(1).length, 2);
+ strictEqual($html.slice(1)[0].tagName, 'I');
+ strictEqual($html.slice(1)[1].tagName, 'EM');
+
+ strictEqual($html.slice(1, 2).length, 1);
+ strictEqual($html.slice(1, 2)[0].tagName, 'I');
+
+ strictEqual($html.slice(-2, -1).length, 1);
+ strictEqual($html.slice(-2, -1)[0].tagName, 'I');
+
+ strictEqual($html.eq(1).length, 1);
+ strictEqual($html.eq(1)[0].tagName, 'I');
+
+ strictEqual($html.eq(-1).length, 1);
+ strictEqual($html.eq(-1)[0].tagName, 'EM');
+
+ strictEqual($html.eq(1).length, 1);
+ strictEqual($html.eq(1)[0].tagName, 'I');
+
+ strictEqual($html.first().length, 1);
+ strictEqual($html.first()[0].tagName, 'B');
+
+ strictEqual($html.last().length, 1);
+ strictEqual($html.last()[0].tagName, 'EM');
+ });
+
+ test(prefix + 'replaceWith() on single element with single element', function() {
+ var $result;
+
+ $('<b>1</b>').appendTo('#view');
+ $result = $('#view b').replaceWith('<i>2</i>');
+ strictEqual($('#view').html().toLowerCase(), '<i>2</i>');
+ strictEqual($result.length, 1);
+ strictEqual($result[0].tagName, 'B');
+ });
+
+ test(prefix + 'replaceWith() on single element with multiple elements', function() {
+ var $result;
+
+ $('<b>1</b>').appendTo('#view');
+ $result = $('#view b').replaceWith('<i>2</i><i>3</i>');
+ strictEqual($('#view').html().toLowerCase(), '<i>2</i><i>3</i>');
+ strictEqual($result.length, 1);
+ strictEqual($result[0].tagName, 'B');
+ });
+/*
+ test(prefix + 'replaceWith() on multiple elements with multiple elements', function() {
+ var $result;
+
+ $('<b>1</b><i>2</i>').appendTo('#view');
+ $result = $('#view b, #view i').replaceWith('<i>3</i><i>4</i>');
+ strictEqual($('#view').html().toLowerCase(), '<i>3</i><i>4</i>');
+ strictEqual($result.length, 2);
+ strictEqual($result[0].tagName, 'B');
+ strictEqual($result[1].tagName, 'I');
+ });
+*/
+ test(prefix + 'wrap() single element', function() {
+ $('<b>1</b>').appendTo('#view').wrap('<i>');
+ strictEqual($('#view').html().toLowerCase(), '<i><b>1</b></i>');
+ });
+
+ test(prefix + 'wrap() multiple element', function() {
+ $('<b>1</b><b>2</b>').appendTo('#view').wrap('<i>');
+ strictEqual($('#view').html().toLowerCase(), '<i><b>1</b></i><i><b>2</b></i>');
+ });
+
+ test(prefix + 'wrapAll() multiple element', function() {
+ $('<b>1</b><b>2</b>').appendTo('#view').wrapAll('<i>');
+ strictEqual($('#view').html().toLowerCase(), '<i><b>1</b><b>2</b></i>');
+ });
+
+ test(prefix + 'wrapInner() multiple element', function() {
+ $('<b>1<i>a</i></b><b>2<i>b</i></b>').appendTo('#view').wrapInner('<i>');
+ strictEqual($('#view').html().toLowerCase(), '<b><i>1<i>a</i></i></b><b><i>2<i>b</i></i></b>');
+ });
+
+ test(prefix + 'unwrap() single element with no siblings', function() {
+ $('#view').html('<b><i>1</i></b>');
+ $('#view i').unwrap();
+ strictEqual($('#view').html().toLowerCase(), '<i>1</i>');
+ });
+
+ test(prefix + 'unwrap() single element with siblings', function() {
+ $('#view').html('<b><i>1</i><i>2</i></b>');
+ $('#view i').unwrap();
+ strictEqual($('#view').html().toLowerCase(), '<i>1</i><i>2</i>');
+ });
+
+ test(prefix + 'clone() single element', function() {
+ $('<b>1</b>').appendTo('#view').clone().appendTo('#view');
+ strictEqual($('#view').html().toLowerCase(), '<b>1</b><b>1</b>');
+ });
+
+ test(prefix + 'find()', function() {
+ var $result;
+
+ $('#view').append('<em><i>1</i></em><strong><b>2</b></strong>');
+
+ $result = $('#view').find('*');
+ strictEqual($result.length, 4);
+
+ $result = $('#view em').find('*');
+ strictEqual($result.length, 1);
+ strictEqual($result[0].tagName, 'I');
+
+ $result = $('#view em, #view strong').find('*');
+ strictEqual($result.length, 2);
+ strictEqual($result[0].tagName, 'I');
+ strictEqual($result[1].tagName, 'B');
+ });
+
+ test(prefix + 'parent()', function() {
+ var $result;
+
+ $('#view').append('<em><i>1</i></em><strong><b>2</b></strong>');
+
+ $result = $('#view i, #view b').parent();
+ strictEqual($result.length, 2);
+ strictEqual($result[0].tagName, 'EM');
+ strictEqual($result[1].tagName, 'STRONG');
+
+ $result = $('#view i, #view b').parent('em');
+ strictEqual($result.length, 1);
+ strictEqual($result[0].tagName, 'EM');
+
+ $result = $('#view i, #view b').parent('div');
+ strictEqual($result.length, 0);
+ });
+
+ test(prefix + 'parents()', function() {
+ var $result, html;
+
+ html = $('<div><em><i>1</i></em><strong><b>2</b></strong></div>').appendTo('#view');
+
+ $result = splitAtView($('#view i, #view b').parents());
+ strictEqual($result.length, 3);
+ strictEqual($result[0].tagName, 'STRONG');
+ strictEqual($result[1].tagName, 'EM');
+ strictEqual($result[2].tagName, 'DIV');
+
+ $result = splitAtView($('#view i, #view b').parents('em'));
+ strictEqual($result.length, 1);
+ strictEqual($result[0].tagName, 'EM');
+
+ $result = splitAtView($('#view i, #view b').parents('p'));
+ strictEqual($result.length, 0);
+ });
+
+ test(prefix + 'parentsUntil(selector)', function() {
+ var $result, html;
+
+ html = $('<div><em><i>1</i></em><strong><b>2</b></strong></div>').appendTo('#view');
+
+ $result = $('#view i, #view b').parentsUntil('#view');
+ strictEqual($result.length, 3);
+ strictEqual($result[0].tagName, 'STRONG');
+ strictEqual($result[1].tagName, 'EM');
+ strictEqual($result[2].tagName, 'DIV');
+
+ $result = $('#view i, #view b').parentsUntil('#view', 'div');
+ strictEqual($result.length, 1);
+ strictEqual($result[0].tagName, 'DIV');
+ });
+
+ test(prefix + 'parentsUntil(element)', function() {
+ var $result, html;
+
+ html = $('<div><em><i>1</i></em><strong><b>2</b></strong></div>').appendTo('#view');
+
+ $result = $('#view i, #view b').parentsUntil(document.getElementById('view'));
+ strictEqual($result.length, 3);
+ strictEqual($result[0].tagName, 'STRONG');
+ strictEqual($result[1].tagName, 'EM');
+ strictEqual($result[2].tagName, 'DIV');
+
+ $result = $('#view i, #view b').parentsUntil(document.getElementById('view'), 'div');
+ strictEqual($result.length, 1);
+ strictEqual($result[0].tagName, 'DIV');
+ });
+
+ test(prefix + 'parentsUntil(query)', function() {
+ var $result, html;
+
+ html = $('<div><em><i>1</i></em><strong><b>2</b></strong></div>').appendTo('#view');
+
+ $result = $('#view i, #view b').parentsUntil($('#view'));
+ strictEqual($result.length, 3);
+ strictEqual($result[0].tagName, 'STRONG');
+ strictEqual($result[1].tagName, 'EM');
+ strictEqual($result[2].tagName, 'DIV');
+
+ $result = $('#view i, #view b').parentsUntil($('#view'), 'div');
+ strictEqual($result.length, 1);
+ strictEqual($result[0].tagName, 'DIV');
+ });
+
+ test(prefix + 'next()', function() {
+ var $result, html;
+
+ html = $('<b>1</b>2<i>3</i>');
+
+ $result = html.next();
+ strictEqual($result.length, 1);
+ strictEqual($result[0].tagName, 'I');
+ });
+
+ test(prefix + 'prev()', function() {
+ var $result, html;
+
+ html = $('<b>1</b>2<i>3</i>');
+
+ $result = $(html).prev();
+ strictEqual($result.length, 1);
+ strictEqual($result[0].tagName, 'B');
+ });
+
+ test(prefix + 'nextUntil(selector)', function() {
+ var $result, html;
+
+ html = $('<b>1</b><i>2</i><em>3</em><span>3</span>');
+
+ $result = html.first().nextUntil('span');
+ strictEqual($result.length, 2);
+ strictEqual($result[0].tagName, 'I');
+ strictEqual($result[1].tagName, 'EM');
+
+ $result = html.first().nextUntil('span', 'i');
+ strictEqual($result.length, 1);
+ strictEqual($result[0].tagName, 'I');
+ });
+
+ test(prefix + 'nextUntil(element)', function() {
+ var $result, html;
+
+ html = $('<b>1</b><i>2</i><em>3</em><span>3</span>');
+
+ $result = html.first().nextUntil(html.last()[0]);
+ strictEqual($result.length, 2);
+ strictEqual($result[0].tagName, 'I');
+ strictEqual($result[1].tagName, 'EM');
+
+ $result = html.first().nextUntil(html.last()[0], 'i');
+ strictEqual($result.length, 1);
+ strictEqual($result[0].tagName, 'I');
+ });
+
+ test(prefix + 'nextUntil(query)', function() {
+ var $result, html;
+
+ html = $('<b>1</b><i>2</i><em>3</em><span>3</span>');
+
+ $result = html.first().nextUntil(html.last());
+ strictEqual($result.length, 2);
+ strictEqual($result[0].tagName, 'I');
+ strictEqual($result[1].tagName, 'EM');
+
+ $result = html.first().nextUntil(html.last(), 'i');
+ strictEqual($result.length, 1);
+ strictEqual($result[0].tagName, 'I');
+ });
+
+ test(prefix + 'prevUntil(selector)', function() {
+ var $result, html;
+
+ html = $('<b>1</b><i>2</i><em>3</em><span>3</span>');
+
+ $result = html.last().prevUntil('b');
+ strictEqual($result.length, 2);
+ strictEqual($result[0].tagName, 'EM');
+ strictEqual($result[1].tagName, 'I');
+
+ $result = html.last().prevUntil('b', 'i');
+ strictEqual($result.length, 1);
+ strictEqual($result[0].tagName, 'I');
+ });
+
+ test(prefix + 'prevUntil(element)', function() {
+ var $result, html;
+
+ html = $('<b>1</b><i>2</i><em>3</em><span>3</span>');
+
+ $result = html.last().prevUntil(html.first()[0]);
+ strictEqual($result.length, 2);
+ strictEqual($result[0].tagName, 'EM');
+ strictEqual($result[1].tagName, 'I');
+
+ $result = html.last().prevUntil(html.first()[0], 'i');
+ strictEqual($result.length, 1);
+ strictEqual($result[0].tagName, 'I');
+ });
+
+ test(prefix + 'prevUntil(query)', function() {
+ var $result, html;
+
+ html = $('<b>1</b><i>2</i><em>3</em><span>3</span>');
+
+ $result = html.last().prevUntil(html.first());
+ strictEqual($result.length, 2);
+ strictEqual($result[0].tagName, 'EM');
+ strictEqual($result[1].tagName, 'I');
+
+ $result = html.last().prevUntil(html.first(), 'i');
+ strictEqual($result.length, 1);
+ strictEqual($result[0].tagName, 'I');
+ });
+
+ test(prefix + 'children()', function() {
+ var $result, html;
+
+ html = $('<b>1<i>2</i><b>3</b></b>');
+
+ $result = html.children();
+ strictEqual($result.length, 2);
+ strictEqual($result[0].tagName, 'I');
+ strictEqual($result[1].tagName, 'B');
+ });
+
+ test(prefix + 'contents()', function() {
+ var $result, html;
+
+ html = $('<b>1<i>2</i><b>3</b></b>');
+
+ $result = html.contents();
+ strictEqual($result.length, 3);
+ strictEqual($result[0].nodeName, '#text');
+ strictEqual($result[1].tagName, 'I');
+ strictEqual($result[2].tagName, 'B');
+ });
+
+ test(prefix + 'closest(selector/element/query)', function() {
+ var innerMost, html;
+
+ html = $('<b><i><em><b>x</b></em></i></b>');
+ innerMost = $(html[0].firstChild.firstChild.firstChild);
+
+ strictEqual(innerMost.closest(null).length, 0);
+ strictEqual(innerMost.closest('b').html(), 'x');
+ strictEqual(innerMost.closest(innerMost[0]).html(), 'x');
+ strictEqual(innerMost.closest('b i').html().toLowerCase(), '<em><b>x</b></em>');
+ strictEqual(innerMost.closest($(html[0].firstChild.firstChild)).html().toLowerCase(), '<b>x</b>');
+ strictEqual(innerMost.closest($(html[0].firstChild.firstChild)[0]).html().toLowerCase(), '<b>x</b>');
+ });
+
+ test(prefix + 'offset()', function() {
+ var testElm = $('<b></b>').offset({top: 10, left: 20});
+ strictEqual(testElm[0].style.top, '10px');
+ strictEqual(testElm[0].style.left, '20px');
+
+ var viewOffset = $('#view').offset();
+ var testElmOffset = $('<b></b>').css({position: 'absolute', top: 10, left: 20}).prependTo('#view').offset();
+
+ testElmOffset.left -= viewOffset.left;
+ testElmOffset.top -= viewOffset.top;
+
+ deepEqual(testElmOffset, {top: 10, left: 20});
+ });
+ }
+
+ // Run tests against jQuery/DomQuery so we know that we are compatible
+ addTests('DomQuery: ', tinymce.dom.DomQuery);
+ addTests('jQuery: ', jQuery);
+})();
</ins><span class="cx">Property changes on: trunk/tests/qunit/editor/tinymce/dom/DomQuery.js
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+native
</ins><span class="cx">\ No newline at end of property
</span><a id="trunktestsquniteditortinymcehtmlSaxParserjs"></a>
<div class="modfile"><h4>Modified: trunk/tests/qunit/editor/tinymce/html/SaxParser.js (29202 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/qunit/editor/tinymce/html/SaxParser.js 2014-07-17 00:49:11 UTC (rev 29202)
+++ trunk/tests/qunit/editor/tinymce/html/SaxParser.js 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx"> test('Parse elements', function() {
</span><span class="cx"> var counter, parser;
</span><span class="cx">
</span><del>- expect(46);
</del><ins>+ expect(48);
</ins><span class="cx">
</span><span class="cx"> counter = createCounter(writer);
</span><span class="cx"> parser = new tinymce.html.SaxParser(counter, schema);
</span><span class="lines">@@ -166,6 +166,13 @@
</span><span class="cx"> counter = createCounter(writer);
</span><span class="cx"> parser = new tinymce.html.SaxParser(counter, schema);
</span><span class="cx"> writer.reset();
</span><ins>+ parser.parse('<myns_mytag>text</myns_mytag>');
+ equal(writer.getContent(), '<myns_mytag>text</myns_mytag>', 'Parse element with underscore name.');
+ deepEqual(counter.counts, {start:1, text:1, end:1}, 'Parse element with underscore name counts.');
+
+ counter = createCounter(writer);
+ parser = new tinymce.html.SaxParser(counter, schema);
+ writer.reset();
</ins><span class="cx"> parser.parse('text1<p>text2<b>text3</p>text4</b>text5');
</span><span class="cx"> equal(writer.getContent(), 'text1<p>text2<b>text3</b></p>text4text5', 'Parse tag soup 1.');
</span><span class="cx"> deepEqual(counter.counts, {text:5, start: 2, end: 2}, 'Parse tag soup 1 counts.');
</span></span></pre></div>
<a id="trunktestsquniteditortinymcehtmlSchemajs"></a>
<div class="modfile"><h4>Modified: trunk/tests/qunit/editor/tinymce/html/Schema.js (29202 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/qunit/editor/tinymce/html/Schema.js 2014-07-17 00:49:11 UTC (rev 29202)
+++ trunk/tests/qunit/editor/tinymce/html/Schema.js 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -224,7 +224,7 @@
</span><span class="cx"> "embed": {}, "param": {}, "meta": {}, "link": {}, "isindex": {},
</span><span class="cx"> "input": {}, "img": {}, "hr": {}, "frame": {}, "col": {}, "br": {},
</span><span class="cx"> "basefont": {}, "base": {}, "area": {}, "source" : {},
</span><del>- "td": {}, "th": {}, "iframe": {}, "video": {}, "audio": {}, "object": {}, "wbr" : {}, "track" : {}, "script" : {},
</del><ins>+ "td": {}, "th": {}, "iframe": {}, "video": {}, "audio": {}, "object": {}, "wbr" : {}, "track" : {}, "script" : {}
</ins><span class="cx"> });
</span><span class="cx"> });
</span><span class="cx">
</span></span></pre></div>
<a id="trunktestsquniteditortinymceutilColorjs"></a>
<div class="addfile"><h4>Added: trunk/tests/qunit/editor/tinymce/util/Color.js (0 => 29203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/qunit/editor/tinymce/util/Color.js (rev 0)
+++ trunk/tests/qunit/editor/tinymce/util/Color.js 2014-07-17 00:58:41 UTC (rev 29203)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+(function() {
+ module("tinymce.util.Color");
+
+ var Color = tinymce.util.Color;
+
+ test("Constructor", function() {
+ equal(new Color().toHex(), '#000000');
+ equal(new Color('#faebcd').toHex(), '#faebcd');
+ });
+
+ test("parse method", function() {
+ var color = new Color();
+
+ equal(color.parse('#faebcd').toHex(), '#faebcd');
+ equal(color.parse('#ccc').toHex(), '#cccccc');
+ equal(color.parse(' #faebcd ').toHex(), '#faebcd');
+ equal(color.parse('rgb(255,254,253)').toHex(), '#fffefd');
+ equal(color.parse(' rgb ( 255 , 254 , 253 ) ').toHex(), '#fffefd');
+ equal(color.parse({r: 255, g: 254, b: 253}).toHex(), '#fffefd');
+ equal(color.parse({h: 359, s: 50, v: 50}).toHex(), '#804041');
+ equal(color.parse({r: 700, g: 700, b: 700}).toHex(), '#ffffff');
+ equal(color.parse({r: -1, g: -10, b: -20}).toHex(), '#000000');
+ });
+
+ test("toRgb method", function() {
+ deepEqual(new Color('#faebcd').toRgb(), {r: 250, g: 235, b: 205});
+ });
+
+ test("toHsv method", function() {
+ deepEqual(new Color('#804041').toHsv(), {h: 359, s: 50, v: 50});
+ });
+
+ test("toHex method", function() {
+ equal(new Color({r: 255, g: 254, b: 253}).toHex(), '#fffefd');
+ });
+})();
</ins><span class="cx">Property changes on: trunk/tests/qunit/editor/tinymce/util/Color.js
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+native
</ins><span class="cx">\ No newline at end of property
</span></div>
</body>
</html>