1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-447a22cc"],{"030f":function(e,t,n){(function(e){!function(t){"use strict";var n=function(){},r=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e(t.apply(null,n))}},o=function(e){return function(){return e}},i=function(e){return e};function a(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=t.concat(n);return e.apply(null,o)}}function u(e){return function(){throw new Error(e)}}var c=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return!e.apply(null,t)}},s=o(!1),l=o(!0),f=tinymce.util.Tools.resolve("tinymce.ThemeManager"),d=function(){return(d=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 m(e,t){var n={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function h(){return p}it={fold:function(e,t){return e()},is:s,isSome:s,isNone:l,getOr:y,getOrThunk:b,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(void 0),or:y,orThunk:b,map:h,each:n,bind:h,exists:s,forall:l,filter:h,equals:v,equals_:v,toArray:function(){return[]},toString:o("none()")},Object.freeze&&Object.freeze(it);var p=it;function v(e){return e.isNone()}function b(e){return e()}function y(e){return e}function w(e){function t(){return i}function n(t){return t(e)}var r=o(e),i={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:l,isNone:s,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:t,orThunk:t,map:function(t){return w(t(e))},each:function(t){t(e)},bind:n,exists:n,forall:n,filter:function(t){return t(e)?i:p},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(s,(function(t){return n(e,t)}))}};return i}function x(e){return{is:function(t){return e===t},isValue:l,isError:s,getOr:o(e),getOrThunk:o(e),getOrDie:o(e),or:function(t){return x(e)},orThunk:function(t){return x(e)},fold:function(t,n){return n(e)},map:function(t){return x(t(e))},mapError:function(t){return x(e)},each:function(t){t(e)},bind:function(t){return t(e)},exists:function(t){return t(e)},forall:function(t){return t(e)},toOption:function(){return ye.some(e)}}}function C(e){return{is:s,isValue:s,isError:l,getOr:i,getOrThunk:function(e){return e()},getOrDie:function(){return u(String(e))()},or:function(e){return e},orThunk:function(e){return e()},fold:function(t,n){return t(e)},map:function(t){return C(e)},mapError:function(t){return C(t(e))},each:n,bind:function(t){return C(e)},exists:s,forall:l,toOption:ye.none}}function S(e){return function(t){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}(t)===e}}function k(e,t){for(var n=[],r=0;r<e.length;r+=t){var o=Ne.call(e,r,r+t);n.push(o)}return n}function T(e){return[e]}function E(e,t){for(var n=Ke(e),r=0,o=n.length;r<o;r++){var i=n[r],a=e[i];if(t(a,i,e))return ye.some(a)}return ye.none()}function O(e){return function(){for(var t=new Array(arguments.length),n=0;n<t.length;n++)t[n]=arguments[n];if(0===t.length)throw new Error("Can't merge zero objects");for(var r={},o=0;o<t.length;o++){var i,a=t[o];for(i in a)at.call(a,i)&&(r[i]=e(r[i],a[i]))}return r}}function N(e){var t,n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=!0,t=e.apply(null,r)),t}}function A(e){return st.defaultedThunk(o(e))}function D(e,t){return n=t,r={},Ze(e,(function(e,t){Re(n,t)||(r[t]=e)})),r;var n,r}function _(e){return gt(e)}function R(e,t){return n=e,r=t,function(e){return ot(e,n)?e[n]:r};var n,r}function B(e,t,n){return e.stype===be.Error?t(e.serror):n(e.svalue)}function M(e){return{stype:be.Value,svalue:e}}function P(e){return{stype:be.Error,serror:e}}function z(e){return r(kt.serror,Ue)(e)}function I(e,t,n){return ht(t,n).fold((function(){return r=n,o=t,Dt(e,(function(){return'Could not find valid *strict* value for "'+r+'" in '+Nt(o)}));var r,o}),kt.svalue)}function L(e,t,n){return t=ht(e,t).fold((function(){return n(e)}),i),kt.svalue(t)}function F(e,t){return{extract:function(n,r,o){var a=Ke(o),u=(u=n,a=a,It(Mt(e)).extract(u,i,a));return kt.bind(u,(function(e){return e=Me(e,(function(e){return Rt.field(e,e,lt(),t)})),zt(e).extract(n,r,o)}))},toString:function(){return"setOf("+t.toString()+")"},toDsl:function(){return Et.setOf(e,t)}}}function H(e,t){return{extract:function(n,r,o){return yt(o,e).fold((function(){return _t(n,e)}),(function(e){return Ut(n,r,o,t,e)}))},toString:function(){return"chooseOn("+e+"). Possible values: "+Ke(t)},toDsl:function(){return Et.choiceOf(e,t)}}}function V(e,t){return F((function(t){return kt.fromResult(e(t))}),t)}function U(e,t){return H(e,Qe(t,zt))}function j(e,t){return Mt((function(n){var r=typeof n;return e(n)?kt.svalue(n):kt.serror("Expected type: "+t+" but got: "+r)}))}function W(e){function t(e,t){for(var n=e.next();!n.done;){if(!t(n.value))return!1;n=e.next()}return!0}if(Object(e)!==e)return!0;switch({}.toString.call(e).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(e).every((function(t){return W(e[t])}));case"Map":return t(e.keys(),W)&&t(e.values(),W);case"Set":return t(e.keys(),W);default:return!1}}function q(e){return qt((function(t){return Re(e,t)?we.value(t):we.error('Unsupported value: "'+t+'", choose one of "'+e.join(", ")+'".')}))}function $(e){return an(e,en)}function G(e,t){return Vt(e,e,lt(),q(t))}function X(e){return an(e,nn)}function Y(e,t){return Vt(e,e,lt(),zt(t))}function K(e,t){return Vt(e,e,lt(),Ft(t))}function J(e,t){return Vt(e,e,lt(),It(t))}function Z(e){return Vt(e,e,ft(),Lt())}function Q(e){return un(e,Qt)}function ee(e){return un(e,en)}function te(e){return un(e,nn)}function ne(e,t){return fn(e,t,Qt)}function re(e,t){return fn(e,t,en)}function oe(e,t,n){return fn(e,t,q(n))}function ie(e,t){return fn(e,t,tn)}function ae(e,t){return fn(e,t,nn)}function ue(e,t,n){return fn(e,t,zt(n))}function ce(e){if(null==e)throw new Error("Node cannot be null or undefined");return{dom:o(e)}}function se(e,t,n){return 0!=(e.compareDocumentPosition(t)&n)}function le(e,t){var n=pn(e,t);return n?vn(r(1),r(2)):{major:0,minor:0};function r(e){return Number(t.replace(n,"$"+e))}}function fe(){return vn(0,0)}function de(e){var t=e.current;return{current:t,version:e.version,isEdge:En(wn,t),isChrome:En(xn,t),isIE:En(Cn,t),isOpera:En(Sn,t),isFirefox:En(kn,t),isSafari:En(Tn,t)}}function me(e){var t=e.current;return{current:t,version:e.version,isWindows:zn(An,t),isiOS:zn(Dn,t),isAndroid:zn(_n,t),isOSX:zn(Bn,t),isLinux:zn(Rn,t),isSolaris:zn(Mn,t),isFreeBSD:zn(Pn,t)}}function ge(e,t){var n=String(t).toLowerCase();return He(e,(function(e){return e.search(n)}))}function he(e){return function(t){return Vn(t,e)}}function pe(e){return e.nodeType!==Kn&&e.nodeType!==Jn||0===e.childElementCount}function ve(e){var t,n,r,o;return n=function(e){return e.can},r=t=e,o=function(e){return e.abort},or({can:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Fe(t,(function(t,r){return t&&n(r).apply(void 0,e)}),!0)},abort:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Fe(r,(function(t,n){return t||o(n).apply(void 0,e)}),!1)},run:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];Pe(e,(function(e){e.run.apply(void 0,t)}))}})}var be,ye={some:w,none:h,from:function(e){return null==e?p:w(e)}},we={value:x,error:C,fromOption:function(e,t){return e.fold((function(){return C(t)}),x)}},xe=S("string"),Ce=S("object"),Se=S("array"),ke=S("boolean"),Te=S("function"),Ee=S("number"),Oe=function(e,t){if(Se(e)){for(var n=0,r=e.length;n<r;++n)if(!0!==t(e[n]))return!1;return!0}return!1},Ne=Array.prototype.slice,Ae=Array.prototype.indexOf,De=Array.prototype.push,_e=function(e,t){return Ae.call(e,t)},Re=function(e,t){return-1<_e(e,t)},Be=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n))return!0;return!1},Me=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},Pe=function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)},ze=function(e,t){for(var n=e.length-1;0<=n;n--)t(e[n],n)},Ie=function(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},Le=function(e,t,n){return ze(e,(function(e){n=t(n,e)})),n},Fe=function(e,t,n){return Pe(e,(function(e){n=t(n,e)})),n},He=function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n))return ye.some(o)}return ye.none()},Ve=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n))return ye.some(n);return ye.none()},Ue=function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!Se(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);De.apply(t,e[n])}return t},je=function(e,t){return e=Me(e,t),Ue(e)},We=function(e,t){for(var n=0,r=e.length;n<r;++n)if(!0!==t(e[n],n))return!1;return!0},qe=function(e){return e=Ne.call(e,0),e.reverse(),e},$e=function(e,t){return Ie(e,(function(e){return!Re(t,e)}))},Ge=function(e){return 0===e.length?ye.none():ye.some(e[0])},Xe=function(e){return 0===e.length?ye.none():ye.some(e[e.length-1])},Ye=Te(Array.from)?Array.from:function(e){return Ne.call(e)},Ke=Object.keys,Je=Object.hasOwnProperty,Ze=function(e,t){for(var n=Ke(e),r=0,o=n.length;r<o;r++){var i=n[r];t(e[i],i)}},Qe=function(e,t){return et(e,(function(e,n){return{k:n,v:t(e,n)}}))},et=function(e,t){var n={};return Ze(e,(function(e,r){e=t(e,r),n[e.k]=e.v})),n},tt=function(e,t){var n=[];return Ze(e,(function(e,r){n.push(t(e,r))})),n},nt=function(e){return tt(e,(function(e){return e}))},rt=function(e,t){return ot(e,t)?ye.from(e[t]):ye.none()},ot=function(e,t){return Je.call(e,t)},it=function(e){if(!Se(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");var n=[],r={};return Pe(e,(function(o,i){var a=Ke(o);if(1!==a.length)throw new Error("one and only one name per case");var u=a[0],c=o[u];if(void 0!==r[u])throw new Error("duplicate key detected:"+u);if("cata"===u)throw new Error("cannot have a case named cata (sorry)");if(!Se(c))throw new Error("case arguments must be an array");n.push(u),r[u]=function(){var r=arguments.length;if(r!==c.length)throw new Error("Wrong number of arguments to case "+u+". Expected "+c.length+" ("+c+"), got "+r);for(var o=new Array(r),a=0;a<o.length;a++)o[a]=arguments[a];return{fold:function(){if(arguments.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+arguments.length);return arguments[i].apply(null,o)},match:function(e){var t=Ke(e);if(n.length!==t.length)throw new Error("Wrong number of arguments to match. Expected: "+n.join(",")+"\nActual: "+t.join(","));if(We(n,(function(e){return Re(t,e)})))return e[u].apply(null,o);throw new Error("Not all branches were specified when using match. Specified: "+t.join(", ")+"\nRequired: "+n.join(", "))},log:function(e){t.console.log(e,{constructors:n,constructor:u,params:o})}}}})),r},at=Object.prototype.hasOwnProperty,ut=O((function(e,t){return Ce(e)&&Ce(t)?ut(e,t):t})),ct=O((function(e,t){return t})),st=it([{strict:[]},{defaultedThunk:["fallbackThunk"]},{asOption:[]},{asDefaultedOptionThunk:["fallbackThunk"]},{mergeWithThunk:["baseThunk"]}]),lt=st.strict,ft=st.asOption,dt=st.defaultedThunk,mt=st.mergeWithThunk,gt=function(e){return function(t){return ot(t,e)?ye.from(t[e]):ye.none()}},ht=function(e,t){return gt(t)(e)},pt=function(e,t){return ot(e,t)&&void 0!==e[t]&&null!==e[t]},vt=function(e,t){var n={};return n[e]=t,n},bt=function(e){var t={};return Pe(e,(function(e){t[e.key]=e.value})),t},yt=(it([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]),function(e,t){return ht(e,t)}),wt=function(e,t){return vt(e,t)},xt=function(e){return bt(e)},Ct=function(e,t){n=[],r=[],Pe(e,(function(e){e.fold((function(e){n.push(e)}),(function(e){r.push(e)}))}));var n,r,o;e={errors:n,values:r};return 0<e.errors.length?(o=e.errors,we.error(Ue(o))):(o=t,0===(t=e.values).length?we.value(o):we.value(ut(o,ct.apply(void 0,t))))},St=function(e,t){return pt(e,t)},kt=((jt=be=be||{})[jt.Error=0]="Error",jt[jt.Value=1]="Value",{fromResult:function(e){return e.fold(P,M)},toResult:function(e){return B(e,we.error,we.value)},svalue:M,partition:function(e){var t=[],n=[];return Pe(e,(function(e){B(e,(function(e){return n.push(e)}),(function(e){return t.push(e)}))})),{values:t,errors:n}},serror:P,bind:function(e,t){return e.stype===be.Value?t(e.svalue):e},bindError:function(e,t){return e.stype===be.Error?t(e.serror):e},map:function(e,t){return e.stype===be.Value?{stype:be.Value,svalue:t(e.svalue)}:e},mapError:function(e,t){return e.stype===be.Error?{stype:be.Error,serror:t(e.serror)}:e},fold:B}),Tt={consolidateObj:function(e,t){e=kt.partition(e);return 0<e.errors.length?z(e.errors):(e=e.values,t=t,0<e.length?kt.svalue(ut(t,ct.apply(void 0,e))):kt.svalue(t))},consolidateArr:function(e){return e=kt.partition(e),0<e.errors.length?z(e.errors):kt.svalue(e.values)}},Et=it([{setOf:["validator","valueType"]},{arrOf:["valueType"]},{objOf:["fields"]},{itemOf:["validator"]},{choiceOf:["key","branches"]},{thunk:["description"]},{func:["args","outputSchema"]}]),Ot=it([{field:["name","presence","type"]},{state:["name"]}]),Nt=function(e){return Ce(e)&&100<Ke(e).length?" removed due to size":JSON.stringify(e,null,2)},At=function(e){return e=10<e.length?e.slice(0,10).concat([{path:[],getErrorInfo:function(){return"... (only showing first ten failures)"}}]):e,Me(e,(function(e){return"Failed path: ("+e.path.join(" > ")+")\n"+e.getErrorInfo()}))},Dt=function(e,t){return kt.serror([{path:e,getErrorInfo:t}])},_t=function(e,t){return Dt(e,(function(){return'Choice schema did not contain choice key: "'+t+'"'}))},Rt=it([{field:["key","okey","presence","prop"]},{state:["okey","instantiator"]}]),Bt=function(e,t,n,r){return n.fold((function(n,i,a,u){function c(t){return t=u.extract(e.concat([n]),r,t),kt.map(t,(function(e){return vt(i,r(e))}))}function s(t){return t.fold((function(){var e=vt(i,r(ye.none()));return kt.svalue(e)}),(function(t){return t=u.extract(e.concat([n]),r,t),kt.map(t,(function(e){return vt(i,r(ye.some(e)))}))}))}return a.fold((function(){return kt.bind(I(e,t,n),c)}),(function(e){return kt.bind(L(t,n,e),c)}),(function(){return kt.bind(kt.svalue(ht(t,n)),s)}),(function(e){return kt.bind(function(e,t,n){return t=ht(e,t).map((function(t){return!0===t?n(e):t})),kt.svalue(t)}(t,n,e),s)}),(function(e){var r=e(t);e=kt.map(L(t,n,o({})),(function(e){return ut(r,e)}));return kt.bind(e,c)}))}),(function(e,n){return n=n(t),kt.svalue(vt(e,r(n)))}))},Mt=function(e){return{extract:function(t,n,r){return kt.bindError(e(r,n),(function(e){return n=e,Dt(t,(function(){return n}));var n}))},toString:function(){return"val"},toDsl:function(){return Et.itemOf(e)}}},Pt=function(e){var t=zt(e),n=Le(e,(function(e,t){return t.fold((function(t){return ut(e,wt(t,!0))}),o(e))}),{});return{extract:function(e,r,o){var i,a,u=ke(o)?[]:(u=Ke(i=o),Ie(u,(function(e){return St(i,e)}))),c=Ie(u,(function(e){return!St(n,e)}));return 0===c.length?t.extract(e,r,o):(a=c,Dt(e,(function(){return"There are unsupported fields: ["+a.join(", ")+"] specified"})))},toString:t.toString,toDsl:t.toDsl}},zt=function(e){return{extract:function(t,n,r){var o=t,i=r,a=(t=e,n);return t=Me(e,(function(e){return Bt(o,i,e,a)})),Tt.consolidateObj(t,{})},toString:function(){return"obj{\n"+Me(e,(function(e){return e.fold((function(e,t,n,r){return e+" -> "+r.toString()}),(function(e,t){return"state("+e+")"}))})).join("\n")+"}"},toDsl:function(){return Et.objOf(Me(e,(function(e){return e.fold((function(e,t,n,r){return Ot.field(e,n,r)}),(function(e,t){return Ot.state(e)}))})))}}},It=function(e){return{extract:function(t,n,r){return r=Me(r,(function(r,o){return e.extract(t.concat(["["+o+"]"]),n,r)})),Tt.consolidateArr(r)},toString:function(){return"array("+e.toString()+")"},toDsl:function(){return Et.arrOf(e)}}},Lt=o(Mt(kt.svalue)),Ft=r(It,zt),Ht=Rt.state,Vt=Rt.field,Ut=function(e,t,n,r,o){return yt(r,o).fold((function(){return t=r,n=o,Dt(e,(function(){return'The chosen schema: "'+n+'" did not exist in branches: '+Nt(t)}));var t,n}),(function(r){return r.extract(e.concat(["branch: "+o]),t,n)}))},jt=Mt(kt.svalue),Wt=function(e){return{extract:function(t,n,r){return e().extract(t,n,r)},toString:function(){return e().toString()},toDsl:function(){return e().toDsl()}}},qt=function(e){return Mt((function(t){return e(t).fold(kt.serror,kt.svalue)}))},$t=function(e,t,n,r){return t=t.extract([e],n,r),kt.mapError(t,(function(e){return{input:r,errors:e}}))},Gt=function(e,t,n){return kt.toResult($t(e,t,i,n))},Xt=function(e){return e.fold((function(e){throw new Error(Kt(e))}),i)},Yt=function(e,t,n){return Xt(Gt(e,t,n))},Kt=function(e){return"Errors: \n"+At(e.errors)+"\n\nInput object: "+Nt(e.input)},Jt=H,Zt=o(jt),Qt=j(Ee,"number"),en=j(xe,"string"),tn=j(ke,"boolean"),nn=j(Te,"function"),rn=Mt((function(e){return W(e)?kt.svalue(e):kt.serror("Expected value to be acceptable for sending via postMessage")})),on=function(e){return Vt(e,e,lt(),Lt())},an=function(e,t){return Vt(e,e,lt(),t)},un=function(e,t){return Vt(e,e,ft(),t)},cn=function(e,t){return un(e,zt(t))},sn=function(e,t){return un(e,Pt(t))},ln=function(e,t){return Vt(e,e,A(t),Lt())},fn=function(e,t,n){return Vt(e,e,A(t),n)},dn=function(e,t){return Ht(e,t)},mn=function(e){function t(){return n}var n=e;return{get:t,set:function(e){n=e},clone:function(){return mn(n)}}},gn={fromHtml:function(e,n){if(n=(n||t.document).createElement("div"),n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw t.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return ce(n.childNodes[0])},fromTag:function(e,n){return n=(n||t.document).createElement(e),ce(n)},fromText:function(e,n){return n=(n||t.document).createTextNode(e),ce(n)},fromDom:ce,fromPoint:function(e,t,n){return e=e.dom(),ye.from(e.elementFromPoint(t,n)).map(ce)}},hn=function(e,n){return se(e,n,t.Node.DOCUMENT_POSITION_CONTAINED_BY)},pn=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}},vn=function(e,t){return{major:e,minor:t}},bn=function(e,t){return t=String(t).toLowerCase(),0===e.length?fe():le(e,t)},yn=fe,wn="Edge",xn="Chrome",Cn="IE",Sn="Opera",kn="Firefox",Tn="Safari",En=function(e,t){return function(){return t===e}},On=function(){return de({current:void 0,version:yn()})},Nn=de,An=(o(wn),o(xn),o(Cn),o(Sn),o(kn),o(Tn),"Windows"),Dn="iOS",_n="Android",Rn="Linux",Bn="OSX",Mn="Solaris",Pn="FreeBSD",zn=function(e,t){return function(){return t===e}},In=function(){return me({current:void 0,version:yn()})},Ln=me,Fn=(o(An),o(Dn),o(_n),o(Rn),o(Bn),o(Mn),o(Pn),function(e,t){return ge(e,t).map((function(e){var n=bn(e.versionRegexes,t);return{current:e.name,version:n}}))}),Hn=function(e,t){return ge(e,t).map((function(e){var n=bn(e.versionRegexes,t);return{current:e.name,version:n}}))},Vn=function(e,t){return-1!==e.indexOf(t)},Un=function(e,t){return n=t,t=(e=e).length-t.length,""===n||!(e.length<n.length)&&e.substr(t,t+n.length)===n;var n},jn=function(e){return e.replace(/^\s+|\s+$/g,"")},Wn=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,qn=(Wn=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return Vn(e,"edge/")&&Vn(e,"chrome")&&Vn(e,"safari")&&Vn(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Wn],search:function(e){return Vn(e,"chrome")&&!Vn(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return Vn(e,"msie")||Vn(e,"trident")}},{name:"Opera",versionRegexes:[Wn,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:he("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:he("firefox")},{name:"Safari",versionRegexes:[Wn,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(Vn(e,"safari")||Vn(e,"mobile/"))&&Vn(e,"applewebkit")}}],[{name:"Windows",search:he("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return Vn(e,"iphone")||Vn(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:he("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:he("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:he("linux"),versionRegexes:[]},{name:"Solaris",search:he("sunos"),versionRegexes:[]},{name:"FreeBSD",search:he("freebsd"),versionRegexes:[]}]),$n={browsers:o(Wn),oses:o(qn)},Gn=mn(function(e,t){var n,r,i,a,u,c=$n.browsers(),s=$n.oses(),l=(c=Fn(c,e).fold(On,Nn),s=Hn(s,e).fold(In,Ln),r=c,e=e,t=t,l=(n=s).isiOS()&&!0===/ipad/i.test(e),i=n.isiOS()&&!l,a=n.isiOS()||n.isAndroid(),u=a||t("(pointer:coarse)"),t=l||!i&&a&&t("(min-device-width:768px)"),a=i||a&&!t,r=r.isSafari()&&n.isiOS()&&!1===/safari/i.test(e),e=!a&&!t&&!r,{isiPad:o(l),isiPhone:o(i),isTablet:o(t),isPhone:o(a),isTouch:o(u),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:o(r),isDesktop:o(e)});return{browser:c,os:s,deviceType:l}}(t.navigator.userAgent,(function(e){return t.window.matchMedia(e).matches}))),Xn=function(){return Gn.get()},Yn=(Wn=(t.Node.ATTRIBUTE_NODE,t.Node.CDATA_SECTION_NODE,t.Node.COMMENT_NODE,t.Node.DOCUMENT_NODE),qn=(t.Node.DOCUMENT_TYPE_NODE,t.Node.DOCUMENT_FRAGMENT_NODE,t.Node.ELEMENT_NODE),t.Node.TEXT_NODE),Kn=(t.Node.PROCESSING_INSTRUCTION_NODE,t.Node.ENTITY_REFERENCE_NODE,t.Node.ENTITY_NODE,t.Node.NOTATION_NODE,qn),Jn=Wn,Zn=function(e,t){if(e=e.dom(),e.nodeType!==Kn)return!1;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},Qn=function(e,n){return n=void 0===n?t.document:n.dom(),pe(n)?[]:Me(n.querySelectorAll(e),gn.fromDom)},er=function(e,n){return n=void 0===n?t.document:n.dom(),pe(n)?ye.none():ye.from(n.querySelector(e)).map(gn.fromDom)},tr=function(e,t){return e.dom()===t.dom()},nr=Xn().browser.isIE()?function(e,t){return hn(e.dom(),t.dom())}:function(e,t){return e=e.dom(),t=t.dom(),e!==t&&e.contains(t)},rr=function(e,t){return tr(e.element(),t.event().target())},or=function(e){if(St(e,"can")||St(e,"abort")||St(e,"run"))return Yt("Extracting event.handler",Pt([ln("can",o(!0)),ln("abort",o(!1)),ln("run",n)]),e);throw new Error("EventHandler defined by: "+JSON.stringify(e,null,2)+" does not have can, abort, or run!")},ir=o("touchstart"),ar=o("touchmove"),ur=o("touchend"),cr=o("mousedown"),sr=o("mousemove"),lr=o("mouseout"),fr=o("mouseup"),dr=o("mouseover"),mr=o("focusin"),gr=o("focusout"),hr=o("keydown"),pr=o("keyup"),vr=o("input"),br=o("change"),yr=o("click"),wr=o("transitionend"),xr=o("selectstart"),Cr=(Wn={tap:o("alloy.tap")},o("alloy.focus")),Sr=o("alloy.blur.post"),kr=o("alloy.paste.post"),Tr=o("alloy.receive"),Er=o("alloy.execute"),Or=o("alloy.focus.item"),Nr=Wn.tap,Ar=Xn().deviceType.isTouch()?Wn.tap:yr,Dr=o("alloy.longpress"),_r=o("alloy.sandbox.close"),Rr=o("alloy.typeahead.cancel"),Br=o("alloy.system.init"),Mr=o("alloy.system.touchmove"),Pr=o("alloy.system.touchend"),zr=o("alloy.system.scroll"),Ir=o("alloy.system.resize"),Lr=o("alloy.system.attached"),Fr=o("alloy.system.detached"),Hr=o("alloy.system.dismissRequested"),Vr=(Wn=o("alloy.system.repositionRequested"),o("alloy.focusmanager.shifted")),Ur=o("alloy.slotcontainer.visibility"),jr=o("alloy.change.tab"),Wr=o("alloy.dismiss.tab"),qr=o("alloy.highlight"),$r=o("alloy.dehighlight"),Gr=function(e,t){Jr(e,e.element(),t,{})},Xr=function(e,t,n){Jr(e,e.element(),t,n)},Yr=function(e){Gr(e,Er())},Kr=function(e,t,n){Jr(e,t,n,{})},Jr=function(e,t,n,r){r=d({target:t},r),e.getSystem().triggerEvent(n,t,Qe(r,o))},Zr=function(e,t,n,r){e.getSystem().triggerEvent(n,t,r.event())};function Qr(e,t,n,r,o){return e(n,r)?ye.some(n):Te(o)&&o(n)?ye.none():t(n,r,o)}function eo(e){return function(t){return t.dom().nodeType===e}}function to(e,t,n){for(var r=e.dom(),i=Te(n)?n:o(!1);r.parentNode;){r=r.parentNode;var a=gn.fromDom(r);if(t(a))return ye.some(a);if(i(a))break}return ye.none()}function no(e,t){return{key:e,value:or({abort:t})}}function ro(e){return{key:e,value:or({run:function(e,t){t.event().prevent()}})}}function oo(e,t,n){return{key:e,value:or({run:function(e){t.apply(void 0,[e].concat(n))}})}}function io(e,t,n){var r,o;t=t.partUids[n];return o=t,Xo(r=e,(function(e,t){e.getSystem().getByUid(o).each((function(e){Zr(e,e.element(),r,t)}))}))}function ao(e){return Xo(e,(function(e,t){t.cut()}))}function uo(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(e.length!==t.length)throw new Error('Wrong number of arguments to struct. Expected "['+e.length+']", got '+t.length+" arguments");var r={};return Pe(e,(function(e,n){r[e]=o(t[n])})),r}}function co(e,t){if(!Se(t))throw new Error("The "+e+" fields must be an array. Was: "+t+".");Pe(t,(function(t){if(!xe(t))throw new Error("The value "+t+" in the "+e+" fields was not a string.")}))}function so(e,t){var n,r=e.concat(t);if(0===r.length)throw new Error("You must specify at least one required or optional field.");return co("required",e),co("optional",t),n=ni(r),He(n,(function(e,t){return t<n.length-1&&e===n[t+1]})).each((function(e){throw new Error("The field: "+e+" occurs more than once in the combined fields: ["+n.join(", ")+"].")})),function(n){var i=Ke(n);if(!We(e,(function(e){return Re(i,e)})))throw a=i,new Error("All required keys ("+ni(e).join(", ")+") were not specified. Specified keys were: "+ni(a).join(", ")+".");var a=Ie(i,(function(e){return!Re(r,e)}));if(0<a.length)throw new Error("Unsupported keys for object: "+ni(a).join(", "));var u={};return Pe(e,(function(e){u[e]=o(n[e])})),Pe(t,(function(e){u[e]=o(Object.prototype.hasOwnProperty.call(n,e)?ye.some(n[e]):ye.none())})),u}}function lo(e){return gn.fromDom(e.dom().ownerDocument.defaultView)}function fo(e,t){si(e).fold((function(){mi(e,t)}),(function(n){e.dom().insertBefore(t.dom(),n.dom())}))}function mo(e){var t=ui(e);0<t.length&&gi(e,t),vi(e)}function go(e){return e.dom().innerHTML}function ho(e,t){var n=ri(e).dom(),r=gn.fromDom(n.createDocumentFragment());t=li(t,n);hi(r,t),pi(e),mi(e,r)}function po(e){var t=e;return t=ki(e),bi(t)}function vo(e,t){return e=Oi(Ni+e),Di(t,e),e}function bo(e){function t(t){return function(){throw new Error("The component must be in a context to send: "+t+"\n"+po(e().element())+" is not in context.")}}return{debugInfo:o("fake"),triggerEvent:t("triggerEvent"),triggerFocus:t("triggerFocus"),triggerEscape:t("triggerEscape"),build:t("build"),addToWorld:t("addToWorld"),removeFromWorld:t("removeFromWorld"),addToGui:t("addToGui"),removeFromGui:t("removeFromGui"),getByUid:t("getByUid"),getByDom:t("getByDom"),broadcast:t("broadcast"),broadcastOn:t("broadcastOn"),broadcastEvent:t("broadcastEvent"),isConnected:o(!1)}}function yo(e,t){var n=e.toString(),r=n.indexOf(")")+1,o=n.indexOf("("),i=n.substring(o+1,r-1).split(/,\s*/);return e.toFunctionAnnotation=function(){return{name:t,parameters:Pi(i)}},e}function wo(e){return wt(Ii,e)}function xo(e){return zi((function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return e.apply(void 0,[t.getApis()].concat([t].concat(n)))}),e)}function Co(e,t){var n={};return Ze(e,(function(e,r){Ze(e,(function(e,o){var i=R(o,[])(n);n[o]=i.concat([t(r,e)])}))})),n}function So(e){return{classes:void 0!==e.classes?e.classes:[],attributes:void 0!==e.attributes?e.attributes:{},styles:void 0!==e.styles?e.styles:{}}}function ko(e,t,n,r){function o(e){return Le(e,(function(e,t){return d(d({},t.modification),e)}),{})}var i=d({},t),a=(t=(Pe(n,(function(t){i[t.name()]=t.exhibit(e,r)})),Co(i,(function(e,t){return{name:e,modification:t}}))),n=Le(t.classes,(function(e,t){return t.modification.concat(e)}),[]),o(t.attributes));t=o(t.styles);return So({classes:n,attributes:a,styles:t})}function To(e,t){return{name:o(e),handler:o(t)}}function Eo(e,t,n){var r,o;n=d(d({},n),(r=e,o={},Pe(t,(function(e){o[e.name()]=e.handlers(r)})),o));return Co(n,To)}function Oo(e,t,n,r){var o;e=Eo(e,n,r);return o=t,n=tt(e,(function(e,t){return(1===e.length?we.value(e[0].handler()):qi(e,o,t)).map((function(n){n=Wi(n);var r=1<e.length?Ie(o[t],(function(t){return Be(e,(function(e){return e.name()===t}))})).join(" > "):e[0].name();return wt(t,Vi(n,r))}))})),Ct(n,{})}function No(e){return Gt("custom.definition",zt([Vt("dom","dom",lt(),zt([on("tag"),ln("styles",{}),ln("classes",[]),ln("attributes",{}),Z("value"),Z("innerHtml")])),on("components"),on("uid"),ln("events",{}),ln("apis",{}),Vt("eventOrder","eventOrder",st.mergeWithThunk(o({"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"],mouseover:["item-type-events","tooltipping"]})),Zt()),Z("domModification")]),e)}function Ao(e,t){return void 0===(e=xi(e,t))||""===e?[]:e.split(" ")}function Do(e,n){var r=e.dom(),o=t.window.getComputedStyle(r).getPropertyValue(n);return null===(e=""!==o||Vo(e)?o:aa(r,n))?void 0:e}function _o(e,t,n){return e=gn.fromTag(e),oa(e,t,n),ua(e,t).isSome()}function Ro(e){var t,n=gn.fromTag(e.tag),r=(r=e.attributes,t=n.dom(),Ze(r,(function(e,n){yi(t,n,e)})),Qi(n,e.classes),ia(n,e.styles),e.innerHtml.each((function(e){return ho(n,e)})),e.domChildren);return hi(n,r),e.value.each((function(e){fa(n,e)})),e.uid,Di(n,e.uid),n}function Bo(e,t){return n=e,t=Me(e=t,(function(e){return cn(e.name(),[on("config"),ln("state",Fi)])})),t=Gt("component.behaviours",zt(t),n.behaviours).fold((function(e){throw new Error(Kt(e)+"\nComplete spec:\n"+JSON.stringify(n,null,2))}),(function(e){return e})),{list:e,data:Qe(t,(function(e){var t=e.map((function(e){return{config:e.config,state:e.state.init(e.config)}}));return function(){return t}}))};var n}function Mo(e){t=R("behaviours",{})(n=e),n=Ie(Ke(t),(function(e){return void 0!==t[e]}));var t,n=Me(n,(function(e){return t[e].me}));return Bo(e,n)}function Po(e,t,n){var r=d(d({},(r=e).dom),{uid:r.uid,domChildren:Me(r.components,(function(e){return e.element()}))});e=e.domModification.fold((function(){return So({})}),So),n=0<t.length?ko(n,{"alloy.base.modification":e},t,r):e;return t=n,d(d({},e=r),{attributes:d(d({},e.attributes),t.attributes),styles:d(d({},e.styles),t.styles),classes:e.classes.concat(t.classes)})}function zo(e){function t(){return f}var n,r=mn(Mi),i=Xt(No(e)),a=(c=Mo(e)).list,u=c.data,c=Po(i,a,u),s=Ro(c),l=(c=(c=u,n={"alloy.base.behaviour":i.events},Oo(c,i.eventOrder,a,n).getOrDie()),mn(i.components)),f={getSystem:r.get,config:function(t){var n=u;return(Te(n[t.name()])?n[t.name()]:function(){throw new Error("Could not find "+t.name()+" in "+JSON.stringify(e,null,2))})()},hasConfigured:function(e){return Te(u[e.name()])},spec:o(e),readState:function(e){return u[e]().map((function(e){return e.state.readState()})).getOr("not enabled")},getApis:function(){return i.apis},connect:function(e){r.set(e)},disconnect:function(){r.set(bo(t))},element:o(s),syncComponents:function(){var e=ui(s);e=je(e,(function(e){return r.get().getByDom(e).fold((function(){return[]}),(function(e){return[e]}))}));l.set(e)},components:l.get,events:o(c)};return f}void 0!==t.window?t.window:Function("return this;")();var Io,Lo=function(e){return e.dom().nodeName.toLowerCase()},Fo=eo(qn),Ho=eo(Yn),Vo=function(e){return e=Ho(e)?e.dom().parentNode:e.dom(),null!=e&&e.ownerDocument.body.contains(e)},Uo=N((function(){return jo(gn.fromDom(t.document))})),jo=function(e){if(e=e.dom().body,null==e)throw new Error("Body is not available yet");return gn.fromDom(e)},Wo=function(e,t,n){return Qr((function(e,t){return t(e)}),to,e,t,n)},qo=function(e,t){function n(e){for(var r=0;r<e.childNodes.length;r++){var o=gn.fromDom(e.childNodes[r]);if(t(o))return ye.some(o);if(o=n(e.childNodes[r]),o.isSome())return o}return ye.none()}return n(e.dom())},$o=function(e,t,n){return Wo(e,(function(e){return t(e).isSome()}),n).bind(t)},Go=function(e){return xt(e)},Xo=function(e,t){return{key:e,value:or({run:t})}},Yo=function(e){return function(t){return{key:e,value:or({run:function(e,n){rr(e,n)&&t(e,n)}})}}},Ko=function(e,t){return Xo(e,(function(e,n){var r=n.event(),i=e.getSystem().getByDom(r.target()).fold((function(){return $o(r.target(),(function(t){return e.getSystem().getByDom(t).toOption()}),o(!1)).getOr(e)}),(function(e){return e}));t(e,i,n)}))},Jo=function(e,t){return Yo(e)(t)},Zo=Yo(Lr()),Qo=Yo(Fr()),ei=Yo(Br()),ti=(Io=Er(),function(e){return Xo(Io,e)}),ni=function(e){return e.slice(0).sort()},ri=function(e){return gn.fromDom(e.dom().ownerDocument)},oi=function(e){return gn.fromDom(e.dom().ownerDocument.documentElement)},ii=function(e){return ye.from(e.dom().parentNode).map(gn.fromDom)},ai=function(e){return ye.from(e.dom().offsetParent).map(gn.fromDom)},ui=function(e){return Me(e.dom().childNodes,gn.fromDom)},ci=function(e,t){return e=e.dom().childNodes,ye.from(e[t]).map(gn.fromDom)},si=function(e){return ci(e,0)},li=(uo("element","offset"),function(e,n){return n=(n||t.document).createElement("div"),n.innerHTML=e,ui(gn.fromDom(n))}),fi=function(e,t){ii(e).each((function(n){n.dom().insertBefore(t.dom(),e.dom())}))},di=function(e,t){ye.from(e.dom().nextSibling).map(gn.fromDom).fold((function(){ii(e).each((function(e){mi(e,t)}))}),(function(e){fi(e,t)}))},mi=function(e,t){e.dom().appendChild(t.dom())},gi=function(e,t){Pe(t,(function(t){fi(e,t)}))},hi=function(e,t){Pe(t,(function(t){mi(e,t)}))},pi=function(e){e.dom().textContent="",Pe(ui(e),(function(e){vi(e)}))},vi=function(e){e=e.dom(),null!==e.parentNode&&e.parentNode.removeChild(e)},bi=function(e){var t=gn.fromTag("div");e=gn.fromDom(e.dom().cloneNode(!0));return mi(t,e),go(t)},yi=function(e,n,r){if(!(xe(r)||ke(r)||Ee(r)))throw t.console.error("Invalid call to Attr.set. Key ",n,":: Value ",r,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(n,r+"")},wi=function(e,t,n){yi(e.dom(),t,n)},xi=function(e,t){return e=e.dom().getAttribute(t),null===e?void 0:e},Ci=function(e,t){return e=e.dom(),!(!e||!e.hasAttribute)&&e.hasAttribute(t)},Si=function(e,t){e.dom().removeAttribute(t)},ki=function(e){return t=!1,gn.fromDom(e.dom().cloneNode(t));var t},Ti=(qn=Go([{key:Cr(),value:or({can:function(e,n){var r,o,i=n.event().originator();n=n.event().target();return o=n,!(tr(r=i,e.element())&&!tr(r,o))||(t.console.warn(Cr()+" did not get interpreted by the desired target. \nOriginator: "+po(i)+"\nTarget: "+po(n)+"\nCheck the "+Cr()+" event handlers"),!1)}})}]),Object.freeze({events:qn})),Ei=0,Oi=function(e){var t=(new Date).getTime();return e+"_"+Math.floor(1e9*Math.random())+ ++Ei+String(t)},Ni=(Yn=o("alloy-id-"),qn=o("data-alloy-id"),Yn()),Ai=qn(),Di=function(e,t){Object.defineProperty(e.dom(),Ai,{value:t,writable:!0})},_i=function(e){return e=Fo(e)?e.dom()[Ai]:null,ye.from(e)},Ri=function(e){return Oi(e)},Bi=i,Mi=bo(),Pi=function(e){return Me(e,(function(e){return Un(e,"/*")?e.substring(0,e.length-"/*".length):e}))},zi=function(e,t){t=t.toString();var n=t.indexOf(")")+1,r=t.indexOf("("),o=t.substring(r+1,n-1).split(/,\s*/);return e.toFunctionAnnotation=function(){return{name:"OVERRIDE",parameters:Pi(o.slice(1))}},e},Ii=Oi("alloy-premade"),Li=function(e){return yt(e,Ii)},Fi={init:function(){return Hi({readState:function(){return"No State required"}})}},Hi=function(e){return e},Vi=function(e,t){return{handler:e,purpose:o(t)}},Ui=function(e,t){return{cHandler:e,purpose:o(t)}},ji=function(e){return e.cHandler},Wi=function(e){var t=Te(e=e)?{can:o(!0),abort:o(!1),run:e}:e;return function(e,n){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];e=[e,n].concat(r),t.abort.apply(void 0,e)?n.stop():t.can.apply(void 0,e)&&t.run.apply(void 0,e)}},qi=function(e,t,n){return t=t[n],t?function(e,t,n,r){n=n.slice(0);try{var o=n.sort((function(n,o){n=n[t](),o=o[t]();var i=r.indexOf(n),a=r.indexOf(o);if(-1===i)throw new Error("The ordering for "+e+" does not have an entry for "+n+".\nOrder specified: "+JSON.stringify(r,null,2));if(-1===a)throw new Error("The ordering for "+e+" does not have an entry for "+o+".\nOrder specified: "+JSON.stringify(r,null,2));return i<a?-1:a<i?1:0}));return we.value(o)}catch(n){return we.error([n])}}("Event: "+n,"name",e,t).map((function(e){return e=Me(e,(function(e){return e.handler()})),ve(e)})):we.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(Me(e,(function(e){return e.name()})),null,2)])},$i=function(e){return void 0!==e.dom().classList},Gi=function(e,t){var n="class";return t=Ao(e,n).concat([t]),wi(e,n,t.join(" ")),!0},Xi=function(e,t){return n=t,0<(r=Ie(Ao(t=e,e="class"),(function(e){return e!==n}))).length?wi(t,e,r.join(" ")):Si(t,e),!1;var n,r},Yi=function(e,t){$i(e)?e.dom().classList.add(t):Gi(e,t)},Ki=function(e){0===($i(e)?e.dom().classList:Ao(e,"class")).length&&Si(e,"class")},Ji=function(e,t){$i(e)?e.dom().classList.remove(t):Xi(e,t),Ki(e)},Zi=function(e,t){return $i(e)&&e.dom().classList.contains(t)},Qi=function(e,t){Pe(t,(function(t){Yi(e,t)}))},ea=function(e,t){Pe(t,(function(t){Ji(e,t)}))},ta=function(e){return void 0!==e.style&&Te(e.style.getPropertyValue)},na=function(e,n,r){if(!xe(r))throw t.console.error("Invalid call to CSS.set. Property ",n,":: Value ",r,":: Element ",e),new Error("CSS value must be a string: "+r);ta(e)&&e.style.setProperty(n,r)},ra=function(e,t){ta(e)&&e.style.removeProperty(t)},oa=function(e,t,n){e=e.dom(),na(e,t,n)},ia=function(e,t){var n=e.dom();Ze(t,(function(e,t){na(n,t,e)}))},aa=function(e,t){return ta(e)?e.style.getPropertyValue(t):""},ua=function(e,t){return e=e.dom(),e=aa(e,t),ye.from(e).filter((function(e){return 0<e.length}))},ca=function(e,t){var n=e.dom();ra(n,t),Ci(e,"style")&&""===jn(xi(e,"style"))&&Si(e,"style")},sa=function(e){return e.dom().offsetWidth},la=function(e){return e.dom().value},fa=function(e,t){if(void 0===t)throw new Error("Value.set was undefined");e.dom().value=t},da=function(e){e=Bi(e);var t=e.events,n=(e=m(e,["events"]),function(e){return e=R("components",[])(e),Me(e,pa)}(e));e=d(d({},e),{events:d(d({},Ti),t),components:n});return we.value(zo(e))},ma=function(e){return e=gn.fromText(e),ga({element:e})},ga=function(e){var t=Yt("external.component",Pt([on("element"),Z("uid")]),e),r=mn(bo()),i=(t.uid.each((function(e){Di(t.element,e)})),{getSystem:r.get,config:ye.none,hasConfigured:o(!1),connect:function(e){r.set(e)},disconnect:function(){r.set(bo((function(){return i})))},getApis:function(){return{}},element:o(t.element),spec:o(e),readState:o("No state"),syncComponents:n,components:o([]),events:o({})});return wo(i)},ha=Ri,pa=function(e){return Li(e).fold((function(){var t=e.hasOwnProperty("uid")?e:d({uid:ha("")},e);return da(t).getOrDie()}),(function(e){return e}))},va=wo;function ba(e,t){function n(n){var r=t(n);return r<=0||null===r?(n=Do(n,e),parseFloat(n)||0):r}function r(e,t){return Fe(t,(function(t,n){return n=Do(e,n),n=void 0===n?0:parseInt(n,10),isNaN(n)?t:t+n}),0)}return{set:function(t,n){if(!Ee(n)&&!n.match(/^[0-9]+$/))throw new Error(e+".set accepts only positive integer values. Value was "+n);t=t.dom(),ta(t)&&(t.style[e]=n+"px")},get:n,getOuter:n,aggregate:r,max:function(e,t,n){return e=r(e,n),e<t?t-e:0}}}function ya(e,t){return{left:o(e),top:o(t),translate:function(n,r){return ya(e+n,t+r)}}}function wa(e,t){return e.view(t).fold(o([]),(function(t){var n=e.owner(t);n=wa(e,n);return[t].concat(n)}))}function xa(){return Y("markers",[on("backgroundMenu")].concat(_u()).concat(Ru()))}function Ca(e){return Y("markers",Me(e,on))}function Sa(e,t,n){return Nu(),Vt(t,t,n,qt((function(e){return we.value((function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.apply(void 0,t)}))})))}function ka(e){return Sa(0,e,A(n))}function Ta(e){return Sa(0,e,A(ye.none))}function Ea(e){return Sa(0,e,lt())}function Oa(e){return Sa(0,e,lt())}function Na(e){return dn(e,i)}function Aa(e,t){return e.y()+e.height()/2-t.height()/2}function Da(e,t,n){return ei((function(r,o){n(r,e,t)}))}function _a(e,t,n){var r,i,a,u,c,s;return r=function(r){for(var i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];var u=[r].concat(i);return r.config({name:o(e)}).fold((function(){throw new Error("We could not find any behaviour configuration for: "+e+". Using API: "+n)}),(function(e){var n=Array.prototype.slice.call(u,1);return t.apply(void 0,[r,e.config,e.state].concat(n))}))},i=n,a=(a=t).toString(),u=a.indexOf(")")+1,c=a.indexOf("("),s=a.substring(c+1,u-1).split(/,\s*/),r.toFunctionAnnotation=function(){return{name:i,parameters:Pi(s.slice(0,1).concat(s.slice(3)))}},r}function Ra(e){return{key:e,value:void 0}}function Ba(e){var t,n,r,o,i,a;e=Yt("Creating behaviour: "+e.name,uc,e);return t=e.fields,n=e.name,r=e.active,o=e.apis,i=e.extra,e=e.state,a=Pt(t),t=cn(n,[sn("config",t)]),ic(a,t,n,r,o,i,e)}function Ma(e){var t,n,r,o,i,a;e=Yt("Creating behaviour: "+e.name,cc,e);return t=U(e.branchKey,e.branches),n=e.name,r=e.active,o=e.apis,i=e.extra,e=e.state,t=cn(n,[un("config",a=t)]),ic(a,t,n,r,o,i,e)}function Pa(e,t){var r=ri(t),o=mc(r).bind((function(e){function n(t){return tr(e,t)}return n(t)?ye.some(t):qo(t,n)}));e=e(t);o.each((function(e){mc(r).filter((function(t){return tr(t,e)})).fold((function(){dc(e)}),n)}))}function za(){return pc(0,0,{})}function Ia(e,t,n,r,o,i){n=t.x()-n,r=t.y()-r,o-=n+t.width(),i-=r+t.height();var a,u,c,s,l=ye.some(n),f=ye.some(r),d=ye.some(o),m=ye.some(i),g=ye.none();return n=t.direction(),r=function(){return bc(e,l,f,g,g)},o=function(){return bc(e,g,f,d,g)},i=function(){return bc(e,l,g,g,m)},t=function(){return bc(e,g,g,d,m)},a=function(){return bc(e,l,f,g,g)},u=function(){return bc(e,l,g,g,m)},c=function(){return bc(e,l,f,g,g)},s=function(){return bc(e,g,f,d,g)},n.fold(r,o,i,t,a,u,c,s)}function La(e,t){var n=a(cu,t),r=(e=e.fold(n,n,(function(){var e=ou();return cu(t).translate(-e.left(),-e.top())})),n=ru(t),Ka(t));return fu(e.left(),e.top(),n,r)}function Fa(e,t,n){var r=Ja(t,n);return e.fold(o(r),o(r),(function(){var e=ou();return r.translate(-e.left(),-e.top())}))}function Ha(){return cn("layouts",[on("onLtr"),on("onRtl")])}function Va(e,t,n,r){return n=t.layouts.map((function(t){return t.onLtr(e)})).getOr(n),t=t.layouts.map((function(t){return t.onRtl(e)})).getOr(r),xc(n,t)(e)}function Ua(e,t,n){var r,o;e=e.document.createRange();return r=e,t.fold((function(e){r.setStartBefore(e.dom())}),(function(e,t){r.setStart(e.dom(),t)}),(function(e){r.setStartAfter(e.dom())})),o=e,n.fold((function(e){o.setEndBefore(e.dom())}),(function(e,t){o.setEnd(e.dom(),t)}),(function(e){o.setEndAfter(e.dom())})),e}function ja(e,t,n,r,o){return(e=e.document.createRange()).setStart(t.dom(),n),e.setEnd(r.dom(),o),e}function Wa(e){return{left:o(e.left),top:o(e.top),right:o(e.right),bottom:o(e.bottom),width:o(e.width),height:o(e.height)}}function qa(e,t,n){return t(gn.fromDom(n.startContainer),n.startOffset,gn.fromDom(n.endContainer),n.endOffset)}function $a(e,t){n=e;var n,r;e=t.match({domRange:function(e){return{ltr:o(e),rtl:ye.none}},relative:function(e,t){return{ltr:N((function(){return Ua(n,e,t)})),rtl:N((function(){return ye.some(Ua(n,t,e))}))}},exact:function(e,t,r,o){return{ltr:N((function(){return ja(n,e,t,r,o)})),rtl:N((function(){return ye.some(ja(n,r,o,e,t))}))}}});return(r=(t=e).ltr()).collapsed?t.rtl().filter((function(e){return!1===e.collapsed})).map((function(e){return Dc.rtl(gn.fromDom(e.endContainer),e.endOffset,gn.fromDom(e.startContainer),e.startOffset)})).getOrThunk((function(){return qa(0,Dc.ltr,r)})):qa(0,Dc.ltr,r)}var Ga,Xa=ba("height",(function(e){var t=e.dom();return Vo(e)?t.getBoundingClientRect().height:t.offsetHeight})),Ya=function(e){return Xa.get(e)},Ka=function(e){return Xa.getOuter(e)},Ja=ya,Za=function(e,t){return void 0!==e?e:void 0!==t?t:0},Qa=function(e){var t=e.dom().ownerDocument,n=t.body,r=t.defaultView;t=t.documentElement;if(n===e.dom())return Ja(n.offsetLeft,n.offsetTop);var o=Za(r.pageYOffset,t.scrollTop),i=(r=Za(r.pageXOffset,t.scrollLeft),Za(t.clientTop,n.clientTop));t=Za(t.clientLeft,n.clientLeft);return eu(e).translate(r-t,o-i)},eu=function(e){var t=e.dom(),n=t.ownerDocument.body;return n===t?Ja(n.offsetLeft,n.offsetTop):Vo(e)?(n=t,n=n.getBoundingClientRect(),Ja(n.left,n.top)):Ja(0,0)},tu=ba("width",(function(e){return e.dom().offsetWidth})),nu=function(e){return tu.get(e)},ru=function(e){return tu.getOuter(e)},ou=(Xn().browser.isSafari(),function(e){e=void 0!==e?e.dom():t.document;var n=e.body.scrollLeft||e.documentElement.scrollLeft;e=e.body.scrollTop||e.documentElement.scrollTop;return Ja(n,e)}),iu=function(e,t,n,r){return{x:o(e),y:o(t),width:o(n),height:o(r),right:o(e+n),bottom:o(t+r)}},au=function(e){e=void 0===e?t.window:e;var n,r=e.visualViewport;return void 0!==r?iu(r.pageLeft,r.pageTop,r.width,r.height):(r=gn.fromDom(e.document),e=e.document.documentElement,r=ou(r),n=e.clientWidth,e=e.clientHeight,iu(r.left(),r.top(),n,e))},uu=Object.freeze({view:function(e){return(e.dom()===t.document?ye.none():ye.from(e.dom().defaultView.frameElement)).map(gn.fromDom)},owner:function(e){return ri(e)}}),cu=function(e){var n=gn.fromDom(t.document),r=ou(n);return function(e,t){return e=t.owner(e),t=wa(t,e),ye.some(t)}(e,uu).fold(a(Qa,e),(function(t){var n=eu(e);t=Le(t,(function(e,t){return t=eu(t),{left:e.left+t.left(),top:e.top+t.top()}}),{left:0,top:0});return Ja(t.left+n.left()+r.left(),t.top+n.top()+r.top())}))},su=uo("point","width","height"),lu=uo("x","y","width","height"),fu=function(e,t,n,r){return{x:o(e),y:o(t),width:o(n),height:o(r),right:o(e+n),bottom:o(t+r)}},du=function(e){var t=Qa(e),n=ru(e);e=Ka(e);return fu(t.left(),t.top(),n,e)},mu=function(e){var t=cu(e),n=ru(e);e=Ka(e);return fu(t.left(),t.top(),n,e)},gu=function(){return au(t.window)},hu=function(e,t,n){return Wo(e,t,n).isSome()},pu=function(e,t,n){return to(e,(function(e){return Zn(e,t)}),n)},vu=function(e,t){return er(t,e)},bu=function(e,t,n){return Qr(Zn,pu,e,t,n)},yu=function(){var e=Oi("aria-owns");return{id:o(e),link:function(t){wi(t,"aria-owns",e)},unlink:function(e){Si(e,"aria-owns")}}},wu=function(e,t){return Wo(t,(function(e){return!!Fo(e)&&(e=xi(e,"id"),void 0!==e&&-1<e.indexOf("aria-owns"))})).bind((function(e){var t=xi(e,"id");e=ri(e);return vu(e,'[aria-owns="'+t+'"]')})).exists((function(t){return xu(e,t)}))},xu=function(e,t){return hu(t,(function(t){return tr(t,e.element())}),o(!1))||wu(e,t)},Cu=function(e){for(var t=[],n=function(e){t.push(e)},r=0;r<e.length;r++)e[r].each(n);return t},Su=function(e,t){for(var n=0;n<e.length;n++){var r=t(e[n],n);if(r.isSome())return r}return ye.none()},ku=function(e,t,n){return e.isSome()&&t.isSome()?ye.some(n(e.getOrDie(),t.getOrDie())):ye.none()},Tu="unknown",Eu=((Yn=Ga=Ga||{})[Yn.STOP=0]="STOP",Yn[Yn.NORMAL=1]="NORMAL",Yn[Yn.LOGGING=2]="LOGGING",mn({})),Ou=["alloy/data/Fields","alloy/debugging/Debugging"],Nu=function(){var e=new Error;return void 0!==e.stack?(e=e.stack.split("\n"),He(e,(function(e){return 0<e.indexOf("alloy")&&!Be(Ou,(function(t){return-1<e.indexOf(t)}))})).getOr(Tu)):Tu},Au=function(e,n,r){var o,i,a,u;switch(yt(Eu.get(),e).orThunk((function(){var t=Ke(Eu.get());return Su(t,(function(t){return-1<e.indexOf(t)?ye.some(Eu.get()[t]):ye.none()}))})).getOr(Ga.NORMAL)){case Ga.NORMAL:return r(Du());case Ga.LOGGING:o=e,i=n,a=[],u=(new Date).getTime();var c={logEventCut:function(e,t,n){a.push({outcome:"cut",target:t,purpose:n})},logEventStopped:function(e,t,n){a.push({outcome:"stopped",target:t,purpose:n})},logNoParent:function(e,t,n){a.push({outcome:"no-parent",target:t,purpose:n})},logEventNoHandlers:function(e,t){a.push({outcome:"no-handlers-left",target:t})},logEventResponse:function(e,t,n){a.push({outcome:"response",purpose:n,target:t})},write:function(){var e=(new Date).getTime();Re(["mousemove","mouseover","mouseout",Br()],o)||t.console.log(o,{event:o,time:e-u,target:i.dom(),sequence:Me(a,(function(e){return Re(["cut","stopped","response"],e.outcome)?"{"+e.purpose+"} "+e.outcome+" at ("+po(e.target)+")":e.outcome}))})}},s=r(c);return c.write(),s;case Ga.STOP:return!0}},Du=o({logEventCut:n,logEventStopped:n,logNoParent:n,logEventNoHandlers:n,logEventResponse:n,write:n}),_u=o([on("menu"),on("selectedMenu")]),Ru=o([on("item"),on("selectedItem")]),Bu=(qn=(o(zt(Ru().concat(_u()))),o(zt(Ru()))),Yn=Y("initSize",[on("numColumns"),on("numRows")]),function(e,t){return dn(e,o(t))}),Mu=(Yn=o(Yn),uo("x","y","bubble","direction","label")),Pu=it([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),zu=Pu.southeast,Iu=Pu.southwest,Lu=Pu.northeast,Fu=Pu.northwest,Hu=Pu.south,Vu=Pu.north,Uu=Pu.east,ju=Pu.west,Wu=function(e){return e.x()},qu=function(e,t){return e.x()+e.width()/2-t.width()/2},$u=function(e,t){return e.x()+e.width()-t.width()},Gu=function(e,t){return e.y()-t.height()},Xu=function(e){return e.y()+e.height()},Yu=function(e,t,n){return Mu(Wu(e),Xu(e),n.southeast(),zu(),"layout-se")},Ku=function(e,t,n){return Mu($u(e,t),Xu(e),n.southwest(),Iu(),"layout-sw")},Ju=function(e,t,n){return Mu(Wu(e),Gu(e,t),n.northeast(),Lu(),"layout-ne")},Zu=function(e,t,n){return Mu($u(e,t),Gu(e,t),n.northwest(),Fu(),"layout-nw")},Qu=function(e,t,n){return Mu(qu(e,t),Gu(e,t),n.north(),Vu(),"layout-n")},ec=function(e,t,n){return Mu(qu(e,t),Xu(e),n.south(),Hu(),"layout-s")},tc=function(e,t,n){return Mu((r=e).x()+r.width(),Aa(e,t),n.east(),Uu(),"layout-e");var r},nc=function(e,t,n){return Mu((r=t,e.x()-r.width()),Aa(e,t),n.west(),ju(),"layout-w");var r},rc=function(){return[Yu,Ku,Ju,Zu,ec,Qu]},oc=function(){return[Ku,Yu,Zu,Ju,ec,Qu]},ic=function(e,t,n,r,o,i,u){function c(e){return St(e,n)?e[n]():ye.none()}o=Qe(o,(function(e,t){return _a(n,e,t)})),i=Qe(i,yo);var s=d(d(d({},i),o),{revoke:a(Ra,n),config:function(t){var r=Yt(n+"-config",e,t);return{key:n,value:{config:r,me:s,configAsRaw:N((function(){return Yt(n+"-config",e,t)})),initialConfig:t,state:u}}},schema:function(){return t},exhibit:function(e,t){return c(e).bind((function(e){return yt(r,"exhibit").map((function(n){return n(t,e.config,e.state)}))})).getOr(So({}))},name:function(){return n},handlers:function(e){return c(e).map((function(e){return R("events",(function(e,t){return{}}))(r)(e.config,e.state)})).getOr({})}});return s},ac=function(e){return xt(e)},uc=Pt([on("fields"),on("name"),ln("active",{}),ln("apis",{}),ln("state",Fi),ln("extra",{})]),cc=Pt([on("branchKey"),on("branches"),on("name"),ln("active",{}),ln("apis",{}),ln("state",Fi),ln("extra",{})]),sc=o(void 0),lc=(Pu=Object.freeze({events:function(e){return Go([Xo(Tr(),(function(t,n){var r,o=e.channels,i=Ke(o);i=i,i=(r=n).universal()?i:Ie(i,(function(e){return Re(r.channels(),e)}));Pe(i,(function(e){var r=o[e],i=r.schema;e=Yt("channel["+e+"] data\nReceiver: "+po(t.element()),i,n.data());r.onReceive(t,e)}))}))])}}),[an("channels",V(we.value,Pt([Ea("onReceive"),ln("schema",Zt())])))]),fc=Ba({fields:lc,name:"receiving",active:Pu}),dc=(lc=Object.freeze({exhibit:function(e,t){return So({classes:[],styles:t.useFixed()?{}:{position:"relative"}})}}),function(e){e.dom().focus()}),mc=function(e){return e=void 0!==e?e.dom():t.document,ye.from(e.activeElement).map(gn.fromDom)},gc=function(e){return mc(ri(e)).filter((function(t){return e.dom().contains(t.dom())}))},hc=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right"],pc=function(e,t,n){function r(e){return yt(n,e).getOr([])}function o(e,t,n){var o=$e(hc,n);return{offset:function(){return Ja(e,t)},classesOn:function(){return je(n,r)},classesOff:function(){return je(o,r)}}}return{southeast:function(){return o(-e,t,["top","alignLeft"])},southwest:function(){return o(e,t,["top","alignRight"])},south:function(){return o(-e/2,t,["top","alignCentre"])},northeast:function(){return o(-e,-t,["bottom","alignLeft"])},northwest:function(){return o(e,-t,["bottom","alignRight"])},north:function(){return o(-e/2,-t,["bottom","alignCentre"])},east:function(){return o(e,-t/2,["valignCentre","left"])},west:function(){return o(-e,-t/2,["valignCentre","right"])},innerNorthwest:function(){return o(-e,t,["top","alignRight"])},innerNortheast:function(){return o(e,t,["top","alignLeft"])},innerNorth:function(){return o(-e/2,t,["top","alignCentre"])},innerSouthwest:function(){return o(-e,-t,["bottom","alignRight"])},innerSoutheast:function(){return o(e,-t,["bottom","alignLeft"])},innerSouth:function(){return o(-e/2,-t,["bottom","alignCentre"])},innerWest:function(){return o(e,-t/2,["valignCentre","right"])},innerEast:function(){return o(-e,-t/2,["valignCentre","left"])}}},vc=so(["x","y","width","height","maxHeight","maxWidth","direction","classes","label","candidateYforTest"],[]),bc=uo("position","left","top","right","bottom"),yc=(Pu=it([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]),Pu.relative),wc=Pu.fixed,xc=function(e,t){return function(n){return"rtl"===Cc(n)?t:e}},Cc=function(e){return"rtl"===Do(e,"direction")?"rtl":"ltr"},Sc=(Pu=[on("hotspot"),Z("bubble"),ln("overrides",{}),Ha(),Bu("placement",(function(e,t,n){var r=t.hotspot;n=La(n,r.element()),r=Va(e.element(),t,rc(),oc());return ye.some({anchorBox:n,bubble:t.bubble.getOr(za()),overrides:t.overrides,layouts:r,placer:ye.none()})}))],[on("x"),on("y"),ln("height",0),ln("width",0),ln("bubble",za()),ln("overrides",{}),Ha(),Bu("placement",(function(e,t,n){return n=Fa(n,t.x,t.y),n=fu(n.left(),n.top(),t.width,t.height),e=Va(e.element(),t,[Yu,Ku,Ju,Zu,ec,Qu,tc,nc],[Ku,Yu,Zu,Ju,ec,Qu,tc,nc]),ye.some({anchorBox:n,bubble:t.bubble,overrides:t.overrides,layouts:e,placer:ye.none()})}))]),kc={create:uo("start","soffset","finish","foffset")},Tc=it([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Ec={before:Tc.before,on:Tc.on,after:Tc.after,cata:function(e,t,n,r){return e.fold(t,n,r)},getStart:function(e){return e.fold(i,i,i)}},Oc=it([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Nc={domRange:Oc.domRange,relative:Oc.relative,exact:Oc.exact,exactFromRange:function(e){return Oc.exact(e.start(),e.soffset(),e.finish(),e.foffset())},getWin:function(e){return e=e.match({domRange:function(e){return gn.fromDom(e.startContainer)},relative:function(e,t){return Ec.getStart(e)},exact:function(e,t,n,r){return e}}),lo(e)},range:kc.create},Ac=function(e){var t=e.getClientRects();t=0<t.length?t[0]:e.getBoundingClientRect();return 0<t.width||0<t.height?ye.some(t).map(Wa):ye.none()},Dc=it([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),_c=function(e,t){return $a(e,t).match({ltr:function(t,n,r,o){var i=e.document.createRange();return i.setStart(t.dom(),n),i.setEnd(r.dom(),o),i},rtl:function(t,n,r,o){var i=e.document.createRange();return i.setStart(r.dom(),o),i.setEnd(t.dom(),n),i}})};Rc=Ho;var Rc,Bc,Mc={get:function(e){if(Rc(e))return Pc(e).getOr("");throw new Error("Can only get "+Bc+" value of a "+Bc+" node")},getOption:Pc,set:function(e,t){if(!Rc(e))throw new Error("Can only set raw "+Bc+" value of a "+Bc+" node");e.dom().nodeValue=t}};function Pc(e){return Rc(e)?ye.from(e.dom().nodeValue):ye.none()}function zc(e){return Mc.get(e)}function Ic(e){return Mc.getOption(e)}function Lc(e){return Ic(e).filter((function(e){return 0!==e.trim().length||-1<e.indexOf(" ")})).isSome()||Re(As,Lo(e))}function Fc(e,t,n,r){c=t,o=n,i=r,(a=ri(u=e).dom().createRange()).setStart(u.dom(),c),a.setEnd(o.dom(),i);var o,i,a,u=a,c=tr(e,n)&&t===r;return u.collapsed&&!c}function Hc(e){var t=gn.fromDom(e.anchorNode),n=gn.fromDom(e.focusNode);return Fc(t,e.anchorOffset,n,e.focusOffset)?ye.some(kc.create(t,e.anchorOffset,n,e.focusOffset)):0<(t=e).rangeCount?(n=t.getRangeAt(0),t=t.getRangeAt(t.rangeCount-1),ye.some(kc.create(gn.fromDom(n.startContainer),n.startOffset,gn.fromDom(t.endContainer),t.endOffset))):ye.none()}function Vc(e,t){return e=_c(e,t),Ac(e)}function Uc(e){return e=Me(e,Ps),zs(e)}function jc(e,t,n){var r=ri(e.element());r=ou(r),e=Fs(e,t,n).getOr(r);return Ls(e,r.left(),r.top())}function Wc(e,t){return t.getSelection.getOrThunk((function(){return function(){return Rs(e)}}))().map((function(e){var t=js(e.start(),e.soffset());e=js(e.finish(),e.foffset());return Nc.range(t.element(),t.offset(),e.element(),e.offset())}))}function qc(e){return e.x()+e.width()}function $c(e,t){return e.x()-t.width()}function Gc(e,t){return e.y()-t.height()+e.height()}function Xc(e,t,n,r){var i=e.x(),a=e.y(),u=e.bubble().offset().left(),c=e.bubble().offset().top(),s=r.y(),l=r.bottom(),f=r.x(),d=r.right();a+=c;c=i+u,i=a,u=t,t=n,r=(n=r).x(),h=n.y(),y=n.width(),g=n.height(),m=h<=i,p=(b=r<=c)&&m,v=c+u<=r+y&&i+t<=h+g,b=Math.abs(Math.min(u,b?r+y-c:r-(c+u))),y=Math.abs(Math.min(t,m?h+g-i:h-(i+t)));u=(r={originInBounds:p,sizeInBounds:v,limitX:el(c,n.x(),n.right()),limitY:el(i,n.y(),n.bottom()),deltaW:b,deltaH:y}).originInBounds;var m=r.sizeInBounds,g=r.limitX,h=r.limitY,p=(t=r.deltaW,r.deltaH),v=o(h+p-s),b=(c=o(l-h),i=e.direction().fold(c,c,v,v,c,v,c,c),n=o(g+t-f),o(d-g)),y=e.direction().fold(b,n,b,n,b,b,b,n);r=vc({x:g,y:h,width:t,height:p,maxHeight:i,maxWidth:y,direction:e.direction(),classes:{on:e.bubble().classesOn(),off:e.bubble().classesOff()},label:e.label(),candidateYforTest:a});return u&&m?tl.fit(r):tl.nofit(r,t,p)}function Yc(e,t,n,r,o){function u(e,i,a,u){return e=e(t,n,r),Xc(e,c,s,o).fold(tl.fit,(function(e,t,n){return u<n||a<t?tl.nofit(e,t,n):tl.nofit(i,a,u)}))}var c=n.width(),s=n.height();return Fe(e,(function(e,t){return t=a(u,t),e.fold(tl.fit,t)}),tl.nofit(vc({x:t.x(),y:t.y(),width:n.width(),height:n.height(),maxHeight:n.height(),maxWidth:n.width(),direction:zu(),classes:{on:[],off:[]},label:"none",candidateYforTest:t.y()}),-1,-1)).fold(i,i)}function Kc(e,t){t=Math.floor(t),t=Xa.max(e,t,["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"]),oa(e,"max-height",t+"px")}function Jc(e,t,n){return void 0===e[t]?n:e[t]}function Zc(e,t,n,r,o){t=Zs(n.anchorBox,t),ll(t,o.element(),n.bubble,n.layouts,r,n.overrides)}function Qc(e,t,n,r,o,i){return i=i.map(du),fl(e,t,n,r,o,i)}function es(e,t){var n=e.components();pl(e),n=$e(n,t);Pe(n,(function(t){ml(t),e.getSystem().removeFromWorld(t)})),Pe(t,(function(t){t.getSystem().isConnected()?hl(e,t):(e.getSystem().addToWorld(t),hl(e,t),Vo(e.element())&&gl(t)),e.syncComponents()}))}function ts(e,t){Cl(e,t,mi)}function ns(e){var t=ui(e.element());Pe(t,(function(t){e.getByDom(t).each(ml)})),vi(e.element())}function rs(e,t,n,r){return n.get().each((function(t){xl(e)})),t=t.getAttachPoint(e),vl(t,e),t=e.getSystem().build(r),vl(e,t),n.set(t),t}function os(e,t,n,r){return n=rs(e,t,n,r),t.onOpen(e,n),n}function is(e,t,n){n.get().each((function(r){xl(e),wl(e),t.onClose(e,r),n.clear()}))}function as(e,t,n){return n.isOpen()}function us(e,t,n){var r,o,i=t.getAttachPoint(e);oa(e.element(),"position",dl.getMode(i)),r=e,i="visibility",o=t.cloakVisibilityAttr,e="hidden",ua(r.element(),i).fold((function(){Si(r.element(),o)}),(function(e){wi(r.element(),o,e)})),oa(r.element(),i,e)}function cs(e,t,n){var r,o;r=e.element(),Be(["top","left","right","bottom"],(function(e){return ua(r,e).isSome()}))||ca(e.element(),"position"),e=e,o="visibility",t=t.cloakVisibilityAttr,Ci(e.element(),t)?(t=xi(e.element(),t),oa(e.element(),o,t)):ca(e.element(),o)}function ss(e,t,n){t.store.manager.onLoad(e,t,n)}function ls(e,t,n){t.store.manager.onUnload(e,t,n)}function fs(){var e=mn(null);return Hi({set:e.set,get:e.get,isNotSet:function(){return null===e.get()},clear:function(){e.set(null)},readState:function(){return{mode:"memory",value:e.get()}}})}function ds(){var e=mn({}),t=mn({});return Hi({readState:function(){return{mode:"dataset",dataByValue:e.get(),dataByText:t.get()}},lookup:function(n){return yt(e.get(),n).orThunk((function(){return yt(t.get(),n)}))},update:function(n){var r=e.get(),o=t.get(),i={},a={};Pe(n,(function(e){i[e.value]=e,yt(e,"meta").each((function(t){yt(t,"text").each((function(t){a[t]=e}))}))})),e.set(d(d({},r),i)),t.set(d(d({},o),a))},clear:function(){e.set({}),t.set({})}})}function ms(e,t,n,r){var o=t.store;n.update([r]),o.setValue(e,r),t.onSetValue(e,r)}function gs(e,t){return ue(e,{},Me(t,(function(t){return n=t.name(),r="Cannot configure "+t.name()+" for "+e,Vt(n,n,ft(),Mt((function(e){return kt.serror("The field: "+n+" is forbidden. "+r)})));var n,r})).concat([dn("dump",i)]))}function hs(e,t,n,r){return n.uiType===Pl?(a=n,u=r,(i=e).exists((function(e){return e!==a.owner}))?zl.single(!0,o(a)):yt(u,a.name).fold((function(){throw new Error("Unknown placeholder component: "+a.name+"\nKnown: ["+Ke(u)+"]\nNamespace: "+i.getOr("none")+"\nSpec: "+JSON.stringify(a,null,2))}),(function(e){return e.replace()}))):zl.single(!1,o(n));var i,a,u}function ps(e,t,n,r){return hs(e,0,n,r).fold((function(o,i){i=i(t,n.config,n.validated);var a=yt(i,"components").getOr([]);a=je(a,(function(n){return ps(e,t,n,r)}));return[d(d({},i),{components:a})]}),(function(e,r){return r=r(t,n.config,n.validated),n.validated.preprocess.getOr(i)(r)}))}function vs(e){return e.fold(ye.some,ye.none,ye.some,ye.some)}function bs(e){function t(e){return e.name}return e.fold(t,t,t,t)}function ys(e,t){return function(n){return n=Yt("Converting part type",t,n),e(n)}}function ws(e,t){var n={};return Pe(t,(function(t){vs(t).each((function(t){r=e,o=t.pname;var r,o,i={uiType:Vl(),owner:r,name:o};n[t.name]=function(n){var r=Yt("Part: "+t.name+" in "+e,zt(t.schema),n);return d(d({},i),{config:n,validated:r})}}))})),n}function xs(e,t,n){return{uiType:Vl(),owner:e,name:t,config:n,validated:{}}}function Cs(e){return Me(e,bs)}function Ss(e,t,n){return Ql(e,t,n).getOrDie("Could not find part: "+n)}function ks(e,t,n){var r={},i=t.partUids,a=e.getSystem();return Pe(n,(function(e){r[e]=o(a.getByUid(i[e]))})),r}function Ts(e,t,n){var r={},i=t.partUids,a=e.getSystem();return Pe(n,(function(e){r[e]=o(a.getByUid(i[e]).getOrDie())})),r}function Es(e,t){return t=Cs(t),xt(Me(t,(function(t){return{key:t,value:e+"-"+t}})))}function Os(e,t,n,r,o){o=of(o);var i=Kl(n),a=nf(n);t=rf(e,t,o,i,[a]),i=Jl(e,t,n);return r(t,Zl(e,t,i.internals()),o,i.externals())}var Ns=function(e){return"img"===Lo(e)?1:Ic(e).fold((function(){return ui(e).length}),(function(e){return e.length}))},As=["img","br"],Ds=function(e){return t=Lc,(n=function(e){for(var r=ui(e),o=r.length-1;0<=o;o--){var i=r[o];if(t(i))return ye.some(i);if(i=n(i),i.isSome())return i}return ye.none()})(e);var t,n},_s=(Bc="text",document.caretPositionFromPoint||document.caretRangeFromPoint,function(e,t){return Qn(t,e)}),Rs=function(e){return ye.from(e.getSelection()).filter((function(e){return 0<e.rangeCount})).bind(Hc)},Bs=uo("element","offset"),Ms=(Tc=it([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),function(e){return e.fold((function(e){return e}),(function(e,t,n){return e.translate(-t,-n)}))}),Ps=function(e){return e.fold((function(e){return e}),(function(e,t,n){return e}))},zs=function(e){return Fe(e,(function(e,t){return e.translate(t.left(),t.top())}),Ja(0,0))},Is=Tc.screen,Ls=Tc.absolute,Fs=function(e,t,n){return n=lo(n.root).dom(),ye.from(n.frameElement).map(gn.fromDom).filter((function(t){t=ri(t);var n=ri(e.element());return tr(t,n)})).map(Qa)},Hs=function(e,t,n,r){var o=e,i=t,a=n,u=r;e<0&&(o=0,a=n+e),t<0&&(i=0,u=r+t),n=Is(Ja(o,i));return ye.some(su(n,a,u))},Vs=function(e,t,n,r,o){return e.map((function(e){var i=[t,e.point()],a=(a=function(){return Uc(i)},u=function(){return Uc(i)},c=function(){var e=i;return e=Me(i,Ms),zs(e)},r.fold(a,u,c)),u=lu(a.left(),a.top(),e.width(),e.height()),c=Va(o,n,n.showAbove?[Ju,Zu,Yu,Ku,Qu,ec]:[Yu,Ku,Ju,Zu,ec,ec],n.showAbove?[Zu,Ju,Ku,Yu,Qu,ec]:[Ku,Yu,Zu,Ju,ec,Qu]);return{anchorBox:u,bubble:n.bubble.getOr(za()),overrides:n.overrides,layouts:c,placer:ye.none()}}))},Us=uo("element","offset"),js=function(e,t){return Ho(e)?Us(e,t):(t=t,0===(n=ui(e=e)).length?Bs(e,t):t<n.length?Bs(n[t],0):(e=n[n.length-1],t=(Ho(e)?zc:ui)(e).length,Bs(e,t)));var n},Ws=(Tc=[Z("getSelection"),on("root"),Z("bubble"),Ha(),ln("overrides",{}),ln("showAbove",!1),Bu("placement",(function(e,t,n){var r=lo(t.root).dom(),o=jc(e,n,t),i=Wc(r,t).bind((function(e){return Vc(r,Nc.exactFromRange(e)).orThunk((function(){var t=gn.fromText("\ufeff");return fi(e.start(),t),Vc(r,Nc.exact(t,0,t,1)).map((function(e){return vi(t),e}))})).bind((function(e){return Hs(e.left(),e.top(),e.width(),e.height())}))}));e=Wc(r,t).bind((function(e){return Fo(e.start())?ye.some(e.start()):ii(e.start())})).getOr(e.element());return Vs(i,o,t,n,e)}))],[on("node"),on("root"),Z("bubble"),Ha(),ln("overrides",{}),ln("showAbove",!1),Bu("placement",(function(e,t,n){var r=jc(e,n,t);return t.node.bind((function(o){o=o.dom().getBoundingClientRect(),o=Hs(o.left,o.top,o.width,o.height);var i=t.node.getOr(e.element());return Vs(o,r,t,n,i)}))}))]),qs=function(e,t,n){return Mu(qc(e),e.y(),n.southeast(),zu(),"link-layout-se")},$s=function(e,t,n){return Mu($c(e,t),e.y(),n.southwest(),Iu(),"link-layout-sw")},Gs=function(e,t,n){return Mu(qc(e),Gc(e,t),n.northeast(),Lu(),"link-layout-ne")},Xs=function(e,t,n){return Mu($c(e,t),Gc(e,t),n.northwest(),Fu(),"link-layout-nw")},Ys=[on("item"),Ha(),ln("overrides",{}),Bu("placement",(function(e,t,n){return n=La(n,t.item.element()),e=Va(e.element(),t,[qs,$s,Gs,Xs],[$s,qs,Xs,Gs]),ye.some({anchorBox:n,bubble:za(),overrides:t.overrides,layouts:e,placer:ye.none()})}))],Ks=U("anchor",{selection:Tc,node:Ws,hotspot:Pu,submenu:Ys,makeshift:Sc}),Js=uo("anchorBox","origin"),Zs=function(e,t){return Js(e,t)},Qs=function(e,t,n,r){return e+=t,r<e?n:e<n?r:e},el=function(e,t,n){return e<=t?t:n<=e?n:e},tl=it([{fit:["reposition"]},{nofit:["reposition","deltaW","deltaH"]}]),nl=function(e,t,n,r){return ca(t,"max-height"),ca(t,"max-width"),t={width:o(ru(t=t)),height:o(Ka(t))},Yc(r.preference(),e,t,n,r.bounds())},rl=function(e,t){t=t.classes(),ea(e,t.off),Qi(e,t.on)},ol=function(e,t,n){n.maxHeightFunction()(e,t.maxHeight())},il=function(e,t,n){n.maxWidthFunction()(e,t.maxWidth())},al=function(e,t,n){function r(e){return e+"px"}n=n.origin(),o=t;var o,i;t=n.fold((function(){return bc("absolute",ye.some(o.x()),ye.some(o.y()),ye.none(),ye.none())}),(function(e,t,n,r){return Ia("absolute",o,e,t,n,r)}),(function(e,t,n,r){return Ia("fixed",o,e,t,n,r)}));n=e,e={position:ye.some(t.position()),left:t.left().map(r),top:t.top().map(r),right:t.right().map(r),bottom:t.bottom().map(r)},i=n.dom(),Ze(e,(function(e,t){e.fold((function(){ra(i,t)}),(function(e){na(i,t,e)}))}))},ul=o((function(e,t){Kc(e,t),ia(e,{"overflow-x":"hidden","overflow-y":"auto"})})),cl=o((function(e,t){Kc(e,t)})),sl=so(["bounds","origin","preference","maxHeightFunction","maxWidthFunction"],[]),ll=function(e,t,r,o,i,a){var u,c=Jc(a,"maxHeightFunction",ul()),s=(a=Jc(a,"maxWidthFunction",n),e.anchorBox());e=e.origin(),i=sl({bounds:(u=e,i.fold((function(){return u.fold(gu,gu,fu)}),(function(e){return u.fold(e,e,(function(){var t=e(),n=Fa(u,t.x(),t.y());return fu(n.left(),n.top(),t.width(),t.height())}))}))),origin:e,preference:o,maxHeightFunction:c,maxWidthFunction:a});c=nl(s,e=t,r,o=i),al(e,c,o),rl(e,c),ol(e,c,o),il(e,c,o)},fl=function(e,n,r,i,a,u){var c=Yt("positioning anchor.info",Ks,i);Pa((function(){oa(a.element(),"position","fixed");var r,i=ua(a.element(),"visibility"),s=(oa(a.element(),"visibility","hidden"),n.useFixed()?(r=t.document.documentElement,wc(0,0,r.clientWidth,r.clientHeight)):(l=Qa((r=e).element()),r=r.element().dom().getBoundingClientRect(),yc(l.left(),l.top(),r.width,r.height))),l=c.placement,f=u.map(o).or(n.getBounds);l(e,c,s).each((function(t){t.placer.getOr(Zc)(e,s,t,f,a)})),i.fold((function(){ca(a.element(),"visibility")}),(function(e){oa(a.element(),"visibility",e)})),ua(a.element(),"left").isNone()&&ua(a.element(),"top").isNone()&&ua(a.element(),"right").isNone()&&ua(a.element(),"bottom").isNone()&&ua(a.element(),"position").is("fixed")&&ca(a.element(),"position")}),a.element())},dl=(Tc=Object.freeze({position:function(e,t,n,r,o){Qc(e,t,n,r,o,ye.none())},positionWithin:Qc,positionWithinBounds:fl,getMode:function(e,t,n){return t.useFixed()?"fixed":"absolute"}}),Ws=[ln("useFixed",s),Z("getBounds")],Ba({fields:Ws,name:"positioning",active:lc,apis:Tc})),ml=function(e){Gr(e,Fr()),e=e.components(),Pe(e,ml)},gl=function(e){var t=e.components();Pe(t,gl),Gr(e,Lr())},hl=function(e,t){mi(e.element(),t.element())},pl=function(e){Pe(e.components(),(function(e){return vi(e.element())})),pi(e.element()),e.syncComponents()},vl=function(e,t){bl(e,t,mi)},bl=function(e,t,n){e.getSystem().addToWorld(t),n(e.element(),t.element()),Vo(e.element())&&gl(t),e.syncComponents()},yl=function(e){ml(e),vi(e.element()),e.getSystem().removeFromWorld(e)},wl=function(e){var t=ii(e.element()).bind((function(t){return e.getSystem().getByDom(t).toOption()}));yl(e),t.each((function(e){e.syncComponents()}))},xl=function(e){var t=e.components();Pe(t,yl),pi(e.element()),e.syncComponents()},Cl=function(e,t,n){n(e,t.element()),n=ui(t.element()),Pe(n,(function(e){t.getByDom(e).each(gl)}))},Sl=(Pu=Object.freeze({cloak:us,decloak:cs,open:os,openWhileCloaked:function(e,t,n,r,o){us(e,t),os(e,t,n,r),o(),cs(e,t)},close:is,isOpen:as,isPartOf:function(e,t,n,r){return as(0,0,n)&&n.get().exists((function(n){return t.isPartOf(e,n,r)}))},getState:function(e,t,n){return n.get()},setContent:function(e,t,n,r){return n.get().map((function(){return rs(e,t,n,r)}))}}),Ys=Object.freeze({events:function(e,t){return Go([Xo(_r(),(function(n,r){is(n,e,t)}))])}}),Sc=[ka("onOpen"),ka("onClose"),on("isPartOf"),on("getAttachPoint"),ln("cloakVisibilityAttr","data-precloak-visibility")],Ba({fields:Sc,name:"sandboxing",active:Ys,apis:Pu,state:Object.freeze({init:function(){var e=mn(ye.none()),t=o("not-implemented");return Hi({readState:t,isOpen:function(){return e.get().isSome()},clear:function(){e.set(ye.none())},set:function(t){e.set(ye.some(t))},get:function(t){return e.get()}})}})})),kl=o("dismiss.popups"),Tl=o("reposition.popups"),El=o("mouse.released"),Ol=Pt([ln("isExtraPart",o(!1)),cn("fireEventInstead",[ln("event",Hr())])]),Nl=function(e){var t=Yt("Dismissal",Ol,e);e={};return e[kl()]={schema:Pt([on("target")]),onReceive:function(e,n){!Sl.isOpen(e)||Sl.isPartOf(e,n.target)||t.isExtraPart(e,n.target)||t.fireEventInstead.fold((function(){return Sl.close(e)}),(function(t){return Gr(e,t.event)}))}},e},Al=Pt([ln("isExtraPart",o(!1)),cn("fireEventInstead",[ln("event",Wn())]),X("doReposition")]),Dl=function(e){var t=Yt("Reposition",Al,e);e={};return e[Tl()]={onReceive:function(e){Sl.isOpen(e)&&t.fireEventInstead.fold((function(){return t.doReposition(e)}),(function(t){return Gr(e,t.event)}))}},e},_l=(Ws=Object.freeze({onLoad:ss,onUnload:ls,setValue:function(e,t,n,r){t.store.manager.setValue(e,t,n,r)},getValue:function(e,t,n){return t.store.manager.getValue(e,t,n)},getState:function(e,t,n){return n}}),lc=Object.freeze({events:function(e,t){var n=e.resetOnDom?[Zo((function(n,r){ss(n,e,t)})),Qo((function(n,r){ls(n,e,t)}))]:[Da(e,t,ss)];return Go(n)}}),Tc=Object.freeze({memory:fs,dataset:ds,manual:function(){return Hi({readState:function(){}})},init:function(e){return e.store.manager.state(e)}}),Sc=[Z("initialValue"),on("getFallbackEntry"),on("getDataKey"),on("setValue"),Bu("manager",{setValue:ms,getValue:function(e,t,n){var r=t.store,o=r.getDataKey(e);return n.lookup(o).fold((function(){return r.getFallbackEntry(o)}),(function(e){return e}))},onLoad:function(e,t,n){t.store.initialValue.each((function(r){ms(e,t,n,r)}))},onUnload:function(e,t,n){n.clear()},state:ds})],Ys=[on("getValue"),ln("setValue",n),Z("initialValue"),Bu("manager",{setValue:function(e,t,n,r){t.store.setValue(e,r),t.onSetValue(e,r)},getValue:function(e,t,n){return t.store.getValue(e)},onLoad:function(e,t,n){t.store.initialValue.each((function(n){t.store.setValue(e,n)}))},onUnload:n,state:Fi.init})],Pu=[Z("initialValue"),Bu("manager",{setValue:function(e,t,n,r){n.set(r),t.onSetValue(e,r)},getValue:function(e,t,n){return n.get()},onLoad:function(e,t,n){t.store.initialValue.each((function(e){n.isNotSet()&&n.set(e)}))},onUnload:function(e,t,n){n.clear()},state:fs})],Pu=[fn("store",{mode:"memory"},U("mode",{memory:Pu,manual:Ys,dataset:Sc})),ka("onSetValue"),ln("resetOnDom",!1)],Ba({fields:Pu,name:"representing",active:lc,apis:Ws,extra:{setValueFrom:function(e,t){t=_l.getValue(t),_l.setValue(e,t)}},state:Tc})),Rl=function(e){return e.dump},Bl=function(e,t){return d(d({},e.dump),ac(t))},Ml={field:gs,augment:Bl,get:Rl},Pl="placeholder",zl=it([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]),Il=function(e,t,n,r){return je(n,(function(n){return ps(e,t,n,r)}))},Ll=function(e,t){var n=!1;return{name:o(e),required:function(){return t.fold((function(e,t){return e}),(function(e,t){return e}))},used:function(){return n},replace:function(){if(!0===n)throw new Error("Trying to use the same placeholder more than once: "+e);return n=!0,t}}},Fl=zl.single,Hl=zl.multiple,Vl=o(Pl),Ul=(Ys=it([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),Sc=ln("factory",{sketch:i}),Pu=ln("schema",[]),lc=on("name"),Ws=Vt("pname","pname",dt((function(e){return"<alloy."+Oi(e.name)+">"})),Zt()),Tc=dn("schema",(function(){return[Z("preprocess")]})),ln("defaults",o({}))),jl=ln("overrides",o({})),Wl=zt([Sc,Pu,lc,Ws,Ul,jl]),ql=zt([Sc,Pu,lc,Ul,jl]),$l=(Pu=zt([Sc,Pu,lc,Ws,Ul,jl]),Sc=zt([Sc,Tc,lc,on("unit"),Ws,Ul,jl]),ys(Ys.required,Wl)),Gl=(Tc=ys(Ys.external,ql),ys(Ys.optional,Pu)),Xl=(lc=ys(Ys.group,Sc),o("entirety")),Yl=(Ws=Object.freeze({required:$l,external:Tc,optional:Gl,group:lc,asNamedPart:vs,name:bs,asCommon:function(e){return e.fold(i,i,i,i)},original:Xl}),function(e,t,n,r){return ut(t.defaults(e,n,r),n,{uid:e.partUids[t.name]},t.overrides(e,n,r))}),Kl=function(e){return je(e,(function(e){return e.fold(ye.none,ye.some,ye.none,ye.none).map((function(e){return Y(e.name,e.schema.concat([Na(Xl())]))})).toArray()}))},Jl=function(e,t,n){return r=t,i={},a={},Pe(n,(function(e){e.fold((function(e){i[e.pname]=Fl(!0,(function(t,n,r){return e.factory.sketch(Yl(t,e,n,r))}))}),(function(e){var t=r.parts[e.name];a[e.name]=o(e.factory.sketch(Yl(r,e,t[Xl()]),t))}),(function(e){i[e.pname]=Fl(!1,(function(t,n,r){return e.factory.sketch(Yl(t,e,n,r))}))}),(function(e){i[e.pname]=Hl(!0,(function(t,n,r){var o=t[e.name];return Me(o,(function(n){return e.factory.sketch(ut(e.defaults(t,n,r),n,e.overrides(t,n)))}))}))}))})),{internals:o(i),externals:o(a)};var r,i,a},Zl=function(e,t,n){var r=ye.some(e),o=t;e=t.components,t=n;return t=Qe(t,(function(e,t){return Ll(t,e)})),e=Il(r,o,e,t),Ze(t,(function(e){if(!1===e.used()&&e.required())throw new Error("Placeholder: "+e.name()+" was not found in components list\nNamespace: "+r.getOr("none")+"\nComponents: "+JSON.stringify(o.components,null,2))})),e},Ql=function(e,t,n){return t=t.partUids[n],e.getSystem().getByUid(t).toOption()},ef=function(e,t){var n=e.getSystem();return Qe(t.partUids,(function(e,t){return o(n.getByUid(e))}))},tf=function(e){return Ke(e.partUids)},nf=function(e){return Vt("partUids","partUids",mt((function(t){return Es(t.uid,e)})),Zt())},rf=(Ul=Object.freeze({generate:ws,generateOne:xs,schemas:Kl,names:Cs,substitutes:Jl,components:Zl,defaultUids:Es,defaultUidsSchema:nf,getAllParts:ef,getAllPartNames:tf,getPart:Ql,getPartOrDie:Ss,getParts:ks,getPartsOrDie:Ts}),function(e,t,n,r,o){return o=o,r=(0<(r=r).length?[Y("parts",r)]:[]).concat([on("uid"),ln("dom",{}),ln("components",[]),Na("originalSpec"),ln("debug.sketcher",{})]).concat(o),Yt(e+" [SpecSchema]",Pt(r.concat(t)),n)}),of=function(e){return e.hasOwnProperty("uid")?e:d(d({},e),{uid:Ri("uid")})};function af(e){var t=Yt("Sketcher for "+e.name,Td,e),n=(e=Qe(t.apis,xo),Qe(t.extraApis,yo));return d(d({name:o(t.name),partFields:o([]),configFields:o(t.configFields),sketch:function(e){var n=t.name,r=t.configFields,o=t.factory;return e=of(e),o(rf(n,r,e,[],[]),e)}},e),n)}function uf(e){var t=Yt("Sketcher for "+e.name,Ed,e),n=(e=ws(t.name,t.partFields),Qe(t.apis,xo)),r=Qe(t.extraApis,yo);return d(d({name:o(t.name),partFields:o(t.partFields),configFields:o(t.configFields),sketch:function(e){return Os(t.name,t.configFields,t.partFields,t.factory,e)},parts:o(e)},n),r)}function cf(e){return"input"===Lo(e)&&"radio"!==xi(e,"type")||"textarea"===Lo(e)}function sf(e,t,n,r){var o=_s(e.element(),"."+t.highlightClass);Pe(o,(function(n){Be(r,(function(e){return e.element()===n}))||(Ji(n,t.highlightClass),e.getSystem().getByDom(n).each((function(n){t.onDehighlight(e,n),Gr(n,$r())})))}))}function lf(e,t,n,r){sf(e,t,0,[r]),ff(0,t,0,r)||(Yi(r.element(),t.highlightClass),t.onHighlight(e,r),Gr(r,qr()))}function ff(e,t,n,r){return Zi(r.element(),t.highlightClass)}function df(e,t,n){return vu(e.element(),"."+t.itemClass).bind((function(t){return e.getSystem().getByDom(t).toOption()}))}function mf(e,t,n){return(0<(t=_s(e.element(),"."+t.itemClass)).length?ye.some(t[t.length-1]):ye.none()).bind((function(t){return e.getSystem().getByDom(t).toOption()}))}function gf(e,t,n,r){var o=_s(e.element(),"."+t.itemClass);return Ve(o,(function(e){return Zi(e,t.highlightClass)})).bind((function(t){return t=Qs(t,r,0,o.length-1),e.getSystem().getByDom(o[t]).toOption()}))}function hf(e,t,n){return t=_s(e.element(),"."+t.itemClass),Cu(Me(t,(function(t){return e.getSystem().getByDom(t).toOption()})))}function pf(e,t,n){var r=qe(e.slice(0,t));e=qe(e.slice(t+1));return He(r.concat(e),n)}function vf(e,t,n){return e=qe(e.slice(0,t)),He(e,n)}function bf(e,t,n){var r=e.slice(0,t);e=e.slice(t+1);return He(e.concat(r),n)}function yf(e,t,n){return e=e.slice(t+1),He(e,n)}function wf(e){return function(t){return We(e,(function(e){return e(t)}))}}function xf(e){return!0===e.raw().shiftKey}function Cf(e){return!0===e.raw().ctrlKey}function Sf(e,t){return{matches:e,classification:t}}function kf(e,t,n,r,o){function i(e,t,n,r,o){return n=n(e,t,r,o),Bd(n,t.event()).bind((function(n){return n(e,t,r,o)}))}var a={schema:function(){return e.concat([ln("focusManager",Pd()),fn("focusInside","onFocus",qt((function(e){return Re(["onFocus","onEnterOrSpace","onApi"],e)?we.value(e):we.error("Invalid value for focusInside")}))),Bu("handler",a),Bu("state",t),Bu("sendFocusIn",o)])},processKey:i,toEvents:function(e,t){var a=e.focusInside!==Sd.OnFocusMode?ye.none():o(e).map((function(n){return Xo(Cr(),(function(r,o){n(r,e,t),o.stop()}))}));return Go(a.toArray().concat([Xo(hr(),(function(r,a){i(r,a,n,e,t).fold((function(){var n,i,u;n=r,i=a,u=_d(Dd().concat(Ad()))(i.event()),e.focusInside===Sd.OnEnterOrSpaceMode&&u&&rr(n,i)&&o(e).each((function(r){r(n,e,t),i.stop()}))}),(function(e){a.stop()}))})),Xo(pr(),(function(n,o){i(n,o,r,e,t).each((function(e){o.stop()}))}))]))}};return a}function Tf(e){function t(e,t){(function(e,t){return e=_s(e.element(),t.selector),e=Ie(e,(function(e){return r(t,e)})),ye.from(e[t.firstTabstop])})(e,t).each((function(n){t.focusManager.set(e,n)}))}function n(e,t,n,r){var o=_s(e.element(),n.selector);return i(e,n).bind((function(t){return Ve(o,a(tr,t)).bind((function(t){return u(e,o,t,n,r)}))}))}e=[Z("onEscape"),Z("onEnter"),ln("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),ln("firstTabstop",0),ln("useTabstopAt",o(!0)),Z("visibilitySelector")].concat([e]);var r=function(e,t){return e=e.visibilitySelector.bind((function(e){return bu(t,e)})).getOr(t),0<Ya(e)},i=function(e,t){return t.focusManager.get(e).bind((function(e){return bu(e,t.selector)}))},u=function(e,t,n,o,i){return i(t,n,(function(e){return r(t=o,e=e)&&t.useTabstopAt(e);var t})).fold((function(){return o.cyclic?ye.some(!0):ye.none()}),(function(t){return o.focusManager.set(e,t),ye.some(!0)}))},c=o([Sf(wf([xf,_d([9])]),(function(e,t,r,o){var i=r.cyclic?pf:vf;return n(e,0,r,i)})),Sf(_d([9]),(function(e,t,r,o){var i=r.cyclic?bf:yf;return n(e,0,r,i)})),Sf(_d([27]),(function(e,t,n,r){return n.onEscape.bind((function(n){return n(e,t)}))})),Sf(wf([Rd,_d(Ad())]),(function(e,t,n,r){return n.onEnter.bind((function(n){return n(e,t)}))}))]),s=o([]);return kf(e,Fi.init,c,s,(function(){return ye.some(t)}))}function Ef(e,t,n){return cf(n)&&_d(Dd())(t.event())?ye.none():(Kr(e,n,Er()),ye.some(!0))}function Of(e,t){return ye.some(!0)}function Nf(e,t,n){return n.execute(e,t,e.element())}function Af(e){var t=mn(ye.none());return Hi({readState:function(){return t.get().map((function(e){return{numRows:e.numRows(),numColumns:e.numColumns()}})).getOr({numRows:"?",numColumns:"?"})},setGridSize:function(e,n){t.set(ye.some({numRows:o(e),numColumns:o(n)}))},getNumRows:function(){return t.get().map((function(e){return e.numRows()}))},getNumColumns:function(){return t.get().map((function(e){return e.numColumns()}))}})}function Df(e){return function(t,n,r,o){var i=e(t.element());return Id(i,t,n,r,o)}}function _f(e,t){return e=xc(e,t),Df(e)}function Rf(e,t){return t=xc(t,e),Df(t)}function Bf(e){return function(t,n,r,o){return Id(e,t,n,r,o)}}function Mf(e,t){return Ve(e,(function(e){return tr(t,e)}))}function Pf(e,t,n,r,i){return jd(e,t,r,(function(t,a){var u=t===n-1?e.length-t*r:r;a=Qs(a,i,0,u-1);return ye.some({row:o(t),column:o(a)})}))}function zf(e,t,n,r,i){return jd(e,t,r,(function(t,a){t=Qs(t,i,0,n-1);var u=t===n-1?e.length-t*r:r;a=el(a,0,u-1);return ye.some({row:o(t),column:o(a)})}))}function If(e,t,n){vu(e.element(),t.selector).each((function(n){t.focusManager.set(e,n)}))}function Lf(e){return function(t,n,r,o){return Ud(t,n,r.selector).bind((function(t){return e(t.candidates(),t.index(),o.getNumRows().getOr(r.initSize.numRows),o.getNumColumns().getOr(r.initSize.numColumns))}))}}function Ff(e,t,n,r){return n.captureTab?ye.some(!0):ye.none()}function Hf(e,t){t.getInitial(e).orThunk((function(){return vu(e.element(),t.selector)})).each((function(n){t.focusManager.set(e,n)}))}function Vf(e,t,n){return Yd(e,n.selector,t,-1)}function Uf(e,t,n){return Yd(e,n.selector,t,1)}function jf(e){return function(t,n,r){return e(t,n,r).bind((function(){return r.executeOnMove?Jd(t,n,r):ye.some(!0)}))}}function Wf(e,t,n,r){return n.onEscape(e,t)}function qf(e,t,n,r){var o=e[t].length;n=Qs(n,r,0,o-1);return Qd(e,t,n)}function $f(e,t,n,r){return n=Qs(n,r,0,e.length-1),r=e[n].length,t=el(t,0,r-1),Qd(e,n,t)}function Gf(e,t,n,r){var o=e[t].length;n=el(n+r,0,o-1);return Qd(e,t,n)}function Xf(e,t,n,r){return n=el(n+r,0,e.length-1),r=e[n].length,t=el(t,0,r-1),Qd(e,n,t)}function Yf(e,t){t.previousSelector(e).orThunk((function(){var n=t.selectors;return vu(e.element(),n.cell)})).each((function(n){t.focusManager.set(e,n)}))}function Kf(e,t){return function(n,r,o){var i=o.cycles?e:t;return bu(r,o.selectors.row).bind((function(e){var t=_s(e,o.selectors.cell);return Mf(t,r).bind((function(t){var r=_s(n,o.selectors.row);return Mf(r,e).bind((function(e){n=o;var n,a=Me(r,(function(e){return _s(e,n.selectors.cell)}));return i(a,e,t).map((function(e){return e.cell()}))}))}))}))}}function Jf(e,t,n){return n.focusManager.get(e).bind((function(r){return n.execute(e,t,r)}))}function Zf(e,t){vu(e.element(),t.selector).each((function(n){t.focusManager.set(e,n)}))}function Qf(e,t,n){return Yd(e,n.selector,t,-1)}function ed(e,t,n){return Yd(e,n.selector,t,1)}function td(e,t,n,r){r=e.getSystem().build(r),bl(e,r,n)}function nd(e,t,n,r){e=rd(e),He(e,(function(e){return tr(r.element(),e.element())})).each(wl)}function rd(e,t){return e.components()}function od(e,t,n,r,o){var i=rd(e);return ye.from(i[r]).map((function(t){return nd(e,0,0,t),o.each((function(t){td(e,0,(function(e,t){var n,o;o=t,ci(n=e,r).fold((function(){mi(n,o)}),(function(e){fi(e,o)}))}),t)})),t}))}function id(e,t){t.ignore||(dc(e.element()),t.onFocus(e))}function ad(e,t,n){(t=t.aria).update(e,t,n.get())}function ud(e,t,n){t.toggleClass.each((function(t){(n.get()?Yi:Ji)(e.element(),t)}))}function cd(e,t,n){sd(e,t,n,!n.get())}function sd(e,t,n,r){(r?um:cm)(e,t,n)}function ld(e,t,n){sd(e,t,n,t.selected)}function fd(e,t,n){wi(e.element(),"aria-expanded",n)}function dd(e){(gc(e.element()).isNone()||am.isFocused(e))&&(am.isFocused(e)||am.focus(e),Xr(e,lm,{item:e}))}function md(e){Xr(e,fm,{item:e})}function gd(){return"item-widget"}function hd(e){return"prepared"===e.type?ye.some(e.menu):ye.none()}function pd(e,t,n,r,o){function i(){return e.lazySink(t)}function a(e){return 2===e.length?u:{}}var u="horizontal"===r.type?{layouts:{onLtr:function(){return rc()},onRtl:function(){return oc()}}}:{};return Sm.sketch({dom:{tag:"div"},data:r.data,markers:r.menu.markers,onEscape:function(){return Sl.close(t),e.onEscape.map((function(e){return e(t)})),ye.some(!0)},onExecute:function(){return ye.some(!0)},onOpenMenu:function(e,t){dl.positionWithinBounds(i().getOrDie(),n,t,o())},onOpenSubmenu:function(e,t,n,r){var o=i().getOrDie();dl.position(o,d({anchor:"submenu",item:t},a(r)),n)},onRepositionMenu:function(e,t,r){var u=i().getOrDie();dl.positionWithinBounds(u,n,t,o()),Pe(r,(function(e){var t=a(e.triggeringPath);dl.position(u,d({anchor:"submenu",item:e.triggeringItem},t),e.triggeredMenu)}))}})}function vd(e,t){return e.x()+e.width()/2-t.width()/2}function bd(e,t){return e.x()+e.width()-t.width()}function yd(e,t){return e.y()+e.height()-t.height()}function wd(e,t,n){return Mu(e.x(),yd(e,t),n.innerSoutheast(),zu(),"layout-se")}function xd(e,t,n){return Mu(bd(e,t),yd(e,t),n.innerSouthwest(),Iu(),"layout-sw")}function Cd(e){function t(e,t){t.stop(),Yr(e)}var n=Xn().deviceType.isTouch()?[Xo(Nr(),t)]:[Xo(yr(),t),Xo(cr(),(function(e,t){t.cut()}))];return Go(Ue([e.map((function(e){return Xo(Er(),(function(t,n){e(t),n.stop()}))})).toArray(),n]))}var Sd,kd,Td=Pt([on("name"),on("factory"),on("configFields"),ln("apis",{}),ln("extraApis",{})]),Ed=Pt([on("name"),on("factory"),on("configFields"),on("partFields"),ln("apis",{}),ln("extraApis",{})]),Od=(jl=Object.freeze({getCurrent:function(e,t,n){return t.find(e)}}),Wl=[on("find")],Ba({fields:Wl,name:"composing",apis:jl})),Nd=(ql=Object.freeze({dehighlightAll:function(e,t,n){return sf(e,t,0,[])},dehighlight:function(e,t,n,r){ff(0,t,0,r)&&(Ji(r.element(),t.highlightClass),t.onDehighlight(e,r),Gr(r,$r()))},highlight:lf,highlightFirst:function(e,t,n){df(e,t).each((function(r){lf(e,t,n,r)}))},highlightLast:function(e,t,n){mf(e,t).each((function(r){lf(e,t,n,r)}))},highlightAt:function(e,t,n,r){var o,i;i=t,o=r,i=_s((r=e).element(),"."+i.itemClass),ye.from(i[o]).fold((function(){return we.error("No element found with index "+o)}),r.getSystem().getByDom).fold((function(e){throw new Error(e)}),(function(r){lf(e,t,n,r)}))},highlightBy:function(e,t,n,r){var o=hf(e,t);He(o,r).each((function(r){lf(e,t,n,r)}))},isHighlighted:ff,getHighlighted:function(e,t,n){return vu(e.element(),"."+t.highlightClass).bind((function(t){return e.getSystem().getByDom(t).toOption()}))},getFirst:df,getLast:mf,getPrevious:function(e,t,n){return gf(e,t,0,-1)},getNext:function(e,t,n){return gf(e,t,0,1)},getCandidates:hf}),Pu=[on("highlightClass"),on("itemClass"),ka("onHighlight"),ka("onDehighlight")],Ba({fields:Pu,name:"highlighting",apis:ql})),Ad=function(){return[13]},Dd=function(){return[32]},_d=function(e){return function(t){return t=t.raw(),Re(e,t.which)}},Rd=c(xf),Bd=function(e,t){return He(e,(function(e){return e.matches(t)})).map((function(e){return e.classification}))},Md=function(e,t,n){t.exists((function(e){return n.exists((function(t){return tr(t,e)}))}))||Xr(e,Vr(),{prevFocus:t,newFocus:n})},Pd=function(){function e(e){return gc(e.element())}return{get:e,set:function(t,n){var r=e(t);t.getSystem().triggerFocus(n,t.element()),n=e(t);Md(t,r,n)}}},zd=function(){function e(e){return Nd.getHighlighted(e).map((function(e){return e.element()}))}return{get:e,set:function(t,r){var o=e(t);t.getSystem().getByDom(r).fold(n,(function(e){Nd.highlight(t,e)})),r=e(t);Md(t,o,r)}}},Id=(Sc=((Ys=Sd=Sd||{}).OnFocusMode="onFocus",Ys.OnEnterOrSpaceMode="onEnterOrSpace",Ys.OnApiMode="onApi",Tf(dn("cyclic",o(!1)))),Wl=Tf(dn("cyclic",o(!0))),jl=[ln("execute",Ef),ln("useSpace",!1),ln("useEnter",!0),ln("useControlEnter",!1),ln("useDown",!1)],Pu=kf(jl,Fi.init,(function(e,t,n,r){e=n.useSpace&&!cf(e.element())?Dd():[];var o=n.useEnter?Ad():[],i=n.useDown?[40]:[];e=e.concat(o).concat(i);return[Sf(_d(e),Nf)].concat(n.useControlEnter?[Sf(wf([Cf,_d(Ad())]),Nf)]:[])}),(function(e,t,n,r){return n.useSpace&&!cf(e.element())?[Sf(_d(Dd()),Of)]:[]}),(function(){return ye.none()})),ql=Object.freeze({flatgrid:Af,init:function(e){return e.state(e)}}),function(e,t,n,r,o){return r.focusManager.get(t).bind((function(n){return e(t.element(),n,r,o)})).map((function(e){return r.focusManager.set(t,e),!0}))}),Ld=(Ys=Bf,jl=Bf,Bf),Fd=function(e){e=e.dom();return!((e=e).offsetWidth<=0&&e.offsetHeight<=0)},Hd=so(["index","candidates"],[]),Vd=function(e,t){return Ve(e,t).map((function(t){return Hd({index:t,candidates:e})}))},Ud=function(e,t,n){return t=a(tr,t),e=_s(e,n),n=Ie(e,Fd),Vd(n,t)},jd=function(e,t,n,r){return r(Math.floor(t/n),t%n).bind((function(t){return t=t.row()*n+t.column(),0<=t&&t<e.length?ye.some(e[t]):ye.none()}))},Wd=[on("selector"),ln("execute",Ef),Ta("onEscape"),ln("captureTab",!1),Yn()],qd=Lf((function(e,t,n,r){return Pf(e,t,n,r,-1)})),$d=Lf((function(e,t,n,r){return Pf(e,t,n,r,1)})),Gd=Lf((function(e,t,n,r){return zf(e,t,n,r,-1)})),Xd=Lf((function(e,t,n,r){return zf(e,t,n,r,1)})),Yd=(qd=o([Sf(_d([37]),_f(qd,$d)),Sf(_d([39]),Rf(qd,$d)),Sf(_d([38]),Ys(Gd)),Sf(_d([40]),jl(Xd)),Sf(wf([xf,_d([9])]),Ff),Sf(wf([Rd,_d([9])]),Ff),Sf(_d([27]),(function(e,t,n,r){return n.onEscape(e,t)})),Sf(_d(Dd().concat(Ad())),(function(e,t,n,r){return(o=n).focusManager.get(e).bind((function(e){return bu(e,o.selector)})).bind((function(r){return n.execute(e,t,r)}));var o}))]),$d=o([Sf(_d(Dd()),Of)]),Gd=kf(Wd,Af,qd,$d,(function(){return ye.some(If)})),function(e,t,n,r){function o(e,t,n){var i;return(t=Qs(t,r,0,n.length-1))===e?ye.none():(i=n[t],"button"===Lo(i)&&"disabled"===xi(i,"disabled")?o(e,t,n):ye.from(n[t]))}return Ud(e,n,t).bind((function(e){var t=e.index();e=e.candidates();return o(t,t,e)}))}),Kd=(Xd=[on("selector"),ln("getInitial",ye.none),ln("execute",Ef),Ta("onEscape"),ln("executeOnMove",!1),ln("allowVertical",!0)],function(e,t){return t.focusManager.get(e).bind((function(e){return bu(e,t.selector)}))}),Jd=function(e,t,n){return Kd(e,n).bind((function(r){return n.execute(e,t,r)}))},Zd=(Wd=o([Sf(_d(Dd()),Of)]),qd=kf(Xd,Fi.init,(function(e,t,n,r){var o=[37].concat(n.allowVertical?[38]:[]);n=[39].concat(n.allowVertical?[40]:[]);return[Sf(_d(o),jf(_f(Vf,Uf))),Sf(_d(n),jf(Rf(Vf,Uf))),Sf(_d(Ad()),Jd),Sf(_d(Dd()),Jd),Sf(_d([27]),Wf)]}),Wd,(function(){return ye.some(Hf)})),so(["rowIndex","columnIndex","cell"],[])),Qd=function(e,t,n){return ye.from(e[t]).bind((function(e){return ye.from(e[n]).map((function(e){return Zd({rowIndex:t,columnIndex:n,cell:e})}))}))},em=($d=[Y("selectors",[on("row"),on("cell")]),ln("cycles",!0),ln("previousSelector",ye.none),ln("execute",Ef)],Xd=Kf((function(e,t,n){return qf(e,t,n,-1)}),(function(e,t,n){return Gf(e,t,n,-1)})),Wd=Kf((function(e,t,n){return qf(e,t,n,1)}),(function(e,t,n){return Gf(e,t,n,1)})),Kf((function(e,t,n){return $f(e,n,t,-1)}),(function(e,t,n){return Xf(e,n,t,-1)}))),tm=Kf((function(e,t,n){return $f(e,n,t,1)}),(function(e,t,n){return Xf(e,n,t,1)})),nm=(Xd=o([Sf(_d([37]),_f(Xd,Wd)),Sf(_d([39]),Rf(Xd,Wd)),Sf(_d([38]),Ys(em)),Sf(_d([40]),jl(tm)),Sf(_d(Dd().concat(Ad())),(function(e,t,n){return gc(e.element()).bind((function(r){return n.execute(e,t,r)}))}))]),Wd=o([Sf(_d(Dd()),Of)]),Ys=kf($d,Fi.init,Xd,Wd,(function(){return ye.some(Yf)})),em=[on("selector"),ln("execute",Ef),ln("moveOnTab",!1)],jl=o([Sf(_d([38]),Ld(Qf)),Sf(_d([40]),Ld(ed)),Sf(wf([xf,_d([9])]),(function(e,t,n){return n.moveOnTab?Ld(Qf)(e,t,n):ye.none()})),Sf(wf([Rd,_d([9])]),(function(e,t,n){return n.moveOnTab?Ld(ed)(e,t,n):ye.none()})),Sf(_d(Ad()),Jf),Sf(_d(Dd()),Jf)]),tm=o([Sf(_d(Dd()),Of)]),$d=kf(em,Fi.init,jl,tm,(function(){return ye.some(Zf)})),Xd=[Ta("onSpace"),Ta("onEnter"),Ta("onShiftEnter"),Ta("onLeft"),Ta("onRight"),Ta("onTab"),Ta("onShiftTab"),Ta("onUp"),Ta("onDown"),Ta("onEscape"),ln("stopSpaceKeyup",!1),Z("focusIn")],Wd=kf(Xd,Fi.init,(function(e,t,n){return[Sf(_d(Dd()),n.onSpace),Sf(wf([Rd,_d(Ad())]),n.onEnter),Sf(wf([xf,_d(Ad())]),n.onShiftEnter),Sf(wf([xf,_d([9])]),n.onShiftTab),Sf(wf([Rd,_d([9])]),n.onTab),Sf(_d([38]),n.onUp),Sf(_d([40]),n.onDown),Sf(_d([37]),n.onLeft),Sf(_d([39]),n.onRight),Sf(_d(Dd()),n.onSpace),Sf(_d([27]),n.onEscape)]}),(function(e,t,n){return n.stopSpaceKeyup?[Sf(_d(Dd()),Of)]:[]}),(function(e){return e.focusIn})),em=Sc.schema(),jl=Wl.schema(),tm=qd.schema(),Xd=Gd.schema(),Sc=Ys.schema(),Wl=Pu.schema(),qd=$d.schema(),Gd=Wd.schema(),Ma({branchKey:"mode",branches:Object.freeze({acyclic:em,cyclic:jl,flow:tm,flatgrid:Xd,matrix:Sc,execution:Wl,menu:qd,special:Gd}),name:"keying",active:{events:function(e,t){return e.handler.toEvents(e,t)}},apis:{focusIn:function(e,t,n){t.sendFocusIn(t).fold((function(){e.getSystem().triggerFocus(e.element(),e.element())}),(function(r){r(e,t,n)}))},setGridSize:function(e,n,r,o,i){St(r,"setGridSize")?r.setGridSize(o,i):t.console.error("Layout does not support setGridSize")}},state:ql})),rm=Ba({fields:[],name:"replacing",apis:Object.freeze({append:function(e,t,n,r){td(e,0,mi,r)},prepend:function(e,t,n,r){td(e,0,fo,r)},remove:nd,replaceAt:od,replaceBy:function(e,t,n,r,o){var i=rd(e);return Ve(i,r).bind((function(t){return od(e,0,0,t,o)}))},set:function(e,t,n,r){Pa((function(){var t=Me(r,e.getSystem().build);es(e,t)}),e.element())},contents:rd})}),om=function(e,t){return t=Go(t),Ba({fields:[on("enabled")],name:e,active:{events:o(t)}})},im=function(e,t){return{key:e,value:{config:{},me:om(e,t),configAsRaw:o({}),initialConfig:{},state:Fi}}},am=(Ys=Object.freeze({focus:id,blur:function(e,t){t.ignore||e.element().dom().blur()},isFocused:function(e){return e=e.element(),t=ri(e).dom(),e.dom()===t.activeElement;var t}}),Pu=Object.freeze({exhibit:function(e,t){return t=t.ignore?{}:{attributes:{tabindex:"-1"}},So(t)},events:function(e){return Go([Xo(Cr(),(function(t,n){id(t,e),n.stop()}))].concat(e.stopMousedown?[Xo(cr(),(function(e,t){t.event().prevent()}))]:[]))}}),$d=[ka("onFocus"),ln("stopMousedown",!1),ln("ignore",!1)],Ba({fields:$d,name:"focusing",active:Pu,apis:Ys})),um=function(e,t,n){n.set(!0),ud(e,t,n),ad(e,t,n)},cm=function(e,t,n){n.set(!1),ud(e,t,n),ad(e,t,n)},sm=(Wd=Object.freeze({onLoad:ld,toggle:cd,isOn:function(e,t,n){return n.get()},on:um,off:cm,set:sd}),em=Object.freeze({exhibit:function(e,t,n){return So({})},events:function(e,t){n=e,r=t,o=cd;var n,r,o,i=ti((function(e){o(e,n,r)}));t=Da(e,t,ld);return Go(Ue([e.toggleOnExecute?[i]:[],[t]]))}}),jl=[ln("selected",!1),Z("toggleClass"),ln("toggleOnExecute",!0),fn("aria",{mode:"none"},U("mode",{pressed:[ln("syncWithExpanded",!1),Bu("update",(function(e,t,n){wi(e.element(),"aria-pressed",n),t.syncWithExpanded&&fd(e,0,n)}))],checked:[Bu("update",(function(e,t,n){wi(e.element(),"aria-checked",n)}))],expanded:[Bu("update",fd)],selected:[Bu("update",(function(e,t,n){wi(e.element(),"aria-selected",n)}))],none:[Bu("update",n)]}))],Ba({fields:jl,name:"toggling",active:em,apis:Wd,state:(kd=!1,{init:function(){var e=mn(kd);return{get:function(){return e.get()},set:function(t){return e.set(t)},clear:function(){return e.set(kd)},readState:function(){return e.get()}}}})})),lm="alloy.item-hover",fm="alloy.item-focus",dm=o(lm),mm=o(fm),gm=(tm=[on("data"),on("components"),on("dom"),ln("hasSubmenu",!1),Z("toggling"),Ml.field("itemBehaviours",[sm,am,nm,_l]),ln("ignoreFocus",!1),ln("domModification",{}),Bu("builder",(function(e){return{dom:e.dom,domModification:d(d({},e.domModification),{attributes:d(d(d({role:e.toggling.isSome()?"menuitemcheckbox":"menuitem"},e.domModification.attributes),{"aria-haspopup":e.hasSubmenu}),e.hasSubmenu?{"aria-expanded":!1}:{})}),behaviours:Ml.augment(e.itemBehaviours,[e.toggling.fold(sm.revoke,(function(e){return sm.config(d({aria:{mode:"checked"}},e))})),am.config({ignore:e.ignoreFocus,stopMousedown:e.ignoreFocus,onFocus:function(e){md(e)}}),nm.config({mode:"execution"}),_l.config({store:{mode:"memory",initialValue:e.data}}),im("item-type-events",[Xo(Ar(),Yr),ao(cr()),Xo(dr(),dd),Xo(Or(),am.focus)])]),components:e.components,eventOrder:e.eventOrder}})),ln("eventOrder",{})],Xd=[on("dom"),on("components"),Bu("builder",(function(e){return{dom:e.dom,components:e.components,events:Go([(e=Or(),Xo(e,(function(e,t){t.stop()})))])}}))],o([$l({name:"widget",overrides:function(e){return{behaviours:ac([_l.config({store:{mode:"manual",getValue:function(t){return e.data},setValue:function(){}}})])}}})])),hm=(Sc=[on("uid"),on("data"),on("components"),on("dom"),ln("autofocus",!1),ln("ignoreFocus",!1),Ml.field("widgetBehaviours",[_l,am,nm]),ln("domModification",{}),nf(gm()),Bu("builder",(function(e){function t(t){return Ql(t,e,"widget").map((function(e){return nm.focusIn(e),e}))}function n(t,n){return cf(n.event().target())||e.autofocus&&n.setSource(t.element()),ye.none()}var r=Jl(gd(),e,gm());r=Zl(gd(),e,r.internals());return{dom:e.dom,components:r,domModification:e.domModification,events:Go([ti((function(e,n){t(e).each((function(e){n.stop()}))})),Xo(dr(),dd),Xo(Or(),(function(n,r){e.autofocus?t(n):am.focus(n)}))]),behaviours:Ml.augment(e.widgetBehaviours,[_l.config({store:{mode:"memory",initialValue:e.data}}),am.config({ignore:e.ignoreFocus,onFocus:function(e){md(e)}}),nm.config({mode:"special",focusIn:e.autofocus?function(e){t(e)}:sc(),onLeft:n,onRight:n,onEscape:function(t,n){return am.isFocused(t)||e.autofocus?(e.autofocus&&n.setSource(t.element()),ye.none()):(am.focus(t),ye.some(!0))}})])}}))],U("type",{widget:Sc,item:tm,separator:Xd})),pm=(Wl=o([lc({factory:{sketch:function(e){return e=Yt("menu.spec item",hm,e),e.builder(e)}},name:"items",unit:"item",defaults:function(e,t){return t.hasOwnProperty("uid")?t:d(d({},t),{uid:Ri("item")})},overrides:function(e,t){return{type:t.type,ignoreFocus:e.fakeFocus,domModification:{classes:[e.markers.item]}}}})]),qd=o([on("value"),on("items"),on("dom"),on("components"),ln("eventOrder",{}),gs("menuBehaviours",[Nd,_l,Od,nm]),fn("movement",{mode:"menu",moveOnTab:!0},U("mode",{grid:[Yn(),Bu("config",(function(e,t){return{mode:"flatgrid",selector:"."+e.markers.item,initSize:{numColumns:t.initSize.numColumns,numRows:t.initSize.numRows},focusManager:e.focusManager}}))],matrix:[Bu("config",(function(e,t){return{mode:"matrix",selectors:{row:t.rowSelector,cell:"."+e.markers.item},focusManager:e.focusManager}})),on("rowSelector")],menu:[ln("moveOnTab",!0),Bu("config",(function(e,t){return{mode:"menu",selector:"."+e.markers.item,moveOnTab:t.moveOnTab,focusManager:e.focusManager}}))]})),an("markers",qn()),ln("fakeFocus",!1),ln("focusManager",Pd()),ka("onHighlight")]),o("alloy.menu-focus")),vm=uf({name:"Menu",configFields:qd(),partFields:Wl(),factory:function(e,t,n,r){return{uid:e.uid,dom:e.dom,markers:e.markers,behaviours:Bl(e.menuBehaviours,[Nd.config({highlightClass:e.markers.selectedItem,itemClass:e.markers.item,onHighlight:e.onHighlight}),_l.config({store:{mode:"memory",initialValue:e.value}}),Od.config({find:ye.some}),nm.config(e.movement.config(e,e.movement))]),events:Go([Xo(mm(),(function(e,t){var n=t.event();e.getSystem().getByDom(n.target()).each((function(n){Nd.highlight(e,n),t.stop(),Xr(e,pm(),{menu:e,item:n})}))})),Xo(dm(),(function(e,t){t=t.event().item(),Nd.highlight(e,t)}))]),components:t,eventOrder:e.eventOrder,domModification:{attributes:{role:"menu"}}}}}),bm=function(e){return et(e,(function(e,t){return{k:e,v:t}}))},ym=function(e,t,n,r){return yt(n,r).bind((function(r){return yt(e,r).bind((function(r){var o=ym(e,t,n,r);return ye.some([r].concat(o))}))})).getOr([])},wm=function(){function e(e){return yt(t.get(),e)}var t=mn({}),n=mn({}),r=mn({}),o=mn(ye.none()),i=mn({}),a=function(e){return E(t.get(),(function(t,n){return t===e}))},u=function(e){return c(e).bind(hd)},c=function(e){return yt(n.get(),e)};return{setMenuBuilt:function(e,t){var r;n.set(d(d({},n.get()),((r={})[e]={type:"prepared",menu:t},r)))},setContents:function(e,a,u,c){o.set(ye.some(e)),t.set(u),n.set(a),i.set(c),e=u,s={},Ze(c,(function(e,t){Pe(e,(function(e){s[e]=t}))})),f=bm(l=e),d=Qe(f,(function(e,t){return[t].concat(ym(s,l,f,t))}));var s,l,f,d;a=Qe(s,(function(e){return yt(d,e).getOr([e])}));r.set(a)},expand:function(e){return yt(t.get(),e).map((function(t){var n=yt(r.get(),e).getOr([]);return[t].concat(n)}))},refresh:function(e){return yt(r.get(),e)},collapse:function(e){return yt(r.get(),e).bind((function(e){return 1<e.length?ye.some(e.slice(1)):ye.none()}))},lookupMenu:c,lookupItem:e,otherMenus:function(e){var t=i.get();return $e(Ke(t),e)},getPrimary:function(){return o.get().bind(u)},getMenus:function(){return n.get()},clear:function(){t.set({}),n.set({}),r.set({}),o.set(ye.none())},isClear:function(){return o.get().isNone()},getTriggeringPath:function(t,n){var i=Ie(e(t).toArray(),(function(e){return u(e).isSome()}));return yt(r.get(),t).bind((function(e){for(var t=qe(i.concat(e)),r=je(t,(function(e,r){return i=e,c=n,s=t.slice(0,r+1),u(i).bind((function(e){return a(i).bind((function(t){return c(t).map((function(t){return{triggeredMenu:e,triggeringItem:t,triggeringPath:s}}))}))})).fold((function(){return o.get().is(e)?[]:[ye.none()]}),(function(e){return[ye.some(e)]}));var i,c,s})),c=[],s=0;s<r.length;s++){var l=r[s];if(!l.isSome())return ye.none();c.push(l.getOrDie())}return ye.some(c)}))}}},xm=hd,Cm=o("collapse-item"),Sm=af({name:"TieredMenu",configFields:[Oa("onExecute"),Oa("onEscape"),Ea("onOpenMenu"),Ea("onOpenSubmenu"),Ea("onRepositionMenu"),ka("onCollapseMenu"),ln("highlightImmediately",!0),Y("data",[on("primary"),on("menus"),on("expansions")]),ln("fakeFocus",!1),ka("onHighlight"),ka("onHover"),xa(),on("dom"),ln("navigateOnHover",!0),ln("stayInDom",!1),gs("tmenuBehaviours",[nm,Nd,Od,rm]),ln("eventOrder",{})],apis:{collapseMenu:function(e,t){e.collapseMenu(t)},highlightPrimary:function(e,t){e.highlightPrimary(t)},repositionMenus:function(e,t){e.repositionMenus(t)}},factory:function(e,t){function n(t){n=t,r=e.data.primary,t=e.data.menus;t=Qe(t,(function(t,o){function i(){return vm.sketch(d(d({dom:t.dom},t),{value:o,items:t.items,markers:e.markers,fakeFocus:e.fakeFocus,onHighlight:e.onHighlight,focusManager:(e.fakeFocus?zd:Pd)()}))}return o===r?{type:"prepared",menu:n.getSystem().build(i())}:{type:"notbuilt",nbMenu:i}}));var n,r,o=Qe(e.data.menus,(function(e,t){return je(e.items,(function(e){return"separator"===e.type?[]:[e.data.value]}))}));return f.setContents(e.data.primary,t,e.data.expansions,o),f.getPrimary()}function r(e,t){e=v(e),Ze(e,(function(e,n){n=Re(t,n),wi(e.element(),"aria-expanded",n)}))}function o(t,n,r){return ye.from(r[0]).bind((function(o){return n.lookupMenu(o).bind((function(o){var i;return"notbuilt"===o.type?ye.none():(o=o.menu,i=h(n,r.slice(1)),Pe(i,(function(t){Yi(t.element(),e.markers.backgroundMenu)})),Vo(o.element())||rm.append(t,va(o)),ea(o.element(),[e.markers.backgroundMenu]),g(t,o),p(t,n,r),ye.some(o))}))}))}function i(t,n,i){void 0===i&&(i=s.HighlightSubmenu);var a=m(n);return f.expand(a).bind((function(a){return r(t,a),ye.from(a[0]).bind((function(r){return f.lookupMenu(r).bind((function(u){c=t,l=r;var c,l="notbuilt"===(u=u).type?(c=c.getSystem().build(u.nbMenu()),f.setMenuBuilt(l,c),c):u.menu;return Vo(l.element())||rm.append(t,va(l)),e.onOpenSubmenu(t,n,l,qe(a)),i===s.HighlightSubmenu?(Nd.highlightFirst(l),o(t,f,a)):(Nd.dehighlightAll(l),ye.some(n))}))}))}))}function a(t,n){var i=m(n);return f.collapse(i).bind((function(i){return r(t,i),o(t,f,i).map((function(r){return e.onCollapseMenu(t,n,r),r}))}))}function u(t){return function(n,r){return bu(r.getSource(),"."+e.markers.item).bind((function(e){return n.getSystem().getByDom(e).toOption().bind((function(e){return t(n,e).map((function(){return!0}))}))}))}}function c(e){return Nd.getHighlighted(e).bind(Nd.getHighlighted)}var s,l=mn(ye.none()),f=wm(),m=function(e){return _l.getValue(e).value},g=function(e,t){Nd.highlight(e,t),Nd.getHighlighted(t).orThunk((function(){return Nd.getFirst(t)})).each((function(t){Kr(e,t.element(),Or())}))},h=function(e,t){return Cu(Me(t,(function(t){return e.lookupMenu(t).bind((function(e){return"prepared"===e.type?ye.some(e.menu):ye.none()}))})))},p=function(t,n,r){n=h(n,n.otherMenus(r)),Pe(n,(function(n){ea(n.element(),[e.markers.backgroundMenu]),e.stayInDom||rm.remove(t,n)}))},v=function(t){return l.get().getOrThunk((function(){var n={},r=_s(t.element(),"."+e.markers.item);r=Ie(r,(function(e){return"true"===xi(e,"aria-haspopup")}));return Pe(r,(function(e){t.getSystem().getByDom(e).each((function(e){var t=m(e);n[t]=e}))})),l.set(ye.some(n)),n}))},b=((b=s=s||{})[b.HighlightSubmenu=0]="HighlightSubmenu",b[b.HighlightParent=1]="HighlightParent",Go([Xo(pm(),(function(e,t){var n=t.event().item();f.lookupItem(m(n)).each((function(){var n=t.event().menu();Nd.highlight(e,n),n=m(t.event().item());f.refresh(n).each((function(t){return p(e,f,t)}))}))})),ti((function(t,n){n=n.event().target(),t.getSystem().getByDom(n).each((function(n){0===m(n).indexOf("collapse-item")&&a(t,n),i(t,n,s.HighlightSubmenu).fold((function(){e.onExecute(t,n)}),(function(){}))}))})),Zo((function(t,r){n(t).each((function(n){rm.append(t,va(n)),e.onOpenMenu(t,n),e.highlightImmediately&&g(t,n)}))}))].concat(e.navigateOnHover?[Xo(dm(),(function(t,n){n=n.event().item();var a=t,u=n;u=m(n),f.refresh(u).bind((function(e){return r(a,e),o(a,f,e)})),i(t,n,s.HighlightParent),e.onHover(t,n)}))]:[]))),y={collapseMenu:function(e){c(e).each((function(t){a(e,t)}))},highlightPrimary:function(e){f.getPrimary().each((function(t){g(e,t)}))},repositionMenus:function(t){f.getPrimary().bind((function(e){return c(t).bind((function(e){e=m(e);var t=nt(f.getMenus()),n=Cu(Me(t,xm));return f.getTriggeringPath(e,(function(e){return t=e,Su(n,(function(e){return e.getSystem().isConnected()?(e=Nd.getCandidates(e),He(e,(function(e){return m(e)===t}))):ye.none()}));var t}))})).map((function(t){return{primary:e,triggeringPath:t}}))})).fold((function(){ye.from(t.components()[0]).filter((function(e){return"menu"===xi(e.element(),"role")})).each((function(n){e.onRepositionMenu(t,n,[])}))}),(function(n){var r=n.primary;n=n.triggeringPath;e.onRepositionMenu(t,r,n)}))}};return{uid:e.uid,dom:e.dom,markers:e.markers,behaviours:Bl(e.tmenuBehaviours,[nm.config({mode:"special",onRight:u((function(e,t){return cf(t.element())?ye.none():i(e,t,s.HighlightSubmenu)})),onLeft:u((function(e,t){return cf(t.element())?ye.none():a(e,t)})),onEscape:u((function(t,n){return a(t,n).orThunk((function(){return e.onEscape(t,n).map((function(){return t}))}))})),focusIn:function(e,t){f.getPrimary().each((function(t){Kr(e,t.element(),Or())}))}}),Nd.config({highlightClass:e.markers.selectedMenu,itemClass:e.markers.menu}),Od.config({find:function(e){return Nd.getHighlighted(e)}}),rm.config({})]),eventOrder:e.eventOrder,apis:y,events:b}},extraApis:{tieredData:function(e,t,n){return{primary:e,menus:t,expansions:n}},singleData:function(e,t){return{primary:e,menus:wt(e,t),expansions:{}}},collapseItem:function(e){return{value:Oi(Cm()),meta:{text:e}}}}}),km=af({name:"InlineView",configFields:[on("lazySink"),ka("onShow"),ka("onHide"),te("onEscape"),gs("inlineBehaviours",[Sl,_l,fc]),cn("fireDismissalEventInstead",[ln("event",Hr())]),cn("fireRepositionEventInstead",[ln("event",Wn())]),ln("getRelated",ye.none),ln("eventOrder",ye.none)],factory:function(e,t){function n(e,t,n,r){a(e,t,n,(function(){return r.map((function(e){return du(e)}))}))}function r(t,n,r,o){n=pd(e,t,n,r,o),Sl.open(t,n),_l.setValue(t,ye.some({mode:"menu",menu:n}))}function i(t){Sl.isOpen(t)&&_l.getValue(t).each((function(n){switch(n.mode){case"menu":Sl.getState(t).each((function(e){Sm.repositionMenus(e)}));break;case"position":var r=e.lazySink(t).getOrDie();dl.positionWithinBounds(r,n.anchor,t,n.getBounds())}}))}var a=function(t,n,r,o){var i=e.lazySink(t).getOrDie();Sl.openWhileCloaked(t,r,(function(){return dl.positionWithinBounds(i,n,t,o())})),_l.setValue(t,ye.some({mode:"position",anchor:n,getBounds:o}))},u={setContent:function(e,t){Sl.setContent(e,t)},showAt:function(e,t,r){n(e,t,r,ye.none())},showWithin:n,showWithinBounds:a,showMenuAt:function(e,t,n){r(e,t,n,(function(){return ye.none()}))},showMenuWithinBounds:r,hide:function(e){_l.setValue(e,ye.none()),Sl.close(e)},getContent:function(e){return Sl.getState(e)},reposition:i,isOpen:Sl.isOpen};return{uid:e.uid,dom:e.dom,behaviours:Bl(e.inlineBehaviours,[Sl.config({isPartOf:function(t,n,r){return xu(n,r)||(o=r,e.getRelated(t).exists((function(e){return xu(e,o)})));var o},getAttachPoint:function(t){return e.lazySink(t).getOrDie()},onOpen:function(t){e.onShow(t)},onClose:function(t){e.onHide(t)}}),_l.config({store:{mode:"memory",initialValue:ye.none()}}),fc.config({channels:d(d({},Nl(d({isExtraPart:o(!1)},e.fireDismissalEventInstead.map((function(e){return{fireEventInstead:{event:e.event}}})).getOr({})))),Dl(d(d({isExtraPart:o(!1)},e.fireRepositionEventInstead.map((function(e){return{fireEventInstead:{event:e.event}}})).getOr({})),{doReposition:i})))})]),eventOrder:e.eventOrder,apis:u}},apis:{showAt:function(e,t,n,r){e.showAt(t,n,r)},showWithin:function(e,t,n,r,o){e.showWithin(t,n,r,o)},showWithinBounds:function(e,t,n,r,o){e.showWithinBounds(t,n,r,o)},showMenuAt:function(e,t,n,r){e.showMenuAt(t,n,r)},showMenuWithinBounds:function(e,t,n,r,o){e.showMenuWithinBounds(t,n,r,o)},hide:function(e,t){e.hide(t)},isOpen:function(e,t){return e.isOpen(t)},getContent:function(e,t){return e.getContent(t)},setContent:function(e,t,n){e.setContent(t,n)},reposition:function(e,t){e.reposition(t)}}}),Tm=function(e,t,n){return Mu(e.x(),e.y(),n.innerNortheast(),Lu(),"layout-ne")},Em=function(e,t,n){return Mu(bd(e,t),e.y(),n.innerNorthwest(),Fu(),"layout-nw")},Om=function(e,t,n){return Mu(vd(e,t),e.y(),n.innerNorth(),Vu(),"layout-n")},Nm=function(e,t,n){return Mu(vd(e,t),yd(e,t),n.innerSouth(),Hu(),"layout-s")},Am=af({name:"Button",factory:function(e){function t(t){return yt(e.dom,"attributes").bind((function(e){return yt(e,t)}))}var n=Cd(e.action),r=e.dom.tag;return{uid:e.uid,dom:e.dom,components:e.components,events:n,behaviours:Ml.augment(e.buttonBehaviours,[am.config({}),nm.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:"button"===r?(n=t("type").getOr("button"),r=t("role").map((function(e){return{role:e}})).getOr({}),d({type:n},r)):{role:t("role").getOr("button")}},eventOrder:e.eventOrder}},configFields:[ln("uid",void 0),on("dom"),ln("components",[]),Ml.field("buttonBehaviours",[am,nm]),Z("action"),Z("role"),ln("eventOrder",{})]}),Dm=function(e){var t=void 0!==e.uid&&St(e,"uid")?e.uid:Ri("memento");return{get:function(e){return e.getSystem().getByUid(t).getOrDie()},getOpt:function(e){return e.getSystem().getByUid(t).toOption()},asSpec:function(){return d(d({},e),{uid:t})}}},_m=function(e){return ye.from(e()["temporary-placeholder"]).getOr("!not found!")},Rm=function(e,t){return ye.from(t()[e]).getOrThunk((function(){return _m(t)}))},Bm=function(e,t,n){return ye.from(t()[e]).or(n).getOrThunk((function(){return _m(t)}))},Mm={success:"checkmark",error:"warning",err:"error",warning:"warning",warn:"warning",info:"info"},Pm=af({name:"Notification",factory:function(e){function t(e){return{dom:{tag:"div",classes:["tox-bar"],attributes:{style:"width: "+e+"%"}}}}function n(e){return{dom:{tag:"div",classes:["tox-text"],innerHtml:e+"%"}}}var r,o=Dm({dom:{tag:"p",innerHtml:e.translationProvider(e.text)},behaviours:ac([rm.config({})])}),i=Dm({dom:{tag:"div",classes:e.progress?["tox-progress-bar","tox-progress-indicator"]:["tox-progress-bar"]},components:[{dom:{tag:"div",classes:["tox-bar-container"]},components:[t(0)]},n(0)],behaviours:ac([rm.config({})])}),a={updateProgress:function(e,r){e.getSystem().isConnected()&&i.getOpt(e).each((function(e){rm.set(e,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[t(r)]},n(r)])}))},updateText:function(e,t){e.getSystem().isConnected()&&(e=o.get(e),rm.set(e,[ma(t)]))}},u=Ue([e.icon.toArray(),e.level.toArray(),e.level.bind((function(e){return ye.from(Mm[e])})).toArray()]);return{uid:e.uid,dom:{tag:"div",attributes:{role:"alert"},classes:e.level.map((function(e){return["tox-notification","tox-notification--in","tox-notification--"+e]})).getOr(["tox-notification","tox-notification--in"])},components:[{dom:{tag:"div",classes:["tox-notification__icon"],innerHtml:(r=e.iconProvider,Su(u,(function(e){return ye.from(r()[e])})).getOrThunk((function(){return _m(r)})))}},{dom:{tag:"div",classes:["tox-notification__body"]},components:[o.asSpec()],behaviours:ac([rm.config({})])}].concat(e.progress?[i.asSpec()]:[]).concat(Am.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"]},components:[{dom:{tag:"div",classes:["tox-icon"],innerHtml:Rm("close",e.iconProvider),attributes:{"aria-label":e.translationProvider("Close")}}}],action:function(t){e.onAction(t)}})),apis:a}},configFields:[Z("level"),on("progress"),on("icon"),on("onAction"),on("text"),on("iconProvider"),on("translationProvider")],apis:{updateProgress:function(e,t,n){e.updateProgress(t,n)},updateText:function(e,t,n){e.updateText(t,n)}}}),zm=tinymce.util.Tools.resolve("tinymce.util.Delay");function Im(e,t,n){var r=t.backstage;return{open:function(e,o){function i(){o(),km.hide(u)}var a=pa(Pm.sketch({text:e.text,level:Re(["success","error","warning","warn","info"],e.type)?e.type:void 0,progress:!0===e.progressBar,icon:ye.from(e.icon),onAction:i,iconProvider:r.shared.providers.icons,translationProvider:r.shared.providers.translate})),u=pa(km.sketch({dom:{tag:"div",classes:["tox-notifications-container"]},lazySink:t.backstage.shared.getSink,fireDismissalEventInstead:{}}));return n.add(u),0<e.timeout&&zm.setTimeout((function(){i()}),e.timeout),{close:i,moveTo:function(e,t){km.showAt(u,{anchor:"makeshift",x:e,y:t},va(a))},moveRel:function(e,n){var r;"banner"!==n?(r=function(e){switch(e){case"bc-bc":return Nm;case"tc-tc":return Om;case"tc-bc":return Qu;default:return ec}}(n),n={anchor:"node",root:Uo(),node:ye.some(gn.fromDom(e)),layouts:{onRtl:function(){return[r]},onLtr:function(){return[r]}}},km.showAt(u,n,va(a))):km.showAt(u,t.backstage.shared.anchors.banner(),va(a))},text:function(e){Pm.updateText(a,e)},settings:e,getEl:function(){return a.element().dom()},progressBar:{value:function(e){Pm.updateProgress(a,e)}}}},close:function(e){e.close()},reposition:function(e){var t;Pe(e,(function(e){return e.moveTo(0,0)})),0<(t=e).length&&(Ge(t).each((function(e){return e.moveRel(null,"banner")})),Pe(t,(function(e,n){0<n&&e.moveRel(t[n-1].getEl(),"bc-tc")})))},getArgs:function(e){return e.settings}}}function Lm(e,n){var r=null;return{cancel:function(){null!==r&&(t.clearTimeout(r),r=null)},throttle:function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];null!==r&&t.clearTimeout(r),r=t.setTimeout((function(){e.apply(null,o),r=null}),n)}}}function Fm(e,n,r,o,i,a){function u(){return a.fold(lg.aborted,lg.edge)}function c(){var t=i();return t?Fm(e,t,ye.none(),o,i,ye.some(n)):u()}var s,l;return l=n,(s=e).isBlock(l)||Re(["BR","IMG","HR","INPUT"],l.nodeName)||"false"===s.getContentEditable(l)?u():n.nodeType!==t.Node.TEXT_NODE?c():(s=n.textContent,o(fg,n,s,r).fold(lg.aborted,c,lg.success))}function Hm(e,t,n,r,o){return o=new sg(t,o||e.getRoot()),Fm(e,t,ye.some(n),r,o.prev,ye.none())}function Vm(e,t,n,r){return void 0===r&&(r=0),mg(gn.fromDom(t.startContainer)).fold((function(){return pg(e,t,n,r)}),(function(t){var r=e.createRng();return r.selectNode(t.dom()),ye.some({range:r,text:hg(r,n),triggerChar:n})}))}function Um(e,t){return{element:e,offset:t}}function jm(e){var n;return e.nodeType===t.Node.TEXT_NODE?Um(e,e.data.length):0<(n=e.childNodes).length?jm(n[n.length-1]):Um(e,n.length)}function Wm(e,n){var r=e.childNodes;return 0<r.length&&n<r.length?Wm(r[n],0):0<r.length&&e.nodeType===t.Node.ELEMENT_NODE&&r.length===n?jm(r[r.length-1]):Um(e,n)}function qm(e,t){return ac([im(e,t)])}function $m(e,t,n){e.getSystem().broadcastOn([zg],{})}function Gm(e){e=gn.fromHtml(e);var t=ui(e),n=function(e){return e=void 0!==e.dom().attributes?e.dom().attributes:[],Fe(e,(function(e,t){return"class"===t.name?e:d(d({},e),((e={})[t.name]=t.value,e))}),{})}(e),r=Array.prototype.slice.call(e.dom().classList,0);t=0===t.length?{}:{innerHtml:go(e)};return d({tag:Lo(e),classes:r,attributes:n},t)}function Xm(e){return{dom:{tag:"div",classes:[$g],innerHtml:e}}}function Ym(e){return{dom:{tag:"div",classes:["tox-collection__item-accessory"],innerHtml:Qg(e)}}}function Km(e){return{dom:{tag:"div",classes:[$g,Yg],innerHtml:Rm("checkmark",e)}}}function Jm(e,t,n,r){void 0===r&&(r=ye.none());var o=Hg.isRtl()&&e.iconContent.exists((function(e){return Re(ih,e)})),i=e.iconContent.map((function(e){return Hg.isRtl()&&Re(oh,e)?e+"-rtl":e})).map((function(e){return Bm(e,t.icons,r)})),u=ye.from(e.meta).fold((function(){return eh}),(function(e){return ot(e,"style")?a(th,e.style):eh}));return"color"===e.presets?nh(e.ariaLabel,e.value,i,t):rh(e,i,n,u,o)}function Zm(e,t,n){t.disabled&&og(e,t)}function Qm(e,t){return!0===t.useNative&&Re(ah,Lo(e.element()))}function eg(e){wi(e.element(),"disabled","disabled")}function tg(e){Si(e.element(),"disabled")}function ng(e){wi(e.element(),"aria-disabled","true")}function rg(e){wi(e.element(),"aria-disabled","false")}function og(e,t,n){t.disableClass.each((function(t){Yi(e.element(),t)})),(Qm(e,t)?eg:ng)(e),t.onDisabled(e)}function ig(e,t,n){t.disableClass.each((function(t){Ji(e.element(),t)})),(Qm(e,t)?tg:rg)(e),t.onEnabled(e)}function ag(e,t){return Qm(e,t)?Ci(e.element(),"disabled"):"true"===xi(e.element(),"aria-disabled")}function ug(e,t,r){var o=mn(n);return{type:"item",dom:t.dom,components:hh(t.optComponents),data:e.data,eventOrder:gh,hasSubmenu:e.triggersSubmenu,itemBehaviours:ac([im("item-events",[mh(e,r),lh(e,o),fh(e,o)]),ch.item(e.disabled),rm.config({})].concat(e.itemBehaviours))}}function cg(e){return{value:e.value,meta:ct({text:e.text.getOr("")},e.meta)}}var sg=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),lg=it([{aborted:[]},{edge:["element"]},{success:["info"]}]),fg=it([{abort:[]},{kontinue:[]},{finish:["info"]}]),dg="[data-mce-autocompleter]",mg=function(e){return bu(e,dg)},gg=/[\u00a0 \t\r\n]/,hg=function(e,t){return e.toString().substring(t.length).replace(/\u00A0/g," ").replace(/\uFEFF/g,"")},pg=function(e,t,n,r){return void 0===r&&(r=0),(o=t).collapsed&&3===o.startContainer.nodeType?Hm(e,t.startContainer,t.startOffset,(function(e,o,i,a){var u=a.getOr(i.length);return function(e,t,n,r){for(var o=t-1;0<=o;o--){var i=e.charAt(o);if(gg.test(i))return ye.none();if(i===n)break}return-1===o||t-o<r?ye.none():ye.some(e.substring(o+1,t))}(i,u,n,1).fold((function(){return i.match(gg)?e.abort():e.kontinue()}),(function(a){var c=t.cloneRange();return c.setStart(o,u-a.length-1),c.setEnd(t.endContainer,t.endOffset),i.length<r?e.abort():e.finish({text:hg(c,n),range:c,triggerChar:n})}))})).fold(ye.none,ye.none,ye.some):ye.none();var o},vg=function(e,t){function n(e,t){Xr(e,hr(),{raw:t})}t.on("keypress compositionend",e.onKeypress.throttle),t.on("remove",e.onKeypress.cancel),t.on("keydown",(function(t){function r(){return e.getView().bind(Nd.getHighlighted)}8===t.which&&e.onKeypress.throttle(t),e.isActive()&&(27===t.which&&e.cancelIfNecessary(),e.isMenuOpen()?13===t.which?(r().each(Yr),t.preventDefault()):40===t.which?(r().fold((function(){e.getView().each(Nd.highlightFirst)}),(function(e){n(e,t)})),t.preventDefault(),t.stopImmediatePropagation()):37!==t.which&&38!==t.which&&39!==t.which||r().each((function(e){n(e,t),t.preventDefault(),t.stopImmediatePropagation()})):13!==t.which&&38!==t.which&&40!==t.which||e.cancelIfNecessary())})),t.on("NodeChange",(function(t){e.isActive()&&!e.isProcessingAction()&&mg(gn.fromDom(t.element)).isNone()&&e.cancelIfNecessary()}))},bg=tinymce.util.Tools.resolve("tinymce.util.Promise"),yg=function(e){function t(e,t,n,r){return 0===(r=r.getOr(n.length))?e.kontinue():e.finish(/\s/.test(n.charAt(r-1)))}return function(n){return n=Wm(n.startContainer,n.startOffset),Hm(e,n.element,n.offset,t).fold(o(!0),o(!0),i)}},wg=function(e,t,n){return Su(n.triggerChars,(function(n){return Vm(e,t,n)}))},xg=function(e,t,n,r){void 0===r&&(r={});t=t();var o=e.selection.getRng().startContainer.nodeValue;t=Ie(t.lookupByChar(n.triggerChar),(function(t){return n.text.length>=t.minChars&&t.matches.getOrThunk((function(){return yg(e.dom)}))(n.range,o,n.text)}));return 0===t.length?ye.none():(t=bg.all(Me(t,(function(e){return e.fetch(n.text,e.maxResults,r).then((function(t){return{matchText:n.text,items:t,columns:e.columns,onAction:e.onAction}}))}))),ye.some({lookupData:t,context:n}))},Cg=zt([$("type"),ee("text")]),Sg=zt([dn("type",(function(){return"autocompleteitem"})),dn("active",(function(){return!1})),dn("disabled",(function(){return!1})),ln("meta",{}),$("value"),ee("text"),ee("icon")]),kg=zt([$("type"),$("ch"),ne("minChars",1),ln("columns",1),ne("maxResults",10),te("matches"),X("fetch"),X("onAction")]),Tg=function(e){return Gt("Autocompleter.Separator",Cg,e)},Eg=function(e){return Gt("Autocompleter.Item",Sg,e)},Og=function(e){return Gt("Autocompleter",kg,e)},Ng=function(e){var t={};return Pe(e,(function(e){t[e]={}})),Ke(t)},Ag=(Gd=[ie("disabled",!1),ee("text"),ee("shortcut"),Vt("value","value",dt((function(){return Oi("menuitem-value")})),Zt()),ln("meta",{})],zt([$("type"),ae("onSetup",(function(){return n})),ae("onAction",n),ee("icon")].concat(Gd))),Dg=zt([$("type"),X("getSubmenuItems"),ae("onSetup",(function(){return n})),ee("icon")].concat(Gd)),_g=zt([$("type"),ie("active",!1),ae("onSetup",(function(){return n})),X("onAction")].concat(Gd)),Rg=zt([$("type"),ie("active",!1),ee("icon")].concat(Gd)),Bg=zt([$("type"),G("fancytype",["inserttable","colorswatch"]),ae("onAction",n)]),Mg=function(e,t,n){var r=_s(e.element(),"."+n);return 0<r.length?(e=Ve(r,(function(e){e=e.dom().getBoundingClientRect().top;var n=r[0].dom().getBoundingClientRect().top;return Math.abs(e-n)>t})).getOr(r.length),ye.some({numColumns:e,numRows:Math.ceil(r.length/e)})):ye.none()},Pg={namedEvents:qm,unnamedEvents:function(e){return qm(Oi("unnamed-events"),e)}},zg=(ql=[on("lazySink"),on("tooltipDom"),ln("exclusive",!0),ln("tooltipComponents",[]),ln("delay",300),oe("mode","normal",["normal","follow-highlight"]),ln("anchor",(function(e){return{anchor:"hotspot",hotspot:e,layouts:{onLtr:o([ec,Qu,Yu,Ju,Ku,Zu]),onRtl:o([ec,Qu,Yu,Ju,Ku,Zu])}}})),ka("onHide"),ka("onShow")],$d=Object.freeze({init:function(){function e(){n.get().each((function(e){t.clearTimeout(e)}))}var n=mn(ye.none()),r=mn(ye.none()),i=o("not-implemented");return Hi({getTooltip:function(){return r.get()},isShowing:function(){return r.get().isSome()},setTooltip:function(e){r.set(ye.some(e))},clearTooltip:function(){r.set(ye.none())},clearTimer:e,resetTimer:function(r,o){e(),n.set(ye.some(t.setTimeout((function(){r()}),o)))},readState:i})}}),Oi("tooltip.exclusive")),Ig=Oi("tooltip.show"),Lg=Oi("tooltip.hide"),Fg=Ba({fields:ql,name:"tooltipping",active:Object.freeze({events:function(e,t){function n(n){t.getTooltip().each((function(r){wl(r),e.onHide(n,r),t.clearTooltip()})),t.clearTimer()}return Go(Ue([[Xo(Ig,(function(n){t.resetTimer((function(){var r,o,i;r=n,t.isShowing()||($m(r),o=e.lazySink(r).getOrDie(),i=r.getSystem().build({dom:e.tooltipDom,components:e.tooltipComponents,events:Go("normal"===e.mode?[Xo(dr(),(function(e){Gr(r,Ig)})),Xo(lr(),(function(e){Gr(r,Lg)}))]:[]),behaviours:ac([rm.config({})])}),t.setTooltip(i),vl(o,i),e.onShow(r,i),dl.position(o,e.anchor(r),i))}),e.delay)})),Xo(Lg,(function(r){t.resetTimer((function(){n(r)}),e.delay)})),Xo(Tr(),(function(e,t){Re(t.channels(),zg)&&n(e)})),Qo((function(e){n(e)}))],"normal"===e.mode?[Xo(mr(),(function(e){Gr(e,Ig)})),Xo(Sr(),(function(e){Gr(e,Lg)})),Xo(dr(),(function(e){Gr(e,Ig)})),Xo(lr(),(function(e){Gr(e,Lg)}))]:[Xo(qr(),(function(e,t){Gr(e,Ig)})),Xo($r(),(function(e){Gr(e,Lg)}))]]))}}),state:$d,apis:Object.freeze({hideAllExclusive:$m,setComponents:function(e,t,n,r){n.getTooltip().each((function(e){e.getSystem().isConnected()&&rm.set(e,r)}))}})}),Hg=tinymce.util.Tools.resolve("tinymce.util.I18n"),Vg="tox-menu-nav__js",Ug="tox-collection__item",jg="tox-swatch",Wg={normal:Vg,color:jg},qg="tox-collection__item--enabled",$g="tox-collection__item-icon",Gg="tox-collection__item-label",Xg="tox-collection__item-caret",Yg="tox-collection__item-checkmark",Kg="tox-collection__item--active",Jg=function(e){return yt(Wg,e).getOr(Vg)},Zg=tinymce.util.Tools.resolve("tinymce.Env"),Qg=function(e){var t=Zg.mac?{alt:"⌥",ctrl:"⌃",shift:"⇧",meta:"⌘",access:"⌃⌥"}:{meta:"Ctrl",access:"Shift+Alt"};e=e.split("+"),e=Me(e,(function(e){var n=e.toLowerCase().trim();return ot(t,n)?t[n]:e}));return Zg.mac?e.join(""):e.join("+")},eh=function(e){return{dom:{tag:"div",classes:[Gg]},components:[ma(Hg.translate(e))]}},th=function(e,t){return{dom:{tag:"div",classes:[Gg]},components:[{dom:{tag:e.tag,attributes:{style:e.styleAttr}},components:[ma(Hg.translate(t))]}]}},nh=function(e,t,n,r){var o;return{dom:(o=jg,n=n.getOr(""),e=e.map((function(e){return' title="'+r.translate(e)+'"'})).getOr(""),Gm("custom"===t?'<button class="'+o+' tox-swatches__picker-btn"'+e+">"+n+"</button>":"remove"===t?'<div class="'+o+' tox-swatch--remove"'+e+">"+n+"</div>":'<div class="'+o+'" style="background-color: '+t+'" data-mce-color="'+t+'"'+e+"></div>")),optComponents:[]}},rh=function(e,t,n,r,o){n=n?e.checkMark.orThunk((function(){return t.or(ye.some("")).map(Xm)})):ye.none();var i=e.ariaLabel.map((function(e){return{attributes:{title:Hg.translate(e)}}})).getOr({});return{dom:ct({tag:"div",classes:[Vg,Ug].concat(o?["tox-collection__item-icon-rtl"]:[])},i),optComponents:[n,e.htmlContent.fold((function(){return e.textContent.map(r)}),(function(e){return ye.some({dom:{tag:"div",classes:[Gg],innerHtml:e}})})),e.shortcutContent.map(Ym),e.caret]}},oh=["list-num-default","list-num-lower-alpha","list-num-lower-greek","list-num-lower-roman","list-num-upper-alpha","list-num-upper-roman"],ih=["list-bull-circle","list-bull-default","list-bull-square"],ah=["input","button","textarea","select"],uh=(Pu=Object.freeze({enable:ig,disable:og,isDisabled:ag,onLoad:Zm,set:function(e,t,n,r){(r?og:ig)(e,t,n)}}),Ys=Object.freeze({exhibit:function(e,t,n){return So({classes:t.disabled?t.disableClass.map(T).getOr([]):[]})},events:function(e,t){return Go([no(Er(),(function(t,n){return ag(t,e)})),Da(e,t,Zm)])}}),jl=[ln("disabled",!1),ln("useNative",!0),Z("disableClass"),ka("onDisabled"),ka("onEnabled")],Ba({fields:jl,name:"disabling",active:Ys,apis:Pu})),ch={item:function(e){return uh.config({disabled:e,disableClass:"tox-collection__item--state-disabled"})},button:function(e){return uh.config({disabled:e})},splitButton:function(e){return uh.config({disabled:e,disableClass:"tox-tbtn--disabled"})},toolbarButton:function(e){return uh.config({disabled:e,disableClass:"tox-tbtn--disabled",useNative:!1})}},sh=function(e,t){var n=e.getApi(t);return function(e){e(n)}},lh=function(e,t){return Zo((function(n){sh(e,n)((function(n){n=e.onSetup(n),null!=n&&t.set(n)}))}))},fh=function(e,t){return Qo((function(n){return sh(e,n)(t.get())}))},dh=((em=oy=oy||{})[em.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",em[em.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX",oy),mh=function(e,t){return ti((function(n,r){sh(e,n)(e.onAction),e.triggersSubmenu||t!==dh.CLOSE_ON_EXECUTE||(Gr(n,_r()),r.stop())}))},gh={"alloy.execute":["disabling","alloy.base.behaviour","toggling","item-events"]},hh=function(e){return je(e,(function(e){return e.toArray()}))},ph=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),vh=function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")},bh=function(e){return ph.DOM.encode(e)},yh=o(ws(gd(),gm())),wh=Oi("cell-over"),xh=Oi("cell-execute"),Ch=function(e,t,n){function r(n){return Xr(n,xh,{row:e,col:t})}var o;return pa({dom:{tag:"div",attributes:((o={role:"button"})["aria-labelledby"]=n,o)},behaviours:ac([im("insert-table-picker-cell",[Xo(dr(),am.focus),Xo(Er(),r),Xo(Ar(),r)]),sm.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),am.config({onFocus:function(n){return Xr(n,wh,{row:e,col:t})}})])})};function Sh(e){return _h.test(e)||Rh.test(e)}function kh(e){var t=parseInt(e,10);return t.toString()===e&&0<=t&&t<=255}function Th(e){e=Bh(e);var t=parseInt(e[1],16),n=parseInt(e[2],16);e=parseInt(e[3],16);return Vh(t,n,e,1)}function Eh(e,t,n,r){return e=parseInt(e,10),t=parseInt(t,10),n=parseInt(n,10),r=parseFloat(r),Vh(e,t,n,r)}function Oh(e){return"rgba("+e.red()+","+e.green()+","+e.blue()+","+e.alpha()+")"}var Nh,Ah,Dh=function(e){return{value:o(e)}},_h=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Rh=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Bh=function(e){return e=function(e){return e=e.value().replace(_h,(function(e,t,n,r){return t+t+n+n+r+r})),{value:o(e)}}(e),e=Rh.exec(e.value()),null===e?["FFFFFF","FF","FF","FF"]:e},Mh=function(e){return e=e.toString(16),1===e.length?"0"+e:e},Ph=function(e){return e=Mh(e.red())+Mh(e.green())+Mh(e.blue()),Dh(e)},zh=Math.min,Ih=Math.max,Lh=Math.round,Fh=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,Hh=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,Vh=function(e,t,n,r){return{red:o(e),green:o(t),blue:o(n),alpha:o(r)}},Uh=function(e){var t,n,r,o=(e.hue()||0)%360,i=e.saturation()/100;e=e.value()/100,i=Ih(0,zh(i,1)),e=Ih(0,zh(e,1));if(0===i)return t=n=r=Lh(255*e),Vh(t,n,r,1);o/=60;var a=e*i,u=a*(1-Math.abs(o%2-1));i=e-a;switch(Math.floor(o)){case 0:t=a,n=u,r=0;break;case 1:t=u,n=a,r=0;break;case 2:t=0,n=a,r=u;break;case 3:t=0,n=u,r=a;break;case 4:t=u,n=0,r=a;break;case 5:t=a,n=0,r=u;break;default:t=n=r=0}return t=Lh(255*(t+i)),n=Lh(255*(n+i)),r=Lh(255*(r+i)),Vh(t,n,r,1)},jh=function(e){if("transparent"===e)return ye.some(Vh(0,0,0,0));var t=Fh.exec(e);return null!==t?ye.some(Eh(t[1],t[2],t[3],"1")):(t=Hh.exec(e),null!==t?ye.some(Eh(t[1],t[2],t[3],t[4])):ye.none())},Wh=o(Vh(255,0,0,1)),qh=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),$h="tinymce-custom-colors",Gh="choiceitem",Xh=[{type:Gh,text:"Light Green",value:"#BFEDD2"},{type:Gh,text:"Light Yellow",value:"#FBEEB8"},{type:Gh,text:"Light Red",value:"#F8CAC6"},{type:Gh,text:"Light Purple",value:"#ECCAFA"},{type:Gh,text:"Light Blue",value:"#C2E0F4"},{type:Gh,text:"Green",value:"#2DC26B"},{type:Gh,text:"Yellow",value:"#F1C40F"},{type:Gh,text:"Red",value:"#E03E2D"},{type:Gh,text:"Purple",value:"#B96AD9"},{type:Gh,text:"Blue",value:"#3598DB"},{type:Gh,text:"Dark Turquoise",value:"#169179"},{type:Gh,text:"Orange",value:"#E67E23"},{type:Gh,text:"Dark Red",value:"#BA372A"},{type:Gh,text:"Dark Purple",value:"#843FA1"},{type:Gh,text:"Dark Blue",value:"#236FA1"},{type:Gh,text:"Light Gray",value:"#ECF0F1"},{type:Gh,text:"Medium Gray",value:"#CED4D9"},{type:Gh,text:"Gray",value:"#95A5A6"},{type:Gh,text:"Dark Gray",value:"#7E8C8D"},{type:Gh,text:"Navy Blue",value:"#34495E"},{type:Gh,text:"Black",value:"#000000"},{type:Gh,text:"White",value:"#ffffff"}],Yh=(void 0===(Nh=10)&&(Nh=10),Wd=qh.getItem($h),Wd=xe(Wd)?JSON.parse(Wd):[],Ah=Nh-(Wd=Wd).length<0?Wd.slice(0,Nh):Wd,{add:function(e){(function(e,t){return e=_e(e,t),-1===e?ye.none():ye.some(e)})(Ah,e).each(Kh),Ah.unshift(e),Ah.length>Nh&&Ah.pop(),qh.setItem($h,JSON.stringify(Ah))},state:function(){return Ah.slice(0)}});function Kh(e){Ah.splice(e,1)}function Jh(e){for(var n=[],r=t.document.createElement("canvas"),o=(r.height=1,r.width=1,r.getContext("2d")),i=function(e,t){return t/=255,("0"+Math.round(e*t+255*(1-t)).toString(16)).slice(-2).toUpperCase()},a=0;a<e.length;a+=2)n.push({text:e[a+1],value:function(e){if(/^[0-9A-Fa-f]{6}$/.test(e))return"#"+e.toUpperCase();o.clearRect(0,0,r.width,r.height),o.fillStyle="#FFFFFF",o.fillStyle=e,o.fillRect(0,0,1,1);e=o.getImageData(0,0,1,1).data;var t=e[0],n=e[1],a=e[2];e=e[3];return"#"+i(t,e)+i(n,e)+i(a,e)}(e[a]),type:"choiceitem"});return n}function Zh(e){return e.getParam("color_map")}function Qh(e){return Math.max(5,Math.ceil(Math.sqrt(e)))}function ep(e,t){return e.concat(cp.getCurrentColors().concat((n={type:e="choiceitem",text:"Remove color",icon:"color-swatch-remove-color",value:"remove"},t?[n,{type:e,text:"Custom color",icon:"color-picker",value:"custom"}]:[n])));var n}function tp(e,t,n,r,o){e.ui.registry.addSplitButton(t,{tooltip:r,presets:"color",icon:"forecolor"===t?"text-color":"highlight-bg-color",select:function(t){return ye.from(lp(e,n)).bind((function(e){return jh(e).map((function(e){return e=Ph(e).value(),Vn(t.toLowerCase(),e)}))})).getOr(!1)},columns:mp(e),fetch:hp(cp.getColors(e),cp.hasCustomColors(e)),onAction:function(t){null!==o.get()&&gp(e,n,o.get(),(function(){}))},onItemAction:function(r,i){gp(e,n,i,(function(n){o.set(n),sp.fireTextColorChange(e,{name:t,color:n})}))},onSetup:function(n){function r(e){e.name===t&&pp(n,e.name,e.color)}return null!==o.get()&&pp(n,t,o.get()),e.on("TextColorChange",r),function(){e.off("TextColorChange",r)}}})}function np(e,t,r,o){e.ui.registry.addNestedMenuItem(t,{text:o,icon:"forecolor"===t?"text-color":"highlight-bg-color",getSubmenuItems:function(){return[{type:"fancymenuitem",fancytype:"colorswatch",onAction:function(t){gp(e,r,t.value,n)}}]}})}function rp(e){return function(t,n){function r(e){var t=e.getData();o(ye.from(t.colorpicker)),e.close()}var o;o=t,e.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:{colorpicker:n},onAction:function(e,t){"hex-valid"===t.name&&(t.value?e.enable("ok"):e.disable("ok"))},onSubmit:r,onClose:function(){},onCancel:function(){t(ye.none())}})}}function op(e,t){return function(n){return n=k(n,t),Me(n,(function(t){return{dom:e,components:t}}))}}function ip(e,t){var n=[],r=[];return Pe(e,(function(e,o){t(e,o)?(0<r.length&&n.push(r),r=[],ot(e.dom,"innerHtml")&&r.push(e)):r.push(e)})),0<r.length&&n.push(r),Me(n,(function(e){return{dom:{tag:"div",classes:["tox-collection__group"]},components:e}}))}function ap(e){return void 0!==e.icon||"togglemenuitem"===e.type||"choicemenuitem"===e.type}function up(e,t,n,r,o){i=n;var i,a={dom:{tag:"div",classes:["tox-collection","tox-collection--horizontal"]},components:[vm.parts().items({preprocess:function(e){return ip(e,(function(e,t){return"separator"===i[t].type}))}})]};return{value:e,dom:a.dom,components:a.components,items:n}}var cp={mapColors:Jh,getColorCols:function(e,t){return e.getParam("color_cols",t,"number")},hasCustomColors:function(e){return!1!==e.getParam("custom_colors")},getColorMap:Zh,getColors:function(e){return e=Zh(e),void 0!==e?Jh(e):Xh},getCurrentColors:function(){return Me(Yh.state(),(function(e){return{type:Gh,text:e,value:e}}))},addColor:function(e){Yh.add(e)}},sp={fireSkinLoaded:function(e){return e.fire("SkinLoaded")},fireResizeEditor:function(e){return e.fire("ResizeEditor")},fireScrollContent:function(e,t){return e.fire("ScrollContent",t)},fireBeforeRenderUI:function(e){return e.fire("BeforeRenderUI")},fireResizeContent:function(e,t){return e.fire("ResizeContent",t)},fireTextColorChange:function(e,t){return e.fire("TextColorChange",t)}},lp=function(e,t){var n;return e.dom.getParents(e.selection.getStart(),(function(e){(e=e.style["forecolor"===t?"color":"background-color"])&&(n=n||e)})),n},fp=function(e,t,n){e.undoManager.transact((function(){e.focus(),e.formatter.apply(t,{value:n}),e.nodeChanged()}))},dp=function(e,t){e.undoManager.transact((function(){e.focus(),e.formatter.remove(t,{value:null},null,!0),e.nodeChanged()}))},mp=function(e){var t=cp.getColors(e);t=Qh(t.length);return cp.getColorCols(e,t)},gp=function(e,t,n,r){"custom"===n?rp(e)((function(n){n.each((function(n){cp.addColor(n),e.execCommand("mceApplyTextcolor",t,n),r(n)}))}),"#000000"):"remove"===n?(r(""),e.execCommand("mceRemoveTextcolor",t)):(r(n),e.execCommand("mceApplyTextcolor",t,n))},hp=function(e,t){return function(n){n(ep(e,t))}},pp=function(e,t,n){t="forecolor"===t?"tox-icon-text-color__color":"tox-icon-highlight-bg-color__color",n=n,e.setIconFill(t,n),e.setIconStroke(t,n)},vp=function(e){(t=e).addCommand("mceApplyTextcolor",(function(e,n){fp(t,e,n)})),t.addCommand("mceRemoveTextcolor",(function(e){dp(t,e)}));var t,n=mn(null),r=mn(null);tp(e,"forecolor","forecolor","Text color",n),tp(e,"backcolor","hilitecolor","Background color",r),np(e,"forecolor","forecolor","Text color"),np(e,"backcolor","hilitecolor","Background color")},bp=ep,yp=hp,wp=rp,xp=mp,Cp=function(e){return{dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"]},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[vm.parts().items({preprocess:"auto"!==e?op({tag:"div",classes:["tox-swatches__row"]},e):i})]}]}},Sp=function(e){return{dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[vm.parts().items({preprocess:op({tag:"div",classes:["tox-collection__group"]},e)})]}},kp=function(e,t,n){return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===e?["tox-collection--list"]:["tox-collection--grid"])},components:[vm.parts().items({preprocess:function(n){return"auto"!==e&&1<e?op({tag:"div",classes:["tox-collection__group"]},e)(n):ip(n,(function(e,n){return"separator"===t[n].type}))}})]}},Tp=function(e){return{backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:"color"===e?"tox-swatches":"tox-menu",tieredMenu:"tox-tiered-menu"}},Ep=function(e){var t=Tp(e);return{backgroundMenu:t.backgroundMenu,selectedMenu:t.selectedMenu,menu:t.menu,selectedItem:t.selectedItem,item:Jg(e)}},Op=function(e,t,n){return n=Tp(n),{tag:"div",classes:Ue([[n.menu,"tox-menu-"+t+"-column"],e?[n.hasIcons]:[]])}},Np=[vm.parts().items({})],Ap=function(e,t,n){var r=Tp(n);return{dom:{tag:"div",classes:Ue([[r.tieredMenu]])},markers:Ep(n)}},Dp=function(e){return Be(e,ap)},_p=function(e){return t.console.error(Kt(e)),t.console.log(e),ye.none()},Rp=function(e,t,n,r,o){var i;return"color"===o?{value:e,dom:(i=Cp(r)).dom,components:i.components,items:n}:"normal"===o&&"auto"===r?{value:e,dom:(i=kp(r,n)).dom,components:i.components,items:n}:"normal"===o&&1===r?{value:e,dom:(i=kp(1,n)).dom,components:i.components,items:n}:"normal"===o?{value:e,dom:(i=kp(r,n)).dom,components:i.components,items:n}:"listpreview"===o&&"auto"!==r?{value:e,dom:(i=Sp(r)).dom,components:i.components,items:n}:{value:e,dom:Op(t,r,o),components:Np,items:n}},Bp=function(e,t,n,r,o,i,a,u){var c=Dp(t);t=Mp(t,n,r,"color"!==o?"normal":"color",i,a,u);return Rp(e,c,t,r,o)},Mp=function(e,t,n,r,o,i,a){return Cu(Me(e,(function(e){return"choiceitem"===e.type?Gt("choicemenuitem",Rg,e).fold(_p,(function(u){return ye.some(function(e,t,n,r,o,i,a){return n=Jm({presets:n,textContent:t?e.text:ye.none(),htmlContent:ye.none(),ariaLabel:e.text,iconContent:e.icon,shortcutContent:t?e.shortcut:ye.none(),checkMark:t?ye.some(Km(a.icons)):ye.none(),caret:ye.none(),value:e.value},a,!0),ut(ug({data:cg(e),disabled:e.disabled,getApi:function(e){return{setActive:function(t){sm.set(e,t)},isActive:function(){return sm.isOn(e)},isDisabled:function(){return uh.isDisabled(e)},setDisabled:function(t){return uh.set(e,t)}}},onAction:function(t){return r(e.value)},onSetup:function(e){return e.setActive(o),function(){}},triggersSubmenu:!1,itemBehaviours:[]},n,i),{toggling:{toggleClass:qg,toggleOnExecute:!1,selected:e.active}})}(u,1===n,r,t,i(e.value),o,a))})):ye.none()})))},Pp=function(e,t){var n=Ep(t);return 1===e?{mode:"menu",moveOnTab:!0}:"auto"===e?{mode:"grid",selector:"."+n.item,initSize:{numColumns:1,numRows:1}}:{mode:"matrix",rowSelector:"."+("color"===t?"tox-swatches__row":"tox-collection__group")}};function zp(e){return void 0!==e.icon||"togglemenuitem"===e.type||"choicemenuitem"===e.type}function Ip(e,n,r,o,i){function a(e){return i?d(d({},e),{shortcut:ye.none(),icon:e.text.isSome()?ye.none():e.icon}):e}var u=r.shared.providers;switch(e.type){case"menuitem":return Gt("menuitem",Ag,e).fold(_p,(function(e){return ye.some($p(a(e),n,u,o))}));case"nestedmenuitem":return Gt("nestedmenuitem",Dg,e).fold(_p,(function(e){return ye.some(Gp(a(e),n,u,o,i))}));case"togglemenuitem":return Gt("togglemenuitem",_g,e).fold(_p,(function(e){return ye.some(Xp(a(e),n,u))}));case"separator":return Gt("separatormenuitem",Cg,e).fold(_p,(function(e){return ye.some(qp(e))}));case"fancymenuitem":return Gt("fancymenuitem",Bg,e).fold(_p,(function(e){return Yp(a(e),r)}));default:return t.console.error("Unknown item in general menu",e),ye.none()}}function Lp(e){function t(){e.stopPropagation()}function n(){e.preventDefault()}var i,a,u,c,s,l=gn.fromDom(e.target),f=r(n,t);return i=e.clientX,a=e.clientY,u=t,c=n,f=f,s=e,{target:o(l),x:o(i),y:o(a),stop:u,prevent:c,kill:f,raw:o(s)}}function Fp(e,t,n,r,o){function i(e){u(e)&&c(Lp(e))}var u,c;return u=n,c=r,e.dom().addEventListener(t,i,o),{unbind:a(Hp,e,t,i,o)}}function Hp(e,t,n,r){e.dom().removeEventListener(t,n,r)}function Vp(e,t,n){return bu(e,t,n).isSome()}var Up,jp={inserttable:function(e){var t=Oi("size-label"),n=function(e,t,n){for(var r=[],o=0;o<t;o++){for(var i=[],a=0;a<n;a++)i.push(Ch(o,a,e));r.push(i)}return r}(t,10,10),r=Dm({dom:{tag:"span",classes:["tox-insert-table-picker__label"],attributes:{id:t}},components:[ma("0x0")],behaviours:ac([rm.config({})])});return{type:"widget",data:{value:Oi("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[yh().widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:je(n,(function(e){return Me(e,va)})).concat(r.asSpec()),behaviours:ac([im("insert-table-picker",[Ko(wh,(function(e,t,o){for(var i=o.event().row(),a=(o=o.event().col(),n),u=i,c=o,s=10,l=10,f=0;f<s;f++)for(var d=0;d<l;d++)sm.set(a[f][d],f<=u&&d<=c);rm.set(r.get(e),[ma(o+1+"x"+(i+1))])})),Ko(xh,(function(t,n,r){e.onAction({numRows:r.event().row()+1,numColumns:r.event().col()+1}),Gr(t,_r())}))]),nm.config({initSize:{numRows:10,numColumns:10},mode:"flatgrid",selector:'[role="button"]'})])})]}},colorswatch:function(e,t){var n=bp(t.colorinput.getColors(),t.colorinput.hasCustomColors()),r=t.colorinput.getColorCols();n=Bp(Oi("menu-value"),n,(function(t){e.onAction({value:t})}),r,"color",dh.CLOSE_ON_EXECUTE,(function(){return!1}),t.shared.providers),t=ut(d(d({},n),{markers:Ep("color"),movement:Pp(r,"color")}));return{type:"widget",data:{value:Oi("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[yh().widget(vm.sketch(t))]}}},Wp=function(e,t,n,r,o,i,a,u){void 0===u&&(u=!0);var c;r=Jm({presets:r,textContent:ye.none(),htmlContent:n?e.text.map((function(e){var n=t;return e=Hg.translate(e),e=bh(e),0<n.length?(n=new RegExp(vh(n),"gi"),e.replace(n,(function(e){return'<span class="tox-autocompleter-highlight">'+e+"</span>"}))):e})):ye.none(),ariaLabel:e.text,iconContent:e.icon,shortcutContent:ye.none(),checkMark:ye.none(),caret:ye.none(),value:e.value},a.providers,u,e.icon);return ug({data:cg(e),disabled:e.disabled,getApi:function(){return{}},onAction:function(t){return o(e.value,e.meta)},onSetup:function(){return function(){}},triggersSubmenu:!1,itemBehaviours:(n=e.meta,c=a,rt(n,"tooltipWorker").map((function(e){return[Fg.config({lazySink:c.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:function(e){return{anchor:"submenu",item:e,overrides:{maxHeightFunction:cl}}},mode:"follow-highlight",onShow:function(t,n){e((function(e){Fg.setComponents(t,[ga({element:gn.fromDom(e)})])}))}})]})).getOr([]))},r,i)},qp=function(e){return e=e.text.fold((function(){return{}}),(function(e){return{innerHtml:e}})),{type:"separator",dom:d({tag:"div",classes:[Ug,"tox-collection__group-heading"]},e),components:[]}},$p=function(e,t,n,r){return void 0===r&&(r=!0),n=Jm({presets:"normal",iconContent:e.icon,textContent:e.text,htmlContent:ye.none(),ariaLabel:e.text,caret:ye.none(),checkMark:ye.none(),shortcutContent:e.shortcut},n,r),ug({data:cg(e),getApi:function(e){return{isDisabled:function(){return uh.isDisabled(e)},setDisabled:function(t){return uh.set(e,t)}}},disabled:e.disabled,onAction:e.onAction,onSetup:e.onSetup,triggersSubmenu:!1,itemBehaviours:[]},n,t)},Gp=function(e,t,r,o,i){return void 0===o&&(o=!0),i=(i=void 0!==i&&i)?(i=r.icons,{dom:{tag:"div",classes:[Xg],innerHtml:Rm("chevron-down",i)}}):(i=r.icons,{dom:{tag:"div",classes:[Xg],innerHtml:Rm("chevron-right",i)}}),i=Jm({presets:"normal",iconContent:e.icon,textContent:e.text,htmlContent:ye.none(),ariaLabel:e.text,caret:ye.some(i),checkMark:ye.none(),shortcutContent:e.shortcut},r,o),ug({data:cg(e),getApi:function(e){return{isDisabled:function(){return uh.isDisabled(e)},setDisabled:function(t){return uh.set(e,t)}}},disabled:e.disabled,onAction:n,onSetup:e.onSetup,triggersSubmenu:!0,itemBehaviours:[]},i,t)},Xp=function(e,t,n){return n=Jm({iconContent:ye.none(),textContent:e.text,htmlContent:ye.none(),ariaLabel:e.text,checkMark:ye.some(Km(n.icons)),caret:ye.none(),shortcutContent:e.shortcut,presets:"normal",meta:e.meta},n,!0),ut(ug({data:cg(e),disabled:e.disabled,getApi:function(e){return{setActive:function(t){sm.set(e,t)},isActive:function(){return sm.isOn(e)},isDisabled:function(){return uh.isDisabled(e)},setDisabled:function(t){return uh.set(e,t)}}},onAction:e.onAction,onSetup:e.onSetup,triggersSubmenu:!1,itemBehaviours:[]},n,t),{toggling:{toggleClass:qg,toggleOnExecute:!1,selected:e.active}})},Yp=function(e,t){return n=jp,r=e.fancytype,(Object.prototype.hasOwnProperty.call(n,r)?ye.some(n[r]):ye.none()).map((function(n){return n(e,t)}));var n,r},Kp=((Sc=Up=Up||{})[Sc.ContentFocus=0]="ContentFocus",Sc[Sc.UiFocus=1]="UiFocus",function(e){return Be(e,zp)}),Jp=function(e,t,n,r,o){var i=Kp(t);t=Cu(Me(t,(function(e){function t(e){return Ip(e,n,r,a(e),o)}var a=function(e){return o?!e.hasOwnProperty("text"):i};return"nestedmenuitem"===e.type&&e.getSubmenuItems().length<=0?t(ct(e,{disabled:!0})):t(e)})));return(o?up:Rp)(e,i,t,1,"normal")},Zp=function(e){return Sm.singleData(e.value,e)},Qp=function(e,n){function r(r,o){var i=Su(o,(function(e){return ye.from(e.columns)})).getOr(1);return je(o,(function(o){var a,u,s,l,m,h,p=o.items;return p=p,a=o.matchText,u=function(n,i){var a=e.selection.getRng();Vm(e.dom,a,r).fold((function(){return t.console.error("Lost context. Cursor probably moved")}),(function(e){e=e.range;var t={hide:function(){d()},reload:function(e){f(),g(e)}};c.set(!0),o.onAction(t,e,n,i),c.set(!1)}))},s=dh.BUBBLE_TO_SANDBOX,l=n,h=!(m=1===i)||Kp(p),Cu(Me(p,(function(e){return"separator"===e.type?Tg(e).fold(_p,(function(e){return ye.some(qp(e))})):Eg(e).fold(_p,(function(e){return ye.some(Wp(e,a,m,"normal",u,s,l,h))}))})))}))}function o(t){var n,r,o;l()||(r=e,o=t.range,n=mg(gn.fromDom(r.selection.getNode())).getOrThunk((function(){var e=gn.fromHtml('<span data-mce-autocompleter="1" data-mce-bogus="1"></span>',r.getDoc());return mi(e,gn.fromDom(o.extractContents())),o.insertNode(e.dom()),ii(e).each((function(e){return e.dom().normalize()})),Ds(e).map((function(e){r.selection.setCursorLocation(e.dom(),Ns(e))})),e})),u.set(ye.some({triggerChar:t.triggerChar,element:n,matchLength:t.text.length})),c.set(!1))}function i(t,n,r,o){t.matchLength=n.text.length;var i,a,u;n=Su(r,(function(e){return ye.from(e.columns)})).getOr(1);km.showAt(s,{anchor:"node",root:gn.fromDom(e.getBody()),node:ye.from(t.element)},vm.sketch((r=Rp("autocompleter-value",!0,o,n,"normal"),t=n,o=Up.ContentFocus,n="normal",i=(o===Up.ContentFocus?zd:Pd)(),a=Pp(t,n),u=Ep(n),{dom:r.dom,components:r.components,items:r.items,value:r.value,markers:{selectedItem:u.selectedItem,item:u.item},movement:a,fakeFocus:o===Up.ContentFocus,focusManager:i,menuBehaviours:Pg.unnamedEvents("auto"!==t?[]:[Zo((function(e,t){Mg(e,4,u.item).each((function(t){var n=t.numColumns;t=t.numRows;nm.setGridSize(e,t,n)}))}))])}))),km.getContent(s).each(Nd.highlightFirst)}function a(t){return u.get().map((function(n){return Vm(e.dom,e.selection.getRng(),n.triggerChar).bind((function(n){return xg(e,m,n,t)}))})).getOrThunk((function(){return t=e,r=(n=m)(),o=t.selection.getRng(),wg(t.dom,o,r).bind((function(e){return xg(t,n,e)}));var t,n,r,o}))}var u=mn(ye.none()),c=mn(!1),s=pa(km.sketch({dom:{tag:"div",classes:["tox-autocompleter"]},components:[],fireDismissalEventInstead:{},inlineBehaviours:ac([im("dismissAutocompleter",[Xo(Hr(),(function(){return d()}))])]),lazySink:n.getSink})),l=function(){return u.get().isSome()},f=function(){l()&&km.hide(s)},d=function(){var t;l()&&(t=u.get().map((function(e){return e.element})),mg(t.getOr(gn.fromDom(e.selection.getNode()))).each(mo),f(),u.set(ye.none()),c.set(!1))},m=N((function(){return t=(t=e).ui.registry.getAll().popups,t=Qe(t,(function(e){return Og(e).fold((function(e){throw new Error(Kt(e))}),(function(e){return e}))})),n=Ng(tt(t,(function(e){return e.ch}))),r=nt(t),{dataset:t,triggerChars:n,lookupByChar:function(e){return Ie(r,(function(t){return t.ch===e}))}};var t,n,r})),g=function(e){a(e).fold(d,(function(e){o(e.context),e.lookupData.then((function(t){u.get().map((function(n){var o,a=e.context;n.triggerChar===a.triggerChar&&(0<(o=r(a.triggerChar,t)).length?i(n,a,t,o):(10<=a.text.length-n.matchLength?d:f)())}))}))}))},h={onKeypress:Lm((function(e){27!==e.which&&g()}),50),cancelIfNecessary:d,isMenuOpen:function(){return km.isOpen(s)},isActive:l,isProcessingAction:c.get,getView:function(){return km.getContent(s)}};vg(h,e)},ev=function(e,t,n,r){return Fp(e,t,n,r,!1)},tv=o(!0),nv=function(e,t,n){return ev(e,t,tv,n)},rv=function(e,t,n){return Fp(e,t,tv,n,!0)},ov=Lp;function iv(e,n){var r=null;return{cancel:function(){null!==r&&(t.clearTimeout(r),r=null)},schedule:function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];r=t.setTimeout((function(){e.apply(null,o),r=null}),n)}}}function av(e){return void 0===(e=e.raw()).touches||1!==e.touches.length?ye.none():ye.some(e.touches[0])}function uv(e){var t=mn(ye.none()),n=mn(!1),r=iv((function(t){e.triggerEvent(Dr(),t),n.set(!0)}),400),i=xt([{key:ir(),value:function(e){return av(e).each((function(i){r.cancel(),i={x:o(i.clientX),y:o(i.clientY),target:e.target},r.schedule(e),n.set(!1),t.set(ye.some(i))})),ye.none()}},{key:ar(),value:function(e){return r.cancel(),av(e).each((function(e){t.get().each((function(n){var r,o;r=e,n=n,o=Math.abs(r.clientX-n.x()),r=Math.abs(r.clientY-n.y()),(5<o||5<r)&&t.set(ye.none())}))})),ye.none()}},{key:ur(),value:function(o){return r.cancel(),t.get().filter((function(e){return tr(e.target(),o.target())})).map((function(t){return n.get()?(o.prevent(),!1):e.triggerEvent(Nr(),o)}))}}]);return{fireIfReady:function(e,t){return yt(i,t).bind((function(t){return t(e)}))}}}function cv(e,t,n,r,i,a){e=e(t,r);var u,c,s=(n=n,i=i,u=mn(!1),c=mn(!1),{stop:function(){u.set(!0)},cut:function(){c.set(!0)},isStopped:u.get,isCut:c.get,event:o(n),setSource:i.set,getSource:i.get});return e.fold((function(){return a.logEventNoHandlers(t,r),mv.complete()}),(function(e){var n=e.descHandler();return ji(n)(s),s.isStopped()?(a.logEventStopped(t,e.element(),n.purpose()),mv.stopped()):s.isCut()?(a.logEventCut(t,e.element(),n.purpose()),mv.complete()):ii(e.element()).fold((function(){return a.logNoParent(t,e.element(),n.purpose()),mv.complete()}),(function(r){return a.logEventResponse(t,e.element(),n.purpose()),mv.resume(r)}))}))}var sv=Xn().browser.isFirefox(),lv=Pt([X("triggerEvent"),ln("stopBackspace",!0)]),fv=function(e,n){var r,o=Yt("Getting GUI events settings",lv,n),i=(n=Xn().deviceType.isTouch()?["touchstart","touchmove","touchend","gesturestart"]:["mousedown","mouseup","mouseover","mousemove","mouseout","click"],uv(o)),a=Me(n.concat(["selectstart","input","contextmenu","change","transitionend","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),(function(t){return nv(e,t,(function(e){i.fireIfReady(e,t).each((function(t){t&&e.kill()})),o.triggerEvent(t,e)&&e.kill()}))})),u=mn(ye.none()),c=nv(e,"paste",(function(e){i.fireIfReady(e,"paste").each((function(t){t&&e.kill()})),o.triggerEvent("paste",e)&&e.kill(),u.set(ye.some(t.setTimeout((function(){o.triggerEvent(kr(),e)}),0)))})),s=nv(e,"keydown",(function(e){var t;o.triggerEvent("keydown",e)?e.kill():!0!==o.stopBackspace||8!==(t=e).raw().which||Re(["input","textarea"],Lo(t.target()))||Vp(t.target(),'[contenteditable="true"]')||e.prevent()})),l=(n=e,r=function(e){o.triggerEvent("focusin",e)&&e.kill()},sv?rv(n,"focus",r):nv(n,"focusin",r)),f=mn(ye.none()),d=(n=e,r=function(e){o.triggerEvent("focusout",e)&&e.kill(),f.set(ye.some(t.setTimeout((function(){o.triggerEvent(Sr(),e)}),0)))},sv?rv(n,"blur",r):nv(n,"focusout",r));return{unbind:function(){Pe(a,(function(e){e.unbind()})),s.unbind(),l.unbind(),d.unbind(),c.unbind(),u.get().each(t.clearTimeout),f.get().each(t.clearTimeout)}}},dv=function(e,t){return e=yt(e,"target").map((function(e){return e()})).getOr(t),mn(e)},mv=it([{stopped:[]},{resume:["element"]},{complete:[]}]),gv=function(e,t,n,r,o,i){return cv(e,t,n,r,o,i).fold((function(){return!0}),(function(r){return gv(e,t,n,r,o,i)}),(function(){return!1}))},hv=function(e,t,n,r,o){var i=dv(n,r);return cv(e,t,n,r,i,o)},pv=function(e,t,r){t=t,i=mn(!1);var i,a={stop:function(){i.set(!0)},cut:n,isStopped:i.get,isCut:o(!1),event:o(t),setSource:u("Cannot set source of a broadcasted event"),getSource:u("Cannot get source of a broadcasted event")};return Pe(e,(function(e){e=e.descHandler(),ji(e)(a)})),a.isStopped()},vv=function(e,t,n,r){var o=n.target();return bv(e,t,n,o,r)},bv=function(e,t,n,r,o){var i=dv(n,r);return gv(e,t,n,r,i,o)},yv=uo("element","descHandler");function wv(){var e={};return{registerId:function(t,n,r){Ze(r,(function(r,o){var i=void 0!==e[o]?e[o]:{};i[n]=Ui(a.apply(void 0,[(r=r).handler].concat(t)),r.purpose()),e[o]=i}))},unregisterId:function(t){Ze(e,(function(e,n){e.hasOwnProperty(t)&&delete e[t]}))},filterByType:function(t){return yt(e,t).map((function(e){return tt(e,(function(e,t){return e=e,{id:o(t),descHandler:o(e)}}))})).getOr([])},find:function(t,n,r){var o=_(n)(e);return $o(r,(function(e){return t=o,_i(n=e).fold((function(){return ye.none()}),(function(e){return e=_(e),t.bind(e).map((function(e){return yv(n,e)}))}));var t,n}),t)}}}function xv(){var e=wv(),t={},n=function(n){_i(n.element()).each((function(n){delete t[n],e.unregisterId(n)}))};return{find:function(t,n,r){return e.find(t,n,r)},filter:function(t){return e.filterByType(t)},register:function(r){i=(o=r).element();var o,i=_i(i).fold((function(){return vo("uid-",o.element())}),(function(e){return e}));if(St(t,i)){var a=r,u=i,c=t[u];if(c!==a)throw new Error('The tagId "'+u+'" is already used by: '+po(c.element())+"\nCannot use it for: "+po(a.element())+"\nThe conflicting element is"+(Vo(c.element())?" ":" not ")+"already in the DOM");n(a)}e.registerId([r],i,r.events()),t[i]=r},unregister:n,getById:function(e){return _(e)(t)}}}function Cv(e){function t(t){return ii(e.element()).fold((function(){return!0}),(function(e){return tr(t,e)}))}function r(e,n){return a.find(t,e,n)}function i(e){var t=a.filter(Tr());Pe(t,(function(t){t=t.descHandler(),ji(t)(e)}))}var a=xv(),u=fv(e.element(),{triggerEvent:function(e,t){return Au(e,t.target(),(function(n){return vv(r,e,t,n)}))}}),c={debugInfo:o("real"),triggerEvent:function(e,t,n){Au(e,t,(function(o){bv(r,e,n,t,o)}))},triggerFocus:function(e,t){_i(e).fold((function(){dc(e)}),(function(i){Au(Cr(),e,(function(i){hv(r,Cr(),{originator:o(t),kill:n,prevent:n,target:o(e)},e,i)}))}))},triggerEscape:function(e,t){c.triggerEvent("keydown",e.element(),t.event())},getByUid:function(e){return p(e)},getByDom:function(e){return v(e)},build:pa,addToGui:function(e){f(e)},removeFromGui:function(e){d(e)},addToWorld:function(e){s(e)},removeFromWorld:function(e){l(e)},broadcast:function(e){m(e)},broadcastOn:function(e,t){g(e,t)},broadcastEvent:function(e,t){h(e,t)},isConnected:o(!0)},s=function(e){e.connect(c),Ho(e.element())||(a.register(e),Pe(e.components(),s),c.triggerEvent(Br(),e.element(),{target:o(e.element())}))},l=function(e){Ho(e.element())||(Pe(e.components(),l),a.unregister(e)),e.disconnect()},f=function(t){vl(e,t)},d=function(e){wl(e)},m=function(e){i({universal:o(!0),data:o(e)})},g=function(e,t){i({universal:o(!1),channels:o(e),data:o(t)})},h=function(e,t){return e=a.filter(e),pv(e,t)},p=function(e){return a.getById(e).fold((function(){return we.error(new Error('Could not find component with uid: "'+e+'" in system.'))}),we.value)},v=function(e){return e=_i(e).getOr("not found"),p(e)};return s(e),{root:o(e),element:e.element,destroy:function(){u.unbind(),vi(e.element())},add:f,remove:d,getByUid:p,getByDom:v,addToWorld:s,removeFromWorld:l,broadcast:m,broadcastOn:g,broadcastEvent:h}}function Sv(e){return ye.from(e.settings.min_width).filter(Ee)}function kv(e){return ye.from(e.settings.min_height).filter(Ee)}function Tv(e){return e.getParam("toolbar_drawer","","string")}function Ev(e){return(e.getParam("toolbar_sticky",!1,"boolean")||e.inline)&&!Db(e)&&!_b(e)}function Ov(e){return{tag:e.tag,attributes:d({type:"text"},e.inputAttributes),styles:e.inputStyles,classes:e.inputClasses}}function Nv(e){function n(e){r()?a(e):i.push(e)}function r(){return o.isSome()}var o=ye.none(),i=[],a=function(e){o.each((function(n){t.setTimeout((function(){e(n)}),0)}))};return e((function(e){o=ye.some(e),Pe(i,a),i=[]})),{get:n,map:function(e){return Nv((function(t){n((function(n){t(e(n))}))}))},isReady:r}}function Av(e){return e=Lo(e),Re(Yb,e)}function Dv(e,t){var n=t.getRoot(e).getOr(e.element());Ji(n,t.invalidClass),t.notify.each((function(t){Av(e.element())&&wi(e.element(),"aria-invalid",!1),t.getContainer(e).each((function(e){ho(e,t.validHtml)})),t.onValid(e)}))}function _v(e,t,n,r){var o=t.getRoot(e).getOr(e.element());Yi(o,t.invalidClass),t.notify.each((function(t){Av(e.element())&&wi(e.element(),"aria-invalid",!0),t.getContainer(e).each((function(e){ho(e,r)})),t.onInvalid(e,r)}))}function Rv(e,t,n){return t.validator.fold((function(){return Xb.pure(we.value(!0))}),(function(t){return t.validate(e)}))}function Bv(e,t,n){return t.notify.each((function(t){t.onValidate(e)})),Rv(e,t).map((function(n){return e.getSystem().isConnected()?n.fold((function(n){return _v(e,t,0,n),we.error(n)}),(function(n){return Dv(e,t),we.value(n)})):we.error("No longer in system")}))}function Mv(e,t,n,r,o,i){var a=ny.getCoupled(n,"sandbox");return(Sl.isOpen(a)?cy:uy)(e,t,n,a,r,o,i)}function Pv(e,t,n){var r=yu(),i=ly(t,e);return{dom:{tag:"div",classes:e.sandboxClasses,attributes:{id:r.id(),role:"listbox"}},behaviours:Ml.augment(e.sandboxBehaviours,[_l.config({store:{mode:"memory",initialValue:t}}),Sl.config({onOpen:function(o,i){var a=iy(e,t);r.link(t.element()),e.matchWidth&&sy(a.hotspot,i,e.useMinWidth),e.onOpen(a,o,i),void 0!==n&&void 0!==n.onOpen&&n.onOpen(o,i)},onClose:function(e,o){r.unlink(t.element()),void 0!==n&&void 0!==n.onClose&&n.onClose(e,o)},isPartOf:function(e,n,r){return xu(n,r)||xu(t,r)},getAttachPoint:function(){return i().getOrDie()}}),Od.config({find:function(e){return Sl.getState(e).bind((function(e){return Od.getCurrent(e)}))}}),fc.config({channels:d(d({},Nl({isExtraPart:o(!1)})),Dl({isExtraPart:o(!1),doReposition:fy}))})])}}function zv(e){e=ny.getCoupled(e,"sandbox"),fy(e)}function Iv(){return[ln("sandboxClasses",[]),Ml.field("sandboxBehaviours",[Od,fc,Sl,_l])]}function Lv(e,t,n){function r(e,t){Xr(e,hy,{value:t})}var o,i,a=Vb.parts().field({factory:jb,inputClasses:["tox-textfield"],onSetValue:function(e){return Kb.run(e).get((function(){}))},inputBehaviours:ac([Jb.config({}),Kb.config({invalidClass:"tox-textbox-field-invalid",getRoot:function(e){return ii(e.element())},notify:{onValid:function(e){var t=_l.getValue(e);Xr(e,gy,{color:t})}},validator:{validateOnLoad:!1,validate:function(e){var t=_l.getValue(e);return 0===t.length?Xb.pure(we.value(!0)):(e=gn.fromTag("span"),oa(e,"background-color",t),e=ua(e,"background-color").fold((function(){return we.error("blah")}),(function(e){return we.value(t)})),Xb.pure(e))}}})]),selectOnFocus:!1}),u=e.label.map((function(e){return ty(e,t.providers)})),c=Dm((o={dom:{tag:"span",attributes:{"aria-label":t.providers.translate("Color swatch")}},layouts:ye.some({onRtl:function(){return[Yu]},onLtr:function(){return[Ku]}}),components:[],fetch:yp(n.getColors(),n.hasCustomColors()),columns:n.getColorCols(),presets:"color",onItemAction:function(e,t){c.getOpt(e).each((function(e){"custom"===t?n.colorPicker((function(t){t.fold((function(){return Gr(e,py)}),(function(t){r(e,t),cp.addColor(t)}))}),"#ffffff"):r(e,"remove"===t?"":t)}))}},i=t,dy.sketch({dom:o.dom,components:o.components,toggleClass:"mce-active",dropdownBehaviours:ac([my.config({}),Jb.config({})]),layouts:o.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:i.getSink,fetch:function(e){return Xb.nu((function(e){return o.fetch(e)})).map((function(t){return ye.from(Zp(ut(Bp(Oi("menu-value"),t,(function(t){o.onItemAction(e,t)}),o.columns,o.presets,dh.CLOSE_ON_EXECUTE,(function(){return!1}),i.providers),{movement:Pp(o.columns,o.presets)})))}))},parts:{menu:Ap(!1,1,o.presets)}})));return Vb.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:u.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[a,c.asSpec()]}]),fieldBehaviours:ac([im("form-field-events",[Xo(gy,(function(t,n){c.getOpt(t).each((function(e){oa(e.element(),"background-color",n.event().color())})),Xr(t,Rb,{name:e.name})})),Xo(hy,(function(e,t){Vb.getField(e).each((function(n){_l.setValue(n,t.event().value()),Od.getCurrent(e).each(am.focus)}))})),Xo(py,(function(e,t){Vb.getField(e).each((function(t){Od.getCurrent(e).each(am.focus)}))}))])])})}function Fv(e){return Gl({name:e+"-edge",overrides:function(t){return t.model.manager.edgeActions[e].fold((function(){return{}}),(function(e){var n=Go([oo(ir(),e,[t])]),r=Go([oo(cr(),e,[t]),oo(sr(),(function(t,n){n.mouseIsDown.get()&&e(t,n)}),[t])]);return{events:xy?n:r}}))}})}function Hv(e){return e=e.event().raw(),Cy?void 0!==e.touches&&1===e.touches.length?ye.some(e.touches[0]).map((function(e){return Ja(e.clientX,e.clientY)})):ye.none():void 0!==e.clientX?ye.some(e).map((function(e){return Ja(e.clientX,e.clientY)})):ye.none()}function Vv(e){return e.model.minX-1}function Uv(e){return e.model.minY-1}function jv(e){return e.model.maxX+1}function Wv(e){return e.model.maxY+1}function qv(e,t,n){return t(e)-n(e)}function $v(e){return Ny(e)/2}function Gv(e){return Ay(e)/2}function Xv(e,t){return void 0!==e[t+"-edge"]}function Yv(e){return{x:o(e)}}function Kv(e){return{y:o(e)}}function Jv(e,t){return{x:o(e),y:o(t)}}function Zv(e,t){Xr(e,Sy(),{value:t})}function Qv(e,t,n){return Math.max(t,Math.min(n,e))}function eb(e,t,n){return n={min:ky(t),max:Ey(t),range:Ny(t),value:n,step:Dy(t),snap:_y(t),snapStart:Ry(t),rounded:By(t),hasMinEdge:My(t),hasMaxEdge:Py(t),minBound:Gy(e),maxBound:Xy(e),screenRange:Jy(e)},Vy(n)}function tb(e){return function(t,n){return function(e,t,n){return e=(0<e?Hy:Fy)(Ly(n).x(),ky(n),Ey(n),Dy(n)),tw(t,nw(e)),ye.some(e)}(e,t,n).map((function(){return!0}))}}function nb(e,t,n,r,o,i){i=i,n=n,r=r,o=o,u=Jy(a=t),r=r.bind((function(e){return ye.some(Qy(e,a))})).getOr(0),o=o.bind((function(e){return ye.some(Qy(e,a))})).getOr(u),n={min:ky(i),max:Ey(i),range:Ny(i),value:n,hasMinEdge:My(i),hasMaxEdge:Py(i),minBound:Gy(a),minOffset:0,maxBound:Xy(a),maxOffset:u,centerMinEdge:r,centerMaxEdge:o};var a,u;i=Uy(n);return Gy(t)-Gy(e)+i}function rb(e,t,n){return n={min:Ty(t),max:Oy(t),range:Ay(t),value:n,step:Dy(t),snap:_y(t),snapStart:Ry(t),rounded:By(t),hasMinEdge:zy(t),hasMaxEdge:Iy(t),minBound:Yy(e),maxBound:Ky(e),screenRange:Zy(e)},Vy(n)}function ob(e){return function(t,n){return function(e,t,n){return e=(0<e?Hy:Fy)(Ly(n).y(),Ty(n),Oy(n),Dy(n)),rw(t,ow(e)),ye.some(e)}(e,t,n).map((function(){return!0}))}}function ib(e,t,n,r,o,i){i=i,n=n,r=r,o=o,u=Zy(a=t),r=r.bind((function(e){return ye.some(ew(e,a))})).getOr(0),o=o.bind((function(e){return ye.some(ew(e,a))})).getOr(u),n={min:Ty(i),max:Oy(i),range:Ay(i),value:n,hasMinEdge:zy(i),hasMaxEdge:Iy(i),minBound:Yy(a),minOffset:0,maxBound:Ky(a),maxOffset:u,centerMinEdge:r,centerMaxEdge:o};var a,u;i=Uy(n);return Yy(t)-Yy(e)+i}function ab(e,t){return function(n,r){return n=n,r=r,o=0<(o=e)?Hy:Fy,a=(i=t)?Ly(r).x():o(Ly(r).x(),ky(r),Ey(r),Dy(r)),i=i?o(Ly(r).y(),Ty(r),Oy(r),Dy(r)):Ly(r).y(),iw(n,aw(a,i)),ye.some(a).map((function(){return!0}));var o,i,a}}function ub(e){return"<alloy.field."+e+">"}function cb(e,t,n){return{uid:e.uid,dom:e.dom,components:t,behaviours:Bl(e.formBehaviours,[_l.config({store:{mode:"manual",getValue:function(t){return t=ef(t,e),Qe(t,(function(e,t){return e().bind((function(e){return e=Od.getCurrent(e),fw(e,"missing current")})).map(_l.getValue)}))},setValue:function(t,n){Ze(n,(function(n,r){Ql(t,e,r).each((function(e){Od.getCurrent(e).each((function(e){_l.setValue(e,n)}))}))}))}}})]),apis:{getField:function(t,n){return Ql(t,e,n).bind(Od.getCurrent)}}}}function sb(e){return kw(e)}function lb(e,t,n){return _l.config(ut({store:{mode:"manual",getValue:t,setValue:n}},e.map((function(e){return{store:{initialValue:e}}})).getOr({})))}function fb(e,t,n){return lb(e,(function(e){return t(e.element())}),(function(e,t){return n(e.element(),t)}))}function db(e,t){function n(e,t){t.stop()}function r(e){return function(t,n){Pe(e,(function(e){e(t,n)}))}}function o(e,t){uh.isDisabled(e)||(t=t.event().raw(),a(e,t.dataTransfer.files))}function i(e,t){t=t.event().raw().target.files,a(e,t)}var a=function(t,n){var r;_l.setValue(t,(n=n,r=new RegExp("("+Nw.split(/\s*,\s*/).join("|")+")$","i"),Ie(Ye(n),(function(e){return r.test(e.name)})))),Xr(t,Rb,{name:e.name})},u=Dm({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:ac([im("input-file-events",[ao(Ar())])])}),c=e.label.map((function(e){return ty(e,t)})),s=Vb.parts().field({factory:{sketch:function(e){return{uid:e.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:ac([Ow.memory([]),ww(),uh.config({}),sm.config({toggleClass:"dragenter",toggleOnExecute:!1}),im("dropzone-events",[Xo("dragenter",r([n,sm.toggle])),Xo("dragleave",r([n,sm.toggle])),Xo("dragover",n),Xo("drop",r([n,o])),Xo(br(),i)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:t.translate("Drop an image here")}},Am.sketch({dom:{tag:"button",innerHtml:t.translate("Browse for an image"),styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[u.asSpec()],action:function(e){u.get(e).element().dom().click()},buttonBehaviours:ac([Jb.config({})])})]}]}}}});return Zb(c,s,["tox-form__group--stretched"],[])}function mb(e){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:e},behaviours:ac([am.config({ignore:!0}),Jb.config({})])}}function gb(e,t){Xr(e,hr(),{raw:{which:9,shiftKey:t}})}function hb(e,t){var n,r,o=Rw&&e.sandboxed,i=d(d({},e.label.map((function(e){return{title:e}})).getOr({})),o?{sandbox:"allow-scripts allow-same-origin"}:{}),a=(n=o,r=mn(""),{getValue:function(e){return r.get()},setValue:function(e,t){n?wi(e.element(),"srcdoc",t):(wi(e.element(),"src","javascript:''"),(e=e.element().dom().contentWindow.document).open(),e.write(t),e.close()),r.set(t)}});o=e.label.map((function(e){return ty(e,t)})),e=Vb.parts().field({factory:{sketch:function(e){return _w.craft({uid:e.uid,dom:{tag:"iframe",attributes:i},behaviours:ac([Jb.config({}),am.config({}),Ow.withComp(ye.none(),a.getValue,a.setValue)])})}}});return Zb(o,e,["tox-form__group--stretched"],[])}var pb,vb,bb,yb,wb,xb,Cb=af({name:"Container",factory:function(e){var t=e.dom,n=t.attributes;t=m(t,["attributes"]);return{uid:e.uid,dom:d({tag:"div",attributes:d({role:"presentation"},n)},t),components:e.components,behaviours:Rl(e.containerBehaviours),events:e.events,domModification:e.domModification,eventOrder:e.eventOrder}},configFields:[ln("components",[]),gs("containerBehaviours",[]),ln("events",{}),ln("domModification",{}),ln("eventOrder",{})]}),Sb=tinymce.util.Tools.resolve("tinymce.EditorManager"),kb=function(e){return e.getParam("readonly",!1,"boolean")},Tb=function(e){return!1!==e.getParam("menubar",!0,"boolean")},Eb=function(e){var t=e.getParam("toolbar",!0),n=!0===t,r=xe(t);t=Se(t)&&0<t.length;return!Nb(e)&&(t||r||n)},Ob=function(e){var t=Ke(e.settings);t=Ie(t,(function(e){return/^toolbar([1-9])$/.test(e)})),t=Me(t,(function(t){return e.getParam(t,!1,"string")})),t=Ie(t,(function(e){return"string"==typeof e}));return 0<t.length?ye.some(t):ye.none()},Nb=function(e){return Ob(e).fold((function(){return 0<e.getParam("toolbar",[],"string[]").length}),(function(){return!0}))},Ab=((tm=pb=pb||{}).default="",tm.floating="floating",tm.sliding="sliding",function(e){var t=e.getParam("fixed_toolbar_container","","string");return 0<t.length&&e.inline?vu(Uo(),t):ye.none()}),Db=function(e){return e.inline&&Ab(e).isSome()},_b=function(e){return e.inline&&!Tb(e)&&!Eb(e)&&!Nb(e)},Rb=Oi("form-component-change"),Bb=Oi("form-close"),Mb=Oi("form-cancel"),Pb=Oi("form-action"),zb=Oi("form-submit"),Ib=Oi("form-block"),Lb=Oi("form-unblock"),Fb=Oi("form-tabchange"),Hb=Oi("form-resize"),Vb=(Xd=o([ln("prefix","form-field"),gs("fieldBehaviours",[Od,_l])]),Yn=o([Gl({schema:[on("dom")],name:"label"}),Gl({factory:{sketch:function(e){return{uid:e.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:e.text}}}},schema:[on("text")],name:"aria-descriptor"}),$l({factory:{sketch:function(e){var t=D(e,["factory"]);return e.factory.sketch(t)}},schema:[on("factory")],name:"field"})]),uf({name:"FormField",configFields:Xd(),partFields:Yn(),factory:function(e,t,n,r){var o=Bl(e.fieldBehaviours,[Od.config({find:function(t){return Ql(t,e,"field")}}),_l.config({store:{mode:"manual",getValue:function(e){return Od.getCurrent(e).bind(_l.getValue)},setValue:function(e,t){Od.getCurrent(e).each((function(e){_l.setValue(e,t)}))}}})]),i=Go([Zo((function(t,n){var r=ks(t,e,["label","field","aria-descriptor"]);r.field().each((function(t){var n=Oi(e.prefix);r.label().each((function(e){wi(e.element(),"for",n),wi(t.element(),"id",n)})),r["aria-descriptor"]().each((function(n){var r=Oi(e.prefix);wi(n.element(),"id",r),wi(t.element(),"aria-describedby",r)}))}))}))]);return{uid:e.uid,dom:e.dom,components:t,behaviours:o,events:i,apis:{getField:function(t){return Ql(t,e,"field")},getLabel:function(t){return Ql(t,e,"label")}}}},apis:{getField:function(e,t){return e.getField(t)},getLabel:function(e,t){return e.getLabel(t)}}})),Ub=(qn=o([Z("data"),ln("inputAttributes",{}),ln("inputStyles",{}),ln("tag","input"),ln("inputClasses",[]),ka("onSetValue"),ln("styles",{}),ln("eventOrder",{}),gs("inputBehaviours",[_l,am]),ln("selectOnFocus",!0)]),function(e){return ac([am.config({onFocus:!1===e.selectOnFocus?n:function(e){e=e.element();var t=la(e);e.dom().setSelectionRange(0,t.length)}})])}),jb=af({name:"Input",configFields:qn(),factory:function(e,t){return{uid:e.uid,dom:Ov(e),components:[],behaviours:d(d({},Ub(n=e)),Bl(n.inputBehaviours,[_l.config({store:{mode:"manual",initialValue:n.data.getOr(void 0),getValue:function(e){return la(e.element())},setValue:function(e,t){la(e.element())!==t&&fa(e.element(),t)}},onSetValue:n.onSetValue})])),eventOrder:e.eventOrder};var n}}),Wb=(qd={},Wl={exports:qd},bb=qd,yb=Wl,wb=vb=void 0,function(t){"object"==typeof bb&&void 0!==yb?yb.exports=t():"function"==typeof vb&&vb.amd?vb([],t):("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:this).EphoxContactWrapper=t()}((function(){return function e(t,n,r){function o(a,u){if(!n[a]){if(!t[a]){var c="function"==typeof wb&&wb;if(!u&&c)return c(a,!0);if(i)return i(a,!0);throw(u=new Error("Cannot find module '"+a+"'")).code="MODULE_NOT_FOUND",u}c=n[a]={exports:{}},t[a][0].call(c.exports,(function(e){return o(t[a][1][e]||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof wb&&wb,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){var r,o;t=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(e){o=a}function u(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return(r=setTimeout)(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}var c,s=[],l=!1,f=-1;function d(){l&&c&&(l=!1,c.length?s=c.concat(s):f=-1,s.length&&m())}function m(){if(!l){for(var e=u(d),t=(l=!0,s.length);t;){for(c=s,s=[];++f<t;)c&&c[f].run();f=-1,t=s.length}c=null,l=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===a||!o)&&clearTimeout)return(o=clearTimeout)(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function h(){}t.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];s.push(new g(e,t)),1!==s.length||l||u(m)},g.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={},t.on=h,t.addListener=h,t.once=h,t.off=h,t.removeListener=h,t.removeAllListeners=h,t.emit=h,t.prependListener=h,t.prependOnceListener=h,t.listeners=function(e){return[]},t.binding=function(e){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(e){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},{}],2:[function(e,t,n){(function(e){function n(){}function r(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=void 0,this._deferreds=[],s(e,this)}function o(e,t){for(;3===e._state;)e=e._value;0===e._state?e._deferreds.push(t):(e._handled=!0,r._immediateFn((function(){var n,r=1===e._state?t.onFulfilled:t.onRejected;if(null===r)(1===e._state?i:a)(t.promise,e._value);else{try{n=r(e._value)}catch(n){return void a(t.promise,n)}i(t.promise,n)}})))}function i(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 r)return e._state=3,e._value=t,void u(e);if("function"==typeof n)return void s((o=n,i=t,function(){o.apply(i,arguments)}),e)}e._state=1,e._value=t,u(e)}catch(t){a(e,t)}var o,i}function a(e,t){e._state=2,e._value=t,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&r._immediateFn((function(){e._handled||r._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 s(e,t){var n=!1;try{e((function(e){n||(n=!0,i(t,e))}),(function(e){n||(n=!0,a(t,e))}))}catch(e){if(n)return;n=!0,a(t,e)}}var l,f;l=this,f=setTimeout,r.prototype.catch=function(e){return this.then(null,e)},r.prototype.then=function(e,t){var r=new this.constructor(n);return o(this,new c(e,t,r)),r},r.all=function(e){var t=Array.prototype.slice.call(e);return new r((function(e,n){if(0===t.length)return e([]);for(var r=t.length,o=0;o<t.length;o++)!function o(i,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var u=a.then;if("function"==typeof u)return void u.call(a,(function(e){o(i,e)}),n)}t[i]=a,0==--r&&e(t)}catch(a){n(a)}}(o,t[o])}))},r.resolve=function(e){return e&&"object"==typeof e&&e.constructor===r?e:new r((function(t){t(e)}))},r.reject=function(e){return new r((function(t,n){n(e)}))},r.race=function(e){return new r((function(t,n){for(var r=0,o=e.length;r<o;r++)e[r].then(t,n)}))},r._immediateFn="function"==typeof e?function(t){e(t)}:function(e){f(e,0)},r._unhandledRejectionFn=function(e){},r._setImmediateFn=function(e){r._immediateFn=e},r._setUnhandledRejectionFn=function(e){r._unhandledRejectionFn=e},void 0!==t&&t.exports?t.exports=r:l.Promise||(l.Promise=r)}).call(this,e("timers").setImmediate)},{timers:3}],3:[function(e,t,n){(function(t,r){var o=e("process/browser.js").nextTick,i=Function.prototype.apply,a=Array.prototype.slice,u={},c=0;function s(e,t){this._id=e,this._clearFn=t}n.setTimeout=function(){return new s(i.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new s(i.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},s.prototype.unref=s.prototype.ref=function(){},s.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n.setImmediate="function"==typeof t?t:function(e){var t=c++,r=!(arguments.length<2)&&a.call(arguments,1);return u[t]=!0,o((function(){u[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))})),t},n.clearImmediate="function"==typeof r?r:function(e){delete u[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(e,t,n){e=e("promise-polyfill");var r="undefined"!=typeof window?window:Function("return this;")();t.exports={boltExport:r.Promise||e}},{"promise-polyfill":2}]},{},[4])(4)})),Wl.exports.boltExport),qb={nu:Nv,pure:function(e){return Nv((function(t){t(e)}))}},$b=function(e){t.setTimeout((function(){throw e}),0)},Gb=function(e){function t(t){e().then(t,$b)}return{map:function(t){return Gb((function(){return e().then(t)}))},bind:function(t){return Gb((function(){return e().then((function(e){return t(e).toPromise()}))}))},anonBind:function(t){return Gb((function(){return e().then((function(){return t.toPromise()}))}))},toLazy:function(){return qb.nu(t)},toCached:function(){var t=null;return Gb((function(){return t=null===t?e():t}))},toPromise:e,get:t}},Xb={nu:function(e){return Gb((function(){return new Wb(e)}))},pure:function(e){return Gb((function(){return Wb.resolve(e)}))}},Yb=["input","textarea"],Kb=(Wn=Object.freeze({markValid:Dv,markInvalid:_v,query:Rv,run:Bv,isInvalid:function(e,t){return e=t.getRoot(e).getOr(e.element()),Zi(e,t.invalidClass)}}),ql=Object.freeze({events:function(e,t){return e.validator.map((function(t){return Go([Xo(t.onEvent,(function(t){Bv(t,e).get(i)}))].concat(t.validateOnLoad?[Zo((function(t){Bv(t,e).get(n)}))]:[]))})).getOr({})}}),$d=[on("invalidClass"),ln("getRoot",ye.none),cn("notify",[ln("aria","alert"),ln("getContainer",ye.none),ln("validHtml",""),ka("onValid"),ka("onInvalid"),ka("onValidate")]),cn("validator",[on("validate"),ln("onEvent","input"),ln("validateOnLoad",!0)])],Ba({fields:$d,name:"invalidating",active:ql,apis:Wn,extra:{validation:function(e){return function(t){return t=_l.getValue(t),Xb.pure(e(t))}}}})),Jb=(jl=Object.freeze({exhibit:function(e,t){return So({attributes:xt([{key:t.tabAttr,value:"true"}])})}}),Ys=[ln("tabAttr","data-alloy-tabstop")],Ba({fields:Ys,name:"tabstopping",active:jl})),Zb=function(e,t,n,r){return e=Qb(e,t,n,r),Vb.sketch(e)},Qb=function(e,t,n,r){return{dom:ey(n),components:e.toArray().concat([t]),fieldBehaviours:ac(r)}},ey=function(e){return{tag:"div",classes:["tox-form__group"].concat(e)}},ty=function(e,t){return Vb.parts().label({dom:{tag:"label",classes:["tox-label"],innerHtml:t.translate(e)}})},ny=(Pu=Object.freeze({getCoupled:function(e,t,n,r){return n.getOrCreate(e,t,r)}}),em=[an("others",V(we.value,Zt()))],Ba({fields:em,name:"coupling",apis:Pu,state:Object.freeze({init:function(e){var t={},n=o({});return Hi({readState:n,getOrCreate:function(e,n,r){var o=Ke(n.others);if(o)return yt(t,r).getOrThunk((function(){var o=yt(n.others,r).getOrDie("No information found for coupled component: "+r)(e);o=e.getSystem().build(o);return t[r]=o}));throw new Error("Cannot find coupled component: "+r+". Known coupled components: "+JSON.stringify(o,null,2))}})}})})),ry=o("sink"),oy=o(Gl({name:ry(),overrides:o({dom:{tag:"div"},behaviours:ac([dl.config({useFixed:l})]),events:Go([ao(hr()),ao(cr()),ao(yr())])})})),iy=((Wd=xb=xb||{})[Wd.HighlightFirst=0]="HighlightFirst",Wd[Wd.HighlightNone=1]="HighlightNone",function(e,t){var n=e.getHotspot(t).getOr(t),r=e.getAnchorOverrides();return e.layouts.fold((function(){return{anchor:"hotspot",hotspot:n,overrides:r}}),(function(e){return{anchor:"hotspot",hotspot:n,overrides:r,layouts:e}}))}),ay=function(e,t,n,r,o,i,a){t=t;t=(0,e.fetch)(r).map(t);var u=ly(r,e);return t.map((function(e){return e.bind((function(e){return ye.from(Sm.sketch(d(d({},i.menu()),{uid:Ri(""),data:e,highlightImmediately:a===xb.HighlightFirst,onOpenMenu:function(e,t){var r=u().getOrDie();dl.position(r,n,t),Sl.decloak(o)},onOpenSubmenu:function(e,t,n){var r=u().getOrDie();dl.position(r,{anchor:"submenu",item:t},n),Sl.decloak(o)},onRepositionMenu:function(e,t,r){var o=u().getOrDie();dl.position(o,n,t),Pe(r,(function(e){dl.position(o,{anchor:"submenu",item:e.triggeringItem},e.triggeredMenu)}))},onEscape:function(){return am.focus(r),Sl.close(o),ye.some(!0)}})))}))}))},uy=function(e,t,n,r,o,i,a){var u=iy(e,n);return ay(e,t,u,n,r,o,a).map((function(e){return e.fold((function(){Sl.isOpen(r)&&Sl.close(r)}),(function(e){Sl.cloak(r),Sl.open(r,e),i(r)})),r}))},cy=function(e,t,n,r,o,i,a){return Sl.close(r),Xb.pure(r)},sy=function(e,t,n){t=Od.getCurrent(t).getOr(t),e=nu(e.element()),n?oa(t.element(),"min-width",e+"px"):(n=t.element(),tu.set(n,e))},ly=function(e,t){return e.getSystem().getByUid(t.uid+"-"+ry()).map((function(e){return function(){return we.value(e)}})).getOrThunk((function(){return t.lazySink.fold((function(){return function(){return we.error(new Error("No internal sink is specified, nor could an external sink be found"))}}),(function(t){return function(){return t(e)}}))}))},fy=function(e){Sl.getState(e).each((function(e){Sm.repositionMenus(e)}))},dy=(Sc=o([on("dom"),on("fetch"),ka("onOpen"),Ta("onExecute"),ln("getHotspot",ye.some),ln("getAnchorOverrides",o({})),ln("layouts",ye.none()),gs("dropdownBehaviours",[sm,ny,nm,am]),on("toggleClass"),ln("eventOrder",{}),Z("lazySink"),ln("matchWidth",!1),ln("useMinWidth",!1),Z("role")].concat(Iv())),tm=o([Tc({schema:[xa()],name:"menu",defaults:function(e){return{onExecute:e.onExecute}}}),oy()]),uf({name:"Dropdown",configFields:Sc(),partFields:tm(),factory:function(e,t,r,o){function i(e){Sl.getState(e).each((function(e){Sm.highlightPrimary(e)}))}function a(e,t){return Yr(e),ye.some(!0)}var u,c={expand:function(t){sm.isOn(t)||Mv(e,(function(e){return e}),t,o,n,xb.HighlightNone).get(n)},open:function(t){sm.isOn(t)||Mv(e,(function(e){return e}),t,o,n,xb.HighlightFirst).get(n)},isOpen:sm.isOn,close:function(t){sm.isOn(t)&&Mv(e,(function(e){return e}),t,o,n,xb.HighlightFirst).get(n)},repositionMenus:function(e){sm.isOn(e)&&zv(e)}};return{uid:e.uid,dom:e.dom,components:t,behaviours:Bl(e.dropdownBehaviours,[sm.config({toggleClass:e.toggleClass,aria:{mode:"expanded"}}),ny.config({others:{sandbox:function(t){return Pv(e,t,{onOpen:function(){sm.on(t)},onClose:function(){sm.off(t)}})}}}),nm.config({mode:"special",onSpace:a,onEnter:a,onDown:function(e,t){var n;return dy.isOpen(e)?(n=ny.getCoupled(e,"sandbox"),i(n)):dy.open(e),ye.some(!0)},onEscape:function(e,t){return dy.isOpen(e)?(dy.close(e),ye.some(!0)):ye.none()}}),am.config({})]),events:Cd(ye.some((function(t){Mv(e,(function(e){return e}),t,o,i,xb.HighlightFirst).get(n)}))),eventOrder:d(d({},e.eventOrder),((t={})[Er()]=["disabling","toggling","alloy.base.behaviour"],t)),apis:c,domModification:{attributes:d(d({"aria-haspopup":"true"},e.role.fold((function(){return{}}),(function(e){return{role:e}}))),"button"===e.dom.tag?{type:(u="type",yt(e.dom,"attributes").bind((function(e){return yt(e,u)})).getOr("button"))}:{})}}},apis:{open:function(e,t){return e.open(t)},expand:function(e,t){return e.expand(t)},close:function(e,t){return e.close(t)},isOpen:function(e,t){return e.isOpen(t)},repositionMenus:function(e,t){return e.repositionMenus(t)}}})),my=Ba({fields:[],name:"unselecting",active:Object.freeze({events:function(e){return Go([no(xr(),o(!0))])},exhibit:function(e,t){return So({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})}})}),gy=Oi("color-input-change"),hy=Oi("color-swatch-change"),py=Oi("color-picker-cancel"),vy=function(e,t,n){return{hue:o(e),saturation:o(t),value:o(n)}},by=o(Oi("rgb-hex-update")),yy=o(Oi("slider-update")),wy=o(Oi("palette-update")),xy=Xn().deviceType.isTouch(),Cy=(Xd=Gl({schema:[on("dom")],name:"label"}),Yn=Fv("top-left"),qd=Fv("top"),Wl=Fv("top-right"),$d=Fv("right"),ql=Fv("bottom-right"),Wn=Fv("bottom"),Ys=Fv("bottom-left"),jl=[Xd,Fv("left"),$d,qd,Wn,Yn,Wl,Ys,ql,$l({name:"thumb",defaults:o({dom:{styles:{position:"absolute"}}}),overrides:function(e){return{events:Go([io(ir(),e,"spectrum"),io(ar(),e,"spectrum"),io(ur(),e,"spectrum"),io(cr(),e,"spectrum"),io(sr(),e,"spectrum"),io(fr(),e,"spectrum")])}}}),$l({schema:[dn("mouseIsDown",(function(){return mn(!1)}))],name:"spectrum",overrides:function(e){function t(t,r){return n.getValueFromEvent(r).map((function(r){return n.setValueFrom(t,e,r)}))}var n=e.model.manager,r=Go([Xo(ir(),t),Xo(ar(),t)]),o=Go([Xo(cr(),t),Xo(sr(),(function(n,r){e.mouseIsDown.get()&&t(n,r)}))]);return{behaviours:ac(xy?[]:[nm.config({mode:"special",onLeft:function(t){return n.onLeft(t,e)},onRight:function(t){return n.onRight(t,e)},onUp:function(t){return n.onUp(t,e)},onDown:function(t){return n.onDown(t,e)}}),am.config({})]),events:xy?r:o}}})],Xn().deviceType.isTouch()),Sy=o("slider.change.value"),ky=function(e){return e.model.minX},Ty=function(e){return e.model.minY},Ey=function(e){return e.model.maxX},Oy=function(e){return e.model.maxY},Ny=function(e){return qv(e,Ey,ky)},Ay=function(e){return qv(e,Oy,Ty)},Dy=function(e){return e.stepSize},_y=function(e){return e.snapToGrid},Ry=function(e){return e.snapStart},By=function(e){return e.rounded},My=function(e){return Xv(e,"left")},Py=function(e){return Xv(e,"right")},zy=function(e){return Xv(e,"top")},Iy=function(e){return Xv(e,"bottom")},Ly=function(e){return e.model.value.get()},Fy=function(e,t,n,r){return e<t?e:n<e?n:e===t?t-1:Math.max(t,e-r)},Hy=function(e,t,n,r){return n<e?e:e<t?t:e===n?n+1:Math.min(n,e+r)},Vy=function(e){var t,n,r,o,i=e.min,a=e.max,u=e.range,c=e.value,s=e.step,l=e.snap,f=e.snapStart,d=e.rounded,m=e.hasMinEdge,g=e.hasMaxEdge,h=e.minBound,p=e.maxBound;e=e.screenRange,m=m?i-1:i,g=g?a+1:a;return c<h?m:p<c?g:(h=h,p=Math.min(p,Math.max(c,h))-h,c=Qv(p/e*u+i,m,g),l&&i<=c&&c<=a?(t=c,n=i,r=a,o=s,f.fold((function(){var e=Math.round((t-n)/o)*o;return Qv(n+e,n-1,r+1)}),(function(e){var n=Math.round((t-e)%o/o),i=Math.floor((t-e)/o),a=Math.floor((r-e)/o);a=Math.min(a,i+n);return Math.max(e,e+a*o)}))):d?Math.round(c):c)},Uy=function(e){var t=e.min,n=e.max,r=e.range,o=e.value,i=e.hasMinEdge,a=e.hasMaxEdge,u=e.maxBound,c=e.maxOffset,s=e.centerMinEdge;e=e.centerMaxEdge;return o<t?i?0:s:n<o?a?u:e:(o-t)/r*c},jy="top",Wy="left",qy=function(e){return e.element().dom().getBoundingClientRect()},$y=function(e,t){return e[t]},Gy=function(e){return e=qy(e),$y(e,Wy)},Xy=function(e){return e=qy(e),$y(e,"right")},Yy=function(e){return e=qy(e),$y(e,jy)},Ky=function(e){return e=qy(e),$y(e,"bottom")},Jy=function(e){return e=qy(e),$y(e,"width")},Zy=function(e){return e=qy(e),$y(e,"height")},Qy=function(e,t){return e=qy(e),t=qy(t),($y(e,Wy)+$y(e,"right"))/2-$y(t,Wy)},ew=function(e,t){return e=qy(e),t=qy(t),($y(e,jy)+$y(e,"bottom"))/2-$y(t,jy)},tw=function(e,t){Xr(e,Sy(),{value:t})},nw=function(e){return{x:o(e)}},rw=(em=tb(-1),Pu=tb(1),Wd=ye.none,Sc=ye.none,tm={"top-left":ye.none(),top:ye.none(),"top-right":ye.none(),right:ye.some((function(e,t){Zv(e,Yv(jv(t)))})),"bottom-right":ye.none(),bottom:ye.none(),"bottom-left":ye.none(),left:ye.some((function(e,t){Zv(e,Yv(Vv(t)))}))},Xd=Object.freeze({setValueFrom:function(e,t,n){return t=eb(e,t,n),n=nw(t),tw(e,n),t},setToMin:function(e,t){t=ky(t),tw(e,nw(t))},setToMax:function(e,t){t=Ey(t),tw(e,nw(t))},findValueOfOffset:eb,getValueFromEvent:function(e){return Hv(e).map((function(e){return e.left()}))},findPositionOfValue:nb,setPositionFromValue:function(e,t,n,r){var o=Ly(n);o=nb(e,r.getSpectrum(e),o.x(),r.getLeftEdge(e),r.getRightEdge(e),n),r=nu(t.element())/2;oa(t.element(),"left",o-r+"px")},onLeft:em,onRight:Pu,onUp:Wd,onDown:Sc,edgeActions:tm}),function(e,t){Xr(e,Sy(),{value:t})}),ow=function(e){return{y:o(e)}},iw=($d=ye.none,qd=ye.none,Wn=ob(-1),Yn=ob(1),Wl={"top-left":ye.none(),top:ye.some((function(e,t){Zv(e,Kv(Uv(t)))})),"top-right":ye.none(),right:ye.none(),"bottom-right":ye.none(),bottom:ye.some((function(e,t){Zv(e,Kv(Wv(t)))})),"bottom-left":ye.none(),left:ye.none()},Ys=Object.freeze({setValueFrom:function(e,t,n){return t=rb(e,t,n),n=ow(t),rw(e,n),t},setToMin:function(e,t){t=Ty(t),rw(e,ow(t))},setToMax:function(e,t){t=Oy(t),rw(e,ow(t))},findValueOfOffset:rb,getValueFromEvent:function(e){return Hv(e).map((function(e){return e.top()}))},findPositionOfValue:ib,setPositionFromValue:function(e,t,n,r){var o=Ly(n);o=ib(e,r.getSpectrum(e),o.y(),r.getTopEdge(e),r.getBottomEdge(e),n),r=Ya(t.element())/2;oa(t.element(),"top",o-r+"px")},onLeft:$d,onRight:qd,onUp:Wn,onDown:Yn,edgeActions:Wl}),function(e,t){Xr(e,Sy(),{value:t})}),aw=function(e,t){return{x:o(e),y:o(t)}},uw=(ql=Hv,em=ab(-1,!1),Pu=ab(1,!1),Wd=ab(-1,!0),Sc=ab(1,!0),tm={"top-left":ye.some((function(e,t){Zv(e,Jv(Vv(t),Uv(t)))})),top:ye.some((function(e,t){Zv(e,Jv($v(t),Uv(t)))})),"top-right":ye.some((function(e,t){Zv(e,Jv(jv(t),Uv(t)))})),right:ye.some((function(e,t){Zv(e,Jv(jv(t),Gv(t)))})),"bottom-right":ye.some((function(e,t){Zv(e,Jv(jv(t),Wv(t)))})),bottom:ye.some((function(e,t){Zv(e,Jv($v(t),Wv(t)))})),"bottom-left":ye.some((function(e,t){Zv(e,Jv(Vv(t),Wv(t)))})),left:ye.some((function(e,t){Zv(e,Jv(Vv(t),Gv(t)))}))},$d=Object.freeze({setValueFrom:function(e,t,n){var r=eb(e,t,n.left());t=rb(e,t,n.top()),n=aw(r,t);return iw(e,n),n},setToMin:function(e,t){var n=ky(t);t=Ty(t);iw(e,aw(n,t))},setToMax:function(e,t){var n=Ey(t);t=Oy(t);iw(e,aw(n,t))},getValueFromEvent:ql,setPositionFromValue:function(e,t,n,r){var o=Ly(n),i=nb(e,r.getSpectrum(e),o.x(),r.getLeftEdge(e),r.getRightEdge(e),n);o=ib(e,r.getSpectrum(e),o.y(),r.getTopEdge(e),r.getBottomEdge(e),n),r=nu(t.element())/2,e=Ya(t.element())/2;oa(t.element(),"left",i-r+"px"),oa(t.element(),"top",o-e+"px")},onLeft:em,onRight:Pu,onUp:Wd,onDown:Sc,edgeActions:tm}),qd=Xn().deviceType.isTouch(),Wn=[ln("stepSize",1),ln("onChange",n),ln("onChoose",n),ln("onInit",n),ln("onDragStart",n),ln("onDragEnd",n),ln("snapToGrid",!1),ln("rounded",!0),Z("snapStart"),an("model",U("mode",{x:[ln("minX",0),ln("maxX",100),dn("value",(function(e){return mn(e.mode.minX)})),on("getInitialValue"),Bu("manager",Xd)],y:[ln("minY",0),ln("maxY",100),dn("value",(function(e){return mn(e.mode.minY)})),on("getInitialValue"),Bu("manager",Ys)],xy:[ln("minX",0),ln("maxX",100),ln("minY",0),ln("maxY",100),dn("value",(function(e){return mn({x:o(e.mode.minX),y:o(e.mode.minY)})})),on("getInitialValue"),Bu("manager",$d)]})),gs("sliderBehaviours",[nm,_l])].concat(qd?[]:[dn("mouseIsDown",(function(){return mn(!1)}))]),Xn().deviceType.isTouch()),cw=uf({name:"Slider",configFields:Wn,partFields:jl,factory:function(e,t,n,r){function i(t){return Ss(t,e,"thumb")}function a(t,n){g.setPositionFromValue(t,n,e,{getLeftEdge:s,getRightEdge:l,getTopEdge:f,getBottomEdge:d,getSpectrum:c})}function u(t,n){m.value.set(n);var r=i(t);return a(t,r),e.onChange(t,r,n),ye.some(!0)}var c=function(t){return Ss(t,e,"spectrum")},s=function(t){return Ql(t,e,"left-edge")},l=function(t){return Ql(t,e,"right-edge")},f=function(t){return Ql(t,e,"top-edge")},d=function(t){return Ql(t,e,"bottom-edge")},m=e.model,g=m.manager,h=[Xo(ir(),(function(t,n){e.onDragStart(t,i(t))})),Xo(ur(),(function(t,n){e.onDragEnd(t,i(t))}))],p=[Xo(cr(),(function(t,n){n.stop(),e.onDragStart(t,i(t)),e.mouseIsDown.set(!0)})),Xo(fr(),(function(t,n){e.onDragEnd(t,i(t))}))];h=uw?h:p;return{uid:e.uid,dom:e.dom,components:t,behaviours:Bl(e.sliderBehaviours,Ue([uw?[]:[nm.config({mode:"special",focusIn:function(t){return Ql(t,e,"spectrum").map(nm.focusIn).map(o(!0))}})],[_l.config({store:{mode:"manual",getValue:function(e){return m.value.get()}}}),fc.config({channels:{"mouse.released":{onReceive:function(t,n){function r(){Ql(t,e,"thumb").each((function(n){var r=m.value.get();e.onChoose(t,n,r)}))}var o;uw?r():(o=e.mouseIsDown.get(),e.mouseIsDown.set(!1),o&&r())}}}})]])),events:Go([Xo(Sy(),(function(e,t){u(e,t.event().value())})),Zo((function(t,n){var r=m.getInitialValue(),o=(r=(m.value.set(r),i(t)),a(t,r),c(t));e.onInit(t,r,o,m.value.get())}))].concat(h)),apis:{resetToMin:function(t){g.setToMin(t,e)},resetToMax:function(t){g.setToMax(t,e)},changeValue:u,refresh:a},domModification:{styles:{position:"relative"}}}},apis:{resetToMin:function(e,t){e.resetToMin(t)},resetToMax:function(e,t){e.resetToMax(t)},refresh:function(e,t){e.refresh(t)}}}),sw=function(e,t){var n=cw.parts().spectrum({dom:{tag:"div",classes:[t("hue-slider-spectrum")],attributes:{role:"presentation"}}}),r=cw.parts().thumb({dom:{tag:"div",classes:[t("hue-slider-thumb")],attributes:{role:"presentation"}}});return cw.sketch({dom:{tag:"div",classes:[t("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:o({y:o(0)})},components:[n,r],sliderBehaviours:ac([am.config({})]),onChange:function(e,t,n){Xr(e,yy(),{value:n})}})},lw=[gs("formBehaviours",[_l])],fw=function(e,t){return e.fold((function(){return we.error(t)}),we.value)},dw={getField:xo((function(e,t,n){return e.getField(t,n)})),sketch:function(e){t=[];var t,n={field:function(e,n){return t.push(e),xs("form",ub(e),n)},record:function(){return t}};e=e(n),n=n.record(),n=Me(n,(function(e){return $l({name:e,pname:ub(e)})}));return Os("form",lw,n,cb,e)}},mw=Oi("valid-input"),gw=Oi("invalid-input"),hw=Oi("validating-input"),pw="colorcustom.rgb.",vw=function(e,t,r,i){function a(r,o,i,a,u){var c=e(pw+"range");i=[Vb.parts().label({dom:{tag:"label",innerHtml:i,attributes:{"aria-label":a}}}),Vb.parts().field({data:u,factory:jb,inputAttributes:d({type:"text"},"hex"===o?{"aria-live":"polite"}:{}),inputClasses:[t("textfield")],inputBehaviours:ac([s(o,r),Jb.config({})]),onSetValue:function(e){Kb.isInvalid(e)&&Kb.run(e).get(n)}})],a="hex"!==o?[Vb.parts()["aria-descriptor"]({text:c})]:[];return{dom:{tag:"div",attributes:{role:"presentation"}},components:i.concat(a)}}function u(e,t){var n=t.red(),r=t.green();t=t.blue();_l.setValue(e,{red:n,green:r,blue:t})}function c(e,t){l.getOpt(e).each((function(e){oa(e.element(),"background-color","#"+t.value())}))}var s=function(n,r){return Kb.config({invalidClass:t("invalid"),notify:{onValidate:function(e){Xr(e,hw,{type:n})},onValid:function(e){Xr(e,mw,{type:n,value:_l.getValue(e)})},onInvalid:function(e){Xr(e,gw,{type:n,value:_l.getValue(e)})}},validator:{validate:function(t){return t=_l.getValue(t),t=r(t)?we.value(!0):we.error(e("aria.input.invalid")),Xb.pure(t)},validateOnLoad:!1}})},l=Dm({dom:{tag:"div",classes:[t("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}});return af({factory:function(){function n(e){return g[e]().get()}function s(e,t){"hex"!==(t=t.event()).type()?h(t.type(),ye.none()):i(e)}function f(e,t,n){n=parseInt(n,10),h(t,ye.some(n)),p().each((function(t){var n,r;n=e,r=Ph(t),dw.getField(n,"hex").each((function(e){am.isFocused(e)||_l.setValue(n,{hex:r.value()})})),c(e,r)}))}function d(e,t){var n,o,i;"hex"===(t=t.event()).type()?(n=e,o=t.value(),r(n),i=Dh(o),h("hex",ye.some(o)),o=Th(i),u(n,o),v(o),Xr(n,by(),{hex:i}),c(n,i)):f(e,t.type(),t.value())}function m(t){return{label:e(pw+t+".label"),description:e(pw+t+".description")}}var g={red:o(mn(ye.some(255))),green:o(mn(ye.some(255))),blue:o(mn(ye.some(255))),hex:o(mn(ye.some("ffffff")))},h=function(e,t){g[e]().set(t)},p=function(){return n("red").bind((function(e){return n("green").bind((function(t){return n("blue").map((function(n){return Vh(e,t,n,1)}))}))}))},v=function(e){var t=e.red(),n=e.green();e=e.blue();h("red",ye.some(t)),h("green",ye.some(n)),h("blue",ye.some(e))},b=m("red"),y=m("green"),w=m("blue"),x=m("hex");return ut(dw.sketch((function(n){return{dom:{tag:"form",classes:[t("rgb-form")],attributes:{"aria-label":e("aria.color.picker")}},components:[n.field("red",Vb.sketch(a(kh,"red",b.label,b.description,255))),n.field("green",Vb.sketch(a(kh,"green",y.label,y.description,255))),n.field("blue",Vb.sketch(a(kh,"blue",w.label,w.description,255))),n.field("hex",Vb.sketch(a(Sh,"hex",x.label,x.description,"ffffff"))),l.asSpec()],formBehaviours:ac([Kb.config({invalidClass:t("form-invalid")}),im("rgb-form-events",[Xo(mw,d),Xo(gw,s),Xo(hw,s)])])}})),{apis:{updateHex:function(e,t){_l.setValue(e,{hex:t.value()});var n=e,r=t;r=Th(r),u(n,r),v(r),c(e,t)}}})},name:"RgbForm",configFields:[],apis:{updateHex:function(e,t,n){e.updateHex(t,n)}},extraApis:{}})},bw=function(e,t){function n(e,t){var n=e.width,r=e.height;null!==(e=e.getContext("2d"))&&(e.fillStyle=t,e.fillRect(0,0,n,r),(t=e.createLinearGradient(0,0,n,0)).addColorStop(0,"rgba(255,255,255,1)"),t.addColorStop(1,"rgba(255,255,255,0)"),e.fillStyle=t,e.fillRect(0,0,n,r),(t=e.createLinearGradient(0,0,0,r)).addColorStop(0,"rgba(0,0,0,0)"),t.addColorStop(1,"rgba(0,0,0,1)"),e.fillStyle=t,e.fillRect(0,0,n,r))}var r=cw.parts().spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[t("sv-palette-spectrum")]}}),i=cw.parts().thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[t("sv-palette-thumb")],innerHtml:"<div class="+t("sv-palette-inner-thumb")+' role="presentation"></div>'}});return af({factory:function(e){var a=o({x:o(0),y:o(0)}),u=ac([Od.config({find:ye.some}),am.config({})]);return cw.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[t("sv-palette")]},model:{mode:"xy",getInitialValue:a},rounded:!1,components:[r,i],onChange:function(e,t,n){Xr(e,wy(),{value:n})},onInit:function(e,t,r,o){n(r.element().dom(),Oh(Wh()))},sliderBehaviours:u})},name:"SaturationBrightnessPalette",configFields:[],apis:{setRgba:function(e,t,r){var o=t;o=t.components()[0].element().dom(),n(o,Oh(r))}},extraApis:{}})},yw=function(e,t){return af({name:"ColourPicker",configFields:[on("dom"),ln("onValidHex",n),ln("onInvalidHex",n)],factory:function(n){function r(e,t){d.getOpt(e).each((function(e){var n=Th(t);f.paletteRgba().set(n),l.setRgba(e,n)}))}function i(e,t){m.getOpt(e).each((function(e){s.updateHex(e,t)}))}function a(e,t,n){Pe(n,(function(n){n(e,t)}))}var u,c,s=vw(e,t,n.onValidHex,n.onInvalidHex),l=bw(e,t),f={paletteRgba:o(mn(Wh()))},d=Dm(l.sketch({})),m=Dm(s.sketch({}));return{uid:n.uid,dom:n.dom,components:[d.asSpec(),sw(e,t),m.asSpec()],behaviours:ac([im("colour-picker-events",[Xo(wy(),(c=[i],function(e,t){t=t.event().value();var n=function(e){var t=0,n=e.red()/255,r=e.green()/255,o=(e=e.blue()/255,Math.min(n,Math.min(r,e))),i=Math.max(n,Math.max(r,e));if(o===i)return vy(0,0,100*(t=o));var a=n===o?3:e===o?1:5,u=(i-o)/i;t=i;return vy(Math.round(60*(a-(n===o?r-e:e===o?n-r:e-n)/(i-o))),Math.round(100*u),Math.round(100*t))}(f.paletteRgba().get());n=vy(n.hue(),t.x(),100-t.y()),t=Uh(n),n=Ph(t);a(e,n,c)})),Xo(yy(),(u=[r,i],function(e,t){t=function(e){return e=vy((100-e)/100*360,100,100),e=Uh(e),Ph(e)}(t.event().value().y()),a(e,t,u)}))]),Od.config({find:function(e){return m.getOpt(e)}}),nm.config({mode:"acyclic"})])}}})},ww=function(){return Od.config({find:ye.some})},xw=function(e){return Od.config({find:e.getOpt})},Cw=function(e){return Od.config({find:function(t){return ci(t.element(),e).bind((function(e){return t.getSystem().getByDom(e).toOption()}))}})},Sw={"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"},kw=function(e){return Sw[e]},Tw=tinymce.util.Tools.resolve("tinymce.Resource"),Ew=zt([ln("preprocess",i),ln("postprocess",i)]),Ow={memento:function(e,t){var n=Yt("RepresentingConfigs.memento processors",Ew,t);return _l.config({store:{mode:"manual",getValue:function(t){return t=e.get(t),t=_l.getValue(t),n.postprocess(t)},setValue:function(t,r){r=n.preprocess(r),t=e.get(t),_l.setValue(t,r)}}})},withElement:fb,withComp:lb,domValue:function(e){return fb(e,la,fa)},domHtml:function(e){return fb(e,go,ho)},memory:function(e){return _l.config({store:{mode:"memory",initialValue:e}})}},Nw=".jpg,.jpeg,.png,.gif",Aw=Oi("alloy-fake-before-tabstop"),Dw=Oi("alloy-fake-after-tabstop"),_w={isPseudoStop:function(e){return Vp(e,["."+Aw,"."+Dw].join(","),o(!1))},onFocus:function(e,t){t=t.element(),Zi(t,Aw)?gb(e,!0):Zi(t,Dw)&&gb(e,!1)},craft:function(e){return{dom:{tag:"div",classes:["tox-navobj"]},components:[mb([Aw]),e,mb([Dw])],behaviours:ac([Cw(1)])}}},Rw=!(Xn().browser.isIE()||Xn().browser.isEdge());function Bw(e,n){return zw(t.document.createElement("canvas"),e,n)}function Mw(e){var t=Bw(e.width,e.height);return Pw(t).drawImage(e,0,0),t}function Pw(e){return e.getContext("2d")}function zw(e,t,n){return e.width=t,e.height=n,e}function Iw(e){return e.naturalWidth||e.width}function Lw(e){return e.naturalHeight||e.height}var Fw,Hw,Vw=window.Promise||(Fw=Uw.immediateFn||"function"==typeof window.setImmediate&&window.setImmediate||function(e){t.setTimeout(e,1)},Hw=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},Uw.prototype.catch=function(e){return this.then(null,e)},Uw.prototype.then=function(e,t){var n=this;return new Uw((function(r,o){Ww.call(n,new Xw(e,t,r,o))}))},Uw.all=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Array.prototype.slice.call(1===e.length&&Hw(e[0])?e[0]:e);return new Uw((function(e,t){if(0===n.length)return e([]);for(var r=n.length,o=0;o<n.length;o++)!function o(i,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var u=a.then;if("function"==typeof u)return void u.call(a,(function(e){o(i,e)}),t)}n[i]=a,0==--r&&e(n)}catch(a){t(a)}}(o,n[o])}))},Uw.resolve=function(e){return e&&"object"==typeof e&&e.constructor===Uw?e:new Uw((function(t){t(e)}))},Uw.reject=function(e){return new Uw((function(t,n){n(e)}))},Uw.race=function(e){return new Uw((function(t,n){for(var r=0,o=e;r<o.length;r++)o[r].then(t,n)}))},Uw);function Uw(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=[],Yw(e,jw(qw,this),jw($w,this))}function jw(e,t){return function(){return e.apply(t,arguments)}}function Ww(e){var t=this;null===this._state?this._deferreds.push(e):Fw((function(){var n,r=t._state?e.onFulfilled:e.onRejected;if(null===r)(t._state?e.resolve:e.reject)(t._value);else{try{n=r(t._value)}catch(n){return void e.reject(n)}e.resolve(n)}}))}function qw(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 Yw(jw(t,e),jw(qw,this),jw($w,this))}this._state=!0,this._value=e,Gw.call(this)}catch(e){$w.call(this,e)}}function $w(e){this._state=!1,this._value=e,Gw.call(this)}function Gw(){for(var e=0,t=this._deferreds;e<t.length;e++){var n=t[e];Ww.call(this,n)}this._deferreds=[]}function Xw(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 Yw(e,t,n){var r=!1;try{e((function(e){r||(r=!0,t(e))}),(function(e){r||(r=!0,n(e))}))}catch(e){if(r)return;r=!0,n(e)}}function Kw(e){return new Vw((function(n,r){(function(e){if(e=e.split(","),!(n=/data:([^;]+)/.exec(e[0])))return ye.none();for(var n=n[1],r=(e=e[1],t.atob(e)),o=r.length,i=Math.ceil(o/1024),a=new Array(i),u=0;u<i;++u){for(var c=1024*u,s=Math.min(1024+c,o),l=new Array(s-c),f=c,d=0;f<s;++d,++f)l[d]=r[f].charCodeAt(0);a[u]=new Uint8Array(l)}return ye.some(new t.Blob(a,{type:n}))})(e).fold((function(){r("uri is not base64: "+e)}),n)}))}function Jw(e,n,r){return n=n||"image/png",t.HTMLCanvasElement.prototype.toBlob?new Vw((function(t,o){e.toBlob((function(e){e?t(e):o()}),n,r)})):Kw(e.toDataURL(n,r))}function Zw(e){return n=e,new Vw((function(e,r){var o=t.URL.createObjectURL(n),i=new t.Image,a=function(){i.removeEventListener("load",u),i.removeEventListener("error",c)};function u(){a(),e(i)}function c(){a(),r("Unable to load data of type "+n.type+": "+o)}i.addEventListener("load",u),i.addEventListener("error",c),i.src=o,i.complete&&u()})).then((function(e){t.URL.revokeObjectURL(e.src);var n=Bw(Iw(e),Lw(e));return Pw(n).drawImage(e,0,0),n}));var n}function Qw(e,t,n){var r=t.type;function i(t,n){return e.then((function(e){return e.toDataURL(t||"image/png",n)}))}return{getType:o(r),toBlob:function(){return Vw.resolve(t)},toDataURL:function(){return n},toBase64:function(){return n.split(",")[1]},toAdjustedBlob:function(t,n){return e.then((function(e){return Jw(e,t,n)}))},toAdjustedDataURL:i,toAdjustedBase64:function(e,t){return i(e,t).then((function(e){return e.split(",")[1]}))},toCanvas:function(){return e.then(Mw)}}}function ex(e){return n=e,new Vw((function(e){var r=new t.FileReader;r.onloadend=function(){e(r.result)},r.readAsDataURL(n)})).then((function(t){return Qw(Zw(e),e,t)}));var n}function tx(e,t){return Jw(e,t).then((function(t){return Qw(Vw.resolve(e),t,e.toDataURL())}))}var nx=ex;function rx(e,t,n){return e="string"==typeof e?parseFloat(e):e,n<e?e=n:e<t&&(e=t),e}function ox(){return[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]}var ix=[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 ax(e,t){for(var n=[],r=new Array(25),o=0;o<5;o++){for(var i=0;i<5;i++)n[i]=t[i+5*o];for(i=0;i<5;i++){for(var a=0,u=0;u<5;u++)a+=e[i+5*u]*n[u];r[i+5*o]=a}}return r}function ux(e,t){return e.toCanvas().then((function(n){var r=e.getType(),o=t,i=Pw(n);return o=function(e,t){for(var n,r,o,i,a=e.data,u=t[0],c=t[1],s=t[2],l=t[3],f=t[4],d=t[5],m=t[6],g=t[7],h=t[8],p=t[9],v=t[10],b=t[11],y=t[12],w=t[13],x=t[14],C=t[15],S=t[16],k=t[17],T=t[18],E=t[19],O=0;O<a.length;O+=4)n=a[O],r=a[O+1],o=a[O+2],i=a[O+3],a[O]=n*u+r*c+o*s+i*l+f,a[O+1]=n*d+r*m+o*g+i*h+p,a[O+2]=n*v+r*b+o*y+i*w+x,a[O+3]=n*C+r*S+o*k+i*T+E;return e}(i.getImageData(0,0,n.width,n.height),o),i.putImageData(o,0,0),tx(n,r)}))}function cx(e,t){return e.toCanvas().then((function(n){return n=n,r=e.getType(),o=t,i=Pw(n),a=i.getImageData(0,0,n.width,n.height),u=i.getImageData(0,0,n.width,n.height),u=function(e,t,n){function r(e,t,n){return n<e?e=n:e<t&&(e=t),e}for(var o=Math.round(Math.sqrt(n.length)),i=Math.floor(o/2),a=e.data,u=t.data,c=e.width,s=e.height,l=0;l<s;l++)for(var f=0;f<c;f++){for(var d=0,m=0,g=0,h=0;h<o;h++)for(var p=0;p<o;p++){var v=r(f+p-i,0,c-1),b=(v=4*(r(l+h-i,0,s-1)*c+v),n[h*o+p]);d+=a[v]*b,m+=a[1+v]*b,g+=a[2+v]*b}var y=4*(l*c+f);u[y]=r(d,0,255),u[1+y]=r(m,0,255),u[2+y]=r(g,0,255)}return t}(a,u,o),i.putImageData(u,0,0),tx(n,r);var r,o,i,a,u}))}function sx(e){return function(t,n){return ux(t,e(ox(),n))}}lx=[-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];var lx,fx,dx,mx=function(e){return ux(e,lx)},gx=sx((function(e,t){return ax(e,[1,0,0,0,t=rx(255*t,-255,255),0,1,0,0,t,0,0,1,0,t,0,0,0,1,0,0,0,0,0,1])})),hx=sx((function(e,t){var n;return t=rx(t,-1,1),ax(e,[(n=(t*=100)<0?127+t/100*127:127*(n=0===(n=t%1)?ix[t]:ix[Math.floor(t)]*(1-n)+ix[Math.floor(t)+1]*n)+127)/127,0,0,0,.5*(127-n),0,n/127,0,0,.5*(127-n),0,0,n/127,0,.5*(127-n),0,0,0,1,0,0,0,0,0,1])})),px=(fx=[0,-1,0,-1,5,-1,0,-1,0],function(e){return cx(e,fx)}),vx=(dx=function(e,t){return 255*Math.pow(e/255,1-t)},function(e,t){return e.toCanvas().then((function(n){return bx(n,e.getType(),t)}))});function bx(e,t,n){for(var r=Pw(e),o=new Array(256),i=0;i<o.length;i++)o[i]=dx(i,n);var a=function(e,t){for(var n=e.data,r=0;r<n.length;r+=4)n[r]=t[n[r]],n[r+1]=t[n[r+1]],n[r+2]=t[n[r+2]];return e}(r.getImageData(0,0,e.width,e.height),o);return r.putImageData(a,0,0),tx(e,t)}function yx(e,t,n){var r,o,i,a=Iw(e),u=Lw(e),c=(a=t/a,u=n/u,!1);(a<.5||2<a)&&(a=a<.5?.5:2,c=!0),(u<.5||2<u)&&(u=u<.5?.5:2,c=!0),r=e,o=a,i=u,e=new Vw((function(e){var t=Iw(r),n=Lw(r),a=Math.floor(t*o),u=Math.floor(n*i),c=Bw(a,u);Pw(c).drawImage(r,0,0,t,n,0,0,a,u),e(c)}));return c?e.then((function(e){return yx(e,t,n)})):e}function wx(e,t){return e.toCanvas().then((function(n){var r=e.getType(),o=t,i=Bw(n.width,n.height),a=Pw(i),u=0,c=0;return 90!==(o=o<0?360+o:o)&&270!==o||zw(i,i.height,i.width),90!==o&&180!==o||(u=i.width),270!==o&&180!==o||(c=i.height),a.translate(u,c),a.rotate(o*Math.PI/180),a.drawImage(n,0,0),tx(i,r)}))}function xx(e,t){return e.toCanvas().then((function(n){var r=e.getType(),o=t,i=Bw(n.width,n.height),a=Pw(i);return"v"===o?(a.scale(1,-1),a.drawImage(n,0,-i.height)):(a.scale(-1,1),a.drawImage(n,-i.width,0)),tx(i,r)}))}function Cx(e,t,n,r,o){return e.toCanvas().then((function(i){var a=e.getType(),u=t,c=n,s=r;return Pw(s=Bw(s,o)).drawImage(i,-u,-c),tx(s,a)}))}function Sx(e,t){return d({dom:{tag:"span",innerHtml:e,classes:["tox-icon","tox-tbtn__icon-wrap"]}},t)}function kx(e){return"separator"===e.type}function Tx(e,t,n,r){var o=Oi("primary-menu");if(0===(e=nC(e,n.shared.providers.menuItems())).items.length)return ye.none();r=Jp(o,e.items,t,n,r);var i=Qe(e.menus,(function(e,r){return Jp(r,e,t,n,!1)}));i=ut(i,wt(o,r));return ye.from(Sm.tieredData(o,i,e.expansions))}function Ex(e){return{isDisabled:function(){return uh.isDisabled(e)},setDisabled:function(t){return uh.set(e,t)},setActive:function(t){var n=e.element();t?(Yi(n,"tox-tbtn--enabled"),wi(n,"aria-pressed",!0)):(Ji(n,"tox-tbtn--enabled"),Si(n,"aria-pressed"))},isActive:function(){return Zi(e.element(),"tox-tbtn--enabled")}}}function Ox(e,t,n,r){return Jx({text:e.text,icon:e.icon,tooltip:e.tooltip,role:r,fetch:function(t){e.fetch((function(e){t(Tx(e,dh.CLOSE_ON_EXECUTE,n,!1))}))},onSetup:e.onSetup,getApi:Ex,columns:1,presets:"normal",classes:[],dropdownBehaviours:[Jb.config({})]},t,n.shared)}function Nx(e,t,n){return function(r){r(Me(e,(function(e){var r,o,i=e.text.fold((function(){return{}}),(function(e){return{text:e}}));return d(d({type:e.type},i),{onAction:function(e){n.shared.getSink().each((function(e){t().getOpt(e).each((function(e){dc(e.element()),Xr(e,Pb,{name:o.name,value:o.storage.get()})}))}));var r=!e.isActive();e.setActive(r),o.storage.set(r)},onSetup:(r=o=e,function(e){e.setActive(r.storage.get())})})})))}}function Ax(e,t,n,r){void 0===r&&(r=[]);var o={tag:"button",classes:["tox-tbtn"],attributes:e.tooltip.map((function(e){return{"aria-label":n.translate(e),title:n.translate(e)}})).getOr({})},i=e.icon.map((function(e){return Wx(e,n.icons)}));i=hh([i]);return rC(e,t,r,o,i)}function Dx(e,n){return function(r){"custom"===n?Xr(r,Pb,{name:e,value:{}}):"submit"===n?Gr(r,zb):"cancel"===n?Gr(r,Mb):t.console.error("Unknown button type: ",n)}}function _x(e,t){var n,r=Dx(e.name,"custom");return n=ye.none(),e=Vb.parts().field(d({factory:Am},iC(e,ye.some(r),t,[Ow.memory(""),ww()]))),Zb(n,e,[],[])}function Rx(e,t){return $l({factory:Vb,name:e,overrides:function(e){return{fieldBehaviours:ac([im("coupled-input-behaviour",[Xo(vr(),(function(n){Ql(n,e,t).bind(Od.getCurrent).each((function(t){Ql(n,e,"lock").each((function(r){sm.isOn(r)&&e.onLockedChange(n,t,r)}))}))}))])])}}})}function Bx(e,t){function r(e,n,r,o){return Dm(aC({name:e,text:e,disabled:r,primary:o,icon:ye.none(),borderless:!1},n,t))}function i(e,n,r,o){return Dm(oC({name:e,icon:ye.some(e),tooltip:ye.some(n),disabled:o,primary:!1,borderless:!1},r,t))}function a(e,t){e.map((function(e){e=e.get(t),e.hasConfigured(uh)&&uh.disable(e)}))}function u(e,t){e.map((function(e){e=e.get(t),e.hasConfigured(uh)&&uh.enable(e)}))}function c(e,t){x(e),w(e,gC.transform(),{transform:t}),C(e)}function s(e){return function(){X.getOpt(e).each((function(e){rm.set(e,[G])}))}}function l(e,t){x(e),w(e,gC.transformApply(),{transform:t,swap:s(e)}),C(e)}function f(){return Dm({dom:{tag:"div",classes:["tox-spacer"]},behaviours:ac([uh.config({})])})}function d(e,t){return function(n){return e(n,t)}}function m(e,t){t=t,x(e=e),w(e,gC.tempTransform(),{transform:t}),C(e)}function g(e,n,r,i,a){e=cw.parts().label({dom:{tag:"label",classes:["tox-label"],innerHtml:t.translate(e)}});var u=cw.parts().spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}}),c=cw.parts().thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return Dm(cw.sketch({dom:{tag:"div",classes:["tox-slider"],attributes:{role:"presentation"}},model:{mode:"x",minX:r,maxX:a,getInitialValue:o({x:o(i)})},components:[e,u,c],sliderBehaviours:ac([am.config({})]),onChoose:n}))}function h(e,t,n,r,o){e=e,t=t,n=n,r=r,o=o;var i=[S(),z(e,t,n,r,o),k()];return Cb.sketch({dom:b,components:i.map((function(e){return e.asSpec()})),containerBehaviours:ac([im("image-tools-filter-panel-buttons-events",[Xo(hC.disable(),(function(e,t){a(i,e)})),Xo(hC.enable(),(function(e,t){u(i,e)}))])])})}function p(e){return g(e,(function(e,t,n){var r=V.getOpt(e),o=j.getOpt(e),i=U.getOpt(e);r.each((function(t){o.each((function(n){i.each((function(r){var o,i,a,u=_l.getValue(t).x()/100,s=(r=_l.getValue(r).x()/100,_l.getValue(n).x()/100);o=u,i=r,a=s,c(e,(function(e){return Ix(e,o,i,a)}))}))}))}))}),0,100,200)}function v(e,t,n){return function(r){w(r,gC.swap(),{transform:t,swap:function(){X.getOpt(r).each((function(t){rm.set(t,[e]),n(t)}))}})}}var b={tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools-edit-panel"]},y=n,w=function(e,t,n){Xr(e,t,n)},x=function(e){return Gr(e,hC.disable())},C=function(e){return Gr(e,hC.enable())},S=function(){return r("Back",(function(e){return w(e,gC.back(),{swap:s(e)})}),!1,!1)},k=function(){return r("Apply",(function(e){return w(e,gC.apply(),{swap:s(e)})}),!0,!0)},T=[S(),f(),r("Apply",(function(t){l(t,(function(t){var n=e.getRect();return Vx(t,n.x,n.y,n.w,n.h)})),e.hideCrop()}),!1,!0)],E=Cb.sketch({dom:b,components:T.map((function(e){return e.asSpec()})),containerBehaviours:ac([im("image-tools-crop-buttons-events",[Xo(hC.disable(),(function(e,t){a(T,e)})),Xo(hC.enable(),(function(e,t){u(T,e)}))])])}),O=Dm(mC({name:"size",label:ye.none(),constrain:!0,disabled:!1},t)),N=[S(),f(),O,f(),r("Apply",(function(e){O.getOpt(e).each((function(t){t=_l.getValue(t);var n,r,o=parseInt(t.width,10);t=parseInt(t.height,10);n=o,r=t,l(e,(function(e){return Ux(e,n,r)}))}))}),!1,!0)],A=Cb.sketch({dom:b,components:N.map((function(e){return e.asSpec()})),containerBehaviours:ac([im("image-tools-resize-buttons-events",[Xo(hC.disable(),(function(e,t){a(N,e)})),Xo(hC.enable(),(function(e,t){u(N,e)}))])])}),D=d(Hx,"h"),_=d(Hx,"v"),R=d(jx,-90),B=d(jx,90),M=[S(),f(),i("flip-horizontally","Flip horizontally",(function(e){m(e,D)}),!1),i("flip-vertically","Flip vertically",(function(e){m(e,_)}),!1),i("rotate-left","Rotate counterclockwise",(function(e){m(e,R)}),!1),i("rotate-right","Rotate clockwise",(function(e){m(e,B)}),!1),f(),k()],P=Cb.sketch({dom:b,components:M.map((function(e){return e.asSpec()})),containerBehaviours:ac([im("image-tools-fliprotate-buttons-events",[Xo(hC.disable(),(function(e,t){a(M,e)})),Xo(hC.enable(),(function(e,t){u(M,e)}))])])}),z=function(e,t,n,r,o){return g(e,(function(e,n,r){r=d(t,r.x()/100),c(e,r)}),n,r,o)},I=[S(),f(),k()],L=(I=Cb.sketch({dom:b,components:I.map((function(e){return e.asSpec()}))}),h("Brightness",Lx,-100,0,100)),F=h("Contrast",Fx,-100,0,100),H=h("Gamma",zx,-100,0,100),V=p("R"),U=p("G"),j=p("B"),W=[S(),V,U,j,k()],q=(W=Cb.sketch({dom:b,components:W.map((function(e){return e.asSpec()}))}),ye.some(Px)),$=ye.some(Mx),G=(E=[i("crop","Crop",v(E,ye.none(),(function(t){e.showCrop()})),!1),i("resize","Resize",v(A,ye.none(),(function(t){O.getOpt(t).each((function(t){var n=e.getMeasurements(),r=n.width;n=n.height;_l.setValue(t,{width:r,height:n})}))})),!1),i("orientation","Orientation",v(P,ye.none(),y),!1),i("brightness","Brightness",v(L,ye.none(),y),!1),i("sharpen","Sharpen",v(I,q,y),!1),i("contrast","Contrast",v(F,ye.none(),y),!1),i("color-levels","Color levels",v(W,ye.none(),y),!1),i("gamma","Gamma",v(H,ye.none(),y),!1),i("invert","Invert",v(I,$,y),!1)],Cb.sketch({dom:b,components:E.map((function(e){return e.asSpec()}))})),X=(A=Cb.sketch({dom:{tag:"div"},components:[G],containerBehaviours:ac([rm.config({})])}),Dm(A));return{memContainer:X,getApplyButton:function(e){return X.getOpt(e).map((function(e){return e=e.components()[0],e.components()[e.components().length-1]}))}}}var Mx=function(e){return mx(e)},Px=function(e){return px(e)},zx=function(e,t){return vx(e,t)},Ix=function(e,t,n,r){return ux(e,(e=ox(),n=n,r=r,ax(e,[rx(t,0,2),0,0,0,0,0,n=rx(n,0,2),0,0,0,0,0,r=rx(r,0,2),0,0,0,0,0,1,0,0,0,0,0,1])))},Lx=function(e,t){return gx(e,t)},Fx=function(e,t){return hx(e,t)},Hx=xx,Vx=Cx,Ux=function(e,t,n){return o=t,i=n,(r=e).toCanvas().then((function(e){return yx(e,o,i).then((function(e){return tx(e,r.getType())}))}));var r,o,i},jx=wx,Wx=function(e,t){return Sx(Rm(e,t),{})},qx=function(e,t){return Sx(Rm(e,t),{behaviours:ac([rm.config({})])})},$x=function(e,t,n){return{dom:{tag:"span",innerHtml:n.translate(e),classes:[t+"__select-label"]},behaviours:ac([rm.config({})])}},Gx=Oi("toolbar.button.execute"),Xx={"alloy.execute":["disabling","alloy.base.behaviour","toggling","toolbar-button-events"]},Yx=Oi("update-menu-text"),Kx=Oi("update-menu-icon"),Jx=function(e,t,r){function o(e,t){return e=_l.getValue(e),am.focus(e),Xr(e,"keydown",{raw:t.event().raw()}),dy.close(e),ye.some(!0)}var i=mn(n),a=e.text.map((function(e){return Dm($x(e,t,r.providers))})),u=e.icon.map((function(e){return Dm(qx(e,r.providers.icons))})),c=e.role.fold((function(){return{}}),(function(e){return{role:e}})),s=e.tooltip.fold((function(){return{}}),(function(e){return e=r.providers.translate(e),{title:e,"aria-label":e}}));return Dm(dy.sketch(d(d({},c),{dom:{tag:"button",classes:[t,t+"--select"].concat(Me(e.classes,(function(e){return t+"--"+e}))),attributes:d({},s)},components:hh([u.map((function(e){return e.asSpec()})),a.map((function(e){return e.asSpec()})),ye.some({dom:{tag:"div",classes:[t+"__select-chevron"],innerHtml:Rm("chevron-down",r.providers.icons)}})]),matchWidth:!0,useMinWidth:!0,dropdownBehaviours:ac(g(e.dropdownBehaviours,[ch.button(e.disabled),my.config({}),rm.config({}),im("dropdown-events",[lh(e,i),fh(e,i)]),im("menubutton-update-display-text",[Xo(Yx,(function(e,t){a.bind((function(t){return t.getOpt(e)})).each((function(e){rm.set(e,[ma(r.providers.translate(t.event().text()))])}))})),Xo(Kx,(function(e,t){u.bind((function(t){return t.getOpt(e)})).each((function(e){rm.set(e,[qx(t.event().icon(),r.providers.icons)])}))}))])])),eventOrder:ut(Xx,{mousedown:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"]}),sandboxBehaviours:ac([nm.config({mode:"special",onLeft:o,onRight:o})]),lazySink:r.getSink,toggleClass:t+"--active",parts:{menu:Ap(!1,e.columns,e.presets)},fetch:function(){return Xb.nu(e.fetch)}}))).asSpec()},Zx={type:"separator"},Qx=function(e,t){return e=Fe(e,(function(e,n){return xe(n)?""===n?e:"|"===n?0<e.length&&!kx(e[e.length-1])?e.concat([Zx]):e:ot(t,n.toLowerCase())?e.concat([t[n.toLowerCase()]]):e:e.concat([n])}),[]),0<e.length&&kx(e[e.length-1])&&e.pop(),e},eC=function(e,t){return ot(e,"getSubmenuItems")?(t=t,r=(n=e).getSubmenuItems(),r=nC(r,t),{item:n,menus:ut(r.menus,wt(n.value,r.items)),expansions:ut(r.expansions,wt(n.value,n.value))}):{item:e,menus:{},expansions:{}};var n,r},tC=function(e){var t;return kx(e)?e:(t=yt(e,"value").getOrThunk((function(){return Oi("generated-menu-item")})),ut({value:t},e))},nC=function(e,t){return e=Qx(xe(e)?e.split(" "):e,t),Le(e,(function(e,n){return n=tC(n),n=eC(n,t),{menus:ut(e.menus,n.menus),items:[n.item].concat(e.items),expansions:ut(e.expansions,n.expansions)}}),{menus:{},expansions:{},items:[]})},rC=function(e,t,n,r,o){return void 0===n&&(n=[]),t=t.fold((function(){return{}}),(function(e){return{action:e}})),e=d({buttonBehaviours:ac([ch.button(e.disabled),Jb.config({}),im("button press",[ro("click"),ro("mousedown")])].concat(n)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]}},t),n=ut(e,{dom:r}),ut(n,{components:o})},oC=function(e,t,n,r){return void 0===r&&(r=[]),e=Ax(e,ye.some(t),n,r),Am.sketch(e)},iC=function(e,t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o=[]);var i=n.translate(e.text),a=e.icon?e.icon.map((function(e){return Wx(e,n.icons)})):ye.none(),u=a.isSome()?hh([a]):[],c=a.isSome()?{}:{innerHtml:i};a=g(e.primary||e.borderless?["tox-button"]:["tox-button","tox-button--secondary"],a.isSome()?["tox-button--icon"]:[],e.borderless?["tox-button--naked"]:[],o),o=d(d({tag:"button",classes:a},c),{attributes:{title:i}});return rC(e,t,r,o,u)},aC=function(e,t,n,r,o){return void 0===r&&(r=[]),void 0===o&&(o=[]),e=iC(e,ye.some(t),n,r,o),Am.sketch(e)},uC=function(e,n,r){var o,i,a;return"menu"===n?(a=d(d({},a=e),{fetch:Nx(a.items,(function(){return o}),r)}),(o=Dm(Ox(a,"tox-tbtn",r,ye.none()))).asSpec()):"custom"===(a=n)||"cancel"===a||"submit"===a?(i=Dx(e.name,n),e=d(d({},e),{borderless:!1}),aC(e,i,r.shared.providers,[])):void t.console.error("Unknown footer button type: ",n)},cC=(Yn=o([ln("field1Name","field1"),ln("field2Name","field2"),Ea("onLockedChange"),Ca(["lockClass"]),ln("locked",!1),Ml.field("coupledFieldBehaviours",[Od,_l])]),Wl=o([Rx("field1","field2"),Rx("field2","field1"),$l({factory:Am,schema:[on("dom")],name:"lock",overrides:function(e){return{buttonBehaviours:ac([sm.config({selected:e.locked,toggleClass:e.markers.lockClass,aria:{mode:"pressed"}})])}}})]),uf({name:"FormCoupledInputs",configFields:Yn(),partFields:Wl(),factory:function(e,t,n,r){return{uid:e.uid,dom:e.dom,components:t,behaviours:Ml.augment(e.coupledFieldBehaviours,[Od.config({find:ye.some}),_l.config({store:{mode:"manual",getValue:function(t){t=Ts(t,e,["field1","field2"]);var n={};return n[e.field1Name]=_l.getValue(t.field1()),n[e.field2Name]=_l.getValue(t.field2()),n},setValue:function(t,n){t=Ts(t,e,["field1","field2"]),St(n,e.field1Name)&&_l.setValue(t.field1(),n[e.field1Name]),St(n,e.field2Name)&&_l.setValue(t.field2(),n[e.field2Name])}}})]),apis:{getField1:function(t){return Ql(t,e,"field1")},getField2:function(t){return Ql(t,e,"field2")},getLock:function(t){return Ql(t,e,"lock")}}}},apis:{getField1:function(e,t){return e.getField1(t)},getField2:function(e,t){return e.getField2(t)},getLock:function(e,t){return e.getLock(t)}}})),sC=function(e){var t,n=/^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/.exec(e);return null!==n?(t=parseFloat(n[1]),n=n[2],we.value({value:t,unit:n})):we.error(e)},lC=function(e,t){function n(e){return Object.prototype.hasOwnProperty.call(r,e)}var r={"":96,px:96,pt:72,cm:2.54,pc:12,mm:25.4,in:1};return e.unit===t?ye.some(e.value):n(e.unit)&&n(t)?r[e.unit]===r[t]?ye.some(e.value):ye.some(e.value/r[e.unit]*r[t]):ye.none()},fC=function(e){return ye.none()},dC=function(e,t){return function(n){return lC(n,t).map((function(n){return{value:n*e,unit:t}}))}},mC=function(e,t){function n(e){return{dom:{tag:"div",classes:["tox-form__group"]},components:e}}function r(t){return Vb.parts().field({factory:jb,inputClasses:["tox-textfield"],inputBehaviours:ac([uh.config({disabled:e.disabled}),Jb.config({}),im("size-input-events",[Xo(mr(),(function(e,n){Xr(e,a,{isField1:t})})),Xo(br(),(function(t,n){Xr(t,Rb,{name:e.name})}))])]),selectOnFocus:!1})}function o(e){return{dom:{tag:"label",classes:["tox-label"],innerHtml:t.translate(e)}}}var i=fC,a=Oi("ratio-event"),u=cC.parts().lock({dom:{tag:"button",classes:["tox-lock","tox-button","tox-button--naked","tox-button--icon"],attributes:{title:t.translate(e.label.getOr("Constrain proportions"))}},components:[{dom:{tag:"span",classes:["tox-icon","tox-lock-icon__lock"],innerHtml:Rm("lock",t.icons)}},{dom:{tag:"span",classes:["tox-icon","tox-lock-icon__unlock"],innerHtml:Rm("unlock",t.icons)}}],buttonBehaviours:ac([ch.button(e.disabled),Jb.config({})])}),c=cC.parts().field1(n([Vb.parts().label(o("Width")),r(!0)])),s=cC.parts().field2(n([Vb.parts().label(o("Height")),r(!1)]));return cC.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[c,s,n([o(" "),u])]}],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:function(e,t,n){sC(_l.getValue(e)).each((function(e){i(e).each((function(e){var n,r;_l.setValue(t,(r={"":0,px:0,pt:1,mm:1,pc:2,ex:2,em:2,ch:2,rem:2,cm:3,in:4,"%":4},(r=-1!==(r=(e=e).value.toFixed((n=e.unit)in r?r[n]:1)).indexOf(".")?r.replace(/\.?0*$/,""):r)+e.unit))}))}))},coupledFieldBehaviours:ac([uh.config({disabled:e.disabled,onDisabled:function(e){cC.getField1(e).bind(Vb.getField).each(uh.disable),cC.getField2(e).bind(Vb.getField).each(uh.disable),cC.getLock(e).each(uh.disable)},onEnabled:function(e){cC.getField1(e).bind(Vb.getField).each(uh.enable),cC.getField2(e).bind(Vb.getField).each(uh.enable),cC.getLock(e).each(uh.enable)}}),im("size-input-events2",[Xo(a,(function(e,t){t=t.event().isField1();var n=t?cC.getField1(e):cC.getField2(e);t=t?cC.getField2(e):cC.getField1(e),e=n.map(_l.getValue).getOr(""),n=t.map(_l.getValue).getOr("");i=function(e,t){return e=sC(e).toOption(),t=sC(t).toOption(),ku(e,t,(function(e,t){return lC(e,t.unit).map((function(e){return t.value/e})).map((function(e){return dC(e,t.unit)})).getOr(fC)})).getOr(fC)}(e,n)}))])])})},gC={undo:o(Oi("undo")),redo:o(Oi("redo")),zoom:o(Oi("zoom")),back:o(Oi("back")),apply:o(Oi("apply")),swap:o(Oi("swap")),transform:o(Oi("transform")),tempTransform:o(Oi("temp-transform")),transformApply:o(Oi("transform-apply"))},hC=(ql=o("save-state"),em=o("disable"),Pu=o("enable"),{formActionEvent:Pb,saveState:ql,disable:em,enable:Pu}),pC=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),vC=tinymce.util.Tools.resolve("tinymce.geom.Rect"),bC=tinymce.util.Tools.resolve("tinymce.util.Observable"),yC=tinymce.util.Tools.resolve("tinymce.util.Tools"),wC=tinymce.util.Tools.resolve("tinymce.util.VK");function xC(e){var t,n;if(e.changedTouches)for(t="screenX screenY pageX pageY clientX clientY".split(" "),n=0;n<t.length;n++)e[t[n]]=e.changedTouches[0][t[n]]}function CC(e,n){var r,o,i,a,u=n.document||t.document,c=(n=n||{},u.getElementById(n.handle||e)),s=(e=function(e){f=u,d=Math.max,m=f.documentElement,f=f.body,v=d(m.scrollWidth,f.scrollWidth),p=d(m.clientWidth,f.clientWidth),b=d(m.offsetWidth,f.offsetWidth),g=d(m.scrollHeight,f.scrollHeight),h=d(m.clientHeight,f.clientHeight);var f,d,m,g,h,p,v,b={width:v<b?p:v,height:g<d(m.offsetHeight,f.offsetHeight)?h:g};xC(e),e.preventDefault(),o=e.button,p=c,i=e.screenX,a=e.screenY,v=t.window.getComputedStyle?t.window.getComputedStyle(p,null).getPropertyValue("cursor"):p.runtimeStyle.cursor,r=pC("<div></div>").css({position:"absolute",top:0,left:0,width:b.width,height:b.height,zIndex:2147483647,opacity:1e-4,cursor:v}).appendTo(u.body),pC(u).on("mousemove touchmove",s).on("mouseup touchend",l),n.start(e)},function(e){if(xC(e),e.button!==o)return l(e);e.deltaX=e.screenX-i,e.deltaY=e.screenY-a,e.preventDefault(),n.drag(e)}),l=function(e){xC(e),pC(u).off("mousemove touchmove",s).off("mouseup touchend",l),r.remove(),n.stop&&n.stop(e)};this.destroy=function(){pC(c).off()},pC(c).on("mousedown touchstart",e)}function SC(e){function t(e,t){s.getOpt(e).each((function(e){var n=o.get(),u=nu(e.element()),c=Ya(e.element()),s=t.dom().naturalWidth*n,l=t.dom().naturalHeight*n,f=Math.max(0,u/2-s/2),d=Math.max(0,c/2-l/2),m={left:f.toString()+"px",top:d.toString()+"px",width:s.toString()+"px",height:l.toString()+"px",position:"absolute"};ia(t,m),r.getOpt(e).each((function(e){ia(e.element(),m)})),i.get().each((function(e){var t=a.get();e.setRect({x:t.x*n+f,y:t.y*n+d,w:t.w*n,h:t.h*n}),e.setClampRect({x:f,y:d,w:s,h:l}),e.setViewPortRect({x:0,y:0,w:u,h:c})}))}))}function n(e,n){var r=gn.fromTag("img");return wi(r,"src",n),EC(r.dom()).then((function(){return s.getOpt(e).map((function(e){var n,i=ga({element:r}),c=(i=(rm.replaceAt(e,1,ye.some(i)),u.get()),{x:0,y:0,w:r.dom().naturalWidth,h:r.dom().naturalHeight}),l=(u.set(c),vC.inflate(c,-20,-20));return a.set(l),i.w===c.w&&i.h===c.h||(n=r,s.getOpt(e).each((function(e){var t=nu(e.element()),r=(e=Ya(e.element()),n.dom().naturalWidth),i=n.dom().naturalHeight;t=Math.min(t/r,e/i);1<=t?o.set(1):o.set(t)}))),t(e,r),r}))}))}var r=Dm({dom:{tag:"div",classes:["tox-image-tools__image-bg"],attributes:{role:"presentation"}}}),o=mn(1),i=mn(ye.none()),a=mn({x:0,y:0,w:1,h:1}),u=mn({x:0,y:0,w:1,h:1}),c=Cb.sketch({dom:{tag:"div",classes:["tox-image-tools__image"]},components:[r.asSpec(),{dom:{tag:"img",attributes:{src:e}}},{dom:{tag:"div"},behaviours:ac([im("image-panel-crop-events",[Zo((function(e){s.getOpt(e).each((function(e){e=e.element().dom(),e=TC.create({x:10,y:10,w:100,h:100},{x:0,y:0,w:200,h:200},{x:0,y:0,w:200,h:200},e,(function(){})),e.toggleVisibility(!1),e.on("updateRect",(function(e){e=e.rect;var t=o.get();e={x:Math.round(e.x/t),y:Math.round(e.y/t),w:Math.round(e.w/t),h:Math.round(e.h/t)};a.set(e)})),i.set(ye.some(e))}))}))])])}],containerBehaviours:ac([rm.config({}),im("image-panel-events",[Zo((function(t){n(t,e)}))])])}),s=Dm(c);return{memContainer:s,updateSrc:n,zoom:function(e,n){var r=o.get();n=0<n?Math.min(2,r+.1):Math.max(.1,r-.1);o.set(n),s.getOpt(e).each((function(e){var n=e.components()[1].element();t(e,n)}))},showCrop:function(){i.get().each((function(e){e.toggleVisibility(!0)}))},hideCrop:function(){i.get().each((function(e){e.toggleVisibility(!1)}))},getRect:function(){return a.get()},getMeasurements:function(){var e=u.get();return{width:e.w,height:e.h}}}}var kC=0,TC={create:function(e,t,n,r,o){function i(e,t){return{x:t.x+e.x,y:t.y+e.y,w:t.w,h:t.h}}var a,u,c="tox-",s="tox-crid-"+kC++,l=[{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"}],f=["top","right","bottom","left"],d=function(e,t){return{x:t.x-e.x,y:t.y-e.y,w:t.w,h:t.h}};function m(t,r,o,i){var u=r.x,c=r.y,s=r.w;r=r.h;u+=o*t.deltaX,c+=i*t.deltaY,s+=o*t.deltaW,r+=i*t.deltaH,e=vC.clamp({x:u,y:c,w:s=s<20?20:s,h:r=r<20?20:r},n,"move"===t.name),o=d(n,e),a.fire("updateRect",{rect:o}),p(o)}function g(e){function n(e,t){t.h<0&&(t.h=0),t.w<0&&(t.w=0),pC("#"+s+"-"+e,r).css({left:t.x,top:t.y,width:t.w,height:t.h})}yC.each(l,(function(t){pC("#"+s+"-"+t.name,r).css({left:e.w*t.xMul+e.x,top:e.h*t.yMul+e.y})})),n("top",{x:t.x,y:t.y,w:t.w,h:e.y-t.y}),n("right",{x:e.x+e.w,y:e.y,w:t.w-e.x-e.w+t.x,h:e.h}),n("bottom",{x:t.x,y:e.y+e.h,w:t.w,h:t.h-e.y-e.h+t.y}),n("left",{x:t.x,y:e.y,w:e.x-t.x,h:e.h}),n("move",e)}function h(t){g(e=t)}function p(e){h(i(n,e))}return pC('<div id="'+s+'" class="'+c+'croprect-container" role="grid" aria-dropeffect="execute">').appendTo(r),yC.each(f,(function(e){pC("#"+s,r).append('<div id="'+s+"-"+e+'"class="'+c+'croprect-block" style="display: none" data-mce-bogus="all">')})),yC.each(l,(function(e){pC("#"+s,r).append('<div id="'+s+"-"+e.name+'" class="'+c+"croprect-handle "+c+"croprect-handle-"+e.name+'"style="display: none" data-mce-bogus="all" role="gridcell" tabindex="-1" aria-label="'+e.label+'" aria-grabbed="false" title="'+e.label+'">')})),u=yC.map(l,(function(t){var n;return new CC(s,{document:r.ownerDocument,handle:s+"-"+t.name,start:function(){n=e},drag:function(e){m(t,n,e.deltaX,e.deltaY)}})})),g(e),pC(r).on("focusin focusout",(function(e){pC(e.target).attr("aria-grabbed","focus"===e.type?"true":"false")})),pC(r).on("keydown",(function(t){var n;function r(e,t,r,o,i){e.stopPropagation(),e.preventDefault(),m(n,r,o,i)}switch(yC.each(l,(function(e){if(t.target.id===s+"-"+e.name)return n=e,!1})),t.keyCode){case wC.LEFT:r(t,0,e,-10,0);break;case wC.RIGHT:r(t,0,e,10,0);break;case wC.UP:r(t,0,e,0,-10);break;case wC.DOWN:r(t,0,e,0,10);break;case wC.ENTER:case wC.SPACEBAR:t.preventDefault(),o()}})),a=yC.extend({toggleVisibility:function(e){var t=yC.map(l,(function(e){return"#"+s+"-"+e.name})).concat(yC.map(f,(function(e){return"#"+s+"-"+e}))).join(",");e?pC(t,r).show():pC(t,r).hide()},setClampRect:function(t){n=t,g(e)},setRect:h,getInnerRect:function(){return d(n,e)},setInnerRect:p,setViewPortRect:function(n){t=n,g(e)},destroy:function(){yC.each(u,(function(e){e.destroy()})),u=[]}},bC)}},EC=function(e){return new bg((function(t){var n=function(){e.removeEventListener("load",n),t(e)};e.complete?t(e):e.addEventListener("load",n)}))},OC=function(e,t,n,r,o){return oC({name:e,icon:ye.some(t),disabled:n,tooltip:ye.some(e),primary:!1,borderless:!1},r,o)},NC=function(e,t){t?uh.enable(e):uh.disable(e)};function AC(){var e=[],t=-1;function n(){return 0<t}function r(){return-1!==t&&t<e.length-1}return{data:e,add:function(n){var r=e.splice(++t);return e.push(n),{state:n,removed:r}},undo:function(){if(0<t)return e[--t]},redo:function(){if(r())return e[++t]},canUndo:n,canRedo:r}}function DC(e){function n(e){a.set(e)}function r(e){return{blob:e,url:t.URL.createObjectURL(e)}}function o(){u.get().each(s),u.set(ye.none())}function i(e){e=r(e);var t=(n(e),c.add(e).removed);return yC.each(t,s),e.url}var a=mn(e),u=mn(ye.none()),c=AC(),s=(c.add(e),function(e){t.URL.revokeObjectURL(e.url)});return{getBlobState:function(){return a.get()},setBlobState:n,addBlobState:i,getTempState:function(){return u.get().fold((function(){return a.get()}),(function(e){return e}))},updateTempState:function(e){return e=r(e),o(),u.set(ye.some(e)),e.url},addTempState:function(e){return e=r(e),u.set(ye.some(e)),e.url},applyTempState:function(e){return u.get().fold((function(){}),(function(t){i(t.blob),e()}))},destroyTempState:o,undo:function(){var e=c.undo();return n(e),e.url},redo:function(){var e=c.redo();return n(e),e.url},getHistoryStates:function(){return{undoEnabled:c.canUndo(),redoEnabled:c.canRedo()}}}}function _C(e,r){function o(e){return e.toBlob()}function i(e,t,n){var r=c.getBlobState().blob;m(e,r,t,(function(e){return c.updateTempState(e)}),n)}var a,u,c=DC(e.currentState),s=function(e){var t=c.getHistoryStates();p.updateButtonUndoStates(e,t.undoEnabled,t.redoEnabled),Xr(e,hC.formActionEvent,{name:hC.saveState(),value:t.undoEnabled})},l=function(e){Xr(e,hC.formActionEvent,{name:hC.disable(),value:{}})},f=function(e){v.getApplyButton(e).each((function(e){uh.enable(e)})),Xr(e,hC.formActionEvent,{name:hC.enable(),value:{}})},d=function(e,t){return l(e),h.updateSrc(e,t)},m=function(e,n,r,i,a){return l(e),nx(n).then(r).then(o).then(i).then((function(t){return d(e,t).then((function(t){return s(e),a(),f(e),t}))})).catch((function(n){return t.console.log(n),f(e),n}))},g=function(e){var t=c.getBlobState().url;return c.destroyTempState(),s(e),t},h=SC(e.currentState.url),p=(a=Dm(OC("Undo","undo",!0,(function(e){Xr(e,gC.undo(),{direction:1})}),e=r)),u=Dm(OC("Redo","redo",!0,(function(e){Xr(e,gC.redo(),{direction:1})}),e)),{container:Cb.sketch({dom:{tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools__sidebar"]},components:[a.asSpec(),u.asSpec(),OC("Zoom in","zoom-in",!1,(function(e){Xr(e,gC.zoom(),{direction:1})}),e),OC("Zoom out","zoom-out",!1,(function(e){Xr(e,gC.zoom(),{direction:-1})}),e)]}),updateButtonUndoStates:function(e,t,n){a.getOpt(e).each((function(e){NC(e,t)})),u.getOpt(e).each((function(e){NC(e,n)}))}}),v=Bx(h,r);return{dom:{tag:"div",attributes:{role:"presentation"}},components:[v.memContainer.asSpec(),h.memContainer.asSpec(),p.container],behaviours:ac([_l.config({store:{mode:"manual",getValue:function(){return c.getBlobState()}}}),im("image-tools-events",[Xo(gC.undo(),(function(e,t){var n=c.undo();d(e,n).then((function(t){f(e),s(e)}))})),Xo(gC.redo(),(function(e,t){var n=c.redo();d(e,n).then((function(t){f(e),s(e)}))})),Xo(gC.zoom(),(function(e,t){t=t.event().direction(),h.zoom(e,t)})),Xo(gC.back(),(function(e,t){var n;e=g(n=e),d(n,e).then((function(e){f(n)})),t.event().swap()(),h.hideCrop()})),Xo(gC.apply(),(function(e,t){c.applyTempState((function(){g(e),t.event().swap()()}))})),Xo(gC.transform(),(function(e,t){return i(e,t.event().transform(),n)})),Xo(gC.tempTransform(),(function(e,t){var r;e=e,t=t.event().transform(),r=c.getTempState().blob,m(e,r,t,(function(e){return c.addTempState(e)}),n)})),Xo(gC.transformApply(),(function(e,t){var n,r;n=e,e=t.event().transform(),t=t.event().swap(),r=c.getBlobState().blob,m(n,r,e,(function(e){return e=c.addBlobState(e),g(n),e}),t)})),Xo(gC.swap(),(function(e,t){p.updateButtonUndoStates(e,!1,!1);var n=t.event().transform(),r=t.event().swap();n.fold((function(){r()}),(function(t){i(e,t,r)}))}))]),ww()])}}function RC(e,t){var n=e.label.map((function(e){return ty(e,t)})),r=[uh.config({disabled:e.disabled}),nm.config({mode:"execution",useEnter:!0!==e.multiline,useControlEnter:!0===e.multiline,execute:function(e){return Gr(e,zb),ye.some(!0)}}),im("textfield-change",[Xo(vr(),(function(t,n){Xr(t,Rb,{name:e.name})})),Xo(kr(),(function(t,n){Xr(t,Rb,{name:e.name})}))]),Jb.config({})],i=e.validation.map((function(e){return Kb.config({getRoot:function(e){return ii(e.element())},invalidClass:"tox-invalid",validator:{validate:function(t){t=_l.getValue(t);var n=e.validator(t);return Xb.pure(!0===n?we.value(t):we.error(n))},validateOnLoad:e.validateOnLoad}})})).toArray(),a=e.placeholder.fold(o({}),(function(e){return{placeholder:t.translate(e)}})),u=e.inputMode.fold(o({}),(function(e){return{inputmode:e}}));a=d(d({},a),u),u=Vb.parts().field({tag:!0===e.multiline?"textarea":"input",inputAttributes:a,inputClasses:[e.classname],inputBehaviours:ac(Ue([r,i])),selectOnFocus:!1,factory:jb}),a=(e.flex?["tox-form__group--stretched"]:[]).concat(e.maximized?["tox-form-group--maximize"]:[]),r=[uh.config({disabled:e.disabled,onDisabled:function(e){Vb.getField(e).each(uh.disable)},onEnabled:function(e){Vb.getField(e).each(uh.enable)}})];return Zb(n,u,a,r)}function BC(e){var t=mn(null);return Hi({readState:function(){return{timer:null!==t.get()?"set":"unset"}},setTimer:function(e){t.set(e)},cancel:function(){var e=t.get();null!==e&&e.cancel()}})}function MC(e,t,n){n=_l.getValue(n),_l.setValue(t,n),PC(t)}function PC(e){lT(e,(function(e,t){return e.setSelectionRange(t.length,t.length)}))}function zC(e,t,n){var r,o;return e.selectsOver?(o=_l.getValue(t),r=e.getDisplayText(o),o=_l.getValue(n),0===e.getDisplayText(o).indexOf(r)?ye.some((function(){var e;MC(0,t,n),e=r.length,lT(t,(function(t,n){return t.setSelectionRange(e,n.length)}))})):ye.none()):ye.none()}function IC(e){return mT(Xb.nu(e))}function LC(e){return{type:"menuitem",value:e.url,text:e.title,meta:{attach:e.attach},onAction:function(){}}}function FC(e,t){return{type:"menuitem",value:t,text:e,meta:{attach:void 0},onAction:function(){}}}function HC(e,t){return n=e,e=Ie(t,(function(e){return e.type===n})),Me(e,LC);var n}function VC(e,t,r){function o(t){t=_l.getValue(t),r.addToHistory(t.value,e.filetype)}var i,a,u,c=t.shared.providers,s=Vb.parts().field({factory:dT,dismissOnBlur:!0,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{"aria-errormessage":ST,type:"url"},minChars:0,responseTime:0,fetch:function(n){o=e.filetype,n=n,i=r,n=_l.getValue(n),a=void 0!==n.meta.text?n.meta.text:n.value;var o,i,a;n=i.getLinkInformation().fold((function(){return[]}),(function(e){var t=CT(a,wT(i.getHistory(o)));return"file"===o?xT([t,CT(a,pT(e)),CT(a,Ue([bT(e),vT(e),yT(e)]))]):t})),n=Tx(n,dh.BUBBLE_TO_SANDBOX,t,!1);return Xb.pure(n)},getHotspot:function(e){return p.getOpt(e)},onSetValue:function(e,t){e.hasConfigured(Kb)&&Kb.run(e).get(n)},typeaheadBehaviours:ac(Ue([r.getValidationHandler().map((function(t){return Kb.config({getRoot:function(e){return ii(e.element())},invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:function(e,t){f.getOpt(e).each((function(e){wi(e.element(),"title",c.translate(t))}))}},validator:{validate:function(n){var r=_l.getValue(n);return gT((function(n){t({type:e.filetype,url:r.value},(function(e){var t;"invalid"===e.status?(t=we.error(e.message),n(t)):(t=we.value(e.message),n(t))}))}))},validateOnLoad:!1}})})).toArray(),[uh.config({disabled:e.disabled}),Jb.config({}),im("urlinput-events",Ue(["file"===e.filetype?[Xo(vr(),(function(t){Xr(t,Rb,{name:e.name})}))]:[],[Xo(br(),(function(t){Xr(t,Rb,{name:e.name}),o(t)})),Xo(kr(),(function(t){Xr(t,Rb,{name:e.name}),o(t)}))]]))]])),eventOrder:((s={})[vr()]=["streaming","urlinput-events","invalidating"],s),model:{getDisplayText:function(e){return e.value},selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:t.shared.getSink,parts:{menu:Ap(!1,1,"normal")},onExecute:function(e,t,n){Xr(t,zb,{})},onItemExecute:function(t,n,r,i){o(t),Xr(t,Rb,{name:e.name})}}),l=e.label.map((function(e){return ty(e,c)})),f=Dm((m="invalid",i=ye.some(ST),void 0===u&&(u=m),{dom:{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+m],innerHtml:Rm(a=void 0===(a="warning")?m:a,c.icons),attributes:d({title:c.translate(u),"aria-live":"polite"},i.fold((function(){return{}}),(function(e){return{id:e}})))}})),m=Dm({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[f.asSpec()]}),g=r.getUrlPicker(e.filetype),h=Oi("browser.url.event"),p=Dm({dom:{tag:"div",classes:["tox-control-wrap"]},components:[s,m.asSpec()],behaviours:ac([uh.config({disabled:e.disabled})])}),v=Dm(aC({name:e.name,icon:ye.some("browse"),text:e.label.getOr(""),disabled:e.disabled,primary:!1,borderless:!0},(function(e){return Gr(e,h)}),c,[],["tox-browse-url"]));return Vb.sketch({dom:ey([]),components:l.toArray().concat([{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:Ue([[p.asSpec()],g.map((function(){return v.asSpec()})).toArray()])}]),fieldBehaviours:ac([uh.config({disabled:e.disabled,onDisabled:function(e){Vb.getField(e).each(uh.disable),v.getOpt(e).each(uh.disable)},onEnabled:function(e){Vb.getField(e).each(uh.enable),v.getOpt(e).each(uh.enable)}}),im("url-input-events",[Xo(h,(function(t){Od.getCurrent(t).each((function(n){var r=_l.getValue(n);g.each((function(o){o(r).get((function(r){_l.setValue(n,r),Xr(t,Rb,{name:e.name})}))}))}))}))])])})}function UC(e,t){function n(e){return e.element().dom().click(),ye.some(!0)}function r(e){return{dom:{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+e],innerHtml:Rm("checked"===e?"selected":"unselected",t.icons)}}}var o=_l.config({store:{mode:"manual",getValue:function(e){return e.element().dom().checked},setValue:function(e,t){e.element().dom().checked=t}}}),a=(o=Vb.parts().field({factory:{sketch:i},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:ac([ww(),uh.config({disabled:e.disabled}),Jb.config({}),am.config({}),o,nm.config({mode:"special",onEnter:n,onSpace:n,stopSpaceKeyup:!0}),im("checkbox-events",[Xo(br(),(function(t,n){Xr(t,Rb,{name:e.name})}))])])}),Vb.parts().label({dom:{tag:"span",classes:["tox-checkbox__label"],innerHtml:t.translate(e.label)},behaviours:ac([my.config({})])})),u=Dm({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[r("checked"),r("unchecked")]});return Vb.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[o,u.asSpec(),a],fieldBehaviours:ac([uh.config({disabled:e.disabled,disableClass:"tox-checkbox--disabled",onDisabled:function(e){Vb.getField(e).each(uh.disable)},onEnabled:function(e){Vb.getField(e).each(uh.enable)}})])})}function jC(e,t){function n(e){return function(t,n){bu(n.event().target(),"[data-collection-item-value]").each((function(n){e(t,n,xi(n,"data-collection-item-value"))}))}}var r,o=e.label.map((function(e){return ty(e,t)})),a=[Xo(dr(),n((function(e,t){dc(t)}))),Xo(Ar(),n((function(t,n,r){Xr(t,Pb,{name:e.name,value:r})}))),Xo(mr(),n((function(e,t,n){vu(e.element(),"."+Kg).each((function(e){Ji(e,Kg)})),Yi(t,Kg)}))),Xo(gr(),n((function(e,t,n){vu(e.element(),"."+Kg).each((function(e){Ji(e,Kg)}))}))),ti(n((function(t,n,r){Xr(t,Pb,{name:e.name,value:r})})))],u=Vb.parts().field({dom:{tag:"div",classes:["tox-collection"].concat(1!==e.columns?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:i},behaviours:ac([rm.config({}),_l.config({store:{mode:"memory",initialValue:[]},onSetValue:function(t,n){var r=t;n=Me(n,(function(t){var n=Hg.translate(t.text),r=1===e.columns?'<div class="tox-collection__item-label">'+n+"</div>":"",o='<div class="tox-collection__item-icon">'+t.icon+"</div>",i={_:" "," - ":" ","-":" "};n=n.replace(/\_| \- |\-/g,(function(e){return i[e]}));return'<div class="tox-collection__item" tabindex="-1" data-collection-item-value="'+('"'===(t=t.value)?""":t)+'" title="'+n+'" aria-label="'+n+'">'+o+r+"</div>"})),n=1<e.columns&&"auto"!==e.columns?k(n,e.columns):[n],n=Me(n,(function(e){return'<div class="tox-collection__group">'+e.join("")+"</div>"})),ho(r.element(),n.join("")),"auto"===e.columns&&Mg(t,5,"tox-collection__item").each((function(e){var n=e.numRows;e=e.numColumns;nm.setGridSize(t,n,e)})),Gr(t,Hb)}}),Jb.config({}),nm.config((u=e.columns,r="normal",1===u?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:"auto"===u?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:"color"===r?".tox-swatches__row":".tox-collection__group",cell:"color"===r?"."+jg:"."+Ug}})),im("collection-events",a)])});return Zb(o,u,["tox-form__group--collection"],[])}function WC(e,t){function n(e){return{dom:{tag:"tr"},components:Me(e,o)}}var r,o=function(e){return{dom:{tag:"td",innerHtml:t.translate(e)}}};return{dom:{tag:"table",classes:["tox-dialog__table"]},components:[(r=e.header,{dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:Me(r,(function(e){return{dom:{tag:"th",innerHtml:t.translate(e)}}}))}]}),(r=e.cells,{dom:{tag:"tbody"},components:Me(r,n)})],behaviours:ac([Jb.config({}),am.config({})])}}function qC(e){return function(t,n,r){return yt(n,"name").fold((function(){return e(n,r)}),(function(o){return t.field(o,e(n,r))}))}}function $C(e,t,n){var r=ut(n,{shared:{interpreter:function(t){return GC(e,t,r)}}});return GC(e,t,r)}function GC(e,n,r){return yt(kT,n.type).fold((function(){return t.console.error('Unknown factory type "'+n.type+'", defaulting to container: ',n),n}),(function(t){return t(e,n,r)}))}function XC(e){return Fe(e,(function(e,t){var n;return ot(t,"items")?(n=XC(t.items),{customFormats:e.customFormats.concat(n.customFormats),formats:e.formats.concat([{title:t.title,items:n.formats}])}):ot(t,"inline")||ot(t,"block")||ot(t,"selector")?(n="custom-"+t.title.toLowerCase(),{customFormats:e.customFormats.concat([{name:n,format:t}]),formats:e.formats.concat([{title:t.title,format:n,icon:t.icon}])}):d(d({},e),{formats:e.formats.concat(t)})}),{customFormats:[],formats:[]})}function YC(e,t){function n(t){Pe(t,(function(t){e.formatter.has(t.name)||e.formatter.register(t.name,t.format)}))}var r=XC(t);return e.formatter?n(r.customFormats):e.on("init",(function(){n(r.customFormats)})),r.formats}function KC(e,t,n){return t={type:"formatter",isSelected:t(e.format),getStylePreview:n(e.format)},ut(e,t)}function JC(e,t,n,r){function i(t){return Me(t,(function(t){var a,u,c,s=Ke(t);return St(t,"items")?(a=i(t.items),ut((u=t,c={type:"submenu",isSelected:o(!1),getStylePreview:function(){return ye.none()}},ut(u,c)),{getStyleItems:function(){return a}})):St(t,"format")?KC(t,n,r):1===s.length&&Re(s,"title")?ut(t,{type:"separator"}):(c=Oi((u=t).title),s={type:"formatter",format:c,isSelected:n(c),getStylePreview:r(c)},u=ut(u,s),e.formatter.register(c,u),u)}))}return i(t)}function ZC(e){return function(t){if(t&&1===t.nodeType){if(t.contentEditable===e)return!0;if(t.getAttribute("data-mce-contenteditable")===e)return!0}return!1}}function QC(e,t,n,r,o){return{type:e,title:t,url:n,level:r,attach:o}}function eS(e){return e.innerText||e.textContent}function tS(e){return e&&/^(H[1-6])$/.test(e.nodeName)}function nS(e){return LT(e)&&!IT(e)}function rS(e){return 0<PT(e.title).length}function oS(e){return xe(e)&&/^https?/.test(e)}function iS(e){return Ce(e)&&E(e,(function(e){return!(Se(e=e)&&e.length<=5&&We(e,oS))})).isNone()}function aS(){var e,n=t.localStorage.getItem(qT);if(null===n)return{};try{e=JSON.parse(n)}catch(e){if(e instanceof SyntaxError)return t.console.log("Local storage "+qT+" was not valid JSON",e),{};throw e}return iS(e)?e:(t.console.log("Local storage "+qT+" was not valid format",e),{})}function uS(e){var t=aS();return Object.prototype.hasOwnProperty.call(t,e)?t[e]:[]}function cS(e,n){if(oS(e)){var r=aS(),o=Object.prototype.hasOwnProperty.call(r,n)?r[n]:[];o=Ie(o,(function(t){return t!==e})),n=(r[n]=[e].concat(o).slice(0,5),r);if(!iS(n))throw new Error("Bad format for history:\n"+JSON.stringify(n));t.localStorage.setItem(qT,JSON.stringify(n))}}function sS(e){return!!e}function lS(e){return Qe(yC.makeMap(e,/[, ]/),sS)}function fS(e,t,n){return e=e,t=t,e=($T.call(e,t)?ye.some(e[t]):ye.none()).getOr(n),xe(e)?ye.some(e):ye.none()}function dS(e){return ye.some(e.file_picker_callback).filter(Te)}function mS(e,t){n=e,i=ye.some(n.file_picker_types).filter(sS),r=ye.some(n.file_browser_callback_types).filter(sS),o=i.or(r).map(lS);var n,r,o,i=dS(n).fold((function(){return!1}),(function(e){return o.fold((function(){return!0}),(function(e){return 0<Ke(e).length&&e}))}));return ke(i)?i?dS(e):ye.none():i[t]?dS(e):ye.none()}function gS(e,t,n){r=function(e,t){var r=n(e);return ye.some({element:o(e),start:o(t),finish:o(t+r),width:o(r)})};e=Fe(e,(function(e,t){return r(t,e.len).fold(o(e),(function(t){return{len:t.finish(),list:e.list.concat([t])}}))}),{len:0,list:[]}).list;var r,i=Ie(e,(function(e){return e.finish()<=t})),a=Le(i,(function(e,t){return e+t.width()}),0);e=e.slice(i.length);return{within:o(i),extra:o(e),withinWidth:o(a)}}function hS(e){return Me(e,(function(e){return e.element()}))}function pS(e,t,n,r){var o,i,a,u=(s=function(e,t,n){return t=gS(t,e,n),0===t.extra().length?ye.some(t):ye.none()}(e,t,n).getOrThunk((function(){return gS(t,e-n(r),n)}))).within(),c=s.extra(),s=s.withinWidth();return 1===c.length&&c[0].width()<=n(r)?(i=s,o=hS((o=u).concat(c)),KT(o,[],i)):1<=c.length?(o=c,i=r,c=s,a=hS(a=u).concat([i]),KT(a,hS(o),c)):(a=s,KT(hS(u),[],a))}function vS(e,t){t=Me(t,(function(e){return va(e)})),YT.setGroups(e,t)}function bS(e,t,n,r,o){var i="alloy.toolbar.toggle";return{uid:e.uid,dom:e.dom,components:t,behaviours:Bl(e.splitToolbarBehaviours,[ny.config({others:d(d({},o.coupling),{overflowGroup:function(e){return ZT.sketch(d(d({},r["overflow-group"]()),{items:[Am.sketch(d(d({},r["overflow-button"]()),{action:function(t){Gr(e,i)}}))]}))}})}),im("toolbar-toggle-events",[Xo(i,(function(e){o.apis.toggle(e)}))])]),apis:d({setGroups:function(t,n){var r=n;r=Me(n,t.getSystem().build),e.builtGroups.set(r),o.apis.refresh(t)},getMoreButton:function(t){return Ql(t,e,"overflow-button")}},o.apis),domModification:{attributes:{role:"group"}}}}function yS(e,t,n){var r=aE(t,e.element());("0px"===r?lE:fE)(e,t,n,ye.some(r))}function wS(e,t,n){var r=oE(e,t),o=Zi(r,t.shrinkingClass),i=aE(t,e.element()),a=(sE(e,t),aE(t,e.element()));(o?function(){oa(e.element(),iE(t),i),sa(e.element())}:function(){cE(e,t)})(),Ji(r,t.shrinkingClass),Yi(r,t.growingClass),sE(e,t),oa(e.element(),iE(t),a),n.setExpanded(),t.onStartGrow(e)}function xS(e,t,n){return e=oE(e,t),!0===Zi(e,t.growingClass)}function CS(e,t,n){return e=oE(e,t),!0===Zi(e,t.shrinkingClass)}function SS(e,t){e.on("init",(function(){e.readonly&&bE(t,!0)})),e.on("SwitchMode",(function(){return bE(t,e.readonly)})),kb(e)&&e.setMode("readonly")}function kS(e){var t;return fc.config({channels:((t={})[pE]={schema:vE,onReceive:function(t,n){e(t).each((function(e){var t,r;t=e,r=n.readonly,Qn("*",t.element()).forEach((function(e){t.getSystem().getByDom(e).each((function(e){e.hasConfigured(uh)&&uh.set(e,r)}))}))}))}},t)})}function TS(e){var t=e.title.fold((function(){return{}}),(function(e){return{attributes:{title:e}}}));return{dom:d({tag:"div",classes:["tox-toolbar__group"]},t),components:[ZT.parts().items({})],items:e.items,markers:{itemSelector:"*:not(.tox-split-button) > .tox-tbtn:not([disabled]), .tox-split-button:not([disabled]), .tox-toolbar-nav-js:not([disabled])"},tgroupBehaviours:ac([Jb.config({}),am.config({})])}}function ES(e){return ZT.sketch(TS(e))}function OS(e){var t=xE(e,rE.getOverflow),n=rE.parts().primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return rE.sketch(d(d({},t),{lazySink:e.getSink,getAnchor:function(){return e.backstage.shared.anchors.toolbarOverflow()},getOverflowBounds:function(){var t=e.moreDrawerData.lazyHeader().element(),n=mu(t);t=oi(t),t=mu(t);return fu(n.x()+4,t.y(),n.width()-8,t.height())},parts:d(d({},t.parts),{overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"]}}}),components:[n],markers:{overflowToggledClass:"tox-tbtn--enabled"}}))}function NS(e){var t=hE.parts().primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),n=hE.parts().overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}});e=xE(e,hE.getOverflow);return hE.sketch(d(d({},e),{components:[t,n],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(e){e.getSystem().broadcastOn([yE()],{type:"opened"})},onClosed:function(e){e.getSystem().broadcastOn([yE()],{type:"closed"})}}))}function AS(e){var t=e.cyclicKeying?"cyclic":"acyclic";return YT.sketch({uid:e.uid,dom:{tag:"div",classes:["tox-toolbar"]},components:[YT.parts().groups({})],toolbarBehaviours:wE(e,t,o(ye.none()))})}function DS(e){return Gt("toolbarbutton",CE,e)}function _S(e){return Gt("menubutton",SE,e)}function RS(e){return Gt("ToggleButton",TE,e)}function BS(e,t,n,r,o,i){function a(e){return Hg.isRtl()&&Re(ME,e)?e+"-rtl":e}var u=Hg.isRtl()&&e.exists((function(e){return Re(PE,e)}));return{dom:{tag:"button",classes:["tox-tbtn"].concat(t.isSome()?["tox-tbtn--select"]:[]).concat(u?["tox-tbtn__icon-rtl"]:[]),attributes:RE(n,i)},components:hh([e.map((function(e){return Wx(a(e),i.icons)})),t.map((function(e){return $x(e,"tox-tbtn",i)}))]),eventOrder:((u={})[cr()]=["focusing","alloy.base.behaviour","common-button-display-events"],u),buttonBehaviours:ac([im("common-button-display-events",[Xo(cr(),(function(e,t){t.event().prevent(),Gr(e,BE)}))])].concat(r.map((function(n){return NE.config({channel:n,initialData:{icon:e,text:t},renderComponents:function(e,t){return hh([e.icon.map((function(e){return Wx(a(e),i.icons)})),e.text.map((function(e){return $x(e,"tox-tbtn",i)}))])}})})).toArray()).concat(o.getOr([])))}}function MS(e,t,n){return zE(e,{toolbarButtonBehaviours:[].concat(0<n.length?[im("toolbarButtonWith",n)]:[]),getApi:DE,onSetup:e.onSetup},t)}function PS(e,t,n){return ut(zE(e,{toolbarButtonBehaviours:[rm.config({}),sm.config({toggleClass:"tox-tbtn--enabled",aria:{mode:"pressed"},toggleOnExecute:!1})].concat(0<n.length?[im("toolbarToggleButtonWith",n)]:[]),getApi:_E,onSetup:e.onSetup},t))}function zS(e,t){function r(e){return{isDisabled:function(){return uh.isDisabled(e)},setDisabled:function(t){return uh.set(e,t)},setIconFill:function(t,n){vu(e.element(),'svg path[id="'+t+'"], rect[id="'+t+'"]').each((function(e){wi(e,"fill",n)}))},setIconStroke:function(t,n){vu(e.element(),'svg path[id="'+t+'"], rect[id="'+t+'"]').each((function(e){wi(e,"stroke",n)}))},setActive:function(t){wi(e.element(),"aria-pressed",t),vu(e.element(),"span").each((function(n){e.getSystem().getByDom(n).each((function(e){return sm.set(e,t)}))}))},isActive:function(){return vu(e.element(),"span").exists((function(t){return e.getSystem().getByDom(t).exists(sm.isOn)}))}}}var o,i,a,u=Oi("channel-update-split-dropdown-display"),c=mn(n),s={getApi:r,onSetup:e.onSetup};return AE.sketch({dom:{tag:"div",classes:["tox-split-button"],attributes:ct({"aria-pressed":!1},RE(e.tooltip,t.providers))},onExecute:function(t){e.onAction(r(t))},onItemExecute:function(e,t,n){},splitDropdownBehaviours:ac([ch.splitButton(!1),im("split-dropdown-events",[Xo(BE,am.focus),lh(s,c),fh(s,c)]),my.config({})]),eventOrder:((s={})[Lr()]=["alloy.base.behaviour","split-dropdown-events"],s),toggleClass:"tox-tbtn--enabled",lazySink:t.getSink,fetch:(o=r,i=e,a=t.providers,function(e){return Xb.nu((function(e){return i.fetch(e)})).map((function(t){return ye.from(Zp(ut(Bp(Oi("menu-value"),t,(function(t){i.onItemAction(o(e),t)}),i.columns,i.presets,dh.CLOSE_ON_EXECUTE,i.select.getOr((function(){return!1})),a),{movement:Pp(i.columns,i.presets),menuBehaviours:Pg.unnamedEvents("auto"!==i.columns?[]:[Zo((function(e,t){Mg(e,4,Jg(i.presets)).each((function(t){var n=t.numRows;t=t.numColumns;nm.setGridSize(e,n,t)}))}))])})))}))}),parts:{menu:Ap(!1,e.columns,e.presets)},components:[AE.parts().button(BS(e.icon,e.text,ye.none(),ye.some(u),ye.some([sm.config({toggleClass:"tox-tbtn--enabled",toggleOnExecute:!1})]),t.providers)),AE.parts().arrow({dom:{tag:"button",classes:["tox-tbtn","tox-split-button__chevron"],innerHtml:Rm("chevron-down",t.providers.icons)}}),AE.parts()["aria-descriptor"]({text:t.providers.translate("To open the popup, press Shift+Enter")})]})}function IS(e,t){return Xo(Gx,(function(n,r){var o;n=e.get(n),o=n,n={hide:function(){return Gr(o,_r())},getValue:function(){return _l.getValue(o)}};t.onAction(n,r.event().buttonApi())}))}function LS(e,t){var n=Math.max(t.x(),e.x());e=e.right()-n,t=t.width()-(n-t.x());return{x:n,width:Math.min(e,t)}}function FS(e,n){var r=au(t.window),o=du(gn.fromDom(e.getContentAreaContainer()));return e.inline&&!n?ye.some(VE(e,o,r)):e.inline?ye.some(HE(e,o,r)):ye.some(FE(e,o,r))}function HS(e,t){return Su(t,(function(t){return t.predicate(e.dom())?ye.some({toolbarApi:t,elem:e}):ye.none()}))}function VS(e,t){return function(n){function r(){n.setActive(e.formatter.match(t));var r=e.formatter.formatChanged(t,n.setActive).unbind;o.set(ye.some(r))}var o=mn(ye.none());return e.initialized?r():e.on("init",r),function(){return o.get().each((function(e){return e()}))}}}function US(e,t,n){function r(e,t,r){var o="formatter"===e.type&&n.isInvalid(e);return 0===t?o?[]:i(e,t,!1,r).toArray():i(e,t,o,r).toArray()}function o(e){var t=n.getCurrentValue(),o=n.shouldHide?0:1;return je(e,(function(e){return r(e,o,t)}))}var i=function(e,o,i,a){var u,c=t.shared.providers.translate(e.title);return"separator"===e.type?ye.some({type:"separator",text:c}):"submenu"===e.type?(u=je(e.getStyleItems(),(function(e){return r(e,o,a)})),0===o&&u.length<=0?ye.none():ye.some({type:"nestedmenuitem",text:c,disabled:u.length<=0,getSubmenuItems:function(){return je(e.getStyleItems(),(function(e){return r(e,o,a)}))}})):ye.some(d({type:"togglemenuitem",text:c,active:e.isSelected(a),disabled:i,onAction:n.onAction(e)},e.getStylePreview().fold((function(){return{}}),(function(e){return{meta:{style:e}}}))))};return{validateItems:o,getFetch:function(e,t){return function(n){var r=t();r=o(r);n(Tx(r,dh.CLOSE_ON_EXECUTE,e,!1))}}}}function jS(e,t,r){var o=(i=YE(e,t,r)).items,i=i.getStyleItems;return Jx({text:r.icon.isSome()?ye.none():ye.some(""),icon:r.icon,tooltip:ye.from(r.tooltip),role:ye.none(),fetch:o.getFetch(t,i),onSetup:function(t){return r.setInitialValue.each((function(e){return e(t.getComponent())})),r.nodeChangeHandler.map((function(n){var r=n(t.getComponent());return e.on("NodeChange",r),function(){e.off("NodeChange",r)}})).getOr(n)},getApi:function(e){return{getComponent:function(){return e}}},columns:1,presets:"normal",classes:r.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[]},"tox-tbtn",t.shared)}function WS(e,t){return function(n,r){return n=e(n).mapError((function(e){return Kt(e)})).getOrDie(),t(n,r)}}function qS(e){return function(t){return t.translate(-e.left(),-e.top())}}function $S(e){return function(t){return t.translate(e.left(),e.top())}}function GS(e){return function(t,n){return Fe(e,(function(e,t){return t(e)}),Ja(t,n))}}function XS(e,t,n){return e.fold(GS([$S(n),qS(t)]),GS([qS(t)]),GS([]))}function YS(e,t,n){return e.fold(GS([$S(n)]),GS([]),GS([$S(t)]))}function KS(e,t,n){return e.fold(GS([]),GS([qS(n)]),GS([$S(t),qS(n)]))}function JS(e,t){var n=e.element();Yi(n,t.transitionClass),Ji(n,t.fadeOutClass),Yi(n,t.fadeInClass),t.onShow(e)}function ZS(e,t){var n=e.element();Yi(n,t.transitionClass),Ji(n,t.fadeInClass),Yi(n,t.fadeOutClass),t.onHide(e)}function QS(e,t,n){return We(e,(function(e){switch(e){case"bottom":return r=n,t.bottom()<=r.bottom();case"top":return r=n,t.y()>=r.y()}var r}))}function ek(e,t){return Ci(e,t)?ye.some(parseInt(xi(e,t),10)):ye.none()}function tk(e,t){return ek(e,t.leftAttr).bind((function(n){return ek(e,t.topAttr).map((function(t){var r=nu(e),o=Ya(e);return fu(n,t,r,o)}))}))}function nk(e,t,n){var r=xi(e,t.positionAttr);switch(Si(e=e,(t=t).leftAttr),Si(e,t.topAttr),Si(e,t.positionAttr),r){case"static":return ye.some(LO.static());case"absolute":return ye.some(LO.absolute(n.x(),n.y()));default:return ye.none()}}function rk(e,t,n,r,o){var i,a,u,c=du(e);return QS(t.modes,c,n)?ye.none():(u=Do(e,"position"),e=e,t=t,i=c.x(),a=c.y(),u=u,wi(e,t.leftAttr,i),wi(e,t.topAttr,a),wi(e,t.positionAttr,u),i=zO(c.x(),c.y()),a=XS(i,r,o),e=zO(n.x(),n.y()),t=XS(e,r,o),u=c.y()<=n.y()?t.top():t.top()+n.height()-c.height(),ye.some(LO.fixed(a.left(),u)))}function ok(e,t,r){var o,i,a;r.isDocked()&&(i=t,t=r,a=(o=e).element(),t.setDocked(!1),HO(o,i).each((function(e){e.fold((function(){return VO(o,i)}),(function(e,t){var n=ri(a),r=(n=ou(n),DO(a));UO(o,i,n,r,zO(e,t))}),n)})),t.setVisible(!0),i.contextual.each((function(e){ea(a,[e.fadeInClass,e.fadeOutClass,e.transitionClass]),e.onShow(o)})),WO(o,i,t))}function ik(e){var t=e.element();ii(t).each((function(n){var r;qO.isDocked(e)?(r=nu(n),oa(t,"width",r+"px"),r=Ka(t),oa(n,"padding-top",r+"px")):(ca(t,"width"),ca(n,"padding-top"))}))}function ak(e,t){t?(Ji(e,$O.fadeOutClass),Qi(e,[$O.transitionClass,$O.fadeInClass])):(Ji(e,$O.fadeInClass),Qi(e,[$O.fadeOutClass,$O.transitionClass]))}function uk(e,t){e=gn.fromDom(e.getContainer()),t?(Yi(e,GO),Ji(e,XO)):(Yi(e,XO),Ji(e,GO))}function ck(e,t){function n(e){t().each((function(t){return e(t.element())}))}function r(n){e.inline||ik(n),uk(e,qO.isDocked(n)),n.getSystem().broadcastOn([Tl()],{}),t().each((function(e){return e.getSystem().broadcastOn([Tl()],{})}))}var o,i=mn(ye.none());return[qO.config({leftAttr:"data-dock-left",topAttr:"data-dock-top",positionAttr:"data-dock-pos",contextual:d({lazyContext:function(t){t=Ka(t.element());var n=e.inline?e.getContentAreaContainer():e.getContainer();n=du(gn.fromDom(n)),t=n.height()-t;return ye.some(fu(n.x(),n.y(),n.width(),t))},onShow:function(){n((function(e){return ak(e,!0)}))},onShown:function(e){n((function(e){return ea(e,[$O.transitionClass,$O.fadeInClass])})),i.get().each((function(t){var n,r,o;n=e.element(),o=ri(r=t),mc(o).filter((function(e){return!tr(r,e)})).filter((function(e){return tr(e,gn.fromDom(o.dom().body))||nr(n,e)})).each((function(){return dc(r)})),i.set(ye.none())}))},onHide:function(e){var r;i.set((e=e.element(),r=t,gc(e).orThunk((function(){return r().toOption().bind((function(e){return gc(e.element())}))})))),n((function(e){return ak(e,!1)}))},onHidden:function(){n((function(e){return ea(e,[$O.transitionClass])}))}},$O),modes:["top"],onDocked:r,onUndocked:r}),am.config({}),fc.config({channels:((o={})[yE()]={onReceive:function(e){ik(e)}},o)})]}function sk(e){return"<alloy.field."+e+">"}function lk(e,t,n){function r(t){return tf(e)}function o(t,n){return void 0===n&&(n=void 0),function(r,o){return Ql(r,e,o).map((function(e){return t(e,o)})).getOr(n)}}function i(e,t){return"true"!==xi(e.element(),"aria-hidden")}var a,u=o(i,!1),c=o((function(e,t){var n;i(e)&&(n=e.element(),oa(n,"display","none"),wi(n,"aria-hidden","true"),Xr(e,Ur(),{name:t,visible:!1}))})),s=function(e,t){Pe(t,(function(t){return a(e,t)}))},l=o((function(e,t){var n;i(e)||(n=e.element(),ca(n,"display"),Si(n,"aria-hidden"),Xr(e,Ur(),{name:t,visible:!0}))}));u={getSlotNames:r,getSlot:function(t,n){return Ql(t,e,n)},isShowing:u,hideSlot:a=c,hideAllSlots:function(e){return s(e,r())},showSlot:l};return{uid:e.uid,dom:e.dom,components:t,behaviours:Rl(e.slotBehaviours),apis:u}}function fk(e){return{element:function(){return e.element().dom()}}}function dk(e,t){var r=Me(Ke(t),(function(e){var n=t[e];n=Xt(Gt("sidebar",nN,n));return{name:e,getApi:fk,onSetup:n.onSetup,onShow:n.onShow,onHide:n.onHide}}));return Me(r,(function(t){var o=mn(n);return e.slot(t.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:Pg.unnamedEvents([lh(t,o),fh(t,o),Xo(Ur(),(function(e,t){var n=t.event();He(r,(function(e){return e.name===n.name()})).each((function(t){(n.visible()?t.onShow:t.onHide)(t.getApi(e))}))}))])})}))}function mk(e){return Od.getCurrent(e).bind((function(e){return dE.isGrowing(e)||dE.hasGrown(e)?Od.getCurrent(e).bind((function(e){return He(tN.getSlotNames(e),(function(t){return tN.isShowing(e,t)}))})):ye.none()}))}function gk(e,t,n){function r(e){e!==o.get()&&(aN(t(),e,n.providers),o.set(e))}var o=mn(!1),i=mn(ye.none());e.on("ProgressState",(function(t){var n;i.get().each(zm.clearTimeout),Ee(t.time)?(n=zm.setEditorTimeout(e,(function(){return r(t.state)}),t.time),i.set(ye.some(n))):(r(t.state),i.set(ye.none()))}))}function hk(e,t){var n=ct(sN,t.menus),r=0<Ke(t.menus).length,o=void 0===t.menubar||!0===t.menubar?fN(cN):fN(!1===t.menubar?"":t.menubar);o=Ie(o,(function(e){return r&&t.menus.hasOwnProperty(e)&&t.menus[e].hasOwnProperty("items")||sN.hasOwnProperty(e)})),o=Me(o,(function(r){return r=n[r],lN({title:r.title,items:fN(r.items)},t,e)}));return Ie(o,(function(e){return 0<e.getItems().length&&Be(e.getItems(),(function(e){return"separator"!==e.type}))}))}function pk(e,t){n=(i=t).settings,r=n.skin,n=n.skin_url,!1!==r&&(r=r||"oxide",n=n?i.documentBaseURI.toAbsolute(n):Sb.baseURL+"/skins/ui/"+r);var n,r,o,i=n;i&&(o=i+"/skin.min.css",t.contentCSS.push(i+(e?"/content.inline":"/content")+".min.css")),!1===t.getParam("skin")==0&&o?ph.DOM.styleSheetLoader.load(o,dN(t)):dN(t)()}function vk(e,t,n,r){t=t.outerContainer;var o=n.toolbar,i=n.buttons;Oe(o,xe)?(o=o.map((function(t){return wO(e,{toolbar:t,buttons:i},{backstage:r},ye.none())})),uN.setToolbars(t,o)):uN.setToolbar(t,wO(e,n,{backstage:r},ye.none()))}function bk(e){function t(t){var n=e.getDoc().documentElement,o=i.get(),u=a.get();o.left()!==r.innerWidth||o.top()!==r.innerHeight?(i.set(Ja(r.innerWidth,r.innerHeight)),sp.fireResizeContent(e,t)):u.left()===n.offsetWidth&&u.top()===n.offsetHeight||(a.set(Ja(n.offsetWidth,n.offsetHeight)),sp.fireResizeContent(e,t))}function n(t){return sp.fireScrollContent(e,t)}var r=e.getWin(),o=e.getDoc().documentElement,i=mn(Ja(r.innerWidth,r.innerHeight)),a=mn(Ja(o.offsetWidth,o.offsetHeight)),u=(hN.bind(r,"resize",t),hN.bind(r,"scroll",n),rv(gn.fromDom(e.getBody()),"load",t));e.on("remove",(function(){u.unbind(),hN.unbind(r,"resize",t),hN.unbind(r,"scroll",n)}))}function yk(e,t){return{anchor:"makeshift",x:e,y:t}}function wk(e){return"longpress"===e.type||0===e.type.indexOf("touch")}function xk(e,t){var n;e=ph.DOM.getPos(e);return n=e.x,e=e.y,yk(t.x+n,t.y+e)}function Ck(e,t){return"contextmenu"===t.type?e.inline?wk(n=t)?(r=n.touches[0],yk(r.pageX,r.pageY)):yk(n.pageX,n.pageY):xk(e.getContentAreaContainer(),wk(r=t)?(n=r.touches[0],yk(n.clientX,n.clientY)):yk(r.clientX,r.clientY)):Sk(e);var n,r}function Sk(e){return{anchor:"selection",root:gn.fromDom(e.selection.getNode())}}function kk(e){return{anchor:"node",node:ye.some(gn.fromDom(e.selection.getNode())),root:gn.fromDom(e.getBody())}}function Tk(e){function t(){zm.setEditorTimeout(e,(function(){e.selection.setRng(o)}),10),i()}function n(e){e.preventDefault(),e.stopImmediatePropagation()}function r(){return i()}var o=e.selection.getRng(),i=(e.once("touchend",t),e.on("mousedown",n,!0),e.once("longpresscancel",r),function(){e.off("touchend",t),e.off("longpresscancel",r),e.off("mousedown",n)})}function Ek(e,t,n,r,o,i){var a=Tb(e)||Eb(e)||Nb(e),u=function(e,t){return t=(t?kk:Sk)(e),d({bubble:pc(0,12,PN),layouts:MN,overrides:{maxWidthFunction:OT(),maxHeightFunction:cl()}},t)}(e,i);Tx(n,dh.CLOSE_ON_EXECUTE,r,!0).map((function(n){t.preventDefault(),km.showMenuWithinBounds(o,u,{menu:{markers:Ep("normal")},data:n,type:"horizontal"},(function(){return FS(e,a)})),e.fire(XT)}))}function Ok(e){return xe(e)?"|"===e:"separator"===e.type}function Nk(e){if(xe(e))return e;switch(e.type){case"separator":return FN;case"submenu":return{type:"nestedmenuitem",text:e.text,icon:e.icon,getSubmenuItems:function(){var t=e.getSubmenuItems();return xe(t)?t:Me(t,Nk)}};default:return{type:"menuitem",text:e.text,icon:e.icon,onAction:(t=e.onAction,function(){return t()})}}var t}function Ak(e,t){if(0===t.length)return e;var n=Xe(e).filter((function(e){return!Ok(e)})).fold((function(){return[]}),(function(e){return[FN]}));return e.concat(n).concat(t).concat([FN])}function Dk(e,t,n){function r(e){return km.hide(a)}function o(t){var r,o="longpress"===t.type;LN.shouldNeverUseNative(e)&&t.preventDefault(),VN(e,t)||LN.isContextMenuDisabled(e)||(r=!o&&(2!==t.button||t.target===e.getBody()),(i()?zN:BN)(e,t,(function(){var n=r?e.selection.getStart(!0):t.target,o=e.ui.registry.getAll(),i=LN.getContextMenu(e);return HN(o.contextMenus,i,n)}),n,a,r))}var i=Xn().deviceType.isTouch,a=pa(km.sketch({dom:{tag:"div"},lazySink:t,onEscape:function(){return e.focus()},onShow:function(){return n.setContextMenuState(!0)},onHide:function(){return n.setContextMenuState(!1)},fireDismissalEventInstead:{},inlineBehaviours:ac([im("dismissContextMenu",[Xo(Hr(),(function(t,n){Sl.close(t),e.focus()}))])])}));e.on("init",(function(){var t="ResizeEditor ScrollContent ScrollWindow longpresscancel"+(i()?"":"ResizeWindow");e.on(t,r),e.on(i()?"longpress":"longpress contextmenu",o)}))}function _k(e,t,n,r){return t=t,e=(e=e).element(),o=parseInt(xi(e,t.leftAttr),10),e=parseInt(xi(e,t.topAttr),10),(isNaN(o)||isNaN(e)?ye.none():ye.some(Ja(o,e))).fold((function(){return n}),(function(e){return IO(e.left()+r.left(),e.top()+r.top())}));var o}function Rk(e,t,n,r,i,a){n=_k(e,t,n,r);var u,c,s,l,f=t.mustSnap?(u=n,c=i,s=a,l=t.getSnapPoints(e),XN(l,u,c,s).orThunk((function(){return Fe(l,(function(e,t){var n=t.sensor(),r=RO(u,n,t.range().left(),t.range().top(),c,s);return e.deltas.fold((function(){return{deltas:ye.some(r),snap:ye.some(t)}}),(function(n){return(r.left()+r.top())/2<=(n.left()+n.top())/2?{deltas:ye.some(r),snap:ye.some(t)}:e}))}),{deltas:ye.none(),snap:ye.none()}).snap.map((function(e){return{output:o(MO(e.output(),u,c,s)),extra:e.extra}}))}))):(r=n,m=i,g=a,f=t.getSnapPoints(e),XN(f,r,m,g)),d=XS(n,i,a),m=t,g=d;return r=(r=e).element(),wi(r,m.leftAttr,g.left()+"px"),wi(r,m.topAttr,g.top()+"px"),f.fold((function(){return{coord:IO(d.left(),d.top()),extra:ye.none()}}),(function(e){return{coord:e.output(),extra:e.extra()}}))}function Bk(e,t){GN(e,t)}function Mk(e,t){return{bounds:e.getBounds(),height:Ka(t.element()),width:ru(t.element()),comp:t}}function Pk(e,t,n,r){var o,i,a,u=t.getTarget(e.element());t.repositionTarget&&(o=ri(e.element()),o=ou(o),i=DO(u),a=YN(u),a=KN(e,t.snaps,a,o,i,r,n),n=BO(a,o,i),ia(u,n)),t.onDrag(e,u,r)}function zk(e,t,n,r){var o=e+t;e=n.filter((function(e){return o<e})),t=r.filter((function(e){return e<o}));return e.or(t).getOr(o)}function Ik(e,t,n,r,o){var i={};return i.height=zk(r,t.top(),kv(e),ye.from(e.getParam("max_height")).filter(Ee)),n===uT.Both&&(i.width=zk(o,t.left(),Sv(e),ye.from(e.getParam("max_width")).filter(Ee))),i}function Lk(e,t){var n,r,o,i=function(){var e=Hg.translate(["Powered by {0}","Tiny"]);return{dom:{tag:"span",classes:["tox-statusbar__branding"],innerHtml:'<a href="https://www.tiny.cloud/?utm_campaign=editor_referral&utm_medium=poweredby&utm_source=tinymce&utm_content=v5" rel="noopener" target="_blank" tabindex="-1" aria-label="'+e+'">'+e+"</a>"}}};return{dom:{tag:"div",classes:["tox-statusbar"]},components:(r=[],e.getParam("elementpath",!0,"boolean")&&r.push(tA.renderElementPath(e,{})),Vn(e.settings.plugins,"wordcount")&&r.push(nA(e,t)),e.getParam("branding",!0,"boolean")&&r.push(i()),r=0<r.length?[{dom:{tag:"div",classes:["tox-statusbar__text-container"]},components:r}]:[],o=!Vn((i=e).settings.plugins,"autoresize"),(o=!1===(i=i.getParam("resize",o))?uT.None:"both"===i?uT.Both:uT.Vertical)!==uT.None&&r.push((n=o,{dom:{tag:"div",classes:["tox-statusbar__resize-handle"],attributes:{title:t.translate("Resize")},innerHtml:Rm("resize-handle",t.icons)},behaviours:ac([QN.config({mode:"mouse",repositionTarget:!1,onDrag:function(t,r,o){eA(e,o,n)},blockerClass:"tox-blocker"})])})),r)}}function Fk(e){return void 0===e.touches||1!==e.touches.length?ye.none():ye.some(e.touches[0])}function Hk(e){return[$("type"),an("columns",Qt),e]}function Vk(e){return Vt("items","items",lt(),It(qt((function(t){return Gt("Checking item of "+e,AA,t).fold((function(e){return we.error(Kt(e))}),(function(e){return we.value(e)}))}))))}function Uk(e){return Ce(e)?[e].concat(je(nt(e),Uk)):Se(e)?je(e,Uk):[]}function jk(e){return xe(e.type)&&xe(e.name)}function Wk(e){return{internalDialog:Xt(Gt("dialog",_A,e)),dataValidator:function(e){return e=MA(e),e=je(e,(function(e){return BA(e).fold((function(){return[]}),(function(t){return[an(e.name,t)]}))})),zt(e)}(e),initialData:e.initialData}}function qk(e){var t=[],n={};return Ze(e,(function(e,r){e.fold((function(){t.push(r)}),(function(e){n[r]=e}))})),0<t.length?we.error(t):we.value(n)}function $k(e){return Ge(function(e,t){return e=Ne.call(e,0),e.sort(t),e}(e,(function(e,t){return t<e?-1:e<t?1:0})))}function Gk(e,n,r){pu(e,'[role="dialog"]').each((function(o){r.get().map((function(r){return oa(n,"height","0"),Math.min(r,(r=e,a=pu(i=o,".tox-dialog-wrap").getOr(i),(a="fixed"===Do(a,"position")?Math.max(t.document.documentElement.clientHeight,t.window.innerHeight):Math.max(t.document.documentElement.offsetHeight,t.document.documentElement.scrollHeight))-(i.dom().getBoundingClientRect().height-r.dom().getBoundingClientRect().height)));var i,a})).each((function(e){oa(n,"height",e+"px")}))}))}function Xk(e){var t;return t=mn(ye.none()),{smartTabHeight:{extraEvents:[Zo((function(n){vu(n.element(),'[role="tabpanel"]').each((function(r){var o;oa(r,"visibility","hidden"),n.getSystem().getByDom(r).toOption().each((function(n){i=r,a=n;var o,i,a;n=Me(o=e,(function(e,t){return rm.set(a,o[t].view()),t=i.dom().getBoundingClientRect(),rm.set(a,[]),t.height})),n=$k(n);t.set(n)})),Gk(n.element(),r,t),ca(r,"visibility"),o=n,Ge(e).each((function(e){return LA.showTab(o,e.value)})),zm.requestAnimationFrame((function(){Gk(n.element(),r,t)}))}))})),Xo(Ir(),(function(e){vu(e.element(),'[role="tabpanel"]').each((function(n){Gk(e.element(),n,t)}))})),Xo(Hb,(function(e,n){vu(e.element(),'[role="tabpanel"]').each((function(n){var r=mc(),o=(oa(n,"visibility","hidden"),ua(n,"height").map((function(e){return parseInt(e,10)}))),i=(ca(n,"height"),n.dom().getBoundingClientRect().height);o.forall((function(e){return e<i}))?(t.set(ye.from(i)),Gk(e.element(),n,t)):o.each((function(e){oa(n,"height",e+"px")})),ca(n,"visibility"),r.each(dc)}))}))],selectFirst:!1},naiveTabHeight:{extraEvents:[],selectFirst:!0}}}function Yk(e,t){function n(e){e=_l.getValue(e),e=qk(e).getOr({});var t=o.get();t=ut(t,e);o.set(t)}function r(e){var t=o.get();_l.setValue(e,t)}var o=mn({}),i=mn(null),a=(e=Me(e.tabs,(function(e){return{value:e.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"],innerHtml:t.shared.providers.translate(e.title)},view:function(){return[dw.sketch((function(o){return{dom:{tag:"div",classes:["tox-form"]},components:Me(e.items,(function(e){return $C(o,e,t)})),formBehaviours:ac([nm.config({mode:"acyclic",useTabstopAt:c(_w.isPseudoStop)}),im("TabView.form.events",[Zo(r),Qo(n)]),fc.config({channels:xt([{key:FA,value:{onReceive:n}},{key:HA,value:{onReceive:r}}])})])}}))]}}})),Xk(e).smartTabHeight);return LA.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:function(e,t,n){t=_l.getValue(t),Xr(e,Fb,{name:t,oldName:i.get()}),i.set(t)},tabs:e,components:[LA.parts().tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[IA.parts().tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:ac([Jb.config({})])}),LA.parts().tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:a.selectFirst,tabSectionBehaviours:ac([im("tabpanel",a.extraEvents),nm.config({mode:"acyclic"}),Od.config({find:function(e){return Ge(LA.getViewItems(e))}}),_l.config({store:{mode:"manual",getValue:function(e){return e.getSystem().broadcastOn([FA],{}),o.get()},setValue:function(e,t){o.set(t),e.getSystem().broadcastOn([HA],{})}}})])})}function Kk(e,n,r,o){return{dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:d(d({},n.map((function(e){return{id:e}})).getOr({})),o?{"aria-live":"polite"}:{})},components:[],behaviours:ac([Cw(0),NE.config({channel:jA,updateState:function(e,t){return ye.some({isTabPanel:function(){return"tabpanel"===t.body.type}})},renderComponents:function(e){return"tabpanel"!==e.body.type?[(n=e.body,o=r,{dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[(i=Dm(dw.sketch((function(e){return{dom:{tag:"div",classes:["tox-form"].concat(n.classes)},components:Me(n.items,(function(t){return $C(e,t,o)}))}})))).asSpec()]}],behaviours:ac([nm.config({mode:"acyclic",useTabstopAt:c(_w.isPseudoStop)}),xw(i),Ow.memento(i,{postprocess:function(e){return qk(e).fold((function(e){return t.console.error(e),{}}),(function(e){return e}))}})])})]:[Yk(e.body,r)];var n,o,i},initialData:e})])}}function Jk(e,t){return[Ko(mr(),_w.onFocus),e(Bb,(function(e,n){t.onClose(),n.onClose()})),e(Mb,(function(e,t,n,r){t.onCancel(e),Gr(r,Bb)})),Xo(Lb,(function(e,n){return t.onUnblock()})),Xo(Ib,(function(e,n){return t.onBlock(n.event())}))]}function Zk(e,t){function n(e,t){return Cb.sketch({dom:{tag:"div",classes:["tox-dialog__footer-"+e]},components:Me(t,(function(e){return e.memento.asSpec()}))})}return t=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}}(t.map((function(e){return e.footerButtons})).getOr([]),(function(e){return"start"===e.align})),[n("start",t.pass),n("end",t.fail)]}function Qk(e,t){return{dom:Gm('<div class="tox-dialog__footer"></div>'),components:[],behaviours:ac([NE.config({channel:WA,initialData:e,updateState:function(e,n){var r=Me(n.buttons,(function(e){var n=Dm(uC(e,e.type,t));return{name:e.name,align:e.align,memento:n}}));return ye.some({lookupByName:function(e,t){return n=e,o=t,He(r,(function(e){return e.name===o})).bind((function(e){return e.memento.getOpt(n)}));var n,o},footerButtons:r})},renderComponents:Zk})])}}function eT(e,t){var n;return e.getRoot().getSystem().isConnected()?(n=Od.getCurrent(e.getFormWrapper()).getOr(e.getFormWrapper()),dw.getField(n,t).fold((function(){var r=e.getFooter();return NE.getState(r).get().bind((function(e){return e.lookupByName(n,t)}))}),(function(e){return ye.some(e)}))):ye.none()}function tT(e){return Am.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":e.translate("Close"),title:e.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(e){Gr(e,Mb)}})}function nT(e,t,n){function r(e){return[ma(n.translate(e.title))]}return{dom:{tag:"div",classes:["tox-dialog__title"],attributes:d({},t.map((function(e){return{id:e}})).getOr({}))},components:r(e),behaviours:ac([NE.config({channel:UA,renderComponents:r})])}}function rT(){return{dom:Gm('<div class="tox-dialog__draghandle"></div>')}}function oT(e){var t=e.backstage.shared;return{open:function(n,r){function o(e){sA.hide(u),r(e)}var i=Dm(uC({name:"yes",text:"Yes",primary:!0,align:"end",disabled:!1,icon:ye.none()},"submit",e.backstage)),a=uC({name:"no",text:"No",primary:!0,align:"end",disabled:!1,icon:ye.none()},"cancel",e.backstage),u=pa(wD({lazySink:function(){return t.getSink()},headerOverride:ye.some(mD),partSpecs:{title:pD(),close:hD((function(){o(!1)}),t.providers),body:vD(n,t.providers),footer:bD(yD([],[a,i.asSpec()]))},onCancel:function(){return o(!1)},onSubmit:function(){return o(!0)},extraClasses:["tox-confirm-dialog"]}));sA.show(u),n=i.get(u);am.focus(n)}}}var iT,aT,uT,cT=af({name:"HtmlSelect",configFields:[on("options"),gs("selectBehaviours",[am,_l]),ln("selectClasses",[]),ln("selectAttributes",{}),Z("data")],factory:function(e,t){var n=Me(e.options,(function(e){return{dom:{tag:"option",value:e.value,innerHtml:e.text}}})),r=e.data.map((function(e){return wt("initialValue",e)})).getOr({});return{uid:e.uid,dom:{tag:"select",classes:e.selectClasses,attributes:e.selectAttributes},components:n,behaviours:Bl(e.selectBehaviours,[am.config({}),_l.config({store:d({mode:"manual",getValue:function(e){return la(e.element())},setValue:function(t,n){He(e.options,(function(e){return e.value===n})).isSome()&&fa(t.element(),n)}},r)})])}}}),sT=(Wd=Object.freeze({events:function(e,t){var n=e.stream.streams.setup(e,t);return Go([Xo(e.event,n),Qo((function(){return t.cancel()}))].concat(e.cancelEvent.map((function(e){return[Xo(e,(function(){return t.cancel()}))]})).getOr([])))}}),Sc=Object.freeze({throttle:BC,init:function(e){return e.stream.streams.state(e)}}),tm=[an("stream",U("mode",{throttle:[on("delay"),ln("stopEvent",!0),Bu("streams",{setup:function(e,t){var n=e.stream,r=Lm(e.onStream,n.delay);return t.setTimer(r),function(e,t){r.throttle(e,t),n.stopEvent&&t.stop()}},state:BC})]})),ln("event","input"),Z("cancelEvent"),Ea("onStream")],Ba({fields:tm,name:"streaming",active:Wd,state:Sc})),lT=function(e,t){e=e.element();var n=la(e),r=e.dom();"number"!==xi(e,"type")&&t(r,n)},fT=o("alloy.typeahead.itemexecute"),dT=(Xd=o([Z("lazySink"),on("fetch"),ln("minChars",5),ln("responseTime",1e3),ka("onOpen"),ln("getHotspot",ye.some),ln("getAnchorOverrides",o({})),ln("layouts",ye.none()),ln("eventOrder",{}),ue("model",{},[ln("getDisplayText",(function(e){return void 0!==e.meta&&void 0!==e.meta.text?e.meta.text:e.value})),ln("selectsOver",!0),ln("populateFromBrowse",!0)]),ka("onSetValue"),Ta("onExecute"),ka("onItemExecute"),ln("inputClasses",[]),ln("inputAttributes",{}),ln("inputStyles",{}),ln("matchWidth",!0),ln("useMinWidth",!1),ln("dismissOnBlur",!0),Ca(["openClass"]),Z("initialData"),gs("typeaheadBehaviours",[am,_l,sT,nm,sm,ny]),dn("previewing",(function(){return mn(!0)}))].concat(qn()).concat(Iv())),Ys=o([Tc({schema:[xa()],name:"menu",overrides:function(e){return{fakeFocus:!0,onHighlight:function(t,n){e.previewing.get()?t.getSystem().getByUid(e.uid).each((function(r){zC(e.model,r,n).fold((function(){return Nd.dehighlight(t,n)}),(function(e){return e()}))})):t.getSystem().getByUid(e.uid).each((function(t){e.model.populateFromBrowse&&MC(e.model,t,n)})),e.previewing.set(!1)},onExecute:function(t,n){return t.getSystem().getByUid(e.uid).toOption().map((function(e){return Xr(e,fT(),{item:n}),!0}))},onHover:function(t,n){e.previewing.set(!1),t.getSystem().getByUid(e.uid).each((function(t){e.model.populateFromBrowse&&MC(e.model,t,n)}))}}}})]),uf({name:"Typeahead",configFields:Xd(),partFields:Ys(),factory:function(e,t,r,o){function i(t,r,i){e.previewing.set(!1);var u=ny.getCoupled(t,"sandbox");Sl.isOpen(u)?Od.getCurrent(u).each((function(e){Nd.getHighlighted(e).fold((function(){i(e)}),(function(){Zr(u,e.element(),"keydown",r)}))})):uy(e,a(t),t,u,o,(function(e){Od.getCurrent(e).each(i)}),xb.HighlightFirst).get(n)}function a(e){return function(t){return t.map((function(t){var n=nt(t.menus);n=je(n,(function(e){return Ie(e.items,(function(e){return"item"===e.type}))}));return _l.getState(e).update(Me(n,(function(e){return e.data}))),t}))}}var u=Ub(e),c=[am.config({}),_l.config({onSetValue:e.onSetValue,store:d({mode:"dataset",getDataKey:function(e){return la(e.element())},getFallbackEntry:function(e){return{value:e,meta:{}}},setValue:function(t,n){fa(t.element(),e.model.getDisplayText(n))}},e.initialData.map((function(e){return wt("initialValue",e)})).getOr({}))}),sT.config({stream:{mode:"throttle",delay:e.responseTime,stopEvent:!1},onStream:function(t,r){var i,u=ny.getCoupled(t,"sandbox");am.isFocused(t)&&la(t.element()).length>=e.minChars&&(i=Od.getCurrent(u).bind((function(e){return Nd.getHighlighted(e).map(_l.getValue)})),e.previewing.set(!0),uy(e,a(t),t,u,o,(function(t){Od.getCurrent(u).each((function(t){i.fold((function(){e.model.selectsOver&&Nd.highlightFirst(t)}),(function(e){Nd.highlightBy(t,(function(t){return _l.getValue(t).value===e.value})),Nd.getHighlighted(t).orThunk((function(){return Nd.highlightFirst(t),ye.none()}))}))}))}),xb.HighlightFirst).get(n))},cancelEvent:Rr()}),nm.config({mode:"special",onDown:function(e,t){return i(e,t,Nd.highlightFirst),ye.some(!0)},onEscape:function(e){return e=ny.getCoupled(e,"sandbox"),Sl.isOpen(e)?(Sl.close(e),ye.some(!0)):ye.none()},onUp:function(e,t){return i(e,t,Nd.highlightLast),ye.some(!0)},onEnter:function(t){var n,r=ny.getCoupled(t,"sandbox"),o=Sl.isOpen(r);return o&&!e.previewing.get()?Od.getCurrent(r).bind((function(e){return Nd.getHighlighted(e)})).map((function(e){return Xr(t,fT(),{item:e}),!0})):(n=_l.getValue(t),Gr(t,Rr()),e.onExecute(r,t,n),o&&Sl.close(r),ye.some(!0))}}),sm.config({toggleClass:e.markers.openClass,aria:{mode:"expanded"}}),ny.config({others:{sandbox:function(t){return Pv(e,t,{onOpen:function(){return sm.on(t)},onClose:function(){return sm.off(t)}})}}}),im("typeaheadevents",[ti((function(t){Mv(e,a(t),t,o,n,xb.HighlightFirst).get(n)})),Xo(fT(),(function(t,n){var r=ny.getCoupled(t,"sandbox");MC(e.model,t,n.event().item()),Gr(t,Rr()),e.onItemExecute(t,r,n.event().item(),_l.getValue(t)),Sl.close(r),PC(t)}))].concat(e.dismissOnBlur?[Xo(Sr(),(function(e){e=ny.getCoupled(e,"sandbox"),gc(e.element()).isNone()&&Sl.close(e)}))]:[]))];return{uid:e.uid,dom:Ov(ut(e,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:d(d({},u),Bl(e.typeaheadBehaviours,c)),eventOrder:e.eventOrder}}})),mT=function(e){return d(d({},e),{toCached:function(){return mT(e.toCached())},bindFuture:function(t){return mT(e.bind((function(e){return e.fold((function(e){return Xb.pure(we.error(e))}),(function(e){return t(e)}))})))},bindResult:function(t){return mT(e.map((function(e){return e.bind(t)})))},mapResult:function(t){return mT(e.map((function(e){return e.map(t)})))},mapError:function(t){return mT(e.map((function(e){return e.mapError(t)})))},foldResult:function(t,n){return e.map((function(e){return e.fold(t,n)}))},withTimeout:function(n,r){return mT(Xb.nu((function(o){var i=!1,a=t.setTimeout((function(){i=!0,o(we.error(r()))}),n);e.get((function(e){i||(t.clearTimeout(a),o(e))}))})))}})},gT=IC,hT={type:"separator"},pT=function(e){return HC("header",e.targets)},vT=function(e){return HC("anchor",e.targets)},bT=function(e){return ye.from(e.anchorTop).map((function(e){return FC("<top>",e)})).toArray()},yT=function(e){return ye.from(e.anchorBottom).map((function(e){return FC("<bottom>",e)})).toArray()},wT=function(e){return Me(e,(function(e){return FC(e,e)}))},xT=function(e){return Fe(e,(function(e,t){return 0===e.length||0===t.length?e.concat(t):e.concat(hT,t)}),[])},CT=function(e,t){var n=e.toLowerCase();return Ie(t,(function(e){var t=(void 0!==e.meta&&void 0!==e.meta.text?e.meta:e).text;return Vn(t.toLowerCase(),n)||Vn(e.value.toLowerCase(),n)}))},ST=Oi("aria-invalid"),kT={bar:qC((function(e,t){return t=t.shared,{dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:Me(e.items,t.interpreter)}})),collection:qC((function(e,t){return jC(e,t.shared.providers)})),alertbanner:qC((function(e,t){return n=e,e=t.shared.providers,Cb.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in","tox-notification--"+n.level]},components:[{dom:{tag:"div",classes:["tox-notification__icon"]},components:[Am.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:Rm(n.icon,e.icons),attributes:{title:e.translate(n.iconTooltip)}},action:function(e){Xr(e,Pb,{name:"alert-banner",value:n.url})}})]},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:e.translate(n.text)}}]});var n})),input:qC((function(e,t){return e=e,t=t.shared.providers,RC({name:e.name,multiline:!1,label:e.label,inputMode:e.inputMode,placeholder:e.placeholder,flex:!1,disabled:e.disabled,classname:"tox-textfield",validation:ye.none(),maximized:e.maximized},t)})),textarea:qC((function(e,t){return e=e,t=t.shared.providers,RC({name:e.name,multiline:!0,label:e.label,inputMode:ye.none(),placeholder:e.placeholder,flex:!0,disabled:e.disabled,classname:"tox-textarea",validation:ye.none(),maximized:e.maximized},t)})),label:qC((function(e,t){return e=e,t=t.shared,n={dom:{tag:"label",innerHtml:t.providers.translate(e.label),classes:["tox-label"]}},e=Me(e.items,t.interpreter),{dom:{tag:"div",classes:["tox-form__group"]},components:[n].concat(e),behaviours:ac([ww(),rm.config({}),Ow.domHtml(ye.none()),nm.config({mode:"acyclic"})])};var n})),iframe:(iT=function(e,t){return hb(e,t.shared.providers)},function(e,t,n){return t=ut(t,{source:"dynamic"}),qC(iT)(e,t,n)}),button:qC((function(e,t){return _x(e,t.shared.providers)})),checkbox:qC((function(e,t){return UC(e,t.shared.providers)})),colorinput:qC((function(e,t){return Lv(e,t.shared,t.colorinput)})),colorpicker:qC((function(e){function n(e){return"tox-"+e}var r=yw(sb,n),o=Dm(r.sketch({dom:{tag:"div",classes:["tox-color-picker-container"],attributes:{role:"presentation"}},onValidHex:function(e){Xr(e,Pb,{name:"hex-valid",value:!0})},onInvalidHex:function(e){Xr(e,Pb,{name:"hex-valid",value:!1})}}));return{dom:{tag:"div"},components:[o.asSpec()],behaviours:ac([_l.config({store:{mode:"manual",getValue:function(e){return e=o.get(e),Od.getCurrent(e).bind((function(e){return _l.getValue(e).hex})).map((function(e){return"#"+e})).getOr("")},setValue:function(e,n){var r=/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/.exec(n);n=o.get(e);Od.getCurrent(n).fold((function(){t.console.log("Can not find form")}),(function(e){_l.setValue(e,{hex:ye.from(r[1]).getOr("")}),dw.getField(e,"hex").each((function(e){Gr(e,vr())}))}))}}}),ww()])}})),dropzone:qC((function(e,t){return db(e,t.shared.providers)})),grid:qC((function(e,t){return t=t.shared,{dom:{tag:"div",classes:["tox-form__grid","tox-form__grid--"+e.columns+"col"]},components:Me(e.items,t.interpreter)}})),selectbox:qC((function(e,t){return n=e,r=t.shared.providers,e=Me(n.items,(function(e){return{text:r.translate(e.text),value:e.value}})),t=n.label.map((function(e){return ty(e,r)})),e=Vb.parts().field({dom:{},selectAttributes:{size:n.size},options:e,factory:cT,selectBehaviours:ac([uh.config({disabled:n.disabled}),Jb.config({}),im("selectbox-change",[Xo(br(),(function(e,t){Xr(e,Rb,{name:n.name})}))])])}),o=1<n.size?ye.none():ye.some({dom:{tag:"div",classes:["tox-selectfield__icon-js"],innerHtml:Rm("chevron-down",r.icons)}}),e={dom:{tag:"div",classes:["tox-selectfield"]},components:Ue([[e],o.toArray()])},Vb.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:Ue([t.toArray(),[e]]),fieldBehaviours:ac([uh.config({disabled:n.disabled,onDisabled:function(e){Vb.getField(e).each(uh.disable)},onEnabled:function(e){Vb.getField(e).each(uh.enable)}})])});var n,r,o})),sizeinput:qC((function(e,t){return mC(e,t.shared.providers)})),urlinput:qC((function(e,t){return VC(e,t,t.urlinput)})),customeditor:qC((function(e){var t=mn(ye.none()),n=Dm({dom:{tag:e.tag}}),r=mn(ye.none());return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:ac([im("editor-foo-events",[Zo((function(o){n.getOpt(o).each((function(n){(Object.prototype.hasOwnProperty.call(e,"init")?e.init(n.element().dom()):Tw.load(e.scriptId,e.scriptUrl).then((function(t){return t(n.element().dom(),e.settings)}))).then((function(e){r.get().each((function(t){e.setValue(t)})),r.set(ye.none()),t.set(ye.some(e))}))}))}))]),_l.config({store:{mode:"manual",getValue:function(){return t.get().fold((function(){return r.get().getOr("")}),(function(e){return e.getValue()}))},setValue:function(e,n){t.get().fold((function(){r.set(ye.some(n))}),(function(e){return e.setValue(n)}))}}}),ww()]),components:[n.asSpec()]}})),htmlpanel:qC((function(e){return"presentation"===e.presets?Cb.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:e.html}}):Cb.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:e.html,attributes:{role:"document"}},containerBehaviours:ac([Jb.config({}),am.config({})])})})),imagetools:qC((function(e,t){return _C(e,t.shared.providers)})),table:qC((function(e,t){return WC(e,t.shared.providers)})),panel:qC((function(e,t){return{dom:{tag:"div",classes:e.classes},components:Me(e.items,t.shared.interpreter)}}))},TT={field:function(e,t){return t}},ET=function(e,t){return GC(TT,e,t)},OT=o((function(e,t){t=Math.floor(t),t=tu.max(e,t,["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"]),oa(e,"max-width",t+"px")})),NT={valignCentre:[],alignCentre:[],alignLeft:[],alignRight:[],right:[],left:[],bottom:[],top:[]},AT={getAnchors:function(e,t,n){function r(){return gn.fromDom(e.getBody())}var o,i,a,u,c,s,l,f,d=Db(e);return{toolbar:d?function(){return{anchor:"node",root:l(),node:ye.from(l()),bubble:pc(-12,-12,NT),layouts:{onRtl:function(){return[Tm]},onLtr:function(){return[Em]}},overrides:{maxHeightFunction:cl()}}}:function(){return{anchor:"hotspot",hotspot:f(),bubble:pc(-12,12,NT),layouts:{onRtl:function(){return[Yu]},onLtr:function(){return[Ku]}},overrides:{maxHeightFunction:cl()}}},toolbarOverflow:(s=n,function(){return{anchor:"hotspot",hotspot:s(),overrides:{maxWidthFunction:OT()},layouts:{onRtl:function(){return[Yu,Ku]},onLtr:function(){return[Ku,Yu]}}}}),banner:(c=f=t,d?function(){return{anchor:"node",root:u(),node:ye.from(u()),layouts:{onRtl:function(){return[Om]},onLtr:function(){return[Om]}}}}:function(){return{anchor:"hotspot",hotspot:c(),layouts:{onRtl:function(){return[ec]},onLtr:function(){return[ec]}}}}),cursor:(i=e,function(){return{anchor:"selection",root:a(),getSelection:function(){var e=i.selection.getRng();return ye.some(Nc.range(gn.fromDom(e.startContainer),e.startOffset,gn.fromDom(e.endContainer),e.endOffset))}}}),node:(o=a=u=l=r,function(e){return{anchor:"node",root:o(),node:e}})}}},DT=function(e){return{colorPicker:function(e,t){wp(o)(e,t)},hasCustomColors:function(){return cp.hasCustomColors(r)},getColors:function(){return cp.getColors(n)},getColorCols:(t=n=r=o=e,function(){return xp(t)})};var t,n,r,o},_T=function(e){return{isDraggableModal:(t=e,function(){return t.getParam("draggable_modal",!1,"boolean")})};var t},RT=[{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"}]}],BT=function(e){return ye.from(e.getParam("style_formats")).filter(Se).map((function(t){return t=YC(e,t),e.getParam("style_formats_merge",!1,"boolean")?RT.concat(t):t})).getOr(RT)},MT=function(e){function t(t){return function(){return e.formatter.match(t)}}function n(t){return function(){var n=e.formatter.get(t);return void 0!==n?ye.some({tag:0<n.length&&(n[0].inline||n[0].block)||"div",styleAttr:e.formatter.getCssText(t)}):ye.none()}}function r(e){var t=e.items;return void 0!==t&&0<t.length?je(t,r):[e.format]}var o=mn([]),i=mn([]),a=mn([]),u=mn([]),c=mn(!1);return e.on("init",(function(){var a=BT(e);a=JC(e,a,t,n);o.set(a),i.set(je(a,r))})),e.on("addStyleModifications",(function(o){var i=JC(e,o.items,t,n);a.set(i),c.set(o.replace),u.set(je(i,r))})),{getData:function(){var e=c.get()?[]:o.get(),t=a.get();return e.concat(t)},getFlattenedKeys:function(){var e=c.get()?[]:i.get(),t=u.get();return e.concat(t)}}},PT=yC.trim,zT=ZC("true"),IT=ZC("false"),LT=function(e){for(;e=e.parentNode;){var t=e.contentEditable;if(t&&"inherit"!==t)return zT(e)}return!1},FT=function(e,t){return Me(_s(gn.fromDom(t),e),(function(e){return e.dom()}))},HT=function(e){return(t=e)&&"A"===t.nodeName&&void 0!==(t.id||t.name)&&nS(e);var t},VT=function(e){return tS(e)&&nS(e)},UT=function(e){var t,n=e.id||Oi("h");return QC("header",eS(e),"#"+n,tS(t=e)?parseInt(t.nodeName.substr(1),10):0,(function(){e.id=n}))},jT=function(e){var t=e.id||e.name;e=eS(e);return QC("anchor",e||"#"+t,"#"+t,0,n)},WT=function(e){return e=FT("h1,h2,h3,h4,h5,h6,a:not([href])",e),Ie(Me(Ie(e,VT),UT).concat(Me(Ie(e,HT),jT)),rS)},qT="tinymce-url-history",$T=Object.prototype.hasOwnProperty,GT=function(e){return{getHistory:uS,addToHistory:cS,getLinkInformation:function(){return!1===(t=e).settings.typeahead_urls?ye.none():ye.some({targets:WT(t.getBody()),anchorTop:fS(t.settings,"anchor_top","#top").getOrUndefined(),anchorBottom:fS(t.settings,"anchor_bottom","#bottom").getOrUndefined()});var t},getValidationHandler:function(){return t=e,ye.from(t.settings.file_picker_validator_handler).filter(Te).orThunk((function(){return ye.from(t.settings.filepicker_validator_handler).filter(Te)}));var t},getUrlPicker:function(t){return r=t,mS((n=e).settings,r).map((function(e){return function(t){return Xb.nu((function(o){var i=yC.extend({filetype:r},ye.from(t.meta).getOr({}));e.call(n,(function(e,t){if(!xe(e))throw new Error("Expected value to be string");if(void 0!==t&&!Ce(t))throw new Error("Expected meta to be a object");o({value:e,meta:t})}),t.value,i)}))}}));var n,r}}},XT="contexttoolbar-hide",YT=($d=o([on("dom"),ln("shell",!0),gs("toolbarBehaviours",[rm])]),qd=o([Gl({name:"groups",overrides:function(e){return{behaviours:ac([rm.config({})])}}})]),uf({name:"Toolbar",configFields:$d(),partFields:qd(),factory:function(e,n,r,o){return n=e.shell?{behaviours:[rm.config({})],components:[]}:{behaviours:[],components:n},{uid:e.uid,dom:e.dom,components:n.components,behaviours:Bl(e.toolbarBehaviours,n.behaviours),apis:{setGroups:function(n,r){n=n,(e.shell?ye.some(n):Ql(n,e,"groups")).fold((function(){throw t.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(e){rm.set(e,r)}))}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(e,t,n){e.setGroups(t,n)}}})),KT=uo("within","extra","withinWidth"),JT=function(e,t,n,r){var o,i=Ss(e,t,"primary"),a=Ql(e,t,"overflow-button"),u=(e=ny.getCoupled(e,"overflowGroup"),oa(i.element(),"visibility","hidden"),o=a,n.bind((function(e){return gc(e.element()).bind((function(t){return e.getSystem().getByDom(t).toOption()}))})).orThunk((function(){return o.filter(am.isFocused)}))),c=(t=(n.each((function(e){YT.setGroups(e,[])})),t.builtGroups.get()),vS(i,t.concat([e])),nu(i.element())),s=pS(c,t,(function(e){return nu(e.element())}),e);0===s.extra().length?(rm.remove(i,e),n.each((function(e){YT.setGroups(e,[])}))):(vS(i,s.within()),n.each((function(e){vS(e,s.extra())}))),ca(i.element(),"visibility"),sa(i.element()),n.each((function(e){a.each((function(t){return sm.set(t,r(e))})),u.each(am.focus)}))},ZT=(Wn=o([on("items"),Ca(["itemSelector"]),gs("tgroupBehaviours",[nm])]),jl=o([lc({name:"items",unit:"item"})]),uf({name:"ToolbarGroup",configFields:Wn(),partFields:jl(),factory:function(e,t,n,r){return{uid:e.uid,dom:e.dom,components:t,behaviours:Bl(e.tgroupBehaviours,[nm.config({mode:"flow",selector:e.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}}}})),QT=(Yn=o([gs("splitToolbarBehaviours",[ny]),dn("builtGroups",(function(){return mn([])}))]),Wl=o([Ca(["overflowToggledClass"]),on("getAnchor"),te("getOverflowBounds"),on("lazySink")].concat(Yn())),ql=o([$l({factory:YT,schema:$d(),name:"primary"}),Tc({factory:YT,schema:$d(),name:"overflow",overrides:function(e){return{toolbarBehaviours:ac([nm.config({mode:"cyclic",onEscape:function(t){return Ql(t,e,"overflow-button").each(am.focus),ye.none()}})])}}}),Tc({name:"overflow-button",overrides:function(e){return{dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:ac([sm.config({toggleClass:e.markers.overflowToggledClass,aria:{mode:"expanded"},toggleOnExecute:!1})])}}}),Tc({name:"overflow-group"})]),function(e){return e.getSystem().isConnected()}),eE=function(e,t,n){var r=t.lazySink(e).getOrDie();e=t.getAnchor(e),t=t.getOverflowBounds.map((function(e){return e()}));dl.positionWithinBounds(r,e,n,t)},tE=function(e,t){var n=Sl.getState(ny.getCoupled(e,"sandbox"));JT(e,t,n,QT),n.each((function(n){return eE(e,t,n)}))},nE=function(e,t){Sl.getState(ny.getCoupled(e,"sandbox")).each((function(n){return eE(e,t,n)}))},rE=uf({name:"SplitFloatingToolbar",configFields:Wl(),partFields:ql(),factory:function(e,t,n,r){return bS(e,t,0,r,{coupling:{sandbox:function(t){return n=t,r=e,{dom:{tag:"div",attributes:{id:(i=yu()).id()}},behaviours:ac([nm.config({mode:"special",onEscape:function(e){return Sl.close(e),ye.some(!0)}}),Sl.config({onOpen:function(e,t){tE(n,r),Ql(n,r,"overflow-button").each((function(e){sm.on(e),i.link(e.element())})),nm.focusIn(t)},onClose:function(){Ql(n,r,"overflow-button").each((function(e){sm.off(e),am.focus(e),i.unlink(e.element())}))},isPartOf:function(e,t,r){return xu(t,r)||xu(n,r)},getAttachPoint:function(){return r.lazySink(n).getOrDie()}}),fc.config({channels:d({},Dl({isExtraPart:o(!1),doReposition:function(){return nE(n,r)}}))})])};var n,r,i}},apis:{refresh:function(t){return tE(t,e)},toggle:function(e){var t=r;e=ny.getCoupled(e,"sandbox"),Sl.isOpen(e)?Sl.close(e):Sl.open(e,t.overflow())},getOverflow:function(e){return Sl.getState(ny.getCoupled(e,"sandbox"))},reposition:function(t){return nE(t,e)}}})},apis:{setGroups:function(e,t,n){e.setGroups(t,n)},refresh:function(e,t){e.refresh(t)},reposition:function(e,t){e.reposition(t)},getMoreButton:function(e,t){return e.getMoreButton(t)},getOverflow:function(e,t){return e.getOverflow(t)},toggle:function(e,t){e.toggle(t)}}}),oE=function(e,t){return t.getAnimationRoot.fold((function(){return e.element()}),(function(t){return t(e)}))},iE=function(e){return e.dimension.property},aE=function(e,t){return e.dimension.getDimension(t)},uE=function(e,t){e=oE(e,t),ea(e,[t.shrinkingClass,t.growingClass])},cE=function(e,t){Ji(e.element(),t.openClass),Yi(e.element(),t.closedClass),oa(e.element(),iE(t),"0px"),sa(e.element())},sE=function(e,t){Ji(e.element(),t.closedClass),Yi(e.element(),t.openClass),ca(e.element(),iE(t))},lE=function(e,t,n,r){n.setCollapsed(),oa(e.element(),iE(t),aE(t,e.element())),sa(e.element()),uE(e,t),cE(e,t),t.onStartShrink(e),t.onShrunk(e)},fE=function(e,t,n,r){r=r.getOrThunk((function(){return aE(t,e.element())})),n.setCollapsed(),oa(e.element(),iE(t),r),sa(e.element()),n=oE(e,t),Ji(n,t.growingClass),Yi(n,t.shrinkingClass),cE(e,t),t.onStartShrink(e)},dE=(em=Object.freeze({refresh:function(e,t,n){n.isExpanded()&&(ca(e.element(),iE(t)),n=aE(t,e.element()),oa(e.element(),iE(t),n))},grow:function(e,t,n){n.isExpanded()||wS(e,t,n)},shrink:function(e,t,n){n.isExpanded()&&yS(e,t,n)},immediateShrink:function(e,t,n){n.isExpanded()&&lE(e,t,n)},hasGrown:function(e,t,n){return n.isExpanded()},hasShrunk:function(e,t,n){return n.isCollapsed()},isGrowing:xS,isShrinking:CS,isTransitioning:function(e,t,n){return!0===xS(e,t)||!0===CS(e,t)},toggleGrow:function(e,t,n){(n.isExpanded()?yS:wS)(e,t,n)},disableTransitions:uE}),Pu=Object.freeze({exhibit:function(e,t){var n=t.expanded;return So(n?{classes:[t.openClass],styles:{}}:{classes:[t.closedClass],styles:wt(t.dimension.property,"0px")})},events:function(e,t){return Go([Jo(wr(),(function(n,r){r.event().raw().propertyName===e.dimension.property&&(uE(n,e),t.isExpanded()&&ca(n.element(),e.dimension.property),(t.isExpanded()?e.onGrown:e.onShrunk)(n))}))])}}),tm=[on("closedClass"),on("openClass"),on("shrinkingClass"),on("growingClass"),Z("getAnimationRoot"),ka("onShrunk"),ka("onStartShrink"),ka("onGrown"),ka("onStartGrow"),ln("expanded",!1),an("dimension",U("property",{width:[Bu("property","width"),Bu("getDimension",(function(e){return nu(e)+"px"}))],height:[Bu("property","height"),Bu("getDimension",(function(e){return Ya(e)+"px"}))]}))],Ba({fields:tm,name:"sliding",active:Pu,apis:em,state:Object.freeze({init:function(e){var t=mn(e.expanded);return Hi({isExpanded:function(){return!0===t.get()},isCollapsed:function(){return!1===t.get()},setCollapsed:a(t.set,!1),setExpanded:a(t.set,!0),readState:function(){return"expanded: "+t.get()}})}})})),mE=(Wd=o([Ca(["closedClass","openClass","shrinkingClass","growingClass","overflowToggledClass"]),ka("onOpened"),ka("onClosed")].concat(Yn())),Sc=o([$l({factory:YT,schema:$d(),name:"primary"}),$l({factory:YT,schema:$d(),name:"overflow",overrides:function(e){return{toolbarBehaviours:ac([dE.config({dimension:{property:"height"},closedClass:e.markers.closedClass,openClass:e.markers.openClass,shrinkingClass:e.markers.shrinkingClass,growingClass:e.markers.growingClass,onShrunk:function(t){Ql(t,e,"overflow-button").each((function(e){sm.off(e),am.focus(e)})),e.onClosed(t)},onGrown:function(t){nm.focusIn(t),e.onOpened(t)},onStartGrow:function(t){Ql(t,e,"overflow-button").each(sm.on)}}),nm.config({mode:"acyclic",onEscape:function(t){return Ql(t,e,"overflow-button").each(am.focus),ye.some(!0)}})])}}}),Tc({name:"overflow-button",overrides:function(e){return{buttonBehaviours:ac([sm.config({toggleClass:e.markers.overflowToggledClass,aria:{mode:"pressed"},toggleOnExecute:!1})])}}}),Tc({name:"overflow-group"})]),function(e){return dE.hasGrown(e)}),gE=function(e,t){var n=Ql(e,t,"overflow");JT(e,t,n,mE),n.each(dE.refresh)},hE=uf({name:"SplitSlidingToolbar",configFields:Wd(),partFields:Sc(),factory:function(e,t,n,r){return bS(e,t,0,r,{coupling:{},apis:{refresh:function(t){return gE(t,e)},toggle:function(t){var n,r;Ql(n=t,r=e,"overflow").each((function(e){gE(n,r),dE.toggleGrow(e)}))},getOverflow:function(t){return Ql(t,e,"overflow")}}})},apis:{setGroups:function(e,t,n){e.setGroups(t,n)},refresh:function(e,t){e.refresh(t)},getMoreButton:function(e,t){return e.getMoreButton(t)},getOverflow:function(e,t){return e.getOverflow(t)},toggle:function(e,t){e.toggle(t)}}}),pE="silver.readonly",vE=zt([an("readonly",tn)]),bE=function(e,t){var n,r,o=e.outerContainer;n=t,r=(e=e).outerContainer.element(),n&&(e.mothership.broadcastOn([kl()],{target:r}),e.uiMothership.broadcastOn([kl()],{target:r})),e.mothership.broadcastOn([pE],{readonly:n}),e.uiMothership.broadcastOn([pE],{readonly:n}),Qn("*",o.element()).forEach((function(e){o.getSystem().getByDom(e).each((function(e){e.hasConfigured(uh)&&uh.set(e,t)}))}))},yE=o(Oi("toolbar-height-change")),wE=function(e,t,n){var r=Zo((function(t){var n=Me(e.initGroups,ES);YT.setGroups(t,n)}));return ac([nm.config({mode:t,onEscape:e.onEscape,selector:".tox-toolbar__group"}),im("toolbar-events",[r]),kS(n)])},xE=function(e,t){var n=e.cyclicKeying?"cyclic":"acyclic";return{uid:e.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":TS({title:ye.none(),items:[]}),"overflow-button":Ax({name:"more",icon:ye.some("more-drawer"),disabled:!1,tooltip:ye.some("More..."),primary:!1,borderless:!1},ye.none(),e.backstage.shared.providers)},splitToolbarBehaviours:wE(e,n,t)}},CE=(qn=[ie("disabled",!1),ee("tooltip"),ee("icon"),ee("text"),ae("onSetup",(function(){return n}))],zt([$("type"),X("onAction")].concat(qn))),SE=(Xd=[ee("text"),ee("tooltip"),ee("icon"),X("fetch"),ae("onSetup",(function(){return n}))],zt(g([$("type")],Xd))),kE=zt([$("type"),ee("tooltip"),ee("icon"),ee("text"),te("select"),X("fetch"),ae("onSetup",(function(){return n})),oe("presets","normal",["normal","color","listpreview"]),ln("columns",1),X("onAction"),X("onItemAction")]),TE=(Ys=[ie("active",!1)].concat(qn),zt(Ys.concat([$("type"),X("onAction")]))),EE=(qd=[ae("predicate",(function(){return!1})),oe("scope","node",["node","editor"]),oe("position","selection",["node","selection","line"])],Wn=qn.concat([ln("type","contextformbutton"),ln("primary",!1),X("onAction"),dn("original",i)]),jl=Ys.concat([ln("type","contextformbutton"),ln("primary",!1),X("onAction"),dn("original",i)]),Wl=qn.concat([ln("type","contextformbutton")]),ql=Ys.concat([ln("type","contextformtogglebutton")]),tm=U("type",{contextformbutton:Wn,contextformtogglebutton:jl}),zt([ln("type","contextform"),ae("initValue",(function(){return""})),ee("label"),J("commands",tm),un("launch",U("type",{contextformbutton:Wl,contextformtogglebutton:ql}))].concat(qd))),OE=zt([ln("type","contexttoolbar"),$("items")].concat(qd)),NE=(Pu=Object.freeze({getState:function(e,t,n){return n}}),em=Object.freeze({events:function(e,t){function n(n,r){e.updateState.each((function(e){e=e(n,r),t.set(e)})),e.renderComponents.each((function(e){e=e(r,t.get()),e=Me(e,n.getSystem().build),es(n,e)}))}return Go([Xo(Tr(),(function(t,r){var o=e.channel;Re(r.channels(),o)&&n(t,r.data())})),Zo((function(t,r){e.initialData.each((function(e){n(t,e)}))}))])}}),Yn=Object.freeze({init:function(e){var t=mn(ye.none());return{readState:function(){return t.get().fold((function(){return"none"}),(function(e){return e}))},get:function(){return t.get()},set:function(e){return t.set(e)},clear:function(){return t.set(ye.none())}}}}),$d=[on("channel"),Z("renderComponents"),Z("updateState"),Z("initialData")],Ba({fields:$d,name:"reflecting",active:em,apis:Pu,state:Yn})),AE=(Wd=o([on("toggleClass"),on("fetch"),Ea("onExecute"),ln("getHotspot",ye.some),ln("getAnchorOverrides",o({})),ln("layouts",ye.none()),Ea("onItemExecute"),Z("lazySink"),on("dom"),ka("onOpen"),gs("splitDropdownBehaviours",[ny,nm,am]),ln("matchWidth",!1),ln("useMinWidth",!1),ln("eventOrder",{}),Z("role")].concat(Iv())),Sc=$l({factory:Am,schema:[on("dom")],name:"arrow",defaults:function(e){return{buttonBehaviours:ac([am.revoke()])}},overrides:function(e){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(t){t.getSystem().getByUid(e.uid).each(Yr)},buttonBehaviours:ac([sm.config({toggleOnExecute:!1,toggleClass:e.toggleClass})])}}}),Xd=$l({factory:Am,schema:[on("dom")],name:"button",defaults:function(e){return{buttonBehaviours:ac([am.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)}))}}}}),qn=o([Sc,Xd,Gl({factory:{sketch:function(e){return{uid:e.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:e.text}}}},schema:[on("text")],name:"aria-descriptor"}),Tc({schema:[xa()],name:"menu",defaults:function(e){return{onExecute:function(t,n){t.getSystem().getByUid(e.uid).each((function(r){e.onItemExecute(r,t,n)}))}}}}),oy()]),uf({name:"SplitDropdown",configFields:Wd(),partFields:qn(),factory:function(e,t,r,o){function i(e){Od.getCurrent(e).each((function(e){Nd.highlightFirst(e),nm.focusIn(e)}))}function a(t){Mv(e,(function(e){return e}),t,o,i,xb.HighlightFirst).get(n)}function u(t){return t=Ss(t,e,"button"),Yr(t),ye.some(!0)}var c=ct(Go([Zo((function(t,n){Ql(t,e,"aria-descriptor").each((function(e){var n=Oi("aria");wi(e.element(),"id",n),wi(t.element(),"aria-describedby",n)}))}))]),Cd(ye.some(a)));return{uid:e.uid,dom:e.dom,components:t,apis:{repositionMenus:function(e){sm.isOn(e)&&zv(e)}},eventOrder:d(d({},e.eventOrder),{"alloy.execute":["disabling","toggling","alloy.base.behaviour"]}),events:c,behaviours:Bl(e.splitDropdownBehaviours,[ny.config({others:{sandbox:function(t){var n=Ss(t,e,"arrow");return Pv(e,t,{onOpen:function(){sm.on(n),sm.on(t)},onClose:function(){sm.off(n),sm.off(t)}})}}}),nm.config({mode:"special",onSpace:u,onEnter:u,onDown:function(e){return a(e),ye.some(!0)}}),am.config({}),sm.config({toggleOnExecute:!1,aria:{mode:"expanded"}})]),domModification:{attributes:{role:e.role.getOr("button"),"aria-haspopup":!0}}}},apis:{repositionMenus:function(e,t){return e.repositionMenus(t)}}})),DE=function(e){return{isDisabled:function(){return uh.isDisabled(e)},setDisabled:function(t){return uh.set(e,t)}}},_E=function(e){return{setActive:function(t){sm.set(e,t)},isActive:function(){return sm.isOn(e)},isDisabled:function(){return uh.isDisabled(e)},setDisabled:function(t){return uh.set(e,t)}}},RE=function(e,t){return e.map((function(e){return{"aria-label":t.translate(e),title:t.translate(e)}})).getOr({})},BE=Oi("focus-button"),ME=["checklist","ordered-list"],PE=["indent","outdent","table-insert-column-after","table-insert-column-before","unordered-list"],zE=function(e,t,r){var o,i=mn(n);r=BS(e.icon,e.text,e.tooltip,ye.none(),ye.none(),r);return Am.sketch({dom:r.dom,components:r.components,eventOrder:Xx,buttonBehaviours:ac([im("toolbar-button-events",[(o={onAction:e.onAction,getApi:t.getApi},ti((function(e,t){sh(o,e)((function(t){Xr(e,Gx,{buttonApi:t}),o.onAction(t)}))}))),lh(t,i),fh(t,i)]),ch.toolbarButton(e.disabled)].concat(t.toolbarButtonBehaviours))})},IE=function(e,t,n){var r,o,i,a;n={backstage:{shared:{providers:n}}};return"contextformtogglebutton"===t.type?(r=e,i=n,(a=(o=t).original).primary,a=m(a,["primary"]),a=Xt(RS(d(d({},a),{type:"togglebutton",onAction:function(){}}))),PS(a,i.backstage.shared.providers,[IS(r,o)])):(a=e,i=n,(o=(r=t).original).primary,o=m(o,["primary"]),o=Xt(DS(d(d({},o),{type:"button",onAction:function(){}}))),MS(o,i.backstage.shared.providers,[IS(a,r)]))},LE=function(e,t){var n,r,o,i,a=e.label.fold((function(){return{}}),(function(e){return{"aria-label":e}})),u=(a=Dm(jb.sketch({inputClasses:["tox-toolbar-textfield","tox-toolbar-nav-js"],data:e.initValue(),inputAttributes:a,selectOnFocus:!0,inputBehaviours:ac([nm.config({mode:"special",onEnter:function(e){return u.findPrimary(e).map((function(e){return Yr(e),!0}))},onLeft:function(e,t){return t.cut(),ye.none()},onRight:function(e,t){return t.cut(),ye.none()}})])})),n=a,r=e.commands,o=t.shared.providers,i=Me(r,(function(e){return Dm(IE(n,e,o))})),{asSpecs:function(){return Me(i,(function(e){return e.asSpec()}))},findPrimary:function(e){return Su(r,(function(t,n){return t.primary?ye.from(i[n]).bind((function(t){return t.getOpt(e)})).filter(c(uh.isDisabled)):ye.none()}))}});return AS({uid:Oi("context-toolbar"),initGroups:[{title:ye.none(),items:[a.asSpec()]},{title:ye.none(),items:u.asSpecs()}],onEscape:ye.none,cyclicKeying:!0,backstage:t,getSink:function(){return we.error("")}})},FE=function(e,t,n){var r=LS(t,n),o=r.x,i=(r=r.width,e=gn.fromDom(e.getContainer()),vu(e,".tox-editor-header").getOr(e));e=du(e),i=du(i),t=Math.max(n.y(),t.y(),i.bottom()),i=e.bottom()-t,e=n.height()-(t-n.y()),n=Math.min(i,e);return fu(o,t,r,n)},HE=function(e,t,n){var r=LS(t,n),o=r.x,i=(r=r.width,e=gn.fromDom(e.getContainer()),e=vu(e,".tox-editor-header").getOr(e),e=du(e),n.height());n=n.y();return e.y()>=t.bottom()?(t=Math.min(i+n,e.y()),fu(o,n,r,t-n)):(t=Math.max(n,e.bottom()),fu(o,t,r,i-(t-n)))},VE=function(e,t,n){t=LS(t,n);var r=t.x;t=t.width;return fu(r,n.y(),t,n.height())},UE=function(e,t){function n(e){return e.dom()===t.getBody()}var r=gn.fromDom(t.selection.getNode());return HS(r,e.inNodeScope).orThunk((function(){return HS(r,e.inEditorScope).orThunk((function(){for(var t=function(t){return HS(t,e.inNodeScope)},i=n,a=r.dom(),u=Te(i)?i:o(!1);a.parentNode;){a=a.parentNode;var c=gn.fromDom(a),s=t(c);if(s.isSome())return s;if(u(c))break}return ye.none()}))}))},jE=function(e,t){function n(e,n){var r=Xt(Gt("ContextForm",EE,n));(o[e]=r).launch.map((function(o){u["form:"+e]=d(d({},n.launch),{type:"contextformtogglebutton"===o.type?"togglebutton":"button",onAction:function(){t(r)}})})),("editor"===r.scope?a:i).push(r),c[e]=r}function r(e,t){Gt("ContextToolbar",OE,t).each((function(n){("editor"===t.scope?a:i).push(n),c[e]=n}))}var o={},i=[],a=[],u={},c={},s=Ke(e);return Pe(s,(function(t){var o=e[t];"contextform"===o.type?n(t,o):"contexttoolbar"===o.type&&r(t,o)})),{forms:o,inNodeScope:i,inEditorScope:a,lookupTable:c,formNavigators:u}},WE=Oi("forward-slide"),qE=Oi("backward-slide"),$E=Oi("change-slide-event"),GE="tox-pop--resizing",XE=function(e){return function(t){return function(){e.undoManager.transact((function(){e.focus(),e.execCommand("mceToggleFormat",!1,t.format)}))}}},YE=function(e,t,n){var r=n.dataset,o="basic"===r.type?function(){return Me(r.data,(function(e){return KC(e,n.isSelectedFor,n.getPreviewFor)}))}:r.getData;return{items:US(0,t,n),getStyleItems:o}},KE=function(e){return{type:"basic",data:e}},JE=((Ys=aT=aT||{})[Ys.SemiColon=0]="SemiColon",Ys[Ys.Space=1]="Space",function(e,t,n,r){return e=yt(e.settings,t).getOr(n),t=e,n=r===aT.SemiColon?t.replace(/;$/,"").split(";"):t.split(" "),{type:"basic",data:Me(n,(function(e){var t=e,n=e;e=e.split("=");return 1<e.length&&(t=e[0],n=e[1]),{title:t,format:n}}))}}),ZE=[{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"}],QE=function(e){function t(t){var n=He(ZE,(function(t){return e.formatter.match(t.format)})).fold((function(){return"left"}),(function(e){return e.title.toLowerCase()}));Xr(t,Kx,{icon:"align-"+n})}var n=ye.some((function(e){return function(){return t(e)}})),r=ye.some(t),i=KE(ZE);return{tooltip:"Align",icon:ye.some("align-left"),isSelectedFor:function(t){return function(){return e.formatter.match(t)}},getCurrentValue:o(ye.none()),getPreviewFor:function(e){return function(){return ye.none()}},onAction:XE(e),setInitialValue:r,nodeChangeHandler:n,dataset:i,shouldHide:!1,isInvalid:function(t){return!e.formatter.canApply(t.format)}}},eO="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",tO=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"],nO=function(e){return e=e.split(/\s*,\s*/),Me(e,(function(e){return e.replace(/^['"]+|['"]+$/g,"")}))},rO=function(e){var t;return 0===e.indexOf("-apple-system")&&(t=nO(e.toLowerCase()),We(tO,(function(e){return-1<t.indexOf(e.toLowerCase())})))},oO=function(e){function t(){function t(e){return e?nO(e)[0]:""}var n=e.queryCommandValue("FontName"),r=i.data,o=n?n.toLowerCase():"";return{matchOpt:He(r,(function(e){return e=e.format,e.toLowerCase()===o||t(e).toLowerCase()===t(o).toLowerCase()})).orThunk((function(){return rO(o)?ye.from({title:"System Font",format:o}):ye.none()})),font:n}}function n(e){var n=(o=t()).matchOpt,r=o.font,o=n.fold((function(){return r}),(function(e){return e.title}));Xr(e,Yx,{text:o})}var r=ye.some((function(e){return function(){return n(e)}})),o=ye.some(n),i=JE(e,"font_formats",eO,aT.SemiColon);return{tooltip:"Fonts",icon:ye.none(),isSelectedFor:function(e){return function(t){return t.exists((function(t){return t.format===e}))}},getCurrentValue:function(){return t().matchOpt},getPreviewFor:function(e){return function(){return ye.some({tag:"div",styleAttr:-1===e.indexOf("dings")?"font-family:"+e:""})}},onAction:function(t){return function(){e.undoManager.transact((function(){e.focus(),e.execCommand("FontName",!1,t.format)}))}},setInitialValue:o,nodeChangeHandler:r,dataset:i,shouldHide:!1,isInvalid:function(){return!1}}},iO="8pt 10pt 12pt 14pt 18pt 24pt 36pt",aO={"8pt":"1","10pt":"2","12pt":"3","14pt":"4","18pt":"5","24pt":"6","36pt":"7"},uO=function(e,t){return/[0-9.]+px$/.test(e)?function(e,t){return t=Math.pow(10,t),Math.round(e*t)/t}(72*parseInt(e,10)/96,t||0)+"pt":e},cO=function(e){return rt(aO,e).getOr("")},sO=function(e){function t(){var t=ye.none(),n=u.data,r=e.queryCommandValue("FontSize");if(r)for(var o=3;t.isNone()&&0<=o;o--)!function(e){var o=uO(r,e),i=cO(o);t=He(n,(function(e){return e.format===r||e.format===o||e.format===i}))}(o);return{matchOpt:t,px:r}}function n(e){var n=(o=t()).matchOpt,r=o.px,o=n.fold((function(){return r}),(function(e){return e.title}));Xr(e,Yx,{text:o})}var r=o(o(ye.none())),i=ye.some((function(e){return function(){return n(e)}})),a=ye.some(n),u=JE(e,"fontsize_formats",iO,aT.Space);return{tooltip:"Font sizes",icon:ye.none(),isSelectedFor:function(e){return function(t){return t.exists((function(t){return t.format===e}))}},getPreviewFor:r,getCurrentValue:function(){return t().matchOpt},onAction:function(t){return function(){e.undoManager.transact((function(){e.focus(),e.execCommand("FontSize",!1,t.format)}))}},setInitialValue:a,nodeChangeHandler:i,dataset:u,shouldHide:!1,isInvalid:function(){return!1}}},lO=function(e,t,n){var r=t();return Su(n,(function(t){return He(r,(function(n){return e.formatter.matchNode(t,n.format)}))})).orThunk((function(){return e.formatter.match("p")?ye.some({title:"Paragraph",format:"p"}):ye.none()}))},fO=function(e){var t=e.selection.getStart(!0)||e.getBody();return e.dom.getParents(t,(function(){return!0}),e.getBody())},dO="Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre",mO=function(e){function t(t,n){t=lO(e,(function(){return i.data}),t).fold((function(){return"Paragraph"}),(function(e){return e.title})),Xr(n,Yx,{text:t})}var n=ye.some((function(e){return function(n){return t(n.parents,e)}})),r=ye.some((function(n){var r=fO(e);t(r,n)})),i=JE(e,"block_formats",dO,aT.SemiColon);return{tooltip:"Blocks",icon:ye.none(),isSelectedFor:function(t){return function(){return e.formatter.match(t)}},getCurrentValue:o(ye.none()),getPreviewFor:function(t){return function(){var n=e.formatter.get(t);return ye.some({tag:0<n.length&&(n[0].inline||n[0].block)||"div",styleAttr:e.formatter.getCssText(t)})}},onAction:XE(e),setInitialValue:r,nodeChangeHandler:n,dataset:i,shouldHide:!1,isInvalid:function(t){return!e.formatter.canApply(t.format)}}},gO=function(e,t){function n(t,n){function r(e){var t=e.items;return void 0!==t&&0<t.length?je(t,r):[{title:e.title,format:e.format}]}var o=je(BT(e),r);t=lO(e,(function(){return o}),t).fold((function(){return"Paragraph"}),(function(e){return e.title}));Xr(n,Yx,{text:t})}var r=ye.some((function(e){return function(t){return n(t.parents,e)}})),i=ye.some((function(t){var r=fO(e);n(r,t)}));return{tooltip:"Formats",icon:ye.none(),isSelectedFor:function(t){return function(){return e.formatter.match(t)}},getCurrentValue:o(ye.none()),getPreviewFor:function(t){return function(){var n=e.formatter.get(t);return void 0!==n?ye.some({tag:0<n.length&&(n[0].inline||n[0].block)||"div",styleAttr:e.formatter.getCssText(t)}):ye.none()}},onAction:XE(e),setInitialValue:i,nodeChangeHandler:r,shouldHide:e.getParam("style_formats_autohide",!1,"boolean"),isInvalid:function(t){return!e.formatter.canApply(t.format)},dataset:t}},hO=[{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"]}],pO={button:WS(DS,(function(e,t){return t=t.backstage.shared.providers,MS(e,t,[])})),togglebutton:WS(RS,(function(e,t){return t=t.backstage.shared.providers,PS(e,t,[])})),menubutton:WS(_S,(function(e,t){return Ox(e,"tox-tbtn",t.backstage,ye.none())})),splitbutton:WS((function(e){return Gt("SplitButton",kE,e)}),(function(e,t){return zS(e,t.backstage.shared)})),styleSelectButton:function(e,t){return e=e,t=t.backstage,n=d({type:"advanced"},t.styleselect),jS(e,t,gO(e,n));var n},fontsizeSelectButton:function(e,t){return t=t.backstage,jS(e,t,sO(e))},fontSelectButton:function(e,t){return t=t.backstage,jS(e,t,oO(e))},formatButton:function(e,t){return t=t.backstage,jS(e,t,mO(e))},alignMenuButton:function(e,t){return t=t.backstage,jS(e,t,QE(e))}},vO={styleselect:pO.styleSelectButton,fontsizeselect:pO.fontsizeSelectButton,fontselect:pO.fontSelectButton,formatselect:pO.formatButton,align:pO.alignMenuButton},bO=function(e){var n,r=e.toolbar;e=e.buttons;return!1===r?[]:void 0===r||!0===r?(n=e,e=Me(hO,(function(e){var t=Ie(e.items,(function(e){return ot(n,e)||ot(vO,e)}));return{name:e.name,items:t}})),Ie(e,(function(e){return 0<e.items.length}))):xe(r)?(e=(e=r).split("|"),Me(e,(function(e){return{items:e.trim().split(" ")}}))):Oe(r,(function(e){return ot(e,"name")&&ot(e,"items")}))?r:(t.console.error("Toolbar type should be string, string[], boolean or ToolbarGroup[]"),[])},yO=function(e,n,r,o,i){return rt(n,r.toLowerCase()).orThunk((function(){return i.bind((function(e){return Su(e,(function(e){return rt(n,e+r.toLowerCase())}))}))})).fold((function(){return rt(vO,r.toLowerCase()).map((function(t){return t(e,o)})).orThunk((function(){return ye.none()}))}),(function(e){return r=o,rt(pO,(n=e).type).fold((function(){return t.console.error("skipping button defined by",n),ye.none()}),(function(e){return ye.some(e(n,r))}));var n,r}))},wO=function(e,t,n,r){var o=bO(t);o=Me(o,(function(o){var i=je(o.items,(function(o){return 0===o.trim().length?[]:yO(e,t.buttons,o,n,r).toArray()}));return{title:ye.from(e.translate(o.name)),items:i}}));return Ie(o,(function(e){return 0<e.items.length}))},xO=12,CO={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"]},SO={maxHeightFunction:cl(),maxWidthFunction:OT()},kO={onLtr:function(){return[Qu,ec,Ju,Yu,Zu,Ku,Om,Nm,Tm,wd,Em,xd]},onRtl:function(){return[Qu,ec,Zu,Ku,Ju,Yu,Om,Nm,Em,xd,Tm,wd]}},TO={onLtr:function(){return[ec,Yu,Ku,Ju,Zu,Qu,Om,Nm,Tm,wd,Em,xd]},onRtl:function(){return[ec,Ku,Yu,Zu,Ju,Qu,Om,Nm,Em,xd,Tm,wd]}},EO=function(e,t,n,r){function o(){return FS(e,p)}function i(){if(g()&&r.backstage.isContextMenuOpen())return 1;var t=y.get().map((function(e){return e.getBoundingClientRect()})).getOrThunk((function(){return e.selection.getRng().getBoundingClientRect()})),n=lo(gn.fromDom(e.getBody())).dom().innerHeight,o=t.bottom<0;n=t.top>n;return o||n||v(t)}function a(){km.hide(h)}function u(){b.get().each((function(e){var t=h.element();ca(t,"display"),i()?oa(t,"display","none"):dl.positionWithinBounds(n,e,h,o())}))}function c(t){return{dom:{tag:"div",classes:["tox-pop__dialog"]},components:[t],behaviours:ac([nm.config({mode:"acyclic"}),im("pop-dialog-wrap-events",[Zo((function(t){e.shortcuts.add("ctrl+F9","focus statusbar",(function(){return nm.focusIn(t)}))})),Qo((function(t){e.shortcuts.remove("ctrl+F9")}))])])}}function s(e,t){t="node"===e?r.backstage.shared.anchors.node(t):r.backstage.shared.anchors.cursor();return ut(t,(t=e,e=g(),"line"===t?{bubble:pc(xO,0,CO),layouts:{onLtr:function(){return[tc]},onRtl:function(){return[nc]}},overrides:SO}:{bubble:pc(0,xO,CO),layouts:e?TO:kO,overrides:SO}))}function l(){var t=x();UE(t,e).fold((function(){b.set(ye.none()),km.hide(h)}),(function(e){S(e.toolbarApi,ye.some(e.elem.dom()))}))}function f(e){k(),w.set(e)}var d,m,g=Xn().deviceType.isTouch,h=pa((d={sink:n,onEscape:function(){return e.focus(),ye.some(!0)}},m=mn([]),km.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow:function(e){m.set([]),km.getContent(e).each((function(e){ca(e.element(),"visibility")})),Ji(e.element(),GE),ca(e.element(),"width")},inlineBehaviours:ac([im("context-toolbar-events",[Jo(wr(),(function(e,t){km.getContent(e).each((function(e){})),Ji(e.element(),GE),ca(e.element(),"width")})),Xo($E,(function(e,t){ca(e.element(),"width");var n=nu(e.element()),r=(km.setContent(e,t.event().contents()),Yi(e.element(),GE),nu(e.element()));oa(e.element(),"width",n+"px"),km.getContent(e).each((function(n){t.event().focus().bind((function(t){return dc(t),gc(e.element())})).orThunk((function(){return nm.focusIn(n),mc()}))})),zm.setTimeout((function(){oa(e.element(),"width",r+"px")}),0)})),Xo(WE,(function(e,t){km.getContent(e).each((function(e){m.set(m.get().concat([{bar:e,focus:mc()}]))})),Xr(e,$E,{contents:t.event().forwardContents(),focus:ye.none()})})),Xo(qE,(function(e,t){Xe(m.get()).each((function(t){m.set(m.get().slice(0,m.get().length-1)),Xr(e,$E,{contents:va(t.bar),focus:t.focus})}))}))]),nm.config({mode:"special",onEscape:function(e){return Xe(m.get()).fold((function(){return d.onEscape()}),(function(t){return Gr(e,qE),ye.some(!0)}))}})]),lazySink:function(){return we.value(d.sink)}}))),p=Tb(e)||Eb(e)||Nb(e),v=function(t){var n,r=vu(gn.fromDom(e.getContainer()),".tox-editor-header").getOrDie(),o="fixed"===Do(r,"position");return!(!p||!o)&&(o=r.dom().getBoundingClientRect(),e.inline?t.bottom<o.bottom:(r=ou(),n=mu(gn.fromDom(e.getBody())),t.bottom+(n.y()-r.top())<o.bottom))},b=mn(ye.none()),y=mn(ye.none()),w=mn(null),x=N((function(){return jE(t,(function(e){e=C(e),Xr(h,WE,{forwardContents:c(e)})}))})),C=function(t){var n=e.ui.registry.getAll().buttons,o=x();return"contexttoolbar"===t.type?(n=ct(n,o.formNavigators),n=wO(e,{buttons:n,toolbar:t.items},r,ye.some(["form:"])),AS({uid:Oi("context-toolbar"),initGroups:n,onEscape:ye.none,cyclicKeying:!0,backstage:r.backstage,getSink:function(){return we.error("")}})):LE(t,r.backstage)},S=(e.on("contexttoolbar-show",(function(t){var n=x();yt(n.lookupTable,t.toolbarKey).each((function(n){S(n,t.target===e?ye.none():ye.some(t)),km.getContent(h).each(nm.focusIn)}))})),function(e,t){var n,a;k(),g()&&r.backstage.isContextMenuOpen()||(n=C(e),a=t.map(gn.fromDom),e=s(e.position,a),b.set(ye.some(e)),y.set(t),a=h.element(),ca(a,"display"),km.showWithinBounds(h,e,c(n),o),i()&&oa(a,"display","none"))}),k=function(){var e=w.get();null!==e&&(zm.clearTimeout(e),w.set(null))};e.on("init",(function(){e.on(XT,a),e.on("ScrollContent ScrollWindow longpress",u),e.on("click keyup SetContent ObjectResized ResizeEditor",(function(t){f(zm.setEditorTimeout(e,l,0))})),e.on("focusout",(function(t){zm.setEditorTimeout(e,(function(){gc(n.element()).isNone()&&gc(h.element()).isNone()&&(b.set(ye.none()),km.hide(h))}),0)})),e.on("SwitchMode",(function(){e.readonly&&(b.set(ye.none()),km.hide(h))})),e.on("NodeChange",(function(t){gc(h.element()).fold((function(){f(zm.setEditorTimeout(e,l,0))}),(function(e){}))}))}))},OO=function(e,n,r){function o(e){Pe([n,r],(function(t){t.broadcastOn([kl()],{target:gn.fromDom(e.target)})}))}function i(e){0===e.button&&Pe([n,r],(function(t){t.broadcastOn([El()],{target:gn.fromDom(e.target)})}))}function a(e){var t=ov(e);Pe([n,r],(function(e){e.broadcastEvent(zr(),t)}))}function u(e){var t=ov(e);Pe([n,r],(function(e){e.broadcastOn([Tl()],{}),e.broadcastEvent(Ir(),t)}))}function c(){Pe([n,r],(function(e){e.broadcastOn([Tl()],{})}))}var s=nv(gn.fromDom(t.document),"mousedown",(function(e){Pe([n,r],(function(t){t.broadcastOn([kl()],{target:e.target()})}))})),l=nv(gn.fromDom(t.document),"touchstart",(function(e){Pe([n,r],(function(t){t.broadcastOn([kl()],{target:e.target()})}))})),f=nv(gn.fromDom(t.document),"touchmove",(function(e){Pe([n,r],(function(t){t.broadcastEvent(Mr(),e)}))})),d=nv(gn.fromDom(t.document),"touchend",(function(e){Pe([n,r],(function(t){t.broadcastEvent(Pr(),e)}))})),m=nv(gn.fromDom(t.document),"mouseup",(function(e){0===e.raw().button&&Pe([n,r],(function(t){t.broadcastOn([El()],{target:e.target()})}))}));e.on("PostRender",(function(){e.on("mousedown",o),e.on("touchstart",o),e.on("mouseup",i),e.on("ScrollWindow",a),e.on("ResizeWindow",u),e.on("ResizeEditor",c)})),e.on("remove",(function(){e.off("mousedown",o),e.off("touchstart",o),e.off("mouseup",i),e.off("ScrollWindow",a),e.off("ResizeWindow",u),e.off("ResizeEditor",c),s.unbind(),l.unbind(),f.unbind(),d.unbind(),m.unbind()})),e.on("detach",(function(){ns(n),ns(r),n.destroy(),r.destroy()}))},NO=(Wn=o([ln("shell",!1),on("makeItem"),ln("setupItem",n),Ml.field("listBehaviours",[rm])]),jl=Gl({name:"items",overrides:function(e){return{behaviours:ac([rm.config({})])}}}),tm=o([jl]),uf({name:o("CustomList")(),configFields:Wn(),partFields:tm(),factory:function(e,n,r,o){return n=e.shell?{behaviours:[rm.config({})],components:[]}:{behaviours:[],components:n},{uid:e.uid,dom:e.dom,components:n.components,behaviours:Bl(e.listBehaviours,n.behaviours),apis:{setItems:function(n,r){var o;o=n,(e.shell?ye.some(o):Ql(o,e,"items")).fold((function(){throw t.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 o=rm.contents(t),i=r.length,a=i-o.length;a=0<a?function(e,t){for(var n=[],r=0;r<e;r++)n.push(t(r));return n}(a,(function(){return e.makeItem()})):[],o=o.slice(i),Pe(o,(function(e){return rm.remove(t,e)})),Pe(a,(function(e){return rm.append(t,e)})),i=rm.contents(t);Pe(i,(function(t,o){e.setupItem(n,t,r[o],o)}))}))}}}},apis:{setItems:function(e,t,n){e.setItems(t,n)}}})),AO=Ul,DO=(Wl=Ws,function(e){return(ua(e,"position").is("fixed")?ye.none():ai(e)).orThunk((function(){var t=gn.fromTag("span"),n=(fi(e,t),ai(t));return vi(t),n})).map(Qa).getOrThunk((function(){return Ja(0,0)}))}),_O=it([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),RO=function(e,t,n,r,o,i){return e=YS(e,o,i),t=YS(t,o,i),o=Math.abs(e.left()-t.left()),i=Math.abs(e.top()-t.top()),Ja(o,i)},BO=function(e,t,n){return e.fold((function(e,t){return{position:"absolute",left:e+"px",top:t+"px"}}),(function(e,t){return{position:"absolute",left:e-n.left()+"px",top:t-n.top()+"px"}}),(function(e,t){return{position:"fixed",left:e+"px",top:t+"px"}}))},MO=function(e,t,n,r){function o(e,o){return function(i,a){var u=e(t,n,r);return o(i.getOr(u.left()),a.getOr(u.top()))}}return e.fold(o(KS,_O.offset),o(YS,_O.absolute),o(XS,_O.fixed))},PO=_O.offset,zO=_O.absolute,IO=_O.fixed,LO=it([{static:[]},{absolute:["x","y"]},{fixed:["x","y"]}]),FO=function(e,t,n,r,o){var i,a,u;e=e.element();return ua(e,"position").is("fixed")?(u=n,tk(i=e,a=t).filter((function(e){return QS(a.modes,e,u)})).bind((function(e){return nk(i,a,e)}))):rk(e,t,n,r,o)},HO=function(e,t){var n=e.element();return tk(n,t).bind((function(e){return nk(n,t,e)}))},VO=function(e,t){Pe(["left","top","position"],(function(t){return ca(e.element(),t)})),t.onUndocked(e)},UO=function(e,t,n,r,o){o=BO(o,n,r),ia(e.element(),o),("fixed"===o.position?t.onDocked:t.onUndocked)(e)},jO=function(e,t,n,r,o){void 0===o&&(o=!1),t.contextual.each((function(t){t.lazyContext(e).each((function(i){a=r;var a;i=(i=i).y()<a.bottom()&&i.bottom()>a.y();i!==n.isVisible()&&(n.setVisible(i),o&&!i?(Qi(e.element(),[t.fadeOutClass]),t.onHide(e)):(i?JS:ZS)(e,t))}))}))},WO=function(e,t,n){var r,o,i,a,u,c,s;e.getSystem().isConnected()&&(r=e,i=n,a=(o=t).lazyViewport(r),e=r.element(),n=ri(e),u=ou(n),c=DO(e),(s=i.isDocked())&&jO(r,o,i,a),FO(r,o,a,u,c).each((function(e){i.setDocked(!s),e.fold((function(){return VO(r,o)}),(function(e,t){return UO(r,o,u,c,zO(e,t))}),(function(e,t){jO(r,o,i,a,!0),UO(r,o,u,c,IO(e,t))}))})))},qO=(ql=Object.freeze({refresh:WO,reset:ok,isDocked:function(e,t,n){return n.isDocked()}}),qd=Object.freeze({events:function(e,t){return Go([Jo(wr(),(function(n,r){e.contextual.each((function(e){Zi(n.element(),e.transitionClass)&&(ea(n.element(),[e.transitionClass,e.fadeInClass]),(t.isVisible()?e.onShown:e.onHidden)(n)),r.stop()}))})),Xo(zr(),(function(n,r){WO(n,e,t)})),Xo(Ir(),(function(n,r){ok(n,e,t)}))])}}),$d=[cn("contextual",[$("fadeInClass"),$("fadeOutClass"),$("transitionClass"),X("lazyContext"),ka("onShow"),ka("onShown"),ka("onHide"),ka("onHidden")]),ae("lazyViewport",gu),$("leftAttr"),$("topAttr"),$("positionAttr"),fn("modes",["top","bottom"],It(en)),ka("onDocked"),ka("onUndocked")],Ba({fields:$d,name:"docking",active:qd,apis:ql,state:Object.freeze({init:function(){var e=mn(!1),t=mn(!0);return Hi({isDocked:function(){return e.get()},setDocked:function(t){return e.set(t)},isVisible:function(){return t.get()},setVisible:function(e){return t.set(e)},readState:function(){return"docked: "+e.get()+", visible: "+t.get()}})}})})),$O={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},GO="tox-tinymce--toolbar-sticky-on",XO="tox-tinymce--toolbar-sticky-off",YO=Object.freeze({setup:function(e,t){e.inline||(e.on("ResizeWindow ResizeEditor ResizeContent",(function(){t().each(ik)})),e.on("SkinLoaded",(function(){t().each(qO.reset)}))),e.on("PostRender",(function(){uk(e,!1)}))},isDocked:function(e){return e().map(qO.isDocked).getOr(!1)},getBehaviours:ck}),KO=(em=n,Pu=s,o([])),JO=Object.freeze({setup:em,isDocked:Pu,getBehaviours:KO}),ZO=af({factory:function(e,t){var n={focus:nm.focusIn,setMenus:function(e,n){n=Me(n,(function(e){var n={type:"menubutton",text:e.text,fetch:function(t){t(e.getItems())}};n=_S(n).mapError((function(e){return Kt(e)})).getOrDie();return Ox(n,"tox-mbtn",t.backstage,ye.some("menuitem"))})),rm.set(e,n)}};return{uid:e.uid,dom:e.dom,components:[],behaviours:ac([rm.config({}),im("menubar-events",[Zo((function(t){e.onSetup(t)})),Xo(dr(),(function(e,t){vu(e.element(),".tox-mbtn--active").each((function(n){bu(t.event().target(),".tox-mbtn").each((function(t){tr(n,t)||e.getSystem().getByDom(n).each((function(n){e.getSystem().getByDom(t).each((function(e){dy.expand(e),dy.close(n),am.focus(e)}))}))}))}))})),Xo(Vr(),(function(e,t){t.event().prevFocus().bind((function(t){return e.getSystem().getByDom(t).toOption()})).each((function(n){t.event().newFocus().bind((function(t){return e.getSystem().getByDom(t).toOption()})).each((function(e){dy.isOpen(n)&&(dy.expand(e),dy.close(n))}))}))}))]),nm.config({mode:"flow",selector:".tox-mbtn",onEscape:function(t){return e.onEscape(t),ye.some(!0)}}),Jb.config({})]),apis:n,domModification:{attributes:{role:"menubar"}}}},name:"silver.Menubar",configFields:[on("dom"),on("uid"),on("onEscape"),on("backstage"),ln("onSetup",n)],apis:{focus:function(e,t){e.focus(t)},setMenus:function(e,t,n){e.setMenus(t,n)}}}),QO="container",eN=[gs("slotBehaviours",[])],tN=(Yn=Qe({getSlotNames:function(e,t){return e.getSlotNames(t)},getSlot:function(e,t,n){return e.getSlot(t,n)},isShowing:function(e,t,n){return e.isShowing(t,n)},hideSlot:function(e,t,n){return e.hideSlot(t,n)},hideAllSlots:function(e,t){return e.hideAllSlots(t)},showSlot:function(e,t,n){return e.showSlot(t,n)}},xo),d(d({},Yn),{sketch:function(e){t=[];var t,n={slot:function(e,n){return t.push(e),xs(QO,sk(e),n)},record:function(){return t}};e=e(n),n=n.record(),n=Me(n,(function(e){return $l({name:e,pname:sk(e)})}));return Os(QO,eN,n,lk,e)}})),nN=zt([ee("icon"),ee("tooltip"),ae("onShow",n),ae("onHide",n),ae("onSetup",(function(){return n}))]),rN=function(e){return tN.sketch((function(t){return{dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:dk(t,e),slotBehaviours:Pg.unnamedEvents([Zo((function(e){return tN.hideAllSlots(e)}))])}}))},oN=Oi("FixSizeEvent"),iN=Oi("AutoSizeEvent"),aN=function(e,t,n){var r=e.element();!0===t?(rm.set(e,[{dom:{tag:"div",attributes:{"aria-label":n.translate("Loading...")},classes:["tox-throbber__busy-spinner"]},components:[{dom:Gm('<div class="tox-spinner"><div></div><div></div><div></div></div>')}],behaviours:ac([nm.config({mode:"special",onTab:function(){return ye.some(!0)},onShiftTab:function(){return ye.some(!0)}}),am.config({})])}]),ca(r,"display"),Si(r,"aria-hidden")):(rm.set(e,[]),oa(r,"display","none"),wi(r,"aria-hidden","true"))},uN=(Sc=Wl.optional({factory:ZO,name:"menubar",schema:[on("backstage")]}),Xd=Wl.optional({factory:{sketch:function(e){return NO.sketch({uid:e.uid,dom:e.dom,listBehaviours:ac([nm.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:function(){return AS({uid:Oi("multiple-toolbar-item"),backstage:e.backstage,cyclicKeying:!1,getSink:e.getSink,initGroups:[],onEscape:function(){return ye.none()}})},setupItem:function(e,t,n,r){YT.setGroups(t,n)},shell:!0})}},name:"multiple-toolbar",schema:[on("dom"),on("onEscape")]}),oy=Wl.optional({factory:{sketch:function(e){var t;return((t=e).split===pb.sliding?NS:t.split===pb.floating?OS:AS)({uid:e.uid,onEscape:function(){return e.onEscape(),ye.some(!0)},cyclicKeying:!1,initGroups:[],getSink:e.getSink,backstage:e.backstage,moreDrawerData:{lazyToolbar:e.lazyToolbar,lazyMoreButton:e.lazyMoreButton,lazyHeader:e.lazyHeader}})}},name:"toolbar",schema:[on("dom"),on("onEscape"),on("getSink")]}),Wd=Wl.optional({factory:{sketch:function(e){var t=e.editor,n=e.sticky?ck:KO;return{uid:e.uid,dom:e.dom,components:e.components,behaviours:ac(n(t,e.getSink))}}},name:"header",schema:[on("dom")]}),qn=Wl.optional({name:"socket",schema:[on("dom")]}),Ys=Wl.optional({factory:{sketch:function(e){return{uid:e.uid,dom:{tag:"div",classes:["tox-sidebar"],attributes:{role:"complementary"}},components:[{dom:{tag:"div",classes:["tox-sidebar__slider"]},components:[],behaviours:ac([Jb.config({}),am.config({}),dE.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(e){Od.getCurrent(e).each(tN.hideAllSlots),Gr(e,iN)},onGrown:function(e){Gr(e,iN)},onStartGrow:function(e){Xr(e,oN,{width:ua(e.element(),"width").getOr("")})},onStartShrink:function(e){Xr(e,oN,{width:nu(e.element())+"px"})}}),rm.config({}),Od.config({find:function(e){return e=rm.contents(e),Ge(e)}})])}],behaviours:ac([Cw(0),im("sidebar-sliding-events",[Xo(oN,(function(e,t){oa(e.element(),"width",t.event().width())})),Xo(iN,(function(e,t){ca(e.element(),"width")}))])])}}},name:"sidebar",schema:[on("dom")]}),jl=Wl.optional({factory:{sketch:function(e){return{uid:e.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:ac([rm.config({})]),components:[]}}},name:"throbber",schema:[on("dom")]}),uf({name:"OuterContainer",factory:function(e,t,n){return{uid:e.uid,dom:e.dom,components:t,apis:{getSocket:function(t){return AO.getPart(t,e,"socket")},setSidebar:function(t,n){AO.getPart(t,e,"sidebar").each((function(e){var t;t=n,Od.getCurrent(e).each((function(e){return rm.set(e,[rN(t)])}))}))},toggleSidebar:function(t,n){AO.getPart(t,e,"sidebar").each((function(e){var t;t=n,Od.getCurrent(e).each((function(e){Od.getCurrent(e).each((function(n){dE.hasGrown(e)?tN.isShowing(n,t)?dE.shrink(e):(tN.hideAllSlots(n),tN.showSlot(n,t)):(tN.hideAllSlots(n),tN.showSlot(n,t),dE.grow(e))}))}))}))},whichSidebar:function(t){return AO.getPart(t,e,"sidebar").bind(mk).getOrNull()},getHeader:function(t){return AO.getPart(t,e,"header")},getToolbar:function(t){return AO.getPart(t,e,"toolbar")},setToolbar:function(t,n){AO.getPart(t,e,"toolbar").each((function(e){e.getApis().setGroups(e,n)}))},setToolbars:function(t,n){AO.getPart(t,e,"multiple-toolbar").each((function(e){NO.setItems(e,n)}))},refreshToolbar:function(t){AO.getPart(t,e,"toolbar").each((function(e){return e.getApis().refresh(e)}))},getMoreButton:function(t){return AO.getPart(t,e,"toolbar").bind((function(e){return e.getApis().getMoreButton(e)}))},getThrobber:function(t){return AO.getPart(t,e,"throbber")},focusToolbar:function(t){AO.getPart(t,e,"toolbar").orThunk((function(){return AO.getPart(t,e,"multiple-toolbar")})).each((function(e){nm.focusIn(e)}))},setMenubar:function(t,n){AO.getPart(t,e,"menubar").each((function(e){ZO.setMenus(e,n)}))},focusMenubar:function(t){AO.getPart(t,e,"menubar").each((function(e){ZO.focus(e)}))}},behaviours:e.behaviours}},configFields:[on("dom"),on("behaviours")],partFields:[Wd,Sc,oy,Xd,qn,Ys,jl],apis:{getSocket:function(e,t){return e.getSocket(t)},setSidebar:function(e,t,n){e.setSidebar(t,n)},toggleSidebar:function(e,t,n){e.toggleSidebar(t,n)},whichSidebar:function(e,t){return e.whichSidebar(t)},getHeader:function(e,t){return e.getHeader(t)},getToolbar:function(e,t){return e.getToolbar(t)},setToolbar:function(e,t,n){n=Me(n,ES),e.setToolbar(t,n)},setToolbars:function(e,t,n){n=Me(n,(function(e){return Me(e,ES)})),e.setToolbars(t,n)},getMoreButton:function(e,t){return e.getMoreButton(t)},refreshToolbar:function(e,t){return e.refreshToolbar(t)},getThrobber:function(e,t){return e.getThrobber(t)},setMenubar:function(e,t,n){e.setMenubar(t,n)},focusMenubar:function(e,t){e.focusMenubar(t)},focusToolbar:function(e,t){e.focusToolbar(t)}}})),cN="file edit view insert format tools table help",sN={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 tableprops deletetable row column cell"},help:{title:"Help",items:"help"}},lN=function(e,t,n){var r=n.getParam("removed_menuitems","").split(/[ ,]/);return{text:e.title,getItems:function(){return je(e.items,(function(e){var n=e.toLowerCase();return 0===n.trim().length||Be(r,(function(e){return e===n}))?[]:"separator"===n||"|"===n?[{type:"separator"}]:t.menuItems[n]?[t.menuItems[n]]:[]}))}}},fN=function(e){return"string"==typeof e?e.split(" "):e},dN=function(e){function t(){e._skinLoaded=!0,sp.fireSkinLoaded(e)}return function(){e.initialized?t():e.on("init",t)}},mN=a(pk,!1),gN=a(pk,!0),hN=ph.DOM,pN=(Wn=Xn(),Wn.os.isiOS()&&Wn.os.version.major<=12),vN={render:function(e,n,r,o,i){var a,u,c,s=mn(0),l=(i=(mN(e),i=gn.fromDom(i.targetNode),l=n.mothership,Cl(i,l,di),ts(Uo(),n.uiMothership),e.on("PostRender",(function(){vk(e,n,r,o),s.set(e.getWin().innerWidth),uN.setMenubar(n.outerContainer,hk(e,r)),uN.setSidebar(n.outerContainer,r.sidebar),bk(e)})),uN.getSocket(n.outerContainer).getOrDie("Could not find expected socket element")),!0===pN&&(ia(i.element(),{overflow:"scroll","-webkit-overflow-scrolling":"touch"}),a=function(){e.fire("ScrollContent")},u=20,c=null,l={cancel:function(){null!==c&&(t.clearTimeout(c),c=null)},throttle:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];null===c&&(c=t.setTimeout((function(){a.apply(null,e),c=null}),u))}},nv(i.element(),"scroll",l.throttle)),SS(e,n),e.addCommand("ToggleSidebar",(function(t,r){uN.toggleSidebar(n.outerContainer,r),e.fire("ToggleSidebar")})),e.addQueryValueHandler("ToggleSidebar",(function(){return uN.whichSidebar(n.outerContainer)})),Tv(e));return l!==pb.sliding&&l!==pb.floating||e.on("ResizeWindow ResizeEditor ResizeContent",(function(){var t=e.getWin().innerWidth;t!==s.get()&&(uN.refreshToolbar(n.outerContainer),s.set(t))})),{iframeContainer:i.element().dom(),editorContainer:n.outerContainer.element().dom()}}},bN={render:function(e,t,n,r,o){function i(){oa(t.outerContainer.element(),"display","flex"),s.addClass(e.getBody(),"mce-edit-focus"),ca(t.uiMothership.element(),"display"),h()}function a(){t.outerContainer&&(oa(t.outerContainer.element(),"display","none"),s.removeClass(e.getBody(),"mce-edit-focus")),oa(t.uiMothership.element(),"display","none")}function u(){var o;c?i():(c=uN.getHeader(t.outerContainer).getOrDie(),o=Ab(e).getOr(Uo()),ts(o,t.mothership),ts(o,t.uiMothership),vk(e,t,n,r),uN.setMenubar(t.outerContainer,hk(e,n)),i(),e.on("activate",i),e.on("deactivate",a),e.on("NodeChange SkinLoaded ResizeWindow",(function(){e.hidden||h(!0)})),e.nodeChanged())}var c,s=ph.DOM,l=Db(e),f=Ev(e),d=gn.fromDom(o.targetNode),m=(o=Tv(e),o===pb.sliding||o===pb.floating),g=(gN(e),function(e){e=m?e.fold((function(){return 0}),(function(e){return 1<e.components().length?Ya(e.components()[1].element()):0})):0;var n=Qa(d);e=n.top()-Ya(c.element())+e;ia(t.outerContainer.element(),{position:"absolute",top:Math.round(e)+"px",left:Math.round(n.left())+"px"})}),h=function(e){var n;void 0===e&&(e=!1),m&&uN.refreshToolbar(t.outerContainer),l||(n=uN.getToolbar(t.outerContainer),g(n)),f&&(e?qO.reset(c):qO.refresh(c))};return e.on("focus",u),e.on("blur hide",a),e.on("init",(function(){e.hasFocus()&&u()})),SS(e,t),{editorContainer:t.outerContainer.element().dom()}}},yN=function(e){yC.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(t){e.ui.registry.addToggleButton(t.name,{tooltip:t.text,onAction:function(){return e.execCommand(t.cmd)},icon:t.icon,onSetup:VS(e,t.name)})}));var t="alignnone",n="No alignment",r="JustifyNone",o="align-none";e.ui.registry.addButton(t,{tooltip:n,onAction:function(){return e.execCommand(r)},icon:o})},wN=function(e,t){return function(){e.execCommand("mceToggleFormat",!1,t)}},xN=function(e){yC.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(t,n){e.ui.registry.addToggleButton(t.name,{tooltip:t.text,icon:t.icon,onSetup:VS(e,t.name),onAction:wN(e,t.name)})}));for(var t=1;t<=6;t++){var n="h"+t;e.ui.registry.addToggleButton(n,{text:n.toUpperCase(),tooltip:"Heading "+t,onSetup:VS(e,n),onAction:wN(e,n)})}},CN=function(e){yC.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(t){e.ui.registry.addButton(t.name,{tooltip:t.text,icon:t.icon,onAction:function(){return e.execCommand(t.action)}})}))},SN=function(e){yC.each([{name:"blockquote",text:"Blockquote",action:"mceBlockQuote",icon:"quote"}],(function(t){e.ui.registry.addToggleButton(t.name,{tooltip:t.text,icon:t.icon,onAction:function(){return e.execCommand(t.action)},onSetup:VS(e,t.name)})}))},kN=function(e){var t,n;xN(t=e),CN(t),SN(t),n=e,yC.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(e){n.ui.registry.addMenuItem(e.name,{text:e.text,icon:e.icon,shortcut:e.shortcut,onAction:function(){return n.execCommand(e.action)}})})),n.ui.registry.addMenuItem("codeformat",{text:"Code",icon:"sourcecode",onAction:wN(n,"code")})},TN=function(e,t,n){function r(){return!!t.undoManager&&t.undoManager[n]()}function o(){e.setDisabled(t.readonly||!r())}return e.setDisabled(!r()),t.on("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",o),function(){return t.off("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",o)}},EN=function(e){var t,n;(t=e).ui.registry.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onSetup:function(e){return TN(e,t,"hasUndo")},onAction:function(){return t.execCommand("undo")}}),t.ui.registry.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onSetup:function(e){return TN(e,t,"hasRedo")},onAction:function(){return t.execCommand("redo")}}),(n=e).ui.registry.addButton("undo",{tooltip:"Undo",icon:"undo",onSetup:function(e){return TN(e,n,"hasUndo")},onAction:function(){return n.execCommand("undo")}}),n.ui.registry.addButton("redo",{tooltip:"Redo",icon:"redo",onSetup:function(e){return TN(e,n,"hasRedo")},onAction:function(){return n.execCommand("redo")}})},ON=function(e,t){function n(t){e.setActive(t.hasVisual)}return e.setActive(t.hasVisual),t.on("VisualAid",n),function(){return t.off("VisualAid",n)}},NN=function(e){var t,n;(t=e).ui.registry.addButton("visualaid",{tooltip:"Visual aids",text:"Visual aids",onAction:function(){return t.execCommand("mceToggleVisualAid")}}),(n=e).ui.registry.addToggleMenuItem("visualaid",{text:"Visual aids",onSetup:function(e){return ON(e,n)},onAction:function(){n.execCommand("mceToggleVisualAid")}})},AN=function(e,t){function n(){e.setDisabled(!t.queryCommandState("outdent"))}return e.setDisabled(!t.queryCommandState("outdent")),t.on("NodeChange",n),function(){return t.off("NodeChange",n)}},DN=function(e){var t;(t=e).ui.registry.addButton("outdent",{tooltip:"Decrease indent",icon:"outdent",onSetup:function(e){return AN(e,t)},onAction:function(){return t.execCommand("outdent")}}),t.ui.registry.addButton("indent",{tooltip:"Increase indent",icon:"indent",onAction:function(){return t.execCommand("indent")}})},_N=function(e,t){var n,r,o,i,a,u,c,s;n=YE(o=e,a=t,QE(o)),o.ui.registry.addNestedMenuItem("align",{text:a.shared.providers.translate("Align"),getSubmenuItems:function(){return n.items.validateItems(n.getStyleItems())}}),r=YE(o=e,a=t,oO(o)),o.ui.registry.addNestedMenuItem("fontformats",{text:a.shared.providers.translate("Fonts"),getSubmenuItems:function(){return r.items.validateItems(r.getStyleItems())}}),o=e,c=d({type:"advanced"},(a=t).styleselect),i=YE(o,a,gO(o,c)),o.ui.registry.addNestedMenuItem("formats",{text:"Formats",getSubmenuItems:function(){return i.items.validateItems(i.getStyleItems())}}),u=YE(a=e,t,mO(a)),a.ui.registry.addNestedMenuItem("blockformats",{text:"Blocks",getSubmenuItems:function(){return u.items.validateItems(u.getStyleItems())}}),s=YE(c=e,t,sO(c)),c.ui.registry.addNestedMenuItem("fontsizes",{text:"Font sizes",getSubmenuItems:function(){return s.items.validateItems(s.getStyleItems())}})},RN=function(e,t){yN(e),kN(e),_N(e,t),EN(e),vp(e),NN(e),DN(e)},BN=function(e,t,n,r,o,i){n=n();var a,u=(e=e,a=t,i?kk(e):Ck(e,a));Tx(n,dh.CLOSE_ON_EXECUTE,r,!1).map((function(e){t.preventDefault(),km.showMenuAt(o,u,{menu:{markers:Ep("normal")},data:e})}))},MN={onLtr:function(){return[ec,Yu,Ku,Ju,Zu,Qu,Om,Nm,Tm,wd,Em,xd]},onRtl:function(){return[ec,Ku,Yu,Zu,Ju,Qu,Om,Nm,Em,xd,Tm,wd]}},PN={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"]},zN=function(e,t,n,r,o,i){function a(){var a=n();Ek(e,t,a,r,o,i)}var u,c,s=Xn(),l=s.os.isiOS(),f=s.os.isOSX();s=s.os.isAndroid();!f&&!l||i?(s&&!i&&e.selection.setCursorLocation(t.target,0),a()):(u=function(){Tk(e),a()},f=t,(s=(l=e).selection).isCollapsed()||f.touches.length<1||(c=f.touches[0],f=s.getRng(),!Vc(l.getWin(),Nc.domRange(f)).exists((function(e){return e.left()<=c.clientX&&e.right()>=c.clientX&&e.top()<=c.clientY&&e.bottom()>=c.clientY})))?(e.once("selectionchange",u),e.once("touchend",(function(){return e.off("selectionchange",u)}))):u())},IN=function(e){return"string"==typeof e?e.split(/[ ,]/):e},LN={shouldNeverUseNative:function(e){return e.settings.contextmenu_never_use_native||!1},getContextMenu:function(e){return t="contextmenu",n="link linkchecker image imagetools table spellchecker configurepermanentpen",r=(e=e).ui.registry.getAll().contextMenus,rt(e.settings,t).map(IN).getOrThunk((function(){return Ie(IN(n),(function(e){return ot(r,e)}))}));var t,n,r},isContextMenuDisabled:function(e){return!1===e.getParam("contextmenu")}},FN={type:"separator"},HN=function(e,t,n){return t=Fe(t,(function(t,r){var o;return ot(e,r)?(o=e[r].update(n),xe(o)?Ak(t,o.split(" ")):0<o.length?(o=Me(o,Nk),Ak(t,o)):t):t.concat([r])}),[]),0<t.length&&Ok(t[t.length-1])&&t.pop(),t},VN=function(e,t){return t.ctrlKey&&!LN.shouldNeverUseNative(e)},UN=function(e){return/^[0-9\.]+(|px)$/i.test(""+e)?ye.some(parseInt(e,10)):ye.none()},jN=function(e){return Ee(e)?e+"px":e},WN="data-initial-z-index",qN=function(e){ii(e.element()).filter(Fo).each((function(e){var t=xi(e,WN);Ci(e,WN)?oa(e,"z-index",t):ca(e,"z-index"),Si(e,WN)}))},$N=function(e){ii(e.element()).filter(Fo).each((function(t){ua(t,"z-index").each((function(e){wi(t,WN,e)})),oa(t,"z-index",Do(e.element(),"z-index"))}))},GN=function(e,t){e=e.element(),Si(e,t.leftAttr),Si(e,t.topAttr)},XN=function(e,t,n,r){return Su(e,(function(e){var i=e.sensor();return function(e,t,n,r,o,i){return e=YS(e,o,i),t=YS(t,o,i),Math.abs(e.left()-t.left())<=n&&Math.abs(e.top()-t.top())<=r}(t,i,e.range().left(),e.range().top(),n,r)?ye.some({output:o(MO(e.output(),t,n,r)),extra:e.extra}):ye.none()}))},YN=function(e){return ua(e,"left").bind((function(t){return ua(e,"top").bind((function(n){return ua(e,"position").map((function(e){return("fixed"===e?IO:PO)(parseInt(t,10),parseInt(n,10))}))}))})).getOrThunk((function(){var t=Qa(e);return zO(t.left(),t.top())}))},KN=function(e,t,n,r,o,i,a){var u,c,s,l,f,d;t=t.fold((function(){a=n,e=i.left(),t=i.top();var e,t,a=a.fold((function(n,r){return _O.offset(n+e,r+t)}),(function(n,r){return _O.absolute(n+e,r+t)}),(function(n,r){return _O.fixed(n+e,r+t)}));a=XS(a,r,o);return IO(a.left(),a.top())}),(function(t){var a=Rk(e,t,n,i,r,o);return a.extra.each((function(n){t.onSensor(e,n)})),a.coord}));return t=t,u=r,c=o,s=(a=a).bounds,l=YS(t,u,c),f=el(l.left(),s.x(),s.x()+s.width()-a.width),l=el(l.top(),s.y(),s.y()+s.height()-a.height),d=zO(f,l),t.fold((function(){var e=KS(d,u,c);return PO(e.left(),e.top())}),(function(){return d}),(function(){var e=XS(d,u,c);return IO(e.left(),e.top())}))},JN=(tm=cn("snaps",[on("getSnapPoints"),ka("onSensor"),on("leftAttr"),on("topAttr"),ln("lazyViewport",gu),ln("mustSnap",!1)]),Object.freeze({getData:function(e){return ye.from(Ja(e.x(),e.y()))},getDelta:function(e,t){return Ja(t.left()-e.left(),t.top()-e.top())}})),ZN=(Ul=[ln("useFixed",s),on("blockerClass"),ln("getTarget",i),ln("onDrag",n),ln("repositionTarget",!0),ka("onDrop"),ae("getBounds",gu),tm,Bu("dragger",{handlers:function(e,t){function n(n){t.setStartData(Mk(e,n))}return Go([Xo(zr(),n),Xo(cr(),(function(r,o){var i,a,u,c;0===o.event().raw().button&&(o.stop(),o={drop:function(){u()},delayDrop:function(){c.schedule()},forceDrop:function(){u()},move:function(n){c.cancel();n=t.update(JN,n);var o=t.getStartData().getOrThunk((function(){return Mk(e,r)}));n.each((function(t){Pk(r,e,o,t)}))}},i=r.getSystem().build(Cb.sketch({dom:{styles:{left:"0px",top:"0px",width:"100%",height:"100%",position:"fixed","z-index":"1000000000000000"},classes:[e.blockerClass]},events:(a=o,Go([Xo(cr(),a.forceDrop),Xo(fr(),a.drop),Xo(sr(),(function(e,t){a.move(t.event())})),Xo(lr(),a.delayDrop)]))})),c=iv(u=function(){qN(n=i),n.getSystem().removeFromGui(n),e.snaps.each((function(e){Bk(r,e)}));var n=e.getTarget(r.element());t.reset(),e.onDrop(r,n)},200),n(r),o=i,r.getSystem().addToGui(o),$N(o))}))])}})],Object.freeze({getData:function(e){e=e.raw().touches;return 1===e.length?(e=e[0],ye.some(Ja(e.clientX,e.clientY))):ye.none()},getDelta:function(e,t){return Ja(t.left()-e.left(),t.top()-e.top())}})),QN=(Ws=[ln("useFixed",s),ln("getTarget",i),ln("onDrag",n),ln("repositionTarget",!0),ln("onDrop",n),ae("getBounds",gu),tm,Bu("dragger",{handlers:function(e,t){function n(n){t.setStartData(Mk(e,n))}return Go([Xo(zr(),n),Xo(ir(),(function(e,t){n(e),t.stop()})),Xo(Mr(),(function(n,r){t.getStartData().each((function(o){var i;tr(o.comp.element(),n.element())&&(r.stop(),o=t.update(ZN,r.event()),i=t.getStartData().getOrThunk((function(){return Mk(e,n)})),o.each((function(t){Pk(n,e,i,t)})))}))})),Xo(Pr(),(function(n,r){t.getStartData().each((function(r){tr(r.comp.element(),n.element())&&(e.snaps.each((function(e){Bk(n,e)})),r=e.getTarget(n.element()),t.reset(),e.onDrop(n,r))}))}))])}})],it=Object.freeze({init:function(){var e=ye.none(),t=ye.none(),n=o({});return Hi({readState:n,reset:function(){e=ye.none(),t=ye.none()},update:function(t,n){return t.getData(n).bind((function(n){return r=t,o=n,n=e.map((function(e){return r.getDelta(e,o)})),e=ye.some(o),n;var r,o}))},getStartData:function(){return t},setStartData:function(e){t=ye.some(e)}})}}),$d=Object.freeze({snapTo:function(e,t,n,r){var o,i,a=t.getTarget(e.element());t.repositionTarget&&(t=ri(e.element()),e=ou(t),t=DO(a),o=e,i=t,o={coord:MO((r=r).output(),r.output(),o,i),extra:r.extra()},i=BO(o.coord,e,t),ia(a,i))}}),Ma({branchKey:"mode",branches:Object.freeze({mouse:Ul,touch:Ws}),name:"dragging",active:{events:function(e,t){return e.dragger.handlers(e,t)}},extra:{snap:so(["sensor","range","output"],["extra"])},state:it,apis:$d})),eA=((qd=uT=uT||{})[qd.None=0]="None",qd[qd.Both=1]="Both",qd[qd.Vertical=2]="Vertical",function(e,t,n){var r=gn.fromDom(e.getContainer());t=Ik(e,t,n,Ya(r),nu(r));Ze(t,(function(e,t){return oa(r,t,jN(e))})),sp.fireResizeEditor(e)}),tA={renderElementPath:function(e,t){return t.delimiter||(t.delimiter="»"),{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:ac([nm.config({mode:"flow",selector:"div[role=button]"}),Jb.config({}),rm.config({}),im("elementPathEvents",[Zo((function(n,r){e.shortcuts.add("alt+F11","focus statusbar elementpath",(function(){return nm.focusIn(n)})),e.on("NodeChange",(function(r){var o;r=function(t){for(var n=[],r=t.length;0<r--;){var o=t[r];if(1===o.nodeType&&!function(e){if(1===e.nodeType){if("BR"===e.nodeName||e.getAttribute("data-mce-bogus"))return!0;if("bookmark"===e.getAttribute("data-mce-type"))return!0}return!1}(o)){var i=e.fire("ResolveName",{name:o.nodeName.toLowerCase(),target:o});if(i.isDefaultPrevented()||n.push({name:i.name,element:o}),i.isPropagationStopped())break}}return n}(r.parents);0<r.length&&rm.set(n,(r=Me((r=r)||[],(function(t,n){return Am.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){e.focus(),e.selection.select(t.element),e.nodeChanged()}})})),o={dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0},innerHtml:" "+t.delimiter+" "}},Fe(r.slice(1),(function(e,t){return e.push(o),e.push(t),e}),[r[0]])))}))}))])]),components:[]}}},nA=function(e,t){function n(e,n,r){rm.set(e,[ma(t.translate(["{0} "+r,n[r]]))])}var r;return Am.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:ac([Jb.config({}),rm.config({}),_l.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),im("wordcount-events",[Xo(Ar(),(function(e){var t=_l.getValue(e),r="words"===t.mode?"characters":"words";_l.setValue(e,{mode:r,count:t.count}),n(e,t.count,r)})),Zo((function(t){e.on("wordCountUpdate",(function(e){var r=_l.getValue(t).mode;_l.setValue(t,{mode:r,count:e.wordCount}),n(t,e.wordCount,r)}))}))])]),eventOrder:((r={})[Ar()]=["wordcount-events","alloy.base.behaviour"],r)})},rA=Xn(),oA=function(e,t){function n(e){var n=mu(e);return f.getOpt(t).fold((function(){return QN.snap({sensor:zO(n.x()-20,n.y()-20),range:Ja(n.width(),n.height()),output:zO(ye.some(n.x()),ye.some(n.y())),extra:{td:e}})}),(function(t){var r=n.x()-20,o=n.y()-20;t=t.element().dom().getBoundingClientRect();return QN.snap({sensor:zO(r,o),range:Ja(40,40),output:zO(ye.some(n.x()-t.width/2),ye.some(n.y()-t.height/2)),extra:{td:e}})}))}function r(e){var n=mu(e);return d.getOpt(t).fold((function(){return QN.snap({sensor:zO(n.x()-20,n.y()-20),range:Ja(n.width(),n.height()),output:zO(ye.some(n.right()),ye.some(n.bottom())),extra:{td:e}})}),(function(t){var r=n.right()-20,o=n.bottom()-20;t=t.element().dom().getBoundingClientRect();return QN.snap({sensor:zO(r,o),range:Ja(40,40),output:zO(ye.some(n.right()-t.width/2),ye.some(n.bottom()-t.height/2)),extra:{td:e}})}))}function o(t,n,r,o){n=n.dom().getBoundingClientRect();var i=(ca(t.element(),"display"),lo(gn.fromDom(e.getBody())).dom().innerHeight);r=r(n),o=o(n,i);(r||o)&&oa(t.element(),"display","none")}function i(e){var t=n(e);QN.snapTo(m,t),o(m,e,(function(e){return e.top<0}),(function(e,t){return e.top>t}))}function a(e){var t=r(e);QN.snapTo(g,t),o(g,e,(function(e){return e.bottom<0}),(function(e,t){return e.bottom>t}))}var u=mn([]),c=mn([]),s={getSnapPoints:function(){return Me(u.get(),n)},leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:function(t,n){p.set(n.td),e.fire("tableselectorchange",{start:p.get(),finish:v.get()})},mustSnap:!0},l={getSnapPoints:function(){return Me(c.get(),r)},leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:function(t,n){v.set(n.td),e.fire("tableselectorchange",{start:p.get(),finish:v.get()})},mustSnap:!0},f=Dm(Am.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:ac([QN.config(rA.deviceType.isTouch()?{mode:"touch",snaps:s}:{mode:"mouse",blockerClass:"blocker",snaps:s}),my.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"]}})),d=Dm(Am.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:ac([QN.config(rA.deviceType.isTouch()?{mode:"touch",snaps:l}:{mode:"mouse",blockerClass:"blocker",snaps:l}),my.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"]}})),m=pa(f.asSpec()),g=pa(d.asSpec()),h=mn(!1),p=mn(null),v=mn(null);rA.deviceType.isTouch()&&(e.on("tableselectionchange",(function(e){h.get()||(vl(t,m),vl(t,g),h.set(!0)),p.set(e.start),v.set(e.finish),e.otherCells.each((function(t){u.set(t.upOrLeftCells),c.set(t.downOrRightCells),i(e.start),a(e.finish)}))})),e.on("resize ScrollContent",(function(){var e;e=p.get(),i(e),e=v.get(),a(e)})),e.on("tableselectionclear",(function(){h.get()&&(wl(m),wl(g),h.set(!1))})))},iA=5,aA=function(e){var t=mn(ye.none()),n=mn(!1),r=Lm((function(t){e.fire("longpress",d(d({},t),{type:"longpress"})),n.set(!0)}),400);e.on("touchstart",(function(e){Fk(e).each((function(i){r.cancel(),i={x:o(i.clientX),y:o(i.clientY),target:o(e.target)},r.throttle(e),n.set(!1),t.set(ye.some(i))}))}),!0),e.on("touchmove",(function(o){r.cancel(),Fk(o).each((function(r){t.get().each((function(o){var i,a;i=r,o=o,a=Math.abs(i.clientX-o.x()),i=Math.abs(i.clientY-o.y()),(iA<a||iA<i)&&(t.set(ye.none()),n.set(!1),e.fire("longpresscancel"))}))}))}),!0),e.on("touchend touchcancel",(function(e){r.cancel(),"touchend"===e.type&&n.get()&&t.get().filter((function(t){return t.target().isEqualNode(e.target)})).map((function(){e.preventDefault()}))}),!0)},uA=function(e){function n(){return h.bind(uN.getHeader)}function r(){return we.value(y)}function o(){return h.bind((function(e){return uN.getMoreButton(e)})).getOrDie("Could not find more button element")}function i(){return h.bind((function(e){return uN.getThrobber(e)})).getOrDie("Could not find throbber element")}function a(t){var n=ph.DOM,r=(n=e.getParam("width",n.getStyle(t,"width")),t=e.getParam("height",Math.max(e.getElement().offsetHeight,200)),Sv(e)),o=kv(e),i=(n=UN(n).bind((function(e){return jN(r.map((function(t){return Math.max(e,t)})))})).getOr(jN(n)),t=UN(t).bind((function(e){return o.map((function(t){return Math.max(e,t)}))})).getOr(t),n=jN(n),e.inline?"max-width":"width");return _o("div",i,n)&&oa(_.element(),i,n),e.inline||(i=jN(t),_o("div","height",i)?oa(_.element(),"height",i):oa(_.element(),"height","200px")),t}var u,c,s,l,f=e.inline,m=f?bN:vN,g=Ev(e)?YO:JO,h=ye.none(),p=Xn(),v=p.browser.isIE()?["tox-platform-ie"]:[],b=(p=p.deviceType.isTouch()?["tox-platform-touch"]:[],Hg.isRtl()?{attributes:{dir:"rtl"}}:{}),y=pa({dom:d({tag:"div",classes:["tox","tox-silver-sink","tox-tinymce-aux"].concat(v).concat(p)},b),behaviours:ac([dl.config({useFixed:function(){return g.isDocked(n)}})])}),w=Dm({dom:{tag:"div",classes:["tox-anchorbar"]}}),x=(u=y,c=e,b=function(){return h.bind((function(e){return w.getOpt(e)})).getOrDie("Could not find a anchor bar element")},C=o,s=mn(!1),l={shared:{providers:{icons:function(){return c.ui.registry.getAll().icons},menuItems:function(){return c.ui.registry.getAll().menuItems},translate:Hg.translate},interpreter:function(e){return ET(e,l)},anchors:AT.getAnchors(c,b,C),getSink:function(){return we.value(u)}},urlinput:GT(c),styleselect:MT(c),colorinput:DT(c),dialog:_T(c),isContextMenuOpen:function(){return s.get()},setContextMenuState:function(e){return s.set(e)}}),C=(b=uN.parts().menubar({dom:{tag:"div",classes:["tox-menubar"]},backstage:x,onEscape:function(){e.focus()}}),Tv),S=uN.parts().toolbar({dom:{tag:"div",classes:["tox-toolbar"]},getSink:r,backstage:x,onEscape:function(){e.focus()},split:C(e),lazyToolbar:function(){return h.bind((function(e){return uN.getToolbar(e)})).getOrDie("Could not find more toolbar element")},lazyMoreButton:o,lazyHeader:function(){return n().getOrDie("Could not find header element")}}),k=uN.parts()["multiple-toolbar"]({dom:{tag:"div",classes:["tox-toolbar-overlord"]},onEscape:function(){}}),T=uN.parts().socket({dom:{tag:"div",classes:["tox-edit-area"]}}),E=uN.parts().sidebar({dom:{tag:"div",classes:["tox-sidebar"]}}),O=uN.parts().throbber({dom:{tag:"div",classes:["tox-throbber"]},backstage:x}),N=e.getParam("statusbar",!0,"boolean")&&!f?ye.some(Lk(e,x.shared.providers)):ye.none(),A=(T={dom:{tag:"div",classes:["tox-sidebar-wrap"]},components:[T,E]},E=Nb(e),Eb(e)),D=Tb(e),_=(C=C(e)!==pb.default,D=uN.parts().header({dom:{tag:"div",classes:["tox-editor-header"]},components:Ue([D?[b]:[],E?(C&&t.console.warn("Toolbar drawer cannot be applied when multiple toolbars are active"),[k]):A?[S]:[],Db(e)?[]:[w.asSpec()]]),sticky:Ev(e),editor:e,getSink:r}),b=Ue([[D],f?[]:[T]]),E=Ue([[{dom:{tag:"div",classes:["tox-editor-container"]},components:b}],f?[]:N.toArray(),[O]]),C=_b(e),k=d(d({role:"application"},Hg.isRtl()?{dir:"rtl"}:{}),C?{"aria-hidden":"true"}:{}),pa(uN.sketch({dom:{tag:"div",classes:["tox","tox-tinymce"].concat(f?["tox-tinymce-inline"]:[]).concat(p).concat(v),styles:d({visibility:"hidden"},C?{opacity:"0",border:"0"}:{}),attributes:k},components:E,behaviours:ac([nm.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"})])}))),R=(h=ye.some(_),e.shortcuts.add("alt+F9","focus menubar",(function(){uN.focusMenubar(_)})),e.shortcuts.add("alt+F10","focus toolbar",(function(){uN.focusToolbar(_)})),Cv(_)),B=Cv(y);return OO(e,R,B),aA(e),{mothership:R,uiMothership:B,backstage:x,renderUI:function(){g.setup(e,n),RN(e,x),Dk(e,r,x),o=(t=e).ui.registry.getAll().sidebars,Pe(Ke(o),(function(e){function n(){return ye.from(t.queryCommandValue("ToggleSidebar")).is(e)}var r=o[e];t.ui.registry.addToggleButton(e,{icon:r.icon,tooltip:r.tooltip,onAction:function(r){t.execCommand("ToggleSidebar",!1,e),r.setActive(n())},onSetup:function(e){function r(){return e.setActive(n())}return t.on("ToggleSidebar",r),function(){t.off("ToggleSidebar",r)}}})})),gk(e,i,x.shared);var t,o,u=e.ui.registry.getAll(),c=u.buttons,s=u.menuItems,l=u.contextToolbars,f=(u=u.sidebars,Ob(e));s={menuItems:s,menus:e.settings.menu?Qe(e.settings.menu,(function(e){return ct(e,{items:e.items})})):{},menubar:e.settings.menubar,toolbar:f.getOrThunk((function(){return e.getParam("toolbar",!0)})),buttons:c,sidebar:u},EO(e,l,y,{backstage:x}),oA(e,y),f=e.getElement(),c=a(f),u={mothership:R,uiMothership:B,outerContainer:_};return m.render(e,u,s,x,{targetNode:f,height:c})},getUi:function(){return{channels:{broadcastAll:B.broadcast,broadcastOn:B.broadcastOn,register:function(){}}}}}},cA=function(e,t){var n=ye.from(xi(e,"id")).fold((function(){var e=Oi("dialog-label");return wi(t,"id",e),e}),i);wi(e,"aria-labelledby",n)},sA=(ql=o([on("lazySink"),Z("dragBlockClass"),ae("getBounds",gu),ln("useTabstopAt",o(!0)),ln("eventOrder",{}),gs("modalBehaviours",[nm]),Ta("onExecute"),Oa("onEscape")]),em={sketch:i},Pu=o([Gl({name:"draghandle",overrides:function(e,t){return{behaviours:ac([QN.config({mode:"mouse",getTarget:function(e){return pu(e,'[role="dialog"]').getOr(e)},blockerClass:e.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:e.getDragBounds})])}}}),$l({schema:[on("dom")],name:"title"}),$l({factory:em,schema:[on("dom")],name:"close"}),$l({factory:em,schema:[on("dom")],name:"body"}),Gl({factory:em,schema:[on("dom")],name:"footer"}),Tc({factory:{sketch:function(e,t){return d(d({},e),{dom:t.dom,components:t.components})}},schema:[ln("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),ln("components",[])],name:"blocker"})]),uf({name:"ModalDialog",configFields:ql(),partFields:Pu(),factory:function(e,t,n,r){var o=Oi("alloy.dialog.busy"),a=Oi("alloy.dialog.idle"),u=ac([nm.config({mode:"special",onTab:function(){return ye.some(!0)},onShiftTab:function(){return ye.some(!0)}}),am.config({})]),c=Oi("modal-events"),s=d(d({},e.eventOrder),{"alloy.system.attached":[c].concat(e.eventOrder["alloy.system.attached"]||[])});return{uid:e.uid,dom:e.dom,components:t,apis:{show:function(t){var n=e.lazySink(t).getOrDie(),i=mn(ye.none()),c=r.blocker();c=n.getSystem().build(d(d({},c),{components:c.components.concat([va(t)]),behaviours:ac([im("dialog-blocker-events",[Xo(a,(function(e,n){Ci(t.element(),"aria-busy")&&(Si(t.element(),"aria-busy"),i.get().each((function(e){return rm.remove(t,e)})))})),Xo(o,(function(e,n){wi(t.element(),"aria-busy","true"),n=n.event().getBusySpec(),i.get().each((function(e){rm.remove(t,e)})),n=n(t,u),e=e.getSystem().build(n),i.set(ye.some(e)),rm.append(t,va(e)),e.hasConfigured(nm)&&nm.focusIn(e)}))])])}));vl(n,c),nm.focusIn(t)},hide:function(e){ii(e.element()).each((function(t){e.getSystem().getByDom(t).each((function(e){wl(e)}))}))},getBody:function(t){return Ss(t,e,"body")},getFooter:function(t){return Ss(t,e,"footer")},setIdle:function(e){Gr(e,a)},setBusy:function(e,t){Xr(e,o,{getBusySpec:t})}},eventOrder:s,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:Bl(e.modalBehaviours,[rm.config({}),nm.config({mode:"cyclic",onEnter:e.onExecute,onEscape:e.onEscape,useTabstopAt:e.useTabstopAt}),im(c,[Zo((function(t){var n,r;cA(t.element(),Ss(t,e,"title").element()),n=t.element(),r=Ss(t,e,"body").element(),t=ye.from(xi(n,"id")).fold((function(){var e=Oi("dialog-describe");return wi(r,"id",e),e}),i),wi(n,"aria-describedby",t)}))])])}},apis:{show:function(e,t){e.show(t)},hide:function(e,t){e.hide(t)},getBody:function(e,t){return e.getBody(t)},getFooter:function(e,t){return e.getFooter(t)},setBusy:function(e,t,n){e.setBusy(t,n)},setIdle:function(e,t){e.setIdle(t)}}})),lA=(Yn=[$("type"),$("text"),G("level",["info","warn","error","success"]),$("icon"),ln("url","")],zt(Yn)),fA=(Wl=[$("type"),$("text"),ie("disabled",!1),ie("primary",!1),Vt("name","name",dt((function(){return Oi("button-name")})),en),ee("icon"),ie("borderless",!1)],zt(Wl)),dA=(Wd=[$("type"),$("name"),$("label"),ie("disabled",!1)],zt(Wd)),mA=(Sc=tn,oy=[$("type"),$("name")],Xd=oy.concat([ee("label")]),zt(Xd)),gA=(qn=en,zt(Xd)),hA=(Ys=en,zt(Xd)),pA=(jl=It(jt),Wn=Xd.concat([ie("sandboxed",!0)]),zt(Wn)),vA=(tm=en,Ul=Xd.concat([ee("inputMode"),ee("placeholder"),ie("maximized",!1),ie("disabled",!1)]),zt(Ul)),bA=(Ws=en,it=Xd.concat([K("items",[$("text"),$("value")]),ne("size",1),ie("disabled",!1)]),zt(it)),yA=($d=en,qd=Xd.concat([ie("constrain",!0),ie("disabled",!1)]),zt(qd)),wA=(em=zt([$("width"),$("height")]),Tc=Xd.concat([ee("placeholder"),ie("maximized",!1),ie("disabled",!1)]),zt(Tc)),xA=(ql=en,Pu=Xd.concat([oe("filetype","file",["image","media","file"]),ln("disabled",!1)]),zt(Pu)),CA=(Yn=zt([$("value"),ln("meta",{})]),oy.concat([re("tag","textarea"),$("scriptId"),$("scriptUrl"),fn("settings",void 0,rn)])),SA=oy.concat([re("tag","textarea"),X("init")]),kA=qt((function(e){return Gt("customeditor.old",Pt(SA),e).orThunk((function(){return Gt("customeditor.new",Pt(CA),e)}))})),TA=(Wl=en,Wd=[$("type"),$("html"),oe("presets","presentation",["presentation","document"])],zt(Wd)),EA=(jt=Xd.concat([an("currentState",zt([on("blob"),$("url")]))]),zt(jt)),OA=(Wn=Xd.concat([ln("columns","auto")]),zt(Wn)),NA=(it=(Ul=[$("value"),$("text"),$("icon")],Ft(Ul)),qd=[$("type"),J("header",en),J("cells",It(en))],zt(qd)),AA=Wt((function(){return Jt("type",{alertbanner:lA,bar:zt((e=Vk("bar"),[$("type"),e])),button:fA,checkbox:dA,colorinput:mA,colorpicker:gA,dropzone:hA,grid:zt(Hk(Vk("grid"))),iframe:pA,input:vA,selectbox:bA,sizeinput:yA,textarea:wA,urlinput:xA,customeditor:kA,htmlpanel:TA,imagetools:EA,collection:OA,label:zt((e=Vk("label"),[$("type"),$("label"),e])),table:NA,panel:DA});var e})),DA=(Tc=[$("type"),ln("classes",[]),J("items",AA)],zt(Tc)),_A=(Pu=[Vt("name","name",dt((function(){return Oi("tab-name")})),en),$("title"),J("items",AA)],rn=[$("type"),K("tabs",Pu)],oy=zt(rn),Wd=zt([$("type"),$("name"),ie("active",!1)].concat(Gd)),jt=tn,Xd=[Vt("name","name",dt((function(){return Oi("button-name")})),en),ee("icon"),oe("align","end",["start","end"]),ie("primary",!1),ie("disabled",!1)],Wn=g(Xd,[$("text")]),Ul=g([G("type",["submit","cancel","custom"])],Wn),qd=g([G("type",["menu"]),ee("text"),ee("tooltip"),ee("icon"),J("items",Wd),ae("onSetup",(function(){return n}))],Xd),Wt=Wn,Tc=U("type",{submit:Ul,cancel:Ul,custom:Ul,menu:qd}),zt([$("title"),an("body",Jt("type",{panel:DA,tabpanel:oy})),re("size","normal"),J("buttons",Tc),ln("initialData",{}),ae("onAction",n),ae("onChange",n),ae("onSubmit",n),ae("onClose",n),ae("onCancel",n),ln("onTabChange",n)])),RA={checkbox:Sc,colorinput:qn,colorpicker:Ys,dropzone:jl,input:Ws,iframe:tm,sizeinput:em,selectbox:$d,size:em,textarea:ql,urlinput:Yn,customeditor:Wl,collection:it,togglemenuitem:jt},BA=function(e){return ye.from(RA[e.type])},MA=function(e){return Ie(Uk(e),jk)},PA=(Pu=zt(g([G("type",["cancel","custom"])],Wt)),zt([$("title"),$("url"),Q("height"),Q("width"),un("buttons",It(Pu)),ae("onAction",n),ae("onCancel",n),ae("onClose",n),ae("onMessage",n)])),zA={open:function(e,t){return t=Wk(t),e(t.internalDialog,t.initialData,t.dataValidator)},openUrl:function(e,t){return e(Xt(Gt("dialog",PA,t)))},redial:Wk},IA=(rn=af({name:"TabButton",configFields:[ln("uid",void 0),on("value"),Vt("dom","dom",mt((function(e){return{attributes:{role:"tab",id:Oi("aria"),"aria-selected":"false"}}})),Zt()),Z("action"),ln("domModification",{}),gs("tabButtonBehaviours",[am,nm,_l]),on("view")],factory:function(e,t){return{uid:e.uid,dom:e.dom,components:e.components,events:Cd(e.action),behaviours:Bl(e.tabButtonBehaviours,[am.config({}),nm.config({mode:"execution",useSpace:!0,useEnter:!0}),_l.config({store:{mode:"memory",initialValue:e.value}})]),domModification:e.domModification}}}),Gd=o([on("tabs"),on("dom"),ln("clickToDismiss",!1),gs("tabbarBehaviours",[Nd,nm]),Ca(["tabClass","selectedClass"])]),dt=lc({factory:rn,name:"tabs",unit:"tab",overrides:function(e,t){function r(e,t){Nd.dehighlight(e,t),Xr(e,Wr(),{tabbar:e,button:t})}function o(e,t){Nd.highlight(e,t),Xr(e,jr(),{tabbar:e,button:t})}return{action:function(t){var i=t.getSystem().getByUid(e.uid).getOrDie(),a=Nd.isHighlighted(i,t);(a&&e.clickToDismiss?r:a?n:o)(i,t)},domModification:{classes:[e.markers.tabClass]}}}}),Wd=o([dt]),uf({name:"Tabbar",configFields:Gd(),partFields:Wd(),factory:function(e,t,n,r){return{uid:e.uid,dom:e.dom,components:t,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:Bl(e.tabbarBehaviours,[Nd.config({highlightClass:e.markers.selectedClass,itemClass:e.markers.tabClass,onHighlight:function(e,t){wi(t.element(),"aria-selected","true")},onDehighlight:function(e,t){wi(t.element(),"aria-selected","false")}}),nm.config({mode:"flow",getInitial:function(e){return Nd.getHighlighted(e).map((function(e){return e.element()}))},selector:"."+e.markers.tabClass,executeOnMove:!0})])}}})),LA=(Xd=af({name:"Tabview",configFields:[gs("tabviewBehaviours",[rm])],factory:function(e,t){return{uid:e.uid,dom:e.dom,behaviours:Bl(e.tabviewBehaviours,[rm.config({})]),domModification:{attributes:{role:"tabpanel"}}}}}),Wn=o([ln("selectFirst",!0),ka("onChangeTab"),ka("onDismissTab"),ln("tabs",[]),gs("tabSectionBehaviours",[])]),Ul=$l({factory:IA,schema:[on("dom"),Y("markers",[on("tabClass"),on("selectedClass")])],name:"tabbar",defaults:function(e){return{tabs:e.tabs}}}),qd=$l({factory:Xd,name:"tabview"}),oy=o([Ul,qd]),uf({name:"TabSection",configFields:Wn(),partFields:oy(),factory:function(e,t,n,r){function o(t,n){Ql(t,e,"tabbar").each((function(e){n(e).each(Yr)}))}return{uid:e.uid,dom:e.dom,components:t,behaviours:Rl(e.tabSectionBehaviours),events:Go(Ue([e.selectFirst?[Zo((function(e,t){o(e,Nd.getFirst)}))]:[],[Xo(jr(),(function(t,n){var r,o;n=n.event().button();r=n,o=_l.getValue(r),Ql(r,e,"tabview").each((function(t){He(e.tabs,(function(e){return e.value===o})).each((function(n){n=n.view(),wi(t.element(),"aria-labelledby",xi(r.element(),"id")),rm.set(t,n),e.onChangeTab(t,r,n)}))}))})),Xo(Wr(),(function(t,n){n=n.event().button(),e.onDismissTab(t,n)}))]])),apis:{getViewItems:function(t){return Ql(t,e,"tabview").map((function(e){return rm.contents(e)})).getOr([])},showTab:function(e,t){o(e,(function(e){var n=Nd.getCandidates(e);return He(n,(function(e){return _l.getValue(e)===t})).filter((function(t){return!Nd.isHighlighted(e,t)}))}))}}}},apis:{getViewItems:function(e,t){return e.getViewItems(t)},showTab:function(e,t,n){e.showTab(t,n)}}})),FA="send-data-to-section",HA="send-data-to-view",VA=Oi("update-dialog"),UA=Oi("update-title"),jA=Oi("update-body"),WA=Oi("update-footer"),qA=Oi("body-send-message"),$A=function(e,t,n,r){return Kk(e,ye.some(t),n,r)},GA=function(e,t){return e=Kk(e,ye.none(),t,!1),sA.parts().body(e)},XA=function(e){return e={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[_w.craft({dom:{tag:"iframe",attributes:{src:e.url}},behaviours:ac([Jb.config({}),am.config({})])})]}],behaviours:ac([nm.config({mode:"acyclic",useTabstopAt:c(_w.isPseudoStop)})])},sA.parts().body(e)},YA={initUrlDialog:function(e,t){function n(t,n){return Xo(t,(function(t,r){var o,i;o=t,i=function(o,i){n(e(),o,r.event(),t)},NE.getState(o).get().each((function(e){i(e,o)}))}))}return g(Jk(n,t),[n(Pb,(function(e,t,n){t.onAction(e,{name:n.name()})}))])},initDialog:function(e,t){function n(t,n){return Xo(t,(function(t,r){var o,i;o=t,i=function(o,i){n(e(),o,r.event(),t)},NE.getState(o).get().each((function(e){i(e.internalDialog,o)}))}))}return g(Jk(n,t),[n(zb,(function(e,t){t.onSubmit(e)})),n(Rb,(function(e,t,n){t.onChange(e,{name:n.name()})})),n(Pb,(function(e,t,n,r){function o(){nm.focusIn(r)}var i=mc();t.onAction(e,{name:n.name(),value:n.value()}),mc().fold((function(){o()}),(function(e){(!nr(r.element(),e)||Ci(e,"disabled")||nr(e,i.getOrNull())&&Ci(i.getOrDie(),"disabled"))&&o()}))})),n(Fb,(function(e,t,n){t.onTabChange(e,{newTabName:n.name(),oldTabName:n.oldName()})})),Qo((function(t){var n=e();_l.setValue(t,n.getData())}))])}},KA=Qk,JA=function(e,t){return sA.parts().footer(Qk(e,t))},ZA=function(e,t,n){function r(t){var n=e.getRoot();n.getSystem().isConnected()&&t(n)}var o={getData:function(){var t=e.getRoot(),r=(t=t.getSystem().isConnected()?e.getFormWrapper():t,t=_l.getValue(t),Qe(n,(function(e){return e.get()})));return d(d({},t),r)},setData:function(t){r((function(r){var i=o.getData(),a=ct(i,t),u=(i=function(e,t){return e=e.getRoot(),NE.getState(e).get().map((function(e){return Xt(Gt("data",e.dataValidator,t))})).getOr(t)}(e,a),e.getFormWrapper());_l.setValue(u,i),Ze(n,(function(e,t){ot(a,t)&&e.set(a[t])}))}))},disable:function(t){eT(e,t).each(uh.disable)},enable:function(t){eT(e,t).each(uh.enable)},focus:function(t){eT(e,t).each(am.focus)},block:function(e){if(!xe(e))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");r((function(t){Xr(t,Ib,{message:e})}))},unblock:function(){r((function(e){Gr(e,Lb)}))},showTab:function(t){r((function(n){var r=e.getBody();NE.getState(r).get().exists((function(e){return e.isTabPanel()}))&&Od.getCurrent(r).each((function(e){LA.showTab(e,t)}))}))},redial:function(e){r((function(n){var r=t(e);n.getSystem().broadcastOn([VA],r),n.getSystem().broadcastOn([UA],r.internalDialog),n.getSystem().broadcastOn([jA],r.internalDialog),n.getSystem().broadcastOn([WA],r.internalDialog),o.setData(r.initialData)}))},close:function(){r((function(e){Gr(e,Bb)}))}};return o},QA=function(e,t,n){return Cb.sketch({dom:Gm('<div class="tox-dialog__header"></div>'),components:[nT(e,ye.some(t),n),rT(),tT(n)],containerBehaviours:ac([QN.config({mode:"mouse",blockerClass:"blocker",getTarget:function(e){return bu(e,'[role="dialog"]').getOrDie()},snaps:{getSnapPoints:function(){return[]},leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])})},eD=Zg.deviceType.isTouch(),tD=function(e,t){return e={title:t.shared.providers.translate(e),draggable:t.dialog.isDraggableModal()},t=t.shared.providers,n=sA.parts().title(nT(e,ye.none(),t)),r=sA.parts().draghandle(rT()),t=sA.parts().close(tT(t)),n=[n].concat(e.draggable?[r]:[]).concat([t]),Cb.sketch({dom:Gm('<div class="tox-dialog__header"></div>'),components:n});var n,r},nD=function(e,t){return{onClose:function(){return t.closeWindow()},onBlock:function(t){sA.setBusy(e(),(function(e,n){return{dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":t.message()},styles:{left:"0px",right:"0px",bottom:"0px",top:"0px",position:"absolute"}},behaviours:n,components:[{dom:Gm('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}}))},onUnblock:function(){sA.setIdle(e())}}},rD=function(e,t,n,r){return pa(sA.sketch({lazySink:r.shared.getSink,onEscape:function(e){return Gr(e,Mb),ye.some(!0)},useTabstopAt:function(e){return!_w.isPseudoStop(e)},modalBehaviours:ac(g([NE.config({channel:VA,updateState:function(e,t){return ye.some(t)},initialData:t}),Ow.memory({}),am.config({}),im("execute-on-form",n.concat([Jo(mr(),(function(e,t){nm.focusIn(e)}))])),im("scroll-lock",[Zo((function(){Yi(Uo(),"tox-dialog__disable-scroll")})),Qo((function(){Ji(Uo(),"tox-dialog__disable-scroll")}))])],e.extraBehaviours)),eventOrder:((r={})[Er()]=["execute-on-form"],r[Tr()]=["reflecting","receiving"],r[Lr()]=["scroll-lock","reflecting","messages","execute-on-form","alloy.base.behaviour"],r[Fr()]=["alloy.base.behaviour","execute-on-form","messages","reflecting","scroll-lock"],r),dom:{tag:"div",classes:["tox-dialog"].concat(e.extraClasses),styles:d({position:"relative"},e.extraStyles)},components:g([e.header,e.body],e.footer.toArray()),dragBlockClass:"tox-dialog-wrap",parts:{blocker:{dom:Gm('<div class="tox-dialog-wrap"></div>'),components:[{dom:{tag:"div",classes:eD?["tox-dialog-wrap__backdrop","tox-dialog-wrap__backdrop--opaque"]:["tox-dialog-wrap__backdrop"]}}]}}}))},oD=function(e){return Me(e,(function(e){return"menu"===e.type?(n=Me((t=e).items,(function(e){var t=mn(!1);return d(d({},e),{storage:t})})),d(d({},t),{items:n})):e;var t,n}))},iD=function(e){return Fe(e,(function(e,t){return"menu"===t.type?Fe(t.items,(function(e,t){return e[t.name]=t.storage,e}),e):e}),{})},aD=tinymce.util.Tools.resolve("tinymce.util.URI"),uD=function(e){function t(t){e.getSystem().isConnected()&&t(e)}return{block:function(e){if(!xe(e))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");t((function(t){Xr(t,Ib,{message:e})}))},unblock:function(){t((function(e){Gr(e,Lb)}))},close:function(){t((function(e){Gr(e,Bb)}))},sendMessage:function(e){t((function(t){t.getSystem().broadcastOn([qA],e)}))}}},cD=["insertContent","setContent","execCommand","close","block","unblock"],sD=function(e){return Ce(e)&&-1!==cD.indexOf(e.mceAction)},lD=function(e){return!sD(e)&&Ce(e)&&ot(e,"mceAction")},fD=function(e,t,n){switch(n.mceAction){case"insertContent":e.insertContent(n.content);break;case"setContent":e.setContent(n.content);break;case"execCommand":var r=!!ke(n.ui)&&n.ui;e.execCommand(n.cmd,r,n.value);break;case"close":t.close();break;case"block":t.block(n.message);break;case"unblock":t.unblock()}},dD=Zg.deviceType.isTouch(),mD={dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]}},gD={dom:{tag:"div",classes:["tox-dialog__header"]}},hD=function(e,t){return sA.parts().close(Am.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":t.translate("Close")}},action:e,buttonBehaviours:ac([Jb.config({})])}))},pD=function(){return sA.parts().title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}})},vD=function(e,t){return sA.parts().body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:Gm("<p>"+t.translate(e)+"</p>")}]}]})},bD=function(e){return sA.parts().footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:e})},yD=function(e,t){return[Cb.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:e}),Cb.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:t})]},wD=function(e){return sA.sketch({lazySink:e.lazySink,onEscape:function(){return e.onCancel(),ye.some(!0)},dom:{tag:"div",classes:["tox-dialog"].concat(e.extraClasses)},components:[ut(e.headerOverride.getOr(gD),{components:[e.partSpecs.title,e.partSpecs.close]}),e.partSpecs.body,e.partSpecs.footer],parts:{blocker:{dom:Gm('<div class="tox-dialog-wrap"></div>'),components:[{dom:{tag:"div",classes:dD?["tox-dialog-wrap__backdrop","tox-dialog-wrap__backdrop--opaque"]:["tox-dialog-wrap__backdrop"]}}]}},modalBehaviours:ac([im("basic-dialog-events",[Xo(Mb,(function(t,n){e.onCancel()})),Xo(zb,(function(t,n){e.onSubmit()}))])])})},xD=function(e){function r(e,t,n,r){return zA.open((function(e,o,i){function s(){return C.on((function(e){qO.refresh(e)}))}o=Xt(Gt("data",i,o));var l,f,d,m,h,p,v,b,y,w,x,C=(l=mn(ye.none()),{clear:function(){l.set(ye.none())},set:function(e){l.set(ye.some(e))},isSet:function(){return l.get().isSome()},on:function(e){l.get().each(e)}}),S=(i={dataValidator:i,initialData:o,internalDialog:e},f={redial:zA.redial,closeWindow:function(){C.on(km.hide),u.off("ResizeEditor",s),C.clear(),n(S.instanceApi)}},e=a,d=r,m=Oi("dialog-label"),k=Oi("dialog-content"),h=Dm(QA({title:i.internalDialog.title,draggable:!0},m,e.shared.providers)),p=Dm($A({body:i.internalDialog.body},k,e,d)),d=oD(i.internalDialog.buttons),v=iD(d),b=Dm(KA({buttons:d},e)),d=YA.initDialog((function(){return w}),{onBlock:function(){},onUnblock:function(){},onClose:function(){return f.closeWindow()}}),y=pa({dom:{tag:"div",classes:["tox-dialog","tox-dialog-inline"],attributes:((e={role:"dialog"})["aria-labelledby"]=m,e["aria-describedby"]=""+k,e)},eventOrder:((m={})[Tr()]=[NE.name(),fc.name()],m[Er()]=["execute-on-form"],m[Lr()]=["reflecting","execute-on-form"],m),behaviours:ac([nm.config({mode:"cyclic",onEscape:function(e){return Gr(e,Bb),ye.some(!0)},useTabstopAt:function(e){return!_w.isPseudoStop(e)&&("button"!==Lo(e)||"disabled"!==xi(e,"disabled"))}}),NE.config({channel:VA,updateState:function(e,t){return ye.some(t)},initialData:i}),am.config({}),im("execute-on-form",d.concat([Jo(mr(),(function(e,t){nm.focusIn(e)}))])),Ow.memory({})]),components:[h.asSpec(),p.asSpec(),b.asSpec()]}),w=ZA({getRoot:function(){return y},getFooter:function(){return b.get(y)},getBody:function(){return p.get(y)},getFormWrapper:function(){var e=p.get(y);return Od.getCurrent(e).getOr(e)}},f.redial,v),{dialog:y,instanceApi:w}),k=pa(km.sketch({lazySink:a.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:{},inlineBehaviours:ac(g([im("window-manager-inline-events",[Xo(Hr(),(function(e,t){Gr(S.dialog,Mb)}))])],(x=u,c?[]:[qO.config({contextual:{lazyContext:function(){return ye.some(du(gn.fromDom(x.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"],lazyViewport:function(){var e=gu(),t=vu(gn.fromDom(x.getContainer()),".tox-editor-header").getOrDie();t=mu(t),t=Math.max(e.y(),t.bottom());return fu(e.x(),t,e.width(),e.bottom()-t)}})])))}));return C.set(k),km.showWithin(k,t,va(S.dialog),ye.some(Uo())),c||(qO.refresh(k),u.on("ResizeEditor",s)),S.instanceApi.setData(o),nm.focusIn(S.dialog),S.instanceApi}),e)}var o,i,a=e.backstage,u=e.editor,c=Ev(u),s=(i=(o=e).backstage.shared,{open:function(e,t){function r(){sA.hide(u),t()}var a=Dm(uC({name:"close-alert",text:"OK",primary:!0,align:"end",disabled:!1,icon:ye.none()},"cancel",o.backstage)),u=pa(wD({lazySink:function(){return i.getSink()},headerOverride:ye.some(mD),partSpecs:{title:pD(),close:hD((function(){r()}),i.providers),body:vD(e,i.providers),footer:bD(yD([],[a.asSpec()]))},onCancel:r,onSubmit:n,extraClasses:["tox-alert-dialog"]}));sA.show(u),e=a.get(u);am.focus(e)}}),l=oT(e);return{open:function(e,t,n){return void 0!==t&&"toolbar"===t.inline?r(e,a.shared.anchors.toolbar(),n,t.ariaAttrs):void 0!==t&&"cursor"===t.inline?r(e,a.shared.anchors.cursor(),n,t.ariaAttrs):(o=n,zA.open((function(e,t,n){r={redial:zA.redial,closeWindow:function(){sA.hide(g.dialog),o(g.instanceApi)}},i=a,e=tD((n={dataValidator:n,initialData:t,internalDialog:e}).internalDialog.title,i),u=GA({body:n.internalDialog.body},i),c=oD(n.internalDialog.buttons),s=iD(c),c=JA({buttons:c},i),l=YA.initDialog((function(){return m}),nD((function(){return d}),r)),f="normal"!==n.internalDialog.size?"large"===n.internalDialog.size?["tox-dialog--width-lg"]:["tox-dialog--width-md"]:[],e={header:e,body:u,footer:ye.some(c),extraClasses:f,extraBehaviours:[],extraStyles:{}},d=rD(e,n,l,i),m=ZA({getRoot:function(){return d},getBody:function(){return sA.getBody(d)},getFooter:function(){return sA.getFooter(d)},getFormWrapper:function(){var e=sA.getBody(d);return Od.getCurrent(e).getOr(e)}},r.redial,s);var r,i,u,c,s,l,f,d,m,g={dialog:d,instanceApi:m};return sA.show(g.dialog),g.instanceApi.setData(t),g.instanceApi}),e));var o},openUrl:function(e,n){return r=n,zA.openUrl((function(e){o={closeWindow:function(){sA.hide(w.dialog),r(w.instanceApi)}},i=u,c=a,e=tD((n=e).title,c),s=XA(n),l=n.buttons.bind((function(e){return 0===e.length?ye.none():ye.some(JA({buttons:e},c))})),o=YA.initUrlDialog((function(){return y}),nD((function(){return b}),o)),f=d(d({},n.height.fold((function(){return{}}),(function(e){return{height:e+"px","max-height":e+"px"}}))),n.width.fold((function(){return{}}),(function(e){return{width:e+"px","max-width":e+"px"}}))),m=n.width.isNone()&&n.height.isNone()?["tox-dialog--width-lg"]:[],g=new aD(n.url,{base_uri:new aD(t.window.location.href)}),h=g.protocol+"://"+g.host+(g.port?":"+g.port:""),p=mn(ye.none()),v=[im("messages",[Zo((function(){var e=nv(gn.fromDom(t.window),"message",(function(e){g.isSameOrigin(new aD(e.raw().origin))&&(e=e.raw().data,sD(e)?fD(i,y,e):lD(e)&&n.onMessage(y,e))}));p.set(ye.some(e))})),Qo((function(){p.get().each((function(e){return e.unbind()}))}))]),fc.config({channels:((v={})[qA]={onReceive:function(e,t){vu(e.element(),"iframe").each((function(e){e.dom().contentWindow.postMessage(t,h)}))}},v)})],b=rD({header:e,body:s,footer:l,extraClasses:m,extraBehaviours:v,extraStyles:f},n,o,c),y=uD(b);var n,o,i,c,s,l,f,m,g,h,p,v,b,y,w={dialog:b,instanceApi:y};return sA.show(w.dialog),w.instanceApi}),e);var r},alert:function(e,t){s.open(e,(function(){t()}))},close:function(e){e.close()},confirm:function(e,t){l.open(e,(function(e){t(e)}))}}};f.add("silver",(function(e){var t=uA(e),n=t.uiMothership,r=t.backstage,i=t.renderUI;t=t.getUi,Qp(e,r.shared),e=xD({editor:e,backstage:r});return{renderUI:i,getWindowManagerImpl:o(e),getNotificationManagerImpl:function(){return Im(0,{backstage:r},n)},ui:t()}}))}(window)}).call(this,n("c8ba"))},"0335":function(e,t,n){n("0f58")},"07d1":function(e,t,n){n("94ce")},"07d7":function(e,t,n){n("a8b8")},"080b":function(e,t){!function(){"use strict";function e(){return'<img src="'+n.transparentSrc+'" class="'+i()+'" data-mce-resize="false" data-mce-placeholder />'}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.Env"),r=function(e){return e.getParam("pagebreak_separator","\x3c!-- pagebreak --\x3e")},o=function(e){return e.getParam("pagebreak_split_block",!1)},i=function(){return"mce-pagebreak"},a=function(t){var n=r(t),i=new RegExp(n.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,(function(e){return"\\"+e})),"gi");t.on("BeforeSetContent",(function(t){t.content=t.content.replace(i,e())})),t.on("PreInit",(function(){t.serializer.addNodeFilter("img",(function(e){for(var r,i,a=e.length;a--;)(i=(r=e[a]).attr("class"))&&-1!==i.indexOf("mce-pagebreak")&&(i=r.parent,t.schema.getBlockElements()[i.name]&&o(t)?(i.type=3,i.value=n,i.raw=!0,r.remove()):(r.type=3,r.value=n,r.raw=!0))}))}))},u=e,c=i,s=function(e){e.addCommand("mcePageBreak",(function(){e.settings.pagebreak_split_block?e.insertContent("<p>"+u()+"</p>"):e.insertContent(u())}))},l=function(e){e.on("ResolveName",(function(t){"IMG"===t.target.nodeName&&e.dom.hasClass(t.target,c())&&(t.name="pagebreak")}))},f=function(e){e.ui.registry.addButton("pagebreak",{icon:"page-break",tooltip:"Page break",onAction:function(){return e.execCommand("mcePageBreak")}}),e.ui.registry.addMenuItem("pagebreak",{text:"Page break",icon:"page-break",onAction:function(){return e.execCommand("mcePageBreak")}})};t.add("pagebreak",(function(e){s(e),f(e),a(e),l(e)}))}()},"0902":function(e,t,n){n("88b6")},"09cf":function(e,t){!function(e){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("textcolor",(function(){e.console.warn("Text color plugin is now built in to the core editor, please remove it from your editor configuration")}))}(window)},"0a9d":function(e,t,n){n("69a4")},"0efa":function(e,t,n){n("4bdc")},"0f58":function(e,t){!function(){"use strict";function e(){}function t(e){return function(){return e}}var n=tinymce.util.Tools.resolve("tinymce.PluginManager");function r(e,t){if((e=""+e).length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e}function o(e,t){return l.each(t,(function(t,n){"function"==typeof t&&(t=t(n)),e=e.replace(new RegExp("\\{\\$"+n+"\\}","g"),t)})),e}function i(e,t){var n=e.dom,r=d.getTemplateReplaceValues(e);l.each(n.select("*",t),(function(e){l.each(r,(function(t,o){n.hasClass(e,o)&&"function"==typeof r[o]&&r[o](e)}))}))}function a(e,t){return new RegExp("\\b"+t+"\\b","g").test(e.className)}function u(){return v}var c=t(!1),s=t(!0),l=tinymce.util.Tools.resolve("tinymce.util.Tools"),f=tinymce.util.Tools.resolve("tinymce.util.XHR"),d={getCreationDateClasses:function(e){return e.getParam("template_cdate_classes","cdate")},getModificationDateClasses:function(e){return e.getParam("template_mdate_classes","mdate")},getSelectedContentClasses:function(e){return e.getParam("template_selected_content_classes","selcontent")},getPreviewReplaceValues:function(e){return e.getParam("template_preview_replace_values")},getTemplateReplaceValues:function(e){return e.getParam("template_replace_values")},getTemplates:function(e){return e.templates},getCdateFormat:function(e){return e.getParam("template_cdate_format",e.translate("%Y-%m-%d"))},getMdateFormat:function(e){return e.getParam("template_mdate_format",e.translate("%Y-%m-%d"))}},m=function(e,t,n){var o="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),i="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),a="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),u="January February March April May June July August September October November December".split(" ");return n=n||new Date,(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+n.getFullYear())).replace("%y",""+n.getYear())).replace("%m",r(n.getMonth()+1,2))).replace("%d",r(n.getDate(),2))).replace("%H",""+r(n.getHours(),2))).replace("%M",""+r(n.getMinutes(),2))).replace("%S",""+r(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(u[n.getMonth()]))).replace("%b",""+e.translate(a[n.getMonth()]))).replace("%A",""+e.translate(i[n.getDay()]))).replace("%a",""+e.translate(o[n.getDay()]))).replace("%%","%")},g={createTemplateList:function(e,t){return function(){var n=d.getTemplates(e);"function"==typeof n?n(t):"string"==typeof n?f.send({url:n,success:function(e){t(JSON.parse(e))}}):t(n)}},replaceTemplateValues:o,replaceVals:i,insertTemplate:function(e,t,n){var r,u=e.dom,c=e.selection.getContent();n=o(n,d.getTemplateReplaceValues(e)),n=u.create("div",null,n),(r=u.select(".mceTmpl",n))&&0<r.length&&(n=u.create("div",null)).appendChild(r[0].cloneNode(!0)),l.each(u.select("*",n),(function(t){a(t,d.getCreationDateClasses(e).replace(/\s+/g,"|"))&&(t.innerHTML=m(e,d.getCdateFormat(e))),a(t,d.getModificationDateClasses(e).replace(/\s+/g,"|"))&&(t.innerHTML=m(e,d.getMdateFormat(e))),a(t,d.getSelectedContentClasses(e).replace(/\s+/g,"|"))&&(t.innerHTML=c)})),i(e,n),e.execCommand("mceInsertContent",!1,n.innerHTML),e.addVisual()}},h=function(e){e.addCommand("mceInsertTemplate",function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=t.concat(n);return e.apply(null,o)}}(g.insertTemplate,e))},p=function(e){e.on("PreProcess",(function(t){var n=e.dom,r=d.getMdateFormat(e);l.each(n.select("div",t.node),(function(t){n.hasClass(t,"mceTmpl")&&(l.each(n.select("*",t),(function(t){n.hasClass(t,e.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(t.innerHTML=m(e,r))})),g.replaceVals(e,t))}))}))},v=(T={fold:function(e,t){return e()},is:c,isSome:c,isNone:s,getOr:w,getOrThunk:y,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:t(null),getOrUndefined:t(void 0),or:w,orThunk:y,map:u,each:e,bind:u,exists:c,forall:s,filter:u,equals:b,equals_:b,toArray:function(){return[]},toString:t("none()")},Object.freeze&&Object.freeze(T),T);function b(e){return e.isNone()}function y(e){return e()}function w(e){return e}function x(e){function n(){return i}function r(t){return t(e)}var o=t(e),i={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:s,isNone:c,getOr:o,getOrThunk:o,getOrDie:o,getOrNull:o,getOrUndefined:o,or:n,orThunk:n,map:function(t){return x(t(e))},each:function(t){t(e)},bind:r,exists:r,forall:r,filter:function(t){return t(e)?i:v},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(c,(function(t){return n(e,t)}))}};return i}function C(e){return function(t){D.open(e,t)}}var S,k={some:x,none:u,from:function(e){return null==e?v:x(e)}},T=(S="function",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)===S}),E=(Array.prototype.slice,T(Array.from)&&Array.from,tinymce.util.Tools.resolve("tinymce.util.Promise")),O=Object.hasOwnProperty,N=function(e,t){return O.call(e,t)?k.from(e[t]):k.none()},A={'"':""","<":"<",">":">","&":"&","'":"'"},D={open:function(e,t){function n(e){for(var t=e,n=function(e){return{text:e.text,value:e.text}},r=t.length,o=new Array(r),i=0;i<r;i++){var a=t[i];o[i]=n(a,i)}return o}var r=function(e,t){for(var n=e,r=function(e){return e.text===t},o=0,i=n.length;o<i;o++){var a=n[o];if(r(a,o))return k.some(a)}return k.none()},o=function(e){return new E((function(t,n){e.value.url.fold((function(){return t(e.value.content.getOr(""))}),(function(e){return f.send({url:e,success:function(e){t(e)},error:function(e){n(e)}})}))}))};(t&&0!==t.length?k.from(l.map(t,(function(e,t){function n(e){return void 0!==e.url}return{selected:0===t,text:e.title,value:{url:n(e)?k.from(e.url):k.none(),content:n(e)?k.none():k.from(e.content),description:e.description}}}))):(t=e.translate("No templates defined."),e.notificationManager.open({text:t,type:"info"}),k.none())).each((function(t){function i(t,n,r){o=e,-1===(r=r).indexOf("<html>")&&(i="",l.each(o.contentCSS,(function(e){i+='<link type="text/css" rel="stylesheet" href="'+o.documentBaseURI.toAbsolute(e)+'">'})),-1!==(s=o.settings.body_class||"").indexOf("=")&&(s=(s=o.getParam("body_class","","hash"))[o.id]||""),c=o.dom.encode,f=(f=o.getBody().dir)?' dir="'+c(f)+'"':"",r="<!DOCTYPE html><html><head>"+i+'</head><body class="'+c(s)+'"'+f+">"+r+"</body></html>");var o,i,c=g.replaceTemplateValues(r,d.getPreviewReplaceValues(o)),s=[{type:"selectbox",name:"template",label:"Templates",items:a},{type:"htmlpanel",html:'<p aria-live="polite">'+n.value.description.replace(/["'<>&]/g,(function(e){return N(A,e).getOr(e)}))+"</p>"},{label:"Preview",type:"iframe",name:"preview",sandboxed:!1}],f={template:n.text,preview:c};t.unblock(),t.redial(u(s,f)),t.focus("template")}var a=n(t),u=function(n,a){return{title:"Insert Template",size:"large",body:{type:"panel",items:n},initialData:a,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(t){var n=t.getData();r(s,n.template).each((function(n){o(n).then((function(n){g.insertTemplate(e,!1,n),t.close()}))}))},onChange:(u=s=t,c=i,function(e,t){"template"===t.name&&(t=e.getData().template,r(u,t).each((function(t){e.block("Loading..."),o(t).then((function(n){c(e,t,n),e.unblock()}))})))})};var u,c,s},c=e.windowManager.open(u([],{template:"",preview:""}));c.block("Loading..."),o(t[0]).then((function(e){i(c,t[0],e)}))}))}},_=function(e){e.ui.registry.addButton("template",{icon:"template",tooltip:"Insert template",onAction:g.createTemplateList(e.settings,C(e))}),e.ui.registry.addMenuItem("template",{icon:"template",text:"Insert template...",onAction:g.createTemplateList(e.settings,C(e))})};n.add("template",(function(e){_(e),h(e),p(e)}))}()},"169f":function(e,t){!function(){"use strict";function e(e){return function(t){for(var n=0;n<t.length;n++)i(t[n])&&t[n].attr("contenteditable",e)}}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n={isValidId:function(e){return/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(e)},getId:function(e){var t=e.selection.getNode();return"A"===t.tagName&&""===e.dom.getAttrib(t,"href")?t.getAttribute("id")||t.getAttribute("name"):""},insert:function(e,t){var n=e.selection.getNode();"A"===n.tagName&&""===e.dom.getAttrib(n,"href")?(n.removeAttribute("name"),n.id=t,e.undoManager.add()):(e.focus(),e.selection.collapse(!0),e.execCommand("mceInsertContent",!1,e.dom.createHTML("a",{id:t})))}},r=function(e){var t=n.getId(e);e.windowManager.open({title:"Anchor",size:"normal",body:{type:"panel",items:[{name:"id",type:"input",label:"ID",placeholder:"example"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{id:t},onSubmit:function(t){var r,o;r=e,o=t.getData().id,(n.isValidId(o)?(n.insert(r,o),1):(r.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),0))&&t.close()}})},o=function(e){e.addCommand("mceAnchor",(function(){r(e)}))},i=function(e){return!e.attr("href")&&(e.attr("id")||e.attr("name"))&&!e.firstChild},a=function(t){t.on("PreInit",(function(){t.parser.addNodeFilter("a",e("false")),t.serializer.addNodeFilter("a",e(null))}))},u=function(e){e.ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:function(){return e.execCommand("mceAnchor")},onSetup:function(t){return e.selection.selectorChangedWithUnbind("a:not([href])",t.setActive).unbind}}),e.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:function(){return e.execCommand("mceAnchor")}})};t.add("anchor",(function(e){a(e),o(e),u(e)}))}()},2401:function(e,t){!function(e){"use strict";function t(){}function n(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return!e.apply(null,t)}}function r(){return c}var o=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(e){return function(){return e}},a=i(!1),u=i(!0),c=(ht={fold:function(e,t){return e()},is:a,isSome:a,isNone:u,getOr:f,getOrThunk:l,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(void 0),or:f,orThunk:l,map:r,each:t,bind:r,exists:a,forall:u,filter:r,equals:s,equals_:s,toArray:function(){return[]},toString:i("none()")},Object.freeze&&Object.freeze(ht),ht);function s(e){return e.isNone()}function l(e){return e()}function f(e){return e}function d(e){function t(){return o}function n(t){return t(e)}var r=i(e),o={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:u,isNone:a,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:t,orThunk:t,map:function(t){return d(t(e))},each:function(t){t(e)},bind:n,exists:n,forall:n,filter:function(t){return t(e)?o:c},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(a,(function(t){return n(e,t)}))}};return o}function m(e){return function(t){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}(t)===e}}function g(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}function h(e,t,n){return g(e,(function(e){n=t(n,e)})),n}function p(e){return 0===e.length?De():Ae(e[0])}function v(e){return 0===e.length?De():Ae(e[e.length-1])}function b(e,t,n){return 0!=(e.compareDocumentPosition(t)&n)}function y(e){function t(){return n}var n=e;return{get:t,set:function(e){n=e},clone:function(){return y(n)}}}function w(e,t){var n=We(e,t);return n?qe(r(1),r(2)):{major:0,minor:0};function r(e){return Number(t.replace(n,"$"+e))}}function x(){return qe(0,0)}function C(e){var t=e.current;return{current:t,version:e.version,isEdge:et(Xe,t),isChrome:et(Ye,t),isIE:et(Ke,t),isOpera:et(Je,t),isFirefox:et(Ze,t),isSafari:et(Qe,t)}}function S(e){var t=e.current;return{current:t,version:e.version,isWindows:lt(rt,t),isiOS:lt(ot,t),isAndroid:lt(it,t),isOSX:lt(ut,t),isLinux:lt(at,t),isSolaris:lt(ct,t),isFreeBSD:lt(st,t)}}function k(e,t){var n=String(t).toLowerCase();return Ve(e,(function(e){return e.search(n)}))}function T(e,t){return-1!==e.indexOf(t)}function E(e){return function(t){return T(t,e)}}function O(e){if(null==e)throw new Error("Node cannot be null or undefined");return{dom:i(e)}}function N(e,t){return e.dom()===t.dom()}function A(e,t,n){return e.isSome()&&t.isSome()?Ae(n(e.getOrDie(),t.getOrDie())):De()}function D(e){return _e(e.dom().parentNode).map(yt)}function _(e,t){return e=e.dom().childNodes,_e(e[t]).map(yt)}function R(e){return _(e,0)}function B(e){return _(e,e.dom().childNodes.length-1)}function M(e,t){D(e).each((function(n){n.dom().insertBefore(t.dom(),e.dom())}))}function P(e,t){e.dom().appendChild(t.dom())}function z(e,t){g(t,(function(t){P(e,t)}))}function I(e){null!==(e=e.dom()).parentNode&&e.parentNode.removeChild(e)}function L(e){return e&&"BR"===e.nodeName}function F(e){var t=e.selection.getStart(!0);return e.dom.getParent(t,"OL,UL,DL",Rt(e,t))}function H(e){var t=e.selection.getSelectedBlocks();return Dt.grep(function(e,t){return t=Dt.map(t,(function(t){var n=e.dom.getParent(t,"li,dd,dt",Rt(e,t));return n||t})),At.unique(t)}(e,t),(function(e){return _t.isListItemNode(e)}))}function V(e,t){var n,r,o,i,a=e.dom,u=e.schema.getBlockElements(),c=a.createFragment();if((o=e.settings.forced_root_block?e.settings.forced_root_block:o)&&((r=a.create(o)).tagName===e.settings.forced_root_block&&a.setAttribs(r,e.settings.forced_root_block_attrs),_t.isBlock(t.firstChild,u)||c.appendChild(r)),t)for(;n=t.firstChild;){var s=n.nodeName;i||"SPAN"===s&&"bookmark"===n.getAttribute("data-mce-type")||(i=!0),_t.isBlock(n,u)?(c.appendChild(n),r=null):o?(r||(r=a.create(o),c.appendChild(r)),r.appendChild(n)):c.appendChild(n)}return e.settings.forced_root_block?i||r.appendChild(a.create("br",{"data-mce-bogus":"1"})):c.appendChild(a.create("br")),c}function U(e){return e.dom().nodeName.toLowerCase()}function j(e){return e.dom().nodeType===Oe}function W(t,n){for(var r=t.dom(),o=n,i=function(t,n){var o=r;if(!(Re(t)||Me(t)||ze(t)))throw e.console.error("Invalid call to Attr.set. Key ",n,":: Value ",t,":: Element ",o),new Error("Attribute value was not simple");o.setAttribute(n,t+"")},a=Et(o),u=0,c=a.length;u<c;u++){var s=a[u];i(o[s],s)}}function q(e){return h(e.dom().attributes,(function(e,t){return e[t.name]=t.value,e}),{})}function $(t,n,r){if(!Re(r))throw e.console.error("Invalid call to CSS.set. Property ",n,":: Value ",r,":: Element ",t),new Error("CSS value must be a string: "+r);var o;void 0!==(o=t).style&&Pe(o.style.getPropertyValue)&&t.style.setProperty(n,r)}function G(e){return t=!0,yt(e.dom().cloneNode(t));var t}function X(e,t){t=function(e,t){return t=bt(t),e=q(e),W(t,e),t}(e,t);var n=(M(e,t),Ot(e));return z(t,n),I(e),t}function Y(e,t){P(e.item,t.list)}function K(e,t,n){for(var r=[],o=0;o<n;o++)r.push(function(e,t){return t={list:bt(t,e),item:bt("li",e)},P(t.list,t.item),t}(e,t.listType));return r}function J(e,t){for(var n=0;n<e.length-1;n++){r=void 0;var r=e[n].item,o="list-style-type",i="none";r=r.dom(),$(r,o,i)}v(e).each((function(e){W(e.list,t.listAttributes),W(e.item,t.itemAttributes),z(e.item,t.content)}))}function Z(e,t,n){return t=t.slice(0,n.depth),v(t).each((function(t){var r,o=function(e,t,n){return e=bt("li",e),W(e,t),z(e,n),e}(e,n.itemAttributes,n.content);o=o,P((r=t).list,o),r.item=o,r=n,U((o=t).list)!==r.listType&&(o.list=X(o.list,r.listType)),W(o.list,r.listAttributes)})),t}function Q(e,t,n){for(var r=e=K(e,n,n.depth-t.length),o=1;o<r.length;o++)Y(r[o-1],r[o]);return J(e,n),n=e,A(v(t),p(n),Y),t.concat(e)}function ee(e){return R(e).map(Ht).getOr(!1)}function te(e){return 0<e.depth}function ne(e){return e.isSelected}function re(e){var t=Ot(e);e=B(e).map(Ht).getOr(!1)?t.slice(0,-1):t;return Fe(e,G)}function oe(e){g(e,(function(t,n){(function(e,t){for(var n=e[t].depth,r=t-1;0<=r;r--){if(e[r].depth===n)return Ae(e[r]);if(e[r].depth<n)break}return De()})(e,n).each((function(e){var n;e=e,(n=t).listType=e.listType,n.listAttributes=Ut({},e.listAttributes)}))}))}function ie(t,n){return Fe(n,(function(n){n=n.content,r=(o||e.document).createDocumentFragment(),g(n,(function(e){r.appendChild(e.dom())}));var r,o=yt(r);return yt(V(t,o.dom()))}))}function ae(e,t){return oe(t),function(e,t){return t=h(t,(function(t,n){return(n.depth>t.length?Q:Z)(e,t,n)}),[]),p(t).map((function(e){return e.list}))}(e.contentDocument,t).toArray()}function ue(e,t){g(He(e,ne),(function(e){var n=e;switch(t){case"Indent":n.depth++;break;case"Outdent":n.depth--;break;case"Flatten":n.depth=0}}))}function ce(e){return e=Fe(zt(e),yt),A(Ve(e,n(ee)),Ve(function(e){return e=Ie.call(e,0),e.reverse(),e}(e),n(ee)),(function(e,t){return{start:e,end:t}}))}function se(e,t,n){t=t,r=ce(e),o=y(!1);var r,o;t=Fe(t,(function(e){return{sourceList:e,entries:Wt(0,r,o,e)}}));g(t,(function(t){ue(t.entries,n),r=e,i=t.entries;var r,o,i=Ue(function(e,t){if(0===e.length)return[];for(var n=t(e[0]),r=[],o=[],i=0,a=e.length;i<a;i++){var u=e[i],c=t(u);c!==n&&(r.push(o),o=[]),n=c,o.push(u)}return 0!==o.length&&r.push(o),r}(i,te),(function(e){return(p(e).map(te).getOr(!1)?ae:ie)(r,e)}));g(i,(function(t){Nt(e,"Indent"===n?"IndentList":"OutdentList",t.dom())})),o=t.sourceList,g(i,(function(e){M(o,e)})),I(t.sourceList)}))}function le(e){Ct(e,"dt")&&X(e,"dd")}function fe(e,t,n){g(n,"Indent"===t?le:function(t){var n,r;n=e,Ct(r=t,"dd")?X(r,"dt"):Ct(r,"dt")&&D(r).each((function(e){return $t(n,e.dom(),r.dom())}))})}function de(e,t){if(_t.isTextNode(e))return{container:e,offset:t};var n=St.getNode(e,t);return _t.isTextNode(n)?{container:n,offset:t>=e.childNodes.length?n.data.length:0}:n.previousSibling&&_t.isTextNode(n.previousSibling)?{container:n.previousSibling,offset:n.previousSibling.data.length}:n.nextSibling&&_t.isTextNode(n.nextSibling)?{container:n.nextSibling,offset:0}:{container:e,offset:t}}function me(e,t){Dt.each(t,(function(t,n){e.setAttribute(n,t)}))}function ge(e,t,n,r){var o=t[n?"startContainer":"endContainer"];t=t[n?"startOffset":"endOffset"];for(1===o.nodeType&&(o=o.childNodes[Math.min(t,o.childNodes.length-1)]||o),!n&&_t.isBr(o.nextSibling)&&(o=o.nextSibling);o.parentNode!==r;){if(_t.isTextBlock(e,o))return o;if(/^(TD|TH)$/.test(o.parentNode.nodeName))return o;o=o.parentNode}return o}function he(e,t,n){return an(t,n)&&un(e,t,n)&&cn(t,n)}function pe(e,t){var n,r=t.parentNode;"LI"===r.nodeName&&r.firstChild===t&&((n=r.previousSibling)&&"LI"===n.nodeName?(n.appendChild(t),_t.isEmpty(e,r)&&gn.remove(r)):gn.setStyle(r,"listStyleType","none")),_t.isListNode(r)&&(n=r.previousSibling)&&"LI"===n.nodeName&&n.appendChild(t)}function ve(e,t,n,r){var o=t.startContainer;t=t.startOffset;if(_t.isTextNode(o)&&(n?t<o.data.length:0<t))return o;var i=e.schema.getNonEmptyElements(),a=(1===o.nodeType&&(o=St.getNode(o,t)),new kt(o,r));for(n&&_t.isBogusBr(e.dom,o)&&a.next();o=a[n?"next":"prev2"]();){if("LI"===o.nodeName&&!o.hasChildNodes())return o;if(i[o.nodeName])return o;if(_t.isTextNode(o)&&0<o.data.length)return o}}function be(e,t){return 1===(t=t.childNodes).length&&!_t.isListNode(t[0])&&e.isBlock(t[0])}function ye(e,t,n){var r,o,i=be(e,n)?n.firstChild:n;if(be(n=e,o=t)&&n.remove(o.firstChild,!0),!_t.isEmpty(e,t,!0))for(;r=t.firstChild;)i.appendChild(r)}function we(e,t,n){var r,o=t.parentNode;_t.isChildOfBody(e,t)&&_t.isChildOfBody(e,n)&&(_t.isListNode(n.lastChild)&&(r=n.lastChild),o===n.lastChild&&_t.isBr(o.previousSibling)&&e.remove(o.previousSibling),(o=n.lastChild)&&_t.isBr(o)&&t.hasChildNodes()&&e.remove(o),_t.isEmpty(e,n,!0)&&e.$(n).empty(),ye(e,t,n),r&&n.appendChild(r),o=xt(yt(n),yt(t))?e.getParents(t,_t.isListNode,n):[],e.remove(t),g(o,(function(t){_t.isEmpty(e,t)&&t!==e.getRoot()&&e.remove(t)})))}function xe(e,t,n,r){var o,i,a,u=e.dom;u.isEmpty(r)?(i=n,a=r,(o=e).dom.$(a).empty(),we(o.dom,i,a),o.selection.setCursorLocation(a)):(i=en.createBookmark(t),we(u,n,r),e.selection.setRng(en.resolveBookmark(i)))}function Ce(e,t){var n=e.dom,r=e.selection,o=r.getStart(),i=(o=It(e,o),n.getParent(r.getStart(),"LI",o));if(i){var a=i.parentNode;if(a===e.getBody()&&_t.isEmpty(n,a))return!0;var u=Gt(r.getRng()),c=n.getParent(ve(e,u,t,o),"LI",o);if(c&&c!==i)return e.undoManager.transact((function(){var n,r,o,a;t?xe(e,u,c,i):_t.isFirstChild(i)?Kt(e):(n=e,r=u,o=i,a=c,r=en.createBookmark(u),we(n.dom,o,a),o=en.resolveBookmark(r),n.selection.setRng(o))})),!0;if(!c&&!t&&0===u.startOffset&&0===u.endOffset)return e.undoManager.transact((function(){Jt(e)})),!0}return!1}function Se(e,t){var n=e.dom,r=e.selection.getStart(),o=It(e,r),i=n.getParent(r,n.isBlock,o);if(i&&n.isEmpty(i)){r=Gt(e.selection.getRng());var a=n.getParent(ve(e,r,t,o),"LI",o);if(a)return e.undoManager.transact((function(){var r=n,u=i,c=o;c=r.getParent(u.parentNode,r.isBlock,c),r.remove(u),c&&r.isEmpty(c)&&r.remove(c),mn(n,a.parentNode),e.selection.select(a,!0),e.selection.collapse(t)})),!0}return!1}function ke(e,t){return e.selection.isCollapsed()?pn(e,t):vn(e)}function Te(e,t){return function(){var n=e.dom.getParent(e.selection.getStart(),"UL,OL,DL");return n&&n.nodeName===t}}function Ee(e,t){return function(n){function r(e){var r=-1!==(r=kn(e.parents,_t.isTableCellNode))?e.parents.slice(0,r):e.parents;e=Dt.grep(r,_t.isListNode);n.setActive(0<e.length&&e[0].nodeName===t&&!tn(e[0]))}return e.on("NodeChange",r),function(){return e.off("NodeChange",r)}}}var Oe,Ne,Ae=d,De=r,_e=function(e){return null==e?c:d(e)},Re=m("string"),Be=m("array"),Me=m("boolean"),Pe=m("function"),ze=m("number"),Ie=Array.prototype.slice,Le=Array.prototype.push,Fe=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},He=function(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},Ve=function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n))return Ae(o)}return De()},Ue=function(e,t){for(var n=Fe(e,t),r=[],o=0,i=n.length;o<i;++o){if(!Be(n[o]))throw new Error("Arr.flatten item "+o+" was not an array, input: "+n);Le.apply(r,n[o])}return r},je=(Pe(Array.from)&&Array.from,function(t,n){return b(t,n,e.Node.DOCUMENT_POSITION_CONTAINED_BY)}),We=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}},qe=function(e,t){return{major:e,minor:t}},$e=function(e,t){return t=String(t).toLowerCase(),0===e.length?x():w(e,t)},Ge=x,Xe="Edge",Ye="Chrome",Ke="IE",Je="Opera",Ze="Firefox",Qe="Safari",et=function(e,t){return function(){return t===e}},tt=function(){return C({current:void 0,version:Ge()})},nt=C,rt=(i(Xe),i(Ye),i(Ke),i(Je),i(Ze),i(Qe),"Windows"),ot="iOS",it="Android",at="Linux",ut="OSX",ct="Solaris",st="FreeBSD",lt=function(e,t){return function(){return t===e}},ft=function(){return S({current:void 0,version:Ge()})},dt=S,mt=(i(rt),i(ot),i(it),i(at),i(ut),i(ct),i(st),function(e,t){return k(e,t).map((function(e){var n=$e(e.versionRegexes,t);return{current:e.name,version:n}}))}),gt=function(e,t){return k(e,t).map((function(e){var n=$e(e.versionRegexes,t);return{current:e.name,version:n}}))},ht=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,pt=(ht=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return T(e,"edge/")&&T(e,"chrome")&&T(e,"safari")&&T(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,ht],search:function(e){return T(e,"chrome")&&!T(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return T(e,"msie")||T(e,"trident")}},{name:"Opera",versionRegexes:[ht,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:E("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:E("firefox")},{name:"Safari",versionRegexes:[ht,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(T(e,"safari")||T(e,"mobile/"))&&T(e,"applewebkit")}}],[{name:"Windows",search:E("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return T(e,"iphone")||T(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:E("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:E("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:E("linux"),versionRegexes:[]},{name:"Solaris",search:E("sunos"),versionRegexes:[]},{name:"FreeBSD",search:E("freebsd"),versionRegexes:[]}]),vt={browsers:i(ht),oses:i(pt)},bt=(ht=y(function(e,t){var n,r,o,a,u,c=vt.browsers(),s=vt.oses(),l=(c=mt(c,e).fold(tt,nt),s=gt(s,e).fold(ft,dt),r=c,e=e,t=t,l=(n=s).isiOS()&&!0===/ipad/i.test(e),o=n.isiOS()&&!l,a=n.isiOS()||n.isAndroid(),u=a||t("(pointer:coarse)"),t=l||!o&&a&&t("(min-device-width:768px)"),a=o||a&&!t,r=r.isSafari()&&n.isiOS()&&!1===/safari/i.test(e),e=!a&&!t&&!r,{isiPad:i(l),isiPhone:i(o),isTablet:i(t),isPhone:i(a),isTouch:i(u),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:i(r),isDesktop:i(e)});return{browser:c,os:s,deviceType:l}}(e.navigator.userAgent,(function(t){return e.window.matchMedia(t).matches}))),function(t,n){return n=(n||e.document).createElement(t),O(n)}),yt=O,wt=(pt=(e.Node.ATTRIBUTE_NODE,e.Node.CDATA_SECTION_NODE,e.Node.COMMENT_NODE,e.Node.DOCUMENT_NODE,e.Node.DOCUMENT_TYPE_NODE,e.Node.DOCUMENT_FRAGMENT_NODE,e.Node.ELEMENT_NODE),e.Node.TEXT_NODE,e.Node.PROCESSING_INSTRUCTION_NODE,e.Node.ENTITY_REFERENCE_NODE,e.Node.ENTITY_NODE,e.Node.NOTATION_NODE,pt),xt=ht.get().browser.isIE()?function(e,t){return je(e.dom(),t.dom())}:function(e,t){return e=e.dom(),t=t.dom(),e!==t&&e.contains(t)},Ct=function(e,t){if(e=e.dom(),e.nodeType!==wt)return!1;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},St=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),kt=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),Tt=tinymce.util.Tools.resolve("tinymce.util.VK"),Et=Object.keys,Ot=function(e){return Fe(e.dom().childNodes,yt)},Nt=(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}("element","offset"),function(e,t,n){return e.fire("ListMutation",{action:t,element:n})}),At=(void 0!==e.window?e.window:Function("return this;")(),tinymce.util.Tools.resolve("tinymce.dom.DomQuery")),Dt=tinymce.util.Tools.resolve("tinymce.util.Tools"),_t={isTextNode:function(e){return e&&3===e.nodeType},isListNode:function(e){return e&&/^(OL|UL|DL)$/.test(e.nodeName)},isOlUlNode:function(e){return e&&/^(OL|UL)$/.test(e.nodeName)},isDlItemNode:function(e){return e&&/^(DT|DD)$/.test(e.nodeName)},isListItemNode:function(e){return e&&/^(LI|DT|DD)$/.test(e.nodeName)},isTableCellNode:function(e){return e&&/^(TH|TD)$/.test(e.nodeName)},isBr:L,isFirstChild:function(e){return e.parentNode.firstChild===e},isLastChild:function(e){return e.parentNode.lastChild===e},isTextBlock:function(e,t){return t&&!!e.schema.getTextBlockElements()[t.nodeName]},isBlock:function(e,t){return e&&e.nodeName in t},isBogusBr:function(e,t){return!!L(t)&&!(!e.isBlock(t.nextSibling)||L(t.previousSibling))},isEmpty:function(e,t,n){var r=e.isEmpty(t);return!(n&&0<e.select("span[data-mce-type=bookmark]",t).length)&&r},isChildOfBody:function(e,t){return e.isChildOf(t,e.getRoot())}},Rt=function(e,t){return t=e.dom.getParents(t,"TD,TH"),0<t.length?t[0]:e.getBody()},Bt=function(e,t){return e=e.dom.getParents(t,"ol,ul",Rt(e,t)),v(e)},Mt=F,Pt=function(e){var t,n,r=F(e);e=e.selection.getSelectedBlocks();return n=e,(t=r)&&1===n.length&&n[0]===t?Dt.grep(r.querySelectorAll("ol,ul,dl"),(function(e){return _t.isListNode(e)})):Dt.grep(e,(function(e){return _t.isListNode(e)&&r!==e}))},zt=H,It=Rt,Lt=function(e){return He(H(e),_t.isDlItemNode)},Ft=function(e){r=Bt(n=e,n.selection.getStart()),n=He(n.selection.getSelectedBlocks(),_t.isOlUlNode);var t,n,r=r.toArray().concat(n);return t=e,n=Fe(r,(function(e){return Bt(t,e).getOr(e)})),At.unique(n)},Ht=(Oe=pt,function(e){return Ct(e,"OL,UL")}),Vt=Object.prototype.hasOwnProperty,Ut=(Ne=function(e,t){return t},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,i=e[r];for(o in i)Vt.call(i,o)&&(n[o]=Ne(n[o],i[o]))}return n}),jt=function(e,t,n,r){return R(r).filter(Ht).fold((function(){t.each((function(e){N(e.start,r)&&n.set(!0)})),o=r,i=e,a=n.get();var o,i,a,u=D(o).filter(j).map((function(e){return{depth:i,isSelected:a,content:re(o),itemAttributes:q(o),listAttributes:q(e),listType:U(e)}})),c=(t.each((function(e){N(e.end,r)&&n.set(!1)})),B(r).filter(Ht).map((function(r){return Wt(e,t,n,r)})).getOr([]));return u.toArray().concat(c)}),(function(r){return Wt(e,t,n,r)}))},Wt=function(e,t,n,r){return Ue(Ot(r),(function(r){return(Ht(r)?Wt:jt)(e+1,t,n,r)}))},qt=(ht=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),ht.DOM),$t=function(e,t,n){var r,o,i=qt.select('span[data-mce-type="bookmark"]',t),a=V(e,n),u=qt.createRng();for(u.setStartAfter(n),u.setEndAfter(t),r=(u=u.extractContents()).firstChild;r;r=r.firstChild)if("LI"===r.nodeName&&e.dom.isEmpty(r)){qt.remove(r);break}e.dom.isEmpty(u)||qt.insertAfter(u,t),qt.insertAfter(a,t),_t.isEmpty(e.dom,n.parentNode)&&(o=n.parentNode,Dt.each(i,(function(e){o.parentNode.insertBefore(e,n.parentNode)})),qt.remove(o)),qt.remove(n),_t.isEmpty(e.dom,t)&&qt.remove(t)},Gt=function(e){var t=e.cloneRange(),n=de(e.startContainer,e.startOffset);t.setStart(n.container,n.offset),n=de(e.endContainer,e.endOffset);return t.setEnd(n.container,n.offset),t},Xt=function(e,t){var n,r=Fe(Ft(e),yt),o=Fe(Lt(e),yt),i=!1;return(r.length||o.length)&&(n=e.selection.getBookmark(),se(e,r,t),fe(e,t,o),e.selection.moveToBookmark(n),e.selection.setRng(Gt(e.selection.getRng())),e.nodeChanged(),i=!0),i},Yt=function(e){return Xt(e,"Indent")},Kt=function(e){return Xt(e,"Outdent")},Jt=function(e){return Xt(e,"Flatten")},Zt=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"),Qt=ht.DOM,en={createBookmark:function(e){function t(t){var r,o=e[t?"startContainer":"endContainer"],i=e[t?"startOffset":"endOffset"];1===o.nodeType&&(r=Qt.create("span",{"data-mce-type":"bookmark"}),o.hasChildNodes()?(i=Math.min(i,o.childNodes.length-1),t?o.insertBefore(r,o.childNodes[i]):Qt.insertAfter(r,o.childNodes[i])):o.appendChild(r),o=r,i=0),n[t?"startContainer":"endContainer"]=o,n[t?"startOffset":"endOffset"]=i}var n={};return t(!0),e.collapsed||t(),n},resolveBookmark:function(e){function t(t){var n,r=n=e[t?"startContainer":"endContainer"],o=e[t?"startOffset":"endOffset"];r&&(1===r.nodeType&&(o=function(e){for(var t=e.parentNode.firstChild,n=0;t;){if(t===e)return n;1===t.nodeType&&"bookmark"===t.getAttribute("data-mce-type")||n++,t=t.nextSibling}return-1}(r),r=r.parentNode,Qt.remove(n),!r.hasChildNodes()&&Qt.isBlock(r)&&r.appendChild(Qt.create("br"))),e[t?"startContainer":"endContainer"]=r,e[t?"startOffset":"endOffset"]=o)}t(!0),t();var n=Qt.createRng();return n.setStart(e.startContainer,e.startOffset),e.endContainer&&n.setEnd(e.endContainer,e.endOffset),Gt(n)}},tn=function(e){return/\btox\-/.test(e.className)},nn=function(e){switch(e){case"UL":return"ToggleUlList";case"OL":return"ToggleOlList";case"DL":return"ToggleDLList"}},rn=function(e,t,n){var r,o=e,i=t,a=n;a=a["list-style-type"]||null,o.setStyle(i,"list-style-type",a),o=e,me(i=t,(r=n)["list-attributes"]),Dt.each(o.select("li",i),(function(e){me(e,r["list-item-attributes"])}))},on=function(e,t,n){void 0===n&&(n={});var r,o=e.selection.getRng(!0),i="LI",a=It(e,e.selection.getStart(!0)),u=e.dom;"false"!==u.getContentEditable(e.selection.getNode())&&("DL"===(t=t.toUpperCase())&&(i="DT"),r=en.createBookmark(o),Dt.each(function(e,t,n){for(var r,o=[],i=e.dom,a=ge(e,t,!0,n),u=ge(e,t,!1,n),c=[],s=a;s&&(c.push(s),s!==u);s=s.nextSibling);return Dt.each(c,(function(t){if(_t.isTextBlock(e,t))return o.push(t),void(r=null);if(i.isBlock(t)||_t.isBr(t))return _t.isBr(t)&&i.remove(t),void(r=null);var a=t.nextSibling;Zt.isBookmarkNode(t)&&(_t.isTextBlock(e,a)||!a&&t.parentNode===n)?r=null:(r||(r=i.create("p"),t.parentNode.insertBefore(r,t),o.push(r)),r.appendChild(t))})),o}(e,o,a),(function(r){var o,a,c,s=r.previousSibling;s&&_t.isListNode(s)&&s.nodeName===t&&function(e,t,n){return e=e.getStyle(t,"list-style-type"),t=n?n["list-style-type"]:"",e===(null===t?"":t)}(u,s,n)?(o=s,r=u.rename(r,i),s.appendChild(r)):(o=u.create(t),r.parentNode.insertBefore(o,r),o.appendChild(r),r=u.rename(r,i)),a=u,c=r,s=["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"],Dt.each(s,(function(e){var t;return a.setStyle(c,((t={})[e]="",t))})),rn(u,o,n),sn(e.dom,o)})),e.selection.setRng(en.resolveBookmark(r)))},an=function(e,t){return e&&t&&_t.isListNode(e)&&e.nodeName===t.nodeName},un=function(e,t,n){return e.getStyle(t,"list-style-type",!0)===e.getStyle(n,"list-style-type",!0)},cn=function(e,t){return e.className===t.className},sn=function(e,t){var n,r=t.nextSibling;if(he(e,t,r)){for(;n=r.firstChild;)t.appendChild(n);e.remove(r)}if(r=t.previousSibling,he(e,t,r)){for(;n=r.lastChild;)t.insertBefore(n,t.firstChild);e.remove(r)}},ln=function(e,t,n,r){var o;t.nodeName!==n?(o=e.dom.rename(t,n),rn(e.dom,o,r),Nt(e,nn(n),o)):(rn(e.dom,t,r),Nt(e,nn(n),t))},fn=function(e){return"list-style-type"in e},dn=function(e,t,n){var r,o,i,a,u,c=Mt(e),s=Pt(e);n=n||{},c&&0<s.length?(r=e,s=s,i=t,a=n,(o=c).nodeName!==i||fn(a)?(u=en.createBookmark(r.selection.getRng(!0)),Dt.each([o].concat(s),(function(e){ln(r,e,i,a)})),r.selection.setRng(en.resolveBookmark(u))):Jt(r)):(o=t,s=n,(u=c)!==(t=e).getBody()&&(u?u.nodeName!==o||fn(s)||tn(u)?(n=en.createBookmark(t.selection.getRng(!0)),rn(t.dom,u,s),c=t.dom.rename(u,o),sn(t.dom,c),t.selection.setRng(en.resolveBookmark(n)),Nt(t,nn(o),c)):Jt(t):(on(t,o,s),Nt(t,nn(o),u))))},mn=sn,gn=ht.DOM,hn=function(e,t){Dt.each(Dt.grep(e.select("ol,ul",t)),(function(t){pe(e,t)}))},pn=function(e,t){return Ce(e,t)||Se(e,t)},vn=function(e){var t=e.selection.getStart(),n=It(e,t);return!!(e.dom.getParent(t,"LI,DT,DD",n)||0<zt(e).length)&&(e.undoManager.transact((function(){e.execCommand("Delete"),hn(e.dom,e.getBody())})),!0)},bn=function(e){e.on("keydown",(function(t){t.keyCode===Tt.BACKSPACE?ke(e,!1)&&t.preventDefault():t.keyCode===Tt.DELETE&&ke(e,!0)&&t.preventDefault()}))},yn=ke,wn=function(e){return{backspaceDelete:function(t){yn(e,t)}}},xn=function(e){e.on("BeforeExecCommand",(function(t){t=t.command.toLowerCase(),"indent"===t?Yt(e):"outdent"===t&&Kt(e)})),e.addCommand("InsertUnorderedList",(function(t,n){dn(e,"UL",n)})),e.addCommand("InsertOrderedList",(function(t,n){dn(e,"OL",n)})),e.addCommand("InsertDefinitionList",(function(t,n){dn(e,"DL",n)})),e.addCommand("RemoveList",(function(){Jt(e)})),e.addQueryStateHandler("InsertUnorderedList",Te(e,"UL")),e.addQueryStateHandler("InsertOrderedList",Te(e,"OL")),e.addQueryStateHandler("InsertDefinitionList",Te(e,"DL"))},Cn=function(e){return e.getParam("lists_indent_on_tab",!0)},Sn=function(e){var t;Cn(e)&&(t=e).on("keydown",(function(e){e.keyCode!==Tt.TAB||Tt.metaKeyPressed(e)||t.undoManager.transact((function(){(e.shiftKey?Kt:Yt)(t)&&e.preventDefault()}))})),bn(e)},kn=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1},Tn=function(e){function t(t){return function(){return e.execCommand(t)}}!function(e,t){return e=e.settings.plugins||"",-1!==Dt.inArray(e.split(/[ ,]/),t)}(e,"advlist")&&(e.ui.registry.addToggleButton("numlist",{icon:"ordered-list",active:!1,tooltip:"Numbered list",onAction:t("InsertOrderedList"),onSetup:Ee(e,"OL")}),e.ui.registry.addToggleButton("bullist",{icon:"unordered-list",active:!1,tooltip:"Bullet list",onAction:t("InsertUnorderedList"),onSetup:Ee(e,"UL")}))};o.add("lists",(function(e){return Sn(e),Tn(e),xn(e),wn(e)}))}(window)},"24e8":function(e,t){!function(){"use strict";function e(e,t){return t<0&&(t=0),3===e.nodeType&&(e=e.data.length)<t?e:t}function t(t,n,r){1!==n.nodeType||n.hasChildNodes()?t.setStart(n,e(n,r)):t.setStartBefore(n)}function n(t,n,r){1!==n.nodeType||n.hasChildNodes()?t.setEnd(n,e(n,r)):t.setEndAfter(n)}var r=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.Env"),i=function(e){return e.getParam("autolink_pattern",/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i)},a=function(e){return e.getParam("default_link_target",!1)},u=function(e,r,o){var u,c,s,l,f,d,m=i(e),g=a(e);if("A"!==e.selection.getNode().tagName){if((u=e.selection.getRng(!0).cloneRange()).startOffset<5){if(!(d=u.endContainer.previousSibling)){if(!u.endContainer.firstChild||!u.endContainer.firstChild.nextSibling)return;d=u.endContainer.firstChild.nextSibling}if(l=d.length,t(u,d,l),n(u,d,l),u.endOffset<5)return;c=u.endOffset,s=d}else{if(3!==(s=u.endContainer).nodeType&&s.firstChild){for(;3!==s.nodeType&&s.firstChild;)s=s.firstChild;3===s.nodeType&&(t(u,s,0),n(u,s,s.nodeValue.length))}c=1===u.endOffset?2:u.endOffset-1-r}for(l=c;t(u,s,2<=c?c-2:0),n(u,s,1<=c?c-1:0),--c," "!==(f=u.toString())&&""!==f&&160!==f.charCodeAt(0)&&0<=c-2&&f!==o;);(d=u.toString())===o||" "===d||160===d.charCodeAt(0)?(t(u,s,c),n(u,s,l),c+=1):(0===u.startOffset?t(u,s,0):t(u,s,c),n(u,s,l)),"."===(r=u.toString()).charAt(r.length-1)&&n(u,s,l-1),(l=(r=u.toString().trim()).match(m))&&("www."===l[1]?l[1]="http://www.":/@$/.test(l[1])&&!/^mailto:/.test(l[1])&&(l[1]="mailto:"+l[1]),r=e.selection.getBookmark(),e.selection.setRng(u),e.execCommand("createlink",!1,l[1]+l[2]),!1!==g&&e.dom.setAttrib(e.selection.getNode(),"target",g),e.selection.moveToBookmark(r),e.nodeChanged())}},c=function(e){var t;e.on("keydown",(function(t){13===t.keyCode&&u(e,-1,"")})),o.browser.isIE()?e.on("focus",(function(){if(!t){t=!0;try{e.execCommand("AutoUrlDetect",!1,!0)}catch(t){}}})):(e.on("keypress",(function(t){41===t.keyCode&&u(e,-1,"(")})),e.on("keyup",(function(t){32===t.keyCode&&u(e,0,"")})))};r.add("autolink",(function(e){c(e)}))}()},2519:function(e,t){!function(){"use strict";var e=function(t){function n(){return r}var r=t;return{get:n,set:function(e){r=e},clone:function(){return e(r)}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(){return(n=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)},r=tinymce.util.Tools.resolve("tinymce.util.Tools");function o(e){return e&&1===e.nodeType&&"false"===e.contentEditable}function i(e,t){var n=[],o=r.toArray(e.getBody().getElementsByTagName("span"));if(o.length)for(var i=0;i<o.length;i++){var a=d(o[i]);null!==a&&a.length&&a===t.toString()&&n.push(o[i])}return n}function a(e,t,n,r,o){n=(n=n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")).replace(/\s/g,"[^\\S\\r\\n]"),n=o?"\\b"+n+"\\b":n;var i=m(e,t,new RegExp(n,r?"g":"gi"));return i&&(e=h(e,t,!0),t.set({index:e,count:i,text:n,matchCase:r,wholeWord:o})),i}function u(e,t,o,i,a){var u,c,s,l,f=t.get(),m=f.index,h=m;for(i=!1!==i,s=e.getBody(),c=r.grep(r.toArray(s.getElementsByTagName("span")),y),u=0;u<c.length;u++){var w=d(c[u]),x=l=parseInt(w,10);if(a||x===f.index){for(o.length?(c[u].firstChild.nodeValue=o,g(c[u])):p(e.dom,c[u]);c[++u];){if((x=parseInt(d(c[u]),10))!==l){u--;break}p(e.dom,c[u])}i&&h--}else m<l&&c[u].setAttribute("data-mce-index",String(l-1))}return t.set(n(n({},f),{count:a?0:f.count-1,index:h})),(i?v:b)(e,t),!a&&0<t.get().count}function c(e,t,o){for(var i,a,u=t.get(),c=r.toArray(e.getBody().getElementsByTagName("span")),s=0;s<c.length;s++){var l=d(c[s]);null!==l&&l.length&&(l===u.index.toString()&&(i=i||c[s].firstChild,a=c[s].firstChild),g(c[s]))}if(t.set(n(n({},u),{index:-1,count:0,text:""})),i&&a)return(t=e.dom.createRng()).setStart(i,0),t.setEnd(a,a.data.length),!1!==o&&e.selection.setRng(t),t}function s(e){return function(){return e}}function l(){return S}var f={findAndReplaceDOMText:function(e,t,n,r,i){var a,u,c,s,l,f,d,m,g=[],h=0;function p(e,t){if(t=t||0,!e[0])throw new Error("findAndReplaceDOMText cannot handle zero-length matches");var n=e.index;if(0<t){if(t=e[t],!t)throw new Error("Invalid capture group");n+=e[0].indexOf(t),e[0]=t}return[n,n+e[0].length,[e[0]]]}if(c=t.ownerDocument,s=i.getBlockElements(),l=i.getWhiteSpaceElements(),f=i.getShortEndedElements(),u=function e(t){var n;if(3===t.nodeType)return t.data;if(l[t.nodeName]&&!s[t.nodeName])return"";if(n="",o(t))return"\n";if((s[t.nodeName]||f[t.nodeName])&&(n+="\n"),t=t.firstChild)for(;n+=e(t),t=t.nextSibling;);return n}(t)){if(e.global)for(;a=e.exec(u);)g.push(p(a,r));else a=u.match(e),g.push(p(a,r));if(g.length){h=g.length;var v,b,y,w,x=t,C=g,S=(m="function"!=typeof(i=n)?(d=i.nodeType?i:c.createElement(i),function(e,t){var n=d.cloneNode(!1);return n.setAttribute("data-mce-index",t),e&&n.appendChild(c.createTextNode(e)),n}):i,function(e){var t,n=e.startNode,r=e.endNode,o=e.matchIndex;if(n===r)return t=(u=n).parentNode,0<e.startNodeIndex&&(i=c.createTextNode(u.data.substring(0,e.startNodeIndex)),t.insertBefore(i,u)),g=m(e.match[0],o),t.insertBefore(g,u),e.endNodeIndex<u.length&&(a=c.createTextNode(u.data.substring(e.endNodeIndex)),t.insertBefore(a,u)),u.parentNode.removeChild(u),g;for(var i=c.createTextNode(n.data.substring(0,e.startNodeIndex)),a=c.createTextNode(r.data.substring(e.endNodeIndex)),u=m(n.data.substring(e.startNodeIndex),o),s=0,l=e.innerNodes.length;s<l;++s){var f=e.innerNodes[s],d=m(f.data,o);f.parentNode.replaceChild(d,f)}var g=m(r.data.substring(0,e.endNodeIndex),o);return(t=n.parentNode).insertBefore(i,n),t.insertBefore(u,n),t.removeChild(n),(t=r.parentNode).insertBefore(g,r),t.insertBefore(a,r),t.removeChild(r),g}),k=[],T=0,E=x,O=C.shift(),N=0;e:for(;;){if((s[E.nodeName]||f[E.nodeName]||o(E))&&T++,3===E.nodeType&&(!b&&E.length+T>=O[1]?(b=E,w=O[1]-T):v&&k.push(E),!v&&E.length+T>O[0]&&(v=E,y=O[0]-T),T+=E.length),v&&b){if(E=S({startNode:v,startNodeIndex:y,endNode:b,endNodeIndex:w,innerNodes:k,match:O[2],matchIndex:N}),T-=b.length-w,b=v=null,k=[],N++,!(O=C.shift()))break}else if(l[E.nodeName]&&!s[E.nodeName]||!E.firstChild){if(E.nextSibling){E=E.nextSibling;continue}}else if(!o(E)){E=E.firstChild;continue}for(;;){if(E.nextSibling){E=E.nextSibling;break}if(E.parentNode===x)break e;E=E.parentNode}}}return h}}},d=function(e){return e=e.getAttribute("data-mce-index"),"number"==typeof e?""+e:e},m=function(e,t,n){var r,o=e.dom.create("span",{"data-mce-bogus":1});return o.className="mce-match-marker",r=e.getBody(),c(e,t,!1),f.findAndReplaceDOMText(n,r,o,!1,e.schema)},g=function(e){var t=e.parentNode;e.firstChild&&t.insertBefore(e.firstChild,e),e.parentNode.removeChild(e)},h=function(e,t,n){t=t.get();var r=t.index,o=e.dom;(n=!1!==n)?r+1===t.count?r=0:r++:r-1==-1?r=t.count-1:r--,o.removeClass(i(e,t.index),"mce-match-marker-selected"),n=i(e,r);return n.length?(o.addClass(i(e,r),"mce-match-marker-selected"),e.selection.scrollIntoView(n[0]),r):-1},p=function(e,t){var n=t.parentNode;e.remove(t),e.isEmpty(n)&&e.remove(n)},v=function(e,t){e=h(e,t,!0),t.set(n(n({},t.get()),{index:e}))},b=function(e,t){e=h(e,t,!1),t.set(n(n({},t.get()),{index:e}))},y=function(e){return e=d(e),null!==e&&0<e.length},w=function(e,t){return{done:function(n){return c(e,t,n)},find:function(n,r,o){return a(e,t,n,r,o)},next:function(){return v(e,t)},prev:function(){return b(e,t)},replace:function(n,r,o){return u(e,t,n,r,o)}}},x=s(!1),C=s(!0),S=(_={fold:function(e,t){return e()},is:x,isSome:x,isNone:C,getOr:E,getOrThunk:T,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:s(null),getOrUndefined:s(void 0),or:E,orThunk:T,map:l,each:function(){},bind:l,exists:x,forall:C,filter:l,equals:k,equals_:k,toArray:function(){return[]},toString:s("none()")},Object.freeze&&Object.freeze(_),_);function k(e){return e.isNone()}function T(e){return e()}function E(e){return e}function O(e){function t(){return o}function n(t){return t(e)}var r=s(e),o={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:C,isNone:x,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:t,orThunk:t,map:function(t){return O(t(e))},each:function(t){t(e)},bind:n,exists:n,forall:n,filter:function(t){return t(e)?o:S},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(x,(function(t){return n(e,t)}))}};return o}function N(e,t){return function(){R.open(e,t)}}var A,D={some:O,none:l,from:function(e){return null==e?S:O(e)}},_=(A="function",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)===A}),R=(Array.prototype.slice,_(Array.from)&&Array.from,{open:function(t,n){o=e(D.none());var o,i={clear:function(){o.set(D.none())},set:function(e){o.set(D.some(e))},isSet:function(){return o.get().isSome()},on:function(e){o.get().each(e)}},s=(t.undoManager.add(),r.trim(t.selection.getContent({format:"text"})));function l(e){(1<n.get().count?e.enable:e.disable)("next"),(1<n.get().count?e.enable:e.disable)("prev")}function f(e,t){t=t?e.disable:e.enable;for(var n=["replace","replaceall","prev","next"],r=t,o=0,i=n.length;o<i;o++)r(n[o],o)}function d(e){c(t,n,!1),f(e,!0),l(e)}function m(e){var r,o=e.getData(),i=n.get();o.findtext.length?(i.text===o.findtext&&i.matchCase===o.matchcase&&i.wholeWord===o.wholewords?v(t,n):((i=a(t,n,o.findtext,o.matchcase,o.wholewords))<=0&&(r=e,t.windowManager.alert("Could not find the specified string.",(function(){r.focus("findtext")}))),f(e,0===i)),l(e)):d(e)}var g=n.get();s={findtext:s,replacetext:"",wholewords:g.wholeWord,matchcase:g.matchCase};i.set(t.windowManager.open({title:"Find and Replace",size:"normal",body:{type:"panel",items:[{type:"bar",items:[{type:"input",name:"findtext",placeholder:"Find",maximized:!0,inputMode:"search"},{type:"button",name:"prev",text:"Previous",icon:"action-prev",disabled:!0,borderless:!0},{type:"button",name:"next",text:"Next",icon:"action-next",disabled:!0,borderless:!0}]},{type:"input",name:"replacetext",placeholder:"Replace with",inputMode:"search"}]},buttons:[{type:"menu",name:"options",icon:"preferences",tooltip:"Preferences",align:"start",items:[{type:"togglemenuitem",name:"matchcase",text:"Match case"},{type:"togglemenuitem",name:"wholewords",text:"Find whole words only"}]},{type:"custom",name:"find",text:"Find",primary:!0},{type:"custom",name:"replace",text:"Replace",disabled:!0},{type:"custom",name:"replaceall",text:"Replace All",disabled:!0}],initialData:s,onChange:function(e,t){"findtext"===t.name&&0<n.get().count&&d(e)},onAction:function(e,r){var o=e.getData();switch(r.name){case"find":m(e);break;case"replace":(u(t,n,o.replacetext)?l:d)(e);break;case"replaceall":u(t,n,o.replacetext,!0,!0),d(e);break;case"prev":b(t,n),l(e);break;case"next":v(t,n),l(e)}},onSubmit:m,onClose:function(){t.focus(),c(t,n),t.undoManager.add()}},{inline:"toolbar"}))}}),B=function(e,t){e.addCommand("SearchReplace",(function(){R.open(e,t)}))},M=function(e,t){e.ui.registry.addMenuItem("searchreplace",{text:"Find and replace...",shortcut:"Meta+F",onAction:N(e,t),icon:"search"}),e.ui.registry.addButton("searchreplace",{tooltip:"Find and replace",onAction:N(e,t),icon:"search"}),e.shortcuts.add("Meta+F","",N(e,t))};t.add("searchreplace",(function(t){var n=e({index:-1,count:0,text:"",matchCase:!1,wholeWord:!1});return B(t,n),M(t,n),w(t,n)}))}()},"2b07":function(e,t,n){n("dbbc")},"2d33":function(e,t,n){n("303c")},"2fec":function(e,t,n){n("24e8")},"303c":function(e,t){!function(e){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("colorpicker",(function(){e.console.warn("Color picker plugin is now built in to the core editor, please remove it from your editor configuration")}))}(window)},3154:function(e,t,n){n("f034")},"34de":function(e,t,n){n("09cf")},"365e":function(e,t,n){n("cf08")},3699:function(e,t){!function(){"use strict";function e(e){return function(){return e}}function t(){return a}var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=function(){return(r=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)},o=e(!1),i=e(!0),a=(A={fold:function(e,t){return e()},is:o,isSome:o,isNone:i,getOr:s,getOrThunk:c,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:e(null),getOrUndefined:e(void 0),or:s,orThunk:c,map:t,each:function(){},bind:t,exists:o,forall:i,filter:t,equals:u,equals_:u,toArray:function(){return[]},toString:e("none()")},Object.freeze&&Object.freeze(A),A);function u(e){return e.isNone()}function c(e){return e()}function s(e){return e}function l(t){function n(){return c}function r(e){return e(t)}var u=e(t),c={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:i,isNone:o,getOr:u,getOrThunk:u,getOrDie:u,getOrNull:u,getOrUndefined:u,or:n,orThunk:n,map:function(e){return l(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?c:a},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(o,(function(e){return n(t,e)}))}};return c}function f(e){return function(t){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}(t)===e}}function d(e){return function(t){return t?t.style[e].replace(/px$/,""):""}}function m(e){return function(t,n){t&&(t.style[e]=/^[0-9.]+$/.test(t=n)?t+"px":t)}}function g(e){return U.getAttrib(e,"data-ephox-embed-iri")}function h(e,t){for(var n=e.regex.exec(t),r=e.url,o=0;o<n.length;o++)!function(e){r=r.replace("$"+e,(function(){return n[e]||""}))}(o);return r.replace(/\?$/,"")}function p(e,t,n){return new W((function(r,o){function i(n){return n.html&&(ae[e.source1]=n),r({url:e.source1,html:n.html||t(e)})}ae[e.source1]?i(ae[e.source1]):n({url:e.source1},i,o)}))}function v(e){return function(t){return ie(e,t)}}function b(e){var t=M(e,{source1:e.source1.value,source2:z(e,"source2").bind((function(e){return z(e,"value")})).getOr(""),poster:z(e,"poster").bind((function(e){return z(e,"value")})).getOr("")});return z(e,"dimensions").each((function(e){_(["width","height"],(function(n){z(e,n).each((function(e){return t[n]=e}))}))})),t}function y(e,t){return function(n){var o,i;O(n.url)&&0<n.url.trim().length&&(o=n.html,i=le(t,o),i=r(r({},i),{source1:n.url,embed:o}),e.setData(ce(i)))}}function w(e,t){var n=t.name,r=new pe("img",1);return r.shortEnded=!0,C(e,t,r),r.attr({width:t.attr("width")||"300",height:t.attr("height")||("audio"===n?"30":"150"),style:t.attr("style"),src:ve.transparentSrc,"data-mce-object":n,class:"mce-object mce-object-"+n}),r}function x(e,t){var n=t.name,r=new pe("span",1);return r.attr({contentEditable:"false",style:t.attr("style"),"data-mce-object":n,class:"mce-preview-object mce-object-"+n}),C(e,t,r),(e=new pe(n,1)).attr({src:t.attr("src"),allowfullscreen:t.attr("allowfullscreen"),style:t.attr("style"),class:t.attr("class"),width:t.attr("width"),height:t.attr("height"),frameborder:"0"}),(n=new pe("span",1)).attr("class","mce-shim"),r.append(e),r.append(n),r}function C(e,t,n){for(var r,o,i=t.attributes,a=i.length;a--;)r=i[a].name,o=i[a].value,"width"!==r&&"height"!==r&&"style"!==r&&("data"!==r&&"src"!==r||(o=e.convertURL(o,r)),n.attr("data-mce-p-"+r,o));(t=t.firstChild&&t.firstChild.value)&&(n.attr("data-mce-html",escape(be.sanitize(e,t))),n.firstChild=null)}function S(e){for(;e=e.parent;)if(e.attr("data-ephox-embed-iri")||ye(e))return 1}var k,T=t,E=function(e){return null==e?a:l(e)},O=f("string"),N=f("array"),A=f("function"),D=(Array.prototype.slice,Array.prototype.push),_=function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)},R=(A(Array.from)&&Array.from,function(e){function t(){return n}var n=e;return{get:t,set:function(e){n=e},clone:function(){return R(n)}}}),B=Object.prototype.hasOwnProperty,M=(k=function(e,t){return t},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,i=e[r];for(o in i)B.call(i,o)&&(n[o]=k(n[o],i[o]))}return n}),P=Object.hasOwnProperty,z=function(e,t){return P.call(e,t)?E(e[t]):T()},I={getScripts:function(e){return e.getParam("media_scripts")},getAudioTemplateCallback:function(e){return e.getParam("audio_template_callback")},getVideoTemplateCallback:function(e){return e.getParam("video_template_callback")},hasLiveEmbeds:function(e){return e.getParam("media_live_embeds",!0)},shouldFilterHtml:function(e){return e.getParam("media_filter_html",!0)},getUrlResolver:function(e){return e.getParam("media_url_resolver")},hasAltSource:function(e){return e.getParam("media_alt_source",!0)},hasPoster:function(e){return e.getParam("media_poster",!0)},hasDimensions:function(e){return e.getParam("media_dimensions",!0)}},L=tinymce.util.Tools.resolve("tinymce.util.Tools"),F=tinymce.util.Tools.resolve("tinymce.html.SaxParser"),H=(A=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),{getMaxWidth:d("maxWidth"),getMaxHeight:d("maxHeight"),setMaxWidth:m("maxWidth"),setMaxHeight:m("maxHeight")}),V=function(e,t){if(e)for(var n=0;n<e.length;n++)if(-1!==t.indexOf(e[n].filter))return e[n]},U=A.DOM,j=function(e,t){var n,r,o;return function(e){return e=U.createFragment(e),""!==g(e.firstChild)}(t)?(r=t,r=U.createFragment(r).firstChild,{type:"ephox-embed-iri",source1:g(r),source2:"",poster:"",width:H.getMaxWidth(r),height:H.getMaxHeight(r)}):(n=e,r=t,F({validate:!(o={}),allow_conditional_comments:!0,start:function(e,t){if(o.source1||"param"!==e||(o.source1=t.map.movie),"iframe"!==e&&"object"!==e&&"embed"!==e&&"video"!==e&&"audio"!==e||(o.type||(o.type=e),o=L.extend(t.map,o)),"script"===e){var r=V(n,t.map.src);if(!r)return;o={type:"script",source1:t.map.src,width:String(r.width),height:String(r.height)}}"source"===e&&(o.source1?o.source2||(o.source2=t.map.src):o.source1=t.map.src),"img"!==e||o.poster||(o.poster=t.map.src)}}).parse(r),o.source1=o.source1||o.src||o.data,o.source2=o.source2||"",o.poster=o.poster||"",o)},W=tinymce.util.Tools.resolve("tinymce.util.Promise"),q={guess:function(e){return e={mp3:"audio/mpeg",m4a:"audio/x-m4a",wav:"audio/wav",mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",swf:"application/x-shockwave-flash"}[e.toLowerCase().split(".").pop()],e||""}},$=tinymce.util.Tools.resolve("tinymce.html.Writer"),G=tinymce.util.Tools.resolve("tinymce.html.Schema"),X=A.DOM,Y=function(e,t){var n,r,o,i;for(n in t)if(o=""+t[n],e.map[n])for(r=e.length;r--;)(i=e[r]).name===n&&(o?(e.map[n]=o,i.value=o):(delete e.map[n],e.splice(r,1)));else o&&(e.push({name:n,value:o}),e.map[n]=o)},K=function(e){var t=$();return F(t).parse(e),t.getContent()},J={updateHtml:function(e,t,n){var r,o,i,a,u,c,s;return function(e){return e=X.createFragment(e),""!==X.getAttrib(e.firstChild,"data-ephox-embed-iri")}(e)?(r=e,o=t,r=X.createFragment(r).firstChild,H.setMaxWidth(r,o.width),H.setMaxHeight(r,o.height),K(r.outerHTML)):(o=e,i=t,a=n,c=$(),F({validate:!1,allow_conditional_comments:!(s=0),comment:function(e){c.comment(e)},cdata:function(e){c.cdata(e)},text:function(e,t){c.text(e,t)},start:function(e,t,n){switch(e){case"video":case"object":case"embed":case"img":case"iframe":void 0!==i.height&&void 0!==i.width&&Y(t,{width:i.width,height:i.height})}if(a)switch(e){case"video":Y(t,{poster:i.poster,src:""}),i.source2&&Y(t,{src:""});break;case"iframe":Y(t,{src:i.source1});break;case"source":if(++s<=2&&(Y(t,{src:i["source"+s],type:i["source"+s+"mime"]}),!i["source"+s]))return;break;case"img":if(!i.poster)return;u=!0}c.start(e,t,n)},end:function(e){if("video"===e&&a)for(var t,n=1;n<=2;n++)i["source"+n]&&((t=[]).map={},s<n&&(Y(t,{src:i["source"+n],type:i["source"+n+"mime"]}),c.start("source",t,!0)));var r;i.poster&&"object"===e&&a&&!u&&((r=[]).map={},Y(r,{src:i.poster,width:i.width,height:i.height}),c.start("img",r,!0)),c.end(e)}},G({})).parse(o),c.getContent())}},Z=[{regex:/youtu\.be\/([\w\-_\?&=.]+)/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$2?$4",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowFullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$2?title=0&byline=0",allowFullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'//maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"//www.dailymotion.com/embed/video/$1",allowFullscreen:!0},{regex:/dai\.ly\/([^_]+)/,type:"iframe",w:480,h:270,url:"//www.dailymotion.com/embed/video/$1",allowFullscreen:!0}],Q=function(e){var t=Z.filter((function(t){return t.regex.test(e)}));return 0<t.length?L.extend({},t[0],{url:h(t[0],e)}):null},ee=function(e){var t=e.allowFullscreen?' allowFullscreen="1"':"";return'<iframe src="'+e.source1+'" width="'+e.width+'" height="'+e.height+'"'+t+"></iframe>"},te=function(e){var t='<object data="'+e.source1+'" width="'+e.width+'" height="'+e.height+'" type="application/x-shockwave-flash">';return e.poster&&(t+='<img src="'+e.poster+'" width="'+e.width+'" height="'+e.height+'" />'),t+"</object>"},ne=function(e,t){return t?t(e):'<audio controls="controls" src="'+e.source1+'">'+(e.source2?'\n<source src="'+e.source2+'"'+(e.source2mime?' type="'+e.source2mime+'"':"")+" />\n":"")+"</audio>"},re=function(e,t){return t?t(e):'<video width="'+e.width+'" height="'+e.height+'"'+(e.poster?' poster="'+e.poster+'"':"")+' controls="controls">\n<source src="'+e.source1+'"'+(e.source1mime?' type="'+e.source1mime+'"':"")+" />\n"+(e.source2?'<source src="'+e.source2+'"'+(e.source2mime?' type="'+e.source2mime+'"':"")+" />\n":"")+"</video>"},oe=function(e){return'<script src="'+e.source1+'"><\/script>'},ie=function(e,t){var n=L.extend({},t);if(!n.source1&&(L.extend(n,j(I.getScripts(e),n.embed)),!n.source1))return"";n.source2||(n.source2=""),n.poster||(n.poster=""),n.source1=e.convertURL(n.source1,"source"),n.source2=e.convertURL(n.source2,"source"),n.source1mime=q.guess(n.source1),n.source2mime=q.guess(n.source2),n.poster=e.convertURL(n.poster,"poster");var r;t=Q(n.source1);return t&&(n.source1=t.url,n.type=t.type,n.allowFullscreen=t.allowFullscreen,n.width=n.width||String(t.w),n.height=n.height||String(t.h)),n.embed?J.updateHtml(n.embed,n,!0):((t=V(I.getScripts(e),n.source1))&&(n.type="script",n.width=String(t.width),n.height=String(t.height)),t=I.getAudioTemplateCallback(e),r=I.getVideoTemplateCallback(e),n.width=n.width||"300",n.height=n.height||"150",L.each(n,(function(t,r){n[r]=e.dom.encode(""+t)})),"iframe"===n.type?ee(n):"application/x-shockwave-flash"===n.source1mime?te(n):-1!==n.source1mime.indexOf("audio")?ne(n,t):"script"===n.type?oe(n):re(n,r))},ae={},ue={getEmbedHtml:function(e,t){var n,r,o=I.getUrlResolver(e);return o?p(t,v(e),o):(n=t,r=v(e),new W((function(e){e({html:r(n),url:n.source1})})))},isCached:function(e){return ae.hasOwnProperty(e)}},ce=function(e){var t=M(e,{source1:{value:z(e,"source1").getOr("")},source2:{value:z(e,"source2").getOr("")},poster:{value:z(e,"poster").getOr("")}});return _(["width","height"],(function(n){z(e,n).each((function(e){var r=t.dimensions||{};r[n]=e,t.dimensions=r}))})),t},se=function(e){return function(t){t=t&&t.msg?"Media embed handler error: "+t.msg:"Media embed handler threw unknown error.",e.notificationManager.open({type:"error",text:t})}},le=function(e,t){return j(I.getScripts(e),t)},fe=function(e){return e.getAttribute("data-mce-object")||e.getAttribute("data-ephox-embed-iri")},de=function(e,t){for(var n=e.dom.select("img[data-mce-object]"),r=(t=(e.insertContent(t),e),n),o=t.dom.select("img[data-mce-object]"),i=0;i<r.length;i++)for(var a=o.length-1;0<=a;a--)r[i]===o[a]&&o.splice(a,1);t.selection.select(o[0]),e.nodeChanged()},me=function(e){function t(e){return b(e.getData())}i=(n=e).selection.getNode(),i=fe(i)?n.serializer.serialize(i,{selection:!0}):"";var n=M({embed:i},j(I.getScripts(n),i)),o=R(n),i=ce(n),a=(n={title:"General",name:"general",items:function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!N(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);D.apply(t,e[n])}return t}([[{name:"source1",type:"urlinput",filetype:"media",label:"Source"}],I.hasDimensions(e)?[{type:"sizeinput",name:"dimensions",label:"Constrain proportions",constrain:!0}]:[]])},{title:"Embed",items:[{type:"textarea",name:"embed",label:"Paste your embed code below:"}]}),u=[],c=(I.hasAltSource(e)&&u.push({name:"source2",type:"urlinput",filetype:"media",label:"Alternative source URL"}),I.hasPoster(e)&&u.push({name:"poster",type:"urlinput",filetype:"image",label:"Media poster (Image URL)"}),{title:"Advanced",name:"advanced",items:u});n=[n,a];0<u.length&&n.push(c);var s=e.windowManager.open({title:"Insert/Edit Media",size:"normal",body:{type:"tabpanel",tabs:n},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(n){var r,i,a=t(n);r=o.get(),i=e,(a=a).embed=J.updateHtml(a.embed,a),a.embed&&(r.source1===a.source1||ue.isCached(a.source1))?de(i,a.embed):ue.getEmbedHtml(i,a).then((function(e){de(i,e.html)})).catch(se(i)),n.close()},onChange:function(n,i){switch(i.name){case"source1":var a=o.get(),u=n;u=t(u),a.source1!==u.source1&&(y(s,e)({url:u.source1,html:""}),ue.getEmbedHtml(e,u).then(y(s,e)).catch(se(e)));break;case"embed":u=b((a=n).getData()),u=le(e,u.embed),a.setData(ce(u));break;case"dimensions":case"poster":l=t(c=n),f=ie(e,l),c.setData(ce(r(r({},l),{embed:f})))}var c,l,f;o.set(t(n))},initialData:i})},ge=function(e){return{showDialog:function(){me(e)}}},he=function(e){e.addCommand("mceMedia",(function(){me(e)}))},pe=tinymce.util.Tools.resolve("tinymce.html.Node"),ve=tinymce.util.Tools.resolve("tinymce.Env"),be={sanitize:function(e,t){if(!1===I.shouldFilterHtml(e))return t;var n,r=$();return F({validate:!1,allow_conditional_comments:!1,comment:function(e){r.comment(e)},cdata:function(e){r.cdata(e)},text:function(e,t){r.text(e,t)},start:function(t,o,i){if(n=!0,"script"!==t&&"noscript"!==t){for(var a=0;a<o.length;a++){if(0===o[a].name.indexOf("on"))return;"style"===o[a].name&&(o[a].value=e.dom.serializeStyle(e.dom.parseStyle(o[a].value),t))}r.start(t,o,i),n=!1}},end:function(e){n||r.end(e)}},G({})).parse(t),r.getContent()}},ye=function(e){return e=e.attr("class"),e&&/\btiny-pageembed\b/.test(e)},we=function(e){return function(t){for(var n,r,o=t.length;o--;)!(n=t[o]).parent||n.parent.attr("data-mce-object")||"script"===n.name&&!(r=V(I.getScripts(e),n.attr("src")))||(r&&(r.width&&n.attr("width",r.width.toString()),r.height&&n.attr("height",r.height.toString())),"iframe"===n.name&&I.hasLiveEmbeds(e)&&ve.ceFalse?S(n)||n.replace(x(e,n)):S(n)||n.replace(w(e,n)))}},xe=function(e){e.on("preInit",(function(){var t=e.schema.getSpecialElements(),n=(L.each("video audio iframe object".split(" "),(function(e){t[e]=new RegExp("</"+e+"[^>]*>","gi")})),e.schema.getBoolAttrs());L.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),(function(e){n[e]={}})),e.parser.addNodeFilter("iframe,video,audio,object,embed,script",we(e)),e.serializer.addAttributeFilter("data-mce-object",(function(t,n){for(var r,o,i,a,u,c,s=t.length;s--;)if((r=t[s]).parent){for(u=r.attr(n),o=new pe(u,1),"audio"!==u&&"script"!==u&&((c=r.attr("class"))&&-1!==c.indexOf("mce-preview-object")?o.attr({width:r.firstChild.attr("width"),height:r.firstChild.attr("height")}):o.attr({width:r.attr("width"),height:r.attr("height")})),o.attr({style:r.attr("style")}),i=(a=r.attributes).length;i--;){var l=a[i].name;0===l.indexOf("data-mce-p-")&&o.attr(l.substr(11),a[i].value)}"script"===u&&o.attr("type","text/javascript"),(c=r.attr("data-mce-html"))&&((u=new pe("#text",3)).raw=!0,u.value=be.sanitize(e,unescape(c)),o.append(u)),r.replace(o)}}))})),e.on("SetContent",(function(){e.$("span.mce-preview-object").each((function(t,n){n=e.$(n),0===n.find("span.mce-shim").length&&n.append('<span class="mce-shim"></span>')}))}))},Ce=function(e){e.on("ResolveName",(function(e){var t;1===e.target.nodeType&&(t=e.target.getAttribute("data-mce-object"))&&(e.name=t)}))},Se=function(e){e.on("click keyup touchend",(function(){var t=e.selection.getNode();t&&e.dom.hasClass(t,"mce-preview-object")&&e.dom.getAttrib(t,"data-mce-selected")&&t.setAttribute("data-mce-selected","2")})),e.on("ObjectSelected",(function(e){var t=e.target.getAttribute("data-mce-object");"audio"!==t&&"script"!==t||e.preventDefault()})),e.on("ObjectResized",(function(e){var t,n=e.target;n.getAttribute("data-mce-object")&&(t=n.getAttribute("data-mce-html"))&&(t=unescape(t),n.setAttribute("data-mce-html",escape(J.updateHtml(t,{width:String(e.width),height:String(e.height)}))))}))},ke=function(e){var t,n;e.ui.registry.addToggleButton("media",{tooltip:"Insert/edit media",icon:"embed",onAction:function(){e.execCommand("mceMedia")},onSetup:(t=e,n=["img[data-mce-object]","span[data-mce-object]","div[data-ephox-embed-iri]"],function(e){return t.selection.selectorChangedWithUnbind(n.join(","),e.setActive).unbind})}),e.ui.registry.addMenuItem("media",{icon:"embed",text:"Media...",onAction:function(){e.execCommand("mceMedia")}})};n.add("media",(function(e){return he(e),ke(e),Ce(e),xe(e),Se(e),ge(e)}))}()},"3ad8":function(e,t){!function(e){"use strict";var t=function(e){function n(){return r}var r=e;return{get:n,set:function(e){r=e},clone:function(){return t(r)}}},n=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=function(){return(r=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 o(){}function i(e){return function(){return e}}function a(e){return e}function u(){return l}var c=i(!1),s=i(!0),l=(W={fold:function(e,t){return e()},is:c,isSome:c,isNone:s,getOr:m,getOrThunk:d,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(void 0),or:m,orThunk:d,map:u,each:o,bind:u,exists:c,forall:s,filter:u,equals:f,equals_:f,toArray:function(){return[]},toString:i("none()")},Object.freeze&&Object.freeze(W),W);function f(e){return e.isNone()}function d(e){return e()}function m(e){return e}function g(e){function t(){return o}function n(t){return t(e)}var r=i(e),o={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:s,isNone:c,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:t,orThunk:t,map:function(t){return g(t(e))},each:function(t){t(e)},bind:n,exists:n,forall:n,filter:function(t){return t(e)?o:l},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(c,(function(t){return n(e,t)}))}};return o}function h(e){return function(t){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}(t)===e}}function p(e,t){return-1<G(e,t)}function v(e,t,n){for(var r=e,o=function(e){n=t(n,e)},i=r.length-1;0<=i;i--)o(r[i],i);return n}function b(e,t){return Q.call(e,t)}function y(e){return{is:function(t){return e===t},isValue:s,isError:c,getOr:i(e),getOrThunk:i(e),getOrDie:i(e),or:function(t){return y(e)},orThunk:function(t){return y(e)},fold:function(t,n){return n(e)},map:function(t){return y(t(e))},mapError:function(t){return y(e)},each:function(t){t(e)},bind:function(t){return t(e)},exists:function(t){return t(e)},forall:function(t){return t(e)},toOption:function(){return H.some(e)}}}function w(e){return{is:c,isValue:c,isError:s,getOr:a,getOrThunk:function(e){return e()},getOrDie:function(){throw t=String(e),new Error(t);var t},or:function(e){return e},orThunk:function(e){return e()},fold:function(t,n){return t(e)},map:function(t){return w(e)},mapError:function(t){return w(t(e))},each:o,bind:function(t){return w(e)},exists:c,forall:s,toOption:H.none}}function x(e){return"block-command"===e.type?{start:e.start,cmd:e.cmd,value:e.value}:"block-format"===e.type?{start:e.start,format:e.format}:"inline-command"===e.type?"mceInsertContent"===e.cmd&&""===e.start?{start:e.end,replacement:e.value}:{start:e.start,end:e.end,cmd:e.cmd,value:e.value}:"inline-format"===e.type?{start:e.start,end:e.end,format:1===e.format.length?e.format[0]:e.format}:void 0}function C(){return"\ufeff"}function S(e,t,n,r){void 0===r&&(r=!0);var o=t.startContainer.parentNode,i=t.endContainer.parentNode;t.deleteContents(),r&&!n(t.startContainer)&&(ve(t.startContainer)&&0===t.startContainer.data.length&&e.remove(t.startContainer),ve(t.endContainer)&&0===t.endContainer.data.length&&e.remove(t.endContainer),be(e,o,n),o!==i&&be(e,i,n))}function k(e,t){return t=t.get(e),j(t)&&(0===(e=t).length?H.none():H.some(e[0])).exists((function(e){return b(e,"block")}))}function T(e,t,n){if(!ve(e))return H.none();var r=e.textContent;return 0<=t&&t<=r.length?H.some(Ce(e,t)):Se(e,n).prev().bind((function(e){var r=e.textContent;return T(e,t+r.length,n)}))}function E(e,t,n){if(!ve(e))return H.none();var r=e.textContent;return t<=r.length?H.some(Ce(e,t)):Se(e,n).next().bind((function(e){return E(e,t-r.length,n)}))}function O(e,t,n,r,o,i){function a(){return i.fold(Te.aborted,Te.edge)}function u(){var n=o();return n?O(e,n,H.none(),r,o,H.some(t)):a()}var c,s;return s=t,(c=e).isBlock(s)||p(["BR","IMG","HR","INPUT"],s.nodeName)||"false"===c.getContentEditable(s)?a():ve(t)?(c=t.textContent,r(Ee,t,c,n).fold(Te.aborted,u,Te.success)):u()}function N(e,t,n){if(ve(t)&&(n<0||n>t.data.length))return[];for(var r=[n],o=t;o!==e&&o.parentNode;){for(var i=o.parentNode,a=0;a<i.childNodes.length;a++)if(i.childNodes[a]===o){r.push(a);break}o=i}return o===e?r.reverse():[]}function A(e,t){var n,r,o=(t=t.slice()).pop();return t=t,n=function(e,t){return e.bind((function(e){return H.from(e.childNodes[t])}))},r=H.some(e),Y(t,(function(e){r=n(r,e)})),r.bind((function(e){return ve(e)&&0<=o&&e.data.length,H.some({node:e,offset:o})}))}function D(t,n){return A(t,n.start).bind((function(r){var o=r.node,i=r.offset;return A(t,n.end).map((function(t){var n=t.node,r=(t=t.offset,e.document.createRange());return r.setStart(o,i),r.setEnd(n,t),r}))}))}function _(e,t,n){Se(t,t).next().each((function(r){E(r,n.start.length,t).each((function(n){var o=e.createRng();o.setStart(r,0),o.setEnd(n.element,n.offset),S(e,o,(function(e){return e===t}))}))}))}function R(e,t){return e.create("span",{"data-mce-type":"bookmark",id:t})}function B(e,t){return(e=e.createRng()).setStartAfter(t.start),e.setEndBefore(t.end),e}function M(e,t,n){var r=(n=D(e.getRoot(),n).getOrDie("Unable to resolve path range")).startContainer,o=n.endContainer;o=0===n.endOffset?o:o.splitText(n.endOffset),r=0===n.startOffset?r:r.splitText(n.startOffset);return{prefix:t,end:o.parentNode.insertBefore(R(e,t+"-end"),o),start:r.parentNode.insertBefore(R(e,t+"-start"),r)}}function P(e,t,n,r,o,i){var a;return void 0===i&&(i=!1),0!==t.start.length||i?ke(n,r,o).bind((function(n){var r,a,u;return function(e,t,n,r,o){return o=new pe(t,o),O(e,t,H.some(n),r,o.prev,H.none())}(e,n.element,n.offset,(r=e,a=o,u=t.start,function(e,t,n,o){if(t===a)return e.abort();o=n.substring(0,o.getOr(n.length));var i=o.lastIndexOf(u.charAt(u.length-1));n=o.lastIndexOf(u);return-1!==n?((o=r.createRng()).setStart(t,n),o.setEnd(t,n+u.length),e.finish(o)):-1!==i?T(t,i+1-u.length,a).fold((function(){return e.kontinue()}),(function(n){var o=r.createRng();return o.setStart(n.element,n.offset),o.setEnd(t,i+1),o.toString()===u?e.finish(o):e.kontinue()})):e.kontinue()}),o).fold(H.none,H.none,H.some).bind((function(e){if(i){if(e.endContainer===n.element&&e.endOffset===n.offset)return H.none();if(0===n.offset&&e.endContainer.textContent.length===e.endOffset)return H.none()}return H.some(e)}))})):((a=e.createRng()).setStart(n,r),a.setEnd(n,r),H.some(a))}function z(e,t,n){e.selection.setRng(n),"inline-format"===t.type?Y(t.format,(function(t){e.formatter.apply(t)})):e.execCommand(t.cmd,!1,t.value)}function I(e,t,n){var r=e.selection.getRng();return!1===r.collapsed?[]:xe(e,r).bind((function(o){var i=r.startOffset-(n?1:0);return Be(e,t,r.startContainer,i,o)})).fold((function(){return[]}),(function(e){return e.matches}))}function L(e,t){var n,r;0!==t.length&&(n=e.dom,r=e.selection.getBookmark(),t=ze(n,t),Y(t,(function(t){function r(e){return e===o}var o=n.getParent(t.startMarker.start,n.isBlock);ye(t.pattern)?Me(e,t.pattern,t.endMarker,r):Pe(e,t.pattern,t.startMarker,t.endMarker,r),_e(n,t.endMarker,r),_e(n,t.startMarker,r)})),e.selection.moveToBookmark(r))}function F(e,t,n){for(var r=0;r<e.length;r++)if(n(e[r],t))return!0}var H={some:g,none:u,from:function(e){return null==e?l:g(e)}},V=h("string"),U=h("object"),j=h("array"),W=h("function"),q=Array.prototype.slice,$=Array.prototype.indexOf,G=function(e,t){return $.call(e,t)},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=0,r=e.length;n<r;n++)t(e[n],n)},K=function(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},J=function(e,t){for(var n=0,r=e.length;n<r;++n)if(!0!==t(e[n],n))return!1;return!0},Z=(W(Array.from)&&Array.from,Object.keys),Q=Object.hasOwnProperty,ee=function(e,t){return b(e,t)?H.from(e[t]):H.none()},te=(W=function(t){if(!j(t))throw new Error("cases must be an array");if(0===t.length)throw new Error("there must be at least one case");var n=[],r={};return Y(t,(function(o,i){var a=Z(o);if(1!==a.length)throw new Error("one and only one name per case");var u=a[0],c=o[u];if(void 0!==r[u])throw new Error("duplicate key detected:"+u);if("cata"===u)throw new Error("cannot have a case named cata (sorry)");if(!j(c))throw new Error("case arguments must be an array");n.push(u),r[u]=function(){var r=arguments.length;if(r!==c.length)throw new Error("Wrong number of arguments to case "+u+". Expected "+c.length+" ("+c+"), got "+r);for(var o=new Array(r),a=0;a<o.length;a++)o[a]=arguments[a];return{fold:function(){if(arguments.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+arguments.length);return arguments[i].apply(null,o)},match:function(e){var t=Z(e);if(n.length!==t.length)throw new Error("Wrong number of arguments to match. Expected: "+n.join(",")+"\nActual: "+t.join(","));if(J(n,(function(e){return p(t,e)})))return e[u].apply(null,o);throw new Error("Not all branches were specified when using match. Specified: "+t.join(", ")+"\nRequired: "+n.join(", "))},log:function(t){e.console.log(t,{constructors:n,constructor:u,params:o})}}}})),r},W([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]),function(e){var t=[],n=[];return Y(e,(function(e){e.fold((function(e){t.push(e)}),(function(e){n.push(e)}))})),{errors:t,values:n}}),ne={value:y,error:w,fromOption:function(e,t){return e.fold((function(){return w(t)}),y)}},re=function(e){return"inline-command"===e.type||"inline-format"===e.type},oe=function(e){return"block-command"===e.type||"block-format"===e.type},ie=function(e){var t=function(e,t){return e.start.length===t.start.length?0:e.start.length>t.start.length?-1:1};return(e=q.call(e,0)).sort(t),e},ae=function(e){function t(t){return ne.error({message:t,pattern:e})}function n(n,r,o){if(void 0===e.format)return void 0!==e.cmd?V(e.cmd)?ne.value(o(e.cmd,e.value)):t(n+" pattern has non-string `cmd` parameter"):t(n+" pattern is missing both `format` and `cmd` parameters");if(o=void 0,j(e.format)){if(!J(e.format,V))return t(n+" pattern has non-string items in the `format` array");o=e.format}else{if(!V(e.format))return t(n+" pattern has non-string `format` parameter");o=[e.format]}return ne.value(r(o))}if(!U(e))return t("Raw pattern is not an object");if(!V(e.start))return t("Raw pattern is missing `start` parameter");if(void 0===e.end)return void 0!==e.replacement?V(e.replacement)?0===e.start.length?t("Replacement pattern has empty `start` parameter"):ne.value({type:"inline-command",start:"",end:e.start,cmd:"mceInsertContent",value:e.replacement}):t("Replacement pattern has non-string `replacement` parameter"):0===e.start.length?t("Block pattern has empty `start` parameter"):n("Block",(function(t){return{type:"block-format",start:e.start,format:t[0]}}),(function(t,n){return{type:"block-command",start:e.start,cmd:t,value:n}}));if(!V(e.end))return t("Inline pattern has non-string `end` parameter");if(0===e.start.length&&0===e.end.length)return t("Inline pattern has empty `start` and `end` parameters");var r=e.start,o=e.end;return 0===o.length&&(o=r,r=""),n("Inline",(function(e){return{type:"inline-format",start:r,end:o,format:e}}),(function(e,t){return{type:"inline-command",start:r,end:o,cmd:e,value:t}}))},ue=function(e){return{inlinePatterns:K(e,re),blockPatterns:ie(K(e,oe))}},ce=function(e){return{setPatterns:function(t){var n;t=te(X(t,ae));if(0<t.errors.length)throw n=t.errors[0],new Error(n.message+":\n"+JSON.stringify(n.pattern,null,2));e.set(ue(t.values))},getPatterns:function(){return function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}(X(e.get().inlinePatterns,x),X(e.get().blockPatterns,x))}}},se=void 0!==e.window?e.window:Function("return this;")(),le=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=se.console;n&&(n.error||n.log).apply(n,e)},fe=[{start:"*",end:"*",format:"italic"},{start:"**",end:"**",format:"bold"},{start:"#",format:"h1"},{start:"##",format:"h2"},{start:"###",format:"h3"},{start:"####",format:"h4"},{start:"#####",format:"h5"},{start:"######",format:"h6"},{start:"1. ",cmd:"InsertOrderedList"},{start:"* ",cmd:"InsertUnorderedList"},{start:"- ",cmd:"InsertUnorderedList"}],de=function(e){return e=e.getParam("forced_root_block","p"),!1===e?"":!0===e?"p":e},me=tinymce.util.Tools.resolve("tinymce.util.Delay"),ge=tinymce.util.Tools.resolve("tinymce.util.VK"),he=tinymce.util.Tools.resolve("tinymce.util.Tools"),pe=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),ve=function(t){return t.nodeType===e.Node.TEXT_NODE},be=function(e,t,n){var r;t&&e.isEmpty(t)&&!n(t)&&(r=t.parentNode,e.remove(t),be(e,r,n))},ye=function(e){return 0===e.start.length},we=function(e,t){for(var n=e,r=function(e){if(0===t.indexOf(e.start))return!b(e,"end")||!e.end||t.lastIndexOf(e.end)===t.length-e.end.length},o=0,i=n.length;o<i;o++){var a=n[o];if(r(a,o))return H.some(a)}return H.none()},xe=function(e,t){return t=H.from(e.dom.getParent(t.startContainer,e.dom.isBlock)),""===de(e)?t.orThunk((function(){return H.some(e.getBody())})):t},Ce=function(e,t){return{element:e,offset:t}},Se=function(t,n){function r(t){for(var n=o[t]();n&&n.nodeType!==e.Node.TEXT_NODE;)n=o[t]();return n&&n.nodeType===e.Node.TEXT_NODE?H.some(n):H.none()}var o=new pe(t,n);return{next:function(){return r("next")},prev:function(){return r("prev")},prev2:function(){return r("prev2")}}},ke=function(e,t,n){return ve(e)&&0<=t?H.some(Ce(e,t)):Se(e,n).prev().map((function(e){return Ce(e,e.data.length)}))},Te=W([{aborted:[]},{edge:["element"]},{success:["info"]}]),Ee=W([{abort:[]},{kontinue:[]},{finish:["info"]}]),Oe=function(e,t,n,r,o){return{start:N(e,t,n),end:N(e,r,o)}},Ne=function(e,t){var n=e.dom,r=t.pattern;n=D(n.getRoot(),t.range).getOrDie("Unable to resolve path range");return xe(e,n).each((function(t){"block-format"===r.type?k(r.format,e.formatter)&&e.undoManager.transact((function(){_(e.dom,t,r),e.formatter.apply(r.format)})):"block-command"===r.type&&e.undoManager.transact((function(){_(e.dom,t,r),e.execCommand(r.cmd,!1,r.value)}))})),!0},Ae=0,De=function(e,t){return n=t,t=(e=e).length-t.length,""===n||!(e.length<n.length)&&e.substr(t,t+n.length)===n;var n},_e=function(e,t,n){be(e,e.get(t.prefix+"-end"),n),be(e,e.get(t.prefix+"-start"),n)},Re=function(e,t,n){var r=e.dom,o=r.getRoot(),i=n.pattern,a=n.position.element,u=n.position.offset;return T(a,u-n.pattern.end.length,t).bind((function(c){var s,l,f=Oe(o,c.element,c.offset,a,u);return ye(i)?H.some({matches:[{pattern:i,startRng:f,endRng:f}],position:c}):(s=Be(e,n.remainingPatterns,c.element,c.offset,t),c=(l=s.getOr({matches:[],position:c})).position,P(r,i,c.element,c.offset,t,s.isNone()).map((function(e){var t=Oe(o,e.startContainer,e.startOffset,e.endContainer,e.endOffset);return{matches:l.matches.concat([{pattern:i,startRng:t,endRng:f}]),position:Ce(e.startContainer,e.startOffset)}})))}))},Be=function(e,t,n,r,o){var i=e.dom;return ke(n,r,i.getRoot()).bind((function(a){for(var u=i.createRng(),c=(u.setStart(o,0),u.setEnd(n,r),u.toString()),s=0;s<t.length;s++){var l=t[s];if(De(c,l.end)){var f=t.slice();l=(f.splice(s,1),Re(e,o,{pattern:l,remainingPatterns:f,position:a}));if(l.isSome())return l}}return H.none()}))},Me=function(e,t,n,r){n=B(e.dom,n),S(e.dom,n,r),z(e,t,n)},Pe=function(e,t,n,r,o){var i=e.dom,a=B(i,r),u=B(i,n);S(i,u,o),S(i,a,o),u={prefix:n.prefix,start:n.end,end:r.start},a=B(i,u);z(e,t,a)},ze=function(e,t){n="mce_textpattern",o=(new Date).getTime();var n,o,i=n+"_"+Math.floor(1e9*Math.random())+ ++Ae+String(o),a=v(t,(function(t,n){var o=M(e,i+"_end"+t.length,n.endRng);return t.concat([r(r({},n),{endMarker:o})])}),[]);return v(a,(function(t,n){var o=a.length-t.length-1;o=ye(n.pattern)?n.endMarker:M(e,i+"_start"+o,n.startRng);return t.concat([r(r({},n),{startMarker:o})])}),[])},Ie=function(e,t){if(!e.selection.isCollapsed())return!1;var n,r,o,i=I(e,t.inlinePatterns,!1),a=(n=e,r=t.blockPatterns,o=n.dom,t=n.selection.getRng(),xe(n,t).filter((function(e){var t=de(n);t=""===t&&o.is(e,"body")||o.is(e,t);return null!==e&&t})).bind((function(e){var t=e.textContent;return we(r,t).map((function(n){return he.trim(t).length===n.start.length?[]:[{pattern:n,range:Oe(o.getRoot(),e,0,e,0)}]}))})).getOr([]));return(0<a.length||0<i.length)&&(e.undoManager.add(),e.undoManager.extra((function(){e.execCommand("mceInsertNewLine")}),(function(){e.insertContent(C()),L(e,i),t=e,0!==(n=a).length&&(r=t.selection.getBookmark(),Y(n,(function(e){return Ne(t,e)})),t.selection.moveToBookmark(r));var t,n=e.selection.getRng(),r=ke(n.startContainer,n.startOffset,e.dom.getRoot());e.execCommand("mceInsertNewLine"),r.each((function(t){t.element.data.charAt(t.offset-1)===C()&&(t.element.deleteData(t.offset-1,1),be(e.dom,t.element.parentNode,(function(t){return t===e.dom.getRoot()})))}))})),!0)},Le=function(e,t){var n=I(e,t.inlinePatterns,!0);0<n.length&&e.undoManager.transact((function(){L(e,n)}))},Fe=function(e,t){return F(e,t,(function(e,t){return e.charCodeAt(0)===t.charCode}))},He=function(e,t){return F(e,t,(function(e,t){return e===t.keyCode&&!1===ge.modifierPressed(t)}))},Ve=function(e,t){var n=[",",".",";",":","!","?"],r=[32];e.on("keydown",(function(n){13!==n.keyCode||ge.modifierPressed(n)||Ie(e,t.get())&&n.preventDefault()}),!0),e.on("keyup",(function(n){He(r,n)&&Le(e,t.get())})),e.on("keypress",(function(r){Fe(n,r)&&me.setEditorTimeout(e,(function(){Le(e,t.get())}))}))};n.add("textpattern",(function(e){var n=t(function(e){return e=ee(e,"textpattern_patterns").getOr(fe),j(e)?(e=te(X(e,ae)),Y(e.errors,(function(e){return le(e.message,e.pattern)})),ue(e.values)):(le("The setting textpattern_patterns should be an array"),{inlinePatterns:[],blockPatterns:[]})}(e.settings));return Ve(e,n),ce(n)}))}(window)},"3aea":function(e,t,n){n("3699")},4237:function(e,t,n){n("be7f")},"43fc":function(e,t){!function(){"use strict";function e(e){return function(t){return-1!==(" "+t.attr("class")+" ").indexOf(e)}}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.util.Tools"),r={getNonEditableClass:function(e){return e.getParam("noneditable_noneditable_class","mceNonEditable")},getEditableClass:function(e){return e.getParam("noneditable_editable_class","mceEditable")},getNonEditableRegExps:function(e){return e=e.getParam("noneditable_regexp",[]),e&&e.constructor===RegExp?[e]:e}},o=function(e,t,n){return function(r){var o=arguments,i=o[o.length-2],a=0<i?t.charAt(i-1):"";return'"'===a||">"===a&&(a=t.lastIndexOf("<",i),-1!==a&&-1!==t.substring(a,i).indexOf('contenteditable="false"'))?r:'<span class="'+n+'" data-mce-content="'+e.dom.encode(o[0])+'">'+e.dom.encode("string"==typeof o[1]?o[1]:o[0])+"</span>"}},i=function(t){var i="contenteditable",a=" "+n.trim(r.getEditableClass(t))+" ",u=" "+n.trim(r.getNonEditableClass(t))+" ",c=e(a),s=e(u),l=r.getNonEditableRegExps(t);t.on("PreInit",(function(){0<l.length&&t.on("BeforeSetContent",(function(e){var n=t,i=l,a=i.length,u=e.content;if("raw"!==e.format){for(;a--;)u=u.replace(i[a],o(n,u,r.getNonEditableClass(n)));e.content=u}})),t.parser.addAttributeFilter("class",(function(e){for(var t,n=e.length;n--;)t=e[n],c(t)?t.attr(i,"true"):s(t)&&t.attr(i,"false")})),t.serializer.addAttributeFilter(i,(function(e){for(var t,n=e.length;n--;)t=e[n],(c(t)||s(t))&&(0<l.length&&t.attr("data-mce-content")?(t.name="#text",t.type=3,t.raw=!0,t.value=t.attr("data-mce-content")):t.attr(i,null))}))}))};t.add("noneditable",(function(e){i(e)}))}()},"4bd0":function(e,t,n){n("a376")},"4bdc":function(e,t){!function(){"use strict";function e(e,t){return function(n){function r(e){return n.setActive(e.state)}return n.setActive(t.get()),e.on("VisualBlocks",r),function(){return e.off("VisualBlocks",r)}}}var t=function(e){function n(){return r}var r=e;return{get:n,set:function(e){r=e},clone:function(){return t(r)}}},n=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=function(e,t){e.fire("VisualBlocks",{state:t})},o=function(e,t,n){e.dom.toggleClass(e.getBody(),"mce-visualblocks"),n.set(!n.get()),r(e,n.get())},i=function(e,t,n){e.addCommand("mceVisualBlocks",(function(){o(e,t,n)}))},a=function(e){return e.getParam("visualblocks_default_state",!1,"boolean")},u=function(e,t,n){e.on("PreviewFormats AfterPreviewFormats",(function(t){n.get()&&e.dom.toggleClass(e.getBody(),"mce-visualblocks","afterpreviewformats"===t.type)})),e.on("init",(function(){a(e)&&o(e,t,n)})),e.on("remove",(function(){e.dom.removeClass(e.getBody(),"mce-visualblocks")}))},c=function(t,n){t.ui.registry.addToggleButton("visualblocks",{icon:"visualblocks",tooltip:"Show blocks",onAction:function(){return t.execCommand("mceVisualBlocks")},onSetup:e(t,n)}),t.ui.registry.addToggleMenuItem("visualblocks",{text:"Show blocks",onAction:function(){return t.execCommand("mceVisualBlocks")},onSetup:e(t,n)})};n.add("visualblocks",(function(e,n){var r=t(!1);i(e,n,r),c(e,r),u(e,n,r)}))}()},"4ea8":function(e,t,n){n("cdd9")},"55a0":function(e,t,n){n("f962")},"5e4c":function(e,t){!function(e){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("contextmenu",(function(){e.console.warn("Context menu plugin is now built in to the core editor, please remove it from your editor configuration")}))}(window)},"62e5":function(e,t,n){n("2519")},"64d8":function(e,t,n){n("ef1f")},6957:function(e,t,n){n("75b8")},"69a4":function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.util.Tools"),n=function(e){return e.getParam("content_style","")},r=function(e){return e.getParam("content_css_cors",!1,"boolean")},o=tinymce.util.Tools.resolve("tinymce.Env"),i={getPreviewHtml:function(e){var i="",a=e.dom.encode,u=n(e),c=(i+='<base href="'+a(e.documentBaseURI.getURI())+'">',u&&(i+='<style type="text/css">'+u+"</style>"),r(e)?' crossorigin="anonymous"':""),s=(u=(t.each(e.contentCSS,(function(t){i+='<link type="text/css" rel="stylesheet" href="'+a(e.documentBaseURI.toAbsolute(t))+'"'+c+">"})),e.settings.body_id||"tinymce"),-1!==u.indexOf("=")&&(u=(u=e.getParam("body_id","","hash"))[e.id]||u),e.settings.body_class||"");-1!==s.indexOf("=")&&(s=(s=e.getParam("body_class","","hash"))[e.id]||"");var l='<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A" && !('+(o.mac?"e.metaKey":"e.ctrlKey && !e.altKey")+")) {e.preventDefault();}}}, false);<\/script> ",f=e.getBody().dir;f=f?' dir="'+a(f)+'"':"";return"<!DOCTYPE html><html><head>"+i+'</head><body id="'+a(u)+'" class="mce-content-body '+a(s)+'"'+f+">"+e.getContent()+l+"</body></html>"}},a=function(e){e.addCommand("mcePreview",(function(){var t,n;t=e,n=i.getPreviewHtml(t),t.windowManager.open({title:"Preview",size:"large",body:{type:"panel",items:[{name:"preview",type:"iframe",sandboxed:!0}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{preview:n}}).focus("close")}))},u=function(e){e.ui.registry.addButton("preview",{icon:"preview",tooltip:"Preview",onAction:function(){return e.execCommand("mcePreview")}}),e.ui.registry.addMenuItem("preview",{icon:"preview",text:"Preview",onAction:function(){return e.execCommand("mcePreview")}})};e.add("preview",(function(e){a(e),u(e)}))}()},"75b8":function(e,t){!function(){"use strict";function e(e,t){e.notificationManager.open({text:t,type:"error"})}function t(e){return function(t){function n(){t.setDisabled(i.enableWhenDirty(e)&&!e.isDirty())}return e.on("NodeChange dirty",n),function(){return e.off("NodeChange dirty",n)}}}var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),o=tinymce.util.Tools.resolve("tinymce.util.Tools"),i={enableWhenDirty:function(e){return e.getParam("save_enablewhendirty",!0)},hasOnSaveCallback:function(e){return!!e.getParam("save_onsavecallback")},hasOnCancelCallback:function(e){return!!e.getParam("save_oncancelcallback")}},a=function(t){var n=r.DOM.getParent(t.id,"form");if(!i.enableWhenDirty(t)||t.isDirty()){if(t.save(),i.hasOnSaveCallback(t))return t.execCallback("save_onsavecallback",t),void t.nodeChanged();n?(t.setDirty(!1),n.onsubmit&&!n.onsubmit()||("function"==typeof n.submit?n.submit():e(t,"Error: Form submit field collision.")),t.nodeChanged()):e(t,"Error: No form element found.")}},u=function(e){var t=o.trim(e.startContent);i.hasOnCancelCallback(e)?e.execCallback("save_oncancelcallback",e):e.resetContent(t)},c=function(e){e.addCommand("mceSave",(function(){a(e)})),e.addCommand("mceCancel",(function(){u(e)}))},s=function(e){e.ui.registry.addButton("save",{icon:"save",tooltip:"Save",disabled:!0,onAction:function(){return e.execCommand("mceSave")},onSetup:t(e)}),e.ui.registry.addButton("cancel",{icon:"cancel",tooltip:"Cancel",disabled:!0,onAction:function(){return e.execCommand("mceCancel")},onSetup:t(e)}),e.addShortcut("Meta+S","","mceSave")};n.add("save",(function(e){s(e),c(e)}))}()},"78e4":function(e,t,n){n("3ad8")},"7c4f":function(e,t,n){(function(e){!function(t){"use strict";function n(e){return function(){return e}}function r(){return m}var o=function(e){function t(){return n}var n=e;return{get:t,set:function(e){n=e},clone:function(){return o(n)}}},i=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=function(e){return!(!/(^|[ ,])powerpaste([, ]|$)/.test(e.settings.plugins)||!i.get("powerpaste"))&&(void 0!==t.window.console&&t.window.console.log&&t.window.console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."),!0)},u=function(e,t){return{clipboard:e,quirks:t}},c={firePastePreProcess:function(e,t,n,r){return e.fire("PastePreProcess",{content:t,internal:n,wordContent:r})},firePastePostProcess:function(e,t,n,r){return e.fire("PastePostProcess",{node:t,internal:n,wordContent:r})},firePastePlainTextToggle:function(e,t){return e.fire("PastePlainTextToggle",{state:t})},firePaste:function(e,t){return e.fire("paste",{ieFake:t})}},s=function(e,t){"text"===t.pasteFormat.get()?(t.pasteFormat.set("html"),c.firePastePlainTextToggle(e,!1)):(t.pasteFormat.set("text"),c.firePastePlainTextToggle(e,!0)),e.focus()},l=function(e,t){e.addCommand("mceTogglePlainTextPaste",(function(){s(e,t)})),e.addCommand("mceInsertClipboardContent",(function(e,n){n.content&&t.pasteHtml(n.content,n.internal),n.text&&t.pasteText(n.text)}))},f=n(!1),d=n(!0),m=(R={fold:function(e,t){return e()},is:f,isSome:f,isNone:d,getOr:p,getOrThunk:h,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:n(null),getOrUndefined:n(void 0),or:p,orThunk:h,map:r,each:function(){},bind:r,exists:f,forall:d,filter:r,equals:g,equals_:g,toArray:function(){return[]},toString:n("none()")},Object.freeze&&Object.freeze(R),R);function g(e){return e.isNone()}function h(e){return e()}function p(e){return e}function v(e){function t(){return i}function r(t){return t(e)}var o=n(e),i={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:d,isNone:f,getOr:o,getOrThunk:o,getOrDie:o,getOrNull:o,getOrUndefined:o,or:t,orThunk:t,map:function(t){return v(t(e))},each:function(t){t(e)},bind:r,exists:r,forall:r,filter:function(t){return t(e)?i:m},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(f,(function(t){return n(e,t)}))}};return i}function b(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}function y(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}function w(e){function n(e){r()?a(e):i.push(e)}function r(){return o.isSome()}var o=_(),i=[],a=function(e){o.each((function(n){t.setTimeout((function(){e(n)}),0)}))};return e((function(e){o=D(e),y(i,a),i=[]})),{get:n,map:function(e){return w((function(t){n((function(n){t(e(n))}))}))},isReady:r}}function x(e,t){return t((function(t){var n=[],r=0;0===e.length?t([]):y(e,(function(o,i){var a;o.get((a=i,function(o){n[a]=o,++r>=e.length&&t(n)}))}))}))}function C(e,t){return e=b(e,t),x(e,H)}function S(e){return e.replace(/\r?\n/g,"<br>")}function k(e,t,n){e=e.split(/\n\n/);var r=Z(t,n),o="</"+t+">";return 1===(n=j.map(e,(function(e){return e.split(/\n/).join("<br />")}))).length?n[0]:j.map(n,(function(e){return r+e+o})).join("")}var T,E,O,N,A,D=v,_=r,R=(T="function",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}),B=Array.prototype.slice,M=R(Array.from)?Array.from:function(e){return B.call(e)},P=(R={},{exports:R}),z=(O=R,N=P,A=E=void 0,function(t){"object"==typeof O&&void 0!==N?N.exports=t():"function"==typeof E&&E.amd?E([],t):("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:this).EphoxContactWrapper=t()}((function(){return function e(t,n,r){function o(a,u){if(!n[a]){if(!t[a]){var c="function"==typeof A&&A;if(!u&&c)return c(a,!0);if(i)return i(a,!0);throw(u=new Error("Cannot find module '"+a+"'")).code="MODULE_NOT_FOUND",u}c=n[a]={exports:{}},t[a][0].call(c.exports,(function(e){return o(t[a][1][e]||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof A&&A,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){var r,o;t=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(e){o=a}function u(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return(r=setTimeout)(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}var c,s=[],l=!1,f=-1;function d(){l&&c&&(l=!1,c.length?s=c.concat(s):f=-1,s.length&&m())}function m(){if(!l){for(var e=u(d),t=(l=!0,s.length);t;){for(c=s,s=[];++f<t;)c&&c[f].run();f=-1,t=s.length}c=null,l=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===a||!o)&&clearTimeout)return(o=clearTimeout)(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function h(){}t.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];s.push(new g(e,t)),1!==s.length||l||u(m)},g.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={},t.on=h,t.addListener=h,t.once=h,t.off=h,t.removeListener=h,t.removeAllListeners=h,t.emit=h,t.prependListener=h,t.prependOnceListener=h,t.listeners=function(e){return[]},t.binding=function(e){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(e){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},{}],2:[function(e,t,n){(function(e){function n(){}function r(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=void 0,this._deferreds=[],s(e,this)}function o(e,t){for(;3===e._state;)e=e._value;0===e._state?e._deferreds.push(t):(e._handled=!0,r._immediateFn((function(){var n,r=1===e._state?t.onFulfilled:t.onRejected;if(null===r)(1===e._state?i:a)(t.promise,e._value);else{try{n=r(e._value)}catch(n){return void a(t.promise,n)}i(t.promise,n)}})))}function i(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 r)return e._state=3,e._value=t,void u(e);if("function"==typeof n)return void s((o=n,i=t,function(){o.apply(i,arguments)}),e)}e._state=1,e._value=t,u(e)}catch(t){a(e,t)}var o,i}function a(e,t){e._state=2,e._value=t,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&r._immediateFn((function(){e._handled||r._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 s(e,t){var n=!1;try{e((function(e){n||(n=!0,i(t,e))}),(function(e){n||(n=!0,a(t,e))}))}catch(e){if(n)return;n=!0,a(t,e)}}var l,f;l=this,f=setTimeout,r.prototype.catch=function(e){return this.then(null,e)},r.prototype.then=function(e,t){var r=new this.constructor(n);return o(this,new c(e,t,r)),r},r.all=function(e){var t=Array.prototype.slice.call(e);return new r((function(e,n){if(0===t.length)return e([]);for(var r=t.length,o=0;o<t.length;o++)!function o(i,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var u=a.then;if("function"==typeof u)return void u.call(a,(function(e){o(i,e)}),n)}t[i]=a,0==--r&&e(t)}catch(a){n(a)}}(o,t[o])}))},r.resolve=function(e){return e&&"object"==typeof e&&e.constructor===r?e:new r((function(t){t(e)}))},r.reject=function(e){return new r((function(t,n){n(e)}))},r.race=function(e){return new r((function(t,n){for(var r=0,o=e.length;r<o;r++)e[r].then(t,n)}))},r._immediateFn="function"==typeof e?function(t){e(t)}:function(e){f(e,0)},r._unhandledRejectionFn=function(e){},r._setImmediateFn=function(e){r._immediateFn=e},r._setUnhandledRejectionFn=function(e){r._unhandledRejectionFn=e},void 0!==t&&t.exports?t.exports=r:l.Promise||(l.Promise=r)}).call(this,e("timers").setImmediate)},{timers:3}],3:[function(e,t,n){(function(t,r){var o=e("process/browser.js").nextTick,i=Function.prototype.apply,a=Array.prototype.slice,u={},c=0;function s(e,t){this._id=e,this._clearFn=t}n.setTimeout=function(){return new s(i.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new s(i.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},s.prototype.unref=s.prototype.ref=function(){},s.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n.setImmediate="function"==typeof t?t:function(e){var t=c++,r=!(arguments.length<2)&&a.call(arguments,1);return u[t]=!0,o((function(){u[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))})),t},n.clearImmediate="function"==typeof r?r:function(e){delete u[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(e,t,n){e=e("promise-polyfill");var r="undefined"!=typeof window?window:Function("return this;")();t.exports={boltExport:r.Promise||e}},{"promise-polyfill":2}]},{},[4])(4)})),P.exports.boltExport),I={nu:w,pure:function(e){return w((function(t){t(e)}))}},L=function(e){t.setTimeout((function(){throw e}),0)},F=function(e){function t(t){e().then(t,L)}return{map:function(t){return F((function(){return e().then(t)}))},bind:function(t){return F((function(){return e().then((function(e){return t(e).toPromise()}))}))},anonBind:function(t){return F((function(){return e().then((function(){return t.toPromise()}))}))},toLazy:function(){return I.nu(t)},toCached:function(){var t=null;return F((function(){return t=null===t?e():t}))},toPromise:e,get:t}},H=function(e){return F((function(){return new z(e)}))},V=tinymce.util.Tools.resolve("tinymce.Env"),U=tinymce.util.Tools.resolve("tinymce.util.Delay"),j=tinymce.util.Tools.resolve("tinymce.util.Tools"),W=tinymce.util.Tools.resolve("tinymce.util.VK"),q="x-tinymce/html",$="\x3c!-- "+q+" --\x3e",G=function(e){return $+e},X=function(e){return e.replace($,"")},Y=function(e){return-1!==e.indexOf($)},K=function(){return q},J=tinymce.util.Tools.resolve("tinymce.html.Entities"),Z=function(e,t){var n,r=[];e="<"+e;if("object"==typeof t){for(n in t)t.hasOwnProperty(n)&&r.push(n+'="'+J.encodeAllRaw(t[n])+'"');r.length&&(e+=" "+r.join(" "))}return e+">"},Q=function(e){return!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(e)},ee=function(e,t,n){return t?k(e,!0===t?"p":t,n):S(e)},te=tinymce.util.Tools.resolve("tinymce.html.DomParser"),ne=tinymce.util.Tools.resolve("tinymce.html.Node"),re=tinymce.util.Tools.resolve("tinymce.html.Schema"),oe=tinymce.util.Tools.resolve("tinymce.html.Serializer"),ie={shouldBlockDrop:function(e){return e.getParam("paste_block_drop",!1)},shouldPasteDataImages:function(e){return e.getParam("paste_data_images",!1)},shouldFilterDrop:function(e){return e.getParam("paste_filter_drop",!0)},getPreProcess:function(e){return e.getParam("paste_preprocess")},getPostProcess:function(e){return e.getParam("paste_postprocess")},getWebkitStyles:function(e){return e.getParam("paste_webkit_styles")},shouldRemoveWebKitStyles:function(e){return e.getParam("paste_remove_styles_if_webkit",!0)},shouldMergeFormats:function(e){return e.getParam("paste_merge_formats",!0)},isSmartPasteEnabled:function(e){return e.getParam("smart_paste",!0)},isPasteAsTextEnabled:function(e){return e.getParam("paste_as_text",!1)},getRetainStyleProps:function(e){return e.getParam("paste_retain_style_properties")},getWordValidElements:function(e){return e.getParam("paste_word_valid_elements","-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody")},shouldConvertWordFakeLists:function(e){return e.getParam("paste_convert_word_fake_lists",!0)},shouldUseDefaultFilters:function(e){return e.getParam("paste_enable_default_filters",!0)}};function ae(e,t){return j.each(t,(function(t){e=t.constructor===RegExp?e.replace(t,""):e.replace(t[0],t[1])})),e}var ue={filter:ae,innerText:function(e){var t=re(),n=te({},t),r="",o=t.getShortEndedElements(),i=j.makeMap("script noscript style textarea video audio iframe object"," "),a=t.getBlockElements();return e=ae(e,[/<!\[[^\]]+\]>/g]),function e(t){var n=t.name,u=t;if("br"===n)r+="\n";else if("wbr"!==n)if(o[n]&&(r+=" "),i[n])r+=" ";else{if(3===t.type&&(r+=t.value),!t.shortEnded&&(t=t.firstChild))for(;e(t),t=t.next;);a[n]&&u.next&&(r+="\n","p"===n&&(r+="\n"))}}(n.parse(e)),r},trimHtml:function(e){return ae(e,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,function(e,t,n){return t||n?" ":" "}],/<br class="Apple-interchange-newline">/g,/<br>$/i])},createIdGenerator:function(e){var t=0;return function(){return e+t++}},isMsEdge:function(){return-1!==t.navigator.userAgent.indexOf(" Edge/")}};function ce(e){var t,n,r=1;function o(e,t){if(3!==e.type||!t.test(e.value)){if(e=e.firstChild)do{if(!o(e,t))return}while(e=e.next);return 1}e.value=e.value.replace(t,"")}function i(e,i,a){var u=e._listLevel||r;(t=u!==r?u<r?t&&t.parent.parent:(n=t,null):t)&&t.name===i?t.append(e):(n=n||t,t=new ne(i,1),1<a&&t.attr("start",""+a),e.wrap(t)),e.name="li",r<u&&n&&n.lastChild.append(t),r=u,function e(t){if(t._listIgnore)t.remove();else if(t=t.firstChild)for(;e(t),t=t.next;);}(e),o(e,/^\u00a0+/),o(e,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),o(e,/^\u00a0+/)}for(var a=[],u=e.firstChild;null!=u;)if(a.push(u),null!==(u=u.walk()))for(;void 0!==u&&u.parent!==e;)u=u.walk();for(var c,s,l=0;l<a.length;l++)"p"===(e=a[l]).name&&e.firstChild?(c=function e(t){var n="";if(3===t.type)return t.value;if(t=t.firstChild)for(;n+=e(t),t=t.next;);return n}(e),/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(c)?i(e,"ul"):function(e){var t,n=[/^[IVXLMCD]{1,2}\.[ \u00a0]/,/^[ivxlmcd]{1,2}\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/];return e=e.replace(/^[\u00a0 ]+/,""),j.each(n,(function(n){if(n.test(e))return!(t=!0)})),t}(c)?(s=1,i(e,"ol",s=(c=/([0-9]+)\./.exec(c))?parseInt(c[1],10):s)):e._listLevel?i(e,"ul",1):t=null):(n=t,t=null)}function se(e,t){(r=ie.getRetainStyleProps(e))&&(n=j.makeMap(r.split(/[, ]/))),t=ue.filter(t,[/<br class="?Apple-interchange-newline"?>/gi,/<b[^>]+id="?docs-internal-[^>]*>/gi,/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi," "],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(e,t){return 0<t.length?t.replace(/./," ").slice(Math.floor(t.length/2)).split("").join(" "):""}]]);var n,r=ie.getWordValidElements(e);r=re({valid_elements:r,valid_children:"-li[p]"});j.each(r.elements,(function(e){e.attributes.class||(e.attributes.class={},e.attributesOrder.push("class")),e.attributes.style||(e.attributes.style={},e.attributesOrder.push("style"))})),(o=te({},r)).addAttributeFilter("style",(function(t){for(var r,o=t.length;o--;)(r=t[o]).attr("style",function(e,t,n,r){var o,i={},a=e.dom.parseStyle(r);return j.each(a,(function(a,u){switch(u){case"mso-list":(o=/\w+ \w+([0-9]+)/i.exec(r))&&(n._listLevel=parseInt(o[1],10)),/Ignore/i.test(a)&&n.firstChild&&(n._listIgnore=!0,n.firstChild._listIgnore=!0);break;case"horiz-align":u="text-align";break;case"vert-align":u="vertical-align";break;case"font-color":case"mso-foreground":u="color";break;case"mso-background":case"mso-highlight":u="background";break;case"font-weight":case"font-style":return void("normal"!==a&&(i[u]=a));case"mso-element":if(/^(comment|comment-list)$/i.test(a))return void n.remove()}0===u.indexOf("mso-comment")?n.remove():0!==u.indexOf("mso-")&&("all"===ie.getRetainStyleProps(e)||t&&t[u])&&(i[u]=a)})),/(bold)/i.test(i["font-weight"])&&(delete i["font-weight"],n.wrap(new ne("b",1))),/(italic)/i.test(i["font-style"])&&(delete i["font-style"],n.wrap(new ne("i",1))),(i=e.dom.serializeStyle(i,n.name))?i:null}(e,n,r,r.attr("style"))),"span"===r.name&&r.parent&&!r.attributes.length&&r.unwrap()})),o.addAttributeFilter("class",(function(e){for(var t,n,r=e.length;r--;)n=(t=e[r]).attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&t.remove(),t.attr("class",null)})),o.addNodeFilter("del",(function(e){for(var t=e.length;t--;)e[t].remove()})),o.addNodeFilter("a",(function(e){for(var t,n,r,o=e.length;o--;)n=(t=e[o]).attr("href"),r=t.attr("name"),n&&-1!==n.indexOf("#_msocom_")?t.remove():!(n=n&&0===n.indexOf("file://")?(n=n.split("#")[1])&&"#"+n:n)&&!r||r&&!/^_?(?:toc|edn|ftn)/i.test(r)?t.unwrap():t.attr({href:n,name:r})}));var o=o.parse(t);return ie.shouldConvertWordFakeLists(e)&&ce(o),oe({validate:e.settings.validate},r).serialize(o)}function le(e){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(e)}function fe(e){return le(e)&&/.(gif|jpe?g|png)$/.test(e)}function de(e){return"\n"===e||"\r"===e}function me(e){var t,n;return n={pcIsSpace:!(t=function(t,n){return-1!==" \f\t\v".indexOf(n)||" "===n?t.pcIsSpace||""===t.str||t.str.length===e.length-1||(r=e,(o=t.str.length+1)<r.length&&0<=o&&de(r[o]))?{pcIsSpace:!1,str:t.str+" "}:{pcIsSpace:!0,str:t.str+" "}:{pcIsSpace:de(n),str:t.str+n};var r,o}),str:""},y(e,(function(e){n=t(n,e)})),n.str}function ge(e){return W.metaKeyPressed(e)&&86===e.keyCode||e.shiftKey&&45===e.keyCode}function he(e,n,r){i=o(_());var i,a,u={clear:function(){i.set(_())},set:function(e){i.set(D(e))},isSet:function(){return i.get().isSome()},on:function(e){i.get().each(e)}};function s(t,r,o,i){var a,u;Pe(t,"text/html")?a=t["text/html"]:(a=n.getHtml(),i=i||Y(a),n.isDefaultContent(a)&&(o=!0)),a=ue.trimHtml(a),n.remove(),u=!1===i&&Q(a),(o=!(a.length&&!u)||o)&&(a=Pe(t,"text/plain")&&u?t["text/plain"]:ue.innerText(a)),n.isDefaultContent(a)?r||e.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."):o?Be(e,a):Re(e,a,i)}e.on("keydown",(function(r){function o(e){ge(e)&&!e.isDefaultPrevented()&&n.remove()}if(ge(r)&&!r.isDefaultPrevented()&&(!(a=r.shiftKey&&86===r.keyCode)||!V.webkit||-1===t.navigator.userAgent.indexOf("Version/"))){if(r.stopImmediatePropagation(),u.set(r),window.setTimeout((function(){u.clear()}),100),V.ie&&a)return r.preventDefault(),void c.firePaste(e,!0);n.remove(),n.create(),e.once("keyup",o),e.once("paste",(function(){e.off("keyup",o)}))}})),e.on("paste",(function(o){var i=u.isSet(),c=function(e,t){return t=Me(t.clipboardData||e.getDoc().dataTransfer),ue.isMsEdge()?j.extend(t,{"text/html":""}):t}(e,o),l="text"===r.get()||a,f=Pe(c,K());a=!1,o.isDefaultPrevented()||function(e){return e=e.clipboardData,-1!==t.navigator.userAgent.indexOf("Android")&&e&&e.items&&0===e.items.length}(o)||!ze(c)&&Le(e,o,n.getLastRng()||e.selection.getRng())?n.remove():(i||o.preventDefault(),!V.ie||i&&!o.ieFake||Pe(c,"text/html")||(n.create(),e.dom.bind(n.getEl(),"paste",(function(e){e.stopPropagation()})),e.getDoc().execCommand("Paste",!1,null),c["text/html"]=n.getHtml()),Pe(c,"text/html")?(o.preventDefault(),f=f||Y(c["text/html"]),s(c,i,l,f)):U.setEditorTimeout(e,(function(){s(c,i,l,f)}),0))}))}function pe(e){return V.ie&&e.inline?t.document.body:e.getBody()}function ve(e,t,n){var r;pe(r=e)!==r.getBody()&&e.dom.bind(t,"paste keyup",(function(t){ye(e,n)||e.fire("paste")}))}function be(e){function t(t,n){t.appendChild(n),e.dom.remove(n,!0)}var n,r,o,i=j.grep(pe(e).childNodes,(function(e){return"mcepastebin"===e.id})),a=i.shift();for(j.each(i,(function(e){t(a,e)})),n=(r=e.dom.select("div[id=mcepastebin]",a)).length-1;0<=n;n--)o=e.dom.create("div"),a.insertBefore(o,r[n]),t(o,r[n]);return a?a.innerHTML:""}function ye(e,t){return e=He(e),Ue(e)&&Ve(t,e.innerHTML)}function we(e,t,n){var r;if(r=e,!1===V.iOS&&void 0!==r&&"function"==typeof r.setData&&!0!==ue.isMsEdge())try{return e.clearData(),e.setData("text/html",t),e.setData("text/plain",n),e.setData(K(),t),1}catch(e){return}}function xe(e,t){return Ke.getCaretRangeFromPoint(t.clientX,t.clientY,e.getDoc())}function Ce(e,t){e.focus(),e.selection.setRng(t)}var Se={preProcess:function(e,t){return ie.shouldUseDefaultFilters(e)?se(e,t):t},isWordContent:function(e){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i.test(e)||/class="OutlineElement/.test(e)||/id="?docs\-internal\-guid\-/.test(e)}},ke=function(e,t){return{content:e,cancelled:t}},Te=function(e,t,n,r){return t=e.dom.create("div",{style:"display:none"},t),e=c.firePastePostProcess(e,t,n,r),ke(e.node.innerHTML,e.isDefaultPrevented())},Ee=function(e,t,n){var r=Se.isWordContent(t);t=r?Se.preProcess(e,t):t;return t=c.firePastePreProcess(e,t,n,r),e.hasEventListeners("PastePostProcess")&&!t.isDefaultPrevented()?Te(e,t.content,n,r):ke(t.content,t.isDefaultPrevented())},Oe=function(e,t){return e=e.dom.create("body",{},t),j.each(e.querySelectorAll("meta"),(function(e){return e.parentNode.removeChild(e)})),e.innerHTML},Ne=function(e,t){return e.insertContent(Oe(e,t),{merge:ie.shouldMergeFormats(e),paste:!0}),!0},Ae=function(e,t,n){return!(!1!==e.selection.isCollapsed()||!le(t))&&(o=t,i=n,(r=e).undoManager.extra((function(){i(r,o)}),(function(){r.execCommand("mceInsertLink",!1,o)})),!0);var r,o,i},De=function(e,t,n){return!!fe(t)&&(o=t,i=n,(r=e).undoManager.extra((function(){i(r,o)}),(function(){r.insertContent('<img src="'+o+'">')})),!0);var r,o,i},_e=function(e,t){var n,r;!1===ie.isSmartPasteEnabled(e)?Ne(e,t):(n=e,r=t,j.each([Ae,De,Ne],(function(e){return!0!==e(n,r,Ne)})))},Re=function(e,t,n){n=n||Y(t),t=Ee(e,X(t),n),!1===t.cancelled&&_e(e,t.content)},Be=function(e,t){t=e.dom.encode(t).replace(/\r\n/g,"\n"),t=me(t),t=ee(t,e.settings.forced_root_block,e.settings.forced_root_block_attrs),Re(e,t,!1)},Me=function(e){var t,n={};if(e&&(!e.getData||(t=e.getData("Text"))&&0<t.length&&-1===t.indexOf("data:text/mce-internal,")&&(n["text/plain"]=t),e.types))for(var r=0;r<e.types.length;r++){var o=e.types[r];try{n[o]=e.getData(o)}catch(e){n[o]=""}}return n},Pe=function(e,t){return t in e&&0<e[t].length},ze=function(e){return Pe(e,"text/html")||Pe(e,"text/plain")},Ie=ue.createIdGenerator("mceclip"),Le=function(e,n,r){var o="paste"===n.type?n.clipboardData:n.dataTransfer;return!!(e.settings.paste_data_images&&o&&(o=function(e){for(var t=e.items?b(M(e.items),(function(e){return e.getAsFile()})):[],n=(e=e.files?M(e.files):[],0<t.length?t:e),r=function(e){return/^image\/(jpeg|png|gif|bmp)$/.test(e.type)},o=[],i=0,a=n.length;i<a;i++){var u=n[i];r(u,i)&&o.push(u)}return o}(o),0<o.length))&&(n.preventDefault(),C(o,(function(e){return H((function(t){var n=e.getAsFile?e.getAsFile():e,r=new window.FileReader;r.onload=function(){t({blob:n,uri:r.result})},r.readAsDataURL(n)}))})).get((function(n){r&&e.selection.setRng(r),y(n,(function(n){var r,o,i,a,u,c,s;r=e,u=(n=n).uri,a=-1!==(c=u.indexOf(","))?u.substr(c+1):null,u=Ie(),c=r.settings.images_reuse_filename&&n.blob.name?function(e,t){return t=t.match(/([\s\S]+?)\.(?:jpeg|jpg|png|gif)$/i),t?e.dom.encode(t[1]):null}(r,n.blob.name):u,(s=new t.Image).src=n.uri,i=r.settings,s=s,!i.images_dataimg_filter||i.images_dataimg_filter(s)?(s=i=void 0,(s=(o=r.editorUpload.blobCache).findFirst((function(e){return e.base64()===a})))?i=s:(i=o.create(u,n.blob,a,c),o.add(i)),Re(r,'<img src="'+i.blobUri()+'">',!1)):Re(r,'<img src="'+n.uri+'">',!1)}))})),!0)},Fe=function(e,t,n){var r;he(e,t,n),e.parser.addNodeFilter("img",(function(t,n,o){function i(e){e.attr("data-mce-object")||r===V.transparentSrc||e.remove()}if(!e.settings.paste_data_images&&(o=o).data&&!0===o.data.paste)for(var a=t.length;a--;)!(r=t[a].attr("src"))||0!==r.indexOf("webkit-fake-url")&&(e.settings.allow_html_data_urls||0!==r.indexOf("data:"))||i(t[a])}))},He=function(e){return e.dom.get("mcepastebin")},Ve=function(e,t){return t===e},Ue=function(e){return e&&"mcepastebin"===e.id},je=function(e){var t=o(null),n="%MCEPASTEBIN%";return{create:function(){return o=t,i=n,a=(r=e).dom,u=r.getBody(),o.set(r.selection.getRng()),o=r.dom.add(pe(r),"div",{id:"mcepastebin",class:"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},i),(V.ie||V.gecko)&&a.setStyle(o,"left","rtl"===a.getStyle(u,"direction",!0)?65535:-65535),a.bind(o,"beforedeactivate focusin focusout",(function(e){e.stopPropagation()})),ve(r,o,i),o.focus(),void r.selection.select(o,!0);var r,o,i,a,u},remove:function(){var n=e,r=t;if(He(n)){for(var o,i=r.get();o=n.dom.get("mcepastebin");)n.dom.remove(o),n.dom.unbind(o);i&&n.selection.setRng(i)}r.set(null)},getEl:function(){return He(e)},getHtml:function(){return be(e)},getLastRng:function(){return t.get()},isDefault:function(){return ye(e,n)},isDefaultContent:function(e){return Ve(n,e)}}},We=function(){},qe=function(e,t,n,r){we(e.clipboardData,t.html,t.text)?(e.preventDefault(),r()):n(t.html,r)},$e=function(e){return function(t,n){t=G(t);var r=e.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),o=(t=e.dom.create("div",{contenteditable:"true"},t),e.dom.setStyles(r,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),r.appendChild(t),e.dom.add(e.getBody(),r),e.selection.getRng()),i=(t.focus(),e.dom.createRng());i.selectNodeContents(t),e.selection.setRng(i),U.setTimeout((function(){e.selection.setRng(o),r.parentNode.removeChild(r),n()}),0)}},Ge=function(e){return{html:e.selection.getContent({contextual:!0}),text:e.selection.getContent({format:"text"})}},Xe=function(e){return!e.selection.isCollapsed()||!!(e=e).dom.getParent(e.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",e.getBody())},Ye=function(e){var t,n;e.on("cut",(t=e,function(e){Xe(t)&&qe(e,Ge(t),$e(t),(function(){U.setTimeout((function(){t.execCommand("Delete")}),0)}))})),e.on("copy",(n=e,function(e){Xe(n)&&qe(e,Ge(n),$e(n),We)}))},Ke=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),Je=function(e,t,n){ie.shouldBlockDrop(e)&&e.on("dragend dragover draggesture dragdrop drop drag",(function(e){e.preventDefault(),e.stopPropagation()})),ie.shouldPasteDataImages(e)||e.on("drop",(function(e){var t=e.dataTransfer;t&&t.files&&0<t.files.length&&e.preventDefault()})),e.on("drop",(function(r){var o,i,a,u=xe(e,r);r.isDefaultPrevented()||n.get()||(o=t.getDataTransferItems(r.dataTransfer),i=t.hasContentType(o,K()),(t.hasHtmlOrText(o)&&!function(e){return e=e["text/plain"],!!e&&0===e.indexOf("file://")}(o)||!t.pasteImageData(r,u))&&u&&ie.shouldFilterDrop(e)&&(a=o["mce-internal"]||o["text/html"]||o["text/plain"])&&(r.preventDefault(),U.setEditorTimeout(e,(function(){e.undoManager.transact((function(){o["mce-internal"]&&e.execCommand("Delete"),Ce(e,u),a=ue.trimHtml(a),o["text/html"]?t.pasteHtml(a,i):t.pasteText(a)}))}))))})),e.on("dragstart",(function(e){n.set(!0)})),e.on("dragover dragend",(function(t){ie.shouldPasteDataImages(e)&&!1===n.get()&&(t.preventDefault(),Ce(e,xe(e,t))),"dragend"===t.type&&n.set(!1)}))},Ze=function(e){var t=e.plugins.paste,n=ie.getPreProcess(e),r=(n&&e.on("PastePreProcess",(function(e){n.call(t,t,e)})),ie.getPostProcess(e));r&&e.on("PastePostProcess",(function(e){r.call(t,t,e)}))};function Qe(e,t){e.on("PastePreProcess",(function(n){n.content=t(e,n.content,n.internal,n.wordContent)}))}function et(e,t){if(!Se.isWordContent(t))return t;var n=[];j.each(e.schema.getBlockElements(),(function(e,t){n.push(t)})),e=new RegExp("(?:<br> [\\s\\r\\n]+|<br>)*(<\\/?("+n.join("|")+")[^>]*>)(?:<br> [\\s\\r\\n]+|<br>)*","g");return t=ue.filter(t,[[e,"$1"]]),ue.filter(t,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}function tt(e,t,n,r){if(r||n)return t;var o,i,a;r=ie.getWebkitStyles(e);return!1===ie.shouldRemoveWebKitStyles(e)||"all"===r?t:(t=(o=r?r.split(/[, ]/):o)?(i=e.dom,a=e.selection.getNode(),t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,(function(e,t,n,r){var u=i.parseStyle(i.decode(n)),c={};if("none"===o)return t+r;for(var s=0;s<o.length;s++){var l=u[o[s]],f=i.getStyle(a,o[s],!0);/color/.test(o[s])&&(l=i.toHex(l),f=i.toHex(f)),f!==l&&(c[o[s]]=l)}return(c=i.serializeStyle(c,"span"))?t+' style="'+c+'"'+r:t+r}))):t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3")).replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,(function(e,t,n,r){return t+' style="'+n+'"'+r}))}function nt(e,t){e.$("a",t).find("font,u").each((function(t,n){e.dom.remove(n,!0)}))}function rt(e,t){return function(n){function r(e){return n.setActive(e.state)}return n.setActive("text"===t.pasteFormat.get()),e.on("PastePlainTextToggle",r),function(){return e.off("PastePlainTextToggle",r)}}}var ot=function(e){var t,n;V.webkit&&Qe(e,tt),V.ie&&(Qe(e,et),n=nt,(t=e).on("PastePostProcess",(function(e){n(t,e.node)})))},it=function(e,t){e.ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:function(){return e.execCommand("mceTogglePlainTextPaste")},onSetup:rt(e,t)}),e.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",onAction:function(){return e.execCommand("mceTogglePlainTextPaste")},onSetup:rt(e,t)})};i.add("paste",(function(e){var t,n,r,i,c,s;if(!1===a(e))return t=o(!1),n=o(ie.isPasteAsTextEnabled(e)?"text":"html"),c=n,s=je(i=e),i.on("PreInit",(function(){return Fe(i,s,c)})),n={pasteFormat:c,pasteHtml:function(e,t){return Re(i,e,t)},pasteText:function(e){return Be(i,e)},pasteImageData:function(e,t){return Le(i,e,t)},getDataTransferItems:Me,hasHtmlOrText:ze,hasContentType:Pe},r=ot(e),it(e,n),l(e,n),Ze(e),Ye(e),Je(e,n,t),u(n,r)}))}(window)}).call(this,n("c8ba"))},"840a":function(e,t,n){n("d4c3")},"84ec":function(e,t,n){n("2401")},"855b":function(e,t,n){n("e2d6")},8863:function(e,t,n){n("9dd9")},"88b6":function(e,t){!function(){"use strict";function e(e){return function(){return e}}function t(){return f}var n,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(e,t,n){e.execCommand("UL"===t?"InsertUnorderedList":"InsertOrderedList",!1,!1===n?null:{"list-style-type":n})},a=function(e){e.addCommand("ApplyUnorderedListStyle",(function(t,n){i(e,"UL",n["list-style-type"])})),e.addCommand("ApplyOrderedListStyle",(function(t,n){i(e,"OL",n["list-style-type"])}))},u=function(e){return e=e.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman"),e?e.split(/[ ,]/):[]},c=function(e){return e=e.getParam("advlist_bullet_styles","default,circle,square"),e?e.split(/[ ,]/):[]},s=e(!1),l=e(!0),f=(n={fold:function(e,t){return e()},is:s,isSome:s,isNone:l,getOr:g,getOrThunk:m,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:e(null),getOrUndefined:e(void 0),or:g,orThunk:m,map:t,each:function(){},bind:t,exists:s,forall:l,filter:t,equals:d,equals_:d,toArray:function(){return[]},toString:e("none()")},Object.freeze&&Object.freeze(n),n);function d(e){return e.isNone()}function m(e){return e()}function g(e){return e}function h(t){function n(){return i}function r(e){return e(t)}var o=e(t),i={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:l,isNone:s,getOr:o,getOrThunk:o,getOrDie:o,getOrNull:o,getOrUndefined:o,or:n,orThunk:n,map:function(e){return h(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?i:f},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(s,(function(e){return n(t,e)}))}};return i}function p(e,t,n){var r=-1!==(r=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}(t.parents,y))?t.parents.slice(0,r):t.parents;return 0<(t=o.grep(r,w(e))).length&&t[0].nodeName===n}function v(e,t,n,r,o,i){0<i.length?C(e,t,n,r,o,i):S(e,t,n,r,o)}var b=function(e){return null==e?f:h(e)},y=function(e){return e&&/^(TH|TD)$/.test(e.nodeName)},w=function(e){return function(t){return t&&/^(OL|UL|DL)$/.test(t.nodeName)&&(t=t,e.$.contains(e.getBody(),t))}},x=function(e){var t=e.dom.getParent(e.selection.getNode(),"ol,ul");e=e.dom.getStyle(t,"listStyleType");return b(e)},C=function(e,t,n,r,a,u){e.ui.registry.addSplitButton(t,{tooltip:n,icon:"OL"===a?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:function(e){e(o.map(u,(function(e){return{type:"choiceitem",value:"default"===e?"":e,icon:"list-"+("OL"===a?"num":"bull")+"-"+("disc"===e||"decimal"===e?"default":e),text:e.replace(/\-/g," ").replace(/\b\w/g,(function(e){return e.toUpperCase()}))}})))},onAction:function(){return e.execCommand(r)},onItemAction:function(t,n){i(e,a,n)},select:function(t){return x(e).map((function(e){return t===e})).getOr(!1)},onSetup:function(t){function n(n){t.setActive(p(e,n,a))}return e.on("NodeChange",n),function(){return e.off("NodeChange",n)}}})},S=function(e,t,n,r,o,i){e.ui.registry.addToggleButton(t,{active:!1,tooltip:n,icon:"OL"===o?"ordered-list":"unordered-list",onSetup:function(t){function n(n){t.setActive(p(e,n,o))}return e.on("NodeChange",n),function(){return e.off("NodeChange",n)}},onAction:function(){return e.execCommand(r)}})},k=function(e){v(e,"numlist","Numbered list","InsertOrderedList","OL",u(e)),v(e,"bullist","Bullet list","InsertUnorderedList","UL",c(e))};r.add("advlist",(function(e){!function(e,t){return e=e.settings.plugins||"",-1!==o.inArray(e.split(/[ ,]/),t)}(e,"lists")||(k(e),a(e))}))}()},"8ce1":function(e,t){!function(e){"use strict";function t(e,t){return((t=/^(\d+)([ms]?)$/.exec(""+(e=e||t)))[2]?{s:1e3,m:6e4}[t[2]]:1)*parseInt(e,10)}var n=function(e){function t(){return r}var r=e;return{get:t,set:function(e){r=e},clone:function(){return n(r)}}},r=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.util.Delay"),i=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),a=tinymce.util.Tools.resolve("tinymce.util.Tools"),u=function(e){return e.fire("RestoreDraft")},c=function(e){return e.fire("RemoveDraft")},s=function(e){return e.getParam("autosave_ask_before_unload",!0)},l=function(t){var n=t.getParam("autosave_prefix","tinymce-autosave-{path}{query}{hash}-{id}-");return(n=(n=(n=n.replace(/\{path\}/g,e.document.location.pathname)).replace(/\{query\}/g,e.document.location.search)).replace(/\{hash\}/g,e.document.location.hash)).replace(/\{id\}/g,t.id)},f=function(e,t){var n=e.settings.forced_root_block;return""===(t=a.trim(void 0===t?e.getBody().innerHTML:t))||new RegExp("^<"+n+"[^>]*>(( | |[ \t]|<br[^>]*>)+?|)</"+n+">|<br>$","i").test(t)},d=function(e){var n=parseInt(i.getItem(l(e)+"time"),10)||0;return!((new Date).getTime()-n>t(e.settings.autosave_retention,"20m"))||(m(e,!1),!1)},m=function(e,t){var n=l(e);i.removeItem(n+"draft"),i.removeItem(n+"time"),!1!==t&&c(e)},g=function(e){var t=l(e);!f(e)&&e.isDirty()&&(i.setItem(t+"draft",e.getContent({format:"raw",no_events:!0})),i.setItem(t+"time",(new Date).getTime().toString()),e.fire("StoreDraft"))},h=function(e){var t=l(e);d(e)&&(e.setContent(i.getItem(t+"draft"),{format:"raw"}),u(e))},p=function(e,n){var r=t(e.settings.autosave_interval,"30s");n.get()||(o.setInterval((function(){e.removed||g(e)}),r),n.set(!0))},v=function(e){e.undoManager.transact((function(){h(e),m(e)})),e.focus()};function b(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=t.concat(n);return e.apply(null,o)}}var y=tinymce.util.Tools.resolve("tinymce.EditorManager"),w=function(e,t){return function(t){function n(){return t.setDisabled(!d(e))}return t.setDisabled(!d(e)),e.on("StoreDraft RestoreDraft RemoveDraft",n),function(){return e.off("StoreDraft RestoreDraft RemoveDraft",n)}}};r.add("autosave",(function(e){var t,r=n(!1);return e.editorManager.on("BeforeUnload",(function(e){var t;a.each(y.get(),(function(e){e.plugins.autosave&&e.plugins.autosave.storeDraft(),!t&&e.isDirty()&&s(e)&&(t=e.translate("You have unsaved changes are you sure you want to navigate away?"))})),t&&(e.preventDefault(),e.returnValue=t)})),p(t=e,r),t.ui.registry.addButton("restoredraft",{tooltip:"Restore last draft",icon:"restore-draft",onAction:function(){v(t)},onSetup:w(t)}),t.ui.registry.addMenuItem("restoredraft",{text:"Restore last draft",icon:"restore-draft",onAction:function(){v(t)},onSetup:w(t)}),e.on("init",(function(){e.getParam("autosave_restore_when_empty",!1)&&e.dom.isEmpty(e.getBody())&&h(e)})),{hasDraft:b(d,r=e),storeDraft:b(g,r),restoreDraft:b(h,r),removeDraft:b(m,r),isEmpty:b(f,r)}}))}(window)},9434:function(e,t,n){n("e8b0")},"94ce":function(e,t){!function(e){"use strict";function t(){}function n(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e(t.apply(null,n))}}var r=function(e){function t(){return n}var n=e;return{get:t,set:function(e){n=e},clone:function(){return r(n)}}},o=function(e){return function(){return e}},i=function(e){return e};function a(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=t.concat(n);return e.apply(null,o)}}function u(){return f}var c=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return!e.apply(null,t)}},s=o(!1),l=o(!0),f=(K={fold:function(e,t){return e()},is:s,isSome:s,isNone:l,getOr:g,getOrThunk:m,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(void 0),or:g,orThunk:m,map:u,each:t,bind:u,exists:s,forall:l,filter:u,equals:d,equals_:d,toArray:function(){return[]},toString:o("none()")},Object.freeze&&Object.freeze(K),K);function d(e){return e.isNone()}function m(e){return e()}function g(e){return e}function h(e){function t(){return i}function n(t){return t(e)}var r=o(e),i={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:l,isNone:s,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:t,orThunk:t,map:function(t){return h(t(e))},each:function(t){t(e)},bind:n,exists:n,forall:n,filter:function(t){return t(e)?i:f},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(s,(function(t){return n(e,t)}))}};return i}function p(e){return function(t){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}(t)===e}}function v(e,t){for(var n=0,r=e.length;n<r;++n)if(!0!==t(e[n],n))return!1;return!0}function b(e,t){return Ce(e,(function(e,n){return{k:n,v:t(e,n)}}))}function y(e,t){return Se(e,t)?Y.from(e[t]):Y.none()}function w(e,t){throw new Error("All required keys ("+Te(e).join(", ")+") were not specified. Specified keys were: "+Te(t).join(", ")+".")}function x(e,t){if(!Z(t))throw new Error("The "+e+" fields must be an array. Was: "+t+".");se(t,(function(t){if(!J(t))throw new Error("The value "+t+" in the "+e+" fields was not a string.")}))}function C(e){var t=Te(e);ge(t,(function(e,n){return n<t.length-1&&e===t[n+1]})).each((function(e){throw new Error("The field: "+e+" occurs more than once in the combined fields: ["+t.join(", ")+"].")}))}function S(e,t){var n=e.concat(t);if(0===n.length)throw new Error("You must specify at least one required or optional field.");return x("required",e),x("optional",t),C(n),function(r){var i=ye(r),a=(v(e,(function(e){return ae(i,e)}))||w(e,i),fe(i,(function(e){return!ae(n,e)}))),u=(0<a.length&&Ee(a),{});return se(e,(function(e){u[e]=o(r[e])})),se(t,(function(e){u[e]=o(Object.prototype.hasOwnProperty.call(r,e)?Y.some(r[e]):Y.none())})),u}}function k(e){return function(t){return Re(t)===e}}function T(e){return Re(e)===Oe||"#comment"===_e(e)}function E(e){return me(e.dom().attributes,(function(e,t){return e[t.name]=t.value,e}),{})}function O(e,t){return-1!==e.indexOf(t)}function N(e,t){return Ve(e,t,0)}function A(e){var t,n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=!0,t=e.apply(null,r)),t}}function D(e){if(null==e)throw new Error("Node cannot be null or undefined");return{dom:o(e)}}function _(e,t,n){return 0!=(e.compareDocumentPosition(t)&n)}function R(e,t){var n=ot(e,t);return n?it(r(1),r(2)):{major:0,minor:0};function r(e){return Number(t.replace(n,"$"+e))}}function B(){return it(0,0)}function M(e){var t=e.current;return{current:t,version:e.version,isEdge:gt(ct,t),isChrome:gt(st,t),isIE:gt(lt,t),isOpera:gt(ft,t),isFirefox:gt(dt,t),isSafari:gt(mt,t)}}function P(e){var t=e.current;return{current:t,version:e.version,isWindows:kt(vt,t),isiOS:kt(bt,t),isAndroid:kt(yt,t),isOSX:kt(xt,t),isLinux:kt(wt,t),isSolaris:kt(Ct,t),isFreeBSD:kt(St,t)}}function z(e,t){var n=String(t).toLowerCase();return ge(e,(function(e){return e.search(n)}))}function I(e){return function(t){return O(t,e)}}function L(){return _t.get()}function F(e){return e.nodeType!==Rt&&e.nodeType!==Bt||0===e.childElementCount}function H(e){return We.fromDom(e.dom().ownerDocument)}function V(e,t){for(var n=ee(t)?t:s,r=e.dom(),o=[];null!==r.parentNode&&void 0!==r.parentNode;){var i=r.parentNode,a=We.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o}function U(e){return Y.from(e.dom().previousSibling).map(We.fromDom)}function j(e,t){return e=e.dom().childNodes,Y.from(e[t]).map(We.fromDom)}function W(e,t){jt(e).fold((function(){$t(e,t)}),(function(n){e.dom().insertBefore(t.dom(),n.dom())}))}function q(e,t){Wt(e,t),$t(t,e)}function $(e,t){se(t,(function(n,r){r=0===r?e:t[r-1],qt(r,n)}))}function G(e){e.dom().textContent="",se(Ut(e),(function(e){Yt(e)}))}function X(e){var t=Ut(e);0<t.length&&Gt(e,t),Yt(e)}var Y={some:h,none:u,from:function(e){return null==e?f:h(e)}},K=tinymce.util.Tools.resolve("tinymce.PluginManager"),J=p("string"),Z=p("array"),Q=p("boolean"),ee=p("function"),te=p("number"),ne=Array.prototype.slice,re=Array.prototype.indexOf,oe=Array.prototype.push,ie=function(e,t){return re.call(e,t)},ae=function(e,t){return-1<ie(e,t)},ue=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n))return!0;return!1},ce=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},se=function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)},le=function(e,t){for(var n=e.length-1;0<=n;n--)t(e[n],n)},fe=function(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},de=function(e,t,n){return le(e,(function(e){n=t(n,e)})),n},me=function(e,t,n){return se(e,(function(e){n=t(n,e)})),n},ge=function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n))return Y.some(o)}return Y.none()},he=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n))return Y.some(n);return Y.none()},pe=function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!Z(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);oe.apply(t,e[n])}return t},ve=function(e,t){return e=ce(e,t),pe(e)},be=function(e){return e=ne.call(e,0),e.reverse(),e},ye=(ee(Array.from)&&Array.from,Object.keys),we=Object.hasOwnProperty,xe=function(e,t){for(var n=ye(e),r=0,o=n.length;r<o;r++){var i=n[r];t(e[i],i)}},Ce=function(e,t){var n={};return xe(e,(function(e,r){e=t(e,r),n[e.k]=e.v})),n},Se=function(e,t){return we.call(e,t)},ke=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(e.length!==t.length)throw new Error('Wrong number of arguments to struct. Expected "['+e.length+']", got '+t.length+" arguments");var r={};return se(e,(function(e,n){r[e]=o(t[n])})),r}},Te=function(e){return e.slice(0).sort()},Ee=function(e){throw new Error("Unsupported keys for object: "+Te(e).join(", "))},Oe=(e.Node.ATTRIBUTE_NODE,e.Node.CDATA_SECTION_NODE,e.Node.COMMENT_NODE),Ne=e.Node.DOCUMENT_NODE,Ae=(e.Node.DOCUMENT_TYPE_NODE,e.Node.DOCUMENT_FRAGMENT_NODE,e.Node.ELEMENT_NODE),De=e.Node.TEXT_NODE,_e=(e.Node.PROCESSING_INSTRUCTION_NODE,e.Node.ENTITY_REFERENCE_NODE,e.Node.ENTITY_NODE,e.Node.NOTATION_NODE,void 0!==e.window?e.window:Function("return this;")(),function(e){return e.dom().nodeName.toLowerCase()}),Re=function(e){return e.dom().nodeType},Be=k(Ae),Me=k(De),Pe=function(t,n,r){if(!(J(r)||Q(r)||te(r)))throw e.console.error("Invalid call to Attr.set. Key ",n,":: Value ",r,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(n,r+"")},ze=function(e,t,n){Pe(e.dom(),t,n)},Ie=function(e,t){var n=e.dom();xe(t,(function(e,t){Pe(n,t,e)}))},Le=function(e,t){return e=e.dom().getAttribute(t),null===e?void 0:e},Fe=function(e,t){return e=e.dom(),!(!e||!e.hasAttribute)&&e.hasAttribute(t)},He=function(e,t){e.dom().removeAttribute(t)},Ve=function(e,t,n){return""===t||!(e.length<t.length)&&e.substr(n,n+t.length)===t},Ue=function(e){return e.replace(/^\s+|\s+$/g,"")},je=function(e){return void 0!==e.style&&ee(e.style.getPropertyValue)},We={fromHtml:function(t,n){if(n=(n||e.document).createElement("div"),n.innerHTML=t,!n.hasChildNodes()||1<n.childNodes.length)throw e.console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return D(n.childNodes[0])},fromTag:function(t,n){return n=(n||e.document).createElement(t),D(n)},fromText:function(t,n){return n=(n||e.document).createTextNode(t),D(n)},fromDom:D,fromPoint:function(e,t,n){return e=e.dom(),Y.from(e.elementFromPoint(t,n)).map(D)}},qe=function(e){return e=Me(e)?e.dom().parentNode:e.dom(),null!=e&&e.ownerDocument.body.contains(e)},$e=A((function(){return Ge(We.fromDom(e.document))})),Ge=function(e){if(e=e.dom().body,null==e)throw new Error("Body is not available yet");return We.fromDom(e)},Xe=function(t,n,r){if(!J(r))throw e.console.error("Invalid call to CSS.set. Property ",n,":: Value ",r,":: Element ",t),new Error("CSS value must be a string: "+r);je(t)&&t.style.setProperty(n,r)},Ye=function(e,t){je(e)&&e.style.removeProperty(t)},Ke=function(e,t,n){e=e.dom(),Xe(e,t,n)},Je=function(e,t){var n=e.dom();xe(t,(function(e,t){Xe(n,t,e)}))},Ze=function(t,n){var r=t.dom(),o=e.window.getComputedStyle(r).getPropertyValue(n);t=""!==o||qe(t)?o:Qe(r,n);return null===t?void 0:t},Qe=function(e,t){return je(e)?e.style.getPropertyValue(t):""},et=function(e,t){return e=e.dom(),e=Qe(e,t),Y.from(e).filter((function(e){return 0<e.length}))},tt=function(e,t){var n=e.dom();Ye(n,t),Fe(e,"style")&&""===Ue(Le(e,"style"))&&He(e,"style")},nt=function(t,n){return _(t,n,e.Node.DOCUMENT_POSITION_CONTAINED_BY)},rt=function(){return(rt=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)},ot=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}},it=function(e,t){return{major:e,minor:t}},at=function(e,t){return t=String(t).toLowerCase(),0===e.length?B():R(e,t)},ut=B,ct="Edge",st="Chrome",lt="IE",ft="Opera",dt="Firefox",mt="Safari",gt=function(e,t){return function(){return t===e}},ht=function(){return M({current:void 0,version:ut()})},pt=M,vt=(o(ct),o(st),o(lt),o(ft),o(dt),o(mt),"Windows"),bt="iOS",yt="Android",wt="Linux",xt="OSX",Ct="Solaris",St="FreeBSD",kt=function(e,t){return function(){return t===e}},Tt=function(){return P({current:void 0,version:ut()})},Et=P,Ot=(o(vt),o(bt),o(yt),o(wt),o(xt),o(Ct),o(St),function(e,t){return z(e,t).map((function(e){var n=at(e.versionRegexes,t);return{current:e.name,version:n}}))}),Nt=function(e,t){return z(e,t).map((function(e){var n=at(e.versionRegexes,t);return{current:e.name,version:n}}))},At=(De=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,De=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return O(e,"edge/")&&O(e,"chrome")&&O(e,"safari")&&O(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,De],search:function(e){return O(e,"chrome")&&!O(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return O(e,"msie")||O(e,"trident")}},{name:"Opera",versionRegexes:[De,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:I("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:I("firefox")},{name:"Safari",versionRegexes:[De,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(O(e,"safari")||O(e,"mobile/"))&&O(e,"applewebkit")}}],[{name:"Windows",search:I("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return O(e,"iphone")||O(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:I("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:I("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:I("linux"),versionRegexes:[]},{name:"Solaris",search:I("sunos"),versionRegexes:[]},{name:"FreeBSD",search:I("freebsd"),versionRegexes:[]}]),Dt={browsers:o(De),oses:o(At)},_t=r(function(e,t){var n,r,i,a,u,c=Dt.browsers(),s=Dt.oses(),l=(c=Ot(c,e).fold(ht,pt),s=Nt(s,e).fold(Tt,Et),r=c,e=e,t=t,l=(n=s).isiOS()&&!0===/ipad/i.test(e),i=n.isiOS()&&!l,a=n.isiOS()||n.isAndroid(),u=a||t("(pointer:coarse)"),t=l||!i&&a&&t("(min-device-width:768px)"),a=i||a&&!t,r=r.isSafari()&&n.isiOS()&&!1===/safari/i.test(e),e=!a&&!t&&!r,{isiPad:o(l),isiPhone:o(i),isTablet:o(t),isPhone:o(a),isTouch:o(u),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:o(r),isDesktop:o(e)});return{browser:c,os:s,deviceType:l}}(e.navigator.userAgent,(function(t){return e.window.matchMedia(t).matches}))),Rt=Ae,Bt=Ne,Mt=function(e,t){if(e=e.dom(),e.nodeType!==Rt)return!1;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},Pt=function(t,n){return n=void 0===n?e.document:n.dom(),F(n)?[]:ce(n.querySelectorAll(t),We.fromDom)},zt=function(t,n){return n=void 0===n?e.document:n.dom(),F(n)?Y.none():Y.from(n.querySelector(t)).map(We.fromDom)},It=function(e,t){return e.dom()===t.dom()},Lt=L().browser.isIE()?function(e,t){return nt(e.dom(),t.dom())}:function(e,t){return e=e.dom(),t=t.dom(),e!==t&&e.contains(t)},Ft=Mt,Ht=function(e){return Y.from(e.dom().parentNode).map(We.fromDom)},Vt=function(e){return Y.from(e.dom().nextSibling).map(We.fromDom)},Ut=function(e){return ce(e.dom().childNodes,We.fromDom)},jt=function(e){return j(e,0)},Wt=(ke("element","offset"),function(e,t){Ht(e).each((function(n){n.dom().insertBefore(t.dom(),e.dom())}))}),qt=function(e,t){Vt(e).fold((function(){Ht(e).each((function(e){$t(e,t)}))}),(function(e){Wt(e,t)}))},$t=function(e,t){e.dom().appendChild(t.dom())},Gt=function(e,t){se(t,(function(t){Wt(e,t)}))},Xt=function(e,t){se(t,(function(t){$t(e,t)}))},Yt=function(e){e=e.dom(),null!==e.parentNode&&e.parentNode.removeChild(e)},Kt=(ke("width","height"),ke("width","height"),ke("rows","columns")),Jt=ke("row","column"),Zt=(ke("x","y"),ke("element","rowspan","colspan")),Qt=ke("element","rowspan","colspan","isNew"),en=ke("element","rowspan","colspan","row","column"),tn=ke("element","cells","section"),nn=ke("element","isNew"),rn=ke("element","cells","section","isNew"),on=ke("cells","section"),an=ke("details","section"),un=ke("startRow","startCol","finishRow","finishCol"),cn=function(e,t,n){return fe(V(e,n),t)},sn=function(e,t){return fe(Ut(e),t)},ln=function(e,t){var n=[];return se(Ut(e),(function(e){n=(n=t(e)?n.concat([e]):n).concat(ln(e,t))})),n},fn=function(e,t,n){return cn(e,(function(e){return Mt(e,t)}),n)},dn=function(e,t){return Pt(t,e)};function mn(e,t,n,r,o){return e(n,r)?Y.some(n):ee(o)&&o(n)?Y.none():t(n,r,o)}function gn(e,t){return xn(e,(function(e){return Mt(e,t)}))}function hn(e,t,n){return(n=void 0===n?s:n)(t)?Y.none():ae(e,_e(t))?Y.some(t):Sn(t,e.join(","),(function(e){return Mt(e,"table")||n(e)}))}function pn(e,t){return Ht(t).map((function(t){return n=e,sn(t,(function(e){return Mt(e,n)}));var n}))}function vn(e,t){return parseInt(Le(e,t),10)}function bn(e,t){return e=ve(e.all(),(function(e){return e.cells()})),fe(e,t)}var yn=function(e,t,n){for(var r=e.dom(),i=ee(n)?n:o(!1);r.parentNode;){r=r.parentNode;var a=We.fromDom(r);if(t(a))return Y.some(a);if(i(a))break}return Y.none()},wn=function(e,t,n){return mn((function(e,t){return t(e)}),yn,e,t,n)},xn=function(e,t){return ge(e.dom().childNodes,(function(e){return t(We.fromDom(e))})).map(We.fromDom)},Cn=function(e,t){function n(e){for(var r=0;r<e.childNodes.length;r++){var o=We.fromDom(e.childNodes[r]);if(t(o))return Y.some(o);if(o=n(e.childNodes[r]),o.isSome())return o}return Y.none()}return n(e.dom())},Sn=function(e,t,n){return yn(e,(function(e){return Mt(e,t)}),n)},kn=function(e,t){return zt(t,e)},Tn=function(e,t,n){return mn(Mt,Sn,e,t,n)},En=function(e,t,n){return ve(Ut(e),(function(e){return Mt(e,t)?n(e)?[e]:[]:En(e,t,n)}))},On={firstLayer:function(e,t){return En(e,t,o(!0))},filterFirstLayer:En},Nn=(De=a(pn,"th,td"),At=a(pn,"tr"),{cell:function(e,t){return hn(["td","th"],e,t)},firstCell:function(e){return kn(e,"th,td")},cells:function(e){return On.firstLayer(e,"th,td")},neighbourCells:De,table:function(e,t){return Tn(e,"table",t)},row:function(e,t){return hn(["tr"],e,t)},rows:function(e){return On.firstLayer(e,"tr")},notCell:function(e,t){return hn(["caption","tr","tbody","tfoot","thead"],e,t)},neighbourRows:At,attr:vn,grid:function(e,t,n){return t=vn(e,t),e=vn(e,n),Kt(t,e)}}),An={fromTable:function(e){return e=Nn.rows(e),ce(e,(function(e){var t=e,n=Ht(t).map((function(e){return e=_e(e),"tfoot"===e||"thead"===e||"tbody"===e?e:"tbody"})).getOr("tbody");e=ce(Nn.cells(e),(function(e){var t=Fe(e,"rowspan")?parseInt(Le(e,"rowspan"),10):1,n=Fe(e,"colspan")?parseInt(Le(e,"colspan"),10):1;return Zt(e,t,n)}));return tn(t,e,n)}))},fromPastedRows:function(e,t){return ce(e,(function(e){var n=ce(Nn.cells(e),(function(e){var t=Fe(e,"rowspan")?parseInt(Le(e,"rowspan"),10):1,n=Fe(e,"colspan")?parseInt(Le(e,"colspan"),10):1;return Zt(e,t,n)}));return tn(e,n,t.section())}))}},Dn={generate:function(e){var t={},n=[],r=e.length,i=0;se(e,(function(e,r){var o=[];se(e.cells(),(function(e){for(var n=0;void 0!==t[r+","+n];)n++;for(var a=en(e.element(),e.rowspan(),e.colspan(),r,n),u=0;u<e.colspan();u++)for(var c=0;c<e.rowspan();c++){var s=n+u;t[r+c+","+s]=a,i=Math.max(i,s+1)}o.push(a)})),n.push(tn(e.element(),o,e.section()))})),e=Kt(r,i);return{grid:o(e),access:o(t),all:o(n)}},getAt:function(e,t,n){return e=e.access()[t+","+n],void 0!==e?Y.some(e):Y.none()},findItem:function(e,t,n){return e=bn(e,(function(e){return n(t,e.element())})),0<e.length?Y.some(e[0]):Y.none()},filterItems:bn,justCells:function(e){return e=ce(e.all(),(function(e){return e.cells()})),pe(e)}},_n=ke("minRow","minCol","maxRow","maxCol"),Rn=function(e,t,n){e=e[n].element(),n=We.fromTag("td"),$t(n,We.fromTag("br")),(t?$t:W)(e,n)},Bn={extract:function(e,t){for(var n,r,o,i,a,u=function(e){return Mt(e.element(),t)},c=An.fromTable(e),s=Dn.generate(c),l=(n=u,l=(d=s).grid().columns(),r=d.grid().rows(),o=l,a=i=0,xe(d.access(),(function(e){var t,u,c;n(e)&&(u=(t=e.row())+e.rowspan()-1,e=(c=e.column())+e.colspan()-1,t<r?r=t:i<u&&(i=u),c<o?o=c:a<e&&(a=e))})),_n(r,o,i,a)),f="th:not("+t+"),td:not("+t+")",d=On.filterFirstLayer(e,"th,td",(function(e){return Mt(e,f)})),m=(se(d,Yt),c),g=s,h=l,p=u,v=g.grid().columns(),b=g.grid().rows(),y=0;y<b;y++)for(var w=!1,x=0;x<v;x++)y<h.minRow()||y>h.maxRow()||x<h.minCol()||x>h.maxCol()||(Dn.getAt(g,y,x).filter(p).isNone()?Rn(m,w,y):w=!0);return d=e,c=l,s=fe(On.firstLayer(d,"tr"),(function(e){return 0===e.dom().childElementCount})),se(s,Yt),c.minCol()!==c.maxCol()&&c.minRow()!==c.maxRow()||se(On.firstLayer(d,"th,td"),(function(e){He(e,"rowspan"),He(e,"colspan")})),He(d,"width"),He(d,"height"),tt(d,"width"),tt(d,"height"),e}};Mn=Me,Pn="text";var Mn,Pn,zn={get:function(e){if(Mn(e))return In(e).getOr("");throw new Error("Can only get "+Pn+" value of a "+Pn+" node")},getOption:In,set:function(e,t){if(!Mn(e))throw new Error("Can only set raw "+Pn+" value of a "+Pn+" node");e.dom().nodeValue=t}};function In(e){return Mn(e)?Y.from(e.dom().nodeValue):Y.none()}function Ln(e){return zn.get(e)}function Fn(e,t){zn.set(e,t)}function Hn(e){return Qn(e,Jn)}function Vn(){var e=We.fromTag("td");return $t(e,We.fromTag("br")),e}function Un(e,t,n){var r=rr(e,t);return xe(n,(function(e,t){null===e?He(r,t):ze(r,t,e)})),r}function jn(e){return e}function Wn(e){return function(){return We.fromTag("tr",e.dom())}}function qn(e,t){return t.column()>=e.startCol()&&t.column()+t.colspan()-1<=e.finishCol()&&t.row()>=e.startRow()&&t.row()+t.rowspan()-1<=e.finishRow()}function $n(e,t,n){t=Dn.findItem(e,t,It);var r=Dn.findItem(e,n,It);return t.bind((function(e){return r.map((function(t){return n=e,t=t,un(Math.min(n.row(),t.row()),Math.min(n.column(),t.column()),Math.max(n.row()+n.rowspan()-1,t.row()+t.rowspan()-1),Math.max(n.column()+n.colspan()-1,t.column()+t.colspan()-1));var n}))}))}function Gn(e){return e=An.fromTable(e),Dn.generate(e)}var Xn=function(e){return zn.getOption(e)},Yn=function(e){return"img"===_e(e)?1:Xn(e).fold((function(){return Ut(e).length}),(function(e){return e.length}))},Kn=["img","br"],Jn=function(e){return Xn(e).filter((function(e){return 0!==e.trim().length||-1<e.indexOf(" ")})).isSome()||ae(Kn,_e(e))},Zn=function(e){return Cn(e,Jn)},Qn=function(e,t){function n(e){for(var r=Ut(e),o=r.length-1;0<=o;o--){var i=r[o];if(t(i))return Y.some(i);if(i=n(i),i.isSome())return i}return Y.none()}return n(e)},er=function(e,t){return We.fromDom(e.dom().cloneNode(t))},tr=function(e){return er(e,!1)},nr=function(e){return er(e,!0)},rr=function(e,t){return t=function(e,t){return t=We.fromTag(t),e=E(e),Ie(t,e),t}(e,t),e=Ut(nr(e)),Xt(t,e),t},or={cellOperations:function(e,t,n){return{row:Wn(t),cell:function(t){var r,o,i,a=H(t.element()),u=(a=We.fromTag(_e(t.element()),a.dom()),n.getOr(["strong","em","b","i","span","font","h1","h2","h3","h4","h5","h6","p","div"])),c=(u=0<u.length?(r=t.element(),o=a,i=u,Zn(r).map((function(e){var t=i.join(",");e=fn(e,t,(function(e){return It(e,r)}));return de(e,(function(e,t){return t=tr(t),He(t,"contenteditable"),$t(e,t),t}),o)})).getOr(o)):a,u=($t(u,We.fromTag("br")),t.element()),a);return u=u.dom(),c=c.dom(),je(u)&&je(c)&&(c.style.cssText=u.style.cssText),tt(a,"height"),1!==t.colspan()&&tt(t.element(),"width"),e(t.element(),a),a},replace:Un,gap:Vn}},paste:function(e){return{row:Wn(e),cell:Vn,replace:jn,gap:Vn}}},ir=function(e,t){var n=t.column(),r=t.column()+t.colspan()-1,o=t.row();t=t.row()+t.rowspan()-1;return n<=e.finishCol()&&r>=e.startCol()&&o<=e.finishRow()&&t>=e.startRow()},ar=function(e,t){for(var n=!0,r=a(qn,t),o=t.startRow();o<=t.finishRow();o++)for(var i=t.startCol();i<=t.finishCol();i++)n=n&&Dn.getAt(e,o,i).exists(r);return n?Y.some(t):Y.none()},ur=$n,cr=function(e,t,n){return $n(e,t,n).bind((function(t){return ar(e,t)}))},sr=function(e,t,n,r){return Dn.findItem(e,t,It).bind((function(t){var o=0<n?t.row()+t.rowspan()-1:t.row();t=0<r?t.column()+t.colspan()-1:t.column();return Dn.getAt(e,o+n,t+r).map((function(e){return e.element()}))}))},lr=function(e,t,n){return ur(e,t,n).map((function(t){return t=Dn.filterItems(e,a(ir,t)),ce(t,(function(e){return e.element()}))}))},fr=function(e,t){return Dn.findItem(e,t,(function(e,t){return Lt(t,e)})).map((function(e){return e.element()}))},dr=function(e,t,n){return Nn.table(e).bind((function(r){return r=Gn(r),sr(r,e,t,n)}))},mr=function(e,t,n){return e=Gn(e),lr(e,t,n)},gr=function(e,t,n,r,o){var i=Gn(e),a=(n=It(e,n)?Y.some(t):fr(i,t),It(e,o)?Y.some(r):fr(i,r));return n.bind((function(e){return a.bind((function(t){return lr(i,e,t)}))}))},hr=function(e,t,n){return e=Gn(e),cr(e,t,n)},pr=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"];function vr(){return{up:o({selector:Sn,closest:Tn,predicate:yn,all:V}),down:o({selector:dn,predicate:ln}),styles:o({get:Ze,getRaw:et,set:Ke,remove:tt}),attrs:o({get:Le,set:ze,remove:He,copyTo:function(e,t){e=E(e),Ie(t,e)}}),insert:o({before:Wt,after:qt,afterAll:$,append:$t,appendAll:Xt,prepend:W,wrap:q}),remove:o({unwrap:X,remove:Yt}),create:o({nu:We.fromTag,clone:function(e){return We.fromDom(e.dom().cloneNode(!1))},text:We.fromText}),query:o({comparePosition:function(e,t){return e.dom().compareDocumentPosition(t.dom())},prevSibling:U,nextSibling:Vt}),property:o({children:Ut,name:_e,parent:Ht,document:function(e){return e.dom().ownerDocument},isText:Me,isComment:T,isElement:Be,getText:Ln,setText:Fn,isBoundary:function(e){return!!Be(e)&&("body"===_e(e)||ae(pr,_e(e)))},isEmptyTag:function(e){return!!Be(e)&&ae(["br","img","hr","input"],_e(e))}}),eq:It,is:Ft}}function br(e,t,n){var r=e.property().children(t);return he(r,a(e.eq,n)).map((function(e){return{before:o(r.slice(0,e)),after:o(r.slice(e+1))}}))}function yr(e,t,n,r){return n=t(e,n),de(r,(function(n,r){return r=t(e,r),Or(e,n,r)}),n)}function wr(e,t,n,r){var o=e.property().children(t);if(e.eq(t,n[0]))return Y.some([n[0]]);if(e.eq(t,r[0]))return Y.some([r[0]]);function i(n){n=be(n);var r=he(n,Nr(e,t)).getOr(-1);n=r<n.length-1?n[r+1]:n[r];return he(o,Nr(e,n))}n=i(n);var a=i(r);return n.bind((function(e){return a.map((function(t){var n=Math.min(e,t);t=Math.max(e,t);return o.slice(n,t+1)}))}))}function xr(e,t,n,r){function i(e){return he(e,r).fold((function(){return e}),(function(t){return e.slice(0,t+1)}))}void 0===r&&(r=s);t=[t].concat(e.up().all(t)),n=[n].concat(e.up().all(n)),t=i(t);var a=i(n);n=ge(t,(function(t){return ue(a,Nr(e,t))}));return{firstpath:o(t),secondpath:o(a),shared:o(n)}}function Cr(e){return Sn(e,"table")}function Sr(e,t){return Lr.cata(t.get(),o([]),i,o([e]))}function kr(e){return{element:o(e),mergable:Y.none,unmergable:Y.none,selection:o([e])}}var Tr=ke("left","right"),Er=ke("first","second","splits"),Or=function(e,t,n){return t.bind((function(t){return n.filter(a(e.eq,t))}))},Nr=function(e,t){return a(e.eq,t)},Ar={sharedOne:function(e,t,n){return 0<n.length?yr(e,t,n[0],n.slice(1)):Y.none()},subset:function(e,t,n){var r=xr(e,t,n);return r.shared().bind((function(t){return wr(e,t,r.firstpath(),r.secondpath())}))},ancestors:xr,breakToLeft:function(e,t,n){return br(e,t,n).map((function(r){var o=e.create().clone(t);return e.insert().appendAll(o,r.before().concat([n])),e.insert().appendAll(t,r.after()),e.insert().before(t,o),Tr(o,t)}))},breakToRight:function(e,t,n){return br(e,t,n).map((function(n){var r=e.create().clone(t);return e.insert().appendAll(r,n.after()),e.insert().after(t,r),Tr(t,r)}))},breakPath:function(e,t,n,r){function o(t,i,a){var u=Er(t,Y.none(),a);return n(t)?Er(t,i,a):e.property().parent(t).bind((function(i){return r(e,i,t).map((function(e){var t=[{first:e.left,second:e.right}],r=n(i)?i:e.left();return o(r,Y.some(e.right()),a.concat(t))}))})).getOr(u)}return o(t,Y.none(),[])}},Dr=vr(),_r={sharedOne:function(e,t){return Ar.sharedOne(Dr,(function(t,n){return e(n)}),t)},subset:function(e,t){return Ar.subset(Dr,e,t)},ancestors:function(e,t,n){return Ar.ancestors(Dr,e,t,n)},breakToLeft:function(e,t){return Ar.breakToLeft(Dr,e,t)},breakToRight:function(e,t){return Ar.breakToRight(Dr,e,t)},breakPath:function(e,t,n){return Ar.breakPath(Dr,e,t,(function(e,t,r){return n(t,r)}))}},Rr={create:S(["boxes","start","finish"],[])},Br=function(e,t,n){function r(e){return function(t){return void 0!==n&&n(t)||It(t,e)}}return It(e,t)?Y.some(Rr.create({boxes:Y.some([e]),start:e,finish:t})):Cr(e).bind((function(o){return Cr(t).bind((function(i){var a,u;return It(o,i)?Y.some(Rr.create({boxes:mr(o,e,t),start:e,finish:t})):Lt(o,i)?(u=0<(a=fn(t,"td,th",r(o))).length?a[a.length-1]:t,Y.some(Rr.create({boxes:gr(o,e,o,t,i),start:e,finish:u}))):Lt(i,o)?(u=0<(a=fn(e,"td,th",r(i))).length?a[a.length-1]:e,Y.some(Rr.create({boxes:gr(i,e,o,t,i),start:e,finish:u}))):_r.ancestors(e,t).shared().bind((function(a){return Tn(a,"table",n).bind((function(n){var a=fn(t,"td,th",r(n)),u=(a=0<a.length?a[a.length-1]:t,fn(e,"td,th",r(n)));u=0<u.length?u[u.length-1]:e;return Y.some(Rr.create({boxes:gr(n,e,o,t,i),start:u,finish:a}))}))}))}))}))},Mr={identify:Br,retrieve:function(e,t){return e=dn(e,t),0<e.length?Y.some(e):Y.none()},shiftSelection:function(e,t,n,r,i){return a=i,ge(e,(function(e){return Mt(e,a)})).bind((function(e){return dr(e,t,n).bind((function(e){return n=r,Sn(t=e,"table").bind((function(e){return kn(e,n).bind((function(e){return Br(e,t).bind((function(e){return e.boxes().map((function(t){return{boxes:o(t),start:o(e.start()),finish:o(e.finish())}}))}))}))}));var t,n}))}));var a},getEdges:function(e,t,n){return kn(e,t).bind((function(t){return kn(e,n).bind((function(e){return _r.sharedOne(Cr,[t,e]).map((function(n){return{first:o(t),last:o(e),table:o(n)}}))}))}))}},Pr=function(e,t){return Mr.retrieve(e,t)},zr=function(e,t,n){return Mr.getEdges(e,t,n).bind((function(t){function n(t){return It(e,t)}var r=Sn(t.first(),"thead,tfoot,tbody,table",n),o=Sn(t.last(),"thead,tfoot,tbody,table",n);return r.bind((function(e){return o.bind((function(n){return It(e,n)?hr(t.table(),t.first(),t.last()):Y.none()}))}))}))},Ir=(Ae="data-mce-selected",Ne="data-mce-first-selected",De="data-mce-last-selected",{selected:o(Ae),selectedSelector:o("td[data-mce-selected],th[data-mce-selected]"),attributeSelector:o("[data-mce-selected]"),firstSelected:o(Ne),firstSelectedSelector:o("td[data-mce-first-selected],th[data-mce-first-selected]"),lastSelected:o(De),lastSelectedSelector:o("td[data-mce-last-selected],th[data-mce-last-selected]")}),Lr=(At=function(t){if(!Z(t))throw new Error("cases must be an array");if(0===t.length)throw new Error("there must be at least one case");var n=[],r={};return se(t,(function(o,i){var a=ye(o);if(1!==a.length)throw new Error("one and only one name per case");var u=a[0],c=o[u];if(void 0!==r[u])throw new Error("duplicate key detected:"+u);if("cata"===u)throw new Error("cannot have a case named cata (sorry)");if(!Z(c))throw new Error("case arguments must be an array");n.push(u),r[u]=function(){var r=arguments.length;if(r!==c.length)throw new Error("Wrong number of arguments to case "+u+". Expected "+c.length+" ("+c+"), got "+r);for(var o=new Array(r),a=0;a<o.length;a++)o[a]=arguments[a];return{fold:function(){if(arguments.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+arguments.length);return arguments[i].apply(null,o)},match:function(e){var t=ye(e);if(n.length!==t.length)throw new Error("Wrong number of arguments to match. Expected: "+n.join(",")+"\nActual: "+t.join(","));if(v(n,(function(e){return ae(t,e)})))return e[u].apply(null,o);throw new Error("Not all branches were specified when using match. Specified: "+t.join(", ")+"\nRequired: "+n.join(", "))},log:function(t){e.console.log(t,{constructors:n,constructor:u,params:o})}}}})),r},Ae=At([{none:[]},{multiple:["elements"]},{single:["selection"]}]),{cata:function(e,t,n,r){return e.fold(t,n,r)},none:Ae.none,multiple:Ae.multiple,single:Ae.single}),Fr=function(e,t){return Lr.cata(t.get(),Y.none,(function(t,n){return 0===t.length?Y.none():zr(e,Ir.firstSelectedSelector(),Ir.lastSelectedSelector()).bind((function(e){return 1<t.length?Y.some({bounds:o(e),cells:o(t)}):Y.none()}))}),Y.none)},Hr=function(e,t){return e=Sr(e,t),0<e.length&&v(e,(function(e){return Fe(e,"rowspan")&&1<parseInt(Le(e,"rowspan"),10)||Fe(e,"colspan")&&1<parseInt(Le(e,"colspan"),10)}))?Y.some(e):Y.none()},Vr=Sr,Ur=(Ne=kr,De=ke("element","clipboard","generators"),{noMenu:kr,forMenu:function(e,t,n){return{element:o(n),mergable:o(Fr(t,e)),unmergable:o(Hr(n,e)),selection:o(Vr(n,e))}},notCell:Ne,paste:De,pasteRows:function(e,t,n,r,i){return{element:o(n),mergable:Y.none,unmergable:Y.none,selection:o(Vr(n,e)),clipboard:o(r),generators:o(i)}}}),jr={registerEvents:function(n,r,o,i){n.on("BeforeGetContent",(function(e){function o(t){e.preventDefault(),Nn.table(t[0]).map(nr).map((function(e){return[Bn.extract(e,Ir.attributeSelector())]})).each((function(t){var r;e.content="text"===e.format?ce(t,(function(e){return e.dom().innerText})).join(""):(r=n,ce(t,(function(e){return r.selection.serializer.serialize(e.dom(),{})})).join(""))}))}!0===e.selection&&Lr.cata(r.get(),t,o,t)})),n.on("BeforeSetContent",(function(t){!0===t.selection&&!0===t.paste&&Y.from(n.dom.getParent(n.selection.getStart(),"th,td")).each((function(r){var a=We.fromDom(r);Nn.table(a).each((function(r){var u,c=fe(function(t,n){return n=(n||e.document).createElement("div"),n.innerHTML=t,Ut(We.fromDom(n))}(t.content),(function(e){return"meta"!==_e(e)}));1===c.length&&"table"===_e(c[0])&&(t.preventDefault(),u=We.fromDom(n.getDoc()),u=or.paste(u),c=Ur.paste(a,c[0],u),o.pasteCells(r,c).each((function(e){n.selection.setRng(e),n.focus(),i.clear(r)})))}))}))}))}};function Wr(e,t){function n(n){var r=t(n);return r<=0||null===r?(n=Ze(n,e),parseFloat(n)||0):r}function r(e,t){return me(t,(function(t,n){return n=Ze(e,n),n=void 0===n?0:parseInt(n,10),isNaN(n)?t:t+n}),0)}return{set:function(t,n){if(!te(n)&&!n.match(/^[0-9]+$/))throw new Error(e+".set accepts only positive integer values. Value was "+n);t=t.dom(),je(t)&&(t.style[e]=n+"px")},get:n,getOuter:n,aggregate:r,max:function(e,t,n){return e=r(e,n),e<t?t-e:0}}}function qr(e){var t=vo(e);return t?bo(t,e,ro,po):ro(e)}function $r(e){return et(e,"width").fold((function(){return Y.from(Le(e,"width"))}),(function(e){return Y.some(e)}))}function Gr(e,t){return{left:o(e),top:o(t),translate:function(n,r){return Gr(e+n,t+r)}}}function Xr(e){return Eo(e).left()+uo(e)}function Yr(e){return Eo(e).left()}function Kr(e,t){return Ao(e,Yr(t))}function Jr(e,t){return Ao(e,Xr(t))}function Zr(e){return Eo(e).top()}function Qr(e,t){return No(e,Zr(t))}function eo(e,t){return No(e,Zr(t)+oo(t))}function to(e,t,n){if(0===n.length)return[];var r=ce(n.slice(1),(function(t,n){return t.map((function(t){return e(n,t)}))})),o=n[n.length-1].map((function(e){return t(n.length-1,e)}));return r.concat([o])}var no=Wr("height",(function(e){var t=e.dom();return qe(e)?t.getBoundingClientRect().height:t.offsetHeight})),ro=function(e){return no.get(e)},oo=function(e){return no.getOuter(e)},io=Wr("width",(function(e){return e.dom().offsetWidth})),ao=function(e){return io.get(e)},uo=function(e){return io.getOuter(e)},co=L(),so=function(e,t){return e=parseFloat(e),isNaN(e)?t:e},lo=function(e,t,n){return so(Ze(e,t),n)},fo=function(e){return co.browser.isIE()||co.browser.isEdge()?(n=lo(t=e,"padding-top",0),r=lo(t,"padding-bottom",0),o=lo(t,"border-top-width",0),i=lo(t,"border-bottom-width",0),a=t.dom().getBoundingClientRect().height,"border-box"===Ze(t,"box-sizing")?a:a-n-r-(o+i)):lo(e,"height",ro(e));var t,n,r,o,i,a},mo=/(\d+(\.\d+)?)(\w|%)*/,go=/(\d+(\.\d+)?)%/,ho=/(\d+(\.\d+)?)px|em/,po=function(e,t){Ke(e,"height",t+"px")},vo=function(e){return et(e,"height").getOrThunk((function(){return fo(e)+"px"}))},bo=function(e,t,n,r){var o,i,a,u=parseInt(e,10);return Ve(e,a="%",e.length-a.length)&&"table"!==_e(t)?(e=t,o=u,i=n,a=r,t=Nn.table(e).map((function(e){return e=i(e),Math.floor(o/100*e)})).getOr(o),a(e,t),t):u},yo=function(e,t){return Fe(e,t)?parseInt(Le(e,t),10):1},wo=function(e,t){return e/t.pixelWidth()*100},xo=function(e,t){return e/100*t.pixelWidth()},Co={percentageBasedSizeRegex:o(go),pixelBasedSizeRegex:o(ho),setPixelWidth:function(e,t){Ke(e,"width",t+"px")},setPercentageWidth:function(e,t){Ke(e,"width",t+"%")},setHeight:po,getPixelWidth:function(e,t){return $r(e).fold((function(){return ao(e)}),(function(n){var r=e,o=t,i=ho.exec(n);return null!==i?parseInt(i[1],10):null!==(i=go.exec(n))?(n=parseFloat(i[1]),xo(n,o)):ao(r)}))},getPercentageWidth:function(e,t){return $r(e).fold((function(){var n=ao(e);return wo(n,t)}),(function(n){return r=e,n=n,o=t,null!==(n=go.exec(n))?parseFloat(n[1]):(n=ao(r),wo(n,o));var r,o}))},getGenericWidth:function(e){return $r(e).bind((function(e){return e=mo.exec(e),null!==e?Y.some({width:o(parseFloat(e[1])),unit:o(e[3])}):Y.none()}))},setGenericWidth:function(e,t,n){Ke(e,"width",t+n)},getHeight:function(e){return t="rowspan",qr(e=e)/yo(e,t);var t},getRawWidth:$r},So=function(e,t){Co.getGenericWidth(e).each((function(n){var r=n.width()/2;Co.setGenericWidth(e,r,n.unit()),Co.setGenericWidth(t,r,n.unit())}))},ko=Gr,To=function(e,t){return void 0!==e?e:void 0!==t?t:0},Eo=function(e){var t=e.dom().ownerDocument,n=t.body,r=t.defaultView;t=t.documentElement;if(n===e.dom())return ko(n.offsetLeft,n.offsetTop);var o=To(r.pageYOffset,t.scrollTop),i=(r=To(r.pageXOffset,t.scrollLeft),To(t.clientTop,n.clientTop));t=To(t.clientLeft,n.clientLeft);return Oo(e).translate(r-t,o-i)},Oo=function(e){var t=e.dom(),n=t.ownerDocument.body;return n===t?ko(n.offsetLeft,n.offsetTop):qe(e)?(n=t,n=n.getBoundingClientRect(),ko(n.left,n.top)):ko(0,0)},No=ke("row","y"),Ao=ke("col","x"),Do={height:{delta:i,positions:function(e){return to(Qr,eo,e)},edge:Zr},rtl:{delta:function(e){return-e},edge:Xr,positions:function(e){return to(Jr,Kr,e)}},ltr:{delta:i,edge:Yr,positions:function(e){return to(Kr,Jr,e)}}},_o={ltr:Do.ltr,rtl:Do.rtl};function Ro(e){function t(t){return e(t).isRtl()?_o.rtl:_o.ltr}return{delta:function(e,n){return t(n).delta(e,n)},edge:function(e){return t(e).edge(e)},positions:function(e,n){return t(n).positions(e,n)}}}function Bo(e){for(var t=[],n=function(e){t.push(e)},r=0;r<e.length;r++)e[r].each(n);return t}function Mo(e,t){for(var n=0;n<e.length;n++){var r=t(e[n],n);if(r.isSome())return r}return Y.none()}function Po(e,t,n,r){n===r?He(e,t):ze(e,t,n)}function zo(e,t){return void 0===(e=Le(e,t))||""===e?[]:e.split(" ")}function Io(e,t){var n,r;n=t,0<(r=fe(zo(t=e,e="class"),(function(e){return e!==n}))).length?ze(t,e,r.join(" ")):He(t,e)}function Lo(e){0===(na(e)?e.dom().classList:zo(e,"class")).length&&He(e,"class")}function Fo(e,t,n){var r=e();return ge(r,t).orThunk((function(){return Y.from(r[0]).orThunk(n)})).map((function(e){return e.element()}))}function Ho(e){var t=e.replace(/\./g,"-");return{resolve:function(e){return t+"-"+e}}}function Vo(e){e=dn(e.parent(),"."+da),se(e,Yt)}function Uo(e,t,n){var r=e.origin();se(t,(function(t,o){t.each((function(t){t=n(r,t),oa(t,da),$t(e.parent(),t)}))}))}function jo(e,t){e=dn(e.parent(),"."+da),se(e,t)}function Wo(e,t){return on(t,e.section())}function qo(e,t){return e.cells()[t]}function $o(e,t){if(0===e.length)return 0;var n=e[0];return he(e,(function(e){return!t(n.element(),e.element())})).fold((function(){return e.length}),(function(e){return e}))}function Go(e,t){return e=pe(ce(e.all(),(function(e){return e.cells()}))),ge(e,(function(e){return It(t,e.element())}))}function Xo(e,t,n,r,i){return function(a,u,c,s,l){var f=An.fromTable(u),d=Dn.generate(f);return t(d,c).map((function(t){var n=wa.toGrid(d,s,!1);n=e(n,t,It,i(s)),t=Ca(n.grid(),s);return{grid:o(t),cursor:n.cursor}})).fold((function(){return Y.none()}),(function(e){var t=ea(u,e.grid());return n(u,e.grid(),l),r(u),va.refresh(a,u,Do.height,l),Y.some({cursor:e.cursor,newRows:t.newRows,newCells:t.newCells})}))}}function Yo(e,t){return Nn.cell(t.element()).bind((function(t){return Go(e,t)}))}function Ko(e,t){var n=ce(t.selection(),(function(t){return Nn.cell(t).bind((function(t){return Go(e,t)}))}));return 0<(n=Bo(n)).length?Y.some({cells:n,generators:t.generators,clipboard:t.clipboard}):Y.none()}function Jo(e,t){return t=ce(t.selection(),(function(t){return Nn.cell(t).bind((function(t){return Go(e,t)}))})),0<(t=Bo(t)).length?Y.some(t):Y.none()}function Zo(e){return{is:function(t){return e===t},isValue:l,isError:s,getOr:o(e),getOrThunk:o(e),getOrDie:o(e),or:function(t){return Zo(e)},orThunk:function(t){return Zo(e)},fold:function(t,n){return n(e)},map:function(t){return Zo(t(e))},mapError:function(t){return Zo(e)},each:function(t){t(e)},bind:function(t){return t(e)},exists:function(t){return t(e)},forall:function(t){return t(e)},toOption:function(){return Y.some(e)}}}function Qo(e){return{is:s,isValue:s,isError:l,getOr:i,getOrThunk:function(e){return e()},getOrDie:function(){throw t=String(e),new Error(t);var t},or:function(e){return e},orThunk:function(e){return e()},fold:function(t,n){return t(e)},map:function(t){return Qo(e)},mapError:function(t){return Qo(t(e))},each:t,bind:function(t){return Qo(e)},exists:s,forall:l,toOption:Y.none}}function ei(e,t,n){return e.concat(aa(t,(function(t){return ba.setCells(e[e.length-1],Ta(e[e.length-1].cells(),n))})))}function ti(e,t,n){return ce(e,(function(e){return ba.setCells(e,e.cells().concat(Ta(ua(0,t),n)))}))}function ni(e,t,n,r){return ce(e,(function(e){return ba.mapCells(e,(function(e){return o=e,ue(t,(function(e){return n(o.element(),e.element())}))?nn(r(e.element(),n),!0):e;var o}))}))}function ri(e,t,n,r){return void 0!==ba.getCellElement(e[t],n)&&0<t&&r(ba.getCellElement(e[t-1],n),ba.getCellElement(e[t],n))}function oi(e,t,n){return 0<t&&n(ba.getCellElement(e,t-1),ba.getCellElement(e,t))}function ii(e,t){return Fe(e,t)&&1<parseInt(Le(e,t),10)}function ai(e,t){return Wa(e,"width",(function(e){return Co.getPixelWidth(e,t)}))}function ui(e){return Wa(e,"height",Co.getHeight)}function ci(e,t,n,r,o){e=sa.columns(e);var i=ce(e,(function(e){return e.map(t.edge)}));return ce(e,(function(e,t){return e.filter(c(ja.hasColspan)).fold((function(){var e=ca(i,t);return r(e)}),(function(e){return n(e,o)}))}))}function si(e){return e.map((function(e){return e+"px"})).getOr("")}function li(e,t,n,r){e=sa.rows(e);var o=ce(e,(function(e){return e.map(t.edge)}));return ce(e,(function(e,t){return e.filter(c(ja.hasRowspan)).fold((function(){var e=ca(o,t);return r(e)}),(function(e){return n(e)}))}))}function fi(e,t,n){for(var r=0,o=e;o<t;o++)r+=void 0!==n[o]?n[o]:0;return r}function di(e){return e=An.fromTable(e),Za(e)}function mi(e,t){0<(t=fe(t,(function(t){return!ae(e,t)}))).length&&Ee(t)}function gi(e){return tu(mi,e,{validate:ee,label:"function"})}function hi(e){var t=Fe(e,"colspan")?parseInt(Le(e,"colspan"),10):1,n=Fe(e,"rowspan")?parseInt(Le(e,"rowspan"),10):1;return{element:o(e),colspan:o(t),rowspan:o(n)}}function pi(e,t){return e=e.property().name(t),ae(iu,e)}function vi(e,t){return ae(["br","img","hr","input"],e.property().name(t))}function bi(e){0===Nn.cells(e).length&&Yt(e)}function yi(e,t,n){return bu(e,t,n).orThunk((function(){return bu(e,0,0)}))}function wi(e,t,n){return vu(e,bu(e,t,n))}function xi(e){return me(e,(function(e,t){return ue(e,(function(e){return e.row()===t.row()}))?e:e.concat([t])}),[]).sort((function(e,t){return e.row()-t.row()}))}function Ci(e){return me(e,(function(e,t){return ue(e,(function(e){return e.column()===t.column()}))?e:e.concat([t])}),[]).sort((function(e,t){return e.column()-t.column()}))}function Si(e,t,n){return e=An.fromPastedRows(e,n),n=Dn.generate(e),wa.toGrid(n,t,!0)}function ki(e){return e.getBoundingClientRect().width}function Ti(e){return e.getBoundingClientRect().height}function Ei(e){return function(t){return It(t,wu(e))}}function Oi(e){var t=dn(e,"td[data-mce-style],th[data-mce-style]");He(e,"data-mce-style"),se(t,(function(e){He(e,"data-mce-style")}))}function Ni(e){return e.getParam("table_default_attributes",Ou,"object")}function Ai(e){return e.getParam("table_default_styles",Eu,"object")}function Di(e){return e.getParam("table_cell_advtab",!0,"boolean")}function _i(e){return e.getParam("table_advtab",!0,"boolean")}function Ri(e){return e.getParam("table_style_by_css",!1,"boolean")}function Bi(e){return e.getParam("table_class_list",[],"array")}function Mi(e){return!1===e.getParam("table_responsive_width")}function Pi(e){return e=e.getParam("table_clone_elements"),J(e)?Y.some(e.split(/[ ,]/)):Array.isArray(e)?Y.some(e):Y.none()}function zi(e,t,n,r){e.fire("ObjectResizeStart",{target:t,width:n,height:r})}function Ii(e,t,n,r){e.fire("ObjectResized",{target:t,width:n,height:r})}function Li(e,t,n,r,o){e.fire("tableselectionchange",{cells:t,start:n,finish:r,otherCells:o})}function Fi(e){e.fire("tableselectionclear")}function Hi(e,t){function n(t){return N(t,"rgb")?e.toHex(t):t}return{borderwidth:et(We.fromDom(t),"border-width").getOr(""),borderstyle:et(We.fromDom(t),"border-style").getOr(""),bordercolor:et(We.fromDom(t),"border-color").map(n).getOr(""),backgroundcolor:et(We.fromDom(t),"background-color").map(n).getOr("")}}function Vi(e,t,n,r,o){var i={};return zu.each(e.split(" "),(function(e){r.formatter.matchNode(o,t+e)&&(i[n]=e)})),i[n]||(i[n]=""),i}function Ui(e,t){e.setAttrib("scope",t.scope),e.setAttrib("class",t.class),e.setStyle("width",xu(t.width)),e.setStyle("height",xu(t.height))}function ji(e,t){e.setStyle("background-color",t.backgroundcolor),e.setStyle("border-color",t.bordercolor),e.setStyle("border-style",t.borderstyle),e.setStyle("border-width",xu(t.borderwidth))}function Wi(e,t,n){var r=n.getData();n.close(),e.undoManager.transact((function(){(1===t.length?Wu:qu)(e,t,r),e.focus()}))}function qi(e,t,n,r){var o=e.dom,i=r.getData(),a=(r.close(),1===t.length?ju.normal:ju.ifTruthy);e.undoManager.transact((function(){zu.each(t,(function(t){i.type!==t.parentNode.nodeName.toLowerCase()&&Yu(e.dom,t,i.type);var r=a(o,t);r.setAttrib("scope",i.scope),r.setAttrib("class",i.class),r.setStyle("height",xu(i.height)),Au(e)&&Ku(r,i),i.align!==n.align&&(Iu.unApplyAlign(e,t),Iu.applyAlign(e,t,i.align))})),e.focus()}))}function $i(e,t,n,r){if("TD"===t.tagName||"TH"===t.tagName)J(n)?e.setStyle(t,n,r):e.setStyle(t,n);else if(t.children)for(var o=0;o<t.children.length;o++)$i(e,t.children[o],n,r)}function Gi(e,t,n){var r,o=e.dom,i=n.getData();n.close(),""===i.class&&delete i.class,e.undoManager.transact((function(){var n,a;t||(n=parseInt(i.cols,10)||1,a=parseInt(i.rows,10)||1,t=sc.insert(e,n,a)),fc(e,t,i),(r=o.select("caption",t)[0])&&!i.caption&&o.remove(r),!r&&i.caption&&((r=o.create("caption")).innerHTML=ec.ie?" ":'<br data-mce-bogus="1"/>',t.insertBefore(r,t.firstChild)),""===i.align?Iu.unApplyAlign(e,t):Iu.applyAlign(e,t,i.align),e.focus(),e.addVisual()}))}function Xi(e){return function(t){return Y.from(t.dom.getParent(t.selection.getStart(),e)).map(We.fromDom)}}function Yi(e){function t(){e.stopPropagation()}function r(){e.preventDefault()}var i,a,u,c,s,l=We.fromDom(e.target),f=n(r,t);return i=e.clientX,a=e.clientY,u=t,c=r,f=f,s=e,{target:o(l),x:o(i),y:o(a),stop:u,prevent:c,kill:f,raw:o(s)}}function Ki(e,t,n,r,o){function i(e){u(e)&&c(Yi(e))}var u,c;return u=n,c=r,e.dom().addEventListener(t,i,o),{unbind:a(Ji,e,t,i,o)}}function Ji(e,t,n,r){e.dom().removeEventListener(t,n,r)}var Zi,Qi=function(e){return e=An.fromTable(e),Dn.generate(e).grid()},ea=function(e,t){function n(t,n){var o,a;0<t.length?(t=t,a=gn(e,o=n).getOrThunk((function(){var t=We.fromTag(o,H(e).dom());return $t(e,t),t})),G(a),t=ce(t,(function(e){e.isNew()&&r.push(e.element());var t=e.element();return G(t),se(e.cells(),(function(e){e.isNew()&&i.push(e.element()),Po(e.element(),"colspan",e.colspan(),1),Po(e.element(),"rowspan",e.rowspan(),1),$t(t,e.element())})),t})),Xt(a,t)):gn(e,n).each(Yt)}var r=[],i=[],a=[],u=[],c=[];return se(t,(function(e){switch(e.section()){case"thead":a.push(e);break;case"tbody":u.push(e);break;case"tfoot":c.push(e)}})),n(a,"thead"),n(u,"tbody"),n(c,"tfoot"),{newRows:o(r),newCells:o(i)}},ta=function(e){return ce(e,(function(e){var t=tr(e.element());return se(e.cells(),(function(e){var n=nr(e.element());Po(n,"colspan",e.colspan(),1),Po(n,"rowspan",e.rowspan(),1),$t(t,n)})),t}))},na=function(e){return void 0!==e.dom().classList},ra=function(e,t){var n="class";return t=zo(e,n).concat([t]),ze(e,n,t.join(" ")),!0},oa=function(e,t){na(e)?e.dom().classList.add(t):ra(e,t)},ia=function(e,t){return na(e)&&e.dom().classList.contains(t)},aa=function(e,t){for(var n=[],r=0;r<e;r++)n.push(t(r));return n},ua=function(e,t){for(var n=[],r=e;r<t;r++)n.push(r);return n},ca=function(e,t){if(t<0||t>=e.length-1)return Y.none();var n=e[t].fold((function(){var n=be(e.slice(0,t));return Mo(n,(function(e,t){return e.map((function(e){return{value:e,delta:t+1}}))}))}),(function(e){return Y.some({value:e,delta:0})})),r=e[t+1].fold((function(){var n=e.slice(t+1);return Mo(n,(function(e,t){return e.map((function(e){return{value:e,delta:t+1}}))}))}),(function(e){return Y.some({value:e,delta:1})}));return n.bind((function(e){return r.map((function(t){var n=t.delta+e.delta;return Math.abs(t.value-e.value)/n}))}))},sa={columns:function(e){var t=e.grid(),n=ua(0,t.columns()),r=ua(0,t.rows());return ce(n,(function(t){return Fo((function(){return ve(r,(function(n){return Dn.getAt(e,n,t).filter((function(e){return e.column()===t})).fold(o([]),(function(e){return[e]}))}))}),(function(e){return 1===e.colspan()}),(function(){return Dn.getAt(e,0,t)}))}))},rows:function(e){var t=e.grid(),n=ua(0,t.rows()),r=ua(0,t.columns());return ce(n,(function(t){return Fo((function(){return ve(r,(function(n){return Dn.getAt(e,t,n).filter((function(e){return e.row()===t})).fold(o([]),(function(e){return[e]}))}))}),(function(e){return 1===e.rowspan()}),(function(){return Dn.getAt(e,t,0)}))}))}},la=(Ae={resolve:Ho("ephox-snooker").resolve},function(e,t,n,r,o){var i=We.fromTag("div");return Je(i,{position:"absolute",left:t-r/2+"px",top:n+"px",height:o+"px",width:r+"px"}),Ie(i,{"data-column":e,role:"presentation"}),i}),fa=function(e,t,n,r,o){var i=We.fromTag("div");return Je(i,{position:"absolute",left:t+"px",top:n-o/2+"px",height:o+"px",width:r+"px"}),Ie(i,{"data-row":e,role:"presentation"}),i},da=Ae.resolve("resizer-bar"),ma=Ae.resolve("resizer-rows"),ga=Ae.resolve("resizer-cols"),ha=function(e,t,n,r){Uo(e,t,(function(e,t){return t=la(t.col(),t.x()-e.left(),n.top()-e.top(),7,r),oa(t,ga),t}))},pa=function(e,t,n,r){Uo(e,t,(function(e,t){return t=fa(t.row(),n.left()-e.left(),t.y()-e.top(),r,7),oa(t,ma),t}))},va={refresh:function(e,t,n,r){Vo(e);var o,i=An.fromTable(t),a=(i=Dn.generate(i),sa.rows(i));i=sa.columns(i);e=e,a=a,i=i,n=n,r=r,o=Eo(t=t),n=0<a.length?n.positions(a,t):[],pa(e,n,o,uo(t)),a=0<i.length?r.positions(i,t):[],ha(e,a,o,oo(t))},hide:function(e){jo(e,(function(e){Ke(e,"display","none")}))},show:function(e){jo(e,(function(e){Ke(e,"display","block")}))},destroy:Vo,isRowBar:function(e){return ia(e,ma)},isColBar:function(e){return ia(e,ga)}},ba={addCell:function(e,t,n){var r=e.cells(),o=r.slice(0,t);r=r.slice(t),t=o.concat([n]).concat(r);return Wo(e,t)},setCells:Wo,mutateCell:function(e,t,n){e.cells()[t]=n},getCell:qo,getCellElement:function(e,t){return qo(e,t).element()},mapCells:function(e,t){var n=e.cells();n=ce(n,t);return on(n,e.section())},cellLength:function(e){return e.cells().length}},ya=function(e,t,n,r){var i,a=e[t].cells().slice(n);a=$o(a,r),i=n,n=ce(e,(function(e){return ba.getCell(e,i)})).slice(t),e=$o(n,r);return{colspan:o(a),rowspan:o(e)}},wa={toDetails:function(e,t){var n=ce(e,(function(e,t){return ce(e.cells(),(function(e,t){return!1}))}));return ce(e,(function(r,o){var i=ve(r.cells(),(function(r,i){if(!1!==n[o][i])return[];for(var a=ya(e,o,i,t),u=o,c=i,s=a.rowspan(),l=a.colspan(),f=u;f<u+s;f++)for(var d=c;d<c+l;d++)n[f][d]=!0;return[Qt(r.element(),a.rowspan(),a.colspan(),r.isNew())]}));return an(i,r.section())}))},toGrid:function(e,t,n){for(var r=[],o=0;o<e.grid().rows();o++){for(var i=[],a=0;a<e.grid().columns();a++){var u=Dn.getAt(e,o,a).map((function(e){return nn(e.element(),n)})).getOrThunk((function(){return nn(t.gap(),!0)}));i.push(u)}var c=on(i,e.all()[o].section());r.push(c)}return r}},xa=function(e,t){return ce(e,(function(e){n=e.details();var n=Mo(n,(function(e){return Ht(e.element()).map((function(e){var t=Ht(e).isNone();return nn(e,t)}))})).getOrThunk((function(){return nn(t.row(),!0)}));return rn(n.element(),e.details(),e.section(),n.isNew())}))},Ca=function(e,t){return e=wa.toDetails(e,It),xa(e,t)},Sa=Zo,ka=Qo,Ta=function(e,t){return ce(e,(function(){return nn(t.cell(),!0)}))},Ea=function(e,t,n){if(e.row()>=t.length||e.column()>ba.cellLength(t[0]))return ka("invalid start address out of table bounds, row: "+e.row()+", column: "+e.column());t=t.slice(e.row()),e=t[0].cells().slice(e.column());var r=ba.cellLength(n[0]);n=n.length;return Sa({rowDelta:o(t.length-n),colDelta:o(e.length-r)})},Oa=function(e,t){return e=ba.cellLength(e[0]),t=ba.cellLength(t[0]),{rowDelta:o(0),colDelta:o(e-t)}},Na=function(e,t,n){var r=t.colDelta()<0?ti:i;return(t.rowDelta()<0?ei:i)(r(e,Math.abs(t.colDelta()),n),Math.abs(t.rowDelta()),n)},Aa={merge:function(e,t,n,r){if(0===e.length)return e;for(var o=t.startRow();o<=t.finishRow();o++)for(var i=t.startCol();i<=t.finishCol();i++)ba.mutateCell(e[o],i,nn(r(),!1));return e},unmerge:function(e,t,n,r){for(var o=!0,i=0;i<e.length;i++)for(var a=0;a<ba.cellLength(e[0]);a++){var u=n(ba.getCellElement(e[i],a),t);!0===u&&!1===o?ba.mutateCell(e[i],a,nn(r(),!0)):!0===u&&(o=!1)}return e},splitRows:function(e,t,n,r){var o,i;return 0<t&&t<e.length&&(o=e[t-1].cells(),i=n,o=me(o,(function(e,t){return ue(e,(function(e){return i(e.element(),t.element())}))?e:e.concat([t])}),[]),se(o,(function(o){for(var i=Y.none(),a=function(t){for(var a=0;a<ba.cellLength(e[0]);a++)!function(a){var u=e[t].cells()[a];n(u.element(),o.element())&&(i=i.isNone()?Y.some(r()):i).each((function(n){ba.mutateCell(e[t],a,nn(n,!0))}))}(a)},u=t;u<e.length;u++)a(u)}))),e}},Da=function(e,t,n,r){r=a(r,ba.getCell(e[t],n).element());var o=e[t];return 1<e.length&&1<ba.cellLength(o)&&(0<n&&r(ba.getCellElement(o,n-1))||n<o.cells().length-1&&r(ba.getCellElement(o,n+1))||0<t&&r(ba.getCellElement(e[t-1],n))||t<e.length-1&&r(ba.getCellElement(e[t+1],n)))},_a=function(e,t,n,r,o){return Ea(e,t,n).map((function(i){i=Na(t,i,r);for(var a=e,u=i,c=n,s=r,l=o,f=a.row(),d=a.column(),m=f+c.length,g=d+ba.cellLength(c[0]),h=f;h<m;h++)for(var p=d;p<g;p++){Da(u,h,p,l)&&Aa.unmerge(u,ba.getCellElement(u[h],p),l,s.cell);var v=ba.getCellElement(c[h-f],p-d);v=s.replace(v);ba.mutateCell(u[h],p,nn(v,!0))}return u}))},Ra=function(e,t,n,r,o){return Aa.splitRows(t,e,o,r.cell),o=Oa(n,t),n=Na(n,o,r),o=Oa(t,n),t=Na(t,o,r),t.slice(0,e).concat(n).concat(t.slice(e,t.length))},Ba=function(e,t,n,r,o){var i=e.slice(0,t),a=e.slice(t);n=ba.mapCells(e[n],(function(n,i){return 0<t&&t<e.length&&r(ba.getCellElement(e[t-1],i),ba.getCellElement(e[t],i))?ba.getCell(e[t],i):nn(o(n.element(),r),!0)}));return i.concat([n]).concat(a)},Ma=function(e,t,n,r,o){return ce(e,(function(e){var i=0<t&&t<ba.cellLength(e)&&r(ba.getCellElement(e,t-1),ba.getCellElement(e,t))?ba.getCell(e,t):nn(o(ba.getCellElement(e,n),r),!0);return ba.addCell(e,t,i)}))},Pa=function(e,t,n,r,o){var i=n+1;return ce(e,(function(e,a){return a=a===t?nn(o(ba.getCellElement(e,n),r),!0):ba.getCell(e,n),ba.addCell(e,i,a)}))},za=function(e,t,n,r,o){var i=t+1,a=e.slice(0,i);i=e.slice(i),e=ba.mapCells(e[t],(function(e,t){return t===n?nn(o(e.element(),r),!0):e}));return a.concat([e]).concat(i)},Ia=function(e,t,n){return e.slice(0,t).concat(e.slice(n+1))},La=function(e,t,n){return e=ce(e,(function(e){var r=e.cells().slice(0,t).concat(e.cells().slice(n+1));return on(r,e.section())})),fe(e,(function(e){return 0<e.cells().length}))},Fa=function(e,t,n,r){var o=ve(e,(function(r,o){return ri(e,o,t,n)||oi(r,t,n)?[]:[ba.getCell(r,t)]}));return ni(e,o,n,r)},Ha=function(e,t,n,r){var o=e[t],i=ve(o.cells(),(function(r,i){return ri(e,t,i,n)||oi(o,i,n)?[]:[r]}));return ni(e,i,n,r)},Va=(Ne=At([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}]),rt({},Ne)),Ua=function(e,t,n,r){function i(e){return ce(e,o(0))}function a(e,t){var o,a;return 0<=n?(o=Math.max(r.minCellWidth(),u[t]-n),i(u.slice(0,e)).concat([n,o-u[t]]).concat(i(u.slice(t+1)))):(o=Math.max(r.minCellWidth(),u[e]+n),a=u[e]-o,i(u.slice(0,e)).concat([o-u[e],a]).concat(i(u.slice(t+1))))}var u=e.slice(0);t=t,e=0===(e=e).length?Va.none():1===e.length?Va.only(0):0===t?Va.left(0,1):t===e.length-1?Va.right(t-1,t):0<t&&t<e.length-1?Va.middle(t-1,t,t+1):Va.none(),t=o(i(u));return e.fold(t,(function(e){return r.singleColumnWidth(u[e],n)}),a,(function(e,t,n){return a(t,n)}),(function(e,t){var o;return 0<=n?i(u.slice(0,t)).concat([n]):(o=Math.max(r.minCellWidth(),u[t]+n),i(u.slice(0,t)).concat([o-u[t]]))}))},ja={hasColspan:function(e){return ii(e,"colspan")},hasRowspan:function(e){return ii(e,"rowspan")},minWidth:o(10),minHeight:o(10),getInt:function(e,t){return parseInt(Ze(e,t),10)}},Wa=function(e,t,n){return et(e,t).fold((function(){return n(e)+"px"}),(function(e){return e}))},qa={getRawWidths:function(e,t,n){return ci(e,t,ai,si,n)},getPixelWidths:function(e,t,n){return ci(e,t,Co.getPixelWidth,(function(e){return e.getOrThunk(n.minCellWidth)}),n)},getPercentageWidths:function(e,t,n){return ci(e,t,Co.getPercentageWidth,(function(e){return e.fold((function(){return n.minCellWidth()}),(function(e){return e/n.pixelWidth()*100}))}),n)},getPixelHeights:function(e,t){return li(e,t,Co.getHeight,(function(e){return e.getOrThunk(ja.minHeight)}))},getRawHeights:function(e,t){return li(e,t,ui,si)}},$a=function(e,t){return e=Dn.justCells(e),ce(e,(function(e){var n=fi(e.column(),e.column()+e.colspan(),t);return{element:e.element,width:o(n),colspan:e.colspan}}))},Ga=function(e,t){return e=Dn.justCells(e),ce(e,(function(e){var n=fi(e.row(),e.row()+e.rowspan(),t);return{element:e.element,height:o(n),rowspan:e.rowspan}}))},Xa=function(e,t){return ce(e.all(),(function(e,n){return{element:e.element,height:o(t[n])}}))},Ya=function(e,t){var n=parseFloat(e),r=ao(t);return{width:o(n),pixelWidth:o(r),getWidths:qa.getPercentageWidths,getCellDelta:function(e){return e/r*100},singleColumnWidth:function(e,t){return[100-e]},minCellWidth:function(){return ja.minWidth()/r*100},setElementWidth:Co.setPercentageWidth,setTableWidth:function(e,t,r){Co.setPercentageWidth(e,n+r/100*n)}}},Ka=function(e){var t=i;return{width:o(e),pixelWidth:o(e),getWidths:qa.getPixelWidths,getCellDelta:t,singleColumnWidth:function(e,t){return[Math.max(ja.minWidth(),e+t)-e]},minCellWidth:ja.minWidth,setElementWidth:Co.setPixelWidth,setTableWidth:function(e,t,n){t=de(t,(function(e,t){return e+t}),0),Co.setPixelWidth(e,t)}}},Ja=function(e){return Co.getRawWidth(e).fold((function(){var t=ao(e);return Ka(t)}),(function(t){var n=e,r=Co.percentageBasedSizeRegex().exec(t);return null!==r?Ya(r[1],n):null!==(r=Co.pixelBasedSizeRegex().exec(t))?(t=parseInt(r[1],10),Ka(t)):(r=ao(n),Ka(r))}))},Za=function(e){return Dn.generate(e)},Qa=function(e,t,n,r){var o=Ja(e),i=(t=o.getCellDelta(t),di(e)),a=o.getWidths(i,r,o),u=(r=Ua(a,n,t,o),r=ce(r,(function(e,t){return e+a[t]})),$a(i,r));se(u,(function(e){o.setElementWidth(e.element(),e.width())})),n===i.grid().columns()-1&&o.setTableWidth(e,r,t)},eu=function(e,t,n,r){var o=di(e),i=(r=qa.getPixelHeights(o,r),r=ce(r,(function(e,r){return n===r?Math.max(t+e,ja.minHeight()):e})),Ga(o,r));o=Xa(o,r),se(o,(function(e){Co.setHeight(e.element(),e.height())})),se(i,(function(e){Co.setHeight(e.element(),e.height())})),o=de(r,(function(e,t){return e+t}),0);Co.setHeight(e,o)},tu=(De=function(e,t,n){var r=Ja(e);t=Za(t),n=r.getWidths(t,n,r),t=$a(t,n);se(t,(function(e){r.setElementWidth(e.element(),e.width())})),0<t.length&&r.setTableWidth(e,n,r.getCellDelta(0))},function(e,t,n){if(0===t.length)throw new Error("You must specify at least one required field.");return x("required",t),C(t),function(r){var o,i=ye(r),a=(v(t,(function(e){return ae(i,e)}))||w(t,i),e(t,i),fe(t,(function(e){return!n.validate(r[e],e)})));if(0<a.length)throw o=n.label,new Error("All values need to be of type: "+o+". Keys ("+Te(a).join(", ")+") were not.");return r}}),nu=gi(["cell","row","replace","gap"]),ru=(Ne=function(e,t){function n(e){var t=i(e);return o.get().isNone()&&o.set(Y.some(t)),a=Y.some({item:e,replacement:t}),t}void 0===t&&(t=hi),nu(e);var o=r(Y.none()),i=function(n){return n=t(n),e.cell(n)},a=Y.none();return{getOrInit:function(e,t){return a.fold((function(){return n(e)}),(function(r){return t(e,r.item)?r.replacement:n(e)}))},cursor:o.get}},function(e,t){return function(n){var o=r(Y.none()),i=(nu(n),[]),a=function(e,t){return ge(i,(function(n){return t(n.item,e)}))},u=function(r){var a=n.replace(r,t,{scope:e});return i.push({item:r,sub:a}),o.get().isNone()&&o.set(Y.some(a)),a};return{replaceOrInit:function(e,t){return a(e,t).fold((function(){return u(e)}),(function(n){return t(e,n.item)?n.sub:u(e)}))},cursor:o.get}}}),ou=function(e){nu(e);var t=r(Y.none());return{combine:function(n){return t.get().isNone()&&t.set(Y.some(n)),function(){var t=e.cell({element:o(n),colspan:o(1),rowspan:o(1)});return tt(t,"width"),tt(n,"width"),t}},cursor:t.get}},iu=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","table","thead","tfoot","tbody","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"],au=pi,uu=function(e,t){return e=e.property().name(t),ae(["ol","ul"],e)},cu=function(e,t){return e=e.property().name(t),ae(["address","pre","p","h1","h2","h3","h4","h5","h6"],e)},su=function(e,t){return e=e.property().name(t),ae(["h1","h2","h3","h4","h5","h6"],e)},lu=function(e,t){return ae(["div","li","td","th","blockquote","body","caption"],e.property().name(t))},fu=vi,du=function(e,t){return"iframe"===e.property().name(t)},mu=function(e,t){return!(pi(e,t)||vi(e,t))&&"li"!==e.property().name(t)},gu=vr(),hu={isBlock:function(e){return au(gu,e)},isList:function(e){return uu(gu,e)},isFormatting:function(e){return cu(gu,e)},isHeading:function(e){return su(gu,e)},isContainer:function(e){return lu(gu,e)},isEmptyTag:function(e){return fu(gu,e)},isFrame:function(e){return du(gu,e)},isInline:function(e){return mu(gu,e)}},pu=function(e){var t=function(e){return"br"===_e(e)},n=function(e){return"li"===_e(e)||yn(e,hu.isList).isSome()},r=function(e){return Vt(e).map((function(e){return!!hu.isBlock(e)||!!hu.isEmptyTag(e)&&"img"!==_e(e)})).getOr(!1)},o=0===(o=ve(e,(function(e){var o,i=Ut(e);return v(i,(function(e){return t(e)||Me(e)&&0===Ln(e).trim().length}))?[]:i.concat(Hn(o=e).bind((function(e){var i=r(e);return Ht(e).map((function(r){return!0===i||n(r)||t(e)||hu.isBlock(r)&&!It(o,r)?[]:[We.fromTag("br")]}))})).getOr([]))}))).length?[We.fromTag("br")]:o;G(e[0]),Xt(e[0],o)},vu=ke("grid","cursor"),bu=function(e,t,n){return Y.from(e[t]).bind((function(e){return Y.from(e.cells()[n]).bind((function(e){return Y.from(e.element())}))}))},yu={insertRowBefore:Xo((function(e,t,n,r){var o=t.row(),i=t.row();e=Ba(e,i,o,n,r.getOrInit);return wi(e,i,t.column())}),Yo,t,t,Ne),insertRowsBefore:Xo((function(e,t,n,r){var o=t[0].row(),i=t[0].row(),a=xi(t);a=me(a,(function(e,t){return Ba(e,i,o,n,r.getOrInit)}),e);return wi(a,i,t[0].column())}),Jo,t,t,Ne),insertRowAfter:Xo((function(e,t,n,r){var o=t.row(),i=t.row()+t.rowspan();e=Ba(e,i,o,n,r.getOrInit);return wi(e,i,t.column())}),Yo,t,t,Ne),insertRowsAfter:Xo((function(e,t,n,r){var o=xi(t),i=o[o.length-1].row(),a=o[o.length-1].row()+o[o.length-1].rowspan();o=me(o,(function(e,t){return Ba(e,a,i,n,r.getOrInit)}),e);return wi(o,a,t[0].column())}),Jo,t,t,Ne),insertColumnBefore:Xo((function(e,t,n,r){var o=t.column(),i=t.column();e=Ma(e,i,o,n,r.getOrInit);return wi(e,t.row(),i)}),Yo,De,t,Ne),insertColumnsBefore:Xo((function(e,t,n,r){var o=Ci(t),i=o[0].column(),a=o[0].column();o=me(o,(function(e,t){return Ma(e,a,i,n,r.getOrInit)}),e);return wi(o,t[0].row(),a)}),Jo,De,t,Ne),insertColumnAfter:Xo((function(e,t,n,r){var o=t.column(),i=t.column()+t.colspan();e=Ma(e,i,o,n,r.getOrInit);return wi(e,t.row(),i)}),Yo,De,t,Ne),insertColumnsAfter:Xo((function(e,t,n,r){var o=t[t.length-1].column(),i=t[t.length-1].column()+t[t.length-1].colspan(),a=Ci(t);a=me(a,(function(e,t){return Ma(e,i,o,n,r.getOrInit)}),e);return wi(a,t[0].row(),i)}),Jo,De,t,Ne),splitCellIntoColumns:Xo((function(e,t,n,r){return e=Pa(e,t.row(),t.column(),n,r.getOrInit),wi(e,t.row(),t.column())}),Yo,De,t,Ne),splitCellIntoRows:Xo((function(e,t,n,r){return e=za(e,t.row(),t.column(),n,r.getOrInit),wi(e,t.row(),t.column())}),Yo,t,t,Ne),eraseColumns:Xo((function(e,t,n,r){var o=Ci(t);e=La(e,o[0].column(),o[o.length-1].column()),o=yi(e,t[0].row(),t[0].column());return vu(e,o)}),Jo,De,bi,Ne),eraseRows:Xo((function(e,t,n,r){var o=xi(t);e=Ia(e,o[0].row(),o[o.length-1].row()),o=yi(e,t[0].row(),t[0].column());return vu(e,o)}),Jo,t,bi,Ne),makeColumnHeader:Xo((function(e,t,n,r){return e=Fa(e,t.column(),n,r.replaceOrInit),wi(e,t.row(),t.column())}),Yo,t,t,ru("row","th")),unmakeColumnHeader:Xo((function(e,t,n,r){return e=Fa(e,t.column(),n,r.replaceOrInit),wi(e,t.row(),t.column())}),Yo,t,t,ru(null,"td")),makeRowHeader:Xo((function(e,t,n,r){return e=Ha(e,t.row(),n,r.replaceOrInit),wi(e,t.row(),t.column())}),Yo,t,t,ru("col","th")),unmakeRowHeader:Xo((function(e,t,n,r){return e=Ha(e,t.row(),n,r.replaceOrInit),wi(e,t.row(),t.column())}),Yo,t,t,ru(null,"td")),mergeCells:Xo((function(e,t,n,r){var i=t.cells();pu(i),e=Aa.merge(e,t.bounds(),n,o(i[0]));return vu(e,Y.from(i[0]))}),(function(e,t){return t.mergable()}),t,t,ou),unmergeCells:Xo((function(e,t,n,r){return e=de(t,(function(e,t){return Aa.unmerge(e,t,n,r.combine(t))}),e),vu(e,Y.from(t[0]))}),(function(e,t){return t.unmergable()}),De,t,ou),pasteCells:Xo((function(e,t,n,r){var o=function(e,t){return e=An.fromTable(e),e=Dn.generate(e),wa.toGrid(e,t,!0)}(t.clipboard(),t.generators()),i=Jt(t.row(),t.column());return _a(i,e,o,t.generators(),n).fold((function(){return vu(e,Y.some(t.element()))}),(function(e){var n=yi(e,t.row(),t.column());return vu(e,n)}))}),(function(e,t){return Nn.cell(t.element()).bind((function(n){return Go(e,n).map((function(e){return rt(rt({},e),{generators:t.generators,clipboard:t.clipboard})}))}))}),De,t,Ne),pasteRowsBefore:Xo((function(e,t,n,r){var o=e[t.cells[0].row()],i=t.cells[0].row();o=Si(t.clipboard(),t.generators(),o),i=Ra(i,e,o,t.generators(),n),e=yi(i,t.cells[0].row(),t.cells[0].column());return vu(i,e)}),Ko,t,t,Ne),pasteRowsAfter:Xo((function(e,t,n,r){var o=e[t.cells[0].row()],i=t.cells[t.cells.length-1].row()+t.cells[t.cells.length-1].rowspan();o=Si(t.clipboard(),t.generators(),o),i=Ra(i,e,o,t.generators(),n),e=yi(i,t.cells[0].row(),t.cells[0].column());return vu(i,e)}),Ko,t,t,Ne)},wu=function(e){return We.fromDom(e.getBody())},xu=function(e){return/^[0-9]+$/.test(e)&&(e+="px"),e},Cu={isRtl:o(!1)},Su={isRtl:o(!0)},ku={directionAt:function(e){return"rtl"==("rtl"===Ze(e,"direction")?"rtl":"ltr")?Su:Cu}},Tu="tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol",Eu={"border-collapse":"collapse",width:"100%"},Ou={border:"1"},Nu=function(e){return e.getParam("table_tab_navigation",!0,"boolean")},Au=function(e){return e.getParam("table_row_advtab",!0,"boolean")},Du=function(e){return e.getParam("table_cell_class_list",[],"array")},_u=function(e){return e.getParam("table_row_class_list",[],"array")},Ru=function(e,t){return e.fire("newrow",{node:t})},Bu=function(e,t){return e.fire("newcell",{node:t})},Mu=function(e,n){function r(e){return"table"===_e(wu(e))}function o(t,n,r,o){return function(a,u){Oi(a);var c=o(),s=We.fromDom(e.getDoc()),l=Ro(ku.directionAt);s=or.cellOperations(r,s,i);return n(a)?t(c,a,u,s,l).bind((function(t){return se(t.newRows(),(function(t){Ru(e,t.dom())})),se(t.newCells(),(function(t){Bu(e,t.dom())})),t.cursor().map((function(t){var n=e.dom.createRng();return n.setStart(t.dom(),0),n.setEnd(t.dom(),0),n}))})):Y.none()}}var i=Pi(e);return{deleteRow:o(yu.eraseRows,(function(t){return t=Qi(t),!1===r(e)||1<t.rows()}),t,n),deleteColumn:o(yu.eraseColumns,(function(t){return t=Qi(t),!1===r(e)||1<t.columns()}),t,n),insertRowsBefore:o(yu.insertRowsBefore,l,t,n),insertRowsAfter:o(yu.insertRowsAfter,l,t,n),insertColumnsBefore:o(yu.insertColumnsBefore,l,So,n),insertColumnsAfter:o(yu.insertColumnsAfter,l,So,n),mergeCells:o(yu.mergeCells,l,t,n),unmergeCells:o(yu.unmergeCells,l,t,n),pasteRowsBefore:o(yu.pasteRowsBefore,l,t,n),pasteRowsAfter:o(yu.pasteRowsAfter,l,t,n),pasteCells:o(yu.pasteCells,l,t,n)}},Pu=function(e,t,n){e=An.fromTable(e);var r=Dn.generate(e);return Jo(r,t).map((function(e){return e=wa.toGrid(r,n,!1).slice(e[0].row(),e[e.length-1].row()+e[e.length-1].rowspan()),e=Ca(e,n),ta(e)}))},zu=tinymce.util.Tools.resolve("tinymce.util.Tools"),Iu={applyAlign:function(e,t,n){n&&e.formatter.apply("align"+n,{},t)},applyVAlign:function(e,t,n){n&&e.formatter.apply("valign"+n,{},t)},unApplyAlign:function(e,t){zu.each("left center right".split(" "),(function(n){e.formatter.remove("align"+n,{},t)}))},unApplyVAlign:function(e,t){zu.each("top middle bottom".split(" "),(function(n){e.formatter.remove("valign"+n,{},t)}))},getTDTHOverallStyle:function(e,t,n){for(var r=void 0,o=e.select("td,th",t),i=0;i<o.length;i++){var a=e.getStyle(o[i],n);if((r=void 0===r?a:r)!==a)return""}return r}},Lu=a(Vi,"left center right"),Fu=a(Vi,"top middle bottom"),Hu={buildListItems:function(e,t,n){function r(e,n){return n=n||[],zu.each(e,(function(e){var o={text:e.text||e.title};e.menu?o.menu=r(e.menu):(o.value=e.value,t&&t(o)),n.push(o)})),n}return r(e,n||[])},extractAdvancedStyles:Hi,getSharedValues:function(e){var t=e[0],n=(e=e.slice(1),ye(t));return se(e,(function(e){se(n,(function(n){xe(e,(function(e,r){var o=t[n];""!==o&&n===r&&o!==e&&(t[n]="")}))}))})),t},getAdvancedTab:function(e){var t=[{name:"borderstyle",type:"selectbox",label:"Border style",items:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]},{name:"bordercolor",type:"colorinput",label:"Border color"},{name:"backgroundcolor",type:"colorinput",label:"Background color"}];return{title:"Advanced",name:"advanced",items:"cell"===e?[{name:"borderwidth",type:"input",label:"Border width"}].concat(t):t}},extractDataFromTableElement:function(e,t,n){var r,o,i,a=e.dom;return rt(rt({width:a.getStyle(t,"width")||a.getAttrib(t,"width"),height:a.getStyle(t,"height")||a.getAttrib(t,"height"),cellspacing:a.getStyle(t,"border-spacing")||a.getAttrib(t,"cellspacing"),cellpadding:a.getAttrib(t,"cellpadding")||Iu.getTDTHOverallStyle(e.dom,t,"padding"),border:(r=a,o=t,i=et(We.fromDom(o),"border-width"),Ri(e)&&i.isSome()?i.getOr(""):r.getAttrib(o,"border")||Iu.getTDTHOverallStyle(e.dom,o,"border-width")||Iu.getTDTHOverallStyle(e.dom,o,"border")),caption:!!a.select("caption",t)[0],class:a.getAttrib(t,"class","")},Lu("align","align",e,t)),n?Hi(a,t):{})},extractDataFromRowElement:function(e,t,n){var r=e.dom;return rt(rt({height:r.getStyle(t,"height")||r.getAttrib(t,"height"),scope:r.getAttrib(t,"scope"),class:r.getAttrib(t,"class",""),align:"",type:t.parentNode.nodeName.toLowerCase()},Lu("align","align",e,t)),n?Hi(r,t):{})},extractDataFromCellElement:function(e,t,n){var r=e.dom;return rt(rt(rt({width:r.getStyle(t,"width")||r.getAttrib(t,"width"),height:r.getStyle(t,"height")||r.getAttrib(t,"height"),scope:r.getAttrib(t,"scope"),celltype:t.nodeName.toLowerCase(),class:r.getAttrib(t,"class","")},Lu("align","halign",e,t)),Fu("valign","valign",e,t)),n?Hi(r,t):{})},extractDataFromSettings:function(e,t){var n,r,o=Ai(e),i=Ni(e),a=e.dom;t=t?(n=a,t=y(o,"border-style").getOr(""),a=y(o,"border-color").getOr(""),r=y(o,"background-color").getOr(""),{borderstyle:t,bordercolor:u(a),backgroundcolor:u(r)}):{};function u(e){return N(e,"rgb")?n.toHex(e):e}return rt(rt(rt(rt(rt(rt({},{height:"",width:"100%",cellspacing:"",cellpadding:"",caption:!1,class:"",align:"",border:""}),o),i),t),(a=o["border-width"],Ri(e)&&a?{border:a}:y(i,"border").fold((function(){return{}}),(function(e){return{border:e}})))),(r=y(o,"border-spacing").or(y(i,"cellspacing")).fold((function(){return{}}),(function(e){return{cellspacing:e}})),t=y(o,"border-padding").or(y(i,"cellpadding")).fold((function(){return{}}),(function(e){return{cellpadding:e}})),rt(rt({},r),t)))}},Vu=[{name:"width",type:"input",label:"Width"},{name:"height",type:"input",label:"Height"},{name:"celltype",type:"selectbox",label:"Cell type",items:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{name:"scope",type:"selectbox",label:"Scope",items:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{name:"halign",type:"selectbox",label:"H Align",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{name:"valign",type:"selectbox",label:"V Align",items:[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}]}],Uu=function(e){return e=Du(t=e),n=Hu.buildListItems(e,(function(e){e.value&&(e.textStyle=function(){return t.formatter.getCssText({block:"tr",classes:[e.value]})})})),(0<e.length?Y.some({name:"class",type:"selectbox",label:"Class",items:n}):Y.none()).fold((function(){return Vu}),(function(e){return Vu.concat(e)}));var t,n},ju={normal:function(e,t){return{setAttrib:function(n,r){e.setAttrib(t,n,r)},setStyle:function(n,r){e.setStyle(t,n,r)}}},ifTruthy:function(e,t){return{setAttrib:function(n,r){r&&e.setAttrib(t,n,r)},setStyle:function(n,r){r&&e.setStyle(t,n,r)}}}},Wu=function(e,t,n){var r=e.dom;t=n.celltype&&t[0].nodeName.toLowerCase()!==n.celltype?r.rename(t[0],n.celltype):t[0],r=ju.normal(r,t);Ui(r,n),Di(e)&&ji(r,n),Iu.unApplyAlign(e,t),Iu.unApplyVAlign(e,t),n.halign&&Iu.applyAlign(e,t,n.halign),n.valign&&Iu.applyVAlign(e,t,n.valign)},qu=function(e,t,n){var r=e.dom;zu.each(t,(function(t){n.celltype&&t.nodeName.toLowerCase()!==n.celltype&&(t=r.rename(t,n.celltype));var o=ju.ifTruthy(r,t);Ui(o,n),Di(e)&&ji(o,n),n.halign&&Iu.applyAlign(e,t,n.halign),n.valign&&Iu.applyVAlign(e,t,n.valign)}))},$u=function(e){var t,n,r=[],o=(r=e.dom.select("td[data-mce-selected],th[data-mce-selected]"),e.dom.getParent(e.selection.getStart(),"td,th"));!r.length&&o&&r.push(o),(o=o||r[0])&&(o=zu.map(r,(function(t){return Hu.extractDataFromCellElement(e,t,Di(e))})),o=Hu.getSharedValues(o),t={type:"tabpanel",tabs:[{title:"General",name:"general",items:Uu(e)},Hu.getAdvancedTab("cell")]},n={type:"panel",items:[{type:"grid",columns:2,items:Uu(e)}]},e.windowManager.open({title:"Cell Properties",size:"normal",body:Di(e)?t:n,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:o,onSubmit:a(Wi,e,r)}))},Gu=[{type:"selectbox",name:"type",label:"Row type",items:[{text:"Header",value:"thead"},{text:"Body",value:"tbody"},{text:"Footer",value:"tfoot"}]},{type:"selectbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height",type:"input"}],Xu=function(e){return e=_u(t=e),n=Hu.buildListItems(e,(function(e){e.value&&(e.textStyle=function(){return t.formatter.getCssText({block:"tr",classes:[e.value]})})})),(0<e.length?Y.some({name:"class",type:"selectbox",label:"Class",items:n}):Y.none()).fold((function(){return Gu}),(function(e){return Gu.concat(e)}));var t,n},Yu=function(e,t,n){var r=e.getParent(t,"table"),o=t.parentNode,i=e.select(n,r)[0];i||(i=e.create(n),r.firstChild?"CAPTION"===r.firstChild.nodeName?e.insertAfter(i,r.firstChild):r.insertBefore(i,r.firstChild):r.appendChild(i)),i.appendChild(t),o.hasChildNodes()||e.remove(o)},Ku=function(e,t){e.setStyle("background-color",t.backgroundcolor),e.setStyle("border-color",t.bordercolor),e.setStyle("border-style",t.borderstyle)},Ju=function(e){var t,n,r,o=e.dom,i=[],u=o.getParent(e.selection.getStart(),"table");u&&(r=o.getParent(e.selection.getStart(),"td,th"),zu.each(u.rows,(function(e){zu.each(e.cells,(function(t){if((o.getAttrib(t,"data-mce-selected")||t===r)&&i.indexOf(e)<0)return i.push(e),!1}))})),i[0]&&(u=zu.map(i,(function(t){return Hu.extractDataFromRowElement(e,t,Au(e))})),u=Hu.getSharedValues(u),t={type:"tabpanel",tabs:[{title:"General",name:"general",items:Xu(e)},Hu.getAdvancedTab("row")]},n={type:"panel",items:[{type:"grid",columns:2,items:Xu(e)}]},e.windowManager.open({title:"Row Properties",size:"normal",body:Au(e)?t:n,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:u,onSubmit:a(qi,e,i,u)})))},Zu=Object.prototype.hasOwnProperty,Qu=(Zi=function(e,t){return t},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,i=e[r];for(o in i)Zu.call(i,o)&&(n[o]=Zi(n[o],i[o]))}return n}),ec=tinymce.util.Tools.resolve("tinymce.Env"),tc={styles:{"border-collapse":"collapse",width:"100%"},attributes:{border:"1"},percentages:!0},nc=function(){return We.fromTag("table")},rc=function(){return We.fromTag("tbody")},oc=function(){return We.fromTag("tr")},ic=function(){return We.fromTag("th")},ac=function(){return We.fromTag("td")},uc=function(e){return e.dom().innerHTML},cc=function(e,t){e.selection.select(t.dom(),!0),e.selection.collapse(!0)},sc={insert:function(e,t,n){var r=Ai(e);t=function(e,t,n,r,o){void 0===o&&(o=tc);for(var i=nc(),a=(Je(i,o.styles),Ie(i,o.attributes),rc()),u=($t(i,a),[]),c=0;c<e;c++){for(var s=oc(),l=0;l<t;l++){var f=(c<n||l<r?ic:ac)();l<r&&ze(f,"scope","row"),c<n&&ze(f,"scope","col"),$t(f,We.fromTag("br")),o.percentages&&Ke(f,"width",100/t+"%"),$t(s,f)}u.push(s)}return Xt(a,u),i}(n,t,0,0,{styles:r,attributes:Ni(e),percentages:(n=r.width,J(n)&&-1!==n.indexOf("%")&&!Mi(e))}),ze(t,"data-mce-id","__mce"),r=t,n=We.fromTag("div"),r=We.fromDom(r.dom().cloneNode(!0)),$t(n,r),t=uc(n);return e.insertContent(t),kn(wu(e),'table[data-mce-id="__mce"]').map((function(t){var n,r;return Mi(e)&&Ke(t,"width",Ze(t,"width")),He(t,"data-mce-id"),n=e,se(dn(t,"tr"),(function(e){Ru(n,e.dom()),se(dn(e,"th,td"),(function(e){Bu(n,e.dom())}))})),r=e,kn(t,"td,th").each(a(cc,r)),t.dom()})).getOr(null)}},lc=function(e,t,n){n=n?[{type:"input",name:"cols",label:"Cols",inputMode:"numeric"},{type:"input",name:"rows",label:"Rows",inputMode:"numeric"}]:[];var r=e.getParam("table_appearance_options",!0,"boolean")?[{type:"input",name:"cellspacing",label:"Cell spacing",inputMode:"numeric"},{type:"input",name:"cellpadding",label:"Cell padding",inputMode:"numeric"},{type:"input",name:"border",label:"Border width"},{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[];t=t?[{type:"selectbox",name:"class",label:"Class",items:Hu.buildListItems(Bi(e),(function(t){t.value&&(t.textStyle=function(){return e.formatter.getCssText({block:"table",classes:[t.value]})})}))}]:[];return n.concat([{type:"input",name:"width",label:"Width"},{type:"input",name:"height",label:"Height"}]).concat(r).concat([{type:"selectbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]}]).concat(t)},fc=function(e,t,n){var r,o=e.dom,i={},a={};if(i.class=n.class,a.height=xu(n.height),o.getAttrib(t,"width")&&!Ri(e)?i.width=(r=n.width)?r.replace(/px$/,""):"":a.width=xu(n.width),Ri(e)?(a["border-width"]=xu(n.border),a["border-spacing"]=xu(n.cellspacing)):(i.border=n.border,i.cellpadding=n.cellpadding,i.cellspacing=n.cellspacing),Ri(e)&&t.children)for(var u=0;u<t.children.length;u++)$i(o,t.children[u],{"border-width":xu(n.border),padding:xu(n.cellpadding)}),_i(e)&&$i(o,t.children[u],{"border-color":n.bordercolor});_i(e)&&(a["background-color"]=n.backgroundcolor,a["border-color"]=n.bordercolor,a["border-style"]=n.borderstyle),i.style=o.serializeStyle(Qu(Ai(e),a)),o.setAttribs(t,Qu(Ni(e),i))},dc=function(e,t){var n,r=e.dom,o=Hu.extractDataFromSettings(e,_i(e));!1===t?(n=r.getParent(e.selection.getStart(),"table"))?o=Hu.extractDataFromTableElement(e,n,_i(e)):_i(e)&&(o.borderstyle="",o.bordercolor="",o.backgroundcolor=""):(o.cols="1",o.rows="1",_i(e)&&(o.borderstyle="",o.bordercolor="",o.backgroundcolor="")),r=0<Bi(e).length,r&&o.class&&(o.class=o.class.replace(/\s*mce\-item\-table\s*/g,"")),r={type:"grid",columns:2,items:lc(e,r,t)},t=_i(e)?{type:"tabpanel",tabs:[{title:"General",name:"general",items:[r]},Hu.getAdvancedTab("table")]}:{type:"panel",items:[r]};e.windowManager.open({title:"Table Properties",size:"normal",body:t,onSubmit:a(Gi,e,n),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:o})},mc=Xi("th,td"),gc=Xi("th,td,caption"),hc=zu.each,pc={registerCommands:function(e,n,r,o,i){function u(e){return Nn.table(e,d)}function s(t){mc(e).each((function(n){u(n).each((function(i){var a=Ur.forMenu(o,i,n),u=m(i);t(i,a).each((function(t){var n,o,a,c;n=e,o=u,c=m(a=i),o.width===c.width&&o.height===c.height||(zi(n,a.dom(),o.width,o.height),Ii(n,a.dom(),c.width,c.height)),e.selection.setRng(t),e.focus(),r.clear(i),Oi(i)}))}))}))}function l(n){return mc(e).map((function(n){return u(n).bind((function(r){var i=We.fromDom(e.getDoc()),a=Ur.forMenu(o,r,n);i=or.cellOperations(t,i,Y.none());return Pu(r,a,i)}))}))}function f(t){i.get().each((function(n){var i=ce(n,(function(e){return nr(e)}));mc(e).each((function(n){u(n).each((function(a){var u=We.fromDom(e.getDoc());u=or.paste(u),u=Ur.pasteRows(o,a,n,i,u);t(a,u).each((function(t){e.selection.setRng(t),e.focus(),r.clear(a)}))}))}))}))}var d=Ei(e),m=function(e){return{width:ki(e.dom()),height:ki(e.dom())}};hc({mceTableSplitCells:function(){s(n.unmergeCells)},mceTableMergeCells:function(){s(n.mergeCells)},mceTableInsertRowBefore:function(){s(n.insertRowsBefore)},mceTableInsertRowAfter:function(){s(n.insertRowsAfter)},mceTableInsertColBefore:function(){s(n.insertColumnsBefore)},mceTableInsertColAfter:function(){s(n.insertColumnsAfter)},mceTableDeleteCol:function(){s(n.deleteColumn)},mceTableDeleteRow:function(){s(n.deleteRow)},mceTableCutRow:function(e){l().each((function(e){i.set(e),s(n.deleteRow)}))},mceTableCopyRow:function(e){l().each((function(e){i.set(e)}))},mceTablePasteRowBefore:function(e){f(n.pasteRowsBefore)},mceTablePasteRowAfter:function(e){f(n.pasteRowsAfter)},mceTableDelete:function(){gc(e).each((function(t){Nn.table(t,d).filter(c(d)).each((function(t){var n=We.fromText("");qt(t,n),Yt(t),e.dom.isEmpty(e.getBody())?(e.setContent(""),e.selection.setCursorLocation()):((t=e.dom.createRng()).setStart(n.dom(),0),t.setEnd(n.dom(),0),e.selection.setRng(t),e.nodeChanged())}))}))}},(function(t,n){e.addCommand(n,t)})),hc({mceInsertTable:a(dc,e,!0),mceTableProps:a(dc,e,!1),mceTableRowProps:a(Ju,e),mceTableCellProps:a($u,e)},(function(t,n){e.addCommand(n,(function(){t()}))}))}},vc=function(e){var t=Y.from(e.dom().documentElement).map(We.fromDom).getOr(e);return{parent:o(t),view:o(e),origin:o(ko(0,0))}},bc=function(e,t){return{parent:o(t),view:o(e),origin:o(ko(0,0))}},yc=function(e){var t=ke.apply(null,e),n=[];return{bind:function(e){if(void 0===e)throw new Error("Event bind error: undefined handler");n.push(e)},unbind:function(e){n=fe(n,(function(t){return t!==e}))},trigger:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.apply(null,e);se(n,(function(e){e(o)}))}}},wc={create:function(e){return{registry:b(e,(function(e){return{bind:e.bind,unbind:e.unbind}})),trigger:b(e,(function(e){return e.trigger}))}}},xc=function(e,t,n,r){return Ki(e,t,n,r,!1)},Cc=o(!0),Sc=function(e,t,n){return xc(e,t,Cc,n)},kc={resolve:Ho("ephox-dragster").resolve},Tc=(ru=gi(["compare","extract","mutate","sink"]),gi(["element","start","stop","destroy"])),Ec=gi(["forceDrop","drop","move","delayDrop"]),Oc=ru({compare:function(e,t){return ko(t.left()-e.left(),t.top()-e.top())},extract:function(e){return Y.some(ko(e.x(),e.y()))},sink:function(e,t){var n=function(e){e=Qu({layerClass:kc.resolve("blocker")},e);var t=We.fromTag("div");return ze(t,"role","presentation"),Je(t,{position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%"}),oa(t,kc.resolve("blocker")),oa(t,e.layerClass),{element:function(){return t},destroy:function(){Yt(t)}}}(t),r=Sc(n.element(),"mousedown",e.forceDrop),o=Sc(n.element(),"mouseup",e.drop),i=Sc(n.element(),"mousemove",e.move),a=Sc(n.element(),"mouseout",e.delayDrop);return Tc({element:n.element,start:function(e){$t(e,n.element())},stop:function(){Yt(n.element())},destroy:function(){n.destroy(),o.unbind(),i.unbind(),a.unbind(),r.unbind()}})},mutate:function(e,t){e.mutate(t.left(),t.top())}});function Nc(){var e=Y.none(),t=wc.create({move:yc(["info"])});return{onEvent:function(n,r){r.extract(n).each((function(n){var o,i;o=r,i=n,n=e.map((function(e){return o.compare(e,i)})),e=Y.some(i),n.each((function(e){t.trigger.move(e)}))}))},reset:function(){e=Y.none()},events:t.registry}}function Ac(){var e={onEvent:t,reset:t},n=Nc(),r=e;return{on:function(){r.reset(),r=n},off:function(){r.reset(),r=e},isOn:function(){return r===n},onEvent:function(e,t){r.onEvent(e,t)},events:n.events}}function Dc(e,t,n){function r(e,t){return Y.from(Le(e,t))}function o(e,t){return ja.getInt(e,t)-parseInt(Le(e,"data-initial-"+t),10)}function i(t,n){m.trigger.startAdjust(),c.assign(t),ze(t,"data-initial-"+n,parseInt(Ze(t,n),10)),oa(t,ws),Ke(t,"opacity","0.2"),s.go(e.parent())}function u(t){return It(t,e.view())}var c=vs(),s=ps.transform(c,{}),l=Y.none(),f=(c.events.drag.bind((function(e){r(e.target(),"data-row").each((function(t){var n=ja.getInt(e.target(),"top");Ke(e.target(),"top",n+e.yDelta()+"px")})),r(e.target(),"data-column").each((function(t){var n=ja.getInt(e.target(),"left");Ke(e.target(),"left",n+e.xDelta()+"px")}))})),s.events.stop.bind((function(){c.get().each((function(i){l.each((function(a){r(i,"data-row").each((function(e){var t=o(i,"top");He(i,"data-initial-top"),m.trigger.adjustHeight(a,t,parseInt(e,10))})),r(i,"data-column").each((function(e){var t=o(i,"left");He(i,"data-initial-left"),m.trigger.adjustWidth(a,t,parseInt(e,10))})),va.refresh(e,a,n,t)}))}))})),Sc(e.parent(),"mousedown",(function(e){va.isRowBar(e.target())&&i(e.target(),"top"),va.isColBar(e.target())&&i(e.target(),"left")}))),d=Sc(e.view(),"mouseover",(function(r){var o;o=r.target(),Tn(o,"table",u).filter((function(e){return ys(e,u).exists(bs)})).fold((function(){qe(r.target())&&va.destroy(e)}),(function(r){l=Y.some(r),va.refresh(e,r,n,t)}))})),m=wc.create({adjustHeight:yc(["table","delta","row"]),adjustWidth:yc(["table","delta","column"]),startAdjust:yc([])});return{destroy:function(){f.unbind(),d.unbind(),s.destroy(),va.destroy(e)},refresh:function(r){va.refresh(e,r,n,t)},on:s.on,off:s.off,hideBars:a(va.hide,e),showBars:a(va.show,e),events:m.registry}}function _c(e,t){return ki(e.dom())/ki(t.dom())*100+"%"}function Rc(e,t){return Nn.table(e,t).bind((function(t){var n=Nn.cells(t);return he(n,(function(t){return It(e,t)})).map((function(e){return{index:o(e),all:o(n)}}))}))}function Bc(e,t,n){var r,o;e=e.document.createRange();return r=e,t.fold((function(e){r.setStartBefore(e.dom())}),(function(e,t){r.setStart(e.dom(),t)}),(function(e){r.setStartAfter(e.dom())})),o=e,n.fold((function(e){o.setEndBefore(e.dom())}),(function(e,t){o.setEnd(e.dom(),t)}),(function(e){o.setEndAfter(e.dom())})),e}function Mc(e,t,n,r,o){return(e=e.document.createRange()).setStart(t.dom(),n),e.setEnd(r.dom(),o),e}function Pc(e){return{left:o(e.left),top:o(e.top),right:o(e.right),bottom:o(e.bottom),width:o(e.width),height:o(e.height)}}function zc(e,t,n){return t(We.fromDom(n.startContainer),n.startOffset,We.fromDom(n.endContainer),n.endOffset)}function Ic(e,t){return Bs(e,t).match({ltr:function(t,n,r,o){var i=e.document.createRange();return i.setStart(t.dom(),n),i.setEnd(r.dom(),o),i},rtl:function(t,n,r,o){var i=e.document.createRange();return i.setStart(r.dom(),o),i.setEnd(t.dom(),n),i}})}function Lc(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom}function Fc(e,t,n,r,o){function i(n){var r=e.dom().createRange();return r.setStart(t.dom(),n),r.collapse(!0),r}var a=Ln(t).length;n=function(e,t,n,r,o){if(0===o)return 0;if(t===r)return o-1;for(var i=r,a=1;a<o;a++){var u=e(a),c=Math.abs(t-u.left);if(n<=u.bottom){if(n<u.top||i<c)return a-1;i=c}}return 0}((function(e){return i(e).getBoundingClientRect()}),n,r,o.right,a);return i(n)}function Hc(e,t,n,r){return(Me(t)?Ms:Ps)(e,t,n,r)}function Vc(e,t){return t-e.left<e.right-t}function Uc(e,t,n){return(e=e.dom().createRange()).selectNode(t.dom()),e.collapse(n),e}function jc(e,t){var n=_e(e);return"input"===n?As.after(e):ae(["br","img"],n)?0===t?As.before(e):As.after(e):As.on(e,t)}function Wc(e,t){return e=e.fold(As.before,jc,As.after),t=t.fold(As.before,jc,As.after),_s.relative(e,t)}function qc(e,t,n,r){return e=jc(e,t),t=jc(n,r),_s.relative(e,t)}function $c(e,t,n,r){c=t,o=n,i=r,(a=H(u=e).dom().createRange()).setStart(u.dom(),c),a.setEnd(o.dom(),i);var o,i,a,u=a,c=It(e,n)&&t===r;return u.collapsed&&!c}function Gc(e,t){Y.from(e.getSelection()).each((function(e){e.removeAllRanges(),e.addRange(t)}))}function Xc(e,t,n,r,o){t=Mc(e,t,n,r,o),Gc(e,t)}function Yc(e,t){Bs(e,t).match({ltr:function(t,n,r,o){Xc(e,t,n,r,o)},rtl:function(t,n,r,o){var i,a,u,c,s=e.getSelection();if(s.setBaseAndExtent)s.setBaseAndExtent(t.dom(),n,r.dom(),o);else if(s.extend)try{a=n,u=r,c=o,(i=s).collapse(t.dom(),a),i.extend(u.dom(),c)}catch(i){Xc(e,r,o,t,n)}else Xc(e,r,o,t,n)}})}function Kc(e){function t(e,t,r,o){return Mc(n,e,t,r,o)}var n=_s.getWin(e).dom();e=e.match({domRange:function(e){var t=We.fromDom(e.startContainer),n=We.fromDom(e.endContainer);return qc(t,e.startOffset,n,e.endOffset)},relative:Wc,exact:qc});return Bs(n,e).match({ltr:t,rtl:t})}function Jc(e){var t=We.fromDom(e.anchorNode),n=We.fromDom(e.focusNode);return $c(t,e.anchorOffset,n,e.focusOffset)?Y.some(Ns.create(t,e.anchorOffset,n,e.focusOffset)):0<(t=e).rangeCount?(n=t.getRangeAt(0),t=t.getRangeAt(t.rangeCount-1),Y.some(Ns.create(We.fromDom(n.startContainer),n.startOffset,We.fromDom(t.endContainer),t.endOffset))):Y.none()}function Zc(e,t,n,r){return Xs(e,t,Os.next(n),r)}function Qc(e,t,n,r){return Xs(e,t,Os.prev(n),r)}function es(e,t){return t=_s.exact(t,0,t,0),Kc(t)}function ts(e,t){return(0===(t=t=dn(t,"tr")).length?Y.none():Y.some(t[t.length-1])).bind((function(e){return kn(e,"td,th").map((function(e){return es(0,e)}))}))}function ns(e,t,n,r,o){return It(n,r)?Y.none():Mr.identify(n,r,t).bind((function(t){var r=t.boxes().getOr([]);return 0<r.length?(o(e,r,t.start(),t.finish()),Y.some(Js.create(Y.some(Qs.makeSitus(n,0,n,Yn(n))),!0))):Y.none()}))}function rs(e,t,n,r){return void 0===r&&(r=os),e.property().parent(t).map((function(e){return rl(e,r)}))}function os(e,t,n,r){return void 0===r&&(r=ol),n.sibling(e,t).map((function(e){return rl(e,r)}))}function is(e,t){return t=t,fl(ml,e,ll(ml),t)}function as(e,t){return t=t,dl(ml,e,ll(ml),t)}function us(e){return Tn(e,"tr")}function cs(e){return"br"===_e(e)}function ss(e){return Sl.nu({left:e.left,top:e.top,right:e.right,bottom:e.bottom})}function ls(e,t){return Y.some(e.getRect(t))}function fs(e,t,n){return wn(t,hu.isBlock).fold(o(!1),(function(t){return kl.getEntireBox(e,t).exists((function(e){return El(n,e)}))}))}function ds(e,t,n){var r,o=e.move(n,5),i=Al(t,e,n,o,100).getOr(o);return n=i,o=t,((r=e).point(n)>o.getInnerHeight()?Y.some(r.point(n)-o.getInnerHeight()):r.point(n)<0?Y.some(-r.point(n)):Y.none()).fold((function(){return t.situsFromPoint(i.left(),e.point(i))}),(function(n){return t.scrollBy(0,n),t.situsFromPoint(i.left(),e.point(i)-n)}))}function ms(e,t,n){return _l.browser.isChrome()||_l.browser.isSafari()||_l.browser.isFirefox()||_l.browser.isEdge()?t.otherRetry(e,n):_l.browser.isIE()?t.ieRetry(e,n):Y.none()}function gs(e,t,n,r,i){return Tn(r,"td,th",t).bind((function(r){return Tn(r,"table",t).bind((function(a){return Il(i,a)?Pl.handle(e,t,n).bind((function(e){return Tn(e.finish(),"td,th",t).map((function(t){return{start:o(r),finish:o(t),range:o(e)}}))})):Y.none()}))}))}var hs=function(t,n,r){function o(){m.stop(),f.isOn()&&(f.off(),l.trigger.stop())}function i(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];s&&e.apply(null,t)}}var a,u,c,s=!1,l=wc.create({start:yc([]),stop:yc([])}),f=Ac(),d=(a=o,u=200,c=null,{cancel:function(){null!==c&&(e.clearTimeout(c),c=null)},throttle:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];null!==c&&e.clearTimeout(c),c=e.setTimeout((function(){a.apply(null,t),c=null}),u)}}),m=(f.events.move.bind((function(e){n.mutate(t,e.info())})),n.sink(Ec({forceDrop:o,drop:i(o),move:i((function(e){d.cancel(),f.onEvent(e,n)})),delayDrop:i(d.throttle)}),r));return{element:m.element,go:function(e){m.start(e),f.on(),l.trigger.start()},on:function(){s=!0},off:function(){s=!1},destroy:function(){m.destroy()},events:l.registry}},ps={transform:function(e,t){var n=void 0!==(t=void 0===t?{}:t).mode?t.mode:Oc;return hs(e,n,t)}},vs=function(){var e,t=wc.create({drag:yc(["xDelta","yDelta","target"])}),n=Y.none(),r={mutate:function(t,n){e.trigger.drag(t,n)},events:(e=wc.create({drag:yc(["xDelta","yDelta"])})).registry};return r.events.drag.bind((function(e){n.each((function(n){t.trigger.drag(e.xDelta(),e.yDelta(),n)}))})),{assign:function(e){n=Y.some(e)},get:function(){return n},mutate:r.mutate,events:t.registry}},bs=function(e){return"true"===Le(e,"contenteditable")},ys=function(e,t){return Tn(e,"[contenteditable]",t)},ws=Ae.resolve("resizer-bar-dragging"),xs=function(e,t){var n=Do.height,r=(e=Dc(e,t,n),wc.create({beforeResize:yc(["table"]),afterResize:yc(["table"]),startDrag:yc([])}));return e.events.adjustHeight.bind((function(e){r.trigger.beforeResize(e.table());var t=n.delta(e.delta(),e.table());eu(e.table(),t,e.row(),n),r.trigger.afterResize(e.table())})),e.events.startAdjust.bind((function(e){r.trigger.startDrag()})),e.events.adjustWidth.bind((function(e){r.trigger.beforeResize(e.table());var n=t.delta(e.delta(),e.table());Qa(e.table(),n,e.column(),t),r.trigger.afterResize(e.table())})),{on:e.on,off:e.off,hideBars:e.hideBars,showBars:e.showBars,destroy:e.destroy,events:r.registry}},Cs=function(e,t){return e.inline?bc(wu(e),(n=We.fromTag("div"),Je(n,{position:"static",height:"0",width:"0",padding:"0",margin:"0",border:"0"}),$t($e(),n),n)):vc(We.fromDom(e.getDoc()));var n},Ss=function(e,t){e.inline&&Yt(t.parent())},ks=function(e){function t(e){return"TABLE"===e.nodeName}function n(t){return t=e.dom.getStyle(t,"width")||e.dom.getAttrib(t,"width"),Y.from(t).filter((function(e){return 0<e.length}))}function r(){return u}var o,i,a=Y.none(),u=Y.none(),c=Y.none(),s=/(\d+(\.\d+)?)%/;return e.on("init",(function(){var t=Ro(ku.directionAt),n=Cs(e);c=Y.some(n),function(e){return e=e.getParam("object_resizing",!0),J(e)?"table"===e:e}(e)&&e.getParam("table_resize_bars",!0,"boolean")&&((n=xs(n,t)).on(),n.events.startDrag.bind((function(t){a=Y.some(e.selection.getRng())})),n.events.beforeResize.bind((function(t){t=t.table().dom(),zi(e,t,ki(t),Ti(t))})),n.events.afterResize.bind((function(t){t=t.table();var n=t.dom();Oi(t),a.each((function(t){e.selection.setRng(t),e.focus()})),Ii(e,n,ki(n),Ti(n)),e.undoManager.add()})),u=Y.some(n))})),e.on("ObjectResizeStart",(function(r){var a,u,c,l=r.target;t(l)&&((a=n(l).map((function(e){return s.test(e)})).getOr(!1))&&Mi(e)?(c=l,Ke(We.fromDom(c),"width",ki(c).toString()+"px")):a||!0!==e.getParam("table_responsive_width")||(u=We.fromDom(l),Ht(u).map((function(e){return _c(u,e)})).each((function(e){Ke(u,"width",e),se(dn(u,"tr"),(function(e){se(Ut(e),(function(t){Ke(t,"width",_c(t,e))}))}))}))),o=r.width,i=n(l).getOr(""))})),e.on("ObjectResized",(function(n){var r,a,u=n.target;t(u)&&(u=u,s.test(i)?(r=parseFloat(s.exec(i)[1]),n=n.width*r/o,e.dom.setStyle(u,"width",n+"%")):(a=[],zu.each(u.rows,(function(t){zu.each(t.cells,(function(t){var n=e.dom.getStyle(t,"width",!0);a.push({cell:t,width:n})}))})),zu.each(a,(function(t){e.dom.setStyle(t.cell,"width",t.width),e.dom.setAttrib(t.cell,"width",null)}))))})),e.on("SwitchMode",(function(){u.each((function(t){e.readonly?t.hideBars():t.showBars()}))})),{lazyResize:r,lazyWire:function(){return c.getOr(vc(We.fromDom(e.getBody())))},destroy:function(){u.each((function(e){e.destroy()})),c.each((function(t){Ss(e,t)}))}}},Ts=At([{none:["current"]},{first:["current"]},{middle:["current","target"]},{last:["current"]}]),Es=rt(rt({},Ts),{none:function(e){return Ts.none(e=void 0===e?void 0:e)}}),Os={next:function(e,t){return Rc(e,t).fold((function(){return Es.none(e)}),(function(t){return t.index()+1<t.all().length?Es.middle(e,t.all()[t.index()+1]):Es.last(e)}))},prev:function(e,t){return Rc(e,t).fold((function(){return Es.none()}),(function(t){return 0<=t.index()-1?Es.middle(e,t.all()[t.index()-1]):Es.first(e)}))}},Ns={create:ke("start","soffset","finish","foffset")},As=(ou=At([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),{before:ou.before,on:ou.on,after:ou.after,cata:function(e,t,n,r){return e.fold(t,n,r)},getStart:function(e){return e.fold(i,i,i)}}),Ds=At([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),_s={domRange:Ds.domRange,relative:Ds.relative,exact:Ds.exact,exactFromRange:function(e){return Ds.exact(e.start(),e.soffset(),e.finish(),e.foffset())},getWin:function(e){return e=e.match({domRange:function(e){return We.fromDom(e.startContainer)},relative:function(e,t){return As.getStart(e)},exact:function(e,t,n,r){return e}}),We.fromDom(e.dom().ownerDocument.defaultView)},range:Ns.create},Rs=At([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Bs=function(e,t){n=e;var n,r;e=t.match({domRange:function(e){return{ltr:o(e),rtl:Y.none}},relative:function(e,t){return{ltr:A((function(){return Bc(n,e,t)})),rtl:A((function(){return Y.some(Bc(n,t,e))}))}},exact:function(e,t,r,o){return{ltr:A((function(){return Mc(n,e,t,r,o)})),rtl:A((function(){return Y.some(Mc(n,r,o,e,t))}))}}});return(r=(t=e).ltr()).collapsed?t.rtl().filter((function(e){return!1===e.collapsed})).map((function(e){return Rs.rtl(We.fromDom(e.endContainer),e.endOffset,We.fromDom(e.startContainer),e.startOffset)})).getOrThunk((function(){return zc(0,Rs.ltr,r)})):zc(0,Rs.ltr,r)},Ms=function(e,t,n,r){var o=e.dom().createRange();o.selectNode(t.dom()),o=o.getClientRects();return Mo(o,(function(e){return Lc(e,n,r)?Y.some(e):Y.none()})).map((function(o){return Fc(e,t,n,r,o)}))},Ps=function(e,t,n,r){var o=e.dom().createRange();t=Ut(t);return Mo(t,(function(t){return o.selectNode(t.dom()),Lc(o.getBoundingClientRect(),n,r)?Hc(e,t,n,r):Y.none()}))},zs=function(e,t,n,r){var o=e.dom().createRange();o.selectNode(t.dom()),o=o.getBoundingClientRect(),n=Math.max(o.left,Math.min(o.right,n)),o=Math.max(o.top,Math.min(o.bottom,r));return Hc(e,t,n,o)},Is=function(e,t,n){var r=e.dom().createRange(),o=(r=(r.selectNode(t.dom()),r.getBoundingClientRect()),Vc(r,n));return(!0===o?Zn:Hn)(t).map((function(t){return Uc(e,t,o)}))},Ls=function(e,t,n){var r=t.dom().getBoundingClientRect();r=Vc(r,n);return Y.some(Uc(e,t,r))},Fs=document.caretPositionFromPoint?function(e,t,n){return Y.from(e.dom().caretPositionFromPoint(t,n)).bind((function(t){if(null===t.offsetNode)return Y.none();var n=e.dom().createRange();return n.setStart(t.offsetNode,t.offset),n.collapse(),Y.some(n)}))}:document.caretRangeFromPoint?function(e,t,n){return Y.from(e.dom().caretRangeFromPoint(t,n))}:function(e,t,n){return We.fromPoint(e,t,n).bind((function(r){function o(){return n=e,i=t,(0===Ut(o=r).length?Ls:Is)(n,o,i);var n,o,i}var i,a,u,c,s;return 0===Ut(r).length?o():(a=r,u=t,c=n,(s=(i=e).dom().createRange()).selectNode(a.dom()),s=s.getBoundingClientRect(),u=Math.max(s.left,Math.min(s.right,u)),s=Math.max(s.top,Math.min(s.bottom,c)),zs(i,a,u,s).orThunk(o))}))},Hs=function(e,t,n,r,o){t=qc(t,n,r,o),Yc(e,t)},Vs=function(e,t,n){t=Wc(t,n),Yc(e,t)},Us=function(e,t){t=function(e,t){return e=e.document.createRange(),e.selectNodeContents(t.dom()),e}(e,t),Gc(e,t)},js=function(e){return Y.from(e.getSelection()).filter((function(e){return 0<e.rangeCount})).bind(Jc).map((function(e){return _s.exact(e.start(),e.soffset(),e.finish(),e.foffset())}))},Ws=function(e,t){e=Ic(e,t);return 0<(e=0<(e=(t=e).getClientRects()).length?e[0]:t.getBoundingClientRect()).width||0<e.height?Y.some(e).map(Pc):Y.none()},qs=function(e,t,n){return e=We.fromDom(e.document),Fs(e,t,n).map((function(e){return Ns.create(We.fromDom(e.startContainer),e.startOffset,We.fromDom(e.endContainer),e.endOffset)}))},$s=function(e){e.getSelection().removeAllRanges()},Gs=tinymce.util.Tools.resolve("tinymce.util.VK"),Xs=function(e,t,n,r,o){return n.fold(Y.none,Y.none,(function(e,t){return Zn(t).map((function(e){return es(0,e)}))}),(function(n){return Nn.table(n,t).bind((function(t){var o=Ur.noMenu(n);return e.undoManager.transact((function(){r.insertRowsAfter(t,o)})),ts(0,t)}))}))},Ys=["table","li","dl"],Ks={handle:function(e,t,n,r){var o,i,a;e.keyCode===Gs.TAB&&(o=wu(t),i=function(e){var t=_e(e);return It(e,o)||ae(Ys,t)},(a=t.selection.getRng()).collapsed&&(a=We.fromDom(a.startContainer),Nn.cell(a,i).each((function(o){e.preventDefault(),(e.shiftKey?Qc:Zc)(t,i,o,n,r).each((function(e){t.selection.setRng(e)}))}))))}},Js={create:ke("selection","kill")},Zs={create:function(e,t,n,r){return{start:o(As.on(e,t)),finish:o(As.on(n,r))}}},Qs={convertToRange:function(e,t){return e=Ic(e,t),Ns.create(We.fromDom(e.startContainer),e.startOffset,We.fromDom(e.endContainer),e.endOffset)},makeSitus:Zs.create},el=function(e,t,n,r,o,i,a){return It(n,o)&&r===i?Y.none():Tn(n,"td,th",t).bind((function(n){return Tn(o,"td,th",t).bind((function(r){return ns(e,t,n,r,a)}))}))},tl=ns,nl=function(e,t,n,r,o){return Mr.shiftSelection(r,e,t,o.firstSelectedSelector(),o.lastSelectedSelector()).map((function(e){return o.clearBeforeUpdate(n),o.selectRange(n,e.boxes(),e.start(),e.finish()),e.boxes()}))},rl=ke("item","mode"),ol=function(e,t,n,r){return void 0===r&&(r=ol),e=e.property().children(t),n.first(e).map((function(e){return rl(e,r)}))},il=[{current:rs,next:os,fallback:Y.none()},{current:os,next:ol,fallback:Y.some(rs)},{current:ol,next:ol,fallback:Y.some(os)}],al=function(e,t,n,r,o){return ge(o=void 0===o?il:o,(function(e){return e.current===n})).bind((function(n){return n.current(e,t,r,n.next).orThunk((function(){return n.fallback.bind((function(n){return al(e,t,n,r)}))}))}))},ul=function(){return{sibling:function(e,t){return e.query().prevSibling(t)},first:function(e){return 0<e.length?Y.some(e[e.length-1]):Y.none()}}},cl=function(){return{sibling:function(e,t){return e.query().nextSibling(t)},first:function(e){return 0<e.length?Y.some(e[0]):Y.none()}}},sl=function(e,t,n,r,o,i){return al(e,t,r,o).bind((function(t){return i(t.item())?Y.none():n(t.item())?Y.some(t.item()):sl(e,t.item(),n,t.mode(),o,i)}))},ll=function(e){return function(t){return 0===e.property().children(t).length}},fl=function(e,t,n,r){return sl(e,t,n,os,ul(),r)},dl=function(e,t,n,r){return sl(e,t,n,os,cl(),r)},ml=vr(),gl=ke("element","offset"),hl=(ke("element","deltaOffset"),ke("element","start","finish"),ke("begin","end"),ke("element","text"),At([{none:["message"]},{success:[]},{failedUp:["cell"]},{failedDown:["cell"]}])),pl=rt(rt({},hl),{verify:function(e,t,n,r,o,i,a){return Tn(r,"td,th",a).bind((function(n){return Tn(t,"td,th",a).map((function(t){return It(n,t)?It(r,n)&&Yn(n)===o?i(t):hl.none("in same cell"):_r.sharedOne(us,[n,t]).fold((function(){return function(e,t,n){return t=e.getRect(t),e=e.getRect(n),e.right>t.left&&e.left<t.right}(e,t,n)?hl.success():i(t)}),(function(e){return i(t)}))}))})).getOr(hl.none("default"))},cata:function(e,t,n,r,o){return e.fold(t,n,r,o)}}),vl=(ke("ancestor","descendants","element","index"),ke("parent","children","element","index")),bl=function(e){return Ht(e).bind((function(t){var n=Ut(t);return he(n,a(It,e)).map((function(r){return vl(t,n,e,r)}))}))},yl=function(e,t,n){return t(e,n).bind((function(e){return Me(e)&&0===Ln(e).trim().length?yl(e,t,n):Y.some(e)}))},wl=function(e,t){return j(e,t).filter(cs).orThunk((function(){return j(e,t-1).filter(cs)}))},xl={tryBr:function(e,t,n,r){var i,a,u,c,s;return(cs(t)?(u=e,c=t,(s=r).traverse(c).orThunk((function(){return yl(c,s.gather,u)})).map(s.relative)):(i=e,a=r,wl(t,n).bind((function(e){return a.traverse(e).fold((function(){return yl(e,a.gather,i).map(a.relative)}),(function(e){return bl(e).map((function(e){return As.on(e.parent(),e.index())}))}))})))).map((function(e){return{start:o(e),finish:o(e)}}))},process:function(e){return pl.cata(e,(function(e){return Y.none()}),(function(){return Y.none()}),(function(e){return Y.some(gl(e,0))}),(function(e){return Y.some(gl(e,Yn(e)))}))}},Cl=S(["left","top","right","bottom"],[]),Sl={nu:Cl,moveUp:function(e,t){return Cl({left:e.left(),top:e.top()-t,right:e.right(),bottom:e.bottom()-t})},moveDown:function(e,t){return Cl({left:e.left(),top:e.top()+t,right:e.right(),bottom:e.bottom()+t})},moveBottomTo:function(e,t){var n=e.bottom()-e.top();return Cl({left:e.left(),top:t-n,right:e.right(),bottom:t})},moveTopTo:function(e,t){var n=e.bottom()-e.top();return Cl({left:e.left(),top:t,right:e.right(),bottom:t+n})},getTop:function(e){return e.top()},getBottom:function(e){return e.bottom()},translate:function(e,t,n){return Cl({left:e.left()+t,top:e.top()+n,right:e.right()+t,bottom:e.bottom()+n})},toString:function(e){return"("+e.left()+", "+e.top()+") -> ("+e.right()+", "+e.bottom()+")"}},kl={getBoxAt:function(e,t,n){return Be(t)?ls(e,t).map(ss):Me(t)?(e=e,t=t,(0<=(n=n)&&n<Yn(t)?e.getRangedRect(t,n,t,n+1):0<n?e.getRangedRect(t,n-1,t,n):Y.none()).map(ss)):Y.none()},getEntireBox:function(e,t){return Be(t)?ls(e,t).map(ss):Me(t)?e.getRangedRect(t,0,t,Yn(t)).map(ss):Y.none()}},Tl=At([{none:[]},{retry:["caret"]}]),El=function(e,t){return e.left()<t.left()||Math.abs(t.right()-e.left())<1||e.left()>t.right()},Ol=(De={point:Sl.getTop,adjuster:function(e,t,n,r,o){var i=Sl.moveUp(o,5);return Math.abs(n.top()-r.top())<1||n.bottom()<o.top()?Tl.retry(i):n.bottom()===o.top()?Tl.retry(Sl.moveUp(o,1)):fs(e,t,o)?Tl.retry(Sl.translate(i,5,0)):Tl.none()},move:Sl.moveUp,gather:is},Ne={point:Sl.getBottom,adjuster:function(e,t,n,r,o){var i=Sl.moveDown(o,5);return Math.abs(n.bottom()-r.bottom())<1||n.top()>o.bottom()?Tl.retry(i):n.top()===o.bottom()?Tl.retry(Sl.moveDown(o,1)):fs(e,t,o)?Tl.retry(Sl.translate(i,5,0)):Tl.none()},move:Sl.moveDown,gather:as},function(e,t,n){return e.elementFromPoint(t,n).filter((function(e){return"table"===_e(e)})).isSome()}),Nl=function(e,t,n,r,o){return Al(e,t,n,t.move(r,5),o)},Al=function(e,t,n,r,o){return 0===o?Y.some(r):Ol(e,r.left(),t.point(r))?Nl(e,t,n,r,o-1):e.situsFromPoint(r.left(),t.point(r)).bind((function(i){return i.start().fold(Y.none,(function(i){return kl.getEntireBox(e,i).bind((function(a){return t.adjuster(e,i,a,n,r).fold(Y.none,(function(r){return Al(e,t,n,r,o-1)}))})).orThunk((function(){return Y.some(r)}))}),Y.none)}))},Dl={tryUp:a(ds,De),tryDown:a(ds,Ne),ieTryUp:function(e,t){return e.situsFromPoint(t.left(),t.top()-5)},ieTryDown:function(e,t){return e.situsFromPoint(t.left(),t.bottom()+5)},getJumpSize:o(5)},_l=L(),Rl=function(e,t,n,r,o,i){return 0===i?Y.none():Ml(e,t,n,r,o).bind((function(a){var u=e.fromSitus(a);u=pl.verify(e,n,r,u.finish(),u.foffset(),o.failure,t);return pl.cata(u,(function(){return Y.none()}),(function(){return Y.some(a)}),(function(a){return It(n,a)&&0===r?Bl(e,n,r,Sl.moveUp,o):Rl(e,t,a,0,o,i-1)}),(function(a){return It(n,a)&&r===Yn(a)?Bl(e,n,r,Sl.moveDown,o):Rl(e,t,a,Yn(a),o,i-1)}))}))},Bl=function(e,t,n,r,o){return kl.getBoxAt(e,t,n).bind((function(t){return ms(e,o,r(t,Dl.getJumpSize()))}))},Ml=function(e,t,n,r,o){return kl.getBoxAt(e,n,r).bind((function(t){return ms(e,o,t)}))},Pl={handle:function(e,t,n){return o=t,i=n,(r=e).getSelection().bind((function(e){return xl.tryBr(o,e.finish(),e.foffset(),i).fold((function(){return Y.some(gl(e.finish(),e.foffset()))}),(function(t){return t=r.fromSitus(t),t=pl.verify(r,e.finish(),e.foffset(),t.finish(),t.foffset(),i.failure,o),xl.process(t)}))})).bind((function(r){return Rl(e,t,r.element(),r.offset(),n,20).map(e.fromSitus)}));var r,o,i}},zl=L(),Il=function(e,t){return yn(e,(function(e){return Ht(e).exists((function(e){return It(e,t)}))}),n).isSome();var n},Ll=function(e,t,n,r,o,i){return zl.browser.isIE()?Y.none():i(r,t).orThunk((function(){return gs(e,t,n,r,o).map((function(e){return e=e.range(),Js.create(Y.some(Qs.makeSitus(e.start(),e.soffset(),e.finish(),e.foffset())),!0)}))}))},Fl=function(e,t,n,r,o,i,a){return gs(e,n,r,o,i).bind((function(e){return tl(t,n,e.start(),e.finish(),a)}))},Hl=function(e,t){return Tn(e,"tr",t).bind((function(e){return Tn(e,"table",t).bind((function(n){var r=dn(n,"tr");return It(e,r[0])?fl(ml,n,(function(e){return Hn(e).isSome()}),t).map((function(e){var t=Yn(e);return Js.create(Y.some(Qs.makeSitus(e,t,e,t)),!0)})):Y.none()}))}))},Vl=function(e,t){return Tn(e,"tr",t).bind((function(e){return Tn(e,"table",t).bind((function(n){var r=dn(n,"tr");return It(e,r[r.length-1])?dl(ml,n,(function(e){return Zn(e).isSome()}),t).map((function(e){return Js.create(Y.some(Qs.makeSitus(e,0,e,0)),!0)})):Y.none()}))}))},Ul=function(e,t){return Tn(e,"td,th",t)};function jl(e){return function(t){return t===e}}function Wl(e){return{elementFromPoint:function(t,n){return We.fromPoint(We.fromDom(e.document),t,n)},getRect:function(e){return e.dom().getBoundingClientRect()},getRangedRect:function(t,n,r,o){return t=_s.exact(t,n,r,o),Ws(e,t).map(Xl.toRaw)},getSelection:function(){return js(e).map((function(t){return Qs.convertToRange(e,t)}))},fromSitus:function(t){return t=_s.relative(t.start(),t.finish()),Qs.convertToRange(e,t)},situsFromPoint:function(t,n){return qs(e,t,n).map((function(e){return Zs.create(e.start(),e.soffset(),e.finish(),e.foffset())}))},clearSelection:function(){$s(e)},setSelection:function(t){Hs(e,t.start(),t.soffset(),t.finish(),t.foffset())},setRelativeSelection:function(t,n){Vs(e,t,n)},selectContents:function(t){Us(e,t)},getInnerHeight:function(){return e.innerHeight},getScrollY:function(){return Yl(We.fromDom(e.document)).top()},scrollBy:function(t,n){Kl(t,n,We.fromDom(e.document))}}}function ql(e){return!1===ia(We.fromDom(e.target),"ephox-snooker-resizer-bar")}var $l={down:{traverse:Vt,gather:as,relative:As.before,otherRetry:Dl.tryDown,ieRetry:Dl.ieTryDown,failure:pl.failedDown},up:{traverse:U,gather:is,relative:As.before,otherRetry:Dl.tryUp,ieRetry:Dl.ieTryUp,failure:pl.failedUp}},Gl={ltr:{isBackward:jl(37),isForward:jl(39)},rtl:{isBackward:jl(39),isForward:jl(37)},isUp:jl(38),isDown:jl(40),isNavigation:function(e){return 37<=e&&e<=40}},Xl={toRaw:function(e){return{left:e.left(),top:e.top(),right:e.right(),bottom:e.bottom(),width:e.width(),height:e.height()}}},Yl=(L().browser.isSafari(),function(t){t=void 0!==t?t.dom():e.document;var n=t.body.scrollLeft||t.documentElement.scrollLeft;t=t.body.scrollTop||t.documentElement.scrollTop;return ko(n,t)}),Kl=function(t,n,r){(void 0!==r?r.dom():e.document).defaultView.scrollBy(t,n)},Jl=ke("rows","cols"),Zl=L(),Ql={mouse:function(e,t,n,r){var o,i,a,u,c;e=Wl(e),o=e,i=t,a=n,u=r,c=Y.none(),e={mousedown:function(e){u.clear(i),c=Ul(e.target(),a)},mouseover:function(e){c.each((function(t){u.clearBeforeUpdate(i),Ul(e.target(),a).each((function(e){Mr.identify(t,e,a).each((function(n){var r=n.boxes().getOr([]);(1<r.length||1===r.length&&!It(t,e))&&(u.selectRange(i,r,n.start(),n.finish()),o.selectContents(e))}))}))}))},mouseup:function(e){c.each(s)}};function s(){c=Y.none()}return{mousedown:e.mousedown,mouseover:e.mouseover,mouseup:e.mouseup}},keyboard:function(e,t,n,r){function o(){return r.clear(t),Y.none()}var i=Wl(e);return{keydown:function(e,u,c,s,l,f){e=e.raw();var d=e.which,m=!0===e.shiftKey;return Mr.retrieve(t,r.selectedSelector()).fold((function(){return Gl.isDown(d)&&m?a(Fl,i,t,n,$l.down,s,u,r.selectRange):Gl.isUp(d)&&m?a(Fl,i,t,n,$l.up,s,u,r.selectRange):Gl.isDown(d)?a(Ll,i,n,$l.down,s,u,Vl):Gl.isUp(d)?a(Ll,i,n,$l.up,s,u,Hl):Y.none}),(function(e){function n(n){return function(){return Mo(n,(function(n){return nl(n.rows(),n.cols(),t,e,r)})).fold((function(){return Mr.getEdges(t,r.firstSelectedSelector(),r.lastSelectedSelector()).map((function(e){var n=Gl.isDown(d)||f.isForward(d)?As.after:As.before;return i.setRelativeSelection(As.on(e.first(),0),n(e.table())),r.clear(t),Js.create(Y.none(),!0)}))}),(function(e){return Y.some(Js.create(Y.none(),!0))}))}}return Gl.isDown(d)&&m?n([Jl(1,0)]):Gl.isUp(d)&&m?n([Jl(-1,0)]):f.isBackward(d)&&m?n([Jl(0,-1),Jl(-1,0)]):f.isForward(d)&&m?n([Jl(0,1),Jl(1,0)]):Gl.isNavigation(d)&&0==m?o:Y.none}))()},keyup:function(e,o,i,a,u){return Mr.retrieve(t,r.selectedSelector()).fold((function(){var c=e.raw(),s=c.which;return 0!=(!0===c.shiftKey)&&Gl.isNavigation(s)?el(t,n,o,i,a,u,r.selectRange):Y.none()}),Y.none)}}},external:function(e,t,n,r){var o=Wl(e);return function(e,i){r.clearBeforeUpdate(t),Mr.identify(e,i,n).each((function(e){var n=e.boxes().getOr([]);r.selectRange(t,n,e.start(),e.finish()),Zl.deviceType.isTouch()?o.clearSelection():o.selectContents(i)}))}}},ef=function(e,t){se(t,(function(t){var n;t=t,na(n=e)?n.dom().classList.remove(t):Io(n,t),Lo(n)}))},tf={byClass:function(e){function t(e){oa(e,o)}function n(e){ef(e,i)}function r(t){t=dn(t,e.selectedSelector()),se(t,n)}var o,i;return o=e.selected(),i=[e.selected(),e.lastSelected(),e.firstSelected()],{clearBeforeUpdate:r,clear:r,selectRange:function(n,o,i,a){r(n),se(o,t),oa(i,e.firstSelected()),oa(a,e.lastSelected())},selectedSelector:e.selectedSelector,firstSelectedSelector:e.firstSelectedSelector,lastSelectedSelector:e.lastSelectedSelector}},byAttr:function(e,t,n){function r(t){He(t,e.selected()),He(t,e.firstSelected()),He(t,e.lastSelected())}function o(t){ze(t,e.selected(),"1")}function i(e){a(e),n()}function a(t){t=dn(t,e.selectedSelector()),se(t,r)}return{clearBeforeUpdate:a,clear:i,selectRange:function(n,r,a,u){i(n),se(r,o),ze(a,e.firstSelected(),"1"),ze(u,e.lastSelected(),"1"),t(r,a,u)},selectedSelector:e.selectedSelector,firstSelectedSelector:e.firstSelectedSelector,lastSelectedSelector:e.lastSelectedSelector}}},nf={getOtherCells:function(e,t,n){e=An.fromTable(e);var r=Dn.generate(e);return Jo(r,t).map((function(e){var t=wa.toGrid(r,n,!1);return{upOrLeftCells:function(e,t,n){return e=e.slice(0,t[t.length-1].row()+1),e=Ca(e,n),ve(e,(function(e){return e=e.cells().slice(0,t[t.length-1].column()+1),ce(e,(function(e){return e.element()}))}))}(t,e,n),downOrRightCells:function(e,t,n){return e=e.slice(t[0].row()+t[0].rowspan()-1,e.length),e=Ca(e,n),ve(e,(function(e){return e=e.cells().slice(t[0].column()+t[0].colspan()-1,+e.cells().length),ce(e,(function(e){return e.element()}))}))}(t,e,n)}}))}};function rf(e,i,a){var u=S(["mousedown","mouseover","mouseup","keyup","keydown"],[]),c=Y.none(),s=Pi(e),l=tf.byAttr(Ir,(function(n,r,o){a.targets().each((function(i){Nn.table(r).each((function(a){var u=We.fromDom(e.getDoc());u=or.cellOperations(t,u,s),a=nf.getOtherCells(a,i,u);Li(e,n,r,o,a)}))}))}),(function(){Fi(e)}));return e.on("init",(function(a){function s(t){var n,r,o=T(t);o.raw().shiftKey&&Gl.isNavigation(o.raw().which)&&(t=e.selection.getRng(),n=We.fromDom(t.startContainer),r=We.fromDom(t.endContainer),C.keyup(o,n,t.startOffset,r,t.endOffset).each((function(e){k(o,e)})))}function f(t){var n=T(t),r=(t=(i().each((function(e){e.hideBars()})),e.selection.getRng()),We.fromDom(e.selection.getStart())),o=We.fromDom(t.startContainer),a=We.fromDom(t.endContainer);r=ku.directionAt(r).isRtl()?Gl.rtl:Gl.ltr;C.keydown(n,o,t.startOffset,a,t.endOffset,r).each((function(e){k(n,e)})),i().each((function(e){e.showBars()}))}function d(e){return e.hasOwnProperty("x")&&e.hasOwnProperty("y")}function m(e){E(e)&&ql(e)&&x.mousedown(T(e))}function g(e){O(e)&&ql(e)&&x.mouseover(T(e))}function h(e){E(e)&&ql(e)&&x.mouseup(T(e))}var p,v,b=e.getWin(),y=wu(e),w=Ei(e),x=Ql.mouse(b,y,w,l),C=Ql.keyboard(b,y,w,l),S=Ql.external(b,y,w,l),k=(e.on("tableselectorchange",(function(e){S(e.start,e.finish)})),function(t,n){!0===t.raw().shiftKey&&(n.kill()&&t.kill(),n.selection().each((function(t){t=_s.relative(t.start(),t.finish()),t=Ic(b,t),e.selection.setRng(t)})))}),T=function(e){function t(){e.stopPropagation()}function r(){e.preventDefault()}var i=We.fromDom(e.target),a=n(r,t);return{target:o(i),x:o(d(e)?e.x:null),y:o(d(e)?e.y:null),stop:t,prevent:r,kill:a,raw:o(e)}},E=function(e){return 0===e.button},O=function(e){return void 0===e.buttons||0!=(1&e.buttons)};p=r(We.fromDom(y)),v=r(0),w={touchEnd:function(e){var t,n,r=We.fromDom(e.target);"td"!==_e(r)&&"th"!==_e(r)||(t=p.get(),n=v.get(),It(t,r)&&e.timeStamp-n<300&&(e.preventDefault(),S(r,r))),p.set(r),v.set(e.timeStamp)}};e.on("mousedown",m),e.on("mouseover",g),e.on("mouseup",h),e.on("touchend",w.touchEnd),e.on("keyup",s),e.on("keydown",f),e.on("NodeChange",(function(){var n=e.selection,r=We.fromDom(n.getStart());n=We.fromDom(n.getEnd());_r.sharedOne(Nn.table,[r,n]).fold((function(){l.clear(y)}),t)})),c=Y.some(u({mousedown:m,mouseover:g,mouseup:h,keyup:s,keydown:f}))})),{clear:l.clear,destroy:function(){c.each((function(e){}))}}}var of=function(e){return{get:function(){var t=wu(e);return Pr(t,Ir.selectedSelector()).fold((function(){return void 0===e.selection.getStart()?Lr.none():Lr.single(e.selection)}),(function(e){return Lr.multiple(e)}))}}},af=function(e,t){function n(){return gc(e).bind((function(e){return Nn.table(e).map((function(n){return"caption"===_e(e)?Ur.notCell(e):Ur.forMenu(t,n,e)}))}))}function o(){a.set(A(n)()),se(u.get(),(function(e){return e()}))}function i(e,t){function n(){return a.get().fold((function(){e.setDisabled(!0)}),(function(n){e.setDisabled(t(n))}))}return n(),u.set(u.get().concat([n])),function(){u.set(fe(u.get(),(function(e){return e!==n})))}}var a=r(Y.none()),u=r([]);return e.on("NodeChange",o),{onSetupTable:function(e){return i(e,(function(e){return!1}))},onSetupCellOrRow:function(e){return i(e,(function(e){return"caption"===_e(e.element())}))},onSetupMergeable:function(e){return i(e,(function(e){return e.mergable().isNone()}))},onSetupUnmergeable:function(e){return i(e,(function(e){return e.unmergable().isNone()}))},resetTargets:o,targets:function(){return a.get()}}},uf={addButtons:function(e,t){function n(t){return function(){return e.execCommand(t)}}e.ui.registry.addMenuButton("table",{tooltip:"Table",icon:"table",fetch:function(e){return e("inserttable tableprops deletetable | cell row column")}}),e.ui.registry.addButton("tableprops",{tooltip:"Table properties",onAction:n("mceTableProps"),icon:"table",onSetup:t.onSetupTable}),e.ui.registry.addButton("tabledelete",{tooltip:"Delete table",onAction:n("mceTableDelete"),icon:"table-delete-table",onSetup:t.onSetupTable}),e.ui.registry.addButton("tablecellprops",{tooltip:"Cell properties",onAction:n("mceTableCellProps"),icon:"table-cell-properties",onSetup:t.onSetupCellOrRow}),e.ui.registry.addButton("tablemergecells",{tooltip:"Merge cells",onAction:n("mceTableMergeCells"),icon:"table-merge-cells",onSetup:t.onSetupMergeable}),e.ui.registry.addButton("tablesplitcells",{tooltip:"Split cell",onAction:n("mceTableSplitCells"),icon:"table-split-cells",onSetup:t.onSetupUnmergeable}),e.ui.registry.addButton("tableinsertrowbefore",{tooltip:"Insert row before",onAction:n("mceTableInsertRowBefore"),icon:"table-insert-row-above",onSetup:t.onSetupCellOrRow}),e.ui.registry.addButton("tableinsertrowafter",{tooltip:"Insert row after",onAction:n("mceTableInsertRowAfter"),icon:"table-insert-row-after",onSetup:t.onSetupCellOrRow}),e.ui.registry.addButton("tabledeleterow",{tooltip:"Delete row",onAction:n("mceTableDeleteRow"),icon:"table-delete-row",onSetup:t.onSetupCellOrRow}),e.ui.registry.addButton("tablerowprops",{tooltip:"Row properties",onAction:n("mceTableRowProps"),icon:"table-row-properties",onSetup:t.onSetupCellOrRow}),e.ui.registry.addButton("tableinsertcolbefore",{tooltip:"Insert column before",onAction:n("mceTableInsertColBefore"),icon:"table-insert-column-before",onSetup:t.onSetupCellOrRow}),e.ui.registry.addButton("tableinsertcolafter",{tooltip:"Insert column after",onAction:n("mceTableInsertColAfter"),icon:"table-insert-column-after",onSetup:t.onSetupCellOrRow}),e.ui.registry.addButton("tabledeletecol",{tooltip:"Delete column",onAction:n("mceTableDeleteCol"),icon:"table-delete-column",onSetup:t.onSetupCellOrRow}),e.ui.registry.addButton("tablecutrow",{tooltip:"Cut row",onAction:n("mceTableCutRow"),icon:"temporary-placeholder",onSetup:t.onSetupCellOrRow}),e.ui.registry.addButton("tablecopyrow",{tooltip:"Copy row",onAction:n("mceTableCopyRow"),icon:"temporary-placeholder",onSetup:t.onSetupCellOrRow}),e.ui.registry.addButton("tablepasterowbefore",{tooltip:"Paste row before",onAction:n("mceTablePasteRowBefore"),icon:"temporary-placeholder",onSetup:t.onSetupCellOrRow}),e.ui.registry.addButton("tablepasterowafter",{tooltip:"Paste row after",onAction:n("mceTablePasteRowAfter"),icon:"temporary-placeholder",onSetup:t.onSetupCellOrRow}),e.ui.registry.addButton("tableinsertdialog",{tooltip:"Insert table",onAction:n("mceInsertTable"),icon:"table"})},addToolbars:function(e){var t=e.getParam("table_toolbar",Tu);0<t.length&&e.ui.registry.addContextToolbar("table",{predicate:function(t){return e.dom.is(t,"table")&&e.getBody().contains(t)},items:t,scope:"node",position:"node"})}},cf={addMenuItems:function(e,t){function n(t){return function(){return e.execCommand(t)}}function r(t){var n=t.numRows,r=t.numColumns;e.undoManager.transact((function(){sc.insert(e,r,n)})),e.addVisual()}var o={text:"Table properties",onSetup:t.onSetupTable,onAction:n("mceTableProps")},i={text:"Delete table",icon:"table-delete-table",onSetup:t.onSetupTable,onAction:n("mceTableDelete")},a=[{type:"menuitem",text:"Insert row before",icon:"table-insert-row-above",onAction:n("mceTableInsertRowBefore"),onSetup:t.onSetupCellOrRow},{type:"menuitem",text:"Insert row after",icon:"table-insert-row-after",onAction:n("mceTableInsertRowAfter"),onSetup:t.onSetupCellOrRow},{type:"menuitem",text:"Delete row",icon:"table-delete-row",onAction:n("mceTableDeleteRow"),onSetup:t.onSetupCellOrRow},{type:"menuitem",text:"Row properties",icon:"table-row-properties",onAction:n("mceTableRowProps"),onSetup:t.onSetupCellOrRow},{type:"separator"},{type:"menuitem",text:"Cut row",onAction:n("mceTableCutRow"),onSetup:t.onSetupCellOrRow},{type:"menuitem",text:"Copy row",onAction:n("mceTableCopyRow"),onSetup:t.onSetupCellOrRow},{type:"menuitem",text:"Paste row before",onAction:n("mceTablePasteRowBefore"),onSetup:t.onSetupCellOrRow},{type:"menuitem",text:"Paste row after",onAction:n("mceTablePasteRowAfter"),onSetup:t.onSetupCellOrRow}],u={type:"nestedmenuitem",text:"Row",getSubmenuItems:function(){return a}},c=[{type:"menuitem",text:"Insert column before",icon:"table-insert-column-before",onAction:n("mceTableInsertColBefore"),onSetup:t.onSetupCellOrRow},{type:"menuitem",text:"Insert column after",icon:"table-insert-column-after",onAction:n("mceTableInsertColAfter"),onSetup:t.onSetupCellOrRow},{type:"menuitem",text:"Delete column",icon:"table-delete-column",onAction:n("mceTableDeleteCol"),onSetup:t.onSetupCellOrRow}],s={type:"nestedmenuitem",text:"Column",getSubmenuItems:function(){return c}},l=[{type:"menuitem",text:"Cell properties",icon:"table-cell-properties",onAction:n("mceTableCellProps"),onSetup:t.onSetupCellOrRow},{type:"menuitem",text:"Merge cells",icon:"table-merge-cells",onAction:n("mceTableMergeCells"),onSetup:t.onSetupMergeable},{type:"menuitem",text:"Split cell",icon:"table-split-cells",onAction:n("mceTableSplitCells"),onSetup:t.onSetupUnmergeable}],f={type:"nestedmenuitem",text:"Cell",getSubmenuItems:function(){return l}};return!1===e.getParam("table_grid",!0,"boolean")?e.ui.registry.addMenuItem("inserttable",{text:"Table",icon:"table",onAction:n("mceInsertTable")}):e.ui.registry.addNestedMenuItem("inserttable",{text:"Table",icon:"table",getSubmenuItems:function(){return[{type:"fancymenuitem",fancytype:"inserttable",onAction:r}]}}),e.ui.registry.addMenuItem("inserttabledialog",{text:"Insert table",icon:"table",onAction:n("mceInsertTable")}),e.ui.registry.addMenuItem("tableprops",o),e.ui.registry.addMenuItem("deletetable",i),e.ui.registry.addNestedMenuItem("row",u),e.ui.registry.addNestedMenuItem("column",s),e.ui.registry.addNestedMenuItem("cell",f),e.ui.registry.addContextMenu("table",{update:function(){return t.resetTargets(),t.targets().fold((function(){return""}),(function(e){return"caption"===_e(e.element())?"tableprops deletetable":"cell row column | tableprops deletetable"}))}}),{rowItems:a,columnItems:c,cellItems:l}}},sf=function(e,t,n,r,o){return{insertTable:function(t,n){return sc.insert(e,t,n)},setClipboardRows:function(e){var n=e,r=t;n=ce(e,We.fromDom),r.set(Y.from(n))},getClipboardRows:function(){return t.get().fold((function(){}),(function(e){return ce(e,(function(e){return e.dom()}))}))},resizeHandler:n,menuItems:o,selectionTargets:r}};function lf(e){var t=of(e),n=af(e,t),o=ks(e),i=rf(e,o.lazyResize,n),a=Mu(e,o.lazyWire),u=r(Y.none());pc.registerCommands(e,a,i,t,u),jr.registerEvents(e,t,a,i),t=cf.addMenuItems(e,n);return uf.addButtons(e,n),uf.addToolbars(e),e.on("PreInit",(function(){e.serializer.addTempAttr(Ir.firstSelected()),e.serializer.addTempAttr(Ir.lastSelected())})),Nu(e)&&e.on("keydown",(function(t){Ks.handle(t,e,a,o.lazyWire)})),e.on("remove",(function(){o.destroy(),i.destroy()})),sf(e,u,o,n,t)}K.add("table",lf)}(window)},"9dd9":function(e,t){!function(e){"use strict";function t(e){function n(){return r}var r=e;return{get:n,set:function(e){r=e},clone:function(){return t(r)}}}function n(){}function r(){return s}var o=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=tinymce.util.Tools.resolve("tinymce.util.Tools"),a=function(e){return function(){return e}},u=a(!1),c=a(!0),s=(re={fold:function(e,t){return e()},is:u,isSome:u,isNone:c,getOr:d,getOrThunk:f,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:a(null),getOrUndefined:a(void 0),or:d,orThunk:f,map:r,each:n,bind:r,exists:u,forall:c,filter:r,equals:l,equals_:l,toArray:function(){return[]},toString:a("none()")},Object.freeze&&Object.freeze(re),re);function l(e){return e.isNone()}function f(e){return e()}function d(e){return e}function m(e){function t(){return o}function n(t){return t(e)}var r=a(e),o={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:c,isNone:u,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:t,orThunk:t,map:function(t){return m(t(e))},each:function(t){t(e)},bind:n,exists:n,forall:n,filter:function(t){return t(e)?o:s},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(u,(function(t){return n(e,t)}))}};return o}var g={some:m,none:r,from:function(e){return null==e?s:m(e)}};function h(t,n){return b(e.document.createElement("canvas"),t,n)}function p(e){var t=h(e.width,e.height);return v(t).drawImage(e,0,0),t}function v(e){return e.getContext("2d")}function b(e,t,n){return e.width=t,e.height=n,e}var y,w,x=window.Promise||(y=C.immediateFn||"function"==typeof window.setImmediate&&window.setImmediate||function(t){e.setTimeout(t,1)},w=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},C.prototype.catch=function(e){return this.then(null,e)},C.prototype.then=function(e,t){var n=this;return new C((function(r,o){k.call(n,new N(e,t,r,o))}))},C.all=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Array.prototype.slice.call(1===e.length&&w(e[0])?e[0]:e);return new C((function(e,t){if(0===n.length)return e([]);for(var r=n.length,o=0;o<n.length;o++)!function o(i,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var u=a.then;if("function"==typeof u)return void u.call(a,(function(e){o(i,e)}),t)}n[i]=a,0==--r&&e(n)}catch(a){t(a)}}(o,n[o])}))},C.resolve=function(e){return e&&"object"==typeof e&&e.constructor===C?e:new C((function(t){t(e)}))},C.reject=function(e){return new C((function(t,n){n(e)}))},C.race=function(e){return new C((function(t,n){for(var r=0,o=e;r<o.length;r++)o[r].then(t,n)}))},C);function C(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=[],A(e,S(T,this),S(E,this))}function S(e,t){return function(){return e.apply(t,arguments)}}function k(e){var t=this;null===this._state?this._deferreds.push(e):y((function(){var n,r=t._state?e.onFulfilled:e.onRejected;if(null===r)(t._state?e.resolve:e.reject)(t._value);else{try{n=r(t._value)}catch(n){return void e.reject(n)}e.resolve(n)}}))}function T(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 A(S(t,e),S(T,this),S(E,this))}this._state=!0,this._value=e,O.call(this)}catch(e){E.call(this,e)}}function E(e){this._state=!1,this._value=e,O.call(this)}function O(){for(var e=0,t=this._deferreds;e<t.length;e++){var n=t[e];k.call(this,n)}this._deferreds=[]}function N(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 A(e,t,n){var r=!1;try{e((function(e){r||(r=!0,t(e))}),(function(e){r||(r=!0,n(e))}))}catch(e){if(r)return;r=!0,n(e)}}function D(t){var n;t=t.src;return 0===t.indexOf("data:")?R(t):(n=t,new x((function(t,r){var o=new e.XMLHttpRequest;o.open("GET",n,!0),o.responseType="blob",o.onload=function(){200===this.status&&t(this.response)},o.onerror=function(){var e,t=this;r(0===this.status?((e=new Error("No access to download image")).code=18,e.name="SecurityError",e):new Error("Error "+t.status+" downloading image"))},o.send()})))}function _(t){return new x((function(n,r){var o=e.URL.createObjectURL(t),i=new e.Image,a=function(){i.removeEventListener("load",u),i.removeEventListener("error",c)};function u(){a(),n(i)}function c(){a(),r("Unable to load data of type "+t.type+": "+o)}i.addEventListener("load",u),i.addEventListener("error",c),i.src=o,i.complete&&u()}))}function R(t){return new x((function(n,r){(function(t){if(t=t.split(","),!(n=/data:([^;]+)/.exec(t[0])))return g.none();for(var n=n[1],r=(t=t[1],e.atob(t)),o=r.length,i=Math.ceil(o/1024),a=new Array(i),u=0;u<i;++u){for(var c=1024*u,s=Math.min(1024+c,o),l=new Array(s-c),f=c,d=0;f<s;++d,++f)l[d]=r[f].charCodeAt(0);a[u]=new Uint8Array(l)}return g.some(new e.Blob(a,{type:n}))})(t).fold((function(){r("uri is not base64: "+t)}),n)}))}function B(t,n,r){return n=n||"image/png",e.HTMLCanvasElement.prototype.toBlob?new x((function(e,o){t.toBlob((function(t){t?e(t):o()}),n,r)})):R(t.toDataURL(n,r))}function M(t){return _(t).then((function(t){e.URL.revokeObjectURL(t.src);var n=h((n=t).naturalWidth||n.width,(n=t).naturalHeight||n.height);return v(n).drawImage(t,0,0),n}))}var P=_,z=D;function I(e,t,n){var r=t.type;function o(t,n){return e.then((function(e){return e.toDataURL(t||"image/png",n)}))}return{getType:a(r),toBlob:function(){return x.resolve(t)},toDataURL:function(){return n},toBase64:function(){return n.split(",")[1]},toAdjustedBlob:function(t,n){return e.then((function(e){return B(e,t,n)}))},toAdjustedDataURL:o,toAdjustedBase64:function(e,t){return o(e,t).then((function(e){return e.split(",")[1]}))},toCanvas:function(){return e.then(p)}}}function L(t){return n=t,new x((function(t){var r=new e.FileReader;r.onloadend=function(){t(r.result)},r.readAsDataURL(n)})).then((function(e){return I(M(t),t,e)}));var n}function F(e,t){return B(e,t).then((function(t){return I(x.resolve(e),t,e.toDataURL())}))}function H(e,t){return e.toCanvas().then((function(n){var r=e.getType(),o=t,i=h(n.width,n.height),a=v(i),u=0,c=0;return 90!==(o=o<0?360+o:o)&&270!==o||b(i,i.height,i.width),90!==o&&180!==o||(u=i.width),270!==o&&180!==o||(c=i.height),a.translate(u,c),a.rotate(o*Math.PI/180),a.drawImage(n,0,0),F(i,r)}))}function V(e,t){return e.toCanvas().then((function(n){var r=e.getType(),o=t,i=h(n.width,n.height),a=v(i);return"v"===o?(a.scale(1,-1),a.drawImage(n,0,-i.height)):(a.scale(-1,1),a.drawImage(n,-i.width,0)),F(i,r)}))}var U=V,j=H,W=L,q=tinymce.util.Tools.resolve("tinymce.util.Delay"),$=tinymce.util.Tools.resolve("tinymce.util.Promise"),G=tinymce.util.Tools.resolve("tinymce.util.URI"),X=function(e){return e.getParam("imagetools_cors_hosts",[],"string[]")},Y=function(e){return g.from(e.getParam("imagetools_fetch_image",null,"function"))},K=function(e){return e.getParam("images_reuse_filename",!1,"boolean")};function J(e){return null!=e}function Z(e){return e=ce(e),$.reject(e)}function Q(e){return oe(ue,(function(t){return t.type===e})).fold(a("Unknown service error"),(function(e){return e.message}))}function ee(e,t){var n,r={"Content-Type":"application/json;charset=UTF-8","tiny-api-key":t};return ie.requestUrlAsBlob((t=t,n=-1===(e=e).indexOf("?")?"?":"&",/[?&]apiKey=/.test(e)||!t?e:e+n+"apiKey="+encodeURIComponent(t)),r,!1).then((function(e){return e.status<200||300<=e.status?le(e.status,e.blob):$.resolve(e.blob)}))}var te,ne={getImageSize:function(e){var t,n;function r(e){return/^[0-9\.]+px$/.test(e)}return t=e.style.width,n=e.style.height,t||n?r(t)&&r(n)?{w:parseInt(t,10),h:parseInt(n,10)}:null:(t=e.width,n=e.height,t&&n?{w:parseInt(t,10),h:parseInt(n,10)}:null)},setImageSize:function(e,t){var n,r;t&&(n=e.style.width,r=e.style.height,(n||r)&&(e.style.width=t.w+"px",e.style.height=t.h+"px",e.removeAttribute("data-mce-style")),n=e.width,r=e.height,(n||r)&&(e.setAttribute("width",t.w),e.setAttribute("height",t.h)))},getNaturalImageSize:function(e){return{w:e.naturalWidth,h:e.naturalHeight}}},re=(te="function",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)===te}),oe=(Array.prototype.slice,function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n))return g.some(o)}return g.none()}),ie=(re(Array.from)&&Array.from,{traverse:function(e,t){return t=t.reduce((function(e,t){return J(e)?e[t]:void 0}),e),J(t)?t:null},readBlob:function(t){return new $((function(n){var r=new e.FileReader;r.onload=function(e){e=e.target,n(e.result)},r.readAsText(t)}))},requestUrlAsBlob:function(t,n,r){return new $((function(o){var a=new e.XMLHttpRequest;a.onreadystatechange=function(){4===a.readyState&&o({status:a.status,blob:this.response})},a.open("GET",t,!0),a.withCredentials=r,i.each(n,(function(e,t){a.setRequestHeader(t,e)})),a.responseType="blob",a.send()}))},parseJson:function(e){var t;try{t=JSON.parse(e)}catch(e){}return t}}),ae=[{code:404,message:"Could not find Image Proxy"},{code:403,message:"Rejected request"},{code:0,message:"Incorrect Image Proxy URL"}],ue=[{type:"key_missing",message:"The request did not include an api key."},{type:"key_not_found",message:"The provided api key could not be found."},{type:"domain_not_trusted",message:"The api key is not valid for the request origins."}],ce=function(e){return"ImageProxy HTTP error: "+oe(ae,(function(t){return e===t.code})).fold(a("Unknown ImageProxy error"),(function(e){return e.message}))},se=function(e){return e=ie.parseJson(e),e=ie.traverse(e,["error","type"]),"ImageProxy Service error: "+(e?Q(e):"Invalid JSON in service error message")},le=function(e,t){return 400===(n=e)||403===n||500===n?ie.readBlob(t).then((function(e){return e=se(e),$.reject(e)})):Z(e);var n},fe=Z;function de(e,t,n){return t?ee(e,t):ie.requestUrlAsBlob(e,{},n).then((function(e){return e.status<200||300<=e.status?fe(e.status):$.resolve(e.blob)}))}function me(e,t){var n=ke(e,t);return n?Te(r(1),r(2)):{major:0,minor:0};function r(e){return Number(t.replace(n,"$"+e))}}function ge(){return Te(0,0)}function he(e){var t=e.current;return{current:t,version:e.version,isEdge:Me(Ne,t),isChrome:Me(Ae,t),isIE:Me(De,t),isOpera:Me(_e,t),isFirefox:Me(Re,t),isSafari:Me(Be,t)}}function pe(e){var t=e.current;return{current:t,version:e.version,isWindows:We(Ie,t),isiOS:We(Le,t),isAndroid:We(Fe,t),isOSX:We(Ve,t),isLinux:We(He,t),isSolaris:We(Ue,t),isFreeBSD:We(je,t)}}function ve(e,t){var n=String(t).toLowerCase();return oe(e,(function(e){return e.search(n)}))}function be(e,t){return-1!==e.indexOf(t)}function ye(e){return function(t){return be(t,e)}}function we(e){if(null==e)throw new Error("Node cannot be null or undefined");return{dom:a(e)}}function xe(e,t){return 0===(t=t.src).indexOf("data:")||0===t.indexOf("blob:")||new G(t).host===e.documentBaseURI.host}function Ce(e,t){return-1!==i.inArray(X(e),new G(t.src).host)}function Se(e,t,n,r){return function(){return ot(e).fold((function(){rt(e,"Could not find selected image")}),(function(o){return e._scanForImages().then((function(){return ct(e,o.dom())})).then(W).then(n).then((function(n){return ft(e,n,!1,t,o.dom(),r)}),(function(t){rt(e,t)}))}))}}var ke=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}},Te=function(e,t){return{major:e,minor:t}},Ee=function(e,t){return t=String(t).toLowerCase(),0===e.length?ge():me(e,t)},Oe=ge,Ne="Edge",Ae="Chrome",De="IE",_e="Opera",Re="Firefox",Be="Safari",Me=function(e,t){return function(){return t===e}},Pe=function(){return he({current:void 0,version:Oe()})},ze=he,Ie=(a(Ne),a(Ae),a(De),a(_e),a(Re),a(Be),"Windows"),Le="iOS",Fe="Android",He="Linux",Ve="OSX",Ue="Solaris",je="FreeBSD",We=function(e,t){return function(){return t===e}},qe=function(){return pe({current:void 0,version:Oe()})},$e=pe,Ge=(a(Ie),a(Le),a(Fe),a(He),a(Ve),a(Ue),a(je),function(e,t){return ve(e,t).map((function(e){var n=Ee(e.versionRegexes,t);return{current:e.name,version:n}}))}),Xe=function(e,t){return ve(e,t).map((function(e){var n=Ee(e.versionRegexes,t);return{current:e.name,version:n}}))},Ye=(re=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,re=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return be(e,"edge/")&&be(e,"chrome")&&be(e,"safari")&&be(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,re],search:function(e){return be(e,"chrome")&&!be(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return be(e,"msie")||be(e,"trident")}},{name:"Opera",versionRegexes:[re,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:ye("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:ye("firefox")},{name:"Safari",versionRegexes:[re,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(be(e,"safari")||be(e,"mobile/"))&&be(e,"applewebkit")}}],[{name:"Windows",search:ye("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return be(e,"iphone")||be(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:ye("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:ye("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:ye("linux"),versionRegexes:[]},{name:"Solaris",search:ye("sunos"),versionRegexes:[]},{name:"FreeBSD",search:ye("freebsd"),versionRegexes:[]}]),Ke={browsers:a(re),oses:a(Ye)},Je=(re=t(function(e,t){var n,r,o,i,u,c=Ke.browsers(),s=Ke.oses(),l=(c=Ge(c,e).fold(Pe,ze),s=Xe(s,e).fold(qe,$e),r=c,e=e,t=t,l=(n=s).isiOS()&&!0===/ipad/i.test(e),o=n.isiOS()&&!l,i=n.isiOS()||n.isAndroid(),u=i||t("(pointer:coarse)"),t=l||!o&&i&&t("(min-device-width:768px)"),i=o||i&&!t,r=r.isSafari()&&n.isiOS()&&!1===/safari/i.test(e),e=!i&&!t&&!r,{isiPad:a(l),isiPhone:a(o),isTablet:a(t),isPhone:a(i),isTouch:a(u),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:a(r),isDesktop:a(e)});return{browser:c,os:s,deviceType:l}}(e.navigator.userAgent,(function(t){return e.window.matchMedia(t).matches}))),{fromHtml:function(t,n){if(n=(n||e.document).createElement("div"),n.innerHTML=t,!n.hasChildNodes()||1<n.childNodes.length)throw e.console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return we(n.childNodes[0])},fromTag:function(t,n){return n=(n||e.document).createElement(t),we(n)},fromText:function(t,n){return n=(n||e.document).createTextNode(t),we(n)},fromDom:we,fromPoint:function(e,t,n){return e=e.dom(),g.from(e.elementFromPoint(t,n)).map(we)}}),Ze=(Ye=(e.Node.ATTRIBUTE_NODE,e.Node.CDATA_SECTION_NODE,e.Node.COMMENT_NODE,e.Node.DOCUMENT_NODE,e.Node.DOCUMENT_TYPE_NODE,e.Node.DOCUMENT_FRAGMENT_NODE,e.Node.ELEMENT_NODE),e.Node.TEXT_NODE,e.Node.PROCESSING_INSTRUCTION_NODE,e.Node.ENTITY_REFERENCE_NODE,e.Node.ENTITY_NODE,e.Node.NOTATION_NODE,Ye),Qe=(re.get().browser.isIE(),void 0!==e.window?e.window:Function("return this;")(),function(e,t){return n=function(e){var n=t;if((e=e.dom()).nodeType!==Ze)return!1;if(void 0!==e.matches)return e.matches(n);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(n);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(n);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(n);throw new Error("Browser lacks native selectors")},oe(e.dom().childNodes,(function(e){return n(Je.fromDom(e))})).map(Je.fromDom);var n}),et=0,tt=function(e){return Qe(Je.fromDom(e),"img")},nt=function(e,t){return e.dom.is(t,"figure")},rt=function(e,t){e.notificationManager.open({text:t,type:"error"})},ot=function(e){var t=e.selection.getNode();return nt(e,t)?tt(t):g.some(Je.fromDom(t))},it=function(e,t){return t=t.match(/\/([^\/\?]+)?\.(?:jpeg|jpg|png|gif)(?:\?|$)/i),t?e.dom.encode(t[1]):null},at=function(){return"imagetools"+et++},ut=function(e,t){var n,r=t.src;return Ce(e,t)?de(t.src,null,(n=t,-1!==i.inArray(e.getParam("imagetools_credentials_hosts",[],"string[]"),new G(n.src).host))):xe(e,t)?z(t):(r=e.getParam("imagetools_proxy"),r+=(-1===r.indexOf("?")?"?":"&")+"url="+encodeURIComponent(t.src),n=e.getParam("api_key",e.getParam("imagetools_api_key","","string"),"string"),de(r,n,!1))},ct=function(e,t){var n,r,o=e.editorUpload.blobCache.getByUri(t.src);return o?$.resolve(o.blob()):(r=t,Y(n=e).fold((function(){return ut(n,r)}),(function(e){return e(r)})))},st=function(e,t){var n=q.setEditorTimeout(e,(function(){e.editorUpload.uploadImagesAuto()}),e.getParam("images_upload_timeout",3e4,"number"));t.set(n)},lt=function(e){q.clearTimeout(e.get())},ft=function(e,t,n,r,o,i){return t.toBlob().then((function(a){var u,c,s=e.editorUpload.blobCache,l=o.src;return K(e)&&(u=(c=s.getByUri(l))?(l=c.uri(),c.name()):it(e,l)),c=s.create({id:at(),blob:a,base64:t.toBase64(),uri:l,name:u}),s.add(c),e.undoManager.transact((function(){e.$(o).on("load",(function t(){e.$(o).off("load",t),e.nodeChanged(),n?e.editorUpload.uploadImagesAuto():(lt(r),st(e,r))})),i&&e.$(o).attr({width:i.w,height:i.h}),e.$(o).attr({src:c.blobUri()}).removeAttr("data-mce-src")})),c}))},dt=function(e,t,n){return function(){var r=ot(e).fold((function(){return null}),(function(e){return e=ne.getImageSize(e.dom()),e?{w:e.h,h:e.w}:null}));return Se(e,t,(function(e){return j(e,n)}),r)()}},mt=function(e,t,n){return function(){return Se(e,t,(function(e){return U(e,n)}))()}},gt=function(e,t){function n(t){return e.dom.is(t,"img:not([data-mce-object],[data-mce-placeholder])")&&(xe(e,t)||Ce(e,t)||e.settings.imagetools_proxy)}return nt(e,t)?tt(t).map((function(e){return n(e.dom())?g.some(e.dom()):g.none()})):n(t)?g.some(t):g.none()},ht=lt,pt=ct,vt=ot,bt=function(t,n,r,o,i){return new $((function(a){P(i).then((function(t){var n=ne.getNaturalImageSize(t);return o.w===n.w&&o.h===n.h||ne.getImageSize(r)&&ne.setImageSize(r,n),e.URL.revokeObjectURL(t.src),i})).then(W).then((function(e){return ft(t,e,!0,n,r)}),(function(){}))}))},yt=a("save-state"),wt=a("disable"),xt=a("enable"),Ct=function(t,n){return function(){var r=vt(t),o=r.map((function(e){return ne.getNaturalImageSize(e.dom())}));vt(t).each((function(i){gt(t,i.dom()).each((function(a){pt(t,i.dom()).then((function(i){i={blob:i,url:e.URL.createObjectURL(i)},t.windowManager.open({title:"Edit Image",size:"large",body:{type:"panel",items:[{type:"imagetools",name:"imagetools",label:"Edit Image",currentState:i}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0,disabled:!0}],onSubmit:function(e){var i=e.getData().imagetools.blob;r.each((function(e){o.each((function(r){bt(t,n,e.dom(),r,i)}))})),e.close()},onCancel:function(){},onAction:function(e,t){switch(t.name){case yt():t.value?e.enable("save"):e.disable("save");break;case wt():e.disable("save"),e.disable("cancel");break;case xt():e.enable("cancel")}}})}))}))}))}},St=function(e,t){i.each({mceImageRotateLeft:dt(e,t,-90),mceImageRotateRight:dt(e,t,90),mceImageFlipVertical:mt(e,t,"v"),mceImageFlipHorizontal:mt(e,t,"h"),mceEditImage:Ct(e,t)},(function(t,n){e.addCommand(n,t)}))},kt=function(e,t,n){e.on("NodeChange",(function(r){var o=n.get();o&&o.src!==r.element.src&&(ht(t),e.editorUpload.uploadImagesAuto(),n.set(null)),gt(e,r.element).each(n.set)}))},Tt=function(e){function t(t){return function(){return e.execCommand(t)}}e.ui.registry.addButton("rotateleft",{tooltip:"Rotate counterclockwise",icon:"rotate-left",onAction:t("mceImageRotateLeft")}),e.ui.registry.addButton("rotateright",{tooltip:"Rotate clockwise",icon:"rotate-right",onAction:t("mceImageRotateRight")}),e.ui.registry.addButton("flipv",{tooltip:"Flip vertically",icon:"flip-vertically",onAction:t("mceImageFlipVertical")}),e.ui.registry.addButton("fliph",{tooltip:"Flip horizontally",icon:"flip-horizontally",onAction:t("mceImageFlipHorizontal")}),e.ui.registry.addButton("editimage",{tooltip:"Edit image",icon:"edit-image",onAction:t("mceEditImage"),onSetup:function(t){function n(){vt(e).each((function(n){n=gt(e,n.dom()).isNone(),t.setDisabled(n)}))}return e.on("NodeChange",n),function(){e.off("NodeChange",n)}}}),e.ui.registry.addButton("imageoptions",{tooltip:"Image options",icon:"image-options",onAction:t("mceImage")}),e.ui.registry.addContextMenu("imagetools",{update:function(n){return gt(e,n).fold((function(){return[]}),(function(e){return[{text:"Edit image",icon:"edit-image",onAction:t("mceEditImage")}]}))}})},Et=function(e){e.ui.registry.addContextToolbar("imagetools",{items:e.getParam("imagetools_toolbar","rotateleft rotateright flipv fliph editimage imageoptions"),predicate:function(t){return gt(e,t).isSome()},position:"node",scope:"node"})};o.add("imagetools",(function(e){var n=t(0),r=t(null);St(e,n),Tt(e),Et(e),kt(e,n,r)}))}(window)},a376:function(e,t){!function(){"use strict";function e(e){return e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S"))}function t(e){return e.getParam("insertdatetime_formats",["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"])}function n(e,t,n){return n=n||new Date,(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+n.getFullYear())).replace("%y",""+n.getYear())).replace("%m",m(n.getMonth()+1,2))).replace("%d",m(n.getDate(),2))).replace("%H",""+m(n.getHours(),2))).replace("%M",""+m(n.getMinutes(),2))).replace("%S",""+m(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(d[n.getMonth()]))).replace("%b",""+e.translate(f[n.getMonth()]))).replace("%A",""+e.translate(l[n.getDay()]))).replace("%a",""+e.translate(s[n.getDay()]))).replace("%%","%")}var r=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(e){return e.getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d"))},i=e,a=t,u=function(n){var r=t(n);return 0<r.length?r[0]:e(n)},c=function(e){return e.getParam("insertdatetime_element",!1)},s="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),l="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),f="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),d="January February March April May June July August September October November December".split(" "),m=function(e,t){if((e=""+e).length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e},g=function(e,t){var r,o,i,a,u;c(e)?(r=n(e,t),o=void 0,o=/%[HMSIp]/.test(t)?n(e,"%Y-%m-%dT%H:%M"):n(e,"%Y-%m-%d"),(a=e.dom.getParent(e.selection.getStart(),"time"))?(a=a,u=o,u=(i=e).dom.create("time",{datetime:u},r),a.parentNode.insertBefore(u,a),i.dom.remove(a),i.selection.select(u,!0),i.selection.collapse(!1)):e.insertContent('<time datetime="'+o+'">'+r+"</time>")):e.insertContent(n(e,t))},h=n,p=function(e){e.addCommand("mceInsertDate",(function(){g(e,o(e))})),e.addCommand("mceInsertTime",(function(){g(e,i(e))}))},v=tinymce.util.Tools.resolve("tinymce.util.Tools"),b=function(e){function t(){return n}var n=e;return{get:t,set:function(e){n=e},clone:function(){return b(n)}}},y=function(e){var t=a(e),n=b(u(e));e.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",select:function(e){return e===n.get()},fetch:function(n){n(v.map(t,(function(t){return{type:"choiceitem",text:h(e,t),value:t}})))},onAction:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];g(e,n.get())},onItemAction:function(t,r){n.set(r),g(e,r)}}),e.ui.registry.addNestedMenuItem("insertdatetime",{icon:"insert-time",text:"Date/time",getSubmenuItems:function(){return v.map(t,(function(t){return{type:"menuitem",text:h(e,t),onAction:(r=t,function(){n.set(r),g(e,r)})};var r}))}})};r.add("insertdatetime",(function(e){p(e),y(e)}))}()},a8b8:function(e,t){!function(e){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),r={},o=r,i=void 0!==r?r:"undefined"!=typeof WorkerGlobalScope&&e.self instanceof WorkerGlobalScope?e.self:{},a=function(){var t=/\blang(?:uage)?-(?!\*)(\w+)\b/i,n=i.Prism={util:{encode:function(e){return e instanceof r?new r(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},clone:function(e){switch(n.util.type(e)){case"Object":var t,r={};for(t in e)e.hasOwnProperty(t)&&(r[t]=n.util.clone(e[t]));return r;case"Array":return e.map&&e.map((function(e){return n.util.clone(e)}))}return e}},languages:{extend:function(e,t){var r,o=n.util.clone(n.languages[e]);for(r in t)o[r]=t[r];return o},insertBefore:function(e,t,r,o){var i=(o=o||n.languages)[e];if(2===arguments.length){for(var a in r=t)r.hasOwnProperty(a)&&(i[a]=r[a]);return i}var u,c={};for(u in i)if(i.hasOwnProperty(u)){if(u===t)for(var a in r)r.hasOwnProperty(a)&&(c[a]=r[a]);c[u]=i[u]}return n.languages.DFS(n.languages,(function(t,n){n===o[e]&&t!==e&&(this[t]=c)})),o[e]=c},DFS:function(e,t,r){for(var o in e)e.hasOwnProperty(o)&&(t.call(e,o,e[o],r||o),"Object"===n.util.type(e[o])?n.languages.DFS(e[o],t):"Array"===n.util.type(e[o])&&n.languages.DFS(e[o],t,o))}},plugins:{},highlightAll:function(t,r){for(var o,i=e.document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'),a=0;o=i[a++];)n.highlightElement(o,!0===t,r)},highlightElement:function(r,o,a){for(var u,c=r;c&&!t.test(c.className);)c=c.parentNode;c&&(s=(c.className.match(t)||[,""])[1],u=n.languages[s]),r.className=r.className.replace(t,"").replace(/\s+/g," ")+" language-"+s,c=r.parentNode,/pre/i.test(c.nodeName)&&(c.className=c.className.replace(t,"").replace(/\s+/g," ")+" language-"+s);var s,l=r.textContent,f={element:r,language:s,grammar:u,code:l};l&&u?(n.hooks.run("before-highlight",f),o&&i.Worker?((s=new e.Worker(n.filename)).onmessage=function(e){f.highlightedCode=e.data,n.hooks.run("before-insert",f),f.element.innerHTML=f.highlightedCode,a&&a.call(f.element),n.hooks.run("after-highlight",f),n.hooks.run("complete",f)},s.postMessage(JSON.stringify({language:f.language,code:f.code,immediateClose:!0}))):(f.highlightedCode=n.highlight(f.code,f.grammar,f.language),n.hooks.run("before-insert",f),f.element.innerHTML=f.highlightedCode,a&&a.call(r),n.hooks.run("after-highlight",f),n.hooks.run("complete",f))):n.hooks.run("complete",f)},highlight:function(e,t,o){return e=n.tokenize(e,t),r.stringify(n.util.encode(e),o)},tokenize:function(e,t,r){var o=n.Token,i=[e],a=t.rest;if(a){for(var u in a)t[u]=a[u];delete t.rest}e:for(var u in t)if(t.hasOwnProperty(u)&&t[u])for(var c=t[u],s=(c="Array"===n.util.type(c)?c:[c],0);s<c.length;++s)for(var l=(g=c[s]).inside,f=!!g.lookbehind,d=0,m=g.alias,g=g.pattern||g,h=0;h<i.length;h++){var p,v,b,y=i[h];if(i.length>e.length)break e;y instanceof o||(g.lastIndex=0,(p=g.exec(y))&&(f&&(d=p[1].length),v=(b=p.index-1+d)+(p=p[0].slice(d)).length,b=y.slice(0,b+1),y=y.slice(v+1),v=[h,1],b&&v.push(b),b=new o(u,l?n.tokenize(p,l):p,m),v.push(b),y&&v.push(y),Array.prototype.splice.apply(i,v)))}return i},hooks:{all:{},add:function(e,t){var r=n.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){var r=n.hooks.all[e];if(r&&r.length)for(var o=0,i=void 0;i=r[o++];)i(t)}}},r=n.Token=function(e,t,n){this.type=e,this.content=t,this.alias=n};if(r.stringify=function(e,t,o){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map((function(n){return r.stringify(n,t,e)})).join("");var i,a={type:e.type,content:r.stringify(e.content,t,o),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:o},u=("comment"===a.type&&(a.attributes.spellcheck="true"),e.alias&&(o="Array"===n.util.type(e.alias)?e.alias:[e.alias],Array.prototype.push.apply(a.classes,o)),n.hooks.run("wrap",a),"");for(i in a.attributes)u+=(u?" ":"")+i+'="'+(a.attributes[i]||"")+'"';return"<"+a.tag+' class="'+a.classes.join(" ")+'" '+u+">"+a.content+"</"+a.tag+">"},!i.document)return i.addEventListener&&i.addEventListener("message",(function(e){e=JSON.parse(e.data);var t=e.language,r=e.code;e=e.immediateClose;i.postMessage(n.highlight(r,n.languages[t],t)),e&&i.close()}),!1),i.Prism}();function u(e){return function(){return e}}function c(){return d}void 0!==o&&(o.Prism=a),a.languages.markup={comment:/<!--[\w\W]*?-->/,prolog:/<\?[\w\W]+?\?>/,doctype:/<!DOCTYPE[\w\W]+?>/,cdata:/<!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/<\/?[^\s>\/=.]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},a.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),a.languages.xml=a.languages.markup,a.languages.html=a.languages.markup,a.languages.mathml=a.languages.markup,a.languages.svg=a.languages.markup,a.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},a.languages.css.atrule.inside.rest=a.util.clone(a.languages.css),a.languages.markup&&(a.languages.insertBefore("markup","tag",{style:{pattern:/<style[\w\W]*?>[\w\W]*?<\/style>/i,inside:{tag:{pattern:/<style[\w\W]*?>|<\/style>/i,inside:a.languages.markup.tag.inside},rest:a.languages.css},alias:"language-css"}}),a.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').*?\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:a.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:a.languages.css}},alias:"language-css"}},a.languages.markup.tag)),a.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:/(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(true|false)\b/,function:/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},a.languages.javascript=a.languages.extend("clike",{keyword:/\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,function:/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i}),a.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}}),a.languages.insertBefore("javascript","class-name",{"template-string":{pattern:/`(?:\\`|\\?[^`])*`/,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:a.languages.javascript}},string:/[\s\S]+/}}}),a.languages.markup&&a.languages.insertBefore("markup","tag",{script:{pattern:/<script[\w\W]*?>[\w\W]*?<\/script>/i,inside:{tag:{pattern:/<script[\w\W]*?>|<\/script>/i,inside:a.languages.markup.tag.inside},rest:a.languages.javascript},alias:"language-javascript"}}),a.languages.js=a.languages.javascript,a.languages.c=a.languages.extend("clike",{keyword:/\b(asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,operator:/\-[>-]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|?\||[~^%?*\/]/,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)[ful]*\b/i}),a.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+([^\r\n\\]|\\.|\\(?:\r\n?|\n))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(<.+?>|("|')(\\?.)+?\3)/,lookbehind:!0}}}}),delete a.languages.c["class-name"],delete a.languages.c.boolean,a.languages.csharp=a.languages.extend("clike",{keyword:/\b(abstract|as|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|volatile|while|add|alias|ascending|async|await|descending|dynamic|from|get|global|group|into|join|let|orderby|partial|remove|select|set|value|var|where|yield)\b/,string:[/@("|')(\1\1|\\\1|\\?(?!\1)[\s\S])*\1/,/("|')(\\?.)*?\1/],number:/\b-?(0x[\da-f]+|\d*\.?\d+)\b/i}),a.languages.insertBefore("csharp","keyword",{preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0}}),a.languages.cpp=a.languages.extend("c",{keyword:/\b(alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,boolean:/\b(true|false)\b/,operator:/[-+]{1,2}|!=?|<{1,2}=?|>{1,2}=?|\->|:{1,2}|={1,2}|\^|~|%|&{1,2}|\|?\||\?|\*|\/|\b(and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/}),a.languages.insertBefore("cpp","keyword",{"class-name":{pattern:/(class\s+)[a-z0-9_]+/i,lookbehind:!0}}),a.languages.java=a.languages.extend("clike",{keyword:/\b(abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/,number:/\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp\-]+\b|\b\d*\.?\d+(?:e[+-]?\d+)?[df]?\b/i,operator:{pattern:/(^|[^.])(?:\+[+=]?|-[-=]?|!=?|<<?=?|>>?>?=?|==?|&[&=]?|\|[|=]?|\*=?|\/=?|%=?|\^=?|[?:~])/m,lookbehind:!0}}),a.languages.php=a.languages.extend("clike",{keyword:/\b(and|or|xor|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|for|foreach|function|include|include_once|global|if|new|return|static|switch|use|require|require_once|var|while|abstract|interface|public|implements|private|protected|parent|throw|null|echo|print|trait|namespace|final|yield|goto|instanceof|finally|try|catch)\b/i,constant:/\b[A-Z0-9_]{2,}\b/,comment:{pattern:/(^|[^\\])(?:\/\*[\w\W]*?\*\/|\/\/.*)/,lookbehind:!0}}),a.languages.insertBefore("php","class-name",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),a.languages.insertBefore("php","keyword",{delimiter:/\?>|<\?(?:php)?/i,variable:/\$\w+\b/i,package:{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),a.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}}),a.languages.markup&&(a.hooks.add("before-highlight",(function(e){"php"===e.language&&(e.tokenStack=[],e.backupCode=e.code,e.code=e.code.replace(/(?:<\?php|<\?)[\w\W]*?(?:\?>)/gi,(function(t){return e.tokenStack.push(t),"{{{PHP"+e.tokenStack.length+"}}}"})))})),a.hooks.add("before-insert",(function(e){"php"===e.language&&(e.code=e.backupCode,delete e.backupCode)})),a.hooks.add("after-highlight",(function(e){if("php"===e.language){for(var t,n=0;t=e.tokenStack[n];n++)e.highlightedCode=e.highlightedCode.replace("{{{PHP"+(n+1)+"}}}",a.highlight(t,e.grammar,"php").replace(/\$/g,"$$$$"));e.element.innerHTML=e.highlightedCode}})),a.hooks.add("wrap",(function(e){"php"===e.language&&"markup"===e.type&&(e.content=e.content.replace(/(\{\{\{PHP[0-9]+\}\}\})/g,'<span class="token php">$1</span>'))})),a.languages.insertBefore("php","comment",{markup:{pattern:/<[^?]\/?(.*?)>/,inside:a.languages.markup},php:/\{\{\{PHP[0-9]+\}\}\}/})),a.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:/"""[\s\S]+?"""|'''[\s\S]+?'''|("|')(?:\\?.)*?\1/,function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_][a-zA-Z0-9_]*(?=\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)[a-z0-9_]+/i,lookbehind:!0},keyword:/\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|with|yield)\b/,boolean:/\b(?:True|False)\b/,number:/\b-?(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,punctuation:/[{}[\];(),.:]/},(r=a).languages.ruby=r.languages.extend("clike",{comment:/#(?!\{[^\r\n]*?\}).*/,keyword:/\b(alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/}),o={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:r.util.clone(r.languages.ruby)}},r.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1[gim]{0,3}/,inside:{interpolation:o}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,inside:{interpolation:o}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,inside:{interpolation:o}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,inside:{interpolation:o}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,inside:{interpolation:o}},{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}],variable:/[@$]+[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/,symbol:/:[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/}),r.languages.insertBefore("ruby","number",{builtin:/\b(Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|File|Fixnum|Fload|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z][a-zA-Z_0-9]*(?:[?!]|\b)/}),r.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1/,inside:{interpolation:o}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,inside:{interpolation:o}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,inside:{interpolation:o}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,inside:{interpolation:o}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,inside:{interpolation:o}},{pattern:/("|')(#\{[^}]+\}|\\(?:\r?\n|\r)|\\?.)*?\1/,inside:{interpolation:o}}];var s={isCodeSample:function(e){return e&&"PRE"===e.nodeName&&-1!==e.className.indexOf("language-")},trimArg:function(e){return function(t,n){return e(n)}}},l=u(!1),f=u(!0),d=(r={fold:function(e,t){return e()},is:l,isSome:l,isNone:f,getOr:h,getOrThunk:g,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:u(null),getOrUndefined:u(void 0),or:h,orThunk:g,map:c,each:function(){},bind:c,exists:l,forall:f,filter:c,equals:m,equals_:m,toArray:function(){return[]},toString:u("none()")},Object.freeze&&Object.freeze(r),r);function m(e){return e.isNone()}function g(e){return e()}function h(e){return e}function p(e){function t(){return o}function n(t){return t(e)}var r=u(e),o={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:f,isNone:l,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:t,orThunk:t,map:function(t){return p(t(e))},each:function(t){t(e)},bind:n,exists:n,forall:n,filter:function(t){return t(e)?o:d},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(l,(function(t){return n(e,t)}))}};return o}function v(e){return e=e.selection?e.selection.getNode():null,s.isCodeSample(e)?y.some(e):y.none()}var b,y={some:p,none:c,from:function(e){return null==e?d:p(e)}},w=v,x=function(e,t,r){e.undoManager.transact((function(){var o=v(e);return r=n.DOM.encode(r),o.fold((function(){e.insertContent('<pre id="__new" class="language-'+t+'">'+r+"</pre>"),e.selection.select(e.$("#__new").removeAttr("id")[0])}),(function(n){e.dom.setAttrib(n,"class","language-"+t),n.innerHTML=r,a.highlightElement(n),e.selection.select(n)}))}))},C=function(e){return v(e).fold((function(){return""}),(function(e){return e.textContent}))},S=function(e){return e.settings.codesample_languages},k=function(e){return e=S(e),e||[{text:"HTML/XML",value:"markup"},{text:"JavaScript",value:"javascript"},{text:"CSS",value:"css"},{text:"PHP",value:"php"},{text:"Ruby",value:"ruby"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C",value:"c"},{text:"C#",value:"csharp"},{text:"C++",value:"cpp"}]},T=function(e,t){return w(e).fold((function(){return t}),(function(e){return e=e.className.match(/language-(\w+)/),e?e[1]:t}))},E=(o=(b="function",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)===b}),Array.prototype.slice,o(Array.from)&&Array.from,function(e){var t=k(e),n=(0===(n=t).length?y.none():y.some(n[0])).fold((function(){return""}),(function(e){return e.value})),r=(n=T(e,n),C(e));e.windowManager.open({title:"Insert/Edit Code Sample",size:"large",body:{type:"panel",items:[{type:"selectbox",name:"language",label:"Language",items:t},{type:"textarea",name:"code",label:"Code view"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{language:n,code:r},onSubmit:function(t){var n=t.getData();x(e,n.language,n.code),t.close()}})}),O=function(e){e.addCommand("codesample",(function(){var t=e.selection.getNode();e.selection.isCollapsed()||s.isCodeSample(t)?E(e):e.formatter.toggle("code")}))},N=function(e){var t=e.$;e.on("PreProcess",(function(e){t("pre[contenteditable=false]",e.node).filter(s.trimArg(s.isCodeSample)).each((function(e,n){var r=t(n),o=n.textContent;r.attr("class",t.trim(r.attr("class"))),r.removeAttr("contentEditable"),r.empty().append(t("<code></code>").each((function(){this.textContent=o})))}))})),e.on("SetContent",(function(){var n=t("pre").filter(s.trimArg(s.isCodeSample)).filter((function(e,t){return"false"!==t.contentEditable}));n.length&&e.undoManager.transact((function(){n.each((function(n,r){t(r).find("br").each((function(t,n){n.parentNode.replaceChild(e.getDoc().createTextNode("\n"),n)})),r.contentEditable="false",r.innerHTML=e.dom.encode(r.textContent),a.highlightElement(r),r.className=t.trim(r.className)}))}))}))},A=function(e){e.ui.registry.addToggleButton("codesample",{icon:"code-sample",tooltip:"Insert/edit code sample",onAction:function(){return E(e)},onSetup:function(t){function n(){var n,r;t.setActive((r=(n=e).selection.getStart(),n.dom.is(r,"pre.language-markup")))}return e.on("NodeChange",n),function(){return e.off("NodeChange",n)}}}),e.ui.registry.addMenuItem("codesample",{text:"Code sample...",icon:"code-sample",onAction:function(){return E(e)}})};t.add("codesample",(function(e){N(e),A(e),O(e),e.on("dblclick",(function(t){s.isCodeSample(t.target)&&E(e)}))}))}(window)},bc54:function(e,t,n){n("7c4f")},be7f:function(e,t,n){(function(e){!function(t){"use strict";function n(e){return function(t){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}(t)===e}}function r(e){return function(){return e}}function o(){return p}var i=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.util.VK"),u=n("string"),c=n("array"),s=n("boolean"),l=n("function"),f={assumeExternalTargets:function(e){return e=e.getParam("link_assume_external_targets",!1),s(e)&&e?1:!u(e)||"http"!==e&&"https"!==e?0:e},hasContextToolbar:function(e){return e.getParam("link_context_toolbar",!1,"boolean")},getLinkList:function(e){return e.getParam("link_list")},getDefaultLinkTarget:function(e){return e.getParam("default_link_target")},getTargetList:function(e){return e.getParam("target_list",!0)},getRelList:function(e){return e.getParam("rel_list",[],"array")},getLinkClassList:function(e){return e.getParam("link_class_list",[],"array")},shouldShowLinkTitle:function(e){return e.getParam("link_title",!0,"boolean")},allowUnsafeLinkTarget:function(e){return e.getParam("allow_unsafe_link_target",!1,"boolean")},useQuickLink:function(e){return e.getParam("link_quicklink",!1,"boolean")}},d={open:function(e){var n=t.document.createElement("a");n.target="_blank",n.href=e,n.rel="noreferrer noopener",e=t.document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,t.window,0,0,0,0,0,!1,!1,!1,!1,0,null),n=n,e=e,t.document.body.appendChild(n),n.dispatchEvent(e),t.document.body.removeChild(n)}},m=function(){},g=r(!1),h=r(!0),p=(re={fold:function(e,t){return e()},is:g,isSome:g,isNone:h,getOr:y,getOrThunk:b,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:r(null),getOrUndefined:r(void 0),or:y,orThunk:b,map:o,each:m,bind:o,exists:g,forall:h,filter:o,equals:v,equals_:v,toArray:function(){return[]},toString:r("none()")},Object.freeze&&Object.freeze(re),re);function v(e){return e.isNone()}function b(e){return e()}function y(e){return e}function w(e){function t(){return i}function n(t){return t(e)}var o=r(e),i={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:h,isNone:g,getOr:o,getOrThunk:o,getOrDie:o,getOrNull:o,getOrUndefined:o,or:t,orThunk:t,map:function(t){return w(t(e))},each:function(t){t(e)},bind:n,exists:n,forall:n,filter:function(t){return t(e)?i:p},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(g,(function(t){return n(e,t)}))}};return i}function x(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}function C(e,t){function n(e){return e.filter((function(e){return-1===W.inArray(r,e)}))}var r=["noopener"];e=e?e.split(/\s+/):[];return 0<(t=t?0<(t=n(t=e)).length?t.concat(r):r:n(e)).length?W.trim(t.sort().join(" ")):""}function S(e,t){return t=t||e.selection.getNode(),$(t)?e.dom.select("a[href]",t)[0]:e.dom.getParent(t,"a[href]")}function k(e){return e&&"A"===e.nodeName&&!!e.href}function T(e,t){for(var n=0;n<e.length;n++){var r=t(e[n],n);if(r.isSome())return r}return I.none()}function E(e){return void 0===e&&(e=K),function(t){return I.from(t).map((function(t){return J(t,e)}))}}function O(e,t,n,r){r=r[t];var o=0<e.length;return void 0!==r?ee(r,n).map((function(t){return{url:{value:t.value,meta:{text:o?e:t.text,attach:m}},text:o?e:t.text}})):I.none()}function N(e){function n(e){r()?a(e):i.push(e)}function r(){return o.isSome()}var o=I.none(),i=[],a=function(e){o.each((function(n){t.setTimeout((function(){e(n)}),0)}))};return e((function(e){o=I.some(e),x(i,a),i=[]})),{get:n,map:function(e){return N((function(t){n((function(n){t(e(n))}))}))},isReady:r}}function A(e){var t=e.href;return 0<t.indexOf("@")&&-1===t.indexOf("//")&&-1===t.indexOf("mailto:")?I.some({message:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",preprocess:function(e){return ne(ne({},e),{href:"mailto:"+t})}}):I.none()}function D(e,t,n){return function(r){var o=r.getData();if(!o.url.value)return X.unlink(e),void r.close();function i(e){return I.from(o[e]).filter((function(n){return!t.anchor[e].is(n)}))}var a={href:o.url.value,text:i("text"),target:i("target"),rel:i("rel"),class:i("linkClass"),title:i("title")},u={href:o.url.value,attach:void 0!==o.url.meta&&o.url.meta.attach?o.url.meta.attach:function(){}};de.preprocess(e,n,a).get((function(t){X.link(e,u,t)})),r.close()}}function _(e){return ke(e,e.selection.getStart())}function R(e,t){var n;t&&(n=X.getHref(t),/^#/.test(n)?(n=e.$(n)).length&&e.selection.scrollIntoView(n[0],!0):d.open(t.href))}var B,M,P,z,I={some:w,none:o,from:function(e){return null==e?p:w(e)}},L=(Array.prototype.slice,Array.prototype.indexOf),F=Array.prototype.push,H=function(e,t){return L.call(e,t)},V=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},U=function(e,t,n){return x(e,(function(e){n=t(n,e)})),n},j=function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!c(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);F.apply(t,e[n])}return t},W=(l(Array.from)&&Array.from,tinymce.util.Tools.resolve("tinymce.util.Tools")),q=function(e){return/^\w+:/i.test(e)},$=function(e){return e&&"FIGURE"===e.nodeName&&/\bimage\b/i.test(e.className)},G=function(e,t,n){t=e.dom.select("img",t)[0],t&&(e=e.dom.create("a",n),t.parentNode.insertBefore(e,t),e.appendChild(t))},X={link:function(e,t,n){e.undoManager.transact((function(){var r,o,i,a,u,c,s,l=e.selection.getNode(),d=S(e,l),m=U(["title","rel","class","target"],(function(e,t){return r[t].each((function(n){e[t]=0<n.length?n:null})),e}),{href:(r=n).href});0<f.getRelList(e).length||!1!==f.allowUnsafeLinkTarget(e)||(o=C(m.rel,"_blank"===m.target),m.rel=o||null),I.from(m.target).isNone()&&(m.target=f.getDefaultLinkTarget(e)),m.href=(o=m.href,"http"!==(u=f.assumeExternalTargets(e))&&"https"!==u||q(o)?o:u+"://"+o),n.href===t.href&&t.attach(),d?(e.focus(),u=e,c=d,d=n.text,s=m,d.each((function(e){c.hasOwnProperty("innerText")?c.innerText=e:c.textContent=e})),u.dom.setAttribs(c,s),u.selection.select(c)):(i=e,d=l,s=n.text,a=m,$(d)?G(i,d,a):s.fold((function(){i.execCommand("mceInsertLink",!1,a)}),(function(e){i.insertContent(i.dom.createHTML("a",a,i.dom.encode(e)))})))}))},unlink:function(e){e.undoManager.transact((function(){var t=e.selection.getNode();if($(t)){var n=e,r=t,o=n.dom.select("img",r)[0];o&&(r=n.dom.getParents(o,"a[href]",r)[0],r&&(r.parentNode.insertBefore(o,r),n.dom.remove(r)))}else o=e.dom.getParent(t,"a[href]",e.getBody()),o&&e.dom.remove(o,!0);e.focus()}))},isLink:k,hasLinks:function(e){return 0<W.grep(e,k).length},getHref:function(e){var t=e.getAttribute("data-mce-href");return t||e.getAttribute("href")},isOnlyTextSelected:function(e){return!(/</.test(e)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(e)||-1===e.indexOf("href=")))},getAnchorElement:S,getAnchorText:function(e,t){return(t?t.innerText||t.textContent:e.getContent({format:"text"})).replace(/\uFEFF/g,"")},applyRelTargetRules:C,hasProtocol:q},Y=function(e){for(var t=[],n=function(e){t.push(e)},r=0;r<e.length;r++)e[r].each(n);return t},K=function(e){return u(e.value)?e.value:""},J=function(e,t){var n=[];return W.each(e,(function(e){var r=u(e.text)?e.text:u(e.title)?e.title:"";void 0===e.menu&&(e=t(e),n.push({text:r,value:e}))})),n},Z={sanitize:function(e){return E(K)(e)},sanitizeWith:E,createUi:function(e,t){return function(n){return{name:e,type:"selectbox",label:t,items:n}}},getValue:K},Q=function(e){function t(){return n}var n=e;return{get:t,set:function(e){n=e},clone:function(){return Q(n)}}},ee=function(e,t){return T(t,(function(t){return I.some(t).filter((function(t){return t.value===e}))}))},te={init:function(e,t){function n(e,n){o=t;var o,i=("link"===(i=n.name)?o.catalogs.link:"anchor"===i?o.catalogs.anchor:I.none()).getOr([]);return O(r.get(),n.name,i,e)}var r=Q(e.text);return{onChange:function(e,t){return"url"===t.name?(i=e(),r.get().length<=0?(i=void 0!==i.url.meta.text?i.url.meta.text:i.url.value,I.some({text:i})):I.none()):(i=["anchor","link"],o=t.name,-1<H(i,o)?n(e(),t):("text"===t.name&&r.set(e().text),I.none()));var o,i}}},getDelta:O},ne=function(){return(ne=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)},re={},oe={exports:re},ie=(M=re,P=oe,z=B=void 0,function(t){"object"==typeof M&&void 0!==P?P.exports=t():"function"==typeof B&&B.amd?B([],t):("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:this).EphoxContactWrapper=t()}((function(){return function e(t,n,r){function o(a,u){if(!n[a]){if(!t[a]){var c="function"==typeof z&&z;if(!u&&c)return c(a,!0);if(i)return i(a,!0);throw(u=new Error("Cannot find module '"+a+"'")).code="MODULE_NOT_FOUND",u}c=n[a]={exports:{}},t[a][0].call(c.exports,(function(e){return o(t[a][1][e]||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof z&&z,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){var r,o;t=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(e){o=a}function u(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return(r=setTimeout)(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}var c,s=[],l=!1,f=-1;function d(){l&&c&&(l=!1,c.length?s=c.concat(s):f=-1,s.length&&m())}function m(){if(!l){for(var e=u(d),t=(l=!0,s.length);t;){for(c=s,s=[];++f<t;)c&&c[f].run();f=-1,t=s.length}c=null,l=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===a||!o)&&clearTimeout)return(o=clearTimeout)(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function h(){}t.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];s.push(new g(e,t)),1!==s.length||l||u(m)},g.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={},t.on=h,t.addListener=h,t.once=h,t.off=h,t.removeListener=h,t.removeAllListeners=h,t.emit=h,t.prependListener=h,t.prependOnceListener=h,t.listeners=function(e){return[]},t.binding=function(e){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(e){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},{}],2:[function(e,t,n){(function(e){function n(){}function r(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=void 0,this._deferreds=[],s(e,this)}function o(e,t){for(;3===e._state;)e=e._value;0===e._state?e._deferreds.push(t):(e._handled=!0,r._immediateFn((function(){var n,r=1===e._state?t.onFulfilled:t.onRejected;if(null===r)(1===e._state?i:a)(t.promise,e._value);else{try{n=r(e._value)}catch(n){return void a(t.promise,n)}i(t.promise,n)}})))}function i(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 r)return e._state=3,e._value=t,void u(e);if("function"==typeof n)return void s((o=n,i=t,function(){o.apply(i,arguments)}),e)}e._state=1,e._value=t,u(e)}catch(t){a(e,t)}var o,i}function a(e,t){e._state=2,e._value=t,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&r._immediateFn((function(){e._handled||r._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 s(e,t){var n=!1;try{e((function(e){n||(n=!0,i(t,e))}),(function(e){n||(n=!0,a(t,e))}))}catch(e){if(n)return;n=!0,a(t,e)}}var l,f;l=this,f=setTimeout,r.prototype.catch=function(e){return this.then(null,e)},r.prototype.then=function(e,t){var r=new this.constructor(n);return o(this,new c(e,t,r)),r},r.all=function(e){var t=Array.prototype.slice.call(e);return new r((function(e,n){if(0===t.length)return e([]);for(var r=t.length,o=0;o<t.length;o++)!function o(i,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var u=a.then;if("function"==typeof u)return void u.call(a,(function(e){o(i,e)}),n)}t[i]=a,0==--r&&e(t)}catch(a){n(a)}}(o,t[o])}))},r.resolve=function(e){return e&&"object"==typeof e&&e.constructor===r?e:new r((function(t){t(e)}))},r.reject=function(e){return new r((function(t,n){n(e)}))},r.race=function(e){return new r((function(t,n){for(var r=0,o=e.length;r<o;r++)e[r].then(t,n)}))},r._immediateFn="function"==typeof e?function(t){e(t)}:function(e){f(e,0)},r._unhandledRejectionFn=function(e){},r._setImmediateFn=function(e){r._immediateFn=e},r._setUnhandledRejectionFn=function(e){r._unhandledRejectionFn=e},void 0!==t&&t.exports?t.exports=r:l.Promise||(l.Promise=r)}).call(this,e("timers").setImmediate)},{timers:3}],3:[function(e,t,n){(function(t,r){var o=e("process/browser.js").nextTick,i=Function.prototype.apply,a=Array.prototype.slice,u={},c=0;function s(e,t){this._id=e,this._clearFn=t}n.setTimeout=function(){return new s(i.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new s(i.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},s.prototype.unref=s.prototype.ref=function(){},s.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n.setImmediate="function"==typeof t?t:function(e){var t=c++,r=!(arguments.length<2)&&a.call(arguments,1);return u[t]=!0,o((function(){u[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))})),t},n.clearImmediate="function"==typeof r?r:function(e){delete u[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(e,t,n){e=e("promise-polyfill");var r="undefined"!=typeof window?window:Function("return this;")();t.exports={boltExport:r.Promise||e}},{"promise-polyfill":2}]},{},[4])(4)})),oe.exports.boltExport),ae={nu:N,pure:function(e){return N((function(t){t(e)}))}},ue=function(e){t.setTimeout((function(){throw e}),0)},ce=function(e){function t(t){e().then(t,ue)}return{map:function(t){return ce((function(){return e().then(t)}))},bind:function(t){return ce((function(){return e().then((function(e){return t(e).toPromise()}))}))},anonBind:function(t){return ce((function(){return e().then((function(){return t.toPromise()}))}))},toLazy:function(){return ae.nu(t)},toCached:function(){var t=null;return ce((function(){return t=null===t?e():t}))},toPromise:e,get:t}},se=function(e){return ce((function(){return new ie(e)}))},le=function(e){return ce((function(){return ie.resolve(e)}))},fe=tinymce.util.Tools.resolve("tinymce.util.Delay"),de={preprocess:function(e,t,n){return T([A,(r=t,function(e){var t=e.href;return 1===r&&!X.hasProtocol(t)||0===r&&/^\s*www[\.|\d\.]/i.test(t)?I.some({message:"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",preprocess:function(e){return ne(ne({},e),{href:"http://"+t})}}):I.none()})],(function(e){return e(n)})).fold((function(){return le(n)}),(function(t){return se((function(r){var o,i,a,u;o=e,i=t.message,a=function(e){r(e?t.preprocess(n):n)},u=o.selection.getRng(),fe.setEditorTimeout(o,(function(){o.windowManager.confirm(i,(function(e){o.selection.setRng(u),a(e)}))}))}))}));var r}},me=function(e){return e=function(e,t){return e=V(e,t),j(e)}(e.dom.select("a:not([href])"),(function(e){return e=e.name||e.id,e?[{text:e,value:"#"+e}]:[]})),0<e.length?I.some([{text:"None",value:""}].concat(e)):I.none()},ge=function(e){return e=f.getLinkClassList(e),0<e.length?Z.sanitize(e):I.none()},he=tinymce.util.Tools.resolve("tinymce.util.XHR"),pe=function(e){function t(t){return e.convertURL(t.value||t.url,"href")}var n=f.getLinkList(e);return se((function(e){u(n)?he.send({url:n,success:function(t){return e(function(e){try{return I.some(JSON.parse(e))}catch(e){return I.none()}}(t))},error:function(t){return e(I.none())}}):l(n)?n((function(t){return e(I.some(t))})):e(I.from(n))})).map((function(e){return e.bind(Z.sanitizeWith(t)).map((function(e){return 0<e.length?[{text:"None",value:""}].concat(e):e}))}))},ve=function(e,t){var n,r=f.getRelList(e);return 0<r.length?(n=t.is("_blank"),(!1===f.allowUnsafeLinkTarget(e)?Z.sanitizeWith((function(e){return X.applyRelTargetRules(Z.getValue(e),n)})):Z.sanitize)(r)):I.none()},be=[{text:"Current window",value:""},{text:"New window",value:"_blank"}],ye=function(e){return e=f.getTargetList(e),c(e)?Z.sanitize(e).orThunk((function(){return I.some(be)})):!1===e?I.none():I.some(be)},we=function(e,t,n){return e=e.getAttrib(t,n),null!==e&&0<e.length?I.some(e):I.none()},xe={collect:function(e,t){return pe(e).map((function(n){o=t,i=(r=e).dom,r=X.isOnlyTextSelected(r.selection.getContent())?I.some(X.getAnchorText(r.selection,o)):I.none(),s=o?I.some(i.getAttrib(o,"href")):I.none(),a=o?I.from(i.getAttrib(o,"target")):I.none(),u=we(i,o,"rel"),c=we(i,o,"class");var r,o,i,a,u,c,s={url:s,text:r,title:we(i,o,"title"),target:a,rel:u,linkClass:c};return{anchor:s,catalogs:{targets:ye(e),rels:ve(e,s.target),classes:ge(e),anchor:me(e),link:n},optNode:I.from(t),flags:{titleEnabled:f.shouldShowLinkTitle(e)}}}))}},Ce=function(e,t){return{url:{value:e.anchor.url.getOr(""),meta:{attach:function(){},text:e.anchor.url.fold((function(){return""}),(function(){return e.anchor.text.getOr("")})),original:{value:e.anchor.url.getOr("")}}},text:e.anchor.text.getOr(""),title:e.anchor.title.getOr(""),anchor:e.anchor.url.getOr(""),link:e.anchor.url.getOr(""),rel:e.anchor.rel.getOr(""),target:e.anchor.target.or(t).getOr(""),linkClass:e.anchor.linkClass.getOr("")}},Se=function(e){var t,n;t=e,n=X.getAnchorElement(t),xe.collect(t,n).map((function(t){var n,r,o,i,a=D(e,t,f.assumeExternalTargets(e));return a=a,n=e,r=(t=t).anchor.text.map((function(){return{name:"text",type:"input",label:"Text to display"}})).toArray(),o=t.flags.titleEnabled?[{name:"title",type:"input",label:"Title"}]:[],n=I.from(f.getDefaultLinkTarget(n)),n=Ce(t,n),i=te.init(n,t),t=t.catalogs,{title:"Insert/Edit Link",size:"normal",body:{type:"panel",items:j([[{name:"url",type:"urlinput",filetype:"file",label:"URL"}],r,o,Y([t.anchor.map(Z.createUi("anchor","Anchors")),t.rels.map(Z.createUi("rel","Rel")),t.targets.map(Z.createUi("target","Open link in...")),t.link.map(Z.createUi("link","Link list")),t.classes.map(Z.createUi("linkClass","Class"))])])},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:n,onChange:function(e,t){t=t.name,i.onChange(e.getData,{name:t}).each((function(t){e.setData(t)}))},onSubmit:a}})).get((function(t){e.windowManager.open(t)}))},ke=function(e,t){return e.dom.getParent(t,"a[href]")},Te=function(e){return function(){Se(e)}},Ee=function(e){return function(){R(e,_(e))}},Oe=function(e){e.on("click",(function(t){var n=ke(e,t.target);n&&a.metaKeyPressed(t)&&(t.preventDefault(),R(e,n))})),e.on("keydown",(function(t){var n,r=_(e);r&&13===t.keyCode&&!0===(n=t).altKey&&!1===n.shiftKey&&!1===n.ctrlKey&&!1===n.metaKey&&(t.preventDefault(),R(e,r))}))},Ne=function(e){return function(t){function n(n){return t.setActive(!e.readonly&&!!X.getAnchorElement(e,n.element))}return e.on("NodeChange",n),function(){return e.off("NodeChange",n)}}},Ae=function(e){return function(t){function n(e){return t.setDisabled(!X.hasLinks(e.parents))}return t.setDisabled(!X.hasLinks(e.dom.getParents(e.selection.getStart()))),e.on("NodeChange",n),function(){return e.off("NodeChange",n)}}},De=function(e){e.addCommand("mceLink",(function(){f.useQuickLink(e)?e.fire("contexttoolbar-show",{toolbarKey:"quicklink"}):Te(e)()}))},_e=function(e){e.addShortcut("Meta+K","",(function(){e.execCommand("mceLink")}))},Re=function(e){e.ui.registry.addToggleButton("link",{icon:"link",tooltip:"Insert/edit link",onAction:Te(e),onSetup:Ne(e)}),e.ui.registry.addButton("openlink",{icon:"new-tab",tooltip:"Open link",onAction:Ee(e),onSetup:Ae(e)}),e.ui.registry.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onAction:function(){return X.unlink(e)},onSetup:Ae(e)})},Be=function(e){e.ui.registry.addMenuItem("openlink",{text:"Open link",icon:"new-tab",onAction:Ee(e),onSetup:Ae(e)}),e.ui.registry.addMenuItem("link",{icon:"link",text:"Link...",shortcut:"Meta+K",onAction:Te(e)}),e.ui.registry.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onAction:function(){return X.unlink(e)},onSetup:Ae(e)})},Me=function(e){e.ui.registry.addContextMenu("link",{update:function(t){return X.hasLinks(e.dom.getParents(t,"a"))?"link unlink openlink":"link"}})},Pe=function(e){function t(t){var n=e.selection.getNode();return t.setDisabled(!X.getAnchorElement(e,n)),function(){}}e.ui.registry.addContextForm("quicklink",{launch:{type:"contextformtogglebutton",icon:"link",tooltip:"Link",onSetup:Ne(e)},label:"Link",predicate:function(t){return!!X.getAnchorElement(e,t)&&f.hasContextToolbar(e)},initValue:function(){var t=X.getAnchorElement(e);return t?X.getHref(t):""},commands:[{type:"contextformtogglebutton",icon:"link",tooltip:"Link",primary:!0,onSetup:function(t){var n=e.selection.getNode();return t.setActive(!!X.getAnchorElement(e,n)),Ne(e)(t)},onAction:function(t){var n,r=X.getAnchorElement(e),o=t.getValue();r?(e.dom.setAttrib(r,"href",o),e.selection.collapse(!1)):(n={href:o,attach:function(){}},r=X.isOnlyTextSelected(e.selection.getContent())?I.some(X.getAnchorText(e.selection,r)).filter((function(e){return 0<e.length})).or(I.from(o)):I.none(),X.link(e,n,{href:o,text:r,title:I.none(),rel:I.none(),target:I.none(),class:I.none()})),t.hide()}},{type:"contextformbutton",icon:"unlink",tooltip:"Remove link",onSetup:t,onAction:function(t){X.unlink(e),t.hide()}},{type:"contextformbutton",icon:"new-tab",tooltip:"Open link",onSetup:t,onAction:function(t){Ee(e)(),t.hide()}}]})};i.add("link",(function(e){Re(e),Be(e),Me(e),Pe(e),Oe(e),De(e),_e(e)}))}(window)}).call(this,n("c8ba"))},c361:function(e,t){!function(){"use strict";function e(e,t){for(var n="",r=0;r<t;r++)n+=e;return n}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return e=e.getParam("nonbreaking_force_tab",0),"boolean"==typeof e?!0===e?3:0:e},r=function(e){return e.getParam("nonbreaking_wrap",!0,"boolean")},o=function(t,n){var o,i=r(t)||t.plugins.visualchars?'<span class="'+((o=t).plugins.visualchars&&o.plugins.visualchars.isEnabled()?"mce-nbsp-wrap mce-nbsp":"mce-nbsp-wrap")+'" contenteditable="false">'+e(" ",n)+"</span>":e(" ",n);t.undoManager.transact((function(){return t.insertContent(i)}))},i=function(e){e.addCommand("mceNonBreaking",(function(){o(e,1)}))},a=tinymce.util.Tools.resolve("tinymce.util.VK"),u=function(e){var t=n(e);0<t&&e.on("keydown",(function(n){n.keyCode!==a.TAB||n.isDefaultPrevented()||n.shiftKey||(n.preventDefault(),n.stopImmediatePropagation(),o(e,t))}))},c=function(e){e.ui.registry.addButton("nonbreaking",{icon:"non-breaking",tooltip:"Nonbreaking space",onAction:function(){return e.execCommand("mceNonBreaking")}}),e.ui.registry.addMenuItem("nonbreaking",{icon:"non-breaking",text:"Nonbreaking space",onAction:function(){return e.execCommand("mceNonBreaking")}})};t.add("nonbreaking",(function(e){i(e),c(e),u(e)}))}()},c4a9:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return r}));var r=function(){var t="undefined"!=typeof window?window:e;return t&&t.tinymce?t.tinymce:null}}).call(this,n("c8ba"))},ca72:function(e,t,n){"use strict";function r(e){return-1!==a.indexOf(e)}function o(e){var t=Date.now();return e+"_"+Math.floor(1e9*Math.random())+ ++s+String(t)}function i(e){return function(){var t,n=d({},e.$props.init,{readonly:e.$props.disabled,selector:"#"+e.elementId,plugins:(n=e.$props.init&&e.$props.init.plugins,t=e.$props.plugins,l(n).concat(l(t))),toolbar:e.$props.toolbar||e.$props.init&&e.$props.init.toolbar,inline:e.inlineEditor,setup:function(t){(e.editor=t).on("init",(function(n){return n=n,o=t,i=(r=e).$props.value||"",a=r.$props.initialValue||"",o.setContent(i||a),r.$listeners.input&&c(r,o),void u(n,r.$listeners,o);var r,o,i,a})),e.$props.init&&"function"==typeof e.$props.init.setup&&e.$props.init.setup(t)}});null!==(t=e.element)&&"textarea"===t.tagName.toLowerCase()&&(e.element.style.visibility=""),Object(f.a)().init(n)}}var a=["onActivate","onAddUndo","onBeforeAddUndo","onBeforeExecCommand","onBeforeGetContent","onBeforeRenderUI","onBeforeSetContent","onBeforePaste","onBlur","onChange","onClearUndos","onClick","onContextMenu","onCopy","onCut","onDblclick","onDeactivate","onDirty","onDrag","onDragDrop","onDragEnd","onDragGesture","onDragOver","onDrop","onExecCommand","onFocus","onFocusIn","onFocusOut","onGetContent","onHide","onInit","onKeyDown","onKeyPress","onKeyUp","onLoadContent","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onNodeChange","onObjectResizeStart","onObjectResized","onObjectSelected","onPaste","onPostProcess","onPostRender","onPreProcess","onProgressState","onRedo","onRemove","onReset","onSaveContent","onSelectionChange","onSetAttrib","onSetContent","onShow","onSubmit","onUndo","onVisualAid"],u=function(e,t,n){Object.keys(t).filter(r).forEach((function(r){var o=t[r];"function"==typeof o&&("onInit"===r?o(e,n):n.on(r.substring(2),(function(e){return o(e,n)})))}))},c=function(e,t){var n,r=e.$props.modelEvents||null;r=Array.isArray(r)?r.join(" "):r;e.$watch("value",(function(e,r){t&&"string"==typeof e&&e!==n&&e!==r&&(t.setContent(e),n=e)})),t.on(r||"change keyup undo redo",(function(){n=t.getContent(),e.$emit("input",n)}))},s=0,l=function(e){return void 0===e||""===e?[]:Array.isArray(e)?e:e.split(" ")},f=n("c4a9"),d=(n={apiKey:String,cloudChannel:String,id:String,init:Object,initialValue:String,inline:Boolean,modelEvents:[String,Array],plugins:[String,Array],tagName:String,toolbar:[String,Array],value:String,disabled:Boolean},function(){return(d=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)}),m={listeners:[],scriptId:o("tiny-script"),scriptLoaded:!1};t.a={props:n,created:function(){this.elementId=this.$props.id||o("tiny-vue"),this.inlineEditor=this.$props.init&&this.$props.init.inline||this.$props.inline},watch:{disabled:function(){this.editor.setMode(this.disabled?"readonly":"design")}},mounted:function(){var e,t,n,r,o,a;this.element=this.$el,null!==Object(f.a)()?i(this)():this.element&&this.element.ownerDocument&&(t=this.element.ownerDocument,r=this.$props.cloudChannel||"5",n=this.$props.apiKey||"no-api-key",t=t,n="https://cdn.tiny.cloud/1/"+n+"/tinymce/"+r+"/tinymce.min.js",r=i(this),(e=m).scriptLoaded?r():(e.listeners.push(r),t.getElementById(e.scriptId)||(r=e.scriptId,n=n,o=function(){e.listeners.forEach((function(e){return e()})),e.scriptLoaded=!0},(a=(t=t).createElement("script")).referrerPolicy="origin",a.type="application/javascript",a.id=r,a.addEventListener("load",o),a.src=n,t.head&&t.head.appendChild(a))))},beforeDestroy:function(){null!==Object(f.a)()&&Object(f.a)().remove(this.editor)},render:function(e){return this.inlineEditor?(t=this.elementId,n=this.$props.tagName,e(n||"div",{attrs:{id:t}})):e("textarea",{attrs:{id:this.elementId},style:{visibility:"hidden"}});var t,n}}},cdd9:function(e,t,n){(function(e){!function(t){"use strict";function n(){}function r(e){return function(){return e}}function o(e){return e}function i(){return s}var a=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=r(!1),c=r(!0),s=(J={fold:function(e,t){return e()},is:u,isSome:u,isNone:c,getOr:d,getOrThunk:f,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:r(null),getOrUndefined:r(void 0),or:d,orThunk:f,map:i,each:n,bind:i,exists:u,forall:c,filter:i,equals:l,equals_:l,toArray:function(){return[]},toString:r("none()")},Object.freeze&&Object.freeze(J),J);function l(e){return e.isNone()}function f(e){return e()}function d(e){return e}function m(e){function t(){return i}function n(t){return t(e)}var o=r(e),i={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:c,isNone:u,getOr:o,getOrThunk:o,getOrDie:o,getOrNull:o,getOrUndefined:o,or:t,orThunk:t,map:function(t){return m(t(e))},each:function(t){t(e)},bind:n,exists:n,forall:n,filter:function(t){return t(e)?i:s},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(u,(function(t){return n(e,t)}))}};return i}function g(e){return function(t){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}(t)===e}}function h(e){function n(e){r()?a(e):i.push(e)}function r(){return o.isSome()}var o=$.none(),i=[],a=function(e){o.each((function(n){t.setTimeout((function(){e(n)}),0)}))};return e((function(e){o=$.some(e);for(var t=i,n=a,r=0,u=t.length;r<u;r++)n(t[r],r);i=[]})),{get:n,map:function(e){return h((function(t){n((function(n){t(e(n))}))}))},isReady:r}}function p(e){return{is:function(t){return e===t},isValue:c,isError:u,getOr:r(e),getOrThunk:r(e),getOrDie:r(e),or:function(t){return p(e)},orThunk:function(t){return p(e)},fold:function(t,n){return n(e)},map:function(t){return p(t(e))},mapError:function(t){return p(e)},each:function(t){t(e)},bind:function(t){return t(e)},exists:function(t){return t(e)},forall:function(t){return t(e)},toOption:function(){return $.some(e)}}}function v(e){return{is:u,isValue:u,isError:c,getOr:o,getOrThunk:function(e){return e()},getOrDie:function(){throw t=String(e),new Error(t);var t},or:function(e){return e},orThunk:function(e){return e()},fold:function(t,n){return t(e)},map:function(t){return v(e)},mapError:function(t){return v(t(e))},each:n,bind:function(t){return v(e)},exists:u,forall:c,toOption:$.none}}function b(e){return ce(ae.nu(e))}function y(e){return function(){for(var t=new Array(arguments.length),n=0;n<t.length;n++)t[n]=arguments[n];if(0===t.length)throw new Error("Can't merge zero objects");for(var r={},o=0;o<t.length;o++){var i,a=t[o];for(i in a)le.call(a,i)&&(r[i]=e(r[i],a[i]))}return r}}function w(e){var t=e.imageList.map((function(e){return{name:"images",type:"selectbox",label:"Image list",items:e}})),n=e.classList.map((function(e){return{name:"classes",type:"selectbox",label:"Class",items:e}}));return Q([[{name:"src",type:"urlinput",filetype:"image",label:"Source"}],t.toArray(),e.hasDescription?[{name:"alt",type:"input",label:"Image description"}]:[],e.hasImageTitle?[{name:"title",type:"input",label:"Image title"}]:[],e.hasDimensions?[{name:"dimensions",type:"sizeinput"}]:[],[{type:"grid",columns:2,items:Q([n.toArray(),e.hasImageCaption?[{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[]])}]])}function x(e){return e.getParam("images_upload_url","","string")}function C(e){return e.getParam("images_upload_handler",void 0,"function")}function S(e,t){return Math.max(parseInt(e,10),parseInt(t,10))}function k(e){return e.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight?Be(e.style.marginLeft):""}function T(e){return e.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom?Be(e.style.marginTop):""}function E(e){return e.style.borderWidth?Be(e.style.borderWidth):""}function O(e,t){return e.hasAttribute(t)?e.getAttribute(t):""}function N(e,t){return e.style[t]||""}function A(e){return null!==e.parentNode&&"FIGURE"===e.parentNode.nodeName}function D(e,t){var n=e.getAttribute("style");0<(t=t(null!==n?n:"")).length?(e.setAttribute("style",t),e.setAttribute("data-mce-style",t)):e.removeAttribute("style")}function _(e,t){return e.style[t]?Be(e.style[t]):O(e,t)}function R(e){return"FIGURE"===e.nodeName}function B(e,n){var r=t.document.createElement("img");return Ve(r,"style",n.style),!k(r)&&""===n.hspace||We(r,n.hspace),!T(r)&&""===n.vspace||qe(r,n.vspace),!E(r)&&""===n.border||$e(r,n.border),!N(r,"borderStyle")&&""===n.borderStyle||Ge(r,n.borderStyle),e(r.getAttribute("style"))}function M(e,t,n){var r=Xe(e,n);Ye(n,r,t,"caption",(function(e,t,n){return Ue(e)})),Ye(n,r,t,"src",Ve),Ye(n,r,t,"alt",Ve),Ye(n,r,t,"title",Ve),Ye(n,r,t,"width",je("width",e)),Ye(n,r,t,"height",je("height",e)),Ye(n,r,t,"class",Ve),Ye(n,r,t,"style",Ke((function(e,t){return Ve(e,"style",t)}),e)),Ye(n,r,t,"hspace",Ke(We,e)),Ye(n,r,t,"vspace",Ke(qe,e)),Ye(n,r,t,"border",Ke($e,e)),Ye(n,r,t,"borderStyle",Ke(Ge,e))}function P(e,t){return t=e.dom.styles.parse(t),t=Pe(t),t=e.dom.styles.parse(e.dom.styles.serialize(t)),e.dom.styles.serialize(t)}function z(e){var t=e.selection.getNode(),n=e.dom.getParent(t,"figure.image");return n?e.dom.select("img",n)[0]:t&&("IMG"!==t.nodeName||Fe(t))?null:t}function I(e,t){var n=e.dom,r=n.getParent(t.parentNode,(function(t){return e.schema.getTextBlockElements()[t.nodeName]}),e.getBody());return r?n.split(r,t):t}function L(e,n){o=function(t){return P(e,t)},n=n,r=t.document.createElement("img"),M(o,de(n,{caption:!1}),r),Ve(r,"alt",n.alt);n=n.caption?((o=He.create("figure",{class:"image"})).appendChild(r),o.appendChild(He.create("figcaption",{contentEditable:"true"},"Caption")),o.contentEditable="false",o):r;var r,o=(e.dom.setAttrib(n,"data-mce-id","__mcenew"),e.focus(),e.selection.setContent(n.outerHTML),e.dom.select('*[data-mce-id="__mcenew"]')[0]);e.dom.setAttrib(o,"data-mce-id",null),R(o)?(r=I(e,o),e.selection.select(r)):e.selection.select(o)}function F(e,t){var n,r,o,i,a=z(e);a?t.src?(r=t,i=z(n=e),M((function(e){return P(n,e)}),r,i),n.dom.setAttrib(i,"src",i.getAttribute("src")),R(i.parentNode)?(o=i.parentNode,I(n,o),n.selection.select(i.parentNode)):(n.selection.select(i),Ie(n,r,i))):(o=e,(r=a)&&(r=o.dom.is(r.parentNode,"figure.image")?r.parentNode:r,o.dom.remove(r),o.focus(),o.nodeChanged(),o.dom.isEmpty(o.getBody())&&(o.setContent(""),o.selection.setCursorLocation()))):t.src&&L(e,t)}function H(e){return G(e.value)?e.value:""}function V(e){return void 0===e&&(e=H),function(t){return t?$.from(t).map((function(t){return Qe(t,e)})):$.none()}}var U,j,W,q,$={some:m,none:i,from:function(e){return null==e?s:m(e)}},G=g("string"),X=g("object"),Y=g("array"),K=g("boolean"),J=g("function"),Z=(Array.prototype.slice,Array.prototype.push),Q=function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!Y(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);Z.apply(t,e[n])}return t},ee=(J(Array.from)&&Array.from,function(){return(ee=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)}),te=(J={},{exports:J}),ne=(j=J,W=te,q=U=void 0,function(t){"object"==typeof j&&void 0!==W?W.exports=t():"function"==typeof U&&U.amd?U([],t):("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:this).EphoxContactWrapper=t()}((function(){return function e(t,n,r){function o(a,u){if(!n[a]){if(!t[a]){var c="function"==typeof q&&q;if(!u&&c)return c(a,!0);if(i)return i(a,!0);throw(u=new Error("Cannot find module '"+a+"'")).code="MODULE_NOT_FOUND",u}c=n[a]={exports:{}},t[a][0].call(c.exports,(function(e){return o(t[a][1][e]||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof q&&q,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){var r,o;t=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(e){o=a}function u(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return(r=setTimeout)(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}var c,s=[],l=!1,f=-1;function d(){l&&c&&(l=!1,c.length?s=c.concat(s):f=-1,s.length&&m())}function m(){if(!l){for(var e=u(d),t=(l=!0,s.length);t;){for(c=s,s=[];++f<t;)c&&c[f].run();f=-1,t=s.length}c=null,l=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===a||!o)&&clearTimeout)return(o=clearTimeout)(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function h(){}t.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];s.push(new g(e,t)),1!==s.length||l||u(m)},g.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={},t.on=h,t.addListener=h,t.once=h,t.off=h,t.removeListener=h,t.removeAllListeners=h,t.emit=h,t.prependListener=h,t.prependOnceListener=h,t.listeners=function(e){return[]},t.binding=function(e){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(e){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},{}],2:[function(e,t,n){(function(e){function n(){}function r(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=void 0,this._deferreds=[],s(e,this)}function o(e,t){for(;3===e._state;)e=e._value;0===e._state?e._deferreds.push(t):(e._handled=!0,r._immediateFn((function(){var n,r=1===e._state?t.onFulfilled:t.onRejected;if(null===r)(1===e._state?i:a)(t.promise,e._value);else{try{n=r(e._value)}catch(n){return void a(t.promise,n)}i(t.promise,n)}})))}function i(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 r)return e._state=3,e._value=t,void u(e);if("function"==typeof n)return void s((o=n,i=t,function(){o.apply(i,arguments)}),e)}e._state=1,e._value=t,u(e)}catch(t){a(e,t)}var o,i}function a(e,t){e._state=2,e._value=t,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&r._immediateFn((function(){e._handled||r._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 s(e,t){var n=!1;try{e((function(e){n||(n=!0,i(t,e))}),(function(e){n||(n=!0,a(t,e))}))}catch(e){if(n)return;n=!0,a(t,e)}}var l,f;l=this,f=setTimeout,r.prototype.catch=function(e){return this.then(null,e)},r.prototype.then=function(e,t){var r=new this.constructor(n);return o(this,new c(e,t,r)),r},r.all=function(e){var t=Array.prototype.slice.call(e);return new r((function(e,n){if(0===t.length)return e([]);for(var r=t.length,o=0;o<t.length;o++)!function o(i,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var u=a.then;if("function"==typeof u)return void u.call(a,(function(e){o(i,e)}),n)}t[i]=a,0==--r&&e(t)}catch(a){n(a)}}(o,t[o])}))},r.resolve=function(e){return e&&"object"==typeof e&&e.constructor===r?e:new r((function(t){t(e)}))},r.reject=function(e){return new r((function(t,n){n(e)}))},r.race=function(e){return new r((function(t,n){for(var r=0,o=e.length;r<o;r++)e[r].then(t,n)}))},r._immediateFn="function"==typeof e?function(t){e(t)}:function(e){f(e,0)},r._unhandledRejectionFn=function(e){},r._setImmediateFn=function(e){r._immediateFn=e},r._setUnhandledRejectionFn=function(e){r._unhandledRejectionFn=e},void 0!==t&&t.exports?t.exports=r:l.Promise||(l.Promise=r)}).call(this,e("timers").setImmediate)},{timers:3}],3:[function(e,t,n){(function(t,r){var o=e("process/browser.js").nextTick,i=Function.prototype.apply,a=Array.prototype.slice,u={},c=0;function s(e,t){this._id=e,this._clearFn=t}n.setTimeout=function(){return new s(i.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new s(i.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},s.prototype.unref=s.prototype.ref=function(){},s.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n.setImmediate="function"==typeof t?t:function(e){var t=c++,r=!(arguments.length<2)&&a.call(arguments,1);return u[t]=!0,o((function(){u[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))})),t},n.clearImmediate="function"==typeof r?r:function(e){delete u[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(e,t,n){e=e("promise-polyfill");var r="undefined"!=typeof window?window:Function("return this;")();t.exports={boltExport:r.Promise||e}},{"promise-polyfill":2}]},{},[4])(4)})),te.exports.boltExport),re={nu:h,pure:function(e){return h((function(t){t(e)}))}},oe=function(e){t.setTimeout((function(){throw e}),0)},ie=function(e){function t(t){e().then(t,oe)}return{map:function(t){return ie((function(){return e().then(t)}))},bind:function(t){return ie((function(){return e().then((function(e){return t(e).toPromise()}))}))},anonBind:function(t){return ie((function(){return e().then((function(){return t.toPromise()}))}))},toLazy:function(){return re.nu(t)},toCached:function(){var t=null;return ie((function(){return t=null===t?e():t}))},toPromise:e,get:t}},ae={nu:function(e){return ie((function(){return new ne(e)}))},pure:function(e){return ie((function(){return ne.resolve(e)}))}},ue={value:p,error:v,fromOption:function(e,t){return e.fold((function(){return v(t)}),p)}},ce=function(e){return ee(ee({},e),{toCached:function(){return ce(e.toCached())},bindFuture:function(t){return ce(e.bind((function(e){return e.fold((function(e){return ae.pure(ue.error(e))}),(function(e){return t(e)}))})))},bindResult:function(t){return ce(e.map((function(e){return e.bind(t)})))},mapResult:function(t){return ce(e.map((function(e){return e.map(t)})))},mapError:function(t){return ce(e.map((function(e){return e.mapError(t)})))},foldResult:function(t,n){return e.map((function(e){return e.fold(t,n)}))},withTimeout:function(n,r){return ce(ae.nu((function(o){var i=!1,a=t.setTimeout((function(){i=!0,o(ue.error(r()))}),n);e.get((function(e){i||(t.clearTimeout(a),o(e))}))})))}})},se=b,le=Object.prototype.hasOwnProperty,fe=y((function(e,t){return X(e)&&X(t)?fe(e,t):t})),de=y((function(e,t){return t})),me=function(e){return{title:"General",name:"general",items:w(e)}},ge=w,he=(J=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),tinymce.util.Tools.resolve("tinymce.util.Promise")),pe=tinymce.util.Tools.resolve("tinymce.util.XHR"),ve=function(e){return e.getParam("image_dimensions",!0,"boolean")},be=function(e){return e.getParam("image_uploadtab",!0,"boolean")},ye=function(e){return e.getParam("image_advtab",!1,"boolean")},we=function(e){return e.getParam("image_prepend_url","","string")},xe=function(e){return e.getParam("image_class_list")},Ce=function(e){return e.getParam("image_description",!0,"boolean")},Se=function(e){return e.getParam("image_title",!1,"boolean")},ke=function(e){return e.getParam("image_caption",!1,"boolean")},Te=function(e){return e.getParam("image_list",!1)},Ee=function(e){return!!x(e)},Oe=function(e){return!!C(e)},Ne=x,Ae=C,De=function(e){return e.getParam("images_upload_base_path",void 0,"string")},_e=function(e){return e.getParam("images_upload_credentials",!1,"boolean")},Re=function(e,n){function r(e){o.parentNode&&o.parentNode.removeChild(o),n(e)}var o=t.document.createElement("img"),i=(o.onload=function(){var e=S(o.width,o.clientWidth),t=S(o.height,o.clientHeight);r(ue.value({width:e,height:t}))},o.onerror=function(){r(ue.error("Failed to get image dimensions for: "+e))},o.style);i.visibility="hidden",i.position="fixed",i.bottom=i.left="0px",i.width=i.height="auto",t.document.body.appendChild(o),o.src=e},Be=function(e){return e&&e.replace(/px$/,"")},Me=function(e){return 0<e.length&&/^[0-9]+$/.test(e)&&(e+="px"),e},Pe=function(e){if(e.margin){var t=String(e.margin).split(" ");switch(t.length){case 1:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[0],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[0];break;case 2:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[1];break;case 3:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[1];break;case 4:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[3]}delete e.margin}return e},ze=function(e,t){e=Te(e),"string"==typeof e?pe.send({url:e,success:function(e){t(JSON.parse(e))}}):"function"==typeof e?e(t):t(e)},Ie=function(e,t,n){function r(){n.onload=n.onerror=null,e.selection&&(e.selection.select(n),e.nodeChanged())}n.onload=function(){t.width||t.height||!ve(e)||e.dom.setAttribs(n,{width:String(n.clientWidth),height:String(n.clientHeight)}),r()},n.onerror=r},Le=function(e){return new he((function(n,r){var o=new t.FileReader;o.onload=function(){n(o.result)},o.onerror=function(){r(o.error.message)},o.readAsDataURL(e)}))},Fe=function(e){return"IMG"===e.nodeName&&(e.hasAttribute("data-mce-object")||e.hasAttribute("data-mce-placeholder"))},He=J.DOM,Ve=function(e,t,n){e.setAttribute(t,n)},Ue=function(e){var t;A(e)?(t=e.parentNode,He.insertAfter(e,t),He.remove(t)):(t=e,e=He.create("figure",{class:"image"}),He.insertAfter(e,t),e.appendChild(t),e.appendChild(He.create("figcaption",{contentEditable:"true"},"Caption")),e.contentEditable="false")},je=function(e,t){return function(e,n,r){e.style[n]?(e.style[n]=Me(r),D(e,t)):Ve(e,n,r)}},We=function(e,t){t=Me(t),e.style.marginLeft=t,e.style.marginRight=t},qe=function(e,t){t=Me(t),e.style.marginTop=t,e.style.marginBottom=t},$e=function(e,t){t=Me(t),e.style.borderWidth=t},Ge=function(e,t){e.style.borderStyle=t},Xe=function(e,t){return{src:O(t,"src"),alt:O(t,"alt"),title:O(t,"title"),width:_(t,"width"),height:_(t,"height"),class:O(t,"class"),style:e(O(t,"style")),caption:A(t),hspace:k(t),vspace:T(t),border:E(t),borderStyle:N(t,"borderStyle")}},Ye=function(e,t,n,r,o){n[r]!==t[r]&&o(e,r,n[r])},Ke=function(e,t){return function(n,r,o){e(n,o),D(n,t)}},Je=function(e,t){for(var n=0;n<e.length;n++){var r=t(e[n],n);if(r.isSome())return r}return $.none()},Ze=tinymce.util.Tools.resolve("tinymce.util.Tools"),Qe=function(e,t){var n=[];return Ze.each(e,(function(e){var r,o=G(e.text)?e.text:G(e.title)?e.title:"";void 0!==e.menu?(r=Qe(e.menu,t),n.push({text:o,items:r})):(r=t(e),n.push({text:o,value:r}))})),n},et=function(e){return Object.prototype.hasOwnProperty.call(e,"items")},tt=function(e,t){return Je(e,(function(e){return et(e)?tt(e.items,t):e.value===t?$.some(e):$.none()}))},nt=V,rt=function(e){return V(H)(e)},ot=function(e,t){return e.bind((function(e){return tt(e,t)}))};function it(e){var r=function(n,r,o,i){var a,u=new t.XMLHttpRequest;u.open("POST",e.url),u.withCredentials=e.credentials,u.upload.onprogress=function(e){i(e.loaded/e.total*100)},u.onerror=function(){o("Image upload failed due to a XHR Transport error. Code: "+u.status)},u.onload=function(){var t,n;u.status<200||300<=u.status?o("HTTP Error: "+u.status):(n=JSON.parse(u.responseText))&&"string"==typeof n.location?r((t=e.basePath,n=n.location,t?t.replace(/\/$/,"")+"/"+n.replace(/^\//,""):n)):o("Invalid JSON: "+u.responseText)},(a=new t.FormData).append("file",n.blob(),n.filename()),u.send(a)};return e=Ze.extend({credentials:!1,handler:r},e),{upload:function(t){return e.url||e.handler!==r?(o=t,i=e.handler,new he((function(e,t){try{i(o,e,t,n)}catch(e){t(e.message)}}))):he.reject("Upload url missing from the settings.");var o,i}}}function at(e){return{src:{value:e.src,meta:{}},images:e.src,alt:e.alt,title:e.title,dimensions:{width:e.width,height:e.height},classes:e.class,caption:e.caption,style:e.style,vspace:e.vspace,border:e.border,hspace:e.hspace,borderstyle:e.borderStyle,fileinput:[]}}function ut(e){return{src:e.src.value,alt:e.alt,title:e.title,width:e.dimensions.width,height:e.dimensions.height,class:e.classes,style:e.style,caption:e.caption,hspace:e.hspace,vspace:e.vspace,border:e.border,borderStyle:e.borderstyle}}function ct(e,t){var n,r=t.getData();e=e,n=r.src.value,(/^(?:[a-zA-Z]+:)?\/\//.test(n)?$.none():e.prependURL.bind((function(e){return n.substring(0,e.length)!==e?$.some(e+n):$.none()}))).each((function(e){t.setData({src:{value:e,meta:r.src.meta}})}))}function st(e,t){var n,r=t.getData(),o=r.src.meta;void 0!==o&&(r=fe({},r),n=r,o=o,(e=e).hasDescription&&G(o.alt)&&(n.alt=o.alt),e.hasImageTitle&&G(o.title)&&(n.title=o.title),e.hasDimensions&&(G(o.width)&&(n.dimensions.width=o.width),G(o.height)&&(n.dimensions.height=o.height)),G(o.class)&&ot(e.classList,o.class).each((function(e){n.classes=e.value})),e.hasImageCaption&&K(o.caption)&&(n.caption=o.caption),e.hasAdvTab&&(G(o.vspace)&&(n.vspace=o.vspace),G(o.border)&&(n.border=o.border),G(o.hspace)&&(n.hspace=o.hspace),G(o.borderstyle)&&(n.borderstyle=o.borderstyle)),t.setData(r))}function lt(e,t,n,r){var o,i,a,u,c;ct(t,r),st(t,r),e=e,u=t,o=n,a=(i=r).getData(),c=a.src.value,(a=a.src.meta||{}).width||a.height||!u.hasDimensions||e.imageSize(c).get((function(e){e.each((function(e){o.open&&i.setData({dimensions:e})}))})),a=t,u=n,c=(e=r).getData(),a=ot(a.imageList,c.src.value),u.prevImage=a,e.setData({images:a.map((function(e){return e.value})).getOr("")})}function ft(e,t,n){var r,o=Pe(e(n.style));return(n=fe({},n)).vspace=(r=o)["margin-top"]&&r["margin-bottom"]&&r["margin-top"]===r["margin-bottom"]?Be(String(r["margin-top"])):"",n.hspace=(r=o)["margin-right"]&&r["margin-left"]&&r["margin-right"]===r["margin-left"]?Be(String(r["margin-right"])):"",n.border=(r=o)["border-width"]?Be(String(r["border-width"])):"",n.borderstyle=(r=o)["border-style"]?String(r["border-style"]):"",n.style=t(e(t(o))),n}function dt(e,n,r,o){var i=o.getData();o.block("Uploading image"),(0===(i=i.fileinput).length?$.none():$.some(i[0])).fold((function(){o.unblock()}),(function(i){function a(){o.unblock(),t.URL.revokeObjectURL(u)}var u=t.URL.createObjectURL(i),c=it({url:n.url,basePath:n.basePath,credentials:n.credentials,handler:n.handler});Le(i).then((function(t){t=e.createBlobCache(i,u,t),c.upload(t).then((function(t){o.setData({src:{value:t,meta:{}}}),o.showTab("general"),lt(e,n,r,o),a()})).catch((function(t){a(),e.alertErr(o,t)}))}))}))}function mt(e,t,n){return function(r,o){var i,a,u,c,s,l,f,d,m;"src"===o.name?lt(e,t,n,r):"images"===o.name?(c=e,s=t,l=n,d=(f=r).getData(),(m=ot(s.imageList,d.images)).each((function(e){""===d.alt||l.prevImage.map((function(e){return e.text===d.alt})).getOr(!1)?""===e.value?f.setData({src:e,alt:l.prevAlt}):f.setData({src:e,alt:e.text}):f.setData({src:e})})),l.prevImage=m,lt(c,s,l,f)):"alt"===o.name?n.prevAlt=r.getData().alt:"style"===o.name?(m=e,s=(c=r).getData(),m=ft(m.parseStyle,m.serializeStyle,s),c.setData(m)):"vspace"===o.name||"hspace"===o.name||"border"===o.name||"borderstyle"===o.name?(i=e,u=r,a=fe(at((a=t).image),u.getData()),i=B(i.normalizeCss,ut(a)),u.setData({style:i})):"fileinput"===o.name&&dt(e,t,n,r)}}function gt(e){var t={onSubmit:wt(e),imageSize:xt(e),createBlobCache:Ct(e),alertErr:St(e),normalizeCss:kt(e),parseStyle:Tt(e),serializeStyle:Et(e)};return{open:function(){return vt(e).map(yt(t)).get((function(t){e.windowManager.open(t)}))}}}function ht(e){return function(t){for(var n=t.length,r=function(t){t.attr("contenteditable",e?"true":null)};n--;){var o=t[n];Nt(o)&&(o.attr("contenteditable",e?"false":null),Ze.each(o.getAll("figcaption"),r))}}}var pt=function(e){return{title:"Advanced",name:"advanced",items:[{type:"input",label:"Style",name:"style"},{type:"grid",columns:2,items:[{type:"input",label:"Vertical space",name:"vspace",inputMode:"numeric"},{type:"input",label:"Horizontal space",name:"hspace",inputMode:"numeric"},{type:"input",label:"Border width",name:"border",inputMode:"numeric"},{type:"selectbox",name:"borderstyle",label:"Border style",items:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]}]}]}},vt=function(e){var t,n,r=nt((function(t){return e.convertURL(t.value||t.url,"src")})),o=ae.nu((function(t){ze(e,(function(e){t(r(e).map((function(e){return Q([[{text:"None",value:""}],e])})))}))})),i=rt(xe(e)),a=ye(e),u=be(e),c=Ee(e),s=Oe(e),l=(n=z(t=e))?Xe((function(e){return P(t,e)}),n):{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:""},f=Ce(e),d=Se(e),m=ve(e),g=ke(e),h=Ne(e),p=De(e),v=_e(e),b=Ae(e),y=$.some(we(e)).filter((function(e){return G(e)&&0<e.length}));return o.map((function(e){return{image:l,imageList:e,classList:i,hasAdvTab:a,hasUploadTab:u,hasUploadUrl:c,hasUploadHandler:s,hasDescription:f,hasImageTitle:d,hasDimensions:m,hasImageCaption:g,url:h,basePath:p,credentials:v,handler:b,prependURL:y}}))},bt=function(e){return{title:"Upload",name:"upload",items:[{type:"dropzone",name:"fileinput"}]}},yt=function(e){return function(t){var n,r,o={prevImage:ot((o=t).imageList,o.image.src),prevAlt:o.image.alt,open:!0};return{title:"Insert/Edit Image",size:"normal",body:(r=t).hasAdvTab||r.hasUploadUrl||r.hasUploadHandler?{type:"tabpanel",tabs:Q([[me(r)],r.hasAdvTab?[pt(r)]:[],r.hasUploadTab&&(r.hasUploadUrl||r.hasUploadHandler)?[bt(r)]:[]])}:{type:"panel",items:ge(r)},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:at(t.image),onSubmit:e.onSubmit(t),onChange:mt(e,t,o),onClose:(n=o,function(){n.open=!1})}}},wt=function(e){return function(t){return function(n){var r=fe(at(t.image),n.getData());e.undoManager.transact((function(){F(e,ut(r))})),e.editorUpload.uploadImagesAuto(),n.close()}}},xt=function(e){return function(t){return se((function(n){Re(e.documentBaseURI.toAbsolute(t),(function(e){e=e.map((function(e){return{width:String(e.width),height:String(e.height)}})),n(e)}))}))}},Ct=function(e){return function(t,n,r){return e.editorUpload.blobCache.create({blob:t,blobUri:n,name:t.name?t.name.replace(/\.[^\.]+$/,""):null,base64:r.split(",")[1]})}},St=function(e){return function(t,n){e.windowManager.alert(n,t.close)}},kt=function(e){return function(t){return P(e,t)}},Tt=function(e){return function(t){return e.dom.parseStyle(t)}},Et=function(e){return function(t,n){return e.dom.serializeStyle(t,n)}},Ot=function(e){e.addCommand("mceImage",gt(e).open)},Nt=function(e){return e=e.attr("class"),e&&/\bimage\b/.test(e)},At=function(e){e.on("PreInit",(function(){e.parser.addNodeFilter("figure",ht(!0)),e.serializer.addNodeFilter("figure",ht(!1))}))},Dt=function(e){e.ui.registry.addToggleButton("image",{icon:"image",tooltip:"Insert/edit image",onAction:gt(e).open,onSetup:function(t){return e.selection.selectorChangedWithUnbind("img:not([data-mce-object],[data-mce-placeholder]),figure.image",t.setActive).unbind}}),e.ui.registry.addMenuItem("image",{icon:"image",text:"Image...",onAction:gt(e).open}),e.ui.registry.addContextMenu("image",{update:function(e){return R(e)||"IMG"===e.nodeName&&!Fe(e)?["image"]:[]}})};a.add("image",(function(e){At(e),Dt(e),Ot(e)}))}(window)}).call(this,n("c8ba"))},cf08:function(e,t){!function(e){"use strict";function t(){}function n(){return l}var r=function(e){function t(){return n}var n=e;return{get:t,set:function(e){n=e},clone:function(){return r(n)}}},o=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(e){return{isEnabled:function(){return e.get()}}},a=function(e,t){return e.fire("VisualChars",{state:t})},u=function(e){return function(){return e}},c=u(!1),s=u(!0),l=(c={fold:function(e,t){return e()},is:c,isSome:c,isNone:s,getOr:m,getOrThunk:d,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:u(null),getOrUndefined:u(void 0),or:m,orThunk:d,map:n,each:t,bind:n,exists:c,forall:s,filter:n,equals:f,equals_:f,toArray:function(){return[]},toString:u("none()")},Object.freeze&&Object.freeze(c),c);function f(e){return e.isNone()}function d(e){return e()}function m(e){return e}function g(e){return function(t){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}(t)===e}}function h(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}function p(e){return e.dom().nodeValue}function v(t,n,r){if(t=t.dom(),!(N(r)||A(r)||D(r)))throw e.console.error("Invalid call to Attr.set. Key ",n,":: Value ",r,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(n,r+"")}function b(e,t){e.dom().removeAttribute(t)}function y(e,t){return void 0===(e=function(e,t){return e=e.dom().getAttribute(t),null===e?void 0:e}(e,t))||""===e?[]:e.split(" ")}function w(e){if(null==e)throw new Error("Node cannot be null or undefined");return{dom:u(e)}}function x(e,t){var n,r="";for(n in e)r+=n;return new RegExp("["+r+"]",t?"g":"")}function C(e){var t,n="";for(t in e)n&&(n+=","),n+="span.mce-"+e[t];return n}function S(e,t){var n=[];e=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}(e.dom().childNodes,z);return h(e,(function(e){n=(n=t(e)?n.concat([e]):n).concat(S(e,t))})),n}function k(e){return"span"===e.nodeName.toLowerCase()&&e.classList.contains("mce-nbsp-wrap")}function T(e,t){t=H(z(t),F),h(t,(function(t){var n,r=t.dom().parentNode;if(k(r))r=z(r),n=I.nbspClass,R(r)?r.dom().classList.add(n):B(r,n);else{r=U(p(t));for(var o,i=e.dom.create("div",null,r);o=i.lastChild;)e.dom.insertAfter(o,t.dom());e.dom.remove(t.dom())}}))}function E(e,t){t=e.dom.select(I.selector,t),h(t,(function(t){var n,r;k(t)?(n=z(t),r=I.nbspClass,R(n)?n.dom().classList.remove(r):M(n,r),P(n)):e.dom.remove(t,!0)}))}var O,N=g("string"),A=g("boolean"),D=(s=g("function"),g("number")),_=(c=(Array.prototype.slice,s(Array.from)&&Array.from,e.Node.ATTRIBUTE_NODE,e.Node.CDATA_SECTION_NODE,e.Node.COMMENT_NODE,e.Node.DOCUMENT_NODE,e.Node.DOCUMENT_TYPE_NODE,e.Node.DOCUMENT_FRAGMENT_NODE,e.Node.ELEMENT_NODE,e.Node.TEXT_NODE),e.Node.PROCESSING_INSTRUCTION_NODE,e.Node.ENTITY_REFERENCE_NODE,e.Node.ENTITY_NODE,e.Node.NOTATION_NODE,void 0!==e.window?e.window:Function("return this;")(),O=c,function(e){return e.dom().nodeType===O}),R=function(e){return void 0!==e.dom().classList},B=function(e,t){var n="class";return t=y(e,n).concat([t]),v(e,n,t.join(" ")),!0},M=function(e,t){return n=t,0<(r=function(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}(y(t=e,e="class"),(function(e){return e!==n}))).length?v(t,e,r.join(" ")):b(t,e),!1;var n,r},P=function(e){0===(R(e)?e.dom().classList:y(e,"class")).length&&b(e,"class")},z=w,I=(s={" ":"nbsp","":"shy"},{charMap:s,regExp:x(s),regExpGlobal:x(s,!0),selector:C(s),nbspClass:"mce-nbsp",charMapToRegExp:x,charMapToSelector:C}),L=function(e){return'<span data-mce-bogus="1" class="mce-'+I.charMap[e]+'">'+e+"</span>"},F=function(e){return _(e)&&void 0!==p(e)&&I.regExp.test(p(e))},H=S,V=function(e,t){for(;e.parentNode;){if(e.parentNode===t)return e;e=e.parentNode}},U=function(e){return e.replace(I.regExpGlobal,L)},j=T,W=E,q=function(e){var t=e.getBody(),n=e.selection.getBookmark(),r=V(e.selection.getNode(),t);E(e,r=void 0!==r?r:t),T(e,r),e.selection.moveToBookmark(n)},$=function(e,t){var n,r=e.getBody(),o=e.selection;t.set(!t.get()),a(e,t.get()),n=o.getBookmark(),(!0===t.get()?j:W)(e,r),o.moveToBookmark(n)},G=function(e,t){e.addCommand("mceVisualChars",(function(){$(e,t)}))},X=tinymce.util.Tools.resolve("tinymce.util.Delay"),Y=function(e,t){var n=X.debounce((function(){q(e)}),300);!1!==e.settings.forced_root_block&&e.on("keydown",(function(r){!0===t.get()&&(13===r.keyCode?q(e):n())}))},K=function(e){return e.getParam("visualchars_default_state",!1)},J=function(e,t){e.on("init",(function(){var n=!K(e);t.set(n),$(e,t)}))},Z=function(e,t){return function(n){function r(e){return n.setActive(e.state)}return n.setActive(t.get()),e.on("VisualChars",r),function(){return e.off("VisualChars",r)}}};o.add("visualchars",(function(e){var t,n,o=r(!1);return G(e,o),n=o,(t=e).ui.registry.addToggleButton("visualchars",{tooltip:"Show invisible characters",icon:"visualchars",onAction:function(){return t.execCommand("mceVisualChars")},onSetup:Z(t,n)}),t.ui.registry.addToggleMenuItem("visualchars",{text:"Show invisible characters",onAction:function(){return t.execCommand("mceVisualChars")},onSetup:Z(t,n)}),Y(e,o),J(e,o),i(o)}))}(window)},cfb0:function(e,t,n){n("43fc")},d2dc:function(e,t,n){n("169f")},d4c3:function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env"),n=function(e){e.addCommand("mcePrint",(function(){t.browser.isIE()?e.getDoc().execCommand("print",!1,null):e.getWin().print()}))},r=function(e){e.ui.registry.addButton("print",{icon:"print",tooltip:"Print",onAction:function(){return e.execCommand("mcePrint")}}),e.ui.registry.addMenuItem("print",{text:"Print...",icon:"print",onAction:function(){return e.execCommand("mcePrint")}})};e.add("print",(function(e){n(e),r(e),e.addShortcut("Meta+P","","mcePrint")}))}()},dbbc:function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e){e.addCommand("InsertHorizontalRule",(function(){e.execCommand("mceInsertContent",!1,"<hr />")}))},n=function(e){e.ui.registry.addButton("hr",{icon:"horizontal-rule",tooltip:"Horizontal line",onAction:function(){return e.execCommand("InsertHorizontalRule")}}),e.ui.registry.addMenuItem("hr",{icon:"horizontal-rule",text:"Horizontal line",onAction:function(){return e.execCommand("InsertHorizontalRule")}})};e.add("hr",(function(e){t(e),n(e)}))}()},dcb7:function(e,t,n){n("e704")},e2d6:function(e,t){!function(e){"use strict";function t(){}function n(){return l}var r=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(e,t){var n,r=e.dom,i=e.selection.getSelectedBlocks();i.length&&(n=r.getAttrib(i[0],"dir"),o.each(i,(function(e){r.getParent(e.parentNode,'*[dir="'+t+'"]',r.getRoot())||r.setAttrib(e,"dir",n!==t?t:null)})),e.nodeChanged())},a=function(e){e.addCommand("mceDirectionLTR",(function(){i(e,"ltr")})),e.addCommand("mceDirectionRTL",(function(){i(e,"rtl")}))},u=function(e){return function(){return e}},c=u(!1),s=u(!0),l=(k={fold:function(e,t){return e()},is:c,isSome:c,isNone:s,getOr:m,getOrThunk:d,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:u(null),getOrUndefined:u(void 0),or:m,orThunk:d,map:n,each:t,bind:n,exists:c,forall:s,filter:n,equals:f,equals_:f,toArray:function(){return[]},toString:u("none()")},Object.freeze&&Object.freeze(k),k);function f(e){return e.isNone()}function d(e){return e()}function m(e){return e}function g(e){function t(){return o}function n(t){return t(e)}var r=u(e),o={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:s,isNone:c,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:t,orThunk:t,map:function(t){return g(t(e))},each:function(t){t(e)},bind:n,exists:n,forall:n,filter:function(t){return t(e)?o:l},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(c,(function(t){return n(e,t)}))}};return o}function h(e){if(null==e)throw new Error("Node cannot be null or undefined");return{dom:u(e)}}function p(t,n){var r=t.dom(),o=e.window.getComputedStyle(r).getPropertyValue(n);return null===(n=""!==o||function(e){return e=T(e)?e.dom().parentNode:e.dom(),null!=e&&e.ownerDocument.body.contains(e)}(t)?o:(t=n,S(o=r)?o.style.getPropertyValue(t):""))?void 0:n}function v(e,t){return function(n){function r(e){e=x.fromDom(e.element),n.setActive(E(e)===t)}return e.on("NodeChange",r),function(){return e.off("NodeChange",r)}}}var b,y,w=function(e){return null==e?l:g(e)},x={fromHtml:function(t,n){if(n=(n||e.document).createElement("div"),n.innerHTML=t,!n.hasChildNodes()||1<n.childNodes.length)throw e.console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return h(n.childNodes[0])},fromTag:function(t,n){return n=(n||e.document).createElement(t),h(n)},fromText:function(t,n){return n=(n||e.document).createTextNode(t),h(n)},fromDom:h,fromPoint:function(e,t,n){return e=e.dom(),w(e.elementFromPoint(t,n)).map(h)}},C=(b="function",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)===b}),S=(Array.prototype.slice,C(Array.from)&&Array.from,function(e){return void 0!==e.style&&C(e.style.getPropertyValue)}),k=(e.Node.ATTRIBUTE_NODE,e.Node.CDATA_SECTION_NODE,e.Node.COMMENT_NODE,e.Node.DOCUMENT_NODE,e.Node.DOCUMENT_TYPE_NODE,e.Node.DOCUMENT_FRAGMENT_NODE,e.Node.ELEMENT_NODE,e.Node.TEXT_NODE),T=(e.Node.PROCESSING_INSTRUCTION_NODE,e.Node.ENTITY_REFERENCE_NODE,e.Node.ENTITY_NODE,e.Node.NOTATION_NODE,void 0!==e.window?e.window:Function("return this;")(),y=k,function(e){return e.dom().nodeType===y}),E=function(e){return"rtl"===p(e,"direction")?"rtl":"ltr"},O=function(e){e.ui.registry.addToggleButton("ltr",{tooltip:"Left to right",icon:"ltr",onAction:function(){return e.execCommand("mceDirectionLTR")},onSetup:v(e,"ltr")}),e.ui.registry.addToggleButton("rtl",{tooltip:"Right to left",icon:"rtl",onAction:function(){return e.execCommand("mceDirectionRTL")},onSetup:v(e,"rtl")})};r.add("directionality",(function(e){a(e),O(e)}))}(window)},e562:function(e,t,n){(function(t){!function(n){"use strict";var r=function(){},o=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e(t.apply(null,n))}},i=function(e){return function(){return e}},a=function(e){return e};function u(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=t.concat(n);return e.apply(null,o)}}function c(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return!e.apply(null,t)}}function s(){return d}var l=i(!1),f=i(!0),d=(Me={fold:function(e,t){return e()},is:l,isSome:l,isNone:f,getOr:h,getOrThunk:g,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(void 0),or:h,orThunk:g,map:s,each:r,bind:s,exists:l,forall:f,filter:s,equals:m,equals_:m,toArray:function(){return[]},toString:i("none()")},Object.freeze&&Object.freeze(Me),Me);function m(e){return e.isNone()}function g(e){return e()}function h(e){return e}function p(e){function t(){return o}function n(t){return t(e)}var r=i(e),o={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:f,isNone:l,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:t,orThunk:t,map:function(t){return p(t(e))},each:function(t){t(e)},bind:n,exists:n,forall:n,filter:function(t){return t(e)?o:d},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(l,(function(t){return n(e,t)}))}};return o}function v(e){return function(t){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}(t)===e}}function b(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n))return!0;return!1}function y(e,t,n){for(var r=e,o=function(e){n=t(n,e)},i=r.length-1;0<=i;i--)o(r[i],i);return n}function w(e){return 0===e.length?x.none():x.some(e[0])}var x={some:p,none:s,from:function(e){return null==e?d:p(e)}},C=v("string"),S=v("object"),k=v("array"),T=v("null"),E=v("boolean"),O=v("function"),N=v("number"),A=Array.prototype.slice,D=Array.prototype.indexOf,_=Array.prototype.push,R=function(e,t){return D.call(e,t)},B=function(e,t){return-1<R(e,t)},M=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},P=function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)},z=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}},I=function(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},L=function(e,t,n){return P(e,(function(e){n=t(n,e)})),n},F=function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n))return x.some(o)}return x.none()},H=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n))return x.some(n);return x.none()},V=function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!k(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);_.apply(t,e[n])}return t},U=function(e,t){return e=M(e,t),V(e)},j=function(e,t){for(var n=0,r=e.length;n<r;++n)if(!0!==t(e[n],n))return!1;return!0},W=function(e,t){return I(e,(function(e){return!B(t,e)}))},q=function(e){return 0===e.length?x.none():x.some(e[e.length-1])},$=O(Array.from)?Array.from:function(e){return A.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 X(e){return function(t){return!!t&&t.nodeType===e}}function Y(e){var t=e.map((function(e){return e.toLowerCase()}));return function(e){return!(!e||!e.nodeName)&&(e=e.nodeName.toLowerCase(),B(t,e))}}function K(e){return function(t){if(Be(t)){if(t.contentEditable===e)return!0;if(t.getAttribute("data-mce-contenteditable")===e)return!0}return!1}}function J(e,t){var n=We(e,t);return n?qe(r(1),r(2)):{major:0,minor:0};function r(e){return Number(t.replace(n,"$"+e))}}function Z(){return qe(0,0)}function Q(e){var t=e.current;return{current:t,version:e.version,isEdge:et(Xe,t),isChrome:et(Ye,t),isIE:et(Ke,t),isOpera:et(Je,t),isFirefox:et(Ze,t),isSafari:et(Qe,t)}}function ee(e){var t=e.current;return{current:t,version:e.version,isWindows:lt(rt,t),isiOS:lt(ot,t),isAndroid:lt(it,t),isOSX:lt(ut,t),isLinux:lt(at,t),isSolaris:lt(ct,t),isFreeBSD:lt(st,t)}}function te(e,t){var n=String(t).toLowerCase();return F(e,(function(e){return e.search(n)}))}function ne(e,t){return-1!==e.indexOf(t)}function re(e){return e.replace(/^\s+|\s+$/g,"")}function oe(e){return e.replace(/\s+$/g,"")}function ie(e){return function(t){return ne(t,e)}}function ae(e){if(null==e)throw new Error("Node cannot be null or undefined");return{dom:i(e)}}function ue(e){return function(t){return t.dom().nodeType===e}}function ce(e,t){var n={},r={};return Tt(e,(function(e,o){(t(e,o)?n:r)[o]=e})),{t:n,f:r}}function se(e,t){return Nt(e,t)?x.from(e[t]):x.none()}function le(e){return void 0!==e.style&&O(e.style.getPropertyValue)}function fe(e,t,r){if(!(C(r)||E(r)||N(r)))throw n.console.error("Invalid call to Attr.set. Key ",t,":: Value ",r,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,r+"")}function de(e,t){var n=e.dom();Tt(t,(function(e,t){fe(n,t,e)}))}function me(e,t){return null===(e=e.dom().getAttribute(t))?void 0:e}function ge(e,t){var r=e.dom(),o=n.window.getComputedStyle(r).getPropertyValue(t);return null===(e=""!==o||At(e)?o:Rt(r,t))?void 0:e}function he(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(e.length!==t.length)throw new Error('Wrong number of arguments to struct. Expected "['+e.length+']", got '+t.length+" arguments");var r={};return P(e,(function(e,n){r[e]=i(t[n])})),r}}function pe(e,t,n){return 0!=(e.compareDocumentPosition(t)&n)}function ve(e){return e.nodeType!==It&&e.nodeType!==Lt||0===e.childElementCount}function be(e){return yt.fromDom(e.dom().ownerDocument)}function ye(e){return Kt(e,0)}function we(e){return Kt(e,e.dom().childNodes.length-1)}function xe(e,t){return e.children&&B(e.children,t)}function Ce(e){function t(e){r()?a(e):i.push(e)}function r(){return o.isSome()}var o=x.none(),i=[],a=function(e){o.each((function(t){n.setTimeout((function(){e(t)}),0)}))};return e((function(e){o=x.some(e),P(i,a),i=[]})),{get:t,map:function(e){return Ce((function(n){t((function(t){n(e(t))}))}))},isReady:r}}function Se(e,t){return t((function(t){var n=[],r=0;0===e.length?t([]):P(e,(function(o,i){var a;o.get((a=i,function(o){n[a]=o,++r>=e.length&&t(n)}))}))}))}function ke(e){return{is:function(t){return e===t},isValue:f,isError:l,getOr:i(e),getOrThunk:i(e),getOrDie:i(e),or:function(t){return ke(e)},orThunk:function(t){return ke(e)},fold:function(t,n){return n(e)},map:function(t){return ke(t(e))},mapError:function(t){return ke(e)},each:function(t){t(e)},bind:function(t){return t(e)},exists:function(t){return t(e)},forall:function(t){return t(e)},toOption:function(){return x.some(e)}}}function Te(e){return{is:l,isValue:l,isError:f,getOr:a,getOrThunk:function(e){return e()},getOrDie:function(){throw t=String(e),new Error(t);var t},or:function(e){return e},orThunk:function(e){return e()},fold:function(t,n){return t(e)},map:function(t){return Te(e)},mapError:function(t){return Te(t(e))},each:r,bind:function(t){return Te(e)},exists:l,forall:f,toOption:x.none}}var Ee,Oe,Ne,Ae,De,_e,Re,Be=X(1),Me=Y(["textarea","input"]),Pe=X(3),ze=X(8),Ie=X(9),Le=X(11),Fe=Y(["br"]),He=K("true"),Ve=K("false"),Ue={isText:Pe,isElement:Be,isComment:ze,isDocument:Ie,isDocumentFragment:Le,isBr:Fe,isContentEditableTrue:He,isContentEditableFalse:Ve,isRestrictedNode:function(e){return!!e&&!Object.getPrototypeOf(e)},matchNodeNames:Y,hasPropValue:function(e,t){return function(n){return Be(n)&&n[e]===t}},hasAttribute:function(e,t){return function(t){return Be(t)&&t.hasAttribute(e)}},hasAttributeValue:function(e,t){return function(n){return Be(n)&&n.getAttribute(e)===t}},matchStyleValues:function(e,t){var n=t.toLowerCase().split(" ");return function(t){var r;if(Be(t))for(r=0;r<n.length;r++){var o=t.ownerDocument.defaultView.getComputedStyle(t,null);if((o?o.getPropertyValue(e):null)===n[r])return!0}return!1}},isBogus:function(e){return Be(e)&&e.hasAttribute("data-mce-bogus")},isBogusAll:function(e){return Be(e)&&"all"===e.getAttribute("data-mce-bogus")},isTable:function(e){return Be(e)&&"TABLE"===e.tagName},isTextareaOrInput:Me},je=function(e){function t(){return n}var n=e;return{get:t,set:function(e){n=e},clone:function(){return je(n)}}},We=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}},qe=function(e,t){return{major:e,minor:t}},$e=function(e,t){return t=String(t).toLowerCase(),0===e.length?Z():J(e,t)},Ge=Z,Xe="Edge",Ye="Chrome",Ke="IE",Je="Opera",Ze="Firefox",Qe="Safari",et=function(e,t){return function(){return t===e}},tt=function(){return Q({current:void 0,version:Ge()})},nt=Q,rt=(i(Xe),i(Ye),i(Ke),i(Je),i(Ze),i(Qe),"Windows"),ot="iOS",it="Android",at="Linux",ut="OSX",ct="Solaris",st="FreeBSD",lt=function(e,t){return function(){return t===e}},ft=function(){return ee({current:void 0,version:Ge()})},dt=ee,mt=(i(rt),i(ot),i(it),i(at),i(ut),i(ct),i(st),function(e,t){return te(e,t).map((function(e){var n=$e(e.versionRegexes,t);return{current:e.name,version:n}}))}),gt=function(e,t){return te(e,t).map((function(e){var n=$e(e.versionRegexes,t);return{current:e.name,version:n}}))},ht=function(e,t){return e=e,n=0,""===(t=t)||!(e.length<t.length)&&e.substr(n,n+t.length)===t;var n},pt=(Pe=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,ze=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return ne(e,"edge/")&&ne(e,"chrome")&&ne(e,"safari")&&ne(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Pe],search:function(e){return ne(e,"chrome")&&!ne(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return ne(e,"msie")||ne(e,"trident")}},{name:"Opera",versionRegexes:[Pe,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:ie("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:ie("firefox")},{name:"Safari",versionRegexes:[Pe,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(ne(e,"safari")||ne(e,"mobile/"))&&ne(e,"applewebkit")}}],Ie=[{name:"Windows",search:ie("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return ne(e,"iphone")||ne(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:ie("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:ie("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:ie("linux"),versionRegexes:[]},{name:"Solaris",search:ie("sunos"),versionRegexes:[]},{name:"FreeBSD",search:ie("freebsd"),versionRegexes:[]}],{browsers:i(ze),oses:i(Ie)}),vt=je(function(e,t){var n,r,o,a,u,c=pt.browsers(),s=pt.oses(),l=(c=mt(c,e).fold(tt,nt),s=gt(s,e).fold(ft,dt),r=c,e=e,t=t,l=(n=s).isiOS()&&!0===/ipad/i.test(e),o=n.isiOS()&&!l,a=n.isiOS()||n.isAndroid(),u=a||t("(pointer:coarse)"),t=l||!o&&a&&t("(min-device-width:768px)"),a=o||a&&!t,r=r.isSafari()&&n.isiOS()&&!1===/safari/i.test(e),e=!a&&!t&&!r,{isiPad:i(l),isiPhone:i(o),isTablet:i(t),isPhone:i(a),isTouch:i(u),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:i(r),isDesktop:i(e)});return{browser:c,os:s,deviceType:l}}(n.navigator.userAgent,(function(e){return n.window.matchMedia(e).matches}))),bt=function(){return vt.get()},yt={fromHtml:function(e,t){if(t=(t||n.document).createElement("div"),t.innerHTML=e,!t.hasChildNodes()||1<t.childNodes.length)throw n.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return ae(t.childNodes[0])},fromTag:function(e,t){return t=(t||n.document).createElement(e),ae(t)},fromText:function(e,t){return t=(t||n.document).createTextNode(e),ae(t)},fromDom:ae,fromPoint:function(e,t,n){return e=e.dom(),x.from(e.elementFromPoint(t,n)).map(ae)}},wt=(Le=(n.Node.ATTRIBUTE_NODE,n.Node.CDATA_SECTION_NODE,n.Node.COMMENT_NODE,n.Node.DOCUMENT_NODE),Fe=(n.Node.DOCUMENT_TYPE_NODE,n.Node.DOCUMENT_FRAGMENT_NODE,n.Node.ELEMENT_NODE),He=n.Node.TEXT_NODE,n.Node.PROCESSING_INSTRUCTION_NODE,n.Node.ENTITY_REFERENCE_NODE,n.Node.ENTITY_NODE,n.Node.NOTATION_NODE,void 0!==n.window?n.window:Function("return this;")(),function(e){return e.dom().nodeName.toLowerCase()}),xt=ue(Fe),Ct=ue(He),St=Object.keys,kt=Object.hasOwnProperty,Tt=function(e,t){for(var n=St(e),r=0,o=n.length;r<o;r++){var i=n[r];t(e[i],i)}},Et=function(e,t){return Ot(e,(function(e,n){return{k:n,v:t(e,n)}}))},Ot=function(e,t){var n={};return Tt(e,(function(e,r){e=t(e,r),n[e.k]=e.v})),n},Nt=function(e,t){return kt.call(e,t)},At=function(e){return e=Ct(e)?e.dom().parentNode:e.dom(),null!=e&&e.ownerDocument.body.contains(e)},Dt=function(e,t,n){fe(e.dom(),t,n)},_t=function(e,t){e.dom().removeAttribute(t)},Rt=function(e,t){return le(e)?e.style.getPropertyValue(t):""},Bt=function(e,t){return e=e.dom(),e=Rt(e,t),x.from(e).filter((function(e){return 0<e.length}))},Mt=function(e){return e.dom().offsetWidth},Pt=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},zt=function(e,t){return pe(e,t,n.Node.DOCUMENT_POSITION_CONTAINED_BY)},It=Fe,Lt=Le,Ft=function(e,t){if(e=e.dom(),e.nodeType!==It)return!1;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},Ht=function(e,t){return t=void 0===t?n.document:t.dom(),ve(t)?[]:M(t.querySelectorAll(e),yt.fromDom)},Vt=function(e,t){return e.dom()===t.dom()},Ut=bt().browser.isIE()?function(e,t){return zt(e.dom(),t.dom())}:function(e,t){return e=e.dom(),t=t.dom(),e!==t&&e.contains(t)},jt=function(e){return yt.fromDom(e.dom().ownerDocument.defaultView)},Wt=function(e){return x.from(e.dom().parentNode).map(yt.fromDom)},qt=function(e){return x.from(e.dom().previousSibling).map(yt.fromDom)},$t=function(e){return x.from(e.dom().nextSibling).map(yt.fromDom)},Gt=function(e){return e=Pt(e,qt),(e=A.call(e,0)).reverse(),e},Xt=function(e){return Pt(e,$t)},Yt=function(e){return M(e.dom().childNodes,yt.fromDom)},Kt=function(e,t){return e=e.dom().childNodes,x.from(e[t]).map(yt.fromDom)},Jt=(he("element","offset"),bt().browser),Zt=function(e){return F(e,xt)},Qt=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"===ge(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&&!xe(r,n);)i+=r.offsetLeft||0,a+=r.offsetTop||0,r=r.offsetParent;for(r=t.parentNode;r&&r!==n&&r.nodeType&&!xe(r,n);)i-=r.scrollLeft||0,a-=r.scrollTop||0,r=r.parentNode;a+=(o=yt.fromDom(t),Jt.isFirefox()&&"table"===wt(o)?Zt(Yt(o)).filter((function(e){return"caption"===wt(e)})).bind((function(e){return Zt(Xt(e)).map((function(t){t=t.dom().offsetTop;var n=e.dom().offsetTop,r=e.dom().offsetHeight;return t<=n?-r:0}))})).getOr(0):0)}return{x:i,y:a}},en=(Ve={},Me={exports:Ve},Oe=Ve,Ne=Me,Ae=Ee=void 0,function(e){"object"==typeof Oe&&void 0!==Ne?Ne.exports=e():"function"==typeof Ee&&Ee.amd?Ee([],e):("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:this).EphoxContactWrapper=e()}((function(){return function e(t,n,r){function o(a,u){if(!n[a]){if(!t[a]){var c="function"==typeof Ae&&Ae;if(!u&&c)return c(a,!0);if(i)return i(a,!0);throw(u=new Error("Cannot find module '"+a+"'")).code="MODULE_NOT_FOUND",u}c=n[a]={exports:{}},t[a][0].call(c.exports,(function(e){return o(t[a][1][e]||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof Ae&&Ae,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){var r,o;t=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(e){o=a}function u(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return(r=setTimeout)(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}var c,s=[],l=!1,f=-1;function d(){l&&c&&(l=!1,c.length?s=c.concat(s):f=-1,s.length&&m())}function m(){if(!l){for(var e=u(d),t=(l=!0,s.length);t;){for(c=s,s=[];++f<t;)c&&c[f].run();f=-1,t=s.length}c=null,l=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===a||!o)&&clearTimeout)return(o=clearTimeout)(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function h(){}t.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];s.push(new g(e,t)),1!==s.length||l||u(m)},g.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={},t.on=h,t.addListener=h,t.once=h,t.off=h,t.removeListener=h,t.removeAllListeners=h,t.emit=h,t.prependListener=h,t.prependOnceListener=h,t.listeners=function(e){return[]},t.binding=function(e){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(e){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},{}],2:[function(e,t,n){(function(e){function n(){}function r(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=void 0,this._deferreds=[],s(e,this)}function o(e,t){for(;3===e._state;)e=e._value;0===e._state?e._deferreds.push(t):(e._handled=!0,r._immediateFn((function(){var n,r=1===e._state?t.onFulfilled:t.onRejected;if(null===r)(1===e._state?i:a)(t.promise,e._value);else{try{n=r(e._value)}catch(n){return void a(t.promise,n)}i(t.promise,n)}})))}function i(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 r)return e._state=3,e._value=t,void u(e);if("function"==typeof n)return void s((o=n,i=t,function(){o.apply(i,arguments)}),e)}e._state=1,e._value=t,u(e)}catch(t){a(e,t)}var o,i}function a(e,t){e._state=2,e._value=t,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&r._immediateFn((function(){e._handled||r._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 s(e,t){var n=!1;try{e((function(e){n||(n=!0,i(t,e))}),(function(e){n||(n=!0,a(t,e))}))}catch(e){if(n)return;n=!0,a(t,e)}}var l,f;l=this,f=setTimeout,r.prototype.catch=function(e){return this.then(null,e)},r.prototype.then=function(e,t){var r=new this.constructor(n);return o(this,new c(e,t,r)),r},r.all=function(e){var t=Array.prototype.slice.call(e);return new r((function(e,n){if(0===t.length)return e([]);for(var r=t.length,o=0;o<t.length;o++)!function o(i,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var u=a.then;if("function"==typeof u)return void u.call(a,(function(e){o(i,e)}),n)}t[i]=a,0==--r&&e(t)}catch(a){n(a)}}(o,t[o])}))},r.resolve=function(e){return e&&"object"==typeof e&&e.constructor===r?e:new r((function(t){t(e)}))},r.reject=function(e){return new r((function(t,n){n(e)}))},r.race=function(e){return new r((function(t,n){for(var r=0,o=e.length;r<o;r++)e[r].then(t,n)}))},r._immediateFn="function"==typeof e?function(t){e(t)}:function(e){f(e,0)},r._unhandledRejectionFn=function(e){},r._setImmediateFn=function(e){r._immediateFn=e},r._setUnhandledRejectionFn=function(e){r._unhandledRejectionFn=e},void 0!==t&&t.exports?t.exports=r:l.Promise||(l.Promise=r)}).call(this,e("timers").setImmediate)},{timers:3}],3:[function(e,t,n){(function(t,r){var o=e("process/browser.js").nextTick,i=Function.prototype.apply,a=Array.prototype.slice,u={},c=0;function s(e,t){this._id=e,this._clearFn=t}n.setTimeout=function(){return new s(i.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new s(i.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},s.prototype.unref=s.prototype.ref=function(){},s.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n.setImmediate="function"==typeof t?t:function(e){var t=c++,r=!(arguments.length<2)&&a.call(arguments,1);return u[t]=!0,o((function(){u[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))})),t},n.clearImmediate="function"==typeof r?r:function(e){delete u[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(e,t,n){e=e("promise-polyfill");var r="undefined"!=typeof window?window:Function("return this;")();t.exports={boltExport:r.Promise||e}},{"promise-polyfill":2}]},{},[4])(4)})),Me.exports.boltExport),tn={nu:Ce,pure:function(e){return Ce((function(t){t(e)}))}},nn=function(e){n.setTimeout((function(){throw e}),0)},rn=function(e){function t(t){e().then(t,nn)}return{map:function(t){return rn((function(){return e().then(t)}))},bind:function(t){return rn((function(){return e().then((function(e){return t(e).toPromise()}))}))},anonBind:function(t){return rn((function(){return e().then((function(){return t.toPromise()}))}))},toLazy:function(){return tn.nu(t)},toCached:function(){var t=null;return rn((function(){return t=null===t?e():t}))},toPromise:e,get:t}},on={nu:function(e){return rn((function(){return new en(e)}))},pure:function(e){return rn((function(){return en.resolve(e)}))}},an=function(e){return Se(e,on.nu)},un={value:ke,error:Te,fromOption:function(e,t){return e.fold((function(){return Te(t)}),ke)}},cn=window.Promise||(De=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},_e=ln.immediateFn||"function"==typeof n.setImmediate&&n.setImmediate||function(e){n.setTimeout(e,1)},ln.prototype.catch=function(e){return this.then(null,e)},ln.prototype.then=function(e,t){var n=this;return new ln((function(r,o){fn.call(n,new hn(e,t,r,o))}))},ln.all=function(){var e=Array.prototype.slice.call(1===arguments.length&&De(arguments[0])?arguments[0]:arguments);return new ln((function(t,n){if(0===e.length)return t([]);for(var r=e.length,o=0;o<e.length;o++)!function o(i,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var u=a.then;if("function"==typeof u)return void u.call(a,(function(e){o(i,e)}),n)}e[i]=a,0==--r&&t(e)}catch(a){n(a)}}(o,e[o])}))},ln.resolve=function(e){return e&&"object"==typeof e&&e.constructor===ln?e:new ln((function(t){t(e)}))},ln.reject=function(e){return new ln((function(t,n){n(e)}))},ln.race=function(e){return new ln((function(t,n){for(var r=0,o=e.length;r<o;r++)e[r].then(t,n)}))},ln);function sn(e,t){return function(){e.apply(t,arguments)}}function ln(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=[],pn(e,sn(dn,this),sn(mn,this))}function fn(e){var t=this;null===this._state?this._deferreds.push(e):_e((function(){var n,r=t._state?e.onFulfilled:e.onRejected;if(null===r)(t._state?e.resolve:e.reject)(t._value);else{try{n=r(t._value)}catch(n){return void e.reject(n)}e.resolve(n)}}))}function dn(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 pn(sn(t,e),sn(dn,this),sn(mn,this))}this._state=!0,this._value=e,gn.call(this)}catch(e){mn.call(this,e)}}function mn(e){this._state=!1,this._value=e,gn.call(this)}function gn(){for(var e=0,t=this._deferreds.length;e<t;e++)fn.call(this,this._deferreds[e]);this._deferreds=null}function hn(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 pn(e,t,n){var r=!1;try{e((function(e){r||(r=!0,t(e))}),(function(e){r||(r=!0,n(e))}))}catch(e){if(r)return;r=!0,n(e)}}function vn(e,t){for(var r=n.window.requestAnimationFrame,o=["ms","moz","webkit"],i=0;i<o.length&&!r;i++)r=n.window[o[i]+"RequestAnimationFrame"];(r=r||function(e){n.window.setTimeout(e,0)})(e,t)}function bn(e,t){return n.setTimeout(e,t="number"!=typeof t?0:t)}function yn(e,t){return n.setInterval(e,t="number"!=typeof t?1:t)}function wn(e,t){var r,o=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];n.clearTimeout(r),r=bn((function(){e.apply(this,o)}),t)};return o.stop=function(){n.clearTimeout(r)},o}function xn(e,t,n){var r,o;if(!e)return 0;if(n=n||e,void 0!==e.length){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 Cn(e,t,n){for(var r=0,o=e.length;r<o;r++)if(t.call(n,e[r],r,e))return r;return-1}function Sn(e){return null==e?"":(""+e).replace(Dn,"")}function kn(e,t){return t?!("array"!==t||!An.isArray(e))||typeof e===t:void 0!==e}function Tn(e,t,n,r){r=r||this,e&&(n&&(e=e[n]),An.each(e,(function(e,o){if(!1===t.call(r,e,o,n))return!1;Tn(e,t,n,r)})))}var En={requestAnimationFrame:function(e,t){Re?Re.then(e):Re=new cn((function(e){t=t||n.document.body,vn(e,t)})).then(e)},setTimeout:bn,setInterval:yn,setEditorTimeout:function(e,t,n){return bn((function(){e.removed||t()}),n)},setEditorInterval:function(e,t,r){var o=yn((function(){e.removed?n.clearInterval(o):t()}),r);return o},debounce:wn,throttle:wn,clearInterval:function(e){return n.clearInterval(e)},clearTimeout:function(e){return n.clearTimeout(e)}},On=(Pe=n.navigator.userAgent,ze=bt(),Ie=ze.browser,He=ze.os,Fe=ze.deviceType,Le=/WebKit/.test(Pe)&&!Ie.isEdge(),Ve="FormData"in n.window&&"FileReader"in n.window&&"URL"in n.window&&!!n.URL.createObjectURL,Me=-1!==Pe.indexOf("Windows Phone"),{opera:Ie.isOpera(),webkit:Le,ie:!(!Ie.isIE()&&!Ie.isEdge())&&Ie.version.major,gecko:Ie.isFirefox(),mac:He.isOSX()||He.isiOS(),iOS:Fe.isiPad()||Fe.isiPhone(),android:He.isAndroid(),contentEditable:!0,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:!0,range:n.window.getSelection&&"Range"in n.window,documentMode:Ie.isIE()?n.document.documentMode||7:10,fileApi:Ve,ceFalse:!0,cacheSuffix:null,container:null,experimentalShadowDom:!1,canHaveCSP:!Ie.isIE(),desktop:Fe.isDesktop(),windowsPhone:Me,browser:{current:Ie.current,version:Ie.version,isChrome:Ie.isChrome,isEdge:Ie.isEdge,isFirefox:Ie.isFirefox,isIE:Ie.isIE,isOpera:Ie.isOpera,isSafari:Ie.isSafari},os:{current:He.current,version:He.version,isAndroid:He.isAndroid,isFreeBSD:He.isFreeBSD,isiOS:He.isiOS,isLinux:He.isLinux,isOSX:He.isOSX,isSolaris:He.isSolaris,isWindows:He.isWindows},deviceType:{isDesktop:Fe.isDesktop,isiPad:Fe.isiPad,isiPhone:Fe.isiPhone,isPhone:Fe.isPhone,isTablet:Fe.isTablet,isTouch:Fe.isTouch,isWebView:Fe.isWebView}}),Nn=Array.isArray,An={isArray:Nn,toArray:function(e){var t,n,r=e;if(!Nn(e))for(r=[],t=0,n=e.length;t<n;t++)r[t]=e[t];return r},each:xn,map:function(e,t){var n=[];return xn(e,(function(r,o){n.push(t(r,o,e))})),n},filter:function(e,t){var n=[];return xn(e,(function(r,o){t&&!t(r,o,e)||n.push(r)})),n},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:Cn,find:function(e,t,n){if(t=Cn(e,t,n),-1!==t)return e[t]},last:function(e){return e[e.length-1]}},Dn=/^\s*|\s*$/g,_n={trim:Sn,isArray:An.isArray,is:kn,toArray:An.toArray,makeMap:function(e,t,n){var r;for(t=t||",",n=n||{},r=(e="string"==typeof(e=e||[])?e.split(t):e).length;r--;)n[e[r]]={};return n},each:An.each,map:An.map,grep:An.filter,inArray:An.indexOf,hasOwn:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},extend:function(e,t){for(var n,r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];for(var i,a=arguments,u=1,c=a.length;u<c;u++)for(n in t=a[u])t.hasOwnProperty(n)&&void 0!==(i=t[n])&&(e[n]=i);return e},create:function(e,t,n){var r,o,i,a,u,c=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),i=e[3].match(/(^|\.)(\w+)$/i)[2],!(o=this.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],this.extend(o[i].prototype,t),e[5]&&(r=this.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],this.each(r,(function(e,t){o[i].prototype[t]=r[t]})),this.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)}))),this.each(t.static,(function(e,t){o[i][t]=e}))}},walk:Tn,createNS:function(e,t){var r,o;for(t=t||n.window,e=e.split("."),r=0;r<e.length;r++)t[o=e[r]]||(t[o]={}),t=t[o];return t},resolve:function(e,t){var r,o;for(t=t||n.window,r=0,o=(e=e.split(".")).length;r<o&&(t=t[e[r]]);r++);return t},explode:function(e,t){return!e||kn(e,"array")?e:An.map(e.split(t||","),Sn)},_addCacheSuffix:function(e){var t=On.cacheSuffix;return t&&(e+=(-1===e.indexOf("?")?"?":"&")+t),e}};function Rn(e,t){function r(t){e.getElementsByTagName("head")[0].appendChild(t)}function u(e){return on.nu((function(t){d(e,o(t,i(un.value(e))),o(t,i(un.error(e))))}))}function c(e){return e.fold(a,a)}var s=0,l={},f=(t=void 0===t?{}:t).maxLoadTime||5e3,d=function(o,i,a){function u(e){b.status=e,b.passed=[],b.failed=[],h&&(h.onload=null,h.onerror=null,h=null)}function c(){for(var e=b.passed,t=e.length;t--;)e[t]();u(2)}function d(e,t){e()||((new Date).getTime()-v<f?En.setTimeout(t):y())}function m(){d((function(){for(var t,n=e.styleSheets,r=n.length;r--;)if((t=(t=n[r]).ownerNode||t.owningElement)&&t.id===h.id)return c(),1}),m)}function g(){d((function(){try{var e=p.sheet.cssRules;return c(),e}catch(e){}}),g)}var h,p,v,b,y=function(){for(var e=b.failed,t=e.length;t--;)e[t]();u(3)};if(o=_n._addCacheSuffix(o),l[o]?b=l[o]:(b={passed:[],failed:[]},l[o]=b),i&&b.passed.push(i),a&&b.failed.push(a),1!==b.status)if(2===b.status)c();else if(3===b.status)y();else{if(b.status=1,(h=e.createElement("link")).rel="stylesheet",h.type="text/css",h.id="u"+s++,h.async=!1,h.defer=!1,v=(new Date).getTime(),t.contentCssCors&&(h.crossOrigin="anonymous"),t.referrerPolicy&&Dt(yt.fromDom(h),"referrerpolicy",t.referrerPolicy),!("onload"in h)||(i=n.navigator.userAgent.match(/WebKit\/(\d*)/))&&parseInt(i[1],10)<536){if(0<n.navigator.userAgent.indexOf("Firefox"))return(p=e.createElement("style")).textContent='@import "'+o+'"',g(),void r(p);m()}else h.onload=m,h.onerror=y;r(h),h.href=o}};return{load:d,loadAll:function(e,t,n){an(M(e,u)).get((function(e){e=z(e,(function(e){return e.isValue()})),0<e.fail.length?n(e.fail.map(c)):t(e.pass.map(c))}))},_setReferrerPolicy:function(e){t.referrerPolicy=e}}}function Bn(e){var t;return function(n){return(t=t||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}(e,i(!0))).hasOwnProperty(wt(n))}}function Mn(e){return xt(e)&&!Un(e)}function Pn(e){return e&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")}function zn(e,t){var n,r,o=t.childNodes;if(!Ue.isElement(t)||!Pn(t)){for(n=o.length-1;0<=n;n--)zn(e,o[n]);if(!1===Ue.isDocument(t)){if(Ue.isText(t)&&0<t.nodeValue.length){var i=_n.trim(t.nodeValue).length;if(e.isBlock(t.parentNode)||0<i)return;if(0===i&&(r=(i=t).previousSibling&&"SPAN"===i.previousSibling.nodeName,i=i.nextSibling&&"SPAN"===i.nextSibling.nodeName,r&&i))return}else if(Ue.isElement(t)&&(1===(o=t.childNodes).length&&Pn(o[0])&&t.parentNode.insertBefore(o[0],t),o.length||Gn(yt.fromDom(t))))return;e.remove(t)}return t}}function In(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)),or[r]||(o="&"+e[n+1]+";",i[r]=o,i[o]=r);return i}}function Ln(e,t){return e.replace(t?Qn:er,(function(e){return or[e]||e}))}function Fn(e,t){return e.replace(t?Qn:er,(function(e){return 1<e.length?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":or[e]||"&#"+e.charCodeAt(0)+";"}))}function Hn(e,t,n){return n=n||ar,e.replace(t?Qn:er,(function(e){return or[e]||n[e]||e}))}var Vn=Bn(["h1","h2","h3","h4","h5","h6"]),Un=Bn(["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"]),jn=function(e){return xt(e)&&"br"===wt(e)},Wn=Bn(["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"]),qn=Bn(["ul","ol","dl"]),$n=Bn(["li","dd","dt"]),Gn=Bn(["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param","embed","source","wbr","track"]),Xn=Bn(["thead","tbody","tfoot"]),Yn=Bn(["td","th"]),Kn=Bn(["pre","script","textarea","style"]),Jn=zn,Zn=_n.makeMap,Qn=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,er=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,tr=/[<>&\"\']/g,nr=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,rr={128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},or={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},ir={"<":"<",">":">","&":"&",""":'"',"'":"'"},ar=In("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),ur={encodeRaw:Ln,encodeAllRaw:function(e){return(""+e).replace(tr,(function(e){return or[e]||e}))},encodeNumeric:Fn,encodeNamed:Hn,getEncodeFunc:function(e,t){var n=In(t)||ar;e=Zn(e.replace(/\+/g,","));return e.named&&e.numeric?function(e,t){return e.replace(t?Qn:er,(function(e){return void 0!==or[e]?or[e]:void 0!==n[e]?n[e]:1<e.length?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":"&#"+e.charCodeAt(0)+";"}))}:e.named?t?function(e,t){return Hn(e,t,n)}:Hn:e.numeric?Fn:Ln},decode:function(e){return e.replace(nr,(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))):rr[t]||String.fromCharCode(t):ir[e]||ar[e]||(t=e,(e=yt.fromTag("div").dom()).innerHTML=t,e.textContent||e.innerText||t)}))}},cr={},sr={},lr=_n.makeMap,fr=_n.each,dr=_n.extend,mr=_n.explode,gr=_n.inArray,hr=function(e,t){return(e=_n.trim(e))?e.split(t||" "):[]},pr=function(e){function t(e,t,n){function o(e,t){for(var n={},r=0,o=e.length;r<o;r++)n[e[r]]=t||{};return n}var i,a;for(t=t||"","string"==typeof(n=n||[])&&(n=hr(n)),i=(e=hr(e)).length;i--;)a={attributes:o(a=hr([r,t].join(" "))),attributesOrder:a,children:o(n,sr)},c[e[i]]=a}function n(e,t){var n,r,o,i=(e=hr(e)).length;for(t=hr(t);i--;)for(n=c[e[i]],r=0,o=t.length;r<o;r++)n.attributes[t[r]]={},n.attributesOrder.push(t[r])}var r,o,i,a,u,c={};return cr[e]||(r="id accesskey class dir lang style tabindex title role",o="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",i="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&&(r+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",o+=" article aside details dialog figure main header footer hgroup section nav",i+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),"html5-strict"!==e&&(r+=" xml:lang",i=[i,u="acronym applet basefont big font strike tt"].join(" "),fr(hr(u),(function(e){t(e,"",i)})),o=[o,u="center dir isindex noframes"].join(" "),a=[o,i].join(" "),fr(hr(u),(function(e){t(e,"",a)}))),a=a||[o,i].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",a),t("address dt dd div caption","",a),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","",i),t("blockquote","cite",a),t("ol","reversed start type","li"),t("ul","","li"),t("li","value",a),t("dl","","dt dd"),t("a","href target rel media hreflang type",i),t("q","cite",i),t("ins del","cite datetime",a),t("img","src sizes srcset alt usemap ismap width height"),t("iframe","src name width height",a),t("embed","src type width height"),t("object","data type typemustmatch name usemap form width height",[a,"param"].join(" ")),t("param","name value"),t("map","name",[a,"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",a),t("th","colspan rowspan headers scope abbr",a),t("form","accept-charset action autocomplete enctype method name novalidate target",a),t("fieldset","disabled form name",[a,"legend"].join(" ")),t("label","form for",i),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?a:i),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",[a,"li"].join(" ")),t("noscript","",a),"html4"!==e&&(t("wbr"),t("ruby","",[i,"rt rp"].join(" ")),t("figcaption","",a),t("mark rt rp summary bdi","",i),t("canvas","width height",a),t("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[a,"track source"].join(" ")),t("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[a,"track source"].join(" ")),t("picture","","img source"),t("source","src srcset type media sizes"),t("track","kind src srclang label default"),t("datalist","",[i,"option"].join(" ")),t("article section nav aside main header footer","",a),t("hgroup","","h1 h2 h3 h4 h5 h6"),t("figure","",[a,"figcaption"].join(" ")),t("time","datetime",i),t("dialog","open",a),t("command","type label icon disabled checked radiogroup command"),t("output","for form name",i),t("progress","value max",i),t("meter","value min max low high optimum",i),t("details","open",[a,"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")),fr(hr("a form meter progress dfn"),(function(e){c[e]&&delete c[e].children[e]})),delete c.caption.children.table,delete c.script,cr[e]=c)},vr=function(e,t){var n;return e&&(n={},fr(e="string"==typeof e?{"*":e}:e,(function(e,r){n[r]=n[r.toUpperCase()]=("map"===t?lr:mr)(e,/[, ]/)}))),n};function br(e){function t(t,n,r){var o=e[t];return o?o=lr(o,/[, ]/,lr(o.toUpperCase(),/[, ]/)):(o=cr[t])||(o=lr(n," ",lr(n.toUpperCase()," ")),o=dr(o,r),cr[t]=o),o}function n(e){var t,n,r,o,i,a,u,c,s,l,f,d,m,g,h,p,v,b,y,x=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,S=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/,k=/[*?+]/;if(e)for(e=hr(e,","),w["@"]&&(p=w["@"].attributes,v=w["@"].attributesOrder),t=0,n=e.length;t<n;t++)if(i=x.exec(e[t])){if(g=i[1],s=i[2],h=i[3],c=i[5],a={attributes:d={},attributesOrder:m=[]},"#"===g&&(a.paddEmpty=!0),"-"===g&&(a.removeEmpty=!0),"!"===i[4]&&(a.removeEmptyAttrs=!0),p){for(b in p)d[b]=p[b];m.push.apply(m,v)}if(c)for(r=0,o=(c=hr(c,"|")).length;r<o;r++)(i=S.exec(c[r]))&&(u={},f=i[1],l=i[2].replace(/[\\:]:/g,":"),g=i[3],y=i[4],"!"===f&&(a.attributesRequired=a.attributesRequired||[],a.attributesRequired.push(l),u.required=!0),"-"===f?(delete d[l],m.splice(gr(m,l),1)):(g&&("="===g&&(a.attributesDefault=a.attributesDefault||[],a.attributesDefault.push({name:l,value:y}),u.defaultValue=y),":"===g&&(a.attributesForced=a.attributesForced||[],a.attributesForced.push({name:l,value:y}),u.forcedValue=y),"<"===g&&(u.validValues=lr(y,"?"))),k.test(l)?(a.attributePatterns=a.attributePatterns||[],u.pattern=T(l),a.attributePatterns.push(u)):(d[l]||m.push(l),d[l]=u)));p||"@"!==s||(p=d,v=m),h&&(a.outputName=s,w[h]=a),k.test(s)?(a.pattern=T(s),C.push(a)):w[s]=a}}function r(e){w={},C=[],n(e),fr(s,(function(e,t){x[t]=e.children}))}function o(e){var t=/^(~)?(.+)$/;e&&(cr.text_block_elements=cr.block_elements=null,fr(hr(e,","),(function(e){e=t.exec(e);var n="~"===e[1],r=n?"span":"div",o=e[2];x[o]=x[r],S[o]=r,n||(h[o.toUpperCase()]={},h[o]={}),w[o]||(e=w[r],delete(e=dr({},e)).removeEmptyAttrs,delete e.removeEmpty,w[o]=e),fr(x,(function(e,t){e[r]&&(x[t]=e=dr({},x[t]),e[o]=e[r])}))})))}function i(t){var n=/^([+\-]?)(\w+)\[([^\]]+)\]$/;cr[e.schema]=null,t&&fr(hr(t,","),(function(e){var t,r;e=n.exec(e);e&&(r=e[1],t=r?x[e[2]]:x[e[2]]={"#comment":{}},t=x[e[2]],fr(hr(e[3],"|"),(function(e){"-"===r?delete t[e]:t[e]={}})))}))}function a(e){var t,n=w[e];if(n)return n;for(t=C.length;t--;)if((n=C[t]).pattern.test(e))return n}var u,c,s,l,f,d,m,g,h,p,v,b,y,w={},x={},C=[],S={},k={},T=(s=pr((e=e||{}).schema),!1===e.verify_html&&(e.valid_elements="*[*]"),u=vr(e.valid_styles),c=vr(e.invalid_styles,"map"),g=vr(e.valid_classes,"map"),l=t("whitespace_elements","pre script noscript style textarea video audio iframe object code"),f=t("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),d=t("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),m=t("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),p=t("non_empty_elements","td th iframe video audio object script pre code",d),v=t("move_caret_before_on_enter_elements","table",p),b=t("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),h=t("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",b),y=t("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),fr((e.special||"script noscript noframes noembed title style textarea xmp").split(" "),(function(e){k[e]=new RegExp("</"+e+"[^>]*>","gi")})),function(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")});return e.valid_elements?r(e.valid_elements):(fr(s,(function(e,t){w[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},x[t]=e.children})),"html5"!==e.schema&&fr(hr("strong/b em/i"),(function(e){e=hr(e,"/"),w[e[1]].outputName=e[0]})),fr(hr("ol ul sub sup blockquote span font a table tbody tr strong em b i"),(function(e){w[e]&&(w[e].removeEmpty=!0)})),fr(hr("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"),(function(e){w[e].paddEmpty=!0})),fr(hr("span"),(function(e){w[e].removeEmptyAttrs=!0}))),o(e.custom_elements),i(e.valid_children),n(e.extended_valid_elements),i("+ol[ul|ol],+ul[ul|ol]"),fr({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){w[t]&&(w[t].parentsRequired=hr(e))})),e.invalid_elements&&fr(mr(e.invalid_elements),(function(e){w[e]&&delete w[e]})),a("span")||n("span[!data-mce-type|*]"),{children:x,elements:w,getValidStyles:function(){return u},getValidClasses:function(){return g},getBlockElements:function(){return h},getInvalidStyles:function(){return c},getShortEndedElements:function(){return d},getTextBlockElements:function(){return b},getTextInlineElements:function(){return y},getBoolAttrs:function(){return m},getElementRule:a,getSelfClosingElements:function(){return f},getNonEmptyElements:function(){return p},getMoveCaretBeforeOnEnterElements:function(){return v},getWhiteSpaceElements:function(){return l},getSpecialElements:function(){return k},isValidChild:function(e,t){return e=x[e.toLowerCase()],!(!e||!e[t.toLowerCase()])},isValid:function(e,t){var n,r,o=a(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 S},addValidElements:n,setValidElements:r,addCustomElements:o,addValidChildren:i}}function yr(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r||!1):e.attachEvent&&e.attachEvent("on"+t,n)}function wr(e,t,n,r){e.removeEventListener?e.removeEventListener(t,n,r||!1):e.detachEvent&&e.detachEvent("on"+t,n)}function xr(e,t){var r,o,i=t||{};for(r in e)Er[r]||(i[r]=e[r]);return i.target||(i.target=i.srcElement||n.document),On.experimentalShadowDom&&(i.target=function(e,t){return e.composedPath&&(e=e.composedPath(),e&&0<e.length)?e[0]:t}(e,i.target)),e&&Tr.test(e.type)&&void 0===e.pageX&&void 0!==e.clientX&&(o=(t=i.target.ownerDocument||n.document).documentElement,t=t.body,i.pageX=e.clientX+(o&&o.scrollLeft||t&&t.scrollLeft||0)-(o&&o.clientLeft||t&&t.clientLeft||0),i.pageY=e.clientY+(o&&o.scrollTop||t&&t.scrollTop||0)-(o&&o.clientTop||t&&t.clientTop||0)),i.preventDefault=function(){i.isDefaultPrevented=Nr,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},i.stopPropagation=function(){i.isPropagationStopped=Nr,e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},!(i.stopImmediatePropagation=function(){i.isImmediatePropagationStopped=Nr,i.stopPropagation()})==((o=i).isDefaultPrevented===Nr||o.isDefaultPrevented===Or)&&(i.isDefaultPrevented=Or,i.isPropagationStopped=Or,i.isImmediatePropagationStopped=Or),void 0===i.metaKey&&(i.metaKey=!1),i}function Cr(e,t,n){var r,o=e.document,i={type:"ready"};n.domLoaded?t(i):(r=function(){wr(e,"DOMContentLoaded",r),wr(e,"load",r),n.domLoaded||(n.domLoaded=!0,t(i))},"complete"===o.readyState||"interactive"===o.readyState&&o.body?r():yr(e,"DOMContentLoaded",r),yr(e,"load",r))}var Sr=function(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)},kr=function(e,t){var n,r,o,i,a=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,u=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,c=/\s*([^:]+):\s*([^;]+);?/g,s=/\s+$/,l={},f="\ufeff";for(e=e||{},t&&(o=t.getValidStyles(),i=t.getInvalidStyles()),r=("\\\" \\' \\; \\: ; : "+f).split(" "),n=0;n<r.length;n++)l[r[n]]=f+n,l[f+n]=r[n];return{toHex:function(e){return e.replace(a,Sr)},parse:function(t){function r(e,t,r){var o,i,a,u=w[e+"-top"+t];if(u&&(o=w[e+"-right"+t])&&(i=w[e+"-bottom"+t])&&(a=w[e+"-left"+t])){var c=[u,o,i,a];for(n=c.length-1;n--&&c[n]===c[n+1];);-1<n&&r||(w[e+t]=-1===n?c[0]:c.join(" "),delete w[e+"-top"+t],delete w[e+"-right"+t],delete w[e+"-bottom"+t],delete w[e+"-left"+t])}}function o(e){return h=!0,l[e]}function i(e){return e.replace(/\\[0-9a-f]+/gi,T)}function d(t,n,r,o,i,a){if(i=i||a)return"'"+(i=k(i)).replace(/\'/g,"\\'")+"'";if(n=k(n||r||o),!e.allow_script_urls){if(a=n.replace(/[\s\r\n]+/g,""),/(java|vb)script:/i.test(a))return"";if(!e.allow_svg_data_urls&&/^data:image\/svg/i.test(a))return""}return"url('"+(n=x?x.call(C,n,"style"):n).replace(/\'/g,"\\'")+"')"}var m,g,h,p,v,b,y,w={},x=e.url_converter,C=e.url_converter_scope||this,S=function(e){var t,n=w[e];if(n){for(t=(n=n.split(" ")).length;t--;)if(n[t]!==n[0])return!1;return w[e]=n[0],!0}},k=function(e,t){return h&&(e=e.replace(/\uFEFF[0-9]/g,(function(e){return l[e]}))),t?e:e.replace(/\\([\'\";:])/g,"$1")},T=function(e){return String.fromCharCode(parseInt(e.slice(1),16))};if(t){for(t=(t=t.replace(/[\u0000-\u001F]/g,"")).replace(/\\[\"\';:\uFEFF]/g,o).replace(/\"[^\"]+\"|\'[^\']+\'/g,(function(e){return e.replace(/[;:]/g,o)}));g=c.exec(t);)c.lastIndex=g.index+g[0].length,m=g[1].replace(s,"").toLowerCase(),g=g[2].replace(s,""),m&&g&&(m=i(m),g=i(g),-1===m.indexOf(f)&&-1===m.indexOf('"')&&(e.allow_script_urls||"behavior"!==m&&!/expression\s*\(|\/\*|\*\//.test(g))&&("font-weight"===m&&"700"===g?g="bold":"color"!==m&&"background-color"!==m||(g=g.toLowerCase()),g=(g=g.replace(a,Sr)).replace(u,d),w[m]=h?k(g,!0):g));r("border","",!0),r("border","-width"),r("border","-color"),r("border","-style"),r("padding",""),r("margin",""),p="border",b="border-style",y="border-color",S(v="border-width")&&S(b)&&S(y)&&(w[p]=w[v]+" "+w[b]+" "+w[y],delete w[v],delete w[b],delete w[y]),"medium none"===w.border&&delete w.border,"none"===w["border-image"]&&delete w["border-image"]}return w},serialize:function(e,t){function n(t){var n,r,i,a=o[t];if(a)for(n=0,r=a.length;n<r;n++)t=a[n],(i=e[t])&&(l+=(0<l.length?" ":"")+t+": "+i+";")}var r,a,u,c,s,l="";if(t&&o)n("*"),n(t);else for(r in e)!(a=e[r])||i&&(u=r,c=t,s=void 0,(s=i["*"])&&s[u]||(s=i[c])&&s[u])||(l+=(0<l.length?" ":"")+r+": "+a+";");return l}}},Tr=/^(?:mouse|contextmenu)|click/,Er={keyLocation:1,layerX:1,layerY:1,returnValue:1,webkitMovementX:1,webkitMovementY:1,keyIdentifier:1,mozPressure:1},Or=function(){return!1},Nr=function(){return!0},Ar=(Dr.prototype.bind=function(e,t,r,o){function i(e){d.executeHandlers(xr(e||m.event),a)}var a,u,c,s,l,f,d=this,m=n.window;if(e&&3!==e.nodeType&&8!==e.nodeType){e[d.expando]?a=e[d.expando]:(a=d.count++,e[d.expando]=a,d.events[a]={}),o=o||e;for(var g=t.split(" "),h=g.length;h--;)l=i,s=f=!1,"DOMContentLoaded"===(c=g[h])&&(c="ready"),d.domLoaded&&"ready"===c&&"complete"===e.readyState?r.call(o,xr({type:c})):(d.hasMouseEnterLeave||(s=d.mouseEnterLeave[c])&&(l=function(e){var t=e.currentTarget,n=e.relatedTarget;if(n&&t.contains)n=t.contains(n);else for(;n&&n!==t;)n=n.parentNode;n||((e=xr(e||m.event)).type="mouseout"===e.type?"mouseleave":"mouseenter",e.target=t,d.executeHandlers(e,a))}),d.hasFocusIn||"focusin"!==c&&"focusout"!==c||(f=!0,s="focusin"===c?"focus":"blur",l=function(e){(e=xr(e||m.event)).type="focus"===e.type?"focusin":"focusout",d.executeHandlers(e,a)}),(u=d.events[a][c])?"ready"===c&&d.domLoaded?r(xr({type:c})):u.push({func:r,scope:o}):(d.events[a][c]=u=[{func:r,scope:o}],u.fakeName=s,u.capture=f,u.nativeHandler=l,"ready"===c?Cr(e,l,d):yr(e,s||c,l,f)));return e=u=0,r}},Dr.prototype.unbind=function(e,t,n){var r,o,i,a;if(!e||3===e.nodeType||8===e.nodeType)return this;if(r=e[this.expando]){if(a=this.events[r],t){for(var u,c,s,l,f=t.split(" "),d=f.length;d--;)if(l=a[i=f[d]]){if(n)for(o=l.length;o--;)l[o].func===n&&(u=l.nativeHandler,c=l.fakeName,s=l.capture,(l=l.slice(0,o).concat(l.slice(o+1))).nativeHandler=u,l.fakeName=c,l.capture=s,a[i]=l);n&&0!==l.length||(delete a[i],wr(e,l.fakeName||i,l.nativeHandler,l.capture))}}else{for(i in a)l=a[i],wr(e,l.fakeName||i,l.nativeHandler,l.capture);a={}}for(i in a)return this;delete this.events[r];try{delete e[this.expando]}catch(t){e[this.expando]=null}}return this},Dr.prototype.fire=function(e,t,n){var r;if(!e||3===e.nodeType||8===e.nodeType)return this;var o=xr(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},Dr.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=e.getElementsByTagName?e:e.document)&&e.getElementsByTagName)for(this.unbind(e),t=(n=e.getElementsByTagName("*")).length;t--;)(e=n[t])[this.expando]&&this.unbind(e);return this},Dr.prototype.destroy=function(){this.events={}},Dr.prototype.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1},Dr.prototype.executeHandlers=function(e,t){t=this.events[t];var n,r,o,i=t&&t[e.type];if(i)for(n=0,r=i.length;n<r;n++)if((o=i[n])&&!1===o.func.call(o.scope,e)&&e.preventDefault(),e.isImmediatePropagationStopped())return},Dr.Event=new Dr,Dr);function Dr(){this.domLoaded=!1,this.events={},this.count=1,this.expando="mce-data-"+(+new Date).toString(32),this.hasMouseEnterLeave="onmouseenter"in n.document.documentElement,this.hasFocusIn="onfocusin"in n.document.documentElement,this.count=1}function _r(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 Rr,Br,Mr,Pr,zr,Ir,Lr,Fr,Hr,Vr,Ur,jr,Wr,qr,$r,Gr,Xr,Yr,Kr="sizzle"+-new Date,Jr=n.window.document,Zr=0,Qr=0,eo=No(),to=No(),no=No(),ro=function(e,t){return e===t&&(Ur=!0),0},oo="undefined",io={}.hasOwnProperty,ao=(ze=[],ze.pop),uo=ze.push,co=ze.push,so=ze.slice,lo=ze.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1},fo="[\\x20\\t\\r\\n\\f]",mo=(Pe="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",Le="\\["+fo+"*("+Pe+")(?:"+fo+"*([*^$|!~]?=)"+fo+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+Pe+"))|)"+fo+"*\\]",Ve=":("+Pe+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+Le+")*)|.*)\\)|)",new RegExp("^"+fo+"+|((?:^|[^\\\\])(?:\\\\.)*)"+fo+"+$","g")),go=new RegExp("^"+fo+"*,"+fo+"*"),ho=new RegExp("^"+fo+"*([>+~]|"+fo+")"+fo+"*"),po=new RegExp("="+fo+"*([^\\]'\"]*?)"+fo+"*\\]","g"),vo=new RegExp(Ve),bo=new RegExp("^"+Pe+"$"),yo={ID:new RegExp("^#("+Pe+")"),CLASS:new RegExp("^\\.("+Pe+")"),TAG:new RegExp("^("+Pe+"|[*])"),ATTR:new RegExp("^"+Le),PSEUDO:new RegExp("^"+Ve),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+fo+"*(even|odd|(([+-]|)(\\d*)n|)"+fo+"*(?:([+-]|)"+fo+"*(\\d+)|))"+fo+"*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^"+fo+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+fo+"*((?:-\\d)?\\d*)"+fo+"*\\)|)(?=[^-]|$)","i")},wo=/^(?:input|select|textarea|button)$/i,xo=/^h\d$/i,Co=/^[^{]+\{\s*\[native \w/,So=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ko=/[+~]/,To=/'|\\/g,Eo=new RegExp("\\\\([\\da-f]{1,6}"+fo+"?|("+fo+")|.)","ig");try{co.apply(ze=so.call(Jr.childNodes),Jr.childNodes),ze[Jr.childNodes.length].nodeType}catch(Pe){co={apply:ze.length?function(e,t){uo.apply(e,so.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function Oo(e,t,n,r){var o,i,a,u,c,s,l;if((t?t.ownerDocument||t:Jr)!==Wr&&jr(t),n=n||[],!e||"string"!=typeof e)return n;if(1!==(o=(t=t||Wr).nodeType)&&9!==o)return[];if($r&&!r){if(s=So.exec(e))if(l=s[1]){if(9===o){if(!(u=t.getElementById(l))||!u.parentNode)return n;if(u.id===l)return n.push(u),n}else if(t.ownerDocument&&(u=t.ownerDocument.getElementById(l))&&Yr(t,u)&&u.id===l)return n.push(u),n}else{if(s[2])return co.apply(n,t.getElementsByTagName(e)),n;if((l=s[3])&&Br.getElementsByClassName)return co.apply(n,t.getElementsByClassName(l)),n}if(Br.qsa&&(!Gr||!Gr.test(e))){if(c=u=Kr,s=t,l=9===o&&e,1===o&&"object"!==t.nodeName.toLowerCase()){for(a=Ir(e),(u=t.getAttribute("id"))?c=u.replace(To,"\\$&"):t.setAttribute("id",c),c="[id='"+c+"'] ",i=a.length;i--;)a[i]=c+Mo(a[i]);s=ko.test(e)&&Ro(t.parentNode)||t,l=a.join(",")}if(l)try{return co.apply(n,s.querySelectorAll(l)),n}catch(e){}finally{u||t.removeAttribute("id")}}}return Fr(e.replace(mo,"$1"),t,n,r)}function No(){var e=[];function t(n,r){return e.push(n+" ")>Mr.cacheLength&&delete t[e.shift()],t[n+" "]=r}return t}function Ao(e){return e[Kr]=!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(e){return Ao((function(t){return t=+t,Ao((function(n,r){for(var o,i=e([],n.length,t),a=i.length;a--;)n[o=i[a]]&&(n[o]=!(r[o]=n[o]))}))}))}function Ro(e){return e&&typeof e.getElementsByTagName!==oo&&e}for(Rr in Br=Oo.support={},zr=Oo.isXML=function(e){return e=e&&(e.ownerDocument||e).documentElement,!!e&&"HTML"!==e.nodeName},jr=Oo.setDocument=function(e){var t=e?e.ownerDocument||e:Jr;e=t.defaultView;return t!==Wr&&9===t.nodeType&&t.documentElement?(qr=(Wr=t).documentElement,$r=!zr(t),e&&e!==function(e){try{return e.top}catch(e){}return null}(e)&&(e.addEventListener?e.addEventListener("unload",(function(){jr()}),!1):e.attachEvent&&e.attachEvent("onunload",(function(){jr()}))),Br.attributes=!0,Br.getElementsByTagName=!0,Br.getElementsByClassName=Co.test(t.getElementsByClassName),Br.getById=!0,Mr.find.ID=function(e,t){if(typeof t.getElementById!==oo&&$r)return(t=t.getElementById(e))&&t.parentNode?[t]:[]},Mr.filter.ID=function(e){var t=e.replace(Eo,_r);return function(e){return e.getAttribute("id")===t}},Mr.find.TAG=Br.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==oo)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},Mr.find.CLASS=Br.getElementsByClassName&&function(e,t){if($r)return t.getElementsByClassName(e)},Xr=[],Gr=[],Br.disconnectedMatch=!0,Gr=Gr.length&&new RegExp(Gr.join("|")),Xr=Xr.length&&new RegExp(Xr.join("|")),e=Co.test(qr.compareDocumentPosition),Yr=e||Co.test(qr.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e;t=t&&t.parentNode;return e===t||!(!t||1!==t.nodeType||!(n.contains?n.contains(t):e.compareDocumentPosition&&16&e.compareDocumentPosition(t)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},ro=e?function(e,n){if(e===n)return Ur=!0,0;var r=!e.compareDocumentPosition-!n.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(n.ownerDocument||n)?e.compareDocumentPosition(n):1)||!Br.sortDetached&&n.compareDocumentPosition(e)===r?e===t||e.ownerDocument===Jr&&Yr(Jr,e)?-1:n===t||n.ownerDocument===Jr&&Yr(Jr,n)?1:Vr?lo.call(Vr,e)-lo.call(Vr,n):0:4&r?-1:1)}:function(e,n){if(e===n)return Ur=!0,0;var r,o=0,i=e.parentNode,a=n.parentNode,u=[e],c=[n];if(!i||!a)return e===t?-1:n===t?1:i?-1:a?1:Vr?lo.call(Vr,e)-lo.call(Vr,n):0;if(i===a)return Do(e,n);for(r=e;r=r.parentNode;)u.unshift(r);for(r=n;r=r.parentNode;)c.unshift(r);for(;u[o]===c[o];)o++;return o?Do(u[o],c[o]):u[o]===Jr?-1:c[o]===Jr?1:0},t):Wr},Oo.matches=function(e,t){return Oo(e,null,null,t)},Oo.matchesSelector=function(e,t){if((e.ownerDocument||e)!==Wr&&jr(e),t=t.replace(po,"='$1']"),Br.matchesSelector&&$r&&(!Xr||!Xr.test(t))&&(!Gr||!Gr.test(t)))try{var n=(void 0).call(e,t);if(n||Br.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return 0<Oo(t,Wr,null,[e]).length},Oo.contains=function(e,t){return(e.ownerDocument||e)!==Wr&&jr(e),Yr(e,t)},Oo.attr=function(e,t){(e.ownerDocument||e)!==Wr&&jr(e);var n=Mr.attrHandle[t.toLowerCase()];n=n&&io.call(Mr.attrHandle,t.toLowerCase())?n(e,t,!$r):void 0;return void 0!==n?n:Br.attributes||!$r?e.getAttribute(t):(n=e.getAttributeNode(t))&&n.specified?n.value:null},Oo.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},Oo.uniqueSort=function(e){var t,n=[],r=0,o=0;if(Ur=!Br.detectDuplicates,Vr=!Br.sortStable&&e.slice(0),e.sort(ro),Ur){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return Vr=null,e},Pr=Oo.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+=Pr(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=Pr(t);return n},(Mr=Oo.selectors={cacheLength:50,createPseudo:Ao,match:yo,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(Eo,_r),e[3]=(e[3]||e[4]||e[5]||"").replace(Eo,_r),"~="===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]||Oo.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]&&Oo.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return yo.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&vo.test(n)&&(t=Ir(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(Eo,_r).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=eo[e+" "];return t||(t=new RegExp("(^|"+fo+")"+e+"("+fo+"|$)"))&&eo(e,(function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==oo&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){return r=Oo.attr(r,e),null==r?"!="===t:!t||(r+="","="===t?r===n:"!="===t?r!==n:"^="===t?n&&0===r.indexOf(n):"*="===t?n&&-1<r.indexOf(n):"$="===t?n&&r.slice(-n.length)===n:"~="===t?-1<(" "+r+" ").indexOf(n):"|="===t&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,o){var i="nth"!==e.slice(0,3),a="last"!==e.slice(-4),u="of-type"===t;return 1===r&&0===o?function(e){return!!e.parentNode}:function(t,n,c){var s,l,f,d,m,g,h=i!=a?"nextSibling":"previousSibling",p=t.parentNode,v=u&&t.nodeName.toLowerCase(),b=!c&&!u;if(p){if(i){for(;h;){for(f=t;f=f[h];)if(u?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;g=h="only"===e&&!g&&"nextSibling"}return!0}if(g=[a?p.firstChild:p.lastChild],a&&b){for(m=(s=(l=p[Kr]||(p[Kr]={}))[e]||[])[0]===Zr&&s[1],d=s[0]===Zr&&s[2],f=m&&p.childNodes[m];f=++m&&f&&f[h]||(d=m=0)||g.pop();)if(1===f.nodeType&&++d&&f===t){l[e]=[Zr,m,d];break}}else if(b&&(s=(t[Kr]||(t[Kr]={}))[e])&&s[0]===Zr)d=s[1];else for(;(f=++m&&f&&f[h]||(d=m=0)||g.pop())&&((u?f.nodeName.toLowerCase()!==v:1!==f.nodeType)||!++d||(b&&((f[Kr]||(f[Kr]={}))[e]=[Zr,d]),f!==t)););return(d-=o)===r||d%r==0&&0<=d/r}}},PSEUDO:function(e,t){var n,r=Mr.pseudos[e]||Mr.setFilters[e.toLowerCase()]||Oo.error("unsupported pseudo: "+e);return r[Kr]?r(t):1<r.length?(n=[e,e,"",t],Mr.setFilters.hasOwnProperty(e.toLowerCase())?Ao((function(e,n){for(var o,i=r(e,t),a=i.length;a--;)e[o=lo.call(e,i[a])]=!(n[o]=i[a])})):function(e){return r(e,0,n)}):r}},pseudos:{not:Ao((function(e){var t=[],n=[],r=Lr(e.replace(mo,"$1"));return r[Kr]?Ao((function(e,t,n,o){for(var i,a=r(e,null,o,[]),u=e.length;u--;)(i=a[u])&&(e[u]=!(t[u]=i))})):function(e,o,i){return t[0]=e,r(t,null,i,n),!n.pop()}})),has:Ao((function(e){return function(t){return 0<Oo(e,t).length}})),contains:Ao((function(e){return e=e.replace(Eo,_r),function(t){return-1<(t.textContent||t.innerText||Pr(t)).indexOf(e)}})),lang:Ao((function(e){return bo.test(e||"")||Oo.error("unsupported lang: "+e),e=e.replace(Eo,_r).toLowerCase(),function(t){var n;do{if(n=$r?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(e){var t=n.window.location&&n.window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===qr},focus:function(e){return e===Wr.activeElement&&(!Wr.hasFocus||Wr.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!Mr.pseudos.empty(e)},header:function(e){return xo.test(e.nodeName)},input:function(e){return wo.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(e=e.getAttribute("type"))||"text"===e.toLowerCase())},first:_o((function(){return[0]})),last:_o((function(e,t){return[t-1]})),eq:_o((function(e,t,n){return[n<0?n+t:n]})),even:_o((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:_o((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:_o((function(e,t,n){for(var r=n<0?n+t:n;0<=--r;)e.push(r);return e})),gt:_o((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}}).pseudos.nth=Mr.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})Mr.pseudos[Rr]=function(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}(Rr);for(Rr in{submit:!0,reset:!0})Mr.pseudos[Rr]=function(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}(Rr);function Bo(){}function Mo(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function Po(e,t,n){var r=t.dir,o=n&&"parentNode"===r,i=Qr++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,a){var u,c,s=[Zr,i];if(a){for(;t=t[r];)if((1===t.nodeType||o)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||o){if((u=(c=t[Kr]||(t[Kr]={}))[r])&&u[0]===Zr&&u[1]===i)return s[2]=u[2];if((c[r]=s)[2]=e(t,n,a))return!0}}}function zo(e){return 1<e.length?function(t,n,r){for(var o=e.length;o--;)if(!e[o](t,n,r))return!1;return!0}:e[0]}function Io(e,t,n,r,o){for(var i,a=[],u=0,c=e.length,s=null!=t;u<c;u++)!(i=e[u])||n&&!n(i,r,o)||(a.push(i),s&&t.push(u));return a}function Lo(e,t,n,r,o,i){return r&&!r[Kr]&&(r=Lo(r)),o&&!o[Kr]&&(o=Lo(o,i)),Ao((function(i,a,u,c){var s,l,f,d=[],m=[],g=a.length,h=i||function(e,t,n){for(var r=0,o=t.length;r<o;r++)Oo(e,t[r],n);return n}(t||"*",u.nodeType?[u]:u,[]),p=!e||!i&&t?h:Io(h,d,e,u,c),v=n?o||(i?e:g||r)?[]:a:p;if(n&&n(p,v,u,c),r)for(s=Io(v,m),r(s,[],u,c),l=s.length;l--;)(f=s[l])&&(v[m[l]]=!(p[m[l]]=f));if(i){if(o||e){if(o){for(s=[],l=v.length;l--;)(f=v[l])&&s.push(p[l]=f);o(null,v=[],s,c)}for(l=v.length;l--;)(f=v[l])&&-1<(s=o?lo.call(i,f):d[l])&&(i[s]=!(a[s]=f))}}else v=Io(v===a?v.splice(g,v.length):v),o?o(null,a,v,c):co.apply(a,v)}))}function Fo(e,t){function n(n,i,a,u,c){var s,l,f,d=0,m="0",g=n&&[],h=[],p=Hr,v=n||o&&Mr.find.TAG("*",c),b=Zr+=null==p?1:Math.random()||.1,y=v.length;for(c&&(Hr=i!==Wr&&i);m!==y&&null!=(s=v[m]);m++){if(o&&s){for(l=0;f=e[l++];)if(f(s,i,a)){u.push(s);break}c&&(Zr=b)}r&&((s=!f&&s)&&d--,n&&g.push(s))}if(d+=m,r&&m!==d){for(l=0;f=t[l++];)f(g,h,i,a);if(n){if(0<d)for(;m--;)g[m]||h[m]||(h[m]=ao.call(u));h=Io(h)}co.apply(u,h),c&&!n&&0<h.length&&1<d+t.length&&Oo.uniqueSort(u)}return c&&(Zr=b,Hr=p),g}var r=0<t.length,o=0<e.length;return r?Ao(n):n}function Ho(e){return void 0!==e}function Vo(e){return"string"==typeof e}function Uo(e,t){var n,r=(t=t||ei).createElement("div"),o=t.createDocumentFragment();for(r.innerHTML=e;n=r.firstChild;)o.appendChild(n);return o}function jo(e,t,n,r){var o;if(Vo(t))t=Uo(t,Ko(e[0]));else if(t.length&&!t.nodeType){if(t=mi.makeArray(t),r)for(o=t.length-1;0<=o;o--)jo(e,t[o],n,r);else for(o=0;o<t.length;o++)jo(e,t[o],n,r);return e}if(t.nodeType)for(o=e.length;o--;)n.call(e[o],t);return e}function Wo(e,t){return e&&t&&-1!==(" "+e.className+" ").indexOf(" "+t+" ")}function qo(e,t,n){var r,o;return t=mi(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 $o(e,t){return new mi.fn.init(e,t)}function Go(e){return null==e?"":(""+e).replace(di,"")}function Xo(e,t){var n,r,o,i;if(e)if(void 0===(n=e.length)){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 Yo(e,t){var n=[];return Xo(e,(function(e,r){t(r,e)&&n.push(r)})),n}function Ko(e){return e?9===e.nodeType?e:e.ownerDocument:ei}function Jo(e,t,n){var r=[],o=e[t];for("string"!=typeof n&&n instanceof mi&&(n=n[0]);o&&9!==o.nodeType;){if(void 0!==n){if(o===n)break;if("string"==typeof n&&mi(o).is(n))break}1===o.nodeType&&r.push(o),o=o[t]}return r}function Zo(e,t,n,r){var o=[];for(r instanceof mi&&(r=r[0]);e;e=e[t])if(!n||e.nodeType===n){if(void 0!==r){if(e===r)break;if("string"==typeof r&&mi(e).is(r))break}o.push(e)}return o}function Qo(e,t,n){for(e=e[t];e;e=e[t])if(e.nodeType===n)return e;return null}Bo.prototype=Mr.filters=Mr.pseudos,Mr.setFilters=new Bo,Ir=Oo.tokenize=function(e,t){var n,r,o,i,a,u,c,s=to[e+" "];if(s)return t?0:s.slice(0);for(a=e,u=[],c=Mr.preFilter;a;){for(i in n&&!(r=go.exec(a))||(r&&(a=a.slice(r[0].length)||a),u.push(o=[])),n=!1,(r=ho.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(mo," ")}),a=a.slice(n.length)),Mr.filter)!Mr.filter.hasOwnProperty(i)||!(r=yo[i].exec(a))||c[i]&&!(r=c[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?Oo.error(e):to(e,u).slice(0)},Lr=Oo.compile=function(e,t){var n,r=[],o=[],i=no[e+" "];if(!i){for(n=(t=t||Ir(e)).length;n--;)((i=function e(t){for(var n,r,o,i=t.length,a=Mr.relative[t[0].type],u=a||Mr.relative[" "],c=a?1:0,s=Po((function(e){return e===n}),u,!0),l=Po((function(e){return-1<lo.call(n,e)}),u,!0),f=[function(e,t,r){return!a&&(r||t!==Hr)||((n=t).nodeType?s:l)(e,t,r)}];c<i;c++)if(r=Mr.relative[t[c].type])f=[Po(zo(f),r)];else{if((r=Mr.filter[t[c].type].apply(null,t[c].matches))[Kr]){for(o=++c;o<i&&!Mr.relative[t[o].type];o++);return Lo(1<c&&zo(f),1<c&&Mo(t.slice(0,c-1).concat({value:" "===t[c-2].type?"*":""})).replace(mo,"$1"),r,c<o&&e(t.slice(c,o)),o<i&&e(t=t.slice(o)),o<i&&Mo(t))}f.push(r)}return zo(f)}(t[n]))[Kr]?r:o).push(i);(i=no(e,Fo(o,r))).selector=e}return i},Fr=Oo.select=function(e,t,n,r){var o,i,a,u,c,s="function"==typeof e&&e,l=!r&&Ir(e=s.selector||e);if(n=n||[],1===l.length){if(2<(i=l[0]=l[0].slice(0)).length&&"ID"===(a=i[0]).type&&Br.getById&&9===t.nodeType&&$r&&Mr.relative[i[1].type]){if(!(t=(Mr.find.ID(a.matches[0].replace(Eo,_r),t)||[])[0]))return n;s&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(o=yo.needsContext.test(e)?0:i.length;o--&&(a=i[o],!Mr.relative[u=a.type]);)if((c=Mr.find[u])&&(r=c(a.matches[0].replace(Eo,_r),ko.test(i[0].type)&&Ro(t.parentNode)||t))){if(i.splice(o,1),e=r.length&&Mo(i))break;return co.apply(n,r),n}}return(s||Lr(e,l))(r,t,!$r,n,ko.test(e)&&Ro(t.parentNode)||t),n},Br.sortStable=Kr.split("").sort(ro).join("")===Kr,Br.detectDuplicates=!!Ur,jr(),Br.sortDetached=!0;var ei=n.document,ti=Array.prototype.push,ni=Array.prototype.slice,ri=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,oi=Ar.Event,ii=_n.makeMap("children,contents,next,prev"),ai=_n.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),ui=_n.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),ci={for:"htmlFor",class:"className",readonly:"readOnly"},si={float:"cssFloat"},li={},fi={},di=/^\s*|\s*$/g,mi=($o.fn=$o.prototype={constructor:$o,selector:"",context:null,length:0,init:function(e,t){var r,o,i=this;if(!e)return i;if(e.nodeType)return i.context=i[0]=e,i.length=1,i;if(t&&t.nodeType)i.context=t;else{if(t)return mi(e).attr(t);i.context=t=n.document}if(Vo(e)){if(!(r="<"===(i.selector=e).charAt(0)&&">"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:ri.exec(e)))return mi(t).find(e);if(r[1])for(o=Uo(e,Ko(t)).firstChild;o;)ti.call(i,o),o=o.nextSibling;else{if(!(o=Ko(t).getElementById(r[2])))return i;if(o.id!==r[2])return i.find(e);i.length=1,i[0]=o}}else this.add(e,!1);return i},toArray:function(){return _n.toArray(this)},add:function(e,t){var n,r;if(Vo(e))return this.add(mi(e));if(!1!==t)for(n=mi.unique(this.toArray().concat(mi.makeArray(e))),this.length=n.length,r=0;r<n.length;r++)this[r]=n[r];else ti.apply(this,mi.makeArray(e));return this},attr:function(e,t){var n,r=this;if("object"==typeof e)Xo(e,(function(e,t){r.attr(e,t)}));else{if(!Ho(t)){if(r[0]&&1===r[0].nodeType){if((n=li[e])&&n.get)return n.get(r[0],e);if(ui[e])return r.prop(e)?e:void 0;null===(t=r[0].getAttribute(e,2))&&(t=void 0)}return t}this.each((function(){var n;1===this.nodeType&&((n=li[e])&&n.set?n.set(this,t):null===t?this.removeAttribute(e,2):this.setAttribute(e,t,2))}))}return r},removeAttr:function(e){return this.attr(e,null)},prop:function(e,t){var n=this;if("object"==typeof(e=ci[e]||e))Xo(e,(function(e,t){n.prop(e,t)}));else{if(!Ho(t))return n[0]&&n[0].nodeType&&e in n[0]?n[0][e]:t;this.each((function(){1===this.nodeType&&(this[e]=t)}))}return n},css:function(e,t){function n(e){return e.replace(/-(\D)/g,(function(e,t){return t.toUpperCase()}))}function r(e){return e.replace(/[A-Z]/g,(function(e){return"-"+e}))}var o,i,a=this;if("object"==typeof e)Xo(e,(function(e,t){a.css(e,t)}));else if(Ho(t))e=n(e),"number"!=typeof t||ai[e]||(t=t.toString()+"px"),a.each((function(){var n=this.style;if((i=fi[e])&&i.set)i.set(this,t);else{try{this.style[si[e]||e]=t}catch(n){}null!==t&&""!==t||(n.removeProperty?n.removeProperty(r(e)):n.removeAttribute(e))}}));else{if(o=a[0],(i=fi[e])&&i.get)return i.get(o);if(!o.ownerDocument.defaultView)return o.currentStyle?o.currentStyle[n(e)]:"";try{return o.ownerDocument.defaultView.getComputedStyle(o,null).getPropertyValue(r(e))}catch(n){return}}return a},remove:function(){for(var e,t=this.length;t--;)e=this[t],oi.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;if(Ho(e)){t=this.length;try{for(;t--;)this[t].innerHTML=e}catch(Pe){mi(this[t]).empty().append(e)}return this}return this[0]?this[0].innerHTML:""},text:function(e){var t;if(Ho(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 jo(this,arguments,(function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.appendChild(e)}))},prepend:function(){return jo(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?jo(this,arguments,(function(e){this.parentNode.insertBefore(e,this)})):this},after:function(){return this[0]&&this[0].parentNode?jo(this,arguments,(function(e){this.parentNode.insertBefore(e,this.nextSibling)}),!0):this},appendTo:function(e){return mi(e).append(this),this},prependTo:function(e){return mi(e).prepend(this),this},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){return qo(this,e)},wrapAll:function(e){return qo(this,e,!0)},wrapInner:function(e){return this.each((function(){mi(this).contents().wrapAll(e)})),this},unwrap:function(){return this.parent().each((function(){mi(this).replaceWith(this.childNodes)}))},clone:function(){var e=[];return this.each((function(){e.push(this.cloneNode(!0))})),mi(e)},addClass:function(e){return this.toggleClass(e,!0)},removeClass:function(e){return this.toggleClass(e,!1)},toggleClass:function(e,t){var n=this;return"string"!=typeof e||(-1!==e.indexOf(" ")?Xo(e.split(" "),(function(){n.toggleClass(this,t)})):n.each((function(n,r){var o,i=Wo(r,e);i!==t&&(o=r.className,i?r.className=Go((" "+o+" ").replace(" "+e+" "," ")):r.className+=o?" "+e:e)}))),n},hasClass:function(e){return Wo(this[0],e)},each:function(e){return Xo(this,e)},on:function(e,t){return this.each((function(){oi.bind(this,e,t)}))},off:function(e,t){return this.each((function(){oi.unbind(this,e,t)}))},trigger:function(e){return this.each((function(){"object"==typeof e?oi.fire(this,e.type,e):oi.fire(this,e)}))},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return new mi(ni.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){for(var t=[],n=0,r=this.length;n<r;n++)mi.find(e,this[n],t);return mi(t)},filter:function(e){return mi("function"==typeof e?Yo(this.toArray(),(function(t,n){return e(n,t)})):mi.filter(e,this.toArray()))},closest:function(e){var t=[];return e instanceof mi&&(e=e[0]),this.each((function(n,r){for(;r;){if("string"==typeof e&&mi(r).is(e)){t.push(r);break}if(r===e){t.push(r);break}r=r.parentNode}})),mi(t)},offset:function(e){var t,n,r=0,o=0;return e?this.css(e):((e=this[0])&&(n=(t=e.ownerDocument).documentElement,e.getBoundingClientRect&&(r=(e=e.getBoundingClientRect()).left+(n.scrollLeft||t.body.scrollLeft)-n.clientLeft,o=e.top+(n.scrollTop||t.body.scrollTop)-n.clientTop)),{left:r,top:o})},push:ti,sort:Array.prototype.sort,splice:Array.prototype.splice},_n.extend($o,{extend:_n.extend,makeArray:function(e){return(t=e)&&t===t.window||e.nodeType?[e]:_n.toArray(e);var t},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:_n.isArray,each:Xo,trim:Go,grep:Yo,find:Oo,expr:Oo.selectors,unique:Oo.uniqueSort,text:Oo.getText,contains:Oo.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 1===t.length?mi.find.matchesSelector(t[0],e)?[t[0]]:[]:mi.find.matches(e,t)}}),Xo({parent:function(e){return e=e.parentNode,e&&11!==e.nodeType?e:null},parents:function(e){return Jo(e,"parentNode")},next:function(e){return Qo(e,"nextSibling",1)},prev:function(e){return Qo(e,"previousSibling",1)},children:function(e){return Zo(e.firstChild,"nextSibling",1)},contents:function(e){return _n.toArray(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},(function(e,t){$o.fn[e]=function(n){var r=[],o=(this.each((function(){var e=t.call(r,this,n,r);e&&(mi.isArray(e)?r.push.apply(r,e):r.push(e))})),1<this.length&&(ii[e]||(r=mi.unique(r)),0===e.indexOf("parents")&&(r=r.reverse())),mi(r));return n?o.filter(n):o}})),Xo({parentsUntil:function(e,t){return Jo(e,"parentNode",t)},nextUntil:function(e,t){return Zo(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return Zo(e,"previousSibling",1,t).slice(1)}},(function(e,t){$o.fn[e]=function(n,r){var o=[],i=(this.each((function(){var e=t.call(o,this,n,o);e&&(mi.isArray(e)?o.push.apply(o,e):o.push(e))})),1<this.length&&(o=mi.unique(o),0!==e.indexOf("parents")&&"prevUntil"!==e||(o=o.reverse())),mi(o));return r?i.filter(r):i}})),$o.fn.is=function(e){return!!e&&0<this.filter(e).length},$o.fn.init.prototype=$o.fn,$o.overrideDefaults=function(e){function t(r,o){return n=n||e(),0===arguments.length&&(r=n.element),o=o||n.context,new t.fn.init(r,o)}var n;return mi.extend(t,this),t},$o.attrHooks=li,$o.cssHooks=fi,$o),gi=(hi.prototype.current=function(){return this.node},hi.prototype.next=function(e){return this.node=this.findSibling(this.node,"firstChild","nextSibling",e),this.node},hi.prototype.prev=function(e){return this.node=this.findSibling(this.node,"lastChild","previousSibling",e),this.node},hi.prototype.prev2=function(e){return this.node=this.findPreviousNode(this.node,"lastChild","previousSibling",e),this.node},hi.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}}},hi.prototype.findPreviousNode=function(e,t,n,r){var o;if(e&&(n=e[n],!this.rootNode||n!==this.rootNode)){if(n){if(!r)for(o=n[t];o;o=o[t])if(!o[t])return o;return n}return(r=e.parentNode)&&r!==this.rootNode?r:void 0}},hi);function hi(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 pi(e,t){return{left:i(e),top:i(t),translate:function(n,r){return pi(e+n,t+r)}}}function vi(e,t){return void 0!==e?e:void 0!==t?t:0}function bi(e){var t=e.dom(),n=t.ownerDocument.body;return n===t?Ri(n.offsetLeft,n.offsetTop):At(e)?Bi(t):Ri(0,0)}function yi(e,t,r){(void 0!==r?r.dom():n.document).defaultView.scrollTo(e,t)}function wi(e,t){Mi&&O(e.dom().scrollIntoViewIfNeeded)?e.dom().scrollIntoViewIfNeeded(!1):e.dom().scrollIntoView(t)}function xi(e){var t,r=(e=void 0===e?n.window:e).visualViewport;return void 0!==r?zi(r.pageLeft,r.pageTop,r.width,r.height):(r=yt.fromDom(e.document),e=e.document.documentElement,r=Pi(r),t=e.clientWidth,e=e.clientHeight,zi(r.left(),r.top(),t,e))}function Ci(e,t){var n=t.attr("style");e=(e=e.serialize(e.parse(n),t[0].nodeName))||null;t.attr("data-mce-style",e)}function Si(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}var ki=function(e,t){Wt(e).each((function(n){n.dom().insertBefore(t.dom(),e.dom())}))},Ti=function(e,t){$t(e).fold((function(){Wt(e).each((function(e){Oi(e,t)}))}),(function(e){ki(e,t)}))},Ei=function(e,t){ye(e).fold((function(){Oi(e,t)}),(function(n){e.dom().insertBefore(t.dom(),n.dom())}))},Oi=function(e,t){e.dom().appendChild(t.dom())},Ni=function(e,t){P(t,(function(t){Oi(e,t)}))},Ai=function(e){e.dom().textContent="",P(Yt(e),(function(e){Di(e)}))},Di=function(e){e=e.dom(),null!==e.parentNode&&e.parentNode.removeChild(e)},_i=function(e){var t,n=Yt(e);0<n.length&&(t=e,P(n,(function(e){ki(t,e)}))),Di(e)},Ri=pi,Bi=function(e){return e=e.getBoundingClientRect(),Ri(e.left,e.top)},Mi=bt().browser.isSafari(),Pi=function(e){e=void 0!==e?e.dom():n.document;var t=e.body.scrollLeft||e.documentElement.scrollLeft;e=e.body.scrollTop||e.documentElement.scrollTop;return Ri(t,e)},zi=function(e,t,n,r){return{x:i(e),y:i(t),width:i(n),height:i(r),right:i(e+n),bottom:i(t+r)}},Ii=_n.each,Li=_n.grep,Fi=On.ie,Hi=/^([a-z0-9],?)+$/i,Vi=/^[ \t\r\n]*$/;function Ui(e,t){var r,o,i,a,u,c=this,s=(void 0===t&&(t={}),{}),l=n.window,f={},d=0,m=Rn(e,{contentCssCors:t.contentCssCors,referrerPolicy:t.referrerPolicy}),g=[],h=t.schema||br({}),p=kr({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema),v=t.ownEvents?new Ar:Ar.Event,b=h.getBlockElements(),y=mi.overrideDefaults((function(){return{context:e,element:X.getRoot()}})),w=function(t){var n;return t&&e&&"string"==typeof t?(n=e.getElementById(t))&&n.id!==t?e.getElementsByName(t)[1]:n:t},x=function(e){return"string"==typeof e&&(e=w(e)),y(e)},S=function(e,t,n){var o,i;e=x(e);return void 0===(i=e.length?(o=r[t])&&o.get?o.get(e,t):e.attr(t):i)?n||"":i},k=function(e){return e=w(e),e?e.attributes:[]},T=function(e,n,o){""===o&&(o=null);e=x(e);var i,a=e.attr(n);e.length&&((i=r[n])&&i.set?i.set(e,o,n):e.attr(n,o),a!==o&&t.onSetAttrib&&t.onSetAttrib({attrElm:e,attrName:n,attrValue:o}))},E=function(){return t.root_element||e.body},O=function(t,n){return Qt(e.body,w(t),n)},N=function(e,t,n){return e=x(e),n?e.css(t):("float"===(t=t.replace(/-(\D)/g,(function(e,t){return t.toUpperCase()})))&&(t=On.browser.isIE()?"styleFloat":"cssFloat"),e[0]&&e[0].style?e[0].style[t]:void 0)},A=function(e){var t,n;return e=w(e),t=N(e,"width"),n=N(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}},D=function(e,t){if(!e)return!1;if(!Array.isArray(e)){if("*"===t)return 1===e.nodeType;if(Hi.test(t)){for(var n=t.toLowerCase().split(/,/),r=e.nodeName.toLowerCase(),o=n.length-1;0<=o;o--)if(n[o]===r)return!0;return!1}if(e.nodeType&&1!==e.nodeType)return!1}return e=Array.isArray(e)?e:[e],0<Oo(t,e[0].ownerDocument||e[0],null,e).length},_=function(e,t,n,r){var o,i=[],a=w(e);for(r=void 0===r,n=n||("BODY"!==E().nodeName?E().parentNode:null),_n.is(t,"string")&&(t="*"===(o=t)?function(e){return 1===e.nodeType}:function(e){return D(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},R=function(e,t,n){var r=t;if(e)for("string"==typeof t&&(r=function(e){return D(e,t)}),e=e[n];e;e=e[n])if("function"==typeof r&&r(e))return e;return null},B=function(e,t,n){var r;e="string"==typeof e?w(e):e;return!!e&&(_n.isArray(e)&&(e.length||0===e.length)?(r=[],Ii(e,(function(e,o){e&&("string"==typeof e&&(e=w(e)),r.push(t.call(n,e,o)))})),r):t.call(n||c,e))},M=function(e,t){x(e).each((function(e,n){Ii(t,(function(e,t){T(n,t,e)}))}))},P=function(e,t){e=x(e),Fi?e.each((function(e,n){if(!1!==n.canHaveHTML){for(;n.firstChild;)n.removeChild(n.firstChild);try{n.innerHTML="<br>"+t,n.removeChild(n.firstChild)}catch(e){mi("<div></div>").html("<br>"+t).contents().slice(1).appendTo(n)}return t}})):e.html(t)},z=function(t,n,r,o,i){return B(t,(function(t){var a="string"==typeof n?e.createElement(n):n;return M(a,r),o&&("string"!=typeof o&&o.nodeType?a.appendChild(o):"string"==typeof o&&P(a,o)),i?a:t.appendChild(a)}))},I=function(t,n,r){return z(e.createElement(t),t,n,r,!0)},L=ur.decode,F=ur.encodeAllRaw,H=function(e,t){return e=x(e),(t?e.each((function(){for(var e;e=this.firstChild;)3===e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)})):e).remove(),1<e.length?e.toArray():e[0]},V=function(e,t,n){x(e).toggleClass(t,n).each((function(){""===this.className&&mi(this).attr("class",null)}))},U=function(e,t,n){return B(t,(function(t){return _n.is(t,"array")&&(e=e.cloneNode(!0)),n&&Ii(Li(t.childNodes),(function(t){e.appendChild(t)})),t.parentNode.replaceChild(e,t)}))},j=function(){return e.createRange()},W=function(n,r,o,i){if(_n.isArray(n)){for(var a=n.length,u=[];a--;)u[a]=W(n[a],r,o,i);return u}return!t.collect||n!==e&&n!==l||g.push([n,r,o,i]),v.bind(n,r,o,i||X)},q=function(t,n,r){if(_n.isArray(t)){for(var o=t.length,i=[];o--;)i[o]=q(t[o],n,r);return i}if(g&&(t===e||t===l))for(o=g.length;o--;){var a=g[o];t!==a[0]||n&&n!==a[1]||r&&r!==a[2]||v.unbind(a[0],a[1],a[2])}return v.unbind(t,n,r)},$=function(e){var t;return e&&Ue.isElement(e)?(t=e.getAttribute("data-mce-contenteditable"))&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null:null},X={doc:e,settings:t,win:l,files:f,stdMode:!0,boxModel:!0,styleSheetLoader:m,boundEvents:g,styles:p,schema:h,events:v,isBlock:function(e){if("string"==typeof e)return!!b[e];if(e){var t=e.nodeType;if(t)return!(1!==t||!b[e.nodeName])}return!1},$:y,$$:x,root:null,clone:function(t,n){return!Fi||1!==t.nodeType||n?t.cloneNode(n):n?null:(r=e.createElement(t.nodeName),Ii(k(t),(function(e){T(r,e.nodeName,S(t,e.nodeName))})),r);var r},getRoot:E,getViewPort:function(e){return e=xi(e),{x:e.x(),y:e.y(),w:e.width(),h:e.height()}},getRect:function(e){var t;return e=w(e),t=O(e),e=A(e),{x:t.x,y:t.y,w:e.w,h:e.h}},getSize:A,getParent:function(e,t,n){return e=_(e,t,n,!1),e&&0<e.length?e[0]:null},getParents:_,get:w,getNext:function(e,t){return R(e,t,"nextSibling")},getPrev:function(e,t){return R(e,t,"previousSibling")},select:function(n,r){return Oo(n,w(r)||t.root_element||e,[])},is:D,add:z,create:I,createHTML:function(e,t,n){var r,o="";for(r in o+="<"+e,t)t.hasOwnProperty(r)&&null!==t[r]&&void 0!==t[r]&&(o+=" "+r+'="'+F(t[r])+'"');return void 0!==n?o+">"+n+"</"+e+">":o+" />"},createFragment:function(t){var n,r=e.createElement("div"),o=e.createDocumentFragment();for(t&&(r.innerHTML=t);n=r.firstChild;)o.appendChild(n);return o},remove:H,setStyle:function(e,n,r){r=C(n)?x(e).css(n,r):x(e).css(n),t.update_styles&&Ci(p,r)},getStyle:N,setStyles:function(e,n){e=x(e).css(n),t.update_styles&&Ci(p,e)},removeAllAttribs:function(e){return B(e,(function(e){for(var t=e.attributes,n=t.length-1;0<=n;n--)e.removeAttributeNode(t.item(n))}))},setAttrib:T,setAttribs:M,getAttrib:S,getPos:O,parseStyle:function(e){return p.parse(e)},serializeStyle:function(e,t){return p.serialize(e,t)},addStyle:function(t){var r,o;if(X!==Ui.DOM&&e===n.document){if(s[t])return;s[t]=!0}(o=e.getElementById("mceDefaultStyles"))||((o=e.createElement("style")).id="mceDefaultStyles",o.type="text/css",(r=e.getElementsByTagName("head")[0]).firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o)),o.styleSheet?o.styleSheet.cssText+=t:o.appendChild(e.createTextNode(t))},loadCSS:function(r){var o;X!==Ui.DOM&&e===n.document?Ui.DOM.loadCSS(r):(r=r||"",o=e.getElementsByTagName("head")[0],Ii(r.split(","),(function(e){e=_n._addCacheSuffix(e),f[e]||(f[e]=!0,e=I("link",G(G({rel:"stylesheet",type:"text/css",href:e},t.contentCssCors?{crossOrigin:"anonymous"}:{}),t.referrerPolicy?{referrerPolicy:t.referrerPolicy}:{})),o.appendChild(e))})))},addClass:function(e,t){x(e).addClass(t)},removeClass:function(e,t){V(e,t,!1)},hasClass:function(e,t){return x(e).hasClass(t)},toggleClass:V,show:function(e){x(e).show()},hide:function(e){x(e).hide()},isHidden:function(e){return"none"===x(e).css("display")},uniqueId:function(e){return(e||"mce_")+d++},setHTML:P,getOuterHTML:function(e){return e="string"==typeof e?w(e):e,Ue.isElement(e)?e.outerHTML:mi("<div></div>").append(mi(e).clone()).html()},setOuterHTML:function(e,t){x(e).each((function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(e){}H(mi(this).html(t),!0)}))},decode:L,encode:F,insertAfter:function(e,t){var n=w(t);return B(e,(function(e){var t=n.parentNode,r=n.nextSibling;return r?t.insertBefore(e,r):t.appendChild(e),e}))},replace:U,rename:function(e,t){var n;return e.nodeName!==t.toUpperCase()&&(n=I(t),Ii(k(e),(function(t){T(n,t.nodeName,S(e,t.nodeName))})),U(n,e,!0)),n||e},findCommonAncestor:function(e,t){for(var n,r=e;r;){for(n=t;n&&r!==n;)n=n.parentNode;if(r===n)break;r=r.parentNode}return!r&&e.ownerDocument?e.ownerDocument.documentElement:r},toHex:function(e){return p.toHex(_n.trim(e))},run:B,getAttribs:k,isEmpty:function(e,t){var n,r,o,i,a=0;if(e=e.firstChild){var u=new gi(e,e.parentNode),c=h?h.getWhiteSpaceElements():{};t=t||(h?h.getNonEmptyElements():null);do{if(o=e.nodeType,Ue.isElement(e)){var s=e.getAttribute("data-mce-bogus");if(s){e=u.next("all"===s);continue}if(i=e.nodeName.toLowerCase(),t&&t[i]){if("br"!==i)return!1;a++,e=u.next();continue}for(n=(r=k(e)).length;n--;)if("name"===(i=r[n].nodeName)||"data-mce-bookmark"===i)return!1}if(8===o)return!1;if(3===o&&!Vi.test(e.nodeValue))return!1;if(3===o&&e.parentNode&&c[e.parentNode.nodeName]&&Vi.test(e.nodeValue))return!1;e=u.next()}while(e)}return a<=1},createRng:j,nodeIndex:Si,split:function(e,t,n){var r,o,i=j();if(e&&t)return i.setStart(e.parentNode,Si(e)),i.setEnd(t.parentNode,Si(t)),r=i.extractContents(),(i=j()).setStart(t.parentNode,Si(t)+1),i.setEnd(e.parentNode,Si(e)+1),i=i.extractContents(),(o=e.parentNode).insertBefore(Jn(X,r),e),n?o.insertBefore(n,e):o.insertBefore(t,e),o.insertBefore(Jn(X,i),e),H(e),n||t},bind:W,unbind:q,fire:function(e,t,n){return v.fire(e,t,n)},getContentEditable:$,getContentEditableParent:function(e){for(var t=E(),n=null;e&&e!==t&&null===(n=$(e));e=e.parentNode);return n},destroy:function(){if(g)for(var e=g.length;e--;){var t=g[e];v.unbind(t[0],t[1],t[2])}Oo.setDocument&&Oo.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 o=p,a=function(){return X},u=(i=t).keep_values,m={style:{set:function(e,t){null!==t&&"object"==typeof t?e.css(t):(u&&e.attr("data-mce-style",t),e.attr("style",t))},get:function(e){var t=e.attr("data-mce-style")||e.attr("style");return o.serialize(o.parse(t),e[0].nodeName)}}},u&&(m.href=m.src={set:function(e,t,n){i.url_converter&&(t=i.url_converter.call(i.url_converter_scope||a(),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)}}),r=m,X}(Me=Ui=Ui||{}).DOM=Me(n.document),Me.nodeIndex=Si;var ji=Ui,Wi=ji.DOM,qi=_n.each,$i=_n.grep,Gi=(Xi.prototype._setReferrerPolicy=function(e){this.settings.referrerPolicy=e},Xi.prototype.loadScript=function(e,t,r){var o=Wi,i=o.uniqueId(),a=n.document.createElement("script");a.id=i,a.type="text/javascript",a.src=_n._addCacheSuffix(e),this.settings.referrerPolicy&&o.setAttrib(a,"referrerpolicy",this.settings.referrerPolicy),a.onload=function(){o.remove(i),a&&(a.onreadystatechange=a.onload=a=null),t()},a.onerror=function(){O(r)?r():void 0!==n.console&&n.console.log&&n.console.log("Failed to load script: "+e)},(n.document.getElementsByTagName("head")[0]||n.document.body).appendChild(a)},Xi.prototype.isDone=function(e){return 2===this.states[e]},Xi.prototype.markDone=function(e){this.states[e]=2},Xi.prototype.add=function(e,t,n,r){void 0===this.states[e]&&(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}))},Xi.prototype.load=function(e,t,n,r){return this.add(e,t,n,r)},Xi.prototype.remove=function(e){delete this.states[e],delete this.scriptLoadedCallbacks[e]},Xi.prototype.loadQueue=function(e,t,n){this.loadScripts(this.queue,e,t,n)},Xi.prototype.loadScripts=function(e,t,n,r){var o,i=this,a=[],u=function(e,t){qi(i.scriptLoadedCallbacks[t],(function(t){O(t[e])&&t[e].call(t.scope)})),i.scriptLoadedCallbacks[t]=void 0};i.queueLoadedCallbacks.push({success:t,failure:r,scope:n||this}),(o=function(){var t=$i(e);e.length=0,qi(t,(function(e){2===i.states[e]?u("success",e):3===i.states[e]?u("failure",e):1!==i.states[e]&&(i.states[e]=1,i.loading++,i.loadScript(e,(function(){i.states[e]=2,i.loading--,u("success",e),o()}),(function(){i.states[e]=3,i.loading--,a.push(e),u("failure",e),o()})))})),i.loading||(t=i.queueLoadedCallbacks.slice(0),i.queueLoadedCallbacks.length=0,qi(t,(function(e){0===a.length?O(e.success)&&e.success.call(e.scope):O(e.failure)&&e.failure.call(e.scope,a)})))})()},Xi.ScriptLoader=new Xi,Xi);function Xi(e){void 0===e&&(e={}),this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=0,this.settings=e}var Yi={},Ki=je("en"),Ji={getData:function(){return Et(Yi,(function(e){return G({},e)}))},setCode:function(e){e&&Ki.set(e)},getCode:function(){return Ki.get()},add:function(e,t){var n,r=Yi[e];for(n in r||(Yi[e]=r={}),t)r[n.toLowerCase()]=t[n]},translate:function(e){function t(e){return O(e)?Object.prototype.toString.call(e):n(e)?"":""+e}function n(e){return""===e||null==e}function r(e){var n=(e=t(e)).toLowerCase();return Nt(u,n)?t(u[n]):e}function o(e){return e.replace(/{context:\w+}$/,"")}var i,a,u=Yi[Ki.get()]||{};return n(e)?"":S(a=e)&&Nt(a,"raw")?t(e.raw):k(a=e)&&1<a.length?(i=e.slice(1),o(r(e[0]).replace(/\{([0-9]+)\}/g,(function(e,n){return Nt(i,n)?t(i[n]):e})))):o(r(e))},isRtl:function(){return se(Yi,Ki.get()).bind((function(e){return se(e,"_dir")})).exists((function(e){return"rtl"===e}))},hasCode:function(e){return Nt(Yi,e)}},Zi=_n.each;function Qi(){function e(e,t,n,r){e=a(e),Zi(e,(function(e){e=u(t,e),c(e.resource,e,void 0,void 0)})),n&&(r?n.call(r):n.call(Gi))}var t=this,n=[],r={},o={},i=[],a=function(e){var t;return(t=o[e]?o[e].dependencies:t)||[]},u=function(e,t){return"object"==typeof t?t:"string"==typeof e?{prefix:"",resource:t,suffix:""}:{prefix:e.prefix,resource:t,suffix:e.suffix}},c=function(t,n,i,a,u){var c;r[t]||(0!==(c="string"==typeof n?n:n.prefix+n.resource+n.suffix).indexOf("/")&&-1===c.indexOf("://")&&(c=Qi.baseURL+"/"+c),r[t]=c.substring(0,c.lastIndexOf("/")),o[t]?e(t,n,i,a):Gi.ScriptLoader.add(c,(function(){return e(t,n,i,a)}),a,u))};return{items:n,urls:r,lookup:o,_listeners:i,get:function(e){if(o[e])return o[e].instance},dependencies:a,requireLangPack:function(e,t){var n=Ji.getCode();if(n&&!1!==Qi.languageLoad){if(t)if(-1!==(t=","+t+",").indexOf(","+n.substr(0,2)+","))n=n.substr(0,2);else if(-1===t.indexOf(","+n+","))return;Gi.ScriptLoader.add(r[e]+"/langs/"+n+".js")}},add:function(e,t,r){return n.push(t),o[e]={instance:t,dependencies:r},r=z(i,(function(t){return t.name===e})),i=r.fail,Zi(r.pass,(function(e){e.callback()})),t},remove:function(e){delete r[e],delete o[e]},createUrl:u,addComponents:function(e,n){var r=t.urls[e];Zi(n,(function(e){Gi.ScriptLoader.add(r+"/"+e)}))},load:c,waitFor:function(e,t){o.hasOwnProperty(e)?t():i.push({name:e,callback:t})}}}function ea(e,t){var r=null;return{cancel:function(){null!==r&&(n.clearTimeout(r),r=null)},throttle:function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];null===r&&(r=n.setTimeout((function(){e.apply(null,o),r=null}),t))}}}function ta(e,t){return void 0===(e=me(e,t))||""===e?[]:e.split(" ")}function na(e){return void 0!==e.dom().classList}function ra(e,t){var n="class";t=ta(e,n).concat([t]),Dt(e,n,t.join(" "))}function oa(e,t){var n,r;n=t,0<(r=I(ta(t=e,e="class"),(function(e){return e!==n}))).length?Dt(t,e,r.join(" ")):_t(t,e)}function ia(e,t){na(e)?e.dom().classList.add(t):ra(e,t)}function aa(e){0===(na(e)?e.dom().classList:ta(e,"class")).length&&_t(e,"class")}function ua(e,t){return na(e)&&e.dom().classList.contains(t)}(Ie=Qi=Qi||{}).PluginManager=Ie(),Ie.ThemeManager=Ie();var ca=Qi,sa=function(e,t){var n=[];return P(Yt(e),(function(e){n=(n=t(e)?n.concat([e]):n).concat(sa(e,t))})),n},la=function(e,t){return Ht(t,e)};function fa(e,t,n,r,o){return e(n,r)?x.some(n):O(o)&&o(n)?x.none():t(n,r,o)}function da(e,t,n){return Da(e,(function(e){return Ft(e,t)}),n)}function ma(e,t,n){return fa(Ft,da,e,t,n)}function ga(e,t){var r=be(e).dom(),o=yt.fromDom(r.createDocumentFragment());t=function(e,t){return t=(t||n.document).createElement("div"),t.innerHTML=e,Yt(yt.fromDom(t))}(t,r);Ni(o,t),Ai(e),Oi(e,o)}function ha(e){return Xa(e)&&(e=e.parentNode),Ga(e)&&e.hasAttribute("data-mce-caret")}function pa(e){var t=e.container();return!(!e||!Ue.isText(t))&&(t.data.charAt(e.offset())===$a.ZWSP||e.isAtStart()&&Ya(t.previousSibling))}function va(e){var t=e.container();return!(!e||!Ue.isText(t))&&(t.data.charAt(e.offset()-1)===$a.ZWSP||e.isAtEnd()&&Ya(t.nextSibling))}function ba(e,t,r){var o;return(e=t.ownerDocument.createElement(e)).setAttribute("data-mce-caret",r?"before":"after"),e.setAttribute("data-mce-bogus","all"),e.appendChild(((o=n.document.createElement("br")).setAttribute("data-mce-bogus","1"),o)),o=t.parentNode,r?o.insertBefore(e,t):t.nextSibling?o.insertBefore(e,t.nextSibling):o.appendChild(e),e}function ya(e){return!su(e)&&(iu(e)?!au(e.parentNode):uu(e)||ou(e)||cu(e)||fu(e))}function wa(e,t){return e=gu(e),t||(e.left=e.left+e.width),e.right=e.left,e.width=0,e}function xa(e,t,n){return 0<=e&&e<=Math.min(t.height,n.height)/2}function Ca(e,t){return e.bottom-e.height/2<t.top||!(e.top>t.bottom)&&xa(t.top-e.bottom,e,t)}function Sa(e,t){return e.top>t.bottom||!(e.bottom<t.top)&&xa(t.bottom-e.top,e,t)}function ka(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom}function Ta(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset===n+1?t.childNodes[n]:null}function Ea(e,t){return 1===e.nodeType&&e.hasChildNodes()&&(t>=e.childNodes.length&&(t=e.childNodes.length-1),e=e.childNodes[t]),e}function Oa(e){return e&&/[\r\n\t ]/.test(e)}function Na(e){function t(e){0===e.height||0<o.length&&hu(e,o[o.length-1])||o.push(e)}function n(e,n){var r=Du(e.ownerDocument);if(n<e.data.length){if(vu(e.data[n]))return;if(vu(e.data[n-1])&&(r.setStart(e,n),r.setEnd(e,n+1),!Ru(r)))return t(Iu(zu(r),!1))}0<n&&(r.setStart(e,n-1),r.setEnd(e,n),Ru(r)||t(Iu(zu(r),!1))),n<e.data.length&&(r.setStart(e,n),r.setEnd(e,n+1),Ru(r)||t(Iu(zu(r),!0)))}var r,o=[];if(Eu(e.container()))return n(e.container(),e.offset()),o;if(Cu(e.container()))if(e.isAtEnd())r=Au(e.container(),e.offset()),Eu(r)&&n(r,r.data.length),ku(r)&&!Ou(r)&&t(Iu(zu(r),!1));else{if(r=Au(e.container(),e.offset()),Eu(r)&&n(r,0),ku(r)&&e.isAtEnd())return t(Iu(zu(r),!1)),o;e=Au(e.container(),e.offset()-1),!ku(e)||Ou(e)||!Su(e)&&!Su(r)&&ku(r)||t(Iu(zu(e),!1)),ku(r)&&t(Iu(zu(r),!0))}return o}var Aa,Da=function(e,t,n){for(var r=e.dom(),o=O(n)?n:i(!1);r.parentNode;){r=r.parentNode;var a=yt.fromDom(r);if(t(a))return x.some(a);if(o(a))break}return x.none()},_a=function(e,t,n){return fa((function(e,t){return t(e)}),Da,e,t,n)},Ra=function(e,t){return e=void 0===e?n.document:e.dom(),ve(e)?x.none():x.from(e.querySelector(t)).map(yt.fromDom)},Ba=i("mce-annotation"),Ma=i("data-mce-annotation"),Pa=i("data-mce-annotation-uid"),za=function(e,t){function n(e,t){return function(e,t){return e=e.dom(),!(!e||!e.hasAttribute)&&e.hasAttribute(t)}(e,t)?x.some(me(e,t)):x.none()}var r=e.selection.getRng(),o=yt.fromDom(r.startContainer),i=yt.fromDom(e.getBody());t=t.fold((function(){return"."+Ba()}),(function(e){return"["+Ma()+'="'+e+'"]'})),r=Kt(o,r.startOffset).getOr(o),o=ma(r,t,(function(e){return Vt(e,i)}));return o.bind((function(t){return n(t,""+Pa()).bind((function(r){return n(t,""+Ma()).map((function(t){n=r,o=yt.fromDom(e.getBody());var n,o=la(o,"["+Pa()+'="'+n+'"]');return{uid:r,name:t,elements:o}}))}))}))},Ia=function(e,t){e=yt.fromDom(e.getBody()),e=la(e,"["+Ma()+'="'+t+'"]');var n={};return P(e,(function(e){var t=me(e,Pa()),r=n.hasOwnProperty(t)?n[t]:[];n[t]=r.concat([e])})),n},La=function(e,t){function r(e,t){c(e,(function(e){return t(e),e}))}var o,i,a,u=je({}),c=function(e,t){var n=u.get();t=t(n.hasOwnProperty(e)?n[e]:{listeners:[],previous:je(x.none())});n[e]=t,u.set(n)},s=(o=function(){var t=u.get();t=function(e,t){return e=A.call(e,0),e.sort(t),e}(St(t));P(t,(function(t){c(t,(function(n){var o=n.previous.get();return za(e,x.some(t)).fold((function(){var e;o.isSome()&&(r(e=t,(function(t){P(t.listeners,(function(t){return t(!1,e)}))})),n.previous.set(x.none()))}),(function(e){var t,i,a,u=e.uid,c=e.name;e=e.elements;o.is(u)||(i=u,a=e,r(t=c,(function(e){P(e.listeners,(function(e){return e(!0,t,{uid:i,nodes:M(a,(function(e){return e.dom()}))})}))})),n.previous.set(x.some(u)))})),{previous:n.previous,listeners:n.listeners}}))}))},i=30,a=null,{cancel:function(){null!==a&&(n.clearTimeout(a),a=null)},throttle:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];null!==a&&n.clearTimeout(a),a=n.setTimeout((function(){o.apply(null,e),a=null}),i)}});return e.on("remove",(function(){s.cancel()})),e.on("NodeChange",(function(){s.throttle()})),{addListener:function(e,t){c(e,(function(e){return{previous:e.previous,listeners:e.listeners.concat([t])}}))}}},Fa=function(e,t){e.on("init",(function(){e.serializer.addNodeFilter("span",(function(e){P(e,(function(e){x.from(e.attr(Ma())).bind(t.lookup).each((function(t){!1===t.persistent&&e.unwrap()}))}))}))}))},Ha=function(){var e={};return{register:function(t,n){e[t]={name:t,settings:n}},lookup:function(t){return e.hasOwnProperty(t)?x.from(e[t]).map((function(e){return e.settings})):x.none()}}},Va=0,Ua=function(e,t){return yt.fromDom(e.dom().cloneNode(t))},ja=function(e){return Ua(e,!1)},Wa=function(e){return Ua(e,!0)},qa="\ufeff",$a={isZwsp:function(e){return e===qa},ZWSP:qa,trim:function(e){return e.replace(new RegExp(qa,"g"),"")}},Ga=Ue.isElement,Xa=Ue.isText,Ya=function(e){return Xa(e)&&$a.isZwsp(e.data)},Ka=function(e){return ha(e)||Ya(e)},Ja=function(e){return e.firstChild!==e.lastChild||!Ue.isBr(e.firstChild)},Za=function(e){return Xa(e)&&e.data[0]===$a.ZWSP},Qa=function(e){return Xa(e)&&e.data[e.data.length-1]===$a.ZWSP},eu=function(e){e=e.getElementsByTagName("br"),e=e[e.length-1],Ue.isBogus(e)&&e.parentNode.removeChild(e)},tu=function(e){return e&&e.hasAttribute("data-mce-caret")?(eu(e),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("_moz_abspos"),e):null},nu=Ue.isContentEditableTrue,ru=Ue.isContentEditableFalse,ou=Ue.isBr,iu=Ue.isText,au=Ue.matchNodeNames(["script","style","textarea"]),uu=Ue.matchNodeNames(["img","input","textarea","hr","iframe","video","audio","object"]),cu=Ue.matchNodeNames(["table"]),su=Ka,lu=function(e){return Ue.isElement(e)&&"true"===e.getAttribute("unselectable")},fu=function(e){return!1===lu(e)&&ru(e)},du=function(e,t){return ya(e)&&function(e,t){for(e=e.parentNode;e&&e!==t;e=e.parentNode){if(fu(e))return!1;if(nu(e))return!0}return!0}(e,t)},mu=Math.round,gu=function(e){return e?{left:mu(e.left),top:mu(e.top),bottom:mu(e.bottom),right:mu(e.right),width:mu(e.width),height:mu(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}},hu=function(e,t){return e.left===t.left&&e.top===t.top&&e.bottom===t.bottom&&e.right===t.right},pu=new RegExp("[̀-ͯ҃-҇҈-҉֑-ֽֿׁ-ׂׄ-ׇׅؐ-ًؚ-ٰٟۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣣ-ंऺ़ु-ै्॑-ॗॢ-ॣঁ়াু-ৄ্ৗৢ-ৣਁ-ਂ਼ੁ-ੂੇ-ੈੋ-੍ੑੰ-ੱੵઁ-ં઼ુ-ૅે-ૈ્ૢ-ૣଁ଼ାିୁ-ୄ୍ୖୗୢ-ୣஂாீ்ௗఀా-ీె-ైొ-్ౕ-ౖౢ-ౣಁ಼ಿೂೆೌ-್ೕ-ೖೢ-ೣഁാു-ൄ്ൗൢ-ൣ්ාි-ුූෟัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-ཱ༹༙༵༷-ཾྀ-྄྆-྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္-်ွ-ှၘ-ၙၞ-ၠၱ-ၴႂႅ-ႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳ឴-឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧ-ᤨᤲ᤹-᤻ᨗ-ᨘᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽᪾ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀ-ᮁᮢ-ᮥᮨ-ᮩ᮫-ᮭ᯦ᯨ-ᯩᯭᯯ-ᯱᰬ-ᰳᰶ-᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸-᳹᷀-᷵᷼-᷿-⃐-⃜⃝-⃠⃡⃢-⃤⃥-⃰⳯-⵿⳱ⷠ-〪ⷿ-〭〮-゙〯-゚꙯꙰-꙲ꙴ-꙽ꚞ-ꚟ꛰-꛱ꠂ꠆ꠋꠥ-ꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꧥꨩ-ꨮꨱ-ꨲꨵ-ꨶꩃꩌꩼꪰꪲ-ꪴꪷ-ꪸꪾ-꪿꫁ꫬ-ꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-゙︯-゚]"),vu=function(e){return"string"==typeof e&&768<=e.charCodeAt(0)&&pu.test(e)},bu=function(e,t,n){return e.isSome()&&t.isSome()?x.some(n(e.getOrDie(),t.getOrDie())):x.none()},yu=function(e,t,n,r){return e.isSome()&&t.isSome()&&n.isSome()?x.some(r(e.getOrDie(),t.getOrDie(),n.getOrDie())):x.none()},wu=[].slice,xu=(He=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=wu.call(arguments);return function(e){for(var t=0;t<n.length;t++)if(!n[t](e))return!1;return!0}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=wu.call(arguments);return function(e){for(var t=0;t<n.length;t++)if(n[t](e))return!0;return!1}}),Cu=Ue.isElement,Su=(Fe=ya,Ue.matchStyleValues("display","block table")),ku=(Pe=Ue.matchStyleValues("float","left right"),He(Cu,Fe,c(Pe))),Tu=c(Ue.matchStyleValues("white-space","pre pre-line pre-wrap")),Eu=Ue.isText,Ou=Ue.isBr,Nu=ji.nodeIndex,Au=Ea,Du=function(e){return"createRange"in e?e.createRange():ji.DOM.createRng()},_u=function(e){return!!e.setStart&&!!e.setEnd},Ru=function(e){var t=e.startContainer,n=e.startOffset;return!!(Oa(e.toString())&&Tu(t.parentNode)&&Ue.isText(t)&&(e=t.data,Oa(e[n-1])||Oa(e[n+1])))},Bu=function(e){var t=e.ownerDocument,n=Du(t),r=(t=t.createTextNode(" "),e.parentNode);return r.insertBefore(t,e),n.setStart(t,0),n.setEnd(t,1),e=gu(n.getBoundingClientRect()),r.removeChild(t),e},Mu=function(e){var t=e.startContainer,n=e.endContainer,r=e.startOffset,o=e.endOffset;return t===n&&Ue.isText(n)&&0===r&&1===o?((t=e.cloneRange()).setEndAfter(n),zu(t)):null},Pu=function(e){return 0===e.left&&0===e.right&&0===e.top&&0===e.bottom},zu=function(e){var t=e.getClientRects();t=0<t.length?gu(t[0]):gu(e.getBoundingClientRect());return!_u(e)&&Ou(e)&&Pu(t)?Bu(e):Pu(t)&&_u(e)?Mu(e):t},Iu=function(e,t){return e=wa(e,t),e.width=1,e.right=e.left+1,e};function Lu(e,t,n){function r(){return n=n||Na(Lu(e,t))}return{container:i(e),offset:i(t),toRange:function(){var n=Du(e.ownerDocument);return n.setStart(e,t),n.setEnd(e,t),n},getClientRects:r,isVisible:function(){return 0<r().length},isAtStart:function(){return Eu(e),0===t},isAtEnd:function(){return Eu(e)?t>=e.data.length:t>=e.childNodes.length},isEqual:function(n){return n&&e===n.container()&&t===n.offset()},getNode:function(n){return Au(e,n?t-1:t)}}}function Fu(e){return e=e.parentNode,xc(e)?Fu(e):e}function Hu(e){return e?An.reduce(e.childNodes,(function(e,t){return xc(t)&&"BR"!==t.nodeName?e=e.concat(Hu(t)):e.push(t),e}),[]):[]}function Vu(e){return function(t){return e===t}}function Uu(e){var t,n=wc(e)?"text()":e.nodeName.toLowerCase();return n+"["+(t=Hu(Fu(n=e)),e=An.findIndex(t,Vu(n),n),t=t.slice(0,e+1),e=An.reduce(t,(function(e,n,r){return wc(n)&&wc(t[r-1])&&e++,e}),0),t=An.filter(t,Ue.matchNodeNames([n.nodeName])),An.findIndex(t,Vu(n),n)-e+"]")}function ju(e,t){Ue.isText(t)&&0===t.data.length&&e.remove(t)}function Wu(e,t,n,r,o){var i=r[o?"startContainer":"endContainer"],a=(r=r[o?"startOffset":"endOffset"],[]),u=(o=0,e.getRoot());for(Ue.isText(i)?a.push(n?function(e,t,n){for(var r=e(t.data.slice(0,n)).length,o=t.previousSibling;o&&Ue.isText(o);o=o.previousSibling)r+=e(o.data).length;return r}(t,i,r):r):(r>=(t=i.childNodes).length&&t.length&&(o=1,r=Math.max(0,t.length-1)),a.push(e.nodeIndex(t[r],n)+o));i&&i!==u;i=i.parentNode)a.push(e.nodeIndex(i,n));return a}function qu(e,t){var n,r=e[(o=t?"start":"end")+"Container"],o=e[o+"Offset"];Ue.isElement(r)&&"TR"===r.nodeName&&(r=(n=r.childNodes)[Math.min(t?o:o-1,n.length-1)])&&(o=t?0:r.childNodes.length,e["set"+(t?"Start":"End")](r,o))}function $u(e,t){return Ue.isElement(e)&&(e=Ea(e,t),Ec(e))?e:Ka(e)?(t=(e=Ue.isText(e)&&ha(e)?e.parentNode:e).previousSibling,Ec(t)?t:(t=e.nextSibling,Ec(t)?t:void 0)):void 0}function Gu(e,t,n){var r=n.getNode(),o=r?r.nodeName:null,i=n.getRng();return Ec(r)||"IMG"===o?{name:o,index:Nc(n.dom,o,r)}:(r=Dc(i))?{name:o=r.tagName,index:Nc(n.dom,o,r)}:Oc(e,n,t,i)}function Xu(e,t){var n=e.dom,r=e.getRng(),o=n.uniqueId(),i=e.isCollapsed(),a=e.getNode(),u=a.nodeName;return"IMG"===u?{name:u,index:Nc(n,u,a)}:(u=Ac(r.cloneRange()),i||(u.collapse(!1),a=_c(n,o+"_end",t),Tc(n,u,a)),(r=Ac(r)).collapse(!0),i=_c(n,o+"_start",t),Tc(n,r,i),e.moveToBookmark({id:o,keep:1}),{id:o})}function Yu(e,t){0===t.length?Lc(e):e.nodeValue=t}function Ku(e){var t=$a.trim(e);return{count:e.length-t.length,text:t}}function Ju(e){var t;zc(e)&&Ka(e)&&(Ja(e)?e.removeAttribute("data-mce-caret"):Lc(e)),Ic(e)&&(t=$a.trim(function(e){try{return e.nodeValue}catch(e){return""}}(e)),Yu(e,t))}function Zu(e,t,n){var r,o,i=wa(t.getBoundingClientRect(),n);e="BODY"===e.tagName?(o=e.ownerDocument.documentElement,r=e.scrollLeft||o.scrollLeft,e.scrollTop||o.scrollTop):(o=e.getBoundingClientRect(),r=e.scrollLeft-o.left,e.scrollTop-o.top);return i.left+=r,i.right+=r,i.top+=e,i.bottom+=e,i.width=1,0<(o=t.offsetWidth-t.clientWidth)&&(n&&(o*=-1),i.left+=o,i.right+=o),i}function Qu(){return jc.isIE()||jc.isEdge()||jc.isFirefox()}function ec(e,t){for(var n;n=e(t);)if(!Kc(n))return n;return null}function tc(e,t){var n=t.ownerDocument.createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n}function nc(e,t,n){for(var r,o,i,a=e?"previousSibling":"nextSibling";n&&n!==t;){if(r=n[a],Yc(r)&&(r=r[a]),Gc(r)){if(i=n,ns(r,o=t)===ns(i,o))return r;break}if(Zc(r))break;n=n.parentNode}return null}function rc(e,t,n){var r,o,i=u(nc,!0,t),a=(t=u(nc,!1,t),n.startContainer),c=n.startOffset;if(ha(a)){if("before"===(o=(a=Jc(a)?a:a.parentNode).getAttribute("data-mce-caret"))&&(r=a.nextSibling,$c(r)))return is(r);if("after"===o&&(r=a.previousSibling,$c(r)))return as(r)}if(!n.collapsed)return n;if(Ue.isText(a)){if(Yc(a)){if(1===e){if(r=t(a))return is(r);if(r=i(a))return as(r)}if(-1===e){if(r=i(a))return as(r);if(r=t(a))return is(r)}return n}if(Qa(a)&&c>=a.data.length-1)return 1===e&&(r=t(a))?is(r):n;if(Za(a)&&c<=1)return-1===e&&(r=i(a))?as(r):n;if(c===a.data.length)return(r=t(a))?is(r):n;if(0===c)return(r=i(a))?as(r):n}return n}function oc(e,t){return x.from(os(e?0:-1,t)).filter(Gc)}function ic(e,t,n){return Ns(e,t,n).bind((function(r){return rs(n,r,t)&&(o=n,i=r,e?!Es(o,i)&&!Os(o)&&Ts(o)&&ks(i):!Es(i,o)&&ks(o)&&Ts(i))?Ns(e,t,r):x.some(r);var o,i}))}function ac(e,t,n,r){return ic(e,t,n).bind((function(n){return r(n)?ac(e,t,n,r):x.some(n)}))}function uc(e,t){var n,r=e?t.firstChild:t.lastChild;return Ue.isText(r)?x.some(yc(r,e?0:r.data.length)):r?ya(r)?x.some(e?yc.before(r):(n=r,Ue.isBr(n)?yc.before(n):yc.after(n))):(n=t,t=r,t=(r=e)?yc.before(t):yc.after(t),Ns(r,n,t)):x.none()}function cc(e,t,n){return!(!1!==t.hasChildNodes()||!Pc(e,t))&&(e=n,t=(n=t).ownerDocument.createTextNode($a.ZWSP),n.appendChild(t),e.setStart(t,0),e.setEnd(t,0),!0)}function sc(e){return Ue.isText(e)&&0<e.data.length}function lc(e){return e&&/^(IMG)$/.test(e.nodeName)}function fc(e){return e&&3===e.nodeType&&/^([\t \r\n]+|)$/.test(e.nodeValue)}function dc(e,t,n){return"color"!==n&&"backgroundColor"!==n||(t=e.toHex(t)),"fontWeight"===n&&700===t&&(t="bold"),""+("fontFamily"===n?t.replace(/[\'\"]/g,"").replace(/,\s+/g,","):t)}function mc(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 gc(e,t,n,r,o,i){var a,u,c;if(3===n.nodeType){if(-1!==(u=Us(o,i,n,r)))return{container:n,offset:u};c=n}for(var s=new gi(n,e.getParent(n,e.isBlock)||t);a=s[o?"prev":"next"]();)if(3!==a.nodeType||zs(a.parentNode)){if(e.isBlock(a)||Ps.isEq(a,"BR"))break}else if(-1!==(u=Us(o,i,c=a)))return{container:a,offset:u};if(c)return{container:c,offset:r=o?0:c.length}}function hc(e,t,n,r,o){var i,a,u,c;for(3===r.nodeType&&0===r.nodeValue.length&&r[o]&&(r=r[o]),i=Is(e,r),a=0;a<i.length;a++)for(u=0;u<t.length;u++)if((!("collapsed"in(c=t[u]))||c.collapsed===n.collapsed)&&e.is(i[a],c.selector))return i[a];return r}function pc(e,t,n,r){var o,i,a=e.dom,u=a.getRoot();if((i=t[0].wrapper?i:a.getParent(n,t[0].block,u))||(o=a.getParent(n,"LI,TD,TH"),i=a.getParent(3===n.nodeType?n.parentNode:n,(function(t){return t!==u&&Fs(e,t)}),o)),!(i=i&&t[0].wrapper&&Is(a,i,"ul,ol").reverse()[0]||i))for(i=n;i[r]&&!a.isBlock(i[r])&&(i=i[r],!Ps.isEq(i,"br")););return i||n}function vc(e,t,n,r,o,i,a){var u,c,s=u=a?n:o,l=a?"previousSibling":"nextSibling",f=e.getRoot();if(3===s.nodeType&&!Ls(s)&&(a?0<r:i<s.nodeValue.length))return s;for(;;){if(!t[0].block_expand&&e.isBlock(u))return u;for(c=u[l];c;c=c[l])if(!zs(c)&&!Ls(c)&&!Vs(c))return u;if(u===f||u.parentNode===f){s=u;break}u=u.parentNode}return s}(Aa=Lu=Lu||{}).fromRangeStart=function(e){return Aa(e.startContainer,e.startOffset)},Aa.fromRangeEnd=function(e){return Aa(e.endContainer,e.endOffset)},Aa.after=function(e){return Aa(e.parentNode,Nu(e)+1)},Aa.before=function(e){return Aa(e.parentNode,Nu(e))},Aa.isAbove=function(e,t){return bu(w(t.getClientRects()),q(e.getClientRects()),Ca).getOr(!1)},Aa.isBelow=function(e,t){return bu(q(t.getClientRects()),w(e.getClientRects()),Sa).getOr(!1)},Aa.isAtStart=function(e){return!!e&&e.isAtStart()},Aa.isAtEnd=function(e){return!!e&&e.isAtEnd()},Aa.isTextPosition=function(e){return!!e&&Ue.isText(e.container())},Aa.isElementPosition=function(e){return!1===Aa.isTextPosition(e)};var bc,yc=Lu,wc=Ue.isText,xc=Ue.isBogus,Cc=ji.nodeIndex,Sc=function(e,t){var n,r,o=[],i=t.container();t=t.offset();return wc(i)?n=function(e,t){for(;(e=e.previousSibling)&&wc(e);)t+=e.data.length;return t}(i,t):(t>=(r=i.childNodes).length?(n="after",t=r.length-1):n="before",i=r[t]),o.push(Uu(i)),r=function(e,t,n){var r=[];for(t=t.parentNode;t!==e&&(!n||!n(t));t=t.parentNode)r.push(t);return r}(e,i),r=An.filter(r,c(Ue.isBogus)),(o=o.concat(An.map(r,Uu))).reverse().join("/")+","+n},kc=function(e,t){var n;if(!t)return null;if(t=(n=t.split(","))[0].split("/"),n=1<n.length?n[1]:"before",!(t=An.reduce(t,(function(e,t){return(t=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t))?("text()"===t[1]&&(t[1]="#text"),e=e,n=t[1],t=parseInt(t[2],10),r=Hu(e),r=An.filter(r,(function(e,t){return!wc(e)||!wc(r[t-1])})),(r=An.filter(r,Ue.matchNodeNames([n])))[t]):null;var n,r}),e)))return null;if(wc(t)){for(var r,o=t,i=parseInt(n,10),a=o,u=0;wc(a);){if(r=a.data.length,u<=i&&i<=u+r){o=a,i-=u;break}if(!wc(a.nextSibling)){o=a,i=r;break}u+=r,a=a.nextSibling}return wc(o)&&i>o.data.length&&(i=o.data.length),yc(o,i)}return n="after"===n?Cc(t)+1:Cc(t),yc(t.parentNode,n)},Tc=function(e,t,n){var r,o,i,a,u;Ue.isDocumentFragment(n)?(r=e,o=t,i=n,a=x.from(i.firstChild),u=x.from(i.lastChild),o.insertNode(i),a.each((function(e){return ju(r,e.previousSibling)})),u.each((function(e){return ju(r,e.nextSibling)}))):(o=e,i=n,t.insertNode(i),ju(o,i.previousSibling),ju(o,i.nextSibling))},Ec=Ue.isContentEditableFalse,Oc=function(e,t,n,r){var o=t.dom,i={};return i.start=Wu(o,e,n,r,!0),t.isCollapsed()||(i.end=Wu(o,e,n,r,!1)),i},Nc=function(e,t,n){var r=0;return _n.each(e.select(t),(function(e){if("all"!==e.getAttribute("data-mce-bogus"))return e!==n&&void r++})),r},Ac=function(e){return qu(e,!0),qu(e,!1),e},Dc=function(e){return $u(e.startContainer,e.startOffset)||$u(e.endContainer,e.endOffset)},_c=function(e,t,n){return t={"data-mce-type":"bookmark",id:t,style:"overflow:hidden;line-height:0px"},n?e.create("span",t,""):e.create("span",t)},Rc={getBookmark:function(e,t,n){return 2===t?Gu($a.trim,n,e):3===t?(r=(n=e).getRng(),{start:Sc(n.dom.getRoot(),yc.fromRangeStart(r)),end:Sc(n.dom.getRoot(),yc.fromRangeEnd(r))}):t?{rng:e.getRng()}:Xu(e,!1);var r},getUndoBookmark:u(Gu,a,!0),getPersistentBookmark:Xu},Bc="_mce_caret",Mc=function(e){return Ue.isElement(e)&&e.id===Bc},Pc=function(e,t){for(;t&&t!==e;){if(t.id===Bc)return t;t=t.parentNode}return null},zc=Ue.isElement,Ic=Ue.isText,Lc=function(e){var t=e.parentNode;t&&t.removeChild(e)},Fc=function(e,t){return Ju(e),t},Hc=function(e,t){var n=Ku(e.data.substr(0,t.offset())),r=Ku(e.data.substr(t.offset()));r=n.text+r.text;return 0<r.length?(Yu(e,r),yc(e,t.offset()-n.count)):t},Vc=function(e,t){var n=t.container(),r=function(e,t){return e=R(e,t),-1===e?x.none():x.some(e)}($(n.childNodes),e).map((function(e){return e<t.offset()?yc(n,t.offset()-1):t})).getOr(t);return Ju(e),r},Uc={removeAndReposition:function(e,t){return yc.isTextPosition(t)?(r=t,(Ic(n=e)&&r.container()===n?Hc:Fc)(n,r)):(n=e,((r=t).container()===n.parentNode?Vc:Fc)(n,r));var n,r},remove:Ju},jc=bt().browser,Wc=Ue.isContentEditableFalse,qc=function(e,t,n){function r(){for(var t,n,r,u=mi("*[contentEditable=false]",e),c=0;c<u.length;c++)n=(t=u[c]).previousSibling,Qa(n)&&(1===(r=n.data).length?n.parentNode.removeChild(n):n.deleteData(r.length-1,1)),n=t.nextSibling,Za(n)&&(1===(r=n.data).length?n.parentNode.removeChild(n):n.deleteData(0,1));i&&(Uc.remove(i),i=null),a.get().each((function(e){mi(e.caret).remove(),a.set(x.none())})),En.clearInterval(o)}var o,i,a=je(x.none());return{show:function(u,c){var s;if(r(),l=c,Ue.isElement(l)&&/^(TD|TH)$/i.test(l.tagName))return null;if(!t(c))return i=function(e,t){var n,r=e.ownerDocument.createTextNode($a.ZWSP),o=e.parentNode;if(t){if(n=e.previousSibling,Xa(n)){if(Ka(n))return n;if(Qa(n))return n.splitText(n.data.length-1)}o.insertBefore(r,e)}else{if(n=e.nextSibling,Xa(n)){if(Ka(n))return n;if(Za(n))return n.splitText(1),n}e.nextSibling?o.insertBefore(r,e.nextSibling):o.appendChild(r)}return r}(c,u),s=c.ownerDocument.createRange(),Wc(i.nextSibling)?(s.setStart(i,0),s.setEnd(i,0)):(s.setStart(i,1),s.setEnd(i,1)),s;i=ba("p",c,u),l=Zu(e,c,u),mi(i).css("top",l.top);var l=mi('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(l).appendTo(e)[0];return a.set(x.some({caret:l,element:c,before:u})),a.get().each((function(e){u&&mi(e.caret).addClass("mce-visual-caret-before")})),o=En.setInterval((function(){n()?mi("div.mce-visual-caret",e).toggleClass("mce-visual-caret-hidden"):mi("div.mce-visual-caret",e).addClass("mce-visual-caret-hidden")}),500),(s=c.ownerDocument.createRange()).setStart(i,0),s.setEnd(i,0),s},hide:r,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(){a.get().each((function(t){var n=Zu(e,t.element,t.before);mi(t.caret).css(G({},n))}))},destroy:function(){return En.clearInterval(o)}}},$c=function(e){return Wc(e)||Ue.isTable(e)&&Qu()},Gc=Ue.isContentEditableFalse,Xc=Ue.matchStyleValues("display","block table table-cell table-caption list-item"),Yc=Ka,Kc=ha,Jc=Ue.isElement,Zc=ya,Qc=function(e){return 0<e},es=function(e){return e<0},ts=function(e,t,n,r,o){var i=new gi(e,r);if(es(t)){if((Gc(e)||Kc(e))&&n(e=ec(i.prev,!0)))return e;for(;e=ec(i.prev,o);)if(n(e))return e}if(Qc(t)){if((Gc(e)||Kc(e))&&n(e=ec(i.next,!0)))return e;for(;e=ec(i.next,o);)if(n(e))return e}return null},ns=function(e,t){for(;e&&e!==t;){if(Xc(e))return e;e=e.parentNode}return null},rs=function(e,t,n){return ns(e.container(),n)===ns(t.container(),n)},os=function(e,t){var n;return t?(n=t.container(),t=t.offset(),Jc(n)?n.childNodes[t+e]:null):null},is=u(tc,!0),as=u(tc,!1),us=function(e,t,n){return t=rc(e,t,n),-1===e?Lu.fromRangeStart(t):Lu.fromRangeEnd(t)},cs=function(e){return x.from(e.getNode()).map(yt.fromDom)},ss=function(e,t){for(;t=e(t);)if(t.isVisible())return t;return t},ls=function(e,t){return t=rs(e,t),!(t||!Ue.isBr(e.getNode()))||t},fs=((Le=bc=bc||{})[Le.Backwards=-1]="Backwards",Le[Le.Forwards=1]="Forwards",Ue.isContentEditableFalse),ds=Ue.isText,ms=Ue.isElement,gs=Ue.isBr,hs=ya,ps=function(e){return uu(e)||!!fu(e=e)&&!0!==L($(e.getElementsByTagName("*")),(function(e,t){return e||nu(t)}),!1)},vs=du,bs=function(e,t){for(var n=[];e&&e!==t;)n.push(e),e=e.parentNode;return n},ys=function(e,t){return e.hasChildNodes()&&t<e.childNodes.length?e.childNodes[t]:null},ws=function(e,t){if(Qc(e)){if(hs(t.previousSibling)&&!ds(t.previousSibling))return yc.before(t);if(ds(t))return yc(t,0)}if(es(e)){if(hs(t.nextSibling)&&!ds(t.nextSibling))return yc.after(t);if(ds(t))return yc(t,t.data.length)}return!es(e)||gs(t)?yc.before(t):yc.after(t)},xs=function(e,t){var n=t.nextSibling;return n&&hs(n)?ds(n)?yc(n,0):yc.before(n):Cs(bc.Forwards,yc.after(t),e)},Cs=function(e,t,n){var r,o,a,u;if(!ms(n)||!t)return null;if(t.isEqual(yc.after(n))&&n.lastChild){if(u=yc.after(n.lastChild),es(e)&&hs(n.lastChild)&&ms(n.lastChild))return gs(n.lastChild)?yc.before(n.lastChild):u}else u=t;t=u.container();var c=u.offset();if(ds(t)){if(es(e)&&0<c)return yc(t,--c);if(Qc(e)&&c<t.length)return yc(t,++c);r=t}else{if(es(e)&&0<c&&(o=ys(t,c-1),hs(o)))return!ps(o)&&(a=ts(o,e,vs,o))?ds(a)?yc(a,a.data.length):yc.after(a):ds(o)?yc(o,o.data.length):yc.before(o);if(Qc(e)&&c<t.childNodes.length&&(o=ys(t,c),hs(o)))return gs(o)?xs(n,o):!ps(o)&&(a=ts(o,e,vs,o))?ds(a)?yc(a,0):yc.before(a):ds(o)?yc(o,0):yc.after(o);r=o||u.getNode()}return(Qc(e)&&u.isAtEnd()||es(e)&&u.isAtStart())&&(r=ts(r,e,i(!0),n,!0),vs(r,n))?ws(e,r):(o=ts(r,e,vs,n),!(c=An.last(I(bs(t,n),fs)))||o&&c.contains(o)?o?ws(e,o):null:Qc(e)?yc.after(c):yc.before(c))},Ss=function(e){return{next:function(t){return Cs(bc.Forwards,t,e)},prev:function(t){return Cs(bc.Backwards,t,e)}}},ks=function(e){return yc.isTextPosition(e)?0===e.offset():ya(e.getNode())},Ts=function(e){var t;return yc.isTextPosition(e)?(t=e.container(),e.offset()===t.data.length):ya(e.getNode(!0))},Es=function(e,t){return!yc.isTextPosition(e)&&!yc.isTextPosition(t)&&e.getNode()===t.getNode(!0)},Os=function(e){return!yc.isTextPosition(e)&&Ue.isBr(e.getNode())},Ns=function(e,t,n){return t=Ss(t),x.from(e?t.next(n):t.prev(n))},As=(Ve=u(Ns,!0),ze=u(Ns,!1),{fromPosition:Ns,nextPosition:Ve,prevPosition:ze,navigate:ic,navigateIgnore:ac,positionIn:uc,firstPositionIn:u(uc,!0),lastPositionIn:u(uc,!1)}),Ds=function(e,t){return Ue.isElement(t)&&e.isBlock(t)&&!t.innerHTML&&!On.ie&&(t.innerHTML='<br data-mce-bogus="1" />'),t},_s=function(e,t,n,r){var o,i,a,u=n[t?"start":"end"],c=e.getRoot();if(u){for(n=u[0],i=c,o=u.length-1;1<=o;o--){if(a=i.childNodes,cc(c,i,r))return!0;if(u[o]>a.length-1){if(cc(c,i,r))return!0;var s=i,l=r;return As.lastPositionIn(s).fold((function(){return!1}),(function(e){return l.setStart(e.container(),e.offset()),l.setEnd(e.container(),e.offset()),!0}))}i=a[u[o]]}3===i.nodeType&&(n=Math.min(u[0],i.nodeValue.length)),1===i.nodeType&&(n=Math.min(u[0],i.childNodes.length)),t?r.setStart(i,n):r.setEnd(i,n)}return!0},Rs=function(e,t,n){var r,o,i,a,u=e.get(n.id+"_"+t),c=n.keep;if(u){if(i=u.parentNode,r="start"===t?c?u.hasChildNodes()?(i=u.firstChild,1):sc(u.nextSibling)?(i=u.nextSibling,0):sc(u.previousSibling)?(i=u.previousSibling,u.previousSibling.data.length):(i=u.parentNode,e.nodeIndex(u)+1):e.nodeIndex(u):c?u.hasChildNodes()?(i=u.firstChild,1):sc(u.previousSibling)?(i=u.previousSibling,u.previousSibling.data.length):(i=u.parentNode,e.nodeIndex(u)):e.nodeIndex(u),i=i,a=r,!c){for(c=u.previousSibling,o=u.nextSibling,_n.each(_n.grep(u.childNodes),(function(e){Ue.isText(e)&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))}));u=e.get(n.id+"_"+t);)e.remove(u,!0);c&&o&&c.nodeType===o.nodeType&&Ue.isText(c)&&!On.opera&&(r=c.nodeValue.length,c.appendData(o.nodeValue),e.remove(o),i=c,a=r)}return x.some(yc(i,a))}return x.none()},Bs=function(e,t){var n,r,o,i,a,u,c;e=e.dom;if(t){if(_n.isArray(t.start))return u=t,c=(a=e).createRng(),_s(a,!0,u,c)&&_s(a,!1,u,c)?x.some(c):x.none();if("string"==typeof t.start)return x.some((a=t,c=(u=e).createRng(),i=kc(u.getRoot(),a.start),c.setStart(i.container(),i.offset()),i=kc(u.getRoot(),a.end),c.setEnd(i.container(),i.offset()),c));if(t.hasOwnProperty("id"))return o=Rs(r=e,"start",i=t),i=Rs(r,"end",i),bu(o,i.or(o),(function(e,t){var n=r.createRng();return n.setStart(Ds(r,e.container()),e.offset()),n.setEnd(Ds(r,t.container()),t.offset()),n}));if(t.hasOwnProperty("name"))return n=e,o=t,x.from(n.select(o.name)[o.index]).map((function(e){var t=n.createRng();return t.selectNode(e),t}));if(t.hasOwnProperty("rng"))return x.some(t.rng)}return x.none()},Ms={getBookmark:function(e,t,n){return Rc.getBookmark(e,t,n)},moveToBookmark:function(e,t){Bs(e,t).each((function(t){e.setRng(t)}))},isBookmarkNode:function(e){return Ue.isElement(e)&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")}},Ps={isInlineBlock:lc,moveStart:function(e,t,n){var r,o,i,a=n.startOffset,u=n.startContainer;if((n.startContainer!==n.endContainer||!lc(n.startContainer.childNodes[n.startOffset]))&&1===u.nodeType)for(a<(i=u.childNodes).length?(u=i[a],r=new gi(u,e.getParent(u,e.isBlock))):(u=i[i.length-1],(r=new gi(u,e.getParent(u,e.isBlock))).next(!0)),o=r.current();o;o=r.next())if(3===o.nodeType&&!fc(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||!fc(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:fc,replaceVars:function(e,t){return"string"!=typeof e?e=e(t):t&&(e=e.replace(/%(\w+)/g,(function(e,n){return t[n]||e}))),e},isEq:function(e,t){return e=""+((e=e||"").nodeName||e),t=""+((t=t||"").nodeName||t),e.toLowerCase()===t.toLowerCase()},normalizeStyleValue:dc,getStyle:function(e,t,n){return dc(e,e.getStyle(t,n),n)},getTextDecoration:function(e,t){var n;return e.getParent(t,(function(t){return(n=e.getStyle(t,"text-decoration"))&&"none"!==n})),n},getParents:function(e,t,n){return e.getParents(t,n,e.getRoot())}},zs=Ms.isBookmarkNode,Is=Ps.getParents,Ls=Ps.isWhiteSpaceNode,Fs=Ps.isTextBlock,Hs=function(e,t){for(void 0===t&&(t=(3===e.nodeType?e:e.childNodes).length);e&&e.hasChildNodes();)(e=e.childNodes[t])&&(t=(3===e.nodeType?e:e.childNodes).length);return{node:e,offset:t}},Vs=function(e){return"BR"===e.nodeName&&e.getAttribute("data-mce-bogus")&&!e.nextSibling},Us=function(e,t,n,r){var o,i;n=n.nodeValue;return void 0===r&&(r=e?n.length:0),e?(o=n.lastIndexOf(" ",r),-1!==(o=(i=n.lastIndexOf(" ",r))<o?o:i)&&!t&&(o<r||!e)&&o<=n.length&&o++):(o=n.indexOf(" ",r),i=n.indexOf(" ",r),o=-1!==o&&(-1===i||o<i)?o:i),o},js={expandRng:function(e,t,n,r){var o,i=t.startContainer,a=t.startOffset,u=t.endContainer,c=t.endOffset,s=e.dom;return 1===i.nodeType&&i.hasChildNodes()&&3===(i=Ea(i,a)).nodeType&&(a=0),1===u.nodeType&&u.hasChildNodes()&&3===(u=Ea(u,t.collapsed?c:c-1)).nodeType&&(c=u.nodeValue.length),i=mc(s,i),u=mc(s,u),(zs(i.parentNode)||zs(i))&&(i=zs(i)?i:i.parentNode,3===(i=t.collapsed?i.previousSibling||i:i.nextSibling||i).nodeType&&(a=t.collapsed?i.length:0)),(zs(u.parentNode)||zs(u))&&(u=zs(u)?u:u.parentNode,3===(u=t.collapsed?u.nextSibling||u:u.previousSibling||u).nodeType&&(c=t.collapsed?0:u.length)),t.collapsed&&((o=gc(s,e.getBody(),i,a,!0,r))&&(i=o.container,a=o.offset),(o=gc(s,e.getBody(),u,c,!1,r))&&(u=o.container,c=o.offset)),n[0].inline&&(u=r?u:function(e,t){var n=Hs(e,t);if(n.node){for(;n.node&&0===n.offset&&n.node.previousSibling;)n=Hs(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,c)),(n[0].inline||n[0].block_expand)&&(n[0].inline&&3===i.nodeType&&0!==a||(i=vc(s,n,i,a,u,c,!0)),n[0].inline&&3===u.nodeType&&c!==u.nodeValue.length||(u=vc(s,n,i,a,u,c,!1))),n[0].selector&&!1!==n[0].expand&&!n[0].inline&&(i=hc(s,n,t,i,"previousSibling"),u=hc(s,n,t,u,"nextSibling")),(n[0].block||n[0].selector)&&(i=pc(e,n,i,"previousSibling"),u=pc(e,n,u,"nextSibling"),n[0].block&&(s.isBlock(i)||(i=vc(s,n,i,a,u,c,!0)),s.isBlock(u)||(u=vc(s,n,i,a,u,c,!1)))),1===i.nodeType&&(a=s.nodeIndex(i),i=i.parentNode),1===u.nodeType&&(c=s.nodeIndex(u)+1,u=u.parentNode),{startContainer:i,startOffset:a,endContainer:u,endOffset:c}}},Ws=_n.each,qs=function(e,t,n){var r,o,i,a,u=t.startContainer,c=t.startOffset,s=t.endContainer,l=t.endOffset;t=e.select("td[data-mce-selected],th[data-mce-selected]");if(0<t.length)Ws(t,(function(e){n([e])}));else{var f,d,m,g=function(e){var t=e[0];return 3===t.nodeType&&t===u&&c>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===l&&0<e.length&&t===s&&3===t.nodeType&&e.splice(e.length-1,1),e},h=function(e,t,n){for(var r=[];e&&e!==n;e=e[t])r.push(e);return r},p=(t=function(e,t){do{if(e.parentNode===t)return e}while(e=e.parentNode)},function(e,t,r){var u=r?"nextSibling":"previousSibling";for(i=(o=e).parentNode;o&&o!==t;o=i)i=o.parentNode,(a=h(o===e?o:o[u],u)).length&&(r||a.reverse(),n(g(a)))});if(1===u.nodeType&&u.hasChildNodes()&&(u=u.childNodes[c]),1===s.nodeType&&s.hasChildNodes()&&(d=l,m=(f=s).childNodes,--d>m.length-1?d=m.length-1:d<0&&(d=0),s=m[d]||f),u===s)return n(g([u]));for(r=e.findCommonAncestor(u,s),o=u;o;o=o.parentNode){if(o===s)return p(u,r,!0);if(o===r)break}for(o=s;o;o=o.parentNode){if(o===u)return p(s,r);if(o===r)break}m=t(u,r)||u,d=t(s,r)||s,p(u,m,!0),(a=h(m===u?m:m.nextSibling,"nextSibling",d===s?d.nextSibling:d)).length&&n(g(a)),p(s,d)}};$s=Ct,Gs="text";var $s,Gs,Xs={get:function(e){if($s(e))return Ys(e).getOr("");throw new Error("Can only get "+Gs+" value of a "+Gs+" node")},getOption:Ys,set:function(e,t){if(!$s(e))throw new Error("Can only set raw "+Gs+" value of a "+Gs+" node");e.dom().nodeValue=t}};function Ys(e){return $s(e)?x.from(e.dom().nodeValue):x.none()}function Ks(e,t,n,r){return Wt(t).fold((function(){return"skipping"}),(function(o){return"br"===r||Ct(i=t)&&"\ufeff"===tl(i)?"valid":xt(i=t)&&ua(i,Ba())?"existing":Mc(t)?"caret":Ps.isValid(e,n,r)&&Ps.isValid(e,wt(o),n)?"valid":"invalid-child";var i}))}function Js(e,t,n,r){var o,i=void 0===(u=t.uid)?(i="mce-annotation",a=(new Date).getTime(),i+"_"+Math.floor(1e9*Math.random())+ ++Va+String(a)):u,a=function(e,t){var n={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}(t,["uid"]),u=yt.fromTag("span",e);return ia(u,Ba()),Dt(u,""+Pa(),i),Dt(u,""+Ma(),n),e=(t=r(i,a)).attributes,r=void 0===(n=t.classes)?[]:n,de(u,void 0===e?{}:e),o=u,P(r,(function(e){ia(o,e)})),u}function Zs(e,t,n,r,o){function i(){s.set(x.none())}function a(e){P(e,l)}var u=[],c=Js(e.getDoc(),o,n,r),s=je(x.none()),l=function(t){var n,r;switch(Ks(e,t,"span",wt(t))){case"invalid-child":i();var o=Yt(t);a(o),i();break;case"valid":o=s.get().getOrThunk((function(){var e=ja(c);return u.push(e),s.set(x.some(e)),e})),ki(n=t,r=o),Oi(r,n)}};qs(e.dom,t,(function(e){i();var t=e;t=M(e,yt.fromDom),a(t)}))}function Qs(e){var t=Ha(),n=(Fa(e,t),La(e));return{register:function(e,n){t.register(e,n)},annotate:function(n,r){t.lookup(n).each((function(t){nl(e,n,t,r)}))},annotationChanged:function(e,t){n.addListener(e,t)},remove:function(t){za(e,x.some(t)).each((function(e){e=e.elements,P(e,_i)}))},getAll:function(t){return t=Ia(e,t),Et(t,(function(e){return M(e,(function(e){return e.dom()}))}))}}}function el(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 tl=function(e){return Xs.get(e)},nl=function(e,t,n,r){e.undoManager.transact((function(){var o,i,a=e.selection.getRng();a.collapsed&&(i=e,a=a,o=js.expandRng(i,a,[{inline:!0}],3===(o=a).startContainer.nodeType&&o.startContainer.nodeValue.length>=o.startOffset&&" "===o.startContainer.nodeValue[o.startOffset]),a.setStart(o.startContainer,o.startOffset),a.setEnd(o.endContainer,o.endOffset),i.selection.setRng(a)),e.selection.getRng().collapsed?(o=Js(e.getDoc(),r,t,n.decorate),ga(o," "),e.selection.getRng().insertNode(o.dom()),e.selection.select(o.dom())):(i=Rc.getPersistentBookmark(e.selection,!1),a=e.selection.getRng(),Zs(e,a,t,n.decorate,r),e.selection.moveToBookmark(i))}))},rl=/^[ \t\r\n]*$/,ol={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},il=(al.create=function(e,t){var n=new al(e,ol[e]||1);if(t)for(var r in t)n.attr(r,t[r]);return n},al.prototype.replace=function(e){return e.parent&&e.remove(),this.insert(e,this),this.remove(),this},al.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(void 0===t)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}},al.prototype.clone=function(){var e,t=new al(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},al.prototype.wrap=function(e){return this.parent.insert(e,this),e.append(this),this},al.prototype.unwrap=function(){for(var e=this.firstChild;e;){var t=e.next;this.insert(e,this,!0),e=t}this.remove()},al.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},al.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},al.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},al.prototype.getAll=function(e){for(var t=[],n=this.firstChild;n;n=el(n,this))n.name===e&&t.push(n);return t},al.prototype.empty=function(){if(this.firstChild){for(var e=[],t=this.firstChild;t;t=el(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},al.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&&!rl.test(r.value))return!1;if(3===r.type&&r.parent&&t[r.parent.name]&&rl.test(r.value))return!1;if(n&&n(r))return!1}while(r=el(r,this));return!0},al.prototype.walk=function(e){return el(this,null,e)},al);function al(e,t){this.name=e,1===(this.type=t)&&(this.attributes=[],this.attributes.map={})}function ul(e,t,n){var r,o,i=1,a=e.getShortEndedElements(),u=/<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g;for(u.lastIndex=r=n;o=u.exec(t);){if(r=u.lastIndex,"/"===o[1])i--;else if(!o[1]){if(o[2]in a)continue;i++}if(0===i)break}return r}function cl(e,t){function n(){}void 0===t&&(t=br()),!1!==(e=e||{}).fix_self_closing&&(e.fix_self_closing=!0);var r=e.comment||n,o=e.cdata||n,i=e.text||n,a=e.start||n,u=e.end||n,c=e.pi||n,s=e.doctype||n;return{parse:function(n){for(var l,f,d,m,g,h,p,v,b,y,w,x,C,S,k,T,E,O,N,A=0,D=[],_=0,R=ur.decode,B=_n.makeMap("src,href,data,background,formaction,poster,xlink:href"),M=/((java|vb)script|mhtml):/i,P=function(e){for(var t,n=D.length;n--&&D[n].name!==e;);if(0<=n){for(t=D.length-1;n<=t;t--)(e=D[t]).valid&&u(e.name);D.length=n}},z=function(t,n,r,o,i){var a,u;if(r=(n=n.toLowerCase())in V?n:R(r||o||i||""),U&&!p&&0==(0===(o=n).indexOf("data-")||0===o.indexOf("aria-"))){if(!(a=C[n])&&S){for(u=S.length;u--&&!(a=S[u]).pattern.test(n););-1===u&&(a=null)}if(!a)return;if(a.validValues&&!(r in a.validValues))return}if(B[n]&&!e.allow_script_urls){i=r.replace(/[\s\u0000-\u001F]+/g,"");try{i=decodeURIComponent(i)}catch(t){i=unescape(i)}if(M.test(i))return;if(o=i,!(i=e).allow_html_data_urls&&(/^data:image\//i.test(o)?!1===i.allow_svg_data_urls&&/^data:image\/svg\+xml/i.test(o):/^data:/i.test(o)))return}p&&(n in B||0===n.indexOf("on"))||(d.map[n]=r,d.push({name:n,value:r}))},I=new RegExp("<(?:(?:!--([\\w\\W]*?)--\x3e)|(?:!\\[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"),L=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,F=t.getShortEndedElements(),H=e.self_closing_elements||t.getSelfClosingElements(),V=t.getBoolAttrs(),U=e.validate,j=e.remove_internals,W=e.fix_self_closing,q=t.getSpecialElements(),$=n+">";l=I.exec($);){if(A<l.index&&i(R(n.substr(A,l.index-A))),f=l[6])P(f=":"===(f=f.toLowerCase()).charAt(0)?f.substr(1):f);else if(f=l[7]){if(l.index+l[0].length>n.length){i(R(n.substr(l.index))),A=l.index+l[0].length;continue}v=(f=":"===(f=f.toLowerCase()).charAt(0)?f.substr(1):f)in F,W&&H[f]&&0<D.length&&D[D.length-1].name===f&&P(f),N=L,G=l[8];var G=(N=N.exec(G))?(G=N[1],N=N[2],"string"==typeof G&&"data-mce-bogus"===G.toLowerCase()?N:null):null;if(null!==G){if("all"===G){A=ul(t,n,I.lastIndex),I.lastIndex=A;continue}y=!1}if(!U||(b=t.getElementRule(f))){if(y=!0,U&&(C=b.attributes,S=b.attributePatterns),(x=l[8])?((p=-1!==x.indexOf("data-mce-type"))&&j&&(y=!1),(d=[]).map={},x.replace(L,z)):(d=[]).map={},U&&!p){if(k=b.attributesRequired,T=b.attributesDefault,E=b.attributesForced,b.removeEmptyAttrs&&!d.length&&(y=!1),E)for(m=E.length;m--;)h=(w=E[m]).name,"{$uid}"===(O=w.value)&&(O="mce_"+_++),d.map[h]=O,d.push({name:h,value:O});if(T)for(m=T.length;m--;)(h=(w=T[m]).name)in d.map||("{$uid}"===(O=w.value)&&(O="mce_"+_++),d.map[h]=O,d.push({name:h,value:O}));if(k){for(m=k.length;m--&&!(k[m]in d.map););-1===m&&(y=!1)}if(w=d.map["data-mce-bogus"]){if("all"===w){A=ul(t,n,I.lastIndex),I.lastIndex=A;continue}y=!1}}y&&a(f,d,v)}else y=!1;if(N=q[f]){N.lastIndex=A=l.index+l[0].length,A=(l=N.exec(n))?(y&&(g=n.substr(A,l.index-A)),l.index+l[0].length):(g=n.substr(A),n.length),y&&(0<g.length&&i(g,!0),u(f)),I.lastIndex=A;continue}v||(x&&x.indexOf("/")===x.length-1?y&&u(f):D.push({name:f,valid:y}))}else(f=l[1])?(">"===f.charAt(0)&&(f=" "+f),e.allow_conditional_comments||"[if"!==f.substr(0,3).toLowerCase()||(f=" "+f),r(f)):(f=l[2])?o(f.replace(/<!--|-->/g,"")):(f=l[3])?s(f):(f=l[4])&&c(f,l[5]);A=l.index+l[0].length}for(A<n.length&&i(R(n.substr(A))),m=D.length-1;0<=m;m--)(f=D[m]).valid&&u(f.name)}}}function sl(e,t){for(var n,r,o,i=t,a=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,u=e.schema,c=(i=function(e,t){return e=new RegExp(["\\s?("+e.join("|")+')="[^"]+"'].join("|"),"gi"),t.replace(e,"")}(e.getTempAttrs(),i),u.getShortEndedElements());o=a.exec(i);)n=a.lastIndex,r=o[0].length,o=c[o[1]]?n:Il.findEndTag(u,i,n),i=i.substring(0,n-r)+i.substring(o),a.lastIndex=n-r;return $a.trim(i)}function ll(e,t,n){var r=e.getParam(t,n);return-1!==r.indexOf("=")?(t=e.getParam(t,"","hash")).hasOwnProperty(e.id)?t[e.id]:n:r}function fl(e,t){return void 0===t&&(t={}),x.from(e.getBody()).fold(i("tree"===t.format?new il("body",11):""),(function(n){var r,o=e,i=t;if(i.format=i.format||Hl,i.get=!0,i.getInner=!0,i.no_events||o.fire("BeforeGetContent",i),"raw"===i.format)r=_n.trim(Ll.trimExternal(o.serializer,n.innerHTML));else if("text"===i.format)r=$a.trim(n.innerText||n.textContent);else{if("tree"===i.format)return o.serializer.serialize(n,i);r=Vl(o,o.serializer.serialize(n,i))}return"text"===i.format||Kn(yt.fromDom(n))?i.content=r:i.content=_n.trim(r),i.no_events||o.fire("GetContent",i),i.content}))}function dl(e){var t=[],n=(e=e||{}).indent,r=Ul(e.indent_before||""),o=Ul(e.indent_after||""),i=ur.getEncodeFunc(e.entity_encoding||"raw",e.entities),a="html"===e.element_format;return{start:function(e,u,c){var s,l,f,d;if(n&&r[e]&&0<t.length&&0<(d=t[t.length-1]).length&&"\n"!==d&&t.push("\n"),t.push("<",e),u)for(s=0,l=u.length;s<l;s++)f=u[s],t.push(" ",f.name,'="',i(f.value,!0),'"');t[t.length]=!c||a?">":" />",c&&n&&o[e]&&0<t.length&&0<(d=t[t.length-1]).length&&"\n"!==d&&t.push("\n")},end:function(e){t.push("</",e,">"),n&&o[e]&&0<t.length&&0<(e=t[t.length-1]).length&&"\n"!==e&&t.push("\n")},text:function(e,n){0<e.length&&(t[t.length]=n?e:i(e))},cdata:function(e){t.push("<![CDATA[",e,"]]>")},comment:function(e){t.push("\x3c!--",e,"--\x3e")},pi:function(e,r){r?t.push("<?",e," ",i(r),"?>"):t.push("<?",e,"?>"),n&&t.push("\n")},doctype:function(e){t.push("<!DOCTYPE",e,">",n?"\n":"")},reset:function(){t.length=0},getContent:function(){return t.join("").replace(/\n$/,"")}}}function ml(e,t){t(e),e.firstChild&&ml(e.firstChild,t),e.next&&ml(e.next,t)}function gl(e){return Yl.range(e.start(),Jl(e.soffset(),e.start()),e.finish(),Jl(e.foffset(),e.finish()))}function hl(e){return!0===e.inline||Kl.isIE()}function pl(e){return Yl.range(yt.fromDom(e.startContainer),e.startOffset,yt.fromDom(e.endContainer),e.endOffset)}function vl(e){var t=jt(e);return ef(t.dom()).filter(Ql(e))}function bl(e){return(e.bookmark||x.none()).bind((function(t){return tf(yt.fromDom(e.getBody()),t)})).bind(nf)}function yl(e){return of.isEditorUIElement(e)}function wl(e,t){t=t.editor,sf.register(t),t.on("focusin",(function(){var t=e.focusedEditor;t!==this&&(t&&t.fire("blur",{focusedEditor:this}),e.setActive(this),(e.focusedEditor=this).fire("focus",{blurredEditor:t}),this.focus(!0))})),t.on("focusout",(function(){var t=this;En.setEditorTimeout(t,(function(){var n=e.focusedEditor;ff(t,df())||n!==t||(t.fire("blur",{focusedEditor:null}),e.focusedEditor=null)}))})),zl||(zl=function(t){var r=e.activeEditor;t=t.target;r&&t.ownerDocument===n.document&&t!==n.document.body&&!ff(r,t)&&e.focusedEditor===r&&(r.fire("blur",{focusedEditor:null}),e.focusedEditor=null)},lf.bind(n.document,"focusin",zl))}function xl(e,t){e.focusedEditor===t.editor&&(e.focusedEditor=null),e.activeEditor||(lf.unbind(n.document,"focusin",zl),zl=null)}function Cl(e,t){return((t=t).collapsed?x.from(Ea(t.startContainer,t.startOffset)).map(yt.fromDom):x.none()).bind((function(t){return Xn(t)?x.some(t):!1===Ut(e,t)?x.some(e):x.none()}))}function Sl(e){return e instanceof il}function kl(e,t,n){return(n=void 0===n?{}:n).format=n.format||"html",n.set=!0,n.content=Sl(t)?"":t,Sl(t)||n.no_events||(e.fire("BeforeSetContent",n),t=n.content),x.from(e.getBody()).fold(i(t),(function(r){return Sl(t)?(i=r,a=t,u=n,Wl((o=e).parser.getNodeFilters(),o.parser.getAttributeFilters(),a),c=jl({validate:o.validate},o.schema).serialize(a),u.content=Kn(yt.fromDom(i))?c:_n.trim(c),xf(o,u.content),u.no_events||o.fire("SetContent",u),a):(i=e,c=r,o=n,0===(u=t).length||/^\s+$/.test(u)?(a='<br data-mce-bogus="1">',"TABLE"===c.nodeName?u="<tr><td>"+a+"</td></tr>":/^(UL|OL)$/.test(c.nodeName)&&(u="<li>"+a+"</li>"),u=(r=Fl.getForcedRootBlock(i))&&i.schema.isValidChild(c.nodeName.toLowerCase(),r.toLowerCase())?i.dom.createHTML(r,i.settings.forced_root_block_attrs,u=a):u||'<br data-mce-bogus="1">',xf(i,u),i.fire("SetContent",o)):("raw"!==o.format&&(u=jl({validate:i.validate},i.schema).serialize(i.parser.parse(u,{isRootContent:!0,insert:!0}))),o.content=Kn(yt.fromDom(c))?u:_n.trim(u),xf(i,o.content),o.no_events||i.fire("SetContent",o)),o.content);var o,i,a,u,c}))}function Tl(e){x.from(e).each((function(e){return e.destroy()}))}function El(e){var t,n,r,o;e.removed||(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&&Sf.remove(o.nextSibling),Cf.fireRemove(e),e.editorManager.remove(e),!e.inline&&r&&Sf.setStyle(e.id,"display",e.orgDisplay),Cf.fireDetach(e),Sf.remove(e.getContainer()),Tl(t),Tl(n),e.destroy())}function Ol(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(),Tl(n),Tl(r)),(n=(t=e).formElement)&&(n._mceOldSubmit&&(n.submit=n._mceOldSubmit,n._mceOldSubmit=null),Sf.unbind(n,"submit reset",t.formEventDelegate)),(r=e).contentAreaContainer=r.formElement=r.container=r.editorContainer=null,r.bodyElement=r.contentDocument=r.contentWindow=null,r.iframeElement=r.targetElm=null,r.selection&&(r.selection=r.selection.win=r.selection.dom=r.selection.dom.doc=null),e.destroyed=!0):e.remove())}function Nl(e){return function(){for(var t=new Array(arguments.length),n=0;n<t.length;n++)t[n]=arguments[n];if(0===t.length)throw new Error("Can't merge zero objects");for(var r={},o=0;o<t.length;o++){var i,a=t[o];for(i in a)kf.call(a,i)&&(r[i]=e(r[i],a[i]))}return r}}function Al(e){return e=k(e)?e.join(" "):e,e=M(C(e)?e.split(" "):[],re),I(e,(function(e){return 0<e.length}))}function Dl(e,t){return e.sections().hasOwnProperty(t)}function _l(e,t,n,r){n=Al(n.forced_plugins);var o,i,a=Al(r.plugins),c=(l=Dl(l=t,c="mobile")?l.sections()[c]:{}).plugins?Al(l.plugins):a,s=e&&(o=l="mobile",i=(s=t).sections(),Dl(s,l)&&i[l].theme===o)?I(c,u(B,Df)):e&&Dl(t,"mobile")?c:a,l=(i=s,[].concat(Al(n)).concat(Al(i)));return _n.extend(r,{plugins:l.join(" ")})}function Rl(e,t,n){return x.from(t.settings[n]).filter(e)}function Bl(e,t,n,r){var o,i,a,u=t in e.settings?e.settings[t]:n;return"hash"===r?(a={},"string"==typeof(i=u)?P(0<i.indexOf("=")?i.split(/[;,](?![^=;,]*(?:[;,]|$))/):i.split(","),(function(e){e=e.split("="),1<e.length?a[_n.trim(e[0])]=_n.trim(e[1]):a[_n.trim(e[0])]=_n.trim(e[0])})):a=i,a):"string"===r?Rl(C,e,t).getOr(n):"number"===r?Rl(N,e,t).getOr(n):"boolean"===r?Rl(E,e,t).getOr(n):"object"===r?Rl(S,e,t).getOr(n):"array"===r?Rl(k,e,t).getOr(n):"string[]"===r?Rl((o=C,function(e){return k(e)&&j(e,o)}),e,t).getOr(n):"function"===r?Rl(O,e,t).getOr(n):u}function Ml(e,t){return t.dom()[e]}function Pl(e,t){return parseInt(ge(t,e),10)}(cl=cl||{}).findEndTag=ul;var zl,Il=cl,Ll={trimExternal:sl,trimInternal:sl},Fl={getIframeAttrs:function(e){return e.getParam("iframe_attrs",{})},getDocType:function(e){return e.getParam("doctype","<!DOCTYPE html>")},getDocumentBaseUrl:function(e){return e.getParam("document_base_url","")},getBodyId:function(e){return ll(e,"body_id","tinymce")},getBodyClass:function(e){return ll(e,"body_class","")},getContentSecurityPolicy:function(e){return e.getParam("content_security_policy","")},shouldPutBrInPre:function(e){return e.getParam("br_in_pre",!0)},getForcedRootBlock:function(e){return e.getParam("force_p_newlines",!1)?"p":(e=e.getParam("forced_root_block","p"),!1===e?"":!0===e?"p":e)},getForcedRootBlockAttrs:function(e){return e.getParam("forced_root_block_attrs",{})},getBrNewLineSelector:function(e){return e.getParam("br_newline_selector",".mce-toc h2,figcaption,caption")},getNoNewLineSelector:function(e){return e.getParam("no_newline_selector","")},shouldKeepStyles:function(e){return e.getParam("keep_styles",!0)},shouldEndContainerOnEmptyBlock:function(e){return e.getParam("end_container_on_empty_block",!1)},getFontStyleValues:function(e){return _n.explode(e.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large"))},getFontSizeClasses:function(e){return _n.explode(e.getParam("font_size_classes",""))},getIconPackName:function(e){return e.getParam("icons","","string")},getIconsUrl:function(e){return e.getParam("icons_url","","string")},getImagesDataImgFilter:function(e){return e.getParam("images_dataimg_filter",i(!0),"function")},isAutomaticUploadsEnabled:function(e){return e.getParam("automatic_uploads",!0,"boolean")},shouldReuseFileName:function(e){return e.getParam("images_reuse_filename",!1,"boolean")},shouldReplaceBlobUris:function(e){return e.getParam("images_replace_blob_uris",!0,"boolean")},getImageUploadUrl:function(e){return e.getParam("images_upload_url","","string")},getImageUploadBasePath:function(e){return e.getParam("images_upload_base_path","","string")},getImagesUploadCredentials:function(e){return e.getParam("images_upload_credentials",!1,"boolean")},getImagesUploadHandler:function(e){return e.getParam("images_upload_handler",null,"function")},shouldUseContentCssCors:function(e){return e.getParam("content_css_cors",!1,"boolean")},getReferrerPolicy:function(e){return e.getParam("referrer_policy","","string")},getLanguageCode:function(e){return e.getParam("language","en","string")},getLanguageUrl:function(e){return e.getParam("language_url","","string")},shouldIndentUseMargin:function(e){return e.getParam("indent_use_margin",!1)},getIndentation:function(e){return e.getParam("indentation","40px","string")},getContentCss:function(e){var t=e.settings.content_css;return C(t)?M(t.split(","),re):k(t)?t:!1===t||e.inline?[]:["default"]},getDirectionality:function(e){return e.getParam("directionality",Ji.isRtl()?"rtl":void 0)},getInlineBoundarySelector:function(e){return e.getParam("inline_boundaries_selector","a[href],code,.mce-annotation","string")}},Hl="html",Vl=function(e,t){return e=Fl.getForcedRootBlock(e),e=new RegExp("^(<"+e+"[^>]*>( | |\\s| |<br \\/>|)<\\/"+e+">[\r\n]*|<br \\/>[\r\n]*)$"),t.replace(e,"")},Ul=_n.makeMap,jl=function(e,t){void 0===t&&(t=br());var n=dl(e);return(e=e||{}).validate=!("validate"in e)||e.validate,{serialize:function(r){var o=e.validate,i={3:function(e){n.text(e.value,e.raw)},8:function(e){n.comment(e.value)},7:function(e){n.pi(e.name,e.value)},10:function(e){n.doctype(e.value)},4:function(e){n.cdata(e.value)},11:function(e){if(e=e.firstChild)for(;a(e),e=e.next;);}},a=(n.reset(),function(e){var r,u,c,s,l,f,d,m,g=i[e.type];if(g)g(e);else{if(g=e.name,r=e.shortEnded,u=e.attributes,o&&u&&1<u.length&&((l=[]).map={},m=t.getElementRule(e.name))){for(f=0,d=m.attributesOrder.length;f<d;f++)(c=m.attributesOrder[f])in u.map&&(s=u.map[c],l.map[c]=s,l.push({name:c,value:s}));for(f=0,d=u.length;f<d;f++)(c=u[f].name)in l.map||(s=u.map[c],l.map[c]=s,l.push({name:c,value:s}));u=l}if(n.start(e.name,u,r),!r){if(e=e.firstChild)for(;a(e),e=e.next;);n.end(g)}}});return 1!==r.type||e.inner?i[11](r):a(r),n.getContent()}}},Wl=function(e,t,n){e=function(e,t,n){var r,o={},i={},a=[];for(r in n.firstChild&&ml(n.firstChild,(function(n){P(e,(function(e){e.name===n.name&&(o[e.name]?o[e.name].nodes.push(n):o[e.name]={filter:e,nodes:[n]})})),P(t,(function(e){"string"==typeof n.attr(e.name)&&(i[e.name]?i[e.name].nodes.push(n):i[e.name]={filter:e,nodes:[n]})}))})),o)o.hasOwnProperty(r)&&a.push(o[r]);for(r in i)i.hasOwnProperty(r)&&a.push(i[r]);return a}(e,t,n),P(e,(function(e){P(e.filter.callbacks,(function(t){t(e.nodes,e.filter.name,{})}))}))},ql=function(e){var t=be(e).dom();return e.dom()===t.activeElement},$l=function(e){return e=void 0!==e?e.dom():n.document,x.from(e.activeElement).map(yt.fromDom)},Gl=(Me=function(e){if(!k(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");var t=[],r={};return P(e,(function(o,i){var a=St(o);if(1!==a.length)throw new Error("one and only one name per case");var u=a[0],c=o[u];if(void 0!==r[u])throw new Error("duplicate key detected:"+u);if("cata"===u)throw new Error("cannot have a case named cata (sorry)");if(!k(c))throw new Error("case arguments must be an array");t.push(u),r[u]=function(){var r=arguments.length;if(r!==c.length)throw new Error("Wrong number of arguments to case "+u+". Expected "+c.length+" ("+c+"), got "+r);for(var o=new Array(r),a=0;a<o.length;a++)o[a]=arguments[a];return{fold:function(){if(arguments.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+arguments.length);return arguments[i].apply(null,o)},match:function(e){var n=St(e);if(t.length!==n.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+n.join(","));if(j(t,(function(e){return B(n,e)})))return e[u].apply(null,o);throw new Error("Not all branches were specified when using match. Specified: "+n.join(", ")+"\nRequired: "+t.join(", "))},log:function(e){n.console.log(e,{constructors:t,constructor:u,params:o})}}}})),r},Ie={create:he("start","soffset","finish","foffset")},He=Me([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),{before:He.before,on:He.on,after:He.after,cata:function(e,t,n,r){return e.fold(t,n,r)},getStart:function(e){return e.fold(a,a,a)}}),Xl=Me([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Yl={domRange:Xl.domRange,relative:Xl.relative,exact:Xl.exact,exactFromRange:function(e){return Xl.exact(e.start(),e.soffset(),e.finish(),e.foffset())},getWin:function(e){return e=e.match({domRange:function(e){return yt.fromDom(e.startContainer)},relative:function(e,t){return Gl.getStart(e)},exact:function(e,t,n,r){return e}}),jt(e)},range:Ie.create},Kl=bt().browser,Jl=function(e,t){return t=Ct(t)?tl(t).length:Yt(t).length+1,t<e?t:e<0?0:e},Zl=function(e,t){return!Ue.isRestrictedNode(t.dom())&&(Ut(e,t)||Vt(e,t))},Ql=function(e){return function(t){return Zl(e,t.start())&&Zl(e,t.finish())}},ef=function(e){return e=e.getSelection(),(e&&0!==e.rangeCount?x.from(e.getRangeAt(0)):x.none()).map(pl)},tf=function(e,t){return x.from(t).filter(Ql(e)).map(gl)},nf=function(e){var t=n.document.createRange();try{return t.setStart(e.start().dom(),e.soffset()),t.setEnd(e.finish().dom(),e.foffset()),x.some(t)}catch(e){return x.none()}},rf={store:function(e){var t=hl(e)?vl(yt.fromDom(e.getBody())):x.none();e.bookmark=t.isSome()?t:e.bookmark},storeNative:function(e,t){var n=yt.fromDom(e.getBody());t=(hl(e)?x.from(t):x.none()).map(pl).filter(Ql(n));e.bookmark=t.isSome()?t:e.bookmark},readRange:ef,restore:function(e){bl(e).each((function(t){e.selection.setRng(t)}))},getRng:bl,getBookmark:vl,validate:tf},of={isEditorUIElement:function(e){return e=e.className.toString(),-1!==e.indexOf("tox-")||-1!==e.indexOf("mce-")}},af=function(e){return"nodechange"===e.type&&e.selectionChange},uf=function(e){e.on("focusout",(function(){rf.store(e)}))},cf=function(e,t){e.on("mouseup touchend",(function(e){t.throttle()}))},sf={register:function(e){var t=ea((function(){rf.store(e)}),0);e.on("init",(function(){function r(){o.throttle()}var o,i,a;e.inline&&(a=e,o=t,ji.DOM.bind(n.document,"mouseup",r),a.on("remove",(function(){ji.DOM.unbind(n.document,"mouseup",r)}))),i=e,a=t,bt().browser.isIE()?uf(i):cf(i,a),i.on("keyup NodeChange",(function(e){af(e)||rf.store(i)}))})),e.on("remove",(function(){t.cancel()}))}},lf=ji.DOM,ff=function(e,t){var n=e?e.settings.custom_ui_selector:"";return null!==lf.getParent(t,(function(t){return yl(t)||!!n&&e.dom.is(t,n)}))},df=function(){try{return n.document.activeElement}catch(Pe){return n.document.body}},mf={setup:function(e){e.on("AddEditor",u(wl,e)),e.on("RemoveEditor",u(xl,e))},isEditorUIElement:yl,isEditorContentAreaElement:function(e){return e=e.classList,void 0!==e&&(e.contains("tox-edit-area")||e.contains("tox-edit-area__iframe")||e.contains("mce-content-body"))},isUIElement:ff},gf=function(e,t){return e.dom.getParent(t,(function(t){return"true"===e.dom.getContentEditable(t)}))},hf=function(e,t){Cl(yt.fromDom(e.getBody()),t).bind((function(e){return As.firstPositionIn(e.dom())})).fold((function(){e.selection.normalize()}),(function(t){return e.selection.setRng(t.toRange())}))},pf=function(e){if(e.setActive)try{e.setActive()}catch(Pe){e.focus()}else e.focus()},vf=function(e){return ql(e)||$l(be(t=e)).filter((function(e){return t.dom().contains(e.dom())})).isSome();var t},bf=function(e){var t;return e.inline?(t=(t=e).getBody())&&vf(yt.fromDom(t)):(t=e).iframeElement&&ql(yt.fromDom(t.iframeElement))},yf=function(e){return e.editorManager.setActive(e)},wf={focus:function(e,t){e.removed||(t?yf:function(e){var t=e.selection,n=e.getBody(),r=t.getRng();e.quirks.refreshContentEditable(),void 0!==e.bookmark&&!1===bf(e)&&rf.getRng(e).each((function(t){e.selection.setRng(t),r=t})),t=gf(e,t.getNode());if(e.$.contains(n,t))return pf(t),hf(e,r),void yf(e);e.inline||(On.opera||pf(n),e.getWin().focus()),(On.gecko||e.inline)&&(pf(n),hf(e,r)),yf(e)})(e)},hasFocus:bf,hasEditorOrUiFocus:function(e){return bf(e)||(t=e,$l().filter((function(e){return!mf.isEditorContentAreaElement(e.dom())&&mf.isUIElement(t,e.dom())})).isSome());var t}},xf=function(e,t){var n;e.dom.setHTML(e.getBody(),t),n=e,wf.hasFocus(n)&&As.firstPositionIn(n.getBody()).each((function(e){var t=e.getNode();t=Ue.isTable(t)?As.firstPositionIn(t).getOr(e):e;n.selection.setRng(t.toRange())}))},Cf={firePreProcess:function(e,t){return e.fire("PreProcess",t)},firePostProcess:function(e,t){return e.fire("PostProcess",t)},fireRemove:function(e){return e.fire("remove")},fireDetach:function(e){return e.fire("detach")},fireSwitchMode:function(e,t){return e.fire("SwitchMode",{mode:t})},fireObjectResizeStart:function(e,t,n,r){e.fire("ObjectResizeStart",{target:t,width:n,height:r})},fireObjectResized:function(e,t,n,r){e.fire("ObjectResized",{target:t,width:n,height:r})}},Sf=ji.DOM,kf=Object.prototype.hasOwnProperty,Tf=Nl((function(e,t){return S(e)&&S(t)?Tf(e,t):t})),Ef=Nl((function(e,t){return t})),Of=he("sections","settings"),Nf=(Fe=bt().deviceType,Fe.isTouch()),Af=Fe.isPhone(),Df=["lists","autolink","autosave"],_f={table_grid:!1,object_resizing:!1,resize:!1},Rf=function(e,t,n,r){return e={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},G(G({},e),n?_f:{})},Bf=function(e,t,n,r,o){return t=e?{mobile:(t=t,G(G(G({},_f),{resize:!1,toolbar_drawer:!1,toolbar_sticky:!1}),t?{menubar:!1}:{}))}:{},t=function(e,t){return t=ce(t,(function(t,n){return B(e,n)})),Of(t.t,t.f)}(["mobile"],Tf(t,o)),n=_n.extend(n,r,t.settings(),(o=t,e&&Dl(o,"mobile")?function(e,t,n){return void 0===n&&(n={}),e=e.sections(),e=e.hasOwnProperty(t)?e[t]:{},_n.extend({},n,e)}(t,"mobile"):{}),{validate:!0,external_plugins:function(e,t){return t=t.external_plugins||{},e&&e.external_plugins?_n.extend({},e.external_plugins,t):t}(r,t.settings())}),_l(e,t,r,n)},Mf=u(Ml,"clientWidth"),Pf=u(Ml,"clientHeight"),zf=u(Pl,"margin-top"),If=u(Pl,"margin-left"),Lf=function(e){return e.dom().getBoundingClientRect()},Ff={isXYInContentArea:function(e,t,n){var r,o,i=yt.fromDom(e.getBody());i=e.inline?i:yt.fromDom(i.dom().ownerDocument.documentElement),e=e.inline,t=t,n=n,r=Lf(o=i),t={x:t-(e?r.left+o.dom().clientLeft+If(o):0),y:n-(e?r.top+o.dom().clientTop+zf(o):0)};return n=t.x,e=t.y,o=Mf(r=i),r=Pf(r),0<=n&&0<=e&&n<=o&&e<=r},isEditorAttachedToDom:function(e){return e=e.inline?e.getBody():e.getContentAreaContainer(),x.from(e).map(yt.fromDom).map((function(e){return Ut(be(e),e)})).getOr(!1)}};function Hf(e){function t(t){if(!e.removed&&Ff.isEditorAttachedToDom(e))return F(r,(function(e){return i(o().getArgs(e),t)})).getOrThunk((function(){e.editorManager.setActive(e);var n=o().open(t,(function(){c(n),a()}));return u(n),a(),n}))}var n,r=[],o=function(){var t=e.theme;return t&&t.getNotificationManagerImpl?t.getNotificationManagerImpl():{open:n,close:n,reposition:n,getArgs:n};function n(){throw new Error("Theme did not provide a NotificationManager implementation.")}},i=function(e,t){return!(e.type!==t.type||e.text!==t.text||e.progressBar||e.timeout||t.progressBar||t.timeout)},a=function(){0<r.length&&o().reposition(r)},u=function(e){r.push(e)},c=function(e){H(r,(function(t){return t===e})).each((function(e){r.splice(e,1)}))};return(n=e).on("SkinLoaded",(function(){var e=n.settings.service_message;e&&t({text:e,type:"warning",timeout:0})})),n.on("ResizeEditor ResizeWindow NodeChange",(function(){En.requestAnimationFrame(a)})),n.on("remove",(function(){P(r.slice(),(function(e){o().close(e)}))})),{open:t,close:function(){x.from(r[0]).each((function(e){o().close(e),c(e),a()}))},getNotifications:function(){return r}}}function Vf(e){function t(){var t=e.theme;return t&&t.getWindowManagerImpl?t.getWindowManagerImpl():{open:n,openUrl:n,alert:n,confirm:n,close:n,getParams:n,setParams:n};function n(){throw new Error("Theme did not provide a WindowManager implementation.")}}function n(e,t){return function(){return t?t.apply(e,arguments):void 0}}function r(t){a(t),0===(i=I(i,(function(e){return e!==t}))).length&&e.focus()}function o(t){return e.editorManager.setActive(e),rf.store(e),t=t(),u(t),t}var i=[],a=function(t){e.fire("CloseWindow",{dialog:t})},u=function(t){i.push(t),e.fire("OpenWindow",{dialog:t})};return e.on("remove",(function(){P(i,(function(e){t().close(e)}))})),{open:function(e,n){return o((function(){return t().open(e,n,r)}))},openUrl:function(e){return o((function(){return t().openUrl(e,r)}))},alert:function(e,r,o){t().alert(e,n(o||this,r))},confirm:function(e,r,o){t().confirm(e,n(o||this,r))},close:function(){x.from(i[i.length-1]).each((function(e){t().close(e),r(e)}))}}}function Uf(e,t){e._skinLoaded?Gf(e,t):e.on("SkinLoaded",(function(){Gf(e,t)}))}function jf(e){n.console.error(e)}function Wf(e,t,n){return n?"Failed to load "+e+": "+n+" from url "+t:"Failed to load "+e+" url: "+t}function qf(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var o=n.window.console;o&&(o.error||o.log).apply(o,arguments)}var $f,Gf=function(e,t){e.notificationManager.open({type:"error",text:t})},Xf={pluginLoadError:function(e,t){jf(Wf("plugin",e,t))},iconsLoadError:function(e,t){jf(Wf("icons",e,t))},languageLoadError:function(e,t){jf(Wf("language",e,t))},pluginInitError:function(e,t,n){t=Ji.translate(["Failed to initialize plugin: {0}",t]),qf(t,n),Uf(e,t)},uploadError:function(e,t){Uf(e,Ji.translate(["Failed to upload image: {0}",t]))},displayError:Uf,initError:qf},Yf=function(){return{"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>'}},Kf=($f={},{add:function(e,t){$f[e]=t},get:function(e){return $f[e]||{icons:{}}},has:function(e){return Nt($f,e)}}),Jf=ca.PluginManager,Zf=ca.ThemeManager;function Qf(e,t){function r(e,t){return{url:t,blobInfo:e,status:!0}}function o(e,t){return{url:"",blobInfo:e,status:!1,error:t}}function i(e,t){_n.each(a[e],(function(e){e(t)})),delete a[e]}var a={},u=function(e,r,o,i){var a,u=new n.XMLHttpRequest;u.open("POST",t.url),u.withCredentials=t.credentials,u.upload.onprogress=function(e){i(e.loaded/e.total*100)},u.onerror=function(){o("Image upload failed due to a XHR Transport error. Code: "+u.status)},u.onload=function(){var e,n;u.status<200||300<=u.status?o("HTTP Error: "+u.status):(n=JSON.parse(u.responseText))&&"string"==typeof n.location?r((e=t.basePath,n=n.location,e?e.replace(/\/$/,"")+"/"+n.replace(/^\//,""):n)):o("Invalid JSON: "+u.responseText)},(a=new n.FormData).append("file",e.blob(),e.filename()),u.send(a)},c=function(t,n,a){return e.markPending(t.blobUri()),new cn((function(u){function c(){}var s;try{var l=function(){s&&s.close()};n(t,(function(n){l(),e.markUploaded(t.blobUri(),n),i(t.blobUri(),r(t,n)),u(r(t,n))}),(function(n){l(),e.removeFailed(t.blobUri()),i(t.blobUri(),o(t,n)),u(o(t,n))}),(function(e){e<0||100<e||(s=s||a()).progressBar.value(e)}))}catch(c){u(o(t,c.message))}}))},s=function(e){var t=e.blobUri();return new cn((function(e){a[t]=a[t]||[],a[t].push(e)}))};return!1===O(t.handler)&&(t.handler=u),{upload:function(n,r){return t.url||t.handler!==u?(o=n,i=r,o=_n.grep(n,(function(t){return!e.isUploaded(t.blobUri())})),cn.all(_n.map(o,(function(n){return e.isPending(n.blobUri())?s(n):c(n,t.handler,i)})))):new cn((function(e){e([])}));var o,i}}}function ed(e,t,n,r){var o,i;0===t.src.indexOf("blob:")?(i=e.getByUri(t.src))?n({image:t,blobInfo:i}):rd.uriToBlob(t.src).then((function(r){rd.blobToDataUri(r).then((function(a){o=rd.parseDataUri(a).data,i=e.create(id(),r,o),e.add(i),n({image:t,blobInfo:i})}))}),(function(e){r(e)})):(o=rd.parseDataUri(t.src).data,(i=e.findFirst((function(e){return e.base64()===o})))?n({image:t,blobInfo:i}):rd.uriToBlob(t.src).then((function(r){i=e.create(id(),r,o),e.add(i),n({image:t,blobInfo:i})}),(function(e){r(e)})))}function td(e){return e?$(e.getElementsByTagName("img")):[]}var nd=function(e){e=decodeURIComponent(e).split(",");var t,n=/data:([^;]+)/.exec(e[0]);return{type:t=n?n[1]:t,data:e[1]}},rd={uriToBlob:function(e){return 0===e.indexOf("blob:")?(t=e,new cn((function(e,r){function o(){r("Cannot convert "+t+" to Blob. Resource might not exist or is inaccessible.")}try{var i=new n.XMLHttpRequest;i.open("GET",t,!0),i.responseType="blob",i.onload=function(){200===this.status?e(this.response):o()},i.onerror=o,i.send()}catch(e){o()}}))):0===e.indexOf("data:")?(r=e,new cn((function(e){var t,o,i,a=nd(r);try{t=n.atob(a.data)}catch(t){return void e(new n.Blob([]))}for(o=new Uint8Array(t.length),i=0;i<o.length;i++)o[i]=t.charCodeAt(i);e(new n.Blob([o],{type:a.type}))}))):null;var t,r},blobToDataUri:function(e){return new cn((function(t){var r=new n.FileReader;r.onloadend=function(){t(r.result)},r.readAsDataURL(e)}))},parseDataUri:nd},od=0,id=function(e){return(e||"blobid")+od++},ad=0,ud=function(e){return e+ad+++"s"+(new Date).getTime().toString(36)+t()+t()+t();function t(){return Math.round(4294967295*Math.random()).toString(36)}},cd=function(){function e(e){var t,r;if(e.blob&&e.base64)return t=e.id||ud("blobid"),r=e.name||t,{id:i(t),name:i(r),filename:i(r+"."+o(e.blob.type)),blob:i(e.blob),base64:i(e.base64),blobUri:i(e.blobUri||n.URL.createObjectURL(e.blob)),uri:i(e.uri)};throw new Error("blob and base64 representations of the image are required for BlobInfo to be created")}function t(e){return a((function(t){return t.id()===e}))}var r=[],o=function(e){return{"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png"}[e.toLowerCase()]||"dat"},a=function(e){return I(r,e)[0]};return{create:function(t,n,r,o){if(C(t))return e({id:t,name:o,blob:n,base64:r});if(S(t))return e(t);throw new Error("Unknown input type")},add:function(e){t(e.id())||r.push(e)},get:t,getByUri:function(e){return a((function(t){return t.blobUri()===e}))},findFirst:a,removeByUri:function(e){r=I(r,(function(t){return t.blobUri()!==e||(n.URL.revokeObjectURL(t.blobUri()),!1)}))},destroy:function(){P(r,(function(e){n.URL.revokeObjectURL(e.blobUri())})),r=[]}}};function sd(){function e(e,t){return{status:e,resultUri:t}}function t(e){return e in n}var n={};return{hasBlobUri:t,getResultUri:function(e){return e=n[e],e?e.resultUri:null},isPending:function(e){return!!t(e)&&1===n[e].status},isUploaded:function(e){return!!t(e)&&2===n[e].status},markPending:function(t){n[t]=e(1,null)},markUploaded:function(t,r){n[t]=e(2,r)},removeFailed:function(e){delete n[e]},destroy:function(){n={}}}}function ld(e){function t(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 n(t,n){P(e.undoManager.data,(function(e){"fragmented"===e.type?e.fragments=M(e.fragments,(function(e){return g(e,t,n)})):e.content=g(e.content,t,n)}))}function r(t){return c=c||Qf(f,{url:Fl.getImageUploadUrl(e),basePath:Fl.getImageUploadBasePath(e),credentials:Fl.getImagesUploadCredentials(e),handler:Fl.getImagesUploadHandler(e)}),v().then(m((function(n){var r=M(n,(function(e){return e.blobInfo}));return c.upload(r,h).then(m((function(r){return r=M(r,(function(t,r){return r=n[r].image,t.status&&Fl.shouldReplaceBlobUris(e)?p(r,t.url):t.error&&Xf.uploadError(e,t.error),{element:r,status:t.status}})),t&&t(r),r})))})))}function o(t){if(Fl.isAutomaticUploadsEnabled(e))return r(t)}function a(t){return!1!==j(d,(function(e){return e(t)}))&&(0!==t.getAttribute("src").indexOf("data:")||Fl.getImagesDataImgFilter(e)(t))}function u(t){return t.replace(/src="(blob:[^"]+)"/g,(function(t,n){var r=f.getResultUri(n);return r?'src="'+r+'"':(r=l.getByUri(n),(r=r||L(e.editorManager.get(),(function(e,t){return e||t.editorUpload&&t.editorUpload.blobCache.getByUri(n)}),null))?'src="data:'+r.blob().type+";base64,"+r.base64()+'"':t)}))}var c,s,l=cd(),f=sd(),d=[],m=function(t){return function(n){return e.selection?t(n):[]}},g=function(e,n,r){return e=t(e,'src="'+n+'"','src="'+r+'"'),t(e,'data-mce-src="'+n+'"','data-mce-src="'+r+'"')},h=function(){return e.notificationManager.open({text:e.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})},p=function(t,r){l.removeByUri(t.src),n(t.src,r),e.$(t).attr({src:Fl.shouldReuseFileName(e)?r+"?"+(new Date).getTime():r,"data-mce-src":e.convertURL(r,"src")})},v=function(){var t,r,o;return s||(t=f,r=l,o={},s={findAll:function(e,n){return n=n||i(!0),e=I(td(e),(function(e){var r=e.src;return!!On.fileApi&&!e.hasAttribute("data-mce-bogus")&&!e.hasAttribute("data-mce-placeholder")&&!(!r||r===On.transparentSrc)&&(0===r.indexOf("blob:")?!t.isUploaded(r)&&n(e):0===r.indexOf("data:")&&n(e))})),e=M(e,(function(e){if(o[e.src])return new cn((function(t){o[e.src].then((function(n){if("string"==typeof n)return n;t({image:e,blobInfo:n.blobInfo})}))}));var t=new cn((function(t,n){ed(r,e,t,n)})).then((function(e){return delete o[e.image.src],e})).catch((function(t){return delete o[e.src],t}));return o[e.src]=t})),cn.all(e)}}),s.findAll(e.getBody(),a).then(m((function(t){return t=I(t,(function(t){return"string"!=typeof t||(Xf.displayError(e,t),!1)})),P(t,(function(e){n(e.image.src,e.blobInfo.blobUri()),e.image.src=e.blobInfo.blobUri(),e.image.removeAttribute("data-mce-src")})),t})))};return e.on("SetContent",(function(){(Fl.isAutomaticUploadsEnabled(e)?o:v)()})),e.on("RawSaveContent",(function(e){e.content=u(e.content)})),e.on("GetContent",(function(e){e.source_view||"raw"===e.format||(e.content=u(e.content))})),e.on("PostRender",(function(){e.parser.addNodeFilter("img",(function(e){P(e,(function(e){var t=e.attr("src");l.getByUri(t)||(t=f.getResultUri(t))&&e.attr("src",t)}))}))})),{blobCache:l,addFilter:function(e){d.push(e)},uploadImages:r,uploadImagesAuto:o,scanForImages:v,destroy:function(){l.destroy(),f.destroy(),s=c=null}}}function fd(e,t,n){return Ut(t,e)?function(e,t){for(var n=O(t)?t:l,r=e.dom(),o=[];null!==r.parentNode&&void 0!==r.parentNode;){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)||Vt(e,t)})).slice(0,-1):[]}function dd(e,t){return fd(e,t,i(!1))}function md(e,t){return e.hasOwnProperty(t.nodeName)}function gd(e){var t,n,r,o,i,a,u,c,s=e.dom,l=e.selection,f=e.schema,d=f.getBlockElements(),m=l.getStart(),g=e.getBody(),h=Fl.getForcedRootBlock(e);if(m&&Ue.isElement(m)&&h&&(c=g.nodeName.toLowerCase(),f.isValidChild(c,h.toLowerCase())&&!wd(d,g,m))){for(c=(f=l.getRng()).startContainer,t=f.startOffset,n=f.endContainer,r=f.endOffset,u=wf.hasFocus(e),m=g.firstChild;m;)yd(d,m)?xd(d,m)?(m=(i=m).nextSibling,s.remove(i)):(o||(o=s.create(h,Fl.getForcedRootBlockAttrs(e)),m.parentNode.insertBefore(o,m),a=!0),m=(i=m).nextSibling,o.appendChild(i)):(o=null,m=m.nextSibling);a&&u&&(f.setStart(c,t),f.setEnd(n,r),l.setRng(f),e.nodeChanged())}}function hd(e){return ye(e).fold(i([e]),(function(t){return[e].concat(hd(t))}))}function pd(e){return we(e).fold(i([e]),(function(t){return"br"===wt(t)?qt(t).map((function(t){return[e].concat(pd(t))})).getOr([]):[e].concat(pd(t))}))}function vd(e,t){return bu((r=(n=t).startContainer,n=n.startOffset,Ue.isText(r)?0===n?x.some(yt.fromDom(r)):x.none():x.from(r.childNodes[n]).map(yt.fromDom)),(n=(r=t).endContainer,r=r.endOffset,Ue.isText(n)?r===n.data.length?x.some(yt.fromDom(n)):x.none():x.from(n.childNodes[r-1]).map(yt.fromDom)),(function(t,n){return t=F(hd(e),u(Vt,t)),n=F(pd(e),u(Vt,n)),t.isSome()&&n.isSome()})).getOr(!1);var n,r}var bd={parentsUntil:fd,parents:dd,parentsAndSelf:function(e,t){return[e].concat(dd(e,t))}},yd=function(e,t){return!!Ue.isText(t)||!!Ue.isElement(t)&&!md(e,t)&&!Ms.isBookmarkNode(t)},wd=function(e,t,n){return b(bd.parents(yt.fromDom(n),yt.fromDom(t)),(function(t){return md(e,t.dom())}))},xd=function(e,t){if(Ue.isText(t)){if(0===t.nodeValue.length)return!0;if(/^\s+$/.test(t.nodeValue)&&(!t.nextSibling||md(e,t.nextSibling)))return!0}return!1},Cd=function(e){Fl.getForcedRootBlock(e)&&e.on("NodeChange",u(gd,e))},Sd=function(e,t){return e&&t&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset},kd=function(e,t,n,r){var o=n,i=new gi(n,o),a=e.schema.getNonEmptyElements();do{if(3===n.nodeType&&0!==_n.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))},Td=function(e){return e=e.selection.getSel(),e&&0<e.rangeCount},Ed=(Od.prototype.nodeChanged=function(e){var t,n,r=this.editor.selection;this.editor.initialized&&r&&!this.editor.settings.disable_nodechange&&!this.editor.readonly&&(n=this.editor.getBody(),(r=r.getStart(!0)||n).ownerDocument===this.editor.getDoc()&&this.editor.dom.isChildOf(r,n)||(r=n),t=[],this.editor.dom.getParent(r,(function(e){if(e===n)return!0;t.push(e)})),(e=e||{}).element=r,e.parents=t,this.editor.fire("NodeChange",e))},Od.prototype.isSameElementPath=function(e){var t,n=this.editor.$(e).parentsUntil(this.editor.getBody()).add(e);if(n.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},Od);function Od(e){this.lastPath=[],this.editor=e;var t,n=this;"onselectionchange"in e.getDoc()||e.on("NodeChange click mouseup keyup focus",(function(n){var r=e.selection.getRng();r={startContainer:r.startContainer,startOffset:r.startOffset,endContainer:r.endContainer,endOffset:r.endOffset};"nodechange"!==n.type&&Sd(r,t)||e.fire("SelectionChange"),t=r})),e.on("contextmenu",(function(){e.fire("SelectionChange")})),e.on("SelectionChange",(function(){var t=e.selection.getStart(!0);!t||!On.range&&e.selection.isCollapsed()||Td(e)&&!n.isSameElementPath(t)&&e.dom.isChildOf(t,e.getBody())&&e.nodeChanged({selectionChange:!0})})),e.on("mouseup",(function(t){!t.isDefaultPrevented()&&Td(e)&&("IMG"===e.selection.getNode().nodeName?En.setEditorTimeout(e,(function(){e.nodeChanged()})):e.nodeChanged())}))}function Nd(e){return/^[\r\n\t ]$/.test(e)}function Ad(e){return!Nd(e)&&!Cm(e)}function Dd(e,t,n){return x.from(n.container()).filter(Ue.isText).exists((function(r){var o=e?0:-1;return t(r.data.charAt(n.offset()+o))}))}function _d(e,t){return function(n){return x.from(os(e?0:-1,n)).filter(t).isSome()}}function Rd(e){return"IMG"===e.nodeName&&"block"===ge(yt.fromDom(e),"display")}function Bd(e){return Ue.isContentEditableFalse(e)&&!Ue.isBogusAll(e)}function Md(e){return L(e,(function(e,t){return e.concat(Rm(t))}),[])}function Pd(e,t,n,r,o,i){function a(r){var i,a,l=Md([r]);for(-1===e&&(l=l.reverse()),i=0;i<l.length;i++)if(a=l[i],!n(a,s)){if(0<c.length&&t(a,An.last(c))&&u++,a.line=u,o(a))return!0;c.push(a)}}var u=0,c=[],s=An.last(i.getClientRects());return s&&(a(i=i.getNode()),function(e,t,n,r){for(;r=ts(r,e,du,t);)if(n(r))return}(e,r,a,i)),c}function zd(e,t,n,r){function o(e){return An.last(e.getClientRects())}t=Ss(t);var i,a,u,c,s=[],l=0,f=1===e?(i=t.next,a=Sa,u=Ca,yc.after(r)):(i=t.prev,a=Ca,u=Sa,yc.before(r)),d=o(f);do{if(f.isVisible()&&!u(c=o(f),d)){if(0<s.length&&a(c,An.last(s))&&l++,(c=gu(c)).position=f,c.line=l,n(c))return s;s.push(c)}}while(f=i(f));return s}function Id(e){return function(t){return t.line>e}}function Ld(e){return function(t){return t.line===e}}function Fd(e,t){return Math.abs(e.left-t)}function Hd(e,t){return Math.abs(e.right-t)}function Vd(e,t){return e>=t.left&&e<=t.right}function Ud(e,t){return An.reduce(e,(function(e,n){var r=Math.min(Fd(e,t),Hd(e,t)),o=Math.min(Fd(n,t),Hd(n,t));return Vd(t,n)||!Vd(t,e)&&(o===r&&Pm(n.node)||o<r)?n:e}))}function jd(e,t,n,r){for(;r=zm(r,e,du,t);)if(n(r))return}function Wd(e,t){function n(e,n){return n=I(Md([n]),(function(n){return!e(n,t)})),r=r.concat(n),0===n.length}var r=[];return r.push(t),jd(wm.Up,e,u(n,Ca),t.node),jd(wm.Down,e,u(n,Sa),t.node),r}function qd(e){e.dragging=!1,e.element=null,Wm(e.ghost)}function $d(e,t,n,r,o){return t._selectionOverrides.showCaret(e,n,r,o)}function Gd(e,t,n){return t&&t.collapsed&&(e=Qm(e,t,n))||t}function Xd(e){function t(t){t&&e.selection.setRng(t)}function n(){return e.selection.getRng()}function r(t,n){var r,o,a,u=e.$,s=e.dom;if(!t)return null;if(t.collapsed){if(!m(t))if(!1===n){if(o=us(-1,c,t),$c(o.getNode(!0)))return f(-1,o.getNode(!0),!1,!1);if($c(o.getNode()))return f(-1,o.getNode(),!o.isAtEnd(),!1)}else{if(o=us(1,c,t),$c(o.getNode()))return f(1,o.getNode(),!o.isAtEnd(),!1);if($c(o.getNode(!0)))return f(1,o.getNode(!0),!1,!1)}return null}if(n=t.startContainer,o=t.startOffset,a=t.endOffset,3===n.nodeType&&0===o&&ng(n.parentNode)&&(n=n.parentNode,o=s.nodeIndex(n),n=n.parentNode),1!==n.nodeType)return null;if(a===o+1&&n===t.endContainer&&(r=n.childNodes[o]),!ng(r))return null;if(a=r.cloneNode(!0),(n=e.fire("ObjectSelected",{target:r,targetClone:a})).isDefaultPrevented())return null;o=Ra(yt.fromDom(e.getBody()),"#"+l).fold((function(){return u([])}),(function(e){return u([e.dom()])})),n=n.targetClone,0===o.length&&(o=u('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id",l)).appendTo(e.getBody()),t=e.dom.createRng(),n===a&&On.ie?(o.empty().append('<p style="font-size: 0" data-mce-bogus="all"> </p>').append(n),t.setStartAfter(o[0].firstChild.firstChild),t.setEndAfter(n)):(o.empty().append(" ").append(n).append(" "),t.setStart(o[0].firstChild,1),t.setEnd(o[0].lastChild,0)),o.css({top:s.getPos(r,e.getBody()).y}),o[0].focus(),(a=e.selection.getSel()).removeAllRanges(),a.addRange(t);var d=yt.fromDom(r);return P(la(yt.fromDom(e.getBody()),"*[data-mce-selected]"),(function(e){Vt(d,e)||_t(e,"data-mce-selected")})),e.dom.getAttrib(r,"data-mce-selected")||r.setAttribute("data-mce-selected","1"),i=r,g(),t}function o(){i&&(i.removeAttribute("data-mce-selected"),Ra(yt.fromDom(e.getBody()),"#"+l).each(Di),i=null),Ra(yt.fromDom(e.getBody()),"#"+l).each(Di),i=null}var i,a,u,c=e.getBody(),s=qc(e.getBody(),(function(t){return e.dom.isBlock(t)}),(function(){return wf.hasFocus(e)})),l="sel-"+e.dom.uniqueId(),f=function(t,n,r,o){return void 0===o&&(o=!0),e.fire("ShowCaret",{target:n,direction:t,before:r}).isDefaultPrevented()?null:(o&&e.selection.scrollIntoView(n,-1===t),s.show(r,n))},d=function(e){return Ka(e)||Za(e)||Qa(e)},m=function(e){return d(e.startContainer)||d(e.endContainer)},g=function(){s.hide()};function h(t,n){t=e.dom.getParent(t,e.dom.isBlock),n=e.dom.getParent(n,e.dom.isBlock);return!(!t||!e.dom.isChildOf(t,n)||!1!==ng(rg(e,t)))||t&&(n=n,!(e.dom.getParent(t,e.dom.isBlock)===e.dom.getParent(n,e.dom.isBlock)))&&function(e){var t=Ss(e);return!!e.firstChild&&(e=yc.before(e.firstChild),t=t.next(e),t&&!Dm(t)&&!_m(t))}(t)}return On.ceFalse&&(e.on("mouseup",(function(r){var o=n();o.collapsed&&Ff.isXYInContentArea(e,r.clientX,r.clientY)&&t(Qm(e,o,!1))})),e.on("click",(function(t){var n=rg(e,t.target);n&&(ng(n)&&(t.preventDefault(),e.focus()),tg(n)&&e.dom.isChildOf(n,e.selection.getNode())&&o())})),e.on("blur NewBlock",(function(){o()})),e.on("ResizeWindow FullscreenStateChanged",(function(){return s.reposition()})),u=!1,(a=e).on("touchstart",(function(){u=!1})),a.on("touchmove",(function(){u=!0})),a.on("touchend",(function(e){var t;u||(t=rg(a,e.target),ng(t)&&(e.preventDefault(),r(Zm(a,t))))}),!0),e.on("mousedown",(function(n){var i,a=n.target;a!==c&&"HTML"!==a.nodeName&&!e.dom.isChildOf(a,c)||!1===Ff.isXYInContentArea(e,n.clientX,n.clientY)||((i=rg(e,a))?ng(i)?(n.preventDefault(),r(Zm(e,i))):(o(),tg(i)&&n.shiftKey||Lm.isXYWithinRange(n.clientX,n.clientY,e.selection.getRng())||(g(),e.selection.placeCaretAt(n.clientX,n.clientY))):!1===$c(a)&&(o(),g(),(i=Im(c,n.clientX,n.clientY))&&!h(n.target,i.node)&&(n.preventDefault(),a=f(1,i.node,i.before,!1),e.getBody().focus(),t(a))))})),e.on("keypress",(function(t){xm.modifierPressed(t)||(t.keyCode,ng(e.selection.getNode())&&t.preventDefault())})),e.on("GetSelectionRange",(function(e){var t=e.range;i&&(i.parentNode?((t=t.cloneRange()).selectNode(i),e.range=t):i=null)})),e.on("SetSelectionRange",(function(t){t.range=function(t){var n=e.schema.getShortEndedElements(),r=e.dom.createRng(),o=t.startContainer,i=t.startOffset,a=t.endContainer,u=t.endOffset;return Nt(n,o.nodeName.toLowerCase())?0===i?r.setStartBefore(o):r.setStartAfter(o):r.setStart(o,i),Nt(n,a.nodeName.toLowerCase())?0===u?r.setEndBefore(a):r.setEndAfter(a):r.setEnd(a,u),r}(t.range);var n=r(t.range,t.forward);n&&(t.range=n)})),e.on("AfterSetSelectionRange",(function(t){t=t.range;m(t)||"mcepastebin"===t.startContainer.parentNode.id||g(),t=t.startContainer.parentNode,e.dom.hasClass(t,"mce-offscreen-selection")||o()})),e.on("copy",(function(t){var n,r=t.clipboardData;t.isDefaultPrevented()||!t.clipboardData||On.ie||(n=(n=e.dom.get(l))&&n.getElementsByTagName("*")[0])&&(t.preventDefault(),r.clearData(),r.setData("text/html",n.outerHTML),r.setData("text/plain",n.outerText))})),Ym.init(e),eg.setup(e)),{showCaret:f,showBlockCaretContainer:function(r){r.hasAttribute("data-mce-caret")&&(tu(r),t(n()),e.selection.scrollIntoView(r[0]))},hideFakeCaret:g,destroy:function(){s.destroy(),i=null}}}function Yd(e){return Ue.isElement(e)?e.outerHTML:Ue.isText(e)?ur.encodeRaw(e.data,!1):Ue.isComment(e)?"\x3c!--"+e.data+"--\x3e":""}function Kd(e){return{type:"fragmented",fragments:e,content:"",bookmark:null,beforeBookmark:null}}function Jd(e){return{type:"complete",fragments:null,content:e,bookmark:null,beforeBookmark:null}}function Zd(e){return 0===e.get()}function Qd(e,t,n){Zd(n)&&(e.typing=t)}function em(e,t){e.typing&&(Qd(e,!1,t),e.add())}function tm(e){var t=je(x.none()),n=je(0),r=je(0),o={data:[],typing:!1,beforeChange:function(){pg(e,n,t)},add:function(i,a){return vg(e,o,r,n,t,i,a)},undo:function(){return xg(e,o,n,r)},redo:function(){return wg(e,r,o.data)},clear:function(){bg(e,o,r)},reset:function(){Cg(o)},hasUndo:function(){return Sg(e,o,r)},hasRedo:function(){return kg(o,r)},transact:function(e){return Tg(o,n,e)},ignore:function(e){Eg(n,e)},extra:function(t,n){yg(e,o,r,t,n)}};return Og(e,o,n),Ng(e),o}function nm(e){return Ct(e)?" "===tl(e):jn(e)}function rm(e,t,n,r){var o=e.dom.getRoot();return t!==o&&(t=e.dom.getParent(t,(function(t){return!!_g(e,t,n)||t.parentNode===o||!!Rg(e,t,n,r,!0)})),Rg(e,t,n,r))}function om(e,t,n){return!!Dg(t,n.inline)||!!Dg(t,n.block)||(n.selector?1===t.nodeType&&e.is(t,n.selector):void 0)}function im(e,t,n,r,o,i){var a,u,c,s=n[r];if(n.onmatch)return n.onmatch(t,n,r);if(s)if(void 0===s.length){for(a in s)if(s.hasOwnProperty(a)){if(u="attributes"===r?e.getAttrib(t,a):Ps.getStyle(e,t,a),o&&!u&&!n.exact)return;if((!o||n.exact)&&!Dg(u,Ps.normalizeStyleValue(e,Ps.replaceVars(s[a],i),a)))return}}else for(c=0;c<s.length;c++)if("attributes"===r?e.getAttrib(t,s[c]):Ps.getStyle(e,t,s[c]))return n;return n}function am(e,t,n){var r,o,i,a,u;0!==n&&(r=e.data.slice(t,t+n),o=t+n>=e.data.length,e.replaceData(t,n,(a=0===t,u=o,L(i=r,(function(e,t){return-1!==" \f\n\r\t\v".indexOf(t)||" "===t?e.previousCharIsSpace||""===e.str&&a||e.str.length===i.length-1&&u?{previousCharIsSpace:!1,str:e.str+" "}:{previousCharIsSpace:!0,str:e.str+" "}:{previousCharIsSpace:!1,str:e.str+t}}),{previousCharIsSpace:!1,str:""}).str)))}function um(e,t){var n;e=yt.fromDom(e);return t=t=yt.fromDom(t),n="pre,code",e=u(Vt,e),da(t,n,e).isSome()}function cm(e){return ya(e.previousSibling)?x.some((t=e.previousSibling,Ue.isText(t)?yc(t,t.data.length):yc.after(t))):e.previousSibling?As.lastPositionIn(e.previousSibling):x.none();var t}function sm(e){return ya(e.nextSibling)?x.some((t=e.nextSibling,Ue.isText(t)?yc(t,0):yc.before(t))):e.nextSibling?As.firstPositionIn(e.nextSibling):x.none();var t}function lm(e,t){return cm(t).orThunk((function(){return sm(t)})).orThunk((function(){return n=e,r=t,o=yc.before(r.previousSibling||r.parentNode),As.prevPosition(n,o).fold((function(){return As.nextPosition(n,yc.after(r))}),x.some);var n,r,o}))}function fm(e,t){return sm(t).orThunk((function(){return cm(t)})).orThunk((function(){return n=e,r=t,As.nextPosition(n,yc.after(r)).fold((function(){return As.prevPosition(n,yc.before(r))}),x.some);var n,r}))}function dm(e,t,n){n.fold((function(){e.focus()}),(function(n){e.selection.setRng(n.toRange(),t)}))}function mm(e,t){return t&&e.schema.getBlockElements().hasOwnProperty(wt(t))}function gm(e){var t;return jg.isEmpty(e)?(t=yt.fromHtml('<br data-mce-bogus="1">'),Ai(e),Oi(e,t),x.some(yc.before(t.dom()))):x.none()}function hm(e){return 0<function(e){for(var t=[];e;){if(3===e.nodeType&&e.nodeValue!==Gg||1<e.childNodes.length)return[];1===e.nodeType&&t.push(e),e=e.firstChild}return t}(e).length}function pm(e,t,n){void 0===n&&(n=!0);var r=e.dom,o=e.selection;if(t)Zg(e,t,n);else if(!(t=Pc(e.getBody(),o.getStart())))for(;t=r.get(Xg);)Zg(e,t,!1)}function vm(e,t){return e.appendChild(t),t}function bm(e,t){return e.schema.getTextInlineElements().hasOwnProperty(wt(t))&&!Mc(t.dom())&&!Ue.isBogus(t.dom())}var ym,wm,xm={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 On.mac?e.metaKey:e.ctrlKey&&!e.altKey}},Cm=(ym=" ",function(e){return ym===e}),Sm=u(Dd,!0,Nd),km=u(Dd,!1,Nd),Tm=function(e){return e=e.container(),Ue.isText(e)&&0===e.data.length},Em=_d(!0,Rd),Om=_d(!1,Rd),Nm=_d(!0,Ue.isTable),Am=_d(!1,Ue.isTable),Dm=_d(!0,Bd),_m=_d(!1,Bd),Rm=function(e){function t(t){return M(t,(function(t){return(t=gu(t)).node=e,t}))}var n;return Ue.isElement(e)?t(e.getClientRects()):Ue.isText(e)?((n=e.ownerDocument.createRange()).setStart(e,0),n.setEnd(e,e.data.length),t(n.getClientRects())):void 0},Bm=((Pe=wm=wm||{})[Pe.Up=-1]="Up",Pe[Pe.Down=1]="Down",u(Pd,wm.Up,Ca,Sa)),Mm=u(Pd,wm.Down,Sa,Ca),Pm=Ue.isContentEditableFalse,zm=ts,Im=function(e,t,n){var r=Md(I($(e.getElementsByTagName("*")),$c));r=I(r,(function(e){return n>=e.top&&n<=e.bottom})),r=Ud(r,t);return(r=r&&Ud(Wd(e,r),t))&&$c(r.node)?(e=t,{node:(t=r).node,before:Fd(t,e)<Hd(t,e)}):null},Lm={isXYWithinRange:function(e,t,n){if(n.collapsed)return!1;if(On.browser.isIE()&&n.startOffset===n.endOffset-1&&n.startContainer===n.endContainer){var r=n.startContainer.childNodes[n.startOffset];if(Ue.isElement(r))return b(r.getClientRects(),(function(n){return ka(n,e,t)}))}return b(n.getClientRects(),(function(n){return ka(n,e,t)}))}},Fm=function(e){var t=e.getBoundingClientRect(),n=(e=e.ownerDocument,e.documentElement);e=e.defaultView;return{top:t.top+e.pageYOffset-n.clientTop,left:t.left+e.pageXOffset-n.clientLeft}},Hm=function(e){var t=e.getBody(),n=e.getDoc().documentElement,r={left:t.scrollLeft,top:t.scrollTop};t={left:t.scrollLeft||n.scrollLeft,top:t.scrollTop||n.scrollTop};return e.inline?r:t},Vm=function(e,t){return o=(o=e).inline?Fm(o.getBody()):{left:0,top:0},r=(n=e).getBody(),n=n.inline?{left:r.scrollLeft,top:r.scrollTop}:{left:0,top:0},r=e,{pageX:(t=(e=t).target.ownerDocument!==r.getDoc()?(t=Fm(r.getContentAreaContainer()),r=Hm(r),{left:e.pageX-t.left+r.left,top:e.pageY-t.top+r.top}):{left:e.pageX,top:e.pageY}).left-o.left+n.left,pageY:t.top-o.top+n.top};var n,r,o},Um=Ue.isContentEditableFalse,jm=Ue.isContentEditableTrue,Wm=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},qm=function(e,t){return function(n){var r,o,i,a;0===n.button&&(o=F(t.dom.getParents(n.target),xu(Um,jm)).getOr(null),i=t.getBody(),Um(a=o)&&a!==i&&(a=t.dom.getPos(o),i=t.getBody(),r=t.getDoc().documentElement,e.element=o,e.screenX=n.screenX,e.screenY=n.screenY,e.maxX=(t.inline?i.scrollWidth:r.offsetWidth)-2,e.maxY=(t.inline?i.scrollHeight:r.offsetHeight)-2,e.relX=n.pageX-a.x,e.relY=n.pageY-a.y,e.width=o.offsetWidth,e.height=o.offsetHeight,e.ghost=(i=t,r=o,n=e.width,a=e.height,r=r.cloneNode(!0),i.dom.setStyles(r,{width:n,height:a}),i.dom.setAttrib(r,"data-mce-selected",null),o=i.dom.create("div",{class:"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"}),i.dom.setStyles(o,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:a}),i.dom.setStyles(r,{margin:0,boxSizing:"border-box"}),o.appendChild(r),o)))}},$m=function(e,t){var n=En.throttle((function(e,n){t._selectionOverrides.hideFakeCaret(),t.selection.placeCaretAt(e,n)}),0);return function(r){var o,i,a,u,c,s,l,f=Math.max(Math.abs(r.screenX-e.screenX),Math.abs(r.screenY-e.screenY));if(e.element&&!e.dragging&&10<f){if(t.fire("dragstart",{target:e.element}).isDefaultPrevented())return;e.dragging=!0,t.focus()}e.dragging&&(f=e,f={pageX:(l=Vm(t,r)).pageX-f.relX,pageY:l.pageY+5},l=e.ghost,s=t.getBody(),l.parentNode!==s&&s.appendChild(l),s=e.ghost,l=f,f=e.width,o=e.height,i=e.maxX,a=e.maxY,c=u=0,s.style.left=l.pageX+"px",s.style.top=l.pageY+"px",l.pageX+f>i&&(u=l.pageX+f-i),l.pageY+o>a&&(c=l.pageY+o-a),s.style.width=f-u+"px",s.style.height=o-c+"px",n(r.clientX,r.clientY))}},Gm=function(e,t){return function(n){var r,o,i,a;e.dragging&&(i=function(e){return e=e.getSel().getRangeAt(0).startContainer,3===e.nodeType?e.parentNode:e}((o=t).selection),a=e.element,i===a||o.dom.isChildOf(i,a)||Um(i)||(r=function(e){return e=e.cloneNode(!0),e.removeAttribute("data-mce-selected"),e}(e.element),(o=t.fire("drop",{targetClone:r,clientX:n.clientX,clientY:n.clientY})).isDefaultPrevented()||(r=o.targetClone,t.undoManager.transact((function(){Wm(e.element),t.insertContent(t.dom.getOuterHTML(r)),t._selectionOverrides.hideFakeCaret()}))))),qd(e)}},Xm=function(e,t){return function(){e.dragging&&t.fire("dragend"),qd(e)}},Ym={init:function(e){var t,r,o,i,a,u,c,s,l;t=e,r={},o=ji.DOM,i=n.document,a=qm(r,t),u=$m(r,t),c=Gm(r,t),s=Xm(r,t),t.on("mousedown",a),t.on("mousemove",u),t.on("mouseup",c),o.bind(i,"mousemove",u),o.bind(i,"mouseup",s),t.on("remove",(function(){o.unbind(i,"mousemove",u),o.unbind(i,"mouseup",s)})),(l=e).on("drop",(function(e){var t=void 0!==e.clientX?l.getDoc().elementFromPoint(e.clientX,e.clientY):null;(Um(t)||Um(l.dom.getContentEditableParent(t)))&&e.preventDefault()}))}},Km=Ue.isContentEditableTrue,Jm=Ue.isContentEditableFalse,Zm=function(e,t){return e.fire("BeforeObjectSelected",{target:t}).isDefaultPrevented()?null:((t=(e=t).ownerDocument.createRange()).selectNode(e),t)},Qm=function(e,t,n){t=rc(1,e.getBody(),t),t=yc.fromRangeStart(t);var r=t.getNode();return Jm(r)?$d(1,e,r,!t.isAtEnd(),!1):(r=t.getNode(!0),Jm(r)?$d(1,e,r,!1,!1):(r=e.dom.getParent(t.getNode(),(function(e){return Jm(e)||Km(e)})),Jm(r)?$d(1,e,r,!1,n):null))},eg={setup:function(e){var t=ea((function(){var t;!e.removed&&e.getBody().contains(n.document.activeElement)&&e.selection.getRng().collapsed&&(t=Gd(e,e.selection.getRng(),!1),e.selection.setRng(t))}),0);e.on("focus",(function(){t.throttle()})),e.on("blur",(function(){t.cancel()}))}},tg=Ue.isContentEditableTrue,ng=Ue.isContentEditableFalse,rg=function(e,t){for(var n=e.getBody();t&&t!==n;){if(tg(t)||ng(t))return t;t=t.parentNode}return null},og={KEEP:0,DELETE:2,INSERT:1,diff:function(e,t){function n(r,u,c,s,l){var f=function(n,r,u,c){var s=r-n,l=c-u;if(0===s||0===l)return null;var f,d,m,g,h,p=s-l,v=l+s,b=(v%2===0?v:v+1)/2;for(o[1+b]=n,i[1+b]=r+1,f=0;f<=b;++f){for(d=-f;d<=f;d+=2){m=d+b,d===-f||d!==f&&o[m-1]<o[m+1]?o[m]=o[m+1]:o[m]=o[m-1]+1,g=o[m],h=g-n+u-d;while(g<r&&h<c&&e[g]===t[h])o[m]=++g,++h;if(p%2!==0&&p-f<=d&&d<=p+f&&i[m-p]<=o[m])return a(i[m-p],d+n-u,r,c)}for(d=p-f;d<=p+f;d+=2){m=d+b-p,d===p-f||d!==p+f&&i[m+1]<=i[m-1]?i[m]=i[m+1]-1:i[m]=i[m-1],g=i[m]-1,h=g-n+u-d;while(g>=n&&h>=u&&e[g]===t[h])i[m]=g--,h--;if(p%2===0&&-f<=d&&d<=f&&i[m]<=o[m+p])return a(i[m],d+n-u,r,c)}}}(r,u,c,s);if(null===f||f.start===u&&f.diag===u-s||f.end===r&&f.diag===r-c)for(var d=r,m=c;d<u||m<s;)d<u&&m<s&&e[d]===t[m]?(l.push([0,e[d]]),++d,++m):s-c<u-r?(l.push([2,e[d]]),++d):(l.push([1,t[m]]),++m);else{n(r,f.start,c,f.start-f.diag,l);for(var g=f.start;g<f.end;++g)l.push([0,e[g]]);n(f.end,u,f.end-f.diag,s,l)}}var r=e.length+t.length+2,o=new Array(r),i=new Array(r),a=function(n,r,o,i){for(var a=n;a-r<i&&a<o&&e[a]===t[a-r];)++a;return{start:n,end:a,diag:r}};r=[];return n(0,e.length,0,t.length,r),r}},ig=function(e,t,r){t=function(e){var t,r=n.document.createElement("div"),o=n.document.createDocumentFragment();for(e&&(r.innerHTML=e);t=r.firstChild;)o.appendChild(t);return o}(t),e.hasChildNodes()&&r<e.childNodes.length?(r=e.childNodes[r]).parentNode.insertBefore(t,r):e.appendChild(t)},ag=function(e,t){e.hasChildNodes()&&t<e.childNodes.length&&(e=e.childNodes[t]).parentNode.removeChild(e)},ug=function(e){return I(M($(e.childNodes),Yd),(function(e){return 0<e.length}))},cg=function(e,t){var n,r,o=M($(t.childNodes),Yd);return o=og.diff(o,e),n=t,r=0,P(o,(function(e){e[0]===og.KEEP?r++:e[0]===og.INSERT?(ig(n,e[1],r),r++):e[0]===og.DELETE&&ag(n,r)})),t},sg=je(x.none()),lg=function(e){return"fragmented"===e.type?e.fragments.join(""):e.content},fg=function(e){var t=yt.fromTag("body",sg.get().getOrThunk((function(){var e=n.document.implementation.createHTMLDocument("undo");return sg.set(x.some(e)),e})));return ga(t,lg(e)),P(la(t,"*[data-mce-bogus]"),_i),t.dom().innerHTML},dg=function(e){var t=ug(e.getBody()),n=(t=U(t,(function(t){return t=Ll.trimInternal(e.serializer,t),0<t.length?[t]:[]})),t.join(""));return-1!==n.indexOf("</iframe>")?Kd(t):Jd(n)},mg=function(e,t,n){"fragmented"===t.type?cg(t.fragments,e.getBody()):e.setContent(t.content,{format:"raw"}),e.selection.moveToBookmark(n?t.beforeBookmark:t.bookmark)},gg=function(e,t){return!(!e||!t)&&(n=t,lg(e)===lg(n)||(n=t,fg(e)===fg(n)));var n},hg=function(e){e.typing&&(e.typing=!1,e.add())},pg=function(e,t,n){Zd(t)&&n.set(x.some(Rc.getUndoBookmark(e.selection)))},vg=function(e,t,n,r,o,i,a){var u=e.settings,c=dg(e);if(i=_n.extend(i=i||{},c),!1===Zd(r)||e.removed)return null;if(c=t.data[n.get()],e.fire("BeforeAddUndo",{level:i,lastLevel:c,originalEvent:a}).isDefaultPrevented())return null;if(c&&gg(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 s=0;s<t.data.length-1;s++)t.data[s]=t.data[s+1];t.data.length--,n.set(t.data.length)}return i.bookmark=Rc.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),r={level:i,lastLevel:c,originalEvent:a},e.fire("AddUndo",r),0<n.get()&&(e.setDirty(!0),e.fire("change",r)),i},bg=function(e,t,n){t.data=[],n.set(0),t.typing=!1,e.fire("ClearUndos")},yg=function(e,t,n,r,o){var i;t.transact(r)&&(r=t.data[n.get()].bookmark,i=t.data[n.get()-1],mg(e,i,!0),t.transact(o)&&(t.data[n.get()-1].beforeBookmark=r))},wg=function(e,t,n){var r;return t.get()<n.length-1&&(t.set(t.get()+1),r=n[t.get()],mg(e,r,!1),e.setDirty(!0),e.fire("Redo",{level:r})),r},xg=function(e,t,n,r){var o;return t.typing&&(t.add(),t.typing=!1,Qd(t,!1,n)),0<r.get()&&(r.set(r.get()-1),o=t.data[r.get()],mg(e,o,!0),e.setDirty(!0),e.fire("Undo",{level:o})),o},Cg=function(e){e.clear(),e.add()},Sg=function(e,t,n){return 0<n.get()||t.typing&&t.data[0]&&!gg(dg(e),t.data[0])},kg=function(e,t){return t.get()<e.data.length-1&&!e.typing},Tg=function(e,t,n){return em(e,t),e.beforeChange(),e.ignore(n),e.add()},Eg=function(e,t){try{e.set(e.get()+1),t()}finally{e.set(e.get()-1)}},Og=function(e,t,n){function r(e){Qd(t,!1,n),t.add({},e)}var o=je(!1);e.on("init",(function(){t.add()})),e.on("BeforeExecCommand",(function(e){e=e.command,"Undo"!==e&&"Redo"!==e&&"mceRepaint"!==e&&(em(t,n),t.beforeChange())})),e.on("ExecCommand",(function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&r(e)})),e.on("ObjectResizeStart cut",(function(){t.beforeChange()})),e.on("SaveContent ObjectResized blur",r),e.on("dragend",r),e.on("keyup",(function(n){var i=n.keyCode;n.isDefaultPrevented()||((33<=i&&i<=36||37<=i&&i<=40||45===i||n.ctrlKey)&&(r(),e.nodeChanged()),46!==i&&8!==i||e.nodeChanged(),o.get()&&t.typing&&!1===gg(dg(e),t.data[0])&&(!1===e.isDirty()&&(e.setDirty(!0),e.fire("change",{level:t.data[0],lastLevel:null})),e.fire("TypingUndo"),o.set(!1),e.nodeChanged()))})),e.on("keydown",(function(e){var i,a=e.keyCode;e.isDefaultPrevented()||(33<=a&&a<=36||37<=a&&a<=40||45===a?t.typing&&r(e):(i=e.ctrlKey&&!e.altKey||e.metaKey,!(a<16||20<a)||224===a||91===a||t.typing||i||(t.beforeChange(),Qd(t,!0,n),t.add({},e),o.set(!0))))})),e.on("mousedown",(function(e){t.typing&&r(e)})),e.on("input",(function(e){var t;e.inputType&&("insertReplacementText"===e.inputType||"insertText"===(t=e).inputType&&null===t.data)&&r(e)})),e.on("AddUndo Undo Redo ClearUndos",(function(t){t.isDefaultPrevented()||e.nodeChanged()}))},Ng=function(e){e.addShortcut("meta+z","","Undo"),e.addShortcut("meta+y,meta+shift+z","","Redo")},Ag={removeTrailingBr:function(e){var t=la(e,"br");e=I(function(e){for(var t=[],n=e.dom();n;)t.push(yt.fromDom(n)),n=n.lastChild;return t}(e).slice(-1),jn);t.length===e.length&&P(e,Di)},fillWithPaddingBr:function(e){Ai(e),Oi(e,yt.fromHtml('<br data-mce-bogus="1">'))},isPaddedElement:function(e){return 1===I(Yt(e),nm).length},trimBlockTrailingBr:function(e){we(e).each((function(t){qt(t).each((function(n){Un(e)&&jn(t)&&Un(n)&&Di(t)}))}))}},Dg=Ps.isEq,_g=function(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},Rg=function(e,t,n,r,o){var i,a,u,c,s=e.formatter.get(n),l=e.dom;if(s&&t)for(a=0;a<s.length;a++)if(i=s[a],om(e.dom,t,i)&&im(l,t,i,"attributes",o,r)&&im(l,t,i,"styles",o,r)){if(c=i.classes)for(u=0;u<c.length;u++)if(!e.dom.hasClass(t,c[u]))return;return i}},Bg={matchNode:Rg,matchName:om,match:function(e,t,n,r){var o;return r?rm(e,r,t,n):(r=e.selection.getNode(),!!rm(e,r,t,n)||!((o=e.selection.getStart())===r||!rm(e,o,t,n)))},matchAll:function(e,t,n){var r=[],o={},i=e.selection.getStart();return e.dom.getParent(i,(function(i){for(var a,u=0;u<t.length;u++)a=t[u],!o[a]&&Rg(e,i,a,n)&&(o[a]=!0,r.push(a))}),e.dom.getRoot()),r},canApply:function(e,t){var n,r,o,i,a=e.formatter.get(t),u=e.dom;if(a)for(t=e.selection.getStart(),n=Ps.getParents(u,t),o=a.length-1;0<=o;o--){if(!(i=a[o].selector)||a[o].defaultBlock)return!0;for(r=n.length-1;0<=r;r--)if(u.is(n[r],i))return!0}return!1},matchesUnInheritedFormatSelector:_g},Mg=function(e,t){return e.splitText(t)},Pg=function(e){var t=e.startContainer,n=e.startOffset,r=e.endContainer;e=e.endOffset;return t===r&&Ue.isText(t)?0<n&&n<t.nodeValue.length&&(t=(r=Mg(t,n)).previousSibling,n<e?(t=r=Mg(r,e-=n).previousSibling,e=r.nodeValue.length,n=0):e=0):(Ue.isText(t)&&0<n&&n<t.nodeValue.length&&(t=Mg(t,n),n=0),Ue.isText(r)&&0<e&&e<r.nodeValue.length&&(e=(r=Mg(r,e).previousSibling).nodeValue.length)),{startContainer:t,startOffset:n,endContainer:r,endOffset:e}},zg=function(e,t){var n=e.data.slice(t);n=n.length-n.replace(/^\s+/g,"").length;return am(e,t,n)},Ig=function(e,t){var n=e.data.slice(0,t);n=n.length-oe(n).length;return am(e,t-n,n)},Lg=function(e,t,n){var r=oe(e.data).length;return e.appendData(t.data),Di(yt.fromDom(t)),n&&zg(e,r),e},Fg=function(e,t){return ya(t)&&!1===(e=e,n=t,Ue.isText(n)&&/^[ \t\r\n]*$/.test(n.data)&&!1===um(e,n))||(e=t,Ue.isElement(e)&&"A"===e.nodeName&&e.hasAttribute("name"))||Hg(t);var n},Hg=Ue.hasAttribute("data-mce-bookmark"),Vg=Ue.hasAttribute("data-mce-bogus"),Ug=Ue.hasAttributeValue("data-mce-bogus","all"),jg={isEmpty:function(e){var t,n=e.dom(),r=0;if(Fg(n,n))return!1;if(!(t=n.firstChild))return!0;var o=new gi(t,n);do{if(Ug(t))t=o.next(!0);else if(Vg(t))t=o.next();else if(Ue.isBr(t))r++,t=o.next();else{if(Fg(n,t))return!1;t=o.next()}}while(t);return r<=1}},Wg=function(e,t){return e=e,r=(n=t).container(),o=n.offset(),!1===yc.isTextPosition(n)&&r===e.parentNode&&o>yc.before(e).offset()?yc(t.container(),t.offset()-1):t;var n,r,o},qg=function(e,t,n){return(e?fm:lm)(t,n)},$g={deleteElement:function(e,t,n,r){void 0===r&&(r=!0),f=t,d=e.getBody(),i=n.dom();var o,i,a,c,s,l,f=qg(f,d,i).map(u(Wg,i)),d=Da(n,u(mm,e),(o=e.getBody(),function(e){return e.dom()===o})),m=(a=f,f=i=n,c=Nt(e.schema.getTextInlineElements(),wt(f)),s=qt(i).filter(Ct),l=$t(i).filter(Ct),Di(i),yu(s,l,a,(function(e,t,n){e=e.dom(),t=t.dom();var r=e.data.length;return Lg(e,t,c),n.container()===t?yc(e,r):n})).orThunk((function(){return c&&(s.each((function(e){return Ig(e.dom(),e.dom().length)})),l.each((function(e){return zg(e.dom(),0)}))),a})));e.dom.isEmpty(e.getBody())?(e.setContent(""),e.selection.setCursorLocation()):d.bind(gm).fold((function(){r&&dm(e,t,m)}),(function(n){r&&dm(e,t,x.some(n))}))}},Gg=$a.ZWSP,Xg="_mce_caret",Yg=function(e,t){return e.importNode(t,!0)},Kg=function(e){if(e){var t=new gi(e,e);for(e=t.current();e;e=t.next())if(3===e.nodeType)return e}return null},Jg=function(e){var t=yt.fromTag("span");return de(t,{id:Xg,"data-mce-bogus":"1","data-mce-type":"format-caret"}),e&&Oi(t,yt.fromText(Gg)),t},Zg=function(e,t,n){void 0===n&&(n=!0);var r,o=e.dom,i=e.selection;hm(t)?$g.deleteElement(e,!1,yt.fromDom(t),n):(e=i.getRng(),n=o.getParent(t,o.isBlock),r=function(e){return e=Kg(e),e&&e.nodeValue.charAt(0)===Gg&&e.deleteData(0,1),e}(t),e.startContainer===r&&0<e.startOffset&&e.setStart(r,e.startOffset-1),e.endContainer===r&&0<e.endOffset&&e.setEnd(r,e.endOffset-1),o.remove(t,!0),n&&o.isEmpty(n)&&Ag.fillWithPaddingBr(yt.fromDom(n)),i.setRng(e))},Qg=function(e,t,n){var r=e.dom;e=r.getParent(n,u(Ps.isTextBlock,e));e&&r.isEmpty(e)?n.parentNode.replaceChild(t,n):(Ag.removeTrailingBr(yt.fromDom(n)),r.isEmpty(n)?n.parentNode.replaceChild(t,n):r.insertAfter(t,n))},eh=function(e,t){return e=y(e,(function(e,t){return vm(e,t.cloneNode(!1))}),t),vm(e,e.ownerDocument.createTextNode(Gg))},th=function(e){e.on("mouseup keydown",(function(t){var n,r,o;n=e,t=t.keyCode,r=n.selection,o=n.getBody(),pm(n,null,!1),8!==t&&46!==t||!r.isCollapsed()||r.getStart().innerHTML!==Gg||pm(n,Pc(o,r.getStart())),37!==t&&39!==t||pm(n,Pc(o,r.getStart()))}))},nh=function(e){return Mc(e.dom())&&hm(e.dom())},rh={},oh=An.filter,ih=An.each;function ah(e,t,n){return e.isChildOf(t,n)&&t!==n&&!e.isBlock(n)}function uh(e,t,n){var r,o=t[n?"startContainer":"endContainer"];t=t[n?"startOffset":"endOffset"];return Ue.isElement(o)&&(r=o.childNodes.length-1,!n&&t&&t--,o=o.childNodes[r<t?r:t]),Ue.isText(o)&&n&&t>=o.nodeValue.length&&(o=new gi(o,e.getBody()).next()||o),Ue.isText(o)&&!n&&0===t&&new gi(o,e.getBody()).prev()||o}function ch(e,t,n,r,o){return t=yt.fromDom(t),e=yt.fromDom(e.create(r,o)),r=(n?Xt:Gt)(t),Ni(e,r),n?(ki(t,e),Ei(e,t)):(Ti(t,e),Oi(e,t)),e.dom()}function sh(e,t,n){var r,o,i=new vh(e);if(t&&n&&(t=Oh(t,"previousSibling"),n=Oh(n,"nextSibling"),i.compare(t,n))){for(r=t.nextSibling;r&&r!==n;)r=(o=r).nextSibling,t.appendChild(o);return e.remove(n),_n.each(_n.grep(n.childNodes),(function(e){t.appendChild(e)})),t}return n}function lh(e,t){return u((function(t,n){return!(!n||!Ps.getStyle(e,n,t))}),t)}function fh(e,t,n){return u((function(t,n,r){e.setStyle(r,t,n),""===r.getAttribute("style")&&r.removeAttribute("style"),Ah(e,r)}),t,n)}function dh(e,t){var n;1===t.nodeType&&t.parentNode&&1===t.parentNode.nodeType&&(n=Ps.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 mh(e,t,n,r){function o(e,t){var o;t=t||b,e&&(t.onformat&&t.onformat(e,t,n,r),Lh(t.styles,(function(t,r){w.setStyle(e,r,Ps.replaceVars(t,n))})),t.styles&&(o=w.getAttrib(e,"style"))&&e.setAttribute("data-mce-style",o),Lh(t.attributes,(function(t,r){w.setAttrib(e,r,Ps.replaceVars(t,n))})),Lh(t.classes,(function(t){t=Ps.replaceVars(t,n),w.hasClass(e,t)||w.addClass(e,t)})))}function i(e,t){var n=!1;return!!b.selector&&(Lh(e,(function(e){if(!("collapsed"in e)||e.collapsed===y)return w.is(t,e.selector)&&!Mc(t)?(o(t,e),!(n=!0)):void 0})),n)}function a(r,a,u,c){var s=[],l=!0,f=b.inline||b.block,d=r.create(f);o(d),qs(r,a,(function(a){var u,m=function(a){var g,h=l,p=a.nodeName.toLowerCase(),y=a.parentNode.nodeName.toLowerCase();if(1===a.nodeType&&r.getContentEditable(a)&&(h=l,l="true"===r.getContentEditable(a),g=!0),Ps.isEq(p,"br"))return u=0,void(b.block&&r.remove(a));if(b.wrapper&&Bg.matchNode(e,a,t,n))u=0;else{if(l&&!g&&b.block&&!b.wrapper&&Ps.isTextBlock(e,p)&&Ps.isValid(e,y,f))return a=r.rename(a,f),o(a),s.push(a),void(u=0);if(b.selector){var w=i(v,a);if(!b.inline||w)return void(u=0)}!l||g||!Ps.isValid(e,f,p)||!Ps.isValid(e,y,f)||!c&&3===a.nodeType&&1===a.nodeValue.length&&65279===a.nodeValue.charCodeAt(0)||Mc(a)||b.inline&&r.isBlock(a)?(u=0,Lh(_n.grep(a.childNodes),m),g&&(l=h),u=0):(u||(u=r.clone(d,!1),a.parentNode.insertBefore(u,a),s.push(u)),u.appendChild(a))}};Lh(a,m)})),!0===b.links&&Lh(s,(function(e){var t=function(e){"A"===e.nodeName&&o(e,b),Lh(_n.grep(e.childNodes),t)};t(e)})),Lh(s,(function(i){var a,u,c,l=function(e){var t=!1;return Lh(e.childNodes,(function(e){if((n=e)&&1===n.nodeType&&!Ms.isBookmarkNode(n)&&!Mc(n)&&!Ue.isBogus(n))return t=e,!1;var n})),t};a=0,Lh(i.childNodes,(function(e){Ps.isWhiteSpaceNode(e)||Ms.isBookmarkNode(e)||a++})),u=a,(1<s.length||!r.isBlock(i))&&0===u?r.remove(i,1):(b.inline||b.wrapper)&&(b.exact||1!==u||((l=l(u=i))&&!Ms.isBookmarkNode(l)&&Bg.matchName(r,l,b)&&(c=r.clone(l,!1),o(c),r.replace(c,u,!0),r.remove(l,1)),i=c||u),Dh(e,v,n,i),Ph(e,b,t,n,i),Rh(r,b,n,i),Bh(r,b,n,i),Mh(r,b,n,i))}))}var u,c,s,l,f,d,m,g,h,p,v=e.formatter.get(t),b=v[0],y=!r&&e.selection.isCollapsed(),w=e.dom,x=e.selection;if("false"===w.getContentEditable(x.getNode())){r=x.getNode();for(var C=0,S=v.length;C<S;C++)if(v[C].ceFalseOverride&&w.is(r,v[C].selector))return void o(r,v[C])}else b&&(r?r.nodeType?i(v,r)||((c=w.createRng()).setStartBefore(r),c.setEndAfter(r),a(w,js.expandRng(e,c,v),0,!0)):a(w,r,0,!0):y&&b.inline&&!w.select("td[data-mce-selected],th[data-mce-selected]").length?(c=t,s=n,f=(u=e).selection,d=f.getRng(),m=d.startOffset,g=d.startContainer.nodeValue,(h=Pc(u.getBody(),f.getStart()))&&(l=Kg(h)),p=/[^\s\u00a0\u00ad\u200b\ufeff]/,g&&0<m&&m<g.length&&p.test(g.charAt(m))&&p.test(g.charAt(m-1))?(p=f.getBookmark(),d.collapse(!0),d=js.expandRng(u,d,u.formatter.get(c)),d=Pg(d),u.formatter.apply(c,s,d),f.moveToBookmark(p)):(h&&l.nodeValue===Gg||(l=(h=Yg(u.getDoc(),Jg(!0).dom())).firstChild,d.insertNode(h),m=1),u.formatter.apply(c,s,h),f.setCursorLocation(l,m))):(g=e.selection.getNode(),e.settings.forced_root_block||!v[0].defaultBlock||w.getParent(g,w.isBlock)||mh(e,v[0].defaultBlock),e.selection.setRng(Ih.normalize(e.selection.getRng())),p=Rc.getPersistentBookmark(e.selection,!0),a(w,js.expandRng(e,x.getRng(),v)),b.styles&&_h(w,b,n,g),x.moveToBookmark(p),Ps.moveStart(w,x,x.getRng()),e.nodeChanged()),hh(t,e))}function gh(e,t){var n=je({});e.set({}),t.on("NodeChange",(function(r){var o,i,a,u,c,s,l;o=t,r=r.element,i=n,l=e.get(),a=St(i.get()),u={},c={},s=I(Ps.getParents(o.dom,r),(function(e){return 1===e.nodeType&&!e.getAttribute("data-mce-bogus")})),Tt(l,(function(e,t){_n.each(s,(function(n){return o.formatter.matchNode(n,t,{},e.similar)?(-1===a.indexOf(t)&&(P(e.callbacks,(function(e){e(!0,{node:n,format:t,parents:s})})),u[t]=e.callbacks),c[t]=e.callbacks,!1):!Bg.matchesUnInheritedFormatSelector(o,n,t)&&void 0}))})),l=Hh(i.get(),c,r,s),i.set(G(G({},u),l))}))}Le=function(e){var t,n=e.selection.getRng(),r=Ue.matchNodeNames(["pre"]);n.collapsed||(t=e.selection.getSelectedBlocks(),ih(oh(oh(t,r),(function(e){return r(e.previousSibling)&&-1!==An.indexOf(t,e.previousSibling)})),(function(e){var t;t=e.previousSibling,mi(e=e).remove(),mi(t).append("<br><br>").append(e.childNodes)})))},rh[Ve="pre"]||(rh[Ve]=[]),rh[Ve].push(Le);var hh=function(e,t){ih(rh[e],(function(e){e(t)}))},ph=_n.each,vh=function(e){this.compare=function(t,n){if(t.nodeName!==n.nodeName)return!1;function r(t){var n={};return ph(e.getAttribs(t),(function(r){r=r.nodeName.toLowerCase(),0!==r.indexOf("_")&&"style"!==r&&0!==r.indexOf("data-")&&(n[r]=e.getAttrib(t,r))})),n}function o(e,t){var n,r;for(r in e)if(e.hasOwnProperty(r)){if(void 0===(n=t[r]))return;if(e[r]!==n)return;delete t[r]}for(r in t)if(t.hasOwnProperty(r))return;return 1}return!!o(r(t),r(n))&&!!o(e.parseStyle(e.getAttrib(t,"style")),e.parseStyle(e.getAttrib(n,"style")))&&!Ms.isBookmarkNode(t)&&!Ms.isBookmarkNode(n)}},bh=/^(src|href|style)$/,yh=_n.each,wh=Ps.isEq,xh=function(e,t,n,r){return e=e.create(n,r),t.parentNode.insertBefore(e,t),e.appendChild(t),e},Ch=function(e,t,n,r){return!(t=Ps.getNonWhiteSpaceSibling(t,n,r))||"BR"===t.nodeName||e.isBlock(t)},Sh=function(e,t,n,r,o){var i,a,u,c,s,l,f,d,m,g,h=e.dom;if(d=h,!(wh(l=r,(s=t).inline)||wh(l,s.block)||(s.selector?Ue.isElement(l)&&d.is(l,s.selector):void 0)||(d=r,t.links&&"A"===d.tagName)))return!1;if("all"!==t.remove)for(yh(t.styles,(function(e,i){e=Ps.normalizeStyleValue(h,Ps.replaceVars(e,n),i),"number"==typeof i&&(i=e,o=0),!t.remove_similar&&o&&!wh(Ps.getStyle(h,o,i),e)||h.setStyle(r,i,""),u=1})),u&&""===h.getAttrib(r,"style")&&(r.removeAttribute("style"),r.removeAttribute("data-mce-style")),yh(t.attributes,(function(e,i){var a;e=Ps.replaceVars(e,n),"number"==typeof i&&(i=e,o=0),!t.remove_similar&&o&&!wh(h.getAttrib(o,i),e)||("class"===i&&(e=h.getAttrib(r,i))&&(a="",yh(e.split(/\s+/),(function(e){/mce\-\w+/.test(e)&&(a+=(a?" ":"")+e)})),a)?h.setAttrib(r,i,a):("class"===i&&r.removeAttribute("className"),bh.test(i)&&r.removeAttribute("data-mce-"+i),r.removeAttribute(i)))})),yh(t.classes,(function(e){e=Ps.replaceVars(e,n),o&&!h.hasClass(o,e)||h.removeClass(r,e)})),a=h.getAttribs(r),i=0;i<a.length;i++){var p=a[i].nodeName;if(0!==p.indexOf("_")&&0!==p.indexOf("data-"))return!1}return"none"!==t.remove?(c=e,l=t,d=(s=r).parentNode,m=c.dom,g=Fl.getForcedRootBlock(c),l.block&&(g?d!==m.getRoot()||l.list_block&&wh(s,l.list_block)||yh(_n.grep(s.childNodes),(function(e){Ps.isValid(c,g,e.nodeName.toLowerCase())?f?f.appendChild(e):(f=xh(m,e,g),m.setAttribs(f,c.settings.forced_root_block_attrs)):f=0})):m.isBlock(s)&&!m.isBlock(d)&&(Ch(m,s,!1)||Ch(m,s.firstChild,!0,1)||s.insertBefore(m.create("br"),s.firstChild),Ch(m,s,!0)||Ch(m,s.lastChild,!1,1)||s.appendChild(m.create("br")))),l.selector&&l.inline&&!wh(l.inline,s)||m.remove(s,1),!0):void 0},kh={removeFormat:Sh,remove:function(e,t,n,r,o){function i(r){i=e,a=t,u=n,l=o,yh(Ps.getParents(i.dom,r.parentNode).reverse(),(function(e){var t;f||"_start"===e.id||"_end"===e.id||(t=Bg.matchNode(i,e,a,u,l))&&!1!==t.split&&(f=e)}));var i,a,u,l,f,d,m,g,h,p,v,b=e,y=c,w=f,x=r,C=!0,S=s,k=n,T=b.dom;if(w){for(v=w.parentNode,d=x.parentNode;d&&d!==v;d=d.parentNode){for(m=T.clone(d,!1),p=0;p<y.length;p++)if(Sh(b,y[p],k,m,m)){m=0;break}m&&(g&&m.appendChild(g),h=h||m,g=m)}!C||S.mixed&&T.isBlock(w)||(x=T.split(w,x)),g&&(r.parentNode.insertBefore(g,r),h.appendChild(r))}return x}function a(e){var t=f.get(e?"_start":"_end"),n=t[e?"firstChild":"lastChild"];return m(n)&&(n=n[e?"firstChild":"lastChild"]),Ue.isText(n)&&0===n.data.length&&(n=e?t.previousSibling||t.nextSibling:t.nextSibling||t.previousSibling),f.remove(t,!0),n}function u(t){var n,r,o,u=t.commonAncestorContainer;if(t=js.expandRng(e,t,c,!0),s.split){if(t=Pg(t),(n=uh(e,t,!0))!==(r=uh(e,t))){if(/^(TR|TH|TD)$/.test(n.nodeName)&&n.firstChild&&(n="TR"===n.nodeName?n.firstChild.firstChild||n:n.firstChild||n),u&&/^T(HEAD|BODY|FOOT|R)$/.test(u.nodeName)&&/^(TH|TD)$/.test(r.nodeName)&&r.firstChild&&(r=r.firstChild||r),ah(f,n,r))return o=x.from(n.firstChild).getOr(n),i(ch(f,o,!0,"span",{id:"_start","data-mce-type":"bookmark"})),a(!0);if(ah(f,r,n))return o=x.from(r.lastChild).getOr(r),i(ch(f,o,!1,"span",{id:"_end","data-mce-type":"bookmark"})),a(!1);n=xh(f,n,"span",{id:"_start","data-mce-type":"bookmark"}),r=xh(f,r,"span",{id:"_end","data-mce-type":"bookmark"}),i(n),i(r),n=a(!0),r=a()}else n=r=i(n);t.startContainer=n.parentNode||n,t.startOffset=f.nodeIndex(n),t.endContainer=r.parentNode||r,t.endOffset=f.nodeIndex(r)+1}qs(f,t,(function(t){yh(t,(function(t){g(t),Ue.isElement(t)&&"underline"===e.dom.getStyle(t,"text-decoration")&&t.parentNode&&"underline"===Ps.getTextDecoration(f,t.parentNode)&&Sh(e,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:"underline"}},null,t)}))}))}var c=e.formatter.get(t),s=c[0],l=!0,f=e.dom,d=e.selection,m=function(e){return Ms.isBookmarkNode(e)&&Ue.isElement(e)&&("_start"===e.id||"_end"===e.id)},g=function(t){var r,o,i,a,u;if(Ue.isElement(t)&&f.getContentEditable(t)&&(a=l,l="true"===f.getContentEditable(t),u=!0),r=_n.grep(t.childNodes),l&&!u)for(o=0,i=c.length;o<i&&!Sh(e,c[o],n,t,t);o++);if(s.deep&&r.length){for(o=0,i=r.length;o<i;o++)g(r[o]);u&&(l=a)}};if(r)r.nodeType?((k=f.createRng()).setStartBefore(r),k.setEndAfter(r),u(k)):u(r);else if("false"===f.getContentEditable(d.getNode())){r=d.getNode();for(var h=0,p=c.length;h<p&&(!c[h].ceFalseOverride||!Sh(e,c[h],n,r,r));h++);}else if(d.isCollapsed()&&s.inline&&!f.select("td[data-mce-selected],th[data-mce-selected]").length){var v,b,y=e,w=t,C=n,S=o,k=y.dom,T=y.selection,E=[],O=T.getRng(),N=O.startContainer,A=O.startOffset,D=N;for(3===N.nodeType&&(A!==N.nodeValue.length&&(v=!0),D=D.parentNode);D;){if(Bg.matchNode(y,D,w,C,S)){b=D;break}D.nextSibling&&(v=!0),E.push(D),D=D.parentNode}b&&(v?(A=T.getBookmark(),O.collapse(!0),N=js.expandRng(y,O,y.formatter.get(w),!0),N=Pg(N),y.formatter.remove(w,C,N),T.moveToBookmark(A)):(O=Pc(y.getBody(),b),N=Jg(!1).dom(),A=eh(E,N),Qg(y,N,O||b),Zg(y,O,!1),T.setCursorLocation(A,1),k.isEmpty(b)&&k.remove(b)))}else N=Rc.getPersistentBookmark(e.selection,!0),u(d.getRng()),d.moveToBookmark(N),s.inline&&Bg.match(e,t,n,d.getStart())&&Ps.moveStart(f,d,d.getRng()),e.nodeChanged()}},Th=_n.each,Eh=function(e){return e&&1===e.nodeType&&!Ms.isBookmarkNode(e)&&!Mc(e)&&!Ue.isBogus(e)},Oh=function(e,t){for(var n=e;n;n=n[t]){if(3===n.nodeType&&0!==n.nodeValue.length)return e;if(1===n.nodeType&&!Ms.isBookmarkNode(n))return n}return e},Nh=function(e,t,n){Th(e.childNodes,(function(e){Eh(e)&&(t(e)&&n(e),e.hasChildNodes()&&Nh(e,t,n))}))},Ah=function(e,t){"SPAN"===t.nodeName&&0===e.getAttribs(t).length&&e.remove(t,!0)},Dh=function(e,t,n,r){Th(t,(function(t){var o,i,a,u;Th(e.dom.select(t.inline,r),(function(r){Eh(r)&&kh.removeFormat(e,t,n,r,t.exact?r:null)})),o=e.dom,a=r,(i=t).clear_child_styles&&(u=i.links?"*:not(a)":"*",Th(o.select(u,a),(function(e){Eh(e)&&Th(i.styles,(function(t,n){o.setStyle(e,n,"")}))})))}))},_h=function(e,t,n,r){(t.styles.color||t.styles.textDecoration)&&(_n.walk(r,u(dh,e),"childNodes"),dh(e,r))},Rh=function(e,t,n,r){t.styles&&t.styles.backgroundColor&&Nh(r,lh(e,"fontSize"),fh(e,"backgroundColor",Ps.replaceVars(t.styles.backgroundColor,n)))},Bh=function(e,t,n,r){"sub"!==t.inline&&"sup"!==t.inline||(Nh(r,lh(e,"fontSize"),fh(e,"fontSize","")),e.remove(e.select("sup"===t.inline?"sub":"sup",r),!0))},Mh=function(e,t,n,r){r&&!1!==t.merge_siblings&&(r=sh(e,Ps.getNonWhiteSpaceSibling(r),r),sh(e,r,Ps.getNonWhiteSpaceSibling(r,!0)))},Ph=function(e,t,n,r,o){Bg.matchNode(e,o.parentNode,n,r)&&kh.removeFormat(e,t,r,o)||t.merge_with_parents&&e.dom.getParent(o.parentNode,(function(i){if(Bg.matchNode(e,i,n,r))return kh.removeFormat(e,t,r,o),!0}))},zh=function(e,t,r,o){var i=n.document.createRange();return i.setStart(e,t),i.setEnd(r,o),i},Ih={normalize:function(e){return e.collapsed?e:(t=e,n=yc.fromRangeStart(t),r=yc.fromRangeEnd(t),o=t.commonAncestorContainer,As.fromPosition(!1,o,r).map((function(e){return!rs(n,r,o)&&rs(n,e,o)?zh(n.container(),n.offset(),e.container(),e.offset()):t})).getOr(t));var t,n,r,o}},Lh=_n.each,Fh={applyFormat:mh},Hh=function(e,t,n,r){return ce(e,(function(e,o){if(Nt(t,o))return 1;P(e,(function(e){e(!1,{node:n,format:o,parents:r})}))})).t},Vh=function(e,t,n,r,o){var i,a,u;return null===t.get()&&gh(t,e),e=n,i=r,a=o,u=(o=t).get(),P(e.split(","),(function(e){u[e]||(u[e]={similar:a,callbacks:[]}),u[e].callbacks.push(i)})),o.set(u),{unbind:function(){return o=n,i=r,a=(e=t).get(),P(o.split(","),(function(e){a[e].callbacks=I(a[e].callbacks,(function(e){return e!==i})),0===a[e].callbacks.length&&delete a[e]})),void e.set(a);var e,o,i,a}}},Uh={get:function(e){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(t,n,r){_n.each(r,(function(n,r){e.setAttrib(t,r,n)}))}},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 _n.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 jh(e){function t(e,r){e&&("string"!=typeof e?_n.each(e,(function(e,n){t(n,e)})):(k(r)||(r=[r]),_n.each(r,(function(e){void 0===e.deep&&(e.deep=!e.selector),void 0===e.split&&(e.split=!e.selector||e.inline),void 0===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]=r))}var n={};return t(Uh.get(e.dom)),t(e.settings.formats),{get:function(e){return e?n[e]:n},has:function(e){return Nt(n,e)},register:t,unregister:function(e){return e&&n[e]&&delete n[e],n}}}function Wh(e,t){function n(e){var t,n;return o="string"==typeof e?{name:e,classes:[],attrs:{}}:e,e=Zh.create(o.name),t=e,(n=o).classes.length&&Zh.addClass(t,n.classes.join(" ")),Zh.setAttribs(t,n.attrs),e}function r(e,t,o){var i,u,c=0<t.length&&t[0],s=c&&c.name,l=function(e,t){return e="string"!=typeof e?e.nodeName.toLowerCase():e,e=a.getElementRule(e),e=e&&e.parentsRequired,!(!e||!e.length)&&(t&&-1!==_n.inArray(e,t)?t:e[0])}(e,s);if(l)s===l?(u=t[0],t=t.slice(1)):u=l;else if(c)u=t[0],t=t.slice(1);else if(!o)return e;return u&&(i=n(u)).appendChild(e),o&&(i||(i=Zh.create("div")).appendChild(e),_n.each(o,(function(t){t=n(t),i.insertBefore(t,e)}))),r(i,t,u&&u.siblings)}var o,i,a=t&&t.schema||br({});return e&&e.length?(o=e[0],t=n(o),(i=Zh.create("div")).appendChild(r(t,e.slice(1),o.siblings)),i):""}function qh(e){return e&&"string"==typeof e?(e=(e=e.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),_n.map(e.split(/(?:>|\s+(?![^\[\]]+\]))/),(function(e){e=_n.map(e.split(/(?:~\+|~|\+)/),Qh);var t=e.pop();return e.length&&(t.siblings=e),t})).reverse()):[]}function $h(e){var t=jh(e),n=je(null);return np.setup(e),th(e),{get:t.get,has:t.has,register:t.register,unregister:t.unregister,apply:u(Fh.applyFormat,e),remove:u(kh.remove,e),toggle:u(tp.toggle,e,t),match:u(Bg.match,e),matchAll:u(Bg.matchAll,e),matchNode:u(Bg.matchNode,e),canApply:u(Bg.canApply,e),formatChanged:u(Vh,e,n),getCssText:u(ep.getCssText,e)}}function Gh(e,t){var n=e.schema;t.remove_trailing_brs&&e.addNodeFilter("br",(function(e,r,o){var i,a,u,c,s,l,f,d=e.length,m=_n.extend({},n.getBlockElements()),g=n.getNonEmptyElements(),h=n.getNonEmptyElements();for(m.body=1,i=0;i<d;i++)if(u=(a=e[i]).parent,m[a.parent.name]&&a===u.lastChild){for(s=a.prev;s;){if("span"!==(l=s.name)||"bookmark"!==s.attr("data-mce-type")){if("br"!==l)break;if("br"===l){a=null;break}}s=s.prev}a&&(a.remove(),dp(n,g,h,u)&&(f=n.getElementRule(u.name))&&(f.removeEmpty?u.remove():f.paddEmpty&&sp(t,o,m,u)))}else{for(c=a;u&&u.firstChild===c&&u.lastChild===c&&!m[(c=u).name];)u=u.parent;c===u&&!0!==t.padd_empty_with_br&&((f=new il("#text",3)).value=" ",a.replace(f))}})),e.addAttributeFilter("href",(function(e){var n,r=e.length,o=function(e){return e.split(" ").filter((function(e){return 0<e.length})).concat(["noopener"]).sort().join(" ")};if(!t.allow_unsafe_link_target)for(;r--;)"a"===(n=e[r]).name&&"_blank"===n.attr("target")&&n.attr("rel",function(e){return e=e?_n.trim(e):"",/\b(noopener)\b/g.test(e)?e:o(e)}(n.attr("rel")))})),t.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;);})),t.fix_list_elements&&e.addNodeFilter("ul,ol",(function(e){for(var t,n,r=e.length;r--;)"ul"!==(n=(t=e[r]).parent).name&&"ol"!==n.name||(t.prev&&"li"===t.prev.name?t.prev.append(t):((n=new il("li",1)).attr("style","list-style-type: none"),t.wrap(n)))})),t.validate&&n.getValidClasses()&&e.addAttributeFilter("class",(function(e){for(var t,r,o,i,a,u,c,s=e.length,l=n.getValidClasses();s--;){for(r=(t=e[s]).attr("class").split(" "),a="",o=0;o<r.length;o++)i=r[o],c=!1,(u=l["*"])&&u[i]&&(c=!0),u=l[t.name],(c=!(c||!u||!u[i])||c)&&(a&&(a+=" "),a+=i);a.length||(a=null),t.attr("class",a)}}))}function Xh(e,t,n){-1===_n.inArray(t,n)&&(e.addAttributeFilter(n,(function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)})),t.push(n))}function Yh(e,t,n,r,o){return r=r,t=jl(t,n).serialize(r),n=e,r=t,!(e=o).no_events&&n?Cf.firePostProcess(n,Ef(e,{content:r})).content:r}function Kh(e,t){return{schema:(e=bp(e,t)).schema,addNodeFilter:e.addNodeFilter,addAttributeFilter:e.addAttributeFilter,serialize:e.serialize,addRules:e.addRules,setRules:e.setRules,addTempAttr:e.addTempAttr,getTempAttrs:e.getTempAttrs}}var Jh=_n.each,Zh=ji.DOM,Qh=function(e){var t,n={classes:[],attrs:{}};return"*"!==(e=n.selector=_n.trim(e))&&(t=e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,(function(e,t,r,o,i){switch(t){case"#":n.attrs.id=r;break;case".":n.classes.push(r);break;case":":-1!==_n.inArray("checked disabled enabled read-only required".split(" "),r)&&(n.attrs[r]=r)}return"["===o&&(t=i.match(/([\w\-]+)(?:\=\"([^\"]+))?/))&&(n.attrs[t[1]]=t[2]),""}))),n.name=t||"div",n},ep={getCssText:function(e,t){var n,r,o,i,a="",u=e.settings.preview_styles;if(!1===u)return"";function c(e){return e.replace(/%(\w+)/g,"")}if("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"),"string"==typeof t){if(!(t=e.formatter.get(t)))return;t=t[0]}return"preview"in t&&!1===(u=t.preview)?"":(n=t.block||t.inline||"span",o=(o=qh(t.selector)).length?(o[0].name||(o[0].name=n),n=t.selector,Wh(o,e)):Wh([n],e),r=Zh.select(n,o)[0]||o.firstChild,Jh(t.styles,(function(e,t){(e=c(e))&&Zh.setStyle(r,t,e)})),Jh(t.attributes,(function(e,t){(e=c(e))&&Zh.setAttrib(r,t,e)})),Jh(t.classes,(function(e){e=c(e),Zh.hasClass(r,e)||Zh.addClass(r,e)})),e.fire("PreviewFormats"),Zh.setStyles(o,{position:"absolute",left:-65535}),e.getBody().appendChild(o),i=Zh.getStyle(e.getBody(),"fontSize",!0),i=/px$/.test(i)?parseInt(i,10):0,Jh(u.split(" "),(function(t){var n=Zh.getStyle(r,t,!0);if(!("background-color"===t&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)&&(n=Zh.getStyle(e.getBody(),t,!0),"#ffffff"===Zh.toHex(n).toLowerCase())||"color"===t&&"#000000"===Zh.toHex(n).toLowerCase())){if("font-size"===t&&/em|%$/.test(n)){if(0===i)return;n=parseFloat(n)/(/%$/.test(n)?100:1)*i+"px"}"border"===t&&n&&(a+="padding:0 2px;"),a+=t+":"+n+";"}})),e.fire("AfterPreviewFormats"),Zh.remove(o),a)},parseSelector:qh,selectorToHtml:function(e,t){return Wh(qh(e),t)}},tp={toggle:function(e,t,n,r,o){t=t.get(n),!Bg.match(e,n,r,o)||"toggle"in t[0]&&!t[0].toggle?Fh.applyFormat(e,n,r,o):kh.remove(e,n,r,o)}},np={setup: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"])}},rp=function(e,t,n){e.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)})),e.addAttributeFilter("src,href,style",(function(e,r){for(var o,i,a=e.length,u="data-mce-"+r,c=t.url_converter,s=t.url_converter_scope;a--;)void 0!==(i=(o=e[a]).attr(u))?(o.attr(r,0<i.length?i:null),o.attr(u,null)):(i=o.attr(r),"style"===r?i=n.serializeStyle(n.parseStyle(i),o.name):c&&(i=c.call(s,i,r,o.name)),o.attr(r,0<i.length?i:null))})),e.addAttributeFilter("class",(function(e){for(var t,n,r=e.length;r--;)(t=e[r]).attr("class")&&(n=t.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),t.attr("class",0<n.length?n:null))})),e.addAttributeFilter("data-mce-type",(function(e,t,n){for(var r,o=e.length;o--;)"bookmark"!==(r=e[o]).attr("data-mce-type")||n.cleanup||(x.from(r.firstChild).exists((function(e){return!$a.isZwsp(e.value)}))?r.unwrap():r.remove())})),e.addNodeFilter("noscript",(function(e){for(var t,n=e.length;n--;)(t=e[n].firstChild)&&(t.value=ur.decode(t.value))})),e.addNodeFilter("script,style",(function(e,n){for(var r,o,i,a=e.length,u=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,"")};a--;)o=(r=e[a]).firstChild?r.firstChild.value:"","script"===n?((i=r.attr("type"))&&r.attr("type","mce-no/type"===i?null:i.replace(/^mce\-/,"")),"xhtml"===t.element_format&&0<o.length&&(r.firstChild.value="// <![CDATA[\n"+u(o)+"\n// ]]>")):"xhtml"===t.element_format&&0<o.length&&(r.firstChild.value="\x3c!--\n"+u(o)+"\n--\x3e")})),e.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))})),e.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")})),e.addAttributeFilter("data-mce-type",(function(t){P(t,(function(t){"format-caret"===t.attr("data-mce-type")&&(t.isEmpty(e.schema.getNonEmptyElements())?t.remove():t.unwrap())}))})),e.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)}))},op=function(e){function t(e){return e&&"br"===e.name}var n;e=e.lastChild;t(e)&&t(n=e.prev)&&(e.remove(),n.remove())},ip=function(e,t,r){return c=r,(u=e)&&u.hasEventListeners("PreProcess")&&!c.no_events?(u=t,c=r,e=(r=e).dom,u=u.cloneNode(!0),(o=n.document.implementation).createHTMLDocument&&(i=o.createHTMLDocument(""),_n.each("BODY"===u.nodeName?u.childNodes:[u],(function(e){i.body.appendChild(i.importNode(e,!0))})),u="BODY"!==u.nodeName?i.body.firstChild:i.body,a=e.doc,e.doc=i),Cf.firePreProcess(r,Ef(c,{node:u})),a&&(e.doc=a),u):t;var o,i,a,u,c},ap=function(e,t,n){e.addNodeFilter("font",(function(e){P(e,(function(e){var r,o=t.parse(e.attr("style")),i=e.attr("color"),a=e.attr("face"),u=e.attr("size");i&&(o.color=i),a&&(o["font-family"]=a),u&&(o["font-size"]=n[parseInt(e.attr("size"),10)-1]),e.name="span",e.attr("style",t.serialize(o)),r=e,P(["color","face","size"],(function(e){r.attr(e,null)}))}))}))},up=function(e,t){e.addNodeFilter("strike",(function(e){P(e,(function(e){var n=t.parse(e.attr("style"));n["text-decoration"]="line-through",e.name="span",e.attr("style",t.serialize(n))}))}))},cp=function(e,t){var n;t.inline_styles&&(e=e,t=t,n=kr(),t.convert_fonts_to_spans&&ap(e,n,_n.explode(t.font_size_legacy_values)),up(e,n))},sp=function(e,t,n,r){(e.padd_empty_with_br||t.insert)&&n[r.name]?r.empty().append(new il("br",1)).shortEnded=!0:r.empty().append(new il("#text",3)).value=" "},lp=function(e,t){return e&&e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.name===t},fp=function(e,t){return e=e.getElementRule(t.name),e&&e.paddEmpty},dp=function(e,t,n,r){return r.isEmpty(t,n,(function(t){return fp(e,t)}))},mp=_n.makeMap,gp=_n.each,hp=_n.explode,pp=_n.extend,vp=function(e,t){void 0===t&&(t=br());var n={},r=[],o={},i={},a=((e=e||{}).validate=!("validate"in e)||e.validate,e.root_name=e.root_name||"body",function(e){var t,a,u=e.name;u in n&&((a=o[u])?a.push(e):o[u]=[e]),t=r.length;for(;t--;)(u=r[t].name)in e.attributes.map&&((a=i[u])?a.push(e):i[u]=[e]);return e}),u={schema:t,addAttributeFilter:function(e,t){gp(hp(e),(function(e){for(var n=0;n<r.length;n++)if(r[n].name===e)return void r[n].callbacks.push(t);r.push({name:e,callbacks:[t]})}))},getAttributeFilters:function(){return[].concat(r)},addNodeFilter:function(e,t){gp(hp(e),(function(e){var r=n[e];r||(n[e]=r=[]),r.push(t)}))},getNodeFilters:function(){var e,t=[];for(e in n)n.hasOwnProperty(e)&&t.push({name:e,callbacks:n[e]});return t},filterNode:a,parse:function(u,c){function s(){function n(e){e&&((i=e.firstChild)&&3===i.type&&(i.value=i.value.replace(N,"")),(i=e.lastChild)&&3===i.type&&(i.value=i.value.replace(A,"")))}var r,o,i=B.firstChild;if(t.isValidChild(B.name,E.toLowerCase())){for(;i;)r=i.next,3===i.type||1===i.type&&"p"!==i.name&&!y[i.name]&&!i.attr("data-mce-type")?(o||((o=l(E,1)).attr(e.forced_root_block_attrs),B.insert(o,i)),o.append(i)):(n(o),o=null),i=r;n(o)}}function l(e,t){var r;t=new il(e,t);return e in n&&((r=o[e])?r.push(t):o[e]=[t]),t}function f(e){for(var n,r=t.getBlockElements(),o=e.prev;o&&3===o.type;){if(0<(n=o.value.replace(A,"")).length)return o.value=n;if(n=o.next){if(3===n.type&&n.value.length){o=o.prev;continue}if(!r[n.name]&&"script"!==n.name&&"style"!==n.name){o=o.prev;continue}}n=o.prev,o.remove(),o=n}}var d,m,g,h,p,v,b,y,w,x=[],C=(c=c||{},o={},i={},y=pp(mp("script,style,head,html,body,title,meta,param"),t.getBlockElements()),t.getNonEmptyElements()),S=t.children,k=e.validate,T=("forced_root_block"in c?c:e).forced_root_block,E=!1===(T=T)?"":!0===T?"p":T,O=t.getWhiteSpaceElements(),N=/^[ \t\r\n]+/,A=/[ \t\r\n]+$/,D=/[ \t\r\n]+/g,_=/^[ \t\r\n]+$/,R=O.hasOwnProperty(c.context)||O.hasOwnProperty(e.root_name),B=(T=Il({validate:k,allow_script_urls:e.allow_script_urls,allow_conditional_comments:e.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}(t.getSelfClosingElements()),cdata:function(e){w.append(l("#cdata",4)).value=e},text:function(e,t){var n,r;R||(e=e.replace(D," "),n=w.lastChild,r=y,n&&(r[n.name]||"br"===n.name)&&(e=e.replace(N,""))),0!==e.length&&((r=l("#text",3)).raw=!!t,w.append(r).value=e)},comment:function(e){w.append(l("#comment",8)).value=e},pi:function(e,t){w.append(l(e,7)).value=t,f(w)},doctype:function(e){w.append(l("#doctype",10)).value=e,f(w)},start:function(e,n,o){var a,u,c,s=k?t.getElementRule(e):{};if(s){for((a=l(s.outputName||e,1)).attributes=n,a.shortEnded=o,w.append(a),(s=S[w.name])&&S[a.name]&&!s[a.name]&&x.push(a),u=r.length;u--;)(c=r[u].name)in n.map&&((v=i[c])?v.push(a):i[c]=[a]);y[e]&&f(a),o||(w=a),!R&&O[e]&&(R=!0)}},end:function(n){var r,o,i,a=k?t.getElementRule(n):{};if(a){if(y[n]&&!R){if((r=w.firstChild)&&3===r.type)if(0<(o=r.value.replace(N,"")).length)r.value=o,r=r.next;else for(i=r.next,r.remove(),r=i;r&&3===r.type;)o=r.value,i=r.next,0!==o.length&&!_.test(o)||(r.remove(),r=i),r=i;if((r=w.lastChild)&&3===r.type)if(0<(o=r.value.replace(A,"")).length)r.value=o,r=r.prev;else for(i=r.prev,r.remove(),r=i;r&&3===r.type;)o=r.value,i=r.prev,0!==o.length&&!_.test(o)||(r.remove(),r=i),r=i}if(R&&O[n]&&(R=!1),a.removeEmpty&&dp(t,C,O,w)&&!w.attr("name")&&!w.attr("id"))return n=w.parent,y[w.name]?w.empty().remove():w.unwrap(),void(w=n);a.paddEmpty&&(lp(n=w,"#text")&&" "===n.firstChild.value||dp(t,C,O,w))&&sp(e,c,y,w),w=w.parent}}},t),w=new il(c.context||e.root_name,11));if(T.parse(u),k&&x.length)if(c.context)c.invalid=!0;else for(var M,P,z,I,L,F,H,V,U,j,W=x,q=mp("tr,td,th,tbody,thead,tfoot,table"),$=t.getNonEmptyElements(),G=t.getWhiteSpaceElements(),X=t.getTextBlockElements(),Y=t.getSpecialElements(),K=0;K<W.length;K++)if((M=W[K]).parent&&!M.fixed)if(X[M.name]&&"li"===M.parent.name){for(U=M.next;U&&X[U.name];)U.name="li",U.fixed=!0,M.parent.insert(U,M.parent),U=U.next;M.unwrap(M)}else{for(z=[M],P=M.parent;P&&!t.isValidChild(P.name,M.name)&&!q[P.name];P=P.parent)z.push(P);if(P&&1<z.length){for(z.reverse(),I=L=a(z[0].clone()),V=0;V<z.length-1;V++){for(t.isValidChild(L.name,z[V].name)?(F=a(z[V].clone()),L.append(F)):F=L,H=z[V].firstChild;H&&H!==z[V+1];)j=H.next,F.append(H),H=j;L=F}dp(t,$,G,I)?P.insert(M,z[0],!0):(P.insert(I,z[0],!0),P.insert(M,I)),P=z[0],(dp(t,$,G,P)||lp(P,"br"))&&P.empty().remove()}else M.parent&&("li"===M.name?!(U=M.prev)||"ul"!==U.name&&"ul"!==U.name?!(U=M.next)||"ul"!==U.name&&"ul"!==U.name?M.wrap(a(new il("ul",1))):U.insert(M,U.firstChild,!0):U.append(M):t.isValidChild(M.parent.name,"div")&&t.isValidChild("div",M.name)?M.wrap(a(new il("div",1))):Y[M.name]?M.empty().remove():M.unwrap())}if(E&&("body"===B.name||c.isRootContent)&&s(),!c.invalid){for(b in o)if(o.hasOwnProperty(b)){for(v=n[b],h=(d=o[b]).length;h--;)d[h].parent||d.splice(h,1);for(m=0,g=v.length;m<g;m++)v[m](d,b,c)}for(m=0,g=r.length;m<g;m++)if((v=r[m]).name in i){for(h=(d=i[v.name]).length;h--;)d[h].parent||d.splice(h,1);for(h=0,p=v.callbacks.length;h<p;h++)v.callbacks[h](d,v.name,c)}}return B}};return Gh(u,e),cp(u,e),u},bp=function(e,t){var n,r=["data-mce-selected"],o=t&&t.dom?t.dom:ji.DOM,i=t&&t.schema?t.schema:br(e);return e.entity_encoding=e.entity_encoding||"named",e.remove_trailing_brs=!("remove_trailing_brs"in e)||e.remove_trailing_brs,n=vp(e,i),rp(n,e,o),{schema:i,addNodeFilter:n.addNodeFilter,addAttributeFilter:n.addAttributeFilter,serialize:function(r,a){return a=Ef({format:"html"},a||{}),r=ip(t,r,a),r=function(e,t,n){return e=$a.trim(n.getInner?t.innerHTML:e.getOuterHTML(t)),n.selection||Kn(yt.fromDom(t))?e:_n.trim(e)}(o,r,a),r=function(e,t,n){return n=n.selection?Ef({forced_root_block:!1},n):n,e=e.parse(t,n),op(e),e}(n,r,a),"tree"===a.format?r:Yh(t,e,i,r,a)},addRules:function(e){i.addValidElements(e)},setRules:function(e){i.setValidElements(e)},addTempAttr:u(Xh,n,r),getTempAttrs:function(){return r}}};function yp(e){return{getBookmark:u(Ms.getBookmark,e),moveToBookmark:u(Ms.moveToBookmark,e)}}(yp=yp||{}).isBookmarkNode=Ms.isBookmarkNode;var wp=yp,xp=Ue.isContentEditableFalse,Cp=Ue.isContentEditableTrue,Sp=function(e,t){function r(e){var n,r,o,i=e.target;n=e,r=t.selection.getRng(),("longpress"===n.type||0===n.type.indexOf("touch")?(o=n.touches[0],!R(n.target)||Lm.isXYWithinRange(o.clientX,o.clientY,r)):!R(n.target)||Lm.isXYWithinRange(n.clientX,n.clientY,r))||e.isDefaultPrevented()||t.selection.select(i)}function o(e){var n,r,o;I(),L(),o=k.getPos(e,D),g=o.x,h=o.y,o=e.getBoundingClientRect(),n=o.width||o.right-o.left,r=o.height||o.bottom-o.top,c!==e&&(c=e,w=x=0),o=t.fire("ObjectSelected",{target:e}),M(e)&&!o.isDefaultPrevented()?T(_,(function(e,t){var o=k.get("mceResizeHandle"+t);o&&k.remove(o),o=k.add(D,"div",{id:"mceResizeHandle"+t,"data-mce-bogus":"all",class:"mce-resizehandle",unselectable:!0,style:"cursor:"+t+"-resize; margin:0; padding:0"}),11===On.ie&&(o.contentEditable=!1),k.bind(o,"mousedown",(function(t){t.stopImmediatePropagation(),t.preventDefault(),d=t.screenX,m=t.screenY,p=B(c).clientWidth,v=B(c).clientHeight,b=v/p,(f=e).startPos={x:n*e[0]+g,y:r*e[1]+h},C=D.scrollWidth,S=D.scrollHeight,s=c.cloneNode(!0),k.addClass(s,"mce-clonedresizable"),k.setAttrib(s,"data-mce-bogus","all"),s.contentEditable=!1,s.unSelectabe=!0,k.setStyles(s,{left:g,top:h,margin:0}),s.removeAttribute("data-mce-selected"),D.appendChild(s),k.bind(E,"mousemove",P),k.bind(E,"mouseup",z),O!==E&&(k.bind(O,"mousemove",P),k.bind(O,"mouseup",z)),l=k.add(D,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},p+" × "+v)})),e.elm=o,k.setStyles(o,{left:n*e[0]+g-o.offsetWidth/2,top:r*e[1]+h-o.offsetHeight/2})})):I(),c.setAttribute("data-mce-selected","1")}function i(n){function r(e,t){if(e)do{if(e===t)return 1}while(e=e.parentNode)}y||t.removed||(T(k.select("img[data-mce-selected],hr[data-mce-selected]"),(function(e){e.removeAttribute("data-mce-selected")})),n="mousedown"===n.type?n.target:e.getNode(),r(n=k.$(n).closest("table,img,figure.image,hr")[0],D)&&(u(),r(e.getStart(!0),n)&&r(e.getEnd(!0),n))?o(n):I())}function a(e){return xp(function(e,t){for(;t&&t!==e;){if(Cp(t)||xp(t))return t;t=t.parentNode}return null}(t.getBody(),e))}function u(){try{t.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(r){}}var c,s,l,f,d,m,g,h,p,v,b,y,w,x,C,S,k=t.dom,T=_n.each,E=t.getDoc(),O=n.document,N=Math.abs,A=Math.round,D=t.getBody(),_={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]},R=function(e){return e&&("IMG"===e.nodeName||t.dom.is(e,"figure.image"))},B=function(e){return t.dom.is(e,"figure.image")?e.querySelector("img"):e},M=function(e){var n=t.settings.object_resizing;return!1!==n&&!On.iOS&&("string"!=typeof n&&(n="table,img,figure.image,div"),"false"!==e.getAttribute("data-mce-resize")&&e!==t.getBody()&&Ft(yt.fromDom(e),n))},P=function(e){var n,r=e.screenX-d,o=e.screenY-m;w=r*f[2]+p,x=o*f[3]+v,w=w<5?5:w,x=x<5?5:x,(R(c)&&!1!==t.settings.resize_img_proportional?!xm.modifierPressed(e):xm.modifierPressed(e)||R(c)&&f[2]*f[3]!=0)&&(N(r)>N(o)?(x=A(w*b),w=A(x/b)):(w=A(x/b),x=A(w*b))),k.setStyles(B(s),{width:w,height:x}),e=f.startPos.x+r,n=f.startPos.y+o,k.setStyles(l,{left:e=0<e?e:0,top:n=0<n?n:0,display:"block"}),l.innerHTML=w+" × "+x,f[2]<0&&s.clientWidth<=w&&k.setStyle(s,"left",g+(p-w)),f[3]<0&&s.clientHeight<=x&&k.setStyle(s,"top",h+(v-x)),(r=D.scrollWidth-C)+(o=D.scrollHeight-S)!==0&&k.setStyles(l,{left:e-r,top:n-o}),y||(Cf.fireObjectResizeStart(t,c,p,v),y=!0)},z=function(){function e(e,n){n&&(c.style[e]||!t.schema.isValid(c.nodeName.toLowerCase(),e)?k.setStyle(B(c),e,n):k.setAttrib(B(c),e,n))}y=!1,e("width",w),e("height",x),k.unbind(E,"mousemove",P),k.unbind(E,"mouseup",z),O!==E&&(k.unbind(O,"mousemove",P),k.unbind(O,"mouseup",z)),k.remove(s),k.remove(l),o(c),Cf.fireObjectResized(t,c,w,x),k.setAttrib(c,"style",k.getAttrib(c,"style")),t.nodeChanged()},I=function(){var e,t;for(e in L(),c&&c.removeAttribute("data-mce-selected"),_)(t=k.get("mceResizeHandle"+e))&&(k.unbind(t),k.remove(t))},L=function(){for(var e in _)e=_[e],e.elm&&(k.unbind(e.elm),delete e.elm)};return t.on("init",(function(){u(),(On.browser.isIE()||On.browser.isEdge())&&(t.on("mousedown click",(function(e){var n=e.target,r=n.nodeName;y||!/^(TABLE|IMG|HR)$/.test(r)||a(n)||(2!==e.button&&t.selection.select(n,"TABLE"===r),"mousedown"===e.type&&t.nodeChanged())})),t.dom.bind(D,"mscontrolselect",(function(e){function n(e){En.setEditorTimeout(t,(function(){t.selection.select(e)}))}if(a(e.target))return e.preventDefault(),void n(e.target);/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"===e.target.tagName&&n(e.target))})));var e=En.throttle((function(e){t.composing||i(e)}));t.on("nodechange ResizeEditor ResizeWindow drop FullscreenStateChanged",e),t.on("keyup compositionend",(function(t){c&&"TABLE"===c.nodeName&&e(t)})),t.on("hide blur",I),t.on("contextmenu longpress",r,!0)})),t.on("remove",L),{isResizable:M,showResizeRect:o,hideResizeRect:I,updateResizeRect:i,destroy:function(){c=s=null}}};kp="height",Tp=function(e){var t=e.dom();return At(e)?t.getBoundingClientRect().height:t.offsetHeight};var kp,Tp,Ep={set:function(e,t){if(!N(t)&&!t.match(/^[0-9]+$/))throw new Error(kp+".set accepts only positive integer values. Value was "+t);e=e.dom(),le(e)&&(e.style[kp]=t+"px")},get:Op,getOuter:Op,aggregate:Np,max:function(e,t,n){return e=Np(e,n),e<t?t-e:0}};function Op(e){var t=Tp(e);return t<=0||null===t?(e=ge(e,kp),parseFloat(e)||0):t}function Np(e,t){return L(t,(function(t,n){return n=ge(e,n),n=void 0===n?0:parseInt(n,10),isNaN(n)?t:t+n}),0)}function Ap(e,t){return e.view(t).fold(i([]),(function(t){var n=e.owner(t);n=Ap(e,n);return[t].concat(n)}))}function Dp(e){var t=yt.fromDom(n.document),r=(t=Pi(t),function(e,t){return e=t.owner(e),Ap(t,e)}(e,Jp));e=bi(e),r=y(r,(function(e,t){return t=bi(t),{left:e.left+t.left(),top:e.top+t.top()}}),{left:0,top:0});return Ri(r.left+e.left()+t.left(),r.top+e.top()+t.top())}function _p(e){return"textarea"===wt(e)}function Rp(e,t){var n=function(e){var t=e.dom().ownerDocument,n=t.body,r=t.defaultView;t=t.documentElement;if(n===e.dom())return Ri(n.offsetLeft,n.offsetTop);var o=vi(r.pageYOffset,t.scrollTop),i=(r=vi(r.pageXOffset,t.scrollLeft),vi(t.clientTop,n.clientTop));t=vi(t.clientLeft,n.clientLeft);return bi(e).translate(r-t,o-i)}(e),r=Ep.get(e);return{element:e,bottom:n.top()+r,pos:n,cleanup:t}}function Bp(e,t,n,r){var o=e.pos;n?yi(o.left(),o.top(),r):(n=o.top()-t+(e.bottom-o.top()),yi(o.left(),n,r))}function Mp(e,t,n,r,o){r.pos.top()<t?Bp(r,n,!1!==o,e):r.bottom>n+t&&Bp(r,n,!0===o,e)}function Pp(e,t,n){return ev(e,u(nv),t,n)}function zp(e,t,n){return tv(e,Qp(t),u(nv),n)}function Ip(e,t,n){return ev(e,u(rv,e),t,n)}function Lp(e,t,n){return tv(e,Qp(t),u(rv,e),n)}function Fp(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(Vt(o[i],t))return x.some(dv(i,r));return x.none()}function Hp(e){var t=[];if(e)for(var n=0;n<e.rangeCount;n++)t.push(e.getRangeAt(n));return t}function Vp(e){return I(bv.getSelectedNodes(e),Yn)}function Up(e){return la(e,"td[data-mce-selected],th[data-mce-selected]")}function jp(e,t){return t=Up(t),e=Vp(e),0<t.length?t:e}function Wp(e,t){return F(e,(function(e){return"li"===wt(e)&&vd(e,t)})).fold(i([]),(function(t){return F(e,(function(e){return"ul"===wt(e)||"ol"===wt(e)})).map((function(e){return[yt.fromTag("li"),yt.fromTag(wt(e))]})).getOr([])}))}function qp(e,t){var n,r=yt.fromDom(t.commonAncestorContainer),o=(e=bd.parentsAndSelf(r,e),I(e,(function(e){return Mn(e)||Vn(e)})));e=Wp(e,t),t=o.concat(e.length?e:$n(n=r)?Wt(n).filter(qn).fold(i([]),(function(e){return[n,e]})):qn(n)?[n]:[]);return M(t,ja)}function $p(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 Gp(e,t,n,r){var o=e.getRoot(),i=!1,a=r[(n?"start":"end")+"Container"],u=r[(n?"start":"end")+"Offset"],c=(r=Ue.isElement(a)&&u===a.childNodes.length,e.schema.getNonEmptyElements()),s=n;if(Ka(a))return x.none();if(Ue.isElement(a)&&u>a.childNodes.length-1&&(s=!1),Ue.isDocument(a)&&(a=o,u=0),a===o){if(s&&(l=a.childNodes[0<u?u-1:0])){if(Ka(l))return x.none();if(c[l.nodeName]||Tv(l))return x.none()}if(a.hasChildNodes()){if(u=Math.min(!s&&0<u?u-1:u,a.childNodes.length-1),a=a.childNodes[u],u=Ue.isText(a)&&r?a.data.length:0,!t&&a===o.lastChild&&Tv(a))return x.none();if(Av(o,a)||Ka(a))return x.none();if(a.hasChildNodes()&&!1===Tv(a)){var l=a,f=new gi(a,o);do{if(Ue.isContentEditableFalse(l)||Ka(l)){i=!1;break}if(Ue.isText(l)&&0<l.nodeValue.length){u=s?0:l.nodeValue.length,a=l,i=!0;break}if(c[l.nodeName.toLowerCase()]&&!Ev(l)){u=e.nodeIndex(l),a=l.parentNode,s||u++,i=!0;break}}while(l=s?f.next():f.prev())}}}return t&&(Ue.isText(a)&&0===u&&Dv(e,r,t,!0,a).each((function(e){a=e.container(),u=e.offset(),i=!0})),Ue.isElement(a)&&(l=(l=a.childNodes[u])||a.childNodes[u-1])&&Ue.isBr(l)&&!Nv(l,"A")&&!Ov(e,l,!1)&&!Ov(e,l,!0)&&Dv(e,r,t,!0,l).each((function(e){a=e.container(),u=e.offset(),i=!0}))),s&&!t&&Ue.isText(a)&&u===a.nodeValue.length&&Dv(e,r,t,!1,a).each((function(e){a=e.container(),u=e.offset(),i=!0})),i?x.some(Lu(a,u)):x.none()}function Xp(e,t,n,r,o){var i=n?t.startContainer:t.endContainer,a=n?t.startOffset:t.endOffset;return x.from(i).map(yt.fromDom).map((function(e){return r&&t.collapsed?e:Kt(e,o(e,a)).getOr(e)})).bind((function(e){return xt(e)?x.some(e):Wt(e)})).map((function(e){return e.dom()})).getOr(e)}function Yp(e,t){for(var n=e;e&&Ue.isText(e)&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n}function Kp(e,t,n){var r;e&&e.hasOwnProperty(t)&&(0===(r=I(e[t],(function(e){return e!==n}))).length?delete e[t]:e[t]=r)}var Jp=Object.freeze({view:function(e){return(e.dom()===n.document?x.none():x.from(e.dom().defaultView.frameElement)).map(yt.fromDom)},owner:be}),Zp=function(e,t){t=t;e=0===(n=Yt(e=e)).length||_p(e)?{element:e,offset:t}:t<n.length&&!_p(n[t])?{element:n[t],offset:0}:(n=n[n.length-1],_p(n)?{element:e,offset:t}:"img"===wt(n)?{element:n,offset:1}:Ct(n)?{element:n,offset:tl(n).length}:{element:n,offset:Yt(n).length});var n,r=yt.fromHtml('<span data-mce-bogus="all">'+$a.ZWSP+"</span>");return ki(e.element,r),Rp(r,(function(){return Di(r)}))},Qp=function(e){return Rp(yt.fromDom(e),r)},ev=function(e,t,n,r){var o,i,a,u,c,s,l;o=e,l=function(o,i){var a,u,c,s,l;c=e,a=t,l=n,u=r,s=yt.fromDom(c.getBody()),c=yt.fromDom(c.getDoc()),Mt(s),s=Pi(c).top(),l=Zp(yt.fromDom(l.startContainer),l.startOffset),a(c,s,l,u),l.cleanup()},a=(i=n).startContainer,u=i.startOffset,c=i.endContainer,s=i.endOffset,l(yt.fromDom(a),yt.fromDom(c)),(l=o.dom.createRng()).setStart(a,u),l.setEnd(c,s),o.selection.setRng(i)},tv=function(e,t,n,r){e=yt.fromDom(e.getDoc()),n(e,Pi(e).top(),t,r)},nv=function(e,t,n,r){var o=e.dom().defaultView.innerHeight;Mp(e,t,o,n,r)},rv=function(e,t,r,o,i){var a=t.dom().defaultView.innerHeight;Mp(t,r,a,o,i),t=Dp(o.element),r=xi(n.window);t.top()<r.y()?wi(o.element,!1!==i):t.top()>r.bottom()&&wi(o.element,!0===i)},ov={scrollElementIntoView:function(e,t,n){e.fire("ScrollIntoView",{elm:t,alignToTop:n}).isDefaultPrevented()||(e.inline?zp:Lp)(e,t,n)},scrollRangeIntoView:function(e,t,n){(e.inline?Pp:Ip)(e,t,n)}},iv=function(e){return Ue.isContentEditableTrue(e)||Ue.isContentEditableFalse(e)},av=function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null},uv={fromPoint: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(o){r=function(e,t,n){var r=n.elementFromPoint(e,t),o=n.body.createTextRange();if(r&&"HTML"!==r.tagName||(r=n.body),o.moveToElementText(r),0<(n=(n=_n.toArray(o.getClientRects())).sort((function(e,n){return(e=Math.abs(Math.max(e.top-t,e.bottom-t)))-Math.abs(Math.max(n.top-t,n.bottom-t))}))).length){t=(n[0].bottom+n[0].top)/2;try{return o.moveToPoint(e,t),o.collapse(!0),o}catch(e){}}return null}(e,t,n)}return o=r,i=n.body,e=o&&o.parentElement?o.parentElement():null,Ue.isContentEditableFalse(av(e,i,iv))?null:o}return r}},cv={processRanges:function(e,t){return M(t,(function(t){var n=e.fire("GetSelectionRange",{range:t});return n.range!==t?n.range:t}))}},sv=function(e,t){var r=(t||n.document).createDocumentFragment();return P(e,(function(e){r.appendChild(e.dom())})),yt.fromDom(r)},lv=he("element","width","rows"),fv=he("element","cells"),dv=he("x","y"),mv=function(e,t){return e=parseInt(me(e,t),10),isNaN(e)?1:e},gv=function(e,t,n){return e=e.rows(),!!(e[n]?e[n].cells():[])[t]},hv=function(e){return L(e,(function(e,t){return t.cells().length>e?t.cells().length:e}),0)},pv=function(e,t,n,r,o){for(var i=[],a=e.rows(),u=n;u<=o;u++){var c=a[u].cells();c=t<r?c.slice(t,r+1):c.slice(r,t+1);i.push(fv(a[u].element(),c))}return i},vv={fromDom:function(e){var t=lv(ja(e),0,[]);return P(la(e,"tr"),(function(e,n){P(la(e,"td,th"),(function(r,o){for(var i=t,a=function(e,t,n){for(;gv(e,t,n);)t++;return t}(t,o,n),u=n,c=e,s=r,l=mv(s,"rowspan"),f=mv(s,"colspan"),d=i.rows(),m=u;m<u+l;m++){d[m]||(d[m]=fv(Wa(c),[]));for(var g=a;g<a+f;g++)d[m].cells()[g]=m===u&&g===a?s:ja(s)}}))})),lv(t.element(),hv(t.rows()),t.rows())},toDom:function(e){return t=M((e=e).rows(),(function(e){var t=M(e.cells(),(function(e){return e=Wa(e),_t(e,"colspan"),_t(e,"rowspan"),e}));e=ja(e.element());return Ni(e,t),e})),e=ja(e.element()),n=yt.fromTag("tbody"),Ni(n,t),Oi(e,n),e;var t,n},subsection:function(e,t,n){return Fp(e,t).bind((function(t){return Fp(e,n).map((function(n){return r=e,n=n,i=(o=t).x(),o=o.y(),a=n.x(),n=n.y(),i=o<n?pv(r,i,o,a,n):pv(r,i,n,a,o),lv(r.element(),hv(i),i);var r,o,i,a}))}))}},bv={getRanges:Hp,getSelectedNodes:function(e){return U(e,(function(e){return e=Ta(e),e?[yt.fromDom(e)]:[]}))},hasMultipleRanges:function(e){return 1<Hp(e).length}},yv={getCellsFromRanges:Vp,getCellsFromElement:Up,getCellsFromElementOrRanges:jp,getCellsFromEditor:function(e){return jp(bv.getRanges(e.selection.getSel()),yt.fromDom(e.getBody()))}},wv=function(){return sv([])},xv=function(e,t){var n=yt.fromDom(t.cloneContents());e=qp(e,t);return n=L(e,(function(e,t){return Oi(t,e),t}),n),0<e.length?sv([n]):n},Cv=function(e,t){return da(t,"table",u(Vt,e))},Sv={read:function(e,t){var n,r=yv.getCellsFromElementOrRanges(t,e);return 0<r.length?Cv(e,(n=r)[0]).bind((function(e){var t=n[0],r=n[n.length-1];e=vv.fromDom(e);return vv.subsection(e,t,r).map((function(e){return sv([vv.toDom(e)])}))})).getOrThunk(wv):(r=e,0<(e=t).length&&e[0].collapsed?wv():xv(r,e[0]))}},kv={getContent:function(e,t){return(t=void 0===t?{}:t).get=!0,t.format=t.format||"html",t.selection=!0,(t=e.fire("BeforeGetContent",t)).isDefaultPrevented()?(e.fire("GetContent",t),t.content):"text"===t.format?(u=e,x.from(u.selection.getRng()).map((function(e){e=u.dom.add(u.getBody(),"div",{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},e.cloneContents());var t=$a.trim(e.innerText);return u.dom.remove(e),t})).getOr("")):(t.getInner=!0,r=t,o=(n=e).selection.getRng(),i=n.dom.create("body"),a=n.selection.getSel(),a=cv.processRanges(n,bv.getRanges(a)),(a=r.contextual?Sv.read(yt.fromDom(n.getBody()),a).dom():o.cloneContents())&&i.appendChild(a),o=n.selection.serializer.serialize(i,r),"tree"===t.format?o:(t.content=e.selection.isCollapsed()?"":o,e.fire("GetContent",t),t.content));var n,r,o,i,a,u}},Tv=function(e){return e&&"TABLE"===e.nodeName},Ev=function(e){return e&&/^(TD|TH|CAPTION)$/.test(e.nodeName)},Ov=function(e,t,n){for(var r=new gi(t,e.getParent(t.parentNode,e.isBlock)||e.getRoot());t=r[n?"prev":"next"]();)if(Ue.isBr(t))return!0},Nv=function(e,t){return e.previousSibling&&e.previousSibling.nodeName===t},Av=function(e,t){for(;t&&t!==e;){if(Ue.isContentEditableFalse(t))return!0;t=t.parentNode}return!1},Dv=function(e,t,n,r,o){var i,a,u=e.getRoot(),c=e.schema.getNonEmptyElements(),s=e.getParent(o.parentNode,e.isBlock)||u;if(r&&Ue.isBr(o)&&t&&e.isEmpty(s))return x.some(Lu(o.parentNode,e.nodeIndex(o)));for(var l,f,d=new gi(o,s);a=d[r?"prev":"next"]();){if("false"===e.getContentEditableParent(a)||(f=u,Ka(l=a)&&!1===$p(l,f,Mc)))return x.none();if(Ue.isText(a)&&0<a.nodeValue.length)return!1===function(e,t,n){return $p(e,t,(function(e){return e.nodeName===n}))}(a,u,"A")?x.some(Lu(a,r?a.nodeValue.length:0)):x.none();if(e.isBlock(a)||c[a.nodeName.toLowerCase()])return x.none();i=a}return n&&i?x.some(Lu(i,0)):x.none()},_v={normalize:function(e,t){var n=t.collapsed,r=t.cloneRange(),o=Lu.fromRangeStart(t);return Gp(e,n,!0,r).each((function(e){n&&Lu.isAbove(o,e)||r.setStart(e.container(),e.offset())})),n||Gp(e,n,!1,r).each((function(e){r.setEnd(e.container(),e.offset())})),n&&r.collapse(!0),Sd(t,r)?x.none():x.some(r)}},Rv=function(e,t){e.insertData(0,t)},Bv=function(e){return 0===e.dom().length?(Di(e),x.none()):x.some(e)},Mv={setContent:function(e,t,n){var r,o,i,a,u;t=t,(o=(o=n)||{format:"html"}).set=!0,o.selection=!0,o.content=t,!(n=o).no_events&&(n=e.fire("BeforeSetContent",n)).isDefaultPrevented()?e.fire("SetContent",n):(t=e.selection.getRng(),o=(r=t).createContextualFragment(n.content),i=x.from(o.firstChild).map(yt.fromDom),a=x.from(o.lastChild).map(yt.fromDom),r.deleteContents(),r.insertNode(o),o=i.bind(qt).filter(Ct).bind(Bv),u=a.bind($t).filter(Ct).bind(Bv),bu(o,i.filter(Ct),(function(e,t){Rv(t.dom(),e.dom().data),Di(e)})),bu(u,a.filter(Ct),(function(e,t){var n=t.dom().length;t.dom().appendData(e.dom().data),r.setEnd(t.dom(),n),Di(e)})),r.collapse(!1),e.selection.setRng(t),ov.scrollRangeIntoView(e,t),n.no_events||e.fire("SetContent",n))}},Pv=function(e,t,n){return Xp(e,t,!0,n,(function(e,t){return Math.min(e.dom().childNodes.length,t)}))},zv=function(e,t,n){return Xp(e,t,!1,n,(function(e,t){return 0<t?t-1:t}))},Iv=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?Yp(r.nextSibling,!0):r.parentNode,o=0===a?Yp(o.previousSibling,!1):o.parentNode,r&&r===o))?r:n&&3===n.nodeType?n.parentNode:n):e},Lv=function(e,t,n,r){var o=[],i=e.getRoot();if(n=e.getParent(n||Pv(i,t,t.collapsed),e.isBlock),r=e.getParent(r||zv(i,t,t.collapsed),e.isBlock),n&&n!==i&&o.push(n),n&&r&&n!==r)for(var a,u=new gi(n,i);(a=u.next())&&a!==r;)e.isBlock(a)&&o.push(a);return r&&n!==r&&r!==i&&o.push(r),o},Fv=function(e,t,n){return x.from(t).map((function(t){var r=e.nodeIndex(t),o=e.createRng();return o.setStart(t.parentNode,r),o.setEnd(t.parentNode,r+1),n&&(kd(e,o,t,!0),kd(e,o,t,!1)),o}))};function Hv(e){return!(!e||!e.ownerDocument)&&Ut(yt.fromDom(e.ownerDocument),yt.fromDom(e))}function Vv(e,t,n,r){function o(e,t){return Mv.setContent(r,e,t)}function i(e){var t=a();t.collapse(!!e),u(t)}function a(){function n(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(e){return-1}}var o,i,a;if(!t)return null;if(null==(a=t.document))return null;if(void 0!==r.bookmark&&!1===wf.hasFocus(r)){var u=rf.getRng(r);if(u.isSome())return u.map((function(e){return cv.processRanges(r,[e])[0]})).getOr(a.createRange())}try{(o=p())&&!Ue.isRestrictedNode(o.anchorNode)&&(i=0<o.rangeCount?o.getRangeAt(0):(o.createRange?o:a).createRange())}catch(n){}return(i=(i=cv.processRanges(r,[i])[0])||(a.createRange?a.createRange():a.body.createTextRange())).setStart&&9===i.startContainer.nodeType&&i.collapsed&&(u=e.getRoot(),i.setStart(u,0),i.setEnd(u,0)),s&&l&&(0===n(i.START_TO_START,i,s)&&0===n(i.END_TO_END,i,s)?i=l:l=s=null),i}function u(e,t){var n;if(hw(e)){var o=gw(e)?e:null;if(o){l=null;try{o.select()}catch(e){}}else{if(o=p(),e=r.fire("SetSelectionRange",{range:e,forward:t}).range,o){l=e;try{o.removeAllRanges(),o.addRange(e)}catch(e){}!1===t&&o.extend&&(o.collapse(e.endContainer,e.endOffset),o.extend(e.startContainer,e.startOffset)),s=0<o.rangeCount?o.getRangeAt(0):null}e.collapsed||e.startContainer!==e.endContainer||!o.setBaseAndExtent||On.ie||e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()&&(n=e.startContainer.childNodes[e.startOffset])&&"IMG"===n.tagName&&(o.setBaseAndExtent(e.startContainer,e.startOffset,e.endContainer,e.endOffset),o.anchorNode===e.startContainer&&o.focusNode===e.endContainer||o.setBaseAndExtent(n,0,n,1)),r.fire("AfterSetSelectionRange",{range:e,forward:t})}}}function c(){var t,n,r=p();return!(r&&r.anchorNode&&r.focusNode)||((t=e.createRng()).setStart(r.anchorNode,r.anchorOffset),t.collapse(!0),(n=e.createRng()).setStart(r.focusNode,r.focusOffset),n.collapse(!0),t.compareBoundaryPoints(t.START_TO_START,n)<=0)}var s,l,f,d,m,g,h=function(e,t){return m||(m={},g={},d.on("NodeChange",(function(e){var t=e.element,n=f.getParents(t,null,f.getRoot()),r={};_n.each(m,(function(e,t){_n.each(n,(function(o){if(f.is(o,t))return g[t]||(_n.each(e,(function(e){e(!0,{node:o,selector:t,parents:n})})),g[t]=e),r[t]=e,!1}))})),_n.each(g,(function(e,o){r[o]||(delete g[o],_n.each(e,(function(e){e(!1,{node:t,selector:o,parents:n})})))}))}))),m[e]||(m[e]=[]),m[e].push(t),{unbind:function(){Kp(m,e,t),Kp(g,e,t)}}},p=function(){return t.getSelection?t.getSelection():t.document.selection},v={bookmarkManager:null,controlSelection:null,dom:f=e,win:t,serializer:n,editor:d=r,collapse:i,setCursorLocation:function(t,n){var o=e.createRng();t?(o.setStart(t,n),o.setEnd(t,n),u(o),i(!1)):(kd(e,o,r.getBody(),!0),u(o))},getContent:function(e){return kv.getContent(r,e)},setContent:o,getBookmark:function(e,t){return b.getBookmark(e,t)},moveToBookmark:function(e){return b.moveToBookmark(e)},select:function(t,n){return Fv(e,t,n).each(u),t},isCollapsed:function(){var e=a(),t=p();return!(!e||e.item)&&(e.compareEndPoints?0===e.compareEndPoints("StartToEnd",e):!t||e.collapsed)},isForward:c,setNode:function(t){return o(e.getOuterHTML(t)),t},getNode:function(){return Iv(r.getBody(),a())},getSel:p,setRng:u,getRng:a,getStart:function(e){return Pv(r.getBody(),a(),e)},getEnd:function(e){return zv(r.getBody(),a(),e)},getSelectedBlocks:function(t,n){return Lv(e,a(),t,n)},normalize:function(){var t=a(),n=p();return!bv.hasMultipleRanges(n)&&Td(r)?((n=_v.normalize(e,t)).each((function(e){u(e,c())})),n.getOr(t)):t},selectorChanged:function(e,t){return h(e,t),v},selectorChangedWithUnbind:h,getScrollContainer:function(){for(var t,n=e.getRoot();n&&"BODY"!==n.nodeName;){if(n.scrollHeight>n.clientHeight){t=n;break}n=n.parentNode}return t},scrollIntoView:function(e,t){return ov.scrollElementIntoView(r,e,t)},placeCaretAt:function(e,t){return u(uv.fromPoint(e,t,r.getDoc()))},getBoundingClientRect:function(){var e=a();return e.collapsed?yc.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:function(){t=s=l=null,y.destroy()}},b=wp(v),y=Sp(v,r);return v.bookmarkManager=b,v.controlSelection=y,v}function Uv(e,t){return Ue.isText(e.container())?ww(t,e.container()):ww(t,e.getNode())}function jv(e,t){return(t=t.get())&&e.container()===t&&Ya(t)}function Wv(e,t){if(!t)return t;var n=t.container(),r=t.offset();return e?Ya(n)?Ue.isText(n.nextSibling)?yc(n.nextSibling,0):yc.after(n):pa(t)?yc(n,r+1):t:Ya(n)?Ue.isText(n.previousSibling)?yc(n.previousSibling,n.previousSibling.data.length):yc.before(n):va(t)?yc(n,r-1):t}function qv(e,t,n){var r=Tw.normalizeForwards(n),o=Nw(t,r.container());return Tw.findRootInline(e,o,r).fold((function(){return As.nextPosition(o,r).bind(u(Tw.findRootInline,e,o)).map((function(e){return Ow.before(e)}))}),x.none)}function $v(e,t){return null===Pc(e,t)}function Gv(e,t,n){var r=Tw.normalizeBackwards(n);return Aw(e,t,r).bind((function(e){return As.prevPosition(e,r).isNone()?x.some(Ow.start(e)):x.none()}))}function Xv(e,t,n){var r=Tw.normalizeForwards(n);return Aw(e,t,r).bind((function(e){return As.nextPosition(e,r).isNone()?x.some(Ow.end(e)):x.none()}))}function Yv(e,t,n){var r=Tw.normalizeBackwards(n),o=Nw(t,r.container());return Tw.findRootInline(e,o,r).fold((function(){return As.prevPosition(o,r).bind(u(Tw.findRootInline,e,o)).map((function(e){return Ow.after(e)}))}),x.none)}function Kv(e){return e.fold(i("before"),i("start"),i("end"),i("after"))}function Jv(e,t){return e?t.fold(o(x.some,Ow.start),x.none,o(x.some,Ow.after),x.none):t.fold(x.none,o(x.some,Ow.before),x.none,o(x.some,Ow.end))}function Zv(e,t,n,r){var o=Tw.normalizePosition(e,r),i=_w(t,n,o);return _w(t,n,o).bind(u(Jv,e)).orThunk((function(){return o=e,a=t,c=n,s=i,l=Tw.normalizePosition(o,r),As.fromPosition(o,c,l).map(u(Tw.normalizePosition,o)).fold((function(){return s.map(Bw)}),(function(e){return _w(a,c,e).map(u(Mw,o,a,c,l,e)).filter(u(Pw,s))})).filter(Dw);var o,a,c,s,l}))}function Qv(e){return O(e.selection.getSel().modify)}function eb(e,t,n){var r=e?1:-1;return t.setRng(yc(n.container(),n.offset()+r).toRange()),t.getSel().modify("move",e?"forward":"backward","word"),!0}function tb(e){return!1!==e.settings.inline_boundaries}function nb(e,t,n){return function(){return!!tb(t)&&Iw(e,t)}}function rb(e,t){return e===bc.Backwards?t.reverse():t}function ob(e,t,n,r){for(var o,i,a,u=Ss(n),c=r,s=[];c&&(i=u,a=c,i=t===bc.Forwards?i.next(a):i.prev(a));){if(Ue.isBr(i.getNode(!1)))return t===bc.Forwards?{positions:rb(t,s).concat([i]),breakType:mw.Br,breakAt:x.some(i)}:{positions:rb(t,s),breakType:mw.Br,breakAt:x.some(i)};if(i.isVisible()){if(e(c,i))return a=c,o=i,o=Ue.isBr(o.getNode(t===bc.Forwards))?mw.Br:!1===rs(a,o)?mw.Block:mw.Wrap,{positions:rb(t,s),breakType:o,breakAt:x.some(i)};s.push(i),c=i}else c=i}return{positions:rb(t,s),breakType:mw.Eol,breakAt:x.none()}}function ib(e,t,n,r){return t(n,r).breakAt.map((function(r){var o=t(n,r).positions;return e===bc.Backwards?o.concat(r):[r].concat(o)})).getOr([])}function ab(e,t){return L(e,(function(e,n){return e.fold((function(){return x.some(n)}),(function(r){return bu(w(r.getClientRects()),w(n.getClientRects()),(function(e,o){return e=Math.abs(t-e.left),Math.abs(t-o.left)<=e?n:r})).or(e)}))}),x.none())}function ub(e,t){return w(t.getClientRects()).bind((function(t){return ab(e,t.left)}))}function cb(e,t,n,r){var o=e===bc.Forwards,i=o?Dm:_m;if(!r.collapsed){var a=Gw(r);if($w(a))return $d(e,t,a,e===bc.Backwards,!0)}a=ha(r.startContainer);var u=us(e,t.getBody(),r);return i(u)?Zm(t,u.getNode(!o)):(u=Tw.normalizePosition(o,n(u)))?i(u)?$d(e,t,u.getNode(!o),o,!0):(r=n(u))&&i(r)&&ls(u,r)?$d(e,t,r.getNode(!o),o,!0):a?Gd(t,u.toRange(),!0):null:a?r:null}function sb(e,t,n){var r,o=Ss(e.getBody()),i=u(ss,o.next);o=u(ss,o.prev);n.collapsed&&e.settings.forced_root_block&&(r=e.dom.getParent(n.startContainer,"PRE"))&&!(1===t?i:o)(yc.fromRangeStart(n))&&(i=function(e){return e=e.dom.create(Fl.getForcedRootBlock(e)),(!On.ie||11<=On.ie)&&(e.innerHTML='<br data-mce-bogus="1">'),e}(e),1===t?e.$(r).after(i):e.$(r).before(i),e.selection.select(i,!0),e.selection.collapse())}function lb(e,t){var n,r,o,i,a,u,c=t?1:-1,s=(t=t?Mm:Bm,e.selection.getRng());return n=c,r=e,t=t,a=Gw(o=s),o=us(n,r.getBody(),o),t=t(r.getBody(),Id(1),o),t=I(t,Ld(1)),u=An.last(o.getClientRects()),(Dm(o)||Nm(o))&&(a=o.getNode()),(_m(o)||Am(o))&&(a=o.getNode(!0)),(i=u?(o=u.left,(u=Ud(t,o))&&$w(u.node)?(t=Math.abs(o-u.left),i=Math.abs(o-u.right),$d(n,r,u.node,t<i,!0)):a?(t=zd(n,r.getBody(),Id(1),a),(u=Ud(I(t,Ld(1)),o))||(u=An.last(I(t,Ld(0))))?Gd(r,u.position.toRange(),!0):void 0):void 0):null)?i:(i=sb(e,c,s),null)}function fb(e,t,n,r,o){var i,a,u;n=la(yt.fromDom(n),"td,th,caption").map((function(e){return e.dom()})),e=I((i=e,U(n,(function(e){var t=Jw(gu(e.getBoundingClientRect()),-1);return[{x:t.left,y:i(t),cell:e},{x:t.right,y:i(t),cell:e}]}))),(function(e){return t(e,o)}));return a=r,u=o,L(e,(function(e,t){return e.fold((function(){return x.some(t)}),(function(e){var n=Math.sqrt(Math.abs(e.x-a)+Math.abs(e.y-u)),r=Math.sqrt(Math.abs(t.x-a)+Math.abs(t.y-u));return x.some(r<n?t:e)}))}),x.none()).map((function(e){return e.cell}))}function db(e,t){return w(t.getClientRects()).bind((function(t){return Zw(e,t.left,t.top)})).bind((function(e){return ub((n=e,As.lastPositionIn(n).map((function(e){return Uw(n,e).positions.concat(e)})).getOr([])),t);var n}))}function mb(e,t){return q(t.getClientRects()).bind((function(t){return Qw(e,t.left,t.top)})).bind((function(e){return ub((n=e,As.firstPositionIn(n).map((function(e){return[e].concat(jw(n,e).positions)})).getOr([])),t);var n}))}function gb(e,t){e.selection.setRng(t),ov.scrollRangeIntoView(e,t)}function hb(e,t,n){var r,o,i,a=e(t,n);return(i=a).breakType===mw.Wrap&&0===i.positions.length||!Ue.isBr(n.getNode())&&(i=a).breakType===mw.Br&&1===i.positions.length?(r=e,o=t,!a.breakAt.map((function(e){return r(o,e).breakAt.isSome()})).getOr(!1)):a.breakAt.isNone()}function pb(e,t,n,r){var o,i,a,u=e.selection.getRng(),c=t?1:-1;return!(!Qu()||(o=t,i=n,a=yc.fromRangeStart(u),!As.positionIn(!o,i).map((function(e){return e.isEqual(a)})).getOr(!1)))&&(u=$d(c,e,n,!t,!0),gb(e,u),!0)}function vb(e,t){return t=t.getNode(e),Ue.isElement(t)&&"TABLE"===t.nodeName?x.some(t):x.none()}function bb(e,t,n){var r=vb(!!t,n),o=!1===t;r.fold((function(){return gb(e,n.toRange())}),(function(r){return As.positionIn(o,e.getBody()).filter((function(e){return e.isEqual(n)})).fold((function(){return gb(e,n.toRange())}),(function(o){var i,a,u,c,s;i=t,a=e,u=r,c=n,(s=Fl.getForcedRootBlock(a))?a.undoManager.transact((function(){var e=yt.fromTag(s),t=(de(e,Fl.getForcedRootBlockAttrs(a)),Oi(e,yt.fromTag("br")),(i?Ti:ki)(yt.fromDom(u),e),a.dom.createRng());t.setStart(e.dom(),0),t.setEnd(e.dom(),0),gb(a,t)})):gb(a,c.toRange())}))}))}function yb(e,t,n,r){var o,i,a,u,c,s,l,f=e.selection.getRng(),d=(f=yc.fromRangeStart(f),e.getBody());return!t&&ex(r,f)?(c=d,o=db(s=n,l=f).orThunk((function(){return w(l.getClientRects()).bind((function(e){return ab(Ww(c,yc.before(s)),e.left)}))})).getOr(yc.before(s)),bb(e,t,o),!0):!(!t||!tx(r,f))&&(i=d,o=mb(a=n,u=f).orThunk((function(){return w(u.getClientRects()).bind((function(e){return ab(qw(i,yc.after(a)),e.left)}))})).getOr(yc.after(a)),bb(e,t,o),!0)}function wb(e){return B(["figcaption"],wt(e))}function xb(e){var t=n.document.createRange();return t.setStartBefore(e.dom()),t.setEndBefore(e.dom()),t}function Cb(e,t,n){(n?Oi:Ei)(e,t)}function Sb(e,t,n,r){return""===t?(o=e,i=r,a=yt.fromTag("br"),Cb(o,a,i),xb(a)):(o=e,i=r,a=t,e=n,a=yt.fromTag(a),r=yt.fromTag("br"),de(a,e),Oi(a,r),Cb(o,a,i),xb(r));var o,i,a}function kb(e,t,n){return t?(t=e.dom(),jw(t,n).breakAt.isNone()):(t=e.dom(),Uw(t,n).breakAt.isNone())}function Tb(e,t){var n=yt.fromDom(e.getBody()),r=yc.fromRangeStart(e.selection.getRng()),o=Fl.getForcedRootBlock(e),i=Fl.getForcedRootBlockAttrs(e);return function(e,t){return t=u(Vt,t),_a(yt.fromDom(e.container()),Un,t).filter(wb)}(r,n).exists((function(){var a;return!!kb(n,t,r)&&(a=Sb(n,o,i,t),e.selection.setRng(a),!0)}))}function Eb(e,t){return U(M(e,(function(e){return Ef({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:r},e)})),(function(e){return n=e,(r=t).keyCode===n.keyCode&&r.shiftKey===n.shiftKey&&r.altKey===n.altKey&&r.ctrlKey===n.ctrlKey&&r.metaKey===n.metaKey?[e]:[];var n,r}))}function Ob(e){t=Yt(e);var t;e=H(t,Un).fold((function(){return t}),(function(e){return t.slice(0,e)}));return P(e,Di),e}function Nb(e,t){t=bd.parentsAndSelf(t,e),F(t.reverse(),jg.isEmpty).each(Di)}function Ab(e,t,n){return bx(!0,t),bx(!1,n),vx(t,n).fold(u(px,e,t,n),u(hx,e,t,n))}function Db(e,t){return t=yt.fromDom(t),e=u(Vt,e),Da(t,Yn,e).isSome()}function _b(e){return cs(e).exists(jn)}function Rb(e,t,n){var r=I(bd.parentsAndSelf(yt.fromDom(n.container()),t),Un);r=w(r).getOr(t);return As.fromPosition(e,r.dom(),n).filter(_b)}function Bb(e,t){return cs(t).exists(jn)||Rb(!0,e,t).isSome()}function Mb(e,t){return x.from(t.getNode(!0)).map(yt.fromDom).exists(jn)||Rb(!1,e,t).isSome()}function Pb(e,t,n,r){function o(t){return Mn(yt.fromDom(t))&&!rs(n,r,e)}return oc(!t,n).fold((function(){return oc(t,r).fold(i(!1),o)}),o)}function zb(e,t,n,r){var o=r.getNode(!1===t);return ux.getParentBlock(yt.fromDom(e),yt.fromDom(n.getNode())).map((function(e){return jg.isEmpty(e)?Ox.remove(e.dom()):Ox.moveToElement(o)})).orThunk((function(){return x.some(Ox.moveToElement(o))}))}function Ib(e,t,n){return As.fromPosition(t,e,n).bind((function(r){return o=r.getNode(),Yn(yt.fromDom(o))||$n(yt.fromDom(o))||Pb(e,t,n,r)?x.none():t&&Ue.isContentEditableFalse(r.getNode())||!1===t&&Ue.isContentEditableFalse(r.getNode(!0))?zb(e,t,n,r):t&&_m(n)||!1===t&&Dm(n)?x.some(Ox.moveToPosition(r)):x.none();var o}))}function Lb(e,t,n){return function(e,t){return t=t.getNode(!1===e),e=e?"after":"before",Ue.isElement(t)&&t.getAttribute("data-mce-caret")===e}(t,n)?(r=t,o=n.getNode(!1===t),(r&&Ue.isContentEditableFalse(o.nextSibling)?x.some(Ox.moveToElement(o.nextSibling)):!1===r&&Ue.isContentEditableFalse(o.previousSibling)?x.some(Ox.moveToElement(o.previousSibling)):x.none()).fold((function(){return Ib(e,t,n)}),x.some)):Ib(e,t,n).bind((function(t){return r=e,o=n,t.fold((function(e){return x.some(Ox.remove(e))}),(function(e){return x.some(Ox.moveToElement(e))}),(function(e){return rs(o,e,r)?x.none():x.some(Ox.moveToPosition(e))}));var r,o}));var r,o}function Fb(e,t){for(;t&&t!==e;){if(Ue.isContentEditableTrue(t)||Ue.isContentEditableFalse(t))return t;t=t.parentNode}return null}function Hb(e,t){return{start:i(e),end:i(t)}}function Vb(e,t){return ma(yt.fromDom(e),"td,th",t)}function Ub(e,t){return da(e,"table",t)}function jb(e){return!1===Vt(e.start(),e.end())}function Wb(e){return la(e,"td,th")}function qb(e,t){var n=Vb(t.startContainer,e),r=Vb(t.endContainer,e);return t.collapsed?x.none():bu(n,r,Hb).fold((function(){return n.fold((function(){return r.bind((function(t){return Ub(t,e).bind((function(e){return w(Wb(e)).map((function(e){return Hb(e,t)}))}))}))}),(function(t){return Ub(t,e).bind((function(e){return q(Wb(e)).map((function(e){return Hb(t,e)}))}))}))}),(function(t){return $b(e,t)?x.none():(r=e,Ub((n=t).start(),r).bind((function(e){return q(Wb(e)).map((function(e){return Hb(n.start(),e)}))})));var n,r}))}function $b(e,t){return Gx(t,e).isSome()}function Gb(e,t){return Gx(e,t).map((function(t){return n=e,r=Wb(t=t),{rng:i(n),table:i(t),cells:i(r)};var n,r}))}function Xb(e,t){function n(e){return Vt(r,e)}var r,o,i;return r=e,i=n,e=Vb((o=t).startContainer,i),t=Vb(o.endContainer,i),bu(e,t,Hb).filter(jb).filter((function(e){return $b(i,e)})).orThunk((function(){return qb(i,o)})).bind((function(e){return Gb(e,n)}))}function Yb(e,t){return H(e,(function(e){return Vt(e,t)}))}function Kb(e){return bu(Yb((t=e).cells(),t.rng().start()),Yb(t.cells(),t.rng().end()),(function(e,n){return t.cells().slice(e,n+1)})).map((function(t){var n=e.cells();return t.length===n.length?$x.removeTable(e.table()):$x.emptyCells(t)}));var t}function Jb(e,t){return $g.deleteElement(e,!1,t),!0}function Zb(e,t,n){return Xb(t,n).bind(Kb).map((function(t){return t.fold(u(Jb,e),u(Xx,e))}))}function Qb(e,t){return F(bd.parentsAndSelf(t,e),Yn)}function ey(e,t){return Ag.fillWithPaddingBr(t),e.selection.setCursorLocation(t.dom(),0),x.some(!0)}function ty(e,t,n,r,o){return As.navigate(n,e.getBody(),o).bind((function(i){return u=r,c=n,s=o,l=i,As.firstPositionIn(u.dom()).bind((function(e){return As.lastPositionIn(u.dom()).map((function(t){return c?s.isEqual(e)&&l.isEqual(t):s.isEqual(t)&&l.isEqual(e)}))})).getOr(!0)?Zx(e,r):(a=r,Jx(t,yt.fromDom(i.getNode())).map((function(e){return!1===Vt(e,a)})));var a,u,c,s,l})).or(x.some(!0))}function ny(e,t){return(e?Nm:Am)(t)}function ry(e){return e=parseInt(e,10),isNaN(e)?0:e}function oy(e,t){return(e||"table"===wt(t)?"margin":"padding")+("rtl"===ge(t,"direction")?"-right":"-left")}function iy(e){var t=aC(e);return!0!==e.readonly&&(1<t.length||iC(e,t))}function ay(e){return qn(e)||$n(e)}function uy(e,t){var n=e.dom,r=e.selection,o=e.formatter,i=Fl.getIndentation(e),a=/[a-z%]+$/i.exec(i)[0],u=parseInt(i,10),c=Fl.shouldIndentUseMargin(e);i=Fl.getForcedRootBlock(e);e.queryCommandState("InsertUnorderedList")||e.queryCommandState("InsertOrderedList")||""!==i||n.getParent(r.getNode(),n.isBlock)||o.apply("div"),P(aC(e),(function(e){oC(n,t,c,u,a,e.dom())}))}function cy(e,t,n){return As.navigateIgnore(e,t,n,Tm)}function sy(e,t){return F(bd.parentsAndSelf(yt.fromDom(t.container()),e),Un)}function ly(e,t,n){return cy(e,t.dom(),n).forall((function(e){return sy(t,n).fold((function(){return!1===rs(e,n,t.dom())}),(function(r){return!1===rs(e,n,t.dom())&&Ut(r,yt.fromDom(e.container()))}))}))}function fy(e,t,n){return sy(t,n).fold((function(){return cy(e,t.dom(),n).forall((function(e){return!1===rs(e,n,t.dom())}))}),(function(t){return cy(e,t.dom(),n).isNone()}))}function dy(e){return x.from(e.dom.getParent(e.selection.getStart(!0),e.dom.isBlock))}function my(e,t){return e&&e.parentNode&&e.parentNode.nodeName===t}function gy(e){var t=e.parentNode;return/^(LI|DT|DD)$/.test(t.nodeName)?t:e}function hy(e,t,n){for(var r=e[n?"firstChild":"lastChild"];r&&!Ue.isElement(r);)r=r[n?"nextSibling":"previousSibling"];return r===t}function py(e){e.innerHTML='<br data-mce-bogus="1">'}function vy(e,t){return e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t}function by(e){return e&&"A"===e.nodeName&&"href"in e}function yy(e,t){t.fold(r,u(EC,e),u(OC,e),r)}function wy(e,t){return mC.getParentBlock(e).filter((function(e){return 0<t.length&&Ft(yt.fromDom(e),t)})).isSome()}function xy(e,t){return _C.shouldBlockNewLine(e)}function Cy(e){return function(t,n){return""===Fl.getForcedRootBlock(t)===e}}function Sy(e){return function(t,n){return mC.isListItemParentBlock(t)===e}}function ky(e){return BC("pre",e)}function Ty(e){return function(t,n){return Fl.shouldPutBrInPre(t)===e}}function Ey(e,t){return _C.shouldInsertBr(e)}function Oy(e,t){return t}function Ny(e){var t=Fl.getForcedRootBlock(e),n=mC.getEditableRoot(e.dom,e.selection.getStart());return n&&e.schema.isValidChild(n.nodeName,t||"P")}function Ay(e,t){return function(n,r){return L(e,(function(e,t){return e&&t(n,r)}),!0)?x.some(t):x.none()}}function Dy(e,t){var n=t.container(),r=t.offset();return Ue.isText(n)?(n.insertData(r,e),x.some(Lu(n,r+e.length))):cs(t).map((function(n){var r=yt.fromText(e);return(t.isAtEnd()?Ti:ki)(n,r),Lu(r.dom(),e.length)}))}function _y(e){return Lu.isTextPosition(e)&&!e.isAtStart()&&!e.isAtEnd()}function Ry(e,t){return t=I(bd.parentsAndSelf(yt.fromDom(t.container()),e),Un),w(t).getOr(e)}function By(e,t){return _y(t)?km(t):km(t)||As.prevPosition(Ry(e,t).dom(),t).exists(km)}function My(e,t){return _y(t)?Sm(t):Sm(t)||As.nextPosition(Ry(e,t).dom(),t).exists(Sm)}function Py(e){return cs(e).bind((function(e){return _a(e,xt)})).exists((function(e){return e=ge(e,"white-space"),B(["pre","pre-wrap"],e)}))}function zy(e,t){return n=t,As.prevPosition(e.dom(),n).isNone()||(n=t,As.nextPosition(e.dom(),n).isNone())||uC(e,t)||cC(e,t)||Mb(e,t)||Bb(e,t);var n}function Iy(e,t){r=(t=t).container(),n=t.offset();var n,r=Ue.isText(r)&&n<r.data.length?Lu(r,n+1):t;return!Py(r)&&(cC(e,r)||lC(e,r)||Bb(e,r)||My(e,r))}function Ly(e,t){return n=e,!Py(r=t)&&(uC(n,r)||sC(n,r)||Mb(n,r)||By(n,r))||Iy(e,t);var n,r}function Fy(e,t){return Cm(e.charAt(t))}function Hy(e){return e=e.container(),Ue.isText(e)&&ne(e.data," ")}function Vy(e){var t,n=e.data,r=(t=n.split(""),M(t,(function(e,n){return Cm(e)&&0<n&&n<t.length-1&&Ad(t[n-1])&&Ad(t[n+1])?" ":e})).join(""));return r!==n&&(e.data=r,!0)}function Uy(e,t){return x.some(t).filter(Hy).bind((function(t){var n,r,o,i,a=t.container();return n=e,o=(r=a).data,i=Lu(r,0),(!Fy(o,0)||Ly(n,i)?Vy(a):(r.data=" "+o.slice(1),1))||(n=e,r=(i=a).data,o=Lu(i,r.length-1),Fy(r,r.length-1)&&!Ly(n,o)&&(i.data=r.slice(0,-1)+" ",1))?x.some(t):x.none()}))}function jy(e,t){return function(n){return r=e,(!Py(n=n)&&(zy(r,n)||By(r,n)||My(r,n))?IC:LC)(t);var r}}function Wy(e,t){var n=UC(e);if(n)return"compositionstart"===t.type?(t.preventDefault(),t.stopPropagation(),void jC(e,n)):void(Ja(n)&&(jC(e,n),e.undoManager.add()))}function qy(e){function t(t,n){try{e.getDoc().execCommand(t,!1,n)}catch(t){}}function r(e){return e.isDefaultPrevented()}function o(){e.shortcuts.add("meta+a",null,"SelectAll")}function i(){function t(){var t=g.getAttribs(h.getStart().cloneNode(!1));return function(){var n=h.getStart();n!==e.getBody()&&(g.setAttrib(n,"style",null),f(t,(function(e){n.setAttributeNode(e.cloneNode(!0))})))}}function n(){return!h.isCollapsed()&&g.getParent(h.getStart(),g.isBlock)!==g.getParent(h.getEnd(),g.isBlock)}e.on("keypress",(function(o){var i;if(!r(o)&&(8===o.keyCode||46===o.keyCode)&&n())return i=t(),e.getDoc().execCommand("delete",!1,null),i(),o.preventDefault(),!1})),g.bind(e.getDoc(),"cut",(function(o){var i;!r(o)&&n()&&(i=t(),En.setEditorTimeout(e,(function(){i()})))}))}function a(){e.on("keydown",(function(e){if(!r(e)&&e.keyCode===d&&h.isCollapsed()&&0===h.getRng().startOffset){var t=h.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}}))}function u(){p.readonly||e.on("BeforeExecCommand mousedown",(function(){t("StyleWithCSS",!1),t("enableInlineTableEditing",!1),p.object_resizing||t("enableObjectResizing",!1)}))}function c(){e.on("SetContent ExecCommand",(function(e){"setcontent"!==e.type&&"mceInsertLink"!==e.command||f(g.select("a"),(function(e){var t=e.parentNode,n=g.getRoot();if(t.lastChild===e){for(;t&&!g.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}g.add(t,"br",{"data-mce-bogus":1})}}))}))}function s(){e.inline||(e.contentStyles.push("body {min-height: 150px}"),e.on("click",(function(t){"HTML"===t.target.nodeName&&(11<On.ie?e.getBody().focus():(t=e.selection.getRng(),e.getBody().focus(),e.selection.setRng(t),e.selection.normalize(),e.nodeChanged()))})))}function l(){e.on("dragstart",(function(t){var n;(t=t).dataTransfer&&(e.selection.isCollapsed()&&"IMG"===t.target.tagName&&h.select(t.target),0<(n=e.selection.getContent()).length&&(n=x+escape(e.id)+","+escape(n),t.dataTransfer.setData(C,n)))})),e.on("drop",(function(t){var n;r(t)||(n=(n=t).dataTransfer&&(n=n.dataTransfer.getData(C))&&0<=n.indexOf(x)?(n=n.substr(x.length).split(","),{id:unescape(n[0]),html:unescape(n[1])}):null)&&n.id!==e.id&&(t.preventDefault(),t=uv.fromPoint(t.x,t.y,e.getDoc()),h.setRng(t),t=n.html,n=!0,e.queryCommandSupported("mceInsertClipboardContent")?e.execCommand("mceInsertClipboardContent",!1,{content:t,internal:n}):e.execCommand("mceInsertContent",!1,t))}))}var f=_n.each,d=xm.BACKSPACE,m=xm.DELETE,g=e.dom,h=e.selection,p=e.settings,v=e.parser,b=On.gecko,y=On.ie,w=On.webkit,x="data:text/mce-internal,",C=y?"Text":"URL";function S(e){var t=g.create("body");e=e.cloneContents();return t.appendChild(e),h.serializer.serialize(t,{format:"html"})}return e.on("keydown",(function(t){var n,o,i,a;if(!r(t)&&t.keyCode===xm.BACKSPACE&&(n=(t=h.getRng()).startContainer,o=t.startOffset,i=g.getRoot(),a=n,t.collapsed&&0===o)){for(;a&&a.parentNode&&a.parentNode.firstChild===a&&a.parentNode!==i;)a=a.parentNode;"BLOCKQUOTE"===a.tagName&&(e.formatter.toggle("blockquote",null,a),(t=g.createRng()).setStart(n,0),t.setEnd(n,0),h.setRng(t))}})),e.on("keydown",(function(t){var n,o,i=t.keyCode;r(t)||i!==m&&i!==d||(i=e.selection.isCollapsed(),n=e.getBody(),i&&!g.isEmpty(n)||!i&&(i=e.selection.getRng(),i=S(i),(o=g.createRng()).selectNode(e.getBody()),i!==S(o))||(t.preventDefault(),e.setContent(""),n.firstChild&&g.isBlock(n.firstChild)?e.selection.setCursorLocation(n.firstChild,0):e.selection.setCursorLocation(n,0),e.nodeChanged()))})),On.windowsPhone||e.on("keyup focusin mouseup",(function(e){xm.modifierPressed(e)||h.normalize()}),!0),w&&(e.inline||g.bind(e.getDoc(),"mousedown mouseup",(function(t){var n;t.target===e.getDoc().documentElement&&(n=h.getRng(),e.getBody().focus(),"mousedown"===t.type?Ka(n.startContainer)||h.placeCaretAt(t.clientX,t.clientY):h.setRng(n))})),e.on("click",(function(t){var n=t.target;/^(IMG|HR)$/.test(n.nodeName)&&"false"!==g.getContentEditableParent(n)&&(t.preventDefault(),e.selection.select(n),e.nodeChanged()),"A"===n.nodeName&&g.hasClass(n,"mce-item-anchor")&&(t.preventDefault(),h.select(n))})),p.forced_root_block&&e.on("init",(function(){t("DefaultParagraphSeparator",Fl.getForcedRootBlock(e))})),e.on("init",(function(){e.dom.bind(e.getBody(),"submit",(function(e){e.preventDefault()}))})),a(),v.addNodeFilter("br",(function(e){for(var t=e.length;t--;)"Apple-interchange-newline"===e[t].attr("class")&&e[t].remove()})),On.iOS?(e.inline||e.on("keydown",(function(){n.document.activeElement===n.document.body&&e.getWin().focus()})),s(),e.on("click",(function(e){var t=e.target;do{if("A"===t.tagName)return void e.preventDefault()}while(t=t.parentNode)})),e.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")):o()),11<=On.ie&&(s(),a()),On.ie&&(o(),t("AutoUrlDetect",!1),l()),b&&(e.on("keydown",(function(t){if(!r(t)&&t.keyCode===d&&e.getBody().getElementsByTagName("hr").length&&h.isCollapsed()&&0===h.getRng().startOffset){var n=h.getNode(),o=n.previousSibling;if("HR"===n.nodeName)return g.remove(n),void t.preventDefault();o&&o.nodeName&&"hr"===o.nodeName.toLowerCase()&&(g.remove(o),t.preventDefault())}})),n.Range.prototype.getClientRects||e.on("mousedown",(function(t){var n;r(t)||"HTML"!==t.target.nodeName||((n=e.getBody()).blur(),En.setEditorTimeout(e,(function(){n.focus()})))})),i(),u(),c(),e.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"),On.mac&&e.on("keydown",(function(t){!xm.metaKeyPressed(t)||t.shiftKey||37!==t.keyCode&&39!==t.keyCode||(t.preventDefault(),e.selection.getSel().modify("move",37===t.keyCode?"backward":"forward","lineboundary"))})),a()),{refreshContentEditable:function(){},isHidden:function(){var t;return!(!b||e.removed)&&(!(t=e.selection.getSel())||!t.rangeCount||0===t.rangeCount)}}}function $y(e){return Ue.isElement(e)&&Wn(yt.fromDom(e))}function Gy(e){e.bindPendingEventDelegates(),e.initialized=!0,e.fire("init"),e.focus(!0),e.nodeChanged({initial:!0}),e.execCallback("init_instance_callback",e),QC(e)}function Xy(e){return{editorContainer:e,iframeContainer:e}}function Yy(e){return"-"===e.charAt(0)}function Ky(e,t,n){var r,o;ua(e,t)&&!1===n?(o=t,na(r=e)?r.dom().classList.remove(o):oa(r,o),aa(r)):n&&ia(e,t)}function Jy(e,t,n){try{e.getDoc().execCommand(t,!1,n)}catch(e){}}function Zy(e,t){e.dom().contentEditable=t?"true":"false"}function Qy(e,t){var n=yt.fromDom(e.getBody());Ky(n,"mce-content-readonly",t),t?(e.selection.controlSelection.hideResizeRect(),e._selectionOverrides.hideFakeCaret(),x.from(e.selection.getNode()).each((function(e){e.removeAttribute("data-mce-selected")})),e.readonly=!0,Zy(n,!1),P(la(n,'*[contenteditable="true"]'),(function(e){Dt(e,wS,"true"),Zy(e,!1)}))):(e.readonly=!1,Zy(n,!0),P(la(n,"*["+wS+'="true"]'),(function(e){_t(e,wS),Zy(e,!0)})),Jy(e,"StyleWithCSS",!1),Jy(e,"enableInlineTableEditing",!1),Jy(e,"enableObjectResizing",!1),wf.hasEditorOrUiFocus(e)&&e.focus(),e.selection.setRng(e.selection.getRng()),e.nodeChanged())}function ew(e){e.parser.addAttributeFilter("contenteditable",(function(t){xS(e)&&P(t,(function(e){e.attr(wS,e.attr("contenteditable")),e.attr("contenteditable","false")}))})),e.serializer.addAttributeFilter(wS,(function(t){xS(e)&&P(t,(function(e){e.attr("contenteditable",e.attr(wS))}))})),e.serializer.addTempAttr(wS)}function tw(e,t,r,o){var i=r[t.get()];r=r[o];try{r.activate()}catch(e){return void n.console.error("problem while activating editor mode "+o+":",e)}i.deactivate(),i.editorReadOnly!==r.editorReadOnly&&Qy(e,r.editorReadOnly),t.set(o),Cf.fireSwitchMode(e,o)}function nw(e){return _n.grep(e.childNodes,(function(e){return"LI"===e.nodeName}))}function rw(e){return e&&e.firstChild&&e.firstChild===e.lastChild&&(" "===(e=e.firstChild).data||Ue.isBr(e))}function ow(e){return 0<e.length&&DS(e[e.length-1])?e.slice(0,-1):e}function iw(e,t){return(t=e.getParent(t,e.isBlock))&&"LI"===t.nodeName?t:null}function aw(e,t){e.getDoc().execCommand(t,!1,null)}function uw(e,t,n){function r(t){return Bt(t,e)}return _a(yt.fromDom(n),(function(e){return r(e).isSome()}),(function(e){return Vt(yt.fromDom(t),e)})).bind(r)}function cw(e){return function(t,n){return x.from(n).map(yt.fromDom).filter(xt).bind((function(n){return uw(e,t,n.dom()).or((r=e,n=n.dom(),x.from(ji.DOM.getStyle(n,r,!0))));var r})).getOr("")}}function sw(e){return As.firstPositionIn(e.getBody()).map((function(e){return e=e.container(),Ue.isText(e)?e.parentNode:e}))}function lw(e){return x.from(e.selection.getRng()).bind((function(t){var n=e.getBody();return KS(t,n)?x.none():x.from(e.selection.getStart(!0))}))}function fw(e,t){var n,r;return/^[0-9\.]+$/.test(t)&&1<=(n=parseInt(t,10))&&n<=7?(r=Fl.getFontStyleValues(e),(e=Fl.getFontSizeClasses(e))?e[n-1]||t:r[n-1]||t):t}function dw(e,t){t=fw(e,t),e.formatter.toggle("fontname",{value:function(e){return e=e.split(/\s*,\s*/),M(e,(function(e){return-1===e.indexOf(" ")||ht(e,'"')||ht(e,"'")?e:'"'+e+'"'})).join(",")}(t)}),e.nodeChanged()}var mw,gw=function(e){return!!e.select},hw=function(e){return!!e&&(!!gw(e)||Hv(e.startContainer)&&Hv(e.endContainer))},pw=Ue.isText,vw=function(e){return pw(e)&&e.data[0]===$a.ZWSP},bw=function(e){return pw(e)&&e.data[e.data.length-1]===$a.ZWSP},yw=function(e){return e.ownerDocument.createTextNode($a.ZWSP)},ww=function(e,t){return e?pw((e=t).previousSibling)?(bw(e.previousSibling)||e.previousSibling.appendData($a.ZWSP),e.previousSibling):pw(e)?(vw(e)||e.insertData(0,$a.ZWSP),e):(n=yw(e),e.parentNode.insertBefore(n,e),n):pw((e=t).nextSibling)?(vw(e.nextSibling)||e.nextSibling.insertData(0,$a.ZWSP),e.nextSibling):pw(e)?(bw(e)||e.appendData($a.ZWSP),e):(n=yw(e),e.nextSibling?e.parentNode.insertBefore(n,e.nextSibling):e.parentNode.appendChild(n),n);var n},xw=u(ww,!0),Cw=u(ww,!1),Sw=function(e,t){return t.fold((function(t){return Uc.remove(e.get()),t=xw(t),e.set(t),x.some(yc(t,t.length-1))}),(function(t){return As.firstPositionIn(t).map((function(t){return jv(t,e)?yc(e.get(),1):(Uc.remove(e.get()),t=Uv(t,!0),e.set(t),yc(t,1))}))}),(function(t){return As.lastPositionIn(t).map((function(t){return jv(t,e)?yc(e.get(),e.get().length-1):(Uc.remove(e.get()),t=Uv(t,!1),e.set(t),yc(t,t.length-1))}))}),(function(t){return Uc.remove(e.get()),t=Cw(t),e.set(t),x.some(yc(t,1))}))},kw=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,Tw={isInlineTarget:function(e,t){return Ft(yt.fromDom(t),Fl.getInlineBoundarySelector(e))},findRootInline:function(e,t,n){return e=e,t=t,n=I(ji.DOM.getParents(n.container(),"*",t),e),x.from(n[n.length-1])},isRtl:function(e){return"rtl"===ji.DOM.getStyle(e,"direction",!0)||(e=e.textContent,kw.test(e))},isAtZwsp:function(e){return pa(e)||va(e)},normalizePosition:Wv,normalizeForwards:u(Wv,!0),normalizeBackwards:u(Wv,!1),hasSameParentBlock:function(e,t,n){return t=ns(t,e),n=ns(n,e),t&&t===n}},Ew=function(e,t){for(var n=0;n<e.length;n++){var r=e[n].apply(null,t);if(r.isSome())return r}return x.none()},Ow=Me([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),Nw=function(e,t){return t=ns(t,e),t||e},Aw=function(e,t,n){return Tw.findRootInline(e,t,n).filter(u($v,t))},Dw=function(e){return!1===Tw.isRtl(Rw(e))},_w=function(e,t,n){return Ew([qv,Gv,Xv,Yv],[e,t,n]).filter(Dw)},Rw=function(e){return e.fold(a,a,a,a)},Bw=function(e){return e.fold(Ow.before,Ow.before,Ow.after,Ow.after)},Mw=function(e,t,n,r,o,i){return bu(Tw.findRootInline(t,n,r),Tw.findRootInline(t,n,o),(function(t,r){return t!==r&&Tw.hasSameParentBlock(n,t,r)?Ow.after(e?t:r):i})).getOr(i)},Pw=function(e,t){return e.fold(i(!0),(function(e){return n=t,!(Kv(e=e)===Kv(n)&&Rw(e)===Rw(n));var n}))},zw={readLocation:_w,findLocation:Zv,prevLocation:u(Zv,!1),nextLocation:u(Zv,!0),getElement:Rw,outside:Bw,inside:function(e){return e.fold(Ow.start,Ow.start,Ow.end,Ow.end)}},Iw=function(e,t){var n=t.selection.getRng();n=e?yc.fromRangeEnd(n):yc.fromRangeStart(n);return!!Qv(t)&&(e&&pa(n)?eb(!0,t.selection,n):!(e||!va(n))&&eb(!1,t.selection,n))},Lw=function(e,t){var n=e.dom.createRng();n.setStart(t.container(),t.offset()),n.setEnd(t.container(),t.offset()),e.selection.setRng(n)},Fw=function(e,t){e?t.setAttribute("data-mce-selected","inline-boundary"):t.removeAttribute("data-mce-selected")},Hw=function(e,t,n){return Sw(t,n).map((function(t){return Lw(e,t),n}))},Vw={move:function(e,t,n){return function(){return!!tb(e)&&(o=t,i=n,a=(r=e).getBody(),c=yc.fromRangeStart(r.selection.getRng()),s=u(Tw.isInlineTarget,r),zw.findLocation(i,s,a,c).bind((function(e){return Hw(r,o,e)})).isSome());var r,o,i,a,c,s}},moveNextWord:u(nb,!0),movePrevWord:u(nb,!1),setupSelectedState:function(e){var t=je(null),n=u(Tw.isInlineTarget,e);return e.on("NodeChange",(function(r){var o,i,a,c,s,l;tb(e)&&(s=n,l=e.dom,c=r.parents,l=I(l.select('*[data-mce-selected="inline-boundary"]'),s),c=I(c,s),P(W(l,c),u(Fw,!1)),P(W(c,l),u(Fw,!0)),s=t,(c=e).selection.isCollapsed()&&!0!==c.composing&&s.get()&&(l=yc.fromRangeStart(c.selection.getRng()),yc.isTextPosition(l)&&!1===Tw.isAtZwsp(l)&&(Lw(c,Uc.removeAndReposition(s.get(),l)),s.set(null))),o=n,i=e,a=t,c=r.parents,i.selection.isCollapsed()&&(c=I(c,o),P(c,(function(e){var t=yc.fromRangeStart(i.selection.getRng());zw.readLocation(o,i.getBody(),t).bind((function(e){return Hw(i,a,e)}))}))))})),t},setCaretPosition:Lw},Uw=((ze=mw=mw||{})[ze.Br=0]="Br",ze[ze.Block=1]="Block",ze[ze.Wrap=2]="Wrap",ze[ze.Eol=3]="Eol",u(ob,Lu.isAbove,-1)),jw=u(ob,Lu.isBelow,1),Ww=u(ib,-1,Uw),qw=u(ib,1,jw),$w=Ue.isContentEditableFalse,Gw=Ta,Xw=function(e,t){return function(){a=t,r=Ss((n=e).getBody()),o=u(ss,r.next),r=u(ss,r.prev),i=a?bc.Forwards:bc.Backwards,a=a?o:r,o=n.selection.getRng();var n,r,o,i,a=(r=cb(i,n,a,o))||(r=sb(n,i,o),null);return!!a&&(e.selection.setRng(a),!0)}},Yw=function(e,t){return function(){var n=lb(e,t);return!!n&&(e.selection.setRng(n),!0)}},Kw=function(e,t){return function(){var n,r=t?yc.fromRangeEnd(e.selection.getRng()):yc.fromRangeStart(e.selection.getRng());r=(t?jw:Uw)(e.getBody(),r);return(t?q:w)(r.positions).filter((n=t,function(e){return(n?_m:Dm)(e)})).fold(i(!1),(function(t){return e.selection.setRng(t.toRange()),!0}))}},Jw=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}},Zw=u(fb,(function(e){return e.bottom}),(function(e,t){return e.y<t})),Qw=u(fb,(function(e){return e.top}),(function(e,t){return e.y>t})),ex=u(hb,Uw),tx=u(hb,jw),nx=function(e,t){return function(){return x.from(e.dom.getParent(e.selection.getNode(),"td,th")).bind((function(n){return x.from(e.dom.getParent(n,"table")).map((function(n){return pb(e,t,n)}))})).getOr(!1)}},rx=function(e,t){return function(){return x.from(e.dom.getParent(e.selection.getNode(),"td,th")).bind((function(n){return x.from(e.dom.getParent(n,"table")).map((function(r){return yb(e,t,r,n)}))})).getOr(!1)}},ox=function(e,t){return function(){return!!e.selection.isCollapsed()&&Tb(e,t)}},ix={match:Eb,action: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)}},execute:function(e,t){return F(Eb(e,t),(function(e){return e.action()}))}},ax=function(e,t){e.on("keydown",(function(n){var r,o,i;!1===n.isDefaultPrevented()&&(r=e,o=t,i=n,n=bt().os,ix.execute([{keyCode:xm.RIGHT,action:Xw(r,!0)},{keyCode:xm.LEFT,action:Xw(r,!1)},{keyCode:xm.UP,action:Yw(r,!1)},{keyCode:xm.DOWN,action:Yw(r,!0)},{keyCode:xm.RIGHT,action:nx(r,!0)},{keyCode:xm.LEFT,action:nx(r,!1)},{keyCode:xm.UP,action:rx(r,!1)},{keyCode:xm.DOWN,action:rx(r,!0)},{keyCode:xm.RIGHT,action:Vw.move(r,o,!0)},{keyCode:xm.LEFT,action:Vw.move(r,o,!1)},{keyCode:xm.RIGHT,ctrlKey:!n.isOSX(),altKey:n.isOSX(),action:Vw.moveNextWord(r,o)},{keyCode:xm.LEFT,ctrlKey:!n.isOSX(),altKey:n.isOSX(),action:Vw.movePrevWord(r,o)},{keyCode:xm.UP,action:ox(r,!1)},{keyCode:xm.DOWN,action:ox(r,!0)}],i).each((function(e){i.preventDefault()})))}))},ux={getParentBlock:function(e,t){return Ut(e,t)?_a(t,(function(e){return Wn(e)||$n(e)}),(n=e,function(e){return Vt(n,yt.fromDom(e.dom().parentNode))})):x.none();var n},paddEmptyBody:function(e){var t;e.dom.isEmpty(e.getBody())&&(e.setContent(""),t=(t=(e=e).getBody()).firstChild&&e.dom.isBlock(t.firstChild)?t.firstChild:t,e.selection.setCursorLocation(t,0))},willDeleteLastPositionInElement:function(e,t,n){return bu(As.firstPositionIn(n),As.lastPositionIn(n),(function(r,o){var i=Tw.normalizePosition(!0,r),a=Tw.normalizePosition(!1,o);r=Tw.normalizePosition(!1,t);return(e?As.nextPosition(n,r).map((function(e){return e.isEqual(a)&&t.isEqual(i)})):As.prevPosition(n,r).map((function(e){return e.isEqual(i)&&t.isEqual(a)}))).getOr(!1)})).getOr(!0)}},cx=function(e,t){return{from:i(e),to:i(t)}},sx=function(e,t){e=yt.fromDom(e);var n=yt.fromDom(t.container());return ux.getParentBlock(e,n).map((function(e){return n=t,{block:i(e),position:i(n)};var n}))},lx=function(e){return!1===Vt(e.from().block(),e.to().block())},fx=function(e){return Wt(e.from().block()).bind((function(t){return Wt(e.to().block()).filter((function(e){return Vt(t,e)}))})).isSome()},dx=function(e){return!1===Ue.isContentEditableFalse(e.from().block().dom())&&!1===Ue.isContentEditableFalse(e.to().block().dom())},mx=function(e,t,n){return Ue.isBr(n.position().getNode())&&!1===jg.isEmpty(n.block())?As.positionIn(!1,n.block().dom()).bind((function(r){return r.isEqual(n.position())?As.fromPosition(t,e,r).bind((function(t){return sx(e,t)})):x.some(n)})).getOr(n):n},gx=function(e,t,n){return n.collapsed?(o=t,t=n,t=sx(r=e,yc.fromRangeStart(t)),n=t.bind((function(e){return As.fromPosition(o,r,e.position()).bind((function(e){return sx(r,e).map((function(e){return mx(r,o,e)}))}))})),bu(t,n,cx).filter((function(e){return lx(e)&&fx(e)&&dx(e)}))):x.none();var r,o},hx=function(e,t,n,r){return jg.isEmpty(n)?(Ag.fillWithPaddingBr(n),As.firstPositionIn(n.dom())):(0===I(Gt(r),(function(e){return!jg.isEmpty(e)})).length&&jg.isEmpty(t)&&ki(r,yt.fromTag("br")),n=As.prevPosition(n.dom(),yc.before(r.dom())),P(Ob(t),(function(e){ki(r,e)})),Nb(e,t),n)},px=function(e,t,n){if(jg.isEmpty(n))return Di(n),jg.isEmpty(t)&&Ag.fillWithPaddingBr(t),As.firstPositionIn(t.dom());var r=As.lastPositionIn(n.dom());return P(Ob(t),(function(e){Oi(n,e)})),Nb(e,t),r},vx=function(e,t){return Ut(t,e)?(e=bd.parentsAndSelf(e,t),x.from(e[e.length-1])):x.none()},bx=function(e,t){As.positionIn(e,t.dom()).map((function(e){return e.getNode()})).map(yt.fromDom).filter(jn).each(Di)},yx=function(e,t,n,r){return t?Ab(e,r,n):Ab(e,n,r)},wx={backspaceDelete:function(e,t){var n=yt.fromDom(e.getBody()),r=gx(n.dom(),t,e.selection.getRng()).bind((function(e){return yx(n,t,e.from().block(),e.to().block())}));return r.each((function(t){e.selection.setRng(t.toRange())})),r.isSome()}},xx=function(e,t){var n=t.getRng();return bu(ux.getParentBlock(e,yt.fromDom(n.startContainer)),ux.getParentBlock(e,yt.fromDom(n.endContainer)),(function(r,o){return!1===Vt(r,o)&&(n.deleteContents(),yx(e,!0,r,o).each((function(e){t.setRng(e.toRange())})),!0)})).getOr(!1)},Cx=function(e,t){var n=As.prevPosition(e.dom(),yc.fromRangeStart(t)).isNone(),r=As.nextPosition(e.dom(),yc.fromRangeEnd(t)).isNone();return!(Db(e=e,(t=t).startContainer)||Db(e,t.endContainer))&&n&&r},Sx=function(e){return e.setContent(""),e.selection.setCursorLocation(),!0},kx={backspaceDelete:function(e,t){return!e.selection.isCollapsed()&&(e=e,n=yt.fromDom(e.getBody()),r=e.selection.getRng(),Cx(n,r)?Sx(e):xx(n,e.selection));var n,r}},Tx=u(Rb,!1),Ex=u(Rb,!0),Ox=Me([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),Nx=function(e,t,n){n=rc(t?1:-1,e,n),n=yc.fromRangeStart(n);var r=yt.fromDom(e);return!1===t&&_m(n)?x.some(Ox.remove(n.getNode(!0))):t&&Dm(n)?x.some(Ox.remove(n.getNode())):!1===t&&Dm(n)&&Mb(r,n)?Tx(r,n).map((function(e){return Ox.remove(e.getNode())})):t&&_m(n)&&Bb(r,n)?Ex(r,n).map((function(e){return Ox.remove(e.getNode())})):Lb(e,t,n)},Ax=function(e,t){return function(n){return e._selectionOverrides.hideFakeCaret(),$g.deleteElement(e,t,yt.fromDom(n)),!0}},Dx=function(e,t){return function(n){return n=t?yc.before(n):yc.after(n),e.selection.setRng(n.toRange()),!0}},_x=function(e){return function(t){return e.selection.setRng(t.toRange()),!0}},Rx=function(e,t){return x.from(Fb(e.getBody(),t))},Bx=function(e){P(la(e,".mce-offscreen-selection"),Di)},Mx={backspaceDelete:function(e,t){return e.selection.isCollapsed()?(i=t,a=(o=e).selection.getNode(),Rx(o,a).filter(Ue.isContentEditableFalse).fold((function(){return Nx(o.getBody(),i,o.selection.getRng()).map((function(e){return e.fold(Ax(o,i),Dx(o,i),_x(o))})).getOr(!1)}),(function(){return!0}))):(r=t,a=(n=e).selection.getNode(),!!Ue.isContentEditableFalse(a)&&Rx(n,a.parentNode).filter(Ue.isContentEditableFalse).fold((function(){return Bx(yt.fromDom(n.getBody())),$g.deleteElement(n,r,yt.fromDom(n.selection.getNode())),ux.paddEmptyBody(n),!0}),(function(){return!0})));var n,r,o,i,a},paddEmptyElement:function(e){var t,n=Fb(e.getBody(),e.selection.getNode());return Ue.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(yc.before(t).toRange())),!0}},Px=function(e,t,n,r,o,i){return r=$d(r,e,i.getNode(!o),o,!0),t.collapsed?(i=t.cloneRange(),o?i.setEnd(r.startContainer,r.startOffset):i.setStart(r.endContainer,r.endOffset),i.deleteContents()):t.deleteContents(),e.selection.setRng(r),o=e.dom,i=n,Ue.isText(i)&&0===i.data.length&&o.remove(i),!0},zx={backspaceDelete:function(e,t){var n=e.selection.getRng();if(!Ue.isText(n.commonAncestorContainer))return!1;var r=t?bc.Forwards:bc.Backwards,o=Ss(e.getBody()),i=u(ss,o.next),a=(o=u(ss,o.prev),i=t?i:o,o=t?Dm:_m,us(r,e.getBody(),n)),c=Tw.normalizePosition(t,i(a));return!!c&&(o(c)?Px(e,n,a.getNode(),r,t,c):!!((i=i(c))&&o(i)&&ls(c,i))&&Px(e,n,a.getNode(),r,t,i))}},Ix=function(e){return bu(As.firstPositionIn(e),As.lastPositionIn(e),(function(t,n){t=Tw.normalizePosition(!0,t);var r=Tw.normalizePosition(!1,n);return As.nextPosition(e,t).map((function(e){return e.isEqual(r)})).getOr(!0)})).getOr(!0)},Lx=function(e,t){return function(n){return Sw(t,n).map((function(t){return Vw.setCaretPosition(e,t),!0})).getOr(!1)}},Fx=function(e,t,r,o){var i=e.getBody(),a=u(Tw.isInlineTarget,e);e.undoManager.ignore((function(){var u,c,s;e.selection.setRng((u=r,c=o,(s=n.document.createRange()).setStart(u.container(),u.offset()),s.setEnd(c.container(),c.offset()),s)),e.execCommand("Delete"),zw.readLocation(a,i,yc.fromRangeStart(e.selection.getRng())).map(zw.inside).map(Lx(e,t))})),e.nodeChanged()},Hx=function(e,t){return t=ns(t,e),t||e},Vx={backspaceDelete:function(e,t,n){var r,o,a,c,s,l,f,d;return!(!e.selection.isCollapsed()||!1===e.settings.inline_boundaries)&&(r=yc.fromRangeStart(e.selection.getRng()),a=t,c=n,s=r,l=Hx((o=e).getBody(),s.container()),f=u(Tw.isInlineTarget,o),(d=zw.readLocation(f,l,s)).bind((function(e){return c?e.fold(i(x.some(zw.inside(e))),x.none,i(x.some(zw.outside(e))),x.none):e.fold(x.none,i(x.some(zw.outside(e))),x.none,i(x.some(zw.inside(e))))})).map(Lx(o,a)).getOrThunk((function(){var e=As.navigate(c,l,s),t=e.bind((function(e){return zw.readLocation(f,l,e)}));return(d.isSome()&&t.isSome()?Tw.findRootInline(f,l,s).map((function(e){return!!Ix(e)&&($g.deleteElement(o,c,yt.fromDom(e)),!0)})):t.bind((function(t){return e.map((function(e){return c?Fx(o,a,s,e):Fx(o,a,e,s),!0}))}))).getOr(!1)})))}},Ux=function(e,t){var n=bd.parentsAndSelf(t,e);return H(n,Un).fold(i(n),(function(e){return n.slice(0,e)}))},jx=function(e){return 1===Yt(e).length},Wx=function(e,t,n,r){var o=u(bm,t);r=M(I(r,o),(function(e){return e.dom()}));0===r.length?$g.deleteElement(t,e,n):(o=n.dom(),e=r,n=Jg(!1),e=eh(e,n.dom()),ki(yt.fromDom(o),n),Di(yt.fromDom(o)),r=yc(e,0),t.selection.setRng(r.toRange()))},qx={backspaceDelete:function(e,t){return!!e.selection.isCollapsed()&&(n=e,r=t,e=yt.fromDom(n.getBody()),t=yt.fromDom(n.selection.getStart()),o=I(Ux(e,t),jx),q(o).map((function(e){var t=yc.fromRangeStart(n.selection.getRng());return!(!ux.willDeleteLastPositionInElement(r,t,e.dom())||nh(e))&&(Wx(r,n,e,o),!0)})).getOr(!1));var n,r,o}},$x=Me([{removeTable:["element"]},{emptyCells:["cells"]}]),Gx=function(e,t){return Ub(e.start(),t).bind((function(n){return Ub(e.end(),t).bind((function(e){return e=Vt(n,e),t=n,e?x.some(t):x.none();var t}))}))},Xx=function(e,t){return P(t,Ag.fillWithPaddingBr),e.selection.setCursorLocation(t[0].dom(),0),!0},Yx=ey,Kx=function(e,t,n,r){return Jx(t,r).fold((function(){return Zb(e,t,n)}),(function(t){return Yx(e,t)})).getOr(!1)},Jx=function(e,t){return F(bd.parentsAndSelf(t,e),(function(e){return"caption"===wt(e)}))},Zx=ey,Qx=function(e,t,n,r){var o=yc.fromRangeStart(e.selection.getRng());return Qb(n,r).bind((function(r){return jg.isEmpty(r)?ey(e,r):(i=n,a=r,r=o,As.navigate(t,e.getBody(),r).bind((function(e){return Qb(i,yt.fromDom(e.getNode())).map((function(e){return!1===Vt(e,a)}))})));var i,a})).getOr(!1)},eC=function(e,t,n,r){var o=yc.fromRangeStart(e.selection.getRng());return jg.isEmpty(r)?ey(e,r):ty(e,n,t,r,o)},tC=function(e,t){var n=yc.fromRangeStart(e.selection.getRng());return ny(t,n)||As.fromPosition(t,e.getBody(),n).map((function(e){return ny(t,e)})).getOr(!1)},nC={backspaceDelete:function(e,t){var n,r,o,i,a,u=yt.fromDom(e.selection.getStart(!0)),c=yv.getCellsFromEditor(e);return e.selection.isCollapsed()&&0===c.length?(r=e,o=t,i=u,a=yt.fromDom(r.getBody()),Jx(a,i).fold((function(){return Qx(r,o,a,i)||tC(r,o)}),(function(e){return eC(r,o,a,e).getOr(!1)}))):(c=e,t=u,e=yt.fromDom(c.getBody()),u=c.selection.getRng(),0!==(n=yv.getCellsFromEditor(c)).length?Xx(c,n):Kx(c,e,u,t))}},rC={backspaceDelete:function(e,t){return!!e.selection.isCollapsed()&&(n=e,r=t,e=yc.fromRangeStart(n.selection.getRng()),As.fromPosition(r,n.getBody(),e).filter((function(e){return(r?Em:Om)(e)})).bind((function(e){return x.from(os(r?0:-1,e))})).map((function(e){return n.selection.select(e),!0})).getOr(!1));var n,r}},oC=function(e,t,n,r,o,i){var a;n=oy(n,yt.fromDom(i));"outdent"===t?(a=Math.max(0,ry(i.style[n])-r),e.setStyle(i,n,a?a+o:"")):(a=ry(i.style[n])+r+o,e.setStyle(i,n,a))},iC=function(e,t){return j(t,(function(t){var n=oy(Fl.shouldIndentUseMargin(e),t);n=Bt(t,n).map(ry).getOr(0);return"false"!==e.dom.getContentEditable(t.dom())&&0<n}))},aC=function(e){return I(M(e.selection.getSelectedBlocks(),yt.fromDom),(function(e){return!ay(e)&&!Wt(e).map(ay).getOr(!1)&&_a(e,(function(e){return Ue.isContentEditableTrue(e.dom())||Ue.isContentEditableFalse(e.dom())})).exists((function(e){return Ue.isContentEditableTrue(e.dom())}))}))},uC=u(fy,!1),cC=u(fy,!0),sC=u(ly,!1),lC=u(ly,!0),fC={backspaceDelete:function(e,t,n){if(e.selection.isCollapsed()&&iy(e)){var r=e.dom,o=e.selection.getRng(),i=yc.fromRangeStart(o);o=r.getParent(o.startContainer,r.isBlock);if(null!==o&&uC(yt.fromDom(o),i))return uy(e,"outdent"),!0}return!1}},dC=function(e,t){e.on("keydown",(function(n){var r,o,i;!1===n.isDefaultPrevented()&&(r=e,o=t,i=n,ix.execute([{keyCode:xm.BACKSPACE,action:ix.action(fC.backspaceDelete,r,!1)},{keyCode:xm.BACKSPACE,action:ix.action(Mx.backspaceDelete,r,!1)},{keyCode:xm.DELETE,action:ix.action(Mx.backspaceDelete,r,!0)},{keyCode:xm.BACKSPACE,action:ix.action(zx.backspaceDelete,r,!1)},{keyCode:xm.DELETE,action:ix.action(zx.backspaceDelete,r,!0)},{keyCode:xm.BACKSPACE,action:ix.action(Vx.backspaceDelete,r,o,!1)},{keyCode:xm.DELETE,action:ix.action(Vx.backspaceDelete,r,o,!0)},{keyCode:xm.BACKSPACE,action:ix.action(nC.backspaceDelete,r,!1)},{keyCode:xm.DELETE,action:ix.action(nC.backspaceDelete,r,!0)},{keyCode:xm.BACKSPACE,action:ix.action(rC.backspaceDelete,r,!1)},{keyCode:xm.DELETE,action:ix.action(rC.backspaceDelete,r,!0)},{keyCode:xm.BACKSPACE,action:ix.action(kx.backspaceDelete,r,!1)},{keyCode:xm.DELETE,action:ix.action(kx.backspaceDelete,r,!0)},{keyCode:xm.BACKSPACE,action:ix.action(wx.backspaceDelete,r,!1)},{keyCode:xm.DELETE,action:ix.action(wx.backspaceDelete,r,!0)},{keyCode:xm.BACKSPACE,action:ix.action(qx.backspaceDelete,r,!1)},{keyCode:xm.DELETE,action:ix.action(qx.backspaceDelete,r,!0)}],i).each((function(e){i.preventDefault()})))})),e.on("keyup",(function(t){var n;!1===t.isDefaultPrevented()&&(n=e,t=t,ix.execute([{keyCode:xm.BACKSPACE,action:ix.action(Mx.paddEmptyElement,n)},{keyCode:xm.DELETE,action:ix.action(Mx.paddEmptyElement,n)}],t))}))},mC={moveToCaretPosition:function(e,t){var n,r,o,i=t,a=e.dom,u=e.schema.getMoveCaretBeforeOnEnterElements();if(t){if(!/^(LI|DT|DD)$/.test(t.nodeName)||(o=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))&&/^(UL|OL|DL)$/.test(o.nodeName)&&t.insertBefore(a.doc.createTextNode(" "),t.firstChild),r=a.createRng(),t.normalize(),t.hasChildNodes()){for(var c=new gi(t,t);n=c.current();){if(Ue.isText(n)){r.setStart(n,0),r.setEnd(n,0);break}if(u[n.nodeName.toLowerCase()]){r.setStartBefore(n),r.setEndBefore(n);break}i=n,n=c.next()}n||(r.setStart(i,0),r.setEnd(i,0))}else Ue.isBr(t)?t.nextSibling&&a.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)}},getEditableRoot:function(e,t){for(var n,r=e.getRoot(),o=t;o!==r&&"false"!==e.getContentEditable(o);)"true"===e.getContentEditable(o)&&(n=o),o=o.parentNode;return o!==r?n:r},getParentBlock:dy,getParentBlockName:function(e){return dy(e).fold(i(""),(function(e){return e.nodeName.toUpperCase()}))},isListItemParentBlock:function(e){return dy(e).filter((function(e){return $n(yt.fromDom(e))})).isSome()}},gC=function(e){return e&&/^(OL|UL|LI)$/.test(e.nodeName)},hC=function(e,t,n,r,o){var i,a=e.dom,u=e.selection.getRng();n!==e.getBody()&&(i=(o=gC(i=n)&&gC(i.parentNode)?"LI":o)?t(o):a.create("BR"),hy(n,r,!0)&&hy(n,r,!1)?my(n,"LI")?a.insertAfter(i,gy(n)):a.replace(i,n):hy(n,r,!0)?my(n,"LI")?(a.insertAfter(i,gy(n)),i.appendChild(a.doc.createTextNode(" ")),i.appendChild(n)):n.parentNode.insertBefore(i,n):hy(n,r,!1)?a.insertAfter(i,gy(n)):(n=gy(n),(t=u.cloneRange()).setStartAfter(r),t.setEndAfter(n),u=t.extractContents(),"LI"===o&&(t="LI",(o=u).firstChild&&o.firstChild.nodeName===t)?(i=u.firstChild,a.insertAfter(u,n)):(a.insertAfter(u,n),a.insertAfter(i,n))),a.remove(r),mC.moveToCaretPosition(e,i))},pC=function(e,t){return t&&"A"===t.nodeName&&e.isEmpty(t)},vC=function(e){return e&&/^(TD|TH|CAPTION)$/.test(e.nodeName)},bC=function(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)},yC=function(e,t,n){return!1===Ue.isText(t)?n:e?1===n&&t.data.charAt(n-1)===$a.ZWSP?0:n:n===t.data.length-1&&t.data.charAt(n)===$a.ZWSP?t.data.length:n},wC=function(e,t){for(var n,r=e.getRoot(),o=t;o!==r&&"false"!==e.getContentEditable(o);)"true"===e.getContentEditable(o)&&(n=o),o=o.parentNode;return o!==r?n:r},xC=function(e,t){var n=Fl.getForcedRootBlock(e);n&&n.toLowerCase()===t.tagName.toLowerCase()&&e.dom.setAttribs(t,Fl.getForcedRootBlockAttrs(e))},CC=function(e,t){function n(t){var n,r,o,u=a,s=b.getTextInlineElements();if(t||"TABLE"===f||"HR"===f?(n=v.create(t||m),xC(e,n)):n=c.cloneNode(!1),o=n,!1===Fl.shouldKeepStyles(e))v.setAttrib(n,"style",null),v.setAttrib(n,"class",null);else for(;!s[u.nodeName]||Mc(u)||Ms.isBookmarkNode(u)||(r=u.cloneNode(!1),v.setAttrib(r,"id",""),n.hasChildNodes()?r.appendChild(n.firstChild):o=r,n.appendChild(r)),(u=u.parentNode)&&u!==i;);return py(o),n}function r(e){var t,n,r=yC(e,a,u);if(!Ue.isText(a)||!(e?0<r:r<a.nodeValue.length)){if(a.parentNode===c&&g&&!e)return 1;if(e&&Ue.isElement(a)&&a===c.firstChild)return 1;if(vy(a,"TABLE")||vy(a,"HR"))return g&&!e||!g&&e;var o=new gi(a,c);for(Ue.isText(a)&&(e&&0===r?o.prev():e||r!==a.nodeValue.length||o.next());t=o.current();){if(Ue.isElement(t)){if(!t.getAttribute("data-mce-bogus")&&(n=t.nodeName.toLowerCase(),y[n]&&"br"!==n))return}else if(Ue.isText(t)&&!/^[ \t\r\n]*$/.test(t.nodeValue))return;e?o.prev():o.next()}return 1}}function o(){s=/^(H[1-6]|PRE|FIGURE)$/.test(f)&&"HGROUP"!==d?n(m):n(),Fl.shouldEndContainerOnEmptyBlock(e)&&bC(v,l)&&v.isEmpty(c)?s=v.split(l,c):v.insertAfter(s,c),mC.moveToCaretPosition(e,s)}var i,a,u,c,s,l,f,d,m,g,h,p,v=e.dom,b=e.schema,y=b.getNonEmptyElements(),w=e.selection.getRng();_v.normalize(v,w).each((function(e){w.setStart(e.startContainer,e.startOffset),w.setEnd(e.endContainer,e.endOffset)})),a=w.startContainer,u=w.startOffset,m=Fl.getForcedRootBlock(e),p=!(!t||!t.shiftKey),t=!(!t||!t.ctrlKey);if(Ue.isElement(a)&&a.hasChildNodes()&&(g=u>a.childNodes.length-1,a=a.childNodes[Math.min(u,a.childNodes.length-1)]||a,u=g&&Ue.isText(a)?a.nodeValue.length:0),i=wC(v,a))if((m&&!p||!m&&p)&&(a=function(e,t,n,r,o){t=t||"P";var i,a,u,c,s=e.dom,l=wC(s,r),f=s.getParent(r,s.isBlock);if(!f||!bC(s,f)){if(l=((f=f||l)===e.getBody()||vC(f)?f:f.parentNode).nodeName.toLowerCase(),!f.hasChildNodes())return i=s.create(t),xC(e,i),f.appendChild(i),n.setStart(i,0),n.setEnd(i,0),i;for(u=r;u.parentNode!==f;)u=u.parentNode;for(;u&&!s.isBlock(u);)u=(a=u).previousSibling;if(a&&e.schema.isValidChild(l,t.toLowerCase())){for(i=s.create(t),xC(e,i),a.parentNode.insertBefore(i,a),u=a;u&&!s.isBlock(u);)c=u.nextSibling,i.appendChild(u),u=c;n.setStart(r,o),n.setEnd(r,o)}}return r}(e,m,w,a,u)),c=v.getParent(a,v.isBlock),l=c?v.getParent(c.parentNode,v.isBlock):null,f=c?c.nodeName.toUpperCase():"","LI"!==(d=l?l.nodeName.toUpperCase():"")||t||(l=(c=l).parentNode,f=d),/^(LI|DT|DD)$/.test(f)&&v.isEmpty(c))hC(e,n,l,c,m);else if(!m||c!==e.getBody()){if(m=m||"P",ha(c))s=tu(c),v.isEmpty(c)&&py(c),mC.moveToCaretPosition(e,s);else if(r())o();else if(r(!0))s=c.parentNode.insertBefore(n(),c),mC.moveToCaretPosition(e,vy(c,"HR")?s:c);else{(t=(p=w).cloneRange()).setStart(p.startContainer,yC(!0,p.startContainer,p.startOffset)),t.setEnd(p.endContainer,yC(!1,p.endContainer,p.endOffset)),(p=t.cloneRange()).setEndAfter(c),t=p.extractContents(),P(sa(yt.fromDom(t),Ct),(function(e){e=e.dom(),e.nodeValue=$a.trim(e.nodeValue)}));for(var x=t;Ue.isText(x)&&(x.nodeValue=x.nodeValue.replace(/^[\r\n]+/,"")),x=x.firstChild;);s=t.firstChild,v.insertAfter(t,c),function(e,t,n){var r,o=n,i=[];if(o){for(;o=o.firstChild;){if(e.isBlock(o))return;Ue.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||pC(e,o))&&e.remove(o)}}(v,y,s),p=v,(t=c).normalize(),(h=t.lastChild)&&!/^(left|right)$/gi.test(p.getStyle(h,"float",!0))||p.add(t,"br"),v.isEmpty(c)&&py(c),s.normalize(),v.isEmpty(s)?(v.remove(s),o()):mC.moveToCaretPosition(e,s)}v.setAttrib(s,"id",""),e.fire("NewBlock",{newBlock:s})}},SC=function(e,t,n){for(var r,o=new gi(t,n),i=e.getNonEmptyElements();r=o.next();)if(i[r.nodeName.toLowerCase()]||0<r.length)return!0},kC=function(e,t,n){var r=e.create("span",{}," ");n.parentNode.insertBefore(r,n),t.scrollIntoView(r),e.remove(r)},TC=function(e,t,n,r){e=e.createRng(),r?(e.setStartBefore(n),e.setEndBefore(n)):(e.setStartAfter(n),e.setEndAfter(n)),t.setRng(e)},EC=function(e,t){var n=yt.fromTag("br");ki(yt.fromDom(t),n),e.undoManager.add()},OC=function(e,t){!function(e,t){return!!NC(yc.after(t))||As.nextPosition(e,yc.after(t)).map((function(e){return Ue.isBr(e.getNode())})).getOr(!1)}(e.getBody(),t)&&Ti(yt.fromDom(t),yt.fromTag("br"));var n=yt.fromTag("br");Ti(yt.fromDom(t),n),kC(e.dom,e.selection,n.dom()),TC(e.dom,e.selection,n.dom(),!1),e.undoManager.add()},NC=function(e){return Ue.isBr(e.getNode())},AC=function(e){return e.fold(i(!1),by,by,i(!1))},DC=function(e,t){r=e,d=u(Tw.isInlineTarget,r),n=yc.fromRangeStart(r.selection.getRng());var n,r,o,i,a,c,s,l,f,d=zw.readLocation(d,r.getBody(),n).filter(AC);d.isSome()?d.each(u(yy,e)):(r=t,d=(n=e).selection,t=n.dom,a=d.getRng(),_v.normalize(t,a).each((function(e){a.setStart(e.startContainer,e.startOffset),a.setEnd(e.endContainer,e.endOffset)})),e=a.startOffset,1===(c=a.startContainer).nodeType&&c.hasChildNodes()&&(s=e>c.childNodes.length-1,c=c.childNodes[Math.min(e,c.childNodes.length-1)]||c,e=s&&3===c.nodeType?c.nodeValue.length:0),s=t.getParent(c,t.isBlock),l=s?t.getParent(s.parentNode,t.isBlock):null,f=l?l.nodeName.toUpperCase():"",r=!(!r||!r.ctrlKey),"LI"!==f||r||(s=l),c&&3===c.nodeType&&e>=c.nodeValue.length&&(SC(n.schema,c,s)||(o=t.create("br"),a.insertNode(o),a.setStartAfter(o),a.setEndAfter(o),i=!0)),o=t.create("br"),Tc(t,a,o),kC(t,d,o),TC(t,d,o,i),n.undoManager.add())},_C={shouldInsertBr:function(e){return wy(e,Fl.getBrNewLineSelector(e))},shouldBlockNewLine:function(e){return wy(e,Fl.getNoNewLineSelector(e))}},RC=Me([{br:[]},{block:[]},{none:[]}]),BC=function(e,t){return function(n,r){return mC.getParentBlockName(n)===e.toUpperCase()===t}},MC=function(e,t){return Ew([Ay([xy],RC.none()),Ay([BC("summary",!0)],RC.br()),Ay([ky(!0),Ty(!1),Oy],RC.br()),Ay([ky(!0),Ty(!1)],RC.block()),Ay([ky(!0),Ty(!0),Oy],RC.block()),Ay([ky(!0),Ty(!0)],RC.br()),Ay([Sy(!0),Oy],RC.br()),Ay([Sy(!0)],RC.block()),Ay([Cy(!0),Oy,Ny],RC.block()),Ay([Cy(!0)],RC.br()),Ay([Ey],RC.br()),Ay([Cy(!1),Oy],RC.br()),Ay([Ny],RC.block())],[e,!(!t||!t.shiftKey)]).getOr(RC.none())},PC={insert:function(e,t){MC(e,t).fold((function(){DC(e,t)}),(function(){CC(e,t)}),r)}},zC=function(e){e.on("keydown",(function(t){var n,r;t.keyCode===xm.ENTER&&(n=e,(r=t).isDefaultPrevented()||(r.preventDefault(),hg(n.undoManager),n.undoManager.transact((function(){!1===n.selection.isCollapsed()&&n.execCommand("Delete"),PC.insert(n,r)}))))}))},IC=u(Dy," "),LC=u(Dy," "),FC=function(e){var t=yt.fromDom(e.getBody());e.selection.isCollapsed()&&Uy(t,Lu.fromRangeStart(e.selection.getRng())).each((function(t){e.selection.setRng(t.toRange())}))},HC=function(e){var t,n,r,o,i=yc.fromRangeStart(e.selection.getRng()),a=yt.fromDom(e.getBody());return!!e.selection.isCollapsed()&&(t=u(Tw.isInlineTarget,e),n=yc.fromRangeStart(e.selection.getRng()),zw.readLocation(t,e.getBody(),n).bind((o=a,function(e){return e.fold((function(e){return As.prevPosition(o.dom(),yc.before(e))}),(function(e){return As.firstPositionIn(e)}),(function(e){return As.lastPositionIn(e)}),(function(e){return As.nextPosition(o.dom(),yc.after(e))}))})).bind(jy(a,i)).exists((r=e,function(e){return r.selection.setRng(e.toRange()),r.nodeChanged(),!0})))},VC=function(e){e.on("keydown",(function(t){var n;!1===t.isDefaultPrevented()&&(n=t,ix.execute([{keyCode:xm.SPACEBAR,action:ix.action(HC,e)}],n).each((function(e){n.preventDefault()})))}))},UC=function(e){return Ra(yt.fromDom(e.getBody()),"*[data-mce-caret]").fold(i(null),(function(e){return e.dom()}))},jC=function(e,t){t.hasAttribute("data-mce-caret")&&(tu(t),e.selection.setRng(e.selection.getRng()),e.selection.scrollIntoView(t))},WC=function(e){e.on("keyup compositionstart",u(Wy,e))},qC=bt().browser,$C=function(e){var t=ea((function(){e.composing||FC(e)}),0);qC.isIE()&&(e.on("keypress",(function(e){t.throttle()})),e.on("remove",(function(e){t.cancel()})))},GC=function(e){e.on("keydown",(function(t){var n,r;!1===t.isDefaultPrevented()&&(n=e,r=t,ix.execute([{keyCode:xm.END,action:Kw(n,!0)},{keyCode:xm.HOME,action:Kw(n,!1)}],r).each((function(e){r.preventDefault()})))}))},XC=function(e){var t,n=Vw.setupSelectedState(e);WC(e),ax(e,n),dC(e,n),zC(e),VC(e),$C(t=e),t.on("input",(function(e){!1===e.isComposing&&FC(t)})),GC(e)},YC=function(e){var t,n=e.selection.getRng(),r=Lu.fromRangeStart(n),o=Lu.fromRangeEnd(n);Lu.isElementPosition(r)&&(t=r.container(),$y(t)&&As.firstPositionIn(t).each((function(e){return n.setStart(e.container(),e.offset())}))),Lu.isElementPosition(o)&&(t=r.container(),$y(t)&&As.lastPositionIn(t).each((function(e){return n.setEnd(e.container(),e.offset())}))),e.selection.setRng(Ih.normalize(n))},KC=function(e){e.on("click",(function(t){e.dom.getParent(t.target,"details")&&t.preventDefault()}))},JC=function(e){e.parser.addNodeFilter("details",(function(e){P(e,(function(e){e.attr("data-mce-open",e.attr("open")),e.attr("open","open")}))})),e.serializer.addNodeFilter("details",(function(e){P(e,(function(e){var t=e.attr("data-mce-open");e.attr("open",C(t)?t:null),e.attr("data-mce-open",null)}))}))},ZC=ji.DOM,QC=function(e){e.settings.auto_focus&&En.setEditorTimeout(e,(function(){var t=!0===e.settings.auto_focus?e:e.editorManager.get(e.settings.auto_focus);t.destroyed||t.focus()}),100)},eS=function(e,t){var r,o,i,a=e.settings,u=e.getElement(),c=e.getDoc();a.inline||(e.getElement().style.visibility=e.orgVisibility),t||e.inline||(c.open(),c.write(e.iframeHTML),c.close()),e.inline&&(e.on("remove",(function(){var e=this.getBody();ZC.removeClass(e,"mce-content-body"),ZC.removeClass(e,"mce-edit-focus"),ZC.setAttrib(e,"contentEditable",null)})),ZC.addClass(u,"mce-content-body"),e.contentDocument=c=n.document,e.contentWindow=n.window,e.bodyElement=u,e.contentAreaContainer=u,a.root_name=u.nodeName.toLowerCase()),(t=e.getBody()).disabled=!0,e.readonly=a.readonly,e.readonly||(e.inline&&"static"===ZC.getStyle(t,"position",!0)&&(t.style.position="relative"),t.contentEditable=e.getParam("content_editable_state",!0)),t.disabled=!1,e.editorUpload=ld(e),e.schema=br(a),e.dom=ji(c,{keep_values:!0,url_converter:e.convertURL,url_converter_scope:e,hex_colors:a.force_hex_style_colors,update_styles:!0,root_element:e.inline?e.getBody():null,collect:function(){return e.inline},schema:e.schema,contentCssCors:Fl.shouldUseContentCssCors(e),referrerPolicy:Fl.getReferrerPolicy(e),onSetAttrib:function(t){e.fire("SetAttrib",t)}}),e.parser=((u=vp((o=e).settings,o.schema)).addAttributeFilter("src,href,style,tabindex",(function(e,t){for(var n,r,i,a=e.length,u=o.dom;a--;)r=(n=e[a]).attr(t),n.attr(i="data-mce-"+t)||0!==r.indexOf("data:")&&0!==r.indexOf("blob:")&&("style"===t?((r=u.serializeStyle(u.parseStyle(r),n.name)).length||(r=null),n.attr(i,r),n.attr(t,r)):"tabindex"===t?(n.attr(i,r),n.attr(t,null)):n.attr(i,o.convertURL(r,t,n.name)))})),u.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)})),u.addNodeFilter("#cdata",(function(e){for(var t,n=e.length;n--;)(t=e[n]).type=8,t.name="#comment",t.value="[CDATA["+t.value+"]]"})),u.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",(function(e){for(var t,n=e.length,r=o.schema.getNonEmptyElements();n--;)(t=e[n]).isEmpty(r)&&0===t.getAll("br").length&&(t.append(new il("br",1)).shortEnded=!0)})),u),e.serializer=Kh(a,e),e.selection=Vv(e.dom,e.getWin(),e.serializer,e),e.annotator=Qs(e),e.formatter=$h(e),e.undoManager=tm(e),e._nodeChangeDispatcher=new Ed(e),e._selectionOverrides=Xd(e),KC(u=e),JC(u),(i=e).on("click",(function(e){3<=e.detail&&YC(i)})),XC(e),Cd(e),e.fire("PreInit"),a.browser_spellcheck||a.gecko_spellcheck||(c.body.spellcheck=!1,ZC.setAttrib(t,"spellcheck","false")),e.quirks=qy(e),e.fire("PostRender"),u=Fl.getDirectionality(e);void 0!==u&&(t.dir=u),a.protect&&e.on("BeforeSetContent",(function(e){_n.each(a.protect,(function(t){e.content=e.content.replace(t,(function(e){return"\x3c!--mce:protected "+escape(e)+"--\x3e"}))}))})),e.on("SetContent",(function(){e.addVisual(e.getBody())})),e.load({initial:!0,format:"html"}),e.startContent=e.getContent({format:"raw"}),e.on("compositionstart compositionend",(function(t){e.composing="compositionstart"===t.type})),0<e.contentStyles.length&&(r="",_n.each(e.contentStyles,(function(e){r+=e+"\r\n"})),e.dom.addStyle(r)),((c=e).inline?ZC:c.dom).styleSheetLoader.loadAll(e.contentCSS,(function(t){Gy(e)}),(function(t){Gy(e)})),a.content_style&&(t=e,u=a.content_style,t=yt.fromDom(e.getDoc().head),c=yt.fromTag("style"),Dt(c,"type","text/css"),Oi(c,yt.fromText(u)),Oi(t,c))},tS=ji.DOM,nS=function(e,t){var r;return!(n.document.domain===n.window.location.hostname||!On.browser.isIE())&&(r=ud("mce"),e[r]=function(){eS(e)},r='javascript:(function(){document.open();document.domain="'+n.document.domain+'";var ed = window.parent.tinymce.get("'+e.id+'");document.write(ed.iframeHTML);document.close();ed.'+r+"(true);})()",tS.setAttrib(t,"src",r),!0)},rS=function(e,t,n,r){var o=yt.fromTag("iframe");return de(o,r),de(o,{id:e+"_ifr",frameBorder:"0",allowTransparency:"true",title:t}),ia(o,"tox-edit-area__iframe"),o},oS=function(e){var t,n,r=Fl.getDocType(e)+"<html><head>";return Fl.getDocumentBaseUrl(e)!==e.documentBaseUrl&&(r+='<base href="'+e.documentBaseURI.getURI()+'" />'),r+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',t=Fl.getBodyId(e),n=Fl.getBodyClass(e),Fl.getContentSecurityPolicy(e)&&(r+='<meta http-equiv="Content-Security-Policy" content="'+Fl.getContentSecurityPolicy(e)+'" />'),r+'</head><body id="'+t+'" class="mce-content-body '+n+'" data-id="'+e.id+'"><br></body></html>'},iS=function(e,t){i=t,r=(n=e).editorManager.translate("Rich Text Area. Press ALT-0 for help."),(o=rS(n.id,r,i.height,Fl.getIframeAttrs(n)).dom()).onload=function(){o.onload=null,n.fire("load")},r=nS(n,o),n.contentAreaContainer=i.iframeContainer,n.iframeElement=o,n.iframeHTML=oS(n),tS.add(i.iframeContainer,o);var n,r,o,i=r;t.editorContainer&&(tS.get(t.editorContainer).style.display=e.orgDisplay,e.hidden=tS.isHidden(t.editorContainer)),e.getElement().style.display="none",tS.setAttrib(e.id,"aria-hidden","true"),i||eS(e)},aS=function(e){var t=Fl.getContentCss(e),n=e.editorManager.baseURL+"/skins/content",r="content"+e.editorManager.suffix+".css",o=!0===e.inline;return M(t,(function(t){return/^[a-z0-9\-]+$/i.test(t)&&!o?n+"/"+t+"/"+r:e.documentBaseURI.toAbsolute(t)}))},uS=ji.DOM,cS=function(e,t,n){var r=Jf.get(n),o=Jf.urls[n]||e.documentBaseUrl.replace(/\/$/,"");if(n=_n.trim(n),r&&-1===_n.inArray(t,n)&&(_n.each(Jf.dependencies(n),(function(n){cS(e,t,n)})),!e.plugins[n]))try{var i=new r(e,o,e.$);(e.plugins[n]=i).init&&(i.init(e,o),t.push(n))}catch(r){Xf.pluginInitError(e,n,r)}},sS=function(e){return e.replace(/^\-/,"")},lS=function(e){return e.theme.renderUI()},fS=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||t.offsetHeight,n},dS=function(e){var t=e.getElement();return e.inline?Xy(null):(e=t,t=uS.create("div"),uS.insertAfter(t,e),Xy(t))},mS={init:function(e){e.fire("ScriptsLoaded"),t=e,u=_n.trim(t.settings.icons),n=t.ui.registry.getAll().icons,a=Yf(),a=G(G({},a),Kf.get(u).icons),Tt(a,(function(e,r){Nt(n,r)||t.ui.registry.addIcon(r,e)})),a=(u=e).settings.theme,C(a)?(u.settings.theme=sS(a),i=Zf.get(a),u.theme=new i(u,Zf.urls[a]),u.theme.init&&u.theme.init(u,Zf.urls[a]||u.documentBaseUrl.replace(/\/$/,""),u.$)):u.theme={},r=e,o=[],_n.each(r.settings.plugins.split(/[ ,]/),(function(e){cS(r,o,sS(e))})),a=(i=e).getElement(),i.orgDisplay=a.style.display;var t,n,r,o,i,a,u=(C(i.settings.theme)?lS:O(i.settings.theme)?fS:dS)(i);return e.editorContainer=u.editorContainer||null,e.contentCSS=e.contentCSS.concat(aS(e)),e.inline?eS(e):iS(e,u)}},gS=ji.DOM,hS=function(e,t){var n,o=Fl.getLanguageCode(t),i=Fl.getLanguageUrl(t);!1===Ji.hasCode(o)&&"en"!==o&&(n=""!==i?i:t.editorManager.baseURL+"/langs/"+o+".js",e.add(n,r,void 0,(function(){Xf.languageLoadError(n,o)})))},pS=function(e,t,n,r){var o=t.settings,i=o.theme;C(i)?(Yy(i)||Zf.urls.hasOwnProperty(i)||((o=o.theme_url)?Zf.load(i,t.documentBaseURI.toAbsolute(o)):Zf.load(i,"themes/"+i+"/theme"+n+".js")),e.loadQueue((function(){Zf.waitFor(i,r)}))):r()},vS=function(e,t){x.from(Fl.getIconsUrl(t)).filter((function(e){return 0<e.length})).map((function(e){return{url:e,name:x.none()}})).orThunk((function(){return e=t,x.from(Fl.getIconPackName(e)).filter((function(e){return 0<e.length&&!Kf.has(e)})).map((function(t){return{url:e.editorManager.baseURL+"/icons/"+t+"/icons.js",name:x.some(t)}}));var e})).each((function(t){e.add(t.url,r,void 0,(function(){Xf.iconsLoadError(t.url,t.name.getOrUndefined())}))}))},bS=function(e,t){k(e.plugins)&&(e.plugins=e.plugins.join(" ")),_n.each(e.external_plugins,(function(t,n){Jf.load(n,t,r,void 0,(function(){Xf.pluginLoadError(n,t)})),e.plugins+=" "+n})),_n.each(e.plugins.split(/[ ,]/),(function(e){var n,o;(e=_n.trim(e))&&!Jf.urls[e]&&(Yy(e)?(e=e.substr(1,e.length),n=Jf.dependencies(e),_n.each(n,(function(e){var n={prefix:"plugins/",resource:e,suffix:"/plugin"+t+".js"};e=Jf.createUrl(n,e),Jf.load(e.resource,e,r,void 0,(function(){Xf.pluginLoadError(e.prefix+e.resource+e.suffix,e.resource)}))}))):(o={prefix:"plugins/",resource:e,suffix:"/plugin"+t+".js"},Jf.load(e,o,r,void 0,(function(){Xf.pluginLoadError(o.prefix+o.resource+o.suffix,e)}))))}))},yS=function(e){function t(){gS.unbind(n.window,"ready",t),e.render()}var r,o,i,a,u=e.settings,c=e.id;Ji.setCode(Fl.getLanguageCode(e)),Ar.Event.domLoaded?e.getElement()&&On.contentEditable&&(u.inline?e.inline=!0:(e.orgVisibility=e.getElement().style.visibility,e.getElement().style.visibility="hidden"),(r=e.getElement().form||gS.getParent(c,"form"))&&(e.formElement=r,u.hidden_input&&!Ue.isTextareaOrInput(e.getElement())&&(gS.insertAfter(gS.create("input",{type:"hidden",name:c}),c),e.hasHiddenInput=!0),e.formEventDelegate=function(t){e.fire(t.type,t)},gS.bind(r,"submit reset",e.formEventDelegate),e.on("reset",(function(){e.resetContent()})),!u.submit_patch||r.submit.nodeType||r.submit.length||r._mceOldSubmit||(r._mceOldSubmit=r.submit,r.submit=function(){return e.editorManager.triggerSave(),e.setDirty(!1),r._mceOldSubmit(r)})),e.windowManager=Vf(e),e.notificationManager=Hf(e),"xml"===u.encoding&&e.on("GetContent",(function(e){e.save&&(e.content=gS.encode(e.content))})),u.add_form_submit_trigger&&e.on("submit",(function(){e.initialized&&e.save()})),u.add_unload_trigger&&(e._beforeUnload=function(){!e.initialized||e.destroyed||e.isHidden()||e.save({format:"raw",no_events:!0,set_dirty:!1})},e.editorManager.on("BeforeUnload",e._beforeUnload)),e.editorManager.add(e),i=(o=e).suffix,a=Gi.ScriptLoader,pS(a,o,i,(function(){hS(a,o),vS(a,o),bS(o.settings,i),a.loadQueue((function(){o.removed||mS.init(o)}),o,(function(){o.removed||mS.init(o)}))}))):gS.bind(n.window,"ready",t)},wS="data-mce-contenteditable",xS=function(e){return!0===e.readonly},CS=function(e){e.serializer?ew(e):e.on("PreInit",(function(){ew(e)}))},SS=function(e){var t=e.target;"click"!==e.type||"A"!==t.tagName||xm.metaKeyPressed(e)||e.preventDefault()},kS=function(e){e.on("ShowCaret",(function(t){xS(e)&&t.preventDefault()})),e.on("ObjectSelected",(function(t){xS(e)&&t.preventDefault()}))},TS=["design","readonly"],ES=function(e,t,n,r){if(r!==n.get()){if(!Nt(t,r))throw new Error("Editor mode '"+r+"' is invalid");e.initialized?tw(e,n,t,r):e.on("init",(function(){return tw(e,n,t,r)}))}},OS=function(e,t,r){if(B(TS,t))throw new Error("Cannot override default mode "+t);return G(G({},e),((e={})[t]=G(G({},r),{deactivate:function(){try{r.deactivate()}catch(e){n.console.error("problem while deactivating editor mode "+t+":",e)}}}),e))},NS=function(e,t){return e.getBlockElements()[t.name]&&(e=t).firstChild&&e.firstChild===e.lastChild&&("br"===(e=t.firstChild).name||" "===e.value)},AS=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},DS=function(e){return!e.firstChild||rw(e)},_S=function(e,t){var n=t.cloneRange();t=t.cloneRange();return n.setStartBefore(e),t.setEndAfter(e),[n.cloneContents(),t.cloneContents()]},RS=function(e,t){return e=yc.before(e),t=Ss(t).next(e),t?t.toRange():null},BS=function(e,t){return e=yc.after(e),t=Ss(t).prev(e),t?t.toRange():null},MS={isListFragment:function(e,t){var n,r,o=t.firstChild;t=t.lastChild;return o&&"meta"===o.name&&(o=o.next),t&&"mce_marker"===t.attr("id")&&(t=t.prev),n=t,r=(e=e).getNonEmptyElements(),n&&(n.isEmpty(r)||NS(e,n))&&(t=t.prev),!(!o||o!==t)&&("ul"===o.name||"ol"===o.name)},insertAtCaret:function(e,t,n,r){function o(e){var r=yc.fromRangeStart(n),o=Ss(t.getRoot());return!(e=1===e?o.prev(r):o.next(r))||iw(t,e.getNode())!==d}e=function(e,t,n){return t=t.serialize(n),n=e.createFragment(t),AS(n)}(t,e,r);var i,a,u,c,s,l,f,d=iw(t,n.startContainer);r=ow(nw(e.firstChild)),e=t.getRoot();return o(1)?(a=e,u=(i=d).parentNode,_n.each(r,(function(e){u.insertBefore(e,i)})),RS(i,a)):o(2)?(a=d,s=r,l=e,t.insertAfter(s.reverse(),a),BS(s[0],l)):(s=r,l=e,r=_S(c=d,r=n),(f=c.parentNode).insertBefore(r[0],c),_n.each(s,(function(e){f.insertBefore(e,c)})),f.insertBefore(r[1],c),f.removeChild(c),BS(s[s.length-1],l))},isParentBlockLi:function(e,t){return!!iw(e,t)},trimListItems:ow,listItems:nw},PS=function(e,t){function n(e){return r[e]&&3===r[e].nodeType}var r=e.startContainer;e=e.startOffset;return 3===r.nodeType&&(0<e?t=t.replace(/^ /," "):n("previousSibling")||(t=t.replace(/^ /," ")),e<r.length?t=t.replace(/ (<br>|)$/," "):n("nextSibling")||(t=t.replace(/( | )(<br>|)$/," "))),t},zS=function(e,t){var n=e.startContainer,r=e.startOffset;return 3===n.nodeType&&e.collapsed&&(" "===n.data[r]?(n.deleteData(r,1),/[\u00a0| ]$/.test(t)||(t+=" ")):" "===n.data[r-1]&&(n.deleteData(r-1,1),/[\u00a0| ]$/.test(t)||(t=" "+t))),t},IS=Ue.matchNodeNames(["td","th"]),LS=function(e,t){var n,r,o=e.selection.getRng(),i=o.startContainer,a=o.startOffset;o.collapsed&&(n=i,r=a,Ue.isText(n)&&" "===n.nodeValue[r-1])&&Ue.isText(i)&&(i.insertData(a-1," "),i.deleteData(a,1),o.setStart(i,a),o.setEnd(i,a),e.selection.setRng(o)),e.selection.setContent(t)},FS=function(e,t,n){var r,o;"all"===n.getAttribute("data-mce-bogus")?n.parentNode.insertBefore(e.dom.createFragment(t),n):(r=n.firstChild,o=n.lastChild,!r||r===o&&"BR"===r.nodeName?e.dom.setHTML(n,t):LS(e,t))},HS=function(e,t){x.from(e.getParent(t,"td,th")).map(yt.fromDom).each(Ag.trimBlockTrailingBr)},VS=function(e,t){var n,r,o=e.schema.getTextInlineElements(),i=e.dom;t&&(n=e.getBody(),r=new vh(i),_n.each(i.select("*[data-mce-fragment]"),(function(e){for(var t=e.parentNode;t&&t!==n;t=t.parentNode)o[e.nodeName.toLowerCase()]&&r.compare(t,e)&&i.remove(e,!0)})))},US=function(e){for(var t=e;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")},jS=function(e){_n.each(e.getElementsByTagName("*"),(function(e){e.removeAttribute("data-mce-fragment")}))},WS=function(e,t){return t&&!e.schema.getShortEndedElements()[t.nodeName]},qS=function(e,t){var n,r=e.dom,o=e.selection;if(t){if(e.selection.scrollIntoView(t),i=function(t){for(var n=e.getBody();t&&t!==n;t=t.parentNode)if("false"===e.dom.getContentEditable(t))return t;return null}(t))return r.remove(t),void o.select(i);var i=r.createRng(),a=((a=t.previousSibling)&&3===a.nodeType?(i.setStart(a,a.nodeValue.length),On.ie||(n=t.nextSibling)&&3===n.nodeType&&(a.appendData(n.data),n.parentNode.removeChild(n))):(i.setStartBefore(t),i.setEndBefore(t)),r.getParent(t,r.isBlock));r.remove(t),a&&r.isEmpty(a)&&(e.$(a).empty(),i.setStart(a,0),i.setEnd(a,0),IS(a)||a.getAttribute("data-mce-fragment")||!(n=function(t){if(t=yc.fromRangeStart(t),t=Ss(e.getBody()).next(t))return t.toRange()}(i))?r.add(a,r.create("br",{"data-mce-bogus":"1"})):(i=n,r.remove(a))),o.setRng(i)}},$S=function(e,t){var n,r,o,i,a,u,c,s,l,f="string"!=typeof(t=t)?(f=_n.extend({paste:t.paste,data:{paste:t.paste}},t),{content:t.content,details:f}):{content:t,details:{}},d=e,m=(t=f.content,e=f.details,d.selection),g=d.dom;if(/^ | $/.test(t)&&(t=PS(m.getRng(),t)),n=d.parser,l=e.merge,r=jl({validate:d.settings.validate},d.schema),s='<span id="mce_marker" data-mce-type="bookmark">​</span>',a={content:t,format:"html",selection:!0,paste:e.paste},(a=d.fire("BeforeSetContent",a)).isDefaultPrevented())d.fire("SetContent",{content:a.content,format:"html",selection:!0,paste:e.paste});else{-1===(t=a.content).indexOf("{$caret}")&&(t+="{$caret}"),t=t.replace(/\{\$caret\}/,s);var h,p=(h=m.getRng()).startContainer||(h.parentElement?h.parentElement():null),v=d.getBody(),b=(p=(p===v&&m.isCollapsed()&&g.isBlock(v.firstChild)&&WS(d,v.firstChild)&&g.isEmpty(v.firstChild)&&((h=g.createRng()).setStart(v.firstChild,0),h.setEnd(v.firstChild,0),m.setRng(h)),m.isCollapsed()||(d.selection.setRng(Ih.normalize(d.selection.getRng())),d.getDoc().execCommand("Delete",!1,null),t=zS(d.selection.getRng(),t)),{context:(o=m.getNode()).nodeName.toLowerCase(),data:e.data,insert:!0}),n.parse(t,p));if(!0===e.paste&&MS.isListFragment(d.schema,b)&&MS.isParentBlockLi(g,o))return h=MS.insertAtCaret(r,g,d.selection.getRng(),b),d.selection.setRng(h),void d.fire("SetContent",a);if(US(b),"mce_marker"===(c=b.lastChild).attr("id"))for(c=(u=c).prev;c;c=c.walk(!0))if(3===c.type||!g.isBlock(c.name)){d.schema.isValidChild(c.parent.name,"span")&&c.parent.insert(u,c,"br"===c.name);break}if(d._selectionOverrides.showBlockCaretContainer(o),p.invalid){for(LS(d,s),o=m.getNode(),i=d.getBody(),9===o.nodeType?o=c=i:c=o;c!==i;)c=(o=c).parentNode;t=o===i?i.innerHTML:g.getOuterHTML(o),t=r.serialize(n.parse(t.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,(function(){return r.serialize(b)})))),o===i?g.setHTML(i,t):g.setOuterHTML(o,t)}else t=r.serialize(b),FS(d,t,o);VS(d,l),qS(d,g.get("mce_marker")),jS(d.getBody()),HS(d.dom,d.selection.getStart()),d.fire("SetContent",a),d.addVisual()}},GS=function(e){fC.backspaceDelete(e,!1)||Mx.backspaceDelete(e,!1)||zx.backspaceDelete(e,!1)||Vx.backspaceDelete(e,!1)||wx.backspaceDelete(e,!1)||nC.backspaceDelete(e)||kx.backspaceDelete(e,!1)||qx.backspaceDelete(e,!1)||(aw(e,"Delete"),ux.paddEmptyBody(e))},XS=function(e){Mx.backspaceDelete(e,!0)||zx.backspaceDelete(e,!0)||Vx.backspaceDelete(e,!0)||wx.backspaceDelete(e,!0)||nC.backspaceDelete(e)||kx.backspaceDelete(e,!0)||qx.backspaceDelete(e,!0)||aw(e,"ForwardDelete")},YS={getFontSize:cw("font-size"),getFontFamily:o((function(e){return e.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")}),cw("font-family")),toPt:function(e,t){return/[0-9.]+px$/.test(e)?function(e,t){return t=Math.pow(10,t),Math.round(e*t)/t}(72*parseInt(e,10)/96,t||0)+"pt":e}},KS=function(e,t){return e.startContainer===t&&0===e.startOffset},JS=_n.each,ZS=_n.map,QS=_n.inArray,ek=(tk.prototype.execCommand=function(e,t,n,r){var o,i=!1,a=this;if(!a.editor.removed){if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(e)||r&&r.skip_focus?rf.restore(a.editor):a.editor.focus(),(r=a.editor.fire("BeforeExecCommand",{command:e,ui:t,value:n})).isDefaultPrevented())return!1;if(r=e.toLowerCase(),o=a.commands.exec[r])return o(r,t,n),a.editor.fire("ExecCommand",{command:e,ui:t,value:n}),!0;if(JS(this.editor.plugins,(function(r){if(r.execCommand&&r.execCommand(e,t,n))return a.editor.fire("ExecCommand",{command:e,ui:t,value:n}),!(i=!0)})),i)return i;if(a.editor.theme&&a.editor.theme.execCommand&&a.editor.theme.execCommand(e,t,n))return a.editor.fire("ExecCommand",{command:e,ui:t,value:n}),!0;try{i=a.editor.getDoc().execCommand(e,t,n)}catch(r){}return!!i&&(a.editor.fire("ExecCommand",{command:e,ui:t,value:n}),!0)}},tk.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(e){}return!1}},tk.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(e){}}},tk.prototype.addCommands=function(e,t){var n=this;t=t||"exec",JS(e,(function(e,r){JS(r.toLowerCase().split(","),(function(r){n.commands[t][r]=e}))}))},tk.prototype.addCommand=function(e,t,n){var r=this;e=e.toLowerCase(),this.commands.exec[e]=function(e,o,i,a){return t.call(n||r.editor,o,i,a)}},tk.prototype.queryCommandSupported=function(e){if(e=e.toLowerCase(),this.commands.exec[e])return!0;try{return this.editor.getDoc().queryCommandSupported(e)}catch(e){}return!1},tk.prototype.addQueryStateHandler=function(e,t,n){var r=this;e=e.toLowerCase(),this.commands.state[e]=function(){return t.call(n||r.editor)}},tk.prototype.addQueryValueHandler=function(e,t,n){var r=this;e=e.toLowerCase(),this.commands.value[e]=function(){return t.call(n||r.editor)}},tk.prototype.hasCustomCommand=function(e){return e=e.toLowerCase(),!!this.commands.exec[e]},tk.prototype.execNativeCommand=function(e,t,n){return void 0===t&&(t=!1),void 0===n&&(n=null),this.editor.getDoc().execCommand(e,t,n)},tk.prototype.isFormatMatch=function(e){return this.editor.formatter.match(e)},tk.prototype.toggleFormat=function(e,t){this.editor.formatter.toggle(e,t?{value:t}:void 0),this.editor.nodeChanged()},tk.prototype.storeSelection=function(e){this.selectionBookmark=this.editor.selection.getBookmark(e)},tk.prototype.restoreSelection=function(){this.editor.selection.moveToBookmark(this.selectionBookmark)},tk.prototype.setupCommands=function(e){function t(t){return function(){var n=e.selection.isCollapsed()?[e.dom.getParent(e.selection.getNode(),e.dom.isBlock)]:e.selection.getSelectedBlocks();n=ZS(n,(function(n){return!!e.formatter.matchNode(n,t)}));return-1!==QS(n,!0)}}var n=this;this.addCommands({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){e.undoManager.add()},"Cut,Copy,Paste":function(t){var r,o=e.getDoc();try{n.execNativeCommand(t)}catch(t){r=!0}!(r="paste"===t&&!o.queryCommandEnabled(t)||r)&&o.queryCommandSupported(t)||(r=e.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead."),On.mac&&(r=r.replace(/Ctrl\+/g,"⌘+")),e.notificationManager.open({text:r,type:"error"}))},unlink:function(){var t;e.selection.isCollapsed()?(t=e.dom.getParent(e.selection.getStart(),"a"))&&e.dom.remove(t,!0):e.formatter.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(t){var r=t.substring(7);"full"===r&&(r="justify"),JS("left,center,right,justify".split(","),(function(t){r!==t&&e.formatter.remove("align"+t)})),"none"!==r&&n.toggleFormat("align"+r)},"InsertUnorderedList,InsertOrderedList":function(t){var r;n.execNativeCommand(t),(t=e.dom.getParent(e.selection.getNode(),"ol,ul"))&&(r=t.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(r.nodeName)&&(n.storeSelection(),e.dom.split(r,t),n.restoreSelection()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){n.toggleFormat(e)},"ForeColor,HiliteColor":function(e,t,r){n.toggleFormat(e,r)},FontName:function(t,n,r){dw(e,r)},FontSize:function(t,n,r){var o;(o=e).formatter.toggle("fontsize",{value:fw(o,r)}),o.nodeChanged()},RemoveFormat:function(t){e.formatter.remove(t)},mceBlockQuote:function(){n.toggleFormat("blockquote")},FormatBlock:function(e,t,r){return n.toggleFormat(r||"p")},mceCleanup:function(){var t=e.selection.getBookmark();e.setContent(e.getContent()),e.selection.moveToBookmark(t)},mceRemoveNode:function(t,r,o){o=o||e.selection.getNode(),o!==e.getBody()&&(n.storeSelection(),e.dom.remove(o,!0),n.restoreSelection())},mceSelectNodeDepth:function(t,n,r){var o=0;e.dom.getParent(e.selection.getNode(),(function(t){if(1===t.nodeType&&o++===r)return e.selection.select(t),!1}),e.getBody())},mceSelectNode:function(t,n,r){e.selection.select(r)},mceInsertContent:function(t,n,r){$S(e,r)},mceInsertRawHTML:function(t,n,r){e.selection.setContent("tiny_mce_marker");var o=e.getContent();e.setContent(o.replace(/tiny_mce_marker/g,(function(){return r})))},mceInsertNewLine:function(t,n,r){PC.insert(e,r)},mceToggleFormat:function(e,t,r){n.toggleFormat(r)},mceSetContent:function(t,n,r){e.setContent(r)},"Indent,Outdent":function(t){uy(e,t)},mceRepaint:function(){},InsertHorizontalRule:function(){e.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){e.hasVisual=!e.hasVisual,e.addVisual()},mceReplaceContent:function(t,n,r){e.execCommand("mceInsertContent",!1,r.replace(/\{\$selection\}/g,e.selection.getContent({format:"text"})))},mceInsertLink:function(t,n,r){var o;"string"==typeof r&&(r={href:r}),o=e.dom.getParent(e.selection.getNode(),"a"),r.href=r.href.replace(/ /g,"%20"),o&&r.href||e.formatter.remove("link"),r.href&&e.formatter.apply("link",r,o)},selectAll:function(){var t,n=e.dom.getParent(e.selection.getStart(),Ue.isContentEditableTrue);n&&((t=e.dom.createRng()).selectNodeContents(n),e.selection.setRng(t))},delete:function(){GS(e)},forwardDelete:function(){XS(e)},mceNewDocument:function(){e.setContent("")},InsertLineBreak:function(t,n,r){return DC(e,r),!0}}),n.addCommands({JustifyLeft:t("alignleft"),JustifyCenter:t("aligncenter"),JustifyRight:t("alignright"),JustifyFull:t("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return n.isFormatMatch(e)},mceBlockQuote:function(){return n.isFormatMatch("blockquote")},Outdent:function(){return iy(e)},"InsertUnorderedList,InsertOrderedList":function(t){var n=e.dom.getParent(e.selection.getNode(),"ul,ol");return n&&("insertunorderedlist"===t&&"UL"===n.tagName||"insertorderedlist"===t&&"OL"===n.tagName)}},"state"),n.addCommands({Undo:function(){e.undoManager.undo()},Redo:function(){e.undoManager.redo()}}),n.addQueryValueHandler("FontName",(function(){return lw(t=e).fold((function(){return sw(t).map((function(e){return YS.getFontFamily(t.getBody(),e)})).getOr("")}),(function(e){return YS.getFontFamily(t.getBody(),e)}));var t}),this),n.addQueryValueHandler("FontSize",(function(){return lw(t=e).fold((function(){return sw(t).map((function(e){return YS.getFontSize(t.getBody(),e)})).getOr("")}),(function(e){return YS.getFontSize(t.getBody(),e)}));var t}),this)},tk);function tk(e){this.commands={state:{},exec:{},value:{}},this.editor=e,this.setupCommands(e)}var nk=_n.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"," "),rk=(ok.isNative=function(e){return!!nk[e.toLowerCase()]},ok.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=f},t.stopPropagation=function(){t.isPropagationStopped=f},t.stopImmediatePropagation=function(){t.isImmediatePropagationStopped=f},t.isDefaultPrevented=l,t.isPropagationStopped=l,t.isImmediatePropagationStopped=l),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},ok.prototype.on=function(e,t,n,r){var o,i,a;if(t=!1===t?l:t){var u={func:t};for(r&&_n.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},ok.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},ok.prototype.once=function(e,t,n){return this.on(e,t,n,{once:!0})},ok.prototype.has=function(e){return e=e.toLowerCase(),!(!this.bindings[e]||0===this.bindings[e].length)},ok);function ok(e){this.bindings={},this.settings=e||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||l}function ik(e){return e._eventDispatcher||(e._eventDispatcher=new rk({scope:e,toggleEvent:function(t,n){rk.isNative(t)&&e.toggleNativeEvent&&e.toggleNativeEvent(t,n)}})),e._eventDispatcher}function ak(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=lk.select(e.settings.event_root)[0]),e.eventRoot):e.getBody()}function uk(e,t,n){fk(e)?e.fire(t,n):xS(e)&&SS(n)}function ck(e,t){var n,r;e.delegates||(e.delegates={}),e.delegates[t]||e.removed||(n=ak(e,t),e.settings.event_root?(sk||(sk={},e.editorManager.on("removeEditor",(function(){if(!e.editorManager.activeEditor&&sk){for(var t in sk)e.dom.unbind(ak(e,t));sk=null}}))),sk[t]||(sk[t]=r=function(n){for(var r=n.target,o=e.editorManager.get(),i=o.length;i--;){var a=o[i].getBody();a!==r&&!lk.isChildOf(r,a)||uk(o[i],t,n)}},lk.bind(n,t,r))):(lk.bind(n,t,r=function(n){uk(e,t,n)}),e.delegates[t]=r))}He={fire:function(e,t,n){if(this.removed&&"remove"!==e&&"detach"!==e)return t;var r=ik(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 ik(this).on(e,t,n)},off:function(e,t){return ik(this).off(e,t)},once:function(e,t){return ik(this).once(e,t)},hasEventListeners:function(e){return ik(this).has(e)}};var sk,lk=ji.DOM,fk=function(e){return!e.hidden&&!xS(e)},dk=G(G({},He),{bindPendingEventDelegates:function(){var e=this;_n.each(e._pendingNativeEvents,(function(t){ck(e,t)}))},toggleNativeEvent:function(e,t){var n=this;"focus"!==e&&"blur"!==e&&(t?n.initialized?ck(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&(n.dom.unbind(ak(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(ak(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()))}}),mk=_n.each,gk=_n.explode,hk={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},pk=_n.makeMap("alt,ctrl,shift,meta,access"),vk=(bk.prototype.add=function(e,t,n,r){var o=this,i=n;return"string"==typeof n?n=function(){o.editor.execCommand(i,!1,null)}:_n.isArray(i)&&(n=function(){o.editor.execCommand(i[0],i[1],i[2])}),mk(gk(_n.trim(e)),(function(e){e=o.createShortcut(e,t,n,r),o.shortcuts[e.id]=e})),!0},bk.prototype.remove=function(e){return e=this.createShortcut(e),!!this.shortcuts[e.id]&&(delete this.shortcuts[e.id],!0)},bk.prototype.parseShortcut=function(e){var t,n,r={};for(n in mk(gk(e.toLowerCase(),"+"),(function(e){e in pk?r[e]=!0:/^[0-9]{2,}$/.test(e)?r.keyCode=parseInt(e,10):(r.charCode=e.charCodeAt(0),r.keyCode=hk[e]||e.toUpperCase().charCodeAt(0))})),t=[r.keyCode],pk)r[n]?t.push(n):r[n]=!1;return r.id=t.join(","),r.access&&(r.alt=!0,On.mac?r.ctrl=!0:r.shift=!0),r.meta&&(On.mac?r.meta=!0:(r.ctrl=!0,r.meta=!1)),r},bk.prototype.createShortcut=function(e,t,n,r){return e=_n.map(gk(e,">"),this.parseShortcut),e[e.length-1]=_n.extend(e[e.length-1],{func:n,scope:r||this.editor}),_n.extend(e[0],{desc:this.editor.translate(t),subpatterns:e.slice(1)})},bk.prototype.hasModifier=function(e){return e.altKey||e.ctrlKey||e.metaKey},bk.prototype.isFunctionKey=function(e){return"keydown"===e.type&&112<=e.keyCode&&e.keyCode<=123},bk.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)},bk.prototype.executeShortcutAction=function(e){return e.func?e.func.call(e.scope):null},bk);function bk(e){this.shortcuts={},this.pendingPatterns=[],this.editor=e;var t=this;e.on("keyup keypress keydown",(function(e){!t.hasModifier(e)&&!t.isFunctionKey(e)||e.isDefaultPrevented()||(mk(t.shortcuts,(function(n){if(t.matchShortcut(e,n))return t.pendingPatterns=n.subpatterns.slice(0),"keydown"===e.type&&t.executeShortcutAction(n),!0})),t.matchShortcut(e,t.pendingPatterns[0])&&(1===t.pendingPatterns.length&&"keydown"===e.type&&t.executeShortcutAction(t.pendingPatterns[0]),t.pendingPatterns.shift()))}))}var yk=_n.each,wk=_n.trim,xk="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),Ck={ftp:21,http:80,https:443,mailto:25},Sk=(kk.parseDataUri=function(e){e=decodeURIComponent(e).split(",");var t,n=/data:([^;]+)/.exec(e[0]);return{type:t=n?n[1]:t,data:e[1]}},kk.getDocumentBaseUrl=function(e){return e=0!==e.protocol.indexOf("http")&&"file:"!==e.protocol?e.href:e.protocol+"//"+e.host+e.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(e)&&(e=e.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(e)||(e+="/")),e},kk.prototype.setPath=function(e){e=/^(.*?)\/?(\w+)?$/.exec(e),this.path=e[0],this.directory=e[1],this.file=e[2],this.source="",this.getURI()},kk.prototype.toRelative=function(e){if("./"===e)return e;if(e=new kk(e,{base_uri:this}),"mce_host"!==e.host&&this.host!==e.host&&e.host||this.port!==e.port||this.protocol!==e.protocol&&""!==e.protocol)return e.getURI();var t=this.getURI(),n=e.getURI();return t===n||"/"===t.charAt(t.length-1)&&t.substr(0,t.length-1)===n?t:(n=this.toRelPath(this.path,e.path),e.query&&(n+="?"+e.query),e.anchor&&(n+="#"+e.anchor),n)},kk.prototype.toAbsolute=function(e,t){return e=new kk(e,{base_uri:this}),e.getURI(t&&this.isSameOrigin(e))},kk.prototype.isSameOrigin=function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=Ck[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},kk.prototype.toRelPath=function(e,t){var n,r,o=0,i="",a=e.substring(0,e.lastIndexOf("/")).split("/"),u=t.split("/");if(a.length>=u.length)for(n=0,r=a.length;n<r;n++)if(n>=u.length||a[n]!==u[n]){o=n+1;break}if(a.length<u.length)for(n=0,r=u.length;n<r;n++)if(n>=a.length||a[n]!==u[n]){o=n+1;break}if(1===o)return t;for(n=0,r=a.length-(o-1);n<r;n++)i+="../";for(n=o-1,r=u.length;n<r;n++)i+=n!==o-1?"/"+u[n]:u[n];return i},kk.prototype.toAbsPath=function(e,t){var n,r=0,o=[],i=/\/$/.test(t)?"/":"",a=(e=e.split("/"),t.split("/"));for(yk(e,(function(e){e&&o.push(e)})),e=o,n=a.length-1,o=[];0<=n;n--)0!==a[n].length&&"."!==a[n]&&(".."===a[n]?r++:0<r?r--:o.push(a[n]));return 0!==(t=(n=e.length-r)<=0?o.reverse().join("/"):e.slice(0,n).join("/")+"/"+o.reverse().join("/")).indexOf("/")&&(t="/"+t),i&&t.lastIndexOf("/")!==t.length-1&&(t+=i),t},kk.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},kk);function kk(e,t){e=wk(e),this.settings=t||{};t=this.settings.base_uri;var r,o,i,a,u=this;/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e)?u.source=e:(r=0===e.indexOf("//"),0!==e.indexOf("/")||r||(e=(t&&t.protocol||"http")+"://mce_host"+e),/^[\w\-]*:?\/\//.test(e)||(o=this.settings.base_uri?this.settings.base_uri.path:new kk(n.document.location.href).directory,e=this.settings.base_uri&&""==this.settings.base_uri.protocol?"//mce_host"+u.toAbsPath(o,e):(i=/([^#?]*)([#?]?.*)/.exec(e),(t&&t.protocol||"http")+"://mce_host"+u.toAbsPath(o,i[1])+i[2])),e=e.replace(/@@/g,"(mce_at)"),a=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e),yk(xk,(function(e,t){t=(t=a[t])&&t.replace(/\(mce_at\)/g,"@@"),u[e]=t})),t&&(u.protocol||(u.protocol=t.protocol),u.userInfo||(u.userInfo=t.userInfo),u.port||"mce_host"!==u.host||(u.port=t.port),u.host&&"mce_host"!==u.host||(u.host=t.host),u.source=""),r&&(u.protocol=""))}var Tk=function(){function e(e,t){return function(n,r){return e[n.toLowerCase()]=G(G({},r),{type:t})}}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}}}},Ek=ji.DOM,Ok=_n.extend,Nk=_n.each,Ak=_n.resolve,Dk=On.ie,_k=(Rk.prototype.render=function(){yS(this)},Rk.prototype.focus=function(e){wf.focus(this,e)},Rk.prototype.hasFocus=function(){return wf.hasFocus(this)},Rk.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+$/,""))?Ak(r):0,o=Ak(o),this.callbackLookup=this.callbackLookup||{},this.callbackLookup[e]={func:o,scope:r}),o.apply(r||this,Array.prototype.slice.call(arguments,1))},Rk.prototype.translate=function(e){return Ji.translate(e)},Rk.prototype.getParam=function(e,t,n){return Bl(this,e,t,n)},Rk.prototype.nodeChanged=function(e){this._nodeChangeDispatcher.nodeChanged(e)},Rk.prototype.addCommand=function(e,t,n){this.editorCommands.addCommand(e,t,n)},Rk.prototype.addQueryStateHandler=function(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)},Rk.prototype.addQueryValueHandler=function(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)},Rk.prototype.addShortcut=function(e,t,n,r){this.shortcuts.add(e,t,n,r)},Rk.prototype.execCommand=function(e,t,n,r){return this.editorCommands.execCommand(e,t,n,r)},Rk.prototype.queryCommandState=function(e){return this.editorCommands.queryCommandState(e)},Rk.prototype.queryCommandValue=function(e){return this.editorCommands.queryCommandValue(e)},Rk.prototype.queryCommandSupported=function(e){return this.editorCommands.queryCommandSupported(e)},Rk.prototype.show=function(){this.hidden&&(this.hidden=!1,this.inline?this.getBody().contentEditable="true":(Ek.show(this.getContainer()),Ek.hide(this.id)),this.load(),this.fire("show"))},Rk.prototype.hide=function(){var e=this,t=e.getDoc();e.hidden||(Dk&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable="false",e===e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(Ek.hide(e.getContainer()),Ek.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.fire("hide"))},Rk.prototype.isHidden=function(){return!!this.hidden},Rk.prototype.setProgressState=function(e,t){this.fire("ProgressState",{state:e,time:t})},Rk.prototype.load=function(e){var t,n=this.getElement();return this.removed?"":n?((e=e||{}).load=!0,t=Ue.isTextareaOrInput(n)?n.value:n.innerHTML,t=this.setContent(t,e),e.element=n,e.no_events||this.fire("LoadContent",e),e.element=n=null,t):void 0},Rk.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,Ue.isTextareaOrInput(o)?o.value=t:(!e.is_removing&&r.inline||(o.innerHTML=t),(n=Ek.getParent(r.id,"form"))&&Nk(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},Rk.prototype.setContent=function(e,t){return kl(this,e,t)},Rk.prototype.getContent=function(e){return fl(this,e)},Rk.prototype.insertContent=function(e,t){t&&(e=Ok({content:e},t)),this.execCommand("mceInsertContent",!1,e)},Rk.prototype.resetContent=function(e){void 0===e?kl(this,this.startContent,{format:"raw"}):kl(this,e),this.undoManager.reset(),this.setDirty(!1),this.nodeChanged()},Rk.prototype.isDirty=function(){return!this.isNotDirty},Rk.prototype.setDirty=function(e){var t=!this.isNotDirty;this.isNotDirty=!e,e&&e!==t&&this.fire("dirty")},Rk.prototype.getContainer=function(){return this.container||(this.container=Ek.get(this.editorContainer||this.id+"_parent")),this.container},Rk.prototype.getContentAreaContainer=function(){return this.contentAreaContainer},Rk.prototype.getElement=function(){return this.targetElm||(this.targetElm=Ek.get(this.id)),this.targetElm},Rk.prototype.getWin=function(){var e;return this.contentWindow||(e=this.iframeElement)&&(this.contentWindow=e.contentWindow),this.contentWindow},Rk.prototype.getDoc=function(){var e;return this.contentDocument||(e=this.getWin())&&(this.contentDocument=e.document),this.contentDocument},Rk.prototype.getBody=function(){var e=this.getDoc();return this.bodyElement||(e?e.body:null)},Rk.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):this.documentBaseURI.toAbsolute(e,r.remove_script_host)},Rk.prototype.addVisual=function(e){var t,n=this,r=n.settings,o=n.dom;e=e||n.getBody(),void 0===n.hasVisual&&(n.hasVisual=r.visual),Nk(o.select("table,a",e),(function(e){var i;switch(e.nodeName){case"TABLE":return t=r.visual_table_class||"mce-item-table",void((i=o.getAttrib(e,"border"))&&"0"!==i||!n.hasVisual?o.removeClass(e,t):o.addClass(e,t));case"A":return void(o.getAttrib(e,"href")||(i=o.getAttrib(e,"name")||e.id,t=r.visual_anchor_class||"mce-item-anchor",i&&n.hasVisual?o.addClass(e,t):o.removeClass(e,t)))}})),n.fire("VisualAid",{element:e,hasVisual:n.hasVisual})},Rk.prototype.remove=function(){El(this)},Rk.prototype.destroy=function(e){Ol(this,e)},Rk.prototype.uploadImages=function(e){return this.editorUpload.uploadImages(e)},Rk.prototype._scanForImages=function(){return this.editorUpload.scanForImages()},Rk.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")},Rk.prototype.addSidebar=function(){throw new Error("editor.addSidebar has been removed in tinymce 5x, use editor.ui.registry.addSidebar instead")},Rk.prototype.addMenuItem=function(){throw new Error("editor.addMenuItem has been removed in tinymce 5x, use editor.ui.registry.addMenuItem instead")},Rk.prototype.addContextToolbar=function(){throw new Error("editor.addContextToolbar has been removed in tinymce 5x, use editor.ui.registry.addContextToolbar instead")},Rk);function Rk(e,t,n){var o,i,a,u=this;this.plugins={},this.contentCSS=[],this.contentStyles=[],this.loadedCSS={},this.isNotDirty=!1,this.editorManager=n,this.documentBaseUrl=n.documentBaseURL,Ok(this,dk),this.settings=function(e,t,n,r,o){return t=Rf(t,n,Nf,e),Bf(Nf,Af,t,r,o)}(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&&(Gi.ScriptLoader._setReferrerPolicy(this.settings.referrer_policy),ji.DOM.styleSheetLoader._setReferrerPolicy(this.settings.referrer_policy)),ca.languageLoad=this.settings.language_load,ca.baseURL=n.baseURL,this.id=e,this.setDirty(!1),this.documentBaseURI=new Sk(this.settings.document_base_url,{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=!!this.settings.inline,this.shortcuts=new vk(this),this.editorCommands=new ek(this),this.settings.cache_suffix&&(On.cacheSuffix=this.settings.cache_suffix.replace(/^[\?\&]+/,"")),this.ui={registry:{addAutocompleter:(t=Tk()).addAutocompleter,addButton:t.addButton,addContextForm:t.addContextForm,addContextMenu:t.addContextMenu,addContextToolbar:t.addContextToolbar,addIcon:t.addIcon,addMenuButton:t.addMenuButton,addMenuItem:t.addMenuItem,addNestedMenuItem:t.addNestedMenuItem,addSidebar:t.addSidebar,addSplitButton:t.addSplitButton,addToggleButton:t.addToggleButton,addToggleMenuItem:t.addToggleMenuItem,getAll:t.getAll}},o=this,i=je("design"),a=je({design:{activate:r,deactivate:r,editorReadOnly:!1},readonly:{activate:r,deactivate:r,editorReadOnly:!0}}),CS(o),kS(o),e={isReadOnly:function(){return xS(o)},set:function(e){return ES(o,a.get(),i,e)},get:function(){return i.get()},register:function(e,t){a.set(OS(a.get(),e,t))}};this.mode=e,this.setMode=e.set,n.fire("SetupEditor",{editor:this}),this.execCallback("setup",this),this.$=mi.overrideDefaults((function(){return{context:u.inline?u.getBody():u.getDoc(),element:u.getBody()}}))}function Bk(e){var t=e.type;Lk($k.get(),(function(n){switch(t){case"scroll":n.fire("ScrollWindow",e);break;case"resize":n.fire("ResizeWindow",e)}}))}function Mk(e){e!==Vk&&(e?mi(window).on("resize scroll",Bk):mi(window).off("resize scroll",Bk),Vk=e)}var Pk,zk=ji.DOM,Ik=_n.explode,Lk=_n.each,Fk=_n.extend,Hk=0,Vk=!1,Uk=[],jk=[],Wk=function(e){var t=jk;delete Uk[e.id];for(var n=0;n<Uk.length;n++)if(Uk[n]===e){Uk.splice(n,1);break}return jk=I(jk,(function(t){return e!==t})),$k.activeEditor===e&&($k.activeEditor=0<jk.length?jk[0]:null),$k.focusedEditor===e&&($k.focusedEditor=null),t.length!==jk.length},qk="CSS1Compat"!==n.document.compatMode,$k=G(G({},He),{baseURI:null,baseURL:null,defaultSettings:{},documentBaseURL:null,suffix:null,$:mi,majorVersion:"5",minorVersion:"1.0",releaseDate:"2019-10-17",editors:Uk,i18n:Ji,activeEditor:null,focusedEditor:null,settings:{},setup:function(){var e,t="",r=Sk.getDocumentBaseUrl(n.document.location),o=(/^[^:]+:\/\/\/?[^\/]+\//.test(r)&&(r=r.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(r)||(r+="/")),window.tinymce||window.tinyMCEPreInit);if(o)e=o.base||o.baseURL,t=o.suffix;else{for(var i=n.document.getElementsByTagName("script"),a=0;a<i.length;a++){var u=i[a].src||"";if(""!==u){var c=u.substring(u.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(u)){-1!==c.indexOf(".min")&&(t=".min"),e=u.substring(0,u.lastIndexOf("/"));break}}}!e&&n.document.currentScript&&(-1!==(u=n.document.currentScript.src).indexOf(".min")&&(t=".min"),e=u.substring(0,u.lastIndexOf("/")))}this.baseURL=new Sk(r).toAbsolute(e),this.documentBaseURL=r,this.baseURI=new Sk(this.baseURL),this.suffix=t,mf.setup(this)},overrideDefaults:function(e){var t,n=e.base_url,r=(n&&this._setBaseUrl(n),n=e.suffix,e.suffix&&(this.suffix=n),(this.defaultSettings=e).plugin_base_urls);for(t in r)ca.PluginManager.urls[t]=r[t]},init:function(e){var t,r=this,o=_n.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"," "),i=function(e,t){return e.inline&&t.tagName.toLowerCase()in o},a=function(e){var t=e.id;return t||(t=(t=e.name)&&!zk.get(t)?e.name:zk.uniqueId(),e.setAttribute("id",t)),t},u=function(t){if(t=e[t],t)return t.apply(r,Array.prototype.slice.call(arguments,2))},c=function(e,t){return t.constructor===RegExp?t.test(e.className):zk.hasClass(e,t)},s=function(e){var t,r=[];if(On.browser.isIE()&&On.browser.version.major<11)return Xf.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(qk)return Xf.initError("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),[];if(e.types)return Lk(e.types,(function(e){r=r.concat(zk.select(e.selector))})),r;if(e.selector)return zk.select(e.selector);if(e.target)return[e.target];switch(e.mode){case"exact":0<(t=e.elements||"").length&&Lk(Ik(t),(function(e){var t;(t=zk.get(e))?r.push(t):Lk(n.document.forms,(function(t){Lk(t.elements,(function(t){t.name===e&&(e="mce_editor_"+Hk++,zk.setAttrib(t,"id",e),r.push(t))}))}))}));break;case"textareas":case"specific_textareas":Lk(zk.select("textarea"),(function(t){e.editor_deselector&&c(t,e.editor_deselector)||e.editor_selector&&!c(t,e.editor_selector)||r.push(t)}))}return r},l=function(e){t=e},f=function(){function t(e,t,i){e=new _k(e,t,r),c.push(e),e.on("init",(function(){++o===n.length&&l(c)})),e.targetElm=e.targetElm||i,e.render()}var n,o=0,c=[];zk.unbind(window,"ready",f),u("onpageload"),n=mi.unique(s(e)),e.types?Lk(e.types,(function(r){_n.each(n,(function(n){return!zk.is(n,r.selector)||(t(a(n),Fk({},e,r),n),!1)}))})):(_n.each(n,(function(e){(e=r.get(e.id))&&e.initialized&&!(e.getContainer()||e.getBody()).parentNode&&(Wk(e),e.unbindAllNativeEvents(),e.destroy(!0),e.removed=!0,e=null)})),0===(n=_n.grep(n,(function(e){return!r.get(e.id)}))).length?l([]):Lk(n,(function(n){i(e,n)?Xf.initError("Could not initialize inline editor on invalid inline target element",n):t(a(n),e,n)})))};return r.settings=e,zk.bind(window,"ready",f),new cn((function(e){t?e(t):l=function(t){e(t)}}))},get:function(e){return 0===arguments.length?jk.slice(0):C(e)?F(jk,(function(t){return t.id===e})).getOr(null):N(e)&&jk[e]||null},add:function(e){var t=this;return Uk[e.id]===e||(null===t.get(e.id)&&("length"!==e.id&&(Uk[e.id]=e),Uk.push(e),jk.push(e)),Mk(!0),t.activeEditor=e,t.fire("AddEditor",{editor:e}),Pk||(Pk=function(e){var n=t.fire("BeforeUnload");if(n.returnValue)return e.preventDefault(),e.returnValue=n.returnValue,n.returnValue},window.addEventListener("beforeunload",Pk))),e},createEditor:function(e,t){return this.add(new _k(e,t,this))},remove:function(e){var t,n,r=this;if(e){if(!C(e))return n=e,T(r.get(n.id))?null:(Wk(n)&&r.fire("RemoveEditor",{editor:n}),0===jk.length&&window.removeEventListener("beforeunload",Pk),n.remove(),Mk(0<jk.length),n);Lk(zk.select(e),(function(e){(n=r.get(e.id))&&r.remove(n)}))}else for(t=jk.length-1;0<=t;t--)r.remove(jk[t])},execCommand:function(e,t,n){var r=this.get(n);switch(e){case"mceAddEditor":return this.get(n)||new _k(n,this.settings,this).render(),!0;case"mceRemoveEditor":return r&&r.remove(),!0;case"mceToggleEditor":return r?(r.isHidden()?r.show():r.hide(),!0):(this.execCommand("mceAddEditor",0,n),!0)}return!!this.activeEditor&&this.activeEditor.execCommand(e,t,n)},triggerSave:function(){Lk(jk,(function(e){e.save()}))},addI18n:function(e,t){Ji.add(e,t)},translate:function(e){return Ji.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 Sk(this.documentBaseURL).toAbsolute(e.replace(/\/+$/,"")),this.baseURI=new Sk(this.baseURL)}});function Gk(e){return{walk:function(t,n){return qs(e,t,n)},split:Pg,normalize:function(t){return _v.normalize(e,t).fold(i(!1),(function(e){return t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),!0}))}}}function Xk(e,t,r){function o(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];i||(i=!0,null!==a&&(n.clearTimeout(a),a=null),e.apply(null,t))}}void 0===r&&(r=1e3);var i=!1,a=null,u=(e=o(e),o(t));return{start:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];i||null!==a||(a=n.setTimeout((function(){return u.apply(null,e)}),r))},resolve:e,reject:u}}function Yk(e,t,n){var r=t.x,o=t.y,i=e.w,a=(e=e.h,t.w);t=t.h;return"b"===(n=(n||"").split(""))[0]&&(o+=t),"r"===n[1]&&(r+=a),"c"===n[0]&&(o+=uT(t/2)),"c"===n[1]&&(r+=uT(a/2)),"b"===n[3]&&(o-=e),"r"===n[4]&&(r-=i),"c"===n[3]&&(o-=uT(e/2)),"c"===n[4]&&(r-=uT(i/2)),Kk(r,o,i,e)}function Kk(e,t,n,r){return{x:e,y:t,w:n,h:r}}function Jk(){}$k.setup(),(Ie=Gk=Gk||{}).compareRanges=Sd,Ie.getCaretRangeFromPoint=uv.fromPoint,Ie.getSelectedNode=Ta,Ie.getNode=Ea;Fe=Gk,Zk={},Qk={},Pe={load:function(e,t){var n,r='Script at URL "'+t+'" failed to load',o='Script at URL "'+t+"\" did not call `tinymce.Resource.add('"+e+"', data)` within 1 second";return void 0!==Zk[e]?Zk[e]:(n=new cn((function(n,i){var a=Xk(n,i);Qk[e]=a.resolve,Gi.ScriptLoader.loadScript(t,(function(){return a.start(o)}),(function(){return a.reject(r)}))})),Zk[e]=n)},add:function(e,t){void 0!==Qk[e]&&(Qk[e](t),delete Qk[e]),Zk[e]=cn.resolve(t)}};var Zk,Qk,eT,tT,nT,rT,oT,iT=Math.min,aT=Math.max,uT=Math.round,cT=(Ve={inflate:function(e,t,n){return Kk(e.x-t,e.y-n,e.w+2*t,e.h+2*n)},relativePosition:Yk,findBestRelativePosition:function(e,t,n,r){for(var o,i=0;i<r.length;i++)if((o=Yk(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=aT(e.x,t.x),r=aT(e.y,t.y),o=iT(e.x+e.w,t.x+t.w);e=iT(e.y+e.h,t.y+t.h);return o-n<0||e-r<0?null:Kk(n,r,o-n,e-r)},clamp:function(e,t,n){var r=e.x,o=e.y,i=e.x+e.w,a=(e=e.y+e.h,t.x+t.w),u=t.y+t.h,c=aT(0,t.x-r);t=aT(0,t.y-o),a=aT(0,i-a),u=aT(0,e-u);return r+=c,o+=t,n&&(i+=c,e+=t,r-=a,o-=u),Kk(r,o,(i-=a)-r,(e-=u)-o)},create:Kk,fromClientRect:function(e){return Kk(e.left,e.top,e.width,e.height)}},_n.each),sT=_n.extend,lT=(Jk.extend=eT=function(e){function t(){var e,t,n;if(!tT&&(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 n(){return this}var r,o,i,a=this.prototype;for(o in tT=!0,r=new this,tT=!1,e.Mixins&&(cT(e.Mixins,(function(t){for(var n in t)"init"!==n&&(e[n]=t[n])})),a.Mixins&&(e.Mixins=a.Mixins.concat(e.Mixins))),e.Methods&&cT(e.Methods.split(","),(function(t){e[t]=n})),e.Properties&&cT(e.Properties.split(","),(function(t){var n="_"+t;e[t]=function(e){return void 0!==e?(this[n]=e,this):this[n]}})),e.Statics&&cT(e.Statics,(function(e,n){t[n]=e})),e.Defaults&&a.Defaults&&(e.Defaults=sT({},a.Defaults,e.Defaults)),e)"function"==typeof(i=e[o])&&a[o]?r[o]=function(e,t){return function(){var n,r=this._super;return this._super=a[e],n=t.apply(this,arguments),this._super=r,n}}(o,i):r[o]=i;return t.prototype=r,(t.constructor=t).extend=eT,t},Math.min),fT=Math.max,dT=Math.round,mT={serialize:function(e){return e=JSON.stringify(e),C(e)?e.replace(/[\u0080-\uFFFF]/g,(function(e){return e=e.charCodeAt(0).toString(16),"\\u"+"0000".substring(e.length)+e})):e},parse:function(e){try{return JSON.parse(e)}catch(e){}}},gT=(Le={callbacks:{},count:0,send:function(e){var t=this,n=ji.DOM,r=(void 0!==e.count?e:t).count,o="tinymce_jsonp_"+r;t.callbacks[r]=function(i){n.remove(o),delete t.callbacks[r],e.callback(i)},n.add(n.doc.body,"script",{id:o,src:e.url,type:"text/javascript"}),t.count++}},G(G({},He),{send:function(e){var t,r=0,o=function(){!e.async||4===t.readyState||1e4<r++?(e.success&&r<1e4&&200===t.status?e.success.call(e.success_scope,""+t.responseText,t,e):e.error&&e.error.call(e.error_scope,1e4<r?"TIMED_OUT":"GENERAL",t,e),t=null):En.setTimeout(o,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||"",gT.fire("beforeInitialize",{settings:e}),t=new n.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&&_n.each(e.requestheaders,(function(e){t.setRequestHeader(e.key,e.value)})),t.setRequestHeader("X-Requested-With","XMLHttpRequest"),(t=gT.fire("beforeSend",{xhr:t,settings:e}).xhr).send(e.data),!e.async)return o();En.setTimeout(o,10)}}})),hT=_n.extend;pT.sendRPC=function(e){return(new pT).send(e)},pT.prototype.send=function(e){var t=e.error,n=e.success,r=hT(this.settings,e);r.success=function(e,o){(e=void 0===(e=mT.parse(e))?{error:"JSON Parse error."}:e).error?t.call(r.error_scope||r.scope,e.error,o):n.call(r.success_scope||r.scope,e.result)},r.error=function(e,n){t&&t.call(r.error_scope||r.scope,e,n)},r.data=mT.serialize({id:e.id||"c"+this.count++,method:e.method,params:e.params}),r.content_type="application/json",gT.send(r)},ze=pT;function pT(e){this.settings=hT({},e),this.count=0}try{nT=n.window.localStorage}catch(Pe){rT={},oT=[],Me={getItem:function(e){return e=rT[e],e||null},setItem:function(e,t){oT.push(e),rT[e]=String(t)},key:function(e){return oT[e]},removeItem:function(e){oT=oT.filter((function(t){return t===e})),delete rT[e]},clear:function(){oT=[],rT={}},length:0},Object.defineProperty(Me,"length",{get:function(){return oT.length},configurable:!1,enumerable:!1}),nT=Me}Ie={geom:{Rect:Ve},util:{Promise:cn,Delay:En,Tools:_n,VK:xm,URI:Sk,Class:Jk,EventDispatcher:rk,Observable:He,I18n:Ji,XHR:gT,JSON:mT,JSONRequest:ze,JSONP:Le,LocalStorage:nT,Color:function(e){function t(e){if("object"==typeof e){if("r"in e)r=e.r,o=e.g,i=e.b;else if("v"in e){var t,a,u=e.h,c=e.s,s=e.v;if(u=(parseInt(u,10)||0)%360,c=parseInt(c,10)/100,s=parseInt(s,10)/100,c=fT(0,lT(c,1)),s=fT(0,lT(s,1)),0===c)r=o=i=dT(255*s);else{switch(u/=60,a=(t=s*c)*(1-Math.abs(u%2-1)),c=s-t,Math.floor(u)){case 0:r=t,o=a,i=0;break;case 1:r=a,o=t,i=0;break;case 2:r=0,o=t,i=a;break;case 3:r=0,o=a,i=t;break;case 4:r=a,o=0,i=t;break;case 5:r=t,o=0,i=a;break;default:r=o=i=0}r=dT(255*(r+c)),o=dT(255*(o+c)),i=dT(255*(i+c))}}}else(s=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e))?(r=parseInt(s[1],10),o=parseInt(s[2],10),i=parseInt(s[3],10)):(s=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e))?(r=parseInt(s[1],16),o=parseInt(s[2],16),i=parseInt(s[3],16)):(s=/#([0-F])([0-F])([0-F])/gi.exec(e))&&(r=parseInt(s[1]+s[1],16),o=parseInt(s[2]+s[2],16),i=parseInt(s[3]+s[3],16));return r=r<0?0:255<r?255:r,o=o<0?0:255<o?255:o,i=i<0?0:255<i?255:i,n}var n={},r=0,o=0,i=0;return e&&t(e),n.toRgb=function(){return{r:r,g:o,b:i}},n.toHsv=function(){return e=r,t=o,n=i,s=0,(a=lT(e/=255,lT(t/=255,n/=255)))===(u=fT(e,fT(t,n)))?{h:0,s:0,v:100*(s=a)}:(c=(u-a)/u,{h:dT(60*((e===a?3:n===a?1:5)-(e===a?t-n:n===a?e-t:n-e)/((s=u)-a))),s:dT(100*c),v:dT(100*s)});var e,t,n,a,u,c,s},n.toHex=function(){function e(e){return 1<(e=parseInt(e,10).toString(16)).length?e:"0"+e}return"#"+e(r)+e(o)+e(i)},n.parse=t,n}},dom:{EventUtils:Ar,Sizzle:Oo,DomQuery:mi,TreeWalker:gi,DOMUtils:ji,ScriptLoader:Gi,RangeUtils:Fe,Serializer:Kh,ControlSelection:Sp,BookmarkManager:wp,Selection:Vv,Event:Ar.Event},html:{Styles:kr,Entities:ur,Node:il,Schema:br,SaxParser:Il,DomParser:vp,Writer:dl,Serializer:jl},Env:On,AddOnManager:ca,Annotator:Qs,Formatter:$h,UndoManager:tm,EditorCommands:ek,WindowManager:Vf,NotificationManager:Hf,EditorObservable:dk,Shortcuts:vk,Editor:_k,FocusManager:of,EditorManager:$k,DOM:ji.DOM,ScriptLoader:Gi.ScriptLoader,PluginManager:ca.PluginManager,ThemeManager:ca.ThemeManager,IconManager:Kf,Resource:Pe,trim:_n.trim,isArray:_n.isArray,is:_n.is,toArray:_n.toArray,makeMap:_n.makeMap,each:_n.each,map:_n.map,grep:_n.grep,inArray:_n.inArray,extend:_n.extend,create:_n.create,walk:_n.walk,createNS:_n.createNS,resolve:_n.resolve,explode:_n.explode,_addCacheSuffix:_n._addCacheSuffix,isOpera:On.opera,isWebKit:On.webkit,isIE:On.ie,isGecko:On.gecko,isMac:On.mac},Me=_n.extend($k,Ie),Ve=Me,window.tinymce=Ve,window.tinyMCE=Ve,He=Me;try{e.exports=He}catch(Pe){}}(window)}).call(this,n("c8ba"))},e704:function(e,t){!function(e){"use strict";var t=function(e){function n(){return r}var r=e;return{get:n,set:function(e){r=e},clone:function(){return t(r)}}},n=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=function(t){return!(!/(^|[ ,])tinymcespellchecker([, ]|$)/.test(t.settings.plugins)||!n.get("tinymcespellchecker"))&&(void 0!==e.window.console&&e.window.console.log&&e.window.console.log("Spell Checker Pro is incompatible with Spell Checker plugin! Remove 'spellchecker' from the 'plugins' option."),!0)},o=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=tinymce.util.Tools.resolve("tinymce.util.URI"),a=tinymce.util.Tools.resolve("tinymce.util.XHR"),u={fireSpellcheckStart:function(e){return e.fire("SpellcheckStart")},fireSpellcheckEnd:function(e){return e.fire("SpellcheckEnd")}},c={getLanguages:function(e){return e.getParam("spellchecker_languages","English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr_FR,German=de,Italian=it,Polish=pl,Portuguese=pt_BR,Spanish=es,Swedish=sv")},getLanguage:function(e){var t=e.getParam("language","en");return e.getParam("spellchecker_language",t)},getRpcUrl:function(e){return e.getParam("spellchecker_rpc_url")},getSpellcheckerCallback:function(e){return e.getParam("spellchecker_callback")},getSpellcheckerWordcharPattern:function(e){var t=new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`§©«®±¶·¸»¼½¾¿×÷¤”“„ ]+',"g");return e.getParam("spellchecker_wordchar_pattern",t)}};function s(e){return e&&1===e.nodeType&&"false"===e.contentEditable}function l(e,t,n,r,o,i,a){var u=c.getSpellcheckerCallback(e);(u||b(e,t,n)).call(e.plugins.spellchecker,r,o,i,a)}function f(e,t,n){e.dom.select("span.mce-spellchecker-word").length||d(e,t,n)}function d(e,t,n){var r=e.selection.getBookmark();return p(e,n).reset(),e.selection.moveToBookmark(r),n.set(null),t.get()&&(t.set(!1),u.fireSpellcheckEnd(e),1)}function m(e){return"number"==typeof(e=e.getAttribute("data-mce-index"))?""+e:e}function g(e,t,n,r,o){var i=!!o.dictionary,a=o.words;if(e.setProgressState(!1),v(a))return o=e.translate("No misspellings found."),e.notificationManager.open({text:o,type:"info"}),void t.set(!1);r.set({suggestions:a,hasDictionarySupport:i}),o=e.selection.getBookmark(),p(e,n).find(c.getSpellcheckerWordcharPattern(e)).filter((function(e){return!!a[e.text]})).wrap((function(t){return e.dom.create("span",{class:"mce-spellchecker-word","aria-invalid":"spelling","data-mce-bogus":1,"data-mce-word":t.text})})),e.selection.moveToBookmark(o),t.set(!0),u.fireSpellcheckStart(e)}var h=function(e,t){var n,r,o,i,a,u=[],c=t.dom;function l(t){var n=e.getElementsByTagName("*"),r=[];t="number"==typeof t?""+t:null;for(var o=0;o<n.length;o++){var i=n[o],a=i.getAttribute("data-mce-index");null===a||!a.length||-1===i.className.indexOf("mce-spellchecker-word")||a!==t&&null!==t||r.push(i)}return r}function f(e){for(var t=u.length;t--;)if(u[t]===e)return t;return-1}function d(e){for(var t=0,n=u.length;t<n&&!1!==e(u[t],t);t++);return this}function m(e){for(var t,n=l(e?f(e):null),r=n.length;r--;)(t=n[r]).parentNode.insertBefore(t.firstChild,t),t.parentNode.removeChild(t);return this}function g(e){e=l(f(e));var n=t.dom.createRng();return n.setStartBefore(e[0]),n.setEndAfter(e[e.length-1]),n}return o=t.schema.getBlockElements(),i=t.schema.getWhiteSpaceElements(),a=t.schema.getShortEndedElements(),{text:r=function e(t){var n;if(3===t.nodeType)return t.data;if(i[t.nodeName]&&!o[t.nodeName])return"";if(s(t))return"\n";if(n="",(o[t.nodeName]||a[t.nodeName])&&(n+="\n"),t=t.firstChild)for(;n+=e(t),t=t.nextSibling;);return n}(e),matches:u,each:d,filter:function(e){var t=[];return d((function(n,r){e(n,r)&&t.push(n)})),u=t,this},reset:function(){return u.splice(0,u.length),m(),this},matchFromElement:function(e){return u[e.getAttribute("data-mce-index")]},elementFromMatch:function(e){return l(f(e))[0]},find:function(e,t){if(r&&e.global)for(;n=e.exec(r);)u.push(function(e,t){if(e[0])return{start:e.index,end:e.index+e[0].length,text:e[0],data:t};throw new Error("findAndReplaceDOMText cannot handle zero-length matches")}(n,t));return this},add:function(e,t,n){return u.push({start:e,end:e+t,text:r.substr(e,t),data:n}),this},wrap:function(t){if(u.length){var n,r,l,f,d,m=e,g=u,h=(x=t,function(e){var t,n=e.startNode,r=e.endNode,o=e.matchIndex,i=c.doc;if(n===r)return t=(s=n).parentNode,0<e.startNodeIndex&&(a=i.createTextNode(s.data.substring(0,e.startNodeIndex)),t.insertBefore(a,s)),g=w(e.match,o),t.insertBefore(g,s),e.endNodeIndex<s.length&&(u=i.createTextNode(s.data.substring(e.endNodeIndex)),t.insertBefore(u,s)),s.parentNode.removeChild(s),g;for(var a=i.createTextNode(n.data.substring(0,e.startNodeIndex)),u=i.createTextNode(r.data.substring(e.endNodeIndex)),s=w(n.data.substring(e.startNodeIndex),o),l=0,f=e.innerNodes.length;l<f;++l){var d=e.innerNodes[l],m=w(d.data,o);d.parentNode.replaceChild(m,d)}var g=w(r.data.substring(0,e.endNodeIndex),o);return(t=n.parentNode).insertBefore(a,n),t.insertBefore(s,n),t.removeChild(n),(t=r.parentNode).insertBefore(g,r),t.insertBefore(u,r),t.removeChild(r),g}),p=[],v=0,b=m,y=0;(g=g.slice(0)).sort((function(e,t){return e.start-t.start})),d=g.shift();e:for(;;){if((o[b.nodeName]||a[b.nodeName]||s(b))&&v++,3===b.nodeType&&(!r&&b.length+v>=d.end?(r=b,f=d.end-v):n&&p.push(b),!n&&b.length+v>d.start&&(n=b,l=d.start-v),v+=b.length),n&&r){if(b=h({startNode:n,startNodeIndex:l,endNode:r,endNodeIndex:f,innerNodes:p,match:d.text,matchIndex:y}),v-=r.length-f,r=n=null,p=[],y++,!(d=g.shift()))break}else if(i[b.nodeName]&&!o[b.nodeName]||!b.firstChild){if(b.nextSibling){b=b.nextSibling;continue}}else if(!s(b)){b=b.firstChild;continue}for(;;){if(b.nextSibling){b=b.nextSibling;break}if(b.parentNode===m)break e;b=b.parentNode}}}function w(e,t){var n=u[t];n.stencil||(n.stencil=x(n)),n=n.stencil.cloneNode(!1);return n.setAttribute("data-mce-index",t),e&&n.appendChild(c.doc.createTextNode(e)),n}var x;return this},unwrap:m,replace:function(e,n){return(e=g(e)).deleteContents(),0<n.length&&e.insertNode(t.dom.doc.createTextNode(n)),e},rangeFromMatch:g,indexOf:f}},p=function(e,t){return t.get()||(e=h(e.getBody(),e),t.set(e)),t.get()},v=function(e){for(var t in e)return!1;return!0},b=function(e,t,n){return function(r,u,s,l){var f={method:r,lang:n.get()},d="";f["addToDictionary"===r?"word":"text"]=u,o.each(f,(function(e,t){d&&(d+="&"),d+=t+"="+encodeURIComponent(e)})),a.send({url:new i(t).toAbsolute(c.getRpcUrl(e)),type:"post",content_type:"application/x-www-form-urlencoded",data:d,success:function(t){t=JSON.parse(t);t?t.error?l(t.error):s(t):(t=e.translate("Server response wasn't proper JSON."),l(t))},error:function(){var t=e.translate("The spelling service was not found: (")+c.getRpcUrl(e)+e.translate(")");l(t)}})}},y={spellcheck:function(e,t,n,r,o,i){d(e,n,r)||(e.setProgressState(!0),l(e,t,i,"spellcheck",p(e,r).text,(function(t){g(e,n,r,o,t)}),(function(t){e.notificationManager.open({text:t,type:"error"}),e.setProgressState(!1),d(e,n,r)})),e.focus())},checkIfFinished:f,addToDictionary:function(e,t,n,r,o,i,a){e.setProgressState(!0),l(e,t,o,"addToDictionary",i,(function(){e.setProgressState(!1),e.dom.remove(a,!0),f(e,n,r)}),(function(t){e.notificationManager.open({text:t,type:"error"}),e.setProgressState(!1)}))},ignoreWord:function(e,t,n,r,i,a){e.selection.collapse(),a?o.each(e.dom.select("span.mce-spellchecker-word"),(function(t){t.getAttribute("data-mce-word")===r&&e.dom.remove(t,!0)})):e.dom.remove(i,!0),f(e,t,n)},findSpansByIndex:function(e,t){var n=[],r=o.toArray(e.getBody().getElementsByTagName("span"));if(r.length)for(var i=0;i<r.length;i++){var a=m(r[i]);null!==a&&a.length&&a===t.toString()&&n.push(r[i])}return n},getElmIndex:m,markErrors:g},w=function(e,t,n,r,o,i){return{getTextMatcher:function(){return r.get()},getWordCharPattern:function(){return c.getSpellcheckerWordcharPattern(e)},markErrors:function(o){y.markErrors(e,t,r,n,o)},getLanguage:function(){return o.get()}}},x=function(e,t,n,r,o,i){e.addCommand("mceSpellCheck",(function(){y.spellcheck(e,t,n,r,o,i)}))},C=function(){return(C=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)},S="SpellcheckStart SpellcheckEnd",k=function(e,t,n,r,i,a){function u(){y.spellcheck(e,t,n,r,a,i)}f=o.map(c.getLanguages(e).split(","),(function(e){return{name:(e=e.split("="))[0],value:e[1]}})),s=[],o.each(f,(function(e){s.push({selectable:!0,text:e.name,data:e.value})}));var s,l=s,f={tooltip:"Spellcheck",onAction:u,icon:"spell-check",onSetup:function(t){function r(){t.setActive(n.get())}return e.on(S,r),function(){e.off(S,r)}}},d=C(C({},f),{type:"splitbutton",select:function(e){return e===i.get()},fetch:function(e){e(o.map(l,(function(e){return{type:"choiceitem",value:e.data,text:e.text}})))},onItemAction:function(e,t){i.set(t)}});1<l.length?e.ui.registry.addSplitButton("spellchecker",d):e.ui.registry.addToggleButton("spellchecker",f),e.ui.registry.addToggleMenuItem("spellchecker",{text:"Spellcheck",onSetup:function(t){function r(){t.setActive(n.get())}return t.setActive(n.get()),e.on(S,r),function(){e.off(S,r)}},onAction:u})},T=!0,E=function(e,t,n,r,i,a){e.ui.registry.addContextMenu("spellchecker",{update:function(u){if("mce-spellchecker-word"!==u.className)return[];var c,s,l,f,d,m,g,h,p,v=y.findSpansByIndex(e,y.getElmIndex(u));return 0<v.length?((l=e.dom.createRng()).setStartBefore(v[0]),l.setEndAfter(v[v.length-1]),e.selection.setRng(l),c=e,s=t,l=n,f=r,d=i,m=a,g=u.getAttribute("data-mce-word"),h=v,p=[],u=l.get().suggestions[g],o.each(u,(function(e){p.push({text:e,onAction:function(){c.insertContent(c.dom.encode(e)),c.dom.remove(h),y.checkIfFinished(c,f,d)}})})),l.get().hasDictionarySupport&&(p.push({type:"separator"}),p.push({text:"Add to dictionary",onAction:function(){y.addToDictionary(c,s,f,d,m,g,h)}})),p.push.apply(p,[{type:"separator"},{text:"Ignore",onAction:function(){y.ignoreWord(c,f,d,g,h)}},{text:"Ignore all",onAction:function(){y.ignoreWord(c,f,d,g,h,T)}}]),p):void 0}})};n.add("spellchecker",(function(e,n){var o,i,a,u;if(!1===r(e))return o=t(!1),i=t(c.getLanguage(e)),a=t(null),u=t(null),k(e,n,o,a,i,u),E(e,n,u,o,a,i),x(e,n,o,a,u,i),w(e,o,u,a,i,n)}))}(window)},e8b0:function(e,t){!function(){"use strict";function e(){}function t(e){return function(){return e}}function n(e){return e}function r(){return M}var o=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=t(!1),a=t(!0),u=function(){return(u=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)},c="[-'\\.‘’․﹒'.]",s="[:··״‧︓﹕:]",l="[±+*/,;;։،؍٬߸⁄︐︔﹐﹔,;]",f="[0-9٠-٩٫۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹]",d="\\r",m="\\n",g="[\v\f
\u2028\u2029]",h="[̀-ͯ҃-҉֑-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ऀ-ःऺ-़ा-ॏ॑-ॗॢॣঁ-ঃ়া-ৄেৈো-্ৗৢৣਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑੰੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣஂா-ூெ-ைொ-்ௗఁ-ఃా-ౄె-ైొ-్ౕౖౢౣಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣംഃാ-ൄെ-ൈൊ-്ൗൢൣංඃ්ා-ුූෘ-ෟෲෳัิ-ฺ็-๎ັິ-ູົຼ່-ໍ༹༘༙༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏႚ-ႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳា-៓៝᠋-᠍ᢩᤠ-ᤫᤰ-᤻ᦰ-ᧀᧈᧉᨗ-ᨛᩕ-ᩞ᩠-᩿᩼ᬀ-ᬄ᬴-᭄᭫-᭳ᮀ-ᮂᮡ-᯦᮪-᯳ᰤ-᰷᳐-᳔᳒-᳨᳭ᳲ᷀-ᷦ᷼-᷿⃐-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꙯-꙲꙼꙽꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣠-꣱ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀ꨩ-ꨶꩃꩌꩍꩻꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꯣ-ꯪ꯬꯭ﬞ︀-️︠-゙゚︦]",p="[-឴឵---\ufeff-]",v="[〱-〵゛゜゠-ヺー-ヿㇰ-ㇿ㋐-㋾㌀-㍗ヲ-ン]",b="[=_‿⁀⁔︳︴﹍-﹏_∀-⋿<>]",y="[!-#%-*,-\\/:;?@\\[-\\]_{}¡«·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؞؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰෴๏๚๛༄-༒༺-༽྅࿐-࿔࿙࿚၊-၏჻፡-፨᐀᙭᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾᱿᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰⸱、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!-#%-*,-/:;?@[-]_{}⦅-・]",w=0,x=1,C=2,S=3,k=4,T=5,E=6,O=7,N=8,A=9,D=10,_=11,R=12,B=13,M=(c=[new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-׳ؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆༀཀ-ཇཉ-ཬྈ-ྌႠ-Ⴥა-ჺჼᄀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᯀ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⒶ-ⓩⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⴀ-ⴥⴰ-ⵥⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〻〼ㄅ-ㄭㄱ-ㆎㆠ-ㆺꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐꞑꞠ-ꞩꟺ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),new RegExp(c),new RegExp(s),new RegExp(l),new RegExp(f),new RegExp(d),new RegExp(m),new RegExp(g),new RegExp(h),new RegExp(p),new RegExp(v),new RegExp(b),new RegExp("@")],s=new RegExp("^"+y+"$"),l={fold:function(e,t){return e()},is:i,isSome:i,isNone:a,getOr:I,getOrThunk:z,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:t(null),getOrUndefined:t(void 0),or:I,orThunk:z,map:r,each:e,bind:r,exists:i,forall:a,filter:r,equals:P,equals_:P,toArray:function(){return[]},toString:t("none()")},Object.freeze&&Object.freeze(l),l);function P(e){return e.isNone()}function z(e){return e()}function I(e){return e}function L(e,t){for(var n,r=t.getBlockElements(),o=t.getShortEndedElements(),i=[],a="",u=new ee(e,e);e=u.next();)3===e.nodeType?a+=e.data:(r[(n=e).nodeName]||o[n.nodeName])&&a.length&&(i.push(a),a="");return a.length&&i.push(a),i}function F(e){return e.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length}H="function";f=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)===H};var H,V,U=(Array.prototype.slice,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}),j=(f(Array.from)&&Array.from,c),W=B,q=function(e){for(var t=W,n=j.length,r=0;r<n;++r){var o=j[r];if(o&&o.test(e)){t=r;break}}return t},$=function(e){var t={};return function(n){var r;return t[n]||(r=e(n),t[n]=r)}},G=function(e,t){var n,r=e[t],o=e[t+1];return!(t<0||t>e.length-1&&0!==t)&&(r!==w||o!==w)&&(n=e[t+2],(r!==w||o!==C&&o!==x&&o!==R||n!==w)&&(e=e[t-1],(r!==C&&r!==x&&o!==R||o!==w||e!==w)&&(r!==k&&r!==w||o!==k&&o!==w)&&(r!==S&&r!==x||o!==k||e!==k)&&(r!==k||o!==S&&o!==x||n!==k)&&r!==N&&r!==A&&e!==N&&e!==A&&o!==N&&o!==A&&(r!==T||o!==E)&&(r===O||r===T||r===E||o===O||o===T||o===E||(r!==D||o!==D)&&(o!==_||r!==w&&r!==k&&r!==D&&r!==_)&&(r!==_||o!==w&&o!==k&&o!==D)&&r!==R)))},X="",Y=/^\s+$/,K=s,J=function(e){return"http"===e||"https"===e},Z=function(e,t){var n=function(e,t){for(var n=t;n<e.length&&!Y.test(e[n]);n++);return n}(e,t+1);return"://"===e.slice(t+1,n).join(X).substr(0,3)?n:t},Q=function(e,t,n){n=u(u({},{includeWhitespace:!1,includePunctuation:!1}),n);for(var r=[],o=[],i=0;i<e.length;i++){var a=t(e[i]);"\ufeff"!==a&&(r.push(e[i]),o.push(a))}f=o,c=$(q);for(var c,s,l,f=U(f,c),d=r,m=o,g=f,h=n,p=[],v=[],b=0;b<g.length;++b)v.push(d[b]),G(g,b)&&(l=m[b],!h.includeWhitespace&&Y.test(l)||!h.includePunctuation&&K.test(l)||(l=b-v.length+1,s=m.slice(l,l=b+1).join(X),J(s)&&(s=Z(m,b),l=d.slice(l,s),Array.prototype.push.apply(v,l),b=s),p.push(v)),v=[]);return p},ee=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),te=function(e,t){return e=L(e,t).join("\n"),Q(e.split(""),n).length},ne=function(e,t){return e=L(e,t).join(""),F(e)},re=function(e,t){return e=L(e,t).join("").replace(/\s/g,""),F(e)},oe=function(e,t){return function(){return t(e.getBody(),e.schema)}},ie=function(e,t){return function(){return t(e.selection.getRng().cloneContents(),e.schema)}},ae=function(e){return oe(e,te)},ue=tinymce.util.Tools.resolve("tinymce.util.Delay"),ce=function(e,t){t=t,e.fire("wordCountUpdate",{wordCount:{words:t.body.getWordCount(),characters:t.body.getCharacterCount(),charactersWithoutSpaces:t.body.getCharacterCountWithoutSpaces()}})},se=function(e,t){e.windowManager.open({title:"Word Count",body:{type:"panel",items:[{type:"table",header:["Count","Document","Selection"],cells:[["Words",String(t.body.getWordCount()),String(t.selection.getWordCount())],["Characters (no spaces)",String(t.body.getCharacterCountWithoutSpaces()),String(t.selection.getCharacterCountWithoutSpaces())],["Characters",String(t.body.getCharacterCount()),String(t.selection.getCharacterCount())]]}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}]})};void 0===V&&(V=300),o.add("wordcount",(function(e){var t,n,r,o,i,a={body:{getWordCount:ae(a=e),getCharacterCount:oe(a,ne),getCharacterCountWithoutSpaces:oe(a,re)},selection:{getWordCount:ie(a,te),getCharacterCount:ie(a,ne),getCharacterCountWithoutSpaces:ie(a,re)},getCount:ae(a)};return n=a,(t=e).ui.registry.addButton("wordcount",{tooltip:"Word count",icon:"character-count",onAction:function(){return se(t,n)}}),t.ui.registry.addMenuItem("wordcount",{text:"Word count",icon:"character-count",onAction:function(){return se(t,n)}}),r=e,o=a,e=V,i=ue.debounce((function(){return ce(r,o)}),e),r.on("init",(function(){ce(r,o),ue.setEditorTimeout(r,(function(){r.on("SetContent BeforeAddUndo Undo Redo keyup",i)}),0)})),a}))}()},ebac:function(e,t,n){n("080b")},eda9:function(e,t,n){n("c361")},ef1f:function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e,t){e.focus(),e.undoManager.transact((function(){e.setContent(t)})),e.selection.setCursorLocation(),e.nodeChanged()},n=function(e){return e.getContent({source_view:!0})},r=function(e){var r=n(e);e.windowManager.open({title:"Source Code",size:"large",body:{type:"panel",items:[{type:"textarea",name:"code"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{code:r},onSubmit:function(n){t(e,n.getData().code),n.close()}})},o=function(e){e.addCommand("mceCodeEditor",(function(){r(e)}))},i=function(e){e.ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:function(){return r(e)}}),e.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:function(){return r(e)}})};e.add("code",(function(e){return o(e),i(e),{}}))}()},f034:function(e,t){!function(e){"use strict";function t(e){function n(){return r}var r=e;return{get:n,set:function(e){r=e},clone:function(){return t(r)}}}function n(){}function r(){return s}var o=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(e){return{isFullscreen:function(){return null!==e.get()}}},a=function(e){return function(){return e}},u=a(!1),c=a(!0),s=(Q={fold:function(e,t){return e()},is:u,isSome:u,isNone:c,getOr:d,getOrThunk:f,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:a(null),getOrUndefined:a(void 0),or:d,orThunk:f,map:r,each:n,bind:r,exists:u,forall:c,filter:r,equals:l,equals_:l,toArray:function(){return[]},toString:a("none()")},Object.freeze&&Object.freeze(Q),Q);function l(e){return e.isNone()}function f(e){return e()}function d(e){return e}function m(e){function t(){return o}function n(t){return t(e)}var r=a(e),o={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:c,isNone:u,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:t,orThunk:t,map:function(t){return m(t(e))},each:function(t){t(e)},bind:n,exists:n,forall:n,filter:function(t){return t(e)?o:s},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(u,(function(t){return n(e,t)}))}};return o}function g(e){return function(t){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}(t)===e}}function h(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}function p(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 v(e,t){return-1!==e.indexOf(t)}function b(e){if(null==e)throw new Error("Node cannot be null or undefined");return{dom:a(e)}}function y(e,t,n){re(e.dom(),t,n)}function w(e,t){return null===(e=e.dom().getAttribute(t))?void 0:e}function x(e,t){e.dom().removeAttribute(t)}function C(e,t){var n=ae(e,t);return n?ue(r(1),r(2)):{major:0,minor:0};function r(e){return Number(t.replace(n,"$"+e))}}function S(){return ue(0,0)}function k(e){var t=e.current;return{current:t,version:e.version,isEdge:pe(le,t),isChrome:pe(fe,t),isIE:pe(de,t),isOpera:pe(me,t),isFirefox:pe(ge,t),isSafari:pe(he,t)}}function T(e){var t=e.current;return{current:t,version:e.version,isWindows:Ee(ye,t),isiOS:Ee(we,t),isAndroid:Ee(xe,t),isOSX:Ee(Se,t),isLinux:Ee(Ce,t),isSolaris:Ee(ke,t),isFreeBSD:Ee(Te,t)}}function E(e,t){var n=String(t).toLowerCase();return G(e,(function(e){return e.search(n)}))}function O(e){return function(t){return v(t,e)}}function N(){return Be.get()}function A(e){return F(e.dom().parentNode).map(Z.fromDom).map(D).map((function(t){return p(t,(function(t){return t=t,e.dom()!==t.dom()}))})).getOr([])}function D(e){return $(e.dom().childNodes,Z.fromDom)}function _(e,t){return{left:a(e),top:a(t),translate:function(n,r){return _(e+n,t+r)}}}function R(e,t,n,r){return{x:a(e),y:a(t),width:a(n),height:a(r),right:a(e+n),bottom:a(t+r)}}var B,M,P,z,I=m,L=r,F=function(e){return null==e?s:m(e)},H=g("string"),V=g("array"),U=g("boolean"),j=g("function"),W=g("number"),q=(Array.prototype.slice,Array.prototype.push),$=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},G=function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n))return I(o)}return L()},X=function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!V(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);q.apply(t,e[n])}return t},Y=(j(Array.from)&&Array.from,Object.keys),K=function(e,t){for(var n=Y(e),r=0,o=n.length;r<o;r++){var i=n[r];t(e[i],i)}},J=function(e){return void 0!==e.style&&j(e.style.getPropertyValue)},Z={fromHtml:function(t,n){if(n=(n||e.document).createElement("div"),n.innerHTML=t,!n.hasChildNodes()||1<n.childNodes.length)throw e.console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return b(n.childNodes[0])},fromTag:function(t,n){return n=(n||e.document).createElement(t),b(n)},fromText:function(t,n){return n=(n||e.document).createTextNode(t),b(n)},fromDom:b,fromPoint:function(e,t,n){return e=e.dom(),F(e.elementFromPoint(t,n)).map(b)}},Q=(e.Node.ATTRIBUTE_NODE,e.Node.CDATA_SECTION_NODE,e.Node.COMMENT_NODE,e.Node.DOCUMENT_NODE),ee=(e.Node.DOCUMENT_TYPE_NODE,e.Node.DOCUMENT_FRAGMENT_NODE,e.Node.ELEMENT_NODE),te=e.Node.TEXT_NODE,ne=(e.Node.PROCESSING_INSTRUCTION_NODE,e.Node.ENTITY_REFERENCE_NODE,e.Node.ENTITY_NODE,e.Node.NOTATION_NODE,void 0!==e.window?e.window:Function("return this;")(),B=te,function(e){return e.dom().nodeType===B}),re=function(t,n,r){if(!(H(r)||U(r)||W(r)))throw e.console.error("Invalid call to Attr.set. Key ",n,":: Value ",r,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(n,r+"")},oe=function(t,n,r){if(!H(r))throw e.console.error("Invalid call to CSS.set. Property ",n,":: Value ",r,":: Element ",t),new Error("CSS value must be a string: "+r);J(t)&&t.style.setProperty(n,r)},ie=function(t,n){var r=t.dom(),o=e.window.getComputedStyle(r).getPropertyValue(n);n=""!==o||function(e){return e=ne(e)?e.dom().parentNode:e.dom(),null!=e&&e.ownerDocument.body.contains(e)}(t)?o:(t=n,J(o=r)?o.style.getPropertyValue(t):"");return null===n?void 0:n},ae=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}},ue=function(e,t){return{major:e,minor:t}},ce=function(e,t){return t=String(t).toLowerCase(),0===e.length?S():C(e,t)},se=S,le="Edge",fe="Chrome",de="IE",me="Opera",ge="Firefox",he="Safari",pe=function(e,t){return function(){return t===e}},ve=function(){return k({current:void 0,version:se()})},be=k,ye=(a(le),a(fe),a(de),a(me),a(ge),a(he),"Windows"),we="iOS",xe="Android",Ce="Linux",Se="OSX",ke="Solaris",Te="FreeBSD",Ee=function(e,t){return function(){return t===e}},Oe=function(){return T({current:void 0,version:se()})},Ne=T,Ae=(a(ye),a(we),a(xe),a(Ce),a(Se),a(ke),a(Te),function(e,t){return E(e,t).map((function(e){var n=ce(e.versionRegexes,t);return{current:e.name,version:n}}))}),De=function(e,t){return E(e,t).map((function(e){var n=ce(e.versionRegexes,t);return{current:e.name,version:n}}))},_e=(te=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,te=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return v(e,"edge/")&&v(e,"chrome")&&v(e,"safari")&&v(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,te],search:function(e){return v(e,"chrome")&&!v(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return v(e,"msie")||v(e,"trident")}},{name:"Opera",versionRegexes:[te,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:O("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:O("firefox")},{name:"Safari",versionRegexes:[te,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(v(e,"safari")||v(e,"mobile/"))&&v(e,"applewebkit")}}],[{name:"Windows",search:O("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return v(e,"iphone")||v(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:O("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:O("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:O("linux"),versionRegexes:[]},{name:"Solaris",search:O("sunos"),versionRegexes:[]},{name:"FreeBSD",search:O("freebsd"),versionRegexes:[]}]),Re={browsers:a(te),oses:a(_e)},Be=t(function(e,t){var n,r,o,i,u,c=Re.browsers(),s=Re.oses(),l=(c=Ae(c,e).fold(ve,be),s=De(s,e).fold(Oe,Ne),r=c,e=e,t=t,l=(n=s).isiOS()&&!0===/ipad/i.test(e),o=n.isiOS()&&!l,i=n.isiOS()||n.isAndroid(),u=i||t("(pointer:coarse)"),t=l||!o&&i&&t("(min-device-width:768px)"),i=o||i&&!t,r=r.isSafari()&&n.isiOS()&&!1===/safari/i.test(e),e=!i&&!t&&!r,{isiPad:a(l),isiPhone:a(o),isTablet:a(t),isPhone:a(i),isTouch:a(u),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:a(r),isDesktop:a(e)});return{browser:c,os:s,deviceType:l}}(e.navigator.userAgent,(function(t){return e.window.matchMedia(t).matches}))),Me=ee,Pe=Q,ze=function(e,t){if(e=e.dom(),e.nodeType!==Me)return!1;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},Ie=function(t,n){var r;n=void 0===n?e.document:n.dom();return(r=n).nodeType!==Me&&r.nodeType!==Pe||0===r.childElementCount?[]:$(n.querySelectorAll(t),Z.fromDom)},Le=(N().browser.isIE(),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}("element","offset"),_),Fe=(N().browser.isSafari(),function(t){t=void 0===t?e.window:t;var n,r=t.visualViewport;return void 0!==r?R(r.pageLeft,r.pageTop,r.width,r.height):(r=Z.fromDom(t.document),t=t.document.documentElement,r=void 0!==(r=r)?r.dom():e.document,n=r.body.scrollLeft||r.documentElement.scrollLeft,r=r.body.scrollTop||r.documentElement.scrollTop,n=Le(n,r),r=t.clientWidth,t=t.clientHeight,R(n.left(),n.top(),r,t))}),He=function(e,t){e.fire("FullscreenStateChanged",{state:t})},Ve=(te=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),tinymce.util.Tools.resolve("tinymce.Env")),Ue=(_e=tinymce.util.Tools.resolve("tinymce.util.Delay"),function(e,t,n){return p(function(e,t){for(var n=j(t)?t:u,r=e.dom(),o=[];null!==r.parentNode&&void 0!==r.parentNode;){var i=r.parentNode,a=Z.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o}(e,n),t)}),je=function(e,t){return p(A(e),t)},We="data-ephox-mobile-fullscreen-style",qe="position:absolute!important;",$e="top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;",Ge="background-color:rgb(255,255,255)!important;",Xe=Ve.os.isAndroid(),Ye=function(e,t){function n(e){return function(t){var n=w(t,"style");n=void 0===n?"no-styles":n.trim();n!==e&&(y(t,We,n),y(t,"style",e))}}r="*";var r,o=Ue(e,(function(e){return ze(e,r)}),o),i=function(e,t){return e=$(e,t),X(e)}(o,(function(e){var t;return t="*:not(.tox-silver-sink)",je(e,(function(e){return ze(e,t)}))}));t=function(e){return e=ie(e,"background-color"),void 0!==e&&""!==e?"background-color:"+e+"!important":Ge}(t);h(i,n("display:none!important;")),h(o,n(qe+$e+t)),n((!0===Xe?"":qe)+$e+t)(e)},Ke=function(){var e=Ie("["+We+"]");h(e,(function(e){var t=w(e,We);"no-styles"!==t?y(e,"style",t):x(e,"style"),x(e,We)}))},Je=te.DOM,Ze=e.window.visualViewport,Qe=Ve.browser.isSafari()&&void 0!==Ze?(M=t(L()),P={clear:function(){M.set(L())},set:function(e){M.set(I(e))},isSet:function(){return M.get().isSome()},on:function(e){M.get().each(e)}},z=_e.throttle((function(){e.document.body.scrollTop=0,e.document.documentElement.scrollTop=0,et()}),50),{bind:function(e){P.set(e),z(),Ze.addEventListener("resize",z),Ze.addEventListener("scroll",z)},unbind:function(){P.on((function(){Ze.removeEventListener("scroll",z),Ze.removeEventListener("resize",z)})),P.clear()}}):{bind:n,unbind:n,update:n};function et(){e.window.requestAnimationFrame((function(){P.on((function(e){var t,n;t={top:Ze.offsetTop+"px",left:Ze.offsetLeft+"px",height:Ze.height+"px",width:Ze.width+"px"},n=e.dom(),K(t,(function(e,t){oe(n,t,e)}))}))}))}function tt(e,t){return function(n){function r(e){return n.setActive(e.state)}return n.setActive(null!==t.get()),e.on("FullscreenStateChanged",r),function(){return e.off("FullscreenStateChanged",r)}}}var nt=function(t,n){var r=e.document.body,o=e.document.documentElement,i=t.getContainer(),a=Z.fromDom(i),u=n.get(),c=Z.fromDom(t.getBody()),s=Ve.deviceType.isTouch(),l=i.style,f=t.getContentAreaContainer().firstChild.style;u?(f.width=u.iframeWidth,f.height=u.iframeHeight,l.width=u.containerWidth,l.height=u.containerHeight,l.top=u.containerTop,l.left=u.containerLeft,s&&Ke(),Je.removeClass(r,"tox-fullscreen"),Je.removeClass(o,"tox-fullscreen"),Je.removeClass(i,"tox-fullscreen"),u=u.scrollPos,e.window.scrollTo(u.x,u.y),n.set(null),He(t,!1),Qe.unbind(),t.off("remove",Qe.unbind)):(u={scrollPos:{x:(u=Fe(e.window)).x(),y:u.y()},containerWidth:l.width,containerHeight:l.height,containerTop:l.top,containerLeft:l.left,iframeWidth:f.width,iframeHeight:f.height},s&&Ye(a,c),f.width=f.height="100%",l.width=l.height="",Je.addClass(r,"tox-fullscreen"),Je.addClass(o,"tox-fullscreen"),Je.addClass(i,"tox-fullscreen"),Qe.bind(a),t.on("remove",Qe.unbind),n.set(u),He(t,!0))},rt=function(e,t){e.addCommand("mceFullScreen",(function(){nt(e,t)}))},ot=function(e,t){e.ui.registry.addToggleMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Meta+Shift+F",onAction:function(){return e.execCommand("mceFullScreen")},onSetup:tt(e,t)}),e.ui.registry.addToggleButton("fullscreen",{tooltip:"Fullscreen",icon:"fullscreen",onAction:function(){return e.execCommand("mceFullScreen")},onSetup:tt(e,t)})};o.add("fullscreen",(function(e){var n=t(null);return e.settings.inline||(rt(e,n),ot(e,n),e.addShortcut("Meta+Shift+F","","mceFullScreen")),i(n)}))}(window)},f557:function(e,t,n){n("5e4c")},f962:function(e,t){!function(e){"use strict";function t(e){e.keyCode!==c.TAB||e.ctrlKey||e.altKey||e.metaKey||e.preventDefault()}var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),o=tinymce.util.Tools.resolve("tinymce.EditorManager"),i=tinymce.util.Tools.resolve("tinymce.Env"),a=tinymce.util.Tools.resolve("tinymce.util.Delay"),u=tinymce.util.Tools.resolve("tinymce.util.Tools"),c=tinymce.util.Tools.resolve("tinymce.util.VK"),s=function(e){return e.getParam("tab_focus",e.getParam("tabfocus_elements",":prev,:next"))},l=r.DOM,f=function(n){function r(t){var r,f,d,m;function g(e){function i(e){return/INPUT|TEXTAREA|BUTTON/.test(e.tagName)&&o.get(t.id)&&-1!==e.tabIndex&&function e(t){return"BODY"===t.nodeName||"hidden"!==t.type&&"none"!==t.style.display&&"hidden"!==t.style.visibility&&e(t.parentNode)}(e)}if(f=l.select(":input:enabled,*[tabindex]:not(iframe)"),u.each(f,(function(e,t){if(e.id===n.id)return r=t,!1})),0<e){for(d=r+1;d<f.length;d++)if(i(f[d]))return f[d]}else for(d=r-1;0<=d;d--)if(i(f[d]))return f[d];return null}t.keyCode!==c.TAB||t.ctrlKey||t.altKey||t.metaKey||t.isDefaultPrevented()||(1===(m=u.explode(s(n))).length&&(m[1]=m[0],m[0]=":prev"),(f=t.shiftKey?":prev"===m[0]?g(-1):l.get(m[0]):":next"===m[1]?g(1):l.get(m[1]))&&(m=o.get(f.id||f.name),f.id&&m?m.focus():a.setTimeout((function(){i.webkit||e.window.focus(),f.focus()}),10),t.preventDefault()))}n.on("init",(function(){n.inline&&l.setAttrib(n.getBody(),"tabIndex",null),n.on("keyup",t),i.gecko?n.on("keypress keydown",r):n.on("keydown",r)}))};n.add("tabfocus",(function(e){f(e)}))}(window)},ffbe:function(e,t,n){n("8ce1")}}]);
|