privilegedemarque/js/tiny_mce/tinymce.min.js
Serveur preprod f0c0c48223 first push
2016-04-14 16:14:31 +02:00

2 lines
293 KiB
JavaScript
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// tinymce 4.0.16 modified
(function(e,t){"use strict";function r(e,t){var r,i=[];for(var s=0;s<e.length;++s){r=n[e[s]]||o(e[s]);if(!r){throw"module definition dependecy not found: "+e[s]}i.push(r)}t.apply(null,i)}function i(e,i,s){if(typeof e!=="string"){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(s===t){throw"invalid module definition, definition function must be specified"}r(i,function(){n[e]=s.apply(null,arguments)})}function s(e){return!!n[e]}function o(t){var n=e;var r=t.split(/[.\/]/);for(var i=0;i<r.length;++i){if(!n[r[i]]){return}n=n[r[i]]}return n}function u(r){for(var i=0;i<r.length;i++){var s=e;var o=r[i];var u=o.split(/[.\/]/);for(var a=0;a<u.length-1;++a){if(s[u[a]]===t){s[u[a]]={}}s=s[u[a]]}s[u[u.length-1]]=n[o]}}var n={};i("tinymce/dom/EventUtils",[],function(){"use strict";function r(e,t,n,r){if(e.addEventListener){e.addEventListener(t,n,r||false)}else if(e.attachEvent){e.attachEvent("on"+t,n)}}function i(e,t,n,r){if(e.removeEventListener){e.removeEventListener(t,n,r||false)}else if(e.detachEvent){e.detachEvent("on"+t,n)}}function s(e,r){function u(){return false}function a(){return true}var i,s=r||{},o;for(i in e){if(!n[i]){s[i]=e[i]}}if(!s.target){s.target=s.srcElement||document}if(e&&t.test(e.type)&&e.pageX===o&&e.clientX!==o){var f=s.target.ownerDocument||document;var l=f.documentElement;var c=f.body;s.pageX=e.clientX+(l&&l.scrollLeft||c&&c.scrollLeft||0)-(l&&l.clientLeft||c&&c.clientLeft||0);s.pageY=e.clientY+(l&&l.scrollTop||c&&c.scrollTop||0)-(l&&l.clientTop||c&&c.clientTop||0)}s.preventDefault=function(){s.isDefaultPrevented=a;if(e){if(e.preventDefault){e.preventDefault()}else{e.returnValue=false}}};s.stopPropagation=function(){s.isPropagationStopped=a;if(e){if(e.stopPropagation){e.stopPropagation()}else{e.cancelBubble=true}}};s.stopImmediatePropagation=function(){s.isImmediatePropagationStopped=a;s.stopPropagation()};if(!s.isDefaultPrevented){s.isDefaultPrevented=u;s.isPropagationStopped=u;s.isImmediatePropagationStopped=u}return s}function o(e,t,n){function u(){if(!n.domLoaded){n.domLoaded=true;t(o)}}function a(){if(s.readyState==="complete"||s.readyState==="interactive"){i(s,"readystatechange",a);u()}}function f(){try{s.documentElement.doScroll("left")}catch(e){setTimeout(f,0);return}u()}var s=e.document,o={type:"ready"};if(n.domLoaded){t(o);return}if(s.addEventListener){if(s.readyState==="complete"){u()}else{r(e,"DOMContentLoaded",u)}}else{r(s,"readystatechange",a);if(s.documentElement.doScroll&&e.self===e.top){f()}}r(e,"load",u)}function u(){function h(e,t){var r,i,s,o,u=n[t];r=u&&u[e.type];if(r){for(i=0,s=r.length;i<s;i++){o=r[i];if(o&&o.func.call(o.scope,e)===false){e.preventDefault()}if(e.isImmediatePropagationStopped()){return}}}}var t=this,n={},u,a,f,l,c;a=e+(+(new Date)).toString(32);l="onmouseenter"in document.documentElement;f="onfocusin"in document.documentElement;c={mouseenter:"mouseover",mouseleave:"mouseout"};u=1;t.domLoaded=false;t.events=n;t.bind=function(e,i,p,d){function x(e){h(s(e||S.event),v)}var v,m,g,y,b,w,E,S=window;if(!e||e.nodeType===3||e.nodeType===8){return}if(!e[a]){v=u++;e[a]=v;n[v]={}}else{v=e[a]}d=d||e;i=i.split(" ");g=i.length;while(g--){y=i[g];w=x;b=E=false;if(y==="DOMContentLoaded"){y="ready"}if(t.domLoaded&&y==="ready"&&e.readyState=="complete"){p.call(d,s({type:y}));continue}if(!l){b=c[y];if(b){w=function(e){var t,n;t=e.currentTarget;n=e.relatedTarget;if(n&&t.contains){n=t.contains(n)}else{while(n&&n!==t){n=n.parentNode}}if(!n){e=s(e||S.event);e.type=e.type==="mouseout"?"mouseleave":"mouseenter";e.target=t;h(e,v)}}}}if(!f&&(y==="focusin"||y==="focusout")){E=true;b=y==="focusin"?"focus":"blur";w=function(e){e=s(e||S.event);e.type=e.type==="focus"?"focusin":"focusout";h(e,v)}}m=n[v][y];if(!m){n[v][y]=m=[{func:p,scope:d}];m.fakeName=b;m.capture=E;m.nativeHandler=w;if(y==="ready"){o(e,w,t)}else{r(e,b||y,w,E)}}else{if(y==="ready"&&t.domLoaded){p({type:y})}else{m.push({func:p,scope:d})}}}e=m=0;return p};t.unbind=function(e,r,s){var o,u,f,l,c,h;if(!e||e.nodeType===3||e.nodeType===8){return t}o=e[a];if(o){h=n[o];if(r){r=r.split(" ");f=r.length;while(f--){c=r[f];u=h[c];if(u){if(s){l=u.length;while(l--){if(u[l].func===s){var p=u.nativeHandler;u=u.slice(0,l).concat(u.slice(l+1));u.nativeHandler=p;h[c]=u}}}if(!s||u.length===0){delete h[c];i(e,u.fakeName||c,u.nativeHandler,u.capture)}}}}else{for(c in h){u=h[c];i(e,u.fakeName||c,u.nativeHandler,u.capture)}h={}}for(c in h){return t}delete n[o];try{delete e[a]}catch(d){e[a]=null}}return t};t.fire=function(e,n,r){var i;if(!e||e.nodeType===3||e.nodeType===8){return t}r=s(null,r);r.type=n;r.target=e;do{i=e[a];if(i){h(r,i)}e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow}while(e&&!r.isPropagationStopped());return t};t.clean=function(e){var n,r,i=t.unbind;if(!e||e.nodeType===3||e.nodeType===8){return t}if(e[a]){i(e)}if(!e.getElementsByTagName){e=e.document}if(e&&e.getElementsByTagName){i(e);r=e.getElementsByTagName("*");n=r.length;while(n--){e=r[n];if(e[a]){i(e)}}}return t};t.destroy=function(){n={}};t.cancel=function(e){if(e){e.preventDefault();e.stopImmediatePropagation()}return false}}var e="mce-data-";var t=/^(?:mouse|contextmenu)|click/;var n={keyLocation:1,layerX:1,layerY:1,returnValue:1};u.Event=new u;u.Event.bind(window,"ready",function(){});return u});i("tinymce/dom/Sizzle",[],function(){function it(e){return K.test(e+"")}function st(){var e,t=[];e=function(n,i){if(t.push(n+=" ")>r.cacheLength){delete e[t.shift()]}e[n]=i;return i};return e}function ot(e){e[y]=true;return e}function ut(e){var t=c.createElement("div");try{return!!e(t)}catch(n){return false}finally{t=null}}function at(e,t,n,r){var i,s,o,u,a,f,h,v,m,E;if((t?t.ownerDocument||t:b)!==c){l(t)}t=t||c;n=n||[];if(!e||typeof e!=="string"){return n}if((u=t.nodeType)!==1&&u!==9){return[]}if(p&&!r){if(i=Q.exec(e)){if(o=i[1]){if(u===9){s=t.getElementById(o);if(s&&s.parentNode){if(s.id===o){n.push(s);return n}}else{return n}}else{if(t.ownerDocument&&(s=t.ownerDocument.getElementById(o))&&g(t,s)&&s.id===o){n.push(s);return n}}}else if(i[2]){D.apply(n,t.getElementsByTagName(e));return n}else if((o=i[3])&&w.getElementsByClassName&&t.getElementsByClassName){D.apply(n,t.getElementsByClassName(o));return n}}if(w.qsa&&!d.test(e)){h=true;v=y;m=t;E=u===9&&e;if(u===1&&t.nodeName.toLowerCase()!=="object"){f=pt(e);if(h=t.getAttribute("id")){v=h.replace(Z,"\\$&")}else{t.setAttribute("id",v)}v="[id='"+v+"'] ";a=f.length;while(a--){f[a]=v+dt(f[a])}m=J.test(e)&&t.parentNode||t;E=f.join(",")}if(E){try{D.apply(n,m.querySelectorAll(E));return n}catch(S){}finally{if(!h){t.removeAttribute("id")}}}}}return St(e.replace(U,"$1"),t,n,r)}function ft(e,t){var n=t&&e,r=n&&(~t.sourceIndex||A)-(~e.sourceIndex||A);if(r){return r}if(n){while(n=n.nextSibling){if(n===t){return-1}}}return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function ht(e){return ot(function(t){t=+t;return ot(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--){if(n[i=s[o]]){n[i]=!(r[i]=n[i])}}})})}function pt(e,t){var n,i,s,o,u,a,f,l=T[e+" "];if(l){return t?0:l.slice(0)}u=e;a=[];f=r.preFilter;while(u){if(!n||(i=z.exec(u))){if(i){u=u.slice(i[0].length)||u}a.push(s=[])}n=false;if(i=W.exec(u)){n=i.shift();s.push({value:n,type:i[0].replace(U," ")});u=u.slice(n.length)}for(o in r.filter){if((i=$[o].exec(u))&&(!f[o]||(i=f[o](i)))){n=i.shift();s.push({value:n,type:o,matches:i});u=u.slice(n.length)}}if(!n){break}}return t?u.length:u?at.error(e):T(e,a).slice(0)}function dt(e){var t=0,n=e.length,r="";for(;t<n;t++){r+=e[t].value}return r}function vt(e,t,r){var i=t.dir,s=r&&i==="parentNode",o=S++;return t.first?function(t,n,r){while(t=t[i]){if(t.nodeType===1||s){return e(t,n,r)}}}:function(t,r,u){var a,f,l,c=E+" "+o;if(u){while(t=t[i]){if(t.nodeType===1||s){if(e(t,r,u)){return true}}}}else{while(t=t[i]){if(t.nodeType===1||s){l=t[y]||(t[y]={});if((f=l[i])&&f[0]===c){if((a=f[1])===true||a===n){return a===true}}else{f=l[i]=[c];f[1]=e(t,r,u)||n;if(f[1]===true){return true}}}}}}}function mt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--){if(!e[i](t,n,r)){return false}}return true}:e[0]}function gt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u<a;u++){if(s=e[u]){if(!n||n(s,r,i)){o.push(s);if(f){t.push(u)}}}}return o}function yt(e,t,n,r,i,s){if(r&&!r[y]){r=yt(r)}if(i&&!i[y]){i=yt(i,s)}return ot(function(s,o,u,a){var f,l,c,h=[],p=[],d=o.length,v=s||Et(t||"*",u.nodeType?[u]:u,[]),m=e&&(s||!t)?gt(v,h,e,u,a):v,g=n?i||(s?e:d||r)?[]:o:m;if(n){n(m,g,u,a)}if(r){f=gt(g,p);r(f,[],u,a);l=f.length;while(l--){if(c=f[l]){g[p[l]]=!(m[p[l]]=c)}}}if(s){if(i||e){if(i){f=[];l=g.length;while(l--){if(c=g[l]){f.push(m[l]=c)}}i(null,g=[],f,a)}l=g.length;while(l--){if((c=g[l])&&(f=i?H.call(s,c):h[l])>-1){s[f]=!(o[f]=c)}}}}else{g=gt(g===o?g.splice(d,g.length):g);if(i){i(null,o,g,a)}else{D.apply(o,g)}}})}function bt(e){var t,n,i,s=e.length,o=r.relative[e[0].type],a=o||r.relative[" "],f=o?1:0,l=vt(function(e){return e===t},a,true),c=vt(function(e){return H.call(t,e)>-1},a,true),h=[function(e,n,r){return!o&&(r||n!==u)||((t=n).nodeType?l(e,n,r):c(e,n,r))}];for(;f<s;f++){if(n=r.relative[e[f].type]){h=[vt(mt(h),n)]}else{n=r.filter[e[f].type].apply(null,e[f].matches);if(n[y]){i=++f;for(;i<s;i++){if(r.relative[e[i].type]){break}}return yt(f>1&&mt(h),f>1&&dt(e.slice(0,f-1)).replace(U,"$1"),n,f<i&&bt(e.slice(f,i)),i<s&&bt(e=e.slice(i)),i<s&&dt(e))}h.push(n)}}return mt(h)}function wt(e,t){var i=0,s=t.length>0,o=e.length>0,a=function(a,f,l,h,p){var d,v,m,g=[],y=0,b="0",w=a&&[],S=p!=null,x=u,T=a||o&&r.find["TAG"]("*",p&&f.parentNode||f),N=E+=x==null?1:Math.random()||.1;if(S){u=f!==c&&f;n=i}for(;(d=T[b])!=null;b++){if(o&&d){v=0;while(m=e[v++]){if(m(d,f,l)){h.push(d);break}}if(S){E=N;n=++i}}if(s){if(d=!m&&d){y--}if(a){w.push(d)}}}y+=b;if(s&&b!==y){v=0;while(m=t[v++]){m(w,g,f,l)}if(a){if(y>0){while(b--){if(!(w[b]||g[b])){g[b]=M.call(h)}}}g=gt(g)}D.apply(h,g);if(S&&!a&&g.length>0&&y+t.length>1){at.uniqueSort(h)}}if(S){E=N;u=x}return w};return s?ot(a):a}function Et(e,t,n){var r=0,i=t.length;for(;r<i;r++){at(e,t[r],n)}return n}function St(e,t,n,i){var s,u,a,f,l,c=pt(e);if(!i){if(c.length===1){u=c[0]=c[0].slice(0);if(u.length>2&&(a=u[0]).type==="ID"&&t.nodeType===9&&p&&r.relative[u[1].type]){t=(r.find["ID"](a.matches[0].replace(tt,nt),t)||[])[0];if(!t){return n}e=e.slice(u.shift().value.length)}s=$["needsContext"].test(e)?0:u.length;while(s--){a=u[s];if(r.relative[f=a.type]){break}if(l=r.find[f]){if(i=l(a.matches[0].replace(tt,nt),J.test(u[0].type)&&t.parentNode||t)){u.splice(s,1);e=i.length&&dt(u);if(!e){D.apply(n,i);return n}break}}}}}o(e,c)(i,t,!p,n,J.test(e));return n}function xt(){}var e,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y="sizzle"+ -(new Date),b=window.document,w={},E=0,S=0,x=st(),T=st(),N=st(),C=false,k=function(){return 0},L=typeof t,A=1<<31,O=[],M=O.pop,_=O.push,D=O.push,P=O.slice,H=O.indexOf||function(e){var t=0,n=this.length;for(;t<n;t++){if(this[t]===e){return t}}return-1},B="[\\x20\\t\\r\\n\\f]",j="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",F=j.replace("w","w#"),I="([*^$|!~]?=)",q="\\["+B+"*("+j+")"+B+"*(?:"+I+B+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+F+")|)|)"+B+"*\\]",R=":("+j+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+q.replace(3,8)+")*)|.*)\\)|)",U=new RegExp("^"+B+"+|((?:^|[^\\\\])(?:\\\\.)*)"+B+"+$","g"),z=new RegExp("^"+B+"*,"+B+"*"),W=new RegExp("^"+B+"*([\\x20\\t\\r\\n\\f>+~])"+B+"*"),X=new RegExp(R),V=new RegExp("^"+F+"$"),$={ID:new RegExp("^#("+j+")"),CLASS:new RegExp("^\\.("+j+")"),NAME:new RegExp("^\\[name=['\"]?("+j+")['\"]?\\]"),TAG:new RegExp("^("+j.replace("w","w*")+")"),ATTR:new RegExp("^"+q),PSEUDO:new RegExp("^"+R),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+B+"*(even|odd|(([+-]|)(\\d*)n|)"+B+"*(?:([+-]|)"+B+"*(\\d+)|))"+B+"*\\)|)","i"),needsContext:new RegExp("^"+B+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+B+"*((?:-\\d)?\\d*)"+B+"*\\)|)(?=[^-]|$)","i")},J=/[\x20\t\r\n\f]*[+~]/,K=/^[^{]+\{\s*\[native code/,Q=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,G=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/'|\\/g,et=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,tt=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,nt=function(e,t){var n="0x"+t-65536;return n!==n?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,n&1023|56320)};try{D.apply(O=P.call(b.childNodes),b.childNodes);O[b.childNodes.length].nodeType}catch(rt){D={apply:O.length?function(e,t){_.apply(e,P.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]){}e.length=n-1}}}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":false};l=at.setDocument=function(e){var n=e?e.ownerDocument||e:b;if(n===c||n.nodeType!==9||!n.documentElement){return c}c=n;h=n.documentElement;p=!s(n);w.getElementsByTagName=ut(function(e){e.appendChild(n.createComment(""));return!e.getElementsByTagName("*").length});w.attributes=ut(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"});w.getElementsByClassName=ut(function(e){e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>";if(!e.getElementsByClassName||!e.getElementsByClassName("e").length){return false}e.lastChild.className="e";return e.getElementsByClassName("e").length===2});w.getByName=ut(function(e){e.id=y+0;e.appendChild(c.createElement("a")).setAttribute("name",y);e.appendChild(c.createElement("i")).setAttribute("name",y);h.appendChild(e);var t=n.getElementsByName&&n.getElementsByName(y).length===2+n.getElementsByName(y+0).length;h.removeChild(e);return t});w.sortDetached=ut(function(e){return e.compareDocumentPosition&&e.compareDocumentPosition(c.createElement("div"))&1});r.attrHandle=ut(function(e){e.innerHTML="<a href='#'></a>";return e.firstChild&&typeof e.firstChild.getAttribute!==L&&e.firstChild.getAttribute("href")==="#"})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}};if(w.getByName){r.find["ID"]=function(e,t){if(typeof t.getElementById!==L&&p){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}};r.filter["ID"]=function(e){var t=e.replace(tt,nt);return function(e){return e.getAttribute("id")===t}}}else{r.find["ID"]=function(e,n){if(typeof n.getElementById!==L&&p){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==L&&r.getAttributeNode("id").value===e?[r]:t:[]}};r.filter["ID"]=function(e){var t=e.replace(tt,nt);return function(e){var n=typeof e.getAttributeNode!==L&&e.getAttributeNode("id");return n&&n.value===t}}}r.find["TAG"]=w.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==L){return t.getElementsByTagName(e)}}:function(e,t){var n,r=[],i=0,s=t.getElementsByTagName(e);if(e==="*"){while(n=s[i++]){if(n.nodeType===1){r.push(n)}}return r}return s};r.find["NAME"]=w.getByName&&function(e,t){if(typeof t.getElementsByName!==L){return t.getElementsByName(name)}};r.find["CLASS"]=w.getElementsByClassName&&function(e,t){if(typeof t.getElementsByClassName!==L&&p){return t.getElementsByClassName(e)}};v=[];d=[":focus"];if(w.qsa=it(n.querySelectorAll)){ut(function(e){e.innerHTML="<select><option selected=''></option></select>";if(!e.querySelectorAll("[selected]").length){d.push("\\["+B+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)")}if(!e.querySelectorAll(":checked").length){d.push(":checked")}});ut(function(e){e.innerHTML="<input type='hidden' i=''/>";if(e.querySelectorAll("[i^='']").length){d.push("[*^$]="+B+"*(?:\"\"|'')")}if(!e.querySelectorAll(":enabled").length){d.push(":enabled",":disabled")}e.querySelectorAll("*,:x");d.push(",.*:")})}if(w.matchesSelector=it(m=h.matchesSelector||h.mozMatchesSelector||h.webkitMatchesSelector||h.oMatchesSelector||h.msMatchesSelector)){ut(function(e){w.disconnectedMatch=m.call(e,"div");m.call(e,"[s!='']:x");v.push("!=",R)})}d=new RegExp(d.join("|"));v=v.length&&new RegExp(v.join("|"));g=it(h.contains)||h.compareDocumentPosition?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&(n.contains?n.contains(r):e.compareDocumentPosition&&e.compareDocumentPosition(r)&16))}:function(e,t){if(t){while(t=t.parentNode){if(t===e){return true}}}return false};k=h.compareDocumentPosition?function(e,t){if(e===t){C=true;return 0}var r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);if(r){if(r&1||a&&t.compareDocumentPosition(e)===r){if(e===n||g(b,e)){return-1}if(t===n||g(b,t)){return 1}return f?H.call(f,e)-H.call(f,t):0}return r&4?-1:1}return e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,s=e.parentNode,o=t.parentNode,u=[e],a=[t];if(e===t){C=true;return 0}else if(!s||!o){return e===n?-1:t===n?1:s?-1:o?1:0}else if(s===o){return ft(e,t)}r=e;while(r=r.parentNode){u.unshift(r)}r=t;while(r=r.parentNode){a.unshift(r)}while(u[i]===a[i]){i++}return i?ft(u[i],a[i]):u[i]===b?-1:a[i]===b?1:0};return c};at.matches=function(e,t){return at(e,null,null,t)};at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==c){l(e)}t=t.replace(et,"='$1']");if(w.matchesSelector&&p&&(!v||!v.test(t))&&!d.test(t)){try{var n=m.call(e,t);if(n||w.disconnectedMatch||e.document&&e.document.nodeType!==11){return n}}catch(r){}}return at(t,c,null,[e]).length>0};at.contains=function(e,t){if((e.ownerDocument||e)!==c){l(e)}return g(e,t)};at.attr=function(e,t){var n;if((e.ownerDocument||e)!==c){l(e)}if(p){t=t.toLowerCase()}if(n=r.attrHandle[t]){return n(e)}if(!p||w.attributes){return e.getAttribute(t)}return((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===true?t:n&&n.specified?n.value:null};at.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};at.uniqueSort=function(e){var t,n=[],r=0,i=0;C=!w.detectDuplicates;a=!w.sortDetached;f=!w.sortStable&&e.slice(0);e.sort(k);if(C){while(t=e[i++]){if(t===e[i]){r=n.push(i)}}while(r--){e.splice(n[r],1)}}return e};i=at.getText=function(e){var t,n="",r=0,s=e.nodeType;if(!s){for(;t=e[r];r++){n+=i(t)}}else if(s===1||s===9||s===11){if(typeof e.textContent==="string"){return e.textContent}else{for(e=e.firstChild;e;e=e.nextSibling){n+=i(e)}}}else if(s===3||s===4){return e.nodeValue}return n};r=at.selectors={cacheLength:50,createPseudo:ot,match:$,find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){e[1]=e[1].replace(tt,nt);e[3]=(e[4]||e[5]||"").replace(tt,nt);if(e[2]==="~="){e[3]=" "+e[3]+" "}return e.slice(0,4)},CHILD:function(e){e[1]=e[1].toLowerCase();if(e[1].slice(0,3)==="nth"){if(!e[3]){at.error(e[0])}e[4]=+(e[4]?e[5]+(e[6]||1):2*(e[3]==="even"||e[3]==="odd"));e[5]=+(e[7]+e[8]||e[3]==="odd")}else if(e[3]){at.error(e[0])}return e},PSEUDO:function(e){var t,n=!e[5]&&e[2];if($["CHILD"].test(e[0])){return null}if(e[4]){e[2]=e[4]}else if(n&&X.test(n)&&(t=pt(n,true))&&(t=n.indexOf(")",n.length-t)-n.length)){e[0]=e[0].slice(0,t);e[2]=n.slice(0,t)}return e.slice(0,3)}},filter:{TAG:function(e){if(e==="*"){return function(){return true}}e=e.replace(tt,nt).toLowerCase();return function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(e){var t=x[e+" "];return t||(t=new RegExp("(^|"+B+")"+e+"("+B+"|$)"))&&x(e,function(e){return t.test(e.className||typeof e.getAttribute!==L&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);if(i==null){return t==="!="}if(!t){return true}i+="";return t==="="?i===n:t==="!="?i!==n:t==="^="?n&&i.indexOf(n)===0: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+"-":false}},CHILD:function(e,t,n,r,i){var s=e.slice(0,3)!=="nth",o=e.slice(-4)!=="last",u=t==="of-type";return r===1&&i===0?function(e){return!!e.parentNode}:function(t,n,a){var f,l,c,h,p,d,v=s!==o?"nextSibling":"previousSibling",m=t.parentNode,g=u&&t.nodeName.toLowerCase(),b=!a&&!u;if(m){if(s){while(v){c=t;while(c=c[v]){if(u?c.nodeName.toLowerCase()===g:c.nodeType===1){return false}}d=v=e==="only"&&!d&&"nextSibling"}return true}d=[o?m.firstChild:m.lastChild];if(o&&b){l=m[y]||(m[y]={});f=l[e]||[];p=f[0]===E&&f[1];h=f[0]===E&&f[2];c=p&&m.childNodes[p];while(c=++p&&c&&c[v]||(h=p=0)||d.pop()){if(c.nodeType===1&&++h&&c===t){l[e]=[E,p,h];break}}}else if(b&&(f=(t[y]||(t[y]={}))[e])&&f[0]===E){h=f[1]}else{while(c=++p&&c&&c[v]||(h=p=0)||d.pop()){if((u?c.nodeName.toLowerCase()===g:c.nodeType===1)&&++h){if(b){(c[y]||(c[y]={}))[e]=[E,h]}if(c===t){break}}}}h-=i;return h===r||h%r===0&&h/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);if(i[y]){return i(t)}if(i.length>1){n=[e,e,"",t];return r.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){var r,s=i(e,t),o=s.length;while(o--){r=H.call(e,s[o]);e[r]=!(n[r]=s[o])}}):function(e){return i(e,0,n)}}return i}},pseudos:{not:ot(function(e){var t=[],n=[],r=o(e.replace(U,"$1"));return r[y]?ot(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--){if(s=o[u]){e[u]=!(t[u]=s)}}}):function(e,i,s){t[0]=e;r(t,null,s,n);return!n.pop()}}),has:ot(function(e){return function(t){return at(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:ot(function(e){if(!V.test(e||"")){at.error("unsupported lang: "+e)}e=e.replace(tt,nt).toLowerCase();return function(t){var n;do{if(n=p?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang")){n=n.toLowerCase();return n===e||n.indexOf(e+"-")===0}}while((t=t.parentNode)&&t.nodeType===1);return false}}),target:function(e){var t=window.location&&window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===h},focus:function(e){return e===c.activeElement&&(!c.hasFocus||c.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===false},disabled:function(e){return e.disabled===true},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling){if(e.nodeName>"@"||e.nodeType===3||e.nodeType===4){return false}}return true},parent:function(e){return!r.pseudos["empty"](e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},text:function(e){var t;return e.nodeName.toLowerCase()==="input"&&e.type==="text"&&((t=e.getAttribute("type"))==null||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[n<0?n+t:n]}),even:ht(function(e,t){var n=0;for(;n<t;n+=2){e.push(n)}return e}),odd:ht(function(e,t){var n=1;for(;n<t;n+=2){e.push(n)}return e}),lt:ht(function(e,t,n){var r=n<0?n+t:n;for(;--r>=0;){e.push(r)}return e}),gt:ht(function(e,t,n){var r=n<0?n+t:n;for(;++r<t;){e.push(r)}return e})}};for(e in{radio:true,checkbox:true,file:true,password:true,image:true}){r.pseudos[e]=lt(e)}for(e in{submit:true,reset:true}){r.pseudos[e]=ct(e)}o=at.compile=function(e,t){var n,r=[],i=[],s=N[e+" "];if(!s){if(!t){t=pt(e)}n=t.length;while(n--){s=bt(t[n]);if(s[y]){r.push(s)}else{i.push(s)}}s=N(e,wt(i,r))}return s};r.pseudos["nth"]=r.pseudos["eq"];xt.prototype=r.filters=r.pseudos;r.setFilters=new xt;w.sortStable=y.split("").sort(k).join("")===y;l();[0,0].sort(k);w.detectDuplicates=C;return at});i("tinymce/dom/DomQuery",["tinymce/dom/EventUtils","tinymce/dom/Sizzle"],function(e,n){function a(e){return typeof e!=="undefined"}function f(e){return typeof e==="string"}function l(e){var t,n,i;i=r.createElement("div");t=r.createDocumentFragment();i.innerHTML=e;while(n=i.firstChild){t.appendChild(n)}return t}function c(e,t,n){var r;if(typeof t==="string"){t=l(t)}else if(t.length){for(r=0;r<t.length;r++){c(e,t[r],n)}return e}r=e.length;while(r--){n.call(e[r],t.parentNode?t:t)}return e}function h(e,t){return e&&t&&(" "+e.className+" ").indexOf(" "+t+" ")!==-1}function p(e,t){var n;e=e||[];if(typeof e=="string"){e=e.split(" ")}t=t||{};n=e.length;while(n--){t[e[n]]={}}return t}function v(e,t){return new v.fn.init(e,t)}function m(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 g(e){var t=[],n,r;for(n=0,r=e.length;n<r;n++){t[n]=e[n]}return t}function y(e,t){var n;if(t.indexOf){return t.indexOf(e)}n=t.length;while(n--){if(t[n]===e){return n}}return-1}function S(e,t){var n,r,i,s,o;if(e){n=e.length;if(n===s){for(r in e){if(e.hasOwnProperty(r)){o=e[r];if(t.call(o,o,r)===false){break}}}}else{for(i=0;i<n;i++){o=e[i];if(t.call(o,o,r)===false){break}}}}return e}function x(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r))){if(s.nodeType===1){i.push(s)}s=s[n]}return i}function T(e,t,n,r){var i=[];for(;e;e=e[n]){if((!r||e.nodeType===r)&&e!==t){i.push(e)}}return i}var r=document,i=Array.prototype.push,s=Array.prototype.slice;var o=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/;var u=e.Event;var d=p("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom");var b=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};var w=/^\s*|\s*$/g;var E=function(e){return e===null||e===t?"":(""+e).replace(w,"")};v.fn=v.prototype={constructor:v,selector:"",length:0,init:function(e,t){var n=this,i,s;if(!e){return n}if(e.nodeType){n.context=n[0]=e;n.length=1;return n}if(f(e)){if(e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3){i=[null,e,null]}else{i=o.exec(e)}if(i){if(i[1]){s=l(e).firstChild;while(s){this.add(s);s=s.nextSibling}}else{s=r.getElementById(i[2]);if(s.id!==i[2]){return n.find(e)}n.length=1;n[0]=s}}else{return v(t||document).find(e)}}else{this.add(e)}return n},toArray:function(){return g(this)},add:function(e){var t=this;if(!b(e)){if(e instanceof v){t.add(e.toArray())}else{i.call(t,e)}}else{i.apply(t,e)}return t},attr:function(e,n){var r=this;if(typeof e==="object"){S(e,function(e,t){r.attr(t,e)})}else if(a(n)){this.each(function(){if(this.nodeType===1){this.setAttribute(e,n)}})}else{return r[0]&&r[0].nodeType===1?r[0].getAttribute(e):t}return r},css:function(e,n){var r=this;if(typeof e==="object"){S(e,function(e,t){r.css(t,e)})}else{e=e.replace(/-(\D)/g,function(e,t){return t.toUpperCase()});if(a(n)){if(typeof n==="number"&&!d[e]){n+="px"}r.each(function(){var t=this.style;if(e==="opacity"&&this.runtimeStyle&&typeof this.runtimeStyle.opacity==="undefined"){t.filter=n===""?"":"alpha(opacity="+n*100+")"}try{t[e]=n}catch(r){}})}else{return r[0]?r[0].style[e]:t}}return r},remove:function(){var e=this,t,n=this.length;while(n--){t=e[n];u.clean(t);if(t.parentNode){t.parentNode.removeChild(t)}}return this},empty:function(){var e=this,t,n=this.length;while(n--){t=e[n];while(t.firstChild){t.removeChild(t.firstChild)}}return this},html:function(e){var t=this,n;if(a(e)){n=t.length;while(n--){t[n].innerHTML=e}return t}return t[0]?t[0].innerHTML:""},text:function(e){var t=this,n;if(a(e)){n=t.length;while(n--){t[n].innerText=t[0].textContent=e}return t}return t[0]?t[0].innerText||t[0].textContent:""},append:function(){return c(this,arguments,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return c(this,arguments,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){var e=this;if(e[0]&&e[0].parentNode){return c(e,arguments,function(e){this.parentNode.insertBefore(e,this.nextSibling)})}return e},after:function(){var e=this;if(e[0]&&e[0].parentNode){return c(e,arguments,function(e){this.parentNode.insertBefore(e,this)})}return e},appendTo:function(e){v(e).append(this);return this},addClass:function(e){return this.toggleClass(e,true)},removeClass:function(e){return this.toggleClass(e,false)},toggleClass:function(e,t){var n=this;if(e.indexOf(" ")!==-1){S(e.split(" "),function(){n.toggleClass(this,t)})}else{n.each(function(){var n=this,r;if(h(n,e)!==t){r=n.className;if(t){n.className+=r?" "+e:e}else{n.className=E((" "+r+" ").replace(" "+e+" "," "))}}})}return n},hasClass:function(e){return h(this[0],e)},each:function(e){return S(this,e)},on:function(e,t){return this.each(function(){u.bind(this,e,t)})},off:function(e,t){return this.each(function(){u.unbind(this,e,t)})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return new v(s.apply(this,arguments))},eq:function(e){return e===-1?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;if(t[0]){t[0].parentNode.replaceChild(v(e)[0],t[0])}return t},wrap:function(e){e=v(e)[0];return this.each(function(){var t=this,n=e.cloneNode(false);t.parentNode.insertBefore(n,t);n.appendChild(t)})},unwrap:function(){return this.each(function(){var e=this,t=e.firstChild,n;while(t){n=t;t=t.nextSibling;e.parentNode.insertBefore(n,e)}})},clone:function(){var e=[];this.each(function(){e.push(this.cloneNode(true))});return v(e)},find:function(e){var t,n,r=[];for(t=0,n=this.length;t<n;t++){v.find(e,this[t],r)}return v(r)},push:i,sort:[].sort,splice:[].splice};m(v,{extend:m,toArray:g,inArray:y,isArray:b,each:S,trim:E,makeMap:p,find:n,expr:n.selectors,unique:n.uniqueSort,text:n.getText,isXMLDoc:n.isXML,contains:n.contains,filter:function(e,t,n){if(n){e=":not("+e+")"}return t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)}});S({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return x(e,"parentNode")},parentsUntil:function(e,t){return x(e,"parentNode",t)},next:function(e){return T(e,"nextSibling",1)},prev:function(e){return T(e,"previousSibling",1)},nextNodes:function(e){return T(e,"nextSibling")},prevNodes:function(e){return T(e,"previousSibling")},children:function(e){return T(e.firstChild,"nextSibling",1)},contents:function(e){return g((e.nodeName==="iframe"?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(e,t){v.fn[e]=function(n){var r=this,i;if(r.length>1){throw new Error("DomQuery only supports traverse functions on a single node.")}if(r[0]){i=t(r[0],n)}i=v(i);if(n&&e!=="parentsUntil"){return i.filter(n)}return i}});v.fn.filter=function(e){return v.filter(e)};v.fn.is=function(e){return!!e&&this.filter(e).length>0};v.fn.init.prototype=v.fn;return v});i("tinymce/html/Styles",[],function(){return function(e,t){function c(e,t,n,r){function i(e){e=parseInt(e,10).toString(16);return e.length>1?e:"0"+e}return"#"+i(t)+i(n)+i(r)}var n=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,r=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,i=/\s*([^:]+):\s*([^;]+);?/g,s=/\s+$/,o,u,a={},f,l="";e=e||{};f=("\\\" \\' \\; \\: ; : "+l).split(" ");for(u=0;u<f.length;u++){a[f[u]]=l+u;a[l+u]=f[u]}return{toHex:function(e){return e.replace(n,c)},parse:function(t){function m(e,t,n){var r,i,s,a;r=o[e+"-top"+t];if(!r){return}i=o[e+"-right"+t];if(!i){return}s=o[e+"-bottom"+t];if(!s){return}a=o[e+"-left"+t];if(!a){return}var f=[r,i,s,a];u=f.length-1;while(u--){if(f[u]!==f[u+1]){break}}if(u>-1&&n){return}o[e+t]=u==-1?f[0]:f.join(" ");delete o[e+"-top"+t];delete o[e+"-right"+t];delete o[e+"-bottom"+t];delete o[e+"-left"+t]}function g(e){var t=o[e],n;if(!t){return}t=t.split(" ");n=t.length;while(n--){if(t[n]!==t[0]){return false}}o[e]=t[0];return true}function y(e,t,n,r){if(!g(t)){return}if(!g(n)){return}if(!g(r)){return}o[e]=o[t]+" "+o[n]+" "+o[r];delete o[t];delete o[n];delete o[r]}function b(e){p=true;return a[e]}function w(e,t){if(p){e=e.replace(/\uFEFF[0-9]/g,function(e){return a[e]})}if(!t){e=e.replace(/\\([\'\";:])/g,"$1")}return e}function E(t,n,r,i,s,o){s=s||o;if(s){s=w(s);return"'"+s.replace(/\'/g,"\\'")+"'"}n=w(n||r||i);if(!e.allow_script_urls&&/(java|vb)script:/i.test(n.replace(/[\s\r\n]+/,""))){return""}if(d){n=d.call(v,n,"style")}return"url('"+n.replace(/\'/g,"\\'")+"')"}var o={},f,l,h,p,d=e.url_converter;var v=e.url_converter_scope||this;if(t){t=t.replace(/[\u0000-\u001F]/g,"");t=t.replace(/\\[\"\';:\uFEFF]/g,b).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,b)});while(f=i.exec(t)){l=f[1].replace(s,"").toLowerCase();h=f[2].replace(s,"");if(l&&h.length>0){if(!e.allow_script_urls&&(l=="behavior"||/expression\s*\(/.test(h))){continue}if(l==="font-weight"&&h==="700"){h="bold"}else if(l==="color"||l==="background-color"){h=h.toLowerCase()}h=h.replace(n,c);h=h.replace(r,E);o[l]=p?w(h,true):h}i.lastIndex=f.index+f[0].length}m("border","",true);m("border","-width");m("border","-color");m("border","-style");m("padding","");m("margin","");y("border","border-width","border-style","border-color");if(o.border==="medium none"){delete o.border}if(o["border-image"]==="none"){delete o["border-image"]}}return o},serialize:function(e,n){function u(n){var i,s,u,a;i=t.styles[n];if(i){for(s=0,u=i.length;s<u;s++){n=i[s];a=e[n];if(a!==o&&a.length>0){r+=(r.length>0?" ":"")+n+": "+a+";"}}}}var r="",i,s;if(n&&t&&t.styles){u("*");u(n)}else{for(i in e){s=e[i];if(s!==o&&s.length>0){r+=(r.length>0?" ":"")+i+": "+s+";"}}}return r}}}});i("tinymce/dom/TreeWalker",[],function(){return function(e,t){function r(e,n,r,i){var s,o;if(e){if(!i&&e[n]){return e[n]}if(e!=t){s=e[r];if(s){return s}for(o=e.parentNode;o&&o!=t;o=o.parentNode){s=o[r];if(s){return s}}}}}var n=e;this.current=function(){return n};this.next=function(e){n=r(n,"firstChild","nextSibling",e);return n};this.prev=function(e){n=r(n,"lastChild","previousSibling",e);return n}}});i("tinymce/util/Tools",[],function(){function i(e,n){if(!n){return e!==t}if(n=="array"&&r(e)){return true}return typeof e==n}function s(e){var t=[],n,r;for(n=0,r=e.length;n<r;n++){t[n]=e[n]}return t}function o(e,t,n){var r;e=e||[];t=t||",";if(typeof e=="string"){e=e.split(t)}n=n||{};r=e.length;while(r--){n[e[r]]={}}return n}function u(e,n,r){var i,s;if(!e){return 0}r=r||e;if(e.length!==t){for(i=0,s=e.length;i<s;i++){if(n.call(r,e[i],i,e)===false){return 0}}}else{for(i in e){if(e.hasOwnProperty(i)){if(n.call(r,e[i],i,e)===false){return 0}}}}return 1}function a(e,t){var n=[];u(e,function(e){n.push(t(e))});return n}function f(e,t){var n=[];u(e,function(e){if(!t||t(e)){n.push(e)}});return n}function l(e,t,n){var r=this,i,s,o,u,a,f=0;e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e);o=e[3].match(/(^|\.)(\w+)$/i)[2];s=r.createNS(e[3].replace(/\.\w+$/,""),n);if(s[o]){return}if(e[2]=="static"){s[o]=t;if(this.onCreate){this.onCreate(e[2],e[3],s[o])}return}if(!t[o]){t[o]=function(){};f=1}s[o]=t[o];r.extend(s[o].prototype,t);if(e[5]){i=r.resolve(e[5]).prototype;u=e[5].match(/\.(\w+)$/i)[1];a=s[o];if(f){s[o]=function(){return i[u].apply(this,arguments)}}else{s[o]=function(){this.parent=i[u];return a.apply(this,arguments)}}s[o].prototype[o]=s[o];r.each(i,function(e,t){s[o].prototype[t]=i[t]});r.each(t,function(e,t){if(i[t]){s[o].prototype[t]=function(){this.parent=i[t];return e.apply(this,arguments)}}else{if(t!=o){s[o].prototype[t]=e}}})}r.each(t["static"],function(e,t){s[o][t]=e})}function c(e,t){var n,r;if(e){for(n=0,r=e.length;n<r;n++){if(e[n]===t){return n}}}return-1}function h(e,n){var r,i,s,o=arguments,u;for(r=1,i=o.length;r<i;r++){n=o[r];for(s in n){if(n.hasOwnProperty(s)){u=n[s];if(u!==t){e[s]=u}}}}return e}function p(e,t,n,r){r=r||this;if(e){if(n){e=e[n]}u(e,function(e,i){if(t.call(r,e,i,n)===false){return false}p(e,t,n,r)})}}function d(e,t){var n,r;t=t||window;e=e.split(".");for(n=0;n<e.length;n++){r=e[n];if(!t[r]){t[r]={}}t=t[r]}return t}function v(e,t){var n,r;t=t||window;e=e.split(".");for(n=0,r=e.length;n<r;n++){t=t[e[n]];if(!t){break}}return t}function m(e,t){if(!e||i(e,"array")){return e}return a(e.split(t||","),n)}var e=/^\s*|\s*$/g;var n=function(n){return n===null||n===t?"":(""+n).replace(e,"")};var r=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};return{trim:n,isArray:r,is:i,toArray:s,makeMap:o,each:u,map:a,grep:f,inArray:c,extend:h,create:l,walk:p,createNS:d,resolve:v,explode:m}});i("tinymce/dom/Range",["tinymce/util/Tools"],function(e){function t(n){function m(){return i.createDocumentFragment()}function g(e,t){B(a,e,t)}function y(e,t){B(f,e,t)}function b(e){g(e.parentNode,v(e))}function w(e){g(e.parentNode,v(e)+1)}function E(e){y(e.parentNode,v(e))}function S(e){y(e.parentNode,v(e)+1)}function x(e){if(e){r[h]=r[c];r[p]=r[l]}else{r[c]=r[h];r[l]=r[p]}r.collapsed=a}function T(e){b(e);S(e)}function N(e){g(e,0);y(e,e.nodeType===1?e.childNodes.length:e.nodeValue.length)}function C(e,t){var n=r[c],i=r[l],s=r[h],o=r[p],u=t.startContainer,a=t.startOffset,f=t.endContainer,d=t.endOffset;if(e===0){return H(n,i,u,a)}if(e===1){return H(s,o,u,a)}if(e===2){return H(s,o,f,d)}if(e===3){return H(n,i,f,d)}}function k(){j(u)}function L(){return j(s)}function A(){return j(o)}function O(e){var t=this[c],r=this[l],i,s;if((t.nodeType===3||t.nodeType===4)&&t.nodeValue){if(!r){t.parentNode.insertBefore(e,t)}else if(r>=t.nodeValue.length){n.insertAfter(e,t)}else{i=t.splitText(r);t.parentNode.insertBefore(e,i)}}else{if(t.childNodes.length>0){s=t.childNodes[r]}if(s){t.insertBefore(e,s)}else{if(t.nodeType==3){n.insertAfter(e,t)}else{t.appendChild(e)}}}}function M(e){var t=r.extractContents();r.insertNode(e);e.appendChild(t);r.selectNode(e)}function _(){return d(new t(n),{startContainer:r[c],startOffset:r[l],endContainer:r[h],endOffset:r[p],collapsed:r.collapsed,commonAncestorContainer:r.commonAncestorContainer})}function D(e,t){var n;if(e.nodeType==3){return e}if(t<0){return e}n=e.firstChild;while(n&&t>0){--t;n=n.nextSibling}if(n){return n}return e}function P(){return r[c]==r[h]&&r[l]==r[p]}function H(e,t,r,i){var s,o,u,a,f,l;if(e==r){if(t==i){return 0}if(t<i){return-1}return 1}s=r;while(s&&s.parentNode!=e){s=s.parentNode}if(s){o=0;u=e.firstChild;while(u!=s&&o<t){o++;u=u.nextSibling}if(t<=o){return-1}return 1}s=e;while(s&&s.parentNode!=r){s=s.parentNode}if(s){o=0;u=r.firstChild;while(u!=s&&o<i){o++;u=u.nextSibling}if(o<i){return-1}return 1}a=n.findCommonAncestor(e,r);f=e;while(f&&f.parentNode!=a){f=f.parentNode}if(!f){f=a}l=r;while(l&&l.parentNode!=a){l=l.parentNode}if(!l){l=a}if(f==l){return 0}u=a.firstChild;while(u){if(u==f){return-1}if(u==l){return 1}u=u.nextSibling}}function B(e,t,i){var s,o;if(e){r[c]=t;r[l]=i}else{r[h]=t;r[p]=i}s=r[h];while(s.parentNode){s=s.parentNode}o=r[c];while(o.parentNode){o=o.parentNode}if(o==s){if(H(r[c],r[l],r[h],r[p])>0){r.collapse(e)}}else{r.collapse(e)}r.collapsed=P();r.commonAncestorContainer=n.findCommonAncestor(r[c],r[h])}function j(e){var t,n=0,i=0,s,o,u,a,f,l;if(r[c]==r[h]){return F(e)}for(t=r[h],s=t.parentNode;s;t=s,s=s.parentNode){if(s==r[c]){return I(t,e)}++n}for(t=r[c],s=t.parentNode;s;t=s,s=s.parentNode){if(s==r[h]){return q(t,e)}++i}o=i-n;u=r[c];while(o>0){u=u.parentNode;o--}a=r[h];while(o<0){a=a.parentNode;o++}for(f=u.parentNode,l=a.parentNode;f!=l;f=f.parentNode,l=l.parentNode){u=f;a=l}return R(u,a,e)}function F(e){var t,n,s,f,h,d,v,g,y;if(e!=u){t=m()}if(r[l]==r[p]){return t}if(r[c].nodeType==3){n=r[c].nodeValue;s=n.substring(r[l],r[p]);if(e!=o){f=r[c];g=r[l];y=r[p]-r[l];if(g===0&&y>=f.nodeValue.length-1){f.parentNode.removeChild(f)}else{f.deleteData(g,y)}r.collapse(a)}if(e==u){return}if(s.length>0){t.appendChild(i.createTextNode(s))}return t}f=D(r[c],r[l]);h=r[p]-r[l];while(f&&h>0){d=f.nextSibling;v=X(f,e);if(t){t.appendChild(v)}--h;f=d}if(e!=o){r.collapse(a)}return t}function I(e,t){var n,i,s,a,c,h;if(t!=u){n=m()}i=U(e,t);if(n){n.appendChild(i)}s=v(e);a=s-r[l];if(a<=0){if(t!=o){r.setEndBefore(e);r.collapse(f)}return n}i=e.previousSibling;while(a>0){c=i.previousSibling;h=X(i,t);if(n){n.insertBefore(h,n.firstChild)}--a;i=c}if(t!=o){r.setEndBefore(e);r.collapse(f)}return n}function q(e,t){var n,i,s,f,l,c;if(t!=u){n=m()}s=z(e,t);if(n){n.appendChild(s)}i=v(e);++i;f=r[p]-i;s=e.nextSibling;while(s&&f>0){l=s.nextSibling;c=X(s,t);if(n){n.appendChild(c)}--f;s=l}if(t!=o){r.setStartAfter(e);r.collapse(a)}return n}function R(e,t,n){var i,s,f,l,c,h,p,d;if(n!=u){s=m()}i=z(e,n);if(s){s.appendChild(i)}f=e.parentNode;l=v(e);c=v(t);++l;h=c-l;p=e.nextSibling;while(h>0){d=p.nextSibling;i=X(p,n);if(s){s.appendChild(i)}p=d;--h}i=U(t,n);if(s){s.appendChild(i)}if(n!=o){r.setStartAfter(e);r.collapse(a)}return s}function U(e,t){var n=D(r[h],r[p]-1),i,s;var o,l,c,d=n!=r[h];if(n==e){return W(n,d,f,t)}i=n.parentNode;s=W(i,f,f,t);while(i){while(n){o=n.previousSibling;l=W(n,d,f,t);if(t!=u){s.insertBefore(l,s.firstChild)}d=a;n=o}if(i==e){return s}n=i.previousSibling;i=i.parentNode;c=W(i,f,f,t);if(t!=u){c.appendChild(s)}s=c}}function z(e,t){var n=D(r[c],r[l]),i=n!=r[c];var s,o,h,p,d;if(n==e){return W(n,i,a,t)}s=n.parentNode;o=W(s,f,a,t);while(s){while(n){h=n.nextSibling;p=W(n,i,a,t);if(t!=u){o.appendChild(p)}i=a;n=h}if(s==e){return o}n=s.nextSibling;s=s.parentNode;d=W(s,f,a,t);if(t!=u){d.appendChild(o)}o=d}}function W(e,t,i,s){var a,c,h,d,v;if(t){return X(e,s)}if(e.nodeType==3){a=e.nodeValue;if(i){d=r[l];c=a.substring(d);h=a.substring(0,d)}else{d=r[p];c=a.substring(0,d);h=a.substring(d)}if(s!=o){e.nodeValue=h}if(s==u){return}v=n.clone(e,f);v.nodeValue=c;return v}if(s==u){return}return n.clone(e,f)}function X(e,t){if(t!=u){return t==o?n.clone(e,a):e}e.parentNode.removeChild(e)}function V(){return n.create("body",null,A()).outerText}var r=this,i=n.doc,s=0,o=1,u=2,a=true,f=false,l="startOffset",c="startContainer",h="endContainer",p="endOffset",d=e.extend,v=n.nodeIndex;d(r,{startContainer:i,startOffset:0,endContainer:i,endOffset:0,collapsed:a,commonAncestorContainer:i,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:g,setEnd:y,setStartBefore:b,setStartAfter:w,setEndBefore:E,setEndAfter:S,collapse:x,selectNode:T,selectNodeContents:N,compareBoundaryPoints:C,deleteContents:k,extractContents:L,cloneContents:A,insertNode:O,surroundContents:M,cloneRange:_,toStringIE:V});return r}t.prototype.toString=function(){return this.toStringIE()};return t});i("tinymce/html/Entities",["tinymce/util/Tools"],function(e){function l(e){var t;t=document.createElement("div");t.innerHTML=e;return t.textContent||t.innerText||e}function c(e,t){var n,i,s,o={};if(e){e=e.split(",");t=t||10;for(n=0;n<e.length;n+=2){i=String.fromCharCode(parseInt(e[n],t));if(!r[i]){s="&"+e[n+1]+";";o[i]=s;o[s]=i}}return o}}var t=e.makeMap;var n,r,i,s=/[&<>\"\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,o=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=/[<>&\"\']/g,a=/&(#x|#)?([\w]+);/g,f={128:"€",130:"",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"",140:"Œ",142:"Ž",145:"",146:"",147:"“",148:"”",149:"•",150:"",151:"—",152:"˜",153:"™",154:"š",155:"",156:"œ",158:"ž",159:"Ÿ"};r={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&"};i={"&lt;":"<","&gt;":">","&":"&","&quot;":'"',"&apos;":"'"};n=c("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 h={encodeRaw:function(e,t){return e.replace(t?s:o,function(e){return r[e]||e})},encodeAllRaw:function(e){return(""+e).replace(u,function(e){return r[e]||e})},encodeNumeric:function(e,t){return e.replace(t?s:o,function(e){if(e.length>1){return"&#"+((e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320)+65536)+";"}return r[e]||"&#"+e.charCodeAt(0)+";"})},encodeNamed:function(e,t,i){i=i||n;return e.replace(t?s:o,function(e){return r[e]||i[e]||e})},getEncodeFunc:function(e,i){function u(e,t){return e.replace(t?s:o,function(e){return r[e]||i[e]||"&#"+e.charCodeAt(0)+";"||e})}function a(e,t){return h.encodeNamed(e,t,i)}i=c(i)||n;e=t(e.replace(/\+/g,","));if(e.named&&e.numeric){return u}if(e.named){if(i){return a}return h.encodeNamed}if(e.numeric){return h.encodeNumeric}return h.encodeRaw},decode:function(e){return e.replace(a,function(e,t,r){if(t){r=parseInt(r,t.length===2?16:10);if(r>65535){r-=65536;return String.fromCharCode(55296+(r>>10),56320+(r&1023))}else{return f[r]||String.fromCharCode(r)}}return i[e]||n[e]||l(e)})}};return h});i("tinymce/Env",[],function(){var e=navigator,t=e.userAgent;var n,r,i,s,o,u,a;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];s=t.indexOf("Trident/")!=-1&&(t.indexOf("rv:")!=-1||e.appName.indexOf("Netscape")!=-1)?11:false;i=i||s;o=!r&&!s&&/Gecko/.test(t);u=t.indexOf("Mac")!=-1;a=/(iPad|iPhone)/.test(t);var f=!a||t.match(/AppleWebKit\/(\d*)/)[1]>=534;return{opera:n,webkit:r,ie:i,gecko:o,mac:u,iOS:a,contentEditable:f,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:i!=8,range:window.getSelection&&"Range"in window,documentMode:i?document.documentMode||7:10}});i("tinymce/dom/StyleSheetLoader",[],function(){"use strict";return function(e,t){function s(t){e.getElementsByTagName("head")[0].appendChild(t)}function o(t,o,u){function h(){var e=c.passed,t=e.length;while(t--){e[t]()}c.status=2;c.passed=[];c.failed=[]}function p(){var e=c.failed,t=e.length;while(t--){e[t]()}c.status=3;c.passed=[];c.failed=[]}function d(){var e=navigator.userAgent.match(/WebKit\/(\d*)/);return!!(e&&e[1]<536)}function v(e,t){if(!e()){if((new Date).getTime()-l<i){window.setTimeout(t,0)}else{p()}}}function m(){v(function(){var t=e.styleSheets,n,r=t.length,i;while(r--){n=t[r];i=n.ownerNode?n.ownerNode:n.owningElement;if(i&&i.id===a.id){h();return true}}},m)}function g(){v(function(){try{var e=f.sheet.cssRules;h();return!!e}catch(t){}},g)}var a,f,l,c;if(!r[t]){c={passed:[],failed:[]};r[t]=c}else{c=r[t]}if(o){c.passed.push(o)}if(u){c.failed.push(u)}if(c.status==1){return}if(c.status==2){h();return}if(c.status==3){p();return}c.status=1;a=e.createElement("link");a.rel="stylesheet";a.type="text/css";a.id="u"+n++;a.async=false;a.defer=false;l=(new Date).getTime();if("onload"in a&&!d()){a.onload=m;a.onerror=p}else{if(navigator.userAgent.indexOf("Firefox")>0){f=e.createElement("style");f.textContent='@import "'+t+'"';g();s(f);return}else{m()}}s(a);a.href=t}var n=0,r={},i;t=t||{};i=t.maxLoadTime||5e3;this.load=o}});i("tinymce/dom/DOMUtils",["tinymce/dom/Sizzle","tinymce/html/Styles","tinymce/dom/EventUtils","tinymce/dom/TreeWalker","tinymce/dom/Range","tinymce/html/Entities","tinymce/Env","tinymce/util/Tools","tinymce/dom/StyleSheetLoader"],function(e,n,r,i,s,o,u,a,f){function w(e,t){var i=this,s;i.doc=e;i.win=window;i.files={};i.counter=0;i.stdMode=!m||e.documentMode>=8;i.boxModel=!m||e.compatMode=="CSS1Compat"||i.stdMode;i.hasOuterHTML="outerHTML"in e.createElement("a");i.styleSheetLoader=new f(e);this.boundEvents=[];i.settings=t=d({keep_values:false,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;s=t.schema?t.schema.getBlockElements():{};i.isBlock=function(e){if(!e){return false}var t=e.nodeType;if(t){return!!(t===1&&s[e.nodeName])}return!!s[e]}}var l=a.each,c=a.is,h=a.grep,p=a.trim,d=a.extend;var v=u.webkit,m=u.ie;var g=/^([a-z0-9],?)+$/i;var y=/^[ \t\r\n]*$/;var b=a.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," ");w.prototype={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"},fixDoc:function(e){var t=this.settings,n;if(m&&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;if(!m||e.nodeType!==1||t){return e.cloneNode(t)}i=n.doc;if(!t){r=i.createElement(e.nodeName);l(n.getAttribs(e),function(t){n.setAttrib(r,t.nodeName,n.getAttrib(e,t.nodeName))});return r}return r.firstChild},getRoot:function(){var e=this;return e.get(e.settings.root_element)||e.doc.body},getViewPort:function(e){var t,n;e=!e?this.win:e;t=e.document;n=this.boxModel?t.documentElement:t.body;return{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;e=t.get(e);n=t.getPos(e);r=t.getSize(e);return{x:n.x,y:n.y,w:r.w,h:r.h}},getSize:function(e){var t=this,n,r;e=t.get(e);n=t.getStyle(e,"width");r=t.getStyle(e,"height");if(n.indexOf("px")===-1){n=0}if(r.indexOf("px")===-1){r=0}return{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,false)},getParents:function(e,n,r,i){var s=this,o,u=[];e=s.get(e);i=i===t;r=r||(s.getRoot().nodeName!="BODY"?s.getRoot().parentNode:null);if(c(n,"string")){o=n;if(n==="*"){n=function(e){return e.nodeType==1}}else{n=function(e){return s.is(e,o)}}}while(e){if(e==r||!e.nodeType||e.nodeType===9){break}if(!n||n(e)){if(i){u.push(e)}else{return e}}e=e.parentNode}return i?u:null},get:function(e){var t;if(e&&this.doc&&typeof e=="string"){t=e;e=this.doc.getElementById(e);if(e&&e.id!==t){return this.doc.getElementsByName(t)[1]}}return 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 n.nodeType==1}if(g.test(r)){r=r.toLowerCase().split(/,/);n=n.nodeName.toLowerCase();for(i=r.length-1;i>=0;i--){if(r[i]==n){return true}}return false}}if(n.nodeType&&n.nodeType!=1){return false}return e.matches(r,n.nodeType?[n]:n).length>0},add:function(e,t,n,r,i){var s=this;return this.run(e,function(e){var o;o=c(t,"string")?s.doc.createElement(t):t;s.setAttribs(o,n);if(r){if(r.nodeType){o.appendChild(r)}else{s.setHTML(o,r)}}return!i?e.appendChild(o):o})},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){if(t.hasOwnProperty(i)&&t[i]!==null){r+=" "+i+'="'+this.encode(t[i])+'"'}}if(typeof n!="undefined"){return r+">"+n+"</"+e+">"}return r+" />"},createFragment:function(e){var t,n,r=this.doc,i;i=r.createElement("div");t=r.createDocumentFragment();if(e){i.innerHTML=e}while(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){while(n=e.firstChild){if(!m||n.nodeType!==3||n.nodeValue){r.insertBefore(n,e)}else{e.removeChild(n)}}}return r.removeChild(e)})},setStyle:function(e,t,n){return this.run(e,function(e){var r=this,i,s;if(t){if(typeof t==="string"){i=e.style;t=t.replace(/-(\D)/g,function(e,t){return t.toUpperCase()});if(typeof n==="number"&&!b[t]){n+="px"}if(t==="opacity"&&e.runtimeStyle&&typeof e.runtimeStyle.opacity==="undefined"){i.filter=n===""?"":"alpha(opacity="+n*100+")"}if(t=="float"){t="cssFloat"in e.style?"cssFloat":"styleFloat"}try{i[t]=n}catch(o){}if(r.settings.update_styles){e.removeAttribute("data-mce-style")}}else{for(s in t){r.setStyle(e,s,t[s])}}}})},getStyle:function(e,n,r){e=this.get(e);if(!e){return}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}}n=n.replace(/-(\D)/g,function(e,t){return t.toUpperCase()});if(n=="float"){n=m?"styleFloat":"cssFloat"}if(e.currentStyle&&r){return e.currentStyle[n]}return e.style?e.style[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}return this.run(e,function(e){var i=r.settings;var s=e.getAttribute(t);if(n!==null){switch(t){case"style":if(!c(n,"string")){l(n,function(t,n){r.setStyle(e,n,t)});return}if(i.keep_values){if(n){e.setAttribute("data-mce-style",n,2)}else{e.removeAttribute("data-mce-style",2)}}e.style.cssText=n;break;case"class":e.className=n||"";break;case"src":case"href":if(i.keep_values){if(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);break}}if(c(n)&&n!==null&&n.length!==0){e.setAttribute(t,""+n,2)}else{e.removeAttribute(t,2)}if(s!=n&&i.onSetAttrib){i.onSetAttrib({attrElm:e,attrName:t,attrValue:n})}})},setAttribs:function(e,t){var n=this;return this.run(e,function(e){l(t,function(t,r){n.setAttrib(e,r,t)})})},getAttrib:function(e,t,n){var r,i=this,s;e=i.get(e);if(!e||e.nodeType!==1){return n===s?false:n}if(!c(n)){n=""}if(/^(src|href|style|coords|shape)$/.test(t)){r=e.getAttribute("data-mce-"+t);if(r){return r}}if(m&&i.props[t]){r=e[i.props[t]];r=r&&r.nodeValue?r.nodeValue:r}if(!r){r=e.getAttribute(t,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(t)){if(e[i.props[t]]===true&&r===""){return t}return r?t:""}if(e.nodeName==="FORM"&&e.getAttributeNode(t)){return e.getAttributeNode(t).nodeValue}if(t==="style"){r=r||e.style.cssText;if(r){r=i.serializeStyle(i.parseStyle(r),e.nodeName);if(i.settings.keep_values){e.setAttribute("data-mce-style",r)}}}if(v&&t==="class"&&r){r=r.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(m){switch(t){case"rowspan":case"colspan":if(r===1){r=""}break;case"size":if(r==="+0"||r===20||r===0){r=""}break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":if(r===0){r=""}break;case"hspace":if(r===-1){r=""}break;case"maxlength":case"tabindex":if(r===32768||r===2147483647||r==="32768"){r=""}break;case"multiple":case"compact":case"noshade":case"nowrap":if(r===65535){return t}return n;case"shape":r=r.toLowerCase();break;default:if(t.indexOf("on")===0&&r){r=(""+r).replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1")}}}return r!==s&&r!==null&&r!==""?""+r:n},getPos:function(e,t){var n=this,r=0,i=0,s,o=n.doc,u;e=n.get(e);t=t||o.body;if(e){if(t===o.body&&e.getBoundingClientRect){u=e.getBoundingClientRect();t=n.boxModel?o.documentElement:o.body;r=u.left+(o.documentElement.scrollLeft||o.body.scrollLeft)-t.clientLeft;i=u.top+(o.documentElement.scrollTop||o.body.scrollTop)-t.clientTop;return{x:r,y:i}}s=e;while(s&&s!=t&&s.nodeType){r+=s.offsetLeft||0;i+=s.offsetTop||0;s=s.offsetParent}s=e.parentNode;while(s&&s!=t&&s.nodeType){r-=s.scrollLeft||0;i-=s.scrollTop||0;s=s.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!==w.DOM&&n===document){var s=w.DOM.addedStyles;s=s||[];if(s[e]){return}s[e]=true;w.DOM.addedStyles=s}i=n.getElementById("mceDefaultStyles");if(!i){i=n.createElement("style");i.id="mceDefaultStyles";i.type="text/css";r=n.getElementsByTagName("head")[0];if(r.firstChild){r.insertBefore(i,r.firstChild)}else{r.appendChild(i)}}if(i.styleSheet){i.styleSheet.cssText+=e}else{i.appendChild(n.createTextNode(e))}},loadCSS:function(e){var t=this,n=t.doc,r;if(t!==w.DOM&&n===document){w.DOM.loadCSS(e);return}if(!e){e=""}r=n.getElementsByTagName("head")[0];l(e.split(","),function(e){var i;if(t.files[e]){return}t.files[e]=true;i=t.create("link",{rel:"stylesheet",href:e});if(m&&n.documentMode&&n.recalc){i.onload=function(){if(n.recalc){n.recalc()}i.onload=null}}r.appendChild(i)})},addClass:function(e,t){return this.run(e,function(e){var n;if(!t){return 0}if(this.hasClass(e,t)){return e.className}n=this.removeClass(e,t);e.className=n=(n!==""?n+" ":"")+t;return n})},removeClass:function(e,t){var n=this,r;return n.run(e,function(e){var i;if(n.hasClass(e,t)){if(!r){r=new RegExp("(^|\\s+)"+t+"(\\s+|$)","g")}i=e.className.replace(r," ");i=p(i!=" "?i:"");e.className=i;if(!i){e.removeAttribute("class");e.removeAttribute("className")}return i}return e.className})},hasClass:function(e,t){e=this.get(e);if(!e||!t){return false}return(" "+e.className+" ").indexOf(" "+t+" ")!==-1},toggleClass:function(e,n,r){r=r===t?!this.hasClass(e,n):r;if(this.hasClass(e,n)!==r){if(r){this.addClass(e,n)}else{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){e=this.get(e);return!e||e.style.display=="none"||this.getStyle(e,"display")=="none"},uniqueId:function(e){return(!e?"mce_":e)+this.counter++},setHTML:function(e,t){var n=this;return n.run(e,function(e){if(m){while(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;l(h(i.childNodes),function(t,n){if(n&&e.canHaveHTML){e.appendChild(t)}})}}else{e.innerHTML=t}return t})},getOuterHTML:function(e){var t,n=this;e=n.get(e);if(!e){return null}if(e.nodeType===1&&n.hasOuterHTML){return e.outerHTML}t=(e.ownerDocument||n.doc).createElement("body");t.appendChild(e.cloneNode(true));return t.innerHTML},setOuterHTML:function(e,t,n){var r=this;return r.run(e,function(e){function i(){var i,s;s=n.createElement("body");s.innerHTML=t;i=s.lastChild;while(i){r.insertAfter(i.cloneNode(true),e);i=i.previousSibling}r.remove(e)}if(e.nodeType==1){n=n||e.ownerDocument||r.doc;if(m){try{if(e.nodeType==1&&r.hasOuterHTML){e.outerHTML=t}else{i()}}catch(s){i()}}else{i()}}})},decode:o.decode,encode:o.encodeAllRaw,insertAfter:function(e,t){t=this.get(t);return this.run(e,function(e){var n,r;n=t.parentNode;r=t.nextSibling;if(r){n.insertBefore(e,r)}else{n.appendChild(e)}return e})},replace:function(e,t,n){var r=this;return r.run(t,function(t){if(c(t,"array")){e=e.cloneNode(true)}if(n){l(h(t.childNodes),function(t){e.appendChild(t)})}return t.parentNode.replaceChild(e,t)})},rename:function(e,t){var n=this,r;if(e.nodeName!=t.toUpperCase()){r=n.create(t);l(n.getAttribs(e),function(t){n.setAttrib(r,t.nodeName,n.getAttrib(e,t.nodeName))});n.replace(r,e,1)}return r||e},findCommonAncestor:function(e,t){var n=e,r;while(n){r=t;while(r&&n!=r){r=r.parentNode}if(n==r){break}n=n.parentNode}if(!n&&e.ownerDocument){return e.ownerDocument.documentElement}return n},toHex:function(e){return this.styles.toHex(a.trim(e))},run:function(e,t,n){var r=this,i;if(typeof e==="string"){e=r.get(e)}if(!e){return false}n=n||this;if(!e.nodeType&&(e.length||e.length===0)){i=[];l(e,function(e,s){if(e){if(typeof e=="string"){e=r.get(e)}i.push(t.call(n,e,s))}});return i}return t.call(n,e)},getAttribs:function(e){var t;e=this.get(e);if(!e){return[]}if(m){t=[];if(e.nodeName=="OBJECT"){return e.attributes}if(e.nodeName==="OPTION"&&this.getAttrib(e,"selected")){t.push({specified:1,nodeName:"selected"})}var n=/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi;e.cloneNode(false).outerHTML.replace(n,"").replace(/[\w:\-]+/gi,function(e){t.push({specified:1,nodeName:e})});return t}return e.attributes},isEmpty:function(e,t){var n=this,r,s,o,u,a,f=0;e=e.firstChild;if(e){u=new i(e,e.parentNode);t=t||n.schema?n.schema.getNonEmptyElements():null;do{o=e.nodeType;if(o===1){if(e.getAttribute("data-mce-bogus")){continue}a=e.nodeName.toLowerCase();if(t&&t[a]){if(a==="br"){f++;continue}return false}s=n.getAttribs(e);r=e.attributes.length;while(r--){a=e.attributes[r].nodeName;if(a==="name"||a==="data-mce-bookmark"){return false}}}if(o==8){return false}if(o===3&&!y.test(e.nodeValue)){return false}}while(e=u.next())}return f<=1},createRng:function(){var e=this.doc;return e.createRange?e.createRange():new s(this)},nodeIndex:function(e,t){var n=0,r,i,s;if(e){for(r=e.nodeType,e=e.previousSibling,i=e;e;e=e.previousSibling){s=e.nodeType;if(t&&s==3){if(s==r||!e.nodeValue.length){continue}}n++;r=s}}return n},split:function(e,t,n){function a(e){function s(e){var t=e.previousSibling&&e.previousSibling.nodeName=="SPAN";var n=e.nextSibling&&e.nextSibling.nodeName=="SPAN";return t&&n}var t,n=e.childNodes,i=e.nodeType;if(i==1&&e.getAttribute("data-mce-type")=="bookmark"){return}for(t=n.length-1;t>=0;t--){a(n[t])}if(i!=9){if(i==3&&e.nodeValue.length>0){var o=p(e.nodeValue).length;if(!r.isBlock(e.parentNode)||o>0||o===0&&s(e)){return}}else if(i==1){n=e.childNodes;if(n.length==1&&n[0]&&n[0].nodeType==1&&n[0].getAttribute("data-mce-type")=="bookmark"){e.parentNode.insertBefore(n[0],e)}if(n.length||/^(br|hr|input|img)$/i.test(e.nodeName)){return}}r.remove(e)}return e}var r=this,i=r.createRng(),s,o,u;if(e&&t){i.setStart(e.parentNode,r.nodeIndex(e));i.setEnd(t.parentNode,r.nodeIndex(t));s=i.extractContents();i=r.createRng();i.setStart(t.parentNode,r.nodeIndex(t)+1);i.setEnd(e.parentNode,r.nodeIndex(e)+1);o=i.extractContents();u=e.parentNode;u.insertBefore(a(s),e);if(n){u.replaceChild(n,t)}else{u.insertBefore(t,e)}u.insertBefore(a(o),e);r.remove(e);return n||t}},bind:function(e,t,n,r){var i=this;if(a.isArray(e)){var s=e.length;while(s--){e[s]=i.bind(e[s],t,n,r)}return e}if(i.settings.collect&&(e===i.doc||e===i.win)){i.boundEvents.push([e,t,n,r])}return i.events.bind(e,t,n,r||i)},unbind:function(e,t,n){var r=this,i;if(a.isArray(e)){i=e.length;while(i--){e[i]=r.unbind(e[i],t,n)}return e}if(r.boundEvents&&(e===r.doc||e===r.win)){i=r.boundEvents.length;while(i--){var s=r.boundEvents[i];if(e==s[0]&&(!t||t==s[1])&&(!n||n==s[2])){this.events.unbind(s[0],s[1],s[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;if(e.nodeType!=1){return null}t=e.getAttribute("data-mce-contenteditable");if(t&&t!=="inherit"){return t}return e.contentEditable!=="inherit"?e.contentEditable:null},destroy:function(){var t=this;if(t.boundEvents){var n=t.boundEvents.length;while(n--){var r=t.boundEvents[n];this.events.unbind(r[0],r[1],r[2])}t.boundEvents=null}if(e.setDocument){e.setDocument()}t.win=t.doc=t.root=t.events=t.frag=null},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){if(typeof i=="string"){i=function(e){return r.is(e,t)}}for(e=e[n];e;e=e[n]){if(i(e)){return e}}}return null}};w.DOM=new w(document);return w});i("tinymce/dom/ScriptLoader",["tinymce/dom/DOMUtils","tinymce/util/Tools"],function(e,t){function s(){function h(e,t){function o(){r.remove(s);if(i){i.onreadystatechange=i.onload=i=null}t()}function u(){if(typeof console!=="undefined"&&console.log){console.log("Failed to load: "+e)}}var r=n,i,s;s=r.uniqueId();i=document.createElement("script");i.id=s;i.type="text/javascript";i.src=e;if("onreadystatechange"in i){i.onreadystatechange=function(){if(/loaded|complete/.test(i.readyState)){o()}}}else{i.onload=o}i.onerror=u;(document.getElementsByTagName("head")[0]||document.body).appendChild(i)}var e=0,t=1,s=2,o={},u=[],a={},f=[],l=0,c;this.isDone=function(e){return o[e]==s};this.markDone=function(e){o[e]=s};this.add=this.load=function(t,n,r){var i=o[t];if(i==c){u.push(t);o[t]=e}if(n){if(!a[t]){a[t]=[]}a[t].push({func:n,scope:r||this})}};this.loadQueue=function(e,t){this.loadScripts(u,e,t)};this.loadScripts=function(e,n,u){function d(e){r(a[e],function(e){e.func.call(e.scope)});a[e]=c}var p;f.push({func:n,scope:u||this});p=function(){var n=i(e);e.length=0;r(n,function(e){if(o[e]==s){d(e);return}if(o[e]!=t){o[e]=t;l++;h(e,function(){o[e]=s;l--;d(e);p()})}});if(!l){r(f,function(e){e.func.call(e.scope)});f.length=0}};p()}}var n=e.DOM;var r=t.each,i=t.grep;s.ScriptLoader=new s;return s});i("tinymce/AddOnManager",["tinymce/dom/ScriptLoader","tinymce/util/Tools"],function(e,n){function i(){var e=this;e.items=[];e.urls={};e.lookup={}}var r=n.each;i.prototype={get:function(e){if(this.lookup[e]){return this.lookup[e].instance}else{return t}},dependencies:function(e){var t;if(this.lookup[e]){t=this.lookup[e].dependencies}return t||[]},requireLangPack:function(t,n){if(i.language&&i.languageLoad!==false){if(n&&(new RegExp("([, ]|\\b)"+i.language+"([, ]|\\b)")).test(n)===false){return}e.ScriptLoader.add(this.urls[t]+"/langs/"+i.language+".js")}},add:function(e,t,n){this.items.push(t);this.lookup[e]={instance:t,dependencies:n};return t},createUrl:function(e,t){if(typeof t==="object"){return t}else{return{prefix:e.prefix,resource:t,suffix:e.suffix}}},addComponents:function(t,n){var i=this.urls[t];r(n,function(t){e.ScriptLoader.add(i+"/"+t)})},load:function(n,s,o,u){function l(){var i=a.dependencies(n);r(i,function(e){var n=a.createUrl(s,e);a.load(n.resource,n,t,t)});if(o){if(u){o.call(u)}else{o.call(e)}}}var a=this,f=s;if(a.urls[n]){return}if(typeof s==="object"){f=s.prefix+s.resource+s.suffix}if(f.indexOf("/")!==0&&f.indexOf("://")==-1){f=i.baseURL+"/"+f}a.urls[n]=f.substring(0,f.lastIndexOf("/"));if(a.lookup[n]){l()}else{e.ScriptLoader.add(f,l,u)}}};i.PluginManager=new i;i.ThemeManager=new i;return i});i("tinymce/html/Node",[],function(){function n(e,t,n){var r,i,s=n?"lastChild":"firstChild",o=n?"prev":"next";if(e[s]){return e[s]}if(e!==t){r=e[o];if(r){return r}for(i=e.parent;i&&i!==t;i=i.parent){r=i[o];if(r){return r}}}}function r(e,t){this.name=e;this.type=t;if(t===1){this.attributes=[];this.attributes.map={}}}var e=/^[ \t\r\n]*$/,t={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};r.prototype={replace:function(e){var t=this;if(e.parent){e.remove()}t.insert(e,t);t.remove();return t},attr:function(e,t){var n=this,r,i,s;if(typeof e!=="string"){for(i in e){n.attr(i,e[i])}return n}if(r=n.attributes){if(t!==s){if(t===null){if(e in r.map){delete r.map[e];i=r.length;while(i--){if(r[i].name===e){r=r.splice(i,1);return n}}}return n}if(e in r.map){i=r.length;while(i--){if(r[i].name===e){r[i].value=t;break}}}else{r.push({name:e,value:t})}r.map[e]=t;return n}else{return r.map[e]}}},clone:function(){var e=this,t=new r(e.name,e.type),n,i,s,o,u;if(s=e.attributes){u=[];u.map={};for(n=0,i=s.length;n<i;n++){o=s[n];if(o.name!=="id"){u[u.length]={name:o.name,value:o.value};u.map[o.name]=o.value}}t.attributes=u}t.value=e.value;t.shortEnded=e.shortEnded;return t},wrap:function(e){var t=this;t.parent.insert(e,t);e.append(t);return t},unwrap:function(){var e=this,t,n;for(t=e.firstChild;t;){n=t.next;e.insert(t,e,true);t=n}e.remove()},remove:function(){var e=this,t=e.parent,n=e.next,r=e.prev;if(t){if(t.firstChild===e){t.firstChild=n;if(n){n.prev=null}}else{r.next=n}if(t.lastChild===e){t.lastChild=r;if(r){r.next=null}}else{n.prev=r}e.parent=e.next=e.prev=null}return e},append:function(e){var t=this,n;if(e.parent){e.remove()}n=t.lastChild;if(n){n.next=e;e.prev=n;t.lastChild=e}else{t.lastChild=t.firstChild=e}e.parent=t;return e},insert:function(e,t,n){var r;if(e.parent){e.remove()}r=t.parent||this;if(n){if(t===r.firstChild){r.firstChild=e}else{t.prev.next=e}e.prev=t.prev;e.next=t;t.prev=e}else{if(t===r.lastChild){r.lastChild=e}else{t.next.prev=e}e.next=t.next;e.prev=t;t.next=e}e.parent=r;return e},getAll:function(e){var t=this,r,i=[];for(r=t.firstChild;r;r=n(r,t)){if(r.name===e){i.push(r)}}return i},empty:function(){var e=this,t,r,i;if(e.firstChild){t=[];for(i=e.firstChild;i;i=n(i,e)){t.push(i)}r=t.length;while(r--){i=t[r];i.parent=i.firstChild=i.lastChild=i.next=i.prev=null}}e.firstChild=e.lastChild=null;return e},isEmpty:function(t){var r=this,i=r.firstChild,s,o;if(i){do{if(i.type===1){if(i.attributes.map["data-mce-bogus"]){continue}if(t[i.name]){return false}s=i.attributes.length;while(s--){o=i.attributes[s].name;if(o==="name"||o.indexOf("data-mce-")===0){return false}}}if(i.type===8){return false}if(i.type===3&&!e.test(i.value)){return false}}while(i=n(i,r))}return true},walk:function(e){return n(this,null,e)}};r.create=function(e,n){var i,s;i=new r(e,t[e]||1);if(n){for(s in n){i.attr(s,n[s])}}return i};return r});i("tinymce/html/Schema",["tinymce/util/Tools"],function(e){function u(e,t){return e?e.split(t||" "):[]}function a(e){function h(e,t,r){function l(e){var t={},n,r;for(n=0,r=e.length;n<r;n++){t[e[n]]={}}return t}var s,o,a,f=arguments;r=r||[];t=t||"";if(typeof r==="string"){r=u(r)}for(o=3;o<f.length;o++){if(typeof f[o]==="string"){f[o]=u(f[o])}r.push.apply(r,f[o])}e=u(e);s=e.length;while(s--){a=[].concat(i,u(t));n[e[s]]={attributes:l(a),attributesOrder:a,children:l(r)}}}function p(e,t){var r,i,s,o;e=u(e);r=e.length;t=u(t);while(r--){i=n[e[r]];for(s=0,o=t.length;s<o;s++){i.attributes[t[s]]={};i.attributesOrder.push(t[s])}}}var n={},i,s,o;var a,f,l,c;if(t[e]){return t[e]}i=u("id accesskey class dir lang style tabindex title");s=u("onabort onblur oncancel oncanplay oncanplaythrough onchange onclick onclose oncontextmenu oncuechange "+"ondblclick ondrag ondragend ondragenter ondragleave ondragover ondragstart ondrop ondurationchange onemptied onended "+"onerror onfocus oninput oninvalid onkeydown onkeypress onkeyup onload onloadeddata onloadedmetadata onloadstart "+"onmousedown onmousemove onmouseout onmouseover onmouseup onmousewheel onpause onplay onplaying onprogress onratechange "+"onreset onscroll onseeked onseeking onseeking onselect onshow onstalled onsubmit onsuspend ontimeupdate onvolumechange "+"onwaiting");o=u("address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul");a=u("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");if(e!="html4"){i.push.apply(i,u("contenteditable contextmenu draggable dropzone "+"hidden spellcheck translate"));o.push.apply(o,u("article aside details dialog figure header footer hgroup section nav"));a.push.apply(a,u("audio canvas command datalist mark meter output progress time wbr "+"video ruby bdi keygen"))}if(e!="html5-strict"){i.push("xml:lang");c=u("acronym applet basefont big font strike tt");a.push.apply(a,c);r(c,function(e){h(e,"",a)});l=u("center dir isindex noframes");o.push.apply(o,l);f=[].concat(o,a);r(l,function(e){h(e,"",f)})}f=f||[].concat(o,a);h("html","manifest","head body");h("head","","base command link meta noscript script style title");h("title hr noscript br");h("base","href target");h("link","href rel media hreflang type sizes hreflang");h("meta","name http-equiv content charset");h("style","media type scoped");h("script","src async defer type charset");h("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus "+"onhashchange onload onmessage onoffline ononline onpagehide onpageshow "+"onpopstate onresize onscroll onstorage onunload",f);h("address dt dd div caption","",f);h("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","",a);h("blockquote","cite",f);h("ol","reversed start type","li");h("ul","","li");h("li","value",f);h("dl","","dt dd");h("a","href target rel media hreflang type",a);h("q","cite",a);h("ins del","cite datetime",f);h("img","src alt usemap ismap width height");h("iframe","src name width height",f);h("embed","src type width height");h("object","data type typemustmatch name usemap form width height",f,"param");h("param","name value");h("map","name",f,"area");h("area","alt coords shape href target rel media hreflang type");h("table","border","caption colgroup thead tfoot tbody tr"+(e=="html4"?" col":""));h("colgroup","span","col");h("col","span");h("tbody thead tfoot","","tr");h("tr","","td th");h("td","colspan rowspan headers",f);h("th","colspan rowspan headers scope abbr",f);h("form","accept-charset action autocomplete enctype method name novalidate target",f);h("fieldset","disabled form name",f,"legend");h("label","form for",a);h("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");h("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value",e=="html4"?f:a);h("select","disabled form multiple name required size","option optgroup");h("optgroup","disabled label","option");h("option","disabled label selected value");h("textarea","cols dirname disabled form maxlength name readonly required rows wrap");h("menu","type label",f,"li");h("noscript","",f);if(e!="html4"){h("wbr");h("ruby","",a,"rt rp");h("figcaption","",f);h("mark rt rp summary bdi","",a);h("canvas","width height",f);h("video","src crossorigin poster preload autoplay mediagroup loop "+"muted controls width height",f,"track source");h("audio","src crossorigin preload autoplay mediagroup loop muted controls",f,"track source");h("source","src type media");h("track","kind src srclang label default");h("datalist","",a,"option");h("article section nav aside header footer","",f);h("hgroup","","h1 h2 h3 h4 h5 h6");h("figure","",f,"figcaption");h("time","datetime",a);h("dialog","open",f);h("command","type label icon disabled checked radiogroup command");h("output","for form name",a);h("progress","value max",a);h("meter","value min max low high optimum",a);h("details","open",f,"summary");h("keygen","autofocus challenge disabled form keytype name")}if(e!="html5-strict"){p("script","language xml:space");p("style","xml:space");p("object","declare classid codebase codetype archive standby align border hspace vspace");p("param","valuetype type");p("a","charset name rev shape coords");p("br","clear");p("applet","codebase archive code object alt name width height align hspace vspace");p("img","name longdesc align border hspace vspace");p("iframe","longdesc frameborder marginwidth marginheight scrolling align");p("font basefont","size color face");p("input","usemap align");p("select","onchange");p("textarea");p("h1 h2 h3 h4 h5 h6 div p legend caption","align");p("ul","type compact");p("li","type");p("ol dl menu dir","compact");p("pre","width xml:space");p("hr","align noshade size width");p("isindex","prompt");p("table","summary width frame rules cellspacing cellpadding align bgcolor");p("col","width align char charoff valign");p("colgroup","width align char charoff valign");p("thead","align char charoff valign");p("tr","align char charoff valign bgcolor");p("th","axis align char charoff valign nowrap bgcolor width height");p("form","accept");p("td","abbr axis scope align char charoff valign nowrap bgcolor width height");p("tfoot","align char charoff valign");p("tbody","align char charoff valign");p("area","nohref");p("body","background bgcolor text link vlink alink")}if(e!="html4"){p("input button select textarea","autofocus");p("input textarea","placeholder");p("a","download");p("link script img","crossorigin");p("iframe","srcdoc sandbox seamless allowfullscreen")}r(u("a form meter progress dfn"),function(e){if(n[e]){delete n[e].children[e]}});delete n.caption.children.table;t[e]=n;return n}var t={};var n=e.makeMap,r=e.each,i=e.extend,s=e.explode,o=e.inArray;return function(e){function T(r,s,o){var u=e[r];if(!u){u=t[r];if(!u){u=n(s," ",n(s.toUpperCase()," "));u=i(u,o);t[r]=u}}else{u=n(u,",",n(u.toUpperCase()," "))}return u}function N(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")}function C(e){var t,r,i,s,a,f,c,p,d,v,m,g,y,b,w,E,S,x,T,C=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,k=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,L=/[*?+]/;if(e){e=u(e,",");if(l["@"]){E=l["@"].attributes;S=l["@"].attributesOrder}for(t=0,r=e.length;t<r;t++){a=C.exec(e[t]);if(a){b=a[1];d=a[2];w=a[3];p=a[5];g={};y=[];f={attributes:g,attributesOrder:y};if(b==="#"){f.paddEmpty=true}if(b==="-"){f.removeEmpty=true}if(a[4]==="!"){f.removeEmptyAttrs=true}if(E){for(x in E){g[x]=E[x]}y.push.apply(y,S)}if(p){p=u(p,"|");for(i=0,s=p.length;i<s;i++){a=k.exec(p[i]);if(a){c={};m=a[1];v=a[2].replace(/::/g,":");b=a[3];T=a[4];if(m==="!"){f.attributesRequired=f.attributesRequired||[];f.attributesRequired.push(v);c.required=true}if(m==="-"){delete g[v];y.splice(o(y,v),1);continue}if(b){if(b==="="){f.attributesDefault=f.attributesDefault||[];f.attributesDefault.push({name:v,value:T});c.defaultValue=T}if(b===":"){f.attributesForced=f.attributesForced||[];f.attributesForced.push({name:v,value:T});c.forcedValue=T}if(b==="<"){c.validValues=n(T,"?")}}if(L.test(v)){f.attributePatterns=f.attributePatterns||[];c.pattern=N(v);f.attributePatterns.push(c)}else{if(!g[v]){y.push(v)}g[v]=c}}}}if(!E&&d=="@"){E=g;S=y}if(w){f.outputName=d;l[w]=f}if(L.test(d)){f.pattern=N(d);h.push(f)}else{l[d]=f}}}}}function k(e){l={};h=[];C(e);r(d,function(e,t){c[t]=e.children})}function L(e){var t=/^(~)?(.+)$/;if(e){r(u(e,","),function(e){var n=t.exec(e),s=n[1]==="~",o=s?"span":"div",u=n[2];c[u]=c[o];S[u]=o;if(!s){b[u.toUpperCase()]={};b[u]={}}if(!l[u]){var a=l[o];a=i({},a);delete a.removeEmptyAttrs;delete a.removeEmpty;l[u]=a}r(c,function(e){if(e[o]){e[u]=e[o]}})})}}function A(e){var t=/^([+\-]?)(\w+)\[([^\]]+)\]$/;if(e){r(u(e,","),function(e){var n=t.exec(e),i,s;if(n){s=n[1];if(s){i=c[n[2]]}else{i=c[n[2]]={"#comment":{}}}i=c[n[2]];r(u(n[3],"|"),function(e){if(s==="-"){delete i[e]}else{i[e]={}}})}})}}function O(e){var t=l[e],n;if(t){return t}n=h.length;while(n--){t=h[n];if(t.pattern.test(e)){return t}}}var f=this,l={},c={},h=[],p,d;var v,m,g,y;var b,w,E,S={},x={};e=e||{};d=a(e.schema);if(e.verify_html===false){e.valid_elements="*[*]"}if(e.valid_styles){p={};r(e.valid_styles,function(e,t){p[t]=s(e)})}v=T("whitespace_elements","pre script noscript style textarea video audio iframe object");m=T("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr");g=T("short_ended_elements","area base basefont br col frame hr img input isindex link "+"meta param embed source wbr track");y=T("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize "+"noshade nowrap readonly selected autoplay loop controls");w=T("non_empty_elements","td th iframe video audio object script",g);E=T("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");b=T("block_elements","hr table tbody thead tfoot "+"th tr td li ol ul caption dl dt dd noscript menu isindex samp option "+"datalist select optgroup",E);r((e.special||"script noscript style textarea").split(" "),function(e){x[e]=new RegExp("</"+e+"[^>]*>","gi")});if(!e.valid_elements){r(d,function(e,t){l[t]={attributes:e.attributes,attributesOrder:e.attributesOrder};c[t]=e.children});if(e.schema!="html5"){r(u("strong/b em/i"),function(e){e=u(e,"/");l[e[1]].outputName=e[0]})}l.img.attributesDefault=[{name:"alt",value:""}];r(u("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(e){if(l[e]){l[e].removeEmpty=true}});r(u("p h1 h2 h3 h4 h5 h6 th td pre div address caption"),function(e){l[e].paddEmpty=true});r(u("span"),function(e){l[e].removeEmptyAttrs=true})}else{k(e.valid_elements)}L(e.custom_elements);A(e.valid_children);C(e.extended_valid_elements);A("+ol[ul|ol],+ul[ul|ol]");if(e.invalid_elements){r(s(e.invalid_elements),function(e){if(l[e]){delete l[e]}})}if(!O("span")){C("span[!data-mce-type|*]")}f.children=c;f.styles=p;f.getBoolAttrs=function(){return y};f.getBlockElements=function(){return b};f.getTextBlockElements=function(){return E};f.getShortEndedElements=function(){return g};f.getSelfClosingElements=function(){return m};f.getNonEmptyElements=function(){return w};f.getWhiteSpaceElements=function(){return v};f.getSpecialElements=function(){return x};f.isValidChild=function(e,t){var n=c[e];return!!(n&&n[t])};f.isValid=function(e,t){var n,r,i=O(e);if(i){if(t){if(i.attributes[t]){return true}n=i.attributePatterns;if(n){r=n.length;while(r--){if(n[r].pattern.test(e)){return true}}}}else{return true}}return false};f.getElementRule=O;f.getCustomElements=function(){return S};f.addValidElements=C;f.setValidElements=k;f.addCustomElements=L;f.addValidChildren=A;f.elements=l}});i("tinymce/html/SaxParser",["tinymce/html/Schema","tinymce/html/Entities","tinymce/util/Tools"],function(e,t,n){var r=n.each;return function(i,s){var o=this,u=function(){};i=i||{};o.schema=s=s||new e;if(i.fix_self_closing!==false){i.fix_self_closing=true}r("comment cdata text start end pi doctype".split(" "),function(e){if(e){o[e]=i[e]||u}});o.parse=function(e){function R(e){var t,n;t=l.length;while(t--){if(l[t].name===e){break}}if(t>=0){for(n=l.length-1;n>=t;n--){e=l[n];if(e.valid){r.end(e.name)}}l.length=t}}function U(e,t,n,r,s){var o,u,a=/[\s\u0000-\u001F]+/g;t=t.toLowerCase();n=t in y?t:j(n||r||s||"");if(w&&!v&&t.indexOf("data-")!==0){o=N[t];if(!o&&C){u=C.length;while(u--){o=C[u];if(o.pattern.test(t)){break}}if(u===-1){o=null}}if(!o){return}if(o.validValues&&!(n in o.validValues)){return}}if(I[t]&&!i.allow_script_urls){var f=n.replace(a,"");try{f=decodeURIComponent(f);if(q.test(f)){return}}catch(l){f=unescape(f);if(q.test(f)){return}}}c.map[t]=n;c.push({name:t,value:n})}var r=this,o,u=0,a,f,l=[],c,h,p,d;var v,m,g,y,b;var w,E,S,x,T,N,C;var k,L,A;var O,M,_,D,P,H,B=0;var j=t.decode,F,I=n.makeMap("src,href");var q=/(java|vb)script:/i;_=new RegExp("<(?:"+"(?:!--([\\w\\W]*?)-->)|"+"(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|"+"(?:!DOCTYPE([\\w\\W]*?)>)|"+"(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|"+"(?:\\/([^>]+)>)|"+"(?:([A-Za-z0-9\\-\\:\\.]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>)"+")","g");D=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g;g=s.getShortEndedElements();M=i.self_closing_elements||s.getSelfClosingElements();y=s.getBoolAttrs();w=i.validate;m=i.remove_internals;F=i.fix_self_closing;P=s.getSpecialElements();while(o=_.exec(e)){if(u<o.index){r.text(j(e.substr(u,o.index-u)))}if(a=o[6]){a=a.toLowerCase();if(a.charAt(0)===":"){a=a.substr(1)}R(a)}else if(a=o[7]){a=a.toLowerCase();if(a.charAt(0)===":"){a=a.substr(1)}b=a in g;if(F&&M[a]&&l.length>0&&l[l.length-1].name===a){R(a)}if(!w||(E=s.getElementRule(a))){S=true;if(w){N=E.attributes;C=E.attributePatterns}if(T=o[8]){v=T.indexOf("data-mce-type")!==-1;if(v&&m){S=false}c=[];c.map={};T.replace(D,U)}else{c=[];c.map={}}if(w&&!v){k=E.attributesRequired;L=E.attributesDefault;A=E.attributesForced;O=E.removeEmptyAttrs;if(O&&!c.length){S=false}if(A){h=A.length;while(h--){x=A[h];d=x.name;H=x.value;if(H==="{$uid}"){H="mce_"+B++}c.map[d]=H;c.push({name:d,value:H})}}if(L){h=L.length;while(h--){x=L[h];d=x.name;if(!(d in c.map)){H=x.value;if(H==="{$uid}"){H="mce_"+B++}c.map[d]=H;c.push({name:d,value:H})}}}if(k){h=k.length;while(h--){if(k[h]in c.map){break}}if(h===-1){S=false}}if(c.map["data-mce-bogus"]){S=false}}if(S){r.start(a,c,b)}}else{S=false}if(f=P[a]){f.lastIndex=u=o.index+o[0].length;if(o=f.exec(e)){if(S){p=e.substr(u,o.index-u)}u=o.index+o[0].length}else{p=e.substr(u);u=e.length}if(S){if(p.length>0){r.text(p,true)}r.end(a)}_.lastIndex=u;continue}if(!b){if(!T||T.indexOf("/")!=T.length-1){l.push({name:a,valid:S})}else if(S){r.end(a)}}}else if(a=o[1]){if(a.charAt(0)===">"){a=" "+a}if(!i.allow_conditional_comments&&a.substr(0,3)==="[if"){a=" "+a}r.comment(a)}else if(a=o[2]){r.cdata(a)}else if(a=o[3]){r.doctype(a)}else if(a=o[4]){r.pi(a,o[5])}u=o.index+o[0].length}if(u<e.length){r.text(j(e.substr(u)))}for(h=l.length-1;h>=0;h--){a=l[h];if(a.valid){r.end(a.name)}}}}});i("tinymce/html/DomParser",["tinymce/html/Node","tinymce/html/Schema","tinymce/html/SaxParser","tinymce/util/Tools"],function(e,t,n,r){var i=r.makeMap,s=r.each,o=r.explode,u=r.extend;return function(r,a){function d(t){var n,r,s,o,u,l,c,h,p;var d,v,m,g,y;v=i("tr,td,th,tbody,thead,tfoot,table");d=a.getNonEmptyElements();m=a.getTextBlockElements();for(n=0;n<t.length;n++){r=t[n];if(!r.parent||r.fixed){continue}if(m[r.name]&&r.parent.name=="li"){g=r.next;while(g){if(m[g.name]){g.name="li";g.fixed=true;r.parent.insert(g,r.parent)}else{break}g=g.next}r.unwrap(r);continue}o=[r];for(s=r.parent;s&&!a.isValidChild(s.name,r.name)&&!v[s.name];s=s.parent){o.push(s)}if(s&&o.length>1){o.reverse();u=l=f.filterNode(o[0].clone());for(p=0;p<o.length-1;p++){if(a.isValidChild(l.name,o[p].name)){c=f.filterNode(o[p].clone());l.append(c)}else{c=l}for(h=o[p].firstChild;h&&h!=o[p+1];){y=h.next;c.append(h);h=y}l=c}if(!u.isEmpty(d)){s.insert(u,o[0],true);s.insert(r,u)}else{s.insert(r,o[0],true)}s=o[0];if(s.isEmpty(d)||s.firstChild===s.lastChild&&s.firstChild.name==="br"){s.empty().remove()}}else if(r.parent){if(r.name==="li"){g=r.prev;if(g&&(g.name==="ul"||g.name==="ul")){g.append(r);continue}g=r.next;if(g&&(g.name==="ul"||g.name==="ul")){g.insert(r,g.firstChild,true);continue}r.wrap(f.filterNode(new e("ul",1)));continue}if(a.isValidChild(r.parent.name,"div")&&a.isValidChild("div",r.name)){r.wrap(f.filterNode(new e("div",1)))}else{if(r.name==="style"||r.name==="script"){r.empty().remove()}else{r.unwrap()}}}}}var f=this,l={},c=[],h={},p={};r=r||{};r.validate="validate"in r?r.validate:true;r.root_name=r.root_name||"body";f.schema=a=a||new t;f.filterNode=function(e){var t,n,r;if(n in l){r=h[n];if(r){r.push(e)}else{h[n]=[e]}}t=c.length;while(t--){n=c[t].name;if(n in e.attributes.map){r=p[n];if(r){r.push(e)}else{p[n]=[e]}}}return e};f.addNodeFilter=function(e,t){s(o(e),function(e){var n=l[e];if(!n){l[e]=n=[]}n.push(t)})};f.addAttributeFilter=function(e,t){s(o(e),function(e){var n;for(n=0;n<c.length;n++){if(c[n].name===e){c[n].callbacks.push(t);return}}c.push({name:e,callbacks:[t]})})};f.parse=function(t,s){function H(){function i(t){if(t){e=t.firstChild;if(e&&e.type==3){e.value=e.value.replace(N,"")}e=t.lastChild;if(e&&e.type==3){e.value=e.value.replace(L,"")}}}var e=f.firstChild,t,n;if(!a.isValidChild(f.name,P.toLowerCase())){return}while(e){t=e.next;if(e.type==3||e.type==1&&e.name!=="p"&&!T[e.name]&&!e.attr("data-mce-type")){if(!n){n=B(P,1);n.attr(r.forced_root_block_attrs);f.insert(n,e);n.append(e)}else{n.append(e)}}else{i(n);n=null}e=t}i(n)}function B(t,n){var r=new e(t,n),i;if(t in l){i=h[t];if(i){i.push(r)}else{h[t]=[r]}}return r}function j(e){var t,n,r;for(t=e.prev;t&&t.type===3;){n=t.value.replace(L,"");if(n.length>0){t.value=n;t=t.prev}else{r=t.prev;t.remove();t=r}}}function F(e){var t,n={};for(t in e){if(t!=="li"&&t!="p"){n[t]=e[t]}}return n}var o,f,v,m,g,y,b,w,E,S,x;var T,N,C=[],k;var L,A,O,M;var _,D,P;s=s||{};h={};p={};T=u(i("script,style,head,html,body,title,meta,param"),a.getBlockElements());D=a.getNonEmptyElements();_=a.children;x=r.validate;P="forced_root_block"in s?s.forced_root_block:r.forced_root_block;M=a.getWhiteSpaceElements();N=/^[ \t\r\n]+/;L=/[ \t\r\n]+$/;A=/[ \t\r\n]+/g;O=/^[ \t\r\n]+$/;o=new n({validate:x,allow_script_urls:r.allow_script_urls,allow_conditional_comments:r.allow_conditional_comments,self_closing_elements:F(a.getSelfClosingElements()),cdata:function(e){v.append(B("#cdata",4)).value=e},text:function(e,t){var n;if(!k){e=e.replace(A," ");if(v.lastChild&&T[v.lastChild.name]){e=e.replace(N,"")}}if(e.length!==0){n=B("#text",3);n.raw=!!t;v.append(n).value=e}},comment:function(e){v.append(B("#comment",8)).value=e},pi:function(e,t){v.append(B(e,7)).value=t;j(v)},doctype:function(e){var t;t=v.append(B("#doctype",10));t.value=e;j(v)},start:function(e,t,n){var r,i,s,o,u;s=x?a.getElementRule(e):{};if(s){r=B(s.outputName||e,1);r.attributes=t;r.shortEnded=n;v.append(r);u=_[v.name];if(u&&_[r.name]&&!u[r.name]){C.push(r)}i=c.length;while(i--){o=c[i].name;if(o in t.map){E=p[o];if(E){E.push(r)}else{p[o]=[r]}}}if(T[e]){j(r)}if(!n){v=r}if(!k&&M[e]){k=true}}},end:function(t){var n,r,i,s,o;r=x?a.getElementRule(t):{};if(r){if(T[t]){if(!k){n=v.firstChild;if(n&&n.type===3){i=n.value.replace(N,"");if(i.length>0){n.value=i;n=n.next}else{s=n.next;n.remove();n=s;while(n&&n.type===3){i=n.value;s=n.next;if(i.length===0||O.test(i)){n.remove();n=s}n=s}}}n=v.lastChild;if(n&&n.type===3){i=n.value.replace(L,"");if(i.length>0){n.value=i;n=n.prev}else{s=n.prev;n.remove();n=s;while(n&&n.type===3){i=n.value;s=n.prev;if(i.length===0||O.test(i)){n.remove();n=s}n=s}}}}}if(k&&M[t]){k=false}if(r.removeEmpty||r.paddEmpty){if(v.isEmpty(D)){if(r.paddEmpty){v.empty().append(new e("#text","3")).value=" "}else{if(!v.attributes.map.name&&!v.attributes.map.id){o=v.parent;v.empty().remove();v=o;return}}}}v=v.parent}}},a);f=v=new e(s.context||r.root_name,11);o.parse(t);if(x&&C.length){if(!s.context){d(C)}else{s.invalid=true}}if(P&&(f.name=="body"||s.isRootContent)){H()}if(!s.invalid){for(S in h){E=l[S];m=h[S];b=m.length;while(b--){if(!m[b].parent){m.splice(b,1)}}for(g=0,y=E.length;g<y;g++){E[g](m,S,s)}}for(g=0,y=c.length;g<y;g++){E=c[g];if(E.name in p){m=p[E.name];b=m.length;while(b--){if(!m[b].parent){m.splice(b,1)}}for(b=0,w=E.callbacks.length;b<w;b++){E.callbacks[b](m,E.name,s)}}}}return f};if(r.remove_trailing_brs){f.addNodeFilter("br",function(t){var n,r=t.length,i,s=u({},a.getBlockElements());var o=a.getNonEmptyElements(),f,l,c,h;var p,d;s.body=1;for(n=0;n<r;n++){i=t[n];f=i.parent;if(s[i.parent.name]&&i===f.lastChild){c=i.prev;while(c){h=c.name;if(h!=="span"||c.attr("data-mce-type")!=="bookmark"){if(h!=="br"){break}if(h==="br"){i=null;break}}c=c.prev}if(i){i.remove();if(f.isEmpty(o)){p=a.getElementRule(f.name);if(p){if(p.removeEmpty){f.remove()}else if(p.paddEmpty){f.empty().append(new e("#text",3)).value=" "}}}}}else{l=i;while(f&&f.firstChild===l&&f.lastChild===l){l=f;if(s[f.name]){break}f=f.parent}if(l===f){d=new e("#text",3);d.value=" ";i.replace(d)}}}})}if(!r.allow_html_in_named_anchor){f.addAttributeFilter("id,name",function(e){var t=e.length,n,r,i,s;while(t--){s=e[t];if(s.name==="a"&&s.firstChild&&!s.attr("href")){i=s.parent;n=s.lastChild;do{r=n.prev;i.insert(n,s);n=r}while(n)}}})}}});i("tinymce/html/Writer",["tinymce/html/Entities","tinymce/util/Tools"],function(e,t){var n=t.makeMap;return function(t){var r=[],i,s,o,u,a;t=t||{};i=t.indent;s=n(t.indent_before||"");o=n(t.indent_after||"");u=e.getEncodeFunc(t.entity_encoding||"raw",t.entities);a=t.element_format=="html";return{start:function(e,t,n){var f,l,c,h;if(i&&s[e]&&r.length>0){h=r[r.length-1];if(h.length>0&&h!=="\n"){r.push("\n")}}r.push("<",e);if(t){for(f=0,l=t.length;f<l;f++){c=t[f];r.push(" ",c.name,'="',u(c.value,true),'"')}}if(!n||a){r[r.length]=">"}else{r[r.length]=" />"}if(n&&i&&o[e]&&r.length>0){h=r[r.length-1];if(h.length>0&&h!=="\n"){r.push("\n")}}},end:function(e){var t;r.push("</",e,">");if(i&&o[e]&&r.length>0){t=r[r.length-1];if(t.length>0&&t!=="\n"){r.push("\n")}}},text:function(e,t){if(e.length>0){r[r.length]=t?e:u(e)}},cdata:function(e){r.push("<![CDATA[",e,"]]>")},comment:function(e){r.push("<!--",e,"-->")},pi:function(e,t){if(t){r.push("<?",e," ",t,"?>")}else{r.push("<?",e,"?>")}if(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$/,"")}}}});i("tinymce/html/Serializer",["tinymce/html/Writer","tinymce/html/Schema"],function(e,t){return function(n,r){var i=this,s=new e(n);n=n||{};n.validate="validate"in n?n.validate:true;i.schema=r=r||new t;i.writer=s;i.serialize=function(e){function o(e){var n=t[e.type],u,a,f,l,c,h,p,d,v;if(!n){u=e.name;a=e.shortEnded;f=e.attributes;if(i&&f&&f.length>1){h=[];h.map={};v=r.getElementRule(e.name);for(p=0,d=v.attributesOrder.length;p<d;p++){l=v.attributesOrder[p];if(l in f.map){c=f.map[l];h.map[l]=c;h.push({name:l,value:c})}}for(p=0,d=f.length;p<d;p++){l=f[p].name;if(!(l in h.map)){c=f.map[l];h.map[l]=c;h.push({name:l,value:c})}}f=h}s.start(e.name,f,a);if(!a){if(e=e.firstChild){do{o(e)}while(e=e.next)}s.end(u)}}else{n(e)}}var t,i;i=n.validate;t={3:function(e){s.text(e.value,e.raw)},8:function(e){s.comment(e.value)},7:function(e){s.pi(e.name,e.value)},10:function(e){s.doctype(e.value)},4:function(e){s.cdata(e.value)},11:function(e){if(e=e.firstChild){do{o(e)}while(e=e.next)}}};s.reset();if(e.type==1&&!n.inner){o(e)}else{t[11](e)}return s.getContent()}}});i("tinymce/dom/Serializer",["tinymce/dom/DOMUtils","tinymce/html/DomParser","tinymce/html/Entities","tinymce/html/Serializer","tinymce/html/Node","tinymce/html/Schema","tinymce/Env","tinymce/util/Tools"],function(e,t,n,r,i,s,o,u){var a=u.each,f=u.trim;var l=e.DOM;return function(e,i){var u,c,h;if(i){u=i.dom;c=i.schema}u=u||l;c=c||new s(e);e.entity_encoding=e.entity_encoding||"named";e.remove_trailing_brs="remove_trailing_brs"in e?e.remove_trailing_brs:true;h=new t(e,c);h.addAttributeFilter("src,href,style",function(t,n){var r=t.length,i,s,o="data-mce-"+n;var a=e.url_converter,f=e.url_converter_scope,l;while(r--){i=t[r];s=i.attributes.map[o];if(s!==l){i.attr(n,s.length>0?s:null);i.attr(o,null)}else{s=i.attributes.map[n];if(n==="style"){s=u.serializeStyle(u.parseStyle(s),i.name)}else if(a){s=a.call(f,s,n,i.name)}i.attr(n,s.length>0?s:null)}}});h.addAttributeFilter("class",function(e){var t=e.length,n,r;while(t--){n=e[t];r=n.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,"");n.attr("class",r.length>0?r:null)}});h.addAttributeFilter("data-mce-type",function(e,t,n){var r=e.length,i;while(r--){i=e[r];if(i.attributes.map["data-mce-type"]==="bookmark"&&!n.cleanup){i.remove()}}});h.addAttributeFilter("data-mce-expando",function(e,t){var n=e.length;while(n--){e[n].attr(t,null)}});h.addNodeFilter("noscript",function(e){var t=e.length,r;while(t--){r=e[t].firstChild;if(r){r.value=n.decode(r.value)}}});h.addNodeFilter("script,style",function(e,t){function s(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,"")}var n=e.length,r,i;while(n--){r=e[n];i=r.firstChild?r.firstChild.value:"";if(t==="script"){var o=(r.attr("type")||"text/javascript").replace(/^mce\-/,"");r.attr("type",o==="text/javascript"?null:o);if(i.length>0){r.firstChild.value="// <![CDATA[\n"+s(i)+"\n// ]]>"}}else{if(i.length>0){r.firstChild.value="<!--\n"+s(i)+"\n-->"}}}});h.addNodeFilter("#comment",function(e){var t=e.length,n;while(t--){n=e[t];if(n.value.indexOf("[CDATA[")===0){n.name="#cdata";n.type=4;n.value=n.value.replace(/^\[CDATA\[|\]\]$/g,"")}else if(n.value.indexOf("mce:protected ")===0){n.name="#text";n.type=3;n.raw=true;n.value=unescape(n.value).substr(14)}}});h.addNodeFilter("xml:namespace,input",function(e,t){var n=e.length,r;while(n--){r=e[n];if(r.type===7){r.remove()}else if(r.type===1){if(t==="input"&&!("type"in r.attributes.map)){r.attr("type","text")}}}});if(e.fix_list_elements){h.addNodeFilter("ul,ol",function(e){var t=e.length,n,r;while(t--){n=e[t];r=n.parent;if(r.name==="ul"||r.name==="ol"){if(n.prev&&n.prev.name==="li"){n.prev.append(n)}}}})}h.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected",function(e,t){var n=e.length;while(n--){e[n].attr(t,null)}});return{schema:c,addNodeFilter:h.addNodeFilter,addAttributeFilter:h.addAttributeFilter,serialize:function(t,n){var i=this,s,l,p,d,v;if(o.ie&&u.select("script,style,select,map").length>0){v=t.innerHTML;t=t.cloneNode(false);u.setHTML(t,v)}else{t=t.cloneNode(true)}s=t.ownerDocument.implementation;if(s.createHTMLDocument){l=s.createHTMLDocument("");a(t.nodeName=="BODY"?t.childNodes:[t],function(e){l.body.appendChild(l.importNode(e,true))});if(t.nodeName!="BODY"){t=l.body.firstChild}else{t=l.body}p=u.doc;u.doc=l}n=n||{};n.format=n.format||"html";if(n.selection){n.forced_root_block=""}if(!n.no_events){n.node=t;i.onPreProcess(n)}d=new r(e,c);n.content=d.serialize(h.parse(f(n.getInner?t.innerHTML:u.getOuterHTML(t)),n));if(!n.cleanup){n.content=n.content.replace(/\uFEFF/g,"")}if(!n.no_events){i.onPostProcess(n)}if(p){u.doc=p}n.node=null;return n.content},addRules:function(e){c.addValidElements(e)},setRules:function(e){c.setValidElements(e)},onPreProcess:function(e){if(i){i.fire("PreProcess",e)}},onPostProcess:function(e){if(i){i.fire("PostProcess",e)}}}}});i("tinymce/dom/TridentSelection",[],function(){function e(e){function i(t,n){var r,i=0,s,o,u,a,f,l,c=-1,h;r=t.duplicate();r.collapse(n);h=r.parentElement();if(h.ownerDocument!==e.dom.doc){return}while(h.contentEditable==="false"){h=h.parentNode}if(!h.hasChildNodes()){return{node:h,inside:1}}u=h.children;s=u.length-1;while(i<=s){l=Math.floor((i+s)/2);a=u[l];r.moveToElementText(a);c=r.compareEndPoints(n?"StartToStart":"EndToEnd",t);if(c>0){s=l-1}else if(c<0){i=l+1}else{return{node:a}}}if(c<0){if(!a){r.moveToElementText(h);r.collapse(true);a=h;o=true}else{r.collapse(false)}f=0;while(r.compareEndPoints(n?"StartToStart":"StartToEnd",t)!==0){if(r.move("character",1)===0||h!=r.parentElement()){break}f++}}else{r.collapse(true);f=0;while(r.compareEndPoints(n?"StartToStart":"StartToEnd",t)!==0){if(r.move("character",-1)===0||h!=r.parentElement()){break}f++}}return{node:a,position:c,offset:f,inside:o}}function s(){function c(e){var t=i(r,e),n,o,u=0,a,f,l;n=t.node;o=t.offset;if(t.inside&&!n.hasChildNodes()){s[e?"setStart":"setEnd"](n,0);return}if(o===f){s[e?"setStartBefore":"setEndAfter"](n);return}if(t.position<0){a=t.inside?n.firstChild:n.nextSibling;if(!a){s[e?"setStartAfter":"setEndAfter"](n);return}if(!o){if(a.nodeType==3){s[e?"setStart":"setEnd"](a,0)}else{s[e?"setStartBefore":"setEndBefore"](a)}return}while(a){l=a.nodeValue;u+=l.length;if(u>=o){n=a;u-=o;u=l.length-u;break}a=a.nextSibling}}else{a=n.previousSibling;if(!a){return s[e?"setStartBefore":"setEndBefore"](n)}if(!o){if(n.nodeType==3){s[e?"setStart":"setEnd"](a,n.nodeValue.length)}else{s[e?"setStartAfter":"setEndAfter"](a)}return}while(a){u+=a.nodeValue.length;if(u>=o){n=a;u-=o;break}a=a.previousSibling}}s[e?"setStart":"setEnd"](n,u)}var r=e.getRng(),s=n.createRng(),o,u,a,f,l;o=r.item?r.item(0):r.parentElement();if(o.ownerDocument!=n.doc){return s}u=e.isCollapsed();if(r.item){s.setStart(o.parentNode,n.nodeIndex(o));s.setEnd(s.startContainer,s.startOffset+1);return s}try{c(true);if(!u){c()}}catch(h){if(h.number==-2147024809){l=t.getBookmark(2);a=r.duplicate();a.collapse(true);o=a.parentElement();if(!u){a=r.duplicate();a.collapse(false);f=a.parentElement();f.innerHTML=f.innerHTML}o.innerHTML=o.innerHTML;t.moveToBookmark(l);r=e.getRng();c(true);if(!u){c()}}else{throw h}}return s}var t=this,n=e.dom,r=false;this.getBookmark=function(t){function o(e){var t,r,i,s,o=[];t=e.parentNode;r=n.getRoot().parentNode;while(t!=r&&t.nodeType!==9){i=t.children;s=i.length;while(s--){if(e===i[s]){o.push(s);break}}e=t;t=t.parentNode}return o}function u(e){var t;t=i(r,e);if(t){return{position:t.position,offset:t.offset,indexes:o(t.node),inside:t.inside}}}var r=e.getRng(),s={};if(t===2){if(!r.item){s.start=u(true);if(!e.isCollapsed()){s.end=u()}}else{s.start={ctrl:true,indexes:o(r.item(0))}}}return s};this.moveToBookmark=function(e){function i(e){var t,r,i,s;t=n.getRoot();for(r=e.length-1;r>=0;r--){s=t.children;i=e[r];if(i<=s.length-1){t=s[i]}}return t}function s(n){var s=e[n?"start":"end"],o,u,a,f;if(s){o=s.position>0;u=r.createTextRange();u.moveToElementText(i(s.indexes));f=s.offset;if(f!==a){u.collapse(s.inside||o);u.moveStart("character",o?-f:f)}else{u.collapse(n)}t.setEndPoint(n?"StartToStart":"EndToStart",u);if(n){t.collapse(true)}}}var t,r=n.doc.body;if(e.start){if(e.start.ctrl){t=r.createControlRange();t.addElement(i(e.start.indexes));t.select()}else{t=r.createTextRange();s(true);s();t.select()}}};this.addRange=function(t){function v(e){var t,s,l,p,d;l=n.create("a");t=e?o:a;s=e?u:f;p=i.duplicate();if(t==c||t==c.documentElement){t=h;s=0}if(t.nodeType==3){t.parentNode.insertBefore(l,t);p.moveToElementText(l);p.moveStart("character",s);n.remove(l);i.setEndPoint(e?"StartToStart":"EndToEnd",p)}else{d=t.childNodes;if(d.length){if(s>=d.length){n.insertAfter(l,d[d.length-1])}else{t.insertBefore(l,d[s])}p.moveToElementText(l)}else if(t.canHaveHTML){t.innerHTML="<span>&#xFEFF;</span>";l=t.firstChild;p.moveToElementText(l);p.collapse(r)}i.setEndPoint(e?"StartToStart":"EndToEnd",p);n.remove(l)}}var i,s,o,u,a,f,l,c=e.dom.doc,h=c.body,p,d;o=t.startContainer;u=t.startOffset;a=t.endContainer;f=t.endOffset;i=h.createTextRange();if(o==a&&o.nodeType==1){if(u==f&&!o.hasChildNodes()){if(o.canHaveHTML){l=o.previousSibling;if(l&&!l.hasChildNodes()&&n.isBlock(l)){l.innerHTML="&#xFEFF;"}else{l=null}o.innerHTML="<span>&#xFEFF;</span><span>&#xFEFF;</span>";i.moveToElementText(o.lastChild);i.select();n.doc.selection.clear();o.innerHTML="";if(l){l.innerHTML=""}return}else{u=n.nodeIndex(o);o=o.parentNode}}if(u==f-1){try{d=o.childNodes[u];s=h.createControlRange();s.addElement(d);s.select();p=e.getRng();if(p.item&&d===p.item(0)){return}}catch(m){}}}v(true);v();i.select()};this.getRangeAt=s}return e});i("tinymce/util/VK",["tinymce/Env"],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}}});i("tinymce/dom/ControlSelection",["tinymce/util/VK","tinymce/util/Tools","tinymce/Env"],function(e,t,n){return function(r,i){function C(e){if(i.settings.object_resizing===false){return false}if(!/TABLE|IMG|DIV/.test(e.nodeName)){return false}if(e.getAttribute("data-mce-resize")==="false"){return false}return true}function k(t){var n,r;n=t.screenX-h;r=t.screenY-p;w=n*l[2]+m;E=r*l[3]+g;w=w<5?5:w;E=E<5?5:E;if(e.modifierPressed(t)||u.nodeName=="IMG"&&l[2]*l[3]!==0){w=Math.round(E/y);E=Math.round(w*y)}s.setStyles(a,{width:w,height:E});if(l[2]<0&&a.clientWidth<=w){s.setStyle(a,"left",d+(m-w))}if(l[3]<0&&a.clientHeight<=E){s.setStyle(a,"top",v+(g-E))}if(!b){i.fire("ObjectResizeStart",{target:u,width:m,height:g});b=true}}function L(){function e(e,t){if(t){if(u.style[e]||!i.schema.isValid(u.nodeName.toLowerCase(),e)){s.setStyle(u,e,t)}else{s.setAttrib(u,e,t)}}}b=false;e("width",w);e("height",E);s.unbind(S,"mousemove",k);s.unbind(S,"mouseup",L);if(x!=S){s.unbind(x,"mousemove",k);s.unbind(x,"mouseup",L)}s.remove(a);if(!T||u.nodeName=="TABLE"){A(u)}i.fire("ObjectResized",{target:u,width:w,height:E});i.nodeChanged()}function A(e,t,n){var r,c,T,N,A,M=i.getBody();r=s.getPos(e,M);d=r.x;v=r.y;A=e.getBoundingClientRect();c=A.width||A.right-A.left;T=A.height||A.bottom-A.top;if(u!=e){B();u=e;w=E=0}N=i.fire("ObjectSelected",{target:e});if(C(e)&&!N.isDefaultPrevented()){o(f,function(e,r){function w(t){b=true;h=t.screenX;p=t.screenY;m=u.clientWidth;g=u.clientHeight;y=g/m;l=e;a=u.cloneNode(true);s.addClass(a,"mce-clonedresizable");a.contentEditable=false;a.unSelectabe=true;s.setStyles(a,{left:d,top:v,margin:0});a.removeAttribute("data-mce-selected");i.getBody().appendChild(a);s.bind(S,"mousemove",k);s.bind(S,"mouseup",L);if(x!=S){s.bind(x,"mousemove",k);s.bind(x,"mouseup",L)}}var o,f;if(t){if(r==t){w(n)}return}o=s.get("mceResizeHandle"+r);if(!o){f=i.getBody();o=s.add(f,"div",{id:"mceResizeHandle"+r,"data-mce-bogus":true,"class":"mce-resizehandle",contentEditable:false,unSelectabe:true,style:"cursor:"+r+"-resize; margin:0; padding:0"});s.bind(o,"mousedown",function(e){e.preventDefault();w(e)})}else{s.show(o)}s.setStyles(o,{left:c*e[0]+d-o.offsetWidth/2,top:T*e[1]+v-o.offsetHeight/2})})}else{O()}u.setAttribute("data-mce-selected","1")}function O(){var e,t;if(u){u.removeAttribute("data-mce-selected")}for(e in f){t=s.get("mceResizeHandle"+e);if(t){s.unbind(t);s.remove(t)}}}function M(e){function n(e,t){if(e){do{if(e===t){return true}}while(e=e.parentNode)}}var t;o(s.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")});t=e.type=="mousedown"?e.target:r.getNode();t=s.getParent(t,T?"table":"table,img,hr");if(n(t,i.getBody())){j();if(n(r.getStart(),t)&&n(r.getEnd(),t)){if(!T||t!=r.getStart()&&r.getStart().nodeName!=="IMG"){A(t);return}}}O()}function _(e,t,n){if(e&&e.attachEvent){e.attachEvent("on"+t,n)}}function D(e,t,n){if(e&&e.detachEvent){e.detachEvent("on"+t,n)}}function P(e){var t=e.srcElement,n,r,s,o,u,a,h;n=t.getBoundingClientRect();a=c.clientX-n.left;h=c.clientY-n.top;for(r in f){s=f[r];o=t.offsetWidth*s[0];u=t.offsetHeight*s[1];if(Math.abs(o-a)<8&&Math.abs(u-h)<8){l=s;break}}b=true;i.getDoc().selection.empty();A(t,r,c)}function H(e){var t=e.srcElement;if(t!=u){B();if(t.id.indexOf("mceResizeHandle")===0){e.returnValue=false;return}if(t.nodeName=="IMG"||t.nodeName=="TABLE"){O();u=t;_(t,"resizestart",P)}}}function B(){D(u,"resizestart",P)}function j(){try{i.getDoc().execCommand("enableObjectResizing",false,false)}catch(e){}}function F(e){var t;if(!T){return}t=S.body.createControlRange();try{t.addElement(e);t.select();return true}catch(n){}}function I(){u=a=null;if(T){B();D(i.getBody(),"controlselect",H)}}var s=i.dom,o=t.each;var u,a,f,l,c;var h,p,d,v,m,g,y,b;var w,E,S=i.getDoc(),x=document,T=n.ie&&n.ie<11;f={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 N=".mce-content-body";i.contentStyles.push(N+" div.mce-resizehandle {"+"position: absolute;"+"border: 1px solid black;"+"background: #FFF;"+"width: 5px;"+"height: 5px;"+"z-index: 10000"+"}"+N+" .mce-resizehandle:hover {"+"background: #000"+"}"+N+" img[data-mce-selected], hr[data-mce-selected] {"+"outline: 1px solid black;"+"resize: none"+"}"+N+" .mce-clonedresizable {"+"position: absolute;"+(n.gecko?"":"outline: 1px dashed black;")+"opacity: .5;"+"filter: alpha(opacity=50);"+"z-index: 10000"+"}");i.on("init",function(){if(T){i.on("ObjectResized",function(e){if(e.target.nodeName!="TABLE"){O();F(e.target)}});_(i.getBody(),"controlselect",H);i.on("mousedown",function(e){c=e})}else{j();if(n.ie>=11){i.on("mouseup",function(e){var t=e.target.nodeName;if(/^(TABLE|IMG|HR)$/.test(t)){i.selection.select(e.target,t=="TABLE");i.nodeChanged()}});i.dom.bind(i.getBody(),"mscontrolselect",function(e){if(/^(TABLE|IMG|HR)$/.test(e.target.nodeName)){e.preventDefault()}})}}i.on("nodechange mousedown mouseup ResizeEditor",M);i.on("keydown keyup",function(e){if(u&&u.nodeName=="TABLE"){M(e)}})});return{isResizable:C,showResizeRect:A,hideResizeRect:O,updateResizeRect:M,controlSelect:F,destroy:I}}});i("tinymce/dom/Selection",["tinymce/dom/TreeWalker","tinymce/dom/TridentSelection","tinymce/dom/ControlSelection","tinymce/Env","tinymce/util/Tools"],function(e,n,r,i,s){function c(e,t,i,s){var o=this;o.dom=e;o.win=t;o.serializer=i;o.editor=s;o.controlSelection=new r(o,s);if(!o.win.getSelection){o.tridentSel=new n(o)}}var o=s.each,u=s.grep,a=s.trim;var f=i.ie,l=i.opera;c.prototype={setCursorLocation:function(e,t){var n=this,r=n.dom.createRng();if(!e){n._moveEndPoint(r,n.editor.getBody(),true);n.setRng(r)}else{r.setStart(e,t);r.setEnd(e,t);n.setRng(r);n.collapse(false)}},getContent:function(e){var n=this,r=n.getRng(),i=n.dom.create("body");var s=n.getSel(),o,u,a;e=e||{};o=u="";e.get=true;e.format=e.format||"html";e.selection=true;n.editor.fire("BeforeGetContent",e);if(e.format=="text"){return n.isCollapsed()?"":r.text||(s.toString?s.toString():"")}if(r.cloneContents){a=r.cloneContents();if(a){i.appendChild(a)}}else if(r.item!==t||r.htmlText!==t){i.innerHTML="<br>"+(r.item?r.item(0).outerHTML:r.htmlText);i.removeChild(i.firstChild)}else{i.innerHTML=r.toString()}if(/^\s/.test(i.innerHTML)){o=" "}if(/\s+$/.test(i.innerHTML)){u=" "}e.getInner=true;e.content=n.isCollapsed()?"":o+n.serializer.serialize(i,e)+u;n.editor.fire("GetContent",e);return e.content},setContent:function(e,t){var n=this,r=n.getRng(),i,s=n.win.document,o,u;t=t||{format:"html"};t.set=true;t.selection=true;e=t.content=e;if(!t.no_events){n.editor.fire("BeforeSetContent",t)}e=t.content;if(r.insertNode){e+='<span id="__caret">_</span>';if(r.startContainer==s&&r.endContainer==s){s.body.innerHTML=e}else{r.deleteContents();if(s.body.childNodes.length===0){s.body.innerHTML=e}else{if(r.createContextualFragment){r.insertNode(r.createContextualFragment(e))}else{o=s.createDocumentFragment();u=s.createElement("div");o.appendChild(u);u.outerHTML=e;r.insertNode(o)}}}i=n.dom.get("__caret");r=s.createRange();r.setStartBefore(i);r.setEndBefore(i);n.setRng(r);n.dom.remove("__caret");try{n.setRng(r)}catch(a){}}else{if(r.item){s.execCommand("Delete",false,null);r=n.getRng()}if(/^\s+/.test(e)){r.pasteHTML('<span id="__mce_tmp">_</span>'+e);n.dom.remove("__mce_tmp")}else{r.pasteHTML(e)}}if(!t.no_events){n.editor.fire("SetContent",t)}},getStart:function(){var e=this,t=e.getRng(),n,r,i,s;if(t.duplicate||t.item){if(t.item){return t.item(0)}i=t.duplicate();i.collapse(1);n=i.parentElement();if(n.ownerDocument!==e.dom.doc){n=e.dom.getRoot()}r=s=t.parentElement();while(s=s.parentNode){if(s==n){n=r;break}}return n}else{n=t.startContainer;if(n.nodeType==1&&n.hasChildNodes()){n=n.childNodes[Math.min(n.childNodes.length-1,t.startOffset)]}if(n&&n.nodeType==3){return n.parentNode}return n}},getEnd:function(){var e=this,t=e.getRng(),n,r;if(t.duplicate||t.item){if(t.item){return t.item(0)}t=t.duplicate();t.collapse(0);n=t.parentElement();if(n.ownerDocument!==e.dom.doc){n=e.dom.getRoot()}if(n&&n.nodeName=="BODY"){return n.lastChild||n}return n}else{n=t.endContainer;r=t.endOffset;if(n.nodeType==1&&n.hasChildNodes()){n=n.childNodes[r>0?r-1:r]}if(n&&n.nodeType==3){return n.parentNode}return n}},getBookmark:function(e,t){function p(e,t){var n=0;o(r.select(e),function(e,r){if(e==t){n=r}});return n}function d(e){function t(t){var n,r,i,s=t?"start":"end";n=e[s+"Container"];r=e[s+"Offset"];if(n.nodeType==1&&n.nodeName=="TR"){i=n.childNodes;n=i[Math.min(t?r:r-1,i.length-1)];if(n){r=t?0:n.childNodes.length;e["set"+(t?"Start":"End")](n,r)}}}t(true);t();return e}function v(){function o(e,r){var s=e[r?"startContainer":"endContainer"],o=e[r?"startOffset":"endOffset"],u=[],a,f,l=0;if(s.nodeType==3){if(t){for(a=s.previousSibling;a&&a.nodeType==3;a=a.previousSibling){o+=a.nodeValue.length}}u.push(o)}else{f=s.childNodes;if(o>=f.length&&f.length){l=1;o=Math.max(0,f.length-1)}u.push(n.dom.nodeIndex(f[o],t)+l)}for(;s&&s!=i;s=s.parentNode){u.push(n.dom.nodeIndex(s,t))}return u}var e=n.getRng(true),i=r.getRoot(),s={};s.start=o(e,true);if(!n.isCollapsed()){s.end=o(e)}return s}var n=this,r=n.dom,i,s,u,a,f,l,c="&#xFEFF;",h;if(e==2){l=n.getNode();f=l?l.nodeName:null;if(f=="IMG"){return{name:f,index:p(f,l)}}if(n.tridentSel){return n.tridentSel.getBookmark(e)}return v()}if(e){return{rng:n.getRng()}}i=n.getRng();u=r.uniqueId();a=n.isCollapsed();h="overflow:hidden;line-height:0px";if(i.duplicate||i.item){if(!i.item){s=i.duplicate();try{i.collapse();i.pasteHTML('<span data-mce-type="bookmark" id="'+u+'_start" style="'+h+'">'+c+"</span>");if(!a){s.collapse(false);i.moveToElementText(s.parentElement());if(i.compareEndPoints("StartToEnd",s)===0){s.move("character",-1)}s.pasteHTML('<span data-mce-type="bookmark" id="'+u+'_end" style="'+h+'">'+c+"</span>")}}catch(m){return null}}else{l=i.item(0);f=l.nodeName;return{name:f,index:p(f,l)}}}else{l=n.getNode();f=l.nodeName;if(f=="IMG"){return{name:f,index:p(f,l)}}s=d(i.cloneRange());if(!a){s.collapse(false);s.insertNode(r.create("span",{"data-mce-type":"bookmark",id:u+"_end",style:h},c))}i=d(i);i.collapse(true);i.insertNode(r.create("span",{"data-mce-type":"bookmark",id:u+"_start",style:h},c))}n.moveToBookmark({id:u,keep:1});return{id:u}},moveToBookmark:function(e){function p(t){var n=e[t?"start":"end"],s,o,u,a;if(n){u=n[0];for(o=i,s=n.length-1;s>=1;s--){a=o.childNodes;if(n[s]>a.length-1){return}o=a[n[s]]}if(o.nodeType===3){u=Math.min(n[0],o.nodeValue.length)}if(o.nodeType===1){u=Math.min(n[0],o.childNodes.length)}if(t){r.setStart(o,u)}else{r.setEnd(o,u)}}return true}function d(t){var r=n.get(e.id+"_"+t),i,f,p,d,v=e.keep;if(r){i=r.parentNode;if(t=="start"){if(!v){f=n.nodeIndex(r)}else{i=r.firstChild;f=1}s=a=i;c=h=f}else{if(!v){f=n.nodeIndex(r)}else{i=r.firstChild;f=1}a=i;h=f}if(!v){d=r.previousSibling;p=r.nextSibling;o(u(r.childNodes),function(e){if(e.nodeType==3){e.nodeValue=e.nodeValue.replace(/\uFEFF/g,"")}});while(r=n.get(e.id+"_"+t)){n.remove(r,1)}if(d&&p&&d.nodeType==p.nodeType&&d.nodeType==3&&!l){f=d.nodeValue.length;d.appendData(p.nodeValue);n.remove(p);if(t=="start"){s=a=d;c=h=f}else{a=d;h=f}}}}}function v(e){if(n.isBlock(e)&&!e.innerHTML&&!f){e.innerHTML='<br data-mce-bogus="1" />'}return e}var t=this,n=t.dom,r,i,s,a,c,h;if(e){if(e.start){r=n.createRng();i=n.getRoot();if(t.tridentSel){return t.tridentSel.moveToBookmark(e)}if(p(true)&&p()){t.setRng(r)}}else if(e.id){d("start");d("end");if(s){r=n.createRng();r.setStart(v(s),c);r.setEnd(v(a),h);t.setRng(r)}}else if(e.name){t.select(n.select(e.name)[e.index])}else if(e.rng){t.setRng(e.rng)}}},select:function(e,t){var n=this,r=n.dom,i=r.createRng(),s;n.lastFocusBookmark=null;if(e){if(!t&&n.controlSelection.controlSelect(e)){return}s=r.nodeIndex(e);i.setStart(e.parentNode,s);i.setEnd(e.parentNode,s+1);if(t){n._moveEndPoint(i,e,true);n._moveEndPoint(i,e)}n.setRng(i)}return e},isCollapsed:function(){var e=this,t=e.getRng(),n=e.getSel();if(!t||t.item){return false}if(t.compareEndPoints){return t.compareEndPoints("StartToEnd",t)===0}return!n||t.collapsed},collapse:function(e){var t=this,n=t.getRng(),r;if(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){var t=this,n,r,i,s=t.win.document,o;if(!e&&t.lastFocusBookmark){var u=t.lastFocusBookmark;if(u.startContainer){r=s.createRange();r.setStart(u.startContainer,u.startOffset);r.setEnd(u.endContainer,u.endOffset)}else{r=u}return r}if(e&&t.tridentSel){return t.tridentSel.getRangeAt(0)}try{if(n=t.getSel()){if(n.rangeCount>0){r=n.getRangeAt(0)}else{r=n.createRange?n.createRange():s.createRange()}}}catch(a){}if(f&&r&&r.setStart&&s.selection){try{o=s.selection.createRange()}catch(a){}if(o&&o.item){i=o.item(0);r=s.createRange();r.setStartBefore(i);r.setEndAfter(i)}}if(!r){r=s.createRange?s.createRange():s.body.createTextRange()}if(r.setStart&&r.startContainer.nodeType===9&&r.collapsed){i=t.dom.getRoot();r.setStart(i,0);r.setEnd(i,0)}if(t.selectedRange&&t.explicitRange){if(r.compareBoundaryPoints(r.START_TO_START,t.selectedRange)===0&&r.compareBoundaryPoints(r.END_TO_END,t.selectedRange)===0){r=t.explicitRange}else{t.selectedRange=null;t.explicitRange=null}}return r},setRng:function(e,t){var n=this,r;if(e.select){try{e.select()}catch(i){}return}if(!n.tridentSel){r=n.getSel();if(r){n.explicitRange=e;try{r.removeAllRanges();r.addRange(e)}catch(i){}if(t===false&&r.extend){r.collapse(e.endContainer,e.endOffset);r.extend(e.startContainer,e.startOffset)}n.selectedRange=r.rangeCount>0?r.getRangeAt(0):null}}else{if(e.cloneRange){try{n.tridentSel.addRange(e);return}catch(i){}}}},setNode:function(e){var t=this;t.setContent(t.dom.getOuterHTML(e));return e},getNode:function(){function a(e,t){var n=e;while(e&&e.nodeType===3&&e.length===0){e=t?e.nextSibling:e.previousSibling}return e||n}var e=this,t=e.getRng(),n;var r=t.startContainer,i=t.endContainer;var s=t.startOffset,o=t.endOffset,u=e.dom.getRoot();if(!t){return u}if(t.setStart){n=t.commonAncestorContainer;if(!t.collapsed){if(r==i){if(o-s<2){if(r.hasChildNodes()){n=r.childNodes[s]}}}if(r.nodeType===3&&i.nodeType===3){if(r.length===s){r=a(r.nextSibling,true)}else{r=r.parentNode}if(o===0){i=a(i.previousSibling,false)}else{i=i.parentNode}if(r&&r===i){return r}}}if(n&&n.nodeType==3){return n.parentNode}return n}n=t.item?t.item(0):t.parentElement();if(n.ownerDocument!==e.win.document){n=u}return n},getSelectedBlocks:function(t,n){var r=this,i=r.dom,s,o,u=[];o=i.getRoot();t=i.getParent(t||r.getStart(),i.isBlock);n=i.getParent(n||r.getEnd(),i.isBlock);if(t&&t!=o){u.push(t)}if(t&&n&&t!=n){s=t;var a=new e(t,o);while((s=a.next())&&s!=n){if(i.isBlock(s)){u.push(s)}}}if(n&&t!=n&&n!=o){u.push(n)}return u},isForward:function(){var e=this.dom,t=this.getSel(),n,r;if(!t||!t.anchorNode||!t.focusNode){return true}n=e.createRng();n.setStart(t.anchorNode,t.anchorOffset);n.collapse(true);r=e.createRng();r.setStart(t.focusNode,t.focusOffset);r.collapse(true);return n.compareBoundaryPoints(n.START_TO_START,r)<=0},normalize:function(){function s(s){function v(t,n){var r=new e(t,f.getParent(t.parentNode,f.isBlock)||l);while(t=r[n?"prev":"next"]()){if(t.nodeName==="BR"){return true}}}function m(e,t){return e.previousSibling&&e.previousSibling.nodeName==t}function g(t,n){var s,a;n=n||o;s=new e(n,f.getParent(n.parentNode,f.isBlock)||l);while(c=s[t?"prev":"next"]()){if(c.nodeType===3&&c.nodeValue.length>0){o=c;u=t?c.nodeValue.length:0;r=true;return}if(f.isBlock(c)||h[c.nodeName.toLowerCase()]){return}a=c}if(i&&a){o=a;r=true;u=0}}var o,u,a,f=t.dom,l=f.getRoot(),c,h,p;var d;o=n[(s?"start":"end")+"Container"];u=n[(s?"start":"end")+"Offset"];h=f.schema.getNonEmptyElements();d=s;if(o.nodeType==1&&u>o.childNodes.length-1){d=false}if(o.nodeType===9){o=f.getRoot();u=0}if(o===l){if(d){c=o.childNodes[u>0?u-1:0];if(c){p=c.nodeName.toLowerCase();if(h[c.nodeName]||c.nodeName=="TABLE"){return}}}if(o.hasChildNodes()){u=Math.min(!d&&u>0?u-1:u,o.childNodes.length-1);o=o.childNodes[u];u=0;if(o.hasChildNodes()&&!/TABLE/.test(o.nodeName)){c=o;a=new e(o,l);do{if(c.nodeType===3&&c.nodeValue.length>0){u=d?0:c.nodeValue.length;o=c;r=true;break}if(h[c.nodeName.toLowerCase()]){u=f.nodeIndex(c);o=c.parentNode;if(c.nodeName=="IMG"&&!d){u++}r=true;break}}while(c=d?a.next():a.prev())}}}if(i){if(o.nodeType===3&&u===0){g(true)}if(o.nodeType===1){c=o.childNodes[u];if(c&&c.nodeName==="BR"&&!m(c,"A")&&!v(c)&&!v(c,true)){g(true,o.childNodes[u])}}}if(d&&!i&&o.nodeType===3&&u===o.nodeValue.length){g(false)}if(r){n["set"+(s?"Start":"End")](o,u)}}var t=this,n,r,i;if(f){return}n=t.getRng();i=n.collapsed;s(true);if(!i){s()}if(r){if(i){n.collapse(true)}t.setRng(n,t.isForward())}},selectorChanged:function(e,t){var n=this,r;if(!n.selectorChangedData){n.selectorChangedData={};r={};n.editor.on("NodeChange",function(e){var t=e.element,i=n.dom,s=i.getParents(t,null,i.getRoot()),u={};o(n.selectorChangedData,function(e,t){o(s,function(n){if(i.is(n,t)){if(!r[t]){o(e,function(e){e(true,{node:n,selector:t,parents:s})});r[t]=e}u[t]=e;return false}})});o(r,function(e,n){if(!u[n]){delete r[n];o(e,function(e){e(false,{node:t,selector:n,parents:s})})}})})}if(!n.selectorChangedData[e]){n.selectorChangedData[e]=[]}n.selectorChangedData[e].push(t);return n},getScrollContainer:function(){var e,t=this.dom.getRoot();while(t&&t.nodeName!="BODY"){if(t.scrollHeight>t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e){function a(e){var t=0,n=0;var r=e;while(r&&r.nodeType){t+=r.offsetLeft||0;n+=r.offsetTop||0;r=r.offsetParent}return{x:t,y:n}}var t,n,r=this,i=r.dom,s=i.getRoot(),o,u;if(s.nodeName!="BODY"){var f=r.getScrollContainer();if(f){t=a(e).y-a(f).y;u=f.clientHeight;o=f.scrollTop;if(t<o||t+25>o+u){f.scrollTop=t<o?t:t-u+25}return}}n=i.getViewPort(r.editor.getWin());t=i.getPos(e).y;o=n.y;u=n.h;if(t<n.y||t+25>o+u){r.editor.getWin().scrollTo(0,t<o?t:t-u+25)}},_moveEndPoint:function(t,n,r){var s=n,o=new e(n,s);var u=this.dom.schema.getNonEmptyElements();do{if(n.nodeType==3&&a(n.nodeValue).length!==0){if(r){t.setStart(n,0)}else{t.setEnd(n,n.nodeValue.length)}return}if(u[n.nodeName]){if(r){t.setStartBefore(n)}else{if(n.nodeName=="BR"){t.setEndBefore(n)}else{t.setEndAfter(n)}}return}if(i.ie&&i.ie<11&&this.dom.isBlock(n)&&this.dom.isEmpty(n)){if(r){t.setStart(n,0)}else{t.setEnd(n,0)}return}}while(n=r?o.next():o.prev());if(s.nodeName=="BODY"){if(r){t.setStart(s,0)}else{t.setEnd(s,s.childNodes.length)}}},destroy:function(){this.win=null;this.controlSelection.destroy()}};return c});i("tinymce/dom/RangeUtils",["tinymce/util/Tools"],function(e){function n(e){this.walk=function(n,r){function v(e){var t;t=e[0];if(t.nodeType===3&&t===i&&s>=t.nodeValue.length){e.splice(0,1)}t=e[e.length-1];if(u===0&&e.length>0&&t===o&&t.nodeType===3){e.splice(e.length-1,1)}return e}function m(e,t,n){var r=[];for(;e&&e!=n;e=e[t]){r.push(e)}return r}function g(e,t){do{if(e.parentNode==t){return e}e=e.parentNode}while(e)}function y(e,t,n){var i=n?"nextSibling":"previousSibling";for(c=e,h=c.parentNode;c&&c!=t;c=h){h=c.parentNode;p=m(c==e?c:c[i],i);if(p.length){if(!n){p.reverse()}r(v(p))}}}var i=n.startContainer,s=n.startOffset,o=n.endContainer,u=n.endOffset,a,f,l,c,h,p,d;d=e.select("td.mce-item-selected,th.mce-item-selected");if(d.length>0){t(d,function(e){r([e])});return}if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[s]}if(o.nodeType==1&&o.hasChildNodes()){o=o.childNodes[Math.min(u-1,o.childNodes.length-1)]}if(i==o){return r(v([i]))}a=e.findCommonAncestor(i,o);for(c=i;c;c=c.parentNode){if(c===o){return y(i,a,true)}if(c===a){break}}for(c=o;c;c=c.parentNode){if(c===i){return y(o,a)}if(c===a){break}}f=g(i,a)||i;l=g(o,a)||o;y(i,f,true);p=m(f==i?f:f.nextSibling,"nextSibling",l==o?l.nextSibling:l);if(p.length){r(v(p))}y(o,l)};this.split=function(e){function s(e,t){return e.splitText(t)}var t=e.startContainer,n=e.startOffset,r=e.endContainer,i=e.endOffset;if(t==r&&t.nodeType==3){if(n>0&&n<t.nodeValue.length){r=s(t,n);t=r.previousSibling;if(i>n){i=i-n;t=r=s(r,i).previousSibling;i=r.nodeValue.length;n=0}else{i=0}}}else{if(t.nodeType==3&&n>0&&n<t.nodeValue.length){t=s(t,n);n=0}if(r.nodeType==3&&i>0&&i<r.nodeValue.length){r=s(r,i).previousSibling;i=r.nodeValue.length}}return{startContainer:t,startOffset:n,endContainer:r,endOffset:i}}}var t=e.each;n.compareRanges=function(e,t){if(e&&t){if(e.item||e.duplicate){if(e.item&&t.item&&e.item(0)===t.item(0)){return true}if(e.isEqual&&t.isEqual&&t.isEqual(e)){return true}}else{return e.startContainer==t.startContainer&&e.startOffset==t.startOffset}}return false};return n});i("tinymce/Formatter",["tinymce/dom/TreeWalker","tinymce/dom/RangeUtils","tinymce/util/Tools"],function(e,t,n){return function(r){function N(e){if(e.nodeType){e=e.nodeName}return!!r.schema.getTextBlockElements()[e.toLowerCase()]}function C(e,t){return s.getParents(e,t,s.getRoot())}function k(e){return e.nodeType===1&&e.id==="_mce_caret"}function L(){M({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:false,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:false,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:false,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:false,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"}},{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:true},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:true},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},wrap_links:false},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},wrap_links:false},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:true,deep:true,onmatch:function(){return true},onformat:function(e,t,n){E(n,function(t,n){s.setAttrib(e,n,t)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike,sub,sup",remove:"all",split:true,expand:false,block_expand:true,deep:true},{selector:"span",attributes:["style","class"],remove:"empty",split:true,expand:false,deep:true},{selector:"*",attributes:["style","class"],split:false,expand:false,deep:true}]});E("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/),function(e){M(e,{block:e,remove:"all"})});M(r.settings.formats)}function A(){r.addShortcut("ctrl+b","bold_desc","Bold");r.addShortcut("ctrl+i","italic_desc","Italic");r.addShortcut("ctrl+u","underline_desc","Underline");for(var e=1;e<=6;e++){r.addShortcut("ctrl+"+e,"",["FormatBlock",false,"h"+e])}r.addShortcut("ctrl+7","",["FormatBlock",false,"p"]);r.addShortcut("ctrl+8","",["FormatBlock",false,"div"]);r.addShortcut("ctrl+9","",["FormatBlock",false,"address"])}function O(e){return e?i[e]:i}function M(e,t){if(e){if(typeof e!=="string"){E(e,function(e,t){M(t,e)})}else{t=t.length?t:[t];E(t,function(e){if(e.deep===g){e.deep=!e.selector}if(e.split===g){e.split=!e.selector||e.inline}if(e.remove===g&&e.selector&&!e.inline){e.remove="none"}if(e.selector&&e.inline){e.mixed=true;e.block_expand=true}if(typeof e.classes==="string"){e.classes=e.classes.split(/\s+/)}});i[e]=t}}}function _(e){var t;r.dom.getParent(e,function(e){t=r.dom.getStyle(e,"text-decoration");return t&&t!=="none"});return t}function D(e){var t;if(e.nodeType===1&&e.parentNode&&e.parentNode.nodeType===1){t=_(e.parentNode);if(r.dom.getStyle(e,"color")&&t){r.dom.setStyle(e,"text-decoration",t)}else if(r.dom.getStyle(e,"textdecoration")===t){r.dom.setStyle(e,"text-decoration",null)}}}function P(t,n,i){function b(e,t){t=t||h;if(e){if(t.onformat){t.onformat(e,t,n,i)}E(t.styles,function(t,r){s.setStyle(e,r,V(t,n))});E(t.attributes,function(t,r){s.setAttrib(e,r,V(t,n))});E(t.classes,function(t){t=V(t,n);if(!s.hasClass(e,t)){s.addClass(e,t)}})}}function w(){function t(t,n){var r=new e(n);for(i=r.current();i;i=r.prev()){if(i.childNodes.length>1||i==t||i.tagName=="BR"){return i}}}var n=r.selection.getRng();var s=n.startContainer;var o=n.endContainer;if(s!=o&&n.endOffset===0){var u=t(s,o);var a=u.nodeType==3?u.length:u.childNodes.length;n.setEnd(u,a)}return n}function T(e,t,n,r,i){var o=[],u=-1,a,f=-1,l=-1,c;E(e.childNodes,function(e,t){if(e.nodeName==="UL"||e.nodeName==="OL"){u=t;a=e;return false}});E(e.childNodes,function(e,n){if(e.nodeName==="SPAN"&&s.getAttrib(e,"data-mce-type")=="bookmark"){if(e.id==t.id+"_start"){f=n}else if(e.id==t.id+"_end"){l=n}}});if(u<=0||f<u&&l>u){E(S(e.childNodes),i);return 0}else{c=s.clone(n,d);E(S(e.childNodes),function(e,t){if(f<u&&t<u||f>u&&t>u){o.push(e);e.parentNode.removeChild(e)}});if(f<u){e.insertBefore(c,a)}else if(f>u){e.insertBefore(c,a.nextSibling)}r.push(c);E(o,function(e){c.appendChild(e)});return c}}function C(e,r,i){var o=[],l,p,m=true;l=h.inline||h.block;p=s.create(l);b(p);u.walk(e,function(e){function v(e){var w,x,C,L,A;A=m;w=e.nodeName.toLowerCase();x=e.parentNode.nodeName.toLowerCase();if(e.nodeType===1&&y(e)){A=m;m=y(e)==="true";L=true}if(z(w,"br")){u=0;if(h.block){s.remove(e)}return}if(h.wrapper&&j(e,t,n)){u=0;return}if(m&&!L&&h.block&&!h.wrapper&&N(w)&&a(x,l)){e=s.rename(e,l);b(e);o.push(e);u=0;return}if(h.selector){E(c,function(t){if("collapsed"in t&&t.collapsed!==g){return}if(s.is(e,t.selector)&&!k(e)){b(e,t);C=true}});if(!h.inline||C){u=0;return}}if(m&&!L&&a(l,w)&&a(x,l)&&!(!i&&e.nodeType===3&&e.nodeValue.length===1&&e.nodeValue.charCodeAt(0)===65279)&&!k(e)&&(!h.inline||!f(e))){if(!u){u=s.clone(p,d);e.parentNode.insertBefore(u,e);o.push(u)}u.appendChild(e)}else if(w=="li"&&r){u=T(e,r,p,o,v)}else{u=0;E(S(e.childNodes),v);if(L){m=A}u=0}}var u;E(e,v)});if(h.wrap_links===false){E(o,function(e){function t(e){var n,r,i;if(e.nodeName==="A"){r=s.clone(p,d);o.push(r);i=S(e.childNodes);for(n=0;n<i.length;n++){r.appendChild(i[n])}e.appendChild(r)}E(S(e.childNodes),t)}t(e)})}E(o,function(e){function i(e){var t=0;E(e.childNodes,function(e){if(!$(e)&&!Z(e)){t++}});return t}function u(e){var t,n;E(e.childNodes,function(e){if(e.nodeType==1&&!Z(e)&&!k(e)){t=e;return d}});if(t&&U(t,h)){n=s.clone(t,d);b(n);s.replace(n,e,v);s.remove(t,1)}return n||e}var r;r=i(e);if((o.length>1||!f(e))&&r===0){s.remove(e,1);return}if(h.inline||h.wrapper){if(!h.exact&&r===1){e=u(e)}E(c,function(t){E(s.select(t.inline,e),function(e){var r;if(t.wrap_links===false){r=e.parentNode;do{if(r.nodeName==="A"){return}}while(r=r.parentNode)}Q(t,n,e,t.exact?e:null)})});if(j(e.parentNode,t,n)){s.remove(e,1);e=0;return v}if(h.merge_with_parents){s.getParent(e.parentNode,function(r){if(j(r,t,n)){s.remove(e,1);e=0;return v}})}if(e&&h.merge_siblings!==false){e=et(Y(e),e);e=et(e,Y(e,v))}}})}var c=O(t),h=c[0],p,m,g=!i&&o.isCollapsed();if(h){if(i){if(i.nodeType){m=s.createRng();m.setStartBefore(i);m.setEndAfter(i);C(K(m,c),null,true)}else{C(i,null,true)}}else{if(!g||!h.inline||s.select("td.mce-item-selected,th.mce-item-selected").length){var L=r.selection.getNode();if(!l&&c[0].defaultBlock&&!s.getParent(L,s.isBlock)){P(c[0].defaultBlock)}r.selection.setRng(w());p=o.getBookmark();C(K(o.getRng(v),c),p);if(h.styles&&(h.styles.color||h.styles.textDecoration)){x(L,D,"childNodes");D(L)}o.moveToBookmark(p);rt(o.getRng(v));r.nodeChanged()}else{nt("apply",t,n)}}}}function H(e,t,n){function m(e){var n,r,s,o,u;if(e.nodeType===1&&y(e)){o=p;p=y(e)==="true";u=true}n=S(e.childNodes);if(p&&!u){for(r=0,s=i.length;r<s;r++){if(Q(i[r],t,e,e)){break}}}if(a.deep){if(n.length){for(r=0,s=n.length;r<s;r++){m(n[r])}if(u){p=o}}}}function g(n){var r;E(C(n.parentNode).reverse(),function(n){var i;if(!r&&n.id!="_start"&&n.id!="_end"){i=j(n,e,t);if(i&&i.split!==false){r=n}}});return r}function b(e,n,r,o){var u,l,c,h,p,v;if(e){v=e.parentNode;for(u=n.parentNode;u&&u!=v;u=u.parentNode){l=s.clone(u,d);for(p=0;p<i.length;p++){if(Q(i[p],t,l,l)){l=0;break}}if(l){if(c){l.appendChild(c)}if(!h){h=l}c=l}}if(o&&(!a.mixed||!f(e))){n=s.split(e,n)}if(c){r.parentNode.insertBefore(c,r);h.appendChild(r)}}return n}function w(e){return b(g(e),e,e,true)}function x(e){var t=s.get(e?"_start":"_end"),n=t[e?"firstChild":"lastChild"];if(Z(n)){n=n[e?"firstChild":"lastChild"]}s.remove(t,true);return n}function T(e){var t,n;var s=e.commonAncestorContainer;e=K(e,i,v);if(a.split){t=tt(e,v);n=tt(e);if(t!=n){if(/^(TR|TH|TD)$/.test(t.nodeName)&&t.firstChild){if(t.nodeName=="TR"){t=t.firstChild.firstChild||t}else{t=t.firstChild||t}}if(s&&/^T(HEAD|BODY|FOOT|R)$/.test(s.nodeName)&&/^(TH|TD)$/.test(n.nodeName)&&n.firstChild){n=n.firstChild||n}t=J(t,"span",{id:"_start","data-mce-type":"bookmark"});n=J(n,"span",{id:"_end","data-mce-type":"bookmark"});w(t);w(n);t=x(v);n=x()}else{t=n=w(t)}e.startContainer=t.parentNode;e.startOffset=c(t);e.endContainer=n.parentNode;e.endOffset=c(n)+1}u.walk(e,function(e){E(e,function(e){m(e);if(e.nodeType===1&&r.dom.getStyle(e,"text-decoration")==="underline"&&e.parentNode&&_(e.parentNode)==="underline"){Q({deep:false,exact:true,inline:"span",styles:{textDecoration:"underline"}},null,e)}})})}var i=O(e),a=i[0],l,h,p=true;if(n){if(n.nodeType){h=s.createRng();h.setStartBefore(n);h.setEndAfter(n);T(h)}else{T(n)}return}if(!o.isCollapsed()||!a.inline||s.select("td.mce-item-selected,th.mce-item-selected").length){l=o.getBookmark();T(o.getRng(v));o.moveToBookmark(l);if(a.inline&&F(e,t,o.getStart())){rt(o.getRng(true))}r.nodeChanged()}else{nt("remove",e,t)}}function B(e,t,n){var r=O(e);if(F(e,t,n)&&(!("toggle"in r[0])||r[0].toggle)){H(e,t,n)}else{P(e,t,n)}}function j(e,t,n,r){function f(e,t,i){var o,u,a=t[i],f;if(t.onmatch){return t.onmatch(e,t,i)}if(a){if(a.length===g){for(o in a){if(a.hasOwnProperty(o)){if(i==="attributes"){u=s.getAttrib(e,o)}else{u=W(e,o)}if(r&&!u&&!t.exact){return}if((!r||t.exact)&&!z(u,X(V(a[o],n),o))){return}}}}else{for(f=0;f<a.length;f++){if(i==="attributes"?s.getAttrib(e,a[f]):W(e,a[f])){return t}}}}return t}var i=O(t),o,u,a;if(i&&e){for(u=0;u<i.length;u++){o=i[u];if(U(e,o)&&f(e,o,"attributes")&&f(e,o,"styles")){if(a=o.classes){for(u=0;u<a.length;u++){if(!s.hasClass(e,a[u])){return}}}return o}}}}function F(e,t,n){function i(n){var r=s.getRoot();if(n===r){return false}n=s.getParent(n,function(n){return n.parentNode===r||!!j(n,e,t,true)});return j(n,e,t)}var r;if(n){return i(n)}n=o.getNode();if(i(n)){return v}r=o.getStart();if(r!=n){if(i(r)){return v}}return d}function I(e,t){var n,r=[],i={};n=o.getStart();s.getParent(n,function(n){var s,o;for(s=0;s<e.length;s++){o=e[s];if(!i[o]&&j(n,o,t)){i[o]=true;r.push(o)}}},s.getRoot());return r}function q(e){var t=O(e),n,r,i,u,a;if(t){n=o.getStart();r=C(n);for(u=t.length-1;u>=0;u--){a=t[u].selector;if(!a||t[u].defaultBlock){return v}for(i=r.length-1;i>=0;i--){if(s.is(r[i],a)){return v}}}}return d}function R(e,t,n){var i;if(!m){m={};i={};r.on("NodeChange",function(e){var t=C(e.element),n={};E(m,function(e,r){E(t,function(s){if(j(s,r,{},e.similar)){if(!i[r]){E(e,function(e){e(true,{node:s,format:r,parents:t})});i[r]=e}n[r]=e;return false}})});E(i,function(r,s){if(!n[s]){delete i[s];E(r,function(n){n(false,{node:e.element,format:s,parents:t})})}})})}E(e.split(","),function(e){if(!m[e]){m[e]=[];m[e].similar=n}m[e].push(t)});return this}function U(e,t){if(z(e,t.inline)){return v}if(z(e,t.block)){return v}if(t.selector){return e.nodeType==1&&s.is(e,t.selector)}}function z(e,t){e=e||"";t=t||"";e=""+(e.nodeName||e);t=""+(t.nodeName||t);return e.toLowerCase()==t.toLowerCase()}function W(e,t){return X(s.getStyle(e,t),t)}function X(e,t){if(t=="color"||t=="backgroundColor"){e=s.toHex(e)}if(t=="fontWeight"&&e==700){e="bold"}if(t=="fontFamily"){e=e.replace(/[\'\"]/g,"").replace(/,\s+/g,",")}return""+e}function V(e,t){if(typeof e!="string"){e=e(t)}else if(t){e=e.replace(/%(\w+)/g,function(e,n){return t[n]||e})}return e}function $(e){return e&&e.nodeType===3&&/^([\t \r\n]+|)$/.test(e.nodeValue)}function J(e,t,n){var r=s.create(t,n);e.parentNode.insertBefore(r,e);r.appendChild(e);return r}function K(t,n,i){function m(e){function a(e){return e.nodeName=="BR"&&e.getAttribute("data-mce-bogus")&&!e.nextSibling}var t,r,i,o,u;t=r=e?l:p;o=e?"previousSibling":"nextSibling";u=s.getRoot();if(t.nodeType==3&&!$(t)){if(e?h>0:v<t.nodeValue.length){return t}}for(;;){if(!n[0].block_expand&&f(r)){return r}for(i=r[o];i;i=i[o]){if(!Z(i)&&!$(i)&&!a(i)){return r}}if(r.parentNode==u){t=r;break}r=r.parentNode}return t}function b(e,t){if(t===g){t=e.nodeType===3?e.length:e.childNodes.length}while(e&&e.hasChildNodes()){e=e.childNodes[t];if(e){t=e.nodeType===3?e.length:e.childNodes.length}}return{node:e,offset:t}}function w(e){var t=e;while(t){if(t.nodeType===1&&y(t)){return y(t)==="false"?t:e}t=t.parentNode}return e}function E(t,n,o){function h(e,t){var n,r,s=e.nodeValue;if(typeof t=="undefined"){t=o?s.length:0}if(o){n=s.lastIndexOf(" ",t);r=s.lastIndexOf(" ",t);n=n>r?n:r;if(n!==-1&&!i){n++}}else{n=s.indexOf(" ",t);r=s.indexOf(" ",t);n=n!==-1&&(r===-1||n<r)?n:r}return n}var u,a,l,c;if(t.nodeType===3){l=h(t,n);if(l!==-1){return{container:t,offset:l}}c=t}u=new e(t,s.getParent(t,f)||r.getBody());while(a=u[o?"prev":"next"]()){if(a.nodeType===3){c=a;l=h(a);if(l!==-1){return{container:a,offset:l}}}else if(f(a)){break}}if(c){if(o){n=0}else{n=c.length}return{container:c,offset:n}}}function S(e,r){var i,o,u,a;if(e.nodeType==3&&e.nodeValue.length===0&&e[r]){e=e[r]}i=C(e);for(o=0;o<i.length;o++){for(u=0;u<n.length;u++){a=n[u];if("collapsed"in a&&a.collapsed!==t.collapsed){continue}if(s.is(i[o],a.selector)){return i[o]}}}return e}function x(e,t){var r,i=s.getRoot();if(!n[0].wrapper){r=s.getParent(e,n[0].block,i)}if(!r){r=s.getParent(e.nodeType==3?e.parentNode:e,function(e){return e!=i&&N(e)})}if(r&&n[0].wrapper){r=C(r,"ul,ol").reverse()[0]||r}if(!r){r=e;while(r[t]&&!f(r[t])){r=r[t];if(z(r,"br")){break}}}return r||e}var o,u,a,l=t.startContainer,h=t.startOffset,p=t.endContainer,v=t.endOffset;if(l.nodeType==1&&l.hasChildNodes()){o=l.childNodes.length-1;l=l.childNodes[h>o?o:h];if(l.nodeType==3){h=0}}if(p.nodeType==1&&p.hasChildNodes()){o=p.childNodes.length-1;p=p.childNodes[v>o?o:v-1];if(p.nodeType==3){v=p.nodeValue.length}}l=w(l);p=w(p);if(Z(l.parentNode)||Z(l)){l=Z(l)?l:l.parentNode;l=l.nextSibling||l;if(l.nodeType==3){h=0}}if(Z(p.parentNode)||Z(p)){p=Z(p)?p:p.parentNode;p=p.previousSibling||p;if(p.nodeType==3){v=p.length}}if(n[0].inline){if(t.collapsed){a=E(l,h,true);if(a){l=a.container;h=a.offset}a=E(p,v);if(a){p=a.container;v=a.offset}}u=b(p,v);if(u.node){while(u.node&&u.offset===0&&u.node.previousSibling){u=b(u.node.previousSibling)}if(u.node&&u.offset>0&&u.node.nodeType===3&&u.node.nodeValue.charAt(u.offset-1)===" "){if(u.offset>1){p=u.node;p.splitText(u.offset-1)}}}}if(n[0].inline||n[0].block_expand){if(!n[0].inline||l.nodeType!=3||h===0){l=m(true)}if(!n[0].inline||p.nodeType!=3||v===p.nodeValue.length){p=m()}}if(n[0].selector&&n[0].expand!==d&&!n[0].inline){l=S(l,"previousSibling");p=S(p,"nextSibling")}if(n[0].block||n[0].selector){l=x(l,"previousSibling");p=x(p,"nextSibling");if(n[0].block){if(!f(l)){l=m(true)}if(!f(p)){p=m()}}}if(l.nodeType==1){h=c(l);l=l.parentNode}if(p.nodeType==1){v=c(p)+1;p=p.parentNode}return{startContainer:l,startOffset:h,endContainer:p,endOffset:v}}function Q(e,t,n,r){var i,o,u;if(!U(n,e)){return d}if(e.remove!="all"){E(e.styles,function(e,i){e=X(V(e,t),i);if(typeof i==="number"){i=e;r=0}if(!r||z(W(r,i),e)){s.setStyle(n,i,"")}u=1});if(u&&s.getAttrib(n,"style")===""){n.removeAttribute("style");n.removeAttribute("data-mce-style")}E(e.attributes,function(e,i){var o;e=V(e,t);if(typeof i==="number"){i=e;r=0}if(!r||z(s.getAttrib(r,i),e)){if(i=="class"){e=s.getAttrib(n,i);if(e){o="";E(e.split(/\s+/),function(e){if(/mce\w+/.test(e)){o+=(o?" ":"")+e}});if(o){s.setAttrib(n,i,o);return}}}if(i=="class"){n.removeAttribute("className")}if(p.test(i)){n.removeAttribute("data-mce-"+i)}n.removeAttribute(i)}});E(e.classes,function(e){e=V(e,t);if(!r||s.hasClass(r,e)){s.removeClass(n,e)}});o=s.getAttribs(n);for(i=0;i<o.length;i++){if(o[i].nodeName.indexOf("_")!==0){return d}}}if(e.remove!="none"){G(n,e);return v}}function G(e,t){function o(e,t,n){e=Y(e,t,n);return!e||e.nodeName=="BR"||f(e)}var n=e.parentNode,i;if(t.block){if(!l){if(f(e)&&!f(n)){if(!o(e,d)&&!o(e.firstChild,v,1)){e.insertBefore(s.create("br"),e.firstChild)}if(!o(e,v)&&!o(e.lastChild,d,1)){e.appendChild(s.create("br"))}}}else{if(n==s.getRoot()){if(!t.list_block||!z(e,t.list_block)){E(S(e.childNodes),function(e){if(a(l,e.nodeName.toLowerCase())){if(!i){i=J(e,l);s.setAttribs(i,r.settings.forced_root_block_attrs)}else{i.appendChild(e)}}else{i=0}})}}}}if(t.selector&&t.inline&&!z(t.inline,e)){return}s.remove(e,1)}function Y(e,t,n){if(e){t=t?"nextSibling":"previousSibling";for(e=n?e:e[t];e;e=e[t]){if(e.nodeType==1&&!$(e)){return e}}}}function Z(e){return e&&e.nodeType==1&&e.getAttribute("data-mce-type")=="bookmark"}function et(e,t){function i(e,t){function n(e){var t={};E(s.getAttribs(e),function(n){var r=n.nodeName.toLowerCase();if(r.indexOf("_")!==0&&r!=="style"&&r!=="data-mce-style"){t[r]=s.getAttrib(e,r)}});return t}function r(e,t){var n,r;for(r in e){if(e.hasOwnProperty(r)){n=t[r];if(n===g){return d}if(e[r]!=n){return d}delete t[r]}}for(r in t){if(t.hasOwnProperty(r)){return d}}return v}if(e.nodeName!=t.nodeName){return d}if(!r(n(e),n(t))){return d}if(!r(s.parseStyle(s.getAttrib(e,"style")),s.parseStyle(s.getAttrib(t,"style")))){return d}return v}function o(e,t){for(n=e;n;n=n[t]){if(n.nodeType==3&&n.nodeValue.length!==0){return e}if(n.nodeType==1&&!Z(n)){return n}}return e}var n,r;if(e&&t){e=o(e,"previousSibling");t=o(t,"nextSibling");if(i(e,t)){for(n=e.nextSibling;n&&n!=t;){r=n;n=n.nextSibling;e.appendChild(r)}s.remove(t);E(S(t.childNodes),function(t){e.appendChild(t)});return e}}return t}function tt(t,n){var i,s,o;i=t[n?"startContainer":"endContainer"];s=t[n?"startOffset":"endOffset"];if(i.nodeType==1){o=i.childNodes.length-1;if(!n&&s){s--}i=i.childNodes[s>o?o:s]}if(i.nodeType===3&&n&&s>=i.nodeValue.length){i=(new e(i,r.getBody())).next()||i}if(i.nodeType===3&&!n&&s===0){i=(new e(i,r.getBody())).prev()||i}return i}function nt(t,n,i){function l(e){var t=s.create("span",{id:a,"data-mce-bogus":true,style:f?"color:red":""});if(e){t.appendChild(r.getDoc().createTextNode(h))}return t}function c(e,t){while(e){if(e.nodeType===3&&e.nodeValue!==h||e.childNodes.length>1){return false}if(t&&e.nodeType===1){t.push(e)}e=e.firstChild}return true}function p(e){while(e){if(e.id===a){return e}e=e.parentNode}}function d(t){var n;if(t){n=new e(t,t);for(t=n.current();t;t=n.next()){if(t.nodeType===3){return t}}}}function v(e,t){var n,r;if(!e){e=p(o.getStart());if(!e){while(e=s.get(a)){v(e,false)}}}else{r=o.getRng(true);if(c(e)){if(t!==false){r.setStartBefore(e);r.setEndBefore(e)}s.remove(e)}else{n=d(e);if(n.nodeValue.charAt(0)===h){n=n.deleteData(0,1)}s.remove(e,1)}o.setRng(r)}}function m(){var e,t,r,s,a,f,c;e=o.getRng(true);s=e.startOffset;f=e.startContainer;c=f.nodeValue;t=p(o.getStart());if(t){r=d(t)}if(c&&s>0&&s<c.length&&/\w/.test(c.charAt(s))&&/\w/.test(c.charAt(s-1))){a=o.getBookmark();e.collapse(true);e=K(e,O(n));e=u.split(e);P(n,i,e);o.moveToBookmark(a)}else{if(!t||r.nodeValue!==h){t=l(true);r=t.firstChild;e.insertNode(t);s=1;P(n,i,t)}else{P(n,i,t)}o.setCursorLocation(r,s)}}function g(){var e=o.getRng(true),t,r,a,f,c,p,d=[],v,m;t=e.startContainer;r=e.startOffset;c=t;if(t.nodeType==3){if(r!=t.nodeValue.length||t.nodeValue===h){f=true}c=c.parentNode}while(c){if(j(c,n,i)){p=c;break}if(c.nextSibling){f=true}d.push(c);c=c.parentNode}if(!p){return}if(f){a=o.getBookmark();e.collapse(true);e=K(e,O(n),true);e=u.split(e);H(n,i,e);o.moveToBookmark(a)}else{m=l();c=m;for(v=d.length-1;v>=0;v--){c.appendChild(s.clone(d[v],false));c=c.firstChild}c.appendChild(s.doc.createTextNode(h));c=c.firstChild;var g=s.getParent(p,N);if(g&&s.isEmpty(g)){p.parentNode.replaceChild(m,p)}else{s.insertAfter(m,p)}o.setCursorLocation(c,1);if(s.isEmpty(p)){s.remove(p)}}}function y(){var e;e=p(o.getStart());if(e&&!s.isEmpty(e)){x(e,function(e){if(e.nodeType==1&&e.id!==a&&!s.isEmpty(e)){s.setAttrib(e,"data-mce-bogus",null)}},"childNodes")}}var a="_mce_caret",f=r.settings.caret_debug;if(!r._hasCaretEvents){w=function(){var e=[],t;if(c(p(o.getStart()),e)){t=e.length;while(t--){s.setAttrib(e[t],"data-mce-bogus","1")}}};b=function(e){var t=e.keyCode;v();if(t==8||t==37||t==39){v(p(o.getStart()))}y()};r.on("SetContent",function(e){if(e.selection){y()}});r._hasCaretEvents=true}if(t=="apply"){m()}else{g()}}function rt(t){var n=t.startContainer,r=t.startOffset,i,u,a,f,l;if(n.nodeType==3&&r>=n.nodeValue.length){r=c(n);n=n.parentNode;i=true}if(n.nodeType==1){f=n.childNodes;n=f[Math.min(r,f.length-1)];u=new e(n,s.getParent(n,s.isBlock));if(r>f.length-1||i){u.next()}for(a=u.current();a;a=u.next()){if(a.nodeType==3&&!$(a)){l=s.create("a",null,h);a.parentNode.insertBefore(l,a);t.setStart(a,0);o.setRng(t);s.remove(l);return}}}}var i={},s=r.dom,o=r.selection,u=new t(s),a=r.schema.isValidChild,f=s.isBlock,l=r.settings.forced_root_block,c=s.nodeIndex,h="",p=/^(src|href|style)$/,d=false,v=true,m,g,y=s.getContentEditable,b,w;var E=n.each,S=n.grep,x=n.walk,T=n.extend;T(this,{get:O,register:M,apply:P,remove:H,toggle:B,match:F,matchAll:I,matchNode:j,canApply:q,formatChanged:R});L();A();r.on("BeforeGetContent",function(){if(w){w()}});r.on("mouseup keydown",function(e){if(b){b(e)}})}});i("tinymce/UndoManager",["tinymce/Env","tinymce/util/Tools"],function(e,t){var n=t.trim,r;r=new RegExp(["<span[^>]+data-mce-bogus[^>]+>[]+<\\/span>","<div[^>]+data-mce-bogus[^>]+><\\/div>",'\\s?data-mce-selected="[^"]+"'].join("|"),"gi");return function(t){function l(){return n(t.getContent({format:"raw",no_events:1}).replace(r,""))}function c(){i.typing=false;i.add()}var i,s=0,o=[],u,a,f;t.on("init",function(){i.add()});t.on("BeforeExecCommand",function(e){var t=e.command;if(t!="Undo"&&t!="Redo"&&t!="mceRepaint"){i.beforeChange()}});t.on("ExecCommand",function(e){var t=e.command;if(t!="Undo"&&t!="Redo"&&t!="mceRepaint"){i.add()}});t.on("ObjectResizeStart",function(){i.beforeChange()});t.on("SaveContent ObjectResized",c);t.dom.bind(t.dom.getRoot(),"dragend",c);t.dom.bind(t.getBody(),"focusout",function(){if(!t.removed&&i.typing){c()}});t.on("KeyUp",function(n){var r=n.keyCode;if(r>=33&&r<=36||r>=37&&r<=40||r==45||r==13||n.ctrlKey){c();t.nodeChanged()}if(r==46||r==8||e.mac&&(r==91||r==93)){t.nodeChanged()}if(a&&i.typing){if(!t.isDirty()){t.isNotDirty=!o[0]||l()==o[0].content;if(!t.isNotDirty){t.fire("change",{level:o[0],lastLevel:null})}}t.fire("TypingUndo");a=false;t.nodeChanged()}});t.on("KeyDown",function(e){var t=e.keyCode;if(t>=33&&t<=36||t>=37&&t<=40||t==45){if(i.typing){c()}return}if((t<16||t>20)&&t!=224&&t!=91&&!i.typing){i.beforeChange();i.typing=true;i.add();a=true}});t.on("MouseDown",function(){if(i.typing){c()}});t.addShortcut("ctrl+z","","Undo");t.addShortcut("ctrl+y,ctrl+shift+z","","Redo");t.on("AddUndo Undo Redo ClearUndos MouseUp",function(e){if(!e.isDefaultPrevented()){t.nodeChanged()}});i={data:o,typing:false,beforeChange:function(){if(!f){u=t.selection.getBookmark(2,true)}},add:function(e){var n,r=t.settings,i;e=e||{};e.content=l();if(f||t.fire("BeforeAddUndo",{level:e}).isDefaultPrevented()){return null}i=o[s];if(i&&i.content==e.content){return null}if(o[s]){o[s].beforeBookmark=u}if(r.custom_undo_redo_levels){if(o.length>r.custom_undo_redo_levels){for(n=0;n<o.length-1;n++){o[n]=o[n+1]}o.length--;s=o.length}}e.bookmark=t.selection.getBookmark(2,true);if(s<o.length-1){o.length=s+1}o.push(e);s=o.length-1;var a={level:e,lastLevel:i};t.fire("AddUndo",a);if(s>0){t.fire("change",a);t.isNotDirty=false}return e},undo:function(){var e;if(i.typing){i.add();i.typing=false}if(s>0){e=o[--s];if(s===0){t.isNotDirty=true}t.setContent(e.content,{format:"raw"});t.selection.moveToBookmark(e.beforeBookmark);t.fire("undo",{level:e})}return e},redo:function(){var e;if(s<o.length-1){e=o[++s];t.setContent(e.content,{format:"raw"});t.selection.moveToBookmark(e.bookmark);t.fire("redo",{level:e})}return e},clear:function(){o=[];s=0;i.typing=false;t.fire("ClearUndos")},hasUndo:function(){return s>0||i.typing&&o[0]&&l()!=o[0].content},hasRedo:function(){return s<o.length-1&&!this.typing},transact:function(e){i.beforeChange();f=true;e();f=false;i.add()}};return i}});i("tinymce/EnterKey",["tinymce/dom/TreeWalker","tinymce/Env"],function(e,t){var n=t.ie&&t.ie<11;return function(r){function l(l){function C(e){return e&&i.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&!/^(fixed|absolute)/i.test(e.style.position)&&i.getContentEditable(e)!=="true"}function k(e){var t;if(i.isBlock(e)){t=s.getRng();e.appendChild(i.create("span",null," "));s.select(e);e.lastChild.outerHTML="";s.setRng(t)}}function L(e){var t=e,n=[],r;while(t=t.firstChild){if(i.isBlock(t)){return}if(t.nodeType==1&&!f[t.nodeName.toLowerCase()]){n.push(t)}}r=n.length;while(r--){t=n[r];if(!t.hasChildNodes()||t.firstChild==t.lastChild&&t.firstChild.nodeValue===""){i.remove(t)}else{if(t.nodeName=="A"&&(t.innerText||t.textContent)===" "){i.remove(t)}}}}function A(n){function c(e){while(e){if(e.nodeType==1||e.nodeType==3&&e.data&&/[\r\n\s]/.test(e.data)){return e}e=e.nextSibling}}var r,o,u,a=n,l;if(t.ie&&t.ie<9&&m&&m.firstChild){if(m.firstChild==m.lastChild&&m.firstChild.tagName=="BR"){i.remove(m.firstChild)}}if(n.nodeName=="LI"){var h=c(n.firstChild);if(h&&/^(UL|OL)$/.test(h.nodeName)){n.insertBefore(i.doc.createTextNode(" "),n.firstChild)}}u=i.createRng();if(n.hasChildNodes()){r=new e(n,n);while(o=r.current()){if(o.nodeType==3){u.setStart(o,0);u.setEnd(o,0);break}if(f[o.nodeName.toLowerCase()]){u.setStartBefore(o);u.setEndBefore(o);break}a=o;o=r.next()}if(!o){u.setStart(a,0);u.setEnd(a,0)}}else{if(n.nodeName=="BR"){if(n.nextSibling&&i.isBlock(n.nextSibling)){if(!g||g<9){l=i.create("br");n.parentNode.insertBefore(l,n)}u.setStartBefore(n);u.setEndBefore(n)}else{u.setStartAfter(n);u.setEndAfter(n)}}else{u.setStart(n,0);u.setEnd(n,0)}}s.setRng(u);i.remove(l);s.scrollIntoView(n)}function O(e){var t=o.forced_root_block;if(t&&t.toLowerCase()===e.tagName.toLowerCase()){i.setAttribs(e,o.forced_root_block_attrs)}}function M(e){var t=d,r,s,u;if(e||S=="TABLE"){r=i.create(e||T);O(r)}else{r=m.cloneNode(false)}u=r;if(o.keep_styles!==false){do{if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(t.nodeName)){if(t.id=="_mce_caret"){continue}s=t.cloneNode(false);i.setAttrib(s,"id","");if(r.hasChildNodes()){s.appendChild(r.firstChild);r.appendChild(s)}else{u=s;r.appendChild(s)}}}while(t=t.parentNode)}if(!n){u.innerHTML='<br data-mce-bogus="1">'}return r}function _(t){var n,r,i;if(d.nodeType==3&&(t?v>0:v<d.nodeValue.length)){return false}if(d.parentNode==m&&N&&!t){return true}if(t&&d.nodeType==1&&d==m.firstChild){return true}if(d.nodeName==="TABLE"||d.previousSibling&&d.previousSibling.nodeName=="TABLE"){return N&&!t||!N&&t}n=new e(d,m);if(d.nodeType==3){if(t&&v===0){n.prev()}else if(!t&&v==d.nodeValue.length){n.next()}}while(r=n.current()){if(r.nodeType===1){if(!r.getAttribute("data-mce-bogus")){i=r.nodeName.toLowerCase();if(f[i]&&i!=="br"){return false}}}else if(r.nodeType===3&&!/^[ \t\r\n]*$/.test(r.nodeValue)){return false}if(t){n.prev()}else{n.next()}}return true}function D(e,t){var n,s,o,u,f,l,h=T||"P";s=i.getParent(e,i.isBlock);l=r.getBody().nodeName.toLowerCase();if(!s||!C(s)){s=s||p;if(!s.hasChildNodes()){n=i.create(h);O(n);s.appendChild(n);c.setStart(n,0);c.setEnd(n,0);return n}u=e;while(u.parentNode!=s){u=u.parentNode}while(u&&!i.isBlock(u)){o=u;u=u.previousSibling}if(o&&a.isValidChild(l,h.toLowerCase())){n=i.create(h);O(n);o.parentNode.insertBefore(n,o);u=o;while(u&&!i.isBlock(u)){f=u.nextSibling;n.appendChild(u);u=f}c.setStart(e,t);c.setEnd(e,t)}}return e}function P(){function e(e){var t=E[e?"firstChild":"lastChild"];while(t){if(t.nodeType==1){break}t=t[e?"nextSibling":"previousSibling"]}return t===m}function t(){var e=E.parentNode;if(e.nodeName=="LI"){return e}return E}var n=E.parentNode.nodeName;if(/^(OL|UL|LI)$/.test(n)){T="LI"}b=T?M(T):i.create("BR");if(e(true)&&e()){if(n=="LI"){i.insertAfter(b,t())}else{i.replace(b,E)}}else if(e(true)){if(n=="LI"){i.insertAfter(b,t());b.appendChild(i.doc.createTextNode(" "));b.appendChild(E)}else{E.parentNode.insertBefore(b,E)}}else if(e()){i.insertAfter(b,t());k(b)}else{E=t();h=c.cloneRange();h.setStartAfter(m);h.setEndAfter(E);w=h.extractContents();if(T=="LI"&&w.firstChild.nodeName=="LI"){b=w.firstChild;i.insertAfter(w,E)}else{i.insertAfter(w,E);i.insertAfter(b,E)}}i.remove(m);A(b);u.add()}function H(){var t=new e(d,m),n;while(n=t.next()){if(f[n.nodeName.toLowerCase()]||n.length>0){return true}}}function B(){var e,t,r;if(d&&d.nodeType==3&&v>=d.nodeValue.length){if(!n&&!H()){e=i.create("br");c.insertNode(e);c.setStartAfter(e);c.setEndAfter(e);t=true}}e=i.create("br");c.insertNode(e);if(n&&S=="PRE"&&(!g||g<8)){e.parentNode.insertBefore(i.doc.createTextNode("\r"),e)}r=i.create("span",{},"&nbsp;");e.parentNode.insertBefore(r,e);s.scrollIntoView(r);i.remove(r);if(!t){c.setStartAfter(e);c.setEndAfter(e)}else{c.setStartBefore(e);c.setEndBefore(e)}s.setRng(c);u.add()}function j(e){do{if(e.nodeType===3){e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")}e=e.firstChild}while(e)}function F(e){var t=i.getRoot(),n,r;n=e;while(n!==t&&i.getContentEditable(n)!=="false"){if(i.getContentEditable(n)==="true"){r=n}n=n.parentNode}return n!==t?r:t}function I(e){var t;if(!n){e.normalize();t=e.lastChild;if(!t||/^(left|right)$/gi.test(i.getStyle(t,"float",true))){i.add(e,"br")}}}var c=s.getRng(true),h,p,d,v,m,g,y,b,w,E,S,x,T,N;if(!c.collapsed){r.execCommand("Delete");return}if(l.isDefaultPrevented()){return}d=c.startContainer;v=c.startOffset;T=(o.force_p_newlines?"p":"")||o.forced_root_block;T=T?T.toUpperCase():"";g=i.doc.documentMode;y=l.shiftKey;if(d.nodeType==1&&d.hasChildNodes()){N=v>d.childNodes.length-1;d=d.childNodes[Math.min(v,d.childNodes.length-1)]||d;if(N&&d.nodeType==3){v=d.nodeValue.length}else{v=0}}p=F(d);if(!p){return}u.beforeChange();if(!i.isBlock(p)&&p!=i.getRoot()){if(!T||y){B()}return}if(T&&!y||!T&&y){d=D(d,v)}m=i.getParent(d,i.isBlock);E=m?i.getParent(m.parentNode,i.isBlock):null;S=m?m.nodeName.toUpperCase():"";x=E?E.nodeName.toUpperCase():"";if(x=="LI"&&!l.ctrlKey){m=E;S=x}if(S=="LI"){if(!T&&y){B();return}if(i.isEmpty(m)){P();return}}if(S=="PRE"&&o.br_in_pre!==false){if(!y){B();return}}else{if(!T&&!y&&S!="LI"||T&&y){B();return}}if(T&&m===r.getBody()){return}T=T||"P";if(_()){if(/^(H[1-6]|PRE|FIGURE)$/.test(S)&&x!="HGROUP"){b=M(T)}else{b=M()}if(o.end_container_on_empty_block&&C(E)&&i.isEmpty(m)){b=i.split(E,m)}else{i.insertAfter(b,m)}A(b)}else if(_(true)){b=m.parentNode.insertBefore(M(),m);k(b);A(m)}else{h=c.cloneRange();h.setEndAfter(m);w=h.extractContents();j(w);b=w.firstChild;i.insertAfter(w,m);L(b);I(m);A(b)}i.setAttrib(b,"id","");r.fire("NewBlock",{newBlock:b});u.add()}var i=r.dom,s=r.selection,o=r.settings;var u=r.undoManager,a=r.schema,f=a.getNonEmptyElements();r.on("keydown",function(e){if(e.keyCode==13){if(l(e)!==false){e.preventDefault()}}})}});i("tinymce/ForceBlocks",[],function(){return function(e){function o(){var o=r.getStart(),u=e.getBody(),a;var f,l,c,h,p;var d,v=-16777215,m,g;var y,b,w;w=t.forced_root_block;if(!o||o.nodeType!==1||!w){return}while(o&&o!=u){if(s[o.nodeName]){return}o=o.parentNode}a=r.getRng();if(a.setStart){f=a.startContainer;l=a.startOffset;c=a.endContainer;h=a.endOffset;try{g=e.getDoc().activeElement===u}catch(E){}}else{if(a.item){o=a.item(0);a=e.getDoc().body.createTextRange();a.moveToElementText(o)}g=a.parentElement().ownerDocument===e.getDoc();y=a.duplicate();y.collapse(true);l=y.move("character",v)*-1;if(!y.collapsed){y=a.duplicate();y.collapse(false);h=y.move("character",v)*-1-l}}o=u.firstChild;b=u.nodeName.toLowerCase();while(o){if((o.nodeType===3||o.nodeType==1&&!s[o.nodeName])&&i.isValidChild(b,w.toLowerCase())){if(o.nodeType===3&&o.nodeValue.length===0){d=o;o=o.nextSibling;n.remove(d);continue}if(!p){p=n.create(w,e.settings.forced_root_block_attrs);o.parentNode.insertBefore(p,o);m=true}d=o;o=o.nextSibling;p.appendChild(d)}else{p=null;o=o.nextSibling}}if(m&&g){if(a.setStart){a.setStart(f,l);a.setEnd(c,h);r.setRng(a)}else{try{a=e.getDoc().body.createTextRange();a.moveToElementText(u);a.collapse(true);a.moveStart("character",l);if(h>0){a.moveEnd("character",h)}a.select()}catch(E){}}e.nodeChanged()}}var t=e.settings,n=e.dom,r=e.selection;var i=e.schema,s=i.getBlockElements();if(t.forced_root_block){e.on("NodeChange",o)}}});i("tinymce/EditorCommands",["tinymce/html/Serializer","tinymce/Env","tinymce/util/Tools"],function(e,n,r){var i=r.each,s=r.extend;var o=r.map,u=r.inArray,a=r.explode;var f=n.gecko,l=n.ie;var c=true,h=false;return function(r){function b(e,t,n){var r;e=e.toLowerCase();if(r=v.exec[e]){r(e,t,n);return c}return h}function w(e){var t;e=e.toLowerCase();if(t=v.state[e]){return t(e)}return-1}function E(e){var t;e=e.toLowerCase();if(t=v.value[e]){return t(e)}return h}function S(e,t){t=t||"exec";i(e,function(e,n){i(n.toLowerCase().split(","),function(n){v[t][n]=e})})}function x(e,n,i){if(n===t){n=h}if(i===t){i=null}return r.getDoc().execCommand(e,n,i)}function T(e){return g.match(e)}function N(e,n){g.toggle(e,n?{value:n}:t);r.nodeChanged()}function C(e){y=d.getBookmark(e)}function k(){d.moveToBookmark(y)}var p=r.dom,d=r.selection,v={state:{},exec:{},value:{}},m=r.settings,g=r.formatter,y;s(this,{execCommand:b,queryCommandState:w,queryCommandValue:E,addCommands:S});S({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){r.undoManager.add()},"Cut,Copy,Paste":function(e){var t=r.getDoc(),i;try{x(e)}catch(s){i=c}if(i||!t.queryCommandSupported(e)){var o=r.translate("Your browser doesn't support direct access to the clipboard. "+"Please use the Ctrl+X/C/V keyboard shortcuts instead.");if(n.mac){o=o.replace(/Ctrl\+/g,"⌘+")}r.windowManager.alert(o)}},unlink:function(){if(d.isCollapsed()){var e=d.getNode();if(e.tagName=="A"){r.dom.remove(e,true)}return}g.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var t=e.substring(7);if(t=="full"){t="justify"}i("left,center,right,justify".split(","),function(e){if(t!=e){g.remove("align"+e)}});N("align"+t);b("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(e){var t,n;x(e);t=p.getParent(d.getNode(),"ol,ul");if(t){n=t.parentNode;if(/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName)){C();p.split(n,t);k()}}},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){N(e)},"ForeColor,HiliteColor,FontName":function(e,t,n){N(e,n)},FontSize:function(e,t,n){var r,i;if(n>=1&&n<=7){i=a(m.font_size_style_values);r=a(m.font_size_classes);if(r){n=r[n-1]||n}else{n=i[n-1]||n}}N(e,n)},RemoveFormat:function(e){g.remove(e)},mceBlockQuote:function(){N("blockquote")},FormatBlock:function(e,t,n){return N(n||"p")},mceCleanup:function(){var e=d.getBookmark();r.setContent(r.getContent({cleanup:c}),{cleanup:c});d.moveToBookmark(e)},mceRemoveNode:function(e,t,n){var i=n||d.getNode();if(i!=r.getBody()){C();r.dom.remove(i,c);k()}},mceSelectNodeDepth:function(e,t,n){var i=0;p.getParent(d.getNode(),function(e){if(e.nodeType==1&&i++==n){d.select(e);return h}},r.getBody())},mceSelectNode:function(e,t,n){d.select(n)},mceInsertContent:function(t,n,i){function b(e){function i(e){return n[e]&&n[e].nodeType==3}var t,n,r;t=d.getRng(true);n=t.startContainer;r=t.startOffset;if(n.nodeType==3){if(r>0){e=e.replace(/^&nbsp;/," ")}else if(!i("previousSibling")){e=e.replace(/^ /,"&nbsp;")}if(r<n.length){e=e.replace(/&nbsp;(<br>|)$/," ")}else if(!i("nextSibling")){e=e.replace(/(&nbsp;| )(<br>|)$/,"&nbsp;")}}return e}var s,o,u,a,f,c;var h,v,m,g,y;if(/^ | $/.test(i)){i=b(i)}s=r.parser;o=new e({},r.schema);y='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;&#200B;</span>';c={content:i,format:"html",selection:true};r.fire("BeforeSetContent",c);i=c.content;if(i.indexOf("{$caret}")==-1){i+="{$caret}"}i=i.replace(/\{\$caret\}/,y);v=d.getRng();var w=v.startContainer||(v.parentElement?v.parentElement():null);var E=r.getBody();if(w===E&&d.isCollapsed()){if(p.isBlock(E.firstChild)&&p.isEmpty(E.firstChild)){v=p.createRng();v.setStart(E.firstChild,0);v.setEnd(E.firstChild,0);d.setRng(v)}}if(!d.isCollapsed()){r.getDoc().execCommand("Delete",false,null)}u=d.getNode();var S={context:u.nodeName.toLowerCase()};f=s.parse(i,S);m=f.lastChild;if(m.attr("id")=="mce_marker"){h=m;for(m=m.prev;m;m=m.walk(true)){if(m.type==3||!p.isBlock(m.name)){m.parent.insert(h,m,m.name==="br");break}}}if(!S.invalid){i=o.serialize(f);m=u.firstChild;g=u.lastChild;if(!m||m===g&&m.nodeName==="BR"){p.setHTML(u,i)}else{d.setContent(i)}}else{d.setContent(y);u=d.getNode();a=r.getBody();if(u.nodeType==9){u=m=a}else{m=u}while(m!==a){u=m;m=m.parentNode}i=u==a?a.innerHTML:p.getOuterHTML(u);i=o.serialize(s.parse(i.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return o.serialize(f)})));if(u==a){p.setHTML(a,i)}else{p.setOuterHTML(u,i)}}h=p.get("mce_marker");d.scrollIntoView(h);v=p.createRng();m=h.previousSibling;if(m&&m.nodeType==3){v.setStart(m,m.nodeValue.length);if(!l){g=h.nextSibling;if(g&&g.nodeType==3){m.appendData(g.data);g.parentNode.removeChild(g)}}}else{v.setStartBefore(h);v.setEndBefore(h)}p.remove(h);d.setRng(v);r.fire("SetContent",c);r.addVisual()},mceInsertRawHTML:function(e,t,n){d.setContent("tiny_mce_marker");r.setContent(r.getContent().replace(/tiny_mce_marker/g,function(){return n}))},mceToggleFormat:function(e,t,n){N(n)},mceSetContent:function(e,t,n){r.setContent(n)},"Indent,Outdent":function(e){var t,n,s;t=m.indentation;n=/[a-z%]+$/i.exec(t);t=parseInt(t,10);if(!w("InsertUnorderedList")&&!w("InsertOrderedList")){if(!m.forced_root_block&&!p.getParent(d.getNode(),p.isBlock)){g.apply("div")}i(d.getSelectedBlocks(),function(i){if(i.nodeName!="LI"){var o=r.getParam("indent_use_margin",false)?"margin":"padding";o+=p.getStyle(i,"direction",true)=="rtl"?"Right":"Left";if(e=="outdent"){s=Math.max(0,parseInt(i.style[o]||0,10)-t);p.setStyle(i,o,s?s+n:"")}else{s=parseInt(i.style[o]||0,10)+t+n;p.setStyle(i,o,s)}}})}else{x(e)}},mceRepaint:function(){if(f){try{C(c);if(d.getSel()){d.getSel().selectAllChildren(r.getBody())}d.collapse(c);k()}catch(e){}}},InsertHorizontalRule:function(){r.execCommand("mceInsertContent",false,"<hr />")},mceToggleVisualAid:function(){r.hasVisual=!r.hasVisual;r.addVisual()},mceReplaceContent:function(e,t,n){r.execCommand("mceInsertContent",false,n.replace(/\{\$selection\}/g,d.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;if(typeof n=="string"){n={href:n}}r=p.getParent(d.getNode(),"a");n.href=n.href.replace(" ","%20");if(!r||!n.href){g.remove("link")}if(n.href){g.apply("link",n,r)}},selectAll:function(){var e=p.getRoot(),t;if(d.getRng().setStart){t=p.createRng();t.setStart(e,0);t.setEnd(e,e.childNodes.length);d.setRng(t)}else{t=d.getRng();if(!t.item){t.moveToElementText(e);t.select()}}},"delete":function(){x("Delete");var e=r.getBody();if(p.isEmpty(e)){r.setContent("");if(e.firstChild&&p.isBlock(e.firstChild)){r.selection.setCursorLocation(e.firstChild,0)}else{r.selection.setCursorLocation(e,0)}}},mceNewDocument:function(){r.setContent("")}});S({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var t="align"+e.substring(7);var n=d.isCollapsed()?[p.getParent(d.getNode(),p.isBlock)]:d.getSelectedBlocks();var r=o(n,function(e){return!!g.matchNode(e,t)});return u(r,c)!==-1},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return T(e)},mceBlockQuote:function(){return T("blockquote")},Outdent:function(){var e;if(m.inline_styles){if((e=p.getParent(d.getStart(),p.isBlock))&&parseInt(e.style.paddingLeft,10)>0){return c}if((e=p.getParent(d.getEnd(),p.isBlock))&&parseInt(e.style.paddingLeft,10)>0){return c}}return w("InsertUnorderedList")||w("InsertOrderedList")||!m.inline_styles&&!!p.getParent(d.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(e){var t=p.getParent(d.getNode(),"ul,ol");return t&&(e==="insertunorderedlist"&&t.tagName==="UL"||e==="insertorderedlist"&&t.tagName==="OL")}},"state");S({"FontSize,FontName":function(e){var t=0,n;if(n=p.getParent(d.getNode(),"span")){if(e=="fontsize"){t=n.style.fontSize}else{t=n.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()}}return t}},"value");S({Undo:function(){r.undoManager.undo()},Redo:function(){r.undoManager.redo()}})}});i("tinymce/util/URI",["tinymce/util/Tools"],function(e){function r(e,i){var s=this,o,u;e=n(e);i=s.settings=i||{};if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e)){s.source=e;return}var a=e.indexOf("//")===0;if(e.indexOf("/")===0&&!a){e=(i.base_uri?i.base_uri.protocol||"http":"http")+"://mce_host"+e}if(!/^[\w\-]*:?\/\//.test(e)){u=i.base_uri?i.base_uri.path:(new r(location.href)).directory;if(i.base_uri.protocol===""){e="//mce_host"+s.toAbsPath(u,e)}else{e=(i.base_uri&&i.base_uri.protocol||"http")+"://mce_host"+s.toAbsPath(u,e)}}e=e.replace(/@@/g,"(mce_at)");e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);t(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(t,n){var r=e[n];if(r){r=r.replace(/\(mce_at\)/g,"@@")}s[t]=r});o=i.base_uri;if(o){if(!s.protocol){s.protocol=o.protocol}if(!s.userInfo){s.userInfo=o.userInfo}if(!s.port&&s.host==="mce_host"){s.port=o.port}if(!s.host||s.host==="mce_host"){s.host=o.host}s.source=""}if(a){s.protocol=""}}var t=e.each,n=e.trim;r.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 t=this,n;if(e==="./"){return e}e=new r(e,{base_uri:t});if(e.host!="mce_host"&&t.host!=e.host&&e.host||t.port!=e.port||t.protocol!=e.protocol&&e.protocol!==""){return e.getURI()}var i=t.getURI(),s=e.getURI();if(i==s||i.charAt(i.length-1)=="/"&&i.substr(0,i.length-1)==s){return i}n=t.toRelPath(t.path,e.path);if(e.query){n+="?"+e.query}if(e.anchor){n+="#"+e.anchor}return n},toAbsolute:function(e,t){e=new r(e,{base_uri:this});return e.getURI(this.host==e.host&&this.protocol==e.protocol?t:0)},toRelPath:function(e,t){var n,r=0,i="",s,o;e=e.substring(0,e.lastIndexOf("/"));e=e.split("/");n=t.split("/");if(e.length>=n.length){for(s=0,o=e.length;s<o;s++){if(s>=n.length||e[s]!=n[s]){r=s+1;break}}}if(e.length<n.length){for(s=0,o=n.length;s<o;s++){if(s>=e.length||e[s]!=n[s]){r=s+1;break}}}if(r===1){return t}for(s=0,o=e.length-(r-1);s<o;s++){i+="../"}for(s=r-1,o=n.length;s<o;s++){if(s!=r-1){i+="/"+n[s]}else{i+=n[s]}}return i},toAbsPath:function(e,n){var r,i=0,s=[],o,u;o=/\/$/.test(n)?"/":"";e=e.split("/");n=n.split("/");t(e,function(e){if(e){s.push(e)}});e=s;for(r=n.length-1,s=[];r>=0;r--){if(n[r].length===0||n[r]==="."){continue}if(n[r]===".."){i++;continue}if(i>0){i--;continue}s.push(n[r])}r=e.length-i;if(r<=0){u=s.reverse().join("/")}else{u=e.slice(0,r).join("/")+"/"+s.reverse().join("/")}if(u.indexOf("/")!==0){u="/"+u}if(o&&u.lastIndexOf("/")!==u.length-1){u+=o}return u},getURI:function(e){var t,n=this;if(!n.source||e){t="";if(!e){if(n.protocol){t+=n.protocol+"://"}else{t+="//"}if(n.userInfo){t+=n.userInfo+"@"}if(n.host){t+=n.host}if(n.port){t+=":"+n.port}}if(n.path){t+=n.path}if(n.query){t+="?"+n.query}if(n.anchor){t+="#"+n.anchor}n.source=t}return n.source}};return r});i("tinymce/util/Class",["tinymce/util/Tools"],function(e){function s(){}var t=e.each,n=e.extend;var r,i;s.extend=r=function(e){function l(){var e,t,n,r;if(!i){r=this;if(r.init){r.init.apply(r,arguments)}t=r.Mixins;if(t){e=t.length;while(e--){n=t[e];if(n.init){n.init.apply(r,arguments)}}}}}function c(){return this}function h(e,t){return function(){var n=this,r=n._super,i;n._super=o[e];i=t.apply(n,arguments);n._super=r;return i}}var s=this,o=s.prototype,u,a,f;i=true;u=new s;i=false;if(e.Mixins){t(e.Mixins,function(t){t=t;for(var n in t){if(n!=="init"){e[n]=t[n]}}});if(o.Mixins){e.Mixins=o.Mixins.concat(e.Mixins)}}if(e.Methods){t(e.Methods.split(","),function(t){e[t]=c})}if(e.Properties){t(e.Properties.split(","),function(t){var n="_"+t;e[t]=function(e){var t=this,r;if(e!==r){t[n]=e;return t}return t[n]}})}if(e.Statics){t(e.Statics,function(e,t){l[t]=e})}if(e.Defaults&&o.Defaults){e.Defaults=n({},o.Defaults,e.Defaults)}for(a in e){f=e[a];if(typeof f=="function"&&o[a]){u[a]=h(a,f)}else{u[a]=f}}l.prototype=u;l.constructor=l;l.extend=r;return l};return s});i("tinymce/ui/Selector",["tinymce/util/Class"],function(e){"use strict";function t(e){var t=[],n=e.length,r;while(n--){r=e[n];if(!r.__checked){t.push(r);r.__checked=1}}n=t.length;while(n--){delete t[n].__checked}return t}var n=/^([\w\\*]+)?(?:#([\w\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i;var r=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i=/^\s*|\s*$/g,s;var o=e.extend({init:function(e){function s(e){if(e){e=e.toLowerCase();return function(t){return e==="*"||t.type===e}}}function o(e){if(e){return function(t){return t._name===e}}}function u(e){if(e){e=e.split(".");return function(t){var n=e.length;while(n--){if(!t.hasClass(e[n])){return false}}return true}}}function a(e,t,n){if(e){return function(r){var i=r[e]?r[e]():"";return!t?!!n:t==="="?i===n:t==="*="?i.indexOf(n)>=0:t==="~="?(" "+i+" ").indexOf(" "+n+" ")>=0:t==="!="?i!=n:t==="^="?i.indexOf(n)===0:t==="$="?i.substr(i.length-n.length)===n:false}}}function f(e){var n;if(e){e=/(?:not\((.+)\))|(.+)/i.exec(e);if(!e[1]){e=e[2];return function(t,n,r){return e==="first"?n===0:e==="last"?n===r-1:e==="even"?n%2===0:e==="odd"?n%2===1:t[e]?t[e]():false}}else{n=c(e[1],[]);return function(e){return!t(e,n)}}}}function l(e,t,r){function c(e){if(e){t.push(e)}}var l;l=n.exec(e.replace(i,""));c(s(l[1]));c(o(l[2]));c(u(l[3]));c(a(l[4],l[5],l[6]));c(f(l[7]));t.psuedo=!!l[7];t.direct=r;return t}function c(e,t){var n=[],i,s,o;do{r.exec("");s=r.exec(e);if(s){e=s[3];n.push(s[1]);if(s[2]){i=s[3];break}}}while(s);if(i){c(i,t)}e=[];for(o=0;o<n.length;o++){if(n[o]!=">"){e.push(l(n[o],[],n[o-1]===">"))}}t.push(e);return t}var t=this.match;this._selectors=c(e,[])},match:function(e,t){var n,r,i,s,o,u,a,f,l,c,h,p,d;t=t||this._selectors;for(n=0,r=t.length;n<r;n++){o=t[n];s=o.length;d=e;p=0;for(i=s-1;i>=0;i--){f=o[i];while(d){if(f.psuedo){h=d.parent().items();l=c=h.length;while(l--){if(h[l]===d){break}}}for(u=0,a=f.length;u<a;u++){if(!f[u](d,l,c)){u=a+1;break}}if(u===a){p++;break}else{if(i===s-1){break}}d=d.parent()}}if(p===s){return true}}return false},find:function(e){function a(e,t,r){var i,s,o,u,f,l=t[r];for(i=0,s=e.length;i<s;i++){f=e[i];for(o=0,u=l.length;o<u;o++){if(!l[o](f,i,s)){o=u+1;break}}if(o===u){if(r==t.length-1){n.push(f)}else{if(f.items){a(f.items(),t,r+1)}}}else if(l.direct){return}if(f.items){a(f.items(),t,r)}}}var n=[],r,i,u=this._selectors;if(e.items){for(r=0,i=u.length;r<i;r++){a(e.items(),u[r],0)}if(i>1){n=t(n)}}if(!s){s=o.Collection}return new s(n)}});return o});i("tinymce/ui/Collection",["tinymce/util/Tools","tinymce/ui/Selector","tinymce/util/Class"],function(e,t,n){"use strict";var r,i,s=Array.prototype.push,o=Array.prototype.slice;i={length:0,init:function(e){if(e){this.add(e)}},add:function(t){var n=this;if(!e.isArray(t)){if(t instanceof r){n.add(t.toArray())}else{s.call(n,t)}}else{s.apply(n,t)}return n},set:function(e){var t=this,n=t.length,r;t.length=0;t.add(e);for(r=t.length;r<n;r++){delete t[r]}return t},filter:function(e){var n=this,i,s,o=[],u,a;if(typeof e==="string"){e=new t(e);a=function(t){return e.match(t)}}else{a=e}for(i=0,s=n.length;i<s;i++){u=n[i];if(a(u)){o.push(u)}}return new r(o)},slice:function(){return new r(o.apply(this,arguments))},eq:function(e){return e===-1?this.slice(e):this.slice(e,+e+1)},each:function(t){e.each(this,t);return this},toArray:function(){return e.toArray(this)},indexOf:function(e){var t=this,n=t.length;while(n--){if(t[n]===e){break}}return n},reverse:function(){return new r(e.toArray(this).reverse())},hasClass:function(e){return this[0]?this[0].hasClass(e):false},prop:function(e,t){var n=this,r,i;if(t!==r){n.each(function(n){if(n[e]){n[e](t)}});return n}i=n[0];if(i&&i[e]){return i[e]()}},exec:function(t){var n=this,r=e.toArray(arguments).slice(1);n.each(function(e){if(e[t]){e[t].apply(e,r)}});return n},remove:function(){var e=this.length;while(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);this.each(function(e){if(t in e){e[t].apply(e,n)}});return 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;return r});i("tinymce/ui/DomUtils",["tinymce/util/Tools","tinymce/dom/DOMUtils"],function(e,t){"use strict";return{id:function(){return t.DOM.uniqueId()},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)}}});i("tinymce/ui/Control",["tinymce/util/Class","tinymce/util/Tools","tinymce/ui/Collection","tinymce/ui/DomUtils"],function(e,t,n,r){"use strict";var i=t.makeMap("focusin focusout scroll click dblclick mousedown mouseup mousemove mouseover"+" mouseout mouseenter mouseleave wheel keydown keypress keyup contextmenu"," ");var s={};var o="onmousewheel"in document;var u=false;var a=e.extend({Statics:{elementIdCache:s},isRtl:function(){return a.rtl},classPrefix:"mce-",init:function(e){var n=this,i,s;n.settings=e=t.extend({},n.Defaults,e);n._id=r.id();n._text=n._name="";n._width=n._height=0;n._aria={role:e.role};i=e.classes;if(i){i=i.split(" ");i.map={};s=i.length;while(s--){i.map[i[s]]=true}}n._classes=i||[];n.visible(true);t.each("title text width height name classes visible disabled active value".split(" "),function(t){var r=e[t],i;if(r!==i){n[t](r)}else if(n["_"+t]===i){n["_"+t]=false}});n.on("click",function(){if(n.disabled()){return false}});if(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);if(e.hidden){n.hide()}},Properties:"parent,title,text,width,height,disabled,active,name,value",Methods:"renderHtml",getContainerElm:function(){return document.body},getParentCtrl:function(e){var t,n=this.getRoot().controlIdLookup;while(e&&n){t=n[e.id];if(t){break}e=e.parentNode}return t},parseBox:function(e){var t,n=10;if(!e){return}if(typeof e==="number"){e=e||0;return{top:e,left:e,bottom:e,right:e}}e=e.split(" ");t=e.length;if(t===1){e[1]=e[2]=e[3]=e[0]}else if(t===2){e[2]=e[0];e[3]=e[1]}else if(t===3){e[3]=e[1]}return{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;if(n){t=t.replace(/[A-Z]/g,function(e){return"-"+e});return n.getComputedStyle(e,null).getPropertyValue(t)}return 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,i;var s=e.getEl(),o,u,a,f,l;var c,h,p;n=e._borderBox=e._borderBox||e.measureBox(s,"border");e._paddingBox=e._paddingBox||e.measureBox(s,"padding");e._marginBox=e._marginBox||e.measureBox(s,"margin");p=r.getSize(s);c=t.minWidth;h=t.minHeight;a=c||p.width;f=h||p.height;o=t.width;u=t.height;l=t.autoResize;l=typeof l!="undefined"?l:!o&&!u;o=o||a;u=u||f;var d=n.left+n.right;var v=n.top+n.bottom;var m=t.maxWidth||65535;var g=t.maxHeight||65535;e._layoutRect=i={x:t.x||0,y:t.y||0,w:o,h:u,deltaW:d,deltaH:v,contentW:o-d,contentH:u-v,innerW:o-d,innerH:u-v,startMinWidth:c||0,startMinHeight:h||0,minW:Math.min(a,m),minH:Math.min(f,g),maxW:m,maxH:g,autoResize:l,scrollW:0};e._lastLayoutRect={};return i},layoutRect:function(e){var t=this,n=t._layoutRect,r,i,s,o,u,f;if(!n){n=t.initLayoutRect()}if(e){s=n.deltaW;o=n.deltaH;if(e.x!==u){n.x=e.x}if(e.y!==u){n.y=e.y}if(e.minW!==u){n.minW=e.minW}if(e.minH!==u){n.minH=e.minH}i=e.w;if(i!==u){i=i<n.minW?n.minW:i;i=i>n.maxW?n.maxW:i;n.w=i;n.innerW=i-s}i=e.h;if(i!==u){i=i<n.minH?n.minH:i;i=i>n.maxH?n.maxH:i;n.h=i;n.innerH=i-o}i=e.innerW;if(i!==u){i=i<n.minW-s?n.minW-s:i;i=i>n.maxW-s?n.maxW-s:i;n.innerW=i;n.w=i+s}i=e.innerH;if(i!==u){i=i<n.minH-o?n.minH-o:i;i=i>n.maxH-o?n.maxH-o:i;n.innerH=i;n.h=i+o}if(e.contentW!==u){n.contentW=e.contentW}if(e.contentH!==u){n.contentH=e.contentH}r=t._lastLayoutRect;if(r.x!==n.x||r.y!==n.y||r.w!==n.w||r.h!==n.h){f=a.repaintControls;if(f){if(f.map&&!f.map[t._id]){f.push(t);f.map[t._id]=true}}r.x=n.x;r.y=n.y;r.w=n.w;r.h=n.h}return t}return n},repaint:function(){var e=this,t,n,r,i,s=0,o=0,u,a;a=!document.createRange?Math.round:function(e){return e};t=e.getEl().style;r=e._layoutRect;u=e._lastRepaintRect||{};i=e._borderBox;s=i.left+i.right;o=i.top+i.bottom;if(r.x!==u.x){t.left=a(r.x)+"px";u.x=r.x}if(r.y!==u.y){t.top=a(r.y)+"px";u.y=r.y}if(r.w!==u.w){t.width=a(r.w-s)+"px";u.w=r.w}if(r.h!==u.h){t.height=a(r.h-o)+"px";u.h=r.h}if(e._hasBody&&r.innerW!==u.innerW){n=e.getEl("body").style;n.width=a(r.innerW)+"px";u.innerW=r.innerW}if(e._hasBody&&r.innerH!==u.innerH){n=n||e.getEl("body").style;n.height=a(r.innerH)+"px";u.innerH=r.innerH}e._lastRepaintRect=u;e.fire("repaint",{},false)},on:function(e,t){function a(e){var t,r;return function(i){if(!t){n.parents().each(function(n){var i=n.settings.callbacks;if(i&&(t=i[e])){r=n;return false}})}return t.call(r,i)}}var n=this,r,s,o,u;if(t){if(typeof t=="string"){t=a(t)}o=e.toLowerCase().split(" ");u=o.length;while(u--){e=o[u];r=n._bindings;if(!r){r=n._bindings={}}s=r[e];if(!s){s=r[e]=[]}s.push(t);if(i[e]){if(!n._nativeEvents){n._nativeEvents={name:true}}else{n._nativeEvents[e]=true}if(n._rendered){n.bindPendingEvents()}}}}return n},off:function(e,t){var n=this,r,i=n._bindings,s,o,u,a;if(i){if(e){u=e.toLowerCase().split(" ");r=u.length;while(r--){e=u[r];s=i[e];if(!e){for(o in i){i[o].length=0}return n}if(s){if(!t){s.length=0}else{a=s.length;while(a--){if(s[a]===t){s.splice(a,1)}}}}}}else{n._bindings=[]}}return n},fire:function(e,t,n){function a(){return false}function f(){return true}var r=this,i,s,o,u;e=e.toLowerCase();t=t||{};if(!t.type){t.type=e}if(!t.control){t.control=r}if(!t.preventDefault){t.preventDefault=function(){t.isDefaultPrevented=f};t.stopPropagation=function(){t.isPropagationStopped=f};t.stopImmediatePropagation=function(){t.isImmediatePropagationStopped=f};t.isDefaultPrevented=a;t.isPropagationStopped=a;t.isImmediatePropagationStopped=a}if(r._bindings){o=r._bindings[e];if(o){for(i=0,s=o.length;i<s;i++){if(!t.isImmediatePropagationStopped()&&o[i].call(r,t)===false){break}}}}if(n!==false){u=r.parent();while(u&&!t.isPropagationStopped()){u.fire(e,t,false);u=u.parent()}}return t},hasEventListeners:function(e){return e in this._bindings},parents:function(e){var t=this,r=new n;for(t=t.parent();t;t=t.parent()){r.add(t)}if(e){r=r.filter(e)}return r},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){var n;while(e){n=t;while(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"];e=this.classPrefix+e;return n&&!!n.map[e]},addClass:function(e,t){var n=this,r,i;e=this.classPrefix+e;r=n._classes[t||"control"];if(!r){r=[];r.map={};n._classes[t||"control"]=r}if(!r.map[e]){r.map[e]=e;r.push(e);if(n._rendered){i=n.getEl(t);if(i){i.className=r.join(" ")}}}return n},removeClass:function(e,t){var n=this,r,i,s;e=this.classPrefix+e;r=n._classes[t||"control"];if(r&&r.map[e]){delete r.map[e];i=r.length;while(i--){if(r[i]===e){r.splice(i,1)}}}if(n._rendered){s=n.getEl(t);if(s){s.className=r.join(" ")}}return n},toggleClass:function(e,t,n){var r=this;if(t){r.addClass(e,n)}else{r.removeClass(e,n)}return r},classes:function(e){var t=this._classes[e||"control"];return t?t.join(" "):""},innerHtml:function(e){r.innerHtml(this.getEl(),e);return this},getEl:function(e,t){var n,i=e?this._id+"-"+e:this._id;n=s[i]=(t===true?null:s[i])||r.get(i);return n},visible:function(e){var t=this,n;if(typeof e!=="undefined"){if(t._visible!==e){if(t._rendered){t.getEl().style.display=e?"":"none"}t._visible=e;n=t.parent();if(n){n._lastRect=null}t.fire(e?"show":"hide")}return t}return t._visible},show:function(){return this.visible(true)},hide:function(){return this.visible(false)},focus:function(){try{this.getEl().focus()}catch(e){}return this},blur:function(){this.getEl().blur();return this},aria:function(e,t){var n=this,r=n.getEl();if(typeof t==="undefined"){return n._aria[e]}else{n._aria[e]=t}if(n._rendered){if(e=="label"){r.setAttribute("aria-labelledby",n._id)}r.setAttribute(e=="role"?e:"aria-"+e,t)}return n},encode:function(e,t){if(t!==false&&a.translate){e=a.translate(e)}return(e||"").replace(/[&<>"]/g,function(e){return"&#"+e.charCodeAt(0)+";"})},before:function(e){var t=this,n=t.parent();if(n){n.insert(e,n.items().indexOf(t),true)}return t},after:function(e){var t=this,n=t.parent();if(n){n.insert(e,n.items().indexOf(t))}return t},remove:function(){var e=this,t=e.getEl(),n=e.parent(),i,o;if(e.items){var u=e.items().toArray();o=u.length;while(o--){u[o].remove()}}if(n&&n.items){i=[];n.items().each(function(t){if(t!==e){i.push(t)}});n.items().set(i);n._lastRect=null}if(e._eventsRoot&&e._eventsRoot==e){r.off(t)}var a=e.getRoot().controlIdLookup;if(a){delete a[e._id]}delete s[e._id];if(t&&t.parentNode){var f=t.getElementsByTagName("*");o=f.length;while(o--){delete s[f[o].id]}t.parentNode.removeChild(t)}e._rendered=false;return e},renderBefore:function(e){var t=this;e.parentNode.insertBefore(r.createFragment(t.renderHtml()),e);t.postRender();return t},renderTo:function(e){var t=this;e=e||t.getContainerElm();e.appendChild(r.createFragment(t.renderHtml()));t.postRender();return t},postRender:function(){var e=this,t=e.settings,n,i,s,o,u;for(o in t){if(o.indexOf("on")===0){e.on(o.substr(2),t[o])}}if(e._eventsRoot){for(s=e.parent();!u&&s;s=s.parent()){u=s._eventsRoot}if(u){for(o in u._nativeEvents){e._nativeEvents[o]=true}}}e.bindPendingEvents();if(t.style){n=e.getEl();if(n){n.setAttribute("style",t.style);n.style.cssText=t.style}}if(!e._visible){r.css(e.getEl(),"display","none")}if(e.settings.border){i=e.borderBox();r.css(e.getEl(),{"border-top-width":i.top,"border-right-width":i.right,"border-bottom-width":i.bottom,"border-left-width":i.left})}var a=e.getRoot();if(!a.controlIdLookup){a.controlIdLookup={}}a.controlIdLookup[e._id]=e;for(var f in e._aria){e.aria(f,e._aria[f])}e.fire("postrender",{},false)},scrollIntoView:function(e){function t(e,t){var n,r,i=e;n=r=0;while(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;var i,s,o,u,a,f;var l=t(n,r);i=l.x;s=l.y;o=n.offsetWidth;u=n.offsetHeight;a=r.clientWidth;f=r.clientHeight;if(e=="end"){i-=a-o;s-=f-u}else if(e=="center"){i-=a/2-o/2;s-=f/2-u/2}r.scrollLeft=i;r.scrollTop=s;return this},bindPendingEvents:function(){function l(t){var n=e.getParentCtrl(t.target);if(n){n.fire(t.type,t)}}function c(){var e=s._lastHoverCtrl;if(e){e.fire("mouseleave",{target:e.getEl()});e.parents().each(function(e){e.fire("mouseleave",{target:e.getEl()})});s._lastHoverCtrl=null}}function h(t){var n=e.getParentCtrl(t.target),r=s._lastHoverCtrl,i=0,o,u,a;if(n!==r){s._lastHoverCtrl=n;u=n.parents().toArray().reverse();u.push(n);if(r){a=r.parents().toArray().reverse();a.push(r);for(i=0;i<a.length;i++){if(u[i]!==a[i]){break}}for(o=a.length-1;o>=i;o--){r=a[o];r.fire("mouseleave",{target:r.getEl()})}}for(o=i;o<u.length;o++){n=u[o];n.fire("mouseenter",{target:n.getEl()})}}}function p(t){t.preventDefault();if(t.type=="mousewheel"){t.deltaY=-1/40*t.wheelDelta;if(t.wheelDeltaX){t.deltaX=-1/40*t.wheelDeltaX}}else{t.deltaX=0;t.deltaY=t.detail}t=e.fire("wheel",t)}var e=this,t,n,i,s,a,f;e._rendered=true;a=e._nativeEvents;if(a){i=e.parents().toArray();i.unshift(e);for(t=0,n=i.length;!s&&t<n;t++){s=i[t]._eventsRoot}if(!s){s=i[i.length-1]||e}e._eventsRoot=s;for(n=t,t=0;t<n;t++){i[t]._eventsRoot=s}for(f in a){if(!a){return false}if(f==="wheel"&&!u){if(o){r.on(e.getEl(),"mousewheel",p)}else{r.on(e.getEl(),"DOMMouseScroll",p)}continue}if(f==="mouseenter"||f==="mouseleave"){if(!s._hasMouseEnter){r.on(s.getEl(),"mouseleave",c);r.on(s.getEl(),"mouseover",h);s._hasMouseEnter=1}}else if(!s[f]){r.on(s.getEl(),f,l);s[f]=true}a[f]=false}}},getRoot:function(){var e=this,t,n=[];while(e){if(e.rootControl){t=e.rootControl;break}n.push(e);t=e;e=e.parent()}if(!t){t=this}var r=n.length;while(r--){n[r].rootControl=t}return t},reflow:function(){this.repaint();return this}});return a});i("tinymce/ui/Factory",[],function(){"use strict";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,s,o;if(!t){o=tinymce.ui;for(s in o){e[s.toLowerCase()]=o[s]}t=true}if(typeof n=="string"){r=r||{};r.type=n}else{r=n;n=r.type}n=n.toLowerCase();i=e[n];if(!i){throw new Error("Could not find control by type: "+n)}i=new i(r);i.type=n;return i}}});i("tinymce/ui/Container",["tinymce/ui/Control","tinymce/ui/Collection","tinymce/ui/Selector","tinymce/ui/Factory","tinymce/util/Tools","tinymce/ui/DomUtils"],function(e,t,n,r,i,s){"use strict";var o={};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;if(n.isRtl()){n.addClass("rtl")}n.addClass("container");n.addClass("container-body","body");if(e.containerCls){n.addClass(e.containerCls)}n._layout=r.create((e.layout||n.layout)+"layout");if(n.settings.items){n.add(n.settings.items)}n._hasBody=true},items:function(){return this._items},find:function(e){e=o[e]=o[e]||new n(e);return e.find(this)},add:function(e){var t=this;t.items().add(t.create(e)).parent(t);return t},focus:function(){var e=this;if(e.keyNav){e.keyNav.focusFirst()}else{e._super()}return e},replace:function(e,t){var n,r=this.items(),i=r.length;while(i--){if(r[i]===e){r[i]=t;break}}if(i>=0){n=t.getEl();if(n){n.parentNode.removeChild(n)}n=e.getEl();if(n){n.parentNode.removeChild(n)}}t.parent(this)},create:function(t){var n=this,s,o=[];if(!i.isArray(t)){t=[t]}i.each(t,function(t){if(t){if(!(t instanceof e)){if(typeof t=="string"){t={type:t}}s=i.extend({},n.settings.defaults,t);t.type=s.type=s.type||t.type||n.settings.defaultType||(s.defaults?s.defaults.type:null);t=r.create(s)}o.push(t)}});return o},renderNew:function(){var e=this;e.items().each(function(t,n){var r,i;t.parent(e);if(!t._rendered){r=e.getEl("body");i=s.createFragment(t.renderHtml());if(r.hasChildNodes()&&n<=r.childNodes.length-1){r.insertBefore(i,r.childNodes[n])}else{r.appendChild(i)}t.postRender()}});e._layout.applyClasses(e);e._lastRect=null;return e},append:function(e){return this.add(e).renderNew()},prepend:function(e){var t=this;t.items().set(t.create(e).concat(t.items().toArray()));return t.renderNew()},insert:function(e,t,n){var r=this,i,s,o;e=r.create(e);i=r.items();if(!n&&t<i.length-1){t+=1}if(t>=0&&t<i.length){s=i.slice(0,t).toArray();o=i.slice(t).toArray();i.set(s.concat(e,o))}return 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={};e.find("*").each(function(e){var n=e.name(),r=e.value();if(n&&typeof r!="undefined"){t[n]=r}});return t},preRender:function(){},renderHtml:function(){var e=this,t=e._layout,n=this.settings.role;e.preRender();t.preRender(e);return'<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;e.items().exec("postRender");e._super();e._layout.postRender(e);e._rendered=true;if(e.settings.style){s.css(e.getEl(),e.settings.style)}if(e.settings.border){t=e.borderBox();s.css(e.getEl(),{"border-top-width":t.top,"border-right-width":t.right,"border-bottom-width":t.bottom,"border-left-width":t.left})}return e},initLayoutRect:function(){var e=this,t=e._super();e._layout.recalc(e);return t},recalc:function(){var e=this,t=e._layoutRect,n=e._lastRect;if(!n||n.w!=t.w||n.h!=t.h){e._layout.recalc(e);t=e.layoutRect();e._lastRect={x:t.x,y:t.y,w:t.w,h:t.h};return true}},reflow:function(){var t,n;if(this.visible()){e.repaintControls=[];e.repaintControls.map={};n=this.recalc();t=e.repaintControls.length;while(t--){e.repaintControls[t].repaint()}if(this.settings.layout!=="flow"&&this.settings.layout!=="stack"){this.repaint()}e.repaintControls=[]}return this}})});i("tinymce/ui/DragHelper",["tinymce/ui/DomUtils"],function(e){"use strict";function t(){var e=document,t,n,r,i;var s,o,u,a,f=Math.max;t=e.documentElement;n=e.body;r=f(t.scrollWidth,n.scrollWidth);i=f(t.clientWidth,n.clientWidth);s=f(t.offsetWidth,n.offsetWidth);o=f(t.scrollHeight,n.scrollHeight);u=f(t.clientHeight,n.clientHeight);a=f(t.offsetHeight,n.offsetHeight);return{width:r<s?i:r,height:o<a?u:o}}return function(n,r){function h(){return s.getElementById(r.handle||n)}var i,s=document,o,u,a,f,l,c;r=r||{};u=function(n){var u=t(),p,d;n.preventDefault();o=n.button;p=h();l=n.screenX;c=n.screenY;if(window.getComputedStyle){d=window.getComputedStyle(p,null).getPropertyValue("cursor")}else{d=p.runtimeStyle.cursor}i=s.createElement("div");e.css(i,{position:"absolute",top:0,left:0,width:u.width,height:u.height,zIndex:2147483647,opacity:1e-4,background:"red",cursor:d});s.body.appendChild(i);e.on(s,"mousemove",f);e.on(s,"mouseup",a);r.start(n)};f=function(e){if(e.button!==o){return a(e)}e.deltaX=e.screenX-l;e.deltaY=e.screenY-c;e.preventDefault();r.drag(e)};a=function(t){e.off(s,"mousemove",f);e.off(s,"mouseup",a);i.parentNode.removeChild(i);if(r.stop){r.stop(t)}};this.destroy=function(){e.off(h())};e.on(h(),"mousedown",u)}});i("tinymce/ui/Scrollable",["tinymce/ui/DomUtils","tinymce/ui/DragHelper"],function(e,t){"use strict";return{init:function(){var e=this;e.on("repaint",e.renderScroll)},renderScroll:function(){function i(){function o(s,o,u,a,f,l){var c,h,p;var d,v,m,g;var y,b;h=n.getEl("scroll"+s);if(h){y=o.toLowerCase();b=u.toLowerCase();if(n.getEl("absend")){e.css(n.getEl("absend"),y,n.layoutRect()[a]-1)}if(!f){e.css(h,"display","none");return}e.css(h,"display","block");c=n.getEl("body");p=n.getEl("scroll"+s+"t");d=c["client"+u]-r*2;d-=t&&i?h["client"+l]:0;v=c["scroll"+u];m=d/v;g={};g[y]=c["offset"+o]+r;g[b]=d;e.css(h,g);g={};g[y]=c["scroll"+o]*m;g[b]=d*m;e.css(p,g)}}var t,i,s;s=n.getEl("body");t=s.scrollWidth>s.clientWidth;i=s.scrollHeight>s.clientHeight;o("h","Left","Width","contentW",t,"Height");o("v","Top","Height","contentH",i,"Width")}function s(){function i(i,s,o,u,a){var f,l=n._id+"-scroll"+i,c=n.classPrefix;n.getEl().appendChild(e.createFragment('<div id="'+l+'" class="'+c+"scrollbar "+c+"scrollbar-"+i+'">'+'<div id="'+l+'t" class="'+c+'scrollbar-thumb"></div>'+"</div>"));n.draghelper=new t(l+"t",{start:function(){f=n.getEl("body")["scroll"+s];e.addClass(e.get(l),c+"active")},drag:function(e){var t,l,c,h,p=n.layoutRect();l=p.contentW>p.innerW;c=p.contentH>p.innerH;h=n.getEl("body")["client"+o]-r*2;h-=l&&c?n.getEl("scroll"+i)["client"+a]:0;t=h/n.getEl("body")["scroll"+o];n.getEl("body")["scroll"+s]=f+e["delta"+u]/t},stop:function(){e.removeClass(e.get(l),c+"active")}})}n.addClass("scroll");i("v","Top","Height","Y","Width");i("h","Left","Width","X","Height")}var n=this,r=2;if(n.settings.autoScroll){if(!n._hasScroll){n._hasScroll=true;s();n.on("wheel",function(e){var t=n.getEl("body");t.scrollLeft+=(e.deltaX||0)*10;t.scrollTop+=e.deltaY*10;i()});e.on(n.getEl("body"),"scroll",i)}i()}}}});i("tinymce/ui/Panel",["tinymce/ui/Container","tinymce/ui/Scrollable"],function(e,t){"use strict";return e.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[t],renderHtml:function(){var e=this,t=e._layout,n=e.settings.html;e.preRender();t.preRender(e);if(typeof n=="undefined"){n='<div id="'+e._id+'-body" class="'+e.classes("body")+'">'+t.renderHtml(e)+"</div>"}else{if(typeof n=="function"){n=n.call(e)}e._hasBody=false}return'<div id="'+e._id+'" class="'+e.classes()+'" hideFocus="1" tabIndex="-1">'+(e._preBodyHtml||"")+n+"</div>"}})});i("tinymce/ui/Movable",["tinymce/ui/DomUtils"],function(e){"use strict";function t(t,n,r){var i,s,o,u,a,f,l,c,h,p;h=e.getViewPort();s=e.getPos(n);o=s.x;u=s.y;if(t._fixed){o-=h.x;u-=h.y}i=t.getEl();p=e.getSize(i);a=p.width;f=p.height;p=e.getSize(n);l=p.width;c=p.height;r=(r||"").split("");if(r[0]==="b"){u+=c}if(r[1]==="r"){o+=l}if(r[0]==="c"){u+=Math.round(c/2)}if(r[1]==="c"){o+=Math.round(l/2)}if(r[3]==="b"){u-=f}if(r[4]==="r"){o-=a}if(r[3]==="c"){u-=Math.round(f/2)}if(r[4]==="c"){o-=Math.round(a/2)}return{x:o,y:u,w:a,h:f}}return{testMoveRel:function(n,r){var i=e.getViewPort();for(var s=0;s<r.length;s++){var o=t(this,n,r[s]);if(this._fixed){if(o.x>0&&o.x+o.w<i.w&&o.y>0&&o.y+o.h<i.h){return r[s]}}else{if(o.x>i.x&&o.x+o.w<i.w+i.x&&o.y>i.y&&o.y+o.h<i.h+i.y){return r[s]}}}return r[0]},moveRel:function(e,n){if(typeof n!="string"){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();n.moveTo(r.x+e,r.y+t);return n},moveTo:function(t,n){function i(e,t,n){if(e<0){return 0}if(e+n>t){e=t-n;return e<0?0:e}return e}var r=this;if(r.settings.constrainToViewport){var s=e.getViewPort(window);var o=r.layoutRect();t=i(t,s.w+s.x,o.w);n=i(n,s.h+s.y,o.h)}if(r._rendered){r.layoutRect({x:t,y:n}).repaint()}else{r.settings.x=t;r.settings.y=n}r.fire("move",{x:t,y:n});return r}}});i("tinymce/ui/Resizable",["tinymce/ui/DomUtils"],function(e){"use strict";return{resizeToContent:function(){this._layoutRect.autoResize=true;this._lastRect=null;this.reflow()},resizeTo:function(t,n){if(t<=1||n<=1){var r=e.getWindowSize();t=t<=1?t*r.w:t;n=n<=1?n*r.h:n}this._layoutRect.autoResize=false;return 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)}}});i("tinymce/ui/FloatPanel",["tinymce/ui/Panel","tinymce/ui/Movable","tinymce/ui/Resizable","tinymce/ui/DomUtils"],function(e,t,n,r){"use strict";function l(e){var t;t=o.length;while(t--){if(o[t]===e){o.splice(t,1)}}t=u.length;while(t--){if(u[t]===e){u.splice(t,1)}}}var i,s,o=[];var u=[],a;var f=e.extend({Mixins:[t,n],init:function(e){function n(){var e,n=f.zIndex||65535,i;if(u.length){for(e=0;e<u.length;e++){if(u[e].modal){n++;i=u[e]}u[e].getEl().style.zIndex=n;u[e].zIndex=n;n++}}var s=document.getElementById(t.classPrefix+"modal-block");if(i){r.css(s,"z-index",i.zIndex-1)}else if(s){s.parentNode.removeChild(s);a=false}f.currentZIndex=n}function l(e,t){while(e){if(e==t){return true}e=e.parent()}}function c(e){function n(t,n){var r;for(var i=0;i<o.length;i++){if(o[i]!=e){r=o[i].parent();while(r&&(r=r.parent())){if(r==e){o[i].fixed(t).moveBy(0,n).repaint()}}}}}var t=r.getViewPort().y;if(e.settings.autofix){if(!e._fixed){e._autoFixY=e.layoutRect().y;if(e._autoFixY<t){e.fixed(true).layoutRect({y:0}).repaint();n(true,t-e._autoFixY)}}else{if(e._autoFixY>t){e.fixed(false).layoutRect({y:e._autoFixY}).repaint();n(false,e._autoFixY-t)}}}}var t=this;t._super(e);t._eventsRoot=t;t.addClass("floatpanel");if(e.autohide){if(!i){i=function(e){var t=o.length;while(t--){var n=o[t],r=n.getParentCtrl(e.target);if(n.settings.autohide){if(r){if(l(r,n)||n.parent()===r){continue}}e=n.fire("autohide",{target:e.target});if(!e.isDefaultPrevented()){n.hide()}}}};r.on(document,"click",i)}o.push(t)}if(e.autofix){if(!s){s=function(){var e;e=o.length;while(e--){c(o[e])}};r.on(window,"scroll",s)}t.on("move",function(){c(this)})}t.on("postrender show",function(e){if(e.control==t){var i,s=t.classPrefix;if(t.modal&&!a){i=r.createFragment('<div id="'+s+'modal-block" class="'+s+"reset "+s+'fade"></div>');i=i.firstChild;t.getContainerElm().appendChild(i);setTimeout(function(){r.addClass(i,s+"in");r.addClass(t.getEl(),s+"in")},0);a=true}u.push(t);n()}});t.on("close hide",function(e){if(e.control==t){var r=u.length;while(r--){if(u[r]===t){u.splice(r,1)}}n()}});t.on("show",function(){t.parents().each(function(e){if(e._fixed){t.fixed(true);return false}})});if(e.popover){t._preBodyHtml='<div class="'+t.classPrefix+'arrow"></div>';t.addClass("popover").addClass("bottom").addClass(t.isRtl()?"end":"start")}},fixed:function(e){var t=this;if(t._fixed!=e){if(t._rendered){var n=r.getViewPort();if(e){t.layoutRect().y-=n.y}else{t.layoutRect().y+=n.y}}t.toggleClass("fixed",e);t._fixed=e}return t},show:function(){var e=this,t,n=e._super();t=o.length;while(t--){if(o[t]===e){break}}if(t===-1){o.push(e)}return n},hide:function(){l(this);return this._super()},hideAll:function(){f.hideAll()},close:function(){var e=this;e.fire("close");return e.remove()},remove:function(){l(this);this._super()}});f.hideAll=function(){var e=o.length;while(e--){var t=o[e];if(t.settings.autohide){t.fire("cancel",{},false);t.hide();o.splice(e,1)}}};return f});i("tinymce/ui/KeyboardNavigation",["tinymce/ui/DomUtils"],function(e){"use strict";return function(t){function u(){if(!s){s=[];if(n.find){n.find("*").each(function(e){if(e.canFocus){s.push(e.getEl())}})}else{var e=n.getEl().getElementsByTagName("*");for(var t=0;t<e.length;t++){if(e[t].id&&e[t]){s.push(e[t])}}}}}function a(){return document.getElementById(o)}function f(e){e=e||a();return e&&e.getAttribute("role")}function l(e){var t,n=e||a();while(n=n.parentNode){if(t=f(n)){return t}}}function c(e){var t=document.getElementById(o);if(t){return t.getAttribute("aria-"+e)}}function h(){var n=a();if(n&&(n.nodeName=="TEXTAREA"||n.type=="text")){return}if(t.onAction){t.onAction(o)}else{e.fire(a(),"click",{keyboard:true})}return true}function p(){var e;if(t.onCancel){if(e=a()){e.blur()}t.onCancel()}else{t.root.fire("cancel")}}function d(e){function l(e){var t=n?n.getEl():document.body;while(e&&e!=t){if(e.style.display=="none"){return false}e=e.parentNode}return true}var r=-1,i,a;var f=[];u();a=f.length;for(a=0;a<s.length;a++){if(l(s[a])){f.push(s[a])}}a=f.length;while(a--){if(f[a].id===o){r=a;break}}r+=e;if(r<0){r=f.length-1}else if(r>=f.length){r=0}i=f[r];i.focus();o=i.id;if(t.actOnFocus){h()}}function v(){var e,n;n=f(t.root.getEl());u();e=s.length;while(e--){if(n=="toolbar"&&s[e].id===o){s[e].focus();return}}s[0].focus()}var n=t.root,r=t.enableUpDown!==false;var i=t.enableLeftRight!==false;var s=t.items,o;n.on("keydown",function(e){var n=37,s=39,o=38,u=40;var a=27,v=14,m=13,g=32,y=9;var b;switch(e.keyCode){case n:if(i){if(t.leftAction){t.leftAction()}else{d(-1)}b=true}break;case s:if(i){if(f()=="menuitem"&&l()=="menu"){if(c("haspopup")){h()}}else{d(1)}b=true}break;case o:if(r){d(-1);b=true}break;case u:if(r){if(f()=="menuitem"&&l()=="menubar"){h()}else if(f()=="button"&&c("haspopup")){h()}else{d(1)}b=true}break;case y:b=true;if(e.shiftKey){d(-1)}else{d(1)}break;case a:b=true;p();break;case v:case m:case g:b=h();break}if(b){e.stopPropagation();e.preventDefault()}});n.on("focusin",function(e){u();o=e.target.id});return{moveFocus:d,focusFirst:v,cancel:p}}});i("tinymce/ui/Window",["tinymce/ui/FloatPanel","tinymce/ui/Panel","tinymce/ui/DomUtils","tinymce/ui/KeyboardNavigation","tinymce/ui/DragHelper"],function(e,t,n,r,i){"use strict";var s=e.extend({modal:true,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);if(n.isRtl()){n.addClass("rtl")}n.addClass("window");n._fixed=true;if(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){if(e.target.className.indexOf(n.classPrefix+"close")!=-1){n.close()}});n.aria("label",e.title);n._fullscreen=false},recalc:function(){var e=this,t=e.statusbar,r,i,s,o;if(e._fullscreen){e.layoutRect(n.getWindowSize());e.layoutRect().contentH=e.layoutRect().innerH}e._super();r=e.layoutRect();if(e.settings.title&&!e._fullscreen){i=r.headerW;if(i>r.w){s=r.x-Math.max(0,i/2);e.layoutRect({w:i,x:s});o=true}}if(t){t.layoutRect({w:e.layoutRect().innerW}).recalc();i=t.layoutRect().minW+r.deltaW;if(i>r.w){s=r.x-Math.max(0,i-r.w);e.layoutRect({w:i,x:s});o=true}}if(o){e.recalc()}},initLayoutRect:function(){var e=this,t=e._super(),r=0,i;if(e.settings.title&&!e._fullscreen){i=e.getEl("head");var s=n.getSize(i);t.headerW=s.width;t.headerH=s.height;r+=t.headerH}if(e.statusbar){r+=e.statusbar.layoutRect().h}t.deltaH+=r;t.minH+=r;t.h+=r;var o=n.getWindowSize();t.x=Math.max(0,o.w/2-t.w/2);t.y=Math.max(0,o.h/2-t.h/2);return t},renderHtml:function(){var e=this,t=e._layout,n=e._id,r=e.classPrefix;var i=e.settings,s="",o="",u=i.html;e.preRender();t.preRender(e);if(i.title){s='<div id="'+n+'-head" class="'+r+'window-head">'+'<div class="'+r+'title">'+e.encode(i.title)+"</div>"+'<button type="button" class="'+r+'close" aria-hidden="true">&times;</button>'+'<div id="'+n+'-dragh" class="'+r+'dragh"></div>'+"</div>"}if(i.url){u='<iframe src="'+i.url+'" tabindex="-1"></iframe>'}if(typeof u=="undefined"){u=t.renderHtml(e)}if(e.statusbar){o=e.statusbar.renderHtml()}return'<div id="'+n+'" class="'+e.classes()+'" hideFocus="1" tabIndex="-1">'+s+'<div id="'+n+'-body" class="'+e.classes("body")+'">'+u+"</div>"+o+"</div>"},fullscreen:function(e){var t=this,r=document.documentElement,i,s=t.classPrefix,o;if(e!=t._fullscreen){n.on(window,"resize",function(){var e;if(t._fullscreen){if(!i){e=(new Date).getTime();var r=n.getWindowSize();t.moveTo(0,0).resizeTo(r.w,r.h);if((new Date).getTime()-e>50){i=true}}else{if(!t._timer){t._timer=setTimeout(function(){var e=n.getWindowSize();t.moveTo(0,0).resizeTo(e.w,e.h);t._timer=0},50)}}}});o=t.layoutRect();t._fullscreen=e;if(!e){t._borderBox=t.parseBox(t.settings.border);t.getEl("head").style.display="";o.deltaH+=o.headerH;n.removeClass(r,s+"fullscreen");n.removeClass(document.body,s+"fullscreen");t.removeClass("fullscreen");t.moveTo(t._initial.x,t._initial.y).resizeTo(t._initial.w,t._initial.h)}else{t._initial={x:o.x,y:o.y,w:o.w,h:o.h};t._borderBox=t.parseBox("0");t.getEl("head").style.display="none";o.deltaH-=o.headerH+2;n.addClass(r,s+"fullscreen");n.addClass(document.body,s+"fullscreen");t.addClass("fullscreen");var u=n.getWindowSize();t.moveTo(0,0).resizeTo(u.w,u.h)}}return t.reflow()},postRender:function(){var e=this,t=[],n,s,o;setTimeout(function(){e.addClass("in")},0);e.keyboardNavigation=new r({root:e,enableLeftRight:false,enableUpDown:false,items:t,onCancel:function(){e.close()}});e.find("*").each(function(e){if(e.canFocus){s=s||e.settings.autofocus;n=n||e;if(e.subinput){t.push(e.getEl("inp"));if(e.getEl("open")){t.push(e.getEl("open"))}}else{t.push(e.getEl())}}});if(e.statusbar){e.statusbar.find("*").each(function(e){if(e.canFocus){s=s||e.settings.autofocus;n=n||e;t.push(e.getEl())}})}e._super();if(e.statusbar){e.statusbar.postRender()}if(!s&&n){n.focus()}this.dragHelper=new i(e._id+"-dragh",{start:function(){o={x:e.layoutRect().x,y:e.layoutRect().y}},drag:function(t){e.moveTo(o.x+t.deltaX,o.y+t.deltaY)}});e.on("submit",function(t){if(!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();if(e.statusbar){this.statusbar.remove()}if(e._fullscreen){n.removeClass(document.documentElement,t+"fullscreen");n.removeClass(document.body,t+"fullscreen")}}});return s});i("tinymce/ui/MessageBox",["tinymce/ui/Window"],function(e){"use strict";var t=e.extend({init:function(e){e={border:1,padding:20,layout:"flex",pack:"center",align:"center",containerCls:"panel",autoScroll:true,buttons:{type:"button",text:"Ok",action:"ok"},items:{type:"label",multiline:true,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(true)}},{type:"button",text:"Cancel",onClick:function(e){e.control.parents()[1].close();i(false)}}];break;case t.YES_NO:r=[{type:"button",text:"Ok",subtype:"primary",onClick:function(e){e.control.parents()[1].close();i(true)}}];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(true)}}];break}return(new e({padding:20,x:n.x,y:n.y,minWidth:300,minHeight:100,layout:"flex",pack:"center",align:"center",buttons:r,title:n.title,items:{type:"label",multiline:true,maxWidth:500,maxHeight:200,text:n.text},onClose:n.onClose})).renderTo(document.body).reflow()},alert:function(e,n){if(typeof e=="string"){e={text:e}}e.callback=n;return t.msgBox(e)},confirm:function(e,n){if(typeof e=="string"){e={text:e}}e.callback=n;e.buttons=t.OK_CANCEL;return t.msgBox(e)}}});return t});i("tinymce/WindowManager",["tinymce/ui/Window","tinymce/ui/MessageBox"],function(e,t){return function(n){function s(){if(i.length){return i[i.length-1]}}var r=this,i=[];r.windows=i;r.open=function(t,r){var s;n.editorManager.activeEditor=n;t.title=t.title||" ";t.url=t.url||t.file;if(t.url){t.width=parseInt(t.width||320,10);t.height=parseInt(t.height||240,10)}if(t.body){t.items={defaults:t.defaults,type:t.bodyType||"form",items:t.body}}if(!t.url&&!t.buttons){t.buttons=[{text:"Ok",subtype:"primary",onclick:function(){s.find("form")[0].submit();s.close()}},{text:"Cancel",onclick:function(){s.close()}}]}s=new e(t);i.push(s);s.on("close",function(){var e=i.length;while(e--){if(i[e]===s){i.splice(e,1)}}n.focus()});if(t.data){s.on("postRender",function(){this.find("*").each(function(e){var n=e.name();if(n in t.data){e.value(t.data[n])}})})}s.features=t||{};s.params=r||{};n.nodeChanged();return s.renderTo(document.body).reflow()};r.alert=function(e,n,r){t.alert(e,function(){if(n){n.call(r||this)}})};r.confirm=function(e,n,r){t.confirm(e,function(e){n.call(r||this,e)})};r.close=function(){if(s()){s().close()}};r.getParams=function(){return s()?s().params:null};r.setParams=function(e){if(s()){s().params=e}}}});i("tinymce/util/Quirks",["tinymce/util/VK","tinymce/dom/RangeUtils","tinymce/html/Node","tinymce/html/Entities","tinymce/Env","tinymce/util/Tools"],function(e,t,n,r,i,s){return function(o){function y(e,t){try{o.getDoc().execCommand(e,false,t)}catch(n){}}function b(){var e=o.getDoc().documentMode;return e?e:6}function w(e){return e.isDefaultPrevented()}function E(){function n(e){var t=new MutationObserver(function(){});s.each(o.getBody().getElementsByTagName("*"),function(e){if(e.tagName=="SPAN"){e.setAttribute("mce-data-marked",1)}if(!e.hasAttribute("data-mce-style")&&e.hasAttribute("style")){o.dom.setAttrib(e,"style",e.getAttribute("style"))}});t.observe(o.getDoc(),{childList:true,attributes:true,subtree:true,attributeFilter:["style"]});o.getDoc().execCommand(e?"ForwardDelete":"Delete",false,null);var n=o.selection.getRng();var r=n.startContainer.parentNode;s.each(t.takeRecords(),function(e){if(e.attributeName=="style"){var t=e.target.getAttribute("data-mce-style");if(t){e.target.setAttribute("style",t)}else{e.target.removeAttribute("style")}}s.each(e.addedNodes,function(e){if(e.nodeName=="SPAN"&&!e.getAttribute("mce-data-marked")){var t,i;if(e==r){t=n.startOffset;i=e.firstChild}l.remove(e,true);if(i){n.setStart(i,t);n.setEnd(i,t);o.selection.setRng(n)}}})});t.disconnect();s.each(o.dom.select("span[mce-data-marked]"),function(e){e.removeAttribute("mce-data-marked")})}var t=o.getDoc();if(!window.MutationObserver){return}o.on("keydown",function(t){var r=t.keyCode==f,i=e.metaKeyPressed(t);if(!w(t)&&(r||t.keyCode==a)){var s=o.selection.getRng(),u=s.startContainer,l=s.startOffset;if(!i&&s.collapsed&&u.nodeType==3){if(r?l<u.data.length:l>0){return}}t.preventDefault();if(i){o.selection.getSel().modify("extend",r?"forward":"backward","word")}n(r)}});o.on("keypress",function(t){if(!w(t)&&!c.isCollapsed()&&t.charCode&&!e.metaKeyPressed(t)){t.preventDefault();n(true);o.selection.setContent(String.fromCharCode(t.charCode))}});o.addCommand("Delete",function(){n()});o.addCommand("ForwardDelete",function(){n(true)});o.on("dragstart",function(e){e.dataTransfer.setData("mce-internal",o.selection.getContent())});o.on("drop",function(e){if(!w(e)){var r=e.dataTransfer.getData("mce-internal");if(r&&t.caretRangeFromPoint){e.preventDefault();n();o.selection.setRng(t.caretRangeFromPoint(e.x,e.y));o.insertContent(r)}}});o.on("cut",function(e){if(!w(e)&&e.clipboardData){e.preventDefault();e.clipboardData.clearData();e.clipboardData.setData("text/html",o.selection.getContent());e.clipboardData.setData("text/plain",o.selection.getContent({format:"text"}));n(true)}})}function S(){function e(e){var t=l.create("body");var n=e.cloneContents();t.appendChild(n);return c.serializer.serialize(t,{format:"html"})}function n(n){if(!n.setStart){if(n.item){return false}var r=n.duplicate();r.moveToElementText(o.getBody());return t.compareRanges(n,r)}var i=e(n);var s=l.createRng();s.selectNode(o.getBody());var u=e(s);return i===u}o.on("keydown",function(e){var t=e.keyCode,r,i;if(!w(e)&&(t==f||t==a)){r=o.selection.isCollapsed();i=o.getBody();if(r&&!l.isEmpty(i)){return}if(!r&&!n(o.selection.getRng())){return}e.preventDefault();o.setContent("");if(i.firstChild&&l.isBlock(i.firstChild)){o.selection.setCursorLocation(i.firstChild,0)}else{o.selection.setCursorLocation(i,0)}o.nodeChanged()}})}function x(){o.on("keydown",function(t){if(!w(t)&&t.keyCode==65&&e.metaKeyPressed(t)){t.preventDefault();o.execCommand("SelectAll")}})}function T(){if(!o.settings.content_editable){l.bind(o.getDoc(),"focusin",function(){c.setRng(c.getRng())});l.bind(o.getDoc(),"mousedown",function(e){if(e.target==o.getDoc().documentElement){o.getBody().focus();c.setRng(c.getRng())}})}}function N(){o.on("keydown",function(e){if(!w(e)&&e.keyCode===a){if(c.isCollapsed()&&c.getRng(true).startOffset===0){var t=c.getNode();var n=t.previousSibling;if(t.nodeName=="HR"){l.remove(t);e.preventDefault();return}if(n&&n.nodeName&&n.nodeName.toLowerCase()==="hr"){l.remove(n);e.preventDefault()}}}})}function C(){if(!window.Range.prototype.getClientRects){o.on("mousedown",function(e){if(!w(e)&&e.target.nodeName==="HTML"){var t=o.getBody();t.blur();setTimeout(function(){t.focus()},0)}})}}function k(){o.on("click",function(e){e=e.target;if(/^(IMG|HR)$/.test(e.nodeName)){c.getSel().setBaseAndExtent(e,0,e,1)}if(e.nodeName=="A"&&l.hasClass(e,"mce-item-anchor")){c.select(e)}o.nodeChanged()})}function L(){function e(){var e=l.getAttribs(c.getStart().cloneNode(false));return function(){var t=c.getStart();if(t!==o.getBody()){l.setAttrib(t,"style",null);u(e,function(e){t.setAttributeNode(e.cloneNode(true))})}}}function t(){return!c.isCollapsed()&&l.getParent(c.getStart(),l.isBlock)!=l.getParent(c.getEnd(),l.isBlock)}o.on("keypress",function(n){var r;if(!w(n)&&(n.keyCode==8||n.keyCode==46)&&t()){r=e();o.getDoc().execCommand("delete",false,null);r();n.preventDefault();return false}});l.bind(o.getDoc(),"cut",function(n){var r;if(!w(n)&&t()){r=e();setTimeout(function(){r()},0)}})}function A(){var e,n;o.on("selectionchange",function(){if(n){clearTimeout(n);n=0}n=window.setTimeout(function(){var n=c.getRng();if(!e||!t.compareRanges(n,e)){o.nodeChanged();e=n}},50)})}function O(){document.body.setAttribute("role","application")}function M(){o.on("keydown",function(e){if(!w(e)&&e.keyCode===a){if(c.isCollapsed()&&c.getRng(true).startOffset===0){var t=c.getNode().previousSibling;if(t&&t.nodeName&&t.nodeName.toLowerCase()==="table"){e.preventDefault();return false}}}})}function _(){if(b()>7){return}y("RespectVisibilityInDesign",true);o.contentStyles.push(".mceHideBrInPre pre br {display: none}");l.addClass(o.getBody(),"mceHideBrInPre");p.addNodeFilter("pre",function(e){var t=e.length,r,i,s,o;while(t--){r=e[t].getAll("br");i=r.length;while(i--){s=r[i];o=s.prev;if(o&&o.type===3&&o.value.charAt(o.value-1)!="\n"){o.value+="\n"}else{s.parent.insert(new n("#text",3),s,true).value="\n"}}}});d.addNodeFilter("pre",function(e){var t=e.length,n,r,i,s;while(t--){n=e[t].getAll("br");r=n.length;while(r--){i=n[r];s=i.prev;if(s&&s.type==3){s.value=s.value.replace(/\r?\n$/,"")}}}})}function D(){l.bind(o.getBody(),"mouseup",function(){var e,t=c.getNode();if(t.nodeName=="IMG"){if(e=l.getStyle(t,"width")){l.setAttrib(t,"width",e.replace(/[^0-9%]+/g,""));l.setStyle(t,"width","")}if(e=l.getStyle(t,"height")){l.setAttrib(t,"height",e.replace(/[^0-9%]+/g,""));l.setStyle(t,"height","")}}})}function P(){o.on("keydown",function(t){var n,r,i,s,u;if(w(t)||t.keyCode!=e.BACKSPACE){return}n=c.getRng();r=n.startContainer;i=n.startOffset;s=l.getRoot();u=r;if(!n.collapsed||i!==0){return}while(u&&u.parentNode&&u.parentNode.firstChild==u&&u.parentNode!=s){u=u.parentNode}if(u.tagName==="BLOCKQUOTE"){o.formatter.toggle("blockquote",null,u);n=l.createRng();n.setStart(r,0);n.setEnd(r,0);c.setRng(n)}})}function H(){function e(){o._refreshContentEditable();y("StyleWithCSS",false);y("enableInlineTableEditing",false);if(!h.object_resizing){y("enableObjectResizing",false)}}if(!h.readonly){o.on("BeforeExecCommand MouseDown",e)}}function B(){function e(){u(l.select("a"),function(e){var t=e.parentNode,n=l.getRoot();if(t.lastChild===e){while(t&&!l.isBlock(t)){if(t.parentNode.lastChild!==t||t===n){return}t=t.parentNode}l.add(t,"br",{"data-mce-bogus":1})}})}o.on("SetContent ExecCommand",function(t){if(t.type=="setcontent"||t.command==="mceInsertLink"){e()}})}function j(){if(h.forced_root_block){o.on("init",function(){y("DefaultParagraphSeparator",h.forced_root_block)})}}function F(){o.on("Undo Redo SetContent",function(e){if(!e.initial){o.execCommand("mceRepaint")}})}function I(){o.on("keydown",function(e){var t;if(!w(e)&&e.keyCode==a){t=o.getDoc().selection.createRange();if(t&&t.item){e.preventDefault();o.undoManager.beforeChange();l.remove(t.item(0));o.undoManager.add()}}})}function q(){var e;if(b()>=10){e="";u("p div h1 h2 h3 h4 h5 h6".split(" "),function(t,n){e+=(n>0?",":"")+t+":empty"});o.contentStyles.push(e+"{padding-right: 1px !important}")}}function R(){if(b()<9){p.addNodeFilter("noscript",function(e){var t=e.length,n,r;while(t--){n=e[t];r=n.firstChild;if(r){n.attr("data-mce-innertext",r.value)}}});d.addNodeFilter("noscript",function(e){var t=e.length,i,s,o;while(t--){i=e[t];s=e[t].firstChild;if(s){s.value=r.decode(s.value)}else{o=i.attributes.map["data-mce-innertext"];if(o){i.attr("data-mce-innertext",null);s=new n("#text",3);s.value=o;s.raw=true;i.append(s)}}}})}}function U(){function s(e,n){var r=t.createTextRange();try{r.moveToPoint(e,n)}catch(i){r=null}return r}function o(e){var t;if(e.button){t=s(e.x,e.y);if(t){if(t.compareEndPoints("StartToStart",r)>0){t.setEndPoint("StartToStart",r)}else{t.setEndPoint("EndToEnd",r)}t.select()}}else{u()}}function u(){var t=e.selection.createRange();if(r&&!t.item&&t.compareEndPoints("StartToEnd",t)===0){r.select()}l.unbind(e,"mouseup",u);l.unbind(e,"mousemove",o);r=n=0}var e=l.doc,t=e.body,n,r,i;e.documentElement.unselectable=true;l.bind(e,"mousedown contextmenu",function(t){if(t.target.nodeName==="HTML"){if(n){u()}i=e.documentElement;if(i.scrollHeight>i.clientHeight){return}n=1;r=s(t.x,t.y);if(r){l.bind(e,"mouseup",u);l.bind(e,"mousemove",o);l.win.focus();r.select()}}})}function z(){o.on("keyup focusin",function(t){if(t.keyCode!=65||!e.metaKeyPressed(t)){c.normalize()}})}function W(){o.contentStyles.push("img:-moz-broken {"+"-moz-force-broken-image-icon:1;"+"min-width:24px;"+"min-height:24px"+"}")}function X(){if(!o.inline){o.on("keydown",function(){if(document.activeElement==document.body){o.getWin().focus()}})}}function V(){if(!o.inline){o.contentStyles.push("body {min-height: 150px}");o.on("click",function(e){if(e.target.nodeName=="HTML"){o.execCommand("SelectAll");o.selection.collapse(true);o.nodeChanged()}})}}function $(){if(i.mac){o.on("keydown",function(t){if(e.metaKeyPressed(t)&&(t.keyCode==37||t.keyCode==39)){t.preventDefault();o.selection.getSel().modify("move",t.keyCode==37?"backward":"forward","word")}})}}function J(){y("AutoUrlDetect",false)}var u=s.each;var a=e.BACKSPACE,f=e.DELETE,l=o.dom,c=o.selection,h=o.settings,p=o.parser,d=o.serializer;var v=i.gecko,m=i.ie,g=i.webkit;M();P();S();z();if(g){E();T();k();j();if(i.iOS){A();X();V()}else{x()}}if(m&&i.ie<11){N();O();_();D();I();q();R();U()}if(i.ie>=11){V()}if(i.ie){x();J()}if(v){N();C();L();H();B();F();W();$()}}});i("tinymce/util/Observable",["tinymce/util/Tools"],function(e){function r(){return false}function i(){return true}var t="__bindings";var n=e.makeMap("focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange"+" mouseout mouseenter mouseleave keydown keypress keyup contextmenu dragstart dragend dragover draggesture dragdrop drop drag"," ");return{fire:function(e,n,s){var o=this,u,a,f,l,c;e=e.toLowerCase();n=n||{};n.type=e;if(!n.target){n.target=o}if(!n.preventDefault){n.preventDefault=function(){n.isDefaultPrevented=i};n.stopPropagation=function(){n.isPropagationStopped=i};n.stopImmediatePropagation=function(){n.isImmediatePropagationStopped=i};n.isDefaultPrevented=r;n.isPropagationStopped=r;n.isImmediatePropagationStopped=r}if(o[t]){u=o[t][e];if(u){for(a=0,f=u.length;a<f;a++){u[a]=l=u[a];if(n.isImmediatePropagationStopped()){break}if(l.call(o,n)===false){n.preventDefault();return n}}}}if(s!==false&&o.parent){c=o.parent();while(c&&!n.isPropagationStopped()){c.fire(e,n,false);c=c.parent()}}return n},on:function(e,r){var i=this,s,o,u,a;if(r===false){r=function(){return false}}if(r){u=e.toLowerCase().split(" ");a=u.length;while(a--){e=u[a];s=i[t];if(!s){s=i[t]={}}o=s[e];if(!o){o=s[e]=[];if(i.bindNative&&n[e]){i.bindNative(e)}}o.push(r)}}return i},off:function(e,r){var i=this,s,o=i[t],u,a,f,l;if(o){if(e){f=e.toLowerCase().split(" ");s=f.length;while(s--){e=f[s];u=o[e];if(!e){for(a in o){o[e].length=0}return i}if(u){if(!r){u.length=0}else{l=u.length;while(l--){if(u[l]===r){u.splice(l,1)}}}if(!u.length&&i.unbindNative&&n[e]){i.unbindNative(e);delete o[e]}}}}else{if(i.unbindNative){for(e in o){i.unbindNative(e)}}i[t]=[]}}return i},hasEventListeners:function(e){var n=this[t];e=e.toLowerCase();return!(!n||!n[e]||n[e].length===0)}}});i("tinymce/Shortcuts",["tinymce/util/Tools","tinymce/Env"],function(e,t){var n=e.each,r=e.explode;var i={f9:120,f10:121,f11:122};return function(s){var o=this,u={};s.on("keyup keypress keydown",function(e){if(e.altKey||e.ctrlKey||e.metaKey){n(u,function(n){var r=t.mac?e.metaKey:e.ctrlKey;if(n.ctrl!=r||n.alt!=e.altKey||n.shift!=e.shiftKey){return}if(e.keyCode==n.keyCode||e.charCode&&e.charCode==n.charCode){e.preventDefault();if(e.type=="keydown"){n.func.call(n.scope)}return true}})}});o.add=function(t,o,a,f){var l;l=a;if(typeof a==="string"){a=function(){s.execCommand(l,false,null)}}else if(e.isArray(l)){a=function(){s.execCommand(l[0],l[1],l[2])}}n(r(t.toLowerCase()),function(e){var t={func:a,scope:f||s,desc:s.translate(o),alt:false,ctrl:false,shift:false};n(r(e,"+"),function(e){switch(e){case"alt":case"ctrl":case"shift":t[e]=true;break;default:t.charCode=e.charCodeAt(0);t.keyCode=i[e]||e.toUpperCase().charCodeAt(0)}});u[(t.ctrl?"ctrl":"")+","+(t.alt?"alt":"")+","+(t.shift?"shift":"")+","+t.keyCode]=t});return true}}});i("tinymce/Editor",["tinymce/dom/DOMUtils","tinymce/AddOnManager","tinymce/html/Node","tinymce/dom/Serializer","tinymce/html/Serializer","tinymce/dom/Selection","tinymce/Formatter","tinymce/UndoManager","tinymce/EnterKey","tinymce/ForceBlocks","tinymce/EditorCommands","tinymce/util/URI","tinymce/dom/ScriptLoader","tinymce/dom/EventUtils","tinymce/WindowManager","tinymce/html/Schema","tinymce/html/DomParser","tinymce/util/Quirks","tinymce/Env","tinymce/util/Tools","tinymce/util/Observable","tinymce/Shortcuts"],function(e,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S){function H(e,t){if(t=="selectionchange"){return e.getDoc()}if(!e.inline&&/^mouse|click|contextmenu|drop/.test(t)){return e.getDoc()}return e.getBody()}function B(e,t,r){var i=this,s,o;s=i.documentBaseUrl=r.documentBaseURL;o=r.baseURI;if(typeof t["editor_selector"]!="undefined"&&typeof t["selector"]=="undefined")t["selector"]="."+t["editor_selector"];if(typeof t["selector"]=="undefined")t["selector"]=".rte";if(typeof t["language"]=="undefined")t["language"]="en";var u=t["plugins"].split(/[ ,]/);var a=["iespell","inlinepopups","style","xhtmlxtras","safari"];$.each(u,function(e,t){if(t=="advhr")u[e]="hr";else if(t=="advlink")u[e]="link";else if(t=="advimage"){u[e]="image";u.push("filemanager")}else if(t=="emotions")u[e]="emoticons";else if(a.indexOf(t)>=0){u.splice(e,1)}});var f=u.join(",");t=C(t,{plugins:f,external_filemanager_path:s+"/filemanager/",filemanager_title:"File manager",external_plugins:{filemanager:s+"/filemanager/plugin.min.js"},skin:"prestashop",resize:false,theme:"modern"});i.settings=t=C({id:e,theme:"modern",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:s,add_form_submit_trigger:true,submit_patch:true,add_unload_trigger:true,convert_urls:true,relative_urls:true,remove_script_host:true,object_resizing:true,doctype:"<!DOCTYPE html>",visual:true,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:true,padd_empty_editor:true,render_ui:true,indentation:"30px",inline_styles:true,convert_fonts_to_spans:true,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:true,entity_encoding:"named",url_converter:i.convertURL,url_converter_scope:i,ie7_compat:true},t);n.language=t.language||"en";n.languageLoad=t.language_load;n.baseURL=r.baseURL;i.id=t.id=e;i.isNotDirty=true;i.plugins={};i.documentBaseURI=new h(t.document_base_url||s,{base_uri:o});i.baseURI=o;i.contentCSS=[];i.contentStyles=[];i.shortcuts=new S(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 x=e.DOM,T=n.ThemeManager,N=n.PluginManager;var C=w.extend,k=w.each,L=w.explode;var A=w.inArray,O=w.trim,M=w.resolve;var _=d.Event;var D=b.gecko,P=b.ie;B.prototype={render:function(){function i(){x.unbind(window,"ready",i);e.render()}function o(){var n=p.ScriptLoader;if(t.language&&t.language!="en"&&!t.language_url){t.language_url=e.editorManager.baseURL+"/langs/"+t.language+".js"}if(t.language_url){n.add(t.language_url)}if(t.theme&&typeof t.theme!="function"&&t.theme.charAt(0)!="-"&&!T.urls[t.theme]){var i=t.theme_url;if(i){i=e.documentBaseURI.toAbsolute(i)}else{i="themes/"+t.theme+"/theme"+r+".js"}T.load(t.theme,i)}if(w.isArray(t.plugins)){t.plugins=t.plugins.join(" ")}k(t.external_plugins,function(e,n){N.load(n,e);t.plugins+=" "+n});k(t.plugins.split(/[ ,]/),function(e){e=O(e);if(e&&!N.urls[e]){if(e.charAt(0)=="-"){e=e.substr(1,e.length);var t=N.dependencies(e);k(t,function(e){var t={prefix:"plugins/",resource:e,suffix:"/plugin"+r+".js"};e=N.createUrl(t,e);N.load(e.resource,e)})}else{N.load(e,{prefix:"plugins/",resource:e,suffix:"/plugin"+r+".js"})}}});n.loadQueue(function(){if(!e.removed){e.init()}})}var e=this,t=e.settings,n=e.id,r=e.suffix;if(!_.domLoaded){x.bind(window,"ready",i);return}if(!e.getElement()){return}if(!b.contentEditable){return}if(!t.inline){e.orgVisibility=e.getElement().style.visibility;e.getElement().style.visibility="hidden"}else{e.inline=true}var s=e.getElement().form||x.getParent(n,"form");if(s){e.formElement=s;if(t.hidden_input&&!/TEXTAREA|INPUT/i.test(e.getElement().nodeName)){x.insertAfter(x.create("input",{type:"hidden",name:n}),n);e.hasHiddenInput=true}e.formEventDelegate=function(t){e.fire(t.type,t)};x.bind(s,"submit reset",e.formEventDelegate);e.on("reset",function(){e.setContent(e.startContent,{format:"raw"})});if(t.submit_patch&&!s.submit.nodeType&&!s.submit.length&&!s._mceOldSubmit){s._mceOldSubmit=s.submit;s.submit=function(){e.editorManager.triggerSave();e.isNotDirty=true;return s._mceOldSubmit(s)}}}e.windowManager=new v(e);if(t.encoding=="xml"){e.on("GetContent",function(e){if(e.save){e.content=x.encode(e.content)}})}if(t.add_form_submit_trigger){e.on("submit",function(){if(e.initialized){e.save()}})}if(t.add_unload_trigger){e._beforeUnload=function(){if(e.initialized&&!e.destroyed&&!e.isHidden()){e.save({format:"raw",no_events:true,set_dirty:false})}};e.editorManager.on("BeforeUnload",e._beforeUnload)}o()},init:function(){function d(t){var n=N.get(t),r,i;r=N.urls[t]||e.documentBaseUrl.replace(/\/$/,"");t=O(t);if(n&&A(p,t)===-1){k(N.dependencies(t),function(e){d(e)});i=new n(e,r);e.plugins[t]=i;if(i.init){i.init(e,r);p.push(t)}}}var e=this,t=e.settings,n=e.getElement();var r,i,s,o,u,a,f,l,c,h,p=[];e.rtl=this.editorManager.i18n.rtl;e.editorManager.add(e);t.aria_label=t.aria_label||x.getAttrib(n,"aria-label",e.getLang("aria.rich_text_area"));if(t.theme){if(typeof t.theme!="function"){t.theme=t.theme.replace(/-/,"");u=T.get(t.theme);e.theme=new u(e,T.urls[t.theme]);if(e.theme.init){e.theme.init(e,T.urls[t.theme]||e.documentBaseUrl.replace(/\/$/,""))}}else{e.theme=t.theme}}k(t.plugins.replace(/\-/g,"").split(/[ ,]/),d);if(t.render_ui&&e.theme){e.orgDisplay=n.style.display;if(typeof t.theme!="function"){r=t.width||n.style.width||n.offsetWidth;i=t.height||n.style.height||n.offsetHeight;s=t.min_height||100;c=/^[0-9\.]+(|px)$/i;if(c.test(""+r)){r=Math.max(parseInt(r,10)+(u.deltaWidth||0),100)}if(c.test(""+i)){i=Math.max(parseInt(i,10)+(u.deltaHeight||0),s)}u=e.theme.renderUI({targetNode:n,width:r,height:i,deltaWidth:t.delta_width,deltaHeight:t.delta_height});if(!t.content_editable){x.setStyles(u.sizeContainer||u.editorContainer,{wi2dth:r,h2eight:i});i=(u.iframeHeight||i)+(typeof i=="number"?u.deltaHeight||0:"");if(i<s){i=s}}}else{u=t.theme(e,n);if(u.editorContainer.nodeType){u.editorContainer=u.editorContainer.id=u.editorContainer.id||e.id+"_parent"}if(u.iframeContainer.nodeType){u.iframeContainer=u.iframeContainer.id=u.iframeContainer.id||e.id+"_iframecontainer"}i=u.iframeHeight||n.offsetHeight}e.editorContainer=u.editorContainer}if(t.content_css){k(L(t.content_css),function(t){e.contentCSS.push(e.documentBaseURI.toAbsolute(t))})}if(t.content_style){e.contentStyles.push(t.content_style)}if(t.content_editable){n=o=u=null;return e.initContentBody()}e.iframeHTML=t.doctype+"<html><head>";if(t.document_base_url!=e.documentBaseUrl){e.iframeHTML+='<base href="'+e.documentBaseURI.getURI()+'" />'}if(!b.caretAfter&&t.ie7_compat){e.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" />'}e.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';for(h=0;h<e.contentCSS.length;h++){var v=e.contentCSS[h];e.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+v+'" />';e.loadedCSS[v]=true}f=t.body_id||"tinymce";if(f.indexOf("=")!=-1){f=e.getParam("body_id","","hash");f=f[e.id]||f}l=t.body_class||"";if(l.indexOf("=")!=-1){l=e.getParam("body_class","","hash");l=l[e.id]||""}e.iframeHTML+='</head><body id="'+f+'" class="mce-content-body '+l+'" '+"onload=\"window.parent.tinymce.get('"+e.id+"').fire('load');\"><br></body></html>";var m="javascript:(function(){"+'document.open();document.domain="'+document.domain+'";'+'var ed = window.parent.tinymce.get("'+e.id+'");document.write(ed.iframeHTML);'+"document.close();ed.initContentBody(true);})()";if(document.domain!=location.hostname){a=m}o=x.add(u.iframeContainer,"iframe",{id:e.id+"_ifr",src:a||'javascript:""',frameBorder:"0",allowTransparency:"true",title:e.editorManager.translate("Rich Text Area. Press ALT-F9 for menu. "+"Press ALT-F10 for toolbar. Press ALT-0 for help"),style:{width:"100%",height:i,display:"block"}});if(P){try{e.getDoc()}catch(g){o.src=a=m}}e.contentAreaContainer=u.iframeContainer;if(u.editorContainer){x.get(u.editorContainer).style.display=e.orgDisplay}x.get(e.id).style.display="none";x.setAttrib(e.id,"aria-hidden",true);if(!a){e.initContentBody()}n=o=u=null},initContentBody:function(t){var n=this,s=n.settings,h=x.get(n.id),p=n.getDoc(),d,v;if(!s.inline){n.getElement().style.visibility=n.orgVisibility}if(!t&&!s.content_editable){p.open();p.write(n.iframeHTML);p.close()}if(s.content_editable){n.on("remove",function(){var e=this.getBody();x.removeClass(e,"mce-content-body");x.removeClass(e,"mce-edit-focus");x.setAttrib(e,"tabIndex",null);x.setAttrib(e,"contentEditable",null)});x.addClass(h,"mce-content-body");h.tabIndex=-1;n.contentDocument=p=s.content_document||document;n.contentWindow=s.content_window||window;n.bodyElement=h;s.content_document=s.content_window=null;s.root_name=h.nodeName.toLowerCase()}d=n.getBody();d.disabled=true;if(!s.readonly){if(n.inline&&x.getStyle(d,"position",true)=="static"){d.style.position="relative"}d.contentEditable=n.getParam("content_editable_state",true)}d.disabled=false;n.schema=new m(s);n.dom=new e(p,{keep_values:true,url_converter:n.convertURL,url_converter_scope:n,hex_colors:s.force_hex_style_colors,class_filter:s.class_filter,update_styles:true,root_element:s.content_editable?n.id:null,collect:s.content_editable,schema:n.schema,onSetAttrib:function(e){n.fire("SetAttrib",e)}});n.parser=new g(s,n.schema);n.parser.addAttributeFilter("src,href,style",function(e,t){var r=e.length,i,s=n.dom,o,u;while(r--){i=e[r];o=i.attr(t);u="data-mce-"+t;if(!i.attributes.map[u]){if(t==="style"){i.attr(u,s.serializeStyle(s.parseStyle(o),i.name))}else{i.attr(u,n.convertURL(o,t,i.name))}}}});n.parser.addNodeFilter("script",function(e){var t=e.length,n;while(t--){n=e[t];n.attr("type","mce-"+(n.attr("type")||"text/javascript"))}});n.parser.addNodeFilter("#cdata",function(e){var t=e.length,n;while(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){var t=e.length,i,s=n.schema.getNonEmptyElements();while(t--){i=e[t];if(i.isEmpty(s)){i.empty().append(new r("br",1)).shortEnded=true}}});n.serializer=new i(s,n);n.selection=new o(n.dom,n.getWin(),n.serializer,n);n.formatter=new u(n);n.undoManager=new a(n);n.forceBlocks=new l(n);n.enterKey=new f(n);n.editorCommands=new c(n);n.fire("PreInit");if(!s.browser_spellcheck&&!s.gecko_spellcheck){p.body.spellcheck=false;x.setAttrib(d,"spellcheck","false")}n.fire("PostRender");n.quirks=y(n);if(s.directionality){d.dir=s.directionality}if(s.nowrap){d.style.whiteSpace="nowrap"}if(s.protect){n.on("BeforeSetContent",function(e){k(s.protect,function(t){e.content=e.content.replace(t,function(e){return"<!--mce:protected "+escape(e)+"-->"})})})}n.on("SetContent",function(){n.addVisual(n.getBody())});if(s.padd_empty_editor){n.on("PostProcess",function(e){e.content=e.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")})}n.load({initial:true,format:"html"});n.startContent=n.getContent({format:"raw"});n.initialized=true;k(n._pendingNativeEvents,function(e){n.dom.bind(H(n,e),e,function(e){n.fire(e.type,e)})});n.fire("init");n.focus(true);n.nodeChanged({initial:true});n.execCallback("init_instance_callback",n);if(n.contentStyles.length>0){v="";k(n.contentStyles,function(e){v+=e+"\r\n"});n.dom.addStyle(v)}k(n.contentCSS,function(e){if(!n.loadedCSS[e]){n.dom.loadCSS(e);n.loadedCSS[e]=true}});if(s.auto_focus){setTimeout(function(){var e=n.editorManager.get(s.auto_focus);e.selection.select(e.getBody(),1);e.selection.collapse(1);e.getBody().focus();e.getWin().focus()},100)}h=p=d=null},focus:function(e){var t,n=this,r=n.selection,i=n.settings.content_editable,s;var o,u=n.getDoc(),a;if(!e){s=r.getRng();if(s.item){o=s.item(0)}n._refreshContentEditable();if(!i){if(!b.opera){n.getBody().focus()}n.getWin().focus()}if(D||i){a=n.getBody();if(a.setActive&&b.ie<11){a.setActive()}else{a.focus()}if(i){r.normalize()}}if(o&&o.ownerDocument==u){s=u.body.createControlRange();s.addElement(o);s.select()}}if(n.editorManager.activeEditor!=n){if(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}if(t.callbackLookup&&(r=t.callbackLookup[e])){n=r.func;r=r.scope}if(typeof n==="string"){r=n.replace(/\.\w+$/,"");r=r?M(r):0;n=M(n);t.callbackLookup=t.callbackLookup||{};t.callbackLookup[e]={func:n,scope:r}}return n.apply(r||t,Array.prototype.slice.call(arguments,1))},translate:function(e){var t=this.settings.language||"en",n=this.editorManager.i18n;if(!e){return""}return 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;if(n==="hash"){i={};if(typeof r==="string"){k(r.indexOf("=")>0?r.split(/[;,](?![^=;,]*(?:[;,]|$))/):r.split(","),function(e){e=e.split("=");if(e.length>1){i[O(e[0])]=O(e[1])}else{i[O(e[0])]=O(e)}})}else{i=r}return i}return r},nodeChanged:function(){var e=this,t=e.selection,n,r,i;if(e.initialized&&!e.settings.disable_nodechange){i=e.getBody();n=t.getStart()||i;n=P&&n.ownerDocument!=e.getDoc()?e.getBody():n;if(n.nodeName=="IMG"&&t.isCollapsed()){n=n.parentNode}r=[];e.dom.getParent(n,function(e){if(e===i){return true}r.push(e)});e.fire("NodeChange",{element:n,parents:r})}},addButton:function(e,t){var n=this;if(t.cmd){t.onclick=function(){n.execCommand(t.cmd)}}if(!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;if(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,s=0,o;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(e)&&(!r||!r.skip_focus)){i.focus()}r=C({},r);r=i.fire("BeforeExecCommand",{command:e,ui:t,value:n});if(r.isDefaultPrevented()){return false}if(o=i.execCommands[e]){if(o.func.call(o.scope,t,n)!==true){i.fire("ExecCommand",{command:e,ui:t,value:n});return true}}k(i.plugins,function(r){if(r.execCommand&&r.execCommand(e,t,n)){i.fire("ExecCommand",{command:e,ui:t,value:n});s=true;return false}});if(s){return s}if(i.theme&&i.theme.execCommand&&i.theme.execCommand(e,t,n)){i.fire("ExecCommand",{command:e,ui:t,value:n});return true}if(i.editorCommands.execCommand(e,t,n)){i.fire("ExecCommand",{command:e,ui:t,value:n});return true}i.getDoc().execCommand(e,t,n);i.fire("ExecCommand",{command:e,ui:t,value:n})},queryCommandState:function(e){var t=this,n,r;if(t._isHidden()){return}if(n=t.queryStateCommands[e]){r=n.func.call(n.scope);if(r!==true){return r}}r=t.editorCommands.queryCommandState(e);if(r!==-1){return r}try{return t.getDoc().queryCommandState(e)}catch(i){}},queryCommandValue:function(e){var n=this,r,i;if(n._isHidden()){return}if(r=n.queryValueCommands[e]){i=r.func.call(r.scope);if(i!==true){return i}}i=n.editorCommands.queryCommandValue(e);if(i!==t){return i}try{return n.getDoc().queryCommandValue(e)}catch(s){}},show:function(){var e=this;x.show(e.getContainer());x.hide(e.id);e.load();e.fire("show")},hide:function(){var e=this,t=e.getDoc();if(P&&t&&!e.inline){t.execCommand("SelectAll")}e.save();x.hide(e.getContainer());x.setStyle(e.id,"display",e.orgDisplay);e.fire("hide")},isHidden:function(){return!x.isHidden(this.id)},setProgressState:function(e,t){this.fire("ProgressState",{state:e,time:t})},load:function(e){var n=this,r=n.getElement(),i;if(r){e=e||{};e.load=true;i=n.setContent(r.value!==t?r.value:r.innerHTML,e);e.element=r;if(!e.no_events){n.fire("LoadContent",e)}e.element=r=null;return i}},save:function(e){var t=this,n=t.getElement(),r,i;if(!n||!t.initialized){return}e=e||{};e.save=true;e.element=n;r=e.content=t.getContent(e);if(!e.no_events){t.fire("SaveContent",e)}r=e.content;if(!/TEXTAREA|INPUT/i.test(n.nodeName)){n.innerHTML=r;if(i=x.getParent(t.id,"form")){k(i.elements,function(e){if(e.name==t.id){e.value=r;return false}})}}else{n.value=r}e.element=n=null;if(e.set_dirty!==false){t.isNotDirty=true}return r},setContent:function(e,t){var n=this,r=n.getBody(),i;t=t||{};t.format=t.format||"html";t.set=true;t.content=e;if(!t.no_events){n.fire("BeforeSetContent",t)}e=t.content;if(e.length===0||/^\s+$/.test(e)){i=n.settings.forced_root_block;if(i&&n.schema.isValidChild(r.nodeName.toLowerCase(),i.toLowerCase())){e=P&&P<11?"":'<br data-mce-bogus="1">';e=n.dom.createHTML(i,n.settings.forced_root_block_attrs,e)}else if(!P||P<11){e='<br data-mce-bogus="1">'}r.innerHTML=e;n.fire("SetContent",t)}else{if(t.format!=="raw"){e=(new s({},n.schema)).serialize(n.parser.parse(e,{isRootContent:true}))}t.content=O(e);n.dom.setHTML(r,t.content);if(!t.no_events){n.fire("SetContent",t)}}return t.content},getContent:function(e){var t=this,n,r=t.getBody();e=e||{};e.format=e.format||"html";e.get=true;e.getInner=true;if(!e.no_events){t.fire("BeforeGetContent",e)}if(e.format=="raw"){n=r.innerHTML}else if(e.format=="text"){n=r.innerText||r.textContent}else{n=t.serializer.serialize(r,e)}if(e.format!="text"){e.content=O(n)}else{e.content=n}if(!e.no_events){t.fire("GetContent",e)}return e.content},insertContent:function(e){this.execCommand("mceInsertContent",false,e)},isDirty:function(){return!this.isNotDirty},getContainer:function(){var e=this;if(!e.container){e.container=x.get(e.editorContainer||e.id+"_parent")}return e.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return x.get(this.settings.content_element||this.id)},getWin:function(){var e=this,t;if(!e.contentWindow){t=x.get(e.id+"_ifr");if(t){e.contentWindow=t.contentWindow}}return e.contentWindow},getDoc:function(){var e=this,t;if(!e.contentDocument){t=e.getWin();if(t){e.contentDocument=t.document}}return e.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(e,t,n){var r=this,i=r.settings;if(i.urlconverter_callback){return r.execCallback("urlconverter_callback",e,n,true,t)}if(!i.convert_urls||n&&n.nodeName=="LINK"||e.indexOf("file:")===0||e.length===0){return e}if(i.relative_urls){return r.documentBaseURI.toRelative(e)}e=r.documentBaseURI.toAbsolute(e,i.remove_script_host);return e},addVisual:function(e){var n=this,r=n.settings,i=n.dom,s;e=e||n.getBody();if(n.hasVisual===t){n.hasVisual=r.visual}k(i.select("table,a",e),function(e){var t;switch(e.nodeName){case"TABLE":s=r.visual_table_class||"mce-item-table";t=i.getAttrib(e,"border");if(!t||t=="0"){if(n.hasVisual){i.addClass(e,s)}else{i.removeClass(e,s)}}return;case"A":if(!i.getAttrib(e,"href",false)){t=i.getAttrib(e,"name")||e.id;s="mce-item-anchor";if(t){if(n.hasVisual){i.addClass(e,s)}else{i.removeClass(e,s)}}}return}});n.fire("VisualAid",{element:e,hasVisual:n.hasVisual})},remove:function(){var e=this;if(!e.removed){e.removed=1;if(e.hasHiddenInput){x.remove(e.getElement().nextSibling)}var t=e.getDoc();if(P&&t&&!e.inline){t.execCommand("SelectAll")}e.save();x.setStyle(e.id,"display",e.orgDisplay);if(!e.settings.content_editable){_.unbind(e.getWin());_.unbind(e.getDoc())}var n=e.getContainer();_.unbind(e.getBody());_.unbind(n);e.fire("remove");e.editorManager.remove(e);x.remove(n);e.destroy()}},bindNative:function(e){var t=this;if(t.settings.readonly){return}if(t.initialized){t.dom.bind(H(t,e),e,function(n){t.fire(e,n)})}else{if(!t._pendingNativeEvents){t._pendingNativeEvents=[e]}else{t._pendingNativeEvents.push(e)}}},unbindNative:function(e){var t=this;if(t.initialized){t.dom.unbind(e)}},destroy:function(e){var t=this,n;if(t.destroyed){return}if(!e&&!t.removed){t.remove();return}if(e&&D){_.unbind(t.getDoc());_.unbind(t.getWin());_.unbind(t.getBody())}if(!e){t.editorManager.off("beforeunload",t._beforeUnload);if(t.theme&&t.theme.destroy){t.theme.destroy()}t.selection.destroy();t.dom.destroy()}n=t.formElement;if(n){if(n._mceOldSubmit){n.submit=n._mceOldSubmit;n._mceOldSubmit=null}x.unbind(n,"submit reset",t.formEventDelegate)}t.contentAreaContainer=t.formElement=t.container=null;t.settings.content_element=t.bodyElement=t.contentDocument=t.contentWindow=null;if(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;if(e._isHidden()){t=e.getBody();n=t.parentNode;n.removeChild(t);n.appendChild(t);t.focus()}},_isHidden:function(){var e;if(!D){return 0}e=this.selection.getSel();return!e||!e.rangeCount||e.rangeCount===0}};C(B.prototype,E);return B});i("tinymce/util/I18n",[],function(){"use strict";var e={};return{rtl:false,add:function(t,n){for(var r in n){e[r]=n[r]}this.rtl=this.rtl||e._dir==="rtl"},translate:function(t){if(typeof t=="undefined"){return t}if(typeof t!="string"&&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}});i("tinymce/FocusManager",["tinymce/dom/DOMUtils","tinymce/Env"],function(e,t){function n(r){function i(){try{return document.activeElement}catch(e){return document.body}}function s(e){if(e&&e.startContainer){return{startContainer:e.startContainer,startOffset:e.startOffset,endContainer:e.endContainer,endOffset:e.endOffset}}return e}function o(e,t){var n;if(t.startContainer){n=e.getDoc().createRange();n.setStart(t.startContainer,t.startOffset);n.setEnd(t.endContainer,t.endOffset)}else{n=t}return n}function u(t){return!!e.DOM.getParent(t,n.isEditorUIElement)}function a(e,t){var n=t.getBody();while(e){if(e==n){return true}e=e.parentNode}}function f(n){var f=n.editor,l;f.on("init",function(){if("onbeforedeactivate"in document&&t.ie<11){f.dom.bind(f.getBody(),"beforedeactivate",function(){try{f.lastRng=f.selection.getRng()}catch(e){}f.selection.lastFocusBookmark=s(f.lastRng)})}else if(f.inline||t.ie>10){f.on("nodechange keyup",function(){var e=document.activeElement;if(e&&e.id==f.id+"_ifr"){e=f.getBody()}if(a(e,f)){f.lastRng=f.selection.getRng()}});if(t.webkit){l=function(){var e=f.selection.getRng();if(!e.collapsed){f.lastRng=e}};e.DOM.bind(document,"selectionchange",l);f.on("remove",function(){e.DOM.unbind(document,"selectionchange",l)})}}});f.on("setcontent",function(){f.lastRng=null});f.on("mousedown",function(){f.selection.lastFocusBookmark=null});f.on("focusin",function(){var e=r.focusedEditor;if(f.selection.lastFocusBookmark){f.selection.setRng(o(f,f.selection.lastFocusBookmark));f.selection.lastFocusBookmark=null}if(e!=f){if(e){e.fire("blur",{focusedEditor:f})}r.activeEditor=f;r.focusedEditor=f;f.fire("focus",{blurredEditor:e});f.focus(false)}f.lastRng=null});f.on("focusout",function(){window.setTimeout(function(){var e=r.focusedEditor;if(!u(i())&&e==f){f.fire("blur",{focusedEditor:null});r.focusedEditor=null;if(f.selection){f.selection.lastFocusBookmark=null}}},0)})}e.DOM.bind(document,"focusin",function(e){var t=r.activeEditor;if(t&&e.target.ownerDocument==document){if(t.selection){t.selection.lastFocusBookmark=s(t.lastRng)}if(!u(e.target)&&r.focusedEditor==t){t.fire("blur",{focusedEditor:null});r.focusedEditor=null}}});r.on("AddEditor",f)}n.isEditorUIElement=function(e){return e.className.indexOf("mce-")!==-1};return n});i("tinymce/EditorManager",["tinymce/Editor","tinymce/dom/DOMUtils","tinymce/util/URI","tinymce/Env","tinymce/util/Tools","tinymce/util/Observable","tinymce/util/I18n","tinymce/FocusManager"],function(e,n,r,i,s,o,u,a){var f=n.DOM;var l=s.explode,c=s.each,h=s.extend;var p=0,d;var v={majorVersion:"4",minorVersion:"0.16",releaseDate:"2014-01-31",editors:[],i18n:u,activeEditor:null,setup:function(){var e=this,t,n,i="",s;n=document.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(n)){n+="/"}s=window.tinymce||window.tinyMCEPreInit;if(s){t=s.base||s.baseURL;i=s.suffix}else{var o=document.getElementsByTagName("script");for(var u=0;u<o.length;u++){var f=o[u].src;if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(f)){if(f.indexOf(".min")!=-1){i=".min"}t=f.substring(0,f.lastIndexOf("/"));break}}}e.baseURL=(new r(n)).toAbsolute(t);e.documentBaseURL=n;e.baseURI=new r(e.baseURL);e.suffix=i;e.focusManager=new a(e)},init:function(t){function s(e){var t=e.id;if(!t){t=e.name;if(t&&!f.get(t)){t=e.name}else{t=f.uniqueId()}e.setAttribute("id",t)}return t}function o(e,t,n){var r=e[t];if(!r){return}return r.apply(n||this,Array.prototype.slice.call(arguments,2))}function u(e,t){return t.constructor===RegExp?t.test(e.className):f.hasClass(e,t)}function a(){var d,v;f.unbind(window,"ready",a);o(t,"onpageload");if(t.types){c(t.types,function(i){c(f.select(i.selector),function(o){var u=new e(s(o),h({},t,i),n);r.push(u);u.render(1)})});return}else if(t.selector){c(f.select(t.selector),function(i){var o=new e(s(i),t,n);r.push(o);o.render(1)});return}switch(t.mode){case"exact":d=t.elements||"";if(d.length>0){c(l(d),function(s){if(f.get(s)){i=new e(s,t,n);r.push(i);i.render(true)}else{c(document.forms,function(o){c(o.elements,function(o){if(o.name===s){s="mce_editor_"+p++;f.setAttrib(o,"id",s);i=new e(s,t,n);r.push(i);i.render(1)}})})}})}break;case"textareas":case"specific_textareas":c(f.select("textarea"),function(o){if(t.editor_deselector&&u(o,t.editor_deselector)){return}if(!t.editor_selector||u(o,t.editor_selector)){i=new e(s(o),t,n);r.push(i);i.render(true)}});break}if(t.oninit){d=v=0;c(r,function(e){v++;if(!e.initialized){e.on("init",function(){d++;if(d==v){o(t,"oninit")}})}else{d++}if(d==v){o(t,"oninit")}})}}var n=this,r=[],i;n.settings=t;f.bind(window,"ready",a)},get:function(e){if(e===t){return this.editors}return this.editors[e]},add:function(e){var t=this,n=t.editors;n[e.id]=e;n.push(e);t.activeEditor=e;t.fire("AddEditor",{editor:e});if(!d){d=function(){t.fire("BeforeUnload")};f.bind(window,"beforeunload",d)}return e},createEditor:function(t,n){return this.add(new e(t,n,this))},remove:function(e){var t=this,n,r=t.editors,i,s;if(!e){for(n=r.length-1;n>=0;n--){t.remove(r[n])}return}if(typeof e=="string"){e=e.selector||e;c(f.select(e),function(e){t.remove(r[e.id])});return}i=e;if(!r[i.id]){return null}delete r[i.id];for(n=0;n<r.length;n++){if(r[n]==i){r.splice(n,1);s=true;break}}if(t.activeEditor==i){t.activeEditor=r[0]}if(s){t.fire("RemoveEditor",{editor:i})}if(!r.length){f.unbind(window,"beforeunload",d)}i.remove();return i},execCommand:function(t,n,r){var i=this,s=i.get(r);switch(t){case"mceAddEditor":if(!i.get(r)){(new e(r,i.settings,i)).render()}return true;case"mceRemoveEditor":if(s){s.remove()}return true;case"mceToggleEditor":if(!s){i.execCommand("mceAddEditor",0,r);return true}if(s.isHidden()){s.show()}else{s.hide()}return true}if(i.activeEditor){return i.activeEditor.execCommand(t,n,r)}return false},triggerSave:function(){c(this.editors,function(e){e.save()})},addI18n:function(e,t){u.add(e,t)},translate:function(e){return u.translate(e)}};h(v,o);v.setup();window.tinymce=window.tinyMCE=v;return v});i("tinymce/LegacyInput",["tinymce/EditorManager","tinymce/util/Tools"],function(e,t){var n=t.each,r=t.explode;e.on("AddEditor",function(e){var t=e.editor;t.on("preInit",function(){function u(e,t){n(t,function(t,n){if(t){s.setStyle(e,n,t)}});s.rename(e,"span")}function a(r){s=t.dom;if(o.convert_fonts_to_spans){n(s.select("font,u,strike",r.node),function(t){e[t.nodeName.toLowerCase()](s,t)})}}var e,i,s,o=t.settings;if(o.inline_styles){i=r(o.font_size_legacy_values);e={font:function(e,t){u(t,{backgroundColor:t.style.backgroundColor,color:t.color,fontFamily:t.face,fontSize:i[parseInt(t.size,10)-1]})},u:function(e,t){u(t,{textDecoration:"underline"})},strike:function(e,t){u(t,{textDecoration:"line-through"})}};t.on("PreProcess SetContent",a)}})})});i("tinymce/util/XHR",[],function(){return{send:function(e){function r(){if(!e.async||t.readyState==4||n++>1e4){if(e.success&&n<1e4&&t.status==200){e.success.call(e.success_scope,""+t.responseText,t,e)}else if(e.error){e.error.call(e.error_scope,n>1e4?"TIMED_OUT":"GENERAL",t,e)}t=null}else{setTimeout(r,10)}}var t,n=0;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===false?false:true;e.data=e.data||"";t=new XMLHttpRequest;if(t){if(t.overrideMimeType){t.overrideMimeType(e.content_type)}t.open(e.type||(e.data?"POST":"GET"),e.url,e.async);if(e.content_type){t.setRequestHeader("Content-Type",e.content_type)}t.setRequestHeader("X-Requested-With","XMLHttpRequest");t.send(e.data);if(!e.async){return r()}setTimeout(r,10)}}}});i("tinymce/util/JSON",[],function(){function e(t,n){var r,i,s,o;n=n||'"';if(t===null){return"null"}s=typeof t;if(s=="string"){i="\bb t\nn\ff\rr\"\"''\\\\";return n+t.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,t){if(n==='"'&&e==="'"){return e}r=i.indexOf(t);if(r+1){return"\\"+i.charAt(r+1)}e=t.charCodeAt().toString(16);return"\\u"+"0000".substring(e.length)+e})+n}if(s=="object"){if(t.hasOwnProperty&&Object.prototype.toString.call(t)==="[object Array]"){for(r=0,i="[";r<t.length;r++){i+=(r>0?",":"")+e(t[r],n)}return i+"]"}i="{";for(o in t){if(t.hasOwnProperty(o)){i+=typeof t[o]!="function"?(i.length>1?","+n:n)+o+n+":"+e(t[o],n):""}}return i+"}"}return""+t}return{serialize:e,parse:function(e){try{return window[String.fromCharCode(101)+"val"]("("+e+")")}catch(t){}}}});i("tinymce/util/JSONRequest",["tinymce/util/JSON","tinymce/util/XHR","tinymce/util/Tools"],function(e,t,n){function i(e){this.settings=r({},e);this.count=0}var r=n.extend;i.sendRPC=function(e){return(new i).send(e)};i.prototype={send:function(n){var i=n.error,s=n.success;n=r(this.settings,n);n.success=function(t,r){t=e.parse(t);if(typeof t=="undefined"){t={error:"JSON Parse error."}}if(t.error){i.call(n.error_scope||n.scope,t.error,r)}else{s.call(n.success_scope||n.scope,t.result)}};n.error=function(e,t){if(i){i.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)}};return i});i("tinymce/util/JSONP",["tinymce/dom/DOMUtils"],function(e){return{callbacks:{},count:0,send:function(n){var r=this,i=e.DOM,s=n.count!==t?n.count:r.count;var o="tinymce_jsonp_"+s;r.callbacks[s]=function(e){i.remove(o);delete r.callbacks[s];n.callback(e)};i.add(i.doc.body,"script",{id:o,src:n.url,type:"text/javascript"});r.count++}}});i("tinymce/util/LocalStorage",[],function(){function a(){i=[];for(var t in r){i.push(t)}e.length=i.length}function f(){function l(e){var n,r;r=e!==t?f+e:i.indexOf(",",f);if(r===-1||r>i.length){return null}n=i.substring(f,r);f=r+1;return n}var e,i,u,f=0;r={};if(!o){return}n.load(s);i=n.getAttribute(s)||"";do{var c=l();if(c===null){break}e=l(parseInt(c,32)||0);if(e!==null){c=l();if(c===null){break}u=l(parseInt(c,32)||0);if(e){r[e]=u}}}while(e!==null);a()}function l(){var e,t="";if(!o){return}for(var i in r){e=r[i];t+=(t?",":"")+i.length.toString(32)+","+i+","+e.length.toString(32)+","+e}n.setAttribute(s,t);try{n.save(s)}catch(u){}a()}var e,n,r,i,s,o;try{if(window.localStorage){return localStorage}}catch(u){}s="tinymce";n=document.documentElement;o=!!n.addBehavior;if(o){n.addBehavior("#default#userData")}e={key:function(e){return i[e]},getItem:function(e){return e in r?r[e]:null},setItem:function(e,t){r[e]=""+t;l()},removeItem:function(e){delete r[e];l()},clear:function(){r={};l()}};f();return e});i("tinymce/Compat",["tinymce/dom/DOMUtils","tinymce/dom/EventUtils","tinymce/dom/ScriptLoader","tinymce/AddOnManager","tinymce/util/Tools","tinymce/Env"],function(e,t,n,r,i,s){var o=window.tinymce;o.DOM=e.DOM;o.ScriptLoader=n.ScriptLoader;o.PluginManager=r.PluginManager;o.ThemeManager=r.ThemeManager;o.dom=o.dom||{};o.dom.Event=t.Event;i.each(i,function(e,t){o[t]=e});i.each("isOpera isWebKit isIE isGecko isMac".split(" "),function(e){o[e]=s[e.substr(2).toLowerCase()]});return{}});i("tinymce/ui/Layout",["tinymce/util/Class","tinymce/util/Tools"],function(e,t){"use strict";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,s;r=e.items().filter(":visible");i=n.firstControlClass;s=n.lastControlClass;r.each(function(e){e.removeClass(i).removeClass(s);if(n.controlClass){e.addClass(n.controlClass)}});r.eq(0).addClass(i);r.eq(-1).addClass(s)},renderHtml:function(e){var t=this,n=t.settings,r,i="";r=e.items();r.eq(0).addClass(n.firstControlClass);r.eq(-1).addClass(n.lastControlClass);r.each(function(e){if(n.controlClass){e.addClass(n.controlClass)}i+=e.renderHtml()});return i},recalc:function(){},postRender:function(){}})});i("tinymce/ui/AbsoluteLayout",["tinymce/ui/Layout"],function(e){"use strict";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});if(e.recalc){e.recalc()}})},renderHtml:function(e){return'<div id="'+e._id+'-absend" class="'+e.classPrefix+'abs-end"></div>'+this._super(e)}})});i("tinymce/ui/Tooltip",["tinymce/ui/Control","tinymce/ui/Movable"],function(e,t){return e.extend({Mixins:[t],Defaults:{classes:"widget tooltip tooltip-n"},text:function(e){var t=this;if(typeof e!="undefined"){t._value=e;if(t._rendered){t.getEl().lastChild.innerHTML=t.encode(e)}return t}return 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=65535+65535}})});i("tinymce/ui/Widget",["tinymce/ui/Control","tinymce/ui/Tooltip"],function(e,t){"use strict";var n;var r=e.extend({init:function(e){var t=this;t._super(e);t.canFocus=true;if(e.tooltip&&r.tooltips!==false){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",i=="bc-tc");r.toggleClass("tooltip-nw",i=="bc-tl");r.toggleClass("tooltip-ne",i=="bc-tr");r.moveRel(t.getEl(),i)}else{r.hide()}});t.on("mouseleave mousedown click",function(){t.tooltip().hide()})}t.aria("label",e.tooltip)},tooltip:function(){var e=this;if(!n){n=new t({type:"tooltip"});n.renderTo(e.getContainerElm())}return n},active:function(e){var t=this,n;if(e!==n){t.aria("pressed",e);t.toggleClass("active",e)}return t._super(e)},disabled:function(e){var t=this,n;if(e!==n){t.aria("disabled",e);t.toggleClass("disabled",e)}return t._super(e)},postRender:function(){var e=this,t=e.settings;e._rendered=true;e._super();if(!e.parent()&&(t.width||t.height)){e.initLayoutRect();e.repaint()}if(t.autofocus){setTimeout(function(){e.focus()},0)}},remove:function(){this._super();if(n){n.remove();n=null}}});return r});i("tinymce/ui/Button",["tinymce/ui/Widget"],function(e){"use strict";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;if(e.subtype){t.addClass(e.subtype)}if(n){t.addClass("btn-"+n)}},icon:function(e){var t=this,n=t.classPrefix;if(typeof e=="undefined"){return t.settings.icon}t.settings.icon=e;e=e?n+"ico "+n+"i-"+t.settings.icon:"";if(t._rendered){var r=t.getEl().firstChild,i=r.getElementsByTagName("i")[0];if(e){if(!i||i!=r.firstChild){i=document.createElement("i");r.insertBefore(i,r.firstChild)}i.className=e}else if(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()},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;var r=e.settings.icon,i="";if(e.settings.image){r="none";i=" style=\"background-image: url('"+e.settings.image+"')\""}r=e.settings.icon?n+"ico "+n+"i-"+r:"";return'<div id="'+t+'" class="'+e.classes()+'" tabindex="-1">'+'<button role="presentation" type="button" tabindex="-1">'+(r?'<i class="'+r+'"'+i+"></i>":"")+(e._text?(r?" ":"")+e.encode(e._text):"")+"</button>"+"</div>"}})});i("tinymce/ui/ButtonGroup",["tinymce/ui/Container"],function(e){"use strict";return e.extend({Defaults:{defaultType:"button",role:"toolbar"},renderHtml:function(){var e=this,t=e._layout;e.addClass("btn-group");e.preRender();t.preRender(e);return'<div id="'+e._id+'" class="'+e.classes()+'">'+'<div id="'+e._id+'-body">'+(e.settings.html||"")+t.renderHtml(e)+"</div>"+"</div>"}})});i("tinymce/ui/Checkbox",["tinymce/ui/Widget"],function(e){"use strict";return e.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:false},init:function(e){var t=this;t._super(e);t.on("click mousedown",function(e){e.preventDefault()});t.on("click",function(e){e.preventDefault();if(!t.disabled()){t.checked(!t.checked())}});t.checked(t.settings.checked)},checked:function(e){var t=this;if(typeof e!="undefined"){if(e){t.addClass("checked")}else{t.removeClass("checked")}t._checked=e;t.aria("checked",e);return t}return 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>"}})});i("tinymce/ui/PanelButton",["tinymce/ui/Button","tinymce/ui/FloatPanel"],function(e,t){"use strict";return e.extend({showPanel:function(){var e=this,n=e.settings;e.active(true);if(!e.panel){var r=n.panel;if(r.type){r={layout:"grid",items:r}}r.popover=true;r.autohide=true;e.panel=(new t(r)).on("hide",function(){e.active(false)}).parent(e).renderTo(e.getContainerElm());e.panel.fire("show");e.panel.reflow()}else{e.panel.show()}e.panel.moveRel(e.getEl(),n.popoverAlign||(e.isRtl()?["bc-tr","bc-tc"]:["bc-tl","bc-tc"]))},hidePanel:function(){var e=this;if(e.panel){e.panel.hide()}},postRender:function(){var e=this;e.on("click",function(t){if(t.control===e){if(e.panel&&e.panel.visible()){e.hidePanel()}else{e.showPanel()}}});return e._super()}})});i("tinymce/ui/ColorButton",["tinymce/ui/PanelButton","tinymce/dom/DOMUtils"],function(e,t){"use strict";var n=t.DOM;return e.extend({init:function(e){this._super(e);this.addClass("colorbutton")},color:function(e){if(e){this._color=e;this.getEl("preview").style.backgroundColor=e;return this}return this._color},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;var r=e.settings.icon?n+"ico "+n+"i-"+e.settings.icon:"";var i=e.settings.image?" style=\"background-image: url('"+e.settings.image+"')\"":"";return'<div id="'+t+'" class="'+e.classes()+'">'+'<button role="presentation" hidefocus 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 tabindex="-1">'+' <i class="'+n+'caret"></i>'+"</button>"+"</div>"},postRender:function(){var e=this,t=e.settings.onclick;e.on("click",function(r){if(r.control==e&&!n.getParent(r.target,"."+e.classPrefix+"open")){r.stopImmediatePropagation();t.call(e,r)}});delete e.settings.onclick;return e._super()}})});i("tinymce/ui/ComboBox",["tinymce/ui/Widget","tinymce/ui/Factory","tinymce/ui/DomUtils"],function(e,t,n){"use strict";return e.extend({init:function(e){var t=this;t._super(e);t.addClass("combobox");t.subinput=true;e=t.settings;e.menu=e.menu||e.values;if(e.menu){e.icon="caret"}t.on("click",function(n){var r=n.target;while(r){if(r.id&&r.id.indexOf("-open")!=-1){t.fire("action");if(e.menu){t.showMenu();if(n.keyboard){t.menu.items()[0].focus()}}}r=r.parentNode}});t.on("keydown",function(e){if(e.target.nodeName=="INPUT"&&e.keyCode==13){t.parents().reverse().each(function(n){e.preventDefault();t.fire("change");if(n.hasEventListeners("submit")&&n.toJSON){n.fire("submit",{data:n.toJSON()});return false}})}});if(e.placeholder){t.addClass("placeholder");t.on("focusin",function(){if(!t._hasOnChange){n.on(t.getEl("inp"),"change",function(){t.fire("change")});t._hasOnChange=true}if(t.hasClass("placeholder")){t.getEl("inp").value="";t.removeClass("placeholder")}});t.on("focusout",function(){if(t.value().length===0){t.getEl("inp").value=e.placeholder;t.addClass("placeholder")}})}},showMenu:function(){var e=this,n=e.settings,r;if(!e.menu){r=n.menu||[];if(r.length){r={type:"menu",items:r}}else{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){if(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){if(t.target.tagName=="INPUT"){e.menu.hide()}});e.aria("expanded",true)}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;if(typeof e!="undefined"){t._value=e;t.removeClass("placeholder");if(t._rendered){t.getEl("inp").value=e}return t}if(t._rendered){e=t.getEl("inp").value;if(e!=t.settings.placeholder){return e}return""}return t._value},disabled:function(e){var t=this;if(t._rendered&&typeof e!="undefined"){t.getEl("inp").disabled=e}return t._super(e)},focus:function(){this.getEl("inp").focus()},repaint:function(){var e=this,t=e.getEl(),r=e.getEl("open"),i=e.layoutRect();var s,o;if(r){s=i.w-n.getSize(r).width-10}else{s=i.w-10}var u=document;if(u.all&&(!u.documentMode||u.documentMode<=8)){o=e.layoutRect().h-2+"px"}n.css(t.firstChild,{width:s,lineHeight:o});e._super();return e},postRender:function(){var e=this;n.on(this.getEl("inp"),"change",function(){e.fire("change")});return 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;var i=n.value||n.placeholder||"";var s,o,u="",a="";if("spellcheck"in n){a+=' spellcheck="'+n.spellcheck+'"'}if(n.maxLength){a+=' maxlength="'+n.maxLength+'"'}if(n.size){a+=' size="'+n.size+'"'}if(n.subtype){a+=' type="'+n.subtype+'"'}if(e.disabled()){a+=' disabled="disabled"'}s=n.icon;if(s&&s!="caret"){s=r+"ico "+r+"i-"+n.icon}o=e._text;if(s||o){u='<div id="'+t+'-open" class="'+r+"btn "+r+'open" tabIndex="-1">'+'<button id="'+t+'-action" type="button" hidefocus tabindex="-1">'+(s!="caret"?'<i class="'+s+'"></i>':'<i class="'+r+'caret"></i>')+(o?(s?" ":"")+o:"")+"</button>"+"</div>";e.addClass("has-open")}return'<div id="'+t+'" class="'+e.classes()+'">'+'<input id="'+t+'-inp" class="'+r+"textbox "+r+'placeholder" value="'+i+'" hidefocus="true"'+a+">"+u+"</div>"}})});i("tinymce/ui/Path",["tinymce/ui/Widget","tinymce/ui/KeyboardNavigation"],function(e,t){"use strict";return e.extend({init:function(e){var t=this;if(!e.delimiter){e.delimiter="»"}t._super(e);t.addClass("path");t.canFocus=true;t.on("click",function(e){var n,r=e.target;if(n=r.getAttribute("data-index")){t.fire("select",{value:t.data()[n],index:n})}})},focus:function(){var e=this;e.keyNav=new t({root:e,enableLeftRight:true});e.keyNav.focusFirst();return e},data:function(e){var t=this;if(typeof e!=="undefined"){t._data=e;t.update();return t}return 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="",s=e.classPrefix;for(n=0,r=t.length;n<r;n++){i+=(n>0?'<div class="'+s+'divider" aria-hidden="true"> '+e.settings.delimiter+" </div>":"")+'<div role="button" class="'+s+"path-item"+(n==r-1?" "+s+"last":"")+'" data-index="'+n+'" tabindex="-1" id="'+e._id+"-"+n+'">'+t[n].name+"</div>"}if(!i){i='<div class="'+s+'path-item">&nbsp;</div>'}return i}})});i("tinymce/ui/ElementPath",["tinymce/ui/Path","tinymce/EditorManager"],function(e,t){return e.extend({postRender:function(){function r(e){if(e.nodeType===1){if(e.nodeName=="BR"||!!e.getAttribute("data-mce-bogus")){return true}if(e.getAttribute("data-mce-type")==="bookmark"){return true}}return false}var e=this,n=t.activeEditor;e.on("select",function(e){var t=[],i,s=n.getBody();n.focus();i=n.selection.getStart();while(i&&i!=s){if(!r(i)){t.push(i)}i=i.parentNode}n.selection.select(t[t.length-1-e.index]);n.nodeChanged()});n.on("nodeChange",function(t){var i=[],s=t.parents,o=s.length;while(o--){if(s[o].nodeType==1&&!r(s[o])){var u=n.fire("ResolveName",{name:s[o].nodeName.toLowerCase(),target:s[o]});i.push({name:u.name})}}e.data(i)});return e._super()}})});i("tinymce/ui/FormItem",["tinymce/ui/Container"],function(e){"use strict";return e.extend({Defaults:{layout:"flex",align:"center",defaults:{flex:1}},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;e.addClass("formitem");t.preRender(e);return'<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>"}})});i("tinymce/ui/Form",["tinymce/ui/Container","tinymce/ui/FormItem"],function(e,t){"use strict";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;if(i){r=new t({layout:"flex",autoResize:"overflow",defaults:{flex:1},items:[{type:"label",text:i,flex:0,forId:n._id,disabled:n.disabled()}]});r.type="formitem";if(typeof n.settings.flex=="undefined"){n.settings.flex=1}e.replace(n,r);r.add(n)}})},recalcLabels:function(){var e=this,t=0,n=[],r,i;if(e.settings.labelGapCalc===false){return}e.items().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;while(r--){n[r].settings.minWidth=t+i}},visible:function(e){var t=this._super(e);if(e===true&&this._rendered){this.recalcLabels()}return t},submit:function(){return this.fire("submit",{data:this.toJSON()})},postRender:function(){var e=this;e._super();e.recalcLabels();e.fromJSON(e.settings.data)}})});i("tinymce/ui/FieldSet",["tinymce/ui/Form"],function(e){"use strict";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;e.preRender();t.preRender(e);return'<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>"}})});i("tinymce/ui/FilePicker",["tinymce/ui/ComboBox"],function(e){"use strict";return e.extend({init:function(e){var t=this,n=tinymce.activeEditor,r;e.spellcheck=false;r=n.settings.file_browser_callback;if(r){e.icon="browse";e.onaction=function(){r(t.getEl("inp").id,t.getEl("inp").value,e.filetype,window)}}t._super(e)}})});i("tinymce/ui/FitLayout",["tinymce/ui/AbsoluteLayout"],function(e){"use strict";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});if(e.recalc){e.recalc()}})}})});i("tinymce/ui/FlexLayout",["tinymce/ui/AbsoluteLayout"],function(e){"use strict";return e.extend({recalc:function(e){var t,n,r,i,s,o,u,a,f,l,c,h;var p,d,v,m,g=[],y,b,w,E,S,x;var T,N,C,k,L,A,O,M,_;var D,P,H,B,j,F,I;var q,R;var U=Math.max,z=Math.min;r=e.items().filter(":visible");i=e.layoutRect();s=e._paddingBox;o=e.settings;h=e.isRtl()?o.direction||"row-reversed":o.direction;u=o.align;a=e.isRtl()?o.pack||"end":o.pack;f=o.spacing||0;if(h=="row-reversed"||h=="column-reverse"){r=r.set(r.toArray().reverse());h=h.split("-")[0]}if(h=="column"){C="y";T="h";N="minH";k="maxH";A="innerH";L="top";O="bottom";M="deltaH";_="contentH";F="left";H="w";D="x";P="innerW";B="minW";j="maxW";I="right";q="deltaW";R="contentW"}else{C="x";T="w";N="minW";k="maxW";A="innerW";L="left";O="right";M="deltaW";_="contentW";F="top";H="h";D="y";P="innerH";B="minH";j="maxH";I="bottom";q="deltaH";R="contentH"}c=i[A]-s[L]-s[L];x=l=0;for(t=0,n=r.length;t<n;t++){p=r[t];d=p.layoutRect();v=p.settings;m=v.flex;c-=t<n-1?f:0;if(m>0){l+=m;if(d[k]){g.push(p)}d.flex=m}c-=d[N];y=s[F]+d[B]+s[I];if(y>x){x=y}}E={};if(c<0){E[N]=i[N]-c+i[M]}else{E[N]=i[A]-c+i[M]}E[B]=x+i[q];E[_]=i[A]-c;E[R]=x;E.minW=z(E.minW,i.maxW);E.minH=z(E.minH,i.maxH);E.minW=U(E.minW,i.startMinWidth);E.minH=U(E.minH,i.startMinHeight);if(i.autoResize&&(E.minW!=i.minW||E.minH!=i.minH)){E.w=E.minW;E.h=E.minH;e.layoutRect(E);this.recalc(e);if(e._lastRect===null){var W=e.parent();if(W){W._lastRect=null;W.recalc()}}return}w=c/l;for(t=0,n=g.length;t<n;t++){p=g[t];d=p.layoutRect();b=d[k];y=d[N]+d.flex*w;if(y>b){c-=d[k]-d[N];l-=d.flex;d.flex=0;d.maxFlexSize=b}else{d.maxFlexSize=0}}w=c/l;S=s[L];E={};if(l===0){if(a=="end"){S=c+s[L]}else if(a=="center"){S=Math.round(i[A]/2-(i[A]-c)/2)+s[L];if(S<0){S=s[L]}}else if(a=="justify"){S=s[L];f=Math.floor(c/(r.length-1))}}E[D]=s[F];for(t=0,n=r.length;t<n;t++){p=r[t];d=p.layoutRect();y=d.maxFlexSize||d[N];if(u==="center"){E[D]=Math.round(i[P]/2-d[H]/2)}else if(u==="stretch"){E[H]=U(d[B]||0,i[P]-s[F]-s[I]);E[D]=s[F]}else if(u==="end"){E[D]=i[P]-d[H]-s.top}if(d.flex>0){y+=d.flex*w}E[T]=y;E[C]=S;p.layoutRect(E);if(p.recalc){p.recalc()}S+=y+f}}})});i("tinymce/ui/FlowLayout",["tinymce/ui/Layout"],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){if(e.recalc){e.recalc()}})}})});i("tinymce/ui/FormatControls",["tinymce/ui/Control","tinymce/ui/Widget","tinymce/ui/FloatPanel","tinymce/util/Tools","tinymce/EditorManager","tinymce/Env"],function(e,t,n,r,i,s){function u(e){function r(t){function f(e){return e.replace(/%(\w+)/g,"")}var n,r,i=e.dom;var s="",u,a;a=e.settings.preview_styles;if(a===false){return""}if(!a){a="font-family font-size font-weight font-style text-decoration "+"text-transform color background-color border border-radius outline text-shadow"}t=e.formatter.get(t);if(!t){return}t=t[0];n=t.block||t.inline||"span";r=i.create(n);o(t.styles,function(e,t){e=f(e);if(e){i.setStyle(r,t,e)}});o(t.attributes,function(e,t){e=f(e);if(e){i.setAttrib(r,t,e)}});o(t.classes,function(e){e=f(e);if(!i.hasClass(r,e)){i.addClass(r,e)}});e.fire("PreviewFormats");i.setStyles(r,{position:"absolute",left:-65535});e.getBody().appendChild(r);u=i.getStyle(e.getBody(),"fontSize",true);u=/px$/.test(u)?parseInt(u,10):0;o(a.split(" "),function(t){var n=i.getStyle(r,t,true);if(t=="background-color"&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)){n=i.getStyle(e.getBody(),t,true);if(i.toHex(n).toLowerCase()=="#ffffff"){return}}if(t=="color"){if(i.toHex(n).toLowerCase()=="#000000"){return}}if(t=="font-size"){if(/em|%$/.test(n)){if(u===0){return}n=parseFloat(n,10)/(/%$/.test(n)?100:1);n=n*u+"px"}}if(t=="border"&&n){s+="padding:0 2px;"}s+=t+":"+n+";"});e.fire("AfterPreviewFormats");i.remove(r);return s}function i(t,n){return function(){var r=this;e.on("nodeChange",function(i){var s=e.formatter;var u=null;o(i.parents,function(e){o(t,function(t){if(n){if(s.matchNode(e,n,{value:t.value})){u=t.value}}else{if(s.matchNode(e,t.value)){u=t.value}}if(u){return false}});if(u){return false}});r.value(u)})}}function s(e){e=e.split(";");var t=e.length;while(t--){e[t]=e[t].split("=")}return e}function u(){function s(e){var r=[];if(!e){return}o(e,function(e){var i={text:e.title,icon:e.icon};if(e.items){i.menu=s(e.items)}else{var o=e.format||"custom"+t++;if(!e.format){e.name=o;n.push(e)}i.format=o}r.push(i)});return r}function u(){var t;if(e.settings.style_formats_merge){if(e.settings.style_formats){t=s(i.concat(e.settings.style_formats))}else{t=s(i)}}else{t=s(e.settings.style_formats||i)}return t}var t=0,n=[];var i=[{title:"Headers",items:[{title:"Header 1",format:"h1"},{title:"Header 2",format:"h2"},{title:"Header 3",format:"h3"},{title:"Header 4",format:"h4"},{title:"Header 5",format:"h5"},{title:"Header 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"}]}];e.on("init",function(){o(n,function(t){e.formatter.register(t.name,t)})});return{type:"menu",items:u(),onPostRender:function(t){e.fire("renderFormatsMenu",{control:t.control})},itemDefaults:{preview:true,textStyle:function(){if(this.settings.format){return r(this.settings.format)}},onPostRender:function(){var t=this,n=this.settings.format;if(n){t.parent().on("show",function(){t.disabled(!e.formatter.canApply(n));t.active(e.formatter.match(n))})}},onclick:function(){if(this.settings.format){p(this.settings.format)}}}}}function a(){return e.undoManager?e.undoManager.hasUndo():false}function f(){return e.undoManager?e.undoManager.hasRedo():false}function l(){var t=this;t.disabled(!a());e.on("Undo Redo AddUndo TypingUndo",function(){t.disabled(!a())})}function c(){var t=this;t.disabled(!f());e.on("Undo Redo AddUndo TypingUndo",function(){t.disabled(!f())})}function h(){var t=this;e.on("VisualAid",function(e){t.active(e.hasVisual)});t.active(e.hasVisual)}function p(t){if(t.control){t=t.control.value()}if(t){e.execCommand("mceToggleFormat",false,t)}}var t;t=u();o({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;if(e.formatter){e.formatter.formatChanged(n,function(e){t.active(e)})}else{e.on("init",function(){e.formatter.formatChanged(n,function(e){t.active(e)})})}},onclick:function(){p(n)}})});o({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]})});o({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"],alignright:["Align right","JustifyRight"],alignjustify:["Justify","JustifyFull"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1],onPostRender:function(){var t=this;if(e.formatter){e.formatter.formatChanged(n,function(e){t.active(e)})}else{e.on("init",function(){e.formatter.formatChanged(n,function(e){t.active(e)})})}}})});e.addButton("undo",{tooltip:"Undo",onPostRender:l,cmd:"undo"});e.addButton("redo",{tooltip:"Redo",onPostRender:c,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:l,cmd:"undo"});e.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Ctrl+Y",onPostRender:c,cmd:"redo"});e.addMenuItem("visualaid",{text:"Visual aids",selectable:true,onPostRender:h,cmd:"mceToggleVisualAid"});o({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:t});e.addButton("formatselect",function(){var t=[],n=s(e.settings.block_formats||"Paragraph=p;"+"Address=address;"+"Pre=pre;"+"Header 1=h1;"+"Header 2=h2;"+"Header 3=h3;"+"Header 4=h4;"+"Header 5=h5;"+"Header 6=h6");o(n,function(e){t.push({text:e[0],value:e[1],textStyle:function(){return r(e[1])}})});return{type:"listbox",text:n[0][0],values:t,fixedWidth:true,onselect:p,onPostRender:i(t)}});e.addButton("fontselect",function(){var t="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;"+"Trebuchet MS=trebuchet ms,geneva;"+"Verdana=verdana,geneva;"+"Webdings=webdings;"+"Wingdings=wingdings,zapf dingbats";var n=[],r=s(e.settings.font_formats||t);o(r,function(e){n.push({text:{raw:e[0]},value:e[1],textStyle:e[1].indexOf("dings")==-1?"font-family:"+e[1]:""})});return{type:"listbox",text:"Font Family",tooltip:"Font Family",values:n,fixedWidth:true,onPostRender:i(n,"fontname"),onselect:function(t){if(t.control.settings.value){e.execCommand("FontName",false,t.control.settings.value)}}}});e.addButton("fontsizeselect",function(){var t=[],n="8pt 10pt 12pt 14pt 18pt 24pt 36pt";var r=e.settings.fontsize_formats||n;o(r.split(" "),function(e){t.push({text:e,value:e})});return{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:t,fixedWidth:true,onPostRender:i(t,"fontsize"),onclick:function(t){if(t.control.settings.value){e.execCommand("FontSize",false,t.control.settings.value)}}}});e.addMenuItem("formats",{text:"Formats",menu:t})}var o=r.each;i.on("AddEditor",function(t){if(t.editor.rtl){e.rtl=true}u(t.editor)});e.translate=function(e){return i.translate(e)};t.tooltips=!s.iOS});i("tinymce/ui/GridLayout",["tinymce/ui/AbsoluteLayout"],function(e){"use strict";return e.extend({recalc:function(e){var t=e.settings,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T=[],N=[],C,k,L,A,O,M;t=e.settings;i=e.items().filter(":visible");s=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;w=t.alignH||t.align;E=t.alignV||t.align;m=e._paddingBox;if(w&&typeof w=="string"){w=[w]}if(E&&typeof E=="string"){E=[E]}for(c=0;c<r;c++){T.push(0)}for(h=0;h<n;h++){N.push(0)}for(h=0;h<n;h++){for(c=0;c<r;c++){l=i[h*r+c];if(!l){break}f=l.layoutRect();C=f.minW;k=f.minH;T[c]=C>T[c]?C:T[c];N[h]=k>N[h]?k:N[h]}}O=s.innerW-m.left-m.right;for(S=0,c=0;c<r;c++){S+=T[c]+(c>0?y:0);O-=(c>0?y:0)+T[c]}M=s.innerH-m.top-m.bottom;for(x=0,h=0;h<n;h++){x+=N[h]+(h>0?b:0);M-=(h>0?b:0)+N[h]}S+=m.left+m.right;x+=m.top+m.bottom;a={};a.minW=S+(s.w-s.innerW);a.minH=x+(s.h-s.innerH);a.contentW=a.minW-s.deltaW;a.contentH=a.minH-s.deltaH;a.minW=Math.min(a.minW,s.maxW);a.minH=Math.min(a.minH,s.maxH);a.minW=Math.max(a.minW,s.startMinWidth);a.minH=Math.max(a.minH,s.startMinHeight);if(s.autoResize&&(a.minW!=s.minW||a.minH!=s.minH)){a.w=a.minW;a.h=a.minH;e.layoutRect(a);this.recalc(e);if(e._lastRect===null){var _=e.parent();if(_){_._lastRect=null;_.recalc()}}return}if(s.autoResize){a=e.layoutRect(a);a.contentW=a.minW-s.deltaW;a.contentH=a.minH-s.deltaH}var D;if(t.packV=="start"){D=0}else{D=M>0?Math.floor(M/n):0}var P=0;var H=t.flexWidths;if(H){for(c=0;c<H.length;c++){P+=H[c]}}else{P=r}var B=O/P;for(c=0;c<r;c++){T[c]+=H?H[c]*B:B}d=m.top;for(h=0;h<n;h++){p=m.left;u=N[h]+D;for(c=0;c<r;c++){l=i[h*r+c];if(!l){break}v=l.settings;f=l.layoutRect();o=Math.max(T[c],f.startMinWidth);L=A=0;f.x=p;f.y=d;g=v.alignH||(w?w[c]||w[0]:null);if(g=="center"){f.x=p+o/2-f.w/2}else if(g=="right"){f.x=p+o-f.w}else if(g=="stretch"){f.w=o}g=v.alignV||(E?E[c]||E[0]:null);if(g=="center"){f.y=d+u/2-f.h/2}else if(g=="bottom"){f.y=d+u-f.h}else if(g=="stretch"){f.h=u}l.layoutRect(f);p+=o+y;if(l.recalc){l.recalc()}}d+=u+b}}})});i("tinymce/ui/Iframe",["tinymce/ui/Widget"],function(e){"use strict";return e.extend({renderHtml:function(){var e=this;e.addClass("iframe");e.canFocus=false;return'<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;if(!r){setTimeout(function(){n.html(e)},0)}else{r.innerHTML=e;if(t){t()}}return this}})});i("tinymce/ui/Label",["tinymce/ui/Widget","tinymce/ui/DomUtils"],function(e,t){"use strict";return e.extend({init:function(e){var t=this;t._super(e);t.addClass("widget");t.addClass("label");t.canFocus=false;if(e.multiline){t.addClass("autoscroll")}if(e.strong){t.addClass("strong")}},initLayoutRect:function(){var e=this,n=e._super();if(e.settings.multiline){var r=t.getSize(e.getEl());if(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;if(!e.settings.multiline){e.getEl().style.lineHeight=e.layoutRect().h+"px"}return e._super()},text:function(e){var t=this;if(t._rendered&&e){this.innerHtml(t.encode(e))}return 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>"}})});i("tinymce/ui/Toolbar",["tinymce/ui/Container","tinymce/ui/KeyboardNavigation"],function(e,t){"use strict";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;e.items().addClass("toolbar-item");e.keyNav=new t({root:e,enableLeftRight:true});return e._super()}})});i("tinymce/ui/MenuBar",["tinymce/ui/Toolbar"],function(e){"use strict";return e.extend({Defaults:{role:"menubar",containerCls:"menubar",defaults:{type:"menubutton"}}})});i("tinymce/ui/MenuButton",["tinymce/ui/Button","tinymce/ui/Factory","tinymce/ui/MenuBar"],function(e,t,n){"use strict";function r(e,t){while(e){if(t===e){return true}e=e.parentNode}return false}var i=e.extend({init:function(e){var t=this;t._renderOpen=true;t._super(e);t.addClass("menubtn");if(e.fixedWidth){t.addClass("fixed-width")}t.aria("haspopup",true);t.hasPopup=true},showMenu:function(){var e=this,n=e.settings,r;if(e.menu&&e.menu.visible()){return e.hideMenu()}if(!e.menu){r=n.menu||[];if(r.length){r={type:"menu",items:r}}else{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){if(t.control===e.menu){e.focus()}});e.menu.on("show hide",function(t){if(t.control==e.menu){e.activeMenu(t.type=="show")}}).fire("show");e.aria("expanded",true)}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"])},hideMenu:function(){var e=this;if(e.menu){e.menu.items().each(function(e){if(e.hideMenu){e.hideMenu()}});e.menu.hide();e.aria("expanded",false)}},activeMenu:function(e){this.toggleClass("active",e)},renderHtml:function(){var e=this,t=e._id,r=e.classPrefix;var i=e.settings.icon?r+"ico "+r+"i-"+e.settings.icon:"";e.aria("role",e.parent()instanceof n?"menuitem":"button");return'<div id="'+t+'" class="'+e.classes()+'" tabindex="-1">'+'<button id="'+t+'-open" role="presentation" type="button" tabindex="-1">'+(i?'<i class="'+i+'"></i>':"")+"<span>"+(e._text?(i?" ":"")+e.encode(e._text):"")+"</span>"+' <i class="'+r+'caret"></i>'+"</button>"+"</div>"},postRender:function(){var e=this;e.on("click",function(t){if(t.control===e&&r(t.target,e.getEl())){e.showMenu();if(t.keyboard){e.menu.items()[0].focus()}}});e.on("mouseenter",function(t){var n=t.control,r=e.parent(),s;if(n&&r&&n instanceof i&&n.parent()==r){r.items().filter("MenuButton").each(function(e){if(e.hideMenu&&e!=n){if(e.menu&&e.menu.visible()){s=true}e.hideMenu()}});if(s){n.focus();n.showMenu()}}});return e._super()},text:function(e){var t=this,n,r;if(t._rendered){r=t.getEl("open").getElementsByTagName("span");for(n=0;n<r.length;n++){r[n].innerHTML=(t.settings.icon&&e?" ":"")+t.encode(e)}}return this._super(e)},remove:function(){this._super();if(this.menu){this.menu.remove()}}});return i});i("tinymce/ui/ListBox",["tinymce/ui/MenuButton"],function(e){"use strict";return e.extend({init:function(e){var t=this,n,r,i,s,o;t._values=n=e.values;if(n){for(r=0;r<n.length;r++){i=n[r].selected||e.value===n[r].value;if(i){s=s||n[r].text;t._value=n[r].value}}e.menu=n}e.text=e.text||s||n[0].text;t._super(e);t.addClass("listbox");t.on("select",function(n){var r=n.control;if(o){n.lastControl=o}if(e.multiple){r.active(!r.active())}else{t.value(n.control.settings.value)}o=r})},value:function(e){function o(e,t){e.items().each(function(e){n=e.value()===t;if(n){r=r||e.text()}e.active(n);if(e.menu){o(e.menu,t)}})}var t=this,n,r,i,s;if(typeof e!="undefined"){if(t.menu){o(t.menu,e)}else{i=t.settings.menu;for(s=0;s<i.length;s++){n=i[s].value==e;if(n){r=r||i[s].text}i[s].active=n}}t.text(r||this.settings.text)}return t._super(e)}})});i("tinymce/ui/MenuItem",["tinymce/ui/Widget","tinymce/ui/Factory","tinymce/Env"],function(e,t,n){"use strict";return e.extend({Defaults:{border:0,role:"menuitem"},init:function(e){var t=this;t.hasPopup=true;t._super(e);e=t.settings;t.addClass("menu-item");if(e.menu){t.addClass("menu-item-expand")}if(e.preview){t.addClass("menu-item-preview")}if(t._text==="-"||t._text==="|"){t.addClass("menu-item-sep");t.aria("role","separator");t.canFocus=false;t._text="-"}if(e.selectable){t.aria("role","menuitemcheckbox");t.aria("checked",true);t.addClass("menu-item-checkbox");e.icon="selected"}if(!e.preview&&!e.selectable){t.addClass("menu-item-normal")}t.on("mousedown",function(e){e.preventDefault()});t.on("mouseenter click",function(n){if(n.control===t){if(!e.menu&&n.type==="click"){t.parent().hideAll();t.fire("cancel");t.fire("select")}else{t.showMenu();if(n.keyboard){setTimeout(function(){t.menu.items()[0].focus()},0)}}}});if(e.menu){t.aria("haspopup",true)}},hasMenus:function(){return!!this.settings.menu},showMenu:function(){var e=this,n=e.settings,r,i=e.parent();i.items().each(function(t){if(t!==e){t.hideMenu()}});if(n.menu){r=e.menu;if(!r){r=n.menu;if(r.length){r={type:"menu",items:r}}else{r.type=r.type||"menu"}if(i.settings.itemDefaults){r.itemDefaults=i.settings.itemDefaults}r=e.menu=t.create(r).parent(e).renderTo(e.getContainerElm());r.reflow();r.fire("show");r.on("cancel",function(){e.focus()});r.on("hide",function(t){if(t.control===r){e.removeClass("selected")}})}else{r.show()}r._parentMenu=i;r.addClass("menu-sub");var s=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(),s);r.rel=s;s="menu-sub-"+s;r.removeClass(r._lastRel);r.addClass(s);r._lastRel=s;e.addClass("selected");e.aria("expanded",true)}},hideMenu:function(){var e=this;if(e.menu){e.menu.items().each(function(e){if(e.hideMenu){e.hideMenu()}});e.menu.hide();e.aria("expanded",false)}return e},renderHtml:function(){var e=this,t=e._id,r=e.settings,i=e.classPrefix,s=e.encode(e._text);var o=e.settings.icon,u="",a=r.shortcut;if(o){e.parent().addClass("menu-has-icons")}if(r.image){o="none";u=" style=\"background-image: url('"+r.image+"')\""}if(a&&n.mac){a=a.replace(/ctrl\+alt\+/i,"&#x2325;&#x2318;");a=a.replace(/ctrl\+/i,"&#x2318;");a=a.replace(/alt\+/i,"&#x2325;");a=a.replace(/shift\+/i,"&#x21E7;")}o=i+"ico "+i+"i-"+(e.settings.icon||"none");return'<div id="'+t+'" class="'+e.classes()+'" tabindex="-1">'+(s!=="-"?'<i class="'+o+'"'+u+"></i>&nbsp;":"")+(s!=="-"?'<span id="'+t+'-text" class="'+i+'text">'+s+"</span>":"")+(a?'<div id="'+t+'-shortcut" class="'+i+'menu-shortcut">'+a+"</div>":"")+(r.menu?'<div class="'+i+'caret"></div>':"")+"</div>"},postRender:function(){var e=this,t=e.settings;var n=t.textStyle;if(typeof n=="function"){n=n.call(this)}if(n){var r=e.getEl("text");if(r){r.setAttribute("style",n)}}return e._super()},remove:function(){this._super();if(this.menu){this.menu.remove()}}})});i("tinymce/ui/Menu",["tinymce/ui/FloatPanel","tinymce/ui/KeyboardNavigation","tinymce/ui/MenuItem","tinymce/util/Tools"],function(e,t,n,r){"use strict";var i=e.extend({Defaults:{defaultType:"menuitem",border:1,layout:"stack",role:"menu"},init:function(e){var i=this;e.autohide=true;e.constrainToViewport=true;if(e.itemDefaults){var s=e.items,o=s.length;while(o--){s[o]=r.extend({},e.itemDefaults,s[o])}}i._super(e);i.addClass("menu");i.keyNav=new t({root:i,enableUpDown:true,enableLeftRight:true,leftAction:function(){if(i.parent()instanceof n){i.keyNav.cancel()}},onCancel:function(){i.fire("cancel",{},false);i.hide()}})},repaint:function(){this.toggleClass("menu-align",true);this._super();this.getEl().style.height="";this.getEl("body").style.height="";return this},cancel:function(){var e=this;e.hideAll();e.fire("cancel");e.fire("select")},hideAll:function(){var e=this;this.find("menuitem").exec("hideMenu");return e._super()},preRender:function(){var e=this;e.items().each(function(t){var n=t.settings;if(n.icon||n.selectable){e._hasIcons=true;return false}});return e._super()}});return i});i("tinymce/ui/Radio",["tinymce/ui/Checkbox"],function(e){"use strict";return e.extend({Defaults:{classes:"radio",role:"radio"}})});i("tinymce/ui/ResizeHandle",["tinymce/ui/Widget","tinymce/ui/DragHelper"],function(e,t){"use strict";return e.extend({renderHtml:function(){var e=this,t=e.classPrefix;e.addClass("resizehandle");if(e.settings.direction=="both"){e.addClass("resizehandle-both")}e.canFocus=false;return'<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){if(e.settings.direction!="both"){t.deltaX=0}e.fire("Resize",t)},stop:function(){e.fire("ResizeEnd")}})},remove:function(){if(this.resizeDragHelper){this.resizeDragHelper.destroy()}return this._super()}})});i("tinymce/ui/Spacer",["tinymce/ui/Widget"],function(e){"use strict";return e.extend({renderHtml:function(){var e=this;e.addClass("spacer");e.canFocus=false;return'<div id="'+e._id+'" class="'+e.classes()+'"></div>'}})});i("tinymce/ui/SplitButton",["tinymce/ui/MenuButton","tinymce/ui/DomUtils"],function(e,t){return e.extend({Defaults:{classes:"widget btn splitbtn",role:"splitbutton"},repaint:function(){var e=this,n=e.getEl(),r=e.layoutRect(),i,s;e._super();i=n.firstChild;s=n.lastChild;t.css(i,{width:r.w-t.getSize(s).width,height:r.h-2});t.css(s,{height:r.h-2});return 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;var r=e.settings.icon?n+"ico "+n+"i-"+e.settings.icon:"";return'<div id="'+t+'" class="'+e.classes()+'">'+'<button type="button" hidefocus tabindex="-1">'+(r?'<i class="'+r+'"></i>':"")+(e._text?(r?" ":"")+e._text:"")+"</button>"+'<button type="button" class="'+n+'open" hidefocus tabindex="-1">'+(e._menuBtnText?(r?" ":"")+e._menuBtnText:"")+' <i class="'+n+'caret"></i>'+"</button>"+"</div>"},postRender:function(){var e=this,t=e.settings.onclick;e.on("click",function(e){var n=e.target;if(e.control==this){while(n){if(n.nodeName=="BUTTON"&&n.className.indexOf("open")==-1){e.stopImmediatePropagation();t.call(this,e);return}n=n.parentNode}}});delete e.settings.onclick;return e._super()}})});i("tinymce/ui/StackLayout",["tinymce/ui/FlowLayout"],function(e){"use strict";return e.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"}})});i("tinymce/ui/TabPanel",["tinymce/ui/Panel","tinymce/ui/DomUtils"],function(e,t){"use strict";return e.extend({lastIdx:0,Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(e){if(this.activeTabId){t.removeClass(this.getEl(this.activeTabId),this.classPrefix+"active")}this.activeTabId="t"+e;t.addClass(this.getEl("t"+e),this.classPrefix+"active");if(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;e.preRender();t.preRender(e);e.items().each(function(t,i){n+='<div id="'+e._id+"-t"+i+'" class="'+r+'tab" unselectable="on">'+e.encode(t.settings.title)+"</div>"});return'<div id="'+e._id+'" class="'+e.classes()+'" hideFocus="1" tabIndex="-1">'+'<div id="'+e._id+'-head" class="'+r+'tabs">'+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"){var r=n.childNodes.length;while(r--){if(n.childNodes[r]==t.target){e.activateTab(r)}}}})},initLayoutRect:function(){var e=this,n,r,i;r=t.getSize(e.getEl("head")).width;r=r<0?0:r;i=0;e.items().each(function(t,n){r=Math.max(r,t.layoutRect().minW);i=Math.max(i,t.layoutRect().minH);if(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 s=t.getSize(e.getEl("head")).height;e.settings.minWidth=r;e.settings.minHeight=i+s;n=e._super();n.deltaH+=s;n.innerH=n.h-n.deltaH;return n}})});i("tinymce/ui/TextBox",["tinymce/ui/Widget","tinymce/ui/DomUtils"],function(e,t){"use strict";return e.extend({init:function(e){var t=this;t._super(e);t._value=e.value||"";t.addClass("textbox");if(e.multiline){t.addClass("multiline")}else{t.on("keydown",function(e){if(e.keyCode==13){t.parents().reverse().each(function(t){e.preventDefault();if(t.hasEventListeners("submit")&&t.toJSON){t.fire("submit",{data:t.toJSON()});return false}})}})}},disabled:function(e){var t=this;if(t._rendered&&typeof e!="undefined"){t.getEl().disabled=e}return t._super(e)},value:function(e){var t=this;if(typeof e!="undefined"){t._value=e;if(t._rendered){t.getEl().value=e}return t}if(t._rendered){return t.getEl().value}return t._value},repaint:function(){var e=this,t,n,r,i=0,s=0,o;t=e.getEl().style;n=e._layoutRect;o=e._lastRepaintRect||{};var u=document;if(!e.settings.multiline&&u.all&&(!u.documentMode||u.documentMode<=8)){t.lineHeight=n.h-s+"px"}r=e._borderBox;i=r.left+r.right+8;s=r.top+r.bottom+(e.settings.multiline?8:0);if(n.x!==o.x){t.left=n.x+"px";o.x=n.x}if(n.y!==o.y){t.top=n.y+"px";o.y=n.y}if(n.w!==o.w){t.width=n.w-i+"px";o.w=n.w}if(n.h!==o.h){t.height=n.h-s+"px";o.h=n.h}e._lastRepaintRect=o;e.fire("repaint",{},false);return e},renderHtml:function(){var e=this,t=e._id,n=e.settings,r=e.encode(e._value,false),i="";if("spellcheck"in n){i+=' spellcheck="'+n.spellcheck+'"'}if(n.maxLength){i+=' maxlength="'+n.maxLength+'"'}if(n.size){i+=' size="'+n.size+'"'}if(n.subtype){i+=' type="'+n.subtype+'"'}if(e.disabled()){i+=' disabled="disabled"'}if(n.multiline){return'<textarea id="'+t+'" class="'+e.classes()+'" '+(n.rows?' rows="'+n.rows+'"':"")+' hidefocus="true"'+i+">"+r+"</textarea>"}return'<input id="'+t+'" class="'+e.classes()+'" value="'+r+'" hidefocus="true"'+i+">"},postRender:function(){var e=this;t.on(e.getEl(),"change",function(t){e.fire("change",t)});return e._super()},remove:function(){t.off(this.getEl());this._super()}})});i("tinymce/ui/Throbber",["tinymce/ui/DomUtils"],function(e){"use strict";return function(t){var n=this,r;n.show=function(i){n.hide();r=true;window.setTimeout(function(){if(r){t.appendChild(e.createFragment('<div class="mce-throbber"></div>'))}},i||0);return n};n.hide=function(){var e=t.lastChild;if(e&&e.className.indexOf("throbber")!=-1){e.parentNode.removeChild(e)}r=false;return n}}});u(["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/Selection","tinymce/dom/RangeUtils","tinymce/Formatter","tinymce/UndoManager","tinymce/EnterKey","tinymce/ForceBlocks","tinymce/EditorCommands","tinymce/util/URI","tinymce/util/Class","tinymce/ui/Selector","tinymce/ui/Collection","tinymce/ui/DomUtils","tinymce/ui/Control","tinymce/ui/Factory","tinymce/ui/Container","tinymce/ui/DragHelper","tinymce/ui/Scrollable","tinymce/ui/Panel","tinymce/ui/Movable","tinymce/ui/Resizable","tinymce/ui/FloatPanel","tinymce/ui/KeyboardNavigation","tinymce/ui/Window","tinymce/ui/MessageBox","tinymce/WindowManager","tinymce/util/Quirks","tinymce/util/Observable","tinymce/Shortcuts","tinymce/Editor","tinymce/util/I18n","tinymce/FocusManager","tinymce/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"])})(this)