UNPKG

tinymce

Version:

Web based JavaScript HTML WYSIWYG editor control.

9 lines 440 kB
/** * Copyright (c) Tiny Technologies, Inc. All rights reserved. * Licensed under the LGPL or a commercial license. * For LGPL see License.txt in the project root for license information. * For commercial licenses see https://www.tiny.cloud/ * * Version: 5.1.0 (2019-10-17) */ !function(j){"use strict";function i(){}var q=function(n,r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n(r.apply(null,e))}},$=function(e){return function(){return e}},W=function(e){return e};function d(r){for(var o=[],e=1;e<arguments.length;e++)o[e-1]=arguments[e];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=o.concat(e);return r.apply(null,n)}}function s(n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return!n.apply(null,e)}}function e(){return u}var t,c=$(!1),a=$(!0),u=(t={fold:function(e,t){return e()},is:c,isSome:c,isNone:a,getOr:o,getOrThunk:r,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:$(null),getOrUndefined:$(undefined),or:o,orThunk:r,map:e,each:i,bind:e,exists:c,forall:a,filter:e,equals:n,equals_:n,toArray:function(){return[]},toString:$("none()")},Object.freeze&&Object.freeze(t),t);function n(e){return e.isNone()}function r(e){return e()}function o(e){return e}function l(t){return function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"==t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t}(e)===t}}function f(e,t){return O.call(e,t)}function h(e,t){return-1<f(e,t)}function C(e,t){for(var n=0,r=e.length;n<r;n++){if(t(e[n],n))return!0}return!1}function z(e,t){for(var n=0,r=e.length;n<r;n++){t(e[n],n)}}function y(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r)&&n.push(i)}return n}function m(e,t,n){return function(e,t){for(var n=e.length-1;0<=n;n--){t(e[n],n)}}(e,function(e){n=t(n,e)}),n}function b(e,t,n){return z(e,function(e){n=t(n,e)}),n}function g(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n))return k.some(o)}return k.none()}function p(e,t){for(var n=0,r=e.length;n<r;n++){if(t(e[n],n))return k.some(n)}return k.none()}function v(e,t){return function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!A(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);H.apply(t,e[n])}return t}(X(e,t))}function w(e,t){for(var n=0,r=e.length;n<r;++n){if(!0!==t(e[n],n))return!1}return!0}function x(e,t){return y(e,function(e){return!h(t,e)})}function E(e){return 0===e.length?k.none():k.some(e[0])}function N(e){return 0===e.length?k.none():k.some(e[e.length-1])}var S=function(n){function e(){return o}function t(e){return e(n)}var r=$(n),o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:a,isNone:c,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:e,orThunk:e,map:function(e){return S(e(n))},each:function(e){e(n)},bind:t,exists:t,forall:t,filter:function(e){return e(n)?o:u},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(c,function(e){return t(n,e)})}};return o},k={some:S,none:e,from:function(e){return null===e||e===undefined?u:S(e)}},K=l("string"),T=l("object"),A=l("array"),M=l("null"),R=l("boolean"),D=l("function"),_=l("number"),B=Array.prototype.slice,O=Array.prototype.indexOf,H=Array.prototype.push,X=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o)}return r},Y=function(e,t){for(var n=[],r=[],o=0,i=e.length;o<i;o++){var a=e[o];(t(a,o)?n:r).push(a)}return{pass:n,fail:r}},P=D(Array.from)?Array.from:function(e){return B.call(e)},G=function(){return(G=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function L(t){return function(e){return!!e&&e.nodeType===t}}function V(e){var n=e.map(function(e){return e.toLowerCase()});return function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();return h(n,t)}return!1}}function I(t){return function(e){if(Fe(e)){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}return!1}}function F(e,t){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}return undefined}(e,t);if(!n)return{major:0,minor:0};function r(e){return Number(t.replace(n,"$"+e))}return Ze(r(1),r(2))}function U(e,t){return function(){return t===e}}function J(e,t){return function(){return t===e}}function Q(e,t){var n=String(t).toLowerCase();return g(e,function(e){return e.search(n)})}function Z(e,t){return-1!==e.indexOf(t)}function ee(e,t){return function(e,t,n){return""===t||!(e.length<t.length)&&e.substr(n,n+t.length)===t}(e,t,0)}function te(e){return e.replace(/^\s+|\s+$/g,"")}function ne(e){return e.replace(/\s+$/g,"")}function re(t){return function(e){return Z(e,t)}}function oe(){return pt.get()}function ie(e){return e.dom().nodeName.toLowerCase()}function ae(t){return function(e){return function(e){return e.dom().nodeType}(e)===t}}function ue(e,t){for(var n=Et(e),r=0,o=n.length;r<o;r++){var i=n[r];t(e[i],i)}}function se(e,n){return St(e,function(e,t){return{k:t,v:n(e,t)}})}function ce(e,n){var r={},o={};return ue(e,function(e,t){(n(e,t)?r:o)[t]=e}),{t:r,f:o}}function le(e,t){return kt(e,t)?k.from(e[t]):k.none()}function fe(e){return e.style!==undefined&&D(e.style.getPropertyValue)}function de(e){var t=zt(e)?e.dom().parentNode:e.dom();return t!==undefined&&null!==t&&t.ownerDocument.body.contains(t)}function he(e,t,n){if(!(K(n)||R(n)||_(n)))throw j.console.error("Invalid call to Attr.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")}function me(e,t){var n=e.dom();ue(t,function(e,t){he(n,t,e)})}function ge(e,t){var n=e.dom().getAttribute(t);return null===n?undefined:n}function pe(e,t){e.dom().removeAttribute(t)}function ve(e,t){var n=e.dom(),r=j.window.getComputedStyle(n).getPropertyValue(t),o=""!==r||de(e)?r:At(n,t);return null===o?undefined:o}function ye(e,t){var n=e.dom(),r=At(n,t);return k.from(r).filter(function(e){return 0<e.length})}function be(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];if(t.length!==n.length)throw new Error('Wrong number of arguments to struct. Expected "['+t.length+']", got '+n.length+" arguments");var r={};return z(t,function(e,t){r[e]=$(n[t])}),r}}function Ce(e,t,n){return 0!=(e.compareDocumentPosition(t)&n)}function we(e,t){var n=e.dom();if(n.nodeType!==Dt)return!1;var r=n;if(r.matches!==undefined)return r.matches(t);if(r.msMatchesSelector!==undefined)return r.msMatchesSelector(t);if(r.webkitMatchesSelector!==undefined)return r.webkitMatchesSelector(t);if(r.mozMatchesSelector!==undefined)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}function xe(e){return e.nodeType!==Dt&&e.nodeType!==_t||0===e.childElementCount}function ze(e,t){return e.dom()===t.dom()}function Ee(e){return yt.fromDom(e.dom().ownerDocument)}function Ne(e){return yt.fromDom(e.dom().ownerDocument.defaultView)}function Se(e){return k.from(e.dom().parentNode).map(yt.fromDom)}function ke(e){return k.from(e.dom().previousSibling).map(yt.fromDom)}function Te(e){return k.from(e.dom().nextSibling).map(yt.fromDom)}function Ae(e){return function(e){var t=B.call(e,0);return t.reverse(),t}(Mt(e,ke))}function Me(e){return Mt(e,Te)}function Re(e){return X(e.dom().childNodes,yt.fromDom)}function De(e,t){var n=e.dom().childNodes;return k.from(n[t]).map(yt.fromDom)}function _e(e){return De(e,0)}function Be(e){return De(e,e.dom().childNodes.length-1)}function Oe(e){return g(e,xt)}function He(e,t){return e.children&&h(e.children,t)}var Pe,Le,Ve,Ie,Fe=L(1),Ue=V(["textarea","input"]),je=L(3),qe=L(8),$e=L(9),We=L(11),Ke=V(["br"]),Xe=I("true"),Ye=I("false"),Ge={isText:je,isElement:Fe,isComment:qe,isDocument:$e,isDocumentFragment:We,isBr:Ke,isContentEditableTrue:Xe,isContentEditableFalse:Ye,isRestrictedNode:function(e){return!!e&&!Object.getPrototypeOf(e)},matchNodeNames:V,hasPropValue:function(t,n){return function(e){return Fe(e)&&e[t]===n}},hasAttribute:function(t,e){return function(e){return Fe(e)&&e.hasAttribute(t)}},hasAttributeValue:function(t,n){return function(e){return Fe(e)&&e.getAttribute(t)===n}},matchStyleValues:function(r,e){var o=e.toLowerCase().split(" ");return function(e){var t;if(Fe(e))for(t=0;t<o.length;t++){var n=e.ownerDocument.defaultView.getComputedStyle(e,null);if((n?n.getPropertyValue(r):null)===o[t])return!0}return!1}},isBogus:function(e){return Fe(e)&&e.hasAttribute("data-mce-bogus")},isBogusAll:function(e){return Fe(e)&&"all"===e.getAttribute("data-mce-bogus")},isTable:function(e){return Fe(e)&&"TABLE"===e.tagName},isTextareaOrInput:Ue},Je=function(e){function t(){return n}var n=e;return{get:t,set:function(e){n=e},clone:function(){return Je(t())}}},Qe=function(){return Ze(0,0)},Ze=function(e,t){return{major:e,minor:t}},et={nu:Ze,detect:function(e,t){var n=String(t).toLowerCase();return 0===e.length?Qe():F(e,n)},unknown:Qe},tt="Firefox",nt=function(e){var t=e.current;return{current:t,version:e.version,isEdge:U("Edge",t),isChrome:U("Chrome",t),isIE:U("IE",t),isOpera:U("Opera",t),isFirefox:U(tt,t),isSafari:U("Safari",t)}},rt={unknown:function(){return nt({current:undefined,version:et.unknown()})},nu:nt,edge:$("Edge"),chrome:$("Chrome"),ie:$("IE"),opera:$("Opera"),firefox:$(tt),safari:$("Safari")},ot="Windows",it="Android",at="Solaris",ut="FreeBSD",st=function(e){var t=e.current;return{current:t,version:e.version,isWindows:J(ot,t),isiOS:J("iOS",t),isAndroid:J(it,t),isOSX:J("OSX",t),isLinux:J("Linux",t),isSolaris:J(at,t),isFreeBSD:J(ut,t)}},ct={unknown:function(){return st({current:undefined,version:et.unknown()})},nu:st,windows:$(ot),ios:$("iOS"),android:$(it),linux:$("Linux"),osx:$("OSX"),solaris:$(at),freebsd:$(ut)},lt=function(e,n){return Q(e,n).map(function(e){var t=et.detect(e.versionRegexes,n);return{current:e.name,version:t}})},ft=function(e,n){return Q(e,n).map(function(e){var t=et.detect(e.versionRegexes,n);return{current:e.name,version:t}})},dt=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,ht=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return Z(e,"edge/")&&Z(e,"chrome")&&Z(e,"safari")&&Z(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,dt],search:function(e){return Z(e,"chrome")&&!Z(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return Z(e,"msie")||Z(e,"trident")}},{name:"Opera",versionRegexes:[dt,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:re("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:re("firefox")},{name:"Safari",versionRegexes:[dt,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(Z(e,"safari")||Z(e,"mobile/"))&&Z(e,"applewebkit")}}],mt=[{name:"Windows",search:re("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return Z(e,"iphone")||Z(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:re("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:re("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:re("linux"),versionRegexes:[]},{name:"Solaris",search:re("sunos"),versionRegexes:[]},{name:"FreeBSD",search:re("freebsd"),versionRegexes:[]}],gt={browsers:$(ht),oses:$(mt)},pt=Je(function(e,t){var n=gt.browsers(),r=gt.oses(),o=lt(n,e).fold(rt.unknown,rt.nu),i=ft(r,e).fold(ct.unknown,ct.nu);return{browser:o,os:i,deviceType:function(e,t,n,r){var o=e.isiOS()&&!0===/ipad/i.test(n),i=e.isiOS()&&!o,a=e.isiOS()||e.isAndroid(),u=a||r("(pointer:coarse)"),s=o||!i&&a&&r("(min-device-width:768px)"),c=i||a&&!s,l=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(n),f=!c&&!s&&!l;return{isiPad:$(o),isiPhone:$(i),isTablet:$(s),isPhone:$(c),isTouch:$(u),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:$(l),isDesktop:$(f)}}(i,o,e,t)}}(j.navigator.userAgent,function(e){return j.window.matchMedia(e).matches})),vt=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:$(e)}},yt={fromHtml:function(e,t){var n=(t||j.document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw j.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return vt(n.childNodes[0])},fromTag:function(e,t){var n=(t||j.document).createElement(e);return vt(n)},fromText:function(e,t){var n=(t||j.document).createTextNode(e);return vt(n)},fromDom:vt,fromPoint:function(e,t,n){var r=e.dom();return k.from(r.elementFromPoint(t,n)).map(vt)}},bt=(j.Node.ATTRIBUTE_NODE,j.Node.CDATA_SECTION_NODE,j.Node.COMMENT_NODE,j.Node.DOCUMENT_NODE),Ct=(j.Node.DOCUMENT_TYPE_NODE,j.Node.DOCUMENT_FRAGMENT_NODE,j.Node.ELEMENT_NODE),wt=j.Node.TEXT_NODE,xt=(j.Node.PROCESSING_INSTRUCTION_NODE,j.Node.ENTITY_REFERENCE_NODE,j.Node.ENTITY_NODE,j.Node.NOTATION_NODE,"undefined"!=typeof j.window?j.window:Function("return this;")(),ae(Ct)),zt=ae(wt),Et=Object.keys,Nt=Object.hasOwnProperty,St=function(e,r){var o={};return ue(e,function(e,t){var n=r(e,t);o[n.k]=n.v}),o},kt=function(e,t){return Nt.call(e,t)},Tt=function(e,t,n){he(e.dom(),t,n)},At=function(e,t){return fe(e)?e.style.getPropertyValue(t):""},Mt=function(e,t){for(var n=[],r=function(e){return n.push(e),t(e)},o=t(e);(o=o.bind(r)).isSome(););return n},Rt=function(e,t){return Ce(e,t,j.Node.DOCUMENT_POSITION_CONTAINED_BY)},Dt=Ct,_t=bt,Bt=oe().browser.isIE()?function(e,t){return Rt(e.dom(),t.dom())}:function(e,t){var n=e.dom(),r=t.dom();return n!==r&&n.contains(r)},Ot=(be("element","offset"),oe().browser),Ht={getPos:function(e,t,n){var r,o,i=0,a=0,u=e.ownerDocument;if(n=n||e,t){if(n===e&&t.getBoundingClientRect&&"static"===ve(yt.fromDom(e),"position"))return{x:i=(o=t.getBoundingClientRect()).left+(u.documentElement.scrollLeft||e.scrollLeft)-u.documentElement.clientLeft,y:a=o.top+(u.documentElement.scrollTop||e.scrollTop)-u.documentElement.clientTop};for(r=t;r&&r!==n&&r.nodeType&&!He(r,n);)i+=r.offsetLeft||0,a+=r.offsetTop||0,r=r.offsetParent;for(r=t.parentNode;r&&r!==n&&r.nodeType&&!He(r,n);)i-=r.scrollLeft||0,a-=r.scrollTop||0,r=r.parentNode;a+=function(e){return Ot.isFirefox()&&"table"===ie(e)?Oe(Re(e)).filter(function(e){return"caption"===ie(e)}).bind(function(o){return Oe(Me(o)).map(function(e){var t=e.dom().offsetTop,n=o.dom().offsetTop,r=o.dom().offsetHeight;return t<=n?-r:0})}).getOr(0):0}(yt.fromDom(t))}return{x:i,y:a}}},Pt={},Lt={exports:Pt};Pe=undefined,Le=Pt,Ve=Lt,Ie=undefined,function(e){"object"==typeof Le&&void 0!==Ve?Ve.exports=e():"function"==typeof Pe&&Pe.amd?Pe([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EphoxContactWrapper=e()}(function(){return function l(i,a,u){function s(t,e){if(!a[t]){if(!i[t]){var n="function"==typeof Ie&&Ie;if(!e&&n)return n(t,!0);if(c)return c(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var o=a[t]={exports:{}};i[t][0].call(o.exports,function(e){return s(i[t][1][e]||e)},o,o.exports,l,i,a,u)}return a[t].exports}for(var c="function"==typeof Ie&&Ie,e=0;e<u.length;e++)s(u[e]);return s}({1:[function(e,t,n){var r,o,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{o="function"==typeof clearTimeout?clearTimeout:u}catch(e){o=u}}();var c,l=[],f=!1,d=-1;function h(){f&&c&&(f=!1,c.length?l=c.concat(l):d=-1,l.length&&m())}function m(){if(!f){var e=s(h);f=!0;for(var t=l.length;t;){for(c=l,l=[];++d<t;)c&&c[d].run();d=-1,t=l.length}c=null,f=!1,function n(e){if(o===clearTimeout)return clearTimeout(e);if((o===u||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{return o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new g(e,t)),1!==l.length||f||s(m)},g.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],2:[function(e,f,t){(function(t){function r(){}function i(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],l(e,this)}function o(r,o){for(;3===r._state;)r=r._value;0!==r._state?(r._handled=!0,i._immediateFn(function(){var e=1===r._state?o.onFulfilled:o.onRejected;if(null!==e){var t;try{t=e(r._value)}catch(n){return void u(o.promise,n)}a(o.promise,t)}else(1===r._state?a:u)(o.promise,r._value)})):r._deferreds.push(o)}function a(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof i)return e._state=3,e._value=t,void s(e);if("function"==typeof n)return void l(function r(e,t){return function(){e.apply(t,arguments)}}(n,t),e)}e._state=1,e._value=t,s(e)}catch(o){u(e,o)}}function u(e,t){e._state=2,e._value=t,s(e)}function s(e){2===e._state&&0===e._deferreds.length&&i._immediateFn(function(){e._handled||i._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)o(e,e._deferreds[t]);e._deferreds=null}function c(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function l(e,t){var n=!1;try{e(function(e){n||(n=!0,a(t,e))},function(e){n||(n=!0,u(t,e))})}catch(r){if(n)return;n=!0,u(t,r)}}var e,n;e=this,n=setTimeout,i.prototype["catch"]=function(e){return this.then(null,e)},i.prototype.then=function(e,t){var n=new this.constructor(r);return o(this,new c(e,t,n)),n},i.all=function(e){var s=Array.prototype.slice.call(e);return new i(function(o,i){if(0===s.length)return o([]);var a=s.length;function u(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){u(t,e)},i)}s[t]=e,0==--a&&o(s)}catch(r){i(r)}}for(var e=0;e<s.length;e++)u(e,s[e])})},i.resolve=function(t){return t&&"object"==typeof t&&t.constructor===i?t:new i(function(e){e(t)})},i.reject=function(n){return new i(function(e,t){t(n)})},i.race=function(o){return new i(function(e,t){for(var n=0,r=o.length;n<r;n++)o[n].then(e,t)})},i._immediateFn="function"==typeof t?function(e){t(e)}:function(e){n(e,0)},i._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},i._setImmediateFn=function(e){i._immediateFn=e},i._setUnhandledRejectionFn=function(e){i._unhandledRejectionFn=e},void 0!==f&&f.exports?f.exports=i:e.Promise||(e.Promise=i)}).call(this,e("timers").setImmediate)},{timers:3}],3:[function(s,e,c){(function(e,t){var r=s("process/browser.js").nextTick,n=Function.prototype.apply,o=Array.prototype.slice,i={},a=0;function u(e,t){this._id=e,this._clearFn=t}c.setTimeout=function(){return new u(n.call(setTimeout,window,arguments),clearTimeout)},c.setInterval=function(){return new u(n.call(setInterval,window,arguments),clearInterval)},c.clearTimeout=c.clearInterval=function(e){e.close()},u.prototype.unref=u.prototype.ref=function(){},u.prototype.close=function(){this._clearFn.call(window,this._id)},c.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},c.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},c._unrefActive=c.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},c.setImmediate="function"==typeof e?e:function(e){var t=a++,n=!(arguments.length<2)&&o.call(arguments,1);return i[t]=!0,r(function(){i[t]&&(n?e.apply(null,n):e.call(null),c.clearImmediate(t))}),t},c.clearImmediate="function"==typeof t?t:function(e){delete i[e]}}).call(this,s("timers").setImmediate,s("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(e,t,n){var r=e("promise-polyfill"),o="undefined"!=typeof window?window:Function("return this;")();t.exports={boltExport:o.Promise||r}},{"promise-polyfill":2}]},{},[4])(4)});function Vt(e){j.setTimeout(function(){throw e},0)}function It(i,e){return e(function(n){var r=[],o=0;0===i.length?n([]):z(i,function(e,t){e.get(function(t){return function(e){r[t]=e,++o>=i.length&&n(r)}}(t))})})}var Ft,Ut,jt,qt=Lt.exports.boltExport,$t=function(e){var n=k.none(),t=[],r=function(e){o()?a(e):t.push(e)},o=function(){return n.isSome()},i=function(e){z(e,a)},a=function(t){n.each(function(e){j.setTimeout(function(){t(e)},0)})};return e(function(e){n=k.some(e),i(t),t=[]}),{get:r,map:function(n){return $t(function(t){r(function(e){t(n(e))})})},isReady:o}},Wt={nu:$t,pure:function(t){return $t(function(e){e(t)})}},Kt=function(n){function e(e){n().then(e,Vt)}return{map:function(e){return Kt(function(){return n().then(e)})},bind:function(t){return Kt(function(){return n().then(function(e){return t(e).toPromise()})})},anonBind:function(e){return Kt(function(){return n().then(function(){return e.toPromise()})})},toLazy:function(){return Wt.nu(e)},toCached:function(){var e=null;return Kt(function(){return null===e&&(e=n()),e})},toPromise:n,get:e}},Xt={nu:function(e){return Kt(function(){return new qt(e)})},pure:function(e){return Kt(function(){return qt.resolve(e)})}},Yt=function(e){return It(e,Xt.nu)},Gt=function(n){return{is:function(e){return n===e},isValue:a,isError:c,getOr:$(n),getOrThunk:$(n),getOrDie:$(n),or:function(e){return Gt(n)},orThunk:function(e){return Gt(n)},fold:function(e,t){return t(n)},map:function(e){return Gt(e(n))},mapError:function(e){return Gt(n)},each:function(e){e(n)},bind:function(e){return e(n)},exists:function(e){return e(n)},forall:function(e){return e(n)},toOption:function(){return k.some(n)}}},Jt=function(n){return{is:c,isValue:c,isError:a,getOr:W,getOrThunk:function(e){return e()},getOrDie:function(){return function(e){return function(){throw new Error(e)}}(String(n))()},or:function(e){return e},orThunk:function(e){return e()},fold:function(e,t){return e(n)},map:function(e){return Jt(n)},mapError:function(e){return Jt(e(n))},each:i,bind:function(e){return Jt(n)},exists:c,forall:a,toOption:k.none}},Qt={value:Gt,error:Jt,fromOption:function(e,t){return e.fold(function(){return Jt(t)},Gt)}},Zt=window.Promise?window.Promise:(Ft=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},Ut=tn.immediateFn||"function"==typeof j.setImmediate&&j.setImmediate||function(e){j.setTimeout(e,1)},tn.prototype["catch"]=function(e){return this.then(null,e)},tn.prototype.then=function(n,r){var o=this;return new tn(function(e,t){nn.call(o,new un(n,r,e,t))})},tn.all=function(){var s=Array.prototype.slice.call(1===arguments.length&&Ft(arguments[0])?arguments[0]:arguments);return new tn(function(o,i){if(0===s.length)return o([]);var a=s.length;function u(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){u(t,e)},i)}s[t]=e,0==--a&&o(s)}catch(r){i(r)}}for(var e=0;e<s.length;e++)u(e,s[e])})},tn.resolve=function(t){return t&&"object"==typeof t&&t.constructor===tn?t:new tn(function(e){e(t)})},tn.reject=function(n){return new tn(function(e,t){t(n)})},tn.race=function(o){return new tn(function(e,t){for(var n=0,r=o.length;n<r;n++)o[n].then(e,t)})},tn);function en(e,t){return function(){e.apply(t,arguments)}}function tn(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],sn(e,en(rn,this),en(on,this))}function nn(r){var o=this;null!==this._state?Ut(function(){var e=o._state?r.onFulfilled:r.onRejected;if(null!==e){var t;try{t=e(o._value)}catch(n){return void r.reject(n)}r.resolve(t)}else(o._state?r.resolve:r.reject)(o._value)}):this._deferreds.push(r)}function rn(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void sn(en(t,e),en(rn,this),en(on,this))}this._state=!0,this._value=e,an.call(this)}catch(n){on.call(this,n)}}function on(e){this._state=!1,this._value=e,an.call(this)}function an(){for(var e=0,t=this._deferreds.length;e<t;e++)nn.call(this,this._deferreds[e]);this._deferreds=null}function un(e,t,n,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r}function sn(e,t,n){var r=!1;try{e(function(e){r||(r=!0,t(e))},function(e){r||(r=!0,n(e))})}catch(o){if(r)return;r=!0,n(o)}}function cn(e,t){return"number"!=typeof t&&(t=0),j.setTimeout(e,t)}function ln(e,t){return"number"!=typeof t&&(t=1),j.setInterval(e,t)}function fn(n,r){var o,e;return(e=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];j.clearTimeout(o),o=cn(function(){n.apply(this,e)},r)}).stop=function(){j.clearTimeout(o)},e}function dn(e,t,n){var r,o;if(!e)return 0;if(n=n||e,e.length!==undefined){for(r=0,o=e.length;r<o;r++)if(!1===t.call(n,e[r],r,e))return 0}else for(r in e)if(e.hasOwnProperty(r)&&!1===t.call(n,e[r],r,e))return 0;return 1}function hn(e,t,n){var r,o;for(r=0,o=e.length;r<o;r++)if(t.call(n,e[r],r,e))return r;return-1}function mn(e){return null===e||e===undefined?"":(""+e).replace(Tn,"")}function gn(e,t){return t?!("array"!==t||!kn.isArray(e))||typeof e===t:e!==undefined}var pn={requestAnimationFrame:function(e,t){jt?jt.then(e):jt=new Zt(function(e){!function(e,t){var n,r=j.window.requestAnimationFrame,o=["ms","moz","webkit"];for(n=0;n<o.length&&!r;n++)r=j.window[o[n]+"RequestAnimationFrame"];(r=r||function(e){j.window.setTimeout(e,0)})(e,t)}(e,t=t||j.document.body)}).then(e)},setTimeout:cn,setInterval:ln,setEditorTimeout:function(e,t,n){return cn(function(){e.removed||t()},n)},setEditorInterval:function(e,t,n){var r;return r=ln(function(){e.removed?j.clearInterval(r):t()},n)},debounce:fn,throttle:fn,clearInterval:function(e){return j.clearInterval(e)},clearTimeout:function(e){return j.clearTimeout(e)}},vn=j.navigator.userAgent,yn=oe(),bn=yn.browser,Cn=yn.os,wn=yn.deviceType,xn=/WebKit/.test(vn)&&!bn.isEdge(),zn="FormData"in j.window&&"FileReader"in j.window&&"URL"in j.window&&!!j.URL.createObjectURL,En=-1!==vn.indexOf("Windows Phone"),Nn={opera:bn.isOpera(),webkit:xn,ie:!(!bn.isIE()&&!bn.isEdge())&&bn.version.major,gecko:bn.isFirefox(),mac:Cn.isOSX()||Cn.isiOS(),iOS:wn.isiPad()||wn.isiPhone(),android:Cn.isAndroid(),contentEditable:!0,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:!0,range:j.window.getSelection&&"Range"in j.window,documentMode:bn.isIE()?j.document.documentMode||7:10,fileApi:zn,ceFalse:!0,cacheSuffix:null,container:null,experimentalShadowDom:!1,canHaveCSP:!bn.isIE(),desktop:wn.isDesktop(),windowsPhone:En,browser:{current:bn.current,version:bn.version,isChrome:bn.isChrome,isEdge:bn.isEdge,isFirefox:bn.isFirefox,isIE:bn.isIE,isOpera:bn.isOpera,isSafari:bn.isSafari},os:{current:Cn.current,version:Cn.version,isAndroid:Cn.isAndroid,isFreeBSD:Cn.isFreeBSD,isiOS:Cn.isiOS,isLinux:Cn.isLinux,isOSX:Cn.isOSX,isSolaris:Cn.isSolaris,isWindows:Cn.isWindows},deviceType:{isDesktop:wn.isDesktop,isiPad:wn.isiPad,isiPhone:wn.isiPhone,isPhone:wn.isPhone,isTablet:wn.isTablet,isTouch:wn.isTouch,isWebView:wn.isWebView}},Sn=Array.isArray,kn={isArray:Sn,toArray:function(e){var t,n,r=e;if(!Sn(e))for(r=[],t=0,n=e.length;t<n;t++)r[t]=e[t];return r},each:dn,map:function(n,r){var o=[];return dn(n,function(e,t){o.push(r(e,t,n))}),o},filter:function(n,r){var o=[];return dn(n,function(e,t){r&&!r(e,t,n)||o.push(e)}),o},indexOf:function(e,t){var n,r;if(e)for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},reduce:function(e,t,n,r){var o=0;for(arguments.length<3&&(n=e[0]);o<e.length;o++)n=t.call(r,n,e[o],o);return n},findIndex:hn,find:function(e,t,n){var r=hn(e,t,n);return-1!==r?e[r]:undefined},last:function(e){return e[e.length-1]}},Tn=/^\s*|\s*$/g,An=function(e,n,r,o){o=o||this,e&&(r&&(e=e[r]),kn.each(e,function(e,t){if(!1===n.call(o,e,t,r))return!1;An(e,n,r,o)}))},Mn={trim:mn,isArray:kn.isArray,is:gn,toArray:kn.toArray,makeMap:function(e,t,n){var r;for(t=t||",","string"==typeof(e=e||[])&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n},each:kn.each,map:kn.map,grep:kn.filter,inArray:kn.indexOf,hasOwn:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},extend:function(e,t){for(var n,r,o,i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var u,s=arguments;for(n=1,r=s.length;n<r;n++)for(o in t=s[n])t.hasOwnProperty(o)&&(u=t[o])!==undefined&&(e[o]=u);return e},create:function(e,t,n){var r,o,i,a,u,s=this,c=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),i=e[3].match(/(^|\.)(\w+)$/i)[2],!(o=s.createNS(e[3].replace(/\.\w+$/,""),n))[i]){if("static"===e[2])return o[i]=t,void(this.onCreate&&this.onCreate(e[2],e[3],o[i]));t[i]||(t[i]=function(){},c=1),o[i]=t[i],s.extend(o[i].prototype,t),e[5]&&(r=s.resolve(e[5]).prototype,a=e[5].match(/\.(\w+)$/i)[1],u=o[i],o[i]=c?function(){return r[a].apply(this,arguments)}:function(){return this.parent=r[a],u.apply(this,arguments)},o[i].prototype[i]=o[i],s.each(r,function(e,t){o[i].prototype[t]=r[t]}),s.each(t,function(e,t){r[t]?o[i].prototype[t]=function(){return this.parent=r[t],e.apply(this,arguments)}:t!==i&&(o[i].prototype[t]=e)})),s.each(t["static"],function(e,t){o[i][t]=e})}},walk:An,createNS:function(e,t){var n,r;for(t=t||j.window,e=e.split("."),n=0;n<e.length;n++)t[r=e[n]]||(t[r]={}),t=t[r];return t},resolve:function(e,t){var n,r;for(t=t||j.window,n=0,r=(e=e.split(".")).length;n<r&&(t=t[e[n]]);n++);return t},explode:function(e,t){return!e||gn(e,"array")?e:kn.map(e.split(t||","),mn)},_addCacheSuffix:function(e){var t=Nn.cacheSuffix;return t&&(e+=(-1===e.indexOf("?")?"?":"&")+t),e}};function Rn(t){var n;return function(e){return(n=n||function(e,t){for(var n={},r=0,o=e.length;r<o;r++){var i=e[r];n[String(i)]=t(i,r)}return n}(t,$(!0))).hasOwnProperty(ie(e))}}function Dn(e){return xt(e)&&!Vn(e)}function _n(e){return xt(e)&&"br"===ie(e)}function Bn(e){return e&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")}var On,Hn,Pn,Ln=Rn(["h1","h2","h3","h4","h5","h6"]),Vn=Rn(["article","aside","details","div","dt","figcaption","footer","form","fieldset","header","hgroup","html","main","nav","section","summary","body","p","dl","multicol","dd","figure","address","center","blockquote","h1","h2","h3","h4","h5","h6","listing","xmp","pre","plaintext","menu","dir","ul","ol","li","hr","table","tbody","thead","tfoot","th","tr","td","caption"]),In=Rn(["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"]),Fn=Rn(["ul","ol","dl"]),Un=Rn(["li","dd","dt"]),jn=Rn(["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param","embed","source","wbr","track"]),qn=Rn(["thead","tbody","tfoot"]),$n=Rn(["td","th"]),Wn=Rn(["pre","script","textarea","style"]),Kn=function(e,t){var n,r=t.childNodes;if(!Ge.isElement(t)||!Bn(t)){for(n=r.length-1;0<=n;n--)Kn(e,r[n]);if(!1===Ge.isDocument(t)){if(Ge.isText(t)&&0<t.nodeValue.length){var o=Mn.trim(t.nodeValue).length;if(e.isBlock(t.parentNode)||0<o)return;if(0===o&&function(e){var t=e.previousSibling&&"SPAN"===e.previousSibling.nodeName,n=e.nextSibling&&"SPAN"===e.nextSibling.nodeName;return t&&n}(t))return}else if(Ge.isElement(t)&&(1===(r=t.childNodes).length&&Bn(r[0])&&t.parentNode.insertBefore(r[0],t),r.length||jn(yt.fromDom(t))))return;e.remove(t)}return t}},Xn={trimNode:Kn},Yn=Mn.makeMap,Gn=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Jn=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Qn=/[<>&\"\']/g,Zn=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,er={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};Hn={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},Pn={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"};function tr(e,t){var n,r,o,i={};if(e){for(e=e.split(","),t=t||10,n=0;n<e.length;n+=2)r=String.fromCharCode(parseInt(e[n],t)),Hn[r]||(o="&"+e[n+1]+";",i[r]=o,i[o]=r);return i}}On=tr("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);function nr(e,t){return e.replace(t?Gn:Jn,function(e){return Hn[e]||e})}function rr(e,t){return e.replace(t?Gn:Jn,function(e){return 1<e.length?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":Hn[e]||"&#"+e.charCodeAt(0)+";"})}function or(e,t,n){return n=n||On,e.replace(t?Gn:Jn,function(e){return Hn[e]||n[e]||e})}var ir={encodeRaw:nr,encodeAllRaw:function(e){return(""+e).replace(Qn,function(e){return Hn[e]||e})},encodeNumeric:rr,encodeNamed:or,getEncodeFunc:function(e,t){var n=tr(t)||On,r=Yn(e.replace(/\+/g,","));return r.named&&r.numeric?function(e,t){return e.replace(t?Gn:Jn,function(e){return Hn[e]!==undefined?Hn[e]:n[e]!==undefined?n[e]:1<e.length?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":"&#"+e.charCodeAt(0)+";"})}:r.named?t?function(e,t){return or(e,t,n)}:or:r.numeric?rr:nr},decode:function(e){return e.replace(Zn,function(e,t){return t?65535<(t="x"===t.charAt(0).toLowerCase()?parseInt(t.substr(1),16):parseInt(t,10))?(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))):er[t]||String.fromCharCode(t):Pn[e]||On[e]||function(e){var t;return(t=yt.fromTag("div").dom()).innerHTML=e,t.textContent||t.innerText||e}(e)})}},ar={},ur={},sr=Mn.makeMap,cr=Mn.each,lr=Mn.extend,fr=Mn.explode,dr=Mn.inArray,hr=function(e,t){return(e=Mn.trim(e))?e.split(t||" "):[]},mr=function(e){function t(e,t,n){function r(e,t){var n,r,o={};for(n=0,r=e.length;n<r;n++)o[e[n]]=t||{};return o}var o,i,a;for(t=t||"","string"==typeof(n=n||[])&&(n=hr(n)),o=(e=hr(e)).length;o--;)a={attributes:r(i=hr([u,t].join(" "))),attributesOrder:i,children:r(n,ur)},c[e[o]]=a}function n(e,t){var n,r,o,i;for(n=(e=hr(e)).length,t=hr(t);n--;)for(r=c[e[n]],o=0,i=t.length;o<i;o++)r.attributes[t[o]]={},r.attributesOrder.push(t[o])}var u,r,o,i,a,s,c={};return ar[e]?ar[e]:(u="id accesskey class dir lang style tabindex title role",r="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",o="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment","html4"!==e&&(u+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",r+=" article aside details dialog figure main header footer hgroup section nav",o+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),"html5-strict"!==e&&(u+=" xml:lang",o=[o,s="acronym applet basefont big font strike tt"].join(" "),cr(hr(s),function(e){t(e,"",o)}),r=[r,a="center dir isindex noframes"].join(" "),i=[r,o].join(" "),cr(hr(a),function(e){t(e,"",i)})),i=i||[r,o].join(" "),t("html","manifest","head body"),t("head","","base command link meta noscript script style title"),t("title hr noscript br"),t("base","href target"),t("link","href rel media hreflang type sizes hreflang"),t("meta","name http-equiv content charset"),t("style","media type scoped"),t("script","src async defer type charset"),t("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",i),t("address dt dd div caption","",i),t("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",o),t("blockquote","cite",i),t("ol","reversed start type","li"),t("ul","","li"),t("li","value",i),t("dl","","dt dd"),t("a","href target rel media hreflang type",o),t("q","cite",o),t("ins del","cite datetime",i),t("img","src sizes srcset alt usemap ismap width height"),t("iframe","src name width height",i),t("embed","src type width height"),t("object","data type typemustmatch name usemap form width height",[i,"param"].join(" ")),t("param","name value"),t("map","name",[i,"area"].join(" ")),t("area","alt coords shape href target rel media hreflang type"),t("table","border","caption colgroup thead tfoot tbody tr"+("html4"===e?" col":"")),t("colgroup","span","col"),t("col","span"),t("tbody thead tfoot","","tr"),t("tr","","td th"),t("td","colspan rowspan headers",i),t("th","colspan rowspan headers scope abbr",i),t("form","accept-charset action autocomplete enctype method name novalidate target",i),t("fieldset","disabled form name",[i,"legend"].join(" ")),t("label","form for",o),t("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),t("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"===e?i:o),t("select","disabled form multiple name required size","option optgroup"),t("optgroup","disabled label","option"),t("option","disabled label selected value"),t("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),t("menu","type label",[i,"li"].join(" ")),t("noscript","",i),"html4"!==e&&(t("wbr"),t("ruby","",[o,"rt rp"].join(" ")),t("figcaption","",i),t("mark rt rp summary bdi","",o),t("canvas","width height",i),t("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[i,"track source"].join(" ")),t("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[i,"track source"].join(" ")),t("picture","","img source"),t("source","src srcset type media sizes"),t("track","kind src srclang label default"),t("datalist","",[o,"option"].join(" ")),t("article section nav aside main header footer","",i),t("hgroup","","h1 h2 h3 h4 h5 h6"),t("figure","",[i,"figcaption"].join(" ")),t("time","datetime",o),t("dialog","open",i),t("command","type label icon disabled checked radiogroup command"),t("output","for form name",o),t("progress","value max",o),t("meter","value min max low high optimum",o),t("details","open",[i,"summary"].join(" ")),t("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!==e&&(n("script","language xml:space"),n("style","xml:space"),n("object","declare classid code codebase codetype archive standby align border hspace vspace"),n("embed","align name hspace vspace"),n("param","valuetype type"),n("a","charset name rev shape coords"),n("br","clear"),n("applet","codebase archive code object alt name width height align hspace vspace"),n("img","name longdesc align border hspace vspace"),n("iframe","longdesc frameborder marginwidth marginheight scrolling align"),n("font basefont","size color face"),n("input","usemap align"),n("select","onchange"),n("textarea"),n("h1 h2 h3 h4 h5 h6 div p legend caption","align"),n("ul","type compact"),n("li","type"),n("ol dl menu dir","compact"),n("pre","width xml:space"),n("hr","align noshade size width"),n("isindex","prompt"),n("table","summary width frame rules cellspacing cellpadding align bgcolor"),n("col","width align char charoff valign"),n("colgroup","width align char charoff valign"),n("thead","align char charoff valign"),n("tr","align char charoff valign bgcolor"),n("th","axis align char charoff valign nowrap bgcolor width height"),n("form","accept"),n("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),n("tfoot","align char charoff valign"),n("tbody","align char charoff valign"),n("area","nohref"),n("body","background bgcolor text link vlink alink")),"html4"!==e&&(n("input button select textarea","autofocus"),n("input textarea","placeholder"),n("a","download"),n("link script img","crossorigin"),n("iframe","sandbox seamless allowfullscreen")),cr(hr("a form meter progress dfn"),function(e){c[e]&&delete c[e].children[e]}),delete c.caption.children.table,delete c.script,ar[e]=c)},gr=function(e,n){var r;return e&&(r={},"string"==typeof e&&(e={"*":e}),cr(e,function(e,t){r[t]=r[t.toUpperCase()]="map"===n?sr(e,/[, ]/):fr(e,/[, ]/)})),r};function pr(i){function e(e,t,n){var r=i[e];return r?r=sr(r,/[, ]/,sr(r.toUpperCase(),/[, ]/)):(r=ar[e])||(r=sr(t," ",sr(t.toUpperCase()," ")),r=lr(r,n),ar[e]=r),r}var t,n,r,o,a,u,s,c,l,f,d,h,m,z={},g={},E=[],p={},v={};r=mr((i=i||{}).schema),!1===i.verify_html&&(i.valid_elements="*[*]"),t=gr(i.valid_styles),n=gr(i.invalid_styles,"map"),c=gr(i.valid_classes,"map"),o=e("whitespace_elements","pre script noscript style textarea video audio iframe object code"),a=e("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),u=e("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),s=e("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),f=e("non_empty_elements","td th iframe video audio object script pre code",u),d=e("move_caret_before_on_enter_elements","table",f),h=e("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),l=e("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption details summary",h),m=e("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),cr((i.special||"script noscript noframes noembed title style textarea xmp").split(" "),function(e){v[e]=new RegExp("</"+e+"[^>]*>","gi")});function N(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")}function y(e){var t,n,r,o,i,a,u,s,c,l,f,d,h,m,g,p,v,y,b,C=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,w=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/,x=/[*?+]/;if(e)for(e=hr(e,","),z["@"]&&(p=z["@"].attributes,v=z["@"].attributesOrder),t=0,n=e.length;t<n;t++)if(i=C.exec(e[t])){if(m=i[1],c=i[2],g=i[3],s=i[5],a={attributes:d={},attributesOrder:h=[]},"#"===m&&(a.paddEmpty=!0),"-"===m&&(a.removeEmpty=!0),"!"===i[4]&&(a.removeEmptyAttrs=!0),p){for(y in p)d[y]=p[y];h.push.apply(h,v)}if(s)for(r=0,o=(s=hr(s,"|")).length;r<o;r++)if(i=w.exec(s[r])){if(u={},f=i[1],l=i[2].replace(/[\\:]:/g,":"),m=i[3],b=i[4],"!"===f&&(a.attributesRequired=a.attributesRequired||[],a.attributesRequired.push(l),u.required=!0),"-"===f){delete d[l],h.splice(dr(h,l),1);continue}m&&("="===m&&(a.attributesDefault=a.attributesDefault||[],a.attributesDefault.push({name:l,value:b}),u.defaultValue=b),":"===m&&(a.attributesForced=a.attributesForced||[],a.attributesForced.push({name:l,value:b}),u.forcedValue=b),"<"===m&&(u.validValues=sr(b,"?"))),x.test(l)?(a.attributePatterns=a.attributePatterns||[],u.pattern=N(l),a.attributePatterns.push(u)):(d[l]||h.push(l),d[l]=u)}p||"@"!==c||(p=d,v=h),g&&(a.outputName=c,z[g]=a),x.test(c)?(a.pattern=N(c),E.push(a)):z[c]=a}}function b(e){z={},E=[],y(e),cr(r,function(e,t){g[t]=e.children})}function C(e){var a=/^(~)?(.+)$/;e&&(ar.text_block_elements=ar.block_elements=null,cr(hr(e,","),function(e){var t=a.exec(e),n="~"===t[1],r=n?"span":"div",o=t[2];if(g[o]=g[r],p[o]=r,n||(l[o.toUpperCase()]={},l[o]={}),!z[o]){var i=z[r];delete(i=lr({},i)).removeEmptyAttrs,delete i.removeEmpty,z[o]=i}cr(g,function(e,t){e[r]&&(g[t]=e=lr({},g[t]),e[o]=e[r])})}))}function w(e){var o=/^([+\-]?)(\w+)\[([^\]]+)\]$/;ar[i.schema]=null,e&&cr(hr(e,","),function(e){var t,n,r=o.exec(e);r&&(n=r[1],t=n?g[r[2]]:g[r[2]]={"#comment":{}},t=g[r[2]],cr(hr(r[3],"|"),function(e){"-"===n?delete t[e]:t[e]={}}))})}function x(e){var t,n=z[e];if(n)return n;for(t=E.length;t--;)if((n=E[t]).pattern.test(e))return n}i.valid_elements?b(i.valid_elements):(cr(r,function(e,t){z[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},g[t]=e.children}),"html5"!==i.schema&&cr(hr("strong/b em/i"),function(e){e=hr(e,"/"),z[e[1]].outputName=e[0]}),cr(hr("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(e){z[e]&&(z[e].removeEmpty=!0)}),cr(hr("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"),function(e){z[e].paddEmpty=!0}),cr(hr("span"),function(e){z[e].removeEmptyAttrs=!0})),C(i.custom_elements),w(i.valid_children),y(i.extended_valid_elements),w("+ol[ul|ol],+ul[ul|ol]"),cr({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},function(e,t){z[t]&&(z[t].parentsRequired=hr(e))}),i.invalid_elements&&cr(fr(i.invalid_elements),function(e){z[e]&&delete z[e]}),x("span")||y("span[!data-mce-type|*]");return{children:g,elements:z,getValidStyles:function(){return t},getValidClasses:function(){return c},getBlockElements:function(){return l},getInvalidStyles:function(){return n},getShortEndedElements:function(){return u},getTextBlockElements:function(){return h},getTextInlineElements:function(){return m},getBoolAttrs:function(){return s},getElementRule:x,getSelfClosingElements:function(){return a},getNonEmptyElements:function(){return f},getMoveCaretBeforeOnEnterElements:function(){return d},getWhiteSpaceElements:function(){return o},getSpecialElements:function(){return v},isValidChild:function(e,t){var n=g[e.toLowerCase()];return!(!n||!n[t.toLowerCase()])},isValid:function(e,t){var n,r,o=x(e);if(o){if(!t)return!0;if(o.attributes[t])return!0;if(n=o.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(e))return!0}return!1},getCustomElements:function(){return p},addValidElements:y,setValidElements:b,addCustomElements:C,addValidChildren:w}}function vr(e,t,n,r){function o(e){return 1<(e=parseInt(e,10).toString(16)).length?e:"0"+e}return"#"+o(t)+o(n)+o(r)}function yr(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r||!1):e.attachEvent&&e.attachEvent("on"+t,n)}function br(e,t,n,r){e.removeEventListener?e.removeEventListener(t,n,r||!1):e.detachEvent&&e.detachEvent("on"+t,n)}function Cr(e,t){var n,r=t||{};for(n in e)Er[n]||(r[n]=e[n]);if(r.target||(r.target=r.srcElement||j.document),Nn.experimentalShadowDom&&(r.target=function(e,t){if(e.composedPath){var n=e.composedPath();if(n&&0<n.length)return n[0]}return t}(e,r.target)),e&&zr.test(e.type)&&e.pageX===undefined&&e.clientX!==undefined){var o=r.target.ownerDocument||j.docum