File "tinymce-94e1e97e644e3ad6d2669e2e9768771748e80a62196a5a5f6c5dc8d2f9b3ed60.js"

Path: /IB QUESTIONBANKS/4 Fourth Edition - TOPIC/questionbankiboorg/assets/tinymce-94e1e97e644e3ad6d2669e2e9768771748e80a62196a5a5f6c5dc8d2f9b3ed60js
File size: 404.74 KB
MIME-type: text/plain
Charset: utf-8

 
Open Back
window.tinymce=window.tinymce||{base:"/assets/tinymce",suffix:""},"undefined"!=typeof Turbolinks&&Turbolinks.supported&&document.addEventListener("turbolinks:before-render",function(){tinymce.remove()}),function(e,t){"use strict";function n(e,t){for(var n,r=[],o=0;o<e.length;++o){if(!(n=a[e[o]]||i(e[o])))throw"module definition dependecy not found: "+e[o];r.push(n)}t.apply(null,r)}function r(e,r,i){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(r===t)throw"invalid module definition, dependencies must be specified";if(i===t)throw"invalid module definition, definition function must be specified";n(r,function(){a[e]=i.apply(null,arguments)})}function i(t){for(var n=e,r=t.split(/[.\/]/),i=0;i<r.length;++i){if(!n[r[i]])return;n=n[r[i]]}return n}function o(n){var r,i,o,s,l;for(r=0;r<n.length;r++){i=e,s=(o=n[r]).split(/[.\/]/);for(var c=0;c<s.length-1;++c)i[s[c]]===t&&(i[s[c]]={}),i=i[s[c]];i[s[s.length-1]]=a[o]}if(e.AMDLC_TESTS){for(o in l=e.privateModules||{},a)l[o]=a[o];for(r=0;r<n.length;r++)delete l[n[r]];e.privateModules=l}}var a={};r("tinymce/geom/Rect",[],function(){function e(e,t,n){var r,i,a,s,l,u;return r=t.x,i=t.y,a=e.w,s=e.h,l=t.w,u=t.h,"b"===(n=(n||"").split(""))[0]&&(i+=u),"r"===n[1]&&(r+=l),"c"===n[0]&&(i+=c(u/2)),"c"===n[1]&&(r+=c(l/2)),"b"===n[3]&&(i-=s),"r"===n[4]&&(r-=a),"c"===n[3]&&(i-=c(s/2)),"c"===n[4]&&(r-=c(a/2)),o(r,i,a,s)}function t(t,n,r,i){var o,a;for(a=0;a<i.length;a++)if((o=e(t,n,i[a])).x>=r.x&&o.x+o.w<=r.w+r.x&&o.y>=r.y&&o.y+o.h<=r.h+r.y)return i[a];return null}function n(e,t,n){return o(e.x-t,e.y-n,e.w+2*t,e.h+2*n)}function r(e,t){var n,r,i,a;return n=l(e.x,t.x),r=l(e.y,t.y),i=s(e.x+e.w,t.x+t.w),a=s(e.y+e.h,t.y+t.h),i-n<0||a-r<0?null:o(n,r,i-n,a-r)}function i(e,t,n){var r,i,a,s,c,u,d,f,m,h;return c=e.x,u=e.y,d=e.x+e.w,f=e.y+e.h,m=t.x+t.w,h=t.y+t.h,r=l(0,t.x-c),i=l(0,t.y-u),a=l(0,d-m),s=l(0,f-h),c+=r,u+=i,n&&(d+=r,f+=i,c-=a,u-=s),o(c,u,(d-=a)-c,(f-=s)-u)}function o(e,t,n,r){return{x:e,y:t,w:n,h:r}}function a(e){return o(e.left,e.top,e.width,e.height)}var s=Math.min,l=Math.max,c=Math.round;return{inflate:n,relativePosition:e,findBestRelativePosition:t,intersect:r,clamp:i,create:o,fromClientRect:a}}),r("tinymce/util/Promise",[],function(){function e(e,t){return function(){e.apply(t,arguments)}}function t(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],s(t,e(r,this),e(i,this))}function n(e){var t=this;null!==this._state?l(function(){var n=t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(i){return void e.reject(i)}e.resolve(r)}else(t._state?e.resolve:e.reject)(t._value)}):this._deferreds.push(e)}function r(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if("function"==typeof n)return void s(e(n,t),e(r,this),e(i,this))}this._state=!0,this._value=t,o.call(this)}catch(a){i.call(this,a)}}function i(e){this._state=!1,this._value=e,o.call(this)}function o(){for(var e=0,t=this._deferreds.length;e<t;e++)n.call(this,this._deferreds[e]);this._deferreds=null}function a(e,t,n,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r}function s(e,t,n){var r=!1;try{e(function(e){r||(r=!0,t(e))},function(e){r||(r=!0,n(e))})}catch(i){if(r)return;r=!0,n(i)}}if(window.Promise)return window.Promise;var l=t.immediateFn||"function"==typeof setImmediate&&setImmediate||function(e){setTimeout(e,1)},c=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};return t.prototype["catch"]=function(e){return this.then(null,e)},t.prototype.then=function(e,r){var i=this;return new t(function(t,o){n.call(i,new a(e,r,t,o))})},t.all=function(){var e=Array.prototype.slice.call(1===arguments.length&&c(arguments[0])?arguments[0]:arguments);return new t(function(t,n){function r(o,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(e){r(o,e)},n)}e[o]=a,0==--i&&t(e)}catch(l){n(l)}}if(0===e.length)return t([]);for(var i=e.length,o=0;o<e.length;o++)r(o,e[o])})},t.resolve=function(e){return e&&"object"==typeof e&&e.constructor===t?e:new t(function(t){t(e)})},t.reject=function(e){return new t(function(t,n){n(e)})},t.race=function(e){return new t(function(t,n){for(var r=0,i=e.length;r<i;r++)e[r].then(t,n)})},t}),r("tinymce/util/Delay",["tinymce/util/Promise"],function(e){function t(e,t){function n(e){window.setTimeout(e,0)}var r,i=window.requestAnimationFrame,o=["ms","moz","webkit"];for(r=0;r<o.length&&!i;r++)i=window[o[r]+"RequestAnimationFrame"];i||(i=n),i(e,t)}function n(e,t){return"number"!=typeof t&&(t=0),setTimeout(e,t)}function r(e,t){return"number"!=typeof t&&(t=1),setInterval(e,t)}function i(e){return clearTimeout(e)}function o(e){return clearInterval(e)}function a(e,t){var r,i;return(i=function(){var i=arguments;clearTimeout(r),r=n(function(){e.apply(this,i)},t)}).stop=function(){clearTimeout(r)},i}var s;return{requestAnimationFrame:function(n,r){s?s.then(n):s=new e(function(e){r||(r=document.body),t(e,r)}).then(n)},setTimeout:n,setInterval:r,setEditorTimeout:function(e,t,r){return n(function(){e.removed||t()},r)},setEditorInterval:function(e,t,n){var i;return i=r(function(){e.removed?clearInterval(i):t()},n)},debounce:a,throttle:a,clearInterval:o,clearTimeout:i}}),r("tinymce/Env",[],function(){function e(e){return"matchMedia"in window&&matchMedia(e).matches}var t,n,r,i,o,a,s,l,c,u,d,f,m,h=navigator,p=h.userAgent;return t=window.opera&&window.opera.buildNumber,c=/Android/.test(p),r=(r=!(n=/WebKit/.test(p))&&!t&&/MSIE/gi.test(p)&&/Explorer/gi.test(h.appName))&&/MSIE (\w+)\./.exec(p)[1],i=-1!=p.indexOf("Trident/")&&(-1!=p.indexOf("rv:")||-1!=h.appName.indexOf("Netscape"))&&11,o=-1!=p.indexOf("Edge/")&&!r&&!i&&12,r=r||i||o,a=!n&&!i&&/Gecko/.test(p),s=-1!=p.indexOf("Mac"),l=/(iPad|iPhone)/.test(p),u="FormData"in window&&"FileReader"in window&&"URL"in window&&!!URL.createObjectURL,d=e("only screen and (max-device-width: 480px)")&&(c||l),f=e("only screen and (min-width: 800px)")&&(c||l),m=-1!=p.indexOf("Windows Phone"),o&&(n=!1),{opera:t,webkit:n,ie:r,gecko:a,mac:s,iOS:l,android:c,contentEditable:!l||u||p.match(/AppleWebKit\/(\d*)/)[1]>=534,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:8!=r,range:window.getSelection&&"Range"in window,documentMode:r&&!o?document.documentMode||7:10,fileApi:u,ceFalse:!1===r||r>8,canHaveCSP:!1===r||r>11,desktop:!d&&!f,windowsPhone:m}}),r("tinymce/dom/EventUtils",["tinymce/util/Delay","tinymce/Env"],function(e,t){function n(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r||!1):e.attachEvent&&e.attachEvent("on"+t,n)}function r(e,t,n,r){e.removeEventListener?e.removeEventListener(t,n,r||!1):e.detachEvent&&e.detachEvent("on"+t,n)}function i(e,t){var n,r=t;return(n=e.path)&&n.length>0&&(r=n[0]),e.deepPath&&(n=e.deepPath())&&n.length>0&&(r=n[0]),r}function o(e,n){function r(){return!1}function o(){return!0}var a,s,l=n||{};for(a in e)u[a]||(l[a]=e[a]);if(l.target||(l.target=l.srcElement||document),t.experimentalShadowDom&&(l.target=i(e,l.target)),e&&c.test(e.type)&&e.pageX===s&&e.clientX!==s){var d=l.target.ownerDocument||document,f=d.documentElement,m=d.body;l.pageX=e.clientX+(f&&f.scrollLeft||m&&m.scrollLeft||0)-(f&&f.clientLeft||m&&m.clientLeft||0),l.pageY=e.clientY+(f&&f.scrollTop||m&&m.scrollTop||0)-(f&&f.clientTop||m&&m.clientTop||0)}return l.preventDefault=function(){l.isDefaultPrevented=o,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},l.stopPropagation=function(){l.isPropagationStopped=o,e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},l.stopImmediatePropagation=function(){l.isImmediatePropagationStopped=o,l.stopPropagation()},l.isDefaultPrevented||(l.isDefaultPrevented=r,l.isPropagationStopped=r,l.isImmediatePropagationStopped=r),"undefined"==typeof l.metaKey&&(l.metaKey=!1),l}function a(t,i,o){function a(){o.domLoaded||(o.domLoaded=!0,i(u))}function s(){("complete"===c.readyState||"interactive"===c.readyState&&c.body)&&(r(c,"readystatechange",s),a())}function l(){try{c.documentElement.doScroll("left")}catch(t){return void e.setTimeout(l)}a()}var c=t.document,u={type:"ready"};o.domLoaded?i(u):(c.addEventListener?"complete"===c.readyState?a():n(t,"DOMContentLoaded",a):(n(c,"readystatechange",s),c.documentElement.doScroll&&t.self===t.top&&l()),n(t,"load",a))}function s(){function e(e,t){var n,r,i,o,a=f[t];if(n=a&&a[e.type])for(r=0,i=n.length;r<i;r++)if((o=n[r])&&!1===o.func.call(o.scope,e)&&e.preventDefault(),e.isImmediatePropagationStopped())return}var t,i,s,c,u,d=this,f={};i=l+(+new Date).toString(32),c="onmouseenter"in document.documentElement,s="onfocusin"in document.documentElement,u={mouseenter:"mouseover",mouseleave:"mouseout"},t=1,d.domLoaded=!1,d.events=f,d.bind=function(r,l,m,h){function p(t){e(o(t||E.event),g)}var g,v,y,b,C,x,w,E=window;if(r&&3!==r.nodeType&&8!==r.nodeType){for(r[i]?g=r[i]:(g=t++,r[i]=g,f[g]={}),h=h||r,y=(l=l.split(" ")).length;y--;)x=p,C=w=!1,"DOMContentLoaded"===(b=l[y])&&(b="ready"),d.domLoaded&&"ready"===b&&"complete"==r.readyState?m.call(h,o({type:b})):(c||(C=u[b])&&(x=function(t){var n,r;if(n=t.currentTarget,(r=t.relatedTarget)&&n.contains)r=n.contains(r);else for(;r&&r!==n;)r=r.parentNode;r||((t=o(t||E.event)).type="mouseout"===t.type?"mouseleave":"mouseenter",t.target=n,e(t,g))}),s||"focusin"!==b&&"focusout"!==b||(w=!0,C="focusin"===b?"focus":"blur",x=function(t){(t=o(t||E.event)).type="focus"===t.type?"focusin":"focusout",e(t,g)}),(v=f[g][b])?"ready"===b&&d.domLoaded?m({type:b}):v.push({func:m,scope:h}):(f[g][b]=v=[{func:m,scope:h}],v.fakeName=C,v.capture=w,v.nativeHandler=x,"ready"===b?a(r,x,d):n(r,C||b,x,w)));return r=v=0,m}},d.unbind=function(e,t,n){var o,a,s,l,c,u;if(!e||3===e.nodeType||8===e.nodeType)return d;if(o=e[i]){if(u=f[o],t){for(s=(t=t.split(" ")).length;s--;)if(a=u[c=t[s]]){if(n)for(l=a.length;l--;)if(a[l].func===n){var m=a.nativeHandler,h=a.fakeName,p=a.capture;(a=a.slice(0,l).concat(a.slice(l+1))).nativeHandler=m,a.fakeName=h,a.capture=p,u[c]=a}n&&0!==a.length||(delete u[c],r(e,a.fakeName||c,a.nativeHandler,a.capture))}}else{for(c in u)a=u[c],r(e,a.fakeName||c,a.nativeHandler,a.capture);u={}}for(c in u)return d;delete f[o];try{delete e[i]}catch(g){e[i]=null}}return d},d.fire=function(t,n,r){var a;if(!t||3===t.nodeType||8===t.nodeType)return d;(r=o(null,r)).type=n,r.target=t;do{(a=t[i])&&e(r,a),t=t.parentNode||t.ownerDocument||t.defaultView||t.parentWindow}while(t&&!r.isPropagationStopped());return d},d.clean=function(e){var t,n,r=d.unbind;if(!e||3===e.nodeType||8===e.nodeType)return d;if(e[i]&&r(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(r(e),t=(n=e.getElementsByTagName("*")).length;t--;)(e=n[t])[i]&&r(e);return d},d.destroy=function(){f={}},d.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1}}var l="mce-data-",c=/^(?:mouse|contextmenu)|click/,u={keyLocation:1,layerX:1,layerY:1,returnValue:1,webkitMovementX:1,webkitMovementY:1,keyIdentifier:1};return s.Event=new s,s.Event.bind(window,"ready",function(){}),s}),r("tinymce/dom/Sizzle",[],function(){function e(e,t,n,r){var i,o,a,s,l,c,d,m,h,p;if((t?t.ownerDocument||t:U)!==D&&B(t),n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=(t=t||D).nodeType)&&9!==s)return[];if(L&&!r){if(i=ve.exec(e))if(a=i[1]){if(9===s){if(!(o=t.getElementById(a))||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&I(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return Z.apply(n,t.getElementsByTagName(e)),n;if((a=i[3])&&x.getElementsByClassName)return Z.apply(n,t.getElementsByClassName(a)),n}if(x.qsa&&(!P||!P.test(e))){if(m=d=F,h=t,p=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(c=S(e),(d=t.getAttribute("id"))?m=d.replace(be,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",l=c.length;l--;)c[l]=m+f(c[l]);h=ye.test(e)&&u(t.parentNode)||t,p=c.join(",")}if(p)try{return Z.apply(n,h.querySelectorAll(p)),n}catch(g){}finally{d||t.removeAttribute("id")}}}return k(e.replace(se,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>w.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[F]=!0,e}function i(e){var t=D.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=e.length;r--;)w.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||X)-(~e.sourceIndex||X);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function u(e){return e&&typeof e.getElementsByTagName!==Y&&e}function d(){}function f(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function m(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=W++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,a){var s,l,c=[z,o];if(a){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||i){if((s=(l=t[F]||(t[F]={}))[r])&&s[0]===z&&s[1]===o)return c[2]=s[2];if(l[r]=c,c[2]=e(t,n,a))return!0}}}function h(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function p(t,n,r){for(var i=0,o=n.length;i<o;i++)e(t,n[i],r);return r}function g(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,c=null!=t;s<l;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),c&&t.push(s)));return a}function v(e,t,n,i,o,a){return i&&!i[F]&&(i=v(i)),o&&!o[F]&&(o=v(o,a)),r(function(r,a,s,l){var c,u,d,f=[],m=[],h=a.length,v=r||p(t||"*",s.nodeType?[s]:s,[]),y=!e||!r&&t?v:g(v,f,e,s,l),b=n?o||(r?e:h||i)?[]:a:y;if(n&&n(y,b,s,l),i)for(c=g(b,m),i(c,[],s,l),u=c.length;u--;)(d=c[u])&&(b[m[u]]=!(y[m[u]]=d));if(r){if(o||e){if(o){for(c=[],u=b.length;u--;)(d=b[u])&&c.push(y[u]=d);o(null,b=[],c,l)}for(u=b.length;u--;)(d=b[u])&&(c=o?te.call(r,d):f[u])>-1&&(r[c]=!(a[c]=d))}}else b=g(b===a?b.splice(h,b.length):b),o?o(null,a,b,l):Z.apply(a,b)})}function y(e){for(var t,n,r,i=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,l=m(function(e){return e===t},a,!0),c=m(function(e){return te.call(t,e)>-1},a,!0),u=[function(e,n,r){return!o&&(r||n!==T)||((t=n).nodeType?l(e,n,r):c(e,n,r))}];s<i;s++)if(n=w.relative[e[s].type])u=[m(h(u),n)];else{if((n=w.filter[e[s].type].apply(null,e[s].matches))[F]){for(r=++s;r<i&&!w.relative[e[r].type];r++);return v(s>1&&h(u),s>1&&f(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,s<r&&y(e.slice(s,r)),r<i&&y(e=e.slice(r)),r<i&&f(e))}u.push(n)}return h(u)}function b(t,n){var i=n.length>0,o=t.length>0,a=function(r,a,s,l,c){var u,d,f,m=0,h="0",p=r&&[],v=[],y=T,b=r||o&&w.find.TAG("*",c),C=z+=null==y?1:Math.random()||.1,x=b.length;for(c&&(T=a!==D&&a);h!==x&&null!=(u=b[h]);h++){if(o&&u){for(d=0;f=t[d++];)if(f(u,a,s)){l.push(u);break}c&&(z=C)}i&&((u=!f&&u)&&m--,r&&p.push(u))}if(m+=h,i&&h!==m){for(d=0;f=n[d++];)f(p,v,a,s);if(r){if(m>0)for(;h--;)p[h]||v[h]||(v[h]=J.call(l));v=g(v)}Z.apply(l,v),c&&!r&&v.length>0&&m+n.length>1&&e.uniqueSort(l)}return c&&(z=C,T=y),p};return i?r(a):a}var C,x,w,E,N,S,_,k,T,R,A,B,D,M,L,P,O,H,I,F="sizzle"+-new Date,U=window.document,z=0,W=0,V=n(),$=n(),q=n(),j=function(e,t){return e===t&&(A=!0),0},Y=typeof t,X=1<<31,K={}.hasOwnProperty,G=[],J=G.pop,Q=G.push,Z=G.push,ee=G.slice,te=G.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1},ne="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",re="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",oe="\\["+re+"*("+ie+")(?:"+re+"*([*^$|!~]?=)"+re+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ie+"))|)"+re+"*\\]",ae=":("+ie+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+oe+")*)|.*)\\)|)",se=new RegExp("^"+re+"+|((?:^|[^\\\\])(?:\\\\.)*)"+re+"+$","g"),le=new RegExp("^"+re+"*,"+re+"*"),ce=new RegExp("^"+re+"*([>+~]|"+re+")"+re+"*"),ue=new RegExp("="+re+"*([^\\]'\"]*?)"+re+"*\\]","g"),de=new RegExp(ae),fe=new RegExp("^"+ie+"$"),me={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie+"|[*])"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+ae),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+re+"*(even|odd|(([+-]|)(\\d*)n|)"+re+"*(?:([+-]|)"+re+"*(\\d+)|))"+re+"*\\)|)","i"),bool:new RegExp("^(?:"+ne+")$","i"),needsContext:new RegExp("^"+re+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+re+"*((?:-\\d)?\\d*)"+re+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,pe=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,be=/'|\\/g,Ce=new RegExp("\\\\([\\da-f]{1,6}"+re+"?|("+re+")|.)","ig"),xe=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{Z.apply(G=ee.call(U.childNodes),U.childNodes),G[U.childNodes.length].nodeType}catch(we){Z={apply:G.length?function(e,t){Q.apply(e,ee.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}for(C in x=e.support={},N=e.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},B=e.setDocument=function(e){function t(e){try{return e.top}catch(t){}return null}var n,r=e?e.ownerDocument||e:U,o=r.defaultView;return r!==D&&9===r.nodeType&&r.documentElement?(D=r,M=r.documentElement,L=!N(r),o&&o!==t(o)&&(o.addEventListener?o.addEventListener("unload",function(){B()},!1):o.attachEvent&&o.attachEvent("onunload",function(){B()})),x.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=i(function(e){return e.appendChild(r.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=ge.test(r.getElementsByClassName),x.getById=i(function(e){return M.appendChild(e).id=F,!r.getElementsByName||!r.getElementsByName(F).length}),x.getById?(w.find.ID=function(e,t){if(typeof t.getElementById!==Y&&L){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},w.filter.ID=function(e){var t=e.replace(Ce,xe);return function(e){return e.getAttribute("id")===t}}):(delete w.find.ID,w.filter.ID=function(e){var t=e.replace(Ce,xe);return function(e){var n=typeof e.getAttributeNode!==Y&&e.getAttributeNode("id");return n&&n.value===t}}),w.find.TAG=x.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==Y)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=x.getElementsByClassName&&function(e,t){if(L)return t.getElementsByClassName(e)},O=[],P=[],(x.qsa=ge.test(r.querySelectorAll))&&(i(function(e){e.innerHTML="<select msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&P.push("[*^$]="+re+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||P.push("\\["+re+"*(?:value|"+ne+")"),e.querySelectorAll(":checked").length||P.push(":checked")}),i(function(e){var t=r.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&P.push("name"+re+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||P.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),P.push(",.*:")})),(x.matchesSelector=ge.test(H=M.matches||M.webkitMatchesSelector||M.mozMatchesSelector||M.oMatchesSelector||M.msMatchesSelector))&&i(function(e){x.disconnectedMatch=H.call(e,"div"),H.call(e,"[s!='']:x"),O.push("!=",ae)}),P=P.length&&new RegExp(P.join("|")),O=O.length&&new RegExp(O.join("|")),n=ge.test(M.compareDocumentPosition),I=n||ge.test(M.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},j=n?function(e,t){if(e===t)return A=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===r||e.ownerDocument===U&&I(U,e)?-1:t===r||t.ownerDocument===U&&I(U,t)?1:R?te.call(R,e)-te.call(R,t):0:4&n?-1:1)}:function(e,t){if(e===t)return A=!0,0;var n,i=0,o=e.parentNode,s=t.parentNode,l=[e],c=[t];if(!o||!s)return e===r?-1:t===r?1:o?-1:s?1:R?te.call(R,e)-te.call(R,t):0;if(o===s)return a(e,t);for(n=e;n=n.parentNode;)l.unshift(n);for(n=t;n=n.parentNode;)c.unshift(n);for(;l[i]===c[i];)i++;return i?a(l[i],c[i]):l[i]===U?-1:c[i]===U?1:0},r):D},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==D&&B(t),n=n.replace(ue,"='$1']"),x.matchesSelector&&L&&(!O||!O.test(n))&&(!P||!P.test(n)))try{var r=H.call(t,n);if(r||x.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(we){}return e(n,D,null,[t]).length>0},e.contains=function(e,t){return(e.ownerDocument||e)!==D&&B(e),I(e,t)},e.attr=function(e,n){(e.ownerDocument||e)!==D&&B(e);var r=w.attrHandle[n.toLowerCase()],i=r&&K.call(w.attrHandle,n.toLowerCase())?r(e,n,!L):t;return i!==t?i:x.attributes||!L?e.getAttribute(n):(i=e.getAttributeNode(n))&&i.specified?i.value:null},e.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},e.uniqueSort=function(e){var t,n=[],r=0,i=0;if(A=!x.detectDuplicates,R=!x.sortStable&&e.slice(0),e.sort(j),A){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return R=null,e},E=e.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=E(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=E(t);return n},(w=e.selectors={cacheLength:50,createPseudo:r,match:me,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Ce,xe),e[3]=(e[3]||e[4]||e[5]||"").replace(Ce,xe),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(e){var t,n=!e[6]&&e[2];return me.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&de.test(n)&&(t=S(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Ce,xe).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=V[e+" "];return t||(t=new RegExp("(^|"+re+")"+e+"("+re+"|$)"))&&V(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==Y&&e.getAttribute("class")||"")})},ATTR:function(t,n,r){return function(i){var o=e.attr(i,t);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,f,m,h,p=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s;if(g){if(o){for(;p;){for(d=t;d=d[p];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;h=p="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?g.firstChild:g.lastChild],a&&y){for(m=(c=(u=g[F]||(g[F]={}))[e]||[])[0]===z&&c[1],f=c[0]===z&&c[2],d=m&&g.childNodes[m];d=++m&&d&&d[p]||(f=m=0)||h.pop();)if(1===d.nodeType&&++f&&d===t){u[e]=[z,m,f];break}}else if(y&&(c=(t[F]||(t[F]={}))[e])&&c[0]===z)f=c[1];else for(;(d=++m&&d&&d[p]||(f=m=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++f||(y&&((d[F]||(d[F]={}))[e]=[z,f]),d!==t)););return(f-=i)===r||f%r==0&&f/r>=0}}},PSEUDO:function(t,n){var i,o=w.pseudos[t]||w.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[F]?o(n):o.length>1?(i=[t,t,"",n],w.setFilters.hasOwnProperty(t.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)e[r=te.call(e,i[a])]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=_(e.replace(se,"$1"));return i[F]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),!n.pop()}}),has:r(function(t){return function(n){return e(t,n).length>0}}),contains:r(function(e){return e=e.replace(Ce,xe),function(t){return(t.textContent||t.innerText||E(t)).indexOf(e)>-1}}),lang:r(function(t){return fe.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(Ce,xe).toLowerCase(),function(e){var n;do{if(n=L?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=window.location&&window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===M},focus:function(e){return e===D.activeElement&&(!D.hasFocus||D.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return pe.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[n<0?n+t:n]}),even:c(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=w.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[C]=s(C);for(C in{submit:!0,reset:!0})w.pseudos[C]=l(C);return d.prototype=w.filters=w.pseudos,w.setFilters=new d,S=e.tokenize=function(t,n){var r,i,o,a,s,l,c,u=$[t+" "];if(u)return n?0:u.slice(0);for(s=t,l=[],c=w.preFilter;s;){for(a in r&&!(i=le.exec(s))||(i&&(s=s.slice(i[0].length)||s),l.push(o=[])),r=!1,(i=ce.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(se," ")}),s=s.slice(r.length)),w.filter)!(i=me[a].exec(s))||c[a]&&!(i=c[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?e.error(t):$(t,l).slice(0)},_=e.compile=function(e,t){var n,r=[],i=[],o=q[e+" "];if(!o){for(t||(t=S(e)),n=t.length;n--;)(o=y(t[n]))[F]?r.push(o):i.push(o);(o=q(e,b(i,r))).selector=e}return o},k=e.select=function(e,t,n,r){var i,o,a,s,l,c="function"==typeof e&&e,d=!r&&S(e=c.selector||e);if(n=n||[],1===d.length){if((o=d[0]=d[0].slice(0)).length>2&&"ID"===(a=o[0]).type&&x.getById&&9===t.nodeType&&L&&w.relative[o[1].type]){if(!(t=(w.find.ID(a.matches[0].replace(Ce,xe),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=me.needsContext.test(e)?0:o.length;i--&&(a=o[i],!w.relative[s=a.type]);)if((l=w.find[s])&&(r=l(a.matches[0].replace(Ce,xe),ye.test(o[0].type)&&u(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&f(o)))return Z.apply(n,r),n;break}}return(c||_(e,d))(r,t,!L,n,ye.test(e)&&u(t.parentNode)||t),n},x.sortStable=F.split("").sort(j).join("")===F,x.detectDuplicates=!!A,B(),x.sortDetached=i(function(e){return 1&e.compareDocumentPosition(D.createElement("div"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(ne,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),e}),r("tinymce/util/Arr",[],function(){function e(e){var t,n,r=e;if(!u(e))for(r=[],t=0,n=e.length;t<n;t++)r[t]=e[t];return r}function n(e,n,r){var i,o;if(!e)return 0;if(r=r||e,e.length!==t){for(i=0,o=e.length;i<o;i++)if(!1===n.call(r,e[i],i,e))return 0}else for(i in e)if(e.hasOwnProperty(i)&&!1===n.call(r,e[i],i,e))return 0;return 1}function r(e,t){var r=[];return n(e,function(n,i){r.push(t(n,i,e))}),r}function i(e,t){var r=[];return n(e,function(n,i){t&&!t(n,i,e)||r.push(n)}),r}function o(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 a(e,t,n,r){var i=0;for(arguments.length<3&&(n=e[0]);i<e.length;i++)n=t.call(r,n,e[i],i);return n}function s(e,t,n){var r,i;for(r=0,i=e.length;r<i;r++)if(t.call(n,e[r],r,e))return r;return-1}function l(e,n,r){var i=s(e,n,r);return-1!==i?e[i]:t}function c(e){return e[e.length-1]}var u=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};return{isArray:u,toArray:e,each:n,map:r,filter:i,indexOf:o,reduce:a,findIndex:s,find:l,last:c}}),r("tinymce/util/Tools",["tinymce/Env","tinymce/util/Arr"],function(e,n){function r(e){return null===e||e===t?"":(""+e).replace(h,"")}function i(e,r){return r?!("array"!=r||!n.isArray(e))||typeof e==r:e!==t}function o(e,t,n){var r;for(t=t||",","string"==typeof(e=e||[])&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function s(e,t,n){var r,i,o,a,s,l=this,c=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),o=e[3].match(/(^|\.)(\w+)$/i)[2],!(i=l.createNS(e[3].replace(/\.\w+$/,""),n))[o]){if("static"==e[2])return i[o]=t,void(this.onCreate&&this.onCreate(e[2],e[3],i[o]));t[o]||(t[o]=function(){},c=1),i[o]=t[o],l.extend(i[o].prototype,t),e[5]&&(r=l.resolve(e[5]).prototype,a=e[5].match(/\.(\w+)$/i)[1],s=i[o],i[o]=c?function(){return r[a].apply(this,arguments)}:function(){return this.parent=r[a],s.apply(this,arguments)},i[o].prototype[o]=i[o],l.each(r,function(e,t){i[o].prototype[t]=r[t]}),l.each(t,function(e,t){r[t]?i[o].prototype[t]=function(){return this.parent=r[t],e.apply(this,arguments)}:t!=o&&(i[o].prototype[t]=e)})),l.each(t["static"],function(e,t){i[o][t]=e})}}function l(e,n){var r,i,o,a,s=arguments;for(r=1,i=s.length;r<i;r++)for(o in n=s[r])n.hasOwnProperty(o)&&(a=n[o])!==t&&(e[o]=a);return e}function c(e,t,r,i){i=i||this,e&&(r&&(e=e[r]),n.each(e,function(e,n){if(!1===t.call(i,e,n,r))return!1;c(e,t,r,i)}))}function u(e,t){var n,r;for(t=t||window,e=e.split("."),n=0;n<e.length;n++)t[r=e[n]]||(t[r]={}),t=t[r];return t}function d(e,t){var n,r;for(t=t||window,n=0,r=(e=e.split(".")).length;n<r&&(t=t[e[n]]);n++);return t}function f(e,t){return!e||i(e,"array")?e:n.map(e.split(t||","),r)}function m(t){var n=e.cacheSuffix;return n&&(t+=(-1===t.indexOf("?")?"?":"&")+n),t}var h=/^\s*|\s*$/g;return{trim:r,isArray:n.isArray,is:i,toArray:n.toArray,makeMap:o,each:n.each,map:n.map,grep:n.filter,inArray:n.indexOf,hasOwn:a,extend:l,create:s,walk:c,createNS:u,resolve:d,explode:f,_addCacheSuffix:m}}),r("tinymce/dom/DomQuery",["tinymce/dom/EventUtils","tinymce/dom/Sizzle","tinymce/util/Tools","tinymce/Env"],function(e,n,r,i){function o(e){return void 0!==e}function a(e){return"string"==typeof e}function s(e){return e&&e==e.window}function l(e,t){var n,r,i;for(i=(t=t||E).createElement("div"),n=t.createDocumentFragment(),
i.innerHTML=e;r=i.firstChild;)n.appendChild(r);return n}function c(e,t,n,r){var i;if(a(t))t=l(t,v(e[0]));else if(t.length&&!t.nodeType){if(t=f.makeArray(t),r)for(i=t.length-1;i>=0;i--)c(e,t[i],n,r);else for(i=0;i<t.length;i++)c(e,t[i],n,r);return e}if(t.nodeType)for(i=e.length;i--;)n.call(e[i],t);return e}function u(e,t){return e&&t&&-1!==(" "+e.className+" ").indexOf(" "+t+" ")}function d(e,t,n){var r,i;return t=f(t)[0],e.each(function(){var e=this;n&&r==e.parentNode?i.appendChild(e):(r=e.parentNode,i=t.cloneNode(!1),e.parentNode.insertBefore(i,e),i.appendChild(e))}),e}function f(e,t){return new f.fn.init(e,t)}function m(e,t){var n;if(t.indexOf)return t.indexOf(e);for(n=t.length;n--;)if(t[n]===e)return n;return-1}function h(e){return null===e||e===w?"":(""+e).replace(P,"")}function p(e,t){var n,r,i,o,a;if(e)if((n=e.length)===o){for(r in e)if(e.hasOwnProperty(r)&&(a=e[r],!1===t.call(a,r,a)))break}else for(i=0;i<n&&(a=e[i],!1!==t.call(a,i,a));i++);return e}function g(e,t){var n=[];return p(e,function(e,r){t(r,e)&&n.push(r)}),n}function v(e){return e?9==e.nodeType?e:e.ownerDocument:E}function y(e,n,r){var i=[],o=e[n];for("string"!=typeof r&&r instanceof f&&(r=r[0]);o&&9!==o.nodeType;){if(r!==t){if(o===r)break;if("string"==typeof r&&f(o).is(r))break}1===o.nodeType&&i.push(o),o=o[n]}return i}function b(e,n,r,i){var o=[];for(i instanceof f&&(i=i[0]);e;e=e[n])if(!r||e.nodeType===r){if(i!==t){if(e===i)break;if("string"==typeof i&&f(e).is(i))break}o.push(e)}return o}function C(e,t,n){for(e=e[t];e;e=e[t])if(e.nodeType==n)return e;return null}function x(e,t,n){p(n,function(n,r){e[n]=e[n]||{},e[n][t]=r})}var w,E=document,N=Array.prototype.push,S=Array.prototype.slice,_=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,k=e.Event,T=r.makeMap("children,contents,next,prev"),R=r.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),A=r.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),B={"for":"htmlFor","class":"className",readonly:"readOnly"},D={"float":"cssFloat"},M={},L={},P=/^\s*|\s*$/g;return f.fn=f.prototype={constructor:f,selector:"",context:null,length:0,init:function(e,t){var n,r,i=this;if(!e)return i;if(e.nodeType)return i.context=i[0]=e,i.length=1,i;if(t&&t.nodeType)i.context=t;else{if(t)return f(e).attr(t);i.context=t=document}if(a(e)){if(i.selector=e,!(n="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:_.exec(e)))return f(t).find(e);if(n[1])for(r=l(e,v(t)).firstChild;r;)N.call(i,r),r=r.nextSibling;else{if(!(r=v(t).getElementById(n[2])))return i;if(r.id!==n[2])return i.find(e);i.length=1,i[0]=r}}else this.add(e,!1);return i},toArray:function(){return r.toArray(this)},add:function(e,t){var n,r,i=this;if(a(e))return i.add(f(e));if(!1!==t)for(n=f.unique(i.toArray().concat(f.makeArray(e))),i.length=n.length,r=0;r<n.length;r++)i[r]=n[r];else N.apply(i,f.makeArray(e));return i},attr:function(e,t){var n,r=this;if("object"==typeof e)p(e,function(e,t){r.attr(e,t)});else{if(!o(t)){if(r[0]&&1===r[0].nodeType){if((n=M[e])&&n.get)return n.get(r[0],e);if(A[e])return r.prop(e)?e:w;null===(t=r[0].getAttribute(e,2))&&(t=w)}return t}this.each(function(){var n;if(1===this.nodeType){if((n=M[e])&&n.set)return void n.set(this,t);null===t?this.removeAttribute(e,2):this.setAttribute(e,t,2)}})}return r},removeAttr:function(e){return this.attr(e,null)},prop:function(e,t){var n=this;if("object"==typeof(e=B[e]||e))p(e,function(e,t){n.prop(e,t)});else{if(!o(t))return n[0]&&n[0].nodeType&&e in n[0]?n[0][e]:t;this.each(function(){1==this.nodeType&&(this[e]=t)})}return n},css:function(e,t){function n(e){return e.replace(/-(\D)/g,function(e,t){return t.toUpperCase()})}function r(e){return e.replace(/[A-Z]/g,function(e){return"-"+e})}var i,a,s=this;if("object"==typeof e)p(e,function(e,t){s.css(e,t)});else if(o(t))e=n(e),"number"!=typeof t||R[e]||(t+="px"),s.each(function(){var n=this.style;if((a=L[e])&&a.set)a.set(this,t);else{try{this.style[D[e]||e]=t}catch(i){}null!==t&&""!==t||(n.removeProperty?n.removeProperty(r(e)):n.removeAttribute(e))}});else{if(i=s[0],(a=L[e])&&a.get)return a.get(i);if(i.ownerDocument.defaultView)try{return i.ownerDocument.defaultView.getComputedStyle(i,null).getPropertyValue(r(e))}catch(l){return w}else if(i.currentStyle)return i.currentStyle[n(e)]}return s},remove:function(){for(var e,t=this,n=this.length;n--;)e=t[n],k.clean(e),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var e,t=this,n=this.length;n--;)for(e=t[n];e.firstChild;)e.removeChild(e.firstChild);return this},html:function(e){var t,n=this;if(o(e)){t=n.length;try{for(;t--;)n[t].innerHTML=e}catch(r){f(n[t]).empty().append(e)}return n}return n[0]?n[0].innerHTML:""},text:function(e){var t,n=this;if(o(e)){for(t=n.length;t--;)"innerText"in n[t]?n[t].innerText=e:n[0].textContent=e;return n}return n[0]?n[0].innerText||n[0].textContent:""},append:function(){return c(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.appendChild(e)})},prepend:function(){return c(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.insertBefore(e,this.firstChild)},!0)},before:function(){var e=this;return e[0]&&e[0].parentNode?c(e,arguments,function(e){this.parentNode.insertBefore(e,this)}):e},after:function(){var e=this;return e[0]&&e[0].parentNode?c(e,arguments,function(e){this.parentNode.insertBefore(e,this.nextSibling)},!0):e},appendTo:function(e){return f(e).append(this),this},prependTo:function(e){return f(e).prepend(this),this},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){return d(this,e)},wrapAll:function(e){return d(this,e,!0)},wrapInner:function(e){return this.each(function(){f(this).contents().wrapAll(e)}),this},unwrap:function(){return this.parent().each(function(){f(this).replaceWith(this.childNodes)})},clone:function(){var e=[];return this.each(function(){e.push(this.cloneNode(!0))}),f(e)},addClass:function(e){return this.toggleClass(e,!0)},removeClass:function(e){return this.toggleClass(e,!1)},toggleClass:function(e,t){var n=this;return"string"!=typeof e?n:(-1!==e.indexOf(" ")?p(e.split(" "),function(){n.toggleClass(this,t)}):n.each(function(n,r){var i,o;(o=u(r,e))!==t&&(i=r.className,o?r.className=h((" "+i+" ").replace(" "+e+" "," ")):r.className+=i?" "+e:e)}),n)},hasClass:function(e){return u(this[0],e)},each:function(e){return p(this,e)},on:function(e,t){return this.each(function(){k.bind(this,e,t)})},off:function(e,t){return this.each(function(){k.unbind(this,e,t)})},trigger:function(e){return this.each(function(){"object"==typeof e?k.fire(this,e.type,e):k.fire(this,e)})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return new f(S.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},find:function(e){var t,n,r=[];for(t=0,n=this.length;t<n;t++)f.find(e,this[t],r);return f(r)},filter:function(e){return f("function"==typeof e?g(this.toArray(),function(t,n){return e(n,t)}):f.filter(e,this.toArray()))},closest:function(e){var t=[];return e instanceof f&&(e=e[0]),this.each(function(n,r){for(;r;){if("string"==typeof e&&f(r).is(e)){t.push(r);break}if(r==e){t.push(r);break}r=r.parentNode}}),f(t)},offset:function(e){var t,n,r,i,o=0,a=0;return e?this.css(e):((t=this[0])&&(r=(n=t.ownerDocument).documentElement,t.getBoundingClientRect&&(o=(i=t.getBoundingClientRect()).left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,a=i.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:o,top:a})},push:N,sort:[].sort,splice:[].splice},r.extend(f,{extend:r.extend,makeArray:function(e){return s(e)||e.nodeType?[e]:r.toArray(e)},inArray:m,isArray:r.isArray,each:p,trim:h,grep:g,find:n,expr:n.selectors,unique:n.uniqueSort,text:n.getText,contains:n.contains,filter:function(e,t,n){var r=t.length;for(n&&(e=":not("+e+")");r--;)1!=t[r].nodeType&&t.splice(r,1);return t=1===t.length?f.find.matchesSelector(t[0],e)?[t[0]]:[]:f.find.matches(e,t)}}),p({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return y(e,"parentNode")},next:function(e){return C(e,"nextSibling",1)},prev:function(e){return C(e,"previousSibling",1)},children:function(e){return b(e.firstChild,"nextSibling",1)},contents:function(e){return r.toArray(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(e,t){f.fn[e]=function(n){var r=[];return this.each(function(){var e=t.call(r,this,n,r);e&&(f.isArray(e)?r.push.apply(r,e):r.push(e))}),this.length>1&&(T[e]||(r=f.unique(r)),0===e.indexOf("parents")&&(r=r.reverse())),r=f(r),n?r.filter(n):r}}),p({parentsUntil:function(e,t){return y(e,"parentNode",t)},nextUntil:function(e,t){return b(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return b(e,"previousSibling",1,t).slice(1)}},function(e,t){f.fn[e]=function(n,r){var i=[];return this.each(function(){var e=t.call(i,this,n,i);e&&(f.isArray(e)?i.push.apply(i,e):i.push(e))}),this.length>1&&(i=f.unique(i),0!==e.indexOf("parents")&&"prevUntil"!==e||(i=i.reverse())),i=f(i),r?i.filter(r):i}}),f.fn.is=function(e){return!!e&&this.filter(e).length>0},f.fn.init.prototype=f.fn,f.overrideDefaults=function(e){function t(r,i){return n=n||e(),0===arguments.length&&(r=n.element),i||(i=n.context),new t.fn.init(r,i)}var n;return f.extend(t,this),t},i.ie&&i.ie<8&&(x(M,"get",{maxlength:function(e){var t=e.maxLength;return 2147483647===t?w:t},size:function(e){var t=e.size;return 20===t?w:t},"class":function(e){return e.className},style:function(e){var t=e.style.cssText;return 0===t.length?w:t}}),x(M,"set",{"class":function(e,t){e.className=t},style:function(e,t){e.style.cssText=t}})),i.ie&&i.ie<9&&(D["float"]="styleFloat",x(L,"set",{opacity:function(e,t){var n=e.style;null===t||""===t?n.removeAttribute("filter"):(n.zoom=1,n.filter="alpha(opacity="+100*t+")")}})),f.attrHooks=M,f.cssHooks=L,f}),r("tinymce/html/Styles",[],function(){return function(e,t){function n(e,t,n,r){function i(e){return(e=parseInt(e,10).toString(16)).length>1?e:"0"+e}return"#"+i(t)+i(n)+i(r)}var r,i,o,a,s=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,l=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,c=/\s*([^:]+):\s*([^;]+);?/g,u=/\s+$/,d={},f="\ufeff";for(e=e||{},t&&(o=t.getValidStyles(),a=t.getInvalidStyles()),i=("\\\" \\' \\; \\: ; : "+f).split(" "),r=0;r<i.length;r++)d[i[r]]=f+r,d[f+r]=i[r];return{toHex:function(e){return e.replace(s,n)},parse:function(t){function i(e,t,n){var i,o,a,s;if((i=w[e+"-top"+t])&&(o=w[e+"-right"+t])&&(a=w[e+"-bottom"+t])&&(s=w[e+"-left"+t])){var l=[i,o,a,s];for(r=l.length-1;r--&&l[r]===l[r+1];);r>-1&&n||(w[e+t]=-1==r?l[0]:l.join(" "),delete w[e+"-top"+t],delete w[e+"-right"+t],delete w[e+"-bottom"+t],delete w[e+"-left"+t])}}function o(e){var t,n=w[e];if(n){for(t=(n=n.split(" ")).length;t--;)if(n[t]!==n[0])return!1;return w[e]=n[0],!0}}function a(e,t,n,r){o(t)&&o(n)&&o(r)&&(w[e]=w[t]+" "+w[n]+" "+w[r],delete w[t],delete w[n],delete w[r])}function m(e){return x=!0,d[e]}function h(e,t){return x&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return d[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e}function p(e){return String.fromCharCode(parseInt(e.slice(1),16))}function g(e){return e.replace(/\\[0-9a-f]+/gi,p)}function v(t,n,r,i,o,a){if(o=o||a)return"'"+(o=h(o)).replace(/\'/g,"\\'")+"'";if(n=h(n||r||i),!e.allow_script_urls){var s=n.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(s))return"";if(!e.allow_svg_data_urls&&/^data:image\/svg/i.test(s))return""}return E&&(n=E.call(N,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"}var y,b,C,x,w={},E=e.url_converter,N=e.url_converter_scope||this;if(t){for(t=(t=t.replace(/[\u0000-\u001F]/g,"")).replace(/\\[\"\';:\uFEFF]/g,m).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,m)});y=c.exec(t);)if(c.lastIndex=y.index+y[0].length,b=y[1].replace(u,"").toLowerCase(),C=y[2].replace(u,""),b&&C){if(b=g(b),C=g(C),-1!==b.indexOf(f)||-1!==b.indexOf('"'))continue;if(!e.allow_script_urls&&("behavior"==b||/expression\s*\(|\/\*|\*\//.test(C)))continue;"font-weight"===b&&"700"===C?C="bold":"color"!==b&&"background-color"!==b||(C=C.toLowerCase()),C=(C=C.replace(s,n)).replace(l,v),w[b]=x?h(C,!0):C}i("border","",!0),i("border","-width"),i("border","-color"),i("border","-style"),i("padding",""),i("margin",""),a("border","border-width","border-style","border-color"),"medium none"===w.border&&delete w.border,"none"===w["border-image"]&&delete w["border-image"]}return w},serialize:function(e,t){function n(t){var n,r,i,a;if(n=o[t])for(r=0,i=n.length;r<i;r++)t=n[r],(a=e[t])&&(l+=(l.length>0?" ":"")+t+": "+a+";")}function r(e,t){var n;return(!(n=a["*"])||!n[e])&&(!(n=a[t])||!n[e])}var i,s,l="";if(t&&o)n("*"),n(t);else for(i in e)!(s=e[i])||a&&!r(i,t)||(l+=(l.length>0?" ":"")+i+": "+s+";");return l}}}}),r("tinymce/dom/TreeWalker",[],function(){return function(e,t){function n(e,n,r,i){var o,a;if(e){if(!i&&e[n])return e[n];if(e!=t){if(o=e[r])return o;for(a=e.parentNode;a&&a!=t;a=a.parentNode)if(o=a[r])return o}}}function r(e,n,r,i){var o,a,s;if(e){if(o=e[r],t&&o===t)return;if(o){if(!i)for(s=o[n];s;s=s[n])if(!s[n])return s;return o}if((a=e.parentNode)&&a!==t)return a}}var i=e;this.current=function(){return i},this.next=function(e){return i=n(i,"firstChild","nextSibling",e)},this.prev=function(e){return i=n(i,"lastChild","previousSibling",e)},this.prev2=function(e){return i=r(i,"lastChild","previousSibling",e)}}}),r("tinymce/dom/Range",["tinymce/util/Tools"],function(e){function t(n){function r(){return P.createDocumentFragment()}function i(e,t){E(F,e,t)}function o(e,t){E(U,e,t)}function a(e){i(e.parentNode,j(e))}function s(e){i(e.parentNode,j(e)+1)}function l(e){o(e.parentNode,j(e))}function c(e){o(e.parentNode,j(e)+1)}function u(e){e?(L[V]=L[W],L[$]=L[z]):(L[W]=L[V],L[z]=L[$]),L.collapsed=F}function d(e){a(e),c(e)}function f(e){i(e,0),o(e,1===e.nodeType?e.childNodes.length:e.nodeValue.length)}function m(e,t){var n=L[W],r=L[z],i=L[V],o=L[$],a=t.startContainer,s=t.startOffset,l=t.endContainer,c=t.endOffset;return 0===e?w(n,r,a,s):1===e?w(i,o,a,s):2===e?w(i,o,l,c):3===e?w(n,r,l,c):void 0}function h(){N(I)}function p(){return N(O)}function g(){return N(H)}function v(e){var t,r,i=this[W],o=this[z];3!==i.nodeType&&4!==i.nodeType||!i.nodeValue?(i.childNodes.length>0&&(r=i.childNodes[o]),r?i.insertBefore(e,r):3==i.nodeType?n.insertAfter(e,i):i.appendChild(e)):o?o>=i.nodeValue.length?n.insertAfter(e,i):(t=i.splitText(o),i.parentNode.insertBefore(e,t)):i.parentNode.insertBefore(e,i)}function y(e){var t=L.extractContents();L.insertNode(e),e.appendChild(t),L.selectNode(e)}function b(){return q(new t(n),{startContainer:L[W],startOffset:L[z],endContainer:L[V],endOffset:L[$],collapsed:L.collapsed,commonAncestorContainer:L.commonAncestorContainer})}function C(e,t){var n;if(3==e.nodeType)return e;if(t<0)return e;for(n=e.firstChild;n&&t>0;)--t,n=n.nextSibling;return n||e}function x(){return L[W]==L[V]&&L[z]==L[$]}function w(e,t,r,i){var o,a,s,l,c,u;if(e==r)return t==i?0:t<i?-1:1;for(o=r;o&&o.parentNode!=e;)o=o.parentNode;if(o){for(a=0,s=e.firstChild;s!=o&&a<t;)a++,s=s.nextSibling;return t<=a?-1:1}for(o=e;o&&o.parentNode!=r;)o=o.parentNode;if(o){for(a=0,s=r.firstChild;s!=o&&a<i;)a++,s=s.nextSibling;return a<i?-1:1}for(l=n.findCommonAncestor(e,r),c=e;c&&c.parentNode!=l;)c=c.parentNode;for(c||(c=l),u=r;u&&u.parentNode!=l;)u=u.parentNode;if(u||(u=l),c==u)return 0;for(s=l.firstChild;s;){if(s==c)return-1;if(s==u)return 1;s=s.nextSibling}}function E(e,t,r){var i,o;for(e?(L[W]=t,L[z]=r):(L[V]=t,L[$]=r),i=L[V];i.parentNode;)i=i.parentNode;for(o=L[W];o.parentNode;)o=o.parentNode;o==i?w(L[W],L[z],L[V],L[$])>0&&L.collapse(e):L.collapse(e),L.collapsed=x(),L.commonAncestorContainer=n.findCommonAncestor(L[W],L[V])}function N(e){var t,n,r,i,o,a,s,l=0,c=0;if(L[W]==L[V])return S(e);for(n=(t=L[V]).parentNode;n;t=n,n=n.parentNode){if(n==L[W])return _(t,e);++l}for(n=(t=L[W]).parentNode;n;t=n,n=n.parentNode){if(n==L[V])return k(t,e);++c}for(r=c-l,i=L[W];r>0;)i=i.parentNode,r--;for(o=L[V];r<0;)o=o.parentNode,r++;for(a=i.parentNode,s=o.parentNode;a!=s;a=a.parentNode,s=s.parentNode)i=a,o=s;return T(i,o,e)}function S(e){var t,n,i,o,a,s,l,c;if(e!=I&&(t=r()),L[z]==L[$])return t;if(3==L[W].nodeType){if(n=L[W].nodeValue.substring(L[z],L[$]),e!=H&&(i=L[W],l=L[z],c=L[$]-L[z],0===l&&c>=i.nodeValue.length-1?i.parentNode.removeChild(i):i.deleteData(l,c),L.collapse(F)),e==I)return;return n.length>0&&t.appendChild(P.createTextNode(n)),t}for(i=C(L[W],L[z]),o=L[$]-L[z];i&&o>0;)a=i.nextSibling,s=D(i,e),t&&t.appendChild(s),--o,i=a;return e!=H&&L.collapse(F),t}function _(e,t){var n,i,o,a,s;if(t!=I&&(n=r()),i=R(e,t),n&&n.appendChild(i),(o=j(e)-L[z])<=0)return t!=H&&(L.setEndBefore(e),L.collapse(U)),n;for(i=e.previousSibling;o>0;)a=i.previousSibling,s=D(i,t),n&&n.insertBefore(s,n.firstChild),--o,i=a;return t!=H&&(L.setEndBefore(e),L.collapse(U)),n}function k(e,t){var n,i,o,a,s,l;for(t!=I&&(n=r()),o=A(e,t),n&&n.appendChild(o),i=j(e),++i,a=L[$]-i,o=e.nextSibling;o&&a>0;)s=o.nextSibling,l=D(o,t),n&&n.appendChild(l),--a,o=s;return t!=H&&(L.setStartAfter(e),L.collapse(F)),n}function T(e,t,n){var i,o,a,s,l,c;for(n!=I&&(o=r()),i=A(e,n),o&&o.appendChild(i),a=j(e),s=j(t)-++a,l=e.nextSibling;s>0;)c=l.nextSibling,i=D(l,n),o&&o.appendChild(i),l=c,--s;return i=R(t,n),o&&o.appendChild(i),n!=H&&(L.setStartAfter(e),L.collapse(F)),o}function R(e,t){var n,r,i,o,a,s=C(L[V],L[$]-1),l=s!=L[V];if(s==e)return B(s,l,U,t);for(r=B(n=s.parentNode,U,U,t);n;){for(;s;)i=s.previousSibling,o=B(s,l,U,t),t!=I&&r.insertBefore(o,r.firstChild),l=F,s=i;if(n==e)return r;s=n.previousSibling,a=B(n=n.parentNode,U,U,t),t!=I&&a.appendChild(r),r=a}}function A(e,t){var n,r,i,o,a,s=C(L[W],L[z]),l=s!=L[W];if(s==e)return B(s,l,F,t);for(r=B(n=s.parentNode,U,F,t);n;){for(;s;)i=s.nextSibling,o=B(s,l,F,t),t!=I&&r.appendChild(o),l=F,s=i;if(n==e)return r;s=n.nextSibling,a=B(n=n.parentNode,U,F,t),t!=I&&a.appendChild(r),r=a}}function B(e,t,r,i){var o,a,s,l,c;if(t)return D(e,i);if(3==e.nodeType){if(o=e.nodeValue,r?(l=L[z],a=o.substring(l),s=o.substring(0,l)):(l=L[$],a=o.substring(0,l),s=o.substring(l)),i!=H&&(e.nodeValue=s),i==I)return;return(c=n.clone(e,U)).nodeValue=a,c}return i!=I?n.clone(e,U):void 0}function D(e,t){if(t!=I)return t==H?n.clone(e,F):e;e.parentNode.removeChild(e)}function M(){return n.create("body",null,g()).outerText}var L=this,P=n.doc,O=0,H=1,I=2,F=!0,U=!1,z="startOffset",W="startContainer",V="endContainer",$="endOffset",q=e.extend,j=n.nodeIndex;return q(L,{startContainer:P,startOffset:0,endContainer:P,endOffset:0,collapsed:F,commonAncestorContainer:P,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:i,setEnd:o,setStartBefore:a,setStartAfter:s,setEndBefore:l,setEndAfter:c,collapse:u,selectNode:d,selectNodeContents:f,compareBoundaryPoints:m,deleteContents:h,extractContents:p,cloneContents:g,insertNode:v,surroundContents:y,cloneRange:b,toStringIE:M}),L}return t.prototype.toString=function(){return this.toStringIE()},t}),r("tinymce/html/Entities",["tinymce/util/Tools"],function(e){function t(e){var t;return(t=document.createElement("div")).innerHTML=e,t.textContent||t.innerText||e}function n(e,t){var n,r,o,a={};if(e){for(e=e.split(","),t=t||10,n=0;n<e.length;n+=2)r=String.fromCharCode(parseInt(e[n],t)),i[r]||(o="&"+e[n+1]+";",a[r]=o,a[o]=r);return a}}var r,i,o,a=e.makeMap,s=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=/[<>&\"\']/g,u=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,d={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};i={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},o={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},r=n("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);var f={encodeRaw:function(e,t){return e.replace(t?s:l,function(e){return i[e]||e})},encodeAllRaw:function(e){return(""+e).replace(c,function(e){return i[e]||e})},encodeNumeric:function(e,t){return e.replace(t?s:l,function(e){return e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":i[e]||"&#"+e.charCodeAt(0)+";"})},encodeNamed:function(e,t,n){return n=n||r,e.replace(t?s:l,function(e){return i[e]||n[e]||e})},getEncodeFunc:function(e,t){function o(e,n){return e.replace(n?s:l,function(e){return i[e]||t[e]||"&#"+e.charCodeAt(0)+";"||e})}function c(e,n){return f.encodeNamed(e,n,t)}return t=n(t)||r,(e=a(e.replace(/\+/g,","))).named&&e.numeric?o:e.named?t?c:f.encodeNamed:e.numeric?f.encodeNumeric:f.encodeRaw},decode:function(e){return e.replace(u,function(e,n){return n?(n="x"===n.charAt(0).toLowerCase()?parseInt(n.substr(1),16):parseInt(n,10))>65535?(n-=65536,String.fromCharCode(55296+(n>>10),56320+(1023&n))):d[n]||String.fromCharCode(n):o[e]||r[e]||t(e)})}};return f}),r("tinymce/dom/StyleSheetLoader",["tinymce/util/Tools","tinymce/util/Delay"],function(e,t){return function(n,r){function i(e){n.getElementsByTagName("head")[0].appendChild(e)}function o(r,o,c){function u(){for(var e=b.passed,t=e.length;t--;)e[t]();b.status=2,b.passed=[],b.failed=[]}function d(){for(var e=b.failed,t=e.length;t--;)e[t]();b.status=3,b.passed=[],b.failed=[]}function f(){var e=navigator.userAgent.match(/WebKit\/(\d*)/);return!!(e&&e[1]<536)}function m(e,n){e()||((new Date).getTime()-y<a?t.setTimeout(n):d())}function h(){m(function(){for(var e,t,r=n.styleSheets,i=r.length;i--;)if((t=(e=r[i]).ownerNode?e.ownerNode:e.owningElement)&&t.id===g.id)return u(),!0},h)}function p(){m(function(){try{var e=v.sheet.cssRules;return u(),!!e}catch(t){}},p)}var g,v,y,b;if(r=e._addCacheSuffix(r),l[r]?b=l[r]:(b={passed:[],failed:[]},l[r]=b),o&&b.passed.push(o),c&&b.failed.push(c),1!=b.status)if(2!=b.status)if(3!=b.status){if(b.status=1,(g=n.createElement("link")).rel="stylesheet",g.type="text/css",g.id="u"+s++,g.async=!1,g.defer=!1,y=(new Date).getTime(),"onload"in g&&!f())g.onload=h,g.onerror=d;else{if(navigator.userAgent.indexOf("Firefox")>0)return(v=n.createElement("style")).textContent='@import "'+r+'"',p(),void i(v);h()}i(g),g.href=r}else d();else u()}var a,s=0,l={};a=(r=r||{}).maxLoadTime||5e3,this.load=o}}),r("tinymce/dom/DOMUtils",["tinymce/dom/Sizzle","tinymce/dom/DomQuery","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,o,a,s,l,c,u){function d(e,t){var n,r={},i=t.keep_values;return n={set:function(n,r,i){t.url_converter&&(r=t.url_converter.call(t.url_converter_scope||e,r,i,n[0])),n.attr("data-mce-"+i,r).attr(i,r)},get:function(e,t){return e.attr("data-mce-"+t)||e.attr(t)}},r={style:{set:function(e,t){null===t||"object"!=typeof t?(i&&e.attr("data-mce-style",t),e.attr("style",t)):e.css(t)},get:function(t){var n=t.attr("data-mce-style")||t.attr("style");return n=e.serializeStyle(e.parseStyle(n),t[0].nodeName)}}},i&&(r.href=r.src=n),r}function f(e,t){var n=t.attr("style");(n=e.serializeStyle(e.parseStyle(n),t[0].nodeName))||(n=null),t.attr("data-mce-style",n)}function m(e,t){var n,r,i=0;if(e)for(n=e.nodeType,e=e.previousSibling;e;e=e.previousSibling)r=e.nodeType,(!t||3!=r||r!=n&&e.nodeValue.length)&&(i++,n=r);return i}function h(e,t){var o,a=this;a.doc=e,a.win=window,a.files={},a.counter=0,a.stdMode=!b||e.documentMode>=8,a.boxModel=!b||"CSS1Compat"==e.compatMode||a.stdMode,a.styleSheetLoader=new u(e),a.boundEvents=[],a.settings=t=t||{},a.schema=t.schema,a.styles=new r({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema),a.fixDoc(e),a.events=t.ownEvents?new i(t.proxy):i.Event,a.attrHooks=d(a,t),o=t.schema?t.schema.getBlockElements():{},a.$=n.overrideDefaults(function(){return{context:e,element:a.getRoot()}}),a.isBlock=function(e){if(!e)return!1;var t=e.nodeType;return t?!(1!==t||!o[e.nodeName]):!!o[e]}}var p=c.each,g=c.is,v=c.grep,y=c.trim,b=l.ie,C=/^([a-z0-9],?)+$/i,x=/^[ \t\r\n]*$/;return h.prototype={$$:function(e){return"string"==typeof e&&(e=this.get(e)),this.$(e)},root:null,fixDoc:function(e){var t,n=this.settings;if(b&&n.schema)for(t in"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)}),n.schema.getCustomElements())e.createElement(t)},clone:function(e,t){var n,r,i=this;return!b||1!==e.nodeType||t?e.cloneNode(t):(r=i.doc,t?n.firstChild:(n=r.createElement(e.nodeName),p(i.getAttribs(e),function(t){i.setAttrib(n,t.nodeName,i.getAttrib(e,t.nodeName))}),n))},getRoot:function(){var e=this;return e.settings.root_element||e.doc.body},getViewPort:function(e){var t,n;return t=(e=e||this.win).document,n=this.boxModel?t.documentElement:t.body,{x:e.pageXOffset||n.scrollLeft,y:e.pageYOffset||n.scrollTop,w:e.innerWidth||n.clientWidth,h:e.innerHeight||n.clientHeight}},getRect:function(e){var t,n,r=this;return e=r.get(e),t=r.getPos(e),n=r.getSize(e),{x:t.x,y:t.y,w:n.w,h:n.h}},getSize:function(e){var t,n,r=this;return e=r.get(e),t=r.getStyle(e,"width"),n=r.getStyle(e,"height"),-1===t.indexOf("px")&&(t=0),-1===n.indexOf("px")&&(n=0),{w:parseInt(t,10)||e.offsetWidth||e.clientWidth,h:parseInt(n,10)||e.offsetHeight||e.clientHeight}},getParent:function(e,t,n){return this.getParents(e,t,n,!1)},getParents:function(e,n,r,i){var o,a=this,s=[];for(e=a.get(e),i=i===t,r=r||("BODY"!=a.getRoot().nodeName?a.getRoot().parentNode:null),g(n,"string")&&(o=n,n="*"===n?function(e){return 1==e.nodeType}:function(e){return a.is(e,o)});e&&e!=r&&e.nodeType&&9!==e.nodeType;){if(!n||n(e)){if(!i)return e;s.push(e)}e=e.parentNode}return i?s:null},get:function(e){var t;return e&&this.doc&&"string"==typeof e&&(t=e,(e=this.doc.getElementById(e))&&e.id!==t)?this.doc.getElementsByName(t)[1]:e},getNext:function(e,t){return this._findSib(e,t,"nextSibling")},getPrev:function(e,t){return this._findSib(e,t,"previousSibling")},select:function(t,n){var r=this;return e(t,r.get(n)||r.settings.root_element||r.doc,[])},is:function(n,r){var i;if(n.length===t){if("*"===r)return 1==n.nodeType;if(C.test(r)){for(r=r.toLowerCase().split(/,/),n=n.nodeName.toLowerCase(),i=r.length-1;i>=0;i--)if(r[i]==n)return!0;return!1}}if(n.nodeType&&1!=n.nodeType)return!1;var o=n.nodeType?[n]:n;return e(r,o[0].ownerDocument||o[0],null,o).length>0},add:function(e,t,n,r,i){var o=this;return this.run(e,function(e){var a;return a=g(t,"string")?o.doc.createElement(t):t,o.setAttribs(a,n),r&&(r.nodeType?a.appendChild(r):o.setHTML(a,r)),i?a:e.appendChild(a)})},create:function(e,t,n){return this.add(this.doc.createElement(e),e,t,n,1)},createHTML:function(e,t,n){var r,i="";for(r in i+="<"+e,t)t.hasOwnProperty(r)&&null!==t[r]&&"undefined"!=typeof t[r]&&(i+=" "+r+'="'+this.encode(t[r])+'"');return void 0!==n?i+">"+n+"</"+e+">":i+" />"},createFragment:function(e){var t,n,r,i=this.doc;for(r=i.createElement("div"),t=i.createDocumentFragment(),e&&(r.innerHTML=e);n=r.firstChild;)t.appendChild(n);return t},remove:function(e,t){return e=this.$$(e),t?e.each(function(){for(var e;e=this.firstChild;)3==e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)}).remove():e.remove(),e.length>1?e.toArray():e[0]},setStyle:function(e,t,n){e=this.$$(e).css(t,n),this.settings.update_styles&&f(this,e)},getStyle:function(e,n,r){return e=this.$$(e),r?e.css(n):("float"==(n=n.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}))&&(n=l.ie&&l.ie<12?"styleFloat":"cssFloat"),e[0]&&e[0].style?e[0].style[n]:t)},setStyles:function(e,t){e=this.$$(e).css(t),this.settings.update_styles&&f(this,e)},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,i,o=this,a=o.settings;""===n&&(n=null),r=(e=o.$$(e)).attr(t),e.length&&((i=o.attrHooks[t])&&i.set?i.set(e,n,t):e.attr(t,n),r!=n&&a.onSetAttrib&&a.onSetAttrib({attrElm:e,attrName:t,attrValue:n}))},setAttribs:function(e,t){var n=this;n.$$(e).each(function(e,r){p(t,function(e,t){n.setAttrib(r,t,e)})})},getAttrib:function(e,t,n){var r,i,o=this;return(e=o.$$(e)).length&&(i=(r=o.attrHooks[t])&&r.get?r.get(e,t):e.attr(t)),void 0===i&&(i=n||""),i},getPos:function(e,t){var r,i,o=this,a=0,s=0,l=o.doc,c=l.body;if(t=t||c,e=o.get(e)){if(t===c&&e.getBoundingClientRect&&"static"===n(c).css("position"))return i=e.getBoundingClientRect(),t=o.boxModel?l.documentElement:c,{x:a=i.left+(l.documentElement.scrollLeft||c.scrollLeft)-t.clientLeft,y:s=i.top+(l.documentElement.scrollTop||c.scrollTop)-t.clientTop};for(r=e;r&&r!=t&&r.nodeType;)a+=r.offsetLeft||0,s+=r.offsetTop||0,r=r.offsetParent;for(r=e.parentNode;r&&r!=t&&r.nodeType;)a-=r.scrollLeft||0,s-=r.scrollTop||0,r=r.parentNode}return{x:a,y:s}},parseStyle:function(e){return this.styles.parse(e)},serializeStyle:function(e,t){return this.styles.serialize(e,t)},addStyle:function(e){var t,n,r=this,i=r.doc;if(r!==h.DOM&&i===document){var o=h.DOM.addedStyles;if((o=o||[])[e])return;o[e]=!0,h.DOM.addedStyles=o}(n=i.getElementById("mceDefaultStyles"))||((n=i.createElement("style")).id="mceDefaultStyles",n.type="text/css",(t=i.getElementsByTagName("head")[0]).firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(i.createTextNode(e))},loadCSS:function(e){var t,n=this,r=n.doc;n===h.DOM||r!==document?(e||(e=""),t=r.getElementsByTagName("head")[0],p(e.split(","),function(e){var i;e=c._addCacheSuffix(e),n.files[e]||(n.files[e]=!0,i=n.create("link",{rel:"stylesheet",href:e}),b&&r.documentMode&&r.recalc&&(i.onload=function(){r.recalc&&r.recalc(),i.onload=null}),t.appendChild(i))})):h.DOM.loadCSS(e)},addClass:function(e,t){this.$$(e).addClass(t)},removeClass:function(e,t){this.toggleClass(e,t,!1)},hasClass:function(e,t){return this.$$(e).hasClass(t)},toggleClass:function(e,t,r){this.$$(e).toggleClass(t,r).each(function(){""===this.className&&n(this).attr("class",null)})},show:function(e){this.$$(e).show()},hide:function(e){this.$$(e).hide()},isHidden:function(e){return"none"==this.$$(e).css("display")},uniqueId:function(e){return(e||"mce_")+this.counter++},setHTML:function(e,t){
e=this.$$(e),b?e.each(function(e,r){if(!1!==r.canHaveHTML){for(;r.firstChild;)r.removeChild(r.firstChild);try{r.innerHTML="<br>"+t,r.removeChild(r.firstChild)}catch(i){n("<div></div>").html("<br>"+t).contents().slice(1).appendTo(r)}return t}}):e.html(t)},getOuterHTML:function(e){return 1==(e=this.get(e)).nodeType&&"outerHTML"in e?e.outerHTML:n("<div></div>").append(n(e).clone()).html()},setOuterHTML:function(e,t){var r=this;r.$$(e).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(e){}r.remove(n(this).html(t),!0)})},decode:s.decode,encode:s.encodeAllRaw,insertAfter:function(e,t){return t=this.get(t),this.run(e,function(e){var n,r;return n=t.parentNode,(r=t.nextSibling)?n.insertBefore(e,r):n.appendChild(e),e})},replace:function(e,t,n){return this.run(t,function(t){return g(t,"array")&&(e=e.cloneNode(!0)),n&&p(v(t.childNodes),function(t){e.appendChild(t)}),t.parentNode.replaceChild(e,t)})},rename:function(e,t){var n,r=this;return e.nodeName!=t.toUpperCase()&&(n=r.create(t),p(r.getAttribs(e),function(t){r.setAttrib(n,t.nodeName,r.getAttrib(e,t.nodeName))}),r.replace(n,e,1)),n||e},findCommonAncestor:function(e,t){for(var n,r=e;r;){for(n=t;n&&r!=n;)n=n.parentNode;if(r==n)break;r=r.parentNode}return!r&&e.ownerDocument?e.ownerDocument.documentElement:r},toHex:function(e){return this.styles.toHex(c.trim(e))},run:function(e,t,n){var r,i=this;return"string"==typeof e&&(e=i.get(e)),!!e&&(n=n||this,e.nodeType||!e.length&&0!==e.length?t.call(n,e):(r=[],p(e,function(e,o){e&&("string"==typeof e&&(e=i.get(e)),r.push(t.call(n,e,o)))}),r))},getAttribs:function(e){var t;if(!(e=this.get(e)))return[];if(b){if(t=[],"OBJECT"==e.nodeName)return e.attributes;"OPTION"===e.nodeName&&this.getAttrib(e,"selected")&&t.push({specified:1,nodeName:"selected"});var n=/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi;return e.cloneNode(!1).outerHTML.replace(n,"").replace(/[\w:\-]+/gi,function(e){t.push({specified:1,nodeName:e})}),t}return e.attributes},isEmpty:function(e,t){var n,r,i,a,s,l,c=this,u=0;if(e=e.firstChild){s=new o(e,e.parentNode),t=t||(c.schema?c.schema.getNonEmptyElements():null),a=c.schema?c.schema.getWhiteSpaceElements():{};do{if(1===(i=e.nodeType)){var d=e.getAttribute("data-mce-bogus");if(d){e=s.next("all"===d);continue}if(l=e.nodeName.toLowerCase(),t&&t[l]){if("br"===l){u++,e=s.next();continue}return!1}for(n=(r=c.getAttribs(e)).length;n--;)if("name"===(l=r[n].nodeName)||"data-mce-bookmark"===l)return!1}if(8==i)return!1;if(3===i&&!x.test(e.nodeValue))return!1;if(3===i&&e.parentNode&&a[e.parentNode.nodeName]&&x.test(e.nodeValue))return!1;e=s.next()}while(e)}return u<=1},createRng:function(){var e=this.doc;return e.createRange?e.createRange():new a(this)},nodeIndex:m,split:function(e,t,n){function r(e){function t(e){var t=e.previousSibling&&"SPAN"==e.previousSibling.nodeName,n=e.nextSibling&&"SPAN"==e.nextSibling.nodeName;return t&&n}var n,i=e.childNodes,o=e.nodeType;if(1!=o||"bookmark"!=e.getAttribute("data-mce-type")){for(n=i.length-1;n>=0;n--)r(i[n]);if(9!=o){if(3==o&&e.nodeValue.length>0){var a=y(e.nodeValue).length;if(!s.isBlock(e.parentNode)||a>0||0===a&&t(e))return}else if(1==o&&(1==(i=e.childNodes).length&&i[0]&&1==i[0].nodeType&&"bookmark"==i[0].getAttribute("data-mce-type")&&e.parentNode.insertBefore(i[0],e),i.length||/^(br|hr|input|img)$/i.test(e.nodeName)))return;s.remove(e)}return e}}var i,o,a,s=this,l=s.createRng();if(e&&t)return l.setStart(e.parentNode,s.nodeIndex(e)),l.setEnd(t.parentNode,s.nodeIndex(t)),i=l.extractContents(),(l=s.createRng()).setStart(t.parentNode,s.nodeIndex(t)+1),l.setEnd(e.parentNode,s.nodeIndex(e)+1),o=l.extractContents(),(a=e.parentNode).insertBefore(r(i),e),n?a.insertBefore(n,e):a.insertBefore(t,e),a.insertBefore(r(o),e),s.remove(e),n||t},bind:function(e,t,n,r){var i=this;if(c.isArray(e)){for(var o=e.length;o--;)e[o]=i.bind(e[o],t,n,r);return e}return!i.settings.collect||e!==i.doc&&e!==i.win||i.boundEvents.push([e,t,n,r]),i.events.bind(e,t,n,r||i)},unbind:function(e,t,n){var r,i=this;if(c.isArray(e)){for(r=e.length;r--;)e[r]=i.unbind(e[r],t,n);return e}if(i.boundEvents&&(e===i.doc||e===i.win))for(r=i.boundEvents.length;r--;){var o=i.boundEvents[r];e!=o[0]||t&&t!=o[1]||n&&n!=o[2]||this.events.unbind(o[0],o[1],o[2])}return this.events.unbind(e,t,n)},fire:function(e,t,n){return this.events.fire(e,t,n)},getContentEditable:function(e){var t;return e&&1==e.nodeType?(t=e.getAttribute("data-mce-contenteditable"))&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null:null},getContentEditableParent:function(e){for(var t=this.getRoot(),n=null;e&&e!==t&&null===(n=this.getContentEditable(e));e=e.parentNode);return n},destroy:function(){var t=this;if(t.boundEvents){for(var n=t.boundEvents.length;n--;){var r=t.boundEvents[n];this.events.unbind(r[0],r[1],r[2])}t.boundEvents=null}e.setDocument&&e.setDocument(),t.win=t.doc=t.root=t.events=t.frag=null},isChildOf:function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},dumpRng:function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset},_findSib:function(e,t,n){var r=this,i=t;if(e)for("string"==typeof i&&(i=function(e){return r.is(e,t)}),e=e[n];e;e=e[n])if(i(e))return e;return null}},h.DOM=new h(document),h.nodeIndex=m,h}),r("tinymce/dom/ScriptLoader",["tinymce/dom/DOMUtils","tinymce/util/Tools"],function(e,t){function n(){function e(e,n,i){function o(){u.remove(c),l&&(l.onreadystatechange=l.onload=l=null),n()}function s(){a(i)?i():"undefined"!=typeof console&&console.log&&console.log("Failed to load script: "+e)}var l,c,u=r;c=u.uniqueId(),(l=document.createElement("script")).id=c,l.type="text/javascript",l.src=t._addCacheSuffix(e),"onreadystatechange"in l?l.onreadystatechange=function(){/loaded|complete/.test(l.readyState)&&o()}:l.onload=o,l.onerror=s,(document.getElementsByTagName("head")[0]||document.body).appendChild(l)}var n,s=0,l=1,c=2,u=3,d={},f=[],m={},h=[],p=0;this.isDone=function(e){return d[e]==c},this.markDone=function(e){d[e]=c},this.add=this.load=function(e,t,r,i){d[e]==n&&(f.push(e),d[e]=s),t&&(m[e]||(m[e]=[]),m[e].push({success:t,failure:i,scope:r||this}))},this.remove=function(e){delete d[e],delete m[e]},this.loadQueue=function(e,t,n){this.loadScripts(f,e,t,n)},this.loadScripts=function(t,r,s,f){function g(e,t){i(m[t],function(t){a(t[e])&&t[e].call(t.scope)}),m[t]=n}var v,y=[];h.push({success:r,failure:f,scope:s||this}),(v=function(){var n=o(t);t.length=0,i(n,function(t){d[t]!==c?d[t]!==u?d[t]!==l&&(d[t]=l,p++,e(t,function(){d[t]=c,p--,g("success",t),v()},function(){d[t]=u,p--,y.push(t),g("failure",t),v()})):g("failure",t):g("success",t)}),p||(i(h,function(e){0===y.length?a(e.success)&&e.success.call(e.scope):a(e.failure)&&e.failure.call(e.scope,y)}),h.length=0)})()}}var r=e.DOM,i=t.each,o=t.grep,a=function(e){return"function"==typeof e};return n.ScriptLoader=new n,n}),r("tinymce/AddOnManager",["tinymce/dom/ScriptLoader","tinymce/util/Tools"],function(e,n){function r(){var e=this;e.items=[],e.urls={},e.lookup={}}var i=n.each;return r.prototype={get:function(e){return this.lookup[e]?this.lookup[e].instance:t},dependencies:function(e){var t;return this.lookup[e]&&(t=this.lookup[e].dependencies),t||[]},requireLangPack:function(t,n){var i=r.language;if(i&&!1!==r.languageLoad){if(n)if(-1!=(n=","+n+",").indexOf(","+i.substr(0,2)+","))i=i.substr(0,2);else if(-1==n.indexOf(","+i+","))return;e.ScriptLoader.add(this.urls[t]+"/langs/"+i+".js")}},add:function(e,t,n){return this.items.push(t),this.lookup[e]={instance:t,dependencies:n},t},remove:function(e){delete this.urls[e],delete this.lookup[e]},createUrl:function(e,t){return"object"==typeof t?t:{prefix:e.prefix,resource:t,suffix:e.suffix}},addComponents:function(t,n){var r=this.urls[t];i(n,function(t){e.ScriptLoader.add(r+"/"+t)})},load:function(n,o,a,s,l){function c(){var r=u.dependencies(n);i(r,function(e){var n=u.createUrl(o,e);u.load(n.resource,n,t,t)}),a&&(s?a.call(s):a.call(e))}var u=this,d=o;u.urls[n]||("object"==typeof o&&(d=o.prefix+o.resource+o.suffix),0!==d.indexOf("/")&&-1==d.indexOf("://")&&(d=r.baseURL+"/"+d),u.urls[n]=d.substring(0,d.lastIndexOf("/")),u.lookup[n]?c():e.ScriptLoader.add(d,c,s,l))}},r.PluginManager=new r,r.ThemeManager=new r,r}),r("tinymce/dom/NodeType",[],function(){function e(e){return function(t){return!!t&&t.nodeType==e}}function t(e){return e=e.toLowerCase().split(" "),function(t){var n,r;if(t&&t.nodeType)for(r=t.nodeName.toLowerCase(),n=0;n<e.length;n++)if(r===e[n])return!0;return!1}}function n(e,t){return t=t.toLowerCase().split(" "),function(n){var r;if(s(n))for(r=0;r<t.length;r++)if(getComputedStyle(n,null).getPropertyValue(e)===t[r])return!0;return!1}}function r(e,t){return function(n){return s(n)&&n[e]===t}}function i(e,t){return function(n){return s(n)&&n.getAttribute(e)===t}}function o(e){return s(e)&&e.hasAttribute("data-mce-bogus")}function a(e){return function(t){if(s(t)){if(t.contentEditable===e)return!0;if(t.getAttribute("data-mce-contenteditable")===e)return!0}return!1}}var s=e(1);return{isText:e(3),isElement:s,isComment:e(8),isBr:t("br"),isContentEditableTrue:a("true"),isContentEditableFalse:a("false"),matchNodeNames:t,hasPropValue:r,hasAttributeValue:i,matchStyleValues:n,isBogus:o}}),r("tinymce/text/Zwsp",[],function(){function e(e){return e==n}function t(e){return e.replace(new RegExp(n,"g"),"")}var n="\ufeff";return{isZwsp:e,ZWSP:n,trim:t}}),r("tinymce/caret/CaretContainer",["tinymce/dom/NodeType","tinymce/text/Zwsp"],function(e,t){function n(e){return y(e)&&(e=e.parentNode),v(e)&&e.hasAttribute("data-mce-caret")}function r(e){return y(e)&&t.isZwsp(e.data)}function i(e){return n(e)||r(e)}function o(e){var t=e.parentNode;t&&t.removeChild(e)}function a(e){try{return e.nodeValue}catch(t){return""}}function s(e,t){0===t.length?o(e):e.nodeValue=t}function l(e,n){var r,o,a;if(o=e.ownerDocument.createTextNode(t.ZWSP),a=e.parentNode,n){if(r=e.previousSibling,y(r)){if(i(r))return r;if(h(r))return r.splitText(r.data.length-1)}a.insertBefore(o,e)}else{if(r=e.nextSibling,y(r)){if(i(r))return r;if(m(r))return r.splitText(1),r}e.nextSibling?a.insertBefore(o,e.nextSibling):a.appendChild(o)}return o}function c(){var e=document.createElement("br");return e.setAttribute("data-mce-bogus","1"),e}function u(e,t,n){var r,i;return(r=t.ownerDocument.createElement(e)).setAttribute("data-mce-caret",n?"before":"after"),r.setAttribute("data-mce-bogus","all"),r.appendChild(c()),i=t.parentNode,n?i.insertBefore(r,t):t.nextSibling?i.insertBefore(r,t.nextSibling):i.appendChild(r),r}function d(t){return t.firstChild!==t.lastChild||!e.isBr(t.firstChild)}function f(e){(v(e)&&i(e)&&(d(e)?e.removeAttribute("data-mce-caret"):o(e)),y(e))&&s(e,t.trim(a(e)))}function m(e){return y(e)&&e.data[0]==t.ZWSP}function h(e){return y(e)&&e.data[e.data.length-1]==t.ZWSP}function p(t){var n=t.getElementsByTagName("br"),r=n[n.length-1];e.isBogus(r)&&r.parentNode.removeChild(r)}function g(e){return e&&e.hasAttribute("data-mce-caret")?(p(e),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("_moz_abspos"),e):null}var v=e.isElement,y=e.isText;return{isCaretContainer:i,isCaretContainerBlock:n,isCaretContainerInline:r,showCaretContainerBlock:g,insertInline:l,insertBlock:u,hasContent:d,remove:f,startsWithCaretContainer:m,endsWithCaretContainer:h}}),r("tinymce/dom/RangeUtils",["tinymce/util/Tools","tinymce/dom/TreeWalker","tinymce/dom/NodeType","tinymce/dom/Range","tinymce/caret/CaretContainer"],function(e,t,n,r,i){function o(e){return p(e)||g(e)}function a(e,t){var n=e.childNodes;return--t>n.length-1?t=n.length-1:t<0&&(t=0),n[t]||e}function s(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}function l(e,t,n){return null!==s(e,t,n)}function c(e){return"_mce_caret"===e.id}function u(e,t){return v(e)&&!1===l(e,t,c)}function d(e){this.walk=function(t,n){function r(e){var t;return 3===(t=e[0]).nodeType&&t===g&&v>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===b&&e.length>0&&t===y&&3===t.nodeType&&e.splice(e.length-1,1),e}function i(e,t,n){for(var r=[];e&&e!=n;e=e[t])r.push(e);return r}function o(e,t){do{if(e.parentNode==t)return e;e=e.parentNode}while(e)}function s(e,t,o){var a=o?"nextSibling":"previousSibling";for(f=(d=e).parentNode;d&&d!=t;d=f)f=d.parentNode,(m=i(d==e?d:d[a],a)).length&&(o||m.reverse(),n(r(m)))}var l,c,u,d,f,m,p,g=t.startContainer,v=t.startOffset,y=t.endContainer,b=t.endOffset;if((p=e.select("td[data-mce-selected],th[data-mce-selected]")).length>0)h(p,function(e){n([e])});else{if(1==g.nodeType&&g.hasChildNodes()&&(g=g.childNodes[v]),1==y.nodeType&&y.hasChildNodes()&&(y=a(y,b)),g==y)return n(r([g]));for(l=e.findCommonAncestor(g,y),d=g;d;d=d.parentNode){if(d===y)return s(g,l,!0);if(d===l)break}for(d=y;d;d=d.parentNode){if(d===g)return s(y,l);if(d===l)break}c=o(g,l)||g,u=o(y,l)||y,s(g,c,!0),(m=i(c==g?c:c.nextSibling,"nextSibling",u==y?u.nextSibling:u)).length&&n(r(m)),s(y,u)}},this.split=function(e){function t(e,t){return e.splitText(t)}var n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset;return n==i&&3==n.nodeType?r>0&&r<n.nodeValue.length&&(n=(i=t(n,r)).previousSibling,o>r?(n=i=t(i,o-=r).previousSibling,o=i.nodeValue.length,r=0):o=0):(3==n.nodeType&&r>0&&r<n.nodeValue.length&&(n=t(n,r),r=0),3==i.nodeType&&o>0&&o<i.nodeValue.length&&(o=(i=t(i,o).previousSibling).nodeValue.length)),{startContainer:n,startOffset:r,endContainer:i,endOffset:o}},this.normalize=function(n){function r(r){function a(e){return e&&/^(TD|TH|CAPTION)$/.test(e.nodeName)}function s(n,r){for(var i=new t(n,e.getParent(n.parentNode,e.isBlock)||x);n=i[r?"prev":"next"]();)if("BR"===n.nodeName)return!0}function l(e){for(;e&&e!=x;){if(g(e))return!0;e=e.parentNode}return!1}function c(e,t){return e.previousSibling&&e.previousSibling.nodeName==t}function d(n,r){var a,s,l;if(r=r||f,l=e.getParent(r.parentNode,e.isBlock)||x,n&&"BR"==r.nodeName&&C&&e.isEmpty(l))return f=r.parentNode,m=e.nodeIndex(r),void(i=!0);for(a=new t(r,l);p=a[n?"prev":"next"]();){if("false"===e.getContentEditableParent(p)||u(p,e.getRoot()))return;if(3===p.nodeType&&p.nodeValue.length>0)return f=p,m=n?p.nodeValue.length:0,void(i=!0);if(e.isBlock(p)||y[p.nodeName.toLowerCase()])return;s=p}o&&s&&(f=s,i=!0,m=0)}var f,m,h,p,y,b,C,x=e.getRoot();if(f=n[(r?"start":"end")+"Container"],m=n[(r?"start":"end")+"Offset"],C=1==f.nodeType&&m===f.childNodes.length,y=e.schema.getNonEmptyElements(),b=r,!v(f)){if(1==f.nodeType&&m>f.childNodes.length-1&&(b=!1),9===f.nodeType&&(f=e.getRoot(),m=0),f===x){if(b&&(p=f.childNodes[m>0?m-1:0])){if(v(p))return;if(y[p.nodeName]||"TABLE"==p.nodeName)return}if(f.hasChildNodes()){if(m=Math.min(!b&&m>0?m-1:m,f.childNodes.length-1),f=f.childNodes[m],m=0,!o&&f===x.lastChild&&"TABLE"===f.nodeName)return;if(l(f)||v(f))return;if(f.hasChildNodes()&&!/TABLE/.test(f.nodeName)){p=f,h=new t(f,x);do{if(g(p)||v(p)){i=!1;break}if(3===p.nodeType&&p.nodeValue.length>0){m=b?0:p.nodeValue.length,f=p,i=!0;break}if(y[p.nodeName.toLowerCase()]&&!a(p)){m=e.nodeIndex(p),f=p.parentNode,"IMG"!=p.nodeName||b||m++,i=!0;break}}while(p=b?h.next():h.prev())}}}o&&(3===f.nodeType&&0===m&&d(!0),1===f.nodeType&&((p=f.childNodes[m])||(p=f.childNodes[m-1]),!p||"BR"!==p.nodeName||c(p,"A")||s(p)||s(p,!0)||d(!0,p))),b&&!o&&3===f.nodeType&&m===f.nodeValue.length&&d(!1),i&&n["set"+(r?"Start":"End")](f,m)}}var i,o;return o=n.collapsed,r(!0),o||r(),i&&o&&n.collapse(!0),i}}function f(t,n,r){var i,o,a;if(i=r.elementFromPoint(t,n),o=r.body.createTextRange(),i&&"HTML"!=i.tagName||(i=r.body),o.moveToElementText(i),(a=(a=e.toArray(o.getClientRects())).sort(function(e,t){return(e=Math.abs(Math.max(e.top-n,e.bottom-n)))-(t=Math.abs(Math.max(t.top-n,t.bottom-n)))})).length>0){n=(a[0].bottom+a[0].top)/2;try{return o.moveToPoint(t,n),o.collapse(!0),o}catch(s){}}return null}function m(e,t){var n=e&&e.parentElement?e.parentElement():null;return g(s(n,t,o))?null:e}var h=e.each,p=n.isContentEditableTrue,g=n.isContentEditableFalse,v=i.isCaretContainer;return d.compareRanges=function(e,t){if(e&&t){if(!e.item&&!e.duplicate)return e.startContainer==t.startContainer&&e.startOffset==t.startOffset;if(e.item&&t.item&&e.item(0)===t.item(0))return!0;if(e.isEqual&&t.isEqual&&t.isEqual(e))return!0}return!1},d.getCaretRangeFromPoint=function(e,t,n){var r,i;if(n.caretPositionFromPoint)i=n.caretPositionFromPoint(e,t),(r=n.createRange()).setStart(i.offsetNode,i.offset),r.collapse(!0);else if(n.caretRangeFromPoint)r=n.caretRangeFromPoint(e,t);else if(n.body.createTextRange){r=n.body.createTextRange();try{r.moveToPoint(e,t),r.collapse(!0)}catch(o){r=f(e,t,n)}return m(r,n.body)}return r},d.getSelectedNode=function(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset==n+1?t.childNodes[n]:null},d.getNode=function(e,t){return 1==e.nodeType&&e.hasChildNodes()&&(t>=e.childNodes.length&&(t=e.childNodes.length-1),e=e.childNodes[t]),e},d}),r("tinymce/NodeChange",["tinymce/dom/RangeUtils","tinymce/Env","tinymce/util/Delay"],function(e,t,n){return function(r){function i(e){var t,n;if((n=r.$(e).parentsUntil(r.getBody()).add(e)).length===a.length){for(t=n.length;t>=0&&n[t]===a[t];t--);if(-1===t)return a=n,!0}return a=n,!1}var o,a=[];"onselectionchange"in r.getDoc()||r.on("NodeChange Click MouseUp KeyUp Focus",function(t){var n,i;i={startContainer:(n=r.selection.getRng()).startContainer,startOffset:n.startOffset,endContainer:n.endContainer,endOffset:n.endOffset},"nodechange"!=t.type&&e.compareRanges(i,o)||r.fire("SelectionChange"),o=i}),r.on("contextmenu",function(){r.fire("SelectionChange")}),r.on("SelectionChange",function(){var e=r.selection.getStart(!0);!t.range&&r.selection.isCollapsed()||!i(e)&&r.dom.isChildOf(e,r.getBody())&&r.nodeChanged({selectionChange:!0})}),r.on("MouseUp",function(e){e.isDefaultPrevented()||("IMG"==r.selection.getNode().nodeName?n.setEditorTimeout(r,function(){r.nodeChanged()}):r.nodeChanged())}),this.nodeChanged=function(e){var t,n,i,o=r.selection;r.initialized&&o&&!r.settings.disable_nodechange&&!r.readonly&&(i=r.getBody(),(t=o.getStart()||i).ownerDocument==r.getDoc()&&r.dom.isChildOf(t,i)||(t=i),"IMG"==t.nodeName&&o.isCollapsed()&&(t=t.parentNode),n=[],r.dom.getParent(t,function(e){if(e===i)return!0;n.push(e)}),(e=e||{}).element=t,e.parents=n,r.fire("NodeChange",e))}}}),r("tinymce/html/Node",[],function(){function e(e,t,n){var r,i,o=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[o])return e[o];if(e!==t){if(r=e[a])return r;for(i=e.parent;i&&i!==t;i=i.parent)if(r=i[a])return r}}function t(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}var n=/^[ \t\r\n]*$/,r={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};return t.prototype={replace:function(e){var t=this;return e.parent&&e.remove(),t.insert(e,t),t.remove(),t},attr:function(e,t){var n,r,i,o=this;if("string"!=typeof e){for(r in e)o.attr(r,e[r]);return o}if(n=o.attributes){if(t!==i){if(null===t){if(e in n.map)for(delete n.map[e],r=n.length;r--;)if(n[r].name===e)return n=n.splice(r,1),o;return o}if(e in n.map){for(r=n.length;r--;)if(n[r].name===e){n[r].value=t;break}}else n.push({name:e,value:t});return n.map[e]=t,o}return n.map[e]}},clone:function(){var e,n,r,i,o,a=this,s=new t(a.name,a.type);if(r=a.attributes){for((o=[]).map={},e=0,n=r.length;e<n;e++)"id"!==(i=r[e]).name&&(o[o.length]={name:i.name,value:i.value},o.map[i.name]=i.value);s.attributes=o}return s.value=a.value,s.shortEnded=a.shortEnded,s},wrap:function(e){var t=this;return t.parent.insert(e,t),e.append(t),t},unwrap:function(){var e,t,n=this;for(e=n.firstChild;e;)t=e.next,n.insert(e,n,!0),e=t;n.remove()},remove:function(){var e=this,t=e.parent,n=e.next,r=e.prev;return t&&(t.firstChild===e?(t.firstChild=n,n&&(n.prev=null)):r.next=n,t.lastChild===e?(t.lastChild=r,r&&(r.next=null)):n.prev=r,e.parent=e.next=e.prev=null),e},append:function(e){var t,n=this;return e.parent&&e.remove(),(t=n.lastChild)?(t.next=e,e.prev=t,n.lastChild=e):n.lastChild=n.firstChild=e,e.parent=n,e},insert:function(e,t,n){var r;return e.parent&&e.remove(),r=t.parent||this,n?(t===r.firstChild?r.firstChild=e:t.prev.next=e,e.prev=t.prev,e.next=t,t.prev=e):(t===r.lastChild?r.lastChild=e:t.next.prev=e,e.next=t.next,e.prev=t,t.next=e),e.parent=r,e},getAll:function(t){var n,r=this,i=[];for(n=r.firstChild;n;n=e(n,r))n.name===t&&i.push(n);return i},empty:function(){var t,n,r,i=this;if(i.firstChild){for(t=[],r=i.firstChild;r;r=e(r,i))t.push(r);for(n=t.length;n--;)(r=t[n]).parent=r.firstChild=r.lastChild=r.next=r.prev=null}return i.firstChild=i.lastChild=null,i},isEmpty:function(t,r){var i,o,a=this,s=a.firstChild;if(r=r||{},s)do{if(1===s.type){if(s.attributes.map["data-mce-bogus"])continue;if(t[s.name])return!1;for(i=s.attributes.length;i--;)if("name"===(o=s.attributes[i].name)||0===o.indexOf("data-mce-bookmark"))return!1}if(8===s.type)return!1;if(3===s.type&&!n.test(s.value))return!1;if(3===s.type&&s.parent&&r[s.parent.name]&&n.test(s.value))return!1}while(s=e(s,a));return!0},walk:function(t){return e(this,null,t)}},t.create=function(e,n){var i,o;if(i=new t(e,r[e]||1),n)for(o in n)i.attr(o,n[o]);return i},t}),r("tinymce/html/Schema",["tinymce/util/Tools"],function(e){function t(t,n){return(t=e.trim(t))?t.split(n||" "):[]}function n(e){function n(e,n,r){function i(e,t){var n,r,i={};for(n=0,r=e.length;n<r;n++)i[e[n]]=t||{};return i}var s,l,c;for(n=n||"","string"==typeof(r=r||[])&&(r=t(r)),s=(e=t(e)).length;s--;)c={attributes:i(l=t([a,n].join(" "))),attributesOrder:l,children:i(r,o)},m[e[s]]=c}function r(e,n){var r,i,o,a;for(r=(e=t(e)).length,n=t(n);r--;)for(i=m[e[r]],o=0,a=n.length;o<a;o++)i.attributes[n[o]]={},i.attributesOrder.push(n[o])}var a,l,c,u,d,f,m={};return i[e]?i[e]:(a="id accesskey class dir lang style tabindex title",l="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",c="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment","html4"!=e&&(a+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",l+=" article aside details dialog figure header footer hgroup section nav",c+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),"html5-strict"!=e&&(a+=" xml:lang",c=[c,f="acronym applet basefont big font strike tt"].join(" "),s(t(f),function(e){n(e,"",c)}),l=[l,d="center dir isindex noframes"].join(" "),u=[l,c].join(" "),s(t(d),function(e){n(e,"",u)})),u=u||[l,c].join(" "),n("html","manifest","head body"),n("head","","base command link meta noscript script style title"),n("title hr noscript br"),n("base","href target"),n("link","href rel media hreflang type sizes hreflang"),n("meta","name http-equiv content charset"),n("style","media type scoped"),n("script","src async defer type charset"),n("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",u),n("address dt dd div caption","",u),n("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",c),n("blockquote","cite",u),n("ol","reversed start type","li"),n("ul","","li"),n("li","value",u),n("dl","","dt dd"),n("a","href target rel media hreflang type",c),n("q","cite",c),n("ins del","cite datetime",u),n("img","src sizes srcset alt usemap ismap width height"),n("iframe","src name width height",u),n("embed","src type width height"),n("object","data type typemustmatch name usemap form width height",[u,"param"].join(" ")),n("param","name value"),n("map","name",[u,"area"].join(" ")),n("area","alt coords shape href target rel media hreflang type"),n("table","border","caption colgroup thead tfoot tbody tr"+("html4"==e?" col":"")),n("colgroup","span","col"),n("col","span"),n("tbody thead tfoot","","tr"),n("tr","","td th"),n("td","colspan rowspan headers",u),n("th","colspan rowspan headers scope abbr",u),n("form","accept-charset action autocomplete enctype method name novalidate target",u),n("fieldset","disabled form name",[u,"legend"].join(" ")),n("label","form for",c),n("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),n("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"==e?u:c),n("select","disabled form multiple name required size","option optgroup"),n("optgroup","disabled label","option"),n("option","disabled label selected value"),n("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),n("menu","type label",[u,"li"].join(" ")),n("noscript","",u),"html4"!=e&&(n("wbr"),n("ruby","",[c,"rt rp"].join(" ")),n("figcaption","",u),n("mark rt rp summary bdi","",c),n("canvas","width height",u),n("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[u,"track source"].join(" ")),n("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[u,"track source"].join(" ")),n("picture","","img source"),n("source","src srcset type media sizes"),n("track","kind src srclang label default"),n("datalist","",[c,"option"].join(" ")),n("article section nav aside header footer","",u),n("hgroup","","h1 h2 h3 h4 h5 h6"),n("figure","",[u,"figcaption"].join(" ")),n("time","datetime",c),n("dialog","open",u),n("command","type label icon disabled checked radiogroup command"),n("output","for form name",c),n("progress","value max",c),n("meter","value min max low high optimum",c),n("details","open",[u,"summary"].join(" ")),n("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!=e&&(r("script","language xml:space"),r("style","xml:space"),r("object","declare classid code codebase codetype archive standby align border hspace vspace"),r("embed","align name hspace vspace"),r("param","valuetype type"),r("a","charset name rev shape coords"),r("br","clear"),r("applet","codebase archive code object alt name width height align hspace vspace"),r("img","name longdesc align border hspace vspace"),r("iframe","longdesc frameborder marginwidth marginheight scrolling align"),r("font basefont","size color face"),r("input","usemap align"),r("select","onchange"),r("textarea"),r("h1 h2 h3 h4 h5 h6 div p legend caption","align"),r("ul","type compact"),r("li","type"),r("ol dl menu dir","compact"),r("pre","width xml:space"),r("hr","align noshade size width"),r("isindex","prompt"),r("table","summary width frame rules cellspacing cellpadding align bgcolor"),r("col","width align char charoff valign"),r("colgroup","width align char charoff valign"),r("thead","align char charoff valign"),r("tr","align char charoff valign bgcolor"),r("th","axis align char charoff valign nowrap bgcolor width height"),r("form","accept"),r("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),r("tfoot","align char charoff valign"),r("tbody","align char charoff valign"),r("area","nohref"),r("body","background bgcolor text link vlink alink")),"html4"!=e&&(r("input button select textarea","autofocus"),r("input textarea","placeholder"),r("a","download"),r("link script img","crossorigin"),r("iframe","sandbox seamless allowfullscreen")),s(t("a form meter progress dfn"),function(e){m[e]&&delete m[e].children[e]}),delete m.caption.children.table,delete m.script,i[e]=m,m)}function r(e,t){var n;return e&&(n={},"string"==typeof e&&(e={"*":e}),s(e,function(e,r){n[r]=n[r.toUpperCase()]="map"==t?a(e,/[, ]/):c(e,/[, ]/)})),n}var i={},o={},a=e.makeMap,s=e.each,l=e.extend,c=e.explode,u=e.inArray;return function(e){function o(t,n,r){var o=e[t];return o?o=a(o,/[, ]/,a(o.toUpperCase(),/[, ]/)):(o=i[t])||(o=a(n," ",a(n.toUpperCase()," ")),o=l(o,r),i[t]=o),o}function d(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")}function f(e){var n,r,i,o,s,l,c,f,m,h,p,g,v,y,b,C,x,w,E,N=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,S=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,_=/[*?+]/;if(e)for(e=t(e,","),B["@"]&&(C=B["@"].attributes,x=B["@"].attributesOrder),n=0,r=e.length;n<r;n++)if(s=N.exec(e[n])){if(y=s[1],m=s[2],b=s[3],f=s[5],l={attributes:g={},attributesOrder:v=[]},"#"===y&&(l.paddEmpty=!0),"-"===y&&(l.removeEmpty=!0),"!"===s[4]&&(l.removeEmptyAttrs=!0),C){for(w in C)g[w]=C[w];v.push.apply(v,x)}if(f)for(i=0,o=(f=t(f,"|")).length;i<o;i++)if(s=S.exec(f[i])){if(c={},p=s[1],h=s[2].replace(/::/g,":"),y=s[3],E=s[4],"!"===p&&(l.attributesRequired=l.attributesRequired||[],l.attributesRequired.push(h),c.required=!0),"-"===p){delete g[h],v.splice(u(v,h),1);continue}y&&("="===y&&(l.attributesDefault=l.attributesDefault||[],l.attributesDefault.push({name:h,value:E}),c.defaultValue=E),":"===y&&(l.attributesForced=l.attributesForced||[],l.attributesForced.push({name:h,value:E}),c.forcedValue=E),"<"===y&&(c.validValues=a(E,"?"))),_.test(h)?(l.attributePatterns=l.attributePatterns||[],c.pattern=d(h),l.attributePatterns.push(c)):(g[h]||v.push(h),g[h]=c)}C||"@"!=m||(C=g,x=v),b&&(l.outputName=m,B[b]=l),_.test(m)?(l.pattern=d(m),M.push(l)):B[m]=l}}function m(e){B={},M=[],f(e),s(b,function(e,t){D[t]=e.children})}function h(e){var n=/^(~)?(.+)$/;e&&(i.text_block_elements=i.block_elements=null,s(t(e,","),function(e){var t=n.exec(e),r="~"===t[1],i=r?"span":"div",o=t[2];if(D[o]=D[i],L[o]=i,r||(S[o.toUpperCase()]={},S[o]={}),!B[o]){var a=B[i];delete(a=l({},a)).removeEmptyAttrs,delete a.removeEmpty,B[o]=a}s(D,function(e,t){e[i]&&(D[t]=e=l({},D[t]),e[o]=e[i])})}))}function p(n){var r=/^([+\-]?)(\w+)\[([^\]]+)\]$/;i[e.schema]=null,n&&s(t(n,","),function(e){var n,i,o=r.exec(e);o&&(i=o[1],n=i?D[o[2]]:D[o[2]]={"#comment":{}},n=D[o[2]],s(t(o[3],"|"),function(e){"-"===i?delete n[e]:n[e]={}}))})}function g(e){var t,n=B[e];if(n)return n;for(t=M.length;t--;)if((n=M[t]).pattern.test(e))return n}var v,y,b,C,x,w,E,N,S,_,k,T,R,A=this,B={},D={},M=[],L={},P={};b=n((e=e||{}).schema),!1===e.verify_html&&(e.valid_elements="*[*]"),v=r(e.valid_styles),y=r(e.invalid_styles,"map"),N=r(e.valid_classes,"map"),C=o("whitespace_elements","pre script noscript style textarea video audio iframe object code"),x=o("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),w=o("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),E=o("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),_=o("non_empty_elements","td th iframe video audio object script pre code",w),k=o("move_caret_before_on_enter_elements","table",_),T=o("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"),S=o("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption",T),R=o("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),s((e.special||"script noscript style textarea").split(" "),function(e){P[e]=new RegExp("</"+e+"[^>]*>","gi")}),e.valid_elements?m(e.valid_elements):(s(b,function(e,t){B[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},D[t]=e.children}),"html5"!=e.schema&&s(t("strong/b em/i"),function(e){e=t(e,"/"),B[e[1]].outputName=e[0]}),s(t("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(e){B[e]&&(B[e].removeEmpty=!0)}),s(t("p h1 h2 h3 h4 h5 h6 th td pre div address caption"),function(e){B[e].paddEmpty=!0}),s(t("span"),function(e){B[e].removeEmptyAttrs=!0})),h(e.custom_elements),p(e.valid_children),f(e.extended_valid_elements),p("+ol[ul|ol],+ul[ul|ol]"),s({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},function(e,n){B[n]&&(B[n].parentsRequired=t(e))}),e.invalid_elements&&s(c(e.invalid_elements),function(e){B[e]&&delete B[e]}),g("span")||f("span[!data-mce-type|*]"),A.children=D,A.getValidStyles=function(){return v},A.getInvalidStyles=function(){return y},A.getValidClasses=function(){return N},A.getBoolAttrs=function(){return E},A.getBlockElements=function(){return S},A.getTextBlockElements=function(){return T},A.getTextInlineElements=function(){return R},A.getShortEndedElements=function(){return w},A.getSelfClosingElements=function(){return x},A.getNonEmptyElements=function(){return _},A.getMoveCaretBeforeOnEnterElements=function(){return k},
A.getWhiteSpaceElements=function(){return C},A.getSpecialElements=function(){return P},A.isValidChild=function(e,t){var n=D[e];return!(!n||!n[t])},A.isValid=function(e,t){var n,r,i=g(e);if(i){if(!t)return!0;if(i.attributes[t])return!0;if(n=i.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(e))return!0}return!1},A.getElementRule=g,A.getCustomElements=function(){return L},A.addValidElements=f,A.setValidElements=m,A.addCustomElements=h,A.addValidChildren=p,A.elements=B}}),r("tinymce/html/SaxParser",["tinymce/html/Schema","tinymce/html/Entities","tinymce/util/Tools"],function(e,t,n){function r(e,t,n){var r,i,o,a,s=1;for(a=e.getShortEndedElements(),(o=/<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g).lastIndex=r=n;i=o.exec(t);){if(r=o.lastIndex,"/"===i[1])s--;else if(!i[1]){if(i[2]in a)continue;s++}if(0===s)break}return r}function i(i,a){function s(){}var l=this;i=i||{},l.schema=a=a||new e,!1!==i.fix_self_closing&&(i.fix_self_closing=!0),o("comment cdata text start end pi doctype".split(" "),function(e){e&&(l[e]=i[e]||s)}),l.parse=function(e){function o(e){var t,n;for(t=I.length;t--&&I[t].name!==e;);if(t>=0){for(n=I.length-1;n>=t;n--)(e=I[n]).valid&&O.end(e.name);I.length=t}}function s(e,t,n,r,o){var a,s,l=/[\s\u0000-\u001F]+/g;if(n=(t=t.toLowerCase())in y?t:U(n||r||o||""),C&&!p&&0!==t.indexOf("data-")){if(!(a=S[t])&&_){for(s=_.length;s--&&!(a=_[s]).pattern.test(t););-1===s&&(a=null)}if(!a)return;if(a.validValues&&!(n in a.validValues))return}if(z[t]&&!i.allow_script_urls){var c=n.replace(l,"");try{c=decodeURIComponent(c)}catch(u){c=unescape(c)}if(W.test(c))return;if(!i.allow_html_data_urls&&V.test(c)&&!/^data:image\//i.test(c))return}d.map[t]=n,d.push({name:t,value:n})}var l,c,u,d,f,m,h,p,g,v,y,b,C,x,w,E,N,S,_,k,T,R,A,B,D,M,L,P,O=this,H=0,I=[],F=0,U=t.decode,z=n.makeMap("src,href,data,background,formaction,poster"),W=/((java|vb)script|mhtml):/i,V=/^data:/i;for(B=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,v=a.getShortEndedElements(),A=i.self_closing_elements||a.getSelfClosingElements(),y=a.getBoolAttrs(),C=i.validate,g=i.remove_internals,P=i.fix_self_closing,M=a.getSpecialElements();l=B.exec(e);){if(H<l.index&&O.text(U(e.substr(H,l.index-H))),c=l[6])":"===(c=c.toLowerCase()).charAt(0)&&(c=c.substr(1)),o(c);else if(c=l[7]){if(":"===(c=c.toLowerCase()).charAt(0)&&(c=c.substr(1)),b=c in v,P&&A[c]&&I.length>0&&I[I.length-1].name===c&&o(c),!C||(x=a.getElementRule(c))){if(w=!0,C&&(S=x.attributes,_=x.attributePatterns),(N=l[8])?((p=-1!==N.indexOf("data-mce-type"))&&g&&(w=!1),(d=[]).map={},N.replace(D,s)):(d=[]).map={},C&&!p){if(k=x.attributesRequired,T=x.attributesDefault,R=x.attributesForced,x.removeEmptyAttrs&&!d.length&&(w=!1),R)for(f=R.length;f--;)h=(E=R[f]).name,"{$uid}"===(L=E.value)&&(L="mce_"+F++),d.map[h]=L,d.push({name:h,value:L});if(T)for(f=T.length;f--;)(h=(E=T[f]).name)in d.map||("{$uid}"===(L=E.value)&&(L="mce_"+F++),d.map[h]=L,d.push({name:h,value:L}));if(k){for(f=k.length;f--&&!(k[f]in d.map););-1===f&&(w=!1)}if(E=d.map["data-mce-bogus"]){if("all"===E){H=r(a,e,B.lastIndex),B.lastIndex=H;continue}w=!1}}w&&O.start(c,d,b)}else w=!1;if(u=M[c]){u.lastIndex=H=l.index+l[0].length,(l=u.exec(e))?(w&&(m=e.substr(H,l.index-H)),H=l.index+l[0].length):(m=e.substr(H),H=e.length),w&&(m.length>0&&O.text(m,!0),O.end(c)),B.lastIndex=H;continue}b||(N&&N.indexOf("/")==N.length-1?w&&O.end(c):I.push({name:c,valid:w}))}else(c=l[1])?(">"===c.charAt(0)&&(c=" "+c),i.allow_conditional_comments||"[if"!==c.substr(0,3).toLowerCase()||(c=" "+c),O.comment(c)):(c=l[2])?O.cdata(c):(c=l[3])?O.doctype(c):(c=l[4])&&O.pi(c,l[5]);H=l.index+l[0].length}for(H<e.length&&O.text(U(e.substr(H))),f=I.length-1;f>=0;f--)(c=I[f]).valid&&O.end(c.name)}}var o=n.each;return i.findEndTag=r,i}),r("tinymce/html/DomParser",["tinymce/html/Node","tinymce/html/Schema","tinymce/html/SaxParser","tinymce/util/Tools"],function(e,t,n,r){var i=r.makeMap,o=r.each,a=r.explode,s=r.extend,l=function(t,n){t.padd_empty_with_br?n.empty().append(new e("br","1")).shortEnded=!0:n.empty().append(new e("#text","3")).value="\xa0"},c=function(e,t){return e&&e.firstChild===e.lastChild&&e.firstChild.name===t};return function(u,d){function f(t){var n,r,o,a,s,l,u,f,h,p,g,v,y,b,C,x;for(v=i("tr,td,th,tbody,thead,tfoot,table"),p=d.getNonEmptyElements(),g=d.getWhiteSpaceElements(),y=d.getTextBlockElements(),b=d.getSpecialElements(),n=0;n<t.length;n++)if((r=t[n]).parent&&!r.fixed)if(y[r.name]&&"li"==r.parent.name){for(C=r.next;C&&y[C.name];)C.name="li",C.fixed=!0,r.parent.insert(C,r.parent),C=C.next;r.unwrap(r)}else{for(a=[r],o=r.parent;o&&!d.isValidChild(o.name,r.name)&&!v[o.name];o=o.parent)a.push(o);if(o&&a.length>1){for(a.reverse(),s=l=m.filterNode(a[0].clone()),h=0;h<a.length-1;h++){for(d.isValidChild(l.name,a[h].name)?(u=m.filterNode(a[h].clone()),l.append(u)):u=l,f=a[h].firstChild;f&&f!=a[h+1];)x=f.next,u.append(f),f=x;l=u}s.isEmpty(p,g)?o.insert(r,a[0],!0):(o.insert(s,a[0],!0),o.insert(r,s)),((o=a[0]).isEmpty(p,g)||c(o,"br"))&&o.empty().remove()}else if(r.parent){if("li"===r.name){if((C=r.prev)&&("ul"===C.name||"ul"===C.name)){C.append(r);continue}if((C=r.next)&&("ul"===C.name||"ul"===C.name)){C.insert(r,C.firstChild,!0);continue}r.wrap(m.filterNode(new e("ul",1)));continue}d.isValidChild(r.parent.name,"div")&&d.isValidChild("div",r.name)?r.wrap(m.filterNode(new e("div",1))):b[r.name]?r.empty().remove():r.unwrap()}}}var m=this,h={},p=[],g={},v={};(u=u||{}).validate=!("validate"in u)||u.validate,u.root_name=u.root_name||"body",m.schema=d=d||new t,m.filterNode=function(e){var t,n,r;n in h&&((r=g[n])?r.push(e):g[n]=[e]),t=p.length;for(;t--;)(n=p[t].name)in e.attributes.map&&((r=v[n])?r.push(e):v[n]=[e]);return e},m.addNodeFilter=function(e,t){o(a(e),function(e){var n=h[e];n||(h[e]=n=[]),n.push(t)})},m.addAttributeFilter=function(e,t){o(a(e),function(e){var n;for(n=0;n<p.length;n++)if(p[n].name===e)return void p[n].callbacks.push(t);p.push({name:e,callbacks:[t]})})},m.parse=function(t,r){function o(){function e(e){e&&((r=e.firstChild)&&3==r.type&&(r.value=r.value.replace(A,"")),(r=e.lastChild)&&3==r.type&&(r.value=r.value.replace(D,"")))}var t,n,r=b.firstChild;if(d.isValidChild(b.name,I.toLowerCase())){for(;r;)t=r.next,3==r.type||1==r.type&&"p"!==r.name&&!R[r.name]&&!r.attr("data-mce-type")?n?n.append(r):((n=a(I,1)).attr(u.forced_root_block_attrs),b.insert(n,r),n.append(r)):(e(n),n=null),r=t;e(n)}}function a(t,n){var r,i=new e(t,n);return t in h&&((r=g[t])?r.push(i):g[t]=[i]),i}function c(e){var t,n,r,i,o=d.getBlockElements();for(t=e.prev;t&&3===t.type;){if((r=t.value.replace(D,"")).length>0)return void(t.value=r);if(n=t.next){if(3==n.type&&n.value.length){t=t.prev;continue}if(!o[n.name]&&"script"!=n.name&&"style"!=n.name){t=t.prev;continue}}i=t.prev,t.remove(),t=i}}function m(e){var t,n={};for(t in e)"li"!==t&&"p"!=t&&(n[t]=e[t]);return n}var y,b,C,x,w,E,N,S,_,k,T,R,A,B,D,M,L,P,O,H,I,F=[];if(r=r||{},g={},v={},R=s(i("script,style,head,html,body,title,meta,param"),d.getBlockElements()),H=d.getNonEmptyElements(),O=d.children,T=u.validate,I="forced_root_block"in r?r.forced_root_block:u.forced_root_block,P=d.getWhiteSpaceElements(),A=/^[ \t\r\n]+/,D=/[ \t\r\n]+$/,M=/[ \t\r\n]+/g,L=/^[ \t\r\n]+$/,y=new n({validate:T,allow_script_urls:u.allow_script_urls,allow_conditional_comments:u.allow_conditional_comments,self_closing_elements:m(d.getSelfClosingElements()),cdata:function(e){C.append(a("#cdata",4)).value=e},text:function(e,t){var n;B||(e=e.replace(M," "),C.lastChild&&R[C.lastChild.name]&&(e=e.replace(A,""))),0!==e.length&&((n=a("#text",3)).raw=!!t,C.append(n).value=e)},comment:function(e){C.append(a("#comment",8)).value=e},pi:function(e,t){C.append(a(e,7)).value=t,c(C)},doctype:function(e){C.append(a("#doctype",10)).value=e,c(C)},start:function(e,t,n){var r,i,o,s,l;if(o=T?d.getElementRule(e):{}){for((r=a(o.outputName||e,1)).attributes=t,r.shortEnded=n,C.append(r),(l=O[C.name])&&O[r.name]&&!l[r.name]&&F.push(r),i=p.length;i--;)(s=p[i].name)in t.map&&((_=v[s])?_.push(r):v[s]=[r]);R[e]&&c(r),n||(C=r),!B&&P[e]&&(B=!0)}},end:function(e){var t,n,r,i,o;if(n=T?d.getElementRule(e):{}){if(R[e]&&!B){if((t=C.firstChild)&&3===t.type)if((r=t.value.replace(A,"")).length>0)t.value=r,t=t.next;else for(i=t.next,t.remove(),t=i;t&&3===t.type;)r=t.value,i=t.next,(0===r.length||L.test(r))&&(t.remove(),t=i),t=i;if((t=C.lastChild)&&3===t.type)if((r=t.value.replace(D,"")).length>0)t.value=r,t=t.prev;else for(i=t.prev,t.remove(),t=i;t&&3===t.type;)r=t.value,i=t.prev,(0===r.length||L.test(r))&&(t.remove(),t=i),t=i}if(B&&P[e]&&(B=!1),(n.removeEmpty||n.paddEmpty)&&C.isEmpty(H,P))if(n.paddEmpty)l(u,C);else if(!C.attributes.map.name&&!C.attributes.map.id)return o=C.parent,R[C.name]?C.empty().remove():C.unwrap(),void(C=o);C=C.parent}}},d),b=C=new e(r.context||u.root_name,11),y.parse(t),T&&F.length&&(r.context?r.invalid=!0:f(F)),I&&("body"==b.name||r.isRootContent)&&o(),!r.invalid){for(k in g){for(_=h[k],N=(x=g[k]).length;N--;)x[N].parent||x.splice(N,1);for(w=0,E=_.length;w<E;w++)_[w](x,k,r)}for(w=0,E=p.length;w<E;w++)if((_=p[w]).name in v){for(N=(x=v[_.name]).length;N--;)x[N].parent||x.splice(N,1);for(N=0,S=_.callbacks.length;N<S;N++)_.callbacks[N](x,_.name,r)}}return b},u.remove_trailing_brs&&m.addNodeFilter("br",function(t){var n,r,i,o,a,c,f,m,h=t.length,p=s({},d.getBlockElements()),g=d.getNonEmptyElements(),v=d.getNonEmptyElements();for(p.body=1,n=0;n<h;n++)if(i=(r=t[n]).parent,p[r.parent.name]&&r===i.lastChild){for(a=r.prev;a;){if("span"!==(c=a.name)||"bookmark"!==a.attr("data-mce-type")){if("br"!==c)break;if("br"===c){r=null;break}}a=a.prev}r&&(r.remove(),i.isEmpty(g,v)&&(f=d.getElementRule(i.name))&&(f.removeEmpty?i.remove():f.paddEmpty&&l(u,i)))}else{for(o=r;i&&i.firstChild===o&&i.lastChild===o&&(o=i,!p[i.name]);)i=i.parent;o===i&&!0!==u.padd_empty_with_br&&((m=new e("#text",3)).value="\xa0",r.replace(m))}}),u.allow_unsafe_link_target||m.addAttributeFilter("href",function(e){function t(e){return(e=n(e))?[e,l].join(" "):l}function n(e){var t=new RegExp("("+l.replace(" ","|")+")","g");return e&&(e=r.trim(e.replace(t,""))),e||null}function i(e,r){return r?t(e):n(e)}for(var o,a,s=e.length,l="noopener noreferrer";s--;)a=(o=e[s]).attr("rel"),"a"===o.name&&o.attr("rel",i(a,"_blank"==o.attr("target")))}),u.allow_html_in_named_anchor||m.addAttributeFilter("id,name",function(e){for(var t,n,r,i,o=e.length;o--;)if("a"===(i=e[o]).name&&i.firstChild&&!i.attr("href")){r=i.parent,t=i.lastChild;do{n=t.prev,r.insert(t,i),t=n}while(t)}}),u.fix_list_elements&&m.addNodeFilter("ul,ol",function(t){for(var n,r,i=t.length;i--;)if("ul"===(r=(n=t[i]).parent).name||"ol"===r.name)if(n.prev&&"li"===n.prev.name)n.prev.append(n);else{var o=new e("li",1);o.attr("style","list-style-type: none"),n.wrap(o)}}),u.validate&&d.getValidClasses()&&m.addAttributeFilter("class",function(e){for(var t,n,r,i,o,a,s,l=e.length,c=d.getValidClasses();l--;){for(n=(t=e[l]).attr("class").split(" "),o="",r=0;r<n.length;r++)i=n[r],s=!1,(a=c["*"])&&a[i]&&(s=!0),a=c[t.name],!s&&a&&a[i]&&(s=!0),s&&(o&&(o+=" "),o+=i);o.length||(o=null),t.attr("class",o)}})}}),r("tinymce/html/Writer",["tinymce/html/Entities","tinymce/util/Tools"],function(e,t){var n=t.makeMap;return function(t){var r,i,o,a,s,l=[];return r=(t=t||{}).indent,i=n(t.indent_before||""),o=n(t.indent_after||""),a=e.getEncodeFunc(t.entity_encoding||"raw",t.entities),s="html"==t.element_format,{start:function(e,t,n){var c,u,d,f;if(r&&i[e]&&l.length>0&&(f=l[l.length-1]).length>0&&"\n"!==f&&l.push("\n"),l.push("<",e),t)for(c=0,u=t.length;c<u;c++)d=t[c],l.push(" ",d.name,'="',a(d.value,!0),'"');l[l.length]=!n||s?">":" />",n&&r&&o[e]&&l.length>0&&(f=l[l.length-1]).length>0&&"\n"!==f&&l.push("\n")},end:function(e){var t;l.push("</",e,">"),r&&o[e]&&l.length>0&&(t=l[l.length-1]).length>0&&"\n"!==t&&l.push("\n")},text:function(e,t){e.length>0&&(l[l.length]=t?e:a(e))},cdata:function(e){l.push("<![CDATA[",e,"]]>")},comment:function(e){l.push("<!--",e,"-->")},pi:function(e,t){t?l.push("<?",e," ",a(t),"?>"):l.push("<?",e,"?>"),r&&l.push("\n")},doctype:function(e){l.push("<!DOCTYPE",e,">",r?"\n":"")},reset:function(){l.length=0},getContent:function(){return l.join("").replace(/\n$/,"")}}}}),r("tinymce/html/Serializer",["tinymce/html/Writer","tinymce/html/Schema"],function(e,t){return function(n,r){var i=this,o=new e(n);(n=n||{}).validate=!("validate"in n)||n.validate,i.schema=r=r||new t,i.writer=o,i.serialize=function(e){function t(e){var n,s,l,c,u,d,f,m,h,p=i[e.type];if(p)p(e);else{if(n=e.name,s=e.shortEnded,l=e.attributes,a&&l&&l.length>1&&((d=[]).map={},h=r.getElementRule(e.name))){for(f=0,m=h.attributesOrder.length;f<m;f++)(c=h.attributesOrder[f])in l.map&&(u=l.map[c],d.map[c]=u,d.push({name:c,value:u}));for(f=0,m=l.length;f<m;f++)(c=l[f].name)in d.map||(u=l.map[c],d.map[c]=u,d.push({name:c,value:u}));l=d}if(o.start(e.name,l,s),!s){if(e=e.firstChild)do{t(e)}while(e=e.next);o.end(n)}}}var i,a;return a=n.validate,i={3:function(e){o.text(e.value,e.raw)},8:function(e){o.comment(e.value)},7:function(e){o.pi(e.name,e.value)},10:function(e){o.doctype(e.value)},4:function(e){o.cdata(e.value)},11:function(e){if(e=e.firstChild)do{t(e)}while(e=e.next)}},o.reset(),1!=e.type||n.inner?i[11](e):t(e),o.getContent()}}}),r("tinymce/dom/Serializer",["tinymce/dom/DOMUtils","tinymce/html/DomParser","tinymce/html/SaxParser","tinymce/html/Entities","tinymce/html/Serializer","tinymce/html/Node","tinymce/html/Schema","tinymce/Env","tinymce/util/Tools","tinymce/text/Zwsp"],function(e,t,n,r,i,o,a,s,l,c){function u(e){function t(e){return e&&"br"===e.name}var n,r;t(n=e.lastChild)&&t(r=n.prev)&&(n.remove(),r.remove())}var d=l.each,f=l.trim,m=e.DOM;return function(e,o){function h(e){var t=new RegExp(["<span[^>]+data-mce-bogus[^>]+>[\u200b\ufeff]+<\\/span>","\\s?("+x.join("|")+')="[^"]+"'].join("|"),"gi");return e=c.trim(e.replace(t,""))}function p(e){var t,r,i,a,s,l=e,c=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,u=o.schema;for(l=h(l),s=u.getShortEndedElements();a=c.exec(l);)r=c.lastIndex,i=a[0].length,t=s[a[1]]?r:n.findEndTag(u,l,r),l=l.substring(0,r-i)+l.substring(t),c.lastIndex=r-i;return l}function g(){return p(o.getBody().innerHTML)}function v(e){-1===l.inArray(x,e)&&(C.addAttributeFilter(e,function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),x.push(e))}var y,b,C,x=["data-mce-selected"];return o&&(y=o.dom,b=o.schema),y=y||m,b=b||new a(e),e.entity_encoding=e.entity_encoding||"named",e.remove_trailing_brs=!("remove_trailing_brs"in e)||e.remove_trailing_brs,(C=new t(e,b)).addAttributeFilter("data-mce-tabindex",function(e,t){for(var n,r=e.length;r--;)(n=e[r]).attr("tabindex",n.attributes.map["data-mce-tabindex"]),n.attr(t,null)}),C.addAttributeFilter("src,href,style",function(t,n){for(var r,i,o,a=t.length,s="data-mce-"+n,l=e.url_converter,c=e.url_converter_scope;a--;)(i=(r=t[a]).attributes.map[s])!==o?(r.attr(n,i.length>0?i:null),r.attr(s,null)):(i=r.attributes.map[n],"style"===n?i=y.serializeStyle(y.parseStyle(i),r.name):l&&(i=l.call(c,i,n,r.name)),r.attr(n,i.length>0?i:null))}),C.addAttributeFilter("class",function(e){for(var t,n,r=e.length;r--;)(n=(t=e[r]).attr("class"))&&(n=t.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),t.attr("class",n.length>0?n:null))}),C.addAttributeFilter("data-mce-type",function(e,t,n){for(var r,i=e.length;i--;)"bookmark"!==(r=e[i]).attributes.map["data-mce-type"]||n.cleanup||r.remove()}),C.addNodeFilter("noscript",function(e){for(var t,n=e.length;n--;)(t=e[n].firstChild)&&(t.value=r.decode(t.value))}),C.addNodeFilter("script,style",function(e,t){function n(e){return e.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}for(var r,i,o,a=e.length;a--;)i=(r=e[a]).firstChild?r.firstChild.value:"","script"===t?((o=r.attr("type"))&&r.attr("type","mce-no/type"==o?null:o.replace(/^mce\-/,"")),i.length>0&&(r.firstChild.value="// <![CDATA[\n"+n(i)+"\n// ]]>")):i.length>0&&(r.firstChild.value="<!--\n"+n(i)+"\n-->")}),C.addNodeFilter("#comment",function(e){for(var t,n=e.length;n--;)0===(t=e[n]).value.indexOf("[CDATA[")?(t.name="#cdata",t.type=4,t.value=t.value.replace(/^\[CDATA\[|\]\]$/g,"")):0===t.value.indexOf("mce:protected ")&&(t.name="#text",t.type=3,t.raw=!0,t.value=unescape(t.value).substr(14))}),C.addNodeFilter("xml:namespace,input",function(e,t){for(var n,r=e.length;r--;)7===(n=e[r]).type?n.remove():1===n.type&&("input"!==t||"type"in n.attributes.map||n.attr("type","text"))}),C.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),{schema:b,addNodeFilter:C.addNodeFilter,addAttributeFilter:C.addAttributeFilter,serialize:function(t,n){var r,o,a,l,m,h,p=this;return s.ie&&y.select("script,style,select,map").length>0?(m=t.innerHTML,t=t.cloneNode(!1),y.setHTML(t,m)):t=t.cloneNode(!0),(r=document.implementation).createHTMLDocument&&(o=r.createHTMLDocument(""),d("BODY"==t.nodeName?t.childNodes:[t],function(e){o.body.appendChild(o.importNode(e,!0))}),t="BODY"!=t.nodeName?o.body.firstChild:o.body,a=y.doc,y.doc=o),(n=n||{}).format=n.format||"html",n.selection&&(n.forced_root_block=""),n.no_events||(n.node=t,p.onPreProcess(n)),u(h=C.parse(f(n.getInner?t.innerHTML:y.getOuterHTML(t)),n)),l=new i(e,b),n.content=l.serialize(h),n.cleanup||(n.content=c.trim(n.content),n.content=n.content.replace(/\uFEFF/g,"")),n.no_events||p.onPostProcess(n),a&&(y.doc=a),n.node=null,n.content},addRules:function(e){b.addValidElements(e)},setRules:function(e){b.setValidElements(e)},onPreProcess:function(e){o&&o.fire("PreProcess",e)},onPostProcess:function(e){o&&o.fire("PostProcess",e)},addTempAttr:v,trimHtml:h,getTrimmedContent:g,trimContent:p}}}),r("tinymce/dom/TridentSelection",[],function(){function e(e){function t(t,n){var r,i,o,a,s,l,c,u,d=0,f=-1;if((r=t.duplicate()).collapse(n),(u=r.parentElement()).ownerDocument===e.dom.doc){for(;"false"===u.contentEditable;)u=u.parentNode;if(!u.hasChildNodes())return{node:u,inside:1};for(i=(a=u.children).length-1;d<=i;)if(s=a[c=Math.floor((d+i)/2)],r.moveToElementText(s),(f=r.compareEndPoints(n?"StartToStart":"EndToEnd",t))>0)i=c-1;else{if(!(f<0))return{node:s};d=c+1}if(f<0)for(s?r.collapse(!1):(r.moveToElementText(u),r.collapse(!0),s=u,o=!0),l=0;0!==r.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==r.move("character",1)&&u==r.parentElement();)l++;else for(r.collapse(!0),l=0;0!==r.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==r.move("character",-1)&&u==r.parentElement();)l++;return{node:s,position:f,offset:l,inside:o}}}function n(){function n(e){var n,r,i,o,a,s=t(u,e),l=0;if(n=s.node,r=s.offset,!s.inside||n.hasChildNodes())if(r!==o){if(s.position<0){if(!(i=s.inside?n.firstChild:n.nextSibling))return void d[e?"setStartAfter":"setEndAfter"](n);if(!r)return void(3==i.nodeType?d[e?"setStart":"setEnd"](i,0):d[e?"setStartBefore":"setEndBefore"](i));for(;i;){if(3==i.nodeType&&(l+=(a=i.nodeValue).length)>=r){n=i,l-=r,l=a.length-l;break}i=i.nextSibling}}else{if(!(i=n.previousSibling))return d[e?"setStartBefore":"setEndBefore"](n);if(!r)return void(3==n.nodeType?d[e?"setStart":"setEnd"](i,n.nodeValue.length):d[e?"setStartAfter":"setEndAfter"](i));for(;i;){if(3==i.nodeType&&(l+=i.nodeValue.length)>=r){n=i,l-=r;break}i=i.previousSibling}}d[e?"setStart":"setEnd"](n,l)}else d[e?"setStartBefore":"setEndAfter"](n);else d[e?"setStart":"setEnd"](n,0)}var o,a,s,l,c,u=e.getRng(),d=i.createRng();if((o=u.item?u.item(0):u.parentElement()).ownerDocument!=i.doc)return d;if(a=e.isCollapsed(),u.item)return d.setStart(o.parentNode,i.nodeIndex(o)),d.setEnd(d.startContainer,d.startOffset+1),d;try{n(!0),a||n()}catch(f){if(-2147024809!=f.number)throw f;c=r.getBookmark(2),(s=u.duplicate()).collapse(!0),o=s.parentElement(),a||((s=u.duplicate()).collapse(!1),(l=s.parentElement()).innerHTML=l.innerHTML),o.innerHTML=o.innerHTML,r.moveToBookmark(c),u=e.getRng(),n(!0),a||n()}return d}var r=this,i=e.dom,o=!1;this.getBookmark=function(n){function r(e){var t,n,r,o,a=[];for(t=e.parentNode,n=i.getRoot().parentNode;t!=n&&9!==t.nodeType;){for(o=(r=t.children).length;o--;)if(e===r[o]){a.push(o);break}e=t,t=t.parentNode}return a}function o(e){var n;if(n=t(a,e))return{position:n.position,offset:n.offset,indexes:r(n.node),inside:n.inside}}var a=e.getRng(),s={};return 2===n&&(a.item?s.start={ctrl:!0,indexes:r(a.item(0))}:(s.start=o(!0),e.isCollapsed()||(s.end=o()))),s},this.moveToBookmark=function(e){function t(e){var t,n,r,o;for(t=i.getRoot(),n=e.length-1;n>=0;n--)o=t.children,(r=e[n])<=o.length-1&&(t=o[r]);return t}function n(n){var i,a,s,l,c=e[n?"start":"end"];c&&(i=c.position>0,(a=o.createTextRange()).moveToElementText(t(c.indexes)),(l=c.offset)!==s?(a.collapse(c.inside||i),a.moveStart("character",i?-l:l)):a.collapse(n),r.setEndPoint(n?"StartToStart":"EndToStart",a),n&&r.collapse(!0))}var r,o=i.doc.body;e.start&&(e.start.ctrl?((r=o.createControlRange()).addElement(t(e.start.indexes)),r.select()):(r=o.createTextRange(),n(!0),n(),r.select()))},this.addRange=function(t){function n(e){var t,n,a,d,f;a=i.create("a"),t=e?s:c,n=e?l:u,d=r.duplicate(),t!=h&&t!=h.documentElement||(t=p,n=0),3==t.nodeType?(t.parentNode.insertBefore(a,t),d.moveToElementText(a),d.moveStart("character",n),i.remove(a),r.setEndPoint(e?"StartToStart":"EndToEnd",d)):((f=t.childNodes).length?(n>=f.length?i.insertAfter(a,f[f.length-1]):t.insertBefore(a,f[n]),d.moveToElementText(a)):t.canHaveHTML&&(t.innerHTML="<span>&#xFEFF;</span>",a=t.firstChild,d.moveToElementText(a),d.collapse(o)),r.setEndPoint(e?"StartToStart":"EndToEnd",d),i.remove(a))}var r,a,s,l,c,u,d,f,m,h=e.dom.doc,p=h.body;if(s=t.startContainer,l=t.startOffset,c=t.endContainer,u=t.endOffset,r=p.createTextRange(),s==c&&1==s.nodeType){if(l==u&&!s.hasChildNodes()){if(s.canHaveHTML)return(d=s.previousSibling)&&!d.hasChildNodes()&&i.isBlock(d)?d.innerHTML="&#xFEFF;":d=null,s.innerHTML="<span>&#xFEFF;</span><span>&#xFEFF;</span>",r.moveToElementText(s.lastChild),r.select(),i.doc.selection.clear(),s.innerHTML="",void(d&&(d.innerHTML=""));l=i.nodeIndex(s),s=s.parentNode}if(l==u-1)try{if(m=s.childNodes[l],(a=p.createControlRange()).addElement(m),a.select(),(f=e.getRng()).item&&m===f.item(0))return}catch(g){}}n(!0),n(),r.select()},this.getRangeAt=n}return e}),r("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||this.metaKeyPressed(e)},metaKeyPressed:function(t){return e.mac?t.metaKey:t.ctrlKey&&!t.altKey}}}),r("tinymce/dom/ControlSelection",["tinymce/util/VK","tinymce/util/Tools","tinymce/util/Delay","tinymce/Env","tinymce/dom/NodeType"],function(e,t,n,r,i){function o(e,t){for(;t&&t!=e;){if(s(t)||a(t))return t;t=t.parentNode}return null}var a=i.isContentEditableFalse,s=i.isContentEditableTrue;return function(i,s){function l(e){var t=s.settings.object_resizing;return!1!==t&&!r.iOS&&("string"!=typeof t&&(t="table,img,div"),"false"!==e.getAttribute("data-mce-resize")&&(e!=s.getBody()&&s.dom.is(e,t)))}function c(t){var n,r,i,o;n=t.screenX-B,r=t.screenY-D,F=n*R[2]+P,U=r*R[3]+O,F=F<5?5:F,U=U<5?5:U,("IMG"==S.nodeName&&!1!==s.settings.resize_img_proportional?!e.modifierPressed(t):e.modifierPressed(t)||"IMG"==S.nodeName&&R[2]*R[3]!=0)&&(X(n)>X(r)?(U=K(F*H),F=K(U/H)):(F=K(U/H),U=K(F*H))),V.setStyles(_,{width:F,height:U}),i=(i=R.startPos.x+n)>0?i:0,o=(o=R.startPos.y+r)>0?o:0,V.setStyles(k,{left:i,top:o,display:"block"}),k.innerHTML=F+" &times; "+U,R[2]<0&&_.clientWidth<=F&&V.setStyle(_,"left",M+(P-F)),R[3]<0&&_.clientHeight<=U&&V.setStyle(_,"top",L+(O-U)),(n=G.scrollWidth-z)+(r=G.scrollHeight-W)!==0&&V.setStyles(k,{left:i-n,top:o-r}),I||(s.fire("ObjectResizeStart",{target:S,width:P,height:O}),I=!0)}function u(){function e(e,t){t&&(S.style[e]||!s.schema.isValid(S.nodeName.toLowerCase(),e)?V.setStyle(S,e,t):V.setAttrib(S,e,t))}I=!1,e("width",F),e("height",U),V.unbind(q,"mousemove",c),V.unbind(q,"mouseup",u),j!=q&&(V.unbind(j,"mousemove",c),V.unbind(j,"mouseup",u)),V.remove(_),V.remove(k),Y&&"TABLE"!=S.nodeName||d(S),s.fire("ObjectResized",{target:S,width:F,height:U}),V.setAttrib(S,"style",V.getAttrib(S,"style")),s.nodeChanged()}function d(e,t,n){var i,o,a,d,m;f(),x(),i=V.getPos(e,G),M=i.x,L=i.y,m=e.getBoundingClientRect(),o=m.width||m.right-m.left,a=m.height||m.bottom-m.top,S!=e&&(C(),S=e,F=U=0),d=s.fire("ObjectSelected",{target:e}),l(e)&&!d.isDefaultPrevented()?$(T,function(e,i){function s(t){B=t.screenX,D=t.screenY,P=S.clientWidth,O=S.clientHeight,H=O/P,R=e,e.startPos={x:o*e[0]+M,y:a*e[1]+L},z=G.scrollWidth,W=G.scrollHeight,_=S.cloneNode(!0),V.addClass(_,"mce-clonedresizable"),V.setAttrib(_,"data-mce-bogus","all"),_.contentEditable=!1,_.unSelectabe=!0,V.setStyles(_,{left:M,top:L,margin:0}),_.removeAttribute("data-mce-selected"),G.appendChild(_),V.bind(q,"mousemove",c),V.bind(q,"mouseup",u),j!=q&&(V.bind(j,"mousemove",c),V.bind(j,"mouseup",u)),k=V.add(G,"div",{"class":"mce-resize-helper","data-mce-bogus":"all"},P+" &times; "+O)}var l;t?i==t&&s(n):((l=V.get("mceResizeHandle"+i))&&V.remove(l),l=V.add(G,"div",{id:"mceResizeHandle"+i,"data-mce-bogus":"all","class":"mce-resizehandle",unselectable:!0,style:"cursor:"+i+"-resize; margin:0; padding:0"}),r.ie&&(l.contentEditable=!1),V.bind(l,"mousedown",function(e){e.stopImmediatePropagation(),e.preventDefault(),s(e)}),e.elm=l,V.setStyles(l,{left:o*e[0]+M-l.offsetWidth/2,top:a*e[1]+L-l.offsetHeight/2}))}):f(),S.setAttribute("data-mce-selected","1")}function f(){var e,t;for(e in x(),S&&S.removeAttribute("data-mce-selected"),T)(t=V.get("mceResizeHandle"+e))&&(V.unbind(t),V.remove(t))}function m(e){function t(e,t){if(e)do{if(e===t)return!0}while(e=e.parentNode)}var n,r;I||s.removed||($(V.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),r="mousedown"==e.type?e.target:i.getNode(),t(r=V.$(r).closest(Y?"table":"table,img,hr")[0],G)&&(w(),t(n=i.getStart(!0),r)&&t(i.getEnd(!0),r)&&(!Y||r!=n&&"IMG"!==n.nodeName))?d(r):f())}function h(e,t,n){e&&e.attachEvent&&e.attachEvent("on"+t,n)}function p(e,t,n){e&&e.detachEvent&&e.detachEvent("on"+t,n)}function g(e){var t,n,r,i,o,a,l,c=e.srcElement;for(n in t=c.getBoundingClientRect(),a=A.clientX-t.left,l=A.clientY-t.top,T)if(r=T[n],i=c.offsetWidth*r[0],o=c.offsetHeight*r[1],X(i-a)<8&&X(o-l)<8){R=r;break}I=!0,s.fire("ObjectResizeStart",{target:S,width:S.clientWidth,height:S.clientHeight}),s.getDoc().selection.empty(),d(c,n,A)}function v(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function y(e){return a(o(s.getBody(),e))}function b(e){var t=e.srcElement;if(y(t))v(e);else if(t!=S){if(s.fire("ObjectSelected",{target:t}),C(),0===t.id.indexOf("mceResizeHandle"))return void(e.returnValue=!1);"IMG"!=t.nodeName&&"TABLE"!=t.nodeName||(f(),S=t,h(t,"resizestart",g))}}function C(){p(S,"resizestart",g)}function x(){for(var e in T){var t=T[e];t.elm&&(V.unbind(t.elm),delete t.elm)}}function w(){try{s.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}}function E(e){var t;if(Y){t=q.body.createControlRange();try{return t.addElement(e),t.select(),!0}catch(n){}}}function N(){S=_=null,Y&&(C(),p(G,"controlselect",b))}var S,_,k,T,R,A,B,D,M,L,P,O,H,I,F,U,z,W,V=s.dom,$=t.each,q=s.getDoc(),j=document,Y=r.ie&&r.ie<11,X=Math.abs,K=Math.round,G=s.getBody();T={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};var J=".mce-content-body";return s.contentStyles.push(J+" div.mce-resizehandle {position: absolute;border: 1px solid black;box-sizing: box-sizing;background: #FFF;width: 7px;height: 7px;z-index: 10000}"+J+" .mce-resizehandle:hover {background: #000}"+J+" img[data-mce-selected],"+J+" hr[data-mce-selected] {outline: 1px solid black;resize: none}"+J+" .mce-clonedresizable {position: absolute;"+(r.gecko?"":"outline: 1px dashed black;")+"opacity: .5;filter: alpha(opacity=50);z-index: 10000}"+J+" .mce-resize-helper {background: #555;background: rgba(0,0,0,0.75);border-radius: 3px;border: 1px;color: white;display: none;font-family: sans-serif;font-size: 12px;white-space: nowrap;line-height: 14px;margin: 5px 10px;padding: 5px;position: absolute;z-index: 10001}"),s.on("init",function(){Y?(s.on("ObjectResized",function(e){"TABLE"!=e.target.nodeName&&(f(),E(e.target))}),h(G,"controlselect",b),s.on("mousedown",function(e){A=e})):(w(),r.ie>=11&&(s.on("mousedown click",function(e){var t=e.target,n=t.nodeName;I||!/^(TABLE|IMG|HR)$/.test(n)||y(t)||(s.selection.select(t,"TABLE"==n),"mousedown"==e.type&&s.nodeChanged())}),s.dom.bind(G,"mscontrolselect",function(e){function t(e){n.setEditorTimeout(s,function(){s.selection.select(e)})}if(y(e.target))return e.preventDefault(),void t(e.target);/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"==e.target.tagName&&t(e.target))})));var e=n.throttle(function(e){s.composing||m(e)});s.on("nodechange ResizeEditor ResizeWindow drop",e),s.on("keyup compositionend",function(t){S&&"TABLE"==S.nodeName&&e(t)}),s.on("hide blur",f)}),s.on("remove",x),{isResizable:l,showResizeRect:d,hideResizeRect:f,updateResizeRect:m,controlSelect:E,destroy:N}}}),r("tinymce/util/Fun",[],function(){function e(e){return function(){return e}}function t(e){return function(t){return!e(t)}}function n(e,t){return function(n){return e(t(n))}}function r(){var e=s.call(arguments);return function(t){for(var n=0;n<e.length;n++)if(e[n](t))return!0;return!1}}function i(){var e=s.call(arguments);return function(t){for(var n=0;n<e.length;n++)if(!e[n](t))return!1;return!0}}function o(e){var t=s.call(arguments);return t.length-1>=e.length?e.apply(this,t.slice(1)):function(){var e=t.concat([].slice.call(arguments));return o.apply(this,e)}}function a(){}var s=[].slice;return{constant:e,negate:t,and:i,or:r,curry:o,compose:n,noop:a}}),r("tinymce/caret/CaretCandidate",["tinymce/dom/NodeType","tinymce/util/Arr","tinymce/caret/CaretContainer"],function(e,t,n){function r(e){return!p(e)&&(d(e)?!f(e.parentNode):m(e)||u(e)||h(e)||c(e))}function i(e,t){for(e=e.parentNode;e&&e!=t;e=e.parentNode){if(c(e))return!1;if(l(e))return!0}return!0}function o(e){return!!c(e)&&!0!==t.reduce(e.getElementsByTagName("*"),function(e,t){return e||l(t)},!1)}function a(e){return m(e)||o(e)}function s(e,t){return r(e)&&i(e,t)}var l=e.isContentEditableTrue,c=e.isContentEditableFalse,u=e.isBr,d=e.isText,f=e.matchNodeNames("script style textarea"),m=e.matchNodeNames("img input textarea hr iframe video audio object"),h=e.matchNodeNames("table"),p=n.isCaretContainer;return{isCaretCandidate:r,isInEditable:i,isAtomic:a,isEditableCaretCandidate:s}}),r("tinymce/geom/ClientRect",[],function(){function e(e){return e?{left:u(e.left),top:u(e.top),bottom:u(e.bottom),right:u(e.right),width:u(e.width),height:u(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}}function t(t,n){return t=e(t),n?t.right=t.left:(t.left=t.left+t.width,t.right=t.left),t.width=0,t}function n(e,t){return e.left===t.left&&e.top===t.top&&e.bottom===t.bottom&&e.right===t.right}function r(e,t,n){return e>=0&&e<=Math.min(t.height,n.height)/2}function i(e,t){return e.bottom<t.top||!(e.top>t.bottom)&&r(t.top-e.bottom,e,t)}function o(e,t){return e.top>t.bottom||!(e.bottom<t.top)&&r(t.bottom-e.top,e,t)}function a(e,t){return e.left<t.left}function s(e,t){return e.right>t.right}function l(e,t){return i(e,t)?-1:o(e,t)?1:a(e,t)?-1:s(e,t)?1:0}function c(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom}var u=Math.round;return{clone:e,collapse:t,isEqual:n,isAbove:i,isBelow:o,isLeft:a,isRight:s,compare:l,containsXY:c}}),r("tinymce/text/ExtendingChar",[],function(){function e(e){return"string"==typeof e&&e.charCodeAt(0)>=768&&t.test(e)}
var t=new RegExp("[\u0300-\u036f\u0483-\u0487\u0488-\u0489\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e3-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62-\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c00\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0c81\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc-\u0ccd\u0cd5-\u0cd6\u0ce2-\u0ce3\u0d01\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62-\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1ab0-\u1abd\u1abe\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab-\u1bad\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1cf8-\u1cf9\u1dc0-\u1df5\u1dfc-\u1dff\u200c-\u200d\u20d0-\u20dc\u20dd-\u20e0\u20e1\u20e2-\u20e4\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u302e-\u302f\u3099-\u309a\ua66f\ua670-\ua672\ua674-\ua67d\ua69e-\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\ua9e5\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaa7c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\uff9e-\uff9f]");return{isExtendingChar:e}}),r("tinymce/caret/CaretPosition",["tinymce/util/Fun","tinymce/dom/NodeType","tinymce/dom/DOMUtils","tinymce/dom/RangeUtils","tinymce/caret/CaretCandidate","tinymce/geom/ClientRect","tinymce/text/ExtendingChar"],function(e,t,n,r,i,o,a){function s(e){return"createRange"in e?e.createRange():n.DOM.createRng()}function l(e){return e&&/[\r\n\t ]/.test(e)}function c(e){var t,n=e.startContainer,r=e.startOffset;return!(!l(e.toString())||!v(n.parentNode)||!l((t=n.data)[r-1])&&!l(t[r+1]))}function u(e){function t(e){var t,n=e.ownerDocument,r=s(n),i=n.createTextNode("\xa0"),a=e.parentNode;return a.insertBefore(i,e),r.setStart(i,0),r.setEnd(i,1),t=o.clone(r.getBoundingClientRect()),a.removeChild(i),t}function n(e){var n,r;return n=(r=e.getClientRects()).length>0?o.clone(r[0]):o.clone(e.getBoundingClientRect()),b(e)&&0===n.left?t(e):n}function r(e,t){return(e=o.collapse(e,t)).width=1,e.right=e.left+1,e}function i(e){0!==e.height&&(m.length>0&&o.isEqual(e,m[m.length-1])||m.push(e))}function l(e,t){var o=s(e.ownerDocument);if(t<e.data.length){if(a.isExtendingChar(e.data[t]))return m;if(a.isExtendingChar(e.data[t-1])&&(o.setStart(e,t),o.setEnd(e,t+1),!c(o)))return i(r(n(o),!1)),m}t>0&&(o.setStart(e,t-1),o.setEnd(e,t),c(o)||i(r(n(o),!1))),t<e.data.length&&(o.setStart(e,t),o.setEnd(e,t+1),c(o)||i(r(n(o),!0)))}var u,d,m=[];if(y(e.container()))return l(e.container(),e.offset()),m;if(f(e.container()))if(e.isAtEnd())d=x(e.container(),e.offset()),y(d)&&l(d,d.data.length),g(d)&&!b(d)&&i(r(n(d),!1));else{if(d=x(e.container(),e.offset()),y(d)&&l(d,0),g(d)&&e.isAtEnd())return i(r(n(d),!1)),m;u=x(e.container(),e.offset()-1),g(u)&&!b(u)&&(h(u)||h(d)||!g(d))&&i(r(n(u),!1)),g(d)&&i(r(n(d),!0))}return m}function d(t,n,r){function i(){return y(t),0===n}function o(){return y(t)?n>=t.data.length:n>=t.childNodes.length}function a(){var e;return(e=s(t.ownerDocument)).setStart(t,n),e.setEnd(t,n),e}function l(){return r||(r=u(new d(t,n))),r}function c(){return l().length>0}function f(e){return e&&t===e.container()&&n===e.offset()}function m(e){return x(t,e?n-1:n)}return{container:e.constant(t),offset:e.constant(n),toRange:a,getClientRects:l,isVisible:c,isAtStart:i,isAtEnd:o,isEqual:f,getNode:m}}var f=t.isElement,m=i.isCaretCandidate,h=t.matchStyleValues("display","block table"),p=t.matchStyleValues("float","left right"),g=e.and(f,m,e.negate(p)),v=e.negate(t.matchStyleValues("white-space","pre pre-line pre-wrap")),y=t.isText,b=t.isBr,C=n.nodeIndex,x=r.getNode;return d.fromRangeStart=function(e){return new d(e.startContainer,e.startOffset)},d.fromRangeEnd=function(e){return new d(e.endContainer,e.endOffset)},d.after=function(e){return new d(e.parentNode,C(e)+1)},d.before=function(e){return new d(e.parentNode,C(e))},d}),r("tinymce/caret/CaretBookmark",["tinymce/dom/NodeType","tinymce/dom/DOMUtils","tinymce/util/Fun","tinymce/util/Arr","tinymce/caret/CaretPosition"],function(e,t,n,r,i){function o(e){var t=e.parentNode;return v(t)?o(t):t}function a(e){return e?r.reduce(e.childNodes,function(e,t){return v(t)&&"BR"!=t.nodeName?e=e.concat(a(t)):e.push(t),e},[]):[]}function s(e,t){for(;(e=e.previousSibling)&&g(e);)t+=e.data.length;return t}function l(e){return function(t){return e===t}}function c(t){var n,i,s;return n=a(o(t)),i=r.findIndex(n,l(t),t),n=n.slice(0,i+1),s=r.reduce(n,function(e,t,r){return g(t)&&g(n[r-1])&&e++,e},0),n=r.filter(n,e.matchNodeNames(t.nodeName)),(i=r.findIndex(n,l(t),t))-s}function u(e){return(g(e)?"text()":e.nodeName.toLowerCase())+"["+c(e)+"]"}function d(e,t,n){var r=[];for(t=t.parentNode;t!=e&&(!n||!n(t));t=t.parentNode)r.push(t);return r}function f(t,i){var o,a,l,c,f,m=[];return o=i.container(),a=i.offset(),g(o)?l=s(o,a):(a>=(c=o.childNodes).length?(l="after",a=c.length-1):l="before",o=c[a]),m.push(u(o)),f=d(t,o),f=r.filter(f,n.negate(e.isBogus)),(m=m.concat(r.map(f,function(e){return u(e)}))).reverse().join("/")+","+l}function m(t,n,i){var o=a(t);return o=r.filter(o,function(e,t){return!g(e)||!g(o[t-1])}),(o=r.filter(o,e.matchNodeNames(n)))[i]}function h(e,t){for(var n,r=e,o=0;g(r);){if(n=r.data.length,t>=o&&t<=o+n){e=r,t-=o;break}if(!g(r.nextSibling)){e=r,t=n;break}o+=n,r=r.nextSibling}return t>e.data.length&&(t=e.data.length),new i(e,t)}function p(e,t){var n,o,a;return t?(t=(n=t.split(","))[0].split("/"),a=n.length>1?n[1]:"before",(o=r.reduce(t,function(e,t){return(t=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t))?("text()"===t[1]&&(t[1]="#text"),m(e,t[1],parseInt(t[2],10))):null},e))?g(o)?h(o,parseInt(a,10)):(a="after"===a?y(o)+1:y(o),new i(o.parentNode,a)):null):null}var g=e.isText,v=e.isBogus,y=t.nodeIndex;return{create:f,resolve:p}}),r("tinymce/dom/BookmarkManager",["tinymce/Env","tinymce/util/Tools","tinymce/caret/CaretContainer","tinymce/caret/CaretBookmark","tinymce/caret/CaretPosition","tinymce/dom/NodeType","tinymce/dom/RangeUtils"],function(e,t,n,r,i,o,a){function s(s){var c=s.dom;this.getBookmark=function(e,u){function d(e,n){var r=0;return t.each(c.select(e),function(e){if("all"!==e.getAttribute("data-mce-bogus"))return e!=n&&void r++}),r}function f(e){function t(t){var n,r,i,o=t?"start":"end";n=e[o+"Container"],r=e[o+"Offset"],1==n.nodeType&&"TR"==n.nodeName&&(n=(i=n.childNodes)[Math.min(t?r:r-1,i.length-1)])&&(r=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,r))}return t(!0),t(),e}function m(e){function t(e,t){var r,i,o=e[t?"startContainer":"endContainer"],a=e[t?"startOffset":"endOffset"],s=[],l=0;if(3==o.nodeType){if(u)for(r=o.previousSibling;r&&3==r.nodeType;r=r.previousSibling)a+=r.nodeValue.length;s.push(a)}else a>=(i=o.childNodes).length&&i.length&&(l=1,a=Math.max(0,i.length-1)),s.push(c.nodeIndex(i[a],u)+l);for(;o&&o!=n;o=o.parentNode)s.push(c.nodeIndex(o,u));return s}var n=c.getRoot(),r={};return r.start=t(e,!0),s.isCollapsed()||(r.end=t(e)),r}function h(e){function t(e,t){var r;if(o.isElement(e)&&(e=a.getNode(e,t),l(e)))return e;if(n.isCaretContainer(e)){if(o.isText(e)&&n.isCaretContainerBlock(e)&&(e=e.parentNode),r=e.previousSibling,l(r))return r;if(r=e.nextSibling,l(r))return r}}return t(e.startContainer,e.startOffset)||t(e.endContainer,e.endOffset)}var p,g,v,y,b,C,x,w="&#xFEFF;";if(2==e)return b=(C=s.getNode())?C.nodeName:null,p=s.getRng(),l(C)||"IMG"==b?{name:b,index:d(b,C)}:s.tridentSel?s.tridentSel.getBookmark(e):(C=h(p))?{name:b=C.tagName,index:d(b,C)}:m(p);if(3==e)return p=s.getRng(),{start:r.create(c.getRoot(),i.fromRangeStart(p)),end:r.create(c.getRoot(),i.fromRangeEnd(p))};if(e)return{rng:s.getRng()};if(p=s.getRng(),v=c.uniqueId(),y=s.isCollapsed(),x="overflow:hidden;line-height:0px",p.duplicate||p.item){if(p.item)return{name:b=(C=p.item(0)).nodeName,index:d(b,C)};g=p.duplicate();try{p.collapse(),p.pasteHTML('<span data-mce-type="bookmark" id="'+v+'_start" style="'+x+'">'+w+"</span>"),y||(g.collapse(!1),p.moveToElementText(g.parentElement()),0===p.compareEndPoints("StartToEnd",g)&&g.move("character",-1),g.pasteHTML('<span data-mce-type="bookmark" id="'+v+'_end" style="'+x+'">'+w+"</span>"))}catch(E){return null}}else{if("IMG"==(b=(C=s.getNode()).nodeName))return{name:b,index:d(b,C)};g=f(p.cloneRange()),y||(g.collapse(!1),g.insertNode(c.create("span",{"data-mce-type":"bookmark",id:v+"_end",style:x},w))),(p=f(p)).collapse(!0),p.insertNode(c.create("span",{"data-mce-type":"bookmark",id:v+"_start",style:x},w))}return s.moveToBookmark({id:v,keep:1}),{id:v}},this.moveToBookmark=function(n){function i(e){var t,r,i,o,a=n[e?"start":"end"];if(a){for(i=a[0],r=d,t=a.length-1;t>=1;t--){if(o=r.childNodes,a[t]>o.length-1)return;r=o[a[t]]}3===r.nodeType&&(i=Math.min(a[0],r.nodeValue.length)),1===r.nodeType&&(i=Math.min(a[0],r.childNodes.length)),e?u.setStart(r,i):u.setEnd(r,i)}return!0}function o(r){var i,o,a,s,l=c.get(n.id+"_"+r),u=n.keep;if(l&&(i=l.parentNode,"start"==r?(u?(i=l.firstChild,o=1):o=c.nodeIndex(l),f=m=i,h=p=o):(u?(i=l.firstChild,o=1):o=c.nodeIndex(l),m=i,p=o),!u)){for(s=l.previousSibling,a=l.nextSibling,t.each(t.grep(l.childNodes),function(e){3==e.nodeType&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});l=c.get(n.id+"_"+r);)c.remove(l,1);s&&a&&s.nodeType==a.nodeType&&3==s.nodeType&&!e.opera&&(o=s.nodeValue.length,s.appendData(a.nodeValue),c.remove(a),"start"==r?(f=m=s,h=p=o):(m=s,p=o))}}function a(t){return!c.isBlock(t)||t.innerHTML||e.ie||(t.innerHTML='<br data-mce-bogus="1" />'),t}function l(){var e,t;return e=c.createRng(),t=r.resolve(c.getRoot(),n.start),e.setStart(t.container(),t.offset()),t=r.resolve(c.getRoot(),n.end),e.setEnd(t.container(),t.offset()),e}var u,d,f,m,h,p;if(n)if(t.isArray(n.start)){if(u=c.createRng(),d=c.getRoot(),s.tridentSel)return s.tridentSel.moveToBookmark(n);i(!0)&&i()&&s.setRng(u)}else"string"==typeof n.start?s.setRng(l(n)):n.id?(o("start"),o("end"),f&&((u=c.createRng()).setStart(a(f),h),u.setEnd(a(m),p),s.setRng(u))):n.name?s.select(c.select(n.name)[n.index]):n.rng&&s.setRng(n.rng)}}var l=o.isContentEditableFalse;return s.isBookmarkNode=function(e){return e&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},s}),r("tinymce/dom/Selection",["tinymce/dom/TreeWalker","tinymce/dom/TridentSelection","tinymce/dom/ControlSelection","tinymce/dom/RangeUtils","tinymce/dom/BookmarkManager","tinymce/dom/NodeType","tinymce/Env","tinymce/util/Tools","tinymce/caret/CaretPosition"],function(e,n,r,i,o,a,s,l,c){function u(e,t,i,a){var s=this;s.dom=e,s.win=t,s.serializer=i,s.editor=a,s.bookmarkManager=new o(s),s.controlSelection=new r(s,a),s.win.getSelection||(s.tridentSel=new n(s))}var d=l.each,f=l.trim,m=s.ie;return u.prototype={setCursorLocation:function(e,t){var n=this,r=n.dom.createRng();e?(r.setStart(e,t),r.setEnd(e,t),n.setRng(r),n.collapse(!1)):(n._moveEndPoint(r,n.editor.getBody(),!0),n.setRng(r))},getContent:function(e){var n,r,i,o=this,a=o.getRng(),s=o.dom.create("body"),l=o.getSel();return n=r="",(e=e||{}).get=!0,e.format=e.format||"html",e.selection=!0,o.editor.fire("BeforeGetContent",e),"text"==e.format?o.isCollapsed()?"":a.text||(l.toString?l.toString():""):(a.cloneContents?(i=a.cloneContents())&&s.appendChild(i):a.item!==t||a.htmlText!==t?(s.innerHTML="<br>"+(a.item?a.item(0).outerHTML:a.htmlText),s.removeChild(s.firstChild)):s.innerHTML=a.toString(),/^\s/.test(s.innerHTML)&&(n=" "),/\s+$/.test(s.innerHTML)&&(r=" "),e.getInner=!0,e.content=o.isCollapsed()?"":n+o.serializer.serialize(s,e)+r,o.editor.fire("GetContent",e),e.content)},setContent:function(e,t){var n,r,i,o=this,a=o.getRng(),s=o.win.document;if((t=t||{format:"html"}).set=!0,t.selection=!0,t.content=e,t.no_events||o.editor.fire("BeforeSetContent",t),e=t.content,a.insertNode){e+='<span id="__caret">_</span>',a.startContainer==s&&a.endContainer==s?s.body.innerHTML=e:(a.deleteContents(),0===s.body.childNodes.length?s.body.innerHTML=e:a.createContextualFragment?a.insertNode(a.createContextualFragment(e)):(r=s.createDocumentFragment(),i=s.createElement("div"),r.appendChild(i),i.outerHTML=e,a.insertNode(r))),n=o.dom.get("__caret"),(a=s.createRange()).setStartBefore(n),a.setEndBefore(n),o.setRng(a),o.dom.remove("__caret");try{o.setRng(a)}catch(l){}}else a.item&&(s.execCommand("Delete",!1,null),a=o.getRng()),/^\s+/.test(e)?(a.pasteHTML('<span id="__mce_tmp">_</span>'+e),o.dom.remove("__mce_tmp")):a.pasteHTML(e);t.no_events||o.editor.fire("SetContent",t)},getStart:function(e){var t,n,r,i,o=this,a=o.getRng();if(a.duplicate||a.item){if(a.item)return a.item(0);for((r=a.duplicate()).collapse(1),(t=r.parentElement()).ownerDocument!==o.dom.doc&&(t=o.dom.getRoot()),n=i=a.parentElement();i=i.parentNode;)if(i==t){t=n;break}return t}return 1==(t=a.startContainer).nodeType&&t.hasChildNodes()&&(e&&a.collapsed||(t=t.childNodes[Math.min(t.childNodes.length-1,a.startOffset)])),t&&3==t.nodeType?t.parentNode:t},getEnd:function(e){var t,n,r=this,i=r.getRng();return i.duplicate||i.item?i.item?i.item(0):((i=i.duplicate()).collapse(0),(t=i.parentElement()).ownerDocument!==r.dom.doc&&(t=r.dom.getRoot()),t&&"BODY"==t.nodeName&&t.lastChild||t):(t=i.endContainer,n=i.endOffset,1==t.nodeType&&t.hasChildNodes()&&(e&&i.collapsed||(t=t.childNodes[n>0?n-1:n])),t&&3==t.nodeType?t.parentNode:t)},getBookmark:function(e,t){return this.bookmarkManager.getBookmark(e,t)},moveToBookmark:function(e){return this.bookmarkManager.moveToBookmark(e)},select:function(e,t){var n,r=this,i=r.dom,o=i.createRng();if(r.lastFocusBookmark=null,e){if(!t&&r.controlSelection.controlSelect(e))return;n=i.nodeIndex(e),o.setStart(e.parentNode,n),o.setEnd(e.parentNode,n+1),t&&(r._moveEndPoint(o,e,!0),r._moveEndPoint(o,e)),r.setRng(o)}return e},isCollapsed:function(){var e=this,t=e.getRng(),n=e.getSel();return!(!t||t.item)&&(t.compareEndPoints?0===t.compareEndPoints("StartToEnd",t):!n||t.collapsed)},collapse:function(e){var t,n=this,r=n.getRng();r.item&&(t=r.item(0),(r=n.win.document.body.createTextRange()).moveToElementText(t)),r.collapse(!!e),n.setRng(r)},getSel:function(){var e=this.win;return e.getSelection?e.getSelection():e.document.selection},getRng:function(e){function t(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(r){return-1}}var n,r,i,o,a,s,l=this;if(!l.win)return null;if(null==(o=l.win.document))return null;if(!e&&l.lastFocusBookmark){var c=l.lastFocusBookmark;return c.startContainer?((r=o.createRange()).setStart(c.startContainer,c.startOffset),r.setEnd(c.endContainer,c.endOffset)):r=c,r}if(e&&l.tridentSel)return l.tridentSel.getRangeAt(0);try{(n=l.getSel())&&(r=n.rangeCount>0?n.getRangeAt(0):n.createRange?n.createRange():o.createRange())}catch(u){}if((s=l.editor.fire("GetSelectionRange",{range:r})).range!==r)return s.range;if(m&&r&&r.setStart&&o.selection){try{a=o.selection.createRange()}catch(u){}a&&a.item&&(i=a.item(0),(r=o.createRange()).setStartBefore(i),r.setEndAfter(i))}return r||(r=o.createRange?o.createRange():o.body.createTextRange()),r.setStart&&9===r.startContainer.nodeType&&r.collapsed&&(i=l.dom.getRoot(),r.setStart(i,0),r.setEnd(i,0)),l.selectedRange&&l.explicitRange&&(0===t(r.START_TO_START,r,l.selectedRange)&&0===t(r.END_TO_END,r,l.selectedRange)?r=l.explicitRange:(l.selectedRange=null,l.explicitRange=null)),r},setRng:function(e,t){var n,r,i=this;if(e)if(e.select){i.explicitRange=null;try{e.select()}catch(o){}}else if(i.tridentSel){if(e.cloneRange)try{i.tridentSel.addRange(e)}catch(o){}}else{if(n=i.getSel(),e=i.editor.fire("SetSelectionRange",{range:e}).range,n){i.explicitRange=e;try{n.removeAllRanges(),n.addRange(e)}catch(o){}!1===t&&n.extend&&(n.collapse(e.endContainer,e.endOffset),n.extend(e.startContainer,e.startOffset)),i.selectedRange=n.rangeCount>0?n.getRangeAt(0):null}e.collapsed||e.startContainer!=e.endContainer||!n.setBaseAndExtent||s.ie||e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()&&(r=e.startContainer.childNodes[e.startOffset])&&"IMG"==r.tagName&&(n.setBaseAndExtent(e.startContainer,e.startOffset,e.endContainer,e.endOffset),n.anchorNode!==e.startContainer&&n.setBaseAndExtent(r,0,r,1)),i.editor.fire("AfterSetSelectionRange",{range:e})}},setNode:function(e){var t=this;return t.setContent(t.dom.getOuterHTML(e)),e},getNode:function(){function e(e,t){for(var n=e;e&&3===e.nodeType&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n}var t,n,r,i,o,a=this,s=a.getRng(),l=a.dom.getRoot();return s?(n=s.startContainer,r=s.endContainer,i=s.startOffset,o=s.endOffset,s.setStart?(t=s.commonAncestorContainer,!s.collapsed&&(n==r&&o-i<2&&n.hasChildNodes()&&(t=n.childNodes[i]),3===n.nodeType&&3===r.nodeType&&(n=n.length===i?e(n.nextSibling,!0):n.parentNode,r=0===o?e(r.previousSibling,!1):r.parentNode,n&&n===r))?n:t&&3==t.nodeType?t.parentNode:t):((t=s.item?s.item(0):s.parentElement()).ownerDocument!==a.win.document&&(t=l),t)):l},getSelectedBlocks:function(t,n){var r,i,o=this,a=o.dom,s=[];if(i=a.getRoot(),t=a.getParent(t||o.getStart(),a.isBlock),n=a.getParent(n||o.getEnd(),a.isBlock),t&&t!=i&&s.push(t),t&&n&&t!=n){r=t;for(var l=new e(t,i);(r=l.next())&&r!=n;)a.isBlock(r)&&s.push(r)}return n&&t!=n&&n!=i&&s.push(n),s},isForward:function(){var e,t,n=this.dom,r=this.getSel();return!(r&&r.anchorNode&&r.focusNode)||((e=n.createRng()).setStart(r.anchorNode,r.anchorOffset),e.collapse(!0),(t=n.createRng()).setStart(r.focusNode,r.focusOffset),t.collapse(!0),e.compareBoundaryPoints(e.START_TO_START,t)<=0)},normalize:function(){var e=this,t=e.getRng();return s.range&&new i(e.dom).normalize(t)&&e.setRng(t,e.isForward()),t},selectorChanged:function(e,t){var n,r=this;return r.selectorChangedData||(r.selectorChangedData={},n={},r.editor.on("NodeChange",function(e){var t=e.element,i=r.dom,o=i.getParents(t,null,i.getRoot()),a={};d(r.selectorChangedData,function(e,t){d(o,function(r){if(i.is(r,t))return n[t]||(d(e,function(e){e(!0,{node:r,selector:t,parents:o})}),n[t]=e),a[t]=e,!1})}),d(n,function(e,r){a[r]||(delete n[r],d(e,function(e){e(!1,{node:t,selector:r,parents:o})}))})})),r.selectorChangedData[e]||(r.selectorChangedData[e]=[]),r.selectorChangedData[e].push(t),r},getScrollContainer:function(){for(var e,t=this.dom.getRoot();t&&"BODY"!=t.nodeName;){if(t.scrollHeight>t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e,t){function n(e){for(var t=0,n=0,r=e;r&&r.nodeType;)t+=r.offsetLeft||0,n+=r.offsetTop||0,r=r.offsetParent;return{x:t,y:n}}var r,i,o,s,l=this,c=l.dom,u=c.getRoot(),d=0;if(a.isElement(e)){if(!1===t&&(d=e.offsetHeight),"BODY"!=u.nodeName){var f=l.getScrollContainer();if(f)return r=n(e).y-n(f).y+d,s=f.clientHeight,void((r<(o=f.scrollTop)||r+25>o+s)&&(f.scrollTop=r<o?r:r-s+25))}i=c.getViewPort(l.editor.getWin()),r=c.getPos(e).y+d,o=i.y,s=i.h,(r<i.y||r+25>o+s)&&l.editor.getWin().scrollTo(0,r<o?r:r-s+25)}},placeCaretAt:function(e,t){this.setRng(i.getCaretRangeFromPoint(e,t,this.editor.getDoc()))},_moveEndPoint:function(t,n,r){var i=n,o=new e(n,i),a=this.dom.schema.getNonEmptyElements();do{if(3==n.nodeType&&0!==f(n.nodeValue).length)return void(r?t.setStart(n,0):t.setEnd(n,n.nodeValue.length));if(a[n.nodeName]&&!/^(TD|TH)$/.test(n.nodeName))return void(r?t.setStartBefore(n):"BR"==n.nodeName?t.setEndBefore(n):t.setEndAfter(n));if(s.ie&&s.ie<11&&this.dom.isBlock(n)&&this.dom.isEmpty(n))return void(r?t.setStart(n,0):t.setEnd(n,0))}while(n=r?o.next():o.prev());"BODY"==i.nodeName&&(r?t.setStart(i,0):t.setEnd(i,i.childNodes.length))},getBoundingClientRect:function(){var e=this.getRng();return e.collapsed?c.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:function(){this.win=null,this.controlSelection.destroy()}},u}),r("tinymce/dom/ElementUtils",["tinymce/dom/BookmarkManager","tinymce/util/Tools"],function(e,t){function n(t){this.compare=function(n,i){function o(e){var n={};return r(t.getAttribs(e),function(r){var i=r.nodeName.toLowerCase();0!==i.indexOf("_")&&"style"!==i&&0!==i.indexOf("data-")&&(n[i]=t.getAttrib(e,i))}),n}function a(e,t){var n,r;for(r in e)if(e.hasOwnProperty(r)){if(void 0===(n=t[r]))return!1;if(e[r]!=n)return!1;delete t[r]}for(r in t)if(t.hasOwnProperty(r))return!1;return!0}return n.nodeName==i.nodeName&&(!!a(o(n),o(i))&&(!!a(t.parseStyle(t.getAttrib(n,"style")),t.parseStyle(t.getAttrib(i,"style")))&&(!e.isBookmarkNode(n)&&!e.isBookmarkNode(i))))}}var r=t.each;return n}),r("tinymce/fmt/Preview",["tinymce/dom/DOMUtils","tinymce/util/Tools","tinymce/html/Schema"],function(e,t,n){function r(e,r){function i(e,t){t.classes.length&&c.addClass(e,t.classes.join(" ")),c.setAttribs(e,t.attrs)}function o(e){var t;return u="string"==typeof e?{name:e,classes:[],attrs:{}}:e,i(t=c.create(u.name),u),t}function a(e,n){var r="string"!=typeof e?e.nodeName.toLowerCase():e,i=f.getElementRule(r).parentsRequired;return!(!i||!i.length)&&(n&&-1!==t.inArray(i,n)?n:i[0])}function s(e,n,r){var i,l,u,d=n.length&&n[0],f=d&&d.name;if(u=a(e,f))f==u?(l=n[0],n=n.slice(1)):l=u;else if(d)l=n[0],n=n.slice(1);else if(!r)return e;return l&&(i=o(l)).appendChild(e),r&&(i||(i=c.create("div")).appendChild(e),t.each(r,function(t){var n=o(t);i.insertBefore(n,e)})),s(i,n,l&&l.siblings)}var l,u,d,f=r&&r.schema||new n({});return e&&e.length?(l=o(u=e[0]),(d=c.create("div")).appendChild(s(l,e.slice(1),u.siblings)),d):""}function i(e,t){return r(a(e),t)}function o(e){var n,r={classes:[],attrs:{}};return"*"!==(e=r.selector=t.trim(e))&&(n=e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,function(e,n,i,o,a){switch(n){case"#":r.attrs.id=i;break;case".":r.classes.push(i);break;case":":-1!==t.inArray("checked disabled enabled read-only required".split(" "),i)&&(r.attrs[i]=i)}if("["==o){var s=a.match(/([\w\-]+)(?:\=\"([^\"]+))?/);s&&(r.attrs[s[1]]=s[2])}return""})),r.name=n||"div",r}function a(e){return e&&"string"==typeof e?(e=(e=e.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),t.map(e.split(/(?:>|\s+(?![^\[\]]+\]))/),function(e){var n=t.map(e.split(/(?:~\+|~|\+)/),o),r=n.pop();return n.length&&(r.siblings=n),r}).reverse()):[]}function s(e,t){function n(e){return e.replace(/%(\w+)/g,"")}var i,o,s,u,d,f,m="";if(!1===(f=e.settings.preview_styles))return"";if("string"!=typeof f&&(f="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"),"string"==typeof t){if(!(t=e.formatter.get(t)))return;t=t[0]}return"preview"in t&&!1===(f=t.preview)?"":(i=t.block||t.inline||"span",(u=a(t.selector)).length?(u[0].name||(u[0].name=i),i=t.selector,o=r(u,e)):o=r([i],e),s=c.select(i,o)[0]||o.firstChild,l(t.styles,function(e,t){(e=n(e))&&c.setStyle(s,t,e)}),l(t.attributes,function(e,t){(e=n(e))&&c.setAttrib(s,t,e)}),l(t.classes,function(e){e=n(e),c.hasClass(s,e)||c.addClass(s,e)}),e.fire("PreviewFormats"),c.setStyles(o,{position:"absolute",left:-65535}),e.getBody().appendChild(o),d=c.getStyle(e.getBody(),"fontSize",!0),d=/px$/.test(d)?parseInt(d,10):0,l(f.split(" "),function(t){var n=c.getStyle(s,t,!0);if(!("background-color"==t&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)&&(n=c.getStyle(e.getBody(),t,!0),"#ffffff"==c.toHex(n).toLowerCase())||"color"==t&&"#000000"==c.toHex(n).toLowerCase())){if("font-size"==t&&/em|%$/.test(n)){if(0===d)return;n=(n=parseFloat(n,10)/(/%$/.test(n)?100:1))*d+"px"}"border"==t&&n&&(m+="padding:0 2px;"),m+=t+":"+n+";"}}),e.fire("AfterPreviewFormats"),c.remove(o),m)}var l=t.each,c=e.DOM;return{getCssText:s,parseSelector:a,selectorToHtml:i}}),r("tinymce/fmt/Hooks",["tinymce/util/Arr","tinymce/dom/NodeType","tinymce/dom/DomQuery"],function(e,t,n){function r(e,t){var n=o[e];n||(o[e]=n=[]),o[e].push(t)}function i(e,t){s(o[e],function(e){e(t)})}var o={},a=e.filter,s=e.each;return r("pre",function(r){function i(t){return l(t.previousSibling)&&-1!=e.indexOf(c,t.previousSibling)}function o(e,t){n(t).remove(),n(e).append("<br><br>").append(t.childNodes)}var l,c,u=r.selection.getRng();l=t.matchNodeNames("pre"),u.collapsed||(c=r.selection.getSelectedBlocks(),s(a(a(c,l),i),function(e){o(e.previousSibling,e)}))}),{postProcess:i}}),r("tinymce/Formatter",["tinymce/dom/TreeWalker","tinymce/dom/RangeUtils","tinymce/dom/BookmarkManager","tinymce/dom/ElementUtils","tinymce/util/Fun","tinymce/util/Tools","tinymce/fmt/Preview","tinymce/fmt/Hooks"],function(e,t,n,r,i,o,a,s){return function(l){function c(e){return e.nodeType&&(e=e.nodeName),!!l.schema.getTextBlockElements()[e.toLowerCase()]}function u(e){return/^(TH|TD)$/.test(e.nodeName)}function d(e){return e&&/^(IMG)$/.test(e.nodeName)}function f(e,t){return ne.getParents(e,t,ne.getRoot())}function m(e){return 1===e.nodeType&&"_mce_caret"===e.id}function h(){v({valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:!1,classes:"align-left",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},inherit:!1,preview:!1,defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"left"},preview:"font-family font-size"}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},inherit:!1,preview:!1,defaultBlock:"div"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"},preview:"font-family font-size"}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"right"},preview:"font-family font-size"}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},inherit:!1,defaultBlock:"div",preview:"font-family font-size"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(){return!0},onformat:function(e,t,n){pe(n,function(t,n){ne.setAttrib(e,n,t)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]}),pe("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/),function(e){v(e,{block:e,remove:"all"})}),v(l.settings.formats)}function p(){l.addShortcut("meta+b","bold_desc","Bold"),l.addShortcut("meta+i","italic_desc","Italic"),l.addShortcut("meta+u","underline_desc","Underline");for(var e=1;e<=6;e++)l.addShortcut("access+"+e,"",["FormatBlock",!1,"h"+e]);l.addShortcut("access+7","",["FormatBlock",!1,"p"]),l.addShortcut("access+8","",["FormatBlock",!1,"div"]),l.addShortcut("access+9","",["FormatBlock",!1,"address"])}function g(e){return e?te[e]:te}function v(e,t){e&&("string"!=typeof e?pe(e,function(e,t){v(t,e)}):(t=t.length?t:[t],pe(t,function(e){e.deep===Q&&(e.deep=!e.selector),e.split===Q&&(e.split=!e.selector||e.inline),e.remove===Q&&e.selector&&!e.inline&&(e.remove="none"),e.selector&&e.inline&&(e.mixed=!0,e.block_expand=!0),"string"==typeof e.classes&&(e.classes=e.classes.split(/\s+/))}),te[e]=t))}function y(e){return e&&te[e]&&delete te[e],te}function b(e,t){var n=g(t);if(n)for(var r=0;r<n.length;r++)if(!1===n[r].inherit&&ne.is(e,n[r].selector))return!0;return!1}function C(e){var t;return l.dom.getParent(e,function(e){return(t=l.dom.getStyle(e,"text-decoration"))&&"none"!==t}),t}function x(e){var t;1===e.nodeType&&e.parentNode&&1===e.parentNode.nodeType&&(t=C(e.parentNode),l.dom.getStyle(e,"color")&&t?l.dom.setStyle(e,"text-decoration",t):l.dom.getStyle(e,"text-decoration")===t&&l.dom.setStyle(e,"text-decoration",null))}function w(t,n,r){function i(e,t){if(t=t||p,e){if(t.onformat&&t.onformat(e,t,n,r),pe(t.styles,function(t,r){ne.setStyle(e,r,F(t,n))}),t.styles){var i=ne.getAttrib(e,"style");i&&e.setAttribute("data-mce-style",i)}pe(t.attributes,function(t,r){ne.setAttrib(e,r,F(t,n))}),pe(t.classes,function(t){t=F(t,n),ne.hasClass(e,t)||ne.addClass(e,t)})}}function o(e,t){var n=!1;return!!p.selector&&(pe(e,function(e){if(!("collapsed"in e&&e.collapsed!==v))return ne.is(t,e.selector)&&!m(t)?(i(t,e),n=!0,!1):void 0}),n)}function a(){function t(t,n){var i=new e(n);for(r=i.prev2();r;r=i.prev2()){if(3==r.nodeType&&r.data.length>0)return r;if(r.childNodes.length>1||r==t||"BR"==r.tagName)return r}}var n=l.selection.getRng(),i=n.startContainer,o=n.endContainer;if(i!=o&&0===n.endOffset){var a=t(i,o),s=3==a.nodeType?a.data.length:a.childNodes.length;n.setEnd(a,s)}return n}function u(e,r,a){var s,l,u=[],d=!0;s=p.inline||p.block,i(l=ne.create(s)),ie.walk(e,function(e){function r(e){var g,v,y,b;if(b=d,g=e.nodeName.toLowerCase(),v=e.parentNode.nodeName.toLowerCase(),1===e.nodeType&&me(e)&&(b=d,d="true"===me(e),y=!0),D(g,"br"))return f=0,void(p.block&&ne.remove(e));if(p.wrapper&&S(e,t,n))f=0;else{if(d&&!y&&p.block&&!p.wrapper&&c(g)&&oe(v,s))return i(e=ne.rename(e,s)),u.push(e),void(f=0);if(p.selector){var C=o(h,e);if(!p.inline||C)return void(f=0)}!d||y||!oe(s,g)||!oe(v,s)||!a&&3===e.nodeType&&1===e.nodeValue.length&&65279===e.nodeValue.charCodeAt(0)||m(e)||p.inline&&ae(e)?(f=0,pe(ge(e.childNodes),r),y&&(d=b),f=0):(f||(f=ne.clone(l,de),e.parentNode.insertBefore(f,e),u.push(f)),f.appendChild(e))}}var f;pe(e,r)}),!0===p.links&&pe(u,function(e){function t(e){"A"===e.nodeName&&i(e,p),pe(ge(e.childNodes),t)}t(e)}),pe(u,function(e){function r(e){var t=0;return pe(e.childNodes,function(e){U(e)||he(e)||t++}),t}function o(e){var t=!1;return pe(e.childNodes,function(e){if(L(e))return t=e,!1}),t}function a(e,t){do{if(1!==r(e))break;if(!(e=o(e)))break;if(t(e))return e}while(e);return null}function s(e){var t,n;return(t=o(e))&&!he(t)&&B(t,p)&&(i(n=ne.clone(t,de)),ne.replace(n,e,fe),ne.remove(t,1)),n||e}var l;if(l=r(e),!(u.length>1)&&ae(e)||0!==l){if(!ae(e)&&!H(e,"fontSize")){var c=a(e,P("fontSize"));c&&w("fontsize",{value:H(c,"fontSize")},e)}(p.inline||p.wrapper)&&(p.exact||1!==l||(e=s(e)),pe(h,function(t){pe(ne.select(t.inline,e),function(e){he(e)||$(t,n,e,t.exact?e:null)})}),S(e.parentNode,t,n)&&$(p,n,e)&&(e=0),p.merge_with_parents&&ne.getParent(e.parentNode,function(r){if(S(r,t,n))return $(p,n,e)&&(e=0),fe}),e&&!1!==p.merge_siblings&&(e=Y(e=Y(j(e),e),j(e,fe))))}else ne.remove(e,1)})}var d,f,h=g(t),p=h[0],v=!r&&re.isCollapsed();if("false"!==me(re.getNode())){if(p){if(r)r.nodeType?o(h,r)||((f=ne.createRng()).setStartBefore(r),f.setEndAfter(r),
u(W(f,h),null,!0)):u(r,null,!0);else if(v&&p.inline&&!ne.select("td[data-mce-selected],th[data-mce-selected]").length)K("apply",t,n);else{var y=l.selection.getNode();se||!h[0].defaultBlock||ne.getParent(y,ne.isBlock)||w(h[0].defaultBlock),l.selection.setRng(a()),d=re.getBookmark(),u(W(re.getRng(fe),h),d),p.styles&&((p.styles.color||p.styles.textDecoration)&&(ve(y,x,"childNodes"),x(y)),p.styles.backgroundColor&&M(y,P("fontSize"),O("backgroundColor",F(p.styles.backgroundColor,n)))),re.moveToBookmark(d),G(re.getRng(fe)),l.nodeChanged()}s.postProcess(t,l)}}else{r=re.getNode();for(var b=0,C=h.length;b<C;b++)if(h[b].ceFalseOverride&&ne.is(r,h[b].selector))return void i(r,h[b])}}function E(e,t,n,r){function i(e){var n,r,o,a,s;if(1===e.nodeType&&me(e)&&(a=y,y="true"===me(e),s=!0),n=ge(e.childNodes),y&&!s)for(r=0,o=p.length;r<o&&!$(p[r],t,e,e);r++);if(v.deep&&n.length){for(r=0,o=n.length;r<o;r++)i(n[r]);s&&(y=a)}}function o(n){var i;return pe(f(n.parentNode).reverse(),function(n){var o;i||"_start"==n.id||"_end"==n.id||(o=S(n,e,t,r))&&!1!==o.split&&(i=n)}),i}function a(e,n,r,i){var o,a,s,l,c,u;if(e){for(u=e.parentNode,o=n.parentNode;o&&o!=u;o=o.parentNode){for(a=ne.clone(o,de),c=0;c<p.length;c++)if($(p[c],t,a,a)){a=0;break}a&&(s&&a.appendChild(s),l||(l=a),s=a)}!i||v.mixed&&ae(e)||(n=ne.split(e,n)),s&&(r.parentNode.insertBefore(s,r),l.appendChild(r))}return n}function s(e){return a(o(e),e,e,!0)}function c(e){var t=ne.get(e?"_start":"_end"),n=t[e?"firstChild":"lastChild"];return he(n)&&(n=n[e?"firstChild":"lastChild"]),3==n.nodeType&&0===n.data.length&&(n=e?t.previousSibling||t.nextSibling:t.nextSibling||t.previousSibling),ne.remove(t,!0),n}function d(e){var t,n,r=e.commonAncestorContainer;if(e=W(e,p,fe),v.split){if((t=X(e,fe))!=(n=X(e))){if(/^(TR|TH|TD)$/.test(t.nodeName)&&t.firstChild&&(t="TR"==t.nodeName?t.firstChild.firstChild||t:t.firstChild||t),r&&/^T(HEAD|BODY|FOOT|R)$/.test(r.nodeName)&&u(n)&&n.firstChild&&(n=n.firstChild||n),ne.isChildOf(t,n)&&!ae(n)&&!u(t)&&!u(n))return s(t=z(t,"span",{id:"_start","data-mce-type":"bookmark"})),void(t=c(fe));t=z(t,"span",{id:"_start","data-mce-type":"bookmark"}),n=z(n,"span",{id:"_end","data-mce-type":"bookmark"}),s(t),s(n),t=c(fe),n=c()}else t=n=s(t);e.startContainer=t.parentNode?t.parentNode:t,e.startOffset=le(t),e.endContainer=n.parentNode?n.parentNode:n,e.endOffset=le(n)+1}ie.walk(e,function(e){pe(e,function(e){i(e),1===e.nodeType&&"underline"===l.dom.getStyle(e,"text-decoration")&&e.parentNode&&"underline"===C(e.parentNode)&&$({deep:!1,exact:!0,inline:"span",styles:{textDecoration:"underline"}},null,e)})})}var m,h,p=g(e),v=p[0],y=!0;if(n)n.nodeType?((h=ne.createRng()).setStartBefore(n),h.setEndAfter(n),d(h)):d(n);else if("false"!==me(re.getNode()))re.isCollapsed()&&v.inline&&!ne.select("td[data-mce-selected],th[data-mce-selected]").length?K("remove",e,t,r):(m=re.getBookmark(),d(re.getRng(fe)),re.moveToBookmark(m),v.inline&&_(e,t,re.getStart())&&G(re.getRng(!0)),l.nodeChanged());else{n=re.getNode();for(var b=0,x=p.length;b<x&&(!p[b].ceFalseOverride||!$(p[b],t,n,n));b++);}}function N(e,t,n){var r=g(e);!_(e,t,n)||"toggle"in r[0]&&!r[0].toggle?w(e,t,n):E(e,t,n)}function S(e,t,n,r){function i(e,t,i){var o,a,s,l=t[i];if(t.onmatch)return t.onmatch(e,t,i);if(l)if(l.length===Q){for(o in l)if(l.hasOwnProperty(o)){if(a="attributes"===i?ne.getAttrib(e,o):H(e,o),r&&!a&&!t.exact)return;if((!r||t.exact)&&!D(a,I(F(l[o],n),o)))return}}else for(s=0;s<l.length;s++)if("attributes"===i?ne.getAttrib(e,l[s]):H(e,l[s]))return t;return t}var o,a,s,l=g(t);if(l&&e)for(a=0;a<l.length;a++)if(B(e,o=l[a])&&i(e,o,"attributes")&&i(e,o,"styles")){if(s=o.classes)for(a=0;a<s.length;a++)if(!ne.hasClass(e,s[a]))return;return o}}function _(e,t,n){function r(n){var r=ne.getRoot();return n!==r&&S(n=ne.getParent(n,function(n){return!!b(n,e)||(n.parentNode===r||!!S(n,e,t,!0))}),e,t)}var i;return n?r(n):r(n=re.getNode())?fe:(i=re.getStart())!=n&&r(i)?fe:de}function k(e,t){var n,r=[],i={};return n=re.getStart(),ne.getParent(n,function(n){var o,a;for(o=0;o<e.length;o++)a=e[o],!i[a]&&S(n,a,t)&&(i[a]=!0,r.push(a))},ne.getRoot()),r}function T(e){var t,n,r,i,o=g(e);if(o)for(t=f(re.getStart()),r=o.length-1;r>=0;r--){if(!(i=o[r].selector)||o[r].defaultBlock)return fe;for(n=t.length-1;n>=0;n--)if(ne.is(t[n],i))return fe}return de}function R(e,t,n){var r;return J||(J={},r={},l.on("NodeChange",function(e){var t=f(e.element),n={};t=o.grep(t,function(e){return 1==e.nodeType&&!e.getAttribute("data-mce-bogus")}),pe(J,function(e,i){pe(t,function(o){return S(o,i,{},e.similar)?(r[i]||(pe(e,function(e){e(!0,{node:o,format:i,parents:t})}),r[i]=e),n[i]=e,!1):!b(o,i)&&void 0})}),pe(r,function(i,o){n[o]||(delete r[o],pe(i,function(n){n(!1,{node:e.element,format:o,parents:t})}))})})),pe(e.split(","),function(e){J[e]||(J[e]=[],J[e].similar=n),J[e].push(t)}),this}function A(e){return a.getCssText(l,e)}function B(e,t){return D(e,t.inline)?fe:D(e,t.block)?fe:t.selector?1==e.nodeType&&ne.is(e,t.selector):void 0}function D(e,t){return t=t||"",e=""+((e=e||"").nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()==t.toLowerCase()}function M(e,t,n){pe(e.childNodes,function(e){L(e)&&(t(e)&&n(e),e.hasChildNodes()&&M(e,t,n))})}function L(e){return 1==e.nodeType&&!he(e)&&!U(e)&&!m(e)}function P(e){return i.curry(function(e,t){return!(!t||!H(t,e))},e)}function O(e,t){return i.curry(function(e,t,n){ne.setStyle(n,e,t)},e,t)}function H(e,t){return I(ne.getStyle(e,t),t)}function I(e,t){return"color"!=t&&"backgroundColor"!=t||(e=ne.toHex(e)),"fontWeight"==t&&700==e&&(e="bold"),"fontFamily"==t&&(e=e.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+e}function F(e,t){return"string"!=typeof e?e=e(t):t&&(e=e.replace(/%(\w+)/g,function(e,n){return t[n]||e})),e}function U(e){return e&&3===e.nodeType&&/^([\t \r\n]+|)$/.test(e.nodeValue)}function z(e,t,n){var r=ne.create(t,n);return e.parentNode.insertBefore(r,e),r.appendChild(e),r}function W(t,n,r){function i(e){function t(e){return"BR"==e.nodeName&&e.getAttribute("data-mce-bogus")&&!e.nextSibling}var r,i,o,a,s;if(r=i=e?g:y,a=e?"previousSibling":"nextSibling",s=ne.getRoot(),3==r.nodeType&&!U(r)&&(e?v>0:b<r.nodeValue.length))return r;for(;;){if(!n[0].block_expand&&ae(i))return i;for(o=i[a];o;o=o[a])if(!he(o)&&!U(o)&&!t(o))return i;if(i==s||i.parentNode==s){r=i;break}i=i.parentNode}return r}function o(e,t){for(t===Q&&(t=3===e.nodeType?e.length:e.childNodes.length);e&&e.hasChildNodes();)(e=e.childNodes[t])&&(t=3===e.nodeType?e.length:e.childNodes.length);return{node:e,offset:t}}function a(e){for(var t=e;t;){if(1===t.nodeType&&me(t))return"false"===me(t)?t:e;t=t.parentNode}return e}function s(t,n,i){function o(e,t){var n,o,a=e.nodeValue;return void 0===t&&(t=i?a.length:0),i?-1===(n=(n=a.lastIndexOf(" ",t))>(o=a.lastIndexOf("\xa0",t))?n:o)||r||n++:(n=a.indexOf(" ",t),o=a.indexOf("\xa0",t),n=-1!==n&&(-1===o||n<o)?n:o),n}var a,s,c,u;if(3===t.nodeType){if(-1!==(c=o(t,n)))return{container:t,offset:c};u=t}for(a=new e(t,ne.getParent(t,ae)||l.getBody());s=a[i?"prev":"next"]();)if(3===s.nodeType){if(u=s,-1!==(c=o(s)))return{container:s,offset:c}}else if(ae(s))break;if(u)return{container:u,offset:n=i?0:u.length}}function u(e,r){var i,o,a,s;for(3==e.nodeType&&0===e.nodeValue.length&&e[r]&&(e=e[r]),i=f(e),o=0;o<i.length;o++)for(a=0;a<n.length;a++)if(!("collapsed"in(s=n[a])&&s.collapsed!==t.collapsed)&&ne.is(i[o],s.selector))return i[o];return e}function d(e,t){var r,i=ne.getRoot();if(n[0].wrapper||(r=ne.getParent(e,n[0].block,i)),r||(r=ne.getParent(3==e.nodeType?e.parentNode:e,function(e){return e!=i&&c(e)})),r&&n[0].wrapper&&(r=f(r,"ul,ol").reverse()[0]||r),!r)for(r=e;r[t]&&!ae(r[t])&&!D(r=r[t],"br"););return r||e}var m,h,p,g=t.startContainer,v=t.startOffset,y=t.endContainer,b=t.endOffset;if(1==g.nodeType&&g.hasChildNodes()&&(m=g.childNodes.length-1,3==(g=g.childNodes[v>m?m:v]).nodeType&&(v=0)),1==y.nodeType&&y.hasChildNodes()&&(m=y.childNodes.length-1,3==(y=y.childNodes[b>m?m:b-1]).nodeType&&(b=y.nodeValue.length)),g=a(g),y=a(y),(he(g.parentNode)||he(g))&&3==(g=(g=he(g)?g:g.parentNode).nextSibling||g).nodeType&&(v=0),(he(y.parentNode)||he(y))&&3==(y=(y=he(y)?y:y.parentNode).previousSibling||y).nodeType&&(b=y.length),n[0].inline&&(t.collapsed&&((p=s(g,v,!0))&&(g=p.container,v=p.offset),(p=s(y,b))&&(y=p.container,b=p.offset)),(h=o(y,b)).node)){for(;h.node&&0===h.offset&&h.node.previousSibling;)h=o(h.node.previousSibling);h.node&&h.offset>0&&3===h.node.nodeType&&" "===h.node.nodeValue.charAt(h.offset-1)&&h.offset>1&&(y=h.node).splitText(h.offset-1)}return(n[0].inline||n[0].block_expand)&&(n[0].inline&&3==g.nodeType&&0!==v||(g=i(!0)),n[0].inline&&3==y.nodeType&&b!==y.nodeValue.length||(y=i())),n[0].selector&&n[0].expand!==de&&!n[0].inline&&(g=u(g,"previousSibling"),y=u(y,"nextSibling")),(n[0].block||n[0].selector)&&(g=d(g,"previousSibling"),y=d(y,"nextSibling"),n[0].block&&(ae(g)||(g=i(!0)),ae(y)||(y=i()))),1==g.nodeType&&(v=le(g),g=g.parentNode),1==y.nodeType&&(b=le(y)+1,y=y.parentNode),{startContainer:g,startOffset:v,endContainer:y,endOffset:b}}function V(e,t){return t.links&&"A"==e.tagName}function $(e,t,n,r){var i,o,a;if(!B(n,e)&&!V(n,e))return de;if("all"!=e.remove)for(pe(e.styles,function(i,o){i=I(F(i,t),o),"number"==typeof o&&(o=i,r=0),(e.remove_similar||!r||D(H(r,o),i))&&ne.setStyle(n,o,""),a=1}),a&&""===ne.getAttrib(n,"style")&&(n.removeAttribute("style"),n.removeAttribute("data-mce-style")),pe(e.attributes,function(e,i){var o;if(e=F(e,t),"number"==typeof i&&(i=e,r=0),!r||D(ne.getAttrib(r,i),e)){if("class"==i&&(e=ne.getAttrib(n,i))&&(o="",pe(e.split(/\s+/),function(e){/mce\-\w+/.test(e)&&(o+=(o?" ":"")+e)}),o))return void ne.setAttrib(n,i,o);"class"==i&&n.removeAttribute("className"),ue.test(i)&&n.removeAttribute("data-mce-"+i),n.removeAttribute(i)}}),pe(e.classes,function(e){e=F(e,t),r&&!ne.hasClass(r,e)||ne.removeClass(n,e)}),o=ne.getAttribs(n),i=0;i<o.length;i++){var s=o[i].nodeName;if(0!==s.indexOf("_")&&0!==s.indexOf("data-"))return de}return"none"!=e.remove?(q(n,e),fe):void 0}function q(e,t){function n(e,t,n){return!(e=j(e,t,n))||"BR"==e.nodeName||ae(e)}var r,i=e.parentNode;t.block&&(se?i==ne.getRoot()&&(t.list_block&&D(e,t.list_block)||pe(ge(e.childNodes),function(e){oe(se,e.nodeName.toLowerCase())?r?r.appendChild(e):(r=z(e,se),ne.setAttribs(r,l.settings.forced_root_block_attrs)):r=0})):ae(e)&&!ae(i)&&(n(e,de)||n(e.firstChild,fe,1)||e.insertBefore(ne.create("br"),e.firstChild),n(e,fe)||n(e.lastChild,de,1)||e.appendChild(ne.create("br")))),t.selector&&t.inline&&!D(t.inline,e)||ne.remove(e,1)}function j(e,t,n){if(e)for(t=t?"nextSibling":"previousSibling",e=n?e:e[t];e;e=e[t])if(1==e.nodeType||!U(e))return e}function Y(e,t){function n(e,t){for(i=e;i;i=i[t]){if(3==i.nodeType&&0!==i.nodeValue.length)return e;if(1==i.nodeType&&!he(i))return i}return e}var i,o,a=new r(ne);if(e&&t&&(e=n(e,"previousSibling"),t=n(t,"nextSibling"),a.compare(e,t))){for(i=e.nextSibling;i&&i!=t;)o=i,i=i.nextSibling,e.appendChild(o);return ne.remove(t),pe(ge(t.childNodes),function(t){e.appendChild(t)}),e}return t}function X(t,n){var r,i,o;return r=t[n?"startContainer":"endContainer"],i=t[n?"startOffset":"endOffset"],1==r.nodeType&&(o=r.childNodes.length-1,!n&&i&&i--,r=r.childNodes[i>o?o:i]),3===r.nodeType&&n&&i>=r.nodeValue.length&&(r=new e(r,l.getBody()).next()||r),3!==r.nodeType||n||0!==i||(r=new e(r,l.getBody()).prev()||r),r}function K(t,n,r,i){function o(e){var t=ne.create("span",{id:p,"data-mce-bogus":!0,style:v?"color:red":""});return e&&t.appendChild(l.getDoc().createTextNode(ce)),t}function a(e,t){for(;e;){if(3===e.nodeType&&e.nodeValue!==ce||e.childNodes.length>1)return!1;t&&1===e.nodeType&&t.push(e),e=e.firstChild}return!0}function s(e){for(;e;){if(e.id===p)return e;e=e.parentNode}}function u(t){var n;if(t)for(t=(n=new e(t,t)).current();t;t=n.next())if(3===t.nodeType)return t}function d(e,t){var n,r;if(e)r=re.getRng(!0),a(e)?(!1!==t&&(r.setStartBefore(e),r.setEndBefore(e)),ne.remove(e)):((n=u(e)).nodeValue.charAt(0)===ce&&(n.deleteData(0,1),r.startContainer==n&&r.startOffset>0&&r.setStart(n,r.startOffset-1),r.endContainer==n&&r.endOffset>0&&r.setEnd(n,r.endOffset-1)),ne.remove(e,1)),re.setRng(r);else if(!(e=s(re.getStart())))for(;e=ne.get(p);)d(e,!1)}function f(){var e,t,i,a,l,c;a=(e=re.getRng(!0)).startOffset,c=e.startContainer.nodeValue,(t=s(re.getStart()))&&(i=u(t));var d=/[^\s\u00a0\u00ad\u200b\ufeff]/;c&&a>0&&a<c.length&&d.test(c.charAt(a))&&d.test(c.charAt(a-1))?(l=re.getBookmark(),e.collapse(!0),e=W(e,g(n)),e=ie.split(e),w(n,r,e),re.moveToBookmark(l)):(t&&i.nodeValue===ce?w(n,r,t):(i=(t=o(!0)).firstChild,e.insertNode(t),a=1,w(n,r,t)),re.setCursorLocation(i,a))}function m(){var e,t,a,s,l,u,d,f,m=re.getRng(!0),h=[];for(e=m.startContainer,t=m.startOffset,l=e,3==e.nodeType&&(t!=e.nodeValue.length&&(s=!0),l=l.parentNode);l;){if(S(l,n,r,i)){u=l;break}l.nextSibling&&(s=!0),h.push(l),l=l.parentNode}if(u)if(s)a=re.getBookmark(),m.collapse(!0),m=W(m,g(n),!0),m=ie.split(m),E(n,r,m),re.moveToBookmark(a);else{for(l=f=o(),d=h.length-1;d>=0;d--)l.appendChild(ne.clone(h[d],!1)),l=l.firstChild;l.appendChild(ne.doc.createTextNode(ce)),l=l.firstChild;var p=ne.getParent(u,c);p&&ne.isEmpty(p)?u.parentNode.replaceChild(f,u):ne.insertAfter(f,u),re.setCursorLocation(l,1),ne.isEmpty(u)&&ne.remove(u)}}function h(){var e;(e=s(re.getStart()))&&!ne.isEmpty(e)&&ve(e,function(e){1!=e.nodeType||e.id===p||ne.isEmpty(e)||ne.setAttrib(e,"data-mce-bogus",null)},"childNodes")}var p="_mce_caret",v=l.settings.caret_debug;l._hasCaretEvents||(ee=function(){var e,t=[];if(a(s(re.getStart()),t))for(e=t.length;e--;)ne.setAttrib(t[e],"data-mce-bogus","1")},Z=function(e){var t=e.keyCode;d(),8==t&&re.isCollapsed()&&re.getStart().innerHTML==ce&&d(s(re.getStart())),37!=t&&39!=t||d(s(re.getStart())),h()},l.on("SetContent",function(e){e.selection&&h()}),l._hasCaretEvents=!0),"apply"==t?f():m()}function G(t){var n,r,i,o,a,s=t.startContainer,l=t.startOffset;if((t.startContainer!=t.endContainer||!d(t.startContainer.childNodes[t.startOffset]))&&(3==s.nodeType&&l>=s.nodeValue.length&&(l=le(s),s=s.parentNode,n=!0),1==s.nodeType))for(s=(o=s.childNodes)[Math.min(l,o.length-1)],r=new e(s,ne.getParent(s,ne.isBlock)),(l>o.length-1||n)&&r.next(),i=r.current();i;i=r.next())if(3==i.nodeType&&!U(i))return a=ne.create("a",{"data-mce-bogus":"all"},ce),i.parentNode.insertBefore(a,i),t.setStart(i,0),re.setRng(t),void ne.remove(a)}var J,Q,Z,ee,te={},ne=l.dom,re=l.selection,ie=new t(ne),oe=l.schema.isValidChild,ae=ne.isBlock,se=l.settings.forced_root_block,le=ne.nodeIndex,ce="\ufeff",ue=/^(src|href|style)$/,de=!1,fe=!0,me=ne.getContentEditable,he=n.isBookmarkNode,pe=o.each,ge=o.grep,ve=o.walk;(0,o.extend)(this,{get:g,register:v,unregister:y,apply:w,remove:E,toggle:N,match:_,matchAll:k,matchNode:S,canApply:T,formatChanged:R,getCssText:A}),h(),p(),l.on("BeforeGetContent",function(e){ee&&"raw"!=e.format&&ee()}),l.on("mouseup keydown",function(e){Z&&Z(e)})}}),r("tinymce/undo/Diff",[],function(){var e=0,t=1,n=2;return{KEEP:e,DELETE:n,INSERT:t,diff:function(r,i){var o=r.length+i.length+2,a=new Array(o),s=new Array(o),l=function(e,t,n){return{start:e,end:t,diag:n}},c=function(o,a,s,l,u){var f=d(o,a,s,l);if(null===f||f.start===a&&f.diag===a-l||f.end===o&&f.diag===o-s)for(var m=o,h=s;m<a||h<l;)m<a&&h<l&&r[m]===i[h]?(u.push([e,r[m]]),++m,++h):a-o>l-s?(u.push([n,r[m]]),++m):(u.push([t,i[h]]),++h);else{c(o,f.start,s,f.start-f.diag,u);for(var p=f.start;p<f.end;++p)u.push([e,r[p]]);c(f.end,a,f.end-f.diag,l,u)}},u=function(e,t,n,o){for(var a=e;a-t<o&&a<n&&r[a]===i[a-t];)++a;return l(e,a,t)},d=function(e,t,n,o){var l=t-e,c=o-n;if(0===l||0===c)return null;var d=l-c,f=c+l,m=(f%2==0?f:f+1)/2;a[1+m]=e,s[1+m]=t+1;for(var h=0;h<=m;++h){for(var p=-h;p<=h;p+=2){var g=p+m;p===-h||p!=h&&a[g-1]<a[g+1]?a[g]=a[g+1]:a[g]=a[g-1]+1;for(var v=a[g],y=v-e+n-p;v<t&&y<o&&r[v]===i[y];)a[g]=++v,++y;if(d%2!=0&&d-h<=p&&p<=d+h&&s[g-d]<=a[g])return u(s[g-d],p+e-n,t,o)}for(p=d-h;p<=d+h;p+=2){for(g=p+m-d,p===d-h||p!=d+h&&s[g+1]<=s[g-1]?s[g]=s[g+1]-1:s[g]=s[g-1],y=(v=s[g]-1)-e+n-p;v>=e&&y>=n&&r[v]===i[y];)s[g]=v--,y--;if(d%2==0&&-h<=p&&p<=h&&s[g]<=a[g+d])return u(s[g],p+e-n,t,o)}}},f=[];return c(0,r.length,0,i.length,f),f}}}),r("tinymce/undo/Fragments",["tinymce/util/Arr","tinymce/html/Entities","tinymce/undo/Diff"],function(e,t,n){var r=function(e){return 1===e.nodeType?e.outerHTML:3===e.nodeType?t.encodeRaw(e.data,!1):8===e.nodeType?"<!--"+e.data+"-->":""},i=function(e){var t,n,r;for(r=document.createElement("div"),t=document.createDocumentFragment(),e&&(r.innerHTML=e);n=r.firstChild;)t.appendChild(n);return t},o=function(e,t,n){var r=i(t);if(e.hasChildNodes()&&n<e.childNodes.length){var o=e.childNodes[n];o.parentNode.insertBefore(r,o)}else e.appendChild(r)},a=function(e,t){if(e.hasChildNodes()&&t<e.childNodes.length){var n=e.childNodes[t];n.parentNode.removeChild(n)}},s=function(t,r){var i=0;e.each(t,function(e){e[0]===n.KEEP?i++:e[0]===n.INSERT?(o(r,e[1],i),i++):e[0]===n.DELETE&&a(r,i)})};return{read:function(t){return e.map(t.childNodes,r)},write:function(t,i){var o=e.map(i.childNodes,r);return s(n.diff(o,t),i),i}}}),r("tinymce/undo/Levels",["tinymce/util/Arr","tinymce/undo/Fragments"],function(e,t){var n=function(e){return-1!==e.indexOf("</iframe>")},r=function(e){return{type:"fragmented",fragments:e,content:"",bookmark:null,beforeBookmark:null}},i=function(e){return{type:"complete",fragments:null,content:e,bookmark:null,beforeBookmark:null}},o=function(e){return"fragmented"===e.type?e.fragments.join(""):e.content};return{createFragmentedLevel:r,createCompleteLevel:i,createFromEditor:function(o){var a,s,l;return a=t.read(o.getBody()),s=(l=e.map(a,function(e){return o.serializer.trimContent(e)})).join(""),n(s)?r(l):i(s)},applyToEditor:function(e,n,r){"fragmented"===n.type?t.write(n.fragments,e.getBody()):e.setContent(n.content,{format:"raw"}),e.selection.moveToBookmark(r?n.beforeBookmark:n.bookmark)},isEq:function(e,t){return o(e)===o(t)}}}),r("tinymce/UndoManager",["tinymce/util/VK","tinymce/util/Tools","tinymce/undo/Levels"],function(e,t,n){return function(e){function r(t){e.setDirty(t)}function i(e){l.typing=!1,l.add({},e)}function o(){l.typing&&(l.typing=!1,l.add())}var a,s,l=this,c=0,u=[],d=0;return e.on("init",function(){l.add()}),e.on("BeforeExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&(o(),l.beforeChange())}),e.on("ExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&i(e)}),e.on("ObjectResizeStart Cut",function(){l.beforeChange()}),e.on("SaveContent ObjectResized blur",i),e.on("DragEnd",i),e.on("KeyUp",function(t){var o=t.keyCode;t.isDefaultPrevented()||((o>=33&&o<=36||o>=37&&o<=40||45===o||t.ctrlKey)&&(i(),e.nodeChanged()),46!==o&&8!==o||e.nodeChanged(),s&&l.typing&&(e.isDirty()||(r(u[0]&&!n.isEq(n.createFromEditor(e),u[0])),e.isDirty()&&e.fire("change",{level:u[0],lastLevel:null})),e.fire("TypingUndo"),s=!1,e.nodeChanged()))}),e.on("KeyDown",function(e){var t=e.keyCode;if(!e.isDefaultPrevented())if(t>=33&&t<=36||t>=37&&t<=40||45===t)l.typing&&i(e);else{var n=e.ctrlKey&&!e.altKey||e.metaKey;!(t<16||t>20)||224===t||91===t||l.typing||n||(l.beforeChange(),l.typing=!0,l.add({},e),s=!0)}}),e.on("MouseDown",function(e){l.typing&&i(e)}),e.addShortcut("meta+z","","Undo"),e.addShortcut("meta+y,meta+shift+z","","Redo"),e.on("AddUndo Undo Redo ClearUndos",function(t){t.isDefaultPrevented()||e.nodeChanged()}),l={data:u,typing:!1,beforeChange:function(){d||(a=e.selection.getBookmark(2,!0))},add:function(i,o){var s,l,f,m=e.settings;if(f=n.createFromEditor(e),i=i||{},i=t.extend(i,f),d||e.removed)return null;if(l=u[c],e.fire("BeforeAddUndo",{level:i,lastLevel:l,originalEvent:o}).isDefaultPrevented())return null;if(l&&n.isEq(l,i))return null;if(u[c]&&(u[c].beforeBookmark=a),m.custom_undo_redo_levels&&u.length>m.custom_undo_redo_levels){for(s=0;s<u.length-1;s++)u[s]=u[s+1];u.length--,c=u.length}i.bookmark=e.selection.getBookmark(2,!0),c<u.length-1&&(u.length=c+1),u.push(i),c=u.length-1;var h={level:i,lastLevel:l,originalEvent:o};return e.fire("AddUndo",h),c>0&&(r(!0),e.fire("change",h)),i},undo:function(){var t;return l.typing&&(l.add(),l.typing=!1),c>0&&(t=u[--c],n.applyToEditor(e,t,!0),r(!0),e.fire("undo",{level:t})),t},redo:function(){var t;return c<u.length-1&&(t=u[++c],n.applyToEditor(e,t,!1),r(!0),e.fire("redo",{level:t})),t},clear:function(){u=[],c=0,l.typing=!1,l.data=u,e.fire("ClearUndos")},hasUndo:function(){return c>0||l.typing&&u[0]&&!n.isEq(n.createFromEditor(e),u[0])},hasRedo:function(){return c<u.length-1&&!l.typing},transact:function(e){o(),l.beforeChange();try{d++,e()}finally{d--}return l.add()},extra:function(t,r){var i,o;l.transact(t)&&(o=u[c].bookmark,i=u[c-1],n.applyToEditor(e,i,!0),l.transact(r)&&(u[c-1].beforeBookmark=o))}}}}),r("tinymce/EnterKey",["tinymce/dom/TreeWalker","tinymce/dom/RangeUtils","tinymce/caret/CaretContainer","tinymce/Env"],function(e,t,n,r){var i=r.ie&&r.ie<11;return function(o){function a(a){function h(e){return e&&s.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&!/^(fixed|absolute)/i.test(e.style.position)&&"true"!==s.getContentEditable(e)}function p(e){return e&&/^(TD|TH|CAPTION)$/.test(e.nodeName)}function g(e){var t;s.isBlock(e)&&(t=l.getRng(),e.appendChild(s.create("span",null,"\xa0")),l.select(e),e.lastChild.outerHTML="",l.setRng(t))}function v(e){var t,n=e,r=[];if(n){for(;n=n.firstChild;){if(s.isBlock(n))return;1!=n.nodeType||f[n.nodeName.toLowerCase()]||r.push(n)}for(t=r.length;t--;)!(n=r[t]).hasChildNodes()||n.firstChild==n.lastChild&&""===n.firstChild.nodeValue?s.remove(n):"A"==n.nodeName&&" "===(n.innerText||n.textContent)&&s.remove(n)}}function y(t){function n(e){for(;e;){if(1==e.nodeType||3==e.nodeType&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}}var i,o,a,c,u=t;if(t){if(r.ie&&r.ie<9&&P&&P.firstChild&&P.firstChild==P.lastChild&&"BR"==P.firstChild.tagName&&s.remove(P.firstChild),/^(LI|DT|DD)$/.test(t.nodeName)){var d=n(t.firstChild);d&&/^(UL|OL|DL)$/.test(d.nodeName)&&t.insertBefore(s.doc.createTextNode("\xa0"),t.firstChild)}if(a=s.createRng(),r.ie||t.normalize(),t.hasChildNodes()){for(i=new e(t,t);o=i.current();){if(3==o.nodeType){a.setStart(o,0),a.setEnd(o,0);break}if(m[o.nodeName.toLowerCase()]){a.setStartBefore(o),a.setEndBefore(o);break}u=o,o=i.next()}o||(a.setStart(u,0),a.setEnd(u,0))}else"BR"==t.nodeName?t.nextSibling&&s.isBlock(t.nextSibling)?((!O||O<9)&&(c=s.create("br"),t.parentNode.insertBefore(c,t)),a.setStartBefore(t),a.setEndBefore(t)):(a.setStartAfter(t),a.setEndAfter(t)):(a.setStart(t,0),a.setEnd(t,0));l.setRng(a),s.remove(c),l.scrollIntoView(t)}}function b(e){var t=c.forced_root_block;t&&t.toLowerCase()===e.tagName.toLowerCase()&&s.setAttribs(e,c.forced_root_block_attrs)}function C(e){e.innerHTML=i?"":'<br data-mce-bogus="1">'}function x(e){var t,n,r,o=M,a=d.getTextInlineElements();if(e||"TABLE"==z?b(t=s.create(e||V)):t=P.cloneNode(!1),r=t,!1!==c.keep_styles)do{if(a[o.nodeName]){if("_mce_caret"==o.id)continue;n=o.cloneNode(!1),s.setAttrib(n,"id",""),t.hasChildNodes()?(n.appendChild(t.firstChild),t.appendChild(n)):(r=n,t.appendChild(n))}}while((o=o.parentNode)&&o!=D);return i||(r.innerHTML='<br data-mce-bogus="1">'),t}function w(t){var n,r,i;if(3==M.nodeType&&(t?L>0:L<M.nodeValue.length))return!1;if(M.parentNode==P&&$&&!t)return!0;if(t&&1==M.nodeType&&M==P.firstChild)return!0;if("TABLE"===M.nodeName||M.previousSibling&&"TABLE"==M.previousSibling.nodeName)return $&&!t||!$&&t;for(n=new e(M,P),3==M.nodeType&&(t&&0===L?n.prev():t||L!=M.nodeValue.length||n.next());r=n.current();){if(1===r.nodeType){if(!r.getAttribute("data-mce-bogus")&&(i=r.nodeName.toLowerCase(),f[i]&&"br"!==i))return!1}else if(3===r.nodeType&&!/^[ \t\r\n]*$/.test(r.nodeValue))return!1;t?n.prev():n.next()}return!0}function E(e,t){var n,r,i,a,l,c,u=V||"P";if(!(r=s.getParent(e,s.isBlock))||!h(r)){if(c=(r=r||D)==o.getBody()||p(r)?r.nodeName.toLowerCase():r.parentNode.nodeName.toLowerCase(),!r.hasChildNodes())return b(n=s.create(u)),r.appendChild(n),A.setStart(n,0),A.setEnd(n,0),n;for(a=e;a.parentNode!=r;)a=a.parentNode;for(;a&&!s.isBlock(a);)i=a,a=a.previousSibling;if(i&&d.isValidChild(c,u.toLowerCase())){for(b(n=s.create(u)),i.parentNode.insertBefore(n,i),a=i;a&&!s.isBlock(a);)l=a.nextSibling,n.appendChild(a),a=l;A.setStart(e,t),A.setEnd(e,t)}}return e}function N(){function e(e){for(var t=U[e?"firstChild":"lastChild"];t&&1!=t.nodeType;)t=t[e?"nextSibling":"previousSibling"];return t===P}function t(){var e=U.parentNode;return/^(LI|DT|DD)$/.test(e.nodeName)?e:U}if(U!=o.getBody()){var n=U.parentNode.nodeName;/^(OL|UL|LI)$/.test(n)&&(V="LI"),I=V?x(V):s.create("BR"),e(!0)&&e()?"LI"==n?s.insertAfter(I,t()):s.replace(I,U):e(!0)?"LI"==n?(s.insertAfter(I,t()),I.appendChild(s.doc.createTextNode(" ")),I.appendChild(U)):U.parentNode.insertBefore(I,U):e()?(s.insertAfter(I,t()),g(I)):(U=t(),(B=A.cloneRange()).setStartAfter(P),B.setEndAfter(U),F=B.extractContents(),"LI"==V&&"LI"==F.firstChild.nodeName?(I=F.firstChild,s.insertAfter(F,U)):(s.insertAfter(F,U),s.insertAfter(I,U))),s.remove(P),y(I),u.add()}}function S(){o.execCommand("InsertLineBreak",!1,a)}function _(e){do{3===e.nodeType&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild}while(e)}function k(e){var t,n,r=s.getRoot();for(t=e;t!==r&&"false"!==s.getContentEditable(t);)"true"===s.getContentEditable(t)&&(n=t),t=t.parentNode;return t!==r?n:r}function T(e){var t;i||(e.normalize(),(t=e.lastChild)&&!/^(left|right)$/gi.test(s.getStyle(t,"float",!0))||s.add(e,"br"))}function R(){I=/^(H[1-6]|PRE|FIGURE)$/.test(z)&&"HGROUP"!=W?x(V):x(),c.end_container_on_empty_block&&h(U)&&s.isEmpty(P)?I=s.split(U,P):s.insertAfter(I,P),y(I)}var A,B,D,M,L,P,O,H,I,F,U,z,W,V,$;if(A=l.getRng(!0),!a.isDefaultPrevented())if(A.collapsed){if(new t(s).normalize(A),M=A.startContainer,L=A.startOffset,V=(V=(c.force_p_newlines?"p":"")||c.forced_root_block)?V.toUpperCase():"",O=s.doc.documentMode,H=a.shiftKey,1==M.nodeType&&M.hasChildNodes()&&($=L>M.childNodes.length-1,M=M.childNodes[Math.min(L,M.childNodes.length-1)]||M,L=$&&3==M.nodeType?M.nodeValue.length:0),D=k(M))if(u.beforeChange(),s.isBlock(D)||D==s.getRoot()){if((V&&!H||!V&&H)&&(M=E(M,L)),P=s.getParent(M,s.isBlock),U=P?s.getParent(P.parentNode,s.isBlock):null,z=P?P.nodeName.toUpperCase():"","LI"!=(W=U?U.nodeName.toUpperCase():"")||a.ctrlKey||(P=U,z=W),o.undoManager.typing&&(o.undoManager.typing=!1,o.undoManager.add()),/^(LI|DT|DD)$/.test(z)){if(!V&&H)return void S();if(s.isEmpty(P))return void N()}if("PRE"==z&&!1!==c.br_in_pre){if(!H)return void S()}else if(!V&&!H&&"LI"!=z||V&&H)return void S();V&&P===o.getBody()||(V=V||"P",n.isCaretContainerBlock(P)?(I=n.showCaretContainerBlock(P),s.isEmpty(P)&&C(P),y(I)):w()?R():w(!0)?(g(I=P.parentNode.insertBefore(x(),P)),y(P)):((B=A.cloneRange()).setEndAfter(P),_(F=B.extractContents()),I=F.firstChild,s.insertAfter(F,P),v(I),T(P),s.isEmpty(P)&&C(P),I.normalize(),s.isEmpty(I)?(s.remove(I),R()):y(I)),s.setAttrib(I,"id",""),o.fire("NewBlock",{newBlock:I}),u.typing=!1,u.add())}else V&&!H||S()}else o.execCommand("Delete")}var s=o.dom,l=o.selection,c=o.settings,u=o.undoManager,d=o.schema,f=d.getNonEmptyElements(),m=d.getMoveCaretBeforeOnEnterElements();o.on("keydown",function(e){13==e.keyCode&&!1!==a(e)&&e.preventDefault()})}}),r("tinymce/ForceBlocks",[],function(){return function(e){function t(){var t,s,l,c,u,d,f,m,h,p,g,v,y=i.getStart(),b=e.getBody(),C=-16777215;if(v=n.forced_root_block,y&&1===y.nodeType&&v){for(;y&&y!=b;){if(a[y.nodeName])return;y=y.parentNode}if((t=i.getRng()).setStart){s=t.startContainer,l=t.startOffset,c=t.endContainer,u=t.endOffset;try{h=e.getDoc().activeElement===b}catch(x){}}else t.item&&(y=t.item(0),(t=e.getDoc().body.createTextRange()).moveToElementText(y)),h=t.parentElement().ownerDocument===e.getDoc(),(p=t.duplicate()).collapse(!0),l=-1*p.move("character",C),p.collapsed||((p=t.duplicate()).collapse(!1),u=-1*p.move("character",C)-l);for(y=b.firstChild,g=b.nodeName.toLowerCase();y;)if((3===y.nodeType||1==y.nodeType&&!a[y.nodeName])&&o.isValidChild(g,v.toLowerCase())){if(3===y.nodeType&&0===y.nodeValue.length){f=y,y=y.nextSibling,r.remove(f);continue}d||(d=r.create(v,e.settings.forced_root_block_attrs),y.parentNode.insertBefore(d,y),m=!0),f=y,y=y.nextSibling,d.appendChild(f)}else d=null,y=y.nextSibling;if(m&&h){if(t.setStart)t.setStart(s,l),t.setEnd(c,u),i.setRng(t);else try{(t=e.getDoc().body.createTextRange()).moveToElementText(b),t.collapse(!0),t.moveStart("character",l),u>0&&t.moveEnd("character",u),t.select()}catch(x){}e.nodeChanged()}}}var n=e.settings,r=e.dom,i=e.selection,o=e.schema,a=o.getBlockElements();n.forced_root_block&&e.on("NodeChange",t)}}),r("tinymce/caret/CaretUtils",["tinymce/util/Fun","tinymce/dom/TreeWalker","tinymce/dom/NodeType","tinymce/caret/CaretPosition","tinymce/caret/CaretContainer","tinymce/caret/CaretCandidate"],function(e,t,n,r,i,o){function a(e){return e>0}function s(e){return e<0}function l(e,t){for(var n;n=e(t);)if(!N(n))return n;return null}function c(e,n,r,i,o){var c=new t(e,i);if(s(n)){if((x(e)||N(e))&&r(e=l(c.prev,!0)))return e;for(;e=l(c.prev,o);)if(r(e))return e}if(a(n)){if((x(e)||N(e))&&r(e=l(c.next,!0)))return e;for(;e=l(c.next,o);)if(r(e))return e}return null}function u(e,t){for(e=e.parentNode;e&&e!=t;e=e.parentNode)if(C(e))return e;return t}function d(e,t){for(;e&&e!=t;){if(w(e))return e;e=e.parentNode}return null}function f(e,t,n){return d(e.container(),n)==d(t.container(),n)}function m(e,t,n){return u(e.container(),n)==u(t.container(),n)}function h(e,t){var n,r;return t?(n=t.container(),r=t.offset(),_(n)?n.childNodes[r+e]:null):null}function p(e,t){var n=t.ownerDocument.createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n}function g(e,t,n){return d(t,e)==d(n,e)}function v(e,t,n){var r,i;for(i=e?"previousSibling":"nextSibling";n&&n!=t;){if(r=n[i],E(r)&&(r=r[i]),x(r)){if(g(t,r,n))return r;break}if(k(r))break;n=n.parentNode}return null}function y(e,t,r){var o,a,s,l,c=S(v,!0,t),u=S(v,!1,t);if(a=r.startContainer,s=r.startOffset,i.isCaretContainerBlock(a)){if(_(a)||(a=a.parentNode),"before"==(l=a.getAttribute("data-mce-caret"))&&(o=a.nextSibling,x(o)))return T(o);if("after"==l&&(o=a.previousSibling,x(o)))return R(o)}if(!r.collapsed)return r;if(n.isText(a)){if(E(a)){if(1===e){if(o=u(a))return T(o);if(o=c(a))return R(o)}if(-1===e){if(o=c(a))return R(o);if(o=u(a))return T(o)}return r}if(i.endsWithCaretContainer(a)&&s>=a.data.length-1)return 1===e&&(o=u(a))?T(o):r;if(i.startsWithCaretContainer(a)&&s<=1)return-1===e&&(o=c(a))?R(o):r;if(s===a.data.length)return(o=u(a))?T(o):r;if(0===s)return(o=c(a))?R(o):r}return r}function b(e,t){return x(h(e,t))}var C=n.isContentEditableTrue,x=n.isContentEditableFalse,w=n.matchStyleValues("display","block table table-cell table-caption"),E=i.isCaretContainer,N=i.isCaretContainerBlock,S=e.curry,_=n.isElement,k=o.isCaretCandidate,T=S(p,!0),R=S(p,!1);return{isForwards:a,isBackwards:s,findNode:c,getEditingHost:u,getParentBlock:d,isInSameBlock:f,isInSameEditingHost:m,isBeforeContentEditableFalse:S(b,0),isAfterContentEditableFalse:S(b,-1),normalizeRange:y}}),r("tinymce/caret/CaretWalker",["tinymce/dom/NodeType","tinymce/caret/CaretCandidate","tinymce/caret/CaretPosition","tinymce/caret/CaretUtils","tinymce/util/Arr","tinymce/util/Fun"],function(e,t,n,r,i,o){function a(e,t){for(var n=[];e&&e!=t;)n.push(e),e=e.parentNode;return n}function s(e,t){return e.hasChildNodes()&&t<e.childNodes.length?e.childNodes[t]:null}function l(e,t){if(p(e)){if(v(t.previousSibling)&&!f(t.previousSibling))return n.before(t);if(f(t))return n(t,0)}if(g(e)){if(v(t.nextSibling)&&!f(t.nextSibling))return n.after(t);if(f(t))return n(t,t.data.length)}return g(e)?h(t)?n.before(t):n.after(t):n.before(t)}function c(t,i){var o;return!!e.isBr(t)&&(!!(o=u(1,n.after(t),i))&&!r.isInSameBlock(n.before(t),n.before(o),i))}function u(e,t,h){var C,x,w,E,N,S,_;if(!m(h)||!t)return null;if(C=(_=t).container(),x=_.offset(),f(C)){if(g(e)&&x>0)return n(C,--x);if(p(e)&&x<C.length)return n(C,++x);w=C}else{if(g(e)&&x>0&&(E=s(C,x-1),v(E)))return!y(E)&&(N=r.findNode(E,e,b,E))?f(N)?n(N,N.data.length):n.after(N):f(E)?n(E,E.data.length):n.before(E);if(p(e)&&x<C.childNodes.length&&(E=s(C,x),v(E)))return c(E,h)?u(e,n.after(E),h):!y(E)&&(N=r.findNode(E,e,b,E))?f(N)?n(N,0):n.before(N):f(E)?n(E,0):n.after(E);w=_.getNode()}return(p(e)&&_.isAtEnd()||g(e)&&_.isAtStart())&&(w=r.findNode(w,e,o.constant(!0),h,!0),b(w))?l(e,w):(E=r.findNode(w,e,b,h),!(S=i.last(i.filter(a(C,h),d)))||E&&S.contains(E)?E?l(e,E):null:_=p(e)?n.after(S):n.before(S))}var d=e.isContentEditableFalse,f=e.isText,m=e.isElement,h=e.isBr,p=r.isForwards,g=r.isBackwards,v=t.isCaretCandidate,y=t.isAtomic,b=t.isEditableCaretCandidate;return function(e){return{next:function(t){return u(1,t,e)},prev:function(t){return u(-1,t,e)}}}}),
r("tinymce/InsertList",["tinymce/util/Tools","tinymce/caret/CaretWalker","tinymce/caret/CaretPosition"],function(e,t,n){var r=function(e){var t=e.firstChild,n=e.lastChild;return t&&"META"===t.nodeName&&t.parentNode.removeChild(t),n&&"mce_marker"===n.id&&n.parentNode.removeChild(n),e},i=function(e,t,n){var i=t.serialize(n),o=e.createFragment(i);return r(o)},o=function(t){return e.grep(t.childNodes,function(e){return"LI"===e.nodeName})},a=function(e){return!e.firstChild},s=function(e){return e.length>0&&a(e[e.length-1])?e.slice(0,-1):e},l=function(e,t){var n=e.getParent(t,e.isBlock);return n&&"LI"===n.nodeName?n:null},c=function(e,t){var n=t.cloneRange(),r=t.cloneRange();return n.setStartBefore(e),r.setEndAfter(e),[n.cloneContents(),r.cloneContents()]},u=function(e,r){var i=n.before(e),o=new t(r).next(i);return o?o.toRange():null},d=function(e,r){var i=n.after(e),o=new t(r).prev(i);return o?o.toRange():null},f=function(t,n,r,i){var o=c(t,i),a=t.parentNode;return a.insertBefore(o[0],t),e.each(n,function(e){a.insertBefore(e,t)}),a.insertBefore(o[1],t),a.removeChild(t),d(n[n.length-1],r)},m=function(t,n,r){var i=t.parentNode;return e.each(n,function(e){i.insertBefore(e,t)}),u(t,r)},h=function(e,t,n,r){return r.insertAfter(t.reverse(),e),d(t[0],n)};return{isListFragment:function(e){var t=e.firstChild,n=e.lastChild;return t&&"meta"===t.name&&(t=t.next),n&&"mce_marker"===n.attr("id")&&(n=n.prev),!(!t||t!==n)&&("ul"===t.name||"ol"===t.name)},insertAtCaret:function(e,r,a,c){var u=i(r,e,c),d=l(r,a.startContainer),p=s(o(u.firstChild)),g=1,v=2,y=r.getRoot(),b=function(e){var i=n.fromRangeStart(a),o=new t(r.getRoot()),s=e===g?o.prev(i):o.next(i);return!s||l(r,s.getNode())!==d};return b(g)?m(d,p,y):b(v)?h(d,p,y,r):f(d,p,y,a)},isParentBlockLi:function(e,t){return!!l(e,t)},trimListItems:s,listItems:o}}),r("tinymce/InsertContent",["tinymce/Env","tinymce/util/Tools","tinymce/html/Serializer","tinymce/caret/CaretWalker","tinymce/caret/CaretPosition","tinymce/dom/ElementUtils","tinymce/dom/NodeType","tinymce/InsertList"],function(e,t,n,r,i,o,a,s){var l=a.matchNodeNames("td th"),c=function(e,t,n){if("all"===n.getAttribute("data-mce-bogus"))n.parentNode.insertBefore(e.dom.createFragment(t),n);else{var r=n.firstChild,i=n.lastChild;!r||r===i&&"BR"===r.nodeName?e.dom.setHTML(n,t):e.selection.setContent(t)}},u=function(a,u,d){function f(e){function t(e){return r[e]&&3==r[e].nodeType}var n,r,i;return n=M.getRng(!0),r=n.startContainer,i=n.startOffset,3==r.nodeType&&(i>0?e=e.replace(/^&nbsp;/," "):t("previousSibling")||(e=e.replace(/^ /,"&nbsp;")),i<r.length?e=e.replace(/&nbsp;(<br>|)$/," "):t("nextSibling")||(e=e.replace(/(&nbsp;| )(<br>|)$/,"&nbsp;"))),e}function m(){var e,t,n;t=(e=M.getRng(!0)).startContainer,n=e.startOffset,3==t.nodeType&&e.collapsed&&("\xa0"===t.data[n]?(t.deleteData(n,1),/[\u00a0| ]$/.test(u)||(u+=" ")):"\xa0"===t.data[n-1]&&(t.deleteData(n-1,1),/[\u00a0| ]$/.test(u)||(u=" "+u)))}function h(){if(B){var e=a.getBody(),n=new o(L);t.each(L.select("*[data-mce-fragment]"),function(t){for(var r=t.parentNode;r&&r!=e;r=r.parentNode)D[t.nodeName.toLowerCase()]&&n.compare(r,t)&&L.remove(t,!0)})}}function p(e){for(var t=e;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")}function g(e){t.each(e.getElementsByTagName("*"),function(e){e.removeAttribute("data-mce-fragment")})}function v(e){return!!e.getAttribute("data-mce-fragment")}function y(e){return e&&!a.schema.getShortEndedElements()[e.nodeName]}function b(t){function n(e){for(var t=a.getBody();e&&e!==t;e=e.parentNode)if("false"===a.dom.getContentEditable(e))return e;return null}function o(e){var t=i.fromRangeStart(e);if(t=new r(a.getBody()).next(t))return t.toRange()}var s,c,u;if(t){if(M.scrollIntoView(t),s=n(t))return L.remove(t),void M.select(s);k=L.createRng(),(T=t.previousSibling)&&3==T.nodeType?(k.setStart(T,T.nodeValue.length),e.ie||(R=t.nextSibling)&&3==R.nodeType&&(T.appendData(R.data),R.parentNode.removeChild(R))):(k.setStartBefore(t),k.setEndBefore(t)),c=L.getParent(t,L.isBlock),L.remove(t),c&&L.isEmpty(c)&&(a.$(c).empty(),k.setStart(c,0),k.setEnd(c,0),l(c)||v(c)||!(u=o(k))?L.add(c,L.create("br",{"data-mce-bogus":"1"})):(k=u,L.remove(c))),M.setRng(k)}}var C,x,w,E,N,S,_,k,T,R,A,B,D=a.schema.getTextInlineElements(),M=a.selection,L=a.dom;/^ | $/.test(u)&&(u=f(u)),C=a.parser,B=d.merge,x=new n({validate:a.settings.validate},a.schema),A='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;&#x200B;</span>',S={content:u,format:"html",selection:!0},a.fire("BeforeSetContent",S),-1==(u=S.content).indexOf("{$caret}")&&(u+="{$caret}"),u=u.replace(/\{\$caret\}/,A);var P=(k=M.getRng()).startContainer||(k.parentElement?k.parentElement():null),O=a.getBody();P===O&&M.isCollapsed()&&L.isBlock(O.firstChild)&&y(O.firstChild)&&L.isEmpty(O.firstChild)&&((k=L.createRng()).setStart(O.firstChild,0),k.setEnd(O.firstChild,0),M.setRng(k)),M.isCollapsed()||(a.selection.setRng(a.selection.getRng()),a.getDoc().execCommand("Delete",!1,null),m());var H={context:(w=M.getNode()).nodeName.toLowerCase(),data:d.data};if(N=C.parse(u,H),!0===d.paste&&s.isListFragment(N)&&s.isParentBlockLi(L,w))return k=s.insertAtCaret(x,L,a.selection.getRng(!0),N),a.selection.setRng(k),void a.fire("SetContent",S);if(p(N),"mce_marker"==(T=N.lastChild).attr("id"))for(_=T,T=T.prev;T;T=T.walk(!0))if(3==T.type||!L.isBlock(T.name)){a.schema.isValidChild(T.parent.name,"span")&&T.parent.insert(_,T,"br"===T.name);break}if(a._selectionOverrides.showBlockCaretContainer(w),H.invalid){for(M.setContent(A),w=M.getNode(),E=a.getBody(),9==w.nodeType?w=T=E:T=w;T!==E;)w=T,T=T.parentNode;u=w==E?E.innerHTML:L.getOuterHTML(w),u=x.serialize(C.parse(u.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return x.serialize(N)}))),w==E?L.setHTML(E,u):L.setOuterHTML(w,u)}else u=x.serialize(N),c(a,u,w);h(),b(L.get("mce_marker")),g(a.getBody()),a.fire("SetContent",S),a.addVisual()},d=function(e){var n;return"string"!=typeof e?(n=t.extend({paste:e.paste,data:{paste:e.paste}},e),{content:e.content,details:n}):{content:e,details:{}}};return{insertAtCaret:function(e,t){var n=d(t);u(e,n.content,n.details)}}}),r("tinymce/EditorCommands",["tinymce/Env","tinymce/util/Tools","tinymce/dom/RangeUtils","tinymce/dom/TreeWalker","tinymce/InsertContent","tinymce/dom/NodeType"],function(e,n,r,i,o,a){var s=n.each,l=n.extend,c=n.map,u=n.inArray,d=n.explode,f=e.ie&&e.ie<11,m=!0,h=!1;return function(n){function p(e,t,r,i){var o,a,l=0;if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(e)||i&&i.skip_focus||n.focus(),(i=n.fire("BeforeExecCommand",{command:e,ui:t,value:r})).isDefaultPrevented())return!1;if(a=e.toLowerCase(),o=M.exec[a])return o(a,t,r),n.fire("ExecCommand",{command:e,ui:t,value:r}),!0;if(s(n.plugins,function(i){if(i.execCommand&&i.execCommand(e,t,r))return n.fire("ExecCommand",{command:e,ui:t,value:r}),l=!0,!1}),l)return l;if(n.theme&&n.theme.execCommand&&n.theme.execCommand(e,t,r))return n.fire("ExecCommand",{command:e,ui:t,value:r}),!0;try{l=n.getDoc().execCommand(e,t,r)}catch(c){}return!!l&&(n.fire("ExecCommand",{command:e,ui:t,value:r}),!0)}function g(e){var t;if(!n.quirks.isHidden()){if(e=e.toLowerCase(),t=M.state[e])return t(e);try{return n.getDoc().queryCommandState(e)}catch(r){}return!1}}function v(e){var t;if(!n.quirks.isHidden()){if(e=e.toLowerCase(),t=M.value[e])return t(e);try{return n.getDoc().queryCommandValue(e)}catch(r){}}}function y(e,t){t=t||"exec",s(e,function(e,n){s(n.toLowerCase().split(","),function(n){M[t][n]=e})})}function b(e,t,r){e=e.toLowerCase(),M.exec[e]=function(e,i,o,a){return t.call(r||n,i,o,a)}}function C(e){if(e=e.toLowerCase(),M.exec[e])return!0;try{return n.getDoc().queryCommandSupported(e)}catch(t){}return!1}function x(e,t,r){e=e.toLowerCase(),M.state[e]=function(){return t.call(r||n)}}function w(e,t,r){e=e.toLowerCase(),M.value[e]=function(){return t.call(r||n)}}function E(e){return e=e.toLowerCase(),!!M.exec[e]}function N(e,r,i){return r===t&&(r=h),i===t&&(i=null),n.getDoc().execCommand(e,r,i)}function S(e){return B.match(e)}function _(e,r){B.toggle(e,r?{value:r}:t),n.nodeChanged()}function k(e){D=A.getBookmark(e)}function T(){A.moveToBookmark(D)}var R,A,B,D,M={state:{},exec:{},value:{}},L=n.settings;n.on("PreInit",function(){R=n.dom,A=n.selection,L=n.settings,B=n.formatter}),l(this,{execCommand:p,queryCommandState:g,queryCommandValue:v,queryCommandSupported:C,addCommands:y,addCommand:b,addQueryStateHandler:x,addQueryValueHandler:w,hasCustomCommand:E}),y({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){n.undoManager.add()},"Cut,Copy,Paste":function(t){var r,i=n.getDoc();try{N(t)}catch(a){r=m}if("paste"!==t||i.queryCommandEnabled(t)||(r=!0),r||!i.queryCommandSupported(t)){var o=n.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");e.mac&&(o=o.replace(/Ctrl\+/g,"\u2318+")),n.notificationManager.open({text:o,type:"error"})}},unlink:function(){if(A.isCollapsed()){var e=n.dom.getParent(n.selection.getStart(),"a");e&&n.dom.remove(e,!0)}else B.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(e){var t=e.substring(7);"full"==t&&(t="justify"),s("left,center,right,justify".split(","),function(e){t!=e&&B.remove("align"+e)}),"none"!=t&&_("align"+t)},"InsertUnorderedList,InsertOrderedList":function(e){var t,n;N(e),(t=R.getParent(A.getNode(),"ol,ul"))&&(n=t.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName)&&(k(),R.split(n,t),T()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){_(e)},"ForeColor,HiliteColor,FontName":function(e,t,n){_(e,n)},FontSize:function(e,t,n){var r,i;n>=1&&n<=7&&(i=d(L.font_size_style_values),n=(r=d(L.font_size_classes))?r[n-1]||n:i[n-1]||n),_(e,n)},RemoveFormat:function(e){B.remove(e)},mceBlockQuote:function(){_("blockquote")},FormatBlock:function(e,t,n){return _(n||"p")},mceCleanup:function(){var e=A.getBookmark();n.setContent(n.getContent({cleanup:m}),{cleanup:m}),A.moveToBookmark(e)},mceRemoveNode:function(e,t,r){var i=r||A.getNode();i!=n.getBody()&&(k(),n.dom.remove(i,m),T())},mceSelectNodeDepth:function(e,t,r){var i=0;R.getParent(A.getNode(),function(e){if(1==e.nodeType&&i++==r)return A.select(e),h},n.getBody())},mceSelectNode:function(e,t,n){A.select(n)},mceInsertContent:function(e,t,r){o.insertAtCaret(n,r)},mceInsertRawHTML:function(e,t,r){A.setContent("tiny_mce_marker"),n.setContent(n.getContent().replace(/tiny_mce_marker/g,function(){return r}))},mceToggleFormat:function(e,t,n){_(n)},mceSetContent:function(e,t,r){n.setContent(r)},"Indent,Outdent":function(e){var t,r,i;t=L.indentation,r=/[a-z%]+$/i.exec(t),t=parseInt(t,10),g("InsertUnorderedList")||g("InsertOrderedList")?N(e):(L.forced_root_block||R.getParent(A.getNode(),R.isBlock)||B.apply("div"),s(A.getSelectedBlocks(),function(o){if("false"!==R.getContentEditable(o)&&"LI"!==o.nodeName){var a=n.getParam("indent_use_margin",!1)?"margin":"padding";a="TABLE"===o.nodeName?"margin":a,a+="rtl"==R.getStyle(o,"direction",!0)?"Right":"Left","outdent"==e?(i=Math.max(0,parseInt(o.style[a]||0,10)-t),R.setStyle(o,a,i?i+r:"")):(i=parseInt(o.style[a]||0,10)+t+r,R.setStyle(o,a,i))}}))},mceRepaint:function(){},InsertHorizontalRule:function(){n.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){n.hasVisual=!n.hasVisual,n.addVisual()},mceReplaceContent:function(e,t,r){n.execCommand("mceInsertContent",!1,r.replace(/\{\$selection\}/g,A.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;"string"==typeof n&&(n={href:n}),r=R.getParent(A.getNode(),"a"),n.href=n.href.replace(" ","%20"),r&&n.href||B.remove("link"),n.href&&B.apply("link",n,r)},selectAll:function(){var e,t=R.getRoot();if(A.getRng().setStart){var n=R.getParent(A.getStart(),a.isContentEditableTrue);n&&((e=R.createRng()).selectNodeContents(n),A.setRng(e))}else(e=A.getRng()).item||(e.moveToElementText(t),e.select())},"delete":function(){N("Delete");var e=n.getBody();R.isEmpty(e)&&(n.setContent(""),e.firstChild&&R.isBlock(e.firstChild)?n.selection.setCursorLocation(e.firstChild,0):n.selection.setCursorLocation(e,0))},mceNewDocument:function(){n.setContent("")},InsertLineBreak:function(e,t,o){function a(){for(var e,t=new i(p,v),r=n.schema.getNonEmptyElements();e=t.next();)if(r[e.nodeName.toLowerCase()]||e.length>0)return!0}var s,l,c,u=o,d=A.getRng(!0);new r(R).normalize(d);var h=d.startOffset,p=d.startContainer;if(1==p.nodeType&&p.hasChildNodes()){var g=h>p.childNodes.length-1;p=p.childNodes[Math.min(h,p.childNodes.length-1)]||p,h=g&&3==p.nodeType?p.nodeValue.length:0}var v=R.getParent(p,R.isBlock),y=v?v.nodeName.toUpperCase():"",b=v?R.getParent(v.parentNode,R.isBlock):null,C=b?b.nodeName.toUpperCase():"",x=u&&u.ctrlKey;"LI"!=C||x||(v=b,y=C),p&&3==p.nodeType&&h>=p.nodeValue.length&&(f||a()||(s=R.create("br"),d.insertNode(s),d.setStartAfter(s),d.setEndAfter(s),l=!0)),s=R.create("br"),d.insertNode(s);var w=R.doc.documentMode;return f&&"PRE"==y&&(!w||w<8)&&s.parentNode.insertBefore(R.doc.createTextNode("\r"),s),c=R.create("span",{},"&nbsp;"),s.parentNode.insertBefore(c,s),A.scrollIntoView(c),R.remove(c),l?(d.setStartBefore(s),d.setEndBefore(s)):(d.setStartAfter(s),d.setEndAfter(s)),A.setRng(d),n.undoManager.add(),m}}),y({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var t="align"+e.substring(7),n=A.isCollapsed()?[R.getParent(A.getNode(),R.isBlock)]:A.getSelectedBlocks(),r=c(n,function(e){return!!B.matchNode(e,t)});return-1!==u(r,m)},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return S(e)},mceBlockQuote:function(){return S("blockquote")},Outdent:function(){var e;if(L.inline_styles){if((e=R.getParent(A.getStart(),R.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return m;if((e=R.getParent(A.getEnd(),R.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return m}return g("InsertUnorderedList")||g("InsertOrderedList")||!L.inline_styles&&!!R.getParent(A.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(e){var t=R.getParent(A.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),y({"FontSize,FontName":function(e){var t,n=0;return(t=R.getParent(A.getNode(),"span"))&&(n="fontsize"==e?t.style.fontSize:t.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()),n}},"value"),y({Undo:function(){n.undoManager.undo()},Redo:function(){n.undoManager.redo()}})}}),r("tinymce/util/URI",["tinymce/util/Tools"],function(e){function t(e,o){var a,s,l=this;if(e=r(e),a=(o=l.settings=o||{}).base_uri,/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))l.source=e;else{var c=0===e.indexOf("//");0!==e.indexOf("/")||c||(e=(a&&a.protocol||"http")+"://mce_host"+e),/^[\w\-]*:?\/\//.test(e)||(s=o.base_uri?o.base_uri.path:new t(location.href).directory,""===o.base_uri.protocol?e="//mce_host"+l.toAbsPath(s,e):(e=/([^#?]*)([#?]?.*)/.exec(e),e=(a&&a.protocol||"http")+"://mce_host"+l.toAbsPath(s,e[1])+e[2])),e=e.replace(/@@/g,"(mce_at)"),e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e),n(i,function(t,n){var r=e[n];r&&(r=r.replace(/\(mce_at\)/g,"@@")),l[t]=r}),a&&(l.protocol||(l.protocol=a.protocol),l.userInfo||(l.userInfo=a.userInfo),l.port||"mce_host"!==l.host||(l.port=a.port),l.host&&"mce_host"!==l.host||(l.host=a.host),l.source=""),c&&(l.protocol="")}}var n=e.each,r=e.trim,i="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),o={ftp:21,http:80,https:443,mailto:25};return t.prototype={setPath:function(e){var t=this;e=/^(.*?)\/?(\w+)?$/.exec(e),t.path=e[0],t.directory=e[1],t.file=e[2],t.source="",t.getURI()},toRelative:function(e){var n,r=this;if("./"===e)return e;if("mce_host"!=(e=new t(e,{base_uri:r})).host&&r.host!=e.host&&e.host||r.port!=e.port||r.protocol!=e.protocol&&""!==e.protocol)return e.getURI();var i=r.getURI(),o=e.getURI();return i==o||"/"==i.charAt(i.length-1)&&i.substr(0,i.length-1)==o?i:(n=r.toRelPath(r.path,e.path),e.query&&(n+="?"+e.query),e.anchor&&(n+="#"+e.anchor),n)},toAbsolute:function(e,n){return(e=new t(e,{base_uri:this})).getURI(n&&this.isSameOrigin(e))},isSameOrigin:function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=o[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},toRelPath:function(e,t){var n,r,i,o=0,a="";if(e=(e=e.substring(0,e.lastIndexOf("/"))).split("/"),n=t.split("/"),e.length>=n.length)for(r=0,i=e.length;r<i;r++)if(r>=n.length||e[r]!=n[r]){o=r+1;break}if(e.length<n.length)for(r=0,i=n.length;r<i;r++)if(r>=e.length||e[r]!=n[r]){o=r+1;break}if(1===o)return t;for(r=0,i=e.length-(o-1);r<i;r++)a+="../";for(r=o-1,i=n.length;r<i;r++)a+=r!=o-1?"/"+n[r]:n[r];return a},toAbsPath:function(e,t){var r,i,o,a=0,s=[];for(i=/\/$/.test(t)?"/":"",e=e.split("/"),t=t.split("/"),n(e,function(e){e&&s.push(e)}),e=s,r=t.length-1,s=[];r>=0;r--)0!==t[r].length&&"."!==t[r]&&(".."!==t[r]?a>0?a--:s.push(t[r]):a++);return 0!==(o=(r=e.length-a)<=0?s.reverse().join("/"):e.slice(0,r).join("/")+"/"+s.reverse().join("/")).indexOf("/")&&(o="/"+o),i&&o.lastIndexOf("/")!==o.length-1&&(o+=i),o},getURI:function(e){var t,n=this;return n.source&&!e||(t="",e||(n.protocol?t+=n.protocol+"://":t+="//",n.userInfo&&(t+=n.userInfo+"@"),n.host&&(t+=n.host),n.port&&(t+=":"+n.port)),n.path&&(t+=n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),n.source=t),n.source}},t.parseDataUri=function(e){var t,n;return e=decodeURIComponent(e).split(","),(n=/data:([^;]+)/.exec(e[0]))&&(t=n[1]),{type:t,data:e[1]}},t.getDocumentBaseUrl=function(e){var t;return t=0!==e.protocol.indexOf("http")&&"file:"!==e.protocol?e.href:e.protocol+"//"+e.host+e.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),t},t}),r("tinymce/util/Class",["tinymce/util/Tools"],function(e){function t(){}var n,r,i=e.each,o=e.extend;return t.extend=n=function(e){function t(){var e,t,n,i=this;if(!r&&(i.init&&i.init.apply(i,arguments),t=i.Mixins))for(e=t.length;e--;)(n=t[e]).init&&n.init.apply(i,arguments)}function a(){return this}function s(e,t){return function(){var n,r=this,i=r._super;return r._super=f[e],n=t.apply(r,arguments),r._super=i,n}}var l,c,u,d=this,f=d.prototype;for(c in r=!0,l=new d,r=!1,e.Mixins&&(i(e.Mixins,function(t){for(var n in t)"init"!==n&&(e[n]=t[n])}),f.Mixins&&(e.Mixins=f.Mixins.concat(e.Mixins))),e.Methods&&i(e.Methods.split(","),function(t){e[t]=a}),e.Properties&&i(e.Properties.split(","),function(t){var n="_"+t;e[t]=function(e){var t,r=this;return e!==t?(r[n]=e,r):r[n]}}),e.Statics&&i(e.Statics,function(e,n){t[n]=e}),e.Defaults&&f.Defaults&&(e.Defaults=o({},f.Defaults,e.Defaults)),e)"function"==typeof(u=e[c])&&f[c]?l[c]=s(c,u):l[c]=u;return t.prototype=l,t.constructor=t,t.extend=n,t},t}),r("tinymce/util/EventDispatcher",["tinymce/util/Tools"],function(e){function t(t){function n(){return!1}function r(){return!0}function i(e,i){var o,s,l,u;if(e=e.toLowerCase(),(i=i||{}).type=e,i.target||(i.target=c),i.preventDefault||(i.preventDefault=function(){i.isDefaultPrevented=r},i.stopPropagation=function(){i.isPropagationStopped=r},i.stopImmediatePropagation=function(){i.isImmediatePropagationStopped=r},i.isDefaultPrevented=n,i.isPropagationStopped=n,i.isImmediatePropagationStopped=n),t.beforeFire&&t.beforeFire(i),o=f[e])for(s=0,l=o.length;s<l;s++){if((u=o[s]).once&&a(e,u.func),i.isImmediatePropagationStopped())return i.stopPropagation(),i;if(!1===u.func.call(c,i))return i.preventDefault(),i}return i}function o(t,r,i,o){var a,s,l;if(!1===r&&(r=n),r)for(r={func:r},o&&e.extend(r,o),l=(s=t.toLowerCase().split(" ")).length;l--;)t=s[l],(a=f[t])||(a=f[t]=[],u(t,!0)),i?a.unshift(r):a.push(r);return d}function a(e,t){var n,r,i,o,a;if(e)for(n=(o=e.toLowerCase().split(" ")).length;n--;){if(e=o[n],r=f[e],!e){for(i in f)u(i,!1),delete f[i];return d}if(r){if(t)for(a=r.length;a--;)r[a].func===t&&(r=r.slice(0,a).concat(r.slice(a+1)),f[e]=r);else r.length=0;r.length||(u(e,!1),delete f[e])}}else{for(e in f)u(e,!1);f={}}return d}function s(e,t,n){return o(e,t,n,{once:!0})}function l(e){return e=e.toLowerCase(),!(!f[e]||0===f[e].length)}var c,u,d=this,f={};c=(t=t||{}).scope||d,u=t.toggleEvent||n,d.fire=i,d.on=o,d.off=a,d.once=s,d.has=l}var n=e.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend"," ");return t.isNative=function(e){return!!n[e.toLowerCase()]},t}),r("tinymce/data/Binding",[],function(){function e(e){this.create=e.create}return e.create=function(t,n){return new e({create:function(e,r){function i(t){e.set(r,t.value)}function o(e){t.set(n,e.value)}var a;return e.on("change:"+r,o),t.on("change:"+n,i),(a=e._bindings)||(a=e._bindings=[],e.on("destroy",function(){for(var e=a.length;e--;)a[e]()})),a.push(function(){t.off("change:"+n,i)}),t.get(n)}})},e}),r("tinymce/util/Observable",["tinymce/util/EventDispatcher"],function(e){function t(t){return t._eventDispatcher||(t._eventDispatcher=new e({scope:t,toggleEvent:function(n,r){e.isNative(n)&&t.toggleNativeEvent&&t.toggleNativeEvent(n,r)}})),t._eventDispatcher}return{fire:function(e,n,r){var i=this;if(i.removed&&"remove"!==e)return n;if(n=t(i).fire(e,n,r),!1!==r&&i.parent)for(var o=i.parent();o&&!n.isPropagationStopped();)o.fire(e,n,!1),o=o.parent();return n},on:function(e,n,r){return t(this).on(e,n,r)},off:function(e,n){return t(this).off(e,n)},once:function(e,n){return t(this).once(e,n)},hasEventListeners:function(e){return t(this).has(e)}}}),r("tinymce/data/ObservableObject",["tinymce/data/Binding","tinymce/util/Observable","tinymce/util/Class","tinymce/util/Tools"],function(e,t,n,r){function i(e){return e.nodeType>0}function o(e,t){var n,a;if(e===t)return!0;if(null===e||null===t)return e===t;if("object"!=typeof e||"object"!=typeof t)return e===t;if(r.isArray(t)){if(e.length!==t.length)return!1;for(n=e.length;n--;)if(!o(e[n],t[n]))return!1}if(i(e)||i(t))return e===t;for(n in a={},t){if(!o(e[n],t[n]))return!1;a[n]=!0}for(n in e)if(!a[n]&&!o(e[n],t[n]))return!1;return!0}return n.extend({Mixins:[t],init:function(t){var n,r;for(n in t=t||{})(r=t[n])instanceof e&&(t[n]=r.create(this,n));this.data=t},set:function(t,n){var r,i,a=this.data[t];if(n instanceof e&&(n=n.create(this,t)),"object"==typeof t){for(r in t)this.set(r,t[r]);return this}return o(a,n)||(this.data[t]=n,i={target:this,name:t,value:n,oldValue:a},this.fire("change:"+t,i),this.fire("change",i)),this},get:function(e){return this.data[e]},has:function(e){return e in this.data},bind:function(t){return e.create(this,t)},destroy:function(){this.fire("destroy")}})}),r("tinymce/ui/Selector",["tinymce/util/Class"],function(e){function t(e){for(var t,n=[],r=e.length;r--;)(t=e[r]).__checked||(n.push(t),t.__checked=1);for(r=n.length;r--;)delete n[r].__checked;return n}var n,r=/^([\w\\*]+)?(?:#([\w\-\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i,i=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,o=/^\s*|\s*$/g,a=e.extend({init:function(e){function t(e){if(e)return e=e.toLowerCase(),function(t){return"*"===e||t.type===e}}function n(e){if(e)return function(t){return t._name===e}}function a(e){if(e)return e=e.split("."),function(t){for(var n=e.length;n--;)if(!t.classes.contains(e[n]))return!1;return!0}}function s(e,t,n){if(e)return function(r){var i=r[e]?r[e]():"";return t?"="===t?i===n:"*="===t?i.indexOf(n)>=0:"~="===t?(" "+i+" ").indexOf(" "+n+" ")>=0:"!="===t?i!=n:"^="===t?0===i.indexOf(n):"$="===t&&i.substr(i.length-n.length)===n:!!n}}function l(e){var t;if(e)return(e=/(?:not\((.+)\))|(.+)/i.exec(e))[1]?(t=u(e[1],[]),function(e){return!d(e,t)}):(e=e[2],function(t,n,r){return"first"===e?0===n:"last"===e?n===r-1:"even"===e?n%2==0:"odd"===e?n%2==1:!!t[e]&&t[e]()})}function c(e,i,c){function u(e){e&&i.push(e)}var d;return u(t((d=r.exec(e.replace(o,"")))[1])),u(n(d[2])),u(a(d[3])),u(s(d[4],d[5],d[6])),u(l(d[7])),i.pseudo=!!d[7],i.direct=c,i}function u(e,t){var n,r,o,a=[];do{if(i.exec(""),(r=i.exec(e))&&(e=r[3],a.push(r[1]),r[2])){n=r[3];break}}while(r);for(n&&u(n,t),e=[],o=0;o<a.length;o++)">"!=a[o]&&e.push(c(a[o],[],">"===a[o-1]));return t.push(e),t}var d=this.match;this._selectors=u(e,[])},match:function(e,t){var n,r,i,o,a,s,l,c,u,d,f,m,h;for(n=0,r=(t=t||this._selectors).length;n<r;n++){for(h=e,m=0,i=(o=(a=t[n]).length)-1;i>=0;i--)for(c=a[i];h;){if(c.pseudo)for(u=d=(f=h.parent().items()).length;u--&&f[u]!==h;);for(s=0,l=c.length;s<l;s++)if(!c[s](h,u,d)){s=l+1;break}if(s===l){m++;break}if(i===o-1)break;h=h.parent()}if(m===o)return!0}return!1},find:function(e){function r(e,t,n){var i,o,a,l,c,u=t[n];for(i=0,o=e.length;i<o;i++){for(c=e[i],a=0,l=u.length;a<l;a++)if(!u[a](c,i,o)){a=l+1;break}if(a===l)n==t.length-1?s.push(c):c.items&&r(c.items(),t,n+1);else if(u.direct)return;c.items&&r(c.items(),t,n)}}var i,o,s=[],l=this._selectors;if(e.items){for(i=0,o=l.length;i<o;i++)r(e.items(),l[i],0);o>1&&(s=t(s))}return n||(n=a.Collection),new n(s)}});return a}),r("tinymce/ui/Collection",["tinymce/util/Tools","tinymce/ui/Selector","tinymce/util/Class"],function(e,t,n){var r,i,o=Array.prototype.push,a=Array.prototype.slice;return i={length:0,init:function(e){e&&this.add(e)},add:function(t){var n=this;return e.isArray(t)?o.apply(n,t):t instanceof r?n.add(t.toArray()):o.call(n,t),n},set:function(e){var t,n=this,r=n.length;for(n.length=0,n.add(e),t=n.length;t<r;t++)delete n[t];return n},filter:function(e){var n,i,o,a,s=this,l=[];for("string"==typeof e?(e=new t(e),a=function(t){return e.match(t)}):a=e,n=0,i=s.length;n<i;n++)a(o=s[n])&&l.push(o);return new r(l)},slice:function(){return new r(a.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},each:function(t){return e.each(this,t),this},toArray:function(){return e.toArray(this)},indexOf:function(e){for(var t=this,n=t.length;n--&&t[n]!==e;);return n},reverse:function(){return new r(e.toArray(this).reverse())},hasClass:function(e){return!!this[0]&&this[0].classes.contains(e)},prop:function(e,t){var n,r,i=this;return t!==n?(i.each(function(n){n[e]&&n[e](t)}),i):(r=i[0])&&r[e]?r[e]():void 0},exec:function(t){var n=this,r=e.toArray(arguments).slice(1);return n.each(function(e){e[t]&&e[t].apply(e,r)}),n},remove:function(){for(var e=this.length;e--;)this[e].remove();return this},addClass:function(e){return this.each(function(t){t.classes.add(e)})},removeClass:function(e){return this.each(function(t){t.classes.remove(e)})}},e.each("fire on off show hide append prepend before after reflow".split(" "),function(t){i[t]=function(){var n=e.toArray(arguments);return this.each(function(e){t in e&&e[t].apply(e,n)}),this}}),e.each("text name disabled active selected checked visible parent value data".split(" "),function(e){i[e]=function(t){return this.prop(e,t)}}),r=n.extend(i),t.Collection=r,r}),r("tinymce/ui/DomUtils",["tinymce/Env","tinymce/util/Tools","tinymce/dom/DOMUtils"],function(e,t,n){var r=0,i={id:function(){return"mceu_"+r++},create:function(e,r,i){var o=document.createElement(e);return n.DOM.setAttribs(o,r),"string"==typeof i?o.innerHTML=i:t.each(i,function(e){e.nodeType&&o.appendChild(e)}),o},createFragment:function(e){return n.DOM.createFragment(e)},getWindowSize:function(){return n.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,t){return n.DOM.getPos(e,t||i.getContainer())},getContainer:function(){return e.container?e.container:document.body},getViewPort:function(e){return n.DOM.getViewPort(e)},get:function(e){return document.getElementById(e)},addClass:function(e,t){return n.DOM.addClass(e,t)},removeClass:function(e,t){return n.DOM.removeClass(e,t)},hasClass:function(e,t){return n.DOM.hasClass(e,t)},toggleClass:function(e,t,r){return n.DOM.toggleClass(e,t,r)},css:function(e,t,r){return n.DOM.setStyle(e,t,r)},getRuntimeStyle:function(e,t){return n.DOM.getStyle(e,t,!0)},on:function(e,t,r,i){return n.DOM.bind(e,t,r,i)},off:function(e,t,r){return n.DOM.unbind(e,t,r)},fire:function(e,t,r){return n.DOM.fire(e,t,r)},innerHtml:function(e,t){n.DOM.setHTML(e,t)}};return i}),r("tinymce/ui/BoxUtils",[],function(){return{parseBox:function(e){var t,n=10;if(e)return"number"==typeof e?{top:e=e||0,left:e,bottom:e,right:e}:(1===(t=(e=e.split(" ")).length)?e[1]=e[2]=e[3]=e[0]:2===t?(e[2]=e[0],e[3]=e[1]):3===t&&(e[3]=e[1]),{top:parseInt(e[0],n)||0,right:parseInt(e[1],n)||0,bottom:parseInt(e[2],n)||0,left:parseInt(e[3],n)||0})},measureBox:function(e,t){function n(t){var n=document.defaultView;return n?(t=t.replace(/[A-Z]/g,function(e){return"-"+e}),n.getComputedStyle(e,null).getPropertyValue(t)):e.currentStyle[t]}function r(e){var t=parseFloat(n(e),10);return isNaN(t)?0:t}return{top:r(t+"TopWidth"),right:r(t+"RightWidth"),bottom:r(t+"BottomWidth"),left:r(t+"LeftWidth")}}}}),r("tinymce/ui/ClassList",["tinymce/util/Tools"],function(e){function t(){}function n(e){this.cls=[],this.cls._map={},this.onchange=e||t,this.prefix=""}return e.extend(n.prototype,{add:function(e){return e&&!this.contains(e)&&(this.cls._map[e]=!0,this.cls.push(e),this._change()),this},remove:function(e){if(this.contains(e)){for(var t=0;t<this.cls.length&&this.cls[t]!==e;t++);this.cls.splice(t,1),delete this.cls._map[e],this._change()}return this},toggle:function(e,t){var n=this.contains(e);return n!==t&&(n?this.remove(e):this.add(e),this._change()),this},contains:function(e){return!!this.cls._map[e]},_change:function(){delete this.clsValue,this.onchange.call(this)}}),n.prototype.toString=function(){var e;if(this.clsValue)return this.clsValue;e="";for(var t=0;t<this.cls.length;t++)t>0&&(e+=" "),e+=this.prefix+this.cls[t];return e},n}),r("tinymce/ui/ReflowQueue",["tinymce/util/Delay"],function(e){var t,n={};return{add:function(r){var i=r.parent();if(i){if(!i._layout||i._layout.isNative())return;n[i._id]||(n[i._id]=i),t||(t=!0,e.requestAnimationFrame(function(){var e,r;for(e in t=!1,n)(r=n[e]).state.get("rendered")&&r.reflow();n={}},document.body))}},remove:function(e){n[e._id]&&delete n[e._id]}}}),r("tinymce/ui/Control",["tinymce/util/Class","tinymce/util/Tools","tinymce/util/EventDispatcher","tinymce/data/ObservableObject","tinymce/ui/Collection","tinymce/ui/DomUtils","tinymce/dom/DomQuery","tinymce/ui/BoxUtils","tinymce/ui/ClassList","tinymce/ui/ReflowQueue"],function(e,t,n,r,i,o,a,s,l,c){function u(e){return e._eventDispatcher||(e._eventDispatcher=new n({scope:e,toggleEvent:function(t,r){r&&n.isNative(t)&&(e._nativeEvents||(e._nativeEvents={}),e._nativeEvents[t]=!0,e.state.get("rendered")&&d(e))}})),e._eventDispatcher}function d(e){function t(t){var n=e.getParentCtrl(t.target);n&&n.fire(t.type,t)}function n(){var e=c._lastHoverCtrl;e&&(e.fire("mouseleave",{target:e.getEl()}),e.parents().each(function(e){e.fire("mouseleave",{target:e.getEl()})}),c._lastHoverCtrl=null)}function r(t){var n,r,i,o=e.getParentCtrl(t.target),a=c._lastHoverCtrl,s=0;if(o!==a){if(c._lastHoverCtrl=o,(r=o.parents().toArray().reverse()).push(o),a){for((i=a.parents().toArray().reverse()).push(a),s=0;s<i.length&&r[s]===i[s];s++);for(n=i.length-1;n>=s;n--)(a=i[n]).fire("mouseleave",{target:a.getEl()})}for(n=s;n<r.length;n++)(o=r[n]).fire("mouseenter",{target:o.getEl()})}}function i(t){t.preventDefault(),"mousewheel"==t.type?(t.deltaY=-.025*t.wheelDelta,t.wheelDeltaX&&(t.deltaX=-.025*t.wheelDeltaX)):(t.deltaX=0,t.deltaY=t.detail),t=e.fire("wheel",t)}var o,s,l,c,u,d;if(u=e._nativeEvents){for((l=e.parents().toArray()).unshift(e),o=0,s=l.length;!c&&o<s;o++)c=l[o]._eventsRoot;for(c||(c=l[l.length-1]||e),e._eventsRoot=c,s=o,o=0;o<s;o++)l[o]._eventsRoot=c;var f=c._delegates;for(d in f||(f=c._delegates={}),u){if(!u)return!1;"wheel"!==d||h?("mouseenter"===d||"mouseleave"===d?c._hasMouseEnter||(a(c.getEl()).on("mouseleave",n).on("mouseover",r),c._hasMouseEnter=1):f[d]||(a(c.getEl()).on(d,t),f[d]=!0),u[d]=!1):m?a(e.getEl()).on("mousewheel",i):a(e.getEl()).on("DOMMouseScroll",i)}}}var f,m="onmousewheel"in document,h=!1,p="mce-",g=0,v={Statics:{classPrefix:p},isRtl:function(){return f.rtl},classPrefix:p,init:function(e){function n(e){var t;for(e=e.split(" "),t=0;t<e.length;t++)c.classes.add(e[t])}var i,o,c=this
;c.settings=e=t.extend({},c.Defaults,e),c._id=e.id||"mceu_"+g++,c._aria={role:e.role},c._elmCache={},c.$=a,c.state=new r({visible:!0,active:!1,disabled:!1,value:""}),c.data=new r(e.data),c.classes=new l(function(){c.state.get("rendered")&&(c.getEl().className=this.toString())}),c.classes.prefix=c.classPrefix,(i=e.classes)&&(c.Defaults&&(o=c.Defaults.classes)&&i!=o&&n(o),n(i)),t.each("title text name visible disabled active value".split(" "),function(t){t in e&&c[t](e[t])}),c.on("click",function(){if(c.disabled())return!1}),c.settings=e,c.borderBox=s.parseBox(e.border),c.paddingBox=s.parseBox(e.padding),c.marginBox=s.parseBox(e.margin),e.hidden&&c.hide()},Properties:"parent,name",getContainerElm:function(){return o.getContainer()},getParentCtrl:function(e){for(var t,n=this.getRoot().controlIdLookup;e&&n&&!(t=n[e.id]);)e=e.parentNode;return t},initLayoutRect:function(){var e,t,n,r,i,a,l,c,u,d,f=this,m=f.settings,h=f.getEl();e=f.borderBox=f.borderBox||s.measureBox(h,"border"),f.paddingBox=f.paddingBox||s.measureBox(h,"padding"),f.marginBox=f.marginBox||s.measureBox(h,"margin"),d=o.getSize(h),c=m.minWidth,u=m.minHeight,i=c||d.width,a=u||d.height,n=m.width,r=m.height,l=void 0!==(l=m.autoResize)?l:!n&&!r,n=n||i,r=r||a;var p=e.left+e.right,g=e.top+e.bottom,v=m.maxWidth||65535,y=m.maxHeight||65535;return f._layoutRect=t={x:m.x||0,y:m.y||0,w:n,h:r,deltaW:p,deltaH:g,contentW:n-p,contentH:r-g,innerW:n-p,innerH:r-g,startMinWidth:c||0,startMinHeight:u||0,minW:Math.min(i,v),minH:Math.min(a,y),maxW:v,maxH:y,autoResize:l,scrollW:0},f._lastLayoutRect={},t},layoutRect:function(e){var t,n,r,i,o,a,s=this,l=s._layoutRect;return l||(l=s.initLayoutRect()),e?(r=l.deltaW,i=l.deltaH,e.x!==o&&(l.x=e.x),e.y!==o&&(l.y=e.y),e.minW!==o&&(l.minW=e.minW),e.minH!==o&&(l.minH=e.minH),(n=e.w)!==o&&(n=(n=n<l.minW?l.minW:n)>l.maxW?l.maxW:n,l.w=n,l.innerW=n-r),(n=e.h)!==o&&(n=(n=n<l.minH?l.minH:n)>l.maxH?l.maxH:n,l.h=n,l.innerH=n-i),(n=e.innerW)!==o&&(n=(n=n<l.minW-r?l.minW-r:n)>l.maxW-r?l.maxW-r:n,l.innerW=n,l.w=n+r),(n=e.innerH)!==o&&(n=(n=n<l.minH-i?l.minH-i:n)>l.maxH-i?l.maxH-i:n,l.innerH=n,l.h=n+i),e.contentW!==o&&(l.contentW=e.contentW),e.contentH!==o&&(l.contentH=e.contentH),(t=s._lastLayoutRect).x===l.x&&t.y===l.y&&t.w===l.w&&t.h===l.h||((a=f.repaintControls)&&a.map&&!a.map[s._id]&&(a.push(s),a.map[s._id]=!0),t.x=l.x,t.y=l.y,t.w=l.w,t.h=l.h),s):l},repaint:function(){var e,t,n,r,i,o,a,s,l,c,u=this;l=document.createRange?function(e){return e}:Math.round,e=u.getEl().style,r=u._layoutRect,s=u._lastRepaintRect||{},o=(i=u.borderBox).left+i.right,a=i.top+i.bottom,r.x!==s.x&&(e.left=l(r.x)+"px",s.x=r.x),r.y!==s.y&&(e.top=l(r.y)+"px",s.y=r.y),r.w!==s.w&&(c=l(r.w-o),e.width=(c>=0?c:0)+"px",s.w=r.w),r.h!==s.h&&(c=l(r.h-a),e.height=(c>=0?c:0)+"px",s.h=r.h),u._hasBody&&r.innerW!==s.innerW&&(c=l(r.innerW),(n=u.getEl("body"))&&((t=n.style).width=(c>=0?c:0)+"px"),s.innerW=r.innerW),u._hasBody&&r.innerH!==s.innerH&&(c=l(r.innerH),(n=n||u.getEl("body"))&&((t=t||n.style).height=(c>=0?c:0)+"px"),s.innerH=r.innerH),u._lastRepaintRect=s,u.fire("repaint",{},!1)},updateLayoutRect:function(){var e=this;e.parent()._lastRect=null,o.css(e.getEl(),{width:"",height:""}),e._layoutRect=e._lastRepaintRect=e._lastLayoutRect=null,e.initLayoutRect()},on:function(e,t){function n(e){var t,n;return"string"!=typeof e?e:function(i){return t||r.parentsAndSelf().each(function(r){var i=r.settings.callbacks;if(i&&(t=i[e]))return n=r,!1}),t?t.call(n,i):(i.action=e,void this.fire("execute",i))}}var r=this;return u(r).on(e,n(t)),r},off:function(e,t){return u(this).off(e,t),this},fire:function(e,t,n){var r=this;if((t=t||{}).control||(t.control=r),t=u(r).fire(e,t),!1!==n&&r.parent)for(var i=r.parent();i&&!t.isPropagationStopped();)i.fire(e,t,!1),i=i.parent();return t},hasEventListeners:function(e){return u(this).has(e)},parents:function(e){var t,n=this,r=new i;for(t=n.parent();t;t=t.parent())r.add(t);return e&&(r=r.filter(e)),r},parentsAndSelf:function(e){return new i(this).add(this.parents(e))},next:function(){var e=this.parent().items();return e[e.indexOf(this)+1]},prev:function(){var e=this.parent().items();return e[e.indexOf(this)-1]},innerHtml:function(e){return this.$el.html(e),this},getEl:function(e){var t=e?this._id+"-"+e:this._id;return this._elmCache[t]||(this._elmCache[t]=a("#"+t)[0]),this._elmCache[t]},show:function(){return this.visible(!0)},hide:function(){return this.visible(!1)},focus:function(){try{this.getEl().focus()}catch(e){}return this},blur:function(){return this.getEl().blur(),this},aria:function(e,t){var n=this,r=n.getEl(n.ariaTarget);return void 0===t?n._aria[e]:(n._aria[e]=t,n.state.get("rendered")&&r.setAttribute("role"==e?e:"aria-"+e,t),n)},encode:function(e,t){return!1!==t&&(e=this.translate(e)),(e||"").replace(/[&<>"]/g,function(e){return"&#"+e.charCodeAt(0)+";"})},translate:function(e){return f.translate?f.translate(e):e},before:function(e){var t=this,n=t.parent();return n&&n.insert(e,n.items().indexOf(t),!0),t},after:function(e){var t=this,n=t.parent();return n&&n.insert(e,n.items().indexOf(t)),t},remove:function(){var e,t,n=this,r=n.getEl(),i=n.parent();if(n.items){var o=n.items().toArray();for(t=o.length;t--;)o[t].remove()}i&&i.items&&(e=[],i.items().each(function(t){t!==n&&e.push(t)}),i.items().set(e),i._lastRect=null),n._eventsRoot&&n._eventsRoot==n&&a(r).off();var s=n.getRoot().controlIdLookup;return s&&delete s[n._id],r&&r.parentNode&&r.parentNode.removeChild(r),n.state.set("rendered",!1),n.state.destroy(),n.fire("remove"),n},renderBefore:function(e){return a(e).before(this.renderHtml()),this.postRender(),this},renderTo:function(e){return a(e||this.getContainerElm()).append(this.renderHtml()),this.postRender(),this},preRender:function(){},render:function(){},renderHtml:function(){return'<div id="'+this._id+'" class="'+this.classes+'"></div>'},postRender:function(){var e,t,n,r,i,o=this,s=o.settings;for(r in o.$el=a(o.getEl()),o.state.set("rendered",!0),s)0===r.indexOf("on")&&o.on(r.substr(2),s[r]);if(o._eventsRoot){for(n=o.parent();!i&&n;n=n.parent())i=n._eventsRoot;if(i)for(r in i._nativeEvents)o._nativeEvents[r]=!0}d(o),s.style&&(e=o.getEl())&&(e.setAttribute("style",s.style),e.style.cssText=s.style),o.settings.border&&(t=o.borderBox,o.$el.css({"border-top-width":t.top,"border-right-width":t.right,"border-bottom-width":t.bottom,"border-left-width":t.left}));var l=o.getRoot();for(var u in l.controlIdLookup||(l.controlIdLookup={}),l.controlIdLookup[o._id]=o,o._aria)o.aria(u,o._aria[u]);!1===o.state.get("visible")&&(o.getEl().style.display="none"),o.bindStates(),o.state.on("change:visible",function(e){var t,n=e.value;o.state.get("rendered")&&(o.getEl().style.display=!1===n?"none":"",o.getEl().getBoundingClientRect()),(t=o.parent())&&(t._lastRect=null),o.fire(n?"show":"hide"),c.add(o)}),o.fire("postrender",{},!1)},bindStates:function(){},scrollIntoView:function(e){function t(e,t){var n,r,i=e;for(n=r=0;i&&i!=t&&i.nodeType;)n+=i.offsetLeft||0,r+=i.offsetTop||0,i=i.offsetParent;return{x:n,y:r}}var n,r,i,o,a,s,l=this.getEl(),c=l.parentNode,u=t(l,c);return n=u.x,r=u.y,i=l.offsetWidth,o=l.offsetHeight,a=c.clientWidth,s=c.clientHeight,"end"==e?(n-=a-i,r-=s-o):"center"==e&&(n-=a/2-i/2,r-=s/2-o/2),c.scrollLeft=n,c.scrollTop=r,this},getRoot:function(){for(var e,t=this,n=[];t;){if(t.rootControl){e=t.rootControl;break}n.push(t),e=t,t=t.parent()}e||(e=this);for(var r=n.length;r--;)n[r].rootControl=e;return e},reflow:function(){c.remove(this);var e=this.parent();return e._layout&&!e._layout.isNative()&&e.reflow(),this}};return t.each("text title visible disabled active value".split(" "),function(e){v[e]=function(t){return 0===arguments.length?this.state.get(e):(void 0!==t&&this.state.set(e,t),this)}}),f=e.extend(v)}),r("tinymce/ui/Factory",[],function(){var e,t={};return{add:function(e,n){t[e.toLowerCase()]=n},has:function(e){return!!t[e.toLowerCase()]},create:function(n,r){var i,o,a;if(!e){for(o in a=tinymce.ui)t[o.toLowerCase()]=a[o];e=!0}if("string"==typeof n?(r=r||{}).type=n:n=(r=n).type,n=n.toLowerCase(),!(i=t[n]))throw new Error("Could not find control by type: "+n);return(i=new i(r)).type=n,i}}}),r("tinymce/ui/KeyboardNavigation",[],function(){return function(e){function t(e){return e&&1===e.nodeType}function n(e){return t(e=e||b)?e.getAttribute("role"):null}function r(e){for(var t,r=e||b;r=r.parentNode;)if(t=n(r))return t}function i(e){var n=b;if(t(n))return n.getAttribute("aria-"+e)}function o(e){var t=e.tagName.toUpperCase();return"INPUT"==t||"TEXTAREA"==t||"SELECT"==t}function a(e){return!(!o(e)||e.hidden)||!!/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell|slider)$/.test(n(e))}function s(e){function t(e){if(1==e.nodeType&&"none"!=e.style.display&&!e.disabled){a(e)&&n.push(e);for(var r=0;r<e.childNodes.length;r++)t(e.childNodes[r])}}var n=[];return t(e||x.getEl()),n}function l(e){var t,n;(n=(e=e||C).parents().toArray()).unshift(e);for(var r=0;r<n.length&&!(t=n[r]).settings.ariaRoot;r++);return t}function c(e){var t=l(e),n=s(t.getEl());t.settings.ariaRemember&&"lastAriaIndex"in t?u(t.lastAriaIndex,n):u(0,n)}function u(e,t){return e<0?e=t.length-1:e>=t.length&&(e=0),t[e]&&t[e].focus(),e}function d(e,t){var n=-1,r=l();t=t||s(r.getEl());for(var i=0;i<t.length;i++)t[i]===b&&(n=i);n+=e,r.lastAriaIndex=u(n,t)}function f(){"tablist"==r()?d(-1,s(b.parentNode)):C.parent().submenu?v():d(-1)}function m(){var e=n(),t=r();"tablist"==t?d(1,s(b.parentNode)):"menuitem"==e&&"menu"==t&&i("haspopup")?y():d(1)}function h(){d(-1)}function p(){var e=n(),t=r();"menuitem"==e&&"menubar"==t?y():"button"==e&&i("haspopup")?y({key:"down"}):d(1)}function g(e){if("tablist"==r()){var t=s(C.getEl("body"))[0];t&&t.focus()}else d(e.shiftKey?-1:1)}function v(){C.fire("cancel")}function y(e){e=e||{},C.fire("click",{target:b,aria:e})}var b,C,x=e.root;try{b=document.activeElement}catch(w){b=document.body}return C=x.getParentCtrl(b),x.on("keydown",function(e){function t(e,t){o(b)||"slider"!==n(b)&&!1!==t(e)&&e.preventDefault()}if(!e.isDefaultPrevented())switch(e.keyCode){case 37:t(e,f);break;case 39:t(e,m);break;case 38:t(e,h);break;case 40:t(e,p);break;case 27:v();break;case 14:case 13:case 32:t(e,y);break;case 9:!1!==g(e)&&e.preventDefault()}}),x.on("focusin",function(e){b=e.target,C=e.control}),{focusFirst:c}}}),r("tinymce/ui/Container",["tinymce/ui/Control","tinymce/ui/Collection","tinymce/ui/Selector","tinymce/ui/Factory","tinymce/ui/KeyboardNavigation","tinymce/util/Tools","tinymce/dom/DomQuery","tinymce/ui/ClassList","tinymce/ui/ReflowQueue"],function(e,t,n,r,i,o,a,s,l){var c={};return e.extend({init:function(e){var n=this;n._super(e),(e=n.settings).fixed&&n.state.set("fixed",!0),n._items=new t,n.isRtl()&&n.classes.add("rtl"),n.bodyClasses=new s(function(){n.state.get("rendered")&&(n.getEl("body").className=this.toString())}),n.bodyClasses.prefix=n.classPrefix,n.classes.add("container"),n.bodyClasses.add("container-body"),e.containerCls&&n.classes.add(e.containerCls),n._layout=r.create((e.layout||"")+"layout"),n.settings.items?n.add(n.settings.items):n.add(n.render()),n._hasBody=!0},items:function(){return this._items},find:function(e){return(e=c[e]=c[e]||new n(e)).find(this)},add:function(e){var t=this;return t.items().add(t.create(e)).parent(t),t},focus:function(e){var t,n,r,i=this;if(!e||!(n=i.keyboardNav||i.parents().eq(-1)[0].keyboardNav))return r=i.find("*"),i.statusbar&&r.add(i.statusbar.items()),r.each(function(e){if(e.settings.autofocus)return t=null,!1;e.canFocus&&(t=t||e)}),t&&t.focus(),i;n.focusFirst(i)},replace:function(e,t){for(var n,r=this.items(),i=r.length;i--;)if(r[i]===e){r[i]=t;break}i>=0&&((n=t.getEl())&&n.parentNode.removeChild(n),(n=e.getEl())&&n.parentNode.removeChild(n)),t.parent(this)},create:function(t){var n,i=this,a=[];return o.isArray(t)||(t=[t]),o.each(t,function(t){t&&(t instanceof e||("string"==typeof t&&(t={type:t}),n=o.extend({},i.settings.defaults,t),t.type=n.type=n.type||t.type||i.settings.defaultType||(n.defaults?n.defaults.type:null),t=r.create(n)),a.push(t))}),a},renderNew:function(){var e=this;return e.items().each(function(t,n){var r;t.parent(e),t.state.get("rendered")||((r=e.getEl("body")).hasChildNodes()&&n<=r.childNodes.length-1?a(r.childNodes[n]).before(t.renderHtml()):a(r).append(t.renderHtml()),t.postRender(),l.add(t))}),e._layout.applyClasses(e.items().filter(":visible")),e._lastRect=null,e},append:function(e){return this.add(e).renderNew()},prepend:function(e){var t=this;return t.items().set(t.create(e).concat(t.items().toArray())),t.renderNew()},insert:function(e,t,n){var r,i,o,a=this;return e=a.create(e),r=a.items(),!n&&t<r.length-1&&(t+=1),t>=0&&t<r.length&&(i=r.slice(0,t).toArray(),o=r.slice(t).toArray(),r.set(i.concat(e,o))),a.renderNew()},fromJSON:function(e){var t=this;for(var n in e)t.find("#"+n).value(e[n]);return t},toJSON:function(){var e={};return this.find("*").each(function(t){var n=t.name(),r=t.value();n&&void 0!==r&&(e[n]=r)}),e},renderHtml:function(){var e=this,t=e._layout,n=this.settings.role;return e.preRender(),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes+'"'+(n?' role="'+this.settings.role+'"':"")+'><div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></div>"},postRender:function(){var e,t=this;return t.items().exec("postRender"),t._super(),t._layout.postRender(t),t.state.set("rendered",!0),t.settings.style&&t.$el.css(t.settings.style),t.settings.border&&(e=t.borderBox,t.$el.css({"border-top-width":e.top,"border-right-width":e.right,"border-bottom-width":e.bottom,"border-left-width":e.left})),t.parent()||(t.keyboardNav=new i({root:t})),t},initLayoutRect:function(){var e=this,t=e._super();return e._layout.recalc(e),t},recalc:function(){var e=this,t=e._layoutRect,n=e._lastRect;if(!n||n.w!=t.w||n.h!=t.h)return e._layout.recalc(e),t=e.layoutRect(),e._lastRect={x:t.x,y:t.y,w:t.w,h:t.h},!0},reflow:function(){var t;if(l.remove(this),this.visible()){for(e.repaintControls=[],e.repaintControls.map={},this.recalc(),t=e.repaintControls.length;t--;)e.repaintControls[t].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),e.repaintControls=[]}return this}})}),r("tinymce/ui/DragHelper",["tinymce/dom/DomQuery"],function(e){function t(e){var t,n,r,i,o,a,s,l=Math.max;return t=e.documentElement,n=e.body,r=l(t.scrollWidth,n.scrollWidth),i=l(t.clientWidth,n.clientWidth),o=l(t.offsetWidth,n.offsetWidth),a=l(t.scrollHeight,n.scrollHeight),s=l(t.clientHeight,n.clientHeight),{width:r<o?i:r,height:a<l(t.offsetHeight,n.offsetHeight)?s:a}}function n(e){var t,n;if(e.changedTouches)for(t="screenX screenY pageX pageY clientX clientY".split(" "),n=0;n<t.length;n++)e[t[n]]=e.changedTouches[0][t[n]]}return function(r,i){function o(){return m.getElementById(i.handle||r)}var a,s,l,c,u,d,f,m=i.document||document;i=i||{},l=function(r){var l,h,p=t(m);n(r),r.preventDefault(),s=r.button,l=o(),d=r.screenX,f=r.screenY,h=window.getComputedStyle?window.getComputedStyle(l,null).getPropertyValue("cursor"):l.runtimeStyle.cursor,a=e("<div></div>").css({position:"absolute",top:0,left:0,width:p.width,height:p.height,zIndex:2147483647,opacity:1e-4,cursor:h}).appendTo(m.body),e(m).on("mousemove touchmove",u).on("mouseup touchend",c),i.start(r)},u=function(e){if(n(e),e.button!==s)return c(e);e.deltaX=e.screenX-d,e.deltaY=e.screenY-f,e.preventDefault(),i.drag(e)},c=function(t){n(t),e(m).off("mousemove touchmove",u).off("mouseup touchend",c),a.remove(),i.stop&&i.stop(t)},this.destroy=function(){e(o()).off()},e(o()).on("mousedown touchstart",l)}}),r("tinymce/ui/Scrollable",["tinymce/dom/DomQuery","tinymce/ui/DragHelper"],function(e,t){return{init:function(){var e=this;e.on("repaint",e.renderScroll)},renderScroll:function(){function n(){function t(t,a,s,l,c,u){var d,f,m,h,p,g,v,y;if(f=i.getEl("scroll"+t)){if(v=a.toLowerCase(),y=s.toLowerCase(),e(i.getEl("absend")).css(v,i.layoutRect()[l]-1),!c)return void e(f).css("display","none");e(f).css("display","block"),d=i.getEl("body"),m=i.getEl("scroll"+t+"t"),h=d["client"+s]-2*o,p=(h-=n&&r?f["client"+u]:0)/d["scroll"+s],(g={})[v]=d["offset"+a]+o,g[y]=h,e(f).css(g),(g={})[v]=d["scroll"+a]*p,g[y]=h*p,e(m).css(g)}}var n,r,a;a=i.getEl("body"),n=a.scrollWidth>a.clientWidth,r=a.scrollHeight>a.clientHeight,t("h","Left","Width","contentW",n,"Height"),t("v","Top","Height","contentH",r,"Width")}function r(){function n(n,r,a,s,l){var c,u=i._id+"-scroll"+n,d=i.classPrefix;e(i.getEl()).append('<div id="'+u+'" class="'+d+"scrollbar "+d+"scrollbar-"+n+'"><div id="'+u+'t" class="'+d+'scrollbar-thumb"></div></div>'),i.draghelper=new t(u+"t",{start:function(){c=i.getEl("body")["scroll"+r],e("#"+u).addClass(d+"active")},drag:function(e){var t,u,d,f,m=i.layoutRect();u=m.contentW>m.innerW,d=m.contentH>m.innerH,f=i.getEl("body")["client"+a]-2*o,t=(f-=u&&d?i.getEl("scroll"+n)["client"+l]:0)/i.getEl("body")["scroll"+a],i.getEl("body")["scroll"+r]=c+e["delta"+s]/t},stop:function(){e("#"+u).removeClass(d+"active")}})}i.classes.add("scroll"),n("v","Top","Height","Y","Width"),n("h","Left","Width","X","Height")}var i=this,o=2;i.settings.autoScroll&&(i._hasScroll||(i._hasScroll=!0,r(),i.on("wheel",function(e){var t=i.getEl("body");t.scrollLeft+=10*(e.deltaX||0),t.scrollTop+=10*e.deltaY,n()}),e(i.getEl("body")).on("scroll",n)),n())}}}),r("tinymce/ui/Panel",["tinymce/ui/Container","tinymce/ui/Scrollable"],function(e,t){return e.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[t],renderHtml:function(){var e=this,t=e._layout,n=e.settings.html;return e.preRender(),t.preRender(e),void 0===n?n='<div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+t.renderHtml(e)+"</div>":("function"==typeof n&&(n=n.call(e)),e._hasBody=!1),'<div id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1" role="group">'+(e._preBodyHtml||"")+n+"</div>"}})}),r("tinymce/ui/Movable",["tinymce/ui/DomUtils"],function(e){function t(t,n,r){var i,o,a,s,l,c,u,d,f,m;return f=e.getViewPort(),a=(o=e.getPos(n)).x,s=o.y,t.state.get("fixed")&&"static"==e.getRuntimeStyle(document.body,"position")&&(a-=f.x,s-=f.y),i=t.getEl(),l=(m=e.getSize(i)).width,c=m.height,u=(m=e.getSize(n)).width,d=m.height,"b"===(r=(r||"").split(""))[0]&&(s+=d),"r"===r[1]&&(a+=u),"c"===r[0]&&(s+=Math.round(d/2)),"c"===r[1]&&(a+=Math.round(u/2)),"b"===r[3]&&(s-=c),"r"===r[4]&&(a-=l),"c"===r[3]&&(s-=Math.round(c/2)),"c"===r[4]&&(a-=Math.round(l/2)),{x:a,y:s,w:l,h:c}}return{testMoveRel:function(n,r){for(var i=e.getViewPort(),o=0;o<r.length;o++){var a=t(this,n,r[o]);if(this.state.get("fixed")){if(a.x>0&&a.x+a.w<i.w&&a.y>0&&a.y+a.h<i.h)return r[o]}else if(a.x>i.x&&a.x+a.w<i.w+i.x&&a.y>i.y&&a.y+a.h<i.h+i.y)return r[o]}return r[0]},moveRel:function(e,n){"string"!=typeof n&&(n=this.testMoveRel(e,n));var r=t(this,e,n);return this.moveTo(r.x,r.y)},moveBy:function(e,t){var n=this,r=n.layoutRect();return n.moveTo(r.x+e,r.y+t),n},moveTo:function(t,n){function r(e,t,n){return e<0?0:e+n>t&&(e=t-n)<0?0:e}var i=this;if(i.settings.constrainToViewport){var o=e.getViewPort(window),a=i.layoutRect();t=r(t,o.w+o.x,a.w),n=r(n,o.h+o.y,a.h)}return i.state.get("rendered")?i.layoutRect({x:t,y:n}).repaint():(i.settings.x=t,i.settings.y=n),i.fire("move",{x:t,y:n}),i}}}),r("tinymce/ui/Resizable",["tinymce/ui/DomUtils"],function(e){return{resizeToContent:function(){this._layoutRect.autoResize=!0,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}return this._layoutRect.autoResize=!1,this.layoutRect({minW:t,minH:n,w:t,h:n}).reflow()},resizeBy:function(e,t){var n=this,r=n.layoutRect();return n.resizeTo(r.w+e,r.h+t)}}}),r("tinymce/ui/FloatPanel",["tinymce/ui/Panel","tinymce/ui/Movable","tinymce/ui/Resizable","tinymce/ui/DomUtils","tinymce/dom/DomQuery","tinymce/util/Delay"],function(e,t,n,r,i,o){function a(e,t){for(;e;){if(e==t)return!0;e=e.parent()}}function s(e){for(var t=y.length;t--;){var n=y[t],r=n.getParentCtrl(e.target);if(n.settings.autohide){if(r&&(a(r,n)||n.parent()===r))continue;(e=n.fire("autohide",{target:e.target})).isDefaultPrevented()||n.hide()}}}function l(){h||(h=function(e){2!=e.button&&s(e)},i(document).on("click touchstart",h))}function c(){p||(p=function(){var e;for(e=y.length;e--;)d(y[e])},i(window).on("scroll",p))}function u(){if(!g){var e=document.documentElement,t=e.clientWidth,n=e.clientHeight;g=function(){document.all&&t==e.clientWidth&&n==e.clientHeight||(t=e.clientWidth,n=e.clientHeight,C.hideAll())},i(window).on("resize",g)}}function d(e){function t(t,n){for(var r,i=0;i<y.length;i++)if(y[i]!=e)for(r=y[i].parent();r&&(r=r.parent());)r==e&&y[i].fixed(t).moveBy(0,n).repaint()}var n=r.getViewPort().y;e.settings.autofix&&(e.state.get("fixed")?e._autoFixY>n&&(e.fixed(!1).layoutRect({y:e._autoFixY}).repaint(),t(!1,e._autoFixY-n)):(e._autoFixY=e.layoutRect().y,e._autoFixY<n&&(e.fixed(!0).layoutRect({y:0}).repaint(),t(!0,n-e._autoFixY))))}function f(e,t){var n,r,o=C.zIndex||65535;if(e)b.push(t);else for(n=b.length;n--;)b[n]===t&&b.splice(n,1);if(b.length)for(n=0;n<b.length;n++)b[n].modal&&(o++,r=b[n]),b[n].getEl().style.zIndex=o,b[n].zIndex=o,o++;var a=i("#"+t.classPrefix+"modal-block",t.getContainerElm())[0];r?i(a).css("z-index",r.zIndex-1):a&&(a.parentNode.removeChild(a),v=!1),C.currentZIndex=o}function m(e){var t;for(t=y.length;t--;)y[t]===e&&y.splice(t,1);for(t=b.length;t--;)b[t]===e&&b.splice(t,1)}var h,p,g,v,y=[],b=[],C=e.extend({Mixins:[t,n],init:function(e){var t=this;t._super(e),t._eventsRoot=t,t.classes.add("floatpanel"),e.autohide&&(l(),u(),y.push(t)),e.autofix&&(c(),t.on("move",function(){d(this)})),t.on("postrender show",function(e){if(e.control==t){var n,r=t.classPrefix;t.modal&&!v&&((n=i("#"+r+"modal-block",t.getContainerElm()))[0]||(n=i('<div id="'+r+'modal-block" class="'+r+"reset "+r+'fade"></div>').appendTo(t.getContainerElm())),o.setTimeout(function(){n.addClass(r+"in"),i(t.getEl()).addClass(r+"in")}),v=!0),f(!0,t)}}),t.on("show",function(){t.parents().each(function(e){if(e.state.get("fixed"))return t.fixed(!0),!1})}),e.popover&&(t._preBodyHtml='<div class="'+t.classPrefix+'arrow"></div>',t.classes.add("popover").add("bottom").add(t.isRtl()?"end":"start")),t.aria("label",e.ariaLabel),t.aria("labelledby",t._id),t.aria("describedby",t.describedBy||t._id+"-none")},fixed:function(e){var t=this;if(t.state.get("fixed")!=e){if(t.state.get("rendered")){var n=r.getViewPort();e?t.layoutRect().y-=n.y:t.layoutRect().y+=n.y}t.classes.toggle("fixed",e),t.state.set("fixed",e)}return t},show:function(){var e,t=this,n=t._super();for(e=y.length;e--&&y[e]!==t;);return-1===e&&y.push(t),n},hide:function(){return m(this),f(!1,this),this._super()},hideAll:function(){C.hideAll()},close:function(){var e=this;return e.fire("close").isDefaultPrevented()||(e.remove(),f(!1,e)),e},remove:function(){m(this),this._super()},postRender:function(){var e=this;return e.settings.bodyRole&&this.getEl("body").setAttribute("role",e.settings.bodyRole),e._super()}});return C.hideAll=function(){for(var e=y.length;e--;){var t=y[e];t&&t.settings.autohide&&(t.hide(),y.splice(e,1))}},C}),r("tinymce/ui/Window",["tinymce/ui/FloatPanel","tinymce/ui/Panel","tinymce/ui/DomUtils","tinymce/dom/DomQuery","tinymce/ui/DragHelper","tinymce/ui/BoxUtils","tinymce/Env","tinymce/util/Delay"],function(e,t,n,r,i,o,a,s){function l(e){var t,n="width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0",i=r("meta[name=viewport]")[0];!1!==a.overrideViewPort&&(i||((i=document.createElement("meta")).setAttribute("name","viewport"),document.getElementsByTagName("head")[0].appendChild(i)),(t=i.getAttribute("content"))&&void 0!==m&&(m=t),i.setAttribute("content",e?n:m))}function c(e,t){u()&&!1===t&&r([document.documentElement,document.body]).removeClass(e+"fullscreen")}function u(){for(var e=0;e<f.length;e++)if(f[e]._fullscreen)return!0;return!1}function d(){function e(){var e,t,r=n.getWindowSize();for(e=0;e<f.length;e++)t=f[e].layoutRect(),f[e].moveTo(f[e].settings.x||Math.max(0,r.w/2-t.w/2),f[e].settings.y||Math.max(0,r.h/2-t.h/2))}if(!a.desktop){var t={w:window.innerWidth,h:window.innerHeight};s.setInterval(function(){var e=window.innerWidth,n=window.innerHeight;t.w==e&&t.h==n||(t={w:e,h:n},r(window).trigger("resize"))},100)}r(window).on("resize",e)}var f=[],m="",h=e.extend({modal:!0,Defaults:{border:1,layout:"flex",containerCls:"panel",role:"dialog",callbacks:{submit:function(){this.fire("submit",{data:this.toJSON()})},close:function(){this.close()}}},init:function(e){var r=this;r._super(e),r.isRtl()&&r.classes.add("rtl"),r.classes.add("window"),r.bodyClasses.add("window-body"),r.state.set("fixed",!0),e.buttons&&(r.statusbar=new t({layout:"flex",border:"1 0 0 0",spacing:3,padding:10,align:"center",pack:r.isRtl()?"start":"end",defaults:{type:"button"},items:e.buttons}),r.statusbar.classes.add("foot"),r.statusbar.parent(r)),r.on("click",function(e){var t=r.classPrefix+"close";(n.hasClass(e.target,t)||n.hasClass(e.target.parentNode,t))&&r.close()}),r.on("cancel",function(){r.close()}),r.aria("describedby",r.describedBy||r._id+"-none"),r.aria("label",e.title),r._fullscreen=!1},recalc:function(){var e,t,r,i,o=this,a=o.statusbar;o._fullscreen&&(o.layoutRect(n.getWindowSize()),o.layoutRect().contentH=o.layoutRect().innerH),o._super(),e=o.layoutRect(),o.settings.title&&!o._fullscreen&&(t=e.headerW)>e.w&&(r=e.x-Math.max(0,t/2),o.layoutRect({w:t,x:r}),i=!0),a&&(a.layoutRect({w:o.layoutRect().innerW}).recalc(),(t=a.layoutRect().minW+e.deltaW)>e.w&&(r=e.x-Math.max(0,t-e.w),o.layoutRect({w:t,x:r}),i=!0)),i&&o.recalc()},initLayoutRect:function(){var e,t=this,r=t._super(),i=0;if(t.settings.title&&!t._fullscreen){e=t.getEl("head");var o=n.getSize(e);r.headerW=o.width,r.headerH=o.height,i+=r.headerH}t.statusbar&&(i+=t.statusbar.layoutRect().h),r.deltaH+=i,r.minH+=i,r.h+=i;var a=n.getWindowSize();return r.x=t.settings.x||Math.max(0,a.w/2-r.w/2),r.y=t.settings.y||Math.max(0,a.h/2-r.h/2),r},renderHtml:function(){var e=this,t=e._layout,n=e._id,r=e.classPrefix,i=e.settings,o="",a="",s=i.html;return e.preRender(),t.preRender(e),i.title&&(o='<div id="'+n+'-head" class="'+r+'window-head"><div id="'+n+'-title" class="'+r+'title">'+e.encode(i.title)+'</div><div id="'+n+'-dragh" class="'+r+'dragh"></div><button type="button" class="'+r+'close" aria-hidden="true"><i class="mce-ico mce-i-remove"></i></button></div>'),i.url&&(s='<iframe src="'+i.url+'" tabindex="-1"></iframe>'),void 0===s&&(s=t.renderHtml(e)),e.statusbar&&(a=e.statusbar.renderHtml()),'<div id="'+n+'" class="'+e.classes+'" hidefocus="1"><div class="'+e.classPrefix+'reset" role="application">'+o+'<div id="'+n+'-body" class="'+e.bodyClasses+'">'+s+"</div>"+a+"</div></div>"},fullscreen:function(e){var t,i,a=this,l=document.documentElement,c=a.classPrefix;if(e!=a._fullscreen)if(r(window).on("resize",function(){var e;if(a._fullscreen)if(t)a._timer||(a._timer=s.setTimeout(function(){var e=n.getWindowSize();a.moveTo(0,0).resizeTo(e.w,e.h),a._timer=0},50));else{e=(new Date).getTime();var r=n.getWindowSize();a.moveTo(0,0).resizeTo(r.w,r.h),(new Date).getTime()-e>50&&(t=!0)}}),i=a.layoutRect(),a._fullscreen=e,e){a._initial={x:i.x,y:i.y,w:i.w,h:i.h},a.borderBox=o.parseBox("0"),a.getEl("head").style.display="none",i.deltaH-=i.headerH+2,r([l,document.body]).addClass(c+"fullscreen"),a.classes.add("fullscreen");var u=n.getWindowSize();a.moveTo(0,0).resizeTo(u.w,u.h)}else a.borderBox=o.parseBox(a.settings.border),a.getEl("head").style.display="",i.deltaH+=i.headerH,r([l,document.body]).removeClass(c+"fullscreen"),a.classes.remove("fullscreen"),a.moveTo(a._initial.x,a._initial.y).resizeTo(a._initial.w,a._initial.h);return a.reflow()},postRender:function(){var e,t=this;setTimeout(function(){t.classes.add("in"),t.fire("open")},0),t._super(),t.statusbar&&t.statusbar.postRender(),t.focus(),this.dragHelper=new i(t._id+"-dragh",{start:function(){e={x:t.layoutRect().x,y:t.layoutRect().y}},drag:function(n){t.moveTo(e.x+n.deltaX,e.y+n.deltaY)}}),t.on("submit",function(e){e.isDefaultPrevented()||t.close()}),f.push(t),l(!0)},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var e,t=this;for(t.dragHelper.destroy(),t._super(),t.statusbar&&this.statusbar.remove(),c(t.classPrefix,!1),e=f.length;e--;)f[e]===t&&f.splice(e,1);l(f.length>0)},getContentWindow:function(){var e=this.getEl().getElementsByTagName("iframe")[0];return e?e.contentWindow:null}});return d(),h}),r("tinymce/ui/MessageBox",["tinymce/ui/Window"],function(e){var t=e.extend({init:function(e){e={border:1,padding:20,layout:"flex",pack:"center",align:"center",containerCls:"panel",autoScroll:!0,buttons:{type:"button",text:"Ok",action:"ok"},items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200}},this._super(e)},Statics:{OK:1,OK_CANCEL:2,YES_NO:3,YES_NO_CANCEL:4,msgBox:function(n){function r(e,t,n){return{type:"button",text:e,subtype:n?"primary":"",onClick:function(e){e.control.parents()[1].close(),o(t)}}}var i,o=n.callback||function(){};switch(n.buttons){case t.OK_CANCEL:i=[r("Ok",!0,!0),r("Cancel",!1)];break;case t.YES_NO:case t.YES_NO_CANCEL:i=[r("Yes",1,!0),r("No",0)],n.buttons==t.YES_NO_CANCEL&&i.push(r("Cancel",-1));break;default:i=[r("Ok",!0,!0)]}return new e({padding:20,x:n.x,y:n.y,minWidth:300,minHeight:100,layout:"flex",pack:"center",align:"center",buttons:i,title:n.title,role:"alertdialog",items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200,text:n.text},onPostRender:function(){this.aria("describedby",this.items()[0]._id)},onClose:n.onClose,onCancel:function(){o(!1)}}).renderTo(document.body).reflow()},alert:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,t.msgBox(e)},confirm:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,e.buttons=t.OK_CANCEL,t.msgBox(e)}}});return t}),r("tinymce/WindowManager",["tinymce/ui/Window","tinymce/ui/MessageBox"],function(e,t){return function(n){function r(){if(s.length)return s[s.length-1]}function i(e){n.fire("OpenWindow",{win:e})}function o(e){n.fire("CloseWindow",{win:e})}var a=this,s=[];a.windows=s,n.on("remove",function(){for(var e=s.length;e--;)s[e].close()}),a.open=function(t,r){var a;return n.editorManager.setActive(n),t.title=t.title||" ",t.url=t.url||t.file,t.url&&(t.width=parseInt(t.width||320,10),t.height=parseInt(t.height||240,10)),t.body&&(t.items={defaults:t.defaults,type:t.bodyType||"form",items:t.body,data:t.data,callbacks:t.commands}),t.url||t.buttons||(t.buttons=[{text:"Ok",subtype:"primary",onclick:function(){a.find("form")[0].submit()}},{text:"Cancel",onclick:function(){a.close()}}]),a=new e(t),s.push(a),a.on("close",function(){for(var e=s.length;e--;)s[e]===a&&s.splice(e,1);s.length||n.focus(),o(a)}),t.data&&a.on("postRender",function(){this.find("*").each(function(e){var n=e.name();n in t.data&&e.value(t.data[n])})}),a.features=t||{},a.params=r||{},1===s.length&&n.nodeChanged(),i(a=a.renderTo().reflow()),a},a.alert=function(e,r,a){var s;(s=t.alert(e,function(){r?r.call(a||this):n.focus()})).on("close",function(){o(s)}),i(s)},a.confirm=function(e,n,r){var a;(a=t.confirm(e,function(e){n.call(r||this,e)})).on("close",function(){o(a)}),i(a)},a.close=function(){r()&&r().close()},a.getParams=function(){return r()?r().params:null},a.setParams=function(e){r()&&(r().params=e)},a.getWindows=function(){return s}}}),r("tinymce/ui/Tooltip",["tinymce/ui/Control","tinymce/ui/Movable"],function(e,t){return e.extend({Mixins:[t],Defaults:{classes:"widget tooltip tooltip-n"},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.state.get("text"))+"</div></div>"},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl().lastChild.innerHTML=e.encode(t.value)}),e._super()},repaint:function(){var e,t,n=this;e=n.getEl().style,t=n._layoutRect,e.left=t.x+"px",e.top=t.y+"px",e.zIndex=131070}})}),r("tinymce/ui/Widget",["tinymce/ui/Control","tinymce/ui/Tooltip"],function(e,t){var n,r=e.extend({init:function(e){var t=this;t._super(e),e=t.settings,t.canFocus=!0,e.tooltip&&!1!==r.tooltips&&(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.classes.toggle("tooltip-n","bc-tc"==i),r.classes.toggle("tooltip-nw","bc-tl"==i),r.classes.toggle("tooltip-ne","bc-tr"==i),r.moveRel(t.getEl(),i)}else r.hide()}),t.on("mouseleave mousedown click",function(){t.tooltip().hide()})),t.aria("label",e.ariaLabel||e.tooltip)},tooltip:function(){return n||(n=new t({type:"tooltip"})).renderTo(),n},postRender:function(){var e=this,t=e.settings;e._super(),e.parent()||!t.width&&!t.height||(e.initLayoutRect(),e.repaint()),t.autofocus&&e.focus()},bindStates:function(){function e(e){n.aria("disabled",e),n.classes.toggle("disabled",e)}function t(e){
n.aria("pressed",e),n.classes.toggle("active",e)}var n=this;return n.state.on("change:disabled",function(t){e(t.value)}),n.state.on("change:active",function(e){t(e.value)}),n.state.get("disabled")&&e(!0),n.state.get("active")&&t(!0),n._super()},remove:function(){this._super(),n&&(n.remove(),n=null)}});return r}),r("tinymce/ui/Progress",["tinymce/ui/Widget"],function(e){return e.extend({Defaults:{value:0},init:function(e){var t=this;t._super(e),t.classes.add("progress"),t.settings.filter||(t.settings.filter=function(e){return Math.round(e)})},renderHtml:function(){var e=this,t=e._id,n=this.classPrefix;return'<div id="'+t+'" class="'+e.classes+'"><div class="'+n+'bar-container"><div class="'+n+'bar"></div></div><div class="'+n+'text">0%</div></div>'},postRender:function(){var e=this;return e._super(),e.value(e.settings.value),e},bindStates:function(){function e(e){e=t.settings.filter(e),t.getEl().lastChild.innerHTML=e+"%",t.getEl().firstChild.firstChild.style.width=e+"%"}var t=this;return t.state.on("change:value",function(t){e(t.value)}),e(t.state.get("value")),t._super()}})}),r("tinymce/ui/Notification",["tinymce/ui/Control","tinymce/ui/Movable","tinymce/ui/Progress","tinymce/util/Delay"],function(e,t,n,r){return e.extend({Mixins:[t],Defaults:{classes:"widget notification"},init:function(e){var t=this;t._super(e),e.text&&t.text(e.text),e.icon&&(t.icon=e.icon),e.color&&(t.color=e.color),e.type&&t.classes.add("notification-"+e.type),e.timeout&&(e.timeout<0||e.timeout>0)&&!e.closeButton?t.closeButton=!1:(t.classes.add("has-close"),t.closeButton=!0),e.progressBar&&(t.progressBar=new n),t.on("click",function(e){-1!=e.target.className.indexOf(t.classPrefix+"close")&&t.close()})},renderHtml:function(){var e=this,t=e.classPrefix,n="",r="",i="",o="";return e.icon&&(n='<i class="'+t+"ico "+t+"i-"+e.icon+'"></i>'),e.color&&(o=' style="background-color: '+e.color+'"'),e.closeButton&&(r='<button type="button" class="'+t+'close" aria-hidden="true">\xd7</button>'),e.progressBar&&(i=e.progressBar.renderHtml()),'<div id="'+e._id+'" class="'+e.classes+'"'+o+' role="presentation">'+n+'<div class="'+t+'notification-inner">'+e.state.get("text")+"</div>"+i+r+"</div>"},postRender:function(){var e=this;return r.setTimeout(function(){e.$el.addClass(e.classPrefix+"in")}),e._super()},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl().childNodes[1].innerHTML=t.value}),e.progressBar&&e.progressBar.bindStates(),e._super()},close:function(){var e=this;return e.fire("close").isDefaultPrevented()||e.remove(),e},repaint:function(){var e,t,n=this;e=n.getEl().style,t=n._layoutRect,e.left=t.x+"px",e.top=t.y+"px",e.zIndex=65534}})}),r("tinymce/NotificationManager",["tinymce/ui/Notification","tinymce/util/Delay","tinymce/util/Tools"],function(e,t,n){return function(r){function i(){if(f.length)return f[f.length-1]}function o(){t.requestAnimationFrame(function(){a(),s()})}function a(){for(var e=0;e<f.length;e++)f[e].moveTo(0,0)}function s(){if(f.length>0){var e=f.slice(0,1)[0],t=r.inline?r.getElement():r.getContentAreaContainer();if(e.moveRel(t,"tc-tc"),f.length>1)for(var n=1;n<f.length;n++)f[n].moveRel(f[n-1].getEl(),"bc-tc")}}function l(e,t){if(!u(t))return null;var r=n.grep(e,function(e){return c(t,e)});return 0===r.length?null:r[0]}function c(e,t){return e.type===t.settings.type&&e.text===t.settings.text}function u(e){return!e.progressBar&&!e.timeout}var d=this,f=[];d.notifications=f,r.on("remove",function(){for(var e=f.length;e--;)f[e].close()}),r.on("ResizeEditor",s),r.on("ResizeWindow",o),d.open=function(t){if(!r.removed){var n;r.editorManager.setActive(r);var i=l(f,t);return null===i?(n=new e(t),f.push(n),t.timeout>0&&(n.timer=setTimeout(function(){n.close()},t.timeout)),n.on("close",function(){var e=f.length;for(n.timer&&r.getWin().clearTimeout(n.timer);e--;)f[e]===n&&f.splice(e,1);s()}),n.renderTo(),s()):n=i,n}},d.close=function(){i()&&i().close()},d.getNotifications=function(){return f},r.on("SkinLoaded",function(){var e=r.settings.service_message;e&&r.notificationManager.open({text:e,type:"warning",timeout:0,icon:""})})}}),r("tinymce/dom/NodePath",["tinymce/dom/DOMUtils"],function(e){function t(t,n,r){for(var i=[];n&&n!=t;n=n.parentNode)i.push(e.nodeIndex(n,r));return i}function n(e,t){var n,r,i;for(r=e,n=t.length-1;n>=0;n--){if(i=r.childNodes,t[n]>i.length-1)return null;r=i[t[n]]}return r}return{create:t,resolve:n}}),r("tinymce/util/Quirks",["tinymce/util/VK","tinymce/dom/RangeUtils","tinymce/dom/TreeWalker","tinymce/dom/NodePath","tinymce/html/Node","tinymce/html/Entities","tinymce/Env","tinymce/util/Tools","tinymce/util/Delay","tinymce/caret/CaretContainer","tinymce/caret/CaretPosition","tinymce/caret/CaretWalker"],function(e,t,n,r,i,o,a,s,l,c,u,d){return function(f){function m(e,t){try{f.getDoc().execCommand(e,!1,t)}catch(n){}}function h(){var e=f.getDoc().documentMode;return e||6}function p(e){return e.isDefaultPrevented()}function g(e){var t,n;e.dataTransfer&&(f.selection.isCollapsed()&&"IMG"==e.target.tagName&&re.select(e.target),(t=f.selection.getContent()).length>0&&(n=ue+escape(f.id)+","+escape(t),e.dataTransfer.setData(de,n)))}function v(e){var t;return e.dataTransfer&&(t=e.dataTransfer.getData(de))&&t.indexOf(ue)>=0?(t=t.substr(ue.length).split(","),{id:unescape(t[0]),html:unescape(t[1])}):null}function y(e){f.queryCommandSupported("mceInsertClipboardContent")?f.execCommand("mceInsertClipboardContent",!1,{content:e}):f.execCommand("mceInsertContent",!1,e)}function b(){function i(e){var t=E.schema.getBlockElements(),n=f.getBody();if("BR"!=e.nodeName)return!1;for(;e!=n&&!t[e.nodeName];e=e.parentNode)if(e.nextSibling)return!1;return!0}function o(e,t){var n;for(n=e.nextSibling;n&&n!=t;n=n.nextSibling)if((3!=n.nodeType||0!==Z.trim(n.data).length)&&n!==t)return!1;return n===t}function a(e,t,r){var o,a,s;if(E.isChildOf(e,f.getBody()))for(s=E.schema.getNonEmptyElements(),o=new n(r||e,e);a=o[t?"next":"prev"]();){if(s[a.nodeName]&&!i(a))return a;if(3==a.nodeType&&a.data.length>0)return a}}function c(e){var n,r,i,o,s;if(!e.collapsed&&(n=E.getParent(t.getNode(e.startContainer,e.startOffset),E.isBlock),r=E.getParent(t.getNode(e.endContainer,e.endOffset),E.isBlock),s=f.schema.getTextBlockElements(),n!=r&&s[n.nodeName]&&s[r.nodeName]&&"false"!==E.getContentEditable(n)&&"false"!==E.getContentEditable(r)))return e.deleteContents(),i=a(n,!1),o=a(r,!0),E.isEmpty(r)||Z(n).append(r.childNodes),Z(r).remove(),i?1==i.nodeType?"BR"==i.nodeName?(e.setStartBefore(i),e.setEndBefore(i)):(e.setStartAfter(i),e.setEndAfter(i)):(e.setStart(i,i.data.length),e.setEnd(i,i.data.length)):o&&(1==o.nodeType?(e.setStartBefore(o),e.setEndBefore(o)):(e.setStart(o,0),e.setEnd(o,0))),N.setRng(e),!0}function u(e,n){var r,i,s,l,c,u;if(!e.collapsed)return e;if(c=e.startContainer,u=e.startOffset,3==c.nodeType)if(n){if(u<c.data.length)return e}else if(u>0)return e;r=t.getNode(c,u),s=E.getParent(r,E.isBlock),i=a(f.getBody(),n,r),l=E.getParent(i,E.isBlock);var d=1===c.nodeType&&u>c.childNodes.length-1;if(!r||!i)return e;if(l&&s!=l)if(n){if(!o(s,l))return e;1==r.nodeType?"BR"==r.nodeName?e.setStartBefore(r):e.setStartAfter(r):e.setStart(r,r.data.length),1==i.nodeType?e.setEnd(i,0):e.setEndBefore(i)}else{if(!o(l,s))return e;1==i.nodeType?"BR"==i.nodeName?e.setStartBefore(i):e.setStartAfter(i):e.setStart(i,i.data.length),1==r.nodeType&&d?e.setEndAfter(r):e.setEndBefore(r)}return e}function d(e){var t=N.getRng();if(c(t=u(t,e)))return!0}function m(e,t){function n(e,n){return p=Z(n).parents().filter(function(e,t){return!!f.schema.getTextInlineElements()[t.nodeName]}),l=e.cloneNode(!1),(p=s.map(p,function(e){return e=e.cloneNode(!1),l.hasChildNodes()?(e.appendChild(l.firstChild),l.appendChild(e)):l.appendChild(e),l.appendChild(e),e})).length?(h=E.create("br"),p[0].appendChild(h),E.replace(l,e),t.setStartBefore(h),t.setEndBefore(h),f.selection.setRng(t),h):null}function i(e){return e&&f.schema.getTextBlockElements()[e.tagName]}var o,a,l,c,u,d,m,h,p;if(t.collapsed&&(d=t.startContainer,m=t.startOffset,i(a=E.getParent(d,E.isBlock))))if(1==d.nodeType){if((d=d.childNodes[m])&&"BR"!=d.tagName)return;if(u=e?a.nextSibling:a.previousSibling,E.isEmpty(a)&&i(u)&&E.isEmpty(u)&&n(a,d))return E.remove(u),!0}else if(3==d.nodeType){if(o=r.create(a,d),c=a.cloneNode(!0),d=r.resolve(c,o),e){if(m>=d.data.length)return;d.deleteData(m,1)}else{if(m<=0)return;d.deleteData(m-1,1)}if(E.isEmpty(c))return n(a,d)}}function h(e){var t,n,r;d(e)||(s.each(f.getBody().getElementsByTagName("*"),function(e){"SPAN"==e.tagName&&e.setAttribute("mce-data-marked",1),!e.hasAttribute("data-mce-style")&&e.hasAttribute("style")&&f.dom.setAttrib(e,"style",f.dom.getAttrib(e,"style"))}),(t=new S(function(){})).observe(f.getDoc(),{childList:!0,attributes:!0,subtree:!0,attributeFilter:["style"]}),f.getDoc().execCommand(e?"ForwardDelete":"Delete",!1,null),n=f.selection.getRng(),r=n.startContainer.parentNode,s.each(t.takeRecords(),function(e){if(E.isChildOf(e.target,f.getBody())){if("style"==e.attributeName){var t=e.target.getAttribute("data-mce-style");t?e.target.setAttribute("style",t):e.target.removeAttribute("style")}s.each(e.addedNodes,function(e){var t,i;"SPAN"!=e.nodeName||e.getAttribute("mce-data-marked")||(e==r&&(t=n.startOffset,i=e.firstChild),E.remove(e,!0),i&&(n.setStart(i,t),n.setEnd(i,t),f.selection.setRng(n)))})}}),t.disconnect(),s.each(f.dom.select("span[mce-data-marked]"),function(e){e.removeAttribute("mce-data-marked")}))}function b(e){f.undoManager.transact(function(){h(e)})}var C,x,w=f.getDoc(),E=f.dom,N=f.selection,S=window.MutationObserver;S||(C=!0,S=function(){function e(e){var t=e.relatedNode||e.target;r.push({target:t,addedNodes:[t]})}function t(e){var t=e.relatedNode||e.target;r.push({target:t,attributeName:e.attrName})}var n,r=[];this.observe=function(r){(n=r).addEventListener("DOMSubtreeModified",e,!1),n.addEventListener("DOMNodeInsertedIntoDocument",e,!1),n.addEventListener("DOMNodeInserted",e,!1),n.addEventListener("DOMAttrModified",t,!1)},this.disconnect=function(){n.removeEventListener("DOMSubtreeModified",e,!1),n.removeEventListener("DOMNodeInsertedIntoDocument",e,!1),n.removeEventListener("DOMNodeInserted",e,!1),n.removeEventListener("DOMAttrModified",t,!1)},this.takeRecords=function(){return r}}),f.on("keydown",function(e){var t=e.keyCode==te,n=e.ctrlKey||e.metaKey;if(!p(e)&&(t||e.keyCode==ee)){var r=f.selection.getRng(),i=r.startContainer,o=r.startOffset;if(t&&e.shiftKey)return;if(m(t,r))return void e.preventDefault();if(!n&&r.collapsed&&3==i.nodeType&&(t?o<i.data.length:o>0))return;e.preventDefault(),n&&f.selection.getSel().modify("extend",t?"forward":"backward",e.metaKey?"lineboundary":"word"),h(t)}}),f.on("keypress",function(t){var n,r,i,o,a,s;!p(t)&&!N.isCollapsed()&&t.charCode>31&&!e.metaKeyPressed(t)&&(n=f.selection.getRng(),s=String.fromCharCode(t.charCode),t.preventDefault(),r=Z(n.startContainer).parents().filter(function(e,t){return!!f.schema.getTextInlineElements()[t.nodeName]}),h(!0),(r=r.filter(function(e,t){return!Z.contains(f.getBody(),t)})).length?(i=E.createFragment(),r.each(function(e,t){t=t.cloneNode(!1),i.hasChildNodes()?(t.appendChild(i.firstChild),i.appendChild(t)):(a=t,i.appendChild(t)),i.appendChild(t)}),a.appendChild(f.getDoc().createTextNode(s)),o=E.getParent(n.startContainer,E.isBlock),E.isEmpty(o)?Z(o).empty().append(i):n.insertNode(i),n.setStart(a.firstChild,1),n.setEnd(a.firstChild,1),f.selection.setRng(n)):f.selection.setContent(s))}),f.addCommand("Delete",function(){h()}),f.addCommand("ForwardDelete",function(){h(!0)}),C||(f.on("dragstart",function(e){x=N.getRng(),g(e)}),f.on("drop",function(e){if(!p(e)){var n=v(e);n&&(e.preventDefault(),l.setEditorTimeout(f,function(){var r=t.getCaretRangeFromPoint(e.x,e.y,w);x&&(N.setRng(x),x=null,b()),N.setRng(r),y(n.html)}))}}),f.on("cut",function(e){p(e)||!e.clipboardData||f.selection.isCollapsed()||(e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/html",f.selection.getContent()),e.clipboardData.setData("text/plain",f.selection.getContent({format:"text"})),l.setEditorTimeout(f,function(){b(!0)}))}))}function C(){function e(e){var t=ne.create("body"),n=e.cloneContents();return t.appendChild(n),re.serializer.serialize(t,{format:"html"})}function n(n){if(!n.setStart){if(n.item)return!1;var r=n.duplicate();return r.moveToElementText(f.getBody()),t.compareRanges(n,r)}var i=e(n),o=ne.createRng();return o.selectNode(f.getBody()),i===e(o)}f.on("keydown",function(e){var t,r,i=e.keyCode;if(!p(e)&&(i==te||i==ee)){if(t=f.selection.isCollapsed(),r=f.getBody(),t&&!ne.isEmpty(r))return;if(!t&&!n(f.selection.getRng()))return;e.preventDefault(),f.setContent(""),r.firstChild&&ne.isBlock(r.firstChild)?f.selection.setCursorLocation(r.firstChild,0):f.selection.setCursorLocation(r,0),f.nodeChanged()}})}function x(){f.shortcuts.add("meta+a",null,"SelectAll")}function w(){f.settings.content_editable||ne.bind(f.getDoc(),"mousedown mouseup",function(e){var t;if(e.target==f.getDoc().documentElement)if(t=re.getRng(),f.getBody().focus(),"mousedown"==e.type){if(c.isCaretContainer(t.startContainer))return;re.placeCaretAt(e.clientX,e.clientY)}else re.setRng(t)})}function E(){f.on("keydown",function(e){if(!p(e)&&e.keyCode===ee){if(!f.getBody().getElementsByTagName("hr").length)return;if(re.isCollapsed()&&0===re.getRng(!0).startOffset){var t=re.getNode(),n=t.previousSibling;if("HR"==t.nodeName)return ne.remove(t),void e.preventDefault();n&&n.nodeName&&"hr"===n.nodeName.toLowerCase()&&(ne.remove(n),e.preventDefault())}}})}function N(){window.Range.prototype.getClientRects||f.on("mousedown",function(e){if(!p(e)&&"HTML"===e.target.nodeName){var t=f.getBody();t.blur(),l.setEditorTimeout(f,function(){t.focus()})}})}function S(){f.on("click",function(e){var t=e.target;/^(IMG|HR)$/.test(t.nodeName)&&"false"!==ne.getContentEditableParent(t)&&(e.preventDefault(),re.select(t),f.nodeChanged()),"A"==t.nodeName&&ne.hasClass(t,"mce-item-anchor")&&(e.preventDefault(),re.select(t))})}function _(){function e(){var e=ne.getAttribs(re.getStart().cloneNode(!1));return function(){var t=re.getStart();t!==f.getBody()&&(ne.setAttrib(t,"style",null),Q(e,function(e){t.setAttributeNode(e.cloneNode(!0))}))}}function t(){return!re.isCollapsed()&&ne.getParent(re.getStart(),ne.isBlock)!=ne.getParent(re.getEnd(),ne.isBlock)}f.on("keypress",function(n){var r;if(!p(n)&&(8==n.keyCode||46==n.keyCode)&&t())return r=e(),f.getDoc().execCommand("delete",!1,null),r(),n.preventDefault(),!1}),ne.bind(f.getDoc(),"cut",function(n){var r;!p(n)&&t()&&(r=e(),l.setEditorTimeout(f,function(){r()}))})}function k(){document.body.setAttribute("role","application")}function T(){f.on("keydown",function(e){if(!p(e)&&e.keyCode===ee&&re.isCollapsed()&&0===re.getRng(!0).startOffset){var t=re.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})}function R(){h()>7||(m("RespectVisibilityInDesign",!0),f.contentStyles.push(".mceHideBrInPre pre br {display: none}"),ne.addClass(f.getBody(),"mceHideBrInPre"),oe.addNodeFilter("pre",function(e){for(var t,n,r,o,a=e.length;a--;)for(n=(t=e[a].getAll("br")).length;n--;)(o=(r=t[n]).prev)&&3===o.type&&"\n"!=o.value.charAt(o.value-1)?o.value+="\n":r.parent.insert(new i("#text",3),r,!0).value="\n"}),ae.addNodeFilter("pre",function(e){for(var t,n,r,i=e.length;i--;)for(n=(t=e[i].getAll("br")).length;n--;)(r=t[n].prev)&&3==r.type&&(r.value=r.value.replace(/\r?\n$/,""))}))}function A(){ne.bind(f.getBody(),"mouseup",function(){var e,t=re.getNode();"IMG"==t.nodeName&&((e=ne.getStyle(t,"width"))&&(ne.setAttrib(t,"width",e.replace(/[^0-9%]+/g,"")),ne.setStyle(t,"width","")),(e=ne.getStyle(t,"height"))&&(ne.setAttrib(t,"height",e.replace(/[^0-9%]+/g,"")),ne.setStyle(t,"height","")))})}function B(){f.on("keydown",function(t){var n,r,i,o,a;if(!p(t)&&t.keyCode==e.BACKSPACE&&(r=(n=re.getRng()).startContainer,i=n.startOffset,o=ne.getRoot(),a=r,n.collapsed&&0===i)){for(;a&&a.parentNode&&a.parentNode.firstChild==a&&a.parentNode!=o;)a=a.parentNode;"BLOCKQUOTE"===a.tagName&&(f.formatter.toggle("blockquote",null,a),(n=ne.createRng()).setStart(r,0),n.setEnd(r,0),re.setRng(n))}})}function D(){function e(){K(),m("StyleWithCSS",!1),m("enableInlineTableEditing",!1),ie.object_resizing||m("enableObjectResizing",!1)}ie.readonly||f.on("BeforeExecCommand MouseDown",e)}function M(){function e(){Q(ne.select("a"),function(e){var t=e.parentNode,n=ne.getRoot();if(t.lastChild===e){for(;t&&!ne.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}ne.add(t,"br",{"data-mce-bogus":1})}})}f.on("SetContent ExecCommand",function(t){"setcontent"!=t.type&&"mceInsertLink"!==t.command||e()})}function L(){ie.forced_root_block&&f.on("init",function(){m("DefaultParagraphSeparator",ie.forced_root_block)})}function P(){f.on("keydown",function(e){var t;p(e)||e.keyCode!=ee||(t=f.getDoc().selection.createRange())&&t.item&&(e.preventDefault(),f.undoManager.beforeChange(),ne.remove(t.item(0)),f.undoManager.add())})}function O(){var e;h()>=10&&(e="",Q("p div h1 h2 h3 h4 h5 h6".split(" "),function(t,n){e+=(n>0?",":"")+t+":empty"}),f.contentStyles.push(e+"{padding-right: 1px !important}"))}function H(){h()<9&&(oe.addNodeFilter("noscript",function(e){for(var t,n,r=e.length;r--;)(n=(t=e[r]).firstChild)&&t.attr("data-mce-innertext",n.value)}),ae.addNodeFilter("noscript",function(e){for(var t,n,r,a=e.length;a--;)t=e[a],(n=e[a].firstChild)?n.value=o.decode(n.value):(r=t.attributes.map["data-mce-innertext"])&&(t.attr("data-mce-innertext",null),(n=new i("#text",3)).value=r,n.raw=!0,t.append(n))}))}function I(){function e(e,t){var n=s.createTextRange();try{n.moveToPoint(e,t)}catch(r){n=null}return n}function t(t){var r;t.button?(r=e(t.x,t.y))&&(r.compareEndPoints("StartToStart",i)>0?r.setEndPoint("StartToStart",i):r.setEndPoint("EndToEnd",i),r.select()):n()}function n(){var e=a.selection.createRange();i&&!e.item&&0===e.compareEndPoints("StartToEnd",e)&&i.select(),ne.unbind(a,"mouseup",n),ne.unbind(a,"mousemove",t),i=r=0}var r,i,o,a=ne.doc,s=a.body;a.documentElement.unselectable=!0,ne.bind(a,"mousedown contextmenu",function(s){if("HTML"===s.target.nodeName){if(r&&n(),(o=a.documentElement).scrollHeight>o.clientHeight)return;r=1,(i=e(s.x,s.y))&&(ne.bind(a,"mouseup",n),ne.bind(a,"mousemove",t),ne.getRoot().focus(),i.select())}})}function F(){f.on("keyup focusin mouseup",function(t){65==t.keyCode&&e.metaKeyPressed(t)||re.normalize()},!0)}function U(){f.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")}function z(){f.inline||f.on("keydown",function(){document.activeElement==document.body&&f.getWin().focus()})}function W(){f.inline||(f.contentStyles.push("body {min-height: 150px}"),f.on("click",function(e){var t;if("HTML"==e.target.nodeName){if(a.ie>11)return void f.getBody().focus();t=f.selection.getRng(),f.getBody().focus(),f.selection.setRng(t),f.selection.normalize(),f.nodeChanged()}}))}function V(){a.mac&&f.on("keydown",function(t){!e.metaKeyPressed(t)||t.shiftKey||37!=t.keyCode&&39!=t.keyCode||(t.preventDefault(),f.selection.getSel().modify("move",37==t.keyCode?"backward":"forward","lineboundary"))})}function $(){m("AutoUrlDetect",!1)}function q(){f.on("click",function(e){var t=e.target;do{if("A"===t.tagName)return void e.preventDefault()}while(t=t.parentNode)}),f.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")}function j(){f.on("init",function(){f.dom.bind(f.getBody(),"submit",function(e){e.preventDefault()})})}function Y(){oe.addNodeFilter("br",function(e){for(var t=e.length;t--;)"Apple-interchange-newline"==e[t].attr("class")&&e[t].remove()})}function X(){f.on("dragstart",function(e){g(e)}),f.on("drop",function(e){if(!p(e)){var n=v(e);if(n&&n.id!=f.id){e.preventDefault();var r=t.getCaretRangeFromPoint(e.x,e.y,f.getDoc());re.setRng(r),y(n.html)}}})}function K(){}function G(){var e;return se?!(e=f.selection.getSel())||!e.rangeCount||0===e.rangeCount:0}function J(){function t(e){var t=new d(e.getBody()),n=e.selection.getRng(),r=u.fromRangeStart(n),i=u.fromRangeEnd(n),o=t.prev(r),a=t.next(i);return!e.selection.isCollapsed()&&(!o||o.isAtStart()&&r.isEqual(o))&&(!a||a.isAtEnd()&&r.isEqual(a))}f.on("keypress",function(n){!p(n)&&!re.isCollapsed()&&n.charCode>31&&!e.metaKeyPressed(n)&&t(f)&&(n.preventDefault(),f.setContent(String.fromCharCode(n.charCode)),f.selection.select(f.getBody(),!0),f.selection.collapse(!1),f.nodeChanged())}),f.on("keydown",function(e){var n=e.keyCode;p(e)||n!=te&&n!=ee||t(f)&&(e.preventDefault(),f.setContent(""),f.nodeChanged())})}var Q=s.each,Z=f.$,ee=e.BACKSPACE,te=e.DELETE,ne=f.dom,re=f.selection,ie=f.settings,oe=f.parser,ae=f.serializer,se=a.gecko,le=a.ie,ce=a.webkit,ue="data:text/mce-internal,",de=le?"Text":"URL";return B(),C(),a.windowsPhone||F(),ce&&(J(),b(),w(),S(),L(),j(),T(),Y(),a.iOS?(z(),W(),q()):x()),le&&a.ie<11&&(E(),k(),R(),A(),P(),O(),H(),I()),a.ie>=11&&(W(),T()),a.ie&&(x(),$(),X()),se&&(J(),E(),N(),_(),D(),M(),U(),V(),T()),{refreshContentEditable:K,isHidden:G}}}),r("tinymce/EditorObservable",["tinymce/util/Observable","tinymce/dom/DOMUtils","tinymce/util/Tools"],function(e,t,n){function r(e,t){return"selectionchange"==t?e.getDoc():!e.inline&&/^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(t)?e.getDoc().documentElement:e.settings.event_root?(e.eventRoot||(e.eventRoot=a.select(e.settings.event_root)[0]),e.eventRoot):e.getBody()}function i(e,t){function n(e){return!e.hidden&&!e.readonly}var i,s=r(e,t);if(e.delegates||(e.delegates={}),!e.delegates[t])if(e.settings.event_root){if(o||(o={},e.editorManager.on("removeEditor",function(){var t;if(!e.editorManager.activeEditor&&o){for(t in o)e.dom.unbind(r(e,t));o=null}})),o[t])return;i=function(r){for(var i=r.target,o=e.editorManager.editors,s=o.length;s--;){var l=o[s].getBody();(l===i||a.isChildOf(i,l))&&n(o[s])&&o[s].fire(t,r)}},o[t]=i,a.bind(s,t,i)}else i=function(r){n(e)&&e.fire(t,r)},a.bind(s,t,i),e.delegates[t]=i}var o,a=t.DOM,s={bindPendingEventDelegates:function(){var e=this;n.each(e._pendingNativeEvents,function(t){i(e,t)})},toggleNativeEvent:function(e,t){var n=this;"focus"!=e&&"blur"!=e&&(t?n.initialized?i(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&(n.dom.unbind(r(n,e),e,n.delegates[e]),delete n.delegates[e]))},unbindAllNativeEvents:function(){var e,t=this;if(t.delegates){for(e in t.delegates)t.dom.unbind(r(t,e),e,t.delegates[e]);delete t.delegates}t.inline||(t.getBody().onload=null,t.dom.unbind(t.getWin()),t.dom.unbind(t.getDoc())),t.dom.unbind(t.getBody()),t.dom.unbind(t.getContainer())}};return s=n.extend({},e,s)}),r("tinymce/Mode",[],function(){function e(e,t,n){try{e.getDoc().execCommand(t,!1,n)}catch(r){}}function t(e){var t,n;return t=e.getBody(),n=function(t){e.dom.getParents(t.target,"a").length>0&&t.preventDefault()},e.dom.bind(t,"click",n),{unbind:function(){e.dom.unbind(t,"click",n)}}}function n(n,r){n._clickBlocker&&(n._clickBlocker.unbind(),n._clickBlocker=null),r?(n._clickBlocker=t(n),n.selection.controlSelection.hideResizeRect(),n.readonly=!0,n.getBody().contentEditable=!1):(n.readonly=!1,n.getBody().contentEditable=!0,e(n,"StyleWithCSS",!1),e(n,"enableInlineTableEditing",!1),e(n,"enableObjectResizing",!1),n.focus(),n.nodeChanged())}function r(e,t){var r=e.readonly?"readonly":"design";t!=r&&(e.initialized?n(e,"readonly"==t):e.on("init",function(){n(e,"readonly"==t)}),e.fire("SwitchMode",{mode:t}))}return{setMode:r}}),r("tinymce/Shortcuts",["tinymce/util/Tools","tinymce/Env"],function(e,t){var n=e.each,r=e.explode,i={f9:120,f10:121,f11:122},o=e.makeMap("alt,ctrl,shift,meta,access");return function(a){function s(e){var a,s,l={};for(s in n(r(e,"+"),function(e){e in o?l[e]=!0:/^[0-9]{2,}$/.test(e)?l.keyCode=parseInt(e,10):(l.charCode=e.charCodeAt(0),l.keyCode=i[e]||e.toUpperCase().charCodeAt(0))}),a=[l.keyCode],o)l[s]?a.push(s):l[s]=!1;return l.id=a.join(","),l.access&&(l.alt=!0,t.mac?l.ctrl=!0:l.shift=!0),l.meta&&(t.mac?l.meta=!0:(l.ctrl=!0,l.meta=!1)),l}function l(t,n,i,o){var l;return(l=e.map(r(t,">"),s))[l.length-1]=e.extend(l[l.length-1],{func:i,scope:o||a}),e.extend(l[0],{desc:a.translate(n),subpatterns:l.slice(1)})}function c(e){return e.altKey||e.ctrlKey||e.metaKey}function u(e){return"keydown"===e.type&&e.keyCode>=112&&e.keyCode<=123}function d(e,t){return!!t&&(t.ctrl==e.ctrlKey&&t.meta==e.metaKey&&(t.alt==e.altKey&&t.shift==e.shiftKey&&(!!(e.keyCode==t.keyCode||e.charCode&&e.charCode==t.charCode)&&(e.preventDefault(),!0))))}function f(e){return e.func?e.func.call(e.scope):null}var m=this,h={},p=[];a.on("keyup keypress keydown",function(e){!c(e)&&!u(e)||e.isDefaultPrevented()||(n(h,function(t){if(d(e,t))return p=t.subpatterns.slice(0),"keydown"==e.type&&f(t),!0}),d(e,p[0])&&(1===p.length&&"keydown"==e.type&&f(p[0]),p.shift()))}),m.add=function(t,i,o,s){var c;return c=o,"string"==typeof o?o=function(){a.execCommand(c,!1,null)}:e.isArray(c)&&(o=function(){a.execCommand(c[0],c[1],c[2])}),n(r(e.trim(t.toLowerCase())),function(e){var t=l(e,i,o,s);h[t.id]=t}),!0},m.remove=function(e){var t=l(e);return!!h[t.id]&&(delete h[t.id],!0)}}}),r("tinymce/file/Uploader",["tinymce/util/Promise","tinymce/util/Tools","tinymce/util/Fun"],function(e,t,n){return function(r,i){function o(e){var t;return t={"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png"}[e.blob().type.toLowerCase()]||"dat",e.filename()+"."+t}function a(e,t){return e?e.replace(/\/$/,"")+"/"+t.replace(/^\//,""):t}function s(e){return{id:e.id,blob:e.blob,base64:e.base64,filename:n.constant(o(e))}}function l(e,t,n,r){var o,s;(o=new XMLHttpRequest).open("POST",i.url),o.withCredentials=i.credentials,o.upload.onprogress=function(e){r(e.loaded/e.total*100)},o.onerror=function(){n("Image upload failed due to a XHR Transport error. Code: "+o.status)},o.onload=function(){var e;200==o.status?(e=JSON.parse(o.responseText))&&"string"==typeof e.location?t(a(i.basePath,e.location)):n("Invalid JSON: "+o.responseText):n("HTTP Error: "+o.status)},(s=new FormData).append("file",e.blob(),e.filename()),o.send(s)}function c(){return new e(function(e){e([])})}function u(e,t){return{url:t,blobInfo:e,status:!0}}function d(e,t){return{url:"",blobInfo:e,status:!1,error:t}}function f(e,n){t.each(y[e],function(e){e(n)}),delete y[e]}function m(t,n,i){return r.markPending(t.blobUri()),new e(function(e){var o,a,l=function(){};try{var c=function(){o&&(o.close(),a=l)},m=function(n){c(),r.markUploaded(t.blobUri(),n),f(t.blobUri(),u(t,n)),e(u(t,n))},h=function(n){c(),r.removeFailed(t.blobUri()),f(t.blobUri(),d(t,n)),e(d(t,n))};a=function(e){e<0||e>100||(o||(o=i()),o.progressBar.value(e))},n(s(t),m,h,a)}catch(p){e(d(t,p.message))}})}function h(e){return e===l}function p(t){var n=t.blobUri();return new e(function(e){y[n]=y[n]||[],y[n].push(e)})}function g(n,o){return n=t.grep(n,function(e){return!r.isUploaded(e.blobUri())}),e.all(t.map(n,function(e){return r.isPending(e.blobUri())?p(e):m(e,i.handler,o)}))}function v(e,t){return!i.url&&h(i.handler)?c():g(e,t)}var y={};return i=t.extend({credentials:!1,handler:l},i),{upload:v}}}),r("tinymce/file/Conversions",["tinymce/util/Promise"],function(e){function t(t){return new e(function(e){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="blob",n.onload=function(){200==this.status&&e(this.response)},n.send()})}function n(e){var t,n;return e=decodeURIComponent(e).split(","),(n=/data:([^;]+)/.exec(e[0]))&&(t=n[1]),{type:t,data:e[1]}}function r(t){return new e(function(e){var r,i,o;t=n(t);try{r=atob(t.data)}catch(a){return void e(new Blob([]))}for(i=new Uint8Array(r.length),o=0;o<i.length;o++)i[o]=r.charCodeAt(o);e(new Blob([i],{type:t.type}))})}function i(e){return 0===e.indexOf("blob:")?t(e):0===e.indexOf("data:")?r(e):null}function o(t){return new e(function(e){var n=new FileReader;n.onloadend=function(){e(n.result)},n.readAsDataURL(t)})}return{uriToBlob:i,blobToDataUri:o,parseDataUri:n}}),r("tinymce/file/ImageScanner",["tinymce/util/Promise","tinymce/util/Arr","tinymce/util/Fun","tinymce/file/Conversions","tinymce/Env"],function(e,t,n,r,i){var o=0,a=function(e){return(e||"blobid")+o++};return function(o,s){function l(l,u){function d(e,t){var n,i;0!==e.src.indexOf("blob:")?(n=r.parseDataUri(e.src).data,(i=s.findFirst(function(e){return e.base64()===n}))?t({image:e,blobInfo:i}):r.uriToBlob(e.src).then(function(r){i=s.create(a(),r,n),s.add(i),t({image:e,blobInfo:i})})):(i=s.getByUri(e.src))?t({image:e,blobInfo:i}):r.uriToBlob(e.src).then(function(o){r.blobToDataUri(o).then(function(l){n=r.parseDataUri(l).data,i=s.create(a(),o,n),s.add(i),t({image:e,blobInfo:i})})})}var f,m;return u||(u=n.constant(!0)),f=t.filter(l.getElementsByTagName("img"),function(e){var t=e.src;return!!i.fileApi&&(!e.hasAttribute("data-mce-bogus")&&(!e.hasAttribute("data-mce-placeholder")&&(!(!t||t==i.transparentSrc)&&(0===t.indexOf("blob:")?!o.isUploaded(t):0===t.indexOf("data:")&&u(e)))))}),m=t.map(f,function(t){var n;return c[t.src]?new e(function(e){c[t.src].then(function(n){e({image:t,blobInfo:n.blobInfo})})}):(n=new e(function(e){d(t,e)}).then(function(e){return delete c[e.image.src],e})["catch"](function(e){return delete c[t.src],e}),c[t.src]=n,n)}),e.all(m)}var c={};return{findAll:l}}}),r("tinymce/file/BlobCache",["tinymce/util/Arr","tinymce/util/Fun"],function(e,t){return function(){function n(e,t,n,r){return{id:u(e),filename:u(r||e),blob:u(t),base64:u(n),blobUri:u(URL.createObjectURL(t))}}function r(e){i(e.id())||c.push(e)}function i(e){return o(function(t){return t.id()===e})}function o(t){return e.filter(c,t)[0]}function a(e){return o(function(t){return t.blobUri()==e})}function s(t){c=e.filter(c,function(e){return e.blobUri()!==t||(URL.revokeObjectURL(e.blobUri()),!1)})}function l(){e.each(c,function(e){URL.revokeObjectURL(e.blobUri())}),c=[]}var c=[],u=t.constant;return{create:n,add:r,get:i,getByUri:a,findFirst:o,removeByUri:s,destroy:l}}}),r("tinymce/file/UploadStatus",[],function(){return function(){function e(e,t){return{status:e,resultUri:t}}function t(e){return e in d}function n(e){var t=d[e];return t?t.resultUri:null}function r(e){return!!t(e)&&d[e].status===c}function i(e){return!!t(e)&&d[e].status===u}function o(t){d[t]=e(c,null)}function a(t,n){d[t]=e(u,n)}function s(e){delete d[e]}function l(){d={}}var c=1,u=2,d={};return{hasBlobUri:t,getResultUri:n,isPending:r,isUploaded:i,markPending:o,markUploaded:a,removeFailed:s,destroy:l}}}),r("tinymce/ErrorReporter",["tinymce/AddOnManager"],function(e){var t=e.PluginManager,n=function(e,n){for(var r in t.urls){if(t.urls[r]+"/plugin"+n+".js"===e)return r}return null},r=function(e,t){var r=n(t,e.suffix);return r?"Failed to load plugin: "+r+" from url "+t:"Failed to load plugin url: "+t},i=function(e,t){e.notificationManager.open({type:"error",text:t})},o=function(e,t){e._skinLoaded?i(e,t):e.on("SkinLoaded",function(){i(e,t)})};return{pluginLoadError:function(e,t){o(e,r(e,t))},uploadError:function(e,t){o(e,"Failed to upload image: "+t)}}}),r("tinymce/EditorUpload",["tinymce/util/Arr","tinymce/file/Uploader","tinymce/file/ImageScanner","tinymce/file/BlobCache","tinymce/file/UploadStatus","tinymce/ErrorReporter"],function(e,t,n,r,i,o){return function(a){function s(e){return function(t){return a.selection?e(t):[]}}function l(){return"?"+(new Date).getTime()}function c(e,t,n){var r=0;do{-1!==(r=e.indexOf(t,r))&&(e=e.substring(0,r)+n+e.substr(r+t.length),r+=n.length-t.length+1)}while(-1!==r);return e}function u(e,t,n){return e=c(e=c(e,'src="'+t+'"','src="'+n+'"'),'data-mce-src="'+t+'"','data-mce-src="'+n+'"')}function d(t,n){e.each(a.undoManager.data,function(r){"fragmented"===r.type?r.fragments=e.map(r.fragments,function(e){return u(e,t,n)}):r.content=u(r.content,t,n)})}function f(){return a.notificationManager.open({text:a.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})}function m(e,t){w.removeByUri(e.src),d(e.src,t),a.$(e).attr({src:E.images_reuse_filename?t+l():t,"data-mce-src":a.convertURL(t,"src")})}function h(n){return C||(C=new t(N,{url:E.images_upload_url,basePath:E.images_upload_base_path,credentials:E.images_upload_credentials,handler:E.images_upload_handler})),v().then(s(function(t){var r;return r=e.map(t,function(e){return e.blobInfo}),C.upload(r,f).then(s(function(r){return r=e.map(r,function(e,n){var r=t[n].image;return e.status&&!1!==a.settings.images_replace_blob_uris?m(r,e.url):e.error&&o.uploadError(a,e.error),{element:r,status:e.status}}),n&&n(r),r}))}))}function p(e){if(!1!==E.automatic_uploads)return h(e)}function g(e){return!E.images_dataimg_filter||E.images_dataimg_filter(e)}function v(){return x||(x=new n(N,w)),x.findAll(a.getBody(),g).then(s(function(t){return e.each(t,function(e){d(e.image.src,e.blobInfo.blobUri()),e.image.src=e.blobInfo.blobUri(),e.image.removeAttribute("data-mce-src")}),t}))}function y(){w.destroy(),N.destroy(),
x=C=null}function b(t){return t.replace(/src="(blob:[^"]+)"/g,function(t,n){var r=N.getResultUri(n);if(r)return'src="'+r+'"';var i=w.getByUri(n);return i||(i=e.reduce(a.editorManager.editors,function(e,t){return e||t.editorUpload.blobCache.getByUri(n)},null)),i?'src="data:'+i.blob().type+";base64,"+i.base64()+'"':t})}var C,x,w=new r,E=a.settings,N=new i;return a.on("setContent",function(){!1!==a.settings.automatic_uploads?p():v()}),a.on("RawSaveContent",function(e){e.content=b(e.content)}),a.on("getContent",function(e){e.source_view||"raw"==e.format||(e.content=b(e.content))}),a.on("PostRender",function(){a.parser.addNodeFilter("img",function(t){e.each(t,function(e){var t=e.attr("src");if(!w.getByUri(t)){var n=N.getResultUri(t);n&&e.attr("src",n)}})})}),{blobCache:w,uploadImages:h,uploadImagesAuto:p,scanForImages:v,destroy:y}}}),r("tinymce/caret/FakeCaret",["tinymce/caret/CaretContainer","tinymce/caret/CaretPosition","tinymce/dom/NodeType","tinymce/dom/RangeUtils","tinymce/dom/DomQuery","tinymce/geom/ClientRect","tinymce/util/Delay"],function(e,t,n,r,i,o,a){var s=n.isContentEditableFalse;return function(t,n){function r(e,n){var r,i,a,s,l,c=o.collapse(e.getBoundingClientRect(),n);return"BODY"==t.tagName?(r=t.ownerDocument.documentElement,i=t.scrollLeft||r.scrollLeft,a=t.scrollTop||r.scrollTop):(l=t.getBoundingClientRect(),i=t.scrollLeft-l.left,a=t.scrollTop-l.top),c.left+=i,c.right+=i,c.top+=a,c.bottom+=a,c.width=1,(s=e.offsetWidth-e.clientWidth)>0&&(n&&(s*=-1),c.left+=s,c.right+=s),c}function l(){var n,r,o,a,s;for(n=i("*[contentEditable=false]",t),a=0;a<n.length;a++)o=(r=n[a]).previousSibling,e.endsWithCaretContainer(o)&&(1==(s=o.data).length?o.parentNode.removeChild(o):o.deleteData(s.length-1,1)),o=r.nextSibling,e.startsWithCaretContainer(o)&&(1==(s=o.data).length?o.parentNode.removeChild(o):o.deleteData(0,1));return null}function c(o,a){var l,c;return u(),n(a)?(g=e.insertBlock("p",a,o),l=r(a,o),i(g).css("top",l.top),p=i('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(l).appendTo(t),o&&p.addClass("mce-visual-caret-before"),d(),(c=a.ownerDocument.createRange()).setStart(g,0),c.setEnd(g,0),c):(g=e.insertInline(a,o),c=a.ownerDocument.createRange(),s(g.nextSibling)?(c.setStart(g,0),c.setEnd(g,0)):(c.setStart(g,1),c.setEnd(g,1)),c)}function u(){l(),g&&(e.remove(g),g=null),p&&(p.remove(),p=null),clearInterval(h)}function d(){h=a.setInterval(function(){i("div.mce-visual-caret",t).toggleClass("mce-visual-caret-hidden")},500)}function f(){a.clearInterval(h)}function m(){return".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"}var h,p,g;return{show:c,hide:u,getCss:m,destroy:f}}}),r("tinymce/dom/Dimensions",["tinymce/util/Arr","tinymce/dom/NodeType","tinymce/geom/ClientRect"],function(e,t,n){function r(i){function o(t){return e.map(t,function(e){return(e=n.clone(e)).node=i,e})}if(e.isArray(i))return e.reduce(i,function(e,t){return e.concat(r(t))},[]);if(t.isElement(i))return o(i.getClientRects());if(t.isText(i)){var a=i.ownerDocument.createRange();return a.setStart(i,0),a.setEnd(i,i.data.length),o(a.getClientRects())}}return{getClientRects:r}}),r("tinymce/caret/LineWalker",["tinymce/util/Fun","tinymce/util/Arr","tinymce/dom/Dimensions","tinymce/caret/CaretCandidate","tinymce/caret/CaretUtils","tinymce/caret/CaretWalker","tinymce/caret/CaretPosition","tinymce/geom/ClientRect"],function(e,t,n,r,i,o,a,s){function l(e,t,n,o){for(;o=i.findNode(o,e,r.isEditableCaretCandidate,t);)if(n(o))return}function c(e,r,i,o,a,s){function c(o){var s,l,c;for(c=n.getClientRects(o),-1==e&&(c=c.reverse()),s=0;s<c.length;s++)if(l=c[s],!i(l,d)){if(m.length>0&&r(l,t.last(m))&&f++,l.line=f,a(l))return!0;m.push(l)}}var u,d,f=0,m=[];return(d=t.last(s.getClientRects()))?(c(u=s.getNode()),l(e,o,c,u),m):m}function u(e,t){return t.line>e}function d(e,t){return t.line===e}function f(e,n,r,i){function l(e){return t.last(e.getClientRects())}var c,u,d,f,m,h,p=new o(n),g=[],v=0;1==e?(c=p.next,u=s.isBelow,d=s.isAbove,f=a.after(i)):(c=p.prev,u=s.isAbove,d=s.isBelow,f=a.before(i)),h=l(f);do{if(f.isVisible()&&!d(m=l(f),h)){if(g.length>0&&u(m,t.last(g))&&v++,(m=s.clone(m)).position=f,m.line=v,r(m))return g;g.push(m)}}while(f=c(f));return g}var m=e.curry;return{upUntil:m(c,-1,s.isAbove,s.isBelow),downUntil:m(c,1,s.isBelow,s.isAbove),positionsUntil:f,isAboveLine:m(u),isLine:m(d)}}),r("tinymce/caret/LineUtils",["tinymce/util/Fun","tinymce/util/Arr","tinymce/dom/NodeType","tinymce/dom/Dimensions","tinymce/geom/ClientRect","tinymce/caret/CaretUtils","tinymce/caret/CaretCandidate"],function(e,t,n,r,i,o,a){function s(e,t){return Math.abs(e.left-t)}function l(e,t){return Math.abs(e.right-t)}function c(e,n){function r(e,t){return e>=t.left&&e<=t.right}return t.reduce(e,function(e,t){var i,o;return i=Math.min(s(e,n),l(e,n)),o=Math.min(s(t,n),l(t,n)),r(n,t)?t:r(n,e)?e:o==i&&p(t.node)?t:o<i?t:e})}function u(e,t,n,r){for(;r=g(r,e,a.isEditableCaretCandidate,t);)if(n(r))return}function d(e,n){function o(e,i){var o;return o=t.filter(r.getClientRects(i),function(t){return!e(t,n)}),a=a.concat(o),0===o.length}var a=[];return a.push(n),u(-1,e,v(o,i.isAbove),n.node),u(1,e,v(o,i.isBelow),n.node),a}function f(e){return t.filter(t.toArray(e.getElementsByTagName("*")),p)}function m(e,t){return{node:e.node,before:s(e,t)<l(e,t)}}function h(e,n,i){var o,a;return o=r.getClientRects(f(e)),(a=c(o=t.filter(o,function(e){return i>=e.top&&i<=e.bottom}),n))&&(a=c(d(e,a),n))&&p(a.node)?m(a,n):null}var p=n.isContentEditableFalse,g=o.findNode,v=e.curry;return{findClosestClientRect:c,findLineNodeRects:d,closestCaret:h}}),r("tinymce/dom/MousePosition",[],function(){var e=function(e){var t,n,r,i;return i=e.getBoundingClientRect(),n=(t=e.ownerDocument).documentElement,r=t.defaultView,{top:i.top+r.pageYOffset-n.clientTop,left:i.left+r.pageXOffset-n.clientLeft}},t=function(t){return t.inline?e(t.getBody()):{left:0,top:0}},n=function(e){var t=e.getBody();return e.inline?{left:t.scrollLeft,top:t.scrollTop}:{left:0,top:0}},r=function(e){var t=e.getBody(),n=e.getDoc().documentElement,r={left:t.scrollLeft,top:t.scrollTop},i={left:t.scrollLeft||n.scrollLeft,top:t.scrollTop||n.scrollTop};return e.inline?r:i},i=function(t,n){if(n.target.ownerDocument!==t.getDoc()){var i=e(t.getContentAreaContainer()),o=r(t);return{left:n.pageX-i.left+o.left,top:n.pageY-i.top+o.top}}return{left:n.pageX,top:n.pageY}},o=function(e,t,n){return{pageX:n.left-e.left+t.left,pageY:n.top-e.top+t.top}};return{calc:function(e,r){return o(t(e),n(e),i(e,r))}}}),r("tinymce/DragDropOverrides",["tinymce/dom/NodeType","tinymce/util/Arr","tinymce/util/Fun","tinymce/util/Delay","tinymce/dom/DOMUtils","tinymce/dom/MousePosition"],function(e,t,n,r,i,o){var a=e.isContentEditableFalse,s=e.isContentEditableTrue,l=function(e,t){return a(t)&&t!==e},c=function(e,t,n){return t!==n&&!e.dom.isChildOf(t,n)&&!a(t)},u=function(e){var t=e.cloneNode(!0);return t.removeAttribute("data-mce-selected"),t},d=function(e,t,n,r){var i=t.cloneNode(!0);e.dom.setStyles(i,{width:n,height:r}),e.dom.setAttrib(i,"data-mce-selected",null);var o=e.dom.create("div",{"class":"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return e.dom.setStyles(o,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:r}),e.dom.setStyles(i,{margin:0,boxSizing:"border-box"}),o.appendChild(i),o},f=function(e,t){e.parentNode!==t&&t.appendChild(e)},m=function(e,t,n,r,i,o){var a=0,s=0;e.style.left=t.pageX+"px",e.style.top=t.pageY+"px",t.pageX+n>i&&(a=t.pageX+n-i),t.pageY+r>o&&(s=t.pageY+r-o),e.style.width=n-a+"px",e.style.height=r-s+"px"},h=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},p=function(e){return 0===e.button},g=function(e){return e.element},v=function(e,t){return{pageX:t.pageX-e.relX,pageY:t.pageY+5}},y=function(e,r){return function(i){if(p(i)){var o=t.find(r.dom.getParents(i.target),n.or(a,s));if(l(r.getBody(),o)){var c=r.dom.getPos(o),u=r.getBody(),f=r.getDoc().documentElement;e.element=o,e.screenX=i.screenX,e.screenY=i.screenY,e.maxX=(r.inline?u.scrollWidth:f.offsetWidth)-2,e.maxY=(r.inline?u.scrollHeight:f.offsetHeight)-2,e.relX=i.pageX-c.x,e.relY=i.pageY-c.y,e.width=o.offsetWidth,e.height=o.offsetHeight,e.ghost=d(r,o,e.width,e.height)}}}},b=function(e,t){var n=r.throttle(function(e,n){t._selectionOverrides.hideFakeCaret(),t.selection.placeCaretAt(e,n)},0);return function(r){var i=Math.max(Math.abs(r.screenX-e.screenX),Math.abs(r.screenY-e.screenY));if(g(e)&&!e.dragging&&i>10){if(t.fire("dragstart",{target:e.element}).isDefaultPrevented())return;e.dragging=!0,t.focus()}if(e.dragging){var a=v(e,o.calc(t,r));f(e.ghost,t.getBody()),m(e.ghost,a,e.width,e.height,e.maxX,e.maxY),n(r.clientX,r.clientY)}}},C=function(e){var t=e.getSel().getRangeAt(0).startContainer;return 3===t.nodeType?t.parentNode:t},x=function(e,t){return function(n){if(e.dragging&&c(t,C(t.selection),e.element)){var r=u(e.element),i=t.fire("drop",{targetClone:r,clientX:n.clientX,clientY:n.clientY});i.isDefaultPrevented()||(r=i.targetClone,t.undoManager.transact(function(){h(e.element),t.insertContent(t.dom.getOuterHTML(r)),t._selectionOverrides.hideFakeCaret()}))}E(e)}},w=function(e,t){return function(){E(e),e.dragging&&t.fire("dragend")}},E=function(e){e.dragging=!1,e.element=null,h(e.ghost)},N=function(e){var t,n,r,o,a,s,l={};t=i.DOM,s=document,n=y(l,e),r=b(l,e),o=x(l,e),a=w(l,e),e.on("mousedown",n),e.on("mousemove",r),e.on("mouseup",o),t.bind(s,"mousemove",r),t.bind(s,"mouseup",a),e.on("remove",function(){t.unbind(s,"mousemove",r),t.unbind(s,"mouseup",a)})},S=function(e){e.on("drop",function(t){var n="undefined"!=typeof t.clientX?e.getDoc().elementFromPoint(t.clientX,t.clientY):null;(a(n)||a(e.dom.getContentEditableParent(n)))&&t.preventDefault()})};return{init:function(e){N(e),S(e)}}}),r("tinymce/SelectionOverrides",["tinymce/Env","tinymce/caret/CaretWalker","tinymce/caret/CaretPosition","tinymce/caret/CaretContainer","tinymce/caret/CaretUtils","tinymce/caret/FakeCaret","tinymce/caret/LineWalker","tinymce/caret/LineUtils","tinymce/dom/NodeType","tinymce/dom/RangeUtils","tinymce/geom/ClientRect","tinymce/util/VK","tinymce/util/Fun","tinymce/util/Arr","tinymce/util/Delay","tinymce/DragDropOverrides"],function(e,t,n,r,i,o,a,s,l,c,u,d,f,m,h,p){function g(e,t){for(;t=e(t);)if(t.isVisible())return t;return t}function v(c){function v(e){return c.dom.hasClass(e,"mce-offscreen-selection")}function S(){var e=c.dom.get(ce);return e?e.getElementsByTagName("*")[0]:e}function _(e){return c.dom.isBlock(e)}function k(e){e&&c.selection.setRng(e)}function T(){return c.selection.getRng()}function R(e,t){c.selection.scrollIntoView(e,t)}function A(e,t,n){return c.fire("ShowCaret",{target:t,direction:e,before:n}).isDefaultPrevented()?null:(R(t,-1===e),le.show(n,t))}function B(e){return c.fire("BeforeObjectSelected",{target:e}).isDefaultPrevented()?null:D(e)}function D(e){var t=e.ownerDocument.createRange();return t.selectNode(e),t}function M(e,t){var n=i.isInSameBlock(e,t);return!(n||!l.isBr(e.getNode()))||n}function L(e,t){return t=i.normalizeRange(e,ie,t),-1==e?n.fromRangeStart(t):n.fromRangeEnd(t)}function P(e){return r.isCaretContainerBlock(e.startContainer)}function O(e,t,n,r){var i,o,a,s;return!r.collapsed&&(i=N(r),C(i))?A(e,i,-1==e):(s=P(r),n(o=L(e,r))?B(o.getNode(-1==e)):(o=t(o))?n(o)?A(e,o.getNode(-1==e),1==e):n(a=t(o))&&M(o,a)?A(e,a.getNode(-1==e),1==e):s?$(o.toRange()):null:s?r:null)}function H(e,t,n){var r,i,o,l,c,u,d,f,h;if(h=N(n),r=L(e,n),i=t(ie,a.isAboveLine(1),r),o=m.filter(i,a.isLine(1)),c=m.last(r.getClientRects()),E(r)&&(h=r.getNode()),w(r)&&(h=r.getNode(!0)),!c)return null;if(u=c.left,(l=s.findClosestClientRect(o,u))&&C(l.node))return d=Math.abs(u-l.left),f=Math.abs(u-l.right),A(e,l.node,d<f);if(h){var p=a.positionsUntil(e,ie,a.isAboveLine(1),h);if(l=s.findClosestClientRect(m.filter(p,a.isLine(1)),u))return $(l.position.toRange());if(l=m.last(m.filter(p,a.isLine(0))))return $(l.position.toRange())}}function I(t,r){function i(){var t=c.dom.create(c.settings.forced_root_block);return(!e.ie||e.ie>=11)&&(t.innerHTML='<br data-mce-bogus="1">'),t}var o,a;if(r.collapsed&&c.settings.forced_root_block){if(!(o=c.dom.getParent(r.startContainer,"PRE")))return;(1==t?ae(n.fromRangeStart(r)):se(n.fromRangeStart(r)))||(a=i(),1==t?c.$(o).after(a):c.$(o).before(a),c.selection.select(a,!0),c.selection.collapse())}}function F(e,t,n,r){var i;return(i=O(e,t,n,r))?i:(i=I(e,r))||null}function U(e,t,n){var r;return(r=H(e,t,n))?r:(r=I(e,n))||null}function z(){return ue("*[data-mce-caret]")[0]}function W(e){e.hasAttribute("data-mce-caret")&&(r.showCaretContainerBlock(e),k(T()),R(e[0]))}function V(e){var t,r;return e=i.normalizeRange(1,ie,e),t=n.fromRangeStart(e),C(t.getNode())?A(1,t.getNode(),!t.isAtEnd()):C(t.getNode(!0))?A(1,t.getNode(!0),!1):(r=c.dom.getParent(t.getNode(),f.or(C,b)),C(r)?A(1,r,!1):null)}function $(e){return e&&e.collapsed&&V(e)||e}function q(e){var t,i,o,a;return C(e)?(C(e.previousSibling)&&(o=e.previousSibling),(i=se(n.before(e)))||(t=ae(n.after(e))),t&&x(t.getNode())&&(a=t.getNode()),r.remove(e.previousSibling),r.remove(e.nextSibling),c.dom.remove(e),c.dom.isEmpty(c.getBody())?(c.setContent(""),void c.focus()):o?n.after(o).toRange():a?n.before(a).toRange():i?i.toRange():t?t.toRange():null):null}function j(e){var t=c.schema.getTextBlockElements();return e.nodeName in t}function Y(e){return c.dom.isEmpty(e)}function X(e,t,r){var i,o,a,s,l=c.dom;if(i=l.getParent(t.getNode(),l.isBlock),o=l.getParent(r.getNode(),l.isBlock),-1===e){if(s=r.getNode(!0),w(r)&&_(s))return j(i)?(Y(i)&&l.remove(i),n.after(s).toRange()):q(r.getNode(!0))}else if(s=t.getNode(),E(t)&&_(s))return j(o)?(Y(o)&&l.remove(o),n.before(s).toRange()):q(t.getNode());if(i===o||!j(i)||!j(o))return null;for(;a=i.firstChild;)o.appendChild(a);return c.dom.remove(i),r.toRange()}function K(e,t,n,i){var o,a,s,l;return!i.collapsed&&(o=N(i),C(o))?$(q(o)):n(a=L(e,i))&&r.isCaretContainerBlock(i.startContainer)?(l=-1==e?oe.prev(a):oe.next(a))?$(l.toRange()):i:t(a)?$(q(a.getNode(-1==e))):t(s=-1==e?oe.prev(a):oe.next(a))?-1===e?X(e,a,s):X(e,s,a):void 0}function G(){function i(e,t){var n=t(T());n&&!e.isDefaultPrevented()&&(e.preventDefault(),k(n))}function o(e){for(var t=c.getBody();e&&e!=t;){if(b(e)||C(e))return e;e=e.parentNode}return null}function l(e,t,n){return!n.collapsed&&m.reduce(n.getClientRects(),function(n,r){return n||u.containsXY(r,e,t)},!1)}function f(e){var t=!1;e.on("touchstart",function(){t=!1}),e.on("touchmove",function(){t=!0}),e.on("touchend",function(e){var n=o(e.target);C(n)&&(t||(e.preventDefault(),Z(B(n))))})}function g(){var e,t=o(c.selection.getNode());b(t)&&_(t)&&c.dom.isEmpty(t)&&(e=c.dom.create("br",{"data-mce-bogus":"1"}),c.$(t).empty().append(e),c.selection.setRng(n.before(e).toRange()))}function x(e){var t=z();if(t)return"compositionstart"==e.type?(e.preventDefault(),e.stopPropagation(),void W(t)):void(r.hasContent(t)&&W(t))}function N(e){var t;switch(e.keyCode){case d.DELETE:case d.BACKSPACE:t=g()}t&&e.preventDefault()}var R=y(F,1,ae,E),D=y(F,-1,se,w),M=y(K,1,E,w),L=y(K,-1,w,E),P=y(U,-1,a.upUntil),O=y(U,1,a.downUntil);c.on("mouseup",function(){var e=T();e.collapsed&&k(V(e))}),c.on("click",function(e){var t;(t=o(e.target))&&(C(t)&&(e.preventDefault(),c.focus()),b(t)&&c.dom.isChildOf(t,c.selection.getNode())&&ee())}),c.on("blur NewBlock",function(){ee(),ne()});var H=function(e){var r=new t(e);if(!e.firstChild)return!1;var i=n.before(e.firstChild),o=r.next(i);return o&&!E(o)&&!w(o)},I=function(e,t){return c.dom.getParent(e,c.dom.isBlock)===c.dom.getParent(t,c.dom.isBlock)},j=function(e){return!(e.keyCode>=112&&e.keyCode<=123)},Y=function(e,t){var n=c.dom.getParent(e,c.dom.isBlock),r=c.dom.getParent(t,c.dom.isBlock);return n&&!I(n,r)&&H(n)};f(c),c.on("mousedown",function(e){var t;if(t=o(e.target))C(t)?(e.preventDefault(),Z(B(t))):l(e.clientX,e.clientY,c.selection.getRng())||c.selection.placeCaretAt(e.clientX,e.clientY);else{ee(),ne();var n=s.closestCaret(ie,e.clientX,e.clientY);n&&(Y(e.target,n.node)||(e.preventDefault(),c.getBody().focus(),k(A(1,n.node,n.before))))}}),c.on("keydown",function(e){if(!d.modifierPressed(e))switch(e.keyCode){case d.RIGHT:i(e,R);break;case d.DOWN:i(e,O);break;case d.LEFT:i(e,D);break;case d.UP:i(e,P);break;case d.DELETE:i(e,M);break;case d.BACKSPACE:i(e,L);break;default:C(c.selection.getNode())&&j(e)&&e.preventDefault()}}),c.on("keyup compositionstart",function(e){x(e),N(e)},!0),c.on("cut",function(){var e=c.selection.getNode();C(e)&&h.setEditorTimeout(c,function(){k($(q(e)))})}),c.on("getSelectionRange",function(e){var t=e.range;if(re){if(!re.parentNode)return void(re=null);(t=t.cloneRange()).selectNode(re),e.range=t}}),c.on("setSelectionRange",function(e){var t;(t=Z(e.range))&&(e.range=t)}),c.on("AfterSetSelectionRange",function(e){var t=e.range;Q(t)||ne(),v(t.startContainer.parentNode)||ee()}),c.on("focus",function(){h.setEditorTimeout(c,function(){c.selection.setRng($(c.selection.getRng()))},0)}),c.on("copy",function(t){var n=t.clipboardData;if(!t.isDefaultPrevented()&&t.clipboardData&&!e.ie){var r=S();r&&(t.preventDefault(),n.clearData(),n.setData("text/html",r.outerHTML),n.setData("text/plain",r.outerText))}}),p.init(c)}function J(){var e=c.contentStyles,t=".mce-content-body";e.push(le.getCss()),e.push(t+" .mce-offscreen-selection {position: absolute;left: -9999999999px;max-width: 1000000px;}"+t+" *[contentEditable=false] {cursor: default;}"+t+" *[contentEditable=true] {cursor: text;}")}function Q(e){return r.isCaretContainer(e.startContainer)||r.isCaretContainer(e.endContainer)}function Z(t){var n,r,i,o,a,s,l,u,d,f,m=c.$,h=c.dom;if(!t)return null;if(t.collapsed){if(!Q(t)){if(u=L(1,t),C(u.getNode()))return A(1,u.getNode(),!u.isAtEnd());if(C(u.getNode(!0)))return A(1,u.getNode(!0),!1)}return null}return o=t.startContainer,a=t.startOffset,s=t.endOffset,3==o.nodeType&&0==a&&C(o.parentNode)&&(o=o.parentNode,a=h.nodeIndex(o),o=o.parentNode),1!=o.nodeType?null:(s==a+1&&(n=o.childNodes[a]),C(n)?(d=f=n.cloneNode(!0),(l=c.fire("ObjectSelected",{target:n,targetClone:d})).isDefaultPrevented()?null:(d=l.targetClone,0===(r=m("#"+ce)).length&&(r=m('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id",ce)).appendTo(c.getBody()),t=c.dom.createRng(),d===f&&e.ie?(r.empty().append('<p style="font-size: 0" data-mce-bogus="all">\xa0</p>').append(d),t.setStartAfter(r[0].firstChild.firstChild),t.setEndAfter(d)):(r.empty().append("\xa0").append(d).append("\xa0"),t.setStart(r[0].firstChild,1),t.setEnd(r[0].lastChild,0)),r.css({top:h.getPos(n,c.getBody()).y}),r[0].focus(),(i=c.selection.getSel()).removeAllRanges(),i.addRange(t),c.$("*[data-mce-selected]").removeAttr("data-mce-selected"),n.setAttribute("data-mce-selected",1),re=n,ne(),t)):null)}function ee(){re&&(re.removeAttribute("data-mce-selected"),c.$("#"+ce).remove(),re=null)}function te(){le.destroy(),re=null}function ne(){le.hide()}var re,ie=c.getBody(),oe=new t(ie),ae=y(g,oe.next),se=y(g,oe.prev),le=new o(c.getBody(),_),ce="sel-"+c.dom.uniqueId(),ue=c.$;return e.ceFalse&&(G(),J()),{showBlockCaretContainer:W,hideFakeCaret:ne,destroy:te}}var y=f.curry,b=l.isContentEditableTrue,C=l.isContentEditableFalse,x=l.isElement,w=i.isAfterContentEditableFalse,E=i.isBeforeContentEditableFalse,N=c.getSelectedNode;return v}),r("tinymce/util/Uuid",[],function(){var e=0,t=function(){var e=function(){return Math.round(4294967295*Math.random()).toString(36)};return"s"+(new Date).getTime().toString(36)+e()+e()+e()};return{uuid:function(n){return n+e+++t()}}}),r("tinymce/ui/Sidebar",[],function(){return{add:function(e,t,n){var r=e.sidebars?e.sidebars:[];r.push({name:t,settings:n}),e.sidebars=r}}}),r("tinymce/Editor",["tinymce/dom/DOMUtils","tinymce/dom/DomQuery","tinymce/AddOnManager","tinymce/NodeChange","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/NotificationManager","tinymce/html/Schema","tinymce/html/DomParser","tinymce/util/Quirks","tinymce/Env","tinymce/util/Tools","tinymce/util/Delay","tinymce/EditorObservable","tinymce/Mode","tinymce/Shortcuts","tinymce/EditorUpload","tinymce/SelectionOverrides","tinymce/util/Uuid","tinymce/ui/Sidebar","tinymce/ErrorReporter"],function(e,n,r,i,o,a,s,l,c,u,d,f,m,h,p,g,v,y,b,C,x,w,E,N,S,_,k,T,R,A,B,D){function M(e,t,i){var o,a,s,l=this;o=l.documentBaseUrl=i.documentBaseURL,a=i.baseURI,s=i.defaultSettings,t=H({id:e,theme:"modern",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:o,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"<!DOCTYPE html>",visual:!0,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,padd_empty_editor:!0,render_ui:!0,indentation:"30px",inline_styles:!0,convert_fonts_to_spans:!0,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",validate:!0,entity_encoding:"named",url_converter:l.convertURL,url_converter_scope:l,ie7_compat:!0},s,t),s&&s.external_plugins&&t.external_plugins&&(t.external_plugins=H({},s.external_plugins,t.external_plugins)),l.settings=t,r.language=t.language||"en",r.languageLoad=t.language_load,r.baseURL=i.baseURL,l.id=t.id=e,l.setDirty(!1),l.plugins={},l.documentBaseURI=new h(t.document_base_url||o,{base_uri:a}),l.baseURI=a,l.contentCSS=[],l.contentStyles=[],l.shortcuts=new k(l),l.loadedCSS={},l.editorCommands=new m(l),l.suffix=i.suffix,l.editorManager=i,l.inline=t.inline,l.settings.content_editable=l.inline,t.cache_suffix&&(w.cacheSuffix=t.cache_suffix.replace(/^[\?\&]+/,"")),!1===t.override_viewport&&(w.overrideViewPort=!1),i.fire("SetupEditor",l),l.execCallback("setup",l),l.$=n.overrideDefaults(function(){return{context:l.inline?l.getBody():l.getDoc(),element:l.getBody()}})}var L=e.DOM,P=r.ThemeManager,O=r.PluginManager,H=E.extend,I=E.each,F=E.explode,U=E.inArray,z=E.trim,W=E.resolve,V=g.Event,$=w.gecko,q=w.ie;return M.prototype={render:function(){function e(){L.unbind(window,"ready",e),n.render()}function t(){var e=p.ScriptLoader;if(r.language&&"en"!=r.language&&!r.language_url&&(r.language_url=n.editorManager.baseURL+"/langs/"+r.language+".js"),r.language_url&&e.add(r.language_url),r.theme&&"function"!=typeof r.theme&&"-"!=r.theme.charAt(0)&&!P.urls[r.theme]){var t=r.theme_url;t=t?n.documentBaseURI.toAbsolute(t):"themes/"+r.theme+"/theme"+o+".js",P.load(r.theme,t)}E.isArray(r.plugins)&&(r.plugins=r.plugins.join(" ")),I(r.external_plugins,function(e,t){O.load(t,e),r.plugins+=" "+t}),I(r.plugins.split(/[ ,]/),function(e){if((e=z(e))&&!O.urls[e])if("-"==e.charAt(0)){e=e.substr(1,e.length);var t=O.dependencies(e);I(t,function(e){var t={prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"};e=O.createUrl(t,e),O.load(e.resource,e)})}else O.load(e,{prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"})}),e.loadQueue(function(){n.removed||n.init()},n,function(e){D.pluginLoadError(n,e[0]),n.removed||n.init()})}var n=this,r=n.settings,i=n.id,o=n.suffix;if(V.domLoaded){if(n.getElement()&&w.contentEditable){r.inline?n.inline=!0:(n.orgVisibility=n.getElement().style.visibility,n.getElement().style.visibility="hidden");var a=n.getElement().form||L.getParent(i,"form");a&&(n.formElement=a,r.hidden_input&&!/TEXTAREA|INPUT/i.test(n.getElement().nodeName)&&(L.insertAfter(L.create("input",{type:"hidden",name:i}),i),n.hasHiddenInput=!0),n.formEventDelegate=function(e){n.fire(e.type,e)},L.bind(a,"submit reset",n.formEventDelegate),n.on("reset",function(){n.setContent(n.startContent,{format:"raw"})}),!r.submit_patch||a.submit.nodeType||a.submit.length||a._mceOldSubmit||(a._mceOldSubmit=a.submit,a.submit=function(){return n.editorManager.triggerSave(),n.setDirty(!1),a._mceOldSubmit(a)})),n.windowManager=new v(n),n.notificationManager=new y(n),"xml"==r.encoding&&n.on("GetContent",function(e){e.save&&(e.content=L.encode(e.content))}),r.add_form_submit_trigger&&n.on("submit",function(){n.initialized&&n.save()}),r.add_unload_trigger&&(n._beforeUnload=function(){!n.initialized||n.destroyed||n.isHidden()||n.save({format:"raw",no_events:!0,set_dirty:!1})},n.editorManager.on("BeforeUnload",n._beforeUnload)),n.editorManager.add(n),t()}}else L.bind(window,"ready",e)},init:function(){function e(t){var n,r,i=O.get(t);if(n=O.urls[t]||f.documentBaseUrl.replace(/\/$/,""),t=z(t),i&&-1===U(p,t)){if(I(O.dependencies(t),function(t){e(t)}),f.plugins[t])return;r=new i(f,n,f.$),f.plugins[t]=r,r.init&&(r.init(f,n),p.push(t))}}var t,n,r,i,o,a,s,l,c,u,d,f=this,m=f.settings,h=f.getElement(),p=[];if(f.rtl=m.rtl_ui||f.editorManager.i18n.rtl,f.editorManager.i18n.setCode(m.language),m.aria_label=m.aria_label||L.getAttrib(h,"aria-label",f.getLang("aria.rich_text_area")),f.fire("ScriptsLoaded"),m.theme&&("function"!=typeof m.theme?(m.theme=m.theme.replace(/-/,""),a=P.get(m.theme),f.theme=new a(f,P.urls[m.theme]),f.theme.init&&f.theme.init(f,P.urls[m.theme]||f.documentBaseUrl.replace(/\/$/,""),f.$)):f.theme=m.theme),I(m.plugins.replace(/\-/g,"").split(/[ ,]/),e),m.render_ui&&f.theme&&(f.orgDisplay=h.style.display,"function"!=typeof m.theme?(t=m.width||h.style.width||h.offsetWidth,n=m.height||h.style.height||h.offsetHeight,r=m.min_height||100,(u=/^[0-9\.]+(|px)$/i).test(""+t)&&(t=Math.max(parseInt(t,10),100)),u.test(""+n)&&(n=Math.max(parseInt(n,10),r)),o=f.theme.renderUI({targetNode:h,width:t,height:n,deltaWidth:m.delta_width,deltaHeight:m.delta_height}),m.content_editable||(n=(o.iframeHeight||n)+("number"==typeof n?o.deltaHeight||0:""))<r&&(n=r)):((o=m.theme(f,h)).editorContainer.nodeType&&(o.editorContainer.id=o.editorContainer.id||f.id+"_parent"),o.iframeContainer.nodeType&&(o.iframeContainer.id=o.iframeContainer.id||f.id+"_iframecontainer"),n=o.iframeHeight||h.offsetHeight),f.editorContainer=o.editorContainer),m.content_css&&I(F(m.content_css),function(e){f.contentCSS.push(f.documentBaseURI.toAbsolute(e))}),m.content_style&&f.contentStyles.push(m.content_style),m.content_editable)return h=i=o=null,f.initContentBody();if(f.iframeHTML=m.doctype+"<html><head>",m.document_base_url!=f.documentBaseUrl&&(f.iframeHTML+='<base href="'+f.documentBaseURI.getURI()+'" />'),!w.caretAfter&&m.ie7_compat&&(f.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" />'),f.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',!/#$/.test(document.location.href))for(d=0;d<f.contentCSS.length;d++){var g=f.contentCSS[d];f.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+E._addCacheSuffix(g)+'" />',f.loadedCSS[g]=!0}-1!=(l=m.body_id||"tinymce").indexOf("=")&&(l=(l=f.getParam("body_id","","hash"))[f.id]||l),-1!=(c=m.body_class||"").indexOf("=")&&(c=(c=f.getParam("body_class","","hash"))[f.id]||""),m.content_security_policy&&(f.iframeHTML+='<meta http-equiv="Content-Security-Policy" content="'+m.content_security_policy+'" />'),f.iframeHTML+='</head><body id="'+l+'" class="mce-content-body '+c+'" data-id="'+f.id+'"><br></body></html>';var v='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+f.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody(true);})()';document.domain!=location.hostname&&w.ie&&w.ie<12&&(s=v);var y=L.create("iframe",{id:f.id+"_ifr",frameBorder:"0",allowTransparency:"true",title:f.editorManager.translate("Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help"),style:{width:"100%",height:n,display:"block"}});if(y.onload=function(){y.onload=null,f.fire("load")},L.setAttrib(y,"src",s||'javascript:""'),f.contentAreaContainer=o.iframeContainer,f.iframeElement=y,i=L.add(o.iframeContainer,y),q)try{f.getDoc()}catch(b){i.src=s=v}o.editorContainer&&(L.get(o.editorContainer).style.display=f.orgDisplay,f.hidden=L.isHidden(o.editorContainer)),f.getElement().style.display="none",L.setAttrib(f.id,"aria-hidden",!0),s||f.initContentBody(),h=i=o=null},initContentBody:function(t){var n,r,s=this,m=s.settings,h=s.getElement(),p=s.getDoc();m.inline||(s.getElement().style.visibility=s.orgVisibility),t||m.content_editable||(p.open(),p.write(s.iframeHTML),p.close()),m.content_editable&&(s.on("remove",function(){var e=this.getBody();L.removeClass(e,"mce-content-body"),L.removeClass(e,"mce-edit-focus"),L.setAttrib(e,"contentEditable",null)}),L.addClass(h,"mce-content-body"),s.contentDocument=p=m.content_document||document,s.contentWindow=m.content_window||window,s.bodyElement=h,m.content_document=m.content_window=null,m.root_name=h.nodeName.toLowerCase()),(n=s.getBody()).disabled=!0,s.readonly=m.readonly,s.readonly||(s.inline&&"static"==L.getStyle(n,"position",!0)&&(n.style.position="relative"),n.contentEditable=s.getParam("content_editable_state",!0)),n.disabled=!1,s.editorUpload=new T(s),s.schema=new b(m),s.dom=new e(p,{keep_values:!0,url_converter:s.convertURL,url_converter_scope:s,hex_colors:m.force_hex_style_colors,class_filter:m.class_filter,update_styles:!0,root_element:s.inline?s.getBody():null,collect:m.content_editable,schema:s.schema,onSetAttrib:function(e){s.fire("SetAttrib",e)}}),s.parser=new C(m,s.schema),s.parser.addAttributeFilter("src,href,style,tabindex",function(e,t){for(var n,r,i,o=e.length,a=s.dom;o--;)if(r=(n=e[o]).attr(t),i="data-mce-"+t,!n.attributes.map[i]){if(0===r.indexOf("data:")||0===r.indexOf("blob:"))continue;"style"===t?((r=a.serializeStyle(a.parseStyle(r),n.name)).length||(r=null),n.attr(i,r),n.attr(t,r)):"tabindex"===t?(n.attr(i,r),n.attr(t,null)):n.attr(i,s.convertURL(r,t,n.name))}}),s.parser.addNodeFilter("script",function(e){for(var t,n,r=e.length;r--;)0!==(n=(t=e[r]).attr("type")||"no/type").indexOf("mce-")&&t.attr("type","mce-"+n)}),s.parser.addNodeFilter("#cdata",function(e){for(var t,n=e.length;n--;)(t=e[n]).type=8,t.name="#comment",t.value="[CDATA["+t.value+"]]"}),s.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var t,n=e.length,r=s.schema.getNonEmptyElements();n--;)(t=e[n]).isEmpty(r)&&0===t.getAll("br").length&&(t.append(new o("br",1)).shortEnded=!0)}),s.serializer=new a(m,s),s.selection=new l(s.dom,s.getWin(),s.serializer,s),s.formatter=new c(s),s.undoManager=new u(s),s.forceBlocks=new f(s),s.enterKey=new d(s),s._nodeChangeDispatcher=new i(s),s._selectionOverrides=new R(s),s.fire("PreInit"),m.browser_spellcheck||m.gecko_spellcheck||(p.body.spellcheck=!1,L.setAttrib(n,"spellcheck","false")),s.quirks=new x(s),s.fire("PostRender"),m.directionality&&(n.dir=m.directionality),m.nowrap&&(n.style.whiteSpace="nowrap"),m.protect&&s.on("BeforeSetContent",function(e){I(m.protect,function(t){e.content=e.content.replace(t,function(e){return"<!--mce:protected "+escape(e)+"-->"})})}),s.on("SetContent",function(){s.addVisual(s.getBody())}),m.padd_empty_editor&&s.on("PostProcess",function(e){e.content=e.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|<br \/>|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")}),s.load({initial:!0,format:"html"}),s.startContent=s.getContent({format:"raw"}),s.initialized=!0,s.bindPendingEventDelegates(),s.fire("init"),s.focus(!0),s.nodeChanged({initial:!0}),s.execCallback("init_instance_callback",s),s.on("compositionstart compositionend",function(e){s.composing="compositionstart"===e.type}),s.contentStyles.length>0&&(r="",I(s.contentStyles,function(e){r+=e+"\r\n"}),s.dom.addStyle(r)),I(s.contentCSS,function(e){s.loadedCSS[e]||(s.dom.loadCSS(e),s.loadedCSS[e]=!0)}),m.auto_focus&&N.setEditorTimeout(s,function(){var e;(e=!0===m.auto_focus?s:s.editorManager.get(m.auto_focus)).destroyed||e.focus()},100),h=p=n=null},focus:function(e){function t(e){return o.dom.getParent(e,function(e){return"true"===o.dom.getContentEditable(e)})}var n,r,i,o=this,a=o.selection,s=o.settings.content_editable,l=o.getDoc(),c=o.getBody();if(!e){if((n=a.getRng()).item&&(r=n.item(0)),o.quirks.refreshContentEditable(),i=t(a.getNode()),o.$.contains(c,i))return i.focus(),a.normalize(),void o.editorManager.setActive(o);if(s||(w.opera||o.getBody().focus(),o.getWin().focus()),$||s){if(c.setActive)try{c.setActive()}catch(u){c.focus()}else c.focus();s&&a.normalize()}
r&&r.ownerDocument==l&&((n=l.body.createControlRange()).addElement(r),n.select())}o.editorManager.setActive(o)},execCallback:function(e){var t,n=this,r=n.settings[e];if(r)return n.callbackLookup&&(t=n.callbackLookup[e])&&(r=t.func,t=t.scope),"string"==typeof r&&(t=(t=r.replace(/\.\w+$/,""))?W(t):0,r=W(r),n.callbackLookup=n.callbackLookup||{},n.callbackLookup[e]={func:r,scope:t}),r.apply(t||n,Array.prototype.slice.call(arguments,1))},translate:function(e){var t=this.settings.language||"en",n=this.editorManager.i18n;return e?(e=n.data[t+"."+e]||e.replace(/\{\#([^\}]+)\}/g,function(e,r){return n.data[t+"."+r]||"{#"+r+"}"}),this.editorManager.translate(e)):""},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,i=e in this.settings?this.settings[e]:t;return"hash"===n?(r={},"string"==typeof i?I(i.indexOf("=")>0?i.split(/[;,](?![^=;,]*(?:[;,]|$))/):i.split(","),function(e){(e=e.split("=")).length>1?r[z(e[0])]=z(e[1]):r[z(e[0])]=z(e)}):r=i,r):i},nodeChanged:function(e){this._nodeChangeDispatcher.nodeChanged(e)},addButton:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),t.text||t.icon||(t.icon=e),n.buttons=n.buttons||{},t.tooltip=t.tooltip||t.title,n.buttons[e]=t},addSidebar:function(e,t){return B.add(this,e,t)},addMenuItem:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),n.menuItems=n.menuItems||{},n.menuItems[e]=t},addContextToolbar:function(e,t){var n,r=this;r.contextToolbars=r.contextToolbars||[],"string"==typeof e&&(n=e,e=function(e){return r.dom.is(e,n)}),r.contextToolbars.push({id:A.uuid("mcet"),predicate:e,items:t})},addCommand:function(e,t,n){this.editorCommands.addCommand(e,t,n)},addQueryStateHandler:function(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)},addQueryValueHandler:function(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)},addShortcut:function(e,t,n,r){this.shortcuts.add(e,t,n,r)},execCommand:function(e,t,n,r){return this.editorCommands.execCommand(e,t,n,r)},queryCommandState:function(e){return this.editorCommands.queryCommandState(e)},queryCommandValue:function(e){return this.editorCommands.queryCommandValue(e)},queryCommandSupported:function(e){return this.editorCommands.queryCommandSupported(e)},show:function(){var e=this;e.hidden&&(e.hidden=!1,e.inline?e.getBody().contentEditable=!0:(L.show(e.getContainer()),L.hide(e.id)),e.load(),e.fire("show"))},hide:function(){var e=this,t=e.getDoc();e.hidden||(q&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable=!1,e==e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(L.hide(e.getContainer()),L.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.fire("hide"))},isHidden:function(){return!!this.hidden},setProgressState:function(e,t){this.fire("ProgressState",{state:e,time:t})},load:function(e){var n,r=this,i=r.getElement();if(i)return(e=e||{}).load=!0,n=r.setContent(i.value!==t?i.value:i.innerHTML,e),e.element=i,e.no_events||r.fire("LoadContent",e),e.element=i=null,n},save:function(e){var t,n,r=this,i=r.getElement();if(i&&r.initialized)return(e=e||{}).save=!0,e.element=i,t=e.content=r.getContent(e),e.no_events||r.fire("SaveContent",e),"raw"==e.format&&r.fire("RawSaveContent",e),t=e.content,/TEXTAREA|INPUT/i.test(i.nodeName)?i.value=t:(r.inline||(i.innerHTML=t),(n=L.getParent(r.id,"form"))&&I(n.elements,function(e){if(e.name==r.id)return e.value=t,!1})),e.element=i=null,!1!==e.set_dirty&&r.setDirty(!1),t},setContent:function(e,t){var n,r,i=this,o=i.getBody();return(t=t||{}).format=t.format||"html",t.set=!0,t.content=e,t.no_events||i.fire("BeforeSetContent",t),0===(e=t.content).length||/^\s+$/.test(e)?(r=q&&q<11?"":'<br data-mce-bogus="1">',"TABLE"==o.nodeName?e="<tr><td>"+r+"</td></tr>":/^(UL|OL)$/.test(o.nodeName)&&(e="<li>"+r+"</li>"),(n=i.settings.forced_root_block)&&i.schema.isValidChild(o.nodeName.toLowerCase(),n.toLowerCase())?(e=r,e=i.dom.createHTML(n,i.settings.forced_root_block_attrs,e)):q||e||(e='<br data-mce-bogus="1">'),i.dom.setHTML(o,e),i.fire("SetContent",t)):("raw"!==t.format&&(e=new s({validate:i.validate},i.schema).serialize(i.parser.parse(e,{isRootContent:!0}))),t.content=z(e),i.dom.setHTML(o,t.content),t.no_events||i.fire("SetContent",t)),t.content},getContent:function(e){var t,n=this,r=n.getBody();return(e=e||{}).format=e.format||"html",e.get=!0,e.getInner=!0,e.no_events||n.fire("BeforeGetContent",e),t="raw"==e.format?E.trim(n.serializer.getTrimmedContent()):"text"==e.format?r.innerText||r.textContent:n.serializer.serialize(r,e),"text"!=e.format?e.content=z(t):e.content=t,e.no_events||n.fire("GetContent",e),e.content},insertContent:function(e,t){t&&(e=H({content:e},t)),this.execCommand("mceInsertContent",!1,e)},isDirty:function(){return!this.isNotDirty},setDirty:function(e){var t=!this.isNotDirty;this.isNotDirty=!e,e&&e!=t&&this.fire("dirty")},setMode:function(e){_.setMode(this,e)},getContainer:function(){var e=this;return e.container||(e.container=L.get(e.editorContainer||e.id+"_parent")),e.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return this.targetElm||(this.targetElm=L.get(this.id)),this.targetElm},getWin:function(){var e,t=this;return t.contentWindow||(e=t.iframeElement)&&(t.contentWindow=e.contentWindow),t.contentWindow},getDoc:function(){var e,t=this;return t.contentDocument||(e=t.getWin())&&(t.contentDocument=e.document),t.contentDocument},getBody:function(){var e=this.getDoc();return this.bodyElement||(e?e.body:null)},convertURL:function(e,t,n){var r=this,i=r.settings;return i.urlconverter_callback?r.execCallback("urlconverter_callback",e,n,!0,t):!i.convert_urls||n&&"LINK"==n.nodeName||0===e.indexOf("file:")||0===e.length?e:i.relative_urls?r.documentBaseURI.toRelative(e):e=r.documentBaseURI.toAbsolute(e,i.remove_script_host)},addVisual:function(e){var n,r=this,i=r.settings,o=r.dom;e=e||r.getBody(),r.hasVisual===t&&(r.hasVisual=i.visual),I(o.select("table,a",e),function(e){var t;switch(e.nodeName){case"TABLE":return n=i.visual_table_class||"mce-item-table",void((t=o.getAttrib(e,"border"))&&"0"!=t||!r.hasVisual?o.removeClass(e,n):o.addClass(e,n));case"A":return void(o.getAttrib(e,"href",!1)||(t=o.getAttrib(e,"name")||e.id,n=i.visual_anchor_class||"mce-item-anchor",t&&r.hasVisual?o.addClass(e,n):o.removeClass(e,n)))}}),r.fire("VisualAid",{element:e,hasVisual:r.hasVisual})},remove:function(){var e=this;e.removed||(e.save(),e.removed=1,e.unbindAllNativeEvents(),e.hasHiddenInput&&L.remove(e.getElement().nextSibling),e.inline||(q&&q<10&&e.getDoc().execCommand("SelectAll",!1,null),L.setStyle(e.id,"display",e.orgDisplay),e.getBody().onload=null),e.fire("remove"),e.editorManager.remove(e),L.remove(e.getContainer()),e._selectionOverrides.destroy(),e.editorUpload.destroy(),e.destroy())},destroy:function(e){var t,n=this;n.destroyed||(e||n.removed?(e||(n.editorManager.off("beforeunload",n._beforeUnload),n.theme&&n.theme.destroy&&n.theme.destroy(),n.selection.destroy(),n.dom.destroy()),(t=n.formElement)&&(t._mceOldSubmit&&(t.submit=t._mceOldSubmit,t._mceOldSubmit=null),L.unbind(t,"submit reset",n.formEventDelegate)),n.contentAreaContainer=n.formElement=n.container=n.editorContainer=null,n.bodyElement=n.contentDocument=n.contentWindow=null,n.iframeElement=n.targetElm=null,n.selection&&(n.selection=n.selection.win=n.selection.dom=n.selection.dom.doc=null),n.destroyed=1):n.remove())},uploadImages:function(e){return this.editorUpload.uploadImages(e)},_scanForImages:function(){return this.editorUpload.scanForImages()}},H(M.prototype,S),M}),r("tinymce/util/I18n",["tinymce/util/Tools"],function(e){var t={},n="en";return{setCode:function(e){e&&(n=e,this.rtl=!!this.data[e]&&"rtl"===this.data[e]._dir)},getCode:function(){return n},rtl:!1,add:function(e,n){var r=t[e];for(var i in r||(t[e]=r={}),n)r[i]=n[i];this.setCode(e)},translate:function(r){function i(t){return e.is(t,"function")?Object.prototype.toString.call(t):o(t)?"":""+t}function o(t){return""===t||null===t||e.is(t,"undefined")}function a(t){return t=i(t),e.hasOwn(s,t)?i(s[t]):t}var s=t[n]||{};if(o(r))return"";if(e.is(r,"object")&&e.hasOwn(r,"raw"))return i(r.raw);if(e.is(r,"array")){var l=r.slice(1);r=a(r[0]).replace(/\{([0-9]+)\}/g,function(t,n){return e.hasOwn(l,n)?i(l[n]):t})}return a(r).replace(/{context:\w+}$/,"")},data:t}}),r("tinymce/FocusManager",["tinymce/dom/DOMUtils","tinymce/util/Delay","tinymce/Env"],function(e,t,n){function r(e){function r(){try{return document.activeElement}catch(e){return document.body}}function c(e,t){if(t&&t.startContainer){if(!e.isChildOf(t.startContainer,e.getRoot())||!e.isChildOf(t.endContainer,e.getRoot()))return;return{startContainer:t.startContainer,startOffset:t.startOffset,endContainer:t.endContainer,endOffset:t.endOffset}}return t}function u(e,t){var n;return t.startContainer?((n=e.getDoc().createRange()).setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset)):n=t,n}function d(d){var f=d.editor;f.on("init",function(){(f.inline||n.ie)&&("onbeforedeactivate"in document&&n.ie<9?f.dom.bind(f.getBody(),"beforedeactivate",function(e){if(e.target==f.getBody())try{f.lastRng=f.selection.getRng()}catch(t){}}):f.on("nodechange mouseup keyup",function(e){var t=r();"nodechange"==e.type&&e.selectionChange||(t&&t.id==f.id+"_ifr"&&(t=f.getBody()),f.dom.isChildOf(t,f.getBody())&&(f.lastRng=f.selection.getRng()))}),n.webkit&&!i&&(i=function(){var t=e.activeEditor;if(t&&t.selection){var n=t.selection.getRng();n&&!n.collapsed&&(f.lastRng=n)}},s.bind(document,"selectionchange",i)))}),f.on("setcontent",function(){f.lastRng=null}),f.on("mousedown",function(){f.selection.lastFocusBookmark=null}),f.on("focusin",function(){var t,n=e.focusedEditor;f.selection.lastFocusBookmark&&(t=u(f,f.selection.lastFocusBookmark),f.selection.lastFocusBookmark=null,f.selection.setRng(t)),n!=f&&(n&&n.fire("blur",{focusedEditor:f}),e.setActive(f),e.focusedEditor=f,f.fire("focus",{blurredEditor:n}),f.focus(!0)),f.lastRng=null}),f.on("focusout",function(){t.setEditorTimeout(f,function(){var t=e.focusedEditor;l(f,r())||t!=f||(f.fire("blur",{focusedEditor:null}),e.focusedEditor=null,f.selection&&(f.selection.lastFocusBookmark=null))})}),o||(o=function(t){var n,r=e.activeEditor;n=t.target,r&&n.ownerDocument==document&&(r.selection&&n!=r.getBody()&&(r.selection.lastFocusBookmark=c(r.dom,r.lastRng)),n==document.body||l(r,n)||e.focusedEditor!=r||(r.fire("blur",{focusedEditor:null}),e.focusedEditor=null))},s.bind(document,"focusin",o)),f.inline&&!a&&(a=function(t){var n=e.activeEditor,r=n.dom;if(n.inline&&r&&!r.isChildOf(t.target,n.getBody())){var i=n.selection.getRng();i.collapsed||(n.lastRng=i)}},s.bind(document,"mouseup",a))}function f(t){e.focusedEditor==t.editor&&(e.focusedEditor=null),e.activeEditor||(s.unbind(document,"selectionchange",i),s.unbind(document,"focusin",o),s.unbind(document,"mouseup",a),i=o=a=null)}e.on("AddEditor",d),e.on("RemoveEditor",f)}var i,o,a,s=e.DOM,l=function(e,t){var n=e?e.settings.custom_ui_selector:"";return null!==s.getParent(t,function(t){return r.isEditorUIElement(t)||!!n&&e.dom.is(t,n)})};return r.isEditorUIElement=function(e){return-1!==e.className.toString().indexOf("mce-")},r._isUIElement=l,r}),r("tinymce/EditorManager",["tinymce/Editor","tinymce/dom/DomQuery","tinymce/dom/DOMUtils","tinymce/util/URI","tinymce/Env","tinymce/util/Tools","tinymce/util/Promise","tinymce/util/Observable","tinymce/util/I18n","tinymce/FocusManager","tinymce/AddOnManager"],function(e,t,n,r,i,o,a,s,l,c,u){function d(e){b(g.editors,function(t){"scroll"===e.type?t.fire("ScrollWindow",e):t.fire("ResizeWindow",e)})}function f(e,n){n!==w&&(n?t(window).on("resize scroll",d):t(window).off("resize scroll",d),w=n)}function m(e){var t,n=g.editors;delete n[e.id];for(var r=0;r<n.length;r++)if(n[r]==e){n.splice(r,1),t=!0;break}return g.activeEditor==e&&(g.activeEditor=n[0]),g.focusedEditor==e&&(g.focusedEditor=null),t}function h(e){return e&&e.initialized&&!(e.getContainer()||e.getBody()).parentNode&&(m(e),e.unbindAllNativeEvents(),e.destroy(!0),e.removed=!0,e=null),e}var p,g,v=n.DOM,y=o.explode,b=o.each,C=o.extend,x=0,w=!1;return C(g={$:t,majorVersion:"4",minorVersion:"5.4",releaseDate:"2017-02-23",editors:[],i18n:l,activeEditor:null,setup:function(){var e,t,n,i,o=this,a="";if(t=r.getDocumentBaseUrl(document.location),/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),n=window.tinymce||window.tinyMCEPreInit)e=n.base||n.baseURL,a=n.suffix;else{for(var s=document.getElementsByTagName("script"),l=0;l<s.length;l++){var u=(i=s[l].src).substring(i.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(i)){-1!=u.indexOf(".min")&&(a=".min"),e=i.substring(0,i.lastIndexOf("/"));break}}!e&&document.currentScript&&(-1!=(i=document.currentScript.src).indexOf(".min")&&(a=".min"),e=i.substring(0,i.lastIndexOf("/")))}o.baseURL=new r(t).toAbsolute(e),o.documentBaseURL=t,o.baseURI=new r(o.baseURL),o.suffix=a,o.focusManager=new c(o)},overrideDefaults:function(e){var t,n;(t=e.base_url)&&(this.baseURL=new r(this.documentBaseURL).toAbsolute(t.replace(/\/+$/,"")),this.baseURI=new r(this.baseURL)),n=e.suffix,e.suffix&&(this.suffix=n),this.defaultSettings=e;var i=e.plugin_base_urls;for(var o in i)u.PluginManager.urls[o]=i[o]},init:function(n){function r(e,t){return e.inline&&t.tagName.toLowerCase()in m}function i(e,t){window.console&&!window.test&&window.console.log(e,t)}function s(e){var t=e.id;return t||(t=(t=e.name)&&!v.get(t)?e.name:v.uniqueId(),e.setAttribute("id",t)),t}function l(e){var t=n[e];if(t)return t.apply(p,Array.prototype.slice.call(arguments,2))}function c(e,t){return t.constructor===RegExp?t.test(e.className):v.hasClass(e,t)}function u(e){var t,n=[];if(e.types)return b(e.types,function(e){n=n.concat(v.select(e.selector))}),n;if(e.selector)return v.select(e.selector);if(e.target)return[e.target];switch(e.mode){case"exact":(t=e.elements||"").length>0&&b(y(t),function(e){var t;(t=v.get(e))?n.push(t):b(document.forms,function(t){b(t.elements,function(t){t.name===e&&(e="mce_editor_"+x++,v.setAttrib(t,"id",e),n.push(t))})})});break;case"textareas":case"specific_textareas":b(v.select("textarea"),function(t){e.editor_deselector&&c(t,e.editor_deselector)||e.editor_selector&&!c(t,e.editor_selector)||n.push(t)})}return n}function d(){function a(t,n,r){var i=new e(t,n,p);m.push(i),i.on("init",function(){++f===c.length&&g(m)}),i.targetElm=i.targetElm||r,i.render()}var c,f=0,m=[];v.unbind(window,"ready",d),l("onpageload"),c=t.unique(u(n)),n.types?b(n.types,function(e){o.each(c,function(t){return!v.is(t,e.selector)||(a(s(t),C({},n,e),t),!1)})}):(o.each(c,function(e){h(p.get(e.id))}),c=o.grep(c,function(e){return!p.get(e.id)}),b(c,function(e){r(n,e)?i("Could not initialize inline editor on invalid inline target element",e):a(s(e),n,e)}))}var f,m,p=this;m=o.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option tbody tfoot thead tr script noscript style textarea video audio iframe object menu"," ");var g=function(e){f=e};return p.settings=n,v.bind(window,"ready",d),new a(function(e){f?e(f):g=function(t){e(t)}})},get:function(e){return arguments.length?e in this.editors?this.editors[e]:null:this.editors},add:function(e){var t=this,n=t.editors;return n[e.id]=e,n.push(e),f(n,!0),t.activeEditor=e,t.fire("AddEditor",{editor:e}),p||(p=function(){t.fire("BeforeUnload")},v.bind(window,"beforeunload",p)),e},createEditor:function(t,n){return this.add(new e(t,n,this))},remove:function(e){var t,n,r=this,i=r.editors;if(e)return"string"==typeof e?(e=e.selector||e,void b(v.select(e),function(e){(n=i[e.id])&&r.remove(n)})):i[(n=e).id]?(m(n)&&r.fire("RemoveEditor",{editor:n}),i.length||v.unbind(window,"beforeunload",p),n.remove(),f(i,i.length>0),n):null;for(t=i.length-1;t>=0;t--)r.remove(i[t])},execCommand:function(t,n,r){var i=this,o=i.get(r);switch(t){case"mceAddEditor":return i.get(r)||new e(r,i.settings,i).render(),!0;case"mceRemoveEditor":return o&&o.remove(),!0;case"mceToggleEditor":return o?(o.isHidden()?o.show():o.hide(),!0):(i.execCommand("mceAddEditor",0,r),!0)}return!!i.activeEditor&&i.activeEditor.execCommand(t,n,r)},triggerSave:function(){b(this.editors,function(e){e.save()})},addI18n:function(e,t){l.add(e,t)},translate:function(e){return l.translate(e)},setActive:function(e){var t=this.activeEditor;this.activeEditor!=e&&(t&&t.fire("deactivate",{relatedTarget:e}),e.fire("activate",{relatedTarget:t})),this.activeEditor=e}},s),g.setup(),window.tinymce=window.tinyMCE=g,g}),r("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 e(e,t){n(t,function(t,n){t&&s.setStyle(e,n,t)}),s.rename(e,"span")}function i(e){s=t.dom,l.convert_fonts_to_spans&&n(s.select("font,u,strike",e.node),function(e){o[e.nodeName.toLowerCase()](s,e)})}var o,a,s,l=t.settings;l.inline_styles&&(a=r(l.font_size_legacy_values),o={font:function(t,n){e(n,{backgroundColor:n.style.backgroundColor,color:n.color,fontFamily:n.face,fontSize:a[parseInt(n.size,10)-1]})},u:function(n,r){"html4"===t.settings.schema&&e(r,{textDecoration:"underline"})},strike:function(t,n){e(n,{textDecoration:"line-through"})}},t.on("PreProcess SetContent",i))})})}),r("tinymce/util/XHR",["tinymce/util/Observable","tinymce/util/Tools"],function(e,t){var n={send:function(e){function r(){!e.async||4==i.readyState||o++>1e4?(e.success&&o<1e4&&200==i.status?e.success.call(e.success_scope,""+i.responseText,i,e):e.error&&e.error.call(e.error_scope,o>1e4?"TIMED_OUT":"GENERAL",i,e),i=null):setTimeout(r,10)}var i,o=0;if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=!1!==e.async,e.data=e.data||"",n.fire("beforeInitialize",{settings:e}),i=new XMLHttpRequest){if(i.overrideMimeType&&i.overrideMimeType(e.content_type),i.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(i.withCredentials=!0),e.content_type&&i.setRequestHeader("Content-Type",e.content_type),e.requestheaders&&t.each(e.requestheaders,function(e){i.setRequestHeader(e.key,e.value)}),i.setRequestHeader("X-Requested-With","XMLHttpRequest"),(i=n.fire("beforeSend",{xhr:i,settings:e}).xhr).send(e.data),!e.async)return r();setTimeout(r,10)}}};return t.extend(n,e),n}),r("tinymce/util/JSON",[],function(){function e(t,n){var r,i,o,a;if(n=n||'"',null===t)return"null";if("string"==(o=typeof t))return i="\bb\tt\nn\ff\rr\"\"''\\\\",n+t.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,t){return'"'===n&&"'"===e?e:(r=i.indexOf(t))+1?"\\"+i.charAt(r+1):(e=t.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e)})+n;if("object"==o){if(t.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(t)){for(r=0,i="[";r<t.length;r++)i+=(r>0?",":"")+e(t[r],n);return i+"]"}for(a in i="{",t)t.hasOwnProperty(a)&&(i+="function"!=typeof t[a]?(i.length>1?","+n:n)+a+n+":"+e(t[a],n):"");return i+"}"}return""+t}return{serialize:e,parse:function(e){try{return window[String.fromCharCode(101)+"val"]("("+e+")")}catch(t){}}}}),r("tinymce/util/JSONRequest",["tinymce/util/JSON","tinymce/util/XHR","tinymce/util/Tools"],function(e,t,n){function r(e){this.settings=i({},e),this.count=0}var i=n.extend;return r.sendRPC=function(e){return(new r).send(e)},r.prototype={send:function(n){var r=n.error,o=n.success;(n=i(this.settings,n)).success=function(t,i){void 0===(t=e.parse(t))&&(t={error:"JSON Parse error."}),t.error?r.call(n.error_scope||n.scope,t.error,i):o.call(n.success_scope||n.scope,t.result)},n.error=function(e,t){r&&r.call(n.error_scope||n.scope,e,t)},n.data=e.serialize({id:n.id||"c"+this.count++,method:n.method,params:n.params}),n.content_type="application/json",t.send(n)}},r}),r("tinymce/util/JSONP",["tinymce/dom/DOMUtils"],function(e){return{callbacks:{},count:0,send:function(n){var r=this,i=e.DOM,o=n.count!==t?n.count:r.count,a="tinymce_jsonp_"+o;r.callbacks[o]=function(e){i.remove(a),delete r.callbacks[o],n.callback(e)},i.add(i.doc.body,"script",{id:a,src:n.url,type:"text/javascript"}),r.count++}}}),r("tinymce/util/LocalStorage",[],function(){function e(){for(var e in s=[],a)s.push(e);i.length=s.length}function n(){function n(e){var n,r;return-1===(r=e!==t?u+e:i.indexOf(",",u))||r>i.length?null:(n=i.substring(u,r),u=r+1,n)}var r,i,s,u=0;if(a={},c){o.load(l),i=o.getAttribute(l)||"";do{var d=n();if(null===d)break;if(null!==(r=n(parseInt(d,32)||0))){if(null===(d=n()))break;s=n(parseInt(d,32)||0),r&&(a[r]=s)}}while(null!==r);e()}}function r(){var t,n="";if(c){for(var r in a)t=a[r],n+=(n?",":"")+r.length.toString(32)+","+r+","+t.length.toString(32)+","+t;o.setAttribute(l,n);try{o.save(l)}catch(i){}e()}}var i,o,a,s,l,c;try{if(window.localStorage)return localStorage}catch(u){}return l="tinymce",o=document.documentElement,(c=!!o.addBehavior)&&o.addBehavior("#default#userData"),i={key:function(e){return s[e]},getItem:function(e){return e in a?a[e]:null},setItem:function(e,t){a[e]=""+t,r()},removeItem:function(e){delete a[e],r()},clear:function(){a={},r()}},n(),i}),r("tinymce/Compat",["tinymce/dom/DOMUtils","tinymce/dom/EventUtils","tinymce/dom/ScriptLoader","tinymce/AddOnManager","tinymce/util/Tools","tinymce/Env"],function(e,t,n,r,i,o){var a=window.tinymce;return a.DOM=e.DOM,a.ScriptLoader=n.ScriptLoader,a.PluginManager=r.PluginManager,a.ThemeManager=r.ThemeManager,a.dom=a.dom||{},a.dom.Event=t.Event,i.each("trim isArray is toArray makeMap each map grep inArray extend create walk createNS resolve explode _addCacheSuffix".split(" "),function(e){a[e]=i[e]}),i.each("isOpera isWebKit isIE isGecko isMac".split(" "),function(e){a[e]=o[e.substr(2).toLowerCase()]}),{}}),r("tinymce/ui/Layout",["tinymce/util/Class","tinymce/util/Tools"],function(e,t){return e.extend({Defaults:{firstControlClass:"first",lastControlClass:"last"},init:function(e){this.settings=t.extend({},this.Defaults,e)},preRender:function(e){e.bodyClasses.add(this.settings.containerClass)},applyClasses:function(e){var t,n,r,i,o=this.settings;t=o.firstControlClass,n=o.lastControlClass,e.each(function(e){e.classes.remove(t).remove(n).add(o.controlClass),e.visible()&&(r||(r=e),i=e)}),r&&r.classes.add(t),i&&i.classes.add(n)},renderHtml:function(e){var t="";return this.applyClasses(e.items()),e.items().each(function(e){t+=e.renderHtml()}),t},recalc:function(){},postRender:function(){},isNative:function(){return!1}})}),r("tinymce/ui/AbsoluteLayout",["tinymce/ui/Layout"],function(e){return e.extend({Defaults:{containerClass:"abs-layout",controlClass:"abs-layout-item"},recalc:function(e){e.items().filter(":visible").each(function(e){var t=e.settings;e.layoutRect({x:t.x,y:t.y,w:t.w,h:t.h}),e.recalc&&e.recalc()})},renderHtml:function(e){return'<div id="'+e._id+'-absend" class="'+e.classPrefix+'abs-end"></div>'+this._super(e)}})}),r("tinymce/ui/Button",["tinymce/ui/Widget"],function(e){return e.extend({Defaults:{classes:"widget btn",role:"button"},init:function(e){var t,n=this;n._super(e),e=n.settings,t=n.settings.size,n.on("click mousedown",function(e){e.preventDefault()}),n.on("touchstart",function(e){n.fire("click",e),e.preventDefault()}),e.subtype&&n.classes.add(e.subtype),t&&n.classes.add("btn-"+t),e.icon&&n.icon(e.icon)},icon:function(e){return arguments.length?(this.state.set("icon",e),this):this.state.get("icon")},repaint:function(){var e,t=this.getEl().firstChild;t&&((e=t.style).width=e.height="100%"),this._super()},renderHtml:function(){var e,t=this,n=t._id,r=t.classPrefix,i=t.state.get("icon"),o=t.state.get("text"),a="";return(e=t.settings.image)?(i="none","string"!=typeof e&&(e=window.getSelection?e[0]:e[1]),e=" style=\"background-image: url('"+e+"')\""):e="",o&&(t.classes.add("btn-has-text"),a='<span class="'+r+'txt">'+t.encode(o)+"</span>"),i=i?r+"ico "+r+"i-"+i:"",'<div id="'+n+'" class="'+t.classes+'" tabindex="-1" aria-labelledby="'+n+'"><button role="presentation" type="button" tabindex="-1">'+(i?'<i class="'+i+'"'+e+"></i>":"")+a+"</button></div>"},bindStates:function(){function e(e){var i=n("span."+r,t.getEl());e?(i[0]||(n("button:first",t.getEl()).append('<span class="'+r+'"></span>'),i=n("span."+r,t.getEl())),i.html(t.encode(e))):i.remove(),t.classes.toggle("btn-has-text",!!e)}var t=this,n=t.$,r=t.classPrefix+"txt";return t.state.on("change:text",function(t){e(t.value)}),t.state.on("change:icon",function(n){var r=n.value,i=t.classPrefix;t.settings.icon=r,r=r?i+"ico "+i+"i-"+t.settings.icon:"";var o=t.getEl().firstChild,a=o.getElementsByTagName("i")[0];r?(a&&a==o.firstChild||(a=document.createElement("i"),o.insertBefore(a,o.firstChild)),a.className=r):a&&o.removeChild(a),e(t.state.get("text"))}),t._super()}})}),r("tinymce/ui/ButtonGroup",["tinymce/ui/Container"],function(e){return e.extend({Defaults:{defaultType:"button",role:"group"},renderHtml:function(){var e=this,t=e._layout;return e.classes.add("btn-group"),e.preRender(),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes+'"><div id="'+e._id+'-body">'+(e.settings.html||"")+t.renderHtml(e)+"</div></div>"}})}),r("tinymce/ui/Checkbox",["tinymce/ui/Widget"],function(e){return e.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(e){var t=this;t._super(e),t.on("click mousedown",function(e){e.preventDefault()}),t.on("click",function(e){e.preventDefault(),t.disabled()||t.checked(!t.checked())}),t.checked(t.settings.checked)},checked:function(e){return arguments.length?(this.state.set("checked",e),this):this.state.get("checked")},value:function(e){return arguments.length?this.checked(e):this.checked()},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.state.get("text"))+"</span></div>"},bindStates:function(){function e(e){t.classes.toggle("checked",e),t.aria("checked",e)}var t=this;return t.state.on("change:text",function(e){t.getEl("al").firstChild.data=t.translate(e.value)}),t.state.on("change:checked change:value",function(n){t.fire("change"),e(n.value)}),t.state.on("change:icon",function(e){var n=e.value,r=t.classPrefix;if(void 0===n)return t.settings.icon;t.settings.icon=n,n=n?r+"ico "+r+"i-"+t.settings.icon:"";var i=t.getEl().firstChild,o=i.getElementsByTagName("i")[0];n?(o&&o==i.firstChild||(o=document.createElement("i"),i.insertBefore(o,i.firstChild)),o.className=n):o&&i.removeChild(o)}),t.state.get("checked")&&e(!0),t._super()}})}),r("tinymce/ui/ComboBox",["tinymce/ui/Widget","tinymce/ui/Factory","tinymce/ui/DomUtils","tinymce/dom/DomQuery","tinymce/util/VK","tinymce/util/Tools"],function(e,t,n,r,i,o){return e.extend({init:function(e){var t=this;t._super(e),e=t.settings,t.classes.add("combobox"),t.subinput=!0,t.ariaTarget="inp",e.menu=e.menu||e.values,e.menu&&(e.icon="caret"),t.on("click",function(n){var i=n.target,o=t.getEl();if(r.contains(o,i)||i==o)for(;i&&i!=o;)i.id&&-1!=i.id.indexOf("-open")&&(t.fire("action"),e.menu&&(t.showMenu(),n.aria&&t.menu.items()[0].focus())),i=i.parentNode}),t.on("keydown",function(e){var n;13==e.keyCode&&"INPUT"===e.target.nodeName&&(e.preventDefault(),t.parents().reverse().each(function(e){if(e.toJSON)return n=e,!1}),t.fire("submit",{data:n.toJSON()}))}),t.on("keyup",function(e){if("INPUT"==e.target.nodeName){var n=t.state.get("value"),r=e.target.value;r!==n&&(t.state.set("value",r),t.fire("autocomplete",e))}}),t.on("mouseover",function(e){var n=t.tooltip().moveTo(-65535);if(t.statusLevel()&&-1!==e.target.className.indexOf(t.classPrefix+"status")){var r=t.statusMessage()||"Ok",i=n.text(r).show().testMoveRel(e.target,["bc-tc","bc-tl","bc-tr"]);n.classes.toggle("tooltip-n","bc-tc"==i),n.classes.toggle("tooltip-nw","bc-tl"==i),n.classes.toggle("tooltip-ne","bc-tr"==i),n.moveRel(e.target,i)}})},statusLevel:function(e){return arguments.length>0&&this.state.set("statusLevel",e),this.state.get("statusLevel")},statusMessage:function(e){return arguments.length>0&&this.state.set("statusMessage",e),this.state.get("statusMessage")},showMenu:function(){var e,n=this,r=n.settings;n.menu||((e=r.menu||[]).length?e={type:"menu",items:e}:e.type=e.type||"menu",n.menu=t.create(e).parent(n).renderTo(n.getContainerElm()),n.fire("createmenu"),n.menu.reflow(),n.menu.on("cancel",function(e){e.control===n.menu&&n.focus()}),n.menu.on("show hide",function(e){e.control.items().each(function(e){e.active(e.value()==n.value())})}).fire("show"),n.menu.on("select",function(e){n.value(e.control.value())}),n.on("focusin",function(e){"INPUT"==e.target.tagName.toUpperCase()&&n.menu.hide()}),n.aria("expanded",!0)),n.menu.show(),n.menu.layoutRect({w:n.layoutRect().w}),n.menu.moveRel(n.getEl(),n.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},focus:function(){this.getEl("inp").focus()},repaint:function(){var e,t,i=this,o=i.getEl(),a=i.getEl("open"),s=i.layoutRect(),l=0,c=o.firstChild;i.statusLevel()&&"none"!==i.statusLevel()&&(l=parseInt(n.getRuntimeStyle(c,"padding-right"),10)-parseInt(n.getRuntimeStyle(c,"padding-left"),10)),e=a?s.w-n.getSize(a).width-10:s.w-10;var u=document;return u.all&&(!u.documentMode||u.documentMode<=8)&&(t=i.layoutRect().h-2+"px"),r(c).css({width:e-l,lineHeight:t}),i._super(),i},postRender:function(){var e=this;return r(this.getEl("inp")).on("change",function(t){e.state.set("value",t.target.value),e.fire("change",t)}),e._super()},renderHtml:function(){var e,t,n=this,r=n._id,i=n.settings,o=n.classPrefix,a=n.state.get("value")||"",s="",l="",c="";return"spellcheck"in i&&(l+=' spellcheck="'+i.spellcheck+'"'),i.maxLength&&(l+=' maxlength="'+i.maxLength+'"'),i.size&&(l+=' size="'+i.size+'"'),i.subtype&&(l+=' type="'+i.subtype+'"'),c='<i id="'+r+'-status" class="mce-status mce-ico" style="display: none"></i>',n.disabled()&&(l+=' disabled="disabled"'),(e=i.icon)&&"caret"!=e&&(e=o+"ico "+o+"i-"+i.icon),t=n.state.get("text"),(e||t)&&(s='<div id="'+r+'-open" class="'+o+"btn "+o+'open" tabIndex="-1" role="button"><button id="'+r+'-action" type="button" hidefocus="1" tabindex="-1">'+("caret"!=e?'<i class="'+e+'"></i>':'<i class="'+o+'caret"></i>')+(t?(e?" ":"")+t:"")+"</button></div>",n.classes.add("has-open")),'<div id="'+r+'" class="'+n.classes+'"><input id="'+r+'-inp" class="'+o+'textbox" value="'+n.encode(a,!1)+'" hidefocus="1"'+l+' placeholder="'+n.encode(i.placeholder)+'" />'+c+s+"</div>"},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl("inp").value),this.state.get("value"))},showAutoComplete:function(e,n){var r=this;if(0!==e.length){var i=function(e,t){return function(){r.fire("selectitem",{title:t,value:e})}};r.menu?r.menu.items().remove():r.menu=t.create({type:"menu",classes:"combobox-menu",layout:"flow"}).parent(r).renderTo(),o.each(e,function(e){r.menu.add({text:e.title,url:e.previewUrl,match:n,classes:"menu-item-ellipsis",onclick:i(e.value,e.title)})}),r.menu.renderNew(),r.hideMenu(),r.menu.on("cancel",function(e){e.control.parent()===r.menu&&(e.stopPropagation(),r.focus(),r.hideMenu())}),r.menu.on("select",function(){r.focus()});var a=r.layoutRect().w;r.menu.layoutRect({w:a,minW:0,maxW:a}),r.menu.reflow(),r.menu.show(),r.menu.moveRel(r.getEl(),r.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])}else r.hideMenu()},hideMenu:function(){this.menu&&this.menu.hide()},bindStates:function(){var e=this;e.state.on("change:value",function(t){e.getEl("inp").value!=t.value&&(e.getEl("inp").value=t.value)}),e.state.on("change:disabled",function(t){e.getEl("inp").disabled=t.value}),e.state.on("change:statusLevel",function(t){var r=e.getEl("status"),i=e.classPrefix,o=t.value;n.css(r,"display","none"===o?"none":""),n.toggleClass(r,i+"i-checkmark","ok"===o),n.toggleClass(r,i+"i-warning","warn"===o),n.toggleClass(r,i+"i-error","error"===o),e.classes.toggle("has-status","none"!==o),e.repaint()}),n.on(e.getEl("status"),"mouseleave",function(){e.tooltip().hide()}),e.on("cancel",function(t){e.menu&&e.menu.visible()&&(t.stopPropagation(),e.hideMenu())});var t=function(e,t){t&&t.items().length>0&&t.items().eq(e)[0].focus()};return e.on("keydown",function(n){var r=n.keyCode;"INPUT"===n.target.nodeName&&(r===i.DOWN?(n.preventDefault(),e.fire("autocomplete"),t(0,e.menu)):r===i.UP&&(n.preventDefault(),t(-1,e.menu)))}),e._super()},remove:function(){r(this.getEl("inp")).off(),this.menu&&this.menu.remove(),this._super()}})}),r("tinymce/ui/ColorBox",["tinymce/ui/ComboBox"],function(e){return e.extend({init:function(e){var t=this;e.spellcheck=!1,e.onaction&&(e.icon="none"),t._super(e),t.classes.add("colorbox"),t.on("change keyup postrender",function(){t.repaintColor(t.value())})},repaintColor:function(e){
var t=this.getEl("open"),n=t?t.getElementsByTagName("i")[0]:null;if(n)try{n.style.background=e}catch(r){}},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e.state.get("rendered")&&e.repaintColor(t.value)}),e._super()}})}),r("tinymce/ui/PanelButton",["tinymce/ui/Button","tinymce/ui/FloatPanel"],function(e,t){return e.extend({showPanel:function(){var e=this,n=e.settings;if(e.active(!0),e.panel)e.panel.show();else{var r=n.panel;r.type&&(r={layout:"grid",items:r}),r.role=r.role||"dialog",r.popover=!0,r.autohide=!0,r.ariaRoot=!0,e.panel=new t(r).on("hide",function(){e.active(!1)}).on("cancel",function(t){t.stopPropagation(),e.focus(),e.hidePanel()}).parent(e).renderTo(e.getContainerElm()),e.panel.fire("show"),e.panel.reflow()}e.panel.moveRel(e.getEl(),n.popoverAlign||(e.isRtl()?["bc-tr","bc-tc"]:["bc-tl","bc-tc"]))},hidePanel:function(){var e=this;e.panel&&e.panel.hide()},postRender:function(){var e=this;return e.aria("haspopup",!0),e.on("click",function(t){t.control===e&&(e.panel&&e.panel.visible()?e.hidePanel():(e.showPanel(),e.panel.focus(!!t.aria)))}),e._super()},remove:function(){return this.panel&&(this.panel.remove(),this.panel=null),this._super()}})}),r("tinymce/ui/ColorButton",["tinymce/ui/PanelButton","tinymce/dom/DOMUtils"],function(e,t){var n=t.DOM;return e.extend({init:function(e){this._super(e),this.classes.add("colorbutton")},color:function(e){return e?(this._color=e,this.getEl("preview").style.backgroundColor=e,this):this._color},resetColor:function(){return this._color=null,this.getEl("preview").style.backgroundColor=null,this},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.state.get("text"),i=e.settings.icon?n+"ico "+n+"i-"+e.settings.icon:"",o=e.settings.image?" style=\"background-image: url('"+e.settings.image+"')\"":"",a="";return r&&(e.classes.add("btn-has-text"),a='<span class="'+n+'txt">'+e.encode(r)+"</span>"),'<div id="'+t+'" class="'+e.classes+'" role="button" tabindex="-1" aria-haspopup="true"><button role="presentation" hidefocus="1" type="button" tabindex="-1">'+(i?'<i class="'+i+'"'+o+"></i>":"")+'<span id="'+t+'-preview" class="'+n+'preview"></span>'+a+'</button><button type="button" class="'+n+'open" hidefocus="1" tabindex="-1"> <i class="'+n+'caret"></i></button></div>'},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(r){r.aria&&"down"==r.aria.key||r.control!=e||n.getParent(r.target,"."+e.classPrefix+"open")||(r.stopImmediatePropagation(),t.call(e,r))}),delete e.settings.onclick,e._super()}})}),r("tinymce/util/Color",[],function(){function e(e){function i(e,i,o){var a,s,l,c;return 0,a=0,s=0,(l=t(e/=255,t(i/=255,o/=255)))==(c=n(e,n(i,o)))?{h:0,s:0,v:100*(s=l)}:(a=(c-l)/c,s=c,{h:r(60*((e==l?3:o==l?1:5)-(e==l?i-o:o==l?e-i:o-e)/(c-l))),s:r(100*a),v:r(100*s)})}function o(e,i,o){var a,s,l,c;if(e=(parseInt(e,10)||0)%360,i=parseInt(i,10)/100,o=parseInt(o,10)/100,i=n(0,t(i,1)),o=n(0,t(o,1)),0!==i){switch(a=e/60,l=(s=o*i)*(1-Math.abs(a%2-1)),c=o-s,Math.floor(a)){case 0:d=s,f=l,m=0;break;case 1:d=l,f=s,m=0;break;case 2:d=0,f=s,m=l;break;case 3:d=0,f=l,m=s;break;case 4:d=l,f=0,m=s;break;case 5:d=s,f=0,m=l;break;default:d=f=m=0}d=r(255*(d+c)),f=r(255*(f+c)),m=r(255*(m+c))}else d=f=m=r(255*o)}function a(){function e(e){return(e=parseInt(e,10).toString(16)).length>1?e:"0"+e}return"#"+e(d)+e(f)+e(m)}function s(){return{r:d,g:f,b:m}}function l(){return i(d,f,m)}function c(e){var t;return"object"==typeof e?"r"in e?(d=e.r,f=e.g,m=e.b):"v"in e&&o(e.h,e.s,e.v):(t=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e))?(d=parseInt(t[1],10),f=parseInt(t[2],10),m=parseInt(t[3],10)):(t=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e))?(d=parseInt(t[1],16),f=parseInt(t[2],16),m=parseInt(t[3],16)):(t=/#([0-F])([0-F])([0-F])/gi.exec(e))&&(d=parseInt(t[1]+t[1],16),f=parseInt(t[2]+t[2],16),m=parseInt(t[3]+t[3],16)),d=d<0?0:d>255?255:d,f=f<0?0:f>255?255:f,m=m<0?0:m>255?255:m,u}var u=this,d=0,f=0,m=0;e&&c(e),u.toRgb=s,u.toHsv=l,u.toHex=a,u.parse=c}var t=Math.min,n=Math.max,r=Math.round;return e}),r("tinymce/ui/ColorPicker",["tinymce/ui/Widget","tinymce/ui/DragHelper","tinymce/ui/DomUtils","tinymce/util/Color"],function(e,t,n,r){return e.extend({Defaults:{classes:"widget colorpicker"},init:function(e){this._super(e)},postRender:function(){function e(e,t){var r,i,o=n.getPos(e);return r=t.pageX-o.x,i=t.pageY-o.y,{x:r=Math.max(0,Math.min(r/e.clientWidth,1)),y:i=Math.max(0,Math.min(i/e.clientHeight,1))}}function i(e,t){var i=(360-e.h)/360;n.css(c,{top:100*i+"%"}),t||n.css(d,{left:e.s+"%",top:100-e.v+"%"}),u.style.background=new r({s:100,v:100,h:e.h}).toHex(),f.color().parse({s:e.s,v:e.v,h:e.h})}function o(t){var n;n=e(u,t),s.s=100*n.x,s.v=100*(1-n.y),i(s),f.fire("change")}function a(t){var n;n=e(l,t),(s=m.toHsv()).h=360*(1-n.y),i(s,!0),f.fire("change")}var s,l,c,u,d,f=this,m=f.color();l=f.getEl("h"),c=f.getEl("hp"),u=f.getEl("sv"),d=f.getEl("svp"),f._repaint=function(){i(s=m.toHsv())},f._super(),f._svdraghelper=new t(f._id+"-sv",{start:o,drag:o}),f._hdraghelper=new t(f._id+"-h",{start:a,drag:a}),f._repaint()},rgb:function(){return this.color().toRgb()},value:function(e){var t=this;if(!arguments.length)return t.color().toHex();t.color().parse(e),t._rendered&&t._repaint()},color:function(){return this._color||(this._color=new r),this._color},renderHtml:function(){function e(){var e,t,n,r,a="";for(n="filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=",e=0,t=(r=o.split(",")).length-1;e<t;e++)a+='<div class="'+i+'colorpicker-h-chunk" style="height:'+100/t+"%;"+n+r[e]+",endColorstr="+r[e+1]+");-ms-"+n+r[e]+",endColorstr="+r[e+1]+')"></div>';return a}var t,n=this,r=n._id,i=n.classPrefix,o="#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000";return t='<div id="'+r+'-h" class="'+i+'colorpicker-h" style="'+("background: -ms-linear-gradient(top,"+o+");background: linear-gradient(to bottom,"+o+");")+'">'+e()+'<div id="'+r+'-hp" class="'+i+'colorpicker-h-marker"></div></div>','<div id="'+r+'" class="'+n.classes+'"><div id="'+r+'-sv" class="'+i+'colorpicker-sv"><div class="'+i+'colorpicker-overlay1"><div class="'+i+'colorpicker-overlay2"><div id="'+r+'-svp" class="'+i+'colorpicker-selector1"><div class="'+i+'colorpicker-selector2"></div></div></div></div></div>'+t+"</div>"}})}),r("tinymce/ui/Path",["tinymce/ui/Widget"],function(e){return e.extend({init:function(e){var t=this;e.delimiter||(e.delimiter="\xbb"),t._super(e),t.classes.add("path"),t.canFocus=!0,t.on("click",function(e){var n;(n=e.target.getAttribute("data-index"))&&t.fire("select",{value:t.row()[n],index:n})}),t.row(t.settings.row)},focus:function(){var e=this;return e.getEl().firstChild.focus(),e},row:function(e){return arguments.length?(this.state.set("row",e),this):this.state.get("row")},renderHtml:function(){var e=this;return'<div id="'+e._id+'" class="'+e.classes+'">'+e._getDataPathHtml(e.state.get("row"))+"</div>"},bindStates:function(){var e=this;return e.state.on("change:row",function(t){e.innerHtml(e._getDataPathHtml(t.value))}),e._super()},_getDataPathHtml:function(e){var t,n,r=this,i=e||[],o="",a=r.classPrefix;for(t=0,n=i.length;t<n;t++)o+=(t>0?'<div class="'+a+'divider" aria-hidden="true"> '+r.settings.delimiter+" </div>":"")+'<div role="button" class="'+a+"path-item"+(t==n-1?" "+a+"last":"")+'" data-index="'+t+'" tabindex="-1" id="'+r._id+"-"+t+'" aria-level="'+(t+1)+'">'+i[t].name+"</div>";return o||(o='<div class="'+a+'path-item">\xa0</div>'),o}})}),r("tinymce/ui/ElementPath",["tinymce/ui/Path"],function(e){return e.extend({postRender:function(){function e(e){if(1===e.nodeType){if("BR"==e.nodeName||e.getAttribute("data-mce-bogus"))return!0;if("bookmark"===e.getAttribute("data-mce-type"))return!0}return!1}var t=this,n=t.settings.editor;return!1!==n.settings.elementpath&&(t.on("select",function(e){n.focus(),n.selection.select(this.row()[e.index].element),n.nodeChanged()}),n.on("nodeChange",function(r){for(var i=[],o=r.parents,a=o.length;a--;)if(1==o[a].nodeType&&!e(o[a])){var s=n.fire("ResolveName",{name:o[a].nodeName.toLowerCase(),target:o[a]});if(s.isDefaultPrevented()||i.push({name:s.name,element:o[a]}),s.isPropagationStopped())break}t.row(i)})),t._super()}})}),r("tinymce/ui/FormItem",["tinymce/ui/Container"],function(e){return e.extend({Defaults:{layout:"flex",align:"center",defaults:{flex:1}},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.classes.add("formitem"),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1">'+(e.settings.title?'<div id="'+e._id+'-title" class="'+n+'title">'+e.settings.title+"</div>":"")+'<div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></div>"}})}),r("tinymce/ui/Form",["tinymce/ui/Container","tinymce/ui/FormItem","tinymce/util/Tools"],function(e,t,n){return e.extend({Defaults:{containerCls:"form",layout:"flex",direction:"column",align:"stretch",flex:1,padding:20,labelGap:30,spacing:10,callbacks:{submit:function(){this.submit()}}},preRender:function(){var e=this,r=e.items();e.settings.formItemDefaults||(e.settings.formItemDefaults={layout:"flex",autoResize:"overflow",defaults:{flex:1}}),r.each(function(r){var i,o=r.settings.label;o&&((i=new t(n.extend({items:{type:"label",id:r._id+"-l",text:o,flex:0,forId:r._id,disabled:r.disabled()}},e.settings.formItemDefaults))).type="formitem",r.aria("labelledby",r._id+"-l"),"undefined"==typeof r.settings.flex&&(r.settings.flex=1),e.replace(r,i),i.add(r))})},submit:function(){return this.fire("submit",{data:this.toJSON()})},postRender:function(){var e=this;e._super(),e.fromJSON(e.settings.data)},bindStates:function(){function e(){var e,n,r=0,i=[];if(!1!==t.settings.labelGapCalc)for(("children"==t.settings.labelGapCalc?t.find("formitem"):t.items()).filter("formitem").each(function(e){var t=e.items()[0],n=t.getEl().clientWidth;r=n>r?n:r,i.push(t)}),n=t.settings.labelGap||0,e=i.length;e--;)i[e].settings.minWidth=r+n}var t=this;t._super(),t.on("show",e),e()}})}),r("tinymce/ui/FieldSet",["tinymce/ui/Form"],function(e){return e.extend({Defaults:{containerCls:"fieldset",layout:"flex",direction:"column",align:"stretch",flex:1,padding:"25 15 5 15",labelGap:30,spacing:10,border:1},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.preRender(),t.preRender(e),'<fieldset id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1">'+(e.settings.title?'<legend id="'+e._id+'-title" class="'+n+'fieldset-title">'+e.settings.title+"</legend>":"")+'<div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></fieldset>"}})}),r("tinymce/content/LinkTargets",["tinymce/dom/DOMUtils","tinymce/util/Fun","tinymce/util/Arr","tinymce/util/Uuid","tinymce/util/Tools","tinymce/dom/NodeType"],function(e,t,n,r,i,o){var a=i.trim,s=function(e,t,n,r,i){return{type:e,title:t,url:n,level:r,attach:i}},l=function(e){for(;e=e.parentNode;){var t=e.contentEditable;if(t&&"inherit"!==t)return o.isContentEditableTrue(e)}return!1},c=function(t,n){return e.DOM.select(t,n)},u=function(e){return e.innerText||e.textContent},d=function(e){return e.id?e.id:r.uuid("h")},f=function(e){return e&&"A"===e.nodeName&&(e.id||e.name)},m=function(e){return f(e)&&p(e)},h=function(e){return e&&/^(H[1-6])$/.test(e.nodeName)},p=function(e){return l(e)&&!o.isContentEditableFalse(e)},g=function(e){return h(e)&&p(e)},v=function(e){return h(e)?parseInt(e.nodeName.substr(1),10):0},y=function(e){var t=d(e),n=function(){e.id=t};return s("header",u(e),"#"+t,v(e),n)},b=function(e){var n=e.id||e.name,r=u(e);return s("anchor",r||"#"+n,"#"+n,0,t.noop)},C=function(e){return n.map(n.filter(e,g),y)},x=function(e){return n.map(n.filter(e,m),b)},w=function(e){return c("h1,h2,h3,h4,h5,h6,a:not([href])",e)},E=function(e){return a(e.title).length>0};return{find:function(e){var t=w(e);return n.filter(C(t).concat(x(t)),E)}}}),r("tinymce/ui/FilePicker",["tinymce/ui/ComboBox","tinymce/util/Tools","tinymce/util/Arr","tinymce/util/Fun","tinymce/util/VK","tinymce/content/LinkTargets"],function(e,t,n,r,i,o){var a={},s=5,l=function(e){return{title:e.title,value:{title:{raw:e.title},url:e.url,attach:e.attach}}},c=function(e){return t.map(e,l)},u=function(e,t){return{title:e,value:{title:e,url:t,attach:r.noop}}},d=function(e,t){return!n.find(t,function(t){return t.url===e})},f=function(e,t,n){var r=t in e?e[t]:n;return!1===r?null:r},m=function(e,i,o,s){var l={title:"-"},m=function(e){var a=n.filter(e[o],function(e){return d(e,i)});return t.map(a,function(e){return{title:e,value:{title:e,url:e,attach:r.noop}}})},h=function(e){var t=n.filter(i,function(t){return t.type==e});return c(t)},g=function(){var e=h("anchor"),t=f(s,"anchor_top","#top"),n=f(s,"anchor_bottom","#bottom");return null!==t&&e.unshift(u("<top>",t)),null!==n&&e.push(u("<bottom>",n)),e},v=function(e){return n.reduce(e,function(e,t){return 0===e.length||0===t.length?e.concat(t):e.concat(l,t)},[])};return!1===s.typeahead_urls?[]:"file"===o?v([p(e,m(a)),p(e,h("header")),p(e,g())]):p(e,m(a))},h=function(e,t){var r=a[t];/^https?/.test(e)&&(r?-1===n.indexOf(r,e)&&(a[t]=r.slice(0,s).concat(e)):a[t]=[e])},p=function(e,n){var r=e.toLowerCase(),i=t.grep(n,function(e){return-1!==e.title.toLowerCase().indexOf(r)});return 1===i.length&&i[0].title===e?[]:i},g=function(e){var t=e.title;return t.raw?t.raw:t},v=function(e,t,n,r){var i=function(i){var a=o.find(n),s=m(i,a,r,t);e.showAutoComplete(s,i)};e.on("autocomplete",function(){i(e.value())}),e.on("selectitem",function(t){var n=t.value;e.value(n.url);var i=g(n);"image"===r?e.fire("change",{meta:{alt:i,attach:n.attach}}):e.fire("change",{meta:{text:i,attach:n.attach}}),e.focus()}),e.on("click",function(t){0===e.value().length&&"INPUT"===t.target.nodeName&&i("")}),e.on("PostRender",function(){e.getRoot().on("submit",function(t){t.isDefaultPrevented()||h(e.value(),r)})})},y=function(e){var t=e.status,n=e.message;return"valid"===t?{status:"ok",message:n}:"unknown"===t?{status:"warn",message:n}:"invalid"===t?{status:"warn",message:n}:{status:"none",message:""}},b=function(e,t,n){var r=t.filepicker_validator_handler;if(r){var i=function(t){0!==t.length?r({url:t,type:n},function(t){var n=y(t);e.statusMessage(n.message),e.statusLevel(n.status)}):e.statusLevel("none")};e.state.on("change:value",function(e){i(e.value)})}};return e.extend({init:function(e){var n,r,i,o=this,a=tinymce.activeEditor,s=a.settings,l=e.filetype;e.spellcheck=!1,(i=s.file_picker_types||s.file_browser_callback_types)&&(i=t.makeMap(i,/[, ]/)),i&&!i[l]||(!(r=s.file_picker_callback)||i&&!i[l]?!(r=s.file_browser_callback)||i&&!i[l]||(n=function(){r(o.getEl("inp").id,o.value(),l,window)}):n=function(){var e=o.fire("beforecall").meta;e=t.extend({filetype:l},e),r.call(a,function(e,t){o.value(e).fire("change",{meta:t})},o.value(),e)}),n&&(e.icon="browse",e.onaction=n),o._super(e),v(o,s,a.getBody(),l),b(o,s,l)}})}),r("tinymce/ui/FitLayout",["tinymce/ui/AbsoluteLayout"],function(e){return e.extend({recalc:function(e){var t=e.layoutRect(),n=e.paddingBox;e.items().filter(":visible").each(function(e){e.layoutRect({x:n.left,y:n.top,w:t.innerW-n.right-n.left,h:t.innerH-n.top-n.bottom}),e.recalc&&e.recalc()})}})}),r("tinymce/ui/FlexLayout",["tinymce/ui/AbsoluteLayout"],function(e){return e.extend({recalc:function(e){var t,n,r,i,o,a,s,l,c,u,d,f,m,h,p,g,v,y,b,C,x,w,E,N,S,_,k,T,R,A,B,D,M,L,P,O,H,I=[],F=Math.max,U=Math.min;for(r=e.items().filter(":visible"),i=e.layoutRect(),o=e.paddingBox,a=e.settings,f=e.isRtl()?a.direction||"row-reversed":a.direction,s=a.align,l=e.isRtl()?a.pack||"end":a.pack,c=a.spacing||0,"row-reversed"!=f&&"column-reverse"!=f||(r=r.set(r.toArray().reverse()),f=f.split("-")[0]),"column"==f?(N="y",w="h",E="minH",S="maxH",k="innerH",_="top",T="deltaH",R="contentH",L="left",D="w",A="x",B="innerW",M="minW",P="right",O="deltaW",H="contentW"):(N="x",w="w",E="minW",S="maxW",k="innerW",_="left",T="deltaW",R="contentW",L="top",D="h",A="y",B="innerH",M="minH",P="bottom",O="deltaH",H="contentH"),d=i[k]-o[_]-o[_],x=u=0,t=0,n=r.length;t<n;t++)h=(m=r[t]).layoutRect(),d-=t<n-1?c:0,(p=m.settings.flex)>0&&(u+=p,h[S]&&I.push(m),h.flex=p),d-=h[E],(g=o[L]+h[M]+o[P])>x&&(x=g);if((b={})[E]=d<0?i[E]-d+i[T]:i[k]-d+i[T],b[M]=x+i[O],b[R]=i[k]-d,b[H]=x,b.minW=U(b.minW,i.maxW),b.minH=U(b.minH,i.maxH),b.minW=F(b.minW,i.startMinWidth),b.minH=F(b.minH,i.startMinHeight),!i.autoResize||b.minW==i.minW&&b.minH==i.minH){for(y=d/u,t=0,n=I.length;t<n;t++)v=(h=(m=I[t]).layoutRect())[S],(g=h[E]+h.flex*y)>v?(d-=h[S]-h[E],u-=h.flex,h.flex=0,h.maxFlexSize=v):h.maxFlexSize=0;for(y=d/u,C=o[_],b={},0===u&&("end"==l?C=d+o[_]:"center"==l?(C=Math.round(i[k]/2-(i[k]-d)/2)+o[_])<0&&(C=o[_]):"justify"==l&&(C=o[_],c=Math.floor(d/(r.length-1)))),b[A]=o[L],t=0,n=r.length;t<n;t++)g=(h=(m=r[t]).layoutRect()).maxFlexSize||h[E],"center"===s?b[A]=Math.round(i[B]/2-h[D]/2):"stretch"===s?(b[D]=F(h[M]||0,i[B]-o[L]-o[P]),b[A]=o[L]):"end"===s&&(b[A]=i[B]-h[D]-o.top),h.flex>0&&(g+=h.flex*y),b[w]=g,b[N]=C,m.layoutRect(b),m.recalc&&m.recalc(),C+=g+c}else if(b.w=b.minW,b.h=b.minH,e.layoutRect(b),this.recalc(e),null===e._lastRect){var z=e.parent();z&&(z._lastRect=null,z.recalc())}}})}),r("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){e.recalc&&e.recalc()})},isNative:function(){return!0}})}),r("tinymce/fmt/FontInfo",["tinymce/dom/DOMUtils"],function(e){var n=function(e,t,n){for(;n!==t;){if(n.style[e])return n.style[e];n=n.parentNode}return""},r=function(e){return e.replace(/[\'\"]/g,"").replace(/,\s+/g,",")},i=function(t,n){return e.DOM.getStyle(n,t,!0)};return{getFontSize:function(e,t){var r=n("fontSize",e,t);return""!==r?r:i("fontSize",t)},getFontFamily:function(e,o){var a=n("fontFamily",e,o),s=""!==a?a:i("fontFamily",o);return s!==t?r(s):""},toPt:function(e){return/[0-9.]+px$/.test(e)?Math.round(72*parseInt(e,10)/96)+"pt":e}}}),r("tinymce/ui/FormatControls",["tinymce/ui/Control","tinymce/ui/Widget","tinymce/ui/FloatPanel","tinymce/util/Tools","tinymce/util/Arr","tinymce/dom/DOMUtils","tinymce/EditorManager","tinymce/Env","tinymce/fmt/FontInfo"],function(e,t,n,r,i,o,a,s,l){function c(e){e.settings.ui_container&&(s.container=o.DOM.select(e.settings.ui_container)[0])}function u(t){t.on("ScriptsLoaded",function(){t.rtl&&(e.rtl=!0)})}function d(e){function t(t,n){return function(){var r=this;e.on("nodeChange",function(i){var o=e.formatter,a=null;f(i.parents,function(e){if(f(t,function(t){if(n?o.matchNode(e,n,{value:t.value})&&(a=t.value):o.matchNode(e,t.value)&&(a=t.value),a)return!1}),a)return!1}),r.value(a)})}}function i(t){return function(){var n=this,r=function(e){return e?e.split(",")[0]:""};e.on("nodeChange",function(i){var o,a=null;o=l.getFontFamily(e.getBody(),i.element),f(t,function(e){e.value.toLowerCase()===o.toLowerCase()&&(a=e.value)}),f(t,function(e){a||r(e.value).toLowerCase()!==r(o).toLowerCase()||(a=e.value)}),n.value(a),!a&&o&&n.text(r(o))})}}function o(t){return function(){var n=this;e.on("nodeChange",function(r){var i,o,a=null;i=l.getFontSize(e.getBody(),r.element),o=l.toPt(i),f(t,function(e){e.value===i?a=i:e.value===o&&(a=o)}),n.value(a),a||n.text(o)})}}function a(e){for(var t=(e=e.replace(/;$/,"").split(";")).length;t--;)e[t]=e[t].split("=");return e}function s(){function t(e){var n=[];if(e)return f(e,function(e){var o={text:e.title,icon:e.icon};if(e.items)o.menu=t(e.items);else{var a=e.format||"custom"+r++;e.format||(e.name=a,i.push(e)),o.format=a,o.cmd=e.cmd}n.push(o)}),n}function n(){return e.settings.style_formats_merge?e.settings.style_formats?t(o.concat(e.settings.style_formats)):t(o):t(e.settings.style_formats||o)}var r=0,i=[],o=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strikethrough",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Alignment",items:[{title:"Left",icon:"alignleft",format:"alignleft"},{title:"Center",icon:"aligncenter",format:"aligncenter"},{title:"Right",icon:"alignright",format:"alignright"},{title:"Justify",icon:"alignjustify",format:"alignjustify"}]}];return e.on("init",function(){f(i,function(t){e.formatter.register(t.name,t)})}),{type:"menu",items:n(),onPostRender:function(t){e.fire("renderFormatsMenu",{control:t.control})},itemDefaults:{preview:!0,textStyle:function(){if(this.settings.format)return e.formatter.getCssText(this.settings.format)},onPostRender:function(){var t=this;t.parent().on("show",function(){var n,r;(n=t.settings.format)&&(t.disabled(!e.formatter.canApply(n)),t.active(e.formatter.match(n))),(r=t.settings.cmd)&&t.active(e.queryCommandState(r))})},onclick:function(){this.settings.format&&h(this.settings.format),this.settings.cmd&&e.execCommand(this.settings.cmd)}}}}function c(t){return function(){var n=this;e.formatter?e.formatter.formatChanged(t,function(e){n.active(e)}):e.on("init",function(){e.formatter.formatChanged(t,function(e){n.active(e)})})}}function u(t){return function(){function n(){var n="redo"==t?"hasRedo":"hasUndo";return!!e.undoManager&&e.undoManager[n]()}var r=this;r.disabled(!n()),e.on("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",function(){r.disabled(e.readonly||!n())})}}function d(){var t=this;e.on("VisualAid",function(e){t.active(e.hasVisual)}),t.active(e.hasVisual)}function h(t){t.control&&(t=t.control.value()),t&&e.execCommand("mceToggleFormat",!1,t)}function p(t){var n=t.length;return r.each(t,function(t){t.menu&&(t.hidden=0===p(t.menu));var r=t.format;r&&(t.hidden=!e.formatter.canApply(r)),t.hidden&&n--}),n}function g(t){var n=t.items().length;return t.items().each(function(t){t.menu&&t.visible(g(t.menu)>0),!t.menu&&t.settings.menu&&t.visible(p(t.settings.menu)>0);var r=t.settings.format;r&&t.visible(e.formatter.canApply(r)),t.visible()||n--}),n}var v;v=s(),f({bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript"},function(t,n){e.addButton(n,{tooltip:t,onPostRender:c(n),onclick:function(){h(n)}})}),f({outdent:["Decrease indent","Outdent"],indent:["Increase indent","Indent"],cut:["Cut","Cut"],copy:["Copy","Copy"],paste:["Paste","Paste"],help:["Help","mceHelp"],selectall:["Select all","SelectAll"],removeformat:["Clear formatting","RemoveFormat"],visualaid:["Visual aids","mceToggleVisualAid"],newdocument:["New document","mceNewDocument"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1]})}),f({blockquote:["Blockquote","mceBlockQuote"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],alignleft:["Align left","JustifyLeft"],aligncenter:["Align center","JustifyCenter"],alignright:["Align right","JustifyRight"],alignjustify:["Justify","JustifyFull"],alignnone:["No alignment","JustifyNone"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1],onPostRender:c(n)})});var y=function(e){var t=e;return t.length>0&&"-"===t[0].text&&(t=t.slice(1)),t.length>0&&"-"===t[t.length-1].text&&(t=t.slice(0,t.length-1)),t},b=function(t){var n,i;if("string"==typeof t)i=t.split(" ");else if(r.isArray(t))return m(r.map(t,b));return n=r.grep(i,function(t){return"|"===t||t in e.menuItems}),r.map(n,function(t){return"|"===t?{text:"-"}:e.menuItems[t]})},C=function(t){var n=[{text:"-"}],i=r.grep(e.menuItems,function(e){return e.context===t});return r.each(i,function(e){"before"==e.separator&&n.push({text:"|"}),e.prependToContext?n.unshift(e):n.push(e),"after"==e.separator&&n.push({text:"|"})}),n},x=function(e){return e.insert_button_items?y(b(e.insert_button_items)):y(C("insert"))};e.addButton("undo",{tooltip:"Undo",onPostRender:u("undo"),cmd:"undo"}),e.addButton("redo",{tooltip:"Redo",onPostRender:u("redo"),cmd:"redo"}),e.addMenuItem("newdocument",{text:"New document",icon:"newdocument",cmd:"mceNewDocument"}),e.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onPostRender:u("undo"),cmd:"undo"}),e.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onPostRender:u("redo"),cmd:"redo"}),e.addMenuItem("visualaid",{text:"Visual aids",selectable:!0,onPostRender:d,cmd:"mceToggleVisualAid"}),e.addButton("remove",{tooltip:"Remove",icon:"remove",cmd:"Delete"}),e.addButton("insert",{type:"menubutton",icon:"insert",menu:[],oncreatemenu:function(){this.menu.add(x(e.settings)),this.menu.renderNew()}}),f({cut:["Cut","Cut","Meta+X"],copy:["Copy","Copy","Meta+C"],paste:["Paste","Paste","Meta+V"],selectall:["Select all","SelectAll","Meta+A"],bold:["Bold","Bold","Meta+B"],italic:["Italic","Italic","Meta+I"],underline:["Underline","Underline","Meta+U"],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:v,onShowMenu:function(){e.settings.style_formats_autohide&&g(this.menu)}}),e.addButton("formatselect",function(){var n=[],r=a(e.settings.block_formats||"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre");return f(r,function(t){n.push({text:t[0],value:t[1],textStyle:function(){return e.formatter.getCssText(t[1])}})}),{type:"listbox",text:r[0][0],values:n,fixedWidth:!0,onselect:h,onPostRender:t(n)}}),e.addButton("fontselect",function(){var t="Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",n=[],r=a(e.settings.font_formats||t);return f(r,function(e){n.push({text:{raw:e[0]},value:e[1],textStyle:-1==e[1].indexOf("dings")?"font-family:"+e[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:n,fixedWidth:!0,onPostRender:i(n),onselect:function(t){t.control.settings.value&&e.execCommand("FontName",!1,t.control.settings.value)}}}),e.addButton("fontsizeselect",function(){var t=[],n="8pt 10pt 12pt 14pt 18pt 24pt 36pt",r=e.settings.fontsize_formats||n;return f(r.split(" "),function(e){var n=e,r=e,i=e.split("=");i.length>1&&(n=i[0],r=i[1]),t.push({text:n,value:r})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:t,fixedWidth:!0,onPostRender:o(t),onclick:function(t){t.control.settings.value&&e.execCommand("FontSize",!1,t.control.settings.value)}}}),e.addMenuItem("formats",{text:"Formats",menu:v})}var f=r.each,m=function(e){return i.reduce(e,function(e,t){return e.concat(t)},[])};a.on("AddEditor",function(e){var t=e.editor;u(t),d(t),c(t)}),e.translate=function(e){return a.translate(e)},t.tooltips=!s.iOS}),r("tinymce/ui/GridLayout",["tinymce/ui/AbsoluteLayout"],function(e){return e.extend({recalc:function(e){var t,n,r,i,o,a,s,l,c,u,d,f,m,h,p,g,v,y,b,C,x,w,E,N,S,_,k,T,R=[],A=[];t=e.settings,i=e.items().filter(":visible"),o=e.layoutRect(),r=t.columns||Math.ceil(Math.sqrt(i.length)),n=Math.ceil(i.length/r),y=t.spacingH||t.spacing||0,b=t.spacingV||t.spacing||0,C=t.alignH||t.align,x=t.alignV||t.align,g=e.paddingBox,T="reverseRows"in t?t.reverseRows:e.isRtl(),C&&"string"==typeof C&&(C=[C]),x&&"string"==typeof x&&(x=[x]);for(d=0;d<r;d++)R.push(0);for(f=0;f<n;f++)A.push(0);for(f=0;f<n;f++)for(d=0;d<r&&(u=i[f*r+d]);d++)N=(c=u.layoutRect()).minW,S=c.minH,R[d]=N>R[d]?N:R[d],A[f]=S>A[f]?S:A[f];for(_=o.innerW-g.left-g.right,w=0,d=0;d<r;d++)w+=R[d]+(d>0?y:0),_-=(d>0?y:0)+R[d];for(k=o.innerH-g.top-g.bottom,E=0,f=0;f<n;f++)E+=A[f]+(f>0?b:0),k-=(f>0?b:0)+A[f];if(w+=g.left+g.right,E+=g.top+g.bottom,(l={}).minW=w+(o.w-o.innerW),l.minH=E+(o.h-o.innerH),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH,l.minW=Math.min(l.minW,o.maxW),l.minH=Math.min(l.minH,o.maxH),l.minW=Math.max(l.minW,o.startMinWidth),l.minH=Math.max(l.minH,o.startMinHeight),!o.autoResize||l.minW==o.minW&&l.minH==o.minH){var B;o.autoResize&&((l=e.layoutRect(l)).contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH),B="start"==t.packV?0:k>0?Math.floor(k/n):0;var D=0,M=t.flexWidths;if(M)for(d=0;d<M.length;d++)D+=M[d];else D=r;var L=_/D;for(d=0;d<r;d++)R[d]+=M?M[d]*L:L;for(h=g.top,f=0;f<n;f++){for(m=g.left,s=A[f]+B,d=0;d<r&&(u=i[T?f*r+r-1-d:f*r+d]);d++)p=u.settings,c=u.layoutRect(),a=Math.max(R[d],c.startMinWidth),c.x=m,c.y=h,"center"==(v=p.alignH||(C?C[d]||C[0]:null))?c.x=m+a/2-c.w/2:"right"==v?c.x=m+a-c.w:"stretch"==v&&(c.w=a),"center"==(v=p.alignV||(x?x[d]||x[0]:null))?c.y=h+s/2-c.h/2:"bottom"==v?c.y=h+s-c.h:"stretch"==v&&(c.h=s),u.layoutRect(c),m+=a+y,u.recalc&&u.recalc();h+=s+b}}else if(l.w=l.minW,l.h=l.minH,e.layoutRect(l),this.recalc(e),null===e._lastRect){var P=e.parent();P&&(P._lastRect=null,P.recalc())}}})}),r("tinymce/ui/Iframe",["tinymce/ui/Widget","tinymce/util/Delay"],function(e,t){return e.extend({renderHtml:function(){var e=this;return e.classes.add("iframe"),e.canFocus=!1,'<iframe id="'+e._id+'" class="'+e.classes+'" tabindex="-1" src="'+(e.settings.url||"javascript:''")+'" frameborder="0"></iframe>'},src:function(e){this.getEl().src=e},html:function(e,n){var r=this,i=this.getEl().contentWindow.document.body;return i?(i.innerHTML=e,n&&n()):t.setTimeout(function(){r.html(e)}),this}})}),r("tinymce/ui/InfoBox",["tinymce/ui/Widget"],function(e){return e.extend({init:function(e){var t=this;t._super(e),t.classes.add("widget").add("infobox"),t.canFocus=!1},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},help:function(e){this.state.set("help",e)},renderHtml:function(){var e=this,t=e.classPrefix;return'<div id="'+e._id+'" class="'+e.classes+'"><div id="'+e._id+'-body">'+e.encode(e.state.get("text"))+'<button role="button" tabindex="-1"><i class="'+t+"ico "+t+'i-help"></i></button></div></div>'},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl("body").firstChild.data=e.encode(t.value),e.state.get("rendered")&&e.updateLayoutRect()}),e.state.on("change:help",function(t){e.classes.toggle("has-help",t.value),e.state.get("rendered")&&e.updateLayoutRect()}),e._super()}})}),r("tinymce/ui/Label",["tinymce/ui/Widget","tinymce/ui/DomUtils"],function(e,t){return e.extend({init:function(e){var t=this;t._super(e),t.classes.add("widget").add("label"),t.canFocus=!1,e.multiline&&t.classes.add("autoscroll"),e.strong&&t.classes.add("strong")},initLayoutRect:function(){var e=this,n=e._super();e.settings.multiline&&(t.getSize(e.getEl()).width>n.maxW&&(n.minW=n.maxW,e.classes.add("multiline")),e.getEl().style.width=n.minW+"px",n.startMinH=n.h=n.minH=Math.min(n.maxH,t.getSize(e.getEl()).height));return n},repaint:function(){var e=this;return e.settings.multiline||(e.getEl().style.lineHeight=e.layoutRect().h+"px"),e._super()},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},renderHtml:function(){var e,t,n=this,r=n.settings.forId;return!r&&(t=n.settings.forName)&&(e=n.getRoot().find("#"+t)[0])&&(r=e._id),r?'<label id="'+n._id+'" class="'+n.classes+'"'+(r?' for="'+r+'"':"")+">"+n.encode(n.state.get("text"))+"</label>":'<span id="'+n._id+'" class="'+n.classes+'">'+n.encode(n.state.get("text"))+"</span>"},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.innerHtml(e.encode(t.value)),e.state.get("rendered")&&e.updateLayoutRect()}),e._super()}})}),r("tinymce/ui/Toolbar",["tinymce/ui/Container"],function(e){return e.extend({Defaults:{role:"toolbar",layout:"flow"},init:function(e){var t=this;t._super(e),t.classes.add("toolbar")},postRender:function(){var e=this;return e.items().each(function(e){e.classes.add("toolbar-item")}),e._super()}})}),r("tinymce/ui/MenuBar",["tinymce/ui/Toolbar"],function(e){return e.extend({Defaults:{
role:"menubar",containerCls:"menubar",ariaRoot:!0,defaults:{type:"menubutton"}}})}),r("tinymce/ui/MenuButton",["tinymce/ui/Button","tinymce/ui/Factory","tinymce/ui/MenuBar"],function(e,t,n){function r(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1}var i=e.extend({init:function(e){var t=this;t._renderOpen=!0,t._super(e),e=t.settings,t.classes.add("menubtn"),e.fixedWidth&&t.classes.add("fixed-width"),t.aria("haspopup",!0),t.state.set("menu",e.menu||t.render())},showMenu:function(e){var n,r=this;if(r.menu&&r.menu.visible()&&!1!==e)return r.hideMenu();r.menu||((n=r.state.get("menu")||[]).length?n={type:"menu",items:n}:n.type=n.type||"menu",n.renderTo?r.menu=n.parent(r).show().renderTo():r.menu=t.create(n).parent(r).renderTo(),r.fire("createmenu"),r.menu.reflow(),r.menu.on("cancel",function(e){e.control.parent()===r.menu&&(e.stopPropagation(),r.focus(),r.hideMenu())}),r.menu.on("select",function(){r.focus()}),r.menu.on("show hide",function(e){e.control==r.menu&&r.activeMenu("show"==e.type),r.aria("expanded","show"==e.type)}).fire("show")),r.menu.show(),r.menu.layoutRect({w:r.layoutRect().w}),r.menu.moveRel(r.getEl(),r.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"]),r.fire("showmenu")},hideMenu:function(){var e=this;e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide())},activeMenu:function(e){this.classes.toggle("active",e)},renderHtml:function(){var e,t=this,r=t._id,i=t.classPrefix,o=t.settings.icon,a=t.state.get("text"),s="";return(e=t.settings.image)?(o="none","string"!=typeof e&&(e=window.getSelection?e[0]:e[1]),e=" style=\"background-image: url('"+e+"')\""):e="",a&&(t.classes.add("btn-has-text"),s='<span class="'+i+'txt">'+t.encode(a)+"</span>"),o=t.settings.icon?i+"ico "+i+"i-"+o:"",t.aria("role",t.parent()instanceof n?"menuitem":"button"),'<div id="'+r+'" class="'+t.classes+'" tabindex="-1" aria-labelledby="'+r+'"><button id="'+r+'-open" role="presentation" type="button" tabindex="-1">'+(o?'<i class="'+o+'"'+e+"></i>":"")+s+' <i class="'+i+'caret"></i></button></div>'},postRender:function(){var e=this;return e.on("click",function(t){t.control===e&&r(t.target,e.getEl())&&(e.focus(),e.showMenu(!t.aria),t.aria&&e.menu.items().filter(":visible")[0].focus())}),e.on("mouseenter",function(t){var n,r=t.control,o=e.parent();r&&o&&r instanceof i&&r.parent()==o&&(o.items().filter("MenuButton").each(function(e){e.hideMenu&&e!=r&&(e.menu&&e.menu.visible()&&(n=!0),e.hideMenu())}),n&&(r.focus(),r.showMenu()))}),e._super()},bindStates:function(){var e=this;return e.state.on("change:menu",function(){e.menu&&e.menu.remove(),e.menu=null}),e._super()},remove:function(){this._super(),this.menu&&this.menu.remove()}});return i}),r("tinymce/ui/MenuItem",["tinymce/ui/Widget","tinymce/ui/Factory","tinymce/Env","tinymce/util/Delay"],function(e,t,n,r){return e.extend({Defaults:{border:0,role:"menuitem"},init:function(e){var t,n=this;n._super(e),e=n.settings,n.classes.add("menu-item"),e.menu&&n.classes.add("menu-item-expand"),e.preview&&n.classes.add("menu-item-preview"),"-"!==(t=n.state.get("text"))&&"|"!==t||(n.classes.add("menu-item-sep"),n.aria("role","separator"),n.state.set("text","-")),e.selectable&&(n.aria("role","menuitemcheckbox"),n.classes.add("menu-item-checkbox"),e.icon="selected"),e.preview||e.selectable||n.classes.add("menu-item-normal"),n.on("mousedown",function(e){e.preventDefault()}),e.menu&&!e.ariaHideMenu&&n.aria("haspopup",!0)},hasMenus:function(){return!!this.settings.menu},showMenu:function(){var e,n=this,r=n.settings,i=n.parent();if(i.items().each(function(e){e!==n&&e.hideMenu()}),r.menu){(e=n.menu)?e.show():((e=r.menu).length?e={type:"menu",items:e}:e.type=e.type||"menu",i.settings.itemDefaults&&(e.itemDefaults=i.settings.itemDefaults),(e=n.menu=t.create(e).parent(n).renderTo()).reflow(),e.on("cancel",function(t){t.stopPropagation(),n.focus(),e.hide()}),e.on("show hide",function(e){e.control.items&&e.control.items().each(function(e){e.active(e.settings.selected)})}).fire("show"),e.on("hide",function(t){t.control===e&&n.classes.remove("selected")}),e.submenu=!0),e._parentMenu=i,e.classes.add("menu-sub");var o=e.testMoveRel(n.getEl(),n.isRtl()?["tl-tr","bl-br","tr-tl","br-bl"]:["tr-tl","br-bl","tl-tr","bl-br"]);e.moveRel(n.getEl(),o),e.rel=o,o="menu-sub-"+o,e.classes.remove(e._lastRel).add(o),e._lastRel=o,n.classes.add("selected"),n.aria("expanded",!0)}},hideMenu:function(){var e=this;return e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide(),e.aria("expanded",!1)),e},renderHtml:function(){function e(e){var t,r,i={};for(i=n.mac?{alt:"&#x2325;",ctrl:"&#x2318;",shift:"&#x21E7;",meta:"&#x2318;"}:{meta:"Ctrl"},e=e.split("+"),t=0;t<e.length;t++)(r=i[e[t].toLowerCase()])&&(e[t]=r);return e.join("+")}function t(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function r(e){var n=s.match||"";return n?e.replace(new RegExp(t(n),"gi"),function(e){return"!mce~match["+e+"]mce~match!"}):e}function i(e){return e.replace(new RegExp(t("!mce~match["),"g"),"<b>").replace(new RegExp(t("]mce~match!"),"g"),"</b>")}var o=this,a=o._id,s=o.settings,l=o.classPrefix,c=o.state.get("text"),u=o.settings.icon,d="",f=s.shortcut,m=o.encode(s.url),h="";return u&&o.parent().classes.add("menu-has-icons"),s.image&&(d=" style=\"background-image: url('"+s.image+"')\""),f&&(f=e(f)),u=l+"ico "+l+"i-"+(o.settings.icon||"none"),h="-"!==c?'<i class="'+u+'"'+d+"></i>\xa0":"",c=i(o.encode(r(c))),m=i(o.encode(r(m))),'<div id="'+a+'" class="'+o.classes+'" tabindex="-1">'+h+("-"!==c?'<span id="'+a+'-text" class="'+l+'text">'+c+"</span>":"")+(f?'<div id="'+a+'-shortcut" class="'+l+'menu-shortcut">'+f+"</div>":"")+(s.menu?'<div class="'+l+'caret"></div>':"")+(m?'<div class="'+l+'menu-item-link">'+m+"</div>":"")+"</div>"},postRender:function(){var e=this,t=e.settings,n=t.textStyle;if("function"==typeof n&&(n=n.call(this)),n){var i=e.getEl("text");i&&i.setAttribute("style",n)}return e.on("mouseenter click",function(n){n.control===e&&(t.menu||"click"!==n.type?(e.showMenu(),n.aria&&e.menu.focus(!0)):(e.fire("select"),r.requestAnimationFrame(function(){e.parent().hideAll()})))}),e._super(),e},hover:function(){var e=this;return e.parent().items().each(function(e){e.classes.remove("selected")}),e.classes.toggle("selected",!0),e},active:function(e){return void 0!==e&&this.aria("checked",e),this._super(e)},remove:function(){this._super(),this.menu&&this.menu.remove()}})}),r("tinymce/ui/Throbber",["tinymce/dom/DomQuery","tinymce/ui/Control","tinymce/util/Delay"],function(e,t,n){return function(r,i){var o,a,s=this,l=t.classPrefix;s.show=function(t,c){function u(){o&&(e(r).append('<div class="'+l+"throbber"+(i?" "+l+"throbber-inline":"")+'"></div>'),c&&c())}return s.hide(),o=!0,t?a=n.setTimeout(u,t):u(),s},s.hide=function(){var e=r.lastChild;return n.clearTimeout(a),e&&-1!=e.className.indexOf("throbber")&&e.parentNode.removeChild(e),o=!1,s}}}),r("tinymce/ui/Menu",["tinymce/ui/FloatPanel","tinymce/ui/MenuItem","tinymce/ui/Throbber","tinymce/util/Tools"],function(e,t,n,r){return e.extend({Defaults:{defaultType:"menuitem",border:1,layout:"stack",role:"application",bodyRole:"menu",ariaRoot:!0},init:function(e){var t=this;if(e.autohide=!0,e.constrainToViewport=!0,"function"==typeof e.items&&(e.itemsFactory=e.items,e.items=[]),e.itemDefaults)for(var n=e.items,i=n.length;i--;)n[i]=r.extend({},e.itemDefaults,n[i]);t._super(e),t.classes.add("menu")},repaint:function(){return this.classes.toggle("menu-align",!0),this._super(),this.getEl().style.height="",this.getEl("body").style.height="",this},cancel:function(){var e=this;e.hideAll(),e.fire("select")},load:function(){function e(){r.throbber&&(r.throbber.hide(),r.throbber=null)}var t,r=this;r.settings.itemsFactory&&(r.throbber||(r.throbber=new n(r.getEl("body"),!0),0===r.items().length?(r.throbber.show(),r.fire("loading")):r.throbber.show(100,function(){r.items().remove(),r.fire("loading")}),r.on("hide close",e)),r.requestTime=t=(new Date).getTime(),r.settings.itemsFactory(function(n){0!==n.length?r.requestTime===t&&(r.getEl().style.width="",r.getEl("body").style.width="",e(),r.items().remove(),r.getEl("body").innerHTML="",r.add(n),r.renderNew(),r.fire("loaded")):r.hide()}))},hideAll:function(){var e=this;return this.find("menuitem").exec("hideMenu"),e._super()},preRender:function(){var e=this;return e.items().each(function(t){var n=t.settings;if(n.icon||n.image||n.selectable)return e._hasIcons=!0,!1}),e.settings.itemsFactory&&e.on("postrender",function(){e.settings.itemsFactory&&e.load()}),e._super()}})}),r("tinymce/ui/ListBox",["tinymce/ui/MenuButton","tinymce/ui/Menu"],function(e,t){return e.extend({init:function(e){function t(n){for(var o=0;o<n.length;o++){if(r=n[o].selected||e.value===n[o].value)return i=i||n[o].text,a.state.set("value",n[o].value),!0;if(n[o].menu&&t(n[o].menu))return!0}}var n,r,i,o,a=this;a._super(e),e=a.settings,a._values=n=e.values,n&&("undefined"!=typeof e.value&&t(n),!r&&n.length>0&&(i=n[0].text,a.state.set("value",n[0].value)),a.state.set("menu",n)),a.state.set("text",e.text||i),a.classes.add("listbox"),a.on("select",function(t){var n=t.control;o&&(t.lastControl=o),e.multiple?n.active(!n.active()):a.value(t.control.value()),o=n})},bindStates:function(){function e(e,n){e instanceof t&&e.items().each(function(e){e.hasMenus()||e.active(e.value()===n)})}function n(e,t){var r;if(e)for(var i=0;i<e.length;i++){if(e[i].value===t)return e[i];if(e[i].menu&&(r=n(e[i].menu,t)))return r}}var r=this;return r.on("show",function(t){e(t.control,r.value())}),r.state.on("change:value",function(e){var t=n(r.state.get("menu"),e.value);t?r.text(t.text):r.text(r.settings.text)}),r._super()}})}),r("tinymce/ui/Radio",["tinymce/ui/Checkbox"],function(e){return e.extend({Defaults:{classes:"radio",role:"radio"}})}),r("tinymce/ui/ResizeHandle",["tinymce/ui/Widget","tinymce/ui/DragHelper"],function(e,t){return e.extend({renderHtml:function(){var e=this,t=e.classPrefix;return e.classes.add("resizehandle"),"both"==e.settings.direction&&e.classes.add("resizehandle-both"),e.canFocus=!1,'<div id="'+e._id+'" class="'+e.classes+'"><i class="'+t+"ico "+t+'i-resize"></i></div>'},postRender:function(){var e=this;e._super(),e.resizeDragHelper=new t(this._id,{start:function(){e.fire("ResizeStart")},drag:function(t){"both"!=e.settings.direction&&(t.deltaX=0),e.fire("Resize",t)},stop:function(){e.fire("ResizeEnd")}})},remove:function(){return this.resizeDragHelper&&this.resizeDragHelper.destroy(),this._super()}})}),r("tinymce/ui/SelectBox",["tinymce/ui/Widget"],function(e){function t(e){var t="";if(e)for(var n=0;n<e.length;n++)t+='<option value="'+e[n]+'">'+e[n]+"</option>";return t}return e.extend({Defaults:{classes:"selectbox",role:"selectbox",options:[]},init:function(e){var t=this;t._super(e),t.settings.size&&(t.size=t.settings.size),t.settings.options&&(t._options=t.settings.options),t.on("keydown",function(e){var n;13==e.keyCode&&(e.preventDefault(),t.parents().reverse().each(function(e){if(e.toJSON)return n=e,!1}),t.fire("submit",{data:n.toJSON()}))})},options:function(e){return arguments.length?(this.state.set("options",e),this):this.state.get("options")},renderHtml:function(){var e,n=this,r="";return e=t(n._options),n.size&&(r=' size = "'+n.size+'"'),'<select id="'+n._id+'" class="'+n.classes+'"'+r+">"+e+"</select>"},bindStates:function(){var e=this;return e.state.on("change:options",function(n){e.getEl().innerHTML=t(n.value)}),e._super()}})}),r("tinymce/ui/Slider",["tinymce/ui/Widget","tinymce/ui/DragHelper","tinymce/ui/DomUtils"],function(e,t,n){function r(e,t,n){return e<t&&(e=t),e>n&&(e=n),e}function i(e,t,n){e.setAttribute("aria-"+t,n)}function o(e,t){var r,o,a,s,l;"v"==e.settings.orientation?(a="top",o="height",r="h"):(a="left",o="width",r="w"),l=e.getEl("handle"),s=((e.layoutRect()[r]||100)-n.getSize(l)[o])*((t-e._minValue)/(e._maxValue-e._minValue))+"px",l.style[a]=s,l.style.height=e.layoutRect().h+"px",i(l,"valuenow",t),i(l,"valuetext",""+e.settings.previewFilter(t)),i(l,"valuemin",e._minValue),i(l,"valuemax",e._maxValue)}return e.extend({init:function(e){var t=this;e.previewFilter||(e.previewFilter=function(e){return Math.round(100*e)/100}),t._super(e),t.classes.add("slider"),"v"==e.orientation&&t.classes.add("vertical"),t._minValue=e.minValue||0,t._maxValue=e.maxValue||100,t._initValue=t.state.get("value")},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;return'<div id="'+t+'" class="'+e.classes+'"><div id="'+t+'-handle" class="'+n+'slider-handle" role="slider" tabindex="-1"></div></div>'},reset:function(){this.value(this._initValue).repaint()},postRender:function(){function e(e,t,n){return(n+e)/(t-e)}function i(e,t,n){return n*(t-e)-e}function o(t,n){function o(o){var a;a=m.value(),a=r(a=i(t,n,e(t,n,a)+.05*o),t,n),m.value(a),m.fire("dragstart",{value:a}),m.fire("drag",{value:a}),m.fire("dragend",{value:a})}m.on("keydown",function(e){switch(e.keyCode){case 37:case 38:o(-1);break;case 39:case 40:o(1)}})}function a(e,i,o){var a,s,l,h,p;m._dragHelper=new t(m._id,{handle:m._id+"-handle",start:function(e){a=e[c],s=parseInt(m.getEl("handle").style[u],10),l=(m.layoutRect()[f]||100)-n.getSize(o)[d],m.fire("dragstart",{value:p})},drag:function(t){var n=t[c]-a;h=r(s+n,0,l),o.style[u]=h+"px",p=e+h/l*(i-e),m.value(p),m.tooltip().text(""+m.settings.previewFilter(p)).show().moveRel(o,"bc tc"),m.fire("drag",{value:p})},stop:function(){m.tooltip().hide(),m.fire("dragend",{value:p})}})}var s,l,c,u,d,f,m=this;s=m._minValue,l=m._maxValue,"v"==m.settings.orientation?(c="screenY",u="top",d="height",f="h"):(c="screenX",u="left",d="width",f="w"),m._super(),o(s,l,m.getEl("handle")),a(s,l,m.getEl("handle"))},repaint:function(){this._super(),o(this,this.value())},bindStates:function(){var e=this;return e.state.on("change:value",function(t){o(e,t.value)}),e._super()}})}),r("tinymce/ui/Spacer",["tinymce/ui/Widget"],function(e){return e.extend({renderHtml:function(){var e=this;return e.classes.add("spacer"),e.canFocus=!1,'<div id="'+e._id+'" class="'+e.classes+'"></div>'}})}),r("tinymce/ui/SplitButton",["tinymce/ui/MenuButton","tinymce/ui/DomUtils","tinymce/dom/DomQuery"],function(e,t,n){return e.extend({Defaults:{classes:"widget btn splitbtn",role:"button"},repaint:function(){var e,r,i=this,o=i.getEl(),a=i.layoutRect();return i._super(),e=o.firstChild,r=o.lastChild,n(e).css({width:a.w-t.getSize(r).width,height:a.h-2}),n(r).css({height:a.h-2}),i},activeMenu:function(e){var t=this;n(t.getEl().lastChild).toggleClass(t.classPrefix+"active",e)},renderHtml:function(){var e,t=this,n=t._id,r=t.classPrefix,i=t.state.get("icon"),o=t.state.get("text"),a="";return(e=t.settings.image)?(i="none","string"!=typeof e&&(e=window.getSelection?e[0]:e[1]),e=" style=\"background-image: url('"+e+"')\""):e="",i=t.settings.icon?r+"ico "+r+"i-"+i:"",o&&(t.classes.add("btn-has-text"),a='<span class="'+r+'txt">'+t.encode(o)+"</span>"),'<div id="'+n+'" class="'+t.classes+'" role="button" tabindex="-1"><button type="button" hidefocus="1" tabindex="-1">'+(i?'<i class="'+i+'"'+e+"></i>":"")+a+'</button><button type="button" class="'+r+'open" hidefocus="1" tabindex="-1">'+(t._menuBtnText?(i?"\xa0":"")+t._menuBtnText:"")+' <i class="'+r+'caret"></i></button></div>'},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(e){var n=e.target;if(e.control==this)for(;n;){if(e.aria&&"down"!=e.aria.key||"BUTTON"==n.nodeName&&-1==n.className.indexOf("open"))return e.stopImmediatePropagation(),void(t&&t.call(this,e));n=n.parentNode}}),delete e.settings.onclick,e._super()}})}),r("tinymce/ui/StackLayout",["tinymce/ui/FlowLayout"],function(e){return e.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"},isNative:function(){return!0}})}),r("tinymce/ui/TabPanel",["tinymce/ui/Panel","tinymce/dom/DomQuery","tinymce/ui/DomUtils"],function(e,t,n){return e.extend({Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(e){var n;this.activeTabId&&(n=this.getEl(this.activeTabId),t(n).removeClass(this.classPrefix+"active"),n.setAttribute("aria-selected","false")),this.activeTabId="t"+e,(n=this.getEl("t"+e)).setAttribute("aria-selected","true"),t(n).addClass(this.classPrefix+"active"),this.items()[e].show().fire("showtab"),this.reflow(),this.items().each(function(t,n){e!=n&&t.hide()})},renderHtml:function(){var e=this,t=e._layout,n="",r=e.classPrefix;return e.preRender(),t.preRender(e),e.items().each(function(t,i){var o=e._id+"-t"+i;t.aria("role","tabpanel"),t.aria("labelledby",o),n+='<div id="'+o+'" class="'+r+'tab" unselectable="on" role="tab" aria-controls="'+t._id+'" aria-selected="false" tabIndex="-1">'+e.encode(t.settings.title)+"</div>"}),'<div id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1"><div id="'+e._id+'-head" class="'+r+'tabs" role="tablist">'+n+'</div><div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+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(n&&n.id==e._id+"-head")for(var r=n.childNodes.length;r--;)n.childNodes[r]==t.target&&e.activateTab(r)})},initLayoutRect:function(){var e,t,r,i=this;t=(t=n.getSize(i.getEl("head")).width)<0?0:t,r=0,i.items().each(function(e){t=Math.max(t,e.layoutRect().minW),r=Math.max(r,e.layoutRect().minH)}),i.items().each(function(e){e.settings.x=0,e.settings.y=0,e.settings.w=t,e.settings.h=r,e.layoutRect({x:0,y:0,w:t,h:r})});var o=n.getSize(i.getEl("head")).height;return i.settings.minWidth=t,i.settings.minHeight=r+o,(e=i._super()).deltaH+=o,e.innerH=e.h-e.deltaH,e}})}),r("tinymce/ui/TextBox",["tinymce/ui/Widget","tinymce/util/Tools","tinymce/ui/DomUtils"],function(e,t,n){return e.extend({init:function(e){var t=this;t._super(e),t.classes.add("textbox"),e.multiline?t.classes.add("multiline"):(t.on("keydown",function(e){var n;13==e.keyCode&&(e.preventDefault(),t.parents().reverse().each(function(e){if(e.toJSON)return n=e,!1}),t.fire("submit",{data:n.toJSON()}))}),t.on("keyup",function(e){t.state.set("value",e.target.value)}))},repaint:function(){var e,t,n,r,i,o=this,a=0;e=o.getEl().style,t=o._layoutRect,i=o._lastRepaintRect||{};var s=document;return!o.settings.multiline&&s.all&&(!s.documentMode||s.documentMode<=8)&&(e.lineHeight=t.h-a+"px"),r=(n=o.borderBox).left+n.right+8,a=n.top+n.bottom+(o.settings.multiline?8:0),t.x!==i.x&&(e.left=t.x+"px",i.x=t.x),t.y!==i.y&&(e.top=t.y+"px",i.y=t.y),t.w!==i.w&&(e.width=t.w-r+"px",i.w=t.w),t.h!==i.h&&(e.height=t.h-a+"px",i.h=t.h),o._lastRepaintRect=i,o.fire("repaint",{},!1),o},renderHtml:function(){var e,r,i=this,o=i.settings;return e={id:i._id,hidefocus:"1"},t.each(["rows","spellcheck","maxLength","size","readonly","min","max","step","list","pattern","placeholder","required","multiple"],function(t){e[t]=o[t]}),i.disabled()&&(e.disabled="disabled"),o.subtype&&(e.type=o.subtype),(r=n.create(o.multiline?"textarea":"input",e)).value=i.state.get("value"),r.className=i.classes,r.outerHTML},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl().value),this.state.get("value"))},postRender:function(){var e=this;e.getEl().value=e.state.get("value"),e._super(),e.$el.on("change",function(t){e.state.set("value",t.target.value),e.fire("change",t)})},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e.getEl().value!=t.value&&(e.getEl().value=t.value)}),e.state.on("change:disabled",function(t){e.getEl().disabled=t.value}),e._super()},remove:function(){this.$el.off(),this._super()}})}),r("tinymce/Register",[],function(){var e=this||window,t=function(){return e.tinymce};return"function"==typeof e.define&&(e.define.amd||e.define("ephox/tinymce",[],t)),"object"==typeof module&&(module.exports=window.tinymce),{}}),o(["tinymce/geom/Rect","tinymce/util/Promise","tinymce/util/Delay","tinymce/Env","tinymce/dom/EventUtils","tinymce/dom/Sizzle","tinymce/util/Tools","tinymce/dom/DomQuery","tinymce/html/Styles","tinymce/dom/TreeWalker","tinymce/html/Entities","tinymce/dom/DOMUtils","tinymce/dom/ScriptLoader","tinymce/AddOnManager","tinymce/dom/RangeUtils","tinymce/html/Node","tinymce/html/Schema","tinymce/html/SaxParser","tinymce/html/DomParser","tinymce/html/Writer","tinymce/html/Serializer","tinymce/dom/Serializer","tinymce/util/VK","tinymce/dom/ControlSelection","tinymce/dom/BookmarkManager","tinymce/dom/Selection","tinymce/Formatter","tinymce/UndoManager","tinymce/EditorCommands","tinymce/util/URI","tinymce/util/Class","tinymce/util/EventDispatcher","tinymce/util/Observable","tinymce/ui/Selector","tinymce/ui/Collection","tinymce/ui/ReflowQueue","tinymce/ui/Control","tinymce/ui/Factory","tinymce/ui/KeyboardNavigation","tinymce/ui/Container","tinymce/ui/DragHelper","tinymce/ui/Scrollable","tinymce/ui/Panel","tinymce/ui/Movable","tinymce/ui/Resizable","tinymce/ui/FloatPanel","tinymce/ui/Window","tinymce/ui/MessageBox","tinymce/WindowManager","tinymce/ui/Tooltip","tinymce/ui/Widget","tinymce/ui/Progress","tinymce/ui/Notification","tinymce/NotificationManager","tinymce/EditorObservable","tinymce/Shortcuts","tinymce/Editor","tinymce/util/I18n","tinymce/FocusManager","tinymce/EditorManager","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/Button","tinymce/ui/ButtonGroup","tinymce/ui/Checkbox","tinymce/ui/ComboBox","tinymce/ui/ColorBox","tinymce/ui/PanelButton","tinymce/ui/ColorButton","tinymce/util/Color","tinymce/ui/ColorPicker","tinymce/ui/Path","tinymce/ui/ElementPath","tinymce/ui/FormItem","tinymce/ui/Form","tinymce/ui/FieldSet","tinymce/ui/FilePicker","tinymce/ui/FitLayout","tinymce/ui/FlexLayout","tinymce/ui/FlowLayout","tinymce/ui/FormatControls","tinymce/ui/GridLayout","tinymce/ui/Iframe","tinymce/ui/InfoBox","tinymce/ui/Label","tinymce/ui/Toolbar","tinymce/ui/MenuBar","tinymce/ui/MenuButton","tinymce/ui/MenuItem","tinymce/ui/Throbber","tinymce/ui/Menu","tinymce/ui/ListBox","tinymce/ui/Radio","tinymce/ui/ResizeHandle","tinymce/ui/SelectBox","tinymce/ui/Slider","tinymce/ui/Spacer","tinymce/ui/SplitButton","tinymce/ui/StackLayout","tinymce/ui/TabPanel","tinymce/ui/TextBox"])}(window);