tinymce-rails 5.1.4.1 → 5.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/source/tinymce/tinymce.js +4 -4
  3. data/lib/tinymce/rails/version.rb +2 -2
  4. data/vendor/assets/javascripts/tinymce/plugins/advlist/plugin.js +1 -1
  5. data/vendor/assets/javascripts/tinymce/plugins/anchor/plugin.js +1 -1
  6. data/vendor/assets/javascripts/tinymce/plugins/autolink/plugin.js +1 -1
  7. data/vendor/assets/javascripts/tinymce/plugins/autoresize/plugin.js +1 -1
  8. data/vendor/assets/javascripts/tinymce/plugins/autosave/plugin.js +1 -1
  9. data/vendor/assets/javascripts/tinymce/plugins/bbcode/plugin.js +1 -1
  10. data/vendor/assets/javascripts/tinymce/plugins/charmap/plugin.js +2 -2
  11. data/vendor/assets/javascripts/tinymce/plugins/code/plugin.js +1 -1
  12. data/vendor/assets/javascripts/tinymce/plugins/codesample/plugin.js +1 -1
  13. data/vendor/assets/javascripts/tinymce/plugins/colorpicker/plugin.js +1 -1
  14. data/vendor/assets/javascripts/tinymce/plugins/contextmenu/plugin.js +1 -1
  15. data/vendor/assets/javascripts/tinymce/plugins/directionality/plugin.js +1 -1
  16. data/vendor/assets/javascripts/tinymce/plugins/emoticons/plugin.js +1 -1
  17. data/vendor/assets/javascripts/tinymce/plugins/fullpage/plugin.js +1 -1
  18. data/vendor/assets/javascripts/tinymce/plugins/fullscreen/plugin.js +1 -1
  19. data/vendor/assets/javascripts/tinymce/plugins/help/plugin.js +1 -1
  20. data/vendor/assets/javascripts/tinymce/plugins/hr/plugin.js +1 -1
  21. data/vendor/assets/javascripts/tinymce/plugins/image/plugin.js +1 -1
  22. data/vendor/assets/javascripts/tinymce/plugins/imagetools/plugin.js +1 -1
  23. data/vendor/assets/javascripts/tinymce/plugins/importcss/plugin.js +1 -1
  24. data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/plugin.js +1 -1
  25. data/vendor/assets/javascripts/tinymce/plugins/legacyoutput/plugin.js +1 -1
  26. data/vendor/assets/javascripts/tinymce/plugins/link/plugin.js +1 -1
  27. data/vendor/assets/javascripts/tinymce/plugins/lists/plugin.js +1 -1
  28. data/vendor/assets/javascripts/tinymce/plugins/media/plugin.js +1 -1
  29. data/vendor/assets/javascripts/tinymce/plugins/nonbreaking/plugin.js +1 -1
  30. data/vendor/assets/javascripts/tinymce/plugins/noneditable/plugin.js +1 -1
  31. data/vendor/assets/javascripts/tinymce/plugins/pagebreak/plugin.js +1 -1
  32. data/vendor/assets/javascripts/tinymce/plugins/paste/plugin.js +2 -2
  33. data/vendor/assets/javascripts/tinymce/plugins/preview/plugin.js +1 -1
  34. data/vendor/assets/javascripts/tinymce/plugins/print/plugin.js +1 -1
  35. data/vendor/assets/javascripts/tinymce/plugins/quickbars/plugin.js +1 -1
  36. data/vendor/assets/javascripts/tinymce/plugins/save/plugin.js +1 -1
  37. data/vendor/assets/javascripts/tinymce/plugins/searchreplace/plugin.js +1 -1
  38. data/vendor/assets/javascripts/tinymce/plugins/spellchecker/plugin.js +1 -1
  39. data/vendor/assets/javascripts/tinymce/plugins/tabfocus/plugin.js +1 -1
  40. data/vendor/assets/javascripts/tinymce/plugins/table/plugin.js +1 -1
  41. data/vendor/assets/javascripts/tinymce/plugins/template/plugin.js +1 -1
  42. data/vendor/assets/javascripts/tinymce/plugins/textcolor/plugin.js +1 -1
  43. data/vendor/assets/javascripts/tinymce/plugins/textpattern/plugin.js +1 -1
  44. data/vendor/assets/javascripts/tinymce/plugins/toc/plugin.js +1 -1
  45. data/vendor/assets/javascripts/tinymce/plugins/visualblocks/plugin.js +1 -1
  46. data/vendor/assets/javascripts/tinymce/plugins/visualchars/plugin.js +1 -1
  47. data/vendor/assets/javascripts/tinymce/plugins/wordcount/plugin.js +1 -1
  48. data/vendor/assets/javascripts/tinymce/themes/mobile/theme.js +2 -2
  49. data/vendor/assets/javascripts/tinymce/themes/silver/theme.js +2 -2
  50. data/vendor/assets/javascripts/tinymce/tinymce.js +2 -2
  51. metadata +2 -2
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.1.4 (2019-12-11)
7
+ * Version: 5.1.5 (2019-12-19)
8
8
  */
9
- !function(v){"use strict";function Z(){}function i(e,o){return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return e(o.apply(null,n))}}function l(n){return n}var nn=function(n){return function(){return n}};function d(o){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=r.concat(n);return o.apply(null,e)}}function b(e){return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return!e.apply(null,n)}}function r(n){return function(){throw new Error(n)}}var u=nn(!1),a=nn(!0),n=tinymce.util.Tools.resolve("tinymce.ThemeManager"),N=function(){return(N=Object.assign||function(n){for(var t,e=1,o=arguments.length;e<o;e++)for(var r in t=arguments[e])Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}).apply(this,arguments)};function c(n,t){var e={};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&t.indexOf(o)<0&&(e[o]=n[o]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(n);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(n,o[r])&&(e[o[r]]=n[o[r]])}return e}function g(){for(var n=0,t=0,e=arguments.length;t<e;t++)n+=arguments[t].length;var o=Array(n),r=0;for(t=0;t<e;t++)for(var i=arguments[t],u=0,a=i.length;u<a;u++,r++)o[r]=i[u];return o}function t(){return s}var e,s=(e={fold:function(n,t){return n()},is:u,isSome:u,isNone:a,getOr:m,getOrThunk:f,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:nn(null),getOrUndefined:nn(undefined),or:m,orThunk:f,map:t,each:Z,bind:t,exists:u,forall:a,filter:t,equals:o,equals_:o,toArray:function(){return[]},toString:nn("none()")},Object.freeze&&Object.freeze(e),e);function o(n){return n.isNone()}function f(n){return n()}function m(n){return n}function p(t){return function(n){return function(n){if(null===n)return"null";var t=typeof n;return"object"==t&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":t}(n)===t}}function h(n,t){if(fn(n)){for(var e=0,o=n.length;e<o;++e)if(!0!==t(n[e]))return!1;return!0}return!1}function y(n,t){return pn.call(n,t)}function x(n,t){for(var e=0,o=n.length;e<o;e++){if(t(n[e],e))return!0}return!1}function w(n,t){for(var e=[],o=0;o<n.length;o+=t){var r=gn.call(n,o,o+t);e.push(r)}return e}function S(n,t){for(var e=n.length,o=new Array(e),r=0;r<e;r++){var i=n[r];o[r]=t(i,r)}return o}function C(n,t){for(var e=[],o=0,r=n.length;o<r;o++){var i=n[o];t(i,o)&&e.push(i)}return e}function k(n,t,e){return function(n,t){for(var e=n.length-1;0<=e;e--){t(n[e],e)}}(n,function(n){e=t(e,n)}),e}function O(n,t,e){return bn(n,function(n){e=t(e,n)}),e}function T(n,t){for(var e=0,o=n.length;e<o;e++){var r=n[e];if(t(r,e))return on.some(r)}return on.none()}function E(n,t){for(var e=0,o=n.length;e<o;e++){if(t(n[e],e))return on.some(e)}return on.none()}function H(n){for(var t=[],e=0,o=n.length;e<o;++e){if(!fn(n[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+n);hn.apply(t,n[e])}return t}function D(n,t){var e=S(n,t);return H(e)}function B(n,t){for(var e=0,o=n.length;e<o;++e){if(!0!==t(n[e],e))return!1}return!0}function A(n){var t=gn.call(n,0);return t.reverse(),t}function _(n,t){return C(n,function(n){return!vn(t,n)})}function M(n){return[n]}function F(n){return 0===n.length?on.none():on.some(n[n.length-1])}function P(n,e){return kn(n,function(n,t){return{k:t,v:e(n,t)}})}function I(n,t){for(var e=wn(n),o=0,r=e.length;o<r;o++){var i=e[o],u=n[i];if(t(u,i,n))return on.some(u)}return on.none()}function R(n){return On(n,function(n){return n})}function V(n,t){return Tn(n,t)?on.from(n[t]):on.none()}function z(u){return function(){for(var n=new Array(arguments.length),t=0;t<n.length;t++)n[t]=arguments[t];if(0===n.length)throw new Error("Can't merge zero objects");for(var e={},o=0;o<n.length;o++){var r=n[o];for(var i in r)Dn.call(r,i)&&(e[i]=u(e[i],r[i]))}return e}}function L(e){var o,r=!1;return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return r||(r=!0,o=e.apply(null,n)),o}}function j(n){return _n.defaultedThunk(nn(n))}function U(t){return function(n){return Tn(n,t)?on.from(n[t]):on.none()}}function W(n,t){return U(t)(n)}function G(n,t){var e={};return e[n]=t,e}function X(n,t){return function(n,e){var o={};return Cn(n,function(n,t){vn(e,t)||(o[t]=n)}),o}(n,t)}function Y(n,t){return function(t,e){return function(n){return Tn(n,t)?n[t]:e}}(n,t)}function q(n,t){return G(n,t)}function K(n){return function(n){var t={};return bn(n,function(n){t[n.key]=n.value}),t}(n)}function J(n,t){var e=function(n){var t=[],e=[];return bn(n,function(n){n.fold(function(n){t.push(n)},function(n){e.push(n)})}),{errors:t,values:e}}(n);return 0<e.errors.length?function(n){return an.error(H(n))}(e.errors):function(n,t){return 0===n.length?an.value(t):an.value(Bn(t,An.apply(undefined,n)))}(e.values,t)}function $(n,t){return function(n,t){return Tn(n,t)&&n[t]!==undefined&&null!==n[t]}(n,t)}var Q,tn,en=function(e){function n(){return r}function t(n){return n(e)}var o=nn(e),r={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:a,isNone:u,getOr:o,getOrThunk:o,getOrDie:o,getOrNull:o,getOrUndefined:o,or:n,orThunk:n,map:function(n){return en(n(e))},each:function(n){n(e)},bind:t,exists:t,forall:t,filter:function(n){return n(e)?r:s},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(u,function(n){return t(e,n)})}};return r},on={some:en,none:t,from:function(n){return null===n||n===undefined?s:en(n)}},rn=function(e){return{is:function(n){return e===n},isValue:a,isError:u,getOr:nn(e),getOrThunk:nn(e),getOrDie:nn(e),or:function(n){return rn(e)},orThunk:function(n){return rn(e)},fold:function(n,t){return t(e)},map:function(n){return rn(n(e))},mapError:function(n){return rn(e)},each:function(n){n(e)},bind:function(n){return n(e)},exists:function(n){return n(e)},forall:function(n){return n(e)},toOption:function(){return on.some(e)}}},un=function(e){return{is:u,isValue:u,isError:a,getOr:l,getOrThunk:function(n){return n()},getOrDie:function(){return r(String(e))()},or:function(n){return n},orThunk:function(n){return n()},fold:function(n,t){return n(e)},map:function(n){return un(e)},mapError:function(n){return un(n(e))},each:Z,bind:function(n){return un(e)},exists:u,forall:a,toOption:on.none}},an={value:rn,error:un,fromOption:function(n,t){return n.fold(function(){return un(t)},rn)}},cn=p("string"),sn=p("object"),fn=p("array"),ln=p("boolean"),dn=p("function"),mn=p("number"),gn=Array.prototype.slice,pn=Array.prototype.indexOf,hn=Array.prototype.push,vn=function(n,t){return-1<y(n,t)},bn=function(n,t){for(var e=0,o=n.length;e<o;e++){t(n[e],e)}},yn=function(n){return 0===n.length?on.none():on.some(n[0])},xn=dn(Array.from)?Array.from:function(n){return gn.call(n)},wn=Object.keys,Sn=Object.hasOwnProperty,Cn=function(n,t){for(var e=wn(n),o=0,r=e.length;o<r;o++){var i=e[o];t(n[i],i)}},kn=function(n,o){var r={};return Cn(n,function(n,t){var e=o(n,t);r[e.k]=e.v}),r},On=function(n,e){var o=[];return Cn(n,function(n,t){o.push(e(n,t))}),o},Tn=function(n,t){return Sn.call(n,t)},En=function(u){if(!fn(u))throw new Error("cases must be an array");if(0===u.length)throw new Error("there must be at least one case");var a=[],e={};return bn(u,function(n,o){var t=wn(n);if(1!==t.length)throw new Error("one and only one name per case");var r=t[0],i=n[r];if(e[r]!==undefined)throw new Error("duplicate key detected:"+r);if("cata"===r)throw new Error("cannot have a case named cata (sorry)");if(!fn(i))throw new Error("case arguments must be an array");a.push(r),e[r]=function(){var n=arguments.length;if(n!==i.length)throw new Error("Wrong number of arguments to case "+r+". Expected "+i.length+" ("+i+"), got "+n);for(var e=new Array(n),t=0;t<e.length;t++)e[t]=arguments[t];return{fold:function(){if(arguments.length!==u.length)throw new Error("Wrong number of arguments to fold. Expected "+u.length+", got "+arguments.length);return arguments[o].apply(null,e)},match:function(n){var t=wn(n);if(a.length!==t.length)throw new Error("Wrong number of arguments to match. Expected: "+a.join(",")+"\nActual: "+t.join(","));if(!B(a,function(n){return vn(t,n)}))throw new Error("Not all branches were specified when using match. Specified: "+t.join(", ")+"\nRequired: "+a.join(", "));return n[r].apply(null,e)},log:function(n){v.console.log(n,{constructors:a,constructor:r,params:e})}}}}),e},Dn=Object.prototype.hasOwnProperty,Bn=z(function(n,t){return sn(n)&&sn(t)?Bn(n,t):t}),An=z(function(n,t){return t}),_n=En([{strict:[]},{defaultedThunk:["fallbackThunk"]},{asOption:[]},{asDefaultedOptionThunk:["fallbackThunk"]},{mergeWithThunk:["baseThunk"]}]),Mn=_n.strict,Fn=_n.asOption,In=_n.defaultedThunk,Rn=_n.mergeWithThunk,Vn=(En([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]),function(n){return U(n)}),Nn=function(n,t){return W(n,t)};(tn=Q=Q||{})[tn.Error=0]="Error",tn[tn.Value=1]="Value";function Hn(n,t,e){return n.stype===Q.Error?t(n.serror):e(n.svalue)}function Pn(n){return{stype:Q.Value,svalue:n}}function zn(n){return{stype:Q.Error,serror:n}}function Ln(n){return i(ee,H)(n)}function jn(n){return sn(n)&&100<wn(n).length?" removed due to size":JSON.stringify(n,null,2)}function Un(n,t){return ee([{path:n,getErrorInfo:t}])}function Wn(n,t,e){return W(t,e).fold(function(){return function(n,t,e){return Un(n,function(){return'Could not find valid *strict* value for "'+t+'" in '+jn(e)})}(n,e,t)},ne)}function Gn(n,t,e){var o=W(n,t).fold(function(){return e(n)},l);return ne(o)}function Xn(u,a,n,c){return n.fold(function(o,e,n,r){function i(n){var t=r.extract(u.concat([o]),c,n);return ie(t,function(n){return G(e,c(n))})}function t(n){return n.fold(function(){var n=G(e,c(on.none()));return ne(n)},function(n){var t=r.extract(u.concat([o]),c,n);return ie(t,function(n){return G(e,c(on.some(n)))})})}return n.fold(function(){return oe(Wn(u,a,o),i)},function(n){return oe(Gn(a,o,n),i)},function(){return oe(function(n,t){return ne(W(n,t))}(a,o),t)},function(n){return oe(function(t,n,e){var o=W(t,n).map(function(n){return!0===n?e(t):n});return ne(o)}(a,o,n),t)},function(n){var t=n(a),e=ie(Gn(a,o,nn({})),function(n){return Bn(t,n)});return oe(e,i)})},function(n,t){var e=t(a);return ne(G(n,c(e)))})}function Yn(o){return{extract:function(t,n,e){return re(o(e,n),function(n){return function(n,t){return Un(n,function(){return t})}(t,n)})},toString:function(){return"val"},toDsl:function(){return se.itemOf(o)}}}function qn(n){var i=de(n),u=k(n,function(t,n){return n.fold(function(n){return Bn(t,q(n,!0))},nn(t))},{});return{extract:function(n,t,e){var o=ln(e)?[]:function(t){var n=wn(t);return C(n,function(n){return $(t,n)})}(e),r=C(o,function(n){return!$(u,n)});return 0===r.length?i.extract(n,t,e):function(n,t){return Un(n,function(){return"There are unsupported fields: ["+t.join(", ")+"] specified"})}(n,r)},toString:i.toString,toDsl:i.toDsl}}function Kn(r){return{extract:function(e,o,n){var t=S(n,function(n,t){return r.extract(e.concat(["["+t+"]"]),o,n)});return ce(t)},toString:function(){return"array("+r.toString()+")"},toDsl:function(){return se.arrOf(r)}}}function Jn(i,u){return{extract:function(e,o,r){var n=wn(r),t=function(n,t){return Kn(Yn(i)).extract(n,l,t)}(e,n);return oe(t,function(n){var t=S(n,function(n){return le.field(n,n,Mn(),u)});return de(t).extract(e,o,r)})},toString:function(){return"setOf("+u.toString()+")"},toDsl:function(){return se.setOf(i,u)}}}function $n(t,e,o,n,r){return Nn(n,r).fold(function(){return function(n,t,e){return Un(n,function(){return'The chosen schema: "'+e+'" did not exist in branches: '+jn(t)})}(t,n,r)},function(n){return n.extract(t.concat(["branch: "+r]),e,o)})}function Qn(n,r){return{extract:function(t,e,o){return Nn(o,n).fold(function(){return function(n,t){return Un(n,function(){return'Choice schema did not contain choice key: "'+t+'"'})}(t,n)},function(n){return $n(t,e,o,r,n)})},toString:function(){return"chooseOn("+n+"). Possible values: "+wn(r)},toDsl:function(){return se.choiceOf(n,r)}}}function Zn(t){return Yn(function(n){return t(n).fold(ee,ne)})}function nt(t,n){return Jn(function(n){return Qt(t(n))},n)}function tt(n,t,e){return Zt(function(n,t,e,o){var r=t.extract([n],e,o);return ue(r,function(n){return{input:o,errors:n}})}(n,t,l,e))}function et(n){return n.fold(function(n){throw new Error(ye(n))},l)}function ot(n,t,e){return et(tt(n,t,e))}function rt(n,t){return Qn(n,t)}function it(n,t){return Qn(n,P(t,de))}function ut(e,o){return Yn(function(n){var t=typeof n;return e(n)?ne(n):ee("Expected type: "+o+" but got: "+t)})}function at(t){return Zn(function(n){return vn(t,n)?an.value(n):an.error('Unsupported value: "'+n+'", choose one of "'+t.join(", ")+'".')})}function ct(n){return he(n,n,Mn(),me())}function st(n,t){return he(n,n,Mn(),t)}function ft(n){return st(n,Se)}function lt(n,t){return he(n,n,Mn(),at(t))}function dt(n){return st(n,ke)}function mt(n,t){return he(n,n,Mn(),de(t))}function gt(n,t){return he(n,n,Mn(),ge(t))}function pt(n,t){return he(n,n,Mn(),Kn(t))}function ht(n){return he(n,n,Fn(),me())}function vt(n,t){return he(n,n,Fn(),t)}function bt(n){return vt(n,we)}function yt(n){return vt(n,Se)}function xt(n){return vt(n,ke)}function wt(n,t){return vt(n,de(t))}function St(n,t){return he(n,n,j(t),me())}function Ct(n,t,e){return he(n,n,j(t),e)}function kt(n,t){return Ct(n,t,we)}function Ot(n,t){return Ct(n,t,Se)}function Tt(n,t,e){return Ct(n,t,at(e))}function Et(n,t){return Ct(n,t,Ce)}function Dt(n,t){return Ct(n,t,ke)}function Bt(n,t,e){return Ct(n,t,de(e))}function At(n,t){return pe(n,t)}function _t(n,t,e){return 0!=(n.compareDocumentPosition(t)&e)}function Mt(n,t){var e=function(n,t){for(var e=0;e<n.length;e++){var o=n[e];if(o.test(t))return o}return undefined}(n,t);if(!e)return{major:0,minor:0};function o(n){return Number(t.replace(e,"$"+n))}return Me(o(1),o(2))}function Ft(n,t){return function(){return t===n}}function It(n,t){return function(){return t===n}}function Rt(n,t){var e=String(t).toLowerCase();return T(n,function(n){return n.search(e)})}function Vt(n,t){return-1!==n.indexOf(t)}function Nt(t){return function(n){return Vt(n,t)}}function Ht(){return Ke.get()}function Pt(n,t){var e=n.dom();if(e.nodeType!==Ze)return!1;var o=e;if(o.matches!==undefined)return o.matches(t);if(o.msMatchesSelector!==undefined)return o.msMatchesSelector(t);if(o.webkitMatchesSelector!==undefined)return o.webkitMatchesSelector(t);if(o.mozMatchesSelector!==undefined)return o.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}function zt(n){return n.nodeType!==Ze&&n.nodeType!==no||0===n.childElementCount}function Lt(n,t){var e=t===undefined?v.document:t.dom();return zt(e)?[]:S(e.querySelectorAll(n),Be.fromDom)}function jt(n,t){return n.dom()===t.dom()}function Ut(n,t){return jt(n.element(),t.event().target())}function Wt(n){if(!$(n,"can")&&!$(n,"abort")&&!$(n,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(n,null,2)+" does not have can, abort, or run!");return ot("Extracting event.handler",qn([St("can",nn(!0)),St("abort",nn(!1)),St("run",Z)]),n)}function Gt(e){var n=function(t,o){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return O(t,function(n,t){return n&&o(t).apply(undefined,e)},!0)}}(e,function(n){return n.can}),t=function(t,o){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return O(t,function(n,t){return n||o(t).apply(undefined,e)},!1)}}(e,function(n){return n.abort});return Wt({can:n,abort:t,run:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];bn(e,function(n){n.run.apply(undefined,t)})}})}function Xt(){return Ht().deviceType.isTouch()?wo.tap():bo()}function Yt(n,t){Yo(n,n.element(),t,{})}function qt(n,t,e){Yo(n,n.element(),t,e)}function Kt(n){Yt(n,To())}function Jt(n,t,e){Yo(n,t,e,{})}function $t(n,t,e,o){n.getSystem().triggerEvent(e,t,o.event())}var Qt=function(n){return n.fold(zn,Pn)},Zt=function(n){return Hn(n,an.error,an.value)},ne=Pn,te=function(n){var t=[],e=[];return bn(n,function(n){Hn(n,function(n){return e.push(n)},function(n){return t.push(n)})}),{values:t,errors:e}},ee=zn,oe=function(n,t){return n.stype===Q.Value?t(n.svalue):n},re=function(n,t){return n.stype===Q.Error?t(n.serror):n},ie=function(n,t){return n.stype===Q.Value?{stype:Q.Value,svalue:t(n.svalue)}:n},ue=function(n,t){return n.stype===Q.Error?{stype:Q.Error,serror:t(n.serror)}:n},ae=function(n,t){var e=te(n);return 0<e.errors.length?Ln(e.errors):function(n,t){return 0<n.length?ne(Bn(t,An.apply(undefined,n))):ne(t)}(e.values,t)},ce=function(n){var t=te(n);return 0<t.errors.length?Ln(t.errors):ne(t.values)},se=En([{setOf:["validator","valueType"]},{arrOf:["valueType"]},{objOf:["fields"]},{itemOf:["validator"]},{choiceOf:["key","branches"]},{thunk:["description"]},{func:["args","outputSchema"]}]),fe=En([{field:["name","presence","type"]},{state:["name"]}]),le=En([{field:["key","okey","presence","prop"]},{state:["okey","instantiator"]}]),de=function(o){return{extract:function(n,t,e){return function(t,e,n,o){var r=S(n,function(n){return Xn(t,e,n,o)});return ae(r,{})}(n,e,o,t)},toString:function(){return"obj{\n"+S(o,function(n){return n.fold(function(n,t,e,o){return n+" -> "+o.toString()},function(n,t){return"state("+n+")"})}).join("\n")+"}"},toDsl:function(){return se.objOf(S(o,function(n){return n.fold(function(n,t,e,o){return fe.field(n,e,o)},function(n,t){return fe.state(n)})}))}}},me=nn(Yn(ne)),ge=i(Kn,de),pe=le.state,he=le.field,ve=Yn(ne),be=function(o){return{extract:function(n,t,e){return o().extract(n,t,e)},toString:function(){return o().toString()},toDsl:function(){return o().toDsl()}}},ye=function(n){return"Errors: \n"+function(n){var t=10<n.length?n.slice(0,10).concat([{path:[],getErrorInfo:function(){return"... (only showing first ten failures)"}}]):n;return S(t,function(n){return"Failed path: ("+n.path.join(" > ")+")\n"+n.getErrorInfo()})}(n.errors)+"\n\nInput object: "+jn(n.input)},xe=nn(ve),we=ut(mn,"number"),Se=ut(cn,"string"),Ce=ut(ln,"boolean"),ke=ut(dn,"function"),Oe=function(t){function n(n,t){for(var e=n.next();!e.done;){if(!t(e.value))return!1;e=n.next()}return!0}if(Object(t)!==t)return!0;switch({}.toString.call(t).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return!0;case"Array":case"Object":return Object.keys(t).every(function(n){return Oe(t[n])});case"Map":return n(t.keys(),Oe)&&n(t.values(),Oe);case"Set":return n(t.keys(),Oe);default:return!1}},Te=Yn(function(n){return Oe(n)?ne(n):ee("Expected value to be acceptable for sending via postMessage")}),Ee=function(n){function t(){return e}var e=n;return{get:t,set:function(n){e=n},clone:function(){return Ee(t())}}},De=function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:nn(n)}},Be={fromHtml:function(n,t){var e=(t||v.document).createElement("div");if(e.innerHTML=n,!e.hasChildNodes()||1<e.childNodes.length)throw v.console.error("HTML does not have a single root node",n),new Error("HTML must have a single root node");return De(e.childNodes[0])},fromTag:function(n,t){var e=(t||v.document).createElement(n);return De(e)},fromText:function(n,t){var e=(t||v.document).createTextNode(n);return De(e)},fromDom:De,fromPoint:function(n,t,e){var o=n.dom();return on.from(o.elementFromPoint(t,e)).map(De)}},Ae=function(n,t){return _t(n,t,v.Node.DOCUMENT_POSITION_CONTAINED_BY)},_e=function(){return Me(0,0)},Me=function(n,t){return{major:n,minor:t}},Fe={nu:Me,detect:function(n,t){var e=String(t).toLowerCase();return 0===n.length?_e():Mt(n,e)},unknown:_e},Ie="Firefox",Re=function(n){var t=n.current;return{current:t,version:n.version,isEdge:Ft("Edge",t),isChrome:Ft("Chrome",t),isIE:Ft("IE",t),isOpera:Ft("Opera",t),isFirefox:Ft(Ie,t),isSafari:Ft("Safari",t)}},Ve={unknown:function(){return Re({current:undefined,version:Fe.unknown()})},nu:Re,edge:nn("Edge"),chrome:nn("Chrome"),ie:nn("IE"),opera:nn("Opera"),firefox:nn(Ie),safari:nn("Safari")},Ne="Windows",He="Android",Pe="Solaris",ze="FreeBSD",Le=function(n){var t=n.current;return{current:t,version:n.version,isWindows:It(Ne,t),isiOS:It("iOS",t),isAndroid:It(He,t),isOSX:It("OSX",t),isLinux:It("Linux",t),isSolaris:It(Pe,t),isFreeBSD:It(ze,t)}},je={unknown:function(){return Le({current:undefined,version:Fe.unknown()})},nu:Le,windows:nn(Ne),ios:nn("iOS"),android:nn(He),linux:nn("Linux"),osx:nn("OSX"),solaris:nn(Pe),freebsd:nn(ze)},Ue=function(n,e){return Rt(n,e).map(function(n){var t=Fe.detect(n.versionRegexes,e);return{current:n.name,version:t}})},We=function(n,e){return Rt(n,e).map(function(n){var t=Fe.detect(n.versionRegexes,e);return{current:n.name,version:t}})},Ge=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Xe=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(n){return Vt(n,"edge/")&&Vt(n,"chrome")&&Vt(n,"safari")&&Vt(n,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Ge],search:function(n){return Vt(n,"chrome")&&!Vt(n,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(n){return Vt(n,"msie")||Vt(n,"trident")}},{name:"Opera",versionRegexes:[Ge,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Nt("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Nt("firefox")},{name:"Safari",versionRegexes:[Ge,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(n){return(Vt(n,"safari")||Vt(n,"mobile/"))&&Vt(n,"applewebkit")}}],Ye=[{name:"Windows",search:Nt("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(n){return Vt(n,"iphone")||Vt(n,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Nt("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Nt("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Nt("linux"),versionRegexes:[]},{name:"Solaris",search:Nt("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Nt("freebsd"),versionRegexes:[]}],qe={browsers:nn(Xe),oses:nn(Ye)},Ke=Ee(function(n,t){var e=qe.browsers(),o=qe.oses(),r=Ue(e,n).fold(Ve.unknown,Ve.nu),i=We(o,n).fold(je.unknown,je.nu);return{browser:r,os:i,deviceType:function(n,t,e,o){var r=n.isiOS()&&!0===/ipad/i.test(e),i=n.isiOS()&&!r,u=n.isiOS()||n.isAndroid(),a=u||o("(pointer:coarse)"),c=r||!i&&u&&o("(min-device-width:768px)"),s=i||u&&!c,f=t.isSafari()&&n.isiOS()&&!1===/safari/i.test(e),l=!s&&!c&&!f;return{isiPad:nn(r),isiPhone:nn(i),isTablet:nn(c),isPhone:nn(s),isTouch:nn(a),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:nn(f),isDesktop:nn(l)}}(i,r,n,t)}}(v.navigator.userAgent,function(n){return v.window.matchMedia(n).matches})),Je=(v.Node.ATTRIBUTE_NODE,v.Node.CDATA_SECTION_NODE,v.Node.COMMENT_NODE,v.Node.DOCUMENT_NODE),$e=(v.Node.DOCUMENT_TYPE_NODE,v.Node.DOCUMENT_FRAGMENT_NODE,v.Node.ELEMENT_NODE),Qe=v.Node.TEXT_NODE,Ze=(v.Node.PROCESSING_INSTRUCTION_NODE,v.Node.ENTITY_REFERENCE_NODE,v.Node.ENTITY_NODE,v.Node.NOTATION_NODE,$e),no=Je,to=Ht().browser.isIE()?function(n,t){return Ae(n.dom(),t.dom())}:function(n,t){var e=n.dom(),o=t.dom();return e!==o&&e.contains(o)},eo=nn("touchstart"),oo=nn("touchmove"),ro=nn("touchend"),io=nn("touchcancel"),uo=nn("mousedown"),ao=nn("mousemove"),co=nn("mouseout"),so=nn("mouseup"),fo=nn("mouseover"),lo=nn("focusin"),mo=nn("focusout"),go=nn("keydown"),po=nn("keyup"),ho=nn("input"),vo=nn("change"),bo=nn("click"),yo=nn("transitionend"),xo=nn("selectstart"),wo={tap:nn("alloy.tap")},So=nn("alloy.focus"),Co=nn("alloy.blur.post"),ko=nn("alloy.paste.post"),Oo=nn("alloy.receive"),To=nn("alloy.execute"),Eo=nn("alloy.focus.item"),Do=wo.tap,Bo=nn("alloy.longpress"),Ao=nn("alloy.sandbox.close"),_o=nn("alloy.typeahead.cancel"),Mo=nn("alloy.system.init"),Fo=nn("alloy.system.touchmove"),Io=nn("alloy.system.touchend"),Ro=nn("alloy.system.scroll"),Vo=nn("alloy.system.resize"),No=nn("alloy.system.attached"),Ho=nn("alloy.system.detached"),Po=nn("alloy.system.dismissRequested"),zo=nn("alloy.system.repositionRequested"),Lo=nn("alloy.focusmanager.shifted"),jo=nn("alloy.slotcontainer.visibility"),Uo=nn("alloy.change.tab"),Wo=nn("alloy.dismiss.tab"),Go=nn("alloy.highlight"),Xo=nn("alloy.dehighlight"),Yo=function(n,t,e,o){var r=N({target:t},o);n.getSystem().triggerEvent(e,t,P(r,nn))};function qo(n,t,e,o,r){return n(e,o)?on.some(e):dn(r)&&r(e)?on.none():t(e,o,r)}function Ko(n){return n.dom().nodeName.toLowerCase()}function Jo(t){return function(n){return function(n){return n.dom().nodeType}(n)===t}}"undefined"!=typeof v.window?v.window:Function("return this;")();function $o(n){var t=_i(n)?n.dom().parentNode:n.dom();return t!==undefined&&null!==t&&t.ownerDocument.body.contains(t)}function Qo(n,t,e){for(var o=n.dom(),r=dn(e)?e:nn(!1);o.parentNode;){o=o.parentNode;var i=Be.fromDom(o);if(t(i))return on.some(i);if(r(i))break}return on.none()}function Zo(n,t,e){return qo(function(n,t){return t(n)},Qo,n,t,e)}function nr(n,r){var i=function(n){for(var t=0;t<n.childNodes.length;t++){var e=Be.fromDom(n.childNodes[t]);if(r(e))return on.some(e);var o=i(n.childNodes[t]);if(o.isSome())return o}return on.none()};return i(n.dom())}function tr(n){return K(n)}function er(n,t){return{key:n,value:Wt({abort:t})}}function or(n){return{key:n,value:Wt({run:function(n,t){t.event().prevent()}})}}function rr(n,t){return{key:n,value:Wt({run:t})}}function ir(n,t,e){return{key:n,value:Wt({run:function(n){t.apply(undefined,[n].concat(e))}})}}function ur(n){return function(e){return{key:n,value:Wt({run:function(n,t){Ut(n,t)&&e(n,t)}})}}}function ar(n,t,e){return function(e,o){return rr(e,function(n,t){n.getSystem().getByUid(o).each(function(n){$t(n,n.element(),e,t)})})}(n,t.partUids[e])}function cr(n,r){return rr(n,function(t,n){var e=n.event(),o=t.getSystem().getByDom(e.target()).fold(function(){return Ii(e.target(),function(n){return t.getSystem().getByDom(n).toOption()},nn(!1)).getOr(t)},function(n){return n});r(t,o,n)})}function sr(n){return rr(n,function(n,t){t.cut()})}function fr(n,t){return ur(n)(t)}function lr(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(t.length!==e.length)throw new Error('Wrong number of arguments to struct. Expected "['+t.length+']", got '+e.length+" arguments");var o={};return bn(t,function(n,t){o[n]=nn(e[t])}),o}}function dr(n){return n.slice(0).sort()}function mr(t,n){if(!fn(n))throw new Error("The "+t+" fields must be an array. Was: "+n+".");bn(n,function(n){if(!cn(n))throw new Error("The value "+n+" in the "+t+" fields was not a string.")})}function gr(r,i){var u=r.concat(i);if(0===u.length)throw new Error("You must specify at least one required or optional field.");return mr("required",r),mr("optional",i),function(n){var e=dr(n);T(e,function(n,t){return t<e.length-1&&n===e[t+1]}).each(function(n){throw new Error("The field: "+n+" occurs more than once in the combined fields: ["+e.join(", ")+"].")})}(u),function(t){var e=wn(t);B(r,function(n){return vn(e,n)})||function(n,t){throw new Error("All required keys ("+dr(n).join(", ")+") were not specified. Specified keys were: "+dr(t).join(", ")+".")}(r,e);var n=C(e,function(n){return!vn(u,n)});0<n.length&&function(n){throw new Error("Unsupported keys for object: "+dr(n).join(", "))}(n);var o={};return bn(r,function(n){o[n]=nn(t[n])}),bn(i,function(n){o[n]=nn(Object.prototype.hasOwnProperty.call(t,n)?on.some(t[n]):on.none())}),o}}function pr(n){return Be.fromDom(n.dom().ownerDocument)}function hr(n){return Be.fromDom(n.dom().ownerDocument.documentElement)}function vr(n){return Be.fromDom(n.dom().ownerDocument.defaultView)}function br(n){return on.from(n.dom().parentNode).map(Be.fromDom)}function yr(n){return on.from(n.dom().offsetParent).map(Be.fromDom)}function xr(n){return S(n.dom().childNodes,Be.fromDom)}function wr(n,t){var e=n.dom().childNodes;return on.from(e[t]).map(Be.fromDom)}function Sr(t,e){br(t).each(function(n){n.dom().insertBefore(e.dom(),t.dom())})}function Cr(n,t){(function(n){return on.from(n.dom().nextSibling).map(Be.fromDom)})(n).fold(function(){br(n).each(function(n){Pi(n,t)})},function(n){Sr(n,t)})}function kr(t,e){(function(n){return wr(n,0)})(t).fold(function(){Pi(t,e)},function(n){t.dom().insertBefore(e.dom(),n.dom())})}function Or(t,n){bn(n,function(n){Pi(t,n)})}function Tr(n){n.dom().textContent="",bn(xr(n),function(n){zi(n)})}function Er(n){var t=xr(n);0<t.length&&function(t,n){bn(n,function(n){Sr(t,n)})}(n,t),zi(n)}function Dr(n){return n.dom().innerHTML}function Br(n,t){var e=pr(n).dom(),o=Be.fromDom(e.createDocumentFragment()),r=function(n,t){var e=(t||v.document).createElement("div");return e.innerHTML=n,xr(Be.fromDom(e))}(t,e);Or(o,r),Tr(n),Pi(n,o)}function Ar(n,t,e){if(!(cn(e)||ln(e)||mn(e)))throw v.console.error("Invalid call to Attr.set. Key ",t,":: Value ",e,":: Element ",n),new Error("Attribute value was not simple");n.setAttribute(t,e+"")}function _r(n,t,e){Ar(n.dom(),t,e)}function Mr(n,t){var e=n.dom().getAttribute(t);return null===e?undefined:e}function Fr(n,t){var e=n.dom();return!(!e||!e.hasAttribute)&&e.hasAttribute(t)}function Ir(n,t){n.dom().removeAttribute(t)}function Rr(n){return function(n,t){return Be.fromDom(n.dom().cloneNode(t))}(n,!1)}function Vr(n){return function(n){var t=Be.fromTag("div"),e=Be.fromDom(n.dom().cloneNode(!0));return Pi(t,e),Dr(t)}(Rr(n))}function Nr(n){return Vr(n)}function Hr(n){var t=(new Date).getTime();return n+"_"+Math.floor(1e9*Math.random())+ ++Ui+String(t)}function Pr(n){return Hr(n)}function zr(t){function n(n){return function(){throw new Error("The component must be in a context to send: "+n+"\n"+Nr(t().element())+" is not in context.")}}return{debugInfo:nn("fake"),triggerEvent:n("triggerEvent"),triggerFocus:n("triggerFocus"),triggerEscape:n("triggerEscape"),build:n("build"),addToWorld:n("addToWorld"),removeFromWorld:n("removeFromWorld"),addToGui:n("addToGui"),removeFromGui:n("removeFromGui"),getByUid:n("getByUid"),getByDom:n("getByDom"),broadcast:n("broadcast"),broadcastOn:n("broadcastOn"),broadcastEvent:n("broadcastEvent"),isConnected:nn(!1)}}function Lr(n,t){var e=n.toString(),o=e.indexOf(")")+1,r=e.indexOf("("),i=e.substring(r+1,o-1).split(/,\s*/);return n.toFunctionAnnotation=function(){return{name:t,parameters:Qi(i)}},n}function jr(n){return q(Zi,n)}function Ur(o){return function(n,t){var e=t.toString(),o=e.indexOf(")")+1,r=e.indexOf("("),i=e.substring(r+1,o-1).split(/,\s*/);return n.toFunctionAnnotation=function(){return{name:"OVERRIDE",parameters:Qi(i.slice(1))}},n}(function(n){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return o.apply(undefined,[n.getApis()].concat([n].concat(t)))},o)}function Wr(n,r){var i={};return Cn(n,function(n,o){Cn(n,function(n,t){var e=Y(t,[])(i);i[t]=e.concat([r(o,n)])})}),i}function Gr(n){return{classes:n.classes!==undefined?n.classes:[],attributes:n.attributes!==undefined?n.attributes:{},styles:n.styles!==undefined?n.styles:{}}}function Xr(n){return n.cHandler}function Yr(n,t){return{name:nn(n),handler:nn(t)}}function qr(n,t,e){var o=N(N({},e),function(n,t){var e={};return bn(n,function(n){e[n.name()]=n.handlers(t)}),e}(t,n));return Wr(o,Yr)}function Kr(n){var i=function(n){return dn(n)?{can:nn(!0),abort:nn(!1),run:n}:n}(n);return function(n,t){for(var e=[],o=2;o<arguments.length;o++)e[o-2]=arguments[o];var r=[n,t].concat(e);i.abort.apply(undefined,r)?t.stop():i.can.apply(undefined,r)&&i.run.apply(undefined,r)}}function Jr(n,t,e){var o=t[e];return o?function(u,a,n,c){var t=n.slice(0);try{var e=t.sort(function(n,t){var e=n[a](),o=t[a](),r=c.indexOf(e),i=c.indexOf(o);if(-1===r)throw new Error("The ordering for "+u+" does not have an entry for "+e+".\nOrder specified: "+JSON.stringify(c,null,2));if(-1===i)throw new Error("The ordering for "+u+" does not have an entry for "+o+".\nOrder specified: "+JSON.stringify(c,null,2));return r<i?-1:i<r?1:0});return an.value(e)}catch(o){return an.error([o])}}("Event: "+e,"name",n,o).map(function(n){var t=S(n,function(n){return n.handler()});return Gt(t)}):function(n,t){return an.error(["The event ("+n+') has more than one behaviour that listens to it.\nWhen this occurs, you must specify an event ordering for the behaviours in your spec (e.g. [ "listing", "toggling" ]).\nThe behaviours that can trigger it are: '+JSON.stringify(S(t,function(n){return n.name()}),null,2)])}(e,n)}function $r(n){return tt("custom.definition",de([he("dom","dom",Mn(),de([ct("tag"),St("styles",{}),St("classes",[]),St("attributes",{}),ht("value"),ht("innerHtml")])),ct("components"),ct("uid"),St("events",{}),St("apis",{}),he("eventOrder","eventOrder",function(n){return _n.mergeWithThunk(nn(n))}({"alloy.execute":["disabling","alloy.base.behaviour","toggling","typeaheadevents"],"alloy.focus":["alloy.base.behaviour","focusing","keying"],"alloy.system.init":["alloy.base.behaviour","disabling","toggling","representing"],input:["alloy.base.behaviour","representing","streaming","invalidating"],"alloy.system.detached":["alloy.base.behaviour","representing","item-events","tooltipping"],mousedown:["focusing","alloy.base.behaviour","item-type-events"],touchstart:["focusing","alloy.base.behaviour","item-type-events"],mouseover:["item-type-events","tooltipping"]}),xe()),ht("domModification")]),n)}function Qr(n,t){var e=Mr(n,t);return e===undefined||""===e?[]:e.split(" ")}function Zr(n){return n.dom().classList!==undefined}function ni(n,t){return function(n,t,e){var o=Qr(n,t).concat([e]);return _r(n,t,o.join(" ")),!0}(n,"class",t)}function ti(n,t){return function(n,t,e){var o=C(Qr(n,t),function(n){return n!==e});return 0<o.length?_r(n,t,o.join(" ")):Ir(n,t),!1}(n,"class",t)}function ei(n,t){Zr(n)?n.dom().classList.add(t):ni(n,t)}function oi(n){0===(Zr(n)?n.dom().classList:function(n){return Qr(n,"class")}(n)).length&&Ir(n,"class")}function ri(n,t){Zr(n)?n.dom().classList.remove(t):ti(n,t),oi(n)}function ii(n,t){return Zr(n)&&n.dom().classList.contains(t)}function ui(t,n){bn(n,function(n){ei(t,n)})}function ai(t,n){bn(n,function(n){ri(t,n)})}function ci(n){return n.style!==undefined&&dn(n.style.getPropertyValue)}function si(n,t,e){if(!cn(e))throw v.console.error("Invalid call to CSS.set. Property ",t,":: Value ",e,":: Element ",n),new Error("CSS value must be a string: "+e);ci(n)&&n.style.setProperty(t,e)}function fi(n,t){ci(n)&&n.style.removeProperty(t)}function li(n,t,e){var o=n.dom();si(o,t,e)}function di(n,t){var e=n.dom();Cn(t,function(n,t){si(e,t,n)})}function mi(n,t){var e=n.dom(),o=v.window.getComputedStyle(e).getPropertyValue(t),r=""!==o||$o(n)?o:ru(e,t);return null===r?undefined:r}function gi(n,t){var e=n.dom(),o=ru(e,t);return on.from(o).filter(function(n){return 0<n.length})}function pi(n,t,e){var o=Be.fromTag(n);return li(o,t,e),gi(o,t).isSome()}function hi(n,t){var e=n.dom();fi(e,t),Fr(n,"style")&&""===function(n){return n.replace(/^\s+|\s+$/g,"")}(Mr(n,"style"))&&Ir(n,"style")}function vi(n){return n.dom().offsetWidth}function bi(n){return n.dom().value}function yi(n,t){if(t===undefined)throw new Error("Value.set was undefined");n.dom().value=t}function xi(n){var t=Be.fromTag(n.tag);!function(n,t){var e=n.dom();Cn(t,function(n,t){Ar(e,t,n)})}(t,n.attributes),ui(t,n.classes),di(t,n.styles),n.innerHtml.each(function(n){return Br(t,n)});var e=n.domChildren;return Or(t,e),n.value.each(function(n){yi(t,n)}),n.uid,qi(t,n.uid),t}function wi(n,t){return function(t,n){var e=S(n,function(n){return wt(n.name(),[ct("config"),St("state",nu)])}),o=tt("component.behaviours",de(e),t.behaviours).fold(function(n){throw new Error(ye(n)+"\nComplete spec:\n"+JSON.stringify(t,null,2))},function(n){return n});return{list:n,data:P(o,function(n){var t=n.map(function(n){return{config:n.config,state:n.state.init(n.config)}});return function(){return t}})}}(n,t)}function Si(n){var t=function(n){var t=Y("behaviours",{})(n),e=C(wn(t),function(n){return t[n]!==undefined});return S(e,function(n){return t[n].me})}(n);return wi(n,t)}function Ci(n,t,e){var o=function(n){return N(N({},n.dom),{uid:n.uid,domChildren:S(n.components,function(n){return n.element()})})}(n),r=function(n){return n.domModification.fold(function(){return Gr({})},Gr)}(n),i={"alloy.base.modification":r};return function(n,t){return N(N({},n),{attributes:N(N({},n.attributes),t.attributes),styles:N(N({},n.styles),t.styles),classes:n.classes.concat(t.classes)})}(o,0<t.length?function(t,n,e,o){var r=N({},n);bn(e,function(n){r[n.name()]=n.exhibit(t,o)});function i(n){return k(n,function(n,t){return N(N({},t.modification),n)},{})}var u=Wr(r,function(n,t){return{name:n,modification:t}}),a=k(u.classes,function(n,t){return t.modification.concat(n)},[]),c=i(u.attributes),s=i(u.styles);return Gr({classes:a,attributes:c,styles:s})}(e,i,t,o):r)}function ki(n,t,e){var o={"alloy.base.behaviour":function(n){return n.events}(n)};return function(n,t,e,o){var r=qr(n,e,o);return ou(r,t)}(e,n.eventOrder,t,o).getOrDie()}function Oi(n){var t=Ji(n),e=t.events,o=c(t,["events"]),r=function(n){var t=Y("components",[])(n);return S(t,au)}(o),i=N(N({},o),{events:N(N({},ji),e),components:r});return an.value(function(e){function n(){return l}var o=Ee($i),t=et($r(e)),r=Si(e),i=function(n){return n.list}(r),u=function(n){return n.data}(r),a=Ci(t,i,u),c=xi(a),s=ki(t,i,u),f=Ee(t.components),l={getSystem:o.get,config:function(n){var t=u;return(dn(t[n.name()])?t[n.name()]:function(){throw new Error("Could not find "+n.name()+" in "+JSON.stringify(e,null,2))})()},hasConfigured:function(n){return dn(u[n.name()])},spec:nn(e),readState:function(n){return u[n]().map(function(n){return n.state.readState()}).getOr("not enabled")},getApis:function(){return t.apis},connect:function(n){o.set(n)},disconnect:function(){o.set(zr(n))},element:nn(c),syncComponents:function(){var n=xr(c),t=D(n,function(n){return o.get().getByDom(n).fold(function(){return[]},function(n){return[n]})});f.set(t)},components:f.get,events:nn(s)};return l}(i))}function Ti(n){var t=Be.fromText(n);return iu({element:t})}var Ei,Di,Bi,Ai=Jo($e),_i=Jo(Qe),Mi=L(function(){return Fi(Be.fromDom(v.document))}),Fi=function(n){var t=n.dom().body;if(null===t||t===undefined)throw new Error("Body is not available yet");return Be.fromDom(t)},Ii=function(n,t,e){return Zo(n,function(n){return t(n).isSome()},e).bind(t)},Ri=ur(No()),Vi=ur(Ho()),Ni=ur(Mo()),Hi=(Ei=To(),function(n){return rr(Ei,n)}),Pi=(lr("element","offset"),function(n,t){n.dom().appendChild(t.dom())}),zi=function(n){var t=n.dom();null!==t.parentNode&&t.parentNode.removeChild(t)},Li=tr([(Di=So(),Bi=function(n,t){var e=t.event().originator(),o=t.event().target();return!function(n,t,e){return jt(t,n.element())&&!jt(t,e)}(n,e,o)||(v.console.warn(So()+" did not get interpreted by the desired target. \nOriginator: "+Nr(e)+"\nTarget: "+Nr(o)+"\nCheck the "+So()+" event handlers"),!1)},{key:Di,value:Wt({can:Bi})})]),ji=/* */Object.freeze({events:Li}),Ui=0,Wi=nn("alloy-id-"),Gi=nn("data-alloy-id"),Xi=Wi(),Yi=Gi(),qi=function(n,t){Object.defineProperty(n.dom(),Yi,{value:t,writable:!0})},Ki=function(n){var t=Ai(n)?n.dom()[Yi]:null;return on.from(t)},Ji=l,$i=zr(),Qi=function(n){return S(n,function(n){return function(n,t){return function(n,t,e){return""===t||!(n.length<t.length)&&n.substr(e,e+t.length)===t}(n,t,n.length-t.length)}(n,"/*")?n.substring(0,n.length-"/*".length):n})},Zi=Hr("alloy-premade"),nu={init:function(){return tu({readState:function(){return"No State required"}})}},tu=function(n){return n},eu=function(n,t){return function(n,t){return{cHandler:n,purpose:nn(t)}}(d.apply(undefined,[n.handler].concat(t)),n.purpose())},ou=function(n,i){var t=On(n,function(o,r){return(1===o.length?an.value(o[0].handler()):Jr(o,i,r)).map(function(n){var t=Kr(n),e=1<o.length?C(i[r],function(t){return x(o,function(n){return n.name()===t})}).join(" > "):o[0].name();return q(r,function(n,t){return{handler:n,purpose:nn(t)}}(t,e))})});return J(t,{})},ru=function(n,t){return ci(n)?n.style.getPropertyValue(t):""},iu=function(n){var t=ot("external.component",qn([ct("element"),ht("uid")]),n),e=Ee(zr());t.uid.each(function(n){qi(t.element,n)});var o={getSystem:e.get,config:on.none,hasConfigured:nn(!1),connect:function(n){e.set(n)},disconnect:function(){e.set(zr(function(){return o}))},getApis:function(){return{}},element:nn(t.element),spec:nn(n),readState:nn("No state"),syncComponents:Z,components:nn([]),events:nn({})};return jr(o)},uu=Pr,au=function(t){return function(n){return Nn(n,Zi)}(t).fold(function(){var n=t.hasOwnProperty("uid")?t:N({uid:uu("")},t);return Oi(n).getOrDie()},function(n){return n})},cu=jr;function su(o,r){function n(n){var t=r(n);if(t<=0||null===t){var e=mi(n,o);return parseFloat(e)||0}return t}function i(r,n){return O(n,function(n,t){var e=mi(r,t),o=e===undefined?0:parseInt(e,10);return isNaN(o)?n:n+o},0)}return{set:function(n,t){if(!mn(t)&&!t.match(/^[0-9]+$/))throw new Error(o+".set accepts only positive integer values. Value was "+t);var e=n.dom();ci(e)&&(e.style[o]=t+"px")},get:n,getOuter:n,aggregate:i,max:function(n,t,e){var o=i(n,e);return o<t?t-o:0}}}function fu(n){return Fu.get(n)}function lu(n){return Fu.getOuter(n)}function du(n,t){return n!==undefined?n:t!==undefined?t:0}function mu(n){var t=n.dom().ownerDocument,e=t.body,o=t.defaultView,r=t.documentElement;if(e===n.dom())return Ru(e.offsetLeft,e.offsetTop);var i=du(o.pageYOffset,r.scrollTop),u=du(o.pageXOffset,r.scrollLeft),a=du(r.clientTop,e.clientTop),c=du(r.clientLeft,e.clientLeft);return Vu(n).translate(u-c,i-a)}function gu(n){return Nu.get(n)}function pu(n){return Nu.getOuter(n)}function hu(n){var t=n!==undefined?n.dom():v.document,e=t.body.scrollLeft||t.documentElement.scrollLeft,o=t.body.scrollTop||t.documentElement.scrollTop;return Ru(e,o)}function vu(n,t,e,o){return{x:nn(n),y:nn(t),width:nn(e),height:nn(o),right:nn(n+e),bottom:nn(t+o)}}function bu(n){var t=n===undefined?v.window:n,e=t.document,o=hu(Be.fromDom(e)),r=t.visualViewport;if(r!==undefined)return vu(Math.max(r.pageLeft,o.left()),Math.max(r.pageTop,o.top()),r.width,r.height);var i=e.documentElement,u=i.clientWidth,a=i.clientHeight;return vu(o.left(),o.top(),u,a)}function yu(o){var n=Be.fromDom(v.document),r=hu(n);return function(n,t){var e=t.owner(n),o=Hu(t,e);return on.some(o)}(o,Pu).fold(d(mu,o),function(n){var t=Vu(o),e=k(n,function(n,t){var e=Vu(t);return{left:n.left+e.left(),top:n.top+e.top()}},{left:0,top:0});return Ru(e.left+t.left()+r.left(),e.top+t.top()+r.top())})}function xu(n,t,e,o){return{x:nn(n),y:nn(t),width:nn(e),height:nn(o),right:nn(n+e),bottom:nn(t+o)}}function wu(n){var t=mu(n),e=pu(n),o=lu(n);return xu(t.left(),t.top(),e,o)}function Su(n){var t=yu(n),e=pu(n),o=lu(n);return xu(t.left(),t.top(),e,o)}function Cu(){return bu(v.window)}function ku(n,t,e){return Qo(n,function(n){return Pt(n,t)},e)}function Ou(n,t){return function(n,t){var e=t===undefined?v.document:t.dom();return zt(e)?on.none():on.from(e.querySelector(n)).map(Be.fromDom)}(t,n)}function Tu(n,t,e){return qo(Pt,ku,n,t,e)}function Eu(){var t=Hr("aria-owns");return{id:nn(t),link:function(n){_r(n,"aria-owns",t)},unlink:function(n){Ir(n,"aria-owns")}}}function Du(t,n){return function(n){return Zo(n,function(n){if(!Ai(n))return!1;var t=Mr(n,"id");return t!==undefined&&-1<t.indexOf("aria-owns")}).bind(function(n){var t=Mr(n,"id"),e=pr(n);return Ou(e,'[aria-owns="'+t+'"]')})}(n).exists(function(n){return ju(t,n)})}function Bu(n){for(var t=[],e=function(n){t.push(n)},o=0;o<n.length;o++)n[o].each(e);return t}function Au(n,t){for(var e=0;e<n.length;e++){var o=t(n[e],e);if(o.isSome())return o}return on.none()}var _u,Mu,Fu=su("height",function(n){var t=n.dom();return $o(n)?t.getBoundingClientRect().height:t.offsetHeight}),Iu=function(e,o){return{left:nn(e),top:nn(o),translate:function(n,t){return Iu(e+n,o+t)}}},Ru=Iu,Vu=function(n){var t=n.dom(),e=t.ownerDocument.body;return e===t?Ru(e.offsetLeft,e.offsetTop):$o(n)?function(n){var t=n.getBoundingClientRect();return Ru(t.left,t.top)}(t):Ru(0,0)},Nu=su("width",function(n){return n.dom().offsetWidth}),Hu=(Ht().browser.isSafari(),function(o,n){return o.view(n).fold(nn([]),function(n){var t=o.owner(n),e=Hu(o,t);return[n].concat(e)})}),Pu=/* */Object.freeze({view:function(n){return(n.dom()===v.document?on.none():on.from(n.dom().defaultView.frameElement)).map(Be.fromDom)},owner:function(n){return pr(n)}}),zu=lr("point","width","height"),Lu=lr("x","y","width","height"),ju=function(t,n){return function(n,t,e){return Zo(n,t,e).isSome()}(n,function(n){return jt(n,t.element())},nn(!1))||Du(t,n)},Uu="unknown";(Mu=_u=_u||{})[Mu.STOP=0]="STOP",Mu[Mu.NORMAL=1]="NORMAL",Mu[Mu.LOGGING=2]="LOGGING";function Wu(t,n,e){switch(Nn(za.get(),t).orThunk(function(){var n=wn(za.get());return Au(n,function(n){return-1<t.indexOf(n)?on.some(za.get()[n]):on.none()})}).getOr(_u.NORMAL)){case _u.NORMAL:return e(ja());case _u.LOGGING:var o=function(t,e){var o=[],r=(new Date).getTime();return{logEventCut:function(n,t,e){o.push({outcome:"cut",target:t,purpose:e})},logEventStopped:function(n,t,e){o.push({outcome:"stopped",target:t,purpose:e})},logNoParent:function(n,t,e){o.push({outcome:"no-parent",target:t,purpose:e})},logEventNoHandlers:function(n,t){o.push({outcome:"no-handlers-left",target:t})},logEventResponse:function(n,t,e){o.push({outcome:"response",purpose:e,target:t})},write:function(){var n=(new Date).getTime();vn(["mousemove","mouseover","mouseout",Mo()],t)||v.console.log(t,{event:t,time:n-r,target:e.dom(),sequence:S(o,function(n){return vn(["cut","stopped","response"],n.outcome)?"{"+n.purpose+"} "+n.outcome+" at ("+Nr(n.target)+")":n.outcome})})}}}(t,n),r=e(o);return o.write(),r;case _u.STOP:return!0}}function Gu(n,t,e){return Wu(n,t,e)}function Xu(){return mt("markers",[ct("backgroundMenu")].concat(Ua()).concat(Wa()))}function Yu(n){return mt("markers",S(n,ct))}function qu(n,t,e){return function(){var n=new Error;if(n.stack===undefined)return;var t=n.stack.split("\n");T(t,function(t){return 0<t.indexOf("alloy")&&!x(La,function(n){return-1<t.indexOf(n)})}).getOr(Uu)}(),he(t,t,e,Zn(function(e){return an.value(function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return e.apply(undefined,n)})}))}function Ku(n){return qu(0,n,j(Z))}function Ju(n){return qu(0,n,j(on.none))}function $u(n){return qu(0,n,Mn())}function Qu(n){return qu(0,n,Mn())}function Zu(n,t){return At(n,nn(t))}function na(n){return At(n,l)}function ta(n){return n.x()}function ea(n,t){return n.x()+n.width()/2-t.width()/2}function oa(n,t){return n.x()+n.width()-t.width()}function ra(n,t){return n.y()-t.height()}function ia(n){return n.y()+n.height()}function ua(n,t){return n.y()+n.height()/2-t.height()/2}function aa(n,t,e){return qa(ta(n),ia(n),e.southeast(),Ja(),"layout-se")}function ca(n,t,e){return qa(oa(n,t),ia(n),e.southwest(),$a(),"layout-sw")}function sa(n,t,e){return qa(ta(n),ra(n,t),e.northeast(),Qa(),"layout-ne")}function fa(n,t,e){return qa(oa(n,t),ra(n,t),e.northwest(),Za(),"layout-nw")}function la(n,t,e){return qa(function(n){return n.x()+n.width()}(n),ua(n,t),e.east(),ec(),"layout-e")}function da(n,t,e){return qa(function(n,t){return n.x()-t.width()}(n,t),ua(n,t),e.west(),oc(),"layout-w")}function ma(){return[aa,ca,sa,fa,ic,rc]}function ga(){return[ca,aa,fa,sa,ic,rc]}function pa(e,o,r){return Ni(function(n,t){r(n,e,o)})}function ha(n,t,e,o,r,i){var u=qn(n),a=wt(t,[function(n,t){return vt(n,qn(t))}("config",n)]);return uc(u,a,t,e,o,r,i)}function va(r,i,u){return function(n,t,e){var o=e.toString(),r=o.indexOf(")")+1,i=o.indexOf("("),u=o.substring(i+1,r-1).split(/,\s*/);return n.toFunctionAnnotation=function(){return{name:t,parameters:Qi(u.slice(0,1).concat(u.slice(3)))}},n}(function(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];var o=[e].concat(n);return e.config({name:nn(r)}).fold(function(){throw new Error("We could not find any behaviour configuration for: "+r+". Using API: "+u)},function(n){var t=Array.prototype.slice.call(o,1);return i.apply(undefined,[e,n.config,n.state].concat(t))})},u,i)}function ba(n){return{key:n,value:undefined}}function ya(n){return K(n)}function xa(n){var t=ot("Creating behaviour: "+n.name,ac,n);return ha(t.fields,t.name,t.active,t.apis,t.extra,t.state)}function wa(n){var t=ot("Creating behaviour: "+n.name,cc,n);return function(n,t,e,o,r,i){var u=n,a=wt(t,[vt("config",n)]);return uc(u,a,t,e,o,r,i)}(it(t.branchKey,t.branches),t.name,t.active,t.apis,t.extra,t.state)}function Sa(n){n.dom().focus()}function Ca(n){var t=n!==undefined?n.dom():v.document;return on.from(t.activeElement).map(Be.fromDom)}function ka(t){return Ca(pr(t)).filter(function(n){return t.dom().contains(n.dom())})}function Oa(n,e){var o=pr(e),t=Ca(o).bind(function(t){function n(n){return jt(t,n)}return n(e)?on.some(e):nr(e,n)}),r=n(e);return t.each(function(t){Ca(o).filter(function(n){return jt(n,t)}).fold(function(){Sa(t)},Z)}),r}function Ta(n,t,e){function r(n){return Nn(e,n).getOr([])}function o(n,t,e){var o=_(gc,e);return{offset:function(){return Ru(n,t)},classesOn:function(){return D(e,r)},classesOff:function(){return D(o,r)}}}return{southeast:function(){return o(-n,t,["top","alignLeft"])},southwest:function(){return o(n,t,["top","alignRight"])},south:function(){return o(-n/2,t,["top","alignCentre"])},northeast:function(){return o(-n,-t,["bottom","alignLeft"])},northwest:function(){return o(n,-t,["bottom","alignRight"])},north:function(){return o(-n/2,-t,["bottom","alignCentre"])},east:function(){return o(n,-t/2,["valignCentre","left"])},west:function(){return o(-n,-t/2,["valignCentre","right"])},innerNorthwest:function(){return o(-n,t,["top","alignRight"])},innerNortheast:function(){return o(n,t,["top","alignLeft"])},innerNorth:function(){return o(-n/2,t,["top","alignCentre"])},innerSouthwest:function(){return o(-n,-t,["bottom","alignRight"])},innerSoutheast:function(){return o(n,-t,["bottom","alignLeft"])},innerSouth:function(){return o(-n/2,-t,["bottom","alignCentre"])},innerWest:function(){return o(n,-t/2,["valignCentre","right"])},innerEast:function(){return o(-n,-t/2,["valignCentre","left"])}}}function Ea(){return Ta(0,0,{})}function Da(n,t,e,o,r,i){var u=t.x()-e,a=t.y()-o,c=r-(u+t.width()),s=i-(a+t.height()),f=on.some(u),l=on.some(a),d=on.some(c),m=on.some(s),g=on.none();return function(n,t,e,o,r,i,u,a,c){return n.fold(t,e,o,r,i,u,a,c)}(t.direction(),function(){return hc(n,f,l,g,g)},function(){return hc(n,g,l,d,g)},function(){return hc(n,f,g,g,m)},function(){return hc(n,g,g,d,m)},function(){return hc(n,f,l,g,g)},function(){return hc(n,f,g,g,m)},function(){return hc(n,f,l,g,g)},function(){return hc(n,g,l,d,g)})}function Ba(n,t){var e=d(yu,t),o=n.fold(e,e,function(){var n=hu();return yu(t).translate(-n.left(),-n.top())}),r=pu(t),i=lu(t);return xu(o.left(),o.top(),r,i)}function Aa(n){return n}function _a(t,e){return function(n){return"rtl"===wc(n)?e:t}}function Ma(){return wt("layouts",[ct("onLtr"),ct("onRtl")])}function Fa(t,n,e,o){var r=n.layouts.map(function(n){return n.onLtr(t)}).getOr(e),i=n.layouts.map(function(n){return n.onRtl(t)}).getOr(o);return _a(r,i)(t)}function Ia(n,t,e){var o=n.document.createRange();return function(e,n){n.fold(function(n){e.setStartBefore(n.dom())},function(n,t){e.setStart(n.dom(),t)},function(n){e.setStartAfter(n.dom())})}(o,t),function(e,n){n.fold(function(n){e.setEndBefore(n.dom())},function(n,t){e.setEnd(n.dom(),t)},function(n){e.setEndAfter(n.dom())})}(o,e),o}function Ra(n,t,e,o,r){var i=n.document.createRange();return i.setStart(t.dom(),e),i.setEnd(o.dom(),r),i}function Va(n){return{left:nn(n.left),top:nn(n.top),right:nn(n.right),bottom:nn(n.bottom),width:nn(n.width),height:nn(n.height)}}function Na(n,t,e){return t(Be.fromDom(e.startContainer),e.startOffset,Be.fromDom(e.endContainer),e.endOffset)}function Ha(n,t){return function(n,t){var e=t.ltr();return e.collapsed?t.rtl().filter(function(n){return!1===n.collapsed}).map(function(n){return Bc.rtl(Be.fromDom(n.endContainer),n.endOffset,Be.fromDom(n.startContainer),n.startOffset)}).getOrThunk(function(){return Na(0,Bc.ltr,e)}):Na(0,Bc.ltr,e)}(0,function(r,n){return n.match({domRange:function(n){return{ltr:nn(n),rtl:on.none}},relative:function(n,t){return{ltr:L(function(){return Ia(r,n,t)}),rtl:L(function(){return on.some(Ia(r,t,n))})}},exact:function(n,t,e,o){return{ltr:L(function(){return Ra(r,n,t,e,o)}),rtl:L(function(){return on.some(Ra(r,e,o,n,t))})}}})}(n,t))}function Pa(n,t,e){return t>=n.left&&t<=n.right&&e>=n.top&&e<=n.bottom}var za=Ee({}),La=["alloy/data/Fields","alloy/debugging/Debugging"],ja=nn({logEventCut:Z,logEventStopped:Z,logNoParent:Z,logEventNoHandlers:Z,logEventResponse:Z,write:Z}),Ua=nn([ct("menu"),ct("selectedMenu")]),Wa=nn([ct("item"),ct("selectedItem")]),Ga=(nn(de(Wa().concat(Ua()))),nn(de(Wa()))),Xa=mt("initSize",[ct("numColumns"),ct("numRows")]),Ya=nn(Xa),qa=lr("x","y","bubble","direction","label"),Ka=En([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),Ja=Ka.southeast,$a=Ka.southwest,Qa=Ka.northeast,Za=Ka.northwest,nc=Ka.south,tc=Ka.north,ec=Ka.east,oc=Ka.west,rc=function(n,t,e){return qa(ea(n,t),ra(n,t),e.north(),tc(),"layout-n")},ic=function(n,t,e){return qa(ea(n,t),ia(n),e.south(),nc(),"layout-s")},uc=function(e,n,o,r,t,i,u){function a(n){return $(n,o)?n[o]():on.none()}var c=P(t,function(n,t){return va(o,n,t)}),s=P(i,function(n,t){return Lr(n,t)}),f=N(N(N({},s),c),{revoke:d(ba,o),config:function(n){var t=ot(o+"-config",e,n);return{key:o,value:{config:t,me:f,configAsRaw:L(function(){return ot(o+"-config",e,n)}),initialConfig:n,state:u}}},schema:function(){return n},exhibit:function(n,e){return a(n).bind(function(t){return Nn(r,"exhibit").map(function(n){return n(e,t.config,t.state)})}).getOr(Gr({}))},name:function(){return o},handlers:function(n){return a(n).map(function(n){return Y("events",function(n,t){return{}})(r)(n.config,n.state)}).getOr({})}});return f},ac=qn([ct("fields"),ct("name"),St("active",{}),St("apis",{}),St("state",nu),St("extra",{})]),cc=qn([ct("branchKey"),ct("branches"),ct("name"),St("active",{}),St("apis",{}),St("state",nu),St("extra",{})]),sc=nn(undefined),fc=/* */Object.freeze({events:function(t){return tr([rr(Oo(),function(r,i){var u=t.channels,n=function(n,t){return t.universal()?n:C(n,function(n){return vn(t.channels(),n)})}(wn(u),i);bn(n,function(n){var t=u[n],e=t.schema,o=ot("channel["+n+"] data\nReceiver: "+Nr(r.element()),e,i.data());t.onReceive(r,o)})})])}}),lc=[st("channels",nt(an.value,qn([$u("onReceive"),St("schema",xe())])))],dc=xa({fields:lc,name:"receiving",active:fc}),mc=/* */Object.freeze({exhibit:function(n,t){return Gr({classes:[],styles:t.useFixed()?{}:{position:"relative"}})}}),gc=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right"],pc=gr(["x","y","width","height","maxHeight","maxWidth","direction","classes","label","candidateYforTest"],[]),hc=lr("position","left","top","right","bottom"),vc=En([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]),bc=function(n,t,e){var o=Ru(t,e);return n.fold(nn(o),nn(o),function(){var n=hu();return o.translate(-n.left(),-n.top())})},yc=vc.relative,xc=vc.fixed,wc=function(n){return"rtl"===mi(n,"direction")?"rtl":"ltr"},Sc=[ct("hotspot"),ht("bubble"),St("overrides",{}),Ma(),Zu("placement",function(n,t,e){var o=t.hotspot,r=Ba(e,o.element()),i=Fa(n.element(),t,ma(),ga());return on.some(Aa({anchorBox:r,bubble:t.bubble.getOr(Ea()),overrides:t.overrides,layouts:i,placer:on.none()}))})],Cc=[ct("x"),ct("y"),St("height",0),St("width",0),St("bubble",Ea()),St("overrides",{}),Ma(),Zu("placement",function(n,t,e){var o=bc(e,t.x,t.y),r=xu(o.left(),o.top(),t.width,t.height),i=Fa(n.element(),t,[aa,ca,sa,fa,ic,rc,la,da],[ca,aa,fa,sa,ic,rc,la,da]);return on.some(Aa({anchorBox:r,bubble:t.bubble,overrides:t.overrides,layouts:i,placer:on.none()}))})],kc={create:lr("start","soffset","finish","foffset")},Oc=En([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Tc=(Oc.before,Oc.on,Oc.after,function(n){return n.fold(l,l,l)}),Ec=En([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Dc={domRange:Ec.domRange,relative:Ec.relative,exact:Ec.exact,exactFromRange:function(n){return Ec.exact(n.start(),n.soffset(),n.finish(),n.foffset())},getWin:function(n){var t=function(n){return n.match({domRange:function(n){return Be.fromDom(n.startContainer)},relative:function(n,t){return Tc(n)},exact:function(n,t,e,o){return n}})}(n);return vr(t)},range:kc.create},Bc=En([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]);function Ac(n){return uf.get(n)}function _c(n){return uf.getOption(n)}function Mc(e,o,n,t,r){function i(n){var t=e.dom().createRange();return t.setStart(o.dom(),n),t.collapse(!0),t}var u=Ac(o).length,a=function(n,t,e,o,r){if(0===r)return 0;if(t===o)return r-1;for(var i=o,u=1;u<r;u++){var a=n(u),c=Math.abs(t-a.left);if(e<=a.bottom){if(e<a.top||i<c)return u-1;i=c}}return 0}(function(n){return i(n).getBoundingClientRect()},n,t,r.right,u);return i(a)}function Fc(n){return function(n){return _c(n).filter(function(n){return 0!==n.trim().length||-1<n.indexOf("\xa0")}).isSome()}(n)||vn(cf,Ko(n))}function Ic(n){return nr(n,Fc)}function Rc(n){return sf(n,Fc)}function Vc(n,t){return t-n.left<n.right-t}function Nc(n,t,e){var o=n.dom().createRange();return o.selectNode(t.dom()),o.collapse(e),o}function Hc(t,n,e){var o=t.dom().createRange();o.selectNode(n.dom());var r=o.getBoundingClientRect(),i=Vc(r,e);return(!0===i?Ic:Rc)(n).map(function(n){return Nc(t,n,i)})}function Pc(n,t,e){var o=t.dom().getBoundingClientRect(),r=Vc(o,e);return on.some(Nc(n,t,r))}function zc(n,t,e,o){var r=n.dom().createRange();r.selectNode(t.dom());var i=r.getBoundingClientRect();return function(n,t,e,o){var r=n.dom().createRange();r.selectNode(t.dom());var i=r.getBoundingClientRect(),u=Math.max(i.left,Math.min(i.right,e)),a=Math.max(i.top,Math.min(i.bottom,o));return af(n,t,u,a)}(n,t,Math.max(i.left,Math.min(i.right,e)),Math.max(i.top,Math.min(i.bottom,o)))}function Lc(n,t){return Lt(t,n)}function jc(n,t,e,o){var r=function(n,t,e,o){var r=pr(n).dom().createRange();return r.setStart(n.dom(),t),r.setEnd(e.dom(),o),r}(n,t,e,o),i=jt(n,e)&&t===o;return r.collapsed&&!i}function Uc(n){var t=Be.fromDom(n.anchorNode),e=Be.fromDom(n.focusNode);return jc(t,n.anchorOffset,e,n.focusOffset)?on.some(kc.create(t,n.anchorOffset,e,n.focusOffset)):function(n){if(0<n.rangeCount){var t=n.getRangeAt(0),e=n.getRangeAt(n.rangeCount-1);return on.some(kc.create(Be.fromDom(t.startContainer),t.startOffset,Be.fromDom(e.endContainer),e.endOffset))}return on.none()}(n)}function Wc(n,t){return function(n){var t=n.getClientRects(),e=0<t.length?t[0]:n.getBoundingClientRect();return 0<e.width||0<e.height?on.some(e).map(Va):on.none()}(function(i,n){return Ha(i,n).match({ltr:function(n,t,e,o){var r=i.document.createRange();return r.setStart(n.dom(),t),r.setEnd(e.dom(),o),r},rtl:function(n,t,e,o){var r=i.document.createRange();return r.setStart(e.dom(),o),r.setEnd(n.dom(),t),r}})}(n,t))}function Gc(n){return n.fold(function(n){return n},function(n,t,e){return n.translate(-t,-e)})}function Xc(n){return n.fold(function(n){return n},function(n,t,e){return n})}function Yc(n){return O(n,function(n,t){return n.translate(t.left(),t.top())},Ru(0,0))}function qc(n){var t=S(n,Xc);return Yc(t)}function Kc(n,t,e){var o=pr(n.element()),r=hu(o),i=function(o,n,t){var e=vr(t.root).dom();return on.from(e.frameElement).map(Be.fromDom).filter(function(n){var t=pr(n),e=pr(o.element());return jt(t,e)}).map(mu)}(n,0,e).getOr(r);return mf(i,r.left(),r.top())}function Jc(n,t){return _i(n)?hf(n,t):function(n,t){var e=xr(n);if(0===e.length)return ff(n,t);if(t<e.length)return ff(e[t],0);var o=e[e.length-1],r=_i(o)?Ac(o).length:xr(o).length;return ff(o,r)}(n,t)}function $c(n,t){return t.getSelection.getOrThunk(function(){return function(){return function(n){return on.from(n.getSelection()).filter(function(n){return 0<n.rangeCount}).bind(Uc)}(n)}})().map(function(n){var t=Jc(n.start(),n.soffset()),e=Jc(n.finish(),n.foffset());return Dc.range(t.element(),t.offset(),e.element(),e.offset())})}function Qc(n){return n.x()+n.width()}function Zc(n,t){return n.x()-t.width()}function ns(n,t){return n.y()-t.height()+n.height()}function ts(n){return n.y()}function es(n,t,e){return qa(Qc(n),ts(n),e.southeast(),Ja(),"link-layout-se")}function os(n,t,e){return qa(Zc(n,t),ts(n),e.southwest(),$a(),"link-layout-sw")}function rs(n,t,e){return qa(Qc(n),ns(n,t),e.northeast(),Qa(),"link-layout-ne")}function is(n,t,e){return qa(Zc(n,t),ns(n,t),e.northwest(),Za(),"link-layout-nw")}function us(n,t,e,o){var r=n+t;return o<r?e:r<e?o:r}function as(n,t,e){return n<=t?t:e<=n?e:n}function cs(n,t,e,o){var r=n.x(),i=n.y(),u=n.bubble().offset().left(),a=n.bubble().offset().top(),c=o.y(),s=o.bottom(),f=o.x(),l=o.right(),d=i+a,m=function(n,t,e,o,r){var i=r.x(),u=r.y(),a=r.width(),c=r.height(),s=i<=n,f=u<=t,l=s&&f,d=n+e<=i+a&&t+o<=u+c,m=Math.abs(Math.min(e,s?i+a-n:i-(n+e))),g=Math.abs(Math.min(o,f?u+c-t:u-(t+o)));return{originInBounds:l,sizeInBounds:d,limitX:as(n,r.x(),r.right()),limitY:as(t,r.y(),r.bottom()),deltaW:m,deltaH:g}}(r+u,d,t,e,o),g=m.originInBounds,p=m.sizeInBounds,h=m.limitX,v=m.limitY,b=m.deltaW,y=m.deltaH,x=nn(v+y-c),w=nn(s-v),S=function(n,t,e,o){return n.fold(t,t,o,o,t,o,e,e)}(n.direction(),w,w,x),C=nn(h+b-f),k=nn(l-h),O=function(n,t,e,o){return n.fold(t,o,t,o,e,e,t,o)}(n.direction(),k,k,C),T=pc({x:h,y:v,width:b,height:y,maxHeight:S,maxWidth:O,direction:n.direction(),classes:{on:n.bubble().classesOn(),off:n.bubble().classesOff()},label:n.label(),candidateYforTest:d});return g&&p?Sf.fit(T):Sf.nofit(T,b,y)}function ss(n,t,e,o){hi(t,"max-height"),hi(t,"max-width");var r=function(n){return{width:nn(pu(n)),height:nn(lu(n))}}(t);return function(n,e,u,a,c){function o(n,o,r,i){var t=n(e,u,a);return cs(t,s,f,c).fold(Sf.fit,function(n,t,e){return i<e||r<t?Sf.nofit(n,t,e):Sf.nofit(o,r,i)})}var s=u.width(),f=u.height();return O(n,function(n,t){var e=d(o,t);return n.fold(Sf.fit,e)},Sf.nofit(pc({x:e.x(),y:e.y(),width:u.width(),height:u.height(),maxHeight:u.height(),maxWidth:u.width(),direction:Ja(),classes:{on:[],off:[]},label:"none",candidateYforTest:e.y()}),-1,-1)).fold(l,l)}(o.preference(),n,r,e,o.bounds())}function fs(n,t,e){function o(n){return n+"px"}var r=function(n,r){return n.fold(function(){return hc("absolute",on.some(r.x()),on.some(r.y()),on.none(),on.none())},function(n,t,e,o){return Da("absolute",r,n,t,e,o)},function(n,t,e,o){return Da("fixed",r,n,t,e,o)})}(e.origin(),t);!function(n,t){var e=n.dom();Cn(t,function(n,t){n.fold(function(){fi(e,t)},function(n){si(e,t,n)})})}(n,{position:on.some(r.position()),left:r.left().map(o),top:r.top().map(o),right:r.right().map(o),bottom:r.bottom().map(o)})}function ls(n,t){!function(n,t){var e=Fu.max(n,t,["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"]);li(n,"max-height",e+"px")}(n,Math.floor(t))}function ds(n,t,e){return n[t]===undefined?e:n[t]}function ms(n,t,e,o,r,i){var u=ds(i,"maxHeightFunction",Cf()),a=ds(i,"maxWidthFunction",Z),c=n.anchorBox(),s=n.origin(),f=Of({bounds:function(o,n){return n.fold(function(){return o.fold(Cu,Cu,xu)},function(e){return o.fold(e,e,function(){var n=e(),t=bc(o,n.x(),n.y());return xu(t.left(),t.top(),n.width(),n.height())})})}(s,r),origin:s,preference:o,maxHeightFunction:u,maxWidthFunction:a});Tf(c,t,e,f)}function gs(n,t,e,o,r){var i=function(n,t){return wf(n,t)}(e.anchorBox,t);ms(i,r.element(),e.bubble,e.layouts,o,e.overrides)}function ps(n,t){Pi(n.element(),t.element())}function hs(t,n){var e=t.components();!function(n){bn(n.components(),function(n){return zi(n.element())}),Tr(n.element()),n.syncComponents()}(t);var o=_(e,n);bn(o,function(n){Mf(n),t.getSystem().removeFromWorld(n)}),bn(n,function(n){n.getSystem().isConnected()?ps(t,n):(t.getSystem().addToWorld(n),ps(t,n),$o(t.element())&&Ff(n)),t.syncComponents()})}function vs(n,t){If(n,t,Pi)}function bs(n){Mf(n),zi(n.element()),n.getSystem().removeFromWorld(n)}function ys(t){var n=br(t.element()).bind(function(n){return t.getSystem().getByDom(n).toOption()});bs(t),n.each(function(n){n.syncComponents()})}function xs(n){var t=n.components();bn(t,bs),Tr(n.element()),n.syncComponents()}function ws(n,t){Rf(n,t,Pi)}function Ss(t){var n=xr(t.element());bn(n,function(n){t.getByDom(n).each(Mf)}),zi(t.element())}function Cs(t,n,e,o){e.get().each(function(n){xs(t)});var r=n.getAttachPoint(t);vs(r,t);var i=t.getSystem().build(o);return vs(t,i),e.set(i),i}function ks(n,t,e,o){var r=Cs(n,t,e,o);return t.onOpen(n,r),r}function Os(t,e,o){o.get().each(function(n){xs(t),ys(t),e.onClose(t,n),o.clear()})}function Ts(n,t,e){return e.isOpen()}function Es(n){var t,e=ot("Dismissal",Gf,n);return(t={})[jf()]={schema:qn([ct("target")]),onReceive:function(t,n){Lf.isOpen(t)&&(Lf.isPartOf(t,n.target)||e.isExtraPart(t,n.target)||e.fireEventInstead.fold(function(){return Lf.close(t)},function(n){return Yt(t,n.event)}))}},t}function Ds(n){var t,e=ot("Reposition",Xf,n);return(t={})[Uf()]={onReceive:function(t){Lf.isOpen(t)&&e.fireEventInstead.fold(function(){return e.doReposition(t)},function(n){return Yt(t,n.event)})}},t}function Bs(n,t,e){t.store.manager.onLoad(n,t,e)}function As(n,t,e){t.store.manager.onUnload(n,t,e)}function _s(){var n=Ee(null);return tu({set:n.set,get:n.get,isNotSet:function(){return null===n.get()},clear:function(){n.set(null)},readState:function(){return{mode:"memory",value:n.get()}}})}function Ms(){var i=Ee({}),u=Ee({});return tu({readState:function(){return{mode:"dataset",dataByValue:i.get(),dataByText:u.get()}},lookup:function(n){return Nn(i.get(),n).orThunk(function(){return Nn(u.get(),n)})},update:function(n){var t=i.get(),e=u.get(),o={},r={};bn(n,function(t){o[t.value]=t,Nn(t,"meta").each(function(n){Nn(n,"text").each(function(n){r[n]=t})})}),i.set(N(N({},t),o)),u.set(N(N({},e),r))},clear:function(){i.set({}),u.set({})}})}function Fs(n,t,e,o){var r=t.store;e.update([o]),r.setValue(n,o),t.onSetValue(n,o)}function Is(t,n){return Bt(t,{},S(n,function(n){return function(t,e){return he(t,t,Fn(),Yn(function(n){return ee("The field: "+t+" is forbidden. "+e)}))}(n.name(),"Cannot configure "+n.name()+" for "+t)}).concat([At("dump",l)]))}function Rs(n){return n.dump}function Vs(n,t){return N(N({},n.dump),ya(t))}function Ns(n,t,e,o){return e.uiType===ol?function(n,t,e,o){return n.exists(function(n){return n!==e.owner})?rl.single(!0,nn(e)):Nn(o,e.name).fold(function(){throw new Error("Unknown placeholder component: "+e.name+"\nKnown: ["+wn(o)+"]\nNamespace: "+n.getOr("none")+"\nSpec: "+JSON.stringify(e,null,2))},function(n){return n.replace()})}(n,0,e,o):rl.single(!1,nn(e))}function Hs(t,e,n,o){var r=P(o,function(n,t){return function(n,t){var e=!1;return{name:nn(n),required:function(){return t.fold(function(n,t){return n},function(n,t){return n})},used:function(){return e},replace:function(){if(!0===e)throw new Error("Trying to use the same placeholder more than once: "+n);return e=!0,t}}}(t,n)}),i=function(t,e,n,o){return D(n,function(n){return il(t,e,n,o)})}(t,e,n,r);return Cn(r,function(n){if(!1===n.used()&&n.required())throw new Error("Placeholder: "+n.name()+" was not found in components list\nNamespace: "+t.getOr("none")+"\nComponents: "+JSON.stringify(e.components,null,2))}),i}function Ps(n){return n.fold(on.some,on.none,on.some,on.some)}function zs(n){function t(n){return n.name}return n.fold(t,t,t,t)}function Ls(e,o){return function(n){var t=ot("Converting part type",o,n);return e(t)}}function js(n,t,e,o){return Bn(t.defaults(n,e,o),e,{uid:n.partUids[t.name]},t.overrides(n,e,o))}function Us(r,n){var t={};return bn(n,function(n){Ps(n).each(function(e){var o=El(r,e.pname);t[e.name]=function(n){var t=ot("Part: "+e.name+" in "+r,de(e.schema),n);return N(N({},o),{config:n,validated:t})}})}),t}function Ws(n,t,e){return{uiType:cl(),owner:n,name:t,config:e,validated:{}}}function Gs(n){return D(n,function(n){return n.fold(on.none,on.some,on.none,on.none).map(function(n){return mt(n.name,n.schema.concat([na(Ol())]))}).toArray()})}function Xs(n){return S(n,zs)}function Ys(n,t,e){return function(n,e,t){var i={},o={};return bn(t,function(n){n.fold(function(o){i[o.pname]=ul(!0,function(n,t,e){return o.factory.sketch(js(n,o,t,e))})},function(n){var t=e.parts[n.name];o[n.name]=nn(n.factory.sketch(js(e,n,t[Ol()]),t))},function(o){i[o.pname]=ul(!1,function(n,t,e){return o.factory.sketch(js(n,o,t,e))})},function(r){i[r.pname]=al(!0,function(t,n,e){var o=t[r.name];return S(o,function(n){return r.factory.sketch(Bn(r.defaults(t,n,e),n,r.overrides(t,n)))})})})}),{internals:nn(i),externals:nn(o)}}(0,t,e)}function qs(n,t,e){return Hs(on.some(n),t,t.components,e)}function Ks(n,t,e){var o=t.partUids[e];return n.getSystem().getByUid(o).toOption()}function Js(n,t,e){return Ks(n,t,e).getOrDie("Could not find part: "+e)}function $s(n,t,e){var o={},r=t.partUids,i=n.getSystem();return bn(e,function(n){o[n]=nn(i.getByUid(r[n]))}),o}function Qs(n,t){var e=n.getSystem();return P(t.partUids,function(n,t){return nn(e.getByUid(n))})}function Zs(n){return wn(n.partUids)}function nf(n,t,e){var o={},r=t.partUids,i=n.getSystem();return bn(e,function(n){o[n]=nn(i.getByUid(r[n]).getOrDie())}),o}function tf(t,n){var e=Xs(n);return K(S(e,function(n){return{key:n,value:t+"-"+n}}))}function ef(t){return he("partUids","partUids",Rn(function(n){return tf(n.uid,t)}),xe())}function of(n,t,e,o,r){var i=function(n,t){return(0<n.length?[mt("parts",n)]:[]).concat([ct("uid"),St("dom",{}),St("components",[]),na("originalSpec"),St("debug.sketcher",{})]).concat(t)}(o,r);return ot(n+" [SpecSchema]",qn(i.concat(t)),e)}function rf(n,t,e,o,r){var i=Bl(r),u=Gs(e),a=ef(e),c=of(n,t,i,u,[a]),s=Ys(0,c,e);return o(c,qs(n,c,s.internals()),i,s.externals())}var uf=function iI(e,o){var t=function(n){return e(n)?on.from(n.dom().nodeValue):on.none()};return{get:function(n){if(!e(n))throw new Error("Can only get "+o+" value of a "+o+" node");return t(n).getOr("")},getOption:t,set:function(n,t){if(!e(n))throw new Error("Can only set raw "+o+" value of a "+o+" node");n.dom().nodeValue=t}}}(_i,"text"),af=function(n,t,e,o){return _i(t)?function(t,e,o,r){var n=t.dom().createRange();n.selectNode(e.dom());var i=n.getClientRects();return Au(i,function(n){return Pa(n,o,r)?on.some(n):on.none()}).map(function(n){return Mc(t,e,o,r,n)})}(n,t,e,o):function(t,n,e,o){var r=t.dom().createRange(),i=xr(n);return Au(i,function(n){return r.selectNode(n.dom()),Pa(r.getBoundingClientRect(),e,o)?af(t,n,e,o):on.none()})}(n,t,e,o)},cf=["img","br"],sf=function(n,i){var u=function(n){for(var t=xr(n),e=t.length-1;0<=e;e--){var o=t[e];if(i(o))return on.some(o);var r=u(o);if(r.isSome())return r}return on.none()};return u(n)},ff=(document.caretPositionFromPoint||document.caretRangeFromPoint,lr("element","offset")),lf=En([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),df=lf.screen,mf=lf.absolute,gf=function(n,t,e,o){var r=n,i=t,u=e,a=o;n<0&&(r=0,u=e+n),t<0&&(i=0,a=o+t);var c=df(Ru(r,i));return on.some(zu(c,u,a))},pf=function(n,i,u,a,c){return n.map(function(n){var t=[i,n.point()],e=function(n,t,e,o){return n.fold(t,e,o)}(a,function(){return qc(t)},function(){return qc(t)},function(){return function(n){var t=S(n,Gc);return Yc(t)}(t)}),o=Lu(e.left(),e.top(),n.width(),n.height()),r=Fa(c,u,u.showAbove?[sa,fa,aa,ca,rc,ic]:[aa,ca,sa,fa,ic,ic],u.showAbove?[fa,sa,ca,aa,rc,ic]:[ca,aa,fa,sa,ic,rc]);return Aa({anchorBox:o,bubble:u.bubble.getOr(Ea()),overrides:u.overrides,layouts:r,placer:on.none()})})},hf=lr("element","offset"),vf=[ht("getSelection"),ct("root"),ht("bubble"),Ma(),St("overrides",{}),St("showAbove",!1),Zu("placement",function(n,t,e){var o=vr(t.root).dom(),r=Kc(n,0,t),i=$c(o,t).bind(function(n){return Wc(o,Dc.exactFromRange(n)).orThunk(function(){var t=Be.fromText("\ufeff");return Sr(n.start(),t),Wc(o,Dc.exact(t,0,t,1)).map(function(n){return zi(t),n})}).bind(function(n){return gf(n.left(),n.top(),n.width(),n.height())})}),u=$c(o,t).bind(function(n){return Ai(n.start())?on.some(n.start()):br(n.start())}).getOr(n.element());return pf(i,r,t,e,u)})],bf=[ct("node"),ct("root"),ht("bubble"),Ma(),St("overrides",{}),St("showAbove",!1),Zu("placement",function(r,i,u){var a=Kc(r,0,i);return i.node.bind(function(n){var t=n.dom().getBoundingClientRect(),e=gf(t.left,t.top,t.width,t.height),o=i.node.getOr(r.element());return pf(e,a,i,u,o)})})],yf=[ct("item"),Ma(),St("overrides",{}),Zu("placement",function(n,t,e){var o=Ba(e,t.item.element()),r=Fa(n.element(),t,[es,os,rs,is],[os,es,is,rs]);return on.some(Aa({anchorBox:o,bubble:Ea(),overrides:t.overrides,layouts:r,placer:on.none()}))})],xf=it("anchor",{selection:vf,node:bf,hotspot:Sc,submenu:yf,makeshift:Cc}),wf=lr("anchorBox","origin"),Sf=En([{fit:["reposition"]},{nofit:["reposition","deltaW","deltaH"]}]),Cf=nn(function(n,t){ls(n,t),di(n,{"overflow-x":"hidden","overflow-y":"auto"})}),kf=nn(function(n,t){ls(n,t)}),Of=gr(["bounds","origin","preference","maxHeightFunction","maxWidthFunction"],[]),Tf=function(n,t,e,o){var r=ss(n,t,e,o);fs(t,r,o),function(n,t){var e=t.classes();ai(n,e.off),ui(n,e.on)}(t,r),function(n,t,e){e.maxHeightFunction()(n,t.maxHeight())}(t,r,o),function(n,t,e){e.maxWidthFunction()(n,t.maxWidth())}(t,r,o)},Ef=function(n,t,e,o,r,i){var u=i.map(wu);return Df(n,t,e,o,r,u)},Df=function(r,i,n,t,u,a){var c=ot("positioning anchor.info",xf,t);Oa(function(){li(u.element(),"position","fixed");var n=gi(u.element(),"visibility");li(u.element(),"visibility","hidden");var t=i.useFixed()?function(){var n=v.document.documentElement;return xc(0,0,n.clientWidth,n.clientHeight)}():function(n){var t=mu(n.element()),e=n.element().dom().getBoundingClientRect();return yc(t.left(),t.top(),e.width,e.height)}(r),e=c.placement,o=a.map(nn).or(i.getBounds);e(r,c,t).each(function(n){n.placer.getOr(gs)(r,t,n,o,u)}),n.fold(function(){hi(u.element(),"visibility")},function(n){li(u.element(),"visibility",n)}),gi(u.element(),"left").isNone()&&gi(u.element(),"top").isNone()&&gi(u.element(),"right").isNone()&&gi(u.element(),"bottom").isNone()&&gi(u.element(),"position").is("fixed")&&hi(u.element(),"position")},u.element())},Bf=/* */Object.freeze({position:function(n,t,e,o,r){Ef(n,t,e,o,r,on.none())},positionWithin:Ef,positionWithinBounds:Df,getMode:function(n,t,e){return t.useFixed()?"fixed":"absolute"}}),Af=[St("useFixed",u),ht("getBounds")],_f=xa({fields:Af,name:"positioning",active:mc,apis:Bf}),Mf=function(n){Yt(n,Ho());var t=n.components();bn(t,Mf)},Ff=function(n){var t=n.components();bn(t,Ff),Yt(n,No())},If=function(n,t,e){n.getSystem().addToWorld(t),e(n.element(),t.element()),$o(n.element())&&Ff(t),n.syncComponents()},Rf=function(n,t,e){e(n,t.element());var o=xr(t.element());bn(o,function(n){t.getByDom(n).each(Ff)})},Vf=function(n,t,e){var o=t.getAttachPoint(n);li(n.element(),"position",_f.getMode(o)),function(t,n,e,o){gi(t.element(),n).fold(function(){Ir(t.element(),e)},function(n){_r(t.element(),e,n)}),li(t.element(),n,o)}(n,"visibility",t.cloakVisibilityAttr,"hidden")},Nf=function(n,t,e){!function(t){return x(["top","left","right","bottom"],function(n){return gi(t,n).isSome()})}(n.element())&&hi(n.element(),"position"),function(n,t,e){if(Fr(n.element(),e)){var o=Mr(n.element(),e);li(n.element(),t,o)}else hi(n.element(),t)}(n,"visibility",t.cloakVisibilityAttr)},Hf=/* */Object.freeze({cloak:Vf,decloak:Nf,open:ks,openWhileCloaked:function(n,t,e,o,r){Vf(n,t),ks(n,t,e,o),r(),Nf(n,t)},close:Os,isOpen:Ts,isPartOf:function(t,e,n,o){return Ts(0,0,n)&&n.get().exists(function(n){return e.isPartOf(t,n,o)})},getState:function(n,t,e){return e.get()},setContent:function(n,t,e,o){return e.get().map(function(){return Cs(n,t,e,o)})}}),Pf=/* */Object.freeze({events:function(e,o){return tr([rr(Ao(),function(n,t){Os(n,e,o)})])}}),zf=[Ku("onOpen"),Ku("onClose"),ct("isPartOf"),ct("getAttachPoint"),St("cloakVisibilityAttr","data-precloak-visibility")],Lf=xa({fields:zf,name:"sandboxing",active:Pf,apis:Hf,state:/* */Object.freeze({init:function(){var t=Ee(on.none()),n=nn("not-implemented");return tu({readState:n,isOpen:function(){return t.get().isSome()},clear:function(){t.set(on.none())},set:function(n){t.set(on.some(n))},get:function(n){return t.get()}})}})}),jf=nn("dismiss.popups"),Uf=nn("reposition.popups"),Wf=nn("mouse.released"),Gf=qn([St("isExtraPart",nn(!1)),wt("fireEventInstead",[St("event",Po())])]),Xf=qn([St("isExtraPart",nn(!1)),wt("fireEventInstead",[St("event",zo())]),dt("doReposition")]),Yf=/* */Object.freeze({onLoad:Bs,onUnload:As,setValue:function(n,t,e,o){t.store.manager.setValue(n,t,e,o)},getValue:function(n,t,e){return t.store.manager.getValue(n,t,e)},getState:function(n,t,e){return e}}),qf=/* */Object.freeze({events:function(e,o){var n=e.resetOnDom?[Ri(function(n,t){Bs(n,e,o)}),Vi(function(n,t){As(n,e,o)})]:[pa(e,o,Bs)];return tr(n)}}),Kf=/* */Object.freeze({memory:_s,dataset:Ms,manual:function(){return tu({readState:function(){}})},init:function(n){return n.store.manager.state(n)}}),Jf=[ht("initialValue"),ct("getFallbackEntry"),ct("getDataKey"),ct("setValue"),Zu("manager",{setValue:Fs,getValue:function(n,t,e){var o=t.store,r=o.getDataKey(n);return e.lookup(r).fold(function(){return o.getFallbackEntry(r)},function(n){return n})},onLoad:function(t,e,o){e.store.initialValue.each(function(n){Fs(t,e,o,n)})},onUnload:function(n,t,e){e.clear()},state:Ms})],$f=[ct("getValue"),St("setValue",Z),ht("initialValue"),Zu("manager",{setValue:function(n,t,e,o){t.store.setValue(n,o),t.onSetValue(n,o)},getValue:function(n,t,e){return t.store.getValue(n)},onLoad:function(t,e,n){e.store.initialValue.each(function(n){e.store.setValue(t,n)})},onUnload:Z,state:nu.init})],Qf=[ht("initialValue"),Zu("manager",{setValue:function(n,t,e,o){e.set(o),t.onSetValue(n,o)},getValue:function(n,t,e){return e.get()},onLoad:function(n,t,e){t.store.initialValue.each(function(n){e.isNotSet()&&e.set(n)})},onUnload:function(n,t,e){e.clear()},state:_s})],Zf=[Ct("store",{mode:"memory"},it("mode",{memory:Qf,manual:$f,dataset:Jf})),Ku("onSetValue"),St("resetOnDom",!1)],nl=xa({fields:Zf,name:"representing",active:qf,apis:Yf,extra:{setValueFrom:function(n,t){var e=nl.getValue(t);nl.setValue(n,e)}},state:Kf}),tl=Is,el=Vs,ol="placeholder",rl=En([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]),il=function(i,u,a,c){return Ns(i,0,a,c).fold(function(n,t){var e=t(u,a.config,a.validated),o=Nn(e,"components").getOr([]),r=D(o,function(n){return il(i,u,n,c)});return[N(N({},e),{components:r})]},function(n,t){var e=t(u,a.config,a.validated);return a.validated.preprocess.getOr(l)(e)})},ul=rl.single,al=rl.multiple,cl=nn(ol),sl=En([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),fl=St("factory",{sketch:l}),ll=St("schema",[]),dl=ct("name"),ml=he("pname","pname",In(function(n){return"<alloy."+Hr(n.name)+">"}),xe()),gl=At("schema",function(){return[ht("preprocess")]}),pl=St("defaults",nn({})),hl=St("overrides",nn({})),vl=de([fl,ll,dl,ml,pl,hl]),bl=de([fl,ll,dl,pl,hl]),yl=de([fl,ll,dl,ml,pl,hl]),xl=de([fl,gl,dl,ct("unit"),ml,pl,hl]),wl=Ls(sl.required,vl),Sl=Ls(sl.external,bl),Cl=Ls(sl.optional,yl),kl=Ls(sl.group,xl),Ol=nn("entirety"),Tl=/* */Object.freeze({required:wl,external:Sl,optional:Cl,group:kl,asNamedPart:Ps,name:zs,asCommon:function(n){return n.fold(l,l,l,l)},original:Ol}),El=function(n,t){return{uiType:cl(),owner:n,name:t}},Dl=/* */Object.freeze({generate:Us,generateOne:Ws,schemas:Gs,names:Xs,substitutes:Ys,components:qs,defaultUids:tf,defaultUidsSchema:ef,getAllParts:Qs,getAllPartNames:Zs,getPart:Ks,getPartOrDie:Js,getParts:$s,getPartsOrDie:nf}),Bl=function(n){return n.hasOwnProperty("uid")?n:N(N({},n),{uid:Pr("uid")})};function Al(n){var t=ot("Sketcher for "+n.name,Jl,n),e=P(t.apis,Ur),o=P(t.extraApis,function(n,t){return Lr(n,t)});return N(N({name:nn(t.name),partFields:nn([]),configFields:nn(t.configFields),sketch:function(n){return function(n,t,e,o){var r=Bl(o);return e(of(n,t,r,[],[]),r)}(t.name,t.configFields,t.factory,n)}},e),o)}function _l(n){var t=ot("Sketcher for "+n.name,$l,n),e=Us(t.name,t.partFields),o=P(t.apis,Ur),r=P(t.extraApis,function(n,t){return Lr(n,t)});return N(N({name:nn(t.name),partFields:nn(t.partFields),configFields:nn(t.configFields),sketch:function(n){return rf(t.name,t.configFields,t.partFields,t.factory,n)},parts:nn(e)},o),r)}function Ml(n){return"input"===Ko(n)&&"radio"!==Mr(n,"type")||"textarea"===Ko(n)}function Fl(e,o,n,r){var t=Lc(e.element(),"."+o.highlightClass);bn(t,function(t){x(r,function(n){return n.element()===t})||(ri(t,o.highlightClass),e.getSystem().getByDom(t).each(function(n){o.onDehighlight(e,n),Yt(n,Xo())}))})}function Il(n,t,e,o){Fl(n,t,0,[o]),td(n,t,e,o)||(ei(o.element(),t.highlightClass),t.onHighlight(n,o),Yt(o,Go()))}function Rl(e,t,n,o){var r=Lc(e.element(),"."+t.itemClass);return E(r,function(n){return ii(n,t.highlightClass)}).bind(function(n){var t=us(n,o,0,r.length-1);return e.getSystem().getByDom(r[t]).toOption()})}function Vl(n,t,e){var o=A(n.slice(0,t)),r=A(n.slice(t+1));return T(o.concat(r),e)}function Nl(n,t,e){var o=A(n.slice(0,t));return T(o,e)}function Hl(n,t,e){var o=n.slice(0,t),r=n.slice(t+1);return T(r.concat(o),e)}function Pl(n,t,e){var o=n.slice(t+1);return T(o,e)}function zl(e){return function(n){var t=n.raw();return vn(e,t.which)}}function Ll(n){return function(t){return B(n,function(n){return n(t)})}}function jl(n){return!0===n.raw().shiftKey}function Ul(n){return!0===n.raw().ctrlKey}function Wl(n,t){return{matches:n,classification:t}}function Gl(n,t,e){t.exists(function(t){return e.exists(function(n){return jt(n,t)})})||qt(n,Lo(),{prevFocus:t,newFocus:e})}function Xl(){function r(n){return ka(n.element())}return{get:r,set:function(n,t){var e=r(n);n.getSystem().triggerFocus(t,n.element());var o=r(n);Gl(n,e,o)}}}function Yl(){function r(n){return cd.getHighlighted(n).map(function(n){return n.element()})}return{get:r,set:function(t,n){var e=r(t);t.getSystem().getByDom(n).fold(Z,function(n){cd.highlight(t,n)});var o=r(t);Gl(t,e,o)}}}var ql,Kl,Jl=qn([ct("name"),ct("factory"),ct("configFields"),St("apis",{}),St("extraApis",{})]),$l=qn([ct("name"),ct("factory"),ct("configFields"),ct("partFields"),St("apis",{}),St("extraApis",{})]),Ql=/* */Object.freeze({getCurrent:function(n,t,e){return t.find(n)}}),Zl=[ct("find")],nd=xa({fields:Zl,name:"composing",apis:Ql}),td=function(n,t,e,o){return ii(o.element(),t.highlightClass)},ed=function(n,t,e,o){var r=Lc(n.element(),"."+t.itemClass);return on.from(r[o]).fold(function(){return an.error("No element found with index "+o)},n.getSystem().getByDom)},od=function(t,n,e){return Ou(t.element(),"."+n.itemClass).bind(function(n){return t.getSystem().getByDom(n).toOption()})},rd=function(t,n,e){var o=Lc(t.element(),"."+n.itemClass);return(0<o.length?on.some(o[o.length-1]):on.none()).bind(function(n){return t.getSystem().getByDom(n).toOption()})},id=function(t,n,e){var o=Lc(t.element(),"."+n.itemClass);return Bu(S(o,function(n){return t.getSystem().getByDom(n).toOption()}))},ud=/* */Object.freeze({dehighlightAll:function(n,t,e){return Fl(n,t,0,[])},dehighlight:function(n,t,e,o){td(n,t,e,o)&&(ri(o.element(),t.highlightClass),t.onDehighlight(n,o),Yt(o,Xo()))},highlight:Il,highlightFirst:function(t,e,o){od(t,e).each(function(n){Il(t,e,o,n)})},highlightLast:function(t,e,o){rd(t,e).each(function(n){Il(t,e,o,n)})},highlightAt:function(t,e,o,n){ed(t,e,o,n).fold(function(n){throw new Error(n)},function(n){Il(t,e,o,n)})},highlightBy:function(t,e,o,n){var r=id(t,e);T(r,n).each(function(n){Il(t,e,o,n)})},isHighlighted:td,getHighlighted:function(t,n,e){return Ou(t.element(),"."+n.highlightClass).bind(function(n){return t.getSystem().getByDom(n).toOption()})},getFirst:od,getLast:rd,getPrevious:function(n,t,e){return Rl(n,t,0,-1)},getNext:function(n,t,e){return Rl(n,t,0,1)},getCandidates:id}),ad=[ct("highlightClass"),ct("itemClass"),Ku("onHighlight"),Ku("onDehighlight")],cd=xa({fields:ad,name:"highlighting",apis:ud}),sd=b(jl);(Kl=ql=ql||{}).OnFocusMode="onFocus",Kl.OnEnterOrSpaceMode="onEnterOrSpace",Kl.OnApiMode="onApi";function fd(n,t,e,i,u){function a(t,e,n,o,r){return function(n,t){return T(n,function(n){return n.matches(t)}).map(function(n){return n.classification})}(n(t,e,o,r),e.event()).bind(function(n){return n(t,e,o,r)})}var o={schema:function(){return n.concat([St("focusManager",Xl()),Ct("focusInside","onFocus",Zn(function(n){return vn(["onFocus","onEnterOrSpace","onApi"],n)?an.value(n):an.error("Invalid value for focusInside")})),Zu("handler",o),Zu("state",t),Zu("sendFocusIn",u)])},processKey:a,toEvents:function(o,r){var n=o.focusInside!==ql.OnFocusMode?on.none():u(o).map(function(e){return rr(So(),function(n,t){e(n,o,r),t.stop()})});return tr(n.toArray().concat([rr(go(),function(n,t){a(n,t,e,o,r).fold(function(){!function(t,e){var n=zl([32].concat([13]))(e.event());o.focusInside===ql.OnEnterOrSpaceMode&&n&&Ut(t,e)&&u(o).each(function(n){n(t,o,r),e.stop()})}(n,t)},function(n){t.stop()})}),rr(po(),function(n,t){a(n,t,i,o,r).each(function(n){t.stop()})})]))}};return o}function ld(n){function i(n,t){var e=n.visibilitySelector.bind(function(n){return Tu(t,n)}).getOr(t);return 0<fu(e)}function t(t,e){(function(n,t){var e=Lc(n.element(),t.selector),o=C(e,function(n){return i(t,n)});return on.from(o[t.firstTabstop])})(t,e).each(function(n){e.focusManager.set(t,n)})}function u(t,n,e,o,r){return r(n,e,function(n){return function(n,t){return i(n,t)&&n.useTabstopAt(t)}(o,n)}).fold(function(){return o.cyclic?on.some(!0):on.none()},function(n){return o.focusManager.set(t,n),on.some(!0)})}function a(t,n,e,o){var r=Lc(t.element(),e.selector);return function(n,t){return t.focusManager.get(n).bind(function(n){return Tu(n,t.selector)})}(t,e).bind(function(n){return E(r,d(jt,n)).bind(function(n){return u(t,r,n,e,o)})})}var e=[ht("onEscape"),ht("onEnter"),St("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),St("firstTabstop",0),St("useTabstopAt",nn(!0)),ht("visibilitySelector")].concat([n]),o=nn([Wl(Ll([jl,zl([9])]),function(n,t,e,o){var r=e.cyclic?Vl:Nl;return a(n,0,e,r)}),Wl(zl([9]),function(n,t,e,o){var r=e.cyclic?Hl:Pl;return a(n,0,e,r)}),Wl(zl([27]),function(t,e,n,o){return n.onEscape.bind(function(n){return n(t,e)})}),Wl(Ll([sd,zl([13])]),function(t,e,n,o){return n.onEnter.bind(function(n){return n(t,e)})})]),r=nn([]);return fd(e,nu.init,o,r,function(){return on.some(t)})}function dd(n,t,e){return Ml(e)&&zl([32])(t.event())?on.none():function(n,t,e){return Jt(n,e,To()),on.some(!0)}(n,0,e)}function md(n,t){return on.some(!0)}function gd(n,t,e){return e.execute(n,t,n.element())}function pd(n){var e=Ee(on.none());return tu({readState:function(){return e.get().map(function(n){return{numRows:n.numRows(),numColumns:n.numColumns()}}).getOr({numRows:"?",numColumns:"?"})},setGridSize:function(n,t){e.set(on.some({numRows:nn(n),numColumns:nn(t)}))},getNumRows:function(){return e.get().map(function(n){return n.numRows()})},getNumColumns:function(){return e.get().map(function(n){return n.numColumns()})}})}function hd(i){return function(n,t,e,o){var r=i(n.element());return Em(r,n,t,e,o)}}function vd(n,t){var e=_a(n,t);return hd(e)}function bd(n,t){var e=_a(t,n);return hd(e)}function yd(r){return function(n,t,e,o){return Em(r,n,t,e,o)}}function xd(n){return!function(n){return n.offsetWidth<=0&&n.offsetHeight<=0}(n.dom())}function wd(n,t,e){var o=d(jt,t),r=Lc(n,e);return function(t,n){return E(t,n).map(function(n){return _m({index:n,candidates:t})})}(C(r,xd),o)}function Sd(n,t){return E(n,function(n){return jt(t,n)})}function Cd(e,n,o,t){return t(Math.floor(n/o),n%o).bind(function(n){var t=n.row()*o+n.column();return 0<=t&&t<e.length?on.some(e[t]):on.none()})}function kd(r,n,i,u,a){return Cd(r,n,u,function(n,t){var e=n===i-1?r.length-n*u:u,o=us(t,a,0,e-1);return on.some({row:nn(n),column:nn(o)})})}function Od(i,n,u,a,c){return Cd(i,n,a,function(n,t){var e=us(n,c,0,u-1),o=e===u-1?i.length-e*a:a,r=as(t,0,o-1);return on.some({row:nn(e),column:nn(r)})})}function Td(t,e,n){Ou(t.element(),e.selector).each(function(n){e.focusManager.set(t,n)})}function Ed(r){return function(n,t,e,o){return wd(n,t,e.selector).bind(function(n){return r(n.candidates(),n.index(),o.getNumRows().getOr(e.initSize.numRows),o.getNumColumns().getOr(e.initSize.numColumns))})}}function Dd(n,t,e,o){return e.captureTab?on.some(!0):on.none()}function Bd(n,t,e,r){var i=function(n,t,e){var o=us(t,r,0,e.length-1);return o===n?on.none():function(n){return"button"===Ko(n)&&"disabled"===Mr(n,"disabled")}(e[o])?i(n,o,e):on.from(e[o])};return wd(n,e,t).bind(function(n){var t=n.index(),e=n.candidates();return i(t,t,e)})}function Ad(t,e,o){return function(n,t){return t.focusManager.get(n).bind(function(n){return Tu(n,t.selector)})}(t,o).bind(function(n){return o.execute(t,e,n)})}function _d(t,e){e.getInitial(t).orThunk(function(){return Ou(t.element(),e.selector)}).each(function(n){e.focusManager.set(t,n)})}function Md(n,t,e){return Bd(n,e.selector,t,-1)}function Fd(n,t,e){return Bd(n,e.selector,t,1)}function Id(o){return function(n,t,e){return o(n,t,e).bind(function(){return e.executeOnMove?Ad(n,t,e):on.some(!0)})}}function Rd(n,t,e,o){return e.onEscape(n,t)}function Vd(n,t,e){return on.from(n[t]).bind(function(n){return on.from(n[e]).map(function(n){return Um({rowIndex:t,columnIndex:e,cell:n})})})}function Nd(n,t,e,o){var r=n[t].length,i=us(e,o,0,r-1);return Vd(n,t,i)}function Hd(n,t,e,o){var r=us(e,o,0,n.length-1),i=n[r].length,u=as(t,0,i-1);return Vd(n,r,u)}function Pd(n,t,e,o){var r=n[t].length,i=as(e+o,0,r-1);return Vd(n,t,i)}function zd(n,t,e,o){var r=as(e+o,0,n.length-1),i=n[r].length,u=as(t,0,i-1);return Vd(n,r,u)}function Ld(t,e){e.previousSelector(t).orThunk(function(){var n=e.selectors;return Ou(t.element(),n.cell)}).each(function(n){e.focusManager.set(t,n)})}function jd(n,t){return function(r,e,i){var u=i.cycles?n:t;return Tu(e,i.selectors.row).bind(function(n){var t=Lc(n,i.selectors.cell);return Sd(t,e).bind(function(e){var o=Lc(r,i.selectors.row);return Sd(o,n).bind(function(n){var t=function(n,t){return S(n,function(n){return Lc(n,t.selectors.cell)})}(o,i);return u(t,n,e).map(function(n){return n.cell()})})})})}}function Ud(t,e,o){return o.focusManager.get(t).bind(function(n){return o.execute(t,e,n)})}function Wd(t,e){Ou(t.element(),e.selector).each(function(n){e.focusManager.set(t,n)})}function Gd(n,t,e){return Bd(n,e.selector,t,-1)}function Xd(n,t,e){return Bd(n,e.selector,t,1)}function Yd(n,t,e,o){var r=n.getSystem().build(o);If(n,r,e)}function qd(n,t,e,o){var r=mg(n);T(r,function(n){return jt(o.element(),n.element())}).each(ys)}function Kd(t,n,e,o,r){var i=mg(t);return on.from(i[o]).map(function(n){return qd(t,0,0,n),r.each(function(n){Yd(t,0,function(n,t){!function(n,t,e){wr(n,e).fold(function(){Pi(n,t)},function(n){Sr(n,t)})}(n,t,o)},n)}),n})}function Jd(n,t){return{key:n,value:{config:{},me:function(n,t){var e=tr(t);return xa({fields:[ct("enabled")],name:n,active:{events:nn(e)}})}(n,t),configAsRaw:nn({}),initialConfig:{},state:nu}}}function $d(n,t){t.ignore||(Sa(n.element()),t.onFocus(n))}function Qd(n,t,e){var o=t.aria;o.update(n,o,e.get())}function Zd(t,n,e){n.toggleClass.each(function(n){e.get()?ei(t.element(),n):ri(t.element(),n)})}function nm(n,t,e){yg(n,t,e,!e.get())}function tm(n,t,e){e.set(!0),Zd(n,t,e),Qd(n,t,e)}function em(n,t,e){e.set(!1),Zd(n,t,e),Qd(n,t,e)}function om(n,t,e){yg(n,t,e,t.selected)}function rm(){return[rr(Xt(),function(n,t){t.stop(),Kt(n)}),sr(Ht().deviceType.isTouch()?eo():uo())]}function im(n){return tr(H([n.map(function(e){return Hi(function(n,t){e(n),t.stop()})}).toArray(),rm()]))}function um(n){(ka(n.element()).isNone()||bg.isFocused(n))&&(bg.isFocused(n)||bg.focus(n),qt(n,Og,{item:n}))}function am(n){qt(n,Tg,{item:n})}function cm(n,t){var e={};Cn(n,function(n,t){bn(n,function(n){e[n]=t})});var o=t,r=function(n){return kn(n,function(n,t){return{k:n,v:t}})}(t),i=P(r,function(n,t){return[t].concat(Hg(e,o,r,t))});return P(e,function(n){return Nn(i,n).getOr([n])})}function sm(n){return n.x()}function fm(n,t){return n.x()+n.width()/2-t.width()/2}function lm(n,t){return n.x()+n.width()-t.width()}function dm(n){return n.y()}function mm(n,t){return n.y()+n.height()-t.height()}function gm(n,t,e){return qa(sm(n),mm(n,t),e.innerSoutheast(),Ja(),"layout-se")}function pm(n,t,e){return qa(lm(n,t),mm(n,t),e.innerSouthwest(),$a(),"layout-sw")}function hm(n,t,e){return qa(sm(n),dm(n),e.innerNortheast(),Qa(),"layout-ne")}function vm(n,t,e){return qa(lm(n,t),dm(n),e.innerNorthwest(),Za(),"layout-nw")}function bm(n){var t=function e(n){return n.uid!==undefined}(n)&&$(n,"uid")?n.uid:Pr("memento");return{get:function(n){return n.getSystem().getByUid(t).getOrDie()},getOpt:function(n){return n.getSystem().getByUid(t).toOption()},asSpec:function(){return N(N({},n),{uid:t})}}}function ym(n){return on.from(n()["temporary-placeholder"]).getOr("!not found!")}function xm(n,t){return on.from(t()[n]).getOrThunk(function(){return ym(t)})}var wm,Sm=ld(At("cyclic",nn(!1))),Cm=ld(At("cyclic",nn(!0))),km=[St("execute",dd),St("useSpace",!1),St("useEnter",!0),St("useControlEnter",!1),St("useDown",!1)],Om=fd(km,nu.init,function(n,t,e,o){var r=e.useSpace&&!Ml(n.element())?[32]:[],i=e.useEnter?[13]:[],u=e.useDown?[40]:[],a=r.concat(i).concat(u);return[Wl(zl(a),gd)].concat(e.useControlEnter?[Wl(Ll([Ul,zl([13])]),gd)]:[])},function(n,t,e,o){return e.useSpace&&!Ml(n.element())?[Wl(zl([32]),md)]:[]},function(){return on.none()}),Tm=/* */Object.freeze({flatgrid:pd,init:function(n){return n.state(n)}}),Em=function(t,e,n,o,r){return o.focusManager.get(e).bind(function(n){return t(e.element(),n,o,r)}).map(function(n){return o.focusManager.set(e,n),!0})},Dm=yd,Bm=yd,Am=yd,_m=gr(["index","candidates"],[]),Mm=[ct("selector"),St("execute",dd),Ju("onEscape"),St("captureTab",!1),Ya()],Fm=Ed(function(n,t,e,o){return kd(n,t,e,o,-1)}),Im=Ed(function(n,t,e,o){return kd(n,t,e,o,1)}),Rm=Ed(function(n,t,e,o){return Od(n,t,e,o,-1)}),Vm=Ed(function(n,t,e,o){return Od(n,t,e,o,1)}),Nm=nn([Wl(zl([37]),vd(Fm,Im)),Wl(zl([39]),bd(Fm,Im)),Wl(zl([38]),Dm(Rm)),Wl(zl([40]),Bm(Vm)),Wl(Ll([jl,zl([9])]),Dd),Wl(Ll([sd,zl([9])]),Dd),Wl(zl([27]),function(n,t,e,o){return e.onEscape(n,t)}),Wl(zl([32].concat([13])),function(t,e,o,n){return function(n,t){return t.focusManager.get(n).bind(function(n){return Tu(n,t.selector)})}(t,o).bind(function(n){return o.execute(t,e,n)})})]),Hm=nn([Wl(zl([32]),md)]),Pm=fd(Mm,pd,Nm,Hm,function(){return on.some(Td)}),zm=[ct("selector"),St("getInitial",on.none),St("execute",dd),Ju("onEscape"),St("executeOnMove",!1),St("allowVertical",!0)],Lm=nn([Wl(zl([32]),md)]),jm=fd(zm,nu.init,function(n,t,e,o){var r=[37].concat(e.allowVertical?[38]:[]),i=[39].concat(e.allowVertical?[40]:[]);return[Wl(zl(r),Id(vd(Md,Fd))),Wl(zl(i),Id(bd(Md,Fd))),Wl(zl([13]),Ad),Wl(zl([32]),Ad),Wl(zl([27]),Rd)]},Lm,function(){return on.some(_d)}),Um=gr(["rowIndex","columnIndex","cell"],[]),Wm=[mt("selectors",[ct("row"),ct("cell")]),St("cycles",!0),St("previousSelector",on.none),St("execute",dd)],Gm=jd(function(n,t,e){return Nd(n,t,e,-1)},function(n,t,e){return Pd(n,t,e,-1)}),Xm=jd(function(n,t,e){return Nd(n,t,e,1)},function(n,t,e){return Pd(n,t,e,1)}),Ym=jd(function(n,t,e){return Hd(n,e,t,-1)},function(n,t,e){return zd(n,e,t,-1)}),qm=jd(function(n,t,e){return Hd(n,e,t,1)},function(n,t,e){return zd(n,e,t,1)}),Km=nn([Wl(zl([37]),vd(Gm,Xm)),Wl(zl([39]),bd(Gm,Xm)),Wl(zl([38]),Dm(Ym)),Wl(zl([40]),Bm(qm)),Wl(zl([32].concat([13])),function(t,e,o){return ka(t.element()).bind(function(n){return o.execute(t,e,n)})})]),Jm=nn([Wl(zl([32]),md)]),$m=fd(Wm,nu.init,Km,Jm,function(){return on.some(Ld)}),Qm=[ct("selector"),St("execute",dd),St("moveOnTab",!1)],Zm=nn([Wl(zl([38]),Am(Gd)),Wl(zl([40]),Am(Xd)),Wl(Ll([jl,zl([9])]),function(n,t,e){return e.moveOnTab?Am(Gd)(n,t,e):on.none()}),Wl(Ll([sd,zl([9])]),function(n,t,e){return e.moveOnTab?Am(Xd)(n,t,e):on.none()}),Wl(zl([13]),Ud),Wl(zl([32]),Ud)]),ng=nn([Wl(zl([32]),md)]),tg=fd(Qm,nu.init,Zm,ng,function(){return on.some(Wd)}),eg=[Ju("onSpace"),Ju("onEnter"),Ju("onShiftEnter"),Ju("onLeft"),Ju("onRight"),Ju("onTab"),Ju("onShiftTab"),Ju("onUp"),Ju("onDown"),Ju("onEscape"),St("stopSpaceKeyup",!1),ht("focusIn")],og=fd(eg,nu.init,function(n,t,e){return[Wl(zl([32]),e.onSpace),Wl(Ll([sd,zl([13])]),e.onEnter),Wl(Ll([jl,zl([13])]),e.onShiftEnter),Wl(Ll([jl,zl([9])]),e.onShiftTab),Wl(Ll([sd,zl([9])]),e.onTab),Wl(zl([38]),e.onUp),Wl(zl([40]),e.onDown),Wl(zl([37]),e.onLeft),Wl(zl([39]),e.onRight),Wl(zl([32]),e.onSpace),Wl(zl([27]),e.onEscape)]},function(n,t,e){return e.stopSpaceKeyup?[Wl(zl([32]),md)]:[]},function(n){return n.focusIn}),rg=Sm.schema(),ig=Cm.schema(),ug=jm.schema(),ag=Pm.schema(),cg=$m.schema(),sg=Om.schema(),fg=tg.schema(),lg=og.schema(),dg=wa({branchKey:"mode",branches:/* */Object.freeze({acyclic:rg,cyclic:ig,flow:ug,flatgrid:ag,matrix:cg,execution:sg,menu:fg,special:lg}),name:"keying",active:{events:function(n,t){return n.handler.toEvents(n,t)}},apis:{focusIn:function(t,e,o){e.sendFocusIn(e).fold(function(){t.getSystem().triggerFocus(t.element(),t.element())},function(n){n(t,e,o)})},setGridSize:function(n,t,e,o,r){$(e,"setGridSize")?e.setGridSize(o,r):v.console.error("Layout does not support setGridSize")}},state:Tm}),mg=function(n,t){return n.components()},gg=xa({fields:[],name:"replacing",apis:/* */Object.freeze({append:function(n,t,e,o){Yd(n,0,Pi,o)},prepend:function(n,t,e,o){Yd(n,0,kr,o)},remove:qd,replaceAt:Kd,replaceBy:function(t,n,e,o,r){var i=mg(t);return E(i,o).bind(function(n){return Kd(t,0,0,n,r)})},set:function(t,n,e,o){Oa(function(){var n=S(o,t.getSystem().build);hs(t,n)},t.element())},contents:mg})}),pg=/* */Object.freeze({focus:$d,blur:function(n,t){t.ignore||function(n){n.dom().blur()}(n.element())},isFocused:function(n){return function(n){var t=pr(n).dom();return n.dom()===t.activeElement}(n.element())}}),hg=/* */Object.freeze({exhibit:function(n,t){var e=t.ignore?{}:{attributes:{tabindex:"-1"}};return Gr(e)},events:function(e){return tr([rr(So(),function(n,t){$d(n,e),t.stop()})].concat(e.stopMousedown?[rr(uo(),function(n,t){t.event().prevent()})]:[]))}}),vg=[Ku("onFocus"),St("stopMousedown",!1),St("ignore",!1)],bg=xa({fields:vg,name:"focusing",active:hg,apis:pg}),yg=function(n,t,e,o){(o?tm:em)(n,t,e)},xg=/* */Object.freeze({onLoad:om,toggle:nm,isOn:function(n,t,e){return e.get()},on:tm,off:em,set:yg}),wg=/* */Object.freeze({exhibit:function(n,t,e){return Gr({})},events:function(n,t){var e=function(t,e,o){return Hi(function(n){o(n,t,e)})}(n,t,nm),o=pa(n,t,om);return tr(H([n.toggleOnExecute?[e]:[],[o]]))}}),Sg=function(n,t,e){_r(n.element(),"aria-expanded",e)},Cg=[St("selected",!1),ht("toggleClass"),St("toggleOnExecute",!0),Ct("aria",{mode:"none"},it("mode",{pressed:[St("syncWithExpanded",!1),Zu("update",function(n,t,e){_r(n.element(),"aria-pressed",e),t.syncWithExpanded&&Sg(n,t,e)})],checked:[Zu("update",function(n,t,e){_r(n.element(),"aria-checked",e)})],expanded:[Zu("update",Sg)],selected:[Zu("update",function(n,t,e){_r(n.element(),"aria-selected",e)})],none:[Zu("update",Z)]}))],kg=xa({fields:Cg,name:"toggling",active:wg,apis:xg,state:(wm=!1,{init:function(){var t=Ee(wm);return{get:function(){return t.get()},set:function(n){return t.set(n)},clear:function(){return t.set(wm)},readState:function(){return t.get()}}}})}),Og="alloy.item-hover",Tg="alloy.item-focus",Eg=nn(Og),Dg=nn(Tg),Bg=[ct("data"),ct("components"),ct("dom"),St("hasSubmenu",!1),ht("toggling"),tl("itemBehaviours",[kg,bg,dg,nl]),St("ignoreFocus",!1),St("domModification",{}),Zu("builder",function(n){return{dom:n.dom,domModification:N(N({},n.domModification),{attributes:N(N(N({role:n.toggling.isSome()?"menuitemcheckbox":"menuitem"},n.domModification.attributes),{"aria-haspopup":n.hasSubmenu}),n.hasSubmenu?{"aria-expanded":!1}:{})}),behaviours:el(n.itemBehaviours,[n.toggling.fold(kg.revoke,function(n){return kg.config(N({aria:{mode:"checked"}},n))}),bg.config({ignore:n.ignoreFocus,stopMousedown:n.ignoreFocus,onFocus:function(n){am(n)}}),dg.config({mode:"execution"}),nl.config({store:{mode:"memory",initialValue:n.data}}),Jd("item-type-events",g(rm(),[rr(fo(),um),rr(Eo(),bg.focus)]))]),components:n.components,eventOrder:n.eventOrder}}),St("eventOrder",{})],Ag=[ct("dom"),ct("components"),Zu("builder",function(n){return{dom:n.dom,components:n.components,events:tr([function(n){return rr(n,function(n,t){t.stop()})}(Eo())])}})],_g=nn([wl({name:"widget",overrides:function(t){return{behaviours:ya([nl.config({store:{mode:"manual",getValue:function(n){return t.data},setValue:function(){}}})])}}})]),Mg=[ct("uid"),ct("data"),ct("components"),ct("dom"),St("autofocus",!1),St("ignoreFocus",!1),tl("widgetBehaviours",[nl,bg,dg]),St("domModification",{}),ef(_g()),Zu("builder",function(e){function o(n){return Ks(n,e,"widget").map(function(n){return dg.focusIn(n),n})}function n(n,t){return Ml(t.event().target())||e.autofocus&&t.setSource(n.element()),on.none()}var t=Ys(0,e,_g()),r=qs("item-widget",e,t.internals());return{dom:e.dom,components:r,domModification:e.domModification,events:tr([Hi(function(n,t){o(n).each(function(n){t.stop()})}),rr(fo(),um),rr(Eo(),function(n,t){e.autofocus?o(n):bg.focus(n)})]),behaviours:el(e.widgetBehaviours,[nl.config({store:{mode:"memory",initialValue:e.data}}),bg.config({ignore:e.ignoreFocus,onFocus:function(n){am(n)}}),dg.config({mode:"special",focusIn:e.autofocus?function(n){o(n)}:sc(),onLeft:n,onRight:n,onEscape:function(n,t){return bg.isFocused(n)||e.autofocus?(e.autofocus&&t.setSource(n.element()),on.none()):(bg.focus(n),on.some(!0))}})])}})],Fg=it("type",{widget:Mg,item:Bg,separator:Ag}),Ig=nn([kl({factory:{sketch:function(n){var t=ot("menu.spec item",Fg,n);return t.builder(t)}},name:"items",unit:"item",defaults:function(n,t){return t.hasOwnProperty("uid")?t:N(N({},t),{uid:Pr("item")})},overrides:function(n,t){return{type:t.type,ignoreFocus:n.fakeFocus,domModification:{classes:[n.markers.item]}}}})]),Rg=nn([ct("value"),ct("items"),ct("dom"),ct("components"),St("eventOrder",{}),Is("menuBehaviours",[cd,nl,nd,dg]),Ct("movement",{mode:"menu",moveOnTab:!0},it("mode",{grid:[Ya(),Zu("config",function(n,t){return{mode:"flatgrid",selector:"."+n.markers.item,initSize:{numColumns:t.initSize.numColumns,numRows:t.initSize.numRows},focusManager:n.focusManager}})],matrix:[Zu("config",function(n,t){return{mode:"matrix",selectors:{row:t.rowSelector,cell:"."+n.markers.item},focusManager:n.focusManager}}),ct("rowSelector")],menu:[St("moveOnTab",!0),Zu("config",function(n,t){return{mode:"menu",selector:"."+n.markers.item,moveOnTab:t.moveOnTab,focusManager:n.focusManager}})]})),st("markers",Ga()),St("fakeFocus",!1),St("focusManager",Xl()),Ku("onHighlight")]),Vg=nn("alloy.menu-focus"),Ng=_l({name:"Menu",configFields:Rg(),partFields:Ig(),factory:function(n,t,e,o){return{uid:n.uid,dom:n.dom,markers:n.markers,behaviours:Vs(n.menuBehaviours,[cd.config({highlightClass:n.markers.selectedItem,itemClass:n.markers.item,onHighlight:n.onHighlight}),nl.config({store:{mode:"memory",initialValue:n.value}}),nd.config({find:on.some}),dg.config(n.movement.config(n,n.movement))]),events:tr([rr(Dg(),function(t,e){var n=e.event();t.getSystem().getByDom(n.target()).each(function(n){cd.highlight(t,n),e.stop(),qt(t,Vg(),{menu:t,item:n})})}),rr(Eg(),function(n,t){var e=t.event().item();cd.highlight(n,e)})]),components:t,eventOrder:n.eventOrder,domModification:{attributes:{role:"menu"}}}}}),Hg=function(e,o,r,n){return Nn(r,n).bind(function(n){return Nn(e,n).bind(function(n){var t=Hg(e,o,r,n);return on.some([n].concat(t))})}).getOr([])},Pg=function(n){return"prepared"===n.type?on.some(n.menu):on.none()},zg={init:function(){function r(n,e,o){return f(n).bind(function(t){return function(e){return I(i.get(),function(n,t){return n===e})}(n).bind(function(n){return e(n).map(function(n){return{triggeredMenu:t,triggeringItem:n,triggeringPath:o}})})})}var i=Ee({}),u=Ee({}),a=Ee({}),c=Ee(on.none()),s=Ee({}),f=function(n){return t(n).bind(Pg)},t=function(n){return Nn(u.get(),n)},e=function(n){return Nn(i.get(),n)};return{setMenuBuilt:function(n,t){var e;u.set(N(N({},u.get()),((e={})[n]={type:"prepared",menu:t},e)))},setContents:function(n,t,e,o){c.set(on.some(n)),i.set(e),u.set(t),s.set(o);var r=cm(o,e);a.set(r)},expand:function(e){return Nn(i.get(),e).map(function(n){var t=Nn(a.get(),e).getOr([]);return[n].concat(t)})},refresh:function(n){return Nn(a.get(),n)},collapse:function(n){return Nn(a.get(),n).bind(function(n){return 1<n.length?on.some(n.slice(1)):on.none()})},lookupMenu:t,lookupItem:e,otherMenus:function(n){var t=s.get();return _(wn(t),n)},getPrimary:function(){return c.get().bind(f)},getMenus:function(){return u.get()},clear:function(){i.set({}),u.set({}),a.set({}),c.set(on.none())},isClear:function(){return c.get().isNone()},getTriggeringPath:function(n,o){var t=C(e(n).toArray(),function(n){return f(n).isSome()});return Nn(a.get(),n).bind(function(n){var e=A(t.concat(n));return function(n){for(var t=[],e=0;e<n.length;e++){var o=n[e];if(!o.isSome())return on.none();t.push(o.getOrDie())}return on.some(t)}(D(e,function(n,t){return r(n,o,e.slice(0,t+1)).fold(function(){return c.get().is(n)?[]:[on.none()]},function(n){return[on.some(n)]})}))})}}},extractPreparedMenu:Pg},Lg=nn("collapse-item"),jg=Al({name:"TieredMenu",configFields:[Qu("onExecute"),Qu("onEscape"),$u("onOpenMenu"),$u("onOpenSubmenu"),$u("onRepositionMenu"),Ku("onCollapseMenu"),St("highlightImmediately",!0),mt("data",[ct("primary"),ct("menus"),ct("expansions")]),St("fakeFocus",!1),Ku("onHighlight"),Ku("onHover"),Xu(),ct("dom"),St("navigateOnHover",!0),St("stayInDom",!1),Is("tmenuBehaviours",[dg,cd,nd,gg]),St("eventOrder",{})],apis:{collapseMenu:function(n,t){n.collapseMenu(t)},highlightPrimary:function(n,t){n.highlightPrimary(t)},repositionMenus:function(n,t){n.repositionMenus(t)}},factory:function(a,n){function e(n){var t=function(o,r,n){return P(n,function(n,t){function e(){return Ng.sketch(N(N({dom:n.dom},n),{value:t,items:n.items,markers:a.markers,fakeFocus:a.fakeFocus,onHighlight:a.onHighlight,focusManager:a.fakeFocus?Yl():Xl()}))}return t===r?{type:"prepared",menu:o.getSystem().build(e())}:{type:"notbuilt",nbMenu:e}})}(n,a.data.primary,a.data.menus),e=o();return g.setContents(a.data.primary,t,a.data.expansions,e),g.getPrimary()}function c(n){return nl.getValue(n).value}function u(t,n){cd.highlight(t,n),cd.getHighlighted(n).orThunk(function(){return cd.getFirst(n)}).each(function(n){Jt(t,n.element(),Eo())})}function s(t,n){return Bu(S(n,function(n){return t.lookupMenu(n).bind(function(n){return"prepared"===n.type?on.some(n.menu):on.none()})}))}function f(t,n,e){var o=s(n,n.otherMenus(e));bn(o,function(n){ai(n.element(),[a.markers.backgroundMenu]),a.stayInDom||gg.remove(t,n)})}function l(n,o){var t=function(o){return r.get().getOrThunk(function(){var e={},n=Lc(o.element(),"."+a.markers.item),t=C(n,function(n){return"true"===Mr(n,"aria-haspopup")});return bn(t,function(n){o.getSystem().getByDom(n).each(function(n){var t=c(n);e[t]=n})}),r.set(on.some(e)),e})}(n);Cn(t,function(n,t){var e=vn(o,t);_r(n.element(),"aria-expanded",e)})}function d(o,r,i){return on.from(i[0]).bind(function(n){return r.lookupMenu(n).bind(function(n){if("notbuilt"===n.type)return on.none();var t=n.menu,e=s(r,i.slice(1));return bn(e,function(n){ei(n.element(),a.markers.backgroundMenu)}),$o(t.element())||gg.append(o,cu(t)),ai(t.element(),[a.markers.backgroundMenu]),u(o,t),f(o,r,i),on.some(t)})})}var m,t,r=Ee(on.none()),g=zg.init(),o=function(n){return P(a.data.menus,function(n,t){return D(n.items,function(n){return"separator"===n.type?[]:[n.data.value]})})};(t=m=m||{})[t.HighlightSubmenu=0]="HighlightSubmenu",t[t.HighlightParent=1]="HighlightParent";function i(r,i,u){void 0===u&&(u=m.HighlightSubmenu);var n=c(i);return g.expand(n).bind(function(o){return l(r,o),on.from(o[0]).bind(function(e){return g.lookupMenu(e).bind(function(n){var t=function(n,t,e){if("notbuilt"!==e.type)return e.menu;var o=n.getSystem().build(e.nbMenu());return g.setMenuBuilt(t,o),o}(r,e,n);return $o(t.element())||gg.append(r,cu(t)),a.onOpenSubmenu(r,i,t,A(o)),u===m.HighlightSubmenu?(cd.highlightFirst(t),d(r,g,o)):(cd.dehighlightAll(t),on.some(i))})})})}function p(t,e){var n=c(e);return g.collapse(n).bind(function(n){return l(t,n),d(t,g,n).map(function(n){return a.onCollapseMenu(t,e,n),n})})}function h(e){return function(t,n){return Tu(n.getSource(),"."+a.markers.item).bind(function(n){return t.getSystem().getByDom(n).toOption().bind(function(n){return e(t,n).map(function(){return!0})})})}}function v(n){return cd.getHighlighted(n).bind(cd.getHighlighted)}var b=tr([rr(Vg(),function(e,o){var n=o.event().item();g.lookupItem(c(n)).each(function(){var n=o.event().menu();cd.highlight(e,n);var t=c(o.event().item());g.refresh(t).each(function(n){return f(e,g,n)})})}),Hi(function(t,n){var e=n.event().target();t.getSystem().getByDom(e).each(function(n){0===c(n).indexOf("collapse-item")&&p(t,n),i(t,n,m.HighlightSubmenu).fold(function(){a.onExecute(t,n)},function(){})})}),Ri(function(t,n){e(t).each(function(n){gg.append(t,cu(n)),a.onOpenMenu(t,n),a.highlightImmediately&&u(t,n)})})].concat(a.navigateOnHover?[rr(Eg(),function(n,t){var e=t.event().item();!function(t,n){var e=c(n);g.refresh(e).bind(function(n){return l(t,n),d(t,g,n)})}(n,e),i(n,e,m.HighlightParent),a.onHover(n,e)})]:[])),y={collapseMenu:function(t){v(t).each(function(n){p(t,n)})},highlightPrimary:function(t){g.getPrimary().each(function(n){u(t,n)})},repositionMenus:function(o){g.getPrimary().bind(function(t){return v(o).bind(function(n){var t=c(n),e=R(g.getMenus()),o=Bu(S(e,zg.extractPreparedMenu));return g.getTriggeringPath(t,function(n){return function(n,t,e){return Au(t,function(n){if(!n.getSystem().isConnected())return on.none();var t=cd.getCandidates(n);return T(t,function(n){return c(n)===e})})}(0,o,n)})}).map(function(n){return{primary:t,triggeringPath:n}})}).fold(function(){(function(n){return on.from(n.components()[0]).filter(function(n){return"menu"===Mr(n.element(),"role")})})(o).each(function(n){a.onRepositionMenu(o,n,[])})},function(n){var t=n.primary,e=n.triggeringPath;a.onRepositionMenu(o,t,e)})}};return{uid:a.uid,dom:a.dom,markers:a.markers,behaviours:Vs(a.tmenuBehaviours,[dg.config({mode:"special",onRight:h(function(n,t){return Ml(t.element())?on.none():i(n,t,m.HighlightSubmenu)}),onLeft:h(function(n,t){return Ml(t.element())?on.none():p(n,t)}),onEscape:h(function(n,t){return p(n,t).orThunk(function(){return a.onEscape(n,t).map(function(){return n})})}),focusIn:function(t,n){g.getPrimary().each(function(n){Jt(t,n.element(),Eo())})}}),cd.config({highlightClass:a.markers.selectedMenu,itemClass:a.markers.menu}),nd.config({find:function(n){return cd.getHighlighted(n)}}),gg.config({})]),eventOrder:a.eventOrder,apis:y,events:b}},extraApis:{tieredData:function(n,t,e){return{primary:n,menus:t,expansions:e}},singleData:function(n,t){return{primary:n,menus:q(n,t),expansions:{}}},collapseItem:function(n){return{value:Hr(Lg()),meta:{text:n}}}}}),Ug=Al({name:"InlineView",configFields:[ct("lazySink"),Ku("onShow"),Ku("onHide"),xt("onEscape"),Is("inlineBehaviours",[Lf,nl,dc]),wt("fireDismissalEventInstead",[St("event",Po())]),wt("fireRepositionEventInstead",[St("event",zo())]),St("getRelated",on.none),St("eventOrder",on.none)],factory:function(i,n){function t(e){Lf.isOpen(e)&&nl.getValue(e).each(function(n){switch(n.mode){case"menu":Lf.getState(e).each(function(n){jg.repositionMenus(n)});break;case"position":var t=i.lazySink(e).getOrDie();_f.positionWithinBounds(t,n.anchor,e,n.getBounds())}})}var o=function(n,t,e,o){r(n,t,e,function(){return o.map(function(n){return wu(n)})})},r=function(n,t,e,o){var r=i.lazySink(n).getOrDie();Lf.openWhileCloaked(n,e,function(){return _f.positionWithinBounds(r,t,n,o())}),nl.setValue(n,on.some({mode:"position",anchor:t,getBounds:o}))},u=function(n,t,e,o){var r=function(n,t,r,e,i){function u(){return n.lazySink(t)}function a(n){return function(n){return 2===n.length}(n)?o:{}}var o="horizontal"===e.type?{layouts:{onLtr:function(){return ma()},onRtl:function(){return ga()}}}:{};return jg.sketch({dom:{tag:"div"},data:e.data,markers:e.menu.markers,onEscape:function(){return Lf.close(t),n.onEscape.map(function(n){return n(t)}),on.some(!0)},onExecute:function(){return on.some(!0)},onOpenMenu:function(n,t){_f.positionWithinBounds(u().getOrDie(),r,t,i())},onOpenSubmenu:function(n,t,e,o){var r=u().getOrDie();_f.position(r,N({anchor:"submenu",item:t},a(o)),e)},onRepositionMenu:function(n,t,e){var o=u().getOrDie();_f.positionWithinBounds(o,r,t,i()),bn(e,function(n){var t=a(n.triggeringPath);_f.position(o,N({anchor:"submenu",item:n.triggeringItem},t),n.triggeredMenu)})}})}(i,n,t,e,o);Lf.open(n,r),nl.setValue(n,on.some({mode:"menu",menu:r}))},e={setContent:function(n,t){Lf.setContent(n,t)},showAt:function(n,t,e){o(n,t,e,on.none())},showWithin:o,showWithinBounds:r,showMenuAt:function(n,t,e){u(n,t,e,function(){return on.none()})},showMenuWithinBounds:u,hide:function(n){nl.setValue(n,on.none()),Lf.close(n)},getContent:function(n){return Lf.getState(n)},reposition:t,isOpen:Lf.isOpen};return{uid:i.uid,dom:i.dom,behaviours:Vs(i.inlineBehaviours,[Lf.config({isPartOf:function(n,t,e){return ju(t,e)||function(n,t){return i.getRelated(n).exists(function(n){return ju(n,t)})}(n,e)},getAttachPoint:function(n){return i.lazySink(n).getOrDie()},onOpen:function(n){i.onShow(n)},onClose:function(n){i.onHide(n)}}),nl.config({store:{mode:"memory",initialValue:on.none()}}),dc.config({channels:N(N({},Es(N({isExtraPart:nn(!1)},i.fireDismissalEventInstead.map(function(n){return{fireEventInstead:{event:n.event}}}).getOr({})))),Ds(N(N({isExtraPart:nn(!1)},i.fireRepositionEventInstead.map(function(n){return{fireEventInstead:{event:n.event}}}).getOr({})),{doReposition:t})))})]),eventOrder:i.eventOrder,apis:e}},apis:{showAt:function(n,t,e,o){n.showAt(t,e,o)},showWithin:function(n,t,e,o,r){n.showWithin(t,e,o,r)},showWithinBounds:function(n,t,e,o,r){n.showWithinBounds(t,e,o,r)},showMenuAt:function(n,t,e,o){n.showMenuAt(t,e,o)},showMenuWithinBounds:function(n,t,e,o,r){n.showMenuWithinBounds(t,e,o,r)},hide:function(n,t){n.hide(t)},isOpen:function(n,t){return n.isOpen(t)},getContent:function(n,t){return n.getContent(t)},setContent:function(n,t,e){n.setContent(t,e)},reposition:function(n,t){n.reposition(t)}}}),Wg=function(n,t,e){return qa(fm(n,t),dm(n),e.innerNorth(),tc(),"layout-n")},Gg=function(n,t,e){return qa(fm(n,t),mm(n,t),e.innerSouth(),nc(),"layout-s")},Xg=Al({name:"Button",factory:function(n){function e(t){return Nn(n.dom,"attributes").bind(function(n){return Nn(n,t)})}var t=im(n.action),o=n.dom.tag;return{uid:n.uid,dom:n.dom,components:n.components,events:t,behaviours:el(n.buttonBehaviours,[bg.config({}),dg.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:function(){if("button"!==o)return{role:e("role").getOr("button")};var n=e("type").getOr("button"),t=e("role").map(function(n){return{role:n}}).getOr({});return N({type:n},t)}()},eventOrder:n.eventOrder}},configFields:[St("uid",undefined),ct("dom"),St("components",[]),tl("buttonBehaviours",[bg,dg]),ht("action"),ht("role"),St("eventOrder",{})]}),Yg={success:"checkmark",error:"warning",err:"error",warning:"warning",warn:"warning",info:"info"},qg=Al({name:"Notification",factory:function(t){function e(n){return{dom:{tag:"div",classes:["tox-bar"],attributes:{style:"width: "+n+"%"}}}}function o(n){return{dom:{tag:"div",classes:["tox-text"],innerHtml:n+"%"}}}var r=bm({dom:{tag:"p",innerHtml:t.translationProvider(t.text)},behaviours:ya([gg.config({})])}),i=bm({dom:{tag:"div",classes:t.progress?["tox-progress-bar","tox-progress-indicator"]:["tox-progress-bar"]},components:[{dom:{tag:"div",classes:["tox-bar-container"]},components:[e(0)]},o(0)],behaviours:ya([gg.config({})])}),n={updateProgress:function(n,t){n.getSystem().isConnected()&&i.getOpt(n).each(function(n){gg.set(n,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[e(t)]},o(t)])})},updateText:function(n,t){if(n.getSystem().isConnected()){var e=r.get(n);gg.set(e,[Ti(t)])}}},u=H([t.icon.toArray(),t.level.toArray(),t.level.bind(function(n){return on.from(Yg[n])}).toArray()]);return{uid:t.uid,dom:{tag:"div",attributes:{role:"alert"},classes:t.level.map(function(n){return["tox-notification","tox-notification--in","tox-notification--"+n]}).getOr(["tox-notification","tox-notification--in"])},components:[{dom:{tag:"div",classes:["tox-notification__icon"],innerHtml:function(n,t){return Au(n,function(n){return on.from(t()[n])}).getOrThunk(function(){return ym(t)})}(u,t.iconProvider)}},{dom:{tag:"div",classes:["tox-notification__body"]},components:[r.asSpec()],behaviours:ya([gg.config({})])}].concat(t.progress?[i.asSpec()]:[]).concat(Xg.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"]},components:[{dom:{tag:"div",classes:["tox-icon"],innerHtml:xm("close",t.iconProvider),attributes:{"aria-label":t.translationProvider("Close")}}}],action:function(n){t.onAction(n)}})),apis:n}},configFields:[ht("level"),ct("progress"),ct("icon"),ct("onAction"),ct("text"),ct("iconProvider"),ct("translationProvider")],apis:{updateProgress:function(n,t,e){n.updateProgress(t,e)},updateText:function(n,t,e){n.updateText(t,e)}}}),Kg=tinymce.util.Tools.resolve("tinymce.util.Delay");function Jg(n,u,o){var a=u.backstage;return{open:function(n,t){function e(){t(),Ug.hide(i)}var r=au(qg.sketch({text:n.text,level:vn(["success","error","warning","warn","info"],n.type)?n.type:undefined,progress:!0===n.progressBar,icon:on.from(n.icon),onAction:e,iconProvider:a.shared.providers.icons,translationProvider:a.shared.providers.translate})),i=au(Ug.sketch({dom:{tag:"div",classes:["tox-notifications-container"]},lazySink:u.backstage.shared.getSink,fireDismissalEventInstead:{}}));return o.add(i),0<n.timeout&&Kg.setTimeout(function(){e()},n.timeout),{close:e,moveTo:function(n,t){Ug.showAt(i,{anchor:"makeshift",x:n,y:t},cu(r))},moveRel:function(n,t){if("banner"!==t){var e=function(n){switch(n){case"bc-bc":return Gg;case"tc-tc":return Wg;case"tc-bc":return rc;case"bc-tc":default:return ic}}(t),o={anchor:"node",root:Mi(),node:on.some(Be.fromDom(n)),layouts:{onRtl:function(){return[e]},onLtr:function(){return[e]}}};Ug.showAt(i,o,cu(r))}else Ug.showAt(i,u.backstage.shared.anchors.banner(),cu(r))},text:function(n){qg.updateText(r,n)},settings:n,getEl:function(){return r.element().dom()},progressBar:{value:function(n){qg.updateProgress(r,n)}}}},close:function(n){n.close()},reposition:function(n){!function(n){bn(n,function(n){return n.moveTo(0,0)})}(n),function(e){0<e.length&&(yn(e).each(function(n){return n.moveRel(null,"banner")}),bn(e,function(n,t){0<t&&n.moveRel(e[t-1].getEl(),"bc-tc")}))}(n)},getArgs:function(n){return n.settings}}}function $g(e,o){var r=null;return{cancel:function(){null!==r&&(v.clearTimeout(r),r=null)},throttle:function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];null!==r&&v.clearTimeout(r),r=v.setTimeout(function(){e.apply(null,n),r=null},o)}}}function Qg(n,t,e,o,r){var i=new _p(t,r||n.getRoot());return Ip(n,t,on.some(e),o,i.prev,on.none())}function Zg(t,e){return Rp(Be.fromDom(t.selection.getNode())).getOrThunk(function(){var n=Be.fromHtml('<span data-mce-autocompleter="1" data-mce-bogus="1"></span>',t.getDoc());return Pi(n,Be.fromDom(e.extractContents())),e.insertNode(n.dom()),br(n).each(function(n){return n.dom().normalize()}),Rc(n).map(function(n){t.selection.setCursorLocation(n.dom(),function(n){return"img"===Ko(n)?1:_c(n).fold(function(){return xr(n).length},function(n){return n.length})}(n))}),n})}function np(n,t){return n.toString().substring(t.length).replace(/\u00A0/g," ").replace(/\uFEFF/g,"")}function tp(n,u,a,c){return void 0===c&&(c=0),function(n){return n.collapsed&&3===n.startContainer.nodeType}(u)?Qg(n,u.startContainer,u.startOffset,function(e,o,r,n){var i=n.getOr(r.length);return function(n,t,e,o){var r;for(r=t-1;0<=r;r--){var i=n.charAt(r);if(Vp.test(i))return on.none();if(i===e)break}return-1===r||t-r<o?on.none():on.some(n.substring(r+1,t))}(r,i,a,1).fold(function(){return r.match(Vp)?e.abort():e.kontinue()},function(n){var t=u.cloneRange();return t.setStart(o,i-n.length-1),t.setEnd(u.endContainer,u.endOffset),r.length<c?e.abort():e.finish({text:np(t,a),range:t,triggerChar:a})})}).fold(on.none,on.none,on.some):on.none()}function ep(e,n,o,t){return void 0===t&&(t=0),Rp(Be.fromDom(n.startContainer)).fold(function(){return tp(e,n,o,t)},function(n){var t=e.createRng();return t.selectNode(n.dom()),on.some({range:t,text:np(t,o),triggerChar:o})})}function op(n,t){return{element:n,offset:t}}function rp(t,e){var n=e(),o=t.selection.getRng();return function(t,e,n){return Au(n.triggerChars,function(n){return ep(t,e,n)})}(t.dom,o,n).bind(function(n){return Lp(t,e,n)})}function ip(n){var t=n.ui.registry.getAll().popups,e=P(t,function(n){return function(n){return tt("Autocompleter",Wp,n)}(n).fold(function(n){throw new Error(ye(n))},function(n){return n})}),o=function(n){var t={};return bn(n,function(n){t[n]={}}),wn(t)}(On(e,function(n){return n.ch})),r=R(e);return{dataset:e,triggerChars:o,lookupByChar:function(t){return C(r,function(n){return n.ch===t})}}}function up(n,o,t){var r=Lc(n.element(),"."+t);if(0<r.length){var e=E(r,function(n){var t=n.dom().getBoundingClientRect().top,e=r[0].dom().getBoundingClientRect().top;return Math.abs(t-e)>o}).getOr(r.length);return on.some({numColumns:e,numRows:Math.ceil(r.length/e)})}return on.none()}function ap(n,t){return ya([Jd(n,t)])}function cp(n,t,e){n.getSystem().broadcastOn([nh],{})}function sp(n){var t=Be.fromHtml(n),e=xr(t),o=function(n){var t=n.dom().attributes!==undefined?n.dom().attributes:[];return O(t,function(n,t){var e;return"class"===t.name?n:N(N({},n),((e={})[t.name]=t.value,e))},{})}(t),r=function(n){return Array.prototype.slice.call(n.dom().classList,0)}(t),i=0===e.length?{}:{innerHtml:Dr(t)};return N({tag:Ko(t),classes:r,attributes:o},i)}function fp(n){return Nn(sh,n).getOr(uh)}function lp(n){return{dom:{tag:"div",classes:[lh],innerHtml:n}}}function dp(n){return{dom:{tag:"div",classes:[dh]},components:[Ti(ih.translate(n))]}}function mp(n,t){return{dom:{tag:"div",classes:[dh]},components:[{dom:{tag:n.tag,attributes:{style:n.styleAttr}},components:[Ti(ih.translate(t))]}]}}function gp(n){return{dom:{tag:"div",classes:["tox-collection__item-accessory"],innerHtml:hh(n)}}}function pp(n){return{dom:{tag:"div",classes:[lh,"tox-collection__item-checkmark"],innerHtml:xm("checkmark",n)}}}function hp(n,t,e,o,r){var i=e?n.checkMark.orThunk(function(){return t.or(on.some("")).map(lp)}):on.none(),u=n.ariaLabel.map(function(n){return{attributes:{title:ih.translate(n)}}}).getOr({});return{dom:An({tag:"div",classes:[uh,ah].concat(r?["tox-collection__item-icon-rtl"]:[])},u),optComponents:[i,n.htmlContent.fold(function(){return n.textContent.map(o)},function(n){return on.some(function(n){return{dom:{tag:"div",classes:[dh],innerHtml:n}}}(n))}),n.shortcutContent.map(gp),n.caret]}}function vp(n,t,e,o){void 0===o&&(o=on.none());var r=ih.isRtl()&&n.iconContent.exists(function(n){return vn(bh,n)}),i=n.iconContent.map(function(n){return ih.isRtl()&&vn(vh,n)?n+"-rtl":n}).map(function(n){return function(n,t,e){return on.from(t()[n]).or(e).getOrThunk(function(){return ym(t)})}(n,t.icons,o)}),u=on.from(n.meta).fold(function(){return dp},function(n){return Tn(n,"style")?d(mp,n.style):dp});return"color"===n.presets?function(n,t,e,o){var r,i,u;return{dom:(r=ch,i=e.getOr(""),u=n.map(function(n){return' title="'+o.translate(n)+'"'}).getOr(""),sp("custom"===t?'<button class="'+r+' tox-swatches__picker-btn"'+u+">"+i+"</button>":"remove"===t?'<div class="'+r+' tox-swatch--remove"'+u+">"+i+"</div>":'<div class="'+r+'" style="background-color: '+t+'" data-mce-color="'+t+'"'+u+"></div>")),optComponents:[]}}(n.ariaLabel,n.value,i,t):hp(n,i,e,u,r)}function bp(n,t,e){t.disabled&&xh(n,t)}function yp(n,t){return!0===t.useNative&&vn(yh,Ko(n.element()))}function xp(n){_r(n.element(),"disabled","disabled")}function wp(n){Ir(n.element(),"disabled")}function Sp(n){_r(n.element(),"aria-disabled","true")}function Cp(n){_r(n.element(),"aria-disabled","false")}function kp(t,n,e){n.disableClass.each(function(n){ri(t.element(),n)}),(yp(t,n)?wp:Cp)(t),n.onEnabled(t)}function Op(n,t){return yp(n,t)?function(n){return Fr(n.element(),"disabled")}(n):function(n){return"true"===Mr(n.element(),"aria-disabled")}(n)}function Tp(n,t){var e=n.getApi(t);return function(n){n(e)}}function Ep(e,o){return Ri(function(n){Tp(e,n)(function(n){var t=e.onSetup(n);null!==t&&t!==undefined&&o.set(t)})})}function Dp(t,e){return Vi(function(n){return Tp(t,n)(e.get())})}var Bp,Ap,_p=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),Mp=En([{aborted:[]},{edge:["element"]},{success:["info"]}]),Fp=En([{abort:[]},{kontinue:[]},{finish:["info"]}]),Ip=function(t,e,n,o,r,i){function u(){return i.fold(Mp.aborted,Mp.edge)}function a(){var n=r();return n?Ip(t,n,on.none(),o,r,on.some(e)):u()}if(function(n,t){return n.isBlock(t)||vn(["BR","IMG","HR","INPUT"],t.nodeName)||"false"===n.getContentEditable(t)}(t,e))return u();if(function(n){return n.nodeType===v.Node.TEXT_NODE}(e)){var c=e.textContent;return o(Fp,e,c,n).fold(Mp.aborted,function(){return a()},Mp.success)}return a()},Rp=function(n){return Tu(n,"[data-mce-autocompleter]")},Vp=/[\u00a0 \t\r\n]/,Np=function(e,n){n.on("keypress compositionend",e.onKeypress.throttle),n.on("remove",e.onKeypress.cancel);function o(n,t){qt(n,go(),{raw:t})}n.on("keydown",function(t){function n(){return e.getView().bind(cd.getHighlighted)}8===t.which&&e.onKeypress.throttle(t),e.isActive()&&(27===t.which&&e.cancelIfNecessary(),e.isMenuOpen()?13===t.which?(n().each(Kt),t.preventDefault()):40===t.which?(n().fold(function(){e.getView().each(cd.highlightFirst)},function(n){o(n,t)}),t.preventDefault(),t.stopImmediatePropagation()):37!==t.which&&38!==t.which&&39!==t.which||n().each(function(n){o(n,t),t.preventDefault(),t.stopImmediatePropagation()}):13!==t.which&&38!==t.which&&40!==t.which||e.cancelIfNecessary())}),n.on("NodeChange",function(n){e.isActive()&&!e.isProcessingAction()&&Rp(Be.fromDom(n.element)).isNone()&&e.cancelIfNecessary()})},Hp=tinymce.util.Tools.resolve("tinymce.util.Promise"),Pp=function(n){if(function(n){return n.nodeType===v.Node.TEXT_NODE}(n))return op(n,n.data.length);var t=n.childNodes;return 0<t.length?Pp(t[t.length-1]):op(n,t.length)},zp=function(n,t){var e=n.childNodes;return 0<e.length&&t<e.length?zp(e[t],0):0<e.length&&function(n){return n.nodeType===v.Node.ELEMENT_NODE}(n)&&e.length===t?Pp(e[e.length-1]):op(n,t)},Lp=function(t,n,e,o){void 0===o&&(o={});var r=n(),i=t.selection.getRng().startContainer.nodeValue,u=C(r.lookupByChar(e.triggerChar),function(n){return e.text.length>=n.minChars&&n.matches.getOrThunk(function(){return function(e){function o(n,t,e,o){var r=o.getOr(e.length);return 0===r?n.kontinue():n.finish(/\s/.test(e.charAt(r-1)))}return function(n){var t=zp(n.startContainer,n.startOffset);return Qg(e,t.element,t.offset,o).fold(nn(!0),nn(!0),l)}}(t.dom)})(e.range,i,e.text)});if(0===u.length)return on.none();var a=Hp.all(S(u,function(t){return t.fetch(e.text,t.maxResults,o).then(function(n){return{matchText:e.text,items:n,columns:t.columns,onAction:t.onAction}})}));return on.some({lookupData:a,context:e})},jp=de([ft("type"),yt("text")]),Up=de([At("type",function(){return"autocompleteitem"}),At("active",function(){return!1}),At("disabled",function(){return!1}),St("meta",{}),ft("value"),yt("text"),yt("icon")]),Wp=de([ft("type"),ft("ch"),kt("minChars",1),St("columns",1),kt("maxResults",10),xt("matches"),dt("fetch"),dt("onAction")]),Gp=[Et("disabled",!1),yt("text"),yt("shortcut"),he("value","value",In(function(){return Hr("menuitem-value")}),xe()),St("meta",{})],Xp=de([ft("type"),Dt("onSetup",function(){return Z}),Dt("onAction",Z),yt("icon")].concat(Gp)),Yp=de([ft("type"),dt("getSubmenuItems"),Dt("onSetup",function(){return Z}),yt("icon")].concat(Gp)),qp=de([ft("type"),Et("active",!1),Dt("onSetup",function(){return Z}),dt("onAction")].concat(Gp)),Kp=de([ft("type"),Et("active",!1),yt("icon")].concat(Gp)),Jp=de([ft("type"),lt("fancytype",["inserttable","colorswatch"]),Dt("onAction",Z)]),$p=function(n){return ap(Hr("unnamed-events"),n)},Qp=[ct("lazySink"),ct("tooltipDom"),St("exclusive",!0),St("tooltipComponents",[]),St("delay",300),Tt("mode","normal",["normal","follow-highlight"]),St("anchor",function(n){return{anchor:"hotspot",hotspot:n,layouts:{onLtr:nn([ic,rc,aa,sa,ca,fa]),onRtl:nn([ic,rc,aa,sa,ca,fa])}}}),Ku("onHide"),Ku("onShow")],Zp=/* */Object.freeze({init:function(){function e(){o.get().each(function(n){v.clearTimeout(n)})}var o=Ee(on.none()),t=Ee(on.none()),n=nn("not-implemented");return tu({getTooltip:function(){return t.get()},isShowing:function(){return t.get().isSome()},setTooltip:function(n){t.set(on.some(n))},clearTooltip:function(){t.set(on.none())},clearTimer:e,resetTimer:function(n,t){e(),o.set(on.some(v.setTimeout(function(){n()},t)))},readState:n})}}),nh=Hr("tooltip.exclusive"),th=Hr("tooltip.show"),eh=Hr("tooltip.hide"),oh=/* */Object.freeze({hideAllExclusive:cp,setComponents:function(n,t,e,o){e.getTooltip().each(function(n){n.getSystem().isConnected()&&gg.set(n,o)})}}),rh=xa({fields:Qp,name:"tooltipping",active:/* */Object.freeze({events:function(o,r){function e(t){r.getTooltip().each(function(n){ys(n),o.onHide(t,n),r.clearTooltip()}),r.clearTimer()}return tr(H([[rr(th,function(n){r.resetTimer(function(){!function(t){if(!r.isShowing()){cp(t);var n=o.lazySink(t).getOrDie(),e=t.getSystem().build({dom:o.tooltipDom,components:o.tooltipComponents,events:tr("normal"===o.mode?[rr(fo(),function(n){Yt(t,th)}),rr(co(),function(n){Yt(t,eh)})]:[]),behaviours:ya([gg.config({})])});r.setTooltip(e),vs(n,e),o.onShow(t,e),_f.position(n,o.anchor(t),e)}}(n)},o.delay)}),rr(eh,function(n){r.resetTimer(function(){e(n)},o.delay)}),rr(Oo(),function(n,t){vn(t.channels(),nh)&&e(n)}),Vi(function(n){e(n)})],"normal"===o.mode?[rr(lo(),function(n){Yt(n,th)}),rr(Co(),function(n){Yt(n,eh)}),rr(fo(),function(n){Yt(n,th)}),rr(co(),function(n){Yt(n,eh)})]:[rr(Go(),function(n,t){Yt(n,th)}),rr(Xo(),function(n){Yt(n,eh)})]]))}}),state:Zp,apis:oh}),ih=tinymce.util.Tools.resolve("tinymce.util.I18n"),uh="tox-menu-nav__js",ah="tox-collection__item",ch="tox-swatch",sh={normal:uh,color:ch},fh="tox-collection__item--enabled",lh="tox-collection__item-icon",dh="tox-collection__item-label",mh="tox-collection__item-caret",gh="tox-collection__item--active",ph=tinymce.util.Tools.resolve("tinymce.Env"),hh=function(n){var e=ph.mac?{alt:"&#x2325;",ctrl:"&#x2303;",shift:"&#x21E7;",meta:"&#x2318;",access:"&#x2303;&#x2325;"}:{meta:"Ctrl",access:"Shift+Alt"},t=n.split("+"),o=S(t,function(n){var t=n.toLowerCase().trim();return Tn(e,t)?e[t]:n});return ph.mac?o.join(""):o.join("+")},vh=["list-num-default","list-num-lower-alpha","list-num-lower-greek","list-num-lower-roman","list-num-upper-alpha","list-num-upper-roman"],bh=["list-bull-circle","list-bull-default","list-bull-square"],yh=["input","button","textarea","select"],xh=function(t,n,e){n.disableClass.each(function(n){ei(t.element(),n)}),(yp(t,n)?xp:Sp)(t),n.onDisabled(t)},wh=/* */Object.freeze({enable:kp,disable:xh,isDisabled:Op,onLoad:bp,set:function(n,t,e,o){(o?xh:kp)(n,t,e)}}),Sh=/* */Object.freeze({exhibit:function(n,t,e){return Gr({classes:t.disabled?t.disableClass.map(M).getOr([]):[]})},events:function(e,n){return tr([er(To(),function(n,t){return Op(n,e)}),pa(e,n,bp)])}}),Ch=[St("disabled",!1),St("useNative",!0),ht("disableClass"),Ku("onDisabled"),Ku("onEnabled")],kh=xa({fields:Ch,name:"disabling",active:Sh,apis:wh}),Oh=function(n){return kh.config({disabled:n,disableClass:"tox-collection__item--state-disabled"})},Th=function(n){return kh.config({disabled:n})},Eh=function(n){return kh.config({disabled:n,disableClass:"tox-tbtn--disabled"})},Dh=function(n){return kh.config({disabled:n,disableClass:"tox-tbtn--disabled",useNative:!1})};(Ap=Bp=Bp||{})[Ap.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",Ap[Ap.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX";function Bh(n){return D(n,function(n){return n.toArray()})}function Ah(n,t,e){var o=Ee(Z);return{type:"item",dom:t.dom,components:Bh(t.optComponents),data:n.data,eventOrder:Rh,hasSubmenu:n.triggersSubmenu,itemBehaviours:ya([Jd("item-events",[function(e,o){return Hi(function(n,t){Tp(e,n)(e.onAction),e.triggersSubmenu||o!==Ih.CLOSE_ON_EXECUTE||(Yt(n,Ao()),t.stop())})}(n,e),Ep(n,o),Dp(n,o)]),Oh(n.disabled),gg.config({})].concat(n.itemBehaviours))}}function _h(n){return{value:n.value,meta:An({text:n.text.getOr("")},n.meta)}}function Mh(n,t){var e=function(n){return Vh.DOM.encode(n)}(ih.translate(n));if(0<t.length){var o=new RegExp(function(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(t),"gi");return e.replace(o,function(n){return'<span class="tox-autocompleter-highlight">'+n+"</span>"})}return e}function Fh(t,e,n){function o(n){return qt(n,Ph,{row:t,col:e})}var r;return au({dom:{tag:"div",attributes:(r={role:"button"},r["aria-labelledby"]=n,r)},behaviours:ya([Jd("insert-table-picker-cell",[rr(fo(),bg.focus),rr(To(),o),rr(Xt(),function(n,t){t.stop(),o(n)})]),kg.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),bg.config({onFocus:function(n){return qt(n,Hh,{row:t,col:e})}})])})}var Ih=Bp,Rh={"alloy.execute":["disabling","alloy.base.behaviour","toggling","item-events"]},Vh=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Nh=nn(Us("item-widget",_g())),Hh=Hr("cell-over"),Ph=Hr("cell-execute");function zh(n){return{value:nn(n)}}function Lh(n){return $h.test(n)||Qh.test(n)}function jh(n){var t=function(n){var t=n.value().replace($h,function(n,t,e,o){return t+t+e+e+o+o});return{value:nn(t)}}(n),e=Qh.exec(t.value());return null===e?["FFFFFF","FF","FF","FF"]:e}function Uh(n){var t=n.toString(16);return 1===t.length?"0"+t:t}function Wh(n){var t=Uh(n.red())+Uh(n.green())+Uh(n.blue());return zh(t)}function Gh(n,t,e,o){return{red:nn(n),green:nn(t),blue:nn(e),alpha:nn(o)}}function Xh(n){var t=parseInt(n,10);return t.toString()===n&&0<=t&&t<=255}function Yh(n){var t,e,o,r=(n.hue()||0)%360,i=n.saturation()/100,u=n.value()/100;if(i=nv(0,Zh(i,1)),u=nv(0,Zh(u,1)),0===i)return t=e=o=tv(255*u),Gh(t,e,o,1);var a=r/60,c=u*i,s=c*(1-Math.abs(a%2-1)),f=u-c;switch(Math.floor(a)){case 0:t=c,e=s,o=0;break;case 1:t=s,e=c,o=0;break;case 2:t=0,e=c,o=s;break;case 3:t=0,e=s,o=c;break;case 4:t=s,e=0,o=c;break;case 5:t=c,e=0,o=s;break;default:t=e=o=0}return t=tv(255*(t+f)),e=tv(255*(e+f)),o=tv(255*(o+f)),Gh(t,e,o,1)}function qh(n){var t=jh(n),e=parseInt(t[1],16),o=parseInt(t[2],16),r=parseInt(t[3],16);return Gh(e,o,r,1)}function Kh(n,t,e,o){var r=parseInt(n,10),i=parseInt(t,10),u=parseInt(e,10),a=parseFloat(o);return Gh(r,i,u,a)}function Jh(n){return"rgba("+n.red()+","+n.green()+","+n.blue()+","+n.alpha()+")"}var $h=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Qh=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Zh=Math.min,nv=Math.max,tv=Math.round,ev=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,ov=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,rv=nn(Gh(255,0,0,1)),iv=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),uv="tinymce-custom-colors";function av(n){var t=[],u=v.document.createElement("canvas");u.height=1,u.width=1;for(var a=u.getContext("2d"),c=function(n,t){var e=t/255;return("0"+Math.round(n*e+255*(1-e)).toString(16)).slice(-2).toUpperCase()},e=function(n){if(/^[0-9A-Fa-f]{6}$/.test(n))return"#"+n.toUpperCase();a.clearRect(0,0,u.width,u.height),a.fillStyle="#FFFFFF",a.fillStyle=n,a.fillRect(0,0,1,1);var t=a.getImageData(0,0,1,1).data,e=t[0],o=t[1],r=t[2],i=t[3];return"#"+c(e,i)+c(o,i)+c(r,i)},o=0;o<n.length;o+=2)t.push({text:n[o+1],value:e(n[o]),type:"choiceitem"});return t}function cv(n){return n.getParam("color_map")}function sv(n,e){var o;return n.dom.getParents(n.selection.getStart(),function(n){var t;(t=n.style["forecolor"===e?"color":"background-color"])&&(o=o||t)}),o}function fv(n){return Math.max(5,Math.ceil(Math.sqrt(n)))}function lv(n){var t=Rv(n),e=fv(t.length);return Fv(n,e)}function dv(t,e,n,o){"custom"===n?Uv(t)(function(n){n.each(function(n){Nv(n),t.execCommand("mceApplyTextcolor",e,n),o(n)})},"#000000"):"remove"===n?(o(""),t.execCommand("mceRemoveTextcolor",e)):(o(n),t.execCommand("mceApplyTextcolor",e,n))}function mv(n,t){return n.concat(Vv().concat(function(n){var t="choiceitem",e={type:t,text:"Remove color",icon:"color-swatch-remove-color",value:"remove"};return n?[e,{type:t,text:"Custom color",icon:"color-picker",value:"custom"}]:[e]}(t)))}function gv(t,e){return function(n){n(mv(t,e))}}function pv(n,t,e){var o,r;o="forecolor"===t?"tox-icon-text-color__color":"tox-icon-highlight-bg-color__color",r=e,n.setIconFill(o,r),n.setIconStroke(o,r)}function hv(o,e,r,n,i){o.ui.registry.addSplitButton(e,{tooltip:n,presets:"color",icon:"forecolor"===e?"text-color":"highlight-bg-color",select:function(e){return on.from(sv(o,r)).bind(function(n){return function(n){if("transparent"===n)return on.some(Gh(0,0,0,0));var t=ev.exec(n);if(null!==t)return on.some(Kh(t[1],t[2],t[3],"1"));var e=ov.exec(n);return null!==e?on.some(Kh(e[1],e[2],e[3],e[4])):on.none()}(n).map(function(n){var t=Wh(n).value();return Vt(e.toLowerCase(),t)})}).getOr(!1)},columns:lv(o),fetch:gv(Rv(o),Iv(o)),onAction:function(n){null!==i.get()&&dv(o,r,i.get(),function(){})},onItemAction:function(n,t){dv(o,r,t,function(n){i.set(n),jv(o,{name:e,color:n})})},onSetup:function(t){null!==i.get()&&pv(t,e,i.get());function n(n){n.name===e&&pv(t,n.name,n.color)}return o.on("TextColorChange",n),function(){o.off("TextColorChange",n)}}})}function vv(t,n,e,o){t.ui.registry.addNestedMenuItem(n,{text:o,icon:"forecolor"===n?"text-color":"highlight-bg-color",getSubmenuItems:function(){return[{type:"fancymenuitem",fancytype:"colorswatch",onAction:function(n){dv(t,e,n.value,Z)}}]}})}function bv(e,o){return function(n){var t=w(n,o);return S(t,function(n){return{dom:e,components:n}})}}function yv(n,e){var o=[],r=[];return bn(n,function(n,t){e(n,t)?(0<r.length&&o.push(r),r=[],Tn(n.dom,"innerHtml")&&r.push(n)):r.push(n)}),0<r.length&&o.push(r),S(o,function(n){return{dom:{tag:"div",classes:["tox-collection__group"]},components:n}})}function xv(t,e,n){return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===t?["tox-collection--list"]:["tox-collection--grid"])},components:[Ng.parts().items({preprocess:function(n){return"auto"!==t&&1<t?bv({tag:"div",classes:["tox-collection__group"]},t)(n):yv(n,function(n,t){return"separator"===e[t].type})}})]}}function wv(n){return{backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:function(n){return"color"===n?"tox-swatches":"tox-menu"}(n),tieredMenu:"tox-tiered-menu"}}function Sv(n){var t=wv(n);return{backgroundMenu:t.backgroundMenu,selectedMenu:t.selectedMenu,menu:t.menu,selectedItem:t.selectedItem,item:fp(n)}}function Cv(n,t,e){var o=wv(e);return{dom:{tag:"div",classes:H([[o.tieredMenu]])},markers:Sv(e)}}function kv(n){return n.icon!==undefined||"togglemenuitem"===n.type||"choicemenuitem"===n.type}function Ov(n){return v.console.error(ye(n)),v.console.log(n),on.none()}function Tv(n,t,e,o,r){var i=function(e){return{dom:{tag:"div",classes:["tox-collection","tox-collection--horizontal"]},components:[Ng.parts().items({preprocess:function(n){return yv(n,function(n,t){return"separator"===e[t].type})}})]}}(e);return{value:n,dom:i.dom,components:i.components,items:e}}function Ev(n,t,e,o,r){var i;return"color"===r?{value:n,dom:(i=function(n){return{dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"]},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[Ng.parts().items({preprocess:"auto"!==n?bv({tag:"div",classes:["tox-swatches__row"]},n):l})]}]}}(o)).dom,components:i.components,items:e}:"normal"===r&&"auto"===o?{value:n,dom:(i=xv(o,e)).dom,components:i.components,items:e}:"normal"===r&&1===o?{value:n,dom:(i=xv(1,e)).dom,components:i.components,items:e}:"normal"===r?{value:n,dom:(i=xv(o,e)).dom,components:i.components,items:e}:"listpreview"!==r||"auto"===o?{value:n,dom:function(n,t,e){var o=wv(e);return{tag:"div",classes:H([[o.menu,"tox-menu-"+t+"-column"],n?[o.hasIcons]:[]])}}(t,o,r),components:Gv,items:e}:{value:n,dom:(i=function(n){return{dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[Ng.parts().items({preprocess:bv({tag:"div",classes:["tox-collection__group"]},n)})]}}(o)).dom,components:i.components,items:e}}function Dv(n,t,e,o,r,i,u,a){var c=function(n){return x(n,kv)}(t),s=Xv(t,e,o,"color"!==r?"normal":"color",i,u,a);return Ev(n,c,s,o,r)}function Bv(n,t){var e=Sv(t);return 1===n?{mode:"menu",moveOnTab:!0}:"auto"===n?{mode:"grid",selector:"."+e.item,initSize:{numColumns:1,numRows:1}}:{mode:"matrix",rowSelector:"."+("color"===t?"tox-swatches__row":"tox-collection__group")}}var Av="choiceitem",_v=[{type:Av,text:"Light Green",value:"#BFEDD2"},{type:Av,text:"Light Yellow",value:"#FBEEB8"},{type:Av,text:"Light Red",value:"#F8CAC6"},{type:Av,text:"Light Purple",value:"#ECCAFA"},{type:Av,text:"Light Blue",value:"#C2E0F4"},{type:Av,text:"Green",value:"#2DC26B"},{type:Av,text:"Yellow",value:"#F1C40F"},{type:Av,text:"Red",value:"#E03E2D"},{type:Av,text:"Purple",value:"#B96AD9"},{type:Av,text:"Blue",value:"#3598DB"},{type:Av,text:"Dark Turquoise",value:"#169179"},{type:Av,text:"Orange",value:"#E67E23"},{type:Av,text:"Dark Red",value:"#BA372A"},{type:Av,text:"Dark Purple",value:"#843FA1"},{type:Av,text:"Dark Blue",value:"#236FA1"},{type:Av,text:"Light Gray",value:"#ECF0F1"},{type:Av,text:"Medium Gray",value:"#CED4D9"},{type:Av,text:"Gray",value:"#95A5A6"},{type:Av,text:"Dark Gray",value:"#7E8C8D"},{type:Av,text:"Navy Blue",value:"#34495E"},{type:Av,text:"Black",value:"#000000"},{type:Av,text:"White",value:"#ffffff"}],Mv=function uI(t){void 0===t&&(t=10);var n,e=iv.getItem(uv),o=cn(e)?JSON.parse(e):[],r=t-(n=o).length<0?n.slice(0,t):n,i=function(n){r.splice(n,1)};return{add:function(n){(function(n,t){var e=y(n,t);return-1===e?on.none():on.some(e)})(r,n).each(i),r.unshift(n),r.length>t&&r.pop(),iv.setItem(uv,JSON.stringify(r))},state:function(){return r.slice(0)}}}(10),Fv=function(n,t){return n.getParam("color_cols",t,"number")},Iv=function(n){return!1!==n.getParam("custom_colors")},Rv=function(n){var t=cv(n);return t!==undefined?av(t):_v},Vv=function(){return S(Mv.state(),function(n){return{type:Av,text:n,value:n}})},Nv=function(n){Mv.add(n)},Hv=function(n){return n.fire("SkinLoaded")},Pv=function(n){return n.fire("ResizeEditor")},zv=function(n,t){return n.fire("ScrollContent",t)},Lv=function(n,t){return n.fire("ResizeContent",t)},jv=function(n,t){return n.fire("TextColorChange",t)},Uv=function(i){return function(n,t){var e,o={colorpicker:t},r=(e=n,function(n){var t=n.getData();e(on.from(t.colorpicker)),n.close()});i.windowManager.open({title:"Color Picker",size:"normal",body:{type:"panel",items:[{type:"colorpicker",name:"colorpicker",label:"Color"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:o,onAction:function(n,t){"hex-valid"===t.name&&(t.value?n.enable("ok"):n.disable("ok"))},onSubmit:r,onClose:function(){},onCancel:function(){n(on.none())}})}},Wv={register:function(n){!function(e){e.addCommand("mceApplyTextcolor",function(n,t){!function(n,t,e){n.undoManager.transact(function(){n.focus(),n.formatter.apply(t,{value:e}),n.nodeChanged()})}(e,n,t)}),e.addCommand("mceRemoveTextcolor",function(n){!function(n,t){n.undoManager.transact(function(){n.focus(),n.formatter.remove(t,{value:null},null,!0),n.nodeChanged()})}(e,n)})}(n);var t=Ee(null),e=Ee(null);hv(n,"forecolor","forecolor","Text color",t),hv(n,"backcolor","hilitecolor","Background color",e),vv(n,"forecolor","forecolor","Text color"),vv(n,"backcolor","hilitecolor","Background color")},getColors:mv,getFetch:gv,colorPickerDialog:Uv,getCurrentColor:sv,getColorCols:lv,calcCols:fv},Gv=[Ng.parts().items({})],Xv=function(n,e,o,r,i,u,a){return Bu(S(n,function(t){return"choiceitem"===t.type?function(n){return tt("choicemenuitem",Kp,n)}(t).fold(Ov,function(n){return on.some(function(t,n,e,o,r,i,u){var a=vp({presets:e,textContent:n?t.text:on.none(),htmlContent:on.none(),ariaLabel:t.text,iconContent:t.icon,shortcutContent:n?t.shortcut:on.none(),checkMark:n?on.some(pp(u.icons)):on.none(),caret:on.none(),value:t.value},u,!0);return Bn(Ah({data:_h(t),disabled:t.disabled,getApi:function(t){return{setActive:function(n){kg.set(t,n)},isActive:function(){return kg.isOn(t)},isDisabled:function(){return kh.isDisabled(t)},setDisabled:function(n){return kh.set(t,n)}}},onAction:function(n){return o(t.value)},onSetup:function(n){return n.setActive(r),function(){}},triggersSubmenu:!1,itemBehaviours:[]},a,i),{toggling:{toggleClass:fh,toggleOnExecute:!1,selected:t.active}})}(n,1===o,r,e,u(t.value),i,a))}):on.none()}))};var Yv,qv,Kv={inserttable:function aI(o){var n=Hr("size-label"),i=function(n,t,e){for(var o=[],r=0;r<t;r++){for(var i=[],u=0;u<e;u++)i.push(Fh(r,u,n));o.push(i)}return o}(n,10,10),u=bm({dom:{tag:"span",classes:["tox-insert-table-picker__label"],attributes:{id:n}},components:[Ti("0x0")],behaviours:ya([gg.config({})])});return{type:"widget",data:{value:Hr("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[Nh().widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:function(n){return D(n,function(n){return S(n,cu)})}(i).concat(u.asSpec()),behaviours:ya([Jd("insert-table-picker",[cr(Hh,function(n,t,e){var o=e.event().row(),r=e.event().col();!function(n,t,e,o,r){for(var i=0;i<o;i++)for(var u=0;u<r;u++)kg.set(n[i][u],i<=t&&u<=e)}(i,o,r,10,10),gg.set(u.get(n),[function(n,t){return Ti(t+1+"x"+(n+1))}(o,r)])}),cr(Ph,function(n,t,e){o.onAction({numRows:e.event().row()+1,numColumns:e.event().col()+1}),Yt(n,Ao())})]),dg.config({initSize:{numRows:10,numColumns:10},mode:"flatgrid",selector:'[role="button"]'})])})]}},colorswatch:function cI(t,n){var e=Wv.getColors(n.colorinput.getColors(),n.colorinput.hasCustomColors()),o=n.colorinput.getColorCols(),r=Dv(Hr("menu-value"),e,function(n){t.onAction({value:n})},o,"color",Ih.CLOSE_ON_EXECUTE,function(){return!1},n.shared.providers),i=Bn(N(N({},r),{markers:Sv("color"),movement:Bv(o,"color")}));return{type:"widget",data:{value:Hr("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[Nh().widget(Ng.sketch(i))]}}},Jv=function(t,e,n,o,r,i,u,a){void 0===a&&(a=!0);var c=vp({presets:o,textContent:on.none(),htmlContent:n?t.text.map(function(n){return Mh(n,e)}):on.none(),ariaLabel:t.text,iconContent:t.icon,shortcutContent:on.none(),checkMark:on.none(),caret:on.none(),value:t.value},u.providers,a,t.icon);return Ah({data:_h(t),disabled:t.disabled,getApi:function(){return{}},onAction:function(n){return r(t.value,t.meta)},onSetup:function(){return function(){}},triggersSubmenu:!1,itemBehaviours:function(n,t){return V(n,"tooltipWorker").map(function(e){return[rh.config({lazySink:t.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:function(n){return{anchor:"submenu",item:n,overrides:{maxHeightFunction:kf}}},mode:"follow-highlight",onShow:function(t,n){e(function(n){rh.setComponents(t,[iu({element:Be.fromDom(n)})])})}})]}).getOr([])}(t.meta,u)},c,i)},$v=function(n){var t=n.text.fold(function(){return{}},function(n){return{innerHtml:n}});return{type:"separator",dom:N({tag:"div",classes:[ah,"tox-collection__group-heading"]},t),components:[]}},Qv=function(n,t,e,o){void 0===o&&(o=!0);var r=vp({presets:"normal",iconContent:n.icon,textContent:n.text,htmlContent:on.none(),ariaLabel:n.text,caret:on.none(),checkMark:on.none(),shortcutContent:n.shortcut},e,o);return Ah({data:_h(n),getApi:function(t){return{isDisabled:function(){return kh.isDisabled(t)},setDisabled:function(n){return kh.set(t,n)}}},disabled:n.disabled,onAction:n.onAction,onSetup:n.onSetup,triggersSubmenu:!1,itemBehaviours:[]},r,t)},Zv=function(n,t,e,o,r){void 0===o&&(o=!0),void 0===r&&(r=!1);var i=r?function(n){return{dom:{tag:"div",classes:[mh],innerHtml:xm("chevron-down",n)}}}(e.icons):function(n){return{dom:{tag:"div",classes:[mh],innerHtml:xm("chevron-right",n)}}}(e.icons),u=vp({presets:"normal",iconContent:n.icon,textContent:n.text,htmlContent:on.none(),ariaLabel:n.text,caret:on.some(i),checkMark:on.none(),shortcutContent:n.shortcut},e,o);return Ah({data:_h(n),getApi:function(t){return{isDisabled:function(){return kh.isDisabled(t)},setDisabled:function(n){return kh.set(t,n)}}},disabled:n.disabled,onAction:Z,onSetup:n.onSetup,triggersSubmenu:!0,itemBehaviours:[]},u,t)},nb=function(n,t,e){var o=vp({iconContent:on.none(),textContent:n.text,htmlContent:on.none(),ariaLabel:n.text,checkMark:on.some(pp(e.icons)),caret:on.none(),shortcutContent:n.shortcut,presets:"normal",meta:n.meta},e,!0);return Bn(Ah({data:_h(n),disabled:n.disabled,getApi:function(t){return{setActive:function(n){kg.set(t,n)},isActive:function(){return kg.isOn(t)},isDisabled:function(){return kh.isDisabled(t)},setDisabled:function(n){return kh.set(t,n)}}},onAction:n.onAction,onSetup:n.onSetup,triggersSubmenu:!1,itemBehaviours:[]},o,t),{toggling:{toggleClass:fh,toggleOnExecute:!1,selected:n.active}})},tb=function(t,e){return function(n,t){return Object.prototype.hasOwnProperty.call(n,t)?on.some(n[t]):on.none()}(Kv,t.fancytype).map(function(n){return n(t,e)})};(qv=Yv=Yv||{})[qv.ContentFocus=0]="ContentFocus",qv[qv.UiFocus=1]="UiFocus";function eb(n){return n.icon!==undefined||"togglemenuitem"===n.type||"choicemenuitem"===n.type}function ob(n){return x(n,eb)}function rb(n,t,e,o,r){function i(n){return r?N(N({},n),{shortcut:on.none(),icon:n.text.isSome()?on.none():n.icon}):n}var u=e.shared.providers;switch(n.type){case"menuitem":return function(n){return tt("menuitem",Xp,n)}(n).fold(Ov,function(n){return on.some(Qv(i(n),t,u,o))});case"nestedmenuitem":return function(n){return tt("nestedmenuitem",Yp,n)}(n).fold(Ov,function(n){return on.some(Zv(i(n),t,u,o,r))});case"togglemenuitem":return function(n){return tt("togglemenuitem",qp,n)}(n).fold(Ov,function(n){return on.some(nb(i(n),t,u))});case"separator":return function(n){return tt("separatormenuitem",jp,n)}(n).fold(Ov,function(n){return on.some($v(n))});case"fancymenuitem":return function(n){return tt("fancymenuitem",Jp,n)}(n).fold(Ov,function(n){return tb(i(n),e)});default:return v.console.error("Unknown item in general menu",n),on.none()}}function ib(n,t,e,o,r,i){var u=1===o,a=!u||ob(n);return Bu(S(n,function(n){return"separator"===n.type?function(n){return tt("Autocompleter.Separator",jp,n)}(n).fold(Ov,function(n){return on.some($v(n))}):function(n){return tt("Autocompleter.Item",Up,n)}(n).fold(Ov,function(n){return on.some(Jv(n,t,u,"normal",e,r,i,a))})}))}function ub(n,t,e,o,r){var i=ob(t),u=Bu(S(t,function(n){function t(n){return rb(n,e,o,function(n){return r?!n.hasOwnProperty("text"):i}(n),r)}return"nestedmenuitem"===n.type&&n.getSubmenuItems().length<=0?t(An(n,{disabled:!0})):t(n)}));return(r?Tv:Ev)(n,i,u,1,"normal")}function ab(n){return jg.singleData(n.value,n)}function cb(n){function t(){n.stopPropagation()}function e(){n.preventDefault()}var o=Be.fromDom(n.target),r=i(e,t);return function(n,t,e,o,r,i,u){return{target:nn(n),x:nn(t),y:nn(e),stop:o,prevent:r,kill:i,raw:nn(u)}}(o,n.clientX,n.clientY,t,e,r,n)}function sb(n,t,e,o,r){var i=function(t,e){return function(n){t(n)&&e(cb(n))}}(e,o);return n.dom().addEventListener(t,i,r),{unbind:d(gb,n,t,i,r)}}function fb(n,t,e){return function(n,t,e,o){return sb(n,t,e,o,!1)}(n,t,pb,e)}function lb(n,t,e){return function(n,t,e,o){return sb(n,t,e,o,!0)}(n,t,pb,e)}function db(n,t,e){return Tu(n,t,e).isSome()}var mb=function(u,a){function e(){return s.get().isSome()}function c(){e()&&Ug.hide(l)}function i(n,t,e,o){n.matchLength=t.text.length;var r=Au(e,function(n){return on.from(n.columns)}).getOr(1);Ug.showAt(l,{anchor:"node",root:Be.fromDom(u.getBody()),node:on.from(n.element)},Ng.sketch(function(n,t,e,o){var r=e===Yv.ContentFocus?Yl():Xl(),i=Bv(t,o),u=Sv(o);return{dom:n.dom,components:n.components,items:n.items,value:n.value,markers:{selectedItem:u.selectedItem,item:u.item},movement:i,fakeFocus:e===Yv.ContentFocus,focusManager:r,menuBehaviours:$p("auto"!==t?[]:[Ri(function(o,n){up(o,4,u.item).each(function(n){var t=n.numColumns,e=n.numRows;dg.setGridSize(o,e,t)})})])}}(Ev("autocompleter-value",!0,o,r,"normal"),r,Yv.ContentFocus,"normal"))),Ug.getContent(l).each(cd.highlightFirst)}var s=Ee(on.none()),f=Ee(!1),l=au(Ug.sketch({dom:{tag:"div",classes:["tox-autocompleter"]},components:[],fireDismissalEventInstead:{},inlineBehaviours:ya([Jd("dismissAutocompleter",[rr(Po(),function(){return d()})])]),lazySink:a.getSink})),d=function(){if(e()){var n=s.get().map(function(n){return n.element});Rp(n.getOr(Be.fromDom(u.selection.getNode()))).each(Er),c(),s.set(on.none()),f.set(!1)}},o=L(function(){return ip(u)}),m=function(n){(function(t){return s.get().map(function(n){return ep(u.dom,u.selection.getRng(),n.triggerChar).bind(function(n){return Lp(u,o,n,t)})}).getOrThunk(function(){return rp(u,o)})})(n).fold(d,function(r){!function(n){if(!e()){var t=Zg(u,n.range);s.set(on.some({triggerChar:n.triggerChar,element:t,matchLength:n.text.length})),f.set(!1)}}(r.context),r.lookupData.then(function(o){s.get().map(function(n){var t=r.context;if(n.triggerChar===t.triggerChar){var e=function(t,n){var e=Au(n,function(n){return on.from(n.columns)}).getOr(1);return D(n,function(i){var n=i.items;return ib(n,i.matchText,function(o,r){var n=u.selection.getRng();ep(u.dom,n,t).fold(function(){return v.console.error("Lost context. Cursor probably moved")},function(n){var t=n.range,e={hide:function(){d()},reload:function(n){c(),m(n)}};f.set(!0),i.onAction(e,t,o,r),f.set(!1)})},e,Ih.BUBBLE_TO_SANDBOX,a)})}(t.triggerChar,o);0<e.length?i(n,t,o,e):10<=t.text.length-n.matchLength?d():c()}})})})},n={onKeypress:$g(function(n){27!==n.which&&m()},50),cancelIfNecessary:d,isMenuOpen:function(){return Ug.isOpen(l)},isActive:e,isProcessingAction:f.get,getView:function(){return Ug.getContent(l)}};Np(n,u)},gb=function(n,t,e,o){n.dom().removeEventListener(t,e,o)},pb=nn(!0),hb=cb;function vb(e,o){var r=null;return{cancel:function(){null!==r&&(v.clearTimeout(r),r=null)},schedule:function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];r=v.setTimeout(function(){e.apply(null,n),r=null},o)}}}function bb(n){var t=n.raw();return t.touches===undefined||1!==t.touches.length?on.none():on.some(t.touches[0])}function yb(e){var o=Ee(on.none()),r=Ee(!1),i=vb(function(n){e.triggerEvent(Bo(),n),r.set(!0)},400),u=K([{key:eo(),value:function(e){return bb(e).each(function(n){i.cancel();var t={x:nn(n.clientX),y:nn(n.clientY),target:e.target};i.schedule(e),r.set(!1),o.set(on.some(t))}),on.none()}},{key:oo(),value:function(n){return i.cancel(),bb(n).each(function(t){o.get().each(function(n){!function(n,t){var e=Math.abs(n.clientX-t.x()),o=Math.abs(n.clientY-t.y());return 5<e||5<o}(t,n)||o.set(on.none())})}),on.none()}},{key:ro(),value:function(t){i.cancel();return o.get().filter(function(n){return jt(n.target(),t.target())}).map(function(n){return r.get()?(t.prevent(),!1):e.triggerEvent(Do(),t)})}}]);return{fireIfReady:function(t,n){return Nn(u,n).bind(function(n){return n(t)})}}}function xb(t,n){var e=ot("Getting GUI events settings",Ob,n),o=Ht().deviceType.isTouch()?["touchstart","touchmove","touchend","touchcancel","gesturestart"]:["mousedown","mouseup","mouseover","mousemove","mouseout","click"],r=yb(e),i=S(o.concat(["selectstart","input","contextmenu","change","transitionend","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),function(n){return fb(t,n,function(t){r.fireIfReady(t,n).each(function(n){n&&t.kill()}),e.triggerEvent(n,t)&&t.kill()})}),u=Ee(on.none()),a=fb(t,"paste",function(t){r.fireIfReady(t,"paste").each(function(n){n&&t.kill()}),e.triggerEvent("paste",t)&&t.kill(),u.set(on.some(v.setTimeout(function(){e.triggerEvent(ko(),t)},0)))}),c=fb(t,"keydown",function(n){e.triggerEvent("keydown",n)?n.kill():!0===e.stopBackspace&&function(n){return 8===n.raw().which&&!vn(["input","textarea"],Ko(n.target()))&&!db(n.target(),'[contenteditable="true"]')}(n)&&n.prevent()}),s=function(n,t){return kb?lb(n,"focus",t):fb(n,"focusin",t)}(t,function(n){e.triggerEvent("focusin",n)&&n.kill()}),f=Ee(on.none()),l=function(n,t){return kb?lb(n,"blur",t):fb(n,"focusout",t)}(t,function(n){e.triggerEvent("focusout",n)&&n.kill(),f.set(on.some(v.setTimeout(function(){e.triggerEvent(Co(),n)},0)))});return{unbind:function(){bn(i,function(n){n.unbind()}),c.unbind(),s.unbind(),l.unbind(),a.unbind(),u.get().each(v.clearTimeout),f.get().each(v.clearTimeout)}}}function wb(n,t){var e=Nn(n,"target").map(function(n){return n()}).getOr(t);return Ee(e)}function Sb(n,o,t,e,r,i){var u=n(o,e),a=function(n,t){var e=Ee(!1),o=Ee(!1);return{stop:function(){e.set(!0)},cut:function(){o.set(!0)},isStopped:e.get,isCut:o.get,event:nn(n),setSource:t.set,getSource:t.get}}(t,r);return u.fold(function(){return i.logEventNoHandlers(o,e),Tb.complete()},function(t){var e=t.descHandler();return Xr(e)(a),a.isStopped()?(i.logEventStopped(o,t.element(),e.purpose()),Tb.stopped()):a.isCut()?(i.logEventCut(o,t.element(),e.purpose()),Tb.complete()):br(t.element()).fold(function(){return i.logNoParent(o,t.element(),e.purpose()),Tb.complete()},function(n){return i.logEventResponse(o,t.element(),e.purpose()),Tb.resume(n)})})}function Cb(n,t,e){var o=function(n){var t=Ee(!1);return{stop:function(){t.set(!0)},cut:Z,isStopped:t.get,isCut:nn(!1),event:nn(n),setSource:r("Cannot set source of a broadcasted event"),getSource:r("Cannot get source of a broadcasted event")}}(t);return bn(n,function(n){var t=n.descHandler();Xr(t)(o)}),o.isStopped()}var kb=Ht().browser.isFirefox(),Ob=qn([dt("triggerEvent"),St("stopBackspace",!0)]),Tb=En([{stopped:[]},{resume:["element"]},{complete:[]}]),Eb=function(t,e,o,n,r,i){return Sb(t,e,o,n,r,i).fold(function(){return!0},function(n){return Eb(t,e,o,n,r,i)},function(){return!1})},Db=function(n,t,e,o,r){var i=wb(e,o);return Eb(n,t,e,o,i,r)},Bb=lr("element","descHandler"),Ab=function(n,t){return{id:nn(n),descHandler:nn(t)}};function _b(){var i={};return{registerId:function(o,r,n){Cn(n,function(n,t){var e=i[t]!==undefined?i[t]:{};e[r]=eu(n,o),i[t]=e})},unregisterId:function(e){Cn(i,function(n,t){n.hasOwnProperty(e)&&delete n[e]})},filterByType:function(n){return Nn(i,n).map(function(n){return On(n,function(n,t){return Ab(t,n)})}).getOr([])},find:function(n,t,e){var o=Vn(t)(i);return Ii(e,function(n){return function(e,o){return Ki(o).fold(function(){return on.none()},function(n){var t=Vn(n);return e.bind(t).map(function(n){return Bb(o,n)})})}(o,n)},n)}}}function Mb(){function o(n){var t=n.element();return Ki(t).fold(function(){return function(n,t){var e=Hr(Xi+n);return qi(t,e),e}("uid-",n.element())},function(n){return n})}var r=_b(),i={},u=function(n){Ki(n.element()).each(function(n){delete i[n],r.unregisterId(n)})};return{find:function(n,t,e){return r.find(n,t,e)},filter:function(n){return r.filterByType(n)},register:function(n){var t=o(n);$(i,t)&&function(n,t){var e=i[t];if(e!==n)throw new Error('The tagId "'+t+'" is already used by: '+Nr(e.element())+"\nCannot use it for: "+Nr(n.element())+"\nThe conflicting element is"+($o(e.element())?" ":" not ")+"already in the DOM");u(n)}(n,t);var e=[n];r.registerId(e,t,n.events()),i[t]=n},unregister:u,getById:function(n){return Vn(n)(i)}}}function Fb(e){function o(t){return br(e.element()).fold(function(){return!0},function(n){return jt(t,n)})}function r(n,t){return u.find(o,n,t)}function i(e){var n=u.filter(Oo());bn(n,function(n){var t=n.descHandler();Xr(t)(e)})}var u=Mb(),n=xb(e.element(),{triggerEvent:function(t,e){return Gu(t,e.target(),function(n){return function(n,t,e,o){var r=e.target();return Db(n,t,e,r,o)}(r,t,e,n)})}}),a={debugInfo:nn("real"),triggerEvent:function(t,e,o){Gu(t,e,function(n){Db(r,t,o,e,n)})},triggerFocus:function(t,e){Ki(t).fold(function(){Sa(t)},function(n){Gu(So(),t,function(n){!function(n,t,e,o,r){var i=wb(e,o);Sb(n,t,e,o,i,r)}(r,So(),{originator:nn(e),kill:Z,prevent:Z,target:nn(t)},t,n)})})},triggerEscape:function(n,t){a.triggerEvent("keydown",n.element(),t.event())},getByUid:function(n){return g(n)},getByDom:function(n){return p(n)},build:au,addToGui:function(n){s(n)},removeFromGui:function(n){f(n)},addToWorld:function(n){t(n)},removeFromWorld:function(n){c(n)},broadcast:function(n){l(n)},broadcastOn:function(n,t){d(n,t)},broadcastEvent:function(n,t){m(n,t)},isConnected:nn(!0)},t=function(n){n.connect(a),_i(n.element())||(u.register(n),bn(n.components(),t),a.triggerEvent(Mo(),n.element(),{target:nn(n.element())}))},c=function(n){_i(n.element())||(bn(n.components(),c),u.unregister(n)),n.disconnect()},s=function(n){vs(e,n)},f=function(n){ys(n)},l=function(n){i({universal:nn(!0),data:nn(n)})},d=function(n,t){i({universal:nn(!1),channels:nn(n),data:nn(t)})},m=function(n,t){var e=u.filter(n);return Cb(e,t)},g=function(n){return u.getById(n).fold(function(){return an.error(new Error('Could not find component with uid: "'+n+'" in system.'))},an.value)},p=function(n){var t=Ki(n).getOr("not found");return g(t)};return t(e),{root:nn(e),element:e.element,destroy:function(){n.unbind(),zi(e.element())},add:s,remove:f,getByUid:g,getByDom:p,addToWorld:t,removeFromWorld:c,broadcast:l,broadcastOn:d,broadcastEvent:m}}function Ib(n){return n.getParam("height",Math.max(n.getElement().offsetHeight,200))}function Rb(n){return n.getParam("width",Vh.DOM.getStyle(n.getElement(),"width"))}function Vb(n){return on.from(n.settings.min_width).filter(mn)}function Nb(n){return on.from(n.settings.min_height).filter(mn)}function Hb(n){return on.from(n.getParam("max_width")).filter(mn)}function Pb(n){return on.from(n.getParam("max_height")).filter(mn)}function zb(n){return!1!==n.getParam("menubar",!0,"boolean")}function Lb(n){var t=n.getParam("toolbar",!0),e=!0===t,o=cn(t),r=fn(t)&&0<t.length;return!Yb(n)&&(r||o||e)}function jb(t){var n=wn(t.settings),e=C(n,function(n){return/^toolbar([1-9])$/.test(n)}),o=S(e,function(n){return t.getParam(n,!1,"string")}),r=C(o,function(n){return"string"==typeof n});return 0<r.length?on.some(r):on.none()}var Ub,Wb,Gb=Al({name:"Container",factory:function(n){var t=n.dom,e=t.attributes,o=c(t,["attributes"]);return{uid:n.uid,dom:N({tag:"div",attributes:N({role:"presentation"},e)},o),components:n.components,behaviours:Rs(n.containerBehaviours),events:n.events,domModification:n.domModification,eventOrder:n.eventOrder}},configFields:[St("components",[]),Is("containerBehaviours",[]),St("events",{}),St("domModification",{}),St("eventOrder",{})]}),Xb=tinymce.util.Tools.resolve("tinymce.EditorManager"),Yb=function(n){return jb(n).fold(function(){return 0<n.getParam("toolbar",[],"string[]").length},function(){return!0})};(Wb=Ub=Ub||{})["default"]="",Wb.floating="floating",Wb.sliding="sliding",Wb.scrolling="scrolling";function qb(n){return n.getParam("toolbar_drawer","","string")}function Kb(n){var t=function(n){return n.getParam("fixed_toolbar_container","","string")}(n);return 0<t.length&&n.inline?Ou(Mi(),t):on.none()}function Jb(n){return n.inline&&Kb(n).isSome()}function $b(n){return n.inline&&!zb(n)&&!Lb(n)&&!Yb(n)}function Qb(n){return(n.getParam("toolbar_sticky",!1,"boolean")||n.inline)&&!Jb(n)&&!$b(n)}function Zb(n){return n.touches===undefined||1!==n.touches.length?on.none():on.some(n.touches[0])}function ny(n){return ya([bg.config({onFocus:!1===n.selectOnFocus?Z:function(n){var t=n.element(),e=bi(t);t.dom().setSelectionRange(0,e.length)}})])}function ty(n){return{tag:n.tag,attributes:N({type:"text"},n.inputAttributes),styles:n.inputStyles,classes:n.inputClasses}}var ey,oy,ry,iy,uy=function(e){var o=Ee(on.none()),r=Ee(!1),i=$g(function(n){e.fire("longpress",N(N({},n),{type:"longpress"})),r.set(!0)},400);e.on("touchstart",function(e){Zb(e).each(function(n){i.cancel();var t={x:nn(n.clientX),y:nn(n.clientY),target:nn(e.target)};i.throttle(e),r.set(!1),o.set(on.some(t))})},!0),e.on("touchmove",function(n){i.cancel(),Zb(n).each(function(t){o.get().each(function(n){!function(n,t){var e=Math.abs(n.clientX-t.x()),o=Math.abs(n.clientY-t.y());return 5<e||5<o}(t,n)||(o.set(on.none()),r.set(!1),e.fire("longpresscancel"))})})},!0),e.on("touchend touchcancel",function(t){i.cancel(),"touchcancel"!==t.type&&o.get().filter(function(n){return n.target().isEqualNode(t.target)}).each(function(){r.get()?t.preventDefault():e.fire("tap").isDefaultPrevented()&&t.preventDefault()})},!0)},ay=Hr("form-component-change"),cy=Hr("form-close"),sy=Hr("form-cancel"),fy=Hr("form-action"),ly=Hr("form-submit"),dy=Hr("form-block"),my=Hr("form-unblock"),gy=Hr("form-tabchange"),py=Hr("form-resize"),hy=nn([St("prefix","form-field"),Is("fieldBehaviours",[nd,nl])]),vy=nn([Cl({schema:[ct("dom")],name:"label"}),Cl({factory:{sketch:function(n){return{uid:n.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:n.text}}}},schema:[ct("text")],name:"aria-descriptor"}),wl({factory:{sketch:function(n){var t=X(n,["factory"]);return n.factory.sketch(t)}},schema:[ct("factory")],name:"field"})]),by=_l({name:"FormField",configFields:hy(),partFields:vy(),factory:function(r,n,t,e){var o=Vs(r.fieldBehaviours,[nd.config({find:function(n){return Ks(n,r,"field")}}),nl.config({store:{mode:"manual",getValue:function(n){return nd.getCurrent(n).bind(nl.getValue)},setValue:function(n,t){nd.getCurrent(n).each(function(n){nl.setValue(n,t)})}}})]),i=tr([Ri(function(n,t){var o=$s(n,r,["label","field","aria-descriptor"]);o.field().each(function(e){var t=Hr(r.prefix);o.label().each(function(n){_r(n.element(),"for",t),_r(e.element(),"id",t)}),o["aria-descriptor"]().each(function(n){var t=Hr(r.prefix);_r(n.element(),"id",t),_r(e.element(),"aria-describedby",t)})})})]),u={getField:function(n){return Ks(n,r,"field")},getLabel:function(n){return Ks(n,r,"label")}};return{uid:r.uid,dom:r.dom,components:n,behaviours:o,events:i,apis:u}},apis:{getField:function(n,t){return n.getField(t)},getLabel:function(n,t){return n.getLabel(t)}}}),yy=nn([ht("data"),St("inputAttributes",{}),St("inputStyles",{}),St("tag","input"),St("inputClasses",[]),Ku("onSetValue"),St("styles",{}),St("eventOrder",{}),Is("inputBehaviours",[nl,bg]),St("selectOnFocus",!0)]),xy=Al({name:"Input",configFields:yy(),factory:function(n,t){return{uid:n.uid,dom:ty(n),components:[],behaviours:function(n){return N(N({},ny(n)),Vs(n.inputBehaviours,[nl.config({store:{mode:"manual",initialValue:n.data.getOr(undefined),getValue:function(n){return bi(n.element())},setValue:function(n,t){bi(n.element())!==t&&yi(n.element(),t)}},onSetValue:n.onSetValue})]))}(n),eventOrder:n.eventOrder}}}),wy={},Sy={exports:wy};ey=undefined,oy=wy,ry=Sy,iy=undefined,function(n){"object"==typeof oy&&void 0!==ry?ry.exports=n():"function"==typeof ey&&ey.amd?ey([],n):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EphoxContactWrapper=n()}(function(){return function f(i,u,a){function c(t,n){if(!u[t]){if(!i[t]){var e="function"==typeof iy&&iy;if(!n&&e)return e(t,!0);if(s)return s(t,!0);var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}var r=u[t]={exports:{}};i[t][0].call(r.exports,function(n){return c(i[t][1][n]||n)},r,r.exports,f,i,u,a)}return u[t].exports}for(var s="function"==typeof iy&&iy,n=0;n<a.length;n++)c(a[n]);return c}({1:[function(n,t,e){var o,r,i=t.exports={};function u(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(n){if(o===setTimeout)return setTimeout(n,0);if((o===u||!o)&&setTimeout)return o=setTimeout,setTimeout(n,0);try{return o(n,0)}catch(t){try{return o.call(null,n,0)}catch(t){return o.call(this,n,0)}}}!function(){try{o="function"==typeof setTimeout?setTimeout:u}catch(n){o=u}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(n){r=a}}();var s,f=[],l=!1,d=-1;function m(){l&&s&&(l=!1,s.length?f=s.concat(f):d=-1,f.length&&g())}function g(){if(!l){var n=c(m);l=!0;for(var t=f.length;t;){for(s=f,f=[];++d<t;)s&&s[d].run();d=-1,t=f.length}s=null,l=!1,function e(n){if(r===clearTimeout)return clearTimeout(n);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(n);try{return r(n)}catch(t){try{return r.call(null,n)}catch(t){return r.call(this,n)}}}(n)}}function p(n,t){this.fun=n,this.array=t}function h(){}i.nextTick=function(n){var t=new Array(arguments.length-1);if(1<arguments.length)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];f.push(new p(n,t)),1!==f.length||l||c(g)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.prependListener=h,i.prependOnceListener=h,i.listeners=function(n){return[]},i.binding=function(n){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(n){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],2:[function(n,l,t){(function(t){function o(){}function i(n){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof n)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],f(n,this)}function r(o,r){for(;3===o._state;)o=o._value;0!==o._state?(o._handled=!0,i._immediateFn(function(){var n=1===o._state?r.onFulfilled:r.onRejected;if(null!==n){var t;try{t=n(o._value)}catch(e){return void a(r.promise,e)}u(r.promise,t)}else(1===o._state?u:a)(r.promise,o._value)})):o._deferreds.push(r)}function u(n,t){try{if(t===n)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var e=t.then;if(t instanceof i)return n._state=3,n._value=t,void c(n);if("function"==typeof e)return void f(function o(n,t){return function(){n.apply(t,arguments)}}(e,t),n)}n._state=1,n._value=t,c(n)}catch(r){a(n,r)}}function a(n,t){n._state=2,n._value=t,c(n)}function c(n){2===n._state&&0===n._deferreds.length&&i._immediateFn(function(){n._handled||i._unhandledRejectionFn(n._value)});for(var t=0,e=n._deferreds.length;t<e;t++)r(n,n._deferreds[t]);n._deferreds=null}function s(n,t,e){this.onFulfilled="function"==typeof n?n:null,this.onRejected="function"==typeof t?t:null,this.promise=e}function f(n,t){var e=!1;try{n(function(n){e||(e=!0,u(t,n))},function(n){e||(e=!0,a(t,n))})}catch(o){if(e)return;e=!0,a(t,o)}}var n,e;n=this,e=setTimeout,i.prototype["catch"]=function(n){return this.then(null,n)},i.prototype.then=function(n,t){var e=new this.constructor(o);return r(this,new s(n,t,e)),e},i.all=function(n){var c=Array.prototype.slice.call(n);return new i(function(r,i){if(0===c.length)return r([]);var u=c.length;function a(t,n){try{if(n&&("object"==typeof n||"function"==typeof n)){var e=n.then;if("function"==typeof e)return void e.call(n,function(n){a(t,n)},i)}c[t]=n,0==--u&&r(c)}catch(o){i(o)}}for(var n=0;n<c.length;n++)a(n,c[n])})},i.resolve=function(t){return t&&"object"==typeof t&&t.constructor===i?t:new i(function(n){n(t)})},i.reject=function(e){return new i(function(n,t){t(e)})},i.race=function(r){return new i(function(n,t){for(var e=0,o=r.length;e<o;e++)r[e].then(n,t)})},i._immediateFn="function"==typeof t?function(n){t(n)}:function(n){e(n,0)},i._unhandledRejectionFn=function(n){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",n)},i._setImmediateFn=function(n){i._immediateFn=n},i._setUnhandledRejectionFn=function(n){i._unhandledRejectionFn=n},void 0!==l&&l.exports?l.exports=i:n.Promise||(n.Promise=i)}).call(this,n("timers").setImmediate)},{timers:3}],3:[function(c,n,s){(function(n,t){var o=c("process/browser.js").nextTick,e=Function.prototype.apply,r=Array.prototype.slice,i={},u=0;function a(n,t){this._id=n,this._clearFn=t}s.setTimeout=function(){return new a(e.call(setTimeout,window,arguments),clearTimeout)},s.setInterval=function(){return new a(e.call(setInterval,window,arguments),clearInterval)},s.clearTimeout=s.clearInterval=function(n){n.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(window,this._id)},s.enroll=function(n,t){clearTimeout(n._idleTimeoutId),n._idleTimeout=t},s.unenroll=function(n){clearTimeout(n._idleTimeoutId),n._idleTimeout=-1},s._unrefActive=s.active=function(n){clearTimeout(n._idleTimeoutId);var t=n._idleTimeout;0<=t&&(n._idleTimeoutId=setTimeout(function(){n._onTimeout&&n._onTimeout()},t))},s.setImmediate="function"==typeof n?n:function(n){var t=u++,e=!(arguments.length<2)&&r.call(arguments,1);return i[t]=!0,o(function(){i[t]&&(e?n.apply(null,e):n.call(null),s.clearImmediate(t))}),t},s.clearImmediate="function"==typeof t?t:function(n){delete i[n]}}).call(this,c("timers").setImmediate,c("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(n,t,e){var o=n("promise-polyfill"),r="undefined"!=typeof window?window:Function("return this;")();t.exports={boltExport:r.Promise||o}},{"promise-polyfill":2}]},{},[4])(4)});function Cy(n){v.setTimeout(function(){throw n},0)}function ky(n){var t=Ko(n);return vn(Py,t)}function Oy(n,t){var e=t.getRoot(n).getOr(n.element());ri(e,t.invalidClass),t.notify.each(function(t){ky(n.element())&&_r(n.element(),"aria-invalid",!1),t.getContainer(n).each(function(n){Br(n,t.validHtml)}),t.onValid(n)})}function Ty(t,n,e,o){var r=n.getRoot(t).getOr(t.element());ei(r,n.invalidClass),n.notify.each(function(n){ky(t.element())&&_r(t.element(),"aria-invalid",!0),n.getContainer(t).each(function(n){Br(n,o)}),n.onInvalid(t,o)})}function Ey(t,n,e){return n.validator.fold(function(){return Hy(an.value(!0))},function(n){return n.validate(t)})}function Dy(t,e,n){return e.notify.each(function(n){n.onValidate(t)}),Ey(t,e).map(function(n){return t.getSystem().isConnected()?n.fold(function(n){return Ty(t,e,0,n),an.error(n)},function(n){return Oy(t,e),an.value(n)}):an.error("No longer in system")})}function By(n,t,e,o){var r=Yy(n,t,e,o);return by.sketch(r)}function Ay(n,t){return by.parts().label({dom:{tag:"label",classes:["tox-label"],innerHtml:t.translate(n)}})}var _y,My,Fy=Sy.exports.boltExport,Iy=function(n){var e=on.none(),t=[],o=function(n){r()?u(n):t.push(n)},r=function(){return e.isSome()},i=function(n){bn(n,u)},u=function(t){e.each(function(n){v.setTimeout(function(){t(n)},0)})};return n(function(n){e=on.some(n),i(t),t=[]}),{get:o,map:function(e){return Iy(function(t){o(function(n){t(e(n))})})},isReady:r}},Ry={nu:Iy,pure:function(t){return Iy(function(n){n(t)})}},Vy=function(e){function n(n){e().then(n,Cy)}return{map:function(n){return Vy(function(){return e().then(n)})},bind:function(t){return Vy(function(){return e().then(function(n){return t(n).toPromise()})})},anonBind:function(n){return Vy(function(){return e().then(function(){return n.toPromise()})})},toLazy:function(){return Ry.nu(n)},toCached:function(){var n=null;return Vy(function(){return null===n&&(n=e()),n})},toPromise:e,get:n}},Ny=function(n){return Vy(function(){return new Fy(n)})},Hy=function(n){return Vy(function(){return Fy.resolve(n)})},Py=["input","textarea"],zy=/* */Object.freeze({markValid:Oy,markInvalid:Ty,query:Ey,run:Dy,isInvalid:function(n,t){var e=t.getRoot(n).getOr(n.element());return ii(e,t.invalidClass)}}),Ly=/* */Object.freeze({events:function(t,n){return t.validator.map(function(n){return tr([rr(n.onEvent,function(n){Dy(n,t).get(l)})].concat(n.validateOnLoad?[Ri(function(n){Dy(n,t).get(Z)})]:[]))}).getOr({})}}),jy=[ct("invalidClass"),St("getRoot",on.none),wt("notify",[St("aria","alert"),St("getContainer",on.none),St("validHtml",""),Ku("onValid"),Ku("onInvalid"),Ku("onValidate")]),wt("validator",[ct("validate"),St("onEvent","input"),St("validateOnLoad",!0)])],Uy=xa({fields:jy,name:"invalidating",active:Ly,apis:zy,extra:{validation:function(e){return function(n){var t=nl.getValue(n);return Hy(e(t))}}}}),Wy=/* */Object.freeze({exhibit:function(n,t){return Gr({attributes:K([{key:t.tabAttr,value:"true"}])})}}),Gy=[St("tabAttr","data-alloy-tabstop")],Xy=xa({fields:Gy,name:"tabstopping",active:Wy}),Yy=function(n,t,e,o){return{dom:qy(e),components:n.toArray().concat([t]),fieldBehaviours:ya(o)}},qy=function(n){return{tag:"div",classes:["tox-form__group"].concat(n)}},Ky=/* */Object.freeze({getCoupled:function(n,t,e,o){return e.getOrCreate(n,t,o)}}),Jy=[st("others",nt(an.value,xe()))],$y=xa({fields:Jy,name:"coupling",apis:Ky,state:/* */Object.freeze({init:function(n){var i={},t=nn({});return tu({readState:t,getOrCreate:function(e,o,r){var n=wn(o.others);if(n)return Nn(i,r).getOrThunk(function(){var n=Nn(o.others,r).getOrDie("No information found for coupled component: "+r)(e),t=e.getSystem().build(n);return i[r]=t});throw new Error("Cannot find coupled component: "+r+". Known coupled components: "+JSON.stringify(n,null,2))}})}})}),Qy=nn("sink"),Zy=nn(Cl({name:Qy(),overrides:nn({dom:{tag:"div"},behaviours:ya([_f.config({useFixed:a})]),events:tr([sr(go()),sr(uo()),sr(bo())])})}));(My=_y=_y||{})[My.HighlightFirst=0]="HighlightFirst",My[My.HighlightNone=1]="HighlightNone";function nx(n,t){var e=n.getHotspot(t).getOr(t),o=n.getAnchorOverrides();return n.layouts.fold(function(){return{anchor:"hotspot",hotspot:e,overrides:o}},function(n){return{anchor:"hotspot",hotspot:e,overrides:o,layouts:n}})}function tx(n,t,e,o,r,i,u){return function(n,t,r,e,i,o,u){var a=function(n,t,e){return(0,n.fetch)(e).map(t)}(n,t,e),c=Cw(e,n);return a.map(function(n){return n.bind(function(n){return on.from(jg.sketch(N(N({},o.menu()),{uid:Pr(""),data:n,highlightImmediately:u===_y.HighlightFirst,onOpenMenu:function(n,t){var e=c().getOrDie();_f.position(e,r,t),Lf.decloak(i)},onOpenSubmenu:function(n,t,e){var o=c().getOrDie();_f.position(o,{anchor:"submenu",item:t},e),Lf.decloak(i)},onRepositionMenu:function(n,t,e){var o=c().getOrDie();_f.position(o,r,t),bn(e,function(n){_f.position(o,{anchor:"submenu",item:n.triggeringItem},n.triggeredMenu)})},onEscape:function(){return bg.focus(e),Lf.close(i),on.some(!0)}})))})})}(n,t,nx(n,e),e,o,r,u).map(function(n){return n.fold(function(){Lf.isOpen(o)&&Lf.close(o)},function(n){Lf.cloak(o),Lf.open(o,n),i(o)}),o})}function ex(n,t,e,o,r,i,u){return Lf.close(o),Hy(o)}function ox(n,t,e,o,r,i){var u=$y.getCoupled(e,"sandbox");return(Lf.isOpen(u)?ex:tx)(n,t,e,u,o,r,i)}function rx(n,t,e){var o=nd.getCurrent(t).getOr(t),r=gu(n.element());e?li(o.element(),"min-width",r+"px"):function(n,t){Nu.set(n,t)}(o.element(),r)}function ix(n){Lf.getState(n).each(function(n){jg.repositionMenus(n)})}function ux(o,r,i){var u=Eu(),n=Cw(r,o);return{dom:{tag:"div",classes:o.sandboxClasses,attributes:{id:u.id(),role:"listbox"}},behaviours:el(o.sandboxBehaviours,[nl.config({store:{mode:"memory",initialValue:r}}),Lf.config({onOpen:function(n,t){var e=nx(o,r);u.link(r.element()),o.matchWidth&&rx(e.hotspot,t,o.useMinWidth),o.onOpen(e,n,t),i!==undefined&&i.onOpen!==undefined&&i.onOpen(n,t)},onClose:function(n,t){u.unlink(r.element()),i!==undefined&&i.onClose!==undefined&&i.onClose(n,t)},isPartOf:function(n,t,e){return ju(t,e)||ju(r,e)},getAttachPoint:function(){return n().getOrDie()}}),nd.config({find:function(n){return Lf.getState(n).bind(function(n){return nd.getCurrent(n)})}}),dc.config({channels:N(N({},Es({isExtraPart:nn(!1)})),Ds({isExtraPart:nn(!1),doReposition:ix}))})])}}function ax(n){var t=$y.getCoupled(n,"sandbox");ix(t)}function cx(){return[St("sandboxClasses",[]),tl("sandboxBehaviours",[nd,dc,Lf,nl])]}function sx(e,t,o){function r(n,t){qt(n,Bw,{value:t})}var n=by.parts().field({factory:xy,inputClasses:["tox-textfield"],onSetValue:function(n){return Uy.run(n).get(function(){})},inputBehaviours:ya([Xy.config({}),Uy.config({invalidClass:"tox-textbox-field-invalid",getRoot:function(n){return br(n.element())},notify:{onValid:function(n){var t=nl.getValue(n);qt(n,Dw,{color:t})}},validator:{validateOnLoad:!1,validate:function(n){var t=nl.getValue(n);if(0===t.length)return Hy(an.value(!0));var e=Be.fromTag("span");li(e,"background-color",t);var o=gi(e,"background-color").fold(function(){return an.error("blah")},function(n){return an.value(t)});return Hy(o)}}})]),selectOnFocus:!1}),i=e.label.map(function(n){return Ay(n,t.providers)}),u=bm(function(e,o){return Tw.sketch({dom:e.dom,components:e.components,toggleClass:"mce-active",dropdownBehaviours:ya([Ew.config({}),Xy.config({})]),layouts:e.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:o.getSink,fetch:function(t){return Ny(function(n){return e.fetch(n)}).map(function(n){return on.from(ab(Bn(Dv(Hr("menu-value"),n,function(n){e.onItemAction(t,n)},e.columns,e.presets,Ih.CLOSE_ON_EXECUTE,function(){return!1},o.providers),{movement:Bv(e.columns,e.presets)})))})},parts:{menu:Cv(0,0,e.presets)}})}({dom:{tag:"span",attributes:{"aria-label":t.providers.translate("Color swatch")}},layouts:on.some({onRtl:function(){return[aa]},onLtr:function(){return[ca]}}),components:[],fetch:Wv.getFetch(o.getColors(),o.hasCustomColors()),columns:o.getColorCols(),presets:"color",onItemAction:function(n,e){u.getOpt(n).each(function(t){"custom"===e?o.colorPicker(function(n){n.fold(function(){return Yt(t,Aw)},function(n){r(t,n),Nv(n)})},"#ffffff"):r(t,"remove"===e?"":e)})}},t));return by.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:i.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[n,u.asSpec()]}]),fieldBehaviours:ya([Jd("form-field-events",[rr(Dw,function(n,t){u.getOpt(n).each(function(n){li(n.element(),"background-color",t.event().color())}),qt(n,ay,{name:e.name})}),rr(Bw,function(t,e){by.getField(t).each(function(n){nl.setValue(n,e.event().value()),nd.getCurrent(t).each(bg.focus)})}),rr(Aw,function(t,n){by.getField(t).each(function(n){nd.getCurrent(t).each(bg.focus)})})])])})}function fx(n,t,e){return{hue:nn(n),saturation:nn(t),value:nn(e)}}function lx(n){return Cl({name:n+"-edge",overrides:function(o){return o.model.manager.edgeActions[n].fold(function(){return{}},function(e){var n=tr([ir(eo(),e,[o])]),t=tr([ir(uo(),e,[o]),ir(ao(),function(n,t){t.mouseIsDown.get()&&e(n,t)},[o])]);return{events:Iw?n:t}})}})}function dx(n){var t=n.event().raw();if(Ww){var e=t;return e.touches!==undefined&&1===e.touches.length?on.some(e.touches[0]).map(function(n){return Ru(n.clientX,n.clientY)}):on.none()}var o=t;return o.clientX!==undefined?on.some(o).map(function(n){return Ru(n.clientX,n.clientY)}):on.none()}function mx(n){return n.model.minX}function gx(n){return n.model.minY}function px(n){return n.model.minX-1}function hx(n){return n.model.minY-1}function vx(n){return n.model.maxX}function bx(n){return n.model.maxY}function yx(n){return n.model.maxX+1}function xx(n){return n.model.maxY+1}function wx(n,t,e){return t(n)-e(n)}function Sx(n){return wx(n,vx,mx)}function Cx(n){return wx(n,bx,gx)}function kx(n){return Sx(n)/2}function Ox(n){return Cx(n)/2}function Tx(n){return n.stepSize}function Ex(n){return n.snapToGrid}function Dx(n){return n.snapStart}function Bx(n){return n.rounded}function Ax(n,t){return n[t+"-edge"]!==undefined}function _x(n){return Ax(n,"left")}function Mx(n){return Ax(n,"right")}function Fx(n){return Ax(n,"top")}function Ix(n){return Ax(n,"bottom")}function Rx(n){return n.model.value.get()}function Vx(n){return{x:nn(n)}}function Nx(n){return{y:nn(n)}}function Hx(n,t){return{x:nn(n),y:nn(t)}}function Px(n,t){qt(n,Gw(),{value:t})}function zx(n,t,e,o){return n<t?n:e<n?e:n===t?t-1:Math.max(t,n-o)}function Lx(n,t,e,o){return e<n?n:n<t?t:n===e?e+1:Math.min(e,n+o)}function jx(n,t,e){return Math.max(t,Math.min(e,n))}function Ux(n){var t=n.min,e=n.max,o=n.range,r=n.value,i=n.step,u=n.snap,a=n.snapStart,c=n.rounded,s=n.hasMinEdge,f=n.hasMaxEdge,l=n.minBound,d=n.maxBound,m=n.screenRange,g=s?t-1:t,p=f?e+1:e;if(r<l)return g;if(d<r)return p;var h=function(n,t,e){return Math.min(e,Math.max(n,t))-t}(r,l,d),v=jx(h/m*o+t,g,p);return u&&t<=v&&v<=e?function(u,e,a,c,n){return n.fold(function(){var n=u-e,t=Math.round(n/c)*c;return jx(e+t,e-1,a+1)},function(n){var t=(u-n)%c,e=Math.round(t/c),o=Math.floor((u-n)/c),r=Math.floor((a-n)/c),i=n+Math.min(r,o+e)*c;return Math.max(n,i)})}(v,t,e,i,a):c?Math.round(v):v}function Wx(n){var t=n.min,e=n.max,o=n.range,r=n.value,i=n.hasMinEdge,u=n.hasMaxEdge,a=n.maxBound,c=n.maxOffset,s=n.centerMinEdge,f=n.centerMaxEdge;return r<t?i?0:s:e<r?u?a:f:(r-t)/o*c}function Gx(n){return n.element().dom().getBoundingClientRect()}function Xx(n,t){return n[t]}function Yx(n){var t=Gx(n);return Xx(t,Xw)}function qx(n){var t=Gx(n);return Xx(t,"right")}function Kx(n){var t=Gx(n);return Xx(t,"top")}function Jx(n){var t=Gx(n);return Xx(t,"bottom")}function $x(n){var t=Gx(n);return Xx(t,"width")}function Qx(n){var t=Gx(n);return Xx(t,"height")}function Zx(n,t,e){return(n+t)/2-e}function nw(n,t){var e=Gx(n),o=Gx(t),r=Xx(e,Xw),i=Xx(e,"right"),u=Xx(o,Xw);return Zx(r,i,u)}function tw(n,t){var e=Gx(n),o=Gx(t),r=Xx(e,"top"),i=Xx(e,"bottom"),u=Xx(o,"top");return Zx(r,i,u)}function ew(n,t){qt(n,Gw(),{value:t})}function ow(n){return{x:nn(n)}}function rw(n,t,e){var o={min:mx(t),max:vx(t),range:Sx(t),value:e,step:Tx(t),snap:Ex(t),snapStart:Dx(t),rounded:Bx(t),hasMinEdge:_x(t),hasMaxEdge:Mx(t),minBound:Yx(n),maxBound:qx(n),screenRange:$x(n)};return Ux(o)}function iw(e){return function(n,t){return function(n,t,e){var o=(0<n?Lx:zx)(Rx(e).x(),mx(e),vx(e),Tx(e));return ew(t,ow(o)),on.some(o)}(e,n,t).map(function(){return!0})}}function uw(n,t,e,o,r,i){var u=function(t,n,e,o,r){var i=$x(t),u=o.bind(function(n){return on.some(nw(n,t))}).getOr(0),a=r.bind(function(n){return on.some(nw(n,t))}).getOr(i),c={min:mx(n),max:vx(n),range:Sx(n),value:e,hasMinEdge:_x(n),hasMaxEdge:Mx(n),minBound:Yx(t),minOffset:0,maxBound:qx(t),maxOffset:i,centerMinEdge:u,centerMaxEdge:a};return Wx(c)}(t,i,e,o,r);return Yx(t)-Yx(n)+u}function aw(n,t){qt(n,Gw(),{value:t})}function cw(n){return{y:nn(n)}}function sw(n,t,e){var o={min:gx(t),max:bx(t),range:Cx(t),value:e,step:Tx(t),snap:Ex(t),snapStart:Dx(t),rounded:Bx(t),hasMinEdge:Fx(t),hasMaxEdge:Ix(t),minBound:Kx(n),maxBound:Jx(n),screenRange:Qx(n)};return Ux(o)}function fw(e){return function(n,t){return function(n,t,e){var o=(0<n?Lx:zx)(Rx(e).y(),gx(e),bx(e),Tx(e));return aw(t,cw(o)),on.some(o)}(e,n,t).map(function(){return!0})}}function lw(n,t,e,o,r,i){var u=function(t,n,e,o,r){var i=Qx(t),u=o.bind(function(n){return on.some(tw(n,t))}).getOr(0),a=r.bind(function(n){return on.some(tw(n,t))}).getOr(i),c={min:gx(n),max:bx(n),range:Cx(n),value:e,hasMinEdge:Fx(n),hasMaxEdge:Ix(n),minBound:Kx(t),minOffset:0,maxBound:Jx(t),maxOffset:i,centerMinEdge:u,centerMaxEdge:a};return Wx(c)}(t,i,e,o,r);return Kx(t)-Kx(n)+u}function dw(n,t){qt(n,Gw(),{value:t})}function mw(n,t){return{x:nn(n),y:nn(t)}}function gw(e,o){return function(n,t){return function(n,t,e,o){var r=0<n?Lx:zx,i=t?Rx(o).x():r(Rx(o).x(),mx(o),vx(o),Tx(o)),u=t?r(Rx(o).y(),gx(o),bx(o),Tx(o)):Rx(o).y();return dw(e,mw(i,u)),on.some(i)}(e,o,n,t).map(function(){return!0})}}function pw(n){return"<alloy.field."+n+">"}function hw(n){return function(n){return BS[n]}(n)}function vw(n,t,e){return nl.config(Bn({store:{mode:"manual",getValue:t,setValue:e}},n.map(function(n){return{store:{initialValue:n}}}).getOr({})))}function bw(n,t,e){return vw(n,function(n){return t(n.element())},function(n,t){return e(n.element(),t)})}function yw(e,t){function o(n,t){t.stop()}function r(n){return function(t,e){bn(n,function(n){n(t,e)})}}function i(n,t){if(!kh.isDisabled(n)){var e=t.event().raw();a(n,e.dataTransfer.files)}}function u(n,t){var e=t.event().raw().target.files;a(n,e)}var a=function(n,t){nl.setValue(n,function(n){var t=new RegExp("("+".jpg,.jpeg,.png,.gif".split(/\s*,\s*/).join("|")+")$","i");return C(xn(n),function(n){return t.test(n.name)})}(t)),qt(n,ay,{name:e.name})},c=bm({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:ya([Jd("input-file-events",[sr(Xt())])])}),n=e.label.map(function(n){return Ay(n,t)}),s=by.parts().field({factory:{sketch:function(n){return{uid:n.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:ya([RS([]),TS(),kh.config({}),kg.config({toggleClass:"dragenter",toggleOnExecute:!1}),Jd("dropzone-events",[rr("dragenter",r([o,kg.toggle])),rr("dragleave",r([o,kg.toggle])),rr("dragover",o),rr("drop",r([o,i])),rr(vo(),u)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:t.translate("Drop an image here")}},Xg.sketch({dom:{tag:"button",innerHtml:t.translate("Browse for an image"),styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[c.asSpec()],action:function(n){c.get(n).element().dom().click()},buttonBehaviours:ya([Xy.config({})])})]}]}}}});return By(n,s,["tox-form__group--stretched"],[])}function xw(n){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:n},behaviours:ya([bg.config({ignore:!0}),Xy.config({})])}}function ww(n,t){qt(n,go(),{raw:{which:9,shiftKey:t}})}function Sw(n,t){var e=LS&&n.sandboxed,o=N(N({},n.label.map(function(n){return{title:n}}).getOr({})),e?{sandbox:"allow-scripts allow-same-origin"}:{}),r=function(o){var r=Ee("");return{getValue:function(n){return r.get()},setValue:function(n,t){if(o)_r(n.element(),"srcdoc",t);else{_r(n.element(),"src","javascript:''");var e=n.element().dom().contentWindow.document;e.open(),e.write(t),e.close()}r.set(t)}}}(e),i=n.label.map(function(n){return Ay(n,t)}),u=by.parts().field({factory:{sketch:function(n){return zS({uid:n.uid,dom:{tag:"iframe",attributes:o},behaviours:ya([Xy.config({}),bg.config({}),FS(on.none(),r.getValue,r.setValue)])})}}});return By(i,u,["tox-form__group--stretched"],[])}var Cw=function(t,n){return t.getSystem().getByUid(n.uid+"-"+Qy()).map(function(n){return function(){return an.value(n)}}).getOrThunk(function(){return n.lazySink.fold(function(){return function(){return an.error(new Error("No internal sink is specified, nor could an external sink be found"))}},function(n){return function(){return n(t)}})})},kw=nn([ct("dom"),ct("fetch"),Ku("onOpen"),Ju("onExecute"),St("getHotspot",on.some),St("getAnchorOverrides",nn({})),St("layouts",on.none()),Is("dropdownBehaviours",[kg,$y,dg,bg]),ct("toggleClass"),St("eventOrder",{}),ht("lazySink"),St("matchWidth",!1),St("useMinWidth",!1),ht("role")].concat(cx())),Ow=nn([Sl({schema:[Xu()],name:"menu",defaults:function(n){return{onExecute:n.onExecute}}}),Zy()]),Tw=_l({name:"Dropdown",configFields:kw(),partFields:Ow(),factory:function(t,n,e,o){function r(n){Lf.getState(n).each(function(n){jg.highlightPrimary(n)})}function i(n,t){return Kt(n),on.some(!0)}var u,a,c={expand:function(n){kg.isOn(n)||ox(t,function(n){return n},n,o,Z,_y.HighlightNone).get(Z)},open:function(n){kg.isOn(n)||ox(t,function(n){return n},n,o,Z,_y.HighlightFirst).get(Z)},isOpen:kg.isOn,close:function(n){kg.isOn(n)&&ox(t,function(n){return n},n,o,Z,_y.HighlightFirst).get(Z)},repositionMenus:function(n){kg.isOn(n)&&ax(n)}};return{uid:t.uid,dom:t.dom,components:n,behaviours:Vs(t.dropdownBehaviours,[kg.config({toggleClass:t.toggleClass,aria:{mode:"expanded"}}),$y.config({others:{sandbox:function(n){return ux(t,n,{onOpen:function(){kg.on(n)},onClose:function(){kg.off(n)}})}}}),dg.config({mode:"special",onSpace:i,onEnter:i,onDown:function(n,t){if(Tw.isOpen(n)){var e=$y.getCoupled(n,"sandbox");r(e)}else Tw.open(n);return on.some(!0)},onEscape:function(n,t){return Tw.isOpen(n)?(Tw.close(n),on.some(!0)):on.none()}}),bg.config({})]),events:im(on.some(function(n){ox(t,function(n){return n},n,o,r,_y.HighlightFirst).get(Z)})),eventOrder:N(N({},t.eventOrder),(u={},u[To()]=["disabling","toggling","alloy.base.behaviour"],u)),apis:c,domModification:{attributes:N(N({"aria-haspopup":"true"},t.role.fold(function(){return{}},function(n){return{role:n}})),"button"===t.dom.tag?{type:(a="type",Nn(t.dom,"attributes").bind(function(n){return Nn(n,a)})).getOr("button")}:{})}}},apis:{open:function(n,t){return n.open(t)},expand:function(n,t){return n.expand(t)},close:function(n,t){return n.close(t)},isOpen:function(n,t){return n.isOpen(t)},repositionMenus:function(n,t){return n.repositionMenus(t)}}}),Ew=xa({fields:[],name:"unselecting",active:/* */Object.freeze({events:function(n){return tr([er(xo(),nn(!0))])},exhibit:function(n,t){return Gr({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})}})}),Dw=Hr("color-input-change"),Bw=Hr("color-swatch-change"),Aw=Hr("color-picker-cancel"),_w=nn(Hr("rgb-hex-update")),Mw=nn(Hr("slider-update")),Fw=nn(Hr("palette-update")),Iw=Ht().deviceType.isTouch(),Rw=Cl({schema:[ct("dom")],name:"label"}),Vw=lx("top-left"),Nw=lx("top"),Hw=lx("top-right"),Pw=lx("right"),zw=lx("bottom-right"),Lw=lx("bottom"),jw=lx("bottom-left"),Uw=[Rw,lx("left"),Pw,Nw,Lw,Vw,Hw,jw,zw,wl({name:"thumb",defaults:nn({dom:{styles:{position:"absolute"}}}),overrides:function(n){return{events:tr([ar(eo(),n,"spectrum"),ar(oo(),n,"spectrum"),ar(ro(),n,"spectrum"),ar(uo(),n,"spectrum"),ar(ao(),n,"spectrum"),ar(so(),n,"spectrum")])}}}),wl({schema:[At("mouseIsDown",function(){return Ee(!1)})],name:"spectrum",overrides:function(e){function o(t,n){return r.getValueFromEvent(n).map(function(n){return r.setValueFrom(t,e,n)})}var r=e.model.manager,n=tr([rr(eo(),o),rr(oo(),o)]),t=tr([rr(uo(),o),rr(ao(),function(n,t){e.mouseIsDown.get()&&o(n,t)})]);return{behaviours:ya(Iw?[]:[dg.config({mode:"special",onLeft:function(n){return r.onLeft(n,e)},onRight:function(n){return r.onRight(n,e)},onUp:function(n){return r.onUp(n,e)},onDown:function(n){return r.onDown(n,e)}}),bg.config({})]),events:Iw?n:t}}})],Ww=Ht().deviceType.isTouch(),Gw=nn("slider.change.value"),Xw="left",Yw=iw(-1),qw=iw(1),Kw=on.none,Jw=on.none,$w={"top-left":on.none(),top:on.none(),"top-right":on.none(),right:on.some(function(n,t){Px(n,Vx(yx(t)))}),"bottom-right":on.none(),bottom:on.none(),"bottom-left":on.none(),left:on.some(function(n,t){Px(n,Vx(px(t)))})},Qw=/* */Object.freeze({setValueFrom:function(n,t,e){var o=rw(n,t,e),r=ow(o);return ew(n,r),o},setToMin:function(n,t){var e=mx(t);ew(n,ow(e))},setToMax:function(n,t){var e=vx(t);ew(n,ow(e))},findValueOfOffset:rw,getValueFromEvent:function(n){return dx(n).map(function(n){return n.left()})},findPositionOfValue:uw,setPositionFromValue:function(n,t,e,o){var r=Rx(e),i=uw(n,o.getSpectrum(n),r.x(),o.getLeftEdge(n),o.getRightEdge(n),e),u=gu(t.element())/2;li(t.element(),"left",i-u+"px")},onLeft:Yw,onRight:qw,onUp:Kw,onDown:Jw,edgeActions:$w}),Zw=on.none,nS=on.none,tS=fw(-1),eS=fw(1),oS={"top-left":on.none(),top:on.some(function(n,t){Px(n,Nx(hx(t)))}),"top-right":on.none(),right:on.none(),"bottom-right":on.none(),bottom:on.some(function(n,t){Px(n,Nx(xx(t)))}),"bottom-left":on.none(),left:on.none()},rS=/* */Object.freeze({setValueFrom:function(n,t,e){var o=sw(n,t,e),r=cw(o);return aw(n,r),o},setToMin:function(n,t){var e=gx(t);aw(n,cw(e))},setToMax:function(n,t){var e=bx(t);aw(n,cw(e))},findValueOfOffset:sw,getValueFromEvent:function(n){return dx(n).map(function(n){return n.top()})},findPositionOfValue:lw,setPositionFromValue:function(n,t,e,o){var r=Rx(e),i=lw(n,o.getSpectrum(n),r.y(),o.getTopEdge(n),o.getBottomEdge(n),e),u=fu(t.element())/2;li(t.element(),"top",i-u+"px")},onLeft:Zw,onRight:nS,onUp:tS,onDown:eS,edgeActions:oS}),iS=gw(-1,!1),uS=gw(1,!1),aS=gw(-1,!0),cS=gw(1,!0),sS={"top-left":on.some(function(n,t){Px(n,Hx(px(t),hx(t)))}),top:on.some(function(n,t){Px(n,Hx(kx(t),hx(t)))}),"top-right":on.some(function(n,t){Px(n,Hx(yx(t),hx(t)))}),right:on.some(function(n,t){Px(n,Hx(yx(t),Ox(t)))}),"bottom-right":on.some(function(n,t){Px(n,Hx(yx(t),xx(t)))}),bottom:on.some(function(n,t){Px(n,Hx(kx(t),xx(t)))}),"bottom-left":on.some(function(n,t){Px(n,Hx(px(t),xx(t)))}),left:on.some(function(n,t){Px(n,Hx(px(t),Ox(t)))})},fS=/* */Object.freeze({setValueFrom:function(n,t,e){var o=rw(n,t,e.left()),r=sw(n,t,e.top()),i=mw(o,r);return dw(n,i),i},setToMin:function(n,t){var e=mx(t),o=gx(t);dw(n,mw(e,o))},setToMax:function(n,t){var e=vx(t),o=bx(t);dw(n,mw(e,o))},getValueFromEvent:function(n){return dx(n)},setPositionFromValue:function(n,t,e,o){var r=Rx(e),i=uw(n,o.getSpectrum(n),r.x(),o.getLeftEdge(n),o.getRightEdge(n),e),u=lw(n,o.getSpectrum(n),r.y(),o.getTopEdge(n),o.getBottomEdge(n),e),a=gu(t.element())/2,c=fu(t.element())/2;li(t.element(),"left",i-a+"px"),li(t.element(),"top",u-c+"px")},onLeft:iS,onRight:uS,onUp:aS,onDown:cS,edgeActions:sS}),lS=Ht().deviceType.isTouch(),dS=[St("stepSize",1),St("onChange",Z),St("onChoose",Z),St("onInit",Z),St("onDragStart",Z),St("onDragEnd",Z),St("snapToGrid",!1),St("rounded",!0),ht("snapStart"),st("model",it("mode",{x:[St("minX",0),St("maxX",100),At("value",function(n){return Ee(n.mode.minX)}),ct("getInitialValue"),Zu("manager",Qw)],y:[St("minY",0),St("maxY",100),At("value",function(n){return Ee(n.mode.minY)}),ct("getInitialValue"),Zu("manager",rS)],xy:[St("minX",0),St("maxX",100),St("minY",0),St("maxY",100),At("value",function(n){return Ee({x:nn(n.mode.minX),y:nn(n.mode.minY)})}),ct("getInitialValue"),Zu("manager",fS)]})),Is("sliderBehaviours",[dg,nl])].concat(lS?[]:[At("mouseIsDown",function(){return Ee(!1)})]),mS=Ht().deviceType.isTouch(),gS=_l({name:"Slider",configFields:dS,partFields:Uw,factory:function(i,n,t,e){function u(n){return Js(n,i,"thumb")}function a(n){return Js(n,i,"spectrum")}function o(n){return Ks(n,i,"left-edge")}function r(n){return Ks(n,i,"right-edge")}function c(n){return Ks(n,i,"top-edge")}function s(n){return Ks(n,i,"bottom-edge")}function f(n,t){m.setPositionFromValue(n,t,i,{getLeftEdge:o,getRightEdge:r,getTopEdge:c,getBottomEdge:s,getSpectrum:a})}function l(n,t){d.value.set(t);var e=u(n);return f(n,e),i.onChange(n,e,t),on.some(!0)}var d=i.model,m=d.manager,g=[rr(eo(),function(n,t){i.onDragStart(n,u(n))}),rr(ro(),function(n,t){i.onDragEnd(n,u(n))})],p=[rr(uo(),function(n,t){t.stop(),i.onDragStart(n,u(n)),i.mouseIsDown.set(!0)}),rr(so(),function(n,t){i.onDragEnd(n,u(n))})],h=mS?g:p;return{uid:i.uid,dom:i.dom,components:n,behaviours:Vs(i.sliderBehaviours,H([mS?[]:[dg.config({mode:"special",focusIn:function(n){return Ks(n,i,"spectrum").map(dg.focusIn).map(nn(!0))}})],[nl.config({store:{mode:"manual",getValue:function(n){return d.value.get()}}}),dc.config({channels:{"mouse.released":{onReceive:function(e,n){function t(){Ks(e,i,"thumb").each(function(n){var t=d.value.get();i.onChoose(e,n,t)})}if(mS)t();else{var o=i.mouseIsDown.get();i.mouseIsDown.set(!1),o&&t()}}}}})]])),events:tr([rr(Gw(),function(n,t){l(n,t.event().value())}),Ri(function(n,t){var e=d.getInitialValue();d.value.set(e);var o=u(n);f(n,o);var r=a(n);i.onInit(n,o,r,d.value.get())})].concat(h)),apis:{resetToMin:function(n){m.setToMin(n,i)},resetToMax:function(n){m.setToMax(n,i)},changeValue:l,refresh:f},domModification:{styles:{position:"relative"}}}},apis:{resetToMin:function(n,t){n.resetToMin(t)},resetToMax:function(n,t){n.resetToMax(t)},refresh:function(n,t){n.refresh(t)}}}),pS=function(n,t){var e=gS.parts().spectrum({dom:{tag:"div",classes:[t("hue-slider-spectrum")],attributes:{role:"presentation"}}}),o=gS.parts().thumb({dom:{tag:"div",classes:[t("hue-slider-thumb")],attributes:{role:"presentation"}}});return gS.sketch({dom:{tag:"div",classes:[t("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:nn({y:nn(0)})},components:[e,o],sliderBehaviours:ya([bg.config({})]),onChange:function(n,t,e){qt(n,Mw(),{value:e})}})},hS=[Is("formBehaviours",[nl])],vS=function(o,n,t){return{uid:o.uid,dom:o.dom,components:n,behaviours:Vs(o.formBehaviours,[nl.config({store:{mode:"manual",getValue:function(n){var t=Qs(n,o);return P(t,function(n,t){return n().bind(function(n){return function(n,t){return n.fold(function(){return an.error(t)},an.value)}(nd.getCurrent(n),"missing current")}).map(nl.getValue)})},setValue:function(e,n){Cn(n,function(t,n){Ks(e,o,n).each(function(n){nd.getCurrent(n).each(function(n){nl.setValue(n,t)})})})}}})]),apis:{getField:function(n,t){return Ks(n,o,t).bind(nd.getCurrent)}}}},bS={getField:Ur(function(n,t,e){return n.getField(t,e)}),sketch:function(n){var e,t=(e=[],{field:function(n,t){return e.push(n),Ws("form",pw(n),t)},record:function(){return e}}),o=n(t),r=t.record(),i=S(r,function(n){return wl({name:n,pname:pw(n)})});return rf("form",hS,i,vS,o)}},yS=Hr("valid-input"),xS=Hr("invalid-input"),wS=Hr("validating-input"),SS="colorcustom.rgb.",CS=function(d,m,g,p){function h(n,t,e,o,r){var i=d(SS+"range"),u=[by.parts().label({dom:{tag:"label",innerHtml:e,attributes:{"aria-label":o}}}),by.parts().field({data:r,factory:xy,inputAttributes:N({type:"text"},"hex"===t?{"aria-live":"polite"}:{}),inputClasses:[m("textfield")],inputBehaviours:ya([function(t,o){return Uy.config({invalidClass:m("invalid"),notify:{onValidate:function(n){qt(n,wS,{type:t})},onValid:function(n){qt(n,yS,{type:t,value:nl.getValue(n)})},onInvalid:function(n){qt(n,xS,{type:t,value:nl.getValue(n)})}},validator:{validate:function(n){var t=nl.getValue(n),e=o(t)?an.value(!0):an.error(d("aria.input.invalid"));return Hy(e)},validateOnLoad:!1}})}(t,n),Xy.config({})]),onSetValue:function(n){Uy.isInvalid(n)&&Uy.run(n).get(Z)}})],a="hex"!==t?[by.parts()["aria-descriptor"]({text:i})]:[];return{dom:{tag:"div",attributes:{role:"presentation"}},components:u.concat(a)}}function v(n,t){var e=t.red(),o=t.green(),r=t.blue();nl.setValue(n,{red:e,green:o,blue:r})}function b(n,t){y.getOpt(n).each(function(n){li(n.element(),"background-color","#"+t.value())})}var y=bm({dom:{tag:"div",classes:[m("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}});return Al({factory:function(){function r(n){return u[n]().get()}function i(n,t){u[n]().set(t)}function t(n,t){var e=t.event();"hex"!==e.type()?i(e.type(),on.none()):p(n)}function o(e,n,t){var o=parseInt(t,10);i(n,on.some(o)),r("red").bind(function(e){return r("green").bind(function(t){return r("blue").map(function(n){return Gh(e,t,n,1)})})}).each(function(n){var t=function(t,n){var e=Wh(n);return bS.getField(t,"hex").each(function(n){bg.isFocused(n)||nl.setValue(t,{hex:e.value()})}),e}(e,n);b(e,t)})}function e(n,t){var e=t.event();!function(n){return"hex"===n.type()}(e)?o(n,e.type(),e.value()):function(n,t){g(n);var e=zh(t);i("hex",on.some(t));var o=qh(e);v(n,o),a(o),qt(n,_w(),{hex:e}),b(n,e)}(n,e.value())}function n(n){return{label:d(SS+n+".label"),description:d(SS+n+".description")}}var u={red:nn(Ee(on.some(255))),green:nn(Ee(on.some(255))),blue:nn(Ee(on.some(255))),hex:nn(Ee(on.some("ffffff")))},a=function(n){var t=n.red(),e=n.green(),o=n.blue();i("red",on.some(t)),i("green",on.some(e)),i("blue",on.some(o))},c=n("red"),s=n("green"),f=n("blue"),l=n("hex");return Bn(bS.sketch(function(n){return{dom:{tag:"form",classes:[m("rgb-form")],attributes:{"aria-label":d("aria.color.picker")}},components:[n.field("red",by.sketch(h(Xh,"red",c.label,c.description,255))),n.field("green",by.sketch(h(Xh,"green",s.label,s.description,255))),n.field("blue",by.sketch(h(Xh,"blue",f.label,f.description,255))),n.field("hex",by.sketch(h(Lh,"hex",l.label,l.description,"ffffff"))),y.asSpec()],formBehaviours:ya([Uy.config({invalidClass:m("form-invalid")}),Jd("rgb-form-events",[rr(yS,e),rr(xS,t),rr(wS,t)])])}}),{apis:{updateHex:function(n,t){nl.setValue(n,{hex:t.value()}),function(n,t){var e=qh(t);v(n,e),a(e)}(n,t),b(n,t)}}})},name:"RgbForm",configFields:[],apis:{updateHex:function(n,t,e){n.updateHex(t,e)}},extraApis:{}})},kS=function(n,o){function r(n,t){var e=n.width,o=n.height,r=n.getContext("2d");if(null!==r){r.fillStyle=t,r.fillRect(0,0,e,o);var i=r.createLinearGradient(0,0,e,0);i.addColorStop(0,"rgba(255,255,255,1)"),i.addColorStop(1,"rgba(255,255,255,0)"),r.fillStyle=i,r.fillRect(0,0,e,o);var u=r.createLinearGradient(0,0,0,o);u.addColorStop(0,"rgba(0,0,0,0)"),u.addColorStop(1,"rgba(0,0,0,1)"),r.fillStyle=u,r.fillRect(0,0,e,o)}}var i=gS.parts().spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[o("sv-palette-spectrum")]}}),u=gS.parts().thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[o("sv-palette-thumb")],innerHtml:"<div class="+o("sv-palette-inner-thumb")+' role="presentation"></div>'}});return Al({factory:function(n){var t=nn({x:nn(0),y:nn(0)}),e=ya([nd.config({find:on.some}),bg.config({})]);return gS.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[o("sv-palette")]},model:{mode:"xy",getInitialValue:t},rounded:!1,components:[i,u],onChange:function(n,t,e){qt(n,Fw(),{value:e})},onInit:function(n,t,e,o){r(e.element().dom(),Jh(rv()))},sliderBehaviours:e})},name:"SaturationBrightnessPalette",configFields:[],apis:{setRgba:function(n,t,e){!function(n,t){var e=n.components()[0].element().dom();r(e,Jh(t))}(t,e)}},extraApis:{}})},OS=function(l,d){return Al({name:"ColourPicker",configFields:[ct("dom"),St("onValidHex",Z),St("onInvalidHex",Z)],factory:function(n){function t(n,e){u.getOpt(n).each(function(n){var t=qh(e);s.paletteRgba().set(t),i.setRgba(n,t)})}function e(n,t){f.getOpt(n).each(function(n){r.updateHex(n,t)})}function a(t,e,n){bn(n,function(n){n(t,e)})}var o,c,r=CS(l,d,n.onValidHex,n.onInvalidHex),i=kS(l,d),s={paletteRgba:nn(Ee(rv()))},u=bm(i.sketch({})),f=bm(r.sketch({}));return{uid:n.uid,dom:n.dom,components:[u.asSpec(),pS(l,d),f.asSpec()],behaviours:ya([Jd("colour-picker-events",[rr(Fw(),(c=[e],function(n,t){var e=t.event().value(),o=function(n){var t,e=0,o=0,r=n.red()/255,i=n.green()/255,u=n.blue()/255,a=Math.min(r,Math.min(i,u)),c=Math.max(r,Math.max(i,u));return a===c?fx(0,0,100*(o=a)):(e=60*((e=r===a?3:u===a?1:5)-(r===a?i-u:u===a?r-i:u-r)/(c-a)),t=(c-a)/c,o=c,fx(Math.round(e),Math.round(100*t),Math.round(100*o)))}(s.paletteRgba().get()),r=fx(o.hue(),e.x(),100-e.y()),i=Yh(r),u=Wh(i);a(n,u,c)})),rr(Mw(),(o=[t,e],function(n,t){var e=function(n){var t=fx((100-n)/100*360,100,100),e=Yh(t);return Wh(e)}(t.event().value().y());a(n,e,o)}))]),nd.config({find:function(n){return f.getOpt(n)}}),dg.config({mode:"acyclic"})])}}})},TS=function(){return nd.config({find:on.some})},ES=function(n){return nd.config({find:n.getOpt})},DS=function(n){return nd.config({find:function(t){return wr(t.element(),n).bind(function(n){return t.getSystem().getByDom(n).toOption()})}})},BS={"colorcustom.rgb.red.label":"R","colorcustom.rgb.red.description":"Red component","colorcustom.rgb.green.label":"G","colorcustom.rgb.green.description":"Green component","colorcustom.rgb.blue.label":"B","colorcustom.rgb.blue.description":"Blue component","colorcustom.rgb.hex.label":"#","colorcustom.rgb.hex.description":"Hex color code","colorcustom.rgb.range":"Range 0 to 255","colorcustom.sb.saturation":"Saturation","colorcustom.sb.brightness":"Brightness","colorcustom.sb.picker":"Saturation and Brightness Picker","colorcustom.sb.palette":"Saturation and Brightness Palette","colorcustom.sb.instructions":"Use arrow keys to select saturation and brightness, on x and y axes","colorcustom.hue.hue":"Hue","colorcustom.hue.slider":"Hue Slider","colorcustom.hue.palette":"Hue Palette","colorcustom.hue.instructions":"Use arrow keys to select a hue","aria.color.picker":"Color Picker","aria.input.invalid":"Invalid input"},AS=tinymce.util.Tools.resolve("tinymce.Resource"),_S=de([St("preprocess",l),St("postprocess",l)]),MS=function(r,n){var i=ot("RepresentingConfigs.memento processors",_S,n);return nl.config({store:{mode:"manual",getValue:function(n){var t=r.get(n),e=nl.getValue(t);return i.postprocess(e)},setValue:function(n,t){var e=i.preprocess(t),o=r.get(n);nl.setValue(o,e)}}})},FS=vw,IS=function(n){return bw(n,Dr,Br)},RS=function(n){return nl.config({store:{mode:"memory",initialValue:n}})},VS=Hr("alloy-fake-before-tabstop"),NS=Hr("alloy-fake-after-tabstop"),HS=function(n){return db(n,["."+VS,"."+NS].join(","),nn(!1))},PS=function(n,t){var e=t.element();ii(e,VS)?ww(n,!0):ii(e,NS)&&ww(n,!1)},zS=function(n){return{dom:{tag:"div",classes:["tox-navobj"]},components:[xw([VS]),n,xw([NS])],behaviours:ya([DS(1)])}},LS=!(Ht().browser.isIE()||Ht().browser.isEdge());function jS(n,t){return GS(v.document.createElement("canvas"),n,t)}function US(n){var t=jS(n.width,n.height);return WS(t).drawImage(n,0,0),t}function WS(n){return n.getContext("2d")}function GS(n,t,e){return n.width=t,n.height=e,n}function XS(n){return n.naturalWidth||n.width}function YS(n){return n.naturalHeight||n.height}var qS,KS,JS=window.Promise?window.Promise:(qS=$S.immediateFn||"function"==typeof window.setImmediate&&window.setImmediate||function(n){v.setTimeout(n,1)},KS=Array.isArray||function(n){return"[object Array]"===Object.prototype.toString.call(n)},$S.prototype["catch"]=function(n){return this.then(null,n)},$S.prototype.then=function(e,o){var r=this;return new $S(function(n,t){ZS.call(r,new oC(e,o,n,t))})},$S.all=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var c=Array.prototype.slice.call(1===n.length&&KS(n[0])?n[0]:n);return new $S(function(r,i){if(0===c.length)return r([]);var u=c.length;function a(t,n){try{if(n&&("object"==typeof n||"function"==typeof n)){var e=n.then;if("function"==typeof e)return void e.call(n,function(n){a(t,n)},i)}c[t]=n,0==--u&&r(c)}catch(o){i(o)}}for(var n=0;n<c.length;n++)a(n,c[n])})},$S.resolve=function(t){return t&&"object"==typeof t&&t.constructor===$S?t:new $S(function(n){n(t)})},$S.reject=function(e){return new $S(function(n,t){t(e)})},$S.race=function(r){return new $S(function(n,t){for(var e=0,o=r;e<o.length;e++)o[e].then(n,t)})},$S);function $S(n){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof n)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],rC(n,QS(nC,this),QS(tC,this))}function QS(n,t){return function(){return n.apply(t,arguments)}}function ZS(o){var r=this;null!==this._state?qS(function(){var n=r._state?o.onFulfilled:o.onRejected;if(null!==n){var t;try{t=n(r._value)}catch(e){return void o.reject(e)}o.resolve(t)}else(r._state?o.resolve:o.reject)(r._value)}):this._deferreds.push(o)}function nC(n){try{if(n===this)throw new TypeError("A promise cannot be resolved with itself.");if(n&&("object"==typeof n||"function"==typeof n)){var t=n.then;if("function"==typeof t)return void rC(QS(t,n),QS(nC,this),QS(tC,this))}this._state=!0,this._value=n,eC.call(this)}catch(e){tC.call(this,e)}}function tC(n){this._state=!1,this._value=n,eC.call(this)}function eC(){for(var n=0,t=this._deferreds;n<t.length;n++){var e=t[n];ZS.call(this,e)}this._deferreds=[]}function oC(n,t,e,o){this.onFulfilled="function"==typeof n?n:null,this.onRejected="function"==typeof t?t:null,this.resolve=e,this.reject=o}function rC(n,t,e){var o=!1;try{n(function(n){o||(o=!0,t(n))},function(n){o||(o=!0,e(n))})}catch(r){if(o)return;o=!0,e(r)}}function iC(e){return new JS(function(n,t){(function p(n){var t=n.split(","),e=/data:([^;]+)/.exec(t[0]);if(!e)return on.none();for(var o=e[1],r=t[1],i=v.atob(r),u=i.length,a=Math.ceil(u/1024),c=new Array(a),s=0;s<a;++s){for(var f=1024*s,l=Math.min(1024+f,u),d=new Array(l-f),m=f,g=0;m<l;++g,++m)d[g]=i[m].charCodeAt(0);c[s]=new Uint8Array(d)}return on.some(new v.Blob(c,{type:o}))})(e).fold(function(){t("uri is not base64: "+e)},n)})}function uC(n,o,r){return o=o||"image/png",v.HTMLCanvasElement.prototype.toBlob?new JS(function(t,e){n.toBlob(function(n){n?t(n):e()},o,r)}):iC(n.toDataURL(o,r))}function aC(n){return function t(a){return new JS(function(n,t){var e=v.URL.createObjectURL(a),o=new v.Image,r=function(){o.removeEventListener("load",i),o.removeEventListener("error",u)};function i(){r(),n(o)}function u(){r(),t("Unable to load data of type "+a.type+": "+e)}o.addEventListener("load",i),o.addEventListener("error",u),o.src=e,o.complete&&i()})}(n).then(function(n){!function e(n){v.URL.revokeObjectURL(n.src)}(n);var t=jS(XS(n),YS(n));return WS(t).drawImage(n,0,0),t})}function cC(n,t,e){var o=t.type;function r(t,e){return n.then(function(n){return function o(n,t,e){return t=t||"image/png",n.toDataURL(t,e)}(n,t,e)})}return{getType:nn(o),toBlob:function i(){return JS.resolve(t)},toDataURL:function u(){return e},toBase64:function a(){return e.split(",")[1]},toAdjustedBlob:function c(t,e){return n.then(function(n){return uC(n,t,e)})},toAdjustedDataURL:r,toAdjustedBase64:function s(n,t){return r(n,t).then(function(n){return n.split(",")[1]})},toCanvas:function f(){return n.then(US)}}}function sC(t){return function n(e){return new JS(function(n){var t=new v.FileReader;t.onloadend=function(){n(t.result)},t.readAsDataURL(e)})}(t).then(function(n){return cC(aC(t),t,n)})}function fC(t,n){return uC(t,n).then(function(n){return cC(JS.resolve(t),n,t.toDataURL())})}function lC(n,t,e){var o="string"==typeof n?parseFloat(n):n;return e<o?o=e:o<t&&(o=t),o}var dC=[0,.01,.02,.04,.05,.06,.07,.08,.1,.11,.12,.14,.15,.16,.17,.18,.2,.21,.22,.24,.25,.27,.28,.3,.32,.34,.36,.38,.4,.42,.44,.46,.48,.5,.53,.56,.59,.62,.65,.68,.71,.74,.77,.8,.83,.86,.89,.92,.95,.98,1,1.06,1.12,1.18,1.24,1.3,1.36,1.42,1.48,1.54,1.6,1.66,1.72,1.78,1.84,1.9,1.96,2,2.12,2.25,2.37,2.5,2.62,2.75,2.87,3,3.2,3.4,3.6,3.8,4,4.3,4.7,4.9,5,5.5,6,6.5,6.8,7,7.3,7.5,7.8,8,8.4,8.7,9,9.4,9.6,9.8,10];function mC(n,t){for(var e,o=[],r=new Array(25),i=0;i<5;i++){for(var u=0;u<5;u++)o[u]=t[u+5*i];for(u=0;u<5;u++){for(var a=e=0;a<5;a++)e+=n[u+5*a]*o[a];r[u+5*i]=e}}return r}function gC(t,e){return t.toCanvas().then(function(n){return function i(n,t,e){var o=WS(n);var r=function D(n,t){for(var e,o,r,i,u=n.data,a=t[0],c=t[1],s=t[2],f=t[3],l=t[4],d=t[5],m=t[6],g=t[7],p=t[8],h=t[9],v=t[10],b=t[11],y=t[12],x=t[13],w=t[14],S=t[15],C=t[16],k=t[17],O=t[18],T=t[19],E=0;E<u.length;E+=4)e=u[E],o=u[E+1],r=u[E+2],i=u[E+3],u[E]=e*a+o*c+r*s+i*f+l,u[E+1]=e*d+o*m+r*g+i*p+h,u[E+2]=e*v+o*b+r*y+i*x+w,u[E+3]=e*S+o*C+r*k+i*O+T;return n}(o.getImageData(0,0,n.width,n.height),e);return o.putImageData(r,0,0),fC(n,t)}(n,t.getType(),e)})}function pC(t,e){return t.toCanvas().then(function(n){return function u(n,t,e){var o=WS(n);var r=o.getImageData(0,0,n.width,n.height),i=o.getImageData(0,0,n.width,n.height);return i=function w(n,t,e){function o(n,t,e){return e<n?n=e:n<t&&(n=t),n}for(var r=Math.round(Math.sqrt(e.length)),i=Math.floor(r/2),u=n.data,a=t.data,c=n.width,s=n.height,f=0;f<s;f++)for(var l=0;l<c;l++){for(var d=0,m=0,g=0,p=0;p<r;p++)for(var h=0;h<r;h++){var v=o(l+h-i,0,c-1),b=4*(o(f+p-i,0,s-1)*c+v),y=e[p*r+h];d+=u[b]*y,m+=u[1+b]*y,g+=u[2+b]*y}var x=4*(f*c+l);a[x]=o(d,0,255),a[1+x]=o(m,0,255),a[2+x]=o(g,0,255)}return t}(r,i,e),o.putImageData(i,0,0),fC(n,t)}(n,t.getType(),e)})}function hC(e){return function(n,t){return gC(n,e([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1],t))}}function vC(n,t,e,o){return gC(n,function r(n,t,e,o){return mC(n,[t=lC(t,0,2),0,0,0,0,0,e=lC(e,0,2),0,0,0,0,0,o=lC(o,0,2),0,0,0,0,0,1,0,0,0,0,0,1])}([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1],t,e,o))}var bC=function sI(t){return function(n){return gC(n,t)}}([-1,0,0,0,255,0,-1,0,0,255,0,0,-1,0,255,0,0,0,1,0,0,0,0,0,1]),yC=hC(function fI(n,t){return mC(n,[1,0,0,0,t=lC(255*t,-255,255),0,1,0,0,t,0,0,1,0,t,0,0,0,1,0,0,0,0,0,1])}),xC=hC(function lI(n,t){var e;return t=lC(t,-1,1),mC(n,[(e=(t*=100)<0?127+t/100*127:127*(e=0===(e=t%1)?dC[t]:dC[Math.floor(t)]*(1-e)+dC[Math.floor(t)+1]*e)+127)/127,0,0,0,.5*(127-e),0,e/127,0,0,.5*(127-e),0,0,e/127,0,.5*(127-e),0,0,0,1,0,0,0,0,0,1])}),wC=function dI(t){return function(n){return pC(n,t)}}([0,-1,0,-1,5,-1,0,-1,0]),SC=function mI(c){return function(t,e){return t.toCanvas().then(function(n){return function(n,t,e){var o=WS(n),r=new Array(256);for(var i=0;i<r.length;i++)r[i]=c(i,e);var u=function a(n,t){for(var e=n.data,o=0;o<e.length;o+=4)e[o]=t[e[o]],e[o+1]=t[e[o+1]],e[o+2]=t[e[o+2]];return n}(o.getImageData(0,0,n.width,n.height),r);return o.putImageData(u,0,0),fC(n,t)}(n,t.getType(),e)})}}(function(n,t){return 255*Math.pow(n/255,1-t)});function CC(n,t,e){var o=XS(n),r=YS(n),i=t/o,u=e/r,a=!1;(i<.5||2<i)&&(i=i<.5?.5:2,a=!0),(u<.5||2<u)&&(u=u<.5?.5:2,a=!0);var c=function s(u,a,c){return new JS(function(n){var t=XS(u),e=YS(u),o=Math.floor(t*a),r=Math.floor(e*c),i=jS(o,r);WS(i).drawImage(u,0,0,t,e,0,0,o,r),n(i)})}(n,i,u);return a?c.then(function(n){return CC(n,t,e)}):c}function kC(t,e){return t.toCanvas().then(function(n){return function a(n,t,e){var o=jS(n.width,n.height),r=WS(o),i=0,u=0;90!==(e=e<0?360+e:e)&&270!==e||GS(o,o.height,o.width);90!==e&&180!==e||(i=o.width);270!==e&&180!==e||(u=o.height);return r.translate(i,u),r.rotate(e*Math.PI/180),r.drawImage(n,0,0),fC(o,t)}(n,t.getType(),e)})}function OC(t,e){return t.toCanvas().then(function(n){return function i(n,t,e){var o=jS(n.width,n.height),r=WS(o);"v"===e?(r.scale(1,-1),r.drawImage(n,0,-o.height)):(r.scale(-1,1),r.drawImage(n,-o.width,0));return fC(o,t)}(n,t.getType(),e)})}function TC(t,e,o,r,i){return t.toCanvas().then(function(n){return function a(n,t,e,o,r,i){var u=jS(r,i);return WS(u).drawImage(n,-e,-o),fC(u,t)}(n,t.getType(),e,o,r,i)})}function EC(n){return bC(n)}function DC(n){return wC(n)}function BC(n,t){return SC(n,t)}function AC(n,t){return yC(n,t)}function _C(n,t){return xC(n,t)}function MC(n,t){return OC(n,t)}function FC(n,t,e){return function r(t,e,o){return t.toCanvas().then(function(n){return CC(n,e,o).then(function(n){return fC(n,t.getType())})})}(n,t,e)}function IC(n,t){return kC(n,t)}function RC(n,t){return N({dom:{tag:"span",innerHtml:n,classes:["tox-icon","tox-tbtn__icon-wrap"]}},t)}function VC(n,t){return RC(xm(n,t),{})}function NC(n,t){return RC(xm(n,t),{behaviours:ya([gg.config({})])})}function HC(n,t,e){return{dom:{tag:"span",innerHtml:e.translate(n),classes:[t+"__select-label"]},behaviours:ya([gg.config({})])}}function PC(n,t,o){function e(n,t){var e=nl.getValue(n);return bg.focus(e),qt(e,"keydown",{raw:t.event().raw()}),Tw.close(e),on.some(!0)}var r=Ee(Z),i=n.text.map(function(n){return bm(HC(n,t,o.providers))}),u=n.icon.map(function(n){return bm(NC(n,o.providers.icons))}),a=n.role.fold(function(){return{}},function(n){return{role:n}}),c=n.tooltip.fold(function(){return{}},function(n){var t=o.providers.translate(n);return{title:t,"aria-label":t}});return bm(Tw.sketch(N(N({},a),{dom:{tag:"button",classes:[t,t+"--select"].concat(S(n.classes,function(n){return t+"--"+n})),attributes:N({},c)},components:Bh([u.map(function(n){return n.asSpec()}),i.map(function(n){return n.asSpec()}),on.some({dom:{tag:"div",classes:[t+"__select-chevron"],innerHtml:xm("chevron-down",o.providers.icons)}})]),matchWidth:!0,useMinWidth:!0,dropdownBehaviours:ya(g(n.dropdownBehaviours,[Th(n.disabled),Ew.config({}),gg.config({}),Jd("dropdown-events",[Ep(n,r),Dp(n,r)]),Jd("menubutton-update-display-text",[rr(fk,function(t,e){i.bind(function(n){return n.getOpt(t)}).each(function(n){gg.set(n,[Ti(o.providers.translate(e.event().text()))])})}),rr(lk,function(t,e){u.bind(function(n){return n.getOpt(t)}).each(function(n){gg.set(n,[NC(e.event().icon(),o.providers.icons)])})})])])),eventOrder:Bn(sk,{mousedown:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"]}),sandboxBehaviours:ya([dg.config({mode:"special",onLeft:e,onRight:e})]),lazySink:o.getSink,toggleClass:t+"--active",parts:{menu:Cv(0,n.columns,n.presets)},fetch:function(){return Ny(n.fetch)}}))).asSpec()}function zC(n){return"separator"===n.type}function LC(n,e){var t=O(n,function(n,t){return function(n){return cn(n)}(t)?""===t?n:"|"===t?0<n.length&&!zC(n[n.length-1])?n.concat([dk]):n:Tn(e,t.toLowerCase())?n.concat([e[t.toLowerCase()]]):n:n.concat([t])},[]);return 0<t.length&&zC(t[t.length-1])&&t.pop(),t}function jC(n,t){return function(n){return Tn(n,"getSubmenuItems")}(n)?function(n,t){var e=n.getSubmenuItems(),o=mk(e,t);return{item:n,menus:Bn(o.menus,q(n.value,o.items)),expansions:Bn(o.expansions,q(n.value,n.value))}}(n,t):{item:n,menus:{},expansions:{}}}function UC(n,e,o,t){var r=Hr("primary-menu"),i=mk(n,o.shared.providers.menuItems());if(0===i.items.length)return on.none();var u=ub(r,i.items,e,o,t),a=P(i.menus,function(n,t){return ub(t,n,e,o,!1)}),c=Bn(a,q(r,u));return on.from(jg.tieredData(r,c,i.expansions))}function WC(e){return{isDisabled:function(){return kh.isDisabled(e)},setDisabled:function(n){return kh.set(e,n)},setActive:function(n){var t=e.element();n?(ei(t,"tox-tbtn--enabled"),_r(t,"aria-pressed",!0)):(ri(t,"tox-tbtn--enabled"),Ir(t,"aria-pressed"))},isActive:function(){return ii(e.element(),"tox-tbtn--enabled")}}}function GC(n,t,e,o){return PC({text:n.text,icon:n.icon,tooltip:n.tooltip,role:o,fetch:function(t){n.fetch(function(n){t(UC(n,Ih.CLOSE_ON_EXECUTE,e,!1))})},onSetup:n.onSetup,getApi:WC,columns:1,presets:"normal",classes:[],dropdownBehaviours:[Xy.config({})]},t,e.shared)}function XC(t,o,r){return function(n){n(S(t,function(n){var t=n.text.fold(function(){return{}},function(n){return{text:n}});return N(N({type:n.type},t),{onAction:function(e){return function(n){var t=!n.isActive();n.setActive(t),e.storage.set(t),r.shared.getSink().each(function(n){o().getOpt(n).each(function(n){Sa(n.element()),qt(n,fy,{name:e.name,value:e.storage.get()})})})}}(n),onSetup:function(t){return function(n){n.setActive(t.storage.get())}}(n)})}))}}function YC(n,t,e,o,r){void 0===e&&(e=[]);var i=t.fold(function(){return{}},function(n){return{action:n}}),u=N({buttonBehaviours:ya([Th(n.disabled),Xy.config({}),Jd("button press",[or("click"),or("mousedown")])].concat(e)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]}},i),a=Bn(u,{dom:o});return Bn(a,{components:r})}function qC(n,t,e,o){void 0===o&&(o=[]);var r={tag:"button",classes:["tox-tbtn"],attributes:n.tooltip.map(function(n){return{"aria-label":e.translate(n),title:e.translate(n)}}).getOr({})},i=n.icon.map(function(n){return VC(n,e.icons)}),u=Bh([i]);return YC(n,t,o,r,u)}function KC(n,t,e,o){void 0===o&&(o=[]);var r=qC(n,on.some(t),e,o);return Xg.sketch(r)}function JC(n,t,e,o,r){void 0===o&&(o=[]),void 0===r&&(r=[]);var i=e.translate(n.text),u=n.icon?n.icon.map(function(n){return VC(n,e.icons)}):on.none(),a=u.isSome()?Bh([u]):[],c=u.isSome()?{}:{innerHtml:i},s=g(n.primary||n.borderless?["tox-button"]:["tox-button","tox-button--secondary"],u.isSome()?["tox-button--icon"]:[],n.borderless?["tox-button--naked"]:[],r),f=N(N({tag:"button",classes:s},c),{attributes:{title:i}});return YC(n,t,o,f,a)}function $C(n,t,e,o,r){void 0===o&&(o=[]),void 0===r&&(r=[]);var i=JC(n,on.some(t),e,o,r);return Xg.sketch(i)}function QC(t,e){return function(n){"custom"===e?qt(n,fy,{name:t,value:{}}):"submit"===e?Yt(n,ly):"cancel"===e?Yt(n,sy):v.console.error("Unknown button type: ",e)}}function ZC(n,t,e){if(function(n,t){return"menu"===t}(0,t)){var o=n,r=N(N({},n),{fetch:XC(o.items,function(){return i},e)}),i=bm(GC(r,"tox-tbtn",e,on.none()));return i.asSpec()}if(function(n,t){return"custom"===t||"cancel"===t||"submit"===t}(0,t)){var u=QC(n.name,t),a=N(N({},n),{borderless:!1});return $C(a,u,e.shared.providers,[])}v.console.error("Unknown footer button type: ",t)}function nk(n,t){var e=QC(n.name,"custom");return function(n,t){return By(n,t,[],[])}(on.none(),by.parts().field(N({factory:Xg},JC(n,on.some(e),t,[RS(""),TS()]))))}function tk(n,t){return wl({factory:by,name:n,overrides:function(o){return{fieldBehaviours:ya([Jd("coupled-input-behaviour",[rr(ho(),function(e){(function(n,t,e){return Ks(n,t,e).bind(nd.getCurrent)})(e,o,t).each(function(t){Ks(e,o,"lock").each(function(n){kg.isOn(n)&&o.onLockedChange(e,t,n)})})})])])}}})}function ek(n){var t=/^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/.exec(n);if(null===t)return an.error(n);var e=parseFloat(t[1]),o=t[2];return an.value({value:e,unit:o})}function ok(n,t){function e(n){return Object.prototype.hasOwnProperty.call(o,n)}var o={"":96,px:96,pt:72,cm:2.54,pc:12,mm:25.4,"in":1};return n.unit===t?on.some(n.value):e(n.unit)&&e(t)?o[n.unit]===o[t]?on.some(n.value):on.some(n.value/o[n.unit]*o[t]):on.none()}function rk(n){return on.none()}function ik(n,t){return function(n,t,e){return n.isSome()&&t.isSome()?on.some(e(n.getOrDie(),t.getOrDie())):on.none()}(ek(n).toOption(),ek(t).toOption(),function(n,t){return ok(n,t.unit).map(function(n){return t.value/n}).map(function(n){return function(t,e){return function(n){return ok(n,e).map(function(n){return{value:n*t,unit:e}})}}(n,t.unit)}).getOr(rk)}).getOr(rk)}function uk(o,t){function n(n){return{dom:{tag:"div",classes:["tox-form__group"]},components:n}}function e(e){return by.parts().field({factory:xy,inputClasses:["tox-textfield"],inputBehaviours:ya([kh.config({disabled:o.disabled}),Xy.config({}),Jd("size-input-events",[rr(lo(),function(n,t){qt(n,i,{isField1:e})}),rr(vo(),function(n,t){qt(n,ay,{name:o.name})})])]),selectOnFocus:!1})}function r(n){return{dom:{tag:"label",classes:["tox-label"],innerHtml:t.translate(n)}}}var a=rk,i=Hr("ratio-event"),u=hk.parts().lock({dom:{tag:"button",classes:["tox-lock","tox-button","tox-button--naked","tox-button--icon"],attributes:{title:t.translate(o.label.getOr("Constrain proportions"))}},components:[{dom:{tag:"span",classes:["tox-icon","tox-lock-icon__lock"],innerHtml:xm("lock",t.icons)}},{dom:{tag:"span",classes:["tox-icon","tox-lock-icon__unlock"],innerHtml:xm("unlock",t.icons)}}],buttonBehaviours:ya([Th(o.disabled),Xy.config({})])}),c=hk.parts().field1(n([by.parts().label(r("Width")),e(!0)])),s=hk.parts().field2(n([by.parts().label(r("Height")),e(!1)]));return hk.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[c,s,n([r("&nbsp;"),u])]}],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:function(n,t,e){ek(nl.getValue(n)).each(function(n){a(n).each(function(n){nl.setValue(t,function(n){var t,e={"":0,px:0,pt:1,mm:1,pc:2,ex:2,em:2,ch:2,rem:2,cm:3,"in":4,"%":4},o=n.value.toFixed((t=n.unit)in e?e[t]:1);return-1!==o.indexOf(".")&&(o=o.replace(/\.?0*$/,"")),o+n.unit}(n))})})},coupledFieldBehaviours:ya([kh.config({disabled:o.disabled,onDisabled:function(n){hk.getField1(n).bind(by.getField).each(kh.disable),hk.getField2(n).bind(by.getField).each(kh.disable),hk.getLock(n).each(kh.disable)},onEnabled:function(n){hk.getField1(n).bind(by.getField).each(kh.enable),hk.getField2(n).bind(by.getField).each(kh.enable),hk.getLock(n).each(kh.enable)}}),Jd("size-input-events2",[rr(i,function(n,t){var e=t.event().isField1(),o=e?hk.getField1(n):hk.getField2(n),r=e?hk.getField2(n):hk.getField1(n),i=o.map(nl.getValue).getOr(""),u=r.map(nl.getValue).getOr("");a=ik(i,u)})])])})}function ak(r,c){function n(n,t,e,o){return bm($C({name:n,text:n,disabled:e,primary:o,icon:on.none(),borderless:!1},t,c))}function t(n,t,e,o){return bm(KC({name:n,icon:on.some(n),tooltip:on.some(t),disabled:o,primary:!1,borderless:!1},e,c))}function u(n,e){n.map(function(n){var t=n.get(e);t.hasConfigured(kh)&&kh.disable(t)})}function a(n,e){n.map(function(n){var t=n.get(e);t.hasConfigured(kh)&&kh.enable(t)})}function i(n,t,e){qt(n,t,e)}function e(n){return Yt(n,wk.disable())}function o(n){return Yt(n,wk.enable())}function s(n,t){e(n),i(n,vk.transform(),{transform:t}),o(n)}function f(n){return function(){Q.getOpt(n).each(function(n){gg.set(n,[J])})}}function l(n,t){e(n),i(n,vk.transformApply(),{transform:t,swap:f(n)}),o(n)}function d(){return n("Back",function(n){return i(n,vk.back(),{swap:f(n)})},!1,!1)}function m(){return bm({dom:{tag:"div",classes:["tox-spacer"]},behaviours:ya([kh.config({})])})}function g(){return n("Apply",function(n){return i(n,vk.apply(),{swap:f(n)})},!0,!0)}function p(){return function(n){var t=r.getRect();return function(n,t,e,o,r){return TC(n,t,e,o,r)}(n,t.x,t.y,t.w,t.h)}}function h(t,e){return function(n){return t(n,e)}}function v(n,t){!function(n,t){e(n),i(n,vk.tempTransform(),{transform:t}),o(n)}(n,t)}function b(n,t,e,o,r){var i=gS.parts().label({dom:{tag:"label",classes:["tox-label"],innerHtml:c.translate(n)}}),u=gS.parts().spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}}),a=gS.parts().thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return bm(gS.sketch({dom:{tag:"div",classes:["tox-slider"],attributes:{role:"presentation"}},model:{mode:"x",minX:e,maxX:r,getInitialValue:nn({x:nn(o)})},components:[i,u,a],sliderBehaviours:ya([bg.config({})]),onChoose:t}))}function y(n,t,e,o,r){return[d(),function(n,r,t,e,o){return b(n,function(n,t,e){var o=h(r,e.x()/100);s(n,o)},t,e,o)}(n,t,e,o,r),g()]}function x(n,t,e,o,r){var i=y(n,t,e,o,r);return Gb.sketch({dom:k,components:i.map(function(n){return n.asSpec()}),containerBehaviours:ya([Jd("image-tools-filter-panel-buttons-events",[rr(wk.disable(),function(n,t){u(i,n)}),rr(wk.enable(),function(n,t){a(i,n)})])])})}function w(t,e,o){return function(n){return function(n,t,e,o){return vC(n,t,e,o)}(n,t,e,o)}}function S(n){return b(n,function(a,n,t){var e=j.getOpt(a),o=W.getOpt(a),r=U.getOpt(a);e.each(function(u){o.each(function(i){r.each(function(n){var t=nl.getValue(u).x()/100,e=nl.getValue(n).x()/100,o=nl.getValue(i).x()/100,r=w(t,e,o);s(a,r)})})})},0,100,200)}function C(t,e,o){return function(n){i(n,vk.swap(),{transform:e,swap:function(){Q.getOpt(n).each(function(n){gg.set(n,[t]),o(n)})}})}}var k={tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools-edit-panel"]},O=Z,T=[d(),m(),n("Apply",function(n){var t=p();l(n,t),r.hideCrop()},!1,!0)],E=Gb.sketch({dom:k,components:T.map(function(n){return n.asSpec()}),containerBehaviours:ya([Jd("image-tools-crop-buttons-events",[rr(wk.disable(),function(n,t){u(T,n)}),rr(wk.enable(),function(n,t){a(T,n)})])])}),D=bm(uk({name:"size",label:on.none(),constrain:!0,disabled:!1},c)),B=[d(),m(),D,m(),n("Apply",function(o){D.getOpt(o).each(function(n){var t=nl.getValue(n),e=function(t,e){return function(n){return FC(n,t,e)}}(parseInt(t.width,10),parseInt(t.height,10));l(o,e)})},!1,!0)],A=Gb.sketch({dom:k,components:B.map(function(n){return n.asSpec()}),containerBehaviours:ya([Jd("image-tools-resize-buttons-events",[rr(wk.disable(),function(n,t){u(B,n)}),rr(wk.enable(),function(n,t){a(B,n)})])])}),_=h(MC,"h"),M=h(MC,"v"),F=h(IC,-90),I=h(IC,90),R=[d(),m(),t("flip-horizontally","Flip horizontally",function(n){v(n,_)},!1),t("flip-vertically","Flip vertically",function(n){v(n,M)},!1),t("rotate-left","Rotate counterclockwise",function(n){v(n,F)},!1),t("rotate-right","Rotate clockwise",function(n){v(n,I)},!1),m(),g()],V=Gb.sketch({dom:k,components:R.map(function(n){return n.asSpec()}),containerBehaviours:ya([Jd("image-tools-fliprotate-buttons-events",[rr(wk.disable(),function(n,t){u(R,n)}),rr(wk.enable(),function(n,t){a(R,n)})])])}),N=[d(),m(),g()],H=Gb.sketch({dom:k,components:N.map(function(n){return n.asSpec()})}),P=x("Brightness",AC,-100,0,100),z=x("Contrast",_C,-100,0,100),L=x("Gamma",BC,-100,0,100),j=S("R"),U=S("G"),W=S("B"),G=[d(),j,U,W,g()],X=Gb.sketch({dom:k,components:G.map(function(n){return n.asSpec()})}),Y=on.some(DC),q=on.some(EC),K=[t("crop","Crop",C(E,on.none(),function(n){r.showCrop()}),!1),t("resize","Resize",C(A,on.none(),function(n){D.getOpt(n).each(function(n){var t=r.getMeasurements(),e=t.width,o=t.height;nl.setValue(n,{width:e,height:o})})}),!1),t("orientation","Orientation",C(V,on.none(),O),!1),t("brightness","Brightness",C(P,on.none(),O),!1),t("sharpen","Sharpen",C(H,Y,O),!1),t("contrast","Contrast",C(z,on.none(),O),!1),t("color-levels","Color levels",C(X,on.none(),O),!1),t("gamma","Gamma",C(L,on.none(),O),!1),t("invert","Invert",C(H,q,O),!1)],J=Gb.sketch({dom:k,components:K.map(function(n){return n.asSpec()})}),$=Gb.sketch({dom:{tag:"div"},components:[J],containerBehaviours:ya([gg.config({})])}),Q=bm($);return{memContainer:Q,getApplyButton:function(n){return Q.getOpt(n).map(function(n){var t=n.components()[0];return t.components()[t.components().length-1]})}}}var ck=Hr("toolbar.button.execute"),sk={"alloy.execute":["disabling","alloy.base.behaviour","toggling","toolbar-button-events"]},fk=Hr("update-menu-text"),lk=Hr("update-menu-icon"),dk={type:"separator"},mk=function(n,r){var t=LC(cn(n)?n.split(" "):n,r);return k(t,function(n,t){var e=function(n){if(zC(n))return n;var t=Nn(n,"value").getOrThunk(function(){return Hr("generated-menu-item")});return Bn({value:t},n)}(t),o=jC(e,r);return{menus:Bn(n.menus,o.menus),items:[o.item].concat(n.items),expansions:Bn(n.expansions,o.expansions)}},{menus:{},expansions:{},items:[]})},gk=nn([St("field1Name","field1"),St("field2Name","field2"),$u("onLockedChange"),Yu(["lockClass"]),St("locked",!1),tl("coupledFieldBehaviours",[nd,nl])]),pk=nn([tk("field1","field2"),tk("field2","field1"),wl({factory:Xg,schema:[ct("dom")],name:"lock",overrides:function(n){return{buttonBehaviours:ya([kg.config({selected:n.locked,toggleClass:n.markers.lockClass,aria:{mode:"pressed"}})])}}})]),hk=_l({name:"FormCoupledInputs",configFields:gk(),partFields:pk(),factory:function(o,n,t,e){return{uid:o.uid,dom:o.dom,components:n,behaviours:el(o.coupledFieldBehaviours,[nd.config({find:on.some}),nl.config({store:{mode:"manual",getValue:function(n){var t,e=nf(n,o,["field1","field2"]);return(t={})[o.field1Name]=nl.getValue(e.field1()),t[o.field2Name]=nl.getValue(e.field2()),t},setValue:function(n,t){var e=nf(n,o,["field1","field2"]);$(t,o.field1Name)&&nl.setValue(e.field1(),t[o.field1Name]),$(t,o.field2Name)&&nl.setValue(e.field2(),t[o.field2Name])}}})]),apis:{getField1:function(n){return Ks(n,o,"field1")},getField2:function(n){return Ks(n,o,"field2")},getLock:function(n){return Ks(n,o,"lock")}}}},apis:{getField1:function(n,t){return n.getField1(t)},getField2:function(n,t){return n.getField2(t)},getLock:function(n,t){return n.getLock(t)}}}),vk={undo:nn(Hr("undo")),redo:nn(Hr("redo")),zoom:nn(Hr("zoom")),back:nn(Hr("back")),apply:nn(Hr("apply")),swap:nn(Hr("swap")),transform:nn(Hr("transform")),tempTransform:nn(Hr("temp-transform")),transformApply:nn(Hr("transform-apply"))},bk=nn("save-state"),yk=nn("disable"),xk=nn("enable"),wk={formActionEvent:fy,saveState:bk,disable:yk,enable:xk},Sk=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),Ck=tinymce.util.Tools.resolve("tinymce.geom.Rect"),kk=tinymce.util.Tools.resolve("tinymce.util.Observable"),Ok=tinymce.util.Tools.resolve("tinymce.util.Tools"),Tk=tinymce.util.Tools.resolve("tinymce.util.VK");function Ek(n){var t,e;if(n.changedTouches)for(t="screenX screenY pageX pageY clientX clientY".split(" "),e=0;e<t.length;e++)n[t[e]]=n.changedTouches[0][t[e]]}function Dk(n,r){var i,u,t,a,c,f,l,d=r.document||v.document;r=r||{};var m=d.getElementById(r.handle||n);t=function(n){var t,e,o=function s(n){var t,e,o,r,i,u,a,c=Math.max;return t=n.documentElement,e=n.body,o=c(t.scrollWidth,e.scrollWidth),r=c(t.clientWidth,e.clientWidth),i=c(t.offsetWidth,e.offsetWidth),u=c(t.scrollHeight,e.scrollHeight),a=c(t.clientHeight,e.clientHeight),{width:o<i?r:o,height:u<c(t.offsetHeight,e.offsetHeight)?a:u}}(d);Ek(n),n.preventDefault(),u=n.button,t=m,f=n.screenX,l=n.screenY,e=v.window.getComputedStyle?v.window.getComputedStyle(t,null).getPropertyValue("cursor"):t.runtimeStyle.cursor,i=Sk("<div></div>").css({position:"absolute",top:0,left:0,width:o.width,height:o.height,zIndex:2147483647,opacity:1e-4,cursor:e}).appendTo(d.body),Sk(d).on("mousemove touchmove",c).on("mouseup touchend",a),r.start(n)},c=function(n){if(Ek(n),n.button!==u)return a(n);n.deltaX=n.screenX-f,n.deltaY=n.screenY-l,n.preventDefault(),r.drag(n)},a=function(n){Ek(n),Sk(d).off("mousemove touchmove",c).off("mouseup touchend",a),i.remove(),r.stop&&r.stop(n)},this.destroy=function(){Sk(m).off()},Sk(m).on("mousedown touchstart",t)}function Bk(t){function u(n,s){c.getOpt(n).each(function(n){var e=l.get(),o=gu(n.element()),r=fu(n.element()),i=s.dom().naturalWidth*e,u=s.dom().naturalHeight*e,a=Math.max(0,o/2-i/2),c=Math.max(0,r/2-u/2),t={left:a.toString()+"px",top:c.toString()+"px",width:i.toString()+"px",height:u.toString()+"px",position:"absolute"};di(s,t),f.getOpt(n).each(function(n){di(n.element(),t)}),d.get().each(function(n){var t=m.get();n.setRect({x:t.x*e+a,y:t.y*e+c,w:t.w*e,h:t.h*e}),n.setClampRect({x:a,y:c,w:i,h:u}),n.setViewPortRect({x:0,y:0,w:o,h:r})})})}function e(n,t){var i=Be.fromTag("img");return _r(i,"src",t),function(e){return new Hp(function(n){var t=function(){e.removeEventListener("load",t),n(e)};e.complete?n(e):e.addEventListener("load",t)})}(i.dom()).then(function(){return c.getOpt(n).map(function(n){var t=iu({element:i});gg.replaceAt(n,1,on.some(t));var e=a.get(),o={x:0,y:0,w:i.dom().naturalWidth,h:i.dom().naturalHeight};a.set(o);var r=Ck.inflate(o,-20,-20);return m.set(r),e.w===o.w&&e.h===o.h||function(n,u){c.getOpt(n).each(function(n){var t=gu(n.element()),e=fu(n.element()),o=u.dom().naturalWidth,r=u.dom().naturalHeight,i=Math.min(t/o,e/r);1<=i?l.set(1):l.set(i)})}(n,i),u(n,i),i})})}var f=bm({dom:{tag:"div",classes:["tox-image-tools__image-bg"],attributes:{role:"presentation"}}}),l=Ee(1),d=Ee(on.none()),m=Ee({x:0,y:0,w:1,h:1}),a=Ee({x:0,y:0,w:1,h:1}),n=Gb.sketch({dom:{tag:"div",classes:["tox-image-tools__image"]},components:[f.asSpec(),{dom:{tag:"img",attributes:{src:t}}},{dom:{tag:"div"},behaviours:ya([Jd("image-panel-crop-events",[Ri(function(n){c.getOpt(n).each(function(n){var t=n.element().dom(),e=Fk({x:10,y:10,w:100,h:100},{x:0,y:0,w:200,h:200},{x:0,y:0,w:200,h:200},t,function(){});e.toggleVisibility(!1),e.on("updateRect",function(n){var t=n.rect,e=l.get(),o={x:Math.round(t.x/e),y:Math.round(t.y/e),w:Math.round(t.w/e),h:Math.round(t.h/e)};m.set(o)}),d.set(on.some(e))})})])])}],containerBehaviours:ya([gg.config({}),Jd("image-panel-events",[Ri(function(n){e(n,t)})])])}),c=bm(n);return{memContainer:c,updateSrc:e,zoom:function(n,t){var e=l.get(),o=0<t?Math.min(2,e+.1):Math.max(.1,e-.1);l.set(o),c.getOpt(n).each(function(n){var t=n.components()[1].element();u(n,t)})},showCrop:function(){d.get().each(function(n){n.toggleVisibility(!0)})},hideCrop:function(){d.get().each(function(n){n.toggleVisibility(!1)})},getRect:function(){return m.get()},getMeasurements:function(){var n=a.get();return{width:n.w,height:n.h}}}}function Ak(n,t,e,o,r){return KC({name:n,icon:on.some(t),disabled:e,tooltip:on.some(n),primary:!1,borderless:!1},o,r)}function _k(n,t){t?kh.enable(n):kh.disable(n)}var Mk=0,Fk=function(s,e,f,o,r){var l,t,i,u="tox-",a="tox-crid-"+Mk++,c=[{name:"move",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:0,deltaH:0,label:"Crop Mask"},{name:"nw",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:-1,deltaH:-1,label:"Top Left Crop Handle"},{name:"ne",xMul:1,yMul:0,deltaX:0,deltaY:1,deltaW:1,deltaH:-1,label:"Top Right Crop Handle"},{name:"sw",xMul:0,yMul:1,deltaX:1,deltaY:0,deltaW:-1,deltaH:1,label:"Bottom Left Crop Handle"},{name:"se",xMul:1,yMul:1,deltaX:0,deltaY:0,deltaW:1,deltaH:1,label:"Bottom Right Crop Handle"}];i=["top","right","bottom","left"];var d=function(n,t){return{x:t.x+n.x,y:t.y+n.y,w:t.w,h:t.h}},m=function(n,t){return{x:t.x-n.x,y:t.y-n.y,w:t.w,h:t.h}};function g(n,t,e,o){var r,i,u,a,c;r=t.x,i=t.y,u=t.w,a=t.h,r+=e*n.deltaX,i+=o*n.deltaY,(u+=e*n.deltaW)<20&&(u=20),(a+=o*n.deltaH)<20&&(a=20),c=s=Ck.clamp({x:r,y:i,w:u,h:a},f,"move"===n.name),c=m(f,c),l.fire("updateRect",{rect:c}),v(c)}function p(t){function n(n,t){t.h<0&&(t.h=0),t.w<0&&(t.w=0),Sk("#"+a+"-"+n,o).css({left:t.x,top:t.y,width:t.w,height:t.h})}Ok.each(c,function(n){Sk("#"+a+"-"+n.name,o).css({left:t.w*n.xMul+t.x,top:t.h*n.yMul+t.y})}),n("top",{x:e.x,y:e.y,w:e.w,h:t.y-e.y}),n("right",{x:t.x+t.w,y:t.y,w:e.w-t.x-t.w+e.x,h:t.h}),n("bottom",{x:e.x,y:t.y+t.h,w:e.w,h:e.h-t.y-t.h+e.y}),n("left",{x:e.x,y:t.y,w:t.x-e.x,h:t.h}),n("move",t)}function h(n){p(s=n)}function v(n){h(d(f,n))}return function b(){Sk('<div id="'+a+'" class="'+u+'croprect-container" role="grid" aria-dropeffect="execute">').appendTo(o),Ok.each(i,function(n){Sk("#"+a,o).append('<div id="'+a+"-"+n+'"class="'+u+'croprect-block" style="display: none" data-mce-bogus="all">')}),Ok.each(c,function(n){Sk("#"+a,o).append('<div id="'+a+"-"+n.name+'" class="'+u+"croprect-handle "+u+"croprect-handle-"+n.name+'"style="display: none" data-mce-bogus="all" role="gridcell" tabindex="-1" aria-label="'+n.label+'" aria-grabbed="false" title="'+n.label+'">')}),t=Ok.map(c,function n(t){var e;return new Dk(a,{document:o.ownerDocument,handle:a+"-"+t.name,start:function(){e=s},drag:function(n){g(t,e,n.deltaX,n.deltaY)}})}),p(s),Sk(o).on("focusin focusout",function(n){Sk(n.target).attr("aria-grabbed","focus"===n.type?"true":"false")}),Sk(o).on("keydown",function(t){var i;function n(n,t,e,o,r){n.stopPropagation(),n.preventDefault(),g(i,e,o,r)}switch(Ok.each(c,function(n){if(t.target.id===a+"-"+n.name)return i=n,!1}),t.keyCode){case Tk.LEFT:n(t,0,s,-10,0);break;case Tk.RIGHT:n(t,0,s,10,0);break;case Tk.UP:n(t,0,s,0,-10);break;case Tk.DOWN:n(t,0,s,0,10);break;case Tk.ENTER:case Tk.SPACEBAR:t.preventDefault(),r()}})}(),l=Ok.extend({toggleVisibility:function y(n){var t;t=Ok.map(c,function(n){return"#"+a+"-"+n.name}).concat(Ok.map(i,function(n){return"#"+a+"-"+n})).join(","),n?Sk(t,o).show():Sk(t,o).hide()},setClampRect:function x(n){f=n,p(s)},setRect:h,getInnerRect:function(){return m(f,s)},setInnerRect:v,setViewPortRect:function w(n){e=n,p(s)},destroy:function n(){Ok.each(t,function(n){n.destroy()}),t=[]}},kk)};function Ik(n){var t=Ee(n),e=Ee(on.none()),o=function s(){var e=[],o=-1;function n(){return 0<o}function t(){return-1!==o&&o<e.length-1}return{data:e,add:function r(n){var t;return t=e.splice(++o),e.push(n),{state:n,removed:t}},undo:function i(){if(n())return e[--o]},redo:function u(){if(t())return e[++o]},canUndo:n,canRedo:t}}();function r(n){t.set(n)}function i(n){v.URL.revokeObjectURL(n.url)}function u(n){var t=a(n);return r(t),function(n){Ok.each(n,i)}(o.add(t).removed),t.url}o.add(n);var a=function(n){return{blob:n,url:v.URL.createObjectURL(n)}},c=function(){e.get().each(i),e.set(on.none())};return{getBlobState:function(){return t.get()},setBlobState:r,addBlobState:u,getTempState:function(){return e.get().fold(function(){return t.get()},function(n){return n})},updateTempState:function(n){var t=a(n);return c(),e.set(on.some(t)),t.url},addTempState:function(n){var t=a(n);return e.set(on.some(t)),t.url},applyTempState:function(t){return e.get().fold(function(){},function(n){u(n.blob),t()})},destroyTempState:c,undo:function(){var n=o.undo();return r(n),n.url},redo:function(){var n=o.redo();return r(n),n.url},getHistoryStates:function(){return{undoEnabled:o.canUndo(),redoEnabled:o.canRedo()}}}}function Rk(n,t){function i(n){var t=s.getHistoryStates();m.updateButtonUndoStates(n,t.undoEnabled,t.redoEnabled),qt(n,wk.formActionEvent,{name:wk.saveState(),value:t.undoEnabled})}function u(n){return n.toBlob()}function a(n){qt(n,wk.formActionEvent,{name:wk.disable(),value:{}})}function r(t,n,e,o,r){return a(t),function(n){return sC(n)}(n).then(e).then(u).then(o).then(function(n){return l(t,n).then(function(n){return i(t),r(),f(t),n})})["catch"](function(n){return v.console.log(n),f(t),n})}function c(n,t,e){var o=s.getBlobState().blob;r(n,o,t,function(n){return s.updateTempState(n)},e)}var s=Ik(n.currentState),f=function(n){e.getApplyButton(n).each(function(n){kh.enable(n)}),qt(n,wk.formActionEvent,{name:wk.enable(),value:{}})},l=function(n,t){return a(n),o.updateSrc(n,t)},d=function(n){var t=s.getBlobState().url;return s.destroyTempState(),i(n),t},o=Bk(n.currentState.url),m=function(n){var o=bm(Ak("Undo","undo",!0,function(n){qt(n,vk.undo(),{direction:1})},n)),r=bm(Ak("Redo","redo",!0,function(n){qt(n,vk.redo(),{direction:1})},n));return{container:Gb.sketch({dom:{tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools__sidebar"]},components:[o.asSpec(),r.asSpec(),Ak("Zoom in","zoom-in",!1,function(n){qt(n,vk.zoom(),{direction:1})},n),Ak("Zoom out","zoom-out",!1,function(n){qt(n,vk.zoom(),{direction:-1})},n)]}),updateButtonUndoStates:function(n,t,e){o.getOpt(n).each(function(n){_k(n,t)}),r.getOpt(n).each(function(n){_k(n,e)})}}}(t),e=ak(o,t);return{dom:{tag:"div",attributes:{role:"presentation"}},components:[e.memContainer.asSpec(),o.memContainer.asSpec(),m.container],behaviours:ya([nl.config({store:{mode:"manual",getValue:function(){return s.getBlobState()}}}),Jd("image-tools-events",[rr(vk.undo(),function(t,n){var e=s.undo();l(t,e).then(function(n){f(t),i(t)})}),rr(vk.redo(),function(t,n){var e=s.redo();l(t,e).then(function(n){f(t),i(t)})}),rr(vk.zoom(),function(n,t){var e=t.event().direction();o.zoom(n,e)}),rr(vk.back(),function(n,t){!function(t){var n=d(t);l(t,n).then(function(n){f(t)})}(n),t.event().swap()(),o.hideCrop()}),rr(vk.apply(),function(n,t){s.applyTempState(function(){d(n),t.event().swap()()})}),rr(vk.transform(),function(n,t){return c(n,t.event().transform(),Z)}),rr(vk.tempTransform(),function(n,t){return function(n,t){var e=s.getTempState().blob;r(n,e,t,function(n){return s.addTempState(n)},Z)}(n,t.event().transform())}),rr(vk.transformApply(),function(n,t){return function(e,n,t){var o=s.getBlobState().blob;r(e,o,n,function(n){var t=s.addBlobState(n);return d(e),t},t)}(n,t.event().transform(),t.event().swap())}),rr(vk.swap(),function(t,n){!function(n){m.updateButtonUndoStates(n,!1,!1)}(t);var e=n.event().transform(),o=n.event().swap();e.fold(function(){o()},function(n){c(t,n,o)})})]),TS()])}}function Vk(e,t){var n=e.label.map(function(n){return Ay(n,t)}),o=[kh.config({disabled:e.disabled}),dg.config({mode:"execution",useEnter:!0!==e.multiline,useControlEnter:!0===e.multiline,execute:function(n){return Yt(n,ly),on.some(!0)}}),Jd("textfield-change",[rr(ho(),function(n,t){qt(n,ay,{name:e.name})}),rr(ko(),function(n,t){qt(n,ay,{name:e.name})})]),Xy.config({})],r=e.validation.map(function(o){return Uy.config({getRoot:function(n){return br(n.element())},invalidClass:"tox-invalid",validator:{validate:function(n){var t=nl.getValue(n),e=o.validator(t);return Hy(!0===e?an.value(t):an.error(e))},validateOnLoad:o.validateOnLoad}})}).toArray(),i=e.placeholder.fold(nn({}),function(n){return{placeholder:t.translate(n)}}),u=e.inputMode.fold(nn({}),function(n){return{inputmode:n}}),a=N(N({},i),u),c=by.parts().field({tag:!0===e.multiline?"textarea":"input",inputAttributes:a,inputClasses:[e.classname],inputBehaviours:ya(H([o,r])),selectOnFocus:!1,factory:xy}),s=(e.flex?["tox-form__group--stretched"]:[]).concat(e.maximized?["tox-form-group--maximize"]:[]),f=[kh.config({disabled:e.disabled,onDisabled:function(n){by.getField(n).each(kh.disable)},onEnabled:function(n){by.getField(n).each(kh.enable)}})];return By(n,c,s,f)}function Nk(n){var t=Ee(null);return tu({readState:function(){return{timer:null!==t.get()?"set":"unset"}},setTimer:function(n){t.set(n)},cancel:function(){var n=t.get();null!==n&&n.cancel()}})}function Hk(n,t,e){var o=nl.getValue(e);nl.setValue(t,o),BT(t)}function Pk(n,t){var e=n.element(),o=bi(e),r=e.dom();"number"!==Mr(e,"type")&&t(r,o)}function zk(n,t,e){if(n.selectsOver){var o=nl.getValue(t),r=n.getDisplayText(o),i=nl.getValue(e);return 0===n.getDisplayText(i).indexOf(r)?on.some(function(){Hk(0,t,e),function(n,e){Pk(n,function(n,t){return n.setSelectionRange(e,t.length)})}(t,r.length)}):on.none()}return on.none()}function Lk(n){return IT(Ny(n))}function jk(n){return{type:"menuitem",value:n.url,text:n.title,meta:{attach:n.attach},onAction:function(){}}}function Uk(n,t){return{type:"menuitem",value:t,text:n,meta:{attach:undefined},onAction:function(){}}}function Wk(n,t){return function(n){return S(n,jk)}(function(t,n){return C(n,function(n){return n.type===t})}(n,t))}function Gk(n,t){var e=n.toLowerCase();return C(t,function(n){var t=n.meta!==undefined&&n.meta.text!==undefined?n.meta.text:n.text;return Vt(t.toLowerCase(),e)||Vt(n.value.toLowerCase(),e)})}function Xk(e,n,o){var t=nl.getValue(n),r=t.meta.text!==undefined?t.meta.text:t.value;return o.getLinkInformation().fold(function(){return[]},function(n){var t=Gk(r,function(n){return S(n,function(n){return Uk(n,n)})}(o.getHistory(e)));return"file"===e?function(n){return O(n,function(n,t){return 0===n.length||0===t.length?n.concat(t):n.concat(VT,t)},[])}([t,Gk(r,function(n){return Wk("header",n.targets)}(n)),Gk(r,H([function(n){return on.from(n.anchorTop).map(function(n){return Uk("<top>",n)}).toArray()}(n),function(n){return Wk("anchor",n.targets)}(n),function(n){return on.from(n.anchorBottom).map(function(n){return Uk("<bottom>",n)}).toArray()}(n)]))]):t})}function Yk(r,o,i){function u(n){var t=nl.getValue(n);i.addToHistory(t.value,r.filetype)}var n,t,e,a,c,s=o.shared.providers,f=by.parts().field({factory:FT,dismissOnBlur:!0,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{"aria-errormessage":NT,type:"url"},minChars:0,responseTime:0,fetch:function(n){var t=Xk(r.filetype,n,i),e=UC(t,Ih.BUBBLE_TO_SANDBOX,o,!1);return Hy(e)},getHotspot:function(n){return h.getOpt(n)},onSetValue:function(n,t){n.hasConfigured(Uy)&&Uy.run(n).get(Z)},typeaheadBehaviours:ya(H([i.getValidationHandler().map(function(e){return Uy.config({getRoot:function(n){return br(n.element())},invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:function(n,t){d.getOpt(n).each(function(n){_r(n.element(),"title",s.translate(t))})}},validator:{validate:function(n){var t=nl.getValue(n);return RT(function(o){e({type:r.filetype,url:t.value},function(n){if("invalid"===n.status){var t=an.error(n.message);o(t)}else{var e=an.value(n.message);o(e)}})})},validateOnLoad:!1}})}).toArray(),[kh.config({disabled:r.disabled}),Xy.config({}),Jd("urlinput-events",H(["file"===r.filetype?[rr(ho(),function(n){qt(n,ay,{name:r.name})})]:[],[rr(vo(),function(n){qt(n,ay,{name:r.name}),u(n)}),rr(ko(),function(n){qt(n,ay,{name:r.name}),u(n)})]]))]])),eventOrder:(n={},n[ho()]=["streaming","urlinput-events","invalidating"],n),model:{getDisplayText:function(n){return n.value},selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:o.shared.getSink,parts:{menu:Cv(0,0,"normal")},onExecute:function(n,t,e){qt(t,ly,{})},onItemExecute:function(n,t,e,o){u(n),qt(n,ay,{name:r.name})}}),l=r.label.map(function(n){return Ay(n,s)}),d=bm((t="invalid",e=on.some(NT),void 0===(a="warning")&&(a=t),void 0===c&&(c=t),{dom:{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+t],innerHtml:xm(a,s.icons),attributes:N({title:s.translate(c),"aria-live":"polite"},e.fold(function(){return{}},function(n){return{id:n}}))}})),m=bm({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[d.asSpec()]}),g=i.getUrlPicker(r.filetype),p=Hr("browser.url.event"),h=bm({dom:{tag:"div",classes:["tox-control-wrap"]},components:[f,m.asSpec()],behaviours:ya([kh.config({disabled:r.disabled})])}),v=bm($C({name:r.name,icon:on.some("browse"),text:r.label.getOr(""),disabled:r.disabled,primary:!1,borderless:!0},function(n){return Yt(n,p)},s,[],["tox-browse-url"]));return by.sketch({dom:qy([]),components:l.toArray().concat([{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:H([[h.asSpec()],g.map(function(){return v.asSpec()}).toArray()])}]),fieldBehaviours:ya([kh.config({disabled:r.disabled,onDisabled:function(n){by.getField(n).each(kh.disable),v.getOpt(n).each(kh.disable)},onEnabled:function(n){by.getField(n).each(kh.enable),v.getOpt(n).each(kh.enable)}}),Jd("url-input-events",[rr(p,function(o){nd.getCurrent(o).each(function(t){var e=nl.getValue(t);g.each(function(n){n(e).get(function(n){nl.setValue(t,n),qt(o,ay,{name:r.name})})})})})])])})}function qk(u,t){function n(o){return function(t,e){Tu(e.event().target(),"[data-collection-item-value]").each(function(n){o(t,e,n,Mr(n,"data-collection-item-value"))})}}var e=u.label.map(function(n){return Ay(n,t)}),o=[rr(fo(),n(function(n,t,e){Sa(e)})),rr(Xt(),n(function(n,t,e,o){t.stop(),qt(n,fy,{name:u.name,value:o})})),rr(lo(),n(function(n,t,e){Ou(n.element(),"."+gh).each(function(n){ri(n,gh)}),ei(e,gh)})),rr(mo(),n(function(n){Ou(n.element(),"."+gh).each(function(n){ri(n,gh)})})),Hi(n(function(n,t,e,o){qt(n,fy,{name:u.name,value:o})}))],r=by.parts().field({dom:{tag:"div",classes:["tox-collection"].concat(1!==u.columns?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:l},behaviours:ya([gg.config({}),nl.config({store:{mode:"memory",initialValue:[]},onSetValue:function(o,n){!function(n,t){var e=S(t,function(n){var t=ih.translate(n.text),e=1===u.columns?'<div class="tox-collection__item-label">'+t+"</div>":"",o='<div class="tox-collection__item-icon">'+n.icon+"</div>",r={_:" "," - ":" ","-":" "},i=t.replace(/\_| \- |\-/g,function(n){return r[n]});return'<div class="tox-collection__item" tabindex="-1" data-collection-item-value="'+function(n){return'"'===n?"&quot;":n}(n.value)+'" title="'+i+'" aria-label="'+i+'">'+o+e+"</div>"}),o=1<u.columns&&"auto"!==u.columns?w(e,u.columns):[e],r=S(o,function(n){return'<div class="tox-collection__group">'+n.join("")+"</div>"});Br(n.element(),r.join(""))}(o,n),"auto"===u.columns&&up(o,5,"tox-collection__item").each(function(n){var t=n.numRows,e=n.numColumns;dg.setGridSize(o,t,e)}),Yt(o,py)}}),Xy.config({}),dg.config(function(n,t){return 1===n?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:"auto"===n?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:"color"===t?".tox-swatches__row":".tox-collection__group",cell:"color"===t?"."+ch:"."+ah}}}(u.columns,"normal")),Jd("collection-events",o)])});return By(e,r,["tox-form__group--collection"],[])}function Kk(r){return function(t,e,o){return Nn(e,"name").fold(function(){return r(e,o)},function(n){return t.field(n,r(e,o))})}}function Jk(t,n,e){var o=Bn(e,{shared:{interpreter:function(n){return zT(t,n,o)}}});return zT(t,n,o)}function $k(n){return{colorPicker:function(e){return function(n,t){Wv.colorPickerDialog(e)(n,t)}}(n),hasCustomColors:function(n){return function(){return Iv(n)}}(n),getColors:function(n){return function(){return Rv(n)}}(n),getColorCols:function(n){return function(){return Wv.getColorCols(n)}}(n)}}function Qk(e){return function(n){return on.from(n.getParam("style_formats")).filter(fn)}(e).map(function(n){var t=function(t,n){function e(n){bn(n,function(n){t.formatter.has(n.name)||t.formatter.register(n.name,n.format)})}var o=GT(n);return t.formatter?e(o.customFormats):t.on("init",function(){e(o.customFormats)}),o.formats}(e,n);return function(n){return n.getParam("style_formats_merge",!1,"boolean")}(e)?WT.concat(t):t}).getOr(WT)}function Zk(n,t,e){var o={type:"formatter",isSelected:t(n.format),getStylePreview:e(n.format)};return Bn(n,o)}function nO(r,n,i,u){var o=function(n){return S(n,function(n){var t=wn(n);if($(n,"items")){var e=o(n.items);return Bn(function(n){var t={type:"submenu",isSelected:nn(!1),getStylePreview:function(){return on.none()}};return Bn(n,t)}(n),{getStyleItems:function(){return e}})}return $(n,"format")?function(n){return Zk(n,i,u)}(n):1===t.length&&vn(t,"title")?Bn(n,{type:"separator"}):function(n){var t=Hr(n.title),e={type:"formatter",format:t,isSelected:i(t),getStylePreview:u(t)},o=Bn(n,e);return r.formatter.register(t,o),o}(n)})};return o(n)}function tO(t){return function(n){if(n&&1===n.nodeType){if(n.contentEditable===t)return!0;if(n.getAttribute("data-mce-contenteditable")===t)return!0}return!1}}function eO(n,t,e,o,r){return{type:n,title:t,url:e,level:o,attach:r}}function oO(n){return n.innerText||n.textContent}function rO(n){return function(n){return n&&"A"===n.nodeName&&(n.id||n.name)!==undefined}(n)&&KT(n)}function iO(n){return n&&/^(H[1-6])$/.test(n.nodeName)}function uO(n){return iO(n)&&KT(n)}function aO(n){var t=function(n){return n.id?n.id:Hr("h")}(n);return eO("header",oO(n),"#"+t,function(n){return iO(n)?parseInt(n.nodeName.substr(1),10):0}(n),function(){n.id=t})}function cO(n){var t=n.id||n.name,e=oO(n);return eO("anchor",e||"#"+t,"#"+t,0,Z)}function sO(n){return function(n,t){return S(Lc(Be.fromDom(t),n),function(n){return n.dom()})}("h1,h2,h3,h4,h5,h6,a:not([href])",n)}function fO(n){return 0<XT(n.title).length}function lO(n){return cn(n)&&/^https?/.test(n)}function dO(n){return sn(n)&&I(n,function(n){return!function(n){return fn(n)&&n.length<=5&&B(n,lO)}(n)}).isNone()}function mO(){var n,t=v.localStorage.getItem($T);if(null===t)return{};try{n=JSON.parse(t)}catch(e){if(e instanceof SyntaxError)return v.console.log("Local storage "+$T+" was not valid JSON",e),{};throw e}return dO(n)?n:(v.console.log("Local storage "+$T+" was not valid format",n),{})}function gO(n){var t=mO();return Object.prototype.hasOwnProperty.call(t,n)?t[n]:[]}function pO(t,n){if(lO(t)){var e=mO(),o=Object.prototype.hasOwnProperty.call(e,n)?e[n]:[],r=C(o,function(n){return n!==t});e[n]=[t].concat(r).slice(0,5),function(n){if(!dO(n))throw new Error("Bad format for history:\n"+JSON.stringify(n));v.localStorage.setItem($T,JSON.stringify(n))}(e)}}function hO(n){return!!n}function vO(n){return P(Ok.makeMap(n,/[, ]/),hO)}function bO(n,t,e){var o=function(n,t){return QT.call(n,t)?on.some(n[t]):on.none()}(n,t).getOr(e);return cn(o)?on.some(o):on.none()}function yO(n){return on.some(n.file_picker_callback).filter(dn)}function xO(n,t){var e=function(n){var t=on.some(n.file_picker_types).filter(hO),e=on.some(n.file_browser_callback_types).filter(hO),o=t.or(e).map(vO);return yO(n).fold(function(){return!1},function(n){return o.fold(function(){return!0},function(n){return 0<wn(n).length&&n})})}(n);return ln(e)?e?yO(n):on.none():e[t]?yO(n):on.none()}function wO(t){return{getHistory:gO,addToHistory:pO,getLinkInformation:function(){return function(n){return!1===n.settings.typeahead_urls?on.none():on.some({targets:JT(n.getBody()),anchorTop:bO(n.settings,"anchor_top","#top").getOrUndefined(),anchorBottom:bO(n.settings,"anchor_bottom","#bottom").getOrUndefined()})}(t)},getValidationHandler:function(){return function(n){return on.from(n.settings.file_picker_validator_handler).filter(dn).orThunk(function(){return on.from(n.settings.filepicker_validator_handler).filter(dn)})}(t)},getUrlPicker:function(n){return function(r,i){return xO(r.settings,i).map(function(o){return function(t){return Ny(function(e){var n=Ok.extend({filetype:i},on.from(t.meta).getOr({}));o.call(r,function(n,t){if(!cn(n))throw new Error("Expected value to be string");if(t!==undefined&&!sn(t))throw new Error("Expected meta to be a object");e({value:n,meta:t})},t.value,n)})}})}(t,n)}}}function SO(n,t,e,o){var r=Ee(!1),i={shared:{providers:{icons:function(){return t.ui.registry.getAll().icons},menuItems:function(){return t.ui.registry.getAll().menuItems},translate:ih.translate},interpreter:function(n){return function(n,t){return zT(PT,n,t)}(n,i)},anchors:UT(t,e,o),getSink:function(){return an.value(n)}},urlinput:wO(t),styleselect:function(e){function o(n){return function(){return e.formatter.match(n)}}function r(t){return function(){var n=e.formatter.get(t);return n!==undefined?on.some({tag:0<n.length&&(n[0].inline||n[0].block)||"div",styleAttr:e.formatter.getCssText(t)}):on.none()}}var i=function(n){var t=n.items;return t!==undefined&&0<t.length?D(t,i):[n.format]},u=Ee([]),a=Ee([]),c=Ee([]),s=Ee([]),f=Ee(!1);e.on("init",function(){var n=Qk(e),t=nO(e,n,o,r);u.set(t),a.set(D(t,i))}),e.on("addStyleModifications",function(n){var t=nO(e,n.items,o,r);c.set(t),f.set(n.replace),s.set(D(t,i))});return{getData:function(){var n=f.get()?[]:u.get(),t=c.get();return n.concat(t)},getFlattenedKeys:function(){var n=f.get()?[]:a.get(),t=s.get();return n.concat(t)}}}(t),colorinput:$k(t),dialog:function(n){return{isDraggableModal:function(n){return function(){return function(n){return n.getParam("draggable_modal",!1,"boolean")}(n)}}(n)}}(t),isContextMenuOpen:function(){return r.get()},setContextMenuState:function(n){return r.set(n)}};return i}function CO(n,t,o){var e=function(n,e){return O(n,function(t,n){return e(n,t.len).fold(nn(t),function(n){return{len:n.finish(),list:t.list.concat([n])}})},{len:0,list:[]}).list}(n,function(n,t){var e=o(n);return on.some({element:nn(n),start:nn(t),finish:nn(t+e),width:nn(e)})}),r=C(e,function(n){return n.finish()<=t}),i=k(r,function(n,t){return n+t.width()},0),u=e.slice(r.length);return{within:nn(r),extra:nn(u),withinWidth:nn(i)}}function kO(n){return S(n,function(n){return n.element()})}function OO(n,t,e,o){var r=function(n,t,e){var o=CO(t,n,e);return 0===o.extra().length?on.some(o):on.none()}(n,t,e).getOrThunk(function(){return CO(t,n-e(o),e)}),i=r.within(),u=r.extra(),a=r.withinWidth();return 1===u.length&&u[0].width()<=e(o)?function(n,t,e){var o=kO(n.concat(t));return oE(o,[],e)}(i,u,a):1<=u.length?function(n,t,e,o){var r=kO(n).concat([e]);return oE(r,kO(t),o)}(i,u,o,a):function(n,t,e){return oE(kO(n),[],e)}(i,0,a)}function TO(n,t){var e=S(t,function(n){return cu(n)});eE.setGroups(n,e)}function EO(n,t,e,o){var r=Js(n,t,"primary"),i=Ks(n,t,"overflow-button"),u=$y.getCoupled(n,"overflowGroup");li(r.element(),"visibility","hidden");var a=function(n,t){return n.bind(function(t){return ka(t.element()).bind(function(n){return t.getSystem().getByDom(n).toOption()})}).orThunk(function(){return t.filter(bg.isFocused)})}(e,i);e.each(function(n){eE.setGroups(n,[])});var c=t.builtGroups.get();TO(r,c.concat([u]));var s=gu(r.element()),f=OO(s,c,function(n){return gu(n.element())},u);0===f.extra().length?(gg.remove(r,u),e.each(function(n){eE.setGroups(n,[])})):(TO(r,f.within()),e.each(function(n){TO(n,f.extra())})),hi(r.element(),"visibility"),vi(r.element()),e.each(function(t){i.each(function(n){return kg.set(n,o(t))}),a.each(bg.focus)})}function DO(o,n,t,e,r){var i="alloy.toolbar.toggle";return{uid:o.uid,dom:o.dom,components:n,behaviours:Vs(o.splitToolbarBehaviours,[$y.config({others:N(N({},r.coupling),{overflowGroup:function(t){return uE.sketch(N(N({},e["overflow-group"]()),{items:[Xg.sketch(N(N({},e["overflow-button"]()),{action:function(n){Yt(t,i)}}))]}))}})}),Jd("toolbar-toggle-events",[rr(i,function(n){r.apis.toggle(n)})])]),apis:N({setGroups:function(n,t){!function(n,t){var e=S(t,n.getSystem().build);o.builtGroups.set(e)}(n,t),r.apis.refresh(n)},getMoreButton:function(n){return function(n){return Ks(n,o,"overflow-button")}(n)}},r.apis),domModification:{attributes:{role:"group"}}}}function BO(n){return n.getSystem().isConnected()}function AO(n,t,e){var o=t.lazySink(n).getOrDie(),r=t.getAnchor(n),i=t.getOverflowBounds.map(function(n){return n()});_f.positionWithinBounds(o,r,e,i)}function _O(t,e){var n=Lf.getState($y.getCoupled(t,"sandbox"));EO(t,e,n,BO),n.each(function(n){return AO(t,e,n)})}function MO(t,e){Lf.getState($y.getCoupled(t,"sandbox")).each(function(n){return AO(t,e,n)})}function FO(t,n){return n.getAnimationRoot.fold(function(){return t.element()},function(n){return n(t)})}function IO(n){return n.dimension.property}function RO(n,t){return n.dimension.getDimension(t)}function VO(n,t){var e=FO(n,t);ai(e,[t.shrinkingClass,t.growingClass])}function NO(n,t){ri(n.element(),t.openClass),ei(n.element(),t.closedClass),li(n.element(),IO(t),"0px"),vi(n.element())}function HO(n,t){ri(n.element(),t.closedClass),ei(n.element(),t.openClass),hi(n.element(),IO(t))}function PO(n,t,e,o){e.setCollapsed(),li(n.element(),IO(t),RO(t,n.element())),vi(n.element()),VO(n,t),NO(n,t),t.onStartShrink(n),t.onShrunk(n)}function zO(n,t,e,o){var r=o.getOrThunk(function(){return RO(t,n.element())});e.setCollapsed(),li(n.element(),IO(t),r),vi(n.element());var i=FO(n,t);ri(i,t.growingClass),ei(i,t.shrinkingClass),NO(n,t),t.onStartShrink(n)}function LO(n,t,e){var o=RO(t,n.element());("0px"===o?PO:zO)(n,t,e,on.some(o))}function jO(n,t,e){var o=FO(n,t),r=ii(o,t.shrinkingClass),i=RO(t,n.element());HO(n,t);var u=RO(t,n.element());(r?function(){li(n.element(),IO(t),i),vi(n.element())}:function(){NO(n,t)})(),ri(o,t.shrinkingClass),ei(o,t.growingClass),HO(n,t),li(n.element(),IO(t),u),e.setExpanded(),t.onStartGrow(n)}function UO(n,t,e){var o=FO(n,t);return!0===ii(o,t.growingClass)}function WO(n,t,e){var o=FO(n,t);return!0===ii(o,t.shrinkingClass)}function GO(n){return gE.hasGrown(n)}function XO(n,t){var e=n.outerContainer;!function(n,t){var e=n.outerContainer.element();t&&(n.mothership.broadcastOn([jf()],{target:e}),n.uiMothership.broadcastOn([jf()],{target:e})),n.mothership.broadcastOn([xE],{readonly:t}),n.uiMothership.broadcastOn([xE],{readonly:t})}(n,t),Lt("*",e.element()).forEach(function(n){e.getSystem().getByDom(n).each(function(n){n.hasConfigured(kh)&&kh.set(n,t)})})}function YO(n,t){n.on("init",function(){n.readonly&&XO(t,!0)}),n.on("SwitchMode",function(){return XO(t,n.readonly)}),function(n){return n.getParam("readonly",!1,"boolean")}(n)&&n.setMode("readonly")}function qO(e){var n;return dc.config({channels:(n={},n[xE]={schema:wE,onReceive:function(n,t){e(n).each(function(n){!function(t,e){Lt("*",t.element()).forEach(function(n){t.getSystem().getByDom(n).each(function(n){n.hasConfigured(kh)&&kh.set(n,e)})})}(n,t.readonly)})}},n)})}function KO(n){var t=n.title.fold(function(){return{}},function(n){return{attributes:{title:n}}});return{dom:N({tag:"div",classes:["tox-toolbar__group"]},t),components:[uE.parts().items({})],items:n.items,markers:{itemSelector:"*:not(.tox-split-button) > .tox-tbtn:not([disabled]), .tox-split-button:not([disabled]), .tox-toolbar-nav-js:not([disabled])"},tgroupBehaviours:ya([Xy.config({}),bg.config({})])}}function JO(n){return uE.sketch(KO(n))}function $O(e,n,t){var o=Ri(function(n){var t=S(e.initGroups,JO);eE.setGroups(n,t)});return ya([dg.config({mode:n,onEscape:e.onEscape,selector:".tox-toolbar__group"}),Jd("toolbar-events",[o]),qO(t)])}function QO(n,t){var e=n.cyclicKeying?"cyclic":"acyclic";return{uid:n.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":KO({title:on.none(),items:[]}),"overflow-button":qC({name:"more",icon:on.some("more-drawer"),disabled:!1,tooltip:on.some("More..."),primary:!1,borderless:!1},on.none(),n.backstage.shared.providers)},splitToolbarBehaviours:$O(n,e,t)}}function ZO(r){var n=QO(r,fE.getOverflow),t=fE.parts().primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return fE.sketch(N(N({},n),{lazySink:r.getSink,getAnchor:function(){return r.backstage.shared.anchors.toolbarOverflow()},getOverflowBounds:function(){var n=r.moreDrawerData.lazyHeader().element(),t=Su(n),e=hr(n),o=Su(e);return xu(t.x()+4,o.y(),t.width()-8,o.height())},parts:N(N({},n.parts),{overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"]}}}),components:[t],markers:{overflowToggledClass:"tox-tbtn--enabled"}}))}function nT(n){var t=bE.parts().primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),e=bE.parts().overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}}),o=QO(n,bE.getOverflow);return bE.sketch(N(N({},o),{components:[t,e],markers:{openClass:"tox-toolbar__overflow--open",closedClass:"tox-toolbar__overflow--closed",growingClass:"tox-toolbar__overflow--growing",shrinkingClass:"tox-toolbar__overflow--shrinking",overflowToggledClass:"tox-tbtn--enabled"},onOpened:function(n){n.getSystem().broadcastOn([yE()],{type:"opened"})},onClosed:function(n){n.getSystem().broadcastOn([yE()],{type:"closed"})}}))}function tT(n){var t=n.cyclicKeying?"cyclic":"acyclic";return eE.sketch({uid:n.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(n.type===Ub.scrolling?["tox-toolbar--scrolling"]:[])},components:[eE.parts().groups({})],toolbarBehaviours:$O(n,t,nn(on.none()))})}function eT(n){return tt("toolbarbutton",CE,n)}function oT(n){return tt("menubutton",OE,n)}function rT(n){return tt("ToggleButton",DE,n)}function iT(t){return{isDisabled:function(){return kh.isDisabled(t)},setDisabled:function(n){return kh.set(t,n)}}}function uT(t){return{setActive:function(n){kg.set(t,n)},isActive:function(){return kg.isOn(t)},isDisabled:function(){return kh.isDisabled(t)},setDisabled:function(n){return kh.set(t,n)}}}function aT(n,t){return n.map(function(n){return{"aria-label":t.translate(n),title:t.translate(n)}}).getOr({})}function cT(t,e,n,o,r,i){function u(n){return ih.isRtl()&&vn(qE,n)?n+"-rtl":n}var a,c=ih.isRtl()&&t.exists(function(n){return vn(KE,n)});return{dom:{tag:"button",classes:["tox-tbtn"].concat(e.isSome()?["tox-tbtn--select"]:[]).concat(c?["tox-tbtn__icon-rtl"]:[]),attributes:aT(n,i)},components:Bh([t.map(function(n){return VC(u(n),i.icons)}),e.map(function(n){return HC(n,"tox-tbtn",i)})]),eventOrder:(a={},a[uo()]=["focusing","alloy.base.behaviour","common-button-display-events"],a),buttonBehaviours:ya([Jd("common-button-display-events",[rr(uo(),function(n,t){t.event().prevent(),Yt(n,YE)})])].concat(o.map(function(n){return LE.config({channel:n,initialData:{icon:t,text:e},renderComponents:function(n,t){return Bh([n.icon.map(function(n){return VC(u(n),i.icons)}),n.text.map(function(n){return HC(n,"tox-tbtn",i)})])}})}).toArray()).concat(r.getOr([])))}}function sT(n,t,e){var o=Ee(Z),r=cT(n.icon,n.text,n.tooltip,on.none(),on.none(),e);return Xg.sketch({dom:r.dom,components:r.components,eventOrder:sk,buttonBehaviours:ya([Jd("toolbar-button-events",[function(e){return Hi(function(t,n){Tp(e,t)(function(n){qt(t,ck,{buttonApi:n}),e.onAction(n)})})}({onAction:n.onAction,getApi:t.getApi}),Ep(t,o),Dp(t,o)]),Dh(n.disabled)].concat(t.toolbarButtonBehaviours))})}function fT(t,n){function e(e){return{isDisabled:function(){return kh.isDisabled(e)},setDisabled:function(n){return kh.set(e,n)},setIconFill:function(n,t){Ou(e.element(),'svg path[id="'+n+'"], rect[id="'+n+'"]').each(function(n){_r(n,"fill",t)})},setIconStroke:function(n,t){Ou(e.element(),'svg path[id="'+n+'"], rect[id="'+n+'"]').each(function(n){_r(n,"stroke",t)})},setActive:function(t){_r(e.element(),"aria-pressed",t),Ou(e.element(),"span").each(function(n){e.getSystem().getByDom(n).each(function(n){return kg.set(n,t)})})},isActive:function(){return Ou(e.element(),"span").exists(function(n){return e.getSystem().getByDom(n).exists(kg.isOn)})}}}var o,r=Hr("channel-update-split-dropdown-display"),i=Ee(Z),u={getApi:e,onSetup:t.onSetup};return XE.sketch({dom:{tag:"div",classes:["tox-split-button"],attributes:An({"aria-pressed":!1},aT(t.tooltip,n.providers))},onExecute:function(n){t.onAction(e(n))},onItemExecute:function(n,t,e){},splitDropdownBehaviours:ya([Eh(!1),Jd("split-dropdown-events",[rr(YE,bg.focus),Ep(u,i),Dp(u,i)]),Ew.config({})]),eventOrder:(o={},o[No()]=["alloy.base.behaviour","split-dropdown-events"],o),toggleClass:"tox-tbtn--enabled",lazySink:n.getSink,fetch:function(e,r,o){return function(t){return Ny(function(n){return r.fetch(n)}).map(function(n){return on.from(ab(Bn(Dv(Hr("menu-value"),n,function(n){r.onItemAction(e(t),n)},r.columns,r.presets,Ih.CLOSE_ON_EXECUTE,r.select.getOr(function(){return!1}),o),{movement:Bv(r.columns,r.presets),menuBehaviours:$p("auto"!==r.columns?[]:[Ri(function(o,n){up(o,4,fp(r.presets)).each(function(n){var t=n.numRows,e=n.numColumns;dg.setGridSize(o,t,e)})})])})))})}}(e,t,n.providers),parts:{menu:Cv(0,t.columns,t.presets)},components:[XE.parts().button(cT(t.icon,t.text,on.none(),on.some(r),on.some([kg.config({toggleClass:"tox-tbtn--enabled",toggleOnExecute:!1})]),n.providers)),XE.parts().arrow({dom:{tag:"button",classes:["tox-tbtn","tox-split-button__chevron"],innerHtml:xm("chevron-down",n.providers.icons)}}),XE.parts()["aria-descriptor"]({text:n.providers.translate("To open the popup, press Shift+Enter")})]})}function lT(o,r){return rr(ck,function(n,t){var e=function(n){return{hide:function(){return Yt(n,Ao())},getValue:function(){return nl.getValue(n)}}}(o.get(n));r.onAction(e,t.event().buttonApi())})}function dT(n,t,e){var o={backstage:{shared:{providers:e}}};return"contextformtogglebutton"===t.type?function(n,t,e){var o=t.original,r=(o.primary,c(o,["primary"])),i=et(rT(N(N({},r),{type:"togglebutton",onAction:function(){}})));return $E(i,e.backstage.shared.providers,[lT(n,t)])}(n,t,o):function(n,t,e){var o=t.original,r=(o.primary,c(o,["primary"])),i=et(eT(N(N({},r),{type:"button",onAction:function(){}})));return JE(i,e.backstage.shared.providers,[lT(n,t)])}(n,t,o)}function mT(n,t){var e=Math.max(t.x(),n.x()),o=n.right()-e,r=t.width()-(e-t.x());return{x:e,width:Math.min(o,r)}}function gT(n){var t=zb(n)||Lb(n)||Yb(n),e=bu(v.window),o=wu(Be.fromDom(n.getContentAreaContainer()));return n.inline&&!t?function(n,t,e){var o=mT(t,e),r=o.x,i=o.width;return xu(r,e.y(),i,e.height())}(0,o,e):n.inline?function(n,t,e){var o=mT(t,e),r=o.x,i=o.width,u=Be.fromDom(n.getContainer()),a=Ou(u,".tox-editor-header").getOr(u),c=wu(a),s=e.height(),f=e.y();if(c.y()>=t.bottom()){var l=Math.min(s+f,c.y());return xu(r,f,i,l-f)}var d=Math.max(f,c.bottom());return xu(r,d,i,s-(d-f))}(n,o,e):function(n,t,e){var o=mT(t,e),r=o.x,i=o.width,u=Be.fromDom(n.getContainer()),a=Ou(u,".tox-editor-header").getOr(u),c=wu(u),s=wu(a),f=Math.max(e.y(),t.y(),s.bottom()),l=c.bottom()-f,d=e.height()-(f-e.y()),m=Math.min(l,d);return xu(r,f,i,m)}(n,o,e)}function pT(t,n){return Au(n,function(n){return n.predicate(t.dom())?on.some({toolbarApi:n,elem:t}):on.none()})}function hT(o,r){return function(t){function n(){t.setActive(o.formatter.match(r));var n=o.formatter.formatChanged(r,t.setActive).unbind;e.set(on.some(n))}var e=Ee(on.none());return o.initialized?n():o.on("init",n),function(){return e.get().each(function(n){return n()})}}}function vT(t){return function(n){return function(){t.undoManager.transact(function(){t.focus(),t.execCommand("mceToggleFormat",!1,n.format)})}}}function bT(n,t,e){var o=e.dataset,r="basic"===o.type?function(){return S(o.data,function(n){return Zk(n,e.isSelectedFor,e.getPreviewFor)})}:o.getData;return{items:function(n,u,a){function r(n,t,e,o){var r=u.shared.providers.translate(n.title);if("separator"===n.type)return on.some({type:"separator",text:r});if("submenu"!==n.type)return on.some(N({type:"togglemenuitem",text:r,active:n.isSelected(o),disabled:e,onAction:a.onAction(n)},n.getStylePreview().fold(function(){return{}},function(n){return{meta:{style:n}}})));var i=D(n.getStyleItems(),function(n){return c(n,t,o)});return 0===t&&i.length<=0?on.none():on.some({type:"nestedmenuitem",text:r,disabled:i.length<=0,getSubmenuItems:function(){return D(n.getStyleItems(),function(n){return c(n,t,o)})}})}function i(n){var t=a.getCurrentValue(),e=a.shouldHide?0:1;return D(n,function(n){return c(n,e,t)})}var c=function(n,t,e){var o="formatter"===n.type&&a.isInvalid(n);return 0===t?o?[]:r(n,t,!1,e).toArray():r(n,t,o,e).toArray()};return{validateItems:i,getFetch:function(o,r){return function(n){var t=r(),e=i(t);n(UC(e,Ih.CLOSE_ON_EXECUTE,o,!1))}}}}(0,t,e),getStyleItems:r}}function yT(o,n,t){var e=bT(0,n,t),r=e.items,i=e.getStyleItems;return PC({text:t.icon.isSome()?on.none():on.some(""),icon:t.icon,tooltip:on.from(t.tooltip),role:on.none(),fetch:r.getFetch(n,i),onSetup:function(e){return t.setInitialValue.each(function(n){return n(e.getComponent())}),t.nodeChangeHandler.map(function(n){var t=n(e.getComponent());return o.on("NodeChange",t),function(){o.off("NodeChange",t)}}).getOr(Z)},getApi:function(n){return{getComponent:function(){return n}}},columns:1,presets:"normal",classes:t.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[]},"tox-tbtn",n.shared)}var xT,wT,ST,CT,kT=Al({name:"HtmlSelect",configFields:[ct("options"),Is("selectBehaviours",[bg,nl]),St("selectClasses",[]),St("selectAttributes",{}),ht("data")],factory:function(e,n){var t=S(e.options,function(n){return{dom:{tag:"option",value:n.value,innerHtml:n.text}}}),o=e.data.map(function(n){return q("initialValue",n)}).getOr({});return{uid:e.uid,dom:{tag:"select",classes:e.selectClasses,attributes:e.selectAttributes},components:t,behaviours:Vs(e.selectBehaviours,[bg.config({}),nl.config({store:N({mode:"manual",getValue:function(n){return bi(n.element())},setValue:function(n,t){T(e.options,function(n){return n.value===t}).isSome()&&yi(n.element(),t)}},o)})])}}}),OT=/* */Object.freeze({events:function(n,t){var e=n.stream.streams.setup(n,t);return tr([rr(n.event,e),Vi(function(){return t.cancel()})].concat(n.cancelEvent.map(function(n){return[rr(n,function(){return t.cancel()})]}).getOr([])))}}),TT=/* */Object.freeze({throttle:Nk,init:function(n){return n.stream.streams.state(n)}}),ET=[st("stream",it("mode",{throttle:[ct("delay"),St("stopEvent",!0),Zu("streams",{setup:function(n,t){var e=n.stream,o=$g(n.onStream,e.delay);return t.setTimer(o),function(n,t){o.throttle(n,t),e.stopEvent&&t.stop()}},state:Nk})]})),St("event","input"),ht("cancelEvent"),$u("onStream")],DT=xa({fields:ET,name:"streaming",active:OT,state:TT}),BT=function(n){Pk(n,function(n,t){return n.setSelectionRange(t.length,t.length)})},AT=nn("alloy.typeahead.itemexecute"),_T=nn([ht("lazySink"),ct("fetch"),St("minChars",5),St("responseTime",1e3),Ku("onOpen"),St("getHotspot",on.some),St("getAnchorOverrides",nn({})),St("layouts",on.none()),St("eventOrder",{}),Bt("model",{},[St("getDisplayText",function(n){return n.meta!==undefined&&n.meta.text!==undefined?n.meta.text:n.value}),St("selectsOver",!0),St("populateFromBrowse",!0)]),Ku("onSetValue"),Ju("onExecute"),Ku("onItemExecute"),St("inputClasses",[]),St("inputAttributes",{}),St("inputStyles",{}),St("matchWidth",!0),St("useMinWidth",!1),St("dismissOnBlur",!0),Yu(["openClass"]),ht("initialData"),Is("typeaheadBehaviours",[bg,nl,DT,dg,kg,$y]),At("previewing",function(){return Ee(!0)})].concat(yy()).concat(cx())),MT=nn([Sl({schema:[Xu()],name:"menu",overrides:function(o){return{fakeFocus:!0,onHighlight:function(t,e){o.previewing.get()?t.getSystem().getByUid(o.uid).each(function(n){zk(o.model,n,e).fold(function(){return cd.dehighlight(t,e)},function(n){return n()})}):t.getSystem().getByUid(o.uid).each(function(n){o.model.populateFromBrowse&&Hk(o.model,n,e)}),o.previewing.set(!1)},onExecute:function(n,t){return n.getSystem().getByUid(o.uid).toOption().map(function(n){return qt(n,AT(),{item:t}),!0})},onHover:function(n,t){o.previewing.set(!1),n.getSystem().getByUid(o.uid).each(function(n){o.model.populateFromBrowse&&Hk(o.model,n,t)})}}}})]),FT=_l({name:"Typeahead",configFields:_T(),partFields:MT(),factory:function(r,n,t,i){function e(n,t,e){r.previewing.set(!1);var o=$y.getCoupled(n,"sandbox");if(Lf.isOpen(o))nd.getCurrent(o).each(function(n){cd.getHighlighted(n).fold(function(){e(n)},function(){$t(o,n.element(),"keydown",t)})});else{tx(r,u(n),n,o,i,function(n){nd.getCurrent(n).each(e)},_y.HighlightFirst).get(Z)}}var o=ny(r),u=function(o){return function(n){return n.map(function(n){var t=R(n.menus),e=D(t,function(n){return C(n.items,function(n){return"item"===n.type})});return nl.getState(o).update(S(e,function(n){return n.data})),n})}},a=[bg.config({}),nl.config({onSetValue:r.onSetValue,store:N({mode:"dataset",getDataKey:function(n){return bi(n.element())},getFallbackEntry:function(n){return{value:n,meta:{}}},setValue:function(n,t){yi(n.element(),r.model.getDisplayText(t))}},r.initialData.map(function(n){return q("initialValue",n)}).getOr({}))}),DT.config({stream:{mode:"throttle",delay:r.responseTime,stopEvent:!1},onStream:function(n,t){var e=$y.getCoupled(n,"sandbox");if(bg.isFocused(n)&&bi(n.element()).length>=r.minChars){var o=nd.getCurrent(e).bind(function(n){return cd.getHighlighted(n).map(nl.getValue)});r.previewing.set(!0);tx(r,u(n),n,e,i,function(n){nd.getCurrent(e).each(function(n){o.fold(function(){r.model.selectsOver&&cd.highlightFirst(n)},function(t){cd.highlightBy(n,function(n){return nl.getValue(n).value===t.value}),cd.getHighlighted(n).orThunk(function(){return cd.highlightFirst(n),on.none()})})})},_y.HighlightFirst).get(Z)}},cancelEvent:_o()}),dg.config({mode:"special",onDown:function(n,t){return e(n,t,cd.highlightFirst),on.some(!0)},onEscape:function(n){var t=$y.getCoupled(n,"sandbox");return Lf.isOpen(t)?(Lf.close(t),on.some(!0)):on.none()},onUp:function(n,t){return e(n,t,cd.highlightLast),on.some(!0)},onEnter:function(t){var n=$y.getCoupled(t,"sandbox"),e=Lf.isOpen(n);if(e&&!r.previewing.get())return nd.getCurrent(n).bind(function(n){return cd.getHighlighted(n)}).map(function(n){return qt(t,AT(),{item:n}),!0});var o=nl.getValue(t);return Yt(t,_o()),r.onExecute(n,t,o),e&&Lf.close(n),on.some(!0)}}),kg.config({toggleClass:r.markers.openClass,aria:{mode:"expanded"}}),$y.config({others:{sandbox:function(n){return ux(r,n,{onOpen:function(){return kg.on(n)},onClose:function(){return kg.off(n)}})}}}),Jd("typeaheadevents",[Hi(function(n){var t=Z;ox(r,u(n),n,i,t,_y.HighlightFirst).get(Z)}),rr(AT(),function(n,t){var e=$y.getCoupled(n,"sandbox");Hk(r.model,n,t.event().item()),Yt(n,_o()),r.onItemExecute(n,e,t.event().item(),nl.getValue(n)),Lf.close(e),BT(n)})].concat(r.dismissOnBlur?[rr(Co(),function(n){var t=$y.getCoupled(n,"sandbox");ka(t.element()).isNone()&&Lf.close(t)})]:[]))];return{uid:r.uid,dom:ty(Bn(r,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:N(N({},o),Vs(r.typeaheadBehaviours,a)),eventOrder:r.eventOrder}}}),IT=function(i){return N(N({},i),{toCached:function(){return IT(i.toCached())},bindFuture:function(t){return IT(i.bind(function(n){return n.fold(function(n){return Hy(an.error(n))},function(n){return t(n)})}))},bindResult:function(t){return IT(i.map(function(n){return n.bind(t)}))},mapResult:function(t){return IT(i.map(function(n){return n.map(t)}))},mapError:function(t){return IT(i.map(function(n){return n.mapError(t)}))},foldResult:function(t,e){return i.map(function(n){return n.fold(t,e)})},withTimeout:function(n,r){return IT(Ny(function(t){var e=!1,o=v.setTimeout(function(){e=!0,t(an.error(r()))},n);i.get(function(n){e||(v.clearTimeout(o),t(n))})}))}})},RT=Lk,VT={type:"separator"},NT=Hr("aria-invalid"),HT={bar:Kk(function(n,t){return function(n,t){return{dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:S(n.items,t.interpreter)}}(n,t.shared)}),collection:Kk(function(n,t){return qk(n,t.shared.providers)}),alertbanner:Kk(function(n,t){return function(t,n){return Gb.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in","tox-notification--"+t.level]},components:[{dom:{tag:"div",classes:["tox-notification__icon"]},components:[Xg.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:xm(t.icon,n.icons),attributes:{title:n.translate(t.iconTooltip)}},action:function(n){qt(n,fy,{name:"alert-banner",value:t.url})}})]},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:n.translate(t.text)}}]})}(n,t.shared.providers)}),input:Kk(function(n,t){return function(n,t){return Vk({name:n.name,multiline:!1,label:n.label,inputMode:n.inputMode,placeholder:n.placeholder,flex:!1,disabled:n.disabled,classname:"tox-textfield",validation:on.none(),maximized:n.maximized},t)}(n,t.shared.providers)}),textarea:Kk(function(n,t){return function(n,t){return Vk({name:n.name,multiline:!0,label:n.label,inputMode:on.none(),placeholder:n.placeholder,flex:!0,disabled:n.disabled,classname:"tox-textarea",validation:on.none(),maximized:n.maximized},t)}(n,t.shared.providers)}),label:Kk(function(n,t){return function(n,t){var e={dom:{tag:"label",innerHtml:t.providers.translate(n.label),classes:["tox-label"]}},o=S(n.items,t.interpreter);return{dom:{tag:"div",classes:["tox-form__group"]},components:[e].concat(o),behaviours:ya([TS(),gg.config({}),IS(on.none()),dg.config({mode:"acyclic"})])}}(n,t.shared)}),iframe:(xT=function(n,t){return Sw(n,t.shared.providers)},function(n,t,e){var o=Bn(t,{source:"dynamic"});return Kk(xT)(n,o,e)}),button:Kk(function(n,t){return nk(n,t.shared.providers)}),checkbox:Kk(function(n,t){return function(e,t){function n(n){return n.element().dom().click(),on.some(!0)}function o(n){return{dom:{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+n],innerHtml:xm("checked"===n?"selected":"unselected",t.icons)}}}var r=nl.config({store:{mode:"manual",getValue:function(n){return n.element().dom().checked},setValue:function(n,t){n.element().dom().checked=t}}}),i=by.parts().field({factory:{sketch:l},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:ya([TS(),kh.config({disabled:e.disabled}),Xy.config({}),bg.config({}),r,dg.config({mode:"special",onEnter:n,onSpace:n,stopSpaceKeyup:!0}),Jd("checkbox-events",[rr(vo(),function(n,t){qt(n,ay,{name:e.name})})])])}),u=by.parts().label({dom:{tag:"span",classes:["tox-checkbox__label"],innerHtml:t.translate(e.label)},behaviours:ya([Ew.config({})])}),a=bm({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[o("checked"),o("unchecked")]});return by.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[i,a.asSpec(),u],fieldBehaviours:ya([kh.config({disabled:e.disabled,disableClass:"tox-checkbox--disabled",onDisabled:function(n){by.getField(n).each(kh.disable)},onEnabled:function(n){by.getField(n).each(kh.enable)}})])})}(n,t.shared.providers)}),colorinput:Kk(function(n,t){return sx(n,t.shared,t.colorinput)}),colorpicker:Kk(function(n){function t(n){return"tox-"+n}var e=OS(hw,t),r=bm(e.sketch({dom:{tag:"div",classes:[t("color-picker-container")],attributes:{role:"presentation"}},onValidHex:function(n){qt(n,fy,{name:"hex-valid",value:!0})},onInvalidHex:function(n){qt(n,fy,{name:"hex-valid",value:!1})}}));return{dom:{tag:"div"},components:[r.asSpec()],behaviours:ya([nl.config({store:{mode:"manual",getValue:function(n){var t=r.get(n);return nd.getCurrent(t).bind(function(n){return nl.getValue(n).hex}).map(function(n){return"#"+n}).getOr("")},setValue:function(n,t){var e=/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/.exec(t),o=r.get(n);nd.getCurrent(o).fold(function(){v.console.log("Can not find form")},function(n){nl.setValue(n,{hex:on.from(e[1]).getOr("")}),bS.getField(n,"hex").each(function(n){Yt(n,ho())})})}}}),TS()])}}),dropzone:Kk(function(n,t){return yw(n,t.shared.providers)}),grid:Kk(function(n,t){return function(n,t){return{dom:{tag:"div",classes:["tox-form__grid","tox-form__grid--"+n.columns+"col"]},components:S(n.items,t.interpreter)}}(n,t.shared)}),selectbox:Kk(function(n,t){return function(e,t){var n=S(e.items,function(n){return{text:t.translate(n.text),value:n.value}}),o=e.label.map(function(n){return Ay(n,t)}),r=by.parts().field({dom:{},selectAttributes:{size:e.size},options:n,factory:kT,selectBehaviours:ya([kh.config({disabled:e.disabled}),Xy.config({}),Jd("selectbox-change",[rr(vo(),function(n,t){qt(n,ay,{name:e.name})})])])}),i=1<e.size?on.none():on.some({dom:{tag:"div",classes:["tox-selectfield__icon-js"],innerHtml:xm("chevron-down",t.icons)}}),u={dom:{tag:"div",classes:["tox-selectfield"]},components:H([[r],i.toArray()])};return by.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:H([o.toArray(),[u]]),fieldBehaviours:ya([kh.config({disabled:e.disabled,onDisabled:function(n){by.getField(n).each(kh.disable)},onEnabled:function(n){by.getField(n).each(kh.enable)}})])})}(n,t.shared.providers)}),sizeinput:Kk(function(n,t){return uk(n,t.shared.providers)}),urlinput:Kk(function(n,t){return Yk(n,t,t.urlinput)}),customeditor:Kk(function(e){var o=Ee(on.none()),t=bm({dom:{tag:e.tag}}),r=Ee(on.none());return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:ya([Jd("editor-foo-events",[Ri(function(n){t.getOpt(n).each(function(t){(!function(n){return Object.prototype.hasOwnProperty.call(n,"init")}(e)?AS.load(e.scriptId,e.scriptUrl).then(function(n){return n(t.element().dom(),e.settings)}):e.init(t.element().dom())).then(function(t){r.get().each(function(n){t.setValue(n)}),r.set(on.none()),o.set(on.some(t))})})})]),nl.config({store:{mode:"manual",getValue:function(){return o.get().fold(function(){return r.get().getOr("")},function(n){return n.getValue()})},setValue:function(n,t){o.get().fold(function(){r.set(on.some(t))},function(n){return n.setValue(t)})}}}),TS()]),components:[t.asSpec()]}}),htmlpanel:Kk(function(n){return"presentation"===n.presets?Gb.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:n.html}}):Gb.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:n.html,attributes:{role:"document"}},containerBehaviours:ya([Xy.config({}),bg.config({})])})}),imagetools:Kk(function(n,t){return Rk(n,t.shared.providers)}),table:Kk(function(n,t){return function(n,t){function e(n){return{dom:{tag:"th",innerHtml:t.translate(n)}}}function o(n){return{dom:{tag:"td",innerHtml:t.translate(n)}}}function r(n){return{dom:{tag:"tr"},components:S(n,o)}}var i,u;return{dom:{tag:"table",classes:["tox-dialog__table"]},components:[(u=n.header,{dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:S(u,e)}]}),(i=n.cells,{dom:{tag:"tbody"},components:S(i,r)})],behaviours:ya([Xy.config({}),bg.config({})])}}(n,t.shared.providers)}),panel:Kk(function(n,t){return function(n,t){return{dom:{tag:"div",classes:n.classes},components:S(n.items,t.shared.interpreter)}}(n,t)})},PT={field:function(n,t){return t}},zT=function(t,e,o){return Nn(HT,e.type).fold(function(){return v.console.error('Unknown factory type "'+e.type+'", defaulting to container: ',e),e},function(n){return n(t,e,o)})},LT=nn(function(n,t){!function(n,t){var e=Nu.max(n,t,["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"]);li(n,"max-width",e+"px")}(n,Math.floor(t))}),jT={valignCentre:[],alignCentre:[],alignLeft:[],alignRight:[],right:[],left:[],bottom:[],top:[]},UT=function(n,t,e){function o(){return Be.fromDom(n.getBody())}var r=Jb(n);return{toolbar:function(n,t,e){return e?function(){return{anchor:"node",root:n(),node:on.from(n()),bubble:Ta(-12,-12,jT),layouts:{onRtl:function(){return[hm]},onLtr:function(){return[vm]}},overrides:{maxHeightFunction:kf()}}}:function(){return{anchor:"hotspot",hotspot:t(),bubble:Ta(-12,12,jT),layouts:{onRtl:function(){return[aa]},onLtr:function(){return[ca]}},overrides:{maxHeightFunction:kf()}}}}(o,t,r),toolbarOverflow:function(n){return function(){return{anchor:"hotspot",hotspot:n(),overrides:{maxWidthFunction:LT()},layouts:{onRtl:function(){return[aa,ca]},onLtr:function(){return[ca,aa]}}}}}(e),banner:function(n,t,e){return e?function(){return{anchor:"node",root:n(),node:on.from(n()),layouts:{onRtl:function(){return[Wg]},onLtr:function(){return[Wg]}}}}:function(){return{anchor:"hotspot",hotspot:t(),layouts:{onRtl:function(){return[ic]},onLtr:function(){return[ic]}}}}}(o,t,r),cursor:function(t,n){return function(){return{anchor:"selection",root:n(),getSelection:function(){var n=t.selection.getRng();return on.some(Dc.range(Be.fromDom(n.startContainer),n.startOffset,Be.fromDom(n.endContainer),n.endOffset))}}}}(n,o),node:function(t){return function(n){return{anchor:"node",root:t(),node:n}}}(o)}},WT=[{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:"strike-through",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:"Align",items:[{title:"Left",icon:"align-left",format:"alignleft"},{title:"Center",icon:"align-center",format:"aligncenter"},{title:"Right",icon:"align-right",format:"alignright"},{title:"Justify",icon:"align-justify",format:"alignjustify"}]}],GT=function(n){return O(n,function(n,t){if(function(n){return Tn(n,"items")}(t)){var e=GT(t.items);return{customFormats:n.customFormats.concat(e.customFormats),formats:n.formats.concat([{title:t.title,items:e.formats}])}}if(function(n){return Tn(n,"inline")}(t)||function(n){return Tn(n,"block")}(t)||function(n){return Tn(n,"selector")}(t)){var o="custom-"+t.title.toLowerCase();return{customFormats:n.customFormats.concat([{name:o,format:t}]),formats:n.formats.concat([{title:t.title,format:o,icon:t.icon}])}}return N(N({},n),{formats:n.formats.concat(t)})},{customFormats:[],formats:[]})},XT=Ok.trim,YT=tO("true"),qT=tO("false"),KT=function(n){return function(n){for(;n=n.parentNode;){var t=n.contentEditable;if(t&&"inherit"!==t)return YT(n)}return!1}(n)&&!qT(n)},JT=function(n){var t=sO(n);return C(function(n){return S(C(n,uO),aO)}(t).concat(function(n){return S(C(n,rO),cO)}(t)),fO)},$T="tinymce-url-history",QT=Object.prototype.hasOwnProperty,ZT="contexttoolbar-hide",nE=nn([ct("dom"),St("shell",!0),Is("toolbarBehaviours",[gg])]),tE=nn([Cl({name:"groups",overrides:function(n){return{behaviours:ya([gg.config({})])}}})]),eE=_l({name:"Toolbar",configFields:nE(),partFields:tE(),factory:function(t,n,e,o){var r=function(n){return t.shell?on.some(n):Ks(n,t,"groups")},i=t.shell?{behaviours:[gg.config({})],components:[]}:{behaviours:[],components:n};return{uid:t.uid,dom:t.dom,components:i.components,behaviours:Vs(t.toolbarBehaviours,i.behaviours),apis:{setGroups:function(n,t){r(n).fold(function(){throw v.console.error("Toolbar was defined to not be a shell, but no groups container was specified in components"),new Error("Toolbar was defined to not be a shell, but no groups container was specified in components")},function(n){gg.set(n,t)})}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(n,t,e){n.setGroups(t,e)}}}),oE=lr("within","extra","withinWidth"),rE=nn([ct("items"),Yu(["itemSelector"]),Is("tgroupBehaviours",[dg])]),iE=nn([kl({name:"items",unit:"item"})]),uE=_l({name:"ToolbarGroup",configFields:rE(),partFields:iE(),factory:function(n,t,e,o){return{uid:n.uid,dom:n.dom,components:t,behaviours:Vs(n.tgroupBehaviours,[dg.config({mode:"flow",selector:n.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}}}}),aE=nn([Is("splitToolbarBehaviours",[$y]),At("builtGroups",function(){return Ee([])})]),cE=nn([Yu(["overflowToggledClass"]),ct("getAnchor"),xt("getOverflowBounds"),ct("lazySink")].concat(aE())),sE=nn([wl({factory:eE,schema:nE(),name:"primary"}),Sl({factory:eE,schema:nE(),name:"overflow",overrides:function(t){return{toolbarBehaviours:ya([dg.config({mode:"cyclic",onEscape:function(n){return Ks(n,t,"overflow-button").each(bg.focus),on.none()}})])}}}),Sl({name:"overflow-button",overrides:function(n){return{dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:ya([kg.config({toggleClass:n.markers.overflowToggledClass,aria:{mode:"expanded"},toggleOnExecute:!1})])}}}),Sl({name:"overflow-group"})]),fE=_l({name:"SplitFloatingToolbar",configFields:cE(),partFields:sE(),factory:function(t,n,e,o){return DO(t,n,0,o,{coupling:{sandbox:function(n){return function(o,e){var r=Eu();return{dom:{tag:"div",attributes:{id:r.id()}},behaviours:ya([dg.config({mode:"special",onEscape:function(n){return Lf.close(n),on.some(!0)}}),Lf.config({onOpen:function(n,t){_O(o,e),Ks(o,e,"overflow-button").each(function(n){kg.on(n),r.link(n.element())}),dg.focusIn(t)},onClose:function(){Ks(o,e,"overflow-button").each(function(n){kg.off(n),bg.focus(n),r.unlink(n.element())})},isPartOf:function(n,t,e){return ju(t,e)||ju(o,e)},getAttachPoint:function(){return e.lazySink(o).getOrDie()}}),dc.config({channels:N({},Ds({isExtraPart:nn(!1),doReposition:function(){return MO(o,e)}}))})])}}(n,t)}},apis:{refresh:function(n){return _O(n,t)},toggle:function(n){return function(n,t,e){var o=$y.getCoupled(n,"sandbox");Lf.isOpen(o)?Lf.close(o):Lf.open(o,e.overflow())}(n,0,o)},getOverflow:function(n){return Lf.getState($y.getCoupled(n,"sandbox"))},reposition:function(n){return MO(n,t)}}})},apis:{setGroups:function(n,t,e){n.setGroups(t,e)},refresh:function(n,t){n.refresh(t)},reposition:function(n,t){n.reposition(t)},getMoreButton:function(n,t){return n.getMoreButton(t)},getOverflow:function(n,t){return n.getOverflow(t)},toggle:function(n,t){n.toggle(t)}}}),lE=/* */Object.freeze({refresh:function(n,t,e){if(e.isExpanded()){hi(n.element(),IO(t));var o=RO(t,n.element());li(n.element(),IO(t),o)}},grow:function(n,t,e){e.isExpanded()||jO(n,t,e)},shrink:function(n,t,e){e.isExpanded()&&LO(n,t,e)},immediateShrink:function(n,t,e){e.isExpanded()&&PO(n,t,e)},hasGrown:function(n,t,e){return e.isExpanded()},hasShrunk:function(n,t,e){return e.isCollapsed()},isGrowing:UO,isShrinking:WO,isTransitioning:function(n,t,e){return!0===UO(n,t)||!0===WO(n,t)},toggleGrow:function(n,t,e){(e.isExpanded()?LO:jO)(n,t,e)},disableTransitions:VO}),dE=/* */Object.freeze({exhibit:function(n,t){var e=t.expanded;return Gr(e?{classes:[t.openClass],styles:{}}:{classes:[t.closedClass],styles:q(t.dimension.property,"0px")})},events:function(e,o){return tr([fr(yo(),function(n,t){t.event().raw().propertyName===e.dimension.property&&(VO(n,e),o.isExpanded()&&hi(n.element(),e.dimension.property),(o.isExpanded()?e.onGrown:e.onShrunk)(n))})])}}),mE=[ct("closedClass"),ct("openClass"),ct("shrinkingClass"),ct("growingClass"),ht("getAnimationRoot"),Ku("onShrunk"),Ku("onStartShrink"),Ku("onGrown"),Ku("onStartGrow"),St("expanded",!1),st("dimension",it("property",{width:[Zu("property","width"),Zu("getDimension",function(n){return gu(n)+"px"})],height:[Zu("property","height"),Zu("getDimension",function(n){return fu(n)+"px"})]}))],gE=xa({fields:mE,name:"sliding",active:dE,apis:lE,state:/* */Object.freeze({init:function(n){var t=Ee(n.expanded);return tu({isExpanded:function(){return!0===t.get()},isCollapsed:function(){return!1===t.get()},setCollapsed:d(t.set,!1),setExpanded:d(t.set,!0),readState:function(){return"expanded: "+t.get()}})}})}),pE=nn([Yu(["closedClass","openClass","shrinkingClass","growingClass","overflowToggledClass"]),Ku("onOpened"),Ku("onClosed")].concat(aE())),hE=nn([wl({factory:eE,schema:nE(),name:"primary"}),wl({factory:eE,schema:nE(),name:"overflow",overrides:function(t){return{toolbarBehaviours:ya([gE.config({dimension:{property:"height"},closedClass:t.markers.closedClass,openClass:t.markers.openClass,shrinkingClass:t.markers.shrinkingClass,growingClass:t.markers.growingClass,onShrunk:function(n){Ks(n,t,"overflow-button").each(function(n){kg.off(n),bg.focus(n)}),t.onClosed(n)},onGrown:function(n){dg.focusIn(n),t.onOpened(n)},onStartGrow:function(n){Ks(n,t,"overflow-button").each(kg.on)}}),dg.config({mode:"acyclic",onEscape:function(n){return Ks(n,t,"overflow-button").each(bg.focus),on.some(!0)}})])}}}),Sl({name:"overflow-button",overrides:function(n){return{buttonBehaviours:ya([kg.config({toggleClass:n.markers.overflowToggledClass,aria:{mode:"pressed"},toggleOnExecute:!1})])}}}),Sl({name:"overflow-group"})]),vE=function(n,t){var e=Ks(n,t,"overflow");EO(n,t,e,GO),e.each(gE.refresh)},bE=_l({name:"SplitSlidingToolbar",configFields:pE(),partFields:hE(),factory:function(t,n,e,o){return DO(t,n,0,o,{coupling:{},apis:{refresh:function(n){return vE(n,t)},toggle:function(n){return function(t,e){Ks(t,e,"overflow").each(function(n){vE(t,e),gE.toggleGrow(n)})}(n,t)},getOverflow:function(n){return Ks(n,t,"overflow")}}})},apis:{setGroups:function(n,t,e){n.setGroups(t,e)},refresh:function(n,t){n.refresh(t)},getMoreButton:function(n,t){return n.getMoreButton(t)},getOverflow:function(n,t){return n.getOverflow(t)},toggle:function(n,t){n.toggle(t)}}}),yE=nn(Hr("toolbar-height-change")),xE="silver.readonly",wE=de([(wT="readonly",st(wT,Ce))]),SE=[Et("disabled",!1),yt("tooltip"),yt("icon"),yt("text"),Dt("onSetup",function(){return Z})],CE=de([ft("type"),dt("onAction")].concat(SE)),kE=[yt("text"),yt("tooltip"),yt("icon"),dt("fetch"),Dt("onSetup",function(){return Z})],OE=de(g([ft("type")],kE)),TE=de([ft("type"),yt("tooltip"),yt("icon"),yt("text"),xt("select"),dt("fetch"),Dt("onSetup",function(){return Z}),Tt("presets","normal",["normal","color","listpreview"]),St("columns",1),dt("onAction"),dt("onItemAction")]),EE=[Et("active",!1)].concat(SE),DE=de(EE.concat([ft("type"),dt("onAction")])),BE=[Dt("predicate",function(){return!1}),Tt("scope","node",["node","editor"]),Tt("position","selection",["node","selection","line"])],AE=SE.concat([St("type","contextformbutton"),St("primary",!1),dt("onAction"),At("original",l)]),_E=EE.concat([St("type","contextformbutton"),St("primary",!1),dt("onAction"),At("original",l)]),ME=SE.concat([St("type","contextformbutton")]),FE=EE.concat([St("type","contextformtogglebutton")]),IE=it("type",{contextformbutton:AE,contextformtogglebutton:_E}),RE=de([St("type","contextform"),Dt("initValue",function(){return""}),yt("label"),pt("commands",IE),vt("launch",it("type",{contextformbutton:ME,contextformtogglebutton:FE}))].concat(BE)),VE=de([St("type","contexttoolbar"),ft("items")].concat(BE)),NE=/* */Object.freeze({getState:function(n,t,e){return e}}),HE=/* */Object.freeze({events:function(i,u){function o(o,r){i.updateState.each(function(n){var t=n(o,r);u.set(t)}),i.renderComponents.each(function(n){var t=n(r,u.get()),e=S(t,o.getSystem().build);hs(o,e)})}return tr([rr(Oo(),function(n,t){var e=i.channel;vn(t.channels(),e)&&o(n,t.data())}),Ri(function(t,n){i.initialData.each(function(n){o(t,n)})})])}}),PE=/* */Object.freeze({init:function(n){var t=Ee(on.none());return{readState:function(){return t.get().fold(function(){return"none"},function(n){return n})},get:function(){return t.get()},set:function(n){return t.set(n)},clear:function(){return t.set(on.none())}}}}),zE=[ct("channel"),ht("renderComponents"),ht("updateState"),ht("initialData")],LE=xa({fields:zE,name:"reflecting",active:HE,apis:NE,state:PE}),jE=nn([ct("toggleClass"),ct("fetch"),$u("onExecute"),St("getHotspot",on.some),St("getAnchorOverrides",nn({})),St("layouts",on.none()),$u("onItemExecute"),ht("lazySink"),ct("dom"),Ku("onOpen"),Is("splitDropdownBehaviours",[$y,dg,bg]),St("matchWidth",!1),St("useMinWidth",!1),St("eventOrder",{}),ht("role")].concat(cx())),UE=wl({factory:Xg,schema:[ct("dom")],name:"arrow",defaults:function(n){return{buttonBehaviours:ya([bg.revoke()])}},overrides:function(t){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(n){n.getSystem().getByUid(t.uid).each(Kt)},buttonBehaviours:ya([kg.config({toggleOnExecute:!1,toggleClass:t.toggleClass})])}}}),WE=wl({factory:Xg,schema:[ct("dom")],name:"button",defaults:function(n){return{buttonBehaviours:ya([bg.revoke()])}},overrides:function(e){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(t){t.getSystem().getByUid(e.uid).each(function(n){e.onExecute(n,t)})}}}}),GE=nn([UE,WE,Cl({factory:{sketch:function(n){return{uid:n.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:n.text}}}},schema:[ct("text")],name:"aria-descriptor"}),Sl({schema:[Xu()],name:"menu",defaults:function(o){return{onExecute:function(t,e){t.getSystem().getByUid(o.uid).each(function(n){o.onItemExecute(n,t,e)})}}}}),Zy()]),XE=_l({name:"SplitDropdown",configFields:jE(),partFields:GE(),factory:function(o,n,t,e){function r(n){nd.getCurrent(n).each(function(n){cd.highlightFirst(n),dg.focusIn(n)})}function i(n){ox(o,function(n){return n},n,e,r,_y.HighlightFirst).get(Z)}function u(n){var t=Js(n,o,"button");return Kt(t),on.some(!0)}var a=An(tr([Ri(function(e,n){Ks(e,o,"aria-descriptor").each(function(n){var t=Hr("aria");_r(n.element(),"id",t),_r(e.element(),"aria-describedby",t)})})]),im(on.some(i))),c={repositionMenus:function(n){kg.isOn(n)&&ax(n)}};return{uid:o.uid,dom:o.dom,components:n,apis:c,eventOrder:N(N({},o.eventOrder),{"alloy.execute":["disabling","toggling","alloy.base.behaviour"]}),events:a,behaviours:Vs(o.splitDropdownBehaviours,[$y.config({others:{sandbox:function(n){var t=Js(n,o,"arrow");return ux(o,n,{onOpen:function(){kg.on(t),kg.on(n)},onClose:function(){kg.off(t),kg.off(n)}})}}}),dg.config({mode:"special",onSpace:u,onEnter:u,onDown:function(n){return i(n),on.some(!0)}}),bg.config({}),kg.config({toggleOnExecute:!1,aria:{mode:"expanded"}})]),domModification:{attributes:{role:o.role.getOr("button"),"aria-haspopup":!0}}}},apis:{repositionMenus:function(n,t){return n.repositionMenus(t)}}}),YE=Hr("focus-button"),qE=["checklist","ordered-list"],KE=["indent","outdent","table-insert-column-after","table-insert-column-before","unordered-list"],JE=function(n,t,e){return sT(n,{toolbarButtonBehaviours:[].concat(0<e.length?[Jd("toolbarButtonWith",e)]:[]),getApi:iT,onSetup:n.onSetup},t)},$E=function(n,t,e){return Bn(sT(n,{toolbarButtonBehaviours:[gg.config({}),kg.config({toggleClass:"tox-tbtn--enabled",aria:{mode:"pressed"},toggleOnExecute:!1})].concat(0<e.length?[Jd("toolbarToggleButtonWith",e)]:[]),getApi:uT,onSetup:n.onSetup},t))},QE=function(n,t,e){var o=t.label.fold(function(){return{}},function(n){return{"aria-label":n}}),r=bm(xy.sketch({inputClasses:["tox-toolbar-textfield","tox-toolbar-nav-js"],data:t.initValue(),inputAttributes:o,selectOnFocus:!0,inputBehaviours:ya([dg.config({mode:"special",onEnter:function(n){return i.findPrimary(n).map(function(n){return Kt(n),!0})},onLeft:function(n,t){return t.cut(),on.none()},onRight:function(n,t){return t.cut(),on.none()}})])})),i=function(t,n,e){var o=S(n,function(n){return bm(dT(t,n,e))});return{asSpecs:function(){return S(o,function(n){return n.asSpec()})},findPrimary:function(e){return Au(n,function(n,t){return n.primary?on.from(o[t]).bind(function(n){return n.getOpt(e)}).filter(b(kh.isDisabled)):on.none()})}}}(r,t.commands,e.shared.providers);return tT({type:n,uid:Hr("context-toolbar"),initGroups:[{title:on.none(),items:[r.asSpec()]},{title:on.none(),items:i.asSpecs()}],onEscape:on.none,cyclicKeying:!0,backstage:e,getSink:function(){return an.error("")}})},ZE=function(t,e){function n(n){return n.dom()===e.getBody()}var o=Be.fromDom(e.selection.getNode());return pT(o,t.inNodeScope).orThunk(function(){return pT(o,t.inEditorScope).orThunk(function(){return function(n,t,e){for(var o=n.dom(),r=dn(e)?e:nn(!1);o.parentNode;){o=o.parentNode;var i=Be.fromDom(o),u=t(i);if(u.isSome())return u;if(r(i))break}return on.none()}(o,function(n){return pT(n,t.inNodeScope)},n)})})},nD=function(e,r){function o(t,e){var o=et(function(n){return tt("ContextForm",RE,n)}(e));(n[t]=o).launch.map(function(n){c["form:"+t]=N(N({},e.launch),{type:"contextformtogglebutton"===n.type?"togglebutton":"button",onAction:function(){r(o)}})}),"editor"===o.scope?a.push(o):u.push(o),s[t]=o}function i(t,e){(function(n){return tt("ContextToolbar",VE,n)})(e).each(function(n){"editor"===e.scope?a.push(n):u.push(n),s[t]=n})}var n={},u=[],a=[],c={},s={},t=wn(e);return bn(t,function(n){var t=e[n];"contextform"===t.type?o(n,t):"contexttoolbar"===t.type&&i(n,t)}),{forms:n,inNodeScope:u,inEditorScope:a,lookupTable:s,formNavigators:c}},tD=Hr("forward-slide"),eD=Hr("backward-slide"),oD=Hr("change-slide-event"),rD="tox-pop--resizing";(CT=ST=ST||{})[CT.SemiColon=0]="SemiColon",CT[CT.Space=1]="Space";function iD(n,t,e,o){return{type:"basic",data:function(n){return S(n,function(n){var t=n,e=n,o=n.split("=");return 1<o.length&&(t=o[0],e=o[1]),{title:t,format:e}})}(function(n,t){return t===ST.SemiColon?n.replace(/;$/,"").split(";"):n.split(" ")}(Nn(n.settings,t).getOr(e),o))}}function uD(e){function t(n){var t=T(HB,function(n){return e.formatter.match(n.format)}).fold(function(){return"left"},function(n){return n.title.toLowerCase()});qt(n,lk,{icon:"align-"+t})}var n=on.some(function(n){return function(){return t(n)}}),o=on.some(function(n){return t(n)}),r=function(n){return{type:"basic",data:n}}(HB);return{tooltip:"Align",icon:on.some("align-left"),isSelectedFor:function(n){return function(){return e.formatter.match(n)}},getCurrentValue:nn(on.none()),getPreviewFor:function(n){return function(){return on.none()}},onAction:vT(e),setInitialValue:o,nodeChangeHandler:n,dataset:r,shouldHide:!1,isInvalid:function(n){return!e.formatter.canApply(n.format)}}}function aD(n){var t=n.split(/\s*,\s*/);return S(t,function(n){return n.replace(/^['"]+|['"]+$/g,"")})}function cD(r){function i(){function e(n){return n?aD(n)[0]:""}var n=r.queryCommandValue("FontName"),t=u.data,o=n?n.toLowerCase():"";return{matchOpt:T(t,function(n){var t=n.format;return t.toLowerCase()===o||e(t).toLowerCase()===e(o).toLowerCase()}).orThunk(function(){return function(n){var t;return 0===n.indexOf("-apple-system")&&(t=aD(n.toLowerCase()),B(PB,function(n){return-1<t.indexOf(n.toLowerCase())}))}(o)?on.from({title:"System Font",format:o}):on.none()}),font:n}}function t(n){var t=i(),e=t.matchOpt,o=t.font,r=e.fold(function(){return o},function(n){return n.title});qt(n,fk,{text:r})}var n=on.some(function(n){return function(){return t(n)}}),e=on.some(function(n){return t(n)}),u=iD(r,"font_formats","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",ST.SemiColon);return{tooltip:"Fonts",icon:on.none(),isSelectedFor:function(t){return function(n){return n.exists(function(n){return n.format===t})}},getCurrentValue:function(){return i().matchOpt},getPreviewFor:function(n){return function(){return on.some({tag:"div",styleAttr:-1===n.indexOf("dings")?"font-family:"+n:""})}},onAction:function(n){return function(){r.undoManager.transact(function(){r.focus(),r.execCommand("FontName",!1,n.format)})}},setInitialValue:e,nodeChangeHandler:n,dataset:u,shouldHide:!1,isInvalid:function(){return!1}}}function sD(n,t){return/[0-9.]+px$/.test(n)?function(n,t){var e=Math.pow(10,t);return Math.round(n*e)/e}(72*parseInt(n,10)/96,t||0)+"pt":n}function fD(e){function i(){var o=on.none(),r=u.data,i=e.queryCommandValue("FontSize");if(i)for(var n=function(n){var t=sD(i,n),e=function(n){return V(zB,n).getOr("")}(t);o=T(r,function(n){return n.format===i||n.format===t||n.format===e})},t=3;o.isNone()&&0<=t;t--)n(t);return{matchOpt:o,px:i}}function t(n){var t=i(),e=t.matchOpt,o=t.px,r=e.fold(function(){return o},function(n){return n.title});qt(n,fk,{text:r})}var n=nn(nn(on.none())),o=on.some(function(n){return function(){return t(n)}}),r=on.some(function(n){return t(n)}),u=iD(e,"fontsize_formats","8pt 10pt 12pt 14pt 18pt 24pt 36pt",ST.Space);return{tooltip:"Font sizes",icon:on.none(),isSelectedFor:function(t){return function(n){return n.exists(function(n){return n.format===t})}},getPreviewFor:n,getCurrentValue:function(){return i().matchOpt},onAction:function(n){return function(){e.undoManager.transact(function(){e.focus(),e.execCommand("FontSize",!1,n.format)})}},setInitialValue:r,nodeChangeHandler:o,dataset:u,shouldHide:!1,isInvalid:function(){return!1}}}function lD(e,n,t){var o=n();return Au(t,function(t){return T(o,function(n){return e.formatter.matchNode(t,n.format)})}).orThunk(function(){return e.formatter.match("p")?on.some({title:"Paragraph",format:"p"}):on.none()})}function dD(n){var t=n.selection.getStart(!0)||n.getBody();return n.dom.getParents(t,function(){return!0},n.getBody())}function mD(o){function e(n,t){var e=function(n){return lD(o,function(){return r.data},n)}(n).fold(function(){return"Paragraph"},function(n){return n.title});qt(t,fk,{text:e})}var n=on.some(function(t){return function(n){return e(n.parents,t)}}),t=on.some(function(n){var t=dD(o);e(t,n)}),r=iD(o,"block_formats","Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre",ST.SemiColon);return{tooltip:"Blocks",icon:on.none(),isSelectedFor:function(n){return function(){return o.formatter.match(n)}},getCurrentValue:nn(on.none()),getPreviewFor:function(t){return function(){var n=o.formatter.get(t);return on.some({tag:0<n.length&&(n[0].inline||n[0].block)||"div",styleAttr:o.formatter.getCssText(t)})}},onAction:vT(o),setInitialValue:t,nodeChangeHandler:n,dataset:r,shouldHide:!1,isInvalid:function(n){return!o.formatter.canApply(n.format)}}}function gD(i,n){function e(n,t){var e=function(n){var t=n.items;return t!==undefined&&0<t.length?D(t,e):[{title:n.title,format:n.format}]},o=D(Qk(i),e),r=lD(i,function(){return o},n).fold(function(){return"Paragraph"},function(n){return n.title});qt(t,fk,{text:r})}var t=on.some(function(t){return function(n){return e(n.parents,t)}}),o=on.some(function(n){var t=dD(i);e(t,n)});return{tooltip:"Formats",icon:on.none(),isSelectedFor:function(n){return function(){return i.formatter.match(n)}},getCurrentValue:nn(on.none()),getPreviewFor:function(t){return function(){var n=i.formatter.get(t);return n!==undefined?on.some({tag:0<n.length&&(n[0].inline||n[0].block)||"div",styleAttr:i.formatter.getCssText(t)}):on.none()}},onAction:vT(i),setInitialValue:o,nodeChangeHandler:t,shouldHide:i.getParam("style_formats_autohide",!1,"boolean"),isInvalid:function(n){return!i.formatter.canApply(n.format)},dataset:n}}function pD(o,r){return function(n,t){var e=o(n).mapError(function(n){return ye(n)}).getOrDie();return r(e,t)}}function hD(n){var t=n.toolbar,e=n.buttons;return!1===t?[]:t===undefined||!0===t?function(e){var n=S(LB,function(n){var t=C(n.items,function(n){return Tn(e,n)||Tn(UB,n)});return{name:n.name,items:t}});return C(n,function(n){return 0<n.items.length})}(e):cn(t)?function(n){var t=n.split("|");return S(t,function(n){return{items:n.trim().split(" ")}})}(t):function(n){return h(n,function(n){return Tn(n,"name")&&Tn(n,"items")})}(t)?t:(v.console.error("Toolbar type should be string, string[], boolean or ToolbarGroup[]"),[])}function vD(t,e,o,r,n){return V(e,o.toLowerCase()).orThunk(function(){return n.bind(function(n){return Au(n,function(n){return V(e,n+o.toLowerCase())})})}).fold(function(){return V(UB,o.toLowerCase()).map(function(n){return n(t,r)}).orThunk(function(){return on.none()})},function(n){return function(t,e){return V(jB,t.type).fold(function(){return v.console.error("skipping button defined by",t),on.none()},function(n){return on.some(n(t,e))})}(n,r)})}function bD(e,o,r,i){var n=hD(o),t=S(n,function(n){var t=D(n.items,function(n){return 0===n.trim().length?[]:vD(e,o.buttons,n,r,i).toArray()});return{title:on.from(e.translate(n.name)),items:t}});return C(t,function(n){return 0<n.items.length})}function yD(e){return(gi(e,"position").is("fixed")?on.none():yr(e)).orThunk(function(){var n=Be.fromTag("span");Sr(e,n);var t=yr(n);return zi(n),t}).map(mu).getOrThunk(function(){return Ru(0,0)})}function xD(t){return function(n){return n.translate(-t.left(),-t.top())}}function wD(t){return function(n){return n.translate(t.left(),t.top())}}function SD(e){return function(n,t){return O(e,function(n,t){return t(n)},Ru(n,t))}}function CD(n,t,e){return n.fold(SD([wD(e),xD(t)]),SD([xD(t)]),SD([]))}function kD(n,t,e){return n.fold(SD([wD(e)]),SD([]),SD([wD(t)]))}function OD(n,t,e){return n.fold(SD([]),SD([xD(e)]),SD([wD(t),xD(e)]))}function TD(n,t,e){return n.fold(function(n,t){return{position:"absolute",left:n+"px",top:t+"px"}},function(n,t){return{position:"absolute",left:n-e.left()+"px",top:t-e.top()+"px"}},function(n,t){return{position:"fixed",left:n+"px",top:t+"px"}})}function ED(n,i,u,a){function t(o,r){return function(n,t){var e=o(i,u,a);return r(n.getOr(e.left()),t.getOr(e.top()))}}return n.fold(t(OD,eA.offset),t(kD,eA.absolute),t(CD,eA.fixed))}function DD(n,t){var e=n.element();ei(e,t.transitionClass),ri(e,t.fadeOutClass),ei(e,t.fadeInClass),t.onShow(n)}function BD(n,t){var e=n.element();ei(e,t.transitionClass),ri(e,t.fadeInClass),ei(e,t.fadeOutClass),t.onHide(n)}function AD(n,t,e){return B(n,function(n){switch(n){case"bottom":return function(n,t){return n.bottom()<=t.bottom()}(t,e);case"top":return function(n,t){return n.y()>=t.y()}(t,e)}})}function _D(n,t){return Fr(n,t)?on.some(parseInt(Mr(n,t),10)):on.none()}function MD(r,n){return _D(r,n.leftAttr).bind(function(o){return _D(r,n.topAttr).map(function(n){var t=gu(r),e=fu(r);return xu(o,n,t,e)})})}function FD(n,t,e){var o=Mr(n,t.positionAttr);switch(function(n,t){Ir(n,t.leftAttr),Ir(n,t.topAttr),Ir(n,t.positionAttr)}(n,t),o){case"static":return on.some(uA["static"]());case"absolute":return on.some(uA.absolute(e.x(),e.y()));default:return on.none()}}function ID(n,t,e,o,r){var i=wu(n);if(AD(t.modes,i,e))return on.none();var u=r(),a=mi(n,"position");!function(n,t,e,o,r){_r(n,t.leftAttr,e),_r(n,t.topAttr,o),_r(n,t.positionAttr,r)}(n,t,i.x(),i.y(),a);var c=rA(i.x(),i.y()),s=CD(c,o,u),f=rA(e.x(),e.y()),l=CD(f,o,u),d=i.y()<=e.y()?l.top():l.top()+e.height()-i.height();return on.some(uA.fixed(s.left(),d))}function RD(n,t,e,o,r){var i=n.element();return gi(i,"position").is("fixed")?function(t,e,o){return MD(t,e).filter(function(n){return AD(e.modes,n,o)}).bind(function(n){return FD(t,e,n)})}(i,t,e):ID(i,t,e,o,r)}function VD(t,n){bn(["left","top","position"],function(n){return hi(t.element(),n)}),n.onUndocked(t)}function ND(n,t,e,o,r){var i=TD(r,0,o);di(n.element(),i),("fixed"===i.position?t.onDocked:t.onUndocked)(n)}function HD(o,n,r,i,u){void 0===u&&(u=!1),n.contextual.each(function(e){e.lazyContext(o).each(function(n){var t=function(n,t){return n.y()<t.bottom()&&n.bottom()>t.y()}(n,i);t!==r.isVisible()&&(r.setVisible(t),u&&!t?(ui(o.element(),[e.fadeOutClass]),e.onHide(o)):(t?DD:BD)(o,e))})})}function PD(r,i,n){var u=r.element();n.setDocked(!1),function(n,t){var e=n.element();return MD(e,t).bind(function(n){return FD(e,t,n)})}(r,i).each(function(n){n.fold(function(){return VD(r,i)},function(n,t){var e=pr(u),o=(hu(e),yD(u));ND(r,i,0,o,rA(n,t))},Z)}),n.setVisible(!0),i.contextual.each(function(n){ai(u,[n.fadeInClass,n.fadeOutClass,n.transitionClass]),n.onShow(r)}),aA(r,i,n)}function zD(n,t,e){e.isDocked()&&PD(n,t,e)}function LD(o){var r=o.element();br(r).each(function(n){if(lA.isDocked(o)){var t=gu(n);li(r,"width",t+"px");var e=lu(r);li(n,"padding-top",e+"px")}else hi(r,"width"),hi(n,"padding-top")})}function jD(n,t){t?(ri(n,dA.fadeOutClass),ui(n,[dA.transitionClass,dA.fadeInClass])):(ri(n,dA.fadeInClass),ui(n,[dA.fadeOutClass,dA.transitionClass]))}function UD(n,t){var e=Be.fromDom(n.getContainer());t?(ei(e,mA),ri(e,gA)):(ei(e,gA),ri(e,mA))}function WD(i,e){function o(t){e().each(function(n){return t(n.element())})}function n(n){i.inline||LD(n),UD(i,lA.isDocked(n)),n.getSystem().broadcastOn([Uf()],{}),e().each(function(n){return n.getSystem().broadcastOn([Uf()],{})})}var r=Ee(on.none()),t=i.inline?[]:function(){var n;return[dc.config({channels:(n={},n[yE()]={onReceive:LD},n)})]}();return g([bg.config({}),lA.config({leftAttr:"data-dock-left",topAttr:"data-dock-top",positionAttr:"data-dock-pos",contextual:N({lazyContext:function(n){var t=lu(n.element()),e=i.inline?i.getContentAreaContainer():i.getContainer(),o=wu(Be.fromDom(e)),r=o.height()-t;return on.some(xu(o.x(),o.y(),o.width(),r))},onShow:function(){o(function(n){return jD(n,!0)})},onShown:function(t){o(function(n){return ai(n,[dA.transitionClass,dA.fadeInClass])}),r.get().each(function(n){!function(t,e){var o=pr(e);Ca(o).filter(function(n){return!jt(e,n)}).filter(function(n){return jt(n,Be.fromDom(o.dom().body))||to(t,n)}).each(function(){return Sa(e)})}(t.element(),n),r.set(on.none())})},onHide:function(n){r.set(function(n,t){return ka(n).orThunk(function(){return t().toOption().bind(function(n){return ka(n.element())})})}(n.element(),e)),o(function(n){return jD(n,!1)})},onHidden:function(){o(function(n){return ai(n,[dA.transitionClass])})}},dA),modes:["top"],onDocked:n,onUndocked:n})],t)}function GD(n){return"<alloy.field."+n+">"}function XD(n){return{element:function(){return n.element().dom()}}}function YD(e,o){var r=S(wn(o),function(n){var t=o[n],e=et(function(n){return tt("sidebar",TA,n)}(t));return{name:n,getApi:XD,onSetup:e.onSetup,onShow:e.onShow,onHide:e.onHide}});return S(r,function(n){var t=Ee(Z);return e.slot(n.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:$p([Ep(n,t),Dp(n,t),rr(jo(),function(t,n){var e=n.event();T(r,function(n){return n.name===e.name()}).each(function(n){(e.visible()?n.onShow:n.onHide)(n.getApi(t))})})])})})}function qD(n,t){nd.getCurrent(n).each(function(n){return gg.set(n,[function(t){return OA.sketch(function(n){return{dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:YD(n,t),slotBehaviours:$p([Ri(function(n){return OA.hideAllSlots(n)})])}})}(t)])})}function KD(n){return nd.getCurrent(n).bind(function(n){return gE.isGrowing(n)||gE.hasGrown(n)?nd.getCurrent(n).bind(function(t){return T(OA.getSlotNames(t),function(n){return OA.isShowing(t,n)})}):on.none()})}function JD(n,t,e){var o=n.element();!0===t?(gg.set(n,[function(n){return{dom:{tag:"div",attributes:{"aria-label":n.translate("Loading...")},classes:["tox-throbber__busy-spinner"]},components:[{dom:sp('<div class="tox-spinner"><div></div><div></div><div></div></div>')}],behaviours:ya([dg.config({mode:"special",onTab:function(){return on.some(!0)},onShiftTab:function(){return on.some(!0)}}),bg.config({})])}}(e)]),hi(o,"display"),Ir(o,"aria-hidden")):(gg.set(n,[]),li(o,"display","none"),_r(o,"aria-hidden","true"))}function $D(n){return"string"==typeof n?n.split(" "):n}function QD(e,o){var r=An(NA,o.menus),t=0<wn(o.menus).length,n=o.menubar===undefined||!0===o.menubar?$D("file edit view insert format tools table help"):$D(!1===o.menubar?"":o.menubar),i=C(n,function(n){return t&&o.menus.hasOwnProperty(n)&&o.menus[n].hasOwnProperty("items")||NA.hasOwnProperty(n)}),u=S(i,function(n){var t=r[n];return function(n,e,t){var o=function(n){return n.getParam("removed_menuitems","")}(t).split(/[ ,]/);return{text:n.title,getItems:function(){return D(n.items,function(n){var t=n.toLowerCase();return 0===t.trim().length?[]:x(o,function(n){return n===t})?[]:"separator"===t||"|"===t?[{type:"separator"}]:e.menuItems[t]?[e.menuItems[t]]:[]})}}}({title:t.title,items:$D(t.items)},o,e)});return C(u,function(n){return 0<n.getItems().length&&x(n.getItems(),function(n){return"separator"!==n.type})})}function ZD(n,t){var e,o=function(n){var t=n.settings,e=t.skin,o=t.skin_url;if(!1!==e){var r=e||"oxide";o=o?n.documentBaseURI.toAbsolute(o):Xb.baseURL+"/skins/ui/"+r}return o}(t);o&&(e=o+"/skin.min.css",t.contentCSS.push(o+(n?"/content.inline":"/content")+".min.css")),!1===function(n){return!1===n.getParam("skin")}(t)&&e?Vh.DOM.styleSheetLoader.load(e,HA(t)):HA(t)()}function nB(t,n,e,o){var r=n.outerContainer,i=e.toolbar,u=e.buttons;if(h(i,cn)){var a=i.map(function(n){return bD(t,{toolbar:n,buttons:u},{backstage:o},on.none())});VA.setToolbars(r,a)}else VA.setToolbar(r,bD(t,e,{backstage:o},on.none()))}function tB(n){return function(n){var t=Ib(n),e=Nb(n),o=Pb(n);return XA(t).map(function(n){return GA(n,e,o)})}(n).getOr(Ib(n))}function eB(n){var t=Rb(n),e=Vb(n),o=Hb(n);return XA(t).map(function(n){return GA(n,e,o)})}function oB(n,t){return function(){n.execCommand("mceToggleFormat",!1,t)}}function rB(n){!function(e){Ok.each([{name:"bold",text:"Bold",icon:"bold"},{name:"italic",text:"Italic",icon:"italic"},{name:"underline",text:"Underline",icon:"underline"},{name:"strikethrough",text:"Strikethrough",icon:"strike-through"},{name:"subscript",text:"Subscript",icon:"subscript"},{name:"superscript",text:"Superscript",icon:"superscript"}],function(n,t){e.ui.registry.addToggleButton(n.name,{tooltip:n.text,icon:n.icon,onSetup:hT(e,n.name),onAction:oB(e,n.name)})});for(var n=1;n<=6;n++){var t="h"+n;e.ui.registry.addToggleButton(t,{text:t.toUpperCase(),tooltip:"Heading "+n,onSetup:hT(e,t),onAction:oB(e,t)})}}(n),function(t){Ok.each([{name:"cut",text:"Cut",action:"Cut",icon:"cut"},{name:"copy",text:"Copy",action:"Copy",icon:"copy"},{name:"paste",text:"Paste",action:"Paste",icon:"paste"},{name:"help",text:"Help",action:"mceHelp",icon:"help"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all"},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting"},{name:"remove",text:"Remove",action:"Delete",icon:"remove"}],function(n){t.ui.registry.addButton(n.name,{tooltip:n.text,icon:n.icon,onAction:function(){return t.execCommand(n.action)}})})}(n),function(t){Ok.each([{name:"blockquote",text:"Blockquote",action:"mceBlockQuote",icon:"quote"}],function(n){t.ui.registry.addToggleButton(n.name,{tooltip:n.text,icon:n.icon,onAction:function(){return t.execCommand(n.action)},onSetup:hT(t,n.name)})})}(n)}function iB(n,t,e){function o(){return!!t.undoManager&&t.undoManager[e]()}function r(){n.setDisabled(t.readonly||!o())}return n.setDisabled(!o()),t.on("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",r),function(){return t.off("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",r)}}function uB(n,t){return{anchor:"makeshift",x:n,y:t}}function aB(n){return"longpress"===n.type||0===n.type.indexOf("touch")}function cB(n,t){var e=Vh.DOM.getPos(n);return function(n,t,e){return uB(n.x+t,n.y+e)}(t,e.x,e.y)}function sB(n,t){return"contextmenu"===t.type?n.inline?function(n){if(aB(n)){var t=n.touches[0];return uB(t.pageX,t.pageY)}return uB(n.pageX,n.pageY)}(t):cB(n.getContentAreaContainer(),function(n){if(aB(n)){var t=n.touches[0];return uB(t.clientX,t.clientY)}return uB(n.clientX,n.clientY)}(t)):e_(n)}function fB(n){return{anchor:"node",node:on.some(Be.fromDom(n.selection.getNode())),root:Be.fromDom(n.getBody())}}function lB(n,t,e,o,r,i){var u=e(),a=function(n,t,e){return e?fB(n):sB(n,t)}(n,t,i);UC(u,Ih.CLOSE_ON_EXECUTE,o,!1).map(function(n){t.preventDefault(),Ug.showMenuAt(r,a,{menu:{markers:Sv("normal")},data:n})})}function dB(t,e,n,o,r,i){var u=function(n,t){var e=t?fB(n):e_(n);return N({bubble:Ta(0,12,r_),layouts:o_,overrides:{maxWidthFunction:LT(),maxHeightFunction:kf()}},e)}(t,i);UC(n,Ih.CLOSE_ON_EXECUTE,o,!0).map(function(n){e.preventDefault(),Ug.showMenuWithinBounds(r,u,{menu:{markers:Sv("normal")},data:n,type:"horizontal"},function(){return on.some(gT(t))}),t.fire(ZT)})}function mB(t,e,o,r,i,u){function n(){var n=o();dB(t,e,n,r,i,u)}var a=Ht(),c=a.os.isiOS(),s=a.os.isOSX(),f=a.os.isAndroid();if(!s&&!c||u)f&&!u&&t.selection.setCursorLocation(e.target,0),n();else{var l=function(){!function(n){function t(){Kg.setEditorTimeout(n,function(){n.selection.setRng(e)},10),i()}var e=n.selection.getRng();n.once("touchend",t);function o(n){n.preventDefault(),n.stopImmediatePropagation()}n.on("mousedown",o,!0);function r(){return i()}n.once("longpresscancel",r);var i=function(){n.off("touchend",t),n.off("longpresscancel",r),n.off("mousedown",o)}}(t),n()};!function(n,t){var e=n.selection;if(e.isCollapsed()||t.touches.length<1)return!1;var o=t.touches[0],r=e.getRng();return Wc(n.getWin(),Dc.domRange(r)).exists(function(n){return n.left()<=o.clientX&&n.right()>=o.clientX&&n.top()<=o.clientY&&n.bottom()>=o.clientY})}(t,e)?(t.once("selectionchange",l),t.once("touchend",function(){return t.off("selectionchange",l)})):l()}}function gB(n){return"string"==typeof n?n.split(/[ ,]/):n}function pB(n){return cn(n)?"|"===n:"separator"===n.type}function hB(n,t){if(0===t.length)return n;var e=F(n).filter(function(n){return!pB(n)}).fold(function(){return[]},function(n){return[c_]});return n.concat(e).concat(t).concat([c_])}function vB(i,n,t){function e(n){return Ug.hide(a)}function o(o){var n="longpress"===o.type;if(i_(i)&&o.preventDefault(),!function(n,t){return t.ctrlKey&&!i_(n)}(i,o)&&!a_(i)){var r=!n&&(2!==o.button||o.target===i.getBody());(u()?mB:lB)(i,o,function(){var n=r?i.selection.getStart(!0):o.target,t=i.ui.registry.getAll(),e=u_(i);return function(r,n,i){var t=O(n,function(n,t){if(Tn(r,t)){var e=r[t].update(i);if(cn(e))return hB(n,e.split(" "));if(0<e.length){var o=S(e,s_);return hB(n,o)}return n}return n.concat([t])},[]);return 0<t.length&&pB(t[t.length-1])&&t.pop(),t}(t.contextMenus,e,n)},t,a,r)}}var u=Ht().deviceType.isTouch,a=au(Ug.sketch({dom:{tag:"div"},lazySink:n,onEscape:function(){return i.focus()},onShow:function(){return t.setContextMenuState(!0)},onHide:function(){return t.setContextMenuState(!1)},fireDismissalEventInstead:{},inlineBehaviours:ya([Jd("dismissContextMenu",[rr(Po(),function(n,t){Lf.close(n),i.focus()})])])}));i.on("init",function(){var n="ResizeEditor ScrollContent ScrollWindow longpresscancel"+(u()?"":" ResizeWindow");i.on(n,e),i.on(u()?"longpress":"longpress contextmenu",o)})}function bB(n,t){n.getSystem().addToGui(t),function(n){br(n.element()).filter(Ai).each(function(t){gi(t,"z-index").each(function(n){_r(t,f_,n)}),li(t,"z-index",mi(n.element(),"z-index"))})}(t)}function yB(n){!function(n){br(n.element()).filter(Ai).each(function(n){var t=Mr(n,f_);Fr(n,f_)?li(n,"z-index",t):hi(n,"z-index"),Ir(n,f_)})}(n),n.getSystem().removeFromGui(n)}function xB(n,t,e){return n.getSystem().build(Gb.sketch({dom:{styles:{left:"0px",top:"0px",width:"100%",height:"100%",position:"fixed","z-index":"1000000000000000"},classes:[t]},events:e}))}function wB(n,t,e,o){return function(n,t){var e=n.element(),o=parseInt(Mr(e,t.leftAttr),10),r=parseInt(Mr(e,t.topAttr),10);return isNaN(o)||isNaN(r)?on.none():on.some(Ru(o,r))}(n,t).fold(function(){return e},function(n){return iA(n.left()+o.left(),n.top()+o.top())})}function SB(n,t,e,o,r,i){var u=wB(n,t,e,o),a=t.mustSnap?l_(n,t,u,r,i):d_(n,t,u,r,i),c=CD(u,r,i);return function(n,t,e){var o=n.element();_r(o,t.leftAttr,e.left()+"px"),_r(o,t.topAttr,e.top()+"px")}(n,t,c),a.fold(function(){return{coord:iA(c.left(),c.top()),extra:on.none()}},function(n){return{coord:n.output(),extra:n.extra()}})}function CB(n,t){!function(n,t){var e=n.element();Ir(e,t.leftAttr),Ir(e,t.topAttr)}(n,t)}function kB(n,e,o,r){return Au(n,function(n){var t=n.sensor();return function(n,t,e,o,r,i){var u=kD(n,r,i),a=kD(t,r,i);return Math.abs(u.left()-a.left())<=e&&Math.abs(u.top()-a.top())<=o}(e,t,n.range().left(),n.range().top(),o,r)?on.some({output:nn(ED(n.output(),e,o,r)),extra:n.extra}):on.none()})}function OB(t){return function(n,t,e,o){return n.isSome()&&t.isSome()&&e.isSome()?on.some(o(n.getOrDie(),t.getOrDie(),e.getOrDie())):on.none()}(gi(t,"left"),gi(t,"top"),gi(t,"position"),function(n,t,e){return("fixed"===e?iA:oA)(parseInt(n,10),parseInt(t,10))}).getOrThunk(function(){var n=mu(t);return rA(n.left(),n.top())})}function TB(e,n,o,r,i,u,t){return function(n,t,e,o,r){var i=r.bounds,u=kD(t,e,o),a=as(u.left(),i.x(),i.x()+i.width()-r.width),c=as(u.top(),i.y(),i.y()+i.height()-r.height),s=rA(a,c);return t.fold(function(){var n=OD(s,e,o);return oA(n.left(),n.top())},function(){return s},function(){var n=CD(s,e,o);return iA(n.left(),n.top())})}(0,n.fold(function(){var n=function(n,e,o){return n.fold(function(n,t){return eA.offset(n+e,t+o)},function(n,t){return eA.absolute(n+e,t+o)},function(n,t){return eA.fixed(n+e,t+o)})}(o,u.left(),u.top()),t=CD(n,r,i);return iA(t.left(),t.top())},function(t){var n=SB(e,t,o,u,r,i);return n.extra.each(function(n){t.onSensor(e,n)}),n.coord}),r,i,t)}function EB(n,t){return{bounds:n.getBounds(),height:lu(t.element()),width:pu(t.element())}}function DB(t,e,n,o,r){var i=n.update(o,r),u=n.getStartData().getOrThunk(function(){return EB(e,t)});i.each(function(n){!function(n,t,e,o){var r=t.getTarget(n.element());if(t.repositionTarget){var i=pr(n.element()),u=hu(i),a=yD(r),c=OB(r),s=TB(n,t.snaps,c,u,a,o,e),f=TD(s,0,a);di(r,f)}t.onDrag(n,r,o)}(t,e,u,n)})}function BB(t,n,e,o){n.each(yB),e.snaps.each(function(n){CB(t,n)});var r=e.getTarget(t.element());o.reset(),e.onDrop(t,r)}function AB(n,r,i,u,t,e){return n.fold(function(){return S_.snap({sensor:rA(i-20,u-20),range:Ru(t,e),output:rA(on.some(i),on.some(u)),extra:{td:r}})},function(n){var t=i-20,e=u-20,o=n.element().dom().getBoundingClientRect();return S_.snap({sensor:rA(t,e),range:Ru(40,40),output:rA(on.some(i-o.width/2),on.some(u-o.height/2)),extra:{td:r}})})}function _B(n,o,r){return{getSnapPoints:n,leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:function(n,t){var e=t.td;!function(n,t){return n.exists(function(n){return jt(n,t)})}(o.get(),e)&&(o.set(on.some(e)),r(e))},mustSnap:!0}}function MB(n){return bm(Xg.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:ya([S_.config({mode:C_.deviceType.isTouch()?"touch":"mouse",blockerClass:"blocker",snaps:n}),Ew.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"],touchstart:["dragging","alloy.base.behaviour"]}}))}var FB,IB,RB,VB,NB,HB=[{title:"Left",icon:"align-left",format:"alignleft"},{title:"Center",icon:"align-center",format:"aligncenter"},{title:"Right",icon:"align-right",format:"alignright"},{title:"Justify",icon:"align-justify",format:"alignjustify"}],PB=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"],zB={"8pt":"1","10pt":"2","12pt":"3","14pt":"4","18pt":"5","24pt":"6","36pt":"7"},LB=[{name:"history",items:["undo","redo"]},{name:"styles",items:["styleselect"]},{name:"formatting",items:["bold","italic"]},{name:"alignment",items:["alignleft","aligncenter","alignright","alignjustify"]},{name:"indentation",items:["outdent","indent"]},{name:"permanent pen",items:["permanentpen"]},{name:"comments",items:["addcomment"]}],jB={button:pD(eT,function(n,t){return function(n,t){return JE(n,t,[])}(n,t.backstage.shared.providers)}),togglebutton:pD(rT,function(n,t){return function(n,t){return $E(n,t,[])}(n,t.backstage.shared.providers)}),menubutton:pD(oT,function(n,t){return GC(n,"tox-tbtn",t.backstage,on.none())}),splitbutton:pD(function(n){return tt("SplitButton",TE,n)},function(n,t){return fT(n,t.backstage.shared)}),styleSelectButton:function(n,t){return function(n,t){var e=N({type:"advanced"},t.styleselect);return yT(n,t,gD(n,e))}(n,t.backstage)},fontsizeSelectButton:function(n,t){return function(n,t){return yT(n,t,fD(n))}(n,t.backstage)},fontSelectButton:function(n,t){return function(n,t){return yT(n,t,cD(n))}(n,t.backstage)},formatButton:function(n,t){return function(n,t){return yT(n,t,mD(n))}(n,t.backstage)},alignMenuButton:function(n,t){return function(n,t){return yT(n,t,uD(n))}(n,t.backstage)}},UB={styleselect:jB.styleSelectButton,fontsizeselect:jB.fontsizeSelectButton,fontselect:jB.fontSelectButton,formatselect:jB.formatButton,align:jB.alignMenuButton},WB={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"]},GB={maxHeightFunction:kf(),maxWidthFunction:LT()},XB={onLtr:function(){return[rc,ic,sa,aa,fa,ca,Wg,Gg,hm,gm,vm,pm]},onRtl:function(){return[rc,ic,fa,ca,sa,aa,Wg,Gg,vm,pm,hm,gm]}},YB={onLtr:function(){return[ic,aa,ca,sa,fa,rc,Wg,Gg,hm,gm,vm,pm]},onRtl:function(){return[ic,ca,aa,fa,sa,rc,Wg,Gg,vm,pm,hm,gm]}},qB=function(u,n,e,a){function c(){return gT(u)}function s(){if(l()&&a.backstage.isContextMenuOpen())return!0;var n=function(){var n=g.get().map(function(n){return n.getBoundingClientRect()}).getOrThunk(function(){return u.selection.getRng().getBoundingClientRect()}),t=u.inline?hu().top():Su(Be.fromDom(u.getBody())).y();return{y:n.top+t,bottom:n.bottom+t}}(),t=c();return!function(n,t,e,o){return Math.max(n,e)<=Math.min(t,o)}(n.y,n.bottom,t.y(),t.bottom())}function t(){Ug.hide(d)}function o(){m.get().each(function(n){var t=d.element();hi(t,"display"),s()?li(t,"display","none"):_f.positionWithinBounds(e,n,d,on.some(c()))})}function f(n){return{dom:{tag:"div",classes:["tox-pop__dialog"]},components:[n],behaviours:ya([dg.config({mode:"acyclic"}),Jd("pop-dialog-wrap-events",[Ri(function(n){u.shortcuts.add("ctrl+F9","focus statusbar",function(){return dg.focusIn(n)})}),Vi(function(n){u.shortcuts.remove("ctrl+F9")})])])}}var l=Ht().deviceType.isTouch,d=au(function(n){var e=Ee([]);return Ug.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow:function(n){e.set([]),Ug.getContent(n).each(function(n){hi(n.element(),"visibility")}),ri(n.element(),rD),hi(n.element(),"width")},inlineBehaviours:ya([Jd("context-toolbar-events",[fr(yo(),function(n,t){Ug.getContent(n).each(function(n){}),ri(n.element(),rD),hi(n.element(),"width")}),rr(oD,function(t,e){hi(t.element(),"width");var n=gu(t.element());Ug.setContent(t,e.event().contents()),ei(t.element(),rD);var o=gu(t.element());li(t.element(),"width",n+"px"),Ug.getContent(t).each(function(n){e.event().focus().bind(function(n){return Sa(n),ka(t.element())}).orThunk(function(){return dg.focusIn(n),Ca()})}),Kg.setTimeout(function(){li(t.element(),"width",o+"px")},0)}),rr(tD,function(n,t){Ug.getContent(n).each(function(n){e.set(e.get().concat([{bar:n,focus:Ca()}]))}),qt(n,oD,{contents:t.event().forwardContents(),focus:on.none()})}),rr(eD,function(t,n){F(e.get()).each(function(n){e.set(e.get().slice(0,e.get().length-1)),qt(t,oD,{contents:cu(n.bar),focus:n.focus})})})]),dg.config({mode:"special",onEscape:function(t){return F(e.get()).fold(function(){return n.onEscape()},function(n){return Yt(t,eD),on.some(!0)})}})]),lazySink:function(){return an.value(n.sink)}})}({sink:e,onEscape:function(){return u.focus(),on.some(!0)}})),m=Ee(on.none()),g=Ee(on.none()),r=Ee(null),p=L(function(){return nD(n,function(n){var t=h(n);qt(d,tD,{forwardContents:f(t)})})}),h=function(n){var t,e,o=u.ui.registry.getAll().buttons,r=qb(u)===Ub.scrolling?Ub.scrolling:Ub["default"],i=p();return"contexttoolbar"===n.type?(t=An(o,i.formNavigators),e=bD(u,{buttons:t,toolbar:n.items},a,on.some(["form:"])),tT({type:r,uid:Hr("context-toolbar"),initGroups:e,onEscape:on.none,cyclicKeying:!0,backstage:a.backstage,getSink:function(){return an.error("")}})):QE(r,n,a.backstage)};u.on("contexttoolbar-show",function(t){var n=p();Nn(n.lookupTable,t.toolbarKey).each(function(n){y(n,t.target===u?on.none():on.some(t)),Ug.getContent(d).each(dg.focusIn)})});function v(n,t){var e="node"===n?a.backstage.shared.anchors.node(t):a.backstage.shared.anchors.cursor();return Bn(e,function(n,t){return"line"===n?{bubble:Ta(12,0,WB),layouts:{onLtr:function(){return[la]},onRtl:function(){return[da]}},overrides:GB}:{bubble:Ta(0,12,WB),layouts:t?YB:XB,overrides:GB}}(n,l()))}function i(){var n=p();ZE(n,u).fold(function(){m.set(on.none()),Ug.hide(d)},function(n){y(n.toolbarApi,on.some(n.elem.dom()))})}function b(n){x(),r.set(n)}var y=function(n,t){if(x(),!l()||!a.backstage.isContextMenuOpen()){var e=h(n),o=t.map(Be.fromDom),r=v(n.position,o);m.set(on.some(r)),g.set(t);var i=d.element();hi(i,"display"),Ug.showWithinBounds(d,r,f(e),function(){return on.some(c())}),s()&&li(i,"display","none")}},x=function(){var n=r.get();null!==n&&(Kg.clearTimeout(n),r.set(null))};u.on("init",function(){u.on(ZT,t),u.on("ScrollContent ScrollWindow longpress",o),u.on("click keyup SetContent ObjectResized ResizeEditor",function(n){b(Kg.setEditorTimeout(u,i,0))}),u.on("focusout",function(n){Kg.setEditorTimeout(u,function(){ka(e.element()).isNone()&&ka(d.element()).isNone()&&(m.set(on.none()),Ug.hide(d))},0)}),u.on("SwitchMode",function(){u.readonly&&(m.set(on.none()),Ug.hide(d))}),u.on("NodeChange",function(n){ka(d.element()).fold(function(){b(Kg.setEditorTimeout(u,i,0))},function(n){})})})},KB=function(n,o,r){function t(t,e){bn([o,r],function(n){n.broadcastEvent(t,e)})}function e(t,e){bn([o,r],function(n){n.broadcastOn([t],e)})}function i(n){return e(jf(),{target:n.target()})}function u(n){return e(jf(),{target:Be.fromDom(n.target)})}function a(n){0===n.button&&e(Wf(),{target:Be.fromDom(n.target)})}function c(n){return t(Ro(),hb(n))}function s(n){e(Uf(),{}),t(Vo(),hb(n))}function f(){return e(Uf(),{})}var l=fb(Be.fromDom(v.document),"touchstart",i),d=fb(Be.fromDom(v.document),"touchmove",function(n){return t(Fo(),n)}),m=fb(Be.fromDom(v.document),"touchend",function(n){return t(Io(),n)}),g=fb(Be.fromDom(v.document),"mousedown",i),p=fb(Be.fromDom(v.document),"mouseup",function(n){0===n.raw().button&&e(Wf(),{target:n.target()})});n.on("PostRender",function(){n.on("click",u),n.on("tap",u),n.on("mouseup",a),n.on("ScrollWindow",c),n.on("ResizeWindow",s),n.on("ResizeEditor",f)}),n.on("remove",function(){n.off("click",u),n.off("tap",u),n.off("mouseup",a),n.off("ScrollWindow",c),n.off("ResizeWindow",s),n.off("ResizeEditor",f),g.unbind(),l.unbind(),d.unbind(),m.unbind(),p.unbind()}),n.on("detach",function(){Ss(o),Ss(r),o.destroy(),r.destroy()})},JB=Dl,$B=Tl,QB=nn([St("shell",!1),ct("makeItem"),St("setupItem",Z),tl("listBehaviours",[gg])]),ZB=Cl({name:"items",overrides:function(n){return{behaviours:ya([gg.config({})])}}}),nA=nn([ZB]),tA=_l({name:nn("CustomList")(),configFields:QB(),partFields:nA(),factory:function(s,n,t,e){var o=s.shell?{behaviours:[gg.config({})],components:[]}:{behaviours:[],components:n},r=function(n){return s.shell?on.some(n):Ks(n,s,"items")};return{uid:s.uid,dom:s.dom,components:o.components,behaviours:Vs(s.listBehaviours,o.behaviours),apis:{setItems:function(a,c){r(a).fold(function(){throw v.console.error("Custom List was defined to not be a shell, but no item container was specified in components"),new Error("Custom List was defined to not be a shell, but no item container was specified in components")},function(t){var n=gg.contents(t),e=c.length,o=e-n.length,r=0<o?function(n,t){for(var e=[],o=0;o<n;o++)e.push(t(o));return e}(o,function(){return s.makeItem()}):[],i=n.slice(e);bn(i,function(n){return gg.remove(t,n)}),bn(r,function(n){return gg.append(t,n)});var u=gg.contents(t);bn(u,function(n,t){s.setupItem(a,n,c[t],t)})})}}}},apis:{setItems:function(n,t,e){n.setItems(t,e)}}}),eA=En([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),oA=eA.offset,rA=eA.absolute,iA=eA.fixed,uA=En([{"static":[]},{absolute:["x","y"]},{fixed:["x","y"]}]),aA=function(n,t,e){n.getSystem().isConnected()&&function(e,o,r){var i=o.lazyViewport(e),n=e.element(),t=pr(n),u=hu(t),a=L(function(){return yD(n)}),c=r.isDocked();c&&HD(e,o,r,i),RD(e,o,i,u,a).each(function(n){r.setDocked(!c),n.fold(function(){return VD(e,o)},function(n,t){return ND(e,o,0,a(),rA(n,t))},function(n,t){HD(e,o,r,i,!0),ND(e,o,0,a(),iA(n,t))})})}(n,t,e)},cA=/* */Object.freeze({refresh:aA,reset:zD,isDocked:function(n,t,e){return e.isDocked()}}),sA=/* */Object.freeze({events:function(o,r){return tr([fr(yo(),function(t,e){o.contextual.each(function(n){ii(t.element(),n.transitionClass)&&(ai(t.element(),[n.transitionClass,n.fadeInClass]),(r.isVisible()?n.onShown:n.onHidden)(t));e.stop()})}),rr(Ro(),function(n,t){aA(n,o,r)}),rr(Vo(),function(n,t){zD(n,o,r)})])}}),fA=[wt("contextual",[ft("fadeInClass"),ft("fadeOutClass"),ft("transitionClass"),dt("lazyContext"),Ku("onShow"),Ku("onShown"),Ku("onHide"),Ku("onHidden")]),Dt("lazyViewport",Cu),ft("leftAttr"),ft("topAttr"),ft("positionAttr"),(FB="modes",IB=["top","bottom"],RB=Se,Ct(FB,IB,Kn(RB))),Ku("onDocked"),Ku("onUndocked")],lA=xa({fields:fA,name:"docking",active:sA,apis:cA,state:/* */Object.freeze({init:function(){var t=Ee(!1),e=Ee(!0);return tu({isDocked:function(){return t.get()},setDocked:function(n){return t.set(n)},isVisible:function(){return e.get()},setVisible:function(n){return e.set(n)},readState:function(){return"docked: "+t.get()+", visible: "+e.get()}})}})}),dA={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},mA="tox-tinymce--toolbar-sticky-on",gA="tox-tinymce--toolbar-sticky-off",pA=/* */Object.freeze({setup:function(n,t){n.inline||(n.on("ResizeWindow ResizeEditor ResizeContent",function(){t().each(LD)}),n.on("SkinLoaded",function(){t().each(lA.reset)}),n.on("FullscreenStateChanged",function(){t().each(lA.refresh)})),n.on("PostRender",function(){UD(n,!1)})},isDocked:function(n){return n().map(lA.isDocked).getOr(!1)},getBehaviours:WD}),hA=Z,vA=u,bA=nn([]),yA=/* */Object.freeze({setup:hA,isDocked:vA,getBehaviours:bA}),xA=Al({factory:function(t,o){var n={focus:dg.focusIn,setMenus:function(n,t){var e=S(t,function(t){var n={type:"menubutton",text:t.text,fetch:function(n){n(t.getItems())}},e=oT(n).mapError(function(n){return ye(n)}).getOrDie();return GC(e,"tox-mbtn",o.backstage,on.some("menuitem"))});gg.set(n,e)}};return{uid:t.uid,dom:t.dom,components:[],behaviours:ya([gg.config({}),Jd("menubar-events",[Ri(function(n){t.onSetup(n)}),rr(fo(),function(e,n){Ou(e.element(),".tox-mbtn--active").each(function(t){Tu(n.event().target(),".tox-mbtn").each(function(n){jt(t,n)||e.getSystem().getByDom(t).each(function(t){e.getSystem().getByDom(n).each(function(n){Tw.expand(n),Tw.close(t),bg.focus(n)})})})})}),rr(Lo(),function(e,n){n.event().prevFocus().bind(function(n){return e.getSystem().getByDom(n).toOption()}).each(function(t){n.event().newFocus().bind(function(n){return e.getSystem().getByDom(n).toOption()}).each(function(n){Tw.isOpen(t)&&(Tw.expand(n),Tw.close(t))})})})]),dg.config({mode:"flow",selector:".tox-mbtn",onEscape:function(n){return t.onEscape(n),on.some(!0)}}),Xy.config({})]),apis:n,domModification:{attributes:{role:"menubar"}}}},name:"silver.Menubar",configFields:[ct("dom"),ct("uid"),ct("onEscape"),ct("backstage"),St("onSetup",Z)],apis:{focus:function(n,t){n.focus(t)},setMenus:function(n,t,e){n.setMenus(t,e)}}}),wA="container",SA=[Is("slotBehaviours",[])],CA=function(r,n,t){function e(n){return Zs(r)}function o(e,o){return void 0===o&&(o=undefined),function(n,t){return Ks(n,r,t).map(function(n){return e(n,t)}).getOr(o)}}function i(n,t){return"true"!==Mr(n.element(),"aria-hidden")}var u,a=o(i,!1),c=o(function(n,t){if(i(n)){var e=n.element();li(e,"display","none"),_r(e,"aria-hidden","true"),qt(n,jo(),{name:t,visible:!1})}}),s=(u=c,function(t,n){bn(n,function(n){return u(t,n)})}),f=o(function(n,t){if(!i(n)){var e=n.element();hi(e,"display"),Ir(e,"aria-hidden"),qt(n,jo(),{name:t,visible:!0})}}),l={getSlotNames:e,getSlot:function(n,t){return Ks(n,r,t)},isShowing:a,hideSlot:c,hideAllSlots:function(n){return s(n,e())},showSlot:f};return{uid:r.uid,dom:r.dom,components:n,behaviours:Rs(r.slotBehaviours),apis:l}},kA=P({getSlotNames:function(n,t){return n.getSlotNames(t)},getSlot:function(n,t,e){return n.getSlot(t,e)},isShowing:function(n,t,e){return n.isShowing(t,e)},hideSlot:function(n,t,e){return n.hideSlot(t,e)},hideAllSlots:function(n,t){return n.hideAllSlots(t)},showSlot:function(n,t,e){return n.showSlot(t,e)}},Ur),OA=N(N({},kA),{sketch:function(n){var e,t=(e=[],{slot:function(n,t){return e.push(n),Ws(wA,GD(n),t)},record:function(){return e}}),o=n(t),r=t.record(),i=S(r,function(n){return wl({name:n,pname:GD(n)})});return rf(wA,SA,i,CA,o)}}),TA=de([yt("icon"),yt("tooltip"),Dt("onShow",Z),Dt("onHide",Z),Dt("onSetup",function(){return Z})]),EA=Hr("FixSizeEvent"),DA=Hr("AutoSizeEvent"),BA=$B.optional({factory:xA,name:"menubar",schema:[ct("backstage")]}),AA=$B.optional({factory:{sketch:function(n){return tA.sketch({uid:n.uid,dom:n.dom,listBehaviours:ya([dg.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:function(){return tT({type:n.split,uid:Hr("multiple-toolbar-item"),backstage:n.backstage,cyclicKeying:!1,getSink:n.getSink,initGroups:[],onEscape:function(){return on.none()}})},setupItem:function(n,t,e,o){eE.setGroups(t,e)},shell:!0})}},name:"multiple-toolbar",schema:[ct("dom"),ct("onEscape")]}),_A=$B.optional({factory:{sketch:function(n){return function(n){return n.split===Ub.sliding?nT:n.split===Ub.floating?ZO:tT}(n)({type:n.split,uid:n.uid,onEscape:function(){return n.onEscape(),on.some(!0)},cyclicKeying:!1,initGroups:[],getSink:n.getSink,backstage:n.backstage,moreDrawerData:{lazyToolbar:n.lazyToolbar,lazyMoreButton:n.lazyMoreButton,lazyHeader:n.lazyHeader}})}},name:"toolbar",schema:[ct("dom"),ct("onEscape"),ct("getSink")]}),MA=$B.optional({factory:{sketch:function(n){var t=n.editor,e=n.sticky?WD:bA;return{uid:n.uid,dom:n.dom,components:n.components,behaviours:ya(e(t,n.getSink))}}},name:"header",schema:[ct("dom")]}),FA=$B.optional({name:"socket",schema:[ct("dom")]}),IA=$B.optional({factory:{sketch:function(n){return{uid:n.uid,dom:{tag:"div",classes:["tox-sidebar"],attributes:{role:"complementary"}},components:[{dom:{tag:"div",classes:["tox-sidebar__slider"]},components:[],behaviours:ya([Xy.config({}),bg.config({}),gE.config({dimension:{property:"width"},closedClass:"tox-sidebar--sliding-closed",openClass:"tox-sidebar--sliding-open",shrinkingClass:"tox-sidebar--sliding-shrinking",growingClass:"tox-sidebar--sliding-growing",onShrunk:function(n){nd.getCurrent(n).each(OA.hideAllSlots),Yt(n,DA)},onGrown:function(n){Yt(n,DA)},onStartGrow:function(n){qt(n,EA,{width:gi(n.element(),"width").getOr("")})},onStartShrink:function(n){qt(n,EA,{width:gu(n.element())+"px"})}}),gg.config({}),nd.config({find:function(n){var t=gg.contents(n);return yn(t)}})])}],behaviours:ya([DS(0),Jd("sidebar-sliding-events",[rr(EA,function(n,t){li(n.element(),"width",t.event().width())}),rr(DA,function(n,t){hi(n.element(),"width")})])])}}},name:"sidebar",schema:[ct("dom")]}),RA=$B.optional({factory:{sketch:function(n){return{uid:n.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:ya([gg.config({})]),components:[]}}},name:"throbber",schema:[ct("dom")]}),VA=_l({name:"OuterContainer",factory:function(e,n,t){var o={getSocket:function(n){return JB.getPart(n,e,"socket")},setSidebar:function(n,t){JB.getPart(n,e,"sidebar").each(function(n){return qD(n,t)})},toggleSidebar:function(n,t){JB.getPart(n,e,"sidebar").each(function(n){return function(n,e){nd.getCurrent(n).each(function(t){nd.getCurrent(t).each(function(n){gE.hasGrown(t)?OA.isShowing(n,e)?gE.shrink(t):(OA.hideAllSlots(n),OA.showSlot(n,e)):(OA.hideAllSlots(n),OA.showSlot(n,e),gE.grow(t))})})}(n,t)})},whichSidebar:function(n){return JB.getPart(n,e,"sidebar").bind(KD).getOrNull()},getHeader:function(n){return JB.getPart(n,e,"header")},getToolbar:function(n){return JB.getPart(n,e,"toolbar")},setToolbar:function(n,t){JB.getPart(n,e,"toolbar").each(function(n){n.getApis().setGroups(n,t)})},setToolbars:function(n,t){JB.getPart(n,e,"multiple-toolbar").each(function(n){tA.setItems(n,t)})},refreshToolbar:function(n){JB.getPart(n,e,"toolbar").each(function(n){return n.getApis().refresh(n)})},getMoreButton:function(n){return JB.getPart(n,e,"toolbar").bind(function(n){return n.getApis().getMoreButton(n)})},getThrobber:function(n){return JB.getPart(n,e,"throbber")},focusToolbar:function(n){JB.getPart(n,e,"toolbar").orThunk(function(){return JB.getPart(n,e,"multiple-toolbar")}).each(function(n){dg.focusIn(n)})},setMenubar:function(n,t){JB.getPart(n,e,"menubar").each(function(n){xA.setMenus(n,t)})},focusMenubar:function(n){JB.getPart(n,e,"menubar").each(function(n){xA.focus(n)})}};return{uid:e.uid,dom:e.dom,components:n,apis:o,behaviours:e.behaviours}},configFields:[ct("dom"),ct("behaviours")],partFields:[MA,BA,_A,AA,FA,IA,RA],apis:{getSocket:function(n,t){return n.getSocket(t)},setSidebar:function(n,t,e){n.setSidebar(t,e)},toggleSidebar:function(n,t,e){n.toggleSidebar(t,e)},whichSidebar:function(n,t){return n.whichSidebar(t)},getHeader:function(n,t){return n.getHeader(t)},getToolbar:function(n,t){return n.getToolbar(t)},setToolbar:function(n,t,e){var o=S(e,function(n){return JO(n)});n.setToolbar(t,o)},setToolbars:function(n,t,e){var o=S(e,function(n){return S(n,JO)});n.setToolbars(t,o)},getMoreButton:function(n,t){return n.getMoreButton(t)},refreshToolbar:function(n,t){return n.refreshToolbar(t)},getThrobber:function(n,t){return n.getThrobber(t)},setMenubar:function(n,t,e){n.setMenubar(t,e)},focusMenubar:function(n,t){n.focusMenubar(t)},focusToolbar:function(n,t){n.focusToolbar(t)}}}),NA={file:{title:"File",items:"newdocument restoredraft | preview | print | deleteallconversations"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall | searchreplace"},view:{title:"View",items:"code | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments"},insert:{title:"Insert",items:"image link media addcomment pageembed template codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor toc | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | formats blockformats fontformats fontsizes align | forecolor backcolor | removeformat"},tools:{title:"Tools",items:"spellchecker spellcheckerlanguage | a11ycheck code wordcount"},table:{title:"Table",items:"inserttable | cell row column | advtablesort | tableprops deletetable"},help:{title:"Help",items:"help"}},HA=function(n){function t(){n._skinLoaded=!0,Hv(n)}return function(){n.initialized?t():n.on("init",t)}},PA=d(ZD,!1),zA=d(ZD,!0),LA=Vh.DOM,jA=Ht(),UA=jA.os.isiOS()&&jA.os.version.major<=12,WA={render:function(e,o,n,t,r){var i=Ee(0);PA(e),function(n,t){Rf(n,t,Cr)}(Be.fromDom(r.targetNode),o.mothership),ws(Mi(),o.uiMothership),e.on("PostRender",function(){nB(e,o,n,t),i.set(e.getWin().innerWidth),VA.setMenubar(o.outerContainer,QD(e,n)),VA.setSidebar(o.outerContainer,n.sidebar),function(r){function n(n){var t=r.getDoc().documentElement,e=u.get(),o=a.get();e.left()!==i.innerWidth||e.top()!==i.innerHeight?(u.set(Ru(i.innerWidth,i.innerHeight)),Lv(r,n)):o.left()===t.offsetWidth&&o.top()===t.offsetHeight||(a.set(Ru(t.offsetWidth,t.offsetHeight)),Lv(r,n))}function t(n){return zv(r,n)}var i=r.getWin(),e=r.getDoc().documentElement,u=Ee(Ru(i.innerWidth,i.innerHeight)),a=Ee(Ru(e.offsetWidth,e.offsetHeight));LA.bind(i,"resize",n),LA.bind(i,"scroll",t);var o=lb(Be.fromDom(r.getBody()),"load",n);r.on("remove",function(){o.unbind(),LA.unbind(i,"resize",n),LA.unbind(i,"scroll",t)})}(e)});var u=VA.getSocket(o.outerContainer).getOrDie("Could not find expected socket element");if(!0===UA){di(u.element(),{overflow:"scroll","-webkit-overflow-scrolling":"touch"});var a=function(e,o){var r=null;return{cancel:function(){null!==r&&(v.clearTimeout(r),r=null)},throttle:function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];null===r&&(r=v.setTimeout(function(){e.apply(null,n),r=null},o))}}}(function(){e.fire("ScrollContent")},20);fb(u.element(),"scroll",a.throttle)}YO(e,o),e.addCommand("ToggleSidebar",function(n,t){VA.toggleSidebar(o.outerContainer,t),e.fire("ToggleSidebar")}),e.addQueryValueHandler("ToggleSidebar",function(){return VA.whichSidebar(o.outerContainer)});var c=qb(e);return c!==Ub.sliding&&c!==Ub.floating||e.on("ResizeWindow ResizeEditor ResizeContent",function(){var n=e.getWin().innerWidth;n!==i.get()&&(VA.refreshToolbar(o.outerContainer),i.set(n))}),{iframeContainer:u.element().dom(),editorContainer:o.outerContainer.element().dom()}}},GA=function(t,n,e){var o=n.filter(function(n){return t<n}),r=e.filter(function(n){return n<t});return o.or(r).getOr(t)},XA=function(n){return/^[0-9\.]+(|px)$/i.test(""+n)?on.some(parseInt(""+n,10)):on.none()},YA=function(n){return mn(n)?n+"px":n},qA={render:function(t,i,e,o,n){var u,r=Vh.DOM,a=Jb(t),c=Qb(t),s=Be.fromDom(n.targetNode),f=Hb(t).or(eB(t)),l=qb(t),d=l===Ub.sliding||l===Ub.floating;zA(t);function m(n){void 0===n&&(n=!1),d&&VA.refreshToolbar(i.outerContainer),a||function(n){var t=d?n.fold(function(){return 0},function(n){return 1<n.components().length?fu(n.components()[1].element()):0}):0,e=mu(s),o=e.top()-fu(u.element())+t;di(i.outerContainer.element(),{position:"absolute",top:Math.round(o)+"px",left:Math.round(e.left())+"px"});var r=f.getOrThunk(function(){var n=XA(mi(Mi(),"margin-left")).getOr(0);return gu(Mi())-e.left()+n});li(u.element(),"max-width",r+"px")}(VA.getToolbar(i.outerContainer)),c&&(n?lA.reset(u):lA.refresh(u))}function g(){li(i.outerContainer.element(),"display","flex"),r.addClass(t.getBody(),"mce-edit-focus"),hi(i.uiMothership.element(),"display"),m()}function p(){i.outerContainer&&(li(i.outerContainer.element(),"display","none"),r.removeClass(t.getBody(),"mce-edit-focus")),li(i.uiMothership.element(),"display","none")}function h(){if(u)g();else{u=VA.getHeader(i.outerContainer).getOrDie();var n=function(n){return Kb(n).getOr(Mi())}(t);ws(n,i.mothership),ws(n,i.uiMothership),nB(t,i,e,o),VA.setMenubar(i.outerContainer,QD(t,e)),g(),t.on("activate",g),t.on("deactivate",p),t.on("NodeChange SkinLoaded ResizeWindow",function(){t.hidden||m(!0)}),t.nodeChanged()}}return t.on("focus",h),t.on("blur hide",p),t.on("init",function(){t.hasFocus()&&h()}),YO(t,i),{editorContainer:i.outerContainer.element().dom()}}},KA=function(t){Ok.each([{name:"alignleft",text:"Align left",cmd:"JustifyLeft",icon:"align-left"},{name:"aligncenter",text:"Align center",cmd:"JustifyCenter",icon:"align-center"},{name:"alignright",text:"Align right",cmd:"JustifyRight",icon:"align-right"},{name:"alignjustify",text:"Justify",cmd:"JustifyFull",icon:"align-justify"}],function(n){t.ui.registry.addToggleButton(n.name,{tooltip:n.text,onAction:function(){return t.execCommand(n.cmd)},icon:n.icon,onSetup:hT(t,n.name)})});var n="alignnone",e="No alignment",o="JustifyNone",r="align-none";t.ui.registry.addButton(n,{tooltip:e,onAction:function(){return t.execCommand(o)},icon:r})},JA=function(n){rB(n),function(t){Ok.each([{name:"bold",text:"Bold",action:"Bold",icon:"bold",shortcut:"Meta+B"},{name:"italic",text:"Italic",action:"Italic",icon:"italic",shortcut:"Meta+I"},{name:"underline",text:"Underline",action:"Underline",icon:"underline",shortcut:"Meta+U"},{name:"strikethrough",text:"Strikethrough",action:"Strikethrough",icon:"strike-through",shortcut:""},{name:"subscript",text:"Subscript",action:"Subscript",icon:"subscript",shortcut:""},{name:"superscript",text:"Superscript",action:"Superscript",icon:"superscript",shortcut:""},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting",shortcut:""},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document",shortcut:""},{name:"cut",text:"Cut",action:"Cut",icon:"cut",shortcut:"Meta+X"},{name:"copy",text:"Copy",action:"Copy",icon:"copy",shortcut:"Meta+C"},{name:"paste",text:"Paste",action:"Paste",icon:"paste",shortcut:"Meta+V"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A"}],function(n){t.ui.registry.addMenuItem(n.name,{text:n.text,icon:n.icon,shortcut:n.shortcut,onAction:function(){return t.execCommand(n.action)}})}),t.ui.registry.addMenuItem("codeformat",{text:"Code",icon:"sourcecode",onAction:oB(t,"code")})}(n)},$A=function(n){!function(t){t.ui.registry.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onSetup:function(n){return iB(n,t,"hasUndo")},onAction:function(){return t.execCommand("undo")}}),t.ui.registry.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onSetup:function(n){return iB(n,t,"hasRedo")},onAction:function(){return t.execCommand("redo")}})}(n),function(t){t.ui.registry.addButton("undo",{tooltip:"Undo",icon:"undo",onSetup:function(n){return iB(n,t,"hasUndo")},onAction:function(){return t.execCommand("undo")}}),t.ui.registry.addButton("redo",{tooltip:"Redo",icon:"redo",onSetup:function(n){return iB(n,t,"hasRedo")},onAction:function(){return t.execCommand("redo")}})}(n)},QA=function(n){!function(n){n.ui.registry.addButton("visualaid",{tooltip:"Visual aids",text:"Visual aids",onAction:function(){return n.execCommand("mceToggleVisualAid")}})}(n),function(t){t.ui.registry.addToggleMenuItem("visualaid",{text:"Visual aids",onSetup:function(n){return function(t,n){t.setActive(n.hasVisual);function e(n){t.setActive(n.hasVisual)}return n.on("VisualAid",e),function(){return n.off("VisualAid",e)}}(n,t)},onAction:function(){t.execCommand("mceToggleVisualAid")}})}(n)},ZA=function(n){!function(t){t.ui.registry.addButton("outdent",{tooltip:"Decrease indent",icon:"outdent",onSetup:function(n){return function(n,t){n.setDisabled(!t.queryCommandState("outdent"));function e(){n.setDisabled(!t.queryCommandState("outdent"))}return t.on("NodeChange",e),function(){return t.off("NodeChange",e)}}(n,t)},onAction:function(){return t.execCommand("outdent")}}),t.ui.registry.addButton("indent",{tooltip:"Increase indent",icon:"indent",onAction:function(){return t.execCommand("indent")}})}(n)},n_=function(n,t){!function(n,t){var e=bT(0,t,uD(n));n.ui.registry.addNestedMenuItem("align",{text:t.shared.providers.translate("Align"),getSubmenuItems:function(){return e.items.validateItems(e.getStyleItems())}})}(n,t),function(n,t){var e=bT(0,t,cD(n));n.ui.registry.addNestedMenuItem("fontformats",{text:t.shared.providers.translate("Fonts"),getSubmenuItems:function(){return e.items.validateItems(e.getStyleItems())}})}(n,t),function(n,t){var e=N({type:"advanced"},t.styleselect),o=bT(0,t,gD(n,e));n.ui.registry.addNestedMenuItem("formats",{text:"Formats",getSubmenuItems:function(){return o.items.validateItems(o.getStyleItems())}})}(n,t),function(n,t){var e=bT(0,t,mD(n));n.ui.registry.addNestedMenuItem("blockformats",{text:"Blocks",getSubmenuItems:function(){return e.items.validateItems(e.getStyleItems())}})}(n,t),function(n,t){var e=bT(0,t,fD(n));n.ui.registry.addNestedMenuItem("fontsizes",{text:"Font sizes",getSubmenuItems:function(){return e.items.validateItems(e.getStyleItems())}})}(n,t)},t_=function(n,t){KA(n),JA(n),n_(n,t),$A(n),Wv.register(n),QA(n),ZA(n)},e_=function(n){return{anchor:"selection",root:Be.fromDom(n.selection.getNode())}},o_={onLtr:function(){return[ic,aa,ca,sa,fa,rc,Wg,Gg,hm,gm,vm,pm]},onRtl:function(){return[ic,ca,aa,fa,sa,rc,Wg,Gg,vm,pm,hm,gm]}},r_={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"]},i_=function(n){return n.settings.contextmenu_never_use_native||!1},u_=function(n){return function(n,t,e){var o=n.ui.registry.getAll().contextMenus;return V(n.settings,t).map(gB).getOrThunk(function(){return C(gB(e),function(n){return Tn(o,n)})})}(n,"contextmenu","link linkchecker image imagetools table spellchecker configurepermanentpen")},a_=function(n){return!1===n.getParam("contextmenu")},c_={type:"separator"},s_=function(t){if(cn(t))return t;switch(t.type){case"separator":return c_;case"submenu":return{type:"nestedmenuitem",text:t.text,icon:t.icon,getSubmenuItems:function(){var n=t.getSubmenuItems();return cn(n)?n:S(n,s_)}};default:return{type:"menuitem",text:t.text,icon:t.icon,onAction:function(n){return function(){return n()}}(t.onAction)}}},f_="data-initial-z-index",l_=function(n,t,r,i,u){var e=t.getSnapPoints(n);return kB(e,r,i,u).orThunk(function(){return O(e,function(t,e){var n=e.sensor(),o=function(n,t,e,o,r,i){var u=kD(n,r,i),a=kD(t,r,i),c=Math.abs(u.left()-a.left()),s=Math.abs(u.top()-a.top());return Ru(c,s)}(r,n,e.range().left(),e.range().top(),i,u);return t.deltas.fold(function(){return{deltas:on.some(o),snap:on.some(e)}},function(n){return(o.left()+o.top())/2<=(n.left()+n.top())/2?{deltas:on.some(o),snap:on.some(e)}:t})},{deltas:on.none(),snap:on.none()}).snap.map(function(n){return{output:nn(ED(n.output(),r,i,u)),extra:n.extra}})})},d_=function(n,t,e,o,r){var i=t.getSnapPoints(n);return kB(i,e,o,r)},m_=wt("snaps",[ct("getSnapPoints"),Ku("onSensor"),ct("leftAttr"),ct("topAttr"),St("lazyViewport",Cu),St("mustSnap",!1)]),g_=/* */Object.freeze({getData:function(n){return on.from(Ru(n.x(),n.y()))},getDelta:function(n,t){return Ru(t.left()-n.left(),t.top()-n.top())}}),p_=[St("useFixed",u),ct("blockerClass"),St("getTarget",l),St("onDrag",Z),St("repositionTarget",!0),Ku("onDrop"),Dt("getBounds",Cu),m_,Zu("dragger",{handlers:function(u,a){function c(n){a.setStartData(EB(u,n))}return tr([rr(Ro(),function(n){a.getStartData().each(function(){return c(n)})}),rr(uo(),function(t,n){if(0===n.event().raw().button){n.stop();var e=function(){return BB(t,on.some(i),u,a)},o=vb(e,200),r={drop:e,delayDrop:o.schedule,forceDrop:e,move:function(n){o.cancel(),DB(t,u,a,g_,n)}},i=xB(t,u.blockerClass,function(e){return tr([rr(uo(),e.forceDrop),rr(so(),e.drop),rr(ao(),function(n,t){e.move(t.event())}),rr(co(),e.delayDrop)])}(r));c(t),bB(t,i)}})])}})],h_=/* */Object.freeze({getData:function(n){var t=n.raw().touches;return 1===t.length?function(n){var t=n[0];return on.some(Ru(t.clientX,t.clientY))}(t):on.none()},getDelta:function(n,t){return Ru(t.left()-n.left(),t.top()-n.top())}}),v_=p_,b_=[St("useFixed",u),ct("blockerClass"),St("getTarget",l),St("onDrag",Z),St("repositionTarget",!0),St("onDrop",Z),Dt("getBounds",Cu),m_,Zu("dragger",{handlers:function(i,u){function a(n){u.setStartData(EB(i,n))}var c=Ee(on.none());return tr([rr(Ro(),function(n){u.getStartData().each(function(){return a(n)})}),rr(eo(),function(t,n){n.stop();function e(){BB(t,c.get(),i,u),c.set(on.none())}var o={drop:e,delayDrop:function(){},forceDrop:e,move:function(n){DB(t,i,u,h_,n)}},r=xB(t,i.blockerClass,function(e){return tr([rr(eo(),e.forceDrop),rr(ro(),e.drop),rr(io(),e.drop),rr(oo(),function(n,t){e.move(t.event())})])}(o));c.set(on.some(r));a(t),bB(t,r)}),rr(oo(),function(n,t){t.stop(),DB(n,i,u,h_,t.event())}),rr(ro(),function(n){BB(n,c.get(),i,u),c.set(on.none())}),rr(io(),function(n){BB(n,c.get(),i,u),c.set(on.none())})])}})],y_=/* */Object.freeze({mouse:v_,touch:b_}),x_=/* */Object.freeze({init:function(){var o=on.none(),t=on.none(),n=nn({});return tu({readState:n,reset:function(){o=on.none(),t=on.none()},update:function(t,n){return t.getData(n).bind(function(n){return function(t,e){var n=o.map(function(n){return t.getDelta(n,e)});return o=on.some(e),n}(t,n)})},getStartData:function(){return t},setStartData:function(n){t=on.some(n)}})}}),w_=/* */Object.freeze({snapTo:function(n,t,e,o){var r=t.getTarget(n.element());if(t.repositionTarget){var i=pr(n.element()),u=hu(i),a=yD(r),c=function(n,t,e){return{coord:ED(n.output(),n.output(),t,e),extra:n.extra()}}(o,u,a),s=TD(c.coord,0,a);di(r,s)}}}),S_=wa({branchKey:"mode",branches:y_,name:"dragging",active:{events:function(n,t){return n.dragger.handlers(n,t)}},extra:{snap:gr(["sensor","range","output"],["extra"])},state:x_,apis:w_}),C_=Ht(),k_=function(c,e){function t(n){var t=Su(n);return AB(g.getOpt(e),n,t.x(),t.y(),t.width(),t.height())}function o(n){var t=Su(n);return AB(p.getOpt(e),n,t.right(),t.bottom(),t.width(),t.height())}function r(n,t,e,o){var r=e(t);S_.snapTo(n,r),function(n,t,e,o){var r=t.dom().getBoundingClientRect();hi(n.element(),"display");var i=vr(Be.fromDom(c.getBody())).dom().innerHeight,u=e(r),a=o(r,i);(u||a)&&li(n.element(),"display","none")}(n,t,function(n){return n[o]<0},function(n,t){return n[o]>t})}function i(n){return r(h,n,t,"top")}function u(n){return r(v,n,o,"bottom")}var a=Ee([]),s=Ee([]),n=Ee(!1),f=Ee(on.none()),l=Ee(on.none()),d=_B(function(){return S(a.get(),function(n){return t(n)})},f,function(t){l.get().each(function(n){c.fire("TableSelectorChange",{start:t,finish:n})})}),m=_B(function(){return S(s.get(),function(n){return o(n)})},l,function(t){f.get().each(function(n){c.fire("TableSelectorChange",{start:n,finish:t})})}),g=MB(d),p=MB(m),h=au(g.asSpec()),v=au(p.asSpec());C_.deviceType.isTouch()&&(c.on("TableSelectionChange",function(t){n.get()||(vs(e,h),vs(e,v),n.set(!0)),f.set(on.some(t.start)),l.set(on.some(t.finish)),t.otherCells.each(function(n){a.set(n.upOrLeftCells),s.set(n.downOrRightCells),i(t.start),u(t.finish)})}),c.on("resize ScrollContent",function(){f.get().each(i),l.get().each(u)}),c.on("TableSelectionClear",function(){n.get()&&(ys(h),ys(v),n.set(!1)),f.set(on.none()),l.set(on.none())}))};(NB=VB=VB||{})[NB.None=0]="None",NB[NB.Both=1]="Both",NB[NB.Vertical=2]="Vertical";function O_(n,t,e){var o=Be.fromDom(n.getContainer()),r=function(n,t,e,o,r){var i={};return i.height=GA(o+t.top(),Nb(n),Pb(n)),e===VB.Both&&(i.width=GA(r+t.left(),Vb(n),Hb(n))),i}(n,t,e,fu(o),gu(o));Cn(r,function(n,t){return li(o,t,YA(n))}),Pv(n)}function T_(n){if(1===n.nodeType){if("BR"===n.nodeName||n.getAttribute("data-mce-bogus"))return!0;if("bookmark"===n.getAttribute("data-mce-type"))return!0}return!1}function E_(o,t){var r,n,e;return{dom:{tag:"div",classes:["tox-statusbar"]},components:(n=function(){var n=[];return o.getParam("elementpath",!0,"boolean")&&n.push(hM(o,{})),Vt(o.settings.plugins,"wordcount")&&n.push(function(n,o){function r(n,t,e){return gg.set(n,[Ti(o.translate(["{0} "+e,t[e]]))])}var t;return Xg.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:ya([Xy.config({}),gg.config({}),nl.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),Jd("wordcount-events",[rr(Xt(),function(n){var t=nl.getValue(n),e="words"===t.mode?"characters":"words";nl.setValue(n,{mode:e,count:t.count}),r(n,t.count,e)}),Ri(function(e){n.on("wordCountUpdate",function(n){var t=nl.getValue(e).mode;nl.setValue(e,{mode:t,count:n.wordCount}),r(e,n.wordCount,t)})})])]),eventOrder:(t={},t[Xt()]=["wordcount-events","alloy.base.behaviour"],t)})}(o,t)),o.getParam("branding",!0,"boolean")&&n.push(function(){var n=ih.translate(["Powered by {0}","Tiny"]);return{dom:{tag:"span",classes:["tox-statusbar__branding"],innerHtml:'<a href="https://www.tiny.cloud/?utm_campaign=editor_referral&amp;utm_medium=poweredby&amp;utm_source=tinymce&amp;utm_content=v5" rel="noopener" target="_blank" tabindex="-1" aria-label="'+n+'">'+n+"</a>"}}}()),0<n.length?[{dom:{tag:"div",classes:["tox-statusbar__text-container"]},components:n}]:[]}(),e=function(n){var t=!Vt(n.settings.plugins,"autoresize"),e=n.getParam("resize",t);return!1===e?VB.None:"both"===e?VB.Both:VB.Vertical}(o),e!==VB.None&&n.push((r=e,{dom:{tag:"div",classes:["tox-statusbar__resize-handle"],attributes:{title:t.translate("Resize")},innerHtml:xm("resize-handle",t.icons)},behaviours:ya([S_.config({mode:"mouse",repositionTarget:!1,onDrag:function(n,t,e){O_(o,e,r)},blockerClass:"tox-blocker"})])})),n)}}function D_(n){return[ft("type"),function(n){return st(n,we)}("columns"),n]}function B_(t){return he("items","items",Mn(),Kn(Zn(function(n){return tt("Checking item of "+t,pF,n).fold(function(n){return an.error(ye(n))},function(n){return an.value(n)})})))}function A_(n){return cn(n.type)&&cn(n.name)}function __(n){var t=function(n){return C(AF(n),A_)}(n),e=D(t,function(t){return function(n){return on.from(_F[n.type])}(t).fold(function(){return[]},function(n){return[st(t.name,n)]})});return de(e)}function M_(n){return{internalDialog:et(function(n){return tt("dialog",BF,n)}(n)),dataValidator:__(n),initialData:n.initialData}}function F_(n){var e=[],o={};return Cn(n,function(n,t){n.fold(function(){e.push(t)},function(n){o[t]=n})}),0<e.length?an.error(e):an.value(o)}function I_(n){return yn(function(n,t){var e=gn.call(n,0);return e.sort(t),e}(n,function(n,t){return t<n?-1:n<t?1:0}))}function R_(n,t){li(n,"height",t+"px"),Ht().browser.isIE()?hi(n,"flex-basis"):li(n,"flex-basis",t+"px")}function V_(n,o,r){ku(n,'[role="dialog"]').each(function(e){Ou(e,'[role="tablist"]').each(function(t){r.get().map(function(n){return li(o,"height","0"),li(o,"flex-basis","0"),Math.min(n,function(n,t,e){var o,r=hr(n).dom(),i=ku(n,".tox-dialog-wrap").getOr(n);o="fixed"===mi(i,"position")?Math.max(r.clientHeight,v.window.innerHeight):Math.max(r.offsetHeight,r.scrollHeight);var u=fu(t),a=t.dom().offsetLeft>=e.dom().offsetLeft+gu(e)?Math.max(fu(e),u):u,c=parseInt(mi(n,"margin-top"),10)||0,s=parseInt(mi(n,"margin-bottom"),10)||0;return o-(fu(n)+c+s-a)}(e,o,t))}).each(function(n){R_(o,n)})})})}function N_(n){return Ou(n,'[role="tabpanel"]')}function H_(r){var i;return{smartTabHeight:(i=Ee(on.none()),{extraEvents:[Ri(function(n){var t=n.element();N_(t).each(function(o){li(o,"visibility","hidden"),n.getSystem().getByDom(o).toOption().each(function(n){var t=function(o,r,i){return S(o,function(n,t){gg.set(i,o[t].view());var e=r.dom().getBoundingClientRect();return gg.set(i,[]),e.height})}(r,o,n),e=I_(t);i.set(e)}),V_(t,o,i),hi(o,"visibility"),function(n,t){yn(n).each(function(n){return GF.showTab(t,n.value)})}(r,n),Kg.requestAnimationFrame(function(){V_(t,o,i)})})}),rr(Vo(),function(n){var t=n.element();N_(t).each(function(n){V_(t,n,i)})}),rr(py,function(n,t){var r=n.element();N_(r).each(function(t){var n=Ca();li(t,"visibility","hidden");var e=gi(t,"height").map(function(n){return parseInt(n,10)});hi(t,"height"),hi(t,"flex-basis");var o=t.dom().getBoundingClientRect().height;e.forall(function(n){return n<o})?(i.set(on.from(o)),V_(r,t,i)):e.each(function(n){R_(t,n)}),hi(t,"visibility"),n.each(Sa)})})],selectFirst:!1}),naiveTabHeight:{extraEvents:[],selectFirst:!0}}}function P_(n,t,e,o){return{dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:N(N({},t.map(function(n){return{id:n}}).getOr({})),o?{"aria-live":"polite"}:{})},components:[],behaviours:ya([DS(0),LE.config({channel:JF,updateState:function(n,t){return on.some({isTabPanel:function(){return"tabpanel"===t.body.type}})},renderComponents:function(n){switch(n.body.type){case"tabpanel":return[function(n,e){function o(n){var t=nl.getValue(n),e=F_(t).getOr({}),o=i.get(),r=Bn(o,e);i.set(r)}function r(n){var t=i.get();nl.setValue(n,t)}var i=Ee({}),u=Ee(null),t=S(n.tabs,function(n){return{value:n.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"],innerHtml:e.shared.providers.translate(n.title)},view:function(){return[bS.sketch(function(t){return{dom:{tag:"div",classes:["tox-form"]},components:S(n.items,function(n){return Jk(t,n,e)}),formBehaviours:ya([dg.config({mode:"acyclic",useTabstopAt:b(HS)}),Jd("TabView.form.events",[Ri(r),Vi(o)]),dc.config({channels:K([{key:XF,value:{onReceive:o}},{key:YF,value:{onReceive:r}}])})])}})]}}}),a=H_(t).smartTabHeight;return GF.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:function(n,t,e){var o=nl.getValue(t);qt(n,gy,{name:o,oldName:u.get()}),u.set(o)},tabs:t,components:[GF.parts().tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[PF.parts().tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:ya([Xy.config({})])}),GF.parts().tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:a.selectFirst,tabSectionBehaviours:ya([Jd("tabpanel",a.extraEvents),dg.config({mode:"acyclic"}),nd.config({find:function(n){return yn(GF.getViewItems(n))}}),nl.config({store:{mode:"manual",getValue:function(n){return n.getSystem().broadcastOn([XF],{}),i.get()},setValue:function(n,t){i.set(t),n.getSystem().broadcastOn([YF],{})}}})])})}(n.body,e)];default:return[function(n,e){var t=bm(bS.sketch(function(t){return{dom:{tag:"div",classes:["tox-form"].concat(n.classes)},components:S(n.items,function(n){return Jk(t,n,e)})}}));return{dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[t.asSpec()]}],behaviours:ya([dg.config({mode:"acyclic",useTabstopAt:b(HS)}),ES(t),MS(t,{postprocess:function(n){return F_(n).fold(function(n){return v.console.error(n),{}},function(n){return n})}})])}}(n.body,e)]}},initialData:n})])}}function z_(n,e){return[cr(lo(),PS),n(cy,function(n,t){e.onClose(),t.onClose()}),n(sy,function(n,t,e,o){t.onCancel(n),Yt(o,cy)}),rr(my,function(n,t){return e.onUnblock()}),rr(dy,function(n,t){return e.onBlock(t.event())})]}function L_(n,t){function e(n,t){return Gb.sketch({dom:{tag:"div",classes:["tox-dialog__footer-"+n]},components:S(t,function(n){return n.memento.asSpec()})})}var o=function(n,t){for(var e=[],o=[],r=0,i=n.length;r<i;r++){var u=n[r];(t(u,r)?e:o).push(u)}return{pass:e,fail:o}}(t.map(function(n){return n.footerButtons}).getOr([]),function(n){return"start"===n.align});return[e("start",o.pass),e("end",o.fail)]}function j_(n,o){return{dom:sp('<div class="tox-dialog__footer"></div>'),components:[],behaviours:ya([LE.config({channel:$F,initialData:n,updateState:function(n,t){var e=S(t.buttons,function(n){var t=bm(function(n,t){return ZC(n,n.type,t)}(n,o));return{name:n.name,align:n.align,memento:t}});return on.some({lookupByName:function(n,t){return function(t,n,e){return T(n,function(n){return n.name===e}).bind(function(n){return n.memento.getOpt(t)})}(n,e,t)},footerButtons:e})},renderComponents:L_})])}}function U_(n,t){return SM.parts().footer(j_(n,t))}function W_(t,e){if(t.getRoot().getSystem().isConnected()){var o=nd.getCurrent(t.getFormWrapper()).getOr(t.getFormWrapper());return bS.getField(o,e).fold(function(){var n=t.getFooter();return LE.getState(n).get().bind(function(n){return n.lookupByName(o,e)})},function(n){return on.some(n)})}return on.none()}function G_(u,o,a){function n(n){var t=u.getRoot();t.getSystem().isConnected()&&n(t)}var c={getData:function(){var n=u.getRoot(),t=n.getSystem().isConnected()?u.getFormWrapper():n,e=nl.getValue(t),o=P(a,function(n){return n.get()});return N(N({},e),o)},setData:function(i){n(function(n){var t=c.getData(),e=An(t,i),o=function(n,t){var e=n.getRoot();return LE.getState(e).get().map(function(n){return et(tt("data",n.dataValidator,t))}).getOr(t)}(u,e),r=u.getFormWrapper();nl.setValue(r,o),Cn(a,function(n,t){Tn(e,t)&&n.set(e[t])})})},disable:function(n){W_(u,n).each(kh.disable)},enable:function(n){W_(u,n).each(kh.enable)},focus:function(n){W_(u,n).each(bg.focus)},block:function(t){if(!cn(t))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");n(function(n){qt(n,dy,{message:t})})},unblock:function(){n(function(n){Yt(n,my)})},showTab:function(e){n(function(n){var t=u.getBody();LE.getState(t).get().exists(function(n){return n.isTabPanel()})&&nd.getCurrent(t).each(function(n){GF.showTab(n,e)})})},redial:function(e){n(function(n){var t=o(e);n.getSystem().broadcastOn([qF],t),n.getSystem().broadcastOn([KF],t.internalDialog),n.getSystem().broadcastOn([JF],t.internalDialog),n.getSystem().broadcastOn([$F],t.internalDialog),c.setData(t.initialData)})},close:function(){n(function(n){Yt(n,cy)})}};return c}function X_(n,t){return{dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[n,t]}}function Y_(n,t){return SM.parts().close(Xg.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":t.translate("Close")}},action:n,buttonBehaviours:ya([Xy.config({})])}))}function q_(){return SM.parts().title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}})}function K_(n,t){return SM.parts().body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:sp("<p>"+t.translate(n)+"</p>")}]}]})}function J_(n){return SM.parts().footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:n})}function $_(n,t){return[Gb.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:n}),Gb.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:t})]}function Q_(t){var n,e="tox-dialog",o=e+"-wrap",r=o+"__backdrop",i=e+"__disable-scroll";return SM.sketch({lazySink:t.lazySink,onEscape:function(n){return t.onEscape(n),on.some(!0)},useTabstopAt:function(n){return!HS(n)},dom:{tag:"div",classes:[e].concat(t.extraClasses),styles:N({position:"relative"},t.extraStyles)},components:g([t.header,t.body],t.footer.toArray()),parts:{blocker:{dom:sp('<div class="'+o+'"></div>'),components:[{dom:{tag:"div",classes:tI?[r,r+"--opaque"]:[r]}}]}},dragBlockClass:o,modalBehaviours:ya(g([bg.config({}),Jd("dialog-events",t.dialogEvents.concat([fr(lo(),function(n,t){dg.focusIn(n)})])),Jd("scroll-lock",[Ri(function(){ei(Mi(),i)}),Vi(function(){ri(Mi(),i)})])],t.extraBehaviours)),eventOrder:N((n={},n[To()]=["dialog-events"],n[No()]=["scroll-lock","dialog-events","alloy.base.behaviour"],n[Ho()]=["alloy.base.behaviour","dialog-events","scroll-lock"],n),t.eventOrder)})}function Z_(n){return Xg.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":n.translate("Close"),title:n.translate("Close")}},components:[{dom:{tag:"div",classes:["tox-icon"],innerHtml:'<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg"><path d="M17.953 7.453L13.422 12l4.531 4.547-1.406 1.406L12 13.422l-4.547 4.531-1.406-1.406L10.578 12 6.047 7.453l1.406-1.406L12 10.578l4.547-4.531z" fill-rule="evenodd"></path></svg>'}}],action:function(n){Yt(n,sy)}})}function nM(n,t,e){function o(n){return[Ti(e.translate(n.title))]}return{dom:{tag:"div",classes:["tox-dialog__title"],attributes:N({},t.map(function(n){return{id:n}}).getOr({}))},components:o(n),behaviours:ya([LE.config({channel:KF,renderComponents:o})])}}function tM(){return{dom:sp('<div class="tox-dialog__draghandle"></div>')}}function eM(n,t){return function(n,t){var e=SM.parts().title(nM(n,on.none(),t)),o=SM.parts().draghandle(tM()),r=SM.parts().close(Z_(t)),i=[e].concat(n.draggable?[o]:[]).concat([r]);return Gb.sketch({dom:sp('<div class="tox-dialog__header"></div>'),components:i})}({title:t.shared.providers.translate(n),draggable:t.dialog.isDraggableModal()},t.shared.providers)}function oM(n,t){return{onClose:function(){return t.closeWindow()},onBlock:function(e){SM.setBusy(n(),function(n,t){return{dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":e.message()},styles:{left:"0px",right:"0px",bottom:"0px",top:"0px",position:"absolute"}},behaviours:t,components:[{dom:sp('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}})},onUnblock:function(){SM.setIdle(n())}}}function rM(n,t,e,o){var r;return au(Q_(N(N({},n),{lazySink:o.shared.getSink,extraBehaviours:g([LE.config({channel:qF,updateState:function(n,t){return on.some(t)},initialData:t}),RS({})],n.extraBehaviours),onEscape:function(n){Yt(n,sy)},dialogEvents:e,eventOrder:(r={},r[Oo()]=["reflecting","receiving"],r[No()]=["scroll-lock","reflecting","messages","dialog-events","alloy.base.behaviour"],r[Ho()]=["alloy.base.behaviour","dialog-events","messages","reflecting","scroll-lock"],r)})))}function iM(n){return S(n,function(n){return"menu"===n.type?function(n){var t=S(n.items,function(n){var t=Ee(!1);return N(N({},n),{storage:t})});return N(N({},n),{items:t})}(n):n})}function uM(n){return O(n,function(n,t){return"menu"!==t.type?n:O(t.items,function(n,t){return n[t.name]=t.storage,n},n)},{})}function aM(n,t,e){var o=eM(n.internalDialog.title,e),r=function(n,t){var e=P_(n,on.none(),t,!1);return SM.parts().body(e)}({body:n.internalDialog.body},e),i=iM(n.internalDialog.buttons),u=uM(i),a=U_({buttons:i},e),c=nI(function(){return d},oM(function(){return l},t)),s="normal"!==n.internalDialog.size?"large"===n.internalDialog.size?["tox-dialog--width-lg"]:["tox-dialog--width-md"]:[],f={header:o,body:r,footer:on.some(a),extraClasses:s,extraBehaviours:[],extraStyles:{}},l=rM(f,n,c,e),d=G_({getRoot:function(){return l},getBody:function(){return SM.getBody(l)},getFooter:function(){return SM.getFooter(l)},getFormWrapper:function(){var n=SM.getBody(l);return nd.getCurrent(n).getOr(n)}},t.redial,u);return{dialog:l,instanceApi:d}}function cM(n,t,e,o){var r,i,u=Hr("dialog-label"),a=Hr("dialog-content"),c=bm(function(n,t,e){return Gb.sketch({dom:sp('<div class="tox-dialog__header"></div>'),components:[nM(n,on.some(t),e),tM(),Z_(e)],containerBehaviours:ya([S_.config({mode:"mouse",blockerClass:"blocker",getTarget:function(n){return Tu(n,'[role="dialog"]').getOrDie()},snaps:{getSnapPoints:function(){return[]},leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])})}({title:n.internalDialog.title,draggable:!0},u,e.shared.providers)),s=bm(function(n,t,e,o){return P_(n,on.some(t),e,o)}({body:n.internalDialog.body},a,e,o)),f=iM(n.internalDialog.buttons),l=uM(f),d=bm(function(n,t){return j_(n,t)}({buttons:f},e)),m=nI(function(){return p},{onBlock:function(){},onUnblock:function(){},onClose:function(){return t.closeWindow()}}),g=au({dom:{tag:"div",classes:["tox-dialog","tox-dialog-inline"],attributes:(r={role:"dialog"},r["aria-labelledby"]=u,r["aria-describedby"]=""+a,r)},eventOrder:(i={},i[Oo()]=[LE.name(),dc.name()],i[To()]=["execute-on-form"],i[No()]=["reflecting","execute-on-form"],i),behaviours:ya([dg.config({mode:"cyclic",onEscape:function(n){return Yt(n,cy),on.some(!0)},useTabstopAt:function(n){return!HS(n)&&("button"!==Ko(n)||"disabled"!==Mr(n,"disabled"))}}),LE.config({channel:qF,updateState:function(n,t){return on.some(t)},initialData:n}),bg.config({}),Jd("execute-on-form",m.concat([fr(lo(),function(n,t){dg.focusIn(n)})])),RS({})]),components:[c.asSpec(),s.asSpec(),d.asSpec()]}),p=G_({getRoot:function(){return g},getFooter:function(){return d.get(g)},getBody:function(){return s.get(g)},getFormWrapper:function(){var n=s.get(g);return nd.getCurrent(n).getOr(n)}},t.redial,l);return{dialog:g,instanceApi:p}}function sM(n){return sn(n)&&-1!==oI.indexOf(n.mceAction)}function fM(e,n,o,t){var r,i=eM(e.title,t),u=function(n){var t={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[zS({dom:{tag:"iframe",attributes:{src:n.url}},behaviours:ya([Xy.config({}),bg.config({})])})]}],behaviours:ya([dg.config({mode:"acyclic",useTabstopAt:b(HS)})])};return SM.parts().body(t)}(e),a=e.buttons.bind(function(n){return 0===n.length?on.none():on.some(U_({buttons:n},t))}),c=ZF(function(){return h},oM(function(){return p},n)),s=N(N({},e.height.fold(function(){return{}},function(n){return{height:n+"px","max-height":n+"px"}})),e.width.fold(function(){return{}},function(n){return{width:n+"px","max-width":n+"px"}})),f=e.width.isNone()&&e.height.isNone()?["tox-dialog--width-lg"]:[],l=new eI(e.url,{base_uri:new eI(v.window.location.href)}),d=l.protocol+"://"+l.host+(l.port?":"+l.port:""),m=Ee(on.none()),g=[Jd("messages",[Ri(function(){var n=fb(Be.fromDom(v.window),"message",function(n){if(l.isSameOrigin(new eI(n.raw().origin))){var t=n.raw().data;sM(t)?function(n,t,e){switch(e.mceAction){case"insertContent":n.insertContent(e.content);break;case"setContent":n.setContent(e.content);break;case"execCommand":var o=!!ln(e.ui)&&e.ui;n.execCommand(e.cmd,o,e.value);break;case"close":t.close();break;case"block":t.block(e.message);break;case"unblock":t.unblock()}}(o,h,t):function(n){return!sM(n)&&sn(n)&&Tn(n,"mceAction")}(t)&&e.onMessage(h,t)}});m.set(on.some(n))}),Vi(function(){m.get().each(function(n){return n.unbind()})})]),dc.config({channels:(r={},r[QF]={onReceive:function(n,t){Ou(n.element(),"iframe").each(function(n){n.dom().contentWindow.postMessage(t,d)})}},r)})],p=rM({header:i,body:u,footer:a,extraClasses:f,extraBehaviours:g,extraStyles:s},e,c,t),h=function(t){function n(n){t.getSystem().isConnected()&&n(t)}return{block:function(t){if(!cn(t))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");n(function(n){qt(n,dy,{message:t})})},unblock:function(){n(function(n){Yt(n,my)})},close:function(){n(function(n){Yt(n,cy)})},sendMessage:function(t){n(function(n){n.getSystem().broadcastOn([QF],t)})}}}(p);return{dialog:p,instanceApi:h}}var lM,dM,mM,gM,pM,hM=function(i,r){r.delimiter||(r.delimiter="\xbb");return{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:ya([dg.config({mode:"flow",selector:"div[role=button]"}),Xy.config({}),gg.config({}),Jd("elementPathEvents",[Ri(function(e,n){i.shortcuts.add("alt+F11","focus statusbar elementpath",function(){return dg.focusIn(e)}),i.on("NodeChange",function(n){var t=function(n){for(var t=[],e=n.length;0<e--;){var o=n[e];if(1===o.nodeType&&!T_(o)){var r=i.fire("ResolveName",{name:o.nodeName.toLowerCase(),target:o});if(r.isDefaultPrevented()||t.push({name:r.name,element:o}),r.isPropagationStopped())break}}return t}(n.parents);0<t.length&&gg.set(e,function(n){var t=S(n||[],function(t,n){return Xg.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{role:"button","data-index":n,"tab-index":-1,"aria-level":n+1},innerHtml:t.name},action:function(n){i.focus(),i.selection.select(t.element),i.nodeChanged()}})}),o={dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0},innerHtml:" "+r.delimiter+" "}};return O(t.slice(1),function(n,t){var e=n;return e.push(o),e.push(t),e},[t[0]])}(t))})})])]),components:[]}},vM=function(l){function d(){return e.bind(VA.getHeader)}function m(){return an.value(v)}function n(){return e.bind(function(n){return VA.getMoreButton(n)}).getOrDie("Could not find more button element")}function g(){return e.bind(function(n){return VA.getThrobber(n)}).getOrDie("Could not find throbber element")}var t=l.inline,p=t?qA:WA,h=Qb(l)?pA:yA,e=on.none(),o=Ht(),r=o.browser.isIE()?["tox-platform-ie"]:[],i=o.deviceType.isTouch()?["tox-platform-touch"]:[],u=ih.isRtl()?{attributes:{dir:"rtl"}}:{},v=au({dom:N({tag:"div",classes:["tox","tox-silver-sink","tox-tinymce-aux"].concat(r).concat(i)},u),behaviours:ya([_f.config({useFixed:function(){return h.isDocked(d)}})])}),a=bm({dom:{tag:"div",classes:["tox-anchorbar"]}}),b=SO(v,l,function(){return e.bind(function(n){return a.getOpt(n)}).getOrDie("Could not find a anchor bar element")},n),c=VA.parts().menubar({dom:{tag:"div",classes:["tox-menubar"]},backstage:b,onEscape:function(){l.focus()}}),s=qb(l),f=VA.parts().toolbar({dom:{tag:"div",classes:["tox-toolbar"]},getSink:m,backstage:b,onEscape:function(){l.focus()},split:s,lazyToolbar:function(){return e.bind(function(n){return VA.getToolbar(n)}).getOrDie("Could not find more toolbar element")},lazyMoreButton:n,lazyHeader:function(){return d().getOrDie("Could not find header element")}}),y=VA.parts()["multiple-toolbar"]({dom:{tag:"div",classes:["tox-toolbar-overlord"]},onEscape:function(){},split:s}),x=VA.parts().socket({dom:{tag:"div",classes:["tox-edit-area"]}}),w=VA.parts().sidebar({dom:{tag:"div",classes:["tox-sidebar"]}}),S=VA.parts().throbber({dom:{tag:"div",classes:["tox-throbber"]},backstage:b}),C=l.getParam("statusbar",!0,"boolean")&&!t?on.some(E_(l,b.shared.providers)):on.none(),k={dom:{tag:"div",classes:["tox-sidebar-wrap"]},components:[x,w]},O=Yb(l),T=Lb(l),E=zb(l),D=VA.parts().header({dom:{tag:"div",classes:["tox-editor-header"]},components:H([E?[c]:[],O?[y]:T?[f]:[],Jb(l)?[]:[a.asSpec()]]),sticky:Qb(l),editor:l,getSink:m}),B=H([[D],t?[]:[k]]),A=H([[{dom:{tag:"div",classes:["tox-editor-container"]},components:B}],t?[]:C.toArray(),[S]]),_=$b(l),M=N(N({role:"application"},ih.isRtl()?{dir:"rtl"}:{}),_?{"aria-hidden":"true"}:{}),F=au(VA.sketch({dom:{tag:"div",classes:["tox","tox-tinymce"].concat(t?["tox-tinymce-inline"]:[]).concat(i).concat(r),styles:N({visibility:"hidden"},_?{opacity:"0",border:"0"}:{}),attributes:M},components:A,behaviours:ya([dg.config({mode:"cyclic",selector:".tox-menubar, .tox-toolbar, .tox-toolbar__primary, .tox-toolbar__overflow--open, .tox-sidebar__overflow--open, .tox-statusbar__path, .tox-statusbar__wordcount, .tox-statusbar__branding a"})])}));e=on.some(F),l.shortcuts.add("alt+F9","focus menubar",function(){VA.focusMenubar(F)}),l.shortcuts.add("alt+F10","focus toolbar",function(){VA.focusToolbar(F)});var I=Fb(F),R=Fb(v);KB(l,I,R),uy(l);function V(){var n=YA(tB(l)),t=YA(function(n){return eB(n).getOr(Rb(n))}(l));return l.inline||(pi("div","width",t)&&li(F.element(),"width",t),pi("div","height",n)?li(F.element(),"height",n):li(F.element(),"height","200px")),n}return{mothership:I,uiMothership:R,backstage:b,renderUI:function(){h.setup(l,d),t_(l,b),vB(l,m,b),function(o){var r=o.ui.registry.getAll().sidebars;bn(wn(r),function(t){function e(){return on.from(o.queryCommandValue("ToggleSidebar")).is(t)}var n=r[t];o.ui.registry.addToggleButton(t,{icon:n.icon,tooltip:n.tooltip,onAction:function(n){o.execCommand("ToggleSidebar",!1,t),n.setActive(e())},onSetup:function(n){function t(){return n.setActive(e())}return o.on("ToggleSidebar",t),function(){o.off("ToggleSidebar",t)}}})})}(l),function(e,t,o){function r(n){n!==i.get()&&(JD(t(),n,o.providers),i.set(n))}var i=Ee(!1),u=Ee(on.none());e.on("ProgressState",function(n){if(u.get().each(Kg.clearTimeout),mn(n.time)){var t=Kg.setEditorTimeout(e,function(){return r(n.state)},n.time);u.set(on.some(t))}else r(n.state),u.set(on.none())})}(l,g,b.shared);var n=l.ui.registry.getAll(),t=n.buttons,e=n.menuItems,o=n.contextToolbars,r=n.sidebars,i=jb(l),u={menuItems:e,menus:l.settings.menu?P(l.settings.menu,function(n){return An(n,{items:n.items})}):{},menubar:l.settings.menubar,toolbar:i.getOrThunk(function(){return l.getParam("toolbar",!0)}),buttons:t,sidebar:r};qB(l,o,v,{backstage:b}),k_(l,v);var a=l.getElement(),c=V(),s={mothership:I,uiMothership:R,outerContainer:F},f={targetNode:a,height:c};return p.render(l,s,u,b,f)},getUi:function(){return{channels:{broadcastAll:R.broadcast,broadcastOn:R.broadcastOn,register:function(){}}}}}},bM=function(n,t){var e=on.from(Mr(n,"id")).fold(function(){var n=Hr("dialog-label");return _r(t,"id",n),n},l);_r(n,"aria-labelledby",e)},yM=nn([ct("lazySink"),ht("dragBlockClass"),Dt("getBounds",Cu),St("useTabstopAt",nn(!0)),St("eventOrder",{}),Is("modalBehaviours",[dg]),Ju("onExecute"),Qu("onEscape")]),xM={sketch:l},wM=nn([Cl({name:"draghandle",overrides:function(n,t){return{behaviours:ya([S_.config({mode:"mouse",getTarget:function(n){return ku(n,'[role="dialog"]').getOr(n)},blockerClass:n.dragBlockClass.getOrDie(new Error("The drag blocker class was not specified for a dialog with a drag handle: \n"+JSON.stringify(t,null,2)).message),getBounds:n.getDragBounds})])}}}),wl({schema:[ct("dom")],name:"title"}),wl({factory:xM,schema:[ct("dom")],name:"close"}),wl({factory:xM,schema:[ct("dom")],name:"body"}),Cl({factory:xM,schema:[ct("dom")],name:"footer"}),Sl({factory:{sketch:function(n,t){return N(N({},n),{dom:t.dom,components:t.components})}},schema:[St("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),St("components",[])],name:"blocker"})]),SM=_l({name:"ModalDialog",configFields:yM(),partFields:wM(),factory:function(o,n,t,r){var a=Hr("alloy.dialog.busy"),c=Hr("alloy.dialog.idle"),s=ya([dg.config({mode:"special",onTab:function(){return on.some(!0)},onShiftTab:function(){return on.some(!0)}}),bg.config({})]),e=Hr("modal-events"),i=N(N({},o.eventOrder),{"alloy.system.attached":[e].concat(o.eventOrder["alloy.system.attached"]||[])});return{uid:o.uid,dom:o.dom,components:n,apis:{show:function(i){var n=o.lazySink(i).getOrDie(),u=Ee(on.none()),t=r.blocker(),e=n.getSystem().build(N(N({},t),{components:t.components.concat([cu(i)]),behaviours:ya([bg.config({}),Jd("dialog-blocker-events",[fr(lo(),function(){dg.focusIn(i)}),rr(c,function(n,t){Fr(i.element(),"aria-busy")&&(Ir(i.element(),"aria-busy"),u.get().each(function(n){return gg.remove(i,n)}))}),rr(a,function(n,t){_r(i.element(),"aria-busy","true");var e=t.event().getBusySpec();u.get().each(function(n){gg.remove(i,n)});var o=e(i,s),r=n.getSystem().build(o);u.set(on.some(r)),gg.append(i,cu(r)),r.hasConfigured(dg)&&dg.focusIn(r)})])])}));vs(n,e),dg.focusIn(i)},hide:function(t){br(t.element()).each(function(n){t.getSystem().getByDom(n).each(function(n){ys(n)})})},getBody:function(n){return Js(n,o,"body")},getFooter:function(n){return Js(n,o,"footer")},setIdle:function(n){Yt(n,c)},setBusy:function(n,t){qt(n,a,{getBusySpec:t})}},eventOrder:i,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:Vs(o.modalBehaviours,[gg.config({}),dg.config({mode:"cyclic",onEnter:o.onExecute,onEscape:o.onEscape,useTabstopAt:o.useTabstopAt}),Jd(e,[Ri(function(n){bM(n.element(),Js(n,o,"title").element()),function(n,t){var e=on.from(Mr(n,"id")).fold(function(){var n=Hr("dialog-describe");return _r(t,"id",n),n},l);_r(n,"aria-describedby",e)}(n.element(),Js(n,o,"body").element())})])])}},apis:{show:function(n,t){n.show(t)},hide:function(n,t){n.hide(t)},getBody:function(n,t){return n.getBody(t)},getFooter:function(n,t){return n.getFooter(t)},setBusy:function(n,t,e){n.setBusy(t,e)},setIdle:function(n,t){n.setIdle(t)}}}),CM=[ft("type"),ft("text"),lt("level",["info","warn","error","success"]),ft("icon"),St("url","")],kM=de(CM),OM=[ft("type"),ft("text"),Et("disabled",!1),Et("primary",!1),he("name","name",In(function(){return Hr("button-name")}),Se),yt("icon"),Et("borderless",!1)],TM=de(OM),EM=[ft("type"),ft("name"),ft("label"),Et("disabled",!1)],DM=de(EM),BM=Ce,AM=[ft("type"),ft("name")],_M=AM.concat([yt("label")]),MM=de(_M),FM=Se,IM=de(_M),RM=Se,VM=de(_M),NM=Kn(ve),HM=_M.concat([Et("sandboxed",!0)]),PM=de(HM),zM=Se,LM=_M.concat([yt("inputMode"),yt("placeholder"),Et("maximized",!1),Et("disabled",!1)]),jM=de(LM),UM=Se,WM=_M.concat([gt("items",[ft("text"),ft("value")]),kt("size",1),Et("disabled",!1)]),GM=de(WM),XM=Se,YM=_M.concat([Et("constrain",!0),Et("disabled",!1)]),qM=de(YM),KM=de([ft("width"),ft("height")]),JM=_M.concat([yt("placeholder"),Et("maximized",!1),Et("disabled",!1)]),$M=de(JM),QM=Se,ZM=_M.concat([Tt("filetype","file",["image","media","file"]),St("disabled",!1)]),nF=de(ZM),tF=de([ft("value"),St("meta",{})]),eF=AM.concat([Ot("tag","textarea"),ft("scriptId"),ft("scriptUrl"),(lM="settings",dM=undefined,Ct(lM,dM,Te))]),oF=AM.concat([Ot("tag","textarea"),dt("init")]),rF=Zn(function(n){return tt("customeditor.old",qn(oF),n).orThunk(function(){return tt("customeditor.new",qn(eF),n)})}),iF=Se,uF=[ft("type"),ft("html"),Tt("presets","presentation",["presentation","document"])],aF=de(uF),cF=_M.concat([st("currentState",de([ct("blob"),ft("url")]))]),sF=de(cF),fF=_M.concat([St("columns","auto")]),lF=de(fF),dF=(mM=[ft("value"),ft("text"),ft("icon")],ge(mM)),mF=[ft("type"),pt("header",Se),pt("cells",Kn(Se))],gF=de(mF),pF=be(function(){return rt("type",{alertbanner:kM,bar:de(function(n){return[ft("type"),n]}(B_("bar"))),button:TM,checkbox:DM,colorinput:MM,colorpicker:IM,dropzone:VM,grid:de(D_(B_("grid"))),iframe:PM,input:jM,selectbox:GM,sizeinput:qM,textarea:$M,urlinput:nF,customeditor:rF,htmlpanel:aF,imagetools:sF,collection:lF,label:de(function(n){return[ft("type"),ft("label"),n]}(B_("label"))),table:gF,panel:vF})}),hF=[ft("type"),St("classes",[]),pt("items",pF)],vF=de(hF),bF=[he("name","name",In(function(){return Hr("tab-name")}),Se),ft("title"),pt("items",pF)],yF=[ft("type"),gt("tabs",bF)],xF=de(yF),wF=de([ft("type"),ft("name"),Et("active",!1)].concat(Gp)),SF=Ce,CF=[he("name","name",In(function(){return Hr("button-name")}),Se),yt("icon"),Tt("align","end",["start","end"]),Et("primary",!1),Et("disabled",!1)],kF=g(CF,[ft("text")]),OF=g([lt("type",["submit","cancel","custom"])],kF),TF=g([lt("type",["menu"]),yt("text"),yt("tooltip"),yt("icon"),pt("items",wF),Dt("onSetup",function(){return Z})],CF),EF=kF,DF=it("type",{submit:OF,cancel:OF,custom:OF,menu:TF}),BF=de([ft("title"),st("body",rt("type",{panel:vF,tabpanel:xF})),Ot("size","normal"),pt("buttons",DF),St("initialData",{}),Dt("onAction",Z),Dt("onChange",Z),Dt("onSubmit",Z),Dt("onClose",Z),Dt("onCancel",Z),St("onTabChange",Z)]),AF=function(n){return sn(n)?[n].concat(D(R(n),AF)):fn(n)?D(n,AF):[]},_F={checkbox:BM,colorinput:FM,colorpicker:RM,dropzone:NM,input:UM,iframe:zM,sizeinput:KM,selectbox:XM,size:KM,textarea:QM,urlinput:tF,customeditor:iF,collection:dF,togglemenuitem:SF},MF=de(g([lt("type",["cancel","custom"])],EF)),FF=de([ft("title"),ft("url"),bt("height"),bt("width"),(gM="buttons",pM=MF,vt(gM,Kn(pM))),Dt("onAction",Z),Dt("onCancel",Z),Dt("onClose",Z),Dt("onMessage",Z)]),IF={open:function(n,t){var e=M_(t);return n(e.internalDialog,e.initialData,e.dataValidator)},openUrl:function(n,t){return n(et(function(n){return tt("dialog",FF,n)}(t)))},redial:function(n){return M_(n)}},RF=Al({name:"TabButton",configFields:[St("uid",undefined),ct("value"),he("dom","dom",Rn(function(n){return{attributes:{role:"tab",id:Hr("aria"),"aria-selected":"false"}}}),xe()),ht("action"),St("domModification",{}),Is("tabButtonBehaviours",[bg,dg,nl]),ct("view")],factory:function(n,t){return{uid:n.uid,dom:n.dom,components:n.components,events:im(n.action),behaviours:Vs(n.tabButtonBehaviours,[bg.config({}),dg.config({mode:"execution",useSpace:!0,useEnter:!0}),nl.config({store:{mode:"memory",initialValue:n.value}})]),domModification:n.domModification}}}),VF=nn([ct("tabs"),ct("dom"),St("clickToDismiss",!1),Is("tabbarBehaviours",[cd,dg]),Yu(["tabClass","selectedClass"])]),NF=kl({factory:RF,name:"tabs",unit:"tab",overrides:function(o,n){function r(n,t){cd.dehighlight(n,t),qt(n,Wo(),{tabbar:n,button:t})}function i(n,t){cd.highlight(n,t),qt(n,Uo(),{tabbar:n,button:t})}return{action:function(n){var t=n.getSystem().getByUid(o.uid).getOrDie(),e=cd.isHighlighted(t,n);(e&&o.clickToDismiss?r:e?Z:i)(t,n)},domModification:{classes:[o.markers.tabClass]}}}}),HF=nn([NF]),PF=_l({name:"Tabbar",configFields:VF(),partFields:HF(),factory:function(n,t,e,o){return{uid:n.uid,dom:n.dom,components:t,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:Vs(n.tabbarBehaviours,[cd.config({highlightClass:n.markers.selectedClass,itemClass:n.markers.tabClass,onHighlight:function(n,t){_r(t.element(),"aria-selected","true")},onDehighlight:function(n,t){_r(t.element(),"aria-selected","false")}}),dg.config({mode:"flow",getInitial:function(n){return cd.getHighlighted(n).map(function(n){return n.element()})},selector:"."+n.markers.tabClass,executeOnMove:!0})])}}}),zF=Al({name:"Tabview",configFields:[Is("tabviewBehaviours",[gg])],factory:function(n,t){return{uid:n.uid,dom:n.dom,behaviours:Vs(n.tabviewBehaviours,[gg.config({})]),domModification:{attributes:{role:"tabpanel"}}}}}),LF=nn([St("selectFirst",!0),Ku("onChangeTab"),Ku("onDismissTab"),St("tabs",[]),Is("tabSectionBehaviours",[])]),jF=wl({factory:PF,schema:[ct("dom"),mt("markers",[ct("tabClass"),ct("selectedClass")])],name:"tabbar",defaults:function(n){return{tabs:n.tabs}}}),UF=wl({factory:zF,name:"tabview"}),WF=nn([jF,UF]),GF=_l({name:"TabSection",configFields:LF(),partFields:WF(),factory:function(r,n,t,e){function o(n,t){Ks(n,r,"tabbar").each(function(n){t(n).each(Kt)})}return{uid:r.uid,dom:r.dom,components:n,behaviours:Rs(r.tabSectionBehaviours),events:tr(H([r.selectFirst?[Ri(function(n,t){o(n,cd.getFirst)})]:[],[rr(Uo(),function(n,t){!function(o){var t=nl.getValue(o);Ks(o,r,"tabview").each(function(e){T(r.tabs,function(n){return n.value===t}).each(function(n){var t=n.view();_r(e.element(),"aria-labelledby",Mr(o.element(),"id")),gg.set(e,t),r.onChangeTab(e,o,t)})})}(t.event().button())}),rr(Wo(),function(n,t){var e=t.event().button();r.onDismissTab(n,e)})]])),apis:{getViewItems:function(n){return Ks(n,r,"tabview").map(function(n){return gg.contents(n)}).getOr([])},showTab:function(n,e){o(n,function(t){var n=cd.getCandidates(t);return T(n,function(n){return nl.getValue(n)===e}).filter(function(n){return!cd.isHighlighted(t,n)})})}}}},apis:{getViewItems:function(n,t){return n.getViewItems(t)},showTab:function(n,t,e){n.showTab(t,e)}}}),XF="send-data-to-section",YF="send-data-to-view",qF=Hr("update-dialog"),KF=Hr("update-title"),JF=Hr("update-body"),$F=Hr("update-footer"),QF=Hr("body-send-message"),ZF=function(i,n){function t(n,r){return rr(n,function(e,o){u(e,function(n,t){r(i(),n,o.event(),e)})})}var u=function(t,e){LE.getState(t).get().each(function(n){e(n,t)})};return g(z_(t,n),[t(fy,function(n,t,e){t.onAction(n,{name:e.name()})})])},nI=function(i,n){function t(n,r){return rr(n,function(e,o){u(e,function(n,t){r(i(),n,o.event(),e)})})}var u=function(t,e){LE.getState(t).get().each(function(n){e(n.internalDialog,t)})};return g(z_(t,n),[t(ly,function(n,t){return t.onSubmit(n)}),t(ay,function(n,t,e){t.onChange(n,{name:e.name()})}),t(fy,function(n,t,e,o){function r(){return dg.focusIn(o)}var i=Ca();t.onAction(n,{name:e.name(),value:e.value()}),Ca().fold(function(){r()},function(n){!to(o.element(),n)||Fr(n,"disabled")?r():to(n,i.getOrNull())&&Fr(i.getOrDie(),"disabled")&&r()})}),t(gy,function(n,t,e){t.onTabChange(n,{newTabName:e.name(),oldTabName:e.oldName()})}),Vi(function(n){var t=i();nl.setValue(n,t.getData())})])},tI=ph.deviceType.isTouch(),eI=tinymce.util.Tools.resolve("tinymce.util.URI"),oI=["insertContent","setContent","execCommand","close","block","unblock"],rI=function(n){var l=n.backstage,d=n.editor,m=Qb(d),e=function(c){var s=c.backstage.shared;return{open:function(n,t){function e(){SM.hide(u),t()}var o=bm(ZC({name:"close-alert",text:"OK",primary:!0,align:"end",disabled:!1,icon:on.none()},"cancel",c.backstage)),r=q_(),i=Y_(e,s.providers),u=au(Q_({lazySink:function(){return s.getSink()},header:X_(r,i),body:K_(n,s.providers),footer:on.some(J_($_([],[o.asSpec()]))),onEscape:e,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[rr(sy,e)],eventOrder:{}}));SM.show(u);var a=o.get(u);bg.focus(a)}}}(n),o=function(s){var f=s.backstage.shared;return{open:function(n,t){function e(n){SM.hide(a),t(n)}var o=bm(ZC({name:"yes",text:"Yes",primary:!0,align:"end",disabled:!1,icon:on.none()},"submit",s.backstage)),r=ZC({name:"no",text:"No",primary:!0,align:"end",disabled:!1,icon:on.none()},"cancel",s.backstage),i=q_(),u=Y_(function(){return e(!1)},f.providers),a=au(Q_({lazySink:function(){return f.getSink()},header:X_(i,u),body:K_(n,f.providers),footer:on.some(J_($_([],[r,o.asSpec()]))),onEscape:function(){return e(!1)},extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[rr(sy,function(){return e(!1)}),rr(ly,function(){return e(!0)})],eventOrder:{}}));SM.show(a);var c=o.get(a);bg.focus(c)}}}(n),r=function(n,e){return IF.openUrl(function(n){var t=fM(n,{closeWindow:function(){SM.hide(t.dialog),e(t.instanceApi)}},d,l);return SM.show(t.dialog),t.instanceApi},n)},i=function(n,i){return IF.open(function(n,t,e){var o=t,r=aM({dataValidator:e,initialData:o,internalDialog:n},{redial:IF.redial,closeWindow:function(){SM.hide(r.dialog),i(r.instanceApi)}},l);return SM.show(r.dialog),r.instanceApi.setData(o),r.instanceApi},n)},u=function(n,c,s,f){return IF.open(function(n,t,e){function o(){return i.on(function(n){lA.refresh(n)})}var r=function(n,t){return et(tt("data",t,n))}(t,e),i=function(){var t=Ee(on.none());return{clear:function(){t.set(on.none())},set:function(n){t.set(on.some(n))},isSet:function(){return t.get().isSome()},on:function(n){t.get().each(n)}}}(),u=cM({dataValidator:e,initialData:r,internalDialog:n},{redial:IF.redial,closeWindow:function(){i.on(Ug.hide),d.off("ResizeEditor",o),i.clear(),s(u.instanceApi)}},l,f),a=au(Ug.sketch({lazySink:l.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:{},inlineBehaviours:ya(g([Jd("window-manager-inline-events",[rr(Po(),function(n,t){Yt(u.dialog,sy)})])],function(n,t){return t?[]:[lA.config({contextual:{lazyContext:function(){return on.some(wu(Be.fromDom(n.getContentAreaContainer())))},fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},leftAttr:"data-dock-left",topAttr:"data-dock-top",positionAttr:"data-dock-pos",modes:["top"]})]}(d,m)))}));return i.set(a),Ug.showWithin(a,c,cu(u.dialog),on.some(Mi())),m||(lA.refresh(a),d.on("ResizeEditor",o)),u.instanceApi.setData(r),dg.focusIn(u.dialog),u.instanceApi},n)};return{open:function(n,t,e){return t!==undefined&&"toolbar"===t.inline?u(n,l.shared.anchors.toolbar(),e,t.ariaAttrs):t!==undefined&&"cursor"===t.inline?u(n,l.shared.anchors.cursor(),e,t.ariaAttrs):i(n,e)},openUrl:function(n,t){return r(n,t)},alert:function(n,t){e.open(n,function(){t()})},close:function(n){n.close()},confirm:function(n,t){o.open(n,function(n){t(n)})}}};!function gI(){n.add("silver",function(n){var t=vM(n),e=t.uiMothership,o=t.backstage,r=t.renderUI,i=t.getUi;mb(n,o.shared);var u=rI({editor:n,backstage:o});return{renderUI:r,getWindowManagerImpl:nn(u),getNotificationManagerImpl:function(){return Jg(0,{backstage:o},e)},ui:i()}})}()}(window);
9
+ !function(v){"use strict";function Z(){}function i(e,o){return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return e(o.apply(null,n))}}function l(n){return n}var nn=function(n){return function(){return n}};function d(o){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=r.concat(n);return o.apply(null,e)}}function b(e){return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return!e.apply(null,n)}}function r(n){return function(){throw new Error(n)}}var u=nn(!1),a=nn(!0),n=tinymce.util.Tools.resolve("tinymce.ThemeManager"),N=function(){return(N=Object.assign||function(n){for(var t,e=1,o=arguments.length;e<o;e++)for(var r in t=arguments[e])Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}).apply(this,arguments)};function c(n,t){var e={};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&t.indexOf(o)<0&&(e[o]=n[o]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(n);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(n,o[r])&&(e[o[r]]=n[o[r]])}return e}function g(){for(var n=0,t=0,e=arguments.length;t<e;t++)n+=arguments[t].length;var o=Array(n),r=0;for(t=0;t<e;t++)for(var i=arguments[t],u=0,a=i.length;u<a;u++,r++)o[r]=i[u];return o}function t(){return s}var e,s=(e={fold:function(n,t){return n()},is:u,isSome:u,isNone:a,getOr:m,getOrThunk:f,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:nn(null),getOrUndefined:nn(undefined),or:m,orThunk:f,map:t,each:Z,bind:t,exists:u,forall:a,filter:t,equals:o,equals_:o,toArray:function(){return[]},toString:nn("none()")},Object.freeze&&Object.freeze(e),e);function o(n){return n.isNone()}function f(n){return n()}function m(n){return n}function p(t){return function(n){return function(n){if(null===n)return"null";var t=typeof n;return"object"==t&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":t}(n)===t}}function h(n,t){if(fn(n)){for(var e=0,o=n.length;e<o;++e)if(!0!==t(n[e]))return!1;return!0}return!1}function y(n,t){return pn.call(n,t)}function x(n,t){for(var e=0,o=n.length;e<o;e++){if(t(n[e],e))return!0}return!1}function w(n,t){for(var e=[],o=0;o<n.length;o+=t){var r=gn.call(n,o,o+t);e.push(r)}return e}function S(n,t){for(var e=n.length,o=new Array(e),r=0;r<e;r++){var i=n[r];o[r]=t(i,r)}return o}function C(n,t){for(var e=[],o=0,r=n.length;o<r;o++){var i=n[o];t(i,o)&&e.push(i)}return e}function k(n,t,e){return function(n,t){for(var e=n.length-1;0<=e;e--){t(n[e],e)}}(n,function(n){e=t(e,n)}),e}function O(n,t,e){return bn(n,function(n){e=t(e,n)}),e}function E(n,t){for(var e=0,o=n.length;e<o;e++){var r=n[e];if(t(r,e))return on.some(r)}return on.none()}function T(n,t){for(var e=0,o=n.length;e<o;e++){if(t(n[e],e))return on.some(e)}return on.none()}function H(n){for(var t=[],e=0,o=n.length;e<o;++e){if(!fn(n[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+n);hn.apply(t,n[e])}return t}function B(n,t){var e=S(n,t);return H(e)}function D(n,t){for(var e=0,o=n.length;e<o;++e){if(!0!==t(n[e],e))return!1}return!0}function A(n){var t=gn.call(n,0);return t.reverse(),t}function _(n,t){return C(n,function(n){return!vn(t,n)})}function M(n){return[n]}function F(n){return 0===n.length?on.none():on.some(n[n.length-1])}function P(n,e){return kn(n,function(n,t){return{k:t,v:e(n,t)}})}function I(n,t){for(var e=wn(n),o=0,r=e.length;o<r;o++){var i=e[o],u=n[i];if(t(u,i,n))return on.some(u)}return on.none()}function R(n){return On(n,function(n){return n})}function V(n,t){return En(n,t)?on.from(n[t]):on.none()}function z(u){return function(){for(var n=new Array(arguments.length),t=0;t<n.length;t++)n[t]=arguments[t];if(0===n.length)throw new Error("Can't merge zero objects");for(var e={},o=0;o<n.length;o++){var r=n[o];for(var i in r)Bn.call(r,i)&&(e[i]=u(e[i],r[i]))}return e}}function L(e){var o,r=!1;return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return r||(r=!0,o=e.apply(null,n)),o}}function j(n){return _n.defaultedThunk(nn(n))}function U(t){return function(n){return En(n,t)?on.from(n[t]):on.none()}}function W(n,t){return U(t)(n)}function G(n,t){var e={};return e[n]=t,e}function X(n,t){return function(n,e){var o={};return Cn(n,function(n,t){vn(e,t)||(o[t]=n)}),o}(n,t)}function Y(n,t){return function(t,e){return function(n){return En(n,t)?n[t]:e}}(n,t)}function q(n,t){return G(n,t)}function K(n){return function(n){var t={};return bn(n,function(n){t[n.key]=n.value}),t}(n)}function J(n,t){var e=function(n){var t=[],e=[];return bn(n,function(n){n.fold(function(n){t.push(n)},function(n){e.push(n)})}),{errors:t,values:e}}(n);return 0<e.errors.length?function(n){return an.error(H(n))}(e.errors):function(n,t){return 0===n.length?an.value(t):an.value(Dn(t,An.apply(undefined,n)))}(e.values,t)}function $(n,t){return function(n,t){return En(n,t)&&n[t]!==undefined&&null!==n[t]}(n,t)}var Q,tn,en=function(e){function n(){return r}function t(n){return n(e)}var o=nn(e),r={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:a,isNone:u,getOr:o,getOrThunk:o,getOrDie:o,getOrNull:o,getOrUndefined:o,or:n,orThunk:n,map:function(n){return en(n(e))},each:function(n){n(e)},bind:t,exists:t,forall:t,filter:function(n){return n(e)?r:s},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(u,function(n){return t(e,n)})}};return r},on={some:en,none:t,from:function(n){return null===n||n===undefined?s:en(n)}},rn=function(e){return{is:function(n){return e===n},isValue:a,isError:u,getOr:nn(e),getOrThunk:nn(e),getOrDie:nn(e),or:function(n){return rn(e)},orThunk:function(n){return rn(e)},fold:function(n,t){return t(e)},map:function(n){return rn(n(e))},mapError:function(n){return rn(e)},each:function(n){n(e)},bind:function(n){return n(e)},exists:function(n){return n(e)},forall:function(n){return n(e)},toOption:function(){return on.some(e)}}},un=function(e){return{is:u,isValue:u,isError:a,getOr:l,getOrThunk:function(n){return n()},getOrDie:function(){return r(String(e))()},or:function(n){return n},orThunk:function(n){return n()},fold:function(n,t){return n(e)},map:function(n){return un(e)},mapError:function(n){return un(n(e))},each:Z,bind:function(n){return un(e)},exists:u,forall:a,toOption:on.none}},an={value:rn,error:un,fromOption:function(n,t){return n.fold(function(){return un(t)},rn)}},cn=p("string"),sn=p("object"),fn=p("array"),ln=p("boolean"),dn=p("function"),mn=p("number"),gn=Array.prototype.slice,pn=Array.prototype.indexOf,hn=Array.prototype.push,vn=function(n,t){return-1<y(n,t)},bn=function(n,t){for(var e=0,o=n.length;e<o;e++){t(n[e],e)}},yn=function(n){return 0===n.length?on.none():on.some(n[0])},xn=dn(Array.from)?Array.from:function(n){return gn.call(n)},wn=Object.keys,Sn=Object.hasOwnProperty,Cn=function(n,t){for(var e=wn(n),o=0,r=e.length;o<r;o++){var i=e[o];t(n[i],i)}},kn=function(n,o){var r={};return Cn(n,function(n,t){var e=o(n,t);r[e.k]=e.v}),r},On=function(n,e){var o=[];return Cn(n,function(n,t){o.push(e(n,t))}),o},En=function(n,t){return Sn.call(n,t)},Tn=function(u){if(!fn(u))throw new Error("cases must be an array");if(0===u.length)throw new Error("there must be at least one case");var a=[],e={};return bn(u,function(n,o){var t=wn(n);if(1!==t.length)throw new Error("one and only one name per case");var r=t[0],i=n[r];if(e[r]!==undefined)throw new Error("duplicate key detected:"+r);if("cata"===r)throw new Error("cannot have a case named cata (sorry)");if(!fn(i))throw new Error("case arguments must be an array");a.push(r),e[r]=function(){var n=arguments.length;if(n!==i.length)throw new Error("Wrong number of arguments to case "+r+". Expected "+i.length+" ("+i+"), got "+n);for(var e=new Array(n),t=0;t<e.length;t++)e[t]=arguments[t];return{fold:function(){if(arguments.length!==u.length)throw new Error("Wrong number of arguments to fold. Expected "+u.length+", got "+arguments.length);return arguments[o].apply(null,e)},match:function(n){var t=wn(n);if(a.length!==t.length)throw new Error("Wrong number of arguments to match. Expected: "+a.join(",")+"\nActual: "+t.join(","));if(!D(a,function(n){return vn(t,n)}))throw new Error("Not all branches were specified when using match. Specified: "+t.join(", ")+"\nRequired: "+a.join(", "));return n[r].apply(null,e)},log:function(n){v.console.log(n,{constructors:a,constructor:r,params:e})}}}}),e},Bn=Object.prototype.hasOwnProperty,Dn=z(function(n,t){return sn(n)&&sn(t)?Dn(n,t):t}),An=z(function(n,t){return t}),_n=Tn([{strict:[]},{defaultedThunk:["fallbackThunk"]},{asOption:[]},{asDefaultedOptionThunk:["fallbackThunk"]},{mergeWithThunk:["baseThunk"]}]),Mn=_n.strict,Fn=_n.asOption,In=_n.defaultedThunk,Rn=_n.mergeWithThunk,Vn=(Tn([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]),function(n){return U(n)}),Nn=function(n,t){return W(n,t)};(tn=Q=Q||{})[tn.Error=0]="Error",tn[tn.Value=1]="Value";function Hn(n,t,e){return n.stype===Q.Error?t(n.serror):e(n.svalue)}function Pn(n){return{stype:Q.Value,svalue:n}}function zn(n){return{stype:Q.Error,serror:n}}function Ln(n){return i(qt,H)(n)}function jn(n){return sn(n)&&100<wn(n).length?" removed due to size":JSON.stringify(n,null,2)}function Un(n,t){return qt([{path:n,getErrorInfo:t}])}function Wn(n,t,e){return W(t,e).fold(function(){return function(n,t,e){return Un(n,function(){return'Could not find valid *strict* value for "'+t+'" in '+jn(e)})}(n,e,t)},Xt)}function Gn(n,t,e){var o=W(n,t).fold(function(){return e(n)},l);return Xt(o)}function Xn(u,a,n,c){return n.fold(function(o,e,n,r){function i(n){var t=r.extract(u.concat([o]),c,n);return $t(t,function(n){return G(e,c(n))})}function t(n){return n.fold(function(){var n=G(e,c(on.none()));return Xt(n)},function(n){var t=r.extract(u.concat([o]),c,n);return $t(t,function(n){return G(e,c(on.some(n)))})})}return n.fold(function(){return Kt(Wn(u,a,o),i)},function(n){return Kt(Gn(a,o,n),i)},function(){return Kt(function(n,t){return Xt(W(n,t))}(a,o),t)},function(n){return Kt(function(t,n,e){var o=W(t,n).map(function(n){return!0===n?e(t):n});return Xt(o)}(a,o,n),t)},function(n){var t=n(a),e=$t(Gn(a,o,nn({})),function(n){return Dn(t,n)});return Kt(e,i)})},function(n,t){var e=t(a);return Xt(G(n,c(e)))})}function Yn(o){return{extract:function(t,n,e){return Jt(o(e,n),function(n){return function(n,t){return Un(n,function(){return t})}(t,n)})},toString:function(){return"val"},toDsl:function(){return te.itemOf(o)}}}function qn(n){var i=re(n),u=k(n,function(t,n){return n.fold(function(n){return Dn(t,q(n,!0))},nn(t))},{});return{extract:function(n,t,e){var o=ln(e)?[]:function(t){var n=wn(t);return C(n,function(n){return $(t,n)})}(e),r=C(o,function(n){return!$(u,n)});return 0===r.length?i.extract(n,t,e):function(n,t){return Un(n,function(){return"There are unsupported fields: ["+t.join(", ")+"] specified"})}(n,r)},toString:i.toString,toDsl:i.toDsl}}function Kn(r){return{extract:function(e,o,n){var t=S(n,function(n,t){return r.extract(e.concat(["["+t+"]"]),o,n)});return ne(t)},toString:function(){return"array("+r.toString()+")"},toDsl:function(){return te.arrOf(r)}}}function Jn(i,u){return{extract:function(e,o,r){var n=wn(r),t=function(n,t){return Kn(Yn(i)).extract(n,l,t)}(e,n);return Kt(t,function(n){var t=S(n,function(n){return oe.field(n,n,Mn(),u)});return re(t).extract(e,o,r)})},toString:function(){return"setOf("+u.toString()+")"},toDsl:function(){return te.setOf(i,u)}}}function $n(t,e,o,n,r){return Nn(n,r).fold(function(){return function(n,t,e){return Un(n,function(){return'The chosen schema: "'+e+'" did not exist in branches: '+jn(t)})}(t,n,r)},function(n){return n.extract(t.concat(["branch: "+r]),e,o)})}function Qn(n,r){return{extract:function(t,e,o){return Nn(o,n).fold(function(){return function(n,t){return Un(n,function(){return'Choice schema did not contain choice key: "'+t+'"'})}(t,n)},function(n){return $n(t,e,o,r,n)})},toString:function(){return"chooseOn("+n+"). Possible values: "+wn(r)},toDsl:function(){return te.choiceOf(n,r)}}}function Zn(t){return Yn(function(n){return t(n).fold(qt,Xt)})}function nt(t,n){return Jn(function(n){return Wt(t(n))},n)}function tt(n,t,e){return Gt(function(n,t,e,o){var r=t.extract([n],e,o);return Qt(r,function(n){return{input:o,errors:n}})}(n,t,l,e))}function et(n){return n.fold(function(n){throw new Error(le(n))},l)}function ot(n,t,e){return et(tt(n,t,e))}function rt(n,t){return Qn(n,t)}function it(n,t){return Qn(n,P(t,re))}function ut(e,o){return Yn(function(n){var t=typeof n;return e(n)?Xt(n):qt("Expected type: "+o+" but got: "+t)})}function at(t){return Zn(function(n){return vn(t,n)?an.value(n):an.error('Unsupported value: "'+n+'", choose one of "'+t.join(", ")+'".')})}function ct(n){return ce(n,n,Mn(),ie())}function st(n,t){return ce(n,n,Mn(),t)}function ft(n){return st(n,ge)}function lt(n,t){return ce(n,n,Mn(),at(t))}function dt(n){return st(n,he)}function mt(n,t){return ce(n,n,Mn(),re(t))}function gt(n,t){return ce(n,n,Mn(),ue(t))}function pt(n,t){return ce(n,n,Mn(),Kn(t))}function ht(n){return ce(n,n,Fn(),ie())}function vt(n,t){return ce(n,n,Fn(),t)}function bt(n){return vt(n,me)}function yt(n){return vt(n,ge)}function xt(n){return vt(n,he)}function wt(n,t){return vt(n,re(t))}function St(n,t){return ce(n,n,j(t),ie())}function Ct(n,t,e){return ce(n,n,j(t),e)}function kt(n,t){return Ct(n,t,me)}function Ot(n,t){return Ct(n,t,ge)}function Et(n,t,e){return Ct(n,t,at(e))}function Tt(n,t){return Ct(n,t,pe)}function Bt(n,t){return Ct(n,t,he)}function Dt(n,t,e){return Ct(n,t,re(e))}function At(n,t){return ae(n,t)}function _t(n,t,e){return 0!=(n.compareDocumentPosition(t)&e)}function Mt(n,t){var e=function(n,t){for(var e=0;e<n.length;e++){var o=n[e];if(o.test(t))return o}return undefined}(n,t);if(!e)return{major:0,minor:0};function o(n){return Number(t.replace(e,"$"+n))}return ke(o(1),o(2))}function Ft(n,t){return function(){return t===n}}function It(n,t){return function(){return t===n}}function Rt(n,t){var e=String(t).toLowerCase();return E(n,function(n){return n.search(e)})}function Vt(n,t){return-1!==n.indexOf(t)}function Nt(t){return function(n){return Vt(n,t)}}function Ht(){return Le.get()}function Pt(n,t){var e=n.dom();if(e.nodeType!==Ge)return!1;var o=e;if(o.matches!==undefined)return o.matches(t);if(o.msMatchesSelector!==undefined)return o.msMatchesSelector(t);if(o.webkitMatchesSelector!==undefined)return o.webkitMatchesSelector(t);if(o.mozMatchesSelector!==undefined)return o.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}function zt(n){return n.nodeType!==Ge&&n.nodeType!==Xe||0===n.childElementCount}function Lt(n,t){var e=t===undefined?v.document:t.dom();return zt(e)?[]:S(e.querySelectorAll(n),we.fromDom)}function jt(n,t){return n.dom()===t.dom()}function Ut(n,t){return jt(n.element(),t.event().target())}var Wt=function(n){return n.fold(zn,Pn)},Gt=function(n){return Hn(n,an.error,an.value)},Xt=Pn,Yt=function(n){var t=[],e=[];return bn(n,function(n){Hn(n,function(n){return e.push(n)},function(n){return t.push(n)})}),{values:t,errors:e}},qt=zn,Kt=function(n,t){return n.stype===Q.Value?t(n.svalue):n},Jt=function(n,t){return n.stype===Q.Error?t(n.serror):n},$t=function(n,t){return n.stype===Q.Value?{stype:Q.Value,svalue:t(n.svalue)}:n},Qt=function(n,t){return n.stype===Q.Error?{stype:Q.Error,serror:t(n.serror)}:n},Zt=function(n,t){var e=Yt(n);return 0<e.errors.length?Ln(e.errors):function(n,t){return 0<n.length?Xt(Dn(t,An.apply(undefined,n))):Xt(t)}(e.values,t)},ne=function(n){var t=Yt(n);return 0<t.errors.length?Ln(t.errors):Xt(t.values)},te=Tn([{setOf:["validator","valueType"]},{arrOf:["valueType"]},{objOf:["fields"]},{itemOf:["validator"]},{choiceOf:["key","branches"]},{thunk:["description"]},{func:["args","outputSchema"]}]),ee=Tn([{field:["name","presence","type"]},{state:["name"]}]),oe=Tn([{field:["key","okey","presence","prop"]},{state:["okey","instantiator"]}]),re=function(o){return{extract:function(n,t,e){return function(t,e,n,o){var r=S(n,function(n){return Xn(t,e,n,o)});return Zt(r,{})}(n,e,o,t)},toString:function(){return"obj{\n"+S(o,function(n){return n.fold(function(n,t,e,o){return n+" -> "+o.toString()},function(n,t){return"state("+n+")"})}).join("\n")+"}"},toDsl:function(){return te.objOf(S(o,function(n){return n.fold(function(n,t,e,o){return ee.field(n,e,o)},function(n,t){return ee.state(n)})}))}}},ie=nn(Yn(Xt)),ue=i(Kn,re),ae=oe.state,ce=oe.field,se=Yn(Xt),fe=function(o){return{extract:function(n,t,e){return o().extract(n,t,e)},toString:function(){return o().toString()},toDsl:function(){return o().toDsl()}}},le=function(n){return"Errors: \n"+function(n){var t=10<n.length?n.slice(0,10).concat([{path:[],getErrorInfo:function(){return"... (only showing first ten failures)"}}]):n;return S(t,function(n){return"Failed path: ("+n.path.join(" > ")+")\n"+n.getErrorInfo()})}(n.errors)+"\n\nInput object: "+jn(n.input)},de=nn(se),me=ut(mn,"number"),ge=ut(cn,"string"),pe=ut(ln,"boolean"),he=ut(dn,"function"),ve=function(t){function n(n,t){for(var e=n.next();!e.done;){if(!t(e.value))return!1;e=n.next()}return!0}if(Object(t)!==t)return!0;switch({}.toString.call(t).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return!0;case"Array":case"Object":return Object.keys(t).every(function(n){return ve(t[n])});case"Map":return n(t.keys(),ve)&&n(t.values(),ve);case"Set":return n(t.keys(),ve);default:return!1}},be=Yn(function(n){return ve(n)?Xt(n):qt("Expected value to be acceptable for sending via postMessage")}),ye=function(n){function t(){return e}var e=n;return{get:t,set:function(n){e=n},clone:function(){return ye(t())}}},xe=function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:nn(n)}},we={fromHtml:function(n,t){var e=(t||v.document).createElement("div");if(e.innerHTML=n,!e.hasChildNodes()||1<e.childNodes.length)throw v.console.error("HTML does not have a single root node",n),new Error("HTML must have a single root node");return xe(e.childNodes[0])},fromTag:function(n,t){var e=(t||v.document).createElement(n);return xe(e)},fromText:function(n,t){var e=(t||v.document).createTextNode(n);return xe(e)},fromDom:xe,fromPoint:function(n,t,e){var o=n.dom();return on.from(o.elementFromPoint(t,e)).map(xe)}},Se=function(n,t){return _t(n,t,v.Node.DOCUMENT_POSITION_CONTAINED_BY)},Ce=function(){return ke(0,0)},ke=function(n,t){return{major:n,minor:t}},Oe={nu:ke,detect:function(n,t){var e=String(t).toLowerCase();return 0===n.length?Ce():Mt(n,e)},unknown:Ce},Ee="Firefox",Te=function(n){var t=n.current;return{current:t,version:n.version,isEdge:Ft("Edge",t),isChrome:Ft("Chrome",t),isIE:Ft("IE",t),isOpera:Ft("Opera",t),isFirefox:Ft(Ee,t),isSafari:Ft("Safari",t)}},Be={unknown:function(){return Te({current:undefined,version:Oe.unknown()})},nu:Te,edge:nn("Edge"),chrome:nn("Chrome"),ie:nn("IE"),opera:nn("Opera"),firefox:nn(Ee),safari:nn("Safari")},De="Windows",Ae="Android",_e="Solaris",Me="FreeBSD",Fe=function(n){var t=n.current;return{current:t,version:n.version,isWindows:It(De,t),isiOS:It("iOS",t),isAndroid:It(Ae,t),isOSX:It("OSX",t),isLinux:It("Linux",t),isSolaris:It(_e,t),isFreeBSD:It(Me,t)}},Ie={unknown:function(){return Fe({current:undefined,version:Oe.unknown()})},nu:Fe,windows:nn(De),ios:nn("iOS"),android:nn(Ae),linux:nn("Linux"),osx:nn("OSX"),solaris:nn(_e),freebsd:nn(Me)},Re=function(n,e){return Rt(n,e).map(function(n){var t=Oe.detect(n.versionRegexes,e);return{current:n.name,version:t}})},Ve=function(n,e){return Rt(n,e).map(function(n){var t=Oe.detect(n.versionRegexes,e);return{current:n.name,version:t}})},Ne=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,He=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(n){return Vt(n,"edge/")&&Vt(n,"chrome")&&Vt(n,"safari")&&Vt(n,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Ne],search:function(n){return Vt(n,"chrome")&&!Vt(n,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(n){return Vt(n,"msie")||Vt(n,"trident")}},{name:"Opera",versionRegexes:[Ne,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Nt("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Nt("firefox")},{name:"Safari",versionRegexes:[Ne,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(n){return(Vt(n,"safari")||Vt(n,"mobile/"))&&Vt(n,"applewebkit")}}],Pe=[{name:"Windows",search:Nt("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(n){return Vt(n,"iphone")||Vt(n,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Nt("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Nt("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Nt("linux"),versionRegexes:[]},{name:"Solaris",search:Nt("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Nt("freebsd"),versionRegexes:[]}],ze={browsers:nn(He),oses:nn(Pe)},Le=ye(function(n,t){var e=ze.browsers(),o=ze.oses(),r=Re(e,n).fold(Be.unknown,Be.nu),i=Ve(o,n).fold(Ie.unknown,Ie.nu);return{browser:r,os:i,deviceType:function(n,t,e,o){var r=n.isiOS()&&!0===/ipad/i.test(e),i=n.isiOS()&&!r,u=n.isiOS()||n.isAndroid(),a=u||o("(pointer:coarse)"),c=r||!i&&u&&o("(min-device-width:768px)"),s=i||u&&!c,f=t.isSafari()&&n.isiOS()&&!1===/safari/i.test(e),l=!s&&!c&&!f;return{isiPad:nn(r),isiPhone:nn(i),isTablet:nn(c),isPhone:nn(s),isTouch:nn(a),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:nn(f),isDesktop:nn(l)}}(i,r,n,t)}}(v.navigator.userAgent,function(n){return v.window.matchMedia(n).matches})),je=(v.Node.ATTRIBUTE_NODE,v.Node.CDATA_SECTION_NODE,v.Node.COMMENT_NODE,v.Node.DOCUMENT_NODE),Ue=(v.Node.DOCUMENT_TYPE_NODE,v.Node.DOCUMENT_FRAGMENT_NODE,v.Node.ELEMENT_NODE),We=v.Node.TEXT_NODE,Ge=(v.Node.PROCESSING_INSTRUCTION_NODE,v.Node.ENTITY_REFERENCE_NODE,v.Node.ENTITY_NODE,v.Node.NOTATION_NODE,Ue),Xe=je,Ye=Ht().browser.isIE()?function(n,t){return Se(n.dom(),t.dom())}:function(n,t){var e=n.dom(),o=t.dom();return e!==o&&e.contains(o)};function qe(n,t,e,o,r){return n(e,o)?on.some(e):dn(r)&&r(e)?on.none():t(e,o,r)}function Ke(n){return n.dom().nodeName.toLowerCase()}function Je(t){return function(n){return function(n){return n.dom().nodeType}(n)===t}}"undefined"!=typeof v.window?v.window:Function("return this;")();function $e(n){var t=Pr(n)?n.dom().parentNode:n.dom();return t!==undefined&&null!==t&&t.ownerDocument.body.contains(t)}function Qe(n,t,e){for(var o=n.dom(),r=dn(e)?e:nn(!1);o.parentNode;){o=o.parentNode;var i=we.fromDom(o);if(t(i))return on.some(i);if(r(i))break}return on.none()}function Ze(n,t,e){return qe(function(n,t){return t(n)},Qe,n,t,e)}function no(n,r){var i=function(n){for(var t=0;t<n.childNodes.length;t++){var e=we.fromDom(n.childNodes[t]);if(r(e))return on.some(e);var o=i(n.childNodes[t]);if(o.isSome())return o}return on.none()};return i(n.dom())}function to(n){if(!$(n,"can")&&!$(n,"abort")&&!$(n,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(n,null,2)+" does not have can, abort, or run!");return ot("Extracting event.handler",qn([St("can",nn(!0)),St("abort",nn(!1)),St("run",Z)]),n)}function eo(e){var n=function(t,o){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return O(t,function(n,t){return n&&o(t).apply(undefined,e)},!0)}}(e,function(n){return n.can}),t=function(t,o){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return O(t,function(n,t){return n||o(t).apply(undefined,e)},!1)}}(e,function(n){return n.abort});return to({can:n,abort:t,run:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];bn(e,function(n){n.run.apply(undefined,t)})}})}function oo(n,t){Fi(n,n.element(),t,{})}function ro(n,t,e){Fi(n,n.element(),t,e)}function io(n){oo(n,di())}function uo(n,t,e){Fi(n,t,e,{})}function ao(n,t,e,o){n.getSystem().triggerEvent(e,t,o.event())}function co(n){return K(n)}function so(n,t){return{key:n,value:to({abort:t})}}function fo(n){return{key:n,value:to({run:function(n,t){t.event().prevent()}})}}function lo(n,t){return{key:n,value:to({run:t})}}function mo(n,e,o){return{key:n,value:to({run:function(n,t){e.apply(undefined,[n,t].concat(o))}})}}function go(n){return function(e){return{key:n,value:to({run:function(n,t){Ut(n,t)&&e(n,t)}})}}}function po(n,t,e){return function(e,o){return lo(e,function(n,t){n.getSystem().getByUid(o).each(function(n){ao(n,n.element(),e,t)})})}(n,t.partUids[e])}function ho(n,r){return lo(n,function(t,n){var e=n.event(),o=t.getSystem().getByDom(e.target()).fold(function(){return jr(e.target(),function(n){return t.getSystem().getByDom(n).toOption()},nn(!1)).getOr(t)},function(n){return n});r(t,o,n)})}function vo(n){return lo(n,function(n,t){t.cut()})}function bo(n,t){return go(n)(t)}function yo(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(t.length!==e.length)throw new Error('Wrong number of arguments to struct. Expected "['+t.length+']", got '+e.length+" arguments");var o={};return bn(t,function(n,t){o[n]=nn(e[t])}),o}}function xo(n){return n.slice(0).sort()}function wo(t,n){if(!fn(n))throw new Error("The "+t+" fields must be an array. Was: "+n+".");bn(n,function(n){if(!cn(n))throw new Error("The value "+n+" in the "+t+" fields was not a string.")})}function So(r,i){var u=r.concat(i);if(0===u.length)throw new Error("You must specify at least one required or optional field.");return wo("required",r),wo("optional",i),function(n){var e=xo(n);E(e,function(n,t){return t<e.length-1&&n===e[t+1]}).each(function(n){throw new Error("The field: "+n+" occurs more than once in the combined fields: ["+e.join(", ")+"].")})}(u),function(t){var e=wn(t);D(r,function(n){return vn(e,n)})||function(n,t){throw new Error("All required keys ("+xo(n).join(", ")+") were not specified. Specified keys were: "+xo(t).join(", ")+".")}(r,e);var n=C(e,function(n){return!vn(u,n)});0<n.length&&function(n){throw new Error("Unsupported keys for object: "+xo(n).join(", "))}(n);var o={};return bn(r,function(n){o[n]=nn(t[n])}),bn(i,function(n){o[n]=nn(Object.prototype.hasOwnProperty.call(t,n)?on.some(t[n]):on.none())}),o}}function Co(n){return we.fromDom(n.dom().ownerDocument)}function ko(n){return we.fromDom(n.dom().ownerDocument.documentElement)}function Oo(n){return we.fromDom(n.dom().ownerDocument.defaultView)}function Eo(n){return on.from(n.dom().parentNode).map(we.fromDom)}function To(n){return on.from(n.dom().offsetParent).map(we.fromDom)}function Bo(n){return S(n.dom().childNodes,we.fromDom)}function Do(n,t){var e=n.dom().childNodes;return on.from(e[t]).map(we.fromDom)}function Ao(t,e){Eo(t).each(function(n){n.dom().insertBefore(e.dom(),t.dom())})}function _o(n,t){(function(n){return on.from(n.dom().nextSibling).map(we.fromDom)})(n).fold(function(){Eo(n).each(function(n){Hi(n,t)})},function(n){Ao(n,t)})}function Mo(t,e){(function(n){return Do(n,0)})(t).fold(function(){Hi(t,e)},function(n){t.dom().insertBefore(e.dom(),n.dom())})}function Fo(t,n){bn(n,function(n){Hi(t,n)})}function Io(n){n.dom().textContent="",bn(Bo(n),function(n){Pi(n)})}function Ro(n){var t=Bo(n);0<t.length&&function(t,n){bn(n,function(n){Ao(t,n)})}(n,t),Pi(n)}function Vo(n){return n.dom().innerHTML}function No(n,t){var e=Co(n).dom(),o=we.fromDom(e.createDocumentFragment()),r=function(n,t){var e=(t||v.document).createElement("div");return e.innerHTML=n,Bo(we.fromDom(e))}(t,e);Fo(o,r),Io(n),Hi(n,o)}function Ho(n,t,e){if(!(cn(e)||ln(e)||mn(e)))throw v.console.error("Invalid call to Attr.set. Key ",t,":: Value ",e,":: Element ",n),new Error("Attribute value was not simple");n.setAttribute(t,e+"")}function Po(n,t,e){Ho(n.dom(),t,e)}function zo(n,t){var e=n.dom().getAttribute(t);return null===e?undefined:e}function Lo(n,t){var e=n.dom();return!(!e||!e.hasAttribute)&&e.hasAttribute(t)}function jo(n,t){n.dom().removeAttribute(t)}function Uo(n){return function(n,t){return we.fromDom(n.dom().cloneNode(t))}(n,!1)}function Wo(n){return function(n){var t=we.fromTag("div"),e=we.fromDom(n.dom().cloneNode(!0));return Hi(t,e),Vo(t)}(Uo(n))}function Go(n){return Wo(n)}function Xo(n){var t=(new Date).getTime();return n+"_"+Math.floor(1e9*Math.random())+ ++ji+String(t)}function Yo(n){return Xo(n)}function qo(t){function n(n){return function(){throw new Error("The component must be in a context to send: "+n+"\n"+Go(t().element())+" is not in context.")}}return{debugInfo:nn("fake"),triggerEvent:n("triggerEvent"),triggerFocus:n("triggerFocus"),triggerEscape:n("triggerEscape"),build:n("build"),addToWorld:n("addToWorld"),removeFromWorld:n("removeFromWorld"),addToGui:n("addToGui"),removeFromGui:n("removeFromGui"),getByUid:n("getByUid"),getByDom:n("getByDom"),broadcast:n("broadcast"),broadcastOn:n("broadcastOn"),broadcastEvent:n("broadcastEvent"),isConnected:nn(!1)}}function Ko(n,t){var e=n.toString(),o=e.indexOf(")")+1,r=e.indexOf("("),i=e.substring(r+1,o-1).split(/,\s*/);return n.toFunctionAnnotation=function(){return{name:t,parameters:$i(i)}},n}function Jo(n){return q(Qi,n)}function $o(o){return function(n,t){var e=t.toString(),o=e.indexOf(")")+1,r=e.indexOf("("),i=e.substring(r+1,o-1).split(/,\s*/);return n.toFunctionAnnotation=function(){return{name:"OVERRIDE",parameters:$i(i.slice(1))}},n}(function(n){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return o.apply(undefined,[n.getApis()].concat([n].concat(t)))},o)}function Qo(n,r){var i={};return Cn(n,function(n,o){Cn(n,function(n,t){var e=Y(t,[])(i);i[t]=e.concat([r(o,n)])})}),i}function Zo(n){return{classes:n.classes!==undefined?n.classes:[],attributes:n.attributes!==undefined?n.attributes:{},styles:n.styles!==undefined?n.styles:{}}}function nr(n){return n.cHandler}function tr(n,t){return{name:nn(n),handler:nn(t)}}function er(n,t,e){var o=N(N({},e),function(n,t){var e={};return bn(n,function(n){e[n.name()]=n.handlers(t)}),e}(t,n));return Qo(o,tr)}function or(n){var i=function(n){return dn(n)?{can:nn(!0),abort:nn(!1),run:n}:n}(n);return function(n,t){for(var e=[],o=2;o<arguments.length;o++)e[o-2]=arguments[o];var r=[n,t].concat(e);i.abort.apply(undefined,r)?t.stop():i.can.apply(undefined,r)&&i.run.apply(undefined,r)}}function rr(n,t,e){var o=t[e];return o?function(u,a,n,c){var t=n.slice(0);try{var e=t.sort(function(n,t){var e=n[a](),o=t[a](),r=c.indexOf(e),i=c.indexOf(o);if(-1===r)throw new Error("The ordering for "+u+" does not have an entry for "+e+".\nOrder specified: "+JSON.stringify(c,null,2));if(-1===i)throw new Error("The ordering for "+u+" does not have an entry for "+o+".\nOrder specified: "+JSON.stringify(c,null,2));return r<i?-1:i<r?1:0});return an.value(e)}catch(o){return an.error([o])}}("Event: "+e,"name",n,o).map(function(n){var t=S(n,function(n){return n.handler()});return eo(t)}):function(n,t){return an.error(["The event ("+n+') has more than one behaviour that listens to it.\nWhen this occurs, you must specify an event ordering for the behaviours in your spec (e.g. [ "listing", "toggling" ]).\nThe behaviours that can trigger it are: '+JSON.stringify(S(t,function(n){return n.name()}),null,2)])}(e,n)}function ir(n){return tt("custom.definition",re([ce("dom","dom",Mn(),re([ct("tag"),St("styles",{}),St("classes",[]),St("attributes",{}),ht("value"),ht("innerHtml")])),ct("components"),ct("uid"),St("events",{}),St("apis",{}),ce("eventOrder","eventOrder",function(n){return _n.mergeWithThunk(nn(n))}({"alloy.execute":["disabling","alloy.base.behaviour","toggling","typeaheadevents"],"alloy.focus":["alloy.base.behaviour","focusing","keying"],"alloy.system.init":["alloy.base.behaviour","disabling","toggling","representing"],input:["alloy.base.behaviour","representing","streaming","invalidating"],"alloy.system.detached":["alloy.base.behaviour","representing","item-events","tooltipping"],mousedown:["focusing","alloy.base.behaviour","item-type-events"],touchstart:["focusing","alloy.base.behaviour","item-type-events"],mouseover:["item-type-events","tooltipping"]}),de()),ht("domModification")]),n)}function ur(n,t){var e=zo(n,t);return e===undefined||""===e?[]:e.split(" ")}function ar(n){return n.dom().classList!==undefined}function cr(n,t){return function(n,t,e){var o=ur(n,t).concat([e]);return Po(n,t,o.join(" ")),!0}(n,"class",t)}function sr(n,t){return function(n,t,e){var o=C(ur(n,t),function(n){return n!==e});return 0<o.length?Po(n,t,o.join(" ")):jo(n,t),!1}(n,"class",t)}function fr(n,t){ar(n)?n.dom().classList.add(t):cr(n,t)}function lr(n){0===(ar(n)?n.dom().classList:function(n){return ur(n,"class")}(n)).length&&jo(n,"class")}function dr(n,t){ar(n)?n.dom().classList.remove(t):sr(n,t),lr(n)}function mr(n,t){return ar(n)&&n.dom().classList.contains(t)}function gr(t,n){bn(n,function(n){fr(t,n)})}function pr(t,n){bn(n,function(n){dr(t,n)})}function hr(n){return n.style!==undefined&&dn(n.style.getPropertyValue)}function vr(n,t,e){if(!cn(e))throw v.console.error("Invalid call to CSS.set. Property ",t,":: Value ",e,":: Element ",n),new Error("CSS value must be a string: "+e);hr(n)&&n.style.setProperty(t,e)}function br(n,t){hr(n)&&n.style.removeProperty(t)}function yr(n,t,e){var o=n.dom();vr(o,t,e)}function xr(n,t){var e=n.dom();Cn(t,function(n,t){vr(e,t,n)})}function wr(n,t){var e=n.dom(),o=v.window.getComputedStyle(e).getPropertyValue(t),r=""!==o||$e(n)?o:ou(e,t);return null===r?undefined:r}function Sr(n,t){var e=n.dom(),o=ou(e,t);return on.from(o).filter(function(n){return 0<n.length})}function Cr(n,t,e){var o=we.fromTag(n);return yr(o,t,e),Sr(o,t).isSome()}function kr(n,t){var e=n.dom();br(e,t),Lo(n,"style")&&""===function(n){return n.replace(/^\s+|\s+$/g,"")}(zo(n,"style"))&&jo(n,"style")}function Or(n){return n.dom().offsetWidth}function Er(n){return n.dom().value}function Tr(n,t){if(t===undefined)throw new Error("Value.set was undefined");n.dom().value=t}function Br(n){var t=we.fromTag(n.tag);!function(n,t){var e=n.dom();Cn(t,function(n,t){Ho(e,t,n)})}(t,n.attributes),gr(t,n.classes),xr(t,n.styles),n.innerHtml.each(function(n){return No(t,n)});var e=n.domChildren;return Fo(t,e),n.value.each(function(n){Tr(t,n)}),n.uid,Yi(t,n.uid),t}function Dr(n,t){return function(t,n){var e=S(n,function(n){return wt(n.name(),[ct("config"),St("state",Zi)])}),o=tt("component.behaviours",re(e),t.behaviours).fold(function(n){throw new Error(le(n)+"\nComplete spec:\n"+JSON.stringify(t,null,2))},function(n){return n});return{list:n,data:P(o,function(n){var t=n.map(function(n){return{config:n.config,state:n.state.init(n.config)}});return function(){return t}})}}(n,t)}function Ar(n){var t=function(n){var t=Y("behaviours",{})(n),e=C(wn(t),function(n){return t[n]!==undefined});return S(e,function(n){return t[n].me})}(n);return Dr(n,t)}function _r(n,t,e){var o=function(n){return N(N({},n.dom),{uid:n.uid,domChildren:S(n.components,function(n){return n.element()})})}(n),r=function(n){return n.domModification.fold(function(){return Zo({})},Zo)}(n),i={"alloy.base.modification":r};return function(n,t){return N(N({},n),{attributes:N(N({},n.attributes),t.attributes),styles:N(N({},n.styles),t.styles),classes:n.classes.concat(t.classes)})}(o,0<t.length?function(t,n,e,o){var r=N({},n);bn(e,function(n){r[n.name()]=n.exhibit(t,o)});function i(n){return k(n,function(n,t){return N(N({},t.modification),n)},{})}var u=Qo(r,function(n,t){return{name:n,modification:t}}),a=k(u.classes,function(n,t){return t.modification.concat(n)},[]),c=i(u.attributes),s=i(u.styles);return Zo({classes:a,attributes:c,styles:s})}(e,i,t,o):r)}function Mr(n,t,e){var o={"alloy.base.behaviour":function(n){return n.events}(n)};return function(n,t,e,o){var r=er(n,e,o);return eu(r,t)}(e,n.eventOrder,t,o).getOrDie()}function Fr(n){var t=Ki(n),e=t.events,o=c(t,["events"]),r=function(n){var t=Y("components",[])(n);return S(t,uu)}(o),i=N(N({},o),{events:N(N({},Li),e),components:r});return an.value(function(e){function n(){return l}var o=ye(Ji),t=et(ir(e)),r=Ar(e),i=function(n){return n.list}(r),u=function(n){return n.data}(r),a=_r(t,i,u),c=Br(a),s=Mr(t,i,u),f=ye(t.components),l={getSystem:o.get,config:function(n){var t=u;return(dn(t[n.name()])?t[n.name()]:function(){throw new Error("Could not find "+n.name()+" in "+JSON.stringify(e,null,2))})()},hasConfigured:function(n){return dn(u[n.name()])},spec:nn(e),readState:function(n){return u[n]().map(function(n){return n.state.readState()}).getOr("not enabled")},getApis:function(){return t.apis},connect:function(n){o.set(n)},disconnect:function(){o.set(qo(n))},element:nn(c),syncComponents:function(){var n=Bo(c),t=B(n,function(n){return o.get().getByDom(n).fold(function(){return[]},function(n){return[n]})});f.set(t)},components:f.get,events:nn(s)};return l}(i))}function Ir(n){var t=we.fromText(n);return ru({element:t})}var Rr,Vr,Nr,Hr=Je(Ue),Pr=Je(We),zr=L(function(){return Lr(we.fromDom(v.document))}),Lr=function(n){var t=n.dom().body;if(null===t||t===undefined)throw new Error("Body is not available yet");return we.fromDom(t)},jr=function(n,t,e){return Ze(n,function(n){return t(n).isSome()},e).bind(t)},Ur=nn("touchstart"),Wr=nn("touchmove"),Gr=nn("touchend"),Xr=nn("touchcancel"),Yr=nn("mousedown"),qr=nn("mousemove"),Kr=nn("mouseout"),Jr=nn("mouseup"),$r=nn("mouseover"),Qr=nn("focusin"),Zr=nn("focusout"),ni=nn("keydown"),ti=nn("keyup"),ei=nn("input"),oi=nn("change"),ri=nn("click"),ii=nn("transitionend"),ui=nn("selectstart"),ai={tap:nn("alloy.tap")},ci=nn("alloy.focus"),si=nn("alloy.blur.post"),fi=nn("alloy.paste.post"),li=nn("alloy.receive"),di=nn("alloy.execute"),mi=nn("alloy.focus.item"),gi=ai.tap,pi=nn("alloy.longpress"),hi=nn("alloy.sandbox.close"),vi=nn("alloy.typeahead.cancel"),bi=nn("alloy.system.init"),yi=nn("alloy.system.touchmove"),xi=nn("alloy.system.touchend"),wi=nn("alloy.system.scroll"),Si=nn("alloy.system.resize"),Ci=nn("alloy.system.attached"),ki=nn("alloy.system.detached"),Oi=nn("alloy.system.dismissRequested"),Ei=nn("alloy.system.repositionRequested"),Ti=nn("alloy.focusmanager.shifted"),Bi=nn("alloy.slotcontainer.visibility"),Di=nn("alloy.change.tab"),Ai=nn("alloy.dismiss.tab"),_i=nn("alloy.highlight"),Mi=nn("alloy.dehighlight"),Fi=function(n,t,e,o){var r=N({target:t},o);n.getSystem().triggerEvent(e,t,P(r,nn))},Ii=go(Ci()),Ri=go(ki()),Vi=go(bi()),Ni=(Rr=di(),function(n){return lo(Rr,n)}),Hi=(yo("element","offset"),function(n,t){n.dom().appendChild(t.dom())}),Pi=function(n){var t=n.dom();null!==t.parentNode&&t.parentNode.removeChild(t)},zi=co([(Vr=ci(),Nr=function(n,t){var e=t.event().originator(),o=t.event().target();return!function(n,t,e){return jt(t,n.element())&&!jt(t,e)}(n,e,o)||(v.console.warn(ci()+" did not get interpreted by the desired target. \nOriginator: "+Go(e)+"\nTarget: "+Go(o)+"\nCheck the "+ci()+" event handlers"),!1)},{key:Vr,value:to({can:Nr})})]),Li=/* */Object.freeze({events:zi}),ji=0,Ui=nn("alloy-id-"),Wi=nn("data-alloy-id"),Gi=Ui(),Xi=Wi(),Yi=function(n,t){Object.defineProperty(n.dom(),Xi,{value:t,writable:!0})},qi=function(n){var t=Hr(n)?n.dom()[Xi]:null;return on.from(t)},Ki=l,Ji=qo(),$i=function(n){return S(n,function(n){return function(n,t){return function(n,t,e){return""===t||!(n.length<t.length)&&n.substr(e,e+t.length)===t}(n,t,n.length-t.length)}(n,"/*")?n.substring(0,n.length-"/*".length):n})},Qi=Xo("alloy-premade"),Zi={init:function(){return nu({readState:function(){return"No State required"}})}},nu=function(n){return n},tu=function(n,t){return function(n,t){return{cHandler:n,purpose:nn(t)}}(d.apply(undefined,[n.handler].concat(t)),n.purpose())},eu=function(n,i){var t=On(n,function(o,r){return(1===o.length?an.value(o[0].handler()):rr(o,i,r)).map(function(n){var t=or(n),e=1<o.length?C(i[r],function(t){return x(o,function(n){return n.name()===t})}).join(" > "):o[0].name();return q(r,function(n,t){return{handler:n,purpose:nn(t)}}(t,e))})});return J(t,{})},ou=function(n,t){return hr(n)?n.style.getPropertyValue(t):""},ru=function(n){var t=ot("external.component",qn([ct("element"),ht("uid")]),n),e=ye(qo());t.uid.each(function(n){Yi(t.element,n)});var o={getSystem:e.get,config:on.none,hasConfigured:nn(!1),connect:function(n){e.set(n)},disconnect:function(){e.set(qo(function(){return o}))},getApis:function(){return{}},element:nn(t.element),spec:nn(n),readState:nn("No state"),syncComponents:Z,components:nn([]),events:nn({})};return Jo(o)},iu=Yo,uu=function(t){return function(n){return Nn(n,Qi)}(t).fold(function(){var n=t.hasOwnProperty("uid")?t:N({uid:iu("")},t);return Fr(n).getOrDie()},function(n){return n})},au=Jo;function cu(o,r){function n(n){var t=r(n);if(t<=0||null===t){var e=wr(n,o);return parseFloat(e)||0}return t}function i(r,n){return O(n,function(n,t){var e=wr(r,t),o=e===undefined?0:parseInt(e,10);return isNaN(o)?n:n+o},0)}return{set:function(n,t){if(!mn(t)&&!t.match(/^[0-9]+$/))throw new Error(o+".set accepts only positive integer values. Value was "+t);var e=n.dom();hr(e)&&(e.style[o]=t+"px")},get:n,getOuter:n,aggregate:i,max:function(n,t,e){var o=i(n,e);return o<t?t-o:0}}}function su(n){return Mu.get(n)}function fu(n){return Mu.getOuter(n)}function lu(n,t){return n!==undefined?n:t!==undefined?t:0}function du(n){var t=n.dom().ownerDocument,e=t.body,o=t.defaultView,r=t.documentElement;if(e===n.dom())return Iu(e.offsetLeft,e.offsetTop);var i=lu(o.pageYOffset,r.scrollTop),u=lu(o.pageXOffset,r.scrollLeft),a=lu(r.clientTop,e.clientTop),c=lu(r.clientLeft,e.clientLeft);return Ru(n).translate(u-c,i-a)}function mu(n){return Vu.get(n)}function gu(n){return Vu.getOuter(n)}function pu(n){var t=n!==undefined?n.dom():v.document,e=t.body.scrollLeft||t.documentElement.scrollLeft,o=t.body.scrollTop||t.documentElement.scrollTop;return Iu(e,o)}function hu(n,t,e,o){return{x:nn(n),y:nn(t),width:nn(e),height:nn(o),right:nn(n+e),bottom:nn(t+o)}}function vu(n){var t=n===undefined?v.window:n,e=t.document,o=pu(we.fromDom(e)),r=t.visualViewport;if(r!==undefined)return hu(Math.max(r.pageLeft,o.left()),Math.max(r.pageTop,o.top()),r.width,r.height);var i=e.documentElement,u=i.clientWidth,a=i.clientHeight;return hu(o.left(),o.top(),u,a)}function bu(o){var n=we.fromDom(v.document),r=pu(n);return function(n,t){var e=t.owner(n),o=Nu(t,e);return on.some(o)}(o,Hu).fold(d(du,o),function(n){var t=Ru(o),e=k(n,function(n,t){var e=Ru(t);return{left:n.left+e.left(),top:n.top+e.top()}},{left:0,top:0});return Iu(e.left+t.left()+r.left(),e.top+t.top()+r.top())})}function yu(n,t,e,o){return{x:nn(n),y:nn(t),width:nn(e),height:nn(o),right:nn(n+e),bottom:nn(t+o)}}function xu(n){var t=du(n),e=gu(n),o=fu(n);return yu(t.left(),t.top(),e,o)}function wu(n){var t=bu(n),e=gu(n),o=fu(n);return yu(t.left(),t.top(),e,o)}function Su(){return vu(v.window)}function Cu(n,t,e){return Qe(n,function(n){return Pt(n,t)},e)}function ku(n,t){return function(n,t){var e=t===undefined?v.document:t.dom();return zt(e)?on.none():on.from(e.querySelector(n)).map(we.fromDom)}(t,n)}function Ou(n,t,e){return qe(Pt,Cu,n,t,e)}function Eu(){var t=Xo("aria-owns");return{id:nn(t),link:function(n){Po(n,"aria-owns",t)},unlink:function(n){jo(n,"aria-owns")}}}function Tu(t,n){return function(n){return Ze(n,function(n){if(!Hr(n))return!1;var t=zo(n,"id");return t!==undefined&&-1<t.indexOf("aria-owns")}).bind(function(n){var t=zo(n,"id"),e=Co(n);return ku(e,'[aria-owns="'+t+'"]')})}(n).exists(function(n){return Lu(t,n)})}function Bu(n){for(var t=[],e=function(n){t.push(n)},o=0;o<n.length;o++)n[o].each(e);return t}function Du(n,t){for(var e=0;e<n.length;e++){var o=t(n[e],e);if(o.isSome())return o}return on.none()}var Au,_u,Mu=cu("height",function(n){var t=n.dom();return $e(n)?t.getBoundingClientRect().height:t.offsetHeight}),Fu=function(e,o){return{left:nn(e),top:nn(o),translate:function(n,t){return Fu(e+n,o+t)}}},Iu=Fu,Ru=function(n){var t=n.dom(),e=t.ownerDocument.body;return e===t?Iu(e.offsetLeft,e.offsetTop):$e(n)?function(n){var t=n.getBoundingClientRect();return Iu(t.left,t.top)}(t):Iu(0,0)},Vu=cu("width",function(n){return n.dom().offsetWidth}),Nu=(Ht().browser.isSafari(),function(o,n){return o.view(n).fold(nn([]),function(n){var t=o.owner(n),e=Nu(o,t);return[n].concat(e)})}),Hu=/* */Object.freeze({view:function(n){return(n.dom()===v.document?on.none():on.from(n.dom().defaultView.frameElement)).map(we.fromDom)},owner:function(n){return Co(n)}}),Pu=yo("point","width","height"),zu=yo("x","y","width","height"),Lu=function(t,n){return function(n,t,e){return Ze(n,t,e).isSome()}(n,function(n){return jt(n,t.element())},nn(!1))||Tu(t,n)},ju="unknown";(_u=Au=Au||{})[_u.STOP=0]="STOP",_u[_u.NORMAL=1]="NORMAL",_u[_u.LOGGING=2]="LOGGING";function Uu(t,n,e){switch(Nn(Pa.get(),t).orThunk(function(){var n=wn(Pa.get());return Du(n,function(n){return-1<t.indexOf(n)?on.some(Pa.get()[n]):on.none()})}).getOr(Au.NORMAL)){case Au.NORMAL:return e(La());case Au.LOGGING:var o=function(t,e){var o=[],r=(new Date).getTime();return{logEventCut:function(n,t,e){o.push({outcome:"cut",target:t,purpose:e})},logEventStopped:function(n,t,e){o.push({outcome:"stopped",target:t,purpose:e})},logNoParent:function(n,t,e){o.push({outcome:"no-parent",target:t,purpose:e})},logEventNoHandlers:function(n,t){o.push({outcome:"no-handlers-left",target:t})},logEventResponse:function(n,t,e){o.push({outcome:"response",purpose:e,target:t})},write:function(){var n=(new Date).getTime();vn(["mousemove","mouseover","mouseout",bi()],t)||v.console.log(t,{event:t,time:n-r,target:e.dom(),sequence:S(o,function(n){return vn(["cut","stopped","response"],n.outcome)?"{"+n.purpose+"} "+n.outcome+" at ("+Go(n.target)+")":n.outcome})})}}}(t,n),r=e(o);return o.write(),r;case Au.STOP:return!0}}function Wu(n,t,e){return Uu(n,t,e)}function Gu(){return mt("markers",[ct("backgroundMenu")].concat(ja()).concat(Ua()))}function Xu(n){return mt("markers",S(n,ct))}function Yu(n,t,e){return function(){var n=new Error;if(n.stack===undefined)return;var t=n.stack.split("\n");E(t,function(t){return 0<t.indexOf("alloy")&&!x(za,function(n){return-1<t.indexOf(n)})}).getOr(ju)}(),ce(t,t,e,Zn(function(e){return an.value(function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return e.apply(undefined,n)})}))}function qu(n){return Yu(0,n,j(Z))}function Ku(n){return Yu(0,n,j(on.none))}function Ju(n){return Yu(0,n,Mn())}function $u(n){return Yu(0,n,Mn())}function Qu(n,t){return At(n,nn(t))}function Zu(n){return At(n,l)}function na(n){return n.x()}function ta(n,t){return n.x()+n.width()/2-t.width()/2}function ea(n,t){return n.x()+n.width()-t.width()}function oa(n,t){return n.y()-t.height()}function ra(n){return n.y()+n.height()}function ia(n,t){return n.y()+n.height()/2-t.height()/2}function ua(n,t,e){return Ya(na(n),ra(n),e.southeast(),Ka(),"layout-se")}function aa(n,t,e){return Ya(ea(n,t),ra(n),e.southwest(),Ja(),"layout-sw")}function ca(n,t,e){return Ya(na(n),oa(n,t),e.northeast(),$a(),"layout-ne")}function sa(n,t,e){return Ya(ea(n,t),oa(n,t),e.northwest(),Qa(),"layout-nw")}function fa(n,t,e){return Ya(function(n){return n.x()+n.width()}(n),ia(n,t),e.east(),tc(),"layout-e")}function la(n,t,e){return Ya(function(n,t){return n.x()-t.width()}(n,t),ia(n,t),e.west(),ec(),"layout-w")}function da(){return[ua,aa,ca,sa,rc,oc]}function ma(){return[aa,ua,sa,ca,rc,oc]}function ga(e,o,r){return Vi(function(n,t){r(n,e,o)})}function pa(n,t,e,o,r,i){var u=qn(n),a=wt(t,[function(n,t){return vt(n,qn(t))}("config",n)]);return ic(u,a,t,e,o,r,i)}function ha(r,i,u){return function(n,t,e){var o=e.toString(),r=o.indexOf(")")+1,i=o.indexOf("("),u=o.substring(i+1,r-1).split(/,\s*/);return n.toFunctionAnnotation=function(){return{name:t,parameters:$i(u.slice(0,1).concat(u.slice(3)))}},n}(function(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];var o=[e].concat(n);return e.config({name:nn(r)}).fold(function(){throw new Error("We could not find any behaviour configuration for: "+r+". Using API: "+u)},function(n){var t=Array.prototype.slice.call(o,1);return i.apply(undefined,[e,n.config,n.state].concat(t))})},u,i)}function va(n){return{key:n,value:undefined}}function ba(n){return K(n)}function ya(n){var t=ot("Creating behaviour: "+n.name,uc,n);return pa(t.fields,t.name,t.active,t.apis,t.extra,t.state)}function xa(n){var t=ot("Creating behaviour: "+n.name,ac,n);return function(n,t,e,o,r,i){var u=n,a=wt(t,[vt("config",n)]);return ic(u,a,t,e,o,r,i)}(it(t.branchKey,t.branches),t.name,t.active,t.apis,t.extra,t.state)}function wa(n){n.dom().focus()}function Sa(n){var t=n!==undefined?n.dom():v.document;return on.from(t.activeElement).map(we.fromDom)}function Ca(t){return Sa(Co(t)).filter(function(n){return t.dom().contains(n.dom())})}function ka(n,e){var o=Co(e),t=Sa(o).bind(function(t){function n(n){return jt(t,n)}return n(e)?on.some(e):no(e,n)}),r=n(e);return t.each(function(t){Sa(o).filter(function(n){return jt(n,t)}).fold(function(){wa(t)},Z)}),r}function Oa(n,t,e){function r(n){return Nn(e,n).getOr([])}function o(n,t,e){var o=_(mc,e);return{offset:function(){return Iu(n,t)},classesOn:function(){return B(e,r)},classesOff:function(){return B(o,r)}}}return{southeast:function(){return o(-n,t,["top","alignLeft"])},southwest:function(){return o(n,t,["top","alignRight"])},south:function(){return o(-n/2,t,["top","alignCentre"])},northeast:function(){return o(-n,-t,["bottom","alignLeft"])},northwest:function(){return o(n,-t,["bottom","alignRight"])},north:function(){return o(-n/2,-t,["bottom","alignCentre"])},east:function(){return o(n,-t/2,["valignCentre","left"])},west:function(){return o(-n,-t/2,["valignCentre","right"])},innerNorthwest:function(){return o(-n,t,["top","alignRight"])},innerNortheast:function(){return o(n,t,["top","alignLeft"])},innerNorth:function(){return o(-n/2,t,["top","alignCentre"])},innerSouthwest:function(){return o(-n,-t,["bottom","alignRight"])},innerSoutheast:function(){return o(n,-t,["bottom","alignLeft"])},innerSouth:function(){return o(-n/2,-t,["bottom","alignCentre"])},innerWest:function(){return o(n,-t/2,["valignCentre","right"])},innerEast:function(){return o(-n,-t/2,["valignCentre","left"])}}}function Ea(){return Oa(0,0,{})}function Ta(n,t,e,o,r,i){var u=t.x()-e,a=t.y()-o,c=r-(u+t.width()),s=i-(a+t.height()),f=on.some(u),l=on.some(a),d=on.some(c),m=on.some(s),g=on.none();return function(n,t,e,o,r,i,u,a,c){return n.fold(t,e,o,r,i,u,a,c)}(t.direction(),function(){return pc(n,f,l,g,g)},function(){return pc(n,g,l,d,g)},function(){return pc(n,f,g,g,m)},function(){return pc(n,g,g,d,m)},function(){return pc(n,f,l,g,g)},function(){return pc(n,f,g,g,m)},function(){return pc(n,f,l,g,g)},function(){return pc(n,g,l,d,g)})}function Ba(n,t){var e=d(bu,t),o=n.fold(e,e,function(){var n=pu();return bu(t).translate(-n.left(),-n.top())}),r=gu(t),i=fu(t);return yu(o.left(),o.top(),r,i)}function Da(n){return n}function Aa(t,e){return function(n){return"rtl"===xc(n)?e:t}}function _a(){return wt("layouts",[ct("onLtr"),ct("onRtl")])}function Ma(t,n,e,o){var r=n.layouts.map(function(n){return n.onLtr(t)}).getOr(e),i=n.layouts.map(function(n){return n.onRtl(t)}).getOr(o);return Aa(r,i)(t)}function Fa(n,t,e){var o=n.document.createRange();return function(e,n){n.fold(function(n){e.setStartBefore(n.dom())},function(n,t){e.setStart(n.dom(),t)},function(n){e.setStartAfter(n.dom())})}(o,t),function(e,n){n.fold(function(n){e.setEndBefore(n.dom())},function(n,t){e.setEnd(n.dom(),t)},function(n){e.setEndAfter(n.dom())})}(o,e),o}function Ia(n,t,e,o,r){var i=n.document.createRange();return i.setStart(t.dom(),e),i.setEnd(o.dom(),r),i}function Ra(n){return{left:nn(n.left),top:nn(n.top),right:nn(n.right),bottom:nn(n.bottom),width:nn(n.width),height:nn(n.height)}}function Va(n,t,e){return t(we.fromDom(e.startContainer),e.startOffset,we.fromDom(e.endContainer),e.endOffset)}function Na(n,t){return function(n,t){var e=t.ltr();return e.collapsed?t.rtl().filter(function(n){return!1===n.collapsed}).map(function(n){return Bc.rtl(we.fromDom(n.endContainer),n.endOffset,we.fromDom(n.startContainer),n.startOffset)}).getOrThunk(function(){return Va(0,Bc.ltr,e)}):Va(0,Bc.ltr,e)}(0,function(r,n){return n.match({domRange:function(n){return{ltr:nn(n),rtl:on.none}},relative:function(n,t){return{ltr:L(function(){return Fa(r,n,t)}),rtl:L(function(){return on.some(Fa(r,t,n))})}},exact:function(n,t,e,o){return{ltr:L(function(){return Ia(r,n,t,e,o)}),rtl:L(function(){return on.some(Ia(r,e,o,n,t))})}}})}(n,t))}function Ha(n,t,e){return t>=n.left&&t<=n.right&&e>=n.top&&e<=n.bottom}var Pa=ye({}),za=["alloy/data/Fields","alloy/debugging/Debugging"],La=nn({logEventCut:Z,logEventStopped:Z,logNoParent:Z,logEventNoHandlers:Z,logEventResponse:Z,write:Z}),ja=nn([ct("menu"),ct("selectedMenu")]),Ua=nn([ct("item"),ct("selectedItem")]),Wa=(nn(re(Ua().concat(ja()))),nn(re(Ua()))),Ga=mt("initSize",[ct("numColumns"),ct("numRows")]),Xa=nn(Ga),Ya=yo("x","y","bubble","direction","label"),qa=Tn([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),Ka=qa.southeast,Ja=qa.southwest,$a=qa.northeast,Qa=qa.northwest,Za=qa.south,nc=qa.north,tc=qa.east,ec=qa.west,oc=function(n,t,e){return Ya(ta(n,t),oa(n,t),e.north(),nc(),"layout-n")},rc=function(n,t,e){return Ya(ta(n,t),ra(n),e.south(),Za(),"layout-s")},ic=function(e,n,o,r,t,i,u){function a(n){return $(n,o)?n[o]():on.none()}var c=P(t,function(n,t){return ha(o,n,t)}),s=P(i,function(n,t){return Ko(n,t)}),f=N(N(N({},s),c),{revoke:d(va,o),config:function(n){var t=ot(o+"-config",e,n);return{key:o,value:{config:t,me:f,configAsRaw:L(function(){return ot(o+"-config",e,n)}),initialConfig:n,state:u}}},schema:function(){return n},exhibit:function(n,e){return a(n).bind(function(t){return Nn(r,"exhibit").map(function(n){return n(e,t.config,t.state)})}).getOr(Zo({}))},name:function(){return o},handlers:function(n){return a(n).map(function(n){return Y("events",function(n,t){return{}})(r)(n.config,n.state)}).getOr({})}});return f},uc=qn([ct("fields"),ct("name"),St("active",{}),St("apis",{}),St("state",Zi),St("extra",{})]),ac=qn([ct("branchKey"),ct("branches"),ct("name"),St("active",{}),St("apis",{}),St("state",Zi),St("extra",{})]),cc=nn(undefined),sc=/* */Object.freeze({events:function(t){return co([lo(li(),function(r,i){var u=t.channels,n=function(n,t){return t.universal()?n:C(n,function(n){return vn(t.channels(),n)})}(wn(u),i);bn(n,function(n){var t=u[n],e=t.schema,o=ot("channel["+n+"] data\nReceiver: "+Go(r.element()),e,i.data());t.onReceive(r,o)})})])}}),fc=[st("channels",nt(an.value,qn([Ju("onReceive"),St("schema",de())])))],lc=ya({fields:fc,name:"receiving",active:sc}),dc=/* */Object.freeze({exhibit:function(n,t){return Zo({classes:[],styles:t.useFixed()?{}:{position:"relative"}})}}),mc=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right"],gc=So(["x","y","width","height","maxHeight","maxWidth","direction","classes","label","candidateYforTest"],[]),pc=yo("position","left","top","right","bottom"),hc=Tn([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]),vc=function(n,t,e){var o=Iu(t,e);return n.fold(nn(o),nn(o),function(){var n=pu();return o.translate(-n.left(),-n.top())})},bc=hc.relative,yc=hc.fixed,xc=function(n){return"rtl"===wr(n,"direction")?"rtl":"ltr"},wc=[ct("hotspot"),ht("bubble"),St("overrides",{}),_a(),Qu("placement",function(n,t,e){var o=t.hotspot,r=Ba(e,o.element()),i=Ma(n.element(),t,da(),ma());return on.some(Da({anchorBox:r,bubble:t.bubble.getOr(Ea()),overrides:t.overrides,layouts:i,placer:on.none()}))})],Sc=[ct("x"),ct("y"),St("height",0),St("width",0),St("bubble",Ea()),St("overrides",{}),_a(),Qu("placement",function(n,t,e){var o=vc(e,t.x,t.y),r=yu(o.left(),o.top(),t.width,t.height),i=Ma(n.element(),t,[ua,aa,ca,sa,rc,oc,fa,la],[aa,ua,sa,ca,rc,oc,fa,la]);return on.some(Da({anchorBox:r,bubble:t.bubble,overrides:t.overrides,layouts:i,placer:on.none()}))})],Cc={create:yo("start","soffset","finish","foffset")},kc=Tn([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Oc=(kc.before,kc.on,kc.after,function(n){return n.fold(l,l,l)}),Ec=Tn([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Tc={domRange:Ec.domRange,relative:Ec.relative,exact:Ec.exact,exactFromRange:function(n){return Ec.exact(n.start(),n.soffset(),n.finish(),n.foffset())},getWin:function(n){var t=function(n){return n.match({domRange:function(n){return we.fromDom(n.startContainer)},relative:function(n,t){return Oc(n)},exact:function(n,t,e,o){return n}})}(n);return Oo(t)},range:Cc.create},Bc=Tn([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]);function Dc(n){return rf.get(n)}function Ac(n){return rf.getOption(n)}function _c(e,o,n,t,r){function i(n){var t=e.dom().createRange();return t.setStart(o.dom(),n),t.collapse(!0),t}var u=Dc(o).length,a=function(n,t,e,o,r){if(0===r)return 0;if(t===o)return r-1;for(var i=o,u=1;u<r;u++){var a=n(u),c=Math.abs(t-a.left);if(e<=a.bottom){if(e<a.top||i<c)return u-1;i=c}}return 0}(function(n){return i(n).getBoundingClientRect()},n,t,r.right,u);return i(a)}function Mc(n){return function(n){return Ac(n).filter(function(n){return 0!==n.trim().length||-1<n.indexOf("\xa0")}).isSome()}(n)||vn(af,Ke(n))}function Fc(n){return no(n,Mc)}function Ic(n){return cf(n,Mc)}function Rc(n,t){return t-n.left<n.right-t}function Vc(n,t,e){var o=n.dom().createRange();return o.selectNode(t.dom()),o.collapse(e),o}function Nc(t,n,e){var o=t.dom().createRange();o.selectNode(n.dom());var r=o.getBoundingClientRect(),i=Rc(r,e);return(!0===i?Fc:Ic)(n).map(function(n){return Vc(t,n,i)})}function Hc(n,t,e){var o=t.dom().getBoundingClientRect(),r=Rc(o,e);return on.some(Vc(n,t,r))}function Pc(n,t,e,o){var r=n.dom().createRange();r.selectNode(t.dom());var i=r.getBoundingClientRect();return function(n,t,e,o){var r=n.dom().createRange();r.selectNode(t.dom());var i=r.getBoundingClientRect(),u=Math.max(i.left,Math.min(i.right,e)),a=Math.max(i.top,Math.min(i.bottom,o));return uf(n,t,u,a)}(n,t,Math.max(i.left,Math.min(i.right,e)),Math.max(i.top,Math.min(i.bottom,o)))}function zc(n,t){return Lt(t,n)}function Lc(n,t,e,o){var r=function(n,t,e,o){var r=Co(n).dom().createRange();return r.setStart(n.dom(),t),r.setEnd(e.dom(),o),r}(n,t,e,o),i=jt(n,e)&&t===o;return r.collapsed&&!i}function jc(n){var t=we.fromDom(n.anchorNode),e=we.fromDom(n.focusNode);return Lc(t,n.anchorOffset,e,n.focusOffset)?on.some(Cc.create(t,n.anchorOffset,e,n.focusOffset)):function(n){if(0<n.rangeCount){var t=n.getRangeAt(0),e=n.getRangeAt(n.rangeCount-1);return on.some(Cc.create(we.fromDom(t.startContainer),t.startOffset,we.fromDom(e.endContainer),e.endOffset))}return on.none()}(n)}function Uc(n,t){return function(n){var t=n.getClientRects(),e=0<t.length?t[0]:n.getBoundingClientRect();return 0<e.width||0<e.height?on.some(e).map(Ra):on.none()}(function(i,n){return Na(i,n).match({ltr:function(n,t,e,o){var r=i.document.createRange();return r.setStart(n.dom(),t),r.setEnd(e.dom(),o),r},rtl:function(n,t,e,o){var r=i.document.createRange();return r.setStart(e.dom(),o),r.setEnd(n.dom(),t),r}})}(n,t))}function Wc(n){return n.fold(function(n){return n},function(n,t,e){return n.translate(-t,-e)})}function Gc(n){return n.fold(function(n){return n},function(n,t,e){return n})}function Xc(n){return O(n,function(n,t){return n.translate(t.left(),t.top())},Iu(0,0))}function Yc(n){var t=S(n,Gc);return Xc(t)}function qc(n,t,e){var o=Co(n.element()),r=pu(o),i=function(o,n,t){var e=Oo(t.root).dom();return on.from(e.frameElement).map(we.fromDom).filter(function(n){var t=Co(n),e=Co(o.element());return jt(t,e)}).map(du)}(n,0,e).getOr(r);return df(i,r.left(),r.top())}function Kc(n,t){return Pr(n)?pf(n,t):function(n,t){var e=Bo(n);if(0===e.length)return sf(n,t);if(t<e.length)return sf(e[t],0);var o=e[e.length-1],r=Pr(o)?Dc(o).length:Bo(o).length;return sf(o,r)}(n,t)}function Jc(n,t){return t.getSelection.getOrThunk(function(){return function(){return function(n){return on.from(n.getSelection()).filter(function(n){return 0<n.rangeCount}).bind(jc)}(n)}})().map(function(n){var t=Kc(n.start(),n.soffset()),e=Kc(n.finish(),n.foffset());return Tc.range(t.element(),t.offset(),e.element(),e.offset())})}function $c(n){return n.x()+n.width()}function Qc(n,t){return n.x()-t.width()}function Zc(n,t){return n.y()-t.height()+n.height()}function ns(n){return n.y()}function ts(n,t,e){return Ya($c(n),ns(n),e.southeast(),Ka(),"link-layout-se")}function es(n,t,e){return Ya(Qc(n,t),ns(n),e.southwest(),Ja(),"link-layout-sw")}function os(n,t,e){return Ya($c(n),Zc(n,t),e.northeast(),$a(),"link-layout-ne")}function rs(n,t,e){return Ya(Qc(n,t),Zc(n,t),e.northwest(),Qa(),"link-layout-nw")}function is(n,t,e,o){var r=n+t;return o<r?e:r<e?o:r}function us(n,t,e){return n<=t?t:e<=n?e:n}function as(n,t,e,o){var r=n.x(),i=n.y(),u=n.bubble().offset().left(),a=n.bubble().offset().top(),c=o.y(),s=o.bottom(),f=o.x(),l=o.right(),d=i+a,m=function(n,t,e,o,r){var i=r.x(),u=r.y(),a=r.width(),c=r.height(),s=i<=n,f=u<=t,l=s&&f,d=n+e<=i+a&&t+o<=u+c,m=Math.abs(Math.min(e,s?i+a-n:i-(n+e))),g=Math.abs(Math.min(o,f?u+c-t:u-(t+o)));return{originInBounds:l,sizeInBounds:d,limitX:us(n,r.x(),r.right()),limitY:us(t,r.y(),r.bottom()),deltaW:m,deltaH:g}}(r+u,d,t,e,o),g=m.originInBounds,p=m.sizeInBounds,h=m.limitX,v=m.limitY,b=m.deltaW,y=m.deltaH,x=nn(v+y-c),w=nn(s-v),S=function(n,t,e,o){return n.fold(t,t,o,o,t,o,e,e)}(n.direction(),w,w,x),C=nn(h+b-f),k=nn(l-h),O=function(n,t,e,o){return n.fold(t,o,t,o,e,e,t,o)}(n.direction(),k,k,C),E=gc({x:h,y:v,width:b,height:y,maxHeight:S,maxWidth:O,direction:n.direction(),classes:{on:n.bubble().classesOn(),off:n.bubble().classesOff()},label:n.label(),candidateYforTest:d});return g&&p?wf.fit(E):wf.nofit(E,b,y)}function cs(n,t,e,o){kr(t,"max-height"),kr(t,"max-width");var r=function(n){return{width:nn(gu(n)),height:nn(fu(n))}}(t);return function(n,e,u,a,c){function o(n,o,r,i){var t=n(e,u,a);return as(t,s,f,c).fold(wf.fit,function(n,t,e){return i<e||r<t?wf.nofit(n,t,e):wf.nofit(o,r,i)})}var s=u.width(),f=u.height();return O(n,function(n,t){var e=d(o,t);return n.fold(wf.fit,e)},wf.nofit(gc({x:e.x(),y:e.y(),width:u.width(),height:u.height(),maxHeight:u.height(),maxWidth:u.width(),direction:Ka(),classes:{on:[],off:[]},label:"none",candidateYforTest:e.y()}),-1,-1)).fold(l,l)}(o.preference(),n,r,e,o.bounds())}function ss(n,t,e){function o(n){return n+"px"}var r=function(n,r){return n.fold(function(){return pc("absolute",on.some(r.x()),on.some(r.y()),on.none(),on.none())},function(n,t,e,o){return Ta("absolute",r,n,t,e,o)},function(n,t,e,o){return Ta("fixed",r,n,t,e,o)})}(e.origin(),t);!function(n,t){var e=n.dom();Cn(t,function(n,t){n.fold(function(){br(e,t)},function(n){vr(e,t,n)})})}(n,{position:on.some(r.position()),left:r.left().map(o),top:r.top().map(o),right:r.right().map(o),bottom:r.bottom().map(o)})}function fs(n,t){!function(n,t){var e=Mu.max(n,t,["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"]);yr(n,"max-height",e+"px")}(n,Math.floor(t))}function ls(n,t,e){return n[t]===undefined?e:n[t]}function ds(n,t,e,o,r,i){var u=ls(i,"maxHeightFunction",Sf()),a=ls(i,"maxWidthFunction",Z),c=n.anchorBox(),s=n.origin(),f=kf({bounds:function(o,n){return n.fold(function(){return o.fold(Su,Su,yu)},function(e){return o.fold(e,e,function(){var n=e(),t=vc(o,n.x(),n.y());return yu(t.left(),t.top(),n.width(),n.height())})})}(s,r),origin:s,preference:o,maxHeightFunction:u,maxWidthFunction:a});Of(c,t,e,f)}function ms(n,t,e,o,r){var i=function(n,t){return xf(n,t)}(e.anchorBox,t);ds(i,r.element(),e.bubble,e.layouts,o,e.overrides)}function gs(n,t){Hi(n.element(),t.element())}function ps(t,n){var e=t.components();!function(n){bn(n.components(),function(n){return Pi(n.element())}),Io(n.element()),n.syncComponents()}(t);var o=_(e,n);bn(o,function(n){_f(n),t.getSystem().removeFromWorld(n)}),bn(n,function(n){n.getSystem().isConnected()?gs(t,n):(t.getSystem().addToWorld(n),gs(t,n),$e(t.element())&&Mf(n)),t.syncComponents()})}function hs(n,t){Ff(n,t,Hi)}function vs(n){_f(n),Pi(n.element()),n.getSystem().removeFromWorld(n)}function bs(t){var n=Eo(t.element()).bind(function(n){return t.getSystem().getByDom(n).toOption()});vs(t),n.each(function(n){n.syncComponents()})}function ys(n){var t=n.components();bn(t,vs),Io(n.element()),n.syncComponents()}function xs(n,t){If(n,t,Hi)}function ws(t){var n=Bo(t.element());bn(n,function(n){t.getByDom(n).each(_f)}),Pi(t.element())}function Ss(t,n,e,o){e.get().each(function(n){ys(t)});var r=n.getAttachPoint(t);hs(r,t);var i=t.getSystem().build(o);return hs(t,i),e.set(i),i}function Cs(n,t,e,o){var r=Ss(n,t,e,o);return t.onOpen(n,r),r}function ks(t,e,o){o.get().each(function(n){ys(t),bs(t),e.onClose(t,n),o.clear()})}function Os(n,t,e){return e.isOpen()}function Es(n){var t,e=ot("Dismissal",Wf,n);return(t={})[Lf()]={schema:qn([ct("target")]),onReceive:function(t,n){zf.isOpen(t)&&(zf.isPartOf(t,n.target)||e.isExtraPart(t,n.target)||e.fireEventInstead.fold(function(){return zf.close(t)},function(n){return oo(t,n.event)}))}},t}function Ts(n){var t,e=ot("Reposition",Gf,n);return(t={})[jf()]={onReceive:function(t){zf.isOpen(t)&&e.fireEventInstead.fold(function(){return e.doReposition(t)},function(n){return oo(t,n.event)})}},t}function Bs(n,t,e){t.store.manager.onLoad(n,t,e)}function Ds(n,t,e){t.store.manager.onUnload(n,t,e)}function As(){var n=ye(null);return nu({set:n.set,get:n.get,isNotSet:function(){return null===n.get()},clear:function(){n.set(null)},readState:function(){return{mode:"memory",value:n.get()}}})}function _s(){var i=ye({}),u=ye({});return nu({readState:function(){return{mode:"dataset",dataByValue:i.get(),dataByText:u.get()}},lookup:function(n){return Nn(i.get(),n).orThunk(function(){return Nn(u.get(),n)})},update:function(n){var t=i.get(),e=u.get(),o={},r={};bn(n,function(t){o[t.value]=t,Nn(t,"meta").each(function(n){Nn(n,"text").each(function(n){r[n]=t})})}),i.set(N(N({},t),o)),u.set(N(N({},e),r))},clear:function(){i.set({}),u.set({})}})}function Ms(n,t,e,o){var r=t.store;e.update([o]),r.setValue(n,o),t.onSetValue(n,o)}function Fs(t,n){return Dt(t,{},S(n,function(n){return function(t,e){return ce(t,t,Fn(),Yn(function(n){return qt("The field: "+t+" is forbidden. "+e)}))}(n.name(),"Cannot configure "+n.name()+" for "+t)}).concat([At("dump",l)]))}function Is(n){return n.dump}function Rs(n,t){return N(N({},n.dump),ba(t))}function Vs(n,t,e,o){return e.uiType===el?function(n,t,e,o){return n.exists(function(n){return n!==e.owner})?ol.single(!0,nn(e)):Nn(o,e.name).fold(function(){throw new Error("Unknown placeholder component: "+e.name+"\nKnown: ["+wn(o)+"]\nNamespace: "+n.getOr("none")+"\nSpec: "+JSON.stringify(e,null,2))},function(n){return n.replace()})}(n,0,e,o):ol.single(!1,nn(e))}function Ns(t,e,n,o){var r=P(o,function(n,t){return function(n,t){var e=!1;return{name:nn(n),required:function(){return t.fold(function(n,t){return n},function(n,t){return n})},used:function(){return e},replace:function(){if(!0===e)throw new Error("Trying to use the same placeholder more than once: "+n);return e=!0,t}}}(t,n)}),i=function(t,e,n,o){return B(n,function(n){return rl(t,e,n,o)})}(t,e,n,r);return Cn(r,function(n){if(!1===n.used()&&n.required())throw new Error("Placeholder: "+n.name()+" was not found in components list\nNamespace: "+t.getOr("none")+"\nComponents: "+JSON.stringify(e.components,null,2))}),i}function Hs(n){return n.fold(on.some,on.none,on.some,on.some)}function Ps(n){function t(n){return n.name}return n.fold(t,t,t,t)}function zs(e,o){return function(n){var t=ot("Converting part type",o,n);return e(t)}}function Ls(n,t,e,o){return Dn(t.defaults(n,e,o),e,{uid:n.partUids[t.name]},t.overrides(n,e,o))}function js(r,n){var t={};return bn(n,function(n){Hs(n).each(function(e){var o=El(r,e.pname);t[e.name]=function(n){var t=ot("Part: "+e.name+" in "+r,re(e.schema),n);return N(N({},o),{config:n,validated:t})}})}),t}function Us(n,t,e){return{uiType:al(),owner:n,name:t,config:e,validated:{}}}function Ws(n){return B(n,function(n){return n.fold(on.none,on.some,on.none,on.none).map(function(n){return mt(n.name,n.schema.concat([Zu(kl())]))}).toArray()})}function Gs(n){return S(n,Ps)}function Xs(n,t,e){return function(n,e,t){var i={},o={};return bn(t,function(n){n.fold(function(o){i[o.pname]=il(!0,function(n,t,e){return o.factory.sketch(Ls(n,o,t,e))})},function(n){var t=e.parts[n.name];o[n.name]=nn(n.factory.sketch(Ls(e,n,t[kl()]),t))},function(o){i[o.pname]=il(!1,function(n,t,e){return o.factory.sketch(Ls(n,o,t,e))})},function(r){i[r.pname]=ul(!0,function(t,n,e){var o=t[r.name];return S(o,function(n){return r.factory.sketch(Dn(r.defaults(t,n,e),n,r.overrides(t,n)))})})})}),{internals:nn(i),externals:nn(o)}}(0,t,e)}function Ys(n,t,e){return Ns(on.some(n),t,t.components,e)}function qs(n,t,e){var o=t.partUids[e];return n.getSystem().getByUid(o).toOption()}function Ks(n,t,e){return qs(n,t,e).getOrDie("Could not find part: "+e)}function Js(n,t,e){var o={},r=t.partUids,i=n.getSystem();return bn(e,function(n){o[n]=nn(i.getByUid(r[n]))}),o}function $s(n,t){var e=n.getSystem();return P(t.partUids,function(n,t){return nn(e.getByUid(n))})}function Qs(n){return wn(n.partUids)}function Zs(n,t,e){var o={},r=t.partUids,i=n.getSystem();return bn(e,function(n){o[n]=nn(i.getByUid(r[n]).getOrDie())}),o}function nf(t,n){var e=Gs(n);return K(S(e,function(n){return{key:n,value:t+"-"+n}}))}function tf(t){return ce("partUids","partUids",Rn(function(n){return nf(n.uid,t)}),de())}function ef(n,t,e,o,r){var i=function(n,t){return(0<n.length?[mt("parts",n)]:[]).concat([ct("uid"),St("dom",{}),St("components",[]),Zu("originalSpec"),St("debug.sketcher",{})]).concat(t)}(o,r);return ot(n+" [SpecSchema]",qn(i.concat(t)),e)}function of(n,t,e,o,r){var i=Bl(r),u=Ws(e),a=tf(e),c=ef(n,t,i,u,[a]),s=Xs(0,c,e);return o(c,Ys(n,c,s.internals()),i,s.externals())}var rf=function rI(e,o){var t=function(n){return e(n)?on.from(n.dom().nodeValue):on.none()};return{get:function(n){if(!e(n))throw new Error("Can only get "+o+" value of a "+o+" node");return t(n).getOr("")},getOption:t,set:function(n,t){if(!e(n))throw new Error("Can only set raw "+o+" value of a "+o+" node");n.dom().nodeValue=t}}}(Pr,"text"),uf=function(n,t,e,o){return Pr(t)?function(t,e,o,r){var n=t.dom().createRange();n.selectNode(e.dom());var i=n.getClientRects();return Du(i,function(n){return Ha(n,o,r)?on.some(n):on.none()}).map(function(n){return _c(t,e,o,r,n)})}(n,t,e,o):function(t,n,e,o){var r=t.dom().createRange(),i=Bo(n);return Du(i,function(n){return r.selectNode(n.dom()),Ha(r.getBoundingClientRect(),e,o)?uf(t,n,e,o):on.none()})}(n,t,e,o)},af=["img","br"],cf=function(n,i){var u=function(n){for(var t=Bo(n),e=t.length-1;0<=e;e--){var o=t[e];if(i(o))return on.some(o);var r=u(o);if(r.isSome())return r}return on.none()};return u(n)},sf=(document.caretPositionFromPoint||document.caretRangeFromPoint,yo("element","offset")),ff=Tn([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),lf=ff.screen,df=ff.absolute,mf=function(n,t,e,o){var r=n,i=t,u=e,a=o;n<0&&(r=0,u=e+n),t<0&&(i=0,a=o+t);var c=lf(Iu(r,i));return on.some(Pu(c,u,a))},gf=function(n,i,u,a,c){return n.map(function(n){var t=[i,n.point()],e=function(n,t,e,o){return n.fold(t,e,o)}(a,function(){return Yc(t)},function(){return Yc(t)},function(){return function(n){var t=S(n,Wc);return Xc(t)}(t)}),o=zu(e.left(),e.top(),n.width(),n.height()),r=Ma(c,u,u.showAbove?[ca,sa,ua,aa,oc,rc]:[ua,aa,ca,sa,rc,rc],u.showAbove?[sa,ca,aa,ua,oc,rc]:[aa,ua,sa,ca,rc,oc]);return Da({anchorBox:o,bubble:u.bubble.getOr(Ea()),overrides:u.overrides,layouts:r,placer:on.none()})})},pf=yo("element","offset"),hf=[ht("getSelection"),ct("root"),ht("bubble"),_a(),St("overrides",{}),St("showAbove",!1),Qu("placement",function(n,t,e){var o=Oo(t.root).dom(),r=qc(n,0,t),i=Jc(o,t).bind(function(n){return Uc(o,Tc.exactFromRange(n)).orThunk(function(){var t=we.fromText("\ufeff");return Ao(n.start(),t),Uc(o,Tc.exact(t,0,t,1)).map(function(n){return Pi(t),n})}).bind(function(n){return mf(n.left(),n.top(),n.width(),n.height())})}),u=Jc(o,t).bind(function(n){return Hr(n.start())?on.some(n.start()):Eo(n.start())}).getOr(n.element());return gf(i,r,t,e,u)})],vf=[ct("node"),ct("root"),ht("bubble"),_a(),St("overrides",{}),St("showAbove",!1),Qu("placement",function(r,i,u){var a=qc(r,0,i);return i.node.bind(function(n){var t=n.dom().getBoundingClientRect(),e=mf(t.left,t.top,t.width,t.height),o=i.node.getOr(r.element());return gf(e,a,i,u,o)})})],bf=[ct("item"),_a(),St("overrides",{}),Qu("placement",function(n,t,e){var o=Ba(e,t.item.element()),r=Ma(n.element(),t,[ts,es,os,rs],[es,ts,rs,os]);return on.some(Da({anchorBox:o,bubble:Ea(),overrides:t.overrides,layouts:r,placer:on.none()}))})],yf=it("anchor",{selection:hf,node:vf,hotspot:wc,submenu:bf,makeshift:Sc}),xf=yo("anchorBox","origin"),wf=Tn([{fit:["reposition"]},{nofit:["reposition","deltaW","deltaH"]}]),Sf=nn(function(n,t){fs(n,t),xr(n,{"overflow-x":"hidden","overflow-y":"auto"})}),Cf=nn(function(n,t){fs(n,t)}),kf=So(["bounds","origin","preference","maxHeightFunction","maxWidthFunction"],[]),Of=function(n,t,e,o){var r=cs(n,t,e,o);ss(t,r,o),function(n,t){var e=t.classes();pr(n,e.off),gr(n,e.on)}(t,r),function(n,t,e){e.maxHeightFunction()(n,t.maxHeight())}(t,r,o),function(n,t,e){e.maxWidthFunction()(n,t.maxWidth())}(t,r,o)},Ef=function(n,t,e,o,r,i){var u=i.map(xu);return Tf(n,t,e,o,r,u)},Tf=function(r,i,n,t,u,a){var c=ot("positioning anchor.info",yf,t);ka(function(){yr(u.element(),"position","fixed");var n=Sr(u.element(),"visibility");yr(u.element(),"visibility","hidden");var t=i.useFixed()?function(){var n=v.document.documentElement;return yc(0,0,n.clientWidth,n.clientHeight)}():function(n){var t=du(n.element()),e=n.element().dom().getBoundingClientRect();return bc(t.left(),t.top(),e.width,e.height)}(r),e=c.placement,o=a.map(nn).or(i.getBounds);e(r,c,t).each(function(n){n.placer.getOr(ms)(r,t,n,o,u)}),n.fold(function(){kr(u.element(),"visibility")},function(n){yr(u.element(),"visibility",n)}),Sr(u.element(),"left").isNone()&&Sr(u.element(),"top").isNone()&&Sr(u.element(),"right").isNone()&&Sr(u.element(),"bottom").isNone()&&Sr(u.element(),"position").is("fixed")&&kr(u.element(),"position")},u.element())},Bf=/* */Object.freeze({position:function(n,t,e,o,r){Ef(n,t,e,o,r,on.none())},positionWithin:Ef,positionWithinBounds:Tf,getMode:function(n,t,e){return t.useFixed()?"fixed":"absolute"}}),Df=[St("useFixed",u),ht("getBounds")],Af=ya({fields:Df,name:"positioning",active:dc,apis:Bf}),_f=function(n){oo(n,ki());var t=n.components();bn(t,_f)},Mf=function(n){var t=n.components();bn(t,Mf),oo(n,Ci())},Ff=function(n,t,e){n.getSystem().addToWorld(t),e(n.element(),t.element()),$e(n.element())&&Mf(t),n.syncComponents()},If=function(n,t,e){e(n,t.element());var o=Bo(t.element());bn(o,function(n){t.getByDom(n).each(Mf)})},Rf=function(n,t,e){var o=t.getAttachPoint(n);yr(n.element(),"position",Af.getMode(o)),function(t,n,e,o){Sr(t.element(),n).fold(function(){jo(t.element(),e)},function(n){Po(t.element(),e,n)}),yr(t.element(),n,o)}(n,"visibility",t.cloakVisibilityAttr,"hidden")},Vf=function(n,t,e){!function(t){return x(["top","left","right","bottom"],function(n){return Sr(t,n).isSome()})}(n.element())&&kr(n.element(),"position"),function(n,t,e){if(Lo(n.element(),e)){var o=zo(n.element(),e);yr(n.element(),t,o)}else kr(n.element(),t)}(n,"visibility",t.cloakVisibilityAttr)},Nf=/* */Object.freeze({cloak:Rf,decloak:Vf,open:Cs,openWhileCloaked:function(n,t,e,o,r){Rf(n,t),Cs(n,t,e,o),r(),Vf(n,t)},close:ks,isOpen:Os,isPartOf:function(t,e,n,o){return Os(0,0,n)&&n.get().exists(function(n){return e.isPartOf(t,n,o)})},getState:function(n,t,e){return e.get()},setContent:function(n,t,e,o){return e.get().map(function(){return Ss(n,t,e,o)})}}),Hf=/* */Object.freeze({events:function(e,o){return co([lo(hi(),function(n,t){ks(n,e,o)})])}}),Pf=[qu("onOpen"),qu("onClose"),ct("isPartOf"),ct("getAttachPoint"),St("cloakVisibilityAttr","data-precloak-visibility")],zf=ya({fields:Pf,name:"sandboxing",active:Hf,apis:Nf,state:/* */Object.freeze({init:function(){var t=ye(on.none()),n=nn("not-implemented");return nu({readState:n,isOpen:function(){return t.get().isSome()},clear:function(){t.set(on.none())},set:function(n){t.set(on.some(n))},get:function(n){return t.get()}})}})}),Lf=nn("dismiss.popups"),jf=nn("reposition.popups"),Uf=nn("mouse.released"),Wf=qn([St("isExtraPart",nn(!1)),wt("fireEventInstead",[St("event",Oi())])]),Gf=qn([St("isExtraPart",nn(!1)),wt("fireEventInstead",[St("event",Ei())]),dt("doReposition")]),Xf=/* */Object.freeze({onLoad:Bs,onUnload:Ds,setValue:function(n,t,e,o){t.store.manager.setValue(n,t,e,o)},getValue:function(n,t,e){return t.store.manager.getValue(n,t,e)},getState:function(n,t,e){return e}}),Yf=/* */Object.freeze({events:function(e,o){var n=e.resetOnDom?[Ii(function(n,t){Bs(n,e,o)}),Ri(function(n,t){Ds(n,e,o)})]:[ga(e,o,Bs)];return co(n)}}),qf=/* */Object.freeze({memory:As,dataset:_s,manual:function(){return nu({readState:function(){}})},init:function(n){return n.store.manager.state(n)}}),Kf=[ht("initialValue"),ct("getFallbackEntry"),ct("getDataKey"),ct("setValue"),Qu("manager",{setValue:Ms,getValue:function(n,t,e){var o=t.store,r=o.getDataKey(n);return e.lookup(r).fold(function(){return o.getFallbackEntry(r)},function(n){return n})},onLoad:function(t,e,o){e.store.initialValue.each(function(n){Ms(t,e,o,n)})},onUnload:function(n,t,e){e.clear()},state:_s})],Jf=[ct("getValue"),St("setValue",Z),ht("initialValue"),Qu("manager",{setValue:function(n,t,e,o){t.store.setValue(n,o),t.onSetValue(n,o)},getValue:function(n,t,e){return t.store.getValue(n)},onLoad:function(t,e,n){e.store.initialValue.each(function(n){e.store.setValue(t,n)})},onUnload:Z,state:Zi.init})],$f=[ht("initialValue"),Qu("manager",{setValue:function(n,t,e,o){e.set(o),t.onSetValue(n,o)},getValue:function(n,t,e){return e.get()},onLoad:function(n,t,e){t.store.initialValue.each(function(n){e.isNotSet()&&e.set(n)})},onUnload:function(n,t,e){e.clear()},state:As})],Qf=[Ct("store",{mode:"memory"},it("mode",{memory:$f,manual:Jf,dataset:Kf})),qu("onSetValue"),St("resetOnDom",!1)],Zf=ya({fields:Qf,name:"representing",active:Yf,apis:Xf,extra:{setValueFrom:function(n,t){var e=Zf.getValue(t);Zf.setValue(n,e)}},state:qf}),nl=Fs,tl=Rs,el="placeholder",ol=Tn([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]),rl=function(i,u,a,c){return Vs(i,0,a,c).fold(function(n,t){var e=t(u,a.config,a.validated),o=Nn(e,"components").getOr([]),r=B(o,function(n){return rl(i,u,n,c)});return[N(N({},e),{components:r})]},function(n,t){var e=t(u,a.config,a.validated);return a.validated.preprocess.getOr(l)(e)})},il=ol.single,ul=ol.multiple,al=nn(el),cl=Tn([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),sl=St("factory",{sketch:l}),fl=St("schema",[]),ll=ct("name"),dl=ce("pname","pname",In(function(n){return"<alloy."+Xo(n.name)+">"}),de()),ml=At("schema",function(){return[ht("preprocess")]}),gl=St("defaults",nn({})),pl=St("overrides",nn({})),hl=re([sl,fl,ll,dl,gl,pl]),vl=re([sl,fl,ll,gl,pl]),bl=re([sl,fl,ll,dl,gl,pl]),yl=re([sl,ml,ll,ct("unit"),dl,gl,pl]),xl=zs(cl.required,hl),wl=zs(cl.external,vl),Sl=zs(cl.optional,bl),Cl=zs(cl.group,yl),kl=nn("entirety"),Ol=/* */Object.freeze({required:xl,external:wl,optional:Sl,group:Cl,asNamedPart:Hs,name:Ps,asCommon:function(n){return n.fold(l,l,l,l)},original:kl}),El=function(n,t){return{uiType:al(),owner:n,name:t}},Tl=/* */Object.freeze({generate:js,generateOne:Us,schemas:Ws,names:Gs,substitutes:Xs,components:Ys,defaultUids:nf,defaultUidsSchema:tf,getAllParts:$s,getAllPartNames:Qs,getPart:qs,getPartOrDie:Ks,getParts:Js,getPartsOrDie:Zs}),Bl=function(n){return n.hasOwnProperty("uid")?n:N(N({},n),{uid:Yo("uid")})};function Dl(n){var t=ot("Sketcher for "+n.name,Kl,n),e=P(t.apis,$o),o=P(t.extraApis,function(n,t){return Ko(n,t)});return N(N({name:nn(t.name),partFields:nn([]),configFields:nn(t.configFields),sketch:function(n){return function(n,t,e,o){var r=Bl(o);return e(ef(n,t,r,[],[]),r)}(t.name,t.configFields,t.factory,n)}},e),o)}function Al(n){var t=ot("Sketcher for "+n.name,Jl,n),e=js(t.name,t.partFields),o=P(t.apis,$o),r=P(t.extraApis,function(n,t){return Ko(n,t)});return N(N({name:nn(t.name),partFields:nn(t.partFields),configFields:nn(t.configFields),sketch:function(n){return of(t.name,t.configFields,t.partFields,t.factory,n)},parts:nn(e)},o),r)}function _l(n){return"input"===Ke(n)&&"radio"!==zo(n,"type")||"textarea"===Ke(n)}function Ml(e,o,n,r){var t=zc(e.element(),"."+o.highlightClass);bn(t,function(t){x(r,function(n){return n.element()===t})||(dr(t,o.highlightClass),e.getSystem().getByDom(t).each(function(n){o.onDehighlight(e,n),oo(n,Mi())}))})}function Fl(n,t,e,o){Ml(n,t,0,[o]),nd(n,t,e,o)||(fr(o.element(),t.highlightClass),t.onHighlight(n,o),oo(o,_i()))}function Il(e,t,n,o){var r=zc(e.element(),"."+t.itemClass);return T(r,function(n){return mr(n,t.highlightClass)}).bind(function(n){var t=is(n,o,0,r.length-1);return e.getSystem().getByDom(r[t]).toOption()})}function Rl(n,t,e){var o=A(n.slice(0,t)),r=A(n.slice(t+1));return E(o.concat(r),e)}function Vl(n,t,e){var o=A(n.slice(0,t));return E(o,e)}function Nl(n,t,e){var o=n.slice(0,t),r=n.slice(t+1);return E(r.concat(o),e)}function Hl(n,t,e){var o=n.slice(t+1);return E(o,e)}function Pl(e){return function(n){var t=n.raw();return vn(e,t.which)}}function zl(n){return function(t){return D(n,function(n){return n(t)})}}function Ll(n){return!0===n.raw().shiftKey}function jl(n){return!0===n.raw().ctrlKey}function Ul(n,t){return{matches:n,classification:t}}function Wl(n,t,e){t.exists(function(t){return e.exists(function(n){return jt(n,t)})})||ro(n,Ti(),{prevFocus:t,newFocus:e})}function Gl(){function r(n){return Ca(n.element())}return{get:r,set:function(n,t){var e=r(n);n.getSystem().triggerFocus(t,n.element());var o=r(n);Wl(n,e,o)}}}function Xl(){function r(n){return ad.getHighlighted(n).map(function(n){return n.element()})}return{get:r,set:function(t,n){var e=r(t);t.getSystem().getByDom(n).fold(Z,function(n){ad.highlight(t,n)});var o=r(t);Wl(t,e,o)}}}var Yl,ql,Kl=qn([ct("name"),ct("factory"),ct("configFields"),St("apis",{}),St("extraApis",{})]),Jl=qn([ct("name"),ct("factory"),ct("configFields"),ct("partFields"),St("apis",{}),St("extraApis",{})]),$l=/* */Object.freeze({getCurrent:function(n,t,e){return t.find(n)}}),Ql=[ct("find")],Zl=ya({fields:Ql,name:"composing",apis:$l}),nd=function(n,t,e,o){return mr(o.element(),t.highlightClass)},td=function(n,t,e,o){var r=zc(n.element(),"."+t.itemClass);return on.from(r[o]).fold(function(){return an.error("No element found with index "+o)},n.getSystem().getByDom)},ed=function(t,n,e){return ku(t.element(),"."+n.itemClass).bind(function(n){return t.getSystem().getByDom(n).toOption()})},od=function(t,n,e){var o=zc(t.element(),"."+n.itemClass);return(0<o.length?on.some(o[o.length-1]):on.none()).bind(function(n){return t.getSystem().getByDom(n).toOption()})},rd=function(t,n,e){var o=zc(t.element(),"."+n.itemClass);return Bu(S(o,function(n){return t.getSystem().getByDom(n).toOption()}))},id=/* */Object.freeze({dehighlightAll:function(n,t,e){return Ml(n,t,0,[])},dehighlight:function(n,t,e,o){nd(n,t,e,o)&&(dr(o.element(),t.highlightClass),t.onDehighlight(n,o),oo(o,Mi()))},highlight:Fl,highlightFirst:function(t,e,o){ed(t,e).each(function(n){Fl(t,e,o,n)})},highlightLast:function(t,e,o){od(t,e).each(function(n){Fl(t,e,o,n)})},highlightAt:function(t,e,o,n){td(t,e,o,n).fold(function(n){throw new Error(n)},function(n){Fl(t,e,o,n)})},highlightBy:function(t,e,o,n){var r=rd(t,e);E(r,n).each(function(n){Fl(t,e,o,n)})},isHighlighted:nd,getHighlighted:function(t,n,e){return ku(t.element(),"."+n.highlightClass).bind(function(n){return t.getSystem().getByDom(n).toOption()})},getFirst:ed,getLast:od,getPrevious:function(n,t,e){return Il(n,t,0,-1)},getNext:function(n,t,e){return Il(n,t,0,1)},getCandidates:rd}),ud=[ct("highlightClass"),ct("itemClass"),qu("onHighlight"),qu("onDehighlight")],ad=ya({fields:ud,name:"highlighting",apis:id}),cd=b(Ll);(ql=Yl=Yl||{}).OnFocusMode="onFocus",ql.OnEnterOrSpaceMode="onEnterOrSpace",ql.OnApiMode="onApi";function sd(n,t,e,i,u){function a(t,e,n,o,r){return function(n,t){return E(n,function(n){return n.matches(t)}).map(function(n){return n.classification})}(n(t,e,o,r),e.event()).bind(function(n){return n(t,e,o,r)})}var o={schema:function(){return n.concat([St("focusManager",Gl()),Ct("focusInside","onFocus",Zn(function(n){return vn(["onFocus","onEnterOrSpace","onApi"],n)?an.value(n):an.error("Invalid value for focusInside")})),Qu("handler",o),Qu("state",t),Qu("sendFocusIn",u)])},processKey:a,toEvents:function(o,r){var n=o.focusInside!==Yl.OnFocusMode?on.none():u(o).map(function(e){return lo(ci(),function(n,t){e(n,o,r),t.stop()})});return co(n.toArray().concat([lo(ni(),function(n,t){a(n,t,e,o,r).fold(function(){!function(t,e){var n=Pl([32].concat([13]))(e.event());o.focusInside===Yl.OnEnterOrSpaceMode&&n&&Ut(t,e)&&u(o).each(function(n){n(t,o,r),e.stop()})}(n,t)},function(n){t.stop()})}),lo(ti(),function(n,t){a(n,t,i,o,r).each(function(n){t.stop()})})]))}};return o}function fd(n){function i(n,t){var e=n.visibilitySelector.bind(function(n){return Ou(t,n)}).getOr(t);return 0<su(e)}function t(t,e){(function(n,t){var e=zc(n.element(),t.selector),o=C(e,function(n){return i(t,n)});return on.from(o[t.firstTabstop])})(t,e).each(function(n){e.focusManager.set(t,n)})}function u(t,n,e,o,r){return r(n,e,function(n){return function(n,t){return i(n,t)&&n.useTabstopAt(t)}(o,n)}).fold(function(){return o.cyclic?on.some(!0):on.none()},function(n){return o.focusManager.set(t,n),on.some(!0)})}function a(t,n,e,o){var r=zc(t.element(),e.selector);return function(n,t){return t.focusManager.get(n).bind(function(n){return Ou(n,t.selector)})}(t,e).bind(function(n){return T(r,d(jt,n)).bind(function(n){return u(t,r,n,e,o)})})}var e=[ht("onEscape"),ht("onEnter"),St("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),St("firstTabstop",0),St("useTabstopAt",nn(!0)),ht("visibilitySelector")].concat([n]),o=nn([Ul(zl([Ll,Pl([9])]),function(n,t,e,o){var r=e.cyclic?Rl:Vl;return a(n,0,e,r)}),Ul(Pl([9]),function(n,t,e,o){var r=e.cyclic?Nl:Hl;return a(n,0,e,r)}),Ul(Pl([27]),function(t,e,n,o){return n.onEscape.bind(function(n){return n(t,e)})}),Ul(zl([cd,Pl([13])]),function(t,e,n,o){return n.onEnter.bind(function(n){return n(t,e)})})]),r=nn([]);return sd(e,Zi.init,o,r,function(){return on.some(t)})}function ld(n,t,e){return _l(e)&&Pl([32])(t.event())?on.none():function(n,t,e){return uo(n,e,di()),on.some(!0)}(n,0,e)}function dd(n,t){return on.some(!0)}function md(n,t,e){return e.execute(n,t,n.element())}function gd(n){var e=ye(on.none());return nu({readState:function(){return e.get().map(function(n){return{numRows:n.numRows(),numColumns:n.numColumns()}}).getOr({numRows:"?",numColumns:"?"})},setGridSize:function(n,t){e.set(on.some({numRows:nn(n),numColumns:nn(t)}))},getNumRows:function(){return e.get().map(function(n){return n.numRows()})},getNumColumns:function(){return e.get().map(function(n){return n.numColumns()})}})}function pd(i){return function(n,t,e,o){var r=i(n.element());return Em(r,n,t,e,o)}}function hd(n,t){var e=Aa(n,t);return pd(e)}function vd(n,t){var e=Aa(t,n);return pd(e)}function bd(r){return function(n,t,e,o){return Em(r,n,t,e,o)}}function yd(n){return!function(n){return n.offsetWidth<=0&&n.offsetHeight<=0}(n.dom())}function xd(n,t,e){var o=d(jt,t),r=zc(n,e);return function(t,n){return T(t,n).map(function(n){return Am({index:n,candidates:t})})}(C(r,yd),o)}function wd(n,t){return T(n,function(n){return jt(t,n)})}function Sd(e,n,o,t){return t(Math.floor(n/o),n%o).bind(function(n){var t=n.row()*o+n.column();return 0<=t&&t<e.length?on.some(e[t]):on.none()})}function Cd(r,n,i,u,a){return Sd(r,n,u,function(n,t){var e=n===i-1?r.length-n*u:u,o=is(t,a,0,e-1);return on.some({row:nn(n),column:nn(o)})})}function kd(i,n,u,a,c){return Sd(i,n,a,function(n,t){var e=is(n,c,0,u-1),o=e===u-1?i.length-e*a:a,r=us(t,0,o-1);return on.some({row:nn(e),column:nn(r)})})}function Od(t,e,n){ku(t.element(),e.selector).each(function(n){e.focusManager.set(t,n)})}function Ed(r){return function(n,t,e,o){return xd(n,t,e.selector).bind(function(n){return r(n.candidates(),n.index(),o.getNumRows().getOr(e.initSize.numRows),o.getNumColumns().getOr(e.initSize.numColumns))})}}function Td(n,t,e,o){return e.captureTab?on.some(!0):on.none()}function Bd(n,t,e,r){var i=function(n,t,e){var o=is(t,r,0,e.length-1);return o===n?on.none():function(n){return"button"===Ke(n)&&"disabled"===zo(n,"disabled")}(e[o])?i(n,o,e):on.from(e[o])};return xd(n,e,t).bind(function(n){var t=n.index(),e=n.candidates();return i(t,t,e)})}function Dd(t,e,o){return function(n,t){return t.focusManager.get(n).bind(function(n){return Ou(n,t.selector)})}(t,o).bind(function(n){return o.execute(t,e,n)})}function Ad(t,e){e.getInitial(t).orThunk(function(){return ku(t.element(),e.selector)}).each(function(n){e.focusManager.set(t,n)})}function _d(n,t,e){return Bd(n,e.selector,t,-1)}function Md(n,t,e){return Bd(n,e.selector,t,1)}function Fd(o){return function(n,t,e){return o(n,t,e).bind(function(){return e.executeOnMove?Dd(n,t,e):on.some(!0)})}}function Id(n,t,e,o){return e.onEscape(n,t)}function Rd(n,t,e){return on.from(n[t]).bind(function(n){return on.from(n[e]).map(function(n){return jm({rowIndex:t,columnIndex:e,cell:n})})})}function Vd(n,t,e,o){var r=n[t].length,i=is(e,o,0,r-1);return Rd(n,t,i)}function Nd(n,t,e,o){var r=is(e,o,0,n.length-1),i=n[r].length,u=us(t,0,i-1);return Rd(n,r,u)}function Hd(n,t,e,o){var r=n[t].length,i=us(e+o,0,r-1);return Rd(n,t,i)}function Pd(n,t,e,o){var r=us(e+o,0,n.length-1),i=n[r].length,u=us(t,0,i-1);return Rd(n,r,u)}function zd(t,e){e.previousSelector(t).orThunk(function(){var n=e.selectors;return ku(t.element(),n.cell)}).each(function(n){e.focusManager.set(t,n)})}function Ld(n,t){return function(r,e,i){var u=i.cycles?n:t;return Ou(e,i.selectors.row).bind(function(n){var t=zc(n,i.selectors.cell);return wd(t,e).bind(function(e){var o=zc(r,i.selectors.row);return wd(o,n).bind(function(n){var t=function(n,t){return S(n,function(n){return zc(n,t.selectors.cell)})}(o,i);return u(t,n,e).map(function(n){return n.cell()})})})})}}function jd(t,e,o){return o.focusManager.get(t).bind(function(n){return o.execute(t,e,n)})}function Ud(t,e){ku(t.element(),e.selector).each(function(n){e.focusManager.set(t,n)})}function Wd(n,t,e){return Bd(n,e.selector,t,-1)}function Gd(n,t,e){return Bd(n,e.selector,t,1)}function Xd(n,t,e,o){var r=n.getSystem().build(o);Ff(n,r,e)}function Yd(n,t,e,o){var r=dg(n);E(r,function(n){return jt(o.element(),n.element())}).each(bs)}function qd(t,n,e,o,r){var i=dg(t);return on.from(i[o]).map(function(n){return Yd(t,0,0,n),r.each(function(n){Xd(t,0,function(n,t){!function(n,t,e){Do(n,e).fold(function(){Hi(n,t)},function(n){Ao(n,t)})}(n,t,o)},n)}),n})}function Kd(n,t){return{key:n,value:{config:{},me:function(n,t){var e=co(t);return ya({fields:[ct("enabled")],name:n,active:{events:nn(e)}})}(n,t),configAsRaw:nn({}),initialConfig:{},state:Zi}}}function Jd(n,t){t.ignore||(wa(n.element()),t.onFocus(n))}function $d(n,t,e){var o=t.aria;o.update(n,o,e.get())}function Qd(t,n,e){n.toggleClass.each(function(n){e.get()?fr(t.element(),n):dr(t.element(),n)})}function Zd(n,t,e){bg(n,t,e,!e.get())}function nm(n,t,e){e.set(!0),Qd(n,t,e),$d(n,t,e)}function tm(n,t,e){e.set(!1),Qd(n,t,e),$d(n,t,e)}function em(n,t,e){bg(n,t,e,t.selected)}function om(){function n(n,t){t.stop(),io(n)}return[lo(ri(),n),lo(gi(),n),vo(Ur()),vo(Yr())]}function rm(n){return co(H([n.map(function(e){return Ni(function(n,t){e(n),t.stop()})}).toArray(),om()]))}function im(n){(Ca(n.element()).isNone()||vg.isFocused(n))&&(vg.isFocused(n)||vg.focus(n),ro(n,kg,{item:n}))}function um(n){ro(n,Og,{item:n})}function am(n,t){var e={};Cn(n,function(n,t){bn(n,function(n){e[n]=t})});var o=t,r=function(n){return kn(n,function(n,t){return{k:n,v:t}})}(t),i=P(r,function(n,t){return[t].concat(Ng(e,o,r,t))});return P(e,function(n){return Nn(i,n).getOr([n])})}function cm(n){return n.x()}function sm(n,t){return n.x()+n.width()/2-t.width()/2}function fm(n,t){return n.x()+n.width()-t.width()}function lm(n){return n.y()}function dm(n,t){return n.y()+n.height()-t.height()}function mm(n,t,e){return Ya(cm(n),dm(n,t),e.innerSoutheast(),Ka(),"layout-se")}function gm(n,t,e){return Ya(fm(n,t),dm(n,t),e.innerSouthwest(),Ja(),"layout-sw")}function pm(n,t,e){return Ya(cm(n),lm(n),e.innerNortheast(),$a(),"layout-ne")}function hm(n,t,e){return Ya(fm(n,t),lm(n),e.innerNorthwest(),Qa(),"layout-nw")}function vm(n){var t=function e(n){return n.uid!==undefined}(n)&&$(n,"uid")?n.uid:Yo("memento");return{get:function(n){return n.getSystem().getByUid(t).getOrDie()},getOpt:function(n){return n.getSystem().getByUid(t).toOption()},asSpec:function(){return N(N({},n),{uid:t})}}}function bm(n){return on.from(n()["temporary-placeholder"]).getOr("!not found!")}function ym(n,t){return on.from(t()[n]).getOrThunk(function(){return bm(t)})}var xm,wm=fd(At("cyclic",nn(!1))),Sm=fd(At("cyclic",nn(!0))),Cm=[St("execute",ld),St("useSpace",!1),St("useEnter",!0),St("useControlEnter",!1),St("useDown",!1)],km=sd(Cm,Zi.init,function(n,t,e,o){var r=e.useSpace&&!_l(n.element())?[32]:[],i=e.useEnter?[13]:[],u=e.useDown?[40]:[],a=r.concat(i).concat(u);return[Ul(Pl(a),md)].concat(e.useControlEnter?[Ul(zl([jl,Pl([13])]),md)]:[])},function(n,t,e,o){return e.useSpace&&!_l(n.element())?[Ul(Pl([32]),dd)]:[]},function(){return on.none()}),Om=/* */Object.freeze({flatgrid:gd,init:function(n){return n.state(n)}}),Em=function(t,e,n,o,r){return o.focusManager.get(e).bind(function(n){return t(e.element(),n,o,r)}).map(function(n){return o.focusManager.set(e,n),!0})},Tm=bd,Bm=bd,Dm=bd,Am=So(["index","candidates"],[]),_m=[ct("selector"),St("execute",ld),Ku("onEscape"),St("captureTab",!1),Xa()],Mm=Ed(function(n,t,e,o){return Cd(n,t,e,o,-1)}),Fm=Ed(function(n,t,e,o){return Cd(n,t,e,o,1)}),Im=Ed(function(n,t,e,o){return kd(n,t,e,o,-1)}),Rm=Ed(function(n,t,e,o){return kd(n,t,e,o,1)}),Vm=nn([Ul(Pl([37]),hd(Mm,Fm)),Ul(Pl([39]),vd(Mm,Fm)),Ul(Pl([38]),Tm(Im)),Ul(Pl([40]),Bm(Rm)),Ul(zl([Ll,Pl([9])]),Td),Ul(zl([cd,Pl([9])]),Td),Ul(Pl([27]),function(n,t,e,o){return e.onEscape(n,t)}),Ul(Pl([32].concat([13])),function(t,e,o,n){return function(n,t){return t.focusManager.get(n).bind(function(n){return Ou(n,t.selector)})}(t,o).bind(function(n){return o.execute(t,e,n)})})]),Nm=nn([Ul(Pl([32]),dd)]),Hm=sd(_m,gd,Vm,Nm,function(){return on.some(Od)}),Pm=[ct("selector"),St("getInitial",on.none),St("execute",ld),Ku("onEscape"),St("executeOnMove",!1),St("allowVertical",!0)],zm=nn([Ul(Pl([32]),dd)]),Lm=sd(Pm,Zi.init,function(n,t,e,o){var r=[37].concat(e.allowVertical?[38]:[]),i=[39].concat(e.allowVertical?[40]:[]);return[Ul(Pl(r),Fd(hd(_d,Md))),Ul(Pl(i),Fd(vd(_d,Md))),Ul(Pl([13]),Dd),Ul(Pl([32]),Dd),Ul(Pl([27]),Id)]},zm,function(){return on.some(Ad)}),jm=So(["rowIndex","columnIndex","cell"],[]),Um=[mt("selectors",[ct("row"),ct("cell")]),St("cycles",!0),St("previousSelector",on.none),St("execute",ld)],Wm=Ld(function(n,t,e){return Vd(n,t,e,-1)},function(n,t,e){return Hd(n,t,e,-1)}),Gm=Ld(function(n,t,e){return Vd(n,t,e,1)},function(n,t,e){return Hd(n,t,e,1)}),Xm=Ld(function(n,t,e){return Nd(n,e,t,-1)},function(n,t,e){return Pd(n,e,t,-1)}),Ym=Ld(function(n,t,e){return Nd(n,e,t,1)},function(n,t,e){return Pd(n,e,t,1)}),qm=nn([Ul(Pl([37]),hd(Wm,Gm)),Ul(Pl([39]),vd(Wm,Gm)),Ul(Pl([38]),Tm(Xm)),Ul(Pl([40]),Bm(Ym)),Ul(Pl([32].concat([13])),function(t,e,o){return Ca(t.element()).bind(function(n){return o.execute(t,e,n)})})]),Km=nn([Ul(Pl([32]),dd)]),Jm=sd(Um,Zi.init,qm,Km,function(){return on.some(zd)}),$m=[ct("selector"),St("execute",ld),St("moveOnTab",!1)],Qm=nn([Ul(Pl([38]),Dm(Wd)),Ul(Pl([40]),Dm(Gd)),Ul(zl([Ll,Pl([9])]),function(n,t,e){return e.moveOnTab?Dm(Wd)(n,t,e):on.none()}),Ul(zl([cd,Pl([9])]),function(n,t,e){return e.moveOnTab?Dm(Gd)(n,t,e):on.none()}),Ul(Pl([13]),jd),Ul(Pl([32]),jd)]),Zm=nn([Ul(Pl([32]),dd)]),ng=sd($m,Zi.init,Qm,Zm,function(){return on.some(Ud)}),tg=[Ku("onSpace"),Ku("onEnter"),Ku("onShiftEnter"),Ku("onLeft"),Ku("onRight"),Ku("onTab"),Ku("onShiftTab"),Ku("onUp"),Ku("onDown"),Ku("onEscape"),St("stopSpaceKeyup",!1),ht("focusIn")],eg=sd(tg,Zi.init,function(n,t,e){return[Ul(Pl([32]),e.onSpace),Ul(zl([cd,Pl([13])]),e.onEnter),Ul(zl([Ll,Pl([13])]),e.onShiftEnter),Ul(zl([Ll,Pl([9])]),e.onShiftTab),Ul(zl([cd,Pl([9])]),e.onTab),Ul(Pl([38]),e.onUp),Ul(Pl([40]),e.onDown),Ul(Pl([37]),e.onLeft),Ul(Pl([39]),e.onRight),Ul(Pl([32]),e.onSpace),Ul(Pl([27]),e.onEscape)]},function(n,t,e){return e.stopSpaceKeyup?[Ul(Pl([32]),dd)]:[]},function(n){return n.focusIn}),og=wm.schema(),rg=Sm.schema(),ig=Lm.schema(),ug=Hm.schema(),ag=Jm.schema(),cg=km.schema(),sg=ng.schema(),fg=eg.schema(),lg=xa({branchKey:"mode",branches:/* */Object.freeze({acyclic:og,cyclic:rg,flow:ig,flatgrid:ug,matrix:ag,execution:cg,menu:sg,special:fg}),name:"keying",active:{events:function(n,t){return n.handler.toEvents(n,t)}},apis:{focusIn:function(t,e,o){e.sendFocusIn(e).fold(function(){t.getSystem().triggerFocus(t.element(),t.element())},function(n){n(t,e,o)})},setGridSize:function(n,t,e,o,r){$(e,"setGridSize")?e.setGridSize(o,r):v.console.error("Layout does not support setGridSize")}},state:Om}),dg=function(n,t){return n.components()},mg=ya({fields:[],name:"replacing",apis:/* */Object.freeze({append:function(n,t,e,o){Xd(n,0,Hi,o)},prepend:function(n,t,e,o){Xd(n,0,Mo,o)},remove:Yd,replaceAt:qd,replaceBy:function(t,n,e,o,r){var i=dg(t);return T(i,o).bind(function(n){return qd(t,0,0,n,r)})},set:function(t,n,e,o){ka(function(){var n=S(o,t.getSystem().build);ps(t,n)},t.element())},contents:dg})}),gg=/* */Object.freeze({focus:Jd,blur:function(n,t){t.ignore||function(n){n.dom().blur()}(n.element())},isFocused:function(n){return function(n){var t=Co(n).dom();return n.dom()===t.activeElement}(n.element())}}),pg=/* */Object.freeze({exhibit:function(n,t){var e=t.ignore?{}:{attributes:{tabindex:"-1"}};return Zo(e)},events:function(e){return co([lo(ci(),function(n,t){Jd(n,e),t.stop()})].concat(e.stopMousedown?[lo(Yr(),function(n,t){t.event().prevent()})]:[]))}}),hg=[qu("onFocus"),St("stopMousedown",!1),St("ignore",!1)],vg=ya({fields:hg,name:"focusing",active:pg,apis:gg}),bg=function(n,t,e,o){(o?nm:tm)(n,t,e)},yg=/* */Object.freeze({onLoad:em,toggle:Zd,isOn:function(n,t,e){return e.get()},on:nm,off:tm,set:bg}),xg=/* */Object.freeze({exhibit:function(n,t,e){return Zo({})},events:function(n,t){var e=function(t,e,o){return Ni(function(n){o(n,t,e)})}(n,t,Zd),o=ga(n,t,em);return co(H([n.toggleOnExecute?[e]:[],[o]]))}}),wg=function(n,t,e){Po(n.element(),"aria-expanded",e)},Sg=[St("selected",!1),ht("toggleClass"),St("toggleOnExecute",!0),Ct("aria",{mode:"none"},it("mode",{pressed:[St("syncWithExpanded",!1),Qu("update",function(n,t,e){Po(n.element(),"aria-pressed",e),t.syncWithExpanded&&wg(n,t,e)})],checked:[Qu("update",function(n,t,e){Po(n.element(),"aria-checked",e)})],expanded:[Qu("update",wg)],selected:[Qu("update",function(n,t,e){Po(n.element(),"aria-selected",e)})],none:[Qu("update",Z)]}))],Cg=ya({fields:Sg,name:"toggling",active:xg,apis:yg,state:(xm=!1,{init:function(){var t=ye(xm);return{get:function(){return t.get()},set:function(n){return t.set(n)},clear:function(){return t.set(xm)},readState:function(){return t.get()}}}})}),kg="alloy.item-hover",Og="alloy.item-focus",Eg=nn(kg),Tg=nn(Og),Bg=[ct("data"),ct("components"),ct("dom"),St("hasSubmenu",!1),ht("toggling"),nl("itemBehaviours",[Cg,vg,lg,Zf]),St("ignoreFocus",!1),St("domModification",{}),Qu("builder",function(n){return{dom:n.dom,domModification:N(N({},n.domModification),{attributes:N(N(N({role:n.toggling.isSome()?"menuitemcheckbox":"menuitem"},n.domModification.attributes),{"aria-haspopup":n.hasSubmenu}),n.hasSubmenu?{"aria-expanded":!1}:{})}),behaviours:tl(n.itemBehaviours,[n.toggling.fold(Cg.revoke,function(n){return Cg.config(N({aria:{mode:"checked"}},n))}),vg.config({ignore:n.ignoreFocus,stopMousedown:n.ignoreFocus,onFocus:function(n){um(n)}}),lg.config({mode:"execution"}),Zf.config({store:{mode:"memory",initialValue:n.data}}),Kd("item-type-events",g(om(),[lo($r(),im),lo(mi(),vg.focus)]))]),components:n.components,eventOrder:n.eventOrder}}),St("eventOrder",{})],Dg=[ct("dom"),ct("components"),Qu("builder",function(n){return{dom:n.dom,components:n.components,events:co([function(n){return lo(n,function(n,t){t.stop()})}(mi())])}})],Ag=nn([xl({name:"widget",overrides:function(t){return{behaviours:ba([Zf.config({store:{mode:"manual",getValue:function(n){return t.data},setValue:function(){}}})])}}})]),_g=[ct("uid"),ct("data"),ct("components"),ct("dom"),St("autofocus",!1),St("ignoreFocus",!1),nl("widgetBehaviours",[Zf,vg,lg]),St("domModification",{}),tf(Ag()),Qu("builder",function(e){function o(n){return qs(n,e,"widget").map(function(n){return lg.focusIn(n),n})}function n(n,t){return _l(t.event().target())||e.autofocus&&t.setSource(n.element()),on.none()}var t=Xs(0,e,Ag()),r=Ys("item-widget",e,t.internals());return{dom:e.dom,components:r,domModification:e.domModification,events:co([Ni(function(n,t){o(n).each(function(n){t.stop()})}),lo($r(),im),lo(mi(),function(n,t){e.autofocus?o(n):vg.focus(n)})]),behaviours:tl(e.widgetBehaviours,[Zf.config({store:{mode:"memory",initialValue:e.data}}),vg.config({ignore:e.ignoreFocus,onFocus:function(n){um(n)}}),lg.config({mode:"special",focusIn:e.autofocus?function(n){o(n)}:cc(),onLeft:n,onRight:n,onEscape:function(n,t){return vg.isFocused(n)||e.autofocus?(e.autofocus&&t.setSource(n.element()),on.none()):(vg.focus(n),on.some(!0))}})])}})],Mg=it("type",{widget:_g,item:Bg,separator:Dg}),Fg=nn([Cl({factory:{sketch:function(n){var t=ot("menu.spec item",Mg,n);return t.builder(t)}},name:"items",unit:"item",defaults:function(n,t){return t.hasOwnProperty("uid")?t:N(N({},t),{uid:Yo("item")})},overrides:function(n,t){return{type:t.type,ignoreFocus:n.fakeFocus,domModification:{classes:[n.markers.item]}}}})]),Ig=nn([ct("value"),ct("items"),ct("dom"),ct("components"),St("eventOrder",{}),Fs("menuBehaviours",[ad,Zf,Zl,lg]),Ct("movement",{mode:"menu",moveOnTab:!0},it("mode",{grid:[Xa(),Qu("config",function(n,t){return{mode:"flatgrid",selector:"."+n.markers.item,initSize:{numColumns:t.initSize.numColumns,numRows:t.initSize.numRows},focusManager:n.focusManager}})],matrix:[Qu("config",function(n,t){return{mode:"matrix",selectors:{row:t.rowSelector,cell:"."+n.markers.item},focusManager:n.focusManager}}),ct("rowSelector")],menu:[St("moveOnTab",!0),Qu("config",function(n,t){return{mode:"menu",selector:"."+n.markers.item,moveOnTab:t.moveOnTab,focusManager:n.focusManager}})]})),st("markers",Wa()),St("fakeFocus",!1),St("focusManager",Gl()),qu("onHighlight")]),Rg=nn("alloy.menu-focus"),Vg=Al({name:"Menu",configFields:Ig(),partFields:Fg(),factory:function(n,t,e,o){return{uid:n.uid,dom:n.dom,markers:n.markers,behaviours:Rs(n.menuBehaviours,[ad.config({highlightClass:n.markers.selectedItem,itemClass:n.markers.item,onHighlight:n.onHighlight}),Zf.config({store:{mode:"memory",initialValue:n.value}}),Zl.config({find:on.some}),lg.config(n.movement.config(n,n.movement))]),events:co([lo(Tg(),function(t,e){var n=e.event();t.getSystem().getByDom(n.target()).each(function(n){ad.highlight(t,n),e.stop(),ro(t,Rg(),{menu:t,item:n})})}),lo(Eg(),function(n,t){var e=t.event().item();ad.highlight(n,e)})]),components:t,eventOrder:n.eventOrder,domModification:{attributes:{role:"menu"}}}}}),Ng=function(e,o,r,n){return Nn(r,n).bind(function(n){return Nn(e,n).bind(function(n){var t=Ng(e,o,r,n);return on.some([n].concat(t))})}).getOr([])},Hg=function(n){return"prepared"===n.type?on.some(n.menu):on.none()},Pg={init:function(){function r(n,e,o){return f(n).bind(function(t){return function(e){return I(i.get(),function(n,t){return n===e})}(n).bind(function(n){return e(n).map(function(n){return{triggeredMenu:t,triggeringItem:n,triggeringPath:o}})})})}var i=ye({}),u=ye({}),a=ye({}),c=ye(on.none()),s=ye({}),f=function(n){return t(n).bind(Hg)},t=function(n){return Nn(u.get(),n)},e=function(n){return Nn(i.get(),n)};return{setMenuBuilt:function(n,t){var e;u.set(N(N({},u.get()),((e={})[n]={type:"prepared",menu:t},e)))},setContents:function(n,t,e,o){c.set(on.some(n)),i.set(e),u.set(t),s.set(o);var r=am(o,e);a.set(r)},expand:function(e){return Nn(i.get(),e).map(function(n){var t=Nn(a.get(),e).getOr([]);return[n].concat(t)})},refresh:function(n){return Nn(a.get(),n)},collapse:function(n){return Nn(a.get(),n).bind(function(n){return 1<n.length?on.some(n.slice(1)):on.none()})},lookupMenu:t,lookupItem:e,otherMenus:function(n){var t=s.get();return _(wn(t),n)},getPrimary:function(){return c.get().bind(f)},getMenus:function(){return u.get()},clear:function(){i.set({}),u.set({}),a.set({}),c.set(on.none())},isClear:function(){return c.get().isNone()},getTriggeringPath:function(n,o){var t=C(e(n).toArray(),function(n){return f(n).isSome()});return Nn(a.get(),n).bind(function(n){var e=A(t.concat(n));return function(n){for(var t=[],e=0;e<n.length;e++){var o=n[e];if(!o.isSome())return on.none();t.push(o.getOrDie())}return on.some(t)}(B(e,function(n,t){return r(n,o,e.slice(0,t+1)).fold(function(){return c.get().is(n)?[]:[on.none()]},function(n){return[on.some(n)]})}))})}}},extractPreparedMenu:Hg},zg=nn("collapse-item"),Lg=Dl({name:"TieredMenu",configFields:[$u("onExecute"),$u("onEscape"),Ju("onOpenMenu"),Ju("onOpenSubmenu"),Ju("onRepositionMenu"),qu("onCollapseMenu"),St("highlightImmediately",!0),mt("data",[ct("primary"),ct("menus"),ct("expansions")]),St("fakeFocus",!1),qu("onHighlight"),qu("onHover"),Gu(),ct("dom"),St("navigateOnHover",!0),St("stayInDom",!1),Fs("tmenuBehaviours",[lg,ad,Zl,mg]),St("eventOrder",{})],apis:{collapseMenu:function(n,t){n.collapseMenu(t)},highlightPrimary:function(n,t){n.highlightPrimary(t)},repositionMenus:function(n,t){n.repositionMenus(t)}},factory:function(a,n){function e(n){var t=function(o,r,n){return P(n,function(n,t){function e(){return Vg.sketch(N(N({dom:n.dom},n),{value:t,items:n.items,markers:a.markers,fakeFocus:a.fakeFocus,onHighlight:a.onHighlight,focusManager:a.fakeFocus?Xl():Gl()}))}return t===r?{type:"prepared",menu:o.getSystem().build(e())}:{type:"notbuilt",nbMenu:e}})}(n,a.data.primary,a.data.menus),e=o();return g.setContents(a.data.primary,t,a.data.expansions,e),g.getPrimary()}function c(n){return Zf.getValue(n).value}function u(t,n){ad.highlight(t,n),ad.getHighlighted(n).orThunk(function(){return ad.getFirst(n)}).each(function(n){uo(t,n.element(),mi())})}function s(t,n){return Bu(S(n,function(n){return t.lookupMenu(n).bind(function(n){return"prepared"===n.type?on.some(n.menu):on.none()})}))}function f(t,n,e){var o=s(n,n.otherMenus(e));bn(o,function(n){pr(n.element(),[a.markers.backgroundMenu]),a.stayInDom||mg.remove(t,n)})}function l(n,o){var t=function(o){return r.get().getOrThunk(function(){var e={},n=zc(o.element(),"."+a.markers.item),t=C(n,function(n){return"true"===zo(n,"aria-haspopup")});return bn(t,function(n){o.getSystem().getByDom(n).each(function(n){var t=c(n);e[t]=n})}),r.set(on.some(e)),e})}(n);Cn(t,function(n,t){var e=vn(o,t);Po(n.element(),"aria-expanded",e)})}function d(o,r,i){return on.from(i[0]).bind(function(n){return r.lookupMenu(n).bind(function(n){if("notbuilt"===n.type)return on.none();var t=n.menu,e=s(r,i.slice(1));return bn(e,function(n){fr(n.element(),a.markers.backgroundMenu)}),$e(t.element())||mg.append(o,au(t)),pr(t.element(),[a.markers.backgroundMenu]),u(o,t),f(o,r,i),on.some(t)})})}var m,t,r=ye(on.none()),g=Pg.init(),o=function(n){return P(a.data.menus,function(n,t){return B(n.items,function(n){return"separator"===n.type?[]:[n.data.value]})})};(t=m=m||{})[t.HighlightSubmenu=0]="HighlightSubmenu",t[t.HighlightParent=1]="HighlightParent";function i(r,i,u){void 0===u&&(u=m.HighlightSubmenu);var n=c(i);return g.expand(n).bind(function(o){return l(r,o),on.from(o[0]).bind(function(e){return g.lookupMenu(e).bind(function(n){var t=function(n,t,e){if("notbuilt"!==e.type)return e.menu;var o=n.getSystem().build(e.nbMenu());return g.setMenuBuilt(t,o),o}(r,e,n);return $e(t.element())||mg.append(r,au(t)),a.onOpenSubmenu(r,i,t,A(o)),u===m.HighlightSubmenu?(ad.highlightFirst(t),d(r,g,o)):(ad.dehighlightAll(t),on.some(i))})})})}function p(t,e){var n=c(e);return g.collapse(n).bind(function(n){return l(t,n),d(t,g,n).map(function(n){return a.onCollapseMenu(t,e,n),n})})}function h(e){return function(t,n){return Ou(n.getSource(),"."+a.markers.item).bind(function(n){return t.getSystem().getByDom(n).toOption().bind(function(n){return e(t,n).map(function(){return!0})})})}}function v(n){return ad.getHighlighted(n).bind(ad.getHighlighted)}var b=co([lo(Rg(),function(e,o){var n=o.event().item();g.lookupItem(c(n)).each(function(){var n=o.event().menu();ad.highlight(e,n);var t=c(o.event().item());g.refresh(t).each(function(n){return f(e,g,n)})})}),Ni(function(t,n){var e=n.event().target();t.getSystem().getByDom(e).each(function(n){0===c(n).indexOf("collapse-item")&&p(t,n),i(t,n,m.HighlightSubmenu).fold(function(){a.onExecute(t,n)},function(){})})}),Ii(function(t,n){e(t).each(function(n){mg.append(t,au(n)),a.onOpenMenu(t,n),a.highlightImmediately&&u(t,n)})})].concat(a.navigateOnHover?[lo(Eg(),function(n,t){var e=t.event().item();!function(t,n){var e=c(n);g.refresh(e).bind(function(n){return l(t,n),d(t,g,n)})}(n,e),i(n,e,m.HighlightParent),a.onHover(n,e)})]:[])),y={collapseMenu:function(t){v(t).each(function(n){p(t,n)})},highlightPrimary:function(t){g.getPrimary().each(function(n){u(t,n)})},repositionMenus:function(o){g.getPrimary().bind(function(t){return v(o).bind(function(n){var t=c(n),e=R(g.getMenus()),o=Bu(S(e,Pg.extractPreparedMenu));return g.getTriggeringPath(t,function(n){return function(n,t,e){return Du(t,function(n){if(!n.getSystem().isConnected())return on.none();var t=ad.getCandidates(n);return E(t,function(n){return c(n)===e})})}(0,o,n)})}).map(function(n){return{primary:t,triggeringPath:n}})}).fold(function(){(function(n){return on.from(n.components()[0]).filter(function(n){return"menu"===zo(n.element(),"role")})})(o).each(function(n){a.onRepositionMenu(o,n,[])})},function(n){var t=n.primary,e=n.triggeringPath;a.onRepositionMenu(o,t,e)})}};return{uid:a.uid,dom:a.dom,markers:a.markers,behaviours:Rs(a.tmenuBehaviours,[lg.config({mode:"special",onRight:h(function(n,t){return _l(t.element())?on.none():i(n,t,m.HighlightSubmenu)}),onLeft:h(function(n,t){return _l(t.element())?on.none():p(n,t)}),onEscape:h(function(n,t){return p(n,t).orThunk(function(){return a.onEscape(n,t).map(function(){return n})})}),focusIn:function(t,n){g.getPrimary().each(function(n){uo(t,n.element(),mi())})}}),ad.config({highlightClass:a.markers.selectedMenu,itemClass:a.markers.menu}),Zl.config({find:function(n){return ad.getHighlighted(n)}}),mg.config({})]),eventOrder:a.eventOrder,apis:y,events:b}},extraApis:{tieredData:function(n,t,e){return{primary:n,menus:t,expansions:e}},singleData:function(n,t){return{primary:n,menus:q(n,t),expansions:{}}},collapseItem:function(n){return{value:Xo(zg()),meta:{text:n}}}}}),jg=Dl({name:"InlineView",configFields:[ct("lazySink"),qu("onShow"),qu("onHide"),xt("onEscape"),Fs("inlineBehaviours",[zf,Zf,lc]),wt("fireDismissalEventInstead",[St("event",Oi())]),wt("fireRepositionEventInstead",[St("event",Ei())]),St("getRelated",on.none),St("eventOrder",on.none)],factory:function(i,n){function t(e){zf.isOpen(e)&&Zf.getValue(e).each(function(n){switch(n.mode){case"menu":zf.getState(e).each(function(n){Lg.repositionMenus(n)});break;case"position":var t=i.lazySink(e).getOrDie();Af.positionWithinBounds(t,n.anchor,e,n.getBounds())}})}var o=function(n,t,e,o){r(n,t,e,function(){return o.map(function(n){return xu(n)})})},r=function(n,t,e,o){var r=i.lazySink(n).getOrDie();zf.openWhileCloaked(n,e,function(){return Af.positionWithinBounds(r,t,n,o())}),Zf.setValue(n,on.some({mode:"position",anchor:t,getBounds:o}))},u=function(n,t,e,o){var r=function(n,t,r,e,i){function u(){return n.lazySink(t)}function a(n){return function(n){return 2===n.length}(n)?o:{}}var o="horizontal"===e.type?{layouts:{onLtr:function(){return da()},onRtl:function(){return ma()}}}:{};return Lg.sketch({dom:{tag:"div"},data:e.data,markers:e.menu.markers,onEscape:function(){return zf.close(t),n.onEscape.map(function(n){return n(t)}),on.some(!0)},onExecute:function(){return on.some(!0)},onOpenMenu:function(n,t){Af.positionWithinBounds(u().getOrDie(),r,t,i())},onOpenSubmenu:function(n,t,e,o){var r=u().getOrDie();Af.position(r,N({anchor:"submenu",item:t},a(o)),e)},onRepositionMenu:function(n,t,e){var o=u().getOrDie();Af.positionWithinBounds(o,r,t,i()),bn(e,function(n){var t=a(n.triggeringPath);Af.position(o,N({anchor:"submenu",item:n.triggeringItem},t),n.triggeredMenu)})}})}(i,n,t,e,o);zf.open(n,r),Zf.setValue(n,on.some({mode:"menu",menu:r}))},e={setContent:function(n,t){zf.setContent(n,t)},showAt:function(n,t,e){o(n,t,e,on.none())},showWithin:o,showWithinBounds:r,showMenuAt:function(n,t,e){u(n,t,e,function(){return on.none()})},showMenuWithinBounds:u,hide:function(n){Zf.setValue(n,on.none()),zf.close(n)},getContent:function(n){return zf.getState(n)},reposition:t,isOpen:zf.isOpen};return{uid:i.uid,dom:i.dom,behaviours:Rs(i.inlineBehaviours,[zf.config({isPartOf:function(n,t,e){return Lu(t,e)||function(n,t){return i.getRelated(n).exists(function(n){return Lu(n,t)})}(n,e)},getAttachPoint:function(n){return i.lazySink(n).getOrDie()},onOpen:function(n){i.onShow(n)},onClose:function(n){i.onHide(n)}}),Zf.config({store:{mode:"memory",initialValue:on.none()}}),lc.config({channels:N(N({},Es(N({isExtraPart:nn(!1)},i.fireDismissalEventInstead.map(function(n){return{fireEventInstead:{event:n.event}}}).getOr({})))),Ts(N(N({isExtraPart:nn(!1)},i.fireRepositionEventInstead.map(function(n){return{fireEventInstead:{event:n.event}}}).getOr({})),{doReposition:t})))})]),eventOrder:i.eventOrder,apis:e}},apis:{showAt:function(n,t,e,o){n.showAt(t,e,o)},showWithin:function(n,t,e,o,r){n.showWithin(t,e,o,r)},showWithinBounds:function(n,t,e,o,r){n.showWithinBounds(t,e,o,r)},showMenuAt:function(n,t,e,o){n.showMenuAt(t,e,o)},showMenuWithinBounds:function(n,t,e,o,r){n.showMenuWithinBounds(t,e,o,r)},hide:function(n,t){n.hide(t)},isOpen:function(n,t){return n.isOpen(t)},getContent:function(n,t){return n.getContent(t)},setContent:function(n,t,e){n.setContent(t,e)},reposition:function(n,t){n.reposition(t)}}}),Ug=function(n,t,e){return Ya(sm(n,t),lm(n),e.innerNorth(),nc(),"layout-n")},Wg=function(n,t,e){return Ya(sm(n,t),dm(n,t),e.innerSouth(),Za(),"layout-s")},Gg=Dl({name:"Button",factory:function(n){function e(t){return Nn(n.dom,"attributes").bind(function(n){return Nn(n,t)})}var t=rm(n.action),o=n.dom.tag;return{uid:n.uid,dom:n.dom,components:n.components,events:t,behaviours:tl(n.buttonBehaviours,[vg.config({}),lg.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:function(){if("button"!==o)return{role:e("role").getOr("button")};var n=e("type").getOr("button"),t=e("role").map(function(n){return{role:n}}).getOr({});return N({type:n},t)}()},eventOrder:n.eventOrder}},configFields:[St("uid",undefined),ct("dom"),St("components",[]),nl("buttonBehaviours",[vg,lg]),ht("action"),ht("role"),St("eventOrder",{})]}),Xg={success:"checkmark",error:"warning",err:"error",warning:"warning",warn:"warning",info:"info"},Yg=Dl({name:"Notification",factory:function(t){function e(n){return{dom:{tag:"div",classes:["tox-bar"],attributes:{style:"width: "+n+"%"}}}}function o(n){return{dom:{tag:"div",classes:["tox-text"],innerHtml:n+"%"}}}var r=vm({dom:{tag:"p",innerHtml:t.translationProvider(t.text)},behaviours:ba([mg.config({})])}),i=vm({dom:{tag:"div",classes:t.progress?["tox-progress-bar","tox-progress-indicator"]:["tox-progress-bar"]},components:[{dom:{tag:"div",classes:["tox-bar-container"]},components:[e(0)]},o(0)],behaviours:ba([mg.config({})])}),n={updateProgress:function(n,t){n.getSystem().isConnected()&&i.getOpt(n).each(function(n){mg.set(n,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[e(t)]},o(t)])})},updateText:function(n,t){if(n.getSystem().isConnected()){var e=r.get(n);mg.set(e,[Ir(t)])}}},u=H([t.icon.toArray(),t.level.toArray(),t.level.bind(function(n){return on.from(Xg[n])}).toArray()]);return{uid:t.uid,dom:{tag:"div",attributes:{role:"alert"},classes:t.level.map(function(n){return["tox-notification","tox-notification--in","tox-notification--"+n]}).getOr(["tox-notification","tox-notification--in"])},components:[{dom:{tag:"div",classes:["tox-notification__icon"],innerHtml:function(n,t){return Du(n,function(n){return on.from(t()[n])}).getOrThunk(function(){return bm(t)})}(u,t.iconProvider)}},{dom:{tag:"div",classes:["tox-notification__body"]},components:[r.asSpec()],behaviours:ba([mg.config({})])}].concat(t.progress?[i.asSpec()]:[]).concat(Gg.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"]},components:[{dom:{tag:"div",classes:["tox-icon"],innerHtml:ym("close",t.iconProvider),attributes:{"aria-label":t.translationProvider("Close")}}}],action:function(n){t.onAction(n)}})),apis:n}},configFields:[ht("level"),ct("progress"),ct("icon"),ct("onAction"),ct("text"),ct("iconProvider"),ct("translationProvider")],apis:{updateProgress:function(n,t,e){n.updateProgress(t,e)},updateText:function(n,t,e){n.updateText(t,e)}}}),qg=tinymce.util.Tools.resolve("tinymce.util.Delay");function Kg(n,u,o){var a=u.backstage;return{open:function(n,t){function e(){t(),jg.hide(i)}var r=uu(Yg.sketch({text:n.text,level:vn(["success","error","warning","warn","info"],n.type)?n.type:undefined,progress:!0===n.progressBar,icon:on.from(n.icon),onAction:e,iconProvider:a.shared.providers.icons,translationProvider:a.shared.providers.translate})),i=uu(jg.sketch({dom:{tag:"div",classes:["tox-notifications-container"]},lazySink:u.backstage.shared.getSink,fireDismissalEventInstead:{}}));return o.add(i),0<n.timeout&&qg.setTimeout(function(){e()},n.timeout),{close:e,moveTo:function(n,t){jg.showAt(i,{anchor:"makeshift",x:n,y:t},au(r))},moveRel:function(n,t){if("banner"!==t){var e=function(n){switch(n){case"bc-bc":return Wg;case"tc-tc":return Ug;case"tc-bc":return oc;case"bc-tc":default:return rc}}(t),o={anchor:"node",root:zr(),node:on.some(we.fromDom(n)),layouts:{onRtl:function(){return[e]},onLtr:function(){return[e]}}};jg.showAt(i,o,au(r))}else jg.showAt(i,u.backstage.shared.anchors.banner(),au(r))},text:function(n){Yg.updateText(r,n)},settings:n,getEl:function(){return r.element().dom()},progressBar:{value:function(n){Yg.updateProgress(r,n)}}}},close:function(n){n.close()},reposition:function(n){!function(n){bn(n,function(n){return n.moveTo(0,0)})}(n),function(e){0<e.length&&(yn(e).each(function(n){return n.moveRel(null,"banner")}),bn(e,function(n,t){0<t&&n.moveRel(e[t-1].getEl(),"bc-tc")}))}(n)},getArgs:function(n){return n.settings}}}function Jg(e,o){var r=null;return{cancel:function(){null!==r&&(v.clearTimeout(r),r=null)},throttle:function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];null!==r&&v.clearTimeout(r),r=v.setTimeout(function(){e.apply(null,n),r=null},o)}}}function $g(n,t,e,o,r){var i=new Ap(t,r||n.getRoot());return Fp(n,t,on.some(e),o,i.prev,on.none())}function Qg(t,e){return Ip(we.fromDom(t.selection.getNode())).getOrThunk(function(){var n=we.fromHtml('<span data-mce-autocompleter="1" data-mce-bogus="1"></span>',t.getDoc());return Hi(n,we.fromDom(e.extractContents())),e.insertNode(n.dom()),Eo(n).each(function(n){return n.dom().normalize()}),Ic(n).map(function(n){t.selection.setCursorLocation(n.dom(),function(n){return"img"===Ke(n)?1:Ac(n).fold(function(){return Bo(n).length},function(n){return n.length})}(n))}),n})}function Zg(n,t){return n.toString().substring(t.length).replace(/\u00A0/g," ").replace(/\uFEFF/g,"")}function np(n,u,a,c){return void 0===c&&(c=0),function(n){return n.collapsed&&3===n.startContainer.nodeType}(u)?$g(n,u.startContainer,u.startOffset,function(e,o,r,n){var i=n.getOr(r.length);return function(n,t,e,o){var r;for(r=t-1;0<=r;r--){var i=n.charAt(r);if(Rp.test(i))return on.none();if(i===e)break}return-1===r||t-r<o?on.none():on.some(n.substring(r+1,t))}(r,i,a,1).fold(function(){return r.match(Rp)?e.abort():e.kontinue()},function(n){var t=u.cloneRange();return t.setStart(o,i-n.length-1),t.setEnd(u.endContainer,u.endOffset),r.length<c?e.abort():e.finish({text:Zg(t,a),range:t,triggerChar:a})})}).fold(on.none,on.none,on.some):on.none()}function tp(e,n,o,t){return void 0===t&&(t=0),Ip(we.fromDom(n.startContainer)).fold(function(){return np(e,n,o,t)},function(n){var t=e.createRng();return t.selectNode(n.dom()),on.some({range:t,text:Zg(t,o),triggerChar:o})})}function ep(n,t){return{element:n,offset:t}}function op(t,e){var n=e(),o=t.selection.getRng();return function(t,e,n){return Du(n.triggerChars,function(n){return tp(t,e,n)})}(t.dom,o,n).bind(function(n){return zp(t,e,n)})}function rp(n){var t=n.ui.registry.getAll().popups,e=P(t,function(n){return function(n){return tt("Autocompleter",Up,n)}(n).fold(function(n){throw new Error(le(n))},function(n){return n})}),o=function(n){var t={};return bn(n,function(n){t[n]={}}),wn(t)}(On(e,function(n){return n.ch})),r=R(e);return{dataset:e,triggerChars:o,lookupByChar:function(t){return C(r,function(n){return n.ch===t})}}}function ip(n,o,t){var r=zc(n.element(),"."+t);if(0<r.length){var e=T(r,function(n){var t=n.dom().getBoundingClientRect().top,e=r[0].dom().getBoundingClientRect().top;return Math.abs(t-e)>o}).getOr(r.length);return on.some({numColumns:e,numRows:Math.ceil(r.length/e)})}return on.none()}function up(n,t){return ba([Kd(n,t)])}function ap(n,t,e){n.getSystem().broadcastOn([Zp],{})}function cp(n){var t=we.fromHtml(n),e=Bo(t),o=function(n){var t=n.dom().attributes!==undefined?n.dom().attributes:[];return O(t,function(n,t){var e;return"class"===t.name?n:N(N({},n),((e={})[t.name]=t.value,e))},{})}(t),r=function(n){return Array.prototype.slice.call(n.dom().classList,0)}(t),i=0===e.length?{}:{innerHtml:Vo(t)};return N({tag:Ke(t),classes:r,attributes:o},i)}function sp(n){return Nn(ch,n).getOr(ih)}function fp(n){return{dom:{tag:"div",classes:[fh],innerHtml:n}}}function lp(n){return{dom:{tag:"div",classes:[lh]},components:[Ir(rh.translate(n))]}}function dp(n,t){return{dom:{tag:"div",classes:[lh]},components:[{dom:{tag:n.tag,attributes:{style:n.styleAttr}},components:[Ir(rh.translate(t))]}]}}function mp(n){return{dom:{tag:"div",classes:["tox-collection__item-accessory"],innerHtml:ph(n)}}}function gp(n){return{dom:{tag:"div",classes:[fh,"tox-collection__item-checkmark"],innerHtml:ym("checkmark",n)}}}function pp(n,t,e,o,r){var i=e?n.checkMark.orThunk(function(){return t.or(on.some("")).map(fp)}):on.none(),u=n.ariaLabel.map(function(n){return{attributes:{title:rh.translate(n)}}}).getOr({});return{dom:An({tag:"div",classes:[ih,uh].concat(r?["tox-collection__item-icon-rtl"]:[])},u),optComponents:[i,n.htmlContent.fold(function(){return n.textContent.map(o)},function(n){return on.some(function(n){return{dom:{tag:"div",classes:[lh],innerHtml:n}}}(n))}),n.shortcutContent.map(mp),n.caret]}}function hp(n,t,e,o){void 0===o&&(o=on.none());var r=rh.isRtl()&&n.iconContent.exists(function(n){return vn(vh,n)}),i=n.iconContent.map(function(n){return rh.isRtl()&&vn(hh,n)?n+"-rtl":n}).map(function(n){return function(n,t,e){return on.from(t()[n]).or(e).getOrThunk(function(){return bm(t)})}(n,t.icons,o)}),u=on.from(n.meta).fold(function(){return lp},function(n){return En(n,"style")?d(dp,n.style):lp});return"color"===n.presets?function(n,t,e,o){var r,i,u;return{dom:(r=ah,i=e.getOr(""),u=n.map(function(n){return' title="'+o.translate(n)+'"'}).getOr(""),cp("custom"===t?'<button class="'+r+' tox-swatches__picker-btn"'+u+">"+i+"</button>":"remove"===t?'<div class="'+r+' tox-swatch--remove"'+u+">"+i+"</div>":'<div class="'+r+'" style="background-color: '+t+'" data-mce-color="'+t+'"'+u+"></div>")),optComponents:[]}}(n.ariaLabel,n.value,i,t):pp(n,i,e,u,r)}function vp(n,t,e){t.disabled&&yh(n,t)}function bp(n,t){return!0===t.useNative&&vn(bh,Ke(n.element()))}function yp(n){Po(n.element(),"disabled","disabled")}function xp(n){jo(n.element(),"disabled")}function wp(n){Po(n.element(),"aria-disabled","true")}function Sp(n){Po(n.element(),"aria-disabled","false")}function Cp(t,n,e){n.disableClass.each(function(n){dr(t.element(),n)}),(bp(t,n)?xp:Sp)(t),n.onEnabled(t)}function kp(n,t){return bp(n,t)?function(n){return Lo(n.element(),"disabled")}(n):function(n){return"true"===zo(n.element(),"aria-disabled")}(n)}function Op(n,t){var e=n.getApi(t);return function(n){n(e)}}function Ep(e,o){return Ii(function(n){Op(e,n)(function(n){var t=e.onSetup(n);null!==t&&t!==undefined&&o.set(t)})})}function Tp(t,e){return Ri(function(n){return Op(t,n)(e.get())})}var Bp,Dp,Ap=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),_p=Tn([{aborted:[]},{edge:["element"]},{success:["info"]}]),Mp=Tn([{abort:[]},{kontinue:[]},{finish:["info"]}]),Fp=function(t,e,n,o,r,i){function u(){return i.fold(_p.aborted,_p.edge)}function a(){var n=r();return n?Fp(t,n,on.none(),o,r,on.some(e)):u()}if(function(n,t){return n.isBlock(t)||vn(["BR","IMG","HR","INPUT"],t.nodeName)||"false"===n.getContentEditable(t)}(t,e))return u();if(function(n){return n.nodeType===v.Node.TEXT_NODE}(e)){var c=e.textContent;return o(Mp,e,c,n).fold(_p.aborted,function(){return a()},_p.success)}return a()},Ip=function(n){return Ou(n,"[data-mce-autocompleter]")},Rp=/[\u00a0 \t\r\n]/,Vp=function(e,n){n.on("keypress compositionend",e.onKeypress.throttle),n.on("remove",e.onKeypress.cancel);function o(n,t){ro(n,ni(),{raw:t})}n.on("keydown",function(t){function n(){return e.getView().bind(ad.getHighlighted)}8===t.which&&e.onKeypress.throttle(t),e.isActive()&&(27===t.which&&e.cancelIfNecessary(),e.isMenuOpen()?13===t.which?(n().each(io),t.preventDefault()):40===t.which?(n().fold(function(){e.getView().each(ad.highlightFirst)},function(n){o(n,t)}),t.preventDefault(),t.stopImmediatePropagation()):37!==t.which&&38!==t.which&&39!==t.which||n().each(function(n){o(n,t),t.preventDefault(),t.stopImmediatePropagation()}):13!==t.which&&38!==t.which&&40!==t.which||e.cancelIfNecessary())}),n.on("NodeChange",function(n){e.isActive()&&!e.isProcessingAction()&&Ip(we.fromDom(n.element)).isNone()&&e.cancelIfNecessary()})},Np=tinymce.util.Tools.resolve("tinymce.util.Promise"),Hp=function(n){if(function(n){return n.nodeType===v.Node.TEXT_NODE}(n))return ep(n,n.data.length);var t=n.childNodes;return 0<t.length?Hp(t[t.length-1]):ep(n,t.length)},Pp=function(n,t){var e=n.childNodes;return 0<e.length&&t<e.length?Pp(e[t],0):0<e.length&&function(n){return n.nodeType===v.Node.ELEMENT_NODE}(n)&&e.length===t?Hp(e[e.length-1]):ep(n,t)},zp=function(t,n,e,o){void 0===o&&(o={});var r=n(),i=t.selection.getRng().startContainer.nodeValue,u=C(r.lookupByChar(e.triggerChar),function(n){return e.text.length>=n.minChars&&n.matches.getOrThunk(function(){return function(e){function o(n,t,e,o){var r=o.getOr(e.length);return 0===r?n.kontinue():n.finish(/\s/.test(e.charAt(r-1)))}return function(n){var t=Pp(n.startContainer,n.startOffset);return $g(e,t.element,t.offset,o).fold(nn(!0),nn(!0),l)}}(t.dom)})(e.range,i,e.text)});if(0===u.length)return on.none();var a=Np.all(S(u,function(t){return t.fetch(e.text,t.maxResults,o).then(function(n){return{matchText:e.text,items:n,columns:t.columns,onAction:t.onAction}})}));return on.some({lookupData:a,context:e})},Lp=re([ft("type"),yt("text")]),jp=re([At("type",function(){return"autocompleteitem"}),At("active",function(){return!1}),At("disabled",function(){return!1}),St("meta",{}),ft("value"),yt("text"),yt("icon")]),Up=re([ft("type"),ft("ch"),kt("minChars",1),St("columns",1),kt("maxResults",10),xt("matches"),dt("fetch"),dt("onAction")]),Wp=[Tt("disabled",!1),yt("text"),yt("shortcut"),ce("value","value",In(function(){return Xo("menuitem-value")}),de()),St("meta",{})],Gp=re([ft("type"),Bt("onSetup",function(){return Z}),Bt("onAction",Z),yt("icon")].concat(Wp)),Xp=re([ft("type"),dt("getSubmenuItems"),Bt("onSetup",function(){return Z}),yt("icon")].concat(Wp)),Yp=re([ft("type"),Tt("active",!1),Bt("onSetup",function(){return Z}),dt("onAction")].concat(Wp)),qp=re([ft("type"),Tt("active",!1),yt("icon")].concat(Wp)),Kp=re([ft("type"),lt("fancytype",["inserttable","colorswatch"]),Bt("onAction",Z)]),Jp=function(n){return up(Xo("unnamed-events"),n)},$p=[ct("lazySink"),ct("tooltipDom"),St("exclusive",!0),St("tooltipComponents",[]),St("delay",300),Et("mode","normal",["normal","follow-highlight"]),St("anchor",function(n){return{anchor:"hotspot",hotspot:n,layouts:{onLtr:nn([rc,oc,ua,ca,aa,sa]),onRtl:nn([rc,oc,ua,ca,aa,sa])}}}),qu("onHide"),qu("onShow")],Qp=/* */Object.freeze({init:function(){function e(){o.get().each(function(n){v.clearTimeout(n)})}var o=ye(on.none()),t=ye(on.none()),n=nn("not-implemented");return nu({getTooltip:function(){return t.get()},isShowing:function(){return t.get().isSome()},setTooltip:function(n){t.set(on.some(n))},clearTooltip:function(){t.set(on.none())},clearTimer:e,resetTimer:function(n,t){e(),o.set(on.some(v.setTimeout(function(){n()},t)))},readState:n})}}),Zp=Xo("tooltip.exclusive"),nh=Xo("tooltip.show"),th=Xo("tooltip.hide"),eh=/* */Object.freeze({hideAllExclusive:ap,setComponents:function(n,t,e,o){e.getTooltip().each(function(n){n.getSystem().isConnected()&&mg.set(n,o)})}}),oh=ya({fields:$p,name:"tooltipping",active:/* */Object.freeze({events:function(o,r){function e(t){r.getTooltip().each(function(n){bs(n),o.onHide(t,n),r.clearTooltip()}),r.clearTimer()}return co(H([[lo(nh,function(n){r.resetTimer(function(){!function(t){if(!r.isShowing()){ap(t);var n=o.lazySink(t).getOrDie(),e=t.getSystem().build({dom:o.tooltipDom,components:o.tooltipComponents,events:co("normal"===o.mode?[lo($r(),function(n){oo(t,nh)}),lo(Kr(),function(n){oo(t,th)})]:[]),behaviours:ba([mg.config({})])});r.setTooltip(e),hs(n,e),o.onShow(t,e),Af.position(n,o.anchor(t),e)}}(n)},o.delay)}),lo(th,function(n){r.resetTimer(function(){e(n)},o.delay)}),lo(li(),function(n,t){vn(t.channels(),Zp)&&e(n)}),Ri(function(n){e(n)})],"normal"===o.mode?[lo(Qr(),function(n){oo(n,nh)}),lo(si(),function(n){oo(n,th)}),lo($r(),function(n){oo(n,nh)}),lo(Kr(),function(n){oo(n,th)})]:[lo(_i(),function(n,t){oo(n,nh)}),lo(Mi(),function(n){oo(n,th)})]]))}}),state:Qp,apis:eh}),rh=tinymce.util.Tools.resolve("tinymce.util.I18n"),ih="tox-menu-nav__js",uh="tox-collection__item",ah="tox-swatch",ch={normal:ih,color:ah},sh="tox-collection__item--enabled",fh="tox-collection__item-icon",lh="tox-collection__item-label",dh="tox-collection__item-caret",mh="tox-collection__item--active",gh=tinymce.util.Tools.resolve("tinymce.Env"),ph=function(n){var e=gh.mac?{alt:"&#x2325;",ctrl:"&#x2303;",shift:"&#x21E7;",meta:"&#x2318;",access:"&#x2303;&#x2325;"}:{meta:"Ctrl",access:"Shift+Alt"},t=n.split("+"),o=S(t,function(n){var t=n.toLowerCase().trim();return En(e,t)?e[t]:n});return gh.mac?o.join(""):o.join("+")},hh=["list-num-default","list-num-lower-alpha","list-num-lower-greek","list-num-lower-roman","list-num-upper-alpha","list-num-upper-roman"],vh=["list-bull-circle","list-bull-default","list-bull-square"],bh=["input","button","textarea","select"],yh=function(t,n,e){n.disableClass.each(function(n){fr(t.element(),n)}),(bp(t,n)?yp:wp)(t),n.onDisabled(t)},xh=/* */Object.freeze({enable:Cp,disable:yh,isDisabled:kp,onLoad:vp,set:function(n,t,e,o){(o?yh:Cp)(n,t,e)}}),wh=/* */Object.freeze({exhibit:function(n,t,e){return Zo({classes:t.disabled?t.disableClass.map(M).getOr([]):[]})},events:function(e,n){return co([so(di(),function(n,t){return kp(n,e)}),ga(e,n,vp)])}}),Sh=[St("disabled",!1),St("useNative",!0),ht("disableClass"),qu("onDisabled"),qu("onEnabled")],Ch=ya({fields:Sh,name:"disabling",active:wh,apis:xh}),kh=function(n){return Ch.config({disabled:n,disableClass:"tox-collection__item--state-disabled"})},Oh=function(n){return Ch.config({disabled:n})},Eh=function(n){return Ch.config({disabled:n,disableClass:"tox-tbtn--disabled"})},Th=function(n){return Ch.config({disabled:n,disableClass:"tox-tbtn--disabled",useNative:!1})};(Dp=Bp=Bp||{})[Dp.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",Dp[Dp.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX";function Bh(n){return B(n,function(n){return n.toArray()})}function Dh(n,t,e){var o=ye(Z);return{type:"item",dom:t.dom,components:Bh(t.optComponents),data:n.data,eventOrder:Ih,hasSubmenu:n.triggersSubmenu,itemBehaviours:ba([Kd("item-events",[function(e,o){return Ni(function(n,t){Op(e,n)(e.onAction),e.triggersSubmenu||o!==Fh.CLOSE_ON_EXECUTE||(oo(n,hi()),t.stop())})}(n,e),Ep(n,o),Tp(n,o)]),kh(n.disabled),mg.config({})].concat(n.itemBehaviours))}}function Ah(n){return{value:n.value,meta:An({text:n.text.getOr("")},n.meta)}}function _h(n,t){var e=function(n){return Rh.DOM.encode(n)}(rh.translate(n));if(0<t.length){var o=new RegExp(function(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(t),"gi");return e.replace(o,function(n){return'<span class="tox-autocompleter-highlight">'+n+"</span>"})}return e}function Mh(t,e,n){function o(n){return ro(n,Hh,{row:t,col:e})}function r(n,t){t.stop(),o(n)}var i;return uu({dom:{tag:"div",attributes:(i={role:"button"},i["aria-labelledby"]=n,i)},behaviours:ba([Kd("insert-table-picker-cell",[lo($r(),vg.focus),lo(di(),o),lo(ri(),r),lo(gi(),r)]),Cg.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),vg.config({onFocus:function(n){return ro(n,Nh,{row:t,col:e})}})])})}var Fh=Bp,Ih={"alloy.execute":["disabling","alloy.base.behaviour","toggling","item-events"]},Rh=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Vh=nn(js("item-widget",Ag())),Nh=Xo("cell-over"),Hh=Xo("cell-execute");function Ph(n){return{value:nn(n)}}function zh(n){return Jh.test(n)||$h.test(n)}function Lh(n){var t=function(n){var t=n.value().replace(Jh,function(n,t,e,o){return t+t+e+e+o+o});return{value:nn(t)}}(n),e=$h.exec(t.value());return null===e?["FFFFFF","FF","FF","FF"]:e}function jh(n){var t=n.toString(16);return 1===t.length?"0"+t:t}function Uh(n){var t=jh(n.red())+jh(n.green())+jh(n.blue());return Ph(t)}function Wh(n,t,e,o){return{red:nn(n),green:nn(t),blue:nn(e),alpha:nn(o)}}function Gh(n){var t=parseInt(n,10);return t.toString()===n&&0<=t&&t<=255}function Xh(n){var t,e,o,r=(n.hue()||0)%360,i=n.saturation()/100,u=n.value()/100;if(i=Zh(0,Qh(i,1)),u=Zh(0,Qh(u,1)),0===i)return t=e=o=nv(255*u),Wh(t,e,o,1);var a=r/60,c=u*i,s=c*(1-Math.abs(a%2-1)),f=u-c;switch(Math.floor(a)){case 0:t=c,e=s,o=0;break;case 1:t=s,e=c,o=0;break;case 2:t=0,e=c,o=s;break;case 3:t=0,e=s,o=c;break;case 4:t=s,e=0,o=c;break;case 5:t=c,e=0,o=s;break;default:t=e=o=0}return t=nv(255*(t+f)),e=nv(255*(e+f)),o=nv(255*(o+f)),Wh(t,e,o,1)}function Yh(n){var t=Lh(n),e=parseInt(t[1],16),o=parseInt(t[2],16),r=parseInt(t[3],16);return Wh(e,o,r,1)}function qh(n,t,e,o){var r=parseInt(n,10),i=parseInt(t,10),u=parseInt(e,10),a=parseFloat(o);return Wh(r,i,u,a)}function Kh(n){return"rgba("+n.red()+","+n.green()+","+n.blue()+","+n.alpha()+")"}var Jh=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,$h=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Qh=Math.min,Zh=Math.max,nv=Math.round,tv=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,ev=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,ov=nn(Wh(255,0,0,1)),rv=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),iv="tinymce-custom-colors";function uv(n){var t=[],u=v.document.createElement("canvas");u.height=1,u.width=1;for(var a=u.getContext("2d"),c=function(n,t){var e=t/255;return("0"+Math.round(n*e+255*(1-e)).toString(16)).slice(-2).toUpperCase()},e=function(n){if(/^[0-9A-Fa-f]{6}$/.test(n))return"#"+n.toUpperCase();a.clearRect(0,0,u.width,u.height),a.fillStyle="#FFFFFF",a.fillStyle=n,a.fillRect(0,0,1,1);var t=a.getImageData(0,0,1,1).data,e=t[0],o=t[1],r=t[2],i=t[3];return"#"+c(e,i)+c(o,i)+c(r,i)},o=0;o<n.length;o+=2)t.push({text:n[o+1],value:e(n[o]),type:"choiceitem"});return t}function av(n){return n.getParam("color_map")}function cv(n,e){var o;return n.dom.getParents(n.selection.getStart(),function(n){var t;(t=n.style["forecolor"===e?"color":"background-color"])&&(o=o||t)}),o}function sv(n){return Math.max(5,Math.ceil(Math.sqrt(n)))}function fv(n){var t=Iv(n),e=sv(t.length);return Mv(n,e)}function lv(t,e,n,o){"custom"===n?jv(t)(function(n){n.each(function(n){Vv(n),t.execCommand("mceApplyTextcolor",e,n),o(n)})},"#000000"):"remove"===n?(o(""),t.execCommand("mceRemoveTextcolor",e)):(o(n),t.execCommand("mceApplyTextcolor",e,n))}function dv(n,t){return n.concat(Rv().concat(function(n){var t="choiceitem",e={type:t,text:"Remove color",icon:"color-swatch-remove-color",value:"remove"};return n?[e,{type:t,text:"Custom color",icon:"color-picker",value:"custom"}]:[e]}(t)))}function mv(t,e){return function(n){n(dv(t,e))}}function gv(n,t,e){var o,r;o="forecolor"===t?"tox-icon-text-color__color":"tox-icon-highlight-bg-color__color",r=e,n.setIconFill(o,r),n.setIconStroke(o,r)}function pv(o,e,r,n,i){o.ui.registry.addSplitButton(e,{tooltip:n,presets:"color",icon:"forecolor"===e?"text-color":"highlight-bg-color",select:function(e){return on.from(cv(o,r)).bind(function(n){return function(n){if("transparent"===n)return on.some(Wh(0,0,0,0));var t=tv.exec(n);if(null!==t)return on.some(qh(t[1],t[2],t[3],"1"));var e=ev.exec(n);return null!==e?on.some(qh(e[1],e[2],e[3],e[4])):on.none()}(n).map(function(n){var t=Uh(n).value();return Vt(e.toLowerCase(),t)})}).getOr(!1)},columns:fv(o),fetch:mv(Iv(o),Fv(o)),onAction:function(n){null!==i.get()&&lv(o,r,i.get(),function(){})},onItemAction:function(n,t){lv(o,r,t,function(n){i.set(n),Lv(o,{name:e,color:n})})},onSetup:function(t){null!==i.get()&&gv(t,e,i.get());function n(n){n.name===e&&gv(t,n.name,n.color)}return o.on("TextColorChange",n),function(){o.off("TextColorChange",n)}}})}function hv(t,n,e,o){t.ui.registry.addNestedMenuItem(n,{text:o,icon:"forecolor"===n?"text-color":"highlight-bg-color",getSubmenuItems:function(){return[{type:"fancymenuitem",fancytype:"colorswatch",onAction:function(n){lv(t,e,n.value,Z)}}]}})}function vv(e,o){return function(n){var t=w(n,o);return S(t,function(n){return{dom:e,components:n}})}}function bv(n,e){var o=[],r=[];return bn(n,function(n,t){e(n,t)?(0<r.length&&o.push(r),r=[],En(n.dom,"innerHtml")&&r.push(n)):r.push(n)}),0<r.length&&o.push(r),S(o,function(n){return{dom:{tag:"div",classes:["tox-collection__group"]},components:n}})}function yv(t,e,n){return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===t?["tox-collection--list"]:["tox-collection--grid"])},components:[Vg.parts().items({preprocess:function(n){return"auto"!==t&&1<t?vv({tag:"div",classes:["tox-collection__group"]},t)(n):bv(n,function(n,t){return"separator"===e[t].type})}})]}}function xv(n){return{backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:function(n){return"color"===n?"tox-swatches":"tox-menu"}(n),tieredMenu:"tox-tiered-menu"}}function wv(n){var t=xv(n);return{backgroundMenu:t.backgroundMenu,selectedMenu:t.selectedMenu,menu:t.menu,selectedItem:t.selectedItem,item:sp(n)}}function Sv(n,t,e){var o=xv(e);return{dom:{tag:"div",classes:H([[o.tieredMenu]])},markers:wv(e)}}function Cv(n){return n.icon!==undefined||"togglemenuitem"===n.type||"choicemenuitem"===n.type}function kv(n){return v.console.error(le(n)),v.console.log(n),on.none()}function Ov(n,t,e,o,r){var i=function(e){return{dom:{tag:"div",classes:["tox-collection","tox-collection--horizontal"]},components:[Vg.parts().items({preprocess:function(n){return bv(n,function(n,t){return"separator"===e[t].type})}})]}}(e);return{value:n,dom:i.dom,components:i.components,items:e}}function Ev(n,t,e,o,r){var i;return"color"===r?{value:n,dom:(i=function(n){return{dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"]},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[Vg.parts().items({preprocess:"auto"!==n?vv({tag:"div",classes:["tox-swatches__row"]},n):l})]}]}}(o)).dom,components:i.components,items:e}:"normal"===r&&"auto"===o?{value:n,dom:(i=yv(o,e)).dom,components:i.components,items:e}:"normal"===r&&1===o?{value:n,dom:(i=yv(1,e)).dom,components:i.components,items:e}:"normal"===r?{value:n,dom:(i=yv(o,e)).dom,components:i.components,items:e}:"listpreview"!==r||"auto"===o?{value:n,dom:function(n,t,e){var o=xv(e);return{tag:"div",classes:H([[o.menu,"tox-menu-"+t+"-column"],n?[o.hasIcons]:[]])}}(t,o,r),components:Wv,items:e}:{value:n,dom:(i=function(n){return{dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[Vg.parts().items({preprocess:vv({tag:"div",classes:["tox-collection__group"]},n)})]}}(o)).dom,components:i.components,items:e}}function Tv(n,t,e,o,r,i,u,a){var c=function(n){return x(n,Cv)}(t),s=Gv(t,e,o,"color"!==r?"normal":"color",i,u,a);return Ev(n,c,s,o,r)}function Bv(n,t){var e=wv(t);return 1===n?{mode:"menu",moveOnTab:!0}:"auto"===n?{mode:"grid",selector:"."+e.item,initSize:{numColumns:1,numRows:1}}:{mode:"matrix",rowSelector:"."+("color"===t?"tox-swatches__row":"tox-collection__group")}}var Dv="choiceitem",Av=[{type:Dv,text:"Light Green",value:"#BFEDD2"},{type:Dv,text:"Light Yellow",value:"#FBEEB8"},{type:Dv,text:"Light Red",value:"#F8CAC6"},{type:Dv,text:"Light Purple",value:"#ECCAFA"},{type:Dv,text:"Light Blue",value:"#C2E0F4"},{type:Dv,text:"Green",value:"#2DC26B"},{type:Dv,text:"Yellow",value:"#F1C40F"},{type:Dv,text:"Red",value:"#E03E2D"},{type:Dv,text:"Purple",value:"#B96AD9"},{type:Dv,text:"Blue",value:"#3598DB"},{type:Dv,text:"Dark Turquoise",value:"#169179"},{type:Dv,text:"Orange",value:"#E67E23"},{type:Dv,text:"Dark Red",value:"#BA372A"},{type:Dv,text:"Dark Purple",value:"#843FA1"},{type:Dv,text:"Dark Blue",value:"#236FA1"},{type:Dv,text:"Light Gray",value:"#ECF0F1"},{type:Dv,text:"Medium Gray",value:"#CED4D9"},{type:Dv,text:"Gray",value:"#95A5A6"},{type:Dv,text:"Dark Gray",value:"#7E8C8D"},{type:Dv,text:"Navy Blue",value:"#34495E"},{type:Dv,text:"Black",value:"#000000"},{type:Dv,text:"White",value:"#ffffff"}],_v=function iI(t){void 0===t&&(t=10);var n,e=rv.getItem(iv),o=cn(e)?JSON.parse(e):[],r=t-(n=o).length<0?n.slice(0,t):n,i=function(n){r.splice(n,1)};return{add:function(n){(function(n,t){var e=y(n,t);return-1===e?on.none():on.some(e)})(r,n).each(i),r.unshift(n),r.length>t&&r.pop(),rv.setItem(iv,JSON.stringify(r))},state:function(){return r.slice(0)}}}(10),Mv=function(n,t){return n.getParam("color_cols",t,"number")},Fv=function(n){return!1!==n.getParam("custom_colors")},Iv=function(n){var t=av(n);return t!==undefined?uv(t):Av},Rv=function(){return S(_v.state(),function(n){return{type:Dv,text:n,value:n}})},Vv=function(n){_v.add(n)},Nv=function(n){return n.fire("SkinLoaded")},Hv=function(n){return n.fire("ResizeEditor")},Pv=function(n,t){return n.fire("ScrollContent",t)},zv=function(n,t){return n.fire("ResizeContent",t)},Lv=function(n,t){return n.fire("TextColorChange",t)},jv=function(i){return function(n,t){var e,o={colorpicker:t},r=(e=n,function(n){var t=n.getData();e(on.from(t.colorpicker)),n.close()});i.windowManager.open({title:"Color Picker",size:"normal",body:{type:"panel",items:[{type:"colorpicker",name:"colorpicker",label:"Color"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:o,onAction:function(n,t){"hex-valid"===t.name&&(t.value?n.enable("ok"):n.disable("ok"))},onSubmit:r,onClose:function(){},onCancel:function(){n(on.none())}})}},Uv={register:function(n){!function(e){e.addCommand("mceApplyTextcolor",function(n,t){!function(n,t,e){n.undoManager.transact(function(){n.focus(),n.formatter.apply(t,{value:e}),n.nodeChanged()})}(e,n,t)}),e.addCommand("mceRemoveTextcolor",function(n){!function(n,t){n.undoManager.transact(function(){n.focus(),n.formatter.remove(t,{value:null},null,!0),n.nodeChanged()})}(e,n)})}(n);var t=ye(null),e=ye(null);pv(n,"forecolor","forecolor","Text color",t),pv(n,"backcolor","hilitecolor","Background color",e),hv(n,"forecolor","forecolor","Text color"),hv(n,"backcolor","hilitecolor","Background color")},getColors:dv,getFetch:mv,colorPickerDialog:jv,getCurrentColor:cv,getColorCols:fv,calcCols:sv},Wv=[Vg.parts().items({})],Gv=function(n,e,o,r,i,u,a){return Bu(S(n,function(t){return"choiceitem"===t.type?function(n){return tt("choicemenuitem",qp,n)}(t).fold(kv,function(n){return on.some(function(t,n,e,o,r,i,u){var a=hp({presets:e,textContent:n?t.text:on.none(),htmlContent:on.none(),ariaLabel:t.text,iconContent:t.icon,shortcutContent:n?t.shortcut:on.none(),checkMark:n?on.some(gp(u.icons)):on.none(),caret:on.none(),value:t.value},u,!0);return Dn(Dh({data:Ah(t),disabled:t.disabled,getApi:function(t){return{setActive:function(n){Cg.set(t,n)},isActive:function(){return Cg.isOn(t)},isDisabled:function(){return Ch.isDisabled(t)},setDisabled:function(n){return Ch.set(t,n)}}},onAction:function(n){return o(t.value)},onSetup:function(n){return n.setActive(r),function(){}},triggersSubmenu:!1,itemBehaviours:[]},a,i),{toggling:{toggleClass:sh,toggleOnExecute:!1,selected:t.active}})}(n,1===o,r,e,u(t.value),i,a))}):on.none()}))};var Xv,Yv,qv={inserttable:function uI(o){var n=Xo("size-label"),i=function(n,t,e){for(var o=[],r=0;r<t;r++){for(var i=[],u=0;u<e;u++)i.push(Mh(r,u,n));o.push(i)}return o}(n,10,10),u=vm({dom:{tag:"span",classes:["tox-insert-table-picker__label"],attributes:{id:n}},components:[Ir("0x0")],behaviours:ba([mg.config({})])});return{type:"widget",data:{value:Xo("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[Vh().widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:function(n){return B(n,function(n){return S(n,au)})}(i).concat(u.asSpec()),behaviours:ba([Kd("insert-table-picker",[ho(Nh,function(n,t,e){var o=e.event().row(),r=e.event().col();!function(n,t,e,o,r){for(var i=0;i<o;i++)for(var u=0;u<r;u++)Cg.set(n[i][u],i<=t&&u<=e)}(i,o,r,10,10),mg.set(u.get(n),[function(n,t){return Ir(t+1+"x"+(n+1))}(o,r)])}),ho(Hh,function(n,t,e){o.onAction({numRows:e.event().row()+1,numColumns:e.event().col()+1}),oo(n,hi())})]),lg.config({initSize:{numRows:10,numColumns:10},mode:"flatgrid",selector:'[role="button"]'})])})]}},colorswatch:function aI(t,n){var e=Uv.getColors(n.colorinput.getColors(),n.colorinput.hasCustomColors()),o=n.colorinput.getColorCols(),r=Tv(Xo("menu-value"),e,function(n){t.onAction({value:n})},o,"color",Fh.CLOSE_ON_EXECUTE,function(){return!1},n.shared.providers),i=Dn(N(N({},r),{markers:wv("color"),movement:Bv(o,"color")}));return{type:"widget",data:{value:Xo("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[Vh().widget(Vg.sketch(i))]}}},Kv=function(t,e,n,o,r,i,u,a){void 0===a&&(a=!0);var c=hp({presets:o,textContent:on.none(),htmlContent:n?t.text.map(function(n){return _h(n,e)}):on.none(),ariaLabel:t.text,iconContent:t.icon,shortcutContent:on.none(),checkMark:on.none(),caret:on.none(),value:t.value},u.providers,a,t.icon);return Dh({data:Ah(t),disabled:t.disabled,getApi:function(){return{}},onAction:function(n){return r(t.value,t.meta)},onSetup:function(){return function(){}},triggersSubmenu:!1,itemBehaviours:function(n,t){return V(n,"tooltipWorker").map(function(e){return[oh.config({lazySink:t.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:function(n){return{anchor:"submenu",item:n,overrides:{maxHeightFunction:Cf}}},mode:"follow-highlight",onShow:function(t,n){e(function(n){oh.setComponents(t,[ru({element:we.fromDom(n)})])})}})]}).getOr([])}(t.meta,u)},c,i)},Jv=function(n){var t=n.text.fold(function(){return{}},function(n){return{innerHtml:n}});return{type:"separator",dom:N({tag:"div",classes:[uh,"tox-collection__group-heading"]},t),components:[]}},$v=function(n,t,e,o){void 0===o&&(o=!0);var r=hp({presets:"normal",iconContent:n.icon,textContent:n.text,htmlContent:on.none(),ariaLabel:n.text,caret:on.none(),checkMark:on.none(),shortcutContent:n.shortcut},e,o);return Dh({data:Ah(n),getApi:function(t){return{isDisabled:function(){return Ch.isDisabled(t)},setDisabled:function(n){return Ch.set(t,n)}}},disabled:n.disabled,onAction:n.onAction,onSetup:n.onSetup,triggersSubmenu:!1,itemBehaviours:[]},r,t)},Qv=function(n,t,e,o,r){void 0===o&&(o=!0),void 0===r&&(r=!1);var i=r?function(n){return{dom:{tag:"div",classes:[dh],innerHtml:ym("chevron-down",n)}}}(e.icons):function(n){return{dom:{tag:"div",classes:[dh],innerHtml:ym("chevron-right",n)}}}(e.icons),u=hp({presets:"normal",iconContent:n.icon,textContent:n.text,htmlContent:on.none(),ariaLabel:n.text,caret:on.some(i),checkMark:on.none(),shortcutContent:n.shortcut},e,o);return Dh({data:Ah(n),getApi:function(t){return{isDisabled:function(){return Ch.isDisabled(t)},setDisabled:function(n){return Ch.set(t,n)}}},disabled:n.disabled,onAction:Z,onSetup:n.onSetup,triggersSubmenu:!0,itemBehaviours:[]},u,t)},Zv=function(n,t,e){var o=hp({iconContent:on.none(),textContent:n.text,htmlContent:on.none(),ariaLabel:n.text,checkMark:on.some(gp(e.icons)),caret:on.none(),shortcutContent:n.shortcut,presets:"normal",meta:n.meta},e,!0);return Dn(Dh({data:Ah(n),disabled:n.disabled,getApi:function(t){return{setActive:function(n){Cg.set(t,n)},isActive:function(){return Cg.isOn(t)},isDisabled:function(){return Ch.isDisabled(t)},setDisabled:function(n){return Ch.set(t,n)}}},onAction:n.onAction,onSetup:n.onSetup,triggersSubmenu:!1,itemBehaviours:[]},o,t),{toggling:{toggleClass:sh,toggleOnExecute:!1,selected:n.active}})},nb=function(t,e){return function(n,t){return Object.prototype.hasOwnProperty.call(n,t)?on.some(n[t]):on.none()}(qv,t.fancytype).map(function(n){return n(t,e)})};(Yv=Xv=Xv||{})[Yv.ContentFocus=0]="ContentFocus",Yv[Yv.UiFocus=1]="UiFocus";function tb(n){return n.icon!==undefined||"togglemenuitem"===n.type||"choicemenuitem"===n.type}function eb(n){return x(n,tb)}function ob(n,t,e,o,r){function i(n){return r?N(N({},n),{shortcut:on.none(),icon:n.text.isSome()?on.none():n.icon}):n}var u=e.shared.providers;switch(n.type){case"menuitem":return function(n){return tt("menuitem",Gp,n)}(n).fold(kv,function(n){return on.some($v(i(n),t,u,o))});case"nestedmenuitem":return function(n){return tt("nestedmenuitem",Xp,n)}(n).fold(kv,function(n){return on.some(Qv(i(n),t,u,o,r))});case"togglemenuitem":return function(n){return tt("togglemenuitem",Yp,n)}(n).fold(kv,function(n){return on.some(Zv(i(n),t,u))});case"separator":return function(n){return tt("separatormenuitem",Lp,n)}(n).fold(kv,function(n){return on.some(Jv(n))});case"fancymenuitem":return function(n){return tt("fancymenuitem",Kp,n)}(n).fold(kv,function(n){return nb(i(n),e)});default:return v.console.error("Unknown item in general menu",n),on.none()}}function rb(n,t,e,o,r,i){var u=1===o,a=!u||eb(n);return Bu(S(n,function(n){return"separator"===n.type?function(n){return tt("Autocompleter.Separator",Lp,n)}(n).fold(kv,function(n){return on.some(Jv(n))}):function(n){return tt("Autocompleter.Item",jp,n)}(n).fold(kv,function(n){return on.some(Kv(n,t,u,"normal",e,r,i,a))})}))}function ib(n,t,e,o,r){var i=eb(t),u=Bu(S(t,function(n){function t(n){return ob(n,e,o,function(n){return r?!n.hasOwnProperty("text"):i}(n),r)}return"nestedmenuitem"===n.type&&n.getSubmenuItems().length<=0?t(An(n,{disabled:!0})):t(n)}));return(r?Ov:Ev)(n,i,u,1,"normal")}function ub(n){return Lg.singleData(n.value,n)}function ab(n){function t(){n.stopPropagation()}function e(){n.preventDefault()}var o=we.fromDom(n.target),r=i(e,t);return function(n,t,e,o,r,i,u){return{target:nn(n),x:nn(t),y:nn(e),stop:o,prevent:r,kill:i,raw:nn(u)}}(o,n.clientX,n.clientY,t,e,r,n)}function cb(n,t,e,o,r){var i=function(t,e){return function(n){t(n)&&e(ab(n))}}(e,o);return n.dom().addEventListener(t,i,r),{unbind:d(mb,n,t,i,r)}}function sb(n,t,e){return function(n,t,e,o){return cb(n,t,e,o,!1)}(n,t,gb,e)}function fb(n,t,e){return function(n,t,e,o){return cb(n,t,e,o,!0)}(n,t,gb,e)}function lb(n,t,e){return Ou(n,t,e).isSome()}var db=function(u,a){function e(){return s.get().isSome()}function c(){e()&&jg.hide(l)}function i(n,t,e,o){n.matchLength=t.text.length;var r=Du(e,function(n){return on.from(n.columns)}).getOr(1);jg.showAt(l,{anchor:"node",root:we.fromDom(u.getBody()),node:on.from(n.element)},Vg.sketch(function(n,t,e,o){var r=e===Xv.ContentFocus?Xl():Gl(),i=Bv(t,o),u=wv(o);return{dom:n.dom,components:n.components,items:n.items,value:n.value,markers:{selectedItem:u.selectedItem,item:u.item},movement:i,fakeFocus:e===Xv.ContentFocus,focusManager:r,menuBehaviours:Jp("auto"!==t?[]:[Ii(function(o,n){ip(o,4,u.item).each(function(n){var t=n.numColumns,e=n.numRows;lg.setGridSize(o,e,t)})})])}}(Ev("autocompleter-value",!0,o,r,"normal"),r,Xv.ContentFocus,"normal"))),jg.getContent(l).each(ad.highlightFirst)}var s=ye(on.none()),f=ye(!1),l=uu(jg.sketch({dom:{tag:"div",classes:["tox-autocompleter"]},components:[],fireDismissalEventInstead:{},inlineBehaviours:ba([Kd("dismissAutocompleter",[lo(Oi(),function(){return d()})])]),lazySink:a.getSink})),d=function(){if(e()){var n=s.get().map(function(n){return n.element});Ip(n.getOr(we.fromDom(u.selection.getNode()))).each(Ro),c(),s.set(on.none()),f.set(!1)}},o=L(function(){return rp(u)}),m=function(n){(function(t){return s.get().map(function(n){return tp(u.dom,u.selection.getRng(),n.triggerChar).bind(function(n){return zp(u,o,n,t)})}).getOrThunk(function(){return op(u,o)})})(n).fold(d,function(r){!function(n){if(!e()){var t=Qg(u,n.range);s.set(on.some({triggerChar:n.triggerChar,element:t,matchLength:n.text.length})),f.set(!1)}}(r.context),r.lookupData.then(function(o){s.get().map(function(n){var t=r.context;if(n.triggerChar===t.triggerChar){var e=function(t,n){var e=Du(n,function(n){return on.from(n.columns)}).getOr(1);return B(n,function(i){var n=i.items;return rb(n,i.matchText,function(o,r){var n=u.selection.getRng();tp(u.dom,n,t).fold(function(){return v.console.error("Lost context. Cursor probably moved")},function(n){var t=n.range,e={hide:function(){d()},reload:function(n){c(),m(n)}};f.set(!0),i.onAction(e,t,o,r),f.set(!1)})},e,Fh.BUBBLE_TO_SANDBOX,a)})}(t.triggerChar,o);0<e.length?i(n,t,o,e):10<=t.text.length-n.matchLength?d():c()}})})})},n={onKeypress:Jg(function(n){27!==n.which&&m()},50),cancelIfNecessary:d,isMenuOpen:function(){return jg.isOpen(l)},isActive:e,isProcessingAction:f.get,getView:function(){return jg.getContent(l)}};Vp(n,u)},mb=function(n,t,e,o){n.dom().removeEventListener(t,e,o)},gb=nn(!0),pb=ab;function hb(e,o){var r=null;return{cancel:function(){null!==r&&(v.clearTimeout(r),r=null)},schedule:function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];r=v.setTimeout(function(){e.apply(null,n),r=null},o)}}}function vb(n){var t=n.raw();return t.touches===undefined||1!==t.touches.length?on.none():on.some(t.touches[0])}function bb(e){var o=ye(on.none()),r=ye(!1),i=hb(function(n){e.triggerEvent(pi(),n),r.set(!0)},400),u=K([{key:Ur(),value:function(e){return vb(e).each(function(n){i.cancel();var t={x:nn(n.clientX),y:nn(n.clientY),target:e.target};i.schedule(e),r.set(!1),o.set(on.some(t))}),on.none()}},{key:Wr(),value:function(n){return i.cancel(),vb(n).each(function(t){o.get().each(function(n){!function(n,t){var e=Math.abs(n.clientX-t.x()),o=Math.abs(n.clientY-t.y());return 5<e||5<o}(t,n)||o.set(on.none())})}),on.none()}},{key:Gr(),value:function(t){i.cancel();return o.get().filter(function(n){return jt(n.target(),t.target())}).map(function(n){return r.get()?(t.prevent(),!1):e.triggerEvent(gi(),t)})}}]);return{fireIfReady:function(t,n){return Nn(u,n).bind(function(n){return n(t)})}}}function yb(t,n){var e=ot("Getting GUI events settings",kb,n),o=bb(e),r=S(["touchstart","touchmove","touchend","touchcancel","gesturestart","mousedown","mouseup","mouseover","mousemove","mouseout","click"].concat(["selectstart","input","contextmenu","change","transitionend","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),function(n){return sb(t,n,function(t){o.fireIfReady(t,n).each(function(n){n&&t.kill()}),e.triggerEvent(n,t)&&t.kill()})}),i=ye(on.none()),u=sb(t,"paste",function(t){o.fireIfReady(t,"paste").each(function(n){n&&t.kill()}),e.triggerEvent("paste",t)&&t.kill(),i.set(on.some(v.setTimeout(function(){e.triggerEvent(fi(),t)},0)))}),a=sb(t,"keydown",function(n){e.triggerEvent("keydown",n)?n.kill():!0===e.stopBackspace&&function(n){return 8===n.raw().which&&!vn(["input","textarea"],Ke(n.target()))&&!lb(n.target(),'[contenteditable="true"]')}(n)&&n.prevent()}),c=function(n,t){return Cb?fb(n,"focus",t):sb(n,"focusin",t)}(t,function(n){e.triggerEvent("focusin",n)&&n.kill()}),s=ye(on.none()),f=function(n,t){return Cb?fb(n,"blur",t):sb(n,"focusout",t)}(t,function(n){e.triggerEvent("focusout",n)&&n.kill(),s.set(on.some(v.setTimeout(function(){e.triggerEvent(si(),n)},0)))});return{unbind:function(){bn(r,function(n){n.unbind()}),a.unbind(),c.unbind(),f.unbind(),u.unbind(),i.get().each(v.clearTimeout),s.get().each(v.clearTimeout)}}}function xb(n,t){var e=Nn(n,"target").map(function(n){return n()}).getOr(t);return ye(e)}function wb(n,o,t,e,r,i){var u=n(o,e),a=function(n,t){var e=ye(!1),o=ye(!1);return{stop:function(){e.set(!0)},cut:function(){o.set(!0)},isStopped:e.get,isCut:o.get,event:nn(n),setSource:t.set,getSource:t.get}}(t,r);return u.fold(function(){return i.logEventNoHandlers(o,e),Ob.complete()},function(t){var e=t.descHandler();return nr(e)(a),a.isStopped()?(i.logEventStopped(o,t.element(),e.purpose()),Ob.stopped()):a.isCut()?(i.logEventCut(o,t.element(),e.purpose()),Ob.complete()):Eo(t.element()).fold(function(){return i.logNoParent(o,t.element(),e.purpose()),Ob.complete()},function(n){return i.logEventResponse(o,t.element(),e.purpose()),Ob.resume(n)})})}function Sb(n,t,e){var o=function(n){var t=ye(!1);return{stop:function(){t.set(!0)},cut:Z,isStopped:t.get,isCut:nn(!1),event:nn(n),setSource:r("Cannot set source of a broadcasted event"),getSource:r("Cannot get source of a broadcasted event")}}(t);return bn(n,function(n){var t=n.descHandler();nr(t)(o)}),o.isStopped()}var Cb=Ht().browser.isFirefox(),kb=qn([dt("triggerEvent"),St("stopBackspace",!0)]),Ob=Tn([{stopped:[]},{resume:["element"]},{complete:[]}]),Eb=function(t,e,o,n,r,i){return wb(t,e,o,n,r,i).fold(function(){return!0},function(n){return Eb(t,e,o,n,r,i)},function(){return!1})},Tb=function(n,t,e,o,r){var i=xb(e,o);return Eb(n,t,e,o,i,r)},Bb=yo("element","descHandler"),Db=function(n,t){return{id:nn(n),descHandler:nn(t)}};function Ab(){var i={};return{registerId:function(o,r,n){Cn(n,function(n,t){var e=i[t]!==undefined?i[t]:{};e[r]=tu(n,o),i[t]=e})},unregisterId:function(e){Cn(i,function(n,t){n.hasOwnProperty(e)&&delete n[e]})},filterByType:function(n){return Nn(i,n).map(function(n){return On(n,function(n,t){return Db(t,n)})}).getOr([])},find:function(n,t,e){var o=Vn(t)(i);return jr(e,function(n){return function(e,o){return qi(o).fold(function(){return on.none()},function(n){var t=Vn(n);return e.bind(t).map(function(n){return Bb(o,n)})})}(o,n)},n)}}}function _b(){function o(n){var t=n.element();return qi(t).fold(function(){return function(n,t){var e=Xo(Gi+n);return Yi(t,e),e}("uid-",n.element())},function(n){return n})}var r=Ab(),i={},u=function(n){qi(n.element()).each(function(n){delete i[n],r.unregisterId(n)})};return{find:function(n,t,e){return r.find(n,t,e)},filter:function(n){return r.filterByType(n)},register:function(n){var t=o(n);$(i,t)&&function(n,t){var e=i[t];if(e!==n)throw new Error('The tagId "'+t+'" is already used by: '+Go(e.element())+"\nCannot use it for: "+Go(n.element())+"\nThe conflicting element is"+($e(e.element())?" ":" not ")+"already in the DOM");u(n)}(n,t);var e=[n];r.registerId(e,t,n.events()),i[t]=n},unregister:u,getById:function(n){return Vn(n)(i)}}}function Mb(e){function o(t){return Eo(e.element()).fold(function(){return!0},function(n){return jt(t,n)})}function r(n,t){return u.find(o,n,t)}function i(e){var n=u.filter(li());bn(n,function(n){var t=n.descHandler();nr(t)(e)})}var u=_b(),n=yb(e.element(),{triggerEvent:function(t,e){return Wu(t,e.target(),function(n){return function(n,t,e,o){var r=e.target();return Tb(n,t,e,r,o)}(r,t,e,n)})}}),a={debugInfo:nn("real"),triggerEvent:function(t,e,o){Wu(t,e,function(n){Tb(r,t,o,e,n)})},triggerFocus:function(t,e){qi(t).fold(function(){wa(t)},function(n){Wu(ci(),t,function(n){!function(n,t,e,o,r){var i=xb(e,o);wb(n,t,e,o,i,r)}(r,ci(),{originator:nn(e),kill:Z,prevent:Z,target:nn(t)},t,n)})})},triggerEscape:function(n,t){a.triggerEvent("keydown",n.element(),t.event())},getByUid:function(n){return g(n)},getByDom:function(n){return p(n)},build:uu,addToGui:function(n){s(n)},removeFromGui:function(n){f(n)},addToWorld:function(n){t(n)},removeFromWorld:function(n){c(n)},broadcast:function(n){l(n)},broadcastOn:function(n,t){d(n,t)},broadcastEvent:function(n,t){m(n,t)},isConnected:nn(!0)},t=function(n){n.connect(a),Pr(n.element())||(u.register(n),bn(n.components(),t),a.triggerEvent(bi(),n.element(),{target:nn(n.element())}))},c=function(n){Pr(n.element())||(bn(n.components(),c),u.unregister(n)),n.disconnect()},s=function(n){hs(e,n)},f=function(n){bs(n)},l=function(n){i({universal:nn(!0),data:nn(n)})},d=function(n,t){i({universal:nn(!1),channels:nn(n),data:nn(t)})},m=function(n,t){var e=u.filter(n);return Sb(e,t)},g=function(n){return u.getById(n).fold(function(){return an.error(new Error('Could not find component with uid: "'+n+'" in system.'))},an.value)},p=function(n){var t=qi(n).getOr("not found");return g(t)};return t(e),{root:nn(e),element:e.element,destroy:function(){n.unbind(),Pi(e.element())},add:s,remove:f,getByUid:g,getByDom:p,addToWorld:t,removeFromWorld:c,broadcast:l,broadcastOn:d,broadcastEvent:m}}function Fb(n){return n.getParam("height",Math.max(n.getElement().offsetHeight,200))}function Ib(n){return n.getParam("width",Rh.DOM.getStyle(n.getElement(),"width"))}function Rb(n){return on.from(n.settings.min_width).filter(mn)}function Vb(n){return on.from(n.settings.min_height).filter(mn)}function Nb(n){return on.from(n.getParam("max_width")).filter(mn)}function Hb(n){return on.from(n.getParam("max_height")).filter(mn)}function Pb(n){return!1!==n.getParam("menubar",!0,"boolean")}function zb(n){var t=n.getParam("toolbar",!0),e=!0===t,o=cn(t),r=fn(t)&&0<t.length;return!Xb(n)&&(r||o||e)}function Lb(t){var n=wn(t.settings),e=C(n,function(n){return/^toolbar([1-9])$/.test(n)}),o=S(e,function(n){return t.getParam(n,!1,"string")}),r=C(o,function(n){return"string"==typeof n});return 0<r.length?on.some(r):on.none()}var jb,Ub,Wb=Dl({name:"Container",factory:function(n){var t=n.dom,e=t.attributes,o=c(t,["attributes"]);return{uid:n.uid,dom:N({tag:"div",attributes:N({role:"presentation"},e)},o),components:n.components,behaviours:Is(n.containerBehaviours),events:n.events,domModification:n.domModification,eventOrder:n.eventOrder}},configFields:[St("components",[]),Fs("containerBehaviours",[]),St("events",{}),St("domModification",{}),St("eventOrder",{})]}),Gb=tinymce.util.Tools.resolve("tinymce.EditorManager"),Xb=function(n){return Lb(n).fold(function(){return 0<n.getParam("toolbar",[],"string[]").length},function(){return!0})};(Ub=jb=jb||{})["default"]="",Ub.floating="floating",Ub.sliding="sliding",Ub.scrolling="scrolling";function Yb(n){return n.getParam("toolbar_drawer","","string")}function qb(n){var t=function(n){return n.getParam("fixed_toolbar_container","","string")}(n);return 0<t.length&&n.inline?ku(zr(),t):on.none()}function Kb(n){return n.inline&&qb(n).isSome()}function Jb(n){return n.inline&&!Pb(n)&&!zb(n)&&!Xb(n)}function $b(n){return(n.getParam("toolbar_sticky",!1,"boolean")||n.inline)&&!Kb(n)&&!Jb(n)}function Qb(n){return n.touches===undefined||1!==n.touches.length?on.none():on.some(n.touches[0])}function Zb(n){return ba([vg.config({onFocus:!1===n.selectOnFocus?Z:function(n){var t=n.element(),e=Er(t);t.dom().setSelectionRange(0,e.length)}})])}function ny(n){return{tag:n.tag,attributes:N({type:"text"},n.inputAttributes),styles:n.inputStyles,classes:n.inputClasses}}var ty,ey,oy,ry,iy=function(e){var o=ye(on.none()),r=ye(!1),i=Jg(function(n){e.fire("longpress",N(N({},n),{type:"longpress"})),r.set(!0)},400);e.on("touchstart",function(e){Qb(e).each(function(n){i.cancel();var t={x:nn(n.clientX),y:nn(n.clientY),target:nn(e.target)};i.throttle(e),r.set(!1),o.set(on.some(t))})},!0),e.on("touchmove",function(n){i.cancel(),Qb(n).each(function(t){o.get().each(function(n){!function(n,t){var e=Math.abs(n.clientX-t.x()),o=Math.abs(n.clientY-t.y());return 5<e||5<o}(t,n)||(o.set(on.none()),r.set(!1),e.fire("longpresscancel"))})})},!0),e.on("touchend touchcancel",function(t){i.cancel(),"touchcancel"!==t.type&&o.get().filter(function(n){return n.target().isEqualNode(t.target)}).each(function(){r.get()?t.preventDefault():e.fire("tap",{touches:t.touches}).isDefaultPrevented()&&t.preventDefault()})},!0)},uy=Xo("form-component-change"),ay=Xo("form-close"),cy=Xo("form-cancel"),sy=Xo("form-action"),fy=Xo("form-submit"),ly=Xo("form-block"),dy=Xo("form-unblock"),my=Xo("form-tabchange"),gy=Xo("form-resize"),py=nn([St("prefix","form-field"),Fs("fieldBehaviours",[Zl,Zf])]),hy=nn([Sl({schema:[ct("dom")],name:"label"}),Sl({factory:{sketch:function(n){return{uid:n.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:n.text}}}},schema:[ct("text")],name:"aria-descriptor"}),xl({factory:{sketch:function(n){var t=X(n,["factory"]);return n.factory.sketch(t)}},schema:[ct("factory")],name:"field"})]),vy=Al({name:"FormField",configFields:py(),partFields:hy(),factory:function(r,n,t,e){var o=Rs(r.fieldBehaviours,[Zl.config({find:function(n){return qs(n,r,"field")}}),Zf.config({store:{mode:"manual",getValue:function(n){return Zl.getCurrent(n).bind(Zf.getValue)},setValue:function(n,t){Zl.getCurrent(n).each(function(n){Zf.setValue(n,t)})}}})]),i=co([Ii(function(n,t){var o=Js(n,r,["label","field","aria-descriptor"]);o.field().each(function(e){var t=Xo(r.prefix);o.label().each(function(n){Po(n.element(),"for",t),Po(e.element(),"id",t)}),o["aria-descriptor"]().each(function(n){var t=Xo(r.prefix);Po(n.element(),"id",t),Po(e.element(),"aria-describedby",t)})})})]),u={getField:function(n){return qs(n,r,"field")},getLabel:function(n){return qs(n,r,"label")}};return{uid:r.uid,dom:r.dom,components:n,behaviours:o,events:i,apis:u}},apis:{getField:function(n,t){return n.getField(t)},getLabel:function(n,t){return n.getLabel(t)}}}),by=nn([ht("data"),St("inputAttributes",{}),St("inputStyles",{}),St("tag","input"),St("inputClasses",[]),qu("onSetValue"),St("styles",{}),St("eventOrder",{}),Fs("inputBehaviours",[Zf,vg]),St("selectOnFocus",!0)]),yy=Dl({name:"Input",configFields:by(),factory:function(n,t){return{uid:n.uid,dom:ny(n),components:[],behaviours:function(n){return N(N({},Zb(n)),Rs(n.inputBehaviours,[Zf.config({store:{mode:"manual",initialValue:n.data.getOr(undefined),getValue:function(n){return Er(n.element())},setValue:function(n,t){Er(n.element())!==t&&Tr(n.element(),t)}},onSetValue:n.onSetValue})]))}(n),eventOrder:n.eventOrder}}}),xy={},wy={exports:xy};ty=undefined,ey=xy,oy=wy,ry=undefined,function(n){"object"==typeof ey&&void 0!==oy?oy.exports=n():"function"==typeof ty&&ty.amd?ty([],n):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EphoxContactWrapper=n()}(function(){return function f(i,u,a){function c(t,n){if(!u[t]){if(!i[t]){var e="function"==typeof ry&&ry;if(!n&&e)return e(t,!0);if(s)return s(t,!0);var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}var r=u[t]={exports:{}};i[t][0].call(r.exports,function(n){return c(i[t][1][n]||n)},r,r.exports,f,i,u,a)}return u[t].exports}for(var s="function"==typeof ry&&ry,n=0;n<a.length;n++)c(a[n]);return c}({1:[function(n,t,e){var o,r,i=t.exports={};function u(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(n){if(o===setTimeout)return setTimeout(n,0);if((o===u||!o)&&setTimeout)return o=setTimeout,setTimeout(n,0);try{return o(n,0)}catch(t){try{return o.call(null,n,0)}catch(t){return o.call(this,n,0)}}}!function(){try{o="function"==typeof setTimeout?setTimeout:u}catch(n){o=u}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(n){r=a}}();var s,f=[],l=!1,d=-1;function m(){l&&s&&(l=!1,s.length?f=s.concat(f):d=-1,f.length&&g())}function g(){if(!l){var n=c(m);l=!0;for(var t=f.length;t;){for(s=f,f=[];++d<t;)s&&s[d].run();d=-1,t=f.length}s=null,l=!1,function e(n){if(r===clearTimeout)return clearTimeout(n);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(n);try{return r(n)}catch(t){try{return r.call(null,n)}catch(t){return r.call(this,n)}}}(n)}}function p(n,t){this.fun=n,this.array=t}function h(){}i.nextTick=function(n){var t=new Array(arguments.length-1);if(1<arguments.length)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];f.push(new p(n,t)),1!==f.length||l||c(g)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.prependListener=h,i.prependOnceListener=h,i.listeners=function(n){return[]},i.binding=function(n){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(n){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],2:[function(n,l,t){(function(t){function o(){}function i(n){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof n)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],f(n,this)}function r(o,r){for(;3===o._state;)o=o._value;0!==o._state?(o._handled=!0,i._immediateFn(function(){var n=1===o._state?r.onFulfilled:r.onRejected;if(null!==n){var t;try{t=n(o._value)}catch(e){return void a(r.promise,e)}u(r.promise,t)}else(1===o._state?u:a)(r.promise,o._value)})):o._deferreds.push(r)}function u(n,t){try{if(t===n)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var e=t.then;if(t instanceof i)return n._state=3,n._value=t,void c(n);if("function"==typeof e)return void f(function o(n,t){return function(){n.apply(t,arguments)}}(e,t),n)}n._state=1,n._value=t,c(n)}catch(r){a(n,r)}}function a(n,t){n._state=2,n._value=t,c(n)}function c(n){2===n._state&&0===n._deferreds.length&&i._immediateFn(function(){n._handled||i._unhandledRejectionFn(n._value)});for(var t=0,e=n._deferreds.length;t<e;t++)r(n,n._deferreds[t]);n._deferreds=null}function s(n,t,e){this.onFulfilled="function"==typeof n?n:null,this.onRejected="function"==typeof t?t:null,this.promise=e}function f(n,t){var e=!1;try{n(function(n){e||(e=!0,u(t,n))},function(n){e||(e=!0,a(t,n))})}catch(o){if(e)return;e=!0,a(t,o)}}var n,e;n=this,e=setTimeout,i.prototype["catch"]=function(n){return this.then(null,n)},i.prototype.then=function(n,t){var e=new this.constructor(o);return r(this,new s(n,t,e)),e},i.all=function(n){var c=Array.prototype.slice.call(n);return new i(function(r,i){if(0===c.length)return r([]);var u=c.length;function a(t,n){try{if(n&&("object"==typeof n||"function"==typeof n)){var e=n.then;if("function"==typeof e)return void e.call(n,function(n){a(t,n)},i)}c[t]=n,0==--u&&r(c)}catch(o){i(o)}}for(var n=0;n<c.length;n++)a(n,c[n])})},i.resolve=function(t){return t&&"object"==typeof t&&t.constructor===i?t:new i(function(n){n(t)})},i.reject=function(e){return new i(function(n,t){t(e)})},i.race=function(r){return new i(function(n,t){for(var e=0,o=r.length;e<o;e++)r[e].then(n,t)})},i._immediateFn="function"==typeof t?function(n){t(n)}:function(n){e(n,0)},i._unhandledRejectionFn=function(n){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",n)},i._setImmediateFn=function(n){i._immediateFn=n},i._setUnhandledRejectionFn=function(n){i._unhandledRejectionFn=n},void 0!==l&&l.exports?l.exports=i:n.Promise||(n.Promise=i)}).call(this,n("timers").setImmediate)},{timers:3}],3:[function(c,n,s){(function(n,t){var o=c("process/browser.js").nextTick,e=Function.prototype.apply,r=Array.prototype.slice,i={},u=0;function a(n,t){this._id=n,this._clearFn=t}s.setTimeout=function(){return new a(e.call(setTimeout,window,arguments),clearTimeout)},s.setInterval=function(){return new a(e.call(setInterval,window,arguments),clearInterval)},s.clearTimeout=s.clearInterval=function(n){n.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(window,this._id)},s.enroll=function(n,t){clearTimeout(n._idleTimeoutId),n._idleTimeout=t},s.unenroll=function(n){clearTimeout(n._idleTimeoutId),n._idleTimeout=-1},s._unrefActive=s.active=function(n){clearTimeout(n._idleTimeoutId);var t=n._idleTimeout;0<=t&&(n._idleTimeoutId=setTimeout(function(){n._onTimeout&&n._onTimeout()},t))},s.setImmediate="function"==typeof n?n:function(n){var t=u++,e=!(arguments.length<2)&&r.call(arguments,1);return i[t]=!0,o(function(){i[t]&&(e?n.apply(null,e):n.call(null),s.clearImmediate(t))}),t},s.clearImmediate="function"==typeof t?t:function(n){delete i[n]}}).call(this,c("timers").setImmediate,c("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(n,t,e){var o=n("promise-polyfill"),r="undefined"!=typeof window?window:Function("return this;")();t.exports={boltExport:r.Promise||o}},{"promise-polyfill":2}]},{},[4])(4)});function Sy(n){v.setTimeout(function(){throw n},0)}function Cy(n){var t=Ke(n);return vn(Hy,t)}function ky(n,t){var e=t.getRoot(n).getOr(n.element());dr(e,t.invalidClass),t.notify.each(function(t){Cy(n.element())&&Po(n.element(),"aria-invalid",!1),t.getContainer(n).each(function(n){No(n,t.validHtml)}),t.onValid(n)})}function Oy(t,n,e,o){var r=n.getRoot(t).getOr(t.element());fr(r,n.invalidClass),n.notify.each(function(n){Cy(t.element())&&Po(t.element(),"aria-invalid",!0),n.getContainer(t).each(function(n){No(n,o)}),n.onInvalid(t,o)})}function Ey(t,n,e){return n.validator.fold(function(){return Ny(an.value(!0))},function(n){return n.validate(t)})}function Ty(t,e,n){return e.notify.each(function(n){n.onValidate(t)}),Ey(t,e).map(function(n){return t.getSystem().isConnected()?n.fold(function(n){return Oy(t,e,0,n),an.error(n)},function(n){return ky(t,e),an.value(n)}):an.error("No longer in system")})}function By(n,t,e,o){var r=Xy(n,t,e,o);return vy.sketch(r)}function Dy(n,t){return vy.parts().label({dom:{tag:"label",classes:["tox-label"],innerHtml:t.translate(n)}})}var Ay,_y,My=wy.exports.boltExport,Fy=function(n){var e=on.none(),t=[],o=function(n){r()?u(n):t.push(n)},r=function(){return e.isSome()},i=function(n){bn(n,u)},u=function(t){e.each(function(n){v.setTimeout(function(){t(n)},0)})};return n(function(n){e=on.some(n),i(t),t=[]}),{get:o,map:function(e){return Fy(function(t){o(function(n){t(e(n))})})},isReady:r}},Iy={nu:Fy,pure:function(t){return Fy(function(n){n(t)})}},Ry=function(e){function n(n){e().then(n,Sy)}return{map:function(n){return Ry(function(){return e().then(n)})},bind:function(t){return Ry(function(){return e().then(function(n){return t(n).toPromise()})})},anonBind:function(n){return Ry(function(){return e().then(function(){return n.toPromise()})})},toLazy:function(){return Iy.nu(n)},toCached:function(){var n=null;return Ry(function(){return null===n&&(n=e()),n})},toPromise:e,get:n}},Vy=function(n){return Ry(function(){return new My(n)})},Ny=function(n){return Ry(function(){return My.resolve(n)})},Hy=["input","textarea"],Py=/* */Object.freeze({markValid:ky,markInvalid:Oy,query:Ey,run:Ty,isInvalid:function(n,t){var e=t.getRoot(n).getOr(n.element());return mr(e,t.invalidClass)}}),zy=/* */Object.freeze({events:function(t,n){return t.validator.map(function(n){return co([lo(n.onEvent,function(n){Ty(n,t).get(l)})].concat(n.validateOnLoad?[Ii(function(n){Ty(n,t).get(Z)})]:[]))}).getOr({})}}),Ly=[ct("invalidClass"),St("getRoot",on.none),wt("notify",[St("aria","alert"),St("getContainer",on.none),St("validHtml",""),qu("onValid"),qu("onInvalid"),qu("onValidate")]),wt("validator",[ct("validate"),St("onEvent","input"),St("validateOnLoad",!0)])],jy=ya({fields:Ly,name:"invalidating",active:zy,apis:Py,extra:{validation:function(e){return function(n){var t=Zf.getValue(n);return Ny(e(t))}}}}),Uy=/* */Object.freeze({exhibit:function(n,t){return Zo({attributes:K([{key:t.tabAttr,value:"true"}])})}}),Wy=[St("tabAttr","data-alloy-tabstop")],Gy=ya({fields:Wy,name:"tabstopping",active:Uy}),Xy=function(n,t,e,o){return{dom:Yy(e),components:n.toArray().concat([t]),fieldBehaviours:ba(o)}},Yy=function(n){return{tag:"div",classes:["tox-form__group"].concat(n)}},qy=/* */Object.freeze({getCoupled:function(n,t,e,o){return e.getOrCreate(n,t,o)}}),Ky=[st("others",nt(an.value,de()))],Jy=ya({fields:Ky,name:"coupling",apis:qy,state:/* */Object.freeze({init:function(n){var i={},t=nn({});return nu({readState:t,getOrCreate:function(e,o,r){var n=wn(o.others);if(n)return Nn(i,r).getOrThunk(function(){var n=Nn(o.others,r).getOrDie("No information found for coupled component: "+r)(e),t=e.getSystem().build(n);return i[r]=t});throw new Error("Cannot find coupled component: "+r+". Known coupled components: "+JSON.stringify(n,null,2))}})}})}),$y=nn("sink"),Qy=nn(Sl({name:$y(),overrides:nn({dom:{tag:"div"},behaviours:ba([Af.config({useFixed:a})]),events:co([vo(ni()),vo(Yr()),vo(ri())])})}));(_y=Ay=Ay||{})[_y.HighlightFirst=0]="HighlightFirst",_y[_y.HighlightNone=1]="HighlightNone";function Zy(n,t){var e=n.getHotspot(t).getOr(t),o=n.getAnchorOverrides();return n.layouts.fold(function(){return{anchor:"hotspot",hotspot:e,overrides:o}},function(n){return{anchor:"hotspot",hotspot:e,overrides:o,layouts:n}})}function nx(n,t,e,o,r,i,u){return function(n,t,r,e,i,o,u){var a=function(n,t,e){return(0,n.fetch)(e).map(t)}(n,t,e),c=Sw(e,n);return a.map(function(n){return n.bind(function(n){return on.from(Lg.sketch(N(N({},o.menu()),{uid:Yo(""),data:n,highlightImmediately:u===Ay.HighlightFirst,onOpenMenu:function(n,t){var e=c().getOrDie();Af.position(e,r,t),zf.decloak(i)},onOpenSubmenu:function(n,t,e){var o=c().getOrDie();Af.position(o,{anchor:"submenu",item:t},e),zf.decloak(i)},onRepositionMenu:function(n,t,e){var o=c().getOrDie();Af.position(o,r,t),bn(e,function(n){Af.position(o,{anchor:"submenu",item:n.triggeringItem},n.triggeredMenu)})},onEscape:function(){return vg.focus(e),zf.close(i),on.some(!0)}})))})})}(n,t,Zy(n,e),e,o,r,u).map(function(n){return n.fold(function(){zf.isOpen(o)&&zf.close(o)},function(n){zf.cloak(o),zf.open(o,n),i(o)}),o})}function tx(n,t,e,o,r,i,u){return zf.close(o),Ny(o)}function ex(n,t,e,o,r,i){var u=Jy.getCoupled(e,"sandbox");return(zf.isOpen(u)?tx:nx)(n,t,e,u,o,r,i)}function ox(n,t,e){var o=Zl.getCurrent(t).getOr(t),r=mu(n.element());e?yr(o.element(),"min-width",r+"px"):function(n,t){Vu.set(n,t)}(o.element(),r)}function rx(n){zf.getState(n).each(function(n){Lg.repositionMenus(n)})}function ix(o,r,i){var u=Eu(),n=Sw(r,o);return{dom:{tag:"div",classes:o.sandboxClasses,attributes:{id:u.id(),role:"listbox"}},behaviours:tl(o.sandboxBehaviours,[Zf.config({store:{mode:"memory",initialValue:r}}),zf.config({onOpen:function(n,t){var e=Zy(o,r);u.link(r.element()),o.matchWidth&&ox(e.hotspot,t,o.useMinWidth),o.onOpen(e,n,t),i!==undefined&&i.onOpen!==undefined&&i.onOpen(n,t)},onClose:function(n,t){u.unlink(r.element()),i!==undefined&&i.onClose!==undefined&&i.onClose(n,t)},isPartOf:function(n,t,e){return Lu(t,e)||Lu(r,e)},getAttachPoint:function(){return n().getOrDie()}}),Zl.config({find:function(n){return zf.getState(n).bind(function(n){return Zl.getCurrent(n)})}}),lc.config({channels:N(N({},Es({isExtraPart:nn(!1)})),Ts({isExtraPart:nn(!1),doReposition:rx}))})])}}function ux(n){var t=Jy.getCoupled(n,"sandbox");rx(t)}function ax(){return[St("sandboxClasses",[]),nl("sandboxBehaviours",[Zl,lc,zf,Zf])]}function cx(e,t,o){function r(n,t){ro(n,Bw,{value:t})}var n=vy.parts().field({factory:yy,inputClasses:["tox-textfield"],onSetValue:function(n){return jy.run(n).get(function(){})},inputBehaviours:ba([Gy.config({}),jy.config({invalidClass:"tox-textbox-field-invalid",getRoot:function(n){return Eo(n.element())},notify:{onValid:function(n){var t=Zf.getValue(n);ro(n,Tw,{color:t})}},validator:{validateOnLoad:!1,validate:function(n){var t=Zf.getValue(n);if(0===t.length)return Ny(an.value(!0));var e=we.fromTag("span");yr(e,"background-color",t);var o=Sr(e,"background-color").fold(function(){return an.error("blah")},function(n){return an.value(t)});return Ny(o)}}})]),selectOnFocus:!1}),i=e.label.map(function(n){return Dy(n,t.providers)}),u=vm(function(e,o){return Ow.sketch({dom:e.dom,components:e.components,toggleClass:"mce-active",dropdownBehaviours:ba([Ew.config({}),Gy.config({})]),layouts:e.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:o.getSink,fetch:function(t){return Vy(function(n){return e.fetch(n)}).map(function(n){return on.from(ub(Dn(Tv(Xo("menu-value"),n,function(n){e.onItemAction(t,n)},e.columns,e.presets,Fh.CLOSE_ON_EXECUTE,function(){return!1},o.providers),{movement:Bv(e.columns,e.presets)})))})},parts:{menu:Sv(0,0,e.presets)}})}({dom:{tag:"span",attributes:{"aria-label":t.providers.translate("Color swatch")}},layouts:on.some({onRtl:function(){return[ua]},onLtr:function(){return[aa]}}),components:[],fetch:Uv.getFetch(o.getColors(),o.hasCustomColors()),columns:o.getColorCols(),presets:"color",onItemAction:function(n,e){u.getOpt(n).each(function(t){"custom"===e?o.colorPicker(function(n){n.fold(function(){return oo(t,Dw)},function(n){r(t,n),Vv(n)})},"#ffffff"):r(t,"remove"===e?"":e)})}},t));return vy.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:i.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[n,u.asSpec()]}]),fieldBehaviours:ba([Kd("form-field-events",[lo(Tw,function(n,t){u.getOpt(n).each(function(n){yr(n.element(),"background-color",t.event().color())}),ro(n,uy,{name:e.name})}),lo(Bw,function(t,e){vy.getField(t).each(function(n){Zf.setValue(n,e.event().value()),Zl.getCurrent(t).each(vg.focus)})}),lo(Dw,function(t,n){vy.getField(t).each(function(n){Zl.getCurrent(t).each(vg.focus)})})])])})}function sx(n,t,e){return{hue:nn(n),saturation:nn(t),value:nn(e)}}function fx(t){return Sl({name:t+"-edge",overrides:function(n){return n.model.manager.edgeActions[t].fold(function(){return{}},function(o){return{events:co([mo(Ur(),o,[n]),mo(Yr(),o,[n]),mo(qr(),function(n,t,e){e.mouseIsDown.get()&&o(n,e)},[n])])}})}})}function lx(n){var t=n.event().raw();if(function(n){return-1!==n.type.indexOf("touch")}(t)){var e=t;return e.touches!==undefined&&1===e.touches.length?on.some(e.touches[0]).map(function(n){return Iu(n.clientX,n.clientY)}):on.none()}var o=t;return o.clientX!==undefined?on.some(o).map(function(n){return Iu(n.clientX,n.clientY)}):on.none()}function dx(n){return n.model.minX}function mx(n){return n.model.minY}function gx(n){return n.model.minX-1}function px(n){return n.model.minY-1}function hx(n){return n.model.maxX}function vx(n){return n.model.maxY}function bx(n){return n.model.maxX+1}function yx(n){return n.model.maxY+1}function xx(n,t,e){return t(n)-e(n)}function wx(n){return xx(n,hx,dx)}function Sx(n){return xx(n,vx,mx)}function Cx(n){return wx(n)/2}function kx(n){return Sx(n)/2}function Ox(n){return n.stepSize}function Ex(n){return n.snapToGrid}function Tx(n){return n.snapStart}function Bx(n){return n.rounded}function Dx(n,t){return n[t+"-edge"]!==undefined}function Ax(n){return Dx(n,"left")}function _x(n){return Dx(n,"right")}function Mx(n){return Dx(n,"top")}function Fx(n){return Dx(n,"bottom")}function Ix(n){return n.model.value.get()}function Rx(n){return{x:nn(n)}}function Vx(n){return{y:nn(n)}}function Nx(n,t){return{x:nn(n),y:nn(t)}}function Hx(n,t){ro(n,jw(),{value:t})}function Px(n,t,e,o){return n<t?n:e<n?e:n===t?t-1:Math.max(t,n-o)}function zx(n,t,e,o){return e<n?n:n<t?t:n===e?e+1:Math.min(e,n+o)}function Lx(n,t,e){return Math.max(t,Math.min(e,n))}function jx(n){var t=n.min,e=n.max,o=n.range,r=n.value,i=n.step,u=n.snap,a=n.snapStart,c=n.rounded,s=n.hasMinEdge,f=n.hasMaxEdge,l=n.minBound,d=n.maxBound,m=n.screenRange,g=s?t-1:t,p=f?e+1:e;if(r<l)return g;if(d<r)return p;var h=function(n,t,e){return Math.min(e,Math.max(n,t))-t}(r,l,d),v=Lx(h/m*o+t,g,p);return u&&t<=v&&v<=e?function(u,e,a,c,n){return n.fold(function(){var n=u-e,t=Math.round(n/c)*c;return Lx(e+t,e-1,a+1)},function(n){var t=(u-n)%c,e=Math.round(t/c),o=Math.floor((u-n)/c),r=Math.floor((a-n)/c),i=n+Math.min(r,o+e)*c;return Math.max(n,i)})}(v,t,e,i,a):c?Math.round(v):v}function Ux(n){var t=n.min,e=n.max,o=n.range,r=n.value,i=n.hasMinEdge,u=n.hasMaxEdge,a=n.maxBound,c=n.maxOffset,s=n.centerMinEdge,f=n.centerMaxEdge;return r<t?i?0:s:e<r?u?a:f:(r-t)/o*c}function Wx(n){return n.element().dom().getBoundingClientRect()}function Gx(n,t){return n[t]}function Xx(n){var t=Wx(n);return Gx(t,Uw)}function Yx(n){var t=Wx(n);return Gx(t,"right")}function qx(n){var t=Wx(n);return Gx(t,"top")}function Kx(n){var t=Wx(n);return Gx(t,"bottom")}function Jx(n){var t=Wx(n);return Gx(t,"width")}function $x(n){var t=Wx(n);return Gx(t,"height")}function Qx(n,t,e){return(n+t)/2-e}function Zx(n,t){var e=Wx(n),o=Wx(t),r=Gx(e,Uw),i=Gx(e,"right"),u=Gx(o,Uw);return Qx(r,i,u)}function nw(n,t){var e=Wx(n),o=Wx(t),r=Gx(e,"top"),i=Gx(e,"bottom"),u=Gx(o,"top");return Qx(r,i,u)}function tw(n,t){ro(n,jw(),{value:t})}function ew(n){return{x:nn(n)}}function ow(n,t,e){var o={min:dx(t),max:hx(t),range:wx(t),value:e,step:Ox(t),snap:Ex(t),snapStart:Tx(t),rounded:Bx(t),hasMinEdge:Ax(t),hasMaxEdge:_x(t),minBound:Xx(n),maxBound:Yx(n),screenRange:Jx(n)};return jx(o)}function rw(e){return function(n,t){return function(n,t,e){var o=(0<n?zx:Px)(Ix(e).x(),dx(e),hx(e),Ox(e));return tw(t,ew(o)),on.some(o)}(e,n,t).map(function(){return!0})}}function iw(n,t,e,o,r,i){var u=function(t,n,e,o,r){var i=Jx(t),u=o.bind(function(n){return on.some(Zx(n,t))}).getOr(0),a=r.bind(function(n){return on.some(Zx(n,t))}).getOr(i),c={min:dx(n),max:hx(n),range:wx(n),value:e,hasMinEdge:Ax(n),hasMaxEdge:_x(n),minBound:Xx(t),minOffset:0,maxBound:Yx(t),maxOffset:i,centerMinEdge:u,centerMaxEdge:a};return Ux(c)}(t,i,e,o,r);return Xx(t)-Xx(n)+u}function uw(n,t){ro(n,jw(),{value:t})}function aw(n){return{y:nn(n)}}function cw(n,t,e){var o={min:mx(t),max:vx(t),range:Sx(t),value:e,step:Ox(t),snap:Ex(t),snapStart:Tx(t),rounded:Bx(t),hasMinEdge:Mx(t),hasMaxEdge:Fx(t),minBound:qx(n),maxBound:Kx(n),screenRange:$x(n)};return jx(o)}function sw(e){return function(n,t){return function(n,t,e){var o=(0<n?zx:Px)(Ix(e).y(),mx(e),vx(e),Ox(e));return uw(t,aw(o)),on.some(o)}(e,n,t).map(function(){return!0})}}function fw(n,t,e,o,r,i){var u=function(t,n,e,o,r){var i=$x(t),u=o.bind(function(n){return on.some(nw(n,t))}).getOr(0),a=r.bind(function(n){return on.some(nw(n,t))}).getOr(i),c={min:mx(n),max:vx(n),range:Sx(n),value:e,hasMinEdge:Mx(n),hasMaxEdge:Fx(n),minBound:qx(t),minOffset:0,maxBound:Kx(t),maxOffset:i,centerMinEdge:u,centerMaxEdge:a};return Ux(c)}(t,i,e,o,r);return qx(t)-qx(n)+u}function lw(n,t){ro(n,jw(),{value:t})}function dw(n,t){return{x:nn(n),y:nn(t)}}function mw(e,o){return function(n,t){return function(n,t,e,o){var r=0<n?zx:Px,i=t?Ix(o).x():r(Ix(o).x(),dx(o),hx(o),Ox(o)),u=t?r(Ix(o).y(),mx(o),vx(o),Ox(o)):Ix(o).y();return lw(e,dw(i,u)),on.some(i)}(e,o,n,t).map(function(){return!0})}}function gw(n){return"<alloy.field."+n+">"}function pw(n){return function(n){return CS[n]}(n)}function hw(n,t,e){return Zf.config(Dn({store:{mode:"manual",getValue:t,setValue:e}},n.map(function(n){return{store:{initialValue:n}}}).getOr({})))}function vw(n,t,e){return hw(n,function(n){return t(n.element())},function(n,t){return e(n.element(),t)})}function bw(e,t){function o(n,t){t.stop()}function r(n){return function(t,e){bn(n,function(n){n(t,e)})}}function i(n,t){if(!Ch.isDisabled(n)){var e=t.event().raw();a(n,e.dataTransfer.files)}}function u(n,t){var e=t.event().raw().target.files;a(n,e)}var a=function(n,t){Zf.setValue(n,function(n){var t=new RegExp("("+".jpg,.jpeg,.png,.gif".split(/\s*,\s*/).join("|")+")$","i");return C(xn(n),function(n){return t.test(n.name)})}(t)),ro(n,uy,{name:e.name})},c=vm({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:ba([Kd("input-file-events",[vo(ri()),vo(gi())])])}),n=e.label.map(function(n){return Dy(n,t)}),s=vy.parts().field({factory:{sketch:function(n){return{uid:n.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:ba([DS([]),xS(),Ch.config({}),Cg.config({toggleClass:"dragenter",toggleOnExecute:!1}),Kd("dropzone-events",[lo("dragenter",r([o,Cg.toggle])),lo("dragleave",r([o,Cg.toggle])),lo("dragover",o),lo("drop",r([o,i])),lo(oi(),u)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:t.translate("Drop an image here")}},Gg.sketch({dom:{tag:"button",innerHtml:t.translate("Browse for an image"),styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[c.asSpec()],action:function(n){c.get(n).element().dom().click()},buttonBehaviours:ba([Gy.config({})])})]}]}}}});return By(n,s,["tox-form__group--stretched"],[])}function yw(n){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:n},behaviours:ba([vg.config({ignore:!0}),Gy.config({})])}}function xw(n,t){ro(n,ni(),{raw:{which:9,shiftKey:t}})}function ww(n,t){var e=RS&&n.sandboxed,o=N(N({},n.label.map(function(n){return{title:n}}).getOr({})),e?{sandbox:"allow-scripts allow-same-origin"}:{}),r=function(o){var r=ye("");return{getValue:function(n){return r.get()},setValue:function(n,t){if(o)Po(n.element(),"srcdoc",t);else{Po(n.element(),"src","javascript:''");var e=n.element().dom().contentWindow.document;e.open(),e.write(t),e.close()}r.set(t)}}}(e),i=n.label.map(function(n){return Dy(n,t)}),u=vy.parts().field({factory:{sketch:function(n){return IS({uid:n.uid,dom:{tag:"iframe",attributes:o},behaviours:ba([Gy.config({}),vg.config({}),TS(on.none(),r.getValue,r.setValue)])})}}});return By(i,u,["tox-form__group--stretched"],[])}var Sw=function(t,n){return t.getSystem().getByUid(n.uid+"-"+$y()).map(function(n){return function(){return an.value(n)}}).getOrThunk(function(){return n.lazySink.fold(function(){return function(){return an.error(new Error("No internal sink is specified, nor could an external sink be found"))}},function(n){return function(){return n(t)}})})},Cw=nn([ct("dom"),ct("fetch"),qu("onOpen"),Ku("onExecute"),St("getHotspot",on.some),St("getAnchorOverrides",nn({})),St("layouts",on.none()),Fs("dropdownBehaviours",[Cg,Jy,lg,vg]),ct("toggleClass"),St("eventOrder",{}),ht("lazySink"),St("matchWidth",!1),St("useMinWidth",!1),ht("role")].concat(ax())),kw=nn([wl({schema:[Gu()],name:"menu",defaults:function(n){return{onExecute:n.onExecute}}}),Qy()]),Ow=Al({name:"Dropdown",configFields:Cw(),partFields:kw(),factory:function(t,n,e,o){function r(n){zf.getState(n).each(function(n){Lg.highlightPrimary(n)})}function i(n,t){return io(n),on.some(!0)}var u,a,c={expand:function(n){Cg.isOn(n)||ex(t,function(n){return n},n,o,Z,Ay.HighlightNone).get(Z)},open:function(n){Cg.isOn(n)||ex(t,function(n){return n},n,o,Z,Ay.HighlightFirst).get(Z)},isOpen:Cg.isOn,close:function(n){Cg.isOn(n)&&ex(t,function(n){return n},n,o,Z,Ay.HighlightFirst).get(Z)},repositionMenus:function(n){Cg.isOn(n)&&ux(n)}};return{uid:t.uid,dom:t.dom,components:n,behaviours:Rs(t.dropdownBehaviours,[Cg.config({toggleClass:t.toggleClass,aria:{mode:"expanded"}}),Jy.config({others:{sandbox:function(n){return ix(t,n,{onOpen:function(){Cg.on(n)},onClose:function(){Cg.off(n)}})}}}),lg.config({mode:"special",onSpace:i,onEnter:i,onDown:function(n,t){if(Ow.isOpen(n)){var e=Jy.getCoupled(n,"sandbox");r(e)}else Ow.open(n);return on.some(!0)},onEscape:function(n,t){return Ow.isOpen(n)?(Ow.close(n),on.some(!0)):on.none()}}),vg.config({})]),events:rm(on.some(function(n){ex(t,function(n){return n},n,o,r,Ay.HighlightFirst).get(Z)})),eventOrder:N(N({},t.eventOrder),(u={},u[di()]=["disabling","toggling","alloy.base.behaviour"],u)),apis:c,domModification:{attributes:N(N({"aria-haspopup":"true"},t.role.fold(function(){return{}},function(n){return{role:n}})),"button"===t.dom.tag?{type:(a="type",Nn(t.dom,"attributes").bind(function(n){return Nn(n,a)})).getOr("button")}:{})}}},apis:{open:function(n,t){return n.open(t)},expand:function(n,t){return n.expand(t)},close:function(n,t){return n.close(t)},isOpen:function(n,t){return n.isOpen(t)},repositionMenus:function(n,t){return n.repositionMenus(t)}}}),Ew=ya({fields:[],name:"unselecting",active:/* */Object.freeze({events:function(n){return co([so(ui(),nn(!0))])},exhibit:function(n,t){return Zo({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})}})}),Tw=Xo("color-input-change"),Bw=Xo("color-swatch-change"),Dw=Xo("color-picker-cancel"),Aw=nn(Xo("rgb-hex-update")),_w=nn(Xo("slider-update")),Mw=nn(Xo("palette-update")),Fw=Sl({schema:[ct("dom")],name:"label"}),Iw=fx("top-left"),Rw=fx("top"),Vw=fx("top-right"),Nw=fx("right"),Hw=fx("bottom-right"),Pw=fx("bottom"),zw=fx("bottom-left"),Lw=[Fw,fx("left"),Nw,Rw,Pw,Iw,Vw,zw,Hw,xl({name:"thumb",defaults:nn({dom:{styles:{position:"absolute"}}}),overrides:function(n){return{events:co([po(Ur(),n,"spectrum"),po(Wr(),n,"spectrum"),po(Gr(),n,"spectrum"),po(Yr(),n,"spectrum"),po(qr(),n,"spectrum"),po(Jr(),n,"spectrum")])}}}),xl({schema:[At("mouseIsDown",function(){return ye(!1)})],name:"spectrum",overrides:function(e){function o(t,n){return r.getValueFromEvent(n).map(function(n){return r.setValueFrom(t,e,n)})}var r=e.model.manager;return{behaviours:ba([lg.config({mode:"special",onLeft:function(n){return r.onLeft(n,e)},onRight:function(n){return r.onRight(n,e)},onUp:function(n){return r.onUp(n,e)},onDown:function(n){return r.onDown(n,e)}}),vg.config({})]),events:co([lo(Ur(),o),lo(Wr(),o),lo(Yr(),o),lo(qr(),function(n,t){e.mouseIsDown.get()&&o(n,t)})])}}})],jw=nn("slider.change.value"),Uw="left",Ww=rw(-1),Gw=rw(1),Xw=on.none,Yw=on.none,qw={"top-left":on.none(),top:on.none(),"top-right":on.none(),right:on.some(function(n,t){Hx(n,Rx(bx(t)))}),"bottom-right":on.none(),bottom:on.none(),"bottom-left":on.none(),left:on.some(function(n,t){Hx(n,Rx(gx(t)))})},Kw=/* */Object.freeze({setValueFrom:function(n,t,e){var o=ow(n,t,e),r=ew(o);return tw(n,r),o},setToMin:function(n,t){var e=dx(t);tw(n,ew(e))},setToMax:function(n,t){var e=hx(t);tw(n,ew(e))},findValueOfOffset:ow,getValueFromEvent:function(n){return lx(n).map(function(n){return n.left()})},findPositionOfValue:iw,setPositionFromValue:function(n,t,e,o){var r=Ix(e),i=iw(n,o.getSpectrum(n),r.x(),o.getLeftEdge(n),o.getRightEdge(n),e),u=mu(t.element())/2;yr(t.element(),"left",i-u+"px")},onLeft:Ww,onRight:Gw,onUp:Xw,onDown:Yw,edgeActions:qw}),Jw=on.none,$w=on.none,Qw=sw(-1),Zw=sw(1),nS={"top-left":on.none(),top:on.some(function(n,t){Hx(n,Vx(px(t)))}),"top-right":on.none(),right:on.none(),"bottom-right":on.none(),bottom:on.some(function(n,t){Hx(n,Vx(yx(t)))}),"bottom-left":on.none(),left:on.none()},tS=/* */Object.freeze({setValueFrom:function(n,t,e){var o=cw(n,t,e),r=aw(o);return uw(n,r),o},setToMin:function(n,t){var e=mx(t);uw(n,aw(e))},setToMax:function(n,t){var e=vx(t);uw(n,aw(e))},findValueOfOffset:cw,getValueFromEvent:function(n){return lx(n).map(function(n){return n.top()})},findPositionOfValue:fw,setPositionFromValue:function(n,t,e,o){var r=Ix(e),i=fw(n,o.getSpectrum(n),r.y(),o.getTopEdge(n),o.getBottomEdge(n),e),u=su(t.element())/2;yr(t.element(),"top",i-u+"px")},onLeft:Jw,onRight:$w,onUp:Qw,onDown:Zw,edgeActions:nS}),eS=mw(-1,!1),oS=mw(1,!1),rS=mw(-1,!0),iS=mw(1,!0),uS={"top-left":on.some(function(n,t){Hx(n,Nx(gx(t),px(t)))}),top:on.some(function(n,t){Hx(n,Nx(Cx(t),px(t)))}),"top-right":on.some(function(n,t){Hx(n,Nx(bx(t),px(t)))}),right:on.some(function(n,t){Hx(n,Nx(bx(t),kx(t)))}),"bottom-right":on.some(function(n,t){Hx(n,Nx(bx(t),yx(t)))}),bottom:on.some(function(n,t){Hx(n,Nx(Cx(t),yx(t)))}),"bottom-left":on.some(function(n,t){Hx(n,Nx(gx(t),yx(t)))}),left:on.some(function(n,t){Hx(n,Nx(gx(t),kx(t)))})},aS=/* */Object.freeze({setValueFrom:function(n,t,e){var o=ow(n,t,e.left()),r=cw(n,t,e.top()),i=dw(o,r);return lw(n,i),i},setToMin:function(n,t){var e=dx(t),o=mx(t);lw(n,dw(e,o))},setToMax:function(n,t){var e=hx(t),o=vx(t);lw(n,dw(e,o))},getValueFromEvent:function(n){return lx(n)},setPositionFromValue:function(n,t,e,o){var r=Ix(e),i=iw(n,o.getSpectrum(n),r.x(),o.getLeftEdge(n),o.getRightEdge(n),e),u=fw(n,o.getSpectrum(n),r.y(),o.getTopEdge(n),o.getBottomEdge(n),e),a=mu(t.element())/2,c=su(t.element())/2;yr(t.element(),"left",i-a+"px"),yr(t.element(),"top",u-c+"px")},onLeft:eS,onRight:oS,onUp:rS,onDown:iS,edgeActions:uS}),cS=Al({name:"Slider",configFields:[St("stepSize",1),St("onChange",Z),St("onChoose",Z),St("onInit",Z),St("onDragStart",Z),St("onDragEnd",Z),St("snapToGrid",!1),St("rounded",!0),ht("snapStart"),st("model",it("mode",{x:[St("minX",0),St("maxX",100),At("value",function(n){return ye(n.mode.minX)}),ct("getInitialValue"),Qu("manager",Kw)],y:[St("minY",0),St("maxY",100),At("value",function(n){return ye(n.mode.minY)}),ct("getInitialValue"),Qu("manager",tS)],xy:[St("minX",0),St("maxX",100),St("minY",0),St("maxY",100),At("value",function(n){return ye({x:nn(n.mode.minX),y:nn(n.mode.minY)})}),ct("getInitialValue"),Qu("manager",aS)]})),Fs("sliderBehaviours",[lg,Zf]),At("mouseIsDown",function(){return ye(!1)})],partFields:Lw,factory:function(i,n,t,e){function u(n){return Ks(n,i,"thumb")}function a(n){return Ks(n,i,"spectrum")}function o(n){return qs(n,i,"left-edge")}function r(n){return qs(n,i,"right-edge")}function c(n){return qs(n,i,"top-edge")}function s(n){return qs(n,i,"bottom-edge")}function f(n,t){v.setPositionFromValue(n,t,i,{getLeftEdge:o,getRightEdge:r,getTopEdge:c,getBottomEdge:s,getSpectrum:a})}function l(n,t){h.value.set(t);var e=u(n);return f(n,e),i.onChange(n,e,t),on.some(!0)}function d(e){var n=i.mouseIsDown.get();i.mouseIsDown.set(!1),n&&qs(e,i,"thumb").each(function(n){var t=h.value.get();i.onChoose(e,n,t)})}function m(n,t){t.stop(),i.mouseIsDown.set(!0),i.onDragStart(n,u(n))}function g(n,t){t.stop(),i.onDragEnd(n,u(n)),d(n)}var p,h=i.model,v=h.manager;return{uid:i.uid,dom:i.dom,components:n,behaviours:Rs(i.sliderBehaviours,[lg.config({mode:"special",focusIn:function(n){return qs(n,i,"spectrum").map(lg.focusIn).map(nn(!0))}}),Zf.config({store:{mode:"manual",getValue:function(n){return h.value.get()}}}),lc.config({channels:(p={},p[Uf()]={onReceive:d},p)})]),events:co([lo(jw(),function(n,t){l(n,t.event().value())}),Ii(function(n,t){var e=h.getInitialValue();h.value.set(e);var o=u(n);f(n,o);var r=a(n);i.onInit(n,o,r,h.value.get())}),lo(Ur(),m),lo(Gr(),g),lo(Yr(),m),lo(Jr(),g)]),apis:{resetToMin:function(n){v.setToMin(n,i)},resetToMax:function(n){v.setToMax(n,i)},changeValue:l,refresh:f},domModification:{styles:{position:"relative"}}}},apis:{resetToMin:function(n,t){n.resetToMin(t)},resetToMax:function(n,t){n.resetToMax(t)},refresh:function(n,t){n.refresh(t)}}}),sS=function(n,t){var e=cS.parts().spectrum({dom:{tag:"div",classes:[t("hue-slider-spectrum")],attributes:{role:"presentation"}}}),o=cS.parts().thumb({dom:{tag:"div",classes:[t("hue-slider-thumb")],attributes:{role:"presentation"}}});return cS.sketch({dom:{tag:"div",classes:[t("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:nn({y:nn(0)})},components:[e,o],sliderBehaviours:ba([vg.config({})]),onChange:function(n,t,e){ro(n,_w(),{value:e})}})},fS=[Fs("formBehaviours",[Zf])],lS=function(o,n,t){return{uid:o.uid,dom:o.dom,components:n,behaviours:Rs(o.formBehaviours,[Zf.config({store:{mode:"manual",getValue:function(n){var t=$s(n,o);return P(t,function(n,t){return n().bind(function(n){return function(n,t){return n.fold(function(){return an.error(t)},an.value)}(Zl.getCurrent(n),"missing current")}).map(Zf.getValue)})},setValue:function(e,n){Cn(n,function(t,n){qs(e,o,n).each(function(n){Zl.getCurrent(n).each(function(n){Zf.setValue(n,t)})})})}}})]),apis:{getField:function(n,t){return qs(n,o,t).bind(Zl.getCurrent)}}}},dS={getField:$o(function(n,t,e){return n.getField(t,e)}),sketch:function(n){var e,t=(e=[],{field:function(n,t){return e.push(n),Us("form",gw(n),t)},record:function(){return e}}),o=n(t),r=t.record(),i=S(r,function(n){return xl({name:n,pname:gw(n)})});return of("form",fS,i,lS,o)}},mS=Xo("valid-input"),gS=Xo("invalid-input"),pS=Xo("validating-input"),hS="colorcustom.rgb.",vS=function(d,m,g,p){function h(n,t,e,o,r){var i=d(hS+"range"),u=[vy.parts().label({dom:{tag:"label",innerHtml:e,attributes:{"aria-label":o}}}),vy.parts().field({data:r,factory:yy,inputAttributes:N({type:"text"},"hex"===t?{"aria-live":"polite"}:{}),inputClasses:[m("textfield")],inputBehaviours:ba([function(t,o){return jy.config({invalidClass:m("invalid"),notify:{onValidate:function(n){ro(n,pS,{type:t})},onValid:function(n){ro(n,mS,{type:t,value:Zf.getValue(n)})},onInvalid:function(n){ro(n,gS,{type:t,value:Zf.getValue(n)})}},validator:{validate:function(n){var t=Zf.getValue(n),e=o(t)?an.value(!0):an.error(d("aria.input.invalid"));return Ny(e)},validateOnLoad:!1}})}(t,n),Gy.config({})]),onSetValue:function(n){jy.isInvalid(n)&&jy.run(n).get(Z)}})],a="hex"!==t?[vy.parts()["aria-descriptor"]({text:i})]:[];return{dom:{tag:"div",attributes:{role:"presentation"}},components:u.concat(a)}}function v(n,t){var e=t.red(),o=t.green(),r=t.blue();Zf.setValue(n,{red:e,green:o,blue:r})}function b(n,t){y.getOpt(n).each(function(n){yr(n.element(),"background-color","#"+t.value())})}var y=vm({dom:{tag:"div",classes:[m("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}});return Dl({factory:function(){function r(n){return u[n]().get()}function i(n,t){u[n]().set(t)}function t(n,t){var e=t.event();"hex"!==e.type()?i(e.type(),on.none()):p(n)}function o(e,n,t){var o=parseInt(t,10);i(n,on.some(o)),r("red").bind(function(e){return r("green").bind(function(t){return r("blue").map(function(n){return Wh(e,t,n,1)})})}).each(function(n){var t=function(t,n){var e=Uh(n);return dS.getField(t,"hex").each(function(n){vg.isFocused(n)||Zf.setValue(t,{hex:e.value()})}),e}(e,n);b(e,t)})}function e(n,t){var e=t.event();!function(n){return"hex"===n.type()}(e)?o(n,e.type(),e.value()):function(n,t){g(n);var e=Ph(t);i("hex",on.some(t));var o=Yh(e);v(n,o),a(o),ro(n,Aw(),{hex:e}),b(n,e)}(n,e.value())}function n(n){return{label:d(hS+n+".label"),description:d(hS+n+".description")}}var u={red:nn(ye(on.some(255))),green:nn(ye(on.some(255))),blue:nn(ye(on.some(255))),hex:nn(ye(on.some("ffffff")))},a=function(n){var t=n.red(),e=n.green(),o=n.blue();i("red",on.some(t)),i("green",on.some(e)),i("blue",on.some(o))},c=n("red"),s=n("green"),f=n("blue"),l=n("hex");return Dn(dS.sketch(function(n){return{dom:{tag:"form",classes:[m("rgb-form")],attributes:{"aria-label":d("aria.color.picker")}},components:[n.field("red",vy.sketch(h(Gh,"red",c.label,c.description,255))),n.field("green",vy.sketch(h(Gh,"green",s.label,s.description,255))),n.field("blue",vy.sketch(h(Gh,"blue",f.label,f.description,255))),n.field("hex",vy.sketch(h(zh,"hex",l.label,l.description,"ffffff"))),y.asSpec()],formBehaviours:ba([jy.config({invalidClass:m("form-invalid")}),Kd("rgb-form-events",[lo(mS,e),lo(gS,t),lo(pS,t)])])}}),{apis:{updateHex:function(n,t){Zf.setValue(n,{hex:t.value()}),function(n,t){var e=Yh(t);v(n,e),a(e)}(n,t),b(n,t)}}})},name:"RgbForm",configFields:[],apis:{updateHex:function(n,t,e){n.updateHex(t,e)}},extraApis:{}})},bS=function(n,o){function r(n,t){var e=n.width,o=n.height,r=n.getContext("2d");if(null!==r){r.fillStyle=t,r.fillRect(0,0,e,o);var i=r.createLinearGradient(0,0,e,0);i.addColorStop(0,"rgba(255,255,255,1)"),i.addColorStop(1,"rgba(255,255,255,0)"),r.fillStyle=i,r.fillRect(0,0,e,o);var u=r.createLinearGradient(0,0,0,o);u.addColorStop(0,"rgba(0,0,0,0)"),u.addColorStop(1,"rgba(0,0,0,1)"),r.fillStyle=u,r.fillRect(0,0,e,o)}}var i=cS.parts().spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[o("sv-palette-spectrum")]}}),u=cS.parts().thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[o("sv-palette-thumb")],innerHtml:"<div class="+o("sv-palette-inner-thumb")+' role="presentation"></div>'}});return Dl({factory:function(n){var t=nn({x:nn(0),y:nn(0)}),e=ba([Zl.config({find:on.some}),vg.config({})]);return cS.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[o("sv-palette")]},model:{mode:"xy",getInitialValue:t},rounded:!1,components:[i,u],onChange:function(n,t,e){ro(n,Mw(),{value:e})},onInit:function(n,t,e,o){r(e.element().dom(),Kh(ov()))},sliderBehaviours:e})},name:"SaturationBrightnessPalette",configFields:[],apis:{setRgba:function(n,t,e){!function(n,t){var e=n.components()[0].element().dom();r(e,Kh(t))}(t,e)}},extraApis:{}})},yS=function(l,d){return Dl({name:"ColourPicker",configFields:[ct("dom"),St("onValidHex",Z),St("onInvalidHex",Z)],factory:function(n){function t(n,e){u.getOpt(n).each(function(n){var t=Yh(e);s.paletteRgba().set(t),i.setRgba(n,t)})}function e(n,t){f.getOpt(n).each(function(n){r.updateHex(n,t)})}function a(t,e,n){bn(n,function(n){n(t,e)})}var o,c,r=vS(l,d,n.onValidHex,n.onInvalidHex),i=bS(l,d),s={paletteRgba:nn(ye(ov()))},u=vm(i.sketch({})),f=vm(r.sketch({}));return{uid:n.uid,dom:n.dom,components:[u.asSpec(),sS(l,d),f.asSpec()],behaviours:ba([Kd("colour-picker-events",[lo(Mw(),(c=[e],function(n,t){var e=t.event().value(),o=function(n){var t,e=0,o=0,r=n.red()/255,i=n.green()/255,u=n.blue()/255,a=Math.min(r,Math.min(i,u)),c=Math.max(r,Math.max(i,u));return a===c?sx(0,0,100*(o=a)):(e=60*((e=r===a?3:u===a?1:5)-(r===a?i-u:u===a?r-i:u-r)/(c-a)),t=(c-a)/c,o=c,sx(Math.round(e),Math.round(100*t),Math.round(100*o)))}(s.paletteRgba().get()),r=sx(o.hue(),e.x(),100-e.y()),i=Xh(r),u=Uh(i);a(n,u,c)})),lo(_w(),(o=[t,e],function(n,t){var e=function(n){var t=sx((100-n)/100*360,100,100),e=Xh(t);return Uh(e)}(t.event().value().y());a(n,e,o)}))]),Zl.config({find:function(n){return f.getOpt(n)}}),lg.config({mode:"acyclic"})])}}})},xS=function(){return Zl.config({find:on.some})},wS=function(n){return Zl.config({find:n.getOpt})},SS=function(n){return Zl.config({find:function(t){return Do(t.element(),n).bind(function(n){return t.getSystem().getByDom(n).toOption()})}})},CS={"colorcustom.rgb.red.label":"R","colorcustom.rgb.red.description":"Red component","colorcustom.rgb.green.label":"G","colorcustom.rgb.green.description":"Green component","colorcustom.rgb.blue.label":"B","colorcustom.rgb.blue.description":"Blue component","colorcustom.rgb.hex.label":"#","colorcustom.rgb.hex.description":"Hex color code","colorcustom.rgb.range":"Range 0 to 255","colorcustom.sb.saturation":"Saturation","colorcustom.sb.brightness":"Brightness","colorcustom.sb.picker":"Saturation and Brightness Picker","colorcustom.sb.palette":"Saturation and Brightness Palette","colorcustom.sb.instructions":"Use arrow keys to select saturation and brightness, on x and y axes","colorcustom.hue.hue":"Hue","colorcustom.hue.slider":"Hue Slider","colorcustom.hue.palette":"Hue Palette","colorcustom.hue.instructions":"Use arrow keys to select a hue","aria.color.picker":"Color Picker","aria.input.invalid":"Invalid input"},kS=tinymce.util.Tools.resolve("tinymce.Resource"),OS=re([St("preprocess",l),St("postprocess",l)]),ES=function(r,n){var i=ot("RepresentingConfigs.memento processors",OS,n);return Zf.config({store:{mode:"manual",getValue:function(n){var t=r.get(n),e=Zf.getValue(t);return i.postprocess(e)},setValue:function(n,t){var e=i.preprocess(t),o=r.get(n);Zf.setValue(o,e)}}})},TS=hw,BS=function(n){return vw(n,Vo,No)},DS=function(n){return Zf.config({store:{mode:"memory",initialValue:n}})},AS=Xo("alloy-fake-before-tabstop"),_S=Xo("alloy-fake-after-tabstop"),MS=function(n){return lb(n,["."+AS,"."+_S].join(","),nn(!1))},FS=function(n,t){var e=t.element();mr(e,AS)?xw(n,!0):mr(e,_S)&&xw(n,!1)},IS=function(n){return{dom:{tag:"div",classes:["tox-navobj"]},components:[yw([AS]),n,yw([_S])],behaviours:ba([SS(1)])}},RS=!(Ht().browser.isIE()||Ht().browser.isEdge());function VS(n,t){return PS(v.document.createElement("canvas"),n,t)}function NS(n){var t=VS(n.width,n.height);return HS(t).drawImage(n,0,0),t}function HS(n){return n.getContext("2d")}function PS(n,t,e){return n.width=t,n.height=e,n}function zS(n){return n.naturalWidth||n.width}function LS(n){return n.naturalHeight||n.height}var jS,US,WS=window.Promise?window.Promise:(jS=GS.immediateFn||"function"==typeof window.setImmediate&&window.setImmediate||function(n){v.setTimeout(n,1)},US=Array.isArray||function(n){return"[object Array]"===Object.prototype.toString.call(n)},GS.prototype["catch"]=function(n){return this.then(null,n)},GS.prototype.then=function(e,o){var r=this;return new GS(function(n,t){YS.call(r,new $S(e,o,n,t))})},GS.all=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var c=Array.prototype.slice.call(1===n.length&&US(n[0])?n[0]:n);return new GS(function(r,i){if(0===c.length)return r([]);var u=c.length;function a(t,n){try{if(n&&("object"==typeof n||"function"==typeof n)){var e=n.then;if("function"==typeof e)return void e.call(n,function(n){a(t,n)},i)}c[t]=n,0==--u&&r(c)}catch(o){i(o)}}for(var n=0;n<c.length;n++)a(n,c[n])})},GS.resolve=function(t){return t&&"object"==typeof t&&t.constructor===GS?t:new GS(function(n){n(t)})},GS.reject=function(e){return new GS(function(n,t){t(e)})},GS.race=function(r){return new GS(function(n,t){for(var e=0,o=r;e<o.length;e++)o[e].then(n,t)})},GS);function GS(n){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof n)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],QS(n,XS(qS,this),XS(KS,this))}function XS(n,t){return function(){return n.apply(t,arguments)}}function YS(o){var r=this;null!==this._state?jS(function(){var n=r._state?o.onFulfilled:o.onRejected;if(null!==n){var t;try{t=n(r._value)}catch(e){return void o.reject(e)}o.resolve(t)}else(r._state?o.resolve:o.reject)(r._value)}):this._deferreds.push(o)}function qS(n){try{if(n===this)throw new TypeError("A promise cannot be resolved with itself.");if(n&&("object"==typeof n||"function"==typeof n)){var t=n.then;if("function"==typeof t)return void QS(XS(t,n),XS(qS,this),XS(KS,this))}this._state=!0,this._value=n,JS.call(this)}catch(e){KS.call(this,e)}}function KS(n){this._state=!1,this._value=n,JS.call(this)}function JS(){for(var n=0,t=this._deferreds;n<t.length;n++){var e=t[n];YS.call(this,e)}this._deferreds=[]}function $S(n,t,e,o){this.onFulfilled="function"==typeof n?n:null,this.onRejected="function"==typeof t?t:null,this.resolve=e,this.reject=o}function QS(n,t,e){var o=!1;try{n(function(n){o||(o=!0,t(n))},function(n){o||(o=!0,e(n))})}catch(r){if(o)return;o=!0,e(r)}}function ZS(e){return new WS(function(n,t){(function p(n){var t=n.split(","),e=/data:([^;]+)/.exec(t[0]);if(!e)return on.none();for(var o=e[1],r=t[1],i=v.atob(r),u=i.length,a=Math.ceil(u/1024),c=new Array(a),s=0;s<a;++s){for(var f=1024*s,l=Math.min(1024+f,u),d=new Array(l-f),m=f,g=0;m<l;++g,++m)d[g]=i[m].charCodeAt(0);c[s]=new Uint8Array(d)}return on.some(new v.Blob(c,{type:o}))})(e).fold(function(){t("uri is not base64: "+e)},n)})}function nC(n,o,r){return o=o||"image/png",v.HTMLCanvasElement.prototype.toBlob?new WS(function(t,e){n.toBlob(function(n){n?t(n):e()},o,r)}):ZS(n.toDataURL(o,r))}function tC(n){return function t(a){return new WS(function(n,t){var e=v.URL.createObjectURL(a),o=new v.Image,r=function(){o.removeEventListener("load",i),o.removeEventListener("error",u)};function i(){r(),n(o)}function u(){r(),t("Unable to load data of type "+a.type+": "+e)}o.addEventListener("load",i),o.addEventListener("error",u),o.src=e,o.complete&&i()})}(n).then(function(n){!function e(n){v.URL.revokeObjectURL(n.src)}(n);var t=VS(zS(n),LS(n));return HS(t).drawImage(n,0,0),t})}function eC(n,t,e){var o=t.type;function r(t,e){return n.then(function(n){return function o(n,t,e){return t=t||"image/png",n.toDataURL(t,e)}(n,t,e)})}return{getType:nn(o),toBlob:function i(){return WS.resolve(t)},toDataURL:function u(){return e},toBase64:function a(){return e.split(",")[1]},toAdjustedBlob:function c(t,e){return n.then(function(n){return nC(n,t,e)})},toAdjustedDataURL:r,toAdjustedBase64:function s(n,t){return r(n,t).then(function(n){return n.split(",")[1]})},toCanvas:function f(){return n.then(NS)}}}function oC(t){return function n(e){return new WS(function(n){var t=new v.FileReader;t.onloadend=function(){n(t.result)},t.readAsDataURL(e)})}(t).then(function(n){return eC(tC(t),t,n)})}function rC(t,n){return nC(t,n).then(function(n){return eC(WS.resolve(t),n,t.toDataURL())})}function iC(n,t,e){var o="string"==typeof n?parseFloat(n):n;return e<o?o=e:o<t&&(o=t),o}var uC=[0,.01,.02,.04,.05,.06,.07,.08,.1,.11,.12,.14,.15,.16,.17,.18,.2,.21,.22,.24,.25,.27,.28,.3,.32,.34,.36,.38,.4,.42,.44,.46,.48,.5,.53,.56,.59,.62,.65,.68,.71,.74,.77,.8,.83,.86,.89,.92,.95,.98,1,1.06,1.12,1.18,1.24,1.3,1.36,1.42,1.48,1.54,1.6,1.66,1.72,1.78,1.84,1.9,1.96,2,2.12,2.25,2.37,2.5,2.62,2.75,2.87,3,3.2,3.4,3.6,3.8,4,4.3,4.7,4.9,5,5.5,6,6.5,6.8,7,7.3,7.5,7.8,8,8.4,8.7,9,9.4,9.6,9.8,10];function aC(n,t){for(var e,o=[],r=new Array(25),i=0;i<5;i++){for(var u=0;u<5;u++)o[u]=t[u+5*i];for(u=0;u<5;u++){for(var a=e=0;a<5;a++)e+=n[u+5*a]*o[a];r[u+5*i]=e}}return r}function cC(t,e){return t.toCanvas().then(function(n){return function i(n,t,e){var o=HS(n);var r=function B(n,t){for(var e,o,r,i,u=n.data,a=t[0],c=t[1],s=t[2],f=t[3],l=t[4],d=t[5],m=t[6],g=t[7],p=t[8],h=t[9],v=t[10],b=t[11],y=t[12],x=t[13],w=t[14],S=t[15],C=t[16],k=t[17],O=t[18],E=t[19],T=0;T<u.length;T+=4)e=u[T],o=u[T+1],r=u[T+2],i=u[T+3],u[T]=e*a+o*c+r*s+i*f+l,u[T+1]=e*d+o*m+r*g+i*p+h,u[T+2]=e*v+o*b+r*y+i*x+w,u[T+3]=e*S+o*C+r*k+i*O+E;return n}(o.getImageData(0,0,n.width,n.height),e);return o.putImageData(r,0,0),rC(n,t)}(n,t.getType(),e)})}function sC(t,e){return t.toCanvas().then(function(n){return function u(n,t,e){var o=HS(n);var r=o.getImageData(0,0,n.width,n.height),i=o.getImageData(0,0,n.width,n.height);return i=function w(n,t,e){function o(n,t,e){return e<n?n=e:n<t&&(n=t),n}for(var r=Math.round(Math.sqrt(e.length)),i=Math.floor(r/2),u=n.data,a=t.data,c=n.width,s=n.height,f=0;f<s;f++)for(var l=0;l<c;l++){for(var d=0,m=0,g=0,p=0;p<r;p++)for(var h=0;h<r;h++){var v=o(l+h-i,0,c-1),b=4*(o(f+p-i,0,s-1)*c+v),y=e[p*r+h];d+=u[b]*y,m+=u[1+b]*y,g+=u[2+b]*y}var x=4*(f*c+l);a[x]=o(d,0,255),a[1+x]=o(m,0,255),a[2+x]=o(g,0,255)}return t}(r,i,e),o.putImageData(i,0,0),rC(n,t)}(n,t.getType(),e)})}function fC(e){return function(n,t){return cC(n,e([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1],t))}}function lC(n,t,e,o){return cC(n,function r(n,t,e,o){return aC(n,[t=iC(t,0,2),0,0,0,0,0,e=iC(e,0,2),0,0,0,0,0,o=iC(o,0,2),0,0,0,0,0,1,0,0,0,0,0,1])}([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1],t,e,o))}var dC=function cI(t){return function(n){return cC(n,t)}}([-1,0,0,0,255,0,-1,0,0,255,0,0,-1,0,255,0,0,0,1,0,0,0,0,0,1]),mC=fC(function sI(n,t){return aC(n,[1,0,0,0,t=iC(255*t,-255,255),0,1,0,0,t,0,0,1,0,t,0,0,0,1,0,0,0,0,0,1])}),gC=fC(function fI(n,t){var e;return t=iC(t,-1,1),aC(n,[(e=(t*=100)<0?127+t/100*127:127*(e=0===(e=t%1)?uC[t]:uC[Math.floor(t)]*(1-e)+uC[Math.floor(t)+1]*e)+127)/127,0,0,0,.5*(127-e),0,e/127,0,0,.5*(127-e),0,0,e/127,0,.5*(127-e),0,0,0,1,0,0,0,0,0,1])}),pC=function lI(t){return function(n){return sC(n,t)}}([0,-1,0,-1,5,-1,0,-1,0]),hC=function dI(c){return function(t,e){return t.toCanvas().then(function(n){return function(n,t,e){var o=HS(n),r=new Array(256);for(var i=0;i<r.length;i++)r[i]=c(i,e);var u=function a(n,t){for(var e=n.data,o=0;o<e.length;o+=4)e[o]=t[e[o]],e[o+1]=t[e[o+1]],e[o+2]=t[e[o+2]];return n}(o.getImageData(0,0,n.width,n.height),r);return o.putImageData(u,0,0),rC(n,t)}(n,t.getType(),e)})}}(function(n,t){return 255*Math.pow(n/255,1-t)});function vC(n,t,e){var o=zS(n),r=LS(n),i=t/o,u=e/r,a=!1;(i<.5||2<i)&&(i=i<.5?.5:2,a=!0),(u<.5||2<u)&&(u=u<.5?.5:2,a=!0);var c=function s(u,a,c){return new WS(function(n){var t=zS(u),e=LS(u),o=Math.floor(t*a),r=Math.floor(e*c),i=VS(o,r);HS(i).drawImage(u,0,0,t,e,0,0,o,r),n(i)})}(n,i,u);return a?c.then(function(n){return vC(n,t,e)}):c}function bC(t,e){return t.toCanvas().then(function(n){return function a(n,t,e){var o=VS(n.width,n.height),r=HS(o),i=0,u=0;90!==(e=e<0?360+e:e)&&270!==e||PS(o,o.height,o.width);90!==e&&180!==e||(i=o.width);270!==e&&180!==e||(u=o.height);return r.translate(i,u),r.rotate(e*Math.PI/180),r.drawImage(n,0,0),rC(o,t)}(n,t.getType(),e)})}function yC(t,e){return t.toCanvas().then(function(n){return function i(n,t,e){var o=VS(n.width,n.height),r=HS(o);"v"===e?(r.scale(1,-1),r.drawImage(n,0,-o.height)):(r.scale(-1,1),r.drawImage(n,-o.width,0));return rC(o,t)}(n,t.getType(),e)})}function xC(t,e,o,r,i){return t.toCanvas().then(function(n){return function a(n,t,e,o,r,i){var u=VS(r,i);return HS(u).drawImage(n,-e,-o),rC(u,t)}(n,t.getType(),e,o,r,i)})}function wC(n){return dC(n)}function SC(n){return pC(n)}function CC(n,t){return hC(n,t)}function kC(n,t){return mC(n,t)}function OC(n,t){return gC(n,t)}function EC(n,t){return yC(n,t)}function TC(n,t,e){return function r(t,e,o){return t.toCanvas().then(function(n){return vC(n,e,o).then(function(n){return rC(n,t.getType())})})}(n,t,e)}function BC(n,t){return bC(n,t)}function DC(n,t){return N({dom:{tag:"span",innerHtml:n,classes:["tox-icon","tox-tbtn__icon-wrap"]}},t)}function AC(n,t){return DC(ym(n,t),{})}function _C(n,t){return DC(ym(n,t),{behaviours:ba([mg.config({})])})}function MC(n,t,e){return{dom:{tag:"span",innerHtml:e.translate(n),classes:[t+"__select-label"]},behaviours:ba([mg.config({})])}}function FC(n,t,o){function e(n,t){var e=Zf.getValue(n);return vg.focus(e),ro(e,"keydown",{raw:t.event().raw()}),Ow.close(e),on.some(!0)}var r=ye(Z),i=n.text.map(function(n){return vm(MC(n,t,o.providers))}),u=n.icon.map(function(n){return vm(_C(n,o.providers.icons))}),a=n.role.fold(function(){return{}},function(n){return{role:n}}),c=n.tooltip.fold(function(){return{}},function(n){var t=o.providers.translate(n);return{title:t,"aria-label":t}});return vm(Ow.sketch(N(N({},a),{dom:{tag:"button",classes:[t,t+"--select"].concat(S(n.classes,function(n){return t+"--"+n})),attributes:N({},c)},components:Bh([u.map(function(n){return n.asSpec()}),i.map(function(n){return n.asSpec()}),on.some({dom:{tag:"div",classes:[t+"__select-chevron"],innerHtml:ym("chevron-down",o.providers.icons)}})]),matchWidth:!0,useMinWidth:!0,dropdownBehaviours:ba(g(n.dropdownBehaviours,[Oh(n.disabled),Ew.config({}),mg.config({}),Kd("dropdown-events",[Ep(n,r),Tp(n,r)]),Kd("menubutton-update-display-text",[lo(rk,function(t,e){i.bind(function(n){return n.getOpt(t)}).each(function(n){mg.set(n,[Ir(o.providers.translate(e.event().text()))])})}),lo(ik,function(t,e){u.bind(function(n){return n.getOpt(t)}).each(function(n){mg.set(n,[_C(e.event().icon(),o.providers.icons)])})})])])),eventOrder:Dn(ok,{mousedown:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"]}),sandboxBehaviours:ba([lg.config({mode:"special",onLeft:e,onRight:e})]),lazySink:o.getSink,toggleClass:t+"--active",parts:{menu:Sv(0,n.columns,n.presets)},fetch:function(){return Vy(n.fetch)}}))).asSpec()}function IC(n){return"separator"===n.type}function RC(n,e){var t=O(n,function(n,t){return function(n){return cn(n)}(t)?""===t?n:"|"===t?0<n.length&&!IC(n[n.length-1])?n.concat([uk]):n:En(e,t.toLowerCase())?n.concat([e[t.toLowerCase()]]):n:n.concat([t])},[]);return 0<t.length&&IC(t[t.length-1])&&t.pop(),t}function VC(n,t){return function(n){return En(n,"getSubmenuItems")}(n)?function(n,t){var e=n.getSubmenuItems(),o=ak(e,t);return{item:n,menus:Dn(o.menus,q(n.value,o.items)),expansions:Dn(o.expansions,q(n.value,n.value))}}(n,t):{item:n,menus:{},expansions:{}}}function NC(n,e,o,t){var r=Xo("primary-menu"),i=ak(n,o.shared.providers.menuItems());if(0===i.items.length)return on.none();var u=ib(r,i.items,e,o,t),a=P(i.menus,function(n,t){return ib(t,n,e,o,!1)}),c=Dn(a,q(r,u));return on.from(Lg.tieredData(r,c,i.expansions))}function HC(e){return{isDisabled:function(){return Ch.isDisabled(e)},setDisabled:function(n){return Ch.set(e,n)},setActive:function(n){var t=e.element();n?(fr(t,"tox-tbtn--enabled"),Po(t,"aria-pressed",!0)):(dr(t,"tox-tbtn--enabled"),jo(t,"aria-pressed"))},isActive:function(){return mr(e.element(),"tox-tbtn--enabled")}}}function PC(n,t,e,o){return FC({text:n.text,icon:n.icon,tooltip:n.tooltip,role:o,fetch:function(t){n.fetch(function(n){t(NC(n,Fh.CLOSE_ON_EXECUTE,e,!1))})},onSetup:n.onSetup,getApi:HC,columns:1,presets:"normal",classes:[],dropdownBehaviours:[Gy.config({})]},t,e.shared)}function zC(t,o,r){return function(n){n(S(t,function(n){var t=n.text.fold(function(){return{}},function(n){return{text:n}});return N(N({type:n.type},t),{onAction:function(e){return function(n){var t=!n.isActive();n.setActive(t),e.storage.set(t),r.shared.getSink().each(function(n){o().getOpt(n).each(function(n){wa(n.element()),ro(n,sy,{name:e.name,value:e.storage.get()})})})}}(n),onSetup:function(t){return function(n){n.setActive(t.storage.get())}}(n)})}))}}function LC(n,t,e,o,r){void 0===e&&(e=[]);var i=t.fold(function(){return{}},function(n){return{action:n}}),u=N({buttonBehaviours:ba([Oh(n.disabled),Gy.config({}),Kd("button press",[fo("click"),fo("mousedown")])].concat(e)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]}},i),a=Dn(u,{dom:o});return Dn(a,{components:r})}function jC(n,t,e,o){void 0===o&&(o=[]);var r={tag:"button",classes:["tox-tbtn"],attributes:n.tooltip.map(function(n){return{"aria-label":e.translate(n),title:e.translate(n)}}).getOr({})},i=n.icon.map(function(n){return AC(n,e.icons)}),u=Bh([i]);return LC(n,t,o,r,u)}function UC(n,t,e,o){void 0===o&&(o=[]);var r=jC(n,on.some(t),e,o);return Gg.sketch(r)}function WC(n,t,e,o,r){void 0===o&&(o=[]),void 0===r&&(r=[]);var i=e.translate(n.text),u=n.icon?n.icon.map(function(n){return AC(n,e.icons)}):on.none(),a=u.isSome()?Bh([u]):[],c=u.isSome()?{}:{innerHtml:i},s=g(n.primary||n.borderless?["tox-button"]:["tox-button","tox-button--secondary"],u.isSome()?["tox-button--icon"]:[],n.borderless?["tox-button--naked"]:[],r),f=N(N({tag:"button",classes:s},c),{attributes:{title:i}});return LC(n,t,o,f,a)}function GC(n,t,e,o,r){void 0===o&&(o=[]),void 0===r&&(r=[]);var i=WC(n,on.some(t),e,o,r);return Gg.sketch(i)}function XC(t,e){return function(n){"custom"===e?ro(n,sy,{name:t,value:{}}):"submit"===e?oo(n,fy):"cancel"===e?oo(n,cy):v.console.error("Unknown button type: ",e)}}function YC(n,t,e){if(function(n,t){return"menu"===t}(0,t)){var o=n,r=N(N({},n),{fetch:zC(o.items,function(){return i},e)}),i=vm(PC(r,"tox-tbtn",e,on.none()));return i.asSpec()}if(function(n,t){return"custom"===t||"cancel"===t||"submit"===t}(0,t)){var u=XC(n.name,t),a=N(N({},n),{borderless:!1});return GC(a,u,e.shared.providers,[])}v.console.error("Unknown footer button type: ",t)}function qC(n,t){var e=XC(n.name,"custom");return function(n,t){return By(n,t,[],[])}(on.none(),vy.parts().field(N({factory:Gg},WC(n,on.some(e),t,[DS(""),xS()]))))}function KC(n,t){return xl({factory:vy,name:n,overrides:function(o){return{fieldBehaviours:ba([Kd("coupled-input-behaviour",[lo(ei(),function(e){(function(n,t,e){return qs(n,t,e).bind(Zl.getCurrent)})(e,o,t).each(function(t){qs(e,o,"lock").each(function(n){Cg.isOn(n)&&o.onLockedChange(e,t,n)})})})])])}}})}function JC(n){var t=/^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/.exec(n);if(null===t)return an.error(n);var e=parseFloat(t[1]),o=t[2];return an.value({value:e,unit:o})}function $C(n,t){function e(n){return Object.prototype.hasOwnProperty.call(o,n)}var o={"":96,px:96,pt:72,cm:2.54,pc:12,mm:25.4,"in":1};return n.unit===t?on.some(n.value):e(n.unit)&&e(t)?o[n.unit]===o[t]?on.some(n.value):on.some(n.value/o[n.unit]*o[t]):on.none()}function QC(n){return on.none()}function ZC(n,t){return function(n,t,e){return n.isSome()&&t.isSome()?on.some(e(n.getOrDie(),t.getOrDie())):on.none()}(JC(n).toOption(),JC(t).toOption(),function(n,t){return $C(n,t.unit).map(function(n){return t.value/n}).map(function(n){return function(t,e){return function(n){return $C(n,e).map(function(n){return{value:n*t,unit:e}})}}(n,t.unit)}).getOr(QC)}).getOr(QC)}function nk(o,t){function n(n){return{dom:{tag:"div",classes:["tox-form__group"]},components:n}}function e(e){return vy.parts().field({factory:yy,inputClasses:["tox-textfield"],inputBehaviours:ba([Ch.config({disabled:o.disabled}),Gy.config({}),Kd("size-input-events",[lo(Qr(),function(n,t){ro(n,i,{isField1:e})}),lo(oi(),function(n,t){ro(n,uy,{name:o.name})})])]),selectOnFocus:!1})}function r(n){return{dom:{tag:"label",classes:["tox-label"],innerHtml:t.translate(n)}}}var a=QC,i=Xo("ratio-event"),u=fk.parts().lock({dom:{tag:"button",classes:["tox-lock","tox-button","tox-button--naked","tox-button--icon"],attributes:{title:t.translate(o.label.getOr("Constrain proportions"))}},components:[{dom:{tag:"span",classes:["tox-icon","tox-lock-icon__lock"],innerHtml:ym("lock",t.icons)}},{dom:{tag:"span",classes:["tox-icon","tox-lock-icon__unlock"],innerHtml:ym("unlock",t.icons)}}],buttonBehaviours:ba([Oh(o.disabled),Gy.config({})])}),c=fk.parts().field1(n([vy.parts().label(r("Width")),e(!0)])),s=fk.parts().field2(n([vy.parts().label(r("Height")),e(!1)]));return fk.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[c,s,n([r("&nbsp;"),u])]}],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:function(n,t,e){JC(Zf.getValue(n)).each(function(n){a(n).each(function(n){Zf.setValue(t,function(n){var t,e={"":0,px:0,pt:1,mm:1,pc:2,ex:2,em:2,ch:2,rem:2,cm:3,"in":4,"%":4},o=n.value.toFixed((t=n.unit)in e?e[t]:1);return-1!==o.indexOf(".")&&(o=o.replace(/\.?0*$/,"")),o+n.unit}(n))})})},coupledFieldBehaviours:ba([Ch.config({disabled:o.disabled,onDisabled:function(n){fk.getField1(n).bind(vy.getField).each(Ch.disable),fk.getField2(n).bind(vy.getField).each(Ch.disable),fk.getLock(n).each(Ch.disable)},onEnabled:function(n){fk.getField1(n).bind(vy.getField).each(Ch.enable),fk.getField2(n).bind(vy.getField).each(Ch.enable),fk.getLock(n).each(Ch.enable)}}),Kd("size-input-events2",[lo(i,function(n,t){var e=t.event().isField1(),o=e?fk.getField1(n):fk.getField2(n),r=e?fk.getField2(n):fk.getField1(n),i=o.map(Zf.getValue).getOr(""),u=r.map(Zf.getValue).getOr("");a=ZC(i,u)})])])})}function tk(r,c){function n(n,t,e,o){return vm(GC({name:n,text:n,disabled:e,primary:o,icon:on.none(),borderless:!1},t,c))}function t(n,t,e,o){return vm(UC({name:n,icon:on.some(n),tooltip:on.some(t),disabled:o,primary:!1,borderless:!1},e,c))}function u(n,e){n.map(function(n){var t=n.get(e);t.hasConfigured(Ch)&&Ch.disable(t)})}function a(n,e){n.map(function(n){var t=n.get(e);t.hasConfigured(Ch)&&Ch.enable(t)})}function i(n,t,e){ro(n,t,e)}function e(n){return oo(n,pk.disable())}function o(n){return oo(n,pk.enable())}function s(n,t){e(n),i(n,lk.transform(),{transform:t}),o(n)}function f(n){return function(){Q.getOpt(n).each(function(n){mg.set(n,[J])})}}function l(n,t){e(n),i(n,lk.transformApply(),{transform:t,swap:f(n)}),o(n)}function d(){return n("Back",function(n){return i(n,lk.back(),{swap:f(n)})},!1,!1)}function m(){return vm({dom:{tag:"div",classes:["tox-spacer"]},behaviours:ba([Ch.config({})])})}function g(){return n("Apply",function(n){return i(n,lk.apply(),{swap:f(n)})},!0,!0)}function p(){return function(n){var t=r.getRect();return function(n,t,e,o,r){return xC(n,t,e,o,r)}(n,t.x,t.y,t.w,t.h)}}function h(t,e){return function(n){return t(n,e)}}function v(n,t){!function(n,t){e(n),i(n,lk.tempTransform(),{transform:t}),o(n)}(n,t)}function b(n,t,e,o,r){var i=cS.parts().label({dom:{tag:"label",classes:["tox-label"],innerHtml:c.translate(n)}}),u=cS.parts().spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}}),a=cS.parts().thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return vm(cS.sketch({dom:{tag:"div",classes:["tox-slider"],attributes:{role:"presentation"}},model:{mode:"x",minX:e,maxX:r,getInitialValue:nn({x:nn(o)})},components:[i,u,a],sliderBehaviours:ba([vg.config({})]),onChoose:t}))}function y(n,t,e,o,r){return[d(),function(n,r,t,e,o){return b(n,function(n,t,e){var o=h(r,e.x()/100);s(n,o)},t,e,o)}(n,t,e,o,r),g()]}function x(n,t,e,o,r){var i=y(n,t,e,o,r);return Wb.sketch({dom:k,components:i.map(function(n){return n.asSpec()}),containerBehaviours:ba([Kd("image-tools-filter-panel-buttons-events",[lo(pk.disable(),function(n,t){u(i,n)}),lo(pk.enable(),function(n,t){a(i,n)})])])})}function w(t,e,o){return function(n){return function(n,t,e,o){return lC(n,t,e,o)}(n,t,e,o)}}function S(n){return b(n,function(a,n,t){var e=j.getOpt(a),o=W.getOpt(a),r=U.getOpt(a);e.each(function(u){o.each(function(i){r.each(function(n){var t=Zf.getValue(u).x()/100,e=Zf.getValue(n).x()/100,o=Zf.getValue(i).x()/100,r=w(t,e,o);s(a,r)})})})},0,100,200)}function C(t,e,o){return function(n){i(n,lk.swap(),{transform:e,swap:function(){Q.getOpt(n).each(function(n){mg.set(n,[t]),o(n)})}})}}var k={tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools-edit-panel"]},O=Z,E=[d(),m(),n("Apply",function(n){var t=p();l(n,t),r.hideCrop()},!1,!0)],T=Wb.sketch({dom:k,components:E.map(function(n){return n.asSpec()}),containerBehaviours:ba([Kd("image-tools-crop-buttons-events",[lo(pk.disable(),function(n,t){u(E,n)}),lo(pk.enable(),function(n,t){a(E,n)})])])}),B=vm(nk({name:"size",label:on.none(),constrain:!0,disabled:!1},c)),D=[d(),m(),B,m(),n("Apply",function(o){B.getOpt(o).each(function(n){var t=Zf.getValue(n),e=function(t,e){return function(n){return TC(n,t,e)}}(parseInt(t.width,10),parseInt(t.height,10));l(o,e)})},!1,!0)],A=Wb.sketch({dom:k,components:D.map(function(n){return n.asSpec()}),containerBehaviours:ba([Kd("image-tools-resize-buttons-events",[lo(pk.disable(),function(n,t){u(D,n)}),lo(pk.enable(),function(n,t){a(D,n)})])])}),_=h(EC,"h"),M=h(EC,"v"),F=h(BC,-90),I=h(BC,90),R=[d(),m(),t("flip-horizontally","Flip horizontally",function(n){v(n,_)},!1),t("flip-vertically","Flip vertically",function(n){v(n,M)},!1),t("rotate-left","Rotate counterclockwise",function(n){v(n,F)},!1),t("rotate-right","Rotate clockwise",function(n){v(n,I)},!1),m(),g()],V=Wb.sketch({dom:k,components:R.map(function(n){return n.asSpec()}),containerBehaviours:ba([Kd("image-tools-fliprotate-buttons-events",[lo(pk.disable(),function(n,t){u(R,n)}),lo(pk.enable(),function(n,t){a(R,n)})])])}),N=[d(),m(),g()],H=Wb.sketch({dom:k,components:N.map(function(n){return n.asSpec()})}),P=x("Brightness",kC,-100,0,100),z=x("Contrast",OC,-100,0,100),L=x("Gamma",CC,-100,0,100),j=S("R"),U=S("G"),W=S("B"),G=[d(),j,U,W,g()],X=Wb.sketch({dom:k,components:G.map(function(n){return n.asSpec()})}),Y=on.some(SC),q=on.some(wC),K=[t("crop","Crop",C(T,on.none(),function(n){r.showCrop()}),!1),t("resize","Resize",C(A,on.none(),function(n){B.getOpt(n).each(function(n){var t=r.getMeasurements(),e=t.width,o=t.height;Zf.setValue(n,{width:e,height:o})})}),!1),t("orientation","Orientation",C(V,on.none(),O),!1),t("brightness","Brightness",C(P,on.none(),O),!1),t("sharpen","Sharpen",C(H,Y,O),!1),t("contrast","Contrast",C(z,on.none(),O),!1),t("color-levels","Color levels",C(X,on.none(),O),!1),t("gamma","Gamma",C(L,on.none(),O),!1),t("invert","Invert",C(H,q,O),!1)],J=Wb.sketch({dom:k,components:K.map(function(n){return n.asSpec()})}),$=Wb.sketch({dom:{tag:"div"},components:[J],containerBehaviours:ba([mg.config({})])}),Q=vm($);return{memContainer:Q,getApplyButton:function(n){return Q.getOpt(n).map(function(n){var t=n.components()[0];return t.components()[t.components().length-1]})}}}var ek=Xo("toolbar.button.execute"),ok={"alloy.execute":["disabling","alloy.base.behaviour","toggling","toolbar-button-events"]},rk=Xo("update-menu-text"),ik=Xo("update-menu-icon"),uk={type:"separator"},ak=function(n,r){var t=RC(cn(n)?n.split(" "):n,r);return k(t,function(n,t){var e=function(n){if(IC(n))return n;var t=Nn(n,"value").getOrThunk(function(){return Xo("generated-menu-item")});return Dn({value:t},n)}(t),o=VC(e,r);return{menus:Dn(n.menus,o.menus),items:[o.item].concat(n.items),expansions:Dn(n.expansions,o.expansions)}},{menus:{},expansions:{},items:[]})},ck=nn([St("field1Name","field1"),St("field2Name","field2"),Ju("onLockedChange"),Xu(["lockClass"]),St("locked",!1),nl("coupledFieldBehaviours",[Zl,Zf])]),sk=nn([KC("field1","field2"),KC("field2","field1"),xl({factory:Gg,schema:[ct("dom")],name:"lock",overrides:function(n){return{buttonBehaviours:ba([Cg.config({selected:n.locked,toggleClass:n.markers.lockClass,aria:{mode:"pressed"}})])}}})]),fk=Al({name:"FormCoupledInputs",configFields:ck(),partFields:sk(),factory:function(o,n,t,e){return{uid:o.uid,dom:o.dom,components:n,behaviours:tl(o.coupledFieldBehaviours,[Zl.config({find:on.some}),Zf.config({store:{mode:"manual",getValue:function(n){var t,e=Zs(n,o,["field1","field2"]);return(t={})[o.field1Name]=Zf.getValue(e.field1()),t[o.field2Name]=Zf.getValue(e.field2()),t},setValue:function(n,t){var e=Zs(n,o,["field1","field2"]);$(t,o.field1Name)&&Zf.setValue(e.field1(),t[o.field1Name]),$(t,o.field2Name)&&Zf.setValue(e.field2(),t[o.field2Name])}}})]),apis:{getField1:function(n){return qs(n,o,"field1")},getField2:function(n){return qs(n,o,"field2")},getLock:function(n){return qs(n,o,"lock")}}}},apis:{getField1:function(n,t){return n.getField1(t)},getField2:function(n,t){return n.getField2(t)},getLock:function(n,t){return n.getLock(t)}}}),lk={undo:nn(Xo("undo")),redo:nn(Xo("redo")),zoom:nn(Xo("zoom")),back:nn(Xo("back")),apply:nn(Xo("apply")),swap:nn(Xo("swap")),transform:nn(Xo("transform")),tempTransform:nn(Xo("temp-transform")),transformApply:nn(Xo("transform-apply"))},dk=nn("save-state"),mk=nn("disable"),gk=nn("enable"),pk={formActionEvent:sy,saveState:dk,disable:mk,enable:gk},hk=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),vk=tinymce.util.Tools.resolve("tinymce.geom.Rect"),bk=tinymce.util.Tools.resolve("tinymce.util.Observable"),yk=tinymce.util.Tools.resolve("tinymce.util.Tools"),xk=tinymce.util.Tools.resolve("tinymce.util.VK");function wk(n){var t,e;if(n.changedTouches)for(t="screenX screenY pageX pageY clientX clientY".split(" "),e=0;e<t.length;e++)n[t[e]]=n.changedTouches[0][t[e]]}function Sk(n,r){var i,u,t,a,c,f,l,d=r.document||v.document;r=r||{};var m=d.getElementById(r.handle||n);t=function(n){var t,e,o=function s(n){var t,e,o,r,i,u,a,c=Math.max;return t=n.documentElement,e=n.body,o=c(t.scrollWidth,e.scrollWidth),r=c(t.clientWidth,e.clientWidth),i=c(t.offsetWidth,e.offsetWidth),u=c(t.scrollHeight,e.scrollHeight),a=c(t.clientHeight,e.clientHeight),{width:o<i?r:o,height:u<c(t.offsetHeight,e.offsetHeight)?a:u}}(d);wk(n),n.preventDefault(),u=n.button,t=m,f=n.screenX,l=n.screenY,e=v.window.getComputedStyle?v.window.getComputedStyle(t,null).getPropertyValue("cursor"):t.runtimeStyle.cursor,i=hk("<div></div>").css({position:"absolute",top:0,left:0,width:o.width,height:o.height,zIndex:2147483647,opacity:1e-4,cursor:e}).appendTo(d.body),hk(d).on("mousemove touchmove",c).on("mouseup touchend",a),r.start(n)},c=function(n){if(wk(n),n.button!==u)return a(n);n.deltaX=n.screenX-f,n.deltaY=n.screenY-l,n.preventDefault(),r.drag(n)},a=function(n){wk(n),hk(d).off("mousemove touchmove",c).off("mouseup touchend",a),i.remove(),r.stop&&r.stop(n)},this.destroy=function(){hk(m).off()},hk(m).on("mousedown touchstart",t)}function Ck(t){function u(n,s){c.getOpt(n).each(function(n){var e=l.get(),o=mu(n.element()),r=su(n.element()),i=s.dom().naturalWidth*e,u=s.dom().naturalHeight*e,a=Math.max(0,o/2-i/2),c=Math.max(0,r/2-u/2),t={left:a.toString()+"px",top:c.toString()+"px",width:i.toString()+"px",height:u.toString()+"px",position:"absolute"};xr(s,t),f.getOpt(n).each(function(n){xr(n.element(),t)}),d.get().each(function(n){var t=m.get();n.setRect({x:t.x*e+a,y:t.y*e+c,w:t.w*e,h:t.h*e}),n.setClampRect({x:a,y:c,w:i,h:u}),n.setViewPortRect({x:0,y:0,w:o,h:r})})})}function e(n,t){var i=we.fromTag("img");return Po(i,"src",t),function(e){return new Np(function(n){var t=function(){e.removeEventListener("load",t),n(e)};e.complete?n(e):e.addEventListener("load",t)})}(i.dom()).then(function(){return c.getOpt(n).map(function(n){var t=ru({element:i});mg.replaceAt(n,1,on.some(t));var e=a.get(),o={x:0,y:0,w:i.dom().naturalWidth,h:i.dom().naturalHeight};a.set(o);var r=vk.inflate(o,-20,-20);return m.set(r),e.w===o.w&&e.h===o.h||function(n,u){c.getOpt(n).each(function(n){var t=mu(n.element()),e=su(n.element()),o=u.dom().naturalWidth,r=u.dom().naturalHeight,i=Math.min(t/o,e/r);1<=i?l.set(1):l.set(i)})}(n,i),u(n,i),i})})}var f=vm({dom:{tag:"div",classes:["tox-image-tools__image-bg"],attributes:{role:"presentation"}}}),l=ye(1),d=ye(on.none()),m=ye({x:0,y:0,w:1,h:1}),a=ye({x:0,y:0,w:1,h:1}),n=Wb.sketch({dom:{tag:"div",classes:["tox-image-tools__image"]},components:[f.asSpec(),{dom:{tag:"img",attributes:{src:t}}},{dom:{tag:"div"},behaviours:ba([Kd("image-panel-crop-events",[Ii(function(n){c.getOpt(n).each(function(n){var t=n.element().dom(),e=Tk({x:10,y:10,w:100,h:100},{x:0,y:0,w:200,h:200},{x:0,y:0,w:200,h:200},t,function(){});e.toggleVisibility(!1),e.on("updateRect",function(n){var t=n.rect,e=l.get(),o={x:Math.round(t.x/e),y:Math.round(t.y/e),w:Math.round(t.w/e),h:Math.round(t.h/e)};m.set(o)}),d.set(on.some(e))})})])])}],containerBehaviours:ba([mg.config({}),Kd("image-panel-events",[Ii(function(n){e(n,t)})])])}),c=vm(n);return{memContainer:c,updateSrc:e,zoom:function(n,t){var e=l.get(),o=0<t?Math.min(2,e+.1):Math.max(.1,e-.1);l.set(o),c.getOpt(n).each(function(n){var t=n.components()[1].element();u(n,t)})},showCrop:function(){d.get().each(function(n){n.toggleVisibility(!0)})},hideCrop:function(){d.get().each(function(n){n.toggleVisibility(!1)})},getRect:function(){return m.get()},getMeasurements:function(){var n=a.get();return{width:n.w,height:n.h}}}}function kk(n,t,e,o,r){return UC({name:n,icon:on.some(t),disabled:e,tooltip:on.some(n),primary:!1,borderless:!1},o,r)}function Ok(n,t){t?Ch.enable(n):Ch.disable(n)}var Ek=0,Tk=function(s,e,f,o,r){var l,t,i,u="tox-",a="tox-crid-"+Ek++,c=[{name:"move",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:0,deltaH:0,label:"Crop Mask"},{name:"nw",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:-1,deltaH:-1,label:"Top Left Crop Handle"},{name:"ne",xMul:1,yMul:0,deltaX:0,deltaY:1,deltaW:1,deltaH:-1,label:"Top Right Crop Handle"},{name:"sw",xMul:0,yMul:1,deltaX:1,deltaY:0,deltaW:-1,deltaH:1,label:"Bottom Left Crop Handle"},{name:"se",xMul:1,yMul:1,deltaX:0,deltaY:0,deltaW:1,deltaH:1,label:"Bottom Right Crop Handle"}];i=["top","right","bottom","left"];var d=function(n,t){return{x:t.x+n.x,y:t.y+n.y,w:t.w,h:t.h}},m=function(n,t){return{x:t.x-n.x,y:t.y-n.y,w:t.w,h:t.h}};function g(n,t,e,o){var r,i,u,a,c;r=t.x,i=t.y,u=t.w,a=t.h,r+=e*n.deltaX,i+=o*n.deltaY,(u+=e*n.deltaW)<20&&(u=20),(a+=o*n.deltaH)<20&&(a=20),c=s=vk.clamp({x:r,y:i,w:u,h:a},f,"move"===n.name),c=m(f,c),l.fire("updateRect",{rect:c}),v(c)}function p(t){function n(n,t){t.h<0&&(t.h=0),t.w<0&&(t.w=0),hk("#"+a+"-"+n,o).css({left:t.x,top:t.y,width:t.w,height:t.h})}yk.each(c,function(n){hk("#"+a+"-"+n.name,o).css({left:t.w*n.xMul+t.x,top:t.h*n.yMul+t.y})}),n("top",{x:e.x,y:e.y,w:e.w,h:t.y-e.y}),n("right",{x:t.x+t.w,y:t.y,w:e.w-t.x-t.w+e.x,h:t.h}),n("bottom",{x:e.x,y:t.y+t.h,w:e.w,h:e.h-t.y-t.h+e.y}),n("left",{x:e.x,y:t.y,w:t.x-e.x,h:t.h}),n("move",t)}function h(n){p(s=n)}function v(n){h(d(f,n))}return function b(){hk('<div id="'+a+'" class="'+u+'croprect-container" role="grid" aria-dropeffect="execute">').appendTo(o),yk.each(i,function(n){hk("#"+a,o).append('<div id="'+a+"-"+n+'"class="'+u+'croprect-block" style="display: none" data-mce-bogus="all">')}),yk.each(c,function(n){hk("#"+a,o).append('<div id="'+a+"-"+n.name+'" class="'+u+"croprect-handle "+u+"croprect-handle-"+n.name+'"style="display: none" data-mce-bogus="all" role="gridcell" tabindex="-1" aria-label="'+n.label+'" aria-grabbed="false" title="'+n.label+'">')}),t=yk.map(c,function n(t){var e;return new Sk(a,{document:o.ownerDocument,handle:a+"-"+t.name,start:function(){e=s},drag:function(n){g(t,e,n.deltaX,n.deltaY)}})}),p(s),hk(o).on("focusin focusout",function(n){hk(n.target).attr("aria-grabbed","focus"===n.type?"true":"false")}),hk(o).on("keydown",function(t){var i;function n(n,t,e,o,r){n.stopPropagation(),n.preventDefault(),g(i,e,o,r)}switch(yk.each(c,function(n){if(t.target.id===a+"-"+n.name)return i=n,!1}),t.keyCode){case xk.LEFT:n(t,0,s,-10,0);break;case xk.RIGHT:n(t,0,s,10,0);break;case xk.UP:n(t,0,s,0,-10);break;case xk.DOWN:n(t,0,s,0,10);break;case xk.ENTER:case xk.SPACEBAR:t.preventDefault(),r()}})}(),l=yk.extend({toggleVisibility:function y(n){var t;t=yk.map(c,function(n){return"#"+a+"-"+n.name}).concat(yk.map(i,function(n){return"#"+a+"-"+n})).join(","),n?hk(t,o).show():hk(t,o).hide()},setClampRect:function x(n){f=n,p(s)},setRect:h,getInnerRect:function(){return m(f,s)},setInnerRect:v,setViewPortRect:function w(n){e=n,p(s)},destroy:function n(){yk.each(t,function(n){n.destroy()}),t=[]}},bk)};function Bk(n){var t=ye(n),e=ye(on.none()),o=function s(){var e=[],o=-1;function n(){return 0<o}function t(){return-1!==o&&o<e.length-1}return{data:e,add:function r(n){var t;return t=e.splice(++o),e.push(n),{state:n,removed:t}},undo:function i(){if(n())return e[--o]},redo:function u(){if(t())return e[++o]},canUndo:n,canRedo:t}}();function r(n){t.set(n)}function i(n){v.URL.revokeObjectURL(n.url)}function u(n){var t=a(n);return r(t),function(n){yk.each(n,i)}(o.add(t).removed),t.url}o.add(n);var a=function(n){return{blob:n,url:v.URL.createObjectURL(n)}},c=function(){e.get().each(i),e.set(on.none())};return{getBlobState:function(){return t.get()},setBlobState:r,addBlobState:u,getTempState:function(){return e.get().fold(function(){return t.get()},function(n){return n})},updateTempState:function(n){var t=a(n);return c(),e.set(on.some(t)),t.url},addTempState:function(n){var t=a(n);return e.set(on.some(t)),t.url},applyTempState:function(t){return e.get().fold(function(){},function(n){u(n.blob),t()})},destroyTempState:c,undo:function(){var n=o.undo();return r(n),n.url},redo:function(){var n=o.redo();return r(n),n.url},getHistoryStates:function(){return{undoEnabled:o.canUndo(),redoEnabled:o.canRedo()}}}}function Dk(n,t){function i(n){var t=s.getHistoryStates();m.updateButtonUndoStates(n,t.undoEnabled,t.redoEnabled),ro(n,pk.formActionEvent,{name:pk.saveState(),value:t.undoEnabled})}function u(n){return n.toBlob()}function a(n){ro(n,pk.formActionEvent,{name:pk.disable(),value:{}})}function r(t,n,e,o,r){return a(t),function(n){return oC(n)}(n).then(e).then(u).then(o).then(function(n){return l(t,n).then(function(n){return i(t),r(),f(t),n})})["catch"](function(n){return v.console.log(n),f(t),n})}function c(n,t,e){var o=s.getBlobState().blob;r(n,o,t,function(n){return s.updateTempState(n)},e)}var s=Bk(n.currentState),f=function(n){e.getApplyButton(n).each(function(n){Ch.enable(n)}),ro(n,pk.formActionEvent,{name:pk.enable(),value:{}})},l=function(n,t){return a(n),o.updateSrc(n,t)},d=function(n){var t=s.getBlobState().url;return s.destroyTempState(),i(n),t},o=Ck(n.currentState.url),m=function(n){var o=vm(kk("Undo","undo",!0,function(n){ro(n,lk.undo(),{direction:1})},n)),r=vm(kk("Redo","redo",!0,function(n){ro(n,lk.redo(),{direction:1})},n));return{container:Wb.sketch({dom:{tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools__sidebar"]},components:[o.asSpec(),r.asSpec(),kk("Zoom in","zoom-in",!1,function(n){ro(n,lk.zoom(),{direction:1})},n),kk("Zoom out","zoom-out",!1,function(n){ro(n,lk.zoom(),{direction:-1})},n)]}),updateButtonUndoStates:function(n,t,e){o.getOpt(n).each(function(n){Ok(n,t)}),r.getOpt(n).each(function(n){Ok(n,e)})}}}(t),e=tk(o,t);return{dom:{tag:"div",attributes:{role:"presentation"}},components:[e.memContainer.asSpec(),o.memContainer.asSpec(),m.container],behaviours:ba([Zf.config({store:{mode:"manual",getValue:function(){return s.getBlobState()}}}),Kd("image-tools-events",[lo(lk.undo(),function(t,n){var e=s.undo();l(t,e).then(function(n){f(t),i(t)})}),lo(lk.redo(),function(t,n){var e=s.redo();l(t,e).then(function(n){f(t),i(t)})}),lo(lk.zoom(),function(n,t){var e=t.event().direction();o.zoom(n,e)}),lo(lk.back(),function(n,t){!function(t){var n=d(t);l(t,n).then(function(n){f(t)})}(n),t.event().swap()(),o.hideCrop()}),lo(lk.apply(),function(n,t){s.applyTempState(function(){d(n),t.event().swap()()})}),lo(lk.transform(),function(n,t){return c(n,t.event().transform(),Z)}),lo(lk.tempTransform(),function(n,t){return function(n,t){var e=s.getTempState().blob;r(n,e,t,function(n){return s.addTempState(n)},Z)}(n,t.event().transform())}),lo(lk.transformApply(),function(n,t){return function(e,n,t){var o=s.getBlobState().blob;r(e,o,n,function(n){var t=s.addBlobState(n);return d(e),t},t)}(n,t.event().transform(),t.event().swap())}),lo(lk.swap(),function(t,n){!function(n){m.updateButtonUndoStates(n,!1,!1)}(t);var e=n.event().transform(),o=n.event().swap();e.fold(function(){o()},function(n){c(t,n,o)})})]),xS()])}}function Ak(e,t){var n=e.label.map(function(n){return Dy(n,t)}),o=[Ch.config({disabled:e.disabled}),lg.config({mode:"execution",useEnter:!0!==e.multiline,useControlEnter:!0===e.multiline,execute:function(n){return oo(n,fy),on.some(!0)}}),Kd("textfield-change",[lo(ei(),function(n,t){ro(n,uy,{name:e.name})}),lo(fi(),function(n,t){ro(n,uy,{name:e.name})})]),Gy.config({})],r=e.validation.map(function(o){return jy.config({getRoot:function(n){return Eo(n.element())},invalidClass:"tox-invalid",validator:{validate:function(n){var t=Zf.getValue(n),e=o.validator(t);return Ny(!0===e?an.value(t):an.error(e))},validateOnLoad:o.validateOnLoad}})}).toArray(),i=e.placeholder.fold(nn({}),function(n){return{placeholder:t.translate(n)}}),u=e.inputMode.fold(nn({}),function(n){return{inputmode:n}}),a=N(N({},i),u),c=vy.parts().field({tag:!0===e.multiline?"textarea":"input",inputAttributes:a,inputClasses:[e.classname],inputBehaviours:ba(H([o,r])),selectOnFocus:!1,factory:yy}),s=(e.flex?["tox-form__group--stretched"]:[]).concat(e.maximized?["tox-form-group--maximize"]:[]),f=[Ch.config({disabled:e.disabled,onDisabled:function(n){vy.getField(n).each(Ch.disable)},onEnabled:function(n){vy.getField(n).each(Ch.enable)}})];return By(n,c,s,f)}function _k(n){var t=ye(null);return nu({readState:function(){return{timer:null!==t.get()?"set":"unset"}},setTimer:function(n){t.set(n)},cancel:function(){var n=t.get();null!==n&&n.cancel()}})}function Mk(n,t,e){var o=Zf.getValue(e);Zf.setValue(t,o),CE(t)}function Fk(n,t){var e=n.element(),o=Er(e),r=e.dom();"number"!==zo(e,"type")&&t(r,o)}function Ik(n,t,e){if(n.selectsOver){var o=Zf.getValue(t),r=n.getDisplayText(o),i=Zf.getValue(e);return 0===n.getDisplayText(i).indexOf(r)?on.some(function(){Mk(0,t,e),function(n,e){Fk(n,function(n,t){return n.setSelectionRange(e,t.length)})}(t,r.length)}):on.none()}return on.none()}function Rk(n){return BE(Vy(n))}function Vk(n){return{type:"menuitem",value:n.url,text:n.title,meta:{attach:n.attach},onAction:function(){}}}function Nk(n,t){return{type:"menuitem",value:t,text:n,meta:{attach:undefined},onAction:function(){}}}function Hk(n,t){return function(n){return S(n,Vk)}(function(t,n){return C(n,function(n){return n.type===t})}(n,t))}function Pk(n,t){var e=n.toLowerCase();return C(t,function(n){var t=n.meta!==undefined&&n.meta.text!==undefined?n.meta.text:n.text;return Vt(t.toLowerCase(),e)||Vt(n.value.toLowerCase(),e)})}function zk(e,n,o){var t=Zf.getValue(n),r=t.meta.text!==undefined?t.meta.text:t.value;return o.getLinkInformation().fold(function(){return[]},function(n){var t=Pk(r,function(n){return S(n,function(n){return Nk(n,n)})}(o.getHistory(e)));return"file"===e?function(n){return O(n,function(n,t){return 0===n.length||0===t.length?n.concat(t):n.concat(AE,t)},[])}([t,Pk(r,function(n){return Hk("header",n.targets)}(n)),Pk(r,H([function(n){return on.from(n.anchorTop).map(function(n){return Nk("<top>",n)}).toArray()}(n),function(n){return Hk("anchor",n.targets)}(n),function(n){return on.from(n.anchorBottom).map(function(n){return Nk("<bottom>",n)}).toArray()}(n)]))]):t})}function Lk(r,o,i){function u(n){var t=Zf.getValue(n);i.addToHistory(t.value,r.filetype)}var n,t,e,a,c,s=o.shared.providers,f=vy.parts().field({factory:TE,dismissOnBlur:!0,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{"aria-errormessage":_E,type:"url"},minChars:0,responseTime:0,fetch:function(n){var t=zk(r.filetype,n,i),e=NC(t,Fh.BUBBLE_TO_SANDBOX,o,!1);return Ny(e)},getHotspot:function(n){return h.getOpt(n)},onSetValue:function(n,t){n.hasConfigured(jy)&&jy.run(n).get(Z)},typeaheadBehaviours:ba(H([i.getValidationHandler().map(function(e){return jy.config({getRoot:function(n){return Eo(n.element())},invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:function(n,t){d.getOpt(n).each(function(n){Po(n.element(),"title",s.translate(t))})}},validator:{validate:function(n){var t=Zf.getValue(n);return DE(function(o){e({type:r.filetype,url:t.value},function(n){if("invalid"===n.status){var t=an.error(n.message);o(t)}else{var e=an.value(n.message);o(e)}})})},validateOnLoad:!1}})}).toArray(),[Ch.config({disabled:r.disabled}),Gy.config({}),Kd("urlinput-events",H(["file"===r.filetype?[lo(ei(),function(n){ro(n,uy,{name:r.name})})]:[],[lo(oi(),function(n){ro(n,uy,{name:r.name}),u(n)}),lo(fi(),function(n){ro(n,uy,{name:r.name}),u(n)})]]))]])),eventOrder:(n={},n[ei()]=["streaming","urlinput-events","invalidating"],n),model:{getDisplayText:function(n){return n.value},selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:o.shared.getSink,parts:{menu:Sv(0,0,"normal")},onExecute:function(n,t,e){ro(t,fy,{})},onItemExecute:function(n,t,e,o){u(n),ro(n,uy,{name:r.name})}}),l=r.label.map(function(n){return Dy(n,s)}),d=vm((t="invalid",e=on.some(_E),void 0===(a="warning")&&(a=t),void 0===c&&(c=t),{dom:{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+t],innerHtml:ym(a,s.icons),attributes:N({title:s.translate(c),"aria-live":"polite"},e.fold(function(){return{}},function(n){return{id:n}}))}})),m=vm({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[d.asSpec()]}),g=i.getUrlPicker(r.filetype),p=Xo("browser.url.event"),h=vm({dom:{tag:"div",classes:["tox-control-wrap"]},components:[f,m.asSpec()],behaviours:ba([Ch.config({disabled:r.disabled})])}),v=vm(GC({name:r.name,icon:on.some("browse"),text:r.label.getOr(""),disabled:r.disabled,primary:!1,borderless:!0},function(n){return oo(n,p)},s,[],["tox-browse-url"]));return vy.sketch({dom:Yy([]),components:l.toArray().concat([{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:H([[h.asSpec()],g.map(function(){return v.asSpec()}).toArray()])}]),fieldBehaviours:ba([Ch.config({disabled:r.disabled,onDisabled:function(n){vy.getField(n).each(Ch.disable),v.getOpt(n).each(Ch.disable)},onEnabled:function(n){vy.getField(n).each(Ch.enable),v.getOpt(n).each(Ch.enable)}}),Kd("url-input-events",[lo(p,function(o){Zl.getCurrent(o).each(function(t){var e=Zf.getValue(t);g.each(function(n){n(e).get(function(n){Zf.setValue(t,n),ro(o,uy,{name:r.name})})})})})])])})}function jk(u,t){function n(o){return function(t,e){Ou(e.event().target(),"[data-collection-item-value]").each(function(n){o(t,e,n,zo(n,"data-collection-item-value"))})}}var e=u.label.map(function(n){return Dy(n,t)}),o=n(function(n,t,e,o){t.stop(),ro(n,sy,{name:u.name,value:o})}),r=[lo($r(),n(function(n,t,e){wa(e)})),lo(ri(),o),lo(gi(),o),lo(Qr(),n(function(n,t,e){ku(n.element(),"."+mh).each(function(n){dr(n,mh)}),fr(e,mh)})),lo(Zr(),n(function(n){ku(n.element(),"."+mh).each(function(n){dr(n,mh)})})),Ni(n(function(n,t,e,o){ro(n,sy,{name:u.name,value:o})}))],i=vy.parts().field({dom:{tag:"div",classes:["tox-collection"].concat(1!==u.columns?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:l},behaviours:ba([mg.config({}),Zf.config({store:{mode:"memory",initialValue:[]},onSetValue:function(o,n){!function(n,t){var e=S(t,function(n){var t=rh.translate(n.text),e=1===u.columns?'<div class="tox-collection__item-label">'+t+"</div>":"",o='<div class="tox-collection__item-icon">'+n.icon+"</div>",r={_:" "," - ":" ","-":" "},i=t.replace(/\_| \- |\-/g,function(n){return r[n]});return'<div class="tox-collection__item" tabindex="-1" data-collection-item-value="'+function(n){return'"'===n?"&quot;":n}(n.value)+'" title="'+i+'" aria-label="'+i+'">'+o+e+"</div>"}),o=1<u.columns&&"auto"!==u.columns?w(e,u.columns):[e],r=S(o,function(n){return'<div class="tox-collection__group">'+n.join("")+"</div>"});No(n.element(),r.join(""))}(o,n),"auto"===u.columns&&ip(o,5,"tox-collection__item").each(function(n){var t=n.numRows,e=n.numColumns;lg.setGridSize(o,t,e)}),oo(o,gy)}}),Gy.config({}),lg.config(function(n,t){return 1===n?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:"auto"===n?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:"color"===t?".tox-swatches__row":".tox-collection__group",cell:"color"===t?"."+ah:"."+uh}}}(u.columns,"normal")),Kd("collection-events",r)])});return By(e,i,["tox-form__group--collection"],[])}function Uk(r){return function(t,e,o){return Nn(e,"name").fold(function(){return r(e,o)},function(n){return t.field(n,r(e,o))})}}function Wk(t,n,e){var o=Dn(e,{shared:{interpreter:function(n){return IE(t,n,o)}}});return IE(t,n,o)}function Gk(n){return{colorPicker:function(e){return function(n,t){Uv.colorPickerDialog(e)(n,t)}}(n),hasCustomColors:function(n){return function(){return Fv(n)}}(n),getColors:function(n){return function(){return Iv(n)}}(n),getColorCols:function(n){return function(){return Uv.getColorCols(n)}}(n)}}function Xk(e){return function(n){return on.from(n.getParam("style_formats")).filter(fn)}(e).map(function(n){var t=function(t,n){function e(n){bn(n,function(n){t.formatter.has(n.name)||t.formatter.register(n.name,n.format)})}var o=PE(n);return t.formatter?e(o.customFormats):t.on("init",function(){e(o.customFormats)}),o.formats}(e,n);return function(n){return n.getParam("style_formats_merge",!1,"boolean")}(e)?HE.concat(t):t}).getOr(HE)}function Yk(n,t,e){var o={type:"formatter",isSelected:t(n.format),getStylePreview:e(n.format)};return Dn(n,o)}function qk(r,n,i,u){var o=function(n){return S(n,function(n){var t=wn(n);if($(n,"items")){var e=o(n.items);return Dn(function(n){var t={type:"submenu",isSelected:nn(!1),getStylePreview:function(){return on.none()}};return Dn(n,t)}(n),{getStyleItems:function(){return e}})}return $(n,"format")?function(n){return Yk(n,i,u)}(n):1===t.length&&vn(t,"title")?Dn(n,{type:"separator"}):function(n){var t=Xo(n.title),e={type:"formatter",format:t,isSelected:i(t),getStylePreview:u(t)},o=Dn(n,e);return r.formatter.register(t,o),o}(n)})};return o(n)}function Kk(t){return function(n){if(n&&1===n.nodeType){if(n.contentEditable===t)return!0;if(n.getAttribute("data-mce-contenteditable")===t)return!0}return!1}}function Jk(n,t,e,o,r){return{type:n,title:t,url:e,level:o,attach:r}}function $k(n){return n.innerText||n.textContent}function Qk(n){return function(n){return n&&"A"===n.nodeName&&(n.id||n.name)!==undefined}(n)&&UE(n)}function Zk(n){return n&&/^(H[1-6])$/.test(n.nodeName)}function nO(n){return Zk(n)&&UE(n)}function tO(n){var t=function(n){return n.id?n.id:Xo("h")}(n);return Jk("header",$k(n),"#"+t,function(n){return Zk(n)?parseInt(n.nodeName.substr(1),10):0}(n),function(){n.id=t})}function eO(n){var t=n.id||n.name,e=$k(n);return Jk("anchor",e||"#"+t,"#"+t,0,Z)}function oO(n){return function(n,t){return S(zc(we.fromDom(t),n),function(n){return n.dom()})}("h1,h2,h3,h4,h5,h6,a:not([href])",n)}function rO(n){return 0<zE(n.title).length}function iO(n){return cn(n)&&/^https?/.test(n)}function uO(n){return sn(n)&&I(n,function(n){return!function(n){return fn(n)&&n.length<=5&&D(n,iO)}(n)}).isNone()}function aO(){var n,t=v.localStorage.getItem(GE);if(null===t)return{};try{n=JSON.parse(t)}catch(e){if(e instanceof SyntaxError)return v.console.log("Local storage "+GE+" was not valid JSON",e),{};throw e}return uO(n)?n:(v.console.log("Local storage "+GE+" was not valid format",n),{})}function cO(n){var t=aO();return Object.prototype.hasOwnProperty.call(t,n)?t[n]:[]}function sO(t,n){if(iO(t)){var e=aO(),o=Object.prototype.hasOwnProperty.call(e,n)?e[n]:[],r=C(o,function(n){return n!==t});e[n]=[t].concat(r).slice(0,5),function(n){if(!uO(n))throw new Error("Bad format for history:\n"+JSON.stringify(n));v.localStorage.setItem(GE,JSON.stringify(n))}(e)}}function fO(n){return!!n}function lO(n){return P(yk.makeMap(n,/[, ]/),fO)}function dO(n,t,e){var o=function(n,t){return XE.call(n,t)?on.some(n[t]):on.none()}(n,t).getOr(e);return cn(o)?on.some(o):on.none()}function mO(n){return on.some(n.file_picker_callback).filter(dn)}function gO(n,t){var e=function(n){var t=on.some(n.file_picker_types).filter(fO),e=on.some(n.file_browser_callback_types).filter(fO),o=t.or(e).map(lO);return mO(n).fold(function(){return!1},function(n){return o.fold(function(){return!0},function(n){return 0<wn(n).length&&n})})}(n);return ln(e)?e?mO(n):on.none():e[t]?mO(n):on.none()}function pO(t){return{getHistory:cO,addToHistory:sO,getLinkInformation:function(){return function(n){return!1===n.settings.typeahead_urls?on.none():on.some({targets:WE(n.getBody()),anchorTop:dO(n.settings,"anchor_top","#top").getOrUndefined(),anchorBottom:dO(n.settings,"anchor_bottom","#bottom").getOrUndefined()})}(t)},getValidationHandler:function(){return function(n){return on.from(n.settings.file_picker_validator_handler).filter(dn).orThunk(function(){return on.from(n.settings.filepicker_validator_handler).filter(dn)})}(t)},getUrlPicker:function(n){return function(r,i){return gO(r.settings,i).map(function(o){return function(t){return Vy(function(e){var n=yk.extend({filetype:i},on.from(t.meta).getOr({}));o.call(r,function(n,t){if(!cn(n))throw new Error("Expected value to be string");if(t!==undefined&&!sn(t))throw new Error("Expected meta to be a object");e({value:n,meta:t})},t.value,n)})}})}(t,n)}}}function hO(n,t,e,o){var r=ye(!1),i={shared:{providers:{icons:function(){return t.ui.registry.getAll().icons},menuItems:function(){return t.ui.registry.getAll().menuItems},translate:rh.translate},interpreter:function(n){return function(n,t){return IE(FE,n,t)}(n,i)},anchors:NE(t,e,o),getSink:function(){return an.value(n)}},urlinput:pO(t),styleselect:function(e){function o(n){return function(){return e.formatter.match(n)}}function r(t){return function(){var n=e.formatter.get(t);return n!==undefined?on.some({tag:0<n.length&&(n[0].inline||n[0].block)||"div",styleAttr:e.formatter.getCssText(t)}):on.none()}}var i=function(n){var t=n.items;return t!==undefined&&0<t.length?B(t,i):[n.format]},u=ye([]),a=ye([]),c=ye([]),s=ye([]),f=ye(!1);e.on("init",function(){var n=Xk(e),t=qk(e,n,o,r);u.set(t),a.set(B(t,i))}),e.on("addStyleModifications",function(n){var t=qk(e,n.items,o,r);c.set(t),f.set(n.replace),s.set(B(t,i))});return{getData:function(){var n=f.get()?[]:u.get(),t=c.get();return n.concat(t)},getFlattenedKeys:function(){var n=f.get()?[]:a.get(),t=s.get();return n.concat(t)}}}(t),colorinput:Gk(t),dialog:function(n){return{isDraggableModal:function(n){return function(){return function(n){return n.getParam("draggable_modal",!1,"boolean")}(n)}}(n)}}(t),isContextMenuOpen:function(){return r.get()},setContextMenuState:function(n){return r.set(n)}};return i}function vO(n,t,o){var e=function(n,e){return O(n,function(t,n){return e(n,t.len).fold(nn(t),function(n){return{len:n.finish(),list:t.list.concat([n])}})},{len:0,list:[]}).list}(n,function(n,t){var e=o(n);return on.some({element:nn(n),start:nn(t),finish:nn(t+e),width:nn(e)})}),r=C(e,function(n){return n.finish()<=t}),i=k(r,function(n,t){return n+t.width()},0),u=e.slice(r.length);return{within:nn(r),extra:nn(u),withinWidth:nn(i)}}function bO(n){return S(n,function(n){return n.element()})}function yO(n,t,e,o){var r=function(n,t,e){var o=vO(t,n,e);return 0===o.extra().length?on.some(o):on.none()}(n,t,e).getOrThunk(function(){return vO(t,n-e(o),e)}),i=r.within(),u=r.extra(),a=r.withinWidth();return 1===u.length&&u[0].width()<=e(o)?function(n,t,e){var o=bO(n.concat(t));return $E(o,[],e)}(i,u,a):1<=u.length?function(n,t,e,o){var r=bO(n).concat([e]);return $E(r,bO(t),o)}(i,u,o,a):function(n,t,e){return $E(bO(n),[],e)}(i,0,a)}function xO(n,t){var e=S(t,function(n){return au(n)});JE.setGroups(n,e)}function wO(n,t,e,o){var r=Ks(n,t,"primary"),i=qs(n,t,"overflow-button"),u=Jy.getCoupled(n,"overflowGroup");yr(r.element(),"visibility","hidden");var a=function(n,t){return n.bind(function(t){return Ca(t.element()).bind(function(n){return t.getSystem().getByDom(n).toOption()})}).orThunk(function(){return t.filter(vg.isFocused)})}(e,i);e.each(function(n){JE.setGroups(n,[])});var c=t.builtGroups.get();xO(r,c.concat([u]));var s=mu(r.element()),f=yO(s,c,function(n){return mu(n.element())},u);0===f.extra().length?(mg.remove(r,u),e.each(function(n){JE.setGroups(n,[])})):(xO(r,f.within()),e.each(function(n){xO(n,f.extra())})),kr(r.element(),"visibility"),Or(r.element()),e.each(function(t){i.each(function(n){return Cg.set(n,o(t))}),a.each(vg.focus)})}function SO(o,n,t,e,r){var i="alloy.toolbar.toggle";return{uid:o.uid,dom:o.dom,components:n,behaviours:Rs(o.splitToolbarBehaviours,[Jy.config({others:N(N({},r.coupling),{overflowGroup:function(t){return nT.sketch(N(N({},e["overflow-group"]()),{items:[Gg.sketch(N(N({},e["overflow-button"]()),{action:function(n){oo(t,i)}}))]}))}})}),Kd("toolbar-toggle-events",[lo(i,function(n){r.apis.toggle(n)})])]),apis:N({setGroups:function(n,t){!function(n,t){var e=S(t,n.getSystem().build);o.builtGroups.set(e)}(n,t),r.apis.refresh(n)},getMoreButton:function(n){return function(n){return qs(n,o,"overflow-button")}(n)}},r.apis),domModification:{attributes:{role:"group"}}}}function CO(n){return n.getSystem().isConnected()}function kO(n,t,e){var o=t.lazySink(n).getOrDie(),r=t.getAnchor(n),i=t.getOverflowBounds.map(function(n){return n()});Af.positionWithinBounds(o,r,e,i)}function OO(t,e){var n=zf.getState(Jy.getCoupled(t,"sandbox"));wO(t,e,n,CO),n.each(function(n){return kO(t,e,n)})}function EO(t,e){zf.getState(Jy.getCoupled(t,"sandbox")).each(function(n){return kO(t,e,n)})}function TO(t,n){return n.getAnimationRoot.fold(function(){return t.element()},function(n){return n(t)})}function BO(n){return n.dimension.property}function DO(n,t){return n.dimension.getDimension(t)}function AO(n,t){var e=TO(n,t);pr(e,[t.shrinkingClass,t.growingClass])}function _O(n,t){dr(n.element(),t.openClass),fr(n.element(),t.closedClass),yr(n.element(),BO(t),"0px"),Or(n.element())}function MO(n,t){dr(n.element(),t.closedClass),fr(n.element(),t.openClass),kr(n.element(),BO(t))}function FO(n,t,e,o){e.setCollapsed(),yr(n.element(),BO(t),DO(t,n.element())),Or(n.element()),AO(n,t),_O(n,t),t.onStartShrink(n),t.onShrunk(n)}function IO(n,t,e,o){var r=o.getOrThunk(function(){return DO(t,n.element())});e.setCollapsed(),yr(n.element(),BO(t),r),Or(n.element());var i=TO(n,t);dr(i,t.growingClass),fr(i,t.shrinkingClass),_O(n,t),t.onStartShrink(n)}function RO(n,t,e){var o=DO(t,n.element());("0px"===o?FO:IO)(n,t,e,on.some(o))}function VO(n,t,e){var o=TO(n,t),r=mr(o,t.shrinkingClass),i=DO(t,n.element());MO(n,t);var u=DO(t,n.element());(r?function(){yr(n.element(),BO(t),i),Or(n.element())}:function(){_O(n,t)})(),dr(o,t.shrinkingClass),fr(o,t.growingClass),MO(n,t),yr(n.element(),BO(t),u),e.setExpanded(),t.onStartGrow(n)}function NO(n,t,e){var o=TO(n,t);return!0===mr(o,t.growingClass)}function HO(n,t,e){var o=TO(n,t);return!0===mr(o,t.shrinkingClass)}function PO(n){return cT.hasGrown(n)}function zO(n,t){var e=n.outerContainer;!function(n,t){var e=n.outerContainer.element();t&&(n.mothership.broadcastOn([Lf()],{target:e}),n.uiMothership.broadcastOn([Lf()],{target:e})),n.mothership.broadcastOn([gT],{readonly:t}),n.uiMothership.broadcastOn([gT],{readonly:t})}(n,t),Lt("*",e.element()).forEach(function(n){e.getSystem().getByDom(n).each(function(n){n.hasConfigured(Ch)&&Ch.set(n,t)})})}function LO(n,t){n.on("init",function(){n.readonly&&zO(t,!0)}),n.on("SwitchMode",function(){return zO(t,n.readonly)}),function(n){return n.getParam("readonly",!1,"boolean")}(n)&&n.setMode("readonly")}function jO(e){var n;return lc.config({channels:(n={},n[gT]={schema:pT,onReceive:function(n,t){e(n).each(function(n){!function(t,e){Lt("*",t.element()).forEach(function(n){t.getSystem().getByDom(n).each(function(n){n.hasConfigured(Ch)&&Ch.set(n,e)})})}(n,t.readonly)})}},n)})}function UO(n){var t=n.title.fold(function(){return{}},function(n){return{attributes:{title:n}}});return{dom:N({tag:"div",classes:["tox-toolbar__group"]},t),components:[nT.parts().items({})],items:n.items,markers:{itemSelector:"*:not(.tox-split-button) > .tox-tbtn:not([disabled]), .tox-split-button:not([disabled]), .tox-toolbar-nav-js:not([disabled])"},tgroupBehaviours:ba([Gy.config({}),vg.config({})])}}function WO(n){return nT.sketch(UO(n))}function GO(e,n,t){var o=Ii(function(n){var t=S(e.initGroups,WO);JE.setGroups(n,t)});return ba([lg.config({mode:n,onEscape:e.onEscape,selector:".tox-toolbar__group"}),Kd("toolbar-events",[o]),jO(t)])}function XO(n,t){var e=n.cyclicKeying?"cyclic":"acyclic";return{uid:n.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":UO({title:on.none(),items:[]}),"overflow-button":jC({name:"more",icon:on.some("more-drawer"),disabled:!1,tooltip:on.some("More..."),primary:!1,borderless:!1},on.none(),n.backstage.shared.providers)},splitToolbarBehaviours:GO(n,e,t)}}function YO(r){var n=XO(r,rT.getOverflow),t=rT.parts().primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return rT.sketch(N(N({},n),{lazySink:r.getSink,getAnchor:function(){return r.backstage.shared.anchors.toolbarOverflow()},getOverflowBounds:function(){var n=r.moreDrawerData.lazyHeader().element(),t=wu(n),e=ko(n),o=wu(e);return yu(t.x()+4,o.y(),t.width()-8,o.height())},parts:N(N({},n.parts),{overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"]}}}),components:[t],markers:{overflowToggledClass:"tox-tbtn--enabled"}}))}function qO(n){var t=dT.parts().primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),e=dT.parts().overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}}),o=XO(n,dT.getOverflow);return dT.sketch(N(N({},o),{components:[t,e],markers:{openClass:"tox-toolbar__overflow--open",closedClass:"tox-toolbar__overflow--closed",growingClass:"tox-toolbar__overflow--growing",shrinkingClass:"tox-toolbar__overflow--shrinking",overflowToggledClass:"tox-tbtn--enabled"},onOpened:function(n){n.getSystem().broadcastOn([mT()],{type:"opened"})},onClosed:function(n){n.getSystem().broadcastOn([mT()],{type:"closed"})}}))}function KO(n){var t=n.cyclicKeying?"cyclic":"acyclic";return JE.sketch({uid:n.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(n.type===jb.scrolling?["tox-toolbar--scrolling"]:[])},components:[JE.parts().groups({})],toolbarBehaviours:GO(n,t,nn(on.none()))})}function JO(n){return tt("toolbarbutton",vT,n)}function $O(n){return tt("menubutton",yT,n)}function QO(n){return tt("ToggleButton",ST,n)}function ZO(t){return{isDisabled:function(){return Ch.isDisabled(t)},setDisabled:function(n){return Ch.set(t,n)}}}function nE(t){return{setActive:function(n){Cg.set(t,n)},isActive:function(){return Cg.isOn(t)},isDisabled:function(){return Ch.isDisabled(t)},setDisabled:function(n){return Ch.set(t,n)}}}function tE(n,t){return n.map(function(n){return{"aria-label":t.translate(n),title:t.translate(n)}}).getOr({})}function eE(t,e,n,o,r,i){function u(n){return rh.isRtl()&&vn(jT,n)?n+"-rtl":n}var a,c=rh.isRtl()&&t.exists(function(n){return vn(UT,n)});return{dom:{tag:"button",classes:["tox-tbtn"].concat(e.isSome()?["tox-tbtn--select"]:[]).concat(c?["tox-tbtn__icon-rtl"]:[]),attributes:tE(n,i)},components:Bh([t.map(function(n){return AC(u(n),i.icons)}),e.map(function(n){return MC(n,"tox-tbtn",i)})]),eventOrder:(a={},a[Yr()]=["focusing","alloy.base.behaviour","common-button-display-events"],a),buttonBehaviours:ba([Kd("common-button-display-events",[lo(Yr(),function(n,t){t.event().prevent(),oo(n,LT)})])].concat(o.map(function(n){return RT.config({channel:n,initialData:{icon:t,text:e},renderComponents:function(n,t){return Bh([n.icon.map(function(n){return AC(u(n),i.icons)}),n.text.map(function(n){return MC(n,"tox-tbtn",i)})])}})}).toArray()).concat(r.getOr([])))}}function oE(n,t,e){var o=ye(Z),r=eE(n.icon,n.text,n.tooltip,on.none(),on.none(),e);return Gg.sketch({dom:r.dom,components:r.components,eventOrder:ok,buttonBehaviours:ba([Kd("toolbar-button-events",[function(e){return Ni(function(t,n){Op(e,t)(function(n){ro(t,ek,{buttonApi:n}),e.onAction(n)})})}({onAction:n.onAction,getApi:t.getApi}),Ep(t,o),Tp(t,o)]),Th(n.disabled)].concat(t.toolbarButtonBehaviours))})}function rE(t,n){function e(e){return{isDisabled:function(){return Ch.isDisabled(e)},setDisabled:function(n){return Ch.set(e,n)},setIconFill:function(n,t){ku(e.element(),'svg path[id="'+n+'"], rect[id="'+n+'"]').each(function(n){Po(n,"fill",t)})},setIconStroke:function(n,t){ku(e.element(),'svg path[id="'+n+'"], rect[id="'+n+'"]').each(function(n){Po(n,"stroke",t)})},setActive:function(t){Po(e.element(),"aria-pressed",t),ku(e.element(),"span").each(function(n){e.getSystem().getByDom(n).each(function(n){return Cg.set(n,t)})})},isActive:function(){return ku(e.element(),"span").exists(function(n){return e.getSystem().getByDom(n).exists(Cg.isOn)})}}}var o,r=Xo("channel-update-split-dropdown-display"),i=ye(Z),u={getApi:e,onSetup:t.onSetup};return zT.sketch({dom:{tag:"div",classes:["tox-split-button"],attributes:An({"aria-pressed":!1},tE(t.tooltip,n.providers))},onExecute:function(n){t.onAction(e(n))},onItemExecute:function(n,t,e){},splitDropdownBehaviours:ba([Eh(!1),Kd("split-dropdown-events",[lo(LT,vg.focus),Ep(u,i),Tp(u,i)]),Ew.config({})]),eventOrder:(o={},o[Ci()]=["alloy.base.behaviour","split-dropdown-events"],o),toggleClass:"tox-tbtn--enabled",lazySink:n.getSink,fetch:function(e,r,o){return function(t){return Vy(function(n){return r.fetch(n)}).map(function(n){return on.from(ub(Dn(Tv(Xo("menu-value"),n,function(n){r.onItemAction(e(t),n)},r.columns,r.presets,Fh.CLOSE_ON_EXECUTE,r.select.getOr(function(){return!1}),o),{movement:Bv(r.columns,r.presets),menuBehaviours:Jp("auto"!==r.columns?[]:[Ii(function(o,n){ip(o,4,sp(r.presets)).each(function(n){var t=n.numRows,e=n.numColumns;lg.setGridSize(o,t,e)})})])})))})}}(e,t,n.providers),parts:{menu:Sv(0,t.columns,t.presets)},components:[zT.parts().button(eE(t.icon,t.text,on.none(),on.some(r),on.some([Cg.config({toggleClass:"tox-tbtn--enabled",toggleOnExecute:!1})]),n.providers)),zT.parts().arrow({dom:{tag:"button",classes:["tox-tbtn","tox-split-button__chevron"],innerHtml:ym("chevron-down",n.providers.icons)}}),zT.parts()["aria-descriptor"]({text:n.providers.translate("To open the popup, press Shift+Enter")})]})}function iE(o,r){return lo(ek,function(n,t){var e=function(n){return{hide:function(){return oo(n,hi())},getValue:function(){return Zf.getValue(n)}}}(o.get(n));r.onAction(e,t.event().buttonApi())})}function uE(n,t,e){var o={backstage:{shared:{providers:e}}};return"contextformtogglebutton"===t.type?function(n,t,e){var o=t.original,r=(o.primary,c(o,["primary"])),i=et(QO(N(N({},r),{type:"togglebutton",onAction:function(){}})));return GT(i,e.backstage.shared.providers,[iE(n,t)])}(n,t,o):function(n,t,e){var o=t.original,r=(o.primary,c(o,["primary"])),i=et(JO(N(N({},r),{type:"button",onAction:function(){}})));return WT(i,e.backstage.shared.providers,[iE(n,t)])}(n,t,o)}function aE(n,t){var e=Math.max(t.x(),n.x()),o=n.right()-e,r=t.width()-(e-t.x());return{x:e,width:Math.min(o,r)}}function cE(n){var t=Pb(n)||zb(n)||Xb(n),e=vu(v.window),o=xu(we.fromDom(n.getContentAreaContainer()));return n.inline&&!t?function(n,t,e){var o=aE(t,e),r=o.x,i=o.width;return yu(r,e.y(),i,e.height())}(0,o,e):n.inline?function(n,t,e){var o=aE(t,e),r=o.x,i=o.width,u=we.fromDom(n.getContainer()),a=ku(u,".tox-editor-header").getOr(u),c=xu(a),s=e.height(),f=e.y();if(c.y()>=t.bottom()){var l=Math.min(s+f,c.y());return yu(r,f,i,l-f)}var d=Math.max(f,c.bottom());return yu(r,d,i,s-(d-f))}(n,o,e):function(n,t,e){var o=aE(t,e),r=o.x,i=o.width,u=we.fromDom(n.getContainer()),a=ku(u,".tox-editor-header").getOr(u),c=xu(u),s=xu(a),f=Math.max(e.y(),t.y(),s.bottom()),l=c.bottom()-f,d=e.height()-(f-e.y()),m=Math.min(l,d);return yu(r,f,i,m)}(n,o,e)}function sE(t,n){return Du(n,function(n){return n.predicate(t.dom())?on.some({toolbarApi:n,elem:t}):on.none()})}function fE(o,r){return function(t){function n(){t.setActive(o.formatter.match(r));var n=o.formatter.formatChanged(r,t.setActive).unbind;e.set(on.some(n))}var e=ye(on.none());return o.initialized?n():o.on("init",n),function(){return e.get().each(function(n){return n()})}}}function lE(t){return function(n){return function(){t.undoManager.transact(function(){t.focus(),t.execCommand("mceToggleFormat",!1,n.format)})}}}function dE(n,t,e){var o=e.dataset,r="basic"===o.type?function(){return S(o.data,function(n){return Yk(n,e.isSelectedFor,e.getPreviewFor)})}:o.getData;return{items:function(n,u,a){function r(n,t,e,o){var r=u.shared.providers.translate(n.title);if("separator"===n.type)return on.some({type:"separator",text:r});if("submenu"!==n.type)return on.some(N({type:"togglemenuitem",text:r,active:n.isSelected(o),disabled:e,onAction:a.onAction(n)},n.getStylePreview().fold(function(){return{}},function(n){return{meta:{style:n}}})));var i=B(n.getStyleItems(),function(n){return c(n,t,o)});return 0===t&&i.length<=0?on.none():on.some({type:"nestedmenuitem",text:r,disabled:i.length<=0,getSubmenuItems:function(){return B(n.getStyleItems(),function(n){return c(n,t,o)})}})}function i(n){var t=a.getCurrentValue(),e=a.shouldHide?0:1;return B(n,function(n){return c(n,e,t)})}var c=function(n,t,e){var o="formatter"===n.type&&a.isInvalid(n);return 0===t?o?[]:r(n,t,!1,e).toArray():r(n,t,o,e).toArray()};return{validateItems:i,getFetch:function(o,r){return function(n){var t=r(),e=i(t);n(NC(e,Fh.CLOSE_ON_EXECUTE,o,!1))}}}}(0,t,e),getStyleItems:r}}function mE(o,n,t){var e=dE(0,n,t),r=e.items,i=e.getStyleItems;return FC({text:t.icon.isSome()?on.none():on.some(""),icon:t.icon,tooltip:on.from(t.tooltip),role:on.none(),fetch:r.getFetch(n,i),onSetup:function(e){return t.setInitialValue.each(function(n){return n(e.getComponent())}),t.nodeChangeHandler.map(function(n){var t=n(e.getComponent());return o.on("NodeChange",t),function(){o.off("NodeChange",t)}}).getOr(Z)},getApi:function(n){return{getComponent:function(){return n}}},columns:1,presets:"normal",classes:t.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[]},"tox-tbtn",n.shared)}var gE,pE,hE,vE,bE=Dl({name:"HtmlSelect",configFields:[ct("options"),Fs("selectBehaviours",[vg,Zf]),St("selectClasses",[]),St("selectAttributes",{}),ht("data")],factory:function(e,n){var t=S(e.options,function(n){return{dom:{tag:"option",value:n.value,innerHtml:n.text}}}),o=e.data.map(function(n){return q("initialValue",n)}).getOr({});return{uid:e.uid,dom:{tag:"select",classes:e.selectClasses,attributes:e.selectAttributes},components:t,behaviours:Rs(e.selectBehaviours,[vg.config({}),Zf.config({store:N({mode:"manual",getValue:function(n){return Er(n.element())},setValue:function(n,t){E(e.options,function(n){return n.value===t}).isSome()&&Tr(n.element(),t)}},o)})])}}}),yE=/* */Object.freeze({events:function(n,t){var e=n.stream.streams.setup(n,t);return co([lo(n.event,e),Ri(function(){return t.cancel()})].concat(n.cancelEvent.map(function(n){return[lo(n,function(){return t.cancel()})]}).getOr([])))}}),xE=/* */Object.freeze({throttle:_k,init:function(n){return n.stream.streams.state(n)}}),wE=[st("stream",it("mode",{throttle:[ct("delay"),St("stopEvent",!0),Qu("streams",{setup:function(n,t){var e=n.stream,o=Jg(n.onStream,e.delay);return t.setTimer(o),function(n,t){o.throttle(n,t),e.stopEvent&&t.stop()}},state:_k})]})),St("event","input"),ht("cancelEvent"),Ju("onStream")],SE=ya({fields:wE,name:"streaming",active:yE,state:xE}),CE=function(n){Fk(n,function(n,t){return n.setSelectionRange(t.length,t.length)})},kE=nn("alloy.typeahead.itemexecute"),OE=nn([ht("lazySink"),ct("fetch"),St("minChars",5),St("responseTime",1e3),qu("onOpen"),St("getHotspot",on.some),St("getAnchorOverrides",nn({})),St("layouts",on.none()),St("eventOrder",{}),Dt("model",{},[St("getDisplayText",function(n){return n.meta!==undefined&&n.meta.text!==undefined?n.meta.text:n.value}),St("selectsOver",!0),St("populateFromBrowse",!0)]),qu("onSetValue"),Ku("onExecute"),qu("onItemExecute"),St("inputClasses",[]),St("inputAttributes",{}),St("inputStyles",{}),St("matchWidth",!0),St("useMinWidth",!1),St("dismissOnBlur",!0),Xu(["openClass"]),ht("initialData"),Fs("typeaheadBehaviours",[vg,Zf,SE,lg,Cg,Jy]),At("previewing",function(){return ye(!0)})].concat(by()).concat(ax())),EE=nn([wl({schema:[Gu()],name:"menu",overrides:function(o){return{fakeFocus:!0,onHighlight:function(t,e){o.previewing.get()?t.getSystem().getByUid(o.uid).each(function(n){Ik(o.model,n,e).fold(function(){return ad.dehighlight(t,e)},function(n){return n()})}):t.getSystem().getByUid(o.uid).each(function(n){o.model.populateFromBrowse&&Mk(o.model,n,e)}),o.previewing.set(!1)},onExecute:function(n,t){return n.getSystem().getByUid(o.uid).toOption().map(function(n){return ro(n,kE(),{item:t}),!0})},onHover:function(n,t){o.previewing.set(!1),n.getSystem().getByUid(o.uid).each(function(n){o.model.populateFromBrowse&&Mk(o.model,n,t)})}}}})]),TE=Al({name:"Typeahead",configFields:OE(),partFields:EE(),factory:function(r,n,t,i){function e(n,t,e){r.previewing.set(!1);var o=Jy.getCoupled(n,"sandbox");if(zf.isOpen(o))Zl.getCurrent(o).each(function(n){ad.getHighlighted(n).fold(function(){e(n)},function(){ao(o,n.element(),"keydown",t)})});else{nx(r,u(n),n,o,i,function(n){Zl.getCurrent(n).each(e)},Ay.HighlightFirst).get(Z)}}var o=Zb(r),u=function(o){return function(n){return n.map(function(n){var t=R(n.menus),e=B(t,function(n){return C(n.items,function(n){return"item"===n.type})});return Zf.getState(o).update(S(e,function(n){return n.data})),n})}},a=[vg.config({}),Zf.config({onSetValue:r.onSetValue,store:N({mode:"dataset",getDataKey:function(n){return Er(n.element())},getFallbackEntry:function(n){return{value:n,meta:{}}},setValue:function(n,t){Tr(n.element(),r.model.getDisplayText(t))}},r.initialData.map(function(n){return q("initialValue",n)}).getOr({}))}),SE.config({stream:{mode:"throttle",delay:r.responseTime,stopEvent:!1},onStream:function(n,t){var e=Jy.getCoupled(n,"sandbox");if(vg.isFocused(n)&&Er(n.element()).length>=r.minChars){var o=Zl.getCurrent(e).bind(function(n){return ad.getHighlighted(n).map(Zf.getValue)});r.previewing.set(!0);nx(r,u(n),n,e,i,function(n){Zl.getCurrent(e).each(function(n){o.fold(function(){r.model.selectsOver&&ad.highlightFirst(n)},function(t){ad.highlightBy(n,function(n){return Zf.getValue(n).value===t.value}),ad.getHighlighted(n).orThunk(function(){return ad.highlightFirst(n),on.none()})})})},Ay.HighlightFirst).get(Z)}},cancelEvent:vi()}),lg.config({mode:"special",onDown:function(n,t){return e(n,t,ad.highlightFirst),on.some(!0)},onEscape:function(n){var t=Jy.getCoupled(n,"sandbox");return zf.isOpen(t)?(zf.close(t),on.some(!0)):on.none()},onUp:function(n,t){return e(n,t,ad.highlightLast),on.some(!0)},onEnter:function(t){var n=Jy.getCoupled(t,"sandbox"),e=zf.isOpen(n);if(e&&!r.previewing.get())return Zl.getCurrent(n).bind(function(n){return ad.getHighlighted(n)}).map(function(n){return ro(t,kE(),{item:n}),!0});var o=Zf.getValue(t);return oo(t,vi()),r.onExecute(n,t,o),e&&zf.close(n),on.some(!0)}}),Cg.config({toggleClass:r.markers.openClass,aria:{mode:"expanded"}}),Jy.config({others:{sandbox:function(n){return ix(r,n,{onOpen:function(){return Cg.on(n)},onClose:function(){return Cg.off(n)}})}}}),Kd("typeaheadevents",[Ni(function(n){var t=Z;ex(r,u(n),n,i,t,Ay.HighlightFirst).get(Z)}),lo(kE(),function(n,t){var e=Jy.getCoupled(n,"sandbox");Mk(r.model,n,t.event().item()),oo(n,vi()),r.onItemExecute(n,e,t.event().item(),Zf.getValue(n)),zf.close(e),CE(n)})].concat(r.dismissOnBlur?[lo(si(),function(n){var t=Jy.getCoupled(n,"sandbox");Ca(t.element()).isNone()&&zf.close(t)})]:[]))];return{uid:r.uid,dom:ny(Dn(r,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:N(N({},o),Rs(r.typeaheadBehaviours,a)),eventOrder:r.eventOrder}}}),BE=function(i){return N(N({},i),{toCached:function(){return BE(i.toCached())},bindFuture:function(t){return BE(i.bind(function(n){return n.fold(function(n){return Ny(an.error(n))},function(n){return t(n)})}))},bindResult:function(t){return BE(i.map(function(n){return n.bind(t)}))},mapResult:function(t){return BE(i.map(function(n){return n.map(t)}))},mapError:function(t){return BE(i.map(function(n){return n.mapError(t)}))},foldResult:function(t,e){return i.map(function(n){return n.fold(t,e)})},withTimeout:function(n,r){return BE(Vy(function(t){var e=!1,o=v.setTimeout(function(){e=!0,t(an.error(r()))},n);i.get(function(n){e||(v.clearTimeout(o),t(n))})}))}})},DE=Rk,AE={type:"separator"},_E=Xo("aria-invalid"),ME={bar:Uk(function(n,t){return function(n,t){return{dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:S(n.items,t.interpreter)}}(n,t.shared)}),collection:Uk(function(n,t){return jk(n,t.shared.providers)}),alertbanner:Uk(function(n,t){return function(t,n){return Wb.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in","tox-notification--"+t.level]},components:[{dom:{tag:"div",classes:["tox-notification__icon"]},components:[Gg.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:ym(t.icon,n.icons),attributes:{title:n.translate(t.iconTooltip)}},action:function(n){ro(n,sy,{name:"alert-banner",value:t.url})}})]},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:n.translate(t.text)}}]})}(n,t.shared.providers)}),input:Uk(function(n,t){return function(n,t){return Ak({name:n.name,multiline:!1,label:n.label,inputMode:n.inputMode,placeholder:n.placeholder,flex:!1,disabled:n.disabled,classname:"tox-textfield",validation:on.none(),maximized:n.maximized},t)}(n,t.shared.providers)}),textarea:Uk(function(n,t){return function(n,t){return Ak({name:n.name,multiline:!0,label:n.label,inputMode:on.none(),placeholder:n.placeholder,flex:!0,disabled:n.disabled,classname:"tox-textarea",validation:on.none(),maximized:n.maximized},t)}(n,t.shared.providers)}),label:Uk(function(n,t){return function(n,t){var e={dom:{tag:"label",innerHtml:t.providers.translate(n.label),classes:["tox-label"]}},o=S(n.items,t.interpreter);return{dom:{tag:"div",classes:["tox-form__group"]},components:[e].concat(o),behaviours:ba([xS(),mg.config({}),BS(on.none()),lg.config({mode:"acyclic"})])}}(n,t.shared)}),iframe:(gE=function(n,t){return ww(n,t.shared.providers)},function(n,t,e){var o=Dn(t,{source:"dynamic"});return Uk(gE)(n,o,e)}),button:Uk(function(n,t){return qC(n,t.shared.providers)}),checkbox:Uk(function(n,t){return function(e,t){function n(n){return n.element().dom().click(),on.some(!0)}function o(n){return{dom:{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+n],innerHtml:ym("checked"===n?"selected":"unselected",t.icons)}}}var r=Zf.config({store:{mode:"manual",getValue:function(n){return n.element().dom().checked},setValue:function(n,t){n.element().dom().checked=t}}}),i=vy.parts().field({factory:{sketch:l},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:ba([xS(),Ch.config({disabled:e.disabled}),Gy.config({}),vg.config({}),r,lg.config({mode:"special",onEnter:n,onSpace:n,stopSpaceKeyup:!0}),Kd("checkbox-events",[lo(oi(),function(n,t){ro(n,uy,{name:e.name})})])])}),u=vy.parts().label({dom:{tag:"span",classes:["tox-checkbox__label"],innerHtml:t.translate(e.label)},behaviours:ba([Ew.config({})])}),a=vm({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[o("checked"),o("unchecked")]});return vy.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[i,a.asSpec(),u],fieldBehaviours:ba([Ch.config({disabled:e.disabled,disableClass:"tox-checkbox--disabled",onDisabled:function(n){vy.getField(n).each(Ch.disable)},onEnabled:function(n){vy.getField(n).each(Ch.enable)}})])})}(n,t.shared.providers)}),colorinput:Uk(function(n,t){return cx(n,t.shared,t.colorinput)}),colorpicker:Uk(function(n){function t(n){return"tox-"+n}var e=yS(pw,t),r=vm(e.sketch({dom:{tag:"div",classes:[t("color-picker-container")],attributes:{role:"presentation"}},onValidHex:function(n){ro(n,sy,{name:"hex-valid",value:!0})},onInvalidHex:function(n){ro(n,sy,{name:"hex-valid",value:!1})}}));return{dom:{tag:"div"},components:[r.asSpec()],behaviours:ba([Zf.config({store:{mode:"manual",getValue:function(n){var t=r.get(n);return Zl.getCurrent(t).bind(function(n){return Zf.getValue(n).hex}).map(function(n){return"#"+n}).getOr("")},setValue:function(n,t){var e=/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/.exec(t),o=r.get(n);Zl.getCurrent(o).fold(function(){v.console.log("Can not find form")},function(n){Zf.setValue(n,{hex:on.from(e[1]).getOr("")}),dS.getField(n,"hex").each(function(n){oo(n,ei())})})}}}),xS()])}}),dropzone:Uk(function(n,t){return bw(n,t.shared.providers)}),grid:Uk(function(n,t){return function(n,t){return{dom:{tag:"div",classes:["tox-form__grid","tox-form__grid--"+n.columns+"col"]},components:S(n.items,t.interpreter)}}(n,t.shared)}),selectbox:Uk(function(n,t){return function(e,t){var n=S(e.items,function(n){return{text:t.translate(n.text),value:n.value}}),o=e.label.map(function(n){return Dy(n,t)}),r=vy.parts().field({dom:{},selectAttributes:{size:e.size},options:n,factory:bE,selectBehaviours:ba([Ch.config({disabled:e.disabled}),Gy.config({}),Kd("selectbox-change",[lo(oi(),function(n,t){ro(n,uy,{name:e.name})})])])}),i=1<e.size?on.none():on.some({dom:{tag:"div",classes:["tox-selectfield__icon-js"],innerHtml:ym("chevron-down",t.icons)}}),u={dom:{tag:"div",classes:["tox-selectfield"]},components:H([[r],i.toArray()])};return vy.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:H([o.toArray(),[u]]),fieldBehaviours:ba([Ch.config({disabled:e.disabled,onDisabled:function(n){vy.getField(n).each(Ch.disable)},onEnabled:function(n){vy.getField(n).each(Ch.enable)}})])})}(n,t.shared.providers)}),sizeinput:Uk(function(n,t){return nk(n,t.shared.providers)}),urlinput:Uk(function(n,t){return Lk(n,t,t.urlinput)}),customeditor:Uk(function(e){var o=ye(on.none()),t=vm({dom:{tag:e.tag}}),r=ye(on.none());return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:ba([Kd("editor-foo-events",[Ii(function(n){t.getOpt(n).each(function(t){(!function(n){return Object.prototype.hasOwnProperty.call(n,"init")}(e)?kS.load(e.scriptId,e.scriptUrl).then(function(n){return n(t.element().dom(),e.settings)}):e.init(t.element().dom())).then(function(t){r.get().each(function(n){t.setValue(n)}),r.set(on.none()),o.set(on.some(t))})})})]),Zf.config({store:{mode:"manual",getValue:function(){return o.get().fold(function(){return r.get().getOr("")},function(n){return n.getValue()})},setValue:function(n,t){o.get().fold(function(){r.set(on.some(t))},function(n){return n.setValue(t)})}}}),xS()]),components:[t.asSpec()]}}),htmlpanel:Uk(function(n){return"presentation"===n.presets?Wb.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:n.html}}):Wb.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:n.html,attributes:{role:"document"}},containerBehaviours:ba([Gy.config({}),vg.config({})])})}),imagetools:Uk(function(n,t){return Dk(n,t.shared.providers)}),table:Uk(function(n,t){return function(n,t){function e(n){return{dom:{tag:"th",innerHtml:t.translate(n)}}}function o(n){return{dom:{tag:"td",innerHtml:t.translate(n)}}}function r(n){return{dom:{tag:"tr"},components:S(n,o)}}var i,u;return{dom:{tag:"table",classes:["tox-dialog__table"]},components:[(u=n.header,{dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:S(u,e)}]}),(i=n.cells,{dom:{tag:"tbody"},components:S(i,r)})],behaviours:ba([Gy.config({}),vg.config({})])}}(n,t.shared.providers)}),panel:Uk(function(n,t){return function(n,t){return{dom:{tag:"div",classes:n.classes},components:S(n.items,t.shared.interpreter)}}(n,t)})},FE={field:function(n,t){return t}},IE=function(t,e,o){return Nn(ME,e.type).fold(function(){return v.console.error('Unknown factory type "'+e.type+'", defaulting to container: ',e),e},function(n){return n(t,e,o)})},RE=nn(function(n,t){!function(n,t){var e=Vu.max(n,t,["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"]);yr(n,"max-width",e+"px")}(n,Math.floor(t))}),VE={valignCentre:[],alignCentre:[],alignLeft:[],alignRight:[],right:[],left:[],bottom:[],top:[]},NE=function(n,t,e){function o(){return we.fromDom(n.getBody())}var r=Kb(n);return{toolbar:function(n,t,e){return e?function(){return{anchor:"node",root:n(),node:on.from(n()),bubble:Oa(-12,-12,VE),layouts:{onRtl:function(){return[pm]},onLtr:function(){return[hm]}},overrides:{maxHeightFunction:Cf()}}}:function(){return{anchor:"hotspot",hotspot:t(),bubble:Oa(-12,12,VE),layouts:{onRtl:function(){return[ua]},onLtr:function(){return[aa]}},overrides:{maxHeightFunction:Cf()}}}}(o,t,r),toolbarOverflow:function(n){return function(){return{anchor:"hotspot",hotspot:n(),overrides:{maxWidthFunction:RE()},layouts:{onRtl:function(){return[ua,aa]},onLtr:function(){return[aa,ua]}}}}}(e),banner:function(n,t,e){return e?function(){return{anchor:"node",root:n(),node:on.from(n()),layouts:{onRtl:function(){return[Ug]},onLtr:function(){return[Ug]}}}}:function(){return{anchor:"hotspot",hotspot:t(),layouts:{onRtl:function(){return[rc]},onLtr:function(){return[rc]}}}}}(o,t,r),cursor:function(t,n){return function(){return{anchor:"selection",root:n(),getSelection:function(){var n=t.selection.getRng();return on.some(Tc.range(we.fromDom(n.startContainer),n.startOffset,we.fromDom(n.endContainer),n.endOffset))}}}}(n,o),node:function(t){return function(n){return{anchor:"node",root:t(),node:n}}}(o)}},HE=[{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:"strike-through",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:"Align",items:[{title:"Left",icon:"align-left",format:"alignleft"},{title:"Center",icon:"align-center",format:"aligncenter"},{title:"Right",icon:"align-right",format:"alignright"},{title:"Justify",icon:"align-justify",format:"alignjustify"}]}],PE=function(n){return O(n,function(n,t){if(function(n){return En(n,"items")}(t)){var e=PE(t.items);return{customFormats:n.customFormats.concat(e.customFormats),formats:n.formats.concat([{title:t.title,items:e.formats}])}}if(function(n){return En(n,"inline")}(t)||function(n){return En(n,"block")}(t)||function(n){return En(n,"selector")}(t)){var o="custom-"+t.title.toLowerCase();return{customFormats:n.customFormats.concat([{name:o,format:t}]),formats:n.formats.concat([{title:t.title,format:o,icon:t.icon}])}}return N(N({},n),{formats:n.formats.concat(t)})},{customFormats:[],formats:[]})},zE=yk.trim,LE=Kk("true"),jE=Kk("false"),UE=function(n){return function(n){for(;n=n.parentNode;){var t=n.contentEditable;if(t&&"inherit"!==t)return LE(n)}return!1}(n)&&!jE(n)},WE=function(n){var t=oO(n);return C(function(n){return S(C(n,nO),tO)}(t).concat(function(n){return S(C(n,Qk),eO)}(t)),rO)},GE="tinymce-url-history",XE=Object.prototype.hasOwnProperty,YE="contexttoolbar-hide",qE=nn([ct("dom"),St("shell",!0),Fs("toolbarBehaviours",[mg])]),KE=nn([Sl({name:"groups",overrides:function(n){return{behaviours:ba([mg.config({})])}}})]),JE=Al({name:"Toolbar",configFields:qE(),partFields:KE(),factory:function(t,n,e,o){var r=function(n){return t.shell?on.some(n):qs(n,t,"groups")},i=t.shell?{behaviours:[mg.config({})],components:[]}:{behaviours:[],components:n};return{uid:t.uid,dom:t.dom,components:i.components,behaviours:Rs(t.toolbarBehaviours,i.behaviours),apis:{setGroups:function(n,t){r(n).fold(function(){throw v.console.error("Toolbar was defined to not be a shell, but no groups container was specified in components"),new Error("Toolbar was defined to not be a shell, but no groups container was specified in components")},function(n){mg.set(n,t)})}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(n,t,e){n.setGroups(t,e)}}}),$E=yo("within","extra","withinWidth"),QE=nn([ct("items"),Xu(["itemSelector"]),Fs("tgroupBehaviours",[lg])]),ZE=nn([Cl({name:"items",unit:"item"})]),nT=Al({name:"ToolbarGroup",configFields:QE(),partFields:ZE(),factory:function(n,t,e,o){return{uid:n.uid,dom:n.dom,components:t,behaviours:Rs(n.tgroupBehaviours,[lg.config({mode:"flow",selector:n.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}}}}),tT=nn([Fs("splitToolbarBehaviours",[Jy]),At("builtGroups",function(){return ye([])})]),eT=nn([Xu(["overflowToggledClass"]),ct("getAnchor"),xt("getOverflowBounds"),ct("lazySink")].concat(tT())),oT=nn([xl({factory:JE,schema:qE(),name:"primary"}),wl({factory:JE,schema:qE(),name:"overflow",overrides:function(t){return{toolbarBehaviours:ba([lg.config({mode:"cyclic",onEscape:function(n){return qs(n,t,"overflow-button").each(vg.focus),on.none()}})])}}}),wl({name:"overflow-button",overrides:function(n){return{dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:ba([Cg.config({toggleClass:n.markers.overflowToggledClass,aria:{mode:"expanded"},toggleOnExecute:!1})])}}}),wl({name:"overflow-group"})]),rT=Al({name:"SplitFloatingToolbar",configFields:eT(),partFields:oT(),factory:function(t,n,e,o){return SO(t,n,0,o,{coupling:{sandbox:function(n){return function(o,e){var r=Eu();return{dom:{tag:"div",attributes:{id:r.id()}},behaviours:ba([lg.config({mode:"special",onEscape:function(n){return zf.close(n),on.some(!0)}}),zf.config({onOpen:function(n,t){OO(o,e),qs(o,e,"overflow-button").each(function(n){Cg.on(n),r.link(n.element())}),lg.focusIn(t)},onClose:function(){qs(o,e,"overflow-button").each(function(n){Cg.off(n),vg.focus(n),r.unlink(n.element())})},isPartOf:function(n,t,e){return Lu(t,e)||Lu(o,e)},getAttachPoint:function(){return e.lazySink(o).getOrDie()}}),lc.config({channels:N({},Ts({isExtraPart:nn(!1),doReposition:function(){return EO(o,e)}}))})])}}(n,t)}},apis:{refresh:function(n){return OO(n,t)},toggle:function(n){return function(n,t,e){var o=Jy.getCoupled(n,"sandbox");zf.isOpen(o)?zf.close(o):zf.open(o,e.overflow())}(n,0,o)},getOverflow:function(n){return zf.getState(Jy.getCoupled(n,"sandbox"))},reposition:function(n){return EO(n,t)}}})},apis:{setGroups:function(n,t,e){n.setGroups(t,e)},refresh:function(n,t){n.refresh(t)},reposition:function(n,t){n.reposition(t)},getMoreButton:function(n,t){return n.getMoreButton(t)},getOverflow:function(n,t){return n.getOverflow(t)},toggle:function(n,t){n.toggle(t)}}}),iT=/* */Object.freeze({refresh:function(n,t,e){if(e.isExpanded()){kr(n.element(),BO(t));var o=DO(t,n.element());yr(n.element(),BO(t),o)}},grow:function(n,t,e){e.isExpanded()||VO(n,t,e)},shrink:function(n,t,e){e.isExpanded()&&RO(n,t,e)},immediateShrink:function(n,t,e){e.isExpanded()&&FO(n,t,e)},hasGrown:function(n,t,e){return e.isExpanded()},hasShrunk:function(n,t,e){return e.isCollapsed()},isGrowing:NO,isShrinking:HO,isTransitioning:function(n,t,e){return!0===NO(n,t)||!0===HO(n,t)},toggleGrow:function(n,t,e){(e.isExpanded()?RO:VO)(n,t,e)},disableTransitions:AO}),uT=/* */Object.freeze({exhibit:function(n,t){var e=t.expanded;return Zo(e?{classes:[t.openClass],styles:{}}:{classes:[t.closedClass],styles:q(t.dimension.property,"0px")})},events:function(e,o){return co([bo(ii(),function(n,t){t.event().raw().propertyName===e.dimension.property&&(AO(n,e),o.isExpanded()&&kr(n.element(),e.dimension.property),(o.isExpanded()?e.onGrown:e.onShrunk)(n))})])}}),aT=[ct("closedClass"),ct("openClass"),ct("shrinkingClass"),ct("growingClass"),ht("getAnimationRoot"),qu("onShrunk"),qu("onStartShrink"),qu("onGrown"),qu("onStartGrow"),St("expanded",!1),st("dimension",it("property",{width:[Qu("property","width"),Qu("getDimension",function(n){return mu(n)+"px"})],height:[Qu("property","height"),Qu("getDimension",function(n){return su(n)+"px"})]}))],cT=ya({fields:aT,name:"sliding",active:uT,apis:iT,state:/* */Object.freeze({init:function(n){var t=ye(n.expanded);return nu({isExpanded:function(){return!0===t.get()},isCollapsed:function(){return!1===t.get()},setCollapsed:d(t.set,!1),setExpanded:d(t.set,!0),readState:function(){return"expanded: "+t.get()}})}})}),sT=nn([Xu(["closedClass","openClass","shrinkingClass","growingClass","overflowToggledClass"]),qu("onOpened"),qu("onClosed")].concat(tT())),fT=nn([xl({factory:JE,schema:qE(),name:"primary"}),xl({factory:JE,schema:qE(),name:"overflow",overrides:function(t){return{toolbarBehaviours:ba([cT.config({dimension:{property:"height"},closedClass:t.markers.closedClass,openClass:t.markers.openClass,shrinkingClass:t.markers.shrinkingClass,growingClass:t.markers.growingClass,onShrunk:function(n){qs(n,t,"overflow-button").each(function(n){Cg.off(n),vg.focus(n)}),t.onClosed(n)},onGrown:function(n){lg.focusIn(n),t.onOpened(n)},onStartGrow:function(n){qs(n,t,"overflow-button").each(Cg.on)}}),lg.config({mode:"acyclic",onEscape:function(n){return qs(n,t,"overflow-button").each(vg.focus),on.some(!0)}})])}}}),wl({name:"overflow-button",overrides:function(n){return{buttonBehaviours:ba([Cg.config({toggleClass:n.markers.overflowToggledClass,aria:{mode:"pressed"},toggleOnExecute:!1})])}}}),wl({name:"overflow-group"})]),lT=function(n,t){var e=qs(n,t,"overflow");wO(n,t,e,PO),e.each(cT.refresh)},dT=Al({name:"SplitSlidingToolbar",configFields:sT(),partFields:fT(),factory:function(t,n,e,o){return SO(t,n,0,o,{coupling:{},apis:{refresh:function(n){return lT(n,t)},toggle:function(n){return function(t,e){qs(t,e,"overflow").each(function(n){lT(t,e),cT.toggleGrow(n)})}(n,t)},getOverflow:function(n){return qs(n,t,"overflow")}}})},apis:{setGroups:function(n,t,e){n.setGroups(t,e)},refresh:function(n,t){n.refresh(t)},getMoreButton:function(n,t){return n.getMoreButton(t)},getOverflow:function(n,t){return n.getOverflow(t)},toggle:function(n,t){n.toggle(t)}}}),mT=nn(Xo("toolbar-height-change")),gT="silver.readonly",pT=re([(pE="readonly",st(pE,pe))]),hT=[Tt("disabled",!1),yt("tooltip"),yt("icon"),yt("text"),Bt("onSetup",function(){return Z})],vT=re([ft("type"),dt("onAction")].concat(hT)),bT=[yt("text"),yt("tooltip"),yt("icon"),dt("fetch"),Bt("onSetup",function(){return Z})],yT=re(g([ft("type")],bT)),xT=re([ft("type"),yt("tooltip"),yt("icon"),yt("text"),xt("select"),dt("fetch"),Bt("onSetup",function(){return Z}),Et("presets","normal",["normal","color","listpreview"]),St("columns",1),dt("onAction"),dt("onItemAction")]),wT=[Tt("active",!1)].concat(hT),ST=re(wT.concat([ft("type"),dt("onAction")])),CT=[Bt("predicate",function(){return!1}),Et("scope","node",["node","editor"]),Et("position","selection",["node","selection","line"])],kT=hT.concat([St("type","contextformbutton"),St("primary",!1),dt("onAction"),At("original",l)]),OT=wT.concat([St("type","contextformbutton"),St("primary",!1),dt("onAction"),At("original",l)]),ET=hT.concat([St("type","contextformbutton")]),TT=wT.concat([St("type","contextformtogglebutton")]),BT=it("type",{contextformbutton:kT,contextformtogglebutton:OT}),DT=re([St("type","contextform"),Bt("initValue",function(){return""}),yt("label"),pt("commands",BT),vt("launch",it("type",{contextformbutton:ET,contextformtogglebutton:TT}))].concat(CT)),AT=re([St("type","contexttoolbar"),ft("items")].concat(CT)),_T=/* */Object.freeze({getState:function(n,t,e){return e}}),MT=/* */Object.freeze({events:function(i,u){function o(o,r){i.updateState.each(function(n){var t=n(o,r);u.set(t)}),i.renderComponents.each(function(n){var t=n(r,u.get()),e=S(t,o.getSystem().build);ps(o,e)})}return co([lo(li(),function(n,t){var e=i.channel;vn(t.channels(),e)&&o(n,t.data())}),Ii(function(t,n){i.initialData.each(function(n){o(t,n)})})])}}),FT=/* */Object.freeze({init:function(n){var t=ye(on.none());return{readState:function(){return t.get().fold(function(){return"none"},function(n){return n})},get:function(){return t.get()},set:function(n){return t.set(n)},clear:function(){return t.set(on.none())}}}}),IT=[ct("channel"),ht("renderComponents"),ht("updateState"),ht("initialData")],RT=ya({fields:IT,name:"reflecting",active:MT,apis:_T,state:FT}),VT=nn([ct("toggleClass"),ct("fetch"),Ju("onExecute"),St("getHotspot",on.some),St("getAnchorOverrides",nn({})),St("layouts",on.none()),Ju("onItemExecute"),ht("lazySink"),ct("dom"),qu("onOpen"),Fs("splitDropdownBehaviours",[Jy,lg,vg]),St("matchWidth",!1),St("useMinWidth",!1),St("eventOrder",{}),ht("role")].concat(ax())),NT=xl({factory:Gg,schema:[ct("dom")],name:"arrow",defaults:function(n){return{buttonBehaviours:ba([vg.revoke()])}},overrides:function(t){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(n){n.getSystem().getByUid(t.uid).each(io)},buttonBehaviours:ba([Cg.config({toggleOnExecute:!1,toggleClass:t.toggleClass})])}}}),HT=xl({factory:Gg,schema:[ct("dom")],name:"button",defaults:function(n){return{buttonBehaviours:ba([vg.revoke()])}},overrides:function(e){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(t){t.getSystem().getByUid(e.uid).each(function(n){e.onExecute(n,t)})}}}}),PT=nn([NT,HT,Sl({factory:{sketch:function(n){return{uid:n.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:n.text}}}},schema:[ct("text")],name:"aria-descriptor"}),wl({schema:[Gu()],name:"menu",defaults:function(o){return{onExecute:function(t,e){t.getSystem().getByUid(o.uid).each(function(n){o.onItemExecute(n,t,e)})}}}}),Qy()]),zT=Al({name:"SplitDropdown",configFields:VT(),partFields:PT(),factory:function(o,n,t,e){function r(n){Zl.getCurrent(n).each(function(n){ad.highlightFirst(n),lg.focusIn(n)})}function i(n){ex(o,function(n){return n},n,e,r,Ay.HighlightFirst).get(Z)}function u(n){var t=Ks(n,o,"button");return io(t),on.some(!0)}var a=An(co([Ii(function(e,n){qs(e,o,"aria-descriptor").each(function(n){var t=Xo("aria");Po(n.element(),"id",t),Po(e.element(),"aria-describedby",t)})})]),rm(on.some(i))),c={repositionMenus:function(n){Cg.isOn(n)&&ux(n)}};return{uid:o.uid,dom:o.dom,components:n,apis:c,eventOrder:N(N({},o.eventOrder),{"alloy.execute":["disabling","toggling","alloy.base.behaviour"]}),events:a,behaviours:Rs(o.splitDropdownBehaviours,[Jy.config({others:{sandbox:function(n){var t=Ks(n,o,"arrow");return ix(o,n,{onOpen:function(){Cg.on(t),Cg.on(n)},onClose:function(){Cg.off(t),Cg.off(n)}})}}}),lg.config({mode:"special",onSpace:u,onEnter:u,onDown:function(n){return i(n),on.some(!0)}}),vg.config({}),Cg.config({toggleOnExecute:!1,aria:{mode:"expanded"}})]),domModification:{attributes:{role:o.role.getOr("button"),"aria-haspopup":!0}}}},apis:{repositionMenus:function(n,t){return n.repositionMenus(t)}}}),LT=Xo("focus-button"),jT=["checklist","ordered-list"],UT=["indent","outdent","table-insert-column-after","table-insert-column-before","unordered-list"],WT=function(n,t,e){return oE(n,{toolbarButtonBehaviours:[].concat(0<e.length?[Kd("toolbarButtonWith",e)]:[]),getApi:ZO,onSetup:n.onSetup},t)},GT=function(n,t,e){return Dn(oE(n,{toolbarButtonBehaviours:[mg.config({}),Cg.config({toggleClass:"tox-tbtn--enabled",aria:{mode:"pressed"},toggleOnExecute:!1})].concat(0<e.length?[Kd("toolbarToggleButtonWith",e)]:[]),getApi:nE,onSetup:n.onSetup},t))},XT=function(n,t,e){var o=t.label.fold(function(){return{}},function(n){return{"aria-label":n}}),r=vm(yy.sketch({inputClasses:["tox-toolbar-textfield","tox-toolbar-nav-js"],data:t.initValue(),inputAttributes:o,selectOnFocus:!0,inputBehaviours:ba([lg.config({mode:"special",onEnter:function(n){return i.findPrimary(n).map(function(n){return io(n),!0})},onLeft:function(n,t){return t.cut(),on.none()},onRight:function(n,t){return t.cut(),on.none()}})])})),i=function(t,n,e){var o=S(n,function(n){return vm(uE(t,n,e))});return{asSpecs:function(){return S(o,function(n){return n.asSpec()})},findPrimary:function(e){return Du(n,function(n,t){return n.primary?on.from(o[t]).bind(function(n){return n.getOpt(e)}).filter(b(Ch.isDisabled)):on.none()})}}}(r,t.commands,e.shared.providers);return KO({type:n,uid:Xo("context-toolbar"),initGroups:[{title:on.none(),items:[r.asSpec()]},{title:on.none(),items:i.asSpecs()}],onEscape:on.none,cyclicKeying:!0,backstage:e,getSink:function(){return an.error("")}})},YT=function(t,e){function n(n){return n.dom()===e.getBody()}var o=we.fromDom(e.selection.getNode());return sE(o,t.inNodeScope).orThunk(function(){return sE(o,t.inEditorScope).orThunk(function(){return function(n,t,e){for(var o=n.dom(),r=dn(e)?e:nn(!1);o.parentNode;){o=o.parentNode;var i=we.fromDom(o),u=t(i);if(u.isSome())return u;if(r(i))break}return on.none()}(o,function(n){return sE(n,t.inNodeScope)},n)})})},qT=function(e,r){function o(t,e){var o=et(function(n){return tt("ContextForm",DT,n)}(e));(n[t]=o).launch.map(function(n){c["form:"+t]=N(N({},e.launch),{type:"contextformtogglebutton"===n.type?"togglebutton":"button",onAction:function(){r(o)}})}),"editor"===o.scope?a.push(o):u.push(o),s[t]=o}function i(t,e){(function(n){return tt("ContextToolbar",AT,n)})(e).each(function(n){"editor"===e.scope?a.push(n):u.push(n),s[t]=n})}var n={},u=[],a=[],c={},s={},t=wn(e);return bn(t,function(n){var t=e[n];"contextform"===t.type?o(n,t):"contexttoolbar"===t.type&&i(n,t)}),{forms:n,inNodeScope:u,inEditorScope:a,lookupTable:s,formNavigators:c}},KT=Xo("forward-slide"),JT=Xo("backward-slide"),$T=Xo("change-slide-event"),QT="tox-pop--resizing";(vE=hE=hE||{})[vE.SemiColon=0]="SemiColon",vE[vE.Space=1]="Space";function ZT(n,t,e,o){return{type:"basic",data:function(n){return S(n,function(n){var t=n,e=n,o=n.split("=");return 1<o.length&&(t=o[0],e=o[1]),{title:t,format:e}})}(function(n,t){return t===hE.SemiColon?n.replace(/;$/,"").split(";"):n.split(" ")}(Nn(n.settings,t).getOr(e),o))}}function nB(e){function t(n){var t=E(RD,function(n){return e.formatter.match(n.format)}).fold(function(){return"left"},function(n){return n.title.toLowerCase()});ro(n,ik,{icon:"align-"+t})}var n=on.some(function(n){return function(){return t(n)}}),o=on.some(function(n){return t(n)}),r=function(n){return{type:"basic",data:n}}(RD);return{tooltip:"Align",icon:on.some("align-left"),isSelectedFor:function(n){return function(){return e.formatter.match(n)}},getCurrentValue:nn(on.none()),getPreviewFor:function(n){return function(){return on.none()}},onAction:lE(e),setInitialValue:o,nodeChangeHandler:n,dataset:r,shouldHide:!1,isInvalid:function(n){return!e.formatter.canApply(n.format)}}}function tB(n){var t=n.split(/\s*,\s*/);return S(t,function(n){return n.replace(/^['"]+|['"]+$/g,"")})}function eB(r){function i(){function e(n){return n?tB(n)[0]:""}var n=r.queryCommandValue("FontName"),t=u.data,o=n?n.toLowerCase():"";return{matchOpt:E(t,function(n){var t=n.format;return t.toLowerCase()===o||e(t).toLowerCase()===e(o).toLowerCase()}).orThunk(function(){return function(n){var t;return 0===n.indexOf("-apple-system")&&(t=tB(n.toLowerCase()),D(VD,function(n){return-1<t.indexOf(n.toLowerCase())}))}(o)?on.from({title:"System Font",format:o}):on.none()}),font:n}}function t(n){var t=i(),e=t.matchOpt,o=t.font,r=e.fold(function(){return o},function(n){return n.title});ro(n,rk,{text:r})}var n=on.some(function(n){return function(){return t(n)}}),e=on.some(function(n){return t(n)}),u=ZT(r,"font_formats","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",hE.SemiColon);return{tooltip:"Fonts",icon:on.none(),isSelectedFor:function(t){return function(n){return n.exists(function(n){return n.format===t})}},getCurrentValue:function(){return i().matchOpt},getPreviewFor:function(n){return function(){return on.some({tag:"div",styleAttr:-1===n.indexOf("dings")?"font-family:"+n:""})}},onAction:function(n){return function(){r.undoManager.transact(function(){r.focus(),r.execCommand("FontName",!1,n.format)})}},setInitialValue:e,nodeChangeHandler:n,dataset:u,shouldHide:!1,isInvalid:function(){return!1}}}function oB(n,t){return/[0-9.]+px$/.test(n)?function(n,t){var e=Math.pow(10,t);return Math.round(n*e)/e}(72*parseInt(n,10)/96,t||0)+"pt":n}function rB(e){function i(){var o=on.none(),r=u.data,i=e.queryCommandValue("FontSize");if(i)for(var n=function(n){var t=oB(i,n),e=function(n){return V(ND,n).getOr("")}(t);o=E(r,function(n){return n.format===i||n.format===t||n.format===e})},t=3;o.isNone()&&0<=t;t--)n(t);return{matchOpt:o,px:i}}function t(n){var t=i(),e=t.matchOpt,o=t.px,r=e.fold(function(){return o},function(n){return n.title});ro(n,rk,{text:r})}var n=nn(nn(on.none())),o=on.some(function(n){return function(){return t(n)}}),r=on.some(function(n){return t(n)}),u=ZT(e,"fontsize_formats","8pt 10pt 12pt 14pt 18pt 24pt 36pt",hE.Space);return{tooltip:"Font sizes",icon:on.none(),isSelectedFor:function(t){return function(n){return n.exists(function(n){return n.format===t})}},getPreviewFor:n,getCurrentValue:function(){return i().matchOpt},onAction:function(n){return function(){e.undoManager.transact(function(){e.focus(),e.execCommand("FontSize",!1,n.format)})}},setInitialValue:r,nodeChangeHandler:o,dataset:u,shouldHide:!1,isInvalid:function(){return!1}}}function iB(e,n,t){var o=n();return Du(t,function(t){return E(o,function(n){return e.formatter.matchNode(t,n.format)})}).orThunk(function(){return e.formatter.match("p")?on.some({title:"Paragraph",format:"p"}):on.none()})}function uB(n){var t=n.selection.getStart(!0)||n.getBody();return n.dom.getParents(t,function(){return!0},n.getBody())}function aB(o){function e(n,t){var e=function(n){return iB(o,function(){return r.data},n)}(n).fold(function(){return"Paragraph"},function(n){return n.title});ro(t,rk,{text:e})}var n=on.some(function(t){return function(n){return e(n.parents,t)}}),t=on.some(function(n){var t=uB(o);e(t,n)}),r=ZT(o,"block_formats","Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre",hE.SemiColon);return{tooltip:"Blocks",icon:on.none(),isSelectedFor:function(n){return function(){return o.formatter.match(n)}},getCurrentValue:nn(on.none()),getPreviewFor:function(t){return function(){var n=o.formatter.get(t);return on.some({tag:0<n.length&&(n[0].inline||n[0].block)||"div",styleAttr:o.formatter.getCssText(t)})}},onAction:lE(o),setInitialValue:t,nodeChangeHandler:n,dataset:r,shouldHide:!1,isInvalid:function(n){return!o.formatter.canApply(n.format)}}}function cB(i,n){function e(n,t){var e=function(n){var t=n.items;return t!==undefined&&0<t.length?B(t,e):[{title:n.title,format:n.format}]},o=B(Xk(i),e),r=iB(i,function(){return o},n).fold(function(){return"Paragraph"},function(n){return n.title});ro(t,rk,{text:r})}var t=on.some(function(t){return function(n){return e(n.parents,t)}}),o=on.some(function(n){var t=uB(i);e(t,n)});return{tooltip:"Formats",icon:on.none(),isSelectedFor:function(n){return function(){return i.formatter.match(n)}},getCurrentValue:nn(on.none()),getPreviewFor:function(t){return function(){var n=i.formatter.get(t);return n!==undefined?on.some({tag:0<n.length&&(n[0].inline||n[0].block)||"div",styleAttr:i.formatter.getCssText(t)}):on.none()}},onAction:lE(i),setInitialValue:o,nodeChangeHandler:t,shouldHide:i.getParam("style_formats_autohide",!1,"boolean"),isInvalid:function(n){return!i.formatter.canApply(n.format)},dataset:n}}function sB(o,r){return function(n,t){var e=o(n).mapError(function(n){return le(n)}).getOrDie();return r(e,t)}}function fB(n){var t=n.toolbar,e=n.buttons;return!1===t?[]:t===undefined||!0===t?function(e){var n=S(HD,function(n){var t=C(n.items,function(n){return En(e,n)||En(zD,n)});return{name:n.name,items:t}});return C(n,function(n){return 0<n.items.length})}(e):cn(t)?function(n){var t=n.split("|");return S(t,function(n){return{items:n.trim().split(" ")}})}(t):function(n){return h(n,function(n){return En(n,"name")&&En(n,"items")})}(t)?t:(v.console.error("Toolbar type should be string, string[], boolean or ToolbarGroup[]"),[])}function lB(t,e,o,r,n){return V(e,o.toLowerCase()).orThunk(function(){return n.bind(function(n){return Du(n,function(n){return V(e,n+o.toLowerCase())})})}).fold(function(){return V(zD,o.toLowerCase()).map(function(n){return n(t,r)}).orThunk(function(){return on.none()})},function(n){return function(t,e){return V(PD,t.type).fold(function(){return v.console.error("skipping button defined by",t),on.none()},function(n){return on.some(n(t,e))})}(n,r)})}function dB(e,o,r,i){var n=fB(o),t=S(n,function(n){var t=B(n.items,function(n){return 0===n.trim().length?[]:lB(e,o.buttons,n,r,i).toArray()});return{title:on.from(e.translate(n.name)),items:t}});return C(t,function(n){return 0<n.items.length})}function mB(e){return(Sr(e,"position").is("fixed")?on.none():To(e)).orThunk(function(){var n=we.fromTag("span");Ao(e,n);var t=To(n);return Pi(n),t}).map(du).getOrThunk(function(){return Iu(0,0)})}function gB(t){return function(n){return n.translate(-t.left(),-t.top())}}function pB(t){return function(n){return n.translate(t.left(),t.top())}}function hB(e){return function(n,t){return O(e,function(n,t){return t(n)},Iu(n,t))}}function vB(n,t,e){return n.fold(hB([pB(e),gB(t)]),hB([gB(t)]),hB([]))}function bB(n,t,e){return n.fold(hB([pB(e)]),hB([]),hB([pB(t)]))}function yB(n,t,e){return n.fold(hB([]),hB([gB(e)]),hB([pB(t),gB(e)]))}function xB(n,t,e){return n.fold(function(n,t){return{position:"absolute",left:n+"px",top:t+"px"}},function(n,t){return{position:"absolute",left:n-e.left()+"px",top:t-e.top()+"px"}},function(n,t){return{position:"fixed",left:n+"px",top:t+"px"}})}function wB(n,i,u,a){function t(o,r){return function(n,t){var e=o(i,u,a);return r(n.getOr(e.left()),t.getOr(e.top()))}}return n.fold(t(yB,ZD.offset),t(bB,ZD.absolute),t(vB,ZD.fixed))}function SB(n,t){var e=n.element();fr(e,t.transitionClass),dr(e,t.fadeOutClass),fr(e,t.fadeInClass),t.onShow(n)}function CB(n,t){var e=n.element();fr(e,t.transitionClass),dr(e,t.fadeInClass),fr(e,t.fadeOutClass),t.onHide(n)}function kB(n,t,e){return D(n,function(n){switch(n){case"bottom":return function(n,t){return n.bottom()<=t.bottom()}(t,e);case"top":return function(n,t){return n.y()>=t.y()}(t,e)}})}function OB(n,t){return Lo(n,t)?on.some(parseInt(zo(n,t),10)):on.none()}function EB(r,n){return OB(r,n.leftAttr).bind(function(o){return OB(r,n.topAttr).map(function(n){var t=mu(r),e=su(r);return yu(o,n,t,e)})})}function TB(n,t,e){var o=zo(n,t.positionAttr);switch(function(n,t){jo(n,t.leftAttr),jo(n,t.topAttr),jo(n,t.positionAttr)}(n,t),o){case"static":return on.some(oA["static"]());case"absolute":return on.some(oA.absolute(e.x(),e.y()));default:return on.none()}}function BB(n,t,e,o,r){var i=xu(n);if(kB(t.modes,i,e))return on.none();var u=r(),a=wr(n,"position");!function(n,t,e,o,r){Po(n,t.leftAttr,e),Po(n,t.topAttr,o),Po(n,t.positionAttr,r)}(n,t,i.x(),i.y(),a);var c=tA(i.x(),i.y()),s=vB(c,o,u),f=tA(e.x(),e.y()),l=vB(f,o,u),d=i.y()<=e.y()?l.top():l.top()+e.height()-i.height();return on.some(oA.fixed(s.left(),d))}function DB(n,t,e,o,r){var i=n.element();return Sr(i,"position").is("fixed")?function(t,e,o){return EB(t,e).filter(function(n){return kB(e.modes,n,o)}).bind(function(n){return TB(t,e,n)})}(i,t,e):BB(i,t,e,o,r)}function AB(t,n){bn(["left","top","position"],function(n){return kr(t.element(),n)}),n.onUndocked(t)}function _B(n,t,e,o,r){var i=xB(r,0,o);xr(n.element(),i),("fixed"===i.position?t.onDocked:t.onUndocked)(n)}function MB(o,n,r,i,u){void 0===u&&(u=!1),n.contextual.each(function(e){e.lazyContext(o).each(function(n){var t=function(n,t){return n.y()<t.bottom()&&n.bottom()>t.y()}(n,i);t!==r.isVisible()&&(r.setVisible(t),u&&!t?(gr(o.element(),[e.fadeOutClass]),e.onHide(o)):(t?SB:CB)(o,e))})})}function FB(r,i,n){var u=r.element();n.setDocked(!1),function(n,t){var e=n.element();return EB(e,t).bind(function(n){return TB(e,t,n)})}(r,i).each(function(n){n.fold(function(){return AB(r,i)},function(n,t){var e=Co(u),o=(pu(e),mB(u));_B(r,i,0,o,tA(n,t))},Z)}),n.setVisible(!0),i.contextual.each(function(n){pr(u,[n.fadeInClass,n.fadeOutClass,n.transitionClass]),n.onShow(r)}),rA(r,i,n)}function IB(n,t,e){e.isDocked()&&FB(n,t,e)}function RB(o){var r=o.element();Eo(r).each(function(n){if(cA.isDocked(o)){var t=mu(n);yr(r,"width",t+"px");var e=fu(r);yr(n,"padding-top",e+"px")}else kr(r,"width"),kr(n,"padding-top")})}function VB(n,t){t?(dr(n,sA.fadeOutClass),gr(n,[sA.transitionClass,sA.fadeInClass])):(dr(n,sA.fadeInClass),gr(n,[sA.fadeOutClass,sA.transitionClass]))}function NB(n,t){var e=we.fromDom(n.getContainer());t?(fr(e,fA),dr(e,lA)):(fr(e,lA),dr(e,fA))}function HB(i,e){function o(t){e().each(function(n){return t(n.element())})}function n(n){i.inline||RB(n),NB(i,cA.isDocked(n)),n.getSystem().broadcastOn([jf()],{}),e().each(function(n){return n.getSystem().broadcastOn([jf()],{})})}var r=ye(on.none()),t=i.inline?[]:function(){var n;return[lc.config({channels:(n={},n[mT()]={onReceive:RB},n)})]}();return g([vg.config({}),cA.config({leftAttr:"data-dock-left",topAttr:"data-dock-top",positionAttr:"data-dock-pos",contextual:N({lazyContext:function(n){var t=fu(n.element()),e=i.inline?i.getContentAreaContainer():i.getContainer(),o=xu(we.fromDom(e)),r=o.height()-t;return on.some(yu(o.x(),o.y(),o.width(),r))},onShow:function(){o(function(n){return VB(n,!0)})},onShown:function(t){o(function(n){return pr(n,[sA.transitionClass,sA.fadeInClass])}),r.get().each(function(n){!function(t,e){var o=Co(e);Sa(o).filter(function(n){return!jt(e,n)}).filter(function(n){return jt(n,we.fromDom(o.dom().body))||Ye(t,n)}).each(function(){return wa(e)})}(t.element(),n),r.set(on.none())})},onHide:function(n){r.set(function(n,t){return Ca(n).orThunk(function(){return t().toOption().bind(function(n){return Ca(n.element())})})}(n.element(),e)),o(function(n){return VB(n,!1)})},onHidden:function(){o(function(n){return pr(n,[sA.transitionClass])})}},sA),modes:["top"],onDocked:n,onUndocked:n})],t)}function PB(n){return"<alloy.field."+n+">"}function zB(n){return{element:function(){return n.element().dom()}}}function LB(e,o){var r=S(wn(o),function(n){var t=o[n],e=et(function(n){return tt("sidebar",CA,n)}(t));return{name:n,getApi:zB,onSetup:e.onSetup,onShow:e.onShow,onHide:e.onHide}});return S(r,function(n){var t=ye(Z);return e.slot(n.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:Jp([Ep(n,t),Tp(n,t),lo(Bi(),function(t,n){var e=n.event();E(r,function(n){return n.name===e.name()}).each(function(n){(e.visible()?n.onShow:n.onHide)(n.getApi(t))})})])})})}function jB(n,t){Zl.getCurrent(n).each(function(n){return mg.set(n,[function(t){return SA.sketch(function(n){return{dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:LB(n,t),slotBehaviours:Jp([Ii(function(n){return SA.hideAllSlots(n)})])}})}(t)])})}function UB(n){return Zl.getCurrent(n).bind(function(n){return cT.isGrowing(n)||cT.hasGrown(n)?Zl.getCurrent(n).bind(function(t){return E(SA.getSlotNames(t),function(n){return SA.isShowing(t,n)})}):on.none()})}function WB(n,t,e){var o=n.element();!0===t?(mg.set(n,[function(n){return{dom:{tag:"div",attributes:{"aria-label":n.translate("Loading...")},classes:["tox-throbber__busy-spinner"]},components:[{dom:cp('<div class="tox-spinner"><div></div><div></div><div></div></div>')}],behaviours:ba([lg.config({mode:"special",onTab:function(){return on.some(!0)},onShiftTab:function(){return on.some(!0)}}),vg.config({})])}}(e)]),kr(o,"display"),jo(o,"aria-hidden")):(mg.set(n,[]),yr(o,"display","none"),Po(o,"aria-hidden","true"))}function GB(n){return"string"==typeof n?n.split(" "):n}function XB(e,o){var r=An(IA,o.menus),t=0<wn(o.menus).length,n=o.menubar===undefined||!0===o.menubar?GB("file edit view insert format tools table help"):GB(!1===o.menubar?"":o.menubar),i=C(n,function(n){return t&&o.menus.hasOwnProperty(n)&&o.menus[n].hasOwnProperty("items")||IA.hasOwnProperty(n)}),u=S(i,function(n){var t=r[n];return function(n,e,t){var o=function(n){return n.getParam("removed_menuitems","")}(t).split(/[ ,]/);return{text:n.title,getItems:function(){return B(n.items,function(n){var t=n.toLowerCase();return 0===t.trim().length?[]:x(o,function(n){return n===t})?[]:"separator"===t||"|"===t?[{type:"separator"}]:e.menuItems[t]?[e.menuItems[t]]:[]})}}}({title:t.title,items:GB(t.items)},o,e)});return C(u,function(n){return 0<n.getItems().length&&x(n.getItems(),function(n){return"separator"!==n.type})})}function YB(n,t){var e,o=function(n){var t=n.settings,e=t.skin,o=t.skin_url;if(!1!==e){var r=e||"oxide";o=o?n.documentBaseURI.toAbsolute(o):Gb.baseURL+"/skins/ui/"+r}return o}(t);o&&(e=o+"/skin.min.css",t.contentCSS.push(o+(n?"/content.inline":"/content")+".min.css")),!1===function(n){return!1===n.getParam("skin")}(t)&&e?Rh.DOM.styleSheetLoader.load(e,RA(t)):RA(t)()}function qB(t,n,e,o){var r=n.outerContainer,i=e.toolbar,u=e.buttons;if(h(i,cn)){var a=i.map(function(n){return dB(t,{toolbar:n,buttons:u},{backstage:o},on.none())});FA.setToolbars(r,a)}else FA.setToolbar(r,dB(t,e,{backstage:o},on.none()))}function KB(n){return function(n){var t=Fb(n),e=Vb(n),o=Hb(n);return UA(t).map(function(n){return jA(n,e,o)})}(n).getOr(Fb(n))}function JB(n){var t=Ib(n),e=Rb(n),o=Nb(n);return UA(t).map(function(n){return jA(n,e,o)})}function $B(n,t){return function(){n.execCommand("mceToggleFormat",!1,t)}}function QB(n){!function(e){yk.each([{name:"bold",text:"Bold",icon:"bold"},{name:"italic",text:"Italic",icon:"italic"},{name:"underline",text:"Underline",icon:"underline"},{name:"strikethrough",text:"Strikethrough",icon:"strike-through"},{name:"subscript",text:"Subscript",icon:"subscript"},{name:"superscript",text:"Superscript",icon:"superscript"}],function(n,t){e.ui.registry.addToggleButton(n.name,{tooltip:n.text,icon:n.icon,onSetup:fE(e,n.name),onAction:$B(e,n.name)})});for(var n=1;n<=6;n++){var t="h"+n;e.ui.registry.addToggleButton(t,{text:t.toUpperCase(),tooltip:"Heading "+n,onSetup:fE(e,t),onAction:$B(e,t)})}}(n),function(t){yk.each([{name:"cut",text:"Cut",action:"Cut",icon:"cut"},{name:"copy",text:"Copy",action:"Copy",icon:"copy"},{name:"paste",text:"Paste",action:"Paste",icon:"paste"},{name:"help",text:"Help",action:"mceHelp",icon:"help"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all"},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting"},{name:"remove",text:"Remove",action:"Delete",icon:"remove"}],function(n){t.ui.registry.addButton(n.name,{tooltip:n.text,icon:n.icon,onAction:function(){return t.execCommand(n.action)}})})}(n),function(t){yk.each([{name:"blockquote",text:"Blockquote",action:"mceBlockQuote",icon:"quote"}],function(n){t.ui.registry.addToggleButton(n.name,{tooltip:n.text,icon:n.icon,onAction:function(){return t.execCommand(n.action)},onSetup:fE(t,n.name)})})}(n)}function ZB(n,t,e){function o(){return!!t.undoManager&&t.undoManager[e]()}function r(){n.setDisabled(t.readonly||!o())}return n.setDisabled(!o()),t.on("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",r),function(){return t.off("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",r)}}function nD(n,t){return{anchor:"makeshift",x:n,y:t}}function tD(n){return"longpress"===n.type||0===n.type.indexOf("touch")}function eD(n,t){var e=Rh.DOM.getPos(n);return function(n,t,e){return nD(n.x+t,n.y+e)}(t,e.x,e.y)}function oD(n,t){return"contextmenu"===t.type?n.inline?function(n){if(tD(n)){var t=n.touches[0];return nD(t.pageX,t.pageY)}return nD(n.pageX,n.pageY)}(t):eD(n.getContentAreaContainer(),function(n){if(tD(n)){var t=n.touches[0];return nD(t.clientX,t.clientY)}return nD(n.clientX,n.clientY)}(t)):ZA(n)}function rD(n){return{anchor:"node",node:on.some(we.fromDom(n.selection.getNode())),root:we.fromDom(n.getBody())}}function iD(n,t,e,o,r,i){var u=e(),a=function(n,t,e){return e?rD(n):oD(n,t)}(n,t,i);NC(u,Fh.CLOSE_ON_EXECUTE,o,!1).map(function(n){t.preventDefault(),jg.showMenuAt(r,a,{menu:{markers:wv("normal")},data:n})})}function uD(t,e,n,o,r,i){var u=function(n,t){var e=t?rD(n):ZA(n);return N({bubble:Oa(0,12,t_),layouts:n_,overrides:{maxWidthFunction:RE(),maxHeightFunction:Cf()}},e)}(t,i);NC(n,Fh.CLOSE_ON_EXECUTE,o,!0).map(function(n){e.preventDefault(),jg.showMenuWithinBounds(r,u,{menu:{markers:wv("normal")},data:n,type:"horizontal"},function(){return on.some(cE(t))}),t.fire(YE)})}function aD(t,e,o,r,i,u){function n(){var n=o();uD(t,e,n,r,i,u)}var a=Ht(),c=a.os.isiOS(),s=a.os.isOSX(),f=a.os.isAndroid();if(!s&&!c||u)f&&!u&&t.selection.setCursorLocation(e.target,0),n();else{var l=function(){!function(n){function t(){qg.setEditorTimeout(n,function(){n.selection.setRng(e)},10),i()}var e=n.selection.getRng();n.once("touchend",t);function o(n){n.preventDefault(),n.stopImmediatePropagation()}n.on("mousedown",o,!0);function r(){return i()}n.once("longpresscancel",r);var i=function(){n.off("touchend",t),n.off("longpresscancel",r),n.off("mousedown",o)}}(t),n()};!function(n,t){var e=n.selection;if(e.isCollapsed()||t.touches.length<1)return!1;var o=t.touches[0],r=e.getRng();return Uc(n.getWin(),Tc.domRange(r)).exists(function(n){return n.left()<=o.clientX&&n.right()>=o.clientX&&n.top()<=o.clientY&&n.bottom()>=o.clientY})}(t,e)?(t.once("selectionchange",l),t.once("touchend",function(){return t.off("selectionchange",l)})):l()}}function cD(n){return"string"==typeof n?n.split(/[ ,]/):n}function sD(n){return cn(n)?"|"===n:"separator"===n.type}function fD(n,t){if(0===t.length)return n;var e=F(n).filter(function(n){return!sD(n)}).fold(function(){return[]},function(n){return[i_]});return n.concat(e).concat(t).concat([i_])}function lD(i,n,t){function e(n){return jg.hide(a)}function o(o){var n="longpress"===o.type;if(e_(i)&&o.preventDefault(),!function(n,t){return t.ctrlKey&&!e_(n)}(i,o)&&!r_(i)){var r=!n&&(2!==o.button||o.target===i.getBody());(u()?aD:iD)(i,o,function(){var n=r?i.selection.getStart(!0):o.target,t=i.ui.registry.getAll(),e=o_(i);return function(r,n,i){var t=O(n,function(n,t){if(En(r,t)){var e=r[t].update(i);if(cn(e))return fD(n,e.split(" "));if(0<e.length){var o=S(e,u_);return fD(n,o)}return n}return n.concat([t])},[]);return 0<t.length&&sD(t[t.length-1])&&t.pop(),t}(t.contextMenus,e,n)},t,a,r)}}var u=Ht().deviceType.isTouch,a=uu(jg.sketch({dom:{tag:"div"},lazySink:n,onEscape:function(){return i.focus()},onShow:function(){return t.setContextMenuState(!0)},onHide:function(){return t.setContextMenuState(!1)},fireDismissalEventInstead:{},inlineBehaviours:ba([Kd("dismissContextMenu",[lo(Oi(),function(n,t){zf.close(n),i.focus()})])])}));i.on("init",function(){var n="ResizeEditor ScrollContent ScrollWindow longpresscancel"+(u()?"":" ResizeWindow");i.on(n,e),i.on(u()?"longpress":"longpress contextmenu",o)})}function dD(n,t){n.getSystem().addToGui(t),function(n){Eo(n.element()).filter(Hr).each(function(t){Sr(t,"z-index").each(function(n){Po(t,a_,n)}),yr(t,"z-index",wr(n.element(),"z-index"))})}(t)}function mD(n){!function(n){Eo(n.element()).filter(Hr).each(function(n){var t=zo(n,a_);Lo(n,a_)?yr(n,"z-index",t):kr(n,"z-index"),jo(n,a_)})}(n),n.getSystem().removeFromGui(n)}function gD(n,t,e){return n.getSystem().build(Wb.sketch({dom:{styles:{left:"0px",top:"0px",width:"100%",height:"100%",position:"fixed","z-index":"1000000000000000"},classes:[t]},events:e}))}function pD(n,t,e,o){return function(n,t){var e=n.element(),o=parseInt(zo(e,t.leftAttr),10),r=parseInt(zo(e,t.topAttr),10);return isNaN(o)||isNaN(r)?on.none():on.some(Iu(o,r))}(n,t).fold(function(){return e},function(n){return eA(n.left()+o.left(),n.top()+o.top())})}function hD(n,t,e,o,r,i){var u=pD(n,t,e,o),a=t.mustSnap?f_(n,t,u,r,i):l_(n,t,u,r,i),c=vB(u,r,i);return function(n,t,e){var o=n.element();Po(o,t.leftAttr,e.left()+"px"),Po(o,t.topAttr,e.top()+"px")}(n,t,c),a.fold(function(){return{coord:eA(c.left(),c.top()),extra:on.none()}},function(n){return{coord:n.output(),extra:n.extra()}})}function vD(n,t){!function(n,t){var e=n.element();jo(e,t.leftAttr),jo(e,t.topAttr)}(n,t)}function bD(n,e,o,r){return Du(n,function(n){var t=n.sensor();return function(n,t,e,o,r,i){var u=bB(n,r,i),a=bB(t,r,i);return Math.abs(u.left()-a.left())<=e&&Math.abs(u.top()-a.top())<=o}(e,t,n.range().left(),n.range().top(),o,r)?on.some({output:nn(wB(n.output(),e,o,r)),extra:n.extra}):on.none()})}function yD(t){return function(n,t,e,o){return n.isSome()&&t.isSome()&&e.isSome()?on.some(o(n.getOrDie(),t.getOrDie(),e.getOrDie())):on.none()}(Sr(t,"left"),Sr(t,"top"),Sr(t,"position"),function(n,t,e){return("fixed"===e?eA:nA)(parseInt(n,10),parseInt(t,10))}).getOrThunk(function(){var n=du(t);return tA(n.left(),n.top())})}function xD(e,n,o,r,i,u,t){return function(n,t,e,o,r){var i=r.bounds,u=bB(t,e,o),a=us(u.left(),i.x(),i.x()+i.width()-r.width),c=us(u.top(),i.y(),i.y()+i.height()-r.height),s=tA(a,c);return t.fold(function(){var n=yB(s,e,o);return nA(n.left(),n.top())},function(){return s},function(){var n=vB(s,e,o);return eA(n.left(),n.top())})}(0,n.fold(function(){var n=function(n,e,o){return n.fold(function(n,t){return ZD.offset(n+e,t+o)},function(n,t){return ZD.absolute(n+e,t+o)},function(n,t){return ZD.fixed(n+e,t+o)})}(o,u.left(),u.top()),t=vB(n,r,i);return eA(t.left(),t.top())},function(t){var n=hD(e,t,o,u,r,i);return n.extra.each(function(n){t.onSensor(e,n)}),n.coord}),r,i,t)}function wD(n,t){return{bounds:n.getBounds(),height:fu(t.element()),width:gu(t.element())}}function SD(t,e,n,o,r){var i=n.update(o,r),u=n.getStartData().getOrThunk(function(){return wD(e,t)});i.each(function(n){!function(n,t,e,o){var r=t.getTarget(n.element());if(t.repositionTarget){var i=Co(n.element()),u=pu(i),a=mB(r),c=yD(r),s=xD(n,t.snaps,c,u,a,o,e),f=xB(s,0,a);xr(r,f)}t.onDrag(n,r,o)}(t,e,u,n)})}function CD(t,n,e,o){n.each(mD),e.snaps.each(function(n){vD(t,n)});var r=e.getTarget(t.element());o.reset(),e.onDrop(t,r)}function kD(n){return function(t,e){function o(n){e.setStartData(wD(t,n))}return co(g([lo(wi(),function(n){e.getStartData().each(function(){return o(n)})})],n(t,e,o)))}}function OD(u,a,c){return[lo(Yr(),function(t,n){if(0===n.event().raw().button){n.stop();var e=function(){return CD(t,on.some(i),u,a)},o=hb(e,200),r={drop:e,delayDrop:o.schedule,forceDrop:e,move:function(n){o.cancel(),SD(t,u,a,d_,n)}},i=gD(t,u.blockerClass,function(e){return co([lo(Yr(),e.forceDrop),lo(Jr(),e.drop),lo(qr(),function(n,t){e.move(t.event())}),lo(Kr(),e.delayDrop)])}(r));c(t),dD(t,i)}})]}function ED(i,u,a){var c=ye(on.none());return[lo(Ur(),function(t,n){n.stop();function e(){CD(t,c.get(),i,u),c.set(on.none())}var o={drop:e,delayDrop:function(){},forceDrop:e,move:function(n){SD(t,i,u,g_,n)}},r=gD(t,i.blockerClass,function(e){return co([lo(Ur(),e.forceDrop),lo(Gr(),e.drop),lo(Xr(),e.drop),lo(Wr(),function(n,t){e.move(t.event())})])}(o));c.set(on.some(r));a(t),dD(t,r)}),lo(Wr(),function(n,t){t.stop(),SD(n,i,u,g_,t.event())}),lo(Gr(),function(n,t){t.stop(),CD(n,c.get(),i,u),c.set(on.none())}),lo(Xr(),function(n){CD(n,c.get(),i,u),c.set(on.none())})]}function TD(n,r,i,u,t,e){return n.fold(function(){return w_.snap({sensor:tA(i-20,u-20),range:Iu(t,e),output:tA(on.some(i),on.some(u)),extra:{td:r}})},function(n){var t=i-20,e=u-20,o=n.element().dom().getBoundingClientRect();return w_.snap({sensor:tA(t,e),range:Iu(40,40),output:tA(on.some(i-o.width/2),on.some(u-o.height/2)),extra:{td:r}})})}function BD(n,o,r){return{getSnapPoints:n,leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:function(n,t){var e=t.td;!function(n,t){return n.exists(function(n){return jt(n,t)})}(o.get(),e)&&(o.set(on.some(e)),r(e))},mustSnap:!0}}function DD(n){return vm(Gg.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:ba([w_.config({mode:"mouseOrTouch",blockerClass:"blocker",snaps:n}),Ew.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"],touchstart:["dragging","alloy.base.behaviour"]}}))}var AD,_D,MD,FD,ID,RD=[{title:"Left",icon:"align-left",format:"alignleft"},{title:"Center",icon:"align-center",format:"aligncenter"},{title:"Right",icon:"align-right",format:"alignright"},{title:"Justify",icon:"align-justify",format:"alignjustify"}],VD=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"],ND={"8pt":"1","10pt":"2","12pt":"3","14pt":"4","18pt":"5","24pt":"6","36pt":"7"},HD=[{name:"history",items:["undo","redo"]},{name:"styles",items:["styleselect"]},{name:"formatting",items:["bold","italic"]},{name:"alignment",items:["alignleft","aligncenter","alignright","alignjustify"]},{name:"indentation",items:["outdent","indent"]},{name:"permanent pen",items:["permanentpen"]},{name:"comments",items:["addcomment"]}],PD={button:sB(JO,function(n,t){return function(n,t){return WT(n,t,[])}(n,t.backstage.shared.providers)}),togglebutton:sB(QO,function(n,t){return function(n,t){return GT(n,t,[])}(n,t.backstage.shared.providers)}),menubutton:sB($O,function(n,t){return PC(n,"tox-tbtn",t.backstage,on.none())}),splitbutton:sB(function(n){return tt("SplitButton",xT,n)},function(n,t){return rE(n,t.backstage.shared)}),styleSelectButton:function(n,t){return function(n,t){var e=N({type:"advanced"},t.styleselect);return mE(n,t,cB(n,e))}(n,t.backstage)},fontsizeSelectButton:function(n,t){return function(n,t){return mE(n,t,rB(n))}(n,t.backstage)},fontSelectButton:function(n,t){return function(n,t){return mE(n,t,eB(n))}(n,t.backstage)},formatButton:function(n,t){return function(n,t){return mE(n,t,aB(n))}(n,t.backstage)},alignMenuButton:function(n,t){return function(n,t){return mE(n,t,nB(n))}(n,t.backstage)}},zD={styleselect:PD.styleSelectButton,fontsizeselect:PD.fontsizeSelectButton,fontselect:PD.fontSelectButton,formatselect:PD.formatButton,align:PD.alignMenuButton},LD={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"]},jD={maxHeightFunction:Cf(),maxWidthFunction:RE()},UD={onLtr:function(){return[oc,rc,ca,ua,sa,aa,Ug,Wg,pm,mm,hm,gm]},onRtl:function(){return[oc,rc,sa,aa,ca,ua,Ug,Wg,hm,gm,pm,mm]}},WD={onLtr:function(){return[rc,ua,aa,ca,sa,oc,Ug,Wg,pm,mm,hm,gm]},onRtl:function(){return[rc,aa,ua,sa,ca,oc,Ug,Wg,hm,gm,pm,mm]}},GD=function(u,n,e,a){function c(){return cE(u)}function s(){if(l()&&a.backstage.isContextMenuOpen())return!0;var n=function(){var n=g.get().map(function(n){return n.getBoundingClientRect()}).getOrThunk(function(){return u.selection.getRng().getBoundingClientRect()}),t=u.inline?pu().top():wu(we.fromDom(u.getBody())).y();return{y:n.top+t,bottom:n.bottom+t}}(),t=c();return!function(n,t,e,o){return Math.max(n,e)<=Math.min(t,o)}(n.y,n.bottom,t.y(),t.bottom())}function t(){jg.hide(d)}function o(){m.get().each(function(n){var t=d.element();kr(t,"display"),s()?yr(t,"display","none"):Af.positionWithinBounds(e,n,d,on.some(c()))})}function f(n){return{dom:{tag:"div",classes:["tox-pop__dialog"]},components:[n],behaviours:ba([lg.config({mode:"acyclic"}),Kd("pop-dialog-wrap-events",[Ii(function(n){u.shortcuts.add("ctrl+F9","focus statusbar",function(){return lg.focusIn(n)})}),Ri(function(n){u.shortcuts.remove("ctrl+F9")})])])}}var l=Ht().deviceType.isTouch,d=uu(function(n){var e=ye([]);return jg.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow:function(n){e.set([]),jg.getContent(n).each(function(n){kr(n.element(),"visibility")}),dr(n.element(),QT),kr(n.element(),"width")},inlineBehaviours:ba([Kd("context-toolbar-events",[bo(ii(),function(n,t){jg.getContent(n).each(function(n){}),dr(n.element(),QT),kr(n.element(),"width")}),lo($T,function(t,e){kr(t.element(),"width");var n=mu(t.element());jg.setContent(t,e.event().contents()),fr(t.element(),QT);var o=mu(t.element());yr(t.element(),"width",n+"px"),jg.getContent(t).each(function(n){e.event().focus().bind(function(n){return wa(n),Ca(t.element())}).orThunk(function(){return lg.focusIn(n),Sa()})}),qg.setTimeout(function(){yr(t.element(),"width",o+"px")},0)}),lo(KT,function(n,t){jg.getContent(n).each(function(n){e.set(e.get().concat([{bar:n,focus:Sa()}]))}),ro(n,$T,{contents:t.event().forwardContents(),focus:on.none()})}),lo(JT,function(t,n){F(e.get()).each(function(n){e.set(e.get().slice(0,e.get().length-1)),ro(t,$T,{contents:au(n.bar),focus:n.focus})})})]),lg.config({mode:"special",onEscape:function(t){return F(e.get()).fold(function(){return n.onEscape()},function(n){return oo(t,JT),on.some(!0)})}})]),lazySink:function(){return an.value(n.sink)}})}({sink:e,onEscape:function(){return u.focus(),on.some(!0)}})),m=ye(on.none()),g=ye(on.none()),r=ye(null),p=L(function(){return qT(n,function(n){var t=h(n);ro(d,KT,{forwardContents:f(t)})})}),h=function(n){var t,e,o=u.ui.registry.getAll().buttons,r=Yb(u)===jb.scrolling?jb.scrolling:jb["default"],i=p();return"contexttoolbar"===n.type?(t=An(o,i.formNavigators),e=dB(u,{buttons:t,toolbar:n.items},a,on.some(["form:"])),KO({type:r,uid:Xo("context-toolbar"),initGroups:e,onEscape:on.none,cyclicKeying:!0,backstage:a.backstage,getSink:function(){return an.error("")}})):XT(r,n,a.backstage)};u.on("contexttoolbar-show",function(t){var n=p();Nn(n.lookupTable,t.toolbarKey).each(function(n){y(n,t.target===u?on.none():on.some(t)),jg.getContent(d).each(lg.focusIn)})});function v(n,t){var e="node"===n?a.backstage.shared.anchors.node(t):a.backstage.shared.anchors.cursor();return Dn(e,function(n,t){return"line"===n?{bubble:Oa(12,0,LD),layouts:{onLtr:function(){return[fa]},onRtl:function(){return[la]}},overrides:jD}:{bubble:Oa(0,12,LD),layouts:t?WD:UD,overrides:jD}}(n,l()))}function i(){var n=p();YT(n,u).fold(function(){m.set(on.none()),jg.hide(d)},function(n){y(n.toolbarApi,on.some(n.elem.dom()))})}function b(n){x(),r.set(n)}var y=function(n,t){if(x(),!l()||!a.backstage.isContextMenuOpen()){var e=h(n),o=t.map(we.fromDom),r=v(n.position,o);m.set(on.some(r)),g.set(t);var i=d.element();kr(i,"display"),jg.showWithinBounds(d,r,f(e),function(){return on.some(c())}),s()&&yr(i,"display","none")}},x=function(){var n=r.get();null!==n&&(qg.clearTimeout(n),r.set(null))};u.on("init",function(){u.on(YE,t),u.on("ScrollContent ScrollWindow longpress",o),u.on("click keyup SetContent ObjectResized ResizeEditor",function(n){b(qg.setEditorTimeout(u,i,0))}),u.on("focusout",function(n){qg.setEditorTimeout(u,function(){Ca(e.element()).isNone()&&Ca(d.element()).isNone()&&(m.set(on.none()),jg.hide(d))},0)}),u.on("SwitchMode",function(){u.readonly&&(m.set(on.none()),jg.hide(d))}),u.on("NodeChange",function(n){Ca(d.element()).fold(function(){b(qg.setEditorTimeout(u,i,0))},function(n){})})})},XD=function(n,o,r){function t(t,e){bn([o,r],function(n){n.broadcastEvent(t,e)})}function e(t,e){bn([o,r],function(n){n.broadcastOn([t],e)})}function i(n){return e(Lf(),{target:n.target()})}function u(n){return e(Lf(),{target:we.fromDom(n.target)})}function a(n){0===n.button&&e(Uf(),{target:we.fromDom(n.target)})}function c(n){return t(wi(),pb(n))}function s(n){e(jf(),{}),t(Si(),pb(n))}function f(){return e(jf(),{})}var l=sb(we.fromDom(v.document),"touchstart",i),d=sb(we.fromDom(v.document),"touchmove",function(n){return t(yi(),n)}),m=sb(we.fromDom(v.document),"touchend",function(n){return t(xi(),n)}),g=sb(we.fromDom(v.document),"mousedown",i),p=sb(we.fromDom(v.document),"mouseup",function(n){0===n.raw().button&&e(Uf(),{target:n.target()})});n.on("PostRender",function(){n.on("click",u),n.on("tap",u),n.on("mouseup",a),n.on("ScrollWindow",c),n.on("ResizeWindow",s),n.on("ResizeEditor",f)}),n.on("remove",function(){n.off("click",u),n.off("tap",u),n.off("mouseup",a),n.off("ScrollWindow",c),n.off("ResizeWindow",s),n.off("ResizeEditor",f),g.unbind(),l.unbind(),d.unbind(),m.unbind(),p.unbind()}),n.on("detach",function(){ws(o),ws(r),o.destroy(),r.destroy()})},YD=Tl,qD=Ol,KD=nn([St("shell",!1),ct("makeItem"),St("setupItem",Z),nl("listBehaviours",[mg])]),JD=Sl({name:"items",overrides:function(n){return{behaviours:ba([mg.config({})])}}}),$D=nn([JD]),QD=Al({name:nn("CustomList")(),configFields:KD(),partFields:$D(),factory:function(s,n,t,e){var o=s.shell?{behaviours:[mg.config({})],components:[]}:{behaviours:[],components:n},r=function(n){return s.shell?on.some(n):qs(n,s,"items")};return{uid:s.uid,dom:s.dom,components:o.components,behaviours:Rs(s.listBehaviours,o.behaviours),apis:{setItems:function(a,c){r(a).fold(function(){throw v.console.error("Custom List was defined to not be a shell, but no item container was specified in components"),new Error("Custom List was defined to not be a shell, but no item container was specified in components")},function(t){var n=mg.contents(t),e=c.length,o=e-n.length,r=0<o?function(n,t){for(var e=[],o=0;o<n;o++)e.push(t(o));return e}(o,function(){return s.makeItem()}):[],i=n.slice(e);bn(i,function(n){return mg.remove(t,n)}),bn(r,function(n){return mg.append(t,n)});var u=mg.contents(t);bn(u,function(n,t){s.setupItem(a,n,c[t],t)})})}}}},apis:{setItems:function(n,t,e){n.setItems(t,e)}}}),ZD=Tn([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),nA=ZD.offset,tA=ZD.absolute,eA=ZD.fixed,oA=Tn([{"static":[]},{absolute:["x","y"]},{fixed:["x","y"]}]),rA=function(n,t,e){n.getSystem().isConnected()&&function(e,o,r){var i=o.lazyViewport(e),n=e.element(),t=Co(n),u=pu(t),a=L(function(){return mB(n)}),c=r.isDocked();c&&MB(e,o,r,i),DB(e,o,i,u,a).each(function(n){r.setDocked(!c),n.fold(function(){return AB(e,o)},function(n,t){return _B(e,o,0,a(),tA(n,t))},function(n,t){MB(e,o,r,i,!0),_B(e,o,0,a(),eA(n,t))})})}(n,t,e)},iA=/* */Object.freeze({refresh:rA,reset:IB,isDocked:function(n,t,e){return e.isDocked()}}),uA=/* */Object.freeze({events:function(o,r){return co([bo(ii(),function(t,e){o.contextual.each(function(n){mr(t.element(),n.transitionClass)&&(pr(t.element(),[n.transitionClass,n.fadeInClass]),(r.isVisible()?n.onShown:n.onHidden)(t));e.stop()})}),lo(wi(),function(n,t){rA(n,o,r)}),lo(Si(),function(n,t){IB(n,o,r)})])}}),aA=[wt("contextual",[ft("fadeInClass"),ft("fadeOutClass"),ft("transitionClass"),dt("lazyContext"),qu("onShow"),qu("onShown"),qu("onHide"),qu("onHidden")]),Bt("lazyViewport",Su),ft("leftAttr"),ft("topAttr"),ft("positionAttr"),(AD="modes",_D=["top","bottom"],MD=ge,Ct(AD,_D,Kn(MD))),qu("onDocked"),qu("onUndocked")],cA=ya({fields:aA,name:"docking",active:uA,apis:iA,state:/* */Object.freeze({init:function(){var t=ye(!1),e=ye(!0);return nu({isDocked:function(){return t.get()},setDocked:function(n){return t.set(n)},isVisible:function(){return e.get()},setVisible:function(n){return e.set(n)},readState:function(){return"docked: "+t.get()+", visible: "+e.get()}})}})}),sA={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},fA="tox-tinymce--toolbar-sticky-on",lA="tox-tinymce--toolbar-sticky-off",dA=/* */Object.freeze({setup:function(n,t){n.inline||(n.on("ResizeWindow ResizeEditor ResizeContent",function(){t().each(RB)}),n.on("SkinLoaded",function(){t().each(cA.reset)}),n.on("FullscreenStateChanged",function(){t().each(cA.refresh)})),n.on("PostRender",function(){NB(n,!1)})},isDocked:function(n){return n().map(cA.isDocked).getOr(!1)},getBehaviours:HB}),mA=Z,gA=u,pA=nn([]),hA=/* */Object.freeze({setup:mA,isDocked:gA,getBehaviours:pA}),vA=Dl({factory:function(t,o){var n={focus:lg.focusIn,setMenus:function(n,t){var e=S(t,function(t){var n={type:"menubutton",text:t.text,fetch:function(n){n(t.getItems())}},e=$O(n).mapError(function(n){return le(n)}).getOrDie();return PC(e,"tox-mbtn",o.backstage,on.some("menuitem"))});mg.set(n,e)}};return{uid:t.uid,dom:t.dom,components:[],behaviours:ba([mg.config({}),Kd("menubar-events",[Ii(function(n){t.onSetup(n)}),lo($r(),function(e,n){ku(e.element(),".tox-mbtn--active").each(function(t){Ou(n.event().target(),".tox-mbtn").each(function(n){jt(t,n)||e.getSystem().getByDom(t).each(function(t){e.getSystem().getByDom(n).each(function(n){Ow.expand(n),Ow.close(t),vg.focus(n)})})})})}),lo(Ti(),function(e,n){n.event().prevFocus().bind(function(n){return e.getSystem().getByDom(n).toOption()}).each(function(t){n.event().newFocus().bind(function(n){return e.getSystem().getByDom(n).toOption()}).each(function(n){Ow.isOpen(t)&&(Ow.expand(n),Ow.close(t))})})})]),lg.config({mode:"flow",selector:".tox-mbtn",onEscape:function(n){return t.onEscape(n),on.some(!0)}}),Gy.config({})]),apis:n,domModification:{attributes:{role:"menubar"}}}},name:"silver.Menubar",configFields:[ct("dom"),ct("uid"),ct("onEscape"),ct("backstage"),St("onSetup",Z)],apis:{focus:function(n,t){n.focus(t)},setMenus:function(n,t,e){n.setMenus(t,e)}}}),bA="container",yA=[Fs("slotBehaviours",[])],xA=function(r,n,t){function e(n){return Qs(r)}function o(e,o){return void 0===o&&(o=undefined),function(n,t){return qs(n,r,t).map(function(n){return e(n,t)}).getOr(o)}}function i(n,t){return"true"!==zo(n.element(),"aria-hidden")}var u,a=o(i,!1),c=o(function(n,t){if(i(n)){var e=n.element();yr(e,"display","none"),Po(e,"aria-hidden","true"),ro(n,Bi(),{name:t,visible:!1})}}),s=(u=c,function(t,n){bn(n,function(n){return u(t,n)})}),f=o(function(n,t){if(!i(n)){var e=n.element();kr(e,"display"),jo(e,"aria-hidden"),ro(n,Bi(),{name:t,visible:!0})}}),l={getSlotNames:e,getSlot:function(n,t){return qs(n,r,t)},isShowing:a,hideSlot:c,hideAllSlots:function(n){return s(n,e())},showSlot:f};return{uid:r.uid,dom:r.dom,components:n,behaviours:Is(r.slotBehaviours),apis:l}},wA=P({getSlotNames:function(n,t){return n.getSlotNames(t)},getSlot:function(n,t,e){return n.getSlot(t,e)},isShowing:function(n,t,e){return n.isShowing(t,e)},hideSlot:function(n,t,e){return n.hideSlot(t,e)},hideAllSlots:function(n,t){return n.hideAllSlots(t)},showSlot:function(n,t,e){return n.showSlot(t,e)}},$o),SA=N(N({},wA),{sketch:function(n){var e,t=(e=[],{slot:function(n,t){return e.push(n),Us(bA,PB(n),t)},record:function(){return e}}),o=n(t),r=t.record(),i=S(r,function(n){return xl({name:n,pname:PB(n)})});return of(bA,yA,i,xA,o)}}),CA=re([yt("icon"),yt("tooltip"),Bt("onShow",Z),Bt("onHide",Z),Bt("onSetup",function(){return Z})]),kA=Xo("FixSizeEvent"),OA=Xo("AutoSizeEvent"),EA=qD.optional({factory:vA,name:"menubar",schema:[ct("backstage")]}),TA=qD.optional({factory:{sketch:function(n){return QD.sketch({uid:n.uid,dom:n.dom,listBehaviours:ba([lg.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:function(){return KO({type:n.split,uid:Xo("multiple-toolbar-item"),backstage:n.backstage,cyclicKeying:!1,getSink:n.getSink,initGroups:[],onEscape:function(){return on.none()}})},setupItem:function(n,t,e,o){JE.setGroups(t,e)},shell:!0})}},name:"multiple-toolbar",schema:[ct("dom"),ct("onEscape")]}),BA=qD.optional({factory:{sketch:function(n){return function(n){return n.split===jb.sliding?qO:n.split===jb.floating?YO:KO}(n)({type:n.split,uid:n.uid,onEscape:function(){return n.onEscape(),on.some(!0)},cyclicKeying:!1,initGroups:[],getSink:n.getSink,backstage:n.backstage,moreDrawerData:{lazyToolbar:n.lazyToolbar,lazyMoreButton:n.lazyMoreButton,lazyHeader:n.lazyHeader}})}},name:"toolbar",schema:[ct("dom"),ct("onEscape"),ct("getSink")]}),DA=qD.optional({factory:{sketch:function(n){var t=n.editor,e=n.sticky?HB:pA;return{uid:n.uid,dom:n.dom,components:n.components,behaviours:ba(e(t,n.getSink))}}},name:"header",schema:[ct("dom")]}),AA=qD.optional({name:"socket",schema:[ct("dom")]}),_A=qD.optional({factory:{sketch:function(n){return{uid:n.uid,dom:{tag:"div",classes:["tox-sidebar"],attributes:{role:"complementary"}},components:[{dom:{tag:"div",classes:["tox-sidebar__slider"]},components:[],behaviours:ba([Gy.config({}),vg.config({}),cT.config({dimension:{property:"width"},closedClass:"tox-sidebar--sliding-closed",openClass:"tox-sidebar--sliding-open",shrinkingClass:"tox-sidebar--sliding-shrinking",growingClass:"tox-sidebar--sliding-growing",onShrunk:function(n){Zl.getCurrent(n).each(SA.hideAllSlots),oo(n,OA)},onGrown:function(n){oo(n,OA)},onStartGrow:function(n){ro(n,kA,{width:Sr(n.element(),"width").getOr("")})},onStartShrink:function(n){ro(n,kA,{width:mu(n.element())+"px"})}}),mg.config({}),Zl.config({find:function(n){var t=mg.contents(n);return yn(t)}})])}],behaviours:ba([SS(0),Kd("sidebar-sliding-events",[lo(kA,function(n,t){yr(n.element(),"width",t.event().width())}),lo(OA,function(n,t){kr(n.element(),"width")})])])}}},name:"sidebar",schema:[ct("dom")]}),MA=qD.optional({factory:{sketch:function(n){return{uid:n.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:ba([mg.config({})]),components:[]}}},name:"throbber",schema:[ct("dom")]}),FA=Al({name:"OuterContainer",factory:function(e,n,t){var o={getSocket:function(n){return YD.getPart(n,e,"socket")},setSidebar:function(n,t){YD.getPart(n,e,"sidebar").each(function(n){return jB(n,t)})},toggleSidebar:function(n,t){YD.getPart(n,e,"sidebar").each(function(n){return function(n,e){Zl.getCurrent(n).each(function(t){Zl.getCurrent(t).each(function(n){cT.hasGrown(t)?SA.isShowing(n,e)?cT.shrink(t):(SA.hideAllSlots(n),SA.showSlot(n,e)):(SA.hideAllSlots(n),SA.showSlot(n,e),cT.grow(t))})})}(n,t)})},whichSidebar:function(n){return YD.getPart(n,e,"sidebar").bind(UB).getOrNull()},getHeader:function(n){return YD.getPart(n,e,"header")},getToolbar:function(n){return YD.getPart(n,e,"toolbar")},setToolbar:function(n,t){YD.getPart(n,e,"toolbar").each(function(n){n.getApis().setGroups(n,t)})},setToolbars:function(n,t){YD.getPart(n,e,"multiple-toolbar").each(function(n){QD.setItems(n,t)})},refreshToolbar:function(n){YD.getPart(n,e,"toolbar").each(function(n){return n.getApis().refresh(n)})},getMoreButton:function(n){return YD.getPart(n,e,"toolbar").bind(function(n){return n.getApis().getMoreButton(n)})},getThrobber:function(n){return YD.getPart(n,e,"throbber")},focusToolbar:function(n){YD.getPart(n,e,"toolbar").orThunk(function(){return YD.getPart(n,e,"multiple-toolbar")}).each(function(n){lg.focusIn(n)})},setMenubar:function(n,t){YD.getPart(n,e,"menubar").each(function(n){vA.setMenus(n,t)})},focusMenubar:function(n){YD.getPart(n,e,"menubar").each(function(n){vA.focus(n)})}};return{uid:e.uid,dom:e.dom,components:n,apis:o,behaviours:e.behaviours}},configFields:[ct("dom"),ct("behaviours")],partFields:[DA,EA,BA,TA,AA,_A,MA],apis:{getSocket:function(n,t){return n.getSocket(t)},setSidebar:function(n,t,e){n.setSidebar(t,e)},toggleSidebar:function(n,t,e){n.toggleSidebar(t,e)},whichSidebar:function(n,t){return n.whichSidebar(t)},getHeader:function(n,t){return n.getHeader(t)},getToolbar:function(n,t){return n.getToolbar(t)},setToolbar:function(n,t,e){var o=S(e,function(n){return WO(n)});n.setToolbar(t,o)},setToolbars:function(n,t,e){var o=S(e,function(n){return S(n,WO)});n.setToolbars(t,o)},getMoreButton:function(n,t){return n.getMoreButton(t)},refreshToolbar:function(n,t){return n.refreshToolbar(t)},getThrobber:function(n,t){return n.getThrobber(t)},setMenubar:function(n,t,e){n.setMenubar(t,e)},focusMenubar:function(n,t){n.focusMenubar(t)},focusToolbar:function(n,t){n.focusToolbar(t)}}}),IA={file:{title:"File",items:"newdocument restoredraft | preview | print | deleteallconversations"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall | searchreplace"},view:{title:"View",items:"code | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments"},insert:{title:"Insert",items:"image link media addcomment pageembed template codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor toc | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | formats blockformats fontformats fontsizes align | forecolor backcolor | removeformat"},tools:{title:"Tools",items:"spellchecker spellcheckerlanguage | a11ycheck code wordcount"},table:{title:"Table",items:"inserttable | cell row column | advtablesort | tableprops deletetable"},help:{title:"Help",items:"help"}},RA=function(n){function t(){n._skinLoaded=!0,Nv(n)}return function(){n.initialized?t():n.on("init",t)}},VA=d(YB,!1),NA=d(YB,!0),HA=Rh.DOM,PA=Ht(),zA=PA.os.isiOS()&&PA.os.version.major<=12,LA={render:function(e,o,n,t,r){var i=ye(0);VA(e),function(n,t){If(n,t,_o)}(we.fromDom(r.targetNode),o.mothership),xs(zr(),o.uiMothership),e.on("PostRender",function(){qB(e,o,n,t),i.set(e.getWin().innerWidth),FA.setMenubar(o.outerContainer,XB(e,n)),FA.setSidebar(o.outerContainer,n.sidebar),function(r){function n(n){var t=r.getDoc().documentElement,e=u.get(),o=a.get();e.left()!==i.innerWidth||e.top()!==i.innerHeight?(u.set(Iu(i.innerWidth,i.innerHeight)),zv(r,n)):o.left()===t.offsetWidth&&o.top()===t.offsetHeight||(a.set(Iu(t.offsetWidth,t.offsetHeight)),zv(r,n))}function t(n){return Pv(r,n)}var i=r.getWin(),e=r.getDoc().documentElement,u=ye(Iu(i.innerWidth,i.innerHeight)),a=ye(Iu(e.offsetWidth,e.offsetHeight));HA.bind(i,"resize",n),HA.bind(i,"scroll",t);var o=fb(we.fromDom(r.getBody()),"load",n);r.on("remove",function(){o.unbind(),HA.unbind(i,"resize",n),HA.unbind(i,"scroll",t)})}(e)});var u=FA.getSocket(o.outerContainer).getOrDie("Could not find expected socket element");if(!0===zA){xr(u.element(),{overflow:"scroll","-webkit-overflow-scrolling":"touch"});var a=function(e,o){var r=null;return{cancel:function(){null!==r&&(v.clearTimeout(r),r=null)},throttle:function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];null===r&&(r=v.setTimeout(function(){e.apply(null,n),r=null},o))}}}(function(){e.fire("ScrollContent")},20);sb(u.element(),"scroll",a.throttle)}LO(e,o),e.addCommand("ToggleSidebar",function(n,t){FA.toggleSidebar(o.outerContainer,t),e.fire("ToggleSidebar")}),e.addQueryValueHandler("ToggleSidebar",function(){return FA.whichSidebar(o.outerContainer)});var c=Yb(e);return c!==jb.sliding&&c!==jb.floating||e.on("ResizeWindow ResizeEditor ResizeContent",function(){var n=e.getWin().innerWidth;n!==i.get()&&(FA.refreshToolbar(o.outerContainer),i.set(n))}),{iframeContainer:u.element().dom(),editorContainer:o.outerContainer.element().dom()}}},jA=function(t,n,e){var o=n.filter(function(n){return t<n}),r=e.filter(function(n){return n<t});return o.or(r).getOr(t)},UA=function(n){return/^[0-9\.]+(|px)$/i.test(""+n)?on.some(parseInt(""+n,10)):on.none()},WA=function(n){return mn(n)?n+"px":n},GA={render:function(t,i,e,o,n){var u,r=Rh.DOM,a=Kb(t),c=$b(t),s=we.fromDom(n.targetNode),f=Nb(t).or(JB(t)),l=Yb(t),d=l===jb.sliding||l===jb.floating;NA(t);function m(n){void 0===n&&(n=!1),d&&FA.refreshToolbar(i.outerContainer),a||function(n){var t=d?n.fold(function(){return 0},function(n){return 1<n.components().length?su(n.components()[1].element()):0}):0,e=du(s),o=e.top()-su(u.element())+t;xr(i.outerContainer.element(),{position:"absolute",top:Math.round(o)+"px",left:Math.round(e.left())+"px"});var r=f.getOrThunk(function(){var n=UA(wr(zr(),"margin-left")).getOr(0);return mu(zr())-e.left()+n});yr(u.element(),"max-width",r+"px")}(FA.getToolbar(i.outerContainer)),c&&(n?cA.reset(u):cA.refresh(u))}function g(){yr(i.outerContainer.element(),"display","flex"),r.addClass(t.getBody(),"mce-edit-focus"),kr(i.uiMothership.element(),"display"),m()}function p(){i.outerContainer&&(yr(i.outerContainer.element(),"display","none"),r.removeClass(t.getBody(),"mce-edit-focus")),yr(i.uiMothership.element(),"display","none")}function h(){if(u)g();else{u=FA.getHeader(i.outerContainer).getOrDie();var n=function(n){return qb(n).getOr(zr())}(t);xs(n,i.mothership),xs(n,i.uiMothership),qB(t,i,e,o),FA.setMenubar(i.outerContainer,XB(t,e)),g(),t.on("activate",g),t.on("deactivate",p),t.on("NodeChange SkinLoaded ResizeWindow",function(){t.hidden||m(!0)}),t.nodeChanged()}}return t.on("focus",h),t.on("blur hide",p),t.on("init",function(){t.hasFocus()&&h()}),LO(t,i),{editorContainer:i.outerContainer.element().dom()}}},XA=function(t){yk.each([{name:"alignleft",text:"Align left",cmd:"JustifyLeft",icon:"align-left"},{name:"aligncenter",text:"Align center",cmd:"JustifyCenter",icon:"align-center"},{name:"alignright",text:"Align right",cmd:"JustifyRight",icon:"align-right"},{name:"alignjustify",text:"Justify",cmd:"JustifyFull",icon:"align-justify"}],function(n){t.ui.registry.addToggleButton(n.name,{tooltip:n.text,onAction:function(){return t.execCommand(n.cmd)},icon:n.icon,onSetup:fE(t,n.name)})});var n="alignnone",e="No alignment",o="JustifyNone",r="align-none";t.ui.registry.addButton(n,{tooltip:e,onAction:function(){return t.execCommand(o)},icon:r})},YA=function(n){QB(n),function(t){yk.each([{name:"bold",text:"Bold",action:"Bold",icon:"bold",shortcut:"Meta+B"},{name:"italic",text:"Italic",action:"Italic",icon:"italic",shortcut:"Meta+I"},{name:"underline",text:"Underline",action:"Underline",icon:"underline",shortcut:"Meta+U"},{name:"strikethrough",text:"Strikethrough",action:"Strikethrough",icon:"strike-through",shortcut:""},{name:"subscript",text:"Subscript",action:"Subscript",icon:"subscript",shortcut:""},{name:"superscript",text:"Superscript",action:"Superscript",icon:"superscript",shortcut:""},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting",shortcut:""},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document",shortcut:""},{name:"cut",text:"Cut",action:"Cut",icon:"cut",shortcut:"Meta+X"},{name:"copy",text:"Copy",action:"Copy",icon:"copy",shortcut:"Meta+C"},{name:"paste",text:"Paste",action:"Paste",icon:"paste",shortcut:"Meta+V"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A"}],function(n){t.ui.registry.addMenuItem(n.name,{text:n.text,icon:n.icon,shortcut:n.shortcut,onAction:function(){return t.execCommand(n.action)}})}),t.ui.registry.addMenuItem("codeformat",{text:"Code",icon:"sourcecode",onAction:$B(t,"code")})}(n)},qA=function(n){!function(t){t.ui.registry.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onSetup:function(n){return ZB(n,t,"hasUndo")},onAction:function(){return t.execCommand("undo")}}),t.ui.registry.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onSetup:function(n){return ZB(n,t,"hasRedo")},onAction:function(){return t.execCommand("redo")}})}(n),function(t){t.ui.registry.addButton("undo",{tooltip:"Undo",icon:"undo",onSetup:function(n){return ZB(n,t,"hasUndo")},onAction:function(){return t.execCommand("undo")}}),t.ui.registry.addButton("redo",{tooltip:"Redo",icon:"redo",onSetup:function(n){return ZB(n,t,"hasRedo")},onAction:function(){return t.execCommand("redo")}})}(n)},KA=function(n){!function(n){n.ui.registry.addButton("visualaid",{tooltip:"Visual aids",text:"Visual aids",onAction:function(){return n.execCommand("mceToggleVisualAid")}})}(n),function(t){t.ui.registry.addToggleMenuItem("visualaid",{text:"Visual aids",onSetup:function(n){return function(t,n){t.setActive(n.hasVisual);function e(n){t.setActive(n.hasVisual)}return n.on("VisualAid",e),function(){return n.off("VisualAid",e)}}(n,t)},onAction:function(){t.execCommand("mceToggleVisualAid")}})}(n)},JA=function(n){!function(t){t.ui.registry.addButton("outdent",{tooltip:"Decrease indent",icon:"outdent",onSetup:function(n){return function(n,t){n.setDisabled(!t.queryCommandState("outdent"));function e(){n.setDisabled(!t.queryCommandState("outdent"))}return t.on("NodeChange",e),function(){return t.off("NodeChange",e)}}(n,t)},onAction:function(){return t.execCommand("outdent")}}),t.ui.registry.addButton("indent",{tooltip:"Increase indent",icon:"indent",onAction:function(){return t.execCommand("indent")}})}(n)},$A=function(n,t){!function(n,t){var e=dE(0,t,nB(n));n.ui.registry.addNestedMenuItem("align",{text:t.shared.providers.translate("Align"),getSubmenuItems:function(){return e.items.validateItems(e.getStyleItems())}})}(n,t),function(n,t){var e=dE(0,t,eB(n));n.ui.registry.addNestedMenuItem("fontformats",{text:t.shared.providers.translate("Fonts"),getSubmenuItems:function(){return e.items.validateItems(e.getStyleItems())}})}(n,t),function(n,t){var e=N({type:"advanced"},t.styleselect),o=dE(0,t,cB(n,e));n.ui.registry.addNestedMenuItem("formats",{text:"Formats",getSubmenuItems:function(){return o.items.validateItems(o.getStyleItems())}})}(n,t),function(n,t){var e=dE(0,t,aB(n));n.ui.registry.addNestedMenuItem("blockformats",{text:"Blocks",getSubmenuItems:function(){return e.items.validateItems(e.getStyleItems())}})}(n,t),function(n,t){var e=dE(0,t,rB(n));n.ui.registry.addNestedMenuItem("fontsizes",{text:"Font sizes",getSubmenuItems:function(){return e.items.validateItems(e.getStyleItems())}})}(n,t)},QA=function(n,t){XA(n),YA(n),$A(n,t),qA(n),Uv.register(n),KA(n),JA(n)},ZA=function(n){return{anchor:"selection",root:we.fromDom(n.selection.getNode())}},n_={onLtr:function(){return[rc,ua,aa,ca,sa,oc,Ug,Wg,pm,mm,hm,gm]},onRtl:function(){return[rc,aa,ua,sa,ca,oc,Ug,Wg,hm,gm,pm,mm]}},t_={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"]},e_=function(n){return n.settings.contextmenu_never_use_native||!1},o_=function(n){return function(n,t,e){var o=n.ui.registry.getAll().contextMenus;return V(n.settings,t).map(cD).getOrThunk(function(){return C(cD(e),function(n){return En(o,n)})})}(n,"contextmenu","link linkchecker image imagetools table spellchecker configurepermanentpen")},r_=function(n){return!1===n.getParam("contextmenu")},i_={type:"separator"},u_=function(t){if(cn(t))return t;switch(t.type){case"separator":return i_;case"submenu":return{type:"nestedmenuitem",text:t.text,icon:t.icon,getSubmenuItems:function(){var n=t.getSubmenuItems();return cn(n)?n:S(n,u_)}};default:return{type:"menuitem",text:t.text,icon:t.icon,onAction:function(n){return function(){return n()}}(t.onAction)}}},a_="data-initial-z-index",c_=wt("snaps",[ct("getSnapPoints"),qu("onSensor"),ct("leftAttr"),ct("topAttr"),St("lazyViewport",Su),St("mustSnap",!1)]),s_=[St("useFixed",u),ct("blockerClass"),St("getTarget",l),St("onDrag",Z),St("repositionTarget",!0),St("onDrop",Z),Bt("getBounds",Su),c_],f_=function(n,t,r,i,u){var e=t.getSnapPoints(n);return bD(e,r,i,u).orThunk(function(){return O(e,function(t,e){var n=e.sensor(),o=function(n,t,e,o,r,i){var u=bB(n,r,i),a=bB(t,r,i),c=Math.abs(u.left()-a.left()),s=Math.abs(u.top()-a.top());return Iu(c,s)}(r,n,e.range().left(),e.range().top(),i,u);return t.deltas.fold(function(){return{deltas:on.some(o),snap:on.some(e)}},function(n){return(o.left()+o.top())/2<=(n.left()+n.top())/2?{deltas:on.some(o),snap:on.some(e)}:t})},{deltas:on.none(),snap:on.none()}).snap.map(function(n){return{output:nn(wB(n.output(),r,i,u)),extra:n.extra}})})},l_=function(n,t,e,o,r){var i=t.getSnapPoints(n);return bD(i,e,o,r)},d_=/* */Object.freeze({getData:function(n){return on.from(Iu(n.x(),n.y()))},getDelta:function(n,t){return Iu(t.left()-n.left(),t.top()-n.top())}}),m_=g(s_,[Qu("dragger",{handlers:kD(OD)})]),g_=/* */Object.freeze({getData:function(n){var t=n.raw().touches;return 1===t.length?function(n){var t=n[0];return on.some(Iu(t.clientX,t.clientY))}(t):on.none()},getDelta:function(n,t){return Iu(t.left()-n.left(),t.top()-n.top())}}),p_=m_,h_=g(s_,[Qu("dragger",{handlers:kD(ED)})]),v_=g(s_,[Qu("dragger",{handlers:kD(function(n,t,e){return g(OD(n,t,e),ED(n,t,e))})})]),b_=/* */Object.freeze({mouse:p_,touch:h_,mouseOrTouch:v_}),y_=/* */Object.freeze({init:function(){var o=on.none(),t=on.none(),n=nn({});return nu({readState:n,reset:function(){o=on.none(),t=on.none()},update:function(t,n){return t.getData(n).bind(function(n){return function(t,e){var n=o.map(function(n){return t.getDelta(n,e)});return o=on.some(e),n}(t,n)})},getStartData:function(){return t},setStartData:function(n){t=on.some(n)}})}}),x_=/* */Object.freeze({snapTo:function(n,t,e,o){var r=t.getTarget(n.element());if(t.repositionTarget){var i=Co(n.element()),u=pu(i),a=mB(r),c=function(n,t,e){return{coord:wB(n.output(),n.output(),t,e),extra:n.extra()}}(o,u,a),s=xB(c.coord,0,a);xr(r,s)}}}),w_=xa({branchKey:"mode",branches:b_,name:"dragging",active:{events:function(n,t){return n.dragger.handlers(n,t)}},extra:{snap:So(["sensor","range","output"],["extra"])},state:y_,apis:x_}),S_=Ht(),C_=function(c,e){function t(n){var t=wu(n);return TD(g.getOpt(e),n,t.x(),t.y(),t.width(),t.height())}function o(n){var t=wu(n);return TD(p.getOpt(e),n,t.right(),t.bottom(),t.width(),t.height())}function r(n,t,e,o){var r=e(t);w_.snapTo(n,r),function(n,t,e,o){var r=t.dom().getBoundingClientRect();kr(n.element(),"display");var i=Oo(we.fromDom(c.getBody())).dom().innerHeight,u=e(r),a=o(r,i);(u||a)&&yr(n.element(),"display","none")}(n,t,function(n){return n[o]<0},function(n,t){return n[o]>t})}function i(n){return r(h,n,t,"top")}function u(n){return r(v,n,o,"bottom")}var a=ye([]),s=ye([]),n=ye(!1),f=ye(on.none()),l=ye(on.none()),d=BD(function(){return S(a.get(),function(n){return t(n)})},f,function(t){l.get().each(function(n){c.fire("TableSelectorChange",{start:t,finish:n})})}),m=BD(function(){return S(s.get(),function(n){return o(n)})},l,function(t){f.get().each(function(n){c.fire("TableSelectorChange",{start:n,finish:t})})}),g=DD(d),p=DD(m),h=uu(g.asSpec()),v=uu(p.asSpec());S_.deviceType.isTouch()&&(c.on("TableSelectionChange",function(t){n.get()||(hs(e,h),hs(e,v),n.set(!0)),f.set(on.some(t.start)),l.set(on.some(t.finish)),t.otherCells.each(function(n){a.set(n.upOrLeftCells),s.set(n.downOrRightCells),i(t.start),u(t.finish)})}),c.on("ResizeEditor ResizeWindow ScrollContent",function(){f.get().each(i),l.get().each(u)}),c.on("TableSelectionClear",function(){n.get()&&(bs(h),bs(v),n.set(!1)),f.set(on.none()),l.set(on.none())}))};(ID=FD=FD||{})[ID.None=0]="None",ID[ID.Both=1]="Both",ID[ID.Vertical=2]="Vertical";function k_(n,t,e){var o=we.fromDom(n.getContainer()),r=function(n,t,e,o,r){var i={};return i.height=jA(o+t.top(),Vb(n),Hb(n)),e===FD.Both&&(i.width=jA(r+t.left(),Rb(n),Nb(n))),i}(n,t,e,su(o),mu(o));Cn(r,function(n,t){return yr(o,t,WA(n))}),Hv(n)}function O_(n){if(1===n.nodeType){if("BR"===n.nodeName||n.getAttribute("data-mce-bogus"))return!0;if("bookmark"===n.getAttribute("data-mce-type"))return!0}return!1}function E_(o,t){var r,n,e;return{dom:{tag:"div",classes:["tox-statusbar"]},components:(n=function(){var n=[];return o.getParam("elementpath",!0,"boolean")&&n.push(pM(o,{})),Vt(o.settings.plugins,"wordcount")&&n.push(function(n,o){function r(n,t,e){return mg.set(n,[Ir(o.translate(["{0} "+e,t[e]]))])}return Gg.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:ba([Gy.config({}),mg.config({}),Zf.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),Kd("wordcount-events",[Ni(function(n){var t=Zf.getValue(n),e="words"===t.mode?"characters":"words";Zf.setValue(n,{mode:e,count:t.count}),r(n,t.count,e)}),Ii(function(e){n.on("wordCountUpdate",function(n){var t=Zf.getValue(e).mode;Zf.setValue(e,{mode:t,count:n.wordCount}),r(e,n.wordCount,t)})})])])})}(o,t)),o.getParam("branding",!0,"boolean")&&n.push(function(){var n=rh.translate(["Powered by {0}","Tiny"]);return{dom:{tag:"span",classes:["tox-statusbar__branding"],innerHtml:'<a href="https://www.tiny.cloud/?utm_campaign=editor_referral&amp;utm_medium=poweredby&amp;utm_source=tinymce&amp;utm_content=v5" rel="noopener" target="_blank" tabindex="-1" aria-label="'+n+'">'+n+"</a>"}}}()),0<n.length?[{dom:{tag:"div",classes:["tox-statusbar__text-container"]},components:n}]:[]}(),e=function(n){var t=!Vt(n.settings.plugins,"autoresize"),e=n.getParam("resize",t);return!1===e?FD.None:"both"===e?FD.Both:FD.Vertical}(o),e!==FD.None&&n.push((r=e,{dom:{tag:"div",classes:["tox-statusbar__resize-handle"],attributes:{title:t.translate("Resize")},innerHtml:ym("resize-handle",t.icons)},behaviours:ba([w_.config({mode:"mouse",repositionTarget:!1,onDrag:function(n,t,e){k_(o,e,r)},blockerClass:"tox-blocker"})])})),n)}}function T_(n){return[ft("type"),function(n){return st(n,me)}("columns"),n]}function B_(t){return ce("items","items",Mn(),Kn(Zn(function(n){return tt("Checking item of "+t,gF,n).fold(function(n){return an.error(le(n))},function(n){return an.value(n)})})))}function D_(n){return cn(n.type)&&cn(n.name)}function A_(n){var t=function(n){return C(DF(n),D_)}(n),e=B(t,function(t){return function(n){return on.from(AF[n.type])}(t).fold(function(){return[]},function(n){return[st(t.name,n)]})});return re(e)}function __(n){return{internalDialog:et(function(n){return tt("dialog",BF,n)}(n)),dataValidator:A_(n),initialData:n.initialData}}function M_(n){var e=[],o={};return Cn(n,function(n,t){n.fold(function(){e.push(t)},function(n){o[t]=n})}),0<e.length?an.error(e):an.value(o)}function F_(n){return yn(function(n,t){var e=gn.call(n,0);return e.sort(t),e}(n,function(n,t){return t<n?-1:n<t?1:0}))}function I_(n,t){yr(n,"height",t+"px"),Ht().browser.isIE()?kr(n,"flex-basis"):yr(n,"flex-basis",t+"px")}function R_(n,o,r){Cu(n,'[role="dialog"]').each(function(e){ku(e,'[role="tablist"]').each(function(t){r.get().map(function(n){return yr(o,"height","0"),yr(o,"flex-basis","0"),Math.min(n,function(n,t,e){var o,r=ko(n).dom(),i=Cu(n,".tox-dialog-wrap").getOr(n);o="fixed"===wr(i,"position")?Math.max(r.clientHeight,v.window.innerHeight):Math.max(r.offsetHeight,r.scrollHeight);var u=su(t),a=t.dom().offsetLeft>=e.dom().offsetLeft+mu(e)?Math.max(su(e),u):u,c=parseInt(wr(n,"margin-top"),10)||0,s=parseInt(wr(n,"margin-bottom"),10)||0;return o-(su(n)+c+s-a)}(e,o,t))}).each(function(n){I_(o,n)})})})}function V_(n){return ku(n,'[role="tabpanel"]')}function N_(r){var i;return{smartTabHeight:(i=ye(on.none()),{extraEvents:[Ii(function(n){var t=n.element();V_(t).each(function(o){yr(o,"visibility","hidden"),n.getSystem().getByDom(o).toOption().each(function(n){var t=function(o,r,i){return S(o,function(n,t){mg.set(i,o[t].view());var e=r.dom().getBoundingClientRect();return mg.set(i,[]),e.height})}(r,o,n),e=F_(t);i.set(e)}),R_(t,o,i),kr(o,"visibility"),function(n,t){yn(n).each(function(n){return WF.showTab(t,n.value)})}(r,n),qg.requestAnimationFrame(function(){R_(t,o,i)})})}),lo(Si(),function(n){var t=n.element();V_(t).each(function(n){R_(t,n,i)})}),lo(gy,function(n,t){var r=n.element();V_(r).each(function(t){var n=Sa();yr(t,"visibility","hidden");var e=Sr(t,"height").map(function(n){return parseInt(n,10)});kr(t,"height"),kr(t,"flex-basis");var o=t.dom().getBoundingClientRect().height;e.forall(function(n){return n<o})?(i.set(on.from(o)),R_(r,t,i)):e.each(function(n){I_(t,n)}),kr(t,"visibility"),n.each(wa)})})],selectFirst:!1}),naiveTabHeight:{extraEvents:[],selectFirst:!0}}}function H_(n,t,e,o){return{dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:N(N({},t.map(function(n){return{id:n}}).getOr({})),o?{"aria-live":"polite"}:{})},components:[],behaviours:ba([SS(0),RT.config({channel:KF,updateState:function(n,t){return on.some({isTabPanel:function(){return"tabpanel"===t.body.type}})},renderComponents:function(n){switch(n.body.type){case"tabpanel":return[function(n,e){function o(n){var t=Zf.getValue(n),e=M_(t).getOr({}),o=i.get(),r=Dn(o,e);i.set(r)}function r(n){var t=i.get();Zf.setValue(n,t)}var i=ye({}),u=ye(null),t=S(n.tabs,function(n){return{value:n.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"],innerHtml:e.shared.providers.translate(n.title)},view:function(){return[dS.sketch(function(t){return{dom:{tag:"div",classes:["tox-form"]},components:S(n.items,function(n){return Wk(t,n,e)}),formBehaviours:ba([lg.config({mode:"acyclic",useTabstopAt:b(MS)}),Kd("TabView.form.events",[Ii(r),Ri(o)]),lc.config({channels:K([{key:GF,value:{onReceive:o}},{key:XF,value:{onReceive:r}}])})])}})]}}}),a=N_(t).smartTabHeight;return WF.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:function(n,t,e){var o=Zf.getValue(t);ro(n,my,{name:o,oldName:u.get()}),u.set(o)},tabs:t,components:[WF.parts().tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[HF.parts().tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:ba([Gy.config({})])}),WF.parts().tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:a.selectFirst,tabSectionBehaviours:ba([Kd("tabpanel",a.extraEvents),lg.config({mode:"acyclic"}),Zl.config({find:function(n){return yn(WF.getViewItems(n))}}),Zf.config({store:{mode:"manual",getValue:function(n){return n.getSystem().broadcastOn([GF],{}),i.get()},setValue:function(n,t){i.set(t),n.getSystem().broadcastOn([XF],{})}}})])})}(n.body,e)];default:return[function(n,e){var t=vm(dS.sketch(function(t){return{dom:{tag:"div",classes:["tox-form"].concat(n.classes)},components:S(n.items,function(n){return Wk(t,n,e)})}}));return{dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[t.asSpec()]}],behaviours:ba([lg.config({mode:"acyclic",useTabstopAt:b(MS)}),wS(t),ES(t,{postprocess:function(n){return M_(n).fold(function(n){return v.console.error(n),{}},function(n){return n})}})])}}(n.body,e)]}},initialData:n})])}}function P_(n,e){return[ho(Qr(),FS),n(ay,function(n,t){e.onClose(),t.onClose()}),n(cy,function(n,t,e,o){t.onCancel(n),oo(o,ay)}),lo(dy,function(n,t){return e.onUnblock()}),lo(ly,function(n,t){return e.onBlock(t.event())})]}function z_(n,t){function e(n,t){return Wb.sketch({dom:{tag:"div",classes:["tox-dialog__footer-"+n]},components:S(t,function(n){return n.memento.asSpec()})})}var o=function(n,t){for(var e=[],o=[],r=0,i=n.length;r<i;r++){var u=n[r];(t(u,r)?e:o).push(u)}return{pass:e,fail:o}}(t.map(function(n){return n.footerButtons}).getOr([]),function(n){return"start"===n.align});return[e("start",o.pass),e("end",o.fail)]}function L_(n,o){return{dom:cp('<div class="tox-dialog__footer"></div>'),components:[],behaviours:ba([RT.config({channel:JF,initialData:n,updateState:function(n,t){var e=S(t.buttons,function(n){var t=vm(function(n,t){return YC(n,n.type,t)}(n,o));return{name:n.name,align:n.align,memento:t}});return on.some({lookupByName:function(n,t){return function(t,n,e){return E(n,function(n){return n.name===e}).bind(function(n){return n.memento.getOpt(t)})}(n,e,t)},footerButtons:e})},renderComponents:z_})])}}function j_(n,t){return wM.parts().footer(L_(n,t))}function U_(t,e){if(t.getRoot().getSystem().isConnected()){var o=Zl.getCurrent(t.getFormWrapper()).getOr(t.getFormWrapper());return dS.getField(o,e).fold(function(){var n=t.getFooter();return RT.getState(n).get().bind(function(n){return n.lookupByName(o,e)})},function(n){return on.some(n)})}return on.none()}function W_(u,o,a){function n(n){var t=u.getRoot();t.getSystem().isConnected()&&n(t)}var c={getData:function(){var n=u.getRoot(),t=n.getSystem().isConnected()?u.getFormWrapper():n,e=Zf.getValue(t),o=P(a,function(n){return n.get()});return N(N({},e),o)},setData:function(i){n(function(n){var t=c.getData(),e=An(t,i),o=function(n,t){var e=n.getRoot();return RT.getState(e).get().map(function(n){return et(tt("data",n.dataValidator,t))}).getOr(t)}(u,e),r=u.getFormWrapper();Zf.setValue(r,o),Cn(a,function(n,t){En(e,t)&&n.set(e[t])})})},disable:function(n){U_(u,n).each(Ch.disable)},enable:function(n){U_(u,n).each(Ch.enable)},focus:function(n){U_(u,n).each(vg.focus)},block:function(t){if(!cn(t))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");n(function(n){ro(n,ly,{message:t})})},unblock:function(){n(function(n){oo(n,dy)})},showTab:function(e){n(function(n){var t=u.getBody();RT.getState(t).get().exists(function(n){return n.isTabPanel()})&&Zl.getCurrent(t).each(function(n){WF.showTab(n,e)})})},redial:function(e){n(function(n){var t=o(e);n.getSystem().broadcastOn([YF],t),n.getSystem().broadcastOn([qF],t.internalDialog),n.getSystem().broadcastOn([KF],t.internalDialog),n.getSystem().broadcastOn([JF],t.internalDialog),c.setData(t.initialData)})},close:function(){n(function(n){oo(n,ay)})}};return c}function G_(n,t){return{dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[n,t]}}function X_(n,t){return wM.parts().close(Gg.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":t.translate("Close")}},action:n,buttonBehaviours:ba([Gy.config({})])}))}function Y_(){return wM.parts().title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}})}function q_(n,t){return wM.parts().body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:cp("<p>"+t.translate(n)+"</p>")}]}]})}function K_(n){return wM.parts().footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:n})}function J_(n,t){return[Wb.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:n}),Wb.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:t})]}function $_(t){var n,e="tox-dialog",o=e+"-wrap",r=o+"__backdrop",i=e+"__disable-scroll";return wM.sketch({lazySink:t.lazySink,onEscape:function(n){return t.onEscape(n),on.some(!0)},useTabstopAt:function(n){return!MS(n)},dom:{tag:"div",classes:[e].concat(t.extraClasses),styles:N({position:"relative"},t.extraStyles)},components:g([t.header,t.body],t.footer.toArray()),parts:{blocker:{dom:cp('<div class="'+o+'"></div>'),components:[{dom:{tag:"div",classes:nI?[r,r+"--opaque"]:[r]}}]}},dragBlockClass:o,modalBehaviours:ba(g([vg.config({}),Kd("dialog-events",t.dialogEvents.concat([bo(Qr(),function(n,t){lg.focusIn(n)})])),Kd("scroll-lock",[Ii(function(){fr(zr(),i)}),Ri(function(){dr(zr(),i)})])],t.extraBehaviours)),eventOrder:N((n={},n[di()]=["dialog-events"],n[Ci()]=["scroll-lock","dialog-events","alloy.base.behaviour"],n[ki()]=["alloy.base.behaviour","dialog-events","scroll-lock"],n),t.eventOrder)})}function Q_(n){return Gg.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":n.translate("Close"),title:n.translate("Close")}},components:[{dom:{tag:"div",classes:["tox-icon"],innerHtml:'<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg"><path d="M17.953 7.453L13.422 12l4.531 4.547-1.406 1.406L12 13.422l-4.547 4.531-1.406-1.406L10.578 12 6.047 7.453l1.406-1.406L12 10.578l4.547-4.531z" fill-rule="evenodd"></path></svg>'}}],action:function(n){oo(n,cy)}})}function Z_(n,t,e){function o(n){return[Ir(e.translate(n.title))]}return{dom:{tag:"div",classes:["tox-dialog__title"],attributes:N({},t.map(function(n){return{id:n}}).getOr({}))},components:o(n),behaviours:ba([RT.config({channel:qF,renderComponents:o})])}}function nM(){return{dom:cp('<div class="tox-dialog__draghandle"></div>')}}function tM(n,t){return function(n,t){var e=wM.parts().title(Z_(n,on.none(),t)),o=wM.parts().draghandle(nM()),r=wM.parts().close(Q_(t)),i=[e].concat(n.draggable?[o]:[]).concat([r]);return Wb.sketch({dom:cp('<div class="tox-dialog__header"></div>'),components:i})}({title:t.shared.providers.translate(n),draggable:t.dialog.isDraggableModal()},t.shared.providers)}function eM(n,t){return{onClose:function(){return t.closeWindow()},onBlock:function(e){wM.setBusy(n(),function(n,t){return{dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":e.message()},styles:{left:"0px",right:"0px",bottom:"0px",top:"0px",position:"absolute"}},behaviours:t,components:[{dom:cp('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}})},onUnblock:function(){wM.setIdle(n())}}}function oM(n,t,e,o){var r;return uu($_(N(N({},n),{lazySink:o.shared.getSink,extraBehaviours:g([RT.config({channel:YF,updateState:function(n,t){return on.some(t)},initialData:t}),DS({})],n.extraBehaviours),onEscape:function(n){oo(n,cy)},dialogEvents:e,eventOrder:(r={},r[li()]=["reflecting","receiving"],r[Ci()]=["scroll-lock","reflecting","messages","dialog-events","alloy.base.behaviour"],r[ki()]=["alloy.base.behaviour","dialog-events","messages","reflecting","scroll-lock"],r)})))}function rM(n){return S(n,function(n){return"menu"===n.type?function(n){var t=S(n.items,function(n){var t=ye(!1);return N(N({},n),{storage:t})});return N(N({},n),{items:t})}(n):n})}function iM(n){return O(n,function(n,t){return"menu"!==t.type?n:O(t.items,function(n,t){return n[t.name]=t.storage,n},n)},{})}function uM(n,t,e){var o=tM(n.internalDialog.title,e),r=function(n,t){var e=H_(n,on.none(),t,!1);return wM.parts().body(e)}({body:n.internalDialog.body},e),i=rM(n.internalDialog.buttons),u=iM(i),a=j_({buttons:i},e),c=ZF(function(){return d},eM(function(){return l},t)),s="normal"!==n.internalDialog.size?"large"===n.internalDialog.size?["tox-dialog--width-lg"]:["tox-dialog--width-md"]:[],f={header:o,body:r,footer:on.some(a),extraClasses:s,extraBehaviours:[],extraStyles:{}},l=oM(f,n,c,e),d=W_({getRoot:function(){return l},getBody:function(){return wM.getBody(l)},getFooter:function(){return wM.getFooter(l)},getFormWrapper:function(){var n=wM.getBody(l);return Zl.getCurrent(n).getOr(n)}},t.redial,u);return{dialog:l,instanceApi:d}}function aM(n,t,e,o){var r,i,u=Xo("dialog-label"),a=Xo("dialog-content"),c=vm(function(n,t,e){return Wb.sketch({dom:cp('<div class="tox-dialog__header"></div>'),components:[Z_(n,on.some(t),e),nM(),Q_(e)],containerBehaviours:ba([w_.config({mode:"mouse",blockerClass:"blocker",getTarget:function(n){return Ou(n,'[role="dialog"]').getOrDie()},snaps:{getSnapPoints:function(){return[]},leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])})}({title:n.internalDialog.title,draggable:!0},u,e.shared.providers)),s=vm(function(n,t,e,o){return H_(n,on.some(t),e,o)}({body:n.internalDialog.body},a,e,o)),f=rM(n.internalDialog.buttons),l=iM(f),d=vm(function(n,t){return L_(n,t)}({buttons:f},e)),m=ZF(function(){return p},{onBlock:function(){},onUnblock:function(){},onClose:function(){return t.closeWindow()}}),g=uu({dom:{tag:"div",classes:["tox-dialog","tox-dialog-inline"],attributes:(r={role:"dialog"},r["aria-labelledby"]=u,r["aria-describedby"]=""+a,r)},eventOrder:(i={},i[li()]=[RT.name(),lc.name()],i[di()]=["execute-on-form"],i[Ci()]=["reflecting","execute-on-form"],i),behaviours:ba([lg.config({mode:"cyclic",onEscape:function(n){return oo(n,ay),on.some(!0)},useTabstopAt:function(n){return!MS(n)&&("button"!==Ke(n)||"disabled"!==zo(n,"disabled"))}}),RT.config({channel:YF,updateState:function(n,t){return on.some(t)},initialData:n}),vg.config({}),Kd("execute-on-form",m.concat([bo(Qr(),function(n,t){lg.focusIn(n)})])),DS({})]),components:[c.asSpec(),s.asSpec(),d.asSpec()]}),p=W_({getRoot:function(){return g},getFooter:function(){return d.get(g)},getBody:function(){return s.get(g)},getFormWrapper:function(){var n=s.get(g);return Zl.getCurrent(n).getOr(n)}},t.redial,l);return{dialog:g,instanceApi:p}}function cM(n){return sn(n)&&-1!==eI.indexOf(n.mceAction)}function sM(e,n,o,t){var r,i=tM(e.title,t),u=function(n){var t={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[IS({dom:{tag:"iframe",attributes:{src:n.url}},behaviours:ba([Gy.config({}),vg.config({})])})]}],behaviours:ba([lg.config({mode:"acyclic",useTabstopAt:b(MS)})])};return wM.parts().body(t)}(e),a=e.buttons.bind(function(n){return 0===n.length?on.none():on.some(j_({buttons:n},t))}),c=QF(function(){return h},eM(function(){return p},n)),s=N(N({},e.height.fold(function(){return{}},function(n){return{height:n+"px","max-height":n+"px"}})),e.width.fold(function(){return{}},function(n){return{width:n+"px","max-width":n+"px"}})),f=e.width.isNone()&&e.height.isNone()?["tox-dialog--width-lg"]:[],l=new tI(e.url,{base_uri:new tI(v.window.location.href)}),d=l.protocol+"://"+l.host+(l.port?":"+l.port:""),m=ye(on.none()),g=[Kd("messages",[Ii(function(){var n=sb(we.fromDom(v.window),"message",function(n){if(l.isSameOrigin(new tI(n.raw().origin))){var t=n.raw().data;cM(t)?function(n,t,e){switch(e.mceAction){case"insertContent":n.insertContent(e.content);break;case"setContent":n.setContent(e.content);break;case"execCommand":var o=!!ln(e.ui)&&e.ui;n.execCommand(e.cmd,o,e.value);break;case"close":t.close();break;case"block":t.block(e.message);break;case"unblock":t.unblock()}}(o,h,t):function(n){return!cM(n)&&sn(n)&&En(n,"mceAction")}(t)&&e.onMessage(h,t)}});m.set(on.some(n))}),Ri(function(){m.get().each(function(n){return n.unbind()})})]),lc.config({channels:(r={},r[$F]={onReceive:function(n,t){ku(n.element(),"iframe").each(function(n){n.dom().contentWindow.postMessage(t,d)})}},r)})],p=oM({header:i,body:u,footer:a,extraClasses:f,extraBehaviours:g,extraStyles:s},e,c,t),h=function(t){function n(n){t.getSystem().isConnected()&&n(t)}return{block:function(t){if(!cn(t))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");n(function(n){ro(n,ly,{message:t})})},unblock:function(){n(function(n){oo(n,dy)})},close:function(){n(function(n){oo(n,ay)})},sendMessage:function(t){n(function(n){n.getSystem().broadcastOn([$F],t)})}}}(p);return{dialog:p,instanceApi:h}}var fM,lM,dM,mM,gM,pM=function(i,r){r.delimiter||(r.delimiter="\xbb");return{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:ba([lg.config({mode:"flow",selector:"div[role=button]"}),Gy.config({}),mg.config({}),Kd("elementPathEvents",[Ii(function(e,n){i.shortcuts.add("alt+F11","focus statusbar elementpath",function(){return lg.focusIn(e)}),i.on("NodeChange",function(n){var t=function(n){for(var t=[],e=n.length;0<e--;){var o=n[e];if(1===o.nodeType&&!O_(o)){var r=i.fire("ResolveName",{name:o.nodeName.toLowerCase(),target:o});if(r.isDefaultPrevented()||t.push({name:r.name,element:o}),r.isPropagationStopped())break}}return t}(n.parents);0<t.length&&mg.set(e,function(n){var t=S(n||[],function(t,n){return Gg.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{role:"button","data-index":n,"tab-index":-1,"aria-level":n+1},innerHtml:t.name},action:function(n){i.focus(),i.selection.select(t.element),i.nodeChanged()}})}),o={dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0},innerHtml:" "+r.delimiter+" "}};return O(t.slice(1),function(n,t){var e=n;return e.push(o),e.push(t),e},[t[0]])}(t))})})])]),components:[]}},hM=function(l){function d(){return e.bind(FA.getHeader)}function m(){return an.value(v)}function n(){return e.bind(function(n){return FA.getMoreButton(n)}).getOrDie("Could not find more button element")}function g(){return e.bind(function(n){return FA.getThrobber(n)}).getOrDie("Could not find throbber element")}var t=l.inline,p=t?GA:LA,h=$b(l)?dA:hA,e=on.none(),o=Ht(),r=o.browser.isIE()?["tox-platform-ie"]:[],i=o.deviceType.isTouch()?["tox-platform-touch"]:[],u=rh.isRtl()?{attributes:{dir:"rtl"}}:{},v=uu({dom:N({tag:"div",classes:["tox","tox-silver-sink","tox-tinymce-aux"].concat(r).concat(i)},u),behaviours:ba([Af.config({useFixed:function(){return h.isDocked(d)}})])}),a=vm({dom:{tag:"div",classes:["tox-anchorbar"]}}),b=hO(v,l,function(){return e.bind(function(n){return a.getOpt(n)}).getOrDie("Could not find a anchor bar element")},n),c=FA.parts().menubar({dom:{tag:"div",classes:["tox-menubar"]},backstage:b,onEscape:function(){l.focus()}}),s=Yb(l),f=FA.parts().toolbar({dom:{tag:"div",classes:["tox-toolbar"]},getSink:m,backstage:b,onEscape:function(){l.focus()},split:s,lazyToolbar:function(){return e.bind(function(n){return FA.getToolbar(n)}).getOrDie("Could not find more toolbar element")},lazyMoreButton:n,lazyHeader:function(){return d().getOrDie("Could not find header element")}}),y=FA.parts()["multiple-toolbar"]({dom:{tag:"div",classes:["tox-toolbar-overlord"]},onEscape:function(){},split:s}),x=FA.parts().socket({dom:{tag:"div",classes:["tox-edit-area"]}}),w=FA.parts().sidebar({dom:{tag:"div",classes:["tox-sidebar"]}}),S=FA.parts().throbber({dom:{tag:"div",classes:["tox-throbber"]},backstage:b}),C=l.getParam("statusbar",!0,"boolean")&&!t?on.some(E_(l,b.shared.providers)):on.none(),k={dom:{tag:"div",classes:["tox-sidebar-wrap"]},components:[x,w]},O=Xb(l),E=zb(l),T=Pb(l),B=FA.parts().header({dom:{tag:"div",classes:["tox-editor-header"]},components:H([T?[c]:[],O?[y]:E?[f]:[],Kb(l)?[]:[a.asSpec()]]),sticky:$b(l),editor:l,getSink:m}),D=H([[B],t?[]:[k]]),A=H([[{dom:{tag:"div",classes:["tox-editor-container"]},components:D}],t?[]:C.toArray(),[S]]),_=Jb(l),M=N(N({role:"application"},rh.isRtl()?{dir:"rtl"}:{}),_?{"aria-hidden":"true"}:{}),F=uu(FA.sketch({dom:{tag:"div",classes:["tox","tox-tinymce"].concat(t?["tox-tinymce-inline"]:[]).concat(i).concat(r),styles:N({visibility:"hidden"},_?{opacity:"0",border:"0"}:{}),attributes:M},components:A,behaviours:ba([lg.config({mode:"cyclic",selector:".tox-menubar, .tox-toolbar, .tox-toolbar__primary, .tox-toolbar__overflow--open, .tox-sidebar__overflow--open, .tox-statusbar__path, .tox-statusbar__wordcount, .tox-statusbar__branding a"})])}));e=on.some(F),l.shortcuts.add("alt+F9","focus menubar",function(){FA.focusMenubar(F)}),l.shortcuts.add("alt+F10","focus toolbar",function(){FA.focusToolbar(F)});var I=Mb(F),R=Mb(v);XD(l,I,R),iy(l);function V(){var n=WA(KB(l)),t=WA(function(n){return JB(n).getOr(Ib(n))}(l));return l.inline||(Cr("div","width",t)&&yr(F.element(),"width",t),Cr("div","height",n)?yr(F.element(),"height",n):yr(F.element(),"height","200px")),n}return{mothership:I,uiMothership:R,backstage:b,renderUI:function(){h.setup(l,d),QA(l,b),lD(l,m,b),function(o){var r=o.ui.registry.getAll().sidebars;bn(wn(r),function(t){function e(){return on.from(o.queryCommandValue("ToggleSidebar")).is(t)}var n=r[t];o.ui.registry.addToggleButton(t,{icon:n.icon,tooltip:n.tooltip,onAction:function(n){o.execCommand("ToggleSidebar",!1,t),n.setActive(e())},onSetup:function(n){function t(){return n.setActive(e())}return o.on("ToggleSidebar",t),function(){o.off("ToggleSidebar",t)}}})})}(l),function(e,t,o){function r(n){n!==i.get()&&(WB(t(),n,o.providers),i.set(n))}var i=ye(!1),u=ye(on.none());e.on("ProgressState",function(n){if(u.get().each(qg.clearTimeout),mn(n.time)){var t=qg.setEditorTimeout(e,function(){return r(n.state)},n.time);u.set(on.some(t))}else r(n.state),u.set(on.none())})}(l,g,b.shared);var n=l.ui.registry.getAll(),t=n.buttons,e=n.menuItems,o=n.contextToolbars,r=n.sidebars,i=Lb(l),u={menuItems:e,menus:l.settings.menu?P(l.settings.menu,function(n){return An(n,{items:n.items})}):{},menubar:l.settings.menubar,toolbar:i.getOrThunk(function(){return l.getParam("toolbar",!0)}),buttons:t,sidebar:r};GD(l,o,v,{backstage:b}),C_(l,v);var a=l.getElement(),c=V(),s={mothership:I,uiMothership:R,outerContainer:F},f={targetNode:a,height:c};return p.render(l,s,u,b,f)},getUi:function(){return{channels:{broadcastAll:R.broadcast,broadcastOn:R.broadcastOn,register:function(){}}}}}},vM=function(n,t){var e=on.from(zo(n,"id")).fold(function(){var n=Xo("dialog-label");return Po(t,"id",n),n},l);Po(n,"aria-labelledby",e)},bM=nn([ct("lazySink"),ht("dragBlockClass"),Bt("getBounds",Su),St("useTabstopAt",nn(!0)),St("eventOrder",{}),Fs("modalBehaviours",[lg]),Ku("onExecute"),$u("onEscape")]),yM={sketch:l},xM=nn([Sl({name:"draghandle",overrides:function(n,t){return{behaviours:ba([w_.config({mode:"mouse",getTarget:function(n){return Cu(n,'[role="dialog"]').getOr(n)},blockerClass:n.dragBlockClass.getOrDie(new Error("The drag blocker class was not specified for a dialog with a drag handle: \n"+JSON.stringify(t,null,2)).message),getBounds:n.getDragBounds})])}}}),xl({schema:[ct("dom")],name:"title"}),xl({factory:yM,schema:[ct("dom")],name:"close"}),xl({factory:yM,schema:[ct("dom")],name:"body"}),Sl({factory:yM,schema:[ct("dom")],name:"footer"}),wl({factory:{sketch:function(n,t){return N(N({},n),{dom:t.dom,components:t.components})}},schema:[St("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),St("components",[])],name:"blocker"})]),wM=Al({name:"ModalDialog",configFields:bM(),partFields:xM(),factory:function(o,n,t,r){var a=Xo("alloy.dialog.busy"),c=Xo("alloy.dialog.idle"),s=ba([lg.config({mode:"special",onTab:function(){return on.some(!0)},onShiftTab:function(){return on.some(!0)}}),vg.config({})]),e=Xo("modal-events"),i=N(N({},o.eventOrder),{"alloy.system.attached":[e].concat(o.eventOrder["alloy.system.attached"]||[])});return{uid:o.uid,dom:o.dom,components:n,apis:{show:function(i){var n=o.lazySink(i).getOrDie(),u=ye(on.none()),t=r.blocker(),e=n.getSystem().build(N(N({},t),{components:t.components.concat([au(i)]),behaviours:ba([vg.config({}),Kd("dialog-blocker-events",[bo(Qr(),function(){lg.focusIn(i)}),lo(c,function(n,t){Lo(i.element(),"aria-busy")&&(jo(i.element(),"aria-busy"),u.get().each(function(n){return mg.remove(i,n)}))}),lo(a,function(n,t){Po(i.element(),"aria-busy","true");var e=t.event().getBusySpec();u.get().each(function(n){mg.remove(i,n)});var o=e(i,s),r=n.getSystem().build(o);u.set(on.some(r)),mg.append(i,au(r)),r.hasConfigured(lg)&&lg.focusIn(r)})])])}));hs(n,e),lg.focusIn(i)},hide:function(t){Eo(t.element()).each(function(n){t.getSystem().getByDom(n).each(function(n){bs(n)})})},getBody:function(n){return Ks(n,o,"body")},getFooter:function(n){return Ks(n,o,"footer")},setIdle:function(n){oo(n,c)},setBusy:function(n,t){ro(n,a,{getBusySpec:t})}},eventOrder:i,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:Rs(o.modalBehaviours,[mg.config({}),lg.config({mode:"cyclic",onEnter:o.onExecute,onEscape:o.onEscape,useTabstopAt:o.useTabstopAt}),Kd(e,[Ii(function(n){vM(n.element(),Ks(n,o,"title").element()),function(n,t){var e=on.from(zo(n,"id")).fold(function(){var n=Xo("dialog-describe");return Po(t,"id",n),n},l);Po(n,"aria-describedby",e)}(n.element(),Ks(n,o,"body").element())})])])}},apis:{show:function(n,t){n.show(t)},hide:function(n,t){n.hide(t)},getBody:function(n,t){return n.getBody(t)},getFooter:function(n,t){return n.getFooter(t)},setBusy:function(n,t,e){n.setBusy(t,e)},setIdle:function(n,t){n.setIdle(t)}}}),SM=[ft("type"),ft("text"),lt("level",["info","warn","error","success"]),ft("icon"),St("url","")],CM=re(SM),kM=[ft("type"),ft("text"),Tt("disabled",!1),Tt("primary",!1),ce("name","name",In(function(){return Xo("button-name")}),ge),yt("icon"),Tt("borderless",!1)],OM=re(kM),EM=[ft("type"),ft("name"),ft("label"),Tt("disabled",!1)],TM=re(EM),BM=pe,DM=[ft("type"),ft("name")],AM=DM.concat([yt("label")]),_M=re(AM),MM=ge,FM=re(AM),IM=ge,RM=re(AM),VM=Kn(se),NM=AM.concat([Tt("sandboxed",!0)]),HM=re(NM),PM=ge,zM=AM.concat([yt("inputMode"),yt("placeholder"),Tt("maximized",!1),Tt("disabled",!1)]),LM=re(zM),jM=ge,UM=AM.concat([gt("items",[ft("text"),ft("value")]),kt("size",1),Tt("disabled",!1)]),WM=re(UM),GM=ge,XM=AM.concat([Tt("constrain",!0),Tt("disabled",!1)]),YM=re(XM),qM=re([ft("width"),ft("height")]),KM=AM.concat([yt("placeholder"),Tt("maximized",!1),Tt("disabled",!1)]),JM=re(KM),$M=ge,QM=AM.concat([Et("filetype","file",["image","media","file"]),St("disabled",!1)]),ZM=re(QM),nF=re([ft("value"),St("meta",{})]),tF=DM.concat([Ot("tag","textarea"),ft("scriptId"),ft("scriptUrl"),(fM="settings",lM=undefined,Ct(fM,lM,be))]),eF=DM.concat([Ot("tag","textarea"),dt("init")]),oF=Zn(function(n){return tt("customeditor.old",qn(eF),n).orThunk(function(){return tt("customeditor.new",qn(tF),n)})}),rF=ge,iF=[ft("type"),ft("html"),Et("presets","presentation",["presentation","document"])],uF=re(iF),aF=AM.concat([st("currentState",re([ct("blob"),ft("url")]))]),cF=re(aF),sF=AM.concat([St("columns","auto")]),fF=re(sF),lF=(dM=[ft("value"),ft("text"),ft("icon")],ue(dM)),dF=[ft("type"),pt("header",ge),pt("cells",Kn(ge))],mF=re(dF),gF=fe(function(){return rt("type",{alertbanner:CM,bar:re(function(n){return[ft("type"),n]}(B_("bar"))),button:OM,checkbox:TM,colorinput:_M,colorpicker:FM,dropzone:RM,grid:re(T_(B_("grid"))),iframe:HM,input:LM,selectbox:WM,sizeinput:YM,textarea:JM,urlinput:ZM,customeditor:oF,htmlpanel:uF,imagetools:cF,collection:fF,label:re(function(n){return[ft("type"),ft("label"),n]}(B_("label"))),table:mF,panel:hF})}),pF=[ft("type"),St("classes",[]),pt("items",gF)],hF=re(pF),vF=[ce("name","name",In(function(){return Xo("tab-name")}),ge),ft("title"),pt("items",gF)],bF=[ft("type"),gt("tabs",vF)],yF=re(bF),xF=re([ft("type"),ft("name"),Tt("active",!1)].concat(Wp)),wF=pe,SF=[ce("name","name",In(function(){return Xo("button-name")}),ge),yt("icon"),Et("align","end",["start","end"]),Tt("primary",!1),Tt("disabled",!1)],CF=g(SF,[ft("text")]),kF=g([lt("type",["submit","cancel","custom"])],CF),OF=g([lt("type",["menu"]),yt("text"),yt("tooltip"),yt("icon"),pt("items",xF),Bt("onSetup",function(){return Z})],SF),EF=CF,TF=it("type",{submit:kF,cancel:kF,custom:kF,menu:OF}),BF=re([ft("title"),st("body",rt("type",{panel:hF,tabpanel:yF})),Ot("size","normal"),pt("buttons",TF),St("initialData",{}),Bt("onAction",Z),Bt("onChange",Z),Bt("onSubmit",Z),Bt("onClose",Z),Bt("onCancel",Z),St("onTabChange",Z)]),DF=function(n){return sn(n)?[n].concat(B(R(n),DF)):fn(n)?B(n,DF):[]},AF={checkbox:BM,colorinput:MM,colorpicker:IM,dropzone:VM,input:jM,iframe:PM,sizeinput:qM,selectbox:GM,size:qM,textarea:$M,urlinput:nF,customeditor:rF,collection:lF,togglemenuitem:wF},_F=re(g([lt("type",["cancel","custom"])],EF)),MF=re([ft("title"),ft("url"),bt("height"),bt("width"),(mM="buttons",gM=_F,vt(mM,Kn(gM))),Bt("onAction",Z),Bt("onCancel",Z),Bt("onClose",Z),Bt("onMessage",Z)]),FF={open:function(n,t){var e=__(t);return n(e.internalDialog,e.initialData,e.dataValidator)},openUrl:function(n,t){return n(et(function(n){return tt("dialog",MF,n)}(t)))},redial:function(n){return __(n)}},IF=Dl({name:"TabButton",configFields:[St("uid",undefined),ct("value"),ce("dom","dom",Rn(function(n){return{attributes:{role:"tab",id:Xo("aria"),"aria-selected":"false"}}}),de()),ht("action"),St("domModification",{}),Fs("tabButtonBehaviours",[vg,lg,Zf]),ct("view")],factory:function(n,t){return{uid:n.uid,dom:n.dom,components:n.components,events:rm(n.action),behaviours:Rs(n.tabButtonBehaviours,[vg.config({}),lg.config({mode:"execution",useSpace:!0,useEnter:!0}),Zf.config({store:{mode:"memory",initialValue:n.value}})]),domModification:n.domModification}}}),RF=nn([ct("tabs"),ct("dom"),St("clickToDismiss",!1),Fs("tabbarBehaviours",[ad,lg]),Xu(["tabClass","selectedClass"])]),VF=Cl({factory:IF,name:"tabs",unit:"tab",overrides:function(o,n){function r(n,t){ad.dehighlight(n,t),ro(n,Ai(),{tabbar:n,button:t})}function i(n,t){ad.highlight(n,t),ro(n,Di(),{tabbar:n,button:t})}return{action:function(n){var t=n.getSystem().getByUid(o.uid).getOrDie(),e=ad.isHighlighted(t,n);(e&&o.clickToDismiss?r:e?Z:i)(t,n)},domModification:{classes:[o.markers.tabClass]}}}}),NF=nn([VF]),HF=Al({name:"Tabbar",configFields:RF(),partFields:NF(),factory:function(n,t,e,o){return{uid:n.uid,dom:n.dom,components:t,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:Rs(n.tabbarBehaviours,[ad.config({highlightClass:n.markers.selectedClass,itemClass:n.markers.tabClass,onHighlight:function(n,t){Po(t.element(),"aria-selected","true")},onDehighlight:function(n,t){Po(t.element(),"aria-selected","false")}}),lg.config({mode:"flow",getInitial:function(n){return ad.getHighlighted(n).map(function(n){return n.element()})},selector:"."+n.markers.tabClass,executeOnMove:!0})])}}}),PF=Dl({name:"Tabview",configFields:[Fs("tabviewBehaviours",[mg])],factory:function(n,t){return{uid:n.uid,dom:n.dom,behaviours:Rs(n.tabviewBehaviours,[mg.config({})]),domModification:{attributes:{role:"tabpanel"}}}}}),zF=nn([St("selectFirst",!0),qu("onChangeTab"),qu("onDismissTab"),St("tabs",[]),Fs("tabSectionBehaviours",[])]),LF=xl({factory:HF,schema:[ct("dom"),mt("markers",[ct("tabClass"),ct("selectedClass")])],name:"tabbar",defaults:function(n){return{tabs:n.tabs}}}),jF=xl({factory:PF,name:"tabview"}),UF=nn([LF,jF]),WF=Al({name:"TabSection",configFields:zF(),partFields:UF(),factory:function(r,n,t,e){function o(n,t){qs(n,r,"tabbar").each(function(n){t(n).each(io)})}return{uid:r.uid,dom:r.dom,components:n,behaviours:Is(r.tabSectionBehaviours),events:co(H([r.selectFirst?[Ii(function(n,t){o(n,ad.getFirst)})]:[],[lo(Di(),function(n,t){!function(o){var t=Zf.getValue(o);qs(o,r,"tabview").each(function(e){E(r.tabs,function(n){return n.value===t}).each(function(n){var t=n.view();Po(e.element(),"aria-labelledby",zo(o.element(),"id")),mg.set(e,t),r.onChangeTab(e,o,t)})})}(t.event().button())}),lo(Ai(),function(n,t){var e=t.event().button();r.onDismissTab(n,e)})]])),apis:{getViewItems:function(n){return qs(n,r,"tabview").map(function(n){return mg.contents(n)}).getOr([])},showTab:function(n,e){o(n,function(t){var n=ad.getCandidates(t);return E(n,function(n){return Zf.getValue(n)===e}).filter(function(n){return!ad.isHighlighted(t,n)})})}}}},apis:{getViewItems:function(n,t){return n.getViewItems(t)},showTab:function(n,t,e){n.showTab(t,e)}}}),GF="send-data-to-section",XF="send-data-to-view",YF=Xo("update-dialog"),qF=Xo("update-title"),KF=Xo("update-body"),JF=Xo("update-footer"),$F=Xo("body-send-message"),QF=function(i,n){function t(n,r){return lo(n,function(e,o){u(e,function(n,t){r(i(),n,o.event(),e)})})}var u=function(t,e){RT.getState(t).get().each(function(n){e(n,t)})};return g(P_(t,n),[t(sy,function(n,t,e){t.onAction(n,{name:e.name()})})])},ZF=function(i,n){function t(n,r){return lo(n,function(e,o){u(e,function(n,t){r(i(),n,o.event(),e)})})}var u=function(t,e){RT.getState(t).get().each(function(n){e(n.internalDialog,t)})};return g(P_(t,n),[t(fy,function(n,t){return t.onSubmit(n)}),t(uy,function(n,t,e){t.onChange(n,{name:e.name()})}),t(sy,function(n,t,e,o){function r(){return lg.focusIn(o)}var i=Sa();t.onAction(n,{name:e.name(),value:e.value()}),Sa().fold(function(){r()},function(n){!Ye(o.element(),n)||Lo(n,"disabled")?r():Ye(n,i.getOrNull())&&Lo(i.getOrDie(),"disabled")&&r()})}),t(my,function(n,t,e){t.onTabChange(n,{newTabName:e.name(),oldTabName:e.oldName()})}),Ri(function(n){var t=i();Zf.setValue(n,t.getData())})])},nI=gh.deviceType.isTouch(),tI=tinymce.util.Tools.resolve("tinymce.util.URI"),eI=["insertContent","setContent","execCommand","close","block","unblock"],oI=function(n){var l=n.backstage,d=n.editor,m=$b(d),e=function(c){var s=c.backstage.shared;return{open:function(n,t){function e(){wM.hide(u),t()}var o=vm(YC({name:"close-alert",text:"OK",primary:!0,align:"end",disabled:!1,icon:on.none()},"cancel",c.backstage)),r=Y_(),i=X_(e,s.providers),u=uu($_({lazySink:function(){return s.getSink()},header:G_(r,i),body:q_(n,s.providers),footer:on.some(K_(J_([],[o.asSpec()]))),onEscape:e,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[lo(cy,e)],eventOrder:{}}));wM.show(u);var a=o.get(u);vg.focus(a)}}}(n),o=function(s){var f=s.backstage.shared;return{open:function(n,t){function e(n){wM.hide(a),t(n)}var o=vm(YC({name:"yes",text:"Yes",primary:!0,align:"end",disabled:!1,icon:on.none()},"submit",s.backstage)),r=YC({name:"no",text:"No",primary:!0,align:"end",disabled:!1,icon:on.none()},"cancel",s.backstage),i=Y_(),u=X_(function(){return e(!1)},f.providers),a=uu($_({lazySink:function(){return f.getSink()},header:G_(i,u),body:q_(n,f.providers),footer:on.some(K_(J_([],[r,o.asSpec()]))),onEscape:function(){return e(!1)},extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[lo(cy,function(){return e(!1)}),lo(fy,function(){return e(!0)})],eventOrder:{}}));wM.show(a);var c=o.get(a);vg.focus(c)}}}(n),r=function(n,e){return FF.openUrl(function(n){var t=sM(n,{closeWindow:function(){wM.hide(t.dialog),e(t.instanceApi)}},d,l);return wM.show(t.dialog),t.instanceApi},n)},i=function(n,i){return FF.open(function(n,t,e){var o=t,r=uM({dataValidator:e,initialData:o,internalDialog:n},{redial:FF.redial,closeWindow:function(){wM.hide(r.dialog),i(r.instanceApi)}},l);return wM.show(r.dialog),r.instanceApi.setData(o),r.instanceApi},n)},u=function(n,c,s,f){return FF.open(function(n,t,e){function o(){return i.on(function(n){cA.refresh(n)})}var r=function(n,t){return et(tt("data",t,n))}(t,e),i=function(){var t=ye(on.none());return{clear:function(){t.set(on.none())},set:function(n){t.set(on.some(n))},isSet:function(){return t.get().isSome()},on:function(n){t.get().each(n)}}}(),u=aM({dataValidator:e,initialData:r,internalDialog:n},{redial:FF.redial,closeWindow:function(){i.on(jg.hide),d.off("ResizeEditor",o),i.clear(),s(u.instanceApi)}},l,f),a=uu(jg.sketch({lazySink:l.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:{},inlineBehaviours:ba(g([Kd("window-manager-inline-events",[lo(Oi(),function(n,t){oo(u.dialog,cy)})])],function(n,t){return t?[]:[cA.config({contextual:{lazyContext:function(){return on.some(xu(we.fromDom(n.getContentAreaContainer())))},fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},leftAttr:"data-dock-left",topAttr:"data-dock-top",positionAttr:"data-dock-pos",modes:["top"]})]}(d,m)))}));return i.set(a),jg.showWithin(a,c,au(u.dialog),on.some(zr())),m||(cA.refresh(a),d.on("ResizeEditor",o)),u.instanceApi.setData(r),lg.focusIn(u.dialog),u.instanceApi},n)};return{open:function(n,t,e){return t!==undefined&&"toolbar"===t.inline?u(n,l.shared.anchors.toolbar(),e,t.ariaAttrs):t!==undefined&&"cursor"===t.inline?u(n,l.shared.anchors.cursor(),e,t.ariaAttrs):i(n,e)},openUrl:function(n,t){return r(n,t)},alert:function(n,t){e.open(n,function(){t()})},close:function(n){n.close()},confirm:function(n,t){o.open(n,function(n){t(n)})}}};!function mI(){n.add("silver",function(n){var t=hM(n),e=t.uiMothership,o=t.backstage,r=t.renderUI,i=t.getUi;db(n,o.shared);var u=oI({editor:n,backstage:o});return{renderUI:r,getWindowManagerImpl:nn(u),getNotificationManagerImpl:function(){return Kg(0,{backstage:o},e)},ui:i()}})}()}(window);
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.1.4 (2019-12-11)
7
+ * Version: 5.1.5 (2019-12-19)
8
8
  */
9
- !function(j){"use strict";function i(){}var q=function(n,r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n(r.apply(null,e))}},$=function(e){return function(){return e}},W=function(e){return e};function d(r){for(var o=[],e=1;e<arguments.length;e++)o[e-1]=arguments[e];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=o.concat(e);return r.apply(null,n)}}function s(n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return!n.apply(null,e)}}function e(){return u}var t,c=$(!1),a=$(!0),u=(t={fold:function(e,t){return e()},is:c,isSome:c,isNone:a,getOr:o,getOrThunk:r,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:$(null),getOrUndefined:$(undefined),or:o,orThunk:r,map:e,each:i,bind:e,exists:c,forall:a,filter:e,equals:n,equals_:n,toArray:function(){return[]},toString:$("none()")},Object.freeze&&Object.freeze(t),t);function n(e){return e.isNone()}function r(e){return e()}function o(e){return e}function l(t){return function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"==t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t}(e)===t}}function f(e,t){return O.call(e,t)}function h(e,t){return-1<f(e,t)}function C(e,t){for(var n=0,r=e.length;n<r;n++){if(t(e[n],n))return!0}return!1}function z(e,t){for(var n=0,r=e.length;n<r;n++){t(e[n],n)}}function y(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r)&&n.push(i)}return n}function m(e,t,n){return function(e,t){for(var n=e.length-1;0<=n;n--){t(e[n],n)}}(e,function(e){n=t(n,e)}),n}function b(e,t,n){return z(e,function(e){n=t(n,e)}),n}function g(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n))return k.some(o)}return k.none()}function p(e,t){for(var n=0,r=e.length;n<r;n++){if(t(e[n],n))return k.some(n)}return k.none()}function v(e,t){return function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!A(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);H.apply(t,e[n])}return t}(X(e,t))}function w(e,t){for(var n=0,r=e.length;n<r;++n){if(!0!==t(e[n],n))return!1}return!0}function x(e,t){return y(e,function(e){return!h(t,e)})}function E(e){return 0===e.length?k.none():k.some(e[0])}function N(e){return 0===e.length?k.none():k.some(e[e.length-1])}var S=function(n){function e(){return o}function t(e){return e(n)}var r=$(n),o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:a,isNone:c,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:e,orThunk:e,map:function(e){return S(e(n))},each:function(e){e(n)},bind:t,exists:t,forall:t,filter:function(e){return e(n)?o:u},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(c,function(e){return t(n,e)})}};return o},k={some:S,none:e,from:function(e){return null===e||e===undefined?u:S(e)}},K=l("string"),T=l("object"),A=l("array"),M=l("null"),R=l("boolean"),D=l("function"),_=l("number"),B=Array.prototype.slice,O=Array.prototype.indexOf,H=Array.prototype.push,X=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o)}return r},Y=function(e,t){for(var n=[],r=[],o=0,i=e.length;o<i;o++){var a=e[o];(t(a,o)?n:r).push(a)}return{pass:n,fail:r}},P=D(Array.from)?Array.from:function(e){return B.call(e)},G=function(){return(G=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function L(t){return function(e){return!!e&&e.nodeType===t}}function V(e){var n=e.map(function(e){return e.toLowerCase()});return function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();return h(n,t)}return!1}}function I(t){return function(e){if(Fe(e)){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}return!1}}function F(e,t){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}return undefined}(e,t);if(!n)return{major:0,minor:0};function r(e){return Number(t.replace(n,"$"+e))}return Ze(r(1),r(2))}function U(e,t){return function(){return t===e}}function J(e,t){return function(){return t===e}}function Q(e,t){var n=String(t).toLowerCase();return g(e,function(e){return e.search(n)})}function Z(e,t){return-1!==e.indexOf(t)}function ee(e,t){return function(e,t,n){return""===t||!(e.length<t.length)&&e.substr(n,n+t.length)===t}(e,t,0)}function te(e){return e.replace(/^\s+|\s+$/g,"")}function ne(e){return e.replace(/\s+$/g,"")}function re(t){return function(e){return Z(e,t)}}function oe(){return pt.get()}function ie(e){return e.dom().nodeName.toLowerCase()}function ae(t){return function(e){return function(e){return e.dom().nodeType}(e)===t}}function ue(e,t){for(var n=Et(e),r=0,o=n.length;r<o;r++){var i=n[r];t(e[i],i)}}function se(e,n){return St(e,function(e,t){return{k:t,v:n(e,t)}})}function ce(e,n){var r={},o={};return ue(e,function(e,t){(n(e,t)?r:o)[t]=e}),{t:r,f:o}}function le(e,t){return kt(e,t)?k.from(e[t]):k.none()}function fe(e){return e.style!==undefined&&D(e.style.getPropertyValue)}function de(e){var t=zt(e)?e.dom().parentNode:e.dom();return t!==undefined&&null!==t&&t.ownerDocument.body.contains(t)}function he(e,t,n){if(!(K(n)||R(n)||_(n)))throw j.console.error("Invalid call to Attr.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")}function me(e,t){var n=e.dom();ue(t,function(e,t){he(n,t,e)})}function ge(e,t){var n=e.dom().getAttribute(t);return null===n?undefined:n}function pe(e,t){e.dom().removeAttribute(t)}function ve(e,t){var n=e.dom(),r=j.window.getComputedStyle(n).getPropertyValue(t),o=""!==r||de(e)?r:At(n,t);return null===o?undefined:o}function ye(e,t){var n=e.dom(),r=At(n,t);return k.from(r).filter(function(e){return 0<e.length})}function be(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];if(t.length!==n.length)throw new Error('Wrong number of arguments to struct. Expected "['+t.length+']", got '+n.length+" arguments");var r={};return z(t,function(e,t){r[e]=$(n[t])}),r}}function Ce(e,t,n){return 0!=(e.compareDocumentPosition(t)&n)}function we(e,t){var n=e.dom();if(n.nodeType!==Dt)return!1;var r=n;if(r.matches!==undefined)return r.matches(t);if(r.msMatchesSelector!==undefined)return r.msMatchesSelector(t);if(r.webkitMatchesSelector!==undefined)return r.webkitMatchesSelector(t);if(r.mozMatchesSelector!==undefined)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}function xe(e){return e.nodeType!==Dt&&e.nodeType!==_t||0===e.childElementCount}function ze(e,t){return e.dom()===t.dom()}function Ee(e){return yt.fromDom(e.dom().ownerDocument)}function Ne(e){return yt.fromDom(e.dom().ownerDocument.defaultView)}function Se(e){return k.from(e.dom().parentNode).map(yt.fromDom)}function ke(e){return k.from(e.dom().previousSibling).map(yt.fromDom)}function Te(e){return k.from(e.dom().nextSibling).map(yt.fromDom)}function Ae(e){return function(e){var t=B.call(e,0);return t.reverse(),t}(Mt(e,ke))}function Me(e){return Mt(e,Te)}function Re(e){return X(e.dom().childNodes,yt.fromDom)}function De(e,t){var n=e.dom().childNodes;return k.from(n[t]).map(yt.fromDom)}function _e(e){return De(e,0)}function Be(e){return De(e,e.dom().childNodes.length-1)}function Oe(e){return g(e,xt)}function He(e,t){return e.children&&h(e.children,t)}var Pe,Le,Ve,Ie,Fe=L(1),Ue=V(["textarea","input"]),je=L(3),qe=L(8),$e=L(9),We=L(11),Ke=V(["br"]),Xe=I("true"),Ye=I("false"),Ge={isText:je,isElement:Fe,isComment:qe,isDocument:$e,isDocumentFragment:We,isBr:Ke,isContentEditableTrue:Xe,isContentEditableFalse:Ye,isRestrictedNode:function(e){return!!e&&!Object.getPrototypeOf(e)},matchNodeNames:V,hasPropValue:function(t,n){return function(e){return Fe(e)&&e[t]===n}},hasAttribute:function(t,e){return function(e){return Fe(e)&&e.hasAttribute(t)}},hasAttributeValue:function(t,n){return function(e){return Fe(e)&&e.getAttribute(t)===n}},matchStyleValues:function(r,e){var o=e.toLowerCase().split(" ");return function(e){var t;if(Fe(e))for(t=0;t<o.length;t++){var n=e.ownerDocument.defaultView.getComputedStyle(e,null);if((n?n.getPropertyValue(r):null)===o[t])return!0}return!1}},isBogus:function(e){return Fe(e)&&e.hasAttribute("data-mce-bogus")},isBogusAll:function(e){return Fe(e)&&"all"===e.getAttribute("data-mce-bogus")},isTable:function(e){return Fe(e)&&"TABLE"===e.tagName},isTextareaOrInput:Ue},Je=function(e){function t(){return n}var n=e;return{get:t,set:function(e){n=e},clone:function(){return Je(t())}}},Qe=function(){return Ze(0,0)},Ze=function(e,t){return{major:e,minor:t}},et={nu:Ze,detect:function(e,t){var n=String(t).toLowerCase();return 0===e.length?Qe():F(e,n)},unknown:Qe},tt="Firefox",nt=function(e){var t=e.current;return{current:t,version:e.version,isEdge:U("Edge",t),isChrome:U("Chrome",t),isIE:U("IE",t),isOpera:U("Opera",t),isFirefox:U(tt,t),isSafari:U("Safari",t)}},rt={unknown:function(){return nt({current:undefined,version:et.unknown()})},nu:nt,edge:$("Edge"),chrome:$("Chrome"),ie:$("IE"),opera:$("Opera"),firefox:$(tt),safari:$("Safari")},ot="Windows",it="Android",at="Solaris",ut="FreeBSD",st=function(e){var t=e.current;return{current:t,version:e.version,isWindows:J(ot,t),isiOS:J("iOS",t),isAndroid:J(it,t),isOSX:J("OSX",t),isLinux:J("Linux",t),isSolaris:J(at,t),isFreeBSD:J(ut,t)}},ct={unknown:function(){return st({current:undefined,version:et.unknown()})},nu:st,windows:$(ot),ios:$("iOS"),android:$(it),linux:$("Linux"),osx:$("OSX"),solaris:$(at),freebsd:$(ut)},lt=function(e,n){return Q(e,n).map(function(e){var t=et.detect(e.versionRegexes,n);return{current:e.name,version:t}})},ft=function(e,n){return Q(e,n).map(function(e){var t=et.detect(e.versionRegexes,n);return{current:e.name,version:t}})},dt=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,ht=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return Z(e,"edge/")&&Z(e,"chrome")&&Z(e,"safari")&&Z(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,dt],search:function(e){return Z(e,"chrome")&&!Z(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return Z(e,"msie")||Z(e,"trident")}},{name:"Opera",versionRegexes:[dt,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:re("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:re("firefox")},{name:"Safari",versionRegexes:[dt,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(Z(e,"safari")||Z(e,"mobile/"))&&Z(e,"applewebkit")}}],mt=[{name:"Windows",search:re("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return Z(e,"iphone")||Z(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:re("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:re("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:re("linux"),versionRegexes:[]},{name:"Solaris",search:re("sunos"),versionRegexes:[]},{name:"FreeBSD",search:re("freebsd"),versionRegexes:[]}],gt={browsers:$(ht),oses:$(mt)},pt=Je(function(e,t){var n=gt.browsers(),r=gt.oses(),o=lt(n,e).fold(rt.unknown,rt.nu),i=ft(r,e).fold(ct.unknown,ct.nu);return{browser:o,os:i,deviceType:function(e,t,n,r){var o=e.isiOS()&&!0===/ipad/i.test(n),i=e.isiOS()&&!o,a=e.isiOS()||e.isAndroid(),u=a||r("(pointer:coarse)"),s=o||!i&&a&&r("(min-device-width:768px)"),c=i||a&&!s,l=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(n),f=!c&&!s&&!l;return{isiPad:$(o),isiPhone:$(i),isTablet:$(s),isPhone:$(c),isTouch:$(u),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:$(l),isDesktop:$(f)}}(i,o,e,t)}}(j.navigator.userAgent,function(e){return j.window.matchMedia(e).matches})),vt=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:$(e)}},yt={fromHtml:function(e,t){var n=(t||j.document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw j.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return vt(n.childNodes[0])},fromTag:function(e,t){var n=(t||j.document).createElement(e);return vt(n)},fromText:function(e,t){var n=(t||j.document).createTextNode(e);return vt(n)},fromDom:vt,fromPoint:function(e,t,n){var r=e.dom();return k.from(r.elementFromPoint(t,n)).map(vt)}},bt=(j.Node.ATTRIBUTE_NODE,j.Node.CDATA_SECTION_NODE,j.Node.COMMENT_NODE,j.Node.DOCUMENT_NODE),Ct=(j.Node.DOCUMENT_TYPE_NODE,j.Node.DOCUMENT_FRAGMENT_NODE,j.Node.ELEMENT_NODE),wt=j.Node.TEXT_NODE,xt=(j.Node.PROCESSING_INSTRUCTION_NODE,j.Node.ENTITY_REFERENCE_NODE,j.Node.ENTITY_NODE,j.Node.NOTATION_NODE,"undefined"!=typeof j.window?j.window:Function("return this;")(),ae(Ct)),zt=ae(wt),Et=Object.keys,Nt=Object.hasOwnProperty,St=function(e,r){var o={};return ue(e,function(e,t){var n=r(e,t);o[n.k]=n.v}),o},kt=function(e,t){return Nt.call(e,t)},Tt=function(e,t,n){he(e.dom(),t,n)},At=function(e,t){return fe(e)?e.style.getPropertyValue(t):""},Mt=function(e,t){for(var n=[],r=function(e){return n.push(e),t(e)},o=t(e);(o=o.bind(r)).isSome(););return n},Rt=function(e,t){return Ce(e,t,j.Node.DOCUMENT_POSITION_CONTAINED_BY)},Dt=Ct,_t=bt,Bt=oe().browser.isIE()?function(e,t){return Rt(e.dom(),t.dom())}:function(e,t){var n=e.dom(),r=t.dom();return n!==r&&n.contains(r)},Ot=(be("element","offset"),oe().browser),Ht={getPos:function(e,t,n){var r,o,i=0,a=0,u=e.ownerDocument;if(n=n||e,t){if(n===e&&t.getBoundingClientRect&&"static"===ve(yt.fromDom(e),"position"))return{x:i=(o=t.getBoundingClientRect()).left+(u.documentElement.scrollLeft||e.scrollLeft)-u.documentElement.clientLeft,y:a=o.top+(u.documentElement.scrollTop||e.scrollTop)-u.documentElement.clientTop};for(r=t;r&&r!==n&&r.nodeType&&!He(r,n);)i+=r.offsetLeft||0,a+=r.offsetTop||0,r=r.offsetParent;for(r=t.parentNode;r&&r!==n&&r.nodeType&&!He(r,n);)i-=r.scrollLeft||0,a-=r.scrollTop||0,r=r.parentNode;a+=function(e){return Ot.isFirefox()&&"table"===ie(e)?Oe(Re(e)).filter(function(e){return"caption"===ie(e)}).bind(function(o){return Oe(Me(o)).map(function(e){var t=e.dom().offsetTop,n=o.dom().offsetTop,r=o.dom().offsetHeight;return t<=n?-r:0})}).getOr(0):0}(yt.fromDom(t))}return{x:i,y:a}}},Pt={},Lt={exports:Pt};Pe=undefined,Le=Pt,Ve=Lt,Ie=undefined,function(e){"object"==typeof Le&&void 0!==Ve?Ve.exports=e():"function"==typeof Pe&&Pe.amd?Pe([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EphoxContactWrapper=e()}(function(){return function l(i,a,u){function s(t,e){if(!a[t]){if(!i[t]){var n="function"==typeof Ie&&Ie;if(!e&&n)return n(t,!0);if(c)return c(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var o=a[t]={exports:{}};i[t][0].call(o.exports,function(e){return s(i[t][1][e]||e)},o,o.exports,l,i,a,u)}return a[t].exports}for(var c="function"==typeof Ie&&Ie,e=0;e<u.length;e++)s(u[e]);return s}({1:[function(e,t,n){var r,o,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{o="function"==typeof clearTimeout?clearTimeout:u}catch(e){o=u}}();var c,l=[],f=!1,d=-1;function h(){f&&c&&(f=!1,c.length?l=c.concat(l):d=-1,l.length&&m())}function m(){if(!f){var e=s(h);f=!0;for(var t=l.length;t;){for(c=l,l=[];++d<t;)c&&c[d].run();d=-1,t=l.length}c=null,f=!1,function n(e){if(o===clearTimeout)return clearTimeout(e);if((o===u||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{return o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new g(e,t)),1!==l.length||f||s(m)},g.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],2:[function(e,f,t){(function(t){function r(){}function i(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],l(e,this)}function o(r,o){for(;3===r._state;)r=r._value;0!==r._state?(r._handled=!0,i._immediateFn(function(){var e=1===r._state?o.onFulfilled:o.onRejected;if(null!==e){var t;try{t=e(r._value)}catch(n){return void u(o.promise,n)}a(o.promise,t)}else(1===r._state?a:u)(o.promise,r._value)})):r._deferreds.push(o)}function a(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof i)return e._state=3,e._value=t,void s(e);if("function"==typeof n)return void l(function r(e,t){return function(){e.apply(t,arguments)}}(n,t),e)}e._state=1,e._value=t,s(e)}catch(o){u(e,o)}}function u(e,t){e._state=2,e._value=t,s(e)}function s(e){2===e._state&&0===e._deferreds.length&&i._immediateFn(function(){e._handled||i._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)o(e,e._deferreds[t]);e._deferreds=null}function c(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function l(e,t){var n=!1;try{e(function(e){n||(n=!0,a(t,e))},function(e){n||(n=!0,u(t,e))})}catch(r){if(n)return;n=!0,u(t,r)}}var e,n;e=this,n=setTimeout,i.prototype["catch"]=function(e){return this.then(null,e)},i.prototype.then=function(e,t){var n=new this.constructor(r);return o(this,new c(e,t,n)),n},i.all=function(e){var s=Array.prototype.slice.call(e);return new i(function(o,i){if(0===s.length)return o([]);var a=s.length;function u(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){u(t,e)},i)}s[t]=e,0==--a&&o(s)}catch(r){i(r)}}for(var e=0;e<s.length;e++)u(e,s[e])})},i.resolve=function(t){return t&&"object"==typeof t&&t.constructor===i?t:new i(function(e){e(t)})},i.reject=function(n){return new i(function(e,t){t(n)})},i.race=function(o){return new i(function(e,t){for(var n=0,r=o.length;n<r;n++)o[n].then(e,t)})},i._immediateFn="function"==typeof t?function(e){t(e)}:function(e){n(e,0)},i._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},i._setImmediateFn=function(e){i._immediateFn=e},i._setUnhandledRejectionFn=function(e){i._unhandledRejectionFn=e},void 0!==f&&f.exports?f.exports=i:e.Promise||(e.Promise=i)}).call(this,e("timers").setImmediate)},{timers:3}],3:[function(s,e,c){(function(e,t){var r=s("process/browser.js").nextTick,n=Function.prototype.apply,o=Array.prototype.slice,i={},a=0;function u(e,t){this._id=e,this._clearFn=t}c.setTimeout=function(){return new u(n.call(setTimeout,window,arguments),clearTimeout)},c.setInterval=function(){return new u(n.call(setInterval,window,arguments),clearInterval)},c.clearTimeout=c.clearInterval=function(e){e.close()},u.prototype.unref=u.prototype.ref=function(){},u.prototype.close=function(){this._clearFn.call(window,this._id)},c.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},c.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},c._unrefActive=c.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},c.setImmediate="function"==typeof e?e:function(e){var t=a++,n=!(arguments.length<2)&&o.call(arguments,1);return i[t]=!0,r(function(){i[t]&&(n?e.apply(null,n):e.call(null),c.clearImmediate(t))}),t},c.clearImmediate="function"==typeof t?t:function(e){delete i[e]}}).call(this,s("timers").setImmediate,s("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(e,t,n){var r=e("promise-polyfill"),o="undefined"!=typeof window?window:Function("return this;")();t.exports={boltExport:o.Promise||r}},{"promise-polyfill":2}]},{},[4])(4)});function Vt(e){j.setTimeout(function(){throw e},0)}function It(i,e){return e(function(n){var r=[],o=0;0===i.length?n([]):z(i,function(e,t){e.get(function(t){return function(e){r[t]=e,++o>=i.length&&n(r)}}(t))})})}var Ft,Ut,jt,qt=Lt.exports.boltExport,$t=function(e){var n=k.none(),t=[],r=function(e){o()?a(e):t.push(e)},o=function(){return n.isSome()},i=function(e){z(e,a)},a=function(t){n.each(function(e){j.setTimeout(function(){t(e)},0)})};return e(function(e){n=k.some(e),i(t),t=[]}),{get:r,map:function(n){return $t(function(t){r(function(e){t(n(e))})})},isReady:o}},Wt={nu:$t,pure:function(t){return $t(function(e){e(t)})}},Kt=function(n){function e(e){n().then(e,Vt)}return{map:function(e){return Kt(function(){return n().then(e)})},bind:function(t){return Kt(function(){return n().then(function(e){return t(e).toPromise()})})},anonBind:function(e){return Kt(function(){return n().then(function(){return e.toPromise()})})},toLazy:function(){return Wt.nu(e)},toCached:function(){var e=null;return Kt(function(){return null===e&&(e=n()),e})},toPromise:n,get:e}},Xt={nu:function(e){return Kt(function(){return new qt(e)})},pure:function(e){return Kt(function(){return qt.resolve(e)})}},Yt=function(e){return It(e,Xt.nu)},Gt=function(n){return{is:function(e){return n===e},isValue:a,isError:c,getOr:$(n),getOrThunk:$(n),getOrDie:$(n),or:function(e){return Gt(n)},orThunk:function(e){return Gt(n)},fold:function(e,t){return t(n)},map:function(e){return Gt(e(n))},mapError:function(e){return Gt(n)},each:function(e){e(n)},bind:function(e){return e(n)},exists:function(e){return e(n)},forall:function(e){return e(n)},toOption:function(){return k.some(n)}}},Jt=function(n){return{is:c,isValue:c,isError:a,getOr:W,getOrThunk:function(e){return e()},getOrDie:function(){return function(e){return function(){throw new Error(e)}}(String(n))()},or:function(e){return e},orThunk:function(e){return e()},fold:function(e,t){return e(n)},map:function(e){return Jt(n)},mapError:function(e){return Jt(e(n))},each:i,bind:function(e){return Jt(n)},exists:c,forall:a,toOption:k.none}},Qt={value:Gt,error:Jt,fromOption:function(e,t){return e.fold(function(){return Jt(t)},Gt)}},Zt=window.Promise?window.Promise:(Ft=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},Ut=tn.immediateFn||"function"==typeof j.setImmediate&&j.setImmediate||function(e){j.setTimeout(e,1)},tn.prototype["catch"]=function(e){return this.then(null,e)},tn.prototype.then=function(n,r){var o=this;return new tn(function(e,t){nn.call(o,new un(n,r,e,t))})},tn.all=function(){var s=Array.prototype.slice.call(1===arguments.length&&Ft(arguments[0])?arguments[0]:arguments);return new tn(function(o,i){if(0===s.length)return o([]);var a=s.length;function u(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){u(t,e)},i)}s[t]=e,0==--a&&o(s)}catch(r){i(r)}}for(var e=0;e<s.length;e++)u(e,s[e])})},tn.resolve=function(t){return t&&"object"==typeof t&&t.constructor===tn?t:new tn(function(e){e(t)})},tn.reject=function(n){return new tn(function(e,t){t(n)})},tn.race=function(o){return new tn(function(e,t){for(var n=0,r=o.length;n<r;n++)o[n].then(e,t)})},tn);function en(e,t){return function(){e.apply(t,arguments)}}function tn(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],sn(e,en(rn,this),en(on,this))}function nn(r){var o=this;null!==this._state?Ut(function(){var e=o._state?r.onFulfilled:r.onRejected;if(null!==e){var t;try{t=e(o._value)}catch(n){return void r.reject(n)}r.resolve(t)}else(o._state?r.resolve:r.reject)(o._value)}):this._deferreds.push(r)}function rn(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void sn(en(t,e),en(rn,this),en(on,this))}this._state=!0,this._value=e,an.call(this)}catch(n){on.call(this,n)}}function on(e){this._state=!1,this._value=e,an.call(this)}function an(){for(var e=0,t=this._deferreds.length;e<t;e++)nn.call(this,this._deferreds[e]);this._deferreds=null}function un(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 sn(e,t,n){var r=!1;try{e(function(e){r||(r=!0,t(e))},function(e){r||(r=!0,n(e))})}catch(o){if(r)return;r=!0,n(o)}}function cn(e,t){return"number"!=typeof t&&(t=0),j.setTimeout(e,t)}function ln(e,t){return"number"!=typeof t&&(t=1),j.setInterval(e,t)}function fn(n,r){var o,e;return(e=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];j.clearTimeout(o),o=cn(function(){n.apply(this,e)},r)}).stop=function(){j.clearTimeout(o)},e}function dn(e,t,n){var r,o;if(!e)return 0;if(n=n||e,e.length!==undefined){for(r=0,o=e.length;r<o;r++)if(!1===t.call(n,e[r],r,e))return 0}else for(r in e)if(e.hasOwnProperty(r)&&!1===t.call(n,e[r],r,e))return 0;return 1}function hn(e,t,n){var r,o;for(r=0,o=e.length;r<o;r++)if(t.call(n,e[r],r,e))return r;return-1}function mn(e){return null===e||e===undefined?"":(""+e).replace(Tn,"")}function gn(e,t){return t?!("array"!==t||!kn.isArray(e))||typeof e===t:e!==undefined}var pn={requestAnimationFrame:function(e,t){jt?jt.then(e):jt=new Zt(function(e){!function(e,t){var n,r=j.window.requestAnimationFrame,o=["ms","moz","webkit"];for(n=0;n<o.length&&!r;n++)r=j.window[o[n]+"RequestAnimationFrame"];(r=r||function(e){j.window.setTimeout(e,0)})(e,t)}(e,t=t||j.document.body)}).then(e)},setTimeout:cn,setInterval:ln,setEditorTimeout:function(e,t,n){return cn(function(){e.removed||t()},n)},setEditorInterval:function(e,t,n){var r;return r=ln(function(){e.removed?j.clearInterval(r):t()},n)},debounce:fn,throttle:fn,clearInterval:function(e){return j.clearInterval(e)},clearTimeout:function(e){return j.clearTimeout(e)}},vn=j.navigator.userAgent,yn=oe(),bn=yn.browser,Cn=yn.os,wn=yn.deviceType,xn=/WebKit/.test(vn)&&!bn.isEdge(),zn="FormData"in j.window&&"FileReader"in j.window&&"URL"in j.window&&!!j.URL.createObjectURL,En=-1!==vn.indexOf("Windows Phone"),Nn={opera:bn.isOpera(),webkit:xn,ie:!(!bn.isIE()&&!bn.isEdge())&&bn.version.major,gecko:bn.isFirefox(),mac:Cn.isOSX()||Cn.isiOS(),iOS:wn.isiPad()||wn.isiPhone(),android:Cn.isAndroid(),contentEditable:!0,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:!0,range:j.window.getSelection&&"Range"in j.window,documentMode:bn.isIE()?j.document.documentMode||7:10,fileApi:zn,ceFalse:!0,cacheSuffix:null,container:null,experimentalShadowDom:!1,canHaveCSP:!bn.isIE(),desktop:wn.isDesktop(),windowsPhone:En,browser:{current:bn.current,version:bn.version,isChrome:bn.isChrome,isEdge:bn.isEdge,isFirefox:bn.isFirefox,isIE:bn.isIE,isOpera:bn.isOpera,isSafari:bn.isSafari},os:{current:Cn.current,version:Cn.version,isAndroid:Cn.isAndroid,isFreeBSD:Cn.isFreeBSD,isiOS:Cn.isiOS,isLinux:Cn.isLinux,isOSX:Cn.isOSX,isSolaris:Cn.isSolaris,isWindows:Cn.isWindows},deviceType:{isDesktop:wn.isDesktop,isiPad:wn.isiPad,isiPhone:wn.isiPhone,isPhone:wn.isPhone,isTablet:wn.isTablet,isTouch:wn.isTouch,isWebView:wn.isWebView}},Sn=Array.isArray,kn={isArray:Sn,toArray:function(e){var t,n,r=e;if(!Sn(e))for(r=[],t=0,n=e.length;t<n;t++)r[t]=e[t];return r},each:dn,map:function(n,r){var o=[];return dn(n,function(e,t){o.push(r(e,t,n))}),o},filter:function(n,r){var o=[];return dn(n,function(e,t){r&&!r(e,t,n)||o.push(e)}),o},indexOf:function(e,t){var n,r;if(e)for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},reduce:function(e,t,n,r){var o=0;for(arguments.length<3&&(n=e[0]);o<e.length;o++)n=t.call(r,n,e[o],o);return n},findIndex:hn,find:function(e,t,n){var r=hn(e,t,n);return-1!==r?e[r]:undefined},last:function(e){return e[e.length-1]}},Tn=/^\s*|\s*$/g,An=function(e,n,r,o){o=o||this,e&&(r&&(e=e[r]),kn.each(e,function(e,t){if(!1===n.call(o,e,t,r))return!1;An(e,n,r,o)}))},Mn={trim:mn,isArray:kn.isArray,is:gn,toArray:kn.toArray,makeMap:function(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},each:kn.each,map:kn.map,grep:kn.filter,inArray:kn.indexOf,hasOwn:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},extend:function(e,t){for(var n,r,o,i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var u,s=arguments;for(n=1,r=s.length;n<r;n++)for(o in t=s[n])t.hasOwnProperty(o)&&(u=t[o])!==undefined&&(e[o]=u);return e},create:function(e,t,n){var r,o,i,a,u,s=this,c=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),i=e[3].match(/(^|\.)(\w+)$/i)[2],!(o=s.createNS(e[3].replace(/\.\w+$/,""),n))[i]){if("static"===e[2])return o[i]=t,void(this.onCreate&&this.onCreate(e[2],e[3],o[i]));t[i]||(t[i]=function(){},c=1),o[i]=t[i],s.extend(o[i].prototype,t),e[5]&&(r=s.resolve(e[5]).prototype,a=e[5].match(/\.(\w+)$/i)[1],u=o[i],o[i]=c?function(){return r[a].apply(this,arguments)}:function(){return this.parent=r[a],u.apply(this,arguments)},o[i].prototype[i]=o[i],s.each(r,function(e,t){o[i].prototype[t]=r[t]}),s.each(t,function(e,t){r[t]?o[i].prototype[t]=function(){return this.parent=r[t],e.apply(this,arguments)}:t!==i&&(o[i].prototype[t]=e)})),s.each(t["static"],function(e,t){o[i][t]=e})}},walk:An,createNS:function(e,t){var n,r;for(t=t||j.window,e=e.split("."),n=0;n<e.length;n++)t[r=e[n]]||(t[r]={}),t=t[r];return t},resolve:function(e,t){var n,r;for(t=t||j.window,n=0,r=(e=e.split(".")).length;n<r&&(t=t[e[n]]);n++);return t},explode:function(e,t){return!e||gn(e,"array")?e:kn.map(e.split(t||","),mn)},_addCacheSuffix:function(e){var t=Nn.cacheSuffix;return t&&(e+=(-1===e.indexOf("?")?"?":"&")+t),e}};function Rn(t){var n;return function(e){return(n=n||function(e,t){for(var n={},r=0,o=e.length;r<o;r++){var i=e[r];n[String(i)]=t(i,r)}return n}(t,$(!0))).hasOwnProperty(ie(e))}}function Dn(e){return xt(e)&&!Vn(e)}function _n(e){return xt(e)&&"br"===ie(e)}function Bn(e){return e&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")}var On,Hn,Pn,Ln=Rn(["h1","h2","h3","h4","h5","h6"]),Vn=Rn(["article","aside","details","div","dt","figcaption","footer","form","fieldset","header","hgroup","html","main","nav","section","summary","body","p","dl","multicol","dd","figure","address","center","blockquote","h1","h2","h3","h4","h5","h6","listing","xmp","pre","plaintext","menu","dir","ul","ol","li","hr","table","tbody","thead","tfoot","th","tr","td","caption"]),In=Rn(["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"]),Fn=Rn(["ul","ol","dl"]),Un=Rn(["li","dd","dt"]),jn=Rn(["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param","embed","source","wbr","track"]),qn=Rn(["thead","tbody","tfoot"]),$n=Rn(["td","th"]),Wn=Rn(["pre","script","textarea","style"]),Kn=function(e,t){var n,r=t.childNodes;if(!Ge.isElement(t)||!Bn(t)){for(n=r.length-1;0<=n;n--)Kn(e,r[n]);if(!1===Ge.isDocument(t)){if(Ge.isText(t)&&0<t.nodeValue.length){var o=Mn.trim(t.nodeValue).length;if(e.isBlock(t.parentNode)||0<o)return;if(0===o&&function(e){var t=e.previousSibling&&"SPAN"===e.previousSibling.nodeName,n=e.nextSibling&&"SPAN"===e.nextSibling.nodeName;return t&&n}(t))return}else if(Ge.isElement(t)&&(1===(r=t.childNodes).length&&Bn(r[0])&&t.parentNode.insertBefore(r[0],t),r.length||jn(yt.fromDom(t))))return;e.remove(t)}return t}},Xn={trimNode:Kn},Yn=Mn.makeMap,Gn=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Jn=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Qn=/[<>&\"\']/g,Zn=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,er={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"};Hn={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},Pn={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"};function tr(e,t){var n,r,o,i={};if(e){for(e=e.split(","),t=t||10,n=0;n<e.length;n+=2)r=String.fromCharCode(parseInt(e[n],t)),Hn[r]||(o="&"+e[n+1]+";",i[r]=o,i[o]=r);return i}}On=tr("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);function nr(e,t){return e.replace(t?Gn:Jn,function(e){return Hn[e]||e})}function rr(e,t){return e.replace(t?Gn:Jn,function(e){return 1<e.length?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":Hn[e]||"&#"+e.charCodeAt(0)+";"})}function or(e,t,n){return n=n||On,e.replace(t?Gn:Jn,function(e){return Hn[e]||n[e]||e})}var ir={encodeRaw:nr,encodeAllRaw:function(e){return(""+e).replace(Qn,function(e){return Hn[e]||e})},encodeNumeric:rr,encodeNamed:or,getEncodeFunc:function(e,t){var n=tr(t)||On,r=Yn(e.replace(/\+/g,","));return r.named&&r.numeric?function(e,t){return e.replace(t?Gn:Jn,function(e){return Hn[e]!==undefined?Hn[e]:n[e]!==undefined?n[e]:1<e.length?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":"&#"+e.charCodeAt(0)+";"})}:r.named?t?function(e,t){return or(e,t,n)}:or:r.numeric?rr:nr},decode:function(e){return e.replace(Zn,function(e,t){return t?65535<(t="x"===t.charAt(0).toLowerCase()?parseInt(t.substr(1),16):parseInt(t,10))?(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))):er[t]||String.fromCharCode(t):Pn[e]||On[e]||function(e){var t;return(t=yt.fromTag("div").dom()).innerHTML=e,t.textContent||t.innerText||e}(e)})}},ar={},ur={},sr=Mn.makeMap,cr=Mn.each,lr=Mn.extend,fr=Mn.explode,dr=Mn.inArray,hr=function(e,t){return(e=Mn.trim(e))?e.split(t||" "):[]},mr=function(e){function t(e,t,n){function r(e,t){var n,r,o={};for(n=0,r=e.length;n<r;n++)o[e[n]]=t||{};return o}var o,i,a;for(t=t||"","string"==typeof(n=n||[])&&(n=hr(n)),o=(e=hr(e)).length;o--;)a={attributes:r(i=hr([u,t].join(" "))),attributesOrder:i,children:r(n,ur)},c[e[o]]=a}function n(e,t){var n,r,o,i;for(n=(e=hr(e)).length,t=hr(t);n--;)for(r=c[e[n]],o=0,i=t.length;o<i;o++)r.attributes[t[o]]={},r.attributesOrder.push(t[o])}var u,r,o,i,a,s,c={};return ar[e]?ar[e]:(u="id accesskey class dir lang style tabindex title role",r="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",o="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&&(u+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",r+=" article aside details dialog figure main header footer hgroup section nav",o+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),"html5-strict"!==e&&(u+=" xml:lang",o=[o,s="acronym applet basefont big font strike tt"].join(" "),cr(hr(s),function(e){t(e,"",o)}),r=[r,a="center dir isindex noframes"].join(" "),i=[r,o].join(" "),cr(hr(a),function(e){t(e,"",i)})),i=i||[r,o].join(" "),t("html","manifest","head body"),t("head","","base command link meta noscript script style title"),t("title hr noscript br"),t("base","href target"),t("link","href rel media hreflang type sizes hreflang"),t("meta","name http-equiv content charset"),t("style","media type scoped"),t("script","src async defer type charset"),t("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",i),t("address dt dd div caption","",i),t("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","",o),t("blockquote","cite",i),t("ol","reversed start type","li"),t("ul","","li"),t("li","value",i),t("dl","","dt dd"),t("a","href target rel media hreflang type",o),t("q","cite",o),t("ins del","cite datetime",i),t("img","src sizes srcset alt usemap ismap width height"),t("iframe","src name width height",i),t("embed","src type width height"),t("object","data type typemustmatch name usemap form width height",[i,"param"].join(" ")),t("param","name value"),t("map","name",[i,"area"].join(" ")),t("area","alt coords shape href target rel media hreflang type"),t("table","border","caption colgroup thead tfoot tbody tr"+("html4"===e?" col":"")),t("colgroup","span","col"),t("col","span"),t("tbody thead tfoot","","tr"),t("tr","","td th"),t("td","colspan rowspan headers",i),t("th","colspan rowspan headers scope abbr",i),t("form","accept-charset action autocomplete enctype method name novalidate target",i),t("fieldset","disabled form name",[i,"legend"].join(" ")),t("label","form for",o),t("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"),t("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"===e?i:o),t("select","disabled form multiple name required size","option optgroup"),t("optgroup","disabled label","option"),t("option","disabled label selected value"),t("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),t("menu","type label",[i,"li"].join(" ")),t("noscript","",i),"html4"!==e&&(t("wbr"),t("ruby","",[o,"rt rp"].join(" ")),t("figcaption","",i),t("mark rt rp summary bdi","",o),t("canvas","width height",i),t("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[i,"track source"].join(" ")),t("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[i,"track source"].join(" ")),t("picture","","img source"),t("source","src srcset type media sizes"),t("track","kind src srclang label default"),t("datalist","",[o,"option"].join(" ")),t("article section nav aside main header footer","",i),t("hgroup","","h1 h2 h3 h4 h5 h6"),t("figure","",[i,"figcaption"].join(" ")),t("time","datetime",o),t("dialog","open",i),t("command","type label icon disabled checked radiogroup command"),t("output","for form name",o),t("progress","value max",o),t("meter","value min max low high optimum",o),t("details","open",[i,"summary"].join(" ")),t("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!==e&&(n("script","language xml:space"),n("style","xml:space"),n("object","declare classid code codebase codetype archive standby align border hspace vspace"),n("embed","align name hspace vspace"),n("param","valuetype type"),n("a","charset name rev shape coords"),n("br","clear"),n("applet","codebase archive code object alt name width height align hspace vspace"),n("img","name longdesc align border hspace vspace"),n("iframe","longdesc frameborder marginwidth marginheight scrolling align"),n("font basefont","size color face"),n("input","usemap align"),n("select","onchange"),n("textarea"),n("h1 h2 h3 h4 h5 h6 div p legend caption","align"),n("ul","type compact"),n("li","type"),n("ol dl menu dir","compact"),n("pre","width xml:space"),n("hr","align noshade size width"),n("isindex","prompt"),n("table","summary width frame rules cellspacing cellpadding align bgcolor"),n("col","width align char charoff valign"),n("colgroup","width align char charoff valign"),n("thead","align char charoff valign"),n("tr","align char charoff valign bgcolor"),n("th","axis align char charoff valign nowrap bgcolor width height"),n("form","accept"),n("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),n("tfoot","align char charoff valign"),n("tbody","align char charoff valign"),n("area","nohref"),n("body","background bgcolor text link vlink alink")),"html4"!==e&&(n("input button select textarea","autofocus"),n("input textarea","placeholder"),n("a","download"),n("link script img","crossorigin"),n("iframe","sandbox seamless allowfullscreen")),cr(hr("a form meter progress dfn"),function(e){c[e]&&delete c[e].children[e]}),delete c.caption.children.table,delete c.script,ar[e]=c)},gr=function(e,n){var r;return e&&(r={},"string"==typeof e&&(e={"*":e}),cr(e,function(e,t){r[t]=r[t.toUpperCase()]="map"===n?sr(e,/[, ]/):fr(e,/[, ]/)})),r};function pr(i){function e(e,t,n){var r=i[e];return r?r=sr(r,/[, ]/,sr(r.toUpperCase(),/[, ]/)):(r=ar[e])||(r=sr(t," ",sr(t.toUpperCase()," ")),r=lr(r,n),ar[e]=r),r}var t,n,r,o,a,u,s,c,l,f,d,h,m,z={},g={},E=[],p={},v={};r=mr((i=i||{}).schema),!1===i.verify_html&&(i.valid_elements="*[*]"),t=gr(i.valid_styles),n=gr(i.invalid_styles,"map"),c=gr(i.valid_classes,"map"),o=e("whitespace_elements","pre script noscript style textarea video audio iframe object code"),a=e("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),u=e("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),s=e("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),f=e("non_empty_elements","td th iframe video audio object script pre code",u),d=e("move_caret_before_on_enter_elements","table",f),h=e("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),l=e("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 details summary",h),m=e("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),cr((i.special||"script noscript noframes noembed title style textarea xmp").split(" "),function(e){v[e]=new RegExp("</"+e+"[^>]*>","gi")});function N(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")}function y(e){var t,n,r,o,i,a,u,s,c,l,f,d,h,m,g,p,v,y,b,C=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,w=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/,x=/[*?+]/;if(e)for(e=hr(e,","),z["@"]&&(p=z["@"].attributes,v=z["@"].attributesOrder),t=0,n=e.length;t<n;t++)if(i=C.exec(e[t])){if(m=i[1],c=i[2],g=i[3],s=i[5],a={attributes:d={},attributesOrder:h=[]},"#"===m&&(a.paddEmpty=!0),"-"===m&&(a.removeEmpty=!0),"!"===i[4]&&(a.removeEmptyAttrs=!0),p){for(y in p)d[y]=p[y];h.push.apply(h,v)}if(s)for(r=0,o=(s=hr(s,"|")).length;r<o;r++)if(i=w.exec(s[r])){if(u={},f=i[1],l=i[2].replace(/[\\:]:/g,":"),m=i[3],b=i[4],"!"===f&&(a.attributesRequired=a.attributesRequired||[],a.attributesRequired.push(l),u.required=!0),"-"===f){delete d[l],h.splice(dr(h,l),1);continue}m&&("="===m&&(a.attributesDefault=a.attributesDefault||[],a.attributesDefault.push({name:l,value:b}),u.defaultValue=b),":"===m&&(a.attributesForced=a.attributesForced||[],a.attributesForced.push({name:l,value:b}),u.forcedValue=b),"<"===m&&(u.validValues=sr(b,"?"))),x.test(l)?(a.attributePatterns=a.attributePatterns||[],u.pattern=N(l),a.attributePatterns.push(u)):(d[l]||h.push(l),d[l]=u)}p||"@"!==c||(p=d,v=h),g&&(a.outputName=c,z[g]=a),x.test(c)?(a.pattern=N(c),E.push(a)):z[c]=a}}function b(e){z={},E=[],y(e),cr(r,function(e,t){g[t]=e.children})}function C(e){var a=/^(~)?(.+)$/;e&&(ar.text_block_elements=ar.block_elements=null,cr(hr(e,","),function(e){var t=a.exec(e),n="~"===t[1],r=n?"span":"div",o=t[2];if(g[o]=g[r],p[o]=r,n||(l[o.toUpperCase()]={},l[o]={}),!z[o]){var i=z[r];delete(i=lr({},i)).removeEmptyAttrs,delete i.removeEmpty,z[o]=i}cr(g,function(e,t){e[r]&&(g[t]=e=lr({},g[t]),e[o]=e[r])})}))}function w(e){var o=/^([+\-]?)(\w+)\[([^\]]+)\]$/;ar[i.schema]=null,e&&cr(hr(e,","),function(e){var t,n,r=o.exec(e);r&&(n=r[1],t=n?g[r[2]]:g[r[2]]={"#comment":{}},t=g[r[2]],cr(hr(r[3],"|"),function(e){"-"===n?delete t[e]:t[e]={}}))})}function x(e){var t,n=z[e];if(n)return n;for(t=E.length;t--;)if((n=E[t]).pattern.test(e))return n}i.valid_elements?b(i.valid_elements):(cr(r,function(e,t){z[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},g[t]=e.children}),"html5"!==i.schema&&cr(hr("strong/b em/i"),function(e){e=hr(e,"/"),z[e[1]].outputName=e[0]}),cr(hr("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(e){z[e]&&(z[e].removeEmpty=!0)}),cr(hr("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"),function(e){z[e].paddEmpty=!0}),cr(hr("span"),function(e){z[e].removeEmptyAttrs=!0})),C(i.custom_elements),w(i.valid_children),y(i.extended_valid_elements),w("+ol[ul|ol],+ul[ul|ol]"),cr({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,t){z[t]&&(z[t].parentsRequired=hr(e))}),i.invalid_elements&&cr(fr(i.invalid_elements),function(e){z[e]&&delete z[e]}),x("span")||y("span[!data-mce-type|*]");return{children:g,elements:z,getValidStyles:function(){return t},getValidClasses:function(){return c},getBlockElements:function(){return l},getInvalidStyles:function(){return n},getShortEndedElements:function(){return u},getTextBlockElements:function(){return h},getTextInlineElements:function(){return m},getBoolAttrs:function(){return s},getElementRule:x,getSelfClosingElements:function(){return a},getNonEmptyElements:function(){return f},getMoveCaretBeforeOnEnterElements:function(){return d},getWhiteSpaceElements:function(){return o},getSpecialElements:function(){return v},isValidChild:function(e,t){var n=g[e.toLowerCase()];return!(!n||!n[t.toLowerCase()])},isValid:function(e,t){var n,r,o=x(e);if(o){if(!t)return!0;if(o.attributes[t])return!0;if(n=o.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(e))return!0}return!1},getCustomElements:function(){return p},addValidElements:y,setValidElements:b,addCustomElements:C,addValidChildren:w}}function vr(e,t,n,r){function o(e){return 1<(e=parseInt(e,10).toString(16)).length?e:"0"+e}return"#"+o(t)+o(n)+o(r)}function yr(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r||!1):e.attachEvent&&e.attachEvent("on"+t,n)}function br(e,t,n,r){e.removeEventListener?e.removeEventListener(t,n,r||!1):e.detachEvent&&e.detachEvent("on"+t,n)}function Cr(e,t){var n,r=t||{};for(n in e)Er[n]||(r[n]=e[n]);if(r.target||(r.target=r.srcElement||j.document),Nn.experimentalShadowDom&&(r.target=function(e,t){if(e.composedPath){var n=e.composedPath();if(n&&0<n.length)return n[0]}return t}(e,r.target)),e&&zr.test(e.type)&&e.pageX===undefined&&e.clientX!==undefined){var o=r.target.ownerDocument||j.document,i=o.documentElement,a=o.body;r.pageX=e.clientX+(i&&i.scrollLeft||a&&a.scrollLeft||0)-(i&&i.clientLeft||a&&a.clientLeft||0),r.pageY=e.clientY+(i&&i.scrollTop||a&&a.scrollTop||0)-(i&&i.clientTop||a&&a.clientTop||0)}return r.preventDefault=function(){r.isDefaultPrevented=Sr,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},r.stopPropagation=function(){r.isPropagationStopped=Sr,e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},!(r.stopImmediatePropagation=function(){r.isImmediatePropagationStopped=Sr,r.stopPropagation()})===function(e){return e.isDefaultPrevented===Sr||e.isDefaultPrevented===Nr}(r)&&(r.isDefaultPrevented=Nr,r.isPropagationStopped=Nr,r.isImmediatePropagationStopped=Nr),"undefined"==typeof r.metaKey&&(r.metaKey=!1),r}function wr(e,t,n){var r=e.document,o={type:"ready"};if(n.domLoaded)t(o);else{var i=function(){br(e,"DOMContentLoaded",i),br(e,"load",i),n.domLoaded||(n.domLoaded=!0,t(o))};"complete"===r.readyState||"interactive"===r.readyState&&r.body?i():yr(e,"DOMContentLoaded",i),yr(e,"load",i)}}var xr=function(b,e){var C,t,c,l,w=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,x=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,z=/\s*([^:]+):\s*([^;]+);?/g,E=/\s+$/,N={},S="\ufeff";for(b=b||{},e&&(c=e.getValidStyles(),l=e.getInvalidStyles()),t=("\\\" \\' \\; \\: ; : "+S).split(" "),C=0;C<t.length;C++)N[t[C]]=S+C,N[S+C]=t[C];return{toHex:function(e){return e.replace(w,vr)},parse:function(e){function t(e,t,n){var r,o,i,a;if((r=p[e+"-top"+t])&&(o=p[e+"-right"+t])&&(i=p[e+"-bottom"+t])&&(a=p[e+"-left"+t])){var u=[r,o,i,a];for(C=u.length-1;C--&&u[C]===u[C+1];);-1<C&&n||(p[e+t]=-1===C?u[0]:u.join(" "),delete p[e+"-top"+t],delete p[e+"-right"+t],delete p[e+"-bottom"+t],delete p[e+"-left"+t])}}function n(e){var t,n=p[e];if(n){for(t=(n=n.split(" ")).length;t--;)if(n[t]!==n[0])return!1;return p[e]=n[0],!0}}function r(e){return f=!0,N[e]}function u(e,t){return f&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return N[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e}function o(e){return String.fromCharCode(parseInt(e.slice(1),16))}function i(e){return e.replace(/\\[0-9a-f]+/gi,o)}function a(e,t,n,r,o,i){if(o=o||i)return"'"+(o=u(o)).replace(/\'/g,"\\'")+"'";if(t=u(t||n||r),!b.allow_script_urls){var a=t.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(a))return"";if(!b.allow_svg_data_urls&&/^data:image\/svg/i.test(a))return""}return v&&(t=v.call(y,t,"style")),"url('"+t.replace(/\'/g,"\\'")+"')"}var s,c,l,f,d,h,m,g,p={},v=b.url_converter,y=b.url_converter_scope||this;if(e){for(e=(e=e.replace(/[\u0000-\u001F]/g,"")).replace(/\\[\"\';:\uFEFF]/g,r).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,r)});s=z.exec(e);)if(z.lastIndex=s.index+s[0].length,c=s[1].replace(E,"").toLowerCase(),l=s[2].replace(E,""),c&&l){if(c=i(c),l=i(l),-1!==c.indexOf(S)||-1!==c.indexOf('"'))continue;if(!b.allow_script_urls&&("behavior"===c||/expression\s*\(|\/\*|\*\//.test(l)))continue;"font-weight"===c&&"700"===l?l="bold":"color"!==c&&"background-color"!==c||(l=l.toLowerCase()),l=(l=l.replace(w,vr)).replace(x,a),p[c]=f?u(l,!0):l}t("border","",!0),t("border","-width"),t("border","-color"),t("border","-style"),t("padding",""),t("margin",""),d="border",m="border-style",g="border-color",n(h="border-width")&&n(m)&&n(g)&&(p[d]=p[h]+" "+p[m]+" "+p[g],delete p[h],delete p[m],delete p[g]),"medium none"===p.border&&delete p.border,"none"===p["border-image"]&&delete p["border-image"]}return p},serialize:function(i,e){function t(e){var t,n,r,o;if(t=c[e])for(n=0,r=t.length;n<r;n++)e=t[n],(o=i[e])&&(s+=(0<s.length?" ":"")+e+": "+o+";")}var n,r,o,a,u,s="";if(e&&c)t("*"),t(e);else for(n in i)!(r=i[n])||l&&(o=n,a=e,u=void 0,(u=l["*"])&&u[o]||(u=l[a])&&u[o])||(s+=(0<s.length?" ":"")+n+": "+r+";");return s}}},zr=/^(?:mouse|contextmenu)|click/,Er={keyLocation:1,layerX:1,layerY:1,returnValue:1,webkitMovementX:1,webkitMovementY:1,keyIdentifier:1,mozPressure:1},Nr=function(){return!1},Sr=function(){return!0},kr=(Tr.prototype.bind=function(e,t,n,r){function o(e){d.executeHandlers(Cr(e||h.event),i)}var i,a,u,s,c,l,f,d=this,h=j.window;if(e&&3!==e.nodeType&&8!==e.nodeType){e[d.expando]?i=e[d.expando]:(i=d.count++,e[d.expando]=i,d.events[i]={}),r=r||e;var m=t.split(" ");for(u=m.length;u--;)l=o,c=f=!1,"DOMContentLoaded"===(s=m[u])&&(s="ready"),d.domLoaded&&"ready"===s&&"complete"===e.readyState?n.call(r,Cr({type:s})):(d.hasMouseEnterLeave||(c=d.mouseEnterLeave[s])&&(l=function(e){var t,n;if(t=e.currentTarget,(n=e.relatedTarget)&&t.contains)n=t.contains(n);else for(;n&&n!==t;)n=n.parentNode;n||((e=Cr(e||h.event)).type="mouseout"===e.type?"mouseleave":"mouseenter",e.target=t,d.executeHandlers(e,i))}),d.hasFocusIn||"focusin"!==s&&"focusout"!==s||(f=!0,c="focusin"===s?"focus":"blur",l=function(e){(e=Cr(e||h.event)).type="focus"===e.type?"focusin":"focusout",d.executeHandlers(e,i)}),(a=d.events[i][s])?"ready"===s&&d.domLoaded?n(Cr({type:s})):a.push({func:n,scope:r}):(d.events[i][s]=a=[{func:n,scope:r}],a.fakeName=c,a.capture=f,a.nativeHandler=l,"ready"===s?wr(e,l,d):yr(e,c||s,l,f)));return e=a=0,n}},Tr.prototype.unbind=function(e,t,n){var r,o,i,a,u,s;if(!e||3===e.nodeType||8===e.nodeType)return this;if(r=e[this.expando]){if(s=this.events[r],t){var c=t.split(" ");for(i=c.length;i--;)if(o=s[u=c[i]]){if(n)for(a=o.length;a--;)if(o[a].func===n){var l=o.nativeHandler,f=o.fakeName,d=o.capture;(o=o.slice(0,a).concat(o.slice(a+1))).nativeHandler=l,o.fakeName=f,o.capture=d,s[u]=o}n&&0!==o.length||(delete s[u],br(e,o.fakeName||u,o.nativeHandler,o.capture))}}else{for(u in s)o=s[u],br(e,o.fakeName||u,o.nativeHandler,o.capture);s={}}for(u in s)return this;delete this.events[r];try{delete e[this.expando]}catch(h){e[this.expando]=null}}return this},Tr.prototype.fire=function(e,t,n){var r;if(!e||3===e.nodeType||8===e.nodeType)return this;var o=Cr(null,n);for(o.type=t,o.target=e;(r=e[this.expando])&&this.executeHandlers(o,r),(e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow)&&!o.isPropagationStopped(););return this},Tr.prototype.clean=function(e){var t,n;if(!e||3===e.nodeType||8===e.nodeType)return this;if(e[this.expando]&&this.unbind(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(this.unbind(e),t=(n=e.getElementsByTagName("*")).length;t--;)(e=n[t])[this.expando]&&this.unbind(e);return this},Tr.prototype.destroy=function(){this.events={}},Tr.prototype.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1},Tr.prototype.executeHandlers=function(e,t){var n,r,o,i,a=this.events[t];if(n=a&&a[e.type])for(r=0,o=n.length;r<o;r++)if((i=n[r])&&!1===i.func.call(i.scope,e)&&e.preventDefault(),e.isImmediatePropagationStopped())return},Tr.Event=new Tr,Tr);function Tr(){this.domLoaded=!1,this.events={},this.count=1,this.expando="mce-data-"+(+new Date).toString(32),this.hasMouseEnterLeave="onmouseenter"in j.document.documentElement,this.hasFocusIn="onfocusin"in j.document.documentElement,this.count=1}function Ar(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(65536+r):String.fromCharCode(r>>10|55296,1023&r|56320)}var Mr,Rr,Dr,_r,Br,Or,Hr,Pr,Lr,Vr,Ir,Fr,Ur,jr,qr,$r,Wr,Kr,Xr="sizzle"+-new Date,Yr=j.window.document,Gr=0,Jr=0,Qr=Mo(),Zr=Mo(),eo=Mo(),to=function(e,t){return e===t&&(Ir=!0),0},no=typeof undefined,ro={}.hasOwnProperty,oo=[],io=oo.pop,ao=oo.push,uo=oo.push,so=oo.slice,co=oo.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1},lo="[\\x20\\t\\r\\n\\f]",fo="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ho="\\["+lo+"*("+fo+")(?:"+lo+"*([*^$|!~]?=)"+lo+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+fo+"))|)"+lo+"*\\]",mo=":("+fo+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ho+")*)|.*)\\)|)",go=new RegExp("^"+lo+"+|((?:^|[^\\\\])(?:\\\\.)*)"+lo+"+$","g"),po=new RegExp("^"+lo+"*,"+lo+"*"),vo=new RegExp("^"+lo+"*([>+~]|"+lo+")"+lo+"*"),yo=new RegExp("="+lo+"*([^\\]'\"]*?)"+lo+"*\\]","g"),bo=new RegExp(mo),Co=new RegExp("^"+fo+"$"),wo={ID:new RegExp("^#("+fo+")"),CLASS:new RegExp("^\\.("+fo+")"),TAG:new RegExp("^("+fo+"|[*])"),ATTR:new RegExp("^"+ho),PSEUDO:new RegExp("^"+mo),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+lo+"*(even|odd|(([+-]|)(\\d*)n|)"+lo+"*(?:([+-]|)"+lo+"*(\\d+)|))"+lo+"*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^"+lo+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+lo+"*((?:-\\d)?\\d*)"+lo+"*\\)|)(?=[^-]|$)","i")},xo=/^(?:input|select|textarea|button)$/i,zo=/^h\d$/i,Eo=/^[^{]+\{\s*\[native \w/,No=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,So=/[+~]/,ko=/'|\\/g,To=new RegExp("\\\\([\\da-f]{1,6}"+lo+"?|("+lo+")|.)","ig");try{uo.apply(oo=so.call(Yr.childNodes),Yr.childNodes),oo[Yr.childNodes.length].nodeType}catch(yN){uo={apply:oo.length?function(e,t){ao.apply(e,so.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}var Ao=function(e,t,n,r){var o,i,a,u,s,c,l,f,d,h;if((t?t.ownerDocument||t:Yr)!==Ur&&Fr(t),n=n||[],!e||"string"!=typeof e)return n;if(1!==(u=(t=t||Ur).nodeType)&&9!==u)return[];if(qr&&!r){if(o=No.exec(e))if(a=o[1]){if(9===u){if(!(i=t.getElementById(a))||!i.parentNode)return n;if(i.id===a)return n.push(i),n}else if(t.ownerDocument&&(i=t.ownerDocument.getElementById(a))&&Kr(t,i)&&i.id===a)return n.push(i),n}else{if(o[2])return uo.apply(n,t.getElementsByTagName(e)),n;if((a=o[3])&&Rr.getElementsByClassName)return uo.apply(n,t.getElementsByClassName(a)),n}if(Rr.qsa&&(!$r||!$r.test(e))){if(f=l=Xr,d=t,h=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){for(c=Or(e),(l=t.getAttribute("id"))?f=l.replace(ko,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",s=c.length;s--;)c[s]=f+Lo(c[s]);d=So.test(e)&&Ho(t.parentNode)||t,h=c.join(",")}if(h)try{return uo.apply(n,d.querySelectorAll(h)),n}catch(m){}finally{l||t.removeAttribute("id")}}}return Pr(e.replace(go,"$1"),t,n,r)};function Mo(){var n=[];return function r(e,t){return n.push(e+" ")>Dr.cacheLength&&delete r[n.shift()],r[e+" "]=t}}function Ro(e){return e[Xr]=!0,e}function Do(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function _o(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function Bo(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function Oo(a){return Ro(function(i){return i=+i,Ro(function(e,t){for(var n,r=a([],e.length,i),o=r.length;o--;)e[n=r[o]]&&(e[n]=!(t[n]=e[n]))})})}function Ho(e){return e&&typeof e.getElementsByTagName!=no&&e}for(Mr in Rr=Ao.support={},Br=Ao.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},Fr=Ao.setDocument=function(e){var t,s=e?e.ownerDocument||e:Yr,n=s.defaultView;return s!==Ur&&9===s.nodeType&&s.documentElement?(jr=(Ur=s).documentElement,qr=!Br(s),n&&n!==function r(e){try{return e.top}catch(t){}return null}(n)&&(n.addEventListener?n.addEventListener("unload",function(){Fr()},!1):n.attachEvent&&n.attachEvent("onunload",function(){Fr()})),Rr.attributes=!0,Rr.getElementsByTagName=!0,Rr.getElementsByClassName=Eo.test(s.getElementsByClassName),Rr.getById=!0,Dr.find.ID=function(e,t){if(typeof t.getElementById!=no&&qr){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},Dr.filter.ID=function(e){var t=e.replace(To,Ar);return function(e){return e.getAttribute("id")===t}},Dr.find.TAG=Rr.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!=no)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"!==e)return i;for(;n=i[o++];)1===n.nodeType&&r.push(n);return r},Dr.find.CLASS=Rr.getElementsByClassName&&function(e,t){if(qr)return t.getElementsByClassName(e)},Wr=[],$r=[],Rr.disconnectedMatch=!0,$r=$r.length&&new RegExp($r.join("|")),Wr=Wr.length&&new RegExp(Wr.join("|")),t=Eo.test(jr.compareDocumentPosition),Kr=t||Eo.test(jr.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},to=t?function(e,t){if(e===t)return Ir=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!Rr.sortDetached&&t.compareDocumentPosition(e)===n?e===s||e.ownerDocument===Yr&&Kr(Yr,e)?-1:t===s||t.ownerDocument===Yr&&Kr(Yr,t)?1:Vr?co.call(Vr,e)-co.call(Vr,t):0:4&n?-1:1)}:function(e,t){if(e===t)return Ir=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,a=[e],u=[t];if(!o||!i)return e===s?-1:t===s?1:o?-1:i?1:Vr?co.call(Vr,e)-co.call(Vr,t):0;if(o===i)return Do(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;a[r]===u[r];)r++;return r?Do(a[r],u[r]):a[r]===Yr?-1:u[r]===Yr?1:0},s):Ur},Ao.matches=function(e,t){return Ao(e,null,null,t)},Ao.matchesSelector=function(e,t){if((e.ownerDocument||e)!==Ur&&Fr(e),t=t.replace(yo,"='$1']"),Rr.matchesSelector&&qr&&(!Wr||!Wr.test(t))&&(!$r||!$r.test(t)))try{var n=(void 0).call(e,t);if(n||Rr.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(yN){}return 0<Ao(t,Ur,null,[e]).length},Ao.contains=function(e,t){return(e.ownerDocument||e)!==Ur&&Fr(e),Kr(e,t)},Ao.attr=function(e,t){(e.ownerDocument||e)!==Ur&&Fr(e);var n=Dr.attrHandle[t.toLowerCase()],r=n&&ro.call(Dr.attrHandle,t.toLowerCase())?n(e,t,!qr):undefined;return r!==undefined?r:Rr.attributes||!qr?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},Ao.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},Ao.uniqueSort=function(e){var t,n=[],r=0,o=0;if(Ir=!Rr.detectDuplicates,Vr=!Rr.sortStable&&e.slice(0),e.sort(to),Ir){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return Vr=null,e},_r=Ao.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=_r(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=_r(t);return n},(Dr=Ao.selectors={cacheLength:50,createPseudo:Ro,match:wo,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(To,Ar),e[3]=(e[3]||e[4]||e[5]||"").replace(To,Ar),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||Ao.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&Ao.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return wo.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&bo.test(n)&&(t=Or(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(To,Ar).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=Qr[e+" "];return t||(t=new RegExp("(^|"+lo+")"+e+"("+lo+"|$)"))&&Qr(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!=no&&e.getAttribute("class")||"")})},ATTR:function(n,r,o){return function(e){var t=Ao.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===o:"!="===r?t!==o:"^="===r?o&&0===t.indexOf(o):"*="===r?o&&-1<t.indexOf(o):"$="===r?o&&t.slice(-o.length)===o:"~="===r?-1<(" "+t+" ").indexOf(o):"|="===r&&(t===o||t.slice(0,o.length+1)===o+"-"))}},CHILD:function(h,e,t,m,g){var p="nth"!==h.slice(0,3),v="last"!==h.slice(-4),y="of-type"===e;return 1===m&&0===g?function(e){return!!e.parentNode}:function(e,t,n){var r,o,i,a,u,s,c=p!=v?"nextSibling":"previousSibling",l=e.parentNode,f=y&&e.nodeName.toLowerCase(),d=!n&&!y;if(l){if(p){for(;c;){for(i=e;i=i[c];)if(y?i.nodeName.toLowerCase()===f:1===i.nodeType)return!1;s=c="only"===h&&!s&&"nextSibling"}return!0}if(s=[v?l.firstChild:l.lastChild],v&&d){for(u=(r=(o=l[Xr]||(l[Xr]={}))[h]||[])[0]===Gr&&r[1],a=r[0]===Gr&&r[2],i=u&&l.childNodes[u];i=++u&&i&&i[c]||(a=u=0)||s.pop();)if(1===i.nodeType&&++a&&i===e){o[h]=[Gr,u,a];break}}else if(d&&(r=(e[Xr]||(e[Xr]={}))[h])&&r[0]===Gr)a=r[1];else for(;(i=++u&&i&&i[c]||(a=u=0)||s.pop())&&((y?i.nodeName.toLowerCase()!==f:1!==i.nodeType)||!++a||(d&&((i[Xr]||(i[Xr]={}))[h]=[Gr,a]),i!==e)););return(a-=g)===m||a%m==0&&0<=a/m}}},PSEUDO:function(e,i){var t,a=Dr.pseudos[e]||Dr.setFilters[e.toLowerCase()]||Ao.error("unsupported pseudo: "+e);return a[Xr]?a(i):1<a.length?(t=[e,e,"",i],Dr.setFilters.hasOwnProperty(e.toLowerCase())?Ro(function(e,t){for(var n,r=a(e,i),o=r.length;o--;)e[n=co.call(e,r[o])]=!(t[n]=r[o])}):function(e){return a(e,0,t)}):a}},pseudos:{not:Ro(function(e){var r=[],o=[],u=Hr(e.replace(go,"$1"));return u[Xr]?Ro(function(e,t,n,r){for(var o,i=u(e,null,r,[]),a=e.length;a--;)(o=i[a])&&(e[a]=!(t[a]=o))}):function(e,t,n){return r[0]=e,u(r,null,n,o),!o.pop()}}),has:Ro(function(t){return function(e){return 0<Ao(t,e).length}}),contains:Ro(function(t){return t=t.replace(To,Ar),function(e){return-1<(e.textContent||e.innerText||_r(e)).indexOf(t)}}),lang:Ro(function(n){return Co.test(n||"")||Ao.error("unsupported lang: "+n),n=n.replace(To,Ar).toLowerCase(),function(e){var t;do{if(t=qr?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=j.window.location&&j.window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===jr},focus:function(e){return e===Ur.activeElement&&(!Ur.hasFocus||Ur.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!Dr.pseudos.empty(e)},header:function(e){return zo.test(e.nodeName)},input:function(e){return xo.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:Oo(function(){return[0]}),last:Oo(function(e,t){return[t-1]}),eq:Oo(function(e,t,n){return[n<0?n+t:n]}),even:Oo(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:Oo(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:Oo(function(e,t,n){for(var r=n<0?n+t:n;0<=--r;)e.push(r);return e}),gt:Oo(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=Dr.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})Dr.pseudos[Mr]=_o(Mr);for(Mr in{submit:!0,reset:!0})Dr.pseudos[Mr]=Bo(Mr);function Po(){}function Lo(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function Vo(a,e,t){var u=e.dir,s=t&&"parentNode"===u,c=Jr++;return e.first?function(e,t,n){for(;e=e[u];)if(1===e.nodeType||s)return a(e,t,n)}:function(e,t,n){var r,o,i=[Gr,c];if(n){for(;e=e[u];)if((1===e.nodeType||s)&&a(e,t,n))return!0}else for(;e=e[u];)if(1===e.nodeType||s){if((r=(o=e[Xr]||(e[Xr]={}))[u])&&r[0]===Gr&&r[1]===c)return i[2]=r[2];if((o[u]=i)[2]=a(e,t,n))return!0}}}function Io(o){return 1<o.length?function(e,t,n){for(var r=o.length;r--;)if(!o[r](e,t,n))return!1;return!0}:o[0]}function Fo(e,t,n,r,o){for(var i,a=[],u=0,s=e.length,c=null!=t;u<s;u++)(i=e[u])&&(n&&!n(i,r,o)||(a.push(i),c&&t.push(u)));return a}function Uo(m,g,p,v,y,e){return v&&!v[Xr]&&(v=Uo(v)),y&&!y[Xr]&&(y=Uo(y,e)),Ro(function(e,t,n,r){var o,i,a,u=[],s=[],c=t.length,l=e||function h(e,t,n){for(var r=0,o=t.length;r<o;r++)Ao(e,t[r],n);return n}(g||"*",n.nodeType?[n]:n,[]),f=!m||!e&&g?l:Fo(l,u,m,n,r),d=p?y||(e?m:c||v)?[]:t:f;if(p&&p(f,d,n,r),v)for(o=Fo(d,s),v(o,[],n,r),i=o.length;i--;)(a=o[i])&&(d[s[i]]=!(f[s[i]]=a));if(e){if(y||m){if(y){for(o=[],i=d.length;i--;)(a=d[i])&&o.push(f[i]=a);y(null,d=[],o,r)}for(i=d.length;i--;)(a=d[i])&&-1<(o=y?co.call(e,a):u[i])&&(e[o]=!(t[o]=a))}}else d=Fo(d===t?d.splice(c,d.length):d),y?y(null,t,d,r):uo.apply(t,d)})}function jo(e){for(var r,t,n,o=e.length,i=Dr.relative[e[0].type],a=i||Dr.relative[" "],u=i?1:0,s=Vo(function(e){return e===r},a,!0),c=Vo(function(e){return-1<co.call(r,e)},a,!0),l=[function(e,t,n){return!i&&(n||t!==Lr)||((r=t).nodeType?s(e,t,n):c(e,t,n))}];u<o;u++)if(t=Dr.relative[e[u].type])l=[Vo(Io(l),t)];else{if((t=Dr.filter[e[u].type].apply(null,e[u].matches))[Xr]){for(n=++u;n<o&&!Dr.relative[e[n].type];n++);return Uo(1<u&&Io(l),1<u&&Lo(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(go,"$1"),t,u<n&&jo(e.slice(u,n)),n<o&&jo(e=e.slice(n)),n<o&&Lo(e))}l.push(t)}return Io(l)}Po.prototype=Dr.filters=Dr.pseudos,Dr.setFilters=new Po,Or=Ao.tokenize=function(e,t){var n,r,o,i,a,u,s,c=Zr[e+" "];if(c)return t?0:c.slice(0);for(a=e,u=[],s=Dr.preFilter;a;){for(i in n&&!(r=po.exec(a))||(r&&(a=a.slice(r[0].length)||a),u.push(o=[])),n=!1,(r=vo.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(go," ")}),a=a.slice(n.length)),Dr.filter)Dr.filter.hasOwnProperty(i)&&(!(r=wo[i].exec(a))||s[i]&&!(r=s[i](r))||(n=r.shift(),o.push({value:n,type:i,matches:r}),a=a.slice(n.length)));if(!n)break}return t?a.length:a?Ao.error(e):Zr(e,u).slice(0)},Hr=Ao.compile=function(e,t){var n,r=[],o=[],i=eo[e+" "];if(!i){for(n=(t=t||Or(e)).length;n--;)(i=jo(t[n]))[Xr]?r.push(i):o.push(i);(i=eo(e,function a(p,v){function e(e,t,n,r,o){var i,a,u,s=0,c="0",l=e&&[],f=[],d=Lr,h=e||b&&Dr.find.TAG("*",o),m=Gr+=null==d?1:Math.random()||.1,g=h.length;for(o&&(Lr=t!==Ur&&t);c!==g&&null!=(i=h[c]);c++){if(b&&i){for(a=0;u=p[a++];)if(u(i,t,n)){r.push(i);break}o&&(Gr=m)}y&&((i=!u&&i)&&s--,e&&l.push(i))}if(s+=c,y&&c!==s){for(a=0;u=v[a++];)u(l,f,t,n);if(e){if(0<s)for(;c--;)l[c]||f[c]||(f[c]=io.call(r));f=Fo(f)}uo.apply(r,f),o&&!e&&0<f.length&&1<s+v.length&&Ao.uniqueSort(r)}return o&&(Gr=m,Lr=d),l}var y=0<v.length,b=0<p.length;return y?Ro(e):e}(o,r))).selector=e}return i},Pr=Ao.select=function(e,t,n,r){var o,i,a,u,s,c="function"==typeof e&&e,l=!r&&Or(e=c.selector||e);if(n=n||[],1===l.length){if(2<(i=l[0]=l[0].slice(0)).length&&"ID"===(a=i[0]).type&&Rr.getById&&9===t.nodeType&&qr&&Dr.relative[i[1].type]){if(!(t=(Dr.find.ID(a.matches[0].replace(To,Ar),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(o=wo.needsContext.test(e)?0:i.length;o--&&(a=i[o],!Dr.relative[u=a.type]);)if((s=Dr.find[u])&&(r=s(a.matches[0].replace(To,Ar),So.test(i[0].type)&&Ho(t.parentNode)||t))){if(i.splice(o,1),!(e=r.length&&Lo(i)))return uo.apply(n,r),n;break}}return(c||Hr(e,l))(r,t,!qr,n,So.test(e)&&Ho(t.parentNode)||t),n},Rr.sortStable=Xr.split("").sort(to).join("")===Xr,Rr.detectDuplicates=!!Ir,Fr(),Rr.sortDetached=!0;function qo(e){return void 0!==e}function $o(e){return"string"==typeof e}function Wo(e,t){var n,r,o;for(o=(t=t||Zo).createElement("div"),n=t.createDocumentFragment(),o.innerHTML=e;r=o.firstChild;)n.appendChild(r);return n}function Ko(e,t){return e&&t&&-1!==(" "+e.className+" ").indexOf(" "+t+" ")}function Xo(e,t,n){var r,o;return t=vi(t)[0],e.each(function(){n&&r===this.parentNode||(r=this.parentNode,o=t.cloneNode(!1),this.parentNode.insertBefore(o,this)),o.appendChild(this)}),e}function Yo(e,t){return new vi.fn.init(e,t)}function Go(e){return null===e||e===undefined?"":(""+e).replace(di,"")}function Jo(e,t){var n,r,o,i;if(e)if((n=e.length)===undefined){for(r in e)if(e.hasOwnProperty(r)&&(i=e[r],!1===t.call(i,r,i)))break}else for(o=0;o<n&&(i=e[o],!1!==t.call(i,o,i));o++);return e}function Qo(e,n){var r=[];return Jo(e,function(e,t){n(t,e)&&r.push(t)}),r}var Zo=j.document,ei=Array.prototype.push,ti=Array.prototype.slice,ni=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,ri=kr.Event,oi=Mn.makeMap("children,contents,next,prev"),ii=function(e,t,n,r){var o;if($o(t))t=Wo(t,hi(e[0]));else if(t.length&&!t.nodeType){if(t=vi.makeArray(t),r)for(o=t.length-1;0<=o;o--)ii(e,t[o],n,r);else for(o=0;o<t.length;o++)ii(e,t[o],n,r);return e}if(t.nodeType)for(o=e.length;o--;)n.call(e[o],t);return e},ai=Mn.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),ui=Mn.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),si={"for":"htmlFor","class":"className",readonly:"readOnly"},ci={"float":"cssFloat"},li={},fi={},di=/^\s*|\s*$/g,hi=function(e){return e?9===e.nodeType?e:e.ownerDocument:Zo};Yo.fn=Yo.prototype={constructor:Yo,selector:"",context:null,length:0,init:function(e,t){var n,r,o=this;if(!e)return o;if(e.nodeType)return o.context=o[0]=e,o.length=1,o;if(t&&t.nodeType)o.context=t;else{if(t)return vi(e).attr(t);o.context=t=j.document}if($o(e)){if(!(n="<"===(o.selector=e).charAt(0)&&">"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:ni.exec(e)))return vi(t).find(e);if(n[1])for(r=Wo(e,hi(t)).firstChild;r;)ei.call(o,r),r=r.nextSibling;else{if(!(r=hi(t).getElementById(n[2])))return o;if(r.id!==n[2])return o.find(e);o.length=1,o[0]=r}}else this.add(e,!1);return o},toArray:function(){return Mn.toArray(this)},add:function(e,t){var n,r;if($o(e))return this.add(vi(e));if(!1!==t)for(n=vi.unique(this.toArray().concat(vi.makeArray(e))),this.length=n.length,r=0;r<n.length;r++)this[r]=n[r];else ei.apply(this,vi.makeArray(e));return this},attr:function(t,n){var e,r=this;if("object"==typeof t)Jo(t,function(e,t){r.attr(e,t)});else{if(!qo(n)){if(r[0]&&1===r[0].nodeType){if((e=li[t])&&e.get)return e.get(r[0],t);if(ui[t])return r.prop(t)?t:undefined;null===(n=r[0].getAttribute(t,2))&&(n=undefined)}return n}this.each(function(){var e;if(1===this.nodeType){if((e=li[t])&&e.set)return void e.set(this,n);null===n?this.removeAttribute(t,2):this.setAttribute(t,n,2)}})}return r},removeAttr:function(e){return this.attr(e,null)},prop:function(e,t){var n=this;if("object"==typeof(e=si[e]||e))Jo(e,function(e,t){n.prop(e,t)});else{if(!qo(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(n,r){function e(e){return e.replace(/-(\D)/g,function(e,t){return t.toUpperCase()})}function o(e){return e.replace(/[A-Z]/g,function(e){return"-"+e})}var t,i,a=this;if("object"==typeof n)Jo(n,function(e,t){a.css(e,t)});else if(qo(r))n=e(n),"number"!=typeof r||ai[n]||(r=r.toString()+"px"),a.each(function(){var e=this.style;if((i=fi[n])&&i.set)i.set(this,r);else{try{this.style[ci[n]||n]=r}catch(t){}null!==r&&""!==r||(e.removeProperty?e.removeProperty(o(n)):e.removeAttribute(n))}});else{if(t=a[0],(i=fi[n])&&i.get)return i.get(t);if(!t.ownerDocument.defaultView)return t.currentStyle?t.currentStyle[e(n)]:"";try{return t.ownerDocument.defaultView.getComputedStyle(t,null).getPropertyValue(o(n))}catch(u){return undefined}}return a},remove:function(){for(var e,t=this.length;t--;)e=this[t],ri.clean(e),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var e,t=this.length;t--;)for(e=this[t];e.firstChild;)e.removeChild(e.firstChild);return this},html:function(e){var t,n=this;if(qo(e)){t=n.length;try{for(;t--;)n[t].innerHTML=e}catch(r){vi(n[t]).empty().append(e)}return n}return n[0]?n[0].innerHTML:""},text:function(e){var t;if(qo(e)){for(t=this.length;t--;)"innerText"in this[t]?this[t].innerText=e:this[0].textContent=e;return this}return this[0]?this[0].innerText||this[0].textContent:""},append:function(){return ii(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.appendChild(e)})},prepend:function(){return ii(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.insertBefore(e,this.firstChild)},!0)},before:function(){return this[0]&&this[0].parentNode?ii(this,arguments,function(e){this.parentNode.insertBefore(e,this)}):this},after:function(){return this[0]&&this[0].parentNode?ii(this,arguments,function(e){this.parentNode.insertBefore(e,this.nextSibling)},!0):this},appendTo:function(e){return vi(e).append(this),this},prependTo:function(e){return vi(e).prepend(this),this},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){return Xo(this,e)},wrapAll:function(e){return Xo(this,e,!0)},wrapInner:function(e){return this.each(function(){vi(this).contents().wrapAll(e)}),this},unwrap:function(){return this.parent().each(function(){vi(this).replaceWith(this.childNodes)})},clone:function(){var e=[];return this.each(function(){e.push(this.cloneNode(!0))}),vi(e)},addClass:function(e){return this.toggleClass(e,!0)},removeClass:function(e){return this.toggleClass(e,!1)},toggleClass:function(o,i){var e=this;return"string"!=typeof o||(-1!==o.indexOf(" ")?Jo(o.split(" "),function(){e.toggleClass(this,i)}):e.each(function(e,t){var n,r;(r=Ko(t,o))!==i&&(n=t.className,r?t.className=Go((" "+n+" ").replace(" "+o+" "," ")):t.className+=n?" "+o:o)})),e},hasClass:function(e){return Ko(this[0],e)},each:function(e){return Jo(this,e)},on:function(e,t){return this.each(function(){ri.bind(this,e,t)})},off:function(e,t){return this.each(function(){ri.unbind(this,e,t)})},trigger:function(e){return this.each(function(){"object"==typeof e?ri.fire(this,e.type,e):ri.fire(this,e)})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return new vi(ti.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++)vi.find(e,this[t],r);return vi(r)},filter:function(n){return vi("function"==typeof n?Qo(this.toArray(),function(e,t){return n(t,e)}):vi.filter(n,this.toArray()))},closest:function(n){var r=[];return n instanceof vi&&(n=n[0]),this.each(function(e,t){for(;t;){if("string"==typeof n&&vi(t).is(n)){r.push(t);break}if(t===n){r.push(t);break}t=t.parentNode}}),vi(r)},offset:function(e){var t,n,r,o,i=0,a=0;return e?this.css(e):((t=this[0])&&(r=(n=t.ownerDocument).documentElement,t.getBoundingClientRect&&(i=(o=t.getBoundingClientRect()).left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,a=o.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:i,top:a})},push:ei,sort:Array.prototype.sort,splice:Array.prototype.splice},Mn.extend(Yo,{extend:Mn.extend,makeArray:function(e){return function(e){return e&&e===e.window}(e)||e.nodeType?[e]:Mn.toArray(e)},inArray:function(e,t){var n;if(t.indexOf)return t.indexOf(e);for(n=t.length;n--;)if(t[n]===e)return n;return-1},isArray:Mn.isArray,each:Jo,trim:Go,grep:Qo,find:Ao,expr:Ao.selectors,unique:Ao.uniqueSort,text:Ao.getText,contains:Ao.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?vi.find.matchesSelector(t[0],e)?[t[0]]:[]:vi.find.matches(e,t)}});function mi(e,t,n){var r=[],o=e[t];for("string"!=typeof n&&n instanceof vi&&(n=n[0]);o&&9!==o.nodeType;){if(n!==undefined){if(o===n)break;if("string"==typeof n&&vi(o).is(n))break}1===o.nodeType&&r.push(o),o=o[t]}return r}function gi(e,t,n,r){var o=[];for(r instanceof vi&&(r=r[0]);e;e=e[t])if(!n||e.nodeType===n){if(r!==undefined){if(e===r)break;if("string"==typeof r&&vi(e).is(r))break}o.push(e)}return o}function pi(e,t,n){for(e=e[t];e;e=e[t])if(e.nodeType===n)return e;return null}Jo({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return mi(e,"parentNode")},next:function(e){return pi(e,"nextSibling",1)},prev:function(e){return pi(e,"previousSibling",1)},children:function(e){return gi(e.firstChild,"nextSibling",1)},contents:function(e){return Mn.toArray(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(r,o){Yo.fn[r]=function(t){var n=[];this.each(function(){var e=o.call(n,this,t,n);e&&(vi.isArray(e)?n.push.apply(n,e):n.push(e))}),1<this.length&&(oi[r]||(n=vi.unique(n)),0===r.indexOf("parents")&&(n=n.reverse()));var e=vi(n);return t?e.filter(t):e}}),Jo({parentsUntil:function(e,t){return mi(e,"parentNode",t)},nextUntil:function(e,t){return gi(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return gi(e,"previousSibling",1,t).slice(1)}},function(o,i){Yo.fn[o]=function(t,e){var n=[];this.each(function(){var e=i.call(n,this,t,n);e&&(vi.isArray(e)?n.push.apply(n,e):n.push(e))}),1<this.length&&(n=vi.unique(n),0!==o.indexOf("parents")&&"prevUntil"!==o||(n=n.reverse()));var r=vi(n);return e?r.filter(e):r}}),Yo.fn.is=function(e){return!!e&&0<this.filter(e).length},Yo.fn.init.prototype=Yo.fn,Yo.overrideDefaults=function(n){var r,o=function(e,t){return r=r||n(),0===arguments.length&&(e=r.element),t=t||r.context,new o.fn.init(e,t)};return vi.extend(o,this),o},Yo.attrHooks=li,Yo.cssHooks=fi;var vi=Yo,yi=(bi.prototype.current=function(){return this.node},bi.prototype.next=function(e){return this.node=this.findSibling(this.node,"firstChild","nextSibling",e),this.node},bi.prototype.prev=function(e){return this.node=this.findSibling(this.node,"lastChild","previousSibling",e),this.node},bi.prototype.prev2=function(e){return this.node=this.findPreviousNode(this.node,"lastChild","previousSibling",e),this.node},bi.prototype.findSibling=function(e,t,n,r){var o,i;if(e){if(!r&&e[t])return e[t];if(e!==this.rootNode){if(o=e[n])return o;for(i=e.parentNode;i&&i!==this.rootNode;i=i.parentNode)if(o=i[n])return o}}},bi.prototype.findPreviousNode=function(e,t,n,r){var o,i,a;if(e){if(o=e[n],this.rootNode&&o===this.rootNode)return;if(o){if(!r)for(a=o[t];a;a=a[t])if(!a[t])return a;return o}if((i=e.parentNode)&&i!==this.rootNode)return i}},bi);function bi(e,t){this.node=e,this.rootNode=t,this.current=this.current.bind(this),this.next=this.next.bind(this),this.prev=this.prev.bind(this),this.prev2=this.prev2.bind(this)}function Ci(t,n){Se(t).each(function(e){e.dom().insertBefore(n.dom(),t.dom())})}function wi(e,t){Te(e).fold(function(){Se(e).each(function(e){Di(e,t)})},function(e){Ci(e,t)})}function xi(t,n){_e(t).fold(function(){Di(t,n)},function(e){t.dom().insertBefore(n.dom(),e.dom())})}function zi(t,e){z(e,function(e){Di(t,e)})}function Ei(e){e.dom().textContent="",z(Re(e),function(e){_i(e)})}function Ni(e){var t=Re(e);0<t.length&&function(t,e){z(e,function(e){Ci(t,e)})}(e,t),_i(e)}function Si(e,t){return e!==undefined?e:t!==undefined?t:0}function ki(e){var t=e!==undefined?e.dom():j.document,n=t.body.scrollLeft||t.documentElement.scrollLeft,r=t.body.scrollTop||t.documentElement.scrollTop;return Oi(n,r)}function Ti(e,t,n){(n!==undefined?n.dom():j.document).defaultView.scrollTo(e,t)}function Ai(e,t){Pi&&D(e.dom().scrollIntoViewIfNeeded)?e.dom().scrollIntoViewIfNeeded(!1):e.dom().scrollIntoView(t)}function Mi(e,t,n,r){return{x:$(e),y:$(t),width:$(n),height:$(r),right:$(e+n),bottom:$(t+r)}}var Ri,Di=function(e,t){e.dom().appendChild(t.dom())},_i=function(e){var t=e.dom();null!==t.parentNode&&t.parentNode.removeChild(t)},Bi=function(n,r){return{left:$(n),top:$(r),translate:function(e,t){return Bi(n+e,r+t)}}},Oi=Bi,Hi=function(e){var t=e.dom(),n=t.ownerDocument.body;return n===t?Oi(n.offsetLeft,n.offsetTop):de(e)?function(e){var t=e.getBoundingClientRect();return Oi(t.left,t.top)}(t):Oi(0,0)},Pi=oe().browser.isSafari(),Li=function(e){var t=e===undefined?j.window:e,n=t.document,r=ki(yt.fromDom(n)),o=t.visualViewport;if(o!==undefined)return Mi(Math.max(o.pageLeft,r.left()),Math.max(o.pageTop,r.top()),o.width,o.height);var i=n.documentElement,a=i.clientWidth,u=i.clientHeight;return Mi(r.left(),r.top(),a,u)},Vi=Mn.each,Ii=Mn.grep,Fi=Nn.ie,Ui=/^([a-z0-9],?)+$/i,ji=/^[ \t\r\n]*$/,qi=function(n,r,o){var i=r.keep_values,e={set:function(e,t,n){r.url_converter&&(t=r.url_converter.call(r.url_converter_scope||o(),t,n,e[0])),e.attr("data-mce-"+n,t).attr(n,t)},get:function(e,t){return e.attr("data-mce-"+t)||e.attr(t)}},t={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(e){var t=e.attr("data-mce-style")||e.attr("style");return t=n.serialize(n.parse(t),e[0].nodeName)}}};return i&&(t.href=t.src=e),t},$i=function(e,t){var n=t.attr("style"),r=e.serialize(e.parse(n),t[0].nodeName);r=r||null,t.attr("data-mce-style",r)},Wi=function(e,t){var n,r,o=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)&&(o++,n=r);return o};function Ki(a,u){var s,c=this;void 0===u&&(u={});function l(e){if(e&&a&&"string"==typeof e){var t=a.getElementById(e);return t&&t.id!==e?a.getElementsByName(e)[1]:t}return e}function f(e){return"string"==typeof e&&(e=l(e)),H(e)}function r(e,t,n){var r,o,i=f(e);return i.length&&(o=(r=s[t])&&r.get?r.get(i,t):i.attr(t)),void 0===o&&(o=n||""),o}function d(e){var t=l(e);return t?t.attributes:[]}function o(e,t,n){var r,o;""===n&&(n=null);var i=f(e);r=i.attr(t),i.length&&((o=s[t])&&o.set?o.set(i,n,t):i.attr(t,n),r!==n&&u.onSetAttrib&&u.onSetAttrib({attrElm:i,attrName:t,attrValue:n}))}function h(){return u.root_element||a.body}function i(e,t){return Ht.getPos(a.body,l(e),t)}function m(e,t,n){var r=f(e);return n?r.css(t):("float"===(t=t.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}))&&(t=Nn.browser.isIE()?"styleFloat":"cssFloat"),r[0]&&r[0].style?r[0].style[t]:undefined)}function g(e){var t,n;return e=l(e),t=m(e,"width"),n=m(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}}function p(e,t){var n;if(!e)return!1;if(!Array.isArray(e)){if("*"===t)return 1===e.nodeType;if(Ui.test(t)){var r=t.toLowerCase().split(/,/),o=e.nodeName.toLowerCase();for(n=r.length-1;0<=n;n--)if(r[n]===o)return!0;return!1}if(e.nodeType&&1!==e.nodeType)return!1}var i=Array.isArray(e)?e:[e];return 0<Ao(t,i[0].ownerDocument||i[0],null,i).length}function v(e,t,n,r){var o,i=[],a=l(e);for(r=r===undefined,n=n||("BODY"!==h().nodeName?h().parentNode:null),Mn.is(t,"string")&&(t="*"===(o=t)?function(e){return 1===e.nodeType}:function(e){return p(e,o)});a&&a!==n&&a.nodeType&&9!==a.nodeType;){if(!t||"function"==typeof t&&t(a)){if(!r)return[a];i.push(a)}a=a.parentNode}return r?i:null}function n(e,t,n){var r=t;if(e)for("string"==typeof t&&(r=function(e){return p(e,t)}),e=e[n];e;e=e[n])if("function"==typeof r&&r(e))return e;return null}function y(e,n,r){var o,t="string"==typeof e?l(e):e;if(!t)return!1;if(Mn.isArray(t)&&(t.length||0===t.length))return o=[],Vi(t,function(e,t){e&&("string"==typeof e&&(e=l(e)),o.push(n.call(r,e,t)))}),o;var i=r||c;return n.call(i,t)}function b(e,t){f(e).each(function(e,n){Vi(t,function(e,t){o(n,t,e)})})}function C(e,r){var t=f(e);Fi?t.each(function(e,t){if(!1!==t.canHaveHTML){for(;t.firstChild;)t.removeChild(t.firstChild);try{t.innerHTML="<br>"+r,t.removeChild(t.firstChild)}catch(n){vi("<div></div>").html("<br>"+r).contents().slice(1).appendTo(t)}return r}}):t.html(r)}function w(e,n,r,o,i){return y(e,function(e){var t="string"==typeof n?a.createElement(n):n;return b(t,r),o&&("string"!=typeof o&&o.nodeType?t.appendChild(o):"string"==typeof o&&C(t,o)),i?t:e.appendChild(t)})}function x(e,t,n){return w(a.createElement(e),e,t,n,!0)}function z(e,t){var n=f(e);return t?n.each(function(){for(var e;e=this.firstChild;)3===e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)}).remove():n.remove(),1<n.length?n.toArray():n[0]}function E(e,t,n){f(e).toggleClass(t,n).each(function(){""===this.className&&vi(this).attr("class",null)})}function N(t,e,n){return y(e,function(e){return Mn.is(e,"array")&&(t=t.cloneNode(!0)),n&&Vi(Ii(e.childNodes),function(e){t.appendChild(e)}),e.parentNode.replaceChild(t,e)})}function S(){return a.createRange()}function k(e){if(e&&Ge.isElement(e)){var t=e.getAttribute("data-mce-contenteditable");return t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null}return null}var T={},A=j.window,M={},t=0,e=function U(m,g){void 0===g&&(g={});var p,v=0,y={};function b(e){m.getElementsByTagName("head")[0].appendChild(e)}function n(e,t,n){function r(e){l.status=e,l.passed=[],l.failed=[],u&&(u.onload=null,u.onerror=null,u=null)}function o(){for(var e=l.passed,t=e.length;t--;)e[t]();r(2)}function i(){for(var e=l.failed,t=e.length;t--;)e[t]();r(3)}function a(e,t){e()||((new Date).getTime()-c<p?pn.setTimeout(t):i())}var u,s,c,l,f=function(){a(function(){for(var e,t,n=m.styleSheets,r=n.length;r--;)if((t=(e=n[r]).ownerNode?e.ownerNode:e.owningElement)&&t.id===u.id)return o(),!0},f)},d=function(){a(function(){try{var e=s.sheet.cssRules;return o(),!!e}catch(t){}},d)};if(e=Mn._addCacheSuffix(e),y[e]?l=y[e]:(l={passed:[],failed:[]},y[e]=l),t&&l.passed.push(t),n&&l.failed.push(n),1!==l.status)if(2!==l.status)if(3!==l.status){if(l.status=1,(u=m.createElement("link")).rel="stylesheet",u.type="text/css",u.id="u"+v++,u.async=!1,u.defer=!1,c=(new Date).getTime(),g.contentCssCors&&(u.crossOrigin="anonymous"),g.referrerPolicy&&Tt(yt.fromDom(u),"referrerpolicy",g.referrerPolicy),"onload"in u&&!((h=j.navigator.userAgent.match(/WebKit\/(\d*)/))&&parseInt(h[1],10)<536))u.onload=f,u.onerror=i;else{if(0<j.navigator.userAgent.indexOf("Firefox"))return(s=m.createElement("style")).textContent='@import "'+e+'"',d(),void b(s);f()}var h;b(u),u.href=e}else i();else o()}function t(t){return Xt.nu(function(e){n(t,q(e,$(Qt.value(t))),q(e,$(Qt.error(t))))})}function o(e){return e.fold(W,W)}return p=g.maxLoadTime||5e3,{load:n,loadAll:function(e,n,r){Yt(X(e,t)).get(function(e){var t=Y(e,function(e){return e.isValue()});0<t.fail.length?r(t.fail.map(o)):n(t.pass.map(o))})},_setReferrerPolicy:function(e){g.referrerPolicy=e}}}(a,{contentCssCors:u.contentCssCors,referrerPolicy:u.referrerPolicy}),R=[],D=u.schema?u.schema:pr({}),_=xr({url_converter:u.url_converter,url_converter_scope:u.url_converter_scope},u.schema),B=u.ownEvents?new kr:kr.Event,O=D.getBlockElements(),H=vi.overrideDefaults(function(){return{context:a,element:F.getRoot()}}),P=ir.decode,L=ir.encodeAllRaw,V=function(e,t,n,r){if(Mn.isArray(e)){for(var o=e.length,i=[];o--;)i[o]=V(e[o],t,n,r);return i}return!u.collect||e!==a&&e!==A||R.push([e,t,n,r]),B.bind(e,t,n,r||F)},I=function(e,t,n){var r;if(Mn.isArray(e)){r=e.length;for(var o=[];r--;)o[r]=I(e[r],t,n);return o}if(R&&(e===a||e===A))for(r=R.length;r--;){var i=R[r];e!==i[0]||t&&t!==i[1]||n&&n!==i[2]||B.unbind(i[0],i[1],i[2])}return B.unbind(e,t,n)},F={doc:a,settings:u,win:A,files:M,stdMode:!0,boxModel:!0,styleSheetLoader:e,boundEvents:R,styles:_,schema:D,events:B,isBlock:function(e){if("string"==typeof e)return!!O[e];if(e){var t=e.nodeType;if(t)return!(1!==t||!O[e.nodeName])}return!1},$:H,$$:f,root:null,clone:function(t,e){if(!Fi||1!==t.nodeType||e)return t.cloneNode(e);if(e)return null;var n=a.createElement(t.nodeName);return Vi(d(t),function(e){o(n,e.nodeName,r(t,e.nodeName))}),n},getRoot:h,getViewPort:function(e){var t=Li(e);return{x:t.x(),y:t.y(),w:t.width(),h:t.height()}},getRect:function(e){var t,n;return e=l(e),t=i(e),n=g(e),{x:t.x,y:t.y,w:n.w,h:n.h}},getSize:g,getParent:function(e,t,n){var r=v(e,t,n,!1);return r&&0<r.length?r[0]:null},getParents:v,get:l,getNext:function(e,t){return n(e,t,"nextSibling")},getPrev:function(e,t){return n(e,t,"previousSibling")},select:function(e,t){return Ao(e,l(t)||u.root_element||a,[])},is:p,add:w,create:x,createHTML:function(e,t,n){var r,o="";for(r in o+="<"+e,t)t.hasOwnProperty(r)&&null!==t[r]&&"undefined"!=typeof t[r]&&(o+=" "+r+'="'+L(t[r])+'"');return void 0!==n?o+">"+n+"</"+e+">":o+" />"},createFragment:function(e){var t,n=a.createElement("div"),r=a.createDocumentFragment();for(e&&(n.innerHTML=e);t=n.firstChild;)r.appendChild(t);return r},remove:z,setStyle:function(e,t,n){var r=K(t)?f(e).css(t,n):f(e).css(t);u.update_styles&&$i(_,r)},getStyle:m,setStyles:function(e,t){var n=f(e).css(t);u.update_styles&&$i(_,n)},removeAllAttribs:function(e){return y(e,function(e){var t,n=e.attributes;for(t=n.length-1;0<=t;t--)e.removeAttributeNode(n.item(t))})},setAttrib:o,setAttribs:b,getAttrib:r,getPos:i,parseStyle:function(e){return _.parse(e)},serializeStyle:function(e,t){return _.serialize(e,t)},addStyle:function(e){var t,n;if(F!==Ki.DOM&&a===j.document){if(T[e])return;T[e]=!0}(n=a.getElementById("mceDefaultStyles"))||((n=a.createElement("style")).id="mceDefaultStyles",n.type="text/css",(t=a.getElementsByTagName("head")[0]).firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(a.createTextNode(e))},loadCSS:function(e){var n;F===Ki.DOM||a!==j.document?(e=e||"",n=a.getElementsByTagName("head")[0],Vi(e.split(","),function(e){var t;e=Mn._addCacheSuffix(e),M[e]||(M[e]=!0,t=x("link",G(G({rel:"stylesheet",type:"text/css",href:e},u.contentCssCors?{crossOrigin:"anonymous"}:{}),u.referrerPolicy?{referrerPolicy:u.referrerPolicy}:{})),n.appendChild(t))})):Ki.DOM.loadCSS(e)},addClass:function(e,t){f(e).addClass(t)},removeClass:function(e,t){E(e,t,!1)},hasClass:function(e,t){return f(e).hasClass(t)},toggleClass:E,show:function(e){f(e).show()},hide:function(e){f(e).hide()},isHidden:function(e){return"none"===f(e).css("display")},uniqueId:function(e){return(e||"mce_")+t++},setHTML:C,getOuterHTML:function(e){var t="string"==typeof e?l(e):e;return Ge.isElement(t)?t.outerHTML:vi("<div></div>").append(vi(t).clone()).html()},setOuterHTML:function(e,t){f(e).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(e){}z(vi(this).html(t),!0)})},decode:P,encode:L,insertAfter:function(e,t){var r=l(t);return y(e,function(e){var t,n;return t=r.parentNode,(n=r.nextSibling)?t.insertBefore(e,n):t.appendChild(e),e})},replace:N,rename:function(t,e){var n;return t.nodeName!==e.toUpperCase()&&(n=x(e),Vi(d(t),function(e){o(n,e.nodeName,r(t,e.nodeName))}),N(n,t,!0)),n||t},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 _.toHex(Mn.trim(e))},run:y,getAttribs:d,isEmpty:function(e,t){var n,r,o,i,a=0;if(e=e.firstChild){var u=new yi(e,e.parentNode),s=D?D.getWhiteSpaceElements():{};t=t||(D?D.getNonEmptyElements():null);do{if(o=e.nodeType,Ge.isElement(e)){var c=e.getAttribute("data-mce-bogus");if(c){e=u.next("all"===c);continue}if(i=e.nodeName.toLowerCase(),t&&t[i]){if("br"!==i)return!1;a++,e=u.next();continue}for(n=(r=d(e)).length;n--;)if("name"===(i=r[n].nodeName)||"data-mce-bookmark"===i)return!1}if(8===o)return!1;if(3===o&&!ji.test(e.nodeValue))return!1;if(3===o&&e.parentNode&&s[e.parentNode.nodeName]&&ji.test(e.nodeValue))return!1;e=u.next()}while(e)}return a<=1},createRng:S,nodeIndex:Wi,split:function(e,t,n){var r,o,i,a=S();if(e&&t)return a.setStart(e.parentNode,Wi(e)),a.setEnd(t.parentNode,Wi(t)),r=a.extractContents(),(a=S()).setStart(t.parentNode,Wi(t)+1),a.setEnd(e.parentNode,Wi(e)+1),o=a.extractContents(),(i=e.parentNode).insertBefore(Xn.trimNode(F,r),e),n?i.insertBefore(n,e):i.insertBefore(t,e),i.insertBefore(Xn.trimNode(F,o),e),z(e),n||t},bind:V,unbind:I,fire:function(e,t,n){return B.fire(e,t,n)},getContentEditable:k,getContentEditableParent:function(e){for(var t=h(),n=null;e&&e!==t&&null===(n=k(e));e=e.parentNode);return n},destroy:function(){if(R)for(var e=R.length;e--;){var t=R[e];B.unbind(t[0],t[1],t[2])}Ao.setDocument&&Ao.setDocument()},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}};return s=qi(_,u,function(){return F}),F}(Ri=Ki=Ki||{}).DOM=Ri(j.document),Ri.nodeIndex=Wi;var Xi=Ki,Yi=Xi.DOM,Gi=Mn.each,Ji=Mn.grep,Qi=(Zi.prototype._setReferrerPolicy=function(e){this.settings.referrerPolicy=e},Zi.prototype.loadScript=function(e,t,n){var r,o,i=Yi;o=i.uniqueId(),(r=j.document.createElement("script")).id=o,r.type="text/javascript",r.src=Mn._addCacheSuffix(e),this.settings.referrerPolicy&&i.setAttrib(r,"referrerpolicy",this.settings.referrerPolicy),r.onload=function(){i.remove(o),r&&(r.onreadystatechange=r.onload=r=null),t()},r.onerror=function(){D(n)?n():"undefined"!=typeof j.console&&j.console.log&&j.console.log("Failed to load script: "+e)},(j.document.getElementsByTagName("head")[0]||j.document.body).appendChild(r)},Zi.prototype.isDone=function(e){return 2===this.states[e]},Zi.prototype.markDone=function(e){this.states[e]=2},Zi.prototype.add=function(e,t,n,r){this.states[e]===undefined&&(this.queue.push(e),this.states[e]=0),t&&(this.scriptLoadedCallbacks[e]||(this.scriptLoadedCallbacks[e]=[]),this.scriptLoadedCallbacks[e].push({success:t,failure:r,scope:n||this}))},Zi.prototype.load=function(e,t,n,r){return this.add(e,t,n,r)},Zi.prototype.remove=function(e){delete this.states[e],delete this.scriptLoadedCallbacks[e]},Zi.prototype.loadQueue=function(e,t,n){this.loadScripts(this.queue,e,t,n)},Zi.prototype.loadScripts=function(n,e,t,r){function o(t,e){Gi(a.scriptLoadedCallbacks[e],function(e){D(e[t])&&e[t].call(e.scope)}),a.scriptLoadedCallbacks[e]=undefined}var i,a=this,u=[];a.queueLoadedCallbacks.push({success:e,failure:r,scope:t||this}),(i=function(){var e=Ji(n);if(n.length=0,Gi(e,function(e){2!==a.states[e]?3!==a.states[e]?1!==a.states[e]&&(a.states[e]=1,a.loading++,a.loadScript(e,function(){a.states[e]=2,a.loading--,o("success",e),i()},function(){a.states[e]=3,a.loading--,u.push(e),o("failure",e),i()})):o("failure",e):o("success",e)}),!a.loading){var t=a.queueLoadedCallbacks.slice(0);a.queueLoadedCallbacks.length=0,Gi(t,function(e){0===u.length?D(e.success)&&e.success.call(e.scope):D(e.failure)&&e.failure.call(e.scope,u)})}})()},Zi.ScriptLoader=new Zi,Zi);function Zi(e){void 0===e&&(e={}),this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=0,this.settings=e}var ea,ta={},na=Je("en"),ra={getData:function(){return se(ta,function(e){return G({},e)})},setCode:function(e){e&&na.set(e)},getCode:function(){return na.get()},add:function(e,t){var n=ta[e];for(var r in n||(ta[e]=n={}),t)n[r.toLowerCase()]=t[r]},translate:function(e){function r(e){return D(e)?Object.prototype.toString.call(e):a(e)?"":""+e}function t(e){var t=r(e),n=t.toLowerCase();return kt(i,n)?r(i[n]):t}function n(e){return e.replace(/{context:\w+}$/,"")}function o(e){return e}var i=ta[na.get()]||{},a=function(e){return""===e||null===e||e===undefined};if(a(e))return o("");if(function(e){return T(e)&&kt(e,"raw")}(e))return o(r(e.raw));if(function(e){return A(e)&&1<e.length}(e)){var u=e.slice(1);return o(n(t(e[0]).replace(/\{([0-9]+)\}/g,function(e,t){return kt(u,t)?r(u[t]):e})))}return o(n(t(e)))},isRtl:function(){return le(ta,na.get()).bind(function(e){return le(e,"_dir")}).exists(function(e){return"rtl"===e})},hasCode:function(e){return kt(ta,e)}},oa=Mn.each;function ia(){function i(e){var t;return c[e]&&(t=c[e].dependencies),t||[]}function a(e,t){return"object"==typeof t?t:"string"==typeof e?{prefix:"",resource:t,suffix:""}:{prefix:e.prefix,resource:t,suffix:e.suffix}}function u(e,n,t,r){var o=i(e);oa(o,function(e){var t=a(n,e);f(t.resource,t,undefined,undefined)}),t&&(r?t.call(r):t.call(Qi))}var r=this,o=[],s={},c={},l=[],f=function(e,t,n,r,o){if(!s[e]){var i="string"==typeof t?t:t.prefix+t.resource+t.suffix;0!==i.indexOf("/")&&-1===i.indexOf("://")&&(i=ia.baseURL+"/"+i),s[e]=i.substring(0,i.lastIndexOf("/")),c[e]?u(e,t,n,r):Qi.ScriptLoader.add(i,function(){return u(e,t,n,r)},r,o)}};return{items:o,urls:s,lookup:c,_listeners:l,get:function(e){return c[e]?c[e].instance:undefined},dependencies:i,requireLangPack:function(e,t){var n=ra.getCode();if(n&&!1!==ia.languageLoad){if(t)if(-1!==(t=","+t+",").indexOf(","+n.substr(0,2)+","))n=n.substr(0,2);else if(-1===t.indexOf(","+n+","))return;Qi.ScriptLoader.add(s[e]+"/langs/"+n+".js")}},add:function(t,e,n){o.push(e),c[t]={instance:e,dependencies:n};var r=Y(l,function(e){return e.name===t});return l=r.fail,oa(r.pass,function(e){e.callback()}),e},remove:function(e){delete s[e],delete c[e]},createUrl:a,addComponents:function(e,t){var n=r.urls[e];oa(t,function(e){Qi.ScriptLoader.add(n+"/"+e)})},load:f,waitFor:function(e,t){c.hasOwnProperty(e)?t():l.push({name:e,callback:t})}}}(ea=ia=ia||{}).PluginManager=ea(),ea.ThemeManager=ea();function aa(n,r){var o=null;return{cancel:function(){null!==o&&(j.clearTimeout(o),o=null)},throttle:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];null===o&&(o=j.setTimeout(function(){n.apply(null,e),o=null},r))}}}function ua(e,t){var n=ge(e,t);return n===undefined||""===n?[]:n.split(" ")}function sa(e){return e.dom().classList!==undefined}function ca(e,t){return function(e,t,n){var r=ua(e,t).concat([n]);return Tt(e,t,r.join(" ")),!0}(e,"class",t)}function la(e,t){return function(e,t,n){var r=y(ua(e,t),function(e){return e!==n});return 0<r.length?Tt(e,t,r.join(" ")):pe(e,t),!1}(e,"class",t)}function fa(e,t){sa(e)?e.dom().classList.add(t):ca(e,t)}function da(e){0===(sa(e)?e.dom().classList:function(e){return ua(e,"class")}(e)).length&&pe(e,"class")}function ha(e,t){return sa(e)&&e.dom().classList.contains(t)}function ma(e,t){return function(e,t){var n=t===undefined?j.document:t.dom();return xe(n)?[]:X(n.querySelectorAll(e),yt.fromDom)}(t,e)}var ga=ia,pa=function(e,t){var n=[];return z(Re(e),function(e){t(e)&&(n=n.concat([e])),n=n.concat(pa(e,t))}),n};function va(e,t,n,r,o){return e(n,r)?k.some(n):D(o)&&o(n)?k.none():t(n,r,o)}function ya(e,t,n){for(var r=e.dom(),o=D(n)?n:$(!1);r.parentNode;){r=r.parentNode;var i=yt.fromDom(r);if(t(i))return k.some(i);if(o(i))break}return k.none()}function ba(e,t,n){return va(function(e,t){return t(e)},ya,e,t,n)}function Ca(e,t,n){return ya(e,function(e){return we(e,t)},n)}function wa(e,t){return function(e,t){var n=t===undefined?j.document:t.dom();return xe(n)?k.none():k.from(n.querySelector(e)).map(yt.fromDom)}(t,e)}function xa(e,t,n){return va(we,Ca,e,t,n)}function za(r,e){function t(e,t){return function(e,t){var n=e.dom();return!(!n||!n.hasAttribute)&&n.hasAttribute(t)}(e,t)?k.some(ge(e,t)):k.none()}var n=r.selection.getRng(),o=yt.fromDom(n.startContainer),i=yt.fromDom(r.getBody()),a=e.fold(function(){return"."+nu()},function(e){return"["+ru()+'="'+e+'"]'}),u=De(o,n.startOffset).getOr(o);return xa(u,a,function(e){return ze(e,i)}).bind(function(e){return t(e,""+ou()).bind(function(n){return t(e,""+ru()).map(function(e){var t=iu(r,n);return{uid:n,name:e,elements:t}})})})}function Ea(n,e){function a(e,t){r(e,function(e){return t(e),e})}var o=Je({}),r=function(e,t){var n=o.get(),r=t(n.hasOwnProperty(e)?n[e]:{listeners:[],previous:Je(k.none())});n[e]=r,o.set(n)},t=function(n,r){var o=null;return{cancel:function(){null!==o&&(j.clearTimeout(o),o=null)},throttle:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];null!==o&&j.clearTimeout(o),o=j.setTimeout(function(){n.apply(null,e),o=null},r)}}}(function(){var e=o.get(),t=function(e,t){var n=B.call(e,0);return n.sort(t),n}(Et(e));z(t,function(e){r(e,function(o){var i=o.previous.get();return za(n,k.some(e)).fold(function(){i.isSome()&&(function(t){a(t,function(e){z(e.listeners,function(e){return e(!1,t)})})}(e),o.previous.set(k.none()))},function(e){var t=e.uid,n=e.name,r=e.elements;i.is(t)||(function(t,n,r){a(t,function(e){z(e.listeners,function(e){return e(!0,t,{uid:n,nodes:X(r,function(e){return e.dom()})})})})}(n,t,r),o.previous.set(k.some(t)))}),{previous:o.previous,listeners:o.listeners}})})},30);return n.on("remove",function(){t.cancel()}),n.on("NodeChange",function(){t.throttle()}),{addListener:function(e,t){r(e,function(e){return{previous:e.previous,listeners:e.listeners.concat([t])}})}}}function Na(e,n){e.on("init",function(){e.serializer.addNodeFilter("span",function(e){z(e,function(t){(function(e){return k.from(e.attr(ru())).bind(n.lookup)})(t).each(function(e){!1===e.persistent&&t.unwrap()})})})})}function Sa(e,t){return yt.fromDom(e.dom().cloneNode(t))}function ka(e){return Sa(e,!1)}function Ta(e){return Sa(e,!0)}function Aa(e,t){var n=Ee(e).dom(),r=yt.fromDom(n.createDocumentFragment()),o=function(e,t){var n=(t||j.document).createElement("div");return n.innerHTML=e,Re(yt.fromDom(n))}(t,n);zi(r,o),Ei(e),Di(e,r)}function Ma(e){return du(e)&&(e=e.parentNode),fu(e)&&e.hasAttribute("data-mce-caret")}function Ra(e){return du(e)&&su(e.data)}function Da(e){return Ma(e)||Ra(e)}function _a(e){return e.firstChild!==e.lastChild||!Ge.isBr(e.firstChild)}function Ba(e){var t=e.container();return!(!e||!Ge.isText(t))&&(t.data.charAt(e.offset())===cu||e.isAtStart()&&Ra(t.previousSibling))}function Oa(e){var t=e.container();return!(!e||!Ge.isText(t))&&(t.data.charAt(e.offset()-1)===cu||e.isAtEnd()&&Ra(t.nextSibling))}function Ha(e,t,n){var r,o;return(r=t.ownerDocument.createElement(e)).setAttribute("data-mce-caret",n?"before":"after"),r.setAttribute("data-mce-bogus","all"),r.appendChild(function(){var e=j.document.createElement("br");return e.setAttribute("data-mce-bogus","1"),e}()),o=t.parentNode,n?o.insertBefore(r,t):t.nextSibling?o.insertBefore(r,t.nextSibling):o.appendChild(r),r}function Pa(e){return e&&e.hasAttribute("data-mce-caret")?(function(e){var t=e.getElementsByTagName("br"),n=t[t.length-1];Ge.isBogus(n)&&n.parentNode.removeChild(n)}(e),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("_moz_abspos"),e):null}function La(e){return!xu(e)&&(yu(e)?!bu(e.parentNode):Cu(e)||vu(e)||wu(e)||zu(e))}function Va(e,t){return La(e)&&function(e,t){for(e=e.parentNode;e&&e!==t;e=e.parentNode){if(zu(e))return!1;if(gu(e))return!0}return!0}(e,t)}function Ia(e){return e?{left:Eu(e.left),top:Eu(e.top),bottom:Eu(e.bottom),right:Eu(e.right),width:Eu(e.width),height:Eu(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}}function Fa(e,t){return e=Ia(e),t||(e.left=e.left+e.width),e.right=e.left,e.width=0,e}function Ua(e,t,n){return 0<=e&&e<=Math.min(t.height,n.height)/2}function ja(e,t){return e.bottom-e.height/2<t.top||!(e.top>t.bottom)&&Ua(t.top-e.bottom,e,t)}function qa(e,t){return e.top>t.bottom||!(e.bottom<t.top)&&Ua(t.bottom-e.top,e,t)}function $a(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom}function Wa(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset===n+1?t.childNodes[n]:null}function Ka(e,t){return 1===e.nodeType&&e.hasChildNodes()&&(t>=e.childNodes.length&&(t=e.childNodes.length-1),e=e.childNodes[t]),e}function Xa(e){return"string"==typeof e&&768<=e.charCodeAt(0)&&Nu.test(e)}function Ya(e,t,n){return e.isSome()&&t.isSome()?k.some(n(e.getOrDie(),t.getOrDie())):k.none()}function Ga(e){return e&&/[\r\n\t ]/.test(e)}function Ja(e){return!!e.setStart&&!!e.setEnd}function Qa(e){var t,n=e.startContainer,r=e.startOffset;return!!(Ga(e.toString())&&Bu(n.parentNode)&&Ge.isText(n)&&(t=n.data,Ga(t[r-1])||Ga(t[r+1])))}function Za(e){return 0===e.left&&0===e.right&&0===e.top&&0===e.bottom}function eu(e,t){var n=Fa(e,t);return n.width=1,n.right=n.left+1,n}var tu,nu=$("mce-annotation"),ru=$("data-mce-annotation"),ou=$("data-mce-annotation-uid"),iu=function(e,t){var n=yt.fromDom(e.getBody());return ma(n,"["+ou()+'="'+t+'"]')},au=0,uu="\ufeff",su=function(e){return e===uu},cu=uu,lu=function(e){return e.replace(new RegExp(uu,"g"),"")},fu=Ge.isElement,du=Ge.isText,hu=function(e){return du(e)&&e.data[0]===cu},mu=function(e){return du(e)&&e.data[e.data.length-1]===cu},gu=Ge.isContentEditableTrue,pu=Ge.isContentEditableFalse,vu=Ge.isBr,yu=Ge.isText,bu=Ge.matchNodeNames(["script","style","textarea"]),Cu=Ge.matchNodeNames(["img","input","textarea","hr","iframe","video","audio","object"]),wu=Ge.matchNodeNames(["table"]),xu=Da,zu=function(e){return!1===function(e){return Ge.isElement(e)&&"true"===e.getAttribute("unselectable")}(e)&&pu(e)},Eu=Math.round,Nu=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]"),Su=[].slice,ku=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Su.call(arguments);return function(e){for(var t=0;t<n.length;t++)if(!n[t](e))return!1;return!0}},Tu=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Su.call(arguments);return function(e){for(var t=0;t<n.length;t++)if(n[t](e))return!0;return!1}},Au=Ge.isElement,Mu=La,Ru=Ge.matchStyleValues("display","block table"),Du=Ge.matchStyleValues("float","left right"),_u=ku(Au,Mu,s(Du)),Bu=s(Ge.matchStyleValues("white-space","pre pre-line pre-wrap")),Ou=Ge.isText,Hu=Ge.isBr,Pu=Xi.nodeIndex,Lu=Ka,Vu=function(e){return"createRange"in e?e.createRange():Xi.DOM.createRng()},Iu=function(e){var t,n;return t=0<(n=e.getClientRects()).length?Ia(n[0]):Ia(e.getBoundingClientRect()),!Ja(e)&&Hu(e)&&Za(t)?function(e){var t,n=e.ownerDocument,r=Vu(n),o=n.createTextNode("\xa0"),i=e.parentNode;return i.insertBefore(o,e),r.setStart(o,0),r.setEnd(o,1),t=Ia(r.getBoundingClientRect()),i.removeChild(o),t}(e):Za(t)&&Ja(e)?function(e){var t=e.startContainer,n=e.endContainer,r=e.startOffset,o=e.endOffset;if(t===n&&Ge.isText(n)&&0===r&&1===o){var i=e.cloneRange();return i.setEndAfter(n),Iu(i)}return null}(e):t},Fu=function(e){function r(e){0!==e.height&&(0<i.length&&function(e,t){return e.left===t.left&&e.top===t.top&&e.bottom===t.bottom&&e.right===t.right}(e,i[i.length-1])||i.push(e))}function t(e,t){var n=Vu(e.ownerDocument);if(t<e.data.length){if(Xa(e.data[t]))return i;if(Xa(e.data[t-1])&&(n.setStart(e,t),n.setEnd(e,t+1),!Qa(n)))return r(eu(Iu(n),!1)),i}0<t&&(n.setStart(e,t-1),n.setEnd(e,t),Qa(n)||r(eu(Iu(n),!1))),t<e.data.length&&(n.setStart(e,t),n.setEnd(e,t+1),Qa(n)||r(eu(Iu(n),!0)))}var n,o,i=[];if(Ou(e.container()))return t(e.container(),e.offset()),i;if(Au(e.container()))if(e.isAtEnd())o=Lu(e.container(),e.offset()),Ou(o)&&t(o,o.data.length),_u(o)&&!Hu(o)&&r(eu(Iu(o),!1));else{if(o=Lu(e.container(),e.offset()),Ou(o)&&t(o,0),_u(o)&&e.isAtEnd())return r(eu(Iu(o),!1)),i;n=Lu(e.container(),e.offset()-1),_u(n)&&!Hu(n)&&(!Ru(n)&&!Ru(o)&&_u(o)||r(eu(Iu(n),!1))),_u(o)&&r(eu(Iu(o),!0))}return i};function Uu(t,n,e){function r(){return e=e||Fu(Uu(t,n))}return{container:$(t),offset:$(n),toRange:function(){var e;return(e=Vu(t.ownerDocument)).setStart(t,n),e.setEnd(t,n),e},getClientRects:r,isVisible:function(){return 0<r().length},isAtStart:function(){return Ou(t),0===n},isAtEnd:function(){return Ou(t)?n>=t.data.length:n>=t.childNodes.length},isEqual:function(e){return e&&t===e.container()&&n===e.offset()},getNode:function(e){return Lu(t,e?n-1:n)}}}(tu=Uu=Uu||{}).fromRangeStart=function(e){return tu(e.startContainer,e.startOffset)},tu.fromRangeEnd=function(e){return tu(e.endContainer,e.endOffset)},tu.after=function(e){return tu(e.parentNode,Pu(e)+1)},tu.before=function(e){return tu(e.parentNode,Pu(e))},tu.isAbove=function(e,t){return Ya(E(t.getClientRects()),N(e.getClientRects()),ja).getOr(!1)},tu.isBelow=function(e,t){return Ya(N(t.getClientRects()),E(e.getClientRects()),qa).getOr(!1)},tu.isAtStart=function(e){return!!e&&e.isAtStart()},tu.isAtEnd=function(e){return!!e&&e.isAtEnd()},tu.isTextPosition=function(e){return!!e&&Ge.isText(e.container())},tu.isElementPosition=function(e){return!1===tu.isTextPosition(e)};function ju(t){return function(e){return t===e}}function qu(e){return(_s(e)?"text()":e.nodeName.toLowerCase())+"["+function(e){var r,t,n;return r=Ps(Hs(e)),t=kn.findIndex(r,ju(e),e),r=r.slice(0,t+1),n=kn.reduce(r,function(e,t,n){return _s(t)&&_s(r[n-1])&&e++,e},0),r=kn.filter(r,Ge.matchNodeNames([e.nodeName])),(t=kn.findIndex(r,ju(e),e))-n}(e)+"]"}function $u(e,t){var n,r,o,i,a,u=[];return n=t.container(),r=t.offset(),_s(n)?o=function(e,t){for(;(e=e.previousSibling)&&_s(e);)t+=e.data.length;return t}(n,r):(r>=(i=n.childNodes).length?(o="after",r=i.length-1):o="before",n=i[r]),u.push(qu(n)),a=function(e,t,n){var r=[];for(t=t.parentNode;t!==e&&(!n||!n(t));t=t.parentNode)r.push(t);return r}(e,n),a=kn.filter(a,s(Ge.isBogus)),(u=u.concat(kn.map(a,function(e){return qu(e)}))).reverse().join("/")+","+o}function Wu(e,t){var n,r,o;return t?(t=(n=t.split(","))[0].split("/"),o=1<n.length?n[1]:"before",(r=kn.reduce(t,function(e,t){return(t=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t))?("text()"===t[1]&&(t[1]="#text"),function(e,t,n){var r=Ps(e);return r=kn.filter(r,function(e,t){return!_s(e)||!_s(r[t-1])}),(r=kn.filter(r,Ge.matchNodeNames([t])))[n]}(e,t[1],parseInt(t[2],10))):null},e))?_s(r)?function(e,t){for(var n,r=e,o=0;_s(r);){if(n=r.data.length,o<=t&&t<=o+n){e=r,t-=o;break}if(!_s(r.nextSibling)){e=r,t=n;break}o+=n,r=r.nextSibling}return _s(e)&&t>e.data.length&&(t=e.data.length),Ds(e,t)}(r,parseInt(o,10)):(o="after"===o?Os(r)+1:Os(r),Ds(r.parentNode,o)):null):null}function Ku(e,t){Ge.isText(t)&&0===t.data.length&&e.remove(t)}function Xu(e,t,n){Ge.isDocumentFragment(n)?function(t,e,n){var r=k.from(n.firstChild),o=k.from(n.lastChild);e.insertNode(n),r.each(function(e){return Ku(t,e.previousSibling)}),o.each(function(e){return Ku(t,e.nextSibling)})}(e,t,n):function(e,t,n){t.insertNode(n),Ku(e,n.previousSibling),Ku(e,n.nextSibling)}(e,t,n)}function Yu(e,t,n,r,o){var i,a=r[o?"startContainer":"endContainer"],u=r[o?"startOffset":"endOffset"],s=[],c=0,l=e.getRoot();for(Ge.isText(a)?s.push(n?function(e,t,n){var r,o;for(o=e(t.data.slice(0,n)).length,r=t.previousSibling;r&&Ge.isText(r);r=r.previousSibling)o+=e(r.data).length;return o}(t,a,u):u):(u>=(i=a.childNodes).length&&i.length&&(c=1,u=Math.max(0,i.length-1)),s.push(e.nodeIndex(i[u],n)+c));a&&a!==l;a=a.parentNode)s.push(e.nodeIndex(a,n));return s}function Gu(e,t,n){var r=0;return Mn.each(e.select(t),function(e){if("all"!==e.getAttribute("data-mce-bogus"))return e!==n&&void r++}),r}function Ju(e,t){var n,r,o,i=t?"start":"end";n=e[i+"Container"],r=e[i+"Offset"],Ge.isElement(n)&&"TR"===n.nodeName&&(n=(o=n.childNodes)[Math.min(t?r:r-1,o.length-1)])&&(r=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,r))}function Qu(e){return Ju(e,!0),Ju(e,!1),e}function Zu(e,t){var n;if(Ge.isElement(e)&&(e=Ka(e,t),Ls(e)))return e;if(Da(e)){if(Ge.isText(e)&&Ma(e)&&(e=e.parentNode),n=e.previousSibling,Ls(n))return n;if(n=e.nextSibling,Ls(n))return n}}function es(e,t,n){var r=n.getNode(),o=r?r.nodeName:null,i=n.getRng();if(Ls(r)||"IMG"===o)return{name:o,index:Gu(n.dom,o,r)};var a=function(e){return Zu(e.startContainer,e.startOffset)||Zu(e.endContainer,e.endOffset)}(i);return a?{name:o=a.tagName,index:Gu(n.dom,o,a)}:function(e,t,n,r){var o=t.dom,i={};return i.start=Yu(o,e,n,r,!0),t.isCollapsed()||(i.end=Yu(o,e,n,r,!1)),i}(e,n,t,i)}function ts(e,t,n){var r={"data-mce-type":"bookmark",id:t,style:"overflow:hidden;line-height:0px"};return n?e.create("span",r,"&#xFEFF;"):e.create("span",r)}function ns(e,t){var n=e.dom,r=e.getRng(),o=n.uniqueId(),i=e.isCollapsed(),a=e.getNode(),u=a.nodeName;if("IMG"===u)return{name:u,index:Gu(n,u,a)};var s=Qu(r.cloneRange());if(!i){s.collapse(!1);var c=ts(n,o+"_end",t);Xu(n,s,c)}(r=Qu(r)).collapse(!0);var l=ts(n,o+"_start",t);return Xu(n,r,l),e.moveToBookmark({id:o,keep:1}),{id:o}}function rs(e){return Ge.isElement(e)&&e.id===Is}function os(e,t){for(;t&&t!==e;){if(t.id===Is)return t;t=t.parentNode}return null}function is(e){var t=e.parentNode;t&&t.removeChild(e)}function as(e,t){0===t.length?is(e):e.nodeValue=t}function us(e){var t=lu(e);return{count:e.length-t.length,text:t}}function ss(e,t){return js(e),t}function cs(e,t){var n=t.container(),r=function(e,t){var n=f(e,t);return-1===n?k.none():k.some(n)}(P(n.childNodes),e).map(function(e){return e<t.offset()?Ds(n,t.offset()-1):t}).getOr(t);return js(e),r}function ls(e,t){return Us(e)&&t.container()===e?function(e,t){var n=us(e.data.substr(0,t.offset())),r=us(e.data.substr(t.offset())),o=n.text+r.text;return 0<o.length?(as(e,o),Ds(e,t.offset()-n.count)):t}(e,t):ss(e,t)}function fs(e,t,n){var r,o,i,a,u,s=Fa(t.getBoundingClientRect(),n);return i="BODY"===e.tagName?(r=e.ownerDocument.documentElement,o=e.scrollLeft||r.scrollLeft,e.scrollTop||r.scrollTop):(u=e.getBoundingClientRect(),o=e.scrollLeft-u.left,e.scrollTop-u.top),s.left+=o,s.right+=o,s.top+=i,s.bottom+=i,s.width=1,0<(a=t.offsetWidth-t.clientWidth)&&(n&&(a*=-1),s.left+=a,s.right+=a),s}function ds(i,a,e){var t,u,s=Je(k.none()),c=function(){!function(e){var t,n,r,o,i;for(t=vi("*[contentEditable=false]",e),o=0;o<t.length;o++)r=(n=t[o]).previousSibling,mu(r)&&(1===(i=r.data).length?r.parentNode.removeChild(r):r.deleteData(i.length-1,1)),r=n.nextSibling,hu(r)&&(1===(i=r.data).length?r.parentNode.removeChild(r):r.deleteData(0,1))}(i),u&&(qs.remove(u),u=null),s.get().each(function(e){vi(e.caret).remove(),s.set(k.none())}),pn.clearInterval(t)},l=function(){t=pn.setInterval(function(){e()?vi("div.mce-visual-caret",i).toggleClass("mce-visual-caret-hidden"):vi("div.mce-visual-caret",i).addClass("mce-visual-caret-hidden")},500)};return{show:function(t,e){var n,r;if(c(),function(e){return Ge.isElement(e)&&/^(TD|TH)$/i.test(e.tagName)}(e))return null;if(!a(e))return u=function(e,t){var n,r,o;if(r=e.ownerDocument.createTextNode(cu),o=e.parentNode,t){if(n=e.previousSibling,du(n)){if(Da(n))return n;if(mu(n))return n.splitText(n.data.length-1)}o.insertBefore(r,e)}else{if(n=e.nextSibling,du(n)){if(Da(n))return n;if(hu(n))return n.splitText(1),n}e.nextSibling?o.insertBefore(r,e.nextSibling):o.appendChild(r)}return r}(e,t),r=e.ownerDocument.createRange(),Ws(u.nextSibling)?(r.setStart(u,0),r.setEnd(u,0)):(r.setStart(u,1),r.setEnd(u,1)),r;u=Ha("p",e,t),n=fs(i,e,t),vi(u).css("top",n.top);var o=vi('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(n).appendTo(i)[0];return s.set(k.some({caret:o,element:e,before:t})),s.get().each(function(e){t&&vi(e.caret).addClass("mce-visual-caret-before")}),l(),(r=e.ownerDocument.createRange()).setStart(u,0),r.setEnd(u,0),r},hide:c,getCss:function(){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;}"},reposition:function(){s.get().each(function(e){var t=fs(i,e.element,e.before);vi(e.caret).css(G({},t))})},destroy:function(){return pn.clearInterval(t)}}}function hs(){return $s.isIE()||$s.isEdge()||$s.isFirefox()}function ms(e){return Ws(e)||Ge.isTable(e)&&hs()}function gs(e){return 0<e}function ps(e){return e<0}function vs(e,t){for(var n;n=e(t);)if(!Gs(n))return n;return null}function ys(e,t,n,r,o){var i=new yi(e,r);if(ps(t)){if((Ks(e)||Gs(e))&&n(e=vs(i.prev,!0)))return e;for(;e=vs(i.prev,o);)if(n(e))return e}if(gs(t)){if((Ks(e)||Gs(e))&&n(e=vs(i.next,!0)))return e;for(;e=vs(i.next,o);)if(n(e))return e}return null}function bs(e,t){for(;e&&e!==t;){if(Xs(e))return e;e=e.parentNode}return null}function Cs(e,t,n){return bs(e.container(),n)===bs(t.container(),n)}function ws(e,t){var n,r;return t?(n=t.container(),r=t.offset(),Js(n)?n.childNodes[r+e]:null):null}function xs(e,t){var n=t.ownerDocument.createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n}function zs(e,t,n){var r,o,i,a;for(o=e?"previousSibling":"nextSibling";n&&n!==t;){if(r=n[o],Ys(r)&&(r=r[o]),Ks(r)){if(a=n,bs(r,i=t)===bs(a,i))return r;break}if(Qs(r))break;n=n.parentNode}return null}function Es(e,t,n){var r,o,i,a,u=d(zs,!0,t),s=d(zs,!1,t);if(o=n.startContainer,i=n.startOffset,Ma(o)){if(Js(o)||(o=o.parentNode),"before"===(a=o.getAttribute("data-mce-caret"))&&(r=o.nextSibling,ms(r)))return Zs(r);if("after"===a&&(r=o.previousSibling,ms(r)))return ec(r)}if(!n.collapsed)return n;if(Ge.isText(o)){if(Ys(o)){if(1===e){if(r=s(o))return Zs(r);if(r=u(o))return ec(r)}if(-1===e){if(r=u(o))return ec(r);if(r=s(o))return Zs(r)}return n}if(mu(o)&&i>=o.data.length-1)return 1===e&&(r=s(o))?Zs(r):n;if(hu(o)&&i<=1)return-1===e&&(r=u(o))?ec(r):n;if(i===o.data.length)return(r=s(o))?Zs(r):n;if(0===i)return(r=u(o))?ec(r):n}return n}function Ns(e,t){return k.from(ws(e?0:-1,t)).filter(Ks)}function Ss(e,t,n){var r=Es(e,t,n);return-1===e?Uu.fromRangeStart(r):Uu.fromRangeEnd(r)}function ks(e){return k.from(e.getNode()).map(yt.fromDom)}function Ts(e,t){for(;t=e(t);)if(t.isVisible())return t;return t}function As(e,t){var n=Cs(e,t);return!(n||!Ge.isBr(e.getNode()))||n}var Ms,Rs,Ds=Uu,_s=Ge.isText,Bs=Ge.isBogus,Os=Xi.nodeIndex,Hs=function(e){var t=e.parentNode;return Bs(t)?Hs(t):t},Ps=function(e){return e?kn.reduce(e.childNodes,function(e,t){return Bs(t)&&"BR"!==t.nodeName?e=e.concat(Ps(t)):e.push(t),e},[]):[]},Ls=Ge.isContentEditableFalse,Vs={getBookmark:function(e,t,n){return 2===t?es(lu,n,e):3===t?function(e){var t=e.getRng();return{start:$u(e.dom.getRoot(),Ds.fromRangeStart(t)),end:$u(e.dom.getRoot(),Ds.fromRangeEnd(t))}}(e):t?function(e){return{rng:e.getRng()}}(e):ns(e,!1)},getUndoBookmark:d(es,W,!0),getPersistentBookmark:ns},Is="_mce_caret",Fs=Ge.isElement,Us=Ge.isText,js=function(e){if(Fs(e)&&Da(e)&&(_a(e)?e.removeAttribute("data-mce-caret"):is(e)),Us(e)){var t=lu(function(e){try{return e.nodeValue}catch(t){return""}}(e));as(e,t)}},qs={removeAndReposition:function(e,t){return Ds.isTextPosition(t)?ls(e,t):function(e,t){return t.container()===e.parentNode?cs(e,t):ss(e,t)}(e,t)},remove:js},$s=oe().browser,Ws=Ge.isContentEditableFalse,Ks=Ge.isContentEditableFalse,Xs=Ge.matchStyleValues("display","block table table-cell table-caption list-item"),Ys=Da,Gs=Ma,Js=Ge.isElement,Qs=La,Zs=d(xs,!0),ec=d(xs,!1);(Rs=Ms=Ms||{})[Rs.Backwards=-1]="Backwards",Rs[Rs.Forwards=1]="Forwards";function tc(e,t){return e.hasChildNodes()&&t<e.childNodes.length?e.childNodes[t]:null}function nc(e,t){if(gs(e)){if(Ac(t.previousSibling)&&!Sc(t.previousSibling))return Ds.before(t);if(Sc(t))return Ds(t,0)}if(ps(e)){if(Ac(t.nextSibling)&&!Sc(t.nextSibling))return Ds.after(t);if(Sc(t))return Ds(t,t.data.length)}return ps(e)?Tc(t)?Ds.before(t):Ds.after(t):Ds.before(t)}function rc(t){return{next:function(e){return Dc(Ms.Forwards,e,t)},prev:function(e){return Dc(Ms.Backwards,e,t)}}}function oc(e){return Ds.isTextPosition(e)?0===e.offset():La(e.getNode())}function ic(e){if(Ds.isTextPosition(e)){var t=e.container();return e.offset()===t.data.length}return La(e.getNode(!0))}function ac(e,t){return!Ds.isTextPosition(e)&&!Ds.isTextPosition(t)&&e.getNode()===t.getNode(!0)}function uc(e,t,n){return e?!ac(t,n)&&!function(e){return!Ds.isTextPosition(e)&&Ge.isBr(e.getNode())}(t)&&ic(t)&&oc(n):!ac(n,t)&&oc(t)&&ic(n)}function sc(t,n,r){return _c(t,n,r).bind(function(e){return Cs(r,e,n)&&uc(t,r,e)?_c(t,n,e):k.some(e)})}function cc(e,t){var n=e?t.firstChild:t.lastChild;return Ge.isText(n)?k.some(Ds(n,e?0:n.data.length)):n?La(n)?k.some(e?Ds.before(n):function(e){return Ge.isBr(e)?Ds.before(e):Ds.after(e)}(n)):function(e,t,n){var r=e?Ds.before(n):Ds.after(n);return _c(e,t,r)}(e,t,n):k.none()}function lc(e,t){return Ge.isElement(t)&&e.isBlock(t)&&!t.innerHTML&&!Nn.ie&&(t.innerHTML='<br data-mce-bogus="1" />'),t}function fc(e,t){return Pc.lastPositionIn(e).fold(function(){return!1},function(e){return t.setStart(e.container(),e.offset()),t.setEnd(e.container(),e.offset()),!0})}function dc(e,t,n){return!(!function(e){return!1===e.hasChildNodes()}(t)||!os(e,t))&&(function(e,t){var n=e.ownerDocument.createTextNode(cu);e.appendChild(n),t.setStart(n,0),t.setEnd(n,0)}(t,n),!0)}function hc(e,t,n,r){var o,i,a,u,s=n[t?"start":"end"],c=e.getRoot();if(s){for(a=s[0],i=c,o=s.length-1;1<=o;o--){if(u=i.childNodes,dc(c,i,r))return!0;if(s[o]>u.length-1)return!!dc(c,i,r)||fc(i,r);i=u[s[o]]}3===i.nodeType&&(a=Math.min(s[0],i.nodeValue.length)),1===i.nodeType&&(a=Math.min(s[0],i.childNodes.length)),t?r.setStart(i,a):r.setEnd(i,a)}return!0}function mc(e){return Ge.isText(e)&&0<e.data.length}function gc(e,t,n){var r,o,i,a,u,s,c=e.get(n.id+"_"+t),l=n.keep;if(c){if(r=c.parentNode,s=(u=(o="start"===t?l?c.hasChildNodes()?(r=c.firstChild,1):mc(c.nextSibling)?(r=c.nextSibling,0):mc(c.previousSibling)?(r=c.previousSibling,c.previousSibling.data.length):(r=c.parentNode,e.nodeIndex(c)+1):e.nodeIndex(c):l?c.hasChildNodes()?(r=c.firstChild,1):mc(c.previousSibling)?(r=c.previousSibling,c.previousSibling.data.length):(r=c.parentNode,e.nodeIndex(c)):e.nodeIndex(c),r),o),!l){for(a=c.previousSibling,i=c.nextSibling,Mn.each(Mn.grep(c.childNodes),function(e){Ge.isText(e)&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});c=e.get(n.id+"_"+t);)e.remove(c,!0);a&&i&&a.nodeType===i.nodeType&&Ge.isText(a)&&!Nn.opera&&(o=a.nodeValue.length,a.appendData(i.nodeValue),e.remove(i),s=(u=a,o))}return k.some(Ds(u,s))}return k.none()}function pc(e){return e&&/^(IMG)$/.test(e.nodeName)}function vc(e,t,n){return"color"!==n&&"backgroundColor"!==n||(t=e.toHex(t)),"fontWeight"===n&&700===t&&(t="bold"),"fontFamily"===n&&(t=t.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+t}function yc(e,t){for(void 0===t&&(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 bc(e,t){for(var n=t;n;){if(1===n.nodeType&&e.getContentEditable(n))return"false"===e.getContentEditable(n)?n:t;n=n.parentNode}return t}function Cc(e,t,n,r){var o,i,a=n.nodeValue;return void 0===r&&(r=e?a.length:0),e?(o=a.lastIndexOf(" ",r),-1!==(o=(i=a.lastIndexOf("\xa0",r))<o?o:i)&&!t&&(o<r||!e)&&o<=a.length&&o++):(o=a.indexOf(" ",r),i=a.indexOf("\xa0",r),o=-1!==o&&(-1===i||o<i)?o:i),o}function wc(e,t,n,r,o,i){var a,u,s;if(3===n.nodeType){if(-1!==(u=Cc(o,i,n,r)))return{container:n,offset:u};s=n}for(var c=new yi(n,e.getParent(n,e.isBlock)||t);a=c[o?"prev":"next"]();)if(3!==a.nodeType||qc(a.parentNode)){if(e.isBlock(a)||jc.isEq(a,"BR"))break}else if(-1!==(u=Cc(o,i,s=a)))return{container:a,offset:u};if(s)return{container:s,offset:r=o?0:s.length}}function xc(e,t,n,r,o){var i,a,u,s;for(3===r.nodeType&&0===r.nodeValue.length&&r[o]&&(r=r[o]),i=$c(e,r),a=0;a<i.length;a++)for(u=0;u<t.length;u++)if(!("collapsed"in(s=t[u])&&s.collapsed!==n.collapsed)&&e.is(i[a],s.selector))return i[a];return r}function zc(t,e,n,r){var o,i=t.dom,a=i.getRoot();if(e[0].wrapper||(o=i.getParent(n,e[0].block,a)),!o){var u=i.getParent(n,"LI,TD,TH");o=i.getParent(3===n.nodeType?n.parentNode:n,function(e){return e!==a&&Kc(t,e)},u)}if(o&&e[0].wrapper&&(o=$c(i,o,"ul,ol").reverse()[0]||o),!o)for(o=n;o[r]&&!i.isBlock(o[r])&&(o=o[r],!jc.isEq(o,"br")););return o||n}function Ec(e,t,n,r,o,i,a){var u,s,c,l,f,d;if(u=s=a?n:o,l=a?"previousSibling":"nextSibling",f=e.getRoot(),3===u.nodeType&&!Wc(u)&&(a?0<r:i<u.nodeValue.length))return u;for(;;){if(!t[0].block_expand&&e.isBlock(s))return s;for(c=s[l];c;c=c[l])if(!qc(c)&&!Wc(c)&&("BR"!==(d=c).nodeName||!d.getAttribute("data-mce-bogus")||d.nextSibling))return s;if(s===f||s.parentNode===f){u=s;break}s=s.parentNode}return u}var Nc=Ge.isContentEditableFalse,Sc=Ge.isText,kc=Ge.isElement,Tc=Ge.isBr,Ac=La,Mc=function(e){return Cu(e)||function(e){return!!zu(e)&&!0!==b(P(e.getElementsByTagName("*")),function(e,t){return e||gu(t)},!1)}(e)},Rc=Va,Dc=function(e,t,n){var r,o,i,a,u;if(!kc(n)||!t)return null;if(t.isEqual(Ds.after(n))&&n.lastChild){if(u=Ds.after(n.lastChild),ps(e)&&Ac(n.lastChild)&&kc(n.lastChild))return Tc(n.lastChild)?Ds.before(n.lastChild):u}else u=t;var s=u.container(),c=u.offset();if(Sc(s)){if(ps(e)&&0<c)return Ds(s,--c);if(gs(e)&&c<s.length)return Ds(s,++c);r=s}else{if(ps(e)&&0<c&&(o=tc(s,c-1),Ac(o)))return!Mc(o)&&(i=ys(o,e,Rc,o))?Sc(i)?Ds(i,i.data.length):Ds.after(i):Sc(o)?Ds(o,o.data.length):Ds.before(o);if(gs(e)&&c<s.childNodes.length&&(o=tc(s,c),Ac(o)))return Tc(o)?function(e,t){var n=t.nextSibling;return n&&Ac(n)?Sc(n)?Ds(n,0):Ds.before(n):Dc(Ms.Forwards,Ds.after(t),e)}(n,o):!Mc(o)&&(i=ys(o,e,Rc,o))?Sc(i)?Ds(i,0):Ds.before(i):Sc(o)?Ds(o,0):Ds.after(o);r=o||u.getNode()}return(gs(e)&&u.isAtEnd()||ps(e)&&u.isAtStart())&&(r=ys(r,e,$(!0),n,!0),Rc(r,n))?nc(e,r):(o=ys(r,e,Rc,n),!(a=kn.last(y(function(e,t){for(var n=[];e&&e!==t;)n.push(e),e=e.parentNode;return n}(s,n),Nc)))||o&&a.contains(o)?o?nc(e,o):null:u=gs(e)?Ds.after(a):Ds.before(a))},_c=function(e,t,n){var r=rc(t);return k.from(e?r.next(n):r.prev(n))},Bc=function(t,n,e,r){return sc(t,n,e).bind(function(e){return r(e)?Bc(t,n,e,r):k.some(e)})},Oc=d(_c,!0),Hc=d(_c,!1),Pc={fromPosition:_c,nextPosition:Oc,prevPosition:Hc,navigate:sc,navigateIgnore:Bc,positionIn:cc,firstPositionIn:d(cc,!0),lastPositionIn:d(cc,!1)},Lc=function(e,t){var n=e.dom;if(t){if(function(e){return Mn.isArray(e.start)}(t))return function(e,t){var n=e.createRng();return hc(e,!0,t,n)&&hc(e,!1,t,n)?k.some(n):k.none()}(n,t);if(function(e){return"string"==typeof e.start}(t))return k.some(function(e,t){var n,r;return n=e.createRng(),r=Wu(e.getRoot(),t.start),n.setStart(r.container(),r.offset()),r=Wu(e.getRoot(),t.end),n.setEnd(r.container(),r.offset()),n}(n,t));if(function(e){return e.hasOwnProperty("id")}(t))return function(r,e){var t=gc(r,"start",e),n=gc(r,"end",e);return Ya(t,n.or(t),function(e,t){var n=r.createRng();return n.setStart(lc(r,e.container()),e.offset()),n.setEnd(lc(r,t.container()),t.offset()),n})}(n,t);if(function(e){return e.hasOwnProperty("name")}(t))return function(n,e){return k.from(n.select(e.name)[e.index]).map(function(e){var t=n.createRng();return t.selectNode(e),t})}(n,t);if(function(e){return e.hasOwnProperty("rng")}(t))return k.some(t.rng)}return k.none()},Vc=function(e,t,n){return Vs.getBookmark(e,t,n)},Ic=function(t,e){Lc(t,e).each(function(e){t.setRng(e)})},Fc=function(e){return Ge.isElement(e)&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},Uc=function(e){return e&&3===e.nodeType&&/^([\t \r\n]+|)$/.test(e.nodeValue)},jc={isInlineBlock:pc,moveStart:function(e,t,n){var r,o,i,a=n.startOffset,u=n.startContainer;if((n.startContainer!==n.endContainer||!pc(n.startContainer.childNodes[n.startOffset]))&&1===u.nodeType)for(a<(i=u.childNodes).length?(u=i[a],r=new yi(u,e.getParent(u,e.isBlock))):(u=i[i.length-1],(r=new yi(u,e.getParent(u,e.isBlock))).next(!0)),o=r.current();o;o=r.next())if(3===o.nodeType&&!Uc(o))return n.setStart(o,0),void t.setRng(n)},getNonWhiteSpaceSibling:function(e,t,n){if(e)for(t=t?"nextSibling":"previousSibling",e=n?e:e[t];e;e=e[t])if(1===e.nodeType||!Uc(e))return e},isTextBlock:function(e,t){return t.nodeType&&(t=t.nodeName),!!e.schema.getTextBlockElements()[t.toLowerCase()]},isValid:function(e,t,n){return e.schema.isValidChild(t,n)},isWhiteSpaceNode:Uc,replaceVars:function(e,n){return"string"!=typeof e?e=e(n):n&&(e=e.replace(/%(\w+)/g,function(e,t){return n[t]||e})),e},isEq:function(e,t){return e=""+((e=e||"").nodeName||e),t=""+((t=t||"").nodeName||t),e.toLowerCase()===t.toLowerCase()},normalizeStyleValue:vc,getStyle:function(e,t,n){return vc(e,e.getStyle(t,n),n)},getTextDecoration:function(t,e){var n;return t.getParent(e,function(e){return(n=t.getStyle(e,"text-decoration"))&&"none"!==n}),n},getParents:function(e,t,n){return e.getParents(t,n,e.getRoot())}},qc=Fc,$c=jc.getParents,Wc=jc.isWhiteSpaceNode,Kc=jc.isTextBlock,Xc=function(e,t,n,r){var o,i=t.startContainer,a=t.startOffset,u=t.endContainer,s=t.endOffset,c=e.dom;return 1===i.nodeType&&i.hasChildNodes()&&3===(i=Ka(i,a)).nodeType&&(a=0),1===u.nodeType&&u.hasChildNodes()&&3===(u=Ka(u,t.collapsed?s:s-1)).nodeType&&(s=u.nodeValue.length),i=bc(c,i),u=bc(c,u),(qc(i.parentNode)||qc(i))&&(i=qc(i)?i:i.parentNode,3===(i=t.collapsed?i.previousSibling||i:i.nextSibling||i).nodeType&&(a=t.collapsed?i.length:0)),(qc(u.parentNode)||qc(u))&&(u=qc(u)?u:u.parentNode,3===(u=t.collapsed?u.nextSibling||u:u.previousSibling||u).nodeType&&(s=t.collapsed?0:u.length)),t.collapsed&&((o=wc(c,e.getBody(),i,a,!0,r))&&(i=o.container,a=o.offset),(o=wc(c,e.getBody(),u,s,!1,r))&&(u=o.container,s=o.offset)),n[0].inline&&(u=r?u:function(e,t){var n=yc(e,t);if(n.node){for(;n.node&&0===n.offset&&n.node.previousSibling;)n=yc(n.node.previousSibling);n.node&&0<n.offset&&3===n.node.nodeType&&" "===n.node.nodeValue.charAt(n.offset-1)&&1<n.offset&&(e=n.node).splitText(n.offset-1)}return e}(u,s)),(n[0].inline||n[0].block_expand)&&(n[0].inline&&3===i.nodeType&&0!==a||(i=Ec(c,n,i,a,u,s,!0)),n[0].inline&&3===u.nodeType&&s!==u.nodeValue.length||(u=Ec(c,n,i,a,u,s,!1))),n[0].selector&&!1!==n[0].expand&&!n[0].inline&&(i=xc(c,n,t,i,"previousSibling"),u=xc(c,n,t,u,"nextSibling")),(n[0].block||n[0].selector)&&(i=zc(e,n,i,"previousSibling"),u=zc(e,n,u,"nextSibling"),n[0].block&&(c.isBlock(i)||(i=Ec(c,n,i,a,u,s,!0)),c.isBlock(u)||(u=Ec(c,n,i,a,u,s,!1)))),1===i.nodeType&&(a=c.nodeIndex(i),i=i.parentNode),1===u.nodeType&&(s=c.nodeIndex(u)+1,u=u.parentNode),{startContainer:i,startOffset:a,endContainer:u,endOffset:s}},Yc=Mn.each,Gc=function(e,t,o){var n,r,i,a,u,s,c,l=t.startContainer,f=t.startOffset,d=t.endContainer,h=t.endOffset;if(0<(c=e.select("td[data-mce-selected],th[data-mce-selected]")).length)Yc(c,function(e){o([e])});else{var m=function(e){var t;return 3===(t=e[0]).nodeType&&t===l&&f>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===h&&0<e.length&&t===d&&3===t.nodeType&&e.splice(e.length-1,1),e},g=function(e,t,n){for(var r=[];e&&e!==n;e=e[t])r.push(e);return r},p=function(e,t){do{if(e.parentNode===t)return e;e=e.parentNode}while(e)},v=function(e,t,n){var r=n?"nextSibling":"previousSibling";for(u=(a=e).parentNode;a&&a!==t;a=u)u=a.parentNode,(s=g(a===e?a:a[r],r)).length&&(n||s.reverse(),o(m(s)))};if(1===l.nodeType&&l.hasChildNodes()&&(l=l.childNodes[f]),1===d.nodeType&&d.hasChildNodes()&&(d=function(e,t){var n=e.childNodes;return--t>n.length-1?t=n.length-1:t<0&&(t=0),n[t]||e}(d,h)),l===d)return o(m([l]));for(n=e.findCommonAncestor(l,d),a=l;a;a=a.parentNode){if(a===d)return v(l,n,!0);if(a===n)break}for(a=d;a;a=a.parentNode){if(a===l)return v(d,n);if(a===n)break}r=p(l,n)||l,i=p(d,n)||d,v(l,r,!0),(s=g(r===l?r:r.nextSibling,"nextSibling",i===d?i.nextSibling:i)).length&&o(m(s)),v(d,i)}};function Jc(e){return ol.get(e)}function Qc(t,n,r,o){return Se(n).fold(function(){return"skipping"},function(e){return"br"===o||function(e){return zt(e)&&"\ufeff"===Jc(e)}(n)?"valid":function(e){return xt(e)&&ha(e,nu())}(n)?"existing":rs(n)?"caret":jc.isValid(t,r,o)&&jc.isValid(t,ie(e),r)?"valid":"invalid-child"})}function Zc(e,t,n,r){var o=t.uid,i=void 0===o?function(e){var t=(new Date).getTime();return e+"_"+Math.floor(1e9*Math.random())+ ++au+String(t)}("mce-annotation"):o,a=function h(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["uid"]),u=yt.fromTag("span",e);fa(u,nu()),Tt(u,""+ou(),i),Tt(u,""+ru(),n);var s=r(i,a),c=s.attributes,l=void 0===c?{}:c,f=s.classes,d=void 0===f?[]:f;return me(u,l),function(t,e){z(e,function(e){fa(t,e)})}(u,d),u}function el(n,e,t,r,o){function i(){c.set(k.none())}function a(e){z(e,l)}var u=[],s=Zc(n.getDoc(),o,t,r),c=Je(k.none()),l=function(e){switch(Qc(n,e,"span",ie(e))){case"invalid-child":i();var t=Re(e);a(t),i();break;case"valid":!function(e,t){Ci(e,t),Di(t,e)}(e,c.get().getOrThunk(function(){var e=ka(s);return u.push(e),c.set(k.some(e)),e}))}};return Gc(n.dom,e,function(e){i(),function(e){var t=X(e,yt.fromDom);a(t)}(e)}),u}function tl(o,i,a,u){o.undoManager.transact(function(){var e=o.selection.getRng();if(e.collapsed&&function(e,t){var n=Xc(e,t,[{inline:!0}],function(e){return 3===e.startContainer.nodeType&&e.startContainer.nodeValue.length>=e.startOffset&&"\xa0"===e.startContainer.nodeValue[e.startOffset]}(t));t.setStart(n.startContainer,n.startOffset),t.setEnd(n.endContainer,n.endOffset),e.selection.setRng(t)}(o,e),o.selection.getRng().collapsed){var t=Zc(o.getDoc(),u,i,a.decorate);Aa(t,"\xa0"),o.selection.getRng().insertNode(t.dom()),o.selection.select(t.dom())}else{var n=Vs.getPersistentBookmark(o.selection,!1),r=o.selection.getRng();el(o,r,i,a.decorate,u),o.selection.moveToBookmark(n)}})}function nl(r){var o=function(){var n={};return{register:function(e,t){n[e]={name:e,settings:t}},lookup:function(e){return n.hasOwnProperty(e)?k.from(n[e]).map(function(e){return e.settings}):k.none()}}}();Na(r,o);var n=Ea(r);return{register:function(e,t){o.register(e,t)},annotate:function(t,n){o.lookup(t).each(function(e){tl(r,t,e,n)})},annotationChanged:function(e,t){n.addListener(e,t)},remove:function(e){za(r,k.some(e)).each(function(e){var t=e.elements;z(t,Ni)})},getAll:function(e){var t=function(e,t){var n=yt.fromDom(e.getBody()),r=ma(n,"["+ru()+'="'+t+'"]'),o={};return z(r,function(e){var t=ge(e,ou()),n=o.hasOwnProperty(t)?o[t]:[];o[t]=n.concat([e])}),o}(r,e);return se(t,function(e){return X(e,function(e){return e.dom()})})}}}function rl(e,t,n){var r=n?"lastChild":"firstChild",o=n?"prev":"next";if(e[r])return e[r];if(e!==t){var i=e[o];if(i)return i;for(var a=e.parent;a&&a!==t;a=a.parent)if(i=a[o])return i}}var ol=function bN(n,r){var t=function(e){return n(e)?k.from(e.dom().nodeValue):k.none()};return{get:function(e){if(!n(e))throw new Error("Can only get "+r+" value of a "+r+" node");return t(e).getOr("")},getOption:t,set:function(e,t){if(!n(e))throw new Error("Can only set raw "+r+" value of a "+r+" node");e.dom().nodeValue=t}}}(zt,"text"),il=/^[ \t\r\n]*$/,al={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},ul=(sl.create=function(e,t){var n=new sl(e,al[e]||1);if(t)for(var r in t)n.attr(r,t[r]);return n},sl.prototype.replace=function(e){return e.parent&&e.remove(),this.insert(e,this),this.remove(),this},sl.prototype.attr=function(e,t){var n;if("string"!=typeof e){for(var r in e)this.attr(r,e[r]);return this}if(n=this.attributes){if(t===undefined)return n.map[e];if(null===t){if(e in n.map){delete n.map[e];for(var o=n.length;o--;)if(n[o].name===e)return n.splice(o,1),this}return this}if(e in n.map){for(o=n.length;o--;)if(n[o].name===e){n[o].value=t;break}}else n.push({name:e,value:t});return n.map[e]=t,this}},sl.prototype.clone=function(){var e,t=new sl(this.name,this.type);if(e=this.attributes){var n=[];n.map={};for(var r=0,o=e.length;r<o;r++){var i=e[r];"id"!==i.name&&(n[n.length]={name:i.name,value:i.value},n.map[i.name]=i.value)}t.attributes=n}return t.value=this.value,t.shortEnded=this.shortEnded,t},sl.prototype.wrap=function(e){return this.parent.insert(e,this),e.append(this),this},sl.prototype.unwrap=function(){for(var e=this.firstChild;e;){var t=e.next;this.insert(e,this,!0),e=t}this.remove()},sl.prototype.remove=function(){var e=this.parent,t=this.next,n=this.prev;return e&&(e.firstChild===this?(e.firstChild=t)&&(t.prev=null):n.next=t,e.lastChild===this?(e.lastChild=n)&&(n.next=null):t.prev=n,this.parent=this.next=this.prev=null),this},sl.prototype.append=function(e){e.parent&&e.remove();var t=this.lastChild;return t?((t.next=e).prev=t,this.lastChild=e):this.lastChild=this.firstChild=e,e.parent=this,e},sl.prototype.insert=function(e,t,n){e.parent&&e.remove();var r=t.parent||this;return n?(t===r.firstChild?r.firstChild=e:t.prev.next=e,e.prev=t.prev,(e.next=t).prev=e):(t===r.lastChild?r.lastChild=e:t.next.prev=e,e.next=t.next,(e.prev=t).next=e),e.parent=r,e},sl.prototype.getAll=function(e){for(var t=[],n=this.firstChild;n;n=rl(n,this))n.name===e&&t.push(n);return t},sl.prototype.empty=function(){if(this.firstChild){for(var e=[],t=this.firstChild;t;t=rl(t,this))e.push(t);for(var n=e.length;n--;)(t=e[n]).parent=t.firstChild=t.lastChild=t.next=t.prev=null}return this.firstChild=this.lastChild=null,this},sl.prototype.isEmpty=function(e,t,n){void 0===t&&(t={});var r=this.firstChild;if(r)do{if(1===r.type){if(r.attr("data-mce-bogus"))continue;if(e[r.name])return!1;for(var o=r.attributes.length;o--;){var i=r.attributes[o].name;if("name"===i||0===i.indexOf("data-mce-bookmark"))return!1}}if(8===r.type)return!1;if(3===r.type&&!il.test(r.value))return!1;if(3===r.type&&r.parent&&t[r.parent.name]&&il.test(r.value))return!1;if(n&&n(r))return!1}while(r=rl(r,this));return!0},sl.prototype.walk=function(e){return rl(this,null,e)},sl);function sl(e,t){this.name=e,1===(this.type=t)&&(this.attributes=[],this.attributes.map={})}function cl(e,t,n){var r,o,i,a,u=1;for(a=e.getShortEndedElements(),(i=/<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g).lastIndex=r=n;o=i.exec(t);){if(r=i.lastIndex,"/"===o[1])u--;else if(!o[1]){if(o[2]in a)continue;u++}if(0===u)break}return r}function ll(e,t){var n=e.exec(t);if(n){var r=n[1],o=n[2];return"string"==typeof r&&"data-mce-bogus"===r.toLowerCase()?o:null}return null}function fl(V,I){void 0===I&&(I=pr());function e(){}!1!==(V=V||{}).fix_self_closing&&(V.fix_self_closing=!0);var F=V.comment?V.comment:e,U=V.cdata?V.cdata:e,j=V.text?V.text:e,q=V.start?V.start:e,$=V.end?V.end:e,W=V.pi?V.pi:e,K=V.doctype?V.doctype:e;return{parse:function(e){function t(e){var t,n;for(t=_.length;t--&&_[t].name!==e;);if(0<=t){for(n=_.length-1;t<=n;n--)(e=_[n]).valid&&$(e.name);_.length=t}}function n(e,t,n,r,o){var i,a;if(n=(t=t.toLowerCase())in h?t:O(n||r||o||""),g&&!l&&!1===function(e){return 0===e.indexOf("data-")||0===e.indexOf("aria-")}(t)){if(!(i=C[t])&&w){for(a=w.length;a--&&!(i=w[a]).pattern.test(t););-1===a&&(i=null)}if(!i)return;if(i.validValues&&!(n in i.validValues))return}if(H[t]&&!V.allow_script_urls){var u=n.replace(/[\s\u0000-\u001F]+/g,"");try{u=decodeURIComponent(u)}catch(s){u=unescape(u)}if(P.test(u))return;if(function(e,t){return!e.allow_html_data_urls&&(/^data:image\//i.test(t)?!1===e.allow_svg_data_urls&&/^data:image\/svg\+xml/i.test(t):/^data:/i.test(t))}(V,u))return}l&&(t in H||0===t.indexOf("on"))||(c.map[t]=n,c.push({name:t,value:n}))}var r,o,i,c,a,u,s,l,f,d,h,m,g,p,v,y,b,C,w,x,z,E,N,S,k,T,A,M,R,D=0,_=[],B=0,O=ir.decode,H=Mn.makeMap("src,href,data,background,formaction,poster,xlink:href"),P=/((java|vb)script|mhtml):/i;for(k=new RegExp("<(?:(?:!--([\\w\\W]*?)--!?>)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),T=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,d=I.getShortEndedElements(),S=V.self_closing_elements||I.getSelfClosingElements(),h=I.getBoolAttrs(),g=V.validate,f=V.remove_internals,R=V.fix_self_closing,A=I.getSpecialElements(),N=e+">";r=k.exec(N);){if(D<r.index&&j(O(e.substr(D,r.index-D))),o=r[6])":"===(o=o.toLowerCase()).charAt(0)&&(o=o.substr(1)),t(o);else if(o=r[7]){if(r.index+r[0].length>e.length){j(O(e.substr(r.index))),D=r.index+r[0].length;continue}":"===(o=o.toLowerCase()).charAt(0)&&(o=o.substr(1)),m=o in d,R&&S[o]&&0<_.length&&_[_.length-1].name===o&&t(o);var L=ll(T,r[8]);if(null!==L){if("all"===L){D=cl(I,e,k.lastIndex),k.lastIndex=D;continue}v=!1}if(!g||(p=I.getElementRule(o))){if(v=!0,g&&(C=p.attributes,w=p.attributePatterns),(b=r[8])?((l=-1!==b.indexOf("data-mce-type"))&&f&&(v=!1),(c=[]).map={},b.replace(T,n)):(c=[]).map={},g&&!l){if(x=p.attributesRequired,z=p.attributesDefault,E=p.attributesForced,p.removeEmptyAttrs&&!c.length&&(v=!1),E)for(a=E.length;a--;)s=(y=E[a]).name,"{$uid}"===(M=y.value)&&(M="mce_"+B++),c.map[s]=M,c.push({name:s,value:M});if(z)for(a=z.length;a--;)(s=(y=z[a]).name)in c.map||("{$uid}"===(M=y.value)&&(M="mce_"+B++),c.map[s]=M,c.push({name:s,value:M}));if(x){for(a=x.length;a--&&!(x[a]in c.map););-1===a&&(v=!1)}if(y=c.map["data-mce-bogus"]){if("all"===y){D=cl(I,e,k.lastIndex),k.lastIndex=D;continue}v=!1}}v&&q(o,c,m)}else v=!1;if(i=A[o]){i.lastIndex=D=r.index+r[0].length,D=(r=i.exec(e))?(v&&(u=e.substr(D,r.index-D)),r.index+r[0].length):(u=e.substr(D),e.length),v&&(0<u.length&&j(u,!0),$(o)),k.lastIndex=D;continue}m||(b&&b.indexOf("/")===b.length-1?v&&$(o):_.push({name:o,valid:v}))}else(o=r[1])?(">"===o.charAt(0)&&(o=" "+o),V.allow_conditional_comments||"[if"!==o.substr(0,3).toLowerCase()||(o=" "+o),F(o)):(o=r[2])?U(o.replace(/<!--|-->/g,"")):(o=r[3])?K(o):(o=r[4])&&W(o,r[5]);D=r.index+r[0].length}for(D<e.length&&j(O(e.substr(D))),a=_.length-1;0<=a;a--)(o=_[a]).valid&&$(o.name)}}}(fl=fl||{}).findEndTag=cl;function dl(e,t){var n,r,o,i,a,u=t,s=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,c=e.schema;for(u=function(e,t){var n=new RegExp(["\\s?("+e.join("|")+')="[^"]+"'].join("|"),"gi");return t.replace(n,"")}(e.getTempAttrs(),u),a=c.getShortEndedElements();i=s.exec(u);)r=s.lastIndex,o=i[0].length,n=a[i[1]]?r:of.findEndTag(c,u,r),u=u.substring(0,r-o)+u.substring(n),s.lastIndex=r-o;return lu(u)}function hl(e,t,n){var r=e.getParam(t,n);if(-1===r.indexOf("="))return r;var o=e.getParam(t,"","hash");return o.hasOwnProperty(e.id)?o[e.id]:n}function ml(e,t,n){var r;if(t.format=t.format?t.format:"html",t.get=!0,t.getInner=!0,t.no_events||e.fire("BeforeGetContent",t),"raw"===t.format)r=Mn.trim(af.trimExternal(e.serializer,n.innerHTML));else if("text"===t.format)r=lu(n.innerText||n.textContent);else{if("tree"===t.format)return e.serializer.serialize(n,t);r=function(e,t){var n=mf(e),r=new RegExp("^(<"+n+"[^>]*>(&nbsp;|&#160;|\\s|\xa0|<br \\/>|)<\\/"+n+">[\r\n]*|<br \\/>[\r\n]*)$");return t.replace(r,"")}(e,e.serializer.serialize(n,t))}return"text"===t.format||Wn(yt.fromDom(n))?t.content=r:t.content=Mn.trim(r),t.no_events||e.fire("GetContent",t),t.content}function gl(e){var u,s,c,l,f,d=[];return u=(e=e||{}).indent,s=Ff(e.indent_before||""),c=Ff(e.indent_after||""),l=ir.getEncodeFunc(e.entity_encoding||"raw",e.entities),f="html"===e.element_format,{start:function(e,t,n){var r,o,i,a;if(u&&s[e]&&0<d.length&&0<(a=d[d.length-1]).length&&"\n"!==a&&d.push("\n"),d.push("<",e),t)for(r=0,o=t.length;r<o;r++)i=t[r],d.push(" ",i.name,'="',l(i.value,!0),'"');d[d.length]=!n||f?">":" />",n&&u&&c[e]&&0<d.length&&0<(a=d[d.length-1]).length&&"\n"!==a&&d.push("\n")},end:function(e){var t;d.push("</",e,">"),u&&c[e]&&0<d.length&&0<(t=d[d.length-1]).length&&"\n"!==t&&d.push("\n")},text:function(e,t){0<e.length&&(d[d.length]=t?e:l(e))},cdata:function(e){d.push("<![CDATA[",e,"]]>")},comment:function(e){d.push("\x3c!--",e,"--\x3e")},pi:function(e,t){t?d.push("<?",e," ",l(t),"?>"):d.push("<?",e,"?>"),u&&d.push("\n")},doctype:function(e){d.push("<!DOCTYPE",e,">",u?"\n":"")},reset:function(){d.length=0},getContent:function(){return d.join("").replace(/\n$/,"")}}}function pl(t,m){void 0===m&&(m=pr());var g=gl(t);return(t=t||{}).validate=!("validate"in t)||t.validate,{serialize:function(e){var f,d;d=t.validate,f={3:function(e){g.text(e.value,e.raw)},8:function(e){g.comment(e.value)},7:function(e){g.pi(e.name,e.value)},10:function(e){g.doctype(e.value)},4:function(e){g.cdata(e.value)},11:function(e){if(e=e.firstChild)for(;h(e),e=e.next;);}},g.reset();var h=function(e){var t,n,r,o,i,a,u,s,c,l=f[e.type];if(l)l(e);else{if(t=e.name,n=e.shortEnded,r=e.attributes,d&&r&&1<r.length&&((a=[]).map={},c=m.getElementRule(e.name))){for(u=0,s=c.attributesOrder.length;u<s;u++)(o=c.attributesOrder[u])in r.map&&(i=r.map[o],a.map[o]=i,a.push({name:o,value:i}));for(u=0,s=r.length;u<s;u++)(o=r[u].name)in a.map||(i=r.map[o],a.map[o]=i,a.push({name:o,value:i}));r=a}if(g.start(e.name,r,n),!n){if(e=e.firstChild)for(;h(e),e=e.next;);g.end(t)}}};return 1!==e.type||t.inner?f[11](e):h(e),g.getContent()}}}function vl(e,t,n){var r=function(e,n,t){var r={},o={},i=[];for(var a in t.firstChild&&Uf(t.firstChild,function(t){z(e,function(e){e.name===t.name&&(r[e.name]?r[e.name].nodes.push(t):r[e.name]={filter:e,nodes:[t]})}),z(n,function(e){"string"==typeof t.attr(e.name)&&(o[e.name]?o[e.name].nodes.push(t):o[e.name]={filter:e,nodes:[t]})})}),r)r.hasOwnProperty(a)&&i.push(r[a]);for(var a in o)o.hasOwnProperty(a)&&i.push(o[a]);return i}(e,t,n);z(r,function(t){z(t.filter.callbacks,function(e){e(t.nodes,t.filter.name,{})})})}function yl(e){var t=Ee(e).dom();return e.dom()===t.activeElement}function bl(e){var t=e!==undefined?e.dom():j.document;return k.from(t.activeElement).map(yt.fromDom)}function Cl(e,t){var n=zt(t)?Jc(t).length:Re(t).length+1;return n<e?n:e<0?0:e}function wl(e){return Xf.range(e.start(),Cl(e.soffset(),e.start()),e.finish(),Cl(e.foffset(),e.finish()))}function xl(e,t){return!Ge.isRestrictedNode(t.dom())&&(Bt(e,t)||ze(e,t))}function zl(t){return function(e){return xl(t,e.start())&&xl(t,e.finish())}}function El(e){return!0===e.inline||Yf.isIE()}function Nl(e){return Xf.range(yt.fromDom(e.startContainer),e.startOffset,yt.fromDom(e.endContainer),e.endOffset)}function Sl(e){var t=e.getSelection();return(t&&0!==t.rangeCount?k.from(t.getRangeAt(0)):k.none()).map(Nl)}function kl(e){var t=Ne(e);return Sl(t.dom()).filter(zl(e))}function Tl(e,t){return k.from(t).filter(zl(e)).map(wl)}function Al(e){var t=j.document.createRange();try{return t.setStart(e.start().dom(),e.soffset()),t.setEnd(e.finish().dom(),e.foffset()),k.some(t)}catch(n){return k.none()}}function Ml(t){return(t.bookmark?t.bookmark:k.none()).bind(function(e){return Tl(yt.fromDom(t.getBody()),e)}).bind(Al)}function Rl(t,e){oe().browser.isIE()?function(e){e.on("focusout",function(){Gf(e)})}(t):function(e,t){e.on("mouseup touchend",function(e){t.throttle()})}(t,e),t.on("keyup NodeChange",function(e){!function(e){return"nodechange"===e.type&&e.selectionChange}(e)&&Gf(t)})}function Dl(e){return Zf.isEditorUIElement(e)}function _l(t,e){var n=t?t.settings.custom_ui_selector:"";return null!==td.getParent(e,function(e){return Dl(e)||!!n&&t.dom.is(e,n)})}function Bl(r,e){var t=e.editor;ed(t),t.on("focusin",function(){var e=r.focusedEditor;e!==this&&(e&&e.fire("blur",{focusedEditor:this}),r.setActive(this),(r.focusedEditor=this).fire("focus",{blurredEditor:e}),this.focus(!0))}),t.on("focusout",function(){var t=this;pn.setEditorTimeout(t,function(){var e=r.focusedEditor;_l(t,function(){try{return j.document.activeElement}catch(e){return j.document.body}}())||e!==t||(t.fire("blur",{focusedEditor:null}),r.focusedEditor=null)})}),rf||(rf=function(e){var t,n=r.activeEditor;t=e.target,n&&t.ownerDocument===j.document&&(t===j.document.body||_l(n,t)||r.focusedEditor!==n||(n.fire("blur",{focusedEditor:null}),r.focusedEditor=null))},td.bind(j.document,"focusin",rf))}function Ol(e,t){e.focusedEditor===t.editor&&(e.focusedEditor=null),e.activeEditor||(td.unbind(j.document,"focusin",rf),rf=null)}function Hl(t,e){return function(e){return e.collapsed?k.from(Ka(e.startContainer,e.startOffset)).map(yt.fromDom):k.none()}(e).bind(function(e){return qn(e)?k.some(e):!1===Bt(t,e)?k.some(t):k.none()})}function Pl(t,e){Hl(yt.fromDom(t.getBody()),e).bind(function(e){return Pc.firstPositionIn(e.dom())}).fold(function(){t.selection.normalize()},function(e){return t.selection.setRng(e.toRange())})}function Ll(e){if(e.setActive)try{e.setActive()}catch(t){e.focus()}else e.focus()}function Vl(e){return yl(e)||function(t){return bl(Ee(t)).filter(function(e){return t.dom().contains(e.dom())})}(e).isSome()}function Il(e){return e.inline?function(e){var t=e.getBody();return t&&Vl(yt.fromDom(t))}(e):function(e){return e.iframeElement&&yl(yt.fromDom(e.iframeElement))}(e)}function Fl(e){return e instanceof ul}function Ul(e,t){e.dom.setHTML(e.getBody(),t),function(r){ud(r)&&Pc.firstPositionIn(r.getBody()).each(function(e){var t=e.getNode(),n=Ge.isTable(t)?Pc.firstPositionIn(t).getOr(e):e;r.selection.setRng(n.toRange())})}(e)}function jl(t,n,r){return void 0===r&&(r={}),r.format=r.format?r.format:"html",r.set=!0,r.content=Fl(n)?"":n,Fl(n)||r.no_events||(t.fire("BeforeSetContent",r),n=r.content),k.from(t.getBody()).fold($(n),function(e){return Fl(n)?function(e,t,n,r){vl(e.parser.getNodeFilters(),e.parser.getAttributeFilters(),n);var o=pl({validate:e.validate},e.schema).serialize(n);return r.content=Wn(yt.fromDom(t))?o:Mn.trim(o),Ul(e,r.content),r.no_events||e.fire("SetContent",r),n}(t,e,n,r):function(e,t,n,r){var o,i;return 0===n.length||/^\s+$/.test(n)?(i='<br data-mce-bogus="1">',"TABLE"===t.nodeName?n="<tr><td>"+i+"</td></tr>":/^(UL|OL)$/.test(t.nodeName)&&(n="<li>"+i+"</li>"),n=(o=mf(e))&&e.schema.isValidChild(t.nodeName.toLowerCase(),o.toLowerCase())?(n=i,e.dom.createHTML(o,e.settings.forced_root_block_attrs,n)):n||'<br data-mce-bogus="1">',Ul(e,n),e.fire("SetContent",r)):("raw"!==r.format&&(n=pl({validate:e.validate},e.schema).serialize(e.parser.parse(n,{isRootContent:!0,insert:!0}))),r.content=Wn(yt.fromDom(t))?n:Mn.trim(n),Ul(e,r.content),r.no_events||e.fire("SetContent",r)),r.content}(t,e,n,r)})}function ql(e){return k.from(e).each(function(e){return e.destroy()})}function $l(e){if(!e.removed){var t=e._selectionOverrides,n=e.editorUpload,r=e.getBody(),o=e.getElement();r&&e.save({is_removing:!0}),e.removed=!0,e.unbindAllNativeEvents(),e.hasHiddenInput&&o&&pd.remove(o.nextSibling),fd(e),e.editorManager.remove(e),!e.inline&&r&&function(e){pd.setStyle(e.id,"display",e.orgDisplay)}(e),dd(e),pd.remove(e.getContainer()),ql(t),ql(n),e.destroy()}}function Wl(e,t){var n=e.selection,r=e.dom;e.destroyed||(t||e.removed?(t||(e.editorManager.off("beforeunload",e._beforeUnload),e.theme&&e.theme.destroy&&e.theme.destroy(),ql(n),ql(r)),function(e){var t=e.formElement;t&&(t._mceOldSubmit&&(t.submit=t._mceOldSubmit,t._mceOldSubmit=null),pd.unbind(t,"submit reset",e.formEventDelegate))}(e),function(e){e.contentAreaContainer=e.formElement=e.container=e.editorContainer=null,e.bodyElement=e.contentDocument=e.contentWindow=null,e.iframeElement=e.targetElm=null,e.selection&&(e.selection=e.selection.win=e.selection.dom=e.selection.dom.doc=null)}(e),e.destroyed=!0):e.remove())}function Kl(a){return function(){for(var e=new Array(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<e.length;r++){var o=e[r];for(var i in o)vd.call(o,i)&&(n[i]=a(n[i],o[i]))}return n}}function Xl(e){var t=A(e)?e.join(" "):e,n=X(K(t)?t.split(" "):[],te);return y(n,function(e){return 0<e.length})}function Yl(e,t){return e.sections().hasOwnProperty(t)}function Gl(e,t,n,r){var o=Xl(n.forced_plugins),i=Xl(r.plugins),a=function(e,t){return Yl(e,t)?e.sections()[t]:{}}(t,"mobile"),u=a.plugins?Xl(a.plugins):i,s=function(e,t){return[].concat(Xl(e)).concat(Xl(t))}(o,e&&function(e,t,n){var r=e.sections();return Yl(e,t)&&r[t].theme===n}(t,"mobile","mobile")?function(e){return y(e,d(h,Nd))}(u):e&&Yl(t,"mobile")?u:i);return Mn.extend(r,{plugins:s.join(" ")})}function Jl(e,t,n,r,o){var i=e?{mobile:function(e){return G(G(G({},Sd),{resize:!1,toolbar_drawer:"scrolling",toolbar_sticky:!1}),e?{menubar:!1}:{})}(t)}:{},a=function(n,e){var t=ce(e,function(e,t){return h(n,t)});return Cd(t.t,t.f)}(["mobile"],yd(i,o)),u=Mn.extend(n,r,a.settings(),function(e,t){return e&&Yl(t,"mobile")}(e,a)?function(e,t,n){void 0===n&&(n={});var r=e.sections(),o=r.hasOwnProperty(t)?r[t]:{};return Mn.extend({},n,o)}(a,"mobile"):{},{validate:!0,external_plugins:function(e,t){var n=t.external_plugins?t.external_plugins:{};return e&&e.external_plugins?Mn.extend({},e.external_plugins,n):n}(r,a.settings())});return Gl(e,a,r,u)}function Ql(e,t,n,r,o){var i=function(e,t,n,r){var o={id:e,theme:"silver",toolbar_drawer:"floating",plugins:"",document_base_url:t,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_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,inline_styles:!0,convert_fonts_to_spans:!0,indent:!0,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,summary,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,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",entity_encoding:"named",url_converter:r.convertURL,url_converter_scope:r};return G(G({},o),n?Sd:{})}(t,n,xd,e);return Jl(zd||Ed,zd,i,r,o)}function Zl(e,t,n){return k.from(t.settings[n]).filter(e)}function ef(e,t,n,r){var o=t in e.settings?e.settings[t]:n;return"hash"===r?function(e){var n={};return"string"==typeof e?z(0<e.indexOf("=")?e.split(/[;,](?![^=;,]*(?:[;,]|$))/):e.split(","),function(e){var t=e.split("=");1<t.length?n[Mn.trim(t[0])]=Mn.trim(t[1]):n[Mn.trim(t[0])]=Mn.trim(t[0])}):n=e,n}(o):"string"===r?Zl(K,e,t).getOr(n):"number"===r?Zl(_,e,t).getOr(n):"boolean"===r?Zl(R,e,t).getOr(n):"object"===r?Zl(T,e,t).getOr(n):"array"===r?Zl(A,e,t).getOr(n):"string[]"===r?Zl(function(t){return function(e){return A(e)&&w(e,t)}}(K),e,t).getOr(n):"function"===r?Zl(D,e,t).getOr(n):o}function tf(e,t){return t.dom()[e]}function nf(e,t){return parseInt(ve(t,e),10)}var rf,of=fl,af={trimExternal:dl,trimInternal:dl},uf=function(e){return e.getParam("iframe_attrs",{})},sf=function(e){return e.getParam("doctype","<!DOCTYPE html>")},cf=function(e){return e.getParam("document_base_url","")},lf=function(e){return hl(e,"body_id","tinymce")},ff=function(e){return hl(e,"body_class","")},df=function(e){return e.getParam("content_security_policy","")},hf=function(e){return e.getParam("br_in_pre",!0)},mf=function(e){if(e.getParam("force_p_newlines",!1))return"p";var t=e.getParam("forced_root_block","p");return!1===t?"":!0===t?"p":t},gf=function(e){return e.getParam("forced_root_block_attrs",{})},pf=function(e){return e.getParam("br_newline_selector",".mce-toc h2,figcaption,caption")},vf=function(e){return e.getParam("no_newline_selector","")},yf=function(e){return e.getParam("keep_styles",!0)},bf=function(e){return e.getParam("end_container_on_empty_block",!1)},Cf=function(e){return Mn.explode(e.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large"))},wf=function(e){return Mn.explode(e.getParam("font_size_classes",""))},xf=function(e){return e.getParam("icons","","string")},zf=function(e){return e.getParam("icons_url","","string")},Ef=function(e){return e.getParam("images_dataimg_filter",$(!0),"function")},Nf=function(e){return e.getParam("automatic_uploads",!0,"boolean")},Sf=function(e){return e.getParam("images_reuse_filename",!1,"boolean")},kf=function(e){return e.getParam("images_replace_blob_uris",!0,"boolean")},Tf=function(e){return e.getParam("images_upload_url","","string")},Af=function(e){return e.getParam("images_upload_base_path","","string")},Mf=function(e){return e.getParam("images_upload_credentials",!1,"boolean")},Rf=function(e){return e.getParam("images_upload_handler",null,"function")},Df=function(e){return e.getParam("content_css_cors",!1,"boolean")},_f=function(e){return e.getParam("referrer_policy","","string")},Bf=function(e){return e.getParam("language","en","string")},Of=function(e){return e.getParam("language_url","","string")},Hf=function(e){return e.getParam("indent_use_margin",!1)},Pf=function(e){return e.getParam("indentation","40px","string")},Lf=function(e){var t=e.settings.content_css;return K(t)?X(t.split(","),te):A(t)?t:!1===t||e.inline?[]:["default"]},Vf=function(e){return e.getParam("directionality",ra.isRtl()?"rtl":undefined)},If=function(e){return e.getParam("inline_boundaries_selector","a[href],code,.mce-annotation","string")},Ff=Mn.makeMap,Uf=function(e,t){t(e),e.firstChild&&Uf(e.firstChild,t),e.next&&Uf(e.next,t)},jf=function(a){if(!A(a))throw new Error("cases must be an array");if(0===a.length)throw new Error("there must be at least one case");var u=[],n={};return z(a,function(e,r){var t=Et(e);if(1!==t.length)throw new Error("one and only one name per case");var o=t[0],i=e[o];if(n[o]!==undefined)throw new Error("duplicate key detected:"+o);if("cata"===o)throw new Error("cannot have a case named cata (sorry)");if(!A(i))throw new Error("case arguments must be an array");u.push(o),n[o]=function(){var e=arguments.length;if(e!==i.length)throw new Error("Wrong number of arguments to case "+o+". Expected "+i.length+" ("+i+"), got "+e);for(var n=new Array(e),t=0;t<n.length;t++)n[t]=arguments[t];return{fold:function(){if(arguments.length!==a.length)throw new Error("Wrong number of arguments to fold. Expected "+a.length+", got "+arguments.length);return arguments[r].apply(null,n)},match:function(e){var t=Et(e);if(u.length!==t.length)throw new Error("Wrong number of arguments to match. Expected: "+u.join(",")+"\nActual: "+t.join(","));if(!w(u,function(e){return h(t,e)}))throw new Error("Not all branches were specified when using match. Specified: "+t.join(", ")+"\nRequired: "+u.join(", "));return e[o].apply(null,n)},log:function(e){j.console.log(e,{constructors:u,constructor:o,params:n})}}}}),n},qf={create:be("start","soffset","finish","foffset")},$f=jf([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Wf=($f.before,$f.on,$f.after,function(e){return e.fold(W,W,W)}),Kf=jf([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Xf={domRange:Kf.domRange,relative:Kf.relative,exact:Kf.exact,exactFromRange:function(e){return Kf.exact(e.start(),e.soffset(),e.finish(),e.foffset())},getWin:function(e){var t=function(e){return e.match({domRange:function(e){return yt.fromDom(e.startContainer)},relative:function(e,t){return Wf(e)},exact:function(e,t,n,r){return e}})}(e);return Ne(t)},range:qf.create},Yf=oe().browser,Gf=function(e){var t=El(e)?kl(yt.fromDom(e.getBody())):k.none();e.bookmark=t.isSome()?t:e.bookmark},Jf=function(t){Ml(t).each(function(e){t.selection.setRng(e)})},Qf=Ml,Zf={isEditorUIElement:function(e){var t=e.className.toString();return-1!==t.indexOf("tox-")||-1!==t.indexOf("mce-")}},ed=function(e){var t=aa(function(){Gf(e)},0);e.on("init",function(){e.inline&&function(e,t){function n(){t.throttle()}Xi.DOM.bind(j.document,"mouseup",n),e.on("remove",function(){Xi.DOM.unbind(j.document,"mouseup",n)})}(e,t),Rl(e,t)}),e.on("remove",function(){t.cancel()})},td=Xi.DOM,nd=function(e){e.on("AddEditor",d(Bl,e)),e.on("RemoveEditor",d(Ol,e))},rd=function(e){var t=e.classList;return t!==undefined&&(t.contains("tox-edit-area")||t.contains("tox-edit-area__iframe")||t.contains("mce-content-body"))},od=_l,id=function(e){return e.editorManager.setActive(e)},ad=function(e,t){e.removed||(t?id(e):function(t){var e=t.selection,n=t.getBody(),r=e.getRng();t.quirks.refreshContentEditable(),t.bookmark!==undefined&&!1===Il(t)&&Qf(t).each(function(e){t.selection.setRng(e),r=e});var o=function(t,e){return t.dom.getParent(e,function(e){return"true"===t.dom.getContentEditable(e)})}(t,e.getNode());if(t.$.contains(n,o))return Ll(o),Pl(t,r),id(t);t.inline||(Nn.opera||Ll(n),t.getWin().focus()),(Nn.gecko||t.inline)&&(Ll(n),Pl(t,r)),id(t)}(e))},ud=Il,sd=function(e){return Il(e)||function(t){return bl().filter(function(e){return!rd(e.dom())&&od(t,e.dom())}).isSome()}(e)},cd=function(e,t){return e.fire("PreProcess",t)},ld=function(e,t){return e.fire("PostProcess",t)},fd=function(e){return e.fire("remove")},dd=function(e){return e.fire("detach")},hd=function(e,t){return e.fire("SwitchMode",{mode:t})},md=function(e,t,n,r){e.fire("ObjectResizeStart",{target:t,width:n,height:r})},gd=function(e,t,n,r){e.fire("ObjectResized",{target:t,width:n,height:r})},pd=Xi.DOM,vd=Object.prototype.hasOwnProperty,yd=Kl(function(e,t){return T(e)&&T(t)?yd(e,t):t}),bd=Kl(function(e,t){return t}),Cd=be("sections","settings"),wd=oe().deviceType,xd=wd.isTouch(),zd=wd.isPhone(),Ed=wd.isTablet(),Nd=["lists","autolink","autosave"],Sd={table_grid:!1,object_resizing:!1,resize:!1},kd=d(tf,"clientWidth"),Td=d(tf,"clientHeight"),Ad=d(nf,"margin-top"),Md=d(nf,"margin-left"),Rd=function(e,t,n){var r=yt.fromDom(e.getBody()),o=e.inline?r:function(e){return yt.fromDom(e.dom().ownerDocument.documentElement)}(r),i=function(e,t,n,r){var o=function(e){return e.dom().getBoundingClientRect()}(t);return{x:n-(e?o.left+t.dom().clientLeft+Md(t):0),y:r-(e?o.top+t.dom().clientTop+Ad(t):0)}}(e.inline,o,t,n);return function(e,t,n){var r=kd(e),o=Td(e);return 0<=t&&0<=n&&t<=r&&n<=o}(o,i.x,i.y)},Dd=function(e){return function(e){return k.from(e).map(yt.fromDom)}(e.inline?e.getBody():e.getContentAreaContainer()).map(function(e){return Bt(Ee(e),e)}).getOr(!1)};function _d(n){function r(){var e=n.theme;return e&&e.getNotificationManagerImpl?e.getNotificationManagerImpl():function t(){function e(){throw new Error("Theme did not provide a NotificationManager implementation.")}return{open:e,close:e,reposition:e,getArgs:e}}()}function o(){0<u.length&&r().reposition(u)}function i(t){p(u,function(e){return e===t}).each(function(e){u.splice(e,1)})}function t(t){if(!n.removed&&Dd(n))return g(u,function(e){return function(e,t){return!(e.type!==t.type||e.text!==t.text||e.progressBar||e.timeout||t.progressBar||t.timeout)}(r().getArgs(e),t)}).getOrThunk(function(){n.editorManager.setActive(n);var e=r().open(t,function(){i(e),o()});return function(e){u.push(e)}(e),o(),e})}var a,u=[];return(a=n).on("SkinLoaded",function(){var e=a.settings.service_message;e&&t({text:e,type:"warning",timeout:0})}),a.on("ResizeEditor ResizeWindow NodeChange",function(){pn.requestAnimationFrame(o)}),a.on("remove",function(){z(u.slice(),function(e){r().close(e)})}),{open:t,close:function(){k.from(u[0]).each(function(e){r().close(e),i(e),o()})},getNotifications:function(){return u}}}function Bd(n){function r(){var e=n.theme;return e&&e.getWindowManagerImpl?e.getWindowManagerImpl():function t(){function e(){throw new Error("Theme did not provide a WindowManager implementation.")}return{open:e,openUrl:e,alert:e,confirm:e,close:e,getParams:e,setParams:e}}()}function o(e,t){return function(){return t?t.apply(e,arguments):undefined}}function i(e){s.push(e),function(e){n.fire("OpenWindow",{dialog:e})}(e)}function a(t){!function(e){n.fire("CloseWindow",{dialog:e})}(t),0===(s=y(s,function(e){return e!==t})).length&&n.focus()}function u(e){n.editorManager.setActive(n),Gf(n);var t=e();return i(t),t}var s=[];return n.on("remove",function(){z(s,function(e){r().close(e)})}),{open:function(e,t){return u(function(){return r().open(e,t,a)})},openUrl:function(e){return u(function(){return r().openUrl(e,a)})},alert:function(e,t,n){r().alert(e,o(n||this,t))},confirm:function(e,t,n){r().confirm(e,o(n||this,t))},close:function(){k.from(s[s.length-1]).each(function(e){r().close(e),a(e)})}}}function Od(e,t){e.notificationManager.open({type:"error",text:t})}function Hd(e,t){e._skinLoaded?Od(e,t):e.on("SkinLoaded",function(){Od(e,t)})}function Pd(e){j.console.error(e)}function Ld(e,t,n){return n?"Failed to load "+e+": "+n+" from url "+t:"Failed to load "+e+" url: "+t}var Vd,Id=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=j.window.console;r&&(r.error?r.error.apply(r,arguments):r.log.apply(r,arguments))},Fd={pluginLoadError:function(e,t){Pd(Ld("plugin",e,t))},iconsLoadError:function(e,t){Pd(Ld("icons",e,t))},languageLoadError:function(e,t){Pd(Ld("language",e,t))},pluginInitError:function(e,t,n){var r=ra.translate(["Failed to initialize plugin: {0}",t]);Id(r,n),Hd(e,r)},uploadError:function(e,t){Hd(e,ra.translate(["Failed to upload image: {0}",t]))},displayError:Hd,initError:Id},Ud=(Vd={},{add:function(e,t){Vd[e]=t},get:function(e){return Vd[e]?Vd[e]:{icons:{}}},has:function(e){return kt(Vd,e)}}),jd=ga.PluginManager,qd=ga.ThemeManager;function $d(s,a){function n(e,t,n,r){var o,i;(o=new j.XMLHttpRequest).open("POST",a.url),o.withCredentials=a.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;o.status<200||300<=o.status?n("HTTP Error: "+o.status):(e=JSON.parse(o.responseText))&&"string"==typeof e.location?t(function(e,t){return e?e.replace(/\/$/,"")+"/"+t.replace(/^\//,""):t}(a.basePath,e.location)):n("Invalid JSON: "+o.responseText)},(i=new j.FormData).append("file",e.blob(),e.filename()),o.send(i)}function c(e,t){return{url:t,blobInfo:e,status:!0}}function l(e,t){return{url:"",blobInfo:e,status:!1,error:t}}function f(e,t){Mn.each(o[e],function(e){e(t)}),delete o[e]}function r(e,t){return e=Mn.grep(e,function(e){return!s.isUploaded(e.blobUri())}),Zt.all(Mn.map(e,function(e){return s.isPending(e.blobUri())?function(e){var t=e.blobUri();return new Zt(function(e){o[t]=o[t]||[],o[t].push(e)})}(e):function(i,a,u){return s.markPending(i.blobUri()),new Zt(function(t){function e(){}var n;try{var r=function(){n&&(n.close(),e)};a(i,function(e){r(),s.markUploaded(i.blobUri(),e),f(i.blobUri(),c(i,e)),t(c(i,e))},function(e){r(),s.removeFailed(i.blobUri()),f(i.blobUri(),l(i,e)),t(l(i,e))},function(e){e<0||100<e||(n=n||u()).progressBar.value(e)})}catch(o){t(l(i,o.message))}})}(e,a.handler,t)}))}var o={};return!1===D(a.handler)&&(a.handler=n),{upload:function(e,t){return!a.url&&function(e){return e===n}(a.handler)?new Zt(function(e){e([])}):r(e,t)}}}function Wd(e){var t,n,r=decodeURIComponent(e).split(",");return(n=/data:([^;]+)/.exec(r[0]))&&(t=n[1]),{type:t,data:r[1]}}function Kd(e){return(e||"blobid")+Jd++}var Xd=function(e){return 0===e.indexOf("blob:")?function(i){return new Zt(function(e,t){function n(){t("Cannot convert "+i+" to Blob. Resource might not exist or is inaccessible.")}try{var r=new j.XMLHttpRequest;r.open("GET",i,!0),r.responseType="blob",r.onload=function(){200===this.status?e(this.response):n()},r.onerror=n,r.send()}catch(o){n()}})}(e):0===e.indexOf("data:")?function(i){return new Zt(function(e){var t,n,r,o=Wd(i);try{t=j.atob(o.data)}catch(yN){return void e(new j.Blob([]))}for(n=new Uint8Array(t.length),r=0;r<n.length;r++)n[r]=t.charCodeAt(r);e(new j.Blob([n],{type:o.type}))})}(e):null},Yd=function(n){return new Zt(function(e){var t=new j.FileReader;t.onloadend=function(){e(t.result)},t.readAsDataURL(n)})},Gd=Wd,Jd=0;function Qd(o,i){var a={};return{findAll:function(e,n){var t;n=n||$(!0),t=y(function(e){return e?P(e.getElementsByTagName("img")):[]}(e),function(e){var t=e.src;return!!Nn.fileApi&&(!e.hasAttribute("data-mce-bogus")&&(!e.hasAttribute("data-mce-placeholder")&&(!(!t||t===Nn.transparentSrc)&&(0===t.indexOf("blob:")?!o.isUploaded(t)&&n(e):0===t.indexOf("data:")&&n(e)))))});var r=X(t,function(n){if(a[n.src])return new Zt(function(t){a[n.src].then(function(e){if("string"==typeof e)return e;t({image:n,blobInfo:e.blobInfo})})});var e=new Zt(function(e,t){!function(n,r,o,t){var i,a;0!==r.src.indexOf("blob:")?(i=Gd(r.src).data,(a=n.findFirst(function(e){return e.base64()===i}))?o({image:r,blobInfo:a}):Xd(r.src).then(function(e){a=n.create(Kd(),e,i),n.add(a),o({image:r,blobInfo:a})},function(e){t(e)})):(a=n.getByUri(r.src))?o({image:r,blobInfo:a}):Xd(r.src).then(function(t){Yd(t).then(function(e){i=Gd(e).data,a=n.create(Kd(),t,i),n.add(a),o({image:r,blobInfo:a})})},function(e){t(e)})}(i,n,e,t)}).then(function(e){return delete a[e.image.src],e})["catch"](function(e){return delete a[n.src],e});return a[n.src]=e});return Zt.all(r)}}}var Zd=0,eh=function(e){return e+Zd+++function(){function e(){return Math.round(4294967295*Math.random()).toString(36)}return"s"+(new Date).getTime().toString(36)+e()+e()+e()}()};function th(o){function t(t){return function(e){return o.selection?t(e):[]}}function r(e,t,n){for(var r=0;-1!==(r=e.indexOf(t,r))&&(e=e.substring(0,r)+n+e.substr(r+t.length),r+=n.length-t.length+1),-1!==r;);return e}function i(e,t,n){return e=r(e,'src="'+t+'"','src="'+n+'"'),e=r(e,'data-mce-src="'+t+'"','data-mce-src="'+n+'"')}function n(t,n){z(o.undoManager.data,function(e){"fragmented"===e.type?e.fragments=X(e.fragments,function(e){return i(e,t,n)}):e.content=i(e.content,t,n)})}function a(){return o.notificationManager.open({text:o.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})}function u(e,t){h.removeByUri(e.src),n(e.src,t),o.$(e).attr({src:Sf(o)?t+"?"+(new Date).getTime():t,"data-mce-src":o.convertURL(t,"src")})}function s(n){return f=f||$d(m,{url:Tf(o),basePath:Af(o),credentials:Mf(o),handler:Rf(o)}),p().then(t(function(r){var e;return e=X(r,function(e){return e.blobInfo}),f.upload(e,a).then(t(function(e){var t=X(e,function(e,t){var n=r[t].image;return e.status&&kf(o)?u(n,e.url):e.error&&Fd.uploadError(o,e.error),{element:n,status:e.status}});return n&&n(t),t}))}))}function e(e){if(Nf(o))return s(e)}function c(t){return!1!==w(g,function(e){return e(t)})&&(0!==t.getAttribute("src").indexOf("data:")||Ef(o)(t))}function l(e){return e.replace(/src="(blob:[^"]+)"/g,function(e,n){var t=m.getResultUri(n);if(t)return'src="'+t+'"';var r=h.getByUri(n);return(r=r||b(o.editorManager.get(),function(e,t){return e||t.editorUpload&&t.editorUpload.blobCache.getByUri(n)},null))?'src="data:'+r.blob().type+";base64,"+r.base64()+'"':e})}var f,d,h=function(){var n=[],o=function(e){var t,n;if(!e.blob||!e.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");return t=e.id||eh("blobid"),n=e.name||t,{id:$(t),name:$(n),filename:$(n+"."+function(e){return{"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png"}[e.toLowerCase()]||"dat"}(e.blob.type)),blob:$(e.blob),base64:$(e.base64),blobUri:$(e.blobUri||j.URL.createObjectURL(e.blob)),uri:$(e.uri)}},t=function(t){return e(function(e){return e.id()===t})},e=function(e){return y(n,e)[0]};return{create:function(e,t,n,r){if(K(e))return o({id:e,name:r,blob:t,base64:n});if(T(e))return o(e);throw new Error("Unknown input type")},add:function(e){t(e.id())||n.push(e)},get:t,getByUri:function(t){return e(function(e){return e.blobUri()===t})},findFirst:e,removeByUri:function(t){n=y(n,function(e){return e.blobUri()!==t||(j.URL.revokeObjectURL(e.blobUri()),!1)})},destroy:function(){z(n,function(e){j.URL.revokeObjectURL(e.blobUri())}),n=[]}}}(),m=function v(){function n(e,t){return{status:e,resultUri:t}}function t(e){return e in r}var r={};return{hasBlobUri:t,getResultUri:function(e){var t=r[e];return t?t.resultUri:null},isPending:function(e){return!!t(e)&&1===r[e].status},isUploaded:function(e){return!!t(e)&&2===r[e].status},markPending:function(e){r[e]=n(1,null)},markUploaded:function(e,t){r[e]=n(2,t)},removeFailed:function(e){delete r[e]},destroy:function(){r={}}}}(),g=[],p=function(){return(d=d||Qd(m,h)).findAll(o.getBody(),c).then(t(function(e){return e=y(e,function(e){return"string"!=typeof e||(Fd.displayError(o,e),!1)}),z(e,function(e){n(e.image.src,e.blobInfo.blobUri()),e.image.src=e.blobInfo.blobUri(),e.image.removeAttribute("data-mce-src")}),e}))};return o.on("SetContent",function(){Nf(o)?e():p()}),o.on("RawSaveContent",function(e){e.content=l(e.content)}),o.on("GetContent",function(e){e.source_view||"raw"===e.format||(e.content=l(e.content))}),o.on("PostRender",function(){o.parser.addNodeFilter("img",function(e){z(e,function(e){var t=e.attr("src");if(!h.getByUri(t)){var n=m.getResultUri(t);n&&e.attr("src",n)}})})}),{blobCache:h,addFilter:function(e){g.push(e)},uploadImages:s,uploadImagesAuto:e,scanForImages:p,destroy:function(){h.destroy(),m.destroy(),d=f=null}}}function nh(e,t,n){return Bt(t,e)?function(e){return e.slice(0,-1)}(function(e,t){for(var n=D(t)?t:c,r=e.dom(),o=[];null!==r.parentNode&&r.parentNode!==undefined;){var i=r.parentNode,a=yt.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o}(e,function(e){return n(e)||ze(e,t)})):[]}function rh(e,t){return nh(e,t,$(!1))}function oh(e,t){return e.hasOwnProperty(t.nodeName)}function ih(e,t){if(Ge.isText(t)){if(0===t.nodeValue.length)return!0;if(/^\s+$/.test(t.nodeValue)&&(!t.nextSibling||oh(e,t.nextSibling)))return!0}return!1}function ah(e){var t,n,r,o,i,a,u,s,c,l,f=e.dom,d=e.selection,h=e.schema,m=h.getBlockElements(),g=d.getStart(),p=e.getBody(),v=mf(e);if(g&&Ge.isElement(g)&&v&&(l=p.nodeName.toLowerCase(),h.isValidChild(l,v.toLowerCase())&&!function(t,e,n){return C(lh(yt.fromDom(n),yt.fromDom(e)),function(e){return oh(t,e.dom())})}(m,p,g))){for(n=(t=d.getRng()).startContainer,r=t.startOffset,o=t.endContainer,i=t.endOffset,c=ud(e),g=p.firstChild;g;)if(y=m,b=g,Ge.isText(b)||Ge.isElement(b)&&!oh(y,b)&&!Fc(b)){if(ih(m,g)){g=(u=g).nextSibling,f.remove(u);continue}a||(a=f.create(v,gf(e)),g.parentNode.insertBefore(a,g),s=!0),g=(u=g).nextSibling,a.appendChild(u)}else a=null,g=g.nextSibling;var y,b;s&&c&&(t.setStart(n,r),t.setEnd(o,i),d.setRng(t),e.nodeChanged())}}function uh(o,e){return Ya(function(e){var t=e.startContainer,n=e.startOffset;return Ge.isText(t)?0===n?k.some(yt.fromDom(t)):k.none():k.from(t.childNodes[n]).map(yt.fromDom)}(e),function(e){var t=e.endContainer,n=e.endOffset;return Ge.isText(t)?n===t.data.length?k.some(yt.fromDom(t)):k.none():k.from(t.childNodes[n-1]).map(yt.fromDom)}(e),function(e,t){var n=g(mh(o),d(ze,e)),r=g(gh(o),d(ze,t));return n.isSome()&&r.isSome()}).getOr(!1)}function sh(e,t,n,r){var o=n,i=new yi(n,o),a=e.schema.getNonEmptyElements();do{if(3===n.nodeType&&0!==Mn.trim(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))}while(n=r?i.next():i.prev());"BODY"===o.nodeName&&(r?t.setStart(o,0):t.setEnd(o,o.childNodes.length))}function ch(e){var t=e.selection.getSel();return t&&0<t.rangeCount}var lh=rh,fh=function(e,t){return[e].concat(rh(e,t))},dh=function(e){mf(e)&&e.on("NodeChange",d(ah,e))},hh=function(e,t){return e&&t&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset},mh=function(t){return _e(t).fold($([t]),function(e){return[t].concat(mh(e))})},gh=function(t){return Be(t).fold($([t]),function(e){return"br"===ie(e)?ke(e).map(function(e){return[t].concat(gh(e))}).getOr([]):[t].concat(gh(e))})},ph=(vh.prototype.nodeChanged=function(e){var t,n,r,o=this.editor.selection;this.editor.initialized&&o&&!this.editor.settings.disable_nodechange&&!this.editor.readonly&&(r=this.editor.getBody(),(t=o.getStart(!0)||r).ownerDocument===this.editor.getDoc()&&this.editor.dom.isChildOf(t,r)||(t=r),n=[],this.editor.dom.getParent(t,function(e){if(e===r)return!0;n.push(e)}),(e=e||{}).element=t,e.parents=n,this.editor.fire("NodeChange",e))},vh.prototype.isSameElementPath=function(e){var t,n;if((n=this.editor.$(e).parentsUntil(this.editor.getBody()).add(e)).length===this.lastPath.length){for(t=n.length;0<=t&&n[t]===this.lastPath[t];t--);if(-1===t)return this.lastPath=n,!0}return this.lastPath=n,!1},vh);function vh(r){var o;this.lastPath=[],this.editor=r;var t=this;"onselectionchange"in r.getDoc()||r.on("NodeChange click mouseup keyup focus",function(e){var t,n;n={startContainer:(t=r.selection.getRng()).startContainer,startOffset:t.startOffset,endContainer:t.endContainer,endOffset:t.endOffset},"nodechange"!==e.type&&hh(n,o)||r.fire("SelectionChange"),o=n}),r.on("contextmenu",function(){r.fire("SelectionChange")}),r.on("SelectionChange",function(){var e=r.selection.getStart(!0);!e||!Nn.range&&r.selection.isCollapsed()||ch(r)&&!t.isSameElementPath(e)&&r.dom.isChildOf(e,r.getBody())&&r.nodeChanged({selectionChange:!0})}),r.on("mouseup",function(e){!e.isDefaultPrevented()&&ch(r)&&("IMG"===r.selection.getNode().nodeName?pn.setEditorTimeout(r,function(){r.nodeChanged()}):r.nodeChanged())})}function yh(e){return/^[\r\n\t ]$/.test(e)}function bh(e){return!yh(e)&&!Mh(e)}function Ch(n,r,o){return k.from(o.container()).filter(Ge.isText).exists(function(e){var t=n?0:-1;return r(e.data.charAt(o.offset()+t))})}function wh(e){var t=e.container();return Ge.isText(t)&&0===t.data.length}function xh(t,n){return function(e){return k.from(ws(t?0:-1,e)).filter(n).isSome()}}function zh(e){return"IMG"===e.nodeName&&"block"===ve(yt.fromDom(e),"display")}function Eh(e){return Ge.isContentEditableFalse(e)&&!Ge.isBogusAll(e)}function Nh(e){return b(e,function(e,t){return e.concat(function(t){function e(e){return X(e,function(e){return(e=Ia(e)).node=t,e})}if(Ge.isElement(t))return e(t.getClientRects());if(Ge.isText(t)){var n=t.ownerDocument.createRange();return n.setStart(t,0),n.setEnd(t,t.data.length),e(n.getClientRects())}}(t))},[])}var Sh,kh,Th,Ah={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,END:35,HOME:36,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey||this.metaKeyPressed(e)},metaKeyPressed:function(e){return Nn.mac?e.metaKey:e.ctrlKey&&!e.altKey}},Mh=(Sh="\xa0",function(e){return Sh===e}),Rh=d(Ch,!0,yh),Dh=d(Ch,!1,yh),_h=xh(!0,zh),Bh=xh(!1,zh),Oh=xh(!0,Ge.isTable),Hh=xh(!1,Ge.isTable),Ph=xh(!0,Eh),Lh=xh(!1,Eh);(Th=kh=kh||{})[Th.Up=-1]="Up",Th[Th.Down=1]="Down";function Vh(o,i,a,e,u,t){function n(e){var t,n,r;for(r=Nh([e]),-1===o&&(r=r.reverse()),t=0;t<r.length;t++)if(n=r[t],!a(n,s)){if(0<l.length&&i(n,kn.last(l))&&c++,n.line=c,u(n))return!0;l.push(n)}}var r,s,c=0,l=[];return(s=kn.last(t.getClientRects()))&&(n(r=t.getNode()),function(e,t,n,r){for(;r=ys(r,e,Va,t);)if(n(r))return}(o,e,n,r)),l}function Ih(t){return function(e){return function(e,t){return t.line>e}(t,e)}}function Fh(t){return function(e){return function(e,t){return t.line===e}(t,e)}}function Uh(e,t){return Math.abs(e.left-t)}function jh(e,t){return Math.abs(e.right-t)}function qh(e,t){return e>=t.left&&e<=t.right}function $h(e,o){return kn.reduce(e,function(e,t){var n,r;return n=Math.min(Uh(e,o),jh(e,o)),r=Math.min(Uh(t,o),jh(t,o)),qh(o,t)?t:qh(o,e)?e:r===n&&Ym(t.node)?t:r<n?t:e})}function Wh(e,t,n,r){for(;r=Gm(r,e,Va,t);)if(n(r))return}function Kh(e,t,n){var r,o=Nh(function(e){return y(P(e.getElementsByTagName("*")),ms)}(e)),i=y(o,function(e){return n>=e.top&&n<=e.bottom});return(r=(r=$h(i,t))&&$h(function(e,r){function t(t,e){var n;return n=y(Nh([e]),function(e){return!t(e,r)}),o=o.concat(n),0===n.length}var o=[];return o.push(r),Wh(kh.Up,e,d(t,ja),r.node),Wh(kh.Down,e,d(t,qa),r.node),o}(e,r),t))&&ms(r.node)?function(e,t){return{node:e.node,before:Uh(e,t)<jh(e,t)}}(r,t):null}function Xh(e){var t,n,r,o;return o=e.getBoundingClientRect(),n=(t=e.ownerDocument).documentElement,r=t.defaultView,{top:o.top+r.pageYOffset-n.clientTop,left:o.left+r.pageXOffset-n.clientLeft}}function Yh(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Gh(i,a){return function(e){if(function(e){return 0===e.button}(e)){var t=g(a.dom.getParents(e.target),Tu(Zm,eg)).getOr(null);if(function(e,t){return Zm(t)&&t!==e}(a.getBody(),t)){var n=a.dom.getPos(t),r=a.getBody(),o=a.getDoc().documentElement;i.element=t,i.screenX=e.screenX,i.screenY=e.screenY,i.maxX=(a.inline?r.scrollWidth:o.offsetWidth)-2,i.maxY=(a.inline?r.scrollHeight:o.offsetHeight)-2,i.relX=e.pageX-n.x,i.relY=e.pageY-n.y,i.width=t.offsetWidth,i.height=t.offsetHeight,i.ghost=function(e,t,n,r){var o=t.cloneNode(!0);e.dom.setStyles(o,{width:n,height:r}),e.dom.setAttrib(o,"data-mce-selected",null);var i=e.dom.create("div",{"class":"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return e.dom.setStyles(i,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:r}),e.dom.setStyles(o,{margin:0,boxSizing:"border-box"}),i.appendChild(o),i}(a,t,i.width,i.height)}}}}function Jh(r,o){return function(e){if(r.dragging&&function(e,t,n){return t!==n&&!e.dom.isChildOf(t,n)&&!Zm(t)}(o,function(e){var t=e.getSel().getRangeAt(0).startContainer;return 3===t.nodeType?t.parentNode:t}(o.selection),r.element)){var t=function(e){var t=e.cloneNode(!0);return t.removeAttribute("data-mce-selected"),t}(r.element),n=o.fire("drop",{targetClone:t,clientX:e.clientX,clientY:e.clientY});n.isDefaultPrevented()||(t=n.targetClone,o.undoManager.transact(function(){Yh(r.element),o.insertContent(o.dom.getOuterHTML(t)),o._selectionOverrides.hideFakeCaret()}))}tg(r)}}function Qh(e){var t,n,r,o,i,a,u={};t=Xi.DOM,a=j.document,n=Gh(u,e),r=function(r,o){var i=pn.throttle(function(e,t){o._selectionOverrides.hideFakeCaret(),o.selection.placeCaretAt(e,t)},0);return function(e){var t=Math.max(Math.abs(e.screenX-r.screenX),Math.abs(e.screenY-r.screenY));if(function(e){return e.element}(r)&&!r.dragging&&10<t){if(o.fire("dragstart",{target:r.element}).isDefaultPrevented())return;r.dragging=!0,o.focus()}if(r.dragging){var n=function(e,t){return{pageX:t.pageX-e.relX,pageY:t.pageY+5}}(r,Qm(o,e));!function(e,t){e.parentNode!==t&&t.appendChild(e)}(r.ghost,o.getBody()),function(e,t,n,r,o,i){var a=0,u=0;e.style.left=t.pageX+"px",e.style.top=t.pageY+"px",t.pageX+n>o&&(a=t.pageX+n-o),t.pageY+r>i&&(u=t.pageY+r-i),e.style.width=n-a+"px",e.style.height=r-u+"px"}(r.ghost,n,r.width,r.height,r.maxX,r.maxY),i(e.clientX,e.clientY)}}}(u,e),o=Jh(u,e),i=function(e,t){return function(){e.dragging&&t.fire("dragend"),tg(e)}}(u,e),e.on("mousedown",n),e.on("mousemove",r),e.on("mouseup",o),t.bind(a,"mousemove",r),t.bind(a,"mouseup",i),e.on("remove",function(){t.unbind(a,"mousemove",r),t.unbind(a,"mouseup",i)})}function Zh(e,t,n,r,o){return t._selectionOverrides.showCaret(e,n,r,o)}function em(e,t){return e.fire("BeforeObjectSelected",{target:t}).isDefaultPrevented()?null:function(e){var t=e.ownerDocument.createRange();return t.selectNode(e),t}(t)}function tm(e,t,n){var r=Es(1,e.getBody(),t),o=Ds.fromRangeStart(r),i=o.getNode();if(og(i))return Zh(1,e,i,!o.isAtEnd(),!1);var a=o.getNode(!0);if(og(a))return Zh(1,e,a,!1,!1);var u=e.dom.getParent(o.getNode(),function(e){return og(e)||rg(e)});return og(u)?Zh(1,e,u,!1,n):null}function nm(e,t,n){if(!t||!t.collapsed)return t;var r=tm(e,t,n);return r||t}function rm(e,t){for(var n=e.getBody();t&&t!==n;){if(ag(t)||ug(t))return t;t=t.parentNode}return null}function om(g){function a(e){e&&g.selection.setRng(e)}function o(){return g.selection.getRng()}function p(e,t,n,r){return void 0===r&&(r=!0),g.fire("ShowCaret",{target:t,direction:e,before:n}).isDefaultPrevented()?null:(r&&g.selection.scrollIntoView(t,-1===e),u.show(n,t))}function t(e){return Da(e)||hu(e)||mu(e)}var v,y=g.getBody(),u=ds(g.getBody(),function(e){return g.dom.isBlock(e)},function(){return ud(g)}),b="sel-"+g.dom.uniqueId(),C=function(e){return t(e.startContainer)||t(e.endContainer)},s=function(e){var t=g.schema.getShortEndedElements(),n=g.dom.createRng(),r=e.startContainer,o=e.startOffset,i=e.endContainer,a=e.endOffset;return kt(t,r.nodeName.toLowerCase())?0===o?n.setStartBefore(r):n.setStartAfter(r):n.setStart(r,o),kt(t,i.nodeName.toLowerCase())?0===a?n.setEndBefore(i):n.setEndAfter(i):n.setEnd(i,a),n},c=function(e,t){var n,r,o,i,a,u,s,c,l,f,d=g.$,h=g.dom;if(!e)return null;if(e.collapsed){if(!C(e))if(!1===t){if(c=Ss(-1,y,e),ms(c.getNode(!0)))return p(-1,c.getNode(!0),!1,!1);if(ms(c.getNode()))return p(-1,c.getNode(),!c.isAtEnd(),!1)}else{if(c=Ss(1,y,e),ms(c.getNode()))return p(1,c.getNode(),!c.isAtEnd(),!1);if(ms(c.getNode(!0)))return p(1,c.getNode(!0),!1,!1)}return null}if(i=e.startContainer,a=e.startOffset,u=e.endOffset,3===i.nodeType&&0===a&&ug(i.parentNode)&&(i=i.parentNode,a=h.nodeIndex(i),i=i.parentNode),1!==i.nodeType)return null;if(u===a+1&&i===e.endContainer&&(n=i.childNodes[a]),!ug(n))return null;if(l=f=n.cloneNode(!0),(s=g.fire("ObjectSelected",{target:n,targetClone:l})).isDefaultPrevented())return null;r=wa(yt.fromDom(g.getBody()),"#"+b).fold(function(){return d([])},function(e){return d([e.dom()])}),l=s.targetClone,0===r.length&&(r=d('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id",b)).appendTo(g.getBody()),e=g.dom.createRng(),l===f&&Nn.ie?(r.empty().append('<p style="font-size: 0" data-mce-bogus="all">\xa0</p>').append(l),e.setStartAfter(r[0].firstChild.firstChild),e.setEndAfter(l)):(r.empty().append("\xa0").append(l).append("\xa0"),e.setStart(r[0].firstChild,1),e.setEnd(r[0].lastChild,0)),r.css({top:h.getPos(n,g.getBody()).y}),r[0].focus(),(o=g.selection.getSel()).removeAllRanges(),o.addRange(e);var m=yt.fromDom(n);return z(ma(yt.fromDom(g.getBody()),"*[data-mce-selected]"),function(e){ze(m,e)||pe(e,"data-mce-selected")}),g.dom.getAttrib(n,"data-mce-selected")||n.setAttribute("data-mce-selected","1"),v=n,w(),e},l=function(){v&&(v.removeAttribute("data-mce-selected"),wa(yt.fromDom(g.getBody()),"#"+b).each(_i),v=null),wa(yt.fromDom(g.getBody()),"#"+b).each(_i),v=null},w=function(){u.hide()};return Nn.ceFalse&&function(){g.on("mouseup",function(e){var t=o();t.collapsed&&Rd(g,e.clientX,e.clientY)&&a(tm(g,t,!1))}),g.on("click",function(e){var t;(t=rm(g,e.target))&&(ug(t)&&(e.preventDefault(),g.focus()),ag(t)&&g.dom.isChildOf(t,g.selection.getNode())&&l())}),g.on("blur NewBlock",function(){l()}),g.on("ResizeWindow FullscreenStateChanged",function(){return u.reposition()});function i(e,t){var n=g.dom.getParent(e,g.dom.isBlock),r=g.dom.getParent(t,g.dom.isBlock);return!(!n||!g.dom.isChildOf(n,r)||!1!==ug(rm(g,n)))||n&&!function(e,t){return g.dom.getParent(e,g.dom.isBlock)===g.dom.getParent(t,g.dom.isBlock)}(n,r)&&function(e){var t=rc(e);if(!e.firstChild)return!1;var n=Ds.before(e.firstChild),r=t.next(n);return r&&!Ph(r)&&!Lh(r)}(n)}var n,r;r=!1,(n=g).on("touchstart",function(){r=!1}),n.on("touchmove",function(){r=!0}),n.on("touchend",function(e){if(!r){var t=rm(n,e.target);ug(t)&&(e.preventDefault(),c(em(n,t)))}},!0),g.on("mousedown",function(e){var t,n=e.target;if((n===y||"HTML"===n.nodeName||g.dom.isChildOf(n,y))&&!1!==Rd(g,e.clientX,e.clientY))if(t=rm(g,n))ug(t)?(e.preventDefault(),c(em(g,t))):(l(),ag(t)&&e.shiftKey||Jm(e.clientX,e.clientY,g.selection.getRng())||(w(),g.selection.placeCaretAt(e.clientX,e.clientY)));else if(!1===ms(n)){l(),w();var r=Kh(y,e.clientX,e.clientY);if(r&&!i(e.target,r.node)){e.preventDefault();var o=p(1,r.node,r.before,!1);g.getBody().focus(),a(o)}}}),g.on("keypress",function(e){Ah.modifierPressed(e)||(e.keyCode,ug(g.selection.getNode())&&e.preventDefault())}),g.on("GetSelectionRange",function(e){var t=e.range;if(v){if(!v.parentNode)return void(v=null);(t=t.cloneRange()).selectNode(v),e.range=t}}),g.on("SetSelectionRange",function(e){e.range=s(e.range);var t=c(e.range,e.forward);t&&(e.range=t)});g.on("AfterSetSelectionRange",function(e){var t=e.range;C(t)||function(e){return"mcepastebin"===e.id}(t.startContainer.parentNode)||w(),function(e){return g.dom.hasClass(e,"mce-offscreen-selection")}(t.startContainer.parentNode)||l()}),g.on("copy",function(e){var t=e.clipboardData;if(!e.isDefaultPrevented()&&e.clipboardData&&!Nn.ie){var n=function(){var e=g.dom.get(b);return e?e.getElementsByTagName("*")[0]:e}();n&&(e.preventDefault(),t.clearData(),t.setData("text/html",n.outerHTML),t.setData("text/plain",n.outerText))}}),ng(g),ig(g)}(),{showCaret:p,showBlockCaretContainer:function(e){e.hasAttribute("data-mce-caret")&&(Pa(e),a(o()),g.selection.scrollIntoView(e[0]))},hideFakeCaret:w,destroy:function(){u.destroy(),v=null}}}function im(e){return Ge.isElement(e)?e.outerHTML:Ge.isText(e)?ir.encodeRaw(e.data,!1):Ge.isComment(e)?"\x3c!--"+e.data+"--\x3e":""}function am(e,t,n){var r=function(e){var t,n,r;for(r=j.document.createElement("div"),t=j.document.createDocumentFragment(),e&&(r.innerHTML=e);n=r.firstChild;)t.appendChild(n);return t}(t);if(e.hasChildNodes()&&n<e.childNodes.length){var o=e.childNodes[n];o.parentNode.insertBefore(r,o)}else e.appendChild(r)}function um(e){return{type:"fragmented",fragments:e,content:"",bookmark:null,beforeBookmark:null}}function sm(e){return{type:"complete",fragments:null,content:e,bookmark:null,beforeBookmark:null}}function cm(e){return"fragmented"===e.type?e.fragments.join(""):e.content}function lm(e){var t=yt.fromTag("body",mg.get().getOrThunk(function(){var e=j.document.implementation.createHTMLDocument("undo");return mg.set(k.some(e)),e}));return Aa(t,cm(e)),z(ma(t,"*[data-mce-bogus]"),Ni),function(e){return e.dom().innerHTML}(t)}function fm(e){return 0===e.get()}function dm(e,t,n){fm(n)&&(e.typing=t)}function hm(e,t){e.typing&&(dm(e,!1,t),e.add())}function mm(n){var r=Je(k.none()),o=Je(0),i=Je(0),a={data:[],typing:!1,beforeChange:function(){!function(e,t,n){fm(t)&&n.set(k.some(Vs.getUndoBookmark(e.selection)))}(n,o,r)},add:function(e,t){return function(e,t,n,r,o,i,a){var u=e.settings,s=gg(e);if(i=i||{},i=Mn.extend(i,s),!1===fm(r)||e.removed)return null;var c=t.data[n.get()];if(e.fire("BeforeAddUndo",{level:i,lastLevel:c,originalEvent:a}).isDefaultPrevented())return null;if(c&&vg(c,i))return null;if(t.data[n.get()]&&o.get().each(function(e){t.data[n.get()].beforeBookmark=e}),u.custom_undo_redo_levels&&t.data.length>u.custom_undo_redo_levels){for(var l=0;l<t.data.length-1;l++)t.data[l]=t.data[l+1];t.data.length--,n.set(t.data.length)}i.bookmark=Vs.getUndoBookmark(e.selection),n.get()<t.data.length-1&&(t.data.length=n.get()+1),t.data.push(i),n.set(t.data.length-1);var f={level:i,lastLevel:c,originalEvent:a};return e.fire("AddUndo",f),0<n.get()&&(e.setDirty(!0),e.fire("change",f)),i}(n,a,i,o,r,e,t)},undo:function(){return function(e,t,n,r){var o;return t.typing&&(t.add(),t.typing=!1,dm(t,!1,n)),0<r.get()&&(r.set(r.get()-1),o=t.data[r.get()],pg(e,o,!0),e.setDirty(!0),e.fire("Undo",{level:o})),o}(n,a,o,i)},redo:function(){return function(e,t,n){var r;return t.get()<n.length-1&&(t.set(t.get()+1),r=n[t.get()],pg(e,r,!1),e.setDirty(!0),e.fire("Redo",{level:r})),r}(n,i,a.data)},clear:function(){!function(e,t,n){t.data=[],n.set(0),t.typing=!1,e.fire("ClearUndos")}(n,a,i)},reset:function(){!function(e){e.clear(),e.add()}(a)},hasUndo:function(){return function(e,t,n){return 0<n.get()||t.typing&&t.data[0]&&!vg(gg(e),t.data[0])}(n,a,i)},hasRedo:function(){return function(e,t){return t.get()<e.data.length-1&&!e.typing}(a,i)},transact:function(e){return function(e,t,n){return hm(e,t),e.beforeChange(),e.ignore(n),e.add()}(a,o,e)},ignore:function(e){!function(e,t){try{e.set(e.get()+1),t()}finally{e.set(e.get()-1)}}(o,e)},extra:function(e,t){!function(e,t,n,r,o){if(t.transact(r)){var i=t.data[n.get()].bookmark,a=t.data[n.get()-1];pg(e,a,!0),t.transact(o)&&(t.data[n.get()-1].beforeBookmark=i)}}(n,a,i,e,t)}};return function(n,r,o){function i(e){dm(r,!1,o),r.add({},e)}var a=Je(!1);n.on("init",function(){r.add()}),n.on("BeforeExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&(hm(r,o),r.beforeChange())}),n.on("ExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&i(e)}),n.on("ObjectResizeStart cut",function(){r.beforeChange()}),n.on("SaveContent ObjectResized blur",i),n.on("dragend",i),n.on("keyup",function(e){var t=e.keyCode;e.isDefaultPrevented()||((33<=t&&t<=36||37<=t&&t<=40||45===t||e.ctrlKey)&&(i(),n.nodeChanged()),46!==t&&8!==t||n.nodeChanged(),a.get()&&r.typing&&!1===vg(gg(n),r.data[0])&&(!1===n.isDirty()&&(n.setDirty(!0),n.fire("change",{level:r.data[0],lastLevel:null})),n.fire("TypingUndo"),a.set(!1),n.nodeChanged()))}),n.on("keydown",function(e){var t=e.keyCode;if(!e.isDefaultPrevented())if(33<=t&&t<=36||37<=t&&t<=40||45===t)r.typing&&i(e);else{var n=e.ctrlKey&&!e.altKey||e.metaKey;!(t<16||20<t)||224===t||91===t||r.typing||n||(r.beforeChange(),dm(r,!0,o),r.add({},e),a.set(!0))}}),n.on("mousedown",function(e){r.typing&&i(e)});n.on("input",function(e){e.inputType&&(function(e){return"insertReplacementText"===e.inputType}(e)||function(e){return"insertText"===e.inputType&&null===e.data}(e))&&i(e)}),n.on("AddUndo Undo Redo ClearUndos",function(e){e.isDefaultPrevented()||n.nodeChanged()})}(n,a,o),function(e){e.addShortcut("meta+z","","Undo"),e.addShortcut("meta+y,meta+shift+z","","Redo")}(n),a}function gm(e,t,n){var r=e.formatter.get(n);if(r)for(var o=0;o<r.length;o++)if(!1===r[o].inherit&&e.dom.is(t,r[o].selector))return!0;return!1}function pm(t,e,n,r){var o=t.dom.getRoot();return e!==o&&(e=t.dom.getParent(e,function(e){return!!gm(t,e,n)||(e.parentNode===o||!!xg(t,e,n,r,!0))}),xg(t,e,n,r))}function vm(e,t,n){return!!wg(t,n.inline)||(!!wg(t,n.block)||(n.selector?1===t.nodeType&&e.is(t,n.selector):void 0))}function ym(e,t,n,r,o,i){var a,u,s,c=n[r];if(n.onmatch)return n.onmatch(t,n,r);if(c)if("undefined"==typeof c.length){for(a in c)if(c.hasOwnProperty(a)){if(u="attributes"===r?e.getAttrib(t,a):jc.getStyle(e,t,a),o&&!u&&!n.exact)return;if((!o||n.exact)&&!wg(u,jc.normalizeStyleValue(e,jc.replaceVars(c[a],i),a)))return}}else for(s=0;s<c.length;s++)if("attributes"===r?e.getAttrib(t,c[s]):jc.getStyle(e,t,c[s]))return n;return n}function bm(e,t){return e.splitText(t)}function Cm(e){var t=e.startContainer,n=e.startOffset,r=e.endContainer,o=e.endOffset;return t===r&&Ge.isText(t)?0<n&&n<t.nodeValue.length&&(t=(r=bm(t,n)).previousSibling,n<o?(t=r=bm(r,o-=n).previousSibling,o=r.nodeValue.length,n=0):o=0):(Ge.isText(t)&&0<n&&n<t.nodeValue.length&&(t=bm(t,n),n=0),Ge.isText(r)&&0<o&&o<r.nodeValue.length&&(o=(r=bm(r,o).previousSibling).nodeValue.length)),{startContainer:t,startOffset:n,endContainer:r,endOffset:o}}function wm(e,t,n){if(0!==n){var r=e.data.slice(t,t+n),o=t+n>=e.data.length,i=0===t;e.replaceData(t,n,function(n,r,o){return b(n,function(e,t){return function(e){return-1!==" \f\n\r\t\x0B".indexOf(e)}(t)||"\xa0"===t?e.previousCharIsSpace||""===e.str&&r||e.str.length===n.length-1&&o?{previousCharIsSpace:!1,str:e.str+"\xa0"}:{previousCharIsSpace:!0,str:e.str+" "}:{previousCharIsSpace:!1,str:e.str+t}},{previousCharIsSpace:!1,str:""}).str}(r,i,o))}}function xm(e,t){var n=e.data.slice(t),r=n.length-function(e){return e.replace(/^\s+/g,"")}(n).length;return wm(e,t,r)}function zm(e,t){var n=yt.fromDom(e);return function(e,t,n){return Ca(e,t,n).isSome()}(yt.fromDom(t),"pre,code",d(ze,n))}function Em(e,t){return La(t)&&!1===function(e,t){return Ge.isText(t)&&/^[ \t\r\n]*$/.test(t.data)&&!1===zm(e,t)}(e,t)||function(e){return Ge.isElement(e)&&"A"===e.nodeName&&e.hasAttribute("name")}(t)||Eg(t)}function Nm(e,t){return function(e,t){var n=e.container(),r=e.offset();return!1===Ds.isTextPosition(e)&&n===t.parentNode&&r>Ds.before(t).offset()}(t,e)?Ds(t.container(),t.offset()-1):t}function Sm(e){return La(e.previousSibling)?k.some(function(e){return Ge.isText(e)?Ds(e,e.data.length):Ds.after(e)}(e.previousSibling)):e.previousSibling?Pc.lastPositionIn(e.previousSibling):k.none()}function km(e){return La(e.nextSibling)?k.some(function(e){return Ge.isText(e)?Ds(e,0):Ds.before(e)}(e.nextSibling)):e.nextSibling?Pc.firstPositionIn(e.nextSibling):k.none()}function Tm(e,t){return Sm(t).orThunk(function(){return km(t)}).orThunk(function(){return function(e,t){var n=Ds.before(t.previousSibling?t.previousSibling:t.parentNode);return Pc.prevPosition(e,n).fold(function(){return Pc.nextPosition(e,Ds.after(t))},k.some)}(e,t)})}function Am(e,t){return km(t).orThunk(function(){return Sm(t)}).orThunk(function(){return function(e,t){return Pc.nextPosition(e,Ds.after(t)).fold(function(){return Pc.prevPosition(e,Ds.before(t))},k.some)}(e,t)})}function Mm(e,t,n){return function(e,t,n){return e?Am(t,n):Tm(t,n)}(e,t,n).map(d(Nm,n))}function Rm(t,n,e){e.fold(function(){t.focus()},function(e){t.selection.setRng(e.toRange(),n)})}function Dm(e,t){return t&&e.schema.getBlockElements().hasOwnProperty(ie(t))}function _m(e){if(kg(e)){var t=yt.fromHtml('<br data-mce-bogus="1">');return Ei(e),Di(e,t),k.some(Ds.before(t.dom()))}return k.none()}function Bm(e,t,a){var n=ke(e).filter(zt),r=Te(e).filter(zt);return _i(e),function(e,t,n,r){return e.isSome()&&t.isSome()&&n.isSome()?k.some(r(e.getOrDie(),t.getOrDie(),n.getOrDie())):k.none()}(n,r,t,function(e,t,n){var r=e.dom(),o=t.dom(),i=r.data.length;return function(e,t,n){var r=ne(e.data).length;e.appendData(t.data),_i(yt.fromDom(t)),n&&xm(e,r)}(r,o,a),n.container()===o?Ds(r,i):n}).orThunk(function(){return a&&(n.each(function(e){return function(e,t){var n=e.data.slice(0,t),r=n.length-ne(n).length;return wm(e,t-r,r)}(e.dom(),e.dom().length)}),r.each(function(e){return xm(e.dom(),0)})),t})}function Om(e){return 0<function(e){for(var t=[];e;){if(3===e.nodeType&&e.nodeValue!==Ag||1<e.childNodes.length)return[];1===e.nodeType&&t.push(e),e=e.firstChild}return t}(e).length}function Hm(e){if(e){var t=new yi(e,e);for(e=t.current();e;e=t.next())if(3===e.nodeType)return e}return null}function Pm(e){var t=yt.fromTag("span");return me(t,{id:Mg,"data-mce-bogus":"1","data-mce-type":"format-caret"}),e&&Di(t,yt.fromText(Ag)),t}function Lm(e,t,n){void 0===n&&(n=!0);var r=e.dom,o=e.selection;if(Om(t))Tg(e,!1,yt.fromDom(t),n);else{var i=o.getRng(),a=r.getParent(t,r.isBlock),u=function(e){var t=Hm(e);return t&&t.nodeValue.charAt(0)===Ag&&t.deleteData(0,1),t}(t);i.startContainer===u&&0<i.startOffset&&i.setStart(u,i.startOffset-1),i.endContainer===u&&0<i.endOffset&&i.setEnd(u,i.endOffset-1),r.remove(t,!0),a&&r.isEmpty(a)&&bg(yt.fromDom(a)),o.setRng(i)}}function Vm(e,t,n){void 0===n&&(n=!0);var r=e.dom,o=e.selection;if(t)Lm(e,t,n);else if(!(t=os(e.getBody(),o.getStart())))for(;t=r.get(Mg);)Lm(e,t,!1)}function Im(e,t,n){var r=e.dom,o=r.getParent(n,d(jc.isTextBlock,e));o&&r.isEmpty(o)?n.parentNode.replaceChild(t,n):(yg(yt.fromDom(n)),r.isEmpty(n)?n.parentNode.replaceChild(t,n):r.insertAfter(t,n))}function Fm(e,t){return e.appendChild(t),t}function Um(e,t){var n=m(e,function(e,t){return Fm(e,t.cloneNode(!1))},t);return Fm(n,n.ownerDocument.createTextNode(Ag))}function jm(t){t.on("mouseup keydown",function(e){!function(e,t){var n=e.selection,r=e.getBody();Vm(e,null,!1),8!==t&&46!==t||!n.isCollapsed()||n.getStart().innerHTML!==Ag||Vm(e,os(r,n.getStart())),37!==t&&39!==t||Vm(e,os(r,n.getStart()))}(t,e.keyCode)})}function qm(e,t){return e.schema.getTextInlineElements().hasOwnProperty(ie(t))&&!rs(t.dom())&&!Ge.isBogus(t.dom())}var $m,Wm,Km=d(Vh,kh.Up,ja,qa),Xm=d(Vh,kh.Down,qa,ja),Ym=Ge.isContentEditableFalse,Gm=ys,Jm=function(t,n,e){if(e.collapsed)return!1;if(Nn.browser.isIE()&&e.startOffset===e.endOffset-1&&e.startContainer===e.endContainer){var r=e.startContainer.childNodes[e.startOffset];if(Ge.isElement(r))return C(r.getClientRects(),function(e){return $a(e,t,n)})}return C(e.getClientRects(),function(e){return $a(e,t,n)})},Qm=function(e,t){return function(e,t,n){return{pageX:n.left-e.left+t.left,pageY:n.top-e.top+t.top}}(function(e){return e.inline?Xh(e.getBody()):{left:0,top:0}}(e),function(e){var t=e.getBody();return e.inline?{left:t.scrollLeft,top:t.scrollTop}:{left:0,top:0}}(e),function(e,t){if(t.target.ownerDocument===e.getDoc())return{left:t.pageX,top:t.pageY};var n=Xh(e.getContentAreaContainer()),r=function(e){var t=e.getBody(),n=e.getDoc().documentElement,r={left:t.scrollLeft,top:t.scrollTop},o={left:t.scrollLeft||n.scrollLeft,top:t.scrollTop||n.scrollTop};return e.inline?r:o}(e);return{left:t.pageX-n.left+r.left,top:t.pageY-n.top+r.top}}(e,t))},Zm=Ge.isContentEditableFalse,eg=Ge.isContentEditableTrue,tg=function(e){e.dragging=!1,e.element=null,Yh(e.ghost)},ng=function(e){Qh(e),function(n){n.on("drop",function(e){var t="undefined"!=typeof e.clientX?n.getDoc().elementFromPoint(e.clientX,e.clientY):null;(Zm(t)||Zm(n.dom.getContentEditableParent(t)))&&e.preventDefault()})}(e)},rg=Ge.isContentEditableTrue,og=Ge.isContentEditableFalse,ig=function(t){var e=aa(function(){if(!t.removed&&t.getBody().contains(j.document.activeElement)&&t.selection.getRng().collapsed){var e=nm(t,t.selection.getRng(),!1);t.selection.setRng(e)}},0);t.on("focus",function(){e.throttle()}),t.on("blur",function(){e.cancel()})},ag=Ge.isContentEditableTrue,ug=Ge.isContentEditableFalse,sg=0,cg=2,lg=1,fg=function(m,g){function p(e,t,n,r){for(var o=e;o-t<r&&o<n&&m[o]===g[o-t];)++o;return function(e,t,n){return{start:e,end:t,diag:n}}(e,o,t)}var e=m.length+g.length+2,v=new Array(e),y=new Array(e),c=function(e,t,n,r,o){var i=l(e,t,n,r);if(null===i||i.start===t&&i.diag===t-r||i.end===e&&i.diag===e-n)for(var a=e,u=n;a<t||u<r;)a<t&&u<r&&m[a]===g[u]?(o.push([0,m[a]]),++a,++u):r-n<t-e?(o.push([2,m[a]]),++a):(o.push([1,g[u]]),++u);else{c(e,i.start,n,i.start-i.diag,o);for(var s=i.start;s<i.end;++s)o.push([0,m[s]]);c(i.end,t,i.end-i.diag,r,o)}},l=function(e,t,n,r){var o=t-e,i=r-n;if(0==o||0==i)return null;var a,u,s,c,l,f=o-i,d=i+o,h=(d%2==0?d:1+d)/2;for(v[1+h]=e,y[1+h]=t+1,a=0;a<=h;++a){for(u=-a;u<=a;u+=2){for(s=u+h,u===-a||u!==a&&v[s-1]<v[s+1]?v[s]=v[s+1]:v[s]=v[s-1]+1,l=(c=v[s])-e+n-u;c<t&&l<r&&m[c]===g[l];)v[s]=++c,++l;if(f%2!=0&&f-a<=u&&u<=f+a&&y[s-f]<=v[s])return p(y[s-f],u+e-n,t,r)}for(u=f-a;u<=f+a;u+=2){for(s=u+h-f,u===f-a||u!==f+a&&y[s+1]<=y[s-1]?y[s]=y[s+1]-1:y[s]=y[s-1],l=(c=y[s]-1)-e+n-u;e<=c&&n<=l&&m[c]===g[l];)y[s]=c--,l--;if(f%2==0&&-a<=u&&u<=a&&y[s]<=v[s+f])return p(y[s],u+e-n,t,r)}}},t=[];return c(0,m.length,0,g.length,t),t},dg=function(e){return y(X(P(e.childNodes),im),function(e){return 0<e.length})},hg=function(e,t){var n=X(P(t.childNodes),im);return function(e,t){var n=0;z(e,function(e){e[0]===sg?n++:e[0]===lg?(am(t,e[1],n),n++):e[0]===cg&&function(e,t){if(e.hasChildNodes()&&t<e.childNodes.length){var n=e.childNodes[t];n.parentNode.removeChild(n)}}(t,n)})}(fg(n,e),t),t},mg=Je(k.none()),gg=function(n){var e,t,r;return e=dg(n.getBody()),function(e){return-1!==e.indexOf("</iframe>")}(t=(r=v(e,function(e){var t=af.trimInternal(n.serializer,e);return 0<t.length?[t]:[]})).join(""))?um(r):sm(t)},pg=function(e,t,n){"fragmented"===t.type?hg(t.fragments,e.getBody()):e.setContent(t.content,{format:"raw"}),e.selection.moveToBookmark(n?t.beforeBookmark:t.bookmark)},vg=function(e,t){return!(!e||!t)&&(!!function(e,t){return cm(e)===cm(t)}(e,t)||function(e,t){return lm(e)===lm(t)}(e,t))},yg=function(e){var t=ma(e,"br"),n=y(function(e){for(var t=[],n=e.dom();n;)t.push(yt.fromDom(n)),n=n.lastChild;return t}(e).slice(-1),_n);t.length===n.length&&z(n,_i)},bg=function(e){Ei(e),Di(e,yt.fromHtml('<br data-mce-bogus="1">'))},Cg=function(n){Be(n).each(function(t){ke(t).each(function(e){Vn(n)&&_n(t)&&Vn(e)&&_i(t)})})},wg=jc.isEq,xg=function(e,t,n,r,o){var i,a,u,s,c=e.formatter.get(n),l=e.dom;if(c&&t)for(a=0;a<c.length;a++)if(i=c[a],vm(e.dom,t,i)&&ym(l,t,i,"attributes",o,r)&&ym(l,t,i,"styles",o,r)){if(s=i.classes)for(u=0;u<s.length;u++)if(!e.dom.hasClass(t,s[u]))return;return i}},zg={matchNode:xg,matchName:vm,match:function(e,t,n,r){var o;return r?pm(e,r,t,n):(r=e.selection.getNode(),!!pm(e,r,t,n)||!((o=e.selection.getStart())===r||!pm(e,o,t,n)))},matchAll:function(r,o,i){var e,a=[],u={};return e=r.selection.getStart(),r.dom.getParent(e,function(e){var t,n;for(t=0;t<o.length;t++)n=o[t],!u[n]&&xg(r,e,n,i)&&(u[n]=!0,a.push(n))},r.dom.getRoot()),a},canApply:function(e,t){var n,r,o,i,a,u=e.formatter.get(t),s=e.dom;if(u)for(n=e.selection.getStart(),r=jc.getParents(s,n),i=u.length-1;0<=i;i--){if(!(a=u[i].selector)||u[i].defaultBlock)return!0;for(o=r.length-1;0<=o;o--)if(s.is(r[o],a))return!0}return!1},matchesUnInheritedFormatSelector:gm},Eg=Ge.hasAttribute("data-mce-bookmark"),Ng=Ge.hasAttribute("data-mce-bogus"),Sg=Ge.hasAttributeValue("data-mce-bogus","all"),kg=function(e){return function(e){var t,n=0;if(Em(e,e))return!1;if(!(t=e.firstChild))return!0;var r=new yi(t,e);do{if(Sg(t))t=r.next(!0);else if(Ng(t))t=r.next();else if(Ge.isBr(t))n++,t=r.next();else{if(Em(e,t))return!1;t=r.next()}}while(t);return n<=1}(e.dom())},Tg=function(t,n,e,r){void 0===r&&(r=!0);var o=Mm(n,t.getBody(),e.dom()),i=ya(e,d(Dm,t),function(t){return function(e){return e.dom()===t}}(t.getBody())),a=Bm(e,o,function(e,t){return kt(e.schema.getTextInlineElements(),ie(t))}(t,e));t.dom.isEmpty(t.getBody())?(t.setContent(""),t.selection.setCursorLocation()):i.bind(_m).fold(function(){r&&Rm(t,n,a)},function(e){r&&Rm(t,n,k.some(e))})},Ag=cu,Mg="_mce_caret",Rg={},Dg=kn.filter,_g=kn.each;Wm=function(e){var t,n,r=e.selection.getRng();t=Ge.matchNodeNames(["pre"]),r.collapsed||(n=e.selection.getSelectedBlocks(),_g(Dg(Dg(n,t),function(e){return t(e.previousSibling)&&-1!==kn.indexOf(n,e.previousSibling)}),function(e){!function(e,t){vi(t).remove(),vi(e).append("<br><br>").append(t.childNodes)}(e.previousSibling,e)}))},Rg[$m="pre"]||(Rg[$m]=[]),Rg[$m].push(Wm);function Bg(o){this.compare=function(e,t){if(e.nodeName!==t.nodeName)return!1;function n(n){var r={};return Gg(o.getAttribs(n),function(e){var t=e.nodeName.toLowerCase();0!==t.indexOf("_")&&"style"!==t&&0!==t.indexOf("data-")&&(r[t]=o.getAttrib(n,t))}),r}function r(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!!r(n(e),n(t))&&(!!r(o.parseStyle(o.getAttrib(e,"style")),o.parseStyle(o.getAttrib(t,"style")))&&(!Fc(e)&&!Fc(t)))}}function Og(e,t,n){return e.isChildOf(t,n)&&t!==n&&!e.isBlock(n)}function Hg(e,t,n){var r,o,i;return r=t[n?"startContainer":"endContainer"],o=t[n?"startOffset":"endOffset"],Ge.isElement(r)&&(i=r.childNodes.length-1,!n&&o&&o--,r=r.childNodes[i<o?i:o]),Ge.isText(r)&&n&&o>=r.nodeValue.length&&(r=new yi(r,e.getBody()).next()||r),Ge.isText(r)&&!n&&0===o&&(r=new yi(r,e.getBody()).prev()||r),r}function Pg(e,t,n,r){var o=e.create(n,r);return t.parentNode.insertBefore(o,t),o.appendChild(t),o}function Lg(e,t,n,r,o){var i=yt.fromDom(t),a=yt.fromDom(e.create(r,o)),u=n?Me(i):Ae(i);return zi(a,u),n?(Ci(i,a),xi(a,i)):(wi(i,a),Di(a,i)),a.dom()}function Vg(e,t,n,r){return!(t=jc.getNonWhiteSpaceSibling(t,n,r))||"BR"===t.nodeName||e.isBlock(t)}function Ig(e,r,o,i,a){var t,n,u,s=e.dom;if(!function(e,t,n){return!!Zg(t,n.inline)||(!!Zg(t,n.block)||(n.selector?Ge.isElement(t)&&e.is(t,n.selector):void 0))}(s,i,r)&&!function(e,t){return t.links&&"A"===e.tagName}(i,r))return!1;if("all"!==r.remove)for(Qg(r.styles,function(e,t){e=jc.normalizeStyleValue(s,jc.replaceVars(e,o),t),"number"==typeof t&&(t=e,a=0),!r.remove_similar&&a&&!Zg(jc.getStyle(s,a,t),e)||s.setStyle(i,t,""),u=1}),u&&""===s.getAttrib(i,"style")&&(i.removeAttribute("style"),i.removeAttribute("data-mce-style")),Qg(r.attributes,function(e,t){var n;if(e=jc.replaceVars(e,o),"number"==typeof t&&(t=e,a=0),r.remove_similar||!a||Zg(s.getAttrib(a,t),e)){if("class"===t&&(e=s.getAttrib(i,t))&&(n="",Qg(e.split(/\s+/),function(e){/mce\-\w+/.test(e)&&(n+=(n?" ":"")+e)}),n))return void s.setAttrib(i,t,n);"class"===t&&i.removeAttribute("className"),Jg.test(t)&&i.removeAttribute("data-mce-"+t),i.removeAttribute(t)}}),Qg(r.classes,function(e){e=jc.replaceVars(e,o),a&&!s.hasClass(a,e)||s.removeClass(i,e)}),n=s.getAttribs(i),t=0;t<n.length;t++){var c=n[t].nodeName;if(0!==c.indexOf("_")&&0!==c.indexOf("data-"))return!1}return"none"!==r.remove?(function(t,e,n){var r,o=e.parentNode,i=t.dom,a=mf(t);n.block&&(a?o===i.getRoot()&&(n.list_block&&Zg(e,n.list_block)||Qg(Mn.grep(e.childNodes),function(e){jc.isValid(t,a,e.nodeName.toLowerCase())?r?r.appendChild(e):(r=Pg(i,e,a),i.setAttribs(r,t.settings.forced_root_block_attrs)):r=0})):i.isBlock(e)&&!i.isBlock(o)&&(Vg(i,e,!1)||Vg(i,e.firstChild,!0,1)||e.insertBefore(i.create("br"),e.firstChild),Vg(i,e,!0)||Vg(i,e.lastChild,!1,1)||e.appendChild(i.create("br")))),n.selector&&n.inline&&!Zg(n.inline,e)||i.remove(e,1)}(e,i,r),!0):void 0}function Fg(e){return e&&1===e.nodeType&&!Fc(e)&&!rs(e)&&!Ge.isBogus(e)}function Ug(e,t){var n;for(n=e;n;n=n[t]){if(3===n.nodeType&&0!==n.nodeValue.length)return e;if(1===n.nodeType&&!Fc(n))return n}return e}function jg(e,t,n){var r,o,i=new Bg(e);if(t&&n&&(t=Ug(t,"previousSibling"),n=Ug(n,"nextSibling"),i.compare(t,n))){for(r=t.nextSibling;r&&r!==n;)r=(o=r).nextSibling,t.appendChild(o);return e.remove(n),Mn.each(Mn.grep(n.childNodes),function(e){t.appendChild(e)}),t}return n}function qg(n,e){return d(function(e,t){return!(!t||!jc.getStyle(n,t,e))},e)}function $g(r,e,t){return d(function(e,t,n){r.setStyle(n,e,t),""===n.getAttribute("style")&&n.removeAttribute("style"),op(r,n)},e,t)}function Wg(e,t){var n;1===t.nodeType&&t.parentNode&&1===t.parentNode.nodeType&&(n=jc.getTextDecoration(e,t.parentNode),e.getStyle(t,"color")&&n?e.setStyle(t,"text-decoration",n):e.getStyle(t,"text-decoration")===n&&e.setStyle(t,"text-decoration",null))}function Kg(t){var n=Ds.fromRangeStart(t),r=Ds.fromRangeEnd(t),o=t.commonAncestorContainer;return Pc.fromPosition(!1,o,r).map(function(e){return!Cs(n,r,o)&&Cs(n,e,o)?function(e,t,n,r){var o=j.document.createRange();return o.setStart(e,t),o.setEnd(n,r),o}(n.container(),n.offset(),e.container(),e.offset()):t}).getOr(t)}function Xg(e,t,n,r,o){return null===t.get()&&function(t,n){var r=Je({});t.set({}),n.on("NodeChange",function(e){gp(n,e.element,r,t.get())})}(t,e),function(e,t,n,r){var o=e.get();z(t.split(","),function(e){o[e]||(o[e]={similar:r,callbacks:[]}),o[e].callbacks.push(n)}),e.set(o)}(t,n,r,o),{unbind:function(){return function(e,t,n){var r=e.get();z(t.split(","),function(e){r[e].callbacks=y(r[e].callbacks,function(e){return e!==n}),0===r[e].callbacks.length&&delete r[e]}),e.set(r)}(t,n,r)}}}var Yg=function(e,t){_g(Rg[e],function(e){e(t)})},Gg=Mn.each,Jg=/^(src|href|style)$/,Qg=Mn.each,Zg=jc.isEq,ep=Ig,tp=function(a,n,u,e,r){function i(e){var t=function(n,e,r,o,i){var a;return Qg(jc.getParents(n.dom,e.parentNode).reverse(),function(e){var t;a||"_start"===e.id||"_end"===e.id||(t=zg.matchNode(n,e,r,o,i))&&!1!==t.split&&(a=e)}),a}(a,e,n,u,r);return function(e,t,n,r,o,i,a,u){var s,c,l,f,d,h,m=e.dom;if(n){for(h=n.parentNode,s=r.parentNode;s&&s!==h;s=s.parentNode){for(c=m.clone(s,!1),d=0;d<t.length;d++)if(Ig(e,t[d],u,c,c)){c=0;break}c&&(l&&c.appendChild(l),f=f||c,l=c)}!i||a.mixed&&m.isBlock(n)||(r=m.split(n,r)),l&&(o.parentNode.insertBefore(l,o),f.appendChild(o))}return r}(a,l,t,e,e,!0,f,u)}function s(e){var t=h.get(e?"_start":"_end"),n=t[e?"firstChild":"lastChild"];return function(e){return Fc(e)&&Ge.isElement(e)&&("_start"===e.id||"_end"===e.id)}(n)&&(n=n[e?"firstChild":"lastChild"]),Ge.isText(n)&&0===n.data.length&&(n=e?t.previousSibling||t.nextSibling:t.nextSibling||t.previousSibling),h.remove(t,!0),n}function t(e){var t,n,r=e.commonAncestorContainer;if(e=Xc(a,e,l,!0),f.split){if(e=Cm(e),(t=Hg(a,e,!0))!==(n=Hg(a,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)&&function(e){return/^(TH|TD)$/.test(e.nodeName)}(n)&&n.firstChild&&(n=n.firstChild||n),Og(h,t,n)){var o=k.from(t.firstChild).getOr(t);return i(Lg(h,o,!0,"span",{id:"_start","data-mce-type":"bookmark"})),void s(!0)}if(Og(h,n,t)){o=k.from(n.lastChild).getOr(n);return i(Lg(h,o,!1,"span",{id:"_end","data-mce-type":"bookmark"})),void s(!1)}t=Pg(h,t,"span",{id:"_start","data-mce-type":"bookmark"}),n=Pg(h,n,"span",{id:"_end","data-mce-type":"bookmark"}),i(t),i(n),t=s(!0),n=s()}else t=n=i(t);e.startContainer=t.parentNode?t.parentNode:t,e.startOffset=h.nodeIndex(t),e.endContainer=n.parentNode?n.parentNode:n,e.endOffset=h.nodeIndex(n)+1}Gc(h,e,function(e){Qg(e,function(e){g(e),Ge.isElement(e)&&"underline"===a.dom.getStyle(e,"text-decoration")&&e.parentNode&&"underline"===jc.getTextDecoration(h,e.parentNode)&&Ig(a,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:"underline"}},null,e)})})}var o,c,l=a.formatter.get(n),f=l[0],d=!0,h=a.dom,m=a.selection,g=function(e){var t,n,r,o,i;if(Ge.isElement(e)&&h.getContentEditable(e)&&(o=d,d="true"===h.getContentEditable(e),i=!0),t=Mn.grep(e.childNodes),d&&!i)for(n=0,r=l.length;n<r&&!Ig(a,l[n],u,e,e);n++);if(f.deep&&t.length){for(n=0,r=t.length;n<r;n++)g(t[n]);i&&(d=o)}};if(e)e.nodeType?((c=h.createRng()).setStartBefore(e),c.setEndAfter(e),t(c)):t(e);else if("false"!==h.getContentEditable(m.getNode()))m.isCollapsed()&&f.inline&&!h.select("td[data-mce-selected],th[data-mce-selected]").length?function(e,t,n,r){var o,i,a,u,s,c,l,f=e.dom,d=e.selection,h=[],m=d.getRng();for(o=m.startContainer,i=m.startOffset,3===(s=o).nodeType&&(i!==o.nodeValue.length&&(u=!0),s=s.parentNode);s;){if(zg.matchNode(e,s,t,n,r)){c=s;break}s.nextSibling&&(u=!0),h.push(s),s=s.parentNode}if(c)if(u){a=d.getBookmark(),m.collapse(!0);var g=Xc(e,m,e.formatter.get(t),!0);g=Cm(g),e.formatter.remove(t,n,g),d.moveToBookmark(a)}else{l=os(e.getBody(),c);var p=Pm(!1).dom(),v=Um(h,p);Im(e,p,l||c),Lm(e,l,!1),d.setCursorLocation(v,1),f.isEmpty(c)&&f.remove(c)}}(a,n,u,r):(o=Vs.getPersistentBookmark(a.selection,!0),t(m.getRng()),m.moveToBookmark(o),f.inline&&zg.match(a,n,u,m.getStart())&&jc.moveStart(h,m,m.getRng()),a.nodeChanged());else{e=m.getNode();for(var p=0,v=l.length;p<v&&(!l[p].ceFalseOverride||!Ig(a,l[p],u,e,e));p++);}},np=Mn.each,rp=function(e,t,n){np(e.childNodes,function(e){Fg(e)&&(t(e)&&n(e),e.hasChildNodes()&&rp(e,t,n))})},op=function(e,t){"SPAN"===t.nodeName&&0===e.getAttribs(t).length&&e.remove(t,!0)},ip=function(n,e,r,o){np(e,function(t){np(n.dom.select(t.inline,o),function(e){Fg(e)&&ep(n,t,r,e,t.exact?e:null)}),function(r,e,t){if(e.clear_child_styles){var n=e.links?"*:not(a)":"*";np(r.select(n,t),function(n){Fg(n)&&np(e.styles,function(e,t){r.setStyle(n,t,"")})})}}(n.dom,t,o)})},ap=function(e,t,n,r){(t.styles.color||t.styles.textDecoration)&&(Mn.walk(r,d(Wg,e),"childNodes"),Wg(e,r))},up=function(e,t,n,r){t.styles&&t.styles.backgroundColor&&rp(r,qg(e,"fontSize"),$g(e,"backgroundColor",jc.replaceVars(t.styles.backgroundColor,n)))},sp=function(e,t,n,r){"sub"!==t.inline&&"sup"!==t.inline||(rp(r,qg(e,"fontSize"),$g(e,"fontSize","")),e.remove(e.select("sup"===t.inline?"sub":"sup",r),!0))},cp=function(e,t,n,r){r&&!1!==t.merge_siblings&&(r=jg(e,jc.getNonWhiteSpaceSibling(r),r),r=jg(e,r,jc.getNonWhiteSpaceSibling(r,!0)))},lp=function(t,n,r,o,i){zg.matchNode(t,i.parentNode,r,o)&&ep(t,n,o,i)||n.merge_with_parents&&t.dom.getParent(i.parentNode,function(e){if(zg.matchNode(t,e,r,o))return ep(t,n,o,i),!0})},fp=function(e){return e.collapsed?e:Kg(e)},dp=Mn.each,hp=function(m,g,p,r){function v(n,e){if(e=e||C,n){if(e.onformat&&e.onformat(n,e,p,r),dp(e.styles,function(e,t){i.setStyle(n,t,jc.replaceVars(e,p))}),e.styles){var t=i.getAttrib(n,"style");t&&n.setAttribute("data-mce-style",t)}dp(e.attributes,function(e,t){i.setAttrib(n,t,jc.replaceVars(e,p))}),dp(e.classes,function(e){e=jc.replaceVars(e,p),i.hasClass(n,e)||i.addClass(n,e)})}}function y(e,t){var n=!1;return!!C.selector&&(dp(e,function(e){if(!("collapsed"in e&&e.collapsed!==o))return i.is(t,e.selector)&&!rs(t)?(v(t,e),!(n=!0)):void 0}),n)}function e(s,e,t,c){var l,f,d=[],h=!0;l=C.inline||C.block,f=s.create(l),v(f),Gc(s,e,function(e){var a,u=function(e){var t,n,r,o;if(o=h,t=e.nodeName.toLowerCase(),n=e.parentNode.nodeName.toLowerCase(),1===e.nodeType&&s.getContentEditable(e)&&(o=h,h="true"===s.getContentEditable(e),r=!0),jc.isEq(t,"br"))return a=0,void(C.block&&s.remove(e));if(C.wrapper&&zg.matchNode(m,e,g,p))a=0;else{if(h&&!r&&C.block&&!C.wrapper&&jc.isTextBlock(m,t)&&jc.isValid(m,n,l))return e=s.rename(e,l),v(e),d.push(e),void(a=0);if(C.selector){var i=y(b,e);if(!C.inline||i)return void(a=0)}!h||r||!jc.isValid(m,l,t)||!jc.isValid(m,n,l)||!c&&3===e.nodeType&&1===e.nodeValue.length&&65279===e.nodeValue.charCodeAt(0)||rs(e)||C.inline&&s.isBlock(e)?(a=0,dp(Mn.grep(e.childNodes),u),r&&(h=o),a=0):(a||(a=s.clone(f,!1),e.parentNode.insertBefore(a,e),d.push(a)),a.appendChild(e))}};dp(e,u)}),!0===C.links&&dp(d,function(e){var t=function(e){"A"===e.nodeName&&v(e,C),dp(Mn.grep(e.childNodes),t)};t(e)}),dp(d,function(e){function t(e){var t=!1;return dp(e.childNodes,function(e){if(function(e){return e&&1===e.nodeType&&!Fc(e)&&!rs(e)&&!Ge.isBogus(e)}(e))return t=e,!1}),t}var n,r,o,i,a;(r=0,dp(e.childNodes,function(e){jc.isWhiteSpaceNode(e)||Fc(e)||r++}),n=r,!(1<d.length)&&s.isBlock(e)||0!==n)?(C.inline||C.wrapper)&&(C.exact||1!==n||((i=t(o=e))&&!Fc(i)&&zg.matchName(s,i,C)&&(a=s.clone(i,!1),v(a),s.replace(a,o,!0),s.remove(i,1)),e=a||o),ip(m,b,p,e),lp(m,C,g,p,e),up(s,C,p,e),sp(s,C,p,e),cp(s,C,p,e)):s.remove(e,1)})}var t,n,b=m.formatter.get(g),C=b[0],o=!r&&m.selection.isCollapsed(),i=m.dom,a=m.selection;if("false"!==i.getContentEditable(a.getNode())){if(C){if(r)r.nodeType?y(b,r)||((n=i.createRng()).setStartBefore(r),n.setEndAfter(r),e(i,Xc(m,n,b),0,!0)):e(i,r,0,!0);else if(o&&C.inline&&!i.select("td[data-mce-selected],th[data-mce-selected]").length)!function(e,t,n){var r,o,i,a,u,s,c=e.selection;a=(r=c.getRng()).startOffset,s=r.startContainer.nodeValue,(o=os(e.getBody(),c.getStart()))&&(i=Hm(o));var l=/[^\s\u00a0\u00ad\u200b\ufeff]/;s&&0<a&&a<s.length&&l.test(s.charAt(a))&&l.test(s.charAt(a-1))?(u=c.getBookmark(),r.collapse(!0),r=Xc(e,r,e.formatter.get(t)),r=Cm(r),e.formatter.apply(t,n,r),c.moveToBookmark(u)):(o&&i.nodeValue===Ag||(i=(o=function(e,t){return e.importNode(t,!0)}(e.getDoc(),Pm(!0).dom())).firstChild,r.insertNode(o),a=1),e.formatter.apply(t,n,o),c.setCursorLocation(i,a))}(m,g,p);else{var u=m.selection.getNode();m.settings.forced_root_block||!b[0].defaultBlock||i.getParent(u,i.isBlock)||hp(m,b[0].defaultBlock),m.selection.setRng(fp(m.selection.getRng())),t=Vs.getPersistentBookmark(m.selection,!0),e(i,Xc(m,a.getRng(),b)),C.styles&&ap(i,C,p,u),a.moveToBookmark(t),jc.moveStart(i,a,a.getRng()),m.nodeChanged()}Yg(g,m)}}else{r=a.getNode();for(var s=0,c=b.length;s<c;s++)if(b[s].ceFalseOverride&&i.is(r,b[s].selector))return void v(r,b[s])}},mp={applyFormat:hp},gp=function(r,e,t,n){var o=Et(t.get()),i={},a={},u=y(jc.getParents(r.dom,e),function(e){return 1===e.nodeType&&!e.getAttribute("data-mce-bogus")});ue(n,function(e,n){Mn.each(u,function(t){return r.formatter.matchNode(t,n,{},e.similar)?(-1===o.indexOf(n)&&(z(e.callbacks,function(e){e(!0,{node:t,format:n,parents:u})}),i[n]=e.callbacks),a[n]=e.callbacks,!1):!zg.matchesUnInheritedFormatSelector(r,t,n)&&void 0})});var s=pp(t.get(),a,e,u);t.set(G(G({},i),s))},pp=function(e,n,r,o){return ce(e,function(e,t){return!!kt(n,t)||(z(e,function(e){e(!1,{node:r,format:t,parents:o})}),!1)}).t},vp=function(r){var t={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:"font-family font-size",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,clear_child_styles:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},fontname:{inline:"span",toggle:!1,styles:{fontFamily:"%value"},clear_child_styles:!0},fontsize:{inline:"span",toggle:!1,styles:{fontSize:"%value"},clear_child_styles:!0},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:!0,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(n,e,t){Mn.each(t,function(e,t){r.setAttrib(n,t,e)})}},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}]};return Mn.each("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/),function(e){t[e]={block:e,remove:"all"}}),t};function yp(e,t){function s(e){var t;return r="string"==typeof e?{name:e,classes:[],attrs:{}}:e,function(e,t){t.classes.length&&Rp.addClass(e,t.classes.join(" ")),Rp.setAttribs(e,t.attrs)}(t=Rp.create(r.name),r),t}var n,r,o,c=t&&t.schema||pr({}),l=function(n,e,t){var r,o,i,a=0<e.length&&e[0],u=a&&a.name;if(i=function(e,t){var n="string"!=typeof e?e.nodeName.toLowerCase():e,r=c.getElementRule(n),o=r&&r.parentsRequired;return!(!o||!o.length)&&(t&&-1!==Mn.inArray(o,t)?t:o[0])}(n,u))u===i?(o=e[0],e=e.slice(1)):o=i;else if(a)o=e[0],e=e.slice(1);else if(!t)return n;return o&&(r=s(o)).appendChild(n),t&&(r||(r=Rp.create("div")).appendChild(n),Mn.each(t,function(e){var t=s(e);r.insertBefore(t,n)})),l(r,e,o&&o.siblings)};return e&&e.length?(r=e[0],n=s(r),(o=Rp.create("div")).appendChild(l(n,e.slice(1),r.siblings)),o):""}function bp(e){var t,a={classes:[],attrs:{}};return"*"!==(e=a.selector=Mn.trim(e))&&(t=e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,function(e,t,n,r,o){switch(t){case"#":a.attrs.id=n;break;case".":a.classes.push(n);break;case":":-1!==Mn.inArray("checked disabled enabled read-only required".split(" "),n)&&(a.attrs[n]=n)}if("["===r){var i=o.match(/([\w\-]+)(?:\=\"([^\"]+))?/);i&&(a.attrs[i[1]]=i[2])}return""})),a.name=t||"div",a}function Cp(e){var t=function o(e){var n={},r=function(e,t){e&&("string"!=typeof e?Mn.each(e,function(e,t){r(t,e)}):(A(t)||(t=[t]),Mn.each(t,function(e){"undefined"==typeof e.deep&&(e.deep=!e.selector),"undefined"==typeof e.split&&(e.split=!e.selector||e.inline),"undefined"==typeof e.remove&&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+/))}),n[e]=t))};return r(vp(e.dom)),r(e.settings.formats),{get:function(e){return e?n[e]:n},has:function(e){return kt(n,e)},register:r,unregister:function(e){return e&&n[e]&&delete n[e],n}}}(e),n=Je(null);return Op(e),jm(e),{get:t.get,has:t.has,register:t.register,unregister:t.unregister,apply:d(mp.applyFormat,e),remove:d(tp,e),toggle:d(Bp,e,t),match:d(zg.match,e),matchAll:d(zg.matchAll,e),matchNode:d(zg.matchNode,e),canApply:d(zg.canApply,e),formatChanged:d(Xg,e,n),getCssText:d(_p,e)}}function wp(e,i,a){e.addNodeFilter("font",function(e){z(e,function(e){var t=i.parse(e.attr("style")),n=e.attr("color"),r=e.attr("face"),o=e.attr("size");n&&(t.color=n),r&&(t["font-family"]=r),o&&(t["font-size"]=a[parseInt(e.attr("size"),10)-1]),e.name="span",e.attr("style",i.serialize(t)),function(t,e){z(e,function(e){t.attr(e,null)})}(e,["color","face","size"])})})}function xp(e,t){var n=xr();t.convert_fonts_to_spans&&wp(e,n,Mn.explode(t.font_size_legacy_values)),function(e,n){e.addNodeFilter("strike",function(e){z(e,function(e){var t=n.parse(e.attr("style"));t["text-decoration"]="line-through",e.name="span",e.attr("style",n.serialize(t))})})}(e,n)}function zp(e,t,n,r){(e.padd_empty_with_br||t.insert)&&n[r.name]?r.empty().append(new ul("br",1)).shortEnded=!0:r.empty().append(new ul("#text",3)).value="\xa0"}function Ep(t,e,n,r){return r.isEmpty(e,n,function(e){return function(e,t){var n=e.getElementRule(t.name);return n&&n.paddEmpty}(t,e)})}function Np(T,A){void 0===A&&(A=pr());var M={},R=[],D={},_={};(T=T||{}).validate=!("validate"in T)||T.validate,T.root_name=T.root_name||"body";var B=function(e){var t,n,r;(n=e.name)in M&&((r=D[n])?r.push(e):D[n]=[e]),t=R.length;for(;t--;)(n=R[t].name)in e.attributes.map&&((r=_[n])?r.push(e):_[n]=[e]);return e},e={schema:A,addAttributeFilter:function(e,n){Up(jp(e),function(e){var t;for(t=0;t<R.length;t++)if(R[t].name===e)return void R[t].callbacks.push(n);R.push({name:e,callbacks:[n]})})},getAttributeFilters:function(){return[].concat(R)},addNodeFilter:function(e,n){Up(jp(e),function(e){var t=M[e];t||(M[e]=t=[]),t.push(n)})},getNodeFilters:function(){var e=[];for(var t in M)M.hasOwnProperty(t)&&e.push({name:t,callbacks:M[t]});return e},filterNode:B,parse:function(e,a){var t,n,r,o,i,u,s,c,l,f,d,h=[];a=a||{},D={},_={},l=qp(Fp("script,style,head,html,body,title,meta,param"),A.getBlockElements());var m,g=A.getNonEmptyElements(),p=A.children,v=T.validate,y="forced_root_block"in a?a.forced_root_block:T.forced_root_block,b=!1===(m=y)?"":!0===m?"p":m,C=A.getWhiteSpaceElements(),w=/^[ \t\r\n]+/,x=/[ \t\r\n]+$/,z=/[ \t\r\n]+/g,E=/^[ \t\r\n]+$/;f=C.hasOwnProperty(a.context)||C.hasOwnProperty(T.root_name);function N(e){var t,n,r,o,i=A.getBlockElements();for(t=e.prev;t&&3===t.type;){if(0<(r=t.value.replace(x,"")).length)return void(t.value=r);if(n=t.next){if(3===n.type&&n.value.length){t=t.prev;continue}if(!i[n.name]&&"script"!==n.name&&"style"!==n.name){t=t.prev;continue}}o=t.prev,t.remove(),t=o}}var S=function(e,t){var n,r=new ul(e,t);return e in M&&((n=D[e])?n.push(r):D[e]=[r]),r};t=of({validate:v,allow_script_urls:T.allow_script_urls,allow_conditional_comments:T.allow_conditional_comments,self_closing_elements:function(e){var t,n={};for(t in e)"li"!==t&&"p"!==t&&(n[t]=e[t]);return n}(A.getSelfClosingElements()),cdata:function(e){d.append(S("#cdata",4)).value=e},text:function(e,t){var n;f||(e=e.replace(z," "),function(e,t){return e&&(t[e.name]||"br"===e.name)}(d.lastChild,l)&&(e=e.replace(w,""))),0!==e.length&&((n=S("#text",3)).raw=!!t,d.append(n).value=e)},comment:function(e){d.append(S("#comment",8)).value=e},pi:function(e,t){d.append(S(e,7)).value=t,N(d)},doctype:function(e){d.append(S("#doctype",10)).value=e,N(d)},start:function(e,t,n){var r,o,i,a,u;if(i=v?A.getElementRule(e):{}){for((r=S(i.outputName||e,1)).attributes=t,r.shortEnded=n,d.append(r),(u=p[d.name])&&p[r.name]&&!u[r.name]&&h.push(r),o=R.length;o--;)(a=R[o].name)in t.map&&((s=_[a])?s.push(r):_[a]=[r]);l[e]&&N(r),n||(d=r),!f&&C[e]&&(f=!0)}},end:function(e){var t,n,r,o,i;if(n=v?A.getElementRule(e):{}){if(l[e]&&!f){if((t=d.firstChild)&&3===t.type)if(0<(r=t.value.replace(w,"")).length)t.value=r,t=t.next;else for(o=t.next,t.remove(),t=o;t&&3===t.type;)r=t.value,o=t.next,0!==r.length&&!E.test(r)||(t.remove(),t=o),t=o;if((t=d.lastChild)&&3===t.type)if(0<(r=t.value.replace(x,"")).length)t.value=r,t=t.prev;else for(o=t.prev,t.remove(),t=o;t&&3===t.type;)r=t.value,o=t.prev,0!==r.length&&!E.test(r)||(t.remove(),t=o),t=o}if(f&&C[e]&&(f=!1),n.removeEmpty&&Ep(A,g,C,d)&&!d.attr("name")&&!d.attr("id"))return i=d.parent,l[d.name]?d.empty().remove():d.unwrap(),void(d=i);n.paddEmpty&&(function(e){return Ip(e,"#text")&&"\xa0"===e.firstChild.value}(d)||Ep(A,g,C,d))&&zp(T,a,l,d),d=d.parent}}},A);var k=d=new ul(a.context||T.root_name,11);if(t.parse(e),v&&h.length&&(a.context?a.invalid=!0:function(e){var t,n,r,o,i,a,u,s,c,l,f,d,h,m,g,p;for(d=Fp("tr,td,th,tbody,thead,tfoot,table"),l=A.getNonEmptyElements(),f=A.getWhiteSpaceElements(),h=A.getTextBlockElements(),m=A.getSpecialElements(),t=0;t<e.length;t++)if((n=e[t]).parent&&!n.fixed)if(h[n.name]&&"li"===n.parent.name){for(g=n.next;g&&h[g.name];)g.name="li",g.fixed=!0,n.parent.insert(g,n.parent),g=g.next;n.unwrap(n)}else{for(o=[n],r=n.parent;r&&!A.isValidChild(r.name,n.name)&&!d[r.name];r=r.parent)o.push(r);if(r&&1<o.length){for(o.reverse(),i=a=B(o[0].clone()),c=0;c<o.length-1;c++){for(A.isValidChild(a.name,o[c].name)?(u=B(o[c].clone()),a.append(u)):u=a,s=o[c].firstChild;s&&s!==o[c+1];)p=s.next,u.append(s),s=p;a=u}Ep(A,l,f,i)?r.insert(n,o[0],!0):(r.insert(i,o[0],!0),r.insert(n,i)),r=o[0],(Ep(A,l,f,r)||Ip(r,"br"))&&r.empty().remove()}else if(n.parent){if("li"===n.name){if((g=n.prev)&&("ul"===g.name||"ul"===g.name)){g.append(n);continue}if((g=n.next)&&("ul"===g.name||"ul"===g.name)){g.insert(n,g.firstChild,!0);continue}n.wrap(B(new ul("ul",1)));continue}A.isValidChild(n.parent.name,"div")&&A.isValidChild("div",n.name)?n.wrap(B(new ul("div",1))):m[n.name]?n.empty().remove():n.unwrap()}}}(h)),b&&("body"===k.name||a.isRootContent)&&function(){function e(e){e&&((r=e.firstChild)&&3===r.type&&(r.value=r.value.replace(w,"")),(r=e.lastChild)&&3===r.type&&(r.value=r.value.replace(x,"")))}var t,n,r=k.firstChild;if(A.isValidChild(k.name,b.toLowerCase())){for(;r;)t=r.next,3===r.type||1===r.type&&"p"!==r.name&&!l[r.name]&&!r.attr("data-mce-type")?(n||((n=S(b,1)).attr(T.forced_root_block_attrs),k.insert(n,r)),n.append(r)):(e(n),n=null),r=t;e(n)}}(),!a.invalid){for(c in D)if(D.hasOwnProperty(c)){for(s=M[c],i=(n=D[c]).length;i--;)n[i].parent||n.splice(i,1);for(r=0,o=s.length;r<o;r++)s[r](n,c,a)}for(r=0,o=R.length;r<o;r++)if((s=R[r]).name in _){for(i=(n=_[s.name]).length;i--;)n[i].parent||n.splice(i,1);for(i=0,u=s.callbacks.length;i<u;i++)s.callbacks[i](n,s.name,a)}}return k}};return function(e,g){var p=e.schema;g.remove_trailing_brs&&e.addNodeFilter("br",function(e,t,n){var r,o,i,a,u,s,c,l,f=e.length,d=Mn.extend({},p.getBlockElements()),h=p.getNonEmptyElements(),m=p.getNonEmptyElements();for(d.body=1,r=0;r<f;r++)if(i=(o=e[r]).parent,d[o.parent.name]&&o===i.lastChild){for(u=o.prev;u;){if("span"!==(s=u.name)||"bookmark"!==u.attr("data-mce-type")){if("br"!==s)break;if("br"===s){o=null;break}}u=u.prev}o&&(o.remove(),Ep(p,h,m,i)&&(c=p.getElementRule(i.name))&&(c.removeEmpty?i.remove():c.paddEmpty&&zp(g,n,d,i)))}else{for(a=o;i&&i.firstChild===a&&i.lastChild===a&&!d[(a=i).name];)i=i.parent;a===i&&!0!==g.padd_empty_with_br&&((l=new ul("#text",3)).value="\xa0",o.replace(l))}}),e.addAttributeFilter("href",function(e){var t,n,r,o=e.length;if(!g.allow_unsafe_link_target)for(;o--;)"a"===(t=e[o]).name&&"_blank"===t.attr("target")&&t.attr("rel",(n=t.attr("rel"),void 0,r=n?Mn.trim(n):"",/\b(noopener)\b/g.test(r)?r:r.split(" ").filter(function(e){return 0<e.length}).concat(["noopener"]).sort().join(" ")))}),g.allow_html_in_named_anchor||e.addAttributeFilter("id,name",function(e){for(var t,n,r,o,i=e.length;i--;)if("a"===(o=e[i]).name&&o.firstChild&&!o.attr("href"))for(r=o.parent,t=o.lastChild;n=t.prev,r.insert(t,o),t=n;);}),g.fix_list_elements&&e.addNodeFilter("ul,ol",function(e){for(var t,n,r=e.length;r--;)if("ul"===(n=(t=e[r]).parent).name||"ol"===n.name)if(t.prev&&"li"===t.prev.name)t.prev.append(t);else{var o=new ul("li",1);o.attr("style","list-style-type: none"),t.wrap(o)}}),g.validate&&p.getValidClasses()&&e.addAttributeFilter("class",function(e){for(var t,n,r,o,i,a,u,s=e.length,c=p.getValidClasses();s--;){for(n=(t=e[s]).attr("class").split(" "),i="",r=0;r<n.length;r++)o=n[r],u=!1,(a=c["*"])&&a[o]&&(u=!0),a=c[t.name],!u&&a&&a[o]&&(u=!0),u&&(i&&(i+=" "),i+=o);i.length||(i=null),t.attr("class",i)}})}(e,T),Vp(e,T),e}function Sp(e,t,n){-1===Mn.inArray(t,n)&&(e.addAttributeFilter(n,function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),t.push(n))}function kp(e,t,n,r,o){return function(e,t,n){return t.no_events||!e?n:ld(e,bd(t,{content:n})).content}(e,o,function(e,t,n){return pl(e,t).serialize(n)}(t,n,r))}function Tp(a,u){var s,c,l,e=["data-mce-selected"];return s=u&&u.dom?u.dom:Xi.DOM,c=u&&u.schema?u.schema:pr(a),a.entity_encoding=a.entity_encoding||"named",a.remove_trailing_brs=!("remove_trailing_brs"in a)||a.remove_trailing_brs,l=Np(a,c),Hp(l,a,s),{schema:c,addNodeFilter:l.addNodeFilter,addAttributeFilter:l.addAttributeFilter,serialize:function(e,t){var n=bd({format:"html"},t||{}),r=Lp(u,e,n),o=function(e,t,n){var r=lu(n.getInner?t.innerHTML:e.getOuterHTML(t));return n.selection||Wn(yt.fromDom(t))?r:Mn.trim(r)}(s,r,n),i=function(e,t,n){var r=n.selection?bd({forced_root_block:!1},n):n,o=e.parse(t,r);return Pp(o),o}(l,o,n);return"tree"===n.format?i:kp(u,a,c,i,n)},addRules:function(e){c.addValidElements(e)},setRules:function(e){c.setValidElements(e)},addTempAttr:d(Sp,l,e),getTempAttrs:function(){return e}}}function Ap(e,t){var n=Tp(e,t);return{schema:n.schema,addNodeFilter:n.addNodeFilter,addAttributeFilter:n.addAttributeFilter,serialize:n.serialize,addRules:n.addRules,setRules:n.setRules,addTempAttr:n.addTempAttr,getTempAttrs:n.getTempAttrs}}var Mp=Mn.each,Rp=Xi.DOM,Dp=function(e){return e&&"string"==typeof e?(e=(e=e.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),Mn.map(e.split(/(?:>|\s+(?![^\[\]]+\]))/),function(e){var t=Mn.map(e.split(/(?:~\+|~|\+)/),bp),n=t.pop();return t.length&&(n.siblings=t),n}).reverse()):[]},_p=function(n,e){var t,r,o,i,a,u,s="";if(!1===(u=n.settings.preview_styles))return"";"string"!=typeof u&&(u="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow");function c(e){return e.replace(/%(\w+)/g,"")}if("string"==typeof e){if(!(e=n.formatter.get(e)))return;e=e[0]}return"preview"in e&&!1===(u=e.preview)?"":(t=e.block||e.inline||"span",r=(i=Dp(e.selector)).length?(i[0].name||(i[0].name=t),t=e.selector,yp(i,n)):yp([t],n),o=Rp.select(t,r)[0]||r.firstChild,Mp(e.styles,function(e,t){(e=c(e))&&Rp.setStyle(o,t,e)}),Mp(e.attributes,function(e,t){(e=c(e))&&Rp.setAttrib(o,t,e)}),Mp(e.classes,function(e){e=c(e),Rp.hasClass(o,e)||Rp.addClass(o,e)}),n.fire("PreviewFormats"),Rp.setStyles(r,{position:"absolute",left:-65535}),n.getBody().appendChild(r),a=Rp.getStyle(n.getBody(),"fontSize",!0),a=/px$/.test(a)?parseInt(a,10):0,Mp(u.split(" "),function(e){var t=Rp.getStyle(o,e,!0);if(!("background-color"===e&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(t)&&(t=Rp.getStyle(n.getBody(),e,!0),"#ffffff"===Rp.toHex(t).toLowerCase())||"color"===e&&"#000000"===Rp.toHex(t).toLowerCase())){if("font-size"===e&&/em|%$/.test(t)){if(0===a)return;t=parseFloat(t)/(/%$/.test(t)?100:1)*a+"px"}"border"===e&&t&&(s+="padding:0 2px;"),s+=e+":"+t+";"}}),n.fire("AfterPreviewFormats"),Rp.remove(r),s)},Bp=function(e,t,n,r,o){var i=t.get(n);!zg.match(e,n,r,o)||"toggle"in i[0]&&!i[0].toggle?mp.applyFormat(e,n,r,o):tp(e,n,r,o)},Op=function(e){e.addShortcut("meta+b","","Bold"),e.addShortcut("meta+i","","Italic"),e.addShortcut("meta+u","","Underline");for(var t=1;t<=6;t++)e.addShortcut("access+"+t,"",["FormatBlock",!1,"h"+t]);e.addShortcut("access+7","",["FormatBlock",!1,"p"]),e.addShortcut("access+8","",["FormatBlock",!1,"div"]),e.addShortcut("access+9","",["FormatBlock",!1,"address"])},Hp=function(t,s,c){t.addAttributeFilter("data-mce-tabindex",function(e,t){for(var n,r=e.length;r--;)(n=e[r]).attr("tabindex",n.attr("data-mce-tabindex")),n.attr(t,null)}),t.addAttributeFilter("src,href,style",function(e,t){for(var n,r,o=e.length,i="data-mce-"+t,a=s.url_converter,u=s.url_converter_scope;o--;)(r=(n=e[o]).attr(i))!==undefined?(n.attr(t,0<r.length?r:null),n.attr(i,null)):(r=n.attr(t),"style"===t?r=c.serializeStyle(c.parseStyle(r),n.name):a&&(r=a.call(u,r,t,n.name)),n.attr(t,0<r.length?r:null))}),t.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",0<n.length?n:null))}),t.addAttributeFilter("data-mce-type",function(e,t,n){for(var r,o=e.length;o--;){if("bookmark"===(r=e[o]).attr("data-mce-type")&&!n.cleanup)k.from(r.firstChild).exists(function(e){return!su(e.value)})?r.unwrap():r.remove()}}),t.addNodeFilter("noscript",function(e){for(var t,n=e.length;n--;)(t=e[n].firstChild)&&(t.value=ir.decode(t.value))}),t.addNodeFilter("script,style",function(e,t){for(var n,r,o,i=e.length,a=function(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,"")};i--;)r=(n=e[i]).firstChild?n.firstChild.value:"","script"===t?((o=n.attr("type"))&&n.attr("type","mce-no/type"===o?null:o.replace(/^mce\-/,"")),"xhtml"===s.element_format&&0<r.length&&(n.firstChild.value="// <![CDATA[\n"+a(r)+"\n// ]]>")):"xhtml"===s.element_format&&0<r.length&&(n.firstChild.value="\x3c!--\n"+a(r)+"\n--\x3e")}),t.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))}),t.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||n.attr("type")||n.attr("type","text"))}),t.addAttributeFilter("data-mce-type",function(e){z(e,function(e){"format-caret"===e.attr("data-mce-type")&&(e.isEmpty(t.schema.getNonEmptyElements())?e.remove():e.unwrap())})}),t.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)})},Pp=function(e){function t(e){return e&&"br"===e.name}var n,r;t(n=e.lastChild)&&t(r=n.prev)&&(n.remove(),r.remove())},Lp=function(e,t,n){return function(e,t){return e&&e.hasEventListeners("PreProcess")&&!t.no_events}(e,n)?function(e,t,n){var r,o,i,a=e.dom;return t=t.cloneNode(!0),(r=j.document.implementation).createHTMLDocument&&(o=r.createHTMLDocument(""),Mn.each("BODY"===t.nodeName?t.childNodes:[t],function(e){o.body.appendChild(o.importNode(e,!0))}),t="BODY"!==t.nodeName?o.body.firstChild:o.body,i=a.doc,a.doc=o),cd(e,bd(n,{node:t})),i&&(a.doc=i),t}(e,t,n):t},Vp=function(e,t){t.inline_styles&&xp(e,t)},Ip=function(e,t){return e&&e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.name===t},Fp=Mn.makeMap,Up=Mn.each,jp=Mn.explode,qp=Mn.extend;function $p(e){return{getBookmark:d(Vc,e),moveToBookmark:d(Ic,e)}}($p=$p||{}).isBookmarkNode=Fc;function Wp(r,a){var u,s,c,l,f,d,h,m,g,p,v,y,i,b,C,w,x,z=a.dom,E=Mn.each,N=a.getDoc(),S=j.document,k=Math.abs,T=Math.round,A=a.getBody();function M(e){return e&&("IMG"===e.nodeName||a.dom.is(e,"figure.image"))}function e(e){var t=e.target;!function(e,t){if("longpress"!==e.type&&0!==e.type.indexOf("touch"))return M(e.target)&&!Jm(e.clientX,e.clientY,t);var n=e.touches[0];return M(e.target)&&!Jm(n.clientX,n.clientY,t)}(e,a.selection.getRng())||e.isDefaultPrevented()||a.selection.select(t)}function R(e){return a.dom.is(e,"figure.image")?e.querySelector("img"):e}function D(e){var t=a.settings.object_resizing;return!1!==t&&!Nn.iOS&&("string"!=typeof t&&(t="table,img,figure.image,div"),"false"!==e.getAttribute("data-mce-resize")&&(e!==a.getBody()&&we(yt.fromDom(e),t)))}function _(e){var t,n,r,o;t=e.screenX-d,n=e.screenY-h,b=t*f[2]+p,C=n*f[3]+v,b=b<5?5:b,C=C<5?5:C,(M(u)&&!1!==a.settings.resize_img_proportional?!Ah.modifierPressed(e):Ah.modifierPressed(e)||M(u)&&f[2]*f[3]!=0)&&(k(t)>k(n)?(C=T(b*y),b=T(C/y)):(b=T(C/y),C=T(b*y))),z.setStyles(R(s),{width:b,height:C}),r=0<(r=f.startPos.x+t)?r:0,o=0<(o=f.startPos.y+n)?o:0,z.setStyles(c,{left:r,top:o,display:"block"}),c.innerHTML=b+" &times; "+C,f[2]<0&&s.clientWidth<=b&&z.setStyle(s,"left",m+(p-b)),f[3]<0&&s.clientHeight<=C&&z.setStyle(s,"top",g+(v-C)),(t=A.scrollWidth-w)+(n=A.scrollHeight-x)!==0&&z.setStyles(c,{left:r-t,top:o-n}),i||(md(a,u,p,v),i=!0)}function n(e){function t(e,t){if(e)do{if(e===t)return!0}while(e=e.parentNode)}var n;i||a.removed||(E(z.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),n="mousedown"===e.type?e.target:r.getNode(),t(n=z.$(n).closest("table,img,figure.image,hr")[0],A)&&(L(),t(r.getStart(!0),n)&&t(r.getEnd(!0),n))?O(n):H())}function o(e){return Xp(function(e,t){for(;t&&t!==e;){if(Yp(t)||Xp(t))return t;t=t.parentNode}return null}(a.getBody(),e))}l={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};var B=function(){i=!1;function e(e,t){t&&(u.style[e]||!a.schema.isValid(u.nodeName.toLowerCase(),e)?z.setStyle(R(u),e,t):z.setAttrib(R(u),e,t))}e("width",b),e("height",C),z.unbind(N,"mousemove",_),z.unbind(N,"mouseup",B),S!==N&&(z.unbind(S,"mousemove",_),z.unbind(S,"mouseup",B)),z.remove(s),z.remove(c),O(u),gd(a,u,b,C),z.setAttrib(u,"style",z.getAttrib(u,"style")),a.nodeChanged()},O=function(e){var t,r,o,n,i;H(),P(),t=z.getPos(e,A),m=t.x,g=t.y,i=e.getBoundingClientRect(),r=i.width||i.right-i.left,o=i.height||i.bottom-i.top,u!==e&&(u=e,b=C=0),n=a.fire("ObjectSelected",{target:e}),D(e)&&!n.isDefaultPrevented()?E(l,function(t,e){var n;(n=z.get("mceResizeHandle"+e))&&z.remove(n),n=z.add(A,"div",{id:"mceResizeHandle"+e,"data-mce-bogus":"all","class":"mce-resizehandle",unselectable:!0,style:"cursor:"+e+"-resize; margin:0; padding:0"}),11===Nn.ie&&(n.contentEditable=!1),z.bind(n,"mousedown",function(e){e.stopImmediatePropagation(),e.preventDefault(),function(e){d=e.screenX,h=e.screenY,p=R(u).clientWidth,v=R(u).clientHeight,y=v/p,(f=t).startPos={x:r*t[0]+m,y:o*t[1]+g},w=A.scrollWidth,x=A.scrollHeight,s=u.cloneNode(!0),z.addClass(s,"mce-clonedresizable"),z.setAttrib(s,"data-mce-bogus","all"),s.contentEditable=!1,s.unSelectabe=!0,z.setStyles(s,{left:m,top:g,margin:0}),s.removeAttribute("data-mce-selected"),A.appendChild(s),z.bind(N,"mousemove",_),z.bind(N,"mouseup",B),S!==N&&(z.bind(S,"mousemove",_),z.bind(S,"mouseup",B)),c=z.add(A,"div",{"class":"mce-resize-helper","data-mce-bogus":"all"},p+" &times; "+v)}(e)}),t.elm=n,z.setStyles(n,{left:r*t[0]+m-n.offsetWidth/2,top:o*t[1]+g-n.offsetHeight/2})}):H(),u.setAttribute("data-mce-selected","1")},H=function(){var e,t;for(e in P(),u&&u.removeAttribute("data-mce-selected"),l)(t=z.get("mceResizeHandle"+e))&&(z.unbind(t),z.remove(t))},P=function(){for(var e in l){var t=l[e];t.elm&&(z.unbind(t.elm),delete t.elm)}},L=function(){try{a.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}};return a.on("init",function(){L(),(Nn.browser.isIE()||Nn.browser.isEdge())&&(a.on("mousedown click",function(e){var t=e.target,n=t.nodeName;i||!/^(TABLE|IMG|HR)$/.test(n)||o(t)||(2!==e.button&&a.selection.select(t,"TABLE"===n),"mousedown"===e.type&&a.nodeChanged())}),a.dom.bind(A,"mscontrolselect",function(e){function t(e){pn.setEditorTimeout(a,function(){a.selection.select(e)})}if(o(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 t=pn.throttle(function(e){a.composing||n(e)});a.on("nodechange ResizeEditor ResizeWindow drop FullscreenStateChanged",t),a.on("keyup compositionend",function(e){u&&"TABLE"===u.nodeName&&t(e)}),a.on("hide blur",H),a.on("contextmenu longpress",e,!0)}),a.on("remove",P),{isResizable:D,showResizeRect:O,hideResizeRect:H,updateResizeRect:n,destroy:function(){u=s=null}}}var Kp=$p,Xp=Ge.isContentEditableFalse,Yp=Ge.isContentEditableTrue;function Gp(e){var t=yt.fromDom(j.document),n=ki(t),r=function(e,t){var n=t.owner(e);return Vv(t,n)}(e,Iv),o=Hi(e),i=m(r,function(e,t){var n=Hi(t);return{left:e.left+n.left(),top:e.top+n.top()}},{left:0,top:0});return Oi(i.left+o.left()+n.left(),i.top+o.top()+n.top())}function Jp(e){return"textarea"===ie(e)}function Qp(e,t){var n=function(e){var t=e.dom().ownerDocument,n=t.body,r=t.defaultView,o=t.documentElement;if(n===e.dom())return Oi(n.offsetLeft,n.offsetTop);var i=Si(r.pageYOffset,o.scrollTop),a=Si(r.pageXOffset,o.scrollLeft),u=Si(o.clientTop,n.clientTop),s=Si(o.clientLeft,n.clientLeft);return Hi(e).translate(a-s,i-u)}(e),r=function(e){return Lv.get(e)}(e);return{element:e,bottom:n.top()+r,pos:n,cleanup:t}}function Zp(e,t){var n=function(e,t){var n=Re(e);if(0===n.length||Jp(e))return{element:e,offset:t};if(t<n.length&&!Jp(n[t]))return{element:n[t],offset:0};var r=n[n.length-1];return Jp(r)?{element:e,offset:t}:"img"===ie(r)?{element:r,offset:1}:zt(r)?{element:r,offset:Jc(r).length}:{element:r,offset:Re(r).length}}(e,t),r=yt.fromHtml('<span data-mce-bogus="all">'+cu+"</span>");return Ci(n.element,r),Qp(r,function(){return _i(r)})}function ev(e){return Qp(yt.fromDom(e),i)}function tv(n,r,o,i){Uv(n,function(e,t){return Fv(n,r,o,i)},o)}function nv(e,t,n,r){var o=yt.fromDom(e.getDoc());n(o,ki(o).top(),t,r)}function rv(e,t,n,r){var o=e.pos;if(n)Ti(o.left(),o.top(),r);else{var i=o.top()-t+(e.bottom-o.top());Ti(o.left(),i,r)}}function ov(e,t,n,r,o){r.pos.top()<t?rv(r,n,!1!==o,e):r.bottom>n+t&&rv(r,n,!0===o,e)}function iv(e,t,n,r){var o=e.dom().defaultView.innerHeight;ov(e,t,o,n,r)}function av(e,t,n,r,o){var i=t.dom().defaultView.innerHeight;ov(t,n,i,r,o);var a=Gp(r.element),u=Li(j.window);a.top()<u.y()?Ai(r.element,!1!==o):a.top()>u.bottom()&&Ai(r.element,!0===o)}function uv(e,t,n){return tv(e,d(iv),t,n)}function sv(e,t,n){return nv(e,ev(t),d(iv),n)}function cv(e,t,n){return tv(e,d(av,e),t,n)}function lv(e,t,n){return nv(e,ev(t),d(av,e),n)}function fv(e){return Ge.isContentEditableTrue(e)||Ge.isContentEditableFalse(e)}function dv(e,t){var n=(t||j.document).createDocumentFragment();return z(e,function(e){n.appendChild(e.dom())}),yt.fromDom(n)}function hv(e,t){var n=parseInt(ge(e,t),10);return isNaN(n)?1:n}function mv(e){return b(e,function(e,t){return t.cells().length>e?t.cells().length:e},0)}function gv(e,t){for(var n=e.rows(),r=0;r<n.length;r++)for(var o=n[r].cells(),i=0;i<o.length;i++)if(ze(o[i],t))return k.some(Yv(i,r));return k.none()}function pv(e,t,n,r,o){for(var i=[],a=e.rows(),u=n;u<=o;u++){var s=a[u].cells(),c=t<r?s.slice(t,r+1):s.slice(r,t+1);i.push(Xv(a[u].element(),c))}return i}function vv(e){var t=[];if(e)for(var n=0;n<e.rangeCount;n++)t.push(e.getRangeAt(n));return t}function yv(e){return y(ey(e),$n)}function bv(e){return ma(e,"td[data-mce-selected],th[data-mce-selected]")}function Cv(e,t){var n=bv(t),r=yv(e);return 0<n.length?n:r}function wv(t,n){return g(t,function(e){return"li"===ie(e)&&uh(e,n)}).fold($([]),function(e){return function(e){return g(e,function(e){return"ul"===ie(e)||"ol"===ie(e)})}(t).map(function(e){return[yt.fromTag("li"),yt.fromTag(ie(e))]}).getOr([])})}function xv(e,t){var n=yt.fromDom(t.commonAncestorContainer),r=fh(n,e),o=y(r,function(e){return Dn(e)||Ln(e)}),i=wv(r,t),a=o.concat(i.length?i:function(t){return Un(t)?Se(t).filter(Fn).fold($([]),function(e){return[t,e]}):Fn(t)?[t]:[]}(n));return X(a,ka)}function zv(){return dv([])}function Ev(e,t){return function(e,t){var n=b(t,function(e,t){return Di(t,e),t},e);return 0<t.length?dv([n]):n}(yt.fromDom(t.cloneContents()),xv(e,t))}function Nv(e,o){return function(e,t){return Ca(t,"table",d(ze,e))}(e,o[0]).bind(function(e){var t=o[0],n=o[o.length-1],r=Gv(e);return Qv(r,t,n).map(function(e){return dv([Jv(e)])})}).getOrThunk(zv)}function Sv(e,t,n){return null!==function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}(e,t,n)}function kv(e,t,n){return Sv(e,t,function(e){return e.nodeName===n})}function Tv(e){return e&&"TABLE"===e.nodeName}function Av(e,t,n){for(var r=new yi(t,e.getParent(t.parentNode,e.isBlock)||e.getRoot());t=r[n?"prev":"next"]();)if(Ge.isBr(t))return!0}function Mv(e,t,n,r,o){var i,a,u=e.getRoot(),s=e.schema.getNonEmptyElements(),c=e.getParent(o.parentNode,e.isBlock)||u;if(r&&Ge.isBr(o)&&t&&e.isEmpty(c))return k.some(Uu(o.parentNode,e.nodeIndex(o)));for(var l,f,d=new yi(o,c);a=d[r?"prev":"next"]();){if("false"===e.getContentEditableParent(a)||(f=u,Da(l=a)&&!1===Sv(l,f,rs)))return k.none();if(Ge.isText(a)&&0<a.nodeValue.length)return!1===kv(a,u,"A")?k.some(Uu(a,r?a.nodeValue.length:0)):k.none();if(e.isBlock(a)||s[a.nodeName.toLowerCase()])return k.none();i=a}return n&&i?k.some(Uu(i,0)):k.none()}function Rv(e,t,n,r){var o,i,a,u,s,c,l,f=e.getRoot(),d=!1;if(o=r[(n?"start":"end")+"Container"],i=r[(n?"start":"end")+"Offset"],c=Ge.isElement(o)&&i===o.childNodes.length,u=e.schema.getNonEmptyElements(),s=n,Da(o))return k.none();if(Ge.isElement(o)&&i>o.childNodes.length-1&&(s=!1),Ge.isDocument(o)&&(o=f,i=0),o===f){if(s&&(a=o.childNodes[0<i?i-1:0])){if(Da(a))return k.none();if(u[a.nodeName]||Tv(a))return k.none()}if(o.hasChildNodes()){if(i=Math.min(!s&&0<i?i-1:i,o.childNodes.length-1),o=o.childNodes[i],i=Ge.isText(o)&&c?o.data.length:0,!t&&o===f.lastChild&&Tv(o))return k.none();if(function(e,t){for(;t&&t!==e;){if(Ge.isContentEditableFalse(t))return!0;t=t.parentNode}return!1}(f,o)||Da(o))return k.none();if(o.hasChildNodes()&&!1===Tv(o)){var h=new yi(a=o,f);do{if(Ge.isContentEditableFalse(a)||Da(a)){d=!1;break}if(Ge.isText(a)&&0<a.nodeValue.length){i=s?0:a.nodeValue.length,o=a,d=!0;break}if(u[a.nodeName.toLowerCase()]&&(!(l=a)||!/^(TD|TH|CAPTION)$/.test(l.nodeName))){i=e.nodeIndex(a),o=a.parentNode,s||i++,d=!0;break}}while(a=s?h.next():h.prev())}}}return t&&(Ge.isText(o)&&0===i&&Mv(e,c,t,!0,o).each(function(e){o=e.container(),i=e.offset(),d=!0}),Ge.isElement(o)&&(!(a=(a=o.childNodes[i])||o.childNodes[i-1])||!Ge.isBr(a)||function(e,t){return e.previousSibling&&e.previousSibling.nodeName===t}(a,"A")||Av(e,a,!1)||Av(e,a,!0)||Mv(e,c,t,!0,a).each(function(e){o=e.container(),i=e.offset(),d=!0}))),s&&!t&&Ge.isText(o)&&i===o.nodeValue.length&&Mv(e,c,t,!1,o).each(function(e){o=e.container(),i=e.offset(),d=!0}),d?k.some(Uu(o,i)):k.none()}function Dv(e){return 0===e.dom().length?(_i(e),k.none()):k.some(e)}function _v(e,t,n,r,o){var i=n?t.startContainer:t.endContainer,a=n?t.startOffset:t.endOffset;return k.from(i).map(yt.fromDom).map(function(e){return r&&t.collapsed?e:De(e,o(e,a)).getOr(e)}).bind(function(e){return xt(e)?k.some(e):Se(e)}).map(function(e){return e.dom()}).getOr(e)}function Bv(e,t,n){return _v(e,t,!0,n,function(e,t){return Math.min(function(e){return e.dom().childNodes.length}(e),t)})}function Ov(e,t,n){return _v(e,t,!1,n,function(e,t){return 0<t?t-1:t})}function Hv(e,t){for(var n=e;e&&Ge.isText(e)&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n}function Pv(e,t,n){if(e&&e.hasOwnProperty(t)){var r=y(e[t],function(e){return e!==n});0===r.length?delete e[t]:e[t]=r}}var Lv=function CN(r,o){function e(e){var t=o(e);if(t<=0||null===t){var n=ve(e,r);return parseFloat(n)||0}return t}function i(o,e){return b(e,function(e,t){var n=ve(o,t),r=n===undefined?0:parseInt(n,10);return isNaN(r)?e:e+r},0)}return{set:function(e,t){if(!_(t)&&!t.match(/^[0-9]+$/))throw new Error(r+".set accepts only positive integer values. Value was "+t);var n=e.dom();fe(n)&&(n.style[r]=t+"px")},get:e,getOuter:e,aggregate:i,max:function(e,t,n){var r=i(e,n);return r<t?t-r:0}}}("height",function(e){var t=e.dom();return de(e)?t.getBoundingClientRect().height:t.offsetHeight}),Vv=function(r,e){return r.view(e).fold($([]),function(e){var t=r.owner(e),n=Vv(r,t);return[e].concat(n)})},Iv=/* */Object.freeze({view:function(e){return(e.dom()===j.document?k.none():k.from(e.dom().defaultView.frameElement)).map(yt.fromDom)},owner:function(e){return Ee(e)}}),Fv=function(e,t,n,r){var o=yt.fromDom(e.getBody()),i=yt.fromDom(e.getDoc());!function(e){e.dom().offsetWidth}(o);var a=ki(i).top(),u=Zp(yt.fromDom(n.startContainer),n.startOffset);t(i,a,u,r),u.cleanup()},Uv=function(e,t,n){var r=n.startContainer,o=n.startOffset,i=n.endContainer,a=n.endOffset;t(yt.fromDom(r),yt.fromDom(i));var u=e.dom.createRng();u.setStart(r,o),u.setEnd(i,a),e.selection.setRng(n)},jv=function(e,t,n){!function(e,t,n){return e.fire("ScrollIntoView",{elm:t,alignToTop:n}).isDefaultPrevented()}(e,t,n)&&(e.inline?sv:lv)(e,t,n)},qv=function(e,t,n){(e.inline?uv:cv)(e,t,n)},$v=function(e,t,n){var r,o,i=n;if(i.caretPositionFromPoint)(o=i.caretPositionFromPoint(e,t))&&((r=n.createRange()).setStart(o.offsetNode,o.offset),r.collapse(!0));else if(n.caretRangeFromPoint)r=n.caretRangeFromPoint(e,t);else if(i.body.createTextRange){r=i.body.createTextRange();try{r.moveToPoint(e,t),r.collapse(!0)}catch(a){r=function(e,n,t){var r,o,i;if(r=t.elementFromPoint(e,n),o=t.body.createTextRange(),r&&"HTML"!==r.tagName||(r=t.body),o.moveToElementText(r),0<(i=(i=Mn.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){n=(i[0].bottom+i[0].top)/2;try{return o.moveToPoint(e,n),o.collapse(!0),o}catch(a){}}return null}(e,t,n)}return function(e,t){var n=e&&e.parentElement?e.parentElement():null;return Ge.isContentEditableFalse(function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}(n,t,fv))?null:e}(r,n.body)}return r},Wv=function(n,e){return X(e,function(e){var t=n.fire("GetSelectionRange",{range:e});return t.range!==e?t.range:e})},Kv=be("element","width","rows"),Xv=be("element","cells"),Yv=be("x","y"),Gv=function(e){var o=Kv(ka(e),0,[]);return z(ma(e,"tr"),function(n,r){z(ma(n,"td,th"),function(e,t){!function(e,t,n,r,o){for(var i=hv(o,"rowspan"),a=hv(o,"colspan"),u=e.rows(),s=n;s<n+i;s++){u[s]||(u[s]=Xv(Ta(r),[]));for(var c=t;c<t+a;c++){u[s].cells()[c]=s===n&&c===t?o:ka(o)}}}(o,function(e,t,n){for(;r=t,o=n,i=void 0,((i=e.rows())[o]?i[o].cells():[])[r];)t++;var r,o,i;return t}(o,t,r),r,n,e)})}),Kv(o.element(),mv(o.rows()),o.rows())},Jv=function(e){return function(e,t){var n=ka(e.element()),r=yt.fromTag("tbody");return zi(r,t),Di(n,r),n}(e,function(e){return X(e.rows(),function(e){var t=X(e.cells(),function(e){var t=Ta(e);return pe(t,"colspan"),pe(t,"rowspan"),t}),n=ka(e.element());return zi(n,t),n})}(e))},Qv=function(n,e,r){return gv(n,e).bind(function(t){return gv(n,r).map(function(e){return function(e,t,n){var r=t.x(),o=t.y(),i=n.x(),a=n.y(),u=o<a?pv(e,r,o,i,a):pv(e,r,a,i,o);return Kv(e.element(),mv(u),u)}(n,t,e)})})},Zv=vv,ey=function(e){return v(e,function(e){var t=Wa(e);return t?[yt.fromDom(t)]:[]})},ty=function(e){return 1<vv(e).length},ny=Cv,ry=function(e){return Cv(Zv(e.selection.getSel()),yt.fromDom(e.getBody()))},oy=function(e,t){var n=ny(t,e);return 0<n.length?Nv(e,n):function(e,t){return 0<t.length&&t[0].collapsed?zv():Ev(e,t[0])}(e,t)},iy=function(e,t){if(void 0===t&&(t={}),t.get=!0,t.format=t.format||"html",t.selection=!0,(t=e.fire("BeforeGetContent",t)).isDefaultPrevented())return e.fire("GetContent",t),t.content;if("text"===t.format)return function(r){return k.from(r.selection.getRng()).map(function(e){var t=r.dom.add(r.getBody(),"div",{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},e.cloneContents()),n=lu(t.innerText);return r.dom.remove(t),n}).getOr("")}(e);t.getInner=!0;var n=function(e,t){var n,r=e.selection.getRng(),o=e.dom.create("body"),i=e.selection.getSel(),a=Wv(e,Zv(i));return(n=t.contextual?oy(yt.fromDom(e.getBody()),a).dom():r.cloneContents())&&o.appendChild(n),e.selection.serializer.serialize(o,t)}(e,t);return"tree"===t.format?n:(t.content=e.selection.isCollapsed()?"":n,e.fire("GetContent",t),t.content)},ay=function(e,t){var n=t.collapsed,r=t.cloneRange(),o=Uu.fromRangeStart(t);return Rv(e,n,!0,r).each(function(e){n&&Uu.isAbove(o,e)||r.setStart(e.container(),e.offset())}),n||Rv(e,n,!1,r).each(function(e){r.setEnd(e.container(),e.offset())}),n&&r.collapse(!0),hh(t,r)?k.none():k.some(r)},uy=function(e,t,n){if((n=function(e,t){return(e=e||{format:"html"}).set=!0,e.selection=!0,e.content=t,e}(n,t)).no_events||!(n=e.fire("BeforeSetContent",n)).isDefaultPrevented()){var r=e.selection.getRng();!function(r,e){var t=k.from(e.firstChild).map(yt.fromDom),n=k.from(e.lastChild).map(yt.fromDom);r.deleteContents(),r.insertNode(e);var o=t.bind(ke).filter(zt).bind(Dv),i=n.bind(Te).filter(zt).bind(Dv);Ya(o,t.filter(zt),function(e,t){!function(e,t){e.insertData(0,t)}(t.dom(),e.dom().data),_i(e)}),Ya(i,n.filter(zt),function(e,t){var n=t.dom().length;t.dom().appendData(e.dom().data),r.setEnd(t.dom(),n),_i(e)}),r.collapse(!1)}(r,r.createContextualFragment(n.content)),e.selection.setRng(r),qv(e,r),n.no_events||e.fire("SetContent",n)}else e.fire("SetContent",n)};function sy(e){return!!e.select}function cy(e){return!(!e||!e.ownerDocument)&&Bt(yt.fromDom(e.ownerDocument),yt.fromDom(e))}function ly(u,s,e,c){function t(e,t){return uy(c,e,t)}function r(){var e,t,n=d();return!(n&&n.anchorNode&&n.focusNode)||((e=u.createRng()).setStart(n.anchorNode,n.anchorOffset),e.collapse(!0),(t=u.createRng()).setStart(n.focusNode,n.focusOffset),t.collapse(!0),e.compareBoundaryPoints(e.START_TO_START,t)<=0)}var n,o,l,f,i=function p(i,n){var a,u;return{selectorChangedWithUnbind:function(e,t){return a||(a={},u={},n.on("NodeChange",function(e){var n=e.element,r=i.getParents(n,null,i.getRoot()),o={};Mn.each(a,function(e,n){Mn.each(r,function(t){if(i.is(t,n))return u[n]||(Mn.each(e,function(e){e(!0,{node:t,selector:n,parents:r})}),u[n]=e),o[n]=e,!1})}),Mn.each(u,function(e,t){o[t]||(delete u[t],Mn.each(e,function(e){e(!1,{node:n,selector:t,parents:r})}))})})),a[e]||(a[e]=[]),a[e].push(t),{unbind:function(){Pv(a,e,t),Pv(u,e,t)}}}}}(u,c).selectorChangedWithUnbind,a=function(e){var t=h();t.collapse(!!e),m(t)},d=function(){return s.getSelection?s.getSelection():s.document.selection},h=function(){function e(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(r){return-1}}var t,n,r,o;if(!s)return null;if(null==(o=s.document))return null;if(c.bookmark!==undefined&&!1===ud(c)){var i=Qf(c);if(i.isSome())return i.map(function(e){return Wv(c,[e])[0]}).getOr(o.createRange())}try{(t=d())&&!Ge.isRestrictedNode(t.anchorNode)&&(n=0<t.rangeCount?t.getRangeAt(0):t.createRange?t.createRange():o.createRange())}catch(a){}return(n=(n=Wv(c,[n])[0])||(o.createRange?o.createRange():o.body.createTextRange())).setStart&&9===n.startContainer.nodeType&&n.collapsed&&(r=u.getRoot(),n.setStart(r,0),n.setEnd(r,0)),l&&f&&(0===e(n.START_TO_START,n,l)&&0===e(n.END_TO_END,n,l)?n=f:f=l=null),n},m=function(e,t){var n,r;if(function(e){return!!e&&(!!sy(e)||cy(e.startContainer)&&cy(e.endContainer))}(e)){var o=sy(e)?e:null;if(o){f=null;try{o.select()}catch(i){}}else{if(n=d(),e=c.fire("SetSelectionRange",{range:e,forward:t}).range,n){f=e;try{n.removeAllRanges(),n.addRange(e)}catch(i){}!1===t&&n.extend&&(n.collapse(e.endContainer,e.endOffset),n.extend(e.startContainer,e.startOffset)),l=0<n.rangeCount?n.getRangeAt(0):null}e.collapsed||e.startContainer!==e.endContainer||!n.setBaseAndExtent||Nn.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.focusNode===e.endContainer||n.setBaseAndExtent(r,0,r,1)),c.fire("AfterSetSelectionRange",{range:e,forward:t})}}},g={bookmarkManager:null,controlSelection:null,dom:u,win:s,serializer:e,editor:c,collapse:a,setCursorLocation:function(e,t){var n=u.createRng();e?(n.setStart(e,t),n.setEnd(e,t),m(n),a(!1)):(sh(u,n,c.getBody(),!0),m(n))},getContent:function(e){return iy(c,e)},setContent:t,getBookmark:function(e,t){return n.getBookmark(e,t)},moveToBookmark:function(e){return n.moveToBookmark(e)},select:function(e,t){return function(r,e,o){return k.from(e).map(function(e){var t=r.nodeIndex(e),n=r.createRng();return n.setStart(e.parentNode,t),n.setEnd(e.parentNode,t+1),o&&(sh(r,n,e,!0),sh(r,n,e,!1)),n})}(u,e,t).each(m),e},isCollapsed:function(){var e=h(),t=d();return!(!e||e.item)&&(e.compareEndPoints?0===e.compareEndPoints("StartToEnd",e):!t||e.collapsed)},isForward:r,setNode:function(e){return t(u.getOuterHTML(e)),e},getNode:function(){return function(e,t){var n,r,o,i,a;return t?(r=t.startContainer,o=t.endContainer,i=t.startOffset,a=t.endOffset,n=t.commonAncestorContainer,!t.collapsed&&(r===o&&a-i<2&&r.hasChildNodes()&&(n=r.childNodes[i]),3===r.nodeType&&3===o.nodeType&&(r=r.length===i?Hv(r.nextSibling,!0):r.parentNode,o=0===a?Hv(o.previousSibling,!1):o.parentNode,r&&r===o))?r:n&&3===n.nodeType?n.parentNode:n):e}(c.getBody(),h())},getSel:d,setRng:m,getRng:h,getStart:function(e){return Bv(c.getBody(),h(),e)},getEnd:function(e){return Ov(c.getBody(),h(),e)},getSelectedBlocks:function(e,t){return function(e,t,n,r){var o,i,a=[];if(i=e.getRoot(),n=e.getParent(n||Bv(i,t,t.collapsed),e.isBlock),r=e.getParent(r||Ov(i,t,t.collapsed),e.isBlock),n&&n!==i&&a.push(n),n&&r&&n!==r)for(var u=new yi(o=n,i);(o=u.next())&&o!==r;)e.isBlock(o)&&a.push(o);return r&&n!==r&&r!==i&&a.push(r),a}(u,h(),e,t)},normalize:function(){var e=h(),t=d();if(ty(t)||!ch(c))return e;var n=ay(u,e);return n.each(function(e){m(e,r())}),n.getOr(e)},selectorChanged:function(e,t){return i(e,t),g},selectorChangedWithUnbind:i,getScrollContainer:function(){for(var e,t=u.getRoot();t&&"BODY"!==t.nodeName;){if(t.scrollHeight>t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e,t){return jv(c,e,t)},placeCaretAt:function(e,t){return m($v(e,t,c.getDoc()))},getBoundingClientRect:function(){var e=h();return e.collapsed?Ds.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:function(){s=l=f=null,o.destroy()}};return n=Kp(g),o=Wp(g,c),g.bookmarkManager=n,g.controlSelection=o,g}function fy(e){return Uy(e)&&e.data[0]===cu}function dy(e){return Uy(e)&&e.data[e.data.length-1]===cu}function hy(e){return e.ownerDocument.createTextNode(cu)}function my(e,t){return e?function(e){if(Uy(e.previousSibling))return dy(e.previousSibling)||e.previousSibling.appendData(cu),e.previousSibling;if(Uy(e))return fy(e)||e.insertData(0,cu),e;var t=hy(e);return e.parentNode.insertBefore(t,e),t}(t):function(e){if(Uy(e.nextSibling))return fy(e.nextSibling)||e.nextSibling.insertData(0,cu),e.nextSibling;if(Uy(e))return dy(e)||e.appendData(cu),e;var t=hy(e);return e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t),t}(t)}function gy(e,t){return Ge.isText(e.container())?my(t,e.container()):my(t,e.getNode())}function py(e,t){var n=t.get();return n&&e.container()===n&&Ra(n)}function vy(e,t){if(!t)return t;var n=t.container(),r=t.offset();return e?Ra(n)?Ge.isText(n.nextSibling)?Ds(n.nextSibling,0):Ds.after(n):Ba(t)?Ds(n,r+1):t:Ra(n)?Ge.isText(n.previousSibling)?Ds(n.previousSibling,n.previousSibling.data.length):Ds.before(n):Oa(t)?Ds(n,r-1):t}function yy(e,t){var n=bs(t,e);return n||e}function by(e,t,n){var r=Ky.normalizeForwards(n),o=yy(t,r.container());return Ky.findRootInline(e,o,r).fold(function(){return Pc.nextPosition(o,r).bind(d(Ky.findRootInline,e,o)).map(function(e){return Yy.before(e)})},k.none)}function Cy(e,t){return null===os(e,t)}function wy(e,t,n){return Ky.findRootInline(e,t,n).filter(d(Cy,t))}function xy(e,t,n){var r=Ky.normalizeBackwards(n);return wy(e,t,r).bind(function(e){return Pc.prevPosition(e,r).isNone()?k.some(Yy.start(e)):k.none()})}function zy(e,t,n){var r=Ky.normalizeForwards(n);return wy(e,t,r).bind(function(e){return Pc.nextPosition(e,r).isNone()?k.some(Yy.end(e)):k.none()})}function Ey(e,t,n){var r=Ky.normalizeBackwards(n),o=yy(t,r.container());return Ky.findRootInline(e,o,r).fold(function(){return Pc.prevPosition(o,r).bind(d(Ky.findRootInline,e,o)).map(function(e){return Yy.after(e)})},k.none)}function Ny(e){return!1===Ky.isRtl(Gy(e))}function Sy(e,t,n){return Xy([by,xy,zy,Ey],[e,t,n]).filter(Ny)}function ky(e){return e.fold($("before"),$("start"),$("end"),$("after"))}function Ty(e){return e.fold(Yy.before,Yy.before,Yy.after,Yy.after)}function Ay(n,e,r,t,o,i){return Ya(Ky.findRootInline(e,r,t),Ky.findRootInline(e,r,o),function(e,t){return e!==t&&Ky.hasSameParentBlock(r,e,t)?Yy.after(n?e:t):i}).getOr(i)}function My(e,t){return e.fold($(!0),function(e){return!function(e,t){return ky(e)===ky(t)&&Gy(e)===Gy(t)}(e,t)})}function Ry(e,t){return e?t.fold(q(k.some,Yy.start),k.none,q(k.some,Yy.after),k.none):t.fold(k.none,q(k.some,Yy.before),k.none,q(k.some,Yy.end))}function Dy(e,t,n,r){var o=Ky.normalizePosition(e,r),i=Sy(t,n,o);return Sy(t,n,o).bind(d(Ry,e)).orThunk(function(){return function(t,n,r,o,e){var i=Ky.normalizePosition(t,e);return Pc.fromPosition(t,r,i).map(d(Ky.normalizePosition,t)).fold(function(){return o.map(Ty)},function(e){return Sy(n,r,e).map(d(Ay,t,n,r,i,e)).filter(d(My,o))}).filter(Ny)}(e,t,n,i,r)})}function _y(e){return D(e.selection.getSel().modify)}function By(e,t,n){var r=e?1:-1;return t.setRng(Ds(n.container(),n.offset()+r).toRange()),t.getSel().modify("move",e?"forward":"backward","word"),!0}function Oy(e,t){var n=e.dom.createRng();n.setStart(t.container(),t.offset()),n.setEnd(t.container(),t.offset()),e.selection.setRng(n)}function Hy(e){return!1!==e.settings.inline_boundaries}function Py(e,t){e?t.setAttribute("data-mce-selected","inline-boundary"):t.removeAttribute("data-mce-selected")}function Ly(t,e,n){return $y(e,n).map(function(e){return Oy(t,e),n})}function Vy(e,t,n){return function(){return!!Hy(t)&&tb(e,t)}}var Iy,Fy,Uy=Ge.isText,jy=d(my,!0),qy=d(my,!1),$y=function(n,e){return e.fold(function(e){qs.remove(n.get());var t=jy(e);return n.set(t),k.some(Ds(t,t.length-1))},function(e){return Pc.firstPositionIn(e).map(function(e){if(py(e,n))return Ds(n.get(),1);qs.remove(n.get());var t=gy(e,!0);return n.set(t),Ds(t,1)})},function(e){return Pc.lastPositionIn(e).map(function(e){if(py(e,n))return Ds(n.get(),n.get().length-1);qs.remove(n.get());var t=gy(e,!1);return n.set(t),Ds(t,t.length-1)})},function(e){qs.remove(n.get());var t=qy(e);return n.set(t),k.some(Ds(t,1))})},Wy=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,Ky={isInlineTarget:function(e,t){return we(yt.fromDom(t),If(e))},findRootInline:function(e,t,n){var r=function(e,t,n){return y(Xi.DOM.getParents(n.container(),"*",t),e)}(e,t,n);return k.from(r[r.length-1])},isRtl:function(e){return"rtl"===Xi.DOM.getStyle(e,"direction",!0)||function(e){return Wy.test(e)}(e.textContent)},isAtZwsp:function(e){return Ba(e)||Oa(e)},normalizePosition:vy,normalizeForwards:d(vy,!0),normalizeBackwards:d(vy,!1),hasSameParentBlock:function(e,t,n){var r=bs(t,e),o=bs(n,e);return r&&r===o}},Xy=function(e,t){for(var n=0;n<e.length;n++){var r=e[n].apply(null,t);if(r.isSome())return r}return k.none()},Yy=jf([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),Gy=function(e){return e.fold(W,W,W,W)},Jy=Sy,Qy=Dy,Zy=(d(Dy,!1),d(Dy,!0),Ty),eb=function(e){return e.fold(Yy.start,Yy.start,Yy.end,Yy.end)},tb=function(e,t){var n=t.selection.getRng(),r=e?Ds.fromRangeEnd(n):Ds.fromRangeStart(n);return!!_y(t)&&(e&&Ba(r)?By(!0,t.selection,r):!(e||!Oa(r))&&By(!1,t.selection,r))},nb={move:function(e,t,n){return function(){return!!Hy(e)&&function(t,n,e){var r=t.getBody(),o=Ds.fromRangeStart(t.selection.getRng()),i=d(Ky.isInlineTarget,t);return Qy(e,i,r,o).bind(function(e){return Ly(t,n,e)})}(e,t,n).isSome()}},moveNextWord:d(Vy,!0),movePrevWord:d(Vy,!1),setupSelectedState:function(t){var n=Je(null),r=d(Ky.isInlineTarget,t);return t.on("NodeChange",function(e){Hy(t)&&(function(e,t,n){var r=y(t.select('*[data-mce-selected="inline-boundary"]'),e),o=y(n,e);z(x(r,o),d(Py,!1)),z(x(o,r),d(Py,!0))}(r,t.dom,e.parents),function(e,t){if(e.selection.isCollapsed()&&!0!==e.composing&&t.get()){var n=Ds.fromRangeStart(e.selection.getRng());Ds.isTextPosition(n)&&!1===Ky.isAtZwsp(n)&&(Oy(e,qs.removeAndReposition(t.get(),n)),t.set(null))}}(t,n),function(n,r,o,e){if(r.selection.isCollapsed()){var t=y(e,n);z(t,function(e){var t=Ds.fromRangeStart(r.selection.getRng());Jy(n,r.getBody(),t).bind(function(e){return Ly(r,o,e)})})}}(r,t,n,e.parents))}),n},setCaretPosition:Oy};(Fy=Iy=Iy||{})[Fy.Br=0]="Br",Fy[Fy.Block=1]="Block",Fy[Fy.Wrap=2]="Wrap",Fy[Fy.Eol=3]="Eol";function rb(e,t){return e===Ms.Backwards?t.reverse():t}function ob(e,t,n,r){for(var o,i,a,u,s,c,l=rc(n),f=r,d=[];f&&(s=l,c=f,o=t===Ms.Forwards?s.next(c):s.prev(c));){if(Ge.isBr(o.getNode(!1)))return t===Ms.Forwards?{positions:rb(t,d).concat([o]),breakType:Iy.Br,breakAt:k.some(o)}:{positions:rb(t,d),breakType:Iy.Br,breakAt:k.some(o)};if(o.isVisible()){if(e(f,o)){var h=(i=t,a=f,u=o,Ge.isBr(u.getNode(i===Ms.Forwards))?Iy.Br:!1===Cs(a,u)?Iy.Block:Iy.Wrap);return{positions:rb(t,d),breakType:h,breakAt:k.some(o)}}d.push(o),f=o}else f=o}return{positions:rb(t,d),breakType:Iy.Eol,breakAt:k.none()}}function ib(n,r,o,e){return r(o,e).breakAt.map(function(e){var t=r(o,e).positions;return n===Ms.Backwards?t.concat(e):[e].concat(t)}).getOr([])}function ab(e,i){return b(e,function(e,o){return e.fold(function(){return k.some(o)},function(r){return Ya(E(r.getClientRects()),E(o.getClientRects()),function(e,t){var n=Math.abs(i-e.left);return Math.abs(i-t.left)<=n?o:r}).or(e)})},k.none())}function ub(t,e){return E(e.getClientRects()).bind(function(e){return ab(t,e.left)})}function sb(e,t,n,r){var o=e===Ms.Forwards,i=o?Ph:Lh;if(!r.collapsed){var a=bx(r);if(yx(a))return Zh(e,t,a,e===Ms.Backwards,!0)}var u=function(e){return Ma(e.startContainer)}(r),s=Ss(e,t.getBody(),r);if(i(s))return em(t,s.getNode(!o));var c=Ky.normalizePosition(o,n(s));if(!c)return u?r:null;if(i(c))return Zh(e,t,c.getNode(!o),o,!0);var l=n(c);return l&&i(l)&&As(c,l)?Zh(e,t,l.getNode(!o),o,!0):u?nm(t,c.toRange(),!0):null}function cb(e,t,n,r){var o,i,a,u,s,c,l,f,d;if(d=bx(r),o=Ss(e,t.getBody(),r),i=n(t.getBody(),Ih(1),o),a=y(i,Fh(1)),s=kn.last(o.getClientRects()),(Ph(o)||Oh(o))&&(d=o.getNode()),(Lh(o)||Hh(o))&&(d=o.getNode(!0)),!s)return null;if(c=s.left,(u=$h(a,c))&&yx(u.node))return l=Math.abs(c-u.left),f=Math.abs(c-u.right),Zh(e,t,u.node,l<f,!0);if(d){var h=function(e,t,n,r){function o(e){return kn.last(e.getClientRects())}var i,a,u,s,c,l,f=rc(t),d=[],h=0;l=o(s=1===e?(i=f.next,a=qa,u=ja,Ds.after(r)):(i=f.prev,a=ja,u=qa,Ds.before(r)));do{if(s.isVisible()&&!u(c=o(s),l)){if(0<d.length&&a(c,kn.last(d))&&h++,(c=Ia(c)).position=s,c.line=h,n(c))return d;d.push(c)}}while(s=i(s));return d}(e,t.getBody(),Ih(1),d);if(u=$h(y(h,Fh(1)),c))return nm(t,u.position.toRange(),!0);if(u=kn.last(y(h,Fh(0))))return nm(t,u.position.toRange(),!0)}}function lb(e,t,n){var r,o,i=rc(e.getBody()),a=d(Ts,i.next),u=d(Ts,i.prev);if(n.collapsed&&e.settings.forced_root_block){if(!(r=e.dom.getParent(n.startContainer,"PRE")))return;(1===t?a(Ds.fromRangeStart(n)):u(Ds.fromRangeStart(n)))||(o=function(e){var t=e.dom.create(mf(e));return(!Nn.ie||11<=Nn.ie)&&(t.innerHTML='<br data-mce-bogus="1">'),t}(e),1===t?e.$(r).after(o):e.$(r).before(o),e.selection.select(o,!0),e.selection.collapse())}}function fb(t,n){return function(){var e=function(e,t){var n,r=rc(e.getBody()),o=d(Ts,r.next),i=d(Ts,r.prev),a=t?Ms.Forwards:Ms.Backwards,u=t?o:i,s=e.selection.getRng();return(n=sb(a,e,u,s))?n:(n=lb(e,a,s))||null}(t,n);return!!e&&(t.selection.setRng(e),!0)}}function db(t,n){return function(){var e=function(e,t){var n,r=t?1:-1,o=t?Xm:Km,i=e.selection.getRng();return(n=cb(r,e,o,i))?n:(n=lb(e,r,i))||null}(t,n);return!!e&&(t.selection.setRng(e),!0)}}function hb(n,r){return function(){var e=r?Ds.fromRangeEnd(n.selection.getRng()):Ds.fromRangeStart(n.selection.getRng()),t=r?gx(n.getBody(),e):mx(n.getBody(),e);return(r?N(t.positions):E(t.positions)).filter(function(t){return function(e){return t?Lh(e):Ph(e)}}(r)).fold($(!1),function(e){return n.selection.setRng(e.toRange()),!0})}}function mb(e,t,n,r,o){var i=ma(yt.fromDom(n),"td,th,caption").map(function(e){return e.dom()});return function(e,o,i){return b(e,function(e,r){return e.fold(function(){return k.some(r)},function(e){var t=Math.sqrt(Math.abs(e.x-o)+Math.abs(e.y-i)),n=Math.sqrt(Math.abs(r.x-o)+Math.abs(r.y-i));return k.some(n<t?r:e)})},k.none())}(y(function(n,e){return v(e,function(e){var t=function(e,t){return{left:e.left-t,top:e.top-t,right:e.right+2*t,bottom:e.bottom+2*t,width:e.width+t,height:e.height+t}}(Ia(e.getBoundingClientRect()),-1);return[{x:t.left,y:n(t),cell:e},{x:t.right,y:n(t),cell:e}]})}(e,i),function(e){return t(e,o)}),r,o).map(function(e){return e.cell})}function gb(t,n){return E(n.getClientRects()).bind(function(e){return Cx(t,e.left,e.top)}).bind(function(e){return ub(function(t){return Pc.lastPositionIn(t).map(function(e){return mx(t,e).positions.concat(e)}).getOr([])}(e),n)})}function pb(t,n){return N(n.getClientRects()).bind(function(e){return wx(t,e.left,e.top)}).bind(function(e){return ub(function(t){return Pc.firstPositionIn(t).map(function(e){return[e].concat(gx(t,e).positions)}).getOr([])}(e),n)})}function vb(e,t){e.selection.setRng(t),qv(e,t)}function yb(e,t,n){var r=e(t,n);return function(e){return e.breakType===Iy.Wrap&&0===e.positions.length}(r)||!Ge.isBr(n.getNode())&&function(e){return e.breakType===Iy.Br&&1===e.positions.length}(r)?!function(t,n,e){return e.breakAt.map(function(e){return t(n,e).breakAt.isSome()}).getOr(!1)}(e,t,r):r.breakAt.isNone()}function bb(e,t,n,r){var o=e.selection.getRng(),i=t?1:-1;if(hs()&&function(e,t,n){var r=Ds.fromRangeStart(t);return Pc.positionIn(!e,n).map(function(e){return e.isEqual(r)}).getOr(!1)}(t,o,n)){var a=Zh(i,e,n,!t,!0);return vb(e,a),!0}return!1}function Cb(e,t){var n=t.getNode(e);return Ge.isElement(n)&&"TABLE"===n.nodeName?k.some(n):k.none()}function wb(n,r,o){var e=Cb(!!r,o),i=!1===r;e.fold(function(){return vb(n,o.toRange())},function(t){return Pc.positionIn(i,n.getBody()).filter(function(e){return e.isEqual(o)}).fold(function(){return vb(n,o.toRange())},function(e){return function(n,r,o,e){var i=mf(r);i?r.undoManager.transact(function(){var e=yt.fromTag(i);me(e,gf(r)),Di(e,yt.fromTag("br")),n?wi(yt.fromDom(o),e):Ci(yt.fromDom(o),e);var t=r.dom.createRng();t.setStart(e.dom(),0),t.setEnd(e.dom(),0),vb(r,t)}):vb(r,e.toRange())}(r,n,t,o)})})}function xb(e,t,n,r){var o=e.selection.getRng(),i=Ds.fromRangeStart(o),a=e.getBody();if(!t&&xx(r,i)){var u=function(t,n,e){return gb(n,e).orThunk(function(){return E(e.getClientRects()).bind(function(e){return ab(px(t,Ds.before(n)),e.left)})}).getOr(Ds.before(n))}(a,n,i);return wb(e,t,u),!0}if(t&&zx(r,i)){u=function(t,n,e){return pb(n,e).orThunk(function(){return E(e.getClientRects()).bind(function(e){return ab(vx(t,Ds.after(n)),e.left)})}).getOr(Ds.after(n))}(a,n,i);return wb(e,t,u),!0}return!1}function zb(t,n){return function(){return k.from(t.dom.getParent(t.selection.getNode(),"td,th")).bind(function(e){return k.from(t.dom.getParent(e,"table")).map(function(e){return bb(t,n,e)})}).getOr(!1)}}function Eb(n,r){return function(){return k.from(n.dom.getParent(n.selection.getNode(),"td,th")).bind(function(t){return k.from(n.dom.getParent(t,"table")).map(function(e){return xb(n,r,e,t)})}).getOr(!1)}}function Nb(e){return h(["figcaption"],ie(e))}function Sb(e){var t=j.document.createRange();return t.setStartBefore(e.dom()),t.setEndBefore(e.dom()),t}function kb(e,t,n){n?Di(e,t):xi(e,t)}function Tb(e,t,n,r){return""===t?function(e,t){var n=yt.fromTag("br");return kb(e,n,t),Sb(n)}(e,r):function(e,t,n,r){var o=yt.fromTag(n),i=yt.fromTag("br");return me(o,r),Di(o,i),kb(e,o,t),Sb(i)}(e,r,t,n)}function Ab(e,t,n){return t?function(e,t){return gx(e,t).breakAt.isNone()}(e.dom(),n):function(e,t){return mx(e,t).breakAt.isNone()}(e.dom(),n)}function Mb(t,n){var r=yt.fromDom(t.getBody()),o=Ds.fromRangeStart(t.selection.getRng()),i=mf(t),a=gf(t);return function(e,t){var n=d(ze,t);return ba(yt.fromDom(e.container()),Vn,n).filter(Nb)}(o,r).exists(function(){if(Ab(r,n,o)){var e=Tb(r,i,a,n);return t.selection.setRng(e),!0}return!1})}function Rb(e,t){return function(){return!!e.selection.isCollapsed()&&Mb(e,t)}}function Db(e,t){return v(function(e){return X(e,function(e){return bd({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:i},e)})}(e),function(e){return function(e,t){return t.keyCode===e.keyCode&&t.shiftKey===e.shiftKey&&t.altKey===e.altKey&&t.ctrlKey===e.ctrlKey&&t.metaKey===e.metaKey}(e,t)?[e]:[]})}function _b(e,t){return{from:$(e),to:$(t)}}function Bb(e,t){var n=yt.fromDom(e),r=yt.fromDom(t.container());return kx(n,r).map(function(e){return function(e,t){return{block:$(e),position:$(t)}}(e,t)})}function Ob(t,n,e){var r=Bb(t,Ds.fromRangeStart(e)),o=r.bind(function(e){return Pc.fromPosition(n,t,e.position()).bind(function(e){return Bb(t,e).map(function(e){return function(t,n,r){return Ge.isBr(r.position().getNode())&&!1===kg(r.block())?Pc.positionIn(!1,r.block().dom()).bind(function(e){return e.isEqual(r.position())?Pc.fromPosition(n,t,e).bind(function(e){return Bb(t,e)}):k.some(r)}).getOr(r):r}(t,n,e)})})});return Ya(r,o,_b).filter(function(e){return function(e){return!1===ze(e.from().block(),e.to().block())}(e)&&function(e){return Se(e.from().block()).bind(function(t){return Se(e.to().block()).filter(function(e){return ze(t,e)})}).isSome()}(e)&&function(e){return!1===Ge.isContentEditableFalse(e.from().block().dom())&&!1===Ge.isContentEditableFalse(e.to().block().dom())}(e)})}function Hb(e){var t=function(e){var t=Re(e);return p(t,Vn).fold(function(){return t},function(e){return t.slice(0,e)})}(e);return z(t,_i),t}function Pb(e,t){var n=fh(t,e);return g(n.reverse(),kg).each(_i)}function Lb(e,t,n,r){if(kg(n))return bg(n),Pc.firstPositionIn(n.dom());(function(e){return 0===y(Ae(e),function(e){return!kg(e)}).length})(r)&&kg(t)&&Ci(r,yt.fromTag("br"));var o=Pc.prevPosition(n.dom(),Ds.before(r.dom()));return z(Hb(t),function(e){Ci(r,e)}),Pb(e,t),o}function Vb(e,t,n){if(kg(n))return _i(n),kg(t)&&bg(t),Pc.firstPositionIn(t.dom());var r=Pc.lastPositionIn(n.dom());return z(Hb(t),function(e){Di(n,e)}),Pb(e,t),r}function Ib(e,t){return Bt(t,e)?function(e,t){var n=fh(t,e);return k.from(n[n.length-1])}(t,e):k.none()}function Fb(e,t){Pc.positionIn(e,t.dom()).map(function(e){return e.getNode()}).map(yt.fromDom).filter(_n).each(_i)}function Ub(e,t,n){return Fb(!0,t),Fb(!1,n),Ib(t,n).fold(d(Vb,e,t,n),d(Lb,e,t,n))}function jb(e,t){var n=yt.fromDom(t),r=d(ze,e);return ya(n,$n,r).isSome()}function qb(e,t){var n=Pc.prevPosition(e.dom(),Ds.fromRangeStart(t)).isNone(),r=Pc.nextPosition(e.dom(),Ds.fromRangeEnd(t)).isNone();return!function(e,t){return jb(e,t.startContainer)||jb(e,t.endContainer)}(e,t)&&n&&r}function $b(e){var t=yt.fromDom(e.getBody()),n=e.selection.getRng();return qb(t,n)?function(e){return e.setContent(""),e.selection.setCursorLocation(),!0}(e):function(n,r){var o=r.getRng();return Ya(kx(n,yt.fromDom(o.startContainer)),kx(n,yt.fromDom(o.endContainer)),function(e,t){return!1===ze(e,t)&&(o.deleteContents(),Rx(n,!0,e,t).each(function(e){r.setRng(e.toRange())}),!0)}).getOr(!1)}(t,e.selection)}function Wb(e){return ks(e).exists(_n)}function Kb(e,t,n){var r=y(fh(yt.fromDom(n.container()),t),Vn),o=E(r).getOr(t);return Pc.fromPosition(e,o.dom(),n).filter(Wb)}function Xb(e,t){return ks(t).exists(_n)||Kb(!0,e,t).isSome()}function Yb(e,t){return function(e){return k.from(e.getNode(!0)).map(yt.fromDom)}(t).exists(_n)||Kb(!1,e,t).isSome()}function Gb(e,t,n,r){var o=r.getNode(!1===t);return kx(yt.fromDom(e),yt.fromDom(n.getNode())).map(function(e){return kg(e)?Hx.remove(e.dom()):Hx.moveToElement(o)}).orThunk(function(){return k.some(Hx.moveToElement(o))})}function Jb(t,n,r){return Pc.fromPosition(n,t,r).bind(function(e){return function(e){return $n(yt.fromDom(e))||Un(yt.fromDom(e))}(e.getNode())?k.none():function(t,e,n,r){function o(e){return Dn(yt.fromDom(e))&&!Cs(n,r,t)}return Ns(!e,n).fold(function(){return Ns(e,r).fold($(!1),o)},o)}(t,n,r,e)?k.none():n&&Ge.isContentEditableFalse(e.getNode())?Gb(t,n,r,e):!1===n&&Ge.isContentEditableFalse(e.getNode(!0))?Gb(t,n,r,e):n&&Lh(r)?k.some(Hx.moveToPosition(e)):!1===n&&Ph(r)?k.some(Hx.moveToPosition(e)):k.none()})}function Qb(t,e,n){return function(e,t){var n=t.getNode(!1===e),r=e?"after":"before";return Ge.isElement(n)&&n.getAttribute("data-mce-caret")===r}(e,n)?function(e,t){return e&&Ge.isContentEditableFalse(t.nextSibling)?k.some(Hx.moveToElement(t.nextSibling)):!1===e&&Ge.isContentEditableFalse(t.previousSibling)?k.some(Hx.moveToElement(t.previousSibling)):k.none()}(e,n.getNode(!1===e)).fold(function(){return Jb(t,e,n)},k.some):Jb(t,e,n).bind(function(e){return function(t,n,e){return e.fold(function(e){return k.some(Hx.remove(e))},function(e){return k.some(Hx.moveToElement(e))},function(e){return Cs(n,e,t)?k.none():k.some(Hx.moveToPosition(e))})}(t,n,e)})}function Zb(e,t){return k.from(Px(e.getBody(),t))}function eC(t,n){var e=t.selection.getNode();return Zb(t,e).filter(Ge.isContentEditableFalse).fold(function(){return function(e,t,n){var r=Es(t?1:-1,e,n),o=Ds.fromRangeStart(r),i=yt.fromDom(e);return!1===t&&Lh(o)?k.some(Hx.remove(o.getNode(!0))):t&&Ph(o)?k.some(Hx.remove(o.getNode())):!1===t&&Ph(o)&&Yb(i,o)?Bx(i,o).map(function(e){return Hx.remove(e.getNode())}):t&&Lh(o)&&Xb(i,o)?Ox(i,o).map(function(e){return Hx.remove(e.getNode())}):Qb(e,t,o)}(t.getBody(),n,t.selection.getRng()).map(function(e){return e.fold(function(t,n){return function(e){return t._selectionOverrides.hideFakeCaret(),Tg(t,n,yt.fromDom(e)),!0}}(t,n),function(n,r){return function(e){var t=r?Ds.before(e):Ds.after(e);return n.selection.setRng(t.toRange()),!0}}(t,n),function(t){return function(e){return t.selection.setRng(e.toRange()),!0}}(t))}).getOr(!1)},function(){return!0})}function tC(e,t){var n=e.selection.getNode();return!!Ge.isContentEditableFalse(n)&&Zb(e,n.parentNode).filter(Ge.isContentEditableFalse).fold(function(){return function(e){z(ma(e,".mce-offscreen-selection"),_i)}(yt.fromDom(e.getBody())),Tg(e,t,yt.fromDom(e.selection.getNode())),Tx(e),!0},function(){return!0})}function nC(e,t,n,r,o,i){var a=Zh(r,e,i.getNode(!o),o,!0);if(t.collapsed){var u=t.cloneRange();o?u.setEnd(a.startContainer,a.startOffset):u.setStart(a.endContainer,a.endOffset),u.deleteContents()}else t.deleteContents();return e.selection.setRng(a),function(e,t){Ge.isText(t)&&0===t.data.length&&e.remove(t)}(e.dom,n),!0}function rC(t,n){return function(e){return $y(n,e).map(function(e){return nb.setCaretPosition(t,e),!0}).getOr(!1)}}function oC(e,t,n,r){var o=e.getBody(),i=d(Ky.isInlineTarget,e);e.undoManager.ignore(function(){e.selection.setRng(function(e,t){var n=j.document.createRange();return n.setStart(e.container(),e.offset()),n.setEnd(t.container(),t.offset()),n}(n,r)),e.execCommand("Delete"),Jy(i,o,Ds.fromRangeStart(e.selection.getRng())).map(eb).map(rC(e,t))}),e.nodeChanged()}function iC(n,r,o,i){var a=function(e,t){var n=bs(t,e);return n||e}(n.getBody(),i.container()),u=d(Ky.isInlineTarget,n),s=Jy(u,a,i);return s.bind(function(e){return o?e.fold($(k.some(eb(e))),k.none,$(k.some(Zy(e))),k.none):e.fold(k.none,$(k.some(Zy(e))),k.none,$(k.some(eb(e))))}).map(rC(n,r)).getOrThunk(function(){var t=Pc.navigate(o,a,i),e=t.bind(function(e){return Jy(u,a,e)});return s.isSome()&&e.isSome()?Ky.findRootInline(u,a,i).map(function(e){return!!function(o){return Ya(Pc.firstPositionIn(o),Pc.lastPositionIn(o),function(e,t){var n=Ky.normalizePosition(!0,e),r=Ky.normalizePosition(!1,t);return Pc.nextPosition(o,n).map(function(e){return e.isEqual(r)}).getOr(!0)}).getOr(!0)}(e)&&(Tg(n,o,yt.fromDom(e)),!0)}).getOr(!1):e.bind(function(e){return t.map(function(e){return o?oC(n,r,i,e):oC(n,r,e,i),!0})}).getOr(!1)})}function aC(e){return 1===Re(e).length}function uC(e,t,n,r){var o=d(qm,t),i=X(y(r,o),function(e){return e.dom()});if(0===i.length)Tg(t,e,n);else{var a=function(e,t){var n=Pm(!1),r=Um(t,n.dom());return Ci(yt.fromDom(e),n),_i(yt.fromDom(e)),Ds(r,0)}(n.dom(),i);t.selection.setRng(a.toRange())}}function sC(n,r){var e=yt.fromDom(n.getBody()),t=yt.fromDom(n.selection.getStart()),o=y(function(e,t){var n=fh(t,e);return p(n,Vn).fold($(n),function(e){return n.slice(0,e)})}(e,t),aC);return N(o).map(function(e){var t=Ds.fromRangeStart(n.selection.getRng());return!(!Ax(r,t,e.dom())||function(e){return rs(e.dom())&&Om(e.dom())}(e))&&(uC(r,n,e,o),!0)}).getOr(!1)}function cC(e,t){return{start:$(e),end:$(t)}}function lC(e,t){return xa(yt.fromDom(e),"td,th",t)}function fC(e,t){return Ca(e,"table",t)}function dC(e){return!1===ze(e.start(),e.end())}function hC(e,n){return fC(e.start(),n).bind(function(t){return fC(e.end(),n).bind(function(e){return function(e,t){return e?k.some(t):k.none()}(ze(t,e),t)})})}function mC(e){return ma(e,"td,th")}function gC(n,e){var t=lC(e.startContainer,n),r=lC(e.endContainer,n);return e.collapsed?k.none():Ya(t,r,cC).fold(function(){return t.fold(function(){return r.bind(function(t){return fC(t,n).bind(function(e){return E(mC(e)).map(function(e){return cC(e,t)})})})},function(t){return fC(t,n).bind(function(e){return N(mC(e)).map(function(e){return cC(t,e)})})})},function(e){return qx(n,e)?k.none():function(t,e){return fC(t.start(),e).bind(function(e){return N(mC(e)).map(function(e){return cC(t.start(),e)})})}(e,n)})}function pC(t,e){return hC(t,e).map(function(e){return function(e,t,n){return{rng:$(e),table:$(t),cells:$(n)}}(t,e,mC(e))})}function vC(e,t){var n=function(t){return function(e){return ze(t,e)}}(e);return function(e,t){var n=lC(e.startContainer,t),r=lC(e.endContainer,t);return Ya(n,r,cC).filter(dC).filter(function(e){return qx(t,e)}).orThunk(function(){return gC(t,e)})}(t,n).bind(function(e){return pC(e,n)})}function yC(e,t){return p(e,function(e){return ze(e,t)})}function bC(n){return function(n){return Ya(yC(n.cells(),n.rng().start()),yC(n.cells(),n.rng().end()),function(e,t){return n.cells().slice(e,t+1)})}(n).map(function(e){var t=n.cells();return e.length===t.length?jx.removeTable(n.table()):jx.emptyCells(e)})}function CC(e,t){return z(t,bg),e.selection.setCursorLocation(t[0].dom(),0),!0}function wC(e,t){return Tg(e,!1,t),!0}function xC(t,e,n){return function(e,t){return vC(e,t).bind(bC)}(e,n).map(function(e){return e.fold(d(wC,t),d(CC,t))})}function zC(t,e,n,r){return $x(e,r).fold(function(){return xC(t,e,n)},function(e){return function(e,t){return Wx(e,t)}(t,e)}).getOr(!1)}function EC(e,t){return g(fh(t,e),$n)}function NC(t,n,r,o,i){return Pc.navigate(r,t.getBody(),i).bind(function(e){return function(e,n,r,o){return Pc.firstPositionIn(e.dom()).bind(function(t){return Pc.lastPositionIn(e.dom()).map(function(e){return n?r.isEqual(t)&&o.isEqual(e):r.isEqual(e)&&o.isEqual(t)})}).getOr(!0)}(o,r,i,e)?function(e,t){return Wx(e,t)}(t,o):function(e,t,n){return $x(e,yt.fromDom(n.getNode())).map(function(e){return!1===ze(e,t)})}(n,o,e)}).or(k.some(!0))}function SC(t,n,r,e){var o=Ds.fromRangeStart(t.selection.getRng());return EC(r,e).bind(function(e){return kg(e)?Wx(t,e):function(e,t,n,r,o){return Pc.navigate(n,e.getBody(),o).bind(function(e){return EC(t,yt.fromDom(e.getNode())).map(function(e){return!1===ze(e,r)})})}(t,r,n,e,o)}).getOr(!1)}function kC(e,t){return e?Oh(t):Hh(t)}function TC(t,n,e){var r=yt.fromDom(t.getBody());return $x(r,e).fold(function(){return SC(t,n,r,e)||function(e,t){var n=Ds.fromRangeStart(e.selection.getRng());return kC(t,n)||Pc.fromPosition(t,e.getBody(),n).map(function(e){return kC(t,e)}).getOr(!1)}(t,n)},function(e){return function(e,t,n,r){var o=Ds.fromRangeStart(e.selection.getRng());return kg(r)?Wx(e,r):NC(e,n,t,r,o)}(t,n,r,e).getOr(!1)})}function AC(e){var t=parseInt(e,10);return isNaN(t)?0:t}function MC(e,t){return(e||function(e){return"table"===ie(e)}(t)?"margin":"padding")+("rtl"===ve(t,"direction")?"-right":"-left")}function RC(e){var t=Yx(e);return!0!==e.readonly&&(1<t.length||function(r,e){return w(e,function(e){var t=MC(Hf(r),e),n=ye(e,t).map(AC).getOr(0);return"false"!==r.dom.getContentEditable(e.dom())&&0<n})}(e,t))}function DC(e){return Fn(e)||Un(e)}function _C(e,t){var n=e.dom,r=e.selection,o=e.formatter,i=Pf(e),a=/[a-z%]+$/i.exec(i)[0],u=parseInt(i,10),s=Hf(e),c=mf(e);e.queryCommandState("InsertUnorderedList")||e.queryCommandState("InsertOrderedList")||""!==c||n.getParent(r.getNode(),n.isBlock)||o.apply("div"),z(Yx(e),function(e){!function(e,t,n,r,o,i){var a=MC(n,yt.fromDom(i));if("outdent"===t){var u=Math.max(0,AC(i.style[a])-r);e.setStyle(i,a,u?u+o:"")}else{u=AC(i.style[a])+r+o;e.setStyle(i,a,u)}}(n,t,s,u,a,e.dom())})}function BC(e,t,n){return Pc.navigateIgnore(e,t,n,wh)}function OC(e,t){return g(fh(yt.fromDom(t.container()),e),Vn)}function HC(e,n,r){return BC(e,n.dom(),r).forall(function(t){return OC(n,r).fold(function(){return!1===Cs(t,r,n.dom())},function(e){return!1===Cs(t,r,n.dom())&&Bt(e,yt.fromDom(t.container()))})})}function PC(t,n,r){return OC(n,r).fold(function(){return BC(t,n.dom(),r).forall(function(e){return!1===Cs(e,r,n.dom())})},function(e){return BC(t,e.dom(),r).isNone()})}function LC(e){return k.from(e.dom.getParent(e.selection.getStart(!0),e.dom.isBlock))}function VC(e,t){return e&&e.parentNode&&e.parentNode.nodeName===t}function IC(e){return e&&/^(OL|UL|LI)$/.test(e.nodeName)}function FC(e){var t=e.parentNode;return/^(LI|DT|DD)$/.test(t.nodeName)?t:e}function UC(e,t,n){for(var r=e[n?"firstChild":"lastChild"];r&&!Ge.isElement(r);)r=r[n?"nextSibling":"previousSibling"];return r===t}function jC(e){e.innerHTML='<br data-mce-bogus="1">'}function qC(e,t){return e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t}function $C(e,t){return t&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&!/^(fixed|absolute)/i.test(t.style.position)&&"true"!==e.getContentEditable(t)}function WC(e,t,n){return!1===Ge.isText(t)?n:e?1===n&&t.data.charAt(n-1)===cu?0:n:n===t.data.length-1&&t.data.charAt(n)===cu?t.data.length:n}function KC(e,t){var n,r,o=e.getRoot();for(n=t;n!==o&&"false"!==e.getContentEditable(n);)"true"===e.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o}function XC(e,t){var n=mf(e);n&&n.toLowerCase()===t.tagName.toLowerCase()&&e.dom.setAttribs(t,gf(e))}function YC(e,t,n){var r=e.create("span",{},"&nbsp;");n.parentNode.insertBefore(r,n),t.scrollIntoView(r),e.remove(r)}function GC(e,t,n,r){var o=e.createRng();r?(o.setStartBefore(n),o.setEndBefore(n)):(o.setStartAfter(n),o.setEndAfter(n)),t.setRng(o)}function JC(e,t){var n,r,o=e.selection,i=e.dom,a=o.getRng();ay(i,a).each(function(e){a.setStart(e.startContainer,e.startOffset),a.setEnd(e.endContainer,e.endOffset)});var u=a.startOffset,s=a.startContainer;if(1===s.nodeType&&s.hasChildNodes()){var c=u>s.childNodes.length-1;s=s.childNodes[Math.min(u,s.childNodes.length-1)]||s,u=c&&3===s.nodeType?s.nodeValue.length:0}var l=i.getParent(s,i.isBlock),f=l?i.getParent(l.parentNode,i.isBlock):null,d=f?f.nodeName.toUpperCase():"",h=!(!t||!t.ctrlKey);"LI"!==d||h||(l=f),s&&3===s.nodeType&&u>=s.nodeValue.length&&!function(e,t,n){for(var r,o=new yi(t,n),i=e.getNonEmptyElements();r=o.next();)if(i[r.nodeName.toLowerCase()]||0<r.length)return!0}(e.schema,s,l)&&(n=i.create("br"),a.insertNode(n),a.setStartAfter(n),a.setEndAfter(n),r=!0),n=i.create("br"),Xu(i,a,n),YC(i,o,n),GC(i,o,n,r),e.undoManager.add()}function QC(e,t){var n=yt.fromTag("br");Ci(yt.fromDom(t),n),e.undoManager.add()}function ZC(e,t){cz(e.getBody(),t)||wi(yt.fromDom(t),yt.fromTag("br"));var n=yt.fromTag("br");wi(yt.fromDom(t),n),YC(e.dom,e.selection,n.dom()),GC(e.dom,e.selection,n.dom(),!1),e.undoManager.add()}function ew(e){return e&&"A"===e.nodeName&&"href"in e}function tw(e){return e.fold($(!1),ew,ew,$(!1))}function nw(e,t){t.fold(i,d(QC,e),d(ZC,e),i)}function rw(e,t){return oz(e).filter(function(e){return 0<t.length&&we(yt.fromDom(e),t)}).isSome()}function ow(e,t){return dz(e)}function iw(n){return function(e,t){return""===mf(e)===n}}function aw(n){return function(e,t){return az(e)===n}}function uw(n,r){return function(e,t){return iz(e)===n.toUpperCase()===r}}function sw(e){return uw("pre",e)}function cw(n){return function(e,t){return hf(e)===n}}function lw(e,t){return fz(e)}function fw(e,t){return t}function dw(e){var t=mf(e),n=rz(e.dom,e.selection.getStart());return n&&e.schema.isValidChild(n.nodeName,t||"P")}function hw(e,t){return function(n,r){return b(e,function(e,t){return e&&t(n,r)},!0)?k.some(t):k.none()}}function mw(n,r){var e=r.container(),t=r.offset();return Ge.isText(e)?(e.insertData(t,n),k.some(Uu(e,t+n.length))):ks(r).map(function(e){var t=yt.fromText(n);return r.isAtEnd()?wi(e,t):Ci(e,t),Uu(t.dom(),n.length)})}function gw(e){return Uu.isTextPosition(e)&&!e.isAtStart()&&!e.isAtEnd()}function pw(e,t){var n=y(fh(yt.fromDom(t.container()),e),Vn);return E(n).getOr(e)}function vw(e,t){return gw(t)?Dh(t):Dh(t)||Pc.prevPosition(pw(e,t).dom(),t).exists(Dh)}function yw(e,t){return gw(t)?Rh(t):Rh(t)||Pc.nextPosition(pw(e,t).dom(),t).exists(Rh)}function bw(e){return ks(e).bind(function(e){return ba(e,xt)}).exists(function(e){return function(e){return h(["pre","pre-wrap"],e)}(ve(e,"white-space"))})}function Cw(e,t){return function(e,t){return Pc.prevPosition(e.dom(),t).isNone()}(e,t)||function(e,t){return Pc.nextPosition(e.dom(),t).isNone()}(e,t)||Gx(e,t)||Jx(e,t)||Yb(e,t)||Xb(e,t)}function ww(e,t){var n=function(e){var t=e.container(),n=e.offset();return Ge.isText(t)&&n<t.data.length?Uu(t,n+1):e}(t);return!bw(n)&&(Jx(e,n)||Zx(e,n)||Xb(e,n)||yw(e,n))}function xw(e,t){return function(e,t){return!bw(t)&&(Gx(e,t)||Qx(e,t)||Yb(e,t)||vw(e,t))}(e,t)||ww(e,t)}function zw(e,t){return Mh(e.charAt(t))}function Ew(e){var t=e.container();return Ge.isText(t)&&Z(t.data,"\xa0")}function Nw(e){var t=e.data,n=function(e){var n=e.split("");return X(n,function(e,t){return Mh(e)&&0<t&&t<n.length-1&&bh(n[t-1])&&bh(n[t+1])?" ":e}).join("")}(t);return n!==t&&(e.data=n,!0)}function Sw(n,e){return k.some(e).filter(Ew).bind(function(e){var t=e.container();return function(e,t){var n=t.data,r=Uu(t,0);return!(!zw(n,0)||xw(e,r))&&(t.data=" "+n.slice(1),!0)}(n,t)||Nw(t)||function(e,t){var n=t.data,r=Uu(t,n.length-1);return!(!zw(n,n.length-1)||xw(e,r))&&(t.data=n.slice(0,-1)+" ",!0)}(n,t)?k.some(e):k.none()})}function kw(t){var e=yt.fromDom(t.getBody());t.selection.isCollapsed()&&Sw(e,Uu.fromRangeStart(t.selection.getRng())).each(function(e){t.selection.setRng(e.toRange())})}function Tw(t,n){return function(e){return function(e,t){return!bw(t)&&(Cw(e,t)||vw(e,t)||yw(e,t))}(t,e)?vz(n):yz(n)}}function Aw(e){var t=Ds.fromRangeStart(e.selection.getRng()),n=yt.fromDom(e.getBody());if(e.selection.isCollapsed()){var r=d(Ky.isInlineTarget,e),o=Ds.fromRangeStart(e.selection.getRng());return Jy(r,e.getBody(),o).bind(function(t){return function(e){return e.fold(function(e){return Pc.prevPosition(t.dom(),Ds.before(e))},function(e){return Pc.firstPositionIn(e)},function(e){return Pc.lastPositionIn(e)},function(e){return Pc.nextPosition(t.dom(),Ds.after(e))})}}(n)).bind(Tw(n,t)).exists(function(t){return function(e){return t.selection.setRng(e.toRange()),t.nodeChanged(),!0}}(e))}return!1}function Mw(e,t){t.hasAttribute("data-mce-caret")&&(Pa(t),function(e){e.selection.setRng(e.selection.getRng())}(e),e.selection.scrollIntoView(t))}function Rw(e,t){var n=function(e){return wa(yt.fromDom(e.getBody()),"*[data-mce-caret]").fold($(null),function(e){return e.dom()})}(e);if(n)return"compositionstart"===t.type?(t.preventDefault(),t.stopPropagation(),void Mw(e,n)):void(_a(n)&&(Mw(e,n),e.undoManager.add()))}function Dw(t){!function(e){var t=aa(function(){e.composing||kw(e)},0);wz.isIE()&&(e.on("keypress",function(e){t.throttle()}),e.on("remove",function(e){t.cancel()}))}(t),t.on("input",function(e){!1===e.isComposing&&kw(t)})}function _w(a){function e(e,t){try{a.getDoc().execCommand(e,!1,t)}catch(n){}}function u(e){return e.isDefaultPrevented()}function t(){a.shortcuts.add("meta+a",null,"SelectAll")}function n(){a.on("keydown",function(e){if(!u(e)&&e.keyCode===i&&l.isCollapsed()&&0===l.getRng().startOffset){var t=l.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})}function r(){a.inline||(a.contentStyles.push("body {min-height: 150px}"),a.on("click",function(e){var t;if("HTML"===e.target.nodeName){if(11<Nn.ie)return void a.getBody().focus();t=a.selection.getRng(),a.getBody().focus(),a.selection.setRng(t),a.selection.normalize(),a.nodeChanged()}}))}var o=Mn.each,i=Ah.BACKSPACE,s=Ah.DELETE,c=a.dom,l=a.selection,f=a.settings,d=a.parser,h=Nn.gecko,m=Nn.ie,g=Nn.webkit,p="data:text/mce-internal,",v=m?"Text":"URL";function y(e){var t=c.create("body"),n=e.cloneContents();return t.appendChild(n),l.serializer.serialize(t,{format:"html"})}function b(){var e=c.getAttribs(l.getStart().cloneNode(!1));return function(){var t=l.getStart();t!==a.getBody()&&(c.setAttrib(t,"style",null),o(e,function(e){t.setAttributeNode(e.cloneNode(!0))}))}}function C(){return!l.isCollapsed()&&c.getParent(l.getStart(),c.isBlock)!==c.getParent(l.getEnd(),c.isBlock)}return a.on("keydown",function(e){var t,n,r,o,i;if(!u(e)&&e.keyCode===Ah.BACKSPACE&&(n=(t=l.getRng()).startContainer,r=t.startOffset,o=c.getRoot(),i=n,t.collapsed&&0===r)){for(;i&&i.parentNode&&i.parentNode.firstChild===i&&i.parentNode!==o;)i=i.parentNode;"BLOCKQUOTE"===i.tagName&&(a.formatter.toggle("blockquote",null,i),(t=c.createRng()).setStart(n,0),t.setEnd(n,0),l.setRng(t))}}),a.on("keydown",function(e){var t,n,r=e.keyCode;if(!u(e)&&(r===s||r===i)){if(t=a.selection.isCollapsed(),n=a.getBody(),t&&!c.isEmpty(n))return;if(!t&&!function(e){var t=y(e),n=c.createRng();return n.selectNode(a.getBody()),t===y(n)}(a.selection.getRng()))return;e.preventDefault(),a.setContent(""),n.firstChild&&c.isBlock(n.firstChild)?a.selection.setCursorLocation(n.firstChild,0):a.selection.setCursorLocation(n,0),a.nodeChanged()}}),Nn.windowsPhone||a.on("keyup focusin mouseup",function(e){Ah.modifierPressed(e)||l.normalize()},!0),g&&(a.inline||c.bind(a.getDoc(),"mousedown mouseup",function(e){var t;if(e.target===a.getDoc().documentElement)if(t=l.getRng(),a.getBody().focus(),"mousedown"===e.type){if(Da(t.startContainer))return;l.placeCaretAt(e.clientX,e.clientY)}else l.setRng(t)}),a.on("click",function(e){var t=e.target;/^(IMG|HR)$/.test(t.nodeName)&&"false"!==c.getContentEditableParent(t)&&(e.preventDefault(),a.selection.select(t),a.nodeChanged()),"A"===t.nodeName&&c.hasClass(t,"mce-item-anchor")&&(e.preventDefault(),l.select(t))}),f.forced_root_block&&a.on("init",function(){e("DefaultParagraphSeparator",mf(a))}),a.on("init",function(){a.dom.bind(a.getBody(),"submit",function(e){e.preventDefault()})}),n(),d.addNodeFilter("br",function(e){for(var t=e.length;t--;)"Apple-interchange-newline"===e[t].attr("class")&&e[t].remove()}),Nn.iOS?(a.inline||a.on("keydown",function(){j.document.activeElement===j.document.body&&a.getWin().focus()}),r(),a.on("click",function(e){var t=e.target;do{if("A"===t.tagName)return void e.preventDefault()}while(t=t.parentNode)}),a.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")):t()),11<=Nn.ie&&(r(),n()),Nn.ie&&(t(),e("AutoUrlDetect",!1),a.on("dragstart",function(e){!function(e){var t,n;e.dataTransfer&&(a.selection.isCollapsed()&&"IMG"===e.target.tagName&&l.select(e.target),0<(t=a.selection.getContent()).length&&(n=p+escape(a.id)+","+escape(t),e.dataTransfer.setData(v,n)))}(e)}),a.on("drop",function(e){if(!u(e)){var t=function(e){var t;return e.dataTransfer&&(t=e.dataTransfer.getData(v))&&0<=t.indexOf(p)?(t=t.substr(p.length).split(","),{id:unescape(t[0]),html:unescape(t[1])}):null}(e);if(t&&t.id!==a.id){e.preventDefault();var n=$v(e.x,e.y,a.getDoc());l.setRng(n),function(e,t){a.queryCommandSupported("mceInsertClipboardContent")?a.execCommand("mceInsertClipboardContent",!1,{content:e,internal:t}):a.execCommand("mceInsertContent",!1,e)}(t.html,!0)}}})),h&&(a.on("keydown",function(e){if(!u(e)&&e.keyCode===i){if(!a.getBody().getElementsByTagName("hr").length)return;if(l.isCollapsed()&&0===l.getRng().startOffset){var t=l.getNode(),n=t.previousSibling;if("HR"===t.nodeName)return c.remove(t),void e.preventDefault();n&&n.nodeName&&"hr"===n.nodeName.toLowerCase()&&(c.remove(n),e.preventDefault())}}}),j.Range.prototype.getClientRects||a.on("mousedown",function(e){if(!u(e)&&"HTML"===e.target.nodeName){var t=a.getBody();t.blur(),pn.setEditorTimeout(a,function(){t.focus()})}}),a.on("keypress",function(e){var t;if(!u(e)&&(8===e.keyCode||46===e.keyCode)&&C())return t=b(),a.getDoc().execCommand("delete",!1,null),t(),e.preventDefault(),!1}),c.bind(a.getDoc(),"cut",function(e){var t;!u(e)&&C()&&(t=b(),pn.setEditorTimeout(a,function(){t()}))}),f.readonly||a.on("BeforeExecCommand mousedown",function(){e("StyleWithCSS",!1),e("enableInlineTableEditing",!1),f.object_resizing||e("enableObjectResizing",!1)}),a.on("SetContent ExecCommand",function(e){"setcontent"!==e.type&&"mceInsertLink"!==e.command||o(c.select("a"),function(e){var t=e.parentNode,n=c.getRoot();if(t.lastChild===e){for(;t&&!c.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}c.add(t,"br",{"data-mce-bogus":1})}})}),a.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"),Nn.mac&&a.on("keydown",function(e){!Ah.metaKeyPressed(e)||e.shiftKey||37!==e.keyCode&&39!==e.keyCode||(e.preventDefault(),a.selection.getSel().modify("move",37===e.keyCode?"backward":"forward","lineboundary"))}),n()),{refreshContentEditable:function(){},isHidden:function(){var e;return!(!h||a.removed)&&(!(e=a.selection.getSel())||!e.rangeCount||0===e.rangeCount)}}}function Bw(e){return Ge.isElement(e)&&In(yt.fromDom(e))}function Ow(t){t.on("click",function(e){3<=e.detail&&function(e){var t=e.selection.getRng(),n=Uu.fromRangeStart(t),r=Uu.fromRangeEnd(t);if(Uu.isElementPosition(n)){var o=n.container();Bw(o)&&Pc.firstPositionIn(o).each(function(e){return t.setStart(e.container(),e.offset())})}if(Uu.isElementPosition(r)){o=n.container();Bw(o)&&Pc.lastPositionIn(o).each(function(e){return t.setEnd(e.container(),e.offset())})}e.selection.setRng(fp(t))}(t)})}function Hw(e){!function(t){t.on("click",function(e){t.dom.getParent(e.target,"details")&&e.preventDefault()})}(e),function(e){e.parser.addNodeFilter("details",function(e){z(e,function(e){e.attr("data-mce-open",e.attr("open")),e.attr("open","open")})}),e.serializer.addNodeFilter("details",function(e){z(e,function(e){var t=e.attr("data-mce-open");e.attr("open",K(t)?t:null),e.attr("data-mce-open",null)})})}(e)}function Pw(e){e.bindPendingEventDelegates(),e.initialized=!0,e.fire("init"),e.focus(!0),e.nodeChanged({initial:!0}),e.execCallback("init_instance_callback",e),function(t){t.settings.auto_focus&&pn.setEditorTimeout(t,function(){var e;(e=!0===t.settings.auto_focus?t:t.editorManager.get(t.settings.auto_focus)).destroyed||e.focus()},100)}(e)}function Lw(e,t){var n=e.editorManager.translate("Rich Text Area. Press ALT-0 for help."),r=function(e,t,n,r){var o=yt.fromTag("iframe");return me(o,r),me(o,{id:e+"_ifr",frameBorder:"0",allowTransparency:"true",title:t}),fa(o,"tox-edit-area__iframe"),o}(e.id,n,t.height,uf(e)).dom();r.onload=function(){r.onload=null,e.fire("load")};var o=function(e,t){if(j.document.domain!==j.window.location.hostname&&Nn.browser.isIE()){var n=eh("mce");e[n]=function(){Nz(e)};var r='javascript:(function(){document.open();document.domain="'+j.document.domain+'";var ed = window.parent.tinymce.get("'+e.id+'");document.write(ed.iframeHTML);document.close();ed.'+n+"(true);})()";return Sz.setAttrib(t,"src",r),!0}return!1}(e,r);return e.contentAreaContainer=t.iframeContainer,e.iframeElement=r,e.iframeHTML=function(e){var t,n,r;return r=sf(e)+"<html><head>",cf(e)!==e.documentBaseUrl&&(r+='<base href="'+e.documentBaseURI.getURI()+'" />'),r+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',t=lf(e),n=ff(e),df(e)&&(r+='<meta http-equiv="Content-Security-Policy" content="'+df(e)+'" />'),r+='</head><body id="'+t+'" class="mce-content-body '+n+'" data-id="'+e.id+'"><br></body></html>'}(e),Sz.add(t.iframeContainer,r),o}function Vw(e){e.contentCSS=e.contentCSS.concat(function(t){var e=Lf(t),n=t.editorManager.baseURL+"/skins/content",r="content"+t.editorManager.suffix+".css",o=!0===t.inline;return X(e,function(e){return function(e){return/^[a-z0-9\-]+$/i.test(e)}(e)&&!o?n+"/"+e+"/"+r:t.documentBaseURI.toAbsolute(e)})}(e))}function Iw(e){return e.replace(/^\-/,"")}function Fw(e){return{editorContainer:e,iframeContainer:e}}function Uw(e){var t=e.getElement();return e.inline?Fw(null):function(e){var t=Tz.create("div");return Tz.insertAfter(t,e),Fw(t)}(t)}function jw(e){return"-"===e.charAt(0)}function qw(t,e){(function(e){return k.from(zf(e)).filter(function(e){return 0<e.length}).map(function(e){return{url:e,name:k.none()}})})(e).orThunk(function(){return function(t){return k.from(xf(t)).filter(function(e){return 0<e.length&&!Ud.has(e)}).map(function(e){return{url:t.editorManager.baseURL+"/icons/"+e+"/icons.js",name:k.some(e)}})}(e)}).each(function(e){t.add(e.url,i,undefined,function(){Fd.iconsLoadError(e.url,e.name.getOrUndefined())})})}function $w(e,t){var n=Qi.ScriptLoader;!function(e,t,n,r){var o=t.settings,i=o.theme;if(K(i)){if(!jw(i)&&!qd.urls.hasOwnProperty(i)){var a=o.theme_url;a?qd.load(i,t.documentBaseURI.toAbsolute(a)):qd.load(i,"themes/"+i+"/theme"+n+".js")}e.loadQueue(function(){qd.waitFor(i,r)})}else r()}(n,e,t,function(){!function(e,t){var n=Bf(t),r=Of(t);if(!1===ra.hasCode(n)&&"en"!==n){var o=""!==r?r:t.editorManager.baseURL+"/langs/"+n+".js";e.add(o,i,undefined,function(){Fd.languageLoadError(o,n)})}}(n,e),qw(n,e),function(n,r){A(n.plugins)&&(n.plugins=n.plugins.join(" ")),Mn.each(n.external_plugins,function(e,t){jd.load(t,e,i,undefined,function(){Fd.pluginLoadError(t,e)}),n.plugins+=" "+t}),Mn.each(n.plugins.split(/[ ,]/),function(e){if((e=Mn.trim(e))&&!jd.urls[e])if(jw(e)){e=e.substr(1,e.length);var t=jd.dependencies(e);Mn.each(t,function(e){var t={prefix:"plugins/",resource:e,suffix:"/plugin"+r+".js"};e=jd.createUrl(t,e),jd.load(e.resource,e,i,undefined,function(){Fd.pluginLoadError(e.prefix+e.resource+e.suffix,e.resource)})})}else{var n={prefix:"plugins/",resource:e,suffix:"/plugin"+r+".js"};jd.load(e,n,i,undefined,function(){Fd.pluginLoadError(n.prefix+n.resource+n.suffix,e)})}})}(e.settings,t),n.loadQueue(function(){e.removed||Mz(e)},e,function(){e.removed||Mz(e)})})}function Ww(e,t,n){ha(e,t)&&!1===n?function(e,t){sa(e)?e.dom().classList.remove(t):la(e,t);da(e)}(e,t):n&&fa(e,t)}function Kw(e,t,n){try{e.getDoc().execCommand(t,!1,n)}catch(r){}}function Xw(e,t){e.dom().contentEditable=t?"true":"false"}function Yw(e,t){var n=yt.fromDom(e.getBody());Ww(n,"mce-content-readonly",t),t?(e.selection.controlSelection.hideResizeRect(),e._selectionOverrides.hideFakeCaret(),function(e){k.from(e.selection.getNode()).each(function(e){e.removeAttribute("data-mce-selected")})}(e),e.readonly=!0,Xw(n,!1),function(e){z(ma(e,'*[contenteditable="true"]'),function(e){Tt(e,_z,"true"),Xw(e,!1)})}(n)):(e.readonly=!1,Xw(n,!0),function(e){z(ma(e,"*["+_z+'="true"]'),function(e){pe(e,_z),Xw(e,!0)})}(n),Kw(e,"StyleWithCSS",!1),Kw(e,"enableInlineTableEditing",!1),Kw(e,"enableObjectResizing",!1),sd(e)&&e.focus(),function(e){e.selection.setRng(e.selection.getRng())}(e),e.nodeChanged())}function Gw(e){return!0===e.readonly}function Jw(t){t.parser.addAttributeFilter("contenteditable",function(e){Gw(t)&&z(e,function(e){e.attr(_z,e.attr("contenteditable")),e.attr("contenteditable","false")})}),t.serializer.addAttributeFilter(_z,function(e){Gw(t)&&z(e,function(e){e.attr("contenteditable",e.attr(_z))})}),t.serializer.addTempAttr(_z)}function Qw(e,t,n,r){var o=n[t.get()],i=n[r];try{i.activate()}catch(yN){return void j.console.error("problem while activating editor mode "+r+":",yN)}o.deactivate(),o.editorReadOnly!==i.editorReadOnly&&Yw(e,i.editorReadOnly),t.set(r),hd(e,r)}function Zw(t){var n=Je("design"),r=Je({design:{activate:i,deactivate:i,editorReadOnly:!1},readonly:{activate:i,deactivate:i,editorReadOnly:!0}});return function(e){e.serializer?Jw(e):e.on("PreInit",function(){Jw(e)})}(t),function(t){t.on("ShowCaret",function(e){Gw(t)&&e.preventDefault()}),t.on("ObjectSelected",function(e){Gw(t)&&e.preventDefault()})}(t),{isReadOnly:function(){return Gw(t)},set:function(e){return function(e,t,n,r){if(r!==n.get()){if(!kt(t,r))throw new Error("Editor mode '"+r+"' is invalid");e.initialized?Qw(e,n,t,r):e.on("init",function(){return Qw(e,n,t,r)})}}(t,r.get(),n,e)},get:function(){return n.get()},register:function(e,t){r.set(function(e,t,n){var r;if(h(Bz,t))throw new Error("Cannot override default mode "+t);return G(G({},e),((r={})[t]=G(G({},n),{deactivate:function(){try{n.deactivate()}catch(yN){j.console.error("problem while deactivating editor mode "+t+":",yN)}}}),r))}(r.get(),e,t))}}}function ex(e){return Mn.grep(e.childNodes,function(e){return"LI"===e.nodeName})}function tx(e){return e&&e.firstChild&&e.firstChild===e.lastChild&&function(e){return"\xa0"===e.data||Ge.isBr(e)}(e.firstChild)}function nx(e){return 0<e.length&&function(e){return!e.firstChild||tx(e)}(e[e.length-1])?e.slice(0,-1):e}function rx(e,t){var n=e.getParent(t,e.isBlock);return n&&"LI"===n.nodeName?n:null}function ox(e,t){var n=Ds.after(e),r=rc(t).prev(n);return r?r.toRange():null}function ix(t,e,n){var r=t.parentNode;return Mn.each(e,function(e){r.insertBefore(e,t)}),function(e,t){var n=Ds.before(e),r=rc(t).next(n);return r?r.toRange():null}(t,n)}function ax(e,t){var n=e.selection.getRng(),r=n.startContainer,o=n.startOffset;n.collapsed&&function(e,t){return Ge.isText(e)&&"\xa0"===e.nodeValue[t-1]}(r,o)&&Ge.isText(r)&&(r.insertData(o-1," "),r.deleteData(o,1),n.setStart(r,o),n.setEnd(r,o),e.selection.setRng(n)),e.selection.setContent(t)}function ux(e,t,n){var r,o,i,a,u,s,c,l,f,d,h,m=e.selection,g=e.dom;if(/^ | $/.test(t)&&(t=function(e,t){var n,r;n=e.startContainer,r=e.startOffset;function o(e){return n[e]&&3===n[e].nodeType}return 3===n.nodeType&&(0<r?t=t.replace(/^&nbsp;/," "):o("previousSibling")||(t=t.replace(/^ /,"&nbsp;")),r<n.length?t=t.replace(/&nbsp;(<br>|)$/," "):o("nextSibling")||(t=t.replace(/(&nbsp;| )(<br>|)$/,"&nbsp;"))),t}(m.getRng(),t)),r=e.parser,h=n.merge,o=pl({validate:e.settings.validate},e.schema),d='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;&#x200B;</span>',s={content:t,format:"html",selection:!0,paste:n.paste},(s=e.fire("BeforeSetContent",s)).isDefaultPrevented())e.fire("SetContent",{content:s.content,format:"html",selection:!0,paste:n.paste});else{-1===(t=s.content).indexOf("{$caret}")&&(t+="{$caret}"),t=t.replace(/\{\$caret\}/,d);var p=(l=m.getRng()).startContainer||(l.parentElement?l.parentElement():null),v=e.getBody();p===v&&m.isCollapsed()&&g.isBlock(v.firstChild)&&function(e,t){return t&&!e.schema.getShortEndedElements()[t.nodeName]}(e,v.firstChild)&&g.isEmpty(v.firstChild)&&((l=g.createRng()).setStart(v.firstChild,0),l.setEnd(v.firstChild,0),m.setRng(l)),m.isCollapsed()||(e.selection.setRng(fp(e.selection.getRng())),e.getDoc().execCommand("Delete",!1,null),t=function(e,t){var n,r;return n=e.startContainer,r=e.startOffset,3===n.nodeType&&e.collapsed&&("\xa0"===n.data[r]?(n.deleteData(r,1),/[\u00a0| ]$/.test(t)||(t+=" ")):"\xa0"===n.data[r-1]&&(n.deleteData(r-1,1),/[\u00a0| ]$/.test(t)||(t=" "+t))),t}(e.selection.getRng(),t));var y={context:(i=m.getNode()).nodeName.toLowerCase(),data:n.data,insert:!0};if(u=r.parse(t,y),!0===n.paste&&Oz(e.schema,u)&&Pz(g,i))return l=Hz(o,g,e.selection.getRng(),u),e.selection.setRng(l),void e.fire("SetContent",s);if(function(e){for(var t=e;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")}(u),"mce_marker"===(f=u.lastChild).attr("id"))for(f=(c=f).prev;f;f=f.walk(!0))if(3===f.type||!g.isBlock(f.name)){e.schema.isValidChild(f.parent.name,"span")&&f.parent.insert(c,f,"br"===f.name);break}if(e._selectionOverrides.showBlockCaretContainer(i),y.invalid){for(ax(e,d),i=m.getNode(),a=e.getBody(),9===i.nodeType?i=f=a:f=i;f!==a;)f=(i=f).parentNode;t=i===a?a.innerHTML:g.getOuterHTML(i),t=o.serialize(r.parse(t.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return o.serialize(u)}))),i===a?g.setHTML(a,t):g.setOuterHTML(i,t)}else!function(e,t,n){if("all"===n.getAttribute("data-mce-bogus"))n.parentNode.insertBefore(e.dom.createFragment(t),n);else{var r=n.firstChild,o=n.lastChild;!r||r===o&&"BR"===r.nodeName?e.dom.setHTML(n,t):ax(e,t)}}(e,t=o.serialize(u),i);!function(e,t){var n=e.schema.getTextInlineElements(),r=e.dom;if(t){var o=e.getBody(),i=new Bg(r);Mn.each(r.select("*[data-mce-fragment]"),function(e){for(var t=e.parentNode;t&&t!==o;t=t.parentNode)n[e.nodeName.toLowerCase()]&&i.compare(t,e)&&r.remove(e,!0)})}}(e,h),function(n,e){var t,r,o,i,a,u=n.dom,s=n.selection;if(e){if(n.selection.scrollIntoView(e),t=function(e){for(var t=n.getBody();e&&e!==t;e=e.parentNode)if("false"===n.dom.getContentEditable(e))return e;return null}(e))return u.remove(e),s.select(t);var c=u.createRng();(i=e.previousSibling)&&3===i.nodeType?(c.setStart(i,i.nodeValue.length),Nn.ie||(a=e.nextSibling)&&3===a.nodeType&&(i.appendData(a.data),a.parentNode.removeChild(a))):(c.setStartBefore(e),c.setEndBefore(e));r=u.getParent(e,u.isBlock),u.remove(e),r&&u.isEmpty(r)&&(n.$(r).empty(),c.setStart(r,0),c.setEnd(r,0),Lz(r)||function(e){return!!e.getAttribute("data-mce-fragment")}(r)||!(o=function(e){var t=Ds.fromRangeStart(e);if(t=rc(n.getBody()).next(t))return t.toRange()}(c))?u.add(r,u.create("br",{"data-mce-bogus":"1"})):(c=o,u.remove(r))),s.setRng(c)}}(e,g.get("mce_marker")),function(e){Mn.each(e.getElementsByTagName("*"),function(e){e.removeAttribute("data-mce-fragment")})}(e.getBody()),function(e,t){k.from(e.getParent(t,"td,th")).map(yt.fromDom).each(Cg)}(e.dom,e.selection.getStart()),e.fire("SetContent",s),e.addVisual()}}function sx(e,t){e.getDoc().execCommand(t,!1,null)}function cx(n){return function(t,e){return k.from(e).map(yt.fromDom).filter(xt).bind(function(e){return function(t,n,e){function r(e){return ye(e,t)}return ba(yt.fromDom(e),function(e){return r(e).isSome()},function(e){return ze(yt.fromDom(n),e)}).bind(r)}(n,t,e.dom()).or(function(e,t){return k.from(Xi.DOM.getStyle(t,e,!0))}(n,e.dom()))}).getOr("")}}function lx(e){return Pc.firstPositionIn(e.getBody()).map(function(e){var t=e.container();return Ge.isText(t)?t.parentNode:t})}function fx(t){return k.from(t.selection.getRng()).bind(function(e){return function(e,t){return e.startContainer===t&&0===e.startOffset}(e,t.getBody())?k.none():k.from(t.selection.getStart(!0))})}function dx(e,t){if(/^[0-9\.]+$/.test(t)){var n=parseInt(t,10);if(1<=n&&n<=7){var r=Cf(e),o=wf(e);return o?o[n-1]||t:r[n-1]||t}return t}return t}function hx(e,t){var n=dx(e,t);e.formatter.toggle("fontname",{value:function(e){var t=e.split(/\s*,\s*/);return X(t,function(e){return-1===e.indexOf(" ")||ee(e,'"')||ee(e,"'")?e:"'"+e+"'"}).join(",")}(n)}),e.nodeChanged()}var mx=d(ob,Uu.isAbove,-1),gx=d(ob,Uu.isBelow,1),px=d(ib,-1,mx),vx=d(ib,1,gx),yx=Ge.isContentEditableFalse,bx=Wa,Cx=d(mb,function(e){return e.bottom},function(e,t){return e.y<t}),wx=d(mb,function(e){return e.top},function(e,t){return e.y>t}),xx=d(yb,mx),zx=d(yb,gx),Ex=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,r)}},Nx=function(e,t){return g(Db(e,t),function(e){return e.action()})},Sx=function(t,n){t.on("keydown",function(e){!1===e.isDefaultPrevented()&&function(e,t,n){var r=oe().os;Nx([{keyCode:Ah.RIGHT,action:fb(e,!0)},{keyCode:Ah.LEFT,action:fb(e,!1)},{keyCode:Ah.UP,action:db(e,!1)},{keyCode:Ah.DOWN,action:db(e,!0)},{keyCode:Ah.RIGHT,action:zb(e,!0)},{keyCode:Ah.LEFT,action:zb(e,!1)},{keyCode:Ah.UP,action:Eb(e,!1)},{keyCode:Ah.DOWN,action:Eb(e,!0)},{keyCode:Ah.RIGHT,action:nb.move(e,t,!0)},{keyCode:Ah.LEFT,action:nb.move(e,t,!1)},{keyCode:Ah.RIGHT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:nb.moveNextWord(e,t)},{keyCode:Ah.LEFT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:nb.movePrevWord(e,t)},{keyCode:Ah.UP,action:Rb(e,!1)},{keyCode:Ah.DOWN,action:Rb(e,!0)}],n).each(function(e){n.preventDefault()})}(t,n,e)})},kx=function(e,t){return Bt(e,t)?ba(t,function(e){return In(e)||Un(e)},function(t){return function(e){return ze(t,yt.fromDom(e.dom().parentNode))}}(e)):k.none()},Tx=function(e){e.dom.isEmpty(e.getBody())&&(e.setContent(""),function(e){var t=e.getBody(),n=t.firstChild&&e.dom.isBlock(t.firstChild)?t.firstChild:t;e.selection.setCursorLocation(n,0)}(e))},Ax=function(i,a,u){return Ya(Pc.firstPositionIn(u),Pc.lastPositionIn(u),function(e,t){var n=Ky.normalizePosition(!0,e),r=Ky.normalizePosition(!1,t),o=Ky.normalizePosition(!1,a);return i?Pc.nextPosition(u,o).map(function(e){return e.isEqual(r)&&a.isEqual(n)}).getOr(!1):Pc.prevPosition(u,o).map(function(e){return e.isEqual(n)&&a.isEqual(r)}).getOr(!1)}).getOr(!0)},Mx=function(e,t,n){return n.collapsed?Ob(e,t,n):k.none()},Rx=function(e,t,n,r){return t?Ub(e,r,n):Ub(e,n,r)},Dx=function(t,n){var r=yt.fromDom(t.getBody()),e=Mx(r.dom(),n,t.selection.getRng()).bind(function(e){return Rx(r,n,e.from().block(),e.to().block())});return e.each(function(e){t.selection.setRng(e.toRange())}),e.isSome()},_x=function(e,t){return!e.selection.isCollapsed()&&$b(e)},Bx=d(Kb,!1),Ox=d(Kb,!0),Hx=jf([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),Px=function(e,t){for(;t&&t!==e;){if(Ge.isContentEditableTrue(t)||Ge.isContentEditableFalse(t))return t;t=t.parentNode}return null},Lx=function(e,t){return e.selection.isCollapsed()?eC(e,t):tC(e,t)},Vx=function(e){var t,n=Px(e.getBody(),e.selection.getNode());return Ge.isContentEditableTrue(n)&&e.dom.isBlock(n)&&e.dom.isEmpty(n)&&(t=e.dom.create("br",{"data-mce-bogus":"1"}),e.dom.setHTML(n,""),n.appendChild(t),e.selection.setRng(Ds.before(t).toRange())),!0},Ix=function(e,t){return function(e,t){var n=e.selection.getRng();if(!Ge.isText(n.commonAncestorContainer))return!1;var r=t?Ms.Forwards:Ms.Backwards,o=rc(e.getBody()),i=d(Ts,o.next),a=d(Ts,o.prev),u=t?i:a,s=t?Ph:Lh,c=Ss(r,e.getBody(),n),l=Ky.normalizePosition(t,u(c));if(!l||!As(c,l))return!1;if(s(l))return nC(e,n,c.getNode(),r,t,l);var f=u(l);return!!(f&&s(f)&&As(l,f))&&nC(e,n,c.getNode(),r,t,f)}(e,t)},Fx=function(e,t,n){if(e.selection.isCollapsed()&&function(e){return!1!==e.settings.inline_boundaries}(e)){var r=Ds.fromRangeStart(e.selection.getRng());return iC(e,t,n,r)}return!1},Ux=function(e,t){return!!e.selection.isCollapsed()&&sC(e,t)},jx=jf([{removeTable:["element"]},{emptyCells:["cells"]}]),qx=function(e,t){return hC(t,e).isSome()},$x=function(e,t){return g(fh(t,e),function(e){return"caption"===ie(e)})},Wx=function(e,t){return bg(t),e.selection.setCursorLocation(t.dom(),0),k.some(!0)},Kx=function(e,t){var n=yt.fromDom(e.selection.getStart(!0)),r=ry(e);return e.selection.isCollapsed()&&0===r.length?TC(e,t,n):function(e,t){var n=yt.fromDom(e.getBody()),r=e.selection.getRng(),o=ry(e);return 0!==o.length?CC(e,o):zC(e,n,r,t)}(e,n)},Xx=function(e,t){return!!e.selection.isCollapsed()&&function(t,n){var e=Ds.fromRangeStart(t.selection.getRng());return Pc.fromPosition(n,t.getBody(),e).filter(function(e){return n?_h(e):Bh(e)}).bind(function(e){return k.from(ws(n?0:-1,e))}).map(function(e){return t.selection.select(e),!0}).getOr(!1)}(e,t)},Yx=function(e){return y(X(e.selection.getSelectedBlocks(),yt.fromDom),function(e){return!DC(e)&&!function(e){return Se(e).map(DC).getOr(!1)}(e)&&function(e){return ba(e,function(e){return Ge.isContentEditableTrue(e.dom())||Ge.isContentEditableFalse(e.dom())}).exists(function(e){return Ge.isContentEditableTrue(e.dom())})}(e)})},Gx=d(PC,!1),Jx=d(PC,!0),Qx=d(HC,!1),Zx=d(HC,!0),ez=function(e,t,n){if(e.selection.isCollapsed()&&RC(e)){var r=e.dom,o=e.selection.getRng(),i=Ds.fromRangeStart(o),a=r.getParent(o.startContainer,r.isBlock);if(null!==a&&Gx(yt.fromDom(a),i))return _C(e,"outdent"),!0}return!1},tz=function(t,n){t.on("keydown",function(e){!1===e.isDefaultPrevented()&&function(e,t,n){Nx([{keyCode:Ah.BACKSPACE,action:Ex(ez,e,!1)},{keyCode:Ah.BACKSPACE,action:Ex(Lx,e,!1)},{keyCode:Ah.DELETE,action:Ex(Lx,e,!0)},{keyCode:Ah.BACKSPACE,action:Ex(Ix,e,!1)},{keyCode:Ah.DELETE,action:Ex(Ix,e,!0)},{keyCode:Ah.BACKSPACE,action:Ex(Fx,e,t,!1)},{keyCode:Ah.DELETE,action:Ex(Fx,e,t,!0)},{keyCode:Ah.BACKSPACE,action:Ex(Kx,e,!1)},{keyCode:Ah.DELETE,action:Ex(Kx,e,!0)},{keyCode:Ah.BACKSPACE,action:Ex(Xx,e,!1)},{keyCode:Ah.DELETE,action:Ex(Xx,e,!0)},{keyCode:Ah.BACKSPACE,action:Ex(_x,e,!1)},{keyCode:Ah.DELETE,action:Ex(_x,e,!0)},{keyCode:Ah.BACKSPACE,action:Ex(Dx,e,!1)},{keyCode:Ah.DELETE,action:Ex(Dx,e,!0)},{keyCode:Ah.BACKSPACE,action:Ex(Ux,e,!1)},{keyCode:Ah.DELETE,action:Ex(Ux,e,!0)}],n).each(function(e){n.preventDefault()})}(t,n,e)}),t.on("keyup",function(e){!1===e.isDefaultPrevented()&&function(e,t){Nx([{keyCode:Ah.BACKSPACE,action:Ex(Vx,e)},{keyCode:Ah.DELETE,action:Ex(Vx,e)}],t)}(t,e)})},nz=function(e,t){var n,r,o=t,i=e.dom,a=e.schema.getMoveCaretBeforeOnEnterElements();if(t){if(/^(LI|DT|DD)$/.test(t.nodeName)){var u=function(e){for(;e;){if(1===e.nodeType||3===e.nodeType&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}}(t.firstChild);u&&/^(UL|OL|DL)$/.test(u.nodeName)&&t.insertBefore(i.doc.createTextNode("\xa0"),t.firstChild)}if(r=i.createRng(),t.normalize(),t.hasChildNodes()){for(var s=new yi(t,t);n=s.current();){if(Ge.isText(n)){r.setStart(n,0),r.setEnd(n,0);break}if(a[n.nodeName.toLowerCase()]){r.setStartBefore(n),r.setEndBefore(n);break}o=n,n=s.next()}n||(r.setStart(o,0),r.setEnd(o,0))}else Ge.isBr(t)?t.nextSibling&&i.isBlock(t.nextSibling)?(r.setStartBefore(t),r.setEndBefore(t)):(r.setStartAfter(t),r.setEndAfter(t)):(r.setStart(t,0),r.setEnd(t,0));e.selection.setRng(r),e.selection.scrollIntoView(t)}},rz=function(e,t){var n,r,o=e.getRoot();for(n=t;n!==o&&"false"!==e.getContentEditable(n);)"true"===e.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},oz=LC,iz=function(e){return LC(e).fold($(""),function(e){return e.nodeName.toUpperCase()})},az=function(e){return LC(e).filter(function(e){return Un(yt.fromDom(e))}).isSome()},uz=function(e,t,n,r,o){var i=e.dom,a=e.selection.getRng();if(n!==e.getBody()){!function(e){return IC(e)&&IC(e.parentNode)}(n)||(o="LI");var u=o?t(o):i.create("BR");if(UC(n,r,!0)&&UC(n,r,!1))VC(n,"LI")?i.insertAfter(u,FC(n)):i.replace(u,n);else if(UC(n,r,!0))VC(n,"LI")?(i.insertAfter(u,FC(n)),u.appendChild(i.doc.createTextNode(" ")),u.appendChild(n)):n.parentNode.insertBefore(u,n);else if(UC(n,r,!1))i.insertAfter(u,FC(n));else{n=FC(n);var s=a.cloneRange();s.setStartAfter(r),s.setEndAfter(n);var c=s.extractContents();"LI"===o&&function(e,t){return e.firstChild&&e.firstChild.nodeName===t}(c,"LI")?(u=c.firstChild,i.insertAfter(c,n)):(i.insertAfter(c,n),i.insertAfter(u,n))}i.remove(r),nz(e,u)}},sz=function(a,e){function t(e){var t,n,r,o=s,i=b.getTextInlineElements();if(e||"TABLE"===m||"HR"===m?(t=y.create(e||p),XC(a,t)):t=c.cloneNode(!1),r=t,!1===yf(a))y.setAttrib(t,"style",null),y.setAttrib(t,"class",null);else do{if(i[o.nodeName]){if(rs(o)||Fc(o))continue;n=o.cloneNode(!1),y.setAttrib(n,"id",""),t.hasChildNodes()?n.appendChild(t.firstChild):r=n,t.appendChild(n)}}while((o=o.parentNode)&&o!==u);return jC(r),t}function n(e){var t,n,r=WC(e,s,i);if(Ge.isText(s)&&(e?0<r:r<s.nodeValue.length))return!1;if(s.parentNode===c&&v&&!e)return!0;if(e&&Ge.isElement(s)&&s===c.firstChild)return!0;if(qC(s,"TABLE")||qC(s,"HR"))return v&&!e||!v&&e;var o=new yi(s,c);for(Ge.isText(s)&&(e&&0===r?o.prev():e||r!==s.nodeValue.length||o.next());t=o.current();){if(Ge.isElement(t)){if(!t.getAttribute("data-mce-bogus")&&(n=t.nodeName.toLowerCase(),C[n]&&"br"!==n))return!1}else if(Ge.isText(t)&&!/^[ \t\r\n]*$/.test(t.nodeValue))return!1;e?o.prev():o.next()}return!0}function r(){f=/^(H[1-6]|PRE|FIGURE)$/.test(m)&&"HGROUP"!==g?t(p):t(),bf(a)&&$C(y,h)&&y.isEmpty(c)?f=y.split(h,c):y.insertAfter(f,c),nz(a,f)}var o,u,s,i,c,l,f,d,h,m,g,p,v,y=a.dom,b=a.schema,C=b.getNonEmptyElements(),w=a.selection.getRng();ay(y,w).each(function(e){w.setStart(e.startContainer,e.startOffset),w.setEnd(e.endContainer,e.endOffset)}),s=w.startContainer,i=w.startOffset,p=mf(a),l=!(!e||!e.shiftKey);var x=!(!e||!e.ctrlKey);Ge.isElement(s)&&s.hasChildNodes()&&(v=i>s.childNodes.length-1,s=s.childNodes[Math.min(i,s.childNodes.length-1)]||s,i=v&&Ge.isText(s)?s.nodeValue.length:0),(u=KC(y,s))&&((p&&!l||!p&&l)&&(s=function(e,t,n,r,o){var i,a,u,s,c,l,f=t||"P",d=e.dom,h=KC(d,r);if(!(a=d.getParent(r,d.isBlock))||!$C(d,a)){if(l=(a=a||h)===e.getBody()||function(e){return e&&/^(TD|TH|CAPTION)$/.test(e.nodeName)}(a)?a.nodeName.toLowerCase():a.parentNode.nodeName.toLowerCase(),!a.hasChildNodes())return i=d.create(f),XC(e,i),a.appendChild(i),n.setStart(i,0),n.setEnd(i,0),i;for(s=r;s.parentNode!==a;)s=s.parentNode;for(;s&&!d.isBlock(s);)s=(u=s).previousSibling;if(u&&e.schema.isValidChild(l,f.toLowerCase())){for(i=d.create(f),XC(e,i),u.parentNode.insertBefore(i,u),s=u;s&&!d.isBlock(s);)c=s.nextSibling,i.appendChild(s),s=c;n.setStart(r,o),n.setEnd(r,o)}}return r}(a,p,w,s,i)),c=y.getParent(s,y.isBlock),h=c?y.getParent(c.parentNode,y.isBlock):null,m=c?c.nodeName.toUpperCase():"","LI"!==(g=h?h.nodeName.toUpperCase():"")||x||(h=(c=h).parentNode,m=g),/^(LI|DT|DD)$/.test(m)&&y.isEmpty(c)?uz(a,t,h,c,p):p&&c===a.getBody()||(p=p||"P",Ma(c)?(f=Pa(c),y.isEmpty(c)&&jC(c),nz(a,f)):n()?r():n(!0)?(f=c.parentNode.insertBefore(t(),c),nz(a,qC(c,"HR")?f:c)):((o=function(e){var t=e.cloneRange();return t.setStart(e.startContainer,WC(!0,e.startContainer,e.startOffset)),t.setEnd(e.endContainer,WC(!1,e.endContainer,e.endOffset)),t}(w).cloneRange()).setEndAfter(c),function(e){z(pa(yt.fromDom(e),zt),function(e){var t=e.dom();t.nodeValue=lu(t.nodeValue)})}(d=o.extractContents()),function(e){for(;Ge.isText(e)&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild;);}(d),f=d.firstChild,y.insertAfter(d,c),function(e,t,n){var r,o=n,i=[];if(o){for(;o=o.firstChild;){if(e.isBlock(o))return;Ge.isElement(o)&&!t[o.nodeName.toLowerCase()]&&i.push(o)}for(r=i.length;r--;)!(o=i[r]).hasChildNodes()||o.firstChild===o.lastChild&&""===o.firstChild.nodeValue?e.remove(o):(a=e,(u=o)&&"A"===u.nodeName&&a.isEmpty(u)&&e.remove(o));var a,u}}(y,C,f),function(e,t){var n;t.normalize(),(n=t.lastChild)&&!/^(left|right)$/gi.test(e.getStyle(n,"float",!0))||e.add(t,"br")}(y,c),y.isEmpty(c)&&jC(c),f.normalize(),y.isEmpty(f)?(y.remove(f),r()):nz(a,f)),y.setAttrib(f,"id",""),a.fire("NewBlock",{newBlock:f})))},cz=function(e,t){return!!function(e){return Ge.isBr(e.getNode())}(Ds.after(t))||Pc.nextPosition(e,Ds.after(t)).map(function(e){return Ge.isBr(e.getNode())}).getOr(!1)},lz=function(e,t){var n=function(e){var t=d(Ky.isInlineTarget,e),n=Ds.fromRangeStart(e.selection.getRng());return Jy(t,e.getBody(),n).filter(tw)}(e);n.isSome()?n.each(d(nw,e)):JC(e,t)},fz=function(e){return rw(e,pf(e))},dz=function(e){return rw(e,vf(e))},hz=jf([{br:[]},{block:[]},{none:[]}]),mz=function(e,t){return Xy([hw([ow],hz.none()),hw([uw("summary",!0)],hz.br()),hw([sw(!0),cw(!1),fw],hz.br()),hw([sw(!0),cw(!1)],hz.block()),hw([sw(!0),cw(!0),fw],hz.block()),hw([sw(!0),cw(!0)],hz.br()),hw([aw(!0),fw],hz.br()),hw([aw(!0)],hz.block()),hw([iw(!0),fw,dw],hz.block()),hw([iw(!0)],hz.br()),hw([lw],hz.br()),hw([iw(!1),fw],hz.br()),hw([dw],hz.block())],[e,!(!t||!t.shiftKey)]).getOr(hz.none())},gz=function(e,t){mz(e,t).fold(function(){lz(e,t)},function(){sz(e,t)},i)},pz=function(t){t.on("keydown",function(e){e.keyCode===Ah.ENTER&&function(e,t){t.isDefaultPrevented()||(t.preventDefault(),function(e){e.typing&&(e.typing=!1,e.add())}(e.undoManager),e.undoManager.transact(function(){!1===e.selection.isCollapsed()&&e.execCommand("Delete"),gz(e,t)}))}(t,e)})},vz=d(mw,"\xa0"),yz=d(mw," "),bz=function(t){t.on("keydown",function(e){!1===e.isDefaultPrevented()&&function(e,t){Nx([{keyCode:Ah.SPACEBAR,action:Ex(Aw,e)}],t).each(function(e){t.preventDefault()})}(t,e)})},Cz=function(e){e.on("keyup compositionstart",d(Rw,e))},wz=oe().browser,xz=function(t){t.on("keydown",function(e){!1===e.isDefaultPrevented()&&function(e,t){Nx([{keyCode:Ah.END,action:hb(e,!0)},{keyCode:Ah.HOME,action:hb(e,!1)}],t).each(function(e){t.preventDefault()})}(t,e)})},zz=function(e){var t=nb.setupSelectedState(e);Cz(e),Sx(e,t),tz(e,t),pz(e),bz(e),Dw(e),xz(e)},Ez=Xi.DOM,Nz=function(t,e){var n,r,o=t.settings,i=t.getElement(),a=t.getDoc();o.inline||(t.getElement().style.visibility=t.orgVisibility),e||t.inline||(a.open(),a.write(t.iframeHTML),a.close()),t.inline&&(t.on("remove",function(){var e=this.getBody();Ez.removeClass(e,"mce-content-body"),Ez.removeClass(e,"mce-edit-focus"),Ez.setAttrib(e,"contentEditable",null)}),Ez.addClass(i,"mce-content-body"),t.contentDocument=a=j.document,t.contentWindow=j.window,t.bodyElement=i,t.contentAreaContainer=i,o.root_name=i.nodeName.toLowerCase()),(n=t.getBody()).disabled=!0,t.readonly=o.readonly,t.readonly||(t.inline&&"static"===Ez.getStyle(n,"position",!0)&&(n.style.position="relative"),n.contentEditable=t.getParam("content_editable_state",!0)),n.disabled=!1,t.editorUpload=th(t),t.schema=pr(o),t.dom=Xi(a,{keep_values:!0,url_converter:t.convertURL,url_converter_scope:t,hex_colors:o.force_hex_style_colors,update_styles:!0,root_element:t.inline?t.getBody():null,collect:function(){return t.inline},schema:t.schema,contentCssCors:Df(t),referrerPolicy:_f(t),onSetAttrib:function(e){t.fire("SetAttrib",e)}}),t.parser=function(u){var e=Np(u.settings,u.schema);return e.addAttributeFilter("src,href,style,tabindex",function(e,t){for(var n,r,o,i=e.length,a=u.dom;i--;)if(r=(n=e[i]).attr(t),o="data-mce-"+t,!n.attr(o)){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(o,r),n.attr(t,r)):"tabindex"===t?(n.attr(o,r),n.attr(t,null)):n.attr(o,u.convertURL(r,t,n.name))}}),e.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)}),e.addNodeFilter("#cdata",function(e){for(var t,n=e.length;n--;)(t=e[n]).type=8,t.name="#comment",t.value="[CDATA["+t.value+"]]"}),e.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var t,n=e.length,r=u.schema.getNonEmptyElements();n--;)(t=e[n]).isEmpty(r)&&0===t.getAll("br").length&&(t.append(new ul("br",1)).shortEnded=!0)}),e}(t),t.serializer=Ap(o,t),t.selection=ly(t.dom,t.getWin(),t.serializer,t),t.annotator=nl(t),t.formatter=Cp(t),t.undoManager=mm(t),t._nodeChangeDispatcher=new ph(t),t._selectionOverrides=om(t),Hw(t),Ow(t),zz(t),dh(t),t.fire("PreInit"),o.browser_spellcheck||o.gecko_spellcheck||(a.body.spellcheck=!1,Ez.setAttrib(n,"spellcheck","false")),t.quirks=_w(t),t.fire("PostRender");var u=Vf(t);u!==undefined&&(n.dir=u),o.protect&&t.on("BeforeSetContent",function(t){Mn.each(o.protect,function(e){t.content=t.content.replace(e,function(e){return"\x3c!--mce:protected "+escape(e)+"--\x3e"})})}),t.on("SetContent",function(){t.addVisual(t.getBody())}),t.load({initial:!0,format:"html"}),t.startContent=t.getContent({format:"raw"}),t.on("compositionstart compositionend",function(e){t.composing="compositionstart"===e.type}),0<t.contentStyles.length&&(r="",Mn.each(t.contentStyles,function(e){r+=e+"\r\n"}),t.dom.addStyle(r)),function(e){return e.inline?Ez.styleSheetLoader:e.dom.styleSheetLoader}(t).loadAll(t.contentCSS,function(e){Pw(t)},function(e){Pw(t)}),o.content_style&&function(e,t){var n=yt.fromDom(e.getDoc().head),r=yt.fromTag("style");Tt(r,"type","text/css"),Di(r,yt.fromText(t)),Di(n,r)}(t,o.content_style)},Sz=Xi.DOM,kz=function(e,t){var n=Lw(e,t);t.editorContainer&&(Sz.get(t.editorContainer).style.display=e.orgDisplay,e.hidden=Sz.isHidden(t.editorContainer)),e.getElement().style.display="none",Sz.setAttrib(e.id,"aria-hidden","true"),n||Nz(e)},Tz=Xi.DOM,Az=function(t,n,e){var r=jd.get(e),o=jd.urls[e]||t.documentBaseUrl.replace(/\/$/,"");if(e=Mn.trim(e),r&&-1===Mn.inArray(n,e)){if(Mn.each(jd.dependencies(e),function(e){Az(t,n,e)}),t.plugins[e])return;try{var i=new r(t,o,t.$);(t.plugins[e]=i).init&&(i.init(t,o),n.push(e))}catch(yN){Fd.pluginInitError(t,e,yN)}}},Mz=function(e){e.fire("ScriptsLoaded"),function(n){var e=Mn.trim(n.settings.icons),r=n.ui.registry.getAll().icons,t=G(G({},{"accessibility-check":'<svg width="24" height="24"><path d="M12 2a2 2 0 0 1 2 2 2 2 0 0 1-2 2 2 2 0 0 1-2-2c0-1.1.9-2 2-2zm8 7h-5v12c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-5c0-.6-.4-1-1-1a1 1 0 0 0-1 1v5c0 .6-.4 1-1 1a1 1 0 0 1-1-1V9H4a1 1 0 1 1 0-2h16c.6 0 1 .4 1 1s-.4 1-1 1z" fill-rule="nonzero"/></svg>',"action-next":'<svg width="24" height="24"><path fill-rule="nonzero" d="M5.7 7.3a1 1 0 0 0-1.4 1.4l7.7 7.7 7.7-7.7a1 1 0 1 0-1.4-1.4L12 13.6 5.7 7.3z"/></svg>',"action-prev":'<svg width="24" height="24"><path fill-rule="nonzero" d="M18.3 15.7a1 1 0 0 0 1.4-1.4L12 6.6l-7.7 7.7a1 1 0 0 0 1.4 1.4L12 9.4l6.3 6.3z"/></svg>',"align-center":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm3 4h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 1 1 0-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2zm-3-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2z" fill-rule="evenodd"/></svg>',"align-justify":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2z" fill-rule="evenodd"/></svg>',"align-left":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm0 4h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2z" fill-rule="evenodd"/></svg>',"align-none":'<svg width="24" height="24"><path d="M14.2 5L13 7H5a1 1 0 1 1 0-2h9.2zm4 0h.8a1 1 0 0 1 0 2h-2l1.2-2zm-6.4 4l-1.2 2H5a1 1 0 0 1 0-2h6.8zm4 0H19a1 1 0 0 1 0 2h-4.4l1.2-2zm-6.4 4l-1.2 2H5a1 1 0 0 1 0-2h4.4zm4 0H19a1 1 0 0 1 0 2h-6.8l1.2-2zM7 17l-1.2 2H5a1 1 0 0 1 0-2h2zm4 0h8a1 1 0 0 1 0 2H9.8l1.2-2zm5.2-13.5l1.3.7-9.7 16.3-1.3-.7 9.7-16.3z" fill-rule="evenodd"/></svg>',"align-right":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm6 4h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm-6-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2z" fill-rule="evenodd"/></svg>',"arrow-left":'<svg width="24" height="24"><path d="M5.6 13l12 6a1 1 0 0 0 1.4-1V6a1 1 0 0 0-1.4-.9l-12 6a1 1 0 0 0 0 1.8z" fill-rule="evenodd"/></svg>',"arrow-right":'<svg width="24" height="24"><path d="M18.5 13l-12 6A1 1 0 0 1 5 18V6a1 1 0 0 1 1.4-.9l12 6a1 1 0 0 1 0 1.8z" fill-rule="evenodd"/></svg>',bold:'<svg width="24" height="24"><path d="M7.8 19c-.3 0-.5 0-.6-.2l-.2-.5V5.7c0-.2 0-.4.2-.5l.6-.2h5c1.5 0 2.7.3 3.5 1 .7.6 1.1 1.4 1.1 2.5a3 3 0 0 1-.6 1.9c-.4.6-1 1-1.6 1.2.4.1.9.3 1.3.6s.8.7 1 1.2c.4.4.5 1 .5 1.6 0 1.3-.4 2.3-1.3 3-.8.7-2.1 1-3.8 1H7.8zm5-8.3c.6 0 1.2-.1 1.6-.5.4-.3.6-.7.6-1.3 0-1.1-.8-1.7-2.3-1.7H9.3v3.5h3.4zm.5 6c.7 0 1.3-.1 1.7-.4.4-.4.6-.9.6-1.5s-.2-1-.7-1.4c-.4-.3-1-.4-2-.4H9.4v3.8h4z" fill-rule="evenodd"/></svg>',bookmark:'<svg width="24" height="24"><path d="M6 4v17l6-4 6 4V4c0-.6-.4-1-1-1H7a1 1 0 0 0-1 1z" fill-rule="nonzero"/></svg>',"border-width":'<svg width="24" height="24"><path d="M5 14.8h14a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2zm-.5 3.7h15c.3 0 .5.2.5.5s-.2.5-.5.5h-15a.5.5 0 1 1 0-1zm.5-8.3h14c.6 0 1 .4 1 1v1c0 .5-.4 1-1 1H5a1 1 0 0 1-1-1v-1c0-.6.4-1 1-1zm0-5.7h14c.6 0 1 .4 1 1v2c0 .6-.4 1-1 1H5a1 1 0 0 1-1-1v-2c0-.6.4-1 1-1z" fill-rule="evenodd"/></svg>',brightness:'<svg width="24" height="24"><path d="M12 17c.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7v-1c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3zm0-10a1 1 0 0 1-.7-.3A1 1 0 0 1 11 6V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3zm7 4c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3h-1a1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1zM7 12c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3H5a1 1 0 0 1-.7-.3A1 1 0 0 1 4 12c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1c.3 0 .5.1.7.3.2.2.3.4.3.7zm10 3.5l.7.8c.2.1.3.4.3.6 0 .3-.1.6-.3.8a1 1 0 0 1-.8.3 1 1 0 0 1-.6-.3l-.8-.7a1 1 0 0 1-.3-.8c0-.2.1-.5.3-.7a1 1 0 0 1 1.4 0zm-10-7l-.7-.8a1 1 0 0 1-.3-.6c0-.3.1-.6.3-.8.2-.2.5-.3.8-.3.2 0 .5.1.7.3l.7.7c.2.2.3.5.3.8 0 .2-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.8-.3zm10 0a1 1 0 0 1-.8.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.3.1-.6.3-.8l.8-.7c.1-.2.4-.3.6-.3.3 0 .6.1.8.3.2.2.3.5.3.8 0 .2-.1.5-.3.7l-.7.7zm-10 7c.2-.2.5-.3.8-.3.2 0 .5.1.7.3a1 1 0 0 1 0 1.4l-.8.8a1 1 0 0 1-.6.3 1 1 0 0 1-.8-.3 1 1 0 0 1-.3-.8c0-.2.1-.5.3-.6l.7-.8zM12 8a4 4 0 0 1 3.7 2.4 4 4 0 0 1 0 3.2A4 4 0 0 1 12 16a4 4 0 0 1-3.7-2.4 4 4 0 0 1 0-3.2A4 4 0 0 1 12 8zm0 6.5c.7 0 1.3-.2 1.8-.7.5-.5.7-1.1.7-1.8s-.2-1.3-.7-1.8c-.5-.5-1.1-.7-1.8-.7s-1.3.2-1.8.7c-.5.5-.7 1.1-.7 1.8s.2 1.3.7 1.8c.5.5 1.1.7 1.8.7z" fill-rule="evenodd"/></svg>',browse:'<svg width="24" height="24"><path d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-4v-2h4V8H5v10h4v2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14zm-8 9.4l-2.3 2.3a1 1 0 1 1-1.4-1.4l4-4a1 1 0 0 1 1.4 0l4 4a1 1 0 0 1-1.4 1.4L13 13.4V20a1 1 0 0 1-2 0v-6.6z" fill-rule="nonzero"/></svg>',cancel:'<svg width="24" height="24"><path d="M12 4.6a7.4 7.4 0 1 1 0 14.8 7.4 7.4 0 0 1 0-14.8zM12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18zm0 8L14.8 8l1 1.1-2.7 2.8 2.7 2.7-1.1 1.1-2.7-2.7-2.7 2.7-1-1.1 2.6-2.7-2.7-2.7 1-1.1 2.8 2.7z" fill-rule="nonzero"/></svg>',"change-case":'<svg width="24" height="24"><path d="M18.4 18.2v-.6c-.5.8-1.3 1.2-2.4 1.2-2.2 0-3.3-1.6-3.3-4.8 0-3.1 1-4.7 3.3-4.7 1.1 0 1.8.3 2.4 1.1v-.6c0-.5.4-.8.8-.8s.8.3.8.8v8.4c0 .5-.4.8-.8.8a.8.8 0 0 1-.8-.8zm-2-7.4c-1.3 0-1.8.9-1.8 3.2 0 2.4.5 3.3 1.7 3.3 1.3 0 1.8-.9 1.8-3.2 0-2.4-.5-3.3-1.7-3.3zM10 15.7H5.5l-.8 2.6a1 1 0 0 1-1 .7h-.2a.7.7 0 0 1-.7-1l4-12a1 1 0 1 1 2 0l4 12a.7.7 0 0 1-.8 1h-.2a1 1 0 0 1-1-.7l-.8-2.6zm-.3-1.5l-2-6.5-1.9 6.5h3.9z" fill-rule="evenodd"/></svg>',"character-count":'<svg width="24" height="24"><path d="M4 11.5h16v1H4v-1zm4.8-6.8V10H7.7V5.8h-1v-1h2zM11 8.3V9h2v1h-3V7.7l2-1v-.9h-2v-1h3v2.4l-2 1zm6.3-3.4V10h-3.1V9h2.1V8h-2.1V6.8h2.1v-1h-2.1v-1h3.1zM5.8 16.4c0-.5.2-.8.5-1 .2-.2.6-.3 1.2-.3l.8.1c.2 0 .4.2.5.3l.4.4v2.8l.2.3H8.2v-.1-.2l-.6.3H7c-.4 0-.7 0-1-.2a1 1 0 0 1-.3-.9c0-.3 0-.6.3-.8.3-.2.7-.4 1.2-.4l.6-.2h.3v-.2l-.1-.2a.8.8 0 0 0-.5-.1 1 1 0 0 0-.4 0l-.3.4h-1zm2.3.8h-.2l-.2.1-.4.1a1 1 0 0 0-.4.2l-.2.2.1.3.5.1h.4l.4-.4v-.6zm2-3.4h1.2v1.7l.5-.3h.5c.5 0 .9.1 1.2.5.3.4.5.8.5 1.4 0 .6-.2 1.1-.5 1.5-.3.4-.7.6-1.3.6l-.6-.1-.4-.4v.4h-1.1v-5.4zm1.1 3.3c0 .3 0 .6.2.8a.7.7 0 0 0 1.2 0l.2-.8c0-.4 0-.6-.2-.8a.7.7 0 0 0-.6-.3l-.6.3-.2.8zm6.1-.5c0-.2 0-.3-.2-.4a.8.8 0 0 0-.5-.2c-.3 0-.5.1-.6.3l-.2.9c0 .3 0 .6.2.8.1.2.3.3.6.3.2 0 .4 0 .5-.2l.2-.4h1.1c0 .5-.3.8-.6 1.1a2 2 0 0 1-1.3.4c-.5 0-1-.2-1.3-.6a2 2 0 0 1-.5-1.4c0-.6.1-1.1.5-1.5.3-.4.8-.5 1.4-.5.5 0 1 0 1.2.3.4.3.5.7.5 1.2h-1v-.1z" fill-rule="evenodd"/></svg>',"checklist-rtl":'<svg width="24" height="24"><path d="M5 17h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm14.2 11c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 8c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',checklist:'<svg width="24" height="24"><path d="M11 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0-6h8a1 1 0 0 1 0 2h-8a1 1 0 0 1 0-2zM7.2 16c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 8c-.2.3-.7.4-1 0L3.8 6.9a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',checkmark:'<svg width="24" height="24"><path d="M18.2 5.4a1 1 0 0 1 1.6 1.2l-8 12a1 1 0 0 1-1.5.1l-5-5a1 1 0 1 1 1.4-1.4l4.1 4.1 7.4-11z" fill-rule="nonzero"/></svg>',"chevron-down":'<svg width="10" height="10"><path d="M8.7 2.2c.3-.3.8-.3 1 0 .4.4.4.9 0 1.2L5.7 7.8c-.3.3-.9.3-1.2 0L.2 3.4a.8.8 0 0 1 0-1.2c.3-.3.8-.3 1.1 0L5 6l3.7-3.8z" fill-rule="nonzero"/></svg>',"chevron-left":'<svg width="10" height="10"><path d="M7.8 1.3L4 5l3.8 3.7c.3.3.3.8 0 1-.4.4-.9.4-1.2 0L2.2 5.7a.8.8 0 0 1 0-1.2L6.6.2C7 0 7.4 0 7.8.2c.3.3.3.8 0 1.1z" fill-rule="nonzero"/></svg>',"chevron-right":'<svg width="10" height="10"><path d="M2.2 1.3a.8.8 0 0 1 0-1c.4-.4.9-.4 1.2 0l4.4 4.1c.3.4.3.9 0 1.2L3.4 9.8c-.3.3-.8.3-1.2 0a.8.8 0 0 1 0-1.1L6 5 2.2 1.3z" fill-rule="nonzero"/></svg>',"chevron-up":'<svg width="10" height="10"><path d="M8.7 7.8L5 4 1.3 7.8c-.3.3-.8.3-1 0a.8.8 0 0 1 0-1.2l4.1-4.4c.3-.3.9-.3 1.2 0l4.2 4.4c.3.3.3.9 0 1.2-.3.3-.8.3-1.1 0z" fill-rule="nonzero"/></svg>',close:'<svg width="24" height="24"><path d="M17.3 8.2L13.4 12l3.9 3.8a1 1 0 0 1-1.5 1.5L12 13.4l-3.8 3.9a1 1 0 0 1-1.5-1.5l3.9-3.8-3.9-3.8a1 1 0 0 1 1.5-1.5l3.8 3.9 3.8-3.9a1 1 0 0 1 1.5 1.5z" fill-rule="evenodd"/></svg>',"code-sample":'<svg width="24" height="26"><path d="M7.1 11a2.8 2.8 0 0 1-.8 2 2.8 2.8 0 0 1 .8 2v1.7c0 .3.1.6.4.8.2.3.5.4.8.4.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.7 0-1.4-.3-2-.8-.5-.6-.8-1.3-.8-2V15c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 0 1-.4-.4v-.8c0-.2.2-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V9.3c0-.7.3-1.4.8-2 .6-.5 1.3-.8 2-.8.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8V11zm9.8 0V9.3c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 0 1-.4-.4V7c0-.2.1-.4.4-.4.7 0 1.4.3 2 .8.5.6.8 1.3.8 2V11c0 .3.1.6.4.8.2.3.5.4.8.4.2 0 .4.2.4.4v.8c0 .2-.2.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8v1.7c0 .7-.3 1.4-.8 2-.6.5-1.3.8-2 .8a.4.4 0 0 1-.4-.4v-.8c0-.2.1-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V15a2.8 2.8 0 0 1 .8-2 2.8 2.8 0 0 1-.8-2zm-3.3-.4c0 .4-.1.8-.5 1.1-.3.3-.7.5-1.1.5-.4 0-.8-.2-1.1-.5-.4-.3-.5-.7-.5-1.1 0-.5.1-.9.5-1.2.3-.3.7-.4 1.1-.4.4 0 .8.1 1.1.4.4.3.5.7.5 1.2zM12 13c.4 0 .8.1 1.1.5.4.3.5.7.5 1.1 0 1-.1 1.6-.5 2a3 3 0 0 1-1.1 1c-.4.3-.8.4-1.1.4a.5.5 0 0 1-.5-.5V17a3 3 0 0 0 1-.2l.6-.6c-.6 0-1-.2-1.3-.5-.2-.3-.3-.7-.3-1 0-.5.1-1 .5-1.2.3-.4.7-.5 1.1-.5z" fill-rule="evenodd"/></svg>',"color-levels":'<svg width="24" height="24"><path d="M17.5 11.4A9 9 0 0 1 18 14c0 .5 0 1-.2 1.4 0 .4-.3.9-.5 1.3a6.2 6.2 0 0 1-3.7 3 5.7 5.7 0 0 1-3.2 0A5.9 5.9 0 0 1 7.6 18a6.2 6.2 0 0 1-1.4-2.6 6.7 6.7 0 0 1 0-2.8c0-.4.1-.9.3-1.3a13.6 13.6 0 0 1 2.3-4A20 20 0 0 1 12 4a26.4 26.4 0 0 1 3.2 3.4 18.2 18.2 0 0 1 2.3 4zm-2 4.5c.4-.7.5-1.4.5-2a7.3 7.3 0 0 0-1-3.2c.2.6.2 1.2.2 1.9a4.5 4.5 0 0 1-1.3 3 5.3 5.3 0 0 1-2.3 1.5 4.9 4.9 0 0 1-2 .1 4.3 4.3 0 0 0 2.4.8 4 4 0 0 0 2-.6 4 4 0 0 0 1.5-1.5z" fill-rule="evenodd"/></svg>',"color-picker":'<svg width="24" height="24"><path d="M12 3a9 9 0 0 0 0 18 1.5 1.5 0 0 0 1.1-2.5c-.2-.3-.4-.6-.4-1 0-.8.7-1.5 1.5-1.5H16a5 5 0 0 0 5-5c0-4.4-4-8-9-8zm-5.5 9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm3-4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm3 4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z" fill-rule="nonzero"/></svg>',"color-swatch-remove-color":'<svg width="24" height="24"><path stroke="#000" stroke-width="2" d="M21 3L3 21" fill-rule="evenodd"/></svg>',"color-swatch":'<svg width="24" height="24"><rect x="3" y="3" width="18" height="18" rx="1" fill-rule="evenodd"/></svg>',"comment-add":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9 19l3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 0 0-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3h-6.4L7 23z"/><path d="M13 10h2a1 1 0 0 1 0 2h-2v2a1 1 0 0 1-2 0v-2H9a1 1 0 0 1 0-2h2V8a1 1 0 0 1 2 0v2z"/></g></svg>',comment:'<svg width="24" height="24"><path fill-rule="nonzero" d="M9 19l3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 0 0-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3h-6.4L7 23z"/></svg>',contrast:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4zm-6 8a6 6 0 0 0 6 6V6a6 6 0 0 0-6 6z" fill-rule="evenodd"/></svg>',copy:'<svg width="24" height="24"><path d="M16 3H6a2 2 0 0 0-2 2v11h2V5h10V3zm1 4a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V9c0-1.2.9-2 2-2h7zm0 12V9h-7v10h7z" fill-rule="nonzero"/></svg>',crop:'<svg width="24" height="24"><path d="M17 8v7h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v2c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-2H7V9H5a1 1 0 1 1 0-2h2V5c0-.6.4-1 1-1s1 .4 1 1v2h7l3-3 1 1-3 3zM9 9v5l5-5H9zm1 6h5v-5l-5 5z" fill-rule="evenodd"/></svg>',cut:'<svg width="24" height="24"><path d="M18 15c.6.7 1 1.4 1 2.3 0 .8-.2 1.5-.7 2l-.8.5-1 .2c-.4 0-.8 0-1.2-.3a3.9 3.9 0 0 1-2.1-2.2c-.2-.5-.3-1-.2-1.5l-1-1-1 1c0 .5 0 1-.2 1.5-.1.5-.4 1-.9 1.4-.3.4-.7.6-1.2.8l-1.2.3c-.4 0-.7 0-1-.2-.3 0-.6-.3-.8-.5-.5-.5-.8-1.2-.7-2 0-.9.4-1.6 1-2.2A3.7 3.7 0 0 1 8.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 0 1 0-2c0-.4.3-.7.5-1l6 6 6-6 .5 1a3.3 3.3 0 0 1 0 2c0 .4-.3.7-.5 1l-4 4 1 1h.5c.4 0 .8 0 1.2.3.5.2.9.4 1.2.8zm-8.5 2.2l.1-.4v-.3-.4a1 1 0 0 0-.2-.5 1 1 0 0 0-.4-.2 1.6 1.6 0 0 0-.8 0 2.6 2.6 0 0 0-.8.3 2.5 2.5 0 0 0-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 0 0 .8-.3 2.8 2.8 0 0 0 1-1zm2.5-2.8c.4 0 .7-.1 1-.4.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4s-.7.1-1 .4c-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4zm5.4 4l.2-.5v-.4-.3a2.6 2.6 0 0 0-.3-.8 2.4 2.4 0 0 0-.7-.7 2.5 2.5 0 0 0-.8-.3 1.5 1.5 0 0 0-.8 0 1 1 0 0 0-.4.2 1 1 0 0 0-.2.5 1.5 1.5 0 0 0 0 .7v.4l.3.4.3.4a2.8 2.8 0 0 0 .8.5l.4.1h.7l.5-.2z" fill-rule="evenodd"/></svg>',"document-properties":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h10a2 2 0 0 0 2-2V7.6L14.4 3zM17 19H7V5h6v4h4v10z" fill-rule="nonzero"/></svg>',drag:'<svg width="24" height="24"><path d="M13 5h2v2h-2V5zm0 4h2v2h-2V9zM9 9h2v2H9V9zm4 4h2v2h-2v-2zm-4 0h2v2H9v-2zm0 4h2v2H9v-2zm4 0h2v2h-2v-2zM9 5h2v2H9V5z" fill-rule="evenodd"/></svg>',duplicate:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M16 3v2H6v11H4V5c0-1.1.9-2 2-2h10zm3 8h-2V9h-7v10h9a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V9c0-1.2.9-2 2-2h7a2 2 0 0 1 2 2v2z"/><path d="M17 14h1a1 1 0 0 1 0 2h-1v1a1 1 0 0 1-2 0v-1h-1a1 1 0 0 1 0-2h1v-1a1 1 0 0 1 2 0v1z"/></g></svg>',"edit-block":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19.8 8.8l-9.4 9.4c-.2.2-.5.4-.9.4l-5.4 1.2 1.2-5.4.5-.8 9.4-9.4c.7-.7 1.8-.7 2.5 0l2.1 2.1c.7.7.7 1.8 0 2.5zm-2-.2l1-.9v-.3l-2.2-2.2a.3.3 0 0 0-.3 0l-1 1L18 8.5zm-1 1l-2.5-2.4-6 6 2.5 2.5 6-6zm-7 7.1l-2.6-2.4-.3.3-.1.2-.7 3 3.1-.6h.1l.4-.5z"/></svg>',"edit-image":'<svg width="24" height="24"><path d="M18 16h2V7a2 2 0 0 0-2-2H7v2h11v9zM6 17h15a1 1 0 0 1 0 2h-1v1a1 1 0 0 1-2 0v-1H6a2 2 0 0 1-2-2V7H3a1 1 0 1 1 0-2h1V4a1 1 0 1 1 2 0v13zm3-5.3l1.3 2 3-4.7 3.7 6H7l2-3.3z" fill-rule="nonzero"/></svg>',"embed-page":'<svg width="24" height="24"><path d="M19 6V5H5v14h2A13 13 0 0 1 19 6zm0 1.4c-.8.8-1.6 2.4-2.2 4.6H19V7.4zm0 5.6h-2.4c-.4 1.8-.6 3.8-.6 6h3v-6zm-4 6c0-2.2.2-4.2.6-6H13c-.7 1.8-1.1 3.8-1.1 6h3zm-4 0c0-2.2.4-4.2 1-6H9.6A12 12 0 0 0 8 19h3zM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1zm11.8 9c.4-1.9 1-3.4 1.8-4.5a9.2 9.2 0 0 0-4 4.5h2.2zm-3.4 0a12 12 0 0 1 2.8-4 12 12 0 0 0-5 4h2.2z" fill-rule="nonzero"/></svg>',embed:'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1zm1 2v14h14V5H5zm4.8 2.6l5.6 4a.5.5 0 0 1 0 .8l-5.6 4A.5.5 0 0 1 9 16V8a.5.5 0 0 1 .8-.4z" fill-rule="nonzero"/></svg>',emoji:'<svg width="24" height="24"><path d="M9 11c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 0 0-1 1c0 .6.4 1 1 1zm6 0c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 0 0-1 1c0 .6.4 1 1 1zm-3 5.5c2.1 0 4-1.5 4.4-3.5H7.6c.5 2 2.3 3.5 4.4 3.5zM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm0 14.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13z" fill-rule="nonzero"/></svg>',fill:'<svg width="24" height="26"><path d="M16.6 12l-9-9-1.4 1.4 2.4 2.4-5.2 5.1c-.5.6-.5 1.6 0 2.2L9 19.6a1.5 1.5 0 0 0 2.2 0l5.5-5.5c.5-.6.5-1.6 0-2.2zM5.2 13L10 8.2l4.8 4.8H5.2zM19 14.5s-2 2.2-2 3.5c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.3-2-3.5-2-3.5z" fill-rule="nonzero"/></svg>',"flip-horizontally":'<svg width="24" height="24"><path d="M14 19h2v-2h-2v2zm4-8h2V9h-2v2zM4 7v10c0 1.1.9 2 2 2h3v-2H6V7h3V5H6a2 2 0 0 0-2 2zm14-2v2h2a2 2 0 0 0-2-2zm-7 16h2V3h-2v18zm7-6h2v-2h-2v2zm-4-8h2V5h-2v2zm4 12a2 2 0 0 0 2-2h-2v2z" fill-rule="nonzero"/></svg>',"flip-vertically":'<svg width="24" height="24"><path d="M5 14v2h2v-2H5zm8 4v2h2v-2h-2zm4-14H7a2 2 0 0 0-2 2v3h2V6h10v3h2V6a2 2 0 0 0-2-2zm2 14h-2v2a2 2 0 0 0 2-2zM3 11v2h18v-2H3zm6 7v2h2v-2H9zm8-4v2h2v-2h-2zM5 18c0 1.1.9 2 2 2v-2H5z" fill-rule="nonzero"/></svg>',"format-painter":'<svg width="24" height="24"><path d="M18 5V4c0-.5-.4-1-1-1H5a1 1 0 0 0-1 1v4c0 .6.5 1 1 1h12c.6 0 1-.4 1-1V7h1v4H9v9c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-7h8V5h-3z" fill-rule="nonzero"/></svg>',fullscreen:'<svg width="24" height="24"><path d="M15.3 10l-1.2-1.3 2.9-3h-2.3a.9.9 0 1 1 0-1.7H19c.5 0 .9.4.9.9v4.4a.9.9 0 1 1-1.8 0V7l-2.9 3zm0 4l3 3v-2.3a.9.9 0 1 1 1.7 0V19c0 .5-.4.9-.9.9h-4.4a.9.9 0 1 1 0-1.8H17l-3-2.9 1.3-1.2zM10 15.4l-2.9 3h2.3a.9.9 0 1 1 0 1.7H5a.9.9 0 0 1-.9-.9v-4.4a.9.9 0 1 1 1.8 0V17l2.9-3 1.2 1.3zM8.7 10L5.7 7v2.3a.9.9 0 0 1-1.7 0V5c0-.5.4-.9.9-.9h4.4a.9.9 0 0 1 0 1.8H7l3 2.9-1.3 1.2z" fill-rule="nonzero"/></svg>',gallery:'<svg width="24" height="24"><path fill-rule="nonzero" d="M5 15.7l2.3-2.2c.3-.3.7-.3 1 0L11 16l5.1-5c.3-.4.8-.4 1 0l2 1.9V8H5v7.7zM5 18V19h3l1.8-1.9-2-2L5 17.9zm14-3l-2.5-2.4-6.4 6.5H19v-4zM4 6h16c.6 0 1 .4 1 1v13c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V7c0-.6.4-1 1-1zm6 7a2 2 0 1 1 0-4 2 2 0 0 1 0 4zM4.5 4h15a.5.5 0 1 1 0 1h-15a.5.5 0 0 1 0-1zm2-2h11a.5.5 0 1 1 0 1h-11a.5.5 0 0 1 0-1z"/></svg>',gamma:'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1zm1 2v14h14V5H5zm6.5 11.8V14L9.2 8.7a5.1 5.1 0 0 0-.4-.8l-.1-.2H8 8v-1l.3-.1.3-.1h.7a1 1 0 0 1 .6.5l.1.3a8.5 8.5 0 0 1 .3.6l1.9 4.6 2-5.2a1 1 0 0 1 1-.6.5.5 0 0 1 .5.6L13 14v2.8a.7.7 0 0 1-1.4 0z" fill-rule="nonzero"/></svg>',help:'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M12 5.5a6.5 6.5 0 0 0-6 9 6.3 6.3 0 0 0 1.4 2l1 1a6.3 6.3 0 0 0 3.6 1 6.5 6.5 0 0 0 6-9 6.3 6.3 0 0 0-1.4-2l-1-1a6.3 6.3 0 0 0-3.6-1zM12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4z"/><path d="M9.6 9.7a.7.7 0 0 1-.7-.8c0-1.1 1.5-1.8 3.2-1.8 1.8 0 3.2.8 3.2 2.4 0 1.4-.4 2.1-1.5 2.8-.2 0-.3.1-.3.2a2 2 0 0 0-.8.8.8.8 0 0 1-1.4-.6c.3-.7.8-1 1.3-1.5l.4-.2c.7-.4.8-.6.8-1.5 0-.5-.6-.9-1.7-.9-.5 0-1 .1-1.4.3-.2 0-.3.1-.3.2v-.2c0 .4-.4.8-.8.8z" fill-rule="nonzero"/><circle cx="12" cy="16" r="1"/></g></svg>',"highlight-bg-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path id="tox-icon-highlight-bg-color__color" d="M3 18h18v3H3z"/><path fill-rule="nonzero" d="M7.7 16.7H3l3.3-3.3-.7-.8L10.2 8l4 4.1-4 4.2c-.2.2-.6.2-.8 0l-.6-.7-1.1 1.1zm5-7.5L11 7.4l3-2.9a2 2 0 0 1 2.6 0L18 6c.7.7.7 2 0 2.7l-2.9 2.9-1.8-1.8-.5-.6"/></g></svg>',home:'<svg width="24" height="24"><path fill-rule="nonzero" d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>',"horizontal-rule":'<svg width="24" height="24"><path d="M4 11h16v2H4z" fill-rule="evenodd"/></svg>',"image-options":'<svg width="24" height="24"><path d="M6 10a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2zm12 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2zm-6 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2z" fill-rule="nonzero"/></svg>',image:'<svg width="24" height="24"><path d="M5 15.7l3.3-3.2c.3-.3.7-.3 1 0L12 15l4.1-4c.3-.4.8-.4 1 0l2 1.9V5H5v10.7zM5 18V19h3l2.8-2.9-2-2L5 17.9zm14-3l-2.5-2.4-6.4 6.5H19v-4zM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1zm6 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4z" fill-rule="nonzero"/></svg>',indent:'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 1 1 0-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2zm-5 4h12a1 1 0 0 1 0 2H7a1 1 0 0 1 0-2zm-2.6-3.8L6.2 12l-1.8-1.2a1 1 0 0 1 1.2-1.6l3 2a1 1 0 0 1 0 1.6l-3 2a1 1 0 1 1-1.2-1.6z" fill-rule="evenodd"/></svg>',info:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4zm-1 3v2h2V7h-2zm3 10v-1h-1v-5h-3v1h1v4h-1v1h4z" fill-rule="evenodd"/></svg>',"insert-character":'<svg width="24" height="24"><path d="M15 18h4l1-2v4h-6v-3.3l1.4-1a6 6 0 0 0 1.8-2.9 6.3 6.3 0 0 0-.1-4.1 5.8 5.8 0 0 0-3-3.2c-.6-.3-1.3-.5-2.1-.5a5.1 5.1 0 0 0-3.9 1.8 6.3 6.3 0 0 0-1.3 6 6.2 6.2 0 0 0 1.8 3l1.4.9V20H4v-4l1 2h4v-.5l-2-1L5.4 15A6.5 6.5 0 0 1 4 11c0-1 .2-1.9.6-2.7A7 7 0 0 1 6.3 6C7.1 5.4 8 5 9 4.5c1-.3 2-.5 3.1-.5a8.8 8.8 0 0 1 5.7 2 7 7 0 0 1 1.7 2.3 6 6 0 0 1 .2 4.8c-.2.7-.6 1.3-1 1.9a7.6 7.6 0 0 1-3.6 2.5v.5z" fill-rule="evenodd"/></svg>',"insert-time":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M12 19a7 7 0 1 0 0-14 7 7 0 0 0 0 14zm0 2a9 9 0 1 1 0-18 9 9 0 0 1 0 18z"/><path d="M16 12h-3V7c0-.6-.4-1-1-1a1 1 0 0 0-1 1v7h5c.6 0 1-.4 1-1s-.4-1-1-1z"/></g></svg>',invert:'<svg width="24" height="24"><path d="M18 19.3L16.5 18a5.8 5.8 0 0 1-3.1 1.9 6.1 6.1 0 0 1-5.5-1.6A5.8 5.8 0 0 1 6 14v-.3l.1-1.2A13.9 13.9 0 0 1 7.7 9l-3-3 .7-.8 2.8 2.9 9 8.9 1.5 1.6-.7.6zm0-5.5v.3l-.1 1.1-.4 1-1.2-1.2a4.3 4.3 0 0 0 .2-1v-.2c0-.4 0-.8-.2-1.3l-.5-1.4a14.8 14.8 0 0 0-3-4.2L12 6a26.1 26.1 0 0 0-2.2 2.5l-1-1a20.9 20.9 0 0 1 2.9-3.3L12 4l1 .8a22.2 22.2 0 0 1 4 5.4c.6 1.2 1 2.4 1 3.6z" fill-rule="evenodd"/></svg>',italic:'<svg width="24" height="24"><path d="M16.7 4.7l-.1.9h-.3c-.6 0-1 0-1.4.3-.3.3-.4.6-.5 1.1l-2.1 9.8v.6c0 .5.4.8 1.4.8h.2l-.2.8H8l.2-.8h.2c1.1 0 1.8-.5 2-1.5l2-9.8.1-.5c0-.6-.4-.8-1.4-.8h-.3l.2-.9h5.8z" fill-rule="evenodd"/></svg>',line:'<svg width="24" height="24"><path d="M15 9l-8 8H4v-3l8-8 3 3zm1-1l-3-3 1-1h1c-.2 0 0 0 0 0l2 2s0 .2 0 0v1l-1 1zM4 18h16v2H4v-2z" fill-rule="evenodd"/></svg>',link:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 0 1 1.4 1.4l-2.1 2a2 2 0 1 0 2.7 2.8l4.8-4.8a1 1 0 0 0 0-1.4 1 1 0 1 1 1.4-1.3 2.9 2.9 0 0 1 0 4L9.6 20a3.9 3.9 0 0 1-5.5-5.5l2-2zm11.6-.6a1 1 0 0 1-1.4-1.4l2-2a2 2 0 1 0-2.6-2.8L11 10.3a1 1 0 0 0 0 1.4A1 1 0 1 1 9.6 13a2.9 2.9 0 0 1 0-4L14.4 4a3.9 3.9 0 0 1 5.5 5.5l-2 2z" fill-rule="nonzero"/></svg>',"list-bull-circle":'<svg width="48" height="48"><g fill-rule="evenodd"><path d="M11 16a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6zM11 26a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6zM11 36a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6z" fill-rule="nonzero"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-bull-default":'<svg width="48" height="48"><g fill-rule="evenodd"><circle cx="11" cy="14" r="3"/><circle cx="11" cy="24" r="3"/><circle cx="11" cy="34" r="3"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-bull-square":'<svg width="48" height="48"><g fill-rule="evenodd"><path d="M8 11h6v6H8zM8 21h6v6H8zM8 31h6v6H8z"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-num-default-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 17v-4.8l-1.6 1v-1.1l1.6-1h1.2V17zM33.3 17.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm1.7 5.7c0-1.2 1-2 2.2-2 1.3 0 2.1.8 2.1 1.8 0 .7-.3 1.2-1.3 2.2l-1.2 1v.2h2.6v1h-4.3v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H35zm-1.7 4.3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm3.2 7.3v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H35c0-1.1 1-1.8 2.2-1.8 1.2 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.7.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .6 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm-3.3 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',"list-num-default":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10 17v-4.8l-1.5 1v-1.1l1.6-1h1.2V17h-1.2zm3.6.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm-5 5.7c0-1.2.8-2 2.1-2s2.1.8 2.1 1.8c0 .7-.3 1.2-1.4 2.2l-1.1 1v.2h2.6v1H8.6v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H8.5zm6.3 4.3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM10 34.4v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H8.6c0-1.1 1-1.8 2.2-1.8 1.3 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.8.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .7 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm4.7 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',"list-num-lower-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M36.5 16c-.9 0-1.5-.5-1.5-1.3s.6-1.3 1.8-1.4h1v-.4c0-.4-.2-.6-.7-.6-.4 0-.7.1-.8.4h-1.1c0-.8.8-1.4 2-1.4S39 12 39 13V16h-1.2v-.6c-.3.4-.8.7-1.4.7zm.4-.8c.6 0 1-.4 1-.9V14h-1c-.5.1-.7.3-.7.6 0 .4.3.6.7.6zM33.1 16.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zM37.7 26c-.7 0-1.2-.2-1.5-.7v.7H35v-6.3h1.2v2.5c.3-.5.8-.9 1.5-.9 1.1 0 1.8 1 1.8 2.4 0 1.5-.7 2.4-1.8 2.4zm-.5-3.6c-.6 0-1 .5-1 1.3s.4 1.4 1 1.4c.7 0 1-.6 1-1.4 0-.8-.3-1.3-1-1.3zM33.2 26.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm6 7h-1c-.1-.5-.4-.8-1-.8s-1 .5-1 1.4c0 1 .4 1.4 1 1.4.5 0 .9-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm-6.1 3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.3 15.2c.5 0 1-.4 1-.9V14h-1c-.5.1-.8.3-.8.6 0 .4.3.6.8.6zm-.4.9c-1 0-1.5-.6-1.5-1.4 0-.8.6-1.3 1.7-1.4h1.1v-.4c0-.4-.2-.6-.7-.6-.5 0-.8.1-.9.4h-1c0-.8.8-1.4 2-1.4 1.1 0 1.8.6 1.8 1.6V16h-1.1v-.6h-.1c-.2.4-.7.7-1.3.7zm4.6 0c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-3.2 10c-.6 0-1.2-.3-1.4-.8v.7H8.5v-6.3H10v2.5c.3-.5.8-.9 1.4-.9 1.2 0 1.9 1 1.9 2.4 0 1.5-.7 2.4-1.9 2.4zm-.4-3.7c-.7 0-1 .5-1 1.3s.3 1.4 1 1.4c.6 0 1-.6 1-1.4 0-.8-.4-1.3-1-1.3zm4 3.7c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-2.2 7h-1.2c0-.5-.4-.8-.9-.8-.6 0-1 .5-1 1.4 0 1 .4 1.4 1 1.4.5 0 .8-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm1.8 3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-greek-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 16c-1.2 0-2-.8-2-2.3 0-1.5.8-2.4 2-2.4.6 0 1 .4 1.3 1v-.9H40v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1-.7h-.2c-.2.4-.7.8-1.3.8zm.3-1c.6 0 1-.5 1-1.3s-.4-1.3-1-1.3-1 .5-1 1.3.4 1.4 1 1.4zM33.3 16.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM36 21.9c0-1.5.8-2.3 2.1-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.9 1.3.9.3 1.3.8 1.3 1.7 0 1.2-.7 1.9-1.8 1.9-.6 0-1.1-.3-1.4-.8v2.2H36V22zm1.8 1.2v-1h.3c.5 0 .9-.2.9-.7 0-.5-.3-.8-.9-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1 1.3s1-.4 1-1-.4-1-1.2-1h-.3zM33.3 26.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM37.1 34.6L34.8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.2.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2zm.7 1a2 2 0 0 0-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1zM33.3 36.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-greek":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.5 15c.7 0 1-.5 1-1.3s-.3-1.3-1-1.3c-.5 0-.9.5-.9 1.3s.4 1.4 1 1.4zm-.3 1c-1.1 0-1.8-.8-1.8-2.3 0-1.5.7-2.4 1.8-2.4.7 0 1.1.4 1.3 1h.1v-.9h1.2v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1.1-.7h-.1c-.2.4-.7.8-1.4.8zm5 .1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm-4.9 7v-1h.3c.6 0 1-.2 1-.7 0-.5-.4-.8-1-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1.1 1.3.6 0 1-.4 1-1s-.5-1-1.3-1h-.3zM8.6 22c0-1.5.7-2.3 2-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.8 1.3.8.3 1.3.8 1.3 1.7 0 1.2-.8 1.9-1.9 1.9-.6 0-1.1-.3-1.3-.8v2.2H8.5V22zm6.2 4.2c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm-4.5 8.5L8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.1.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2zm.7 1a2 2 0 0 0-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1zm4.5.5c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M32.9 16v-1.2h-1.3V16H33zm0 10v-1.2h-1.3V26H33zm0 10v-1.2h-1.3V36H33z"/><path fill-rule="nonzero" d="M36 21h-1.5v5H36zM36 31h-1.5v5H36zM39 21h-1.5v5H39zM39 31h-1.5v5H39zM42 31h-1.5v5H42zM36 11h-1.5v5H36zM36 19h-1.5v1H36zM36 29h-1.5v1H36zM39 19h-1.5v1H39zM39 29h-1.5v1H39zM42 29h-1.5v1H42zM36 9h-1.5v1H36z"/></g></svg>',"list-num-lower-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 16v-1.2h1.3V16H15zm0 10v-1.2h1.3V26H15zm0 10v-1.2h1.3V36H15z"/><path fill-rule="nonzero" d="M12 21h1.5v5H12zM12 31h1.5v5H12zM9 21h1.5v5H9zM9 31h1.5v5H9zM6 31h1.5v5H6zM12 11h1.5v5H12zM12 19h1.5v1H12zM12 29h1.5v1H12zM9 19h1.5v1H9zM9 29h1.5v1H9zM6 29h1.5v1H6zM12 9h1.5v1H12z"/></g></svg>',"list-num-upper-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M39.3 17l-.5-1.4h-2l-.5 1.4H35l2-6h1.6l2 6h-1.3zm-1.6-4.7l-.7 2.3h1.6l-.8-2.3zM33.4 17c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm4.7 9.9h-2.7v-6H38c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7zm-1.4-5v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1zm0 4h1.1c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9h-1.1V26zM33 27.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm4.9 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2zm-4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-upper-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M12.6 17l-.5-1.4h-2L9.5 17H8.3l2-6H12l2 6h-1.3zM11 12.3l-.7 2.3h1.6l-.8-2.3zm4.7 4.8c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zM11.4 27H8.7v-6h2.6c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7zM10 22v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1zm0 4H11c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9H10V26zm5.4 1.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-4.1 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2zm4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-upper-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M31.6 17v-1.2H33V17h-1.3zm0 10v-1.2H33V27h-1.3zm0 10v-1.2H33V37h-1.3z"/><path fill-rule="nonzero" d="M34.5 20H36v7h-1.5zM34.5 30H36v7h-1.5zM37.5 20H39v7h-1.5zM37.5 30H39v7h-1.5zM40.5 30H42v7h-1.5zM34.5 10H36v7h-1.5z"/></g></svg>',"list-num-upper-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 17v-1.2h1.3V17H15zm0 10v-1.2h1.3V27H15zm0 10v-1.2h1.3V37H15z"/><path fill-rule="nonzero" d="M12 20h1.5v7H12zM12 30h1.5v7H12zM9 20h1.5v7H9zM9 30h1.5v7H9zM6 30h1.5v7H6zM12 10h1.5v7H12z"/></g></svg>',lock:'<svg width="24" height="24"><path d="M16.3 11c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H8V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h.3zM10 8v3h4V8a1 1 0 0 0-.3-.7A1 1 0 0 0 13 7h-2a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7z" fill-rule="evenodd"/></svg>',ltr:'<svg width="24" height="24"><path d="M11 5h7a1 1 0 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 7.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L11 5zM4.4 16.2L6.2 15l-1.8-1.2a1 1 0 0 1 1.2-1.6l3 2a1 1 0 0 1 0 1.6l-3 2a1 1 0 1 1-1.2-1.6z" fill-rule="evenodd"/></svg>',"more-drawer":'<svg width="24" height="24"><path d="M6 10a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2zm12 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2zm-6 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2z" fill-rule="nonzero"/></svg>',"new-document":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h10a2 2 0 0 0 2-2V7.6L14.4 3zM17 19H7V5h6v4h4v10z" fill-rule="nonzero"/></svg>',"new-tab":'<svg width="24" height="24"><path d="M15 13l2-2v8H5V7h8l-2 2H7v8h8v-4zm4-8v5.5l-2-2-5.6 5.5H10v-1.4L15.5 7l-2-2H19z" fill-rule="evenodd"/></svg>',"non-breaking":'<svg width="24" height="24"><path d="M11 11H8a1 1 0 1 1 0-2h3V6c0-.6.4-1 1-1s1 .4 1 1v3h3c.6 0 1 .4 1 1s-.4 1-1 1h-3v3c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-3zm10 4v5H3v-5c0-.6.4-1 1-1s1 .4 1 1v3h14v-3c0-.6.4-1 1-1s1 .4 1 1z" fill-rule="evenodd"/></svg>',notice:'<svg width="24" height="24"><path d="M17.8 9.8L15.4 4 20 8.5v7L15.5 20h-7L4 15.5v-7L8.5 4h7l2.3 5.8zm0 0l2.2 5.7-2.3-5.8zM13 17v-2h-2v2h2zm0-4V7h-2v6h2z" fill-rule="evenodd"/></svg>',"ordered-list-rtl":'<svg width="24" height="24"><path d="M6 17h8a1 1 0 0 1 0 2H6a1 1 0 0 1 0-2zm0-6h8a1 1 0 0 1 0 2H6a1 1 0 0 1 0-2zm0-6h8a1 1 0 0 1 0 2H6a1 1 0 1 1 0-2zm13-1v3.5a.5.5 0 1 1-1 0V5h-.5a.5.5 0 1 1 0-1H19zm-1 8.8l.2.2h1.3a.5.5 0 1 1 0 1h-1.6a1 1 0 0 1-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 0 0-.2-.2h-1.3a.5.5 0 0 1-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3zm2 4.2v2c0 .6-.4 1-1 1h-1.5a.5.5 0 0 1 0-1h1.2a.3.3 0 1 0 0-.6h-1.3a.4.4 0 1 1 0-.8h1.3a.3.3 0 0 0 0-.6h-1.2a.5.5 0 1 1 0-1H19c.6 0 1 .4 1 1z" fill-rule="evenodd"/></svg>',"ordered-list":'<svg width="24" height="24"><path d="M10 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 1 1 0-2zM6 4v3.5c0 .3-.2.5-.5.5a.5.5 0 0 1-.5-.5V5h-.5a.5.5 0 0 1 0-1H6zm-1 8.8l.2.2h1.3c.3 0 .5.2.5.5s-.2.5-.5.5H4.9a1 1 0 0 1-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 0 0-.2-.2H4.5a.5.5 0 0 1-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3zM7 17v2c0 .6-.4 1-1 1H4.5a.5.5 0 0 1 0-1h1.2c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.4a.4.4 0 1 1 0-.8h1.3c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.5a.5.5 0 1 1 0-1H6c.6 0 1 .4 1 1z" fill-rule="evenodd"/></svg>',orientation:'<svg width="24" height="24"><path d="M7.3 6.4L1 13l6.4 6.5 6.5-6.5-6.5-6.5zM3.7 13l3.6-3.7L11 13l-3.7 3.7-3.6-3.7zM12 6l2.8 2.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0L9.2 5.7a.8.8 0 0 1 0-1.2L13.6.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L12 4h1a9 9 0 1 1-4.3 16.9l1.5-1.5A7 7 0 1 0 13 6h-1z" fill-rule="nonzero"/></svg>',outdent:'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 1 1 0-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2zm-5 4h12a1 1 0 0 1 0 2H7a1 1 0 0 1 0-2zm1.6-3.8a1 1 0 0 1-1.2 1.6l-3-2a1 1 0 0 1 0-1.6l3-2a1 1 0 0 1 1.2 1.6L6.8 12l1.8 1.2z" fill-rule="evenodd"/></svg>',"page-break":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M5 11c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1h-1a1 1 0 0 1 0-2zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2zM7 3v5h10V3c0-.6.4-1 1-1s1 .4 1 1v7H5V3c0-.6.4-1 1-1s1 .4 1 1zM6 22a1 1 0 0 1-1-1v-7h14v7c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-5H7v5c0 .6-.4 1-1 1z"/></g></svg>',"paste-text":'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h3V9h9zM9 20H6a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0 1 12 1a3 3 0 0 1 2.8 2H18a2 2 0 0 1 2 2v4h1v12H9v-1zm1.5-9.5v9h9v-9h-9zM12 3a1 1 0 0 0-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1zm0 9h6v2h-.5l-.5-1h-1v4h.8v1h-3.6v-1h.8v-4h-1l-.5 1H12v-2z" fill-rule="nonzero"/></svg>',paste:'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h3V9h9zM9 20H6a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0 1 12 1a3 3 0 0 1 2.8 2H18a2 2 0 0 1 2 2v4h1v12H9v-1zm1.5-9.5v9h9v-9h-9zM12 3a1 1 0 0 0-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1z" fill-rule="nonzero"/></svg>',"permanent-pen":'<svg width="24" height="24"><path d="M10.5 17.5L8 20H3v-3l3.5-3.5a2 2 0 0 1 0-3L14 3l1 1-7.3 7.3a1 1 0 0 0 0 1.4l3.6 3.6c.4.4 1 .4 1.4 0L20 9l1 1-7.6 7.6a2 2 0 0 1-2.8 0l-.1-.1z" fill-rule="nonzero"/></svg>',plus:'<svg width="24" height="24"><g fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke="#000" stroke-width="2"><path d="M12 5v14M5 12h14"/></g></svg>',preferences:'<svg width="24" height="24"><path d="M20.1 13.5l-1.9.2a5.8 5.8 0 0 1-.6 1.5l1.2 1.5c.4.4.3 1 0 1.4l-.7.7a1 1 0 0 1-1.4 0l-1.5-1.2a6.2 6.2 0 0 1-1.5.6l-.2 1.9c0 .5-.5.9-1 .9h-1a1 1 0 0 1-1-.9l-.2-1.9a5.8 5.8 0 0 1-1.5-.6l-1.5 1.2a1 1 0 0 1-1.4 0l-.7-.7a1 1 0 0 1 0-1.4l1.2-1.5a6.2 6.2 0 0 1-.6-1.5l-1.9-.2a1 1 0 0 1-.9-1v-1c0-.5.4-1 .9-1l1.9-.2a5.8 5.8 0 0 1 .6-1.5L5.2 7.3a1 1 0 0 1 0-1.4l.7-.7a1 1 0 0 1 1.4 0l1.5 1.2a6.2 6.2 0 0 1 1.5-.6l.2-1.9c0-.5.5-.9 1-.9h1c.5 0 1 .4 1 .9l.2 1.9a5.8 5.8 0 0 1 1.5.6l1.5-1.2a1 1 0 0 1 1.4 0l.7.7c.3.4.4 1 0 1.4l-1.2 1.5a6.2 6.2 0 0 1 .6 1.5l1.9.2c.5 0 .9.5.9 1v1c0 .5-.4 1-.9 1zM12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z" fill-rule="evenodd"/></svg>',preview:'<svg width="24" height="24"><path d="M3.5 12.5c.5.8 1.1 1.6 1.8 2.3 2 2 4.2 3.2 6.7 3.2s4.7-1.2 6.7-3.2a16.2 16.2 0 0 0 2.1-2.8 15.7 15.7 0 0 0-2.1-2.8c-2-2-4.2-3.2-6.7-3.2a9.3 9.3 0 0 0-6.7 3.2A16.2 16.2 0 0 0 3.2 12c0 .2.2.3.3.5zm-2.4-1l.7-1.2L4 7.8C6.2 5.4 8.9 4 12 4c3 0 5.8 1.4 8.1 3.8a18.2 18.2 0 0 1 2.8 3.7v1l-.7 1.2-2.1 2.5c-2.3 2.4-5 3.8-8.1 3.8-3 0-5.8-1.4-8.1-3.8a18.2 18.2 0 0 1-2.8-3.7 1 1 0 0 1 0-1zm12-3.3a2 2 0 1 0 2.7 2.6 4 4 0 1 1-2.6-2.6z" fill-rule="nonzero"/></svg>',print:'<svg width="24" height="24"><path d="M18 8H6a3 3 0 0 0-3 3v6h2v3h14v-3h2v-6a3 3 0 0 0-3-3zm-1 10H7v-4h10v4zm.5-5c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm.5-8H6v2h12V5z" fill-rule="nonzero"/></svg>',quote:'<svg width="24" height="24"><path d="M7.5 17h.9c.4 0 .7-.2.9-.6L11 13V8c0-.6-.4-1-1-1H6a1 1 0 0 0-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 0 0 .8 1.3zm8 0h.9c.4 0 .7-.2.9-.6L19 13V8c0-.6-.4-1-1-1h-4a1 1 0 0 0-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 0 0 .8 1.3z" fill-rule="nonzero"/></svg>',redo:'<svg width="24" height="24"><path d="M17.6 10H12c-2.8 0-4.4 1.4-4.9 3.5-.4 2 .3 4 1.4 4.6a1 1 0 1 1-1 1.8c-2-1.2-2.9-4.1-2.3-6.8.6-3 3-5.1 6.8-5.1h5.6l-3.3-3.3a1 1 0 1 1 1.4-1.4l5 5a1 1 0 0 1 0 1.4l-5 5a1 1 0 0 1-1.4-1.4l3.3-3.3z" fill-rule="nonzero"/></svg>',reload:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M5 22.1l-1.2-4.7v-.2a1 1 0 0 1 1-1l5 .4a1 1 0 1 1-.2 2l-2.2-.2a7.8 7.8 0 0 0 8.4.2 7.5 7.5 0 0 0 3.5-6.4 1 1 0 1 1 2 0 9.5 9.5 0 0 1-4.5 8 9.9 9.9 0 0 1-10.2 0l.4 1.4a1 1 0 1 1-2 .5zM13.6 7.4c0-.5.5-1 1-.9l2.8.2a8 8 0 0 0-9.5-1 7.5 7.5 0 0 0-3.6 7 1 1 0 0 1-2 0 9.5 9.5 0 0 1 4.5-8.6 10 10 0 0 1 10.9.3l-.3-1a1 1 0 0 1 2-.5l1.1 4.8a1 1 0 0 1-1 1.2l-5-.4a1 1 0 0 1-.9-1z"/></g></svg>',"remove-formatting":'<svg width="24" height="24"><path d="M13.2 6a1 1 0 0 1 0 .2l-2.6 10a1 1 0 0 1-1 .8h-.2a.8.8 0 0 1-.8-1l2.6-10H8a1 1 0 1 1 0-2h9a1 1 0 0 1 0 2h-3.8zM5 18h7a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2zm13 1.5L16.5 18 15 19.5a.7.7 0 0 1-1-1l1.5-1.5-1.5-1.5a.7.7 0 0 1 1-1l1.5 1.5 1.5-1.5a.7.7 0 0 1 1 1L17.5 17l1.5 1.5a.7.7 0 0 1-1 1z" fill-rule="evenodd"/></svg>',remove:'<svg width="24" height="24"><path d="M16 7h3a1 1 0 0 1 0 2h-1v9a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V9H5a1 1 0 1 1 0-2h3V6a3 3 0 0 1 3-3h2a3 3 0 0 1 3 3v1zm-2 0V6c0-.6-.4-1-1-1h-2a1 1 0 0 0-1 1v1h4zm2 2H8v9c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V9zm-7 3a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0v-4zm4 0a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0v-4z" fill-rule="nonzero"/></svg>',"resize-handle":'<svg width="10" height="10"><g fill-rule="nonzero"><path d="M8.1 1.1A.5.5 0 1 1 9 2l-7 7A.5.5 0 1 1 1 8l7-7zM8.1 5.1A.5.5 0 1 1 9 6l-3 3A.5.5 0 1 1 5 8l3-3z"/></g></svg>',resize:'<svg width="24" height="24"><path d="M4 5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h6c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3H7.4L18 16.6V13c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v6c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3h-6a1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3.6L6 7.4V11c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3A1 1 0 0 1 4 11V5z" fill-rule="evenodd"/></svg>',"restore-draft":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M17 13c0 .6-.4 1-1 1h-4V8c0-.6.4-1 1-1s1 .4 1 1v4h2c.6 0 1 .4 1 1z"/><path d="M4.7 10H9a1 1 0 0 1 0 2H3a1 1 0 0 1-1-1V5a1 1 0 1 1 2 0v3l2.5-2.4a9.2 9.2 0 0 1 10.8-1.5A9 9 0 0 1 13.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 1 1 1.3-1.5 7.2 7.2 0 0 0 11.6-3.7 7 7 0 0 0-3.5-7.7A7.2 7.2 0 0 0 8 7L4.7 10z" fill-rule="nonzero"/></g></svg>',"rotate-left":'<svg width="24" height="24"><path d="M4.7 10H9a1 1 0 0 1 0 2H3a1 1 0 0 1-1-1V5a1 1 0 1 1 2 0v3l2.5-2.4a9.2 9.2 0 0 1 10.8-1.5A9 9 0 0 1 13.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 1 1 1.3-1.5 7.2 7.2 0 0 0 11.6-3.7 7 7 0 0 0-3.5-7.7A7.2 7.2 0 0 0 8 7L4.7 10z" fill-rule="nonzero"/></svg>',"rotate-right":'<svg width="24" height="24"><path d="M20 8V5a1 1 0 0 1 2 0v6c0 .6-.4 1-1 1h-6a1 1 0 0 1 0-2h4.3L16 7A7.2 7.2 0 0 0 7.7 6a7 7 0 0 0 3 13.1c1.9.1 3.7-.5 5-1.7a1 1 0 0 1 1.4 1.5A9.2 9.2 0 0 1 2.2 14c-.9-3.9 1-8 4.5-9.9 3.5-1.9 8-1.3 10.8 1.5L20 8z" fill-rule="nonzero"/></svg>',rtl:'<svg width="24" height="24"><path d="M8 5h8v2h-2v12h-2V7h-2v12H8v-7c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 4.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L8 5zm12 11.2a1 1 0 1 1-1 1.6l-3-2a1 1 0 0 1 0-1.6l3-2a1 1 0 1 1 1 1.6L18.4 15l1.8 1.2z" fill-rule="evenodd"/></svg>',save:'<svg width="24" height="24"><path d="M5 16h14a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2zm0 2v2h14v-2H5zm10 0h2v2h-2v-2zm-4-6.4L8.7 9.3a1 1 0 1 0-1.4 1.4l4 4c.4.4 1 .4 1.4 0l4-4a1 1 0 1 0-1.4-1.4L13 11.6V4a1 1 0 0 0-2 0v7.6z" fill-rule="nonzero"/></svg>',search:'<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12z" fill-rule="nonzero"/></svg>',"select-all":'<svg width="24" height="24"><path d="M3 5h2V3a2 2 0 0 0-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2a2 2 0 0 0-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8a2 2 0 0 0 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2zM7 17h10V7H7v10zm2-8h6v6H9V9z" fill-rule="nonzero"/></svg>',selected:'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2zm3.6 10.9L7 12.3a.7.7 0 0 0-1 1L9.6 17 18 8.6a.7.7 0 0 0 0-1 .7.7 0 0 0-1 0l-7.4 7.3z"/></svg>',settings:'<svg width="24" height="24"><path d="M11 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6V8H5a1 1 0 1 1 0-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.5V6zM8 8h2V6H8v2zm9 2.8v.2h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v.3c0 .2 0 .3-.2.5l-.6.2h-2.4c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6V13H5a1 1 0 0 1 0-2h8v-.3c0-.2 0-.3.2-.5l.6-.2h2.4c.3 0 .4 0 .6.2l.2.6zM14 13h2v-2h-2v2zm-3 2.8v.2h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6V18H5a1 1 0 0 1 0-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.6zM8 18h2v-2H8v2z" fill-rule="evenodd"/></svg>',sharpen:'<svg width="24" height="24"><path d="M16 6l4 4-8 9-8-9 4-4h8zm-4 10.2l5.5-6.2-.1-.1H12v-.3h5.1l-.2-.2H12V9h4.6l-.2-.2H12v-.3h4.1l-.2-.2H12V8h3.6l-.2-.2H8.7L6.5 10l.1.1H12v.3H6.9l.2.2H12v.3H7.3l.2.2H12v.3H7.7l.3.2h4v.3H8.2l.2.2H12v.3H8.6l.3.2H12v.3H9l.3.2H12v.3H9.5l.2.2H12v.3h-2l.2.2H12v.3h-1.6l.2.2H12v.3h-1.1l.2.2h.9v.3h-.7l.2.2h.5v.3h-.3l.3.2z" fill-rule="evenodd"/></svg>',sourcecode:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9.8 15.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0l-4.4-4.1a.8.8 0 0 1 0-1.2l4.4-4.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L6 12l3.8 3.7zM14.2 15.7c-.3.3-.3.8 0 1 .4.4.9.4 1.2 0l4.4-4.1c.3-.3.3-.9 0-1.2l-4.4-4.2a.8.8 0 0 0-1.2 0c-.3.3-.3.8 0 1.1L18 12l-3.8 3.7z"/></g></svg>',"spell-check":'<svg width="24" height="24"><path d="M6 8v3H5V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h2c.3 0 .5.1.7.3.2.2.3.4.3.7v6H8V8H6zm0-3v2h2V5H6zm13 0h-3v5h3v1h-3a1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3v1zm-5 1.5l-.1.7c-.1.2-.3.3-.6.3.3 0 .5.1.6.3l.1.7V10c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3h-3V4h3c.3 0 .5.1.7.3.2.2.3.4.3.7v1.5zM13 10V8h-2v2h2zm0-3V5h-2v2h2zm3 5l1 1-6.5 7L7 15.5l1.3-1 2.2 2.2L16 12z" fill-rule="evenodd"/></svg>',"strike-through":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M15.6 8.5c-.5-.7-1-1.1-1.3-1.3-.6-.4-1.3-.6-2-.6-2.7 0-2.8 1.7-2.8 2.1 0 1.6 1.8 2 3.2 2.3 4.4.9 4.6 2.8 4.6 3.9 0 1.4-.7 4.1-5 4.1A6.2 6.2 0 0 1 7 16.4l1.5-1.1c.4.6 1.6 2 3.7 2 1.6 0 2.5-.4 3-1.2.4-.8.3-2-.8-2.6-.7-.4-1.6-.7-2.9-1-1-.2-3.9-.8-3.9-3.6C7.6 6 10.3 5 12.4 5c2.9 0 4.2 1.6 4.7 2.4l-1.5 1.1z"/><path d="M5 11h14a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2z" fill-rule="nonzero"/></g></svg>',subscript:'<svg width="24" height="24"><path d="M10.4 10l4.6 4.6-1.4 1.4L9 11.4 4.4 16 3 14.6 7.6 10 3 5.4 4.4 4 9 8.6 13.6 4 15 5.4 10.4 10zM21 19h-5v-1l1-.8 1.7-1.6c.3-.4.5-.8.5-1.2 0-.3 0-.6-.2-.7-.2-.2-.5-.3-.9-.3a2 2 0 0 0-.8.2l-.7.3-.4-1.1 1-.6 1.2-.2c.8 0 1.4.3 1.8.7.4.4.6.9.6 1.5s-.2 1.1-.5 1.6a8 8 0 0 1-1.3 1.3l-.6.6h2.6V19z" fill-rule="nonzero"/></svg>',superscript:'<svg width="24" height="24"><path d="M15 9.4L10.4 14l4.6 4.6-1.4 1.4L9 15.4 4.4 20 3 18.6 7.6 14 3 9.4 4.4 8 9 12.6 13.6 8 15 9.4zm5.9 1.6h-5v-1l1-.8 1.7-1.6c.3-.5.5-.9.5-1.3 0-.3 0-.5-.2-.7-.2-.2-.5-.3-.9-.3l-.8.2-.7.4-.4-1.2c.2-.2.5-.4 1-.5.3-.2.8-.2 1.2-.2.8 0 1.4.2 1.8.6.4.4.6 1 .6 1.6 0 .5-.2 1-.5 1.5l-1.3 1.4-.6.5h2.6V11z" fill-rule="nonzero"/></svg>',"table-cell-properties":'<svg width="24" height="24"><path d="M4 5h16v14H4V5zm10 10h-4v3h4v-3zm0-8h-4v3h4V7zM9 7H5v3h4V7zm-4 4v3h4v-3H5zm10 0v3h4v-3h-4zm0-1h4V7h-4v3zM5 15v3h4v-3H5zm10 3h4v-3h-4v3z" fill-rule="evenodd"/></svg>',"table-cell-select-all":'<svg width="24" height="24"><path d="M12.5 5.5v6h6v-6h-6zm-1 0h-6v6h6v-6zm1 13h6v-6h-6v6zm-1 0v-6h-6v6h6zm-7-14h15v15h-15v-15z" fill-rule="nonzero"/></svg>',"table-cell-select-inner":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M5.5 5.5v13h13v-13h-13zm-1-1h15v15h-15v-15z" opacity=".2"/><path d="M11.5 11.5v-7h1v7h7v1h-7v7h-1v-7h-7v-1h7z"/></g></svg>',"table-delete-column":'<svg width="24" height="24"><path d="M9 11.2l1 1v.2l-1 1v-2.2zm5 1l1-1v2.2l-1-1v-.2zM20 5v14H4V5h16zm-1 2h-4v.8l-.2-.2-.8.8V7h-4v1.4l-.8-.8-.2.2V7H5v11h4v-1.8l.5.5.5-.4V18h4v-1.8l.8.8.2-.3V18h4V7zm-3.9 3.4l-1.8 1.9 1.8 1.9c.4.3.4.9 0 1.2-.3.3-.8.3-1.2 0L12 13.5l-1.8 1.9a.8.8 0 0 1-1.2 0 .9.9 0 0 1 0-1.2l1.8-1.9-1.9-2a.9.9 0 0 1 1.2-1.2l2 2 1.8-1.8c.3-.4.9-.4 1.2 0a.8.8 0 0 1 0 1.1z" fill-rule="evenodd"/></svg>',"table-delete-row":'<svg width="24" height="24"><path d="M16.7 8.8l1.1 1.2-2.4 2.5L18 15l-1.2 1.2-2.5-2.5-2.4 2.5-1.3-1.2 2.5-2.5-2.5-2.5 1.2-1.3 2.6 2.6 2.4-2.5zM4 5h16v14H4V5zm15 5V7H5v3h4.8l1 1H5v3h5.8l-1 1H5v3h14v-3h-.4l-1-1H19v-3h-1.3l1-1h.3z" fill-rule="evenodd"/></svg>',"table-delete-table":'<svg width="24" height="26"><path d="M4 6h16v14H4V6zm1 2v11h14V8H5zm11.7 8.7l-1.5 1.5L12 15l-3.3 3.2-1.4-1.5 3.2-3.2-3.3-3.2 1.5-1.5L12 12l3.2-3.2 1.5 1.5-3.2 3.2 3.2 3.2z" fill-rule="evenodd"/></svg>',"table-insert-column-after":'<svg width="24" height="24"><path d="M14.3 9c.4 0 .7.3.7.6v2.2h2.1c.4 0 .7.3.7.7 0 .4-.3.7-.7.7H15v2.2c0 .3-.3.6-.7.6a.7.7 0 0 1-.6-.6v-2.2h-2.2a.7.7 0 0 1 0-1.4h2.2V9.6c0-.3.3-.6.6-.6zM4 5h16v14H4V5zm5 13v-3H5v3h4zm0-4v-3H5v3h4zm0-4V7H5v3h4zm10 8V7h-9v11h9z" fill-rule="evenodd"/></svg>',"table-insert-column-before":'<svg width="24" height="24"><path d="M9.7 16a.7.7 0 0 1-.7-.6v-2.2H6.9a.7.7 0 0 1 0-1.4H9V9.6c0-.3.3-.6.7-.6.3 0 .6.3.6.6v2.2h2.2c.4 0 .8.3.8.7 0 .4-.4.7-.8.7h-2.2v2.2c0 .3-.3.6-.6.6zM4 5h16v14H4V5zm10 13V7H5v11h9zm5 0v-3h-4v3h4zm0-4v-3h-4v3h4zm0-4V7h-4v3h4z" fill-rule="evenodd"/></svg>',"table-insert-row-above":'<svg width="24" height="24"><path d="M14.8 10.5c0 .3-.2.5-.5.5h-1.8v1.8c0 .3-.2.5-.5.5a.5.5 0 0 1-.5-.6V11H9.7a.5.5 0 0 1 0-1h1.8V8.3c0-.3.2-.6.5-.6s.5.3.5.6V10h1.8c.3 0 .5.2.5.5zM4 5h16v14H4V5zm5 13v-3H5v3h4zm5 0v-3h-4v3h4zm5 0v-3h-4v3h4zm0-4V7H5v7h14z" fill-rule="evenodd"/></svg>',"table-insert-row-after":'<svg width="24" height="24"><path d="M9.2 14.5c0-.3.2-.5.5-.5h1.8v-1.8c0-.3.2-.5.5-.5s.5.2.5.6V14h1.8c.3 0 .5.2.5.5s-.2.5-.5.5h-1.8v1.7c0 .3-.2.6-.5.6a.5.5 0 0 1-.5-.6V15H9.7a.5.5 0 0 1-.5-.5zM4 5h16v14H4V5zm6 2v3h4V7h-4zM5 7v3h4V7H5zm14 11v-7H5v7h14zm0-8V7h-4v3h4z" fill-rule="evenodd"/></svg>',"table-left-header":'<svg width="24" height="24"><path d="M4 5h16v13H4V5zm10 12v-3h-4v3h4zm0-4v-3h-4v3h4zm0-4V6h-4v3h4zm5 8v-3h-4v3h4zm0-4v-3h-4v3h4zm0-4V6h-4v3h4z" fill-rule="evenodd"/></svg>',"table-merge-cells":'<svg width="24" height="24"><path d="M4 5h16v14H4V5zm6 13h9v-7h-9v7zm4-11h-4v3h4V7zM9 7H5v3h4V7zm-4 4v3h4v-3H5zm10-1h4V7h-4v3zM5 15v3h4v-3H5z" fill-rule="evenodd"/></svg>',"table-row-properties":'<svg width="24" height="24"><path d="M4 5h16v14H4V5zm10 10h-4v3h4v-3zm0-8h-4v3h4V7zM9 7H5v3h4V7zm6 3h4V7h-4v3zM5 15v3h4v-3H5zm10 3h4v-3h-4v3z" fill-rule="evenodd"/></svg>',"table-split-cells":'<svg width="24" height="24"><path d="M4 5h16v14H4V5zm6 2v3h4V7h-4zM9 18v-3H5v3h4zm0-4v-3H5v3h4zm0-4V7H5v3h4zm10 8v-7h-9v7h9zm0-8V7h-4v3h4zm-3.5 4.5l1.5 1.6c.3.2.3.7 0 1-.2.2-.7.2-1 0l-1.5-1.6-1.6 1.5c-.2.3-.7.3-1 0a.7.7 0 0 1 0-1l1.6-1.5-1.5-1.6a.7.7 0 0 1 1-1l1.5 1.6 1.6-1.5c.2-.3.7-.3 1 0 .2.2.2.7 0 1l-1.6 1.5z" fill-rule="evenodd"/></svg>',"table-top-header":'<svg width="24" height="24"><path d="M4 5h16v13H4V5zm5 12v-3H5v3h4zm0-4v-3H5v3h4zm5 4v-3h-4v3h4zm0-4v-3h-4v3h4zm5 4v-3h-4v3h4zm0-4v-3h-4v3h4z" fill-rule="evenodd"/></svg>',table:'<svg width="24" height="24"><path d="M4 5h16v14H4V5zm6 9h4v-3h-4v3zm4 1h-4v3h4v-3zm0-8h-4v3h4V7zM9 7H5v3h4V7zm-4 4v3h4v-3H5zm10 0v3h4v-3h-4zm0-1h4V7h-4v3zM5 15v3h4v-3H5zm10 3h4v-3h-4v3z" fill-rule="evenodd"/></svg>',template:'<svg width="24" height="24"><path d="M19 19v-1H5v1h14zM9 16v-4a5 5 0 1 1 6 0v4h4a2 2 0 0 1 2 2v3H3v-3c0-1.1.9-2 2-2h4zm4 0v-5l.8-.6a3 3 0 1 0-3.6 0l.8.6v5h2z" fill-rule="nonzero"/></svg>',"temporary-placeholder":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M9 7.6V6h2.5V4.5a.5.5 0 1 1 1 0V6H15v1.6a8 8 0 1 1-6 0zm-2.6 5.3a.5.5 0 0 0 .3.6c.3 0 .6 0 .6-.3l.1-.2a5 5 0 0 1 3.3-2.8c.3-.1.4-.4.4-.6-.1-.3-.4-.5-.6-.4a6 6 0 0 0-4.1 3.7z"/><circle cx="14" cy="4" r="1"/><circle cx="12" cy="2" r="1"/><circle cx="10" cy="4" r="1"/></g></svg>',"text-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path id="tox-icon-text-color__color" d="M3 18h18v3H3z"/><path d="M8.7 16h-.8a.5.5 0 0 1-.5-.6l2.7-9c.1-.3.3-.4.5-.4h2.8c.2 0 .4.1.5.4l2.7 9a.5.5 0 0 1-.5.6h-.8a.5.5 0 0 1-.4-.4l-.7-2.2c0-.3-.3-.4-.5-.4h-3.4c-.2 0-.4.1-.5.4l-.7 2.2c0 .3-.2.4-.4.4zm2.6-7.6l-.6 2a.5.5 0 0 0 .5.6h1.6a.5.5 0 0 0 .5-.6l-.6-2c0-.3-.3-.4-.5-.4h-.4c-.2 0-.4.1-.5.4z"/></g></svg>',toc:'<svg width="24" height="24"><path d="M5 5c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 1 1 0-2zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 1 1 0-2zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2zm0-4c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 1 1 0-2zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2z" fill-rule="evenodd"/></svg>',translate:'<svg width="24" height="24"><path d="M12.7 14.3l-.3.7-.4.7-2.2-2.2-3.1 3c-.3.4-.8.4-1 0a.7.7 0 0 1 0-1l3.1-3A12.4 12.4 0 0 1 6.7 9H8a10.1 10.1 0 0 0 1.7 2.4c.5-.5 1-1.1 1.4-1.8l.9-2H4.7a.7.7 0 1 1 0-1.5h4.4v-.7c0-.4.3-.8.7-.8.4 0 .7.4.7.8v.7H15c.4 0 .8.3.8.7 0 .4-.4.8-.8.8h-1.4a12.3 12.3 0 0 1-1 2.4 13.5 13.5 0 0 1-1.7 2.3l1.9 1.8zm4.3-3l2.7 7.3a.5.5 0 0 1-.4.7 1 1 0 0 1-1-.7l-.6-1.5h-3.4l-.6 1.5a1 1 0 0 1-1 .7.5.5 0 0 1-.4-.7l2.7-7.4a1 1 0 1 1 2 0zm-2.2 4.4h2.4L16 12.5l-1.2 3.2z" fill-rule="evenodd"/></svg>',underline:'<svg width="24" height="24"><path d="M16 5c.6 0 1 .4 1 1v5.5a4 4 0 0 1-.4 1.8l-1 1.4a5.3 5.3 0 0 1-5.5 1 5 5 0 0 1-1.6-1c-.5-.4-.8-.9-1.1-1.4a4 4 0 0 1-.4-1.8V6c0-.6.4-1 1-1s1 .4 1 1v5.5c0 .3 0 .6.2 1l.6.7a3.3 3.3 0 0 0 2.2.8 3.4 3.4 0 0 0 2.2-.8c.3-.2.4-.5.6-.8l.2-.9V6c0-.6.4-1 1-1zM8 17h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2z" fill-rule="evenodd"/></svg>',undo:'<svg width="24" height="24"><path d="M6.4 8H12c3.7 0 6.2 2 6.8 5.1.6 2.7-.4 5.6-2.3 6.8a1 1 0 0 1-1-1.8c1.1-.6 1.8-2.7 1.4-4.6-.5-2.1-2.1-3.5-4.9-3.5H6.4l3.3 3.3a1 1 0 1 1-1.4 1.4l-5-5a1 1 0 0 1 0-1.4l5-5a1 1 0 0 1 1.4 1.4L6.4 8z" fill-rule="nonzero"/></svg>',unlink:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 0 1 1.4 1.4l-2 2a2 2 0 1 0 2.6 2.8l4.8-4.8a1 1 0 0 0 0-1.4 1 1 0 1 1 1.4-1.3 2.9 2.9 0 0 1 0 4L9.6 20a3.9 3.9 0 0 1-5.5-5.5l2-2zm11.6-.6a1 1 0 0 1-1.4-1.4l2.1-2a2 2 0 1 0-2.7-2.8L11 10.3a1 1 0 0 0 0 1.4A1 1 0 1 1 9.6 13a2.9 2.9 0 0 1 0-4L14.4 4a3.9 3.9 0 0 1 5.5 5.5l-2 2zM7.6 6.3a.8.8 0 0 1-1 1.1L3.3 4.2a.7.7 0 1 1 1-1l3.2 3.1zM5.1 8.6a.8.8 0 0 1 0 1.5H3a.8.8 0 0 1 0-1.5H5zm5-3.5a.8.8 0 0 1-1.5 0V3a.8.8 0 0 1 1.5 0V5zm6 11.8a.8.8 0 0 1 1-1l3.2 3.2a.8.8 0 0 1-1 1L16 17zm-2.2 2a.8.8 0 0 1 1.5 0V21a.8.8 0 0 1-1.5 0V19zm5-3.5a.7.7 0 1 1 0-1.5H21a.8.8 0 0 1 0 1.5H19z" fill-rule="nonzero"/></svg>',unlock:'<svg width="24" height="24"><path d="M16 5c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h-2V8a1 1 0 0 0-.3-.7A1 1 0 0 0 16 7h-2a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7v3h.3c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H4.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H11V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2z" fill-rule="evenodd"/></svg>',"unordered-list":'<svg width="24" height="24"><path d="M11 5h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zM4.5 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1z" fill-rule="evenodd"/></svg>',unselected:'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2zm0 1a1 1 0 0 0-1 1v12c0 .6.4 1 1 1h12c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H6z"/></svg>',upload:'<svg width="24" height="24"><path d="M18 19v-2a1 1 0 0 1 2 0v3c0 .6-.4 1-1 1H5a1 1 0 0 1-1-1v-3a1 1 0 0 1 2 0v2h12zM11 6.4L8.7 8.7a1 1 0 0 1-1.4-1.4l4-4a1 1 0 0 1 1.4 0l4 4a1 1 0 1 1-1.4 1.4L13 6.4V16a1 1 0 0 1-2 0V6.4z" fill-rule="nonzero"/></svg>',user:'<svg width="24" height="24"><path d="M12 24a12 12 0 1 1 0-24 12 12 0 0 1 0 24zm-8.7-5.3a11 11 0 0 0 17.4 0C19.4 16.3 14.6 15 12 15c-2.6 0-7.4 1.3-8.7 3.7zM12 13c2.2 0 4-2 4-4.5S14.2 4 12 4 8 6 8 8.5 9.8 13 12 13z" fill-rule="nonzero"/></svg>',visualblocks:'<svg width="24" height="24"><path d="M9 19v2H7v-2h2zm-4 0v2a2 2 0 0 1-2-2h2zm8 0v2h-2v-2h2zm8 0a2 2 0 0 1-2 2v-2h2zm-4 0v2h-2v-2h2zM15 7a1 1 0 0 1 0 2v7a1 1 0 0 1-2 0V9h-1v7a1 1 0 0 1-2 0v-4a2.5 2.5 0 0 1-.2-5H15zM5 15v2H3v-2h2zm16 0v2h-2v-2h2zM5 11v2H3v-2h2zm16 0v2h-2v-2h2zM5 7v2H3V7h2zm16 0v2h-2V7h2zM5 3v2H3c0-1.1.9-2 2-2zm8 0v2h-2V3h2zm6 0a2 2 0 0 1 2 2h-2V3zM9 3v2H7V3h2zm8 0v2h-2V3h2z" fill-rule="evenodd"/></svg>',visualchars:'<svg width="24" height="24"><path d="M10 5h7a1 1 0 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 6.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L10 5z" fill-rule="evenodd"/></svg>',warning:'<svg width="24" height="24"><path d="M19.8 18.3c.2.5.3.9 0 1.2-.1.3-.5.5-1 .5H5.2c-.5 0-.9-.2-1-.5-.3-.3-.2-.7 0-1.2L11 4.7l.5-.5.5-.2c.2 0 .3 0 .5.2.2 0 .3.3.5.5l6.8 13.6zM12 18c.3 0 .5-.1.7-.3.2-.2.3-.4.3-.7a1 1 0 0 0-.3-.7 1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3 1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3zm.7-3l.3-4a1 1 0 0 0-.3-.7 1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3 1 1 0 0 0-.3.7l.3 4h1.4z" fill-rule="evenodd"/></svg>',"zoom-in":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12zm-1-9a1 1 0 0 1 2 0v6a1 1 0 0 1-2 0V8zm-2 4a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2H8z" fill-rule="nonzero"/></svg>',"zoom-out":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12zm-3-5a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2H8z" fill-rule="nonzero"/></svg>'}),Ud.get(e).icons);ue(t,function(e,t){kt(r,t)||n.ui.registry.addIcon(t,e)})}(e),function(e){var t=e.settings.theme;if(K(t)){e.settings.theme=Iw(t);var n=qd.get(t);e.theme=new n(e,qd.urls[t]),e.theme.init&&e.theme.init(e,qd.urls[t]||e.documentBaseUrl.replace(/\/$/,""),e.$)}else e.theme={}}(e),function(t){var n=[];Mn.each(t.settings.plugins.split(/[ ,]/),function(e){Az(t,n,Iw(e))})}(e);var t=function(e){var t=e.getElement();return e.orgDisplay=t.style.display,K(e.settings.theme)?function(e){return e.theme.renderUI()}(e):D(e.settings.theme)?function(e){var t=e.getElement(),n=(0,e.settings.theme)(e,t);return n.editorContainer.nodeType&&(n.editorContainer.id=n.editorContainer.id||e.id+"_parent"),n.iframeContainer&&n.iframeContainer.nodeType&&(n.iframeContainer.id=n.iframeContainer.id||e.id+"_iframecontainer"),n.height=n.iframeHeight?n.iframeHeight:t.offsetHeight,n}(e):Uw(e)}(e);return e.editorContainer=t.editorContainer?t.editorContainer:null,Vw(e),e.inline?Nz(e):kz(e,t)},Rz=Xi.DOM,Dz=function(t){var e=t.settings,n=t.id;ra.setCode(Bf(t));var r=function(){Rz.unbind(j.window,"ready",r),t.render()};if(kr.Event.domLoaded){if(t.getElement()&&Nn.contentEditable){e.inline?t.inline=!0:(t.orgVisibility=t.getElement().style.visibility,t.getElement().style.visibility="hidden");var o=t.getElement().form||Rz.getParent(n,"form");o&&(t.formElement=o,e.hidden_input&&!Ge.isTextareaOrInput(t.getElement())&&(Rz.insertAfter(Rz.create("input",{type:"hidden",name:n}),n),t.hasHiddenInput=!0),t.formEventDelegate=function(e){t.fire(e.type,e)},Rz.bind(o,"submit reset",t.formEventDelegate),t.on("reset",function(){t.resetContent()}),!e.submit_patch||o.submit.nodeType||o.submit.length||o._mceOldSubmit||(o._mceOldSubmit=o.submit,o.submit=function(){return t.editorManager.triggerSave(),t.setDirty(!1),o._mceOldSubmit(o)})),t.windowManager=Bd(t),t.notificationManager=_d(t),"xml"===e.encoding&&t.on("GetContent",function(e){e.save&&(e.content=Rz.encode(e.content))}),e.add_form_submit_trigger&&t.on("submit",function(){t.initialized&&t.save()}),e.add_unload_trigger&&(t._beforeUnload=function(){!t.initialized||t.destroyed||t.isHidden()||t.save({format:"raw",no_events:!0,set_dirty:!1})},t.editorManager.on("BeforeUnload",t._beforeUnload)),t.editorManager.add(t),$w(t,t.suffix)}}else Rz.bind(j.window,"ready",r)},_z="data-mce-contenteditable",Bz=["design","readonly"],Oz=function(e,t){var n=t.firstChild,r=t.lastChild;return n&&"meta"===n.name&&(n=n.next),r&&"mce_marker"===r.attr("id")&&(r=r.prev),function(e,t){var n=e.getNonEmptyElements();return t&&(t.isEmpty(n)||function(e,t){return e.getBlockElements()[t.name]&&function(e){return e.firstChild&&e.firstChild===e.lastChild}(t)&&function(e){return"br"===e.name||"\xa0"===e.value}(t.firstChild)}(e,t))}(e,r)&&(r=r.prev),!(!n||n!==r)&&("ul"===n.name||"ol"===n.name)},Hz=function(e,o,i,t){function n(e){var t=Ds.fromRangeStart(i),n=rc(o.getRoot()),r=1===e?n.prev(t):n.next(t);return!r||rx(o,r.getNode())!==a}var r=function(e,t,n){var r=t.serialize(n);return 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}(e.createFragment(r))}(o,e,t),a=rx(o,i.startContainer),u=nx(ex(r.firstChild)),s=o.getRoot();return n(1)?ix(a,u,s):n(2)?function(e,t,n,r){return r.insertAfter(t.reverse(),e),ox(t[0],n)}(a,u,s,o):function(t,e,n,r){var o=function(e,t){var n=t.cloneRange(),r=t.cloneRange();return n.setStartBefore(e),r.setEndAfter(e),[n.cloneContents(),r.cloneContents()]}(t,r),i=t.parentNode;return i.insertBefore(o[0],t),Mn.each(e,function(e){i.insertBefore(e,t)}),i.insertBefore(o[1],t),i.removeChild(t),ox(e[e.length-1],n)}(a,u,s,i)},Pz=function(e,t){return!!rx(e,t)},Lz=Ge.matchNodeNames(["td","th"]),Vz=function(e,t){var n=function(e){var t;return"string"!=typeof e?(t=Mn.extend({paste:e.paste,data:{paste:e.paste}},e),{content:e.content,details:t}):{content:e,details:{}}}(t);ux(e,n.content,n.details)},Iz=function(e){ez(e,!1)||Lx(e,!1)||Ix(e,!1)||Fx(e,!1)||Dx(e,!1)||Kx(e)||_x(e,!1)||Ux(e,!1)||(sx(e,"Delete"),Tx(e))},Fz=function(e){Lx(e,!0)||Ix(e,!0)||Fx(e,!0)||Dx(e,!0)||Kx(e)||_x(e,!0)||Ux(e,!0)||sx(e,"ForwardDelete")},Uz={getFontSize:cx("font-size"),getFontFamily:q(function(e){return e.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")},cx("font-family")),toPt:function(e,t){return/[0-9.]+px$/.test(e)?function(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}(72*parseInt(e,10)/96,t||0)+"pt":e}},jz=Mn.each,qz=Mn.map,$z=Mn.inArray,Wz=(Kz.prototype.execCommand=function(t,n,r,e){var o,i,a=!1,u=this;if(!u.editor.removed){if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(t)||e&&e.skip_focus?Jf(u.editor):u.editor.focus(),(e=u.editor.fire("BeforeExecCommand",{command:t,ui:n,value:r})).isDefaultPrevented())return!1;if(i=t.toLowerCase(),o=u.commands.exec[i])return o(i,n,r),u.editor.fire("ExecCommand",{command:t,ui:n,value:r}),!0;if(jz(this.editor.plugins,function(e){if(e.execCommand&&e.execCommand(t,n,r))return u.editor.fire("ExecCommand",{command:t,ui:n,value:r}),!(a=!0)}),a)return a;if(u.editor.theme&&u.editor.theme.execCommand&&u.editor.theme.execCommand(t,n,r))return u.editor.fire("ExecCommand",{command:t,ui:n,value:r}),!0;try{a=u.editor.getDoc().execCommand(t,n,r)}catch(s){}return!!a&&(u.editor.fire("ExecCommand",{command:t,ui:n,value:r}),!0)}},Kz.prototype.queryCommandState=function(e){var t;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(e=e.toLowerCase(),t=this.commands.state[e])return t(e);try{return this.editor.getDoc().queryCommandState(e)}catch(n){}return!1}},Kz.prototype.queryCommandValue=function(e){var t;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(e=e.toLowerCase(),t=this.commands.value[e])return t(e);try{return this.editor.getDoc().queryCommandValue(e)}catch(n){}}},Kz.prototype.addCommands=function(e,n){var r=this;n=n||"exec",jz(e,function(t,e){jz(e.toLowerCase().split(","),function(e){r.commands[n][e]=t})})},Kz.prototype.addCommand=function(e,o,i){var a=this;e=e.toLowerCase(),this.commands.exec[e]=function(e,t,n,r){return o.call(i||a.editor,t,n,r)}},Kz.prototype.queryCommandSupported=function(e){if(e=e.toLowerCase(),this.commands.exec[e])return!0;try{return this.editor.getDoc().queryCommandSupported(e)}catch(t){}return!1},Kz.prototype.addQueryStateHandler=function(e,t,n){var r=this;e=e.toLowerCase(),this.commands.state[e]=function(){return t.call(n||r.editor)}},Kz.prototype.addQueryValueHandler=function(e,t,n){var r=this;e=e.toLowerCase(),this.commands.value[e]=function(){return t.call(n||r.editor)}},Kz.prototype.hasCustomCommand=function(e){return e=e.toLowerCase(),!!this.commands.exec[e]},Kz.prototype.execNativeCommand=function(e,t,n){return t===undefined&&(t=!1),n===undefined&&(n=null),this.editor.getDoc().execCommand(e,t,n)},Kz.prototype.isFormatMatch=function(e){return this.editor.formatter.match(e)},Kz.prototype.toggleFormat=function(e,t){this.editor.formatter.toggle(e,t?{value:t}:undefined),this.editor.nodeChanged()},Kz.prototype.storeSelection=function(e){this.selectionBookmark=this.editor.selection.getBookmark(e)},Kz.prototype.restoreSelection=function(){this.editor.selection.moveToBookmark(this.selectionBookmark)},Kz.prototype.setupCommands=function(i){var a=this;function e(n){return function(){var e=i.selection.isCollapsed()?[i.dom.getParent(i.selection.getNode(),i.dom.isBlock)]:i.selection.getSelectedBlocks(),t=qz(e,function(e){return!!i.formatter.matchNode(e,n)});return-1!==$z(t,!0)}}this.addCommands({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){i.undoManager.add()},"Cut,Copy,Paste":function(e){var t,n=i.getDoc();try{a.execNativeCommand(e)}catch(o){t=!0}if("paste"!==e||n.queryCommandEnabled(e)||(t=!0),t||!n.queryCommandSupported(e)){var r=i.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");Nn.mac&&(r=r.replace(/Ctrl\+/g,"\u2318+")),i.notificationManager.open({text:r,type:"error"})}},unlink:function(){if(i.selection.isCollapsed()){var e=i.dom.getParent(i.selection.getStart(),"a");e&&i.dom.remove(e,!0)}else i.formatter.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(e){var t=e.substring(7);"full"===t&&(t="justify"),jz("left,center,right,justify".split(","),function(e){t!==e&&i.formatter.remove("align"+e)}),"none"!==t&&a.toggleFormat("align"+t)},"InsertUnorderedList,InsertOrderedList":function(e){var t,n;a.execNativeCommand(e),(t=i.dom.getParent(i.selection.getNode(),"ol,ul"))&&(n=t.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName)&&(a.storeSelection(),i.dom.split(n,t),a.restoreSelection()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){a.toggleFormat(e)},"ForeColor,HiliteColor":function(e,t,n){a.toggleFormat(e,n)},FontName:function(e,t,n){hx(i,n)},FontSize:function(e,t,n){!function(e,t){e.formatter.toggle("fontsize",{value:dx(e,t)}),e.nodeChanged()}(i,n)},RemoveFormat:function(e){i.formatter.remove(e)},mceBlockQuote:function(){a.toggleFormat("blockquote")},FormatBlock:function(e,t,n){return a.toggleFormat(n||"p")},mceCleanup:function(){var e=i.selection.getBookmark();i.setContent(i.getContent()),i.selection.moveToBookmark(e)},mceRemoveNode:function(e,t,n){var r=n||i.selection.getNode();r!==i.getBody()&&(a.storeSelection(),i.dom.remove(r,!0),a.restoreSelection())},mceSelectNodeDepth:function(e,t,n){var r=0;i.dom.getParent(i.selection.getNode(),function(e){if(1===e.nodeType&&r++===n)return i.selection.select(e),!1},i.getBody())},mceSelectNode:function(e,t,n){i.selection.select(n)},mceInsertContent:function(e,t,n){Vz(i,n)},mceInsertRawHTML:function(e,t,n){i.selection.setContent("tiny_mce_marker");var r=i.getContent();i.setContent(r.replace(/tiny_mce_marker/g,function(){return n}))},mceInsertNewLine:function(e,t,n){gz(i,n)},mceToggleFormat:function(e,t,n){a.toggleFormat(n)},mceSetContent:function(e,t,n){i.setContent(n)},"Indent,Outdent":function(e){_C(i,e)},mceRepaint:function(){},InsertHorizontalRule:function(){i.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){i.hasVisual=!i.hasVisual,i.addVisual()},mceReplaceContent:function(e,t,n){i.execCommand("mceInsertContent",!1,n.replace(/\{\$selection\}/g,i.selection.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;"string"==typeof n&&(n={href:n}),r=i.dom.getParent(i.selection.getNode(),"a"),n.href=n.href.replace(/ /g,"%20"),r&&n.href||i.formatter.remove("link"),n.href&&i.formatter.apply("link",n,r)},selectAll:function(){var e=i.dom.getParent(i.selection.getStart(),Ge.isContentEditableTrue);if(e){var t=i.dom.createRng();t.selectNodeContents(e),i.selection.setRng(t)}},"delete":function(){Iz(i)},forwardDelete:function(){Fz(i)},mceNewDocument:function(){i.setContent("")},InsertLineBreak:function(e,t,n){return lz(i,n),!0}}),a.addCommands({JustifyLeft:e("alignleft"),JustifyCenter:e("aligncenter"),JustifyRight:e("alignright"),JustifyFull:e("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return a.isFormatMatch(e)},mceBlockQuote:function(){return a.isFormatMatch("blockquote")},Outdent:function(){return RC(i)},"InsertUnorderedList,InsertOrderedList":function(e){var t=i.dom.getParent(i.selection.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),a.addCommands({Undo:function(){i.undoManager.undo()},Redo:function(){i.undoManager.redo()}}),a.addQueryValueHandler("FontName",function(){return function(t){return fx(t).fold(function(){return lx(t).map(function(e){return Uz.getFontFamily(t.getBody(),e)}).getOr("")},function(e){return Uz.getFontFamily(t.getBody(),e)})}(i)},this),a.addQueryValueHandler("FontSize",function(){return function(t){return fx(t).fold(function(){return lx(t).map(function(e){return Uz.getFontSize(t.getBody(),e)}).getOr("")},function(e){return Uz.getFontSize(t.getBody(),e)})}(i)},this)},Kz);function Kz(e){this.commands={state:{},exec:{},value:{}},this.editor=e,this.setupCommands(e)}var Xz=Mn.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input beforeinput contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend touchcancel"," "),Yz=(Gz.isNative=function(e){return!!Xz[e.toLowerCase()]},Gz.prototype.fire=function(e,t){var n,r,o,i;if(e=e.toLowerCase(),(t=t||{}).type=e,t.target||(t.target=this.scope),t.preventDefault||(t.preventDefault=function(){t.isDefaultPrevented=a},t.stopPropagation=function(){t.isPropagationStopped=a},t.stopImmediatePropagation=function(){t.isImmediatePropagationStopped=a},t.isDefaultPrevented=c,t.isPropagationStopped=c,t.isImmediatePropagationStopped=c),this.settings.beforeFire&&this.settings.beforeFire(t),n=this.bindings[e])for(r=0,o=n.length;r<o;r++){if((i=n[r]).once&&this.off(e,i.func),t.isImmediatePropagationStopped())return t.stopPropagation(),t;if(!1===i.func.call(this.scope,t))return t.preventDefault(),t}return t},Gz.prototype.on=function(e,t,n,r){var o,i,a;if(!1===t&&(t=c),t){var u={func:t};for(r&&Mn.extend(u,r),a=(i=e.toLowerCase().split(" ")).length;a--;)e=i[a],(o=this.bindings[e])||(o=this.bindings[e]=[],this.toggleEvent(e,!0)),n?o.unshift(u):o.push(u)}return this},Gz.prototype.off=function(e,t){var n,r,o,i,a;if(e)for(n=(i=e.toLowerCase().split(" ")).length;n--;){if(e=i[n],r=this.bindings[e],!e){for(o in this.bindings)this.toggleEvent(o,!1),delete this.bindings[o];return this}if(r){if(t)for(a=r.length;a--;)r[a].func===t&&(r=r.slice(0,a).concat(r.slice(a+1)),this.bindings[e]=r);else r.length=0;r.length||(this.toggleEvent(e,!1),delete this.bindings[e])}}else{for(e in this.bindings)this.toggleEvent(e,!1);this.bindings={}}return this},Gz.prototype.once=function(e,t,n){return this.on(e,t,n,{once:!0})},Gz.prototype.has=function(e){return e=e.toLowerCase(),!(!this.bindings[e]||0===this.bindings[e].length)},Gz);function Gz(e){this.bindings={},this.settings=e||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||c}function Jz(n){return n._eventDispatcher||(n._eventDispatcher=new Yz({scope:n,toggleEvent:function(e,t){Yz.isNative(e)&&n.toggleNativeEvent&&n.toggleNativeEvent(e,t)}})),n._eventDispatcher}function Qz(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=rE.select(e.settings.event_root)[0]),e.eventRoot):e.getBody()}function Zz(e,t,n){!function(e){return!e.hidden&&!Gw(e)}(e)?Gw(e)&&function(e){var t=e.target;!function(e){return"click"===e.type}(e)||"A"!==t.tagName||Ah.metaKeyPressed(e)||e.preventDefault()}(n):e.fire(t,n)}function eE(i,a){var e,t;if(i.delegates||(i.delegates={}),!i.delegates[a]&&!i.removed)if(e=Qz(i,a),i.settings.event_root){if(tE||(tE={},i.editorManager.on("removeEditor",function(){var e;if(!i.editorManager.activeEditor&&tE){for(e in tE)i.dom.unbind(Qz(i,e));tE=null}})),tE[a])return;t=function(e){for(var t=e.target,n=i.editorManager.get(),r=n.length;r--;){var o=n[r].getBody();o!==t&&!rE.isChildOf(t,o)||Zz(n[r],a,e)}},tE[a]=t,rE.bind(e,a,t)}else t=function(e){Zz(i,a,e)},rE.bind(e,a,t),i.delegates[a]=t}var tE,nE={fire:function(e,t,n){if(this.removed&&"remove"!==e&&"detach"!==e)return t;var r=Jz(this).fire(e,t);if(!1!==n&&this.parent)for(var o=this.parent();o&&!r.isPropagationStopped();)o.fire(e,r,!1),o=o.parent();return r},on:function(e,t,n){return Jz(this).on(e,t,n)},off:function(e,t){return Jz(this).off(e,t)},once:function(e,t){return Jz(this).once(e,t)},hasEventListeners:function(e){return Jz(this).has(e)}},rE=Xi.DOM,oE=G(G({},nE),{bindPendingEventDelegates:function(){var t=this;Mn.each(t._pendingNativeEvents,function(e){eE(t,e)})},toggleNativeEvent:function(e,t){var n=this;"focus"!==e&&"blur"!==e&&(t?n.initialized?eE(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&(n.dom.unbind(Qz(n,e),e,n.delegates[e]),delete n.delegates[e]))},unbindAllNativeEvents:function(){var e,t=this,n=t.getBody(),r=t.dom;if(t.delegates){for(e in t.delegates)t.dom.unbind(Qz(t,e),e,t.delegates[e]);delete t.delegates}!t.inline&&n&&r&&(n.onload=null,r.unbind(t.getWin()),r.unbind(t.getDoc())),r&&(r.unbind(n),r.unbind(t.getContainer()))}}),iE=Mn.each,aE=Mn.explode,uE={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},sE=Mn.makeMap("alt,ctrl,shift,meta,access"),cE=(lE.prototype.add=function(e,n,r,o){var t,i=this;return"string"==typeof(t=r)?r=function(){i.editor.execCommand(t,!1,null)}:Mn.isArray(t)&&(r=function(){i.editor.execCommand(t[0],t[1],t[2])}),iE(aE(Mn.trim(e)),function(e){var t=i.createShortcut(e,n,r,o);i.shortcuts[t.id]=t}),!0},lE.prototype.remove=function(e){var t=this.createShortcut(e);return!!this.shortcuts[t.id]&&(delete this.shortcuts[t.id],!0)},lE.prototype.parseShortcut=function(e){var t,n,r={};for(n in iE(aE(e.toLowerCase(),"+"),function(e){e in sE?r[e]=!0:/^[0-9]{2,}$/.test(e)?r.keyCode=parseInt(e,10):(r.charCode=e.charCodeAt(0),r.keyCode=uE[e]||e.toUpperCase().charCodeAt(0))}),t=[r.keyCode],sE)r[n]?t.push(n):r[n]=!1;return r.id=t.join(","),r.access&&(r.alt=!0,Nn.mac?r.ctrl=!0:r.shift=!0),r.meta&&(Nn.mac?r.meta=!0:(r.ctrl=!0,r.meta=!1)),r},lE.prototype.createShortcut=function(e,t,n,r){var o;return(o=Mn.map(aE(e,">"),this.parseShortcut))[o.length-1]=Mn.extend(o[o.length-1],{func:n,scope:r||this.editor}),Mn.extend(o[0],{desc:this.editor.translate(t),subpatterns:o.slice(1)})},lE.prototype.hasModifier=function(e){return e.altKey||e.ctrlKey||e.metaKey},lE.prototype.isFunctionKey=function(e){return"keydown"===e.type&&112<=e.keyCode&&e.keyCode<=123},lE.prototype.matchShortcut=function(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)},lE.prototype.executeShortcutAction=function(e){return e.func?e.func.call(e.scope):null},lE);function lE(e){this.shortcuts={},this.pendingPatterns=[],this.editor=e;var n=this;e.on("keyup keypress keydown",function(t){!n.hasModifier(t)&&!n.isFunctionKey(t)||t.isDefaultPrevented()||(iE(n.shortcuts,function(e){if(n.matchShortcut(t,e))return n.pendingPatterns=e.subpatterns.slice(0),"keydown"===t.type&&n.executeShortcutAction(e),!0}),n.matchShortcut(t,n.pendingPatterns[0])&&(1===n.pendingPatterns.length&&"keydown"===t.type&&n.executeShortcutAction(n.pendingPatterns[0]),n.pendingPatterns.shift()))})}var fE=Mn.each,dE=Mn.trim,hE="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),mE={ftp:21,http:80,https:443,mailto:25},gE=(pE.parseDataUri=function(e){var t,n=decodeURIComponent(e).split(","),r=/data:([^;]+)/.exec(n[0]);return r&&(t=r[1]),{type:t,data:n[1]}},pE.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},pE.prototype.setPath=function(e){var t=/^(.*?)\/?(\w+)?$/.exec(e);this.path=t[0],this.directory=t[1],this.file=t[2],this.source="",this.getURI()},pE.prototype.toRelative=function(e){var t;if("./"===e)return e;var n=new pE(e,{base_uri:this});if("mce_host"!==n.host&&this.host!==n.host&&n.host||this.port!==n.port||this.protocol!==n.protocol&&""!==n.protocol)return n.getURI();var r=this.getURI(),o=n.getURI();return r===o||"/"===r.charAt(r.length-1)&&r.substr(0,r.length-1)===o?r:(t=this.toRelPath(this.path,n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),t)},pE.prototype.toAbsolute=function(e,t){var n=new pE(e,{base_uri:this});return n.getURI(t&&this.isSameOrigin(n))},pE.prototype.isSameOrigin=function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=mE[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},pE.prototype.toRelPath=function(e,t){var n,r,o,i=0,a="",u=e.substring(0,e.lastIndexOf("/")).split("/");if(n=t.split("/"),u.length>=n.length)for(r=0,o=u.length;r<o;r++)if(r>=n.length||u[r]!==n[r]){i=r+1;break}if(u.length<n.length)for(r=0,o=n.length;r<o;r++)if(r>=u.length||u[r]!==n[r]){i=r+1;break}if(1===i)return t;for(r=0,o=u.length-(i-1);r<o;r++)a+="../";for(r=i-1,o=n.length;r<o;r++)a+=r!==i-1?"/"+n[r]:n[r];return a},pE.prototype.toAbsPath=function(e,t){var n,r,o,i=0,a=[];r=/\/$/.test(t)?"/":"";var u=e.split("/"),s=t.split("/");for(fE(u,function(e){e&&a.push(e)}),u=a,n=s.length-1,a=[];0<=n;n--)0!==s[n].length&&"."!==s[n]&&(".."!==s[n]?0<i?i--:a.push(s[n]):i++);return 0!==(o=(n=u.length-i)<=0?a.reverse().join("/"):u.slice(0,n).join("/")+"/"+a.reverse().join("/")).indexOf("/")&&(o="/"+o),r&&o.lastIndexOf("/")!==o.length-1&&(o+=r),o},pE.prototype.getURI=function(e){var t;return void 0===e&&(e=!1),this.source&&!e||(t="",e||(this.protocol?t+=this.protocol+"://":t+="//",this.userInfo&&(t+=this.userInfo+"@"),this.host&&(t+=this.host),this.port&&(t+=":"+this.port)),this.path&&(t+=this.path),this.query&&(t+="?"+this.query),this.anchor&&(t+="#"+this.anchor),this.source=t),this.source},pE);function pE(e,t){e=dE(e),this.settings=t||{};var n=this.settings.base_uri,r=this;if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))r.source=e;else{var o=0===e.indexOf("//");if(0!==e.indexOf("/")||o||(e=(n&&n.protocol||"http")+"://mce_host"+e),!/^[\w\-]*:?\/\//.test(e)){var i=this.settings.base_uri?this.settings.base_uri.path:new pE(j.document.location.href).directory;if(this.settings.base_uri&&""==this.settings.base_uri.protocol)e="//mce_host"+r.toAbsPath(i,e);else{var a=/([^#?]*)([#?]?.*)/.exec(e);e=(n&&n.protocol||"http")+"://mce_host"+r.toAbsPath(i,a[1])+a[2]}}e=e.replace(/@@/g,"(mce_at)");var u=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);fE(hE,function(e,t){var n=u[t];n=n&&n.replace(/\(mce_at\)/g,"@@"),r[e]=n}),n&&(r.protocol||(r.protocol=n.protocol),r.userInfo||(r.userInfo=n.userInfo),r.port||"mce_host"!==r.host||(r.port=n.port),r.host&&"mce_host"!==r.host||(r.host=n.host),r.source=""),o&&(r.protocol="")}}function vE(){var e=function(){function e(n,r){return function(e,t){return n[e.toLowerCase()]=G(G({},t),{type:r})}}var t={},n={},r={},o={},i={},a={},u={};return{addButton:e(t,"button"),addToggleButton:e(t,"togglebutton"),addMenuButton:e(t,"menubutton"),addSplitButton:e(t,"splitbutton"),addMenuItem:e(n,"menuitem"),addNestedMenuItem:e(n,"nestedmenuitem"),addToggleMenuItem:e(n,"togglemenuitem"),addAutocompleter:e(r,"autocompleter"),addContextMenu:e(i,"contextmenu"),addContextToolbar:e(a,"contexttoolbar"),addContextForm:e(a,"contextform"),addSidebar:e(u,"sidebar"),addIcon:function(e,t){return o[e.toLowerCase()]=t},getAll:function(){return{buttons:t,menuItems:n,icons:o,popups:r,contextMenus:i,contextToolbars:a,sidebars:u}}}}();return{addAutocompleter:e.addAutocompleter,addButton:e.addButton,addContextForm:e.addContextForm,addContextMenu:e.addContextMenu,addContextToolbar:e.addContextToolbar,addIcon:e.addIcon,addMenuButton:e.addMenuButton,addMenuItem:e.addMenuItem,addNestedMenuItem:e.addNestedMenuItem,addSidebar:e.addSidebar,addSplitButton:e.addSplitButton,addToggleButton:e.addToggleButton,addToggleMenuItem:e.addToggleMenuItem,getAll:e.getAll}}var yE=Xi.DOM,bE=Mn.extend,CE=Mn.each,wE=Mn.resolve,xE=Nn.ie,zE=(EE.prototype.render=function(){Dz(this)},EE.prototype.focus=function(e){ad(this,e)},EE.prototype.hasFocus=function(){return ud(this)},EE.prototype.execCallback=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r,o=this.settings[e];if(o)return this.callbackLookup&&(r=this.callbackLookup[e])&&(o=r.func,r=r.scope),"string"==typeof o&&(r=(r=o.replace(/\.\w+$/,""))?wE(r):0,o=wE(o),this.callbackLookup=this.callbackLookup||{},this.callbackLookup[e]={func:o,scope:r}),o.apply(r||this,Array.prototype.slice.call(arguments,1))},EE.prototype.translate=function(e){return ra.translate(e)},EE.prototype.getParam=function(e,t,n){return ef(this,e,t,n)},EE.prototype.nodeChanged=function(e){this._nodeChangeDispatcher.nodeChanged(e)},EE.prototype.addCommand=function(e,t,n){this.editorCommands.addCommand(e,t,n)},EE.prototype.addQueryStateHandler=function(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)},EE.prototype.addQueryValueHandler=function(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)},EE.prototype.addShortcut=function(e,t,n,r){this.shortcuts.add(e,t,n,r)},EE.prototype.execCommand=function(e,t,n,r){return this.editorCommands.execCommand(e,t,n,r)},EE.prototype.queryCommandState=function(e){return this.editorCommands.queryCommandState(e)},EE.prototype.queryCommandValue=function(e){return this.editorCommands.queryCommandValue(e)},EE.prototype.queryCommandSupported=function(e){return this.editorCommands.queryCommandSupported(e)},EE.prototype.show=function(){this.hidden&&(this.hidden=!1,this.inline?this.getBody().contentEditable="true":(yE.show(this.getContainer()),yE.hide(this.id)),this.load(),this.fire("show"))},EE.prototype.hide=function(){var e=this,t=e.getDoc();e.hidden||(xE&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable="false",e===e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(yE.hide(e.getContainer()),yE.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.fire("hide"))},EE.prototype.isHidden=function(){return!!this.hidden},EE.prototype.setProgressState=function(e,t){this.fire("ProgressState",{state:e,time:t})},EE.prototype.load=function(e){var t,n=this.getElement();if(this.removed)return"";if(n){(e=e||{}).load=!0;var r=Ge.isTextareaOrInput(n)?n.value:n.innerHTML;return t=this.setContent(r,e),e.element=n,e.no_events||this.fire("LoadContent",e),e.element=n=null,t}},EE.prototype.save=function(e){var t,n,r=this,o=r.getElement();if(o&&r.initialized&&!r.removed)return(e=e||{}).save=!0,e.element=o,e.content=r.getContent(e),e.no_events||r.fire("SaveContent",e),"raw"===e.format&&r.fire("RawSaveContent",e),t=e.content,Ge.isTextareaOrInput(o)?o.value=t:(!e.is_removing&&r.inline||(o.innerHTML=t),(n=yE.getParent(r.id,"form"))&&CE(n.elements,function(e){if(e.name===r.id)return e.value=t,!1})),e.element=o=null,!1!==e.set_dirty&&r.setDirty(!1),t},EE.prototype.setContent=function(e,t){return jl(this,e,t)},EE.prototype.getContent=function(e){return function(t,n){return void 0===n&&(n={}),k.from(t.getBody()).fold($("tree"===n.format?new ul("body",11):""),function(e){return ml(t,n,e)})}(this,e)},EE.prototype.insertContent=function(e,t){t&&(e=bE({content:e},t)),this.execCommand("mceInsertContent",!1,e)},EE.prototype.resetContent=function(e){e===undefined?jl(this,this.startContent,{format:"raw"}):jl(this,e),this.undoManager.reset(),this.setDirty(!1),this.nodeChanged()},EE.prototype.isDirty=function(){return!this.isNotDirty},EE.prototype.setDirty=function(e){var t=!this.isNotDirty;this.isNotDirty=!e,e&&e!==t&&this.fire("dirty")},EE.prototype.getContainer=function(){return this.container||(this.container=yE.get(this.editorContainer||this.id+"_parent")),this.container},EE.prototype.getContentAreaContainer=function(){return this.contentAreaContainer},EE.prototype.getElement=function(){return this.targetElm||(this.targetElm=yE.get(this.id)),this.targetElm},EE.prototype.getWin=function(){var e;return this.contentWindow||(e=this.iframeElement)&&(this.contentWindow=e.contentWindow),this.contentWindow},EE.prototype.getDoc=function(){var e;return this.contentDocument||(e=this.getWin())&&(this.contentDocument=e.document),this.contentDocument},EE.prototype.getBody=function(){var e=this.getDoc();return this.bodyElement||(e?e.body:null)},EE.prototype.convertURL=function(e,t,n){var r=this.settings;return r.urlconverter_callback?this.execCallback("urlconverter_callback",e,n,!0,t):!r.convert_urls||n&&"LINK"===n.nodeName||0===e.indexOf("file:")||0===e.length?e:r.relative_urls?this.documentBaseURI.toRelative(e):e=this.documentBaseURI.toAbsolute(e,r.remove_script_host)},EE.prototype.addVisual=function(e){var n,r=this,o=r.settings,i=r.dom;e=e||r.getBody(),r.hasVisual===undefined&&(r.hasVisual=o.visual),CE(i.select("table,a",e),function(e){var t;switch(e.nodeName){case"TABLE":return n=o.visual_table_class||"mce-item-table",void((t=i.getAttrib(e,"border"))&&"0"!==t||!r.hasVisual?i.removeClass(e,n):i.addClass(e,n));case"A":return void(i.getAttrib(e,"href")||(t=i.getAttrib(e,"name")||e.id,n=o.visual_anchor_class||"mce-item-anchor",t&&r.hasVisual?i.addClass(e,n):i.removeClass(e,n)))}}),r.fire("VisualAid",{element:e,hasVisual:r.hasVisual})},EE.prototype.remove=function(){$l(this)},EE.prototype.destroy=function(e){Wl(this,e)},EE.prototype.uploadImages=function(e){return this.editorUpload.uploadImages(e)},EE.prototype._scanForImages=function(){return this.editorUpload.scanForImages()},EE.prototype.addButton=function(){throw new Error("editor.addButton has been removed in tinymce 5x, use editor.ui.registry.addButton or editor.ui.registry.addToggleButton or editor.ui.registry.addSplitButton instead")},EE.prototype.addSidebar=function(){throw new Error("editor.addSidebar has been removed in tinymce 5x, use editor.ui.registry.addSidebar instead")},EE.prototype.addMenuItem=function(){throw new Error("editor.addMenuItem has been removed in tinymce 5x, use editor.ui.registry.addMenuItem instead")},EE.prototype.addContextToolbar=function(){throw new Error("editor.addContextToolbar has been removed in tinymce 5x, use editor.ui.registry.addContextToolbar instead")},EE);function EE(e,t,n){var r=this;this.plugins={},this.contentCSS=[],this.contentStyles=[],this.loadedCSS={},this.isNotDirty=!1,this.editorManager=n,this.documentBaseUrl=n.documentBaseURL,bE(this,oE),this.settings=Ql(this,e,this.documentBaseUrl,n.defaultSettings,t),this.settings.suffix&&(n.suffix=this.settings.suffix),this.suffix=n.suffix,this.settings.base_url&&n._setBaseUrl(this.settings.base_url),this.baseUri=n.baseURI,this.settings.referrer_policy&&(Qi.ScriptLoader._setReferrerPolicy(this.settings.referrer_policy),Xi.DOM.styleSheetLoader._setReferrerPolicy(this.settings.referrer_policy)),ga.languageLoad=this.settings.language_load,ga.baseURL=n.baseURL,this.id=e,this.setDirty(!1),this.documentBaseURI=new gE(this.settings.document_base_url,{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=!!this.settings.inline,this.shortcuts=new cE(this),this.editorCommands=new Wz(this),this.settings.cache_suffix&&(Nn.cacheSuffix=this.settings.cache_suffix.replace(/^[\?\&]+/,"")),this.ui={registry:vE()};var o=Zw(this);this.mode=o,this.setMode=o.set,n.fire("SetupEditor",{editor:this}),this.execCallback("setup",this),this.$=vi.overrideDefaults(function(){return{context:r.inline?r.getBody():r.getDoc(),element:r.getBody()}})}function NE(t){var n=t.type;DE(VE.get(),function(e){switch(n){case"scroll":e.fire("ScrollWindow",t);break;case"resize":e.fire("ResizeWindow",t)}})}function SE(e){e!==OE&&(e?vi(window).on("resize scroll",NE):vi(window).off("resize scroll",NE),OE=e)}function kE(t){var e=PE;delete HE[t.id];for(var n=0;n<HE.length;n++)if(HE[n]===t){HE.splice(n,1);break}return PE=y(PE,function(e){return t!==e}),VE.activeEditor===t&&(VE.activeEditor=0<PE.length?PE[0]:null),VE.focusedEditor===t&&(VE.focusedEditor=null),e.length!==PE.length}var TE,AE,ME=Xi.DOM,RE=Mn.explode,DE=Mn.each,_E=Mn.extend,BE=0,OE=!1,HE=[],PE=[],LE="CSS1Compat"!==j.document.compatMode,VE=G(G({},nE),{baseURI:null,baseURL:null,defaultSettings:{},documentBaseURL:null,suffix:null,$:vi,majorVersion:"5",minorVersion:"1.4",releaseDate:"2019-12-11",editors:HE,i18n:ra,activeEditor:null,focusedEditor:null,settings:{},setup:function(){var e,t,n="";t=gE.getDocumentBaseUrl(j.document.location),/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/"));var r=window.tinymce||window.tinyMCEPreInit;if(r)e=r.base||r.baseURL,n=r.suffix;else{for(var o=j.document.getElementsByTagName("script"),i=0;i<o.length;i++){var a;if(""!==(a=o[i].src||"")){var u=a.substring(a.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(a)){-1!==u.indexOf(".min")&&(n=".min"),e=a.substring(0,a.lastIndexOf("/"));break}}}if(!e&&j.document.currentScript)-1!==(a=j.document.currentScript.src).indexOf(".min")&&(n=".min"),e=a.substring(0,a.lastIndexOf("/"))}this.baseURL=new gE(t).toAbsolute(e),this.documentBaseURL=t,this.baseURI=new gE(this.baseURL),this.suffix=n,nd(this)},overrideDefaults:function(e){var t,n;(t=e.base_url)&&this._setBaseUrl(t),n=e.suffix,e.suffix&&(this.suffix=n);var r=(this.defaultSettings=e).plugin_base_urls;for(var o in r)ga.PluginManager.urls[o]=r[o]},init:function(r){var n,u,s=this;u=Mn.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option table tbody tfoot thead tr th td script noscript style textarea video audio iframe object menu"," ");function c(e){var t=e.id;return t||(t=(t=e.name)&&!ME.get(t)?e.name:ME.uniqueId(),e.setAttribute("id",t)),t}function l(e,t){return t.constructor===RegExp?t.test(e.className):ME.hasClass(e,t)}var f=function(e){n=e},e=function(){function n(e,t,n){var r=new zE(e,t,s);a.push(r),r.on("init",function(){++i===o.length&&f(a)}),r.targetElm=r.targetElm||n,r.render()}var o,i=0,a=[];ME.unbind(window,"ready",e),function(e){var t=r[e];if(t)t.apply(s,Array.prototype.slice.call(arguments,2))}("onpageload"),o=vi.unique(function(t){var e,n=[];if(Nn.browser.isIE()&&Nn.browser.version.major<11)return Fd.initError("TinyMCE does not support the browser you are using. For a list of supported browsers please see: https://www.tinymce.com/docs/get-started/system-requirements/"),[];if(LE)return Fd.initError("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),[];if(t.types)return DE(t.types,function(e){n=n.concat(ME.select(e.selector))}),n;if(t.selector)return ME.select(t.selector);if(t.target)return[t.target];switch(t.mode){case"exact":0<(e=t.elements||"").length&&DE(RE(e),function(t){var e;(e=ME.get(t))?n.push(e):DE(j.document.forms,function(e){DE(e.elements,function(e){e.name===t&&(t="mce_editor_"+BE++,ME.setAttrib(e,"id",t),n.push(e))})})});break;case"textareas":case"specific_textareas":DE(ME.select("textarea"),function(e){t.editor_deselector&&l(e,t.editor_deselector)||t.editor_selector&&!l(e,t.editor_selector)||n.push(e)})}return n}(r)),r.types?DE(r.types,function(t){Mn.each(o,function(e){return!ME.is(e,t.selector)||(n(c(e),_E({},r,t),e),!1)})}):(Mn.each(o,function(e){!function(e){e&&e.initialized&&!(e.getContainer()||e.getBody()).parentNode&&(kE(e),e.unbindAllNativeEvents(),e.destroy(!0),e.removed=!0,e=null)}(s.get(e.id))}),0===(o=Mn.grep(o,function(e){return!s.get(e.id)})).length?f([]):DE(o,function(e){!function(e,t){return e.inline&&t.tagName.toLowerCase()in u}(r,e)?n(c(e),r,e):Fd.initError("Could not initialize inline editor on invalid inline target element",e)}))};return s.settings=r,ME.bind(window,"ready",e),new Zt(function(t){n?t(n):f=function(e){t(e)}})},get:function(t){return 0===arguments.length?PE.slice(0):K(t)?g(PE,function(e){return e.id===t}).getOr(null):_(t)&&PE[t]?PE[t]:null},add:function(e){var n=this;return HE[e.id]===e||(null===n.get(e.id)&&(function(e){return"length"!==e}(e.id)&&(HE[e.id]=e),HE.push(e),PE.push(e)),SE(!0),n.activeEditor=e,n.fire("AddEditor",{editor:e}),TE||(TE=function(e){var t=n.fire("BeforeUnload");if(t.returnValue)return e.preventDefault(),e.returnValue=t.returnValue,t.returnValue},window.addEventListener("beforeunload",TE))),e},createEditor:function(e,t){return this.add(new zE(e,t,this))},remove:function(e){var t,n,r=this;if(e){if(!K(e))return n=e,M(r.get(n.id))?null:(kE(n)&&r.fire("RemoveEditor",{editor:n}),0===PE.length&&window.removeEventListener("beforeunload",TE),n.remove(),SE(0<PE.length),n);DE(ME.select(e),function(e){(n=r.get(e.id))&&r.remove(n)})}else for(t=PE.length-1;0<=t;t--)r.remove(PE[t])},execCommand:function(e,t,n){var r=this.get(n);switch(e){case"mceAddEditor":return this.get(n)||new zE(n,this.settings,this).render(),!0;case"mceRemoveEditor":return r&&r.remove(),!0;case"mceToggleEditor":return r?r.isHidden()?r.show():r.hide():this.execCommand("mceAddEditor",0,n),!0}return!!this.activeEditor&&this.activeEditor.execCommand(e,t,n)},triggerSave:function(){DE(PE,function(e){e.save()})},addI18n:function(e,t){ra.add(e,t)},translate:function(e){return ra.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},_setBaseUrl:function(e){this.baseURL=new gE(this.documentBaseURL).toAbsolute(e.replace(/\/+$/,"")),this.baseURI=new gE(this.baseURL)}});function IE(n){return{walk:function(e,t){return Gc(n,e,t)},split:Cm,normalize:function(t){return ay(n,t).fold($(!1),function(e){return t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),!0})}}}VE.setup(),(AE=IE=IE||{}).compareRanges=hh,AE.getCaretRangeFromPoint=$v,AE.getSelectedNode=Wa,AE.getNode=Ka;function FE(e,t,n){var r,o,i,a,u,s;return r=t.x,o=t.y,i=e.w,a=e.h,u=t.w,s=t.h,"b"===(n=(n||"").split(""))[0]&&(o+=s),"r"===n[1]&&(r+=u),"c"===n[0]&&(o+=JE(s/2)),"c"===n[1]&&(r+=JE(u/2)),"b"===n[3]&&(o-=a),"r"===n[4]&&(r-=i),"c"===n[3]&&(o-=JE(a/2)),"c"===n[4]&&(r-=JE(i/2)),QE(r,o,i,a)}function UE(){}var jE,qE,$E,WE,KE=IE,XE=(jE={},qE={},{load:function(r,o){var i='Script at URL "'+o+'" failed to load',a='Script at URL "'+o+"\" did not call `tinymce.Resource.add('"+r+"', data)` within 1 second";if(jE[r]!==undefined)return jE[r];var e=new Zt(function(e,t){var n=function(e,t,n){function r(n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];o||(o=!0,null!==i&&(j.clearTimeout(i),i=null),n.apply(null,e))}}void 0===n&&(n=1e3);var o=!1,i=null,a=r(e),u=r(t);return{start:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];o||null!==i||(i=j.setTimeout(function(){return u.apply(null,e)},n))},resolve:a,reject:u}}(e,t);qE[r]=n.resolve,Qi.ScriptLoader.loadScript(o,function(){return n.start(a)},function(){return n.reject(i)})});return jE[r]=e},add:function(e,t){qE[e]!==undefined&&(qE[e](t),delete qE[e]),jE[e]=Zt.resolve(t)}}),YE=Math.min,GE=Math.max,JE=Math.round,QE=function(e,t,n,r){return{x:e,y:t,w:n,h:r}},ZE={inflate:function(e,t,n){return QE(e.x-t,e.y-n,e.w+2*t,e.h+2*n)},relativePosition:FE,findBestRelativePosition:function(e,t,n,r){var o,i;for(i=0;i<r.length;i++)if((o=FE(e,t,r[i])).x>=n.x&&o.x+o.w<=n.w+n.x&&o.y>=n.y&&o.y+o.h<=n.h+n.y)return r[i];return null},intersect:function(e,t){var n,r,o,i;return n=GE(e.x,t.x),r=GE(e.y,t.y),o=YE(e.x+e.w,t.x+t.w),i=YE(e.y+e.h,t.y+t.h),o-n<0||i-r<0?null:QE(n,r,o-n,i-r)},clamp:function(e,t,n){var r,o,i,a,u,s,c,l,f,d;return u=e.x,s=e.y,c=e.x+e.w,l=e.y+e.h,f=t.x+t.w,d=t.y+t.h,r=GE(0,t.x-u),o=GE(0,t.y-s),i=GE(0,c-f),a=GE(0,l-d),u+=r,s+=o,n&&(c+=r,l+=o,u-=i,s-=a),QE(u,s,(c-=i)-u,(l-=a)-s)},create:QE,fromClientRect:function(e){return QE(e.left,e.top,e.width,e.height)}},eN=Mn.each,tN=Mn.extend;UE.extend=$E=function(n){function r(){var e,t,n;if(!WE&&(this.init&&this.init.apply(this,arguments),t=this.Mixins))for(e=t.length;e--;)(n=t[e]).init&&n.init.apply(this,arguments)}function t(){return this}function e(n,r){return function(){var e,t=this._super;return this._super=u[n],e=r.apply(this,arguments),this._super=t,e}}var o,i,a,u=this.prototype;for(i in WE=!0,o=new this,WE=!1,n.Mixins&&(eN(n.Mixins,function(e){for(var t in e)"init"!==t&&(n[t]=e[t])}),u.Mixins&&(n.Mixins=u.Mixins.concat(n.Mixins))),n.Methods&&eN(n.Methods.split(","),function(e){n[e]=t}),n.Properties&&eN(n.Properties.split(","),function(e){var t="_"+e;n[e]=function(e){return e!==undefined?(this[t]=e,this):this[t]}}),n.Statics&&eN(n.Statics,function(e,t){r[t]=e}),n.Defaults&&u.Defaults&&(n.Defaults=tN({},u.Defaults,n.Defaults)),n)"function"==typeof(a=n[i])&&u[i]?o[i]=e(i,a):o[i]=a;return r.prototype=o,(r.constructor=r).extend=$E,r};var nN=Math.min,rN=Math.max,oN=Math.round,iN={serialize:function(e){var t=JSON.stringify(e);return K(t)?t.replace(/[\u0080-\uFFFF]/g,function(e){var t=e.charCodeAt(0).toString(16);return"\\u"+"0000".substring(t.length)+t}):t},parse:function(e){try{return JSON.parse(e)}catch(t){}}},aN={callbacks:{},count:0,send:function(t){var n=this,r=Xi.DOM,o=t.count!==undefined?t.count:n.count,i="tinymce_jsonp_"+o;n.callbacks[o]=function(e){r.remove(i),delete n.callbacks[o],t.callback(e)},r.add(r.doc.body,"script",{id:i,src:t.url,type:"text/javascript"}),n.count++}},uN=G(G({},nE),{send:function(e){var t,n=0,r=function(){!e.async||4===t.readyState||1e4<n++?(e.success&&n<1e4&&200===t.status?e.success.call(e.success_scope,""+t.responseText,t,e):e.error&&e.error.call(e.error_scope,1e4<n?"TIMED_OUT":"GENERAL",t,e),t=null):pn.setTimeout(r,10)};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||"",uN.fire("beforeInitialize",{settings:e}),t=new j.XMLHttpRequest){if(t.overrideMimeType&&t.overrideMimeType(e.content_type),t.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(t.withCredentials=!0),e.content_type&&t.setRequestHeader("Content-Type",e.content_type),e.requestheaders&&Mn.each(e.requestheaders,function(e){t.setRequestHeader(e.key,e.value)}),t.setRequestHeader("X-Requested-With","XMLHttpRequest"),(t=uN.fire("beforeSend",{xhr:t,settings:e}).xhr).send(e.data),!e.async)return r();pn.setTimeout(r,10)}}}),sN=Mn.extend,cN=(lN.sendRPC=function(e){return(new lN).send(e)},lN.prototype.send=function(e){var n=e.error,r=e.success,o=sN(this.settings,e);o.success=function(e,t){void 0===(e=iN.parse(e))&&(e={error:"JSON Parse error."}),e.error?n.call(o.error_scope||o.scope,e.error,t):r.call(o.success_scope||o.scope,e.result)},o.error=function(e,t){n&&n.call(o.error_scope||o.scope,e,t)},o.data=iN.serialize({id:e.id||"c"+this.count++,method:e.method,params:e.params}),o.content_type="application/json",uN.send(o)},lN);function lN(e){this.settings=sN({},e),this.count=0}var fN,dN,hN,mN;try{fN=j.window.localStorage}catch(yN){dN={},hN=[],mN={getItem:function(e){var t=dN[e];return t||null},setItem:function(e,t){hN.push(e),dN[e]=String(t)},key:function(e){return hN[e]},removeItem:function(t){hN=hN.filter(function(e){return e===t}),delete dN[t]},clear:function(){hN=[],dN={}},length:0},Object.defineProperty(mN,"length",{get:function(){return hN.length},configurable:!1,enumerable:!1}),fN=mN}var gN,pN={geom:{Rect:ZE},util:{Promise:Zt,Delay:pn,Tools:Mn,VK:Ah,URI:gE,Class:UE,EventDispatcher:Yz,Observable:nE,I18n:ra,XHR:uN,JSON:iN,JSONRequest:cN,JSONP:aN,LocalStorage:fN,Color:function(e){function t(e){var t;return"object"==typeof e?"r"in e?(u=e.r,s=e.g,c=e.b):"v"in e&&function(e,t,n){var r,o,i,a;if(e=(parseInt(e,10)||0)%360,t=parseInt(t,10)/100,n=parseInt(n,10)/100,t=rN(0,nN(t,1)),n=rN(0,nN(n,1)),0!==t){switch(r=e/60,i=(o=n*t)*(1-Math.abs(r%2-1)),a=n-o,Math.floor(r)){case 0:u=o,s=i,c=0;break;case 1:u=i,s=o,c=0;break;case 2:u=0,s=o,c=i;break;case 3:u=0,s=i,c=o;break;case 4:u=i,s=0,c=o;break;case 5:u=o,s=0,c=i;break;default:u=s=c=0}u=oN(255*(u+a)),s=oN(255*(s+a)),c=oN(255*(c+a))}else u=s=c=oN(255*n)}(e.h,e.s,e.v):(t=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e))?(u=parseInt(t[1],10),s=parseInt(t[2],10),c=parseInt(t[3],10)):(t=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e))?(u=parseInt(t[1],16),s=parseInt(t[2],16),c=parseInt(t[3],16)):(t=/#([0-F])([0-F])([0-F])/gi.exec(e))&&(u=parseInt(t[1]+t[1],16),s=parseInt(t[2]+t[2],16),c=parseInt(t[3]+t[3],16)),u=u<0?0:255<u?255:u,s=s<0?0:255<s?255:s,c=c<0?0:255<c?255:c,n}var n={},u=0,s=0,c=0;return e&&t(e),n.toRgb=function(){return{r:u,g:s,b:c}},n.toHsv=function(){return function(e,t,n){var r,o,i,a;return o=0,(i=nN(e/=255,nN(t/=255,n/=255)))===(a=rN(e,rN(t,n)))?{h:0,s:0,v:100*(o=i)}:(r=(a-i)/a,{h:oN(60*((e===i?3:n===i?1:5)-(e===i?t-n:n===i?e-t:n-e)/((o=a)-i))),s:oN(100*r),v:oN(100*o)})}(u,s,c)},n.toHex=function(){function e(e){return 1<(e=parseInt(e,10).toString(16)).length?e:"0"+e}return"#"+e(u)+e(s)+e(c)},n.parse=t,n}},dom:{EventUtils:kr,Sizzle:Ao,DomQuery:vi,TreeWalker:yi,DOMUtils:Xi,ScriptLoader:Qi,RangeUtils:KE,Serializer:Ap,ControlSelection:Wp,BookmarkManager:Kp,Selection:ly,Event:kr.Event},html:{Styles:xr,Entities:ir,Node:ul,Schema:pr,SaxParser:of,DomParser:Np,Writer:gl,Serializer:pl},Env:Nn,AddOnManager:ga,Annotator:nl,Formatter:Cp,UndoManager:mm,EditorCommands:Wz,WindowManager:Bd,NotificationManager:_d,EditorObservable:oE,Shortcuts:cE,Editor:zE,FocusManager:Zf,EditorManager:VE,DOM:Xi.DOM,ScriptLoader:Qi.ScriptLoader,PluginManager:ga.PluginManager,ThemeManager:ga.ThemeManager,IconManager:Ud,Resource:XE,trim:Mn.trim,isArray:Mn.isArray,is:Mn.is,toArray:Mn.toArray,makeMap:Mn.makeMap,each:Mn.each,map:Mn.map,grep:Mn.grep,inArray:Mn.inArray,extend:Mn.extend,create:Mn.create,walk:Mn.walk,createNS:Mn.createNS,resolve:Mn.resolve,explode:Mn.explode,_addCacheSuffix:Mn._addCacheSuffix,isOpera:Nn.opera,isWebKit:Nn.webkit,isIE:Nn.ie,isGecko:Nn.gecko,isMac:Nn.mac},vN=Mn.extend(VE,pN);gN=vN,window.tinymce=gN,window.tinyMCE=gN,function(e){if("object"==typeof module)try{module.exports=e}catch(t){}}(vN)}(window);
9
+ !function(j){"use strict";function i(){}var q=function(n,r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n(r.apply(null,e))}},$=function(e){return function(){return e}},W=function(e){return e};function d(r){for(var o=[],e=1;e<arguments.length;e++)o[e-1]=arguments[e];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=o.concat(e);return r.apply(null,n)}}function s(n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return!n.apply(null,e)}}function e(){return u}var t,c=$(!1),a=$(!0),u=(t={fold:function(e,t){return e()},is:c,isSome:c,isNone:a,getOr:o,getOrThunk:r,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:$(null),getOrUndefined:$(undefined),or:o,orThunk:r,map:e,each:i,bind:e,exists:c,forall:a,filter:e,equals:n,equals_:n,toArray:function(){return[]},toString:$("none()")},Object.freeze&&Object.freeze(t),t);function n(e){return e.isNone()}function r(e){return e()}function o(e){return e}function l(t){return function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"==t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t}(e)===t}}function f(e,t){return O.call(e,t)}function h(e,t){return-1<f(e,t)}function C(e,t){for(var n=0,r=e.length;n<r;n++){if(t(e[n],n))return!0}return!1}function z(e,t){for(var n=0,r=e.length;n<r;n++){t(e[n],n)}}function y(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r)&&n.push(i)}return n}function m(e,t,n){return function(e,t){for(var n=e.length-1;0<=n;n--){t(e[n],n)}}(e,function(e){n=t(n,e)}),n}function b(e,t,n){return z(e,function(e){n=t(n,e)}),n}function g(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n))return k.some(o)}return k.none()}function p(e,t){for(var n=0,r=e.length;n<r;n++){if(t(e[n],n))return k.some(n)}return k.none()}function v(e,t){return function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!A(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);H.apply(t,e[n])}return t}(X(e,t))}function w(e,t){for(var n=0,r=e.length;n<r;++n){if(!0!==t(e[n],n))return!1}return!0}function x(e,t){return y(e,function(e){return!h(t,e)})}function E(e){return 0===e.length?k.none():k.some(e[0])}function N(e){return 0===e.length?k.none():k.some(e[e.length-1])}var S=function(n){function e(){return o}function t(e){return e(n)}var r=$(n),o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:a,isNone:c,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:e,orThunk:e,map:function(e){return S(e(n))},each:function(e){e(n)},bind:t,exists:t,forall:t,filter:function(e){return e(n)?o:u},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(c,function(e){return t(n,e)})}};return o},k={some:S,none:e,from:function(e){return null===e||e===undefined?u:S(e)}},K=l("string"),T=l("object"),A=l("array"),M=l("null"),R=l("boolean"),D=l("function"),_=l("number"),B=Array.prototype.slice,O=Array.prototype.indexOf,H=Array.prototype.push,X=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o)}return r},Y=function(e,t){for(var n=[],r=[],o=0,i=e.length;o<i;o++){var a=e[o];(t(a,o)?n:r).push(a)}return{pass:n,fail:r}},P=D(Array.from)?Array.from:function(e){return B.call(e)},G=function(){return(G=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function L(t){return function(e){return!!e&&e.nodeType===t}}function V(e){var n=e.map(function(e){return e.toLowerCase()});return function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();return h(n,t)}return!1}}function I(t){return function(e){if(Fe(e)){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}return!1}}function F(e,t){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}return undefined}(e,t);if(!n)return{major:0,minor:0};function r(e){return Number(t.replace(n,"$"+e))}return Ze(r(1),r(2))}function U(e,t){return function(){return t===e}}function J(e,t){return function(){return t===e}}function Q(e,t){var n=String(t).toLowerCase();return g(e,function(e){return e.search(n)})}function Z(e,t){return-1!==e.indexOf(t)}function ee(e,t){return function(e,t,n){return""===t||!(e.length<t.length)&&e.substr(n,n+t.length)===t}(e,t,0)}function te(e){return e.replace(/^\s+|\s+$/g,"")}function ne(e){return e.replace(/\s+$/g,"")}function re(t){return function(e){return Z(e,t)}}function oe(){return pt.get()}function ie(e){return e.dom().nodeName.toLowerCase()}function ae(t){return function(e){return function(e){return e.dom().nodeType}(e)===t}}function ue(e,t){for(var n=Et(e),r=0,o=n.length;r<o;r++){var i=n[r];t(e[i],i)}}function se(e,n){return St(e,function(e,t){return{k:t,v:n(e,t)}})}function ce(e,n){var r={},o={};return ue(e,function(e,t){(n(e,t)?r:o)[t]=e}),{t:r,f:o}}function le(e,t){return kt(e,t)?k.from(e[t]):k.none()}function fe(e){return e.style!==undefined&&D(e.style.getPropertyValue)}function de(e){var t=zt(e)?e.dom().parentNode:e.dom();return t!==undefined&&null!==t&&t.ownerDocument.body.contains(t)}function he(e,t,n){if(!(K(n)||R(n)||_(n)))throw j.console.error("Invalid call to Attr.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")}function me(e,t){var n=e.dom();ue(t,function(e,t){he(n,t,e)})}function ge(e,t){var n=e.dom().getAttribute(t);return null===n?undefined:n}function pe(e,t){e.dom().removeAttribute(t)}function ve(e,t){var n=e.dom(),r=j.window.getComputedStyle(n).getPropertyValue(t),o=""!==r||de(e)?r:At(n,t);return null===o?undefined:o}function ye(e,t){var n=e.dom(),r=At(n,t);return k.from(r).filter(function(e){return 0<e.length})}function be(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];if(t.length!==n.length)throw new Error('Wrong number of arguments to struct. Expected "['+t.length+']", got '+n.length+" arguments");var r={};return z(t,function(e,t){r[e]=$(n[t])}),r}}function Ce(e,t,n){return 0!=(e.compareDocumentPosition(t)&n)}function we(e,t){var n=e.dom();if(n.nodeType!==Dt)return!1;var r=n;if(r.matches!==undefined)return r.matches(t);if(r.msMatchesSelector!==undefined)return r.msMatchesSelector(t);if(r.webkitMatchesSelector!==undefined)return r.webkitMatchesSelector(t);if(r.mozMatchesSelector!==undefined)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}function xe(e){return e.nodeType!==Dt&&e.nodeType!==_t||0===e.childElementCount}function ze(e,t){return e.dom()===t.dom()}function Ee(e){return yt.fromDom(e.dom().ownerDocument)}function Ne(e){return yt.fromDom(e.dom().ownerDocument.defaultView)}function Se(e){return k.from(e.dom().parentNode).map(yt.fromDom)}function ke(e){return k.from(e.dom().previousSibling).map(yt.fromDom)}function Te(e){return k.from(e.dom().nextSibling).map(yt.fromDom)}function Ae(e){return function(e){var t=B.call(e,0);return t.reverse(),t}(Mt(e,ke))}function Me(e){return Mt(e,Te)}function Re(e){return X(e.dom().childNodes,yt.fromDom)}function De(e,t){var n=e.dom().childNodes;return k.from(n[t]).map(yt.fromDom)}function _e(e){return De(e,0)}function Be(e){return De(e,e.dom().childNodes.length-1)}function Oe(e){return g(e,xt)}function He(e,t){return e.children&&h(e.children,t)}var Pe,Le,Ve,Ie,Fe=L(1),Ue=V(["textarea","input"]),je=L(3),qe=L(8),$e=L(9),We=L(11),Ke=V(["br"]),Xe=I("true"),Ye=I("false"),Ge={isText:je,isElement:Fe,isComment:qe,isDocument:$e,isDocumentFragment:We,isBr:Ke,isContentEditableTrue:Xe,isContentEditableFalse:Ye,isRestrictedNode:function(e){return!!e&&!Object.getPrototypeOf(e)},matchNodeNames:V,hasPropValue:function(t,n){return function(e){return Fe(e)&&e[t]===n}},hasAttribute:function(t,e){return function(e){return Fe(e)&&e.hasAttribute(t)}},hasAttributeValue:function(t,n){return function(e){return Fe(e)&&e.getAttribute(t)===n}},matchStyleValues:function(r,e){var o=e.toLowerCase().split(" ");return function(e){var t;if(Fe(e))for(t=0;t<o.length;t++){var n=e.ownerDocument.defaultView.getComputedStyle(e,null);if((n?n.getPropertyValue(r):null)===o[t])return!0}return!1}},isBogus:function(e){return Fe(e)&&e.hasAttribute("data-mce-bogus")},isBogusAll:function(e){return Fe(e)&&"all"===e.getAttribute("data-mce-bogus")},isTable:function(e){return Fe(e)&&"TABLE"===e.tagName},isTextareaOrInput:Ue},Je=function(e){function t(){return n}var n=e;return{get:t,set:function(e){n=e},clone:function(){return Je(t())}}},Qe=function(){return Ze(0,0)},Ze=function(e,t){return{major:e,minor:t}},et={nu:Ze,detect:function(e,t){var n=String(t).toLowerCase();return 0===e.length?Qe():F(e,n)},unknown:Qe},tt="Firefox",nt=function(e){var t=e.current;return{current:t,version:e.version,isEdge:U("Edge",t),isChrome:U("Chrome",t),isIE:U("IE",t),isOpera:U("Opera",t),isFirefox:U(tt,t),isSafari:U("Safari",t)}},rt={unknown:function(){return nt({current:undefined,version:et.unknown()})},nu:nt,edge:$("Edge"),chrome:$("Chrome"),ie:$("IE"),opera:$("Opera"),firefox:$(tt),safari:$("Safari")},ot="Windows",it="Android",at="Solaris",ut="FreeBSD",st=function(e){var t=e.current;return{current:t,version:e.version,isWindows:J(ot,t),isiOS:J("iOS",t),isAndroid:J(it,t),isOSX:J("OSX",t),isLinux:J("Linux",t),isSolaris:J(at,t),isFreeBSD:J(ut,t)}},ct={unknown:function(){return st({current:undefined,version:et.unknown()})},nu:st,windows:$(ot),ios:$("iOS"),android:$(it),linux:$("Linux"),osx:$("OSX"),solaris:$(at),freebsd:$(ut)},lt=function(e,n){return Q(e,n).map(function(e){var t=et.detect(e.versionRegexes,n);return{current:e.name,version:t}})},ft=function(e,n){return Q(e,n).map(function(e){var t=et.detect(e.versionRegexes,n);return{current:e.name,version:t}})},dt=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,ht=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return Z(e,"edge/")&&Z(e,"chrome")&&Z(e,"safari")&&Z(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,dt],search:function(e){return Z(e,"chrome")&&!Z(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return Z(e,"msie")||Z(e,"trident")}},{name:"Opera",versionRegexes:[dt,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:re("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:re("firefox")},{name:"Safari",versionRegexes:[dt,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(Z(e,"safari")||Z(e,"mobile/"))&&Z(e,"applewebkit")}}],mt=[{name:"Windows",search:re("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return Z(e,"iphone")||Z(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:re("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:re("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:re("linux"),versionRegexes:[]},{name:"Solaris",search:re("sunos"),versionRegexes:[]},{name:"FreeBSD",search:re("freebsd"),versionRegexes:[]}],gt={browsers:$(ht),oses:$(mt)},pt=Je(function(e,t){var n=gt.browsers(),r=gt.oses(),o=lt(n,e).fold(rt.unknown,rt.nu),i=ft(r,e).fold(ct.unknown,ct.nu);return{browser:o,os:i,deviceType:function(e,t,n,r){var o=e.isiOS()&&!0===/ipad/i.test(n),i=e.isiOS()&&!o,a=e.isiOS()||e.isAndroid(),u=a||r("(pointer:coarse)"),s=o||!i&&a&&r("(min-device-width:768px)"),c=i||a&&!s,l=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(n),f=!c&&!s&&!l;return{isiPad:$(o),isiPhone:$(i),isTablet:$(s),isPhone:$(c),isTouch:$(u),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:$(l),isDesktop:$(f)}}(i,o,e,t)}}(j.navigator.userAgent,function(e){return j.window.matchMedia(e).matches})),vt=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:$(e)}},yt={fromHtml:function(e,t){var n=(t||j.document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw j.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return vt(n.childNodes[0])},fromTag:function(e,t){var n=(t||j.document).createElement(e);return vt(n)},fromText:function(e,t){var n=(t||j.document).createTextNode(e);return vt(n)},fromDom:vt,fromPoint:function(e,t,n){var r=e.dom();return k.from(r.elementFromPoint(t,n)).map(vt)}},bt=(j.Node.ATTRIBUTE_NODE,j.Node.CDATA_SECTION_NODE,j.Node.COMMENT_NODE,j.Node.DOCUMENT_NODE),Ct=(j.Node.DOCUMENT_TYPE_NODE,j.Node.DOCUMENT_FRAGMENT_NODE,j.Node.ELEMENT_NODE),wt=j.Node.TEXT_NODE,xt=(j.Node.PROCESSING_INSTRUCTION_NODE,j.Node.ENTITY_REFERENCE_NODE,j.Node.ENTITY_NODE,j.Node.NOTATION_NODE,"undefined"!=typeof j.window?j.window:Function("return this;")(),ae(Ct)),zt=ae(wt),Et=Object.keys,Nt=Object.hasOwnProperty,St=function(e,r){var o={};return ue(e,function(e,t){var n=r(e,t);o[n.k]=n.v}),o},kt=function(e,t){return Nt.call(e,t)},Tt=function(e,t,n){he(e.dom(),t,n)},At=function(e,t){return fe(e)?e.style.getPropertyValue(t):""},Mt=function(e,t){for(var n=[],r=function(e){return n.push(e),t(e)},o=t(e);(o=o.bind(r)).isSome(););return n},Rt=function(e,t){return Ce(e,t,j.Node.DOCUMENT_POSITION_CONTAINED_BY)},Dt=Ct,_t=bt,Bt=oe().browser.isIE()?function(e,t){return Rt(e.dom(),t.dom())}:function(e,t){var n=e.dom(),r=t.dom();return n!==r&&n.contains(r)},Ot=(be("element","offset"),oe().browser),Ht={getPos:function(e,t,n){var r,o,i=0,a=0,u=e.ownerDocument;if(n=n||e,t){if(n===e&&t.getBoundingClientRect&&"static"===ve(yt.fromDom(e),"position"))return{x:i=(o=t.getBoundingClientRect()).left+(u.documentElement.scrollLeft||e.scrollLeft)-u.documentElement.clientLeft,y:a=o.top+(u.documentElement.scrollTop||e.scrollTop)-u.documentElement.clientTop};for(r=t;r&&r!==n&&r.nodeType&&!He(r,n);)i+=r.offsetLeft||0,a+=r.offsetTop||0,r=r.offsetParent;for(r=t.parentNode;r&&r!==n&&r.nodeType&&!He(r,n);)i-=r.scrollLeft||0,a-=r.scrollTop||0,r=r.parentNode;a+=function(e){return Ot.isFirefox()&&"table"===ie(e)?Oe(Re(e)).filter(function(e){return"caption"===ie(e)}).bind(function(o){return Oe(Me(o)).map(function(e){var t=e.dom().offsetTop,n=o.dom().offsetTop,r=o.dom().offsetHeight;return t<=n?-r:0})}).getOr(0):0}(yt.fromDom(t))}return{x:i,y:a}}},Pt={},Lt={exports:Pt};Pe=undefined,Le=Pt,Ve=Lt,Ie=undefined,function(e){"object"==typeof Le&&void 0!==Ve?Ve.exports=e():"function"==typeof Pe&&Pe.amd?Pe([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EphoxContactWrapper=e()}(function(){return function l(i,a,u){function s(t,e){if(!a[t]){if(!i[t]){var n="function"==typeof Ie&&Ie;if(!e&&n)return n(t,!0);if(c)return c(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var o=a[t]={exports:{}};i[t][0].call(o.exports,function(e){return s(i[t][1][e]||e)},o,o.exports,l,i,a,u)}return a[t].exports}for(var c="function"==typeof Ie&&Ie,e=0;e<u.length;e++)s(u[e]);return s}({1:[function(e,t,n){var r,o,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{o="function"==typeof clearTimeout?clearTimeout:u}catch(e){o=u}}();var c,l=[],f=!1,d=-1;function h(){f&&c&&(f=!1,c.length?l=c.concat(l):d=-1,l.length&&m())}function m(){if(!f){var e=s(h);f=!0;for(var t=l.length;t;){for(c=l,l=[];++d<t;)c&&c[d].run();d=-1,t=l.length}c=null,f=!1,function n(e){if(o===clearTimeout)return clearTimeout(e);if((o===u||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{return o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new g(e,t)),1!==l.length||f||s(m)},g.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],2:[function(e,f,t){(function(t){function r(){}function i(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],l(e,this)}function o(r,o){for(;3===r._state;)r=r._value;0!==r._state?(r._handled=!0,i._immediateFn(function(){var e=1===r._state?o.onFulfilled:o.onRejected;if(null!==e){var t;try{t=e(r._value)}catch(n){return void u(o.promise,n)}a(o.promise,t)}else(1===r._state?a:u)(o.promise,r._value)})):r._deferreds.push(o)}function a(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof i)return e._state=3,e._value=t,void s(e);if("function"==typeof n)return void l(function r(e,t){return function(){e.apply(t,arguments)}}(n,t),e)}e._state=1,e._value=t,s(e)}catch(o){u(e,o)}}function u(e,t){e._state=2,e._value=t,s(e)}function s(e){2===e._state&&0===e._deferreds.length&&i._immediateFn(function(){e._handled||i._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)o(e,e._deferreds[t]);e._deferreds=null}function c(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function l(e,t){var n=!1;try{e(function(e){n||(n=!0,a(t,e))},function(e){n||(n=!0,u(t,e))})}catch(r){if(n)return;n=!0,u(t,r)}}var e,n;e=this,n=setTimeout,i.prototype["catch"]=function(e){return this.then(null,e)},i.prototype.then=function(e,t){var n=new this.constructor(r);return o(this,new c(e,t,n)),n},i.all=function(e){var s=Array.prototype.slice.call(e);return new i(function(o,i){if(0===s.length)return o([]);var a=s.length;function u(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){u(t,e)},i)}s[t]=e,0==--a&&o(s)}catch(r){i(r)}}for(var e=0;e<s.length;e++)u(e,s[e])})},i.resolve=function(t){return t&&"object"==typeof t&&t.constructor===i?t:new i(function(e){e(t)})},i.reject=function(n){return new i(function(e,t){t(n)})},i.race=function(o){return new i(function(e,t){for(var n=0,r=o.length;n<r;n++)o[n].then(e,t)})},i._immediateFn="function"==typeof t?function(e){t(e)}:function(e){n(e,0)},i._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},i._setImmediateFn=function(e){i._immediateFn=e},i._setUnhandledRejectionFn=function(e){i._unhandledRejectionFn=e},void 0!==f&&f.exports?f.exports=i:e.Promise||(e.Promise=i)}).call(this,e("timers").setImmediate)},{timers:3}],3:[function(s,e,c){(function(e,t){var r=s("process/browser.js").nextTick,n=Function.prototype.apply,o=Array.prototype.slice,i={},a=0;function u(e,t){this._id=e,this._clearFn=t}c.setTimeout=function(){return new u(n.call(setTimeout,window,arguments),clearTimeout)},c.setInterval=function(){return new u(n.call(setInterval,window,arguments),clearInterval)},c.clearTimeout=c.clearInterval=function(e){e.close()},u.prototype.unref=u.prototype.ref=function(){},u.prototype.close=function(){this._clearFn.call(window,this._id)},c.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},c.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},c._unrefActive=c.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},c.setImmediate="function"==typeof e?e:function(e){var t=a++,n=!(arguments.length<2)&&o.call(arguments,1);return i[t]=!0,r(function(){i[t]&&(n?e.apply(null,n):e.call(null),c.clearImmediate(t))}),t},c.clearImmediate="function"==typeof t?t:function(e){delete i[e]}}).call(this,s("timers").setImmediate,s("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(e,t,n){var r=e("promise-polyfill"),o="undefined"!=typeof window?window:Function("return this;")();t.exports={boltExport:o.Promise||r}},{"promise-polyfill":2}]},{},[4])(4)});function Vt(e){j.setTimeout(function(){throw e},0)}function It(i,e){return e(function(n){var r=[],o=0;0===i.length?n([]):z(i,function(e,t){e.get(function(t){return function(e){r[t]=e,++o>=i.length&&n(r)}}(t))})})}var Ft,Ut,jt,qt=Lt.exports.boltExport,$t=function(e){var n=k.none(),t=[],r=function(e){o()?a(e):t.push(e)},o=function(){return n.isSome()},i=function(e){z(e,a)},a=function(t){n.each(function(e){j.setTimeout(function(){t(e)},0)})};return e(function(e){n=k.some(e),i(t),t=[]}),{get:r,map:function(n){return $t(function(t){r(function(e){t(n(e))})})},isReady:o}},Wt={nu:$t,pure:function(t){return $t(function(e){e(t)})}},Kt=function(n){function e(e){n().then(e,Vt)}return{map:function(e){return Kt(function(){return n().then(e)})},bind:function(t){return Kt(function(){return n().then(function(e){return t(e).toPromise()})})},anonBind:function(e){return Kt(function(){return n().then(function(){return e.toPromise()})})},toLazy:function(){return Wt.nu(e)},toCached:function(){var e=null;return Kt(function(){return null===e&&(e=n()),e})},toPromise:n,get:e}},Xt={nu:function(e){return Kt(function(){return new qt(e)})},pure:function(e){return Kt(function(){return qt.resolve(e)})}},Yt=function(e){return It(e,Xt.nu)},Gt=function(n){return{is:function(e){return n===e},isValue:a,isError:c,getOr:$(n),getOrThunk:$(n),getOrDie:$(n),or:function(e){return Gt(n)},orThunk:function(e){return Gt(n)},fold:function(e,t){return t(n)},map:function(e){return Gt(e(n))},mapError:function(e){return Gt(n)},each:function(e){e(n)},bind:function(e){return e(n)},exists:function(e){return e(n)},forall:function(e){return e(n)},toOption:function(){return k.some(n)}}},Jt=function(n){return{is:c,isValue:c,isError:a,getOr:W,getOrThunk:function(e){return e()},getOrDie:function(){return function(e){return function(){throw new Error(e)}}(String(n))()},or:function(e){return e},orThunk:function(e){return e()},fold:function(e,t){return e(n)},map:function(e){return Jt(n)},mapError:function(e){return Jt(e(n))},each:i,bind:function(e){return Jt(n)},exists:c,forall:a,toOption:k.none}},Qt={value:Gt,error:Jt,fromOption:function(e,t){return e.fold(function(){return Jt(t)},Gt)}},Zt=window.Promise?window.Promise:(Ft=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},Ut=tn.immediateFn||"function"==typeof j.setImmediate&&j.setImmediate||function(e){j.setTimeout(e,1)},tn.prototype["catch"]=function(e){return this.then(null,e)},tn.prototype.then=function(n,r){var o=this;return new tn(function(e,t){nn.call(o,new un(n,r,e,t))})},tn.all=function(){var s=Array.prototype.slice.call(1===arguments.length&&Ft(arguments[0])?arguments[0]:arguments);return new tn(function(o,i){if(0===s.length)return o([]);var a=s.length;function u(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){u(t,e)},i)}s[t]=e,0==--a&&o(s)}catch(r){i(r)}}for(var e=0;e<s.length;e++)u(e,s[e])})},tn.resolve=function(t){return t&&"object"==typeof t&&t.constructor===tn?t:new tn(function(e){e(t)})},tn.reject=function(n){return new tn(function(e,t){t(n)})},tn.race=function(o){return new tn(function(e,t){for(var n=0,r=o.length;n<r;n++)o[n].then(e,t)})},tn);function en(e,t){return function(){e.apply(t,arguments)}}function tn(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],sn(e,en(rn,this),en(on,this))}function nn(r){var o=this;null!==this._state?Ut(function(){var e=o._state?r.onFulfilled:r.onRejected;if(null!==e){var t;try{t=e(o._value)}catch(n){return void r.reject(n)}r.resolve(t)}else(o._state?r.resolve:r.reject)(o._value)}):this._deferreds.push(r)}function rn(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void sn(en(t,e),en(rn,this),en(on,this))}this._state=!0,this._value=e,an.call(this)}catch(n){on.call(this,n)}}function on(e){this._state=!1,this._value=e,an.call(this)}function an(){for(var e=0,t=this._deferreds.length;e<t;e++)nn.call(this,this._deferreds[e]);this._deferreds=null}function un(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 sn(e,t,n){var r=!1;try{e(function(e){r||(r=!0,t(e))},function(e){r||(r=!0,n(e))})}catch(o){if(r)return;r=!0,n(o)}}function cn(e,t){return"number"!=typeof t&&(t=0),j.setTimeout(e,t)}function ln(e,t){return"number"!=typeof t&&(t=1),j.setInterval(e,t)}function fn(n,r){var o,e;return(e=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];j.clearTimeout(o),o=cn(function(){n.apply(this,e)},r)}).stop=function(){j.clearTimeout(o)},e}function dn(e,t,n){var r,o;if(!e)return 0;if(n=n||e,e.length!==undefined){for(r=0,o=e.length;r<o;r++)if(!1===t.call(n,e[r],r,e))return 0}else for(r in e)if(e.hasOwnProperty(r)&&!1===t.call(n,e[r],r,e))return 0;return 1}function hn(e,t,n){var r,o;for(r=0,o=e.length;r<o;r++)if(t.call(n,e[r],r,e))return r;return-1}function mn(e){return null===e||e===undefined?"":(""+e).replace(Tn,"")}function gn(e,t){return t?!("array"!==t||!kn.isArray(e))||typeof e===t:e!==undefined}var pn={requestAnimationFrame:function(e,t){jt?jt.then(e):jt=new Zt(function(e){!function(e,t){var n,r=j.window.requestAnimationFrame,o=["ms","moz","webkit"];for(n=0;n<o.length&&!r;n++)r=j.window[o[n]+"RequestAnimationFrame"];(r=r||function(e){j.window.setTimeout(e,0)})(e,t)}(e,t=t||j.document.body)}).then(e)},setTimeout:cn,setInterval:ln,setEditorTimeout:function(e,t,n){return cn(function(){e.removed||t()},n)},setEditorInterval:function(e,t,n){var r;return r=ln(function(){e.removed?j.clearInterval(r):t()},n)},debounce:fn,throttle:fn,clearInterval:function(e){return j.clearInterval(e)},clearTimeout:function(e){return j.clearTimeout(e)}},vn=j.navigator.userAgent,yn=oe(),bn=yn.browser,Cn=yn.os,wn=yn.deviceType,xn=/WebKit/.test(vn)&&!bn.isEdge(),zn="FormData"in j.window&&"FileReader"in j.window&&"URL"in j.window&&!!j.URL.createObjectURL,En=-1!==vn.indexOf("Windows Phone"),Nn={opera:bn.isOpera(),webkit:xn,ie:!(!bn.isIE()&&!bn.isEdge())&&bn.version.major,gecko:bn.isFirefox(),mac:Cn.isOSX()||Cn.isiOS(),iOS:wn.isiPad()||wn.isiPhone(),android:Cn.isAndroid(),contentEditable:!0,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:!0,range:j.window.getSelection&&"Range"in j.window,documentMode:bn.isIE()?j.document.documentMode||7:10,fileApi:zn,ceFalse:!0,cacheSuffix:null,container:null,experimentalShadowDom:!1,canHaveCSP:!bn.isIE(),desktop:wn.isDesktop(),windowsPhone:En,browser:{current:bn.current,version:bn.version,isChrome:bn.isChrome,isEdge:bn.isEdge,isFirefox:bn.isFirefox,isIE:bn.isIE,isOpera:bn.isOpera,isSafari:bn.isSafari},os:{current:Cn.current,version:Cn.version,isAndroid:Cn.isAndroid,isFreeBSD:Cn.isFreeBSD,isiOS:Cn.isiOS,isLinux:Cn.isLinux,isOSX:Cn.isOSX,isSolaris:Cn.isSolaris,isWindows:Cn.isWindows},deviceType:{isDesktop:wn.isDesktop,isiPad:wn.isiPad,isiPhone:wn.isiPhone,isPhone:wn.isPhone,isTablet:wn.isTablet,isTouch:wn.isTouch,isWebView:wn.isWebView}},Sn=Array.isArray,kn={isArray:Sn,toArray:function(e){var t,n,r=e;if(!Sn(e))for(r=[],t=0,n=e.length;t<n;t++)r[t]=e[t];return r},each:dn,map:function(n,r){var o=[];return dn(n,function(e,t){o.push(r(e,t,n))}),o},filter:function(n,r){var o=[];return dn(n,function(e,t){r&&!r(e,t,n)||o.push(e)}),o},indexOf:function(e,t){var n,r;if(e)for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},reduce:function(e,t,n,r){var o=0;for(arguments.length<3&&(n=e[0]);o<e.length;o++)n=t.call(r,n,e[o],o);return n},findIndex:hn,find:function(e,t,n){var r=hn(e,t,n);return-1!==r?e[r]:undefined},last:function(e){return e[e.length-1]}},Tn=/^\s*|\s*$/g,An=function(e,n,r,o){o=o||this,e&&(r&&(e=e[r]),kn.each(e,function(e,t){if(!1===n.call(o,e,t,r))return!1;An(e,n,r,o)}))},Mn={trim:mn,isArray:kn.isArray,is:gn,toArray:kn.toArray,makeMap:function(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},each:kn.each,map:kn.map,grep:kn.filter,inArray:kn.indexOf,hasOwn:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},extend:function(e,t){for(var n,r,o,i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var u,s=arguments;for(n=1,r=s.length;n<r;n++)for(o in t=s[n])t.hasOwnProperty(o)&&(u=t[o])!==undefined&&(e[o]=u);return e},create:function(e,t,n){var r,o,i,a,u,s=this,c=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),i=e[3].match(/(^|\.)(\w+)$/i)[2],!(o=s.createNS(e[3].replace(/\.\w+$/,""),n))[i]){if("static"===e[2])return o[i]=t,void(this.onCreate&&this.onCreate(e[2],e[3],o[i]));t[i]||(t[i]=function(){},c=1),o[i]=t[i],s.extend(o[i].prototype,t),e[5]&&(r=s.resolve(e[5]).prototype,a=e[5].match(/\.(\w+)$/i)[1],u=o[i],o[i]=c?function(){return r[a].apply(this,arguments)}:function(){return this.parent=r[a],u.apply(this,arguments)},o[i].prototype[i]=o[i],s.each(r,function(e,t){o[i].prototype[t]=r[t]}),s.each(t,function(e,t){r[t]?o[i].prototype[t]=function(){return this.parent=r[t],e.apply(this,arguments)}:t!==i&&(o[i].prototype[t]=e)})),s.each(t["static"],function(e,t){o[i][t]=e})}},walk:An,createNS:function(e,t){var n,r;for(t=t||j.window,e=e.split("."),n=0;n<e.length;n++)t[r=e[n]]||(t[r]={}),t=t[r];return t},resolve:function(e,t){var n,r;for(t=t||j.window,n=0,r=(e=e.split(".")).length;n<r&&(t=t[e[n]]);n++);return t},explode:function(e,t){return!e||gn(e,"array")?e:kn.map(e.split(t||","),mn)},_addCacheSuffix:function(e){var t=Nn.cacheSuffix;return t&&(e+=(-1===e.indexOf("?")?"?":"&")+t),e}};function Rn(t){var n;return function(e){return(n=n||function(e,t){for(var n={},r=0,o=e.length;r<o;r++){var i=e[r];n[String(i)]=t(i,r)}return n}(t,$(!0))).hasOwnProperty(ie(e))}}function Dn(e){return xt(e)&&!Vn(e)}function _n(e){return xt(e)&&"br"===ie(e)}function Bn(e){return e&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")}var On,Hn,Pn,Ln=Rn(["h1","h2","h3","h4","h5","h6"]),Vn=Rn(["article","aside","details","div","dt","figcaption","footer","form","fieldset","header","hgroup","html","main","nav","section","summary","body","p","dl","multicol","dd","figure","address","center","blockquote","h1","h2","h3","h4","h5","h6","listing","xmp","pre","plaintext","menu","dir","ul","ol","li","hr","table","tbody","thead","tfoot","th","tr","td","caption"]),In=Rn(["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"]),Fn=Rn(["ul","ol","dl"]),Un=Rn(["li","dd","dt"]),jn=Rn(["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param","embed","source","wbr","track"]),qn=Rn(["thead","tbody","tfoot"]),$n=Rn(["td","th"]),Wn=Rn(["pre","script","textarea","style"]),Kn=function(e,t){var n,r=t.childNodes;if(!Ge.isElement(t)||!Bn(t)){for(n=r.length-1;0<=n;n--)Kn(e,r[n]);if(!1===Ge.isDocument(t)){if(Ge.isText(t)&&0<t.nodeValue.length){var o=Mn.trim(t.nodeValue).length;if(e.isBlock(t.parentNode)||0<o)return;if(0===o&&function(e){var t=e.previousSibling&&"SPAN"===e.previousSibling.nodeName,n=e.nextSibling&&"SPAN"===e.nextSibling.nodeName;return t&&n}(t))return}else if(Ge.isElement(t)&&(1===(r=t.childNodes).length&&Bn(r[0])&&t.parentNode.insertBefore(r[0],t),r.length||jn(yt.fromDom(t))))return;e.remove(t)}return t}},Xn={trimNode:Kn},Yn=Mn.makeMap,Gn=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Jn=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Qn=/[<>&\"\']/g,Zn=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,er={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"};Hn={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},Pn={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"};function tr(e,t){var n,r,o,i={};if(e){for(e=e.split(","),t=t||10,n=0;n<e.length;n+=2)r=String.fromCharCode(parseInt(e[n],t)),Hn[r]||(o="&"+e[n+1]+";",i[r]=o,i[o]=r);return i}}On=tr("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);function nr(e,t){return e.replace(t?Gn:Jn,function(e){return Hn[e]||e})}function rr(e,t){return e.replace(t?Gn:Jn,function(e){return 1<e.length?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":Hn[e]||"&#"+e.charCodeAt(0)+";"})}function or(e,t,n){return n=n||On,e.replace(t?Gn:Jn,function(e){return Hn[e]||n[e]||e})}var ir={encodeRaw:nr,encodeAllRaw:function(e){return(""+e).replace(Qn,function(e){return Hn[e]||e})},encodeNumeric:rr,encodeNamed:or,getEncodeFunc:function(e,t){var n=tr(t)||On,r=Yn(e.replace(/\+/g,","));return r.named&&r.numeric?function(e,t){return e.replace(t?Gn:Jn,function(e){return Hn[e]!==undefined?Hn[e]:n[e]!==undefined?n[e]:1<e.length?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":"&#"+e.charCodeAt(0)+";"})}:r.named?t?function(e,t){return or(e,t,n)}:or:r.numeric?rr:nr},decode:function(e){return e.replace(Zn,function(e,t){return t?65535<(t="x"===t.charAt(0).toLowerCase()?parseInt(t.substr(1),16):parseInt(t,10))?(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))):er[t]||String.fromCharCode(t):Pn[e]||On[e]||function(e){var t;return(t=yt.fromTag("div").dom()).innerHTML=e,t.textContent||t.innerText||e}(e)})}},ar={},ur={},sr=Mn.makeMap,cr=Mn.each,lr=Mn.extend,fr=Mn.explode,dr=Mn.inArray,hr=function(e,t){return(e=Mn.trim(e))?e.split(t||" "):[]},mr=function(e){function t(e,t,n){function r(e,t){var n,r,o={};for(n=0,r=e.length;n<r;n++)o[e[n]]=t||{};return o}var o,i,a;for(t=t||"","string"==typeof(n=n||[])&&(n=hr(n)),o=(e=hr(e)).length;o--;)a={attributes:r(i=hr([u,t].join(" "))),attributesOrder:i,children:r(n,ur)},c[e[o]]=a}function n(e,t){var n,r,o,i;for(n=(e=hr(e)).length,t=hr(t);n--;)for(r=c[e[n]],o=0,i=t.length;o<i;o++)r.attributes[t[o]]={},r.attributesOrder.push(t[o])}var u,r,o,i,a,s,c={};return ar[e]?ar[e]:(u="id accesskey class dir lang style tabindex title role",r="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",o="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&&(u+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",r+=" article aside details dialog figure main header footer hgroup section nav",o+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),"html5-strict"!==e&&(u+=" xml:lang",o=[o,s="acronym applet basefont big font strike tt"].join(" "),cr(hr(s),function(e){t(e,"",o)}),r=[r,a="center dir isindex noframes"].join(" "),i=[r,o].join(" "),cr(hr(a),function(e){t(e,"",i)})),i=i||[r,o].join(" "),t("html","manifest","head body"),t("head","","base command link meta noscript script style title"),t("title hr noscript br"),t("base","href target"),t("link","href rel media hreflang type sizes hreflang"),t("meta","name http-equiv content charset"),t("style","media type scoped"),t("script","src async defer type charset"),t("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",i),t("address dt dd div caption","",i),t("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","",o),t("blockquote","cite",i),t("ol","reversed start type","li"),t("ul","","li"),t("li","value",i),t("dl","","dt dd"),t("a","href target rel media hreflang type",o),t("q","cite",o),t("ins del","cite datetime",i),t("img","src sizes srcset alt usemap ismap width height"),t("iframe","src name width height",i),t("embed","src type width height"),t("object","data type typemustmatch name usemap form width height",[i,"param"].join(" ")),t("param","name value"),t("map","name",[i,"area"].join(" ")),t("area","alt coords shape href target rel media hreflang type"),t("table","border","caption colgroup thead tfoot tbody tr"+("html4"===e?" col":"")),t("colgroup","span","col"),t("col","span"),t("tbody thead tfoot","","tr"),t("tr","","td th"),t("td","colspan rowspan headers",i),t("th","colspan rowspan headers scope abbr",i),t("form","accept-charset action autocomplete enctype method name novalidate target",i),t("fieldset","disabled form name",[i,"legend"].join(" ")),t("label","form for",o),t("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"),t("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"===e?i:o),t("select","disabled form multiple name required size","option optgroup"),t("optgroup","disabled label","option"),t("option","disabled label selected value"),t("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),t("menu","type label",[i,"li"].join(" ")),t("noscript","",i),"html4"!==e&&(t("wbr"),t("ruby","",[o,"rt rp"].join(" ")),t("figcaption","",i),t("mark rt rp summary bdi","",o),t("canvas","width height",i),t("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[i,"track source"].join(" ")),t("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[i,"track source"].join(" ")),t("picture","","img source"),t("source","src srcset type media sizes"),t("track","kind src srclang label default"),t("datalist","",[o,"option"].join(" ")),t("article section nav aside main header footer","",i),t("hgroup","","h1 h2 h3 h4 h5 h6"),t("figure","",[i,"figcaption"].join(" ")),t("time","datetime",o),t("dialog","open",i),t("command","type label icon disabled checked radiogroup command"),t("output","for form name",o),t("progress","value max",o),t("meter","value min max low high optimum",o),t("details","open",[i,"summary"].join(" ")),t("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!==e&&(n("script","language xml:space"),n("style","xml:space"),n("object","declare classid code codebase codetype archive standby align border hspace vspace"),n("embed","align name hspace vspace"),n("param","valuetype type"),n("a","charset name rev shape coords"),n("br","clear"),n("applet","codebase archive code object alt name width height align hspace vspace"),n("img","name longdesc align border hspace vspace"),n("iframe","longdesc frameborder marginwidth marginheight scrolling align"),n("font basefont","size color face"),n("input","usemap align"),n("select","onchange"),n("textarea"),n("h1 h2 h3 h4 h5 h6 div p legend caption","align"),n("ul","type compact"),n("li","type"),n("ol dl menu dir","compact"),n("pre","width xml:space"),n("hr","align noshade size width"),n("isindex","prompt"),n("table","summary width frame rules cellspacing cellpadding align bgcolor"),n("col","width align char charoff valign"),n("colgroup","width align char charoff valign"),n("thead","align char charoff valign"),n("tr","align char charoff valign bgcolor"),n("th","axis align char charoff valign nowrap bgcolor width height"),n("form","accept"),n("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),n("tfoot","align char charoff valign"),n("tbody","align char charoff valign"),n("area","nohref"),n("body","background bgcolor text link vlink alink")),"html4"!==e&&(n("input button select textarea","autofocus"),n("input textarea","placeholder"),n("a","download"),n("link script img","crossorigin"),n("iframe","sandbox seamless allowfullscreen")),cr(hr("a form meter progress dfn"),function(e){c[e]&&delete c[e].children[e]}),delete c.caption.children.table,delete c.script,ar[e]=c)},gr=function(e,n){var r;return e&&(r={},"string"==typeof e&&(e={"*":e}),cr(e,function(e,t){r[t]=r[t.toUpperCase()]="map"===n?sr(e,/[, ]/):fr(e,/[, ]/)})),r};function pr(i){function e(e,t,n){var r=i[e];return r?r=sr(r,/[, ]/,sr(r.toUpperCase(),/[, ]/)):(r=ar[e])||(r=sr(t," ",sr(t.toUpperCase()," ")),r=lr(r,n),ar[e]=r),r}var t,n,r,o,a,u,s,c,l,f,d,h,m,z={},g={},E=[],p={},v={};r=mr((i=i||{}).schema),!1===i.verify_html&&(i.valid_elements="*[*]"),t=gr(i.valid_styles),n=gr(i.invalid_styles,"map"),c=gr(i.valid_classes,"map"),o=e("whitespace_elements","pre script noscript style textarea video audio iframe object code"),a=e("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),u=e("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),s=e("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),f=e("non_empty_elements","td th iframe video audio object script pre code",u),d=e("move_caret_before_on_enter_elements","table",f),h=e("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),l=e("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 details summary",h),m=e("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),cr((i.special||"script noscript noframes noembed title style textarea xmp").split(" "),function(e){v[e]=new RegExp("</"+e+"[^>]*>","gi")});function N(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")}function y(e){var t,n,r,o,i,a,u,s,c,l,f,d,h,m,g,p,v,y,b,C=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,w=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/,x=/[*?+]/;if(e)for(e=hr(e,","),z["@"]&&(p=z["@"].attributes,v=z["@"].attributesOrder),t=0,n=e.length;t<n;t++)if(i=C.exec(e[t])){if(m=i[1],c=i[2],g=i[3],s=i[5],a={attributes:d={},attributesOrder:h=[]},"#"===m&&(a.paddEmpty=!0),"-"===m&&(a.removeEmpty=!0),"!"===i[4]&&(a.removeEmptyAttrs=!0),p){for(y in p)d[y]=p[y];h.push.apply(h,v)}if(s)for(r=0,o=(s=hr(s,"|")).length;r<o;r++)if(i=w.exec(s[r])){if(u={},f=i[1],l=i[2].replace(/[\\:]:/g,":"),m=i[3],b=i[4],"!"===f&&(a.attributesRequired=a.attributesRequired||[],a.attributesRequired.push(l),u.required=!0),"-"===f){delete d[l],h.splice(dr(h,l),1);continue}m&&("="===m&&(a.attributesDefault=a.attributesDefault||[],a.attributesDefault.push({name:l,value:b}),u.defaultValue=b),":"===m&&(a.attributesForced=a.attributesForced||[],a.attributesForced.push({name:l,value:b}),u.forcedValue=b),"<"===m&&(u.validValues=sr(b,"?"))),x.test(l)?(a.attributePatterns=a.attributePatterns||[],u.pattern=N(l),a.attributePatterns.push(u)):(d[l]||h.push(l),d[l]=u)}p||"@"!==c||(p=d,v=h),g&&(a.outputName=c,z[g]=a),x.test(c)?(a.pattern=N(c),E.push(a)):z[c]=a}}function b(e){z={},E=[],y(e),cr(r,function(e,t){g[t]=e.children})}function C(e){var a=/^(~)?(.+)$/;e&&(ar.text_block_elements=ar.block_elements=null,cr(hr(e,","),function(e){var t=a.exec(e),n="~"===t[1],r=n?"span":"div",o=t[2];if(g[o]=g[r],p[o]=r,n||(l[o.toUpperCase()]={},l[o]={}),!z[o]){var i=z[r];delete(i=lr({},i)).removeEmptyAttrs,delete i.removeEmpty,z[o]=i}cr(g,function(e,t){e[r]&&(g[t]=e=lr({},g[t]),e[o]=e[r])})}))}function w(e){var o=/^([+\-]?)(\w+)\[([^\]]+)\]$/;ar[i.schema]=null,e&&cr(hr(e,","),function(e){var t,n,r=o.exec(e);r&&(n=r[1],t=n?g[r[2]]:g[r[2]]={"#comment":{}},t=g[r[2]],cr(hr(r[3],"|"),function(e){"-"===n?delete t[e]:t[e]={}}))})}function x(e){var t,n=z[e];if(n)return n;for(t=E.length;t--;)if((n=E[t]).pattern.test(e))return n}i.valid_elements?b(i.valid_elements):(cr(r,function(e,t){z[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},g[t]=e.children}),"html5"!==i.schema&&cr(hr("strong/b em/i"),function(e){e=hr(e,"/"),z[e[1]].outputName=e[0]}),cr(hr("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(e){z[e]&&(z[e].removeEmpty=!0)}),cr(hr("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"),function(e){z[e].paddEmpty=!0}),cr(hr("span"),function(e){z[e].removeEmptyAttrs=!0})),C(i.custom_elements),w(i.valid_children),y(i.extended_valid_elements),w("+ol[ul|ol],+ul[ul|ol]"),cr({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,t){z[t]&&(z[t].parentsRequired=hr(e))}),i.invalid_elements&&cr(fr(i.invalid_elements),function(e){z[e]&&delete z[e]}),x("span")||y("span[!data-mce-type|*]");return{children:g,elements:z,getValidStyles:function(){return t},getValidClasses:function(){return c},getBlockElements:function(){return l},getInvalidStyles:function(){return n},getShortEndedElements:function(){return u},getTextBlockElements:function(){return h},getTextInlineElements:function(){return m},getBoolAttrs:function(){return s},getElementRule:x,getSelfClosingElements:function(){return a},getNonEmptyElements:function(){return f},getMoveCaretBeforeOnEnterElements:function(){return d},getWhiteSpaceElements:function(){return o},getSpecialElements:function(){return v},isValidChild:function(e,t){var n=g[e.toLowerCase()];return!(!n||!n[t.toLowerCase()])},isValid:function(e,t){var n,r,o=x(e);if(o){if(!t)return!0;if(o.attributes[t])return!0;if(n=o.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(e))return!0}return!1},getCustomElements:function(){return p},addValidElements:y,setValidElements:b,addCustomElements:C,addValidChildren:w}}function vr(e,t,n,r){function o(e){return 1<(e=parseInt(e,10).toString(16)).length?e:"0"+e}return"#"+o(t)+o(n)+o(r)}function yr(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r||!1):e.attachEvent&&e.attachEvent("on"+t,n)}function br(e,t,n,r){e.removeEventListener?e.removeEventListener(t,n,r||!1):e.detachEvent&&e.detachEvent("on"+t,n)}function Cr(e,t){var n,r=t||{};for(n in e)Er[n]||(r[n]=e[n]);if(r.target||(r.target=r.srcElement||j.document),Nn.experimentalShadowDom&&(r.target=function(e,t){if(e.composedPath){var n=e.composedPath();if(n&&0<n.length)return n[0]}return t}(e,r.target)),e&&zr.test(e.type)&&e.pageX===undefined&&e.clientX!==undefined){var o=r.target.ownerDocument||j.document,i=o.documentElement,a=o.body;r.pageX=e.clientX+(i&&i.scrollLeft||a&&a.scrollLeft||0)-(i&&i.clientLeft||a&&a.clientLeft||0),r.pageY=e.clientY+(i&&i.scrollTop||a&&a.scrollTop||0)-(i&&i.clientTop||a&&a.clientTop||0)}return r.preventDefault=function(){r.isDefaultPrevented=Sr,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},r.stopPropagation=function(){r.isPropagationStopped=Sr,e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},!(r.stopImmediatePropagation=function(){r.isImmediatePropagationStopped=Sr,r.stopPropagation()})===function(e){return e.isDefaultPrevented===Sr||e.isDefaultPrevented===Nr}(r)&&(r.isDefaultPrevented=Nr,r.isPropagationStopped=Nr,r.isImmediatePropagationStopped=Nr),"undefined"==typeof r.metaKey&&(r.metaKey=!1),r}function wr(e,t,n){var r=e.document,o={type:"ready"};if(n.domLoaded)t(o);else{var i=function(){br(e,"DOMContentLoaded",i),br(e,"load",i),n.domLoaded||(n.domLoaded=!0,t(o))};"complete"===r.readyState||"interactive"===r.readyState&&r.body?i():yr(e,"DOMContentLoaded",i),yr(e,"load",i)}}var xr=function(b,e){var C,t,c,l,w=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,x=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,z=/\s*([^:]+):\s*([^;]+);?/g,E=/\s+$/,N={},S="\ufeff";for(b=b||{},e&&(c=e.getValidStyles(),l=e.getInvalidStyles()),t=("\\\" \\' \\; \\: ; : "+S).split(" "),C=0;C<t.length;C++)N[t[C]]=S+C,N[S+C]=t[C];return{toHex:function(e){return e.replace(w,vr)},parse:function(e){function t(e,t,n){var r,o,i,a;if((r=p[e+"-top"+t])&&(o=p[e+"-right"+t])&&(i=p[e+"-bottom"+t])&&(a=p[e+"-left"+t])){var u=[r,o,i,a];for(C=u.length-1;C--&&u[C]===u[C+1];);-1<C&&n||(p[e+t]=-1===C?u[0]:u.join(" "),delete p[e+"-top"+t],delete p[e+"-right"+t],delete p[e+"-bottom"+t],delete p[e+"-left"+t])}}function n(e){var t,n=p[e];if(n){for(t=(n=n.split(" ")).length;t--;)if(n[t]!==n[0])return!1;return p[e]=n[0],!0}}function r(e){return f=!0,N[e]}function u(e,t){return f&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return N[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e}function o(e){return String.fromCharCode(parseInt(e.slice(1),16))}function i(e){return e.replace(/\\[0-9a-f]+/gi,o)}function a(e,t,n,r,o,i){if(o=o||i)return"'"+(o=u(o)).replace(/\'/g,"\\'")+"'";if(t=u(t||n||r),!b.allow_script_urls){var a=t.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(a))return"";if(!b.allow_svg_data_urls&&/^data:image\/svg/i.test(a))return""}return v&&(t=v.call(y,t,"style")),"url('"+t.replace(/\'/g,"\\'")+"')"}var s,c,l,f,d,h,m,g,p={},v=b.url_converter,y=b.url_converter_scope||this;if(e){for(e=(e=e.replace(/[\u0000-\u001F]/g,"")).replace(/\\[\"\';:\uFEFF]/g,r).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,r)});s=z.exec(e);)if(z.lastIndex=s.index+s[0].length,c=s[1].replace(E,"").toLowerCase(),l=s[2].replace(E,""),c&&l){if(c=i(c),l=i(l),-1!==c.indexOf(S)||-1!==c.indexOf('"'))continue;if(!b.allow_script_urls&&("behavior"===c||/expression\s*\(|\/\*|\*\//.test(l)))continue;"font-weight"===c&&"700"===l?l="bold":"color"!==c&&"background-color"!==c||(l=l.toLowerCase()),l=(l=l.replace(w,vr)).replace(x,a),p[c]=f?u(l,!0):l}t("border","",!0),t("border","-width"),t("border","-color"),t("border","-style"),t("padding",""),t("margin",""),d="border",m="border-style",g="border-color",n(h="border-width")&&n(m)&&n(g)&&(p[d]=p[h]+" "+p[m]+" "+p[g],delete p[h],delete p[m],delete p[g]),"medium none"===p.border&&delete p.border,"none"===p["border-image"]&&delete p["border-image"]}return p},serialize:function(i,e){function t(e){var t,n,r,o;if(t=c[e])for(n=0,r=t.length;n<r;n++)e=t[n],(o=i[e])&&(s+=(0<s.length?" ":"")+e+": "+o+";")}var n,r,o,a,u,s="";if(e&&c)t("*"),t(e);else for(n in i)!(r=i[n])||l&&(o=n,a=e,u=void 0,(u=l["*"])&&u[o]||(u=l[a])&&u[o])||(s+=(0<s.length?" ":"")+n+": "+r+";");return s}}},zr=/^(?:mouse|contextmenu)|click/,Er={keyLocation:1,layerX:1,layerY:1,returnValue:1,webkitMovementX:1,webkitMovementY:1,keyIdentifier:1,mozPressure:1},Nr=function(){return!1},Sr=function(){return!0},kr=(Tr.prototype.bind=function(e,t,n,r){function o(e){d.executeHandlers(Cr(e||h.event),i)}var i,a,u,s,c,l,f,d=this,h=j.window;if(e&&3!==e.nodeType&&8!==e.nodeType){e[d.expando]?i=e[d.expando]:(i=d.count++,e[d.expando]=i,d.events[i]={}),r=r||e;var m=t.split(" ");for(u=m.length;u--;)l=o,c=f=!1,"DOMContentLoaded"===(s=m[u])&&(s="ready"),d.domLoaded&&"ready"===s&&"complete"===e.readyState?n.call(r,Cr({type:s})):(d.hasMouseEnterLeave||(c=d.mouseEnterLeave[s])&&(l=function(e){var t,n;if(t=e.currentTarget,(n=e.relatedTarget)&&t.contains)n=t.contains(n);else for(;n&&n!==t;)n=n.parentNode;n||((e=Cr(e||h.event)).type="mouseout"===e.type?"mouseleave":"mouseenter",e.target=t,d.executeHandlers(e,i))}),d.hasFocusIn||"focusin"!==s&&"focusout"!==s||(f=!0,c="focusin"===s?"focus":"blur",l=function(e){(e=Cr(e||h.event)).type="focus"===e.type?"focusin":"focusout",d.executeHandlers(e,i)}),(a=d.events[i][s])?"ready"===s&&d.domLoaded?n(Cr({type:s})):a.push({func:n,scope:r}):(d.events[i][s]=a=[{func:n,scope:r}],a.fakeName=c,a.capture=f,a.nativeHandler=l,"ready"===s?wr(e,l,d):yr(e,c||s,l,f)));return e=a=0,n}},Tr.prototype.unbind=function(e,t,n){var r,o,i,a,u,s;if(!e||3===e.nodeType||8===e.nodeType)return this;if(r=e[this.expando]){if(s=this.events[r],t){var c=t.split(" ");for(i=c.length;i--;)if(o=s[u=c[i]]){if(n)for(a=o.length;a--;)if(o[a].func===n){var l=o.nativeHandler,f=o.fakeName,d=o.capture;(o=o.slice(0,a).concat(o.slice(a+1))).nativeHandler=l,o.fakeName=f,o.capture=d,s[u]=o}n&&0!==o.length||(delete s[u],br(e,o.fakeName||u,o.nativeHandler,o.capture))}}else{for(u in s)o=s[u],br(e,o.fakeName||u,o.nativeHandler,o.capture);s={}}for(u in s)return this;delete this.events[r];try{delete e[this.expando]}catch(h){e[this.expando]=null}}return this},Tr.prototype.fire=function(e,t,n){var r;if(!e||3===e.nodeType||8===e.nodeType)return this;var o=Cr(null,n);for(o.type=t,o.target=e;(r=e[this.expando])&&this.executeHandlers(o,r),(e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow)&&!o.isPropagationStopped(););return this},Tr.prototype.clean=function(e){var t,n;if(!e||3===e.nodeType||8===e.nodeType)return this;if(e[this.expando]&&this.unbind(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(this.unbind(e),t=(n=e.getElementsByTagName("*")).length;t--;)(e=n[t])[this.expando]&&this.unbind(e);return this},Tr.prototype.destroy=function(){this.events={}},Tr.prototype.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1},Tr.prototype.executeHandlers=function(e,t){var n,r,o,i,a=this.events[t];if(n=a&&a[e.type])for(r=0,o=n.length;r<o;r++)if((i=n[r])&&!1===i.func.call(i.scope,e)&&e.preventDefault(),e.isImmediatePropagationStopped())return},Tr.Event=new Tr,Tr);function Tr(){this.domLoaded=!1,this.events={},this.count=1,this.expando="mce-data-"+(+new Date).toString(32),this.hasMouseEnterLeave="onmouseenter"in j.document.documentElement,this.hasFocusIn="onfocusin"in j.document.documentElement,this.count=1}function Ar(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(65536+r):String.fromCharCode(r>>10|55296,1023&r|56320)}var Mr,Rr,Dr,_r,Br,Or,Hr,Pr,Lr,Vr,Ir,Fr,Ur,jr,qr,$r,Wr,Kr,Xr="sizzle"+-new Date,Yr=j.window.document,Gr=0,Jr=0,Qr=Mo(),Zr=Mo(),eo=Mo(),to=function(e,t){return e===t&&(Ir=!0),0},no=typeof undefined,ro={}.hasOwnProperty,oo=[],io=oo.pop,ao=oo.push,uo=oo.push,so=oo.slice,co=oo.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1},lo="[\\x20\\t\\r\\n\\f]",fo="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ho="\\["+lo+"*("+fo+")(?:"+lo+"*([*^$|!~]?=)"+lo+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+fo+"))|)"+lo+"*\\]",mo=":("+fo+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ho+")*)|.*)\\)|)",go=new RegExp("^"+lo+"+|((?:^|[^\\\\])(?:\\\\.)*)"+lo+"+$","g"),po=new RegExp("^"+lo+"*,"+lo+"*"),vo=new RegExp("^"+lo+"*([>+~]|"+lo+")"+lo+"*"),yo=new RegExp("="+lo+"*([^\\]'\"]*?)"+lo+"*\\]","g"),bo=new RegExp(mo),Co=new RegExp("^"+fo+"$"),wo={ID:new RegExp("^#("+fo+")"),CLASS:new RegExp("^\\.("+fo+")"),TAG:new RegExp("^("+fo+"|[*])"),ATTR:new RegExp("^"+ho),PSEUDO:new RegExp("^"+mo),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+lo+"*(even|odd|(([+-]|)(\\d*)n|)"+lo+"*(?:([+-]|)"+lo+"*(\\d+)|))"+lo+"*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^"+lo+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+lo+"*((?:-\\d)?\\d*)"+lo+"*\\)|)(?=[^-]|$)","i")},xo=/^(?:input|select|textarea|button)$/i,zo=/^h\d$/i,Eo=/^[^{]+\{\s*\[native \w/,No=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,So=/[+~]/,ko=/'|\\/g,To=new RegExp("\\\\([\\da-f]{1,6}"+lo+"?|("+lo+")|.)","ig");try{uo.apply(oo=so.call(Yr.childNodes),Yr.childNodes),oo[Yr.childNodes.length].nodeType}catch(yN){uo={apply:oo.length?function(e,t){ao.apply(e,so.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}var Ao=function(e,t,n,r){var o,i,a,u,s,c,l,f,d,h;if((t?t.ownerDocument||t:Yr)!==Ur&&Fr(t),n=n||[],!e||"string"!=typeof e)return n;if(1!==(u=(t=t||Ur).nodeType)&&9!==u)return[];if(qr&&!r){if(o=No.exec(e))if(a=o[1]){if(9===u){if(!(i=t.getElementById(a))||!i.parentNode)return n;if(i.id===a)return n.push(i),n}else if(t.ownerDocument&&(i=t.ownerDocument.getElementById(a))&&Kr(t,i)&&i.id===a)return n.push(i),n}else{if(o[2])return uo.apply(n,t.getElementsByTagName(e)),n;if((a=o[3])&&Rr.getElementsByClassName)return uo.apply(n,t.getElementsByClassName(a)),n}if(Rr.qsa&&(!$r||!$r.test(e))){if(f=l=Xr,d=t,h=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){for(c=Or(e),(l=t.getAttribute("id"))?f=l.replace(ko,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",s=c.length;s--;)c[s]=f+Lo(c[s]);d=So.test(e)&&Ho(t.parentNode)||t,h=c.join(",")}if(h)try{return uo.apply(n,d.querySelectorAll(h)),n}catch(m){}finally{l||t.removeAttribute("id")}}}return Pr(e.replace(go,"$1"),t,n,r)};function Mo(){var n=[];return function r(e,t){return n.push(e+" ")>Dr.cacheLength&&delete r[n.shift()],r[e+" "]=t}}function Ro(e){return e[Xr]=!0,e}function Do(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function _o(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function Bo(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function Oo(a){return Ro(function(i){return i=+i,Ro(function(e,t){for(var n,r=a([],e.length,i),o=r.length;o--;)e[n=r[o]]&&(e[n]=!(t[n]=e[n]))})})}function Ho(e){return e&&typeof e.getElementsByTagName!=no&&e}for(Mr in Rr=Ao.support={},Br=Ao.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},Fr=Ao.setDocument=function(e){var t,s=e?e.ownerDocument||e:Yr,n=s.defaultView;return s!==Ur&&9===s.nodeType&&s.documentElement?(jr=(Ur=s).documentElement,qr=!Br(s),n&&n!==function r(e){try{return e.top}catch(t){}return null}(n)&&(n.addEventListener?n.addEventListener("unload",function(){Fr()},!1):n.attachEvent&&n.attachEvent("onunload",function(){Fr()})),Rr.attributes=!0,Rr.getElementsByTagName=!0,Rr.getElementsByClassName=Eo.test(s.getElementsByClassName),Rr.getById=!0,Dr.find.ID=function(e,t){if(typeof t.getElementById!=no&&qr){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},Dr.filter.ID=function(e){var t=e.replace(To,Ar);return function(e){return e.getAttribute("id")===t}},Dr.find.TAG=Rr.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!=no)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"!==e)return i;for(;n=i[o++];)1===n.nodeType&&r.push(n);return r},Dr.find.CLASS=Rr.getElementsByClassName&&function(e,t){if(qr)return t.getElementsByClassName(e)},Wr=[],$r=[],Rr.disconnectedMatch=!0,$r=$r.length&&new RegExp($r.join("|")),Wr=Wr.length&&new RegExp(Wr.join("|")),t=Eo.test(jr.compareDocumentPosition),Kr=t||Eo.test(jr.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},to=t?function(e,t){if(e===t)return Ir=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!Rr.sortDetached&&t.compareDocumentPosition(e)===n?e===s||e.ownerDocument===Yr&&Kr(Yr,e)?-1:t===s||t.ownerDocument===Yr&&Kr(Yr,t)?1:Vr?co.call(Vr,e)-co.call(Vr,t):0:4&n?-1:1)}:function(e,t){if(e===t)return Ir=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,a=[e],u=[t];if(!o||!i)return e===s?-1:t===s?1:o?-1:i?1:Vr?co.call(Vr,e)-co.call(Vr,t):0;if(o===i)return Do(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;a[r]===u[r];)r++;return r?Do(a[r],u[r]):a[r]===Yr?-1:u[r]===Yr?1:0},s):Ur},Ao.matches=function(e,t){return Ao(e,null,null,t)},Ao.matchesSelector=function(e,t){if((e.ownerDocument||e)!==Ur&&Fr(e),t=t.replace(yo,"='$1']"),Rr.matchesSelector&&qr&&(!Wr||!Wr.test(t))&&(!$r||!$r.test(t)))try{var n=(void 0).call(e,t);if(n||Rr.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(yN){}return 0<Ao(t,Ur,null,[e]).length},Ao.contains=function(e,t){return(e.ownerDocument||e)!==Ur&&Fr(e),Kr(e,t)},Ao.attr=function(e,t){(e.ownerDocument||e)!==Ur&&Fr(e);var n=Dr.attrHandle[t.toLowerCase()],r=n&&ro.call(Dr.attrHandle,t.toLowerCase())?n(e,t,!qr):undefined;return r!==undefined?r:Rr.attributes||!qr?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},Ao.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},Ao.uniqueSort=function(e){var t,n=[],r=0,o=0;if(Ir=!Rr.detectDuplicates,Vr=!Rr.sortStable&&e.slice(0),e.sort(to),Ir){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return Vr=null,e},_r=Ao.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=_r(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=_r(t);return n},(Dr=Ao.selectors={cacheLength:50,createPseudo:Ro,match:wo,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(To,Ar),e[3]=(e[3]||e[4]||e[5]||"").replace(To,Ar),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||Ao.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&Ao.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return wo.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&bo.test(n)&&(t=Or(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(To,Ar).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=Qr[e+" "];return t||(t=new RegExp("(^|"+lo+")"+e+"("+lo+"|$)"))&&Qr(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!=no&&e.getAttribute("class")||"")})},ATTR:function(n,r,o){return function(e){var t=Ao.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===o:"!="===r?t!==o:"^="===r?o&&0===t.indexOf(o):"*="===r?o&&-1<t.indexOf(o):"$="===r?o&&t.slice(-o.length)===o:"~="===r?-1<(" "+t+" ").indexOf(o):"|="===r&&(t===o||t.slice(0,o.length+1)===o+"-"))}},CHILD:function(h,e,t,m,g){var p="nth"!==h.slice(0,3),v="last"!==h.slice(-4),y="of-type"===e;return 1===m&&0===g?function(e){return!!e.parentNode}:function(e,t,n){var r,o,i,a,u,s,c=p!=v?"nextSibling":"previousSibling",l=e.parentNode,f=y&&e.nodeName.toLowerCase(),d=!n&&!y;if(l){if(p){for(;c;){for(i=e;i=i[c];)if(y?i.nodeName.toLowerCase()===f:1===i.nodeType)return!1;s=c="only"===h&&!s&&"nextSibling"}return!0}if(s=[v?l.firstChild:l.lastChild],v&&d){for(u=(r=(o=l[Xr]||(l[Xr]={}))[h]||[])[0]===Gr&&r[1],a=r[0]===Gr&&r[2],i=u&&l.childNodes[u];i=++u&&i&&i[c]||(a=u=0)||s.pop();)if(1===i.nodeType&&++a&&i===e){o[h]=[Gr,u,a];break}}else if(d&&(r=(e[Xr]||(e[Xr]={}))[h])&&r[0]===Gr)a=r[1];else for(;(i=++u&&i&&i[c]||(a=u=0)||s.pop())&&((y?i.nodeName.toLowerCase()!==f:1!==i.nodeType)||!++a||(d&&((i[Xr]||(i[Xr]={}))[h]=[Gr,a]),i!==e)););return(a-=g)===m||a%m==0&&0<=a/m}}},PSEUDO:function(e,i){var t,a=Dr.pseudos[e]||Dr.setFilters[e.toLowerCase()]||Ao.error("unsupported pseudo: "+e);return a[Xr]?a(i):1<a.length?(t=[e,e,"",i],Dr.setFilters.hasOwnProperty(e.toLowerCase())?Ro(function(e,t){for(var n,r=a(e,i),o=r.length;o--;)e[n=co.call(e,r[o])]=!(t[n]=r[o])}):function(e){return a(e,0,t)}):a}},pseudos:{not:Ro(function(e){var r=[],o=[],u=Hr(e.replace(go,"$1"));return u[Xr]?Ro(function(e,t,n,r){for(var o,i=u(e,null,r,[]),a=e.length;a--;)(o=i[a])&&(e[a]=!(t[a]=o))}):function(e,t,n){return r[0]=e,u(r,null,n,o),!o.pop()}}),has:Ro(function(t){return function(e){return 0<Ao(t,e).length}}),contains:Ro(function(t){return t=t.replace(To,Ar),function(e){return-1<(e.textContent||e.innerText||_r(e)).indexOf(t)}}),lang:Ro(function(n){return Co.test(n||"")||Ao.error("unsupported lang: "+n),n=n.replace(To,Ar).toLowerCase(),function(e){var t;do{if(t=qr?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=j.window.location&&j.window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===jr},focus:function(e){return e===Ur.activeElement&&(!Ur.hasFocus||Ur.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!Dr.pseudos.empty(e)},header:function(e){return zo.test(e.nodeName)},input:function(e){return xo.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:Oo(function(){return[0]}),last:Oo(function(e,t){return[t-1]}),eq:Oo(function(e,t,n){return[n<0?n+t:n]}),even:Oo(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:Oo(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:Oo(function(e,t,n){for(var r=n<0?n+t:n;0<=--r;)e.push(r);return e}),gt:Oo(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=Dr.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})Dr.pseudos[Mr]=_o(Mr);for(Mr in{submit:!0,reset:!0})Dr.pseudos[Mr]=Bo(Mr);function Po(){}function Lo(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function Vo(a,e,t){var u=e.dir,s=t&&"parentNode"===u,c=Jr++;return e.first?function(e,t,n){for(;e=e[u];)if(1===e.nodeType||s)return a(e,t,n)}:function(e,t,n){var r,o,i=[Gr,c];if(n){for(;e=e[u];)if((1===e.nodeType||s)&&a(e,t,n))return!0}else for(;e=e[u];)if(1===e.nodeType||s){if((r=(o=e[Xr]||(e[Xr]={}))[u])&&r[0]===Gr&&r[1]===c)return i[2]=r[2];if((o[u]=i)[2]=a(e,t,n))return!0}}}function Io(o){return 1<o.length?function(e,t,n){for(var r=o.length;r--;)if(!o[r](e,t,n))return!1;return!0}:o[0]}function Fo(e,t,n,r,o){for(var i,a=[],u=0,s=e.length,c=null!=t;u<s;u++)(i=e[u])&&(n&&!n(i,r,o)||(a.push(i),c&&t.push(u)));return a}function Uo(m,g,p,v,y,e){return v&&!v[Xr]&&(v=Uo(v)),y&&!y[Xr]&&(y=Uo(y,e)),Ro(function(e,t,n,r){var o,i,a,u=[],s=[],c=t.length,l=e||function h(e,t,n){for(var r=0,o=t.length;r<o;r++)Ao(e,t[r],n);return n}(g||"*",n.nodeType?[n]:n,[]),f=!m||!e&&g?l:Fo(l,u,m,n,r),d=p?y||(e?m:c||v)?[]:t:f;if(p&&p(f,d,n,r),v)for(o=Fo(d,s),v(o,[],n,r),i=o.length;i--;)(a=o[i])&&(d[s[i]]=!(f[s[i]]=a));if(e){if(y||m){if(y){for(o=[],i=d.length;i--;)(a=d[i])&&o.push(f[i]=a);y(null,d=[],o,r)}for(i=d.length;i--;)(a=d[i])&&-1<(o=y?co.call(e,a):u[i])&&(e[o]=!(t[o]=a))}}else d=Fo(d===t?d.splice(c,d.length):d),y?y(null,t,d,r):uo.apply(t,d)})}function jo(e){for(var r,t,n,o=e.length,i=Dr.relative[e[0].type],a=i||Dr.relative[" "],u=i?1:0,s=Vo(function(e){return e===r},a,!0),c=Vo(function(e){return-1<co.call(r,e)},a,!0),l=[function(e,t,n){return!i&&(n||t!==Lr)||((r=t).nodeType?s(e,t,n):c(e,t,n))}];u<o;u++)if(t=Dr.relative[e[u].type])l=[Vo(Io(l),t)];else{if((t=Dr.filter[e[u].type].apply(null,e[u].matches))[Xr]){for(n=++u;n<o&&!Dr.relative[e[n].type];n++);return Uo(1<u&&Io(l),1<u&&Lo(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(go,"$1"),t,u<n&&jo(e.slice(u,n)),n<o&&jo(e=e.slice(n)),n<o&&Lo(e))}l.push(t)}return Io(l)}Po.prototype=Dr.filters=Dr.pseudos,Dr.setFilters=new Po,Or=Ao.tokenize=function(e,t){var n,r,o,i,a,u,s,c=Zr[e+" "];if(c)return t?0:c.slice(0);for(a=e,u=[],s=Dr.preFilter;a;){for(i in n&&!(r=po.exec(a))||(r&&(a=a.slice(r[0].length)||a),u.push(o=[])),n=!1,(r=vo.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(go," ")}),a=a.slice(n.length)),Dr.filter)Dr.filter.hasOwnProperty(i)&&(!(r=wo[i].exec(a))||s[i]&&!(r=s[i](r))||(n=r.shift(),o.push({value:n,type:i,matches:r}),a=a.slice(n.length)));if(!n)break}return t?a.length:a?Ao.error(e):Zr(e,u).slice(0)},Hr=Ao.compile=function(e,t){var n,r=[],o=[],i=eo[e+" "];if(!i){for(n=(t=t||Or(e)).length;n--;)(i=jo(t[n]))[Xr]?r.push(i):o.push(i);(i=eo(e,function a(p,v){function e(e,t,n,r,o){var i,a,u,s=0,c="0",l=e&&[],f=[],d=Lr,h=e||b&&Dr.find.TAG("*",o),m=Gr+=null==d?1:Math.random()||.1,g=h.length;for(o&&(Lr=t!==Ur&&t);c!==g&&null!=(i=h[c]);c++){if(b&&i){for(a=0;u=p[a++];)if(u(i,t,n)){r.push(i);break}o&&(Gr=m)}y&&((i=!u&&i)&&s--,e&&l.push(i))}if(s+=c,y&&c!==s){for(a=0;u=v[a++];)u(l,f,t,n);if(e){if(0<s)for(;c--;)l[c]||f[c]||(f[c]=io.call(r));f=Fo(f)}uo.apply(r,f),o&&!e&&0<f.length&&1<s+v.length&&Ao.uniqueSort(r)}return o&&(Gr=m,Lr=d),l}var y=0<v.length,b=0<p.length;return y?Ro(e):e}(o,r))).selector=e}return i},Pr=Ao.select=function(e,t,n,r){var o,i,a,u,s,c="function"==typeof e&&e,l=!r&&Or(e=c.selector||e);if(n=n||[],1===l.length){if(2<(i=l[0]=l[0].slice(0)).length&&"ID"===(a=i[0]).type&&Rr.getById&&9===t.nodeType&&qr&&Dr.relative[i[1].type]){if(!(t=(Dr.find.ID(a.matches[0].replace(To,Ar),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(o=wo.needsContext.test(e)?0:i.length;o--&&(a=i[o],!Dr.relative[u=a.type]);)if((s=Dr.find[u])&&(r=s(a.matches[0].replace(To,Ar),So.test(i[0].type)&&Ho(t.parentNode)||t))){if(i.splice(o,1),!(e=r.length&&Lo(i)))return uo.apply(n,r),n;break}}return(c||Hr(e,l))(r,t,!qr,n,So.test(e)&&Ho(t.parentNode)||t),n},Rr.sortStable=Xr.split("").sort(to).join("")===Xr,Rr.detectDuplicates=!!Ir,Fr(),Rr.sortDetached=!0;function qo(e){return void 0!==e}function $o(e){return"string"==typeof e}function Wo(e,t){var n,r,o;for(o=(t=t||Zo).createElement("div"),n=t.createDocumentFragment(),o.innerHTML=e;r=o.firstChild;)n.appendChild(r);return n}function Ko(e,t){return e&&t&&-1!==(" "+e.className+" ").indexOf(" "+t+" ")}function Xo(e,t,n){var r,o;return t=vi(t)[0],e.each(function(){n&&r===this.parentNode||(r=this.parentNode,o=t.cloneNode(!1),this.parentNode.insertBefore(o,this)),o.appendChild(this)}),e}function Yo(e,t){return new vi.fn.init(e,t)}function Go(e){return null===e||e===undefined?"":(""+e).replace(di,"")}function Jo(e,t){var n,r,o,i;if(e)if((n=e.length)===undefined){for(r in e)if(e.hasOwnProperty(r)&&(i=e[r],!1===t.call(i,r,i)))break}else for(o=0;o<n&&(i=e[o],!1!==t.call(i,o,i));o++);return e}function Qo(e,n){var r=[];return Jo(e,function(e,t){n(t,e)&&r.push(t)}),r}var Zo=j.document,ei=Array.prototype.push,ti=Array.prototype.slice,ni=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,ri=kr.Event,oi=Mn.makeMap("children,contents,next,prev"),ii=function(e,t,n,r){var o;if($o(t))t=Wo(t,hi(e[0]));else if(t.length&&!t.nodeType){if(t=vi.makeArray(t),r)for(o=t.length-1;0<=o;o--)ii(e,t[o],n,r);else for(o=0;o<t.length;o++)ii(e,t[o],n,r);return e}if(t.nodeType)for(o=e.length;o--;)n.call(e[o],t);return e},ai=Mn.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),ui=Mn.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),si={"for":"htmlFor","class":"className",readonly:"readOnly"},ci={"float":"cssFloat"},li={},fi={},di=/^\s*|\s*$/g,hi=function(e){return e?9===e.nodeType?e:e.ownerDocument:Zo};Yo.fn=Yo.prototype={constructor:Yo,selector:"",context:null,length:0,init:function(e,t){var n,r,o=this;if(!e)return o;if(e.nodeType)return o.context=o[0]=e,o.length=1,o;if(t&&t.nodeType)o.context=t;else{if(t)return vi(e).attr(t);o.context=t=j.document}if($o(e)){if(!(n="<"===(o.selector=e).charAt(0)&&">"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:ni.exec(e)))return vi(t).find(e);if(n[1])for(r=Wo(e,hi(t)).firstChild;r;)ei.call(o,r),r=r.nextSibling;else{if(!(r=hi(t).getElementById(n[2])))return o;if(r.id!==n[2])return o.find(e);o.length=1,o[0]=r}}else this.add(e,!1);return o},toArray:function(){return Mn.toArray(this)},add:function(e,t){var n,r;if($o(e))return this.add(vi(e));if(!1!==t)for(n=vi.unique(this.toArray().concat(vi.makeArray(e))),this.length=n.length,r=0;r<n.length;r++)this[r]=n[r];else ei.apply(this,vi.makeArray(e));return this},attr:function(t,n){var e,r=this;if("object"==typeof t)Jo(t,function(e,t){r.attr(e,t)});else{if(!qo(n)){if(r[0]&&1===r[0].nodeType){if((e=li[t])&&e.get)return e.get(r[0],t);if(ui[t])return r.prop(t)?t:undefined;null===(n=r[0].getAttribute(t,2))&&(n=undefined)}return n}this.each(function(){var e;if(1===this.nodeType){if((e=li[t])&&e.set)return void e.set(this,n);null===n?this.removeAttribute(t,2):this.setAttribute(t,n,2)}})}return r},removeAttr:function(e){return this.attr(e,null)},prop:function(e,t){var n=this;if("object"==typeof(e=si[e]||e))Jo(e,function(e,t){n.prop(e,t)});else{if(!qo(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(n,r){function e(e){return e.replace(/-(\D)/g,function(e,t){return t.toUpperCase()})}function o(e){return e.replace(/[A-Z]/g,function(e){return"-"+e})}var t,i,a=this;if("object"==typeof n)Jo(n,function(e,t){a.css(e,t)});else if(qo(r))n=e(n),"number"!=typeof r||ai[n]||(r=r.toString()+"px"),a.each(function(){var e=this.style;if((i=fi[n])&&i.set)i.set(this,r);else{try{this.style[ci[n]||n]=r}catch(t){}null!==r&&""!==r||(e.removeProperty?e.removeProperty(o(n)):e.removeAttribute(n))}});else{if(t=a[0],(i=fi[n])&&i.get)return i.get(t);if(!t.ownerDocument.defaultView)return t.currentStyle?t.currentStyle[e(n)]:"";try{return t.ownerDocument.defaultView.getComputedStyle(t,null).getPropertyValue(o(n))}catch(u){return undefined}}return a},remove:function(){for(var e,t=this.length;t--;)e=this[t],ri.clean(e),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var e,t=this.length;t--;)for(e=this[t];e.firstChild;)e.removeChild(e.firstChild);return this},html:function(e){var t,n=this;if(qo(e)){t=n.length;try{for(;t--;)n[t].innerHTML=e}catch(r){vi(n[t]).empty().append(e)}return n}return n[0]?n[0].innerHTML:""},text:function(e){var t;if(qo(e)){for(t=this.length;t--;)"innerText"in this[t]?this[t].innerText=e:this[0].textContent=e;return this}return this[0]?this[0].innerText||this[0].textContent:""},append:function(){return ii(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.appendChild(e)})},prepend:function(){return ii(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.insertBefore(e,this.firstChild)},!0)},before:function(){return this[0]&&this[0].parentNode?ii(this,arguments,function(e){this.parentNode.insertBefore(e,this)}):this},after:function(){return this[0]&&this[0].parentNode?ii(this,arguments,function(e){this.parentNode.insertBefore(e,this.nextSibling)},!0):this},appendTo:function(e){return vi(e).append(this),this},prependTo:function(e){return vi(e).prepend(this),this},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){return Xo(this,e)},wrapAll:function(e){return Xo(this,e,!0)},wrapInner:function(e){return this.each(function(){vi(this).contents().wrapAll(e)}),this},unwrap:function(){return this.parent().each(function(){vi(this).replaceWith(this.childNodes)})},clone:function(){var e=[];return this.each(function(){e.push(this.cloneNode(!0))}),vi(e)},addClass:function(e){return this.toggleClass(e,!0)},removeClass:function(e){return this.toggleClass(e,!1)},toggleClass:function(o,i){var e=this;return"string"!=typeof o||(-1!==o.indexOf(" ")?Jo(o.split(" "),function(){e.toggleClass(this,i)}):e.each(function(e,t){var n,r;(r=Ko(t,o))!==i&&(n=t.className,r?t.className=Go((" "+n+" ").replace(" "+o+" "," ")):t.className+=n?" "+o:o)})),e},hasClass:function(e){return Ko(this[0],e)},each:function(e){return Jo(this,e)},on:function(e,t){return this.each(function(){ri.bind(this,e,t)})},off:function(e,t){return this.each(function(){ri.unbind(this,e,t)})},trigger:function(e){return this.each(function(){"object"==typeof e?ri.fire(this,e.type,e):ri.fire(this,e)})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return new vi(ti.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++)vi.find(e,this[t],r);return vi(r)},filter:function(n){return vi("function"==typeof n?Qo(this.toArray(),function(e,t){return n(t,e)}):vi.filter(n,this.toArray()))},closest:function(n){var r=[];return n instanceof vi&&(n=n[0]),this.each(function(e,t){for(;t;){if("string"==typeof n&&vi(t).is(n)){r.push(t);break}if(t===n){r.push(t);break}t=t.parentNode}}),vi(r)},offset:function(e){var t,n,r,o,i=0,a=0;return e?this.css(e):((t=this[0])&&(r=(n=t.ownerDocument).documentElement,t.getBoundingClientRect&&(i=(o=t.getBoundingClientRect()).left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,a=o.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:i,top:a})},push:ei,sort:Array.prototype.sort,splice:Array.prototype.splice},Mn.extend(Yo,{extend:Mn.extend,makeArray:function(e){return function(e){return e&&e===e.window}(e)||e.nodeType?[e]:Mn.toArray(e)},inArray:function(e,t){var n;if(t.indexOf)return t.indexOf(e);for(n=t.length;n--;)if(t[n]===e)return n;return-1},isArray:Mn.isArray,each:Jo,trim:Go,grep:Qo,find:Ao,expr:Ao.selectors,unique:Ao.uniqueSort,text:Ao.getText,contains:Ao.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?vi.find.matchesSelector(t[0],e)?[t[0]]:[]:vi.find.matches(e,t)}});function mi(e,t,n){var r=[],o=e[t];for("string"!=typeof n&&n instanceof vi&&(n=n[0]);o&&9!==o.nodeType;){if(n!==undefined){if(o===n)break;if("string"==typeof n&&vi(o).is(n))break}1===o.nodeType&&r.push(o),o=o[t]}return r}function gi(e,t,n,r){var o=[];for(r instanceof vi&&(r=r[0]);e;e=e[t])if(!n||e.nodeType===n){if(r!==undefined){if(e===r)break;if("string"==typeof r&&vi(e).is(r))break}o.push(e)}return o}function pi(e,t,n){for(e=e[t];e;e=e[t])if(e.nodeType===n)return e;return null}Jo({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return mi(e,"parentNode")},next:function(e){return pi(e,"nextSibling",1)},prev:function(e){return pi(e,"previousSibling",1)},children:function(e){return gi(e.firstChild,"nextSibling",1)},contents:function(e){return Mn.toArray(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(r,o){Yo.fn[r]=function(t){var n=[];this.each(function(){var e=o.call(n,this,t,n);e&&(vi.isArray(e)?n.push.apply(n,e):n.push(e))}),1<this.length&&(oi[r]||(n=vi.unique(n)),0===r.indexOf("parents")&&(n=n.reverse()));var e=vi(n);return t?e.filter(t):e}}),Jo({parentsUntil:function(e,t){return mi(e,"parentNode",t)},nextUntil:function(e,t){return gi(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return gi(e,"previousSibling",1,t).slice(1)}},function(o,i){Yo.fn[o]=function(t,e){var n=[];this.each(function(){var e=i.call(n,this,t,n);e&&(vi.isArray(e)?n.push.apply(n,e):n.push(e))}),1<this.length&&(n=vi.unique(n),0!==o.indexOf("parents")&&"prevUntil"!==o||(n=n.reverse()));var r=vi(n);return e?r.filter(e):r}}),Yo.fn.is=function(e){return!!e&&0<this.filter(e).length},Yo.fn.init.prototype=Yo.fn,Yo.overrideDefaults=function(n){var r,o=function(e,t){return r=r||n(),0===arguments.length&&(e=r.element),t=t||r.context,new o.fn.init(e,t)};return vi.extend(o,this),o},Yo.attrHooks=li,Yo.cssHooks=fi;var vi=Yo,yi=(bi.prototype.current=function(){return this.node},bi.prototype.next=function(e){return this.node=this.findSibling(this.node,"firstChild","nextSibling",e),this.node},bi.prototype.prev=function(e){return this.node=this.findSibling(this.node,"lastChild","previousSibling",e),this.node},bi.prototype.prev2=function(e){return this.node=this.findPreviousNode(this.node,"lastChild","previousSibling",e),this.node},bi.prototype.findSibling=function(e,t,n,r){var o,i;if(e){if(!r&&e[t])return e[t];if(e!==this.rootNode){if(o=e[n])return o;for(i=e.parentNode;i&&i!==this.rootNode;i=i.parentNode)if(o=i[n])return o}}},bi.prototype.findPreviousNode=function(e,t,n,r){var o,i,a;if(e){if(o=e[n],this.rootNode&&o===this.rootNode)return;if(o){if(!r)for(a=o[t];a;a=a[t])if(!a[t])return a;return o}if((i=e.parentNode)&&i!==this.rootNode)return i}},bi);function bi(e,t){this.node=e,this.rootNode=t,this.current=this.current.bind(this),this.next=this.next.bind(this),this.prev=this.prev.bind(this),this.prev2=this.prev2.bind(this)}function Ci(t,n){Se(t).each(function(e){e.dom().insertBefore(n.dom(),t.dom())})}function wi(e,t){Te(e).fold(function(){Se(e).each(function(e){Di(e,t)})},function(e){Ci(e,t)})}function xi(t,n){_e(t).fold(function(){Di(t,n)},function(e){t.dom().insertBefore(n.dom(),e.dom())})}function zi(t,e){z(e,function(e){Di(t,e)})}function Ei(e){e.dom().textContent="",z(Re(e),function(e){_i(e)})}function Ni(e){var t=Re(e);0<t.length&&function(t,e){z(e,function(e){Ci(t,e)})}(e,t),_i(e)}function Si(e,t){return e!==undefined?e:t!==undefined?t:0}function ki(e){var t=e!==undefined?e.dom():j.document,n=t.body.scrollLeft||t.documentElement.scrollLeft,r=t.body.scrollTop||t.documentElement.scrollTop;return Oi(n,r)}function Ti(e,t,n){(n!==undefined?n.dom():j.document).defaultView.scrollTo(e,t)}function Ai(e,t){Pi&&D(e.dom().scrollIntoViewIfNeeded)?e.dom().scrollIntoViewIfNeeded(!1):e.dom().scrollIntoView(t)}function Mi(e,t,n,r){return{x:$(e),y:$(t),width:$(n),height:$(r),right:$(e+n),bottom:$(t+r)}}var Ri,Di=function(e,t){e.dom().appendChild(t.dom())},_i=function(e){var t=e.dom();null!==t.parentNode&&t.parentNode.removeChild(t)},Bi=function(n,r){return{left:$(n),top:$(r),translate:function(e,t){return Bi(n+e,r+t)}}},Oi=Bi,Hi=function(e){var t=e.dom(),n=t.ownerDocument.body;return n===t?Oi(n.offsetLeft,n.offsetTop):de(e)?function(e){var t=e.getBoundingClientRect();return Oi(t.left,t.top)}(t):Oi(0,0)},Pi=oe().browser.isSafari(),Li=function(e){var t=e===undefined?j.window:e,n=t.document,r=ki(yt.fromDom(n)),o=t.visualViewport;if(o!==undefined)return Mi(Math.max(o.pageLeft,r.left()),Math.max(o.pageTop,r.top()),o.width,o.height);var i=n.documentElement,a=i.clientWidth,u=i.clientHeight;return Mi(r.left(),r.top(),a,u)},Vi=Mn.each,Ii=Mn.grep,Fi=Nn.ie,Ui=/^([a-z0-9],?)+$/i,ji=/^[ \t\r\n]*$/,qi=function(n,r,o){var i=r.keep_values,e={set:function(e,t,n){r.url_converter&&(t=r.url_converter.call(r.url_converter_scope||o(),t,n,e[0])),e.attr("data-mce-"+n,t).attr(n,t)},get:function(e,t){return e.attr("data-mce-"+t)||e.attr(t)}},t={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(e){var t=e.attr("data-mce-style")||e.attr("style");return t=n.serialize(n.parse(t),e[0].nodeName)}}};return i&&(t.href=t.src=e),t},$i=function(e,t){var n=t.attr("style"),r=e.serialize(e.parse(n),t[0].nodeName);r=r||null,t.attr("data-mce-style",r)},Wi=function(e,t){var n,r,o=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)&&(o++,n=r);return o};function Ki(a,u){var s,c=this;void 0===u&&(u={});function l(e){if(e&&a&&"string"==typeof e){var t=a.getElementById(e);return t&&t.id!==e?a.getElementsByName(e)[1]:t}return e}function f(e){return"string"==typeof e&&(e=l(e)),H(e)}function r(e,t,n){var r,o,i=f(e);return i.length&&(o=(r=s[t])&&r.get?r.get(i,t):i.attr(t)),void 0===o&&(o=n||""),o}function d(e){var t=l(e);return t?t.attributes:[]}function o(e,t,n){var r,o;""===n&&(n=null);var i=f(e);r=i.attr(t),i.length&&((o=s[t])&&o.set?o.set(i,n,t):i.attr(t,n),r!==n&&u.onSetAttrib&&u.onSetAttrib({attrElm:i,attrName:t,attrValue:n}))}function h(){return u.root_element||a.body}function i(e,t){return Ht.getPos(a.body,l(e),t)}function m(e,t,n){var r=f(e);return n?r.css(t):("float"===(t=t.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}))&&(t=Nn.browser.isIE()?"styleFloat":"cssFloat"),r[0]&&r[0].style?r[0].style[t]:undefined)}function g(e){var t,n;return e=l(e),t=m(e,"width"),n=m(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}}function p(e,t){var n;if(!e)return!1;if(!Array.isArray(e)){if("*"===t)return 1===e.nodeType;if(Ui.test(t)){var r=t.toLowerCase().split(/,/),o=e.nodeName.toLowerCase();for(n=r.length-1;0<=n;n--)if(r[n]===o)return!0;return!1}if(e.nodeType&&1!==e.nodeType)return!1}var i=Array.isArray(e)?e:[e];return 0<Ao(t,i[0].ownerDocument||i[0],null,i).length}function v(e,t,n,r){var o,i=[],a=l(e);for(r=r===undefined,n=n||("BODY"!==h().nodeName?h().parentNode:null),Mn.is(t,"string")&&(t="*"===(o=t)?function(e){return 1===e.nodeType}:function(e){return p(e,o)});a&&a!==n&&a.nodeType&&9!==a.nodeType;){if(!t||"function"==typeof t&&t(a)){if(!r)return[a];i.push(a)}a=a.parentNode}return r?i:null}function n(e,t,n){var r=t;if(e)for("string"==typeof t&&(r=function(e){return p(e,t)}),e=e[n];e;e=e[n])if("function"==typeof r&&r(e))return e;return null}function y(e,n,r){var o,t="string"==typeof e?l(e):e;if(!t)return!1;if(Mn.isArray(t)&&(t.length||0===t.length))return o=[],Vi(t,function(e,t){e&&("string"==typeof e&&(e=l(e)),o.push(n.call(r,e,t)))}),o;var i=r||c;return n.call(i,t)}function b(e,t){f(e).each(function(e,n){Vi(t,function(e,t){o(n,t,e)})})}function C(e,r){var t=f(e);Fi?t.each(function(e,t){if(!1!==t.canHaveHTML){for(;t.firstChild;)t.removeChild(t.firstChild);try{t.innerHTML="<br>"+r,t.removeChild(t.firstChild)}catch(n){vi("<div></div>").html("<br>"+r).contents().slice(1).appendTo(t)}return r}}):t.html(r)}function w(e,n,r,o,i){return y(e,function(e){var t="string"==typeof n?a.createElement(n):n;return b(t,r),o&&("string"!=typeof o&&o.nodeType?t.appendChild(o):"string"==typeof o&&C(t,o)),i?t:e.appendChild(t)})}function x(e,t,n){return w(a.createElement(e),e,t,n,!0)}function z(e,t){var n=f(e);return t?n.each(function(){for(var e;e=this.firstChild;)3===e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)}).remove():n.remove(),1<n.length?n.toArray():n[0]}function E(e,t,n){f(e).toggleClass(t,n).each(function(){""===this.className&&vi(this).attr("class",null)})}function N(t,e,n){return y(e,function(e){return Mn.is(e,"array")&&(t=t.cloneNode(!0)),n&&Vi(Ii(e.childNodes),function(e){t.appendChild(e)}),e.parentNode.replaceChild(t,e)})}function S(){return a.createRange()}function k(e){if(e&&Ge.isElement(e)){var t=e.getAttribute("data-mce-contenteditable");return t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null}return null}var T={},A=j.window,M={},t=0,e=function U(m,g){void 0===g&&(g={});var p,v=0,y={};function b(e){m.getElementsByTagName("head")[0].appendChild(e)}function n(e,t,n){function r(e){l.status=e,l.passed=[],l.failed=[],u&&(u.onload=null,u.onerror=null,u=null)}function o(){for(var e=l.passed,t=e.length;t--;)e[t]();r(2)}function i(){for(var e=l.failed,t=e.length;t--;)e[t]();r(3)}function a(e,t){e()||((new Date).getTime()-c<p?pn.setTimeout(t):i())}var u,s,c,l,f=function(){a(function(){for(var e,t,n=m.styleSheets,r=n.length;r--;)if((t=(e=n[r]).ownerNode?e.ownerNode:e.owningElement)&&t.id===u.id)return o(),!0},f)},d=function(){a(function(){try{var e=s.sheet.cssRules;return o(),!!e}catch(t){}},d)};if(e=Mn._addCacheSuffix(e),y[e]?l=y[e]:(l={passed:[],failed:[]},y[e]=l),t&&l.passed.push(t),n&&l.failed.push(n),1!==l.status)if(2!==l.status)if(3!==l.status){if(l.status=1,(u=m.createElement("link")).rel="stylesheet",u.type="text/css",u.id="u"+v++,u.async=!1,u.defer=!1,c=(new Date).getTime(),g.contentCssCors&&(u.crossOrigin="anonymous"),g.referrerPolicy&&Tt(yt.fromDom(u),"referrerpolicy",g.referrerPolicy),"onload"in u&&!((h=j.navigator.userAgent.match(/WebKit\/(\d*)/))&&parseInt(h[1],10)<536))u.onload=f,u.onerror=i;else{if(0<j.navigator.userAgent.indexOf("Firefox"))return(s=m.createElement("style")).textContent='@import "'+e+'"',d(),void b(s);f()}var h;b(u),u.href=e}else i();else o()}function t(t){return Xt.nu(function(e){n(t,q(e,$(Qt.value(t))),q(e,$(Qt.error(t))))})}function o(e){return e.fold(W,W)}return p=g.maxLoadTime||5e3,{load:n,loadAll:function(e,n,r){Yt(X(e,t)).get(function(e){var t=Y(e,function(e){return e.isValue()});0<t.fail.length?r(t.fail.map(o)):n(t.pass.map(o))})},_setReferrerPolicy:function(e){g.referrerPolicy=e}}}(a,{contentCssCors:u.contentCssCors,referrerPolicy:u.referrerPolicy}),R=[],D=u.schema?u.schema:pr({}),_=xr({url_converter:u.url_converter,url_converter_scope:u.url_converter_scope},u.schema),B=u.ownEvents?new kr:kr.Event,O=D.getBlockElements(),H=vi.overrideDefaults(function(){return{context:a,element:F.getRoot()}}),P=ir.decode,L=ir.encodeAllRaw,V=function(e,t,n,r){if(Mn.isArray(e)){for(var o=e.length,i=[];o--;)i[o]=V(e[o],t,n,r);return i}return!u.collect||e!==a&&e!==A||R.push([e,t,n,r]),B.bind(e,t,n,r||F)},I=function(e,t,n){var r;if(Mn.isArray(e)){r=e.length;for(var o=[];r--;)o[r]=I(e[r],t,n);return o}if(R&&(e===a||e===A))for(r=R.length;r--;){var i=R[r];e!==i[0]||t&&t!==i[1]||n&&n!==i[2]||B.unbind(i[0],i[1],i[2])}return B.unbind(e,t,n)},F={doc:a,settings:u,win:A,files:M,stdMode:!0,boxModel:!0,styleSheetLoader:e,boundEvents:R,styles:_,schema:D,events:B,isBlock:function(e){if("string"==typeof e)return!!O[e];if(e){var t=e.nodeType;if(t)return!(1!==t||!O[e.nodeName])}return!1},$:H,$$:f,root:null,clone:function(t,e){if(!Fi||1!==t.nodeType||e)return t.cloneNode(e);if(e)return null;var n=a.createElement(t.nodeName);return Vi(d(t),function(e){o(n,e.nodeName,r(t,e.nodeName))}),n},getRoot:h,getViewPort:function(e){var t=Li(e);return{x:t.x(),y:t.y(),w:t.width(),h:t.height()}},getRect:function(e){var t,n;return e=l(e),t=i(e),n=g(e),{x:t.x,y:t.y,w:n.w,h:n.h}},getSize:g,getParent:function(e,t,n){var r=v(e,t,n,!1);return r&&0<r.length?r[0]:null},getParents:v,get:l,getNext:function(e,t){return n(e,t,"nextSibling")},getPrev:function(e,t){return n(e,t,"previousSibling")},select:function(e,t){return Ao(e,l(t)||u.root_element||a,[])},is:p,add:w,create:x,createHTML:function(e,t,n){var r,o="";for(r in o+="<"+e,t)t.hasOwnProperty(r)&&null!==t[r]&&"undefined"!=typeof t[r]&&(o+=" "+r+'="'+L(t[r])+'"');return void 0!==n?o+">"+n+"</"+e+">":o+" />"},createFragment:function(e){var t,n=a.createElement("div"),r=a.createDocumentFragment();for(e&&(n.innerHTML=e);t=n.firstChild;)r.appendChild(t);return r},remove:z,setStyle:function(e,t,n){var r=K(t)?f(e).css(t,n):f(e).css(t);u.update_styles&&$i(_,r)},getStyle:m,setStyles:function(e,t){var n=f(e).css(t);u.update_styles&&$i(_,n)},removeAllAttribs:function(e){return y(e,function(e){var t,n=e.attributes;for(t=n.length-1;0<=t;t--)e.removeAttributeNode(n.item(t))})},setAttrib:o,setAttribs:b,getAttrib:r,getPos:i,parseStyle:function(e){return _.parse(e)},serializeStyle:function(e,t){return _.serialize(e,t)},addStyle:function(e){var t,n;if(F!==Ki.DOM&&a===j.document){if(T[e])return;T[e]=!0}(n=a.getElementById("mceDefaultStyles"))||((n=a.createElement("style")).id="mceDefaultStyles",n.type="text/css",(t=a.getElementsByTagName("head")[0]).firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(a.createTextNode(e))},loadCSS:function(e){var n;F===Ki.DOM||a!==j.document?(e=e||"",n=a.getElementsByTagName("head")[0],Vi(e.split(","),function(e){var t;e=Mn._addCacheSuffix(e),M[e]||(M[e]=!0,t=x("link",G(G({rel:"stylesheet",type:"text/css",href:e},u.contentCssCors?{crossOrigin:"anonymous"}:{}),u.referrerPolicy?{referrerPolicy:u.referrerPolicy}:{})),n.appendChild(t))})):Ki.DOM.loadCSS(e)},addClass:function(e,t){f(e).addClass(t)},removeClass:function(e,t){E(e,t,!1)},hasClass:function(e,t){return f(e).hasClass(t)},toggleClass:E,show:function(e){f(e).show()},hide:function(e){f(e).hide()},isHidden:function(e){return"none"===f(e).css("display")},uniqueId:function(e){return(e||"mce_")+t++},setHTML:C,getOuterHTML:function(e){var t="string"==typeof e?l(e):e;return Ge.isElement(t)?t.outerHTML:vi("<div></div>").append(vi(t).clone()).html()},setOuterHTML:function(e,t){f(e).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(e){}z(vi(this).html(t),!0)})},decode:P,encode:L,insertAfter:function(e,t){var r=l(t);return y(e,function(e){var t,n;return t=r.parentNode,(n=r.nextSibling)?t.insertBefore(e,n):t.appendChild(e),e})},replace:N,rename:function(t,e){var n;return t.nodeName!==e.toUpperCase()&&(n=x(e),Vi(d(t),function(e){o(n,e.nodeName,r(t,e.nodeName))}),N(n,t,!0)),n||t},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 _.toHex(Mn.trim(e))},run:y,getAttribs:d,isEmpty:function(e,t){var n,r,o,i,a=0;if(e=e.firstChild){var u=new yi(e,e.parentNode),s=D?D.getWhiteSpaceElements():{};t=t||(D?D.getNonEmptyElements():null);do{if(o=e.nodeType,Ge.isElement(e)){var c=e.getAttribute("data-mce-bogus");if(c){e=u.next("all"===c);continue}if(i=e.nodeName.toLowerCase(),t&&t[i]){if("br"!==i)return!1;a++,e=u.next();continue}for(n=(r=d(e)).length;n--;)if("name"===(i=r[n].nodeName)||"data-mce-bookmark"===i)return!1}if(8===o)return!1;if(3===o&&!ji.test(e.nodeValue))return!1;if(3===o&&e.parentNode&&s[e.parentNode.nodeName]&&ji.test(e.nodeValue))return!1;e=u.next()}while(e)}return a<=1},createRng:S,nodeIndex:Wi,split:function(e,t,n){var r,o,i,a=S();if(e&&t)return a.setStart(e.parentNode,Wi(e)),a.setEnd(t.parentNode,Wi(t)),r=a.extractContents(),(a=S()).setStart(t.parentNode,Wi(t)+1),a.setEnd(e.parentNode,Wi(e)+1),o=a.extractContents(),(i=e.parentNode).insertBefore(Xn.trimNode(F,r),e),n?i.insertBefore(n,e):i.insertBefore(t,e),i.insertBefore(Xn.trimNode(F,o),e),z(e),n||t},bind:V,unbind:I,fire:function(e,t,n){return B.fire(e,t,n)},getContentEditable:k,getContentEditableParent:function(e){for(var t=h(),n=null;e&&e!==t&&null===(n=k(e));e=e.parentNode);return n},destroy:function(){if(R)for(var e=R.length;e--;){var t=R[e];B.unbind(t[0],t[1],t[2])}Ao.setDocument&&Ao.setDocument()},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}};return s=qi(_,u,function(){return F}),F}(Ri=Ki=Ki||{}).DOM=Ri(j.document),Ri.nodeIndex=Wi;var Xi=Ki,Yi=Xi.DOM,Gi=Mn.each,Ji=Mn.grep,Qi=(Zi.prototype._setReferrerPolicy=function(e){this.settings.referrerPolicy=e},Zi.prototype.loadScript=function(e,t,n){var r,o,i=Yi;o=i.uniqueId(),(r=j.document.createElement("script")).id=o,r.type="text/javascript",r.src=Mn._addCacheSuffix(e),this.settings.referrerPolicy&&i.setAttrib(r,"referrerpolicy",this.settings.referrerPolicy),r.onload=function(){i.remove(o),r&&(r.onreadystatechange=r.onload=r=null),t()},r.onerror=function(){D(n)?n():"undefined"!=typeof j.console&&j.console.log&&j.console.log("Failed to load script: "+e)},(j.document.getElementsByTagName("head")[0]||j.document.body).appendChild(r)},Zi.prototype.isDone=function(e){return 2===this.states[e]},Zi.prototype.markDone=function(e){this.states[e]=2},Zi.prototype.add=function(e,t,n,r){this.states[e]===undefined&&(this.queue.push(e),this.states[e]=0),t&&(this.scriptLoadedCallbacks[e]||(this.scriptLoadedCallbacks[e]=[]),this.scriptLoadedCallbacks[e].push({success:t,failure:r,scope:n||this}))},Zi.prototype.load=function(e,t,n,r){return this.add(e,t,n,r)},Zi.prototype.remove=function(e){delete this.states[e],delete this.scriptLoadedCallbacks[e]},Zi.prototype.loadQueue=function(e,t,n){this.loadScripts(this.queue,e,t,n)},Zi.prototype.loadScripts=function(n,e,t,r){function o(t,e){Gi(a.scriptLoadedCallbacks[e],function(e){D(e[t])&&e[t].call(e.scope)}),a.scriptLoadedCallbacks[e]=undefined}var i,a=this,u=[];a.queueLoadedCallbacks.push({success:e,failure:r,scope:t||this}),(i=function(){var e=Ji(n);if(n.length=0,Gi(e,function(e){2!==a.states[e]?3!==a.states[e]?1!==a.states[e]&&(a.states[e]=1,a.loading++,a.loadScript(e,function(){a.states[e]=2,a.loading--,o("success",e),i()},function(){a.states[e]=3,a.loading--,u.push(e),o("failure",e),i()})):o("failure",e):o("success",e)}),!a.loading){var t=a.queueLoadedCallbacks.slice(0);a.queueLoadedCallbacks.length=0,Gi(t,function(e){0===u.length?D(e.success)&&e.success.call(e.scope):D(e.failure)&&e.failure.call(e.scope,u)})}})()},Zi.ScriptLoader=new Zi,Zi);function Zi(e){void 0===e&&(e={}),this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=0,this.settings=e}var ea,ta={},na=Je("en"),ra={getData:function(){return se(ta,function(e){return G({},e)})},setCode:function(e){e&&na.set(e)},getCode:function(){return na.get()},add:function(e,t){var n=ta[e];for(var r in n||(ta[e]=n={}),t)n[r.toLowerCase()]=t[r]},translate:function(e){function r(e){return D(e)?Object.prototype.toString.call(e):a(e)?"":""+e}function t(e){var t=r(e),n=t.toLowerCase();return kt(i,n)?r(i[n]):t}function n(e){return e.replace(/{context:\w+}$/,"")}function o(e){return e}var i=ta[na.get()]||{},a=function(e){return""===e||null===e||e===undefined};if(a(e))return o("");if(function(e){return T(e)&&kt(e,"raw")}(e))return o(r(e.raw));if(function(e){return A(e)&&1<e.length}(e)){var u=e.slice(1);return o(n(t(e[0]).replace(/\{([0-9]+)\}/g,function(e,t){return kt(u,t)?r(u[t]):e})))}return o(n(t(e)))},isRtl:function(){return le(ta,na.get()).bind(function(e){return le(e,"_dir")}).exists(function(e){return"rtl"===e})},hasCode:function(e){return kt(ta,e)}},oa=Mn.each;function ia(){function i(e){var t;return c[e]&&(t=c[e].dependencies),t||[]}function a(e,t){return"object"==typeof t?t:"string"==typeof e?{prefix:"",resource:t,suffix:""}:{prefix:e.prefix,resource:t,suffix:e.suffix}}function u(e,n,t,r){var o=i(e);oa(o,function(e){var t=a(n,e);f(t.resource,t,undefined,undefined)}),t&&(r?t.call(r):t.call(Qi))}var r=this,o=[],s={},c={},l=[],f=function(e,t,n,r,o){if(!s[e]){var i="string"==typeof t?t:t.prefix+t.resource+t.suffix;0!==i.indexOf("/")&&-1===i.indexOf("://")&&(i=ia.baseURL+"/"+i),s[e]=i.substring(0,i.lastIndexOf("/")),c[e]?u(e,t,n,r):Qi.ScriptLoader.add(i,function(){return u(e,t,n,r)},r,o)}};return{items:o,urls:s,lookup:c,_listeners:l,get:function(e){return c[e]?c[e].instance:undefined},dependencies:i,requireLangPack:function(e,t){var n=ra.getCode();if(n&&!1!==ia.languageLoad){if(t)if(-1!==(t=","+t+",").indexOf(","+n.substr(0,2)+","))n=n.substr(0,2);else if(-1===t.indexOf(","+n+","))return;Qi.ScriptLoader.add(s[e]+"/langs/"+n+".js")}},add:function(t,e,n){o.push(e),c[t]={instance:e,dependencies:n};var r=Y(l,function(e){return e.name===t});return l=r.fail,oa(r.pass,function(e){e.callback()}),e},remove:function(e){delete s[e],delete c[e]},createUrl:a,addComponents:function(e,t){var n=r.urls[e];oa(t,function(e){Qi.ScriptLoader.add(n+"/"+e)})},load:f,waitFor:function(e,t){c.hasOwnProperty(e)?t():l.push({name:e,callback:t})}}}(ea=ia=ia||{}).PluginManager=ea(),ea.ThemeManager=ea();function aa(n,r){var o=null;return{cancel:function(){null!==o&&(j.clearTimeout(o),o=null)},throttle:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];null===o&&(o=j.setTimeout(function(){n.apply(null,e),o=null},r))}}}function ua(e,t){var n=ge(e,t);return n===undefined||""===n?[]:n.split(" ")}function sa(e){return e.dom().classList!==undefined}function ca(e,t){return function(e,t,n){var r=ua(e,t).concat([n]);return Tt(e,t,r.join(" ")),!0}(e,"class",t)}function la(e,t){return function(e,t,n){var r=y(ua(e,t),function(e){return e!==n});return 0<r.length?Tt(e,t,r.join(" ")):pe(e,t),!1}(e,"class",t)}function fa(e,t){sa(e)?e.dom().classList.add(t):ca(e,t)}function da(e){0===(sa(e)?e.dom().classList:function(e){return ua(e,"class")}(e)).length&&pe(e,"class")}function ha(e,t){return sa(e)&&e.dom().classList.contains(t)}function ma(e,t){return function(e,t){var n=t===undefined?j.document:t.dom();return xe(n)?[]:X(n.querySelectorAll(e),yt.fromDom)}(t,e)}var ga=ia,pa=function(e,t){var n=[];return z(Re(e),function(e){t(e)&&(n=n.concat([e])),n=n.concat(pa(e,t))}),n};function va(e,t,n,r,o){return e(n,r)?k.some(n):D(o)&&o(n)?k.none():t(n,r,o)}function ya(e,t,n){for(var r=e.dom(),o=D(n)?n:$(!1);r.parentNode;){r=r.parentNode;var i=yt.fromDom(r);if(t(i))return k.some(i);if(o(i))break}return k.none()}function ba(e,t,n){return va(function(e,t){return t(e)},ya,e,t,n)}function Ca(e,t,n){return ya(e,function(e){return we(e,t)},n)}function wa(e,t){return function(e,t){var n=t===undefined?j.document:t.dom();return xe(n)?k.none():k.from(n.querySelector(e)).map(yt.fromDom)}(t,e)}function xa(e,t,n){return va(we,Ca,e,t,n)}function za(r,e){function t(e,t){return function(e,t){var n=e.dom();return!(!n||!n.hasAttribute)&&n.hasAttribute(t)}(e,t)?k.some(ge(e,t)):k.none()}var n=r.selection.getRng(),o=yt.fromDom(n.startContainer),i=yt.fromDom(r.getBody()),a=e.fold(function(){return"."+nu()},function(e){return"["+ru()+'="'+e+'"]'}),u=De(o,n.startOffset).getOr(o);return xa(u,a,function(e){return ze(e,i)}).bind(function(e){return t(e,""+ou()).bind(function(n){return t(e,""+ru()).map(function(e){var t=iu(r,n);return{uid:n,name:e,elements:t}})})})}function Ea(n,e){function a(e,t){r(e,function(e){return t(e),e})}var o=Je({}),r=function(e,t){var n=o.get(),r=t(n.hasOwnProperty(e)?n[e]:{listeners:[],previous:Je(k.none())});n[e]=r,o.set(n)},t=function(n,r){var o=null;return{cancel:function(){null!==o&&(j.clearTimeout(o),o=null)},throttle:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];null!==o&&j.clearTimeout(o),o=j.setTimeout(function(){n.apply(null,e),o=null},r)}}}(function(){var e=o.get(),t=function(e,t){var n=B.call(e,0);return n.sort(t),n}(Et(e));z(t,function(e){r(e,function(o){var i=o.previous.get();return za(n,k.some(e)).fold(function(){i.isSome()&&(function(t){a(t,function(e){z(e.listeners,function(e){return e(!1,t)})})}(e),o.previous.set(k.none()))},function(e){var t=e.uid,n=e.name,r=e.elements;i.is(t)||(function(t,n,r){a(t,function(e){z(e.listeners,function(e){return e(!0,t,{uid:n,nodes:X(r,function(e){return e.dom()})})})})}(n,t,r),o.previous.set(k.some(t)))}),{previous:o.previous,listeners:o.listeners}})})},30);return n.on("remove",function(){t.cancel()}),n.on("NodeChange",function(){t.throttle()}),{addListener:function(e,t){r(e,function(e){return{previous:e.previous,listeners:e.listeners.concat([t])}})}}}function Na(e,n){e.on("init",function(){e.serializer.addNodeFilter("span",function(e){z(e,function(t){(function(e){return k.from(e.attr(ru())).bind(n.lookup)})(t).each(function(e){!1===e.persistent&&t.unwrap()})})})})}function Sa(e,t){return yt.fromDom(e.dom().cloneNode(t))}function ka(e){return Sa(e,!1)}function Ta(e){return Sa(e,!0)}function Aa(e,t){var n=Ee(e).dom(),r=yt.fromDom(n.createDocumentFragment()),o=function(e,t){var n=(t||j.document).createElement("div");return n.innerHTML=e,Re(yt.fromDom(n))}(t,n);zi(r,o),Ei(e),Di(e,r)}function Ma(e){return du(e)&&(e=e.parentNode),fu(e)&&e.hasAttribute("data-mce-caret")}function Ra(e){return du(e)&&su(e.data)}function Da(e){return Ma(e)||Ra(e)}function _a(e){return e.firstChild!==e.lastChild||!Ge.isBr(e.firstChild)}function Ba(e){var t=e.container();return!(!e||!Ge.isText(t))&&(t.data.charAt(e.offset())===cu||e.isAtStart()&&Ra(t.previousSibling))}function Oa(e){var t=e.container();return!(!e||!Ge.isText(t))&&(t.data.charAt(e.offset()-1)===cu||e.isAtEnd()&&Ra(t.nextSibling))}function Ha(e,t,n){var r,o;return(r=t.ownerDocument.createElement(e)).setAttribute("data-mce-caret",n?"before":"after"),r.setAttribute("data-mce-bogus","all"),r.appendChild(function(){var e=j.document.createElement("br");return e.setAttribute("data-mce-bogus","1"),e}()),o=t.parentNode,n?o.insertBefore(r,t):t.nextSibling?o.insertBefore(r,t.nextSibling):o.appendChild(r),r}function Pa(e){return e&&e.hasAttribute("data-mce-caret")?(function(e){var t=e.getElementsByTagName("br"),n=t[t.length-1];Ge.isBogus(n)&&n.parentNode.removeChild(n)}(e),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("_moz_abspos"),e):null}function La(e){return!xu(e)&&(yu(e)?!bu(e.parentNode):Cu(e)||vu(e)||wu(e)||zu(e))}function Va(e,t){return La(e)&&function(e,t){for(e=e.parentNode;e&&e!==t;e=e.parentNode){if(zu(e))return!1;if(gu(e))return!0}return!0}(e,t)}function Ia(e){return e?{left:Eu(e.left),top:Eu(e.top),bottom:Eu(e.bottom),right:Eu(e.right),width:Eu(e.width),height:Eu(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}}function Fa(e,t){return e=Ia(e),t||(e.left=e.left+e.width),e.right=e.left,e.width=0,e}function Ua(e,t,n){return 0<=e&&e<=Math.min(t.height,n.height)/2}function ja(e,t){return e.bottom-e.height/2<t.top||!(e.top>t.bottom)&&Ua(t.top-e.bottom,e,t)}function qa(e,t){return e.top>t.bottom||!(e.bottom<t.top)&&Ua(t.bottom-e.top,e,t)}function $a(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom}function Wa(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset===n+1?t.childNodes[n]:null}function Ka(e,t){return 1===e.nodeType&&e.hasChildNodes()&&(t>=e.childNodes.length&&(t=e.childNodes.length-1),e=e.childNodes[t]),e}function Xa(e){return"string"==typeof e&&768<=e.charCodeAt(0)&&Nu.test(e)}function Ya(e,t,n){return e.isSome()&&t.isSome()?k.some(n(e.getOrDie(),t.getOrDie())):k.none()}function Ga(e){return e&&/[\r\n\t ]/.test(e)}function Ja(e){return!!e.setStart&&!!e.setEnd}function Qa(e){var t,n=e.startContainer,r=e.startOffset;return!!(Ga(e.toString())&&Bu(n.parentNode)&&Ge.isText(n)&&(t=n.data,Ga(t[r-1])||Ga(t[r+1])))}function Za(e){return 0===e.left&&0===e.right&&0===e.top&&0===e.bottom}function eu(e,t){var n=Fa(e,t);return n.width=1,n.right=n.left+1,n}var tu,nu=$("mce-annotation"),ru=$("data-mce-annotation"),ou=$("data-mce-annotation-uid"),iu=function(e,t){var n=yt.fromDom(e.getBody());return ma(n,"["+ou()+'="'+t+'"]')},au=0,uu="\ufeff",su=function(e){return e===uu},cu=uu,lu=function(e){return e.replace(new RegExp(uu,"g"),"")},fu=Ge.isElement,du=Ge.isText,hu=function(e){return du(e)&&e.data[0]===cu},mu=function(e){return du(e)&&e.data[e.data.length-1]===cu},gu=Ge.isContentEditableTrue,pu=Ge.isContentEditableFalse,vu=Ge.isBr,yu=Ge.isText,bu=Ge.matchNodeNames(["script","style","textarea"]),Cu=Ge.matchNodeNames(["img","input","textarea","hr","iframe","video","audio","object"]),wu=Ge.matchNodeNames(["table"]),xu=Da,zu=function(e){return!1===function(e){return Ge.isElement(e)&&"true"===e.getAttribute("unselectable")}(e)&&pu(e)},Eu=Math.round,Nu=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]"),Su=[].slice,ku=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Su.call(arguments);return function(e){for(var t=0;t<n.length;t++)if(!n[t](e))return!1;return!0}},Tu=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Su.call(arguments);return function(e){for(var t=0;t<n.length;t++)if(n[t](e))return!0;return!1}},Au=Ge.isElement,Mu=La,Ru=Ge.matchStyleValues("display","block table"),Du=Ge.matchStyleValues("float","left right"),_u=ku(Au,Mu,s(Du)),Bu=s(Ge.matchStyleValues("white-space","pre pre-line pre-wrap")),Ou=Ge.isText,Hu=Ge.isBr,Pu=Xi.nodeIndex,Lu=Ka,Vu=function(e){return"createRange"in e?e.createRange():Xi.DOM.createRng()},Iu=function(e){var t,n;return t=0<(n=e.getClientRects()).length?Ia(n[0]):Ia(e.getBoundingClientRect()),!Ja(e)&&Hu(e)&&Za(t)?function(e){var t,n=e.ownerDocument,r=Vu(n),o=n.createTextNode("\xa0"),i=e.parentNode;return i.insertBefore(o,e),r.setStart(o,0),r.setEnd(o,1),t=Ia(r.getBoundingClientRect()),i.removeChild(o),t}(e):Za(t)&&Ja(e)?function(e){var t=e.startContainer,n=e.endContainer,r=e.startOffset,o=e.endOffset;if(t===n&&Ge.isText(n)&&0===r&&1===o){var i=e.cloneRange();return i.setEndAfter(n),Iu(i)}return null}(e):t},Fu=function(e){function r(e){0!==e.height&&(0<i.length&&function(e,t){return e.left===t.left&&e.top===t.top&&e.bottom===t.bottom&&e.right===t.right}(e,i[i.length-1])||i.push(e))}function t(e,t){var n=Vu(e.ownerDocument);if(t<e.data.length){if(Xa(e.data[t]))return i;if(Xa(e.data[t-1])&&(n.setStart(e,t),n.setEnd(e,t+1),!Qa(n)))return r(eu(Iu(n),!1)),i}0<t&&(n.setStart(e,t-1),n.setEnd(e,t),Qa(n)||r(eu(Iu(n),!1))),t<e.data.length&&(n.setStart(e,t),n.setEnd(e,t+1),Qa(n)||r(eu(Iu(n),!0)))}var n,o,i=[];if(Ou(e.container()))return t(e.container(),e.offset()),i;if(Au(e.container()))if(e.isAtEnd())o=Lu(e.container(),e.offset()),Ou(o)&&t(o,o.data.length),_u(o)&&!Hu(o)&&r(eu(Iu(o),!1));else{if(o=Lu(e.container(),e.offset()),Ou(o)&&t(o,0),_u(o)&&e.isAtEnd())return r(eu(Iu(o),!1)),i;n=Lu(e.container(),e.offset()-1),_u(n)&&!Hu(n)&&(!Ru(n)&&!Ru(o)&&_u(o)||r(eu(Iu(n),!1))),_u(o)&&r(eu(Iu(o),!0))}return i};function Uu(t,n,e){function r(){return e=e||Fu(Uu(t,n))}return{container:$(t),offset:$(n),toRange:function(){var e;return(e=Vu(t.ownerDocument)).setStart(t,n),e.setEnd(t,n),e},getClientRects:r,isVisible:function(){return 0<r().length},isAtStart:function(){return Ou(t),0===n},isAtEnd:function(){return Ou(t)?n>=t.data.length:n>=t.childNodes.length},isEqual:function(e){return e&&t===e.container()&&n===e.offset()},getNode:function(e){return Lu(t,e?n-1:n)}}}(tu=Uu=Uu||{}).fromRangeStart=function(e){return tu(e.startContainer,e.startOffset)},tu.fromRangeEnd=function(e){return tu(e.endContainer,e.endOffset)},tu.after=function(e){return tu(e.parentNode,Pu(e)+1)},tu.before=function(e){return tu(e.parentNode,Pu(e))},tu.isAbove=function(e,t){return Ya(E(t.getClientRects()),N(e.getClientRects()),ja).getOr(!1)},tu.isBelow=function(e,t){return Ya(N(t.getClientRects()),E(e.getClientRects()),qa).getOr(!1)},tu.isAtStart=function(e){return!!e&&e.isAtStart()},tu.isAtEnd=function(e){return!!e&&e.isAtEnd()},tu.isTextPosition=function(e){return!!e&&Ge.isText(e.container())},tu.isElementPosition=function(e){return!1===tu.isTextPosition(e)};function ju(t){return function(e){return t===e}}function qu(e){return(_s(e)?"text()":e.nodeName.toLowerCase())+"["+function(e){var r,t,n;return r=Ps(Hs(e)),t=kn.findIndex(r,ju(e),e),r=r.slice(0,t+1),n=kn.reduce(r,function(e,t,n){return _s(t)&&_s(r[n-1])&&e++,e},0),r=kn.filter(r,Ge.matchNodeNames([e.nodeName])),(t=kn.findIndex(r,ju(e),e))-n}(e)+"]"}function $u(e,t){var n,r,o,i,a,u=[];return n=t.container(),r=t.offset(),_s(n)?o=function(e,t){for(;(e=e.previousSibling)&&_s(e);)t+=e.data.length;return t}(n,r):(r>=(i=n.childNodes).length?(o="after",r=i.length-1):o="before",n=i[r]),u.push(qu(n)),a=function(e,t,n){var r=[];for(t=t.parentNode;t!==e&&(!n||!n(t));t=t.parentNode)r.push(t);return r}(e,n),a=kn.filter(a,s(Ge.isBogus)),(u=u.concat(kn.map(a,function(e){return qu(e)}))).reverse().join("/")+","+o}function Wu(e,t){var n,r,o;return t?(t=(n=t.split(","))[0].split("/"),o=1<n.length?n[1]:"before",(r=kn.reduce(t,function(e,t){return(t=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t))?("text()"===t[1]&&(t[1]="#text"),function(e,t,n){var r=Ps(e);return r=kn.filter(r,function(e,t){return!_s(e)||!_s(r[t-1])}),(r=kn.filter(r,Ge.matchNodeNames([t])))[n]}(e,t[1],parseInt(t[2],10))):null},e))?_s(r)?function(e,t){for(var n,r=e,o=0;_s(r);){if(n=r.data.length,o<=t&&t<=o+n){e=r,t-=o;break}if(!_s(r.nextSibling)){e=r,t=n;break}o+=n,r=r.nextSibling}return _s(e)&&t>e.data.length&&(t=e.data.length),Ds(e,t)}(r,parseInt(o,10)):(o="after"===o?Os(r)+1:Os(r),Ds(r.parentNode,o)):null):null}function Ku(e,t){Ge.isText(t)&&0===t.data.length&&e.remove(t)}function Xu(e,t,n){Ge.isDocumentFragment(n)?function(t,e,n){var r=k.from(n.firstChild),o=k.from(n.lastChild);e.insertNode(n),r.each(function(e){return Ku(t,e.previousSibling)}),o.each(function(e){return Ku(t,e.nextSibling)})}(e,t,n):function(e,t,n){t.insertNode(n),Ku(e,n.previousSibling),Ku(e,n.nextSibling)}(e,t,n)}function Yu(e,t,n,r,o){var i,a=r[o?"startContainer":"endContainer"],u=r[o?"startOffset":"endOffset"],s=[],c=0,l=e.getRoot();for(Ge.isText(a)?s.push(n?function(e,t,n){var r,o;for(o=e(t.data.slice(0,n)).length,r=t.previousSibling;r&&Ge.isText(r);r=r.previousSibling)o+=e(r.data).length;return o}(t,a,u):u):(u>=(i=a.childNodes).length&&i.length&&(c=1,u=Math.max(0,i.length-1)),s.push(e.nodeIndex(i[u],n)+c));a&&a!==l;a=a.parentNode)s.push(e.nodeIndex(a,n));return s}function Gu(e,t,n){var r=0;return Mn.each(e.select(t),function(e){if("all"!==e.getAttribute("data-mce-bogus"))return e!==n&&void r++}),r}function Ju(e,t){var n,r,o,i=t?"start":"end";n=e[i+"Container"],r=e[i+"Offset"],Ge.isElement(n)&&"TR"===n.nodeName&&(n=(o=n.childNodes)[Math.min(t?r:r-1,o.length-1)])&&(r=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,r))}function Qu(e){return Ju(e,!0),Ju(e,!1),e}function Zu(e,t){var n;if(Ge.isElement(e)&&(e=Ka(e,t),Ls(e)))return e;if(Da(e)){if(Ge.isText(e)&&Ma(e)&&(e=e.parentNode),n=e.previousSibling,Ls(n))return n;if(n=e.nextSibling,Ls(n))return n}}function es(e,t,n){var r=n.getNode(),o=r?r.nodeName:null,i=n.getRng();if(Ls(r)||"IMG"===o)return{name:o,index:Gu(n.dom,o,r)};var a=function(e){return Zu(e.startContainer,e.startOffset)||Zu(e.endContainer,e.endOffset)}(i);return a?{name:o=a.tagName,index:Gu(n.dom,o,a)}:function(e,t,n,r){var o=t.dom,i={};return i.start=Yu(o,e,n,r,!0),t.isCollapsed()||(i.end=Yu(o,e,n,r,!1)),i}(e,n,t,i)}function ts(e,t,n){var r={"data-mce-type":"bookmark",id:t,style:"overflow:hidden;line-height:0px"};return n?e.create("span",r,"&#xFEFF;"):e.create("span",r)}function ns(e,t){var n=e.dom,r=e.getRng(),o=n.uniqueId(),i=e.isCollapsed(),a=e.getNode(),u=a.nodeName;if("IMG"===u)return{name:u,index:Gu(n,u,a)};var s=Qu(r.cloneRange());if(!i){s.collapse(!1);var c=ts(n,o+"_end",t);Xu(n,s,c)}(r=Qu(r)).collapse(!0);var l=ts(n,o+"_start",t);return Xu(n,r,l),e.moveToBookmark({id:o,keep:1}),{id:o}}function rs(e){return Ge.isElement(e)&&e.id===Is}function os(e,t){for(;t&&t!==e;){if(t.id===Is)return t;t=t.parentNode}return null}function is(e){var t=e.parentNode;t&&t.removeChild(e)}function as(e,t){0===t.length?is(e):e.nodeValue=t}function us(e){var t=lu(e);return{count:e.length-t.length,text:t}}function ss(e,t){return js(e),t}function cs(e,t){var n=t.container(),r=function(e,t){var n=f(e,t);return-1===n?k.none():k.some(n)}(P(n.childNodes),e).map(function(e){return e<t.offset()?Ds(n,t.offset()-1):t}).getOr(t);return js(e),r}function ls(e,t){return Us(e)&&t.container()===e?function(e,t){var n=us(e.data.substr(0,t.offset())),r=us(e.data.substr(t.offset())),o=n.text+r.text;return 0<o.length?(as(e,o),Ds(e,t.offset()-n.count)):t}(e,t):ss(e,t)}function fs(e,t,n){var r,o,i,a,u,s=Fa(t.getBoundingClientRect(),n);return i="BODY"===e.tagName?(r=e.ownerDocument.documentElement,o=e.scrollLeft||r.scrollLeft,e.scrollTop||r.scrollTop):(u=e.getBoundingClientRect(),o=e.scrollLeft-u.left,e.scrollTop-u.top),s.left+=o,s.right+=o,s.top+=i,s.bottom+=i,s.width=1,0<(a=t.offsetWidth-t.clientWidth)&&(n&&(a*=-1),s.left+=a,s.right+=a),s}function ds(i,a,e){var t,u,s=Je(k.none()),c=function(){!function(e){var t,n,r,o,i;for(t=vi("*[contentEditable=false]",e),o=0;o<t.length;o++)r=(n=t[o]).previousSibling,mu(r)&&(1===(i=r.data).length?r.parentNode.removeChild(r):r.deleteData(i.length-1,1)),r=n.nextSibling,hu(r)&&(1===(i=r.data).length?r.parentNode.removeChild(r):r.deleteData(0,1))}(i),u&&(qs.remove(u),u=null),s.get().each(function(e){vi(e.caret).remove(),s.set(k.none())}),pn.clearInterval(t)},l=function(){t=pn.setInterval(function(){e()?vi("div.mce-visual-caret",i).toggleClass("mce-visual-caret-hidden"):vi("div.mce-visual-caret",i).addClass("mce-visual-caret-hidden")},500)};return{show:function(t,e){var n,r;if(c(),function(e){return Ge.isElement(e)&&/^(TD|TH)$/i.test(e.tagName)}(e))return null;if(!a(e))return u=function(e,t){var n,r,o;if(r=e.ownerDocument.createTextNode(cu),o=e.parentNode,t){if(n=e.previousSibling,du(n)){if(Da(n))return n;if(mu(n))return n.splitText(n.data.length-1)}o.insertBefore(r,e)}else{if(n=e.nextSibling,du(n)){if(Da(n))return n;if(hu(n))return n.splitText(1),n}e.nextSibling?o.insertBefore(r,e.nextSibling):o.appendChild(r)}return r}(e,t),r=e.ownerDocument.createRange(),Ws(u.nextSibling)?(r.setStart(u,0),r.setEnd(u,0)):(r.setStart(u,1),r.setEnd(u,1)),r;u=Ha("p",e,t),n=fs(i,e,t),vi(u).css("top",n.top);var o=vi('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(n).appendTo(i)[0];return s.set(k.some({caret:o,element:e,before:t})),s.get().each(function(e){t&&vi(e.caret).addClass("mce-visual-caret-before")}),l(),(r=e.ownerDocument.createRange()).setStart(u,0),r.setEnd(u,0),r},hide:c,getCss:function(){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;}"},reposition:function(){s.get().each(function(e){var t=fs(i,e.element,e.before);vi(e.caret).css(G({},t))})},destroy:function(){return pn.clearInterval(t)}}}function hs(){return $s.isIE()||$s.isEdge()||$s.isFirefox()}function ms(e){return Ws(e)||Ge.isTable(e)&&hs()}function gs(e){return 0<e}function ps(e){return e<0}function vs(e,t){for(var n;n=e(t);)if(!Gs(n))return n;return null}function ys(e,t,n,r,o){var i=new yi(e,r);if(ps(t)){if((Ks(e)||Gs(e))&&n(e=vs(i.prev,!0)))return e;for(;e=vs(i.prev,o);)if(n(e))return e}if(gs(t)){if((Ks(e)||Gs(e))&&n(e=vs(i.next,!0)))return e;for(;e=vs(i.next,o);)if(n(e))return e}return null}function bs(e,t){for(;e&&e!==t;){if(Xs(e))return e;e=e.parentNode}return null}function Cs(e,t,n){return bs(e.container(),n)===bs(t.container(),n)}function ws(e,t){var n,r;return t?(n=t.container(),r=t.offset(),Js(n)?n.childNodes[r+e]:null):null}function xs(e,t){var n=t.ownerDocument.createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n}function zs(e,t,n){var r,o,i,a;for(o=e?"previousSibling":"nextSibling";n&&n!==t;){if(r=n[o],Ys(r)&&(r=r[o]),Ks(r)){if(a=n,bs(r,i=t)===bs(a,i))return r;break}if(Qs(r))break;n=n.parentNode}return null}function Es(e,t,n){var r,o,i,a,u=d(zs,!0,t),s=d(zs,!1,t);if(o=n.startContainer,i=n.startOffset,Ma(o)){if(Js(o)||(o=o.parentNode),"before"===(a=o.getAttribute("data-mce-caret"))&&(r=o.nextSibling,ms(r)))return Zs(r);if("after"===a&&(r=o.previousSibling,ms(r)))return ec(r)}if(!n.collapsed)return n;if(Ge.isText(o)){if(Ys(o)){if(1===e){if(r=s(o))return Zs(r);if(r=u(o))return ec(r)}if(-1===e){if(r=u(o))return ec(r);if(r=s(o))return Zs(r)}return n}if(mu(o)&&i>=o.data.length-1)return 1===e&&(r=s(o))?Zs(r):n;if(hu(o)&&i<=1)return-1===e&&(r=u(o))?ec(r):n;if(i===o.data.length)return(r=s(o))?Zs(r):n;if(0===i)return(r=u(o))?ec(r):n}return n}function Ns(e,t){return k.from(ws(e?0:-1,t)).filter(Ks)}function Ss(e,t,n){var r=Es(e,t,n);return-1===e?Uu.fromRangeStart(r):Uu.fromRangeEnd(r)}function ks(e){return k.from(e.getNode()).map(yt.fromDom)}function Ts(e,t){for(;t=e(t);)if(t.isVisible())return t;return t}function As(e,t){var n=Cs(e,t);return!(n||!Ge.isBr(e.getNode()))||n}var Ms,Rs,Ds=Uu,_s=Ge.isText,Bs=Ge.isBogus,Os=Xi.nodeIndex,Hs=function(e){var t=e.parentNode;return Bs(t)?Hs(t):t},Ps=function(e){return e?kn.reduce(e.childNodes,function(e,t){return Bs(t)&&"BR"!==t.nodeName?e=e.concat(Ps(t)):e.push(t),e},[]):[]},Ls=Ge.isContentEditableFalse,Vs={getBookmark:function(e,t,n){return 2===t?es(lu,n,e):3===t?function(e){var t=e.getRng();return{start:$u(e.dom.getRoot(),Ds.fromRangeStart(t)),end:$u(e.dom.getRoot(),Ds.fromRangeEnd(t))}}(e):t?function(e){return{rng:e.getRng()}}(e):ns(e,!1)},getUndoBookmark:d(es,W,!0),getPersistentBookmark:ns},Is="_mce_caret",Fs=Ge.isElement,Us=Ge.isText,js=function(e){if(Fs(e)&&Da(e)&&(_a(e)?e.removeAttribute("data-mce-caret"):is(e)),Us(e)){var t=lu(function(e){try{return e.nodeValue}catch(t){return""}}(e));as(e,t)}},qs={removeAndReposition:function(e,t){return Ds.isTextPosition(t)?ls(e,t):function(e,t){return t.container()===e.parentNode?cs(e,t):ss(e,t)}(e,t)},remove:js},$s=oe().browser,Ws=Ge.isContentEditableFalse,Ks=Ge.isContentEditableFalse,Xs=Ge.matchStyleValues("display","block table table-cell table-caption list-item"),Ys=Da,Gs=Ma,Js=Ge.isElement,Qs=La,Zs=d(xs,!0),ec=d(xs,!1);(Rs=Ms=Ms||{})[Rs.Backwards=-1]="Backwards",Rs[Rs.Forwards=1]="Forwards";function tc(e,t){return e.hasChildNodes()&&t<e.childNodes.length?e.childNodes[t]:null}function nc(e,t){if(gs(e)){if(Ac(t.previousSibling)&&!Sc(t.previousSibling))return Ds.before(t);if(Sc(t))return Ds(t,0)}if(ps(e)){if(Ac(t.nextSibling)&&!Sc(t.nextSibling))return Ds.after(t);if(Sc(t))return Ds(t,t.data.length)}return ps(e)?Tc(t)?Ds.before(t):Ds.after(t):Ds.before(t)}function rc(t){return{next:function(e){return Dc(Ms.Forwards,e,t)},prev:function(e){return Dc(Ms.Backwards,e,t)}}}function oc(e){return Ds.isTextPosition(e)?0===e.offset():La(e.getNode())}function ic(e){if(Ds.isTextPosition(e)){var t=e.container();return e.offset()===t.data.length}return La(e.getNode(!0))}function ac(e,t){return!Ds.isTextPosition(e)&&!Ds.isTextPosition(t)&&e.getNode()===t.getNode(!0)}function uc(e,t,n){return e?!ac(t,n)&&!function(e){return!Ds.isTextPosition(e)&&Ge.isBr(e.getNode())}(t)&&ic(t)&&oc(n):!ac(n,t)&&oc(t)&&ic(n)}function sc(t,n,r){return _c(t,n,r).bind(function(e){return Cs(r,e,n)&&uc(t,r,e)?_c(t,n,e):k.some(e)})}function cc(e,t){var n=e?t.firstChild:t.lastChild;return Ge.isText(n)?k.some(Ds(n,e?0:n.data.length)):n?La(n)?k.some(e?Ds.before(n):function(e){return Ge.isBr(e)?Ds.before(e):Ds.after(e)}(n)):function(e,t,n){var r=e?Ds.before(n):Ds.after(n);return _c(e,t,r)}(e,t,n):k.none()}function lc(e,t){return Ge.isElement(t)&&e.isBlock(t)&&!t.innerHTML&&!Nn.ie&&(t.innerHTML='<br data-mce-bogus="1" />'),t}function fc(e,t){return Pc.lastPositionIn(e).fold(function(){return!1},function(e){return t.setStart(e.container(),e.offset()),t.setEnd(e.container(),e.offset()),!0})}function dc(e,t,n){return!(!function(e){return!1===e.hasChildNodes()}(t)||!os(e,t))&&(function(e,t){var n=e.ownerDocument.createTextNode(cu);e.appendChild(n),t.setStart(n,0),t.setEnd(n,0)}(t,n),!0)}function hc(e,t,n,r){var o,i,a,u,s=n[t?"start":"end"],c=e.getRoot();if(s){for(a=s[0],i=c,o=s.length-1;1<=o;o--){if(u=i.childNodes,dc(c,i,r))return!0;if(s[o]>u.length-1)return!!dc(c,i,r)||fc(i,r);i=u[s[o]]}3===i.nodeType&&(a=Math.min(s[0],i.nodeValue.length)),1===i.nodeType&&(a=Math.min(s[0],i.childNodes.length)),t?r.setStart(i,a):r.setEnd(i,a)}return!0}function mc(e){return Ge.isText(e)&&0<e.data.length}function gc(e,t,n){var r,o,i,a,u,s,c=e.get(n.id+"_"+t),l=n.keep;if(c){if(r=c.parentNode,s=(u=(o="start"===t?l?c.hasChildNodes()?(r=c.firstChild,1):mc(c.nextSibling)?(r=c.nextSibling,0):mc(c.previousSibling)?(r=c.previousSibling,c.previousSibling.data.length):(r=c.parentNode,e.nodeIndex(c)+1):e.nodeIndex(c):l?c.hasChildNodes()?(r=c.firstChild,1):mc(c.previousSibling)?(r=c.previousSibling,c.previousSibling.data.length):(r=c.parentNode,e.nodeIndex(c)):e.nodeIndex(c),r),o),!l){for(a=c.previousSibling,i=c.nextSibling,Mn.each(Mn.grep(c.childNodes),function(e){Ge.isText(e)&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});c=e.get(n.id+"_"+t);)e.remove(c,!0);a&&i&&a.nodeType===i.nodeType&&Ge.isText(a)&&!Nn.opera&&(o=a.nodeValue.length,a.appendData(i.nodeValue),e.remove(i),s=(u=a,o))}return k.some(Ds(u,s))}return k.none()}function pc(e){return e&&/^(IMG)$/.test(e.nodeName)}function vc(e,t,n){return"color"!==n&&"backgroundColor"!==n||(t=e.toHex(t)),"fontWeight"===n&&700===t&&(t="bold"),"fontFamily"===n&&(t=t.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+t}function yc(e,t){for(void 0===t&&(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 bc(e,t){for(var n=t;n;){if(1===n.nodeType&&e.getContentEditable(n))return"false"===e.getContentEditable(n)?n:t;n=n.parentNode}return t}function Cc(e,t,n,r){var o,i,a=n.nodeValue;return void 0===r&&(r=e?a.length:0),e?(o=a.lastIndexOf(" ",r),-1!==(o=(i=a.lastIndexOf("\xa0",r))<o?o:i)&&!t&&(o<r||!e)&&o<=a.length&&o++):(o=a.indexOf(" ",r),i=a.indexOf("\xa0",r),o=-1!==o&&(-1===i||o<i)?o:i),o}function wc(e,t,n,r,o,i){var a,u,s;if(3===n.nodeType){if(-1!==(u=Cc(o,i,n,r)))return{container:n,offset:u};s=n}for(var c=new yi(n,e.getParent(n,e.isBlock)||t);a=c[o?"prev":"next"]();)if(3!==a.nodeType||qc(a.parentNode)){if(e.isBlock(a)||jc.isEq(a,"BR"))break}else if(-1!==(u=Cc(o,i,s=a)))return{container:a,offset:u};if(s)return{container:s,offset:r=o?0:s.length}}function xc(e,t,n,r,o){var i,a,u,s;for(3===r.nodeType&&0===r.nodeValue.length&&r[o]&&(r=r[o]),i=$c(e,r),a=0;a<i.length;a++)for(u=0;u<t.length;u++)if(!("collapsed"in(s=t[u])&&s.collapsed!==n.collapsed)&&e.is(i[a],s.selector))return i[a];return r}function zc(t,e,n,r){var o,i=t.dom,a=i.getRoot();if(e[0].wrapper||(o=i.getParent(n,e[0].block,a)),!o){var u=i.getParent(n,"LI,TD,TH");o=i.getParent(3===n.nodeType?n.parentNode:n,function(e){return e!==a&&Kc(t,e)},u)}if(o&&e[0].wrapper&&(o=$c(i,o,"ul,ol").reverse()[0]||o),!o)for(o=n;o[r]&&!i.isBlock(o[r])&&(o=o[r],!jc.isEq(o,"br")););return o||n}function Ec(e,t,n,r,o,i,a){var u,s,c,l,f,d;if(u=s=a?n:o,l=a?"previousSibling":"nextSibling",f=e.getRoot(),3===u.nodeType&&!Wc(u)&&(a?0<r:i<u.nodeValue.length))return u;for(;;){if(!t[0].block_expand&&e.isBlock(s))return s;for(c=s[l];c;c=c[l])if(!qc(c)&&!Wc(c)&&("BR"!==(d=c).nodeName||!d.getAttribute("data-mce-bogus")||d.nextSibling))return s;if(s===f||s.parentNode===f){u=s;break}s=s.parentNode}return u}var Nc=Ge.isContentEditableFalse,Sc=Ge.isText,kc=Ge.isElement,Tc=Ge.isBr,Ac=La,Mc=function(e){return Cu(e)||function(e){return!!zu(e)&&!0!==b(P(e.getElementsByTagName("*")),function(e,t){return e||gu(t)},!1)}(e)},Rc=Va,Dc=function(e,t,n){var r,o,i,a,u;if(!kc(n)||!t)return null;if(t.isEqual(Ds.after(n))&&n.lastChild){if(u=Ds.after(n.lastChild),ps(e)&&Ac(n.lastChild)&&kc(n.lastChild))return Tc(n.lastChild)?Ds.before(n.lastChild):u}else u=t;var s=u.container(),c=u.offset();if(Sc(s)){if(ps(e)&&0<c)return Ds(s,--c);if(gs(e)&&c<s.length)return Ds(s,++c);r=s}else{if(ps(e)&&0<c&&(o=tc(s,c-1),Ac(o)))return!Mc(o)&&(i=ys(o,e,Rc,o))?Sc(i)?Ds(i,i.data.length):Ds.after(i):Sc(o)?Ds(o,o.data.length):Ds.before(o);if(gs(e)&&c<s.childNodes.length&&(o=tc(s,c),Ac(o)))return Tc(o)?function(e,t){var n=t.nextSibling;return n&&Ac(n)?Sc(n)?Ds(n,0):Ds.before(n):Dc(Ms.Forwards,Ds.after(t),e)}(n,o):!Mc(o)&&(i=ys(o,e,Rc,o))?Sc(i)?Ds(i,0):Ds.before(i):Sc(o)?Ds(o,0):Ds.after(o);r=o||u.getNode()}return(gs(e)&&u.isAtEnd()||ps(e)&&u.isAtStart())&&(r=ys(r,e,$(!0),n,!0),Rc(r,n))?nc(e,r):(o=ys(r,e,Rc,n),!(a=kn.last(y(function(e,t){for(var n=[];e&&e!==t;)n.push(e),e=e.parentNode;return n}(s,n),Nc)))||o&&a.contains(o)?o?nc(e,o):null:u=gs(e)?Ds.after(a):Ds.before(a))},_c=function(e,t,n){var r=rc(t);return k.from(e?r.next(n):r.prev(n))},Bc=function(t,n,e,r){return sc(t,n,e).bind(function(e){return r(e)?Bc(t,n,e,r):k.some(e)})},Oc=d(_c,!0),Hc=d(_c,!1),Pc={fromPosition:_c,nextPosition:Oc,prevPosition:Hc,navigate:sc,navigateIgnore:Bc,positionIn:cc,firstPositionIn:d(cc,!0),lastPositionIn:d(cc,!1)},Lc=function(e,t){var n=e.dom;if(t){if(function(e){return Mn.isArray(e.start)}(t))return function(e,t){var n=e.createRng();return hc(e,!0,t,n)&&hc(e,!1,t,n)?k.some(n):k.none()}(n,t);if(function(e){return"string"==typeof e.start}(t))return k.some(function(e,t){var n,r;return n=e.createRng(),r=Wu(e.getRoot(),t.start),n.setStart(r.container(),r.offset()),r=Wu(e.getRoot(),t.end),n.setEnd(r.container(),r.offset()),n}(n,t));if(function(e){return e.hasOwnProperty("id")}(t))return function(r,e){var t=gc(r,"start",e),n=gc(r,"end",e);return Ya(t,n.or(t),function(e,t){var n=r.createRng();return n.setStart(lc(r,e.container()),e.offset()),n.setEnd(lc(r,t.container()),t.offset()),n})}(n,t);if(function(e){return e.hasOwnProperty("name")}(t))return function(n,e){return k.from(n.select(e.name)[e.index]).map(function(e){var t=n.createRng();return t.selectNode(e),t})}(n,t);if(function(e){return e.hasOwnProperty("rng")}(t))return k.some(t.rng)}return k.none()},Vc=function(e,t,n){return Vs.getBookmark(e,t,n)},Ic=function(t,e){Lc(t,e).each(function(e){t.setRng(e)})},Fc=function(e){return Ge.isElement(e)&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},Uc=function(e){return e&&3===e.nodeType&&/^([\t \r\n]+|)$/.test(e.nodeValue)},jc={isInlineBlock:pc,moveStart:function(e,t,n){var r,o,i,a=n.startOffset,u=n.startContainer;if((n.startContainer!==n.endContainer||!pc(n.startContainer.childNodes[n.startOffset]))&&1===u.nodeType)for(a<(i=u.childNodes).length?(u=i[a],r=new yi(u,e.getParent(u,e.isBlock))):(u=i[i.length-1],(r=new yi(u,e.getParent(u,e.isBlock))).next(!0)),o=r.current();o;o=r.next())if(3===o.nodeType&&!Uc(o))return n.setStart(o,0),void t.setRng(n)},getNonWhiteSpaceSibling:function(e,t,n){if(e)for(t=t?"nextSibling":"previousSibling",e=n?e:e[t];e;e=e[t])if(1===e.nodeType||!Uc(e))return e},isTextBlock:function(e,t){return t.nodeType&&(t=t.nodeName),!!e.schema.getTextBlockElements()[t.toLowerCase()]},isValid:function(e,t,n){return e.schema.isValidChild(t,n)},isWhiteSpaceNode:Uc,replaceVars:function(e,n){return"string"!=typeof e?e=e(n):n&&(e=e.replace(/%(\w+)/g,function(e,t){return n[t]||e})),e},isEq:function(e,t){return e=""+((e=e||"").nodeName||e),t=""+((t=t||"").nodeName||t),e.toLowerCase()===t.toLowerCase()},normalizeStyleValue:vc,getStyle:function(e,t,n){return vc(e,e.getStyle(t,n),n)},getTextDecoration:function(t,e){var n;return t.getParent(e,function(e){return(n=t.getStyle(e,"text-decoration"))&&"none"!==n}),n},getParents:function(e,t,n){return e.getParents(t,n,e.getRoot())}},qc=Fc,$c=jc.getParents,Wc=jc.isWhiteSpaceNode,Kc=jc.isTextBlock,Xc=function(e,t,n,r){var o,i=t.startContainer,a=t.startOffset,u=t.endContainer,s=t.endOffset,c=e.dom;return 1===i.nodeType&&i.hasChildNodes()&&3===(i=Ka(i,a)).nodeType&&(a=0),1===u.nodeType&&u.hasChildNodes()&&3===(u=Ka(u,t.collapsed?s:s-1)).nodeType&&(s=u.nodeValue.length),i=bc(c,i),u=bc(c,u),(qc(i.parentNode)||qc(i))&&(i=qc(i)?i:i.parentNode,3===(i=t.collapsed?i.previousSibling||i:i.nextSibling||i).nodeType&&(a=t.collapsed?i.length:0)),(qc(u.parentNode)||qc(u))&&(u=qc(u)?u:u.parentNode,3===(u=t.collapsed?u.nextSibling||u:u.previousSibling||u).nodeType&&(s=t.collapsed?0:u.length)),t.collapsed&&((o=wc(c,e.getBody(),i,a,!0,r))&&(i=o.container,a=o.offset),(o=wc(c,e.getBody(),u,s,!1,r))&&(u=o.container,s=o.offset)),n[0].inline&&(u=r?u:function(e,t){var n=yc(e,t);if(n.node){for(;n.node&&0===n.offset&&n.node.previousSibling;)n=yc(n.node.previousSibling);n.node&&0<n.offset&&3===n.node.nodeType&&" "===n.node.nodeValue.charAt(n.offset-1)&&1<n.offset&&(e=n.node).splitText(n.offset-1)}return e}(u,s)),(n[0].inline||n[0].block_expand)&&(n[0].inline&&3===i.nodeType&&0!==a||(i=Ec(c,n,i,a,u,s,!0)),n[0].inline&&3===u.nodeType&&s!==u.nodeValue.length||(u=Ec(c,n,i,a,u,s,!1))),n[0].selector&&!1!==n[0].expand&&!n[0].inline&&(i=xc(c,n,t,i,"previousSibling"),u=xc(c,n,t,u,"nextSibling")),(n[0].block||n[0].selector)&&(i=zc(e,n,i,"previousSibling"),u=zc(e,n,u,"nextSibling"),n[0].block&&(c.isBlock(i)||(i=Ec(c,n,i,a,u,s,!0)),c.isBlock(u)||(u=Ec(c,n,i,a,u,s,!1)))),1===i.nodeType&&(a=c.nodeIndex(i),i=i.parentNode),1===u.nodeType&&(s=c.nodeIndex(u)+1,u=u.parentNode),{startContainer:i,startOffset:a,endContainer:u,endOffset:s}},Yc=Mn.each,Gc=function(e,t,o){var n,r,i,a,u,s,c,l=t.startContainer,f=t.startOffset,d=t.endContainer,h=t.endOffset;if(0<(c=e.select("td[data-mce-selected],th[data-mce-selected]")).length)Yc(c,function(e){o([e])});else{var m=function(e){var t;return 3===(t=e[0]).nodeType&&t===l&&f>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===h&&0<e.length&&t===d&&3===t.nodeType&&e.splice(e.length-1,1),e},g=function(e,t,n){for(var r=[];e&&e!==n;e=e[t])r.push(e);return r},p=function(e,t){do{if(e.parentNode===t)return e;e=e.parentNode}while(e)},v=function(e,t,n){var r=n?"nextSibling":"previousSibling";for(u=(a=e).parentNode;a&&a!==t;a=u)u=a.parentNode,(s=g(a===e?a:a[r],r)).length&&(n||s.reverse(),o(m(s)))};if(1===l.nodeType&&l.hasChildNodes()&&(l=l.childNodes[f]),1===d.nodeType&&d.hasChildNodes()&&(d=function(e,t){var n=e.childNodes;return--t>n.length-1?t=n.length-1:t<0&&(t=0),n[t]||e}(d,h)),l===d)return o(m([l]));for(n=e.findCommonAncestor(l,d),a=l;a;a=a.parentNode){if(a===d)return v(l,n,!0);if(a===n)break}for(a=d;a;a=a.parentNode){if(a===l)return v(d,n);if(a===n)break}r=p(l,n)||l,i=p(d,n)||d,v(l,r,!0),(s=g(r===l?r:r.nextSibling,"nextSibling",i===d?i.nextSibling:i)).length&&o(m(s)),v(d,i)}};function Jc(e){return ol.get(e)}function Qc(t,n,r,o){return Se(n).fold(function(){return"skipping"},function(e){return"br"===o||function(e){return zt(e)&&"\ufeff"===Jc(e)}(n)?"valid":function(e){return xt(e)&&ha(e,nu())}(n)?"existing":rs(n)?"caret":jc.isValid(t,r,o)&&jc.isValid(t,ie(e),r)?"valid":"invalid-child"})}function Zc(e,t,n,r){var o=t.uid,i=void 0===o?function(e){var t=(new Date).getTime();return e+"_"+Math.floor(1e9*Math.random())+ ++au+String(t)}("mce-annotation"):o,a=function h(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["uid"]),u=yt.fromTag("span",e);fa(u,nu()),Tt(u,""+ou(),i),Tt(u,""+ru(),n);var s=r(i,a),c=s.attributes,l=void 0===c?{}:c,f=s.classes,d=void 0===f?[]:f;return me(u,l),function(t,e){z(e,function(e){fa(t,e)})}(u,d),u}function el(n,e,t,r,o){function i(){c.set(k.none())}function a(e){z(e,l)}var u=[],s=Zc(n.getDoc(),o,t,r),c=Je(k.none()),l=function(e){switch(Qc(n,e,"span",ie(e))){case"invalid-child":i();var t=Re(e);a(t),i();break;case"valid":!function(e,t){Ci(e,t),Di(t,e)}(e,c.get().getOrThunk(function(){var e=ka(s);return u.push(e),c.set(k.some(e)),e}))}};return Gc(n.dom,e,function(e){i(),function(e){var t=X(e,yt.fromDom);a(t)}(e)}),u}function tl(o,i,a,u){o.undoManager.transact(function(){var e=o.selection.getRng();if(e.collapsed&&function(e,t){var n=Xc(e,t,[{inline:!0}],function(e){return 3===e.startContainer.nodeType&&e.startContainer.nodeValue.length>=e.startOffset&&"\xa0"===e.startContainer.nodeValue[e.startOffset]}(t));t.setStart(n.startContainer,n.startOffset),t.setEnd(n.endContainer,n.endOffset),e.selection.setRng(t)}(o,e),o.selection.getRng().collapsed){var t=Zc(o.getDoc(),u,i,a.decorate);Aa(t,"\xa0"),o.selection.getRng().insertNode(t.dom()),o.selection.select(t.dom())}else{var n=Vs.getPersistentBookmark(o.selection,!1),r=o.selection.getRng();el(o,r,i,a.decorate,u),o.selection.moveToBookmark(n)}})}function nl(r){var o=function(){var n={};return{register:function(e,t){n[e]={name:e,settings:t}},lookup:function(e){return n.hasOwnProperty(e)?k.from(n[e]).map(function(e){return e.settings}):k.none()}}}();Na(r,o);var n=Ea(r);return{register:function(e,t){o.register(e,t)},annotate:function(t,n){o.lookup(t).each(function(e){tl(r,t,e,n)})},annotationChanged:function(e,t){n.addListener(e,t)},remove:function(e){za(r,k.some(e)).each(function(e){var t=e.elements;z(t,Ni)})},getAll:function(e){var t=function(e,t){var n=yt.fromDom(e.getBody()),r=ma(n,"["+ru()+'="'+t+'"]'),o={};return z(r,function(e){var t=ge(e,ou()),n=o.hasOwnProperty(t)?o[t]:[];o[t]=n.concat([e])}),o}(r,e);return se(t,function(e){return X(e,function(e){return e.dom()})})}}}function rl(e,t,n){var r=n?"lastChild":"firstChild",o=n?"prev":"next";if(e[r])return e[r];if(e!==t){var i=e[o];if(i)return i;for(var a=e.parent;a&&a!==t;a=a.parent)if(i=a[o])return i}}var ol=function bN(n,r){var t=function(e){return n(e)?k.from(e.dom().nodeValue):k.none()};return{get:function(e){if(!n(e))throw new Error("Can only get "+r+" value of a "+r+" node");return t(e).getOr("")},getOption:t,set:function(e,t){if(!n(e))throw new Error("Can only set raw "+r+" value of a "+r+" node");e.dom().nodeValue=t}}}(zt,"text"),il=/^[ \t\r\n]*$/,al={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},ul=(sl.create=function(e,t){var n=new sl(e,al[e]||1);if(t)for(var r in t)n.attr(r,t[r]);return n},sl.prototype.replace=function(e){return e.parent&&e.remove(),this.insert(e,this),this.remove(),this},sl.prototype.attr=function(e,t){var n;if("string"!=typeof e){for(var r in e)this.attr(r,e[r]);return this}if(n=this.attributes){if(t===undefined)return n.map[e];if(null===t){if(e in n.map){delete n.map[e];for(var o=n.length;o--;)if(n[o].name===e)return n.splice(o,1),this}return this}if(e in n.map){for(o=n.length;o--;)if(n[o].name===e){n[o].value=t;break}}else n.push({name:e,value:t});return n.map[e]=t,this}},sl.prototype.clone=function(){var e,t=new sl(this.name,this.type);if(e=this.attributes){var n=[];n.map={};for(var r=0,o=e.length;r<o;r++){var i=e[r];"id"!==i.name&&(n[n.length]={name:i.name,value:i.value},n.map[i.name]=i.value)}t.attributes=n}return t.value=this.value,t.shortEnded=this.shortEnded,t},sl.prototype.wrap=function(e){return this.parent.insert(e,this),e.append(this),this},sl.prototype.unwrap=function(){for(var e=this.firstChild;e;){var t=e.next;this.insert(e,this,!0),e=t}this.remove()},sl.prototype.remove=function(){var e=this.parent,t=this.next,n=this.prev;return e&&(e.firstChild===this?(e.firstChild=t)&&(t.prev=null):n.next=t,e.lastChild===this?(e.lastChild=n)&&(n.next=null):t.prev=n,this.parent=this.next=this.prev=null),this},sl.prototype.append=function(e){e.parent&&e.remove();var t=this.lastChild;return t?((t.next=e).prev=t,this.lastChild=e):this.lastChild=this.firstChild=e,e.parent=this,e},sl.prototype.insert=function(e,t,n){e.parent&&e.remove();var r=t.parent||this;return n?(t===r.firstChild?r.firstChild=e:t.prev.next=e,e.prev=t.prev,(e.next=t).prev=e):(t===r.lastChild?r.lastChild=e:t.next.prev=e,e.next=t.next,(e.prev=t).next=e),e.parent=r,e},sl.prototype.getAll=function(e){for(var t=[],n=this.firstChild;n;n=rl(n,this))n.name===e&&t.push(n);return t},sl.prototype.empty=function(){if(this.firstChild){for(var e=[],t=this.firstChild;t;t=rl(t,this))e.push(t);for(var n=e.length;n--;)(t=e[n]).parent=t.firstChild=t.lastChild=t.next=t.prev=null}return this.firstChild=this.lastChild=null,this},sl.prototype.isEmpty=function(e,t,n){void 0===t&&(t={});var r=this.firstChild;if(r)do{if(1===r.type){if(r.attr("data-mce-bogus"))continue;if(e[r.name])return!1;for(var o=r.attributes.length;o--;){var i=r.attributes[o].name;if("name"===i||0===i.indexOf("data-mce-bookmark"))return!1}}if(8===r.type)return!1;if(3===r.type&&!il.test(r.value))return!1;if(3===r.type&&r.parent&&t[r.parent.name]&&il.test(r.value))return!1;if(n&&n(r))return!1}while(r=rl(r,this));return!0},sl.prototype.walk=function(e){return rl(this,null,e)},sl);function sl(e,t){this.name=e,1===(this.type=t)&&(this.attributes=[],this.attributes.map={})}function cl(e,t,n){var r,o,i,a,u=1;for(a=e.getShortEndedElements(),(i=/<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g).lastIndex=r=n;o=i.exec(t);){if(r=i.lastIndex,"/"===o[1])u--;else if(!o[1]){if(o[2]in a)continue;u++}if(0===u)break}return r}function ll(e,t){var n=e.exec(t);if(n){var r=n[1],o=n[2];return"string"==typeof r&&"data-mce-bogus"===r.toLowerCase()?o:null}return null}function fl(V,I){void 0===I&&(I=pr());function e(){}!1!==(V=V||{}).fix_self_closing&&(V.fix_self_closing=!0);var F=V.comment?V.comment:e,U=V.cdata?V.cdata:e,j=V.text?V.text:e,q=V.start?V.start:e,$=V.end?V.end:e,W=V.pi?V.pi:e,K=V.doctype?V.doctype:e;return{parse:function(e){function t(e){var t,n;for(t=_.length;t--&&_[t].name!==e;);if(0<=t){for(n=_.length-1;t<=n;n--)(e=_[n]).valid&&$(e.name);_.length=t}}function n(e,t,n,r,o){var i,a;if(n=(t=t.toLowerCase())in h?t:O(n||r||o||""),g&&!l&&!1===function(e){return 0===e.indexOf("data-")||0===e.indexOf("aria-")}(t)){if(!(i=C[t])&&w){for(a=w.length;a--&&!(i=w[a]).pattern.test(t););-1===a&&(i=null)}if(!i)return;if(i.validValues&&!(n in i.validValues))return}if(H[t]&&!V.allow_script_urls){var u=n.replace(/[\s\u0000-\u001F]+/g,"");try{u=decodeURIComponent(u)}catch(s){u=unescape(u)}if(P.test(u))return;if(function(e,t){return!e.allow_html_data_urls&&(/^data:image\//i.test(t)?!1===e.allow_svg_data_urls&&/^data:image\/svg\+xml/i.test(t):/^data:/i.test(t))}(V,u))return}l&&(t in H||0===t.indexOf("on"))||(c.map[t]=n,c.push({name:t,value:n}))}var r,o,i,c,a,u,s,l,f,d,h,m,g,p,v,y,b,C,w,x,z,E,N,S,k,T,A,M,R,D=0,_=[],B=0,O=ir.decode,H=Mn.makeMap("src,href,data,background,formaction,poster,xlink:href"),P=/((java|vb)script|mhtml):/i;for(k=new RegExp("<(?:(?:!--([\\w\\W]*?)--!?>)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),T=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,d=I.getShortEndedElements(),S=V.self_closing_elements||I.getSelfClosingElements(),h=I.getBoolAttrs(),g=V.validate,f=V.remove_internals,R=V.fix_self_closing,A=I.getSpecialElements(),N=e+">";r=k.exec(N);){if(D<r.index&&j(O(e.substr(D,r.index-D))),o=r[6])":"===(o=o.toLowerCase()).charAt(0)&&(o=o.substr(1)),t(o);else if(o=r[7]){if(r.index+r[0].length>e.length){j(O(e.substr(r.index))),D=r.index+r[0].length;continue}":"===(o=o.toLowerCase()).charAt(0)&&(o=o.substr(1)),m=o in d,R&&S[o]&&0<_.length&&_[_.length-1].name===o&&t(o);var L=ll(T,r[8]);if(null!==L){if("all"===L){D=cl(I,e,k.lastIndex),k.lastIndex=D;continue}v=!1}if(!g||(p=I.getElementRule(o))){if(v=!0,g&&(C=p.attributes,w=p.attributePatterns),(b=r[8])?((l=-1!==b.indexOf("data-mce-type"))&&f&&(v=!1),(c=[]).map={},b.replace(T,n)):(c=[]).map={},g&&!l){if(x=p.attributesRequired,z=p.attributesDefault,E=p.attributesForced,p.removeEmptyAttrs&&!c.length&&(v=!1),E)for(a=E.length;a--;)s=(y=E[a]).name,"{$uid}"===(M=y.value)&&(M="mce_"+B++),c.map[s]=M,c.push({name:s,value:M});if(z)for(a=z.length;a--;)(s=(y=z[a]).name)in c.map||("{$uid}"===(M=y.value)&&(M="mce_"+B++),c.map[s]=M,c.push({name:s,value:M}));if(x){for(a=x.length;a--&&!(x[a]in c.map););-1===a&&(v=!1)}if(y=c.map["data-mce-bogus"]){if("all"===y){D=cl(I,e,k.lastIndex),k.lastIndex=D;continue}v=!1}}v&&q(o,c,m)}else v=!1;if(i=A[o]){i.lastIndex=D=r.index+r[0].length,D=(r=i.exec(e))?(v&&(u=e.substr(D,r.index-D)),r.index+r[0].length):(u=e.substr(D),e.length),v&&(0<u.length&&j(u,!0),$(o)),k.lastIndex=D;continue}m||(b&&b.indexOf("/")===b.length-1?v&&$(o):_.push({name:o,valid:v}))}else(o=r[1])?(">"===o.charAt(0)&&(o=" "+o),V.allow_conditional_comments||"[if"!==o.substr(0,3).toLowerCase()||(o=" "+o),F(o)):(o=r[2])?U(o.replace(/<!--|-->/g,"")):(o=r[3])?K(o):(o=r[4])&&W(o,r[5]);D=r.index+r[0].length}for(D<e.length&&j(O(e.substr(D))),a=_.length-1;0<=a;a--)(o=_[a]).valid&&$(o.name)}}}(fl=fl||{}).findEndTag=cl;function dl(e,t){var n,r,o,i,a,u=t,s=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,c=e.schema;for(u=function(e,t){var n=new RegExp(["\\s?("+e.join("|")+')="[^"]+"'].join("|"),"gi");return t.replace(n,"")}(e.getTempAttrs(),u),a=c.getShortEndedElements();i=s.exec(u);)r=s.lastIndex,o=i[0].length,n=a[i[1]]?r:of.findEndTag(c,u,r),u=u.substring(0,r-o)+u.substring(n),s.lastIndex=r-o;return lu(u)}function hl(e,t,n){var r=e.getParam(t,n);if(-1===r.indexOf("="))return r;var o=e.getParam(t,"","hash");return o.hasOwnProperty(e.id)?o[e.id]:n}function ml(e,t,n){var r;if(t.format=t.format?t.format:"html",t.get=!0,t.getInner=!0,t.no_events||e.fire("BeforeGetContent",t),"raw"===t.format)r=Mn.trim(af.trimExternal(e.serializer,n.innerHTML));else if("text"===t.format)r=lu(n.innerText||n.textContent);else{if("tree"===t.format)return e.serializer.serialize(n,t);r=function(e,t){var n=mf(e),r=new RegExp("^(<"+n+"[^>]*>(&nbsp;|&#160;|\\s|\xa0|<br \\/>|)<\\/"+n+">[\r\n]*|<br \\/>[\r\n]*)$");return t.replace(r,"")}(e,e.serializer.serialize(n,t))}return"text"===t.format||Wn(yt.fromDom(n))?t.content=r:t.content=Mn.trim(r),t.no_events||e.fire("GetContent",t),t.content}function gl(e){var u,s,c,l,f,d=[];return u=(e=e||{}).indent,s=Ff(e.indent_before||""),c=Ff(e.indent_after||""),l=ir.getEncodeFunc(e.entity_encoding||"raw",e.entities),f="html"===e.element_format,{start:function(e,t,n){var r,o,i,a;if(u&&s[e]&&0<d.length&&0<(a=d[d.length-1]).length&&"\n"!==a&&d.push("\n"),d.push("<",e),t)for(r=0,o=t.length;r<o;r++)i=t[r],d.push(" ",i.name,'="',l(i.value,!0),'"');d[d.length]=!n||f?">":" />",n&&u&&c[e]&&0<d.length&&0<(a=d[d.length-1]).length&&"\n"!==a&&d.push("\n")},end:function(e){var t;d.push("</",e,">"),u&&c[e]&&0<d.length&&0<(t=d[d.length-1]).length&&"\n"!==t&&d.push("\n")},text:function(e,t){0<e.length&&(d[d.length]=t?e:l(e))},cdata:function(e){d.push("<![CDATA[",e,"]]>")},comment:function(e){d.push("\x3c!--",e,"--\x3e")},pi:function(e,t){t?d.push("<?",e," ",l(t),"?>"):d.push("<?",e,"?>"),u&&d.push("\n")},doctype:function(e){d.push("<!DOCTYPE",e,">",u?"\n":"")},reset:function(){d.length=0},getContent:function(){return d.join("").replace(/\n$/,"")}}}function pl(t,m){void 0===m&&(m=pr());var g=gl(t);return(t=t||{}).validate=!("validate"in t)||t.validate,{serialize:function(e){var f,d;d=t.validate,f={3:function(e){g.text(e.value,e.raw)},8:function(e){g.comment(e.value)},7:function(e){g.pi(e.name,e.value)},10:function(e){g.doctype(e.value)},4:function(e){g.cdata(e.value)},11:function(e){if(e=e.firstChild)for(;h(e),e=e.next;);}},g.reset();var h=function(e){var t,n,r,o,i,a,u,s,c,l=f[e.type];if(l)l(e);else{if(t=e.name,n=e.shortEnded,r=e.attributes,d&&r&&1<r.length&&((a=[]).map={},c=m.getElementRule(e.name))){for(u=0,s=c.attributesOrder.length;u<s;u++)(o=c.attributesOrder[u])in r.map&&(i=r.map[o],a.map[o]=i,a.push({name:o,value:i}));for(u=0,s=r.length;u<s;u++)(o=r[u].name)in a.map||(i=r.map[o],a.map[o]=i,a.push({name:o,value:i}));r=a}if(g.start(e.name,r,n),!n){if(e=e.firstChild)for(;h(e),e=e.next;);g.end(t)}}};return 1!==e.type||t.inner?f[11](e):h(e),g.getContent()}}}function vl(e,t,n){var r=function(e,n,t){var r={},o={},i=[];for(var a in t.firstChild&&Uf(t.firstChild,function(t){z(e,function(e){e.name===t.name&&(r[e.name]?r[e.name].nodes.push(t):r[e.name]={filter:e,nodes:[t]})}),z(n,function(e){"string"==typeof t.attr(e.name)&&(o[e.name]?o[e.name].nodes.push(t):o[e.name]={filter:e,nodes:[t]})})}),r)r.hasOwnProperty(a)&&i.push(r[a]);for(var a in o)o.hasOwnProperty(a)&&i.push(o[a]);return i}(e,t,n);z(r,function(t){z(t.filter.callbacks,function(e){e(t.nodes,t.filter.name,{})})})}function yl(e){var t=Ee(e).dom();return e.dom()===t.activeElement}function bl(e){var t=e!==undefined?e.dom():j.document;return k.from(t.activeElement).map(yt.fromDom)}function Cl(e,t){var n=zt(t)?Jc(t).length:Re(t).length+1;return n<e?n:e<0?0:e}function wl(e){return Xf.range(e.start(),Cl(e.soffset(),e.start()),e.finish(),Cl(e.foffset(),e.finish()))}function xl(e,t){return!Ge.isRestrictedNode(t.dom())&&(Bt(e,t)||ze(e,t))}function zl(t){return function(e){return xl(t,e.start())&&xl(t,e.finish())}}function El(e){return!0===e.inline||Yf.isIE()}function Nl(e){return Xf.range(yt.fromDom(e.startContainer),e.startOffset,yt.fromDom(e.endContainer),e.endOffset)}function Sl(e){var t=e.getSelection();return(t&&0!==t.rangeCount?k.from(t.getRangeAt(0)):k.none()).map(Nl)}function kl(e){var t=Ne(e);return Sl(t.dom()).filter(zl(e))}function Tl(e,t){return k.from(t).filter(zl(e)).map(wl)}function Al(e){var t=j.document.createRange();try{return t.setStart(e.start().dom(),e.soffset()),t.setEnd(e.finish().dom(),e.foffset()),k.some(t)}catch(n){return k.none()}}function Ml(t){return(t.bookmark?t.bookmark:k.none()).bind(function(e){return Tl(yt.fromDom(t.getBody()),e)}).bind(Al)}function Rl(t,e){oe().browser.isIE()?function(e){e.on("focusout",function(){Gf(e)})}(t):function(e,t){e.on("mouseup touchend",function(e){t.throttle()})}(t,e),t.on("keyup NodeChange",function(e){!function(e){return"nodechange"===e.type&&e.selectionChange}(e)&&Gf(t)})}function Dl(e){return Zf.isEditorUIElement(e)}function _l(t,e){var n=t?t.settings.custom_ui_selector:"";return null!==td.getParent(e,function(e){return Dl(e)||!!n&&t.dom.is(e,n)})}function Bl(r,e){var t=e.editor;ed(t),t.on("focusin",function(){var e=r.focusedEditor;e!==this&&(e&&e.fire("blur",{focusedEditor:this}),r.setActive(this),(r.focusedEditor=this).fire("focus",{blurredEditor:e}),this.focus(!0))}),t.on("focusout",function(){var t=this;pn.setEditorTimeout(t,function(){var e=r.focusedEditor;_l(t,function(){try{return j.document.activeElement}catch(e){return j.document.body}}())||e!==t||(t.fire("blur",{focusedEditor:null}),r.focusedEditor=null)})}),rf||(rf=function(e){var t,n=r.activeEditor;t=e.target,n&&t.ownerDocument===j.document&&(t===j.document.body||_l(n,t)||r.focusedEditor!==n||(n.fire("blur",{focusedEditor:null}),r.focusedEditor=null))},td.bind(j.document,"focusin",rf))}function Ol(e,t){e.focusedEditor===t.editor&&(e.focusedEditor=null),e.activeEditor||(td.unbind(j.document,"focusin",rf),rf=null)}function Hl(t,e){return function(e){return e.collapsed?k.from(Ka(e.startContainer,e.startOffset)).map(yt.fromDom):k.none()}(e).bind(function(e){return qn(e)?k.some(e):!1===Bt(t,e)?k.some(t):k.none()})}function Pl(t,e){Hl(yt.fromDom(t.getBody()),e).bind(function(e){return Pc.firstPositionIn(e.dom())}).fold(function(){t.selection.normalize()},function(e){return t.selection.setRng(e.toRange())})}function Ll(e){if(e.setActive)try{e.setActive()}catch(t){e.focus()}else e.focus()}function Vl(e){return yl(e)||function(t){return bl(Ee(t)).filter(function(e){return t.dom().contains(e.dom())})}(e).isSome()}function Il(e){return e.inline?function(e){var t=e.getBody();return t&&Vl(yt.fromDom(t))}(e):function(e){return e.iframeElement&&yl(yt.fromDom(e.iframeElement))}(e)}function Fl(e){return e instanceof ul}function Ul(e,t){e.dom.setHTML(e.getBody(),t),function(r){ud(r)&&Pc.firstPositionIn(r.getBody()).each(function(e){var t=e.getNode(),n=Ge.isTable(t)?Pc.firstPositionIn(t).getOr(e):e;r.selection.setRng(n.toRange())})}(e)}function jl(t,n,r){return void 0===r&&(r={}),r.format=r.format?r.format:"html",r.set=!0,r.content=Fl(n)?"":n,Fl(n)||r.no_events||(t.fire("BeforeSetContent",r),n=r.content),k.from(t.getBody()).fold($(n),function(e){return Fl(n)?function(e,t,n,r){vl(e.parser.getNodeFilters(),e.parser.getAttributeFilters(),n);var o=pl({validate:e.validate},e.schema).serialize(n);return r.content=Wn(yt.fromDom(t))?o:Mn.trim(o),Ul(e,r.content),r.no_events||e.fire("SetContent",r),n}(t,e,n,r):function(e,t,n,r){var o,i;return 0===n.length||/^\s+$/.test(n)?(i='<br data-mce-bogus="1">',"TABLE"===t.nodeName?n="<tr><td>"+i+"</td></tr>":/^(UL|OL)$/.test(t.nodeName)&&(n="<li>"+i+"</li>"),n=(o=mf(e))&&e.schema.isValidChild(t.nodeName.toLowerCase(),o.toLowerCase())?(n=i,e.dom.createHTML(o,e.settings.forced_root_block_attrs,n)):n||'<br data-mce-bogus="1">',Ul(e,n),e.fire("SetContent",r)):("raw"!==r.format&&(n=pl({validate:e.validate},e.schema).serialize(e.parser.parse(n,{isRootContent:!0,insert:!0}))),r.content=Wn(yt.fromDom(t))?n:Mn.trim(n),Ul(e,r.content),r.no_events||e.fire("SetContent",r)),r.content}(t,e,n,r)})}function ql(e){return k.from(e).each(function(e){return e.destroy()})}function $l(e){if(!e.removed){var t=e._selectionOverrides,n=e.editorUpload,r=e.getBody(),o=e.getElement();r&&e.save({is_removing:!0}),e.removed=!0,e.unbindAllNativeEvents(),e.hasHiddenInput&&o&&pd.remove(o.nextSibling),fd(e),e.editorManager.remove(e),!e.inline&&r&&function(e){pd.setStyle(e.id,"display",e.orgDisplay)}(e),dd(e),pd.remove(e.getContainer()),ql(t),ql(n),e.destroy()}}function Wl(e,t){var n=e.selection,r=e.dom;e.destroyed||(t||e.removed?(t||(e.editorManager.off("beforeunload",e._beforeUnload),e.theme&&e.theme.destroy&&e.theme.destroy(),ql(n),ql(r)),function(e){var t=e.formElement;t&&(t._mceOldSubmit&&(t.submit=t._mceOldSubmit,t._mceOldSubmit=null),pd.unbind(t,"submit reset",e.formEventDelegate))}(e),function(e){e.contentAreaContainer=e.formElement=e.container=e.editorContainer=null,e.bodyElement=e.contentDocument=e.contentWindow=null,e.iframeElement=e.targetElm=null,e.selection&&(e.selection=e.selection.win=e.selection.dom=e.selection.dom.doc=null)}(e),e.destroyed=!0):e.remove())}function Kl(a){return function(){for(var e=new Array(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<e.length;r++){var o=e[r];for(var i in o)vd.call(o,i)&&(n[i]=a(n[i],o[i]))}return n}}function Xl(e){var t=A(e)?e.join(" "):e,n=X(K(t)?t.split(" "):[],te);return y(n,function(e){return 0<e.length})}function Yl(e,t){return e.sections().hasOwnProperty(t)}function Gl(e,t,n,r){var o=Xl(n.forced_plugins),i=Xl(r.plugins),a=function(e,t){return Yl(e,t)?e.sections()[t]:{}}(t,"mobile"),u=a.plugins?Xl(a.plugins):i,s=function(e,t){return[].concat(Xl(e)).concat(Xl(t))}(o,e&&function(e,t,n){var r=e.sections();return Yl(e,t)&&r[t].theme===n}(t,"mobile","mobile")?function(e){return y(e,d(h,Nd))}(u):e&&Yl(t,"mobile")?u:i);return Mn.extend(r,{plugins:s.join(" ")})}function Jl(e,t,n,r,o){var i=e?{mobile:function(e){return G(G(G({},Sd),{resize:!1,toolbar_drawer:"scrolling",toolbar_sticky:!1}),e?{menubar:!1}:{})}(t)}:{},a=function(n,e){var t=ce(e,function(e,t){return h(n,t)});return Cd(t.t,t.f)}(["mobile"],yd(i,o)),u=Mn.extend(n,r,a.settings(),function(e,t){return e&&Yl(t,"mobile")}(e,a)?function(e,t,n){void 0===n&&(n={});var r=e.sections(),o=r.hasOwnProperty(t)?r[t]:{};return Mn.extend({},n,o)}(a,"mobile"):{},{validate:!0,external_plugins:function(e,t){var n=t.external_plugins?t.external_plugins:{};return e&&e.external_plugins?Mn.extend({},e.external_plugins,n):n}(r,a.settings())});return Gl(e,a,r,u)}function Ql(e,t,n,r,o){var i=function(e,t,n,r){var o={id:e,theme:"silver",toolbar_drawer:"floating",plugins:"",document_base_url:t,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_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,inline_styles:!0,convert_fonts_to_spans:!0,indent:!0,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,summary,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,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",entity_encoding:"named",url_converter:r.convertURL,url_converter_scope:r};return G(G({},o),n?Sd:{})}(t,n,xd,e);return Jl(zd||Ed,zd,i,r,o)}function Zl(e,t,n){return k.from(t.settings[n]).filter(e)}function ef(e,t,n,r){var o=t in e.settings?e.settings[t]:n;return"hash"===r?function(e){var n={};return"string"==typeof e?z(0<e.indexOf("=")?e.split(/[;,](?![^=;,]*(?:[;,]|$))/):e.split(","),function(e){var t=e.split("=");1<t.length?n[Mn.trim(t[0])]=Mn.trim(t[1]):n[Mn.trim(t[0])]=Mn.trim(t[0])}):n=e,n}(o):"string"===r?Zl(K,e,t).getOr(n):"number"===r?Zl(_,e,t).getOr(n):"boolean"===r?Zl(R,e,t).getOr(n):"object"===r?Zl(T,e,t).getOr(n):"array"===r?Zl(A,e,t).getOr(n):"string[]"===r?Zl(function(t){return function(e){return A(e)&&w(e,t)}}(K),e,t).getOr(n):"function"===r?Zl(D,e,t).getOr(n):o}function tf(e,t){return t.dom()[e]}function nf(e,t){return parseInt(ve(t,e),10)}var rf,of=fl,af={trimExternal:dl,trimInternal:dl},uf=function(e){return e.getParam("iframe_attrs",{})},sf=function(e){return e.getParam("doctype","<!DOCTYPE html>")},cf=function(e){return e.getParam("document_base_url","")},lf=function(e){return hl(e,"body_id","tinymce")},ff=function(e){return hl(e,"body_class","")},df=function(e){return e.getParam("content_security_policy","")},hf=function(e){return e.getParam("br_in_pre",!0)},mf=function(e){if(e.getParam("force_p_newlines",!1))return"p";var t=e.getParam("forced_root_block","p");return!1===t?"":!0===t?"p":t},gf=function(e){return e.getParam("forced_root_block_attrs",{})},pf=function(e){return e.getParam("br_newline_selector",".mce-toc h2,figcaption,caption")},vf=function(e){return e.getParam("no_newline_selector","")},yf=function(e){return e.getParam("keep_styles",!0)},bf=function(e){return e.getParam("end_container_on_empty_block",!1)},Cf=function(e){return Mn.explode(e.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large"))},wf=function(e){return Mn.explode(e.getParam("font_size_classes",""))},xf=function(e){return e.getParam("icons","","string")},zf=function(e){return e.getParam("icons_url","","string")},Ef=function(e){return e.getParam("images_dataimg_filter",$(!0),"function")},Nf=function(e){return e.getParam("automatic_uploads",!0,"boolean")},Sf=function(e){return e.getParam("images_reuse_filename",!1,"boolean")},kf=function(e){return e.getParam("images_replace_blob_uris",!0,"boolean")},Tf=function(e){return e.getParam("images_upload_url","","string")},Af=function(e){return e.getParam("images_upload_base_path","","string")},Mf=function(e){return e.getParam("images_upload_credentials",!1,"boolean")},Rf=function(e){return e.getParam("images_upload_handler",null,"function")},Df=function(e){return e.getParam("content_css_cors",!1,"boolean")},_f=function(e){return e.getParam("referrer_policy","","string")},Bf=function(e){return e.getParam("language","en","string")},Of=function(e){return e.getParam("language_url","","string")},Hf=function(e){return e.getParam("indent_use_margin",!1)},Pf=function(e){return e.getParam("indentation","40px","string")},Lf=function(e){var t=e.settings.content_css;return K(t)?X(t.split(","),te):A(t)?t:!1===t||e.inline?[]:["default"]},Vf=function(e){return e.getParam("directionality",ra.isRtl()?"rtl":undefined)},If=function(e){return e.getParam("inline_boundaries_selector","a[href],code,.mce-annotation","string")},Ff=Mn.makeMap,Uf=function(e,t){t(e),e.firstChild&&Uf(e.firstChild,t),e.next&&Uf(e.next,t)},jf=function(a){if(!A(a))throw new Error("cases must be an array");if(0===a.length)throw new Error("there must be at least one case");var u=[],n={};return z(a,function(e,r){var t=Et(e);if(1!==t.length)throw new Error("one and only one name per case");var o=t[0],i=e[o];if(n[o]!==undefined)throw new Error("duplicate key detected:"+o);if("cata"===o)throw new Error("cannot have a case named cata (sorry)");if(!A(i))throw new Error("case arguments must be an array");u.push(o),n[o]=function(){var e=arguments.length;if(e!==i.length)throw new Error("Wrong number of arguments to case "+o+". Expected "+i.length+" ("+i+"), got "+e);for(var n=new Array(e),t=0;t<n.length;t++)n[t]=arguments[t];return{fold:function(){if(arguments.length!==a.length)throw new Error("Wrong number of arguments to fold. Expected "+a.length+", got "+arguments.length);return arguments[r].apply(null,n)},match:function(e){var t=Et(e);if(u.length!==t.length)throw new Error("Wrong number of arguments to match. Expected: "+u.join(",")+"\nActual: "+t.join(","));if(!w(u,function(e){return h(t,e)}))throw new Error("Not all branches were specified when using match. Specified: "+t.join(", ")+"\nRequired: "+u.join(", "));return e[o].apply(null,n)},log:function(e){j.console.log(e,{constructors:u,constructor:o,params:n})}}}}),n},qf={create:be("start","soffset","finish","foffset")},$f=jf([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Wf=($f.before,$f.on,$f.after,function(e){return e.fold(W,W,W)}),Kf=jf([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Xf={domRange:Kf.domRange,relative:Kf.relative,exact:Kf.exact,exactFromRange:function(e){return Kf.exact(e.start(),e.soffset(),e.finish(),e.foffset())},getWin:function(e){var t=function(e){return e.match({domRange:function(e){return yt.fromDom(e.startContainer)},relative:function(e,t){return Wf(e)},exact:function(e,t,n,r){return e}})}(e);return Ne(t)},range:qf.create},Yf=oe().browser,Gf=function(e){var t=El(e)?kl(yt.fromDom(e.getBody())):k.none();e.bookmark=t.isSome()?t:e.bookmark},Jf=function(t){Ml(t).each(function(e){t.selection.setRng(e)})},Qf=Ml,Zf={isEditorUIElement:function(e){var t=e.className.toString();return-1!==t.indexOf("tox-")||-1!==t.indexOf("mce-")}},ed=function(e){var t=aa(function(){Gf(e)},0);e.on("init",function(){e.inline&&function(e,t){function n(){t.throttle()}Xi.DOM.bind(j.document,"mouseup",n),e.on("remove",function(){Xi.DOM.unbind(j.document,"mouseup",n)})}(e,t),Rl(e,t)}),e.on("remove",function(){t.cancel()})},td=Xi.DOM,nd=function(e){e.on("AddEditor",d(Bl,e)),e.on("RemoveEditor",d(Ol,e))},rd=function(e){var t=e.classList;return t!==undefined&&(t.contains("tox-edit-area")||t.contains("tox-edit-area__iframe")||t.contains("mce-content-body"))},od=_l,id=function(e){return e.editorManager.setActive(e)},ad=function(e,t){e.removed||(t?id(e):function(t){var e=t.selection,n=t.getBody(),r=e.getRng();t.quirks.refreshContentEditable(),t.bookmark!==undefined&&!1===Il(t)&&Qf(t).each(function(e){t.selection.setRng(e),r=e});var o=function(t,e){return t.dom.getParent(e,function(e){return"true"===t.dom.getContentEditable(e)})}(t,e.getNode());if(t.$.contains(n,o))return Ll(o),Pl(t,r),id(t);t.inline||(Nn.opera||Ll(n),t.getWin().focus()),(Nn.gecko||t.inline)&&(Ll(n),Pl(t,r)),id(t)}(e))},ud=Il,sd=function(e){return Il(e)||function(t){return bl().filter(function(e){return!rd(e.dom())&&od(t,e.dom())}).isSome()}(e)},cd=function(e,t){return e.fire("PreProcess",t)},ld=function(e,t){return e.fire("PostProcess",t)},fd=function(e){return e.fire("remove")},dd=function(e){return e.fire("detach")},hd=function(e,t){return e.fire("SwitchMode",{mode:t})},md=function(e,t,n,r){e.fire("ObjectResizeStart",{target:t,width:n,height:r})},gd=function(e,t,n,r){e.fire("ObjectResized",{target:t,width:n,height:r})},pd=Xi.DOM,vd=Object.prototype.hasOwnProperty,yd=Kl(function(e,t){return T(e)&&T(t)?yd(e,t):t}),bd=Kl(function(e,t){return t}),Cd=be("sections","settings"),wd=oe().deviceType,xd=wd.isTouch(),zd=wd.isPhone(),Ed=wd.isTablet(),Nd=["lists","autolink","autosave"],Sd={table_grid:!1,object_resizing:!1,resize:!1},kd=d(tf,"clientWidth"),Td=d(tf,"clientHeight"),Ad=d(nf,"margin-top"),Md=d(nf,"margin-left"),Rd=function(e,t,n){var r=yt.fromDom(e.getBody()),o=e.inline?r:function(e){return yt.fromDom(e.dom().ownerDocument.documentElement)}(r),i=function(e,t,n,r){var o=function(e){return e.dom().getBoundingClientRect()}(t);return{x:n-(e?o.left+t.dom().clientLeft+Md(t):0),y:r-(e?o.top+t.dom().clientTop+Ad(t):0)}}(e.inline,o,t,n);return function(e,t,n){var r=kd(e),o=Td(e);return 0<=t&&0<=n&&t<=r&&n<=o}(o,i.x,i.y)},Dd=function(e){return function(e){return k.from(e).map(yt.fromDom)}(e.inline?e.getBody():e.getContentAreaContainer()).map(function(e){return Bt(Ee(e),e)}).getOr(!1)};function _d(n){function r(){var e=n.theme;return e&&e.getNotificationManagerImpl?e.getNotificationManagerImpl():function t(){function e(){throw new Error("Theme did not provide a NotificationManager implementation.")}return{open:e,close:e,reposition:e,getArgs:e}}()}function o(){0<u.length&&r().reposition(u)}function i(t){p(u,function(e){return e===t}).each(function(e){u.splice(e,1)})}function t(t){if(!n.removed&&Dd(n))return g(u,function(e){return function(e,t){return!(e.type!==t.type||e.text!==t.text||e.progressBar||e.timeout||t.progressBar||t.timeout)}(r().getArgs(e),t)}).getOrThunk(function(){n.editorManager.setActive(n);var e=r().open(t,function(){i(e),o()});return function(e){u.push(e)}(e),o(),e})}var a,u=[];return(a=n).on("SkinLoaded",function(){var e=a.settings.service_message;e&&t({text:e,type:"warning",timeout:0})}),a.on("ResizeEditor ResizeWindow NodeChange",function(){pn.requestAnimationFrame(o)}),a.on("remove",function(){z(u.slice(),function(e){r().close(e)})}),{open:t,close:function(){k.from(u[0]).each(function(e){r().close(e),i(e),o()})},getNotifications:function(){return u}}}function Bd(n){function r(){var e=n.theme;return e&&e.getWindowManagerImpl?e.getWindowManagerImpl():function t(){function e(){throw new Error("Theme did not provide a WindowManager implementation.")}return{open:e,openUrl:e,alert:e,confirm:e,close:e,getParams:e,setParams:e}}()}function o(e,t){return function(){return t?t.apply(e,arguments):undefined}}function i(e){s.push(e),function(e){n.fire("OpenWindow",{dialog:e})}(e)}function a(t){!function(e){n.fire("CloseWindow",{dialog:e})}(t),0===(s=y(s,function(e){return e!==t})).length&&n.focus()}function u(e){n.editorManager.setActive(n),Gf(n);var t=e();return i(t),t}var s=[];return n.on("remove",function(){z(s,function(e){r().close(e)})}),{open:function(e,t){return u(function(){return r().open(e,t,a)})},openUrl:function(e){return u(function(){return r().openUrl(e,a)})},alert:function(e,t,n){r().alert(e,o(n||this,t))},confirm:function(e,t,n){r().confirm(e,o(n||this,t))},close:function(){k.from(s[s.length-1]).each(function(e){r().close(e),a(e)})}}}function Od(e,t){e.notificationManager.open({type:"error",text:t})}function Hd(e,t){e._skinLoaded?Od(e,t):e.on("SkinLoaded",function(){Od(e,t)})}function Pd(e){j.console.error(e)}function Ld(e,t,n){return n?"Failed to load "+e+": "+n+" from url "+t:"Failed to load "+e+" url: "+t}var Vd,Id=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=j.window.console;r&&(r.error?r.error.apply(r,arguments):r.log.apply(r,arguments))},Fd={pluginLoadError:function(e,t){Pd(Ld("plugin",e,t))},iconsLoadError:function(e,t){Pd(Ld("icons",e,t))},languageLoadError:function(e,t){Pd(Ld("language",e,t))},pluginInitError:function(e,t,n){var r=ra.translate(["Failed to initialize plugin: {0}",t]);Id(r,n),Hd(e,r)},uploadError:function(e,t){Hd(e,ra.translate(["Failed to upload image: {0}",t]))},displayError:Hd,initError:Id},Ud=(Vd={},{add:function(e,t){Vd[e]=t},get:function(e){return Vd[e]?Vd[e]:{icons:{}}},has:function(e){return kt(Vd,e)}}),jd=ga.PluginManager,qd=ga.ThemeManager;function $d(s,a){function n(e,t,n,r){var o,i;(o=new j.XMLHttpRequest).open("POST",a.url),o.withCredentials=a.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;o.status<200||300<=o.status?n("HTTP Error: "+o.status):(e=JSON.parse(o.responseText))&&"string"==typeof e.location?t(function(e,t){return e?e.replace(/\/$/,"")+"/"+t.replace(/^\//,""):t}(a.basePath,e.location)):n("Invalid JSON: "+o.responseText)},(i=new j.FormData).append("file",e.blob(),e.filename()),o.send(i)}function c(e,t){return{url:t,blobInfo:e,status:!0}}function l(e,t){return{url:"",blobInfo:e,status:!1,error:t}}function f(e,t){Mn.each(o[e],function(e){e(t)}),delete o[e]}function r(e,t){return e=Mn.grep(e,function(e){return!s.isUploaded(e.blobUri())}),Zt.all(Mn.map(e,function(e){return s.isPending(e.blobUri())?function(e){var t=e.blobUri();return new Zt(function(e){o[t]=o[t]||[],o[t].push(e)})}(e):function(i,a,u){return s.markPending(i.blobUri()),new Zt(function(t){function e(){}var n;try{var r=function(){n&&(n.close(),e)};a(i,function(e){r(),s.markUploaded(i.blobUri(),e),f(i.blobUri(),c(i,e)),t(c(i,e))},function(e){r(),s.removeFailed(i.blobUri()),f(i.blobUri(),l(i,e)),t(l(i,e))},function(e){e<0||100<e||(n=n||u()).progressBar.value(e)})}catch(o){t(l(i,o.message))}})}(e,a.handler,t)}))}var o={};return!1===D(a.handler)&&(a.handler=n),{upload:function(e,t){return!a.url&&function(e){return e===n}(a.handler)?new Zt(function(e){e([])}):r(e,t)}}}function Wd(e){var t,n,r=decodeURIComponent(e).split(",");return(n=/data:([^;]+)/.exec(r[0]))&&(t=n[1]),{type:t,data:r[1]}}function Kd(e){return(e||"blobid")+Jd++}var Xd=function(e){return 0===e.indexOf("blob:")?function(i){return new Zt(function(e,t){function n(){t("Cannot convert "+i+" to Blob. Resource might not exist or is inaccessible.")}try{var r=new j.XMLHttpRequest;r.open("GET",i,!0),r.responseType="blob",r.onload=function(){200===this.status?e(this.response):n()},r.onerror=n,r.send()}catch(o){n()}})}(e):0===e.indexOf("data:")?function(i){return new Zt(function(e){var t,n,r,o=Wd(i);try{t=j.atob(o.data)}catch(yN){return void e(new j.Blob([]))}for(n=new Uint8Array(t.length),r=0;r<n.length;r++)n[r]=t.charCodeAt(r);e(new j.Blob([n],{type:o.type}))})}(e):null},Yd=function(n){return new Zt(function(e){var t=new j.FileReader;t.onloadend=function(){e(t.result)},t.readAsDataURL(n)})},Gd=Wd,Jd=0;function Qd(o,i){var a={};return{findAll:function(e,n){var t;n=n||$(!0),t=y(function(e){return e?P(e.getElementsByTagName("img")):[]}(e),function(e){var t=e.src;return!!Nn.fileApi&&(!e.hasAttribute("data-mce-bogus")&&(!e.hasAttribute("data-mce-placeholder")&&(!(!t||t===Nn.transparentSrc)&&(0===t.indexOf("blob:")?!o.isUploaded(t)&&n(e):0===t.indexOf("data:")&&n(e)))))});var r=X(t,function(n){if(a[n.src])return new Zt(function(t){a[n.src].then(function(e){if("string"==typeof e)return e;t({image:n,blobInfo:e.blobInfo})})});var e=new Zt(function(e,t){!function(n,r,o,t){var i,a;0!==r.src.indexOf("blob:")?(i=Gd(r.src).data,(a=n.findFirst(function(e){return e.base64()===i}))?o({image:r,blobInfo:a}):Xd(r.src).then(function(e){a=n.create(Kd(),e,i),n.add(a),o({image:r,blobInfo:a})},function(e){t(e)})):(a=n.getByUri(r.src))?o({image:r,blobInfo:a}):Xd(r.src).then(function(t){Yd(t).then(function(e){i=Gd(e).data,a=n.create(Kd(),t,i),n.add(a),o({image:r,blobInfo:a})})},function(e){t(e)})}(i,n,e,t)}).then(function(e){return delete a[e.image.src],e})["catch"](function(e){return delete a[n.src],e});return a[n.src]=e});return Zt.all(r)}}}var Zd=0,eh=function(e){return e+Zd+++function(){function e(){return Math.round(4294967295*Math.random()).toString(36)}return"s"+(new Date).getTime().toString(36)+e()+e()+e()}()};function th(o){function t(t){return function(e){return o.selection?t(e):[]}}function r(e,t,n){for(var r=0;-1!==(r=e.indexOf(t,r))&&(e=e.substring(0,r)+n+e.substr(r+t.length),r+=n.length-t.length+1),-1!==r;);return e}function i(e,t,n){return e=r(e,'src="'+t+'"','src="'+n+'"'),e=r(e,'data-mce-src="'+t+'"','data-mce-src="'+n+'"')}function n(t,n){z(o.undoManager.data,function(e){"fragmented"===e.type?e.fragments=X(e.fragments,function(e){return i(e,t,n)}):e.content=i(e.content,t,n)})}function a(){return o.notificationManager.open({text:o.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})}function u(e,t){h.removeByUri(e.src),n(e.src,t),o.$(e).attr({src:Sf(o)?t+"?"+(new Date).getTime():t,"data-mce-src":o.convertURL(t,"src")})}function s(n){return f=f||$d(m,{url:Tf(o),basePath:Af(o),credentials:Mf(o),handler:Rf(o)}),p().then(t(function(r){var e;return e=X(r,function(e){return e.blobInfo}),f.upload(e,a).then(t(function(e){var t=X(e,function(e,t){var n=r[t].image;return e.status&&kf(o)?u(n,e.url):e.error&&Fd.uploadError(o,e.error),{element:n,status:e.status}});return n&&n(t),t}))}))}function e(e){if(Nf(o))return s(e)}function c(t){return!1!==w(g,function(e){return e(t)})&&(0!==t.getAttribute("src").indexOf("data:")||Ef(o)(t))}function l(e){return e.replace(/src="(blob:[^"]+)"/g,function(e,n){var t=m.getResultUri(n);if(t)return'src="'+t+'"';var r=h.getByUri(n);return(r=r||b(o.editorManager.get(),function(e,t){return e||t.editorUpload&&t.editorUpload.blobCache.getByUri(n)},null))?'src="data:'+r.blob().type+";base64,"+r.base64()+'"':e})}var f,d,h=function(){var n=[],o=function(e){var t,n;if(!e.blob||!e.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");return t=e.id||eh("blobid"),n=e.name||t,{id:$(t),name:$(n),filename:$(n+"."+function(e){return{"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png"}[e.toLowerCase()]||"dat"}(e.blob.type)),blob:$(e.blob),base64:$(e.base64),blobUri:$(e.blobUri||j.URL.createObjectURL(e.blob)),uri:$(e.uri)}},t=function(t){return e(function(e){return e.id()===t})},e=function(e){return y(n,e)[0]};return{create:function(e,t,n,r){if(K(e))return o({id:e,name:r,blob:t,base64:n});if(T(e))return o(e);throw new Error("Unknown input type")},add:function(e){t(e.id())||n.push(e)},get:t,getByUri:function(t){return e(function(e){return e.blobUri()===t})},findFirst:e,removeByUri:function(t){n=y(n,function(e){return e.blobUri()!==t||(j.URL.revokeObjectURL(e.blobUri()),!1)})},destroy:function(){z(n,function(e){j.URL.revokeObjectURL(e.blobUri())}),n=[]}}}(),m=function v(){function n(e,t){return{status:e,resultUri:t}}function t(e){return e in r}var r={};return{hasBlobUri:t,getResultUri:function(e){var t=r[e];return t?t.resultUri:null},isPending:function(e){return!!t(e)&&1===r[e].status},isUploaded:function(e){return!!t(e)&&2===r[e].status},markPending:function(e){r[e]=n(1,null)},markUploaded:function(e,t){r[e]=n(2,t)},removeFailed:function(e){delete r[e]},destroy:function(){r={}}}}(),g=[],p=function(){return(d=d||Qd(m,h)).findAll(o.getBody(),c).then(t(function(e){return e=y(e,function(e){return"string"!=typeof e||(Fd.displayError(o,e),!1)}),z(e,function(e){n(e.image.src,e.blobInfo.blobUri()),e.image.src=e.blobInfo.blobUri(),e.image.removeAttribute("data-mce-src")}),e}))};return o.on("SetContent",function(){Nf(o)?e():p()}),o.on("RawSaveContent",function(e){e.content=l(e.content)}),o.on("GetContent",function(e){e.source_view||"raw"===e.format||(e.content=l(e.content))}),o.on("PostRender",function(){o.parser.addNodeFilter("img",function(e){z(e,function(e){var t=e.attr("src");if(!h.getByUri(t)){var n=m.getResultUri(t);n&&e.attr("src",n)}})})}),{blobCache:h,addFilter:function(e){g.push(e)},uploadImages:s,uploadImagesAuto:e,scanForImages:p,destroy:function(){h.destroy(),m.destroy(),d=f=null}}}function nh(e,t,n){return Bt(t,e)?function(e){return e.slice(0,-1)}(function(e,t){for(var n=D(t)?t:c,r=e.dom(),o=[];null!==r.parentNode&&r.parentNode!==undefined;){var i=r.parentNode,a=yt.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o}(e,function(e){return n(e)||ze(e,t)})):[]}function rh(e,t){return nh(e,t,$(!1))}function oh(e,t){return e.hasOwnProperty(t.nodeName)}function ih(e,t){if(Ge.isText(t)){if(0===t.nodeValue.length)return!0;if(/^\s+$/.test(t.nodeValue)&&(!t.nextSibling||oh(e,t.nextSibling)))return!0}return!1}function ah(e){var t,n,r,o,i,a,u,s,c,l,f=e.dom,d=e.selection,h=e.schema,m=h.getBlockElements(),g=d.getStart(),p=e.getBody(),v=mf(e);if(g&&Ge.isElement(g)&&v&&(l=p.nodeName.toLowerCase(),h.isValidChild(l,v.toLowerCase())&&!function(t,e,n){return C(lh(yt.fromDom(n),yt.fromDom(e)),function(e){return oh(t,e.dom())})}(m,p,g))){for(n=(t=d.getRng()).startContainer,r=t.startOffset,o=t.endContainer,i=t.endOffset,c=ud(e),g=p.firstChild;g;)if(y=m,b=g,Ge.isText(b)||Ge.isElement(b)&&!oh(y,b)&&!Fc(b)){if(ih(m,g)){g=(u=g).nextSibling,f.remove(u);continue}a||(a=f.create(v,gf(e)),g.parentNode.insertBefore(a,g),s=!0),g=(u=g).nextSibling,a.appendChild(u)}else a=null,g=g.nextSibling;var y,b;s&&c&&(t.setStart(n,r),t.setEnd(o,i),d.setRng(t),e.nodeChanged())}}function uh(o,e){return Ya(function(e){var t=e.startContainer,n=e.startOffset;return Ge.isText(t)?0===n?k.some(yt.fromDom(t)):k.none():k.from(t.childNodes[n]).map(yt.fromDom)}(e),function(e){var t=e.endContainer,n=e.endOffset;return Ge.isText(t)?n===t.data.length?k.some(yt.fromDom(t)):k.none():k.from(t.childNodes[n-1]).map(yt.fromDom)}(e),function(e,t){var n=g(mh(o),d(ze,e)),r=g(gh(o),d(ze,t));return n.isSome()&&r.isSome()}).getOr(!1)}function sh(e,t,n,r){var o=n,i=new yi(n,o),a=e.schema.getNonEmptyElements();do{if(3===n.nodeType&&0!==Mn.trim(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))}while(n=r?i.next():i.prev());"BODY"===o.nodeName&&(r?t.setStart(o,0):t.setEnd(o,o.childNodes.length))}function ch(e){var t=e.selection.getSel();return t&&0<t.rangeCount}var lh=rh,fh=function(e,t){return[e].concat(rh(e,t))},dh=function(e){mf(e)&&e.on("NodeChange",d(ah,e))},hh=function(e,t){return e&&t&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset},mh=function(t){return _e(t).fold($([t]),function(e){return[t].concat(mh(e))})},gh=function(t){return Be(t).fold($([t]),function(e){return"br"===ie(e)?ke(e).map(function(e){return[t].concat(gh(e))}).getOr([]):[t].concat(gh(e))})},ph=(vh.prototype.nodeChanged=function(e){var t,n,r,o=this.editor.selection;this.editor.initialized&&o&&!this.editor.settings.disable_nodechange&&!this.editor.readonly&&(r=this.editor.getBody(),(t=o.getStart(!0)||r).ownerDocument===this.editor.getDoc()&&this.editor.dom.isChildOf(t,r)||(t=r),n=[],this.editor.dom.getParent(t,function(e){if(e===r)return!0;n.push(e)}),(e=e||{}).element=t,e.parents=n,this.editor.fire("NodeChange",e))},vh.prototype.isSameElementPath=function(e){var t,n;if((n=this.editor.$(e).parentsUntil(this.editor.getBody()).add(e)).length===this.lastPath.length){for(t=n.length;0<=t&&n[t]===this.lastPath[t];t--);if(-1===t)return this.lastPath=n,!0}return this.lastPath=n,!1},vh);function vh(r){var o;this.lastPath=[],this.editor=r;var t=this;"onselectionchange"in r.getDoc()||r.on("NodeChange click mouseup keyup focus",function(e){var t,n;n={startContainer:(t=r.selection.getRng()).startContainer,startOffset:t.startOffset,endContainer:t.endContainer,endOffset:t.endOffset},"nodechange"!==e.type&&hh(n,o)||r.fire("SelectionChange"),o=n}),r.on("contextmenu",function(){r.fire("SelectionChange")}),r.on("SelectionChange",function(){var e=r.selection.getStart(!0);!e||!Nn.range&&r.selection.isCollapsed()||ch(r)&&!t.isSameElementPath(e)&&r.dom.isChildOf(e,r.getBody())&&r.nodeChanged({selectionChange:!0})}),r.on("mouseup",function(e){!e.isDefaultPrevented()&&ch(r)&&("IMG"===r.selection.getNode().nodeName?pn.setEditorTimeout(r,function(){r.nodeChanged()}):r.nodeChanged())})}function yh(e){return/^[\r\n\t ]$/.test(e)}function bh(e){return!yh(e)&&!Mh(e)}function Ch(n,r,o){return k.from(o.container()).filter(Ge.isText).exists(function(e){var t=n?0:-1;return r(e.data.charAt(o.offset()+t))})}function wh(e){var t=e.container();return Ge.isText(t)&&0===t.data.length}function xh(t,n){return function(e){return k.from(ws(t?0:-1,e)).filter(n).isSome()}}function zh(e){return"IMG"===e.nodeName&&"block"===ve(yt.fromDom(e),"display")}function Eh(e){return Ge.isContentEditableFalse(e)&&!Ge.isBogusAll(e)}function Nh(e){return b(e,function(e,t){return e.concat(function(t){function e(e){return X(e,function(e){return(e=Ia(e)).node=t,e})}if(Ge.isElement(t))return e(t.getClientRects());if(Ge.isText(t)){var n=t.ownerDocument.createRange();return n.setStart(t,0),n.setEnd(t,t.data.length),e(n.getClientRects())}}(t))},[])}var Sh,kh,Th,Ah={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,END:35,HOME:36,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey||this.metaKeyPressed(e)},metaKeyPressed:function(e){return Nn.mac?e.metaKey:e.ctrlKey&&!e.altKey}},Mh=(Sh="\xa0",function(e){return Sh===e}),Rh=d(Ch,!0,yh),Dh=d(Ch,!1,yh),_h=xh(!0,zh),Bh=xh(!1,zh),Oh=xh(!0,Ge.isTable),Hh=xh(!1,Ge.isTable),Ph=xh(!0,Eh),Lh=xh(!1,Eh);(Th=kh=kh||{})[Th.Up=-1]="Up",Th[Th.Down=1]="Down";function Vh(o,i,a,e,u,t){function n(e){var t,n,r;for(r=Nh([e]),-1===o&&(r=r.reverse()),t=0;t<r.length;t++)if(n=r[t],!a(n,s)){if(0<l.length&&i(n,kn.last(l))&&c++,n.line=c,u(n))return!0;l.push(n)}}var r,s,c=0,l=[];return(s=kn.last(t.getClientRects()))&&(n(r=t.getNode()),function(e,t,n,r){for(;r=ys(r,e,Va,t);)if(n(r))return}(o,e,n,r)),l}function Ih(t){return function(e){return function(e,t){return t.line>e}(t,e)}}function Fh(t){return function(e){return function(e,t){return t.line===e}(t,e)}}function Uh(e,t){return Math.abs(e.left-t)}function jh(e,t){return Math.abs(e.right-t)}function qh(e,t){return e>=t.left&&e<=t.right}function $h(e,o){return kn.reduce(e,function(e,t){var n,r;return n=Math.min(Uh(e,o),jh(e,o)),r=Math.min(Uh(t,o),jh(t,o)),qh(o,t)?t:qh(o,e)?e:r===n&&Ym(t.node)?t:r<n?t:e})}function Wh(e,t,n,r){for(;r=Gm(r,e,Va,t);)if(n(r))return}function Kh(e,t,n){var r,o=Nh(function(e){return y(P(e.getElementsByTagName("*")),ms)}(e)),i=y(o,function(e){return n>=e.top&&n<=e.bottom});return(r=(r=$h(i,t))&&$h(function(e,r){function t(t,e){var n;return n=y(Nh([e]),function(e){return!t(e,r)}),o=o.concat(n),0===n.length}var o=[];return o.push(r),Wh(kh.Up,e,d(t,ja),r.node),Wh(kh.Down,e,d(t,qa),r.node),o}(e,r),t))&&ms(r.node)?function(e,t){return{node:e.node,before:Uh(e,t)<jh(e,t)}}(r,t):null}function Xh(e){var t,n,r,o;return o=e.getBoundingClientRect(),n=(t=e.ownerDocument).documentElement,r=t.defaultView,{top:o.top+r.pageYOffset-n.clientTop,left:o.left+r.pageXOffset-n.clientLeft}}function Yh(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Gh(i,a){return function(e){if(function(e){return 0===e.button}(e)){var t=g(a.dom.getParents(e.target),Tu(Zm,eg)).getOr(null);if(function(e,t){return Zm(t)&&t!==e}(a.getBody(),t)){var n=a.dom.getPos(t),r=a.getBody(),o=a.getDoc().documentElement;i.element=t,i.screenX=e.screenX,i.screenY=e.screenY,i.maxX=(a.inline?r.scrollWidth:o.offsetWidth)-2,i.maxY=(a.inline?r.scrollHeight:o.offsetHeight)-2,i.relX=e.pageX-n.x,i.relY=e.pageY-n.y,i.width=t.offsetWidth,i.height=t.offsetHeight,i.ghost=function(e,t,n,r){var o=t.cloneNode(!0);e.dom.setStyles(o,{width:n,height:r}),e.dom.setAttrib(o,"data-mce-selected",null);var i=e.dom.create("div",{"class":"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return e.dom.setStyles(i,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:r}),e.dom.setStyles(o,{margin:0,boxSizing:"border-box"}),i.appendChild(o),i}(a,t,i.width,i.height)}}}}function Jh(r,o){return function(e){if(r.dragging&&function(e,t,n){return t!==n&&!e.dom.isChildOf(t,n)&&!Zm(t)}(o,function(e){var t=e.getSel().getRangeAt(0).startContainer;return 3===t.nodeType?t.parentNode:t}(o.selection),r.element)){var t=function(e){var t=e.cloneNode(!0);return t.removeAttribute("data-mce-selected"),t}(r.element),n=o.fire("drop",{targetClone:t,clientX:e.clientX,clientY:e.clientY});n.isDefaultPrevented()||(t=n.targetClone,o.undoManager.transact(function(){Yh(r.element),o.insertContent(o.dom.getOuterHTML(t)),o._selectionOverrides.hideFakeCaret()}))}tg(r)}}function Qh(e){var t,n,r,o,i,a,u={};t=Xi.DOM,a=j.document,n=Gh(u,e),r=function(r,o){var i=pn.throttle(function(e,t){o._selectionOverrides.hideFakeCaret(),o.selection.placeCaretAt(e,t)},0);return function(e){var t=Math.max(Math.abs(e.screenX-r.screenX),Math.abs(e.screenY-r.screenY));if(function(e){return e.element}(r)&&!r.dragging&&10<t){if(o.fire("dragstart",{target:r.element}).isDefaultPrevented())return;r.dragging=!0,o.focus()}if(r.dragging){var n=function(e,t){return{pageX:t.pageX-e.relX,pageY:t.pageY+5}}(r,Qm(o,e));!function(e,t){e.parentNode!==t&&t.appendChild(e)}(r.ghost,o.getBody()),function(e,t,n,r,o,i){var a=0,u=0;e.style.left=t.pageX+"px",e.style.top=t.pageY+"px",t.pageX+n>o&&(a=t.pageX+n-o),t.pageY+r>i&&(u=t.pageY+r-i),e.style.width=n-a+"px",e.style.height=r-u+"px"}(r.ghost,n,r.width,r.height,r.maxX,r.maxY),i(e.clientX,e.clientY)}}}(u,e),o=Jh(u,e),i=function(e,t){return function(){e.dragging&&t.fire("dragend"),tg(e)}}(u,e),e.on("mousedown",n),e.on("mousemove",r),e.on("mouseup",o),t.bind(a,"mousemove",r),t.bind(a,"mouseup",i),e.on("remove",function(){t.unbind(a,"mousemove",r),t.unbind(a,"mouseup",i)})}function Zh(e,t,n,r,o){return t._selectionOverrides.showCaret(e,n,r,o)}function em(e,t){return e.fire("BeforeObjectSelected",{target:t}).isDefaultPrevented()?null:function(e){var t=e.ownerDocument.createRange();return t.selectNode(e),t}(t)}function tm(e,t,n){var r=Es(1,e.getBody(),t),o=Ds.fromRangeStart(r),i=o.getNode();if(og(i))return Zh(1,e,i,!o.isAtEnd(),!1);var a=o.getNode(!0);if(og(a))return Zh(1,e,a,!1,!1);var u=e.dom.getParent(o.getNode(),function(e){return og(e)||rg(e)});return og(u)?Zh(1,e,u,!1,n):null}function nm(e,t,n){if(!t||!t.collapsed)return t;var r=tm(e,t,n);return r||t}function rm(e,t){for(var n=e.getBody();t&&t!==n;){if(ag(t)||ug(t))return t;t=t.parentNode}return null}function om(g){function a(e){e&&g.selection.setRng(e)}function o(){return g.selection.getRng()}function p(e,t,n,r){return void 0===r&&(r=!0),g.fire("ShowCaret",{target:t,direction:e,before:n}).isDefaultPrevented()?null:(r&&g.selection.scrollIntoView(t,-1===e),u.show(n,t))}function t(e){return Da(e)||hu(e)||mu(e)}var v,y=g.getBody(),u=ds(g.getBody(),function(e){return g.dom.isBlock(e)},function(){return ud(g)}),b="sel-"+g.dom.uniqueId(),C=function(e){return t(e.startContainer)||t(e.endContainer)},s=function(e){var t=g.schema.getShortEndedElements(),n=g.dom.createRng(),r=e.startContainer,o=e.startOffset,i=e.endContainer,a=e.endOffset;return kt(t,r.nodeName.toLowerCase())?0===o?n.setStartBefore(r):n.setStartAfter(r):n.setStart(r,o),kt(t,i.nodeName.toLowerCase())?0===a?n.setEndBefore(i):n.setEndAfter(i):n.setEnd(i,a),n},c=function(e,t){var n,r,o,i,a,u,s,c,l,f,d=g.$,h=g.dom;if(!e)return null;if(e.collapsed){if(!C(e))if(!1===t){if(c=Ss(-1,y,e),ms(c.getNode(!0)))return p(-1,c.getNode(!0),!1,!1);if(ms(c.getNode()))return p(-1,c.getNode(),!c.isAtEnd(),!1)}else{if(c=Ss(1,y,e),ms(c.getNode()))return p(1,c.getNode(),!c.isAtEnd(),!1);if(ms(c.getNode(!0)))return p(1,c.getNode(!0),!1,!1)}return null}if(i=e.startContainer,a=e.startOffset,u=e.endOffset,3===i.nodeType&&0===a&&ug(i.parentNode)&&(i=i.parentNode,a=h.nodeIndex(i),i=i.parentNode),1!==i.nodeType)return null;if(u===a+1&&i===e.endContainer&&(n=i.childNodes[a]),!ug(n))return null;if(l=f=n.cloneNode(!0),(s=g.fire("ObjectSelected",{target:n,targetClone:l})).isDefaultPrevented())return null;r=wa(yt.fromDom(g.getBody()),"#"+b).fold(function(){return d([])},function(e){return d([e.dom()])}),l=s.targetClone,0===r.length&&(r=d('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id",b)).appendTo(g.getBody()),e=g.dom.createRng(),l===f&&Nn.ie?(r.empty().append('<p style="font-size: 0" data-mce-bogus="all">\xa0</p>').append(l),e.setStartAfter(r[0].firstChild.firstChild),e.setEndAfter(l)):(r.empty().append("\xa0").append(l).append("\xa0"),e.setStart(r[0].firstChild,1),e.setEnd(r[0].lastChild,0)),r.css({top:h.getPos(n,g.getBody()).y}),r[0].focus(),(o=g.selection.getSel()).removeAllRanges(),o.addRange(e);var m=yt.fromDom(n);return z(ma(yt.fromDom(g.getBody()),"*[data-mce-selected]"),function(e){ze(m,e)||pe(e,"data-mce-selected")}),g.dom.getAttrib(n,"data-mce-selected")||n.setAttribute("data-mce-selected","1"),v=n,w(),e},l=function(){v&&(v.removeAttribute("data-mce-selected"),wa(yt.fromDom(g.getBody()),"#"+b).each(_i),v=null),wa(yt.fromDom(g.getBody()),"#"+b).each(_i),v=null},w=function(){u.hide()};return Nn.ceFalse&&function(){g.on("mouseup",function(e){var t=o();t.collapsed&&Rd(g,e.clientX,e.clientY)&&a(tm(g,t,!1))}),g.on("click",function(e){var t;(t=rm(g,e.target))&&(ug(t)&&(e.preventDefault(),g.focus()),ag(t)&&g.dom.isChildOf(t,g.selection.getNode())&&l())}),g.on("blur NewBlock",function(){l()}),g.on("ResizeWindow FullscreenStateChanged",function(){return u.reposition()});function i(e,t){var n=g.dom.getParent(e,g.dom.isBlock),r=g.dom.getParent(t,g.dom.isBlock);return!(!n||!g.dom.isChildOf(n,r)||!1!==ug(rm(g,n)))||n&&!function(e,t){return g.dom.getParent(e,g.dom.isBlock)===g.dom.getParent(t,g.dom.isBlock)}(n,r)&&function(e){var t=rc(e);if(!e.firstChild)return!1;var n=Ds.before(e.firstChild),r=t.next(n);return r&&!Ph(r)&&!Lh(r)}(n)}var n,r;r=!1,(n=g).on("touchstart",function(){r=!1}),n.on("touchmove",function(){r=!0}),n.on("touchend",function(e){if(!r){var t=rm(n,e.target);ug(t)&&(e.preventDefault(),c(em(n,t)))}},!0),g.on("mousedown",function(e){var t,n=e.target;if((n===y||"HTML"===n.nodeName||g.dom.isChildOf(n,y))&&!1!==Rd(g,e.clientX,e.clientY))if(t=rm(g,n))ug(t)?(e.preventDefault(),c(em(g,t))):(l(),ag(t)&&e.shiftKey||Jm(e.clientX,e.clientY,g.selection.getRng())||(w(),g.selection.placeCaretAt(e.clientX,e.clientY)));else if(!1===ms(n)){l(),w();var r=Kh(y,e.clientX,e.clientY);if(r&&!i(e.target,r.node)){e.preventDefault();var o=p(1,r.node,r.before,!1);g.getBody().focus(),a(o)}}}),g.on("keypress",function(e){Ah.modifierPressed(e)||(e.keyCode,ug(g.selection.getNode())&&e.preventDefault())}),g.on("GetSelectionRange",function(e){var t=e.range;if(v){if(!v.parentNode)return void(v=null);(t=t.cloneRange()).selectNode(v),e.range=t}}),g.on("SetSelectionRange",function(e){e.range=s(e.range);var t=c(e.range,e.forward);t&&(e.range=t)});g.on("AfterSetSelectionRange",function(e){var t=e.range;C(t)||function(e){return"mcepastebin"===e.id}(t.startContainer.parentNode)||w(),function(e){return g.dom.hasClass(e,"mce-offscreen-selection")}(t.startContainer.parentNode)||l()}),g.on("copy",function(e){var t=e.clipboardData;if(!e.isDefaultPrevented()&&e.clipboardData&&!Nn.ie){var n=function(){var e=g.dom.get(b);return e?e.getElementsByTagName("*")[0]:e}();n&&(e.preventDefault(),t.clearData(),t.setData("text/html",n.outerHTML),t.setData("text/plain",n.outerText))}}),ng(g),ig(g)}(),{showCaret:p,showBlockCaretContainer:function(e){e.hasAttribute("data-mce-caret")&&(Pa(e),a(o()),g.selection.scrollIntoView(e))},hideFakeCaret:w,destroy:function(){u.destroy(),v=null}}}function im(e){return Ge.isElement(e)?e.outerHTML:Ge.isText(e)?ir.encodeRaw(e.data,!1):Ge.isComment(e)?"\x3c!--"+e.data+"--\x3e":""}function am(e,t,n){var r=function(e){var t,n,r;for(r=j.document.createElement("div"),t=j.document.createDocumentFragment(),e&&(r.innerHTML=e);n=r.firstChild;)t.appendChild(n);return t}(t);if(e.hasChildNodes()&&n<e.childNodes.length){var o=e.childNodes[n];o.parentNode.insertBefore(r,o)}else e.appendChild(r)}function um(e){return{type:"fragmented",fragments:e,content:"",bookmark:null,beforeBookmark:null}}function sm(e){return{type:"complete",fragments:null,content:e,bookmark:null,beforeBookmark:null}}function cm(e){return"fragmented"===e.type?e.fragments.join(""):e.content}function lm(e){var t=yt.fromTag("body",mg.get().getOrThunk(function(){var e=j.document.implementation.createHTMLDocument("undo");return mg.set(k.some(e)),e}));return Aa(t,cm(e)),z(ma(t,"*[data-mce-bogus]"),Ni),function(e){return e.dom().innerHTML}(t)}function fm(e){return 0===e.get()}function dm(e,t,n){fm(n)&&(e.typing=t)}function hm(e,t){e.typing&&(dm(e,!1,t),e.add())}function mm(n){var r=Je(k.none()),o=Je(0),i=Je(0),a={data:[],typing:!1,beforeChange:function(){!function(e,t,n){fm(t)&&n.set(k.some(Vs.getUndoBookmark(e.selection)))}(n,o,r)},add:function(e,t){return function(e,t,n,r,o,i,a){var u=e.settings,s=gg(e);if(i=i||{},i=Mn.extend(i,s),!1===fm(r)||e.removed)return null;var c=t.data[n.get()];if(e.fire("BeforeAddUndo",{level:i,lastLevel:c,originalEvent:a}).isDefaultPrevented())return null;if(c&&vg(c,i))return null;if(t.data[n.get()]&&o.get().each(function(e){t.data[n.get()].beforeBookmark=e}),u.custom_undo_redo_levels&&t.data.length>u.custom_undo_redo_levels){for(var l=0;l<t.data.length-1;l++)t.data[l]=t.data[l+1];t.data.length--,n.set(t.data.length)}i.bookmark=Vs.getUndoBookmark(e.selection),n.get()<t.data.length-1&&(t.data.length=n.get()+1),t.data.push(i),n.set(t.data.length-1);var f={level:i,lastLevel:c,originalEvent:a};return e.fire("AddUndo",f),0<n.get()&&(e.setDirty(!0),e.fire("change",f)),i}(n,a,i,o,r,e,t)},undo:function(){return function(e,t,n,r){var o;return t.typing&&(t.add(),t.typing=!1,dm(t,!1,n)),0<r.get()&&(r.set(r.get()-1),o=t.data[r.get()],pg(e,o,!0),e.setDirty(!0),e.fire("Undo",{level:o})),o}(n,a,o,i)},redo:function(){return function(e,t,n){var r;return t.get()<n.length-1&&(t.set(t.get()+1),r=n[t.get()],pg(e,r,!1),e.setDirty(!0),e.fire("Redo",{level:r})),r}(n,i,a.data)},clear:function(){!function(e,t,n){t.data=[],n.set(0),t.typing=!1,e.fire("ClearUndos")}(n,a,i)},reset:function(){!function(e){e.clear(),e.add()}(a)},hasUndo:function(){return function(e,t,n){return 0<n.get()||t.typing&&t.data[0]&&!vg(gg(e),t.data[0])}(n,a,i)},hasRedo:function(){return function(e,t){return t.get()<e.data.length-1&&!e.typing}(a,i)},transact:function(e){return function(e,t,n){return hm(e,t),e.beforeChange(),e.ignore(n),e.add()}(a,o,e)},ignore:function(e){!function(e,t){try{e.set(e.get()+1),t()}finally{e.set(e.get()-1)}}(o,e)},extra:function(e,t){!function(e,t,n,r,o){if(t.transact(r)){var i=t.data[n.get()].bookmark,a=t.data[n.get()-1];pg(e,a,!0),t.transact(o)&&(t.data[n.get()-1].beforeBookmark=i)}}(n,a,i,e,t)}};return function(n,r,o){function i(e){dm(r,!1,o),r.add({},e)}var a=Je(!1);n.on("init",function(){r.add()}),n.on("BeforeExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&(hm(r,o),r.beforeChange())}),n.on("ExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&i(e)}),n.on("ObjectResizeStart cut",function(){r.beforeChange()}),n.on("SaveContent ObjectResized blur",i),n.on("dragend",i),n.on("keyup",function(e){var t=e.keyCode;e.isDefaultPrevented()||((33<=t&&t<=36||37<=t&&t<=40||45===t||e.ctrlKey)&&(i(),n.nodeChanged()),46!==t&&8!==t||n.nodeChanged(),a.get()&&r.typing&&!1===vg(gg(n),r.data[0])&&(!1===n.isDirty()&&(n.setDirty(!0),n.fire("change",{level:r.data[0],lastLevel:null})),n.fire("TypingUndo"),a.set(!1),n.nodeChanged()))}),n.on("keydown",function(e){var t=e.keyCode;if(!e.isDefaultPrevented())if(33<=t&&t<=36||37<=t&&t<=40||45===t)r.typing&&i(e);else{var n=e.ctrlKey&&!e.altKey||e.metaKey;!(t<16||20<t)||224===t||91===t||r.typing||n||(r.beforeChange(),dm(r,!0,o),r.add({},e),a.set(!0))}}),n.on("mousedown",function(e){r.typing&&i(e)});n.on("input",function(e){e.inputType&&(function(e){return"insertReplacementText"===e.inputType}(e)||function(e){return"insertText"===e.inputType&&null===e.data}(e))&&i(e)}),n.on("AddUndo Undo Redo ClearUndos",function(e){e.isDefaultPrevented()||n.nodeChanged()})}(n,a,o),function(e){e.addShortcut("meta+z","","Undo"),e.addShortcut("meta+y,meta+shift+z","","Redo")}(n),a}function gm(e,t,n){var r=e.formatter.get(n);if(r)for(var o=0;o<r.length;o++)if(!1===r[o].inherit&&e.dom.is(t,r[o].selector))return!0;return!1}function pm(t,e,n,r){var o=t.dom.getRoot();return e!==o&&(e=t.dom.getParent(e,function(e){return!!gm(t,e,n)||(e.parentNode===o||!!xg(t,e,n,r,!0))}),xg(t,e,n,r))}function vm(e,t,n){return!!wg(t,n.inline)||(!!wg(t,n.block)||(n.selector?1===t.nodeType&&e.is(t,n.selector):void 0))}function ym(e,t,n,r,o,i){var a,u,s,c=n[r];if(n.onmatch)return n.onmatch(t,n,r);if(c)if("undefined"==typeof c.length){for(a in c)if(c.hasOwnProperty(a)){if(u="attributes"===r?e.getAttrib(t,a):jc.getStyle(e,t,a),o&&!u&&!n.exact)return;if((!o||n.exact)&&!wg(u,jc.normalizeStyleValue(e,jc.replaceVars(c[a],i),a)))return}}else for(s=0;s<c.length;s++)if("attributes"===r?e.getAttrib(t,c[s]):jc.getStyle(e,t,c[s]))return n;return n}function bm(e,t){return e.splitText(t)}function Cm(e){var t=e.startContainer,n=e.startOffset,r=e.endContainer,o=e.endOffset;return t===r&&Ge.isText(t)?0<n&&n<t.nodeValue.length&&(t=(r=bm(t,n)).previousSibling,n<o?(t=r=bm(r,o-=n).previousSibling,o=r.nodeValue.length,n=0):o=0):(Ge.isText(t)&&0<n&&n<t.nodeValue.length&&(t=bm(t,n),n=0),Ge.isText(r)&&0<o&&o<r.nodeValue.length&&(o=(r=bm(r,o).previousSibling).nodeValue.length)),{startContainer:t,startOffset:n,endContainer:r,endOffset:o}}function wm(e,t,n){if(0!==n){var r=e.data.slice(t,t+n),o=t+n>=e.data.length,i=0===t;e.replaceData(t,n,function(n,r,o){return b(n,function(e,t){return function(e){return-1!==" \f\n\r\t\x0B".indexOf(e)}(t)||"\xa0"===t?e.previousCharIsSpace||""===e.str&&r||e.str.length===n.length-1&&o?{previousCharIsSpace:!1,str:e.str+"\xa0"}:{previousCharIsSpace:!0,str:e.str+" "}:{previousCharIsSpace:!1,str:e.str+t}},{previousCharIsSpace:!1,str:""}).str}(r,i,o))}}function xm(e,t){var n=e.data.slice(t),r=n.length-function(e){return e.replace(/^\s+/g,"")}(n).length;return wm(e,t,r)}function zm(e,t){var n=yt.fromDom(e);return function(e,t,n){return Ca(e,t,n).isSome()}(yt.fromDom(t),"pre,code",d(ze,n))}function Em(e,t){return La(t)&&!1===function(e,t){return Ge.isText(t)&&/^[ \t\r\n]*$/.test(t.data)&&!1===zm(e,t)}(e,t)||function(e){return Ge.isElement(e)&&"A"===e.nodeName&&e.hasAttribute("name")}(t)||Eg(t)}function Nm(e,t){return function(e,t){var n=e.container(),r=e.offset();return!1===Ds.isTextPosition(e)&&n===t.parentNode&&r>Ds.before(t).offset()}(t,e)?Ds(t.container(),t.offset()-1):t}function Sm(e){return La(e.previousSibling)?k.some(function(e){return Ge.isText(e)?Ds(e,e.data.length):Ds.after(e)}(e.previousSibling)):e.previousSibling?Pc.lastPositionIn(e.previousSibling):k.none()}function km(e){return La(e.nextSibling)?k.some(function(e){return Ge.isText(e)?Ds(e,0):Ds.before(e)}(e.nextSibling)):e.nextSibling?Pc.firstPositionIn(e.nextSibling):k.none()}function Tm(e,t){return Sm(t).orThunk(function(){return km(t)}).orThunk(function(){return function(e,t){var n=Ds.before(t.previousSibling?t.previousSibling:t.parentNode);return Pc.prevPosition(e,n).fold(function(){return Pc.nextPosition(e,Ds.after(t))},k.some)}(e,t)})}function Am(e,t){return km(t).orThunk(function(){return Sm(t)}).orThunk(function(){return function(e,t){return Pc.nextPosition(e,Ds.after(t)).fold(function(){return Pc.prevPosition(e,Ds.before(t))},k.some)}(e,t)})}function Mm(e,t,n){return function(e,t,n){return e?Am(t,n):Tm(t,n)}(e,t,n).map(d(Nm,n))}function Rm(t,n,e){e.fold(function(){t.focus()},function(e){t.selection.setRng(e.toRange(),n)})}function Dm(e,t){return t&&e.schema.getBlockElements().hasOwnProperty(ie(t))}function _m(e){if(kg(e)){var t=yt.fromHtml('<br data-mce-bogus="1">');return Ei(e),Di(e,t),k.some(Ds.before(t.dom()))}return k.none()}function Bm(e,t,a){var n=ke(e).filter(zt),r=Te(e).filter(zt);return _i(e),function(e,t,n,r){return e.isSome()&&t.isSome()&&n.isSome()?k.some(r(e.getOrDie(),t.getOrDie(),n.getOrDie())):k.none()}(n,r,t,function(e,t,n){var r=e.dom(),o=t.dom(),i=r.data.length;return function(e,t,n){var r=ne(e.data).length;e.appendData(t.data),_i(yt.fromDom(t)),n&&xm(e,r)}(r,o,a),n.container()===o?Ds(r,i):n}).orThunk(function(){return a&&(n.each(function(e){return function(e,t){var n=e.data.slice(0,t),r=n.length-ne(n).length;return wm(e,t-r,r)}(e.dom(),e.dom().length)}),r.each(function(e){return xm(e.dom(),0)})),t})}function Om(e){return 0<function(e){for(var t=[];e;){if(3===e.nodeType&&e.nodeValue!==Ag||1<e.childNodes.length)return[];1===e.nodeType&&t.push(e),e=e.firstChild}return t}(e).length}function Hm(e){if(e){var t=new yi(e,e);for(e=t.current();e;e=t.next())if(3===e.nodeType)return e}return null}function Pm(e){var t=yt.fromTag("span");return me(t,{id:Mg,"data-mce-bogus":"1","data-mce-type":"format-caret"}),e&&Di(t,yt.fromText(Ag)),t}function Lm(e,t,n){void 0===n&&(n=!0);var r=e.dom,o=e.selection;if(Om(t))Tg(e,!1,yt.fromDom(t),n);else{var i=o.getRng(),a=r.getParent(t,r.isBlock),u=function(e){var t=Hm(e);return t&&t.nodeValue.charAt(0)===Ag&&t.deleteData(0,1),t}(t);i.startContainer===u&&0<i.startOffset&&i.setStart(u,i.startOffset-1),i.endContainer===u&&0<i.endOffset&&i.setEnd(u,i.endOffset-1),r.remove(t,!0),a&&r.isEmpty(a)&&bg(yt.fromDom(a)),o.setRng(i)}}function Vm(e,t,n){void 0===n&&(n=!0);var r=e.dom,o=e.selection;if(t)Lm(e,t,n);else if(!(t=os(e.getBody(),o.getStart())))for(;t=r.get(Mg);)Lm(e,t,!1)}function Im(e,t,n){var r=e.dom,o=r.getParent(n,d(jc.isTextBlock,e));o&&r.isEmpty(o)?n.parentNode.replaceChild(t,n):(yg(yt.fromDom(n)),r.isEmpty(n)?n.parentNode.replaceChild(t,n):r.insertAfter(t,n))}function Fm(e,t){return e.appendChild(t),t}function Um(e,t){var n=m(e,function(e,t){return Fm(e,t.cloneNode(!1))},t);return Fm(n,n.ownerDocument.createTextNode(Ag))}function jm(t){t.on("mouseup keydown",function(e){!function(e,t){var n=e.selection,r=e.getBody();Vm(e,null,!1),8!==t&&46!==t||!n.isCollapsed()||n.getStart().innerHTML!==Ag||Vm(e,os(r,n.getStart())),37!==t&&39!==t||Vm(e,os(r,n.getStart()))}(t,e.keyCode)})}function qm(e,t){return e.schema.getTextInlineElements().hasOwnProperty(ie(t))&&!rs(t.dom())&&!Ge.isBogus(t.dom())}var $m,Wm,Km=d(Vh,kh.Up,ja,qa),Xm=d(Vh,kh.Down,qa,ja),Ym=Ge.isContentEditableFalse,Gm=ys,Jm=function(t,n,e){if(e.collapsed)return!1;if(Nn.browser.isIE()&&e.startOffset===e.endOffset-1&&e.startContainer===e.endContainer){var r=e.startContainer.childNodes[e.startOffset];if(Ge.isElement(r))return C(r.getClientRects(),function(e){return $a(e,t,n)})}return C(e.getClientRects(),function(e){return $a(e,t,n)})},Qm=function(e,t){return function(e,t,n){return{pageX:n.left-e.left+t.left,pageY:n.top-e.top+t.top}}(function(e){return e.inline?Xh(e.getBody()):{left:0,top:0}}(e),function(e){var t=e.getBody();return e.inline?{left:t.scrollLeft,top:t.scrollTop}:{left:0,top:0}}(e),function(e,t){if(t.target.ownerDocument===e.getDoc())return{left:t.pageX,top:t.pageY};var n=Xh(e.getContentAreaContainer()),r=function(e){var t=e.getBody(),n=e.getDoc().documentElement,r={left:t.scrollLeft,top:t.scrollTop},o={left:t.scrollLeft||n.scrollLeft,top:t.scrollTop||n.scrollTop};return e.inline?r:o}(e);return{left:t.pageX-n.left+r.left,top:t.pageY-n.top+r.top}}(e,t))},Zm=Ge.isContentEditableFalse,eg=Ge.isContentEditableTrue,tg=function(e){e.dragging=!1,e.element=null,Yh(e.ghost)},ng=function(e){Qh(e),function(n){n.on("drop",function(e){var t="undefined"!=typeof e.clientX?n.getDoc().elementFromPoint(e.clientX,e.clientY):null;(Zm(t)||Zm(n.dom.getContentEditableParent(t)))&&e.preventDefault()})}(e)},rg=Ge.isContentEditableTrue,og=Ge.isContentEditableFalse,ig=function(t){var e=aa(function(){if(!t.removed&&t.getBody().contains(j.document.activeElement)&&t.selection.getRng().collapsed){var e=nm(t,t.selection.getRng(),!1);t.selection.setRng(e)}},0);t.on("focus",function(){e.throttle()}),t.on("blur",function(){e.cancel()})},ag=Ge.isContentEditableTrue,ug=Ge.isContentEditableFalse,sg=0,cg=2,lg=1,fg=function(m,g){function p(e,t,n,r){for(var o=e;o-t<r&&o<n&&m[o]===g[o-t];)++o;return function(e,t,n){return{start:e,end:t,diag:n}}(e,o,t)}var e=m.length+g.length+2,v=new Array(e),y=new Array(e),c=function(e,t,n,r,o){var i=l(e,t,n,r);if(null===i||i.start===t&&i.diag===t-r||i.end===e&&i.diag===e-n)for(var a=e,u=n;a<t||u<r;)a<t&&u<r&&m[a]===g[u]?(o.push([0,m[a]]),++a,++u):r-n<t-e?(o.push([2,m[a]]),++a):(o.push([1,g[u]]),++u);else{c(e,i.start,n,i.start-i.diag,o);for(var s=i.start;s<i.end;++s)o.push([0,m[s]]);c(i.end,t,i.end-i.diag,r,o)}},l=function(e,t,n,r){var o=t-e,i=r-n;if(0==o||0==i)return null;var a,u,s,c,l,f=o-i,d=i+o,h=(d%2==0?d:1+d)/2;for(v[1+h]=e,y[1+h]=t+1,a=0;a<=h;++a){for(u=-a;u<=a;u+=2){for(s=u+h,u===-a||u!==a&&v[s-1]<v[s+1]?v[s]=v[s+1]:v[s]=v[s-1]+1,l=(c=v[s])-e+n-u;c<t&&l<r&&m[c]===g[l];)v[s]=++c,++l;if(f%2!=0&&f-a<=u&&u<=f+a&&y[s-f]<=v[s])return p(y[s-f],u+e-n,t,r)}for(u=f-a;u<=f+a;u+=2){for(s=u+h-f,u===f-a||u!==f+a&&y[s+1]<=y[s-1]?y[s]=y[s+1]-1:y[s]=y[s-1],l=(c=y[s]-1)-e+n-u;e<=c&&n<=l&&m[c]===g[l];)y[s]=c--,l--;if(f%2==0&&-a<=u&&u<=a&&y[s]<=v[s+f])return p(y[s],u+e-n,t,r)}}},t=[];return c(0,m.length,0,g.length,t),t},dg=function(e){return y(X(P(e.childNodes),im),function(e){return 0<e.length})},hg=function(e,t){var n=X(P(t.childNodes),im);return function(e,t){var n=0;z(e,function(e){e[0]===sg?n++:e[0]===lg?(am(t,e[1],n),n++):e[0]===cg&&function(e,t){if(e.hasChildNodes()&&t<e.childNodes.length){var n=e.childNodes[t];n.parentNode.removeChild(n)}}(t,n)})}(fg(n,e),t),t},mg=Je(k.none()),gg=function(n){var e,t,r;return e=dg(n.getBody()),function(e){return-1!==e.indexOf("</iframe>")}(t=(r=v(e,function(e){var t=af.trimInternal(n.serializer,e);return 0<t.length?[t]:[]})).join(""))?um(r):sm(t)},pg=function(e,t,n){"fragmented"===t.type?hg(t.fragments,e.getBody()):e.setContent(t.content,{format:"raw"}),e.selection.moveToBookmark(n?t.beforeBookmark:t.bookmark)},vg=function(e,t){return!(!e||!t)&&(!!function(e,t){return cm(e)===cm(t)}(e,t)||function(e,t){return lm(e)===lm(t)}(e,t))},yg=function(e){var t=ma(e,"br"),n=y(function(e){for(var t=[],n=e.dom();n;)t.push(yt.fromDom(n)),n=n.lastChild;return t}(e).slice(-1),_n);t.length===n.length&&z(n,_i)},bg=function(e){Ei(e),Di(e,yt.fromHtml('<br data-mce-bogus="1">'))},Cg=function(n){Be(n).each(function(t){ke(t).each(function(e){Vn(n)&&_n(t)&&Vn(e)&&_i(t)})})},wg=jc.isEq,xg=function(e,t,n,r,o){var i,a,u,s,c=e.formatter.get(n),l=e.dom;if(c&&t)for(a=0;a<c.length;a++)if(i=c[a],vm(e.dom,t,i)&&ym(l,t,i,"attributes",o,r)&&ym(l,t,i,"styles",o,r)){if(s=i.classes)for(u=0;u<s.length;u++)if(!e.dom.hasClass(t,s[u]))return;return i}},zg={matchNode:xg,matchName:vm,match:function(e,t,n,r){var o;return r?pm(e,r,t,n):(r=e.selection.getNode(),!!pm(e,r,t,n)||!((o=e.selection.getStart())===r||!pm(e,o,t,n)))},matchAll:function(r,o,i){var e,a=[],u={};return e=r.selection.getStart(),r.dom.getParent(e,function(e){var t,n;for(t=0;t<o.length;t++)n=o[t],!u[n]&&xg(r,e,n,i)&&(u[n]=!0,a.push(n))},r.dom.getRoot()),a},canApply:function(e,t){var n,r,o,i,a,u=e.formatter.get(t),s=e.dom;if(u)for(n=e.selection.getStart(),r=jc.getParents(s,n),i=u.length-1;0<=i;i--){if(!(a=u[i].selector)||u[i].defaultBlock)return!0;for(o=r.length-1;0<=o;o--)if(s.is(r[o],a))return!0}return!1},matchesUnInheritedFormatSelector:gm},Eg=Ge.hasAttribute("data-mce-bookmark"),Ng=Ge.hasAttribute("data-mce-bogus"),Sg=Ge.hasAttributeValue("data-mce-bogus","all"),kg=function(e){return function(e){var t,n=0;if(Em(e,e))return!1;if(!(t=e.firstChild))return!0;var r=new yi(t,e);do{if(Sg(t))t=r.next(!0);else if(Ng(t))t=r.next();else if(Ge.isBr(t))n++,t=r.next();else{if(Em(e,t))return!1;t=r.next()}}while(t);return n<=1}(e.dom())},Tg=function(t,n,e,r){void 0===r&&(r=!0);var o=Mm(n,t.getBody(),e.dom()),i=ya(e,d(Dm,t),function(t){return function(e){return e.dom()===t}}(t.getBody())),a=Bm(e,o,function(e,t){return kt(e.schema.getTextInlineElements(),ie(t))}(t,e));t.dom.isEmpty(t.getBody())?(t.setContent(""),t.selection.setCursorLocation()):i.bind(_m).fold(function(){r&&Rm(t,n,a)},function(e){r&&Rm(t,n,k.some(e))})},Ag=cu,Mg="_mce_caret",Rg={},Dg=kn.filter,_g=kn.each;Wm=function(e){var t,n,r=e.selection.getRng();t=Ge.matchNodeNames(["pre"]),r.collapsed||(n=e.selection.getSelectedBlocks(),_g(Dg(Dg(n,t),function(e){return t(e.previousSibling)&&-1!==kn.indexOf(n,e.previousSibling)}),function(e){!function(e,t){vi(t).remove(),vi(e).append("<br><br>").append(t.childNodes)}(e.previousSibling,e)}))},Rg[$m="pre"]||(Rg[$m]=[]),Rg[$m].push(Wm);function Bg(o){this.compare=function(e,t){if(e.nodeName!==t.nodeName)return!1;function n(n){var r={};return Gg(o.getAttribs(n),function(e){var t=e.nodeName.toLowerCase();0!==t.indexOf("_")&&"style"!==t&&0!==t.indexOf("data-")&&(r[t]=o.getAttrib(n,t))}),r}function r(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!!r(n(e),n(t))&&(!!r(o.parseStyle(o.getAttrib(e,"style")),o.parseStyle(o.getAttrib(t,"style")))&&(!Fc(e)&&!Fc(t)))}}function Og(e,t,n){return e.isChildOf(t,n)&&t!==n&&!e.isBlock(n)}function Hg(e,t,n){var r,o,i;return r=t[n?"startContainer":"endContainer"],o=t[n?"startOffset":"endOffset"],Ge.isElement(r)&&(i=r.childNodes.length-1,!n&&o&&o--,r=r.childNodes[i<o?i:o]),Ge.isText(r)&&n&&o>=r.nodeValue.length&&(r=new yi(r,e.getBody()).next()||r),Ge.isText(r)&&!n&&0===o&&(r=new yi(r,e.getBody()).prev()||r),r}function Pg(e,t,n,r){var o=e.create(n,r);return t.parentNode.insertBefore(o,t),o.appendChild(t),o}function Lg(e,t,n,r,o){var i=yt.fromDom(t),a=yt.fromDom(e.create(r,o)),u=n?Me(i):Ae(i);return zi(a,u),n?(Ci(i,a),xi(a,i)):(wi(i,a),Di(a,i)),a.dom()}function Vg(e,t,n,r){return!(t=jc.getNonWhiteSpaceSibling(t,n,r))||"BR"===t.nodeName||e.isBlock(t)}function Ig(e,r,o,i,a){var t,n,u,s=e.dom;if(!function(e,t,n){return!!Zg(t,n.inline)||(!!Zg(t,n.block)||(n.selector?Ge.isElement(t)&&e.is(t,n.selector):void 0))}(s,i,r)&&!function(e,t){return t.links&&"A"===e.tagName}(i,r))return!1;if("all"!==r.remove)for(Qg(r.styles,function(e,t){e=jc.normalizeStyleValue(s,jc.replaceVars(e,o),t),"number"==typeof t&&(t=e,a=0),!r.remove_similar&&a&&!Zg(jc.getStyle(s,a,t),e)||s.setStyle(i,t,""),u=1}),u&&""===s.getAttrib(i,"style")&&(i.removeAttribute("style"),i.removeAttribute("data-mce-style")),Qg(r.attributes,function(e,t){var n;if(e=jc.replaceVars(e,o),"number"==typeof t&&(t=e,a=0),r.remove_similar||!a||Zg(s.getAttrib(a,t),e)){if("class"===t&&(e=s.getAttrib(i,t))&&(n="",Qg(e.split(/\s+/),function(e){/mce\-\w+/.test(e)&&(n+=(n?" ":"")+e)}),n))return void s.setAttrib(i,t,n);"class"===t&&i.removeAttribute("className"),Jg.test(t)&&i.removeAttribute("data-mce-"+t),i.removeAttribute(t)}}),Qg(r.classes,function(e){e=jc.replaceVars(e,o),a&&!s.hasClass(a,e)||s.removeClass(i,e)}),n=s.getAttribs(i),t=0;t<n.length;t++){var c=n[t].nodeName;if(0!==c.indexOf("_")&&0!==c.indexOf("data-"))return!1}return"none"!==r.remove?(function(t,e,n){var r,o=e.parentNode,i=t.dom,a=mf(t);n.block&&(a?o===i.getRoot()&&(n.list_block&&Zg(e,n.list_block)||Qg(Mn.grep(e.childNodes),function(e){jc.isValid(t,a,e.nodeName.toLowerCase())?r?r.appendChild(e):(r=Pg(i,e,a),i.setAttribs(r,t.settings.forced_root_block_attrs)):r=0})):i.isBlock(e)&&!i.isBlock(o)&&(Vg(i,e,!1)||Vg(i,e.firstChild,!0,1)||e.insertBefore(i.create("br"),e.firstChild),Vg(i,e,!0)||Vg(i,e.lastChild,!1,1)||e.appendChild(i.create("br")))),n.selector&&n.inline&&!Zg(n.inline,e)||i.remove(e,1)}(e,i,r),!0):void 0}function Fg(e){return e&&1===e.nodeType&&!Fc(e)&&!rs(e)&&!Ge.isBogus(e)}function Ug(e,t){var n;for(n=e;n;n=n[t]){if(3===n.nodeType&&0!==n.nodeValue.length)return e;if(1===n.nodeType&&!Fc(n))return n}return e}function jg(e,t,n){var r,o,i=new Bg(e);if(t&&n&&(t=Ug(t,"previousSibling"),n=Ug(n,"nextSibling"),i.compare(t,n))){for(r=t.nextSibling;r&&r!==n;)r=(o=r).nextSibling,t.appendChild(o);return e.remove(n),Mn.each(Mn.grep(n.childNodes),function(e){t.appendChild(e)}),t}return n}function qg(n,e){return d(function(e,t){return!(!t||!jc.getStyle(n,t,e))},e)}function $g(r,e,t){return d(function(e,t,n){r.setStyle(n,e,t),""===n.getAttribute("style")&&n.removeAttribute("style"),op(r,n)},e,t)}function Wg(e,t){var n;1===t.nodeType&&t.parentNode&&1===t.parentNode.nodeType&&(n=jc.getTextDecoration(e,t.parentNode),e.getStyle(t,"color")&&n?e.setStyle(t,"text-decoration",n):e.getStyle(t,"text-decoration")===n&&e.setStyle(t,"text-decoration",null))}function Kg(t){var n=Ds.fromRangeStart(t),r=Ds.fromRangeEnd(t),o=t.commonAncestorContainer;return Pc.fromPosition(!1,o,r).map(function(e){return!Cs(n,r,o)&&Cs(n,e,o)?function(e,t,n,r){var o=j.document.createRange();return o.setStart(e,t),o.setEnd(n,r),o}(n.container(),n.offset(),e.container(),e.offset()):t}).getOr(t)}function Xg(e,t,n,r,o){return null===t.get()&&function(t,n){var r=Je({});t.set({}),n.on("NodeChange",function(e){gp(n,e.element,r,t.get())})}(t,e),function(e,t,n,r){var o=e.get();z(t.split(","),function(e){o[e]||(o[e]={similar:r,callbacks:[]}),o[e].callbacks.push(n)}),e.set(o)}(t,n,r,o),{unbind:function(){return function(e,t,n){var r=e.get();z(t.split(","),function(e){r[e].callbacks=y(r[e].callbacks,function(e){return e!==n}),0===r[e].callbacks.length&&delete r[e]}),e.set(r)}(t,n,r)}}}var Yg=function(e,t){_g(Rg[e],function(e){e(t)})},Gg=Mn.each,Jg=/^(src|href|style)$/,Qg=Mn.each,Zg=jc.isEq,ep=Ig,tp=function(a,n,u,e,r){function i(e){var t=function(n,e,r,o,i){var a;return Qg(jc.getParents(n.dom,e.parentNode).reverse(),function(e){var t;a||"_start"===e.id||"_end"===e.id||(t=zg.matchNode(n,e,r,o,i))&&!1!==t.split&&(a=e)}),a}(a,e,n,u,r);return function(e,t,n,r,o,i,a,u){var s,c,l,f,d,h,m=e.dom;if(n){for(h=n.parentNode,s=r.parentNode;s&&s!==h;s=s.parentNode){for(c=m.clone(s,!1),d=0;d<t.length;d++)if(Ig(e,t[d],u,c,c)){c=0;break}c&&(l&&c.appendChild(l),f=f||c,l=c)}!i||a.mixed&&m.isBlock(n)||(r=m.split(n,r)),l&&(o.parentNode.insertBefore(l,o),f.appendChild(o))}return r}(a,l,t,e,e,!0,f,u)}function s(e){var t=h.get(e?"_start":"_end"),n=t[e?"firstChild":"lastChild"];return function(e){return Fc(e)&&Ge.isElement(e)&&("_start"===e.id||"_end"===e.id)}(n)&&(n=n[e?"firstChild":"lastChild"]),Ge.isText(n)&&0===n.data.length&&(n=e?t.previousSibling||t.nextSibling:t.nextSibling||t.previousSibling),h.remove(t,!0),n}function t(e){var t,n,r=e.commonAncestorContainer;if(e=Xc(a,e,l,!0),f.split){if(e=Cm(e),(t=Hg(a,e,!0))!==(n=Hg(a,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)&&function(e){return/^(TH|TD)$/.test(e.nodeName)}(n)&&n.firstChild&&(n=n.firstChild||n),Og(h,t,n)){var o=k.from(t.firstChild).getOr(t);return i(Lg(h,o,!0,"span",{id:"_start","data-mce-type":"bookmark"})),void s(!0)}if(Og(h,n,t)){o=k.from(n.lastChild).getOr(n);return i(Lg(h,o,!1,"span",{id:"_end","data-mce-type":"bookmark"})),void s(!1)}t=Pg(h,t,"span",{id:"_start","data-mce-type":"bookmark"}),n=Pg(h,n,"span",{id:"_end","data-mce-type":"bookmark"}),i(t),i(n),t=s(!0),n=s()}else t=n=i(t);e.startContainer=t.parentNode?t.parentNode:t,e.startOffset=h.nodeIndex(t),e.endContainer=n.parentNode?n.parentNode:n,e.endOffset=h.nodeIndex(n)+1}Gc(h,e,function(e){Qg(e,function(e){g(e),Ge.isElement(e)&&"underline"===a.dom.getStyle(e,"text-decoration")&&e.parentNode&&"underline"===jc.getTextDecoration(h,e.parentNode)&&Ig(a,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:"underline"}},null,e)})})}var o,c,l=a.formatter.get(n),f=l[0],d=!0,h=a.dom,m=a.selection,g=function(e){var t,n,r,o,i;if(Ge.isElement(e)&&h.getContentEditable(e)&&(o=d,d="true"===h.getContentEditable(e),i=!0),t=Mn.grep(e.childNodes),d&&!i)for(n=0,r=l.length;n<r&&!Ig(a,l[n],u,e,e);n++);if(f.deep&&t.length){for(n=0,r=t.length;n<r;n++)g(t[n]);i&&(d=o)}};if(e)e.nodeType?((c=h.createRng()).setStartBefore(e),c.setEndAfter(e),t(c)):t(e);else if("false"!==h.getContentEditable(m.getNode()))m.isCollapsed()&&f.inline&&!h.select("td[data-mce-selected],th[data-mce-selected]").length?function(e,t,n,r){var o,i,a,u,s,c,l,f=e.dom,d=e.selection,h=[],m=d.getRng();for(o=m.startContainer,i=m.startOffset,3===(s=o).nodeType&&(i!==o.nodeValue.length&&(u=!0),s=s.parentNode);s;){if(zg.matchNode(e,s,t,n,r)){c=s;break}s.nextSibling&&(u=!0),h.push(s),s=s.parentNode}if(c)if(u){a=d.getBookmark(),m.collapse(!0);var g=Xc(e,m,e.formatter.get(t),!0);g=Cm(g),e.formatter.remove(t,n,g),d.moveToBookmark(a)}else{l=os(e.getBody(),c);var p=Pm(!1).dom(),v=Um(h,p);Im(e,p,l||c),Lm(e,l,!1),d.setCursorLocation(v,1),f.isEmpty(c)&&f.remove(c)}}(a,n,u,r):(o=Vs.getPersistentBookmark(a.selection,!0),t(m.getRng()),m.moveToBookmark(o),f.inline&&zg.match(a,n,u,m.getStart())&&jc.moveStart(h,m,m.getRng()),a.nodeChanged());else{e=m.getNode();for(var p=0,v=l.length;p<v&&(!l[p].ceFalseOverride||!Ig(a,l[p],u,e,e));p++);}},np=Mn.each,rp=function(e,t,n){np(e.childNodes,function(e){Fg(e)&&(t(e)&&n(e),e.hasChildNodes()&&rp(e,t,n))})},op=function(e,t){"SPAN"===t.nodeName&&0===e.getAttribs(t).length&&e.remove(t,!0)},ip=function(n,e,r,o){np(e,function(t){np(n.dom.select(t.inline,o),function(e){Fg(e)&&ep(n,t,r,e,t.exact?e:null)}),function(r,e,t){if(e.clear_child_styles){var n=e.links?"*:not(a)":"*";np(r.select(n,t),function(n){Fg(n)&&np(e.styles,function(e,t){r.setStyle(n,t,"")})})}}(n.dom,t,o)})},ap=function(e,t,n,r){(t.styles.color||t.styles.textDecoration)&&(Mn.walk(r,d(Wg,e),"childNodes"),Wg(e,r))},up=function(e,t,n,r){t.styles&&t.styles.backgroundColor&&rp(r,qg(e,"fontSize"),$g(e,"backgroundColor",jc.replaceVars(t.styles.backgroundColor,n)))},sp=function(e,t,n,r){"sub"!==t.inline&&"sup"!==t.inline||(rp(r,qg(e,"fontSize"),$g(e,"fontSize","")),e.remove(e.select("sup"===t.inline?"sub":"sup",r),!0))},cp=function(e,t,n,r){r&&!1!==t.merge_siblings&&(r=jg(e,jc.getNonWhiteSpaceSibling(r),r),r=jg(e,r,jc.getNonWhiteSpaceSibling(r,!0)))},lp=function(t,n,r,o,i){zg.matchNode(t,i.parentNode,r,o)&&ep(t,n,o,i)||n.merge_with_parents&&t.dom.getParent(i.parentNode,function(e){if(zg.matchNode(t,e,r,o))return ep(t,n,o,i),!0})},fp=function(e){return e.collapsed?e:Kg(e)},dp=Mn.each,hp=function(m,g,p,r){function v(n,e){if(e=e||C,n){if(e.onformat&&e.onformat(n,e,p,r),dp(e.styles,function(e,t){i.setStyle(n,t,jc.replaceVars(e,p))}),e.styles){var t=i.getAttrib(n,"style");t&&n.setAttribute("data-mce-style",t)}dp(e.attributes,function(e,t){i.setAttrib(n,t,jc.replaceVars(e,p))}),dp(e.classes,function(e){e=jc.replaceVars(e,p),i.hasClass(n,e)||i.addClass(n,e)})}}function y(e,t){var n=!1;return!!C.selector&&(dp(e,function(e){if(!("collapsed"in e&&e.collapsed!==o))return i.is(t,e.selector)&&!rs(t)?(v(t,e),!(n=!0)):void 0}),n)}function e(s,e,t,c){var l,f,d=[],h=!0;l=C.inline||C.block,f=s.create(l),v(f),Gc(s,e,function(e){var a,u=function(e){var t,n,r,o;if(o=h,t=e.nodeName.toLowerCase(),n=e.parentNode.nodeName.toLowerCase(),1===e.nodeType&&s.getContentEditable(e)&&(o=h,h="true"===s.getContentEditable(e),r=!0),jc.isEq(t,"br"))return a=0,void(C.block&&s.remove(e));if(C.wrapper&&zg.matchNode(m,e,g,p))a=0;else{if(h&&!r&&C.block&&!C.wrapper&&jc.isTextBlock(m,t)&&jc.isValid(m,n,l))return e=s.rename(e,l),v(e),d.push(e),void(a=0);if(C.selector){var i=y(b,e);if(!C.inline||i)return void(a=0)}!h||r||!jc.isValid(m,l,t)||!jc.isValid(m,n,l)||!c&&3===e.nodeType&&1===e.nodeValue.length&&65279===e.nodeValue.charCodeAt(0)||rs(e)||C.inline&&s.isBlock(e)?(a=0,dp(Mn.grep(e.childNodes),u),r&&(h=o),a=0):(a||(a=s.clone(f,!1),e.parentNode.insertBefore(a,e),d.push(a)),a.appendChild(e))}};dp(e,u)}),!0===C.links&&dp(d,function(e){var t=function(e){"A"===e.nodeName&&v(e,C),dp(Mn.grep(e.childNodes),t)};t(e)}),dp(d,function(e){function t(e){var t=!1;return dp(e.childNodes,function(e){if(function(e){return e&&1===e.nodeType&&!Fc(e)&&!rs(e)&&!Ge.isBogus(e)}(e))return t=e,!1}),t}var n,r,o,i,a;(r=0,dp(e.childNodes,function(e){jc.isWhiteSpaceNode(e)||Fc(e)||r++}),n=r,!(1<d.length)&&s.isBlock(e)||0!==n)?(C.inline||C.wrapper)&&(C.exact||1!==n||((i=t(o=e))&&!Fc(i)&&zg.matchName(s,i,C)&&(a=s.clone(i,!1),v(a),s.replace(a,o,!0),s.remove(i,1)),e=a||o),ip(m,b,p,e),lp(m,C,g,p,e),up(s,C,p,e),sp(s,C,p,e),cp(s,C,p,e)):s.remove(e,1)})}var t,n,b=m.formatter.get(g),C=b[0],o=!r&&m.selection.isCollapsed(),i=m.dom,a=m.selection;if("false"!==i.getContentEditable(a.getNode())){if(C){if(r)r.nodeType?y(b,r)||((n=i.createRng()).setStartBefore(r),n.setEndAfter(r),e(i,Xc(m,n,b),0,!0)):e(i,r,0,!0);else if(o&&C.inline&&!i.select("td[data-mce-selected],th[data-mce-selected]").length)!function(e,t,n){var r,o,i,a,u,s,c=e.selection;a=(r=c.getRng()).startOffset,s=r.startContainer.nodeValue,(o=os(e.getBody(),c.getStart()))&&(i=Hm(o));var l=/[^\s\u00a0\u00ad\u200b\ufeff]/;s&&0<a&&a<s.length&&l.test(s.charAt(a))&&l.test(s.charAt(a-1))?(u=c.getBookmark(),r.collapse(!0),r=Xc(e,r,e.formatter.get(t)),r=Cm(r),e.formatter.apply(t,n,r),c.moveToBookmark(u)):(o&&i.nodeValue===Ag||(i=(o=function(e,t){return e.importNode(t,!0)}(e.getDoc(),Pm(!0).dom())).firstChild,r.insertNode(o),a=1),e.formatter.apply(t,n,o),c.setCursorLocation(i,a))}(m,g,p);else{var u=m.selection.getNode();m.settings.forced_root_block||!b[0].defaultBlock||i.getParent(u,i.isBlock)||hp(m,b[0].defaultBlock),m.selection.setRng(fp(m.selection.getRng())),t=Vs.getPersistentBookmark(m.selection,!0),e(i,Xc(m,a.getRng(),b)),C.styles&&ap(i,C,p,u),a.moveToBookmark(t),jc.moveStart(i,a,a.getRng()),m.nodeChanged()}Yg(g,m)}}else{r=a.getNode();for(var s=0,c=b.length;s<c;s++)if(b[s].ceFalseOverride&&i.is(r,b[s].selector))return void v(r,b[s])}},mp={applyFormat:hp},gp=function(r,e,t,n){var o=Et(t.get()),i={},a={},u=y(jc.getParents(r.dom,e),function(e){return 1===e.nodeType&&!e.getAttribute("data-mce-bogus")});ue(n,function(e,n){Mn.each(u,function(t){return r.formatter.matchNode(t,n,{},e.similar)?(-1===o.indexOf(n)&&(z(e.callbacks,function(e){e(!0,{node:t,format:n,parents:u})}),i[n]=e.callbacks),a[n]=e.callbacks,!1):!zg.matchesUnInheritedFormatSelector(r,t,n)&&void 0})});var s=pp(t.get(),a,e,u);t.set(G(G({},i),s))},pp=function(e,n,r,o){return ce(e,function(e,t){return!!kt(n,t)||(z(e,function(e){e(!1,{node:r,format:t,parents:o})}),!1)}).t},vp=function(r){var t={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:"font-family font-size",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,clear_child_styles:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},fontname:{inline:"span",toggle:!1,styles:{fontFamily:"%value"},clear_child_styles:!0},fontsize:{inline:"span",toggle:!1,styles:{fontSize:"%value"},clear_child_styles:!0},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:!0,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(n,e,t){Mn.each(t,function(e,t){r.setAttrib(n,t,e)})}},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}]};return Mn.each("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/),function(e){t[e]={block:e,remove:"all"}}),t};function yp(e,t){function s(e){var t;return r="string"==typeof e?{name:e,classes:[],attrs:{}}:e,function(e,t){t.classes.length&&Rp.addClass(e,t.classes.join(" ")),Rp.setAttribs(e,t.attrs)}(t=Rp.create(r.name),r),t}var n,r,o,c=t&&t.schema||pr({}),l=function(n,e,t){var r,o,i,a=0<e.length&&e[0],u=a&&a.name;if(i=function(e,t){var n="string"!=typeof e?e.nodeName.toLowerCase():e,r=c.getElementRule(n),o=r&&r.parentsRequired;return!(!o||!o.length)&&(t&&-1!==Mn.inArray(o,t)?t:o[0])}(n,u))u===i?(o=e[0],e=e.slice(1)):o=i;else if(a)o=e[0],e=e.slice(1);else if(!t)return n;return o&&(r=s(o)).appendChild(n),t&&(r||(r=Rp.create("div")).appendChild(n),Mn.each(t,function(e){var t=s(e);r.insertBefore(t,n)})),l(r,e,o&&o.siblings)};return e&&e.length?(r=e[0],n=s(r),(o=Rp.create("div")).appendChild(l(n,e.slice(1),r.siblings)),o):""}function bp(e){var t,a={classes:[],attrs:{}};return"*"!==(e=a.selector=Mn.trim(e))&&(t=e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,function(e,t,n,r,o){switch(t){case"#":a.attrs.id=n;break;case".":a.classes.push(n);break;case":":-1!==Mn.inArray("checked disabled enabled read-only required".split(" "),n)&&(a.attrs[n]=n)}if("["===r){var i=o.match(/([\w\-]+)(?:\=\"([^\"]+))?/);i&&(a.attrs[i[1]]=i[2])}return""})),a.name=t||"div",a}function Cp(e){var t=function o(e){var n={},r=function(e,t){e&&("string"!=typeof e?Mn.each(e,function(e,t){r(t,e)}):(A(t)||(t=[t]),Mn.each(t,function(e){"undefined"==typeof e.deep&&(e.deep=!e.selector),"undefined"==typeof e.split&&(e.split=!e.selector||e.inline),"undefined"==typeof e.remove&&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+/))}),n[e]=t))};return r(vp(e.dom)),r(e.settings.formats),{get:function(e){return e?n[e]:n},has:function(e){return kt(n,e)},register:r,unregister:function(e){return e&&n[e]&&delete n[e],n}}}(e),n=Je(null);return Op(e),jm(e),{get:t.get,has:t.has,register:t.register,unregister:t.unregister,apply:d(mp.applyFormat,e),remove:d(tp,e),toggle:d(Bp,e,t),match:d(zg.match,e),matchAll:d(zg.matchAll,e),matchNode:d(zg.matchNode,e),canApply:d(zg.canApply,e),formatChanged:d(Xg,e,n),getCssText:d(_p,e)}}function wp(e,i,a){e.addNodeFilter("font",function(e){z(e,function(e){var t=i.parse(e.attr("style")),n=e.attr("color"),r=e.attr("face"),o=e.attr("size");n&&(t.color=n),r&&(t["font-family"]=r),o&&(t["font-size"]=a[parseInt(e.attr("size"),10)-1]),e.name="span",e.attr("style",i.serialize(t)),function(t,e){z(e,function(e){t.attr(e,null)})}(e,["color","face","size"])})})}function xp(e,t){var n=xr();t.convert_fonts_to_spans&&wp(e,n,Mn.explode(t.font_size_legacy_values)),function(e,n){e.addNodeFilter("strike",function(e){z(e,function(e){var t=n.parse(e.attr("style"));t["text-decoration"]="line-through",e.name="span",e.attr("style",n.serialize(t))})})}(e,n)}function zp(e,t,n,r){(e.padd_empty_with_br||t.insert)&&n[r.name]?r.empty().append(new ul("br",1)).shortEnded=!0:r.empty().append(new ul("#text",3)).value="\xa0"}function Ep(t,e,n,r){return r.isEmpty(e,n,function(e){return function(e,t){var n=e.getElementRule(t.name);return n&&n.paddEmpty}(t,e)})}function Np(T,A){void 0===A&&(A=pr());var M={},R=[],D={},_={};(T=T||{}).validate=!("validate"in T)||T.validate,T.root_name=T.root_name||"body";var B=function(e){var t,n,r;(n=e.name)in M&&((r=D[n])?r.push(e):D[n]=[e]),t=R.length;for(;t--;)(n=R[t].name)in e.attributes.map&&((r=_[n])?r.push(e):_[n]=[e]);return e},e={schema:A,addAttributeFilter:function(e,n){Up(jp(e),function(e){var t;for(t=0;t<R.length;t++)if(R[t].name===e)return void R[t].callbacks.push(n);R.push({name:e,callbacks:[n]})})},getAttributeFilters:function(){return[].concat(R)},addNodeFilter:function(e,n){Up(jp(e),function(e){var t=M[e];t||(M[e]=t=[]),t.push(n)})},getNodeFilters:function(){var e=[];for(var t in M)M.hasOwnProperty(t)&&e.push({name:t,callbacks:M[t]});return e},filterNode:B,parse:function(e,a){var t,n,r,o,i,u,s,c,l,f,d,h=[];a=a||{},D={},_={},l=qp(Fp("script,style,head,html,body,title,meta,param"),A.getBlockElements());var m,g=A.getNonEmptyElements(),p=A.children,v=T.validate,y="forced_root_block"in a?a.forced_root_block:T.forced_root_block,b=!1===(m=y)?"":!0===m?"p":m,C=A.getWhiteSpaceElements(),w=/^[ \t\r\n]+/,x=/[ \t\r\n]+$/,z=/[ \t\r\n]+/g,E=/^[ \t\r\n]+$/;f=C.hasOwnProperty(a.context)||C.hasOwnProperty(T.root_name);function N(e){var t,n,r,o,i=A.getBlockElements();for(t=e.prev;t&&3===t.type;){if(0<(r=t.value.replace(x,"")).length)return void(t.value=r);if(n=t.next){if(3===n.type&&n.value.length){t=t.prev;continue}if(!i[n.name]&&"script"!==n.name&&"style"!==n.name){t=t.prev;continue}}o=t.prev,t.remove(),t=o}}var S=function(e,t){var n,r=new ul(e,t);return e in M&&((n=D[e])?n.push(r):D[e]=[r]),r};t=of({validate:v,allow_script_urls:T.allow_script_urls,allow_conditional_comments:T.allow_conditional_comments,self_closing_elements:function(e){var t,n={};for(t in e)"li"!==t&&"p"!==t&&(n[t]=e[t]);return n}(A.getSelfClosingElements()),cdata:function(e){d.append(S("#cdata",4)).value=e},text:function(e,t){var n;f||(e=e.replace(z," "),function(e,t){return e&&(t[e.name]||"br"===e.name)}(d.lastChild,l)&&(e=e.replace(w,""))),0!==e.length&&((n=S("#text",3)).raw=!!t,d.append(n).value=e)},comment:function(e){d.append(S("#comment",8)).value=e},pi:function(e,t){d.append(S(e,7)).value=t,N(d)},doctype:function(e){d.append(S("#doctype",10)).value=e,N(d)},start:function(e,t,n){var r,o,i,a,u;if(i=v?A.getElementRule(e):{}){for((r=S(i.outputName||e,1)).attributes=t,r.shortEnded=n,d.append(r),(u=p[d.name])&&p[r.name]&&!u[r.name]&&h.push(r),o=R.length;o--;)(a=R[o].name)in t.map&&((s=_[a])?s.push(r):_[a]=[r]);l[e]&&N(r),n||(d=r),!f&&C[e]&&(f=!0)}},end:function(e){var t,n,r,o,i;if(n=v?A.getElementRule(e):{}){if(l[e]&&!f){if((t=d.firstChild)&&3===t.type)if(0<(r=t.value.replace(w,"")).length)t.value=r,t=t.next;else for(o=t.next,t.remove(),t=o;t&&3===t.type;)r=t.value,o=t.next,0!==r.length&&!E.test(r)||(t.remove(),t=o),t=o;if((t=d.lastChild)&&3===t.type)if(0<(r=t.value.replace(x,"")).length)t.value=r,t=t.prev;else for(o=t.prev,t.remove(),t=o;t&&3===t.type;)r=t.value,o=t.prev,0!==r.length&&!E.test(r)||(t.remove(),t=o),t=o}if(f&&C[e]&&(f=!1),n.removeEmpty&&Ep(A,g,C,d)&&!d.attr("name")&&!d.attr("id"))return i=d.parent,l[d.name]?d.empty().remove():d.unwrap(),void(d=i);n.paddEmpty&&(function(e){return Ip(e,"#text")&&"\xa0"===e.firstChild.value}(d)||Ep(A,g,C,d))&&zp(T,a,l,d),d=d.parent}}},A);var k=d=new ul(a.context||T.root_name,11);if(t.parse(e),v&&h.length&&(a.context?a.invalid=!0:function(e){var t,n,r,o,i,a,u,s,c,l,f,d,h,m,g,p;for(d=Fp("tr,td,th,tbody,thead,tfoot,table"),l=A.getNonEmptyElements(),f=A.getWhiteSpaceElements(),h=A.getTextBlockElements(),m=A.getSpecialElements(),t=0;t<e.length;t++)if((n=e[t]).parent&&!n.fixed)if(h[n.name]&&"li"===n.parent.name){for(g=n.next;g&&h[g.name];)g.name="li",g.fixed=!0,n.parent.insert(g,n.parent),g=g.next;n.unwrap(n)}else{for(o=[n],r=n.parent;r&&!A.isValidChild(r.name,n.name)&&!d[r.name];r=r.parent)o.push(r);if(r&&1<o.length){for(o.reverse(),i=a=B(o[0].clone()),c=0;c<o.length-1;c++){for(A.isValidChild(a.name,o[c].name)?(u=B(o[c].clone()),a.append(u)):u=a,s=o[c].firstChild;s&&s!==o[c+1];)p=s.next,u.append(s),s=p;a=u}Ep(A,l,f,i)?r.insert(n,o[0],!0):(r.insert(i,o[0],!0),r.insert(n,i)),r=o[0],(Ep(A,l,f,r)||Ip(r,"br"))&&r.empty().remove()}else if(n.parent){if("li"===n.name){if((g=n.prev)&&("ul"===g.name||"ul"===g.name)){g.append(n);continue}if((g=n.next)&&("ul"===g.name||"ul"===g.name)){g.insert(n,g.firstChild,!0);continue}n.wrap(B(new ul("ul",1)));continue}A.isValidChild(n.parent.name,"div")&&A.isValidChild("div",n.name)?n.wrap(B(new ul("div",1))):m[n.name]?n.empty().remove():n.unwrap()}}}(h)),b&&("body"===k.name||a.isRootContent)&&function(){function e(e){e&&((r=e.firstChild)&&3===r.type&&(r.value=r.value.replace(w,"")),(r=e.lastChild)&&3===r.type&&(r.value=r.value.replace(x,"")))}var t,n,r=k.firstChild;if(A.isValidChild(k.name,b.toLowerCase())){for(;r;)t=r.next,3===r.type||1===r.type&&"p"!==r.name&&!l[r.name]&&!r.attr("data-mce-type")?(n||((n=S(b,1)).attr(T.forced_root_block_attrs),k.insert(n,r)),n.append(r)):(e(n),n=null),r=t;e(n)}}(),!a.invalid){for(c in D)if(D.hasOwnProperty(c)){for(s=M[c],i=(n=D[c]).length;i--;)n[i].parent||n.splice(i,1);for(r=0,o=s.length;r<o;r++)s[r](n,c,a)}for(r=0,o=R.length;r<o;r++)if((s=R[r]).name in _){for(i=(n=_[s.name]).length;i--;)n[i].parent||n.splice(i,1);for(i=0,u=s.callbacks.length;i<u;i++)s.callbacks[i](n,s.name,a)}}return k}};return function(e,g){var p=e.schema;g.remove_trailing_brs&&e.addNodeFilter("br",function(e,t,n){var r,o,i,a,u,s,c,l,f=e.length,d=Mn.extend({},p.getBlockElements()),h=p.getNonEmptyElements(),m=p.getNonEmptyElements();for(d.body=1,r=0;r<f;r++)if(i=(o=e[r]).parent,d[o.parent.name]&&o===i.lastChild){for(u=o.prev;u;){if("span"!==(s=u.name)||"bookmark"!==u.attr("data-mce-type")){if("br"!==s)break;if("br"===s){o=null;break}}u=u.prev}o&&(o.remove(),Ep(p,h,m,i)&&(c=p.getElementRule(i.name))&&(c.removeEmpty?i.remove():c.paddEmpty&&zp(g,n,d,i)))}else{for(a=o;i&&i.firstChild===a&&i.lastChild===a&&!d[(a=i).name];)i=i.parent;a===i&&!0!==g.padd_empty_with_br&&((l=new ul("#text",3)).value="\xa0",o.replace(l))}}),e.addAttributeFilter("href",function(e){var t,n,r,o=e.length;if(!g.allow_unsafe_link_target)for(;o--;)"a"===(t=e[o]).name&&"_blank"===t.attr("target")&&t.attr("rel",(n=t.attr("rel"),void 0,r=n?Mn.trim(n):"",/\b(noopener)\b/g.test(r)?r:r.split(" ").filter(function(e){return 0<e.length}).concat(["noopener"]).sort().join(" ")))}),g.allow_html_in_named_anchor||e.addAttributeFilter("id,name",function(e){for(var t,n,r,o,i=e.length;i--;)if("a"===(o=e[i]).name&&o.firstChild&&!o.attr("href"))for(r=o.parent,t=o.lastChild;n=t.prev,r.insert(t,o),t=n;);}),g.fix_list_elements&&e.addNodeFilter("ul,ol",function(e){for(var t,n,r=e.length;r--;)if("ul"===(n=(t=e[r]).parent).name||"ol"===n.name)if(t.prev&&"li"===t.prev.name)t.prev.append(t);else{var o=new ul("li",1);o.attr("style","list-style-type: none"),t.wrap(o)}}),g.validate&&p.getValidClasses()&&e.addAttributeFilter("class",function(e){for(var t,n,r,o,i,a,u,s=e.length,c=p.getValidClasses();s--;){for(n=(t=e[s]).attr("class").split(" "),i="",r=0;r<n.length;r++)o=n[r],u=!1,(a=c["*"])&&a[o]&&(u=!0),a=c[t.name],!u&&a&&a[o]&&(u=!0),u&&(i&&(i+=" "),i+=o);i.length||(i=null),t.attr("class",i)}})}(e,T),Vp(e,T),e}function Sp(e,t,n){-1===Mn.inArray(t,n)&&(e.addAttributeFilter(n,function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),t.push(n))}function kp(e,t,n,r,o){return function(e,t,n){return t.no_events||!e?n:ld(e,bd(t,{content:n})).content}(e,o,function(e,t,n){return pl(e,t).serialize(n)}(t,n,r))}function Tp(a,u){var s,c,l,e=["data-mce-selected"];return s=u&&u.dom?u.dom:Xi.DOM,c=u&&u.schema?u.schema:pr(a),a.entity_encoding=a.entity_encoding||"named",a.remove_trailing_brs=!("remove_trailing_brs"in a)||a.remove_trailing_brs,l=Np(a,c),Hp(l,a,s),{schema:c,addNodeFilter:l.addNodeFilter,addAttributeFilter:l.addAttributeFilter,serialize:function(e,t){var n=bd({format:"html"},t||{}),r=Lp(u,e,n),o=function(e,t,n){var r=lu(n.getInner?t.innerHTML:e.getOuterHTML(t));return n.selection||Wn(yt.fromDom(t))?r:Mn.trim(r)}(s,r,n),i=function(e,t,n){var r=n.selection?bd({forced_root_block:!1},n):n,o=e.parse(t,r);return Pp(o),o}(l,o,n);return"tree"===n.format?i:kp(u,a,c,i,n)},addRules:function(e){c.addValidElements(e)},setRules:function(e){c.setValidElements(e)},addTempAttr:d(Sp,l,e),getTempAttrs:function(){return e}}}function Ap(e,t){var n=Tp(e,t);return{schema:n.schema,addNodeFilter:n.addNodeFilter,addAttributeFilter:n.addAttributeFilter,serialize:n.serialize,addRules:n.addRules,setRules:n.setRules,addTempAttr:n.addTempAttr,getTempAttrs:n.getTempAttrs}}var Mp=Mn.each,Rp=Xi.DOM,Dp=function(e){return e&&"string"==typeof e?(e=(e=e.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),Mn.map(e.split(/(?:>|\s+(?![^\[\]]+\]))/),function(e){var t=Mn.map(e.split(/(?:~\+|~|\+)/),bp),n=t.pop();return t.length&&(n.siblings=t),n}).reverse()):[]},_p=function(n,e){var t,r,o,i,a,u,s="";if(!1===(u=n.settings.preview_styles))return"";"string"!=typeof u&&(u="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow");function c(e){return e.replace(/%(\w+)/g,"")}if("string"==typeof e){if(!(e=n.formatter.get(e)))return;e=e[0]}return"preview"in e&&!1===(u=e.preview)?"":(t=e.block||e.inline||"span",r=(i=Dp(e.selector)).length?(i[0].name||(i[0].name=t),t=e.selector,yp(i,n)):yp([t],n),o=Rp.select(t,r)[0]||r.firstChild,Mp(e.styles,function(e,t){(e=c(e))&&Rp.setStyle(o,t,e)}),Mp(e.attributes,function(e,t){(e=c(e))&&Rp.setAttrib(o,t,e)}),Mp(e.classes,function(e){e=c(e),Rp.hasClass(o,e)||Rp.addClass(o,e)}),n.fire("PreviewFormats"),Rp.setStyles(r,{position:"absolute",left:-65535}),n.getBody().appendChild(r),a=Rp.getStyle(n.getBody(),"fontSize",!0),a=/px$/.test(a)?parseInt(a,10):0,Mp(u.split(" "),function(e){var t=Rp.getStyle(o,e,!0);if(!("background-color"===e&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(t)&&(t=Rp.getStyle(n.getBody(),e,!0),"#ffffff"===Rp.toHex(t).toLowerCase())||"color"===e&&"#000000"===Rp.toHex(t).toLowerCase())){if("font-size"===e&&/em|%$/.test(t)){if(0===a)return;t=parseFloat(t)/(/%$/.test(t)?100:1)*a+"px"}"border"===e&&t&&(s+="padding:0 2px;"),s+=e+":"+t+";"}}),n.fire("AfterPreviewFormats"),Rp.remove(r),s)},Bp=function(e,t,n,r,o){var i=t.get(n);!zg.match(e,n,r,o)||"toggle"in i[0]&&!i[0].toggle?mp.applyFormat(e,n,r,o):tp(e,n,r,o)},Op=function(e){e.addShortcut("meta+b","","Bold"),e.addShortcut("meta+i","","Italic"),e.addShortcut("meta+u","","Underline");for(var t=1;t<=6;t++)e.addShortcut("access+"+t,"",["FormatBlock",!1,"h"+t]);e.addShortcut("access+7","",["FormatBlock",!1,"p"]),e.addShortcut("access+8","",["FormatBlock",!1,"div"]),e.addShortcut("access+9","",["FormatBlock",!1,"address"])},Hp=function(t,s,c){t.addAttributeFilter("data-mce-tabindex",function(e,t){for(var n,r=e.length;r--;)(n=e[r]).attr("tabindex",n.attr("data-mce-tabindex")),n.attr(t,null)}),t.addAttributeFilter("src,href,style",function(e,t){for(var n,r,o=e.length,i="data-mce-"+t,a=s.url_converter,u=s.url_converter_scope;o--;)(r=(n=e[o]).attr(i))!==undefined?(n.attr(t,0<r.length?r:null),n.attr(i,null)):(r=n.attr(t),"style"===t?r=c.serializeStyle(c.parseStyle(r),n.name):a&&(r=a.call(u,r,t,n.name)),n.attr(t,0<r.length?r:null))}),t.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",0<n.length?n:null))}),t.addAttributeFilter("data-mce-type",function(e,t,n){for(var r,o=e.length;o--;){if("bookmark"===(r=e[o]).attr("data-mce-type")&&!n.cleanup)k.from(r.firstChild).exists(function(e){return!su(e.value)})?r.unwrap():r.remove()}}),t.addNodeFilter("noscript",function(e){for(var t,n=e.length;n--;)(t=e[n].firstChild)&&(t.value=ir.decode(t.value))}),t.addNodeFilter("script,style",function(e,t){for(var n,r,o,i=e.length,a=function(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,"")};i--;)r=(n=e[i]).firstChild?n.firstChild.value:"","script"===t?((o=n.attr("type"))&&n.attr("type","mce-no/type"===o?null:o.replace(/^mce\-/,"")),"xhtml"===s.element_format&&0<r.length&&(n.firstChild.value="// <![CDATA[\n"+a(r)+"\n// ]]>")):"xhtml"===s.element_format&&0<r.length&&(n.firstChild.value="\x3c!--\n"+a(r)+"\n--\x3e")}),t.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))}),t.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||n.attr("type")||n.attr("type","text"))}),t.addAttributeFilter("data-mce-type",function(e){z(e,function(e){"format-caret"===e.attr("data-mce-type")&&(e.isEmpty(t.schema.getNonEmptyElements())?e.remove():e.unwrap())})}),t.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)})},Pp=function(e){function t(e){return e&&"br"===e.name}var n,r;t(n=e.lastChild)&&t(r=n.prev)&&(n.remove(),r.remove())},Lp=function(e,t,n){return function(e,t){return e&&e.hasEventListeners("PreProcess")&&!t.no_events}(e,n)?function(e,t,n){var r,o,i,a=e.dom;return t=t.cloneNode(!0),(r=j.document.implementation).createHTMLDocument&&(o=r.createHTMLDocument(""),Mn.each("BODY"===t.nodeName?t.childNodes:[t],function(e){o.body.appendChild(o.importNode(e,!0))}),t="BODY"!==t.nodeName?o.body.firstChild:o.body,i=a.doc,a.doc=o),cd(e,bd(n,{node:t})),i&&(a.doc=i),t}(e,t,n):t},Vp=function(e,t){t.inline_styles&&xp(e,t)},Ip=function(e,t){return e&&e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.name===t},Fp=Mn.makeMap,Up=Mn.each,jp=Mn.explode,qp=Mn.extend;function $p(e){return{getBookmark:d(Vc,e),moveToBookmark:d(Ic,e)}}($p=$p||{}).isBookmarkNode=Fc;function Wp(r,a){var u,s,c,l,f,d,h,m,g,p,v,y,i,b,C,w,x,z=a.dom,E=Mn.each,N=a.getDoc(),S=j.document,k=Math.abs,T=Math.round,A=a.getBody();function M(e){return e&&("IMG"===e.nodeName||a.dom.is(e,"figure.image"))}function e(e){var t=e.target;!function(e,t){if("longpress"!==e.type&&0!==e.type.indexOf("touch"))return M(e.target)&&!Jm(e.clientX,e.clientY,t);var n=e.touches[0];return M(e.target)&&!Jm(n.clientX,n.clientY,t)}(e,a.selection.getRng())||e.isDefaultPrevented()||a.selection.select(t)}function R(e){return a.dom.is(e,"figure.image")?e.querySelector("img"):e}function D(e){var t=a.settings.object_resizing;return!1!==t&&!Nn.iOS&&("string"!=typeof t&&(t="table,img,figure.image,div"),"false"!==e.getAttribute("data-mce-resize")&&(e!==a.getBody()&&we(yt.fromDom(e),t)))}function _(e){var t,n,r,o;t=e.screenX-d,n=e.screenY-h,b=t*f[2]+p,C=n*f[3]+v,b=b<5?5:b,C=C<5?5:C,(M(u)&&!1!==a.settings.resize_img_proportional?!Ah.modifierPressed(e):Ah.modifierPressed(e)||M(u)&&f[2]*f[3]!=0)&&(k(t)>k(n)?(C=T(b*y),b=T(C/y)):(b=T(C/y),C=T(b*y))),z.setStyles(R(s),{width:b,height:C}),r=0<(r=f.startPos.x+t)?r:0,o=0<(o=f.startPos.y+n)?o:0,z.setStyles(c,{left:r,top:o,display:"block"}),c.innerHTML=b+" &times; "+C,f[2]<0&&s.clientWidth<=b&&z.setStyle(s,"left",m+(p-b)),f[3]<0&&s.clientHeight<=C&&z.setStyle(s,"top",g+(v-C)),(t=A.scrollWidth-w)+(n=A.scrollHeight-x)!==0&&z.setStyles(c,{left:r-t,top:o-n}),i||(md(a,u,p,v),i=!0)}function n(e){function t(e,t){if(e)do{if(e===t)return!0}while(e=e.parentNode)}var n;i||a.removed||(E(z.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),n="mousedown"===e.type?e.target:r.getNode(),t(n=z.$(n).closest("table,img,figure.image,hr")[0],A)&&(L(),t(r.getStart(!0),n)&&t(r.getEnd(!0),n))?O(n):H())}function o(e){return Xp(function(e,t){for(;t&&t!==e;){if(Yp(t)||Xp(t))return t;t=t.parentNode}return null}(a.getBody(),e))}l={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};var B=function(){i=!1;function e(e,t){t&&(u.style[e]||!a.schema.isValid(u.nodeName.toLowerCase(),e)?z.setStyle(R(u),e,t):z.setAttrib(R(u),e,t))}e("width",b),e("height",C),z.unbind(N,"mousemove",_),z.unbind(N,"mouseup",B),S!==N&&(z.unbind(S,"mousemove",_),z.unbind(S,"mouseup",B)),z.remove(s),z.remove(c),O(u),gd(a,u,b,C),z.setAttrib(u,"style",z.getAttrib(u,"style")),a.nodeChanged()},O=function(e){var t,r,o,n,i;H(),P(),t=z.getPos(e,A),m=t.x,g=t.y,i=e.getBoundingClientRect(),r=i.width||i.right-i.left,o=i.height||i.bottom-i.top,u!==e&&(u=e,b=C=0),n=a.fire("ObjectSelected",{target:e}),D(e)&&!n.isDefaultPrevented()?E(l,function(t,e){var n;(n=z.get("mceResizeHandle"+e))&&z.remove(n),n=z.add(A,"div",{id:"mceResizeHandle"+e,"data-mce-bogus":"all","class":"mce-resizehandle",unselectable:!0,style:"cursor:"+e+"-resize; margin:0; padding:0"}),11===Nn.ie&&(n.contentEditable=!1),z.bind(n,"mousedown",function(e){e.stopImmediatePropagation(),e.preventDefault(),function(e){d=e.screenX,h=e.screenY,p=R(u).clientWidth,v=R(u).clientHeight,y=v/p,(f=t).startPos={x:r*t[0]+m,y:o*t[1]+g},w=A.scrollWidth,x=A.scrollHeight,s=u.cloneNode(!0),z.addClass(s,"mce-clonedresizable"),z.setAttrib(s,"data-mce-bogus","all"),s.contentEditable=!1,s.unSelectabe=!0,z.setStyles(s,{left:m,top:g,margin:0}),s.removeAttribute("data-mce-selected"),A.appendChild(s),z.bind(N,"mousemove",_),z.bind(N,"mouseup",B),S!==N&&(z.bind(S,"mousemove",_),z.bind(S,"mouseup",B)),c=z.add(A,"div",{"class":"mce-resize-helper","data-mce-bogus":"all"},p+" &times; "+v)}(e)}),t.elm=n,z.setStyles(n,{left:r*t[0]+m-n.offsetWidth/2,top:o*t[1]+g-n.offsetHeight/2})}):H(),u.setAttribute("data-mce-selected","1")},H=function(){var e,t;for(e in P(),u&&u.removeAttribute("data-mce-selected"),l)(t=z.get("mceResizeHandle"+e))&&(z.unbind(t),z.remove(t))},P=function(){for(var e in l){var t=l[e];t.elm&&(z.unbind(t.elm),delete t.elm)}},L=function(){try{a.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}};return a.on("init",function(){L(),(Nn.browser.isIE()||Nn.browser.isEdge())&&(a.on("mousedown click",function(e){var t=e.target,n=t.nodeName;i||!/^(TABLE|IMG|HR)$/.test(n)||o(t)||(2!==e.button&&a.selection.select(t,"TABLE"===n),"mousedown"===e.type&&a.nodeChanged())}),a.dom.bind(A,"mscontrolselect",function(e){function t(e){pn.setEditorTimeout(a,function(){a.selection.select(e)})}if(o(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 t=pn.throttle(function(e){a.composing||n(e)});a.on("nodechange ResizeEditor ResizeWindow drop FullscreenStateChanged",t),a.on("keyup compositionend",function(e){u&&"TABLE"===u.nodeName&&t(e)}),a.on("hide blur",H),a.on("contextmenu longpress",e,!0)}),a.on("remove",P),{isResizable:D,showResizeRect:O,hideResizeRect:H,updateResizeRect:n,destroy:function(){u=s=null}}}var Kp=$p,Xp=Ge.isContentEditableFalse,Yp=Ge.isContentEditableTrue;function Gp(e){var t=yt.fromDom(j.document),n=ki(t),r=function(e,t){var n=t.owner(e);return Vv(t,n)}(e,Iv),o=Hi(e),i=m(r,function(e,t){var n=Hi(t);return{left:e.left+n.left(),top:e.top+n.top()}},{left:0,top:0});return Oi(i.left+o.left()+n.left(),i.top+o.top()+n.top())}function Jp(e){return"textarea"===ie(e)}function Qp(e,t){var n=function(e){var t=e.dom().ownerDocument,n=t.body,r=t.defaultView,o=t.documentElement;if(n===e.dom())return Oi(n.offsetLeft,n.offsetTop);var i=Si(r.pageYOffset,o.scrollTop),a=Si(r.pageXOffset,o.scrollLeft),u=Si(o.clientTop,n.clientTop),s=Si(o.clientLeft,n.clientLeft);return Hi(e).translate(a-s,i-u)}(e),r=function(e){return Lv.get(e)}(e);return{element:e,bottom:n.top()+r,pos:n,cleanup:t}}function Zp(e,t){var n=function(e,t){var n=Re(e);if(0===n.length||Jp(e))return{element:e,offset:t};if(t<n.length&&!Jp(n[t]))return{element:n[t],offset:0};var r=n[n.length-1];return Jp(r)?{element:e,offset:t}:"img"===ie(r)?{element:r,offset:1}:zt(r)?{element:r,offset:Jc(r).length}:{element:r,offset:Re(r).length}}(e,t),r=yt.fromHtml('<span data-mce-bogus="all">'+cu+"</span>");return Ci(n.element,r),Qp(r,function(){return _i(r)})}function ev(e){return Qp(yt.fromDom(e),i)}function tv(n,r,o,i){Uv(n,function(e,t){return Fv(n,r,o,i)},o)}function nv(e,t,n,r){var o=yt.fromDom(e.getDoc());n(o,ki(o).top(),t,r)}function rv(e,t,n,r){var o=e.pos;if(n)Ti(o.left(),o.top(),r);else{var i=o.top()-t+(e.bottom-o.top());Ti(o.left(),i,r)}}function ov(e,t,n,r,o){r.pos.top()<t?rv(r,n,!1!==o,e):r.bottom>n+t&&rv(r,n,!0===o,e)}function iv(e,t,n,r){var o=e.dom().defaultView.innerHeight;ov(e,t,o,n,r)}function av(e,t,n,r,o){var i=t.dom().defaultView.innerHeight;ov(t,n,i,r,o);var a=Gp(r.element),u=Li(j.window);a.top()<u.y()?Ai(r.element,!1!==o):a.top()>u.bottom()&&Ai(r.element,!0===o)}function uv(e,t,n){return tv(e,d(iv),t,n)}function sv(e,t,n){return nv(e,ev(t),d(iv),n)}function cv(e,t,n){return tv(e,d(av,e),t,n)}function lv(e,t,n){return nv(e,ev(t),d(av,e),n)}function fv(e){return Ge.isContentEditableTrue(e)||Ge.isContentEditableFalse(e)}function dv(e,t){var n=(t||j.document).createDocumentFragment();return z(e,function(e){n.appendChild(e.dom())}),yt.fromDom(n)}function hv(e,t){var n=parseInt(ge(e,t),10);return isNaN(n)?1:n}function mv(e){return b(e,function(e,t){return t.cells().length>e?t.cells().length:e},0)}function gv(e,t){for(var n=e.rows(),r=0;r<n.length;r++)for(var o=n[r].cells(),i=0;i<o.length;i++)if(ze(o[i],t))return k.some(Yv(i,r));return k.none()}function pv(e,t,n,r,o){for(var i=[],a=e.rows(),u=n;u<=o;u++){var s=a[u].cells(),c=t<r?s.slice(t,r+1):s.slice(r,t+1);i.push(Xv(a[u].element(),c))}return i}function vv(e){var t=[];if(e)for(var n=0;n<e.rangeCount;n++)t.push(e.getRangeAt(n));return t}function yv(e){return y(ey(e),$n)}function bv(e){return ma(e,"td[data-mce-selected],th[data-mce-selected]")}function Cv(e,t){var n=bv(t),r=yv(e);return 0<n.length?n:r}function wv(t,n){return g(t,function(e){return"li"===ie(e)&&uh(e,n)}).fold($([]),function(e){return function(e){return g(e,function(e){return"ul"===ie(e)||"ol"===ie(e)})}(t).map(function(e){return[yt.fromTag("li"),yt.fromTag(ie(e))]}).getOr([])})}function xv(e,t){var n=yt.fromDom(t.commonAncestorContainer),r=fh(n,e),o=y(r,function(e){return Dn(e)||Ln(e)}),i=wv(r,t),a=o.concat(i.length?i:function(t){return Un(t)?Se(t).filter(Fn).fold($([]),function(e){return[t,e]}):Fn(t)?[t]:[]}(n));return X(a,ka)}function zv(){return dv([])}function Ev(e,t){return function(e,t){var n=b(t,function(e,t){return Di(t,e),t},e);return 0<t.length?dv([n]):n}(yt.fromDom(t.cloneContents()),xv(e,t))}function Nv(e,o){return function(e,t){return Ca(t,"table",d(ze,e))}(e,o[0]).bind(function(e){var t=o[0],n=o[o.length-1],r=Gv(e);return Qv(r,t,n).map(function(e){return dv([Jv(e)])})}).getOrThunk(zv)}function Sv(e,t,n){return null!==function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}(e,t,n)}function kv(e,t,n){return Sv(e,t,function(e){return e.nodeName===n})}function Tv(e){return e&&"TABLE"===e.nodeName}function Av(e,t,n){for(var r=new yi(t,e.getParent(t.parentNode,e.isBlock)||e.getRoot());t=r[n?"prev":"next"]();)if(Ge.isBr(t))return!0}function Mv(e,t,n,r,o){var i,a,u=e.getRoot(),s=e.schema.getNonEmptyElements(),c=e.getParent(o.parentNode,e.isBlock)||u;if(r&&Ge.isBr(o)&&t&&e.isEmpty(c))return k.some(Uu(o.parentNode,e.nodeIndex(o)));for(var l,f,d=new yi(o,c);a=d[r?"prev":"next"]();){if("false"===e.getContentEditableParent(a)||(f=u,Da(l=a)&&!1===Sv(l,f,rs)))return k.none();if(Ge.isText(a)&&0<a.nodeValue.length)return!1===kv(a,u,"A")?k.some(Uu(a,r?a.nodeValue.length:0)):k.none();if(e.isBlock(a)||s[a.nodeName.toLowerCase()])return k.none();i=a}return n&&i?k.some(Uu(i,0)):k.none()}function Rv(e,t,n,r){var o,i,a,u,s,c,l,f=e.getRoot(),d=!1;if(o=r[(n?"start":"end")+"Container"],i=r[(n?"start":"end")+"Offset"],c=Ge.isElement(o)&&i===o.childNodes.length,u=e.schema.getNonEmptyElements(),s=n,Da(o))return k.none();if(Ge.isElement(o)&&i>o.childNodes.length-1&&(s=!1),Ge.isDocument(o)&&(o=f,i=0),o===f){if(s&&(a=o.childNodes[0<i?i-1:0])){if(Da(a))return k.none();if(u[a.nodeName]||Tv(a))return k.none()}if(o.hasChildNodes()){if(i=Math.min(!s&&0<i?i-1:i,o.childNodes.length-1),o=o.childNodes[i],i=Ge.isText(o)&&c?o.data.length:0,!t&&o===f.lastChild&&Tv(o))return k.none();if(function(e,t){for(;t&&t!==e;){if(Ge.isContentEditableFalse(t))return!0;t=t.parentNode}return!1}(f,o)||Da(o))return k.none();if(o.hasChildNodes()&&!1===Tv(o)){var h=new yi(a=o,f);do{if(Ge.isContentEditableFalse(a)||Da(a)){d=!1;break}if(Ge.isText(a)&&0<a.nodeValue.length){i=s?0:a.nodeValue.length,o=a,d=!0;break}if(u[a.nodeName.toLowerCase()]&&(!(l=a)||!/^(TD|TH|CAPTION)$/.test(l.nodeName))){i=e.nodeIndex(a),o=a.parentNode,s||i++,d=!0;break}}while(a=s?h.next():h.prev())}}}return t&&(Ge.isText(o)&&0===i&&Mv(e,c,t,!0,o).each(function(e){o=e.container(),i=e.offset(),d=!0}),Ge.isElement(o)&&(!(a=(a=o.childNodes[i])||o.childNodes[i-1])||!Ge.isBr(a)||function(e,t){return e.previousSibling&&e.previousSibling.nodeName===t}(a,"A")||Av(e,a,!1)||Av(e,a,!0)||Mv(e,c,t,!0,a).each(function(e){o=e.container(),i=e.offset(),d=!0}))),s&&!t&&Ge.isText(o)&&i===o.nodeValue.length&&Mv(e,c,t,!1,o).each(function(e){o=e.container(),i=e.offset(),d=!0}),d?k.some(Uu(o,i)):k.none()}function Dv(e){return 0===e.dom().length?(_i(e),k.none()):k.some(e)}function _v(e,t,n,r,o){var i=n?t.startContainer:t.endContainer,a=n?t.startOffset:t.endOffset;return k.from(i).map(yt.fromDom).map(function(e){return r&&t.collapsed?e:De(e,o(e,a)).getOr(e)}).bind(function(e){return xt(e)?k.some(e):Se(e)}).map(function(e){return e.dom()}).getOr(e)}function Bv(e,t,n){return _v(e,t,!0,n,function(e,t){return Math.min(function(e){return e.dom().childNodes.length}(e),t)})}function Ov(e,t,n){return _v(e,t,!1,n,function(e,t){return 0<t?t-1:t})}function Hv(e,t){for(var n=e;e&&Ge.isText(e)&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n}function Pv(e,t,n){if(e&&e.hasOwnProperty(t)){var r=y(e[t],function(e){return e!==n});0===r.length?delete e[t]:e[t]=r}}var Lv=function CN(r,o){function e(e){var t=o(e);if(t<=0||null===t){var n=ve(e,r);return parseFloat(n)||0}return t}function i(o,e){return b(e,function(e,t){var n=ve(o,t),r=n===undefined?0:parseInt(n,10);return isNaN(r)?e:e+r},0)}return{set:function(e,t){if(!_(t)&&!t.match(/^[0-9]+$/))throw new Error(r+".set accepts only positive integer values. Value was "+t);var n=e.dom();fe(n)&&(n.style[r]=t+"px")},get:e,getOuter:e,aggregate:i,max:function(e,t,n){var r=i(e,n);return r<t?t-r:0}}}("height",function(e){var t=e.dom();return de(e)?t.getBoundingClientRect().height:t.offsetHeight}),Vv=function(r,e){return r.view(e).fold($([]),function(e){var t=r.owner(e),n=Vv(r,t);return[e].concat(n)})},Iv=/* */Object.freeze({view:function(e){return(e.dom()===j.document?k.none():k.from(e.dom().defaultView.frameElement)).map(yt.fromDom)},owner:function(e){return Ee(e)}}),Fv=function(e,t,n,r){var o=yt.fromDom(e.getBody()),i=yt.fromDom(e.getDoc());!function(e){e.dom().offsetWidth}(o);var a=ki(i).top(),u=Zp(yt.fromDom(n.startContainer),n.startOffset);t(i,a,u,r),u.cleanup()},Uv=function(e,t,n){var r=n.startContainer,o=n.startOffset,i=n.endContainer,a=n.endOffset;t(yt.fromDom(r),yt.fromDom(i));var u=e.dom.createRng();u.setStart(r,o),u.setEnd(i,a),e.selection.setRng(n)},jv=function(e,t,n){!function(e,t,n){return e.fire("ScrollIntoView",{elm:t,alignToTop:n}).isDefaultPrevented()}(e,t,n)&&(e.inline?sv:lv)(e,t,n)},qv=function(e,t,n){(e.inline?uv:cv)(e,t,n)},$v=function(e,t,n){var r,o,i=n;if(i.caretPositionFromPoint)(o=i.caretPositionFromPoint(e,t))&&((r=n.createRange()).setStart(o.offsetNode,o.offset),r.collapse(!0));else if(n.caretRangeFromPoint)r=n.caretRangeFromPoint(e,t);else if(i.body.createTextRange){r=i.body.createTextRange();try{r.moveToPoint(e,t),r.collapse(!0)}catch(a){r=function(e,n,t){var r,o,i;if(r=t.elementFromPoint(e,n),o=t.body.createTextRange(),r&&"HTML"!==r.tagName||(r=t.body),o.moveToElementText(r),0<(i=(i=Mn.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){n=(i[0].bottom+i[0].top)/2;try{return o.moveToPoint(e,n),o.collapse(!0),o}catch(a){}}return null}(e,t,n)}return function(e,t){var n=e&&e.parentElement?e.parentElement():null;return Ge.isContentEditableFalse(function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}(n,t,fv))?null:e}(r,n.body)}return r},Wv=function(n,e){return X(e,function(e){var t=n.fire("GetSelectionRange",{range:e});return t.range!==e?t.range:e})},Kv=be("element","width","rows"),Xv=be("element","cells"),Yv=be("x","y"),Gv=function(e){var o=Kv(ka(e),0,[]);return z(ma(e,"tr"),function(n,r){z(ma(n,"td,th"),function(e,t){!function(e,t,n,r,o){for(var i=hv(o,"rowspan"),a=hv(o,"colspan"),u=e.rows(),s=n;s<n+i;s++){u[s]||(u[s]=Xv(Ta(r),[]));for(var c=t;c<t+a;c++){u[s].cells()[c]=s===n&&c===t?o:ka(o)}}}(o,function(e,t,n){for(;r=t,o=n,i=void 0,((i=e.rows())[o]?i[o].cells():[])[r];)t++;var r,o,i;return t}(o,t,r),r,n,e)})}),Kv(o.element(),mv(o.rows()),o.rows())},Jv=function(e){return function(e,t){var n=ka(e.element()),r=yt.fromTag("tbody");return zi(r,t),Di(n,r),n}(e,function(e){return X(e.rows(),function(e){var t=X(e.cells(),function(e){var t=Ta(e);return pe(t,"colspan"),pe(t,"rowspan"),t}),n=ka(e.element());return zi(n,t),n})}(e))},Qv=function(n,e,r){return gv(n,e).bind(function(t){return gv(n,r).map(function(e){return function(e,t,n){var r=t.x(),o=t.y(),i=n.x(),a=n.y(),u=o<a?pv(e,r,o,i,a):pv(e,r,a,i,o);return Kv(e.element(),mv(u),u)}(n,t,e)})})},Zv=vv,ey=function(e){return v(e,function(e){var t=Wa(e);return t?[yt.fromDom(t)]:[]})},ty=function(e){return 1<vv(e).length},ny=Cv,ry=function(e){return Cv(Zv(e.selection.getSel()),yt.fromDom(e.getBody()))},oy=function(e,t){var n=ny(t,e);return 0<n.length?Nv(e,n):function(e,t){return 0<t.length&&t[0].collapsed?zv():Ev(e,t[0])}(e,t)},iy=function(e,t){if(void 0===t&&(t={}),t.get=!0,t.format=t.format||"html",t.selection=!0,(t=e.fire("BeforeGetContent",t)).isDefaultPrevented())return e.fire("GetContent",t),t.content;if("text"===t.format)return function(r){return k.from(r.selection.getRng()).map(function(e){var t=r.dom.add(r.getBody(),"div",{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},e.cloneContents()),n=lu(t.innerText);return r.dom.remove(t),n}).getOr("")}(e);t.getInner=!0;var n=function(e,t){var n,r=e.selection.getRng(),o=e.dom.create("body"),i=e.selection.getSel(),a=Wv(e,Zv(i));return(n=t.contextual?oy(yt.fromDom(e.getBody()),a).dom():r.cloneContents())&&o.appendChild(n),e.selection.serializer.serialize(o,t)}(e,t);return"tree"===t.format?n:(t.content=e.selection.isCollapsed()?"":n,e.fire("GetContent",t),t.content)},ay=function(e,t){var n=t.collapsed,r=t.cloneRange(),o=Uu.fromRangeStart(t);return Rv(e,n,!0,r).each(function(e){n&&Uu.isAbove(o,e)||r.setStart(e.container(),e.offset())}),n||Rv(e,n,!1,r).each(function(e){r.setEnd(e.container(),e.offset())}),n&&r.collapse(!0),hh(t,r)?k.none():k.some(r)},uy=function(e,t,n){if((n=function(e,t){return(e=e||{format:"html"}).set=!0,e.selection=!0,e.content=t,e}(n,t)).no_events||!(n=e.fire("BeforeSetContent",n)).isDefaultPrevented()){var r=e.selection.getRng();!function(r,e){var t=k.from(e.firstChild).map(yt.fromDom),n=k.from(e.lastChild).map(yt.fromDom);r.deleteContents(),r.insertNode(e);var o=t.bind(ke).filter(zt).bind(Dv),i=n.bind(Te).filter(zt).bind(Dv);Ya(o,t.filter(zt),function(e,t){!function(e,t){e.insertData(0,t)}(t.dom(),e.dom().data),_i(e)}),Ya(i,n.filter(zt),function(e,t){var n=t.dom().length;t.dom().appendData(e.dom().data),r.setEnd(t.dom(),n),_i(e)}),r.collapse(!1)}(r,r.createContextualFragment(n.content)),e.selection.setRng(r),qv(e,r),n.no_events||e.fire("SetContent",n)}else e.fire("SetContent",n)};function sy(e){return!!e.select}function cy(e){return!(!e||!e.ownerDocument)&&Bt(yt.fromDom(e.ownerDocument),yt.fromDom(e))}function ly(u,s,e,c){function t(e,t){return uy(c,e,t)}function r(){var e,t,n=d();return!(n&&n.anchorNode&&n.focusNode)||((e=u.createRng()).setStart(n.anchorNode,n.anchorOffset),e.collapse(!0),(t=u.createRng()).setStart(n.focusNode,n.focusOffset),t.collapse(!0),e.compareBoundaryPoints(e.START_TO_START,t)<=0)}var n,o,l,f,i=function p(i,n){var a,u;return{selectorChangedWithUnbind:function(e,t){return a||(a={},u={},n.on("NodeChange",function(e){var n=e.element,r=i.getParents(n,null,i.getRoot()),o={};Mn.each(a,function(e,n){Mn.each(r,function(t){if(i.is(t,n))return u[n]||(Mn.each(e,function(e){e(!0,{node:t,selector:n,parents:r})}),u[n]=e),o[n]=e,!1})}),Mn.each(u,function(e,t){o[t]||(delete u[t],Mn.each(e,function(e){e(!1,{node:n,selector:t,parents:r})}))})})),a[e]||(a[e]=[]),a[e].push(t),{unbind:function(){Pv(a,e,t),Pv(u,e,t)}}}}}(u,c).selectorChangedWithUnbind,a=function(e){var t=h();t.collapse(!!e),m(t)},d=function(){return s.getSelection?s.getSelection():s.document.selection},h=function(){function e(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(r){return-1}}var t,n,r,o;if(!s)return null;if(null==(o=s.document))return null;if(c.bookmark!==undefined&&!1===ud(c)){var i=Qf(c);if(i.isSome())return i.map(function(e){return Wv(c,[e])[0]}).getOr(o.createRange())}try{(t=d())&&!Ge.isRestrictedNode(t.anchorNode)&&(n=0<t.rangeCount?t.getRangeAt(0):t.createRange?t.createRange():o.createRange())}catch(a){}return(n=(n=Wv(c,[n])[0])||(o.createRange?o.createRange():o.body.createTextRange())).setStart&&9===n.startContainer.nodeType&&n.collapsed&&(r=u.getRoot(),n.setStart(r,0),n.setEnd(r,0)),l&&f&&(0===e(n.START_TO_START,n,l)&&0===e(n.END_TO_END,n,l)?n=f:f=l=null),n},m=function(e,t){var n,r;if(function(e){return!!e&&(!!sy(e)||cy(e.startContainer)&&cy(e.endContainer))}(e)){var o=sy(e)?e:null;if(o){f=null;try{o.select()}catch(i){}}else{if(n=d(),e=c.fire("SetSelectionRange",{range:e,forward:t}).range,n){f=e;try{n.removeAllRanges(),n.addRange(e)}catch(i){}!1===t&&n.extend&&(n.collapse(e.endContainer,e.endOffset),n.extend(e.startContainer,e.startOffset)),l=0<n.rangeCount?n.getRangeAt(0):null}e.collapsed||e.startContainer!==e.endContainer||!n.setBaseAndExtent||Nn.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.focusNode===e.endContainer||n.setBaseAndExtent(r,0,r,1)),c.fire("AfterSetSelectionRange",{range:e,forward:t})}}},g={bookmarkManager:null,controlSelection:null,dom:u,win:s,serializer:e,editor:c,collapse:a,setCursorLocation:function(e,t){var n=u.createRng();e?(n.setStart(e,t),n.setEnd(e,t),m(n),a(!1)):(sh(u,n,c.getBody(),!0),m(n))},getContent:function(e){return iy(c,e)},setContent:t,getBookmark:function(e,t){return n.getBookmark(e,t)},moveToBookmark:function(e){return n.moveToBookmark(e)},select:function(e,t){return function(r,e,o){return k.from(e).map(function(e){var t=r.nodeIndex(e),n=r.createRng();return n.setStart(e.parentNode,t),n.setEnd(e.parentNode,t+1),o&&(sh(r,n,e,!0),sh(r,n,e,!1)),n})}(u,e,t).each(m),e},isCollapsed:function(){var e=h(),t=d();return!(!e||e.item)&&(e.compareEndPoints?0===e.compareEndPoints("StartToEnd",e):!t||e.collapsed)},isForward:r,setNode:function(e){return t(u.getOuterHTML(e)),e},getNode:function(){return function(e,t){var n,r,o,i,a;return t?(r=t.startContainer,o=t.endContainer,i=t.startOffset,a=t.endOffset,n=t.commonAncestorContainer,!t.collapsed&&(r===o&&a-i<2&&r.hasChildNodes()&&(n=r.childNodes[i]),3===r.nodeType&&3===o.nodeType&&(r=r.length===i?Hv(r.nextSibling,!0):r.parentNode,o=0===a?Hv(o.previousSibling,!1):o.parentNode,r&&r===o))?r:n&&3===n.nodeType?n.parentNode:n):e}(c.getBody(),h())},getSel:d,setRng:m,getRng:h,getStart:function(e){return Bv(c.getBody(),h(),e)},getEnd:function(e){return Ov(c.getBody(),h(),e)},getSelectedBlocks:function(e,t){return function(e,t,n,r){var o,i,a=[];if(i=e.getRoot(),n=e.getParent(n||Bv(i,t,t.collapsed),e.isBlock),r=e.getParent(r||Ov(i,t,t.collapsed),e.isBlock),n&&n!==i&&a.push(n),n&&r&&n!==r)for(var u=new yi(o=n,i);(o=u.next())&&o!==r;)e.isBlock(o)&&a.push(o);return r&&n!==r&&r!==i&&a.push(r),a}(u,h(),e,t)},normalize:function(){var e=h(),t=d();if(ty(t)||!ch(c))return e;var n=ay(u,e);return n.each(function(e){m(e,r())}),n.getOr(e)},selectorChanged:function(e,t){return i(e,t),g},selectorChangedWithUnbind:i,getScrollContainer:function(){for(var e,t=u.getRoot();t&&"BODY"!==t.nodeName;){if(t.scrollHeight>t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e,t){return jv(c,e,t)},placeCaretAt:function(e,t){return m($v(e,t,c.getDoc()))},getBoundingClientRect:function(){var e=h();return e.collapsed?Ds.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:function(){s=l=f=null,o.destroy()}};return n=Kp(g),o=Wp(g,c),g.bookmarkManager=n,g.controlSelection=o,g}function fy(e){return Uy(e)&&e.data[0]===cu}function dy(e){return Uy(e)&&e.data[e.data.length-1]===cu}function hy(e){return e.ownerDocument.createTextNode(cu)}function my(e,t){return e?function(e){if(Uy(e.previousSibling))return dy(e.previousSibling)||e.previousSibling.appendData(cu),e.previousSibling;if(Uy(e))return fy(e)||e.insertData(0,cu),e;var t=hy(e);return e.parentNode.insertBefore(t,e),t}(t):function(e){if(Uy(e.nextSibling))return fy(e.nextSibling)||e.nextSibling.insertData(0,cu),e.nextSibling;if(Uy(e))return dy(e)||e.appendData(cu),e;var t=hy(e);return e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t),t}(t)}function gy(e,t){return Ge.isText(e.container())?my(t,e.container()):my(t,e.getNode())}function py(e,t){var n=t.get();return n&&e.container()===n&&Ra(n)}function vy(e,t){if(!t)return t;var n=t.container(),r=t.offset();return e?Ra(n)?Ge.isText(n.nextSibling)?Ds(n.nextSibling,0):Ds.after(n):Ba(t)?Ds(n,r+1):t:Ra(n)?Ge.isText(n.previousSibling)?Ds(n.previousSibling,n.previousSibling.data.length):Ds.before(n):Oa(t)?Ds(n,r-1):t}function yy(e,t){var n=bs(t,e);return n||e}function by(e,t,n){var r=Ky.normalizeForwards(n),o=yy(t,r.container());return Ky.findRootInline(e,o,r).fold(function(){return Pc.nextPosition(o,r).bind(d(Ky.findRootInline,e,o)).map(function(e){return Yy.before(e)})},k.none)}function Cy(e,t){return null===os(e,t)}function wy(e,t,n){return Ky.findRootInline(e,t,n).filter(d(Cy,t))}function xy(e,t,n){var r=Ky.normalizeBackwards(n);return wy(e,t,r).bind(function(e){return Pc.prevPosition(e,r).isNone()?k.some(Yy.start(e)):k.none()})}function zy(e,t,n){var r=Ky.normalizeForwards(n);return wy(e,t,r).bind(function(e){return Pc.nextPosition(e,r).isNone()?k.some(Yy.end(e)):k.none()})}function Ey(e,t,n){var r=Ky.normalizeBackwards(n),o=yy(t,r.container());return Ky.findRootInline(e,o,r).fold(function(){return Pc.prevPosition(o,r).bind(d(Ky.findRootInline,e,o)).map(function(e){return Yy.after(e)})},k.none)}function Ny(e){return!1===Ky.isRtl(Gy(e))}function Sy(e,t,n){return Xy([by,xy,zy,Ey],[e,t,n]).filter(Ny)}function ky(e){return e.fold($("before"),$("start"),$("end"),$("after"))}function Ty(e){return e.fold(Yy.before,Yy.before,Yy.after,Yy.after)}function Ay(n,e,r,t,o,i){return Ya(Ky.findRootInline(e,r,t),Ky.findRootInline(e,r,o),function(e,t){return e!==t&&Ky.hasSameParentBlock(r,e,t)?Yy.after(n?e:t):i}).getOr(i)}function My(e,t){return e.fold($(!0),function(e){return!function(e,t){return ky(e)===ky(t)&&Gy(e)===Gy(t)}(e,t)})}function Ry(e,t){return e?t.fold(q(k.some,Yy.start),k.none,q(k.some,Yy.after),k.none):t.fold(k.none,q(k.some,Yy.before),k.none,q(k.some,Yy.end))}function Dy(e,t,n,r){var o=Ky.normalizePosition(e,r),i=Sy(t,n,o);return Sy(t,n,o).bind(d(Ry,e)).orThunk(function(){return function(t,n,r,o,e){var i=Ky.normalizePosition(t,e);return Pc.fromPosition(t,r,i).map(d(Ky.normalizePosition,t)).fold(function(){return o.map(Ty)},function(e){return Sy(n,r,e).map(d(Ay,t,n,r,i,e)).filter(d(My,o))}).filter(Ny)}(e,t,n,i,r)})}function _y(e){return D(e.selection.getSel().modify)}function By(e,t,n){var r=e?1:-1;return t.setRng(Ds(n.container(),n.offset()+r).toRange()),t.getSel().modify("move",e?"forward":"backward","word"),!0}function Oy(e,t){var n=e.dom.createRng();n.setStart(t.container(),t.offset()),n.setEnd(t.container(),t.offset()),e.selection.setRng(n)}function Hy(e){return!1!==e.settings.inline_boundaries}function Py(e,t){e?t.setAttribute("data-mce-selected","inline-boundary"):t.removeAttribute("data-mce-selected")}function Ly(t,e,n){return $y(e,n).map(function(e){return Oy(t,e),n})}function Vy(e,t,n){return function(){return!!Hy(t)&&tb(e,t)}}var Iy,Fy,Uy=Ge.isText,jy=d(my,!0),qy=d(my,!1),$y=function(n,e){return e.fold(function(e){qs.remove(n.get());var t=jy(e);return n.set(t),k.some(Ds(t,t.length-1))},function(e){return Pc.firstPositionIn(e).map(function(e){if(py(e,n))return Ds(n.get(),1);qs.remove(n.get());var t=gy(e,!0);return n.set(t),Ds(t,1)})},function(e){return Pc.lastPositionIn(e).map(function(e){if(py(e,n))return Ds(n.get(),n.get().length-1);qs.remove(n.get());var t=gy(e,!1);return n.set(t),Ds(t,t.length-1)})},function(e){qs.remove(n.get());var t=qy(e);return n.set(t),k.some(Ds(t,1))})},Wy=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,Ky={isInlineTarget:function(e,t){return we(yt.fromDom(t),If(e))},findRootInline:function(e,t,n){var r=function(e,t,n){return y(Xi.DOM.getParents(n.container(),"*",t),e)}(e,t,n);return k.from(r[r.length-1])},isRtl:function(e){return"rtl"===Xi.DOM.getStyle(e,"direction",!0)||function(e){return Wy.test(e)}(e.textContent)},isAtZwsp:function(e){return Ba(e)||Oa(e)},normalizePosition:vy,normalizeForwards:d(vy,!0),normalizeBackwards:d(vy,!1),hasSameParentBlock:function(e,t,n){var r=bs(t,e),o=bs(n,e);return r&&r===o}},Xy=function(e,t){for(var n=0;n<e.length;n++){var r=e[n].apply(null,t);if(r.isSome())return r}return k.none()},Yy=jf([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),Gy=function(e){return e.fold(W,W,W,W)},Jy=Sy,Qy=Dy,Zy=(d(Dy,!1),d(Dy,!0),Ty),eb=function(e){return e.fold(Yy.start,Yy.start,Yy.end,Yy.end)},tb=function(e,t){var n=t.selection.getRng(),r=e?Ds.fromRangeEnd(n):Ds.fromRangeStart(n);return!!_y(t)&&(e&&Ba(r)?By(!0,t.selection,r):!(e||!Oa(r))&&By(!1,t.selection,r))},nb={move:function(e,t,n){return function(){return!!Hy(e)&&function(t,n,e){var r=t.getBody(),o=Ds.fromRangeStart(t.selection.getRng()),i=d(Ky.isInlineTarget,t);return Qy(e,i,r,o).bind(function(e){return Ly(t,n,e)})}(e,t,n).isSome()}},moveNextWord:d(Vy,!0),movePrevWord:d(Vy,!1),setupSelectedState:function(t){var n=Je(null),r=d(Ky.isInlineTarget,t);return t.on("NodeChange",function(e){Hy(t)&&(function(e,t,n){var r=y(t.select('*[data-mce-selected="inline-boundary"]'),e),o=y(n,e);z(x(r,o),d(Py,!1)),z(x(o,r),d(Py,!0))}(r,t.dom,e.parents),function(e,t){if(e.selection.isCollapsed()&&!0!==e.composing&&t.get()){var n=Ds.fromRangeStart(e.selection.getRng());Ds.isTextPosition(n)&&!1===Ky.isAtZwsp(n)&&(Oy(e,qs.removeAndReposition(t.get(),n)),t.set(null))}}(t,n),function(n,r,o,e){if(r.selection.isCollapsed()){var t=y(e,n);z(t,function(e){var t=Ds.fromRangeStart(r.selection.getRng());Jy(n,r.getBody(),t).bind(function(e){return Ly(r,o,e)})})}}(r,t,n,e.parents))}),n},setCaretPosition:Oy};(Fy=Iy=Iy||{})[Fy.Br=0]="Br",Fy[Fy.Block=1]="Block",Fy[Fy.Wrap=2]="Wrap",Fy[Fy.Eol=3]="Eol";function rb(e,t){return e===Ms.Backwards?t.reverse():t}function ob(e,t,n,r){for(var o,i,a,u,s,c,l=rc(n),f=r,d=[];f&&(s=l,c=f,o=t===Ms.Forwards?s.next(c):s.prev(c));){if(Ge.isBr(o.getNode(!1)))return t===Ms.Forwards?{positions:rb(t,d).concat([o]),breakType:Iy.Br,breakAt:k.some(o)}:{positions:rb(t,d),breakType:Iy.Br,breakAt:k.some(o)};if(o.isVisible()){if(e(f,o)){var h=(i=t,a=f,u=o,Ge.isBr(u.getNode(i===Ms.Forwards))?Iy.Br:!1===Cs(a,u)?Iy.Block:Iy.Wrap);return{positions:rb(t,d),breakType:h,breakAt:k.some(o)}}d.push(o),f=o}else f=o}return{positions:rb(t,d),breakType:Iy.Eol,breakAt:k.none()}}function ib(n,r,o,e){return r(o,e).breakAt.map(function(e){var t=r(o,e).positions;return n===Ms.Backwards?t.concat(e):[e].concat(t)}).getOr([])}function ab(e,i){return b(e,function(e,o){return e.fold(function(){return k.some(o)},function(r){return Ya(E(r.getClientRects()),E(o.getClientRects()),function(e,t){var n=Math.abs(i-e.left);return Math.abs(i-t.left)<=n?o:r}).or(e)})},k.none())}function ub(t,e){return E(e.getClientRects()).bind(function(e){return ab(t,e.left)})}function sb(e,t,n,r){var o=e===Ms.Forwards,i=o?Ph:Lh;if(!r.collapsed){var a=bx(r);if(yx(a))return Zh(e,t,a,e===Ms.Backwards,!0)}var u=function(e){return Ma(e.startContainer)}(r),s=Ss(e,t.getBody(),r);if(i(s))return em(t,s.getNode(!o));var c=Ky.normalizePosition(o,n(s));if(!c)return u?r:null;if(i(c))return Zh(e,t,c.getNode(!o),o,!0);var l=n(c);return l&&i(l)&&As(c,l)?Zh(e,t,l.getNode(!o),o,!0):u?nm(t,c.toRange(),!0):null}function cb(e,t,n,r){var o,i,a,u,s,c,l,f,d;if(d=bx(r),o=Ss(e,t.getBody(),r),i=n(t.getBody(),Ih(1),o),a=y(i,Fh(1)),s=kn.last(o.getClientRects()),(Ph(o)||Oh(o))&&(d=o.getNode()),(Lh(o)||Hh(o))&&(d=o.getNode(!0)),!s)return null;if(c=s.left,(u=$h(a,c))&&yx(u.node))return l=Math.abs(c-u.left),f=Math.abs(c-u.right),Zh(e,t,u.node,l<f,!0);if(d){var h=function(e,t,n,r){function o(e){return kn.last(e.getClientRects())}var i,a,u,s,c,l,f=rc(t),d=[],h=0;l=o(s=1===e?(i=f.next,a=qa,u=ja,Ds.after(r)):(i=f.prev,a=ja,u=qa,Ds.before(r)));do{if(s.isVisible()&&!u(c=o(s),l)){if(0<d.length&&a(c,kn.last(d))&&h++,(c=Ia(c)).position=s,c.line=h,n(c))return d;d.push(c)}}while(s=i(s));return d}(e,t.getBody(),Ih(1),d);if(u=$h(y(h,Fh(1)),c))return nm(t,u.position.toRange(),!0);if(u=kn.last(y(h,Fh(0))))return nm(t,u.position.toRange(),!0)}}function lb(e,t,n){var r,o,i=rc(e.getBody()),a=d(Ts,i.next),u=d(Ts,i.prev);if(n.collapsed&&e.settings.forced_root_block){if(!(r=e.dom.getParent(n.startContainer,"PRE")))return;(1===t?a(Ds.fromRangeStart(n)):u(Ds.fromRangeStart(n)))||(o=function(e){var t=e.dom.create(mf(e));return(!Nn.ie||11<=Nn.ie)&&(t.innerHTML='<br data-mce-bogus="1">'),t}(e),1===t?e.$(r).after(o):e.$(r).before(o),e.selection.select(o,!0),e.selection.collapse())}}function fb(t,n){return function(){var e=function(e,t){var n,r=rc(e.getBody()),o=d(Ts,r.next),i=d(Ts,r.prev),a=t?Ms.Forwards:Ms.Backwards,u=t?o:i,s=e.selection.getRng();return(n=sb(a,e,u,s))?n:(n=lb(e,a,s))||null}(t,n);return!!e&&(t.selection.setRng(e),!0)}}function db(t,n){return function(){var e=function(e,t){var n,r=t?1:-1,o=t?Xm:Km,i=e.selection.getRng();return(n=cb(r,e,o,i))?n:(n=lb(e,r,i))||null}(t,n);return!!e&&(t.selection.setRng(e),!0)}}function hb(n,r){return function(){var e=r?Ds.fromRangeEnd(n.selection.getRng()):Ds.fromRangeStart(n.selection.getRng()),t=r?gx(n.getBody(),e):mx(n.getBody(),e);return(r?N(t.positions):E(t.positions)).filter(function(t){return function(e){return t?Lh(e):Ph(e)}}(r)).fold($(!1),function(e){return n.selection.setRng(e.toRange()),!0})}}function mb(e,t,n,r,o){var i=ma(yt.fromDom(n),"td,th,caption").map(function(e){return e.dom()});return function(e,o,i){return b(e,function(e,r){return e.fold(function(){return k.some(r)},function(e){var t=Math.sqrt(Math.abs(e.x-o)+Math.abs(e.y-i)),n=Math.sqrt(Math.abs(r.x-o)+Math.abs(r.y-i));return k.some(n<t?r:e)})},k.none())}(y(function(n,e){return v(e,function(e){var t=function(e,t){return{left:e.left-t,top:e.top-t,right:e.right+2*t,bottom:e.bottom+2*t,width:e.width+t,height:e.height+t}}(Ia(e.getBoundingClientRect()),-1);return[{x:t.left,y:n(t),cell:e},{x:t.right,y:n(t),cell:e}]})}(e,i),function(e){return t(e,o)}),r,o).map(function(e){return e.cell})}function gb(t,n){return E(n.getClientRects()).bind(function(e){return Cx(t,e.left,e.top)}).bind(function(e){return ub(function(t){return Pc.lastPositionIn(t).map(function(e){return mx(t,e).positions.concat(e)}).getOr([])}(e),n)})}function pb(t,n){return N(n.getClientRects()).bind(function(e){return wx(t,e.left,e.top)}).bind(function(e){return ub(function(t){return Pc.firstPositionIn(t).map(function(e){return[e].concat(gx(t,e).positions)}).getOr([])}(e),n)})}function vb(e,t){e.selection.setRng(t),qv(e,t)}function yb(e,t,n){var r=e(t,n);return function(e){return e.breakType===Iy.Wrap&&0===e.positions.length}(r)||!Ge.isBr(n.getNode())&&function(e){return e.breakType===Iy.Br&&1===e.positions.length}(r)?!function(t,n,e){return e.breakAt.map(function(e){return t(n,e).breakAt.isSome()}).getOr(!1)}(e,t,r):r.breakAt.isNone()}function bb(e,t,n,r){var o=e.selection.getRng(),i=t?1:-1;if(hs()&&function(e,t,n){var r=Ds.fromRangeStart(t);return Pc.positionIn(!e,n).map(function(e){return e.isEqual(r)}).getOr(!1)}(t,o,n)){var a=Zh(i,e,n,!t,!0);return vb(e,a),!0}return!1}function Cb(e,t){var n=t.getNode(e);return Ge.isElement(n)&&"TABLE"===n.nodeName?k.some(n):k.none()}function wb(n,r,o){var e=Cb(!!r,o),i=!1===r;e.fold(function(){return vb(n,o.toRange())},function(t){return Pc.positionIn(i,n.getBody()).filter(function(e){return e.isEqual(o)}).fold(function(){return vb(n,o.toRange())},function(e){return function(n,r,o,e){var i=mf(r);i?r.undoManager.transact(function(){var e=yt.fromTag(i);me(e,gf(r)),Di(e,yt.fromTag("br")),n?wi(yt.fromDom(o),e):Ci(yt.fromDom(o),e);var t=r.dom.createRng();t.setStart(e.dom(),0),t.setEnd(e.dom(),0),vb(r,t)}):vb(r,e.toRange())}(r,n,t,o)})})}function xb(e,t,n,r){var o=e.selection.getRng(),i=Ds.fromRangeStart(o),a=e.getBody();if(!t&&xx(r,i)){var u=function(t,n,e){return gb(n,e).orThunk(function(){return E(e.getClientRects()).bind(function(e){return ab(px(t,Ds.before(n)),e.left)})}).getOr(Ds.before(n))}(a,n,i);return wb(e,t,u),!0}if(t&&zx(r,i)){u=function(t,n,e){return pb(n,e).orThunk(function(){return E(e.getClientRects()).bind(function(e){return ab(vx(t,Ds.after(n)),e.left)})}).getOr(Ds.after(n))}(a,n,i);return wb(e,t,u),!0}return!1}function zb(t,n){return function(){return k.from(t.dom.getParent(t.selection.getNode(),"td,th")).bind(function(e){return k.from(t.dom.getParent(e,"table")).map(function(e){return bb(t,n,e)})}).getOr(!1)}}function Eb(n,r){return function(){return k.from(n.dom.getParent(n.selection.getNode(),"td,th")).bind(function(t){return k.from(n.dom.getParent(t,"table")).map(function(e){return xb(n,r,e,t)})}).getOr(!1)}}function Nb(e){return h(["figcaption"],ie(e))}function Sb(e){var t=j.document.createRange();return t.setStartBefore(e.dom()),t.setEndBefore(e.dom()),t}function kb(e,t,n){n?Di(e,t):xi(e,t)}function Tb(e,t,n,r){return""===t?function(e,t){var n=yt.fromTag("br");return kb(e,n,t),Sb(n)}(e,r):function(e,t,n,r){var o=yt.fromTag(n),i=yt.fromTag("br");return me(o,r),Di(o,i),kb(e,o,t),Sb(i)}(e,r,t,n)}function Ab(e,t,n){return t?function(e,t){return gx(e,t).breakAt.isNone()}(e.dom(),n):function(e,t){return mx(e,t).breakAt.isNone()}(e.dom(),n)}function Mb(t,n){var r=yt.fromDom(t.getBody()),o=Ds.fromRangeStart(t.selection.getRng()),i=mf(t),a=gf(t);return function(e,t){var n=d(ze,t);return ba(yt.fromDom(e.container()),Vn,n).filter(Nb)}(o,r).exists(function(){if(Ab(r,n,o)){var e=Tb(r,i,a,n);return t.selection.setRng(e),!0}return!1})}function Rb(e,t){return function(){return!!e.selection.isCollapsed()&&Mb(e,t)}}function Db(e,t){return v(function(e){return X(e,function(e){return bd({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:i},e)})}(e),function(e){return function(e,t){return t.keyCode===e.keyCode&&t.shiftKey===e.shiftKey&&t.altKey===e.altKey&&t.ctrlKey===e.ctrlKey&&t.metaKey===e.metaKey}(e,t)?[e]:[]})}function _b(e,t){return{from:$(e),to:$(t)}}function Bb(e,t){var n=yt.fromDom(e),r=yt.fromDom(t.container());return kx(n,r).map(function(e){return function(e,t){return{block:$(e),position:$(t)}}(e,t)})}function Ob(t,n,e){var r=Bb(t,Ds.fromRangeStart(e)),o=r.bind(function(e){return Pc.fromPosition(n,t,e.position()).bind(function(e){return Bb(t,e).map(function(e){return function(t,n,r){return Ge.isBr(r.position().getNode())&&!1===kg(r.block())?Pc.positionIn(!1,r.block().dom()).bind(function(e){return e.isEqual(r.position())?Pc.fromPosition(n,t,e).bind(function(e){return Bb(t,e)}):k.some(r)}).getOr(r):r}(t,n,e)})})});return Ya(r,o,_b).filter(function(e){return function(e){return!1===ze(e.from().block(),e.to().block())}(e)&&function(e){return Se(e.from().block()).bind(function(t){return Se(e.to().block()).filter(function(e){return ze(t,e)})}).isSome()}(e)&&function(e){return!1===Ge.isContentEditableFalse(e.from().block().dom())&&!1===Ge.isContentEditableFalse(e.to().block().dom())}(e)})}function Hb(e){var t=function(e){var t=Re(e);return p(t,Vn).fold(function(){return t},function(e){return t.slice(0,e)})}(e);return z(t,_i),t}function Pb(e,t){var n=fh(t,e);return g(n.reverse(),kg).each(_i)}function Lb(e,t,n,r){if(kg(n))return bg(n),Pc.firstPositionIn(n.dom());(function(e){return 0===y(Ae(e),function(e){return!kg(e)}).length})(r)&&kg(t)&&Ci(r,yt.fromTag("br"));var o=Pc.prevPosition(n.dom(),Ds.before(r.dom()));return z(Hb(t),function(e){Ci(r,e)}),Pb(e,t),o}function Vb(e,t,n){if(kg(n))return _i(n),kg(t)&&bg(t),Pc.firstPositionIn(t.dom());var r=Pc.lastPositionIn(n.dom());return z(Hb(t),function(e){Di(n,e)}),Pb(e,t),r}function Ib(e,t){return Bt(t,e)?function(e,t){var n=fh(t,e);return k.from(n[n.length-1])}(t,e):k.none()}function Fb(e,t){Pc.positionIn(e,t.dom()).map(function(e){return e.getNode()}).map(yt.fromDom).filter(_n).each(_i)}function Ub(e,t,n){return Fb(!0,t),Fb(!1,n),Ib(t,n).fold(d(Vb,e,t,n),d(Lb,e,t,n))}function jb(e,t){var n=yt.fromDom(t),r=d(ze,e);return ya(n,$n,r).isSome()}function qb(e,t){var n=Pc.prevPosition(e.dom(),Ds.fromRangeStart(t)).isNone(),r=Pc.nextPosition(e.dom(),Ds.fromRangeEnd(t)).isNone();return!function(e,t){return jb(e,t.startContainer)||jb(e,t.endContainer)}(e,t)&&n&&r}function $b(e){var t=yt.fromDom(e.getBody()),n=e.selection.getRng();return qb(t,n)?function(e){return e.setContent(""),e.selection.setCursorLocation(),!0}(e):function(n,r){var o=r.getRng();return Ya(kx(n,yt.fromDom(o.startContainer)),kx(n,yt.fromDom(o.endContainer)),function(e,t){return!1===ze(e,t)&&(o.deleteContents(),Rx(n,!0,e,t).each(function(e){r.setRng(e.toRange())}),!0)}).getOr(!1)}(t,e.selection)}function Wb(e){return ks(e).exists(_n)}function Kb(e,t,n){var r=y(fh(yt.fromDom(n.container()),t),Vn),o=E(r).getOr(t);return Pc.fromPosition(e,o.dom(),n).filter(Wb)}function Xb(e,t){return ks(t).exists(_n)||Kb(!0,e,t).isSome()}function Yb(e,t){return function(e){return k.from(e.getNode(!0)).map(yt.fromDom)}(t).exists(_n)||Kb(!1,e,t).isSome()}function Gb(e,t,n,r){var o=r.getNode(!1===t);return kx(yt.fromDom(e),yt.fromDom(n.getNode())).map(function(e){return kg(e)?Hx.remove(e.dom()):Hx.moveToElement(o)}).orThunk(function(){return k.some(Hx.moveToElement(o))})}function Jb(t,n,r){return Pc.fromPosition(n,t,r).bind(function(e){return function(e){return $n(yt.fromDom(e))||Un(yt.fromDom(e))}(e.getNode())?k.none():function(t,e,n,r){function o(e){return Dn(yt.fromDom(e))&&!Cs(n,r,t)}return Ns(!e,n).fold(function(){return Ns(e,r).fold($(!1),o)},o)}(t,n,r,e)?k.none():n&&Ge.isContentEditableFalse(e.getNode())?Gb(t,n,r,e):!1===n&&Ge.isContentEditableFalse(e.getNode(!0))?Gb(t,n,r,e):n&&Lh(r)?k.some(Hx.moveToPosition(e)):!1===n&&Ph(r)?k.some(Hx.moveToPosition(e)):k.none()})}function Qb(t,e,n){return function(e,t){var n=t.getNode(!1===e),r=e?"after":"before";return Ge.isElement(n)&&n.getAttribute("data-mce-caret")===r}(e,n)?function(e,t){return e&&Ge.isContentEditableFalse(t.nextSibling)?k.some(Hx.moveToElement(t.nextSibling)):!1===e&&Ge.isContentEditableFalse(t.previousSibling)?k.some(Hx.moveToElement(t.previousSibling)):k.none()}(e,n.getNode(!1===e)).fold(function(){return Jb(t,e,n)},k.some):Jb(t,e,n).bind(function(e){return function(t,n,e){return e.fold(function(e){return k.some(Hx.remove(e))},function(e){return k.some(Hx.moveToElement(e))},function(e){return Cs(n,e,t)?k.none():k.some(Hx.moveToPosition(e))})}(t,n,e)})}function Zb(e,t){return k.from(Px(e.getBody(),t))}function eC(t,n){var e=t.selection.getNode();return Zb(t,e).filter(Ge.isContentEditableFalse).fold(function(){return function(e,t,n){var r=Es(t?1:-1,e,n),o=Ds.fromRangeStart(r),i=yt.fromDom(e);return!1===t&&Lh(o)?k.some(Hx.remove(o.getNode(!0))):t&&Ph(o)?k.some(Hx.remove(o.getNode())):!1===t&&Ph(o)&&Yb(i,o)?Bx(i,o).map(function(e){return Hx.remove(e.getNode())}):t&&Lh(o)&&Xb(i,o)?Ox(i,o).map(function(e){return Hx.remove(e.getNode())}):Qb(e,t,o)}(t.getBody(),n,t.selection.getRng()).map(function(e){return e.fold(function(t,n){return function(e){return t._selectionOverrides.hideFakeCaret(),Tg(t,n,yt.fromDom(e)),!0}}(t,n),function(n,r){return function(e){var t=r?Ds.before(e):Ds.after(e);return n.selection.setRng(t.toRange()),!0}}(t,n),function(t){return function(e){return t.selection.setRng(e.toRange()),!0}}(t))}).getOr(!1)},function(){return!0})}function tC(e,t){var n=e.selection.getNode();return!!Ge.isContentEditableFalse(n)&&Zb(e,n.parentNode).filter(Ge.isContentEditableFalse).fold(function(){return function(e){z(ma(e,".mce-offscreen-selection"),_i)}(yt.fromDom(e.getBody())),Tg(e,t,yt.fromDom(e.selection.getNode())),Tx(e),!0},function(){return!0})}function nC(e,t,n,r,o,i){var a=Zh(r,e,i.getNode(!o),o,!0);if(t.collapsed){var u=t.cloneRange();o?u.setEnd(a.startContainer,a.startOffset):u.setStart(a.endContainer,a.endOffset),u.deleteContents()}else t.deleteContents();return e.selection.setRng(a),function(e,t){Ge.isText(t)&&0===t.data.length&&e.remove(t)}(e.dom,n),!0}function rC(t,n){return function(e){return $y(n,e).map(function(e){return nb.setCaretPosition(t,e),!0}).getOr(!1)}}function oC(e,t,n,r){var o=e.getBody(),i=d(Ky.isInlineTarget,e);e.undoManager.ignore(function(){e.selection.setRng(function(e,t){var n=j.document.createRange();return n.setStart(e.container(),e.offset()),n.setEnd(t.container(),t.offset()),n}(n,r)),e.execCommand("Delete"),Jy(i,o,Ds.fromRangeStart(e.selection.getRng())).map(eb).map(rC(e,t))}),e.nodeChanged()}function iC(n,r,o,i){var a=function(e,t){var n=bs(t,e);return n||e}(n.getBody(),i.container()),u=d(Ky.isInlineTarget,n),s=Jy(u,a,i);return s.bind(function(e){return o?e.fold($(k.some(eb(e))),k.none,$(k.some(Zy(e))),k.none):e.fold(k.none,$(k.some(Zy(e))),k.none,$(k.some(eb(e))))}).map(rC(n,r)).getOrThunk(function(){var t=Pc.navigate(o,a,i),e=t.bind(function(e){return Jy(u,a,e)});return s.isSome()&&e.isSome()?Ky.findRootInline(u,a,i).map(function(e){return!!function(o){return Ya(Pc.firstPositionIn(o),Pc.lastPositionIn(o),function(e,t){var n=Ky.normalizePosition(!0,e),r=Ky.normalizePosition(!1,t);return Pc.nextPosition(o,n).map(function(e){return e.isEqual(r)}).getOr(!0)}).getOr(!0)}(e)&&(Tg(n,o,yt.fromDom(e)),!0)}).getOr(!1):e.bind(function(e){return t.map(function(e){return o?oC(n,r,i,e):oC(n,r,e,i),!0})}).getOr(!1)})}function aC(e){return 1===Re(e).length}function uC(e,t,n,r){var o=d(qm,t),i=X(y(r,o),function(e){return e.dom()});if(0===i.length)Tg(t,e,n);else{var a=function(e,t){var n=Pm(!1),r=Um(t,n.dom());return Ci(yt.fromDom(e),n),_i(yt.fromDom(e)),Ds(r,0)}(n.dom(),i);t.selection.setRng(a.toRange())}}function sC(n,r){var e=yt.fromDom(n.getBody()),t=yt.fromDom(n.selection.getStart()),o=y(function(e,t){var n=fh(t,e);return p(n,Vn).fold($(n),function(e){return n.slice(0,e)})}(e,t),aC);return N(o).map(function(e){var t=Ds.fromRangeStart(n.selection.getRng());return!(!Ax(r,t,e.dom())||function(e){return rs(e.dom())&&Om(e.dom())}(e))&&(uC(r,n,e,o),!0)}).getOr(!1)}function cC(e,t){return{start:$(e),end:$(t)}}function lC(e,t){return xa(yt.fromDom(e),"td,th",t)}function fC(e,t){return Ca(e,"table",t)}function dC(e){return!1===ze(e.start(),e.end())}function hC(e,n){return fC(e.start(),n).bind(function(t){return fC(e.end(),n).bind(function(e){return function(e,t){return e?k.some(t):k.none()}(ze(t,e),t)})})}function mC(e){return ma(e,"td,th")}function gC(n,e){var t=lC(e.startContainer,n),r=lC(e.endContainer,n);return e.collapsed?k.none():Ya(t,r,cC).fold(function(){return t.fold(function(){return r.bind(function(t){return fC(t,n).bind(function(e){return E(mC(e)).map(function(e){return cC(e,t)})})})},function(t){return fC(t,n).bind(function(e){return N(mC(e)).map(function(e){return cC(t,e)})})})},function(e){return qx(n,e)?k.none():function(t,e){return fC(t.start(),e).bind(function(e){return N(mC(e)).map(function(e){return cC(t.start(),e)})})}(e,n)})}function pC(t,e){return hC(t,e).map(function(e){return function(e,t,n){return{rng:$(e),table:$(t),cells:$(n)}}(t,e,mC(e))})}function vC(e,t){var n=function(t){return function(e){return ze(t,e)}}(e);return function(e,t){var n=lC(e.startContainer,t),r=lC(e.endContainer,t);return Ya(n,r,cC).filter(dC).filter(function(e){return qx(t,e)}).orThunk(function(){return gC(t,e)})}(t,n).bind(function(e){return pC(e,n)})}function yC(e,t){return p(e,function(e){return ze(e,t)})}function bC(n){return function(n){return Ya(yC(n.cells(),n.rng().start()),yC(n.cells(),n.rng().end()),function(e,t){return n.cells().slice(e,t+1)})}(n).map(function(e){var t=n.cells();return e.length===t.length?jx.removeTable(n.table()):jx.emptyCells(e)})}function CC(e,t){return z(t,bg),e.selection.setCursorLocation(t[0].dom(),0),!0}function wC(e,t){return Tg(e,!1,t),!0}function xC(t,e,n){return function(e,t){return vC(e,t).bind(bC)}(e,n).map(function(e){return e.fold(d(wC,t),d(CC,t))})}function zC(t,e,n,r){return $x(e,r).fold(function(){return xC(t,e,n)},function(e){return function(e,t){return Wx(e,t)}(t,e)}).getOr(!1)}function EC(e,t){return g(fh(t,e),$n)}function NC(t,n,r,o,i){return Pc.navigate(r,t.getBody(),i).bind(function(e){return function(e,n,r,o){return Pc.firstPositionIn(e.dom()).bind(function(t){return Pc.lastPositionIn(e.dom()).map(function(e){return n?r.isEqual(t)&&o.isEqual(e):r.isEqual(e)&&o.isEqual(t)})}).getOr(!0)}(o,r,i,e)?function(e,t){return Wx(e,t)}(t,o):function(e,t,n){return $x(e,yt.fromDom(n.getNode())).map(function(e){return!1===ze(e,t)})}(n,o,e)}).or(k.some(!0))}function SC(t,n,r,e){var o=Ds.fromRangeStart(t.selection.getRng());return EC(r,e).bind(function(e){return kg(e)?Wx(t,e):function(e,t,n,r,o){return Pc.navigate(n,e.getBody(),o).bind(function(e){return EC(t,yt.fromDom(e.getNode())).map(function(e){return!1===ze(e,r)})})}(t,r,n,e,o)}).getOr(!1)}function kC(e,t){return e?Oh(t):Hh(t)}function TC(t,n,e){var r=yt.fromDom(t.getBody());return $x(r,e).fold(function(){return SC(t,n,r,e)||function(e,t){var n=Ds.fromRangeStart(e.selection.getRng());return kC(t,n)||Pc.fromPosition(t,e.getBody(),n).map(function(e){return kC(t,e)}).getOr(!1)}(t,n)},function(e){return function(e,t,n,r){var o=Ds.fromRangeStart(e.selection.getRng());return kg(r)?Wx(e,r):NC(e,n,t,r,o)}(t,n,r,e).getOr(!1)})}function AC(e){var t=parseInt(e,10);return isNaN(t)?0:t}function MC(e,t){return(e||function(e){return"table"===ie(e)}(t)?"margin":"padding")+("rtl"===ve(t,"direction")?"-right":"-left")}function RC(e){var t=Yx(e);return!0!==e.readonly&&(1<t.length||function(r,e){return w(e,function(e){var t=MC(Hf(r),e),n=ye(e,t).map(AC).getOr(0);return"false"!==r.dom.getContentEditable(e.dom())&&0<n})}(e,t))}function DC(e){return Fn(e)||Un(e)}function _C(e,t){var n=e.dom,r=e.selection,o=e.formatter,i=Pf(e),a=/[a-z%]+$/i.exec(i)[0],u=parseInt(i,10),s=Hf(e),c=mf(e);e.queryCommandState("InsertUnorderedList")||e.queryCommandState("InsertOrderedList")||""!==c||n.getParent(r.getNode(),n.isBlock)||o.apply("div"),z(Yx(e),function(e){!function(e,t,n,r,o,i){var a=MC(n,yt.fromDom(i));if("outdent"===t){var u=Math.max(0,AC(i.style[a])-r);e.setStyle(i,a,u?u+o:"")}else{u=AC(i.style[a])+r+o;e.setStyle(i,a,u)}}(n,t,s,u,a,e.dom())})}function BC(e,t,n){return Pc.navigateIgnore(e,t,n,wh)}function OC(e,t){return g(fh(yt.fromDom(t.container()),e),Vn)}function HC(e,n,r){return BC(e,n.dom(),r).forall(function(t){return OC(n,r).fold(function(){return!1===Cs(t,r,n.dom())},function(e){return!1===Cs(t,r,n.dom())&&Bt(e,yt.fromDom(t.container()))})})}function PC(t,n,r){return OC(n,r).fold(function(){return BC(t,n.dom(),r).forall(function(e){return!1===Cs(e,r,n.dom())})},function(e){return BC(t,e.dom(),r).isNone()})}function LC(e){return k.from(e.dom.getParent(e.selection.getStart(!0),e.dom.isBlock))}function VC(e,t){return e&&e.parentNode&&e.parentNode.nodeName===t}function IC(e){return e&&/^(OL|UL|LI)$/.test(e.nodeName)}function FC(e){var t=e.parentNode;return/^(LI|DT|DD)$/.test(t.nodeName)?t:e}function UC(e,t,n){for(var r=e[n?"firstChild":"lastChild"];r&&!Ge.isElement(r);)r=r[n?"nextSibling":"previousSibling"];return r===t}function jC(e){e.innerHTML='<br data-mce-bogus="1">'}function qC(e,t){return e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t}function $C(e,t){return t&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&!/^(fixed|absolute)/i.test(t.style.position)&&"true"!==e.getContentEditable(t)}function WC(e,t,n){return!1===Ge.isText(t)?n:e?1===n&&t.data.charAt(n-1)===cu?0:n:n===t.data.length-1&&t.data.charAt(n)===cu?t.data.length:n}function KC(e,t){var n,r,o=e.getRoot();for(n=t;n!==o&&"false"!==e.getContentEditable(n);)"true"===e.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o}function XC(e,t){var n=mf(e);n&&n.toLowerCase()===t.tagName.toLowerCase()&&e.dom.setAttribs(t,gf(e))}function YC(e,t,n){var r=e.create("span",{},"&nbsp;");n.parentNode.insertBefore(r,n),t.scrollIntoView(r),e.remove(r)}function GC(e,t,n,r){var o=e.createRng();r?(o.setStartBefore(n),o.setEndBefore(n)):(o.setStartAfter(n),o.setEndAfter(n)),t.setRng(o)}function JC(e,t){var n,r,o=e.selection,i=e.dom,a=o.getRng();ay(i,a).each(function(e){a.setStart(e.startContainer,e.startOffset),a.setEnd(e.endContainer,e.endOffset)});var u=a.startOffset,s=a.startContainer;if(1===s.nodeType&&s.hasChildNodes()){var c=u>s.childNodes.length-1;s=s.childNodes[Math.min(u,s.childNodes.length-1)]||s,u=c&&3===s.nodeType?s.nodeValue.length:0}var l=i.getParent(s,i.isBlock),f=l?i.getParent(l.parentNode,i.isBlock):null,d=f?f.nodeName.toUpperCase():"",h=!(!t||!t.ctrlKey);"LI"!==d||h||(l=f),s&&3===s.nodeType&&u>=s.nodeValue.length&&!function(e,t,n){for(var r,o=new yi(t,n),i=e.getNonEmptyElements();r=o.next();)if(i[r.nodeName.toLowerCase()]||0<r.length)return!0}(e.schema,s,l)&&(n=i.create("br"),a.insertNode(n),a.setStartAfter(n),a.setEndAfter(n),r=!0),n=i.create("br"),Xu(i,a,n),YC(i,o,n),GC(i,o,n,r),e.undoManager.add()}function QC(e,t){var n=yt.fromTag("br");Ci(yt.fromDom(t),n),e.undoManager.add()}function ZC(e,t){cz(e.getBody(),t)||wi(yt.fromDom(t),yt.fromTag("br"));var n=yt.fromTag("br");wi(yt.fromDom(t),n),YC(e.dom,e.selection,n.dom()),GC(e.dom,e.selection,n.dom(),!1),e.undoManager.add()}function ew(e){return e&&"A"===e.nodeName&&"href"in e}function tw(e){return e.fold($(!1),ew,ew,$(!1))}function nw(e,t){t.fold(i,d(QC,e),d(ZC,e),i)}function rw(e,t){return oz(e).filter(function(e){return 0<t.length&&we(yt.fromDom(e),t)}).isSome()}function ow(e,t){return dz(e)}function iw(n){return function(e,t){return""===mf(e)===n}}function aw(n){return function(e,t){return az(e)===n}}function uw(n,r){return function(e,t){return iz(e)===n.toUpperCase()===r}}function sw(e){return uw("pre",e)}function cw(n){return function(e,t){return hf(e)===n}}function lw(e,t){return fz(e)}function fw(e,t){return t}function dw(e){var t=mf(e),n=rz(e.dom,e.selection.getStart());return n&&e.schema.isValidChild(n.nodeName,t||"P")}function hw(e,t){return function(n,r){return b(e,function(e,t){return e&&t(n,r)},!0)?k.some(t):k.none()}}function mw(n,r){var e=r.container(),t=r.offset();return Ge.isText(e)?(e.insertData(t,n),k.some(Uu(e,t+n.length))):ks(r).map(function(e){var t=yt.fromText(n);return r.isAtEnd()?wi(e,t):Ci(e,t),Uu(t.dom(),n.length)})}function gw(e){return Uu.isTextPosition(e)&&!e.isAtStart()&&!e.isAtEnd()}function pw(e,t){var n=y(fh(yt.fromDom(t.container()),e),Vn);return E(n).getOr(e)}function vw(e,t){return gw(t)?Dh(t):Dh(t)||Pc.prevPosition(pw(e,t).dom(),t).exists(Dh)}function yw(e,t){return gw(t)?Rh(t):Rh(t)||Pc.nextPosition(pw(e,t).dom(),t).exists(Rh)}function bw(e){return ks(e).bind(function(e){return ba(e,xt)}).exists(function(e){return function(e){return h(["pre","pre-wrap"],e)}(ve(e,"white-space"))})}function Cw(e,t){return function(e,t){return Pc.prevPosition(e.dom(),t).isNone()}(e,t)||function(e,t){return Pc.nextPosition(e.dom(),t).isNone()}(e,t)||Gx(e,t)||Jx(e,t)||Yb(e,t)||Xb(e,t)}function ww(e,t){var n=function(e){var t=e.container(),n=e.offset();return Ge.isText(t)&&n<t.data.length?Uu(t,n+1):e}(t);return!bw(n)&&(Jx(e,n)||Zx(e,n)||Xb(e,n)||yw(e,n))}function xw(e,t){return function(e,t){return!bw(t)&&(Gx(e,t)||Qx(e,t)||Yb(e,t)||vw(e,t))}(e,t)||ww(e,t)}function zw(e,t){return Mh(e.charAt(t))}function Ew(e){var t=e.container();return Ge.isText(t)&&Z(t.data,"\xa0")}function Nw(e){var t=e.data,n=function(e){var n=e.split("");return X(n,function(e,t){return Mh(e)&&0<t&&t<n.length-1&&bh(n[t-1])&&bh(n[t+1])?" ":e}).join("")}(t);return n!==t&&(e.data=n,!0)}function Sw(n,e){return k.some(e).filter(Ew).bind(function(e){var t=e.container();return function(e,t){var n=t.data,r=Uu(t,0);return!(!zw(n,0)||xw(e,r))&&(t.data=" "+n.slice(1),!0)}(n,t)||Nw(t)||function(e,t){var n=t.data,r=Uu(t,n.length-1);return!(!zw(n,n.length-1)||xw(e,r))&&(t.data=n.slice(0,-1)+" ",!0)}(n,t)?k.some(e):k.none()})}function kw(t){var e=yt.fromDom(t.getBody());t.selection.isCollapsed()&&Sw(e,Uu.fromRangeStart(t.selection.getRng())).each(function(e){t.selection.setRng(e.toRange())})}function Tw(t,n){return function(e){return function(e,t){return!bw(t)&&(Cw(e,t)||vw(e,t)||yw(e,t))}(t,e)?vz(n):yz(n)}}function Aw(e){var t=Ds.fromRangeStart(e.selection.getRng()),n=yt.fromDom(e.getBody());if(e.selection.isCollapsed()){var r=d(Ky.isInlineTarget,e),o=Ds.fromRangeStart(e.selection.getRng());return Jy(r,e.getBody(),o).bind(function(t){return function(e){return e.fold(function(e){return Pc.prevPosition(t.dom(),Ds.before(e))},function(e){return Pc.firstPositionIn(e)},function(e){return Pc.lastPositionIn(e)},function(e){return Pc.nextPosition(t.dom(),Ds.after(e))})}}(n)).bind(Tw(n,t)).exists(function(t){return function(e){return t.selection.setRng(e.toRange()),t.nodeChanged(),!0}}(e))}return!1}function Mw(e,t){t.hasAttribute("data-mce-caret")&&(Pa(t),function(e){e.selection.setRng(e.selection.getRng())}(e),e.selection.scrollIntoView(t))}function Rw(e,t){var n=function(e){return wa(yt.fromDom(e.getBody()),"*[data-mce-caret]").fold($(null),function(e){return e.dom()})}(e);if(n)return"compositionstart"===t.type?(t.preventDefault(),t.stopPropagation(),void Mw(e,n)):void(_a(n)&&(Mw(e,n),e.undoManager.add()))}function Dw(t){!function(e){var t=aa(function(){e.composing||kw(e)},0);wz.isIE()&&(e.on("keypress",function(e){t.throttle()}),e.on("remove",function(e){t.cancel()}))}(t),t.on("input",function(e){!1===e.isComposing&&kw(t)})}function _w(a){function e(e,t){try{a.getDoc().execCommand(e,!1,t)}catch(n){}}function u(e){return e.isDefaultPrevented()}function t(){a.shortcuts.add("meta+a",null,"SelectAll")}function n(){a.on("keydown",function(e){if(!u(e)&&e.keyCode===i&&l.isCollapsed()&&0===l.getRng().startOffset){var t=l.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})}function r(){a.inline||(a.contentStyles.push("body {min-height: 150px}"),a.on("click",function(e){var t;if("HTML"===e.target.nodeName){if(11<Nn.ie)return void a.getBody().focus();t=a.selection.getRng(),a.getBody().focus(),a.selection.setRng(t),a.selection.normalize(),a.nodeChanged()}}))}var o=Mn.each,i=Ah.BACKSPACE,s=Ah.DELETE,c=a.dom,l=a.selection,f=a.settings,d=a.parser,h=Nn.gecko,m=Nn.ie,g=Nn.webkit,p="data:text/mce-internal,",v=m?"Text":"URL";function y(e){var t=c.create("body"),n=e.cloneContents();return t.appendChild(n),l.serializer.serialize(t,{format:"html"})}function b(){var e=c.getAttribs(l.getStart().cloneNode(!1));return function(){var t=l.getStart();t!==a.getBody()&&(c.setAttrib(t,"style",null),o(e,function(e){t.setAttributeNode(e.cloneNode(!0))}))}}function C(){return!l.isCollapsed()&&c.getParent(l.getStart(),c.isBlock)!==c.getParent(l.getEnd(),c.isBlock)}return a.on("keydown",function(e){var t,n,r,o,i;if(!u(e)&&e.keyCode===Ah.BACKSPACE&&(n=(t=l.getRng()).startContainer,r=t.startOffset,o=c.getRoot(),i=n,t.collapsed&&0===r)){for(;i&&i.parentNode&&i.parentNode.firstChild===i&&i.parentNode!==o;)i=i.parentNode;"BLOCKQUOTE"===i.tagName&&(a.formatter.toggle("blockquote",null,i),(t=c.createRng()).setStart(n,0),t.setEnd(n,0),l.setRng(t))}}),a.on("keydown",function(e){var t,n,r=e.keyCode;if(!u(e)&&(r===s||r===i)){if(t=a.selection.isCollapsed(),n=a.getBody(),t&&!c.isEmpty(n))return;if(!t&&!function(e){var t=y(e),n=c.createRng();return n.selectNode(a.getBody()),t===y(n)}(a.selection.getRng()))return;e.preventDefault(),a.setContent(""),n.firstChild&&c.isBlock(n.firstChild)?a.selection.setCursorLocation(n.firstChild,0):a.selection.setCursorLocation(n,0),a.nodeChanged()}}),Nn.windowsPhone||a.on("keyup focusin mouseup",function(e){Ah.modifierPressed(e)||l.normalize()},!0),g&&(a.inline||c.bind(a.getDoc(),"mousedown mouseup",function(e){var t;if(e.target===a.getDoc().documentElement)if(t=l.getRng(),a.getBody().focus(),"mousedown"===e.type){if(Da(t.startContainer))return;l.placeCaretAt(e.clientX,e.clientY)}else l.setRng(t)}),a.on("click",function(e){var t=e.target;/^(IMG|HR)$/.test(t.nodeName)&&"false"!==c.getContentEditableParent(t)&&(e.preventDefault(),a.selection.select(t),a.nodeChanged()),"A"===t.nodeName&&c.hasClass(t,"mce-item-anchor")&&(e.preventDefault(),l.select(t))}),f.forced_root_block&&a.on("init",function(){e("DefaultParagraphSeparator",mf(a))}),a.on("init",function(){a.dom.bind(a.getBody(),"submit",function(e){e.preventDefault()})}),n(),d.addNodeFilter("br",function(e){for(var t=e.length;t--;)"Apple-interchange-newline"===e[t].attr("class")&&e[t].remove()}),Nn.iOS?(a.inline||a.on("keydown",function(){j.document.activeElement===j.document.body&&a.getWin().focus()}),r(),a.on("click",function(e){var t=e.target;do{if("A"===t.tagName)return void e.preventDefault()}while(t=t.parentNode)}),a.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")):t()),11<=Nn.ie&&(r(),n()),Nn.ie&&(t(),e("AutoUrlDetect",!1),a.on("dragstart",function(e){!function(e){var t,n;e.dataTransfer&&(a.selection.isCollapsed()&&"IMG"===e.target.tagName&&l.select(e.target),0<(t=a.selection.getContent()).length&&(n=p+escape(a.id)+","+escape(t),e.dataTransfer.setData(v,n)))}(e)}),a.on("drop",function(e){if(!u(e)){var t=function(e){var t;return e.dataTransfer&&(t=e.dataTransfer.getData(v))&&0<=t.indexOf(p)?(t=t.substr(p.length).split(","),{id:unescape(t[0]),html:unescape(t[1])}):null}(e);if(t&&t.id!==a.id){e.preventDefault();var n=$v(e.x,e.y,a.getDoc());l.setRng(n),function(e,t){a.queryCommandSupported("mceInsertClipboardContent")?a.execCommand("mceInsertClipboardContent",!1,{content:e,internal:t}):a.execCommand("mceInsertContent",!1,e)}(t.html,!0)}}})),h&&(a.on("keydown",function(e){if(!u(e)&&e.keyCode===i){if(!a.getBody().getElementsByTagName("hr").length)return;if(l.isCollapsed()&&0===l.getRng().startOffset){var t=l.getNode(),n=t.previousSibling;if("HR"===t.nodeName)return c.remove(t),void e.preventDefault();n&&n.nodeName&&"hr"===n.nodeName.toLowerCase()&&(c.remove(n),e.preventDefault())}}}),j.Range.prototype.getClientRects||a.on("mousedown",function(e){if(!u(e)&&"HTML"===e.target.nodeName){var t=a.getBody();t.blur(),pn.setEditorTimeout(a,function(){t.focus()})}}),a.on("keypress",function(e){var t;if(!u(e)&&(8===e.keyCode||46===e.keyCode)&&C())return t=b(),a.getDoc().execCommand("delete",!1,null),t(),e.preventDefault(),!1}),c.bind(a.getDoc(),"cut",function(e){var t;!u(e)&&C()&&(t=b(),pn.setEditorTimeout(a,function(){t()}))}),f.readonly||a.on("BeforeExecCommand mousedown",function(){e("StyleWithCSS",!1),e("enableInlineTableEditing",!1),f.object_resizing||e("enableObjectResizing",!1)}),a.on("SetContent ExecCommand",function(e){"setcontent"!==e.type&&"mceInsertLink"!==e.command||o(c.select("a"),function(e){var t=e.parentNode,n=c.getRoot();if(t.lastChild===e){for(;t&&!c.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}c.add(t,"br",{"data-mce-bogus":1})}})}),a.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"),Nn.mac&&a.on("keydown",function(e){!Ah.metaKeyPressed(e)||e.shiftKey||37!==e.keyCode&&39!==e.keyCode||(e.preventDefault(),a.selection.getSel().modify("move",37===e.keyCode?"backward":"forward","lineboundary"))}),n()),{refreshContentEditable:function(){},isHidden:function(){var e;return!(!h||a.removed)&&(!(e=a.selection.getSel())||!e.rangeCount||0===e.rangeCount)}}}function Bw(e){return Ge.isElement(e)&&In(yt.fromDom(e))}function Ow(t){t.on("click",function(e){3<=e.detail&&function(e){var t=e.selection.getRng(),n=Uu.fromRangeStart(t),r=Uu.fromRangeEnd(t);if(Uu.isElementPosition(n)){var o=n.container();Bw(o)&&Pc.firstPositionIn(o).each(function(e){return t.setStart(e.container(),e.offset())})}if(Uu.isElementPosition(r)){o=n.container();Bw(o)&&Pc.lastPositionIn(o).each(function(e){return t.setEnd(e.container(),e.offset())})}e.selection.setRng(fp(t))}(t)})}function Hw(e){!function(t){t.on("click",function(e){t.dom.getParent(e.target,"details")&&e.preventDefault()})}(e),function(e){e.parser.addNodeFilter("details",function(e){z(e,function(e){e.attr("data-mce-open",e.attr("open")),e.attr("open","open")})}),e.serializer.addNodeFilter("details",function(e){z(e,function(e){var t=e.attr("data-mce-open");e.attr("open",K(t)?t:null),e.attr("data-mce-open",null)})})}(e)}function Pw(e){e.bindPendingEventDelegates(),e.initialized=!0,e.fire("init"),e.focus(!0),e.nodeChanged({initial:!0}),e.execCallback("init_instance_callback",e),function(t){t.settings.auto_focus&&pn.setEditorTimeout(t,function(){var e;(e=!0===t.settings.auto_focus?t:t.editorManager.get(t.settings.auto_focus)).destroyed||e.focus()},100)}(e)}function Lw(e,t){var n=e.editorManager.translate("Rich Text Area. Press ALT-0 for help."),r=function(e,t,n,r){var o=yt.fromTag("iframe");return me(o,r),me(o,{id:e+"_ifr",frameBorder:"0",allowTransparency:"true",title:t}),fa(o,"tox-edit-area__iframe"),o}(e.id,n,t.height,uf(e)).dom();r.onload=function(){r.onload=null,e.fire("load")};var o=function(e,t){if(j.document.domain!==j.window.location.hostname&&Nn.browser.isIE()){var n=eh("mce");e[n]=function(){Nz(e)};var r='javascript:(function(){document.open();document.domain="'+j.document.domain+'";var ed = window.parent.tinymce.get("'+e.id+'");document.write(ed.iframeHTML);document.close();ed.'+n+"(true);})()";return Sz.setAttrib(t,"src",r),!0}return!1}(e,r);return e.contentAreaContainer=t.iframeContainer,e.iframeElement=r,e.iframeHTML=function(e){var t,n,r;return r=sf(e)+"<html><head>",cf(e)!==e.documentBaseUrl&&(r+='<base href="'+e.documentBaseURI.getURI()+'" />'),r+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',t=lf(e),n=ff(e),df(e)&&(r+='<meta http-equiv="Content-Security-Policy" content="'+df(e)+'" />'),r+='</head><body id="'+t+'" class="mce-content-body '+n+'" data-id="'+e.id+'"><br></body></html>'}(e),Sz.add(t.iframeContainer,r),o}function Vw(e){e.contentCSS=e.contentCSS.concat(function(t){var e=Lf(t),n=t.editorManager.baseURL+"/skins/content",r="content"+t.editorManager.suffix+".css",o=!0===t.inline;return X(e,function(e){return function(e){return/^[a-z0-9\-]+$/i.test(e)}(e)&&!o?n+"/"+e+"/"+r:t.documentBaseURI.toAbsolute(e)})}(e))}function Iw(e){return e.replace(/^\-/,"")}function Fw(e){return{editorContainer:e,iframeContainer:e}}function Uw(e){var t=e.getElement();return e.inline?Fw(null):function(e){var t=Tz.create("div");return Tz.insertAfter(t,e),Fw(t)}(t)}function jw(e){return"-"===e.charAt(0)}function qw(t,e){(function(e){return k.from(zf(e)).filter(function(e){return 0<e.length}).map(function(e){return{url:e,name:k.none()}})})(e).orThunk(function(){return function(t){return k.from(xf(t)).filter(function(e){return 0<e.length&&!Ud.has(e)}).map(function(e){return{url:t.editorManager.baseURL+"/icons/"+e+"/icons.js",name:k.some(e)}})}(e)}).each(function(e){t.add(e.url,i,undefined,function(){Fd.iconsLoadError(e.url,e.name.getOrUndefined())})})}function $w(e,t){var n=Qi.ScriptLoader;!function(e,t,n,r){var o=t.settings,i=o.theme;if(K(i)){if(!jw(i)&&!qd.urls.hasOwnProperty(i)){var a=o.theme_url;a?qd.load(i,t.documentBaseURI.toAbsolute(a)):qd.load(i,"themes/"+i+"/theme"+n+".js")}e.loadQueue(function(){qd.waitFor(i,r)})}else r()}(n,e,t,function(){!function(e,t){var n=Bf(t),r=Of(t);if(!1===ra.hasCode(n)&&"en"!==n){var o=""!==r?r:t.editorManager.baseURL+"/langs/"+n+".js";e.add(o,i,undefined,function(){Fd.languageLoadError(o,n)})}}(n,e),qw(n,e),function(n,r){A(n.plugins)&&(n.plugins=n.plugins.join(" ")),Mn.each(n.external_plugins,function(e,t){jd.load(t,e,i,undefined,function(){Fd.pluginLoadError(t,e)}),n.plugins+=" "+t}),Mn.each(n.plugins.split(/[ ,]/),function(e){if((e=Mn.trim(e))&&!jd.urls[e])if(jw(e)){e=e.substr(1,e.length);var t=jd.dependencies(e);Mn.each(t,function(e){var t={prefix:"plugins/",resource:e,suffix:"/plugin"+r+".js"};e=jd.createUrl(t,e),jd.load(e.resource,e,i,undefined,function(){Fd.pluginLoadError(e.prefix+e.resource+e.suffix,e.resource)})})}else{var n={prefix:"plugins/",resource:e,suffix:"/plugin"+r+".js"};jd.load(e,n,i,undefined,function(){Fd.pluginLoadError(n.prefix+n.resource+n.suffix,e)})}})}(e.settings,t),n.loadQueue(function(){e.removed||Mz(e)},e,function(){e.removed||Mz(e)})})}function Ww(e,t,n){ha(e,t)&&!1===n?function(e,t){sa(e)?e.dom().classList.remove(t):la(e,t);da(e)}(e,t):n&&fa(e,t)}function Kw(e,t,n){try{e.getDoc().execCommand(t,!1,n)}catch(r){}}function Xw(e,t){e.dom().contentEditable=t?"true":"false"}function Yw(e,t){var n=yt.fromDom(e.getBody());Ww(n,"mce-content-readonly",t),t?(e.selection.controlSelection.hideResizeRect(),e._selectionOverrides.hideFakeCaret(),function(e){k.from(e.selection.getNode()).each(function(e){e.removeAttribute("data-mce-selected")})}(e),e.readonly=!0,Xw(n,!1),function(e){z(ma(e,'*[contenteditable="true"]'),function(e){Tt(e,_z,"true"),Xw(e,!1)})}(n)):(e.readonly=!1,Xw(n,!0),function(e){z(ma(e,"*["+_z+'="true"]'),function(e){pe(e,_z),Xw(e,!0)})}(n),Kw(e,"StyleWithCSS",!1),Kw(e,"enableInlineTableEditing",!1),Kw(e,"enableObjectResizing",!1),sd(e)&&e.focus(),function(e){e.selection.setRng(e.selection.getRng())}(e),e.nodeChanged())}function Gw(e){return!0===e.readonly}function Jw(t){t.parser.addAttributeFilter("contenteditable",function(e){Gw(t)&&z(e,function(e){e.attr(_z,e.attr("contenteditable")),e.attr("contenteditable","false")})}),t.serializer.addAttributeFilter(_z,function(e){Gw(t)&&z(e,function(e){e.attr("contenteditable",e.attr(_z))})}),t.serializer.addTempAttr(_z)}function Qw(e,t,n,r){var o=n[t.get()],i=n[r];try{i.activate()}catch(yN){return void j.console.error("problem while activating editor mode "+r+":",yN)}o.deactivate(),o.editorReadOnly!==i.editorReadOnly&&Yw(e,i.editorReadOnly),t.set(r),hd(e,r)}function Zw(t){var n=Je("design"),r=Je({design:{activate:i,deactivate:i,editorReadOnly:!1},readonly:{activate:i,deactivate:i,editorReadOnly:!0}});return function(e){e.serializer?Jw(e):e.on("PreInit",function(){Jw(e)})}(t),function(t){t.on("ShowCaret",function(e){Gw(t)&&e.preventDefault()}),t.on("ObjectSelected",function(e){Gw(t)&&e.preventDefault()})}(t),{isReadOnly:function(){return Gw(t)},set:function(e){return function(e,t,n,r){if(r!==n.get()){if(!kt(t,r))throw new Error("Editor mode '"+r+"' is invalid");e.initialized?Qw(e,n,t,r):e.on("init",function(){return Qw(e,n,t,r)})}}(t,r.get(),n,e)},get:function(){return n.get()},register:function(e,t){r.set(function(e,t,n){var r;if(h(Bz,t))throw new Error("Cannot override default mode "+t);return G(G({},e),((r={})[t]=G(G({},n),{deactivate:function(){try{n.deactivate()}catch(yN){j.console.error("problem while deactivating editor mode "+t+":",yN)}}}),r))}(r.get(),e,t))}}}function ex(e){return Mn.grep(e.childNodes,function(e){return"LI"===e.nodeName})}function tx(e){return e&&e.firstChild&&e.firstChild===e.lastChild&&function(e){return"\xa0"===e.data||Ge.isBr(e)}(e.firstChild)}function nx(e){return 0<e.length&&function(e){return!e.firstChild||tx(e)}(e[e.length-1])?e.slice(0,-1):e}function rx(e,t){var n=e.getParent(t,e.isBlock);return n&&"LI"===n.nodeName?n:null}function ox(e,t){var n=Ds.after(e),r=rc(t).prev(n);return r?r.toRange():null}function ix(t,e,n){var r=t.parentNode;return Mn.each(e,function(e){r.insertBefore(e,t)}),function(e,t){var n=Ds.before(e),r=rc(t).next(n);return r?r.toRange():null}(t,n)}function ax(e,t){var n=e.selection.getRng(),r=n.startContainer,o=n.startOffset;n.collapsed&&function(e,t){return Ge.isText(e)&&"\xa0"===e.nodeValue[t-1]}(r,o)&&Ge.isText(r)&&(r.insertData(o-1," "),r.deleteData(o,1),n.setStart(r,o),n.setEnd(r,o),e.selection.setRng(n)),e.selection.setContent(t)}function ux(e,t,n){var r,o,i,a,u,s,c,l,f,d,h,m=e.selection,g=e.dom;if(/^ | $/.test(t)&&(t=function(e,t){var n,r;n=e.startContainer,r=e.startOffset;function o(e){return n[e]&&3===n[e].nodeType}return 3===n.nodeType&&(0<r?t=t.replace(/^&nbsp;/," "):o("previousSibling")||(t=t.replace(/^ /,"&nbsp;")),r<n.length?t=t.replace(/&nbsp;(<br>|)$/," "):o("nextSibling")||(t=t.replace(/(&nbsp;| )(<br>|)$/,"&nbsp;"))),t}(m.getRng(),t)),r=e.parser,h=n.merge,o=pl({validate:e.settings.validate},e.schema),d='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;&#x200B;</span>',s={content:t,format:"html",selection:!0,paste:n.paste},(s=e.fire("BeforeSetContent",s)).isDefaultPrevented())e.fire("SetContent",{content:s.content,format:"html",selection:!0,paste:n.paste});else{-1===(t=s.content).indexOf("{$caret}")&&(t+="{$caret}"),t=t.replace(/\{\$caret\}/,d);var p=(l=m.getRng()).startContainer||(l.parentElement?l.parentElement():null),v=e.getBody();p===v&&m.isCollapsed()&&g.isBlock(v.firstChild)&&function(e,t){return t&&!e.schema.getShortEndedElements()[t.nodeName]}(e,v.firstChild)&&g.isEmpty(v.firstChild)&&((l=g.createRng()).setStart(v.firstChild,0),l.setEnd(v.firstChild,0),m.setRng(l)),m.isCollapsed()||(e.selection.setRng(fp(e.selection.getRng())),e.getDoc().execCommand("Delete",!1,null),t=function(e,t){var n,r;return n=e.startContainer,r=e.startOffset,3===n.nodeType&&e.collapsed&&("\xa0"===n.data[r]?(n.deleteData(r,1),/[\u00a0| ]$/.test(t)||(t+=" ")):"\xa0"===n.data[r-1]&&(n.deleteData(r-1,1),/[\u00a0| ]$/.test(t)||(t=" "+t))),t}(e.selection.getRng(),t));var y={context:(i=m.getNode()).nodeName.toLowerCase(),data:n.data,insert:!0};if(u=r.parse(t,y),!0===n.paste&&Oz(e.schema,u)&&Pz(g,i))return l=Hz(o,g,e.selection.getRng(),u),e.selection.setRng(l),void e.fire("SetContent",s);if(function(e){for(var t=e;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")}(u),"mce_marker"===(f=u.lastChild).attr("id"))for(f=(c=f).prev;f;f=f.walk(!0))if(3===f.type||!g.isBlock(f.name)){e.schema.isValidChild(f.parent.name,"span")&&f.parent.insert(c,f,"br"===f.name);break}if(e._selectionOverrides.showBlockCaretContainer(i),y.invalid){for(ax(e,d),i=m.getNode(),a=e.getBody(),9===i.nodeType?i=f=a:f=i;f!==a;)f=(i=f).parentNode;t=i===a?a.innerHTML:g.getOuterHTML(i),t=o.serialize(r.parse(t.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return o.serialize(u)}))),i===a?g.setHTML(a,t):g.setOuterHTML(i,t)}else!function(e,t,n){if("all"===n.getAttribute("data-mce-bogus"))n.parentNode.insertBefore(e.dom.createFragment(t),n);else{var r=n.firstChild,o=n.lastChild;!r||r===o&&"BR"===r.nodeName?e.dom.setHTML(n,t):ax(e,t)}}(e,t=o.serialize(u),i);!function(e,t){var n=e.schema.getTextInlineElements(),r=e.dom;if(t){var o=e.getBody(),i=new Bg(r);Mn.each(r.select("*[data-mce-fragment]"),function(e){for(var t=e.parentNode;t&&t!==o;t=t.parentNode)n[e.nodeName.toLowerCase()]&&i.compare(t,e)&&r.remove(e,!0)})}}(e,h),function(n,e){var t,r,o,i,a,u=n.dom,s=n.selection;if(e){if(n.selection.scrollIntoView(e),t=function(e){for(var t=n.getBody();e&&e!==t;e=e.parentNode)if("false"===n.dom.getContentEditable(e))return e;return null}(e))return u.remove(e),s.select(t);var c=u.createRng();(i=e.previousSibling)&&3===i.nodeType?(c.setStart(i,i.nodeValue.length),Nn.ie||(a=e.nextSibling)&&3===a.nodeType&&(i.appendData(a.data),a.parentNode.removeChild(a))):(c.setStartBefore(e),c.setEndBefore(e));r=u.getParent(e,u.isBlock),u.remove(e),r&&u.isEmpty(r)&&(n.$(r).empty(),c.setStart(r,0),c.setEnd(r,0),Lz(r)||function(e){return!!e.getAttribute("data-mce-fragment")}(r)||!(o=function(e){var t=Ds.fromRangeStart(e);if(t=rc(n.getBody()).next(t))return t.toRange()}(c))?u.add(r,u.create("br",{"data-mce-bogus":"1"})):(c=o,u.remove(r))),s.setRng(c)}}(e,g.get("mce_marker")),function(e){Mn.each(e.getElementsByTagName("*"),function(e){e.removeAttribute("data-mce-fragment")})}(e.getBody()),function(e,t){k.from(e.getParent(t,"td,th")).map(yt.fromDom).each(Cg)}(e.dom,e.selection.getStart()),e.fire("SetContent",s),e.addVisual()}}function sx(e,t){e.getDoc().execCommand(t,!1,null)}function cx(n){return function(t,e){return k.from(e).map(yt.fromDom).filter(xt).bind(function(e){return function(t,n,e){function r(e){return ye(e,t)}return ba(yt.fromDom(e),function(e){return r(e).isSome()},function(e){return ze(yt.fromDom(n),e)}).bind(r)}(n,t,e.dom()).or(function(e,t){return k.from(Xi.DOM.getStyle(t,e,!0))}(n,e.dom()))}).getOr("")}}function lx(e){return Pc.firstPositionIn(e.getBody()).map(function(e){var t=e.container();return Ge.isText(t)?t.parentNode:t})}function fx(t){return k.from(t.selection.getRng()).bind(function(e){return function(e,t){return e.startContainer===t&&0===e.startOffset}(e,t.getBody())?k.none():k.from(t.selection.getStart(!0))})}function dx(e,t){if(/^[0-9\.]+$/.test(t)){var n=parseInt(t,10);if(1<=n&&n<=7){var r=Cf(e),o=wf(e);return o?o[n-1]||t:r[n-1]||t}return t}return t}function hx(e,t){var n=dx(e,t);e.formatter.toggle("fontname",{value:function(e){var t=e.split(/\s*,\s*/);return X(t,function(e){return-1===e.indexOf(" ")||ee(e,'"')||ee(e,"'")?e:"'"+e+"'"}).join(",")}(n)}),e.nodeChanged()}var mx=d(ob,Uu.isAbove,-1),gx=d(ob,Uu.isBelow,1),px=d(ib,-1,mx),vx=d(ib,1,gx),yx=Ge.isContentEditableFalse,bx=Wa,Cx=d(mb,function(e){return e.bottom},function(e,t){return e.y<t}),wx=d(mb,function(e){return e.top},function(e,t){return e.y>t}),xx=d(yb,mx),zx=d(yb,gx),Ex=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,r)}},Nx=function(e,t){return g(Db(e,t),function(e){return e.action()})},Sx=function(t,n){t.on("keydown",function(e){!1===e.isDefaultPrevented()&&function(e,t,n){var r=oe().os;Nx([{keyCode:Ah.RIGHT,action:fb(e,!0)},{keyCode:Ah.LEFT,action:fb(e,!1)},{keyCode:Ah.UP,action:db(e,!1)},{keyCode:Ah.DOWN,action:db(e,!0)},{keyCode:Ah.RIGHT,action:zb(e,!0)},{keyCode:Ah.LEFT,action:zb(e,!1)},{keyCode:Ah.UP,action:Eb(e,!1)},{keyCode:Ah.DOWN,action:Eb(e,!0)},{keyCode:Ah.RIGHT,action:nb.move(e,t,!0)},{keyCode:Ah.LEFT,action:nb.move(e,t,!1)},{keyCode:Ah.RIGHT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:nb.moveNextWord(e,t)},{keyCode:Ah.LEFT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:nb.movePrevWord(e,t)},{keyCode:Ah.UP,action:Rb(e,!1)},{keyCode:Ah.DOWN,action:Rb(e,!0)}],n).each(function(e){n.preventDefault()})}(t,n,e)})},kx=function(e,t){return Bt(e,t)?ba(t,function(e){return In(e)||Un(e)},function(t){return function(e){return ze(t,yt.fromDom(e.dom().parentNode))}}(e)):k.none()},Tx=function(e){e.dom.isEmpty(e.getBody())&&(e.setContent(""),function(e){var t=e.getBody(),n=t.firstChild&&e.dom.isBlock(t.firstChild)?t.firstChild:t;e.selection.setCursorLocation(n,0)}(e))},Ax=function(i,a,u){return Ya(Pc.firstPositionIn(u),Pc.lastPositionIn(u),function(e,t){var n=Ky.normalizePosition(!0,e),r=Ky.normalizePosition(!1,t),o=Ky.normalizePosition(!1,a);return i?Pc.nextPosition(u,o).map(function(e){return e.isEqual(r)&&a.isEqual(n)}).getOr(!1):Pc.prevPosition(u,o).map(function(e){return e.isEqual(n)&&a.isEqual(r)}).getOr(!1)}).getOr(!0)},Mx=function(e,t,n){return n.collapsed?Ob(e,t,n):k.none()},Rx=function(e,t,n,r){return t?Ub(e,r,n):Ub(e,n,r)},Dx=function(t,n){var r=yt.fromDom(t.getBody()),e=Mx(r.dom(),n,t.selection.getRng()).bind(function(e){return Rx(r,n,e.from().block(),e.to().block())});return e.each(function(e){t.selection.setRng(e.toRange())}),e.isSome()},_x=function(e,t){return!e.selection.isCollapsed()&&$b(e)},Bx=d(Kb,!1),Ox=d(Kb,!0),Hx=jf([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),Px=function(e,t){for(;t&&t!==e;){if(Ge.isContentEditableTrue(t)||Ge.isContentEditableFalse(t))return t;t=t.parentNode}return null},Lx=function(e,t){return e.selection.isCollapsed()?eC(e,t):tC(e,t)},Vx=function(e){var t,n=Px(e.getBody(),e.selection.getNode());return Ge.isContentEditableTrue(n)&&e.dom.isBlock(n)&&e.dom.isEmpty(n)&&(t=e.dom.create("br",{"data-mce-bogus":"1"}),e.dom.setHTML(n,""),n.appendChild(t),e.selection.setRng(Ds.before(t).toRange())),!0},Ix=function(e,t){return function(e,t){var n=e.selection.getRng();if(!Ge.isText(n.commonAncestorContainer))return!1;var r=t?Ms.Forwards:Ms.Backwards,o=rc(e.getBody()),i=d(Ts,o.next),a=d(Ts,o.prev),u=t?i:a,s=t?Ph:Lh,c=Ss(r,e.getBody(),n),l=Ky.normalizePosition(t,u(c));if(!l||!As(c,l))return!1;if(s(l))return nC(e,n,c.getNode(),r,t,l);var f=u(l);return!!(f&&s(f)&&As(l,f))&&nC(e,n,c.getNode(),r,t,f)}(e,t)},Fx=function(e,t,n){if(e.selection.isCollapsed()&&function(e){return!1!==e.settings.inline_boundaries}(e)){var r=Ds.fromRangeStart(e.selection.getRng());return iC(e,t,n,r)}return!1},Ux=function(e,t){return!!e.selection.isCollapsed()&&sC(e,t)},jx=jf([{removeTable:["element"]},{emptyCells:["cells"]}]),qx=function(e,t){return hC(t,e).isSome()},$x=function(e,t){return g(fh(t,e),function(e){return"caption"===ie(e)})},Wx=function(e,t){return bg(t),e.selection.setCursorLocation(t.dom(),0),k.some(!0)},Kx=function(e,t){var n=yt.fromDom(e.selection.getStart(!0)),r=ry(e);return e.selection.isCollapsed()&&0===r.length?TC(e,t,n):function(e,t){var n=yt.fromDom(e.getBody()),r=e.selection.getRng(),o=ry(e);return 0!==o.length?CC(e,o):zC(e,n,r,t)}(e,n)},Xx=function(e,t){return!!e.selection.isCollapsed()&&function(t,n){var e=Ds.fromRangeStart(t.selection.getRng());return Pc.fromPosition(n,t.getBody(),e).filter(function(e){return n?_h(e):Bh(e)}).bind(function(e){return k.from(ws(n?0:-1,e))}).map(function(e){return t.selection.select(e),!0}).getOr(!1)}(e,t)},Yx=function(e){return y(X(e.selection.getSelectedBlocks(),yt.fromDom),function(e){return!DC(e)&&!function(e){return Se(e).map(DC).getOr(!1)}(e)&&function(e){return ba(e,function(e){return Ge.isContentEditableTrue(e.dom())||Ge.isContentEditableFalse(e.dom())}).exists(function(e){return Ge.isContentEditableTrue(e.dom())})}(e)})},Gx=d(PC,!1),Jx=d(PC,!0),Qx=d(HC,!1),Zx=d(HC,!0),ez=function(e,t,n){if(e.selection.isCollapsed()&&RC(e)){var r=e.dom,o=e.selection.getRng(),i=Ds.fromRangeStart(o),a=r.getParent(o.startContainer,r.isBlock);if(null!==a&&Gx(yt.fromDom(a),i))return _C(e,"outdent"),!0}return!1},tz=function(t,n){t.on("keydown",function(e){!1===e.isDefaultPrevented()&&function(e,t,n){Nx([{keyCode:Ah.BACKSPACE,action:Ex(ez,e,!1)},{keyCode:Ah.BACKSPACE,action:Ex(Lx,e,!1)},{keyCode:Ah.DELETE,action:Ex(Lx,e,!0)},{keyCode:Ah.BACKSPACE,action:Ex(Ix,e,!1)},{keyCode:Ah.DELETE,action:Ex(Ix,e,!0)},{keyCode:Ah.BACKSPACE,action:Ex(Fx,e,t,!1)},{keyCode:Ah.DELETE,action:Ex(Fx,e,t,!0)},{keyCode:Ah.BACKSPACE,action:Ex(Kx,e,!1)},{keyCode:Ah.DELETE,action:Ex(Kx,e,!0)},{keyCode:Ah.BACKSPACE,action:Ex(Xx,e,!1)},{keyCode:Ah.DELETE,action:Ex(Xx,e,!0)},{keyCode:Ah.BACKSPACE,action:Ex(_x,e,!1)},{keyCode:Ah.DELETE,action:Ex(_x,e,!0)},{keyCode:Ah.BACKSPACE,action:Ex(Dx,e,!1)},{keyCode:Ah.DELETE,action:Ex(Dx,e,!0)},{keyCode:Ah.BACKSPACE,action:Ex(Ux,e,!1)},{keyCode:Ah.DELETE,action:Ex(Ux,e,!0)}],n).each(function(e){n.preventDefault()})}(t,n,e)}),t.on("keyup",function(e){!1===e.isDefaultPrevented()&&function(e,t){Nx([{keyCode:Ah.BACKSPACE,action:Ex(Vx,e)},{keyCode:Ah.DELETE,action:Ex(Vx,e)}],t)}(t,e)})},nz=function(e,t){var n,r,o=t,i=e.dom,a=e.schema.getMoveCaretBeforeOnEnterElements();if(t){if(/^(LI|DT|DD)$/.test(t.nodeName)){var u=function(e){for(;e;){if(1===e.nodeType||3===e.nodeType&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}}(t.firstChild);u&&/^(UL|OL|DL)$/.test(u.nodeName)&&t.insertBefore(i.doc.createTextNode("\xa0"),t.firstChild)}if(r=i.createRng(),t.normalize(),t.hasChildNodes()){for(var s=new yi(t,t);n=s.current();){if(Ge.isText(n)){r.setStart(n,0),r.setEnd(n,0);break}if(a[n.nodeName.toLowerCase()]){r.setStartBefore(n),r.setEndBefore(n);break}o=n,n=s.next()}n||(r.setStart(o,0),r.setEnd(o,0))}else Ge.isBr(t)?t.nextSibling&&i.isBlock(t.nextSibling)?(r.setStartBefore(t),r.setEndBefore(t)):(r.setStartAfter(t),r.setEndAfter(t)):(r.setStart(t,0),r.setEnd(t,0));e.selection.setRng(r),e.selection.scrollIntoView(t)}},rz=function(e,t){var n,r,o=e.getRoot();for(n=t;n!==o&&"false"!==e.getContentEditable(n);)"true"===e.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},oz=LC,iz=function(e){return LC(e).fold($(""),function(e){return e.nodeName.toUpperCase()})},az=function(e){return LC(e).filter(function(e){return Un(yt.fromDom(e))}).isSome()},uz=function(e,t,n,r,o){var i=e.dom,a=e.selection.getRng();if(n!==e.getBody()){!function(e){return IC(e)&&IC(e.parentNode)}(n)||(o="LI");var u=o?t(o):i.create("BR");if(UC(n,r,!0)&&UC(n,r,!1))VC(n,"LI")?i.insertAfter(u,FC(n)):i.replace(u,n);else if(UC(n,r,!0))VC(n,"LI")?(i.insertAfter(u,FC(n)),u.appendChild(i.doc.createTextNode(" ")),u.appendChild(n)):n.parentNode.insertBefore(u,n);else if(UC(n,r,!1))i.insertAfter(u,FC(n));else{n=FC(n);var s=a.cloneRange();s.setStartAfter(r),s.setEndAfter(n);var c=s.extractContents();"LI"===o&&function(e,t){return e.firstChild&&e.firstChild.nodeName===t}(c,"LI")?(u=c.firstChild,i.insertAfter(c,n)):(i.insertAfter(c,n),i.insertAfter(u,n))}i.remove(r),nz(e,u)}},sz=function(a,e){function t(e){var t,n,r,o=s,i=b.getTextInlineElements();if(e||"TABLE"===m||"HR"===m?(t=y.create(e||p),XC(a,t)):t=c.cloneNode(!1),r=t,!1===yf(a))y.setAttrib(t,"style",null),y.setAttrib(t,"class",null);else do{if(i[o.nodeName]){if(rs(o)||Fc(o))continue;n=o.cloneNode(!1),y.setAttrib(n,"id",""),t.hasChildNodes()?n.appendChild(t.firstChild):r=n,t.appendChild(n)}}while((o=o.parentNode)&&o!==u);return jC(r),t}function n(e){var t,n,r=WC(e,s,i);if(Ge.isText(s)&&(e?0<r:r<s.nodeValue.length))return!1;if(s.parentNode===c&&v&&!e)return!0;if(e&&Ge.isElement(s)&&s===c.firstChild)return!0;if(qC(s,"TABLE")||qC(s,"HR"))return v&&!e||!v&&e;var o=new yi(s,c);for(Ge.isText(s)&&(e&&0===r?o.prev():e||r!==s.nodeValue.length||o.next());t=o.current();){if(Ge.isElement(t)){if(!t.getAttribute("data-mce-bogus")&&(n=t.nodeName.toLowerCase(),C[n]&&"br"!==n))return!1}else if(Ge.isText(t)&&!/^[ \t\r\n]*$/.test(t.nodeValue))return!1;e?o.prev():o.next()}return!0}function r(){f=/^(H[1-6]|PRE|FIGURE)$/.test(m)&&"HGROUP"!==g?t(p):t(),bf(a)&&$C(y,h)&&y.isEmpty(c)?f=y.split(h,c):y.insertAfter(f,c),nz(a,f)}var o,u,s,i,c,l,f,d,h,m,g,p,v,y=a.dom,b=a.schema,C=b.getNonEmptyElements(),w=a.selection.getRng();ay(y,w).each(function(e){w.setStart(e.startContainer,e.startOffset),w.setEnd(e.endContainer,e.endOffset)}),s=w.startContainer,i=w.startOffset,p=mf(a),l=!(!e||!e.shiftKey);var x=!(!e||!e.ctrlKey);Ge.isElement(s)&&s.hasChildNodes()&&(v=i>s.childNodes.length-1,s=s.childNodes[Math.min(i,s.childNodes.length-1)]||s,i=v&&Ge.isText(s)?s.nodeValue.length:0),(u=KC(y,s))&&((p&&!l||!p&&l)&&(s=function(e,t,n,r,o){var i,a,u,s,c,l,f=t||"P",d=e.dom,h=KC(d,r);if(!(a=d.getParent(r,d.isBlock))||!$C(d,a)){if(l=(a=a||h)===e.getBody()||function(e){return e&&/^(TD|TH|CAPTION)$/.test(e.nodeName)}(a)?a.nodeName.toLowerCase():a.parentNode.nodeName.toLowerCase(),!a.hasChildNodes())return i=d.create(f),XC(e,i),a.appendChild(i),n.setStart(i,0),n.setEnd(i,0),i;for(s=r;s.parentNode!==a;)s=s.parentNode;for(;s&&!d.isBlock(s);)s=(u=s).previousSibling;if(u&&e.schema.isValidChild(l,f.toLowerCase())){for(i=d.create(f),XC(e,i),u.parentNode.insertBefore(i,u),s=u;s&&!d.isBlock(s);)c=s.nextSibling,i.appendChild(s),s=c;n.setStart(r,o),n.setEnd(r,o)}}return r}(a,p,w,s,i)),c=y.getParent(s,y.isBlock),h=c?y.getParent(c.parentNode,y.isBlock):null,m=c?c.nodeName.toUpperCase():"","LI"!==(g=h?h.nodeName.toUpperCase():"")||x||(h=(c=h).parentNode,m=g),/^(LI|DT|DD)$/.test(m)&&y.isEmpty(c)?uz(a,t,h,c,p):p&&c===a.getBody()||(p=p||"P",Ma(c)?(f=Pa(c),y.isEmpty(c)&&jC(c),nz(a,f)):n()?r():n(!0)?(f=c.parentNode.insertBefore(t(),c),nz(a,qC(c,"HR")?f:c)):((o=function(e){var t=e.cloneRange();return t.setStart(e.startContainer,WC(!0,e.startContainer,e.startOffset)),t.setEnd(e.endContainer,WC(!1,e.endContainer,e.endOffset)),t}(w).cloneRange()).setEndAfter(c),function(e){z(pa(yt.fromDom(e),zt),function(e){var t=e.dom();t.nodeValue=lu(t.nodeValue)})}(d=o.extractContents()),function(e){for(;Ge.isText(e)&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild;);}(d),f=d.firstChild,y.insertAfter(d,c),function(e,t,n){var r,o=n,i=[];if(o){for(;o=o.firstChild;){if(e.isBlock(o))return;Ge.isElement(o)&&!t[o.nodeName.toLowerCase()]&&i.push(o)}for(r=i.length;r--;)!(o=i[r]).hasChildNodes()||o.firstChild===o.lastChild&&""===o.firstChild.nodeValue?e.remove(o):(a=e,(u=o)&&"A"===u.nodeName&&a.isEmpty(u)&&e.remove(o));var a,u}}(y,C,f),function(e,t){var n;t.normalize(),(n=t.lastChild)&&!/^(left|right)$/gi.test(e.getStyle(n,"float",!0))||e.add(t,"br")}(y,c),y.isEmpty(c)&&jC(c),f.normalize(),y.isEmpty(f)?(y.remove(f),r()):nz(a,f)),y.setAttrib(f,"id",""),a.fire("NewBlock",{newBlock:f})))},cz=function(e,t){return!!function(e){return Ge.isBr(e.getNode())}(Ds.after(t))||Pc.nextPosition(e,Ds.after(t)).map(function(e){return Ge.isBr(e.getNode())}).getOr(!1)},lz=function(e,t){var n=function(e){var t=d(Ky.isInlineTarget,e),n=Ds.fromRangeStart(e.selection.getRng());return Jy(t,e.getBody(),n).filter(tw)}(e);n.isSome()?n.each(d(nw,e)):JC(e,t)},fz=function(e){return rw(e,pf(e))},dz=function(e){return rw(e,vf(e))},hz=jf([{br:[]},{block:[]},{none:[]}]),mz=function(e,t){return Xy([hw([ow],hz.none()),hw([uw("summary",!0)],hz.br()),hw([sw(!0),cw(!1),fw],hz.br()),hw([sw(!0),cw(!1)],hz.block()),hw([sw(!0),cw(!0),fw],hz.block()),hw([sw(!0),cw(!0)],hz.br()),hw([aw(!0),fw],hz.br()),hw([aw(!0)],hz.block()),hw([iw(!0),fw,dw],hz.block()),hw([iw(!0)],hz.br()),hw([lw],hz.br()),hw([iw(!1),fw],hz.br()),hw([dw],hz.block())],[e,!(!t||!t.shiftKey)]).getOr(hz.none())},gz=function(e,t){mz(e,t).fold(function(){lz(e,t)},function(){sz(e,t)},i)},pz=function(t){t.on("keydown",function(e){e.keyCode===Ah.ENTER&&function(e,t){t.isDefaultPrevented()||(t.preventDefault(),function(e){e.typing&&(e.typing=!1,e.add())}(e.undoManager),e.undoManager.transact(function(){!1===e.selection.isCollapsed()&&e.execCommand("Delete"),gz(e,t)}))}(t,e)})},vz=d(mw,"\xa0"),yz=d(mw," "),bz=function(t){t.on("keydown",function(e){!1===e.isDefaultPrevented()&&function(e,t){Nx([{keyCode:Ah.SPACEBAR,action:Ex(Aw,e)}],t).each(function(e){t.preventDefault()})}(t,e)})},Cz=function(e){e.on("keyup compositionstart",d(Rw,e))},wz=oe().browser,xz=function(t){t.on("keydown",function(e){!1===e.isDefaultPrevented()&&function(e,t){Nx([{keyCode:Ah.END,action:hb(e,!0)},{keyCode:Ah.HOME,action:hb(e,!1)}],t).each(function(e){t.preventDefault()})}(t,e)})},zz=function(e){var t=nb.setupSelectedState(e);Cz(e),Sx(e,t),tz(e,t),pz(e),bz(e),Dw(e),xz(e)},Ez=Xi.DOM,Nz=function(t,e){var n,r,o=t.settings,i=t.getElement(),a=t.getDoc();o.inline||(t.getElement().style.visibility=t.orgVisibility),e||t.inline||(a.open(),a.write(t.iframeHTML),a.close()),t.inline&&(t.on("remove",function(){var e=this.getBody();Ez.removeClass(e,"mce-content-body"),Ez.removeClass(e,"mce-edit-focus"),Ez.setAttrib(e,"contentEditable",null)}),Ez.addClass(i,"mce-content-body"),t.contentDocument=a=j.document,t.contentWindow=j.window,t.bodyElement=i,t.contentAreaContainer=i,o.root_name=i.nodeName.toLowerCase()),(n=t.getBody()).disabled=!0,t.readonly=o.readonly,t.readonly||(t.inline&&"static"===Ez.getStyle(n,"position",!0)&&(n.style.position="relative"),n.contentEditable=t.getParam("content_editable_state",!0)),n.disabled=!1,t.editorUpload=th(t),t.schema=pr(o),t.dom=Xi(a,{keep_values:!0,url_converter:t.convertURL,url_converter_scope:t,hex_colors:o.force_hex_style_colors,update_styles:!0,root_element:t.inline?t.getBody():null,collect:function(){return t.inline},schema:t.schema,contentCssCors:Df(t),referrerPolicy:_f(t),onSetAttrib:function(e){t.fire("SetAttrib",e)}}),t.parser=function(u){var e=Np(u.settings,u.schema);return e.addAttributeFilter("src,href,style,tabindex",function(e,t){for(var n,r,o,i=e.length,a=u.dom;i--;)if(r=(n=e[i]).attr(t),o="data-mce-"+t,!n.attr(o)){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(o,r),n.attr(t,r)):"tabindex"===t?(n.attr(o,r),n.attr(t,null)):n.attr(o,u.convertURL(r,t,n.name))}}),e.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)}),e.addNodeFilter("#cdata",function(e){for(var t,n=e.length;n--;)(t=e[n]).type=8,t.name="#comment",t.value="[CDATA["+t.value+"]]"}),e.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var t,n=e.length,r=u.schema.getNonEmptyElements();n--;)(t=e[n]).isEmpty(r)&&0===t.getAll("br").length&&(t.append(new ul("br",1)).shortEnded=!0)}),e}(t),t.serializer=Ap(o,t),t.selection=ly(t.dom,t.getWin(),t.serializer,t),t.annotator=nl(t),t.formatter=Cp(t),t.undoManager=mm(t),t._nodeChangeDispatcher=new ph(t),t._selectionOverrides=om(t),Hw(t),Ow(t),zz(t),dh(t),t.fire("PreInit"),o.browser_spellcheck||o.gecko_spellcheck||(a.body.spellcheck=!1,Ez.setAttrib(n,"spellcheck","false")),t.quirks=_w(t),t.fire("PostRender");var u=Vf(t);u!==undefined&&(n.dir=u),o.protect&&t.on("BeforeSetContent",function(t){Mn.each(o.protect,function(e){t.content=t.content.replace(e,function(e){return"\x3c!--mce:protected "+escape(e)+"--\x3e"})})}),t.on("SetContent",function(){t.addVisual(t.getBody())}),t.load({initial:!0,format:"html"}),t.startContent=t.getContent({format:"raw"}),t.on("compositionstart compositionend",function(e){t.composing="compositionstart"===e.type}),0<t.contentStyles.length&&(r="",Mn.each(t.contentStyles,function(e){r+=e+"\r\n"}),t.dom.addStyle(r)),function(e){return e.inline?Ez.styleSheetLoader:e.dom.styleSheetLoader}(t).loadAll(t.contentCSS,function(e){Pw(t)},function(e){Pw(t)}),o.content_style&&function(e,t){var n=yt.fromDom(e.getDoc().head),r=yt.fromTag("style");Tt(r,"type","text/css"),Di(r,yt.fromText(t)),Di(n,r)}(t,o.content_style)},Sz=Xi.DOM,kz=function(e,t){var n=Lw(e,t);t.editorContainer&&(Sz.get(t.editorContainer).style.display=e.orgDisplay,e.hidden=Sz.isHidden(t.editorContainer)),e.getElement().style.display="none",Sz.setAttrib(e.id,"aria-hidden","true"),n||Nz(e)},Tz=Xi.DOM,Az=function(t,n,e){var r=jd.get(e),o=jd.urls[e]||t.documentBaseUrl.replace(/\/$/,"");if(e=Mn.trim(e),r&&-1===Mn.inArray(n,e)){if(Mn.each(jd.dependencies(e),function(e){Az(t,n,e)}),t.plugins[e])return;try{var i=new r(t,o,t.$);(t.plugins[e]=i).init&&(i.init(t,o),n.push(e))}catch(yN){Fd.pluginInitError(t,e,yN)}}},Mz=function(e){e.fire("ScriptsLoaded"),function(n){var e=Mn.trim(n.settings.icons),r=n.ui.registry.getAll().icons,t=G(G({},{"accessibility-check":'<svg width="24" height="24"><path d="M12 2a2 2 0 0 1 2 2 2 2 0 0 1-2 2 2 2 0 0 1-2-2c0-1.1.9-2 2-2zm8 7h-5v12c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-5c0-.6-.4-1-1-1a1 1 0 0 0-1 1v5c0 .6-.4 1-1 1a1 1 0 0 1-1-1V9H4a1 1 0 1 1 0-2h16c.6 0 1 .4 1 1s-.4 1-1 1z" fill-rule="nonzero"/></svg>',"action-next":'<svg width="24" height="24"><path fill-rule="nonzero" d="M5.7 7.3a1 1 0 0 0-1.4 1.4l7.7 7.7 7.7-7.7a1 1 0 1 0-1.4-1.4L12 13.6 5.7 7.3z"/></svg>',"action-prev":'<svg width="24" height="24"><path fill-rule="nonzero" d="M18.3 15.7a1 1 0 0 0 1.4-1.4L12 6.6l-7.7 7.7a1 1 0 0 0 1.4 1.4L12 9.4l6.3 6.3z"/></svg>',"align-center":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm3 4h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 1 1 0-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2zm-3-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2z" fill-rule="evenodd"/></svg>',"align-justify":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2z" fill-rule="evenodd"/></svg>',"align-left":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm0 4h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2z" fill-rule="evenodd"/></svg>',"align-none":'<svg width="24" height="24"><path d="M14.2 5L13 7H5a1 1 0 1 1 0-2h9.2zm4 0h.8a1 1 0 0 1 0 2h-2l1.2-2zm-6.4 4l-1.2 2H5a1 1 0 0 1 0-2h6.8zm4 0H19a1 1 0 0 1 0 2h-4.4l1.2-2zm-6.4 4l-1.2 2H5a1 1 0 0 1 0-2h4.4zm4 0H19a1 1 0 0 1 0 2h-6.8l1.2-2zM7 17l-1.2 2H5a1 1 0 0 1 0-2h2zm4 0h8a1 1 0 0 1 0 2H9.8l1.2-2zm5.2-13.5l1.3.7-9.7 16.3-1.3-.7 9.7-16.3z" fill-rule="evenodd"/></svg>',"align-right":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm6 4h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm-6-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2z" fill-rule="evenodd"/></svg>',"arrow-left":'<svg width="24" height="24"><path d="M5.6 13l12 6a1 1 0 0 0 1.4-1V6a1 1 0 0 0-1.4-.9l-12 6a1 1 0 0 0 0 1.8z" fill-rule="evenodd"/></svg>',"arrow-right":'<svg width="24" height="24"><path d="M18.5 13l-12 6A1 1 0 0 1 5 18V6a1 1 0 0 1 1.4-.9l12 6a1 1 0 0 1 0 1.8z" fill-rule="evenodd"/></svg>',bold:'<svg width="24" height="24"><path d="M7.8 19c-.3 0-.5 0-.6-.2l-.2-.5V5.7c0-.2 0-.4.2-.5l.6-.2h5c1.5 0 2.7.3 3.5 1 .7.6 1.1 1.4 1.1 2.5a3 3 0 0 1-.6 1.9c-.4.6-1 1-1.6 1.2.4.1.9.3 1.3.6s.8.7 1 1.2c.4.4.5 1 .5 1.6 0 1.3-.4 2.3-1.3 3-.8.7-2.1 1-3.8 1H7.8zm5-8.3c.6 0 1.2-.1 1.6-.5.4-.3.6-.7.6-1.3 0-1.1-.8-1.7-2.3-1.7H9.3v3.5h3.4zm.5 6c.7 0 1.3-.1 1.7-.4.4-.4.6-.9.6-1.5s-.2-1-.7-1.4c-.4-.3-1-.4-2-.4H9.4v3.8h4z" fill-rule="evenodd"/></svg>',bookmark:'<svg width="24" height="24"><path d="M6 4v17l6-4 6 4V4c0-.6-.4-1-1-1H7a1 1 0 0 0-1 1z" fill-rule="nonzero"/></svg>',"border-width":'<svg width="24" height="24"><path d="M5 14.8h14a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2zm-.5 3.7h15c.3 0 .5.2.5.5s-.2.5-.5.5h-15a.5.5 0 1 1 0-1zm.5-8.3h14c.6 0 1 .4 1 1v1c0 .5-.4 1-1 1H5a1 1 0 0 1-1-1v-1c0-.6.4-1 1-1zm0-5.7h14c.6 0 1 .4 1 1v2c0 .6-.4 1-1 1H5a1 1 0 0 1-1-1v-2c0-.6.4-1 1-1z" fill-rule="evenodd"/></svg>',brightness:'<svg width="24" height="24"><path d="M12 17c.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7v-1c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3zm0-10a1 1 0 0 1-.7-.3A1 1 0 0 1 11 6V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3zm7 4c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3h-1a1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1zM7 12c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3H5a1 1 0 0 1-.7-.3A1 1 0 0 1 4 12c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1c.3 0 .5.1.7.3.2.2.3.4.3.7zm10 3.5l.7.8c.2.1.3.4.3.6 0 .3-.1.6-.3.8a1 1 0 0 1-.8.3 1 1 0 0 1-.6-.3l-.8-.7a1 1 0 0 1-.3-.8c0-.2.1-.5.3-.7a1 1 0 0 1 1.4 0zm-10-7l-.7-.8a1 1 0 0 1-.3-.6c0-.3.1-.6.3-.8.2-.2.5-.3.8-.3.2 0 .5.1.7.3l.7.7c.2.2.3.5.3.8 0 .2-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.8-.3zm10 0a1 1 0 0 1-.8.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.3.1-.6.3-.8l.8-.7c.1-.2.4-.3.6-.3.3 0 .6.1.8.3.2.2.3.5.3.8 0 .2-.1.5-.3.7l-.7.7zm-10 7c.2-.2.5-.3.8-.3.2 0 .5.1.7.3a1 1 0 0 1 0 1.4l-.8.8a1 1 0 0 1-.6.3 1 1 0 0 1-.8-.3 1 1 0 0 1-.3-.8c0-.2.1-.5.3-.6l.7-.8zM12 8a4 4 0 0 1 3.7 2.4 4 4 0 0 1 0 3.2A4 4 0 0 1 12 16a4 4 0 0 1-3.7-2.4 4 4 0 0 1 0-3.2A4 4 0 0 1 12 8zm0 6.5c.7 0 1.3-.2 1.8-.7.5-.5.7-1.1.7-1.8s-.2-1.3-.7-1.8c-.5-.5-1.1-.7-1.8-.7s-1.3.2-1.8.7c-.5.5-.7 1.1-.7 1.8s.2 1.3.7 1.8c.5.5 1.1.7 1.8.7z" fill-rule="evenodd"/></svg>',browse:'<svg width="24" height="24"><path d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-4v-2h4V8H5v10h4v2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14zm-8 9.4l-2.3 2.3a1 1 0 1 1-1.4-1.4l4-4a1 1 0 0 1 1.4 0l4 4a1 1 0 0 1-1.4 1.4L13 13.4V20a1 1 0 0 1-2 0v-6.6z" fill-rule="nonzero"/></svg>',cancel:'<svg width="24" height="24"><path d="M12 4.6a7.4 7.4 0 1 1 0 14.8 7.4 7.4 0 0 1 0-14.8zM12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18zm0 8L14.8 8l1 1.1-2.7 2.8 2.7 2.7-1.1 1.1-2.7-2.7-2.7 2.7-1-1.1 2.6-2.7-2.7-2.7 1-1.1 2.8 2.7z" fill-rule="nonzero"/></svg>',"change-case":'<svg width="24" height="24"><path d="M18.4 18.2v-.6c-.5.8-1.3 1.2-2.4 1.2-2.2 0-3.3-1.6-3.3-4.8 0-3.1 1-4.7 3.3-4.7 1.1 0 1.8.3 2.4 1.1v-.6c0-.5.4-.8.8-.8s.8.3.8.8v8.4c0 .5-.4.8-.8.8a.8.8 0 0 1-.8-.8zm-2-7.4c-1.3 0-1.8.9-1.8 3.2 0 2.4.5 3.3 1.7 3.3 1.3 0 1.8-.9 1.8-3.2 0-2.4-.5-3.3-1.7-3.3zM10 15.7H5.5l-.8 2.6a1 1 0 0 1-1 .7h-.2a.7.7 0 0 1-.7-1l4-12a1 1 0 1 1 2 0l4 12a.7.7 0 0 1-.8 1h-.2a1 1 0 0 1-1-.7l-.8-2.6zm-.3-1.5l-2-6.5-1.9 6.5h3.9z" fill-rule="evenodd"/></svg>',"character-count":'<svg width="24" height="24"><path d="M4 11.5h16v1H4v-1zm4.8-6.8V10H7.7V5.8h-1v-1h2zM11 8.3V9h2v1h-3V7.7l2-1v-.9h-2v-1h3v2.4l-2 1zm6.3-3.4V10h-3.1V9h2.1V8h-2.1V6.8h2.1v-1h-2.1v-1h3.1zM5.8 16.4c0-.5.2-.8.5-1 .2-.2.6-.3 1.2-.3l.8.1c.2 0 .4.2.5.3l.4.4v2.8l.2.3H8.2v-.1-.2l-.6.3H7c-.4 0-.7 0-1-.2a1 1 0 0 1-.3-.9c0-.3 0-.6.3-.8.3-.2.7-.4 1.2-.4l.6-.2h.3v-.2l-.1-.2a.8.8 0 0 0-.5-.1 1 1 0 0 0-.4 0l-.3.4h-1zm2.3.8h-.2l-.2.1-.4.1a1 1 0 0 0-.4.2l-.2.2.1.3.5.1h.4l.4-.4v-.6zm2-3.4h1.2v1.7l.5-.3h.5c.5 0 .9.1 1.2.5.3.4.5.8.5 1.4 0 .6-.2 1.1-.5 1.5-.3.4-.7.6-1.3.6l-.6-.1-.4-.4v.4h-1.1v-5.4zm1.1 3.3c0 .3 0 .6.2.8a.7.7 0 0 0 1.2 0l.2-.8c0-.4 0-.6-.2-.8a.7.7 0 0 0-.6-.3l-.6.3-.2.8zm6.1-.5c0-.2 0-.3-.2-.4a.8.8 0 0 0-.5-.2c-.3 0-.5.1-.6.3l-.2.9c0 .3 0 .6.2.8.1.2.3.3.6.3.2 0 .4 0 .5-.2l.2-.4h1.1c0 .5-.3.8-.6 1.1a2 2 0 0 1-1.3.4c-.5 0-1-.2-1.3-.6a2 2 0 0 1-.5-1.4c0-.6.1-1.1.5-1.5.3-.4.8-.5 1.4-.5.5 0 1 0 1.2.3.4.3.5.7.5 1.2h-1v-.1z" fill-rule="evenodd"/></svg>',"checklist-rtl":'<svg width="24" height="24"><path d="M5 17h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm14.2 11c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 8c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',checklist:'<svg width="24" height="24"><path d="M11 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0-6h8a1 1 0 0 1 0 2h-8a1 1 0 0 1 0-2zM7.2 16c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 8c-.2.3-.7.4-1 0L3.8 6.9a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',checkmark:'<svg width="24" height="24"><path d="M18.2 5.4a1 1 0 0 1 1.6 1.2l-8 12a1 1 0 0 1-1.5.1l-5-5a1 1 0 1 1 1.4-1.4l4.1 4.1 7.4-11z" fill-rule="nonzero"/></svg>',"chevron-down":'<svg width="10" height="10"><path d="M8.7 2.2c.3-.3.8-.3 1 0 .4.4.4.9 0 1.2L5.7 7.8c-.3.3-.9.3-1.2 0L.2 3.4a.8.8 0 0 1 0-1.2c.3-.3.8-.3 1.1 0L5 6l3.7-3.8z" fill-rule="nonzero"/></svg>',"chevron-left":'<svg width="10" height="10"><path d="M7.8 1.3L4 5l3.8 3.7c.3.3.3.8 0 1-.4.4-.9.4-1.2 0L2.2 5.7a.8.8 0 0 1 0-1.2L6.6.2C7 0 7.4 0 7.8.2c.3.3.3.8 0 1.1z" fill-rule="nonzero"/></svg>',"chevron-right":'<svg width="10" height="10"><path d="M2.2 1.3a.8.8 0 0 1 0-1c.4-.4.9-.4 1.2 0l4.4 4.1c.3.4.3.9 0 1.2L3.4 9.8c-.3.3-.8.3-1.2 0a.8.8 0 0 1 0-1.1L6 5 2.2 1.3z" fill-rule="nonzero"/></svg>',"chevron-up":'<svg width="10" height="10"><path d="M8.7 7.8L5 4 1.3 7.8c-.3.3-.8.3-1 0a.8.8 0 0 1 0-1.2l4.1-4.4c.3-.3.9-.3 1.2 0l4.2 4.4c.3.3.3.9 0 1.2-.3.3-.8.3-1.1 0z" fill-rule="nonzero"/></svg>',close:'<svg width="24" height="24"><path d="M17.3 8.2L13.4 12l3.9 3.8a1 1 0 0 1-1.5 1.5L12 13.4l-3.8 3.9a1 1 0 0 1-1.5-1.5l3.9-3.8-3.9-3.8a1 1 0 0 1 1.5-1.5l3.8 3.9 3.8-3.9a1 1 0 0 1 1.5 1.5z" fill-rule="evenodd"/></svg>',"code-sample":'<svg width="24" height="26"><path d="M7.1 11a2.8 2.8 0 0 1-.8 2 2.8 2.8 0 0 1 .8 2v1.7c0 .3.1.6.4.8.2.3.5.4.8.4.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.7 0-1.4-.3-2-.8-.5-.6-.8-1.3-.8-2V15c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 0 1-.4-.4v-.8c0-.2.2-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V9.3c0-.7.3-1.4.8-2 .6-.5 1.3-.8 2-.8.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8V11zm9.8 0V9.3c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 0 1-.4-.4V7c0-.2.1-.4.4-.4.7 0 1.4.3 2 .8.5.6.8 1.3.8 2V11c0 .3.1.6.4.8.2.3.5.4.8.4.2 0 .4.2.4.4v.8c0 .2-.2.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8v1.7c0 .7-.3 1.4-.8 2-.6.5-1.3.8-2 .8a.4.4 0 0 1-.4-.4v-.8c0-.2.1-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V15a2.8 2.8 0 0 1 .8-2 2.8 2.8 0 0 1-.8-2zm-3.3-.4c0 .4-.1.8-.5 1.1-.3.3-.7.5-1.1.5-.4 0-.8-.2-1.1-.5-.4-.3-.5-.7-.5-1.1 0-.5.1-.9.5-1.2.3-.3.7-.4 1.1-.4.4 0 .8.1 1.1.4.4.3.5.7.5 1.2zM12 13c.4 0 .8.1 1.1.5.4.3.5.7.5 1.1 0 1-.1 1.6-.5 2a3 3 0 0 1-1.1 1c-.4.3-.8.4-1.1.4a.5.5 0 0 1-.5-.5V17a3 3 0 0 0 1-.2l.6-.6c-.6 0-1-.2-1.3-.5-.2-.3-.3-.7-.3-1 0-.5.1-1 .5-1.2.3-.4.7-.5 1.1-.5z" fill-rule="evenodd"/></svg>',"color-levels":'<svg width="24" height="24"><path d="M17.5 11.4A9 9 0 0 1 18 14c0 .5 0 1-.2 1.4 0 .4-.3.9-.5 1.3a6.2 6.2 0 0 1-3.7 3 5.7 5.7 0 0 1-3.2 0A5.9 5.9 0 0 1 7.6 18a6.2 6.2 0 0 1-1.4-2.6 6.7 6.7 0 0 1 0-2.8c0-.4.1-.9.3-1.3a13.6 13.6 0 0 1 2.3-4A20 20 0 0 1 12 4a26.4 26.4 0 0 1 3.2 3.4 18.2 18.2 0 0 1 2.3 4zm-2 4.5c.4-.7.5-1.4.5-2a7.3 7.3 0 0 0-1-3.2c.2.6.2 1.2.2 1.9a4.5 4.5 0 0 1-1.3 3 5.3 5.3 0 0 1-2.3 1.5 4.9 4.9 0 0 1-2 .1 4.3 4.3 0 0 0 2.4.8 4 4 0 0 0 2-.6 4 4 0 0 0 1.5-1.5z" fill-rule="evenodd"/></svg>',"color-picker":'<svg width="24" height="24"><path d="M12 3a9 9 0 0 0 0 18 1.5 1.5 0 0 0 1.1-2.5c-.2-.3-.4-.6-.4-1 0-.8.7-1.5 1.5-1.5H16a5 5 0 0 0 5-5c0-4.4-4-8-9-8zm-5.5 9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm3-4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm3 4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z" fill-rule="nonzero"/></svg>',"color-swatch-remove-color":'<svg width="24" height="24"><path stroke="#000" stroke-width="2" d="M21 3L3 21" fill-rule="evenodd"/></svg>',"color-swatch":'<svg width="24" height="24"><rect x="3" y="3" width="18" height="18" rx="1" fill-rule="evenodd"/></svg>',"comment-add":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9 19l3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 0 0-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3h-6.4L7 23z"/><path d="M13 10h2a1 1 0 0 1 0 2h-2v2a1 1 0 0 1-2 0v-2H9a1 1 0 0 1 0-2h2V8a1 1 0 0 1 2 0v2z"/></g></svg>',comment:'<svg width="24" height="24"><path fill-rule="nonzero" d="M9 19l3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 0 0-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3h-6.4L7 23z"/></svg>',contrast:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4zm-6 8a6 6 0 0 0 6 6V6a6 6 0 0 0-6 6z" fill-rule="evenodd"/></svg>',copy:'<svg width="24" height="24"><path d="M16 3H6a2 2 0 0 0-2 2v11h2V5h10V3zm1 4a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V9c0-1.2.9-2 2-2h7zm0 12V9h-7v10h7z" fill-rule="nonzero"/></svg>',crop:'<svg width="24" height="24"><path d="M17 8v7h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v2c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-2H7V9H5a1 1 0 1 1 0-2h2V5c0-.6.4-1 1-1s1 .4 1 1v2h7l3-3 1 1-3 3zM9 9v5l5-5H9zm1 6h5v-5l-5 5z" fill-rule="evenodd"/></svg>',cut:'<svg width="24" height="24"><path d="M18 15c.6.7 1 1.4 1 2.3 0 .8-.2 1.5-.7 2l-.8.5-1 .2c-.4 0-.8 0-1.2-.3a3.9 3.9 0 0 1-2.1-2.2c-.2-.5-.3-1-.2-1.5l-1-1-1 1c0 .5 0 1-.2 1.5-.1.5-.4 1-.9 1.4-.3.4-.7.6-1.2.8l-1.2.3c-.4 0-.7 0-1-.2-.3 0-.6-.3-.8-.5-.5-.5-.8-1.2-.7-2 0-.9.4-1.6 1-2.2A3.7 3.7 0 0 1 8.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 0 1 0-2c0-.4.3-.7.5-1l6 6 6-6 .5 1a3.3 3.3 0 0 1 0 2c0 .4-.3.7-.5 1l-4 4 1 1h.5c.4 0 .8 0 1.2.3.5.2.9.4 1.2.8zm-8.5 2.2l.1-.4v-.3-.4a1 1 0 0 0-.2-.5 1 1 0 0 0-.4-.2 1.6 1.6 0 0 0-.8 0 2.6 2.6 0 0 0-.8.3 2.5 2.5 0 0 0-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 0 0 .8-.3 2.8 2.8 0 0 0 1-1zm2.5-2.8c.4 0 .7-.1 1-.4.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4s-.7.1-1 .4c-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4zm5.4 4l.2-.5v-.4-.3a2.6 2.6 0 0 0-.3-.8 2.4 2.4 0 0 0-.7-.7 2.5 2.5 0 0 0-.8-.3 1.5 1.5 0 0 0-.8 0 1 1 0 0 0-.4.2 1 1 0 0 0-.2.5 1.5 1.5 0 0 0 0 .7v.4l.3.4.3.4a2.8 2.8 0 0 0 .8.5l.4.1h.7l.5-.2z" fill-rule="evenodd"/></svg>',"document-properties":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h10a2 2 0 0 0 2-2V7.6L14.4 3zM17 19H7V5h6v4h4v10z" fill-rule="nonzero"/></svg>',drag:'<svg width="24" height="24"><path d="M13 5h2v2h-2V5zm0 4h2v2h-2V9zM9 9h2v2H9V9zm4 4h2v2h-2v-2zm-4 0h2v2H9v-2zm0 4h2v2H9v-2zm4 0h2v2h-2v-2zM9 5h2v2H9V5z" fill-rule="evenodd"/></svg>',duplicate:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M16 3v2H6v11H4V5c0-1.1.9-2 2-2h10zm3 8h-2V9h-7v10h9a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V9c0-1.2.9-2 2-2h7a2 2 0 0 1 2 2v2z"/><path d="M17 14h1a1 1 0 0 1 0 2h-1v1a1 1 0 0 1-2 0v-1h-1a1 1 0 0 1 0-2h1v-1a1 1 0 0 1 2 0v1z"/></g></svg>',"edit-block":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19.8 8.8l-9.4 9.4c-.2.2-.5.4-.9.4l-5.4 1.2 1.2-5.4.5-.8 9.4-9.4c.7-.7 1.8-.7 2.5 0l2.1 2.1c.7.7.7 1.8 0 2.5zm-2-.2l1-.9v-.3l-2.2-2.2a.3.3 0 0 0-.3 0l-1 1L18 8.5zm-1 1l-2.5-2.4-6 6 2.5 2.5 6-6zm-7 7.1l-2.6-2.4-.3.3-.1.2-.7 3 3.1-.6h.1l.4-.5z"/></svg>',"edit-image":'<svg width="24" height="24"><path d="M18 16h2V7a2 2 0 0 0-2-2H7v2h11v9zM6 17h15a1 1 0 0 1 0 2h-1v1a1 1 0 0 1-2 0v-1H6a2 2 0 0 1-2-2V7H3a1 1 0 1 1 0-2h1V4a1 1 0 1 1 2 0v13zm3-5.3l1.3 2 3-4.7 3.7 6H7l2-3.3z" fill-rule="nonzero"/></svg>',"embed-page":'<svg width="24" height="24"><path d="M19 6V5H5v14h2A13 13 0 0 1 19 6zm0 1.4c-.8.8-1.6 2.4-2.2 4.6H19V7.4zm0 5.6h-2.4c-.4 1.8-.6 3.8-.6 6h3v-6zm-4 6c0-2.2.2-4.2.6-6H13c-.7 1.8-1.1 3.8-1.1 6h3zm-4 0c0-2.2.4-4.2 1-6H9.6A12 12 0 0 0 8 19h3zM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1zm11.8 9c.4-1.9 1-3.4 1.8-4.5a9.2 9.2 0 0 0-4 4.5h2.2zm-3.4 0a12 12 0 0 1 2.8-4 12 12 0 0 0-5 4h2.2z" fill-rule="nonzero"/></svg>',embed:'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1zm1 2v14h14V5H5zm4.8 2.6l5.6 4a.5.5 0 0 1 0 .8l-5.6 4A.5.5 0 0 1 9 16V8a.5.5 0 0 1 .8-.4z" fill-rule="nonzero"/></svg>',emoji:'<svg width="24" height="24"><path d="M9 11c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 0 0-1 1c0 .6.4 1 1 1zm6 0c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 0 0-1 1c0 .6.4 1 1 1zm-3 5.5c2.1 0 4-1.5 4.4-3.5H7.6c.5 2 2.3 3.5 4.4 3.5zM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm0 14.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13z" fill-rule="nonzero"/></svg>',fill:'<svg width="24" height="26"><path d="M16.6 12l-9-9-1.4 1.4 2.4 2.4-5.2 5.1c-.5.6-.5 1.6 0 2.2L9 19.6a1.5 1.5 0 0 0 2.2 0l5.5-5.5c.5-.6.5-1.6 0-2.2zM5.2 13L10 8.2l4.8 4.8H5.2zM19 14.5s-2 2.2-2 3.5c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.3-2-3.5-2-3.5z" fill-rule="nonzero"/></svg>',"flip-horizontally":'<svg width="24" height="24"><path d="M14 19h2v-2h-2v2zm4-8h2V9h-2v2zM4 7v10c0 1.1.9 2 2 2h3v-2H6V7h3V5H6a2 2 0 0 0-2 2zm14-2v2h2a2 2 0 0 0-2-2zm-7 16h2V3h-2v18zm7-6h2v-2h-2v2zm-4-8h2V5h-2v2zm4 12a2 2 0 0 0 2-2h-2v2z" fill-rule="nonzero"/></svg>',"flip-vertically":'<svg width="24" height="24"><path d="M5 14v2h2v-2H5zm8 4v2h2v-2h-2zm4-14H7a2 2 0 0 0-2 2v3h2V6h10v3h2V6a2 2 0 0 0-2-2zm2 14h-2v2a2 2 0 0 0 2-2zM3 11v2h18v-2H3zm6 7v2h2v-2H9zm8-4v2h2v-2h-2zM5 18c0 1.1.9 2 2 2v-2H5z" fill-rule="nonzero"/></svg>',"format-painter":'<svg width="24" height="24"><path d="M18 5V4c0-.5-.4-1-1-1H5a1 1 0 0 0-1 1v4c0 .6.5 1 1 1h12c.6 0 1-.4 1-1V7h1v4H9v9c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-7h8V5h-3z" fill-rule="nonzero"/></svg>',fullscreen:'<svg width="24" height="24"><path d="M15.3 10l-1.2-1.3 2.9-3h-2.3a.9.9 0 1 1 0-1.7H19c.5 0 .9.4.9.9v4.4a.9.9 0 1 1-1.8 0V7l-2.9 3zm0 4l3 3v-2.3a.9.9 0 1 1 1.7 0V19c0 .5-.4.9-.9.9h-4.4a.9.9 0 1 1 0-1.8H17l-3-2.9 1.3-1.2zM10 15.4l-2.9 3h2.3a.9.9 0 1 1 0 1.7H5a.9.9 0 0 1-.9-.9v-4.4a.9.9 0 1 1 1.8 0V17l2.9-3 1.2 1.3zM8.7 10L5.7 7v2.3a.9.9 0 0 1-1.7 0V5c0-.5.4-.9.9-.9h4.4a.9.9 0 0 1 0 1.8H7l3 2.9-1.3 1.2z" fill-rule="nonzero"/></svg>',gallery:'<svg width="24" height="24"><path fill-rule="nonzero" d="M5 15.7l2.3-2.2c.3-.3.7-.3 1 0L11 16l5.1-5c.3-.4.8-.4 1 0l2 1.9V8H5v7.7zM5 18V19h3l1.8-1.9-2-2L5 17.9zm14-3l-2.5-2.4-6.4 6.5H19v-4zM4 6h16c.6 0 1 .4 1 1v13c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V7c0-.6.4-1 1-1zm6 7a2 2 0 1 1 0-4 2 2 0 0 1 0 4zM4.5 4h15a.5.5 0 1 1 0 1h-15a.5.5 0 0 1 0-1zm2-2h11a.5.5 0 1 1 0 1h-11a.5.5 0 0 1 0-1z"/></svg>',gamma:'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1zm1 2v14h14V5H5zm6.5 11.8V14L9.2 8.7a5.1 5.1 0 0 0-.4-.8l-.1-.2H8 8v-1l.3-.1.3-.1h.7a1 1 0 0 1 .6.5l.1.3a8.5 8.5 0 0 1 .3.6l1.9 4.6 2-5.2a1 1 0 0 1 1-.6.5.5 0 0 1 .5.6L13 14v2.8a.7.7 0 0 1-1.4 0z" fill-rule="nonzero"/></svg>',help:'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M12 5.5a6.5 6.5 0 0 0-6 9 6.3 6.3 0 0 0 1.4 2l1 1a6.3 6.3 0 0 0 3.6 1 6.5 6.5 0 0 0 6-9 6.3 6.3 0 0 0-1.4-2l-1-1a6.3 6.3 0 0 0-3.6-1zM12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4z"/><path d="M9.6 9.7a.7.7 0 0 1-.7-.8c0-1.1 1.5-1.8 3.2-1.8 1.8 0 3.2.8 3.2 2.4 0 1.4-.4 2.1-1.5 2.8-.2 0-.3.1-.3.2a2 2 0 0 0-.8.8.8.8 0 0 1-1.4-.6c.3-.7.8-1 1.3-1.5l.4-.2c.7-.4.8-.6.8-1.5 0-.5-.6-.9-1.7-.9-.5 0-1 .1-1.4.3-.2 0-.3.1-.3.2v-.2c0 .4-.4.8-.8.8z" fill-rule="nonzero"/><circle cx="12" cy="16" r="1"/></g></svg>',"highlight-bg-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path id="tox-icon-highlight-bg-color__color" d="M3 18h18v3H3z"/><path fill-rule="nonzero" d="M7.7 16.7H3l3.3-3.3-.7-.8L10.2 8l4 4.1-4 4.2c-.2.2-.6.2-.8 0l-.6-.7-1.1 1.1zm5-7.5L11 7.4l3-2.9a2 2 0 0 1 2.6 0L18 6c.7.7.7 2 0 2.7l-2.9 2.9-1.8-1.8-.5-.6"/></g></svg>',home:'<svg width="24" height="24"><path fill-rule="nonzero" d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>',"horizontal-rule":'<svg width="24" height="24"><path d="M4 11h16v2H4z" fill-rule="evenodd"/></svg>',"image-options":'<svg width="24" height="24"><path d="M6 10a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2zm12 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2zm-6 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2z" fill-rule="nonzero"/></svg>',image:'<svg width="24" height="24"><path d="M5 15.7l3.3-3.2c.3-.3.7-.3 1 0L12 15l4.1-4c.3-.4.8-.4 1 0l2 1.9V5H5v10.7zM5 18V19h3l2.8-2.9-2-2L5 17.9zm14-3l-2.5-2.4-6.4 6.5H19v-4zM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1zm6 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4z" fill-rule="nonzero"/></svg>',indent:'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 1 1 0-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2zm-5 4h12a1 1 0 0 1 0 2H7a1 1 0 0 1 0-2zm-2.6-3.8L6.2 12l-1.8-1.2a1 1 0 0 1 1.2-1.6l3 2a1 1 0 0 1 0 1.6l-3 2a1 1 0 1 1-1.2-1.6z" fill-rule="evenodd"/></svg>',info:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4zm-1 3v2h2V7h-2zm3 10v-1h-1v-5h-3v1h1v4h-1v1h4z" fill-rule="evenodd"/></svg>',"insert-character":'<svg width="24" height="24"><path d="M15 18h4l1-2v4h-6v-3.3l1.4-1a6 6 0 0 0 1.8-2.9 6.3 6.3 0 0 0-.1-4.1 5.8 5.8 0 0 0-3-3.2c-.6-.3-1.3-.5-2.1-.5a5.1 5.1 0 0 0-3.9 1.8 6.3 6.3 0 0 0-1.3 6 6.2 6.2 0 0 0 1.8 3l1.4.9V20H4v-4l1 2h4v-.5l-2-1L5.4 15A6.5 6.5 0 0 1 4 11c0-1 .2-1.9.6-2.7A7 7 0 0 1 6.3 6C7.1 5.4 8 5 9 4.5c1-.3 2-.5 3.1-.5a8.8 8.8 0 0 1 5.7 2 7 7 0 0 1 1.7 2.3 6 6 0 0 1 .2 4.8c-.2.7-.6 1.3-1 1.9a7.6 7.6 0 0 1-3.6 2.5v.5z" fill-rule="evenodd"/></svg>',"insert-time":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M12 19a7 7 0 1 0 0-14 7 7 0 0 0 0 14zm0 2a9 9 0 1 1 0-18 9 9 0 0 1 0 18z"/><path d="M16 12h-3V7c0-.6-.4-1-1-1a1 1 0 0 0-1 1v7h5c.6 0 1-.4 1-1s-.4-1-1-1z"/></g></svg>',invert:'<svg width="24" height="24"><path d="M18 19.3L16.5 18a5.8 5.8 0 0 1-3.1 1.9 6.1 6.1 0 0 1-5.5-1.6A5.8 5.8 0 0 1 6 14v-.3l.1-1.2A13.9 13.9 0 0 1 7.7 9l-3-3 .7-.8 2.8 2.9 9 8.9 1.5 1.6-.7.6zm0-5.5v.3l-.1 1.1-.4 1-1.2-1.2a4.3 4.3 0 0 0 .2-1v-.2c0-.4 0-.8-.2-1.3l-.5-1.4a14.8 14.8 0 0 0-3-4.2L12 6a26.1 26.1 0 0 0-2.2 2.5l-1-1a20.9 20.9 0 0 1 2.9-3.3L12 4l1 .8a22.2 22.2 0 0 1 4 5.4c.6 1.2 1 2.4 1 3.6z" fill-rule="evenodd"/></svg>',italic:'<svg width="24" height="24"><path d="M16.7 4.7l-.1.9h-.3c-.6 0-1 0-1.4.3-.3.3-.4.6-.5 1.1l-2.1 9.8v.6c0 .5.4.8 1.4.8h.2l-.2.8H8l.2-.8h.2c1.1 0 1.8-.5 2-1.5l2-9.8.1-.5c0-.6-.4-.8-1.4-.8h-.3l.2-.9h5.8z" fill-rule="evenodd"/></svg>',line:'<svg width="24" height="24"><path d="M15 9l-8 8H4v-3l8-8 3 3zm1-1l-3-3 1-1h1c-.2 0 0 0 0 0l2 2s0 .2 0 0v1l-1 1zM4 18h16v2H4v-2z" fill-rule="evenodd"/></svg>',link:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 0 1 1.4 1.4l-2.1 2a2 2 0 1 0 2.7 2.8l4.8-4.8a1 1 0 0 0 0-1.4 1 1 0 1 1 1.4-1.3 2.9 2.9 0 0 1 0 4L9.6 20a3.9 3.9 0 0 1-5.5-5.5l2-2zm11.6-.6a1 1 0 0 1-1.4-1.4l2-2a2 2 0 1 0-2.6-2.8L11 10.3a1 1 0 0 0 0 1.4A1 1 0 1 1 9.6 13a2.9 2.9 0 0 1 0-4L14.4 4a3.9 3.9 0 0 1 5.5 5.5l-2 2z" fill-rule="nonzero"/></svg>',"list-bull-circle":'<svg width="48" height="48"><g fill-rule="evenodd"><path d="M11 16a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6zM11 26a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6zM11 36a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6z" fill-rule="nonzero"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-bull-default":'<svg width="48" height="48"><g fill-rule="evenodd"><circle cx="11" cy="14" r="3"/><circle cx="11" cy="24" r="3"/><circle cx="11" cy="34" r="3"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-bull-square":'<svg width="48" height="48"><g fill-rule="evenodd"><path d="M8 11h6v6H8zM8 21h6v6H8zM8 31h6v6H8z"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-num-default-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 17v-4.8l-1.6 1v-1.1l1.6-1h1.2V17zM33.3 17.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm1.7 5.7c0-1.2 1-2 2.2-2 1.3 0 2.1.8 2.1 1.8 0 .7-.3 1.2-1.3 2.2l-1.2 1v.2h2.6v1h-4.3v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H35zm-1.7 4.3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm3.2 7.3v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H35c0-1.1 1-1.8 2.2-1.8 1.2 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.7.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .6 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm-3.3 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',"list-num-default":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10 17v-4.8l-1.5 1v-1.1l1.6-1h1.2V17h-1.2zm3.6.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm-5 5.7c0-1.2.8-2 2.1-2s2.1.8 2.1 1.8c0 .7-.3 1.2-1.4 2.2l-1.1 1v.2h2.6v1H8.6v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H8.5zm6.3 4.3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM10 34.4v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H8.6c0-1.1 1-1.8 2.2-1.8 1.3 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.8.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .7 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm4.7 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',"list-num-lower-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M36.5 16c-.9 0-1.5-.5-1.5-1.3s.6-1.3 1.8-1.4h1v-.4c0-.4-.2-.6-.7-.6-.4 0-.7.1-.8.4h-1.1c0-.8.8-1.4 2-1.4S39 12 39 13V16h-1.2v-.6c-.3.4-.8.7-1.4.7zm.4-.8c.6 0 1-.4 1-.9V14h-1c-.5.1-.7.3-.7.6 0 .4.3.6.7.6zM33.1 16.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zM37.7 26c-.7 0-1.2-.2-1.5-.7v.7H35v-6.3h1.2v2.5c.3-.5.8-.9 1.5-.9 1.1 0 1.8 1 1.8 2.4 0 1.5-.7 2.4-1.8 2.4zm-.5-3.6c-.6 0-1 .5-1 1.3s.4 1.4 1 1.4c.7 0 1-.6 1-1.4 0-.8-.3-1.3-1-1.3zM33.2 26.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm6 7h-1c-.1-.5-.4-.8-1-.8s-1 .5-1 1.4c0 1 .4 1.4 1 1.4.5 0 .9-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm-6.1 3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.3 15.2c.5 0 1-.4 1-.9V14h-1c-.5.1-.8.3-.8.6 0 .4.3.6.8.6zm-.4.9c-1 0-1.5-.6-1.5-1.4 0-.8.6-1.3 1.7-1.4h1.1v-.4c0-.4-.2-.6-.7-.6-.5 0-.8.1-.9.4h-1c0-.8.8-1.4 2-1.4 1.1 0 1.8.6 1.8 1.6V16h-1.1v-.6h-.1c-.2.4-.7.7-1.3.7zm4.6 0c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-3.2 10c-.6 0-1.2-.3-1.4-.8v.7H8.5v-6.3H10v2.5c.3-.5.8-.9 1.4-.9 1.2 0 1.9 1 1.9 2.4 0 1.5-.7 2.4-1.9 2.4zm-.4-3.7c-.7 0-1 .5-1 1.3s.3 1.4 1 1.4c.6 0 1-.6 1-1.4 0-.8-.4-1.3-1-1.3zm4 3.7c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-2.2 7h-1.2c0-.5-.4-.8-.9-.8-.6 0-1 .5-1 1.4 0 1 .4 1.4 1 1.4.5 0 .8-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm1.8 3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-greek-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 16c-1.2 0-2-.8-2-2.3 0-1.5.8-2.4 2-2.4.6 0 1 .4 1.3 1v-.9H40v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1-.7h-.2c-.2.4-.7.8-1.3.8zm.3-1c.6 0 1-.5 1-1.3s-.4-1.3-1-1.3-1 .5-1 1.3.4 1.4 1 1.4zM33.3 16.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM36 21.9c0-1.5.8-2.3 2.1-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.9 1.3.9.3 1.3.8 1.3 1.7 0 1.2-.7 1.9-1.8 1.9-.6 0-1.1-.3-1.4-.8v2.2H36V22zm1.8 1.2v-1h.3c.5 0 .9-.2.9-.7 0-.5-.3-.8-.9-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1 1.3s1-.4 1-1-.4-1-1.2-1h-.3zM33.3 26.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM37.1 34.6L34.8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.2.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2zm.7 1a2 2 0 0 0-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1zM33.3 36.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-greek":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.5 15c.7 0 1-.5 1-1.3s-.3-1.3-1-1.3c-.5 0-.9.5-.9 1.3s.4 1.4 1 1.4zm-.3 1c-1.1 0-1.8-.8-1.8-2.3 0-1.5.7-2.4 1.8-2.4.7 0 1.1.4 1.3 1h.1v-.9h1.2v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1.1-.7h-.1c-.2.4-.7.8-1.4.8zm5 .1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm-4.9 7v-1h.3c.6 0 1-.2 1-.7 0-.5-.4-.8-1-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1.1 1.3.6 0 1-.4 1-1s-.5-1-1.3-1h-.3zM8.6 22c0-1.5.7-2.3 2-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.8 1.3.8.3 1.3.8 1.3 1.7 0 1.2-.8 1.9-1.9 1.9-.6 0-1.1-.3-1.3-.8v2.2H8.5V22zm6.2 4.2c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm-4.5 8.5L8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.1.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2zm.7 1a2 2 0 0 0-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1zm4.5.5c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M32.9 16v-1.2h-1.3V16H33zm0 10v-1.2h-1.3V26H33zm0 10v-1.2h-1.3V36H33z"/><path fill-rule="nonzero" d="M36 21h-1.5v5H36zM36 31h-1.5v5H36zM39 21h-1.5v5H39zM39 31h-1.5v5H39zM42 31h-1.5v5H42zM36 11h-1.5v5H36zM36 19h-1.5v1H36zM36 29h-1.5v1H36zM39 19h-1.5v1H39zM39 29h-1.5v1H39zM42 29h-1.5v1H42zM36 9h-1.5v1H36z"/></g></svg>',"list-num-lower-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 16v-1.2h1.3V16H15zm0 10v-1.2h1.3V26H15zm0 10v-1.2h1.3V36H15z"/><path fill-rule="nonzero" d="M12 21h1.5v5H12zM12 31h1.5v5H12zM9 21h1.5v5H9zM9 31h1.5v5H9zM6 31h1.5v5H6zM12 11h1.5v5H12zM12 19h1.5v1H12zM12 29h1.5v1H12zM9 19h1.5v1H9zM9 29h1.5v1H9zM6 29h1.5v1H6zM12 9h1.5v1H12z"/></g></svg>',"list-num-upper-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M39.3 17l-.5-1.4h-2l-.5 1.4H35l2-6h1.6l2 6h-1.3zm-1.6-4.7l-.7 2.3h1.6l-.8-2.3zM33.4 17c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm4.7 9.9h-2.7v-6H38c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7zm-1.4-5v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1zm0 4h1.1c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9h-1.1V26zM33 27.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm4.9 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2zm-4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-upper-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M12.6 17l-.5-1.4h-2L9.5 17H8.3l2-6H12l2 6h-1.3zM11 12.3l-.7 2.3h1.6l-.8-2.3zm4.7 4.8c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zM11.4 27H8.7v-6h2.6c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7zM10 22v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1zm0 4H11c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9H10V26zm5.4 1.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-4.1 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2zm4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-upper-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M31.6 17v-1.2H33V17h-1.3zm0 10v-1.2H33V27h-1.3zm0 10v-1.2H33V37h-1.3z"/><path fill-rule="nonzero" d="M34.5 20H36v7h-1.5zM34.5 30H36v7h-1.5zM37.5 20H39v7h-1.5zM37.5 30H39v7h-1.5zM40.5 30H42v7h-1.5zM34.5 10H36v7h-1.5z"/></g></svg>',"list-num-upper-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 17v-1.2h1.3V17H15zm0 10v-1.2h1.3V27H15zm0 10v-1.2h1.3V37H15z"/><path fill-rule="nonzero" d="M12 20h1.5v7H12zM12 30h1.5v7H12zM9 20h1.5v7H9zM9 30h1.5v7H9zM6 30h1.5v7H6zM12 10h1.5v7H12z"/></g></svg>',lock:'<svg width="24" height="24"><path d="M16.3 11c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H8V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h.3zM10 8v3h4V8a1 1 0 0 0-.3-.7A1 1 0 0 0 13 7h-2a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7z" fill-rule="evenodd"/></svg>',ltr:'<svg width="24" height="24"><path d="M11 5h7a1 1 0 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 7.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L11 5zM4.4 16.2L6.2 15l-1.8-1.2a1 1 0 0 1 1.2-1.6l3 2a1 1 0 0 1 0 1.6l-3 2a1 1 0 1 1-1.2-1.6z" fill-rule="evenodd"/></svg>',"more-drawer":'<svg width="24" height="24"><path d="M6 10a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2zm12 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2zm-6 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2z" fill-rule="nonzero"/></svg>',"new-document":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h10a2 2 0 0 0 2-2V7.6L14.4 3zM17 19H7V5h6v4h4v10z" fill-rule="nonzero"/></svg>',"new-tab":'<svg width="24" height="24"><path d="M15 13l2-2v8H5V7h8l-2 2H7v8h8v-4zm4-8v5.5l-2-2-5.6 5.5H10v-1.4L15.5 7l-2-2H19z" fill-rule="evenodd"/></svg>',"non-breaking":'<svg width="24" height="24"><path d="M11 11H8a1 1 0 1 1 0-2h3V6c0-.6.4-1 1-1s1 .4 1 1v3h3c.6 0 1 .4 1 1s-.4 1-1 1h-3v3c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-3zm10 4v5H3v-5c0-.6.4-1 1-1s1 .4 1 1v3h14v-3c0-.6.4-1 1-1s1 .4 1 1z" fill-rule="evenodd"/></svg>',notice:'<svg width="24" height="24"><path d="M17.8 9.8L15.4 4 20 8.5v7L15.5 20h-7L4 15.5v-7L8.5 4h7l2.3 5.8zm0 0l2.2 5.7-2.3-5.8zM13 17v-2h-2v2h2zm0-4V7h-2v6h2z" fill-rule="evenodd"/></svg>',"ordered-list-rtl":'<svg width="24" height="24"><path d="M6 17h8a1 1 0 0 1 0 2H6a1 1 0 0 1 0-2zm0-6h8a1 1 0 0 1 0 2H6a1 1 0 0 1 0-2zm0-6h8a1 1 0 0 1 0 2H6a1 1 0 1 1 0-2zm13-1v3.5a.5.5 0 1 1-1 0V5h-.5a.5.5 0 1 1 0-1H19zm-1 8.8l.2.2h1.3a.5.5 0 1 1 0 1h-1.6a1 1 0 0 1-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 0 0-.2-.2h-1.3a.5.5 0 0 1-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3zm2 4.2v2c0 .6-.4 1-1 1h-1.5a.5.5 0 0 1 0-1h1.2a.3.3 0 1 0 0-.6h-1.3a.4.4 0 1 1 0-.8h1.3a.3.3 0 0 0 0-.6h-1.2a.5.5 0 1 1 0-1H19c.6 0 1 .4 1 1z" fill-rule="evenodd"/></svg>',"ordered-list":'<svg width="24" height="24"><path d="M10 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 1 1 0-2zM6 4v3.5c0 .3-.2.5-.5.5a.5.5 0 0 1-.5-.5V5h-.5a.5.5 0 0 1 0-1H6zm-1 8.8l.2.2h1.3c.3 0 .5.2.5.5s-.2.5-.5.5H4.9a1 1 0 0 1-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 0 0-.2-.2H4.5a.5.5 0 0 1-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3zM7 17v2c0 .6-.4 1-1 1H4.5a.5.5 0 0 1 0-1h1.2c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.4a.4.4 0 1 1 0-.8h1.3c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.5a.5.5 0 1 1 0-1H6c.6 0 1 .4 1 1z" fill-rule="evenodd"/></svg>',orientation:'<svg width="24" height="24"><path d="M7.3 6.4L1 13l6.4 6.5 6.5-6.5-6.5-6.5zM3.7 13l3.6-3.7L11 13l-3.7 3.7-3.6-3.7zM12 6l2.8 2.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0L9.2 5.7a.8.8 0 0 1 0-1.2L13.6.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L12 4h1a9 9 0 1 1-4.3 16.9l1.5-1.5A7 7 0 1 0 13 6h-1z" fill-rule="nonzero"/></svg>',outdent:'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 1 1 0-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2zm-5 4h12a1 1 0 0 1 0 2H7a1 1 0 0 1 0-2zm1.6-3.8a1 1 0 0 1-1.2 1.6l-3-2a1 1 0 0 1 0-1.6l3-2a1 1 0 0 1 1.2 1.6L6.8 12l1.8 1.2z" fill-rule="evenodd"/></svg>',"page-break":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M5 11c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1h-1a1 1 0 0 1 0-2zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2zM7 3v5h10V3c0-.6.4-1 1-1s1 .4 1 1v7H5V3c0-.6.4-1 1-1s1 .4 1 1zM6 22a1 1 0 0 1-1-1v-7h14v7c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-5H7v5c0 .6-.4 1-1 1z"/></g></svg>',"paste-text":'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h3V9h9zM9 20H6a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0 1 12 1a3 3 0 0 1 2.8 2H18a2 2 0 0 1 2 2v4h1v12H9v-1zm1.5-9.5v9h9v-9h-9zM12 3a1 1 0 0 0-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1zm0 9h6v2h-.5l-.5-1h-1v4h.8v1h-3.6v-1h.8v-4h-1l-.5 1H12v-2z" fill-rule="nonzero"/></svg>',paste:'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h3V9h9zM9 20H6a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0 1 12 1a3 3 0 0 1 2.8 2H18a2 2 0 0 1 2 2v4h1v12H9v-1zm1.5-9.5v9h9v-9h-9zM12 3a1 1 0 0 0-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1z" fill-rule="nonzero"/></svg>',"permanent-pen":'<svg width="24" height="24"><path d="M10.5 17.5L8 20H3v-3l3.5-3.5a2 2 0 0 1 0-3L14 3l1 1-7.3 7.3a1 1 0 0 0 0 1.4l3.6 3.6c.4.4 1 .4 1.4 0L20 9l1 1-7.6 7.6a2 2 0 0 1-2.8 0l-.1-.1z" fill-rule="nonzero"/></svg>',plus:'<svg width="24" height="24"><g fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke="#000" stroke-width="2"><path d="M12 5v14M5 12h14"/></g></svg>',preferences:'<svg width="24" height="24"><path d="M20.1 13.5l-1.9.2a5.8 5.8 0 0 1-.6 1.5l1.2 1.5c.4.4.3 1 0 1.4l-.7.7a1 1 0 0 1-1.4 0l-1.5-1.2a6.2 6.2 0 0 1-1.5.6l-.2 1.9c0 .5-.5.9-1 .9h-1a1 1 0 0 1-1-.9l-.2-1.9a5.8 5.8 0 0 1-1.5-.6l-1.5 1.2a1 1 0 0 1-1.4 0l-.7-.7a1 1 0 0 1 0-1.4l1.2-1.5a6.2 6.2 0 0 1-.6-1.5l-1.9-.2a1 1 0 0 1-.9-1v-1c0-.5.4-1 .9-1l1.9-.2a5.8 5.8 0 0 1 .6-1.5L5.2 7.3a1 1 0 0 1 0-1.4l.7-.7a1 1 0 0 1 1.4 0l1.5 1.2a6.2 6.2 0 0 1 1.5-.6l.2-1.9c0-.5.5-.9 1-.9h1c.5 0 1 .4 1 .9l.2 1.9a5.8 5.8 0 0 1 1.5.6l1.5-1.2a1 1 0 0 1 1.4 0l.7.7c.3.4.4 1 0 1.4l-1.2 1.5a6.2 6.2 0 0 1 .6 1.5l1.9.2c.5 0 .9.5.9 1v1c0 .5-.4 1-.9 1zM12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z" fill-rule="evenodd"/></svg>',preview:'<svg width="24" height="24"><path d="M3.5 12.5c.5.8 1.1 1.6 1.8 2.3 2 2 4.2 3.2 6.7 3.2s4.7-1.2 6.7-3.2a16.2 16.2 0 0 0 2.1-2.8 15.7 15.7 0 0 0-2.1-2.8c-2-2-4.2-3.2-6.7-3.2a9.3 9.3 0 0 0-6.7 3.2A16.2 16.2 0 0 0 3.2 12c0 .2.2.3.3.5zm-2.4-1l.7-1.2L4 7.8C6.2 5.4 8.9 4 12 4c3 0 5.8 1.4 8.1 3.8a18.2 18.2 0 0 1 2.8 3.7v1l-.7 1.2-2.1 2.5c-2.3 2.4-5 3.8-8.1 3.8-3 0-5.8-1.4-8.1-3.8a18.2 18.2 0 0 1-2.8-3.7 1 1 0 0 1 0-1zm12-3.3a2 2 0 1 0 2.7 2.6 4 4 0 1 1-2.6-2.6z" fill-rule="nonzero"/></svg>',print:'<svg width="24" height="24"><path d="M18 8H6a3 3 0 0 0-3 3v6h2v3h14v-3h2v-6a3 3 0 0 0-3-3zm-1 10H7v-4h10v4zm.5-5c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm.5-8H6v2h12V5z" fill-rule="nonzero"/></svg>',quote:'<svg width="24" height="24"><path d="M7.5 17h.9c.4 0 .7-.2.9-.6L11 13V8c0-.6-.4-1-1-1H6a1 1 0 0 0-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 0 0 .8 1.3zm8 0h.9c.4 0 .7-.2.9-.6L19 13V8c0-.6-.4-1-1-1h-4a1 1 0 0 0-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 0 0 .8 1.3z" fill-rule="nonzero"/></svg>',redo:'<svg width="24" height="24"><path d="M17.6 10H12c-2.8 0-4.4 1.4-4.9 3.5-.4 2 .3 4 1.4 4.6a1 1 0 1 1-1 1.8c-2-1.2-2.9-4.1-2.3-6.8.6-3 3-5.1 6.8-5.1h5.6l-3.3-3.3a1 1 0 1 1 1.4-1.4l5 5a1 1 0 0 1 0 1.4l-5 5a1 1 0 0 1-1.4-1.4l3.3-3.3z" fill-rule="nonzero"/></svg>',reload:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M5 22.1l-1.2-4.7v-.2a1 1 0 0 1 1-1l5 .4a1 1 0 1 1-.2 2l-2.2-.2a7.8 7.8 0 0 0 8.4.2 7.5 7.5 0 0 0 3.5-6.4 1 1 0 1 1 2 0 9.5 9.5 0 0 1-4.5 8 9.9 9.9 0 0 1-10.2 0l.4 1.4a1 1 0 1 1-2 .5zM13.6 7.4c0-.5.5-1 1-.9l2.8.2a8 8 0 0 0-9.5-1 7.5 7.5 0 0 0-3.6 7 1 1 0 0 1-2 0 9.5 9.5 0 0 1 4.5-8.6 10 10 0 0 1 10.9.3l-.3-1a1 1 0 0 1 2-.5l1.1 4.8a1 1 0 0 1-1 1.2l-5-.4a1 1 0 0 1-.9-1z"/></g></svg>',"remove-formatting":'<svg width="24" height="24"><path d="M13.2 6a1 1 0 0 1 0 .2l-2.6 10a1 1 0 0 1-1 .8h-.2a.8.8 0 0 1-.8-1l2.6-10H8a1 1 0 1 1 0-2h9a1 1 0 0 1 0 2h-3.8zM5 18h7a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2zm13 1.5L16.5 18 15 19.5a.7.7 0 0 1-1-1l1.5-1.5-1.5-1.5a.7.7 0 0 1 1-1l1.5 1.5 1.5-1.5a.7.7 0 0 1 1 1L17.5 17l1.5 1.5a.7.7 0 0 1-1 1z" fill-rule="evenodd"/></svg>',remove:'<svg width="24" height="24"><path d="M16 7h3a1 1 0 0 1 0 2h-1v9a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V9H5a1 1 0 1 1 0-2h3V6a3 3 0 0 1 3-3h2a3 3 0 0 1 3 3v1zm-2 0V6c0-.6-.4-1-1-1h-2a1 1 0 0 0-1 1v1h4zm2 2H8v9c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V9zm-7 3a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0v-4zm4 0a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0v-4z" fill-rule="nonzero"/></svg>',"resize-handle":'<svg width="10" height="10"><g fill-rule="nonzero"><path d="M8.1 1.1A.5.5 0 1 1 9 2l-7 7A.5.5 0 1 1 1 8l7-7zM8.1 5.1A.5.5 0 1 1 9 6l-3 3A.5.5 0 1 1 5 8l3-3z"/></g></svg>',resize:'<svg width="24" height="24"><path d="M4 5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h6c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3H7.4L18 16.6V13c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v6c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3h-6a1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3.6L6 7.4V11c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3A1 1 0 0 1 4 11V5z" fill-rule="evenodd"/></svg>',"restore-draft":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M17 13c0 .6-.4 1-1 1h-4V8c0-.6.4-1 1-1s1 .4 1 1v4h2c.6 0 1 .4 1 1z"/><path d="M4.7 10H9a1 1 0 0 1 0 2H3a1 1 0 0 1-1-1V5a1 1 0 1 1 2 0v3l2.5-2.4a9.2 9.2 0 0 1 10.8-1.5A9 9 0 0 1 13.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 1 1 1.3-1.5 7.2 7.2 0 0 0 11.6-3.7 7 7 0 0 0-3.5-7.7A7.2 7.2 0 0 0 8 7L4.7 10z" fill-rule="nonzero"/></g></svg>',"rotate-left":'<svg width="24" height="24"><path d="M4.7 10H9a1 1 0 0 1 0 2H3a1 1 0 0 1-1-1V5a1 1 0 1 1 2 0v3l2.5-2.4a9.2 9.2 0 0 1 10.8-1.5A9 9 0 0 1 13.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 1 1 1.3-1.5 7.2 7.2 0 0 0 11.6-3.7 7 7 0 0 0-3.5-7.7A7.2 7.2 0 0 0 8 7L4.7 10z" fill-rule="nonzero"/></svg>',"rotate-right":'<svg width="24" height="24"><path d="M20 8V5a1 1 0 0 1 2 0v6c0 .6-.4 1-1 1h-6a1 1 0 0 1 0-2h4.3L16 7A7.2 7.2 0 0 0 7.7 6a7 7 0 0 0 3 13.1c1.9.1 3.7-.5 5-1.7a1 1 0 0 1 1.4 1.5A9.2 9.2 0 0 1 2.2 14c-.9-3.9 1-8 4.5-9.9 3.5-1.9 8-1.3 10.8 1.5L20 8z" fill-rule="nonzero"/></svg>',rtl:'<svg width="24" height="24"><path d="M8 5h8v2h-2v12h-2V7h-2v12H8v-7c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 4.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L8 5zm12 11.2a1 1 0 1 1-1 1.6l-3-2a1 1 0 0 1 0-1.6l3-2a1 1 0 1 1 1 1.6L18.4 15l1.8 1.2z" fill-rule="evenodd"/></svg>',save:'<svg width="24" height="24"><path d="M5 16h14a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2zm0 2v2h14v-2H5zm10 0h2v2h-2v-2zm-4-6.4L8.7 9.3a1 1 0 1 0-1.4 1.4l4 4c.4.4 1 .4 1.4 0l4-4a1 1 0 1 0-1.4-1.4L13 11.6V4a1 1 0 0 0-2 0v7.6z" fill-rule="nonzero"/></svg>',search:'<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12z" fill-rule="nonzero"/></svg>',"select-all":'<svg width="24" height="24"><path d="M3 5h2V3a2 2 0 0 0-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2a2 2 0 0 0-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8a2 2 0 0 0 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2zM7 17h10V7H7v10zm2-8h6v6H9V9z" fill-rule="nonzero"/></svg>',selected:'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2zm3.6 10.9L7 12.3a.7.7 0 0 0-1 1L9.6 17 18 8.6a.7.7 0 0 0 0-1 .7.7 0 0 0-1 0l-7.4 7.3z"/></svg>',settings:'<svg width="24" height="24"><path d="M11 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6V8H5a1 1 0 1 1 0-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.5V6zM8 8h2V6H8v2zm9 2.8v.2h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v.3c0 .2 0 .3-.2.5l-.6.2h-2.4c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6V13H5a1 1 0 0 1 0-2h8v-.3c0-.2 0-.3.2-.5l.6-.2h2.4c.3 0 .4 0 .6.2l.2.6zM14 13h2v-2h-2v2zm-3 2.8v.2h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6V18H5a1 1 0 0 1 0-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.6zM8 18h2v-2H8v2z" fill-rule="evenodd"/></svg>',sharpen:'<svg width="24" height="24"><path d="M16 6l4 4-8 9-8-9 4-4h8zm-4 10.2l5.5-6.2-.1-.1H12v-.3h5.1l-.2-.2H12V9h4.6l-.2-.2H12v-.3h4.1l-.2-.2H12V8h3.6l-.2-.2H8.7L6.5 10l.1.1H12v.3H6.9l.2.2H12v.3H7.3l.2.2H12v.3H7.7l.3.2h4v.3H8.2l.2.2H12v.3H8.6l.3.2H12v.3H9l.3.2H12v.3H9.5l.2.2H12v.3h-2l.2.2H12v.3h-1.6l.2.2H12v.3h-1.1l.2.2h.9v.3h-.7l.2.2h.5v.3h-.3l.3.2z" fill-rule="evenodd"/></svg>',sourcecode:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9.8 15.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0l-4.4-4.1a.8.8 0 0 1 0-1.2l4.4-4.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L6 12l3.8 3.7zM14.2 15.7c-.3.3-.3.8 0 1 .4.4.9.4 1.2 0l4.4-4.1c.3-.3.3-.9 0-1.2l-4.4-4.2a.8.8 0 0 0-1.2 0c-.3.3-.3.8 0 1.1L18 12l-3.8 3.7z"/></g></svg>',"spell-check":'<svg width="24" height="24"><path d="M6 8v3H5V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h2c.3 0 .5.1.7.3.2.2.3.4.3.7v6H8V8H6zm0-3v2h2V5H6zm13 0h-3v5h3v1h-3a1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3v1zm-5 1.5l-.1.7c-.1.2-.3.3-.6.3.3 0 .5.1.6.3l.1.7V10c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3h-3V4h3c.3 0 .5.1.7.3.2.2.3.4.3.7v1.5zM13 10V8h-2v2h2zm0-3V5h-2v2h2zm3 5l1 1-6.5 7L7 15.5l1.3-1 2.2 2.2L16 12z" fill-rule="evenodd"/></svg>',"strike-through":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M15.6 8.5c-.5-.7-1-1.1-1.3-1.3-.6-.4-1.3-.6-2-.6-2.7 0-2.8 1.7-2.8 2.1 0 1.6 1.8 2 3.2 2.3 4.4.9 4.6 2.8 4.6 3.9 0 1.4-.7 4.1-5 4.1A6.2 6.2 0 0 1 7 16.4l1.5-1.1c.4.6 1.6 2 3.7 2 1.6 0 2.5-.4 3-1.2.4-.8.3-2-.8-2.6-.7-.4-1.6-.7-2.9-1-1-.2-3.9-.8-3.9-3.6C7.6 6 10.3 5 12.4 5c2.9 0 4.2 1.6 4.7 2.4l-1.5 1.1z"/><path d="M5 11h14a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2z" fill-rule="nonzero"/></g></svg>',subscript:'<svg width="24" height="24"><path d="M10.4 10l4.6 4.6-1.4 1.4L9 11.4 4.4 16 3 14.6 7.6 10 3 5.4 4.4 4 9 8.6 13.6 4 15 5.4 10.4 10zM21 19h-5v-1l1-.8 1.7-1.6c.3-.4.5-.8.5-1.2 0-.3 0-.6-.2-.7-.2-.2-.5-.3-.9-.3a2 2 0 0 0-.8.2l-.7.3-.4-1.1 1-.6 1.2-.2c.8 0 1.4.3 1.8.7.4.4.6.9.6 1.5s-.2 1.1-.5 1.6a8 8 0 0 1-1.3 1.3l-.6.6h2.6V19z" fill-rule="nonzero"/></svg>',superscript:'<svg width="24" height="24"><path d="M15 9.4L10.4 14l4.6 4.6-1.4 1.4L9 15.4 4.4 20 3 18.6 7.6 14 3 9.4 4.4 8 9 12.6 13.6 8 15 9.4zm5.9 1.6h-5v-1l1-.8 1.7-1.6c.3-.5.5-.9.5-1.3 0-.3 0-.5-.2-.7-.2-.2-.5-.3-.9-.3l-.8.2-.7.4-.4-1.2c.2-.2.5-.4 1-.5.3-.2.8-.2 1.2-.2.8 0 1.4.2 1.8.6.4.4.6 1 .6 1.6 0 .5-.2 1-.5 1.5l-1.3 1.4-.6.5h2.6V11z" fill-rule="nonzero"/></svg>',"table-cell-properties":'<svg width="24" height="24"><path d="M4 5h16v14H4V5zm10 10h-4v3h4v-3zm0-8h-4v3h4V7zM9 7H5v3h4V7zm-4 4v3h4v-3H5zm10 0v3h4v-3h-4zm0-1h4V7h-4v3zM5 15v3h4v-3H5zm10 3h4v-3h-4v3z" fill-rule="evenodd"/></svg>',"table-cell-select-all":'<svg width="24" height="24"><path d="M12.5 5.5v6h6v-6h-6zm-1 0h-6v6h6v-6zm1 13h6v-6h-6v6zm-1 0v-6h-6v6h6zm-7-14h15v15h-15v-15z" fill-rule="nonzero"/></svg>',"table-cell-select-inner":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M5.5 5.5v13h13v-13h-13zm-1-1h15v15h-15v-15z" opacity=".2"/><path d="M11.5 11.5v-7h1v7h7v1h-7v7h-1v-7h-7v-1h7z"/></g></svg>',"table-delete-column":'<svg width="24" height="24"><path d="M9 11.2l1 1v.2l-1 1v-2.2zm5 1l1-1v2.2l-1-1v-.2zM20 5v14H4V5h16zm-1 2h-4v.8l-.2-.2-.8.8V7h-4v1.4l-.8-.8-.2.2V7H5v11h4v-1.8l.5.5.5-.4V18h4v-1.8l.8.8.2-.3V18h4V7zm-3.9 3.4l-1.8 1.9 1.8 1.9c.4.3.4.9 0 1.2-.3.3-.8.3-1.2 0L12 13.5l-1.8 1.9a.8.8 0 0 1-1.2 0 .9.9 0 0 1 0-1.2l1.8-1.9-1.9-2a.9.9 0 0 1 1.2-1.2l2 2 1.8-1.8c.3-.4.9-.4 1.2 0a.8.8 0 0 1 0 1.1z" fill-rule="evenodd"/></svg>',"table-delete-row":'<svg width="24" height="24"><path d="M16.7 8.8l1.1 1.2-2.4 2.5L18 15l-1.2 1.2-2.5-2.5-2.4 2.5-1.3-1.2 2.5-2.5-2.5-2.5 1.2-1.3 2.6 2.6 2.4-2.5zM4 5h16v14H4V5zm15 5V7H5v3h4.8l1 1H5v3h5.8l-1 1H5v3h14v-3h-.4l-1-1H19v-3h-1.3l1-1h.3z" fill-rule="evenodd"/></svg>',"table-delete-table":'<svg width="24" height="26"><path d="M4 6h16v14H4V6zm1 2v11h14V8H5zm11.7 8.7l-1.5 1.5L12 15l-3.3 3.2-1.4-1.5 3.2-3.2-3.3-3.2 1.5-1.5L12 12l3.2-3.2 1.5 1.5-3.2 3.2 3.2 3.2z" fill-rule="evenodd"/></svg>',"table-insert-column-after":'<svg width="24" height="24"><path d="M14.3 9c.4 0 .7.3.7.6v2.2h2.1c.4 0 .7.3.7.7 0 .4-.3.7-.7.7H15v2.2c0 .3-.3.6-.7.6a.7.7 0 0 1-.6-.6v-2.2h-2.2a.7.7 0 0 1 0-1.4h2.2V9.6c0-.3.3-.6.6-.6zM4 5h16v14H4V5zm5 13v-3H5v3h4zm0-4v-3H5v3h4zm0-4V7H5v3h4zm10 8V7h-9v11h9z" fill-rule="evenodd"/></svg>',"table-insert-column-before":'<svg width="24" height="24"><path d="M9.7 16a.7.7 0 0 1-.7-.6v-2.2H6.9a.7.7 0 0 1 0-1.4H9V9.6c0-.3.3-.6.7-.6.3 0 .6.3.6.6v2.2h2.2c.4 0 .8.3.8.7 0 .4-.4.7-.8.7h-2.2v2.2c0 .3-.3.6-.6.6zM4 5h16v14H4V5zm10 13V7H5v11h9zm5 0v-3h-4v3h4zm0-4v-3h-4v3h4zm0-4V7h-4v3h4z" fill-rule="evenodd"/></svg>',"table-insert-row-above":'<svg width="24" height="24"><path d="M14.8 10.5c0 .3-.2.5-.5.5h-1.8v1.8c0 .3-.2.5-.5.5a.5.5 0 0 1-.5-.6V11H9.7a.5.5 0 0 1 0-1h1.8V8.3c0-.3.2-.6.5-.6s.5.3.5.6V10h1.8c.3 0 .5.2.5.5zM4 5h16v14H4V5zm5 13v-3H5v3h4zm5 0v-3h-4v3h4zm5 0v-3h-4v3h4zm0-4V7H5v7h14z" fill-rule="evenodd"/></svg>',"table-insert-row-after":'<svg width="24" height="24"><path d="M9.2 14.5c0-.3.2-.5.5-.5h1.8v-1.8c0-.3.2-.5.5-.5s.5.2.5.6V14h1.8c.3 0 .5.2.5.5s-.2.5-.5.5h-1.8v1.7c0 .3-.2.6-.5.6a.5.5 0 0 1-.5-.6V15H9.7a.5.5 0 0 1-.5-.5zM4 5h16v14H4V5zm6 2v3h4V7h-4zM5 7v3h4V7H5zm14 11v-7H5v7h14zm0-8V7h-4v3h4z" fill-rule="evenodd"/></svg>',"table-left-header":'<svg width="24" height="24"><path d="M4 5h16v13H4V5zm10 12v-3h-4v3h4zm0-4v-3h-4v3h4zm0-4V6h-4v3h4zm5 8v-3h-4v3h4zm0-4v-3h-4v3h4zm0-4V6h-4v3h4z" fill-rule="evenodd"/></svg>',"table-merge-cells":'<svg width="24" height="24"><path d="M4 5h16v14H4V5zm6 13h9v-7h-9v7zm4-11h-4v3h4V7zM9 7H5v3h4V7zm-4 4v3h4v-3H5zm10-1h4V7h-4v3zM5 15v3h4v-3H5z" fill-rule="evenodd"/></svg>',"table-row-properties":'<svg width="24" height="24"><path d="M4 5h16v14H4V5zm10 10h-4v3h4v-3zm0-8h-4v3h4V7zM9 7H5v3h4V7zm6 3h4V7h-4v3zM5 15v3h4v-3H5zm10 3h4v-3h-4v3z" fill-rule="evenodd"/></svg>',"table-split-cells":'<svg width="24" height="24"><path d="M4 5h16v14H4V5zm6 2v3h4V7h-4zM9 18v-3H5v3h4zm0-4v-3H5v3h4zm0-4V7H5v3h4zm10 8v-7h-9v7h9zm0-8V7h-4v3h4zm-3.5 4.5l1.5 1.6c.3.2.3.7 0 1-.2.2-.7.2-1 0l-1.5-1.6-1.6 1.5c-.2.3-.7.3-1 0a.7.7 0 0 1 0-1l1.6-1.5-1.5-1.6a.7.7 0 0 1 1-1l1.5 1.6 1.6-1.5c.2-.3.7-.3 1 0 .2.2.2.7 0 1l-1.6 1.5z" fill-rule="evenodd"/></svg>',"table-top-header":'<svg width="24" height="24"><path d="M4 5h16v13H4V5zm5 12v-3H5v3h4zm0-4v-3H5v3h4zm5 4v-3h-4v3h4zm0-4v-3h-4v3h4zm5 4v-3h-4v3h4zm0-4v-3h-4v3h4z" fill-rule="evenodd"/></svg>',table:'<svg width="24" height="24"><path d="M4 5h16v14H4V5zm6 9h4v-3h-4v3zm4 1h-4v3h4v-3zm0-8h-4v3h4V7zM9 7H5v3h4V7zm-4 4v3h4v-3H5zm10 0v3h4v-3h-4zm0-1h4V7h-4v3zM5 15v3h4v-3H5zm10 3h4v-3h-4v3z" fill-rule="evenodd"/></svg>',template:'<svg width="24" height="24"><path d="M19 19v-1H5v1h14zM9 16v-4a5 5 0 1 1 6 0v4h4a2 2 0 0 1 2 2v3H3v-3c0-1.1.9-2 2-2h4zm4 0v-5l.8-.6a3 3 0 1 0-3.6 0l.8.6v5h2z" fill-rule="nonzero"/></svg>',"temporary-placeholder":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M9 7.6V6h2.5V4.5a.5.5 0 1 1 1 0V6H15v1.6a8 8 0 1 1-6 0zm-2.6 5.3a.5.5 0 0 0 .3.6c.3 0 .6 0 .6-.3l.1-.2a5 5 0 0 1 3.3-2.8c.3-.1.4-.4.4-.6-.1-.3-.4-.5-.6-.4a6 6 0 0 0-4.1 3.7z"/><circle cx="14" cy="4" r="1"/><circle cx="12" cy="2" r="1"/><circle cx="10" cy="4" r="1"/></g></svg>',"text-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path id="tox-icon-text-color__color" d="M3 18h18v3H3z"/><path d="M8.7 16h-.8a.5.5 0 0 1-.5-.6l2.7-9c.1-.3.3-.4.5-.4h2.8c.2 0 .4.1.5.4l2.7 9a.5.5 0 0 1-.5.6h-.8a.5.5 0 0 1-.4-.4l-.7-2.2c0-.3-.3-.4-.5-.4h-3.4c-.2 0-.4.1-.5.4l-.7 2.2c0 .3-.2.4-.4.4zm2.6-7.6l-.6 2a.5.5 0 0 0 .5.6h1.6a.5.5 0 0 0 .5-.6l-.6-2c0-.3-.3-.4-.5-.4h-.4c-.2 0-.4.1-.5.4z"/></g></svg>',toc:'<svg width="24" height="24"><path d="M5 5c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 1 1 0-2zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 1 1 0-2zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2zm0-4c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 1 1 0-2zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2z" fill-rule="evenodd"/></svg>',translate:'<svg width="24" height="24"><path d="M12.7 14.3l-.3.7-.4.7-2.2-2.2-3.1 3c-.3.4-.8.4-1 0a.7.7 0 0 1 0-1l3.1-3A12.4 12.4 0 0 1 6.7 9H8a10.1 10.1 0 0 0 1.7 2.4c.5-.5 1-1.1 1.4-1.8l.9-2H4.7a.7.7 0 1 1 0-1.5h4.4v-.7c0-.4.3-.8.7-.8.4 0 .7.4.7.8v.7H15c.4 0 .8.3.8.7 0 .4-.4.8-.8.8h-1.4a12.3 12.3 0 0 1-1 2.4 13.5 13.5 0 0 1-1.7 2.3l1.9 1.8zm4.3-3l2.7 7.3a.5.5 0 0 1-.4.7 1 1 0 0 1-1-.7l-.6-1.5h-3.4l-.6 1.5a1 1 0 0 1-1 .7.5.5 0 0 1-.4-.7l2.7-7.4a1 1 0 1 1 2 0zm-2.2 4.4h2.4L16 12.5l-1.2 3.2z" fill-rule="evenodd"/></svg>',underline:'<svg width="24" height="24"><path d="M16 5c.6 0 1 .4 1 1v5.5a4 4 0 0 1-.4 1.8l-1 1.4a5.3 5.3 0 0 1-5.5 1 5 5 0 0 1-1.6-1c-.5-.4-.8-.9-1.1-1.4a4 4 0 0 1-.4-1.8V6c0-.6.4-1 1-1s1 .4 1 1v5.5c0 .3 0 .6.2 1l.6.7a3.3 3.3 0 0 0 2.2.8 3.4 3.4 0 0 0 2.2-.8c.3-.2.4-.5.6-.8l.2-.9V6c0-.6.4-1 1-1zM8 17h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2z" fill-rule="evenodd"/></svg>',undo:'<svg width="24" height="24"><path d="M6.4 8H12c3.7 0 6.2 2 6.8 5.1.6 2.7-.4 5.6-2.3 6.8a1 1 0 0 1-1-1.8c1.1-.6 1.8-2.7 1.4-4.6-.5-2.1-2.1-3.5-4.9-3.5H6.4l3.3 3.3a1 1 0 1 1-1.4 1.4l-5-5a1 1 0 0 1 0-1.4l5-5a1 1 0 0 1 1.4 1.4L6.4 8z" fill-rule="nonzero"/></svg>',unlink:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 0 1 1.4 1.4l-2 2a2 2 0 1 0 2.6 2.8l4.8-4.8a1 1 0 0 0 0-1.4 1 1 0 1 1 1.4-1.3 2.9 2.9 0 0 1 0 4L9.6 20a3.9 3.9 0 0 1-5.5-5.5l2-2zm11.6-.6a1 1 0 0 1-1.4-1.4l2.1-2a2 2 0 1 0-2.7-2.8L11 10.3a1 1 0 0 0 0 1.4A1 1 0 1 1 9.6 13a2.9 2.9 0 0 1 0-4L14.4 4a3.9 3.9 0 0 1 5.5 5.5l-2 2zM7.6 6.3a.8.8 0 0 1-1 1.1L3.3 4.2a.7.7 0 1 1 1-1l3.2 3.1zM5.1 8.6a.8.8 0 0 1 0 1.5H3a.8.8 0 0 1 0-1.5H5zm5-3.5a.8.8 0 0 1-1.5 0V3a.8.8 0 0 1 1.5 0V5zm6 11.8a.8.8 0 0 1 1-1l3.2 3.2a.8.8 0 0 1-1 1L16 17zm-2.2 2a.8.8 0 0 1 1.5 0V21a.8.8 0 0 1-1.5 0V19zm5-3.5a.7.7 0 1 1 0-1.5H21a.8.8 0 0 1 0 1.5H19z" fill-rule="nonzero"/></svg>',unlock:'<svg width="24" height="24"><path d="M16 5c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h-2V8a1 1 0 0 0-.3-.7A1 1 0 0 0 16 7h-2a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7v3h.3c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H4.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H11V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2z" fill-rule="evenodd"/></svg>',"unordered-list":'<svg width="24" height="24"><path d="M11 5h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zM4.5 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1z" fill-rule="evenodd"/></svg>',unselected:'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2zm0 1a1 1 0 0 0-1 1v12c0 .6.4 1 1 1h12c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H6z"/></svg>',upload:'<svg width="24" height="24"><path d="M18 19v-2a1 1 0 0 1 2 0v3c0 .6-.4 1-1 1H5a1 1 0 0 1-1-1v-3a1 1 0 0 1 2 0v2h12zM11 6.4L8.7 8.7a1 1 0 0 1-1.4-1.4l4-4a1 1 0 0 1 1.4 0l4 4a1 1 0 1 1-1.4 1.4L13 6.4V16a1 1 0 0 1-2 0V6.4z" fill-rule="nonzero"/></svg>',user:'<svg width="24" height="24"><path d="M12 24a12 12 0 1 1 0-24 12 12 0 0 1 0 24zm-8.7-5.3a11 11 0 0 0 17.4 0C19.4 16.3 14.6 15 12 15c-2.6 0-7.4 1.3-8.7 3.7zM12 13c2.2 0 4-2 4-4.5S14.2 4 12 4 8 6 8 8.5 9.8 13 12 13z" fill-rule="nonzero"/></svg>',visualblocks:'<svg width="24" height="24"><path d="M9 19v2H7v-2h2zm-4 0v2a2 2 0 0 1-2-2h2zm8 0v2h-2v-2h2zm8 0a2 2 0 0 1-2 2v-2h2zm-4 0v2h-2v-2h2zM15 7a1 1 0 0 1 0 2v7a1 1 0 0 1-2 0V9h-1v7a1 1 0 0 1-2 0v-4a2.5 2.5 0 0 1-.2-5H15zM5 15v2H3v-2h2zm16 0v2h-2v-2h2zM5 11v2H3v-2h2zm16 0v2h-2v-2h2zM5 7v2H3V7h2zm16 0v2h-2V7h2zM5 3v2H3c0-1.1.9-2 2-2zm8 0v2h-2V3h2zm6 0a2 2 0 0 1 2 2h-2V3zM9 3v2H7V3h2zm8 0v2h-2V3h2z" fill-rule="evenodd"/></svg>',visualchars:'<svg width="24" height="24"><path d="M10 5h7a1 1 0 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 6.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L10 5z" fill-rule="evenodd"/></svg>',warning:'<svg width="24" height="24"><path d="M19.8 18.3c.2.5.3.9 0 1.2-.1.3-.5.5-1 .5H5.2c-.5 0-.9-.2-1-.5-.3-.3-.2-.7 0-1.2L11 4.7l.5-.5.5-.2c.2 0 .3 0 .5.2.2 0 .3.3.5.5l6.8 13.6zM12 18c.3 0 .5-.1.7-.3.2-.2.3-.4.3-.7a1 1 0 0 0-.3-.7 1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3 1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3zm.7-3l.3-4a1 1 0 0 0-.3-.7 1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3 1 1 0 0 0-.3.7l.3 4h1.4z" fill-rule="evenodd"/></svg>',"zoom-in":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12zm-1-9a1 1 0 0 1 2 0v6a1 1 0 0 1-2 0V8zm-2 4a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2H8z" fill-rule="nonzero"/></svg>',"zoom-out":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12zm-3-5a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2H8z" fill-rule="nonzero"/></svg>'}),Ud.get(e).icons);ue(t,function(e,t){kt(r,t)||n.ui.registry.addIcon(t,e)})}(e),function(e){var t=e.settings.theme;if(K(t)){e.settings.theme=Iw(t);var n=qd.get(t);e.theme=new n(e,qd.urls[t]),e.theme.init&&e.theme.init(e,qd.urls[t]||e.documentBaseUrl.replace(/\/$/,""),e.$)}else e.theme={}}(e),function(t){var n=[];Mn.each(t.settings.plugins.split(/[ ,]/),function(e){Az(t,n,Iw(e))})}(e);var t=function(e){var t=e.getElement();return e.orgDisplay=t.style.display,K(e.settings.theme)?function(e){return e.theme.renderUI()}(e):D(e.settings.theme)?function(e){var t=e.getElement(),n=(0,e.settings.theme)(e,t);return n.editorContainer.nodeType&&(n.editorContainer.id=n.editorContainer.id||e.id+"_parent"),n.iframeContainer&&n.iframeContainer.nodeType&&(n.iframeContainer.id=n.iframeContainer.id||e.id+"_iframecontainer"),n.height=n.iframeHeight?n.iframeHeight:t.offsetHeight,n}(e):Uw(e)}(e);return e.editorContainer=t.editorContainer?t.editorContainer:null,Vw(e),e.inline?Nz(e):kz(e,t)},Rz=Xi.DOM,Dz=function(t){var e=t.settings,n=t.id;ra.setCode(Bf(t));var r=function(){Rz.unbind(j.window,"ready",r),t.render()};if(kr.Event.domLoaded){if(t.getElement()&&Nn.contentEditable){e.inline?t.inline=!0:(t.orgVisibility=t.getElement().style.visibility,t.getElement().style.visibility="hidden");var o=t.getElement().form||Rz.getParent(n,"form");o&&(t.formElement=o,e.hidden_input&&!Ge.isTextareaOrInput(t.getElement())&&(Rz.insertAfter(Rz.create("input",{type:"hidden",name:n}),n),t.hasHiddenInput=!0),t.formEventDelegate=function(e){t.fire(e.type,e)},Rz.bind(o,"submit reset",t.formEventDelegate),t.on("reset",function(){t.resetContent()}),!e.submit_patch||o.submit.nodeType||o.submit.length||o._mceOldSubmit||(o._mceOldSubmit=o.submit,o.submit=function(){return t.editorManager.triggerSave(),t.setDirty(!1),o._mceOldSubmit(o)})),t.windowManager=Bd(t),t.notificationManager=_d(t),"xml"===e.encoding&&t.on("GetContent",function(e){e.save&&(e.content=Rz.encode(e.content))}),e.add_form_submit_trigger&&t.on("submit",function(){t.initialized&&t.save()}),e.add_unload_trigger&&(t._beforeUnload=function(){!t.initialized||t.destroyed||t.isHidden()||t.save({format:"raw",no_events:!0,set_dirty:!1})},t.editorManager.on("BeforeUnload",t._beforeUnload)),t.editorManager.add(t),$w(t,t.suffix)}}else Rz.bind(j.window,"ready",r)},_z="data-mce-contenteditable",Bz=["design","readonly"],Oz=function(e,t){var n=t.firstChild,r=t.lastChild;return n&&"meta"===n.name&&(n=n.next),r&&"mce_marker"===r.attr("id")&&(r=r.prev),function(e,t){var n=e.getNonEmptyElements();return t&&(t.isEmpty(n)||function(e,t){return e.getBlockElements()[t.name]&&function(e){return e.firstChild&&e.firstChild===e.lastChild}(t)&&function(e){return"br"===e.name||"\xa0"===e.value}(t.firstChild)}(e,t))}(e,r)&&(r=r.prev),!(!n||n!==r)&&("ul"===n.name||"ol"===n.name)},Hz=function(e,o,i,t){function n(e){var t=Ds.fromRangeStart(i),n=rc(o.getRoot()),r=1===e?n.prev(t):n.next(t);return!r||rx(o,r.getNode())!==a}var r=function(e,t,n){var r=t.serialize(n);return 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}(e.createFragment(r))}(o,e,t),a=rx(o,i.startContainer),u=nx(ex(r.firstChild)),s=o.getRoot();return n(1)?ix(a,u,s):n(2)?function(e,t,n,r){return r.insertAfter(t.reverse(),e),ox(t[0],n)}(a,u,s,o):function(t,e,n,r){var o=function(e,t){var n=t.cloneRange(),r=t.cloneRange();return n.setStartBefore(e),r.setEndAfter(e),[n.cloneContents(),r.cloneContents()]}(t,r),i=t.parentNode;return i.insertBefore(o[0],t),Mn.each(e,function(e){i.insertBefore(e,t)}),i.insertBefore(o[1],t),i.removeChild(t),ox(e[e.length-1],n)}(a,u,s,i)},Pz=function(e,t){return!!rx(e,t)},Lz=Ge.matchNodeNames(["td","th"]),Vz=function(e,t){var n=function(e){var t;return"string"!=typeof e?(t=Mn.extend({paste:e.paste,data:{paste:e.paste}},e),{content:e.content,details:t}):{content:e,details:{}}}(t);ux(e,n.content,n.details)},Iz=function(e){ez(e,!1)||Lx(e,!1)||Ix(e,!1)||Fx(e,!1)||Dx(e,!1)||Kx(e)||_x(e,!1)||Ux(e,!1)||(sx(e,"Delete"),Tx(e))},Fz=function(e){Lx(e,!0)||Ix(e,!0)||Fx(e,!0)||Dx(e,!0)||Kx(e)||_x(e,!0)||Ux(e,!0)||sx(e,"ForwardDelete")},Uz={getFontSize:cx("font-size"),getFontFamily:q(function(e){return e.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")},cx("font-family")),toPt:function(e,t){return/[0-9.]+px$/.test(e)?function(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}(72*parseInt(e,10)/96,t||0)+"pt":e}},jz=Mn.each,qz=Mn.map,$z=Mn.inArray,Wz=(Kz.prototype.execCommand=function(t,n,r,e){var o,i,a=!1,u=this;if(!u.editor.removed){if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(t)||e&&e.skip_focus?Jf(u.editor):u.editor.focus(),(e=u.editor.fire("BeforeExecCommand",{command:t,ui:n,value:r})).isDefaultPrevented())return!1;if(i=t.toLowerCase(),o=u.commands.exec[i])return o(i,n,r),u.editor.fire("ExecCommand",{command:t,ui:n,value:r}),!0;if(jz(this.editor.plugins,function(e){if(e.execCommand&&e.execCommand(t,n,r))return u.editor.fire("ExecCommand",{command:t,ui:n,value:r}),!(a=!0)}),a)return a;if(u.editor.theme&&u.editor.theme.execCommand&&u.editor.theme.execCommand(t,n,r))return u.editor.fire("ExecCommand",{command:t,ui:n,value:r}),!0;try{a=u.editor.getDoc().execCommand(t,n,r)}catch(s){}return!!a&&(u.editor.fire("ExecCommand",{command:t,ui:n,value:r}),!0)}},Kz.prototype.queryCommandState=function(e){var t;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(e=e.toLowerCase(),t=this.commands.state[e])return t(e);try{return this.editor.getDoc().queryCommandState(e)}catch(n){}return!1}},Kz.prototype.queryCommandValue=function(e){var t;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(e=e.toLowerCase(),t=this.commands.value[e])return t(e);try{return this.editor.getDoc().queryCommandValue(e)}catch(n){}}},Kz.prototype.addCommands=function(e,n){var r=this;n=n||"exec",jz(e,function(t,e){jz(e.toLowerCase().split(","),function(e){r.commands[n][e]=t})})},Kz.prototype.addCommand=function(e,o,i){var a=this;e=e.toLowerCase(),this.commands.exec[e]=function(e,t,n,r){return o.call(i||a.editor,t,n,r)}},Kz.prototype.queryCommandSupported=function(e){if(e=e.toLowerCase(),this.commands.exec[e])return!0;try{return this.editor.getDoc().queryCommandSupported(e)}catch(t){}return!1},Kz.prototype.addQueryStateHandler=function(e,t,n){var r=this;e=e.toLowerCase(),this.commands.state[e]=function(){return t.call(n||r.editor)}},Kz.prototype.addQueryValueHandler=function(e,t,n){var r=this;e=e.toLowerCase(),this.commands.value[e]=function(){return t.call(n||r.editor)}},Kz.prototype.hasCustomCommand=function(e){return e=e.toLowerCase(),!!this.commands.exec[e]},Kz.prototype.execNativeCommand=function(e,t,n){return t===undefined&&(t=!1),n===undefined&&(n=null),this.editor.getDoc().execCommand(e,t,n)},Kz.prototype.isFormatMatch=function(e){return this.editor.formatter.match(e)},Kz.prototype.toggleFormat=function(e,t){this.editor.formatter.toggle(e,t?{value:t}:undefined),this.editor.nodeChanged()},Kz.prototype.storeSelection=function(e){this.selectionBookmark=this.editor.selection.getBookmark(e)},Kz.prototype.restoreSelection=function(){this.editor.selection.moveToBookmark(this.selectionBookmark)},Kz.prototype.setupCommands=function(i){var a=this;function e(n){return function(){var e=i.selection.isCollapsed()?[i.dom.getParent(i.selection.getNode(),i.dom.isBlock)]:i.selection.getSelectedBlocks(),t=qz(e,function(e){return!!i.formatter.matchNode(e,n)});return-1!==$z(t,!0)}}this.addCommands({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){i.undoManager.add()},"Cut,Copy,Paste":function(e){var t,n=i.getDoc();try{a.execNativeCommand(e)}catch(o){t=!0}if("paste"!==e||n.queryCommandEnabled(e)||(t=!0),t||!n.queryCommandSupported(e)){var r=i.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");Nn.mac&&(r=r.replace(/Ctrl\+/g,"\u2318+")),i.notificationManager.open({text:r,type:"error"})}},unlink:function(){if(i.selection.isCollapsed()){var e=i.dom.getParent(i.selection.getStart(),"a");e&&i.dom.remove(e,!0)}else i.formatter.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(e){var t=e.substring(7);"full"===t&&(t="justify"),jz("left,center,right,justify".split(","),function(e){t!==e&&i.formatter.remove("align"+e)}),"none"!==t&&a.toggleFormat("align"+t)},"InsertUnorderedList,InsertOrderedList":function(e){var t,n;a.execNativeCommand(e),(t=i.dom.getParent(i.selection.getNode(),"ol,ul"))&&(n=t.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName)&&(a.storeSelection(),i.dom.split(n,t),a.restoreSelection()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){a.toggleFormat(e)},"ForeColor,HiliteColor":function(e,t,n){a.toggleFormat(e,n)},FontName:function(e,t,n){hx(i,n)},FontSize:function(e,t,n){!function(e,t){e.formatter.toggle("fontsize",{value:dx(e,t)}),e.nodeChanged()}(i,n)},RemoveFormat:function(e){i.formatter.remove(e)},mceBlockQuote:function(){a.toggleFormat("blockquote")},FormatBlock:function(e,t,n){return a.toggleFormat(n||"p")},mceCleanup:function(){var e=i.selection.getBookmark();i.setContent(i.getContent()),i.selection.moveToBookmark(e)},mceRemoveNode:function(e,t,n){var r=n||i.selection.getNode();r!==i.getBody()&&(a.storeSelection(),i.dom.remove(r,!0),a.restoreSelection())},mceSelectNodeDepth:function(e,t,n){var r=0;i.dom.getParent(i.selection.getNode(),function(e){if(1===e.nodeType&&r++===n)return i.selection.select(e),!1},i.getBody())},mceSelectNode:function(e,t,n){i.selection.select(n)},mceInsertContent:function(e,t,n){Vz(i,n)},mceInsertRawHTML:function(e,t,n){i.selection.setContent("tiny_mce_marker");var r=i.getContent();i.setContent(r.replace(/tiny_mce_marker/g,function(){return n}))},mceInsertNewLine:function(e,t,n){gz(i,n)},mceToggleFormat:function(e,t,n){a.toggleFormat(n)},mceSetContent:function(e,t,n){i.setContent(n)},"Indent,Outdent":function(e){_C(i,e)},mceRepaint:function(){},InsertHorizontalRule:function(){i.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){i.hasVisual=!i.hasVisual,i.addVisual()},mceReplaceContent:function(e,t,n){i.execCommand("mceInsertContent",!1,n.replace(/\{\$selection\}/g,i.selection.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;"string"==typeof n&&(n={href:n}),r=i.dom.getParent(i.selection.getNode(),"a"),n.href=n.href.replace(/ /g,"%20"),r&&n.href||i.formatter.remove("link"),n.href&&i.formatter.apply("link",n,r)},selectAll:function(){var e=i.dom.getParent(i.selection.getStart(),Ge.isContentEditableTrue);if(e){var t=i.dom.createRng();t.selectNodeContents(e),i.selection.setRng(t)}},"delete":function(){Iz(i)},forwardDelete:function(){Fz(i)},mceNewDocument:function(){i.setContent("")},InsertLineBreak:function(e,t,n){return lz(i,n),!0}}),a.addCommands({JustifyLeft:e("alignleft"),JustifyCenter:e("aligncenter"),JustifyRight:e("alignright"),JustifyFull:e("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return a.isFormatMatch(e)},mceBlockQuote:function(){return a.isFormatMatch("blockquote")},Outdent:function(){return RC(i)},"InsertUnorderedList,InsertOrderedList":function(e){var t=i.dom.getParent(i.selection.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),a.addCommands({Undo:function(){i.undoManager.undo()},Redo:function(){i.undoManager.redo()}}),a.addQueryValueHandler("FontName",function(){return function(t){return fx(t).fold(function(){return lx(t).map(function(e){return Uz.getFontFamily(t.getBody(),e)}).getOr("")},function(e){return Uz.getFontFamily(t.getBody(),e)})}(i)},this),a.addQueryValueHandler("FontSize",function(){return function(t){return fx(t).fold(function(){return lx(t).map(function(e){return Uz.getFontSize(t.getBody(),e)}).getOr("")},function(e){return Uz.getFontSize(t.getBody(),e)})}(i)},this)},Kz);function Kz(e){this.commands={state:{},exec:{},value:{}},this.editor=e,this.setupCommands(e)}var Xz=Mn.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input beforeinput contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend touchcancel"," "),Yz=(Gz.isNative=function(e){return!!Xz[e.toLowerCase()]},Gz.prototype.fire=function(e,t){var n,r,o,i;if(e=e.toLowerCase(),(t=t||{}).type=e,t.target||(t.target=this.scope),t.preventDefault||(t.preventDefault=function(){t.isDefaultPrevented=a},t.stopPropagation=function(){t.isPropagationStopped=a},t.stopImmediatePropagation=function(){t.isImmediatePropagationStopped=a},t.isDefaultPrevented=c,t.isPropagationStopped=c,t.isImmediatePropagationStopped=c),this.settings.beforeFire&&this.settings.beforeFire(t),n=this.bindings[e])for(r=0,o=n.length;r<o;r++){if((i=n[r]).once&&this.off(e,i.func),t.isImmediatePropagationStopped())return t.stopPropagation(),t;if(!1===i.func.call(this.scope,t))return t.preventDefault(),t}return t},Gz.prototype.on=function(e,t,n,r){var o,i,a;if(!1===t&&(t=c),t){var u={func:t};for(r&&Mn.extend(u,r),a=(i=e.toLowerCase().split(" ")).length;a--;)e=i[a],(o=this.bindings[e])||(o=this.bindings[e]=[],this.toggleEvent(e,!0)),n?o.unshift(u):o.push(u)}return this},Gz.prototype.off=function(e,t){var n,r,o,i,a;if(e)for(n=(i=e.toLowerCase().split(" ")).length;n--;){if(e=i[n],r=this.bindings[e],!e){for(o in this.bindings)this.toggleEvent(o,!1),delete this.bindings[o];return this}if(r){if(t)for(a=r.length;a--;)r[a].func===t&&(r=r.slice(0,a).concat(r.slice(a+1)),this.bindings[e]=r);else r.length=0;r.length||(this.toggleEvent(e,!1),delete this.bindings[e])}}else{for(e in this.bindings)this.toggleEvent(e,!1);this.bindings={}}return this},Gz.prototype.once=function(e,t,n){return this.on(e,t,n,{once:!0})},Gz.prototype.has=function(e){return e=e.toLowerCase(),!(!this.bindings[e]||0===this.bindings[e].length)},Gz);function Gz(e){this.bindings={},this.settings=e||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||c}function Jz(n){return n._eventDispatcher||(n._eventDispatcher=new Yz({scope:n,toggleEvent:function(e,t){Yz.isNative(e)&&n.toggleNativeEvent&&n.toggleNativeEvent(e,t)}})),n._eventDispatcher}function Qz(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=rE.select(e.settings.event_root)[0]),e.eventRoot):e.getBody()}function Zz(e,t,n){!function(e){return!e.hidden&&!Gw(e)}(e)?Gw(e)&&function(e){var t=e.target;!function(e){return"click"===e.type}(e)||"A"!==t.tagName||Ah.metaKeyPressed(e)||e.preventDefault()}(n):e.fire(t,n)}function eE(i,a){var e,t;if(i.delegates||(i.delegates={}),!i.delegates[a]&&!i.removed)if(e=Qz(i,a),i.settings.event_root){if(tE||(tE={},i.editorManager.on("removeEditor",function(){var e;if(!i.editorManager.activeEditor&&tE){for(e in tE)i.dom.unbind(Qz(i,e));tE=null}})),tE[a])return;t=function(e){for(var t=e.target,n=i.editorManager.get(),r=n.length;r--;){var o=n[r].getBody();o!==t&&!rE.isChildOf(t,o)||Zz(n[r],a,e)}},tE[a]=t,rE.bind(e,a,t)}else t=function(e){Zz(i,a,e)},rE.bind(e,a,t),i.delegates[a]=t}var tE,nE={fire:function(e,t,n){if(this.removed&&"remove"!==e&&"detach"!==e)return t;var r=Jz(this).fire(e,t);if(!1!==n&&this.parent)for(var o=this.parent();o&&!r.isPropagationStopped();)o.fire(e,r,!1),o=o.parent();return r},on:function(e,t,n){return Jz(this).on(e,t,n)},off:function(e,t){return Jz(this).off(e,t)},once:function(e,t){return Jz(this).once(e,t)},hasEventListeners:function(e){return Jz(this).has(e)}},rE=Xi.DOM,oE=G(G({},nE),{bindPendingEventDelegates:function(){var t=this;Mn.each(t._pendingNativeEvents,function(e){eE(t,e)})},toggleNativeEvent:function(e,t){var n=this;"focus"!==e&&"blur"!==e&&(t?n.initialized?eE(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&(n.dom.unbind(Qz(n,e),e,n.delegates[e]),delete n.delegates[e]))},unbindAllNativeEvents:function(){var e,t=this,n=t.getBody(),r=t.dom;if(t.delegates){for(e in t.delegates)t.dom.unbind(Qz(t,e),e,t.delegates[e]);delete t.delegates}!t.inline&&n&&r&&(n.onload=null,r.unbind(t.getWin()),r.unbind(t.getDoc())),r&&(r.unbind(n),r.unbind(t.getContainer()))}}),iE=Mn.each,aE=Mn.explode,uE={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},sE=Mn.makeMap("alt,ctrl,shift,meta,access"),cE=(lE.prototype.add=function(e,n,r,o){var t,i=this;return"string"==typeof(t=r)?r=function(){i.editor.execCommand(t,!1,null)}:Mn.isArray(t)&&(r=function(){i.editor.execCommand(t[0],t[1],t[2])}),iE(aE(Mn.trim(e)),function(e){var t=i.createShortcut(e,n,r,o);i.shortcuts[t.id]=t}),!0},lE.prototype.remove=function(e){var t=this.createShortcut(e);return!!this.shortcuts[t.id]&&(delete this.shortcuts[t.id],!0)},lE.prototype.parseShortcut=function(e){var t,n,r={};for(n in iE(aE(e.toLowerCase(),"+"),function(e){e in sE?r[e]=!0:/^[0-9]{2,}$/.test(e)?r.keyCode=parseInt(e,10):(r.charCode=e.charCodeAt(0),r.keyCode=uE[e]||e.toUpperCase().charCodeAt(0))}),t=[r.keyCode],sE)r[n]?t.push(n):r[n]=!1;return r.id=t.join(","),r.access&&(r.alt=!0,Nn.mac?r.ctrl=!0:r.shift=!0),r.meta&&(Nn.mac?r.meta=!0:(r.ctrl=!0,r.meta=!1)),r},lE.prototype.createShortcut=function(e,t,n,r){var o;return(o=Mn.map(aE(e,">"),this.parseShortcut))[o.length-1]=Mn.extend(o[o.length-1],{func:n,scope:r||this.editor}),Mn.extend(o[0],{desc:this.editor.translate(t),subpatterns:o.slice(1)})},lE.prototype.hasModifier=function(e){return e.altKey||e.ctrlKey||e.metaKey},lE.prototype.isFunctionKey=function(e){return"keydown"===e.type&&112<=e.keyCode&&e.keyCode<=123},lE.prototype.matchShortcut=function(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)},lE.prototype.executeShortcutAction=function(e){return e.func?e.func.call(e.scope):null},lE);function lE(e){this.shortcuts={},this.pendingPatterns=[],this.editor=e;var n=this;e.on("keyup keypress keydown",function(t){!n.hasModifier(t)&&!n.isFunctionKey(t)||t.isDefaultPrevented()||(iE(n.shortcuts,function(e){if(n.matchShortcut(t,e))return n.pendingPatterns=e.subpatterns.slice(0),"keydown"===t.type&&n.executeShortcutAction(e),!0}),n.matchShortcut(t,n.pendingPatterns[0])&&(1===n.pendingPatterns.length&&"keydown"===t.type&&n.executeShortcutAction(n.pendingPatterns[0]),n.pendingPatterns.shift()))})}var fE=Mn.each,dE=Mn.trim,hE="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),mE={ftp:21,http:80,https:443,mailto:25},gE=(pE.parseDataUri=function(e){var t,n=decodeURIComponent(e).split(","),r=/data:([^;]+)/.exec(n[0]);return r&&(t=r[1]),{type:t,data:n[1]}},pE.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},pE.prototype.setPath=function(e){var t=/^(.*?)\/?(\w+)?$/.exec(e);this.path=t[0],this.directory=t[1],this.file=t[2],this.source="",this.getURI()},pE.prototype.toRelative=function(e){var t;if("./"===e)return e;var n=new pE(e,{base_uri:this});if("mce_host"!==n.host&&this.host!==n.host&&n.host||this.port!==n.port||this.protocol!==n.protocol&&""!==n.protocol)return n.getURI();var r=this.getURI(),o=n.getURI();return r===o||"/"===r.charAt(r.length-1)&&r.substr(0,r.length-1)===o?r:(t=this.toRelPath(this.path,n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),t)},pE.prototype.toAbsolute=function(e,t){var n=new pE(e,{base_uri:this});return n.getURI(t&&this.isSameOrigin(n))},pE.prototype.isSameOrigin=function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=mE[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},pE.prototype.toRelPath=function(e,t){var n,r,o,i=0,a="",u=e.substring(0,e.lastIndexOf("/")).split("/");if(n=t.split("/"),u.length>=n.length)for(r=0,o=u.length;r<o;r++)if(r>=n.length||u[r]!==n[r]){i=r+1;break}if(u.length<n.length)for(r=0,o=n.length;r<o;r++)if(r>=u.length||u[r]!==n[r]){i=r+1;break}if(1===i)return t;for(r=0,o=u.length-(i-1);r<o;r++)a+="../";for(r=i-1,o=n.length;r<o;r++)a+=r!==i-1?"/"+n[r]:n[r];return a},pE.prototype.toAbsPath=function(e,t){var n,r,o,i=0,a=[];r=/\/$/.test(t)?"/":"";var u=e.split("/"),s=t.split("/");for(fE(u,function(e){e&&a.push(e)}),u=a,n=s.length-1,a=[];0<=n;n--)0!==s[n].length&&"."!==s[n]&&(".."!==s[n]?0<i?i--:a.push(s[n]):i++);return 0!==(o=(n=u.length-i)<=0?a.reverse().join("/"):u.slice(0,n).join("/")+"/"+a.reverse().join("/")).indexOf("/")&&(o="/"+o),r&&o.lastIndexOf("/")!==o.length-1&&(o+=r),o},pE.prototype.getURI=function(e){var t;return void 0===e&&(e=!1),this.source&&!e||(t="",e||(this.protocol?t+=this.protocol+"://":t+="//",this.userInfo&&(t+=this.userInfo+"@"),this.host&&(t+=this.host),this.port&&(t+=":"+this.port)),this.path&&(t+=this.path),this.query&&(t+="?"+this.query),this.anchor&&(t+="#"+this.anchor),this.source=t),this.source},pE);function pE(e,t){e=dE(e),this.settings=t||{};var n=this.settings.base_uri,r=this;if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))r.source=e;else{var o=0===e.indexOf("//");if(0!==e.indexOf("/")||o||(e=(n&&n.protocol||"http")+"://mce_host"+e),!/^[\w\-]*:?\/\//.test(e)){var i=this.settings.base_uri?this.settings.base_uri.path:new pE(j.document.location.href).directory;if(this.settings.base_uri&&""==this.settings.base_uri.protocol)e="//mce_host"+r.toAbsPath(i,e);else{var a=/([^#?]*)([#?]?.*)/.exec(e);e=(n&&n.protocol||"http")+"://mce_host"+r.toAbsPath(i,a[1])+a[2]}}e=e.replace(/@@/g,"(mce_at)");var u=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);fE(hE,function(e,t){var n=u[t];n=n&&n.replace(/\(mce_at\)/g,"@@"),r[e]=n}),n&&(r.protocol||(r.protocol=n.protocol),r.userInfo||(r.userInfo=n.userInfo),r.port||"mce_host"!==r.host||(r.port=n.port),r.host&&"mce_host"!==r.host||(r.host=n.host),r.source=""),o&&(r.protocol="")}}function vE(){var e=function(){function e(n,r){return function(e,t){return n[e.toLowerCase()]=G(G({},t),{type:r})}}var t={},n={},r={},o={},i={},a={},u={};return{addButton:e(t,"button"),addToggleButton:e(t,"togglebutton"),addMenuButton:e(t,"menubutton"),addSplitButton:e(t,"splitbutton"),addMenuItem:e(n,"menuitem"),addNestedMenuItem:e(n,"nestedmenuitem"),addToggleMenuItem:e(n,"togglemenuitem"),addAutocompleter:e(r,"autocompleter"),addContextMenu:e(i,"contextmenu"),addContextToolbar:e(a,"contexttoolbar"),addContextForm:e(a,"contextform"),addSidebar:e(u,"sidebar"),addIcon:function(e,t){return o[e.toLowerCase()]=t},getAll:function(){return{buttons:t,menuItems:n,icons:o,popups:r,contextMenus:i,contextToolbars:a,sidebars:u}}}}();return{addAutocompleter:e.addAutocompleter,addButton:e.addButton,addContextForm:e.addContextForm,addContextMenu:e.addContextMenu,addContextToolbar:e.addContextToolbar,addIcon:e.addIcon,addMenuButton:e.addMenuButton,addMenuItem:e.addMenuItem,addNestedMenuItem:e.addNestedMenuItem,addSidebar:e.addSidebar,addSplitButton:e.addSplitButton,addToggleButton:e.addToggleButton,addToggleMenuItem:e.addToggleMenuItem,getAll:e.getAll}}var yE=Xi.DOM,bE=Mn.extend,CE=Mn.each,wE=Mn.resolve,xE=Nn.ie,zE=(EE.prototype.render=function(){Dz(this)},EE.prototype.focus=function(e){ad(this,e)},EE.prototype.hasFocus=function(){return ud(this)},EE.prototype.execCallback=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r,o=this.settings[e];if(o)return this.callbackLookup&&(r=this.callbackLookup[e])&&(o=r.func,r=r.scope),"string"==typeof o&&(r=(r=o.replace(/\.\w+$/,""))?wE(r):0,o=wE(o),this.callbackLookup=this.callbackLookup||{},this.callbackLookup[e]={func:o,scope:r}),o.apply(r||this,Array.prototype.slice.call(arguments,1))},EE.prototype.translate=function(e){return ra.translate(e)},EE.prototype.getParam=function(e,t,n){return ef(this,e,t,n)},EE.prototype.nodeChanged=function(e){this._nodeChangeDispatcher.nodeChanged(e)},EE.prototype.addCommand=function(e,t,n){this.editorCommands.addCommand(e,t,n)},EE.prototype.addQueryStateHandler=function(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)},EE.prototype.addQueryValueHandler=function(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)},EE.prototype.addShortcut=function(e,t,n,r){this.shortcuts.add(e,t,n,r)},EE.prototype.execCommand=function(e,t,n,r){return this.editorCommands.execCommand(e,t,n,r)},EE.prototype.queryCommandState=function(e){return this.editorCommands.queryCommandState(e)},EE.prototype.queryCommandValue=function(e){return this.editorCommands.queryCommandValue(e)},EE.prototype.queryCommandSupported=function(e){return this.editorCommands.queryCommandSupported(e)},EE.prototype.show=function(){this.hidden&&(this.hidden=!1,this.inline?this.getBody().contentEditable="true":(yE.show(this.getContainer()),yE.hide(this.id)),this.load(),this.fire("show"))},EE.prototype.hide=function(){var e=this,t=e.getDoc();e.hidden||(xE&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable="false",e===e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(yE.hide(e.getContainer()),yE.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.fire("hide"))},EE.prototype.isHidden=function(){return!!this.hidden},EE.prototype.setProgressState=function(e,t){this.fire("ProgressState",{state:e,time:t})},EE.prototype.load=function(e){var t,n=this.getElement();if(this.removed)return"";if(n){(e=e||{}).load=!0;var r=Ge.isTextareaOrInput(n)?n.value:n.innerHTML;return t=this.setContent(r,e),e.element=n,e.no_events||this.fire("LoadContent",e),e.element=n=null,t}},EE.prototype.save=function(e){var t,n,r=this,o=r.getElement();if(o&&r.initialized&&!r.removed)return(e=e||{}).save=!0,e.element=o,e.content=r.getContent(e),e.no_events||r.fire("SaveContent",e),"raw"===e.format&&r.fire("RawSaveContent",e),t=e.content,Ge.isTextareaOrInput(o)?o.value=t:(!e.is_removing&&r.inline||(o.innerHTML=t),(n=yE.getParent(r.id,"form"))&&CE(n.elements,function(e){if(e.name===r.id)return e.value=t,!1})),e.element=o=null,!1!==e.set_dirty&&r.setDirty(!1),t},EE.prototype.setContent=function(e,t){return jl(this,e,t)},EE.prototype.getContent=function(e){return function(t,n){return void 0===n&&(n={}),k.from(t.getBody()).fold($("tree"===n.format?new ul("body",11):""),function(e){return ml(t,n,e)})}(this,e)},EE.prototype.insertContent=function(e,t){t&&(e=bE({content:e},t)),this.execCommand("mceInsertContent",!1,e)},EE.prototype.resetContent=function(e){e===undefined?jl(this,this.startContent,{format:"raw"}):jl(this,e),this.undoManager.reset(),this.setDirty(!1),this.nodeChanged()},EE.prototype.isDirty=function(){return!this.isNotDirty},EE.prototype.setDirty=function(e){var t=!this.isNotDirty;this.isNotDirty=!e,e&&e!==t&&this.fire("dirty")},EE.prototype.getContainer=function(){return this.container||(this.container=yE.get(this.editorContainer||this.id+"_parent")),this.container},EE.prototype.getContentAreaContainer=function(){return this.contentAreaContainer},EE.prototype.getElement=function(){return this.targetElm||(this.targetElm=yE.get(this.id)),this.targetElm},EE.prototype.getWin=function(){var e;return this.contentWindow||(e=this.iframeElement)&&(this.contentWindow=e.contentWindow),this.contentWindow},EE.prototype.getDoc=function(){var e;return this.contentDocument||(e=this.getWin())&&(this.contentDocument=e.document),this.contentDocument},EE.prototype.getBody=function(){var e=this.getDoc();return this.bodyElement||(e?e.body:null)},EE.prototype.convertURL=function(e,t,n){var r=this.settings;return r.urlconverter_callback?this.execCallback("urlconverter_callback",e,n,!0,t):!r.convert_urls||n&&"LINK"===n.nodeName||0===e.indexOf("file:")||0===e.length?e:r.relative_urls?this.documentBaseURI.toRelative(e):e=this.documentBaseURI.toAbsolute(e,r.remove_script_host)},EE.prototype.addVisual=function(e){var n,r=this,o=r.settings,i=r.dom;e=e||r.getBody(),r.hasVisual===undefined&&(r.hasVisual=o.visual),CE(i.select("table,a",e),function(e){var t;switch(e.nodeName){case"TABLE":return n=o.visual_table_class||"mce-item-table",void((t=i.getAttrib(e,"border"))&&"0"!==t||!r.hasVisual?i.removeClass(e,n):i.addClass(e,n));case"A":return void(i.getAttrib(e,"href")||(t=i.getAttrib(e,"name")||e.id,n=o.visual_anchor_class||"mce-item-anchor",t&&r.hasVisual?i.addClass(e,n):i.removeClass(e,n)))}}),r.fire("VisualAid",{element:e,hasVisual:r.hasVisual})},EE.prototype.remove=function(){$l(this)},EE.prototype.destroy=function(e){Wl(this,e)},EE.prototype.uploadImages=function(e){return this.editorUpload.uploadImages(e)},EE.prototype._scanForImages=function(){return this.editorUpload.scanForImages()},EE.prototype.addButton=function(){throw new Error("editor.addButton has been removed in tinymce 5x, use editor.ui.registry.addButton or editor.ui.registry.addToggleButton or editor.ui.registry.addSplitButton instead")},EE.prototype.addSidebar=function(){throw new Error("editor.addSidebar has been removed in tinymce 5x, use editor.ui.registry.addSidebar instead")},EE.prototype.addMenuItem=function(){throw new Error("editor.addMenuItem has been removed in tinymce 5x, use editor.ui.registry.addMenuItem instead")},EE.prototype.addContextToolbar=function(){throw new Error("editor.addContextToolbar has been removed in tinymce 5x, use editor.ui.registry.addContextToolbar instead")},EE);function EE(e,t,n){var r=this;this.plugins={},this.contentCSS=[],this.contentStyles=[],this.loadedCSS={},this.isNotDirty=!1,this.editorManager=n,this.documentBaseUrl=n.documentBaseURL,bE(this,oE),this.settings=Ql(this,e,this.documentBaseUrl,n.defaultSettings,t),this.settings.suffix&&(n.suffix=this.settings.suffix),this.suffix=n.suffix,this.settings.base_url&&n._setBaseUrl(this.settings.base_url),this.baseUri=n.baseURI,this.settings.referrer_policy&&(Qi.ScriptLoader._setReferrerPolicy(this.settings.referrer_policy),Xi.DOM.styleSheetLoader._setReferrerPolicy(this.settings.referrer_policy)),ga.languageLoad=this.settings.language_load,ga.baseURL=n.baseURL,this.id=e,this.setDirty(!1),this.documentBaseURI=new gE(this.settings.document_base_url,{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=!!this.settings.inline,this.shortcuts=new cE(this),this.editorCommands=new Wz(this),this.settings.cache_suffix&&(Nn.cacheSuffix=this.settings.cache_suffix.replace(/^[\?\&]+/,"")),this.ui={registry:vE()};var o=Zw(this);this.mode=o,this.setMode=o.set,n.fire("SetupEditor",{editor:this}),this.execCallback("setup",this),this.$=vi.overrideDefaults(function(){return{context:r.inline?r.getBody():r.getDoc(),element:r.getBody()}})}function NE(t){var n=t.type;DE(VE.get(),function(e){switch(n){case"scroll":e.fire("ScrollWindow",t);break;case"resize":e.fire("ResizeWindow",t)}})}function SE(e){e!==OE&&(e?vi(window).on("resize scroll",NE):vi(window).off("resize scroll",NE),OE=e)}function kE(t){var e=PE;delete HE[t.id];for(var n=0;n<HE.length;n++)if(HE[n]===t){HE.splice(n,1);break}return PE=y(PE,function(e){return t!==e}),VE.activeEditor===t&&(VE.activeEditor=0<PE.length?PE[0]:null),VE.focusedEditor===t&&(VE.focusedEditor=null),e.length!==PE.length}var TE,AE,ME=Xi.DOM,RE=Mn.explode,DE=Mn.each,_E=Mn.extend,BE=0,OE=!1,HE=[],PE=[],LE="CSS1Compat"!==j.document.compatMode,VE=G(G({},nE),{baseURI:null,baseURL:null,defaultSettings:{},documentBaseURL:null,suffix:null,$:vi,majorVersion:"5",minorVersion:"1.5",releaseDate:"2019-12-19",editors:HE,i18n:ra,activeEditor:null,focusedEditor:null,settings:{},setup:function(){var e,t,n="";t=gE.getDocumentBaseUrl(j.document.location),/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/"));var r=window.tinymce||window.tinyMCEPreInit;if(r)e=r.base||r.baseURL,n=r.suffix;else{for(var o=j.document.getElementsByTagName("script"),i=0;i<o.length;i++){var a;if(""!==(a=o[i].src||"")){var u=a.substring(a.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(a)){-1!==u.indexOf(".min")&&(n=".min"),e=a.substring(0,a.lastIndexOf("/"));break}}}if(!e&&j.document.currentScript)-1!==(a=j.document.currentScript.src).indexOf(".min")&&(n=".min"),e=a.substring(0,a.lastIndexOf("/"))}this.baseURL=new gE(t).toAbsolute(e),this.documentBaseURL=t,this.baseURI=new gE(this.baseURL),this.suffix=n,nd(this)},overrideDefaults:function(e){var t,n;(t=e.base_url)&&this._setBaseUrl(t),n=e.suffix,e.suffix&&(this.suffix=n);var r=(this.defaultSettings=e).plugin_base_urls;for(var o in r)ga.PluginManager.urls[o]=r[o]},init:function(r){var n,u,s=this;u=Mn.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option table tbody tfoot thead tr th td script noscript style textarea video audio iframe object menu"," ");function c(e){var t=e.id;return t||(t=(t=e.name)&&!ME.get(t)?e.name:ME.uniqueId(),e.setAttribute("id",t)),t}function l(e,t){return t.constructor===RegExp?t.test(e.className):ME.hasClass(e,t)}var f=function(e){n=e},e=function(){function n(e,t,n){var r=new zE(e,t,s);a.push(r),r.on("init",function(){++i===o.length&&f(a)}),r.targetElm=r.targetElm||n,r.render()}var o,i=0,a=[];ME.unbind(window,"ready",e),function(e){var t=r[e];if(t)t.apply(s,Array.prototype.slice.call(arguments,2))}("onpageload"),o=vi.unique(function(t){var e,n=[];if(Nn.browser.isIE()&&Nn.browser.version.major<11)return Fd.initError("TinyMCE does not support the browser you are using. For a list of supported browsers please see: https://www.tinymce.com/docs/get-started/system-requirements/"),[];if(LE)return Fd.initError("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),[];if(t.types)return DE(t.types,function(e){n=n.concat(ME.select(e.selector))}),n;if(t.selector)return ME.select(t.selector);if(t.target)return[t.target];switch(t.mode){case"exact":0<(e=t.elements||"").length&&DE(RE(e),function(t){var e;(e=ME.get(t))?n.push(e):DE(j.document.forms,function(e){DE(e.elements,function(e){e.name===t&&(t="mce_editor_"+BE++,ME.setAttrib(e,"id",t),n.push(e))})})});break;case"textareas":case"specific_textareas":DE(ME.select("textarea"),function(e){t.editor_deselector&&l(e,t.editor_deselector)||t.editor_selector&&!l(e,t.editor_selector)||n.push(e)})}return n}(r)),r.types?DE(r.types,function(t){Mn.each(o,function(e){return!ME.is(e,t.selector)||(n(c(e),_E({},r,t),e),!1)})}):(Mn.each(o,function(e){!function(e){e&&e.initialized&&!(e.getContainer()||e.getBody()).parentNode&&(kE(e),e.unbindAllNativeEvents(),e.destroy(!0),e.removed=!0,e=null)}(s.get(e.id))}),0===(o=Mn.grep(o,function(e){return!s.get(e.id)})).length?f([]):DE(o,function(e){!function(e,t){return e.inline&&t.tagName.toLowerCase()in u}(r,e)?n(c(e),r,e):Fd.initError("Could not initialize inline editor on invalid inline target element",e)}))};return s.settings=r,ME.bind(window,"ready",e),new Zt(function(t){n?t(n):f=function(e){t(e)}})},get:function(t){return 0===arguments.length?PE.slice(0):K(t)?g(PE,function(e){return e.id===t}).getOr(null):_(t)&&PE[t]?PE[t]:null},add:function(e){var n=this;return HE[e.id]===e||(null===n.get(e.id)&&(function(e){return"length"!==e}(e.id)&&(HE[e.id]=e),HE.push(e),PE.push(e)),SE(!0),n.activeEditor=e,n.fire("AddEditor",{editor:e}),TE||(TE=function(e){var t=n.fire("BeforeUnload");if(t.returnValue)return e.preventDefault(),e.returnValue=t.returnValue,t.returnValue},window.addEventListener("beforeunload",TE))),e},createEditor:function(e,t){return this.add(new zE(e,t,this))},remove:function(e){var t,n,r=this;if(e){if(!K(e))return n=e,M(r.get(n.id))?null:(kE(n)&&r.fire("RemoveEditor",{editor:n}),0===PE.length&&window.removeEventListener("beforeunload",TE),n.remove(),SE(0<PE.length),n);DE(ME.select(e),function(e){(n=r.get(e.id))&&r.remove(n)})}else for(t=PE.length-1;0<=t;t--)r.remove(PE[t])},execCommand:function(e,t,n){var r=this.get(n);switch(e){case"mceAddEditor":return this.get(n)||new zE(n,this.settings,this).render(),!0;case"mceRemoveEditor":return r&&r.remove(),!0;case"mceToggleEditor":return r?r.isHidden()?r.show():r.hide():this.execCommand("mceAddEditor",0,n),!0}return!!this.activeEditor&&this.activeEditor.execCommand(e,t,n)},triggerSave:function(){DE(PE,function(e){e.save()})},addI18n:function(e,t){ra.add(e,t)},translate:function(e){return ra.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},_setBaseUrl:function(e){this.baseURL=new gE(this.documentBaseURL).toAbsolute(e.replace(/\/+$/,"")),this.baseURI=new gE(this.baseURL)}});function IE(n){return{walk:function(e,t){return Gc(n,e,t)},split:Cm,normalize:function(t){return ay(n,t).fold($(!1),function(e){return t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),!0})}}}VE.setup(),(AE=IE=IE||{}).compareRanges=hh,AE.getCaretRangeFromPoint=$v,AE.getSelectedNode=Wa,AE.getNode=Ka;function FE(e,t,n){var r,o,i,a,u,s;return r=t.x,o=t.y,i=e.w,a=e.h,u=t.w,s=t.h,"b"===(n=(n||"").split(""))[0]&&(o+=s),"r"===n[1]&&(r+=u),"c"===n[0]&&(o+=JE(s/2)),"c"===n[1]&&(r+=JE(u/2)),"b"===n[3]&&(o-=a),"r"===n[4]&&(r-=i),"c"===n[3]&&(o-=JE(a/2)),"c"===n[4]&&(r-=JE(i/2)),QE(r,o,i,a)}function UE(){}var jE,qE,$E,WE,KE=IE,XE=(jE={},qE={},{load:function(r,o){var i='Script at URL "'+o+'" failed to load',a='Script at URL "'+o+"\" did not call `tinymce.Resource.add('"+r+"', data)` within 1 second";if(jE[r]!==undefined)return jE[r];var e=new Zt(function(e,t){var n=function(e,t,n){function r(n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];o||(o=!0,null!==i&&(j.clearTimeout(i),i=null),n.apply(null,e))}}void 0===n&&(n=1e3);var o=!1,i=null,a=r(e),u=r(t);return{start:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];o||null!==i||(i=j.setTimeout(function(){return u.apply(null,e)},n))},resolve:a,reject:u}}(e,t);qE[r]=n.resolve,Qi.ScriptLoader.loadScript(o,function(){return n.start(a)},function(){return n.reject(i)})});return jE[r]=e},add:function(e,t){qE[e]!==undefined&&(qE[e](t),delete qE[e]),jE[e]=Zt.resolve(t)}}),YE=Math.min,GE=Math.max,JE=Math.round,QE=function(e,t,n,r){return{x:e,y:t,w:n,h:r}},ZE={inflate:function(e,t,n){return QE(e.x-t,e.y-n,e.w+2*t,e.h+2*n)},relativePosition:FE,findBestRelativePosition:function(e,t,n,r){var o,i;for(i=0;i<r.length;i++)if((o=FE(e,t,r[i])).x>=n.x&&o.x+o.w<=n.w+n.x&&o.y>=n.y&&o.y+o.h<=n.h+n.y)return r[i];return null},intersect:function(e,t){var n,r,o,i;return n=GE(e.x,t.x),r=GE(e.y,t.y),o=YE(e.x+e.w,t.x+t.w),i=YE(e.y+e.h,t.y+t.h),o-n<0||i-r<0?null:QE(n,r,o-n,i-r)},clamp:function(e,t,n){var r,o,i,a,u,s,c,l,f,d;return u=e.x,s=e.y,c=e.x+e.w,l=e.y+e.h,f=t.x+t.w,d=t.y+t.h,r=GE(0,t.x-u),o=GE(0,t.y-s),i=GE(0,c-f),a=GE(0,l-d),u+=r,s+=o,n&&(c+=r,l+=o,u-=i,s-=a),QE(u,s,(c-=i)-u,(l-=a)-s)},create:QE,fromClientRect:function(e){return QE(e.left,e.top,e.width,e.height)}},eN=Mn.each,tN=Mn.extend;UE.extend=$E=function(n){function r(){var e,t,n;if(!WE&&(this.init&&this.init.apply(this,arguments),t=this.Mixins))for(e=t.length;e--;)(n=t[e]).init&&n.init.apply(this,arguments)}function t(){return this}function e(n,r){return function(){var e,t=this._super;return this._super=u[n],e=r.apply(this,arguments),this._super=t,e}}var o,i,a,u=this.prototype;for(i in WE=!0,o=new this,WE=!1,n.Mixins&&(eN(n.Mixins,function(e){for(var t in e)"init"!==t&&(n[t]=e[t])}),u.Mixins&&(n.Mixins=u.Mixins.concat(n.Mixins))),n.Methods&&eN(n.Methods.split(","),function(e){n[e]=t}),n.Properties&&eN(n.Properties.split(","),function(e){var t="_"+e;n[e]=function(e){return e!==undefined?(this[t]=e,this):this[t]}}),n.Statics&&eN(n.Statics,function(e,t){r[t]=e}),n.Defaults&&u.Defaults&&(n.Defaults=tN({},u.Defaults,n.Defaults)),n)"function"==typeof(a=n[i])&&u[i]?o[i]=e(i,a):o[i]=a;return r.prototype=o,(r.constructor=r).extend=$E,r};var nN=Math.min,rN=Math.max,oN=Math.round,iN={serialize:function(e){var t=JSON.stringify(e);return K(t)?t.replace(/[\u0080-\uFFFF]/g,function(e){var t=e.charCodeAt(0).toString(16);return"\\u"+"0000".substring(t.length)+t}):t},parse:function(e){try{return JSON.parse(e)}catch(t){}}},aN={callbacks:{},count:0,send:function(t){var n=this,r=Xi.DOM,o=t.count!==undefined?t.count:n.count,i="tinymce_jsonp_"+o;n.callbacks[o]=function(e){r.remove(i),delete n.callbacks[o],t.callback(e)},r.add(r.doc.body,"script",{id:i,src:t.url,type:"text/javascript"}),n.count++}},uN=G(G({},nE),{send:function(e){var t,n=0,r=function(){!e.async||4===t.readyState||1e4<n++?(e.success&&n<1e4&&200===t.status?e.success.call(e.success_scope,""+t.responseText,t,e):e.error&&e.error.call(e.error_scope,1e4<n?"TIMED_OUT":"GENERAL",t,e),t=null):pn.setTimeout(r,10)};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||"",uN.fire("beforeInitialize",{settings:e}),t=new j.XMLHttpRequest){if(t.overrideMimeType&&t.overrideMimeType(e.content_type),t.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(t.withCredentials=!0),e.content_type&&t.setRequestHeader("Content-Type",e.content_type),e.requestheaders&&Mn.each(e.requestheaders,function(e){t.setRequestHeader(e.key,e.value)}),t.setRequestHeader("X-Requested-With","XMLHttpRequest"),(t=uN.fire("beforeSend",{xhr:t,settings:e}).xhr).send(e.data),!e.async)return r();pn.setTimeout(r,10)}}}),sN=Mn.extend,cN=(lN.sendRPC=function(e){return(new lN).send(e)},lN.prototype.send=function(e){var n=e.error,r=e.success,o=sN(this.settings,e);o.success=function(e,t){void 0===(e=iN.parse(e))&&(e={error:"JSON Parse error."}),e.error?n.call(o.error_scope||o.scope,e.error,t):r.call(o.success_scope||o.scope,e.result)},o.error=function(e,t){n&&n.call(o.error_scope||o.scope,e,t)},o.data=iN.serialize({id:e.id||"c"+this.count++,method:e.method,params:e.params}),o.content_type="application/json",uN.send(o)},lN);function lN(e){this.settings=sN({},e),this.count=0}var fN,dN,hN,mN;try{fN=j.window.localStorage}catch(yN){dN={},hN=[],mN={getItem:function(e){var t=dN[e];return t||null},setItem:function(e,t){hN.push(e),dN[e]=String(t)},key:function(e){return hN[e]},removeItem:function(t){hN=hN.filter(function(e){return e===t}),delete dN[t]},clear:function(){hN=[],dN={}},length:0},Object.defineProperty(mN,"length",{get:function(){return hN.length},configurable:!1,enumerable:!1}),fN=mN}var gN,pN={geom:{Rect:ZE},util:{Promise:Zt,Delay:pn,Tools:Mn,VK:Ah,URI:gE,Class:UE,EventDispatcher:Yz,Observable:nE,I18n:ra,XHR:uN,JSON:iN,JSONRequest:cN,JSONP:aN,LocalStorage:fN,Color:function(e){function t(e){var t;return"object"==typeof e?"r"in e?(u=e.r,s=e.g,c=e.b):"v"in e&&function(e,t,n){var r,o,i,a;if(e=(parseInt(e,10)||0)%360,t=parseInt(t,10)/100,n=parseInt(n,10)/100,t=rN(0,nN(t,1)),n=rN(0,nN(n,1)),0!==t){switch(r=e/60,i=(o=n*t)*(1-Math.abs(r%2-1)),a=n-o,Math.floor(r)){case 0:u=o,s=i,c=0;break;case 1:u=i,s=o,c=0;break;case 2:u=0,s=o,c=i;break;case 3:u=0,s=i,c=o;break;case 4:u=i,s=0,c=o;break;case 5:u=o,s=0,c=i;break;default:u=s=c=0}u=oN(255*(u+a)),s=oN(255*(s+a)),c=oN(255*(c+a))}else u=s=c=oN(255*n)}(e.h,e.s,e.v):(t=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e))?(u=parseInt(t[1],10),s=parseInt(t[2],10),c=parseInt(t[3],10)):(t=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e))?(u=parseInt(t[1],16),s=parseInt(t[2],16),c=parseInt(t[3],16)):(t=/#([0-F])([0-F])([0-F])/gi.exec(e))&&(u=parseInt(t[1]+t[1],16),s=parseInt(t[2]+t[2],16),c=parseInt(t[3]+t[3],16)),u=u<0?0:255<u?255:u,s=s<0?0:255<s?255:s,c=c<0?0:255<c?255:c,n}var n={},u=0,s=0,c=0;return e&&t(e),n.toRgb=function(){return{r:u,g:s,b:c}},n.toHsv=function(){return function(e,t,n){var r,o,i,a;return o=0,(i=nN(e/=255,nN(t/=255,n/=255)))===(a=rN(e,rN(t,n)))?{h:0,s:0,v:100*(o=i)}:(r=(a-i)/a,{h:oN(60*((e===i?3:n===i?1:5)-(e===i?t-n:n===i?e-t:n-e)/((o=a)-i))),s:oN(100*r),v:oN(100*o)})}(u,s,c)},n.toHex=function(){function e(e){return 1<(e=parseInt(e,10).toString(16)).length?e:"0"+e}return"#"+e(u)+e(s)+e(c)},n.parse=t,n}},dom:{EventUtils:kr,Sizzle:Ao,DomQuery:vi,TreeWalker:yi,DOMUtils:Xi,ScriptLoader:Qi,RangeUtils:KE,Serializer:Ap,ControlSelection:Wp,BookmarkManager:Kp,Selection:ly,Event:kr.Event},html:{Styles:xr,Entities:ir,Node:ul,Schema:pr,SaxParser:of,DomParser:Np,Writer:gl,Serializer:pl},Env:Nn,AddOnManager:ga,Annotator:nl,Formatter:Cp,UndoManager:mm,EditorCommands:Wz,WindowManager:Bd,NotificationManager:_d,EditorObservable:oE,Shortcuts:cE,Editor:zE,FocusManager:Zf,EditorManager:VE,DOM:Xi.DOM,ScriptLoader:Qi.ScriptLoader,PluginManager:ga.PluginManager,ThemeManager:ga.ThemeManager,IconManager:Ud,Resource:XE,trim:Mn.trim,isArray:Mn.isArray,is:Mn.is,toArray:Mn.toArray,makeMap:Mn.makeMap,each:Mn.each,map:Mn.map,grep:Mn.grep,inArray:Mn.inArray,extend:Mn.extend,create:Mn.create,walk:Mn.walk,createNS:Mn.createNS,resolve:Mn.resolve,explode:Mn.explode,_addCacheSuffix:Mn._addCacheSuffix,isOpera:Nn.opera,isWebKit:Nn.webkit,isIE:Nn.ie,isGecko:Nn.gecko,isMac:Nn.mac},vN=Mn.extend(VE,pN);gN=vN,window.tinymce=gN,window.tinyMCE=gN,function(e){if("object"==typeof module)try{module.exports=e}catch(t){}}(vN)}(window);
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tinymce-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.4.1
4
+ version: 5.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Pohlenz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-06 00:00:00.000000000 Z
11
+ date: 2020-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties